From owner-svn-src-head@freebsd.org Sun May 19 05:46:26 2019 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 1F7A315A3E0D; Sun, 19 May 2019 05:46:26 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3533B807FD; Sun, 19 May 2019 05:46:25 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0B8002A99; Sun, 19 May 2019 05:46:25 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4J5kOPG027341; Sun, 19 May 2019 05:46:24 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4J5kOkO027339; Sun, 19 May 2019 05:46:24 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201905190546.x4J5kOkO027339@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 19 May 2019 05:46:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r347966 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 347966 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3533B807FD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.947,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 May 2019 05:46:26 -0000 Author: imp Date: Sun May 19 05:46:24 2019 New Revision: 347966 URL: https://svnweb.freebsd.org/changeset/base/347966 Log: Add note about nvd / nda selection. Noticed by: cem@ Modified: head/share/man/man4/nvme.4 Modified: head/share/man/man4/nvme.4 ============================================================================== --- head/share/man/man4/nvme.4 Sun May 19 04:56:02 2019 (r347965) +++ head/share/man/man4/nvme.4 Sun May 19 05:46:24 2019 (r347966) @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 7, 2018 +.Dd May 18, 2019 .Dt NVME 4 .Os .Sh NAME @@ -119,6 +119,38 @@ hw.nvme.force_intx=1 .Ed .Pp Note that use of INTx implies disabling of per-CPU I/O queue pairs. +.Pp +The +.Xr nvd 4 +driver is used to provide a disk driver to the system by default. +The +.Xr nda 4 +driver can also be used instead. +The +.Xr nvd 4 +driver performs better with smaller transactions and few TRIM +commands. +It sends all commands directly the drive immediately. +The +.Xr nda 4 +driver performs better with larger transactions and also collapses +TRIM commands giving better performance. +It can queue commands to the drive; combine +.Dv BIO_DELETE +commands into a single trip; and +use the CAM I/O scheduler to bias one type of operation over another. +To select the +.Xr nda 4 +driver, set the following tunable value in +.Xr loader.conf 5 : +.Bd -literal -offset indent +hw.nvme.use_nvd=0 +.Ed +.Pp +This value may also be set in the kernel config file with +.Bd -literal -offset indent +.Cd options NVME_USE_NVD=0 +.Ed .Sh SYSCTL VARIABLES The following controller-level sysctls are currently implemented: .Bl -tag -width indent From owner-svn-src-head@freebsd.org Sun May 19 06:01:12 2019 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 60EC015A4248; Sun, 19 May 2019 06:01:12 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 01B1380D56; Sun, 19 May 2019 06:01:12 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D12BD2D76; Sun, 19 May 2019 06:01:11 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4J61BBK035030; Sun, 19 May 2019 06:01:11 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4J61Bdu035028; Sun, 19 May 2019 06:01:11 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201905190601.x4J61Bdu035028@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sun, 19 May 2019 06:01:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r347967 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 347967 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 01B1380D56 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.947,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 May 2019 06:01:12 -0000 Author: cem Date: Sun May 19 06:01:11 2019 New Revision: 347967 URL: https://svnweb.freebsd.org/changeset/base/347967 Log: nvd.4: Reference nda(4) Fix a totally minor typo in nvme.4 while here. Modified: head/share/man/man4/nvd.4 head/share/man/man4/nvme.4 Modified: head/share/man/man4/nvd.4 ============================================================================== --- head/share/man/man4/nvd.4 Sun May 19 05:46:24 2019 (r347966) +++ head/share/man/man4/nvd.4 Sun May 19 06:01:11 2019 (r347967) @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 28, 2016 +.Dd May 18, 2019 .Dt NVD 4 .Os .Sh NAME @@ -86,6 +86,7 @@ hw.nvd.delete_max= .Ed .Sh SEE ALSO .Xr GEOM 4 , +.Xr nda 4 , .Xr nvme 4 , .Xr geom 8 , .Xr nvmecontrol 8 , Modified: head/share/man/man4/nvme.4 ============================================================================== --- head/share/man/man4/nvme.4 Sun May 19 05:46:24 2019 (r347966) +++ head/share/man/man4/nvme.4 Sun May 19 06:01:11 2019 (r347967) @@ -130,7 +130,7 @@ The .Xr nvd 4 driver performs better with smaller transactions and few TRIM commands. -It sends all commands directly the drive immediately. +It sends all commands directly to the drive immediately. The .Xr nda 4 driver performs better with larger transactions and also collapses From owner-svn-src-head@freebsd.org Sun May 19 08:20:08 2019 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 3DC1C15A7418; Sun, 19 May 2019 08:20:08 +0000 (UTC) (envelope-from chagin.dmitry@gmail.com) Received: from mail-it1-f179.google.com (mail-it1-f179.google.com [209.85.166.179]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C9701843DE; Sun, 19 May 2019 08:20:07 +0000 (UTC) (envelope-from chagin.dmitry@gmail.com) Received: by mail-it1-f179.google.com with SMTP id q132so18303837itc.5; Sun, 19 May 2019 01:20:07 -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=QP+Xn0HtyG/EqsgaIhkvXAahQiGi39R5nGJsERvqbvk=; b=djBh09BXc2tiojZi4/DrD5QIaS/L+kBU99ClDQmBr4P3JzIY9yqzE0XLqhNX5zbnj4 qKBkVHE/0xZnB63btLIWwGOyyqOqrSXz+S/Tsug8eyDqROpIKd5X3D01UGK9mTdTbLFD OLpQsjASarBxACV5OOOf7Do97i01kvW+Symmwc5Uo7le9VmChCbeq94UkcSYDHZaTAcZ /3r0ONYUv/b5pnw/q0q1eAFVMkb6g7++EMtKO4UIJgL9KmsIge6XxeDIzk6qxKaCeoti i1FfL2IjYHiBXYU26+PeuOo6WC+klKgTvdc9afx0VpfWE8F3kivn8mbfdQxaTIdnvI+r GP5g== X-Gm-Message-State: APjAAAVsQCvz0/kebpKOqeVKkZXzUmcaN4hE2laXDUPKAd67YgGgdvRx 7MCanKPo+uNM5bkK/VvttPU3ku1ErsFSfREr1pE= X-Google-Smtp-Source: APXvYqw42EeHi7m6/F8HrIPR7M87fH2Pu2VmxMRcTBajEPnLcmHivzHkxlZqXoC6VTHLMhPbRQtv7XYKIi5OkC4fmVo= X-Received: by 2002:a02:caad:: with SMTP id e13mr2133735jap.142.1558253530178; Sun, 19 May 2019 01:12:10 -0700 (PDT) MIME-Version: 1.0 References: <201905161328.x4GDSmMd072071@repo.freebsd.org> <20190518084406.GX2748@kib.kiev.ua> In-Reply-To: <20190518084406.GX2748@kib.kiev.ua> From: Dmitry Chagin Date: Sun, 19 May 2019 11:11:59 +0300 Message-ID: Subject: Re: svn commit: r347695 - in head/sys: amd64/amd64 amd64/include kern To: Konstantin Belousov Cc: Dmitry Chagin , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: C9701843DE X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.92 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.92)[-0.923,0]; TAGGED_FROM(0.00)[] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 May 2019 08:20:08 -0000 =D1=81=D0=B1, 18 =D0=BC=D0=B0=D1=8F 2019 =D0=B3. =D0=B2 11:44, Konstantin B= elousov : > On Sat, May 18, 2019 at 11:35:29AM +0300, Dmitry Chagin wrote: > > =D1=87=D1=82, 16 =D0=BC=D0=B0=D1=8F 2019 =D0=B3. =D0=B2 16:29, Konstant= in Belousov : > > > > > Author: kib > > > Date: Thu May 16 13:28:48 2019 > > > New Revision: 347695 > > > URL: https://svnweb.freebsd.org/changeset/base/347695 > > > > > > Log: > > > amd64 pmap: rework delayed invalidation, removing global mutex. > > > > > > For machines having cmpxcgh16b instruction, i.e. everything but ver= y > > > early Athlons, provide lockless implementation of delayed > > > invalidation. > > > > > > The implementation maintains lock-less single-linked list with the > > > trick from the T.L. Harris article about volatile mark of the > elements > > > being removed. Double-CAS is used to atomically update both link an= d > > > generation. New thread starting DI appends itself to the end of th= e > > > queue, setting the generation to the generation of the last element > > > +1. On DI finish, thread donates its generation to the previous > > > element. The generation of the fake head of the list is the last > > > passed DI generation. Basically, the implementation is a queued > > > spinlock but without spinlock. > > > > > > > > > > Hi, Kostik! First of all thanks for the previous help. > > Second, this commit broke i915kms module. Unfortunatelly, > > I can't give you a lot of information becouse I see only black screen, > > but I can help with testing > Did you recompiled the module ? > I use pkg, but after your mail, yes, compiled drm-current-kmod root@mordor:~ # kldstat Id Refs Address Size Name 1 4 0xffffffff80200000 1d536e0 kernel 2 1 0xffffffff81f54000 11e8 acpi_call.ko root@mordor:~ # kldload i915kms sysctl_warn_reuse: can't re-use a leaf (compat.linuxkpi.debug)! drmn1: on vgapci1 device_attach: drmn1 attach returned 19 root@mordor:~ so, I'll ping freebsd-x11 From owner-svn-src-head@freebsd.org Sun May 19 09:18:10 2019 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 DE2B815A89EF; Sun, 19 May 2019 09:18:10 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8076585F28; Sun, 19 May 2019 09:18:10 +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 4D61C5036; Sun, 19 May 2019 09:18:10 +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 x4J9IAVm036580; Sun, 19 May 2019 09:18:10 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4J9IAs1036579; Sun, 19 May 2019 09:18:10 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201905190918.x4J9IAs1036579@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 19 May 2019 09:18:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r347968 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 347968 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8076585F28 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 May 2019 09:18:11 -0000 Author: kib Date: Sun May 19 09:18:09 2019 New Revision: 347968 URL: https://svnweb.freebsd.org/changeset/base/347968 Log: Fix rw->ro remount when there is a text vnode mapping. Reported and tested by: hrs Sponsored by: The FreeBSD Foundation MFC after: 16 days Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sun May 19 06:01:11 2019 (r347967) +++ head/sys/kern/vfs_subr.c Sun May 19 09:18:09 2019 (r347968) @@ -3146,7 +3146,7 @@ loop: if ((vp->v_type == VNON || (error == 0 && vattr.va_nlink > 0)) && - (vp->v_writecount == 0 || vp->v_type != VREG)) { + (vp->v_writecount <= 0 || vp->v_type != VREG)) { VOP_UNLOCK(vp, 0); vdropl(vp); continue; From owner-svn-src-head@freebsd.org Sun May 19 09:23:21 2019 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 42D6E15A8C51; Sun, 19 May 2019 09:23:21 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D5919863FD; Sun, 19 May 2019 09:23:20 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A963751EE; Sun, 19 May 2019 09:23:20 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4J9NKmk041626; Sun, 19 May 2019 09:23:20 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4J9NKOT041625; Sun, 19 May 2019 09:23:20 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201905190923.x4J9NKOT041625@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 19 May 2019 09:23:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r347969 - head/sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: dchagin X-SVN-Commit-Paths: head/sys/compat/linux X-SVN-Commit-Revision: 347969 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D5919863FD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 May 2019 09:23:21 -0000 Author: dchagin Date: Sun May 19 09:23:20 2019 New Revision: 347969 URL: https://svnweb.freebsd.org/changeset/base/347969 Log: Linux send() call returns EAGAIN instead of ENOTCONN in case when the socket is non-blocking and connect() is not finished yet. Initial patch developed by Steven Hartland in 2008 and adopted by me. PR: 129169 Reported by: smh@ MFC after: 2 weeks Modified: head/sys/compat/linux/linux_socket.c Modified: head/sys/compat/linux/linux_socket.c ============================================================================== --- head/sys/compat/linux/linux_socket.c Sun May 19 09:18:09 2019 (r347968) +++ head/sys/compat/linux/linux_socket.c Sun May 19 09:23:20 2019 (r347969) @@ -798,6 +798,8 @@ linux_send(struct thread *td, struct linux_send_args * caddr_t to; int tolen; } */ bsd_args; + struct file *fp; + int error, fflag; bsd_args.s = args->s; bsd_args.buf = (caddr_t)PTRIN(args->msg); @@ -805,7 +807,21 @@ linux_send(struct thread *td, struct linux_send_args * bsd_args.flags = args->flags; bsd_args.to = NULL; bsd_args.tolen = 0; - return (sys_sendto(td, &bsd_args)); + error = sys_sendto(td, &bsd_args); + if (error == ENOTCONN) { + /* + * Linux doesn't return ENOTCONN for non-blocking sockets. + * Instead it returns the EAGAIN. + */ + error = getsock_cap(td, args->s, &cap_send_rights, &fp, + &fflag, NULL); + if (error == 0) { + if (fflag & FNONBLOCK) + error = EAGAIN; + fdrop(fp, td); + } + } + return (error); } struct linux_recv_args { From owner-svn-src-head@freebsd.org Sun May 19 12:58:46 2019 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 58A9815AD4E6; Sun, 19 May 2019 12:58:46 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ECEAB8B839; Sun, 19 May 2019 12:58: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 C0D9774EC; Sun, 19 May 2019 12:58: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 x4JCwjRx050473; Sun, 19 May 2019 12:58:45 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4JCwjWS050469; Sun, 19 May 2019 12:58:45 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201905191258.x4JCwjWS050469@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 19 May 2019 12:58:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r347971 - in head/sys: amd64/linux compat/linux X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in head/sys: amd64/linux compat/linux X-SVN-Commit-Revision: 347971 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: ECEAB8B839 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 May 2019 12:58:46 -0000 Author: trasz Date: Sun May 19 12:58:44 2019 New Revision: 347971 URL: https://svnweb.freebsd.org/changeset/base/347971 Log: Implement PTRACE_O_TRACESYSGOOD. This makes Linux strace(1) work. Reviewed by: dchagin MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20200 Modified: head/sys/amd64/linux/linux_ptrace.c head/sys/compat/linux/linux_emul.h head/sys/compat/linux/linux_misc.c head/sys/compat/linux/linux_misc.h Modified: head/sys/amd64/linux/linux_ptrace.c ============================================================================== --- head/sys/amd64/linux/linux_ptrace.c Sun May 19 09:24:51 2019 (r347970) +++ head/sys/amd64/linux/linux_ptrace.c Sun May 19 12:58:44 2019 (r347971) @@ -34,8 +34,10 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include +#include #include #include @@ -43,6 +45,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #define LINUX_PTRACE_TRACEME 0 @@ -107,6 +111,37 @@ map_signum(int lsig, int *bsigp) return (0); } +int +linux_ptrace_status(struct thread *td, pid_t pid, int status) +{ + struct ptrace_lwpinfo lwpinfo; + struct linux_pemuldata *pem; + register_t saved_retval; + int error; + + saved_retval = td->td_retval[0]; + error = kern_ptrace(td, PT_LWPINFO, pid, &lwpinfo, sizeof(lwpinfo)); + td->td_retval[0] = saved_retval; + if (error != 0) { + printf("%s: PT_LWPINFO failed with error %d\n", __func__, error); + return (status); + } + + pem = pem_find(td->td_proc); + KASSERT(pem != NULL, ("%s: proc emuldata not found.\n", __func__)); + + LINUX_PEM_SLOCK(pem); + if ((pem->ptrace_flags & LINUX_PTRACE_O_TRACESYSGOOD) && + lwpinfo.pl_flags & PL_FLAG_SCE) + status |= (LINUX_SIGTRAP | 0x80) << 8; + if ((pem->ptrace_flags & LINUX_PTRACE_O_TRACESYSGOOD) && + lwpinfo.pl_flags & PL_FLAG_SCX) + status |= (LINUX_SIGTRAP | 0x80) << 8; + LINUX_PEM_SUNLOCK(pem); + + return (status); +} + struct linux_pt_reg { l_ulong r15; l_ulong r14; @@ -279,6 +314,7 @@ linux_ptrace_peek(struct thread *td, pid_t pid, void * static int linux_ptrace_setoptions(struct thread *td, pid_t pid, l_ulong data) { + struct linux_pemuldata *pem; int mask; mask = 0; @@ -290,15 +326,20 @@ linux_ptrace_setoptions(struct thread *td, pid_t pid, return (EINVAL); } + pem = pem_find(td->td_proc); + KASSERT(pem != NULL, ("%s: proc emuldata not found.\n", __func__)); + /* * PTRACE_O_EXITKILL is ignored, we do that by default. */ + LINUX_PEM_XLOCK(pem); if (data & LINUX_PTRACE_O_TRACESYSGOOD) { - printf("%s: PTRACE_O_TRACESYSGOOD not implemented; " - "returning EINVAL\n", __func__); - return (EINVAL); + pem->ptrace_flags |= LINUX_PTRACE_O_TRACESYSGOOD; + } else { + pem->ptrace_flags &= ~LINUX_PTRACE_O_TRACESYSGOOD; } + LINUX_PEM_XUNLOCK(pem); if (data & LINUX_PTRACE_O_TRACEFORK) mask |= PTRACE_FORK; Modified: head/sys/compat/linux/linux_emul.h ============================================================================== --- head/sys/compat/linux/linux_emul.h Sun May 19 09:24:51 2019 (r347970) +++ head/sys/compat/linux/linux_emul.h Sun May 19 12:58:44 2019 (r347971) @@ -32,6 +32,8 @@ #ifndef _LINUX_EMUL_H_ #define _LINUX_EMUL_H_ +struct image_params; + /* * modeled after similar structure in NetBSD * this will be extended as we need more functionality @@ -68,6 +70,7 @@ struct linux_pemuldata { struct sx pem_sx; /* lock for this struct */ void *epoll; /* epoll data */ uint32_t persona; /* process execution domain */ + uint32_t ptrace_flags; /* used by ptrace(2) */ }; #define LINUX_PEM_XLOCK(p) sx_xlock(&(p)->pem_sx) Modified: head/sys/compat/linux/linux_misc.c ============================================================================== --- head/sys/compat/linux/linux_misc.c Sun May 19 09:24:51 2019 (r347970) +++ head/sys/compat/linux/linux_misc.c Sun May 19 12:58:44 2019 (r347971) @@ -886,27 +886,53 @@ linux_futimesat(struct thread *td, struct linux_futime } #endif -int -linux_common_wait(struct thread *td, int pid, int *status, - int options, struct rusage *ru) +static int +linux_common_wait(struct thread *td, int pid, int *statusp, + int options, struct __wrusage *wrup) { - int error, tmpstat; + siginfo_t siginfo; + idtype_t idtype; + id_t id; + int error, status, tmpstat; - error = kern_wait(td, pid, &tmpstat, options, ru); + if (pid == WAIT_ANY) { + idtype = P_ALL; + id = 0; + } else if (pid < 0) { + idtype = P_PGID; + id = (id_t)-pid; + } else { + idtype = P_PID; + id = (id_t)pid; + } + + /* + * For backward compatibility we implicitly add flags WEXITED + * and WTRAPPED here. + */ + options |= WEXITED | WTRAPPED; + error = kern_wait6(td, idtype, id, &status, options, wrup, &siginfo); if (error) return (error); - if (status) { - tmpstat &= 0xffff; - if (WIFSIGNALED(tmpstat)) + if (statusp) { + tmpstat = status & 0xffff; + if (WIFSIGNALED(tmpstat)) { tmpstat = (tmpstat & 0xffffff80) | bsd_to_linux_signal(WTERMSIG(tmpstat)); - else if (WIFSTOPPED(tmpstat)) + } else if (WIFSTOPPED(tmpstat)) { tmpstat = (tmpstat & 0xffff00ff) | (bsd_to_linux_signal(WSTOPSIG(tmpstat)) << 8); - else if (WIFCONTINUED(tmpstat)) +#if defined(__amd64__) && !defined(COMPAT_LINUX32) + if (WSTOPSIG(status) == SIGTRAP) { + tmpstat = linux_ptrace_status(td, + siginfo.si_pid, tmpstat); + } +#endif + } else if (WIFCONTINUED(tmpstat)) { tmpstat = 0xffff; - error = copyout(&tmpstat, status, sizeof(int)); + } + error = copyout(&tmpstat, statusp, sizeof(int)); } return (error); @@ -931,7 +957,7 @@ int linux_wait4(struct thread *td, struct linux_wait4_args *args) { int error, options; - struct rusage ru, *rup; + struct __wrusage wru, *wrup; if (args->options & ~(LINUX_WUNTRACED | LINUX_WNOHANG | LINUX_WCONTINUED | __WCLONE | __WNOTHREAD | __WALL)) @@ -941,14 +967,14 @@ linux_wait4(struct thread *td, struct linux_wait4_args linux_to_bsd_waitopts(args->options, &options); if (args->rusage != NULL) - rup = &ru; + wrup = &wru; else - rup = NULL; - error = linux_common_wait(td, args->pid, args->status, options, rup); + wrup = NULL; + error = linux_common_wait(td, args->pid, args->status, options, wrup); if (error != 0) return (error); if (args->rusage != NULL) - error = linux_copyout_rusage(&ru, args->rusage); + error = linux_copyout_rusage(&wru.wru_self, args->rusage); return (error); } Modified: head/sys/compat/linux/linux_misc.h ============================================================================== --- head/sys/compat/linux/linux_misc.h Sun May 19 09:24:51 2019 (r347970) +++ head/sys/compat/linux/linux_misc.h Sun May 19 12:58:44 2019 (r347971) @@ -149,8 +149,9 @@ extern int stclohz; #define LINUX_GRND_NONBLOCK 0x0001 #define LINUX_GRND_RANDOM 0x0002 -int linux_common_wait(struct thread *td, int pid, int *status, - int options, struct rusage *ru); +#if defined(__amd64__) && !defined(COMPAT_LINUX32) +int linux_ptrace_status(struct thread *td, int pid, int status); +#endif void linux_to_bsd_waitopts(int options, int *bsdopts); int linux_set_upcall_kse(struct thread *td, register_t stack); int linux_set_cloned_tls(struct thread *td, void *desc); From owner-svn-src-head@freebsd.org Sun May 19 15:07:15 2019 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 EFD9F15B04AB; Sun, 19 May 2019 15:07:14 +0000 (UTC) (envelope-from stevek@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 951AB8F6F8; Sun, 19 May 2019 15:07:14 +0000 (UTC) (envelope-from stevek@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 842888A79; Sun, 19 May 2019 15:07:14 +0000 (UTC) (envelope-from stevek@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4JF7EVs018579; Sun, 19 May 2019 15:07:14 GMT (envelope-from stevek@FreeBSD.org) Received: (from stevek@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4JF7EvV018578; Sun, 19 May 2019 15:07:14 GMT (envelope-from stevek@FreeBSD.org) Message-Id: <201905191507.x4JF7EvV018578@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: stevek set sender to stevek@FreeBSD.org using -f From: "Stephen J. Kiernan" Date: Sun, 19 May 2019 15:07:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r347972 - head/sys/x86/x86 X-SVN-Group: head X-SVN-Commit-Author: stevek X-SVN-Commit-Paths: head/sys/x86/x86 X-SVN-Commit-Revision: 347972 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 951AB8F6F8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 May 2019 15:07:15 -0000 Author: stevek Date: Sun May 19 15:07:14 2019 New Revision: 347972 URL: https://svnweb.freebsd.org/changeset/base/347972 Log: Add missing setting of hv_base to the leaf that we used. Correct setting hv_high to use regs[0], not leaf. Modified: head/sys/x86/x86/identcpu.c Modified: head/sys/x86/x86/identcpu.c ============================================================================== --- head/sys/x86/x86/identcpu.c Sun May 19 12:58:44 2019 (r347971) +++ head/sys/x86/x86/identcpu.c Sun May 19 15:07:14 2019 (r347972) @@ -1382,7 +1382,8 @@ identify_hypervisor_cpuid_base(void) * and vendor identifier. */ if (vm_guest != VM_GUEST_VM || leaf == 0x40000000) { - hv_high = leaf; + hv_base = leaf; + hv_high = regs[0]; ((u_int *)&hv_vendor)[0] = regs[1]; ((u_int *)&hv_vendor)[1] = regs[2]; ((u_int *)&hv_vendor)[2] = regs[3]; From owner-svn-src-head@freebsd.org Sun May 19 15:44:23 2019 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 435E515B0EC6; Sun, 19 May 2019 15:44:23 +0000 (UTC) (envelope-from johalun@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D91BE69B47; Sun, 19 May 2019 15:44:22 +0000 (UTC) (envelope-from johalun@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9812A9146; Sun, 19 May 2019 15:44:22 +0000 (UTC) (envelope-from johalun@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4JFiMjV039224; Sun, 19 May 2019 15:44:22 GMT (envelope-from johalun@FreeBSD.org) Received: (from johalun@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4JFiLSd039221; Sun, 19 May 2019 15:44:21 GMT (envelope-from johalun@FreeBSD.org) Message-Id: <201905191544.x4JFiLSd039221@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: johalun set sender to johalun@FreeBSD.org using -f From: Johannes Lundberg Date: Sun, 19 May 2019 15:44:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r347973 - in head/sys: compat/lindebugfs modules modules/lindebugfs X-SVN-Group: head X-SVN-Commit-Author: johalun X-SVN-Commit-Paths: in head/sys: compat/lindebugfs modules modules/lindebugfs X-SVN-Commit-Revision: 347973 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D91BE69B47 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 May 2019 15:44:23 -0000 Author: johalun Date: Sun May 19 15:44:21 2019 New Revision: 347973 URL: https://svnweb.freebsd.org/changeset/base/347973 Log: LinuxKPI: Finalize move of lindebugfs from ports to base. The source file was moved to base earlier and also improved upon, but never compiled in. This patch will: - Make a module in sys/modules - Make lindebugfs depend on linuxkpi (for seq_file) - Check if read/write functions are set before calling, DRM drivers don't always set both of them. Reviewed by: hps Approved by: imp (mentor), hps MFC after: 1 week Added: head/sys/modules/lindebugfs/ head/sys/modules/lindebugfs/Makefile (contents, props changed) Modified: head/sys/compat/lindebugfs/lindebugfs.c head/sys/modules/Makefile Modified: head/sys/compat/lindebugfs/lindebugfs.c ============================================================================== --- head/sys/compat/lindebugfs/lindebugfs.c Sun May 19 15:07:14 2019 (r347972) +++ head/sys/compat/lindebugfs/lindebugfs.c Sun May 19 15:44:21 2019 (r347973) @@ -143,10 +143,17 @@ debugfs_fill(PFS_FILL_ARGS) } sf = lf.private_data; sf->buf = sb; - if (uio->uio_rw == UIO_READ) - rc = d->dm_fops->read(&lf, NULL, len, &off); - else - rc = d->dm_fops->write(&lf, buf, len, &off); + if (uio->uio_rw == UIO_READ) { + if (d->dm_fops->read) + rc = d->dm_fops->read(&lf, NULL, len, &off); + else + rc = ENODEV; + } else { + if (d->dm_fops->write) + rc = d->dm_fops->write(&lf, buf, len, &off); + else + rc = ENODEV; + } if (d->dm_fops->release) d->dm_fops->release(&vn, &lf); else @@ -307,3 +314,4 @@ PSEUDOFS(debugfs, 1, PR_ALLOW_MOUNT_LINSYSFS); #else PSEUDOFS(debugfs, 1, VFCF_JAIL); #endif +MODULE_DEPEND(lindebugfs, linuxkpi, 1, 1, 1); Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Sun May 19 15:07:14 2019 (r347972) +++ head/sys/modules/Makefile Sun May 19 15:44:21 2019 (r347973) @@ -205,6 +205,7 @@ SUBDIR= \ libalias \ libiconv \ libmchain \ + lindebugfs \ ${_linux} \ ${_linux_common} \ ${_linux64} \ Added: head/sys/modules/lindebugfs/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/lindebugfs/Makefile Sun May 19 15:44:21 2019 (r347973) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +.PATH: ${SRCTOP}/sys/compat/lindebugfs + +KMOD= lindebugfs +SRCS= vnode_if.h \ + device_if.h bus_if.h pci_if.h \ + lindebugfs.c + +CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include + +.include From owner-svn-src-head@freebsd.org Sun May 19 15:53:33 2019 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 DEC6815B1362; Sun, 19 May 2019 15:53:33 +0000 (UTC) (envelope-from ota@j.email.ne.jp) Received: from mail03.asahi-net.or.jp (mail03.asahi-net.or.jp [202.224.55.15]) by mx1.freebsd.org (Postfix) with ESMTP id 56D306A1C5; Sun, 19 May 2019 15:53:32 +0000 (UTC) (envelope-from ota@j.email.ne.jp) Received: from vmware.advok.com (pool-72-76-119-135.nwrknj.fios.verizon.net [72.76.119.135]) (Authenticated sender: NR2Y-OOT) by mail03.asahi-net.or.jp (Postfix) with ESMTPSA id 94BDF42EB9; Mon, 20 May 2019 00:53:19 +0900 (JST) Date: Sun, 19 May 2019 11:52:28 -0400 From: Yoshihiro Ota To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r347968 - head/sys/kern Message-Id: <20190519115228.49fdc5c833c2abe06f894dc2@j.email.ne.jp> In-Reply-To: <201905190918.x4J9IAs1036579@repo.freebsd.org> References: <201905190918.x4J9IAs1036579@repo.freebsd.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; i386-portbld-freebsd12.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 56D306A1C5 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 May 2019 15:53:34 -0000 Hi, Does this change fix 'mount -u -rw /path' to remount read-only device with write mode? I moticed an issue a couple of days ago but didn't have time to conform nor report. Thanks, Hiro On Sun, 19 May 2019 09:18:10 +0000 (UTC) Konstantin Belousov wrote: > Author: kib > Date: Sun May 19 09:18:09 2019 > New Revision: 347968 > URL: https://svnweb.freebsd.org/changeset/base/347968 > > Log: > Fix rw->ro remount when there is a text vnode mapping. > > Reported and tested by: hrs > Sponsored by: The FreeBSD Foundation > MFC after: 16 days > > Modified: > head/sys/kern/vfs_subr.c > > Modified: head/sys/kern/vfs_subr.c > ============================================================================== > --- head/sys/kern/vfs_subr.c Sun May 19 06:01:11 2019 (r347967) > +++ head/sys/kern/vfs_subr.c Sun May 19 09:18:09 2019 (r347968) > @@ -3146,7 +3146,7 @@ loop: > > if ((vp->v_type == VNON || > (error == 0 && vattr.va_nlink > 0)) && > - (vp->v_writecount == 0 || vp->v_type != VREG)) { > + (vp->v_writecount <= 0 || vp->v_type != VREG)) { > VOP_UNLOCK(vp, 0); > vdropl(vp); > continue; > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-head@freebsd.org Sun May 19 16:57:02 2019 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 2560715B2B05; Sun, 19 May 2019 16:57:02 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B4B5F6C451; Sun, 19 May 2019 16:57:01 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0E40E9D2D; Sun, 19 May 2019 16:57:01 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4JGv06G075753; Sun, 19 May 2019 16:57:00 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4JGv0tI075747; Sun, 19 May 2019 16:57:00 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201905191657.x4JGv0tI075747@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 19 May 2019 16:57:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r347974 - in head/sys: conf dev/usb dev/usb/net modules/usb/usb X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head/sys: conf dev/usb dev/usb/net modules/usb/usb X-SVN-Commit-Revision: 347974 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B4B5F6C451 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 May 2019 16:57:02 -0000 Author: ian Date: Sun May 19 16:56:59 2019 New Revision: 347974 URL: https://svnweb.freebsd.org/changeset/base/347974 Log: Add common support functions for USB devices configured via FDT data. FDT data is sometimes used to configure usb devices which are hardwired into an embedded system. Because the devices are instantiated by the usb enumeration process rather than by ofwbus iterating through the fdt data, it is somewhat difficult for a usb driver to locate fdt data that belongs to it. In the past, various ad-hoc methods have been used, which can lead to errors such applying configuration that should apply only to a hardwired device onto a similar device attached by the user at runtime. For example, if the user adds an ethernet device that uses the same driver as the builtin ethernet, both devices might end up with the same MAC address. These changes add a new usb_fdt_get_node() helper function that a driver can use to locate FDT data that belongs to a single unique instance of the device. This function locates the proper FDT data using the mechanism detailed in the standard "usb-device.txt" binding document [1]. There is also a new usb_fdt_get_mac_addr() function, used to retrieve the mac address for a given device instance from the fdt data. It uses usb_fdt_get_node() to locate the right node in the FDT data, and attempts to obtain the mac-address or local-mac-address property (in that order, the same as linux does it). The existing if_smsc driver is modified to use the new functions, both as an example and for testing the new functions. Rpi and rpi2 boards use this driver and provide the mac address via the fdt data. [1] https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/usb/usb-device.txt Differential Revision: https://reviews.freebsd.org/D20262 Added: head/sys/dev/usb/usb_fdt_support.c (contents, props changed) head/sys/dev/usb/usb_fdt_support.h (contents, props changed) Modified: head/sys/conf/files head/sys/dev/usb/net/if_smsc.c head/sys/modules/usb/usb/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sun May 19 15:44:21 2019 (r347973) +++ head/sys/conf/files Sun May 19 16:56:59 2019 (r347974) @@ -3215,6 +3215,7 @@ dev/usb/usb_dev.c optional usb dev/usb/usb_device.c optional usb dev/usb/usb_dynamic.c optional usb dev/usb/usb_error.c optional usb +dev/usb/usb_fdt_support.c optional usb fdt dev/usb/usb_generic.c optional usb dev/usb/usb_handle_request.c optional usb dev/usb/usb_hid.c optional usb Modified: head/sys/dev/usb/net/if_smsc.c ============================================================================== --- head/sys/dev/usb/net/if_smsc.c Sun May 19 15:44:21 2019 (r347973) +++ head/sys/dev/usb/net/if_smsc.c Sun May 19 16:56:59 2019 (r347974) @@ -97,6 +97,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #endif #include @@ -1559,148 +1560,7 @@ smsc_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data return (rc); } -#ifdef FDT -/* - * This is FreeBSD-specific compatibility strings for RPi/RPi2 - */ -static phandle_t -smsc_fdt_find_eth_node(phandle_t start) -{ - phandle_t child, node; - - /* Traverse through entire tree to find usb ethernet nodes. */ - for (node = OF_child(start); node != 0; node = OF_peer(node)) { - if ((ofw_bus_node_is_compatible(node, "net,ethernet") && - ofw_bus_node_is_compatible(node, "usb,device")) || - ofw_bus_node_is_compatible(node, "usb424,ec00")) - return (node); - child = smsc_fdt_find_eth_node(node); - if (child != -1) - return (child); - } - - return (-1); -} - -/* - * Check if node's path is <*>/usb/hub/ethernet - */ -static int -smsc_fdt_is_usb_eth(phandle_t node) -{ - char name[16]; - int len; - - memset(name, 0, sizeof(name)); - len = OF_getprop(node, "name", name, sizeof(name)); - if (len <= 0) - return (0); - - if (strcmp(name, "ethernet")) - return (0); - - node = OF_parent(node); - if (node == -1) - return (0); - len = OF_getprop(node, "name", name, sizeof(name)); - if (len <= 0) - return (0); - - if (strcmp(name, "hub")) - return (0); - - node = OF_parent(node); - if (node == -1) - return (0); - len = OF_getprop(node, "name", name, sizeof(name)); - if (len <= 0) - return (0); - - if (strcmp(name, "usb")) - return (0); - - return (1); -} - -static phandle_t -smsc_fdt_find_eth_node_by_path(phandle_t start) -{ - phandle_t child, node; - - /* Traverse through entire tree to find usb ethernet nodes. */ - for (node = OF_child(start); node != 0; node = OF_peer(node)) { - if (smsc_fdt_is_usb_eth(node)) - return (node); - child = smsc_fdt_find_eth_node_by_path(node); - if (child != -1) - return (child); - } - - return (-1); -} - -/* - * Look through known names that can contain mac address - * return 0 if valid MAC address has been found - */ -static int -smsc_fdt_read_mac_property(phandle_t node, unsigned char *mac) -{ - int len; - - /* Check if there is property */ - if ((len = OF_getproplen(node, "local-mac-address")) > 0) { - if (len != ETHER_ADDR_LEN) - return (EINVAL); - - OF_getprop(node, "local-mac-address", mac, - ETHER_ADDR_LEN); - return (0); - } - - if ((len = OF_getproplen(node, "mac-address")) > 0) { - if (len != ETHER_ADDR_LEN) - return (EINVAL); - - OF_getprop(node, "mac-address", mac, - ETHER_ADDR_LEN); - return (0); - } - - return (ENXIO); -} - /** - * Get MAC address from FDT blob. Firmware or loader should fill - * mac-address or local-mac-address property. Returns 0 if MAC address - * obtained, error code otherwise. - */ -static int -smsc_fdt_find_mac(unsigned char *mac) -{ - phandle_t node, root; - - root = OF_finddevice("/"); - node = smsc_fdt_find_eth_node(root); - if (node != -1) { - if (smsc_fdt_read_mac_property(node, mac) == 0) - return (0); - } - - /* - * If it's not FreeBSD FDT blob for RPi, try more - * generic .../usb/hub/ethernet - */ - node = smsc_fdt_find_eth_node_by_path(root); - - if (node != -1) - return smsc_fdt_read_mac_property(node, mac); - - return (ENXIO); -} -#endif - -/** * smsc_attach_post - Called after the driver attached to the USB interface * @ue: the USB ethernet device * @@ -1748,7 +1608,7 @@ smsc_attach_post(struct usb_ether *ue) err = smsc_eeprom_read(sc, 0x01, sc->sc_ue.ue_eaddr, ETHER_ADDR_LEN); #ifdef FDT if ((err != 0) || (!ETHER_IS_VALID(sc->sc_ue.ue_eaddr))) - err = smsc_fdt_find_mac(sc->sc_ue.ue_eaddr); + err = usb_fdt_get_mac_addr(sc->sc_ue.ue_dev, &sc->sc_ue); #endif if ((err != 0) || (!ETHER_IS_VALID(sc->sc_ue.ue_eaddr))) { read_random(sc->sc_ue.ue_eaddr, ETHER_ADDR_LEN); Added: head/sys/dev/usb/usb_fdt_support.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/usb/usb_fdt_support.c Sun May 19 16:56:59 2019 (r347974) @@ -0,0 +1,168 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2019 Ian Lepore + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * Define a constant for allocating an array pointers to serve as a stack of + * devices between the controller and any arbitrary device on the bus. The + * stack ends with the device itself, so add 1 to the max hub nesting depth. + */ +#define MAX_UDEV_NEST (MAX(USB_HUB_MAX_DEPTH, USB_SS_HUB_DEPTH_MAX) + 1) + +static phandle_t +find_udev_in_children(phandle_t parent, struct usb_device *udev) +{ + phandle_t child; + ssize_t proplen; + uint32_t port; + char compat[16]; /* big enough for "usb1234,abcd" */ + + /* + * USB device nodes in FDT have a compatible string of "usb" followed by + * the vendorId,productId rendered in hex. The port number is encoded + * in the standard 'reg' property; it is one-based in the FDT data, but + * usb_device.port_index is zero-based. To uniquely identify a device, + * both the compatible string and the port number must match. + */ + snprintf(compat, sizeof(compat), "usb%x,%x", + UGETW(udev->ddesc.idVendor), UGETW(udev->ddesc.idProduct)); + for (child = OF_child(parent); child != 0; child = OF_peer(child)) { + if (!ofw_bus_node_is_compatible(child, compat)) + continue; + proplen = OF_getencprop(child, "reg", &port, sizeof(port)); + if (proplen != sizeof(port)) + continue; + if (port == (udev->port_index + 1)) + return (child); + } + return (-1); +} + +static bool +is_valid_mac_addr(uint8_t *addr) +{ + + /* + * All-bits-zero and all-bits-one are a couple common cases of what + * might get read from unprogrammed eeprom or OTP data, weed them out. + */ + if ((addr[0] | addr[1] | addr[2] | addr[3] | addr[4] | addr[5]) == 0x00) + return (false); + if ((addr[0] & addr[1] & addr[2] & addr[3] & addr[4] & addr[5]) == 0xff) + return (false); + return (true); +} + +int +usb_fdt_get_mac_addr(device_t dev, struct usb_ether* ue) +{ + phandle_t node; + ssize_t i, proplen; + uint8_t mac[sizeof(ue->ue_eaddr)]; + static const char *properties[] = { + "mac-address", + "local-mac-address" + }; + + if ((node = usb_fdt_get_node(ue->ue_dev, ue->ue_udev)) == -1) + return (ENXIO); + for (i = 0; i < nitems(properties); ++i) { + proplen = OF_getprop(node, properties[i], mac, sizeof(mac)); + if (proplen == sizeof(mac) && is_valid_mac_addr(mac)) { + memcpy(ue->ue_eaddr, mac, sizeof(ue->ue_eaddr)); + return (0); + } + } + return (ENXIO); +} + +phandle_t +usb_fdt_get_node(device_t dev, struct usb_device *udev) +{ + struct usb_device *ud; + struct usb_device *udev_stack[MAX_UDEV_NEST]; + phandle_t controller_node, node; + int idx; + + /* + * Start searching at the controller node. The usb_device links to the + * bus, and its parent is the controller. If we can't get the + * controller node, the requesting device cannot be in the fdt data. + */ + if ((controller_node = ofw_bus_get_node(udev->bus->parent)) == -1) + return (-1); + + /* + * Walk up the usb hub ancestor hierarchy, building a stack of devices + * that begins with the requesting device and includes all the hubs + * between it and the controller, NOT including the root hub (the FDT + * bindings treat the controller and root hub as the same thing). + */ + for (ud = udev, idx = 0; ud->parent_hub != NULL; ud = ud->parent_hub) { + KASSERT(idx < nitems(udev_stack), ("Too many hubs")); + udev_stack[idx++] = ud; + } + + /* + * Now walk down the stack of udevs from the controller to the + * requesting device, and also down the hierarchy of nested children of + * the controller node in the fdt data. At each nesting level of fdt + * data look for a child node whose properties match the vID,pID,portIdx + * tuple for the udev at the corresponding layer of the udev stack. As + * long as we keep matching up child nodes with udevs, loop and search + * within the children of the just-found child for the next-deepest hub. + * If at any level we fail to find a matching node, stop searching and + * return. When we hit the end of the stack (the requesting device) we + * return whatever the result was for the search at that nesting level. + */ + for (node = controller_node;;) { + node = find_udev_in_children(node, udev_stack[--idx]); + if (idx == 0 || node == -1) + break; + } + return (node); +} Added: head/sys/dev/usb/usb_fdt_support.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/usb/usb_fdt_support.h Sun May 19 16:56:59 2019 (r347974) @@ -0,0 +1,48 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2019 Ian Lepore + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _USB_FDT_SUPPORT_H_ +#define _USB_FDT_SUPPORT_H_ + +struct usb_device; +struct usb_ether; + +/* + * Get the device's MAC address from the FDT data. Fills in ue->ue_eaddr and + * returns 0 on success, otherwise leaves ue_eaddr untouched and returns + * non-zero. This first attempts to get the address from the "mac-address" + * property, and if that's not valid it tries the "local-mac-address" property; + * this matches the linux interpretation of the precedence of those properties. + */ +int usb_fdt_get_mac_addr(device_t dev, struct usb_ether* ue); + +/* Get the FDT node for dev. Returns -1 if dev is not in the FDT data. */ +phandle_t usb_fdt_get_node(device_t dev, struct usb_device* udev); + +#endif Modified: head/sys/modules/usb/usb/Makefile ============================================================================== --- head/sys/modules/usb/usb/Makefile Sun May 19 15:44:21 2019 (r347973) +++ head/sys/modules/usb/usb/Makefile Sun May 19 16:56:59 2019 (r347974) @@ -39,4 +39,8 @@ SRCS= bus_if.h device_if.h usb_if.h usb_if.c vnode_if. usb_msctest.c usb_parse.c usb_pf.c usb_process.c usb_request.c \ usb_transfer.c usb_util.c +.if !empty(OPT_FDT) +SRCS+= usb_fdt_support.c ofw_bus_if.h +.endif + .include From owner-svn-src-head@freebsd.org Sun May 19 17:05:22 2019 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 DDC5115B2F88; Sun, 19 May 2019 17:05:21 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay103.isp.belgacom.be (mailrelay103.isp.belgacom.be [195.238.20.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "relay.skynet.be", Issuer "GlobalSign Organization Validation CA - SHA256 - G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E92416CAA4; Sun, 19 May 2019 17:05:20 +0000 (UTC) (envelope-from tijl@freebsd.org) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2DnAAAhjOFc/1H1sVtkHAEBAQQBAQc?= =?us-ascii?q?EAQGBUQcBAQsBAYIPWBFRASASFBSMLl+KDQEBggw1AYdngh6OGoF7CQEBAgE?= =?us-ascii?q?BAQEBKwwBAYRAAoIzJDQJDgEDAQEFAQEBAQRtHAxCAQwBhHsBBScTHCMQCw4?= =?us-ascii?q?GBAklD0gGE4Mjgg4LqkUzhDMBCwGEWoEKBoE0AYtngX+BEYMSPoREhWIEiwy?= =?us-ascii?q?INZRXCYIPhi6EQYgBJ5YfLYNPj0OQRTiBV00wCIMnghsXiGCFQT0DMINfi3g?= =?us-ascii?q?BAQ?= X-IPAS-Result: =?us-ascii?q?A2DnAAAhjOFc/1H1sVtkHAEBAQQBAQcEAQGBUQcBAQsBA?= =?us-ascii?q?YIPWBFRASASFBSMLl+KDQEBggw1AYdngh6OGoF7CQEBAgEBAQEBKwwBAYRAA?= =?us-ascii?q?oIzJDQJDgEDAQEFAQEBAQRtHAxCAQwBhHsBBScTHCMQCw4GBAklD0gGE4Mjg?= =?us-ascii?q?g4LqkUzhDMBCwGEWoEKBoE0AYtngX+BEYMSPoREhWIEiwyINZRXCYIPhi6EQ?= =?us-ascii?q?YgBJ5YfLYNPj0OQRTiBV00wCIMnghsXiGCFQT0DMINfi3gBAQ?= Received: from 81.245-177-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.177.245.81]) by relay.skynet.be with ESMTP; 19 May 2019 19:05:12 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.15.2/8.15.2) with ESMTP id x4JH5Che001814; Sun, 19 May 2019 19:05:12 +0200 (CEST) (envelope-from tijl@FreeBSD.org) Date: Sun, 19 May 2019 19:05:11 +0200 From: =?UTF-8?B?VMSzbA==?= Coosemans To: Dmitry Chagin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r347533 - in head/sys: compat/linux modules/linux_common Message-ID: <20190519190511.6e8f436c@kalimero.tijl.coosemans.org> In-Reply-To: <201905131748.x4DHmGaH020444@repo.freebsd.org> References: <201905131748.x4DHmGaH020444@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: E92416CAA4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.940,0]; ASN(0.00)[asn:5432, ipnet:195.238.0.0/19, country:BE] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 May 2019 17:05:22 -0000 On Mon, 13 May 2019 17:48:16 +0000 (UTC) Dmitry Chagin wrote: > Author: dchagin > Date: Mon May 13 17:48:16 2019 > New Revision: 347533 > URL: https://svnweb.freebsd.org/changeset/base/347533 > > Log: > Our bsd_to_linux_sockaddr() and linux_to_bsd_sockaddr() functions > alter the userspace sockaddr to convert the format between linux and BSD versions. > That's the minimum 3 of copyin/copyout operations for one syscall. > > Also some syscall uses linux_sa_put() and linux_getsockaddr() when load > sockaddr to userspace or from userspace accordingly. > > To avoid this chaos, especially converting sockaddr in the userspace, > rewrite these 4 functions to convert sockaddr only in kernel and leave > only 2 of this functions. > > Also in order to reduce duplication between MD parts of the Linuxulator put > struct sockaddr conversion functions that are MI out into linux_common module. > > PR: 232920 > MFC after: 2 weeks > Differential Revision: https://reviews.freebsd.org/D20157 > > Modified: > head/sys/compat/linux/linux.c > head/sys/compat/linux/linux.h > head/sys/compat/linux/linux_common.h > head/sys/compat/linux/linux_socket.c > head/sys/compat/linux/linux_socket.h > head/sys/modules/linux_common/Makefile > > Modified: head/sys/compat/linux/linux_socket.c > ============================================================================== > --- head/sys/compat/linux/linux_socket.c Mon May 13 16:38:48 2019 (r347532) > +++ head/sys/compat/linux/linux_socket.c Mon May 13 17:48:16 2019 (r347533) > @@ -1282,6 +1110,8 @@ linux_recvmsg_common(struct thread *td, l_int s, struc > struct mbuf *control = NULL; > struct mbuf **controlp; > struct timeval *ftmvl; > + struct l_sockaddr *lsa; > + struct sockaddr *sa; > l_timeval ltmvl; > caddr_t outbuf; > void *data; > @@ -1305,36 +1135,34 @@ linux_recvmsg_common(struct thread *td, l_int s, struc > return (error); > > if (msg->msg_name) { > - error = linux_to_bsd_sockaddr((struct sockaddr *)msg->msg_name, > - msg->msg_namelen); > - if (error != 0) > - goto bad; > + sa = malloc(msg->msg_namelen, M_SONAME, M_WAITOK); > + msg->msg_name = sa; > } > > uiov = msg->msg_iov; > msg->msg_iov = iov; > controlp = (msg->msg_control != NULL) ? &control : NULL; > - error = kern_recvit(td, s, msg, UIO_USERSPACE, controlp); > + error = kern_recvit(td, s, msg, UIO_SYSSPACE, controlp); > msg->msg_iov = uiov; > if (error != 0) > goto bad; > > - error = bsd_to_linux_msghdr(msg, &linux_msg); > - if (error != 0) > - goto bad; > - > - if (linux_msg.msg_name) { > - error = bsd_to_linux_sockaddr((struct sockaddr *) > - PTRIN(linux_msg.msg_name)); > + if (sa) { sa may be uninitialised here. From owner-svn-src-head@freebsd.org Sun May 19 17:28:01 2019 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 9B5AE15B342A; Sun, 19 May 2019 17:28:01 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 306036D298; Sun, 19 May 2019 17:28:01 +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 03DA4A24A; Sun, 19 May 2019 17:28:01 +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 x4JHS0As091611; Sun, 19 May 2019 17:28:00 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4JHS0Kx091609; Sun, 19 May 2019 17:28:00 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201905191728.x4JHS0Kx091609@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 19 May 2019 17:28:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r347975 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 347975 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 306036D298 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 May 2019 17:28:01 -0000 Author: tuexen Date: Sun May 19 17:28:00 2019 New Revision: 347975 URL: https://svnweb.freebsd.org/changeset/base/347975 Log: Improve input validation for the IPPROTO_SCTP level socket options SCTP_CONNECT_X and SCTP_CONNECT_X_DELAYED. Some issues where found by running syzkaller. MFC after: 3 days Modified: head/sys/netinet/sctp_usrreq.c head/sys/netinet/sctputil.c head/sys/netinet/sctputil.h Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Sun May 19 16:56:59 2019 (r347974) +++ head/sys/netinet/sctp_usrreq.c Sun May 19 17:28:00 2019 (r347975) @@ -1352,13 +1352,12 @@ static int sctp_do_connect_x(struct socket *so, struct sctp_inpcb *inp, void *optval, size_t optsize, void *p, int delay) { - int error = 0; + int error; int creat_lock_on = 0; struct sctp_tcb *stcb = NULL; struct sockaddr *sa; unsigned int num_v6 = 0, num_v4 = 0, *totaddrp, totaddr; uint32_t vrf_id; - int bad_addresses = 0; sctp_assoc_t *a_id; SCTPDBG(SCTP_DEBUG_PCB1, "Connectx called\n"); @@ -1397,17 +1396,12 @@ sctp_do_connect_x(struct socket *so, struct sctp_inpcb totaddrp = (unsigned int *)optval; totaddr = *totaddrp; sa = (struct sockaddr *)(totaddrp + 1); - stcb = sctp_connectx_helper_find(inp, sa, &totaddr, &num_v4, &num_v6, &error, (unsigned int)(optsize - sizeof(int)), &bad_addresses); - if ((stcb != NULL) || bad_addresses) { + error = sctp_connectx_helper_find(inp, sa, totaddr, &num_v4, &num_v6, (unsigned int)(optsize - sizeof(int))); + if (error != 0) { /* Already have or am bring up an association */ SCTP_ASOC_CREATE_UNLOCK(inp); creat_lock_on = 0; - if (stcb) - SCTP_TCB_UNLOCK(stcb); - if (bad_addresses == 0) { - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EALREADY); - error = EALREADY; - } + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, error); goto out_now; } #ifdef INET6 Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Sun May 19 16:56:59 2019 (r347974) +++ head/sys/netinet/sctputil.c Sun May 19 17:28:00 2019 (r347975) @@ -6391,30 +6391,33 @@ out_now: return (added); } -struct sctp_tcb * +int sctp_connectx_helper_find(struct sctp_inpcb *inp, struct sockaddr *addr, - unsigned int *totaddr, - unsigned int *num_v4, unsigned int *num_v6, int *error, - unsigned int limit, int *bad_addr) + unsigned int totaddr, + unsigned int *num_v4, unsigned int *num_v6, + unsigned int limit) { struct sockaddr *sa; - struct sctp_tcb *stcb = NULL; + struct sctp_tcb *stcb; unsigned int incr, at, i; at = 0; sa = addr; - *error = *num_v6 = *num_v4 = 0; + *num_v6 = *num_v4 = 0; /* account and validate addresses */ - for (i = 0; i < *totaddr; i++) { + if (totaddr == 0) { + return (EINVAL); + } + for (i = 0; i < totaddr; i++) { + if (at + sizeof(struct sockaddr) > limit) { + return (EINVAL); + } switch (sa->sa_family) { #ifdef INET case AF_INET: incr = (unsigned int)sizeof(struct sockaddr_in); if (sa->sa_len != incr) { - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTPUTIL, EINVAL); - *error = EINVAL; - *bad_addr = 1; - return (NULL); + return (EINVAL); } (*num_v4) += 1; break; @@ -6427,46 +6430,34 @@ sctp_connectx_helper_find(struct sctp_inpcb *inp, stru sin6 = (struct sockaddr_in6 *)sa; if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) { /* Must be non-mapped for connectx */ - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTPUTIL, EINVAL); - *error = EINVAL; - *bad_addr = 1; - return (NULL); + return (EINVAL); } incr = (unsigned int)sizeof(struct sockaddr_in6); if (sa->sa_len != incr) { - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTPUTIL, EINVAL); - *error = EINVAL; - *bad_addr = 1; - return (NULL); + return (EINVAL); } (*num_v6) += 1; break; } #endif default: - *totaddr = i; - incr = 0; - /* we are done */ - break; + return (EINVAL); } - if (i == *totaddr) { - break; + if ((at + incr) > limit) { + return (EINVAL); } SCTP_INP_INCR_REF(inp); stcb = sctp_findassociation_ep_addr(&inp, sa, NULL, NULL, NULL); if (stcb != NULL) { - /* Already have or am bring up an association */ - return (stcb); + SCTP_TCB_UNLOCK(stcb); + return (EALREADY); } else { SCTP_INP_DECR_REF(inp); } - if ((at + incr) > limit) { - *totaddr = i; - break; - } + at += incr; sa = (struct sockaddr *)((caddr_t)sa + incr); } - return ((struct sctp_tcb *)NULL); + return (0); } /* Modified: head/sys/netinet/sctputil.h ============================================================================== --- head/sys/netinet/sctputil.h Sun May 19 16:56:59 2019 (r347974) +++ head/sys/netinet/sctputil.h Sun May 19 17:28:00 2019 (r347975) @@ -211,10 +211,9 @@ int sctp_connectx_helper_add(struct sctp_tcb *stcb, struct sockaddr *addr, int totaddr, int *error); -struct sctp_tcb * -sctp_connectx_helper_find(struct sctp_inpcb *inp, struct sockaddr *addr, - unsigned int *totaddr, unsigned int *num_v4, unsigned int *num_v6, - int *error, unsigned int limit, int *bad_addr); +int +sctp_connectx_helper_find(struct sctp_inpcb *, struct sockaddr *, + unsigned int, unsigned int *, unsigned int *, unsigned int); int sctp_is_there_an_abort_here(struct mbuf *, int, uint32_t *); #ifdef INET6 From owner-svn-src-head@freebsd.org Sun May 19 17:51:16 2019 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 223E715B3EB8; Sun, 19 May 2019 17:51:16 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE78E6E0F2; Sun, 19 May 2019 17:51:14 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id x4JHp6rt029300 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sun, 19 May 2019 20:51:09 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua x4JHp6rt029300 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id x4JHp4F7029299; Sun, 19 May 2019 20:51:04 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 19 May 2019 20:51:04 +0300 From: Konstantin Belousov To: Yoshihiro Ota Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r347968 - head/sys/kern Message-ID: <20190519175104.GP2748@kib.kiev.ua> References: <201905190918.x4J9IAs1036579@repo.freebsd.org> <20190519115228.49fdc5c833c2abe06f894dc2@j.email.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190519115228.49fdc5c833c2abe06f894dc2@j.email.ne.jp> User-Agent: Mutt/1.11.4 (2019-03-13) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 May 2019 17:51:16 -0000 On Sun, May 19, 2019 at 11:52:28AM -0400, Yoshihiro Ota wrote: > Hi, > > Does this change fix 'mount -u -rw /path' to remount read-only device with write mode? > I moticed an issue a couple of days ago but didn't have time to conform nor report. I do not understand your description. If you mean does this commit has any relevance to the issue of remounting ro->rw, it should not. It only affects rw->ro remounts, when you have a binary executed from the mount point. > > Thanks, > Hiro > > On Sun, 19 May 2019 09:18:10 +0000 (UTC) > Konstantin Belousov wrote: > > > Author: kib > > Date: Sun May 19 09:18:09 2019 > > New Revision: 347968 > > URL: https://svnweb.freebsd.org/changeset/base/347968 > > > > Log: > > Fix rw->ro remount when there is a text vnode mapping. > > > > Reported and tested by: hrs > > Sponsored by: The FreeBSD Foundation > > MFC after: 16 days > > > > Modified: > > head/sys/kern/vfs_subr.c > > > > Modified: head/sys/kern/vfs_subr.c > > ============================================================================== > > --- head/sys/kern/vfs_subr.c Sun May 19 06:01:11 2019 (r347967) > > +++ head/sys/kern/vfs_subr.c Sun May 19 09:18:09 2019 (r347968) > > @@ -3146,7 +3146,7 @@ loop: > > > > if ((vp->v_type == VNON || > > (error == 0 && vattr.va_nlink > 0)) && > > - (vp->v_writecount == 0 || vp->v_type != VREG)) { > > + (vp->v_writecount <= 0 || vp->v_type != VREG)) { > > VOP_UNLOCK(vp, 0); > > vdropl(vp); > > continue; > > _______________________________________________ > > svn-src-all@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/svn-src-all > > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-head@freebsd.org Sun May 19 17:53:37 2019 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 9A91715B3F70; Sun, 19 May 2019 17:53:37 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3D8A66E477; Sun, 19 May 2019 17:53:37 +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 1420AA730; Sun, 19 May 2019 17:53:37 +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 x4JHraI3006949; Sun, 19 May 2019 17:53:36 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4JHrao7006948; Sun, 19 May 2019 17:53:36 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201905191753.x4JHrao7006948@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 19 May 2019 17:53:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r347976 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 347976 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3D8A66E477 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 May 2019 17:53:37 -0000 Author: tuexen Date: Sun May 19 17:53:36 2019 New Revision: 347976 URL: https://svnweb.freebsd.org/changeset/base/347976 Log: Allow sending on demand SCTP HEARTBEATS only in the ESTABLISHED state. This issue was found by running syzkaller. MFC after: 3 days Modified: head/sys/netinet/sctp_usrreq.c Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Sun May 19 17:28:00 2019 (r347975) +++ head/sys/netinet/sctp_usrreq.c Sun May 19 17:53:36 2019 (r347976) @@ -5332,10 +5332,11 @@ sctp_setopt(struct socket *so, int optname, void *optv net->dest_state &= ~SCTP_ADDR_NOHB; } if (paddrp->spp_flags & SPP_HB_DEMAND) { - /* on demand HB */ - sctp_send_hb(stcb, net, SCTP_SO_LOCKED); - sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_SOCKOPT, SCTP_SO_LOCKED); - sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net); + if (SCTP_GET_STATE(stcb) == SCTP_STATE_OPEN) { + sctp_send_hb(stcb, net, SCTP_SO_LOCKED); + sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_SOCKOPT, SCTP_SO_LOCKED); + sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net); + } } if ((paddrp->spp_flags & SPP_PMTUD_DISABLE) && (paddrp->spp_pathmtu >= SCTP_SMALLEST_PMTU)) { if (SCTP_OS_TIMER_PENDING(&net->pmtu_timer.timer)) { From owner-svn-src-head@freebsd.org Sun May 19 19:42:37 2019 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 DF1B1158F7F4; Sun, 19 May 2019 19:42:36 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7B26771AD6; Sun, 19 May 2019 19:42:36 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 520B5B9A0; Sun, 19 May 2019 19:42:36 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4JJgaIX065398; Sun, 19 May 2019 19:42:36 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4JJgaWd065397; Sun, 19 May 2019 19:42:36 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201905191942.x4JJgaWd065397@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 19 May 2019 19:42:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r347978 - head/tools/build/mk X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/tools/build/mk X-SVN-Commit-Revision: 347978 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7B26771AD6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 May 2019 19:42:37 -0000 Author: dim Date: Sun May 19 19:42:35 2019 New Revision: 347978 URL: https://svnweb.freebsd.org/changeset/base/347978 Log: Fix OptionalObsoleteFiles copy/paste mistake from r345236, which connected libomp to the build. The comparison should not have been against ${MK_OPENSSH}, but against ${MK_OPENMP}, obviously. MFC after: 3 days Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun May 19 18:31:21 2019 (r347977) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun May 19 19:42:35 2019 (r347978) @@ -7749,7 +7749,7 @@ OLD_FILES+=usr/share/man/man8/smpquery.8.gz OLD_FILES+=usr/share/man/man8/vendstat.8.gz .endif -.if ${MK_OPENSSH} == no +.if ${MK_OPENMP} == no .if ${MK_GCC} == no OLD_FILES+=usr/include/omp.h .endif From owner-svn-src-head@freebsd.org Sun May 19 20:13:56 2019 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 666A91590229; Sun, 19 May 2019 20:13:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EDEF7729C2; Sun, 19 May 2019 20:13:55 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BE1A5C05A; Sun, 19 May 2019 20:13:55 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4JKDtda081381; Sun, 19 May 2019 20:13:55 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4JKDtTA081379; Sun, 19 May 2019 20:13:55 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201905192013.x4JKDtTA081379@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 19 May 2019 20:13:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r347979 - in head: lib/libomp tools/build/mk X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head: lib/libomp tools/build/mk X-SVN-Commit-Revision: 347979 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EDEF7729C2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 May 2019 20:13:56 -0000 Author: dim Date: Sun May 19 20:13:55 2019 New Revision: 347979 URL: https://svnweb.freebsd.org/changeset/base/347979 Log: To avoid unnecessarily modifying ports, add a -lgomp symlink, since GCC does not ship a -lomp symlink. Also update OptionalObsoleteFiles for this, and add 32-bit variants while here. Submitted by: jbeich PR: 237975 MFC after: 3 days Modified: head/lib/libomp/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/lib/libomp/Makefile ============================================================================== --- head/lib/libomp/Makefile Sun May 19 19:42:35 2019 (r347978) +++ head/lib/libomp/Makefile Sun May 19 20:13:55 2019 (r347979) @@ -68,4 +68,6 @@ VERSION_MAP= ${OMPSRC}/exports_so.txt LIBADD+= pthread LIBADD+= m +SYMLINKS+= ${SHLIB_NAME} ${LIBDIR}/libgomp.so + .include Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun May 19 19:42:35 2019 (r347978) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun May 19 20:13:55 2019 (r347979) @@ -2746,12 +2746,16 @@ OLD_FILES+=usr/include/omp.h .endif OLD_FILES+=usr/lib/libgcov.a OLD_FILES+=usr/lib/libgomp.a +.if ${MK_OPENMP} == no OLD_FILES+=usr/lib/libgomp.so +.endif OLD_LIBS+=usr/lib/libgomp.so.1 OLD_FILES+=usr/lib/libgomp_p.a OLD_FILES+=usr/lib32/libgcov.a OLD_FILES+=usr/lib32/libgomp.a +.if ${MK_OPENMP} == no OLD_FILES+=usr/lib32/libgomp.so +.endif OLD_LIBS+=usr/lib32/libgomp.so.1 OLD_FILES+=usr/lib32/libgomp_p.a OLD_FILES+=usr/libexec/cc1 @@ -7752,8 +7756,11 @@ OLD_FILES+=usr/share/man/man8/vendstat.8.gz .if ${MK_OPENMP} == no .if ${MK_GCC} == no OLD_FILES+=usr/include/omp.h +OLD_LIBS+=usr/lib/libgomp.so +OLD_LIBS+=usr/lib32/libgomp.so .endif OLD_LIBS+=usr/lib/libomp.so +OLD_LIBS+=usr/lib32/libomp.so .endif .if ${MK_OPENSSH} == no From owner-svn-src-head@freebsd.org Sun May 19 20:24:19 2019 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 37CA91590624; Sun, 19 May 2019 20:24:19 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D177E72ED9; Sun, 19 May 2019 20:24:18 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A62ACC1FC; Sun, 19 May 2019 20:24:18 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4JKOILI086858; Sun, 19 May 2019 20:24:18 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4JKOIZe086856; Sun, 19 May 2019 20:24:18 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201905192024.x4JKOIZe086856@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Sun, 19 May 2019 20:24:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r347980 - head/lib/libsecureboot/openpgp X-SVN-Group: head X-SVN-Commit-Author: sjg X-SVN-Commit-Paths: head/lib/libsecureboot/openpgp X-SVN-Commit-Revision: 347980 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D177E72ED9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 May 2019 20:24:19 -0000 Author: sjg Date: Sun May 19 20:24:17 2019 New Revision: 347980 URL: https://svnweb.freebsd.org/changeset/base/347980 Log: load_key_buf do not free data from dearmor The data returned by dearmor is referenced by the key leave it alone! Reviewed by: stevek MFC after: 2 days Modified: head/lib/libsecureboot/openpgp/opgp_key.c head/lib/libsecureboot/openpgp/opgp_sig.c Modified: head/lib/libsecureboot/openpgp/opgp_key.c ============================================================================== --- head/lib/libsecureboot/openpgp/opgp_key.c Sun May 19 20:13:55 2019 (r347979) +++ head/lib/libsecureboot/openpgp/opgp_key.c Sun May 19 20:24:17 2019 (r347980) @@ -168,6 +168,7 @@ load_key_buf(unsigned char *buf, size_t nbytes) initialize(); if (!(buf[0] & OPENPGP_TAG_ISTAG)) { + /* Note: we do *not* free data */ data = dearmor((char *)buf, nbytes, &nbytes); ptr = data; } else @@ -190,7 +191,6 @@ load_key_buf(unsigned char *buf, size_t nbytes) } } } - free(data); return (key); } @@ -209,8 +209,10 @@ openpgp_trust_add(OpenPGP_key *key) LIST_INIT(&trust_list); } - if (key) + if (key) { + DEBUG_PRINTF(2, ("openpgp_trust_add(%s)\n", key->id)); LIST_INSERT_HEAD(&trust_list, key, entries); + } } /** @@ -296,6 +298,7 @@ load_key_id(const char *keyID) if (!key) key = load_trusted_key_id(keyID); #endif + DEBUG_PRINTF(2, ("load_key_id(%s): %s\n", keyID, key ? "found" : "nope")); return (key); } Modified: head/lib/libsecureboot/openpgp/opgp_sig.c ============================================================================== --- head/lib/libsecureboot/openpgp/opgp_sig.c Sun May 19 20:13:55 2019 (r347979) +++ head/lib/libsecureboot/openpgp/opgp_sig.c Sun May 19 20:24:17 2019 (r347980) @@ -318,6 +318,7 @@ openpgp_verify(const char *filename, sdata = ddata = dearmor((char *)sdata, sbytes, &sbytes); ptr = sdata; rc = decode_packet(2, &ptr, sbytes, (decoder_t)decode_sig, sig); + DEBUG_PRINTF(2, ("rc=%d keyID=%s\n", rc, sig->key_id ? sig->key_id : "?")); if (rc == 0 && sig->key_id) { key = load_key_id(sig->key_id); if (!key) { From owner-svn-src-head@freebsd.org Sun May 19 20:28:51 2019 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 8E0C11590733; Sun, 19 May 2019 20:28:51 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 31CE77304A; Sun, 19 May 2019 20:28:51 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 02346C1FD; Sun, 19 May 2019 20:28:51 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4JKSoe0087079; Sun, 19 May 2019 20:28:50 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4JKSoWw087076; Sun, 19 May 2019 20:28:50 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201905192028.x4JKSoWw087076@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Sun, 19 May 2019 20:28:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r347981 - in head/lib/libsecureboot: . h tests X-SVN-Group: head X-SVN-Commit-Author: sjg X-SVN-Commit-Paths: in head/lib/libsecureboot: . h tests X-SVN-Commit-Revision: 347981 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 31CE77304A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 May 2019 20:28:51 -0000 Author: sjg Date: Sun May 19 20:28:49 2019 New Revision: 347981 URL: https://svnweb.freebsd.org/changeset/base/347981 Log: libsecureboot: allow control of when pseudo pcr is updated During boot we only want to measure things which *must* be verified - this should provide more deterministic ordering. Reviewed by: stevek MFC after: 1 week Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org/D20297 Modified: head/lib/libsecureboot/h/libsecureboot.h head/lib/libsecureboot/tests/tvo.c head/lib/libsecureboot/vepcr.c head/lib/libsecureboot/verify_file.c Modified: head/lib/libsecureboot/h/libsecureboot.h ============================================================================== --- head/lib/libsecureboot/h/libsecureboot.h Sun May 19 20:24:17 2019 (r347980) +++ head/lib/libsecureboot/h/libsecureboot.h Sun May 19 20:28:49 2019 (r347981) @@ -81,6 +81,8 @@ unsigned char *verify_asc(const char *, int); /* OpenP void ve_pcr_init(void); void ve_pcr_update(unsigned char *, size_t); ssize_t ve_pcr_get(unsigned char *, size_t); +int ve_pcr_updating_get(void); +void ve_pcr_updating_set(int); /* flags for verify_{asc,sig,signed} */ #define VEF_VERBOSE 1 Modified: head/lib/libsecureboot/tests/tvo.c ============================================================================== --- head/lib/libsecureboot/tests/tvo.c Sun May 19 20:24:17 2019 (r347980) +++ head/lib/libsecureboot/tests/tvo.c Sun May 19 20:28:49 2019 (r347981) @@ -74,6 +74,9 @@ main(int argc, char *argv[]) } } +#ifdef VE_PCR_SUPPORT + ve_pcr_updating_set(1); +#endif ve_self_tests(); for ( ; optind < argc; optind++) { @@ -176,6 +179,10 @@ main(int argc, char *argv[]) } } } +#ifdef VE_PCR_SUPPORT + verify_pcr_export(); + printf("pcr=%s\n", getenv("loader.ve.pcr")); +#endif return (0); } Modified: head/lib/libsecureboot/vepcr.c ============================================================================== --- head/lib/libsecureboot/vepcr.c Sun May 19 20:24:17 2019 (r347980) +++ head/lib/libsecureboot/vepcr.c Sun May 19 20:28:49 2019 (r347981) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); static const br_hash_class *pcr_md = NULL; static br_hash_compat_context pcr_ctx; static size_t pcr_hlen = 0; +static int pcr_updating; /** * @brief initialize pcr context @@ -53,18 +54,37 @@ static size_t pcr_hlen = 0; void ve_pcr_init(void) { + pcr_updating = 0; pcr_hlen = br_sha256_SIZE; pcr_md = &br_sha256_vtable; pcr_md->init(&pcr_ctx.vtable); } /** + * @brief get pcr_updating state + */ +int +ve_pcr_updating_get(void) +{ + return (pcr_updating); +} + +/** + * @brief set pcr_updating state + */ +void +ve_pcr_updating_set(int updating) +{ + pcr_updating = updating; +} + +/** * @brief update pcr context */ void ve_pcr_update(unsigned char *data, size_t dlen) { - if (pcr_md) + if (pcr_updating != 0 && pcr_md != NULL) pcr_md->update(&pcr_ctx.vtable, data, dlen); } Modified: head/lib/libsecureboot/verify_file.c ============================================================================== --- head/lib/libsecureboot/verify_file.c Sun May 19 20:24:17 2019 (r347980) +++ head/lib/libsecureboot/verify_file.c Sun May 19 20:28:49 2019 (r347981) @@ -340,6 +340,14 @@ verify_file(int fd, const char *filename, off_t off, i if (rc != VE_FINGERPRINT_WRONG && loaded_manifests) { if (severity <= VE_GUESS) severity = severity_guess(filename); +#ifdef VE_PCR_SUPPORT + /* + * Only update pcr with things that must verify + * these tend to be processed in a more deterministic + * order, which makes our pseudo pcr more useful. + */ + ve_pcr_updating_set((severity == VE_MUST)); +#endif if ((rc = verify_fd(fd, filename, off, &st)) >= 0) { if (verbose || severity > VE_WANT) { #if defined(VE_DEBUG_LEVEL) && VE_DEBUG_LEVEL > 0 From owner-svn-src-head@freebsd.org Sun May 19 20:44:19 2019 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 D58D61590F4F; Sun, 19 May 2019 20:44:18 +0000 (UTC) (envelope-from zeising@freebsd.org) Received: from mail.daemonic.se (mail.daemonic.se [IPv6:2607:f740:d:20::25]) (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 53985738E4; Sun, 19 May 2019 20:44:18 +0000 (UTC) (envelope-from zeising@freebsd.org) Received: from cid.daemonic.se (localhost [IPv6:::1]) by mail.daemonic.se (Postfix) with ESMTP id 456Ysr3KC1zDkM8; Sun, 19 May 2019 20:44:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at daemonic.se Received: from mail.daemonic.se ([IPv6:::1]) (using TLS with cipher ECDHE-RSA-AES128-GCM-SHA256) by cid.daemonic.se (mailscanner.daemonic.se [IPv6:::1]) (amavisd-new, port 10587) with ESMTPS id 6A0NQpWjEEzE; Sun, 19 May 2019 20:44:16 +0000 (UTC) Received: from garnet.daemonic.se (unknown [IPv6:2001:470:dca9:201:ad0d:f3a0:ed24:3d3d]) by mail.daemonic.se (Postfix) with ESMTPSA id 456Ysq5HSzzDjp8; Sun, 19 May 2019 20:44:15 +0000 (UTC) Subject: Re: svn commit: r347695 - in head/sys: amd64/amd64 amd64/include kern To: Dmitry Chagin , Konstantin Belousov Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers References: <201905161328.x4GDSmMd072071@repo.freebsd.org> <20190518084406.GX2748@kib.kiev.ua> From: Niclas Zeising Message-ID: <342813b3-e7a9-4654-3945-b0105e582ab6@freebsd.org> Date: Sun, 19 May 2019 22:44:13 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 53985738E4 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 May 2019 20:44:19 -0000 On 2019-05-19 10:11, Dmitry Chagin wrote: > =D1=81=D0=B1, 18 =D0=BC=D0=B0=D1=8F 2019 =D0=B3. =D0=B2 11:44, Konstant= in Belousov : >=20 >> On Sat, May 18, 2019 at 11:35:29AM +0300, Dmitry Chagin wrote: >>> =D1=87=D1=82, 16 =D0=BC=D0=B0=D1=8F 2019 =D0=B3. =D0=B2 16:29, Konsta= ntin Belousov : >>> >>>> Author: kib >>>> Date: Thu May 16 13:28:48 2019 >>>> New Revision: 347695 >>>> URL: https://svnweb.freebsd.org/changeset/base/347695 >>>> >>>> Log: >>>> amd64 pmap: rework delayed invalidation, removing global mutex. >>>> >>>> For machines having cmpxcgh16b instruction, i.e. everything but v= ery >>>> early Athlons, provide lockless implementation of delayed >>>> invalidation. >>>> >>>> The implementation maintains lock-less single-linked list with th= e >>>> trick from the T.L. Harris article about volatile mark of the >> elements >>>> being removed. Double-CAS is used to atomically update both link = and >>>> generation. New thread starting DI appends itself to the end of = the >>>> queue, setting the generation to the generation of the last eleme= nt >>>> +1. On DI finish, thread donates its generation to the previous >>>> element. The generation of the fake head of the list is the last >>>> passed DI generation. Basically, the implementation is a queued >>>> spinlock but without spinlock. >>>> >>>> >>> >>> Hi, Kostik! First of all thanks for the previous help. >>> Second, this commit broke i915kms module. Unfortunatelly, >>> I can't give you a lot of information becouse I see only black screen= , >>> but I can help with testing >> Did you recompiled the module ? >> >=20 >=20 > I use pkg, but after your mail, yes, compiled drm-current-kmod >=20 > root@mordor:~ # kldstat > Id Refs Address Size Name > 1 4 0xffffffff80200000 1d536e0 kernel > 2 1 0xffffffff81f54000 11e8 acpi_call.ko > root@mordor:~ # kldload i915kms > sysctl_warn_reuse: can't re-use a leaf (compat.linuxkpi.debug)! > drmn1: on vgapci1 > device_attach: drmn1 attach returned 19 > root@mordor:~ >=20 > so, I'll ping freebsd-x11 Hi! drm-current-kmod was updated to the 20190519 snapshot, can you try that?=20 If it still fails, please send a message to x11@freebsd.org . Thanks! Regards --=20 Niclas Zeising From owner-svn-src-head@freebsd.org Sun May 19 21:05:30 2019 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 D387C1591F49; Sun, 19 May 2019 21:05:30 +0000 (UTC) (envelope-from ota@j.email.ne.jp) Received: from mail01.asahi-net.or.jp (mail01.asahi-net.or.jp [202.224.55.13]) by mx1.freebsd.org (Postfix) with ESMTP id 5731F74C76; Sun, 19 May 2019 21:05:29 +0000 (UTC) (envelope-from ota@j.email.ne.jp) Received: from vmware.advok.com (pool-72-76-119-135.nwrknj.fios.verizon.net [72.76.119.135]) (Authenticated sender: NR2Y-OOT) by mail01.asahi-net.or.jp (Postfix) with ESMTPSA id 6BF78121025; Mon, 20 May 2019 06:05:17 +0900 (JST) Date: Sun, 19 May 2019 17:04:17 -0400 From: Yoshihiro Ota To: Konstantin Belousov Cc: ota@j.email.ne.jp, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r347968 - head/sys/kern Message-Id: <20190519170417.b05e8c43b2ccf9a6826a1d21@j.email.ne.jp> In-Reply-To: <20190519175104.GP2748@kib.kiev.ua> References: <201905190918.x4J9IAs1036579@repo.freebsd.org> <20190519115228.49fdc5c833c2abe06f894dc2@j.email.ne.jp> <20190519175104.GP2748@kib.kiev.ua> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; i386-portbld-freebsd12.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 5731F74C76 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.950,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 May 2019 21:05:31 -0000 Hi Konstantin, I coundn't remount ro->rw a few days ago. This change isn't related, then. I will check/tesst it again later, then. Thanks, Hiro On Sun, 19 May 2019 20:51:04 +0300 Konstantin Belousov wrote: > On Sun, May 19, 2019 at 11:52:28AM -0400, Yoshihiro Ota wrote: > > Hi, > > > > Does this change fix 'mount -u -rw /path' to remount read-only device with write mode? > > I moticed an issue a couple of days ago but didn't have time to conform nor report. > > I do not understand your description. If you mean does this commit has > any relevance to the issue of remounting ro->rw, it should not. It only > affects rw->ro remounts, when you have a binary executed from the mount > point. > > > > > Thanks, > > Hiro > > > > On Sun, 19 May 2019 09:18:10 +0000 (UTC) > > Konstantin Belousov wrote: > > > > > Author: kib > > > Date: Sun May 19 09:18:09 2019 > > > New Revision: 347968 > > > URL: https://svnweb.freebsd.org/changeset/base/347968 > > > > > > Log: > > > Fix rw->ro remount when there is a text vnode mapping. > > > > > > Reported and tested by: hrs > > > Sponsored by: The FreeBSD Foundation > > > MFC after: 16 days > > > > > > Modified: > > > head/sys/kern/vfs_subr.c > > > > > > Modified: head/sys/kern/vfs_subr.c > > > ============================================================================== > > > --- head/sys/kern/vfs_subr.c Sun May 19 06:01:11 2019 (r347967) > > > +++ head/sys/kern/vfs_subr.c Sun May 19 09:18:09 2019 (r347968) > > > @@ -3146,7 +3146,7 @@ loop: > > > > > > if ((vp->v_type == VNON || > > > (error == 0 && vattr.va_nlink > 0)) && > > > - (vp->v_writecount == 0 || vp->v_type != VREG)) { > > > + (vp->v_writecount <= 0 || vp->v_type != VREG)) { > > > VOP_UNLOCK(vp, 0); > > > vdropl(vp); > > > continue; > > > _______________________________________________ > > > svn-src-all@freebsd.org mailing list > > > https://lists.freebsd.org/mailman/listinfo/svn-src-all > > > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-head@freebsd.org Sun May 19 21:17:24 2019 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 6485B159261F; Sun, 19 May 2019 21:17:24 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D9EA17541D; Sun, 19 May 2019 21:17:23 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg1-x52e.google.com with SMTP id t187so5740862pgb.13; Sun, 19 May 2019 14:17:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=4mXy/522JeuV/477VyPq5Koge01HjA9x/TCxwfq9fI8=; b=aiDShEJFtHtEBbHWD08v2vNf/9xck7PTb+RpQVf9HOZLYuhxV2Mndyr5vrSnWQ0MOG xCCbVoXhvTZd1KID9qdClqckyGI1dbfeZwAu00Z6wLeGe3OoXrilGAo8iO1HVWqRDaIl Fs0n8BXZNkeWLjBfFrDgOwAafLB0F+Z8/ceIkxxuFiY/RS+qpa9gjNUjmtQdZ5XL9/dM 7kfuKTpZ4WobA5GO8/dwJEtT6U0IyZG9Xy+fjBp9JWu2Y4br5BCZQd/TYMW4pfKs/ygl x+iIboPTkubd1NO6m1dFd6klUFfynlK4C7lidF0+C3X+Mt5fXuuGBb6F/MNx4yxyKC4u 1Kow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=4mXy/522JeuV/477VyPq5Koge01HjA9x/TCxwfq9fI8=; b=QF3hLOEF7nQFh7DXehar16O04b7juAyE6/+aNiAgR473SB+SlxOyi8nAokQasj84xy TZ2I2zdf/kg/mjOkJbxY78r/ifRxCUTdRN5YNYl1RHS/SNH6cs7yM/Mr3RegH5MK7jN9 l9rV4dXrWJvQLdc8i0uxEkYPdRJlCicDIQ/MMy0KkdyICi4E3+dLK3V9h3GN5KtjslnC iSGguHiEvFnfFGCcD09cG0XaaEjq8n4KP3Q0/IYSGNhid9unHy86StTeBfNex/BVDsZc Og64zDkd5wz6POhBr2zGeaWY9x/Pvte++KDQZUY7hNU7Y2IKaF19XY5A9x8Lr1uFWMVw G8mQ== X-Gm-Message-State: APjAAAVDuurxSzs9M19ykiW03lmD5bGGwdcKvdsxJ/qv+Da+mbAjovSy qcE16ybQH9tIlI8c6m8WHrHr7X9L X-Google-Smtp-Source: APXvYqwNeUdPSO1tVID9NgrYE2srZph+eNn1N9c9YaZJknHfrNwx0Pa2pSCFtHuk56BlFgKzA5yjYQ== X-Received: by 2002:a63:1061:: with SMTP id 33mr45134809pgq.328.1558300642494; Sun, 19 May 2019 14:17:22 -0700 (PDT) Received: from ?IPv6:2607:fb90:b2dc:6706:6cd1:7a98:a302:2d76? ([2607:fb90:b2dc:6706:6cd1:7a98:a302:2d76]) by smtp.gmail.com with ESMTPSA id g7sm13920357pgr.46.2019.05.19.14.17.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 May 2019 14:17:21 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r347979 - in head: lib/libomp tools/build/mk From: Enji Cooper X-Mailer: iPhone Mail (16E227) In-Reply-To: <201905192013.x4JKDtTA081379@repo.freebsd.org> Date: Sun, 19 May 2019 14:17:20 -0700 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <06AABE77-D67B-4D2F-8658-A102D4633BD2@gmail.com> References: <201905192013.x4JKDtTA081379@repo.freebsd.org> To: Dimitry Andric X-Rspamd-Queue-Id: D9EA17541D X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.93 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.93)[-0.930,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 May 2019 21:17:24 -0000 > On May 19, 2019, at 13:13, Dimitry Andric wrote: >=20 > Author: dim > Date: Sun May 19 20:13:55 2019 > New Revision: 347979 > URL: https://svnweb.freebsd.org/changeset/base/347979 >=20 > Log: > To avoid unnecessarily modifying ports, add a -lgomp symlink, since GCC > does not ship a -lomp symlink. Also update OptionalObsoleteFiles for > this, and add 32-bit variants while here. >=20 > Submitted by: jbeich > PR: 237975 > MFC after: 3 days One question I meant to ask: why isn=E2=80=99t this a PRIVATELIB? Thanks! -Enji= From owner-svn-src-head@freebsd.org Sun May 19 21:44:28 2019 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 CF0A5159324E; Sun, 19 May 2019 21:44:28 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 32CC2762B6; Sun, 19 May 2019 21:44:28 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 0130514A28; Sun, 19 May 2019 21:44:27 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:470:7a58::a420:2b16:64d8:ba23] (unknown [IPv6:2001:470:7a58:0:a420:2b16:64d8:ba23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 8C6A93D3FE; Sun, 19 May 2019 23:44:26 +0200 (CEST) From: Dimitry Andric Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_E3AA0DCA-C6E6-480D-9194-E4780F34CE71"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: svn commit: r347979 - in head: lib/libomp tools/build/mk Date: Sun, 19 May 2019 23:44:26 +0200 In-Reply-To: <06AABE77-D67B-4D2F-8658-A102D4633BD2@gmail.com> Cc: src-committers , svn-src-all , svn-src-head@freebsd.org To: Enji Cooper References: <201905192013.x4JKDtTA081379@repo.freebsd.org> <06AABE77-D67B-4D2F-8658-A102D4633BD2@gmail.com> X-Mailer: Apple Mail (2.3445.104.11) X-Rspamd-Queue-Id: 32CC2762B6 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.94 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.94)[-0.940,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 May 2019 21:44:29 -0000 --Apple-Mail=_E3AA0DCA-C6E6-480D-9194-E4780F34CE71 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 On 19 May 2019, at 23:17, Enji Cooper wrote: >=20 >> On May 19, 2019, at 13:13, Dimitry Andric wrote: >>=20 >> Author: dim >> Date: Sun May 19 20:13:55 2019 >> New Revision: 347979 >> URL: https://svnweb.freebsd.org/changeset/base/347979 >>=20 >> Log: >> To avoid unnecessarily modifying ports, add a -lgomp symlink, since = GCC >> does not ship a -lomp symlink. Also update OptionalObsoleteFiles for >> this, and add 32-bit variants while here. >>=20 >> Submitted by: jbeich >> PR: 237975 >> MFC after: 3 days >=20 > One question I meant to ask: why isn=E2=80=99t this a PRIVATELIB? Because: 1) This library was added for the benefit of ports (and at the request of many, including ports people). 2) Nothing in the base system uses it. -Dimitry --Apple-Mail=_E3AA0DCA-C6E6-480D-9194-E4780F34CE71 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCXOHOOgAKCRCwXqMKLiCW o5LAAKCqz0UWz3gSPZEUcEdIUPDQTMPscwCgsa1moACfjdy/WPFeGfb9wdcBj1E= =sLny -----END PGP SIGNATURE----- --Apple-Mail=_E3AA0DCA-C6E6-480D-9194-E4780F34CE71-- From owner-svn-src-head@freebsd.org Sun May 19 21:49:58 2019 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 1DA1A1593528; Sun, 19 May 2019 21:49:58 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AD61A764CD; Sun, 19 May 2019 21:49:57 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 91D18D01A; Sun, 19 May 2019 21:49:57 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4JLnvrB028497; Sun, 19 May 2019 21:49:57 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4JLnvt5028495; Sun, 19 May 2019 21:49:57 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201905192149.x4JLnvt5028495@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sun, 19 May 2019 21:49:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r347982 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 347982 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AD61A764CD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 May 2019 21:49:58 -0000 Author: melifaro Date: Sun May 19 21:49:56 2019 New Revision: 347982 URL: https://svnweb.freebsd.org/changeset/base/347982 Log: Fix rt_ifa selection during loopback route insertion process. Currently such routes are added with a link-level IFA, which is plain wrong. Only after the insertion they get fixed by the special link_rtrequest() ifa handler. This behaviour complicates routing code and makes ifa selection more complex. Streamline this process by explicitly moving link_rtrequest() logic to the pre-insertion rt_getifa_fib() ifa selector. Avoid calling all this logic in the loopback route case by explicitly specifying proper rt_ifa inside the ifa_maintain_loopback_route().§ MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D20076 Modified: head/sys/net/if.c head/sys/net/route.c Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Sun May 19 20:28:49 2019 (r347981) +++ head/sys/net/if.c Sun May 19 21:49:56 2019 (r347982) @@ -264,7 +264,6 @@ static void if_route(struct ifnet *, int flag, int fam static int if_setflag(struct ifnet *, int, int, int *, int); static int if_transmit(struct ifnet *ifp, struct mbuf *m); static void if_unroute(struct ifnet *, int flag, int fam); -static void link_rtrequest(int, struct rtentry *, struct rt_addrinfo *); static int if_delmulti_locked(struct ifnet *, struct ifmultiaddr *, int); static void do_link_state_change(void *, int); static int if_getgroup(struct ifgroupreq *, struct ifnet *); @@ -862,7 +861,6 @@ if_attach_internal(struct ifnet *ifp, int vmove, struc sdl->sdl_type = ifp->if_type; ifp->if_addr = ifa; ifa->ifa_ifp = ifp; - ifa->ifa_rtrequest = link_rtrequest; ifa->ifa_addr = (struct sockaddr *)sdl; sdl = (struct sockaddr_dl *)(socksize + (caddr_t)sdl); ifa->ifa_netmask = (struct sockaddr *)sdl; @@ -1892,6 +1890,7 @@ static int ifa_maintain_loopback_route(int cmd, const char *otype, struct ifaddr *ifa, struct sockaddr *ia) { + struct epoch_tracker et; int error; struct rt_addrinfo info; struct sockaddr_dl null_sdl; @@ -1902,6 +1901,16 @@ ifa_maintain_loopback_route(int cmd, const char *otype bzero(&info, sizeof(info)); if (cmd != RTM_DELETE) info.rti_ifp = V_loif; + if (cmd == RTM_ADD) { + /* explicitly specify (loopback) ifa */ + if (info.rti_ifp != NULL) { + NET_EPOCH_ENTER(et); + info.rti_ifa = ifaof_ifpforaddr(ifa->ifa_addr, info.rti_ifp); + if (info.rti_ifa != NULL) + ifa_ref(info.rti_ifa); + NET_EPOCH_EXIT(et); + } + } info.rti_flags = ifa->ifa_flags | RTF_HOST | RTF_STATIC | RTF_PINNED; info.rti_info[RTAX_DST] = ia; info.rti_info[RTAX_GATEWAY] = (struct sockaddr *)&null_sdl; @@ -2208,39 +2217,6 @@ ifa_preferred(struct ifaddr *cur, struct ifaddr *next) return (cur->ifa_carp && (!next->ifa_carp || ((*carp_master_p)(next) && !(*carp_master_p)(cur)))); -} - -#include - -/* - * Default action when installing a route with a Link Level gateway. - * Lookup an appropriate real ifa to point to. - * This should be moved to /sys/net/link.c eventually. - */ -static void -link_rtrequest(int cmd, struct rtentry *rt, struct rt_addrinfo *info) -{ - struct epoch_tracker et; - struct ifaddr *ifa, *oifa; - struct sockaddr *dst; - struct ifnet *ifp; - - if (cmd != RTM_ADD || ((ifa = rt->rt_ifa) == NULL) || - ((ifp = ifa->ifa_ifp) == NULL) || ((dst = rt_key(rt)) == NULL)) - return; - NET_EPOCH_ENTER(et); - ifa = ifaof_ifpforaddr(dst, ifp); - if (ifa) { - oifa = rt->rt_ifa; - if (oifa != ifa) { - ifa_free(oifa); - ifa_ref(ifa); - } - rt->rt_ifa = ifa; - if (ifa->ifa_rtrequest && ifa->ifa_rtrequest != link_rtrequest) - ifa->ifa_rtrequest(cmd, rt, info); - } - NET_EPOCH_EXIT(et); } struct sockaddr_dl * Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Sun May 19 20:28:49 2019 (r347981) +++ head/sys/net/route.c Sun May 19 21:49:56 2019 (r347982) @@ -1276,12 +1276,14 @@ rt_notifydelete(struct rtentry *rt, struct rt_addrinfo /* * Look up rt_addrinfo for a specific fib. Note that if rti_ifa is defined, * it will be referenced so the caller must free it. + * + * Assume basic consistency checks are executed by callers: + * RTAX_DST exists, if RTF_GATEWAY is set, RTAX_GATEWAY exists as well. */ int rt_getifa_fib(struct rt_addrinfo *info, u_int fibnum) { struct epoch_tracker et; - struct ifaddr *ifa; int needref, error; /* @@ -1291,21 +1293,54 @@ rt_getifa_fib(struct rt_addrinfo *info, u_int fibnum) error = 0; needref = (info->rti_ifa == NULL); NET_EPOCH_ENTER(et); + + /* If we have interface specified by the ifindex in the address, use it */ if (info->rti_ifp == NULL && ifpaddr != NULL && - ifpaddr->sa_family == AF_LINK && - (ifa = ifa_ifwithnet(ifpaddr, 0, fibnum)) != NULL) { - info->rti_ifp = ifa->ifa_ifp; + ifpaddr->sa_family == AF_LINK) { + const struct sockaddr_dl *sdl = (const struct sockaddr_dl *)ifpaddr; + if (sdl->sdl_index != 0) + info->rti_ifp = ifnet_byindex_locked(sdl->sdl_index); } + /* + * If we have source address specified, try to find it + * TODO: avoid enumerating all ifas on all interfaces. + */ if (info->rti_ifa == NULL && ifaaddr != NULL) info->rti_ifa = ifa_ifwithaddr(ifaaddr); if (info->rti_ifa == NULL) { struct sockaddr *sa; - sa = ifaaddr != NULL ? ifaaddr : - (gateway != NULL ? gateway : dst); - if (sa != NULL && info->rti_ifp != NULL) + /* + * Most common use case for the userland-supplied routes. + * + * Choose sockaddr to select ifa. + * -- if ifp is set -- + * Order of preference: + * 1) IFA address + * 2) gateway address + * Note: for interface routes link-level gateway address + * is specified to indicate the interface index without + * specifying RTF_GATEWAY. In this case, ignore gateway + * Note: gateway AF may be different from dst AF. In this case, + * ignore gateway + * 3) final destination. + * 4) if all of these fails, try to get at least link-level ifa. + * -- else -- + * try to lookup gateway or dst in the routing table to get ifa + */ + if (info->rti_info[RTAX_IFA] != NULL) + sa = info->rti_info[RTAX_IFA]; + else if ((info->rti_flags & RTF_GATEWAY) != 0 && + gateway->sa_family == dst->sa_family) + sa = gateway; + else + sa = dst; + if (info->rti_ifp != NULL) { info->rti_ifa = ifaof_ifpforaddr(sa, info->rti_ifp); - else if (dst != NULL && gateway != NULL) + /* Case 4 */ + if (info->rti_ifa == NULL && gateway != NULL) + info->rti_ifa = ifaof_ifpforaddr(gateway, info->rti_ifp); + } else if (dst != NULL && gateway != NULL) info->rti_ifa = ifa_ifwithroute(flags, dst, gateway, fibnum); else if (sa != NULL) From owner-svn-src-head@freebsd.org Mon May 20 00:38:41 2019 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 056EB15970AE; Mon, 20 May 2019 00:38:41 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9145E83EA8; Mon, 20 May 2019 00:38:40 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 44451ECA8; Mon, 20 May 2019 00:38:40 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4K0ceOt019997; Mon, 20 May 2019 00:38:40 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4K0cNoZ019920; Mon, 20 May 2019 00:38:23 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201905200038.x4K0cNoZ019920@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Mon, 20 May 2019 00:38:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r347984 - in head/sys: amd64/vmm/io arm/allwinner arm/allwinner/a10 arm/allwinner/clkng arm/arm arm/broadcom/bcm2835 arm/freescale/imx arm/mv arm/mv/armada arm/nvidia arm/nvidia/tegra12... X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head/sys: amd64/vmm/io arm/allwinner arm/allwinner/a10 arm/allwinner/clkng arm/arm arm/broadcom/bcm2835 arm/freescale/imx arm/mv arm/mv/armada arm/nvidia arm/nvidia/tegra124 arm/ti arm/versatile ar... X-SVN-Commit-Revision: 347984 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9145E83EA8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.957,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 00:38:41 -0000 Author: cem Date: Mon May 20 00:38:23 2019 New Revision: 347984 URL: https://svnweb.freebsd.org/changeset/base/347984 Log: Extract eventfilter declarations to sys/_eventfilter.h This allows replacing "sys/eventfilter.h" includes with "sys/_eventfilter.h" in other header files (e.g., sys/{bus,conf,cpu}.h) and reduces header pollution substantially. EVENTHANDLER_DECLARE and EVENTHANDLER_LIST_DECLAREs were moved out of .c files into appropriate headers (e.g., sys/proc.h, powernv/opal.h). As a side effect of reduced header pollution, many .c files and headers no longer contain needed definitions. The remainder of the patch addresses adding appropriate includes to fix those files. LOCK_DEBUG and LOCK_FILE_LINE_ARG are moved to sys/_lock.h, as required by sys/mutex.h since r326106 (but silently protected by header pollution prior to this change). No functional change (intended). Of course, any out of tree modules that relied on header pollution for sys/eventhandler.h, sys/lock.h, or sys/mutex.h inclusion need to be fixed. __FreeBSD_version has been bumped. Added: head/sys/sys/_eventhandler.h (contents, props changed) Modified: head/sys/amd64/vmm/io/iommu.c head/sys/arm/allwinner/a10/a10_intc.c head/sys/arm/allwinner/a10_dmac.c head/sys/arm/allwinner/a31_dmac.c head/sys/arm/allwinner/aw_ccu.c head/sys/arm/allwinner/aw_reset.c head/sys/arm/allwinner/aw_rsb.c head/sys/arm/allwinner/aw_spi.c head/sys/arm/allwinner/aw_thermal.c head/sys/arm/allwinner/aw_wdog.c head/sys/arm/allwinner/clkng/aw_ccung.c head/sys/arm/arm/machdep.c head/sys/arm/arm/pl190.c head/sys/arm/broadcom/bcm2835/bcm2835_rng.c head/sys/arm/broadcom/bcm2835/bcm2835_wdog.c head/sys/arm/broadcom/bcm2835/bcm2836.c head/sys/arm/freescale/imx/imx_wdog.c head/sys/arm/mv/armada/thermal.c head/sys/arm/mv/armada/wdt.c head/sys/arm/mv/mv_spi.c head/sys/arm/mv/timer.c head/sys/arm/nvidia/tegra124/tegra124_machdep.c head/sys/arm/nvidia/tegra124/tegra124_pmc.c head/sys/arm/nvidia/tegra_xhci.c head/sys/arm/ti/ti_pruss.c head/sys/arm/ti/ti_wdt.c head/sys/arm/versatile/versatile_pci.c head/sys/arm/versatile/versatile_sic.c head/sys/arm64/arm64/gicv3_its.c head/sys/arm64/arm64/machdep.c head/sys/arm64/coresight/coresight.c head/sys/arm64/rockchip/clk/rk_cru.c head/sys/cam/cam_periph.h head/sys/cam/ctl/ctl_ha.c head/sys/cddl/compat/opensolaris/kern/opensolaris.c head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c head/sys/crypto/aesni/aesni.c head/sys/crypto/armv8/armv8_crypto.c head/sys/crypto/blake2/blake2_cryptodev.c head/sys/crypto/ccp/ccp.c head/sys/crypto/ccp/ccp_hardware.c head/sys/ddb/db_command.c head/sys/dev/acpi_support/acpi_panasonic.c head/sys/dev/acpica/acpi.c head/sys/dev/acpica/acpi_lid.c head/sys/dev/acpica/acpi_thermal.c head/sys/dev/acpica/acpi_video.c head/sys/dev/acpica/acpivar.h head/sys/dev/adb/adb_kbd.c head/sys/dev/adb/adb_mouse.c head/sys/dev/amdsbwd/amdsbwd.c head/sys/dev/atkbdc/psm.c head/sys/dev/cardbus/cardbus.c head/sys/dev/cmx/cmx.c head/sys/dev/coretemp/coretemp.c head/sys/dev/cxgbe/cxgbei/cxgbei.c head/sys/dev/cxgbe/cxgbei/icl_cxgbei.c head/sys/dev/cxgbe/tom/t4_tls.c head/sys/dev/dcons/dcons_crom.c head/sys/dev/dcons/dcons_os.c head/sys/dev/dcons/dcons_os.h head/sys/dev/evdev/evdev_private.h head/sys/dev/extres/syscon/syscon_generic.c head/sys/dev/firewire/firewire.c head/sys/dev/firewire/fwohci.c head/sys/dev/ichwd/ichwd.c head/sys/dev/ida/ida_disk.c head/sys/dev/ida/ida_pci.c head/sys/dev/iir/iir_ctrl.c head/sys/dev/ioat/ioat.c head/sys/dev/ipmi/ipmi.c head/sys/dev/ipmi/ipmi_opal.c head/sys/dev/ips/ips.c head/sys/dev/iscsi/icl_soft_proxy.c head/sys/dev/iscsi_initiator/iscsivar.h head/sys/dev/iwm/if_iwm_notif_wait.c head/sys/dev/led/led.c head/sys/dev/liquidio/lio_bsd.h head/sys/dev/mfi/mfi_disk.c head/sys/dev/mfi/mfi_pci.c head/sys/dev/mfi/mfi_syspd.c head/sys/dev/mlx/mlxvar.h head/sys/dev/mmc/host/dwmmc.c head/sys/dev/mpr/mprvar.h head/sys/dev/mps/mpsvar.h head/sys/dev/mrsas/mrsas.h head/sys/dev/nmdm/nmdm.c head/sys/dev/ntb/if_ntb/if_ntb.c head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c head/sys/dev/ow/ow.c head/sys/dev/pccard/pccard.c head/sys/dev/pci/pci.c head/sys/dev/pci/pci_iov.c head/sys/dev/pci/pci_pci.c head/sys/dev/pci/pcivar.h head/sys/dev/scc/scc_core.c head/sys/dev/scc/scc_dev_quicc.c head/sys/dev/scc/scc_dev_sab82532.c head/sys/dev/scc/scc_dev_z8530.c head/sys/dev/smartpqi/smartpqi_includes.h head/sys/dev/sound/pcm/sound.h head/sys/dev/tws/tws.h head/sys/dev/usb/net/if_cdce.c head/sys/dev/usb/net/if_usie.c head/sys/dev/usb/net/uhso.c head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/usb_device.c head/sys/dev/usb/usbdi.h head/sys/dev/usb/wlan/if_run.c head/sys/dev/viawd/viawd.c head/sys/dev/vkbd/vkbd.c head/sys/dev/vmware/vmci/vmci.c head/sys/dev/vt/vt_cpulogos.c head/sys/dev/vt/vt_sysmouse.c head/sys/dev/watchdog/watchdog.c head/sys/dev/xdma/xdma.c head/sys/dev/xdma/xdma_bank.c head/sys/dev/xdma/xdma_bio.c head/sys/dev/xdma/xdma_mbuf.c head/sys/dev/xdma/xdma_queue.c head/sys/dev/xdma/xdma_sg.c head/sys/dev/xen/console/xen_console.c head/sys/dev/xen/debug/debug.c head/sys/fs/devfs/devfs_vnops.c head/sys/i386/i386/elan-mmcr.c head/sys/i386/i386/geode.c head/sys/i386/i386/longrun.c head/sys/kern/bus_if.m head/sys/kern/init_main.c head/sys/kern/kern_clock.c head/sys/kern/kern_exec.c head/sys/kern/kern_exit.c head/sys/kern/kern_fork.c head/sys/kern/kern_proc.c head/sys/kern/subr_bus_dma.c head/sys/kern/subr_intr.c head/sys/kern/subr_power.c head/sys/kern/tty_tty.c head/sys/kern/vfs_mountroot.c head/sys/mips/atheros/ar71xx_machdep.c head/sys/mips/atheros/ar71xx_wdog.c head/sys/net/bpf.c head/sys/net/bpf.h head/sys/net/bpf_buffer.c head/sys/net/ethernet.h head/sys/net/if.c head/sys/net/if_clone.h head/sys/net/if_llatbl.c head/sys/net/if_llatbl.h head/sys/net/if_tuntap.c head/sys/net/if_var.h head/sys/net/if_vlan_var.h head/sys/netinet/if_ether.c head/sys/netinet/tcp_offload.c head/sys/netinet/toecore.c head/sys/netinet/toecore.h head/sys/netinet6/nd6.c head/sys/netinet6/nd6_nbr.c head/sys/powerpc/ofw/ofw_machdep.c head/sys/powerpc/powermac/cpcht.c head/sys/powerpc/powermac/cuda.c head/sys/powerpc/powermac/pmu.c head/sys/powerpc/powermac/smu.c head/sys/powerpc/powermac/vcoregpio.c head/sys/powerpc/powernv/opal.h head/sys/powerpc/powernv/opal_async.c head/sys/powerpc/powernv/opal_console.c head/sys/powerpc/powernv/opal_dev.c head/sys/powerpc/powernv/opal_flash.c head/sys/powerpc/powernv/opal_sensor.c head/sys/powerpc/powernv/xive.c head/sys/powerpc/powerpc/cpu.c head/sys/powerpc/powerpc/openpic.c head/sys/powerpc/ps3/ps3bus.c head/sys/powerpc/pseries/rtas_dev.c head/sys/powerpc/pseries/xics.c head/sys/riscv/riscv/intr_machdep.c head/sys/riscv/riscv/machdep.c head/sys/riscv/riscv/mp_machdep.c head/sys/security/audit/audit.c head/sys/security/audit/audit_trigger.c head/sys/sys/_lock.h head/sys/sys/bus.h head/sys/sys/conf.h head/sys/sys/cpu.h head/sys/sys/eventhandler.h head/sys/sys/interrupt.h head/sys/sys/lock.h head/sys/sys/param.h head/sys/sys/pcpu.h head/sys/sys/power.h head/sys/sys/proc.h head/sys/sys/watchdog.h head/sys/vm/swap_pager.c head/sys/x86/acpica/OsdEnvironment.c head/sys/x86/cpufreq/smist.c head/sys/x86/iommu/intel_drv.c head/sys/x86/iommu/intel_intrmap.c head/sys/x86/iommu/intel_quirks.c head/sys/x86/x86/tsc.c Modified: head/sys/amd64/vmm/io/iommu.c ============================================================================== --- head/sys/amd64/vmm/io/iommu.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/amd64/vmm/io/iommu.c Mon May 20 00:38:23 2019 (r347984) @@ -32,10 +32,10 @@ __FBSDID("$FreeBSD$"); #include -#include -#include #include +#include #include +#include #include #include Modified: head/sys/arm/allwinner/a10/a10_intc.c ============================================================================== --- head/sys/arm/allwinner/a10/a10_intc.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/arm/allwinner/a10/a10_intc.c Mon May 20 00:38:23 2019 (r347984) @@ -30,11 +30,12 @@ __FBSDID("$FreeBSD$"); #include "opt_platform.h" -#include +#include #include #include #include #include +#include #include #include #include Modified: head/sys/arm/allwinner/a10_dmac.c ============================================================================== --- head/sys/arm/allwinner/a10_dmac.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/arm/allwinner/a10_dmac.c Mon May 20 00:38:23 2019 (r347984) @@ -38,7 +38,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include Modified: head/sys/arm/allwinner/a31_dmac.c ============================================================================== --- head/sys/arm/allwinner/a31_dmac.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/arm/allwinner/a31_dmac.c Mon May 20 00:38:23 2019 (r347984) @@ -38,7 +38,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include Modified: head/sys/arm/allwinner/aw_ccu.c ============================================================================== --- head/sys/arm/allwinner/aw_ccu.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/arm/allwinner/aw_ccu.c Mon May 20 00:38:23 2019 (r347984) @@ -38,7 +38,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include Modified: head/sys/arm/allwinner/aw_reset.c ============================================================================== --- head/sys/arm/allwinner/aw_reset.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/arm/allwinner/aw_reset.c Mon May 20 00:38:23 2019 (r347984) @@ -38,7 +38,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include Modified: head/sys/arm/allwinner/aw_rsb.c ============================================================================== --- head/sys/arm/allwinner/aw_rsb.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/arm/allwinner/aw_rsb.c Mon May 20 00:38:23 2019 (r347984) @@ -38,7 +38,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include Modified: head/sys/arm/allwinner/aw_spi.c ============================================================================== --- head/sys/arm/allwinner/aw_spi.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/arm/allwinner/aw_spi.c Mon May 20 00:38:23 2019 (r347984) @@ -32,7 +32,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include #include Modified: head/sys/arm/allwinner/aw_thermal.c ============================================================================== --- head/sys/arm/allwinner/aw_thermal.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/arm/allwinner/aw_thermal.c Mon May 20 00:38:23 2019 (r347984) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include Modified: head/sys/arm/allwinner/aw_wdog.c ============================================================================== --- head/sys/arm/allwinner/aw_wdog.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/arm/allwinner/aw_wdog.c Mon May 20 00:38:23 2019 (r347984) @@ -28,6 +28,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include Modified: head/sys/arm/allwinner/clkng/aw_ccung.c ============================================================================== --- head/sys/arm/allwinner/clkng/aw_ccung.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/arm/allwinner/clkng/aw_ccung.c Mon May 20 00:38:23 2019 (r347984) @@ -39,7 +39,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/arm/arm/machdep.c Mon May 20 00:38:23 2019 (r347984) @@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/arm/arm/pl190.c ============================================================================== --- head/sys/arm/arm/pl190.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/arm/arm/pl190.c Mon May 20 00:38:23 2019 (r347984) @@ -34,7 +34,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include #include Modified: head/sys/arm/broadcom/bcm2835/bcm2835_rng.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_rng.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/arm/broadcom/bcm2835/bcm2835_rng.c Mon May 20 00:38:23 2019 (r347984) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include Modified: head/sys/arm/broadcom/bcm2835/bcm2835_wdog.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_wdog.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/arm/broadcom/bcm2835/bcm2835_wdog.c Mon May 20 00:38:23 2019 (r347984) @@ -29,12 +29,15 @@ __FBSDID("$FreeBSD$"); #include -#include -#include #include +#include #include +#include #include +#include #include +#include +#include #include #include Modified: head/sys/arm/broadcom/bcm2835/bcm2836.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2836.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/arm/broadcom/bcm2835/bcm2836.c Mon May 20 00:38:23 2019 (r347984) @@ -36,7 +36,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include #ifdef SMP Modified: head/sys/arm/freescale/imx/imx_wdog.c ============================================================================== --- head/sys/arm/freescale/imx/imx_wdog.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/arm/freescale/imx/imx_wdog.c Mon May 20 00:38:23 2019 (r347984) @@ -33,13 +33,16 @@ __FBSDID("$FreeBSD$"); #include -#include +#include +#include #include +#include #include -#include -#include +#include #include #include +#include +#include #include #include Modified: head/sys/arm/mv/armada/thermal.c ============================================================================== --- head/sys/arm/mv/armada/thermal.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/arm/mv/armada/thermal.c Mon May 20 00:38:23 2019 (r347984) @@ -33,9 +33,10 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include +#include #include +#include #include #include Modified: head/sys/arm/mv/armada/wdt.c ============================================================================== --- head/sys/arm/mv/armada/wdt.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/arm/mv/armada/wdt.c Mon May 20 00:38:23 2019 (r347984) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/arm/mv/mv_spi.c ============================================================================== --- head/sys/arm/mv/mv_spi.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/arm/mv/mv_spi.c Mon May 20 00:38:23 2019 (r347984) @@ -32,7 +32,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include +#include #include #include Modified: head/sys/arm/mv/timer.c ============================================================================== --- head/sys/arm/mv/timer.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/arm/mv/timer.c Mon May 20 00:38:23 2019 (r347984) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/arm/nvidia/tegra124/tegra124_machdep.c ============================================================================== --- head/sys/arm/nvidia/tegra124/tegra124_machdep.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/arm/nvidia/tegra124/tegra124_machdep.c Mon May 20 00:38:23 2019 (r347984) @@ -30,10 +30,11 @@ __FBSDID("$FreeBSD$"); #include -#include #include -#include #include +#include +#include +#include #include Modified: head/sys/arm/nvidia/tegra124/tegra124_pmc.c ============================================================================== --- head/sys/arm/nvidia/tegra124/tegra124_pmc.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/arm/nvidia/tegra124/tegra124_pmc.c Mon May 20 00:38:23 2019 (r347984) @@ -27,12 +27,14 @@ */ #include -#include #include #include -#include +#include #include +#include +#include #include +#include #include Modified: head/sys/arm/nvidia/tegra_xhci.c ============================================================================== --- head/sys/arm/nvidia/tegra_xhci.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/arm/nvidia/tegra_xhci.c Mon May 20 00:38:23 2019 (r347984) @@ -34,15 +34,17 @@ __FBSDID("$FreeBSD$"); #include "opt_platform.h" #include -#include -#include -#include -#include #include #include #include #include +#include +#include +#include +#include +#include #include +#include #include #include Modified: head/sys/arm/ti/ti_pruss.c ============================================================================== --- head/sys/arm/ti/ti_pruss.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/arm/ti/ti_pruss.c Mon May 20 00:38:23 2019 (r347984) @@ -38,8 +38,10 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include +#include #include #include #include Modified: head/sys/arm/ti/ti_wdt.c ============================================================================== --- head/sys/arm/ti/ti_wdt.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/arm/ti/ti_wdt.c Mon May 20 00:38:23 2019 (r347984) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/arm/versatile/versatile_pci.c ============================================================================== --- head/sys/arm/versatile/versatile_pci.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/arm/versatile/versatile_pci.c Mon May 20 00:38:23 2019 (r347984) @@ -33,8 +33,10 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include +#include +#include #include #include Modified: head/sys/arm/versatile/versatile_sic.c ============================================================================== --- head/sys/arm/versatile/versatile_sic.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/arm/versatile/versatile_sic.c Mon May 20 00:38:23 2019 (r347984) @@ -34,7 +34,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include #include Modified: head/sys/arm64/arm64/gicv3_its.c ============================================================================== --- head/sys/arm64/arm64/gicv3_its.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/arm64/arm64/gicv3_its.c Mon May 20 00:38:23 2019 (r347984) @@ -42,8 +42,10 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include +#include #include #include #include Modified: head/sys/arm64/arm64/machdep.c ============================================================================== --- head/sys/arm64/arm64/machdep.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/arm64/arm64/machdep.c Mon May 20 00:38:23 2019 (r347984) @@ -42,8 +42,9 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include +#include #include #include #include Modified: head/sys/arm64/coresight/coresight.c ============================================================================== --- head/sys/arm64/coresight/coresight.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/arm64/coresight/coresight.c Mon May 20 00:38:23 2019 (r347984) @@ -36,7 +36,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include Modified: head/sys/arm64/rockchip/clk/rk_cru.c ============================================================================== --- head/sys/arm64/rockchip/clk/rk_cru.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/arm64/rockchip/clk/rk_cru.c Mon May 20 00:38:23 2019 (r347984) @@ -40,7 +40,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include Modified: head/sys/cam/cam_periph.h ============================================================================== --- head/sys/cam/cam_periph.h Sun May 19 23:56:04 2019 (r347983) +++ head/sys/cam/cam_periph.h Mon May 20 00:38:23 2019 (r347984) @@ -37,6 +37,8 @@ #include #ifdef _KERNEL +#include +#include #include #include Modified: head/sys/cam/ctl/ctl_ha.c ============================================================================== --- head/sys/cam/ctl/ctl_ha.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/cam/ctl/ctl_ha.c Mon May 20 00:38:23 2019 (r347984) @@ -30,23 +30,23 @@ __FBSDID("$FreeBSD$"); #include -#include +#include +#include +#include #include #include -#include #include #include -#include -#include -#include #include #include +#include +#include #include -#include #include -#include #include #include +#include +#include #include #include #include Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris.c ============================================================================== --- head/sys/cddl/compat/opensolaris/kern/opensolaris.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/cddl/compat/opensolaris/kern/opensolaris.c Mon May 20 00:38:23 2019 (r347984) @@ -27,7 +27,7 @@ */ #include -#include +#include #include #include #include Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Mon May 20 00:38:23 2019 (r347984) @@ -25,6 +25,7 @@ static const char rcsid[] = "@(#)$Id$"; # include "opt_random_ip_id.h" #endif #include +#include #include #include #include Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c ============================================================================== --- head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c Mon May 20 00:38:23 2019 (r347984) @@ -178,7 +178,6 @@ static const char *const ioctl_names[] = { vchiq_static_assert((sizeof(ioctl_names)/sizeof(ioctl_names[0])) == (VCHIQ_IOC_MAX + 1)); -static eventhandler_tag vchiq_ehtag = NULL; static d_open_t vchiq_open; static d_close_t vchiq_close; static d_ioctl_t vchiq_ioctl; @@ -2918,9 +2917,6 @@ void vchiq_exit(void); void vchiq_exit(void) { - if (vchiq_ehtag == NULL) - EVENTHANDLER_DEREGISTER(dev_clone, vchiq_ehtag); - vchiq_ehtag = NULL; vchiq_platform_exit(&g_state); if (vchiq_cdev) { Modified: head/sys/crypto/aesni/aesni.c ============================================================================== --- head/sys/crypto/aesni/aesni.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/crypto/aesni/aesni.c Mon May 20 00:38:23 2019 (r347984) @@ -35,17 +35,18 @@ __FBSDID("$FreeBSD$"); #include -#include +#include #include #include #include #include -#include #include -#include -#include #include +#include +#include #include +#include +#include #include #include Modified: head/sys/crypto/armv8/armv8_crypto.c ============================================================================== --- head/sys/crypto/armv8/armv8_crypto.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/crypto/armv8/armv8_crypto.c Mon May 20 00:38:23 2019 (r347984) @@ -45,9 +45,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include +#include #include #include #include Modified: head/sys/crypto/blake2/blake2_cryptodev.c ============================================================================== --- head/sys/crypto/blake2/blake2_cryptodev.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/crypto/blake2/blake2_cryptodev.c Mon May 20 00:38:23 2019 (r347984) @@ -32,8 +32,9 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include +#include +#include #include #include Modified: head/sys/crypto/ccp/ccp.c ============================================================================== --- head/sys/crypto/ccp/ccp.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/crypto/ccp/ccp.c Mon May 20 00:38:23 2019 (r347984) @@ -33,7 +33,7 @@ __FBSDID("$FreeBSD$"); #include "opt_ddb.h" -#include +#include #include #include #include Modified: head/sys/crypto/ccp/ccp_hardware.c ============================================================================== --- head/sys/crypto/ccp/ccp_hardware.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/crypto/ccp/ccp_hardware.c Mon May 20 00:38:23 2019 (r347984) @@ -33,7 +33,7 @@ __FBSDID("$FreeBSD$"); #include "opt_ddb.h" -#include +#include #include #include #include Modified: head/sys/ddb/db_command.c ============================================================================== --- head/sys/ddb/db_command.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/ddb/db_command.c Mon May 20 00:38:23 2019 (r347984) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include Modified: head/sys/dev/acpi_support/acpi_panasonic.c ============================================================================== --- head/sys/dev/acpi_support/acpi_panasonic.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/dev/acpi_support/acpi_panasonic.c Mon May 20 00:38:23 2019 (r347984) @@ -31,10 +31,11 @@ __FBSDID("$FreeBSD$"); #include "opt_acpi.h" #include +#include +#include #include #include #include -#include #include #include Modified: head/sys/dev/acpica/acpi.c ============================================================================== --- head/sys/dev/acpica/acpi.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/dev/acpica/acpi.c Mon May 20 00:38:23 2019 (r347984) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include "opt_acpi.h" #include +#include #include #include #include Modified: head/sys/dev/acpica/acpi_lid.c ============================================================================== --- head/sys/dev/acpica/acpi_lid.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/dev/acpica/acpi_lid.c Mon May 20 00:38:23 2019 (r347984) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include "opt_acpi.h" #include +#include #include #include #include Modified: head/sys/dev/acpica/acpi_thermal.c ============================================================================== --- head/sys/dev/acpica/acpi_thermal.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/dev/acpica/acpi_thermal.c Mon May 20 00:38:23 2019 (r347984) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include "opt_acpi.h" #include +#include #include #include #include Modified: head/sys/dev/acpica/acpi_video.c ============================================================================== --- head/sys/dev/acpica/acpi_video.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/dev/acpica/acpi_video.c Mon May 20 00:38:23 2019 (r347984) @@ -30,10 +30,11 @@ __FBSDID("$FreeBSD$"); #include +#include +#include #include #include #include -#include #include #include #include Modified: head/sys/dev/acpica/acpivar.h ============================================================================== --- head/sys/dev/acpica/acpivar.h Sun May 19 23:56:04 2019 (r347983) +++ head/sys/dev/acpica/acpivar.h Mon May 20 00:38:23 2019 (r347984) @@ -35,7 +35,7 @@ #include "acpi_if.h" #include "bus_if.h" -#include +#include #ifdef INTRNG #include #endif Modified: head/sys/dev/adb/adb_kbd.c ============================================================================== --- head/sys/dev/adb/adb_kbd.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/dev/adb/adb_kbd.c Mon May 20 00:38:23 2019 (r347984) @@ -30,7 +30,9 @@ #include #include #include +#include #include +#include #include #include #include Modified: head/sys/dev/adb/adb_mouse.c ============================================================================== --- head/sys/dev/adb/adb_mouse.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/dev/adb/adb_mouse.c Mon May 20 00:38:23 2019 (r347984) @@ -30,7 +30,9 @@ #include #include #include +#include #include +#include #include #include #include Modified: head/sys/dev/amdsbwd/amdsbwd.c ============================================================================== --- head/sys/dev/amdsbwd/amdsbwd.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/dev/amdsbwd/amdsbwd.c Mon May 20 00:38:23 2019 (r347984) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include "opt_amdsbwd.h" #include +#include #include #include #include Modified: head/sys/dev/atkbdc/psm.c ============================================================================== --- head/sys/dev/atkbdc/psm.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/dev/atkbdc/psm.c Mon May 20 00:38:23 2019 (r347984) @@ -72,6 +72,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/dev/cardbus/cardbus.c ============================================================================== --- head/sys/dev/cardbus/cardbus.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/dev/cardbus/cardbus.c Mon May 20 00:38:23 2019 (r347984) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include Modified: head/sys/dev/cmx/cmx.c ============================================================================== --- head/sys/dev/cmx/cmx.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/dev/cmx/cmx.c Mon May 20 00:38:23 2019 (r347984) @@ -41,7 +41,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include +#include #include #include #include Modified: head/sys/dev/coretemp/coretemp.c ============================================================================== --- head/sys/dev/coretemp/coretemp.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/dev/coretemp/coretemp.c Mon May 20 00:38:23 2019 (r347984) @@ -36,14 +36,15 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include #include #include -#include +#include +#include +#include #include /* for curthread */ #include +#include +#include #include #include Modified: head/sys/dev/cxgbe/cxgbei/cxgbei.c ============================================================================== --- head/sys/dev/cxgbe/cxgbei/cxgbei.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/dev/cxgbe/cxgbei/cxgbei.c Mon May 20 00:38:23 2019 (r347984) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/dev/cxgbe/cxgbei/icl_cxgbei.c ============================================================================== --- head/sys/dev/cxgbe/cxgbei/icl_cxgbei.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/dev/cxgbe/cxgbei/icl_cxgbei.c Mon May 20 00:38:23 2019 (r347984) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/dev/cxgbe/tom/t4_tls.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tls.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/dev/cxgbe/tom/t4_tls.c Mon May 20 00:38:23 2019 (r347984) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include Modified: head/sys/dev/dcons/dcons_crom.c ============================================================================== --- head/sys/dev/dcons/dcons_crom.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/dev/dcons/dcons_crom.c Mon May 20 00:38:23 2019 (r347984) @@ -38,6 +38,7 @@ */ #include +#include #include #include #include Modified: head/sys/dev/dcons/dcons_os.c ============================================================================== --- head/sys/dev/dcons/dcons_os.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/dev/dcons/dcons_os.c Mon May 20 00:38:23 2019 (r347984) @@ -37,6 +37,7 @@ */ #include +#include #include #include #include Modified: head/sys/dev/dcons/dcons_os.h ============================================================================== --- head/sys/dev/dcons/dcons_os.h Sun May 19 23:56:04 2019 (r347983) +++ head/sys/dev/dcons/dcons_os.h Mon May 20 00:38:23 2019 (r347984) @@ -36,6 +36,8 @@ * $FreeBSD$ */ +#include + typedef void (*dcons_poll_fn)(void *, int); EVENTHANDLER_DECLARE(dcons_poll, dcons_poll_fn); Modified: head/sys/dev/evdev/evdev_private.h ============================================================================== --- head/sys/dev/evdev/evdev_private.h Sun May 19 23:56:04 2019 (r347983) +++ head/sys/dev/evdev/evdev_private.h Mon May 20 00:38:23 2019 (r347984) @@ -32,7 +32,9 @@ #include #include +#include #include +#include #include #include #include Modified: head/sys/dev/extres/syscon/syscon_generic.c ============================================================================== --- head/sys/dev/extres/syscon/syscon_generic.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/dev/extres/syscon/syscon_generic.c Mon May 20 00:38:23 2019 (r347984) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/dev/firewire/firewire.c ============================================================================== --- head/sys/dev/firewire/firewire.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/dev/firewire/firewire.c Mon May 20 00:38:23 2019 (r347984) @@ -38,16 +38,15 @@ __FBSDID("$FreeBSD$"); #include -#include -#include - +#include +#include #include #include -#include +#include #include -#include +#include #include -#include +#include #include #include /* used by smbus and newbus */ Modified: head/sys/dev/firewire/fwohci.c ============================================================================== --- head/sys/dev/firewire/fwohci.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/dev/firewire/fwohci.c Mon May 20 00:38:23 2019 (r347984) @@ -39,6 +39,7 @@ #include #include +#include #include #include #include Modified: head/sys/dev/ichwd/ichwd.c ============================================================================== --- head/sys/dev/ichwd/ichwd.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/dev/ichwd/ichwd.c Mon May 20 00:38:23 2019 (r347984) @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include Modified: head/sys/dev/ida/ida_disk.c ============================================================================== --- head/sys/dev/ida/ida_disk.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/dev/ida/ida_disk.c Mon May 20 00:38:23 2019 (r347984) @@ -41,6 +41,8 @@ #include #include #include +#include +#include #include #include Modified: head/sys/dev/ida/ida_pci.c ============================================================================== --- head/sys/dev/ida/ida_pci.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/dev/ida/ida_pci.c Mon May 20 00:38:23 2019 (r347984) @@ -37,6 +37,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include Modified: head/sys/dev/iir/iir_ctrl.c ============================================================================== --- head/sys/dev/iir/iir_ctrl.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/dev/iir/iir_ctrl.c Mon May 20 00:38:23 2019 (r347984) @@ -46,16 +46,18 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include -#include -#include #include #include -#include #include +#include +#include +#include +#include +#include +#include #include #include +#include #include #include Modified: head/sys/dev/ioat/ioat.c ============================================================================== --- head/sys/dev/ioat/ioat.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/dev/ioat/ioat.c Mon May 20 00:38:23 2019 (r347984) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/dev/ipmi/ipmi.c ============================================================================== --- head/sys/dev/ipmi/ipmi.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/dev/ipmi/ipmi.c Mon May 20 00:38:23 2019 (r347984) @@ -34,9 +34,12 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include +#include #include #include #include Modified: head/sys/dev/ipmi/ipmi_opal.c ============================================================================== --- head/sys/dev/ipmi/ipmi_opal.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/dev/ipmi/ipmi_opal.c Mon May 20 00:38:23 2019 (r347984) @@ -28,8 +28,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include -#include +#include #include #include #include Modified: head/sys/dev/ips/ips.c ============================================================================== --- head/sys/dev/ips/ips.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/dev/ips/ips.c Mon May 20 00:38:23 2019 (r347984) @@ -30,10 +30,14 @@ #include __FBSDID("$FreeBSD$"); -#include -#include +#include +#include +#include #include #include + +#include +#include static d_open_t ips_open; static d_close_t ips_close; Modified: head/sys/dev/iscsi/icl_soft_proxy.c ============================================================================== --- head/sys/dev/iscsi/icl_soft_proxy.c Sun May 19 23:56:04 2019 (r347983) +++ head/sys/dev/iscsi/icl_soft_proxy.c Mon May 20 00:38:23 2019 (r347984) @@ -74,9 +74,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include +#include #include #include #include Modified: head/sys/dev/iscsi_initiator/iscsivar.h ============================================================================== --- head/sys/dev/iscsi_initiator/iscsivar.h Sun May 19 23:56:04 2019 (r347983) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Mon May 20 02:41:10 2019 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 36DD4159E0C4; Mon, 20 May 2019 02:41:10 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D164587D35; Mon, 20 May 2019 02:41:09 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8071A180FE; Mon, 20 May 2019 02:41:09 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4K2f9ab082234; Mon, 20 May 2019 02:41:09 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4K2f9Tt082233; Mon, 20 May 2019 02:41:09 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201905200241.x4K2f9Tt082233@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Mon, 20 May 2019 02:41:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r347985 - head/sys/dev/ksyms X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/dev/ksyms X-SVN-Commit-Revision: 347985 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D164587D35 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.955,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 02:41:10 -0000 Author: jhibbits Date: Mon May 20 02:41:09 2019 New Revision: 347985 URL: https://svnweb.freebsd.org/changeset/base/347985 Log: ksyms: Fixup symbols for powerpc in the kernel, not just modules Summary: PowerPC kernels are fully position independent, just like kernel modules. The same fixups that are done for modules therefore need to be done to the kernel, else symbol resolution in, e.g., DTrace, cannot resolve the kernel symbols, so only addresses in the kernel are printed, while kernel module symbols are printed. Test Plan: Run lockstat on powerpc64. Note symbols are resolved for kernel and modules. Reviewed By: markj Differential Revision: https://reviews.freebsd.org/D20316 Modified: head/sys/dev/ksyms/ksyms.c Modified: head/sys/dev/ksyms/ksyms.c ============================================================================== --- head/sys/dev/ksyms/ksyms.c Mon May 20 00:38:23 2019 (r347984) +++ head/sys/dev/ksyms/ksyms.c Mon May 20 02:41:09 2019 (r347985) @@ -191,6 +191,7 @@ ksyms_add(linker_file_t lf, void *arg) size_t len, numsyms, strsz, symsz; linker_symval_t symval; int error, i, nsyms; + bool fixup; buf = malloc(SYMBLKSZ, M_KSYMS, M_WAITOK); to = arg; @@ -201,6 +202,12 @@ ksyms_add(linker_file_t lf, void *arg) strsz = LINKER_STRTAB_GET(lf, &strtab); symsz = numsyms * sizeof(Elf_Sym); +#ifdef __powerpc__ + fixup = true; +#else + fixup = lf->id > 1; +#endif + while (symsz > 0) { len = min(SYMBLKSZ, symsz); bcopy(symtab, buf, len); @@ -214,7 +221,7 @@ ksyms_add(linker_file_t lf, void *arg) nsyms = len / sizeof(Elf_Sym); for (i = 0; i < nsyms; i++) { symp[i].st_name += to->to_stridx; - if (lf->id > 1 && LINKER_SYMBOL_VALUES(lf, + if (fixup && LINKER_SYMBOL_VALUES(lf, (c_linker_sym_t)&symtab[i], &symval) == 0) { symp[i].st_value = (uintptr_t)symval.value; } From owner-svn-src-head@freebsd.org Mon May 20 03:35:16 2019 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 DE424159FDD6; Mon, 20 May 2019 03:35:15 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6410C89DE7; Mon, 20 May 2019 03:35:15 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 00B5A18B34; Mon, 20 May 2019 03:35:15 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4K3ZEBl014539; Mon, 20 May 2019 03:35:14 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4K3ZE08014537; Mon, 20 May 2019 03:35:14 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201905200335.x4K3ZE08014537@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Mon, 20 May 2019 03:35:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r347986 - head/release/powerpc X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/release/powerpc X-SVN-Commit-Revision: 347986 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6410C89DE7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 03:35:16 -0000 Author: jhibbits Date: Mon May 20 03:35:14 2019 New Revision: 347986 URL: https://svnweb.freebsd.org/changeset/base/347986 Log: Update loader size on powerpc isos Summary: loader has grown to the point it's overflowing the existing 307200 bytes allocated to it in the HFS boot partition on the isos. Bump the space reservation up to 500k. Submitted by: Brandon Bergren MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D20301 Modified: head/release/powerpc/generate-hfs.sh head/release/powerpc/hfs-boot.bz2.uu Modified: head/release/powerpc/generate-hfs.sh ============================================================================== --- head/release/powerpc/generate-hfs.sh Mon May 20 02:41:09 2019 (r347985) +++ head/release/powerpc/generate-hfs.sh Mon May 20 03:35:14 2019 (r347986) @@ -13,7 +13,7 @@ # $FreeBSD$ HFS_SIZE=400 #Size in 2048-byte blocks of the produced image -LOADER_SIZE=300k +LOADER_SIZE=500k # Generate 800K HFS image OUTPUT_FILE=hfs-boot Modified: head/release/powerpc/hfs-boot.bz2.uu ============================================================================== --- head/release/powerpc/hfs-boot.bz2.uu Mon May 20 02:41:09 2019 (r347985) +++ head/release/powerpc/hfs-boot.bz2.uu Mon May 20 03:35:14 2019 (r347986) @@ -2,22 +2,22 @@ HFS boot filesystem created by generate-hfs.sh DO NOT EDIT $FreeBSD$ begin 644 hfs-boot.bz2 -M0EIH.3%!62936=#$Y.(``"___?_O_G)7!_Y]OW??5#]U_^!`0`,@1`!!``!@ -M(0!`3,`"L"4.2U"2(H9%/:*>TFDVU3RGZID'J&C3U,@T-&@`/1!H>IZC1D#( -M`D24TTRFC1D]*;$@!IZ@Q!IH-````#0&33":?J@<:&AH:`:`Q`T!D``&F@`: -M`9````PDI1J>0Q,H/1J&@```!D-`````T-``#SZHHR(+Y*Y9J*Z:4KK=T]W@ -M4RV\LG/;0XDPC7^`9DO3/3&*].462T,NO#AA9C,O\0!)^Q@@S6";2`!);?8(B6BR1(-7Q*8?>>HPQSBQE>M$A9K6FFW<:#6[D931J%U.F8*`0 -MD(,M80A(0;]K'X'SI]G(C)Y).AK_/0)D(2$$]JB$]]F').M4RF8O%[IHK[0O -MMQ?'>O[U8EM;>U",KY^*%FO9C05_435?.4*F[6AIL%&9C<9W&& -M[ZMP(TG!'*4Z>@6TM)0BS.D._O,WR9OJ728V48I;DD=8QGBE7J-&L^?=0JEF -MV2`B/)/D\)83IS@32(;!P,152U()0VGQH>2F$UC:M!D5`F#1W$\:KKDR[TQB -MN;N5B1;P!7:AG#1BP2%-Q$7I6QE,Y?NHIK_LR+HA]22HW0.8(^G4/X`Z@!Z6 -8#PQ(0))/`A(0.'VUG_\7D\*>4\HS2-`:`#0````>IH`>H!H-`$B23)H"8% +M!^DF@!ID`:-!H-``&@]3U-`#0]('``-!H:#0`:9!H9`TT``!D`&0&0`$DDIH +M-I-`]0#3U-!HT`'J-``````T-`:&(\F**;,&,E=GQ&[8L)7V[YZ^ZJR_.@4& +MU2XDPC+N!>EYZ/W&3#04SE<:P5525]GTO0!)[3!!B8)L`$@-R?/:TG2RBWBD +M0W-`28BS(@AF_JA3LX#"=D,6`8$FQH;$D(00T-/U)FN-$V.@D&`83,*F)5QB +M4FE2VQ0-(20@DF(-O(HKUH0H8CD,%=&+-^.M]B8!::Q1RF@RL&TP46*0U-B% +MB<50X!"$#S8DV:/)48JA*AC$4DI.CV$L!H)>35`M2ZH9QEA%Q`A30=L(-&8J4!RX`FT"S%(H51.1'GG@?L)8[-HK%K>HLXPST0\@K. +M.0JVBB]*R,L4EW?[61,+)QSE0`]`'!N]>P2IX`_7`^,`A"!])"$DG#MJ +,K_B[DBG"A(;3UI(( ` end From owner-svn-src-head@freebsd.org Mon May 20 04:50:15 2019 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 4CD0D15A1432; Mon, 20 May 2019 04:50:15 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2B7C8B9D5; Mon, 20 May 2019 04:50:14 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x4K4o9oL072253; Sun, 19 May 2019 21:50:09 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x4K4o9uI072252; Sun, 19 May 2019 21:50:09 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201905200450.x4K4o9uI072252@gndrsh.dnsmgr.net> Subject: Re: svn commit: r347982 - head/sys/net In-Reply-To: <201905192149.x4JLnvt5028495@repo.freebsd.org> To: "Alexander V. Chernikov" Date: Sun, 19 May 2019 21:50:09 -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-Rspamd-Queue-Id: A2B7C8B9D5 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.94 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.94)[-0.936,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 04:50:15 -0000 > Author: melifaro > Date: Sun May 19 21:49:56 2019 > New Revision: 347982 > URL: https://svnweb.freebsd.org/changeset/base/347982 > > Log: > Fix rt_ifa selection during loopback route insertion process. > Currently such routes are added with a link-level IFA, which is > plain wrong. Only after the insertion they get fixed by the special > link_rtrequest() ifa handler. This behaviour complicates routing code > and makes ifa selection more complex. > Streamline this process by explicitly moving link_rtrequest() logic > to the pre-insertion rt_getifa_fib() ifa selector. Avoid calling all > this logic in the loopback route case by explicitly specifying > proper rt_ifa inside the ifa_maintain_loopback_route().? > > MFC after: 2 weeks > Differential Revision: https://reviews.freebsd.org/D20076 I shall again state that from a routing protocol perspecitive and a POLA perspective having the kernel doing route maintanance of any kind is fundementally wrong. I still continue to stronly object to ifa_maintain_loopback_route code even being present in our kernel. Having these routes is a micro optimization at best, and cause issues when real and actual routing protocols are in use. Bruce Evans and myself have locally killed this code, and just about every router type person I show it to gets ill seeing it. Show many another system that does this and I might reconsider, but I have never ever seen one. > Modified: > head/sys/net/if.c > head/sys/net/route.c > > Modified: head/sys/net/if.c > ============================================================================== > --- head/sys/net/if.c Sun May 19 20:28:49 2019 (r347981) > +++ head/sys/net/if.c Sun May 19 21:49:56 2019 (r347982) > @@ -264,7 +264,6 @@ static void if_route(struct ifnet *, int flag, int fam > static int if_setflag(struct ifnet *, int, int, int *, int); > static int if_transmit(struct ifnet *ifp, struct mbuf *m); > static void if_unroute(struct ifnet *, int flag, int fam); > -static void link_rtrequest(int, struct rtentry *, struct rt_addrinfo *); > static int if_delmulti_locked(struct ifnet *, struct ifmultiaddr *, int); > static void do_link_state_change(void *, int); > static int if_getgroup(struct ifgroupreq *, struct ifnet *); > @@ -862,7 +861,6 @@ if_attach_internal(struct ifnet *ifp, int vmove, struc > sdl->sdl_type = ifp->if_type; > ifp->if_addr = ifa; > ifa->ifa_ifp = ifp; > - ifa->ifa_rtrequest = link_rtrequest; > ifa->ifa_addr = (struct sockaddr *)sdl; > sdl = (struct sockaddr_dl *)(socksize + (caddr_t)sdl); > ifa->ifa_netmask = (struct sockaddr *)sdl; > @@ -1892,6 +1890,7 @@ static int > ifa_maintain_loopback_route(int cmd, const char *otype, struct ifaddr *ifa, > struct sockaddr *ia) > { > + struct epoch_tracker et; > int error; > struct rt_addrinfo info; > struct sockaddr_dl null_sdl; > @@ -1902,6 +1901,16 @@ ifa_maintain_loopback_route(int cmd, const char *otype > bzero(&info, sizeof(info)); > if (cmd != RTM_DELETE) > info.rti_ifp = V_loif; > + if (cmd == RTM_ADD) { > + /* explicitly specify (loopback) ifa */ > + if (info.rti_ifp != NULL) { > + NET_EPOCH_ENTER(et); > + info.rti_ifa = ifaof_ifpforaddr(ifa->ifa_addr, info.rti_ifp); > + if (info.rti_ifa != NULL) > + ifa_ref(info.rti_ifa); > + NET_EPOCH_EXIT(et); > + } > + } > info.rti_flags = ifa->ifa_flags | RTF_HOST | RTF_STATIC | RTF_PINNED; > info.rti_info[RTAX_DST] = ia; > info.rti_info[RTAX_GATEWAY] = (struct sockaddr *)&null_sdl; > @@ -2208,39 +2217,6 @@ ifa_preferred(struct ifaddr *cur, struct ifaddr *next) > > return (cur->ifa_carp && (!next->ifa_carp || > ((*carp_master_p)(next) && !(*carp_master_p)(cur)))); > -} > - > -#include > - > -/* > - * Default action when installing a route with a Link Level gateway. > - * Lookup an appropriate real ifa to point to. > - * This should be moved to /sys/net/link.c eventually. > - */ > -static void > -link_rtrequest(int cmd, struct rtentry *rt, struct rt_addrinfo *info) > -{ > - struct epoch_tracker et; > - struct ifaddr *ifa, *oifa; > - struct sockaddr *dst; > - struct ifnet *ifp; > - > - if (cmd != RTM_ADD || ((ifa = rt->rt_ifa) == NULL) || > - ((ifp = ifa->ifa_ifp) == NULL) || ((dst = rt_key(rt)) == NULL)) > - return; > - NET_EPOCH_ENTER(et); > - ifa = ifaof_ifpforaddr(dst, ifp); > - if (ifa) { > - oifa = rt->rt_ifa; > - if (oifa != ifa) { > - ifa_free(oifa); > - ifa_ref(ifa); > - } > - rt->rt_ifa = ifa; > - if (ifa->ifa_rtrequest && ifa->ifa_rtrequest != link_rtrequest) > - ifa->ifa_rtrequest(cmd, rt, info); > - } > - NET_EPOCH_EXIT(et); > } > > struct sockaddr_dl * > > Modified: head/sys/net/route.c > ============================================================================== > --- head/sys/net/route.c Sun May 19 20:28:49 2019 (r347981) > +++ head/sys/net/route.c Sun May 19 21:49:56 2019 (r347982) > @@ -1276,12 +1276,14 @@ rt_notifydelete(struct rtentry *rt, struct rt_addrinfo > /* > * Look up rt_addrinfo for a specific fib. Note that if rti_ifa is defined, > * it will be referenced so the caller must free it. > + * > + * Assume basic consistency checks are executed by callers: > + * RTAX_DST exists, if RTF_GATEWAY is set, RTAX_GATEWAY exists as well. > */ > int > rt_getifa_fib(struct rt_addrinfo *info, u_int fibnum) > { > struct epoch_tracker et; > - struct ifaddr *ifa; > int needref, error; > > /* > @@ -1291,21 +1293,54 @@ rt_getifa_fib(struct rt_addrinfo *info, u_int fibnum) > error = 0; > needref = (info->rti_ifa == NULL); > NET_EPOCH_ENTER(et); > + > + /* If we have interface specified by the ifindex in the address, use it */ > if (info->rti_ifp == NULL && ifpaddr != NULL && > - ifpaddr->sa_family == AF_LINK && > - (ifa = ifa_ifwithnet(ifpaddr, 0, fibnum)) != NULL) { > - info->rti_ifp = ifa->ifa_ifp; > + ifpaddr->sa_family == AF_LINK) { > + const struct sockaddr_dl *sdl = (const struct sockaddr_dl *)ifpaddr; > + if (sdl->sdl_index != 0) > + info->rti_ifp = ifnet_byindex_locked(sdl->sdl_index); > } > + /* > + * If we have source address specified, try to find it > + * TODO: avoid enumerating all ifas on all interfaces. > + */ > if (info->rti_ifa == NULL && ifaaddr != NULL) > info->rti_ifa = ifa_ifwithaddr(ifaaddr); > if (info->rti_ifa == NULL) { > struct sockaddr *sa; > > - sa = ifaaddr != NULL ? ifaaddr : > - (gateway != NULL ? gateway : dst); > - if (sa != NULL && info->rti_ifp != NULL) > + /* > + * Most common use case for the userland-supplied routes. > + * > + * Choose sockaddr to select ifa. > + * -- if ifp is set -- > + * Order of preference: > + * 1) IFA address > + * 2) gateway address > + * Note: for interface routes link-level gateway address > + * is specified to indicate the interface index without > + * specifying RTF_GATEWAY. In this case, ignore gateway > + * Note: gateway AF may be different from dst AF. In this case, > + * ignore gateway > + * 3) final destination. > + * 4) if all of these fails, try to get at least link-level ifa. > + * -- else -- > + * try to lookup gateway or dst in the routing table to get ifa > + */ > + if (info->rti_info[RTAX_IFA] != NULL) > + sa = info->rti_info[RTAX_IFA]; > + else if ((info->rti_flags & RTF_GATEWAY) != 0 && > + gateway->sa_family == dst->sa_family) > + sa = gateway; > + else > + sa = dst; > + if (info->rti_ifp != NULL) { > info->rti_ifa = ifaof_ifpforaddr(sa, info->rti_ifp); > - else if (dst != NULL && gateway != NULL) > + /* Case 4 */ > + if (info->rti_ifa == NULL && gateway != NULL) > + info->rti_ifa = ifaof_ifpforaddr(gateway, info->rti_ifp); > + } else if (dst != NULL && gateway != NULL) > info->rti_ifa = ifa_ifwithroute(flags, dst, gateway, > fibnum); > else if (sa != NULL) > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Mon May 20 05:00:09 2019 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 4FE6815A1831; Mon, 20 May 2019 05:00:09 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A62F98BE84; Mon, 20 May 2019 05:00:08 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x4K506kU072318; Sun, 19 May 2019 22:00:06 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x4K506YI072317; Sun, 19 May 2019 22:00:06 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201905200500.x4K506YI072317@gndrsh.dnsmgr.net> Subject: Re: svn commit: r347980 - head/lib/libsecureboot/openpgp In-Reply-To: <201905192024.x4JKOIZe086856@repo.freebsd.org> To: "Simon J. Gerraty" Date: Sun, 19 May 2019 22:00:06 -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-Rspamd-Queue-Id: A62F98BE84 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.93 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.93)[-0.933,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 05:00:09 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: sjg > Date: Sun May 19 20:24:17 2019 > New Revision: 347980 > URL: https://svnweb.freebsd.org/changeset/base/347980 > > Log: > load_key_buf do not free data from dearmor > > The data returned by dearmor is referenced by the key > leave it alone! > > Reviewed by: stevek > MFC after: 2 days This is an exception below the standard minimal limit during a code freeze, is there some reason for it? The next build should not be started before 3 days. > Modified: > head/lib/libsecureboot/openpgp/opgp_key.c > head/lib/libsecureboot/openpgp/opgp_sig.c > > Modified: head/lib/libsecureboot/openpgp/opgp_key.c > ============================================================================== > --- head/lib/libsecureboot/openpgp/opgp_key.c Sun May 19 20:13:55 2019 (r347979) > +++ head/lib/libsecureboot/openpgp/opgp_key.c Sun May 19 20:24:17 2019 (r347980) > @@ -168,6 +168,7 @@ load_key_buf(unsigned char *buf, size_t nbytes) > initialize(); > > if (!(buf[0] & OPENPGP_TAG_ISTAG)) { > + /* Note: we do *not* free data */ > data = dearmor((char *)buf, nbytes, &nbytes); > ptr = data; > } else > @@ -190,7 +191,6 @@ load_key_buf(unsigned char *buf, size_t nbytes) > } > } > } > - free(data); > return (key); > } > > @@ -209,8 +209,10 @@ openpgp_trust_add(OpenPGP_key *key) > > LIST_INIT(&trust_list); > } > - if (key) > + if (key) { > + DEBUG_PRINTF(2, ("openpgp_trust_add(%s)\n", key->id)); > LIST_INSERT_HEAD(&trust_list, key, entries); > + } > } > > /** > @@ -296,6 +298,7 @@ load_key_id(const char *keyID) > if (!key) > key = load_trusted_key_id(keyID); > #endif > + DEBUG_PRINTF(2, ("load_key_id(%s): %s\n", keyID, key ? "found" : "nope")); > return (key); > } > > > Modified: head/lib/libsecureboot/openpgp/opgp_sig.c > ============================================================================== > --- head/lib/libsecureboot/openpgp/opgp_sig.c Sun May 19 20:13:55 2019 (r347979) > +++ head/lib/libsecureboot/openpgp/opgp_sig.c Sun May 19 20:24:17 2019 (r347980) > @@ -318,6 +318,7 @@ openpgp_verify(const char *filename, > sdata = ddata = dearmor((char *)sdata, sbytes, &sbytes); > ptr = sdata; > rc = decode_packet(2, &ptr, sbytes, (decoder_t)decode_sig, sig); > + DEBUG_PRINTF(2, ("rc=%d keyID=%s\n", rc, sig->key_id ? sig->key_id : "?")); > if (rc == 0 && sig->key_id) { > key = load_key_id(sig->key_id); > if (!key) { > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Mon May 20 05:45:11 2019 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 7621115A29C0; Mon, 20 May 2019 05:45:11 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: from mail-ed1-f68.google.com (mail-ed1-f68.google.com [209.85.208.68]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E8FDA8D3DC; Mon, 20 May 2019 05:45:10 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: by mail-ed1-f68.google.com with SMTP id l25so21906095eda.9; Sun, 19 May 2019 22:45:10 -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=IYRV/2x4YbM0gkr71oK0bFW6/71kU27IFp9z2/Wg8dw=; b=msd0nrwdAmAgSZ1bGBRcPEV6xLIbbkq6I4v/iOwkkp0yss8JtQ1oVa8hUSQ24QTFyo 7i+km7Fas4/mEvxsVDrOhw7OoC69WePC2TG6NeHlSsKgA2mdML9BqrY0kBA4zdW61jHf Ov+/njw+1RfQMlJo6ODGcuP4l7s7BClmWkpViGudMROuZPEHznt2RdGrMc3zYWL3ICX6 /SVYMd0PQyjhQIoRVuilUzABkhB/chfXZ715mY4ftiH8xQxbo7zcaPDRpFCW1kuxIWmM TWBeUK7Jaw/qexZhjywg+KQuqH38qVD1TaaLpJ6bm0w2FVX+rBwF7yOrMQ4XPyZuyQq0 VmlQ== X-Gm-Message-State: APjAAAWuHs3egQ7ogA683C11IIv8YWKnp3129mnb15LGwZrW3zRtppdU 1vqfR4182WdV20OoO4iNHv6fmPfnjCBdkvGIiC6ZJ3vy X-Google-Smtp-Source: APXvYqzmfEp5NAYvybmrCF31+3Yl0zVon6yEoE5VAdAKjLbUUmPM4MwwNqrR1m76kZj7jx4qMIqDrmdD8zdgjxhRdqo= X-Received: by 2002:a17:906:90d6:: with SMTP id v22mr46216878ejw.183.1558330655230; Sun, 19 May 2019 22:37:35 -0700 (PDT) MIME-Version: 1.0 References: <201905200038.x4K0cNoZ019920@repo.freebsd.org> In-Reply-To: <201905200038.x4K0cNoZ019920@repo.freebsd.org> From: Antoine Brodin Date: Mon, 20 May 2019 07:37:23 +0200 Message-ID: Subject: Re: svn commit: r347984 - in head/sys: amd64/vmm/io arm/allwinner arm/allwinner/a10 arm/allwinner/clkng arm/arm arm/broadcom/bcm2835 arm/freescale/imx arm/mv arm/mv/armada arm/nvidia arm/nvidia/tegra12... To: Conrad Meyer Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: E8FDA8D3DC X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.93 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.93)[-0.932,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 05:45:11 -0000 On Mon, May 20, 2019 at 2:38 AM Conrad Meyer wrote: > Author: cem > Date: Mon May 20 00:38:23 2019 > New Revision: 347984 > URL: https://svnweb.freebsd.org/changeset/base/347984 > > Log: > Extract eventfilter declarations to sys/_eventfilter.h > > This allows replacing "sys/eventfilter.h" includes with "sys/_eventfilter.h" > in other header files (e.g., sys/{bus,conf,cpu}.h) and reduces header > pollution substantially. > > EVENTHANDLER_DECLARE and EVENTHANDLER_LIST_DECLAREs were moved out of .c > files into appropriate headers (e.g., sys/proc.h, powernv/opal.h). > > As a side effect of reduced header pollution, many .c files and headers no > longer contain needed definitions. The remainder of the patch addresses > adding appropriate includes to fix those files. > > LOCK_DEBUG and LOCK_FILE_LINE_ARG are moved to sys/_lock.h, as required by > sys/mutex.h since r326106 (but silently protected by header pollution prior > to this change). > > No functional change (intended). Of course, any out of tree modules that > relied on header pollution for sys/eventhandler.h, sys/lock.h, or > sys/mutex.h inclusion need to be fixed. __FreeBSD_version has been bumped. Hi, Why request an exp-run and commit the patch before the exp-run has finished? Cheers, Antoine From owner-svn-src-head@freebsd.org Mon May 20 07:55:30 2019 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 1F36415A511A; Mon, 20 May 2019 07:55:30 +0000 (UTC) (envelope-from tuexen@fh-muenster.de) Received: from drew.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.franken.de", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 37BE76A17E; Mon, 20 May 2019 07:55:28 +0000 (UTC) (envelope-from tuexen@fh-muenster.de) Received: from [192.168.1.2] (p57BB409D.dip0.t-ipconnect.de [87.187.64.157]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTPSA id 1437B721E280C; Mon, 20 May 2019 09:55:19 +0200 (CEST) From: Michael Tuexen Message-Id: <3214C1FD-B4C8-4A2F-8726-06D5B8878C79@fh-muenster.de> Content-Type: multipart/signed; boundary="Apple-Mail=_FB701B7B-6FE3-4718-A8B7-D128986CE440"; protocol="application/pkcs7-signature"; micalg=sha-256 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: svn commit: r347984 - in head/sys: amd64/vmm/io arm/allwinner arm/allwinner/a10 arm/allwinner/clkng arm/arm arm/broadcom/bcm2835 arm/freescale/imx arm/mv arm/mv/armada arm/nvidia arm/nvidia/tegra12... Date: Mon, 20 May 2019 09:55:16 +0200 In-Reply-To: <201905200038.x4K0cNoZ019920@repo.freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Conrad Meyer References: <201905200038.x4K0cNoZ019920@repo.freebsd.org> X-Mailer: Apple Mail (2.3445.104.11) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail-n.franken.de X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 07:55:30 -0000 --Apple-Mail=_FB701B7B-6FE3-4718-A8B7-D128986CE440 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On 20. May 2019, at 02:38, Conrad Meyer wrote: >=20 > Author: cem > Date: Mon May 20 00:38:23 2019 > New Revision: 347984 > URL: https://svnweb.freebsd.org/changeset/base/347984 >=20 > Log: > Extract eventfilter declarations to sys/_eventfilter.h >=20 > This allows replacing "sys/eventfilter.h" includes with = "sys/_eventfilter.h" > in other header files (e.g., sys/{bus,conf,cpu}.h) and reduces header > pollution substantially. >=20 > EVENTHANDLER_DECLARE and EVENTHANDLER_LIST_DECLAREs were moved out of = .c > files into appropriate headers (e.g., sys/proc.h, powernv/opal.h). >=20 > As a side effect of reduced header pollution, many .c files and = headers no > longer contain needed definitions. The remainder of the patch = addresses > adding appropriate includes to fix those files. >=20 > LOCK_DEBUG and LOCK_FILE_LINE_ARG are moved to sys/_lock.h, as = required by > sys/mutex.h since r326106 (but silently protected by header pollution = prior > to this change). >=20 > No functional change (intended). Of course, any out of tree modules = that > relied on header pollution for sys/eventhandler.h, sys/lock.h, or > sys/mutex.h inclusion need to be fixed. __FreeBSD_version has been = bumped. This breaks compiling kernels having the options options KCOV # Kernel Coverage Sanitizer options COVERAGE enabled. sys/kern/kern_kcov.c also needs to include sys/eventhandler.h Best regards Michael >=20 > Added: > head/sys/sys/_eventhandler.h (contents, props changed) > Modified: > head/sys/amd64/vmm/io/iommu.c > head/sys/arm/allwinner/a10/a10_intc.c > head/sys/arm/allwinner/a10_dmac.c > head/sys/arm/allwinner/a31_dmac.c > head/sys/arm/allwinner/aw_ccu.c > head/sys/arm/allwinner/aw_reset.c > head/sys/arm/allwinner/aw_rsb.c > head/sys/arm/allwinner/aw_spi.c > head/sys/arm/allwinner/aw_thermal.c > head/sys/arm/allwinner/aw_wdog.c > head/sys/arm/allwinner/clkng/aw_ccung.c > head/sys/arm/arm/machdep.c > head/sys/arm/arm/pl190.c > head/sys/arm/broadcom/bcm2835/bcm2835_rng.c > head/sys/arm/broadcom/bcm2835/bcm2835_wdog.c > head/sys/arm/broadcom/bcm2835/bcm2836.c > head/sys/arm/freescale/imx/imx_wdog.c > head/sys/arm/mv/armada/thermal.c > head/sys/arm/mv/armada/wdt.c > head/sys/arm/mv/mv_spi.c > head/sys/arm/mv/timer.c > head/sys/arm/nvidia/tegra124/tegra124_machdep.c > head/sys/arm/nvidia/tegra124/tegra124_pmc.c > head/sys/arm/nvidia/tegra_xhci.c > head/sys/arm/ti/ti_pruss.c > head/sys/arm/ti/ti_wdt.c > head/sys/arm/versatile/versatile_pci.c > head/sys/arm/versatile/versatile_sic.c > head/sys/arm64/arm64/gicv3_its.c > head/sys/arm64/arm64/machdep.c > head/sys/arm64/coresight/coresight.c > head/sys/arm64/rockchip/clk/rk_cru.c > head/sys/cam/cam_periph.h > head/sys/cam/ctl/ctl_ha.c > head/sys/cddl/compat/opensolaris/kern/opensolaris.c > head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c > head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c > head/sys/crypto/aesni/aesni.c > head/sys/crypto/armv8/armv8_crypto.c > head/sys/crypto/blake2/blake2_cryptodev.c > head/sys/crypto/ccp/ccp.c > head/sys/crypto/ccp/ccp_hardware.c > head/sys/ddb/db_command.c > head/sys/dev/acpi_support/acpi_panasonic.c > head/sys/dev/acpica/acpi.c > head/sys/dev/acpica/acpi_lid.c > head/sys/dev/acpica/acpi_thermal.c > head/sys/dev/acpica/acpi_video.c > head/sys/dev/acpica/acpivar.h > head/sys/dev/adb/adb_kbd.c > head/sys/dev/adb/adb_mouse.c > head/sys/dev/amdsbwd/amdsbwd.c > head/sys/dev/atkbdc/psm.c > head/sys/dev/cardbus/cardbus.c > head/sys/dev/cmx/cmx.c > head/sys/dev/coretemp/coretemp.c > head/sys/dev/cxgbe/cxgbei/cxgbei.c > head/sys/dev/cxgbe/cxgbei/icl_cxgbei.c > head/sys/dev/cxgbe/tom/t4_tls.c > head/sys/dev/dcons/dcons_crom.c > head/sys/dev/dcons/dcons_os.c > head/sys/dev/dcons/dcons_os.h > head/sys/dev/evdev/evdev_private.h > head/sys/dev/extres/syscon/syscon_generic.c > head/sys/dev/firewire/firewire.c > head/sys/dev/firewire/fwohci.c > head/sys/dev/ichwd/ichwd.c > head/sys/dev/ida/ida_disk.c > head/sys/dev/ida/ida_pci.c > head/sys/dev/iir/iir_ctrl.c > head/sys/dev/ioat/ioat.c > head/sys/dev/ipmi/ipmi.c > head/sys/dev/ipmi/ipmi_opal.c > head/sys/dev/ips/ips.c > head/sys/dev/iscsi/icl_soft_proxy.c > head/sys/dev/iscsi_initiator/iscsivar.h > head/sys/dev/iwm/if_iwm_notif_wait.c > head/sys/dev/led/led.c > head/sys/dev/liquidio/lio_bsd.h > head/sys/dev/mfi/mfi_disk.c > head/sys/dev/mfi/mfi_pci.c > head/sys/dev/mfi/mfi_syspd.c > head/sys/dev/mlx/mlxvar.h > head/sys/dev/mmc/host/dwmmc.c > head/sys/dev/mpr/mprvar.h > head/sys/dev/mps/mpsvar.h > head/sys/dev/mrsas/mrsas.h > head/sys/dev/nmdm/nmdm.c > head/sys/dev/ntb/if_ntb/if_ntb.c > head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c > head/sys/dev/ow/ow.c > head/sys/dev/pccard/pccard.c > head/sys/dev/pci/pci.c > head/sys/dev/pci/pci_iov.c > head/sys/dev/pci/pci_pci.c > head/sys/dev/pci/pcivar.h > head/sys/dev/scc/scc_core.c > head/sys/dev/scc/scc_dev_quicc.c > head/sys/dev/scc/scc_dev_sab82532.c > head/sys/dev/scc/scc_dev_z8530.c > head/sys/dev/smartpqi/smartpqi_includes.h > head/sys/dev/sound/pcm/sound.h > head/sys/dev/tws/tws.h > head/sys/dev/usb/net/if_cdce.c > head/sys/dev/usb/net/if_usie.c > head/sys/dev/usb/net/uhso.c > head/sys/dev/usb/serial/u3g.c > head/sys/dev/usb/usb_device.c > head/sys/dev/usb/usbdi.h > head/sys/dev/usb/wlan/if_run.c > head/sys/dev/viawd/viawd.c > head/sys/dev/vkbd/vkbd.c > head/sys/dev/vmware/vmci/vmci.c > head/sys/dev/vt/vt_cpulogos.c > head/sys/dev/vt/vt_sysmouse.c > head/sys/dev/watchdog/watchdog.c > head/sys/dev/xdma/xdma.c > head/sys/dev/xdma/xdma_bank.c > head/sys/dev/xdma/xdma_bio.c > head/sys/dev/xdma/xdma_mbuf.c > head/sys/dev/xdma/xdma_queue.c > head/sys/dev/xdma/xdma_sg.c > head/sys/dev/xen/console/xen_console.c > head/sys/dev/xen/debug/debug.c > head/sys/fs/devfs/devfs_vnops.c > head/sys/i386/i386/elan-mmcr.c > head/sys/i386/i386/geode.c > head/sys/i386/i386/longrun.c > head/sys/kern/bus_if.m > head/sys/kern/init_main.c > head/sys/kern/kern_clock.c > head/sys/kern/kern_exec.c > head/sys/kern/kern_exit.c > head/sys/kern/kern_fork.c > head/sys/kern/kern_proc.c > head/sys/kern/subr_bus_dma.c > head/sys/kern/subr_intr.c > head/sys/kern/subr_power.c > head/sys/kern/tty_tty.c > head/sys/kern/vfs_mountroot.c > head/sys/mips/atheros/ar71xx_machdep.c > head/sys/mips/atheros/ar71xx_wdog.c > head/sys/net/bpf.c > head/sys/net/bpf.h > head/sys/net/bpf_buffer.c > head/sys/net/ethernet.h > head/sys/net/if.c > head/sys/net/if_clone.h > head/sys/net/if_llatbl.c > head/sys/net/if_llatbl.h > head/sys/net/if_tuntap.c > head/sys/net/if_var.h > head/sys/net/if_vlan_var.h > head/sys/netinet/if_ether.c > head/sys/netinet/tcp_offload.c > head/sys/netinet/toecore.c > head/sys/netinet/toecore.h > head/sys/netinet6/nd6.c > head/sys/netinet6/nd6_nbr.c > head/sys/powerpc/ofw/ofw_machdep.c > head/sys/powerpc/powermac/cpcht.c > head/sys/powerpc/powermac/cuda.c > head/sys/powerpc/powermac/pmu.c > head/sys/powerpc/powermac/smu.c > head/sys/powerpc/powermac/vcoregpio.c > head/sys/powerpc/powernv/opal.h > head/sys/powerpc/powernv/opal_async.c > head/sys/powerpc/powernv/opal_console.c > head/sys/powerpc/powernv/opal_dev.c > head/sys/powerpc/powernv/opal_flash.c > head/sys/powerpc/powernv/opal_sensor.c > head/sys/powerpc/powernv/xive.c > head/sys/powerpc/powerpc/cpu.c > head/sys/powerpc/powerpc/openpic.c > head/sys/powerpc/ps3/ps3bus.c > head/sys/powerpc/pseries/rtas_dev.c > head/sys/powerpc/pseries/xics.c > head/sys/riscv/riscv/intr_machdep.c > head/sys/riscv/riscv/machdep.c > head/sys/riscv/riscv/mp_machdep.c > head/sys/security/audit/audit.c > head/sys/security/audit/audit_trigger.c > head/sys/sys/_lock.h > head/sys/sys/bus.h > head/sys/sys/conf.h > head/sys/sys/cpu.h > head/sys/sys/eventhandler.h > head/sys/sys/interrupt.h > head/sys/sys/lock.h > head/sys/sys/param.h > head/sys/sys/pcpu.h > head/sys/sys/power.h > head/sys/sys/proc.h > head/sys/sys/watchdog.h > head/sys/vm/swap_pager.c > head/sys/x86/acpica/OsdEnvironment.c > head/sys/x86/cpufreq/smist.c > head/sys/x86/iommu/intel_drv.c > head/sys/x86/iommu/intel_intrmap.c > head/sys/x86/iommu/intel_quirks.c > head/sys/x86/x86/tsc.c >=20 > Modified: head/sys/amd64/vmm/io/iommu.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/amd64/vmm/io/iommu.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/amd64/vmm/io/iommu.c Mon May 20 00:38:23 2019 = (r347984) > @@ -32,10 +32,10 @@ > __FBSDID("$FreeBSD$"); >=20 > #include > -#include > -#include > #include > +#include > #include > +#include >=20 > #include > #include >=20 > Modified: head/sys/arm/allwinner/a10/a10_intc.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/arm/allwinner/a10/a10_intc.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/arm/allwinner/a10/a10_intc.c Mon May 20 00:38:23 2019 = (r347984) > @@ -30,11 +30,12 @@ __FBSDID("$FreeBSD$"); >=20 > #include "opt_platform.h" >=20 > -#include > +#include > #include > #include > #include > #include > +#include > #include > #include > #include >=20 > Modified: head/sys/arm/allwinner/a10_dmac.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/arm/allwinner/a10_dmac.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/arm/allwinner/a10_dmac.c Mon May 20 00:38:23 2019 = (r347984) > @@ -38,7 +38,9 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > +#include >=20 > #include >=20 >=20 > Modified: head/sys/arm/allwinner/a31_dmac.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/arm/allwinner/a31_dmac.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/arm/allwinner/a31_dmac.c Mon May 20 00:38:23 2019 = (r347984) > @@ -38,7 +38,9 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > +#include > #include >=20 > #include >=20 > Modified: head/sys/arm/allwinner/aw_ccu.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/arm/allwinner/aw_ccu.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/arm/allwinner/aw_ccu.c Mon May 20 00:38:23 2019 = (r347984) > @@ -38,7 +38,9 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > +#include > #include >=20 > #include >=20 > Modified: head/sys/arm/allwinner/aw_reset.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/arm/allwinner/aw_reset.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/arm/allwinner/aw_reset.c Mon May 20 00:38:23 2019 = (r347984) > @@ -38,7 +38,9 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > +#include > #include >=20 > #include >=20 > Modified: head/sys/arm/allwinner/aw_rsb.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/arm/allwinner/aw_rsb.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/arm/allwinner/aw_rsb.c Mon May 20 00:38:23 2019 = (r347984) > @@ -38,7 +38,9 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > +#include > #include >=20 > #include >=20 > Modified: head/sys/arm/allwinner/aw_spi.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/arm/allwinner/aw_spi.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/arm/allwinner/aw_spi.c Mon May 20 00:38:23 2019 = (r347984) > @@ -32,7 +32,9 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > +#include > #include > #include > #include >=20 > Modified: head/sys/arm/allwinner/aw_thermal.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/arm/allwinner/aw_thermal.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/arm/allwinner/aw_thermal.c Mon May 20 00:38:23 2019 = (r347984) > @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); >=20 > #include > #include > +#include > #include > #include > #include >=20 > Modified: head/sys/arm/allwinner/aw_wdog.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/arm/allwinner/aw_wdog.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/arm/allwinner/aw_wdog.c Mon May 20 00:38:23 2019 = (r347984) > @@ -28,6 +28,7 @@ > __FBSDID("$FreeBSD$"); >=20 > #include > +#include > #include > #include > #include >=20 > Modified: head/sys/arm/allwinner/clkng/aw_ccung.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/arm/allwinner/clkng/aw_ccung.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/arm/allwinner/clkng/aw_ccung.c Mon May 20 00:38:23 2019 = (r347984) > @@ -39,7 +39,9 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > +#include > #include >=20 > #include >=20 > Modified: head/sys/arm/arm/machdep.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/arm/arm/machdep.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/arm/arm/machdep.c Mon May 20 00:38:23 2019 = (r347984) > @@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include >=20 > Modified: head/sys/arm/arm/pl190.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/arm/arm/pl190.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/arm/arm/pl190.c Mon May 20 00:38:23 2019 = (r347984) > @@ -34,7 +34,9 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > +#include > #include > #include > #include >=20 > Modified: head/sys/arm/broadcom/bcm2835/bcm2835_rng.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/arm/broadcom/bcm2835/bcm2835_rng.c Sun May 19 = 23:56:04 2019 (r347983) > +++ head/sys/arm/broadcom/bcm2835/bcm2835_rng.c Mon May 20 = 00:38:23 2019 (r347984) > @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); >=20 > #include > #include > +#include > #include > #include > #include >=20 > Modified: head/sys/arm/broadcom/bcm2835/bcm2835_wdog.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/arm/broadcom/bcm2835/bcm2835_wdog.c Sun May 19 = 23:56:04 2019 (r347983) > +++ head/sys/arm/broadcom/bcm2835/bcm2835_wdog.c Mon May 20 = 00:38:23 2019 (r347984) > @@ -29,12 +29,15 @@ > __FBSDID("$FreeBSD$"); >=20 > #include > -#include > -#include > #include > +#include > #include > +#include > #include > +#include > #include > +#include > +#include >=20 > #include > #include >=20 > Modified: head/sys/arm/broadcom/bcm2835/bcm2836.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/arm/broadcom/bcm2835/bcm2836.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/arm/broadcom/bcm2835/bcm2836.c Mon May 20 00:38:23 2019 = (r347984) > @@ -36,7 +36,9 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > +#include > #include > #include > #ifdef SMP >=20 > Modified: head/sys/arm/freescale/imx/imx_wdog.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/arm/freescale/imx/imx_wdog.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/arm/freescale/imx/imx_wdog.c Mon May 20 00:38:23 2019 = (r347984) > @@ -33,13 +33,16 @@ > __FBSDID("$FreeBSD$"); >=20 > #include > -#include > +#include > +#include > #include > +#include > #include > -#include > -#include > +#include > #include > #include > +#include > +#include > #include >=20 > #include >=20 > Modified: head/sys/arm/mv/armada/thermal.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/arm/mv/armada/thermal.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/arm/mv/armada/thermal.c Mon May 20 00:38:23 2019 = (r347984) > @@ -33,9 +33,10 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > -#include > #include > +#include > #include > +#include > #include >=20 > #include >=20 > Modified: head/sys/arm/mv/armada/wdt.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/arm/mv/armada/wdt.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/arm/mv/armada/wdt.c Mon May 20 00:38:23 2019 = (r347984) > @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include >=20 > Modified: head/sys/arm/mv/mv_spi.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/arm/mv/mv_spi.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/arm/mv/mv_spi.c Mon May 20 00:38:23 2019 = (r347984) > @@ -32,7 +32,9 @@ __FBSDID("$FreeBSD$"); > #include >=20 > #include > +#include > #include > +#include > #include >=20 > #include >=20 > Modified: head/sys/arm/mv/timer.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/arm/mv/timer.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/arm/mv/timer.c Mon May 20 00:38:23 2019 = (r347984) > @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include >=20 > Modified: head/sys/arm/nvidia/tegra124/tegra124_machdep.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/arm/nvidia/tegra124/tegra124_machdep.c Sun May 19 = 23:56:04 2019 (r347983) > +++ head/sys/arm/nvidia/tegra124/tegra124_machdep.c Mon May 20 = 00:38:23 2019 (r347984) > @@ -30,10 +30,11 @@ > __FBSDID("$FreeBSD$"); >=20 > #include > -#include > #include > -#include > #include > +#include > +#include > +#include >=20 > #include >=20 >=20 > Modified: head/sys/arm/nvidia/tegra124/tegra124_pmc.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/arm/nvidia/tegra124/tegra124_pmc.c Sun May 19 = 23:56:04 2019 (r347983) > +++ head/sys/arm/nvidia/tegra124/tegra124_pmc.c Mon May 20 = 00:38:23 2019 (r347984) > @@ -27,12 +27,14 @@ > */ >=20 > #include > -#include > #include > #include > -#include > +#include > #include > +#include > +#include > #include > +#include >=20 > #include >=20 >=20 > Modified: head/sys/arm/nvidia/tegra_xhci.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/arm/nvidia/tegra_xhci.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/arm/nvidia/tegra_xhci.c Mon May 20 00:38:23 2019 = (r347984) > @@ -34,15 +34,17 @@ __FBSDID("$FreeBSD$"); > #include "opt_platform.h" >=20 > #include > -#include > -#include > -#include > -#include > #include > #include > #include > #include > +#include > +#include > +#include > +#include > +#include > #include > +#include >=20 > #include > #include >=20 > Modified: head/sys/arm/ti/ti_pruss.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/arm/ti/ti_pruss.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/arm/ti/ti_pruss.c Mon May 20 00:38:23 2019 = (r347984) > @@ -38,8 +38,10 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > +#include > #include > #include > #include >=20 > Modified: head/sys/arm/ti/ti_wdt.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/arm/ti/ti_wdt.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/arm/ti/ti_wdt.c Mon May 20 00:38:23 2019 = (r347984) > @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include >=20 > Modified: head/sys/arm/versatile/versatile_pci.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/arm/versatile/versatile_pci.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/arm/versatile/versatile_pci.c Mon May 20 00:38:23 2019 = (r347984) > @@ -33,8 +33,10 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > -#include > +#include > #include > +#include > +#include > #include > #include >=20 >=20 > Modified: head/sys/arm/versatile/versatile_sic.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/arm/versatile/versatile_sic.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/arm/versatile/versatile_sic.c Mon May 20 00:38:23 2019 = (r347984) > @@ -34,7 +34,9 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > +#include > #include > #include > #include >=20 > Modified: head/sys/arm64/arm64/gicv3_its.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/arm64/arm64/gicv3_its.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/arm64/arm64/gicv3_its.c Mon May 20 00:38:23 2019 = (r347984) > @@ -42,8 +42,10 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > +#include > #include > #include > #include >=20 > Modified: head/sys/arm64/arm64/machdep.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/arm64/arm64/machdep.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/arm64/arm64/machdep.c Mon May 20 00:38:23 2019 = (r347984) > @@ -42,8 +42,9 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > -#include =20 > +#include > #include > +#include > #include > #include > #include >=20 > Modified: head/sys/arm64/coresight/coresight.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/arm64/coresight/coresight.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/arm64/coresight/coresight.c Mon May 20 00:38:23 2019 = (r347984) > @@ -36,7 +36,9 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > +#include > #include >=20 > #include >=20 > Modified: head/sys/arm64/rockchip/clk/rk_cru.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/arm64/rockchip/clk/rk_cru.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/arm64/rockchip/clk/rk_cru.c Mon May 20 00:38:23 2019 = (r347984) > @@ -40,7 +40,9 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > +#include > #include >=20 > #include >=20 > Modified: head/sys/cam/cam_periph.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/cam/cam_periph.h Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/cam/cam_periph.h Mon May 20 00:38:23 2019 = (r347984) > @@ -37,6 +37,8 @@ > #include >=20 > #ifdef _KERNEL > +#include > +#include > #include > #include >=20 >=20 > Modified: head/sys/cam/ctl/ctl_ha.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/cam/ctl/ctl_ha.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/cam/ctl/ctl_ha.c Mon May 20 00:38:23 2019 = (r347984) > @@ -30,23 +30,23 @@ > __FBSDID("$FreeBSD$"); >=20 > #include > -#include > +#include > +#include > +#include > #include > #include > -#include > #include > #include > -#include > -#include > -#include > #include > #include > +#include > +#include > #include > -#include > #include > -#include > #include > #include > +#include > +#include > #include > #include > #include >=20 > Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris.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/cddl/compat/opensolaris/kern/opensolaris.c Sun May = 19 23:56:04 2019 (r347983) > +++ head/sys/cddl/compat/opensolaris/kern/opensolaris.c Mon May = 20 00:38:23 2019 (r347984) > @@ -27,7 +27,7 @@ > */ >=20 > #include > -#include > +#include > #include > #include > #include >=20 > Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.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/contrib/ipfilter/netinet/ip_fil_freebsd.c Sun May = 19 23:56:04 2019 (r347983) > +++ head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Mon May = 20 00:38:23 2019 (r347984) > @@ -25,6 +25,7 @@ static const char rcsid[] =3D "@(#)$Id$"; > # include "opt_random_ip_id.h" > #endif > #include > +#include > #include > #include > #include >=20 > Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.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/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c Sun May = 19 23:56:04 2019 (r347983) > +++ head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c Mon May = 20 00:38:23 2019 (r347984) > @@ -178,7 +178,6 @@ static const char *const ioctl_names[] =3D { > vchiq_static_assert((sizeof(ioctl_names)/sizeof(ioctl_names[0])) =3D=3D > (VCHIQ_IOC_MAX + 1)); >=20 > -static eventhandler_tag vchiq_ehtag =3D NULL; > static d_open_t vchiq_open; > static d_close_t vchiq_close; > static d_ioctl_t vchiq_ioctl; > @@ -2918,9 +2917,6 @@ void vchiq_exit(void); > void > vchiq_exit(void) > { > - if (vchiq_ehtag =3D=3D NULL) > - EVENTHANDLER_DEREGISTER(dev_clone, vchiq_ehtag); > - vchiq_ehtag =3D NULL; >=20 > vchiq_platform_exit(&g_state); > if (vchiq_cdev) { >=20 > Modified: head/sys/crypto/aesni/aesni.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/crypto/aesni/aesni.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/crypto/aesni/aesni.c Mon May 20 00:38:23 2019 = (r347984) > @@ -35,17 +35,18 @@ > __FBSDID("$FreeBSD$"); >=20 > #include > -#include > +#include > #include > #include > #include > #include > -#include > #include > -#include > -#include > #include > +#include > +#include > #include > +#include > +#include >=20 > #include > #include >=20 > Modified: head/sys/crypto/armv8/armv8_crypto.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/crypto/armv8/armv8_crypto.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/crypto/armv8/armv8_crypto.c Mon May 20 00:38:23 2019 = (r347984) > @@ -45,9 +45,11 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include > +#include > #include > #include > #include >=20 > Modified: head/sys/crypto/blake2/blake2_cryptodev.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/crypto/blake2/blake2_cryptodev.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/crypto/blake2/blake2_cryptodev.c Mon May 20 00:38:23 2019 = (r347984) > @@ -32,8 +32,9 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > -#include > #include > +#include > +#include > #include > #include >=20 >=20 > Modified: head/sys/crypto/ccp/ccp.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/crypto/ccp/ccp.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/crypto/ccp/ccp.c Mon May 20 00:38:23 2019 = (r347984) > @@ -33,7 +33,7 @@ __FBSDID("$FreeBSD$"); >=20 > #include "opt_ddb.h" >=20 > -#include > +#include > #include > #include > #include >=20 > Modified: head/sys/crypto/ccp/ccp_hardware.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/crypto/ccp/ccp_hardware.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/crypto/ccp/ccp_hardware.c Mon May 20 00:38:23 2019 = (r347984) > @@ -33,7 +33,7 @@ __FBSDID("$FreeBSD$"); >=20 > #include "opt_ddb.h" >=20 > -#include > +#include > #include > #include > #include >=20 > Modified: head/sys/ddb/db_command.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/ddb/db_command.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/ddb/db_command.c Mon May 20 00:38:23 2019 = (r347984) > @@ -37,6 +37,7 @@ > __FBSDID("$FreeBSD$"); >=20 > #include > +#include > #include > #include > #include >=20 > Modified: head/sys/dev/acpi_support/acpi_panasonic.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/dev/acpi_support/acpi_panasonic.c Sun May 19 = 23:56:04 2019 (r347983) > +++ head/sys/dev/acpi_support/acpi_panasonic.c Mon May 20 = 00:38:23 2019 (r347984) > @@ -31,10 +31,11 @@ __FBSDID("$FreeBSD$"); >=20 > #include "opt_acpi.h" > #include > +#include > +#include > #include > #include > #include > -#include > #include >=20 > #include >=20 > Modified: head/sys/dev/acpica/acpi.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/dev/acpica/acpi.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/dev/acpica/acpi.c Mon May 20 00:38:23 2019 = (r347984) > @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); > #include "opt_acpi.h" >=20 > #include > +#include > #include > #include > #include >=20 > Modified: head/sys/dev/acpica/acpi_lid.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/dev/acpica/acpi_lid.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/dev/acpica/acpi_lid.c Mon May 20 00:38:23 2019 = (r347984) > @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); >=20 > #include "opt_acpi.h" > #include > +#include > #include > #include > #include >=20 > Modified: head/sys/dev/acpica/acpi_thermal.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/dev/acpica/acpi_thermal.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/dev/acpica/acpi_thermal.c Mon May 20 00:38:23 2019 = (r347984) > @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); >=20 > #include "opt_acpi.h" > #include > +#include > #include > #include > #include >=20 > Modified: head/sys/dev/acpica/acpi_video.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/dev/acpica/acpi_video.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/dev/acpica/acpi_video.c Mon May 20 00:38:23 2019 = (r347984) > @@ -30,10 +30,11 @@ > __FBSDID("$FreeBSD$"); >=20 > #include > +#include > +#include > #include > #include > #include > -#include > #include > #include > #include >=20 > Modified: head/sys/dev/acpica/acpivar.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/acpica/acpivar.h Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/dev/acpica/acpivar.h Mon May 20 00:38:23 2019 = (r347984) > @@ -35,7 +35,7 @@ >=20 > #include "acpi_if.h" > #include "bus_if.h" > -#include > +#include > #ifdef INTRNG > #include > #endif >=20 > Modified: head/sys/dev/adb/adb_kbd.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/dev/adb/adb_kbd.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/dev/adb/adb_kbd.c Mon May 20 00:38:23 2019 = (r347984) > @@ -30,7 +30,9 @@ > #include > #include > #include > +#include > #include > +#include > #include > #include > #include >=20 > Modified: head/sys/dev/adb/adb_mouse.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/dev/adb/adb_mouse.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/dev/adb/adb_mouse.c Mon May 20 00:38:23 2019 = (r347984) > @@ -30,7 +30,9 @@ > #include > #include > #include > +#include > #include > +#include > #include > #include > #include >=20 > Modified: head/sys/dev/amdsbwd/amdsbwd.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/dev/amdsbwd/amdsbwd.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/dev/amdsbwd/amdsbwd.c Mon May 20 00:38:23 2019 = (r347984) > @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); > #include "opt_amdsbwd.h" >=20 > #include > +#include > #include > #include > #include >=20 > Modified: head/sys/dev/atkbdc/psm.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/dev/atkbdc/psm.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/dev/atkbdc/psm.c Mon May 20 00:38:23 2019 = (r347984) > @@ -72,6 +72,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include >=20 > Modified: head/sys/dev/cardbus/cardbus.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/dev/cardbus/cardbus.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/dev/cardbus/cardbus.c Mon May 20 00:38:23 2019 = (r347984) > @@ -31,6 +31,7 @@ > __FBSDID("$FreeBSD$"); >=20 > #include > +#include > #include > #include > #include >=20 > Modified: head/sys/dev/cmx/cmx.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/dev/cmx/cmx.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/dev/cmx/cmx.c Mon May 20 00:38:23 2019 = (r347984) > @@ -41,7 +41,9 @@ __FBSDID("$FreeBSD$"); >=20 > #include > #include > +#include > #include > +#include > #include > #include > #include >=20 > Modified: head/sys/dev/coretemp/coretemp.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/dev/coretemp/coretemp.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/dev/coretemp/coretemp.c Mon May 20 00:38:23 2019 = (r347984) > @@ -36,14 +36,15 @@ __FBSDID("$FreeBSD$"); >=20 > #include > #include > -#include > -#include > -#include > #include > #include > -#include > +#include > +#include > +#include > #include /* for curthread */ > #include > +#include > +#include >=20 > #include > #include >=20 > Modified: head/sys/dev/cxgbe/cxgbei/cxgbei.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/dev/cxgbe/cxgbei/cxgbei.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/dev/cxgbe/cxgbei/cxgbei.c Mon May 20 00:38:23 2019 = (r347984) > @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include >=20 >=20 > Modified: head/sys/dev/cxgbe/cxgbei/icl_cxgbei.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/dev/cxgbe/cxgbei/icl_cxgbei.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/dev/cxgbe/cxgbei/icl_cxgbei.c Mon May 20 00:38:23 2019 = (r347984) > @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include >=20 > Modified: head/sys/dev/cxgbe/tom/t4_tls.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/dev/cxgbe/tom/t4_tls.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/dev/cxgbe/tom/t4_tls.c Mon May 20 00:38:23 2019 = (r347984) > @@ -33,6 +33,7 @@ > __FBSDID("$FreeBSD$"); >=20 > #include > +#include > #include > #include > #include >=20 > Modified: head/sys/dev/dcons/dcons_crom.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/dev/dcons/dcons_crom.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/dev/dcons/dcons_crom.c Mon May 20 00:38:23 2019 = (r347984) > @@ -38,6 +38,7 @@ > */ >=20 > #include > +#include > #include > #include > #include >=20 > Modified: head/sys/dev/dcons/dcons_os.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/dev/dcons/dcons_os.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/dev/dcons/dcons_os.c Mon May 20 00:38:23 2019 = (r347984) > @@ -37,6 +37,7 @@ > */ >=20 > #include > +#include > #include > #include > #include >=20 > Modified: head/sys/dev/dcons/dcons_os.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/dcons/dcons_os.h Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/dev/dcons/dcons_os.h Mon May 20 00:38:23 2019 = (r347984) > @@ -36,6 +36,8 @@ > * $FreeBSD$ > */ >=20 > +#include > + > typedef void (*dcons_poll_fn)(void *, int); > EVENTHANDLER_DECLARE(dcons_poll, dcons_poll_fn); >=20 >=20 > Modified: head/sys/dev/evdev/evdev_private.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/evdev/evdev_private.h Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/dev/evdev/evdev_private.h Mon May 20 00:38:23 2019 = (r347984) > @@ -32,7 +32,9 @@ >=20 > #include > #include > +#include > #include > +#include > #include > #include > #include >=20 > Modified: head/sys/dev/extres/syscon/syscon_generic.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/dev/extres/syscon/syscon_generic.c Sun May 19 = 23:56:04 2019 (r347983) > +++ head/sys/dev/extres/syscon/syscon_generic.c Mon May 20 = 00:38:23 2019 (r347984) > @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include >=20 > #include >=20 > Modified: head/sys/dev/firewire/firewire.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/dev/firewire/firewire.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/dev/firewire/firewire.c Mon May 20 00:38:23 2019 = (r347984) > @@ -38,16 +38,15 @@ > __FBSDID("$FreeBSD$"); >=20 > #include > -#include > -#include > - > +#include > +#include > #include > #include > -#include > +#include > #include > -#include > +#include > #include > -#include > +#include >=20 > #include > #include /* used by smbus and newbus */ >=20 > Modified: head/sys/dev/firewire/fwohci.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/dev/firewire/fwohci.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/dev/firewire/fwohci.c Mon May 20 00:38:23 2019 = (r347984) > @@ -39,6 +39,7 @@ >=20 > #include > #include > +#include > #include > #include > #include >=20 > Modified: head/sys/dev/ichwd/ichwd.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/dev/ichwd/ichwd.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/dev/ichwd/ichwd.c Mon May 20 00:38:23 2019 = (r347984) > @@ -62,6 +62,7 @@ > __FBSDID("$FreeBSD$"); >=20 > #include > +#include > #include > #include > #include >=20 > Modified: head/sys/dev/ida/ida_disk.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/dev/ida/ida_disk.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/dev/ida/ida_disk.c Mon May 20 00:38:23 2019 = (r347984) > @@ -41,6 +41,8 @@ > #include > #include > #include > +#include > +#include >=20 > #include > #include >=20 > Modified: head/sys/dev/ida/ida_pci.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/dev/ida/ida_pci.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/dev/ida/ida_pci.c Mon May 20 00:38:23 2019 = (r347984) > @@ -37,6 +37,8 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > +#include >=20 > #include > #include >=20 > Modified: head/sys/dev/iir/iir_ctrl.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/dev/iir/iir_ctrl.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/dev/iir/iir_ctrl.c Mon May 20 00:38:23 2019 = (r347984) > @@ -46,16 +46,18 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > -#include > -#include > -#include > -#include > #include > #include > -#include > #include > +#include > +#include > +#include > +#include > +#include > +#include > #include > #include > +#include > #include >=20 > #include >=20 > Modified: head/sys/dev/ioat/ioat.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/dev/ioat/ioat.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/dev/ioat/ioat.c Mon May 20 00:38:23 2019 = (r347984) > @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include >=20 > Modified: head/sys/dev/ipmi/ipmi.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/dev/ipmi/ipmi.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/dev/ipmi/ipmi.c Mon May 20 00:38:23 2019 = (r347984) > @@ -34,9 +34,12 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > +#include > #include > #include > +#include > #include > #include > #include >=20 > Modified: head/sys/dev/ipmi/ipmi_opal.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/dev/ipmi/ipmi_opal.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/dev/ipmi/ipmi_opal.c Mon May 20 00:38:23 2019 = (r347984) > @@ -28,8 +28,9 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > -#include > +#include > #include > #include > #include >=20 > Modified: head/sys/dev/ips/ips.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/dev/ips/ips.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/dev/ips/ips.c Mon May 20 00:38:23 2019 = (r347984) > @@ -30,10 +30,14 @@ > #include > __FBSDID("$FreeBSD$"); >=20 > -#include > -#include > +#include > +#include > +#include > #include > #include > + > +#include > +#include >=20 > static d_open_t ips_open; > static d_close_t ips_close; >=20 > Modified: head/sys/dev/iscsi/icl_soft_proxy.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/dev/iscsi/icl_soft_proxy.c Sun May 19 23:56:04 2019 = (r347983) > +++ head/sys/dev/iscsi/icl_soft_proxy.c Mon May 20 00:38:23 2019 = (r347984) > @@ -74,9 +74,11 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include > +#include > #include > #include > #include >=20 > Modified: head/sys/dev/iscsi_initiator/iscsivar.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/iscsi_initiator/iscsivar.h Sun May 19 23:56:04 2019 = (r347983) >=20 > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** >=20 >=20 --Apple-Mail=_FB701B7B-6FE3-4718-A8B7-D128986CE440 Content-Disposition: attachment; filename=smime.p7s Content-Type: application/pkcs7-signature; name=smime.p7s Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCCEJAw ggTVMIIDvaADAgECAghQTsb1PRG0ZDANBgkqhkiG9w0BAQsFADBxMQswCQYDVQQGEwJERTEcMBoG A1UEChMTRGV1dHNjaGUgVGVsZWtvbSBBRzEfMB0GA1UECxMWVC1UZWxlU2VjIFRydXN0IENlbnRl cjEjMCEGA1UEAxMaRGV1dHNjaGUgVGVsZWtvbSBSb290IENBIDIwHhcNMTQwNzIyMTIwODI2WhcN MTkwNzA5MjM1OTAwWjBaMQswCQYDVQQGEwJERTETMBEGA1UEChMKREZOLVZlcmVpbjEQMA4GA1UE CxMHREZOLVBLSTEkMCIGA1UEAxMbREZOLVZlcmVpbiBQQ0EgR2xvYmFsIC0gRzAxMIIBIjANBgkq hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA6ZvDZ4X5Da71jVTDllA1PWLpbkztlNcAW5UidNQg6zSP 1uzAMQQLmYHiphTSUqAoI4SLdIkEXlvg4njBeMsWyyg1OXstkEXQ7aAAeny/Sg4bAMOG6VwrMRF7 DPOCJEOMHDiLamgAmu7cT3ir0sYTm3at7t4m6O8Br3QPwQmi9mvOvdPNFDBP9eXjpMhim4IaAycw DQJlYE3t0QkjKpY1WCfTdsZxtpAdxO3/NYZ9bzOz2w/FEcKKg6GUXUFr2NIQ9Uz9ylGs2b3vkoO7 2uuLFlZWQ8/h1RM9ph8nMM1JVNvJEzSacXXFbOqnC5j5IZ0nrz6jOTlIaoytyZn7wxLyvQIDAQAB o4IBhjCCAYIwDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBRJt8bP6D0ff+pEexMp9/EKcD7eZDAf BgNVHSMEGDAWgBQxw3kbuvVT1xfgiXotF2wKsyudMzASBgNVHRMBAf8ECDAGAQH/AgECMGIGA1Ud IARbMFkwEQYPKwYBBAGBrSGCLAEBBAICMBEGDysGAQQBga0hgiwBAQQDADARBg8rBgEEAYGtIYIs AQEEAwEwDwYNKwYBBAGBrSGCLAEBBDANBgsrBgEEAYGtIYIsHjA+BgNVHR8ENzA1MDOgMaAvhi1o dHRwOi8vcGtpMDMzNi50ZWxlc2VjLmRlL3JsL0RUX1JPT1RfQ0FfMi5jcmwweAYIKwYBBQUHAQEE bDBqMCwGCCsGAQUFBzABhiBodHRwOi8vb2NzcDAzMzYudGVsZXNlYy5kZS9vY3NwcjA6BggrBgEF BQcwAoYuaHR0cDovL3BraTAzMzYudGVsZXNlYy5kZS9jcnQvRFRfUk9PVF9DQV8yLmNlcjANBgkq hkiG9w0BAQsFAAOCAQEAYyAo/ZwhhnK+OUZZOTIlvKkBmw3Myn1BnIZtCm4ssxNZdbEzkhthJxb/ w7LVNYL7hCoBSb1mu2YvssIGXW4/buMBWlvKQ2NclbbhMacf1QdfTeZlgk4y+cN8ekvNTVx07iHy dQLsUj7SyWrTkCNuSWc1vn9NVqTszC/Pt6GXqHI+ybxA1lqkCD3WvILDt7cyjrEsjmpttzUCGc/1 OURYY6ckABCwu/xOr24vOLulV0k/2G5QbyyXltwdRpplic+uzPLl2Z9Tsz6hL5Kp2AvGhB8Exuse 6J99tXulAvEkxSRjETTMWpMgKnmIOiVCkKllO3yG0xIVIyn8LNrMOVtUFzCCBaIwggSKoAMCAQIC BxekJKEJSDMwDQYJKoZIhvcNAQELBQAwWjELMAkGA1UEBhMCREUxEzARBgNVBAoTCkRGTi1WZXJl aW4xEDAOBgNVBAsTB0RGTi1QS0kxJDAiBgNVBAMTG0RGTi1WZXJlaW4gUENBIEdsb2JhbCAtIEcw MTAeFw0xNDA1MjcxNDU0MDlaFw0xOTA3MDkyMzU5MDBaMIHGMQswCQYDVQQGEwJERTEcMBoGA1UE CBMTTm9yZHJoZWluLVdlc3RmYWxlbjERMA8GA1UEBxMITXVlbnN0ZXIxIDAeBgNVBAoTF0ZhY2ho b2Noc2NodWxlIE11ZW5zdGVyMSMwIQYDVQQLExpEYXRlbnZlcmFyYmVpdHVuZ3N6ZW50cmFsZTEd MBsGA1UEAxMURkggTXVlbnN0ZXIgQ0EgLSBHMDExIDAeBgkqhkiG9w0BCQEWEWNhQGZoLW11ZW5z dGVyLmRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuHlsrvBs7CL9IqMH9r//QU9E pghTV/3skHuQZ3DpNY+lyJWOW5zbtUubgXt7lYHpIE4d4CclTZWqCHwoAI6gqzSSGjUKuX6/0ui/ LhXmlDvCBfwuER+T+3/R59hlLnhI5iYYPQiNywQIa3wJhBLTZrlXw8nDdjI54MAzcVDUX7l21sbo ZIA6idM7SXmshxoRQ6xsfPHskrceNMcvtHNDhVnVscwRUJQUR55fs0X7Y93PasugWPv3xmgNr1da Cq94eV+nslNU/GJaT9TQ3uG8pagLXl9NbDNkHIrvFAD5zXO0m/d00I4QhUVQyEtwnTegDqcM+WFh JXensgnZhWe6bwIDAQABo4IB/jCCAfowEgYDVR0TAQH/BAgwBgEB/wIBATAOBgNVHQ8BAf8EBAMC AQYwEQYDVR0gBAowCDAGBgRVHSAAMB0GA1UdDgQWBBQK81u85DGA1jVCiabTw8833tHf1zAfBgNV HSMEGDAWgBRJt8bP6D0ff+pEexMp9/EKcD7eZDAcBgNVHREEFTATgRFjYUBmaC1tdWVuc3Rlci5k ZTCBiAYDVR0fBIGAMH4wPaA7oDmGN2h0dHA6Ly9jZHAxLnBjYS5kZm4uZGUvZ2xvYmFsLXJvb3Qt Y2EvcHViL2NybC9jYWNybC5jcmwwPaA7oDmGN2h0dHA6Ly9jZHAyLnBjYS5kZm4uZGUvZ2xvYmFs LXJvb3QtY2EvcHViL2NybC9jYWNybC5jcmwwgdcGCCsGAQUFBwEBBIHKMIHHMDMGCCsGAQUFBzAB hidodHRwOi8vb2NzcC5wY2EuZGZuLmRlL09DU1AtU2VydmVyL09DU1AwRwYIKwYBBQUHMAKGO2h0 dHA6Ly9jZHAxLnBjYS5kZm4uZGUvZ2xvYmFsLXJvb3QtY2EvcHViL2NhY2VydC9jYWNlcnQuY3J0 MEcGCCsGAQUFBzAChjtodHRwOi8vY2RwMi5wY2EuZGZuLmRlL2dsb2JhbC1yb290LWNhL3B1Yi9j YWNlcnQvY2FjZXJ0LmNydDANBgkqhkiG9w0BAQsFAAOCAQEA3kcDNdZKb7kSD7s1ly2qa/2QbQe+ ld3LhZeOcfysdLtN8oweBmgT3MYoZ+D9c+SoUWJAwTKPB15DoGy+fWhelXTpQrqxIGb4ISr1JCjg slnmMUva0xjwZGxojZ9gE1bi18xfKw3+dMpwCLt6LbLTjr/tyH6otacwr2tZzuuJIUAORnefwTcr vmB21n/BEQH/ZXruWu8lSO3L9YAmQB6ViaZFCpn2sMmOLACdoWxmUQb3QAjsa327jHUjsz53k9q5 Zrx/g+zOg5s1Wmy2JOlLQMUIZXXf0/6rB5Fr2llx7dBG/Uk7NhZdNy7OzNzci0C4Wnkd8rDVEWHG hH2gfpcTfjCCBg0wggT1oAMCAQICBxuZiHQ3saMwDQYJKoZIhvcNAQELBQAwgcYxCzAJBgNVBAYT AkRFMRwwGgYDVQQIExNOb3JkcmhlaW4tV2VzdGZhbGVuMREwDwYDVQQHEwhNdWVuc3RlcjEgMB4G A1UEChMXRmFjaGhvY2hzY2h1bGUgTXVlbnN0ZXIxIzAhBgNVBAsTGkRhdGVudmVyYXJiZWl0dW5n c3plbnRyYWxlMR0wGwYDVQQDExRGSCBNdWVuc3RlciBDQSAtIEcwMTEgMB4GCSqGSIb3DQEJARYR Y2FAZmgtbXVlbnN0ZXIuZGUwHhcNMTYwNzA0MDcwNjEzWhcNMTkwNzA0MDcwNjEzWjB8MQswCQYD VQQGEwJERTEgMB4GA1UECgwXRmFjaGhvY2hzY2h1bGUgTXVlbnN0ZXIxMjAwBgNVBAsMKUZhY2hi ZXJlaWNoIEVsZWt0cm90ZWNobmlrIHVuZCBJbmZvcm1hdGlrMRcwFQYDVQQDDA5NaWNoYWVsIFR1 ZXhlbjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMyaGlBt2ZtuF8QP8zYNrGxXC+es PMajIPl+hu1LGHnN2BJ3J5ZMN44BOZw3n6LO1FaAgO8D4xU4/AELecX6VxJZ2zOOSD8uTYO4OnUu 24hkjFUQAj13tT644AKUQMMBpgj7wC52V5Jij+mZX/t1S38/WFiCGnirt4xTNi5OmN4K+VNZfG4x 0msDqFjJX70rF1y09/Mylu1M/Y0tu/I9DqhwDQT4LBOvyyaAlhSJ8Jb8m8YTt5xlOzrXlBmj4pKs 74y7C2IKRw4tFozGX1cf1LVEs2eBCb5iUwXrlcMipwm62sJ38GD00EOlRNTpAM5rDAcgWxMCffek bRv/01whtOkCAwEAAaOCAkcwggJDMEAGA1UdIAQ5MDcwEQYPKwYBBAGBrSGCLAEBBAMFMBEGDysG AQQBga0hgiwCAQQDATAPBg0rBgEEAYGtIYIsAQEEMAkGA1UdEwQCMAAwDgYDVR0PAQH/BAQDAgXg MB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDBDAdBgNVHQ4EFgQU0B2vaoSoEmYAggD04WZF 2hGif3UwHwYDVR0jBBgwFoAUCvNbvOQxgNY1Qomm08PPN97R39cwIAYDVR0RBBkwF4EVdHVleGVu QGZoLW11ZW5zdGVyLmRlMIGIBgNVHR8EgYAwfjA9oDugOYY3aHR0cDovL2NkcDEucGNhLmRmbi5k ZS9maC1tdWVuc3Rlci1jYS9wdWIvY3JsL2NhY3JsLmNybDA9oDugOYY3aHR0cDovL2NkcDIucGNh LmRmbi5kZS9maC1tdWVuc3Rlci1jYS9wdWIvY3JsL2NhY3JsLmNybDCB1wYIKwYBBQUHAQEEgcow gccwMwYIKwYBBQUHMAGGJ2h0dHA6Ly9vY3NwLnBjYS5kZm4uZGUvT0NTUC1TZXJ2ZXIvT0NTUDBH BggrBgEFBQcwAoY7aHR0cDovL2NkcDEucGNhLmRmbi5kZS9maC1tdWVuc3Rlci1jYS9wdWIvY2Fj ZXJ0L2NhY2VydC5jcnQwRwYIKwYBBQUHMAKGO2h0dHA6Ly9jZHAyLnBjYS5kZm4uZGUvZmgtbXVl bnN0ZXItY2EvcHViL2NhY2VydC9jYWNlcnQuY3J0MA0GCSqGSIb3DQEBCwUAA4IBAQBI9v+seJM6 AlSIrmmpopz6zh8QAsqGLJkkY2D0KYFucUY/xZaJTtZxvmWddbKk2903Qhg+vZKOf87PHhip7/4t FSwhxYNSS36WsRJTeUa0f3KkSa28yrIRfWlJATgxfL5X/QQnopjCt34n4221kcsR7LHxBAn37ow+ /2L7WjWDDuOkaM9/ZSCtrN+yFRat1eUVs1Hk7sKT/bfJTsYqzovXitjmCP3YdB40dkuQ6/ZzEdXT bpa4c45RcRnPqKXnxknK0UfRHNHqk15W7dUPVMzSGFUvjhmWPP2wW6a8F1U5sEqfHcoBFC5CGjGy 7Gk2luk3obi/KLrDyZC+dkjhDYEpMYIEOTCCBDUCAQEwgdIwgcYxCzAJBgNVBAYTAkRFMRwwGgYD VQQIExNOb3JkcmhlaW4tV2VzdGZhbGVuMREwDwYDVQQHEwhNdWVuc3RlcjEgMB4GA1UEChMXRmFj aGhvY2hzY2h1bGUgTXVlbnN0ZXIxIzAhBgNVBAsTGkRhdGVudmVyYXJiZWl0dW5nc3plbnRyYWxl MR0wGwYDVQQDExRGSCBNdWVuc3RlciBDQSAtIEcwMTEgMB4GCSqGSIb3DQEJARYRY2FAZmgtbXVl bnN0ZXIuZGUCBxuZiHQ3saMwDQYJYIZIAWUDBAIBBQCgggI3MBgGCSqGSIb3DQEJAzELBgkqhkiG 9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTE5MDUyMDA3NTUxNlowLwYJKoZIhvcNAQkEMSIEIF7zjkdq 2EXSwQY9vKT1/9r05gpNUMb0DMPAORVTWVWuMIHjBgkrBgEEAYI3EAQxgdUwgdIwgcYxCzAJBgNV BAYTAkRFMRwwGgYDVQQIExNOb3JkcmhlaW4tV2VzdGZhbGVuMREwDwYDVQQHEwhNdWVuc3RlcjEg MB4GA1UEChMXRmFjaGhvY2hzY2h1bGUgTXVlbnN0ZXIxIzAhBgNVBAsTGkRhdGVudmVyYXJiZWl0 dW5nc3plbnRyYWxlMR0wGwYDVQQDExRGSCBNdWVuc3RlciBDQSAtIEcwMTEgMB4GCSqGSIb3DQEJ ARYRY2FAZmgtbXVlbnN0ZXIuZGUCBxuZiHQ3saMwgeUGCyqGSIb3DQEJEAILMYHVoIHSMIHGMQsw CQYDVQQGEwJERTEcMBoGA1UECBMTTm9yZHJoZWluLVdlc3RmYWxlbjERMA8GA1UEBxMITXVlbnN0 ZXIxIDAeBgNVBAoTF0ZhY2hob2Noc2NodWxlIE11ZW5zdGVyMSMwIQYDVQQLExpEYXRlbnZlcmFy YmVpdHVuZ3N6ZW50cmFsZTEdMBsGA1UEAxMURkggTXVlbnN0ZXIgQ0EgLSBHMDExIDAeBgkqhkiG 9w0BCQEWEWNhQGZoLW11ZW5zdGVyLmRlAgcbmYh0N7GjMA0GCSqGSIb3DQEBAQUABIIBAD7XoNmY I1IhRR0MbJKUEysc5XSF74309nPcPEoe8ruzYy7dnO3mO0do9BR8hAJzdZ/cMypxvt8A9o6CsOWd ald/4mMREla5zbwVKVKGmCUVYe3Z8viRbMnYzRE7R9vWPjIVydQrCmSHqtzJXASGRWAd9KTDkM5a AD9sOf0Y7KXXLQPX5ruBiDIGRgpaT7KSRR48n4ubPx57FevOuO6DNF893k0E1V0wUZw2jNbXuQUN TbPbXiFWj7/cZvU9fo4b4PFM6+LW1cU5/Eig28T/Mn2dBoB7neP+Eo03tAwEae4smneYqI8mMAmb KzfPWmfZ/O+ccuOWGO4FS/t6JgHEu78AAAAAAAA= --Apple-Mail=_FB701B7B-6FE3-4718-A8B7-D128986CE440-- From owner-svn-src-head@freebsd.org Mon May 20 08:31:03 2019 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 DF86B15A6099; Mon, 20 May 2019 08:31:02 +0000 (UTC) (envelope-from chagin.dmitry@gmail.com) Received: from mail-it1-f195.google.com (mail-it1-f195.google.com [209.85.166.195]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7D6B26B387; Mon, 20 May 2019 08:31:02 +0000 (UTC) (envelope-from chagin.dmitry@gmail.com) Received: by mail-it1-f195.google.com with SMTP id i63so21767897ita.3; Mon, 20 May 2019 01:31:02 -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=NKwbCtJ0CaA/2XXTuIweSGc5ULCtFAG12osamN7X7S4=; b=JPg1Pui0oib8xkvk8pESlSAFVY6W0JPe7CNMbVQT1ArLUsfK5b/4VZFoP0+GdaaRbO Pu7y9j3P1gMmOruhZ4g/MdfgAgXRAqSn0kFgiViWk7Cd1CYqULLRLWC53PZGGbt4hz/2 v70OVf0eThYej4Sjx1Q55HCCF51kpBRbYdNg39eipivSwJG+7h9VBG1wGZ+X7fDoBUo9 s2hFH8KYKFblq/y6NLo4sJ0HLroPD1dErI8qD4GFGc1EwTwp9Ovk0cX0uJtLcsEDbsVy Uk4oN+BJ5NqStGndu4ch7Aj5p2BePaDScV3RitepFiK/sguL6bfzUMiyniEPJu0aTZ4v 1rMA== X-Gm-Message-State: APjAAAUezxA38NlFk3YdM8FSW8egkeK+6hib/seNY0+gtFN9PsOfUxjl ZvxHa/xt4mN6x1lw8yCWFDJxo5JWKIeLx+g/EVpT5qMG X-Google-Smtp-Source: APXvYqz+EcwOGDa9zkB1HfeYWb8qRstbkAVrwRIXZKE7IvT7k0oaVCM2UZzWR9iUM4tZeMbX1PPLvPEVoZxmtY2g8Ng= X-Received: by 2002:a24:9987:: with SMTP id a129mr12716032ite.53.1558341055702; Mon, 20 May 2019 01:30:55 -0700 (PDT) MIME-Version: 1.0 References: <201905131748.x4DHmGaH020444@repo.freebsd.org> <20190519190511.6e8f436c@kalimero.tijl.coosemans.org> In-Reply-To: <20190519190511.6e8f436c@kalimero.tijl.coosemans.org> From: Dmitry Chagin Date: Mon, 20 May 2019 11:30:43 +0300 Message-ID: Subject: Re: svn commit: r347533 - in head/sys: compat/linux modules/linux_common To: =?UTF-8?Q?T=C4=B3l_Coosemans?= Cc: Dmitry Chagin , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 7D6B26B387 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.93 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.93)[-0.935,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 08:31:03 -0000 =D0=B2=D1=81, 19 =D0=BC=D0=B0=D1=8F 2019 =D0=B3. =D0=B2 20:05, T=C4=B3l Coo= semans : > On Mon, 13 May 2019 17:48:16 +0000 (UTC) Dmitry Chagin > wrote: > > Author: dchagin > > Date: Mon May 13 17:48:16 2019 > > New Revision: 347533 > > URL: https://svnweb.freebsd.org/changeset/base/347533 > > > > Log: > > Our bsd_to_linux_sockaddr() and linux_to_bsd_sockaddr() functions > > alter the userspace sockaddr to convert the format between linux and > BSD versions. > > That's the minimum 3 of copyin/copyout operations for one syscall. > > > > Also some syscall uses linux_sa_put() and linux_getsockaddr() when lo= ad > > sockaddr to userspace or from userspace accordingly. > > > > To avoid this chaos, especially converting sockaddr in the userspace, > > rewrite these 4 functions to convert sockaddr only in kernel and leav= e > > only 2 of this functions. > > > > Also in order to reduce duplication between MD parts of the > Linuxulator put > > struct sockaddr conversion functions that are MI out into linux_commo= n > module. > > > > PR: 232920 > > MFC after: 2 weeks > > Differential Revision: https://reviews.freebsd.org/D20157 > > > > Modified: > > head/sys/compat/linux/linux.c > > head/sys/compat/linux/linux.h > > head/sys/compat/linux/linux_common.h > > head/sys/compat/linux/linux_socket.c > > head/sys/compat/linux/linux_socket.h > > head/sys/modules/linux_common/Makefile > > > > Modified: head/sys/compat/linux/linux_socket.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/compat/linux/linux_socket.c Mon May 13 16:38:48 2019 > (r347532) > > +++ head/sys/compat/linux/linux_socket.c Mon May 13 17:48:16 2019 > (r347533) > > @@ -1282,6 +1110,8 @@ linux_recvmsg_common(struct thread *td, l_int s, > struc > > struct mbuf *control =3D NULL; > > struct mbuf **controlp; > > struct timeval *ftmvl; > > + struct l_sockaddr *lsa; > > + struct sockaddr *sa; > > l_timeval ltmvl; > > caddr_t outbuf; > > void *data; > > @@ -1305,36 +1135,34 @@ linux_recvmsg_common(struct thread *td, l_int s= , > struc > > return (error); > > > > if (msg->msg_name) { > > - error =3D linux_to_bsd_sockaddr((struct sockaddr > *)msg->msg_name, > > - msg->msg_namelen); > > - if (error !=3D 0) > > - goto bad; > > + sa =3D malloc(msg->msg_namelen, M_SONAME, M_WAITOK); > > + msg->msg_name =3D sa; > > } > > > > uiov =3D msg->msg_iov; > > msg->msg_iov =3D iov; > > controlp =3D (msg->msg_control !=3D NULL) ? &control : NULL; > > - error =3D kern_recvit(td, s, msg, UIO_USERSPACE, controlp); > > + error =3D kern_recvit(td, s, msg, UIO_SYSSPACE, controlp); > > msg->msg_iov =3D uiov; > > if (error !=3D 0) > > goto bad; > > > > - error =3D bsd_to_linux_msghdr(msg, &linux_msg); > > - if (error !=3D 0) > > - goto bad; > > - > > - if (linux_msg.msg_name) { > > - error =3D bsd_to_linux_sockaddr((struct sockaddr *) > > - PTRIN(linux_msg.msg_name)); > > + if (sa) { > > sa may be uninitialised here. > yes, I see. thank you. also sa leaks if kern_recvit() returns error. will fix From owner-svn-src-head@freebsd.org Mon May 20 08:53:02 2019 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 272AE15A6875; Mon, 20 May 2019 08:53:02 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from mx0b-00273201.pphosted.com (mx0b-00273201.pphosted.com [67.231.152.164]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.pphosted.com", Issuer "Thawte RSA CA 2018" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A3DAA6C284; Mon, 20 May 2019 08:53:01 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from pps.filterd (m0108161.ppops.net [127.0.0.1]) by mx0b-00273201.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x4K8j1SA005526; Mon, 20 May 2019 01:52:59 -0700 Received: from nam02-sn1-obe.outbound.protection.outlook.com (mail-sn1nam02lp2053.outbound.protection.outlook.com [104.47.36.53]) by mx0b-00273201.pphosted.com with ESMTP id 2skfq90nee-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 20 May 2019 01:52:58 -0700 Received: from MN2PR05CA0035.namprd05.prod.outlook.com (2603:10b6:208:c0::48) by SN6PR05MB5807.namprd05.prod.outlook.com (2603:10b6:805:f4::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1922.13; Mon, 20 May 2019 08:52:57 +0000 Received: from CO1NAM05FT030.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e50::203) by MN2PR05CA0035.outlook.office365.com (2603:10b6:208:c0::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1922.8 via Frontend Transport; Mon, 20 May 2019 08:52:56 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.12 as permitted sender) Received: from P-EXFEND-EQX-01.jnpr.net (66.129.239.12) by CO1NAM05FT030.mail.protection.outlook.com (10.152.96.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1922.10 via Frontend Transport; Mon, 20 May 2019 08:52:56 +0000 Received: from P-EXBEND-EQX-01.jnpr.net (10.104.8.52) by P-EXFEND-EQX-01.jnpr.net (10.104.8.54) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 20 May 2019 01:52:55 -0700 Received: from P-EXBEND-EQX-01.jnpr.net (10.104.8.52) by P-EXBEND-EQX-01.jnpr.net (10.104.8.52) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 20 May 2019 01:52:55 -0700 Received: from p-mailhub01.juniper.net (10.104.20.6) by P-EXBEND-EQX-01.jnpr.net (10.104.8.52) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Mon, 20 May 2019 01:52:55 -0700 Received: from kaos.jnpr.net (kaos.jnpr.net [172.23.50.162]) by p-mailhub01.juniper.net (8.14.4/8.11.3) with ESMTP id x4K8qtZ5026560; Mon, 20 May 2019 01:52:55 -0700 (envelope-from sjg@juniper.net) Received: by kaos.jnpr.net (Postfix, from userid 1377) id F41E21F7EA; Mon, 20 May 2019 01:52:54 -0700 (PDT) Received: from kaos.jnpr.net (localhost [127.0.0.1]) by kaos.jnpr.net (Postfix) with ESMTP id F3A231F7E9; Mon, 20 May 2019 01:52:54 -0700 (PDT) To: CC: , , , Subject: Re: svn commit: r347980 - head/lib/libsecureboot/openpgp In-Reply-To: <201905200500.x4K506YI072317@gndrsh.dnsmgr.net> References: <201905200500.x4K506YI072317@gndrsh.dnsmgr.net> Comments: In-reply-to: "Rodney W. Grimes" message dated "Sun, 19 May 2019 22:00:06 -0700." From: "Simon J. Gerraty" X-Mailer: MH-E 8.6+git; nmh 1.7.1; GNU Emacs 26.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <37829.1558342374.1@kaos.jnpr.net> Date: Mon, 20 May 2019 01:52:54 -0700 Message-ID: <39068.1558342374@kaos.jnpr.net> X-EXCLAIMER-MD-CONFIG: e3cb0ff2-54e7-4646-8a04-0dae4ac7b136 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:66.129.239.12; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(376002)(396003)(39860400002)(136003)(346002)(2980300002)(52314003)(199004)(189003)(486006)(8676002)(81156014)(53936002)(2351001)(23726003)(6916009)(6266002)(7126003)(126002)(97876018)(476003)(11346002)(97756001)(446003)(46406003)(54906003)(316002)(76176011)(90966002)(229853002)(76506005)(50226002)(8936002)(7696005)(68736007)(50466002)(81166006)(2906002)(47776003)(356004)(450100002)(4326008)(186003)(69596002)(478600001)(77096007)(16586007)(107886003)(5660300002)(6246003)(336012)(9686003)(26005)(14444005)(4744005)(305945005)(70206006)(70586007)(55016002)(86362001)(53416004)(117636001); DIR:OUT; SFP:1102; SCL:1; SRVR:SN6PR05MB5807; H:P-EXFEND-EQX-01.jnpr.net; FPR:; SPF:SoftFail; LANG:en; PTR:InfoDomainNonexistent; A:1; MX:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a37d9916-30aa-40bc-ed16-08d6dd008d9f X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4710095)(4711036)(2017052603328); SRVR:SN6PR05MB5807; X-MS-TrafficTypeDiagnostic: SN6PR05MB5807: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-Forefront-PRVS: 004395A01C X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: TyY5xQGPYneA5xK6BMaDh0dlEoAKoUMBvs9W0i8y8My0CNexNBXXunm8gkBzMh8meQ6PDzh3wzWfsK7Mug5zZOK5q/a4a20TS83b3xKWIMI4e24cRsAzZNuHKF/8KGDZx/AGCQPyR56C5Ms7F/WWIAl21pgHcDnl0HUJUJ9inr0D3FyKtP2pTy7eL9vNqJ6B+kIzTQf/wcCNVZMo4db7cbu1RRfVVeoYe53cZZa8xAlJsanvxR7iFGMRrcQ94BctSrpGIEVuksCLTl2fC0sidUlloeVOq8fThGvMtenjd3JrRMP8oJl2zDq8P8Sp4jwPS4JlZ5I8IxdcTEu7gLB5SdGoc+JO0cnWUYxFWuWXb6Kg8P0rVcqGCY6Q3ldDztYO8qNSS30ENGzLKSJb3y1qI7RPLjX8uERqnXdThzF5/4c= X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 May 2019 08:52:56.3579 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a37d9916-30aa-40bc-ed16-08d6dd008d9f X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4; Ip=[66.129.239.12]; Helo=[P-EXFEND-EQX-01.jnpr.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR05MB5807 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-05-20_04:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 priorityscore=1501 malwarescore=0 suspectscore=3 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=443 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1905200064 X-Rspamd-Queue-Id: A3DAA6C284 X-Spamd-Bar: ------ X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 08:53:02 -0000 Rodney W. Grimes wrote: > > Log: > > load_key_buf do not free data from dearmor > > > > The data returned by dearmor is referenced by the key > > leave it alone! > > > > Reviewed by: stevek > > MFC after: 2 days > > This is an exception below the standard minimal limit during > a code freeze, is there some reason for it? The next build > should not be started before 3 days. Sorry,should I wait until after freeze? This is all optional stuff anyway, so no great harm either way. From owner-svn-src-head@freebsd.org Mon May 20 11:05:20 2019 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 77B3F15A9AB5; Mon, 20 May 2019 11:05:20 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id A483D70802; Mon, 20 May 2019 11:05:19 +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 mail105.syd.optusnet.com.au (Postfix) with ESMTPS id DA301D407; Mon, 20 May 2019 21:05:07 +1000 (AEST) Date: Mon, 20 May 2019 21:05:05 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Conrad Meyer cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r347984 - in head/sys: amd64/vmm/io arm/allwinner arm/allwinner/a10 arm/allwinner/clkng arm/arm arm/broadcom/bcm2835 arm/freescale/imx arm/mv arm/mv/armada arm/nvidia arm/nvidia/tegra12... In-Reply-To: <201905200038.x4K0cNoZ019920@repo.freebsd.org> Message-ID: <20190520202101.L1014@besplex.bde.org> References: <201905200038.x4K0cNoZ019920@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=FNpr/6gs c=1 sm=1 tr=0 cx=a_idp_d a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=ZYnaWQUgFQgQsxDDCCAA:9 a=CjuIK1q_8ugA:10 X-Rspamd-Queue-Id: A483D70802 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.982,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 11:05:20 -0000 On Mon, 20 May 2019, Conrad Meyer wrote: > Log: > Extract eventfilter declarations to sys/_eventfilter.h sys/_eventhandler.h has 2 identical 72-line copies of the correct version. The second copy of the reinclusion guard works as a guard against the doubling too. > > This allows replacing "sys/eventfilter.h" includes with "sys/_eventfilter.h" > in other header files (e.g., sys/{bus,conf,cpu}.h) and reduces header > pollution substantially. > > EVENTHANDLER_DECLARE and EVENTHANDLER_LIST_DECLAREs were moved out of .c > files into appropriate headers (e.g., sys/proc.h, powernv/opal.h). Thanks, but this gives even more pollution. Almost everything includes sys/proc.h, so its already large pollution affects almost everything. The previous pollution in it didn't include sys/eventhandler.h, except possibly via a nested include. > Modified: head/sys/amd64/vmm/io/iommu.c > ============================================================================== > --- head/sys/amd64/vmm/io/iommu.c Sun May 19 23:56:04 2019 (r347983) > +++ head/sys/amd64/vmm/io/iommu.c Mon May 20 00:38:23 2019 (r347984) > @@ -32,10 +32,10 @@ > __FBSDID("$FreeBSD$"); > > #include > -#include > -#include Error. sys/systm.h must be included after sys/param.h, since it contains macros like KASSERT() which may be used in inline functions in any kernel header except sys/param.h and possibly sys/types.h. > Modified: head/sys/arm/allwinner/a10/a10_intc.c > ============================================================================== > --- head/sys/arm/allwinner/a10/a10_intc.c Sun May 19 23:56:04 2019 (r347983) > +++ head/sys/arm/allwinner/a10/a10_intc.c Mon May 20 00:38:23 2019 (r347984) > @@ -30,11 +30,12 @@ __FBSDID("$FreeBSD$"); > > #include "opt_platform.h" > > -#include > +#include Including sys/types.h and not including sys/param.h was another error. sys/param.h supplies lots of standard pollution that may be depended on by any other kernel header. It is impractical to even test if sys/types.h works with all combinations of ifdefs. > #include > #include > #include > #include > +#include > #include > #include > #include sys/param.h is now included twice. It is another header that must be included in non-alphabetical order. The second include may have compensated for not including it first. > > Modified: head/sys/arm/allwinner/a10_dmac.c > ============================================================================== > --- head/sys/arm/allwinner/a10_dmac.c Sun May 19 23:56:04 2019 (r347983) > +++ head/sys/arm/allwinner/a10_dmac.c Mon May 20 00:38:23 2019 (r347984) > @@ -38,7 +38,9 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > +#include > > #include > > Modified: head/sys/arm/allwinner/a31_dmac.c > ============================================================================== > --- head/sys/arm/allwinner/a31_dmac.c Sun May 19 23:56:04 2019 (r347983) > +++ head/sys/arm/allwinner/a31_dmac.c Mon May 20 00:38:23 2019 (r347984) > @@ -38,7 +38,9 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > +#include > #include > > #include I gave up trying to fix missing includes of sys/mutex.h and its prerequisite sys/lock.h 15+ years ago before disk code added lots more of them. sys/buf.h was polluted by adding an include of sys/mutex.h, and most disk drivers dependended on that. The only other includes of sys/mutex.h in a header were in sys/eventhandler.h and sys/vnode.h, and the latter was fixed in my version. This pollution has spread to sys/buf_ring.h, sys/fail.h, sys/jail.h, sys/mman.h, sys/msgbuf.h, sys/rmlock.h, sys/timeet.h and sys/tty.h. The smaller headers here are trivial to fix, and even sys/vnode.h wasn't hard to fix 15 years ago before the pollution spread. sys/mman.h seems to have only 1 mutex declaration, of a struct mtx, so using the correct header sys/_mutex.h works. Only inlines using mutexes cause pollution that is hard to avoid. sys/vnode.h still has only 1 inline function. Bruce From owner-svn-src-head@freebsd.org Mon May 20 12:57:46 2019 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 98A0515ACA7C; Mon, 20 May 2019 12:57:45 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4508C75235; Mon, 20 May 2019 12:57:45 +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 1EB4C1E8D8; Mon, 20 May 2019 12:57:45 +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 x4KCvjGX006588; Mon, 20 May 2019 12:57:45 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4KCvdL0006559; Mon, 20 May 2019 12:57:39 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201905201257.x4KCvdL0006559@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Mon, 20 May 2019 12:57:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r347990 - in head: contrib/libarchive contrib/libarchive/cpio/test contrib/libarchive/libarchive contrib/libarchive/libarchive/test contrib/libarchive/tar contrib/libarchive/tar/test co... X-SVN-Group: head X-SVN-Commit-Author: mm X-SVN-Commit-Paths: in head: contrib/libarchive contrib/libarchive/cpio/test contrib/libarchive/libarchive contrib/libarchive/libarchive/test contrib/libarchive/tar contrib/libarchive/tar/test contrib/libarchive/test_uti... X-SVN-Commit-Revision: 347990 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4508C75235 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 12:57:46 -0000 Author: mm Date: Mon May 20 12:57:39 2019 New Revision: 347990 URL: https://svnweb.freebsd.org/changeset/base/347990 Log: MFV r347989: Sync libarchive with vendor. Relevant vendor changes: Issue #795: XAR - do not try to add xattrs without an allocated name PR #812: non-recursive option for extract and list PR #958: support reading metadata from compressed files PR #999: add --exclude-vcs option to bsdtar Issue #1062: treat empty archives with a GNU volume header as valid PR #1074: Handle ZIP files with trailing 0s in the extra fields (Android APK archives) PR #1109: Ignore padding in Zip extra field data (Android APK archives) PR #1167: fix problems related to unreadable directories Issue #1168: fix handling of strtol() and strtoul() PR #1172: RAR5 - fix invalid window buffer read in E8E9 filter PR #1174: ZIP reader - fix of MSZIP signature parsing PR #1175: gzip filter - fix reading files larger than 4GB from memory PR #1177: gzip filter - fix memory leak with repeated header reads PR #1180: ZIP reader - add support for Info-ZIP Unicode Path Extra Field PR #1181: RAR5 - fix merge_block() recursion (OSS-Fuzz 12999, 13029, 13144, 13478, 13490) PR #1183: fix memory leak when decompressing ZIP files with LZMA PR #1184: fix RAR5 OSS-Fuzz issues 12466, 14490, 14491, 12817 OSS-Fuzz 12466: RAR5 - fix buffer overflow when parsing huffman tables OSS-Fuzz 14490, 14491: RAR5 - fix bad shift-left operations OSS-Fuzz 12817: RAR5 - handle a case with truncated huffman tables PR #1186: RAR5 - fix invalid type used for dictionary size mask (OSS-Fuzz 14537) PR #1187: RAR5 - fix integer overflow (OSS-Fuzz 14555) PR #1190: RAR5 - RAR5 don't try to unpack entries marked as directories (OSS-Fuzz 14574) PR #1196: RAR5 - fix a potential SIGSEGV on 32-bit builds OSS-Fuzz 2582: RAR - fix use after free if there is an invalid entry OSS-Fuzz 14331: RAR5 - fix maximum owner name length OSS-Fuzz 13965: RAR5 - use unsigned int for volume number + range check Additional RAR5 reader changes: - support symlinks, hardlinks, file owner, file group, versioned files - change ARCHIVE_FORMAT_RAR_V5 to 0x100000 - set correct mode for readonly directories - support readonly, hidden and system Windows file attributes MFC after: 2 weeks Added: head/contrib/libarchive/libarchive/archive_entry_misc.3 - copied unchanged from r347989, vendor/libarchive/dist/libarchive/archive_entry_misc.3 head/contrib/libarchive/libarchive/test/test_read_format_mtree_noprint.mtree.uu - copied unchanged from r347989, vendor/libarchive/dist/libarchive/test/test_read_format_mtree_noprint.mtree.uu head/contrib/libarchive/libarchive/test/test_read_format_rar5_distance_overflow.rar.uu - copied unchanged from r347989, vendor/libarchive/dist/libarchive/test/test_read_format_rar5_distance_overflow.rar.uu head/contrib/libarchive/libarchive/test/test_read_format_rar5_extra_field_version.rar.uu - copied unchanged from r347989, vendor/libarchive/dist/libarchive/test/test_read_format_rar5_extra_field_version.rar.uu head/contrib/libarchive/libarchive/test/test_read_format_rar5_fileattr.rar.uu - copied unchanged from r347989, vendor/libarchive/dist/libarchive/test/test_read_format_rar5_fileattr.rar.uu head/contrib/libarchive/libarchive/test/test_read_format_rar5_hardlink.rar.uu - copied unchanged from r347989, vendor/libarchive/dist/libarchive/test/test_read_format_rar5_hardlink.rar.uu head/contrib/libarchive/libarchive/test/test_read_format_rar5_invalid_dict_reference.rar.uu - copied unchanged from r347989, vendor/libarchive/dist/libarchive/test/test_read_format_rar5_invalid_dict_reference.rar.uu head/contrib/libarchive/libarchive/test/test_read_format_rar5_leftshift1.rar.uu - copied unchanged from r347989, vendor/libarchive/dist/libarchive/test/test_read_format_rar5_leftshift1.rar.uu head/contrib/libarchive/libarchive/test/test_read_format_rar5_leftshift2.rar.uu - copied unchanged from r347989, vendor/libarchive/dist/libarchive/test/test_read_format_rar5_leftshift2.rar.uu head/contrib/libarchive/libarchive/test/test_read_format_rar5_nonempty_dir_stream.rar.uu - copied unchanged from r347989, vendor/libarchive/dist/libarchive/test/test_read_format_rar5_nonempty_dir_stream.rar.uu head/contrib/libarchive/libarchive/test/test_read_format_rar5_owner.rar.uu - copied unchanged from r347989, vendor/libarchive/dist/libarchive/test/test_read_format_rar5_owner.rar.uu head/contrib/libarchive/libarchive/test/test_read_format_rar5_readtables_overflow.rar.uu - copied unchanged from r347989, vendor/libarchive/dist/libarchive/test/test_read_format_rar5_readtables_overflow.rar.uu head/contrib/libarchive/libarchive/test/test_read_format_rar5_symlink.rar.uu - copied unchanged from r347989, vendor/libarchive/dist/libarchive/test/test_read_format_rar5_symlink.rar.uu head/contrib/libarchive/libarchive/test/test_read_format_rar5_truncated_huff.rar.uu - copied unchanged from r347989, vendor/libarchive/dist/libarchive/test/test_read_format_rar5_truncated_huff.rar.uu head/contrib/libarchive/libarchive/test/test_read_format_rar_ppmd_use_after_free.rar.uu - copied unchanged from r347989, vendor/libarchive/dist/libarchive/test/test_read_format_rar_ppmd_use_after_free.rar.uu head/contrib/libarchive/libarchive/test/test_read_format_raw.data.gz.uu - copied unchanged from r347989, vendor/libarchive/dist/libarchive/test/test_read_format_raw.data.gz.uu head/contrib/libarchive/libarchive/test/test_read_format_tar_empty_with_gnulabel.c - copied unchanged from r347989, vendor/libarchive/dist/libarchive/test/test_read_format_tar_empty_with_gnulabel.c head/contrib/libarchive/libarchive/test/test_read_format_tar_empty_with_gnulabel.tar.uu - copied unchanged from r347989, vendor/libarchive/dist/libarchive/test/test_read_format_tar_empty_with_gnulabel.tar.uu head/contrib/libarchive/libarchive/test/test_read_format_zip_7075_utf8_paths.c - copied unchanged from r347989, vendor/libarchive/dist/libarchive/test/test_read_format_zip_7075_utf8_paths.c head/contrib/libarchive/libarchive/test/test_read_format_zip_7075_utf8_paths.zip.uu - copied unchanged from r347989, vendor/libarchive/dist/libarchive/test/test_read_format_zip_7075_utf8_paths.zip.uu head/contrib/libarchive/libarchive/test/test_read_format_zip_extra_padding.c - copied unchanged from r347989, vendor/libarchive/dist/libarchive/test/test_read_format_zip_extra_padding.c head/contrib/libarchive/libarchive/test/test_read_format_zip_extra_padding.zip.uu - copied unchanged from r347989, vendor/libarchive/dist/libarchive/test/test_read_format_zip_extra_padding.zip.uu head/contrib/libarchive/libarchive/test/test_read_format_zip_lzma_alone_leak.zipx.uu - copied unchanged from r347989, vendor/libarchive/dist/libarchive/test/test_read_format_zip_lzma_alone_leak.zipx.uu head/contrib/libarchive/tar/test/test_option_exclude_vcs.c - copied unchanged from r347989, vendor/libarchive/dist/tar/test/test_option_exclude_vcs.c Modified: head/contrib/libarchive/NEWS head/contrib/libarchive/cpio/test/test_basic.c head/contrib/libarchive/cpio/test/test_format_newc.c head/contrib/libarchive/cpio/test/test_gcpio_compat.c head/contrib/libarchive/cpio/test/test_option_L_upper.c head/contrib/libarchive/cpio/test/test_option_a.c head/contrib/libarchive/cpio/test/test_option_c.c head/contrib/libarchive/libarchive/archive.h head/contrib/libarchive/libarchive/archive_entry.c head/contrib/libarchive/libarchive/archive_entry.h head/contrib/libarchive/libarchive/archive_entry_private.h head/contrib/libarchive/libarchive/archive_hmac.c head/contrib/libarchive/libarchive/archive_match.c head/contrib/libarchive/libarchive/archive_platform.h head/contrib/libarchive/libarchive/archive_read.c head/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c head/contrib/libarchive/libarchive/archive_read_disk_posix.c head/contrib/libarchive/libarchive/archive_read_private.h head/contrib/libarchive/libarchive/archive_read_set_format.c head/contrib/libarchive/libarchive/archive_read_support_filter_gzip.c head/contrib/libarchive/libarchive/archive_read_support_format_cab.c head/contrib/libarchive/libarchive/archive_read_support_format_mtree.c head/contrib/libarchive/libarchive/archive_read_support_format_rar.c head/contrib/libarchive/libarchive/archive_read_support_format_rar5.c head/contrib/libarchive/libarchive/archive_read_support_format_raw.c head/contrib/libarchive/libarchive/archive_read_support_format_tar.c head/contrib/libarchive/libarchive/archive_read_support_format_warc.c head/contrib/libarchive/libarchive/archive_read_support_format_xar.c head/contrib/libarchive/libarchive/archive_read_support_format_zip.c head/contrib/libarchive/libarchive/archive_util.c head/contrib/libarchive/libarchive/archive_write_add_filter_xz.c head/contrib/libarchive/libarchive/archive_write_disk_posix.c head/contrib/libarchive/libarchive/archive_write_set_format_pax.c head/contrib/libarchive/libarchive/archive_write_set_format_xar.c head/contrib/libarchive/libarchive/test/test_entry.c head/contrib/libarchive/libarchive/test/test_fuzz.c head/contrib/libarchive/libarchive/test/test_read_disk_directory_traversals.c head/contrib/libarchive/libarchive/test/test_read_extract.c head/contrib/libarchive/libarchive/test/test_read_format_mtree.c head/contrib/libarchive/libarchive/test/test_read_format_rar.c head/contrib/libarchive/libarchive/test/test_read_format_rar5.c head/contrib/libarchive/libarchive/test/test_read_format_rar5_win32.rar.uu head/contrib/libarchive/libarchive/test/test_read_format_raw.c head/contrib/libarchive/libarchive/test/test_read_format_zip.c head/contrib/libarchive/libarchive/test/test_sparse_basic.c head/contrib/libarchive/libarchive/test/test_write_disk_symlink.c head/contrib/libarchive/tar/bsdtar.1 head/contrib/libarchive/tar/bsdtar.c head/contrib/libarchive/tar/bsdtar.h head/contrib/libarchive/tar/cmdline.c head/contrib/libarchive/tar/test/test_basic.c head/contrib/libarchive/tar/test/test_copy.c head/contrib/libarchive/tar/test/test_option_C_mtree.c head/contrib/libarchive/tar/test/test_option_H_upper.c head/contrib/libarchive/tar/test/test_option_L_upper.c head/contrib/libarchive/tar/test/test_option_U_upper.c head/contrib/libarchive/tar/test/test_option_n.c head/contrib/libarchive/tar/test/test_option_s.c head/contrib/libarchive/tar/test/test_strip_components.c head/contrib/libarchive/tar/test/test_symlink_dir.c head/contrib/libarchive/test_utils/test_common.h head/contrib/libarchive/test_utils/test_main.c head/lib/libarchive/Makefile head/lib/libarchive/tests/Makefile head/usr.bin/tar/tests/Makefile Directory Properties: head/contrib/libarchive/ (props changed) Modified: head/contrib/libarchive/NEWS ============================================================================== --- head/contrib/libarchive/NEWS Mon May 20 12:32:00 2019 (r347989) +++ head/contrib/libarchive/NEWS Mon May 20 12:57:39 2019 (r347990) @@ -1,3 +1,13 @@ +Apr 16, 2019: Support for non-recursive list and extract + +Apr 14, 2019: New tar option: --exclude-vcs + +Mar 27, 2019: Support for file and directory symlinks on Windows + +Mar 12, 2019: Important fixes for storing file attributes and flags + +Jan 20, 2019: Support for xz, lzma, ppmd8 and bzip2 compression in zip archives + Oct 06, 2018: RAR 5.0 reader Sep 03, 2018: libarchive 3.3.3 released Modified: head/contrib/libarchive/cpio/test/test_basic.c ============================================================================== --- head/contrib/libarchive/cpio/test/test_basic.c Mon May 20 12:32:00 2019 (r347989) +++ head/contrib/libarchive/cpio/test/test_basic.c Mon May 20 12:57:39 2019 (r347990) @@ -46,7 +46,7 @@ verify_files(const char *msg) /* Symlink */ if (canSymlink()) - assertIsSymlink("symlink", "file"); + assertIsSymlink("symlink", "file", 0); /* Another file with 1 link and different permissions. */ failure(msg); @@ -173,7 +173,7 @@ DEFINE_TEST(test_basic) /* Symlink to above file. */ if (canSymlink()) { - assertMakeSymlink("symlink", "file"); + assertMakeSymlink("symlink", "file", 0); fprintf(filelist, "symlink\n"); if (is_LargeInode("symlink")) { strncat(result, Modified: head/contrib/libarchive/cpio/test/test_format_newc.c ============================================================================== --- head/contrib/libarchive/cpio/test/test_format_newc.c Mon May 20 12:32:00 2019 (r347989) +++ head/contrib/libarchive/cpio/test/test_format_newc.c Mon May 20 12:57:39 2019 (r347990) @@ -114,7 +114,7 @@ DEFINE_TEST(test_format_newc) /* "symlink" */ if (canSymlink()) { - assertMakeSymlink("symlink", "file1"); + assertMakeSymlink("symlink", "file1", 0); fprintf(list, "symlink\n"); } @@ -233,7 +233,12 @@ DEFINE_TEST(test_format_newc) assert(is_hex(e, 110)); assertEqualMem(e + 0, "070701", 6); /* Magic */ assert(is_hex(e + 6, 8)); /* ino */ +#if defined(_WIN32) && !defined(CYGWIN) + /* Mode: Group members bits and others bits do not work. */ + assertEqualInt(0xa180, from_hex(e + 14, 8) & 0xffc0); +#else assertEqualInt(0xa1ff, from_hex(e + 14, 8)); /* Mode */ +#endif assertEqualInt(from_hex(e + 22, 8), uid); /* uid */ assertEqualInt(gid, from_hex(e + 30, 8)); /* gid */ assertEqualMem(e + 38, "00000001", 8); /* nlink */ Modified: head/contrib/libarchive/cpio/test/test_gcpio_compat.c ============================================================================== --- head/contrib/libarchive/cpio/test/test_gcpio_compat.c Mon May 20 12:32:00 2019 (r347989) +++ head/contrib/libarchive/cpio/test/test_gcpio_compat.c Mon May 20 12:57:39 2019 (r347990) @@ -71,7 +71,7 @@ unpack_test(const char *from, const char *options, con /* Symlink */ if (canSymlink()) - assertIsSymlink("symlink", "file"); + assertIsSymlink("symlink", "file", 0); /* dir */ assertIsDir("dir", 0775); Modified: head/contrib/libarchive/cpio/test/test_option_L_upper.c ============================================================================== --- head/contrib/libarchive/cpio/test/test_option_L_upper.c Mon May 20 12:32:00 2019 (r347989) +++ head/contrib/libarchive/cpio/test/test_option_L_upper.c Mon May 20 12:57:39 2019 (r347990) @@ -30,8 +30,10 @@ __FBSDID("$FreeBSD$"); * tests won't run on Windows. */ #if defined(_WIN32) && !defined(__CYGWIN__) #define CAT "type" +#define SEP "\\" #else #define CAT "cat" +#define SEP "/" #endif DEFINE_TEST(test_option_L_upper) @@ -51,7 +53,7 @@ DEFINE_TEST(test_option_L_upper) fprintf(filelist, "file\n"); /* Symlink to above file. */ - assertMakeSymlink("symlink", "file"); + assertMakeSymlink("symlink", "file", 0); fprintf(filelist, "symlink\n"); fclose(filelist); @@ -61,7 +63,7 @@ DEFINE_TEST(test_option_L_upper) assertTextFileContents("1 block\n", "copy.err"); failure("Regular -p without -L should preserve symlinks."); - assertIsSymlink("copy/symlink", NULL); + assertIsSymlink("copy/symlink", NULL, 0); r = systemf(CAT " filelist | %s -pd -L copy-L >copy-L.out 2>copy-L.err", testprog); assertEqualInt(r, 0); @@ -77,13 +79,14 @@ DEFINE_TEST(test_option_L_upper) assertMakeDir("unpack", 0755); assertChdir("unpack"); - r = systemf(CAT " ../archive.out | %s -i >unpack.out 2>unpack.err", testprog); + r = systemf(CAT " .." SEP "archive.out | %s -i >unpack.out 2>unpack.err", testprog); + failure("Error invoking %s -i", testprog); assertEqualInt(r, 0); assertTextFileContents("1 block\n", "unpack.err"); assertChdir(".."); - assertIsSymlink("unpack/symlink", NULL); + assertIsSymlink("unpack/symlink", NULL, 0); r = systemf(CAT " filelist | %s -oL >archive-L.out 2>archive-L.err", testprog); failure("Error invoking %s -oL", testprog); @@ -92,7 +95,8 @@ DEFINE_TEST(test_option_L_upper) assertMakeDir("unpack-L", 0755); assertChdir("unpack-L"); - r = systemf(CAT " ../archive-L.out | %s -i >unpack-L.out 2>unpack-L.err", testprog); + r = systemf(CAT " .." SEP "archive-L.out | %s -i >unpack-L.out 2>unpack-L.err", testprog); + failure("Error invoking %s -i < archive-L.out", testprog); assertEqualInt(r, 0); assertTextFileContents("1 block\n", "unpack-L.err"); Modified: head/contrib/libarchive/cpio/test/test_option_a.c ============================================================================== --- head/contrib/libarchive/cpio/test/test_option_a.c Mon May 20 12:32:00 2019 (r347989) +++ head/contrib/libarchive/cpio/test/test_option_a.c Mon May 20 12:57:39 2019 (r347990) @@ -71,8 +71,13 @@ test_create(void) * #ifdef this section out. Most of the test below is * still valid. */ memset(×, 0, sizeof(times)); +#if defined(_WIN32) && !defined(CYGWIN) + times.actime = 86400; + times.modtime = 86400; +#else times.actime = 1; times.modtime = 3; +#endif assertEqualInt(0, utime(files[i].name, ×)); /* Record whatever atime the file ended up with. */ Modified: head/contrib/libarchive/cpio/test/test_option_c.c ============================================================================== --- head/contrib/libarchive/cpio/test/test_option_c.c Mon May 20 12:32:00 2019 (r347989) +++ head/contrib/libarchive/cpio/test/test_option_c.c Mon May 20 12:57:39 2019 (r347990) @@ -85,7 +85,7 @@ DEFINE_TEST(test_option_c) /* "symlink" */ if (canSymlink()) { - assertMakeSymlink("symlink", "file"); + assertMakeSymlink("symlink", "file", 0); fprintf(filelist, "symlink\n"); } Modified: head/contrib/libarchive/libarchive/archive.h ============================================================================== --- head/contrib/libarchive/libarchive/archive.h Mon May 20 12:32:00 2019 (r347989) +++ head/contrib/libarchive/libarchive/archive.h Mon May 20 12:57:39 2019 (r347990) @@ -338,9 +338,9 @@ typedef const char *archive_passphrase_callback(struct #define ARCHIVE_FORMAT_LHA 0xB0000 #define ARCHIVE_FORMAT_CAB 0xC0000 #define ARCHIVE_FORMAT_RAR 0xD0000 -#define ARCHIVE_FORMAT_RAR_V5 (ARCHIVE_FORMAT_RAR | 1) #define ARCHIVE_FORMAT_7ZIP 0xE0000 #define ARCHIVE_FORMAT_WARC 0xF0000 +#define ARCHIVE_FORMAT_RAR_V5 0x100000 /* * Codes returned by archive_read_format_capabilities(). @@ -1095,6 +1095,8 @@ __LA_DECL int archive_match_excluded(struct archive *, */ __LA_DECL int archive_match_path_excluded(struct archive *, struct archive_entry *); +/* Control recursive inclusion of directory content when directory is included. Default on. */ +__LA_DECL int archive_match_set_inclusion_recursion(struct archive *, int); /* Add exclusion pathname pattern. */ __LA_DECL int archive_match_exclude_pattern(struct archive *, const char *); __LA_DECL int archive_match_exclude_pattern_w(struct archive *, Modified: head/contrib/libarchive/libarchive/archive_entry.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_entry.c Mon May 20 12:32:00 2019 (r347989) +++ head/contrib/libarchive/libarchive/archive_entry.c Mon May 20 12:57:39 2019 (r347990) @@ -168,6 +168,7 @@ archive_entry_clear(struct archive_entry *entry) archive_entry_xattr_clear(entry); archive_entry_sparse_clear(entry); free(entry->stat); + entry->ae_symlink_type = AE_SYMLINK_TYPE_UNDEFINED; memset(entry, 0, sizeof(*entry)); return entry; } @@ -202,6 +203,9 @@ archive_entry_clone(struct archive_entry *entry) entry2->ae_set = entry->ae_set; archive_mstring_copy(&entry2->ae_uname, &entry->ae_uname); + /* Copy symlink type */ + entry2->ae_symlink_type = entry->ae_symlink_type; + /* Copy encryption status */ entry2->encryption = entry->encryption; @@ -253,6 +257,7 @@ archive_entry_new2(struct archive *a) if (entry == NULL) return (NULL); entry->archive = a; + entry->ae_symlink_type = AE_SYMLINK_TYPE_UNDEFINED; return (entry); } @@ -675,6 +680,12 @@ archive_entry_symlink(struct archive_entry *entry) return (NULL); } +int +archive_entry_symlink_type(struct archive_entry *entry) +{ + return (entry->ae_symlink_type); +} + const char * archive_entry_symlink_utf8(struct archive_entry *entry) { @@ -1246,6 +1257,12 @@ archive_entry_set_symlink(struct archive_entry *entry, } void +archive_entry_set_symlink_type(struct archive_entry *entry, int type) +{ + entry->ae_symlink_type = type; +} + +void archive_entry_set_symlink_utf8(struct archive_entry *entry, const char *linkname) { archive_mstring_copy_utf8(&entry->ae_symlink, linkname); @@ -1749,6 +1766,10 @@ static const struct flag { { "nohidden", L"nohidden", UF_HIDDEN, 0}, { "nouhidden", L"nouhidden", UF_HIDDEN, 0}, #endif +#ifdef FILE_ATTRIBUTE_HIDDEN + { "nohidden", L"nohidden", FILE_ATTRIBUTE_HIDDEN, 0}, + { "nouhidden", L"nouhidden", FILE_ATTRIBUTE_HIDDEN, 0}, +#endif #ifdef UF_OFFLINE { "nooffline", L"nooffline", UF_OFFLINE, 0}, { "nouoffline", L"nouoffline", UF_OFFLINE, 0}, @@ -1758,6 +1779,11 @@ static const struct flag { { "nourdonly", L"nourdonly", UF_READONLY, 0}, { "noreadonly", L"noreadonly", UF_READONLY, 0}, #endif +#ifdef FILE_ATTRIBUTE_READONLY + { "nordonly", L"nordonly", FILE_ATTRIBUTE_READONLY, 0}, + { "nourdonly", L"nourdonly", FILE_ATTRIBUTE_READONLY, 0}, + { "noreadonly", L"noreadonly", FILE_ATTRIBUTE_READONLY, 0}, +#endif #ifdef UF_SPARSE { "nosparse", L"nosparse", UF_SPARSE, 0}, { "nousparse", L"nousparse", UF_SPARSE, 0}, @@ -1769,6 +1795,10 @@ static const struct flag { #ifdef UF_SYSTEM { "nosystem", L"nosystem", UF_SYSTEM, 0}, { "nousystem", L"nousystem", UF_SYSTEM, 0}, +#endif +#ifdef FILE_ATTRIBUTE_SYSTEM + { "nosystem", L"nosystem", FILE_ATTRIBUTE_SYSTEM, 0}, + { "nousystem", L"nousystem", FILE_ATTRIBUTE_SYSTEM, 0}, #endif #if defined(FS_UNRM_FL) /* 'u' */ { "noundel", L"noundel", FS_UNRM_FL, 0}, Modified: head/contrib/libarchive/libarchive/archive_entry.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_entry.h Mon May 20 12:32:00 2019 (r347989) +++ head/contrib/libarchive/libarchive/archive_entry.h Mon May 20 12:57:39 2019 (r347990) @@ -191,6 +191,13 @@ struct archive_entry; #define AE_IFIFO ((__LA_MODE_T)0010000) /* + * Symlink types + */ +#define AE_SYMLINK_TYPE_UNDEFINED 0 +#define AE_SYMLINK_TYPE_FILE 1 +#define AE_SYMLINK_TYPE_DIRECTORY 2 + +/* * Basic object manipulation */ @@ -275,6 +282,7 @@ __LA_DECL int archive_entry_size_is_set(struct archi __LA_DECL const char *archive_entry_strmode(struct archive_entry *); __LA_DECL const char *archive_entry_symlink(struct archive_entry *); __LA_DECL const char *archive_entry_symlink_utf8(struct archive_entry *); +__LA_DECL int archive_entry_symlink_type(struct archive_entry *); __LA_DECL const wchar_t *archive_entry_symlink_w(struct archive_entry *); __LA_DECL la_int64_t archive_entry_uid(struct archive_entry *); __LA_DECL const char *archive_entry_uname(struct archive_entry *); @@ -350,6 +358,7 @@ __LA_DECL void archive_entry_unset_size(struct archive __LA_DECL void archive_entry_copy_sourcepath(struct archive_entry *, const char *); __LA_DECL void archive_entry_copy_sourcepath_w(struct archive_entry *, const wchar_t *); __LA_DECL void archive_entry_set_symlink(struct archive_entry *, const char *); +__LA_DECL void archive_entry_set_symlink_type(struct archive_entry *, int); __LA_DECL void archive_entry_set_symlink_utf8(struct archive_entry *, const char *); __LA_DECL void archive_entry_copy_symlink(struct archive_entry *, const char *); __LA_DECL void archive_entry_copy_symlink_w(struct archive_entry *, const wchar_t *); @@ -692,7 +701,6 @@ __LA_DECL void archive_entry_linkify(struct archive_en struct archive_entry **, struct archive_entry **); __LA_DECL struct archive_entry *archive_entry_partial_links( struct archive_entry_linkresolver *res, unsigned int *links); - #ifdef __cplusplus } #endif Copied: head/contrib/libarchive/libarchive/archive_entry_misc.3 (from r347989, vendor/libarchive/dist/libarchive/archive_entry_misc.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/libarchive/libarchive/archive_entry_misc.3 Mon May 20 12:57:39 2019 (r347990, copy of r347989, vendor/libarchive/dist/libarchive/archive_entry_misc.3) @@ -0,0 +1,62 @@ +.\" Copyright (c) 2019 Martin Matuska +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.Dd April 15, 2019 +.Dt ARCHIVE_ENTRY_MISC 3 +.Os +.Sh NAME +.Nm archive_entry_symlink_type , +.Nm archive_entry_set_symlink_type +.Nd miscellaneous functions for manipulating properties of archive_entry. +.Sh LIBRARY +Streaming Archive Library (libarchive, -larchive) +.Sh SYNOPSIS +.In archive_entry.h +.Ft int +.Fn archive_entry_symlink_type "struct archive_entry *a" +.Ft void +.Fn archive_entry_set_symlink_type "struct archive_entry *a" "int" +.Sh DESCRIPTION +The function +.Fn archive_entry_symlink_type +returns and the function +.Fn archive_entry_set_symlink_type +sets the type of the symbolic link stored in an archive entry. These functions +have special meaning on operating systems that support multiple symbolic link +types (e.g. Microsoft Windows). +.Pp +Supported values are: +.Bl -tag -width "AE_SYMLINK_TYPE_DIRECTORY" -compact +.It AE_SYMLINK_TYPE_UNDEFINED +Symbolic link target type is not defined (default on unix systems) +.It AE_SYMLINK_TYPE_FILE +Symbolic link points to a file +.It AE_SYMLINK_TYPE_DIRECTORY +Symbolic link points to a directory +.El +.Sh SEE ALSO +.Xr archive_entry 3 , +.Xr archive_entry_paths 3 , +.Xr archive_entry_stat 3 , +.Xr libarchive 3 Modified: head/contrib/libarchive/libarchive/archive_entry_private.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_entry_private.h Mon May 20 12:32:00 2019 (r347989) +++ head/contrib/libarchive/libarchive/archive_entry_private.h Mon May 20 12:57:39 2019 (r347990) @@ -176,6 +176,9 @@ struct archive_entry { /* Miscellaneous. */ char strmode[12]; + + /* Symlink type support */ + int ae_symlink_type; }; #endif /* ARCHIVE_ENTRY_PRIVATE_H_INCLUDED */ Modified: head/contrib/libarchive/libarchive/archive_hmac.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_hmac.c Mon May 20 12:32:00 2019 (r347989) +++ head/contrib/libarchive/libarchive/archive_hmac.c Mon May 20 12:57:39 2019 (r347990) @@ -83,6 +83,7 @@ __hmac_sha1_cleanup(archive_hmac_sha1_ctx *ctx) static int __hmac_sha1_init(archive_hmac_sha1_ctx *ctx, const uint8_t *key, size_t key_len) { +#pragma GCC diagnostic ignored "-Wcast-qual" BCRYPT_ALG_HANDLE hAlg; BCRYPT_HASH_HANDLE hHash; DWORD hash_len; Modified: head/contrib/libarchive/libarchive/archive_match.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_match.c Mon May 20 12:32:00 2019 (r347989) +++ head/contrib/libarchive/libarchive/archive_match.c Mon May 20 12:57:39 2019 (r347990) @@ -93,6 +93,9 @@ struct archive_match { /* exclusion/inclusion set flag. */ int setflag; + /* Recursively include directory content? */ + int recursive_include; + /* * Matching filename patterns. */ @@ -223,6 +226,7 @@ archive_match_new(void) return (NULL); a->archive.magic = ARCHIVE_MATCH_MAGIC; a->archive.state = ARCHIVE_STATE_NEW; + a->recursive_include = 1; match_list_init(&(a->inclusions)); match_list_init(&(a->exclusions)); __archive_rb_tree_init(&(a->exclusion_tree), &rb_ops_mbs); @@ -471,6 +475,28 @@ archive_match_path_excluded(struct archive *_a, } /* + * When recursive inclusion of directory content is enabled, + * an inclusion pattern that matches a directory will also + * include everything beneath that directory. Enabled by default. + * + * For compatibility with GNU tar, exclusion patterns always + * match if a subset of the full patch matches (i.e., they are + * are not rooted at the beginning of the path) and thus there + * is no corresponding non-recursive exclusion mode. + */ +int +archive_match_set_inclusion_recursion(struct archive *_a, int enabled) +{ + struct archive_match *a; + + archive_check_magic(_a, ARCHIVE_MATCH_MAGIC, + ARCHIVE_STATE_NEW, "archive_match_set_inclusion_recursion"); + a = (struct archive_match *)_a; + a->recursive_include = enabled; + return (ARCHIVE_OK); +} + +/* * Utility functions to get statistic information for inclusion patterns. */ int @@ -781,7 +807,10 @@ static int match_path_inclusion(struct archive_match *a, struct match *m, int mbs, const void *pn) { - int flag = PATHMATCH_NO_ANCHOR_END; + /* Recursive operation requires only a prefix match. */ + int flag = a->recursive_include ? + PATHMATCH_NO_ANCHOR_END : + 0; int r; if (mbs) { @@ -1232,7 +1261,7 @@ set_timefilter_pathname_mbs(struct archive_match *a, i archive_set_error(&(a->archive), EINVAL, "pathname is empty"); return (ARCHIVE_FAILED); } - if (stat(path, &st) != 0) { + if (la_stat(path, &st) != 0) { archive_set_error(&(a->archive), errno, "Failed to stat()"); return (ARCHIVE_FAILED); } Modified: head/contrib/libarchive/libarchive/archive_platform.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_platform.h Mon May 20 12:32:00 2019 (r347989) +++ head/contrib/libarchive/libarchive/archive_platform.h Mon May 20 12:57:39 2019 (r347990) @@ -69,6 +69,8 @@ * either Windows or Posix APIs. */ #if (defined(__WIN32__) || defined(_WIN32) || defined(__WIN32)) && !defined(__CYGWIN__) #include "archive_windows.h" +#else +#define la_stat(path,stref) stat(path,stref) #endif /* Modified: head/contrib/libarchive/libarchive/archive_read.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read.c Mon May 20 12:32:00 2019 (r347989) +++ head/contrib/libarchive/libarchive/archive_read.c Mon May 20 12:57:39 2019 (r347990) @@ -611,6 +611,15 @@ choose_filters(struct archive_read *a) return (ARCHIVE_FATAL); } +int +__archive_read_header(struct archive_read *a, struct archive_entry *entry) +{ + if (a->filter->read_header) + return a->filter->read_header(a->filter, entry); + else + return (ARCHIVE_OK); +} + /* * Read header of next entry. */ Modified: head/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c Mon May 20 12:32:00 2019 (r347989) +++ head/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c Mon May 20 12:57:39 2019 (r347990) @@ -191,7 +191,7 @@ archive_read_disk_entry_from_file(struct archive *_a, } } else #endif - if (stat(path, &s) != 0) { + if (la_stat(path, &s) != 0) { archive_set_error(&a->archive, errno, "Can't stat %s", path); return (ARCHIVE_FAILED); Modified: head/contrib/libarchive/libarchive/archive_read_disk_posix.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_disk_posix.c Mon May 20 12:32:00 2019 (r347989) +++ head/contrib/libarchive/libarchive/archive_read_disk_posix.c Mon May 20 12:57:39 2019 (r347990) @@ -909,7 +909,7 @@ next_entry(struct archive_read_disk *a, struct tree *t } } break; - } + } } while (lst == NULL); #ifdef __APPLE__ @@ -1295,10 +1295,23 @@ archive_read_disk_descend(struct archive *_a) if (t->visit_type != TREE_REGULAR || !t->descend) return (ARCHIVE_OK); + /* + * We must not treat the initial specified path as a physical dir, + * because if we do then we will try and ascend out of it by opening + * ".." which is (a) wrong and (b) causes spurious permissions errors + * if ".." is not readable by us. Instead, treat it as if it were a + * symlink. (This uses an extra fd, but it can only happen once at the + * top level of a traverse.) But we can't necessarily assume t->st is + * valid here (though t->lst is), which complicates the logic a + * little. + */ if (tree_current_is_physical_dir(t)) { tree_push(t, t->basename, t->current_filesystem_id, t->lst.st_dev, t->lst.st_ino, &t->restore_time); - t->stack->flags |= isDir; + if (t->stack->parent->parent != NULL) + t->stack->flags |= isDir; + else + t->stack->flags |= isDirLink; } else if (tree_current_is_dir(t)) { tree_push(t, t->basename, t->current_filesystem_id, t->st.st_dev, t->st.st_ino, &t->restore_time); @@ -2151,6 +2164,17 @@ tree_open(const char *path, int symlink_mode, int rest static struct tree * tree_reopen(struct tree *t, const char *path, int restore_time) { +#if defined(O_PATH) + /* Linux */ + const int o_flag = O_PATH; +#elif defined(O_SEARCH) + /* SunOS */ + const int o_flag = O_SEARCH; +#elif defined(O_EXEC) + /* FreeBSD */ + const int o_flag = O_EXEC; +#endif + t->flags = (restore_time != 0)?needsRestoreTimes:0; t->flags |= onInitialDir; t->visit_type = 0; @@ -2172,6 +2196,15 @@ tree_reopen(struct tree *t, const char *path, int rest t->stack->flags = needsFirstVisit; t->maxOpenCount = t->openCount = 1; t->initial_dir_fd = open(".", O_RDONLY | O_CLOEXEC); +#if defined(O_PATH) || defined(O_SEARCH) || defined(O_EXEC) + /* + * Most likely reason to fail opening "." is that it's not readable, + * so try again for execute. The consequences of not opening this are + * unhelpful and unnecessary errors later. + */ + if (t->initial_dir_fd < 0) + t->initial_dir_fd = open(".", o_flag | O_CLOEXEC); +#endif __archive_ensure_cloexec_flag(t->initial_dir_fd); t->working_dir_fd = tree_dup(t->initial_dir_fd); return (t); @@ -2479,7 +2512,7 @@ tree_current_stat(struct tree *t) #else if (tree_enter_working_dir(t) != 0) return NULL; - if (stat(tree_current_access_path(t), &t->st) != 0) + if (la_stat(tree_current_access_path(t), &t->st) != 0) #endif return NULL; t->flags |= hasStat; Modified: head/contrib/libarchive/libarchive/archive_read_private.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_private.h Mon May 20 12:32:00 2019 (r347989) +++ head/contrib/libarchive/libarchive/archive_read_private.h Mon May 20 12:57:39 2019 (r347990) @@ -98,6 +98,8 @@ struct archive_read_filter { int (*close)(struct archive_read_filter *self); /* Function that handles switching from reading one block to the next/prev */ int (*sswitch)(struct archive_read_filter *self, unsigned int iindex); + /* Read any header metadata if available. */ + int (*read_header)(struct archive_read_filter *self, struct archive_entry *entry); /* My private data. */ void *data; @@ -250,6 +252,7 @@ int64_t __archive_read_seek(struct archive_read*, int6 int64_t __archive_read_filter_seek(struct archive_read_filter *, int64_t, int); int64_t __archive_read_consume(struct archive_read *, int64_t); int64_t __archive_read_filter_consume(struct archive_read_filter *, int64_t); +int __archive_read_header(struct archive_read *, struct archive_entry *); int __archive_read_program(struct archive_read_filter *, const char *); void __archive_read_free_filters(struct archive_read *); struct archive_read_extract *__archive_read_get_extract(struct archive_read *); Modified: head/contrib/libarchive/libarchive/archive_read_set_format.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_set_format.c Mon May 20 12:32:00 2019 (r347989) +++ head/contrib/libarchive/libarchive/archive_read_set_format.c Mon May 20 12:57:39 2019 (r347990) @@ -73,6 +73,9 @@ archive_read_set_format(struct archive *_a, int code) case ARCHIVE_FORMAT_RAR: strcpy(str, "rar"); break; + case ARCHIVE_FORMAT_RAR_V5: + strcpy(str, "rar5"); + break; case ARCHIVE_FORMAT_TAR: strcpy(str, "tar"); break; Modified: head/contrib/libarchive/libarchive/archive_read_support_filter_gzip.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_filter_gzip.c Mon May 20 12:32:00 2019 (r347989) +++ head/contrib/libarchive/libarchive/archive_read_support_filter_gzip.c Mon May 20 12:57:39 2019 (r347990) @@ -37,6 +37,9 @@ __FBSDID("$FreeBSD$"); #ifdef HAVE_STRING_H #include #endif +#ifdef HAVE_LIMITS_H +#include +#endif #ifdef HAVE_UNISTD_H #include #endif @@ -45,6 +48,8 @@ __FBSDID("$FreeBSD$"); #endif #include "archive.h" +#include "archive_entry.h" +#include "archive_endian.h" #include "archive_private.h" #include "archive_read_private.h" @@ -56,6 +61,8 @@ struct private_data { size_t out_block_size; int64_t total_out; unsigned long crc; + uint32_t mtime; + char *name; char eof; /* True = found end of compressed data. */ }; @@ -123,7 +130,8 @@ archive_read_support_filter_gzip(struct archive *_a) * count of bits verified, suitable for use by bidder. */ static ssize_t -peek_at_header(struct archive_read_filter *filter, int *pbits) +peek_at_header(struct archive_read_filter *filter, int *pbits, + struct private_data *state) { const unsigned char *p; ssize_t avail, len; @@ -144,7 +152,9 @@ peek_at_header(struct archive_read_filter *filter, int return (0); bits += 3; header_flags = p[3]; - /* Bytes 4-7 are mod time. */ + /* Bytes 4-7 are mod time in little endian. */ + if (state) + state->mtime = archive_le32dec(p + 4); /* Byte 8 is deflate flags. */ /* XXXX TODO: return deflate flags back to consume_header for use in initializing the decompressor. */ @@ -161,6 +171,7 @@ peek_at_header(struct archive_read_filter *filter, int /* Null-terminated optional filename. */ if (header_flags & 8) { + ssize_t file_start = len; do { ++len; if (avail < len) @@ -169,6 +180,12 @@ peek_at_header(struct archive_read_filter *filter, int if (p == NULL) return (0); } while (p[len - 1] != 0); + + if (state) { + /* Reset the name in case of repeat header reads. */ + free(state->name); + state->name = strdup((const char *)&p[file_start]); + } } /* Null-terminated optional comment. */ @@ -214,12 +231,29 @@ gzip_bidder_bid(struct archive_read_filter_bidder *sel (void)self; /* UNUSED */ - if (peek_at_header(filter, &bits_checked)) + if (peek_at_header(filter, &bits_checked, NULL)) return (bits_checked); return (0); } +static int +gzip_read_header(struct archive_read_filter *self, struct archive_entry *entry) +{ + struct private_data *state; + state = (struct private_data *)self->data; + + /* A mtime of 0 is considered invalid/missing. */ + if (state->mtime != 0) + archive_entry_set_mtime(entry, state->mtime, 0); + + /* If the name is available, extract it. */ + if (state->name) + archive_entry_set_pathname(entry, state->name); + + return (ARCHIVE_OK); +} + #ifndef HAVE_ZLIB_H /* @@ -272,6 +306,7 @@ gzip_bidder_init(struct archive_read_filter *self) self->read = gzip_filter_read; self->skip = NULL; /* not supported */ self->close = gzip_filter_close; + self->read_header = gzip_read_header; state->in_stream = 0; /* We're not actually within a stream yet. */ @@ -289,7 +324,7 @@ consume_header(struct archive_read_filter *self) state = (struct private_data *)self->data; /* If this is a real header, consume it. */ - len = peek_at_header(self->upstream, NULL); + len = peek_at_header(self->upstream, NULL, state); if (len == 0) return (ARCHIVE_EOF); __archive_read_filter_consume(self->upstream, len); @@ -374,7 +409,7 @@ gzip_filter_read(struct archive_read_filter *self, con { struct private_data *state; size_t decompressed; - ssize_t avail_in; + ssize_t avail_in, max_in; int ret; state = (struct private_data *)self->data; @@ -408,6 +443,12 @@ gzip_filter_read(struct archive_read_filter *self, con "truncated gzip input"); return (ARCHIVE_FATAL); } + if (UINT_MAX >= SSIZE_MAX) + max_in = SSIZE_MAX; + else + max_in = UINT_MAX; + if (avail_in > max_in) + avail_in = max_in; state->stream.avail_in = (uInt)avail_in; /* Decompress and consume some of that data. */ @@ -469,6 +510,7 @@ gzip_filter_close(struct archive_read_filter *self) } } + free(state->name); free(state->out_block); free(state); return (ret); Modified: head/contrib/libarchive/libarchive/archive_read_support_format_cab.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_cab.c Mon May 20 12:32:00 2019 (r347989) +++ head/contrib/libarchive/libarchive/archive_read_support_format_cab.c Mon May 20 12:57:39 2019 (r347990) @@ -1509,8 +1509,8 @@ cab_read_ahead_cfdata_deflate(struct archive_read *a, } if (mszip == 1 && cab->stream.next_in[0] != 0x4b) goto nomszip; - else if (cab->stream.next_in[0] != 0x43 || - cab->stream.next_in[1] != 0x4b) + else if (mszip == 2 && (cab->stream.next_in[0] != 0x43 || + cab->stream.next_in[1] != 0x4b)) goto nomszip; cab->stream.next_in += mszip; cab->stream.avail_in -= mszip; Modified: head/contrib/libarchive/libarchive/archive_read_support_format_mtree.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_mtree.c Mon May 20 12:32:00 2019 (r347989) +++ head/contrib/libarchive/libarchive/archive_read_support_format_mtree.c Mon May 20 12:57:39 2019 (r347990) @@ -45,6 +45,9 @@ __FBSDID("$FreeBSD$"); #ifdef HAVE_STRING_H #include #endif +#ifdef HAVE_CTYPE_H +#include +#endif #include "archive.h" #include "archive_entry.h" @@ -1011,7 +1014,7 @@ read_mtree(struct archive_read *a, struct mtree *mtree { ssize_t len; uintmax_t counter; - char *p; + char *p, *s; struct mtree_option *global; struct mtree_entry *last_entry; int r, is_form_d; @@ -1025,6 +1028,7 @@ read_mtree(struct archive_read *a, struct mtree *mtree (void)detect_form(a, &is_form_d); for (counter = 1; ; ++counter) { + r = ARCHIVE_OK; len = readline(a, mtree, &p, 65536); if (len == 0) { mtree->this_entry = mtree->entries; @@ -1045,6 +1049,15 @@ read_mtree(struct archive_read *a, struct mtree *mtree continue; if (*p == '\r' || *p == '\n' || *p == '\0') continue; + /* Non-printable characters are not allowed */ + for (s = p;s < p + len - 1; s++) { + if (!isprint(*s)) { + r = ARCHIVE_FATAL; + break; + } + } + if (r != ARCHIVE_OK) + break; if (*p != '/') { r = process_add_entry(a, mtree, &global, p, len, &last_entry, is_form_d); Modified: head/contrib/libarchive/libarchive/archive_read_support_format_rar.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_rar.c Mon May 20 12:32:00 2019 (r347989) +++ head/contrib/libarchive/libarchive/archive_read_support_format_rar.c Mon May 20 12:57:39 2019 (r347990) @@ -1024,8 +1024,10 @@ archive_read_format_rar_read_data(struct archive_read case COMPRESS_METHOD_GOOD: case COMPRESS_METHOD_BEST: ret = read_data_compressed(a, buff, size, offset); - if (ret != ARCHIVE_OK && ret != ARCHIVE_WARN) + if (ret != ARCHIVE_OK && ret != ARCHIVE_WARN) { __archive_ppmd7_functions.Ppmd7_Free(&rar->ppmd7_context); + rar->start_new_table = 1; + } break; default: Modified: head/contrib/libarchive/libarchive/archive_read_support_format_rar5.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_rar5.c Mon May 20 12:32:00 2019 (r347989) +++ head/contrib/libarchive/libarchive/archive_read_support_format_rar5.c Mon May 20 12:57:39 2019 (r347990) @@ -33,6 +33,9 @@ #ifdef HAVE_ZLIB_H #include /* crc32 */ #endif +#ifdef HAVE_LIMITS_H +#include +#endif #include "archive.h" #ifndef HAVE_ZLIB_H @@ -78,230 +81,275 @@ static unsigned char rar5_signature[] = { 243, 192, 211, 128, 187, 166, 160, 161 }; static const ssize_t rar5_signature_size = sizeof(rar5_signature); -/* static const size_t g_unpack_buf_chunk_size = 1024; */ static const size_t g_unpack_window_size = 0x20000; +/* These could have been static const's, but they aren't, because of + * Visual Studio. */ +#define MAX_NAME_IN_CHARS 2048 +#define MAX_NAME_IN_BYTES (4 * MAX_NAME_IN_CHARS) + struct file_header { - ssize_t bytes_remaining; - ssize_t unpacked_size; - int64_t last_offset; /* Used in sanity checks. */ - int64_t last_size; /* Used in sanity checks. */ + ssize_t bytes_remaining; + ssize_t unpacked_size; + int64_t last_offset; /* Used in sanity checks. */ + int64_t last_size; /* Used in sanity checks. */ - uint8_t solid : 1; /* Is this a solid stream? */ - uint8_t service : 1; /* Is this file a service data? */ - uint8_t eof : 1; /* Did we finish unpacking the file? */ + uint8_t solid : 1; /* Is this a solid stream? */ + uint8_t service : 1; /* Is this file a service data? */ + uint8_t eof : 1; /* Did we finish unpacking the file? */ + uint8_t dir : 1; /* Is this file entry a directory? */ - /* Optional time fields. */ - uint64_t e_mtime; - uint64_t e_ctime; - uint64_t e_atime; - uint32_t e_unix_ns; + /* Optional time fields. */ + uint64_t e_mtime; + uint64_t e_ctime; + uint64_t e_atime; + uint32_t e_unix_ns; - /* Optional hash fields. */ - uint32_t stored_crc32; - uint32_t calculated_crc32; - uint8_t blake2sp[32]; - blake2sp_state b2state; - char has_blake2; + /* Optional hash fields. */ + uint32_t stored_crc32; + uint32_t calculated_crc32; + uint8_t blake2sp[32]; + blake2sp_state b2state; + char has_blake2; + + /* Optional redir fields */ + uint64_t redir_type; + uint64_t redir_flags; }; +enum EXTRA { + EX_CRYPT = 0x01, + EX_HASH = 0x02, + EX_HTIME = 0x03, + EX_VERSION = 0x04, + EX_REDIR = 0x05, + EX_UOWNER = 0x06, + EX_SUBDATA = 0x07 +}; + +#define REDIR_SYMLINK_IS_DIR 1 + +enum REDIR_TYPE { + REDIR_TYPE_NONE = 0, + REDIR_TYPE_UNIXSYMLINK = 1, + REDIR_TYPE_WINSYMLINK = 2, + REDIR_TYPE_JUNCTION = 3, + REDIR_TYPE_HARDLINK = 4, + REDIR_TYPE_FILECOPY = 5, +}; + +#define OWNER_USER_NAME 0x01 +#define OWNER_GROUP_NAME 0x02 +#define OWNER_USER_UID 0x04 +#define OWNER_GROUP_GID 0x08 +#define OWNER_MAXNAMELEN 256 + enum FILTER_TYPE { - FILTER_DELTA = 0, /* Generic pattern. */ - FILTER_E8 = 1, /* Intel x86 code. */ - FILTER_E8E9 = 2, /* Intel x86 code. */ - FILTER_ARM = 3, /* ARM code. */ - FILTER_AUDIO = 4, /* Audio filter, not used in RARv5. */ - FILTER_RGB = 5, /* Color palette, not used in RARv5. */ - FILTER_ITANIUM = 6, /* Intel's Itanium, not used in RARv5. */ - FILTER_PPM = 7, /* Predictive pattern matching, not used in RARv5. */ - FILTER_NONE = 8, + FILTER_DELTA = 0, /* Generic pattern. */ + FILTER_E8 = 1, /* Intel x86 code. */ + FILTER_E8E9 = 2, /* Intel x86 code. */ + FILTER_ARM = 3, /* ARM code. */ + FILTER_AUDIO = 4, /* Audio filter, not used in RARv5. */ + FILTER_RGB = 5, /* Color palette, not used in RARv5. */ + FILTER_ITANIUM = 6, /* Intel's Itanium, not used in RARv5. */ + FILTER_PPM = 7, /* Predictive pattern matching, not used in + RARv5. */ + FILTER_NONE = 8, }; struct filter_info { - int type; - int channels; - int pos_r; + int type; + int channels; + int pos_r; - int64_t block_start; - ssize_t block_length; - uint16_t width; + int64_t block_start; + ssize_t block_length; + uint16_t width; }; struct data_ready { - char used; - const uint8_t* buf; - size_t size; - int64_t offset; + char used; + const uint8_t* buf; + size_t size; + int64_t offset; }; struct cdeque { - uint16_t beg_pos; - uint16_t end_pos; - uint16_t cap_mask; - uint16_t size; - size_t* arr; + uint16_t beg_pos; + uint16_t end_pos; + uint16_t cap_mask; + uint16_t size; + size_t* arr; }; struct decode_table { - uint32_t size; - int32_t decode_len[16]; - uint32_t decode_pos[16]; - uint32_t quick_bits; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Mon May 20 16:00:33 2019 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 A118F15B10D7; Mon, 20 May 2019 16:00:33 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48A4384740; Mon, 20 May 2019 16:00:33 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1F00320700; Mon, 20 May 2019 16:00:33 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4KG0XH1003963; Mon, 20 May 2019 16:00:33 GMT (envelope-from luporl@FreeBSD.org) Received: (from luporl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4KG0WVI003962; Mon, 20 May 2019 16:00:33 GMT (envelope-from luporl@FreeBSD.org) Message-Id: <201905201600.x4KG0WVI003962@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luporl set sender to luporl@FreeBSD.org using -f From: Leandro Lupori Date: Mon, 20 May 2019 16:00:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r347992 - head/gnu/usr.bin/binutils X-SVN-Group: head X-SVN-Commit-Author: luporl X-SVN-Commit-Paths: head/gnu/usr.bin/binutils X-SVN-Commit-Revision: 347992 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 48A4384740 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 16:00:33 -0000 Author: luporl Date: Mon May 20 16:00:32 2019 New Revision: 347992 URL: https://svnweb.freebsd.org/changeset/base/347992 Log: [PPC] Enable build/install of ld.bfd on base When using LLVM+clang+lld on PowerPC64, ld.bfd is also needed, to link 32-bit binaries correctly, as lld support for 32-bit is still minimal. This change enables it to be built and installed when lld is used. Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D20259 Modified: head/gnu/usr.bin/binutils/Makefile Modified: head/gnu/usr.bin/binutils/Makefile ============================================================================== --- head/gnu/usr.bin/binutils/Makefile Mon May 20 15:58:44 2019 (r347991) +++ head/gnu/usr.bin/binutils/Makefile Mon May 20 16:00:32 2019 (r347992) @@ -13,7 +13,9 @@ SUBDIR.${MK_BINUTILS}+= objdump # When we use ld.lld as /usr/bin/ld, do not install the non-ifunc-capable # GNU binutils 2.17.50 ld. -.if ${MK_LLD_IS_LD} == "no" +# Except if we are on powerpc, that needs the ld from binutils to link +# 32-bit binaries. +.if ${MK_LLD_IS_LD} == "no" || ${TARGET} == "powerpc" SUBDIR.${MK_BINUTILS}+=ld .endif From owner-svn-src-head@freebsd.org Mon May 20 16:38:13 2019 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 4BCF415B2173; Mon, 20 May 2019 16:38:13 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F03B086677; Mon, 20 May 2019 16:38:12 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C542520DD5; Mon, 20 May 2019 16:38:12 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4KGcCI3024667; Mon, 20 May 2019 16:38:12 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4KGcC53024665; Mon, 20 May 2019 16:38:12 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201905201638.x4KGcC53024665@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Mon, 20 May 2019 16:38:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r347996 - head/tests/sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/tests/sys/opencrypto X-SVN-Commit-Revision: 347996 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F03B086677 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 16:38:13 -0000 Author: ngie Date: Mon May 20 16:38:12 2019 New Revision: 347996 URL: https://svnweb.freebsd.org/changeset/base/347996 Log: Replace uses of `foo.(de|en)code('hex')` with `binascii.(un)?hexlify(foo)` Python 3 no longer doesn't support encoding/decoding hexadecimal numbers using the `str.format` method. The backwards compatible new method (using the binascii module/methods) is a comparable means of converting to/from hexadecimal format. In short, the functional change is the following: * `foo.decode('hex')` -> `binascii.unhexlify(foo)` * `foo.encode('hex')` -> `binascii.hexlify(foo)` While here, move the dpkt import in `cryptodev.py` down per PEP8, so it comes after the standard library provided imports. PR: 237403 MFC after: 1 week Modified: head/tests/sys/opencrypto/cryptodev.py head/tests/sys/opencrypto/cryptotest.py Modified: head/tests/sys/opencrypto/cryptodev.py ============================================================================== --- head/tests/sys/opencrypto/cryptodev.py Mon May 20 16:31:45 2019 (r347995) +++ head/tests/sys/opencrypto/cryptodev.py Mon May 20 16:38:12 2019 (r347996) @@ -32,7 +32,7 @@ from __future__ import print_function import array -import dpkt +import binascii from fcntl import ioctl import os import random @@ -40,6 +40,8 @@ import signal from struct import pack as _pack import time +import dpkt + from cryptodevh import * __all__ = [ 'Crypto', 'MismatchError', ] @@ -493,7 +495,7 @@ class KATCCMParser: def _spdechex(s): - return ''.join(s.split()).decode('hex') + return binascii.hexlify(''.join(s.split())) if __name__ == '__main__': if True: @@ -525,15 +527,15 @@ if __name__ == '__main__': c = Crypto(CRYPTO_AES_ICM, key) enc = c.encrypt(pt, iv) - print('enc:', enc.encode('hex')) - print(' ct:', ct.encode('hex')) + print('enc:', binascii.hexlify(enc)) + print(' ct:', binascii.hexlify(ct)) assert ct == enc dec = c.decrypt(ct, iv) - print('dec:', dec.encode('hex')) - print(' pt:', pt.encode('hex')) + print('dec:', binascii.hexlify(dec)) + print(' pt:', binascii.hexlify(pt)) assert pt == dec elif False: @@ -546,15 +548,15 @@ if __name__ == '__main__': c = Crypto(CRYPTO_AES_ICM, key) enc = c.encrypt(pt, iv) - print('enc:', enc.encode('hex')) - print(' ct:', ct.encode('hex')) + print('enc:', binascii.hexlify(enc)) + print(' ct:', binascii.hexlify(ct)) assert ct == enc dec = c.decrypt(ct, iv) - print('dec:', dec.encode('hex')) - print(' pt:', pt.encode('hex')) + print('dec:', binascii.hexlify(dec)) + print(' pt:', binascii.hexlify(pt)) assert pt == dec elif False: @@ -566,15 +568,15 @@ if __name__ == '__main__': enc = c.encrypt(pt, iv) - print('enc:', enc.encode('hex')) - print(' ct:', ct.encode('hex')) + print('enc:', binascii.hexlify(enc)) + print(' ct:', binascii.hexlify(ct)) assert ct == enc dec = c.decrypt(ct, iv) - print('dec:', dec.encode('hex')) - print(' pt:', pt.encode('hex')) + print('dec:', binascii.hexlify(dec)) + print(' pt:', binascii.hexlify(pt)) assert pt == dec elif False: @@ -592,26 +594,26 @@ if __name__ == '__main__': enc, enctag = c.encrypt(pt, iv, aad=aad) - print('enc:', enc.encode('hex')) - print(' ct:', ct.encode('hex')) + print('enc:', binascii.hexlify(enc)) + print(' ct:', binascii.hexlify(ct)) assert enc == ct - print('etg:', enctag.encode('hex')) - print('tag:', tag.encode('hex')) + print('etg:', binascii.hexlify(enctag)) + print('tag:', binascii.hexlify(tag)) assert enctag == tag # Make sure we get EBADMSG #enctag = enctag[:-1] + 'a' dec, dectag = c.decrypt(ct, iv, aad=aad, tag=enctag) - print('dec:', dec.encode('hex')) - print(' pt:', pt.encode('hex')) + print('dec:', binascii.hexlify(dec)) + print(' pt:', binascii.hexlify(pt)) assert dec == pt - print('dtg:', dectag.encode('hex')) - print('tag:', tag.encode('hex')) + print('dtg:', binascii.hexlify(dectag)) + print('tag:', binascii.hexlify(tag)) assert dectag == tag elif False: @@ -628,27 +630,27 @@ if __name__ == '__main__': enc, enctag = c.encrypt(pt, iv, aad=aad) - print('enc:', enc.encode('hex')) - print(' ct:', ct.encode('hex')) + print('enc:', binascii.hexlify(enc)) + print(' ct:', binascii.hexlify(ct)) assert enc == ct - print('etg:', enctag.encode('hex')) - print('tag:', tag.encode('hex')) + print('etg:', binascii.hexlify(enctag)) + print('tag:', binascii.hexlify(tag)) assert enctag == tag elif False: for i in range(100000): - c = Crypto(CRYPTO_AES_XTS, '1bbfeadf539daedcae33ced497343f3ca1f2474ad932b903997d44707db41382'.decode('hex')) - data = '52a42bca4e9425a25bbc8c8bf6129dec'.decode('hex') - ct = '517e602becd066b65fa4f4f56ddfe240'.decode('hex') + c = Crypto(CRYPTO_AES_XTS, binascii.unhexlify('1bbfeadf539daedcae33ced497343f3ca1f2474ad932b903997d44707db41382')) + data = binascii.unhexlify('52a42bca4e9425a25bbc8c8bf6129dec') + ct = binascii.unhexlify('517e602becd066b65fa4f4f56ddfe240') iv = _pack('QQ', 71, 0) enc = c.encrypt(data, iv) assert enc == ct elif True: - c = Crypto(CRYPTO_AES_XTS, '1bbfeadf539daedcae33ced497343f3ca1f2474ad932b903997d44707db41382'.decode('hex')) - data = '52a42bca4e9425a25bbc8c8bf6129dec'.decode('hex') - ct = '517e602becd066b65fa4f4f56ddfe240'.decode('hex') + c = Crypto(CRYPTO_AES_XTS, binascii.unhexlify('1bbfeadf539daedcae33ced497343f3ca1f2474ad932b903997d44707db41382')) + data = binascii.unhexlify('52a42bca4e9425a25bbc8c8bf6129dec') + ct = binascii.unhexlify('517e602becd066b65fa4f4f56ddfe240') iv = _pack('QQ', 71, 0) enc = c.encrypt(data, iv) @@ -660,7 +662,7 @@ if __name__ == '__main__': #c.perftest(COP_ENCRYPT, 192*1024, reps=30000) else: - key = '1bbfeadf539daedcae33ced497343f3ca1f2474ad932b903997d44707db41382'.decode('hex') + key = binascii.unhexlify('1bbfeadf539daedcae33ced497343f3ca1f2474ad932b903997d44707db41382') print('XTS %d testing:' % (len(key) * 8)) c = Crypto(CRYPTO_AES_XTS, key) for i in [ 8192, 192*1024]: Modified: head/tests/sys/opencrypto/cryptotest.py ============================================================================== --- head/tests/sys/opencrypto/cryptotest.py Mon May 20 16:31:45 2019 (r347995) +++ head/tests/sys/opencrypto/cryptotest.py Mon May 20 16:38:12 2019 (r347996) @@ -30,6 +30,8 @@ # from __future__ import print_function + +import binascii import errno import cryptodev import itertools @@ -106,13 +108,13 @@ def GenTestCase(cname): [ 'Count', 'Key', 'IV', 'CT', 'AAD', 'Tag', 'PT', ]): for data in lines: curcnt = int(data['Count']) - cipherkey = data['Key'].decode('hex') - iv = data['IV'].decode('hex') - aad = data['AAD'].decode('hex') - tag = data['Tag'].decode('hex') + cipherkey = binascii.unhexlify(data['Key']) + iv = binascii.unhexlify(data['IV']) + aad = binascii.unhexlify(data['AAD']) + tag = binascii.unhexlify(data['Tag']) if 'FAIL' not in data: - pt = data['PT'].decode('hex') - ct = data['CT'].decode('hex') + pt = binascii.unhexlify(data['PT']) + ct = binascii.unhexlify(data['CT']) if len(iv) != 12: # XXX - isn't supported @@ -139,8 +141,8 @@ def GenTestCase(cname): raise continue rtag = rtag[:len(tag)] - data['rct'] = rct.encode('hex') - data['rtag'] = rtag.encode('hex') + data['rct'] = binascii.hexlify(rct) + data['rtag'] = binascii.hexlify(rtag) self.assertEqual(rct, ct, repr(data)) self.assertEqual(rtag, tag, repr(data)) else: @@ -158,8 +160,8 @@ def GenTestCase(cname): if e.errno != errno.EINVAL: raise continue - data['rpt'] = rpt.encode('hex') - data['rtag'] = rtag.encode('hex') + data['rpt'] = binascii.hexlify(rpt) + data['rtag'] = binascii.hexlify(rtag) self.assertEqual(rpt, pt, repr(data)) @@ -178,10 +180,10 @@ def GenTestCase(cname): for data in lines: curcnt = int(data['COUNT']) - cipherkey = data['KEY'].decode('hex') - iv = data['IV'].decode('hex') - pt = data['PLAINTEXT'].decode('hex') - ct = data['CIPHERTEXT'].decode('hex') + cipherkey = binascii.unhexlify(data['KEY']) + iv = binascii.unhexlify(data['IV']) + pt = binascii.unhexlify(data['PLAINTEXT']) + ct = binascii.unhexlify(data['CIPHERTEXT']) if swapptct: pt, ct = ct, pt @@ -207,10 +209,10 @@ def GenTestCase(cname): for data in lines: curcnt = int(data['COUNT']) nbits = int(data['DataUnitLen']) - cipherkey = data['Key'].decode('hex') + cipherkey = binascii.unhexlify(data['Key']) iv = struct.pack('QQ', int(data['DataUnitSeqNumber']), 0) - pt = data['PT'].decode('hex') - ct = data['CT'].decode('hex') + pt = binascii.unhexlify(data['PT']) + ct = binascii.unhexlify(data['CT']) if nbits % 128 != 0: # XXX - mark as skipped @@ -234,15 +236,15 @@ def GenTestCase(cname): if Nlen != 12: # OCF only supports 12 byte IVs continue - key = data['Key'].decode('hex') - nonce = data['Nonce'].decode('hex') + key = binascii.unhexlify(data['Key']) + nonce = binascii.unhexlify(data['Nonce']) Alen = int(data['Alen']) if Alen != 0: - aad = data['Adata'].decode('hex') + aad = binascii.unhexlify(data['Adata']) else: aad = None - payload = data['Payload'].decode('hex') - ct = data['CT'].decode('hex') + payload = binascii.unhexlify(data['Payload']) + ct = binascii.unhexlify(data['CT']) try: c = Crypto(crid=crid, @@ -277,14 +279,14 @@ def GenTestCase(cname): if Tlen != 16: # OCF only supports 16 byte tags continue - key = data['Key'].decode('hex') - nonce = data['Nonce'].decode('hex') + key = binascii.unhexlify(data['Key']) + nonce = binascii.unhexlify(data['Nonce']) Alen = int(data['Alen']) if Alen != 0: - aad = data['Adata'].decode('hex') + aad = binascii.unhexlify(data['Adata']) else: aad = None - ct = data['CT'].decode('hex') + ct = binascii.unhexlify(data['CT']) tag = ct[-16:] ct = ct[:-16] @@ -306,7 +308,7 @@ def GenTestCase(cname): r = Crypto.decrypt(c, payload, nonce, aad, tag) - payload = data['Payload'].decode('hex') + payload = binascii.unhexlify(data['Payload']) plen = int(data('Plen')) payload = payload[:plen] self.assertEqual(r, payload, @@ -339,10 +341,10 @@ def GenTestCase(cname): for data in lines: curcnt = int(data['COUNT']) key = data['KEYs'] * 3 - cipherkey = key.decode('hex') - iv = data['IV'].decode('hex') - pt = data['PLAINTEXT'].decode('hex') - ct = data['CIPHERTEXT'].decode('hex') + cipherkey = binascii.unhexlify(key) + iv = binascii.unhexlify(data['IV']) + pt = binascii.unhexlify(data['PLAINTEXT']) + ct = binascii.unhexlify(data['CIPHERTEXT']) if swapptct: pt, ct = ct, pt @@ -387,9 +389,9 @@ def GenTestCase(cname): continue for data in lines: - msg = data['Msg'].decode('hex') + msg = binascii.unhexlify(data['Msg']) msg = msg[:int(data['Len'])] - md = data['MD'].decode('hex') + md = binascii.unhexlify(data['MD']) try: c = Crypto(mac=alg, crid=crid, @@ -440,9 +442,9 @@ def GenTestCase(cname): continue for data in lines: - key = data['Key'].decode('hex') - msg = data['Msg'].decode('hex') - mac = data['Mac'].decode('hex') + key = binascii.unhexlify(data['Key']) + msg = binascii.unhexlify(data['Msg']) + mac = binascii.unhexlify(data['Mac']) tlen = int(data['Tlen']) if len(key) > blocksize: From owner-svn-src-head@freebsd.org Mon May 20 17:43:59 2019 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 BFF9815B3E89; Mon, 20 May 2019 17:43:59 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6542189505; Mon, 20 May 2019 17:43:59 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3FAD021996; Mon, 20 May 2019 17:43:59 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4KHhxAq061645; Mon, 20 May 2019 17:43:59 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4KHhxYU061644; Mon, 20 May 2019 17:43:59 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201905201743.x4KHhxYU061644@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 20 May 2019 17:43:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r347998 - head/sys/mips/mediatek X-SVN-Group: head X-SVN-Commit-Author: adrian X-SVN-Commit-Paths: head/sys/mips/mediatek X-SVN-Commit-Revision: 347998 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6542189505 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 17:44:00 -0000 Author: adrian Date: Mon May 20 17:43:58 2019 New Revision: 347998 URL: https://svnweb.freebsd.org/changeset/base/347998 Log: [mediatek] Add support for non-flash devices on the SPI bus of the Mediatek SoCs. The existing SPI support only worked for directly attached flash chips. it didn't implement clock programming or chipselect. It also supports transfers with unbalanced tx/rx command sizes. Submitted by: Differential Revision: https://reviews.freebsd.org/D20101 Modified: head/sys/mips/mediatek/mtk_spi_v1.c Modified: head/sys/mips/mediatek/mtk_spi_v1.c ============================================================================== --- head/sys/mips/mediatek/mtk_spi_v1.c Mon May 20 16:39:31 2019 (r347997) +++ head/sys/mips/mediatek/mtk_spi_v1.c Mon May 20 17:43:58 2019 (r347998) @@ -43,6 +43,11 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include "gpiobus_if.h" + +#include + #include #include #include "spibus_if.h" @@ -53,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -81,6 +87,8 @@ __FBSDID("$FreeBSD$"); struct mtk_spi_softc { device_t sc_dev; struct resource *sc_mem_res; + struct gpiobus_pin *gpio_cs; + int nonflash; }; static int mtk_spi_probe(device_t); @@ -127,7 +135,7 @@ mtk_spi_attach(device_t dev) sc->sc_dev = dev; rid = 0; sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, - RF_ACTIVE); + RF_SHAREABLE | RF_ACTIVE); if (!sc->sc_mem_res) { device_printf(dev, "Could not map memory\n"); return (ENXIO); @@ -138,14 +146,20 @@ mtk_spi_attach(device_t dev) return (EBUSY); } - SPI_WRITE(sc, MTK_SPICFG, MSBFIRST | SPICLKPOL | TX_ON_CLK_FALL | - SPI_CLK_DIV8); /* XXX: make it configurable */ - /* - * W25Q64CV max 104MHz, bus 120-192 MHz, so divide by 2. - * Update: divide by 4, DEV2 to fast for flash. - */ + if (ofw_bus_has_prop(dev, "non-flash")) + sc->nonflash = 1; + else + sc->nonflash = 0; - device_add_child(dev, "spibus", 0); + ofw_gpiobus_parse_gpios(dev, "cs-gpios", &sc->gpio_cs); + + if (sc->gpio_cs != NULL) { + GPIO_PIN_SETFLAGS(sc->gpio_cs->dev, sc->gpio_cs->pin, + GPIO_PIN_OUTPUT); + GPIO_PIN_SET(sc->gpio_cs->dev, sc->gpio_cs->pin, 1); + } + + device_add_child(dev, "spibus", -1); return (bus_generic_attach(dev)); } @@ -169,7 +183,12 @@ mtk_spi_chip_activate(struct mtk_spi_softc *sc) /* * Put all CSx to low */ - SPI_CLEAR_BITS(sc, MTK_SPICTL, CS_HIGH | HIZSMOSI); + if (sc->gpio_cs != NULL) { + GPIO_PIN_SET(sc->gpio_cs->dev, sc->gpio_cs->pin, 0); + SPI_CLEAR_BITS(sc, MTK_SPICTL, HIZSMOSI); + } else { + SPI_CLEAR_BITS(sc, MTK_SPICTL, CS_HIGH | HIZSMOSI); + } } static void @@ -179,7 +198,12 @@ mtk_spi_chip_deactivate(struct mtk_spi_softc *sc) /* * Put all CSx to high */ - SPI_SET_BITS(sc, MTK_SPICTL, CS_HIGH | HIZSMOSI); + if (sc->gpio_cs != NULL) { + GPIO_PIN_SET(sc->gpio_cs->dev, sc->gpio_cs->pin, 1); + SPI_SET_BITS(sc, MTK_SPICTL, HIZSMOSI); + } else { + SPI_SET_BITS(sc, MTK_SPICTL, CS_HIGH | HIZSMOSI); + } } static int @@ -224,12 +248,15 @@ mtk_spi_transfer(device_t dev, device_t child, struct { struct mtk_spi_softc *sc; uint8_t *buf, byte, *tx_buf; - uint32_t cs; + uint32_t cs, clock, mode; int i, sz, error = 0, write = 0; + int div, clk, cfgreg; sc = device_get_softc(dev); spibus_get_cs(child, &cs); + spibus_get_clock(child, &clock); + spibus_get_mode(child, &mode); cs &= ~SPIBUS_CS_HIGH; @@ -237,44 +264,80 @@ mtk_spi_transfer(device_t dev, device_t child, struct /* Only 1 CS */ return (ENXIO); - /* There is always a command to transfer. */ - tx_buf = (uint8_t *)(cmd->tx_cmd); - - /* Perform some fixup because MTK dont support duplex SPI */ - switch(tx_buf[0]) { - case CMD_READ_IDENT: - cmd->tx_cmd_sz = 1; - cmd->rx_cmd_sz = 3; + cfgreg = MSBFIRST; + switch(mode) { + case 0: /* This is workadound because of + mode 0 not work this soc. */ + case 3: + cfgreg |= SPICLKPOL | TX_ON_CLK_FALL; break; - case CMD_ENTER_4B_MODE: - case CMD_EXIT_4B_MODE: - case CMD_WRITE_ENABLE: - case CMD_WRITE_DISABLE: - cmd->tx_cmd_sz = 1; - cmd->rx_cmd_sz = 0; + case 1: + cfgreg |= TX_ON_CLK_FALL; break; - case CMD_READ_STATUS: - cmd->tx_cmd_sz = 1; - cmd->rx_cmd_sz = 1; + case 2: + cfgreg |= CAPT_ON_CLK_FALL; break; - case CMD_READ: - case CMD_FAST_READ: - cmd->rx_cmd_sz = cmd->tx_data_sz = 0; - break; - case CMD_SECTOR_ERASE: - cmd->rx_cmd_sz = 0; - break; - case CMD_PAGE_PROGRAM: - cmd->rx_cmd_sz = cmd->rx_data_sz = 0; - break; - } + } + + /* + * W25Q64CV max 104MHz, bus 120-192 MHz, so divide by 2. + * Update: divide by 4, DEV2 to fast for flash. + */ + if (clock != 0) { + div = (mtk_soc_get_cpuclk() + (clock - 1)) / clock; + clk = fls(div) - 2; + if (clk < 0) + clk = 0; + else if (clk > 6) + clk = 6; + } else { + clk = 6; + } + + SPI_WRITE(sc, MTK_SPICFG, cfgreg | clk); + + if (sc->nonflash == 0) { + /* There is always a command to transfer. */ + tx_buf = (uint8_t *)(cmd->tx_cmd); + + /* Perform some fixup because MTK dont support duplex SPI */ + switch(tx_buf[0]) { + case CMD_READ_IDENT: + cmd->tx_cmd_sz = 1; + cmd->rx_cmd_sz = 3; + break; + case CMD_ENTER_4B_MODE: + case CMD_EXIT_4B_MODE: + case CMD_WRITE_ENABLE: + case CMD_WRITE_DISABLE: + cmd->tx_cmd_sz = 1; + cmd->rx_cmd_sz = 0; + break; + case CMD_READ_STATUS: + cmd->tx_cmd_sz = 1; + cmd->rx_cmd_sz = 1; + break; + case CMD_READ: + case CMD_FAST_READ: + cmd->rx_cmd_sz = cmd->tx_data_sz = 0; + break; + case CMD_SECTOR_ERASE: + cmd->rx_cmd_sz = 0; + break; + case CMD_PAGE_PROGRAM: + cmd->rx_cmd_sz = cmd->rx_data_sz = 0; + break; + } + } mtk_spi_chip_activate(sc); if (cmd->tx_cmd_sz + cmd->rx_cmd_sz) { buf = (uint8_t *)(cmd->rx_cmd); tx_buf = (uint8_t *)(cmd->tx_cmd); - sz = cmd->tx_cmd_sz + cmd->rx_cmd_sz; + sz = cmd->tx_cmd_sz; + if (sc->nonflash == 0) + sz += cmd->rx_cmd_sz; for (i = 0; i < sz; i++) { if(i < cmd->tx_cmd_sz) { From owner-svn-src-head@freebsd.org Mon May 20 18:07:46 2019 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 5FEE815B46A3; Mon, 20 May 2019 18:07:46 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F28EF8A2BA; Mon, 20 May 2019 18:07:45 +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 C79E121CFF; Mon, 20 May 2019 18:07:45 +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 x4KI7jv9072282; Mon, 20 May 2019 18:07:45 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4KI7jov072281; Mon, 20 May 2019 18:07:45 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <201905201807.x4KI7jov072281@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Mon, 20 May 2019 18:07:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r347999 - head/lib/libarchive/tests X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/lib/libarchive/tests X-SVN-Commit-Revision: 347999 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F28EF8A2BA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 18:07:46 -0000 Author: lwhsu Date: Mon May 20 18:07:45 2019 New Revision: 347999 URL: https://svnweb.freebsd.org/changeset/base/347999 Log: Install missing data file for lib.libarchive.functional_test.test_read_format_zip_utf8_paths MFC after: 2 weeks (with r347989) Sponsored by: The FreeBSD Foundation Modified: head/lib/libarchive/tests/Makefile Modified: head/lib/libarchive/tests/Makefile ============================================================================== --- head/lib/libarchive/tests/Makefile Mon May 20 17:43:58 2019 (r347998) +++ head/lib/libarchive/tests/Makefile Mon May 20 18:07:45 2019 (r347999) @@ -557,6 +557,7 @@ ${PACKAGE}FILES+= test_read_format_ustar_filename_eucj ${PACKAGE}FILES+= test_read_format_ustar_filename_koi8r.tar.Z.uu ${PACKAGE}FILES+= test_read_format_warc.warc.uu ${PACKAGE}FILES+= test_read_format_zip.zip.uu +${PACKAGE}FILES+= test_read_format_zip_7075_utf8_paths.zip.uu ${PACKAGE}FILES+= test_read_format_zip_bz2_hang.zip.uu ${PACKAGE}FILES+= test_read_format_zip_bzip2.zipx.uu ${PACKAGE}FILES+= test_read_format_zip_bzip2_multi.zipx.uu From owner-svn-src-head@freebsd.org Mon May 20 18:15:25 2019 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 9CF6115B4E2F; Mon, 20 May 2019 18:15:25 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15B228BF24; Mon, 20 May 2019 18:15:24 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x4KIFM6H074972; Mon, 20 May 2019 11:15:22 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x4KIFMw4074971; Mon, 20 May 2019 11:15:22 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201905201815.x4KIFMw4074971@gndrsh.dnsmgr.net> Subject: Re: svn commit: r347980 - head/lib/libsecureboot/openpgp In-Reply-To: <39068.1558342374@kaos.jnpr.net> To: "Simon J. Gerraty" Date: Mon, 20 May 2019 11:15:22 -0700 (PDT) CC: rgrimes@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 15B228BF24 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.92 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.92)[-0.918,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 18:15:25 -0000 > Rodney W. Grimes wrote: > > > Log: > > > load_key_buf do not free data from dearmor > > > > > > The data returned by dearmor is referenced by the key > > > leave it alone! > > > > > > Reviewed by: stevek > > > MFC after: 2 days > > > > This is an exception below the standard minimal limit during > > a code freeze, is there some reason for it? The next build > > should not be started before 3 days. > > Sorry,should I wait until after freeze? > This is all optional stuff anyway, so no great harm either way. No, please do merge this at 3 days, it is just that the normal minimum bake time in ^head is 3 days, freeze or not. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Mon May 20 18:35:24 2019 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 905CC15B53C9; Mon, 20 May 2019 18:35:24 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 333DB8C8F2; Mon, 20 May 2019 18:35:24 +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 08C6922230; Mon, 20 May 2019 18:35:24 +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 x4KIZNI4091272; Mon, 20 May 2019 18:35:23 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4KIZNZd091271; Mon, 20 May 2019 18:35:23 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201905201835.x4KIZNZd091271@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 20 May 2019 18:35:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348000 - head/tests/sys/sys X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/tests/sys/sys X-SVN-Commit-Revision: 348000 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 333DB8C8F2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 18:35:24 -0000 Author: trasz Date: Mon May 20 18:35:23 2019 New Revision: 348000 URL: https://svnweb.freebsd.org/changeset/base/348000 Log: Improve tree(3) tests by using ATF_REQUIRE where applicable. MFC after: 2 weeks Sponsored by: Klara Inc. Modified: head/tests/sys/sys/rb_test.c head/tests/sys/sys/splay_test.c Modified: head/tests/sys/sys/rb_test.c ============================================================================== --- head/tests/sys/sys/rb_test.c Mon May 20 18:07:45 2019 (r347999) +++ head/tests/sys/sys/rb_test.c Mon May 20 18:35:23 2019 (r348000) @@ -69,7 +69,7 @@ ATF_TC_BODY(rb_test, tc) for (i = 0; i < ITER; i++) { tmp = malloc(sizeof(struct node)); - ATF_CHECK_MSG(tmp != NULL, "malloc failed"); + ATF_REQUIRE_MSG(tmp != NULL, "malloc failed"); do { tmp->key = arc4random_uniform(MAX-MIN); tmp->key += MIN; @@ -82,20 +82,22 @@ ATF_TC_BODY(rb_test, tc) if (tmp->key < min) min = tmp->key; } - ATF_CHECK_EQ(NULL, RB_INSERT(tree, &root, tmp)); + ATF_REQUIRE_EQ(NULL, RB_INSERT(tree, &root, tmp)); } ins = RB_MIN(tree, &root); + ATF_REQUIRE_MSG(ins != NULL, "RB_MIN error"); ATF_CHECK_EQ(min, ins->key); tmp = ins; ins = RB_MAX(tree, &root); + ATF_REQUIRE_MSG(ins != NULL, "RB_MAX error"); ATF_CHECK_EQ(max, ins->key); ATF_CHECK_EQ(tmp, RB_REMOVE(tree, &root, tmp)); for (i = 0; i < ITER - 1; i++) { tmp = RB_ROOT(&root); - ATF_CHECK_MSG(tmp != NULL, "RB_ROOT error"); + ATF_REQUIRE_MSG(tmp != NULL, "RB_ROOT error"); ATF_CHECK_EQ(tmp, RB_REMOVE(tree, &root, tmp)); free(tmp); } Modified: head/tests/sys/sys/splay_test.c ============================================================================== --- head/tests/sys/sys/splay_test.c Mon May 20 18:07:45 2019 (r347999) +++ head/tests/sys/sys/splay_test.c Mon May 20 18:35:23 2019 (r348000) @@ -69,7 +69,7 @@ ATF_TC_BODY(splay_test, tc) for (i = 0; i < ITER; i++) { tmp = malloc(sizeof(struct node)); - ATF_CHECK_MSG(tmp != NULL, "malloc failed"); + ATF_REQUIRE_MSG(tmp != NULL, "malloc failed"); do { tmp->key = arc4random_uniform(MAX-MIN); tmp->key += MIN; @@ -82,20 +82,22 @@ ATF_TC_BODY(splay_test, tc) if (tmp->key < min) min = tmp->key; } - ATF_CHECK_EQ(NULL, SPLAY_INSERT(tree, &root, tmp)); + ATF_REQUIRE_EQ(NULL, SPLAY_INSERT(tree, &root, tmp)); } ins = SPLAY_MIN(tree, &root); + ATF_REQUIRE_MSG(ins != NULL, "SPLAY_MIN error"); ATF_CHECK_EQ(min, ins->key); tmp = ins; ins = SPLAY_MAX(tree, &root); + ATF_REQUIRE_MSG(ins != NULL, "SPLAY_MAX error"); ATF_CHECK_EQ(max, ins->key); ATF_CHECK_EQ(tmp, SPLAY_REMOVE(tree, &root, tmp)); for (i = 0; i < ITER - 1; i++) { tmp = SPLAY_ROOT(&root); - ATF_CHECK_MSG(tmp != NULL, "SPLAY_ROOT error"); + ATF_REQUIRE_MSG(tmp != NULL, "SPLAY_ROOT error"); ATF_CHECK_EQ(tmp, SPLAY_REMOVE(tree, &root, tmp)); free(tmp); } From owner-svn-src-head@freebsd.org Mon May 20 18:41:08 2019 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 5FA2215B564A; Mon, 20 May 2019 18:41:08 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 025AF8CBCF; Mon, 20 May 2019 18:41:08 +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 D2C2822280; Mon, 20 May 2019 18:41:07 +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 x4KIf7uk091576; Mon, 20 May 2019 18:41:07 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4KIf7eD091575; Mon, 20 May 2019 18:41:07 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201905201841.x4KIf7eD091575@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 20 May 2019 18:41:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348001 - head/sys/dev/usb/net X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/dev/usb/net X-SVN-Commit-Revision: 348001 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 025AF8CBCF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 18:41:08 -0000 Author: emaste Date: Mon May 20 18:41:07 2019 New Revision: 348001 URL: https://svnweb.freebsd.org/changeset/base/348001 Log: muge: configure LEDs per dtb (for Raspberry Pi 3B+) Also apply some style(9) and remove the message about EEPROM configuration (if there's an EEPROM the hardware handles LED configuration itself). PR: 237325 Reviewed by: ian MFC after: 2 weeks Submitted by: Ralf Modified: head/sys/dev/usb/net/if_muge.c Modified: head/sys/dev/usb/net/if_muge.c ============================================================================== --- head/sys/dev/usb/net/if_muge.c Mon May 20 18:35:23 2019 (r348000) +++ head/sys/dev/usb/net/if_muge.c Mon May 20 18:41:07 2019 (r348001) @@ -173,6 +173,7 @@ struct muge_softc { struct mtx sc_mtx; struct usb_xfer *sc_xfer[MUGE_N_TRANSFER]; int sc_phyno; + uint32_t sc_leds; /* Settings for the mac control (MAC_CSR) register. */ uint32_t sc_rfe_ctl; @@ -891,6 +892,7 @@ lan78xx_phy_init(struct muge_softc *sc) muge_dbg_printf(sc, "Initializing PHY.\n"); uint16_t bmcr; usb_ticks_t start_ticks; + uint32_t hw_reg; const usb_ticks_t max_ticks = USB_MS_TO_TICKS(1000); MUGE_LOCK_ASSERT(sc, MA_OWNED); @@ -931,6 +933,15 @@ lan78xx_phy_init(struct muge_softc *sc) bmcr |= BMCR_AUTOEN; lan78xx_miibus_writereg(sc->sc_ue.ue_dev, sc->sc_phyno, MII_BMCR, bmcr); bmcr = lan78xx_miibus_readreg(sc->sc_ue.ue_dev, sc->sc_phyno, MII_BMCR); + + /* Enable appropriate LEDs. */ + if (sc->sc_leds != 0 && + lan78xx_read_reg(sc, ETH_HW_CFG, &hw_reg) == 0) { + hw_reg &= ~(ETH_HW_CFG_LEDO_EN_ | ETH_HW_CFG_LED1_EN_ | + ETH_HW_CFG_LED2_EN_ | ETH_HW_CFG_LED3_EN_ ); + hw_reg |= sc->sc_leds; + lan78xx_write_reg(sc, ETH_HW_CFG, hw_reg); + } return (0); } @@ -1523,6 +1534,37 @@ muge_fdt_find_mac(const char *compatible, unsigned cha return (ENXIO); } + +/** + * muge_fdt_count_led_modes - read number of LED modes from node + * @compatible: compatible string for DTB node in the form + * "usb[N]NNN,[M]MMM" + * where NNN is vendor id and MMM is product id + * @amount: memory to store number of LED entries to + * + * Tries to find matching node in DTS and obtain number of entries from it. + * + * RETURNS: + * Returns 0 on success, error code otherwise + */ +static int +muge_fdt_count_led_modes(struct muge_softc *sc, const char *compatible, + uint32_t *amount) +{ + phandle_t node, root; + ssize_t proplen; + + *amount = 0; + root = OF_finddevice("/"); + node = muge_fdt_find_eth_node(root, compatible); + if (node != -1 && + (proplen = OF_getproplen(node, "microchip,led-modes")) > 0) { + *amount = proplen / sizeof( uint32_t ); + return (0); + } + + return (ENXIO); +} #endif /** @@ -1591,6 +1633,41 @@ muge_set_mac_addr(struct usb_ether *ue) } /** + * muge_set_leds - Initializes NIC LEDs pattern + * @ue: the USB ethernet device + * + * Tries to store the LED modes. + * Supports only DTB blob like the Linux driver does. + */ +static void +muge_set_leds(struct usb_ether *ue) +{ + struct muge_softc *sc = uether_getsc(ue); +#ifdef FDT + char compatible[16]; + struct usb_attach_arg *uaa = device_get_ivars(ue->ue_dev); + uint32_t count; +#endif + + sc->sc_leds = 0; /* no LED mode is set */ + if (lan78xx_eeprom_present(sc)) + return; +#ifdef FDT + snprintf(compatible, sizeof(compatible), "usb%x,%x", + uaa->info.idVendor, uaa->info.idProduct); + if (muge_fdt_count_led_modes(sc, compatible, &count) == 0) { + sc->sc_leds = (count > 0) * ETH_HW_CFG_LEDO_EN_ | + (count > 1) * ETH_HW_CFG_LED1_EN_ | + (count > 2) * ETH_HW_CFG_LED2_EN_ | + (count > 3) * ETH_HW_CFG_LED3_EN_; + muge_dbg_printf(sc, "LED modes set from FDT blob\n"); + return; + } +#endif + muge_dbg_printf(sc, "LED configuration not available\n"); +} + +/** * muge_attach_post - Called after the driver attached to the USB interface * @ue: the USB ethernet device * @@ -1610,6 +1687,7 @@ muge_attach_post(struct usb_ether *ue) sc->sc_phyno = 1; muge_set_mac_addr(ue); + muge_set_leds(ue); /* Initialise the chip for the first time */ lan78xx_chip_init(sc); From owner-svn-src-head@freebsd.org Mon May 20 19:08:56 2019 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 68626158F544; Mon, 20 May 2019 19:08: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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 07A1F8DC61; Mon, 20 May 2019 19:08:56 +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 D500B2276C; Mon, 20 May 2019 19:08: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 x4KJ8tVQ007074; Mon, 20 May 2019 19:08:55 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4KJ8tO9007073; Mon, 20 May 2019 19:08:55 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201905201908.x4KJ8tO9007073@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 20 May 2019 19:08:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348002 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 348002 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 07A1F8DC61 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 19:08:56 -0000 Author: markj Date: Mon May 20 19:08:55 2019 New Revision: 348002 URL: https://svnweb.freebsd.org/changeset/base/348002 Log: Typo. MFC after: 3 days Modified: head/share/man/man9/DRIVER_MODULE.9 Modified: head/share/man/man9/DRIVER_MODULE.9 ============================================================================== --- head/share/man/man9/DRIVER_MODULE.9 Mon May 20 18:41:07 2019 (r348001) +++ head/share/man/man9/DRIVER_MODULE.9 Mon May 20 19:08:55 2019 (r348002) @@ -125,7 +125,7 @@ macro allows a driver to be registered for a specific The boot time probe and attach process makes multiple passes over the device tree. Certain critical drivers that provide basic services needed by other -devices are attach during earlier passes. +devices are attached during earlier passes. Most drivers are attached in a final general pass. A driver that attaches during an early pass must register for a specific pass level From owner-svn-src-head@freebsd.org Mon May 20 19:12:30 2019 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 1F1C6158F84A; Mon, 20 May 2019 19:12:30 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 93DC58E06D; Mon, 20 May 2019 19:12:29 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7967B2290E; Mon, 20 May 2019 19:12:29 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4KJCTcX012080; Mon, 20 May 2019 19:12:29 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4KJCTUT012079; Mon, 20 May 2019 19:12:29 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201905201912.x4KJCTUT012079@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 20 May 2019 19:12:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348003 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 348003 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 93DC58E06D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 19:12:30 -0000 Author: markj Date: Mon May 20 19:12:29 2019 New Revision: 348003 URL: https://svnweb.freebsd.org/changeset/base/348003 Log: Add a man page for DEFINE_IFUNC. Reviewed by: kib Discussed with: emaste MFC after: 2 weeks Event: Waterloo Hackathon 2019 Differential Revision: https://reviews.freebsd.org/D20310 Added: head/share/man/man9/DEFINE_IFUNC.9 (contents, props changed) Added: head/share/man/man9/DEFINE_IFUNC.9 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man9/DEFINE_IFUNC.9 Mon May 20 19:12:29 2019 (r348003) @@ -0,0 +1,143 @@ +.\" Copyright (c) 2019 The FreeBSD Foundation +.\" +.\" This documentation was written by Mark Johnston +.\" under sponsorship from the FreeBSD Foundation. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd May 18, 2019 +.Dt DEFINE_IFUNC 9 +.Os +.Sh NAME +.Nm DEFINE_IFUNC +.Nd define a kernel function with an implementation selected at run-time +.Sh SYNOPSIS +.In machine/ifunc.h +.Fn DEFINE_IFUNC qual ret_type name args +.Sh DESCRIPTION +ifuncs are a linker feature which allows the programmer to define functions +whose implementation is selected at boot-time or module load-time. +The +.Nm +macro can be used to define an ifunc. +The selection is performed by a resolver function, which returns a pointer +to the selected function. +ifunc resolvers are invoked very early during the machine-dependent +initialization routine, or at load time for dynamically loaded modules. +Resolution must occur before the first call to an ifunc. +ifunc resolution is performed after CPU features are enumerated and after the +kernel's environment is initialized. +The typical use-case for an ifunc is a routine whose behavior depends on +optional CPU features. +For example, newer generations of a given CPU architecture may provide an +instruction to optimize a common operation. +To avoid the overhead of testing for the CPU feature each time the operation +is performed, an ifunc can be used to provide two implementations for the +operation: one targeting platforms with the extra instruction, and one +for older platforms. +.Pp +Because +.Nm +is a macro that defines a dynamically typed function, its usage looks somewhat +unusual. +The +.Ar qual +parameter is a list of zero or more C function qualifiers to be applied to the +ifunc. +This parameter is typically empty or the +.Dv static +qualifier. +.Ar ret_type +is the return type of the ifunc. +.Ar name +is the name of the ifunc. +.Ar args +is a parenthesized, comma-separated list of the parameter types of the function, +as they would appear in a C function declaration. +.Pp +The +.Nm +usage must be followed by the resolver function body. +The resolver must return a function with return type +.Ar ret_type +and parameter types +.Ar args . +The resolver function is defined with the +.Ql resolver +gcc-style function attribute, causing the corresponding +.Xr elf 5 +function symbol to be of type +.Dv STT_GNU_IFUNC +instead of +.Dv STT_FUNC . +The kernel linker invokes the resolver to process relocations targeting ifunc +calls and PLT entries referencing such symbols. +.Sh EXAMPLES +ifunc resolvers are executed early during boot, before most kernel facilities +are available. +They are effectively limited to checking CPU feature flags and tunables. +.Bd -literal +static size_t +fast_strlen(const char *s __unused) +{ + size_t len; + + /* Fast, but may not be correct in all cases. */ + __asm("movq $42,%0\\n" : "=r" (len)); + return (len); +} + +static size_t +slow_strlen(const char *s) +{ + const char *t; + + for (t = s; *t != '\\0'; t++); + return (t - s); +} + +DEFINE_IFUNC(, size_t, strlen, (const char *)) +{ + int enabled; + + enabled = 1; + TUNABLE_INT_FETCH("debug.use_fast_strlen", &enabled); + if (enabled && (cpu_features & CPUID_FAST_STRLEN) != 0) + return (fast_strlen); + else + return (slow_strlen); +} +.Ed +.Pp +This defines a +.Fn strlen +function with an optimized implementation for CPUs that advertise support. +.Sh SEE ALSO +.Xr elf 5 +.Sh NOTES +ifuncs are not supported on all architectures. +They require both toolchain support, to emit function symbols of type +.Dv STT_GNU_IFUNC , +and kernel linker support to invoke ifunc resolvers during boot or +during module load. From owner-svn-src-head@freebsd.org Mon May 20 19:14:08 2019 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 9DD30158F8D9; Mon, 20 May 2019 19:14:08 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3E9F18E21A; Mon, 20 May 2019 19:14:08 +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 0A13B2292E; Mon, 20 May 2019 19:14:08 +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 x4KJE7V5012206; Mon, 20 May 2019 19:14:07 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4KJE7lp012205; Mon, 20 May 2019 19:14:07 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201905201914.x4KJE7lp012205@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 20 May 2019 19:14:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348004 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 348004 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3E9F18E21A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 19:14:08 -0000 Author: markj Date: Mon May 20 19:14:07 2019 New Revision: 348004 URL: https://svnweb.freebsd.org/changeset/base/348004 Log: kcov depends on eventhandler.h. MFC after: 3 days Modified: head/sys/kern/kern_kcov.c Modified: head/sys/kern/kern_kcov.c ============================================================================== --- head/sys/kern/kern_kcov.c Mon May 20 19:12:29 2019 (r348003) +++ head/sys/kern/kern_kcov.c Mon May 20 19:14:07 2019 (r348004) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include From owner-svn-src-head@freebsd.org Mon May 20 19:21:05 2019 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 182DE158FB44; Mon, 20 May 2019 19:21:05 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vtr.rulingia.com (unknown [IPv6:2001:19f0:5801:ebe:d87d:d822:b408:4936]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vtr.rulingia.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 074A68E523; Mon, 20 May 2019 19:21:03 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from server.rulingia.com (ppp59-167-167-3.static.internode.on.net [59.167.167.3]) by vtr.rulingia.com (8.15.2/8.15.2) with ESMTPS id x4KJKru9040267 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 21 May 2019 05:20:58 +1000 (AEST) (envelope-from peter@rulingia.com) X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.15.2/8.15.2) with ESMTPS id x4KJKl2x040255 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 21 May 2019 05:20:47 +1000 (AEST) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.15.2/8.15.2/Submit) id x4KJKlb6040254; Tue, 21 May 2019 05:20:47 +1000 (AEST) (envelope-from peter) Date: Tue, 21 May 2019 05:20:47 +1000 From: Peter Jeremy To: Conrad Meyer Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r347984 - in head/sys: amd64/vmm/io arm/allwinner arm/allwinner/a10 arm/allwinner/clkng arm/arm arm/broadcom/bcm2835 arm/freescale/imx arm/mv arm/mv/armada arm/nvidia arm/nvidia/tegra12... Message-ID: <20190520192047.GA3524@server.rulingia.com> References: <201905200038.x4K0cNoZ019920@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="0OAP2g/MAC+5xKAE" Content-Disposition: inline In-Reply-To: <201905200038.x4K0cNoZ019920@repo.freebsd.org> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp User-Agent: Mutt/1.11.4 (2019-03-13) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 19:21:05 -0000 --0OAP2g/MAC+5xKAE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2019-May-20 00:38:23 +0000, Conrad Meyer wrote: >Author: cem >Date: Mon May 20 00:38:23 2019 >New Revision: 347984 >URL: https://svnweb.freebsd.org/changeset/base/347984 > >Log: > Extract eventfilter declarations to sys/_eventfilter.h =2E.. > No functional change (intended). Of course, any out of tree modules that > relied on header pollution for sys/eventhandler.h, sys/lock.h, or > sys/mutex.h inclusion need to be fixed. __FreeBSD_version has been bump= ed. This seems to have broken at least netmap and netdump for me: /usr/src/sys/dev/netmap/netmap_freebsd.c:191:3: error: implicit declaration= of function 'EVENTHANDLER_REGISTER' is invalid in C99 [-Werror,-Wimplicit-= function-declaration] EVENTHANDLER_REGISTER(ifnet_arrival_event, ^ =2E.. /usr/src/sys/netinet/netdump/netdump_client.c:1458:22: error: implicit decl= aration of function 'EVENTHANDLER_REGISTER' is invalid in C99 [-Werror,-Wim= plicit-function-declaration] nd_detach_cookie =3D EVENTHANDLER_REGISTER(ifnet_departure_= event, ^ --=20 Peter Jeremy --0OAP2g/MAC+5xKAE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEE7rKYbDBnHnTmXCJ+FqWXoOSiCzQFAlzi/g9fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEVF QjI5ODZDMzA2NzFFNzRFNjVDMjI3RTE2QTU5N0EwRTRBMjBCMzQACgkQFqWXoOSi CzRm7A//Xu2bpx8pXREMW4pkZQU14IyPOi8//EFHhwFwGB/RNoQDe6LShG8Pus+Y PDUjInx0D2sTDS38XRVszmo9Qr+gZ75pkT2wSdHlxoxsrySdhtwDGX0Ro79D73HL TWzGODlm5gn2JOutPha7R6PFh4blFAEFUkPPhTWwKnGpJIuAtlzwuxw9c5DBPu2O r692fGHjKUUz/z6Mkl0RPUAGNtRdRQ+Ath3Fgn48a/w92FuE9XNXJAGpYuKbV9DS 2pPvfuKEXC4n5rr75cvwcJkYC+CfS4UFFWGuPzHeAJ9zE7Uyj9s2xM/7NyWpGyZy EyY9Ui8Y7MlliZxGbjg4WitNVDoeu3xaGE8bUEEgmWeHhSdBPPDa2AoA2cD8lr9i j9UWDmRG6Q5O9LCrHgOEewpimnISYV/Xl+1A0HMQxsN1hy3TtNgEuUEVNagDuFPz lh9TtAJyPpsl28xQp9L8kR+gmC71oxNBnW/5ygFHxDmZ75uz8fMMSLwJ8+5aAw6X 8LkgX00bu5Twl/TRl94MwvXBLbwiGn+Y5RfW53uYU39hWyaIQ3ufedabq+12bl66 K27/Go+Y871vKM+Hh9ginp4/h5wRJ4sIluC1xBisiOwbfBACgu191ag+RQuQXHOb l4sEDaN+QZbcYJxCbksyzU9A2zbSNEJfsFiv3uA6bLo6QVB+0qI= =bl+S -----END PGP SIGNATURE----- --0OAP2g/MAC+5xKAE-- From owner-svn-src-head@freebsd.org Mon May 20 19:21:37 2019 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 7EDAA158FD47; Mon, 20 May 2019 19:21:37 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2185C8E7DE; Mon, 20 May 2019 19:21:37 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 125622297D; Mon, 20 May 2019 19:21:37 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4KJLaxM012646; Mon, 20 May 2019 19:21:36 GMT (envelope-from luporl@FreeBSD.org) Received: (from luporl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4KJLZWK012637; Mon, 20 May 2019 19:21:35 GMT (envelope-from luporl@FreeBSD.org) Message-Id: <201905201921.x4KJLZWK012637@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luporl set sender to luporl@FreeBSD.org using -f From: Leandro Lupori Date: Mon, 20 May 2019 19:21:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348005 - in head: cddl/contrib/opensolaris/lib/libzfs/common stand/common stand/ofw/libofw stand/powerpc/boot1.chrp stand/powerpc/kboot stand/powerpc/ofw X-SVN-Group: head X-SVN-Commit-Author: luporl X-SVN-Commit-Paths: in head: cddl/contrib/opensolaris/lib/libzfs/common stand/common stand/ofw/libofw stand/powerpc/boot1.chrp stand/powerpc/kboot stand/powerpc/ofw X-SVN-Commit-Revision: 348005 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2185C8E7DE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 19:21:37 -0000 Author: luporl Date: Mon May 20 19:21:35 2019 New Revision: 348005 URL: https://svnweb.freebsd.org/changeset/base/348005 Log: [PowerPC64] stand: fix build using clang 8 as compiler This change fixes "stand" build issues when using clang 8 as compiler. Submitted by: alfredo.junior_eldorado.org.br Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D20026 Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c head/stand/common/load_elf.c head/stand/ofw/libofw/ofw_net.c head/stand/ofw/libofw/openfirm.c head/stand/powerpc/boot1.chrp/boot1.c head/stand/powerpc/kboot/Makefile head/stand/powerpc/kboot/main.c head/stand/powerpc/ofw/elf_freebsd.c head/stand/powerpc/ofw/ppc64_elf_freebsd.c Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c Mon May 20 19:14:07 2019 (r348004) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c Mon May 20 19:21:35 2019 (r348005) @@ -114,7 +114,7 @@ get_stats_for_obj(differ_info_t *di, const char *dsnam (void) snprintf(di->errbuf, sizeof (di->errbuf), dgettext(TEXT_DOMAIN, "Unable to determine path or stats for " - "object %lld in %s"), obj, dsname); + "object %jd in %s"), (uintmax_t)obj, dsname); return (-1); } } @@ -406,8 +406,8 @@ write_free_diffs(FILE *fp, differ_info_t *di, dmu_diff } else { (void) snprintf(di->errbuf, sizeof (di->errbuf), dgettext(TEXT_DOMAIN, - "next allocated object (> %lld) find failure"), - zc.zc_obj); + "next allocated object (> %jd) find failure"), + (uintmax_t)zc.zc_obj); di->zerr = errno; break; } Modified: head/stand/common/load_elf.c ============================================================================== --- head/stand/common/load_elf.c Mon May 20 19:14:07 2019 (r348004) +++ head/stand/common/load_elf.c Mon May 20 19:21:35 2019 (r348005) @@ -483,7 +483,7 @@ __elfN(loadimage)(struct preloaded_file *fp, elf_file_ off += 0x01000000; ehdr->e_entry += off; #ifdef ELF_VERBOSE - printf("Converted entry 0x%08x\n", ehdr->e_entry); + printf("Converted entry 0x%jx\n", (uintmax_t)ehdr->e_entry); #endif } else off = 0; @@ -509,8 +509,8 @@ __elfN(loadimage)(struct preloaded_file *fp, elf_file_ off -= ehdr->e_entry & ~PAGE_MASK; ehdr->e_entry += off; #ifdef ELF_VERBOSE - printf("ehdr->e_entry 0x%08x, va<->pa off %llx\n", - ehdr->e_entry, off); + printf("ehdr->e_entry 0x%jx", va<->pa off %llx\n", + (uintmax_t)ehdr->e_entry, off); #endif #else off = 0; /* other archs use direct mapped kernels */ Modified: head/stand/ofw/libofw/ofw_net.c ============================================================================== --- head/stand/ofw/libofw/ofw_net.c Mon May 20 19:14:07 2019 (r348004) +++ head/stand/ofw/libofw/ofw_net.c Mon May 20 19:21:35 2019 (r348005) @@ -225,12 +225,12 @@ ofwn_init(struct iodesc *desc, void *machdep_hint) dmabuf = NULL; if (OF_call_method("dma-alloc", netinstance, 1, 1, (64 * 1024), &dmabuf) < 0) { - printf("Failed to allocate DMA buffer (got %08x).\n", dmabuf); + printf("Failed to allocate DMA buffer (got %p).\n", dmabuf); goto punt; } #if defined(NETIF_DEBUG) - printf("ofwn_init: allocated DMA buffer: %08x\n", dmabuf); + printf("ofwn_init: allocated DMA buffer: %p\n", dmabuf); #endif #endif Modified: head/stand/ofw/libofw/openfirm.c ============================================================================== --- head/stand/ofw/libofw/openfirm.c Mon May 20 19:14:07 2019 (r348004) +++ head/stand/ofw/libofw/openfirm.c Mon May 20 19:21:35 2019 (r348005) @@ -669,7 +669,6 @@ OF_block_size(ihandle_t instance) } /* -/* * Memory functions */ Modified: head/stand/powerpc/boot1.chrp/boot1.c ============================================================================== --- head/stand/powerpc/boot1.chrp/boot1.c Mon May 20 19:14:07 2019 (r348004) +++ head/stand/powerpc/boot1.chrp/boot1.c Mon May 20 19:21:35 2019 (r348005) @@ -23,6 +23,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "paths.h" Modified: head/stand/powerpc/kboot/Makefile ============================================================================== --- head/stand/powerpc/kboot/Makefile Mon May 20 19:14:07 2019 (r348004) +++ head/stand/powerpc/kboot/Makefile Mon May 20 19:21:35 2019 (r348005) @@ -36,9 +36,6 @@ CFLAGS+= -DRELOC=${RELOC} LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc -# 64-bit bridge extensions -CFLAGS+= -Wa,-mppc64bridge - DPADD= ${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA} LDADD= ${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA} Modified: head/stand/powerpc/kboot/main.c ============================================================================== --- head/stand/powerpc/kboot/main.c Mon May 20 19:14:07 2019 (r348004) +++ head/stand/powerpc/kboot/main.c Mon May 20 19:21:35 2019 (r348005) @@ -484,8 +484,18 @@ kboot_kseg_get(int *nseg, void **ptr) void _start(int argc, const char **argv, char **env) { +// This makes error "variable 'sp' is uninitialized" be just a warning on clang. +// Initializing 'sp' is not desired here as it would overwrite "r1" original value +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic warning "-Wuninitialized" +#endif register volatile void **sp asm("r1"); main((int)sp[0], (const char **)&sp[1]); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } /* Modified: head/stand/powerpc/ofw/elf_freebsd.c ============================================================================== --- head/stand/powerpc/ofw/elf_freebsd.c Mon May 20 19:14:07 2019 (r348004) +++ head/stand/powerpc/ofw/elf_freebsd.c Mon May 20 19:21:35 2019 (r348005) @@ -84,7 +84,7 @@ __elfN(ofw_exec)(struct preloaded_file *fp) if ((error = md_load(fp->f_args, &mdp, &dtbp)) != 0) return (error); - printf("Kernel entry at 0x%lx ...\n", e->e_entry); + printf("Kernel entry at 0x%x ...\n", entry); dev_cleanup(); if (dtbp != 0) { Modified: head/stand/powerpc/ofw/ppc64_elf_freebsd.c ============================================================================== --- head/stand/powerpc/ofw/ppc64_elf_freebsd.c Mon May 20 19:14:07 2019 (r348004) +++ head/stand/powerpc/ofw/ppc64_elf_freebsd.c Mon May 20 19:21:35 2019 (r348005) @@ -87,7 +87,7 @@ ppc64_ofw_elf_exec(struct preloaded_file *fp) if ((error = md_load64(fp->f_args, &mdp, &dtbp)) != 0) return (error); - printf("Kernel entry at 0x%lx ...\n", entry); + printf("Kernel entry at 0x%x ...\n", entry); dev_cleanup(); From owner-svn-src-head@freebsd.org Mon May 20 19:31:51 2019 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 27C00159017F; Mon, 20 May 2019 19:31:51 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C1A058ECB8; Mon, 20 May 2019 19:31:50 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9886222C5F; Mon, 20 May 2019 19:31:50 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4KJVop4018627; Mon, 20 May 2019 19:31:50 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4KJVo5C018626; Mon, 20 May 2019 19:31:50 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201905201931.x4KJVo5C018626@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 20 May 2019 19:31:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348006 - head/sys/dev/usb/net X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/dev/usb/net X-SVN-Commit-Revision: 348006 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C1A058ECB8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 19:31:51 -0000 Author: emaste Date: Mon May 20 19:31:49 2019 New Revision: 348006 URL: https://svnweb.freebsd.org/changeset/base/348006 Log: muge: update FDT LED configuration Also use LED mode settings from the FDT to set the PHY. From v3 of the patch submitted in the PR. I moved the sc_led_modes and sc_led_modes_mask default setting outside of the #ifdef FDT case. PR: 237325 Submitted by: Ralf Reviewed by: ian MFC after: 2 weeks MFC with: r348001 Event: Waterloo Hackathon 2019 Differential Revision: https://reviews.freebsd.org/D20325 Modified: head/sys/dev/usb/net/if_muge.c head/sys/dev/usb/net/if_mugereg.h Modified: head/sys/dev/usb/net/if_muge.c ============================================================================== --- head/sys/dev/usb/net/if_muge.c Mon May 20 19:21:35 2019 (r348005) +++ head/sys/dev/usb/net/if_muge.c Mon May 20 19:31:49 2019 (r348006) @@ -174,6 +174,8 @@ struct muge_softc { struct usb_xfer *sc_xfer[MUGE_N_TRANSFER]; int sc_phyno; uint32_t sc_leds; + uint16_t sc_led_modes; + uint16_t sc_led_modes_mask; /* Settings for the mac control (MAC_CSR) register. */ uint32_t sc_rfe_ctl; @@ -890,7 +892,7 @@ static int lan78xx_phy_init(struct muge_softc *sc) { muge_dbg_printf(sc, "Initializing PHY.\n"); - uint16_t bmcr; + uint16_t bmcr, lmsr; usb_ticks_t start_ticks; uint32_t hw_reg; const usb_ticks_t max_ticks = USB_MS_TO_TICKS(1000); @@ -934,6 +936,16 @@ lan78xx_phy_init(struct muge_softc *sc) lan78xx_miibus_writereg(sc->sc_ue.ue_dev, sc->sc_phyno, MII_BMCR, bmcr); bmcr = lan78xx_miibus_readreg(sc->sc_ue.ue_dev, sc->sc_phyno, MII_BMCR); + /* Configure LED Modes. */ + if (sc->sc_led_modes_mask != 0xffff) { + lmsr = lan78xx_miibus_readreg(sc->sc_ue.ue_dev, sc->sc_phyno, + MUGE_PHY_LED_MODE); + lmsr &= sc->sc_led_modes_mask; + lmsr |= sc->sc_led_modes; + lan78xx_miibus_writereg(sc->sc_ue.ue_dev, sc->sc_phyno, + MUGE_PHY_LED_MODE, lmsr); + } + /* Enable appropriate LEDs. */ if (sc->sc_leds != 0 && lan78xx_read_reg(sc, ETH_HW_CFG, &hw_reg) == 0) { @@ -1534,37 +1546,6 @@ muge_fdt_find_mac(const char *compatible, unsigned cha return (ENXIO); } - -/** - * muge_fdt_count_led_modes - read number of LED modes from node - * @compatible: compatible string for DTB node in the form - * "usb[N]NNN,[M]MMM" - * where NNN is vendor id and MMM is product id - * @amount: memory to store number of LED entries to - * - * Tries to find matching node in DTS and obtain number of entries from it. - * - * RETURNS: - * Returns 0 on success, error code otherwise - */ -static int -muge_fdt_count_led_modes(struct muge_softc *sc, const char *compatible, - uint32_t *amount) -{ - phandle_t node, root; - ssize_t proplen; - - *amount = 0; - root = OF_finddevice("/"); - node = muge_fdt_find_eth_node(root, compatible); - if (node != -1 && - (proplen = OF_getproplen(node, "microchip,led-modes")) > 0) { - *amount = proplen / sizeof( uint32_t ); - return (0); - } - - return (ENXIO); -} #endif /** @@ -1646,25 +1627,37 @@ muge_set_leds(struct usb_ether *ue) #ifdef FDT char compatible[16]; struct usb_attach_arg *uaa = device_get_ivars(ue->ue_dev); + phandle_t root, node; + pcell_t led_modes[4]; /* 4 LEDs are possible */ + ssize_t proplen; uint32_t count; #endif sc->sc_leds = 0; /* no LED mode is set */ + sc->sc_led_modes = 0; + sc->sc_led_modes_mask = 0xffff; if (lan78xx_eeprom_present(sc)) return; #ifdef FDT snprintf(compatible, sizeof(compatible), "usb%x,%x", uaa->info.idVendor, uaa->info.idProduct); - if (muge_fdt_count_led_modes(sc, compatible, &count) == 0) { + root = OF_finddevice("/"); + if ((node = muge_fdt_find_eth_node(root, compatible)) != -1 && + (proplen = OF_getencprop(node, "microchip,led-modes", led_modes, + sizeof(led_modes))) > 0) { + count = proplen / sizeof( uint32_t ); sc->sc_leds = (count > 0) * ETH_HW_CFG_LEDO_EN_ | (count > 1) * ETH_HW_CFG_LED1_EN_ | (count > 2) * ETH_HW_CFG_LED2_EN_ | (count > 3) * ETH_HW_CFG_LED3_EN_; + while (count-- > 0) { + sc->sc_led_modes |= + (led_modes[count] & 0xf) << (4 * count); + sc->sc_led_modes_mask <<= 4; + } muge_dbg_printf(sc, "LED modes set from FDT blob\n"); - return; } #endif - muge_dbg_printf(sc, "LED configuration not available\n"); } /** Modified: head/sys/dev/usb/net/if_mugereg.h ============================================================================== --- head/sys/dev/usb/net/if_mugereg.h Mon May 20 19:21:35 2019 (r348005) +++ head/sys/dev/usb/net/if_mugereg.h Mon May 20 19:31:49 2019 (r348006) @@ -190,6 +190,8 @@ #define MUGE_EXT_PAGE_SPACE_1 0x0001 #define MUGE_EXT_PAGE_SPACE_2 0x0002 +#define MUGE_PHY_LED_MODE 29 + /* Extended Register Page 1 Space */ #define MUGE_EXT_MODE_CTRL 0x0013 #define MUGE_EXT_MODE_CTRL_MDIX_MASK_ 0x000C From owner-svn-src-head@freebsd.org Mon May 20 19:32:10 2019 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 01C6715901AD; Mon, 20 May 2019 19:32:10 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io1-f41.google.com (mail-io1-f41.google.com [209.85.166.41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 942F78EF3C; Mon, 20 May 2019 19:32:09 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io1-f41.google.com with SMTP id g16so11975960iom.9; Mon, 20 May 2019 12:32:09 -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:reply-to :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=u5QCbIA0nXMtc8i21bv+SrovCA7M3bJ8x8NyEEFQyOc=; b=s7f8Ifk8TvRK8QgXe/bn//UvqzP58Zpoa6P0v6wkmlZrfZ1Z9RzRnuh5H7HnDukUBR ZMZklREGl41UdFomz9W4sBktXhMQwnJ69kLQjApLI7TAYxo08xNPluS9OJD8PLETnfU9 g8Es/Jao2fmzJqHJbftkmRpr/Vy0H4RbYxnYaSB4KPI5LEKOkF2Ni0V88JdvaS4F3ZdK fWStNWJNkCabQPzaC7I+9hhEtH8ORzQy/3LDGGmTYE2HVddTLt4MNi7SkOlpfLVOULaG JKv3+fiAB4L3e9/LKHxYQocx8M4N6NXiSJUfklEdKRG6czdIvMt3K4A1t3JA8ctNyWM5 YveA== X-Gm-Message-State: APjAAAUUjlS22GclpR2WWTGmr8QznaqCqfAV0FshvAUpNYbeEb4QqDWM olAeEWN7fC9s3VWUpfvBE6uK4r+T X-Google-Smtp-Source: APXvYqyrGMzVNAC8tuzRcD5sDOmWXibRwZGJUOqFKEmZbysPi8BOTRP9uYipL2B+DkGqnkeHykEuwA== X-Received: by 2002:a6b:c945:: with SMTP id z66mr40841963iof.191.1558380723182; Mon, 20 May 2019 12:32:03 -0700 (PDT) Received: from mail-io1-f52.google.com (mail-io1-f52.google.com. [209.85.166.52]) by smtp.gmail.com with ESMTPSA id t63sm151153ita.42.2019.05.20.12.32.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 May 2019 12:32:02 -0700 (PDT) Received: by mail-io1-f52.google.com with SMTP id g84so12004417ioa.1; Mon, 20 May 2019 12:32:02 -0700 (PDT) X-Received: by 2002:a6b:c411:: with SMTP id y17mr9717396ioa.265.1558380722801; Mon, 20 May 2019 12:32:02 -0700 (PDT) MIME-Version: 1.0 References: <201905200038.x4K0cNoZ019920@repo.freebsd.org> <20190520192047.GA3524@server.rulingia.com> In-Reply-To: <20190520192047.GA3524@server.rulingia.com> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Mon, 20 May 2019 12:31:52 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r347984 - in head/sys: amd64/vmm/io arm/allwinner arm/allwinner/a10 arm/allwinner/clkng arm/arm arm/broadcom/bcm2835 arm/freescale/imx arm/mv arm/mv/armada arm/nvidia arm/nvidia/tegra12... To: Peter Jeremy Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 942F78EF3C X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 19:32:10 -0000 Hi Peter, Thanks for reporting this. I ran a full tinderbox on this change (many many tinderboxes) and am not sure how I missed this. I have to run to an appointment now, but will fix these in a couple hours if no one else beats me to it. The fix is straightforward =E2=80=94 include . Best, Conrad On Mon, May 20, 2019 at 12:21 PM Peter Jeremy wrote: > > On 2019-May-20 00:38:23 +0000, Conrad Meyer wrote: > >Author: cem > >Date: Mon May 20 00:38:23 2019 > >New Revision: 347984 > >URL: https://svnweb.freebsd.org/changeset/base/347984 > > > >Log: > > Extract eventfilter declarations to sys/_eventfilter.h > ... > > No functional change (intended). Of course, any out of tree modules t= hat > > relied on header pollution for sys/eventhandler.h, sys/lock.h, or > > sys/mutex.h inclusion need to be fixed. __FreeBSD_version has been bu= mped. > > This seems to have broken at least netmap and netdump for me: > /usr/src/sys/dev/netmap/netmap_freebsd.c:191:3: error: implicit declarati= on of function 'EVENTHANDLER_REGISTER' is invalid in C99 [-Werror,-Wimplici= t-function-declaration] > EVENTHANDLER_REGISTER(ifnet_arrival_event, > ^ > ... > /usr/src/sys/netinet/netdump/netdump_client.c:1458:22: error: implicit de= claration of function 'EVENTHANDLER_REGISTER' is invalid in C99 [-Werror,-W= implicit-function-declaration] > nd_detach_cookie =3D EVENTHANDLER_REGISTER(ifnet_departur= e_event, > ^ > > -- > Peter Jeremy From owner-svn-src-head@freebsd.org Mon May 20 20:48:05 2019 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 BB3E6159218D; Mon, 20 May 2019 20:48:05 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5DA3691CDA; Mon, 20 May 2019 20:48:05 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 32DAA238A3; Mon, 20 May 2019 20:48:05 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4KKm4Ad061772; Mon, 20 May 2019 20:48:04 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4KKm41C061771; Mon, 20 May 2019 20:48:04 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201905202048.x4KKm41C061771@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 20 May 2019 20:48:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348008 - head/lib/csu/mips X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/lib/csu/mips X-SVN-Commit-Revision: 348008 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5DA3691CDA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 20:48:06 -0000 Author: emaste Date: Mon May 20 20:48:04 2019 New Revision: 348008 URL: https://svnweb.freebsd.org/changeset/base/348008 Log: mips: remove 16-byte alignment from .init and .fini epilogues The .init and .fini epilogues from crtn should be placed immediately after any instructions in .init and .fini sections from the linked objects. Using 16-byte alignment for the epilogues on MIPS was a bug, but it did not cause any issue with GNU ld as GNU ld (2.17.50) fills the padding with NOPs. Current versions of LLD fill any padding between different object files with trap instructions. Inserting trap padding prior to the .init/.fini epilogue is undesriable as the resulting binary will crash at runtime. The .init and .fini sections in object files linked between crti and crtn must already be a multiple of the instruction size and so no alignment directive is required in crtn. Indeed, other architectures (except sparc64) do not specify alignment in their crtn implementations. Reported by: arichardson Reviewed by: andrew Event: Waterloo Hackathon 2019 Differential Revision: https://reviews.freebsd.org/D18291 Modified: head/lib/csu/mips/crtn.S Modified: head/lib/csu/mips/crtn.S ============================================================================== --- head/lib/csu/mips/crtn.S Mon May 20 19:36:36 2019 (r348007) +++ head/lib/csu/mips/crtn.S Mon May 20 20:48:04 2019 (r348008) @@ -5,7 +5,6 @@ __FBSDID("$FreeBSD$"); .gnu_attribute 4, 0 #endif .section .init,"ax",%progbits - .align 4 .set noreorder #if defined(__ABICALLS__) && (defined(__mips_n32) || defined(__mips_n64)) REG_L gp, CALLFRAME_GP(sp) @@ -16,7 +15,6 @@ __FBSDID("$FreeBSD$"); .set reorder .section .fini,"ax",%progbits - .align 4 .set noreorder #if defined(__ABICALLS__) && (defined(__mips_n32) || defined(__mips_n64)) REG_L gp, CALLFRAME_GP(sp) From owner-svn-src-head@freebsd.org Mon May 20 21:23:35 2019 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 E712A1593363; Mon, 20 May 2019 21:23:34 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 870E5937B5; Mon, 20 May 2019 21:23:34 +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 616A723FE7; Mon, 20 May 2019 21:23:34 +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 x4KLNYN8083398; Mon, 20 May 2019 21:23:34 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4KLNYVA083397; Mon, 20 May 2019 21:23:34 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201905202123.x4KLNYVA083397@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 20 May 2019 21:23:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348011 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 348011 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 870E5937B5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 21:23:35 -0000 Author: markj Date: Mon May 20 21:23:33 2019 New Revision: 348011 URL: https://svnweb.freebsd.org/changeset/base/348011 Log: Hook DEFINE_IFUNC.9 up to the build. Reported by: pluknet MFC with: r348003 Modified: head/share/man/man9/Makefile Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Mon May 20 20:55:01 2019 (r348010) +++ head/share/man/man9/Makefile Mon May 20 21:23:33 2019 (r348011) @@ -75,6 +75,7 @@ MAN= accept_filter.9 \ DB_COMMAND.9 \ DECLARE_GEOM_CLASS.9 \ DECLARE_MODULE.9 \ + DEFINE_IFUNC.9 \ DELAY.9 \ devclass.9 \ devclass_find.9 \ From owner-svn-src-head@freebsd.org Mon May 20 21:45:01 2019 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 98DCB15939E7; Mon, 20 May 2019 21:45:01 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 33CD3942B2; Mon, 20 May 2019 21:45:01 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0EE662436D; Mon, 20 May 2019 21:45:01 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4KLj0vQ093866; Mon, 20 May 2019 21:45:00 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4KLj0Jc093865; Mon, 20 May 2019 21:45:00 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201905202145.x4KLj0Jc093865@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 20 May 2019 21:45:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348013 - head/sys/dev/usb/net X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/usb/net X-SVN-Commit-Revision: 348013 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 33CD3942B2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 21:45:01 -0000 Author: ian Date: Mon May 20 21:45:00 2019 New Revision: 348013 URL: https://svnweb.freebsd.org/changeset/base/348013 Log: Use the new usb fdt support functions to locate the proper fdt node for the device instance, and to get the MAC address for the device instance. The ad-hoc code this replaces could find the wrong instance if multiple devices were present. Modified: head/sys/dev/usb/net/if_muge.c Modified: head/sys/dev/usb/net/if_muge.c ============================================================================== --- head/sys/dev/usb/net/if_muge.c Mon May 20 21:33:22 2019 (r348012) +++ head/sys/dev/usb/net/if_muge.c Mon May 20 21:45:00 2019 (r348013) @@ -97,6 +97,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #endif #include @@ -1454,101 +1455,7 @@ tr_setup: } } -#ifdef FDT /** - * muge_fdt_find_eth_node - find descendant node with required compatibility - * @start: start node - * @compatible: compatible string used to identify the node - * - * Loop through all descendant nodes and return first match with required - * compatibility. - * - * RETURNS: - * Returns node's phandle on success -1 otherwise - */ -static phandle_t -muge_fdt_find_eth_node(phandle_t start, const char *compatible) -{ - phandle_t child, node; - - /* Traverse through entire tree to find usb ethernet nodes. */ - for (node = OF_child(start); node != 0; node = OF_peer(node)) { - if (ofw_bus_node_is_compatible(node, compatible)) - return (node); - child = muge_fdt_find_eth_node(node, compatible); - if (child != -1) - return (child); - } - - return (-1); -} - -/** - * muge_fdt_read_mac_property - read MAC address from node - * @node: USB device node - * @mac: memory to store MAC address to - * - * Check for common properties that might contain MAC address - * passed by boot loader. - * - * RETURNS: - * Returns 0 on success, error code otherwise - */ -static int -muge_fdt_read_mac_property(phandle_t node, unsigned char *mac) -{ - int len; - - /* Check if there is property */ - if ((len = OF_getproplen(node, "local-mac-address")) > 0) { - if (len != ETHER_ADDR_LEN) - return (EINVAL); - - OF_getprop(node, "local-mac-address", mac, - ETHER_ADDR_LEN); - return (0); - } - - if ((len = OF_getproplen(node, "mac-address")) > 0) { - if (len != ETHER_ADDR_LEN) - return (EINVAL); - - OF_getprop(node, "mac-address", mac, - ETHER_ADDR_LEN); - return (0); - } - - return (ENXIO); -} - -/** - * muge_fdt_find_mac - read MAC address from node - * @compatible: compatible string for DTB node in the form "usb[N]NNN,[M]MMM" - * where NNN is vendor id and MMM is product id - * @mac: memory to store MAC address to - * - * Tries to find matching node in DTS and obtain MAC address info from it - * - * RETURNS: - * Returns 0 on success, error code otherwise - */ -static int -muge_fdt_find_mac(const char *compatible, unsigned char *mac) -{ - phandle_t node, root; - - root = OF_finddevice("/"); - node = muge_fdt_find_eth_node(root, compatible); - if (node != -1) { - if (muge_fdt_read_mac_property(node, mac) == 0) - return (0); - } - - return (ENXIO); -} -#endif - -/** * muge_set_mac_addr - Initiailizes NIC MAC address * @ue: the USB ethernet device * @@ -1560,10 +1467,6 @@ muge_set_mac_addr(struct usb_ether *ue) { struct muge_softc *sc = uether_getsc(ue); uint32_t mac_h, mac_l; -#ifdef FDT - char compatible[16]; - struct usb_attach_arg *uaa = device_get_ivars(ue->ue_dev); -#endif memset(sc->sc_ue.ue_eaddr, 0xff, ETHER_ADDR_LEN); @@ -1599,10 +1502,10 @@ muge_set_mac_addr(struct usb_ether *ue) } #ifdef FDT - snprintf(compatible, sizeof(compatible), "usb%x,%x", - uaa->info.idVendor, uaa->info.idProduct); - if (muge_fdt_find_mac(compatible, sc->sc_ue.ue_eaddr) == 0) { - muge_dbg_printf(sc, "MAC assigned from FDT blob\n"); + /* ue->ue_eaddr modified only if config exists for this dev instance. */ + usb_fdt_get_mac_addr(ue->ue_dev, ue); + if (ETHER_IS_VALID(sc->sc_ue.ue_eaddr)) { + muge_dbg_printf(sc, "MAC read from FDT data\n"); return; } #endif @@ -1625,9 +1528,7 @@ muge_set_leds(struct usb_ether *ue) { struct muge_softc *sc = uether_getsc(ue); #ifdef FDT - char compatible[16]; - struct usb_attach_arg *uaa = device_get_ivars(ue->ue_dev); - phandle_t root, node; + phandle_t node; pcell_t led_modes[4]; /* 4 LEDs are possible */ ssize_t proplen; uint32_t count; @@ -1639,10 +1540,7 @@ muge_set_leds(struct usb_ether *ue) if (lan78xx_eeprom_present(sc)) return; #ifdef FDT - snprintf(compatible, sizeof(compatible), "usb%x,%x", - uaa->info.idVendor, uaa->info.idProduct); - root = OF_finddevice("/"); - if ((node = muge_fdt_find_eth_node(root, compatible)) != -1 && + if ((node = usb_fdt_get_node(ue->ue_dev, ue->ue_udev)) != -1 && (proplen = OF_getencprop(node, "microchip,led-modes", led_modes, sizeof(led_modes))) > 0) { count = proplen / sizeof( uint32_t ); @@ -1655,7 +1553,7 @@ muge_set_leds(struct usb_ether *ue) (led_modes[count] & 0xf) << (4 * count); sc->sc_led_modes_mask <<= 4; } - muge_dbg_printf(sc, "LED modes set from FDT blob\n"); + muge_dbg_printf(sc, "LED modes set from FDT data\n"); } #endif } From owner-svn-src-head@freebsd.org Mon May 20 22:04:03 2019 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 D0028159415D; Mon, 20 May 2019 22:04:02 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 71B5295021; Mon, 20 May 2019 22:04:02 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4B20A24705; Mon, 20 May 2019 22:04:02 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4KM42iF005127; Mon, 20 May 2019 22:04:02 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4KM42vr005126; Mon, 20 May 2019 22:04:02 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201905202204.x4KM42vr005126@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 20 May 2019 22:04:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348016 - head/sys/dev/usb/net X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/usb/net X-SVN-Commit-Revision: 348016 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 71B5295021 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 22:04:03 -0000 Author: ian Date: Mon May 20 22:04:01 2019 New Revision: 348016 URL: https://svnweb.freebsd.org/changeset/base/348016 Log: Don't detour through sc->sc_ue when we have a direct pointer to ue in hand already. Also, shorten a variable name for nicer line-wrapping. No functional changes. Modified: head/sys/dev/usb/net/if_muge.c Modified: head/sys/dev/usb/net/if_muge.c ============================================================================== --- head/sys/dev/usb/net/if_muge.c Mon May 20 22:02:54 2019 (r348015) +++ head/sys/dev/usb/net/if_muge.c Mon May 20 22:04:01 2019 (r348016) @@ -1468,7 +1468,7 @@ muge_set_mac_addr(struct usb_ether *ue) struct muge_softc *sc = uether_getsc(ue); uint32_t mac_h, mac_l; - memset(sc->sc_ue.ue_eaddr, 0xff, ETHER_ADDR_LEN); + memset(ue->ue_eaddr, 0xff, ETHER_ADDR_LEN); uint32_t val; lan78xx_read_reg(sc, 0, &val); @@ -1476,26 +1476,26 @@ muge_set_mac_addr(struct usb_ether *ue) /* Read current MAC address from RX_ADDRx registers. */ if ((lan78xx_read_reg(sc, ETH_RX_ADDRL, &mac_l) == 0) && (lan78xx_read_reg(sc, ETH_RX_ADDRH, &mac_h) == 0)) { - sc->sc_ue.ue_eaddr[5] = (uint8_t)((mac_h >> 8) & 0xff); - sc->sc_ue.ue_eaddr[4] = (uint8_t)((mac_h) & 0xff); - sc->sc_ue.ue_eaddr[3] = (uint8_t)((mac_l >> 24) & 0xff); - sc->sc_ue.ue_eaddr[2] = (uint8_t)((mac_l >> 16) & 0xff); - sc->sc_ue.ue_eaddr[1] = (uint8_t)((mac_l >> 8) & 0xff); - sc->sc_ue.ue_eaddr[0] = (uint8_t)((mac_l) & 0xff); + ue->ue_eaddr[5] = (uint8_t)((mac_h >> 8) & 0xff); + ue->ue_eaddr[4] = (uint8_t)((mac_h) & 0xff); + ue->ue_eaddr[3] = (uint8_t)((mac_l >> 24) & 0xff); + ue->ue_eaddr[2] = (uint8_t)((mac_l >> 16) & 0xff); + ue->ue_eaddr[1] = (uint8_t)((mac_l >> 8) & 0xff); + ue->ue_eaddr[0] = (uint8_t)((mac_l) & 0xff); } /* If RX_ADDRx did not provide a valid MAC address, try EEPROM. */ - if (ETHER_IS_VALID(sc->sc_ue.ue_eaddr)) { + if (ETHER_IS_VALID(ue->ue_eaddr)) { muge_dbg_printf(sc, "MAC assigned from registers\n"); return; } if ((lan78xx_eeprom_present(sc) && lan78xx_eeprom_read_raw(sc, ETH_E2P_MAC_OFFSET, - sc->sc_ue.ue_eaddr, ETHER_ADDR_LEN) == 0) || + ue->ue_eaddr, ETHER_ADDR_LEN) == 0) || (lan78xx_otp_read(sc, OTP_MAC_OFFSET, - sc->sc_ue.ue_eaddr, ETHER_ADDR_LEN) == 0)) { - if (ETHER_IS_VALID(sc->sc_ue.ue_eaddr)) { + ue->ue_eaddr, ETHER_ADDR_LEN) == 0)) { + if (ETHER_IS_VALID(ue->ue_eaddr)) { muge_dbg_printf(sc, "MAC read from EEPROM\n"); return; } @@ -1504,16 +1504,16 @@ muge_set_mac_addr(struct usb_ether *ue) #ifdef FDT /* ue->ue_eaddr modified only if config exists for this dev instance. */ usb_fdt_get_mac_addr(ue->ue_dev, ue); - if (ETHER_IS_VALID(sc->sc_ue.ue_eaddr)) { + if (ETHER_IS_VALID(ue->ue_eaddr)) { muge_dbg_printf(sc, "MAC read from FDT data\n"); return; } #endif muge_dbg_printf(sc, "MAC assigned randomly\n"); - arc4rand(sc->sc_ue.ue_eaddr, ETHER_ADDR_LEN, 0); - sc->sc_ue.ue_eaddr[0] &= ~0x01; /* unicast */ - sc->sc_ue.ue_eaddr[0] |= 0x02; /* locally administered */ + arc4rand(ue->ue_eaddr, ETHER_ADDR_LEN, 0); + ue->ue_eaddr[0] &= ~0x01; /* unicast */ + ue->ue_eaddr[0] |= 0x02; /* locally administered */ } /** @@ -1529,7 +1529,7 @@ muge_set_leds(struct usb_ether *ue) struct muge_softc *sc = uether_getsc(ue); #ifdef FDT phandle_t node; - pcell_t led_modes[4]; /* 4 LEDs are possible */ + pcell_t modes[4]; /* 4 LEDs are possible */ ssize_t proplen; uint32_t count; #endif @@ -1541,16 +1541,15 @@ muge_set_leds(struct usb_ether *ue) return; #ifdef FDT if ((node = usb_fdt_get_node(ue->ue_dev, ue->ue_udev)) != -1 && - (proplen = OF_getencprop(node, "microchip,led-modes", led_modes, - sizeof(led_modes))) > 0) { + (proplen = OF_getencprop(node, "microchip,led-modes", modes, + sizeof(modes))) > 0) { count = proplen / sizeof( uint32_t ); sc->sc_leds = (count > 0) * ETH_HW_CFG_LEDO_EN_ | (count > 1) * ETH_HW_CFG_LED1_EN_ | (count > 2) * ETH_HW_CFG_LED2_EN_ | (count > 3) * ETH_HW_CFG_LED3_EN_; while (count-- > 0) { - sc->sc_led_modes |= - (led_modes[count] & 0xf) << (4 * count); + sc->sc_led_modes |= (modes[count] & 0xf) << (4 * count); sc->sc_led_modes_mask <<= 4; } muge_dbg_printf(sc, "LED modes set from FDT data\n"); From owner-svn-src-head@freebsd.org Mon May 20 22:21:49 2019 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 398111594872; Mon, 20 May 2019 22:21:49 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CDACF95BEA; Mon, 20 May 2019 22:21:48 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E76FF24A47; Mon, 20 May 2019 22:21:47 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4KMLlMe013205; Mon, 20 May 2019 22:21:47 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4KMLlYe013204; Mon, 20 May 2019 22:21:47 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201905202221.x4KMLlYe013204@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 20 May 2019 22:21:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348018 - head/sys/dev/usb/net X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/usb/net X-SVN-Commit-Revision: 348018 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CDACF95BEA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 22:21:49 -0000 Author: ian Date: Mon May 20 22:21:47 2019 New Revision: 348018 URL: https://svnweb.freebsd.org/changeset/base/348018 Log: A MAC adddress from FDT data should override anything stored in eeprom or OTP registers (because the user is in control of the fdt data). Remove the early returns from the code that tries to find a good mac address, so that the execution always flows through the routine to get an address from FDT data last, when on FDT-enabled systems. Modified: head/sys/dev/usb/net/if_muge.c Modified: head/sys/dev/usb/net/if_muge.c ============================================================================== --- head/sys/dev/usb/net/if_muge.c Mon May 20 22:21:42 2019 (r348017) +++ head/sys/dev/usb/net/if_muge.c Mon May 20 22:21:47 2019 (r348018) @@ -1484,36 +1484,36 @@ muge_set_mac_addr(struct usb_ether *ue) ue->ue_eaddr[0] = (uint8_t)((mac_l) & 0xff); } - /* If RX_ADDRx did not provide a valid MAC address, try EEPROM. */ + /* + * If RX_ADDRx did not provide a valid MAC address, try EEPROM. If that + * doesn't work, try OTP. Whether any of these methods work or not, try + * FDT data, because it is allowed to override the EEPROM/OTP values. + */ if (ETHER_IS_VALID(ue->ue_eaddr)) { muge_dbg_printf(sc, "MAC assigned from registers\n"); - return; + } else if (lan78xx_eeprom_present(sc) && lan78xx_eeprom_read_raw(sc, + ETH_E2P_MAC_OFFSET, ue->ue_eaddr, ETHER_ADDR_LEN) == 0 && + ETHER_IS_VALID(ue->ue_eaddr)) { + muge_dbg_printf(sc, "MAC assigned from EEPROM\n"); + } else if (lan78xx_otp_read(sc, OTP_MAC_OFFSET, ue->ue_eaddr, + ETHER_ADDR_LEN) == 0 && ETHER_IS_VALID(ue->ue_eaddr)) { + muge_dbg_printf(sc, "MAC assigned from OTP\n"); } - if ((lan78xx_eeprom_present(sc) && - lan78xx_eeprom_read_raw(sc, ETH_E2P_MAC_OFFSET, - ue->ue_eaddr, ETHER_ADDR_LEN) == 0) || - (lan78xx_otp_read(sc, OTP_MAC_OFFSET, - ue->ue_eaddr, ETHER_ADDR_LEN) == 0)) { - if (ETHER_IS_VALID(ue->ue_eaddr)) { - muge_dbg_printf(sc, "MAC read from EEPROM\n"); - return; - } - } - #ifdef FDT /* ue->ue_eaddr modified only if config exists for this dev instance. */ usb_fdt_get_mac_addr(ue->ue_dev, ue); if (ETHER_IS_VALID(ue->ue_eaddr)) { - muge_dbg_printf(sc, "MAC read from FDT data\n"); - return; + muge_dbg_printf(sc, "MAC assigned from FDT data\n"); } #endif - muge_dbg_printf(sc, "MAC assigned randomly\n"); - arc4rand(ue->ue_eaddr, ETHER_ADDR_LEN, 0); - ue->ue_eaddr[0] &= ~0x01; /* unicast */ - ue->ue_eaddr[0] |= 0x02; /* locally administered */ + if (!ETHER_IS_VALID(ue->ue_eaddr)) { + muge_dbg_printf(sc, "MAC assigned randomly\n"); + arc4rand(ue->ue_eaddr, ETHER_ADDR_LEN, 0); + ue->ue_eaddr[0] &= ~0x01; /* unicast */ + ue->ue_eaddr[0] |= 0x02; /* locally administered */ + } } /** From owner-svn-src-head@freebsd.org Mon May 20 22:32:27 2019 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 7E8331594DD6; Mon, 20 May 2019 22:32:27 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1A9A796309; Mon, 20 May 2019 22:32:27 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E8CAD24C43; Mon, 20 May 2019 22:32:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4KMWQJB020105; Mon, 20 May 2019 22:32:26 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4KMWQrO020104; Mon, 20 May 2019 22:32:26 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201905202232.x4KMWQrO020104@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Mon, 20 May 2019 22:32:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348019 - head/tests/sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/tests/sys/opencrypto X-SVN-Commit-Revision: 348019 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1A9A796309 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 22:32:27 -0000 Author: ngie Date: Mon May 20 22:32:26 2019 New Revision: 348019 URL: https://svnweb.freebsd.org/changeset/base/348019 Log: Allow the end-user to pass along arguments to cryptotest.py via `$CRYPTOTEST_ARGS` This allows someone to use `-v` to dump out standard output. Modified: head/tests/sys/opencrypto/runtests.sh Modified: head/tests/sys/opencrypto/runtests.sh ============================================================================== --- head/tests/sys/opencrypto/runtests.sh Mon May 20 22:21:47 2019 (r348018) +++ head/tests/sys/opencrypto/runtests.sh Mon May 20 22:32:26 2019 (r348019) @@ -81,7 +81,7 @@ if ! sysctl $cdas_sysctl=1; then fi echo "1..1" -if "$PYTHON" $(dirname $0)/cryptotest.py; then +if "$PYTHON" $(dirname $0)/cryptotest.py $CRYPTOTEST_ARGS; then echo "ok 1" else echo "not ok 1" From owner-svn-src-head@freebsd.org Mon May 20 22:32:33 2019 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 1AA801594DFA; Mon, 20 May 2019 22:32:33 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ACF4C96345; Mon, 20 May 2019 22:32:32 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6E87624C47; Mon, 20 May 2019 22:32:31 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4KMWVWA021109; Mon, 20 May 2019 22:32:31 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4KMWVrt021108; Mon, 20 May 2019 22:32:31 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201905202232.x4KMWVrt021108@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 20 May 2019 22:32:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348020 - head/sys/dev/usb/net X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/usb/net X-SVN-Commit-Revision: 348020 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: ACF4C96345 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 22:32:33 -0000 Author: ian Date: Mon May 20 22:32:31 2019 New Revision: 348020 URL: https://svnweb.freebsd.org/changeset/base/348020 Log: Reverse the bit logic of sc_led_modes_mask. Instead of initializing it to all-ones then carving out blocks of zeroes where specified values go, init it to all-zeroes, put in ones where values need to be masked, then use it as value &= ~sc_led_modes_mask. In addition to being more idiomatic, this means everything related to FDT data is initialized to zero along with the rest of the softc, and that allows removing some #ifdef FDT sections and wrapping the whole muge_set_leds() function in a single ifdef block. This also deletes the early-out from muge_set_leds() when an eeprom exists. Even if there is an eeprom with led config in it, the fdt data (if present) should override that, because the user is in control of the fdt data. Modified: head/sys/dev/usb/net/if_muge.c Modified: head/sys/dev/usb/net/if_muge.c ============================================================================== --- head/sys/dev/usb/net/if_muge.c Mon May 20 22:32:26 2019 (r348019) +++ head/sys/dev/usb/net/if_muge.c Mon May 20 22:32:31 2019 (r348020) @@ -938,10 +938,10 @@ lan78xx_phy_init(struct muge_softc *sc) bmcr = lan78xx_miibus_readreg(sc->sc_ue.ue_dev, sc->sc_phyno, MII_BMCR); /* Configure LED Modes. */ - if (sc->sc_led_modes_mask != 0xffff) { + if (sc->sc_led_modes_mask != 0) { lmsr = lan78xx_miibus_readreg(sc->sc_ue.ue_dev, sc->sc_phyno, MUGE_PHY_LED_MODE); - lmsr &= sc->sc_led_modes_mask; + lmsr &= ~sc->sc_led_modes_mask; lmsr |= sc->sc_led_modes; lan78xx_miibus_writereg(sc->sc_ue.ue_dev, sc->sc_phyno, MUGE_PHY_LED_MODE, lmsr); @@ -1526,20 +1526,13 @@ muge_set_mac_addr(struct usb_ether *ue) static void muge_set_leds(struct usb_ether *ue) { - struct muge_softc *sc = uether_getsc(ue); #ifdef FDT + struct muge_softc *sc = uether_getsc(ue); phandle_t node; pcell_t modes[4]; /* 4 LEDs are possible */ ssize_t proplen; uint32_t count; -#endif - sc->sc_leds = 0; /* no LED mode is set */ - sc->sc_led_modes = 0; - sc->sc_led_modes_mask = 0xffff; - if (lan78xx_eeprom_present(sc)) - return; -#ifdef FDT if ((node = usb_fdt_get_node(ue->ue_dev, ue->ue_udev)) != -1 && (proplen = OF_getencprop(node, "microchip,led-modes", modes, sizeof(modes))) > 0) { @@ -1550,7 +1543,7 @@ muge_set_leds(struct usb_ether *ue) (count > 3) * ETH_HW_CFG_LED3_EN_; while (count-- > 0) { sc->sc_led_modes |= (modes[count] & 0xf) << (4 * count); - sc->sc_led_modes_mask <<= 4; + sc->sc_led_modes_mask |= 0xf << (4 * count); } muge_dbg_printf(sc, "LED modes set from FDT data\n"); } From owner-svn-src-head@freebsd.org Mon May 20 22:46:32 2019 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 3697F15951A3; Mon, 20 May 2019 22:46:32 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from forward501o.mail.yandex.net (forward501o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::611]) (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 E676796B7A; Mon, 20 May 2019 22:46:29 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from mxback3g.mail.yandex.net (mxback3g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:164]) by forward501o.mail.yandex.net (Yandex) with ESMTP id 051CB1E800F2; Tue, 21 May 2019 01:46:18 +0300 (MSK) Received: from localhost (localhost [::1]) by mxback3g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id mK0Kgvap1g-kHwS255o; Tue, 21 May 2019 01:46:17 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfw.ru; s=mail; t=1558392377; bh=PysOE3COcN6lH80R3jhR1o/VNVpnE7aWpQcDC07csss=; h=Message-Id:Cc:Subject:Date:References:To:From; b=o7M1UxmwwOM+CupiymaSv440xpJLjtr07Kr4jPcGjAC2/T3y6zWeaQTrM6/1TNZT4 lNPNCMH4qYaGTHwhcq6ol5ERWuYmP3XsPEdeMQAOssweOmN4b1Q1k+uiV3f8GhpELJ tMG7yUIZkrA+w8nVo3xAyM4xvdLNFD20xujUCa04= Received: by myt4-ea6eba8eca77.qloud-c.yandex.net with HTTP; Tue, 21 May 2019 01:46:17 +0300 From: Alexander V. Chernikov Envelope-From: melifaro@ipfw.ru To: "rgrimes@freebsd.org" Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" References: <201905192149.x4JLnvt5028495@repo.freebsd.org> <201905200450.x4K4o9uI072252@gndrsh.dnsmgr.net> Subject: Re: svn commit: r347982 - head/sys/net MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Tue, 21 May 2019 01:46:17 +0300 Message-Id: <17209181558392377@myt4-ea6eba8eca77.qloud-c.yandex.net> Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=utf-8 X-Rspamd-Queue-Id: E676796B7A X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=ipfw.ru header.s=mail header.b=o7M1Uxmw; spf=pass (mx1.freebsd.org: domain of melifaro@ipfw.ru designates 2a02:6b8:0:1a2d::611 as permitted sender) smtp.mailfrom=melifaro@ipfw.ru X-Spamd-Result: default: False [-4.94 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[ipfw.ru:s=mail]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2a02:6b8:0:1a2d::/64]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[4]; IP_SCORE(-1.72)[ipnet: 2a02:6b8::/32(-4.78), asn: 13238(-3.83), country: RU(0.01)]; MX_GOOD(-0.01)[mx.yandex.net,mx.yandex.net,mx.yandex.net,mx.yandex.net,mx.yandex.net]; DKIM_TRACE(0.00)[ipfw.ru:+]; NEURAL_HAM_SHORT(-0.91)[-0.911,0]; TO_DN_EQ_ADDR_ALL(0.00)[]; FORGED_SENDER(0.30)[melifaro@freebsd.org,melifaro@ipfw.ru]; RCVD_IN_DNSWL_LOW(-0.10)[1.1.6.0.0.0.0.0.0.0.0.0.0.0.0.0.d.2.a.1.0.0.0.0.8.b.6.0.2.0.a.2.list.dnswl.org : 127.0.5.1]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:13238, ipnet:2a02:6b8::/32, country:RU]; FROM_NEQ_ENVFROM(0.00)[melifaro@freebsd.org,melifaro@ipfw.ru] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 22:46:32 -0000 20.05.2019, 07:50, "Rodney W. Grimes" : >>  Author: melifaro >>  Date: Sun May 19 21:49:56 2019 >>  New Revision: 347982 >>  URL: https://svnweb.freebsd.org/changeset/base/347982 >> >>  Log: >>    Fix rt_ifa selection during loopback route insertion process. >>      Currently such routes are added with a link-level IFA, which is >>      plain wrong. Only after the insertion they get fixed by the special >>      link_rtrequest() ifa handler. This behaviour complicates routing code >>      and makes ifa selection more complex. >>    Streamline this process by explicitly moving link_rtrequest() logic >>      to the pre-insertion rt_getifa_fib() ifa selector. Avoid calling all >>      this logic in the loopback route case by explicitly specifying >>      proper rt_ifa inside the ifa_maintain_loopback_route().? >> >>    MFC after: 2 weeks >>    Differential Revision: https://reviews.freebsd.org/D20076 > > I shall again state that from a routing protocol perspecitive > and a POLA perspective having the kernel doing route maintanance > of any kind is fundementally wrong. > > I still continue to stronly object to ifa_maintain_loopback_route > code even being present in our kernel. Having these routes > is a micro optimization at best, and cause issues when real > and actual routing protocols are in use. I agree with that. It indeed causes decent amount of complications and I (as another router type person) prefer to have it gone as well. However, one has to carefully check uRPF functionality in our firewalls, implement fib-aware in_localip_more (and its IPv6 counterpart) to make it happen. > > Bruce Evans and myself have locally killed this code, and > just about every router type person I show it to gets ill > seeing it. > > Show many another system that does this and I might reconsider, > but I have never ever seen one. > >>  Modified: >>    head/sys/net/if.c >>    head/sys/net/route.c >> >>  Modified: head/sys/net/if.c >>  ============================================================================== >>  --- head/sys/net/if.c Sun May 19 20:28:49 2019 (r347981) >>  +++ head/sys/net/if.c Sun May 19 21:49:56 2019 (r347982) >>  @@ -264,7 +264,6 @@ static void if_route(struct ifnet *, int flag, int fam >>   static int if_setflag(struct ifnet *, int, int, int *, int); >>   static int if_transmit(struct ifnet *ifp, struct mbuf *m); >>   static void if_unroute(struct ifnet *, int flag, int fam); >>  -static void link_rtrequest(int, struct rtentry *, struct rt_addrinfo *); >>   static int if_delmulti_locked(struct ifnet *, struct ifmultiaddr *, int); >>   static void do_link_state_change(void *, int); >>   static int if_getgroup(struct ifgroupreq *, struct ifnet *); >>  @@ -862,7 +861,6 @@ if_attach_internal(struct ifnet *ifp, int vmove, struc >>                   sdl->sdl_type = ifp->if_type; >>                   ifp->if_addr = ifa; >>                   ifa->ifa_ifp = ifp; >>  - ifa->ifa_rtrequest = link_rtrequest; >>                   ifa->ifa_addr = (struct sockaddr *)sdl; >>                   sdl = (struct sockaddr_dl *)(socksize + (caddr_t)sdl); >>                   ifa->ifa_netmask = (struct sockaddr *)sdl; >>  @@ -1892,6 +1890,7 @@ static int >>   ifa_maintain_loopback_route(int cmd, const char *otype, struct ifaddr *ifa, >>       struct sockaddr *ia) >>   { >>  + struct epoch_tracker et; >>           int error; >>           struct rt_addrinfo info; >>           struct sockaddr_dl null_sdl; >>  @@ -1902,6 +1901,16 @@ ifa_maintain_loopback_route(int cmd, const char *otype >>           bzero(&info, sizeof(info)); >>           if (cmd != RTM_DELETE) >>                   info.rti_ifp = V_loif; >>  + if (cmd == RTM_ADD) { >>  + /* explicitly specify (loopback) ifa */ >>  + if (info.rti_ifp != NULL) { >>  + NET_EPOCH_ENTER(et); >>  + info.rti_ifa = ifaof_ifpforaddr(ifa->ifa_addr, info.rti_ifp); >>  + if (info.rti_ifa != NULL) >>  + ifa_ref(info.rti_ifa); >>  + NET_EPOCH_EXIT(et); >>  + } >>  + } >>           info.rti_flags = ifa->ifa_flags | RTF_HOST | RTF_STATIC | RTF_PINNED; >>           info.rti_info[RTAX_DST] = ia; >>           info.rti_info[RTAX_GATEWAY] = (struct sockaddr *)&null_sdl; >>  @@ -2208,39 +2217,6 @@ ifa_preferred(struct ifaddr *cur, struct ifaddr *next) >> >>           return (cur->ifa_carp && (!next->ifa_carp || >>               ((*carp_master_p)(next) && !(*carp_master_p)(cur)))); >>  -} >>  - >>  -#include >>  - >>  -/* >>  - * Default action when installing a route with a Link Level gateway. >>  - * Lookup an appropriate real ifa to point to. >>  - * This should be moved to /sys/net/link.c eventually. >>  - */ >>  -static void >>  -link_rtrequest(int cmd, struct rtentry *rt, struct rt_addrinfo *info) >>  -{ >>  - struct epoch_tracker et; >>  - struct ifaddr *ifa, *oifa; >>  - struct sockaddr *dst; >>  - struct ifnet *ifp; >>  - >>  - if (cmd != RTM_ADD || ((ifa = rt->rt_ifa) == NULL) || >>  - ((ifp = ifa->ifa_ifp) == NULL) || ((dst = rt_key(rt)) == NULL)) >>  - return; >>  - NET_EPOCH_ENTER(et); >>  - ifa = ifaof_ifpforaddr(dst, ifp); >>  - if (ifa) { >>  - oifa = rt->rt_ifa; >>  - if (oifa != ifa) { >>  - ifa_free(oifa); >>  - ifa_ref(ifa); >>  - } >>  - rt->rt_ifa = ifa; >>  - if (ifa->ifa_rtrequest && ifa->ifa_rtrequest != link_rtrequest) >>  - ifa->ifa_rtrequest(cmd, rt, info); >>  - } >>  - NET_EPOCH_EXIT(et); >>   } >> >>   struct sockaddr_dl * >> >>  Modified: head/sys/net/route.c >>  ============================================================================== >>  --- head/sys/net/route.c Sun May 19 20:28:49 2019 (r347981) >>  +++ head/sys/net/route.c Sun May 19 21:49:56 2019 (r347982) >>  @@ -1276,12 +1276,14 @@ rt_notifydelete(struct rtentry *rt, struct rt_addrinfo >>   /* >>    * Look up rt_addrinfo for a specific fib. Note that if rti_ifa is defined, >>    * it will be referenced so the caller must free it. >>  + * >>  + * Assume basic consistency checks are executed by callers: >>  + * RTAX_DST exists, if RTF_GATEWAY is set, RTAX_GATEWAY exists as well. >>    */ >>   int >>   rt_getifa_fib(struct rt_addrinfo *info, u_int fibnum) >>   { >>           struct epoch_tracker et; >>  - struct ifaddr *ifa; >>           int needref, error; >> >>           /* >>  @@ -1291,21 +1293,54 @@ rt_getifa_fib(struct rt_addrinfo *info, u_int fibnum) >>           error = 0; >>           needref = (info->rti_ifa == NULL); >>           NET_EPOCH_ENTER(et); >>  + >>  + /* If we have interface specified by the ifindex in the address, use it */ >>           if (info->rti_ifp == NULL && ifpaddr != NULL && >>  - ifpaddr->sa_family == AF_LINK && >>  - (ifa = ifa_ifwithnet(ifpaddr, 0, fibnum)) != NULL) { >>  - info->rti_ifp = ifa->ifa_ifp; >>  + ifpaddr->sa_family == AF_LINK) { >>  + const struct sockaddr_dl *sdl = (const struct sockaddr_dl *)ifpaddr; >>  + if (sdl->sdl_index != 0) >>  + info->rti_ifp = ifnet_byindex_locked(sdl->sdl_index); >>           } >>  + /* >>  + * If we have source address specified, try to find it >>  + * TODO: avoid enumerating all ifas on all interfaces. >>  + */ >>           if (info->rti_ifa == NULL && ifaaddr != NULL) >>                   info->rti_ifa = ifa_ifwithaddr(ifaaddr); >>           if (info->rti_ifa == NULL) { >>                   struct sockaddr *sa; >> >>  - sa = ifaaddr != NULL ? ifaaddr : >>  - (gateway != NULL ? gateway : dst); >>  - if (sa != NULL && info->rti_ifp != NULL) >>  + /* >>  + * Most common use case for the userland-supplied routes. >>  + * >>  + * Choose sockaddr to select ifa. >>  + * -- if ifp is set -- >>  + * Order of preference: >>  + * 1) IFA address >>  + * 2) gateway address >>  + * Note: for interface routes link-level gateway address >>  + * is specified to indicate the interface index without >>  + * specifying RTF_GATEWAY. In this case, ignore gateway >>  + * Note: gateway AF may be different from dst AF. In this case, >>  + * ignore gateway >>  + * 3) final destination. >>  + * 4) if all of these fails, try to get at least link-level ifa. >>  + * -- else -- >>  + * try to lookup gateway or dst in the routing table to get ifa >>  + */ >>  + if (info->rti_info[RTAX_IFA] != NULL) >>  + sa = info->rti_info[RTAX_IFA]; >>  + else if ((info->rti_flags & RTF_GATEWAY) != 0 && >>  + gateway->sa_family == dst->sa_family) >>  + sa = gateway; >>  + else >>  + sa = dst; >>  + if (info->rti_ifp != NULL) { >>                           info->rti_ifa = ifaof_ifpforaddr(sa, info->rti_ifp); >>  - else if (dst != NULL && gateway != NULL) >>  + /* Case 4 */ >>  + if (info->rti_ifa == NULL && gateway != NULL) >>  + info->rti_ifa = ifaof_ifpforaddr(gateway, info->rti_ifp); >>  + } else if (dst != NULL && gateway != NULL) >>                           info->rti_ifa = ifa_ifwithroute(flags, dst, gateway, >>                                                           fibnum); >>                   else if (sa != NULL) > > -- > Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Tue May 21 00:04:21 2019 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 12FB21596C0E; Tue, 21 May 2019 00:04:21 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A511D6A32A; Tue, 21 May 2019 00:04:20 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7AA5725B75; Tue, 21 May 2019 00:04:20 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4L04Klq068113; Tue, 21 May 2019 00:04:20 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4L04KIO068112; Tue, 21 May 2019 00:04:20 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201905210004.x4L04KIO068112@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Tue, 21 May 2019 00:04:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348022 - in head/sys: dev/netmap netinet/netdump X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head/sys: dev/netmap netinet/netdump X-SVN-Commit-Revision: 348022 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A511D6A32A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 00:04:21 -0000 Author: cem Date: Tue May 21 00:04:19 2019 New Revision: 348022 URL: https://svnweb.freebsd.org/changeset/base/348022 Log: Add two missing eventhandler.h headers These are obviously missing from the .c files, but don't show up in any tinderbox configuration (due to latent header pollution of some kind). It seems some configurations don't have this pollution, and the includes are obviously missing, so go ahead and add them. Reported by: Peter Jeremy X-MFC-With: r347984 Modified: head/sys/dev/netmap/netmap_freebsd.c head/sys/netinet/netdump/netdump_client.c Modified: head/sys/dev/netmap/netmap_freebsd.c ============================================================================== --- head/sys/dev/netmap/netmap_freebsd.c Mon May 20 22:37:42 2019 (r348021) +++ head/sys/dev/netmap/netmap_freebsd.c Tue May 21 00:04:19 2019 (r348022) @@ -32,6 +32,7 @@ #include #include #include +#include #include #include /* POLLIN, POLLOUT */ #include /* types used in module initialization */ Modified: head/sys/netinet/netdump/netdump_client.c ============================================================================== --- head/sys/netinet/netdump/netdump_client.c Mon May 20 22:37:42 2019 (r348021) +++ head/sys/netinet/netdump/netdump_client.c Tue May 21 00:04:19 2019 (r348022) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include From owner-svn-src-head@freebsd.org Tue May 21 00:05:53 2019 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 5A5181596CE9; Tue, 21 May 2019 00:05:53 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it1-f182.google.com (mail-it1-f182.google.com [209.85.166.182]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CD5C66A523; Tue, 21 May 2019 00:05:52 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it1-f182.google.com with SMTP id h11so1889106itf.5; Mon, 20 May 2019 17:05:52 -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:reply-to :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=Uh+SsxcJJIUC1fceM1o4cc0dDQpuvRI8PhdBUAyfyCc=; b=jnhh9UK5Q/OVZNV2S6FF5W9V6UK5AYLqyUf90KDy7yDtoyU2269y4MZoMHA0JUSbL1 ddcPdMaijBdbIRbZZbo+ZUZcFE7R5AdYm4CxEatGpro/WctDHR2f4yeISOWNYkUYBGwR 6BUELqgMDfVsRIlYXuaiqG1v3qYyeF6Wd905sQlKPggXnvZc7n6gbMncqzwvWodctGzs vDwPuWOijd1RXQaN5h/LJyY4fZNUS/SSYejraf5FA9Q+AZpLwEMxKfpKex5GgsRr1RZ2 ow6ThNfl+0WEQasOfTmt5QTu42OK165gHhH8MAnvqCtSr/KlmiAEt0PDKxHzdtRFtosg /WUw== X-Gm-Message-State: APjAAAWnjQeExbebQrJB/X51WDZ6guxb8UWSxFFKdDJZH1YmEsMyzH3G tph18Z68mclppsQR5kxJuD1p4Lzm X-Google-Smtp-Source: APXvYqxOAR2OREMIYLXsL+oP2puLtQ44Byn4rWRzTxJEkWN/QMw2/XCV1egBrH56nQWTrqwRAsEGfw== X-Received: by 2002:a02:95aa:: with SMTP id b39mr49464656jai.45.1558396811207; Mon, 20 May 2019 17:00:11 -0700 (PDT) Received: from mail-io1-f44.google.com (mail-io1-f44.google.com. [209.85.166.44]) by smtp.gmail.com with ESMTPSA id r139sm573844ita.22.2019.05.20.17.00.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 May 2019 17:00:10 -0700 (PDT) Received: by mail-io1-f44.google.com with SMTP id s20so12486087ioj.7; Mon, 20 May 2019 17:00:10 -0700 (PDT) X-Received: by 2002:a05:6602:157:: with SMTP id v23mr5175944iot.80.1558396810738; Mon, 20 May 2019 17:00:10 -0700 (PDT) MIME-Version: 1.0 References: <201905200038.x4K0cNoZ019920@repo.freebsd.org> <20190520192047.GA3524@server.rulingia.com> In-Reply-To: Reply-To: cem@freebsd.org From: Conrad Meyer Date: Mon, 20 May 2019 16:59:59 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r347984 - in head/sys: amd64/vmm/io arm/allwinner arm/allwinner/a10 arm/allwinner/clkng arm/arm arm/broadcom/bcm2835 arm/freescale/imx arm/mv arm/mv/armada arm/nvidia arm/nvidia/tegra12... To: Peter Jeremy Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: CD5C66A523 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 00:05:53 -0000 Hi Peter, Can you share what your kernel configuration is? I believe the error is masked in existing tinderbox kernel configurations ( https://ci.freebsd.org/tinderbox/ ) by some remaining header pollution that must be conditional on an option. The files you've pointed out are missing the eventhandler header (and fixing that is trivial), but I'd like to better understand where the leak is so that other misses can be located. Thanks, Conrad On Mon, May 20, 2019 at 12:31 PM Conrad Meyer wrote: > > Hi Peter, > > Thanks for reporting this. I ran a full tinderbox on this change > (many many tinderboxes) and am not sure how I missed this. I have to > run to an appointment now, but will fix these in a couple hours if no > one else beats me to it. The fix is straightforward =E2=80=94 include > . > > Best, > Conrad > > On Mon, May 20, 2019 at 12:21 PM Peter Jeremy wrote: > > > > On 2019-May-20 00:38:23 +0000, Conrad Meyer wrote: > > >Author: cem > > >Date: Mon May 20 00:38:23 2019 > > >New Revision: 347984 > > >URL: https://svnweb.freebsd.org/changeset/base/347984 > > > > > >Log: > > > Extract eventfilter declarations to sys/_eventfilter.h > > ... > > > No functional change (intended). Of course, any out of tree modules= that > > > relied on header pollution for sys/eventhandler.h, sys/lock.h, or > > > sys/mutex.h inclusion need to be fixed. __FreeBSD_version has been = bumped. > > > > This seems to have broken at least netmap and netdump for me: > > /usr/src/sys/dev/netmap/netmap_freebsd.c:191:3: error: implicit declara= tion of function 'EVENTHANDLER_REGISTER' is invalid in C99 [-Werror,-Wimpli= cit-function-declaration] > > EVENTHANDLER_REGISTER(ifnet_arrival_event, > > ^ > > ... > > /usr/src/sys/netinet/netdump/netdump_client.c:1458:22: error: implicit = declaration of function 'EVENTHANDLER_REGISTER' is invalid in C99 [-Werror,= -Wimplicit-function-declaration] > > nd_detach_cookie =3D EVENTHANDLER_REGISTER(ifnet_depart= ure_event, > > ^ > > > > -- > > Peter Jeremy From owner-svn-src-head@freebsd.org Tue May 21 00:30:30 2019 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 C9F2015973E3; Tue, 21 May 2019 00:30:30 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 033D16AE4A; Tue, 21 May 2019 00:30:30 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C609525ED1; Tue, 21 May 2019 00:30:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4L0UTFY079093; Tue, 21 May 2019 00:30:29 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4L0UTVJ079092; Tue, 21 May 2019 00:30:29 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201905210030.x4L0UTVJ079092@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Tue, 21 May 2019 00:30:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348024 - head/tests/sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/tests/sys/opencrypto X-SVN-Commit-Revision: 348024 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 033D16AE4A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 00:30:31 -0000 Author: ngie Date: Tue May 21 00:30:29 2019 New Revision: 348024 URL: https://svnweb.freebsd.org/changeset/base/348024 Log: Followup to r347996 Replace uses of `foo.encode("hex")` with `binascii.hexlify(foo)` for forwards compatibility between python 2.x and python 3. PR: 237403 MFC after: 1 week Modified: head/tests/sys/opencrypto/cryptotest.py Modified: head/tests/sys/opencrypto/cryptotest.py ============================================================================== --- head/tests/sys/opencrypto/cryptotest.py Tue May 21 00:07:53 2019 (r348023) +++ head/tests/sys/opencrypto/cryptotest.py Tue May 21 00:30:29 2019 (r348024) @@ -262,7 +262,7 @@ def GenTestCase(cname): out = r + tag self.assertEqual(out, ct, "Count " + data['Count'] + " Actual: " + \ - repr(out.encode("hex")) + " Expected: " + \ + repr(binascii.hexlify(out)) + " Expected: " + \ repr(data) + " on " + cname) def runCCMDecrypt(self, fname): @@ -313,7 +313,7 @@ def GenTestCase(cname): payload = payload[:plen] self.assertEqual(r, payload, "Count " + data['Count'] + \ - " Actual: " + repr(r.encode("hex")) + \ + " Actual: " + repr(binascii.hexlify(r)) + \ " Expected: " + repr(data) + \ " on " + cname) @@ -405,7 +405,7 @@ def GenTestCase(cname): _, r = c.encrypt(msg, iv="") self.assertEqual(r, md, "Actual: " + \ - repr(r.encode("hex")) + " Expected: " + repr(data) + " on " + cname) + repr(binascii.hexlify(r)) + " Expected: " + repr(data) + " on " + cname) @unittest.skipIf(cname not in shamodules, 'skipping SHA-HMAC on %s' % str(cname)) def test_sha1hmac(self): @@ -462,7 +462,7 @@ def GenTestCase(cname): _, r = c.encrypt(msg, iv="") self.assertEqual(r[:tlen], mac, "Actual: " + \ - repr(r.encode("hex")) + " Expected: " + repr(data)) + repr(binascii.hexlify(r)) + " Expected: " + repr(data)) return GendCryptoTestCase From owner-svn-src-head@freebsd.org Tue May 21 00:46:48 2019 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 A95B51597AED; Tue, 21 May 2019 00:46:48 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DF736BACC; Tue, 21 May 2019 00:46:48 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2416426216; Tue, 21 May 2019 00:46:48 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4L0klwv090023; Tue, 21 May 2019 00:46:47 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4L0kl2w090022; Tue, 21 May 2019 00:46:47 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201905210046.x4L0kl2w090022@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Tue, 21 May 2019 00:46:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348025 - head/stand/common X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/stand/common X-SVN-Commit-Revision: 348025 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4DF736BACC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 00:46:48 -0000 Author: ngie Date: Tue May 21 00:46:47 2019 New Revision: 348025 URL: https://svnweb.freebsd.org/changeset/base/348025 Log: Unbreak the build when `ELF_VERBOSE` is defined after r348005 This change properly terminates the formatting string quote modification done in r348005, which is triggered when `ELF_VERBOSE` is defined. MFC with: r348005 Reported by: ci (amd64, gcc) Modified: head/stand/common/load_elf.c Modified: head/stand/common/load_elf.c ============================================================================== --- head/stand/common/load_elf.c Tue May 21 00:30:29 2019 (r348024) +++ head/stand/common/load_elf.c Tue May 21 00:46:47 2019 (r348025) @@ -509,7 +509,7 @@ __elfN(loadimage)(struct preloaded_file *fp, elf_file_ off -= ehdr->e_entry & ~PAGE_MASK; ehdr->e_entry += off; #ifdef ELF_VERBOSE - printf("ehdr->e_entry 0x%jx", va<->pa off %llx\n", + printf("ehdr->e_entry 0x%jx, va<->pa off %llx\n", (uintmax_t)ehdr->e_entry, off); #endif #else From owner-svn-src-head@freebsd.org Tue May 21 01:10:27 2019 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 19BB7159924D; Tue, 21 May 2019 01:10:27 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 690256CB52; Tue, 21 May 2019 01:10:26 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x4L1ALWi076421; Mon, 20 May 2019 18:10:21 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x4L1AL4I076420; Mon, 20 May 2019 18:10:21 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201905210110.x4L1AL4I076420@gndrsh.dnsmgr.net> Subject: Re: svn commit: r347982 - head/sys/net In-Reply-To: <17209181558392377@myt4-ea6eba8eca77.qloud-c.yandex.net> To: "Alexander V. Chernikov" Date: Mon, 20 May 2019 18:10:21 -0700 (PDT) CC: "rgrimes@freebsd.org" , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 690256CB52 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.97)[-0.971,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 01:10:27 -0000 > 20.05.2019, 07:50, "Rodney W. Grimes" : > >> ?Author: melifaro > >> ?Date: Sun May 19 21:49:56 2019 > >> ?New Revision: 347982 > >> ?URL: https://svnweb.freebsd.org/changeset/base/347982 > >> > >> ?Log: > >> ???Fix rt_ifa selection during loopback route insertion process. > >> ?????Currently such routes are added with a link-level IFA, which is > >> ?????plain wrong. Only after the insertion they get fixed by the special > >> ?????link_rtrequest() ifa handler. This behaviour complicates routing code > >> ?????and makes ifa selection more complex. > >> ???Streamline this process by explicitly moving link_rtrequest() logic > >> ?????to the pre-insertion rt_getifa_fib() ifa selector. Avoid calling all > >> ?????this logic in the loopback route case by explicitly specifying > >> ?????proper rt_ifa inside the ifa_maintain_loopback_route().? > >> > >> ???MFC after: 2 weeks > >> ???Differential Revision: https://reviews.freebsd.org/D20076 > > > > I shall again state that from a routing protocol perspecitive > > and a POLA perspective having the kernel doing route maintanance > > of any kind is fundementally wrong. > > > > I still continue to stronly object to ifa_maintain_loopback_route > > code even being present in our kernel. Having these routes > > is a micro optimization at best, and cause issues when real > > and actual routing protocols are in use. > I agree with that. It indeed causes decent amount of complications and I (as another router type person) prefer to have it gone as well. > However, one has to carefully check uRPF functionality in our firewalls, implement fib-aware in_localip_more (and its IPv6 counterpart) to make it happen. How about we implement the simplest next step, make this behavior either a kernel compile time option with #ifdef, and/or a sysctl to turn it off with a bit that defaults to current behavior while we investigate the harder solution? > > Bruce Evans and myself have locally killed this code, and > > just about every router type person I show it to gets ill > > seeing it. > > > > Show many another system that does this and I might reconsider, > > but I have never ever seen one. > > > >> ?Modified: > >> ???head/sys/net/if.c > >> ???head/sys/net/route.c ... > > > > Rod Grimes rgrimes@freebsd.org -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Tue May 21 01:18:49 2019 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 D7EEA1599755; Tue, 21 May 2019 01:18:48 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7391E6D16D; Tue, 21 May 2019 01:18:48 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4870226722; Tue, 21 May 2019 01:18:48 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4L1ImM0006040; Tue, 21 May 2019 01:18:48 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4L1Ihfr006019; Tue, 21 May 2019 01:18:43 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201905210118.x4L1Ihfr006019@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Tue, 21 May 2019 01:18:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348026 - in head/sys: arm/allwinner arm/amlogic/aml8726 arm/freescale/imx arm/rockchip arm/ti/am335x compat/linuxkpi/common/src dev/drm2/ttm dev/fb dev/hdmi dev/iscsi_initiator dev/mlx... X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head/sys: arm/allwinner arm/amlogic/aml8726 arm/freescale/imx arm/rockchip arm/ti/am335x compat/linuxkpi/common/src dev/drm2/ttm dev/fb dev/hdmi dev/iscsi_initiator dev/mlx4/mlx4_en dev/mlx5/mlx5_e... X-SVN-Commit-Revision: 348026 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7391E6D16D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 01:18:49 -0000 Author: cem Date: Tue May 21 01:18:43 2019 New Revision: 348026 URL: https://svnweb.freebsd.org/changeset/base/348026 Log: Include eventhandler.h in more compilation units This was enumerated with exhaustive search for sys/eventhandler.h includes, cross-referenced against EVENTHANDLER_* usage with the comm(1) utility. Manual checking was performed to avoid redundant includes in some drivers where a common os_bsd.h (for example) included sys/eventhandler.h indirectly, but it is possible some of these are redundant with driver-specific headers in ways I didn't notice. (These CUs did not show up as missing eventhandler.h in tinderbox.) X-MFC-With: r347984 Modified: head/sys/arm/allwinner/a10_fb.c head/sys/arm/allwinner/a10_hdmi.c head/sys/arm/amlogic/aml8726/aml8726_wdt.c head/sys/arm/freescale/imx/imx6_ipu.c head/sys/arm/rockchip/rk30xx_wdog.c head/sys/arm/ti/am335x/am335x_lcd.c head/sys/arm/ti/am335x/tda19988.c head/sys/compat/linuxkpi/common/src/linux_compat.c head/sys/dev/drm2/ttm/ttm_page_alloc.c head/sys/dev/fb/creator.c head/sys/dev/fb/fbd.c head/sys/dev/hdmi/dwc_hdmi.c head/sys/dev/iscsi_initiator/iscsi.c head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c head/sys/mips/atheros/ar531x/ar5315_wdog.c head/sys/mips/cavium/octeon_wdog.c head/sys/mips/ingenic/jz4780_lcd.c head/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c Modified: head/sys/arm/allwinner/a10_fb.c ============================================================================== --- head/sys/arm/allwinner/a10_fb.c Tue May 21 00:46:47 2019 (r348025) +++ head/sys/arm/allwinner/a10_fb.c Tue May 21 01:18:43 2019 (r348026) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/arm/allwinner/a10_hdmi.c ============================================================================== --- head/sys/arm/allwinner/a10_hdmi.c Tue May 21 00:46:47 2019 (r348025) +++ head/sys/arm/allwinner/a10_hdmi.c Tue May 21 01:18:43 2019 (r348026) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/arm/amlogic/aml8726/aml8726_wdt.c ============================================================================== --- head/sys/arm/amlogic/aml8726/aml8726_wdt.c Tue May 21 00:46:47 2019 (r348025) +++ head/sys/arm/amlogic/aml8726/aml8726_wdt.c Tue May 21 01:18:43 2019 (r348026) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/arm/freescale/imx/imx6_ipu.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_ipu.c Tue May 21 00:46:47 2019 (r348025) +++ head/sys/arm/freescale/imx/imx6_ipu.c Tue May 21 01:18:43 2019 (r348026) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/arm/rockchip/rk30xx_wdog.c ============================================================================== --- head/sys/arm/rockchip/rk30xx_wdog.c Tue May 21 00:46:47 2019 (r348025) +++ head/sys/arm/rockchip/rk30xx_wdog.c Tue May 21 01:18:43 2019 (r348026) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/arm/ti/am335x/am335x_lcd.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_lcd.c Tue May 21 00:46:47 2019 (r348025) +++ head/sys/arm/ti/am335x/am335x_lcd.c Tue May 21 01:18:43 2019 (r348026) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/arm/ti/am335x/tda19988.c ============================================================================== --- head/sys/arm/ti/am335x/tda19988.c Tue May 21 00:46:47 2019 (r348025) +++ head/sys/arm/ti/am335x/tda19988.c Tue May 21 01:18:43 2019 (r348026) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Tue May 21 00:46:47 2019 (r348025) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Tue May 21 01:18:43 2019 (r348026) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/dev/drm2/ttm/ttm_page_alloc.c ============================================================================== --- head/sys/dev/drm2/ttm/ttm_page_alloc.c Tue May 21 00:46:47 2019 (r348025) +++ head/sys/dev/drm2/ttm/ttm_page_alloc.c Tue May 21 01:18:43 2019 (r348026) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #define NUM_PAGES_TO_ALLOC (PAGE_SIZE/sizeof(vm_page_t)) Modified: head/sys/dev/fb/creator.c ============================================================================== --- head/sys/dev/fb/creator.c Tue May 21 00:46:47 2019 (r348025) +++ head/sys/dev/fb/creator.c Tue May 21 01:18:43 2019 (r348026) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/dev/fb/fbd.c ============================================================================== --- head/sys/dev/fb/fbd.c Tue May 21 00:46:47 2019 (r348025) +++ head/sys/dev/fb/fbd.c Tue May 21 01:18:43 2019 (r348026) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/dev/hdmi/dwc_hdmi.c ============================================================================== --- head/sys/dev/hdmi/dwc_hdmi.c Tue May 21 00:46:47 2019 (r348025) +++ head/sys/dev/hdmi/dwc_hdmi.c Tue May 21 01:18:43 2019 (r348026) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include Modified: head/sys/dev/iscsi_initiator/iscsi.c ============================================================================== --- head/sys/dev/iscsi_initiator/iscsi.c Tue May 21 00:46:47 2019 (r348025) +++ head/sys/dev/iscsi_initiator/iscsi.c Tue May 21 01:18:43 2019 (r348026) @@ -37,6 +37,9 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef DO_EVENTHANDLER +#include +#endif #include #include #include Modified: head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c ============================================================================== --- head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Tue May 21 00:46:47 2019 (r348025) +++ head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Tue May 21 01:18:43 2019 (r348026) @@ -47,6 +47,7 @@ #include #include +#include #include #include Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Tue May 21 00:46:47 2019 (r348025) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Tue May 21 01:18:43 2019 (r348026) @@ -27,6 +27,7 @@ #include "en.h" +#include #include #include Modified: head/sys/mips/atheros/ar531x/ar5315_wdog.c ============================================================================== --- head/sys/mips/atheros/ar531x/ar5315_wdog.c Tue May 21 00:46:47 2019 (r348025) +++ head/sys/mips/atheros/ar531x/ar5315_wdog.c Tue May 21 01:18:43 2019 (r348026) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/mips/cavium/octeon_wdog.c ============================================================================== --- head/sys/mips/cavium/octeon_wdog.c Tue May 21 00:46:47 2019 (r348025) +++ head/sys/mips/cavium/octeon_wdog.c Tue May 21 01:18:43 2019 (r348026) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/mips/ingenic/jz4780_lcd.c ============================================================================== --- head/sys/mips/ingenic/jz4780_lcd.c Tue May 21 00:46:47 2019 (r348025) +++ head/sys/mips/ingenic/jz4780_lcd.c Tue May 21 01:18:43 2019 (r348026) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c Tue May 21 00:46:47 2019 (r348025) +++ head/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c Tue May 21 01:18:43 2019 (r348026) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include "core_priv.h" +#include #include #include Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Tue May 21 00:46:47 2019 (r348025) +++ head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Tue May 21 01:18:43 2019 (r348026) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include "ipoib.h" +#include static int ipoib_resolvemulti(struct ifnet *, struct sockaddr **, struct sockaddr *); Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c Tue May 21 00:46:47 2019 (r348025) +++ head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c Tue May 21 01:18:43 2019 (r348026) @@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include From owner-svn-src-head@freebsd.org Tue May 21 01:42:58 2019 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 D1C52159A29E; Tue, 21 May 2019 01:42:58 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6F0E06E171; Tue, 21 May 2019 01:42:58 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 47FA826C26; Tue, 21 May 2019 01:42:58 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4L1gwU8021506; Tue, 21 May 2019 01:42:58 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4L1gw4d021505; Tue, 21 May 2019 01:42:58 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201905210142.x4L1gw4d021505@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 21 May 2019 01:42:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348028 - head/stand/powerpc X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/stand/powerpc X-SVN-Commit-Revision: 348028 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6F0E06E171 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 01:42:59 -0000 Author: jhibbits Date: Tue May 21 01:42:57 2019 New Revision: 348028 URL: https://svnweb.freebsd.org/changeset/base/348028 Log: stand/powerpc: Only build loader.kboot for powerpc64 kboot is only made for powerpc64 systems, not 32-bit systems. This unbreaks the build for powerpcspe. Reported by: ngie Modified: head/stand/powerpc/Makefile Modified: head/stand/powerpc/Makefile ============================================================================== --- head/stand/powerpc/Makefile Tue May 21 01:27:08 2019 (r348027) +++ head/stand/powerpc/Makefile Tue May 21 01:42:57 2019 (r348028) @@ -5,6 +5,9 @@ NO_OBJ=t .include SUBDIR.yes= boot1.chrp ofw uboot + +.if "${TARGET_ARCH}" == "powerpc64" SUBDIR.${MK_FDT}+= kboot +.endif .include From owner-svn-src-head@freebsd.org Tue May 21 02:13:47 2019 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 00838159AF68; Tue, 21 May 2019 02:13:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9CD736F10E; Tue, 21 May 2019 02:13:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 75C242714F; Tue, 21 May 2019 02:13:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4L2Dksr037566; Tue, 21 May 2019 02:13:46 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4L2DkbQ037565; Tue, 21 May 2019 02:13:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201905210213.x4L2DkbQ037565@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Tue, 21 May 2019 02:13:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348031 - head/tests/sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/tests/sys/opencrypto X-SVN-Commit-Revision: 348031 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9CD736F10E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 02:13:47 -0000 Author: ngie Date: Tue May 21 02:13:46 2019 New Revision: 348031 URL: https://svnweb.freebsd.org/changeset/base/348031 Log: Squash deprecation warning related to array.array(..).tostring() In version 3.2+, `array.array(..).tostring()` was renamed to `array.array(..).tobytes()`. Conditionally call `array.array(..).tobytes()` if the python version is 3.2+. PR: 237403 MFC after: 1 week Modified: head/tests/sys/opencrypto/cryptodev.py Modified: head/tests/sys/opencrypto/cryptodev.py ============================================================================== --- head/tests/sys/opencrypto/cryptodev.py Tue May 21 02:02:09 2019 (r348030) +++ head/tests/sys/opencrypto/cryptodev.py Tue May 21 02:13:46 2019 (r348031) @@ -38,6 +38,7 @@ import os import random import signal from struct import pack as _pack +import sys import time import dpkt @@ -151,6 +152,11 @@ def _findop(crid, name): return fop.crid, name +def array_tobytes(array_obj): + if sys.version_info[:2] >= (3, 2): + return array_obj.tobytes() + return array_obj.tostring() + class Crypto: @staticmethod def findcrid(name): @@ -218,9 +224,9 @@ class Crypto: #print('cop:', cop) ioctl(_cryptodev, CIOCCRYPT, str(cop)) - s = s.tostring() + s = array_tobytes(s) if self._maclen is not None: - return s, m.tostring() + return s, array_tobytes(m) return s @@ -255,9 +261,9 @@ class Crypto: ioctl(_cryptodev, CIOCCRYPTAEAD, str(caead)) - s = s.tostring() + s = array_tobytes(s) - return s, tag.tostring() + return s, array_tobytes(tag) def perftest(self, op, size, timeo=3): inp = array.array('B', (random.randint(0, 255) for x in range(size))) From owner-svn-src-head@freebsd.org Tue May 21 02:30:44 2019 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 791A4159E436; Tue, 21 May 2019 02:30:44 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1F8626F7BE; Tue, 21 May 2019 02:30:44 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EDEFD27304; Tue, 21 May 2019 02:30:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4L2UhTD042970; Tue, 21 May 2019 02:30:43 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4L2Uhl2042968; Tue, 21 May 2019 02:30:43 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201905210230.x4L2Uhl2042968@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Tue, 21 May 2019 02:30:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348032 - head/tests/sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/tests/sys/opencrypto X-SVN-Commit-Revision: 348032 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1F8626F7BE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.955,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 02:30:44 -0000 Author: ngie Date: Tue May 21 02:30:43 2019 New Revision: 348032 URL: https://svnweb.freebsd.org/changeset/base/348032 Log: Fix `KAT(CCM)?Parser` file descriptor leaks Make `KAT(CCM)?Parser` into a context suite-capable object by implementing `__enter__` and `__exit__` methods which manage opening up the file descriptors and closing them on context exit. This implementation was decided over adding destructor logic to a `__del__` method, as there are a number of issues around object lifetimes when dealing with threading cleanup, atexit handlers, and a number of other less obvious edgecases. Plus, the architected solution is more pythonic and clean. Complete the iterator implementation by implementing a `__next__` method for both classes which handles iterating over the data using a generator pattern, and by changing `__iter__` to return the object instead of the data which it would iterate over. Alias the `__next__` method to `next` when working with python 2.x in order to maintain functional compatibility between the two major versions. As part of this work and to ensure readability, push the initialization of the parser objects up one layer and pass it down to a helper function. This could have been done via a decorator, but I was trying to keep it simple for other developers to make it easier to modify in the future. This fixes ResourceWarnings with python 3. PR: 237403 MFC after: 1 week Tested with: python 2.7.16 (amd64), python 3.6.8 (amd64) Modified: head/tests/sys/opencrypto/cryptodev.py head/tests/sys/opencrypto/cryptotest.py Modified: head/tests/sys/opencrypto/cryptodev.py ============================================================================== --- head/tests/sys/opencrypto/cryptodev.py Tue May 21 02:13:46 2019 (r348031) +++ head/tests/sys/opencrypto/cryptodev.py Tue May 21 02:30:43 2019 (r348032) @@ -323,11 +323,23 @@ class MismatchError(Exception): class KATParser: def __init__(self, fname, fields): - self.fp = open(fname) self.fields = set(fields) self._pending = None + self.fname = fname + self.fp = None + def __enter__(self): + self.fp = open(self.fname) + return self + + def __exit__(self, exc_type, exc_value, exc_tb): + if self.fp is not None: + self.fp.close() + def __iter__(self): + return self + + def __next__(self): while True: didread = False if self._pending is not None: @@ -340,13 +352,14 @@ class KATParser: if didread and not i: return - if (i and i[0] == '#') or not i.strip(): - continue - if i[0] == '[': - yield i[1:].split(']', 1)[0], self.fielditer() - else: - raise ValueError('unknown line: %r' % repr(i)) + if not i.startswith('#') and i.strip(): + break + if i[0] == '[': + yield i[1:].split(']', 1)[0], self.fielditer() + else: + raise ValueError('unknown line: %r' % repr(i)) + def eatblanks(self): while True: line = self.fp.readline() @@ -400,10 +413,19 @@ class KATParser: # section. class KATCCMParser: def __init__(self, fname): - self.fp = open(fname) self._pending = None + self.fname = fname + self.fp = None + + def __enter__(self): + self.fp = open(self.fname) self.read_globals() + return self + def __exit__(self, exc_type, exc_value, exc_tb): + if self.fp is not None: + self.fp.close() + def read_globals(self): self.global_values = {} while True: @@ -463,6 +485,9 @@ class KATCCMParser: self.section_values[f] = v def __iter__(self): + return self + + def __next__(self): while True: if self._pending: line = self._pending @@ -503,6 +528,10 @@ class KATCCMParser: def _spdechex(s): return binascii.hexlify(''.join(s.split())) +if sys.version_info[0] < 3: + KATCCMParser.next = KATCCMParser.__next__ + KATParser.next = KATParser.__next__ + if __name__ == '__main__': if True: try: @@ -518,11 +547,13 @@ if __name__ == '__main__': except IOError: pass elif False: - kp = KATParser('/usr/home/jmg/aesni.testing/format tweak value input - data unit seq no/XTSGenAES128.rsp', [ 'COUNT', 'DataUnitLen', 'Key', 'DataUnitSeqNumber', 'PT', 'CT' ]) - for mode, ni in kp: - print(i, ni) - for j in ni: - print(j) + columns = [ 'COUNT', 'DataUnitLen', 'Key', 'DataUnitSeqNumber', 'PT', 'CT' ] + fname = '/usr/home/jmg/aesni.testing/format tweak value input - data unit seq no/XTSGenAES128.rsp' + with KATParser(fname, columns) as kp: + for mode, ni in kp: + print(i, ni) + for j in ni: + print(j) elif False: key = _spdechex('c939cc13397c1d37de6ae0e1cb7c423c') iv = _spdechex('00000000000000000000000000000001') Modified: head/tests/sys/opencrypto/cryptotest.py ============================================================================== --- head/tests/sys/opencrypto/cryptotest.py Tue May 21 02:13:46 2019 (r348031) +++ head/tests/sys/opencrypto/cryptotest.py Tue May 21 02:30:43 2019 (r348032) @@ -104,8 +104,12 @@ def GenTestCase(cname): else: raise RuntimeError('unknown mode: %r' % repr(mode)) - for bogusmode, lines in cryptodev.KATParser(fname, - [ 'Count', 'Key', 'IV', 'CT', 'AAD', 'Tag', 'PT', ]): + columns = [ 'Count', 'Key', 'IV', 'CT', 'AAD', 'Tag', 'PT', ] + with cryptodev.KATParser(fname, columns) as parser: + self.runGCMWithParser(parser, mode) + + def runGCMWithParser(self, parser, mode): + for _, lines in next(parser): for data in lines: curcnt = int(data['Count']) cipherkey = binascii.unhexlify(data['Key']) @@ -166,9 +170,13 @@ def GenTestCase(cname): repr(data)) def runCBC(self, fname): + columns = [ 'COUNT', 'KEY', 'IV', 'PLAINTEXT', 'CIPHERTEXT', ] + with cryptodev.KATParser(fname, columns) as parser: + self.runCBCWithParser(parser) + + def runCBCWithParser(self, parser): curfun = None - for mode, lines in cryptodev.KATParser(fname, - [ 'COUNT', 'KEY', 'IV', 'PLAINTEXT', 'CIPHERTEXT', ]): + for mode, lines in next(parser): if mode == 'ENCRYPT': swapptct = False curfun = Crypto.encrypt @@ -193,10 +201,14 @@ def GenTestCase(cname): self.assertEqual(r, ct) def runXTS(self, fname, meth): + columns = [ 'COUNT', 'DataUnitLen', 'Key', 'DataUnitSeqNumber', 'PT', + 'CT'] + with cryptodev.KATParser(fname, columns) as parser: + self.runXTSWithParser(parser, meth) + + def runXTSWithParser(self, parser, meth): curfun = None - for mode, lines in cryptodev.KATParser(fname, - [ 'COUNT', 'DataUnitLen', 'Key', 'DataUnitSeqNumber', 'PT', - 'CT' ]): + for mode, lines in next(parser): if mode == 'ENCRYPT': swapptct = False curfun = Crypto.encrypt @@ -231,7 +243,11 @@ def GenTestCase(cname): self.assertEqual(r, ct) def runCCMEncrypt(self, fname): - for data in cryptodev.KATCCMParser(fname): + with cryptodev.KATCCMParser(fname) as parser: + self.runCCMEncryptWithParser(parser) + + def runCCMEncryptWithParser(self, parser): + for data in next(parser): Nlen = int(data['Nlen']) if Nlen != 12: # OCF only supports 12 byte IVs @@ -266,11 +282,15 @@ def GenTestCase(cname): repr(data) + " on " + cname) def runCCMDecrypt(self, fname): + with cryptodev.KATCCMParser(fname) as parser: + self.runCCMDecryptWithParser(parser) + + def runCCMDecryptWithParser(self, parser): # XXX: Note that all of the current CCM # decryption test vectors use IV and tag sizes # that aren't supported by OCF none of the # tests are actually ran. - for data in cryptodev.KATCCMParser(fname): + for data in next(parser): Nlen = int(data['Nlen']) if Nlen != 12: # OCF only supports 12 byte IVs @@ -326,9 +346,13 @@ def GenTestCase(cname): self.runTDES(i) def runTDES(self, fname): + columns = [ 'COUNT', 'KEYs', 'IV', 'PLAINTEXT', 'CIPHERTEXT', ] + with cryptodev.KATParser(fname, columns) as parser: + self.runTDESWithParser(parser) + + def runTDESWithParser(self, parser): curfun = None - for mode, lines in cryptodev.KATParser(fname, - [ 'COUNT', 'KEYs', 'IV', 'PLAINTEXT', 'CIPHERTEXT', ]): + for mode, lines in next(parser): if mode == 'ENCRYPT': swapptct = False curfun = Crypto.encrypt @@ -365,9 +389,12 @@ def GenTestCase(cname): # Skip SHA512_(224|256) tests if fname.find('SHA512_') != -1: return + columns = [ 'Len', 'Msg', 'MD' ] + with cryptodev.KATParser(fname, columns) as parser: + self.runSHAWithParser(parser) - for hashlength, lines in cryptodev.KATParser(fname, - [ 'Len', 'Msg', 'MD' ]): + def runSHAWithParser(self, parser): + for hashlength, lines in next(parser): # E.g., hashlength will be "L=20" (bytes) hashlen = int(hashlength.split("=")[1]) @@ -413,8 +440,12 @@ def GenTestCase(cname): self.runSHA1HMAC(i) def runSHA1HMAC(self, fname): - for hashlength, lines in cryptodev.KATParser(fname, - [ 'Count', 'Klen', 'Tlen', 'Key', 'Msg', 'Mac' ]): + columns = [ 'Count', 'Klen', 'Tlen', 'Key', 'Msg', 'Mac' ] + with cryptodev.KATParser(fname, columns) as parser: + self.runSHA1HMACWithParser(parser) + + def runSHA1HMACWithParser(self, parser): + for hashlength, lines in next(parser): # E.g., hashlength will be "L=20" (bytes) hashlen = int(hashlength.split("=")[1]) From owner-svn-src-head@freebsd.org Tue May 21 02:49:16 2019 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 8938B159EE2F; Tue, 21 May 2019 02:49:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2E98F70513; Tue, 21 May 2019 02:49:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 01EC52767E; Tue, 21 May 2019 02:49:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4L2nFGm053643; Tue, 21 May 2019 02:49:15 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4L2nFKm053642; Tue, 21 May 2019 02:49:15 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201905210249.x4L2nFKm053642@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Tue, 21 May 2019 02:49:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348039 - head/tests/sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/tests/sys/opencrypto X-SVN-Commit-Revision: 348039 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2E98F70513 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 02:49:16 -0000 Author: ngie Date: Tue May 21 02:49:15 2019 New Revision: 348039 URL: https://svnweb.freebsd.org/changeset/base/348039 Log: Remove spurious newline Even though some python styles suggest there should be multiple newlines between methods/classes, for consistency with the surrounding code, it's best to be consistent by having merely one newline between each functional block. MFC after: 1 week Modified: head/tests/sys/opencrypto/cryptodev.py Modified: head/tests/sys/opencrypto/cryptodev.py ============================================================================== --- head/tests/sys/opencrypto/cryptodev.py Tue May 21 02:46:00 2019 (r348038) +++ head/tests/sys/opencrypto/cryptodev.py Tue May 21 02:49:15 2019 (r348039) @@ -524,7 +524,6 @@ class KATCCMParser: yield values - def _spdechex(s): return binascii.hexlify(''.join(s.split())) From owner-svn-src-head@freebsd.org Tue May 21 03:05:25 2019 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 B26F8159F955; Tue, 21 May 2019 03:05:25 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 516CA71352; Tue, 21 May 2019 03:05:25 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2726227A3F; Tue, 21 May 2019 03:05:25 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4L35Pbr064928; Tue, 21 May 2019 03:05:25 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4L35PBl064927; Tue, 21 May 2019 03:05:25 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201905210305.x4L35PBl064927@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 21 May 2019 03:05:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348040 - head/stand/powerpc X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/stand/powerpc X-SVN-Commit-Revision: 348040 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 516CA71352 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 03:05:25 -0000 Author: jhibbits Date: Tue May 21 03:05:24 2019 New Revision: 348040 URL: https://svnweb.freebsd.org/changeset/base/348040 Log: stand: TARGET_ARCH is spelled MACHINE_ARCH in Makefiles Reported by: imp Modified: head/stand/powerpc/Makefile Modified: head/stand/powerpc/Makefile ============================================================================== --- head/stand/powerpc/Makefile Tue May 21 02:49:15 2019 (r348039) +++ head/stand/powerpc/Makefile Tue May 21 03:05:24 2019 (r348040) @@ -6,7 +6,7 @@ NO_OBJ=t SUBDIR.yes= boot1.chrp ofw uboot -.if "${TARGET_ARCH}" == "powerpc64" +.if "${MACHINE_ARCH}" == "powerpc64" SUBDIR.${MK_FDT}+= kboot .endif From owner-svn-src-head@freebsd.org Tue May 21 03:52:49 2019 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 A258F15A176A; Tue, 21 May 2019 03:52:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3C0167302B; Tue, 21 May 2019 03:52:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D6C8330B; Tue, 21 May 2019 03:52:48 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4L3qmWV090981; Tue, 21 May 2019 03:52:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4L3qm5X090980; Tue, 21 May 2019 03:52:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201905210352.x4L3qm5X090980@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Tue, 21 May 2019 03:52:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348042 - head/tests/sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/tests/sys/opencrypto X-SVN-Commit-Revision: 348042 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3C0167302B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 03:52:49 -0000 Author: ngie Date: Tue May 21 03:52:48 2019 New Revision: 348042 URL: https://svnweb.freebsd.org/changeset/base/348042 Log: Fix encoding issues with python 3 In python 3, the default encoding was switched from ascii character sets to unicode character sets in order to support internationalization by default. Some interfaces, like ioctls and packets, however, specify data in terms of non-unicode encodings formats, either in host endian (`fcntl.ioctl`) or network endian (`dpkt`) byte order/format. This change alters assumptions made by previous code where it was all data objects were assumed to be basestrings, when they should have been treated as byte arrays. In order to achieve this the following are done: * str objects with encodings needing to be encoded as ascii byte arrays are done so via `.encode("ascii")`. In order for this to work on python 3 in a type agnostic way (as it anecdotally varied depending on the caller), call `.encode("ascii")` only on str objects with python 3 to cast them to ascii byte arrays in a helper function name `str_to_ascii(..)`. * `dpkt.Packet` objects needing to be passed in to `fcntl.ioctl(..)` are done so by casting them to byte arrays via `bytes()`, which calls `dpkt.Packet__str__` under the covers and does the necessary str to byte array conversion needed for the `dpkt` APIs and `struct` module. In order to accomodate this change, apply the necessary typecasting for the byte array literal in order to search `fop.name` for nul bytes. This resolves all remaining python 2.x and python 3.x compatibility issues on amd64. More work needs to be done for the tests to function with i386, in general (this is a legacy issue). PR: 237403 MFC after: 1 week Tested with: python 2.7.16 (amd64), python 3.6.8 (amd64) Modified: head/tests/sys/opencrypto/cryptodev.py Modified: head/tests/sys/opencrypto/cryptodev.py ============================================================================== --- head/tests/sys/opencrypto/cryptodev.py Tue May 21 03:06:10 2019 (r348041) +++ head/tests/sys/opencrypto/cryptodev.py Tue May 21 03:52:48 2019 (r348042) @@ -136,16 +136,22 @@ def _getdev(): _cryptodev = _getdev() +def str_to_ascii(val): + if sys.version_info[0] >= 3: + if isinstance(val, str): + return val.encode("ascii") + return val + def _findop(crid, name): fop = FindOp() fop.crid = crid - fop.name = name + fop.name = str_to_ascii(name) s = array.array('B', fop.pack_hdr()) ioctl(_cryptodev, CIOCFINDDEV, s, 1) fop.unpack(s) try: - idx = fop.name.index('\x00') + idx = fop.name.index(b'\x00') name = fop.name[:idx] except ValueError: name = fop.name @@ -218,11 +224,11 @@ class Crypto: if self._maclen is not None: m = array.array('B', [0] * self._maclen) cop.mac = m.buffer_info()[0] - ivbuf = array.array('B', iv) + ivbuf = array.array('B', str_to_ascii(iv)) cop.iv = ivbuf.buffer_info()[0] #print('cop:', cop) - ioctl(_cryptodev, CIOCCRYPT, str(cop)) + ioctl(_cryptodev, CIOCCRYPT, bytes(cop)) s = array_tobytes(s) if self._maclen is not None: @@ -236,6 +242,7 @@ class Crypto: caead.op = op caead.flags = CRD_F_IV_EXPLICIT caead.flags = 0 + src = str_to_ascii(src) caead.len = len(src) s = array.array('B', src) caead.src = caead.dst = s.buffer_info()[0] @@ -246,6 +253,7 @@ class Crypto: if self._maclen is None: raise ValueError('must have a tag length') + tag = str_to_ascii(tag) if tag is None: tag = array.array('B', [0] * self._maclen) else: @@ -259,7 +267,7 @@ class Crypto: caead.ivlen = len(iv) caead.iv = ivbuf.buffer_info()[0] - ioctl(_cryptodev, CIOCCRYPTAEAD, str(caead)) + ioctl(_cryptodev, CIOCCRYPTAEAD, bytes(caead)) s = array_tobytes(s) @@ -267,6 +275,7 @@ class Crypto: def perftest(self, op, size, timeo=3): inp = array.array('B', (random.randint(0, 255) for x in range(size))) + inp = str_to_ascii(inp) out = array.array('B', inp) # prep ioctl @@ -293,8 +302,9 @@ class Crypto: start = time.time() reps = 0 + cop = bytes(cop) while not exit[0]: - ioctl(_cryptodev, CIOCCRYPT, str(cop)) + ioctl(_cryptodev, CIOCCRYPT, cop) reps += 1 end = time.time() From owner-svn-src-head@freebsd.org Tue May 21 04:03:23 2019 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 2EF6115A1BC6; Tue, 21 May 2019 04:03:23 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C01587371D; Tue, 21 May 2019 04:03:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9A2234D4; Tue, 21 May 2019 04:03:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4L43Mu1096637; Tue, 21 May 2019 04:03:22 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4L43MGG096636; Tue, 21 May 2019 04:03:22 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201905210403.x4L43MGG096636@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Tue, 21 May 2019 04:03:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348045 - head/tests/sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/tests/sys/opencrypto X-SVN-Commit-Revision: 348045 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C01587371D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 04:03:23 -0000 Author: ngie Date: Tue May 21 04:03:22 2019 New Revision: 348045 URL: https://svnweb.freebsd.org/changeset/base/348045 Log: Follow up to r348042: cast `aad` to a byte array This is not completely necessary today, but this change is being made in a conservative manner to avoid accidental breakage in the future, if this ever was a unicode string. PR: 237403 MFC after: 1 week Modified: head/tests/sys/opencrypto/cryptodev.py Modified: head/tests/sys/opencrypto/cryptodev.py ============================================================================== --- head/tests/sys/opencrypto/cryptodev.py Tue May 21 04:01:16 2019 (r348044) +++ head/tests/sys/opencrypto/cryptodev.py Tue May 21 04:03:22 2019 (r348045) @@ -246,6 +246,7 @@ class Crypto: caead.len = len(src) s = array.array('B', src) caead.src = caead.dst = s.buffer_info()[0] + aad = str_to_ascii(aad) caead.aadlen = len(aad) saad = array.array('B', aad) caead.aad = saad.buffer_info()[0] From owner-svn-src-head@freebsd.org Tue May 21 04:11:18 2019 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 E311A15A1EBE; Tue, 21 May 2019 04:11:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8784873C37; Tue, 21 May 2019 04:11:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6473A51D; Tue, 21 May 2019 04:11:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4L4BHnW001765; Tue, 21 May 2019 04:11:17 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4L4BGxu001761; Tue, 21 May 2019 04:11:16 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201905210411.x4L4BGxu001761@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Tue, 21 May 2019 04:11:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348047 - head/tests/sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/tests/sys/opencrypto X-SVN-Commit-Revision: 348047 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8784873C37 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 04:11:18 -0000 Author: ngie Date: Tue May 21 04:11:16 2019 New Revision: 348047 URL: https://svnweb.freebsd.org/changeset/base/348047 Log: Add my name to the copyright I have contributed a number of changes to these tests over the past few hundred revisions, and believe I deserve credit for the changes I have made (plus, the copyright hadn't been updated since 2014). MFC after: 1 week Modified: head/tests/sys/opencrypto/cryptodev.py head/tests/sys/opencrypto/cryptotest.py head/tests/sys/opencrypto/runtests.sh Modified: head/tests/sys/opencrypto/cryptodev.py ============================================================================== --- head/tests/sys/opencrypto/cryptodev.py Tue May 21 04:05:03 2019 (r348046) +++ head/tests/sys/opencrypto/cryptodev.py Tue May 21 04:11:16 2019 (r348047) @@ -3,6 +3,7 @@ # Copyright (c) 2014 The FreeBSD Foundation # Copyright 2014 John-Mark Gurney # All rights reserved. +# Copyright 2019 Enji Cooper # # This software was developed by John-Mark Gurney under # the sponsorship from the FreeBSD Foundation. Modified: head/tests/sys/opencrypto/cryptotest.py ============================================================================== --- head/tests/sys/opencrypto/cryptotest.py Tue May 21 04:05:03 2019 (r348046) +++ head/tests/sys/opencrypto/cryptotest.py Tue May 21 04:11:16 2019 (r348047) @@ -2,6 +2,7 @@ # # Copyright (c) 2014 The FreeBSD Foundation # All rights reserved. +# Copyright 2019 Enji Cooper # # This software was developed by John-Mark Gurney under # the sponsorship from the FreeBSD Foundation. Modified: head/tests/sys/opencrypto/runtests.sh ============================================================================== --- head/tests/sys/opencrypto/runtests.sh Tue May 21 04:05:03 2019 (r348046) +++ head/tests/sys/opencrypto/runtests.sh Tue May 21 04:11:16 2019 (r348047) @@ -2,6 +2,7 @@ # # Copyright (c) 2014 The FreeBSD Foundation # All rights reserved. +# Copyright 2019 Enji Cooper # # This software was developed by John-Mark Gurney under # the sponsorship from the FreeBSD Foundation. From owner-svn-src-head@freebsd.org Tue May 21 08:23:25 2019 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 65E5415A6995; Tue, 21 May 2019 08:23:25 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 047AB83469; Tue, 21 May 2019 08:23:25 +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 CCFFA304A; Tue, 21 May 2019 08:23:24 +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 x4L8NO8B032570; Tue, 21 May 2019 08:23:24 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4L8NO2W032569; Tue, 21 May 2019 08:23:24 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201905210823.x4L8NO2W032569@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 21 May 2019 08:23:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348049 - head/sys/amd64/linux X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/amd64/linux X-SVN-Commit-Revision: 348049 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 047AB83469 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 08:23:25 -0000 Author: trasz Date: Tue May 21 08:23:24 2019 New Revision: 348049 URL: https://svnweb.freebsd.org/changeset/base/348049 Log: Make linux_ptrace() use linux_msg() instead of printf(). MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/sys/amd64/linux/linux_ptrace.c Modified: head/sys/amd64/linux/linux_ptrace.c ============================================================================== --- head/sys/amd64/linux/linux_ptrace.c Tue May 21 04:27:52 2019 (r348048) +++ head/sys/amd64/linux/linux_ptrace.c Tue May 21 08:23:24 2019 (r348049) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #define LINUX_PTRACE_TRACEME 0 #define LINUX_PTRACE_PEEKTEXT 1 @@ -123,7 +124,7 @@ linux_ptrace_status(struct thread *td, pid_t pid, int error = kern_ptrace(td, PT_LWPINFO, pid, &lwpinfo, sizeof(lwpinfo)); td->td_retval[0] = saved_retval; if (error != 0) { - printf("%s: PT_LWPINFO failed with error %d\n", __func__, error); + linux_msg(td, "PT_LWPINFO failed with error %d", error); return (status); } @@ -320,9 +321,9 @@ linux_ptrace_setoptions(struct thread *td, pid_t pid, mask = 0; if (data & ~LINUX_PTRACE_O_MASK) { - printf("%s: unknown ptrace option %lx set; " - "returning EINVAL\n", - __func__, data & ~LINUX_PTRACE_O_MASK); + linux_msg(td, "unknown ptrace option %lx set; " + "returning EINVAL", + data & ~LINUX_PTRACE_O_MASK); return (EINVAL); } @@ -357,8 +358,8 @@ linux_ptrace_setoptions(struct thread *td, pid_t pid, mask |= PTRACE_VFORK; /* XXX: Close enough? */ if (data & LINUX_PTRACE_O_TRACEEXIT) { - printf("%s: PTRACE_O_TRACEEXIT not implemented; " - "returning EINVAL\n", __func__); + linux_msg(td, "PTRACE_O_TRACEEXIT not implemented; " + "returning EINVAL"); return (EINVAL); } @@ -381,7 +382,7 @@ linux_ptrace_getregs(struct thread *td, pid_t pid, voi error = kern_ptrace(td, PT_LWPINFO, pid, &lwpinfo, sizeof(lwpinfo)); if (error != 0) { - printf("%s: PT_LWPINFO failed with error %d\n", __func__, error); + linux_msg(td, "PT_LWPINFO failed with error %d", error); return (error); } if (lwpinfo.pl_flags & PL_FLAG_SCE) { @@ -433,7 +434,7 @@ linux_ptrace_getregset_prstatus(struct thread *td, pid error = copyin((const void *)data, &iov, sizeof(iov)); if (error != 0) { - printf("%s: copyin error %d\n", __func__, error); + linux_msg(td, "copyin error %d", error); return (error); } @@ -451,8 +452,7 @@ linux_ptrace_getregset_prstatus(struct thread *td, pid error = kern_ptrace(td, PT_LWPINFO, pid, &lwpinfo, sizeof(lwpinfo)); if (error != 0) { - printf("%s: PT_LWPINFO failed with error %d\n", - __func__, error); + linux_msg(td, "PT_LWPINFO failed with error %d", error); return (error); } if (lwpinfo.pl_flags & PL_FLAG_SCE) { @@ -474,14 +474,14 @@ linux_ptrace_getregset_prstatus(struct thread *td, pid len = MIN(iov.iov_len, sizeof(l_regset)); error = copyout(&l_regset, (void *)iov.iov_base, len); if (error != 0) { - printf("%s: copyout error %d\n", __func__, error); + linux_msg(td, "copyout error %d", error); return (error); } iov.iov_len -= len; error = copyout(&iov, (void *)data, sizeof(iov)); if (error != 0) { - printf("%s: iov copyout error %d\n", __func__, error); + linux_msg(td, "iov copyout error %d", error); return (error); } @@ -496,8 +496,8 @@ linux_ptrace_getregset(struct thread *td, pid_t pid, l case LINUX_NT_PRSTATUS: return (linux_ptrace_getregset_prstatus(td, pid, data)); default: - printf("%s: PTRACE_GETREGSET request %ld not implemented; " - "returning EINVAL\n", __func__, addr); + linux_msg(td, "PTRACE_GETREGSET request %ld not implemented; " + "returning EINVAL", addr); return (EINVAL); } } @@ -506,7 +506,7 @@ static int linux_ptrace_seize(struct thread *td, pid_t pid, l_ulong addr, l_ulong data) { - printf("%s: PTRACE_SEIZE not implemented; returning EINVAL\n", __func__); + linux_msg(td, "PTRACE_SEIZE not implemented; returning EINVAL"); return (EINVAL); } @@ -587,8 +587,8 @@ linux_ptrace(struct thread *td, struct linux_ptrace_ar error = linux_ptrace_seize(td, pid, uap->addr, uap->data); break; default: - printf("%s: ptrace(%ld, ...) not implemented; returning EINVAL\n", - __func__, uap->req); + linux_msg(td, "ptrace(%ld, ...) not implemented; " + "returning EINVAL", uap->req); error = EINVAL; break; } From owner-svn-src-head@freebsd.org Tue May 21 08:24:24 2019 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 E5BC015A69E9; Tue, 21 May 2019 08:24:23 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D0EE835B1; Tue, 21 May 2019 08:24:23 +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 28039304B; Tue, 21 May 2019 08:24:23 +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 x4L8ONIJ032655; Tue, 21 May 2019 08:24:23 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4L8ON7W032654; Tue, 21 May 2019 08:24:23 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201905210824.x4L8ON7W032654@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 21 May 2019 08:24:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348050 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 348050 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4D0EE835B1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 08:24:24 -0000 Author: trasz Date: Tue May 21 08:24:22 2019 New Revision: 348050 URL: https://svnweb.freebsd.org/changeset/base/348050 Log: Xr make_dev(9) from devfs(5). MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/share/man/man5/devfs.5 Modified: head/share/man/man5/devfs.5 ============================================================================== --- head/share/man/man5/devfs.5 Tue May 21 08:23:24 2019 (r348049) +++ head/share/man/man5/devfs.5 Tue May 21 08:24:22 2019 (r348050) @@ -127,7 +127,8 @@ volume located on .Sh SEE ALSO .Xr fdescfs 5 , .Xr devfs 8 , -.Xr mount 8 +.Xr mount 8 , +.Xr make_dev 9 .Sh HISTORY The .Nm From owner-svn-src-head@freebsd.org Tue May 21 13:29:55 2019 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 2A25515ADF20; Tue, 21 May 2019 13:29:55 +0000 (UTC) (envelope-from stevek@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BE0798DB70; Tue, 21 May 2019 13:29:54 +0000 (UTC) (envelope-from stevek@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A1FA165AE; Tue, 21 May 2019 13:29:54 +0000 (UTC) (envelope-from stevek@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4LDTstl090905; Tue, 21 May 2019 13:29:54 GMT (envelope-from stevek@FreeBSD.org) Received: (from stevek@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4LDTsUh090903; Tue, 21 May 2019 13:29:54 GMT (envelope-from stevek@FreeBSD.org) Message-Id: <201905211329.x4LDTsUh090903@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: stevek set sender to stevek@FreeBSD.org using -f From: "Stephen J. Kiernan" Date: Tue, 21 May 2019 13:29:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348051 - in head/sys: kern sys x86/x86 X-SVN-Group: head X-SVN-Commit-Author: stevek X-SVN-Commit-Paths: in head/sys: kern sys x86/x86 X-SVN-Commit-Revision: 348051 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BE0798DB70 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 13:29:55 -0000 Author: stevek Date: Tue May 21 13:29:53 2019 New Revision: 348051 URL: https://svnweb.freebsd.org/changeset/base/348051 Log: The older detection methods (smbios.bios.vendor and smbios.system.product) are able to determine some virtual machines, but the vm_guest variable was still only being set to VM_GUEST_VM. Since we do know what some of them specifically are, we can set vm_guest appropriately. Also, if we see the CPUID has the HV flag, but we were unable to find a definitive vendor in the Hypervisor CPUID Information Leaf, fall back to the older detection methods, as they may be able to determine a specific HV type. Add VM_GUEST_PARALLELS value to VM_GUEST for Parallels. Approved by: cem Differential Revision: https://reviews.freebsd.org/D20305 Modified: head/sys/kern/subr_param.c head/sys/sys/systm.h head/sys/x86/x86/identcpu.c Modified: head/sys/kern/subr_param.c ============================================================================== --- head/sys/kern/subr_param.c Tue May 21 08:24:22 2019 (r348050) +++ head/sys/kern/subr_param.c Tue May 21 13:29:53 2019 (r348051) @@ -146,15 +146,16 @@ SYSCTL_PROC(_kern, OID_AUTO, vm_guest, CTLFLAG_RD | CT * corresponding enum VM_GUEST members. */ static const char *const vm_guest_sysctl_names[] = { - "none", - "generic", - "xen", - "hv", - "vmware", - "kvm", - "bhyve", - "vbox", - NULL + [VM_GUEST_NO] = "none", + [VM_GUEST_VM] = "generic", + [VM_GUEST_XEN] = "xen", + [VM_GUEST_HV] = "hv", + [VM_GUEST_VMWARE] = "vmware", + [VM_GUEST_KVM] = "kvm", + [VM_GUEST_BHYVE] = "bhyve", + [VM_GUEST_VBOX] = "vbox", + [VM_GUEST_PARALLELS] = "parallels", + [VM_LAST] = NULL }; CTASSERT(nitems(vm_guest_sysctl_names) - 1 == VM_LAST); Modified: head/sys/sys/systm.h ============================================================================== --- head/sys/sys/systm.h Tue May 21 08:24:22 2019 (r348050) +++ head/sys/sys/systm.h Tue May 21 13:29:53 2019 (r348051) @@ -79,7 +79,7 @@ extern int vm_guest; /* Running as virtual machine gu */ enum VM_GUEST { VM_GUEST_NO = 0, VM_GUEST_VM, VM_GUEST_XEN, VM_GUEST_HV, VM_GUEST_VMWARE, VM_GUEST_KVM, VM_GUEST_BHYVE, VM_GUEST_VBOX, - VM_LAST }; + VM_GUEST_PARALLELS, VM_LAST }; /* * These functions need to be declared before the KASSERT macro is invoked in Modified: head/sys/x86/x86/identcpu.c ============================================================================== --- head/sys/x86/x86/identcpu.c Tue May 21 08:24:22 2019 (r348050) +++ head/sys/x86/x86/identcpu.c Tue May 21 13:29:53 2019 (r348051) @@ -1305,23 +1305,27 @@ hook_tsc_freq(void *arg __unused) SYSINIT(hook_tsc_freq, SI_SUB_CONFIGURE, SI_ORDER_ANY, hook_tsc_freq, NULL); -static const char *const vm_bnames[] = { - "QEMU", /* QEMU */ - "Plex86", /* Plex86 */ - "Bochs", /* Bochs */ - "Xen", /* Xen */ - "BHYVE", /* bhyve */ - "Seabios", /* KVM */ - NULL +static const struct { + const char * vm_bname; + int vm_guest; +} vm_bnames[] = { + { "QEMU", VM_GUEST_VM }, /* QEMU */ + { "Plex86", VM_GUEST_VM }, /* Plex86 */ + { "Bochs", VM_GUEST_VM }, /* Bochs */ + { "Xen", VM_GUEST_XEN }, /* Xen */ + { "BHYVE", VM_GUEST_BHYVE }, /* bhyve */ + { "Seabios", VM_GUEST_KVM }, /* KVM */ }; -static const char *const vm_pnames[] = { - "VMware Virtual Platform", /* VMWare VM */ - "Virtual Machine", /* Microsoft VirtualPC */ - "VirtualBox", /* Sun xVM VirtualBox */ - "Parallels Virtual Platform", /* Parallels VM */ - "KVM", /* KVM */ - NULL +static const struct { + const char * vm_pname; + int vm_guest; +} vm_pnames[] = { + { "VMware Virtual Platform", VM_GUEST_VMWARE }, + { "Virtual Machine", VM_GUEST_VM }, /* Microsoft VirtualPC */ + { "VirtualBox", VM_GUEST_VBOX }, + { "Parallels Virtual Platform", VM_GUEST_PARALLELS }, + { "KVM", VM_GUEST_KVM }, }; static struct { @@ -1413,7 +1417,10 @@ identify_hypervisor(void) if (cpu_feature2 & CPUID2_HV) { vm_guest = VM_GUEST_VM; identify_hypervisor_cpuid_base(); - return; + + /* If we have a definitive vendor, we can return now. */ + if (*hv_vendor != '\0') + return; } /* @@ -1438,19 +1445,27 @@ identify_hypervisor(void) */ p = kern_getenv("smbios.bios.vendor"); if (p != NULL) { - for (i = 0; vm_bnames[i] != NULL; i++) - if (strcmp(p, vm_bnames[i]) == 0) { - vm_guest = VM_GUEST_VM; - freeenv(p); - return; + for (i = 0; i < nitems(vm_bnames); i++) + if (strcmp(p, vm_bnames[i].vm_bname) == 0) { + vm_guest = vm_bnames[i].vm_guest; + /* If we have a specific match, return */ + if (vm_guest != VM_GUEST_VM) { + freeenv(p); + return; + } + /* + * We are done with bnames, but there might be + * a more specific match in the pnames + */ + break; } freeenv(p); } p = kern_getenv("smbios.system.product"); if (p != NULL) { - for (i = 0; vm_pnames[i] != NULL; i++) - if (strcmp(p, vm_pnames[i]) == 0) { - vm_guest = VM_GUEST_VM; + for (i = 0; i < nitems(vm_pnames); i++) + if (strcmp(p, vm_pnames[i].vm_pname) == 0) { + vm_guest = vm_pnames[i].vm_guest; freeenv(p); return; } @@ -2586,7 +2601,7 @@ static void print_hypervisor_info(void) { - if (*hv_vendor) + if (*hv_vendor != '\0') printf("Hypervisor: Origin = \"%s\"\n", hv_vendor); } From owner-svn-src-head@freebsd.org Tue May 21 15:12:14 2019 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 A130F15B026A; Tue, 21 May 2019 15:12:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 452B26A96E; Tue, 21 May 2019 15:12:14 +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 230ED77E3; Tue, 21 May 2019 15:12:14 +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 x4LFCD2a046142; Tue, 21 May 2019 15:12:13 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4LFCDEi046141; Tue, 21 May 2019 15:12:13 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201905211512.x4LFCDEi046141@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 21 May 2019 15:12:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348052 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 348052 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 452B26A96E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.940,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 15:12:14 -0000 Author: kib Date: Tue May 21 15:12:13 2019 New Revision: 348052 URL: https://svnweb.freebsd.org/changeset/base/348052 Log: NDFREE(): Fix unlocking for LOCKPARENT|LOCKLEAF and ndp->ni_dvp == ndp->ni_vp. NDFREE() calculates unlock_dvp after ndp->ni_vp is unlocked and zeroed out. This makes the comparision of ni_dvp with ni_vp always fail. Move the calculation of unlock_dvp right after unlock_vp, so that the code sees correct ni_vp value. Reproduced by chdir("/usr"); open("/..", O_BENEATH | O_RDONLY); Reported by: syzkaller Reviewed by: markj, mckusick Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D20304 Modified: head/sys/kern/vfs_lookup.c Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Tue May 21 13:29:53 2019 (r348051) +++ head/sys/kern/vfs_lookup.c Tue May 21 15:12:13 2019 (r348052) @@ -1332,6 +1332,10 @@ NDFREE(struct nameidata *ndp, const u_int flags) if (!(flags & NDF_NO_VP_UNLOCK) && (ndp->ni_cnd.cn_flags & LOCKLEAF) && ndp->ni_vp) unlock_vp = 1; + if (!(flags & NDF_NO_DVP_UNLOCK) && + (ndp->ni_cnd.cn_flags & LOCKPARENT) && + ndp->ni_dvp != ndp->ni_vp) + unlock_dvp = 1; if (!(flags & NDF_NO_VP_RELE) && ndp->ni_vp) { if (unlock_vp) { vput(ndp->ni_vp); @@ -1342,10 +1346,6 @@ NDFREE(struct nameidata *ndp, const u_int flags) } if (unlock_vp) VOP_UNLOCK(ndp->ni_vp, 0); - if (!(flags & NDF_NO_DVP_UNLOCK) && - (ndp->ni_cnd.cn_flags & LOCKPARENT) && - ndp->ni_dvp != ndp->ni_vp) - unlock_dvp = 1; if (!(flags & NDF_NO_DVP_RELE) && (ndp->ni_cnd.cn_flags & (LOCKPARENT|WANTPARENT))) { if (unlock_dvp) { From owner-svn-src-head@freebsd.org Tue May 21 18:04:04 2019 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 E0FEE15B40A3; Tue, 21 May 2019 18:04:03 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 66EAA7089A; Tue, 21 May 2019 18:04:03 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4AB4894DA; Tue, 21 May 2019 18:03:59 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4LI3x3j036725; Tue, 21 May 2019 18:03:59 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4LI3xkm036724; Tue, 21 May 2019 18:03:59 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201905211803.x4LI3xkm036724@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Tue, 21 May 2019 18:03:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348056 - head/sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: dchagin X-SVN-Commit-Paths: head/sys/compat/linux X-SVN-Commit-Revision: 348056 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 66EAA7089A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 18:04:04 -0000 Author: dchagin Date: Tue May 21 18:03:58 2019 New Revision: 348056 URL: https://svnweb.freebsd.org/changeset/base/348056 Log: Do not leak sa in linux_recvfrom() call if kern_recvit() fails. MFC after: 1 week Modified: head/sys/compat/linux/linux_socket.c Modified: head/sys/compat/linux/linux_socket.c ============================================================================== --- head/sys/compat/linux/linux_socket.c Tue May 21 16:36:28 2019 (r348055) +++ head/sys/compat/linux/linux_socket.c Tue May 21 18:03:58 2019 (r348056) @@ -908,7 +908,7 @@ linux_recvfrom(struct thread *td, struct linux_recvfro error = kern_recvit(td, args->s, &msg, UIO_SYSSPACE, NULL); if (error != 0) - return (error); + goto out; if (PTRIN(args->from) != NULL) { error = bsd_to_linux_sockaddr(sa, &lsa, msg.msg_namelen); @@ -921,7 +921,7 @@ linux_recvfrom(struct thread *td, struct linux_recvfro if (error == 0 && PTRIN(args->fromlen) != NULL) error = copyout(&msg.msg_namelen, PTRIN(args->fromlen), sizeof(msg.msg_namelen)); - +out: free(sa, M_SONAME); return (error); } From owner-svn-src-head@freebsd.org Tue May 21 18:05:58 2019 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 5ED9C15B422A; Tue, 21 May 2019 18:05:58 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0635971000; Tue, 21 May 2019 18:05:58 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D6DFF94E1; Tue, 21 May 2019 18:05:57 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4LI5vO7037585; Tue, 21 May 2019 18:05:57 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4LI5vJO037584; Tue, 21 May 2019 18:05:57 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201905211805.x4LI5vJO037584@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Tue, 21 May 2019 18:05:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348057 - head/sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: dchagin X-SVN-Commit-Paths: head/sys/compat/linux X-SVN-Commit-Revision: 348057 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0635971000 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 18:05:58 -0000 Author: dchagin Date: Tue May 21 18:05:57 2019 New Revision: 348057 URL: https://svnweb.freebsd.org/changeset/base/348057 Log: Do not use uninitialised sa. Reported by: tijl@ MFC after: 1 week Modified: head/sys/compat/linux/linux_socket.c Modified: head/sys/compat/linux/linux_socket.c ============================================================================== --- head/sys/compat/linux/linux_socket.c Tue May 21 18:03:58 2019 (r348056) +++ head/sys/compat/linux/linux_socket.c Tue May 21 18:05:57 2019 (r348057) @@ -1165,7 +1165,7 @@ linux_recvmsg_common(struct thread *td, l_int s, struc if (error != 0) goto bad; - if (sa) { + if (msg->msg_name) { msg->msg_name = PTRIN(linux_msg.msg_name); error = bsd_to_linux_sockaddr(sa, &lsa, msg->msg_namelen); if (error == 0) From owner-svn-src-head@freebsd.org Tue May 21 18:08:20 2019 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 57A0415B4311; Tue, 21 May 2019 18:08:20 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BF5CA71378; Tue, 21 May 2019 18:08:19 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8805494E2; Tue, 21 May 2019 18:08:19 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4LI8J0l037727; Tue, 21 May 2019 18:08:19 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4LI8JU4037726; Tue, 21 May 2019 18:08:19 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201905211808.x4LI8JU4037726@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Tue, 21 May 2019 18:08:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348058 - head/sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: dchagin X-SVN-Commit-Paths: head/sys/compat/linux X-SVN-Commit-Revision: 348058 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BF5CA71378 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 18:08:20 -0000 Author: dchagin Date: Tue May 21 18:08:19 2019 New Revision: 348058 URL: https://svnweb.freebsd.org/changeset/base/348058 Log: Do not leak sa in linux_recvmsg() call if kern_recvit() fails. MFC after: 1 week Modified: head/sys/compat/linux/linux_socket.c Modified: head/sys/compat/linux/linux_socket.c ============================================================================== --- head/sys/compat/linux/linux_socket.c Tue May 21 18:05:57 2019 (r348057) +++ head/sys/compat/linux/linux_socket.c Tue May 21 18:08:19 2019 (r348058) @@ -1155,7 +1155,8 @@ linux_recvmsg_common(struct thread *td, l_int s, struc if (msg->msg_name) { sa = malloc(msg->msg_namelen, M_SONAME, M_WAITOK); msg->msg_name = sa; - } + } else + sa = NULL; uiov = msg->msg_iov; msg->msg_iov = iov; @@ -1172,7 +1173,6 @@ linux_recvmsg_common(struct thread *td, l_int s, struc error = copyout(lsa, PTRIN(msg->msg_name), msg->msg_namelen); free(lsa, M_SONAME); - free(sa, M_SONAME); if (error != 0) goto bad; } @@ -1292,6 +1292,7 @@ bad: } free(iov, M_IOV); free(linux_cmsg, M_LINUX); + free(sa, M_SONAME); return (error); } From owner-svn-src-head@freebsd.org Tue May 21 18:38:47 2019 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 231B215B5787; Tue, 21 May 2019 18:38:47 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from mx0b-00273201.pphosted.com (mx0b-00273201.pphosted.com [67.231.152.164]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.pphosted.com", Issuer "Thawte RSA CA 2018" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D513872A79; Tue, 21 May 2019 18:38:44 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from pps.filterd (m0108162.ppops.net [127.0.0.1]) by mx0b-00273201.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x4LIYUdt019198; Tue, 21 May 2019 11:38:43 -0700 Received: from nam03-dm3-obe.outbound.protection.outlook.com (mail-dm3nam03lp2054.outbound.protection.outlook.com [104.47.41.54]) by mx0b-00273201.pphosted.com with ESMTP id 2smfx40r75-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 21 May 2019 11:38:43 -0700 Received: from DM6PR05CA0033.namprd05.prod.outlook.com (2603:10b6:5:f8::46) by DM6PR05MB6714.namprd05.prod.outlook.com (2603:10b6:5:131::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1922.7; Tue, 21 May 2019 18:38:41 +0000 Received: from BY2NAM05FT010.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e52::205) by DM6PR05CA0033.outlook.office365.com (2603:10b6:5:f8::46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1922.7 via Frontend Transport; Tue, 21 May 2019 18:38:41 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.12 as permitted sender) Received: from P-EXFEND-EQX-01.jnpr.net (66.129.239.12) by BY2NAM05FT010.mail.protection.outlook.com (10.152.100.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1922.10 via Frontend Transport; Tue, 21 May 2019 18:38:40 +0000 Received: from P-EXBEND-EQX-03.jnpr.net (10.104.8.56) by P-EXFEND-EQX-01.jnpr.net (10.104.8.54) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 21 May 2019 11:38:40 -0700 Received: from P-EXBEND-EQX-01.jnpr.net (10.104.8.52) by P-EXBEND-EQX-03.jnpr.net (10.104.8.56) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 21 May 2019 11:38:40 -0700 Received: from p-mailhub01.juniper.net (10.104.20.6) by P-EXBEND-EQX-01.jnpr.net (10.104.8.52) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Tue, 21 May 2019 11:38:40 -0700 Received: from kaos.jnpr.net (kaos.jnpr.net [172.23.50.162]) by p-mailhub01.juniper.net (8.14.4/8.11.3) with ESMTP id x4LIcent015147; Tue, 21 May 2019 11:38:40 -0700 (envelope-from sjg@juniper.net) Received: by kaos.jnpr.net (Postfix, from userid 1377) id 010051FF62; Tue, 21 May 2019 11:38:40 -0700 (PDT) Received: from kaos.jnpr.net (localhost [127.0.0.1]) by kaos.jnpr.net (Postfix) with ESMTP id 008301FF61; Tue, 21 May 2019 11:38:39 -0700 (PDT) To: CC: , , , Subject: Re: svn commit: r347980 - head/lib/libsecureboot/openpgp In-Reply-To: <201905201815.x4KIFMw4074971@gndrsh.dnsmgr.net> References: <201905201815.x4KIFMw4074971@gndrsh.dnsmgr.net> Comments: In-reply-to: "Rodney W. Grimes" message dated "Mon, 20 May 2019 11:15:22 -0700." From: "Simon J. Gerraty" X-Mailer: MH-E 8.6+git; nmh 1.7.1; GNU Emacs 26.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <46593.1558463919.1@kaos.jnpr.net> Date: Tue, 21 May 2019 11:38:39 -0700 Message-ID: <50618.1558463919@kaos.jnpr.net> X-EXCLAIMER-MD-CONFIG: e3cb0ff2-54e7-4646-8a04-0dae4ac7b136 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:66.129.239.12; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(396003)(376002)(136003)(39860400002)(346002)(2980300002)(189003)(199004)(52314003)(81166006)(6266002)(2351001)(76506005)(68736007)(117636001)(4744005)(53416004)(81156014)(8676002)(46406003)(6246003)(54906003)(305945005)(90966002)(47776003)(7126003)(476003)(107886003)(23726003)(7696005)(76176011)(486006)(126002)(446003)(11346002)(70206006)(70586007)(53936002)(2906002)(50226002)(8936002)(450100002)(5660300002)(16586007)(50466002)(4326008)(186003)(26005)(77096007)(336012)(86362001)(356004)(229853002)(6916009)(55016002)(97876018)(316002)(478600001)(97756001)(69596002)(9686003); DIR:OUT; SFP:1102; SCL:1; SRVR:DM6PR05MB6714; H:P-EXFEND-EQX-01.jnpr.net; FPR:; SPF:SoftFail; LANG:en; PTR:InfoDomainNonexistent; MX:1; A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 53e5511f-192b-49ba-095e-08d6de1b8bc6 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4710095)(4711036)(2017052603328); SRVR:DM6PR05MB6714; X-MS-TrafficTypeDiagnostic: DM6PR05MB6714: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5516; X-Forefront-PRVS: 0044C17179 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: iCfNYwSFb8NpmPqq/qGEitQvZsFZOl6tY+ZsN6j+AkIqNHnZVJfwdc8aJdksIH5aB9Nu7bDu4HbuCH839lQdYHomqgYI+vJ3KYq65fU6Z1uNRzBM3AepJ+8/eGrRYvpDdXgEGHAy3KqbJV/uSYg6OtJk88EJDuVv3bd84KPnGFUAT69LIf4lxvYydXkcJNAmWSuS1LLvk7VEHLWLB++U7OjHwEZoaUvkI5+4JI7lE5Vm9V9zFmxyn97e5A4penjoakXCc6uvGr6pTO+L9JhS6sxsekWIjYDzgCYrACUiGhqahAYNmWRcI6UD0099YVdWBMpRkL7frwnbK87eeWCJxINI0CF80lXHP8N6yimo5YJj1FqVPYmH6tw0UF2LXz5PRrYbnmw4hu5yAVwGYEljsci9V7DYaJnkYT40XmFHZXc= X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 May 2019 18:38:40.9798 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 53e5511f-192b-49ba-095e-08d6de1b8bc6 X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4; Ip=[66.129.239.12]; Helo=[P-EXFEND-EQX-01.jnpr.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR05MB6714 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-05-21_04:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=484 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1905210114 X-Rspamd-Queue-Id: D513872A79 X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.87 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; R_DKIM_ALLOW(-0.20)[juniper.net:s=PPS1017]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:67.231.152.164]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; RCVD_COUNT_TWELVE(0.00)[12]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.38)[0.379,0]; DKIM_TRACE(0.00)[juniper.net:+]; DMARC_POLICY_ALLOW(-0.50)[juniper.net,reject]; MX_GOOD(-0.01)[mxb-00273201.gslb.pphosted.com,mxa-00273201.gslb.pphosted.com]; IP_SCORE(-0.14)[ip: (-0.39), ipnet: 67.231.152.0/24(-0.15), asn: 22843(-0.09), country: US(-0.06)]; RCVD_IN_DNSWL_LOW(-0.10)[164.152.231.67.list.dnswl.org : 127.0.3.1]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:22843, ipnet:67.231.152.0/24, country:US]; RCVD_TLS_LAST(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 18:38:47 -0000 Rodney W. Grimes wrote: > > Sorry,should I wait until after freeze? > > This is all optional stuff anyway, so no great harm either way. > > No, please do merge this at 3 days, it is just that the > normal minimum bake time in ^head is 3 days, freeze or not. Ah, got it. Thanks --sjg From owner-svn-src-head@freebsd.org Tue May 21 18:42:37 2019 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 0FB1C15B59C9; Tue, 21 May 2019 18:42:37 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AB27D72EF0; Tue, 21 May 2019 18:42:36 +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 87B7D9B96; Tue, 21 May 2019 18:42:36 +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 x4LIgaZk058087; Tue, 21 May 2019 18:42:36 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4LIga6Q058086; Tue, 21 May 2019 18:42:36 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201905211842.x4LIga6Q058086@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 21 May 2019 18:42:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348059 - head/sys/dev/vt/hw/efifb X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/dev/vt/hw/efifb X-SVN-Commit-Revision: 348059 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AB27D72EF0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 18:42:37 -0000 Author: emaste Date: Tue May 21 18:42:36 2019 New Revision: 348059 URL: https://svnweb.freebsd.org/changeset/base/348059 Log: vt efifb: add suspend/resume calls Using the latest NVIDIA driver, upon resuming from suspend with X running the display remained blank. Additionally OpenGL applications that were running triggered a number of error messages from the NVIDIA driver. This occurred because the vt efifb back-end did not signal the X server to release the display before suspending (or to re-acquire it after resuming). The NVIDIA driver includes code for smoothly shutting down and re-initializing the GPU, which was not getting called. Since the NVIDIA driver doesn't currently support framebuffer devices and vt is forced to fall back to the efifb back-end, add vd_suspend and vd_resume members to connect the suspend/resume path. This ensures the X server is properly able to re-initialize the display. PR: 237050 Submitted by: Erik Kurzinger Reviewed by: markj MFC after: 2 weeks Event: Waterloo Hackathon 2019 Modified: head/sys/dev/vt/hw/efifb/efifb.c Modified: head/sys/dev/vt/hw/efifb/efifb.c ============================================================================== --- head/sys/dev/vt/hw/efifb/efifb.c Tue May 21 18:08:19 2019 (r348058) +++ head/sys/dev/vt/hw/efifb/efifb.c Tue May 21 18:42:36 2019 (r348059) @@ -64,6 +64,8 @@ static struct vt_driver vt_efifb_driver = { .vd_setpixel = vt_fb_setpixel, .vd_fb_ioctl = vt_fb_ioctl, .vd_fb_mmap = vt_fb_mmap, + .vd_suspend = vt_suspend, + .vd_resume = vt_resume, /* Better than VGA, but still generic driver. */ .vd_priority = VD_PRIORITY_GENERIC + 1, }; From owner-svn-src-head@freebsd.org Tue May 21 19:18:56 2019 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 1898915B69EB; Tue, 21 May 2019 19:18:56 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AE33274A6D; Tue, 21 May 2019 19:18:55 +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 85085A0BC; Tue, 21 May 2019 19:18:55 +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 x4LJItTf074023; Tue, 21 May 2019 19:18:55 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4LJItPX074022; Tue, 21 May 2019 19:18:55 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201905211918.x4LJItPX074022@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Tue, 21 May 2019 19:18:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348060 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 348060 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AE33274A6D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 19:18:56 -0000 Author: bz Date: Tue May 21 19:18:55 2019 New Revision: 348060 URL: https://svnweb.freebsd.org/changeset/base/348060 Log: Similarly to r338257,338306 try to fold the two consecutive #ifdef RSS section in udp_output() into one by moving a '}' outside of the conditional block. MFC after: 2 months Event: Waterloo Hackathon 2019 Modified: head/sys/netinet/udp_usrreq.c Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Tue May 21 18:42:36 2019 (r348059) +++ head/sys/netinet/udp_usrreq.c Tue May 21 19:18:55 2019 (r348060) @@ -1505,8 +1505,9 @@ udp_output(struct inpcb *inp, struct mbuf *m, struct s if (flowtype != M_HASHTYPE_NONE) { m->m_pkthdr.flowid = flowid; M_HASHTYPE_SET(m, flowtype); + } #ifdef RSS - } else { + else { uint32_t hash_val, hash_type; /* * Calculate an appropriate RSS hash for UDP and @@ -1529,10 +1530,8 @@ udp_output(struct inpcb *inp, struct mbuf *m, struct s m->m_pkthdr.flowid = hash_val; M_HASHTYPE_SET(m, hash_type); } -#endif } -#ifdef RSS /* * Don't override with the inp cached flowid value. * From owner-svn-src-head@freebsd.org Tue May 21 19:23:57 2019 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 ABAF215B6EDA; Tue, 21 May 2019 19:23:57 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D993751EF; Tue, 21 May 2019 19:23:57 +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 30E42A26C; Tue, 21 May 2019 19:23:57 +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 x4LJNuSR079045; Tue, 21 May 2019 19:23:56 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4LJNufW079044; Tue, 21 May 2019 19:23:56 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201905211923.x4LJNufW079044@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Tue, 21 May 2019 19:23:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348061 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 348061 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4D993751EF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 19:23:57 -0000 Author: bz Date: Tue May 21 19:23:56 2019 New Revision: 348061 URL: https://svnweb.freebsd.org/changeset/base/348061 Log: Massively blow up the locking-related KASSERTs used to make sure that we end up in a consistent locking state at the end of udp_output() in order to be able to see what the values are based on which we once took a decision (note: some values may have changed). This helped to debug a syzkaller report. MFC after: 2 months Event: Waterloo Hackathon 2019 Modified: head/sys/netinet/udp_usrreq.c Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Tue May 21 19:18:55 2019 (r348060) +++ head/sys/netinet/udp_usrreq.c Tue May 21 19:23:56 2019 (r348061) @@ -1566,12 +1566,22 @@ udp_output(struct inpcb *inp, struct mbuf *m, struct s release: if (unlock_udbinfo == UH_WLOCKED) { KASSERT(unlock_inp == UH_WLOCKED, - ("%s: excl udbinfo lock, shared inp lock", __func__)); + ("%s: excl udbinfo lock %#03x, shared inp lock %#03x, " + "sin %p daddr %#010x inp %p laddr %#010x lport %#06x " + "src fam %#04x", + __func__, unlock_udbinfo, unlock_inp, sin, + (sin != NULL) ? sin->sin_addr.s_addr : 0xfefefefe, inp, + inp->inp_laddr.s_addr, inp->inp_lport, src.sin_family)); INP_HASH_WUNLOCK(pcbinfo); INP_WUNLOCK(inp); } else if (unlock_udbinfo == UH_RLOCKED) { KASSERT(unlock_inp == UH_RLOCKED, - ("%s: shared udbinfo lock, excl inp lock", __func__)); + ("%s: shared udbinfo lock %#03x, excl inp lock %#03x, " + "sin %p daddr %#010x inp %p laddr %#010x lport %#06x " + "src fam %#04x", + __func__, unlock_udbinfo, unlock_inp, sin, + (sin != NULL) ? sin->sin_addr.s_addr : 0xfefefefe, inp, + inp->inp_laddr.s_addr, inp->inp_lport, src.sin_family)); INP_HASH_RUNLOCK_ET(pcbinfo, et); INP_RUNLOCK(inp); } else if (unlock_inp == UH_WLOCKED) From owner-svn-src-head@freebsd.org Tue May 21 19:42:05 2019 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 85E5A15B79B6; Tue, 21 May 2019 19:42:05 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2DE267618C; Tue, 21 May 2019 19:42:05 +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 09B8DA5CA; Tue, 21 May 2019 19:42:05 +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 x4LJg4Cg088782; Tue, 21 May 2019 19:42:04 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4LJg4hZ088781; Tue, 21 May 2019 19:42:04 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201905211942.x4LJg4hZ088781@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Tue, 21 May 2019 19:42:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348063 - head/tests/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/tests/sys/netinet X-SVN-Commit-Revision: 348063 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2DE267618C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.946,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 19:42:05 -0000 Author: bz Date: Tue May 21 19:42:04 2019 New Revision: 348063 URL: https://svnweb.freebsd.org/changeset/base/348063 Log: Add very basic afinet socket tests which I started to write in order to then try to reproduce a kernel panic, which turned out to be a race condition and hard to test from here. Commit the changes anywhere as the "bind zero" case was a surprise to me and we should try to maintain this status. Also it is easy examples someone can build upon. With help from: markj Event: Waterloo Hackathon 2019 Added: head/tests/sys/netinet/socket_afinet.c (contents, props changed) Modified: head/tests/sys/netinet/Makefile Modified: head/tests/sys/netinet/Makefile ============================================================================== --- head/tests/sys/netinet/Makefile Tue May 21 19:34:39 2019 (r348062) +++ head/tests/sys/netinet/Makefile Tue May 21 19:42:04 2019 (r348063) @@ -4,7 +4,8 @@ TESTSDIR= ${TESTSBASE}/sys/netinet BINDIR= ${TESTSDIR} ATF_TESTS_C= ip_reass_test \ - so_reuseport_lb_test + so_reuseport_lb_test \ + socket_afinet ATF_TESTS_SH= fibs_test Added: head/tests/sys/netinet/socket_afinet.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/netinet/socket_afinet.c Tue May 21 19:42:04 2019 (r348063) @@ -0,0 +1,97 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Bjoern A. Zeeb + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include + +ATF_TC_WITHOUT_HEAD(socket_afinet); +ATF_TC_BODY(socket_afinet, tc) +{ + int sd; + + sd = socket(PF_INET, SOCK_DGRAM, 0); + ATF_CHECK(sd >= 0); + + close(sd); +} + +ATF_TC_WITHOUT_HEAD(socket_afinet_bind_zero); +ATF_TC_BODY(socket_afinet_bind_zero, tc) +{ + int sd, rc; + struct sockaddr_in sin; + + sd = socket(PF_INET, SOCK_DGRAM, 0); + ATF_CHECK(sd >= 0); + + bzero(&sin, sizeof(sin)); + /* + * For AF_INET we do not check the family in in_pcbbind_setup(9), + * sa_len gets set from the syscall argument in getsockaddr(9), + * so we bind to 0:0. + */ + rc = bind(sd, (struct sockaddr *)&sin, sizeof(sin)); + ATF_CHECK_EQ(0, rc); + + close(sd); +} + +ATF_TC_WITHOUT_HEAD(socket_afinet_bind_ok); +ATF_TC_BODY(socket_afinet_bind_ok, tc) +{ + int sd, rc; + struct sockaddr_in sin; + + sd = socket(PF_INET, SOCK_DGRAM, 0); + ATF_CHECK(sd >= 0); + + bzero(&sin, sizeof(sin)); + sin.sin_family = AF_INET; + sin.sin_len = sizeof(sin); + sin.sin_port = htons(6666); + sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK); + rc = bind(sd, (struct sockaddr *)&sin, sizeof(sin)); + ATF_CHECK_EQ(0, rc); + + close(sd); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, socket_afinet); + ATF_TP_ADD_TC(tp, socket_afinet_bind_zero); + ATF_TP_ADD_TC(tp, socket_afinet_bind_ok); + + return atf_no_error(); +} From owner-svn-src-head@freebsd.org Tue May 21 20:38:54 2019 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 12A4A158CC61; Tue, 21 May 2019 20:38:54 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AC27E77DFA; Tue, 21 May 2019 20:38:53 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9428BAE4C; Tue, 21 May 2019 20:38:53 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4LKcrIw016102; Tue, 21 May 2019 20:38:53 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4LKcmoq016080; Tue, 21 May 2019 20:38:48 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201905212038.x4LKcmoq016080@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Tue, 21 May 2019 20:38:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348064 - in head/sys: arm64/arm64 dev/acpica dev/ixgbe fs/unionfs kern mips/mips riscv/riscv ufs/ffs ufs/ufs vm X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head/sys: arm64/arm64 dev/acpica dev/ixgbe fs/unionfs kern mips/mips riscv/riscv ufs/ffs ufs/ufs vm X-SVN-Commit-Revision: 348064 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AC27E77DFA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 20:38:54 -0000 Author: cem Date: Tue May 21 20:38:48 2019 New Revision: 348064 URL: https://svnweb.freebsd.org/changeset/base/348064 Log: Include ktr.h in more compilation units Similar to r348026, exhaustive search for uses of CTRn() and cross reference ktr.h includes. Where it was obvious that an OS compat header of some kind included ktr.h indirectly, .c files were left alone. Some of these files clearly got ktr.h via header pollution in some scenarios, or tinderbox would not be passing prior to this revision, but go ahead and explicitly include it in files using it anyway. Like r348026, these CUs did not show up in tinderbox as missing the include. Reported by: peterj (arm64/mp_machdep.c) X-MFC-With: r347984 Sponsored by: Dell EMC Isilon Modified: head/sys/arm64/arm64/mp_machdep.c head/sys/arm64/arm64/trap.c head/sys/dev/acpica/acpi_ec.c head/sys/dev/ixgbe/if_sriov.c head/sys/fs/unionfs/union_subr.c head/sys/kern/kern_exit.c head/sys/kern/subr_eventhandler.c head/sys/kern/sys_process.c head/sys/kern/vfs_bio.c head/sys/kern/vfs_cache.c head/sys/kern/vfs_mount.c head/sys/kern/vfs_subr.c head/sys/kern/vfs_vnops.c head/sys/mips/mips/freebsd32_machdep.c head/sys/mips/mips/pm_machdep.c head/sys/mips/mips/trap.c head/sys/riscv/riscv/trap.c head/sys/ufs/ffs/ffs_vfsops.c head/sys/ufs/ufs/ufs_extattr.c head/sys/vm/vnode_pager.c Modified: head/sys/arm64/arm64/mp_machdep.c ============================================================================== --- head/sys/arm64/arm64/mp_machdep.c Tue May 21 19:42:04 2019 (r348063) +++ head/sys/arm64/arm64/mp_machdep.c Tue May 21 20:38:48 2019 (r348064) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/arm64/arm64/trap.c ============================================================================== --- head/sys/arm64/arm64/trap.c Tue May 21 19:42:04 2019 (r348063) +++ head/sys/arm64/arm64/trap.c Tue May 21 20:38:48 2019 (r348064) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/dev/acpica/acpi_ec.c ============================================================================== --- head/sys/dev/acpica/acpi_ec.c Tue May 21 19:42:04 2019 (r348063) +++ head/sys/dev/acpica/acpi_ec.c Tue May 21 20:38:48 2019 (r348064) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include "opt_acpi.h" #include #include +#include #include #include #include Modified: head/sys/dev/ixgbe/if_sriov.c ============================================================================== --- head/sys/dev/ixgbe/if_sriov.c Tue May 21 19:42:04 2019 (r348063) +++ head/sys/dev/ixgbe/if_sriov.c Tue May 21 20:38:48 2019 (r348064) @@ -37,6 +37,8 @@ #ifdef PCI_IOV +#include + MALLOC_DEFINE(M_IXGBE_SRIOV, "ix_sriov", "ix SR-IOV allocations"); /************************************************************************ Modified: head/sys/fs/unionfs/union_subr.c ============================================================================== --- head/sys/fs/unionfs/union_subr.c Tue May 21 19:42:04 2019 (r348063) +++ head/sys/fs/unionfs/union_subr.c Tue May 21 20:38:48 2019 (r348064) @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include Modified: head/sys/kern/kern_exit.c ============================================================================== --- head/sys/kern/kern_exit.c Tue May 21 19:42:04 2019 (r348063) +++ head/sys/kern/kern_exit.c Tue May 21 20:38:48 2019 (r348064) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/kern/subr_eventhandler.c ============================================================================== --- head/sys/kern/subr_eventhandler.c Tue May 21 19:42:04 2019 (r348063) +++ head/sys/kern/subr_eventhandler.c Tue May 21 20:38:48 2019 (r348064) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include Modified: head/sys/kern/sys_process.c ============================================================================== --- head/sys/kern/sys_process.c Tue May 21 19:42:04 2019 (r348063) +++ head/sys/kern/sys_process.c Tue May 21 20:38:48 2019 (r348064) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Tue May 21 19:42:04 2019 (r348063) +++ head/sys/kern/vfs_bio.c Tue May 21 20:38:48 2019 (r348064) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Tue May 21 19:42:04 2019 (r348063) +++ head/sys/kern/vfs_cache.c Tue May 21 20:38:48 2019 (r348064) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/kern/vfs_mount.c ============================================================================== --- head/sys/kern/vfs_mount.c Tue May 21 19:42:04 2019 (r348063) +++ head/sys/kern/vfs_mount.c Tue May 21 20:38:48 2019 (r348064) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Tue May 21 19:42:04 2019 (r348063) +++ head/sys/kern/vfs_subr.c Tue May 21 20:38:48 2019 (r348064) @@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Tue May 21 19:42:04 2019 (r348063) +++ head/sys/kern/vfs_vnops.c Tue May 21 20:38:48 2019 (r348064) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/mips/mips/freebsd32_machdep.c ============================================================================== --- head/sys/mips/mips/freebsd32_machdep.c Tue May 21 19:42:04 2019 (r348063) +++ head/sys/mips/mips/freebsd32_machdep.c Tue May 21 20:38:48 2019 (r348064) @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include Modified: head/sys/mips/mips/pm_machdep.c ============================================================================== --- head/sys/mips/mips/pm_machdep.c Tue May 21 19:42:04 2019 (r348063) +++ head/sys/mips/mips/pm_machdep.c Tue May 21 20:38:48 2019 (r348064) @@ -40,13 +40,13 @@ #include __FBSDID("$FreeBSD$"); -#include #include #include #include #include #include #include +#include #include #include #include Modified: head/sys/mips/mips/trap.c ============================================================================== --- head/sys/mips/mips/trap.c Tue May 21 19:42:04 2019 (r348063) +++ head/sys/mips/mips/trap.c Tue May 21 20:38:48 2019 (r348064) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/riscv/riscv/trap.c ============================================================================== --- head/sys/riscv/riscv/trap.c Tue May 21 19:42:04 2019 (r348063) +++ head/sys/riscv/riscv/trap.c Tue May 21 20:38:48 2019 (r348064) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Tue May 21 19:42:04 2019 (r348063) +++ head/sys/ufs/ffs/ffs_vfsops.c Tue May 21 20:38:48 2019 (r348064) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/ufs/ufs/ufs_extattr.c ============================================================================== --- head/sys/ufs/ufs/ufs_extattr.c Tue May 21 19:42:04 2019 (r348063) +++ head/sys/ufs/ufs/ufs_extattr.c Tue May 21 20:38:48 2019 (r348064) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/vm/vnode_pager.c ============================================================================== --- head/sys/vm/vnode_pager.c Tue May 21 19:42:04 2019 (r348063) +++ head/sys/vm/vnode_pager.c Tue May 21 20:38:48 2019 (r348064) @@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include From owner-svn-src-head@freebsd.org Tue May 21 21:14:24 2019 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 EB35A158F88A; Tue, 21 May 2019 21:14:23 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8E30280FEF; Tue, 21 May 2019 21:14:23 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 657D6B513; Tue, 21 May 2019 21:14:23 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4LLENxv036683; Tue, 21 May 2019 21:14:23 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4LLENka036682; Tue, 21 May 2019 21:14:23 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201905212114.x4LLENka036682@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Tue, 21 May 2019 21:14:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348065 - head/sys/dev/acpica X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/sys/dev/acpica X-SVN-Commit-Revision: 348065 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8E30280FEF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 21:14:24 -0000 Author: allanjude Date: Tue May 21 21:14:22 2019 New Revision: 348065 URL: https://svnweb.freebsd.org/changeset/base/348065 Log: Correct the way remaining battery life is calculated Previously, if a system had multiple batteries, the remaining life percentage was calculated as the average of each battery's percent remaining. This results in rather incorrect values when you consider the case of the Thinkpad X270 that has a small 3 cell internally battery, and a hot-swappable 9 cell battery that is used first. Battery 0 is at 100%, but battery 1 is at 10%, you do not infact have 55% of your capacity remaining. The new method calculates the percentage based on remaining capacity out of total capacity, giving a much more accurate reading. PR: 229818 Submitted by: Keegan Drake H.P. MFC after: 2 weeks Sponsored by: Klara Systems Event: Waterloo Hackathon 2019 Modified: head/sys/dev/acpica/acpi_battery.c Modified: head/sys/dev/acpica/acpi_battery.c ============================================================================== --- head/sys/dev/acpica/acpi_battery.c Tue May 21 20:38:48 2019 (r348064) +++ head/sys/dev/acpica/acpi_battery.c Tue May 21 21:14:22 2019 (r348065) @@ -119,7 +119,7 @@ int acpi_battery_get_battinfo(device_t dev, struct acpi_battinfo *battinfo) { int batt_stat, devcount, dev_idx, error, i; - int total_cap, total_min, valid_rate, valid_units; + int total_cap, total_lfcap, total_min, valid_rate, valid_units; devclass_t batt_dc; device_t batt_dev; struct acpi_bst *bst; @@ -152,6 +152,7 @@ acpi_battery_get_battinfo(device_t dev, struct acpi_ba */ dev_idx = -1; batt_stat = valid_rate = valid_units = 0; + total_cap = total_lfcap = 0; for (i = 0; i < devcount; i++) { /* Default info for every battery is "not present". */ acpi_reset_battinfo(&bi[i]); @@ -210,17 +211,23 @@ acpi_battery_get_battinfo(device_t dev, struct acpi_ba if (!acpi_battery_bif_valid(bif)) continue; - /* Calculate percent capacity remaining. */ - bi[i].cap = (100 * bst[i].cap) / bif->lfcap; - /* * Some laptops report the "design-capacity" instead of the * "real-capacity" when the battery is fully charged. That breaks * the above arithmetic as it needs to be 100% maximum. */ - if (bi[i].cap > 100) - bi[i].cap = 100; + if (bst[i].cap > bif->lfcap) + bst[i].cap = bif->lfcap; + /* Calculate percent capacity remaining. */ + bi[i].cap = (100 * bst[i].cap) / bif->lfcap; + + /* If this battery is not present, don't use its capacity. */ + if (bi[i].cap != -1) { + total_cap += bst[i].cap; + total_lfcap += bif->lfcap; + } + /* * On systems with more than one battery, they may get used * sequentially, thus bst.rate may only signify the one currently @@ -241,7 +248,7 @@ acpi_battery_get_battinfo(device_t dev, struct acpi_ba } /* Pass 2: calculate capacity and remaining time for all batteries. */ - total_cap = total_min = 0; + total_min = 0; for (i = 0; i < devcount; i++) { /* * If any batteries are discharging, use the sum of the bst.rate @@ -253,10 +260,6 @@ acpi_battery_get_battinfo(device_t dev, struct acpi_ba else bi[i].min = 0; total_min += bi[i].min; - - /* If this battery is not present, don't use its capacity. */ - if (bi[i].cap != -1) - total_cap += bi[i].cap; } /* @@ -265,7 +268,7 @@ acpi_battery_get_battinfo(device_t dev, struct acpi_ba */ if (valid_units > 0) { if (dev == NULL) { - battinfo->cap = total_cap / valid_units; + battinfo->cap = (total_cap * 100) / total_lfcap; battinfo->min = total_min; battinfo->state = batt_stat; battinfo->rate = valid_rate; From owner-svn-src-head@freebsd.org Tue May 21 21:22:45 2019 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 0BA5F158FB79; Tue, 21 May 2019 21:22:45 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A26F481509; Tue, 21 May 2019 21:22: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 7F25FB6DF; Tue, 21 May 2019 21:22: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 x4LLMiWg041720; Tue, 21 May 2019 21:22:44 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4LLMhup041717; Tue, 21 May 2019 21:22:43 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201905212122.x4LLMhup041717@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 21 May 2019 21:22:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348066 - in head/libexec/bootpd: . bootpgw X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/libexec/bootpd: . bootpgw X-SVN-Commit-Revision: 348066 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A26F481509 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 21:22:45 -0000 Author: markj Date: Tue May 21 21:22:43 2019 New Revision: 348066 URL: https://svnweb.freebsd.org/changeset/base/348066 Log: bootpd: Add an option to skip modifications to the ARP table. PR: 30854 Submitted by: Dan Lukes Reviewed by: imp (previous version) MFC after: 1 week Event: Waterloo Hackathon 2019 Differential Revision: https://reviews.freebsd.org/D2581 Modified: head/libexec/bootpd/bootpd.8 head/libexec/bootpd/bootpd.c head/libexec/bootpd/bootpgw/bootpgw.c Modified: head/libexec/bootpd/bootpd.8 ============================================================================== --- head/libexec/bootpd/bootpd.8 Tue May 21 21:14:22 2019 (r348065) +++ head/libexec/bootpd/bootpd.8 Tue May 21 21:22:43 2019 (r348066) @@ -2,7 +2,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 10, 2004 +.Dd May 21, 2019 .Dt BOOTPD 8 .Os .Sh NAME @@ -103,6 +103,8 @@ option may be used to force standalone or inetd mode r .Sh OPTIONS The following options are available: .Bl -tag -width indent +.It Fl a +Skip ARP table modifications. .It Fl t Ar timeout Specify the .Ar timeout Modified: head/libexec/bootpd/bootpd.c ============================================================================== --- head/libexec/bootpd/bootpd.c Tue May 21 21:14:22 2019 (r348065) +++ head/libexec/bootpd/bootpd.c Tue May 21 21:22:43 2019 (r348066) @@ -143,6 +143,7 @@ struct timeval actualtimeout = 15 * 60L, /* tv_sec */ 0 /* tv_usec */ }; +int arpmod = TRUE; /* modify the ARP table */ /* * General @@ -266,6 +267,9 @@ main(argc, argv) break; switch (argv[0][1]) { + case 'a': /* don't modify the ARP table */ + arpmod = FALSE; + break; case 'c': /* chdir_path */ if (argv[0][2]) { stmp = &(argv[0][2]); @@ -583,8 +587,9 @@ PRIVATE void usage() { fprintf(stderr, - "usage: bootpd [-i | -s] [-c chdir-path] [-d level] [-h hostname] [-t timeout]\n"); + "usage: bootpd [-a] [-i | -s] [-c chdir-path] [-d level] [-h hostname] [-t timeout]\n"); fprintf(stderr, " [bootptab [dumpfile]]\n"); + fprintf(stderr, "\t -a\tdon't modify ARP table\n"); fprintf(stderr, "\t -c n\tset current directory\n"); fprintf(stderr, "\t -d n\tset debug level\n"); fprintf(stderr, "\t -h n\tset the hostname to listen on\n"); @@ -1067,10 +1072,12 @@ sendreply(forward, dst_override) if (haf == 0) haf = HTYPE_ETHERNET; - if (debug > 1) - report(LOG_INFO, "setarp %s - %s", - inet_ntoa(dst), haddrtoa(ha, len)); - setarp(s, &dst, haf, ha, len); + if (arpmod) { + if (debug > 1) + report(LOG_INFO, "setarp %s - %s", + inet_ntoa(dst), haddrtoa(ha, len)); + setarp(s, &dst, haf, ha, len); + } } if ((forward == 0) && Modified: head/libexec/bootpd/bootpgw/bootpgw.c ============================================================================== --- head/libexec/bootpd/bootpgw/bootpgw.c Tue May 21 21:14:22 2019 (r348065) +++ head/libexec/bootpd/bootpgw/bootpgw.c Tue May 21 21:22:43 2019 (r348066) @@ -124,6 +124,7 @@ struct timeval actualtimeout = u_char maxhops = 4; /* Number of hops allowed for requests. */ u_int minwait = 3; /* Number of seconds client must wait before its bootrequest packets are forwarded. */ +int arpmod = TRUE; /* modify the ARP table */ /* * General @@ -238,6 +239,9 @@ main(argc, argv) break; switch (argv[0][1]) { + case 'a': /* don't modify the ARP table */ + arpmod = FALSE; + break; case 'd': /* debug level */ if (argv[0][2]) { stmp = &(argv[0][2]); @@ -496,7 +500,8 @@ static void usage() { fprintf(stderr, - "usage: bootpgw [-d level] [-i] [-s] [-t timeout] server\n"); + "usage: \nbootpgw [-a] [-d level] [-h count] [-i] [-s] [-t timeout] [-w time] server\n"); + fprintf(stderr, "\t -a\tdon't modify ARP table\n"); fprintf(stderr, "\t -d n\tset debug level\n"); fprintf(stderr, "\t -h n\tset max hop count\n"); fprintf(stderr, "\t -i\tforce inetd mode (run as child of inetd)\n"); @@ -641,19 +646,23 @@ handle_reply() send_addr.sin_addr = bp->bp_yiaddr; send_addr.sin_port = htons(bootpc_port); - /* Create an ARP cache entry for the client. */ - ha = bp->bp_chaddr; - len = bp->bp_hlen; - if (len > MAXHADDRLEN) - len = MAXHADDRLEN; - haf = (int) bp->bp_htype; - if (haf == 0) - haf = HTYPE_ETHERNET; + if (arpmod) { + /* Create an ARP cache entry for the client. */ + ha = bp->bp_chaddr; + len = bp->bp_hlen; + struct in_addr dst; - if (debug > 1) - report(LOG_INFO, "setarp %s - %s", - inet_ntoa(bp->bp_yiaddr), haddrtoa(ha, len)); - setarp(s, &bp->bp_yiaddr, haf, ha, len); + if (len > MAXHADDRLEN) + len = MAXHADDRLEN; + haf = (int) bp->bp_htype; + if (haf == 0) + haf = HTYPE_ETHERNET; + + if (debug > 1) + report(LOG_INFO, "setarp %s - %s", + inet_ntoa(dst), haddrtoa(ha, len)); + setarp(s, &dst, haf, ha, len); + } /* Send reply with same size packet as request used. */ if (sendto(s, pktbuf, pktlen, 0, From owner-svn-src-head@freebsd.org Tue May 21 21:26:15 2019 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 50BB2158FE51; Tue, 21 May 2019 21:26:15 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E98948191C; Tue, 21 May 2019 21:26:14 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C2D60B708; Tue, 21 May 2019 21:26:14 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4LLQEAP042067; Tue, 21 May 2019 21:26:14 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4LLQEhS042066; Tue, 21 May 2019 21:26:14 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201905212126.x4LLQEhS042066@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Tue, 21 May 2019 21:26:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348067 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 348067 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E98948191C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 21:26:15 -0000 Author: cem Date: Tue May 21 21:26:14 2019 New Revision: 348067 URL: https://svnweb.freebsd.org/changeset/base/348067 Log: mqueuefs: Do not allow manipulation of the pseudo-dirents "." and ".." "." and ".." names are not maintained in the mqueuefs dirent datastructure and cannot be opened as mqueues. Creating or removing them is invalid; return EINVAL instead of crashing. PR: 236836 Submitted by: Torbjørn Birch Moltu Discussed with: jilles (earlier version) Modified: head/sys/kern/uipc_mqueue.c Modified: head/sys/kern/uipc_mqueue.c ============================================================================== --- head/sys/kern/uipc_mqueue.c Tue May 21 21:22:43 2019 (r348066) +++ head/sys/kern/uipc_mqueue.c Tue May 21 21:26:14 2019 (r348067) @@ -2042,6 +2042,12 @@ kern_kmq_open(struct thread *td, const char *upath, in len = strlen(path); if (len < 2 || path[0] != '/' || strchr(path + 1, '/') != NULL) return (EINVAL); + /* + * "." and ".." are magic directories, populated on the fly, and cannot + * be opened as queues. + */ + if (strcmp(path, "/.") == 0 || strcmp(path, "/..") == 0) + return (EINVAL); AUDIT_ARG_UPATH1_CANON(path); error = falloc(td, &fp, &fd, O_CLOEXEC); @@ -2141,6 +2147,8 @@ sys_kmq_unlink(struct thread *td, struct kmq_unlink_ar len = strlen(path); if (len < 2 || path[0] != '/' || strchr(path + 1, '/') != NULL) + return (EINVAL); + if (strcmp(path, "/.") == 0 || strcmp(path, "/..") == 0) return (EINVAL); AUDIT_ARG_UPATH1_CANON(path); From owner-svn-src-head@freebsd.org Tue May 21 21:26:19 2019 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 9CFDB158FE87; Tue, 21 May 2019 21:26:19 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3F9228193A; Tue, 21 May 2019 21:26:19 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F22F8B70A; Tue, 21 May 2019 21:26:18 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4LLQIiM042132; Tue, 21 May 2019 21:26:18 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4LLQIDO042131; Tue, 21 May 2019 21:26:18 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201905212126.x4LLQIDO042131@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Tue, 21 May 2019 21:26:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348068 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 348068 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3F9228193A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 21:26:19 -0000 Author: allanjude Date: Tue May 21 21:26:18 2019 New Revision: 348068 URL: https://svnweb.freebsd.org/changeset/base/348068 Log: ZFS: Make deadman tunables no longer read-only This allows the user to enable, disable, and adjust the I/O deadman at runtime. This can be especially useful when a pool is backed by remote storage (such as iscsi, ggated, etc). PR: 221906 Submitted by: Fabian Keil Obtained from: ElectroBSD MFC after: 1 week Sponsored by: Klara Systems Event: Waterloo Hackathon 2019 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Tue May 21 21:26:14 2019 (r348067) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Tue May 21 21:26:18 2019 (r348068) @@ -363,13 +363,13 @@ SYSCTL_PROC(_vfs_zfs, OID_AUTO, debugflags, CTLTYPE_UINT | CTLFLAG_MPSAFE | CTLFLAG_RWTUN, 0, sizeof(int), sysctl_vfs_zfs_debug_flags, "IU", "Debug flags for ZFS testing."); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, deadman_synctime_ms, CTLFLAG_RDTUN, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, deadman_synctime_ms, CTLFLAG_RWTUN, &zfs_deadman_synctime_ms, 0, "Stalled ZFS I/O expiration time in milliseconds"); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, deadman_checktime_ms, CTLFLAG_RDTUN, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, deadman_checktime_ms, CTLFLAG_RwTUN, &zfs_deadman_checktime_ms, 0, "Period of checks for stalled ZFS I/O in milliseconds"); -SYSCTL_INT(_vfs_zfs, OID_AUTO, deadman_enabled, CTLFLAG_RDTUN, +SYSCTL_INT(_vfs_zfs, OID_AUTO, deadman_enabled, CTLFLAG_RWTUN, &zfs_deadman_enabled, 0, "Kernel panic on stalled ZFS I/O"); SYSCTL_INT(_vfs_zfs, OID_AUTO, spa_asize_inflation, CTLFLAG_RWTUN, &spa_asize_inflation, 0, "Worst case inflation factor for single sector writes"); From owner-svn-src-head@freebsd.org Tue May 21 21:27:15 2019 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 28F6A158FF6D; Tue, 21 May 2019 21:27:15 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BF28D81D3F; Tue, 21 May 2019 21:27:14 +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 99B00B70D; Tue, 21 May 2019 21:27:14 +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 x4LLREJ7042227; Tue, 21 May 2019 21:27:14 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4LLREI8042226; Tue, 21 May 2019 21:27:14 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201905212127.x4LLREI8042226@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 21 May 2019 21:27:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348069 - head/libexec/bootpd X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/libexec/bootpd X-SVN-Commit-Revision: 348069 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BF28D81D3F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 21:27:15 -0000 Author: emaste Date: Tue May 21 21:27:14 2019 New Revision: 348069 URL: https://svnweb.freebsd.org/changeset/base/348069 Log: bootpd: avoid the same error indication for different issues There were several (apparently) copy-pasted NEED validation macros, leading to the same error string for different issues. Change the YP and NTP tags so they are distinct. PR: 30863 Submitted by: Dan Lukes Reviewed by: markj MFC after: 1 week Event: Waterloo Hackathon 2019 Modified: head/libexec/bootpd/dovend.c Modified: head/libexec/bootpd/dovend.c ============================================================================== --- head/libexec/bootpd/dovend.c Tue May 21 21:26:18 2019 (r348068) +++ head/libexec/bootpd/dovend.c Tue May 21 21:27:14 2019 (r348069) @@ -147,7 +147,7 @@ dovend_rfc1497(hp, buf, len) if (insert_ip(TAG_NIS_SERVER, hp->nis_server, &vp, &bytesleft)) - NEED(8, "ds"); + NEED(8, "ys"); } if (hp->flags.nis_domain) { /* @@ -155,7 +155,7 @@ dovend_rfc1497(hp, buf, len) * TAG_NIS_DOMAIN and length. */ len = strlen(hp->nis_domain->string); - NEED((len + 2), "dn"); + NEED((len + 2), "yn"); *vp++ = TAG_NIS_DOMAIN; *vp++ = (byte) (len & 0xFF); bcopy(hp->nis_domain->string, vp, len); @@ -187,7 +187,7 @@ dovend_rfc1497(hp, buf, len) if (insert_ip(TAG_NTP_SERVER, hp->ntp_server, &vp, &bytesleft)) - NEED(8, "ts"); + NEED(8, "nt"); } /* * I wonder: If the hostname were "promoted" into the BOOTP From owner-svn-src-head@freebsd.org Tue May 21 21:35:38 2019 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 7E3611590770; Tue, 21 May 2019 21:35:38 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1B0F48265A; Tue, 21 May 2019 21:35:38 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EA104B8BF; Tue, 21 May 2019 21:35:37 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4LLZbxM047362; Tue, 21 May 2019 21:35:37 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4LLZbkB047361; Tue, 21 May 2019 21:35:37 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201905212135.x4LLZbkB047361@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Tue, 21 May 2019 21:35:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348070 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 348070 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1B0F48265A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 21:35:38 -0000 Author: cem Date: Tue May 21 21:35:37 2019 New Revision: 348070 URL: https://svnweb.freebsd.org/changeset/base/348070 Log: sys/lockmgr.h: Update #error to point at correct _lock.h After r347984, these macros live in sys/_lock.h. No functional change. Sponsored by: Dell EMC Isilon Modified: head/sys/sys/lockmgr.h Modified: head/sys/sys/lockmgr.h ============================================================================== --- head/sys/sys/lockmgr.h Tue May 21 21:27:14 2019 (r348069) +++ head/sys/sys/lockmgr.h Tue May 21 21:35:37 2019 (r348070) @@ -58,7 +58,7 @@ #ifdef _KERNEL #if !defined(LOCK_FILE) || !defined(LOCK_LINE) -#error "LOCK_FILE and LOCK_LINE not defined, include before" +#error "LOCK_FILE and LOCK_LINE not defined, include before" #endif struct thread; From owner-svn-src-head@freebsd.org Tue May 21 21:39:04 2019 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 17C1D15908F3; Tue, 21 May 2019 21:39:04 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AF94782865; Tue, 21 May 2019 21:39:03 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 86046B8D9; Tue, 21 May 2019 21:39:03 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4LLd3Sk047552; Tue, 21 May 2019 21:39:03 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4LLd3Dx047551; Tue, 21 May 2019 21:39:03 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201905212139.x4LLd3Dx047551@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Tue, 21 May 2019 21:39:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348071 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 348071 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AF94782865 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 21:39:04 -0000 Author: allanjude Date: Tue May 21 21:39:03 2019 New Revision: 348071 URL: https://svnweb.freebsd.org/changeset/base/348071 Log: Fix typo in r348068 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Tue May 21 21:35:37 2019 (r348070) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Tue May 21 21:39:03 2019 (r348071) @@ -366,7 +366,7 @@ SYSCTL_PROC(_vfs_zfs, OID_AUTO, debugflags, SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, deadman_synctime_ms, CTLFLAG_RWTUN, &zfs_deadman_synctime_ms, 0, "Stalled ZFS I/O expiration time in milliseconds"); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, deadman_checktime_ms, CTLFLAG_RwTUN, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, deadman_checktime_ms, CTLFLAG_RWTUN, &zfs_deadman_checktime_ms, 0, "Period of checks for stalled ZFS I/O in milliseconds"); SYSCTL_INT(_vfs_zfs, OID_AUTO, deadman_enabled, CTLFLAG_RWTUN, From owner-svn-src-head@freebsd.org Tue May 21 22:11:55 2019 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 457401591758; Tue, 21 May 2019 22:11:55 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D6DCD83C13; Tue, 21 May 2019 22:11:54 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B1760C1AC; Tue, 21 May 2019 22:11:54 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4LMBsc9064633; Tue, 21 May 2019 22:11:54 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4LMBrQS064628; Tue, 21 May 2019 22:11:53 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201905212211.x4LMBrQS064628@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Tue, 21 May 2019 22:11:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348072 - head/lib/libmd X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/lib/libmd X-SVN-Commit-Revision: 348072 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D6DCD83C13 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 22:11:55 -0000 Author: allanjude Date: Tue May 21 22:11:53 2019 New Revision: 348072 URL: https://svnweb.freebsd.org/changeset/base/348072 Log: Add missing errors section to md[2-5], ripemd160, sha*, and skein* manpages PR: 148987 Submitted by: Dan Lukes (original version) MFC after: 1 week Sponsored by: Klara Systems Event: Waterloo Hackathon 2019 Modified: head/lib/libmd/mdX.3 head/lib/libmd/ripemd.3 head/lib/libmd/sha.3 head/lib/libmd/sha256.3 head/lib/libmd/sha512.3 head/lib/libmd/skein.3 Modified: head/lib/libmd/mdX.3 ============================================================================== --- head/lib/libmd/mdX.3 Tue May 21 21:39:03 2019 (r348071) +++ head/lib/libmd/mdX.3 Tue May 21 22:11:53 2019 (r348072) @@ -8,7 +8,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 20, 2018 +.Dd May 21, 2019 .Dt MDX 3 .Os .Sh NAME @@ -144,6 +144,26 @@ after use. If the .Fa buf argument is non-null it must point to at least 33 characters of buffer space. +.Sh ERRORS +The +.Fn MDXEnd +function called with a null buf argument may fail and return NULL if: +.Bl -tag -width Er +.It Bq Er ENOMEM +Insufficient storage space is available. +.El +.Pp +The +.Fn MDXFile +and +.Fn MDXFileChunk +may return NULL when underlying +.Xr open 2 , +.Xr fstat 2 , +.Xr lseek 2 , +or +.Xr MDXEnd 2 +fail. .Sh SEE ALSO .Xr md4 3 , .Xr md5 3 , Modified: head/lib/libmd/ripemd.3 ============================================================================== --- head/lib/libmd/ripemd.3 Tue May 21 21:39:03 2019 (r348071) +++ head/lib/libmd/ripemd.3 Tue May 21 22:11:53 2019 (r348072) @@ -124,6 +124,26 @@ after use. If the .Fa buf argument is non-null it must point to at least 41 characters of buffer space. +.Sh ERRORS +The +.Fn RIPEMD160_End +function called with a null buf argument may fail and return NULL if: +.Bl -tag -width Er +.It Bq Er ENOMEM +Insufficient storage space is available. +.El +.Pp +The +.Fn RIPEMD160_File +and +.Fn RIPEMD160_FileChunk +may return NULL when underlying +.Xr open 2 , +.Xr fstat 2 , +.Xr lseek 2 , +or +.Xr RIPEMD160_End 2 +fail. .Sh SEE ALSO .Xr md4 3 , .Xr md5 3 , Modified: head/lib/libmd/sha.3 ============================================================================== --- head/lib/libmd/sha.3 Tue May 21 21:39:03 2019 (r348071) +++ head/lib/libmd/sha.3 Tue May 21 22:11:53 2019 (r348072) @@ -9,7 +9,7 @@ .\" From: Id: mdX.3,v 1.14 1999/02/11 20:31:49 wollman Exp .\" $FreeBSD$ .\" -.Dd July 20, 2018 +.Dd May 21, 2019 .Dt SHA 3 .Os .Sh NAME @@ -155,6 +155,26 @@ after use. If the .Fa buf argument is non-null it must point to at least 41 characters of buffer space. +.Sh ERRORS +The +.Fn SHA1_End +function called with a null buf argument may fail and return NULL if: +.Bl -tag -width Er +.It Bq Er ENOMEM +Insufficient storage space is available. +.El +.Pp +The +.Fn SHA1_File +and +.Fn SHA1_FileChunk +may return NULL when underlying +.Xr open 2 , +.Xr fstat 2 , +.Xr lseek 2 , +or +.Xr SHA1_End 2 +fail. .Sh SEE ALSO .Xr md4 3 , .Xr md5 3 , Modified: head/lib/libmd/sha256.3 ============================================================================== --- head/lib/libmd/sha256.3 Tue May 21 21:39:03 2019 (r348071) +++ head/lib/libmd/sha256.3 Tue May 21 22:11:53 2019 (r348072) @@ -146,6 +146,26 @@ argument is non-null it must point to at least 65 char .Pp SHA224 is identical SHA256, except it has slightly different initialization vectors, and is truncated to a shorter digest. +.Sh ERRORS +The +.Fn SHA256_End +function called with a null buf argument may fail and return NULL if: +.Bl -tag -width Er +.It Bq Er ENOMEM +Insufficient storage space is available. +.El +.Pp +The +.Fn SHA256_File +and +.Fn SHA256_FileChunk +may return NULL when underlying +.Xr open 2 , +.Xr fstat 2 , +.Xr lseek 2 , +or +.Xr SHA256_End 2 +fail. .Sh SEE ALSO .Xr md4 3 , .Xr md5 3 , Modified: head/lib/libmd/sha512.3 ============================================================================== --- head/lib/libmd/sha512.3 Tue May 21 21:39:03 2019 (r348071) +++ head/lib/libmd/sha512.3 Tue May 21 22:11:53 2019 (r348072) @@ -9,7 +9,7 @@ .\" From: Id: mdX.3,v 1.14 1999/02/11 20:31:49 wollman Exp .\" $FreeBSD$ .\" -.Dd July 20, 2018 +.Dd May 21, 2019 .Dt SHA512 3 .Os .Sh NAME @@ -190,6 +190,26 @@ which converts the return value to a 65-character (including the terminating '\e0') .Tn ASCII string which represents the 256 bits in hexadecimal. +.Sh ERRORS +The +.Fn SHA512_End +function called with a null buf argument may fail and return NULL if: +.Bl -tag -width Er +.It Bq Er ENOMEM +Insufficient storage space is available. +.El +.Pp +The +.Fn SHA512_File +and +.Fn SHA512_FileChunk +may return NULL when underlying +.Xr open 2 , +.Xr fstat 2 , +.Xr lseek 2 , +or +.Xr SHA512_End 2 +fail. .Sh SEE ALSO .Xr md4 3 , .Xr md5 3 , Modified: head/lib/libmd/skein.3 ============================================================================== --- head/lib/libmd/skein.3 Tue May 21 21:39:03 2019 (r348071) +++ head/lib/libmd/skein.3 Tue May 21 22:11:53 2019 (r348072) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 28, 2016 +.Dd May 21, 2019 .Dt SKEIN 3 .Os .Sh NAME @@ -188,6 +188,26 @@ functions are similar to the .Li SKEIN256_ functions except they produce a 512-bit, 65 character, or 1024-bit, 129 character, output. +.Sh ERRORS +The +.Fn SKEIN256_End +function called with a null buf argument may fail and return NULL if: +.Bl -tag -width Er +.It Bq Er ENOMEM +Insufficient storage space is available. +.El +.Pp +The +.Fn SKEIN256_File +and +.Fn SKEIN256_FileChunk +may return NULL when underlying +.Xr open 2 , +.Xr fstat 2 , +.Xr lseek 2 , +or +.Xr SKEIN256_End 2 +fail. .Sh SEE ALSO .Xr md4 3 , .Xr md5 3 , From owner-svn-src-head@freebsd.org Tue May 21 22:17:02 2019 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 065B415919A7; Tue, 21 May 2019 22:17:02 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9F7018401A; Tue, 21 May 2019 22:17:01 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7542FC229; Tue, 21 May 2019 22:17:01 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4LMH1sT068160; Tue, 21 May 2019 22:17:01 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4LMH1GG068159; Tue, 21 May 2019 22:17:01 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201905212217.x4LMH1GG068159@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Tue, 21 May 2019 22:17:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348073 - head/lib/libmd X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/lib/libmd X-SVN-Commit-Revision: 348073 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9F7018401A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.957,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 22:17:02 -0000 Author: allanjude Date: Tue May 21 22:17:00 2019 New Revision: 348073 URL: https://svnweb.freebsd.org/changeset/base/348073 Log: Add admonitions against using MD5 and SHA1 to the API man pages Modified: head/lib/libmd/mdX.3 head/lib/libmd/sha.3 Modified: head/lib/libmd/mdX.3 ============================================================================== --- head/lib/libmd/mdX.3 Tue May 21 22:11:53 2019 (r348072) +++ head/lib/libmd/mdX.3 Tue May 21 22:17:00 2019 (r348073) @@ -208,6 +208,8 @@ This code is derived directly from these implementatio .Pp Phk ristede runen. .Sh BUGS -No method is known to exist which finds two files having the same hash value, -nor to find a file with a specific hash value. -There is on the other hand no guarantee that such a method does not exist. +The +.Tn MD5 +algorithm has been proven to be vulnerable to practical collision +attacks and should not be relied upon to produce unique outputs, +.Em nor should they be used as part of a cryptographic signature scheme. Modified: head/lib/libmd/sha.3 ============================================================================== --- head/lib/libmd/sha.3 Tue May 21 22:11:53 2019 (r348072) +++ head/lib/libmd/sha.3 Tue May 21 22:17:00 2019 (r348073) @@ -191,9 +191,11 @@ published .Tn FIPS standards. .Sh BUGS -No method is known to exist which finds two files having the same hash value, -nor to find a file with a specific hash value. -There is on the other hand no guarantee that such a method does not exist. +The +.Tn SHA1 +algorithm has been proven to be vulnerable to practical collision +attacks and should not be relied upon to produce unique outputs, +.Em nor should they be used as part of a cryptographic signature scheme. .Pp The .Tn IA32 From owner-svn-src-head@freebsd.org Tue May 21 22:24:39 2019 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 9E4971591F20; Tue, 21 May 2019 22:24:39 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3E386846F2; Tue, 21 May 2019 22:24:39 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C71D4C3FE; Tue, 21 May 2019 22:24:38 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4LMOcdP073511; Tue, 21 May 2019 22:24:38 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4LMOci0073510; Tue, 21 May 2019 22:24:38 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201905212224.x4LMOci0073510@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Tue, 21 May 2019 22:24:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348074 - head/sbin/fsck_ffs X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/sbin/fsck_ffs X-SVN-Commit-Revision: 348074 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3E386846F2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 22:24:39 -0000 Author: mckusick Date: Tue May 21 22:24:38 2019 New Revision: 348074 URL: https://svnweb.freebsd.org/changeset/base/348074 Log: This revision began as a simple change to eliminate an uninitialized warning found by Coverity. However, upon closer inspection the implementation of fsck_ffs's fsck_readdir() and dircheck() functions is both nearly impossible to follow and fails to check / fix directories in several cases. So, this revision is an entire rewrite of these two functions to clarify what they are doing and also to get something that works properly. Referred by: cem Reviewed by: kib, David G Lawrence MFC after: 3 days CID 1401317: namlen may be used uninitialized Modified: head/sbin/fsck_ffs/dir.c Modified: head/sbin/fsck_ffs/dir.c ============================================================================== --- head/sbin/fsck_ffs/dir.c Tue May 21 22:17:00 2019 (r348073) +++ head/sbin/fsck_ffs/dir.c Tue May 21 22:24:38 2019 (r348074) @@ -61,7 +61,7 @@ static struct dirtemplate dirhead = { }; static int chgino(struct inodesc *); -static int dircheck(struct inodesc *, struct direct *); +static int dircheck(struct inodesc *, struct bufarea *, struct direct *); static int expanddir(union dinode *dp, char *name); static void freedir(ino_t ino, ino_t parent); static struct direct *fsck_readdir(struct inodesc *); @@ -139,78 +139,70 @@ dirscan(struct inodesc *idesc) } /* - * get next entry in a directory. + * Get and verify the next entry in a directory. + * We also verify that if there is another entry in the block that it is + * valid, so if it is not valid it can be subsumed into the current entry. */ static struct direct * fsck_readdir(struct inodesc *idesc) { struct direct *dp, *ndp; struct bufarea *bp; - long size, blksiz, fix, dploc; - int dc; + long size, blksiz, subsume_ndp; + subsume_ndp = 0; blksiz = idesc->id_numfrags * sblock.fs_fsize; + if (idesc->id_filesize <= 0 || idesc->id_loc >= blksiz) + return (NULL); bp = getdirblk(idesc->id_blkno, blksiz); - if (idesc->id_loc % DIRBLKSIZ == 0 && idesc->id_filesize > 0 && - idesc->id_loc < blksiz) { - dp = (struct direct *)(bp->b_un.b_buf + idesc->id_loc); - if ((dc = dircheck(idesc, dp)) > 0) { - if (dc == 2) { - /* - * dircheck() cleared unused directory space. - * Mark the buffer as dirty to write it out. - */ - dirty(bp); - } - goto dpok; - } - if (idesc->id_fix == IGNORE) - return (0); - fix = dofix(idesc, "DIRECTORY CORRUPTED"); - bp = getdirblk(idesc->id_blkno, blksiz); - dp = (struct direct *)(bp->b_un.b_buf + idesc->id_loc); - dp->d_reclen = DIRBLKSIZ; - dp->d_ino = 0; - dp->d_type = 0; - dp->d_namlen = 0; - dp->d_name[0] = '\0'; - if (fix) - dirty(bp); - idesc->id_loc += DIRBLKSIZ; - idesc->id_filesize -= DIRBLKSIZ; - return (dp); + dp = (struct direct *)(bp->b_un.b_buf + idesc->id_loc); + /* + * Only need to check current entry if it is the first in the + * the block, as later entries will have been checked in the + * previous call to this function. + */ + if (idesc->id_loc % DIRBLKSIZ != 0 || dircheck(idesc, bp, dp) != 0) { + /* + * Current entry is good, update to point at next. + */ + idesc->id_loc += dp->d_reclen; + idesc->id_filesize -= dp->d_reclen; + /* + * If at end of directory block, just return this entry. + */ + if (idesc->id_filesize <= 0 || idesc->id_loc >= blksiz || + idesc->id_loc % DIRBLKSIZ == 0) + return (dp); + /* + * If the next entry good, return this entry. + */ + ndp = (struct direct *)(bp->b_un.b_buf + idesc->id_loc); + if (dircheck(idesc, bp, ndp) != 0) + return (dp); + /* + * The next entry is bad, so subsume it and the remainder + * of this directory block into this entry. + */ + subsume_ndp = 1; } -dpok: - if (idesc->id_filesize <= 0 || idesc->id_loc >= blksiz) - return NULL; - dploc = idesc->id_loc; - dp = (struct direct *)(bp->b_un.b_buf + dploc); - idesc->id_loc += dp->d_reclen; - idesc->id_filesize -= dp->d_reclen; - if ((idesc->id_loc % DIRBLKSIZ) == 0) - return (dp); - ndp = (struct direct *)(bp->b_un.b_buf + idesc->id_loc); - if (idesc->id_loc < blksiz && idesc->id_filesize > 0) { - if ((dc = dircheck(idesc, ndp)) == 0) { - size = DIRBLKSIZ - (idesc->id_loc % DIRBLKSIZ); - idesc->id_loc += size; - idesc->id_filesize -= size; - if (idesc->id_fix == IGNORE) - return (0); - fix = dofix(idesc, "DIRECTORY CORRUPTED"); - bp = getdirblk(idesc->id_blkno, blksiz); - dp = (struct direct *)(bp->b_un.b_buf + dploc); - dp->d_reclen += size; - if (fix) - dirty(bp); - } else if (dc == 2) { - /* - * dircheck() cleared unused directory space. - * Mark the buffer as dirty to write it out. - */ - dirty(bp); - } + /* + * Current or next entry is bad. Zap current entry or + * subsume next entry into current entry as appropriate. + */ + size = DIRBLKSIZ - (idesc->id_loc % DIRBLKSIZ); + idesc->id_loc += size; + idesc->id_filesize -= size; + if (idesc->id_fix == IGNORE) + return (NULL); + if (subsume_ndp) { + memset(ndp, 0, size); + dp->d_reclen += size; + } else { + memset(dp, 0, size); + dp->d_reclen = size; } + if (dofix(idesc, "DIRECTORY CORRUPTED")) + dirty(bp); return (dp); } @@ -219,65 +211,80 @@ dpok: * This is a superset of the checks made in the kernel. * Also optionally clears padding and unused directory space. * - * Returns 0 if the entry is bad, 1 if the entry is good and no changes - * were made, and 2 if the entry is good but modified to clear out padding - * and unused space and needs to be written back to disk. + * Returns 0 if the entry is bad, 1 if the entry is good. */ static int -dircheck(struct inodesc *idesc, struct direct *dp) +dircheck(struct inodesc *idesc, struct bufarea *bp, struct direct *dp) { size_t size; char *cp; - u_char type; u_int8_t namlen; int spaceleft, modified, unused; - modified = 0; spaceleft = DIRBLKSIZ - (idesc->id_loc % DIRBLKSIZ); + size = DIRSIZ(0, dp); if (dp->d_reclen == 0 || dp->d_reclen > spaceleft || + dp->d_reclen < size || + idesc->id_filesize < size || (dp->d_reclen & (DIR_ROUNDUP - 1)) != 0) goto bad; + modified = 0; if (dp->d_ino == 0) { + if (!zflag || fswritefd < 0) + return (1); /* - * Special case of an unused directory entry. Normally - * the kernel would coalesce unused space with the previous - * entry by extending its d_reclen, but there are situations - * (e.g. fsck) where that doesn't occur. - * If we're clearing out directory cruft (-z flag), then make - * sure this entry gets fully cleared as well. + * Special case of an unused directory entry. Normally only + * occurs at the beginning of a directory block when the block + * contains no entries. Other than the first entry in a + * directory block, the kernel coalesces unused space with + * the previous entry by extending its d_reclen. However, + * when cleaning up a directory, fsck may set d_ino to zero + * in the middle of a directory block. If we're clearing out + * directory cruft (-z flag), then make sure that all directory + * space in entries with d_ino == 0 gets fully cleared. */ - if (zflag && fswritefd >= 0) { - if (dp->d_type != 0) { - dp->d_type = 0; + if (dp->d_type != 0) { + dp->d_type = 0; + modified = 1; + } + if (dp->d_namlen != 0) { + dp->d_namlen = 0; + modified = 1; + } + unused = dp->d_reclen - __offsetof(struct direct, d_name); + for (cp = dp->d_name; unused > 0; unused--, cp++) { + if (*cp != '\0') { + *cp = '\0'; modified = 1; } - if (dp->d_namlen != 0) { - dp->d_namlen = 0; - modified = 1; - } - if (dp->d_name[0] != '\0') { - dp->d_name[0] = '\0'; - modified = 1; - } } - goto good; + if (modified) + dirty(bp); + return (1); } - size = DIRSIZ(0, dp); + /* + * The d_type field should not be tested here. A bad type is an error + * in the entry itself but is not a corruption of the directory + * structure itself. So blowing away all the remaining entries in the + * directory block is inappropriate. Rather the type error should be + * checked in pass1 and fixed there. + * + * The name validation should also be done in pass1 although the + * check to see if the name is longer than fits in the space + * allocated for it (i.e., the *cp != '\0' fails after exiting the + * loop below) then it really is a structural error that requires + * the stronger action taken here. + */ namlen = dp->d_namlen; - type = dp->d_type; - if (dp->d_reclen < size || - idesc->id_filesize < size || - namlen == 0 || - type > 15) + if (namlen == 0 || dp->d_type > 15) goto bad; - for (cp = dp->d_name, size = 0; size < namlen; size++) - if (*cp == '\0' || (*cp++ == '/')) + for (cp = dp->d_name, size = 0; size < namlen; size++) { + if (*cp == '\0' || *cp++ == '/') goto bad; + } if (*cp != '\0') goto bad; - -good: if (zflag && fswritefd >= 0) { /* * Clear unused directory entry space, including the d_name @@ -300,11 +307,9 @@ good: } } - if (modified) { - return 2; - } + if (modified) + dirty(bp); } - return (1); bad: From owner-svn-src-head@freebsd.org Tue May 21 22:55:02 2019 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 4ED631592C0E; Tue, 21 May 2019 22:55:02 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8BA41858FF; Tue, 21 May 2019 22:55:01 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x4LMswuP081367; Tue, 21 May 2019 15:54:58 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x4LMswao081366; Tue, 21 May 2019 15:54:58 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201905212254.x4LMswao081366@gndrsh.dnsmgr.net> Subject: Re: svn commit: r348066 - in head/libexec/bootpd: . bootpgw In-Reply-To: <201905212122.x4LLMhup041717@repo.freebsd.org> To: Mark Johnston Date: Tue, 21 May 2019 15:54:58 -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-Rspamd-Queue-Id: 8BA41858FF X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.984,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 22:55:02 -0000 > Author: markj > Date: Tue May 21 21:22:43 2019 > New Revision: 348066 > URL: https://svnweb.freebsd.org/changeset/base/348066 > > Log: > bootpd: Add an option to skip modifications to the ARP table. > > PR: 30854 > Submitted by: Dan Lukes > Reviewed by: imp (previous version) > MFC after: 1 week > Event: Waterloo Hackathon 2019 > Differential Revision: https://reviews.freebsd.org/D2581 > > Modified: > head/libexec/bootpd/bootpd.8 > head/libexec/bootpd/bootpd.c > head/libexec/bootpd/bootpgw/bootpgw.c > > Modified: head/libexec/bootpd/bootpd.8 > ============================================================================== > --- head/libexec/bootpd/bootpd.8 Tue May 21 21:14:22 2019 (r348065) > +++ head/libexec/bootpd/bootpd.8 Tue May 21 21:22:43 2019 (r348066) > @@ -2,7 +2,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd February 10, 2004 > +.Dd May 21, 2019 > .Dt BOOTPD 8 > .Os > .Sh NAME > @@ -103,6 +103,8 @@ option may be used to force standalone or inetd mode r > .Sh OPTIONS > The following options are available: > .Bl -tag -width indent > +.It Fl a > +Skip ARP table modifications. > .It Fl t Ar timeout > Specify the > .Ar timeout > > Modified: head/libexec/bootpd/bootpd.c > ============================================================================== > --- head/libexec/bootpd/bootpd.c Tue May 21 21:14:22 2019 (r348065) > +++ head/libexec/bootpd/bootpd.c Tue May 21 21:22:43 2019 (r348066) > @@ -143,6 +143,7 @@ struct timeval actualtimeout = > 15 * 60L, /* tv_sec */ > 0 /* tv_usec */ > }; > +int arpmod = TRUE; /* modify the ARP table */ > > /* > * General > @@ -266,6 +267,9 @@ main(argc, argv) > break; > switch (argv[0][1]) { > > + case 'a': /* don't modify the ARP table */ > + arpmod = FALSE; > + break; > case 'c': /* chdir_path */ > if (argv[0][2]) { > stmp = &(argv[0][2]); > @@ -583,8 +587,9 @@ PRIVATE void > usage() > { > fprintf(stderr, > - "usage: bootpd [-i | -s] [-c chdir-path] [-d level] [-h hostname] [-t timeout]\n"); > + "usage: bootpd [-a] [-i | -s] [-c chdir-path] [-d level] [-h hostname] [-t timeout]\n"); > fprintf(stderr, " [bootptab [dumpfile]]\n"); > + fprintf(stderr, "\t -a\tdon't modify ARP table\n"); > fprintf(stderr, "\t -c n\tset current directory\n"); > fprintf(stderr, "\t -d n\tset debug level\n"); > fprintf(stderr, "\t -h n\tset the hostname to listen on\n"); > @@ -1067,10 +1072,12 @@ sendreply(forward, dst_override) > if (haf == 0) > haf = HTYPE_ETHERNET; > > - if (debug > 1) > - report(LOG_INFO, "setarp %s - %s", > - inet_ntoa(dst), haddrtoa(ha, len)); > - setarp(s, &dst, haf, ha, len); > + if (arpmod) { > + if (debug > 1) > + report(LOG_INFO, "setarp %s - %s", > + inet_ntoa(dst), haddrtoa(ha, len)); > + setarp(s, &dst, haf, ha, len); > + } > } > > if ((forward == 0) && > > Modified: head/libexec/bootpd/bootpgw/bootpgw.c > ============================================================================== > --- head/libexec/bootpd/bootpgw/bootpgw.c Tue May 21 21:14:22 2019 (r348065) > +++ head/libexec/bootpd/bootpgw/bootpgw.c Tue May 21 21:22:43 2019 (r348066) > @@ -124,6 +124,7 @@ struct timeval actualtimeout = > u_char maxhops = 4; /* Number of hops allowed for requests. */ > u_int minwait = 3; /* Number of seconds client must wait before > its bootrequest packets are forwarded. */ > +int arpmod = TRUE; /* modify the ARP table */ > > /* > * General > @@ -238,6 +239,9 @@ main(argc, argv) > break; > switch (argv[0][1]) { > > + case 'a': /* don't modify the ARP table */ > + arpmod = FALSE; > + break; > case 'd': /* debug level */ > if (argv[0][2]) { > stmp = &(argv[0][2]); > @@ -496,7 +500,8 @@ static void > usage() > { > fprintf(stderr, > - "usage: bootpgw [-d level] [-i] [-s] [-t timeout] server\n"); > + "usage: \nbootpgw [-a] [-d level] [-h count] [-i] [-s] [-t timeout] [-w time] server\n"); ^^^^ this looks very odd and is a very long line. Output would be: usage:bb bootpgw [-a] [-d level] [-h count] [-i] [-s] [-t timeout] [-w time] server I believe what you want here is: /*234567890123456789012345678901234567890123456789012345678901234567890123456789*/ /*234567890123456789012345678901234567890123456789012345678901234567890123456789*/ "usage:\t bootpgw [-a] [-d level] [-h count] [-i] [-s]" "[-t timeout] [-w time]\n" "\t server\n"); (Ignore my /*234 comments, that is just how I figure out how to fit these types of things.) > + fprintf(stderr, "\t -a\tdon't modify ARP table\n"); > fprintf(stderr, "\t -d n\tset debug level\n"); > fprintf(stderr, "\t -h n\tset max hop count\n"); > fprintf(stderr, "\t -i\tforce inetd mode (run as child of inetd)\n"); The whole usage thing uses a space after tab, which also seems odd to me. I am use to using usage done using pure spaces, no tabs anyplace, usage: followed by 1 space. > @@ -641,19 +646,23 @@ handle_reply() > send_addr.sin_addr = bp->bp_yiaddr; > send_addr.sin_port = htons(bootpc_port); > > - /* Create an ARP cache entry for the client. */ > - ha = bp->bp_chaddr; > - len = bp->bp_hlen; > - if (len > MAXHADDRLEN) > - len = MAXHADDRLEN; > - haf = (int) bp->bp_htype; > - if (haf == 0) > - haf = HTYPE_ETHERNET; > + if (arpmod) { > + /* Create an ARP cache entry for the client. */ > + ha = bp->bp_chaddr; > + len = bp->bp_hlen; > + struct in_addr dst; > > - if (debug > 1) > - report(LOG_INFO, "setarp %s - %s", > - inet_ntoa(bp->bp_yiaddr), haddrtoa(ha, len)); > - setarp(s, &bp->bp_yiaddr, haf, ha, len); > + if (len > MAXHADDRLEN) > + len = MAXHADDRLEN; > + haf = (int) bp->bp_htype; > + if (haf == 0) > + haf = HTYPE_ETHERNET; > + > + if (debug > 1) > + report(LOG_INFO, "setarp %s - %s", > + inet_ntoa(dst), haddrtoa(ha, len)); > + setarp(s, &dst, haf, ha, len); > + } > > /* Send reply with same size packet as request used. */ > if (sendto(s, pktbuf, pktlen, 0, > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Tue May 21 22:56:23 2019 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 636901592CF7; Tue, 21 May 2019 22:56:23 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 04D8085A6C; Tue, 21 May 2019 22:56:23 +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 D1738C9B3; Tue, 21 May 2019 22:56:22 +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 x4LMuMqr089055; Tue, 21 May 2019 22:56:22 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4LMuMbB089052; Tue, 21 May 2019 22:56:22 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201905212256.x4LMuMbB089052@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 21 May 2019 22:56:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348075 - in head/sys: amd64/amd64 i386/i386 x86/x86 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: amd64/amd64 i386/i386 x86/x86 X-SVN-Commit-Revision: 348075 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 04D8085A6C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 22:56:23 -0000 Author: kib Date: Tue May 21 22:56:21 2019 New Revision: 348075 URL: https://svnweb.freebsd.org/changeset/base/348075 Log: Do not call hw_mds_recalculate() from initializecpu(). If MDS mitigation is enabled by the tunable but MDS microcode is not early-loaded, software mitigation is selected. This causes initializecpu() to try to allocate memory which makes boot process very unhappy. Create SYSINIT that runs sufficiently late to succeed. Reported by: naddy PR: 237968 Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/amd64/amd64/initcpu.c head/sys/i386/i386/initcpu.c head/sys/x86/x86/cpu_machdep.c Modified: head/sys/amd64/amd64/initcpu.c ============================================================================== --- head/sys/amd64/amd64/initcpu.c Tue May 21 22:24:38 2019 (r348074) +++ head/sys/amd64/amd64/initcpu.c Tue May 21 22:56:21 2019 (r348075) @@ -257,7 +257,6 @@ initializecpu(void) hw_ibrs_recalculate(); hw_ssb_recalculate(false); amd64_syscall_ret_flush_l1d_recalc(); - hw_mds_recalculate(); switch (cpu_vendor_id) { case CPU_VENDOR_AMD: init_amd(); Modified: head/sys/i386/i386/initcpu.c ============================================================================== --- head/sys/i386/i386/initcpu.c Tue May 21 22:24:38 2019 (r348074) +++ head/sys/i386/i386/initcpu.c Tue May 21 22:56:21 2019 (r348075) @@ -749,7 +749,6 @@ initializecpu(void) msr = rdmsr(MSR_EFER) | EFER_NXE; wrmsr(MSR_EFER, msr); } - hw_mds_recalculate(); if ((amd_feature & AMDID_RDTSCP) != 0 || (cpu_stdext_feature2 & CPUID_STDEXT2_RDPID) != 0) wrmsr(MSR_TSC_AUX, PCPU_GET(cpuid)); Modified: head/sys/x86/x86/cpu_machdep.c ============================================================================== --- head/sys/x86/x86/cpu_machdep.c Tue May 21 22:24:38 2019 (r348074) +++ head/sys/x86/x86/cpu_machdep.c Tue May 21 22:56:21 2019 (r348075) @@ -1106,6 +1106,14 @@ hw_mds_recalculate(void) } } +static void +hw_mds_recalculate_boot(void *arg __unused) +{ + + hw_mds_recalculate(); +} +SYSINIT(mds_recalc, SI_SUB_SMP, SI_ORDER_ANY, hw_mds_recalculate_boot, NULL); + static int sysctl_mds_disable_handler(SYSCTL_HANDLER_ARGS) { From owner-svn-src-head@freebsd.org Tue May 21 23:03:39 2019 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 AD54B1593052; Tue, 21 May 2019 23:03:39 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B1DF85F2A; Tue, 21 May 2019 23:03:38 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x4LN3bX7081423; Tue, 21 May 2019 16:03:37 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x4LN3bMd081422; Tue, 21 May 2019 16:03:37 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201905212303.x4LN3bMd081422@gndrsh.dnsmgr.net> Subject: Re: svn commit: r348073 - head/lib/libmd In-Reply-To: <201905212217.x4LMH1GG068159@repo.freebsd.org> To: Allan Jude Date: Tue, 21 May 2019 16:03:37 -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-Rspamd-Queue-Id: 1B1DF85F2A X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 23:03:39 -0000 > Author: allanjude > Date: Tue May 21 22:17:00 2019 > New Revision: 348073 > URL: https://svnweb.freebsd.org/changeset/base/348073 > > Log: > Add admonitions against using MD5 and SHA1 to the API man pages > > Modified: > head/lib/libmd/mdX.3 > head/lib/libmd/sha.3 > > Modified: head/lib/libmd/mdX.3 > ============================================================================== > --- head/lib/libmd/mdX.3 Tue May 21 22:11:53 2019 (r348072) > +++ head/lib/libmd/mdX.3 Tue May 21 22:17:00 2019 (r348073) > @@ -208,6 +208,8 @@ This code is derived directly from these implementatio > .Pp > Phk ristede runen. > .Sh BUGS > -No method is known to exist which finds two files having the same hash value, > -nor to find a file with a specific hash value. > -There is on the other hand no guarantee that such a method does not exist. > +The > +.Tn MD5 There needs to be a discussion about .Tn, some people are ripping them out of man pages, others are adding them. mandoc is a semantic mark up language, .Tn gives the following word the semantic of being a Tradename. Yes, I know, mandoc ignroes them BUTT other tools do not, mandoc is not the end all in what can process our man pages, groff/troff should still be able to produce photo typesetter output and the .Tn's look nice when you do that. I would like to see that we stop removing them and infact, as this man page does, properly recognize trademarks/names in our man pages "as is often required by law." Now, one final nit, I can neither verify nor deny that "MD5" is a tradename. > +algorithm has been proven to be vulnerable to practical collision > +attacks and should not be relied upon to produce unique outputs, > +.Em nor should they be used as part of a cryptographic signature scheme. > > Modified: head/lib/libmd/sha.3 > ============================================================================== > --- head/lib/libmd/sha.3 Tue May 21 22:11:53 2019 (r348072) > +++ head/lib/libmd/sha.3 Tue May 21 22:17:00 2019 (r348073) > @@ -191,9 +191,11 @@ published > .Tn FIPS > standards. > .Sh BUGS > -No method is known to exist which finds two files having the same hash value, > -nor to find a file with a specific hash value. > -There is on the other hand no guarantee that such a method does not exist. > +The > +.Tn SHA1 > +algorithm has been proven to be vulnerable to practical collision > +attacks and should not be relied upon to produce unique outputs, > +.Em nor should they be used as part of a cryptographic signature scheme. > .Pp > The > .Tn IA32 > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Tue May 21 23:15:51 2019 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 EA0F01593358; Tue, 21 May 2019 23:15:50 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E6DCA8644E; Tue, 21 May 2019 23:15:49 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id x4LNFgti029415 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 22 May 2019 02:15:45 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua x4LNFgti029415 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id x4LNFgDg029414; Wed, 22 May 2019 02:15:42 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 22 May 2019 02:15:42 +0300 From: Konstantin Belousov To: Conrad Meyer Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r348070 - head/sys/sys Message-ID: <20190521231542.GX2748@kib.kiev.ua> References: <201905212135.x4LLZbkB047361@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201905212135.x4LLZbkB047361@repo.freebsd.org> User-Agent: Mutt/1.11.4 (2019-03-13) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 23:15:51 -0000 On Tue, May 21, 2019 at 09:35:37PM +0000, Conrad Meyer wrote: > Author: cem > Date: Tue May 21 21:35:37 2019 > New Revision: 348070 > URL: https://svnweb.freebsd.org/changeset/base/348070 > > Log: > sys/lockmgr.h: Update #error to point at correct _lock.h > > After r347984, these macros live in sys/_lock.h. No functional change. > > Sponsored by: Dell EMC Isilon > > Modified: > head/sys/sys/lockmgr.h > > Modified: head/sys/sys/lockmgr.h > ============================================================================== > --- head/sys/sys/lockmgr.h Tue May 21 21:27:14 2019 (r348069) > +++ head/sys/sys/lockmgr.h Tue May 21 21:35:37 2019 (r348070) > @@ -58,7 +58,7 @@ > #ifdef _KERNEL > > #if !defined(LOCK_FILE) || !defined(LOCK_LINE) > -#error "LOCK_FILE and LOCK_LINE not defined, include before" > +#error "LOCK_FILE and LOCK_LINE not defined, include before" > #endif > > struct thread; I do not think that this change is good. sys/_lock.h is very special and should be only used in specific circumstances. A consumer of the lockmgr.h interface which needs to use _lock.h instead of lock.h already knows that (and in fact I doubt that lockmgr.h can work with only _lock.h included). From owner-svn-src-head@freebsd.org Wed May 22 00:21:43 2019 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 B337A159554B; Wed, 22 May 2019 00:21:43 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 550F488D70; Wed, 22 May 2019 00:21:43 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 45366D9AA; Wed, 22 May 2019 00:21:43 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4M0Lh4F034060; Wed, 22 May 2019 00:21:43 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4M0LhG4034059; Wed, 22 May 2019 00:21:43 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201905220021.x4M0LhG4034059@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Wed, 22 May 2019 00:21:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348076 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 348076 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 550F488D70 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 00:21:43 -0000 Author: cem Date: Wed May 22 00:21:42 2019 New Revision: 348076 URL: https://svnweb.freebsd.org/changeset/base/348076 Log: Revert r348070 Konstantin points out that lockmgr probably requires the whole lock.h anyway. Requested by: kib Modified: head/sys/sys/lockmgr.h Modified: head/sys/sys/lockmgr.h ============================================================================== --- head/sys/sys/lockmgr.h Tue May 21 22:56:21 2019 (r348075) +++ head/sys/sys/lockmgr.h Wed May 22 00:21:42 2019 (r348076) @@ -58,7 +58,7 @@ #ifdef _KERNEL #if !defined(LOCK_FILE) || !defined(LOCK_LINE) -#error "LOCK_FILE and LOCK_LINE not defined, include before" +#error "LOCK_FILE and LOCK_LINE not defined, include before" #endif struct thread; From owner-svn-src-head@freebsd.org Wed May 22 01:11:22 2019 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 B101E15964D4; Wed, 22 May 2019 01:11:22 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 54E408A20C; Wed, 22 May 2019 01:11:22 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2F322E101; Wed, 22 May 2019 01:11:22 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4M1BMvI060636; Wed, 22 May 2019 01:11:22 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4M1BMLj060635; Wed, 22 May 2019 01:11:22 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201905220111.x4M1BMLj060635@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 22 May 2019 01:11:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348077 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 348077 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 54E408A20C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 01:11:22 -0000 Author: asomers Date: Wed May 22 01:11:21 2019 New Revision: 348077 URL: https://svnweb.freebsd.org/changeset/base/348077 Log: Link fhlinkat(2) man page Reviewed by: kib MFC after: 3 days MFC-With: r341689 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20339 Modified: head/lib/libc/sys/Makefile.inc Modified: head/lib/libc/sys/Makefile.inc ============================================================================== --- head/lib/libc/sys/Makefile.inc Wed May 22 00:21:42 2019 (r348076) +++ head/lib/libc/sys/Makefile.inc Wed May 22 01:11:21 2019 (r348077) @@ -394,6 +394,7 @@ MLINKS+=extattr_get_file.2 extattr.2 \ MLINKS+=ffclock.2 ffclock_getcounter.2 \ ffclock.2 ffclock_getestimate.2 \ ffclock.2 ffclock_setestimate.2 +MLINKS+=fhlink.2 fhlinkat.2 MLINKS+=fhopen.2 fhstat.2 fhopen.2 fhstatfs.2 MLINKS+=fsync.2 fdatasync.2 MLINKS+=getdirentries.2 getdents.2 From owner-svn-src-head@freebsd.org Wed May 22 01:22:34 2019 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 05ED61596A3A; Wed, 22 May 2019 01:22:34 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9AAEC8A80E; Wed, 22 May 2019 01:22:33 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 75B32E414; Wed, 22 May 2019 01:22:33 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4M1MXC2066601; Wed, 22 May 2019 01:22:33 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4M1MXtx066600; Wed, 22 May 2019 01:22:33 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201905220122.x4M1MXtx066600@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Wed, 22 May 2019 01:22:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348078 - head/usr.sbin/pmc X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/usr.sbin/pmc X-SVN-Commit-Revision: 348078 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9AAEC8A80E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 01:22:34 -0000 Author: cem Date: Wed May 22 01:22:33 2019 New Revision: 348078 URL: https://svnweb.freebsd.org/changeset/base/348078 Log: pmc: Fix stack std::string lifetime It's invalid to reference a C++ string's c_str() buffer after the object goes out of scope. Adjust the scope of the string to match the use in write(2) to fix the misuse. CID: 1393383 Reported by: Coverity Modified: head/usr.sbin/pmc/cmd_pmc_filter.cc Modified: head/usr.sbin/pmc/cmd_pmc_filter.cc ============================================================================== --- head/usr.sbin/pmc/cmd_pmc_filter.cc Wed May 22 01:11:21 2019 (r348077) +++ head/usr.sbin/pmc/cmd_pmc_filter.cc Wed May 22 01:22:33 2019 (r348078) @@ -180,11 +180,12 @@ pmc_find_name(idmap & map, uint32_t id, char *list[LIS static void pmc_log_event(int fd, struct pmclog_ev *ev, bool json) { + string ret; int len; const void *buf; if (json) { - string ret = event_to_json(ev); + ret = event_to_json(ev); buf = ret.c_str(); len = ret.size(); } else { From owner-svn-src-head@freebsd.org Wed May 22 02:43:18 2019 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 2E256159801E; Wed, 22 May 2019 02:43:18 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BF0A88C92F; Wed, 22 May 2019 02:43:17 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 94A81F1B9; Wed, 22 May 2019 02:43:17 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4M2hHMw009063; Wed, 22 May 2019 02:43:17 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4M2hH0U009062; Wed, 22 May 2019 02:43:17 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201905220243.x4M2hH0U009062@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 22 May 2019 02:43:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348079 - head/sys/powerpc/booke X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/booke X-SVN-Commit-Revision: 348079 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BF0A88C92F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 02:43:18 -0000 Author: jhibbits Date: Wed May 22 02:43:17 2019 New Revision: 348079 URL: https://svnweb.freebsd.org/changeset/base/348079 Log: powerpc/booke: Use wrtee instead of msr to restore EE bit The MSR[EE] bit does not require synchronization when changing. This is a trivial micro-optimization, removing the trailing isync from mtmsr(). MFC after: 1 week Modified: head/sys/powerpc/booke/pmap.c Modified: head/sys/powerpc/booke/pmap.c ============================================================================== --- head/sys/powerpc/booke/pmap.c Wed May 22 01:22:33 2019 (r348078) +++ head/sys/powerpc/booke/pmap.c Wed May 22 02:43:17 2019 (r348079) @@ -3916,7 +3916,7 @@ tlb1_read_entry(tlb_entry_t *entry, unsigned int slot) entry->mas7 = 0; break; } - mtmsr(msr); + __asm __volatile("wrtee %0" :: "r"(msr)); entry->virt = entry->mas2 & MAS2_EPN_MASK; entry->phys = ((vm_paddr_t)(entry->mas7 & MAS7_RPN) << 32) | @@ -3991,7 +3991,7 @@ tlb1_write_entry(tlb_entry_t *e, unsigned int idx) msr = mfmsr(); __asm __volatile("wrteei 0"); tlb1_write_entry_int(&args); - mtmsr(msr); + __asm __volatile("wrtee %0" :: "r"(msr)); } } @@ -4390,7 +4390,7 @@ tid_flush(tlbtid_t tid) mtspr(SPR_MAS6, tid << MAS6_SPID0_SHIFT); /* tlbilxpid */ __asm __volatile("isync; .long 0x7c000024; isync; msync"); - mtmsr(msr); + __asm __volatile("wrtee %0" :: "r"(msr)); return; } @@ -4415,7 +4415,7 @@ tid_flush(tlbtid_t tid) mtspr(SPR_MAS1, mas1); __asm __volatile("isync; tlbwe; isync; msync"); } - mtmsr(msr); + __asm __volatile("wrtee %0" :: "r"(msr)); } #ifdef DDB From owner-svn-src-head@freebsd.org Wed May 22 03:10:24 2019 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 2A42F1598C8E; Wed, 22 May 2019 03:10:24 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BB5748D94C; Wed, 22 May 2019 03:10:23 +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 91E28F57F; Wed, 22 May 2019 03:10:23 +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 x4M3ANK8020664; Wed, 22 May 2019 03:10:23 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4M3AN9d020663; Wed, 22 May 2019 03:10:23 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201905220310.x4M3AN9d020663@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 22 May 2019 03:10:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348080 - head/cddl/usr.sbin/dtrace/tests/tools X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/cddl/usr.sbin/dtrace/tests/tools X-SVN-Commit-Revision: 348080 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BB5748D94C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 03:10:24 -0000 Author: markj Date: Wed May 22 03:10:23 2019 New Revision: 348080 URL: https://svnweb.freebsd.org/changeset/base/348080 Log: Make it possible to generate makefiles for arch-dependent DTrace tests. MFC after: 1 week Event: Waterloo Hackathon 2019 Modified: head/cddl/usr.sbin/dtrace/tests/tools/genmakefiles.sh Modified: head/cddl/usr.sbin/dtrace/tests/tools/genmakefiles.sh ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/tools/genmakefiles.sh Wed May 22 02:43:17 2019 (r348079) +++ head/cddl/usr.sbin/dtrace/tests/tools/genmakefiles.sh Wed May 22 03:10:23 2019 (r348080) @@ -24,9 +24,10 @@ fmtflist() genmakefile() { - local basedir=$1 + local class=$1 + local group=$2 - local tdir=${CONTRIB_TESTDIR}/${basedir} + local tdir=${CONTRIB_TESTDIR}/${class}/${group} local tfiles=$(find $tdir -type f -a \ \( -name \*.d -o -name \*.ksh -o -name \*.out \) | sort | fmtflist) local tcfiles=$(find $tdir -type f -a -name \*.c | sort | fmtflist) @@ -34,7 +35,7 @@ genmakefile() # One-off variable definitions. local special - case "$basedir" in + case "$group" in proc) special=" LIBADD.tst.sigwait.exe+= rt @@ -80,7 +81,7 @@ $special .include "../../dtrace.test.mk" __EOF__ - mv -f $makefile ${ORIGINDIR}/../common/${basedir}/Makefile + mv -f $makefile ${ORIGINDIR}/../${class}/${group}/Makefile } set -e @@ -93,9 +94,10 @@ export LC_ALL=C readonly ORIGINDIR=$(realpath $(dirname $0)) readonly TOPDIR=$(realpath ${ORIGINDIR}/../../../../..) -readonly CONTRIB_TESTDIR=${TOPDIR}/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common +readonly CONTRIB_TESTDIR=${TOPDIR}/cddl/contrib/opensolaris/cmd/dtrace/test/tst -# Generate a Makefile for each test group under common/. -for dir in $(find ${CONTRIB_TESTDIR} -mindepth 1 -maxdepth 1 -type d); do - genmakefile $(basename $dir) +for class in common i386; do + for group in $(find ${CONTRIB_TESTDIR}/$class -mindepth 1 -maxdepth 1 -type d); do + genmakefile $class $(basename $group) + done done From owner-svn-src-head@freebsd.org Wed May 22 03:42:05 2019 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 3B9D8159A5FA; Wed, 22 May 2019 03:42:05 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D50A88E92D; Wed, 22 May 2019 03:42: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 96552FB22; Wed, 22 May 2019 03:42: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 x4M3g4p1040996; Wed, 22 May 2019 03:42:04 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4M3g3Wq040989; Wed, 22 May 2019 03:42:03 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201905220342.x4M3g3Wq040989@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 22 May 2019 03:42:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348081 - in head: cddl/usr.sbin/dtrace/tests cddl/usr.sbin/dtrace/tests/i386 cddl/usr.sbin/dtrace/tests/i386/arrays cddl/usr.sbin/dtrace/tests/i386/funcs cddl/usr.sbin/dtrace/tests/i38... X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head: cddl/usr.sbin/dtrace/tests cddl/usr.sbin/dtrace/tests/i386 cddl/usr.sbin/dtrace/tests/i386/arrays cddl/usr.sbin/dtrace/tests/i386/funcs cddl/usr.sbin/dtrace/tests/i386/pid cddl/usr.sbin/dtrac... X-SVN-Commit-Revision: 348081 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D50A88E92D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.945,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 03:42:05 -0000 Author: markj Date: Wed May 22 03:42:03 2019 New Revision: 348081 URL: https://svnweb.freebsd.org/changeset/base/348081 Log: Hook up the existing i386 DTrace tests to the build. Now that it's relatively easy to do so, we might as well. MFC after: 1 week Event: Waterloo Hackathon 2019 Added: head/cddl/usr.sbin/dtrace/tests/i386/ head/cddl/usr.sbin/dtrace/tests/i386/Makefile (contents, props changed) head/cddl/usr.sbin/dtrace/tests/i386/arrays/ head/cddl/usr.sbin/dtrace/tests/i386/arrays/Makefile (contents, props changed) head/cddl/usr.sbin/dtrace/tests/i386/funcs/ head/cddl/usr.sbin/dtrace/tests/i386/funcs/Makefile (contents, props changed) head/cddl/usr.sbin/dtrace/tests/i386/pid/ head/cddl/usr.sbin/dtrace/tests/i386/pid/Makefile (contents, props changed) head/cddl/usr.sbin/dtrace/tests/i386/ustack/ head/cddl/usr.sbin/dtrace/tests/i386/ustack/Makefile (contents, props changed) Modified: head/cddl/usr.sbin/dtrace/tests/Makefile head/etc/mtree/BSD.tests.dist Modified: head/cddl/usr.sbin/dtrace/tests/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/Makefile Wed May 22 03:10:23 2019 (r348080) +++ head/cddl/usr.sbin/dtrace/tests/Makefile Wed May 22 03:42:03 2019 (r348081) @@ -4,6 +4,10 @@ TESTS_SUBDIRS+= common +.if ${MACHINE_CPUARCH} == "i386" +TESTS_SUBDIRS+= i386 +.endif + .PATH: ${SRCTOP}/tests KYUAFILE= yes Added: head/cddl/usr.sbin/dtrace/tests/i386/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/usr.sbin/dtrace/tests/i386/Makefile Wed May 22 03:42:03 2019 (r348081) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/cddl/usr.sbin/dtrace/i386 +TESTS_SUBDIRS+= arrays \ + funcs \ + pid \ + ustack + +.PATH: ${.CURDIR:H:H:H:H:H}/tests +KYUAFILE= YES + +.include Added: head/cddl/usr.sbin/dtrace/tests/i386/arrays/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/usr.sbin/dtrace/tests/i386/arrays/Makefile Wed May 22 03:42:03 2019 (r348081) @@ -0,0 +1,19 @@ +# $FreeBSD$ + +# +# This Makefile was generated by $srcdir/cddl/usr.sbin/dtrace/tests/tools/genmakefiles.sh. +# + +PACKAGE= tests + +${PACKAGE}FILES= \ + tst.uregsarray.d \ + +TESTEXES= \ + + +CFILES= \ + + + +.include "../../dtrace.test.mk" Added: head/cddl/usr.sbin/dtrace/tests/i386/funcs/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/usr.sbin/dtrace/tests/i386/funcs/Makefile Wed May 22 03:42:03 2019 (r348081) @@ -0,0 +1,22 @@ +# $FreeBSD$ + +# +# This Makefile was generated by $srcdir/cddl/usr.sbin/dtrace/tests/tools/genmakefiles.sh. +# + +PACKAGE= tests + +${PACKAGE}FILES= \ + tst.badcopyin.d \ + tst.badcopyinstr.d \ + tst.badcopyout.d \ + tst.badcopyoutstr.d \ + +TESTEXES= \ + + +CFILES= \ + + + +.include "../../dtrace.test.mk" Added: head/cddl/usr.sbin/dtrace/tests/i386/pid/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/usr.sbin/dtrace/tests/i386/pid/Makefile Wed May 22 03:42:03 2019 (r348081) @@ -0,0 +1,23 @@ +# $FreeBSD$ + +# +# This Makefile was generated by $srcdir/cddl/usr.sbin/dtrace/tests/tools/genmakefiles.sh. +# + +PACKAGE= tests + +${PACKAGE}FILES= \ + tst.badinstr.d \ + tst.branch.d \ + tst.embedded.d \ + tst.ret.d \ + tst.retlist.ksh \ + +TESTEXES= \ + + +CFILES= \ + + + +.include "../../dtrace.test.mk" Added: head/cddl/usr.sbin/dtrace/tests/i386/ustack/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/usr.sbin/dtrace/tests/i386/ustack/Makefile Wed May 22 03:42:03 2019 (r348081) @@ -0,0 +1,26 @@ +# $FreeBSD$ + +# +# This Makefile was generated by $srcdir/cddl/usr.sbin/dtrace/tests/tools/genmakefiles.sh. +# + +PACKAGE= tests + +${PACKAGE}FILES= \ + annotated_helper.d \ + helper_helper.d \ + tst.annotated.d \ + tst.annotated.d.out \ + tst.circstack.d \ + tst.helper.d \ + tst.helper.d.out \ + +TESTEXES= \ + + +CFILES= \ + tst.annotated.c \ + tst.helper.c \ + + +.include "../../dtrace.test.mk" Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Wed May 22 03:10:23 2019 (r348080) +++ head/etc/mtree/BSD.tests.dist Wed May 22 03:42:03 2019 (r348081) @@ -238,6 +238,16 @@ version .. .. + i386 + arrays + .. + funcs + .. + pid + .. + ustack + .. + .. .. zfsd .. From owner-svn-src-head@freebsd.org Wed May 22 03:49:40 2019 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 EC05E159A98C; Wed, 22 May 2019 03:49:39 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8EB968ED2C; Wed, 22 May 2019 03:49:39 +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 66F5DFC6C; Wed, 22 May 2019 03:49:39 +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 x4M3nd9m041359; Wed, 22 May 2019 03:49:39 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4M3ndtV041358; Wed, 22 May 2019 03:49:39 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201905220349.x4M3ndtV041358@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 22 May 2019 03:49:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348082 - head/sbin/dumpon X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sbin/dumpon X-SVN-Commit-Revision: 348082 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8EB968ED2C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.941,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 03:49:40 -0000 Author: markj Date: Wed May 22 03:49:38 2019 New Revision: 348082 URL: https://svnweb.freebsd.org/changeset/base/348082 Log: Provide an example of using dhclient-script(5) to configure netdump. Reviewed by: cem MFC after: 1 week Event: Waterloo Hackathon 2019 Differential Revision: https://reviews.freebsd.org/D20345 Modified: head/sbin/dumpon/dumpon.8 Modified: head/sbin/dumpon/dumpon.8 ============================================================================== --- head/sbin/dumpon/dumpon.8 Wed May 22 03:42:03 2019 (r348081) +++ head/sbin/dumpon/dumpon.8 Wed May 22 03:49:38 2019 (r348082) @@ -28,7 +28,7 @@ .\" From: @(#)swapon.8 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd May 6, 2019 +.Dd May 21, 2019 .Dt DUMPON 8 .Os .Sh NAME @@ -317,6 +317,49 @@ Note that the live kernel might be at a different path which can be examined by looking at the .Va kern.bootfile .Xr sysctl 8 . +.Pp +The +.Nm +.Xr rc 8 +script runs early during boot, typically before networking is configured. +This makes it unsuitable for configuring +.Xr netdump +when the client address is dynamic. +To configure +.Xr netdump +when +.Xr dhclient +binds to a server, +.Xr dhclient-script +can be used to run +.Xr dumpon . +For example, to automatically configure +.Xr netdump +on the vtnet0 interface, add the following to +.Pa /etc/dhclient-exit-hooks . +.Bd -literal +case $reason in +BOUND|REBIND|REBOOT|RENEW) + if [ "$interface" != vtnet0 ] || [ -n "$old_ip_address" -a \\ + "$old_ip_address" = "$new_ip_address" ]; then + break + fi + if [ -n "$new_routers" ]; then + # Take the first router in the list. + gateway_flag="-g ${new_routers%% *}" + fi + dumpon -c $new_ip_address -s $server $gateway_flag vtnet0 + ;; +esac +.Ed +.Pp +Be sure to fill in the server IP address and change the interface name if +needed, and to configure +.Pp +.Dl dumpdev="NO" +.Pp +in +.Pa /etc/rc.conf . .Sh SEE ALSO .Xr gzip 1 , .Xr kgdb 1 , From owner-svn-src-head@freebsd.org Wed May 22 03:52:40 2019 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 DA9DB159AC6F; Wed, 22 May 2019 03:52:40 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 760CF8F26F; Wed, 22 May 2019 03:52:40 +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 477C7FE34; Wed, 22 May 2019 03:52:40 +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 x4M3qeXo046417; Wed, 22 May 2019 03:52:40 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4M3qeNf046416; Wed, 22 May 2019 03:52:40 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201905220352.x4M3qeNf046416@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 22 May 2019 03:52:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348083 - head/sbin/dumpon X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sbin/dumpon X-SVN-Commit-Revision: 348083 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 760CF8F26F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.941,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 03:52:41 -0000 Author: markj Date: Wed May 22 03:52:39 2019 New Revision: 348083 URL: https://svnweb.freebsd.org/changeset/base/348083 Log: Update the example added in r348082 to specify a dump device priority. Event: Waterloo Hackathon 2019 Modified: head/sbin/dumpon/dumpon.8 Modified: head/sbin/dumpon/dumpon.8 ============================================================================== --- head/sbin/dumpon/dumpon.8 Wed May 22 03:49:38 2019 (r348082) +++ head/sbin/dumpon/dumpon.8 Wed May 22 03:52:39 2019 (r348083) @@ -345,21 +345,17 @@ BOUND|REBIND|REBOOT|RENEW) break fi if [ -n "$new_routers" ]; then - # Take the first router in the list. + # Take the first router in the list. gateway_flag="-g ${new_routers%% *}" fi - dumpon -c $new_ip_address -s $server $gateway_flag vtnet0 + # Configure as the highest-priority dump device. + dumpon -i 0 -c $new_ip_address -s $server $gateway_flag vtnet0 ;; esac .Ed .Pp Be sure to fill in the server IP address and change the interface name if -needed, and to configure -.Pp -.Dl dumpdev="NO" -.Pp -in -.Pa /etc/rc.conf . +needed. .Sh SEE ALSO .Xr gzip 1 , .Xr kgdb 1 , From owner-svn-src-head@freebsd.org Wed May 22 04:13:58 2019 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 84C59159E9A8; Wed, 22 May 2019 04:13: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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2B9D669C7E; Wed, 22 May 2019 04:13: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 EB71D181A9; Wed, 22 May 2019 04:13:57 +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 x4M4DviV057785; Wed, 22 May 2019 04:13:57 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4M4DvBm057783; Wed, 22 May 2019 04:13:57 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201905220413.x4M4DvBm057783@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 22 May 2019 04:13:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348090 - in head/libexec/bootpd: . bootpgw X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/libexec/bootpd: . bootpgw X-SVN-Commit-Revision: 348090 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2B9D669C7E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.941,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 04:13:58 -0000 Author: markj Date: Wed May 22 04:13:57 2019 New Revision: 348090 URL: https://svnweb.freebsd.org/changeset/base/348090 Log: Marginally improve usage() message style in bootpd. - Remove an extra space after "usage:". - Avoid lines exceeding 80 columns. Based on notes from rgrimes. MFC with: r348066 Event: Waterloo Hackathon 2019 Modified: head/libexec/bootpd/bootpd.c head/libexec/bootpd/bootpgw/bootpgw.c Modified: head/libexec/bootpd/bootpd.c ============================================================================== --- head/libexec/bootpd/bootpd.c Wed May 22 04:10:24 2019 (r348089) +++ head/libexec/bootpd/bootpd.c Wed May 22 04:13:57 2019 (r348090) @@ -587,8 +587,8 @@ PRIVATE void usage() { fprintf(stderr, - "usage: bootpd [-a] [-i | -s] [-c chdir-path] [-d level] [-h hostname] [-t timeout]\n"); - fprintf(stderr, " [bootptab [dumpfile]]\n"); + "usage: bootpd [-a] [-i | -s] [-c chdir-path] [-d level] [-h hostname]\n" + " [-t timeout] [bootptab [dumpfile]]\n"); fprintf(stderr, "\t -a\tdon't modify ARP table\n"); fprintf(stderr, "\t -c n\tset current directory\n"); fprintf(stderr, "\t -d n\tset debug level\n"); Modified: head/libexec/bootpd/bootpgw/bootpgw.c ============================================================================== --- head/libexec/bootpd/bootpgw/bootpgw.c Wed May 22 04:10:24 2019 (r348089) +++ head/libexec/bootpd/bootpgw/bootpgw.c Wed May 22 04:13:57 2019 (r348090) @@ -500,7 +500,8 @@ static void usage() { fprintf(stderr, - "usage: \nbootpgw [-a] [-d level] [-h count] [-i] [-s] [-t timeout] [-w time] server\n"); + "usage: bootpgw [-a] [-i | -s] [-d level] [-h count] [-t timeout]\n" + " [-w time] server\n"); fprintf(stderr, "\t -a\tdon't modify ARP table\n"); fprintf(stderr, "\t -d n\tset debug level\n"); fprintf(stderr, "\t -h n\tset max hop count\n"); From owner-svn-src-head@freebsd.org Wed May 22 04:25:26 2019 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 50628159EE2D; Wed, 22 May 2019 04:25:26 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B1D5F6A510; Wed, 22 May 2019 04:25:25 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x4M4PNSK082700; Tue, 21 May 2019 21:25:23 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x4M4PNCB082699; Tue, 21 May 2019 21:25:23 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201905220425.x4M4PNCB082699@gndrsh.dnsmgr.net> Subject: Re: svn commit: r348090 - in head/libexec/bootpd: . bootpgw In-Reply-To: <201905220413.x4M4DvBm057783@repo.freebsd.org> To: Mark Johnston Date: Tue, 21 May 2019 21:25:23 -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-Rspamd-Queue-Id: B1D5F6A510 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.94 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.936,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 04:25:26 -0000 > Author: markj > Date: Wed May 22 04:13:57 2019 > New Revision: 348090 > URL: https://svnweb.freebsd.org/changeset/base/348090 > > Log: > Marginally improve usage() message style in bootpd. > > - Remove an extra space after "usage:". > - Avoid lines exceeding 80 columns. > > Based on notes from rgrimes. Thanks, but you missed an important aspect of those notes, see inline below. > > MFC with: r348066 > Event: Waterloo Hackathon 2019 > > Modified: > head/libexec/bootpd/bootpd.c > head/libexec/bootpd/bootpgw/bootpgw.c > > Modified: head/libexec/bootpd/bootpd.c > ============================================================================== > --- head/libexec/bootpd/bootpd.c Wed May 22 04:10:24 2019 (r348089) > +++ head/libexec/bootpd/bootpd.c Wed May 22 04:13:57 2019 (r348090) > @@ -587,8 +587,8 @@ PRIVATE void > usage() > { > fprintf(stderr, > - "usage: bootpd [-a] [-i | -s] [-c chdir-path] [-d level] [-h hostname] [-t timeout]\n"); > - fprintf(stderr, " [bootptab [dumpfile]]\n"); > + "usage: bootpd [-a] [-i | -s] [-c chdir-path] [-d level] [-h hostname]\n" > + " [-t timeout] [bootptab [dumpfile]]\n"); > fprintf(stderr, "\t -a\tdon't modify ARP table\n"); > fprintf(stderr, "\t -c n\tset current directory\n"); > fprintf(stderr, "\t -d n\tset debug level\n"); These 3 printf's are now miss aligned and contain a \t that should not be there: there may be more, I am only look at what is in context here. - fprintf(stderr, "\t -a\tdon't modify ARP table\n"); - fprintf(stderr, "\t -c n\tset current directory\n"); - fprintf(stderr, "\t -d n\tset debug level\n"); + fprintf(stderr, " -a\tdon't modify ARP table\n"); + fprintf(stderr, " -c n\tset current directory\n"); + fprintf(stderr, " -d n\tset debug level\n"); Regards, Rod > Modified: head/libexec/bootpd/bootpgw/bootpgw.c > ============================================================================== > --- head/libexec/bootpd/bootpgw/bootpgw.c Wed May 22 04:10:24 2019 (r348089) > +++ head/libexec/bootpd/bootpgw/bootpgw.c Wed May 22 04:13:57 2019 (r348090) > @@ -500,7 +500,8 @@ static void > usage() > { > fprintf(stderr, > - "usage: \nbootpgw [-a] [-d level] [-h count] [-i] [-s] [-t timeout] [-w time] server\n"); > + "usage: bootpgw [-a] [-i | -s] [-d level] [-h count] [-t timeout]\n" > + " [-w time] server\n"); > fprintf(stderr, "\t -a\tdon't modify ARP table\n"); > fprintf(stderr, "\t -d n\tset debug level\n"); > fprintf(stderr, "\t -h n\tset max hop count\n"); Same comments as above -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Wed May 22 04:51:10 2019 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 E476A159F584; Wed, 22 May 2019 04:51:09 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8AEAF6B176; Wed, 22 May 2019 04:51:09 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 638D8186E3; Wed, 22 May 2019 04:51:09 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4M4p9YL075674; Wed, 22 May 2019 04:51:09 GMT (envelope-from sobomax@FreeBSD.org) Received: (from sobomax@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4M4p8x6075670; Wed, 22 May 2019 04:51:08 GMT (envelope-from sobomax@FreeBSD.org) Message-Id: <201905220451.x4M4p8x6075670@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sobomax set sender to sobomax@FreeBSD.org using -f From: Maxim Sobolev Date: Wed, 22 May 2019 04:51:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348091 - head/sys/dev/aacraid X-SVN-Group: head X-SVN-Commit-Author: sobomax X-SVN-Commit-Paths: head/sys/dev/aacraid X-SVN-Commit-Revision: 348091 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8AEAF6B176 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.948,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 04:51:10 -0000 Author: sobomax Date: Wed May 22 04:51:08 2019 New Revision: 348091 URL: https://svnweb.freebsd.org/changeset/base/348091 Log: Make aacraid(4) working on ASR8805 & ASR8402 in particular. This patch has been in the PR system for 5 months and then on reviews for another 5. Nobody came with any cases where it fails, while many people cried for it to be commited & merged. PR: 209468 Submitted by: Prasad B M Reported by: Steven Peterson Approved by: scottl MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D18408 Modified: head/sys/dev/aacraid/aacraid.c head/sys/dev/aacraid/aacraid_cam.c head/sys/dev/aacraid/aacraid_reg.h head/sys/dev/aacraid/aacraid_var.h Modified: head/sys/dev/aacraid/aacraid.c ============================================================================== --- head/sys/dev/aacraid/aacraid.c Wed May 22 04:13:57 2019 (r348090) +++ head/sys/dev/aacraid/aacraid.c Wed May 22 04:51:08 2019 (r348091) @@ -264,7 +264,7 @@ aacraid_attach(struct aac_softc *sc) /* * Check that the firmware on the card is supported. */ - sc->msi_enabled = FALSE; + sc->msi_enabled = sc->msi_tupelo = FALSE; if ((error = aac_check_firmware(sc)) != 0) return(error); @@ -284,8 +284,8 @@ aacraid_attach(struct aac_softc *sc) */ if ((error = aac_alloc(sc)) != 0) return(error); + aac_define_int_mode(sc); if (!(sc->flags & AAC_FLAGS_SYNC_MODE)) { - aac_define_int_mode(sc); if ((error = aac_init(sc)) != 0) return(error); } @@ -728,7 +728,7 @@ aacraid_free(struct aac_softc *sc) else break; } - if (sc->msi_enabled) + if (sc->msi_enabled || sc->msi_tupelo) pci_release_msi(sc->aac_dev); /* destroy data-transfer DMA tag */ @@ -1316,6 +1316,9 @@ aacraid_map_command_sg(void *arg, bus_dma_segment_t *s fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, "nseg %d", nseg); mtx_assert(&sc->aac_io_lock, MA_OWNED); + if ((sc->flags & AAC_FLAGS_SYNC_MODE) && sc->aac_sync_cm) + return; + /* copy into the FIB */ if (cm->cm_sgtable != NULL) { if (fib->Header.Command == RawIo2) { @@ -1433,11 +1436,14 @@ aacraid_map_command_sg(void *arg, bus_dma_segment_t *s cm->cm_flags |= AAC_CMD_MAPPED; - if (sc->flags & AAC_FLAGS_SYNC_MODE) { + if (cm->cm_flags & AAC_CMD_WAIT) { + aacraid_sync_command(sc, AAC_MONKER_SYNCFIB, + cm->cm_fibphys, 0, 0, 0, NULL, NULL); + } else if (sc->flags & AAC_FLAGS_SYNC_MODE) { u_int32_t wait = 0; - aacraid_sync_command(sc, AAC_MONKER_SYNCFIB, cm->cm_fibphys, 0, 0, 0, &wait, NULL); - } else if (cm->cm_flags & AAC_CMD_WAIT) { - aacraid_sync_command(sc, AAC_MONKER_SYNCFIB, cm->cm_fibphys, 0, 0, 0, NULL, NULL); + sc->aac_sync_cm = cm; + aacraid_sync_command(sc, AAC_MONKER_SYNCFIB, + cm->cm_fibphys, 0, 0, 0, &wait, NULL); } else { int count = 10000000L; while (AAC_SEND_COMMAND(sc, cm) != 0) { @@ -1617,6 +1623,7 @@ aac_check_firmware(struct aac_softc *sc) options = AAC_GET_MAILBOX(sc, 1); atu_size = AAC_GET_MAILBOX(sc, 2); sc->supported_options = options; + sc->doorbell_mask = AAC_GET_MAILBOX(sc, 3); if ((options & AAC_SUPPORTED_4GB_WINDOW) != 0 && (sc->flags & AAC_FLAGS_NO4GB) == 0) @@ -1631,13 +1638,13 @@ aac_check_firmware(struct aac_softc *sc) sc->flags |= AAC_FLAGS_SG_64BIT; } if (sc->aac_if.aif_send_command) { - if ((options & AAC_SUPPORTED_NEW_COMM_TYPE3) || - (options & AAC_SUPPORTED_NEW_COMM_TYPE4)) - sc->flags |= AAC_FLAGS_NEW_COMM | AAC_FLAGS_NEW_COMM_TYPE34; + if (options & AAC_SUPPORTED_NEW_COMM_TYPE2) + sc->flags |= AAC_FLAGS_NEW_COMM | AAC_FLAGS_NEW_COMM_TYPE2; else if (options & AAC_SUPPORTED_NEW_COMM_TYPE1) sc->flags |= AAC_FLAGS_NEW_COMM | AAC_FLAGS_NEW_COMM_TYPE1; - else if (options & AAC_SUPPORTED_NEW_COMM_TYPE2) - sc->flags |= AAC_FLAGS_NEW_COMM | AAC_FLAGS_NEW_COMM_TYPE2; + else if ((options & AAC_SUPPORTED_NEW_COMM_TYPE3) || + (options & AAC_SUPPORTED_NEW_COMM_TYPE4)) + sc->flags |= AAC_FLAGS_NEW_COMM | AAC_FLAGS_NEW_COMM_TYPE34; } if (options & AAC_SUPPORTED_64BIT_ARRAYSIZE) sc->flags |= AAC_FLAGS_ARRAY_64BIT; @@ -1851,8 +1858,30 @@ aac_define_int_mode(struct aac_softc *sc) dev = sc->aac_dev; + if (sc->flags & AAC_FLAGS_SYNC_MODE) { + device_printf(dev, "using line interrupts\n"); + sc->aac_max_msix = 1; + sc->aac_vector_cap = sc->aac_max_fibs; + return; + } + /* max. vectors from AAC_MONKER_GETCOMMPREF */ if (sc->aac_max_msix == 0) { + if (sc->aac_hwif == AAC_HWIF_SRC) { + msi_count = 1; + if ((error = pci_alloc_msi(dev, &msi_count)) != 0) { + device_printf(dev, "alloc msi failed - err=%d; " + "will use INTx\n", error); + pci_release_msi(dev); + } else { + sc->msi_tupelo = TRUE; + } + } + if (sc->msi_tupelo) + device_printf(dev, "using MSI interrupts\n"); + else + device_printf(dev, "using line interrupts\n"); + sc->aac_max_msix = 1; sc->aac_vector_cap = sc->aac_max_fibs; return; @@ -1958,7 +1987,7 @@ aac_setup_intr(struct aac_softc *sc) void *tag; msi_count = sc->aac_max_msix; - rid = (sc->msi_enabled ? 1:0); + rid = ((sc->msi_enabled || sc->msi_tupelo)? 1:0); for (i = 0; i < msi_count; i++, rid++) { if ((res = bus_alloc_resource_any(sc->aac_dev,SYS_RES_IRQ, &rid, @@ -2854,14 +2883,14 @@ aac_ioctl_send_raw_srb(struct aac_softc *sc, caddr_t a fib = cm->cm_fib; srbcmd = (struct aac_srb *)fib->data; - if ((error = copyin((void *)&user_srb->data_len, &fibsize, - sizeof (u_int32_t)) != 0)) + if ((error = copyin((void *)&user_srb->data_len, &fibsize, + sizeof (u_int32_t))) != 0) goto out; if (fibsize > (sc->aac_max_fib_size-sizeof(struct aac_fib_header))) { error = EINVAL; goto out; } - if ((error = copyin((void *)user_srb, srbcmd, fibsize) != 0)) + if ((error = copyin((void *)user_srb, srbcmd, fibsize)) != 0) goto out; srbcmd->function = 0; /* SRBF_ExecuteScsi */ @@ -2895,13 +2924,10 @@ aac_ioctl_send_raw_srb(struct aac_softc *sc, caddr_t a srb_sg_bytecount = sg.SgByteCount; srb_sg_address = sg.SgAddress; - if (srb_sg_address > 0xffffffffull && - !(sc->flags & AAC_FLAGS_SG_64BIT)) -#endif - { - error = EINVAL; - goto out; - } +#else + error = EINVAL; + goto out; +#endif } else { error = EINVAL; goto out; @@ -3701,7 +3727,7 @@ aac_get_bus_info(struct aac_softc *sc) caminf->TargetsPerBus = businfo.TargetsPerBus; caminf->BusNumber = i+1; caminf->BusType = PASSTHROUGH_BUS; - caminf->InitiatorBusId = businfo.InitiatorBusId[i]; + caminf->InitiatorBusId = -1; caminf->aac_sc = sc; caminf->sim_dev = child; caminf->aac_cam = NULL; @@ -3745,7 +3771,7 @@ aac_reset_adapter(struct aac_softc *sc) struct aac_fib *fib; struct aac_pause_command *pc; u_int32_t status, reset_mask, waitCount, max_msix_orig; - int msi_enabled_orig; + int ret, msi_enabled_orig; fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); mtx_assert(&sc->aac_io_lock, MA_OWNED); @@ -3804,50 +3830,61 @@ aac_reset_adapter(struct aac_softc *sc) AAC_MEM0_SETREG4(sc, AAC_IRCSR, AAC_IRCSR_CORES_RST); /* We need to wait for 5 seconds before accessing the MU again - * 10000 * 100us = 1000,000us = 1000ms = 1s + * 10000 * 100us = 1000,000us = 1000ms = 1s */ waitCount = 5 * 10000; while (waitCount) { DELAY(100); /* delay 100 microseconds */ waitCount--; } - } else if ((aacraid_sync_command(sc, - AAC_IOP_RESET_ALWAYS, 0, 0, 0, 0, &status, &reset_mask)) != 0) { - /* call IOP_RESET for older firmware */ - if ((aacraid_sync_command(sc, - AAC_IOP_RESET, 0, 0, 0, 0, &status, NULL)) != 0) { + } else { + ret = aacraid_sync_command(sc, AAC_IOP_RESET_ALWAYS, + 0, 0, 0, 0, &status, &reset_mask); + if (ret && !sc->doorbell_mask) { + /* call IOP_RESET for older firmware */ + if ((aacraid_sync_command(sc, AAC_IOP_RESET, 0,0,0,0, + &status, NULL)) != 0) { + if (status == AAC_SRB_STS_INVALID_REQUEST) { + device_printf(sc->aac_dev, + "IOP_RESET not supported\n"); + } else { + /* probably timeout */ + device_printf(sc->aac_dev, + "IOP_RESET failed\n"); + } - if (status == AAC_SRB_STS_INVALID_REQUEST) - device_printf(sc->aac_dev, "IOP_RESET not supported\n"); - else - /* probably timeout */ - device_printf(sc->aac_dev, "IOP_RESET failed\n"); + /* unwind aac_shutdown() */ + aac_alloc_sync_fib(sc, &fib); + pc = (struct aac_pause_command *)&fib->data[0]; + pc->Command = VM_ContainerConfig; + pc->Type = CT_PAUSE_IO; + pc->Timeout = 1; + pc->Min = 1; + pc->NoRescan = 1; - /* unwind aac_shutdown() */ - aac_alloc_sync_fib(sc, &fib); - pc = (struct aac_pause_command *)&fib->data[0]; - pc->Command = VM_ContainerConfig; - pc->Type = CT_PAUSE_IO; - pc->Timeout = 1; - pc->Min = 1; - pc->NoRescan = 1; + (void) aac_sync_fib(sc, ContainerCommand, 0, + fib, sizeof (struct aac_pause_command)); + aac_release_sync_fib(sc); - (void) aac_sync_fib(sc, ContainerCommand, 0, fib, - sizeof (struct aac_pause_command)); - aac_release_sync_fib(sc); - - goto finish; + goto finish; + } + } else if (sc->doorbell_mask) { + ret = 0; + reset_mask = sc->doorbell_mask; } - } else if (sc->aac_support_opt2 & AAC_SUPPORTED_DOORBELL_RESET) { - AAC_MEM0_SETREG4(sc, AAC_SRC_IDBR, reset_mask); - /* - * We need to wait for 5 seconds before accessing the doorbell - * again, 10000 * 100us = 1000,000us = 1000ms = 1s - */ - waitCount = 5 * 10000; - while (waitCount) { - DELAY(100); /* delay 100 microseconds */ - waitCount--; + if (!ret && + (sc->aac_support_opt2 & AAC_SUPPORTED_DOORBELL_RESET)) { + AAC_MEM0_SETREG4(sc, AAC_SRC_IDBR, reset_mask); + /* + * We need to wait for 5 seconds before accessing the + * doorbell again; + * 10000 * 100us = 1000,000us = 1000ms = 1s + */ + waitCount = 5 * 10000; + while (waitCount) { + DELAY(100); /* delay 100 microseconds */ + waitCount--; + } } } Modified: head/sys/dev/aacraid/aacraid_cam.c ============================================================================== --- head/sys/dev/aacraid/aacraid_cam.c Wed May 22 04:13:57 2019 (r348090) +++ head/sys/dev/aacraid/aacraid_cam.c Wed May 22 04:51:08 2019 (r348091) @@ -1017,8 +1017,8 @@ aac_cam_action(struct cam_sim *sim, union ccb *ccb) cpi->version_num = 1; cpi->target_sprt = 0; cpi->hba_eng_cnt = 0; - cpi->max_target = camsc->inf->TargetsPerBus; - cpi->max_lun = 8; /* Per the controller spec */ + cpi->max_target = camsc->inf->TargetsPerBus - 1; + cpi->max_lun = 7; /* Per the controller spec */ cpi->initiator_id = camsc->inf->InitiatorBusId; cpi->bus_id = camsc->inf->BusNumber; #if __FreeBSD_version >= 800000 @@ -1389,15 +1389,9 @@ aacraid_startio(struct aac_softc *sc) * Try to get a command that's been put off for lack of * resources */ - if (sc->flags & AAC_FLAGS_SYNC_MODE) { - /* sync. transfer mode */ - if (sc->aac_sync_cm) - break; - cm = aac_dequeue_ready(sc); - sc->aac_sync_cm = cm; - } else { - cm = aac_dequeue_ready(sc); - } + if ((sc->flags & AAC_FLAGS_SYNC_MODE) && sc->aac_sync_cm) + break; + cm = aac_dequeue_ready(sc); /* nothing to do? */ if (cm == NULL) Modified: head/sys/dev/aacraid/aacraid_reg.h ============================================================================== --- head/sys/dev/aacraid/aacraid_reg.h Wed May 22 04:13:57 2019 (r348090) +++ head/sys/dev/aacraid/aacraid_reg.h Wed May 22 04:51:08 2019 (r348091) @@ -42,7 +42,7 @@ /* * Misc. magic numbers. */ -#define AAC_MAX_CONTAINERS 64 +#define AAC_MAX_CONTAINERS 240 #define AAC_BLOCK_SIZE 512 /* Modified: head/sys/dev/aacraid/aacraid_var.h ============================================================================== --- head/sys/dev/aacraid/aacraid_var.h Wed May 22 04:13:57 2019 (r348090) +++ head/sys/dev/aacraid/aacraid_var.h Wed May 22 04:51:08 2019 (r348091) @@ -49,7 +49,7 @@ #define AAC_DRIVER_MAJOR_VERSION 3 #define AAC_DRIVER_MINOR_VERSION 2 -#define AAC_DRIVER_BUGFIX_LEVEL 5 +#define AAC_DRIVER_BUGFIX_LEVEL 10 #define AAC_DRIVER_TYPE AAC_TYPE_RELEASE #ifndef AAC_DRIVER_BUILD @@ -481,9 +481,12 @@ struct aac_softc u_int32_t aac_feature_bits; /* feature bits from suppl. info */ u_int32_t aac_support_opt2; /* supp. options from suppl. info */ u_int32_t aac_max_aif; /* max. AIF count */ + u_int32_t doorbell_mask; /* for IOP reset */ u_int32_t aac_max_msix; /* max. MSI-X vectors */ u_int32_t aac_vector_cap; /* MSI-X vector capab.*/ int msi_enabled; /* MSI/MSI-X enabled */ + int msi_tupelo; /* Series 6 support for */ + /* single MSI interrupt */ #define AAC_CAM_TARGET_WILDCARD ~0 void (*cam_rescan_cb)(struct aac_softc *, uint32_t, uint32_t); From owner-svn-src-head@freebsd.org Wed May 22 07:21:06 2019 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 66AB015A2ED0; Wed, 22 May 2019 07:21:06 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0B7D76FC53; Wed, 22 May 2019 07:21:06 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DA4891A0AA; Wed, 22 May 2019 07:21:05 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4M7L5Rj055737; Wed, 22 May 2019 07:21:05 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4M7L5Tr055735; Wed, 22 May 2019 07:21:05 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201905220721.x4M7L5Tr055735@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 22 May 2019 07:21:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348098 - in head: etc libexec/rc X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head: etc libexec/rc X-SVN-Commit-Revision: 348098 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0B7D76FC53 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 07:21:06 -0000 Author: manu Date: Wed May 22 07:21:05 2019 New Revision: 348098 URL: https://svnweb.freebsd.org/changeset/base/348098 Log: pkgbase: Move rc.firewall to libexec/rc Put it with all the other rc files Reviewed by: bapt Modified: head/etc/Makefile head/libexec/rc/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Wed May 22 06:02:51 2019 (r348097) +++ head/etc/Makefile Wed May 22 07:21:05 2019 (r348098) @@ -17,7 +17,6 @@ SUBDIR+=sendmail BIN1= \ login.access \ rc.bsdextended \ - rc.firewall \ termcap.small # NB: keep these sorted by MK_* knobs Modified: head/libexec/rc/Makefile ============================================================================== --- head/libexec/rc/Makefile Wed May 22 06:02:51 2019 (r348097) +++ head/libexec/rc/Makefile Wed May 22 07:21:05 2019 (r348098) @@ -1,8 +1,13 @@ # $FreeBSD$ +.include + CONFGROUPS= CONFETC CONFETCEXEC CONFETCDEFAULTS CONFETCDIR= /etc CONFETC= network.subr rc rc.initdiskless rc.subr rc.shutdown +.if ${MK_IPFW} != "no" +CONFETC+= rc.firewall +.endif CONFETCMODE= 644 CONFETCEXEC= netstart pccard_ether rc.resume rc.suspend CONFETCEXECDIR= /etc From owner-svn-src-head@freebsd.org Wed May 22 07:21:40 2019 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 D74C415A3072; Wed, 22 May 2019 07:21:40 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7BCED6FDE6; Wed, 22 May 2019 07:21:40 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 577B41A0DA; Wed, 22 May 2019 07:21:40 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4M7LeTY055805; Wed, 22 May 2019 07:21:40 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4M7LeOd055804; Wed, 22 May 2019 07:21:40 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201905220721.x4M7LeOd055804@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 22 May 2019 07:21:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348099 - in head: etc libexec/rc X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head: etc libexec/rc X-SVN-Commit-Revision: 348099 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7BCED6FDE6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.965,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 07:21:41 -0000 Author: manu Date: Wed May 22 07:21:39 2019 New Revision: 348099 URL: https://svnweb.freebsd.org/changeset/base/348099 Log: pkgbase: Move rc.bsdextended to libexec/rc Reviewed by: bapt Modified: head/etc/Makefile head/libexec/rc/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Wed May 22 07:21:05 2019 (r348098) +++ head/etc/Makefile Wed May 22 07:21:39 2019 (r348099) @@ -16,7 +16,6 @@ SUBDIR+=sendmail BIN1= \ login.access \ - rc.bsdextended \ termcap.small # NB: keep these sorted by MK_* knobs Modified: head/libexec/rc/Makefile ============================================================================== --- head/libexec/rc/Makefile Wed May 22 07:21:05 2019 (r348098) +++ head/libexec/rc/Makefile Wed May 22 07:21:39 2019 (r348099) @@ -4,7 +4,7 @@ CONFGROUPS= CONFETC CONFETCEXEC CONFETCDEFAULTS CONFETCDIR= /etc -CONFETC= network.subr rc rc.initdiskless rc.subr rc.shutdown +CONFETC= network.subr rc rc.initdiskless rc.subr rc.shutdown rc.bsdextended .if ${MK_IPFW} != "no" CONFETC+= rc.firewall .endif From owner-svn-src-head@freebsd.org Wed May 22 07:22:10 2019 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 0951115A30C1; Wed, 22 May 2019 07:22:10 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9EA7B6FF5D; Wed, 22 May 2019 07:22:09 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6C5BA1A0FC; Wed, 22 May 2019 07:22:09 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4M7M9Sa057574; Wed, 22 May 2019 07:22:09 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4M7M8ue057572; Wed, 22 May 2019 07:22:08 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201905220722.x4M7M8ue057572@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 22 May 2019 07:22:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348100 - in head: etc libexec/rc X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head: etc libexec/rc X-SVN-Commit-Revision: 348100 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9EA7B6FF5D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.950,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 07:22:10 -0000 Author: manu Date: Wed May 22 07:22:08 2019 New Revision: 348100 URL: https://svnweb.freebsd.org/changeset/base/348100 Log: pkgbase: Move rc.sendmail to libexec/rc Reviewed by: bapt Modified: head/etc/Makefile head/libexec/rc/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Wed May 22 07:21:39 2019 (r348099) +++ head/etc/Makefile Wed May 22 07:22:08 2019 (r348100) @@ -20,10 +20,6 @@ BIN1= \ # NB: keep these sorted by MK_* knobs -.if ${MK_SENDMAIL} != "no" -BIN1+= rc.sendmail -.endif - .if ${MK_SENDMAIL} == "no" ETCMAIL=mailer.conf aliases .else Modified: head/libexec/rc/Makefile ============================================================================== --- head/libexec/rc/Makefile Wed May 22 07:21:39 2019 (r348099) +++ head/libexec/rc/Makefile Wed May 22 07:22:08 2019 (r348100) @@ -8,6 +8,9 @@ CONFETC= network.subr rc rc.initdiskless rc.subr rc.sh .if ${MK_IPFW} != "no" CONFETC+= rc.firewall .endif +.if ${MK_SENDMAIL} != "no" +CONFETC+= rc.sendmail +.endif CONFETCMODE= 644 CONFETCEXEC= netstart pccard_ether rc.resume rc.suspend CONFETCEXECDIR= /etc From owner-svn-src-head@freebsd.org Wed May 22 07:22:35 2019 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 BA05715A313A; Wed, 22 May 2019 07:22:35 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 59F0B7020A; Wed, 22 May 2019 07:22:35 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 296A31A234; Wed, 22 May 2019 07:22:35 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4M7MZGs057634; Wed, 22 May 2019 07:22:35 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4M7MY6W057632; Wed, 22 May 2019 07:22:34 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201905220722.x4M7MY6W057632@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 22 May 2019 07:22:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348101 - in head: etc share/termcap X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head: etc share/termcap X-SVN-Commit-Revision: 348101 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 59F0B7020A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.950,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 07:22:35 -0000 Author: manu Date: Wed May 22 07:22:34 2019 New Revision: 348101 URL: https://svnweb.freebsd.org/changeset/base/348101 Log: pkgbase: Move termcap.small to share/termcap Reviewed by: bapt Modified: head/etc/Makefile head/share/termcap/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Wed May 22 07:22:08 2019 (r348100) +++ head/etc/Makefile Wed May 22 07:22:34 2019 (r348101) @@ -16,7 +16,7 @@ SUBDIR+=sendmail BIN1= \ login.access \ - termcap.small + login.access # NB: keep these sorted by MK_* knobs Modified: head/share/termcap/Makefile ============================================================================== --- head/share/termcap/Makefile Wed May 22 07:22:08 2019 (r348100) +++ head/share/termcap/Makefile Wed May 22 07:22:34 2019 (r348101) @@ -10,6 +10,7 @@ MAN= termcap.5 FILES= termcap termcap.db FILESDIR= ${BINDIR}/misc CLEANFILES+= termcap.db +CONFS= termcap.small .include From owner-svn-src-head@freebsd.org Wed May 22 07:23:05 2019 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 3700215A31A3; Wed, 22 May 2019 07:23:05 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C788970330; Wed, 22 May 2019 07:23:04 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9FDBD1A235; Wed, 22 May 2019 07:23:04 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4M7N4Ku057702; Wed, 22 May 2019 07:23:04 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4M7N4bS057699; Wed, 22 May 2019 07:23:04 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201905220723.x4M7N4bS057699@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 22 May 2019 07:23:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348102 - in head: etc share/examples usr.bin/login X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head: etc share/examples usr.bin/login X-SVN-Commit-Revision: 348102 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C788970330 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.950,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 07:23:05 -0000 Author: manu Date: Wed May 22 07:23:03 2019 New Revision: 348102 URL: https://svnweb.freebsd.org/changeset/base/348102 Log: pkgbase: Move login.access to usb.bin/login Also remove the etc-examples target as we don't have any files to handle here. Reviewed by: bapt Modified: head/etc/Makefile head/share/examples/Makefile head/usr.bin/login/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Wed May 22 07:22:34 2019 (r348101) +++ head/etc/Makefile Wed May 22 07:23:03 2019 (r348102) @@ -14,10 +14,6 @@ UPDATE_DEPENDFILE= no SUBDIR+=sendmail .endif -BIN1= \ - login.access \ - login.access - # NB: keep these sorted by MK_* knobs .if ${MK_SENDMAIL} == "no" @@ -56,9 +52,6 @@ distribution: @echo "set DESTDIR before running \"make ${.TARGET}\"" @false .endif - cd ${.CURDIR}; \ - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ - ${BIN1} ${DESTDIR}/etc ${_+_}cd ${.CURDIR}/gss; ${MAKE} install ${_+_}cd ${.CURDIR}/mtree; ${MAKE} install ${_+_}cd ${SRCTOP}/share/termcap; ${MAKE} etc-termcap @@ -167,11 +160,6 @@ distrib-dirs: ${MTREES:N/*} distrib-cleanup .PHONY ${INSTALL_SYMLINK} "${nls}" "${DESTDIR}${SHAREDIR}/nls/${alias}" .endfor .endif - -etc-examples: ${META_DEPS} - cd ${.CURDIR}; ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 \ - ${BIN1} ${BIN2} \ - ${DESTDIR}${SHAREDIR}/examples/etc .include Modified: head/share/examples/Makefile ============================================================================== --- head/share/examples/Makefile Wed May 22 07:22:34 2019 (r348101) +++ head/share/examples/Makefile Wed May 22 07:23:03 2019 (r348102) @@ -381,9 +381,8 @@ SER_${d:tu:C/\//_/g}DIR+= ${SHAREDIR}/examples/${d} BINDIR= ${SHAREDIR}/examples -beforeinstall: copies etc-examples +beforeinstall: copies META_TARGETS+= copies -.ORDER: etc-examples copies: .for i in ${LDIRS} @@ -391,9 +390,6 @@ copies: rm -f ${DESTDIR}${BINDIR}/$i; \ fi .endfor - -etc-examples: - ${_+_}(cd ${SRCTOP}/etc; ${MAKE} etc-examples) SUBDIR+= smbfs Modified: head/usr.bin/login/Makefile ============================================================================== --- head/usr.bin/login/Makefile Wed May 22 07:22:34 2019 (r348101) +++ head/usr.bin/login/Makefile Wed May 22 07:23:03 2019 (r348102) @@ -3,7 +3,7 @@ .include -CONFS= fbtab login.conf motd +CONFS= fbtab login.conf motd login.access PROG= login SRCS= login.c login_fbtab.c CFLAGS+=-DLOGALL From owner-svn-src-head@freebsd.org Wed May 22 07:38:56 2019 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 C032715A39A2; Wed, 22 May 2019 07:38:55 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6E2E1710F1; Wed, 22 May 2019 07:38:55 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3A99A1A41F; Wed, 22 May 2019 07:38:55 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4M7ctBZ063099; Wed, 22 May 2019 07:38:55 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4M7ctmi063098; Wed, 22 May 2019 07:38:55 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201905220738.x4M7ctmi063098@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 22 May 2019 07:38:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348103 - in head: etc libexec/rc X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head: etc libexec/rc X-SVN-Commit-Revision: 348103 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6E2E1710F1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 07:38:56 -0000 Author: manu Date: Wed May 22 07:38:54 2019 New Revision: 348103 URL: https://svnweb.freebsd.org/changeset/base/348103 Log: pkgbase: Really move rc.firewall Messed up with git->svn in r348098 Added: head/libexec/rc/rc.firewall - copied unchanged from r348102, head/etc/rc.firewall Deleted: head/etc/rc.firewall Copied: head/libexec/rc/rc.firewall (from r348102, head/etc/rc.firewall) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/rc/rc.firewall Wed May 22 07:38:54 2019 (r348103, copy of r348102, head/etc/rc.firewall) @@ -0,0 +1,557 @@ +#!/bin/sh - +# Copyright (c) 1996 Poul-Henning Kamp +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +# +# Setup system for ipfw(4) firewall service. +# + +# Suck in the configuration variables. +if [ -z "${source_rc_confs_defined}" ]; then + if [ -r /etc/defaults/rc.conf ]; then + . /etc/defaults/rc.conf + source_rc_confs + elif [ -r /etc/rc.conf ]; then + . /etc/rc.conf + fi +fi + +############ +# Define the firewall type in /etc/rc.conf. Valid values are: +# open - will allow anyone in +# client - will try to protect just this machine +# simple - will try to protect a whole network +# closed - totally disables IP services except via lo0 interface +# workstation - will try to protect just this machine using stateful +# firewalling. See below for rc.conf variables used +# UNKNOWN - disables the loading of firewall rules. +# filename - will load the rules in the given filename (full path required) +# +# For ``client'' and ``simple'' the entries below should be customized +# appropriately. + +############ +# +# If you don't know enough about packet filtering, we suggest that you +# take time to read this book: +# +# Building Internet Firewalls, 2nd Edition +# Brent Chapman and Elizabeth Zwicky +# +# O'Reilly & Associates, Inc +# ISBN 1-56592-871-7 +# http://www.ora.com/ +# http://www.oreilly.com/catalog/fire2/ +# +# For a more advanced treatment of Internet Security read: +# +# Firewalls and Internet Security: Repelling the Wily Hacker, 2nd Edition +# William R. Cheswick, Steven M. Bellowin, Aviel D. Rubin +# +# Addison-Wesley / Prentice Hall +# ISBN 0-201-63466-X +# http://www.pearsonhighered.com/ +# http://www.pearsonhighered.com/educator/academic/product/0,3110,020163466X,00.html +# + +setup_loopback() { + ############ + # Only in rare cases do you want to change these rules + # + ${fwcmd} add 100 pass all from any to any via lo0 + ${fwcmd} add 200 deny all from any to 127.0.0.0/8 + ${fwcmd} add 300 deny ip from 127.0.0.0/8 to any + if [ $ipv6_available -eq 0 ]; then + ${fwcmd} add 400 deny all from any to ::1 + ${fwcmd} add 500 deny all from ::1 to any + fi +} + +setup_ipv6_mandatory() { + [ $ipv6_available -eq 0 ] || return 0 + + ############ + # Only in rare cases do you want to change these rules + # + # ND + # + # DAD + ${fwcmd} add pass ipv6-icmp from :: to ff02::/16 + # RS, RA, NS, NA, redirect... + ${fwcmd} add pass ipv6-icmp from fe80::/10 to fe80::/10 + ${fwcmd} add pass ipv6-icmp from fe80::/10 to ff02::/16 + + # Allow ICMPv6 destination unreachable + ${fwcmd} add pass ipv6-icmp from any to any icmp6types 1 + + # Allow NS/NA/toobig (don't filter it out) + ${fwcmd} add pass ipv6-icmp from any to any icmp6types 2,135,136 +} + +. /etc/rc.subr +. /etc/network.subr + +if [ -n "${1}" ]; then + firewall_type="${1}" +fi +if [ -z "${firewall_rc_config_load}" ]; then + load_rc_config ipfw +else + for i in ${firewall_rc_config_load}; do + load_rc_config $i + done +fi + +afexists inet6 +ipv6_available=$? + +############ +# Set quiet mode if requested +# +case ${firewall_quiet} in +[Yy][Ee][Ss]) + fwcmd="/sbin/ipfw -q" + ;; +*) + fwcmd="/sbin/ipfw" + ;; +esac + +############ +# Flush out the list before we begin. +# +${fwcmd} -f flush + +setup_loopback +setup_ipv6_mandatory + +############ +# Network Address Translation. All packets are passed to natd(8) +# before they encounter your remaining rules. The firewall rules +# will then be run again on each packet after translation by natd +# starting at the rule number following the divert rule. +# +# For ``simple'' firewall type the divert rule should be put to a +# different place to not interfere with address-checking rules. +# +case ${firewall_type} in +[Oo][Pp][Ee][Nn]|[Cc][Ll][Ii][Ee][Nn][Tt]) + case ${natd_enable} in + [Yy][Ee][Ss]) + if [ -n "${natd_interface}" ]; then + ${fwcmd} add 50 divert natd ip4 from any to any via ${natd_interface} + fi + ;; + esac + case ${firewall_nat_enable} in + [Yy][Ee][Ss]) + if [ -n "${firewall_nat_interface}" ]; then + if echo "${firewall_nat_interface}" | \ + grep -q -E '^[0-9]+(\.[0-9]+){0,3}$'; then + firewall_nat_flags="ip ${firewall_nat_interface} ${firewall_nat_flags}" + else + firewall_nat_flags="if ${firewall_nat_interface} ${firewall_nat_flags}" + fi + ${fwcmd} nat 123 config log ${firewall_nat_flags} + ${fwcmd} add 50 nat 123 ip4 from any to any via ${firewall_nat_interface} + fi + ;; + esac +esac + +############ +# If you just configured ipfw in the kernel as a tool to solve network +# problems or you just want to disallow some particular kinds of traffic +# then you will want to change the default policy to open. You can also +# do this as your only action by setting the firewall_type to ``open''. +# +# ${fwcmd} add 65000 pass all from any to any + + +# Prototype setups. +# +case ${firewall_type} in +[Oo][Pp][Ee][Nn]) + ${fwcmd} add 65000 pass all from any to any + ;; + +[Cc][Ll][Ii][Ee][Nn][Tt]) + ############ + # This is a prototype setup that will protect your system somewhat + # against people from outside your own network. + # + # Configuration: + # firewall_client_net: Network address of local IPv4 network. + # firewall_client_net_ipv6: Network address of local IPv6 network. + ############ + + # set this to your local network + net="$firewall_client_net" + net6="$firewall_client_net_ipv6" + + # Allow limited broadcast traffic from my own net. + ${fwcmd} add pass all from ${net} to 255.255.255.255 + + # Allow any traffic to or from my own net. + ${fwcmd} add pass all from me to ${net} + ${fwcmd} add pass all from ${net} to me + if [ -n "$net6" ]; then + ${fwcmd} add pass all from me to ${net6} + ${fwcmd} add pass all from ${net6} to me + fi + + if [ -n "$net6" ]; then + # Allow any link-local multicast traffic + ${fwcmd} add pass all from fe80::/10 to ff02::/16 + ${fwcmd} add pass all from ${net6} to ff02::/16 + # Allow DHCPv6 + ${fwcmd} add pass udp from fe80::/10 to me 546 + fi + + # Allow TCP through if setup succeeded + ${fwcmd} add pass tcp from any to any established + + # Allow IP fragments to pass through + ${fwcmd} add pass all from any to any frag + + # Allow setup of incoming email + ${fwcmd} add pass tcp from any to me 25 setup + + # Allow setup of outgoing TCP connections only + ${fwcmd} add pass tcp from me to any setup + + # Disallow setup of all other TCP connections + ${fwcmd} add deny tcp from any to any setup + + # Allow DNS queries out in the world + ${fwcmd} add pass udp from me to any 53 keep-state + + # Allow NTP queries out in the world + ${fwcmd} add pass udp from me to any 123 keep-state + + # Everything else is denied by default, unless the + # IPFIREWALL_DEFAULT_TO_ACCEPT option is set in your kernel + # config file. + ;; + +[Ss][Ii][Mm][Pp][Ll][Ee]) + ############ + # This is a prototype setup for a simple firewall. Configure this + # machine as a DNS and NTP server, and point all the machines + # on the inside at this machine for those services. + # + # Configuration: + # firewall_simple_iif: Inside IPv4 network interface. + # firewall_simple_inet: Inside IPv4 network address. + # firewall_simple_oif: Outside IPv4 network interface. + # firewall_simple_onet: Outside IPv4 network address. + # firewall_simple_iif_ipv6: Inside IPv6 network interface. + # firewall_simple_inet_ipv6: Inside IPv6 network prefix. + # firewall_simple_oif_ipv6: Outside IPv6 network interface. + # firewall_simple_onet_ipv6: Outside IPv6 network prefix. + ############ + BAD_ADDR_TBL=13 + + # set these to your outside interface network + oif="$firewall_simple_oif" + onet="$firewall_simple_onet" + oif6="${firewall_simple_oif_ipv6:-$firewall_simple_oif}" + onet6="$firewall_simple_onet_ipv6" + + # set these to your inside interface network + iif="$firewall_simple_iif" + inet="$firewall_simple_inet" + iif6="${firewall_simple_iif_ipv6:-$firewall_simple_iif}" + inet6="$firewall_simple_inet_ipv6" + + # Stop spoofing + ${fwcmd} add deny all from ${inet} to any in via ${oif} + ${fwcmd} add deny all from ${onet} to any in via ${iif} + if [ -n "$inet6" ]; then + ${fwcmd} add deny all from ${inet6} to any in via ${oif6} + if [ -n "$onet6" ]; then + ${fwcmd} add deny all from ${onet6} to any in \ + via ${iif6} + fi + fi + + # Define stuff we should never send out or receive in. + # Stop RFC1918 nets on the outside interface + ${fwcmd} table ${BAD_ADDR_TBL} flush + ${fwcmd} table ${BAD_ADDR_TBL} add 10.0.0.0/8 + ${fwcmd} table ${BAD_ADDR_TBL} add 172.16.0.0/12 + ${fwcmd} table ${BAD_ADDR_TBL} add 192.168.0.0/16 + + # And stop draft-manning-dsua-03.txt (1 May 2000) nets (includes RESERVED-1, + # DHCP auto-configuration, NET-TEST, MULTICAST (class D), and class E) + # on the outside interface + ${fwcmd} table ${BAD_ADDR_TBL} add 0.0.0.0/8 + ${fwcmd} table ${BAD_ADDR_TBL} add 169.254.0.0/16 + ${fwcmd} table ${BAD_ADDR_TBL} add 192.0.2.0/24 + ${fwcmd} table ${BAD_ADDR_TBL} add 224.0.0.0/4 + ${fwcmd} table ${BAD_ADDR_TBL} add 240.0.0.0/4 + + ${fwcmd} add deny all from any to "table($BAD_ADDR_TBL)" via ${oif} + + # Network Address Translation. This rule is placed here deliberately + # so that it does not interfere with the surrounding address-checking + # rules. If for example one of your internal LAN machines had its IP + # address set to 192.0.2.1 then an incoming packet for it after being + # translated by natd(8) would match the `deny' rule above. Similarly + # an outgoing packet originated from it before being translated would + # match the `deny' rule below. + case ${natd_enable} in + [Yy][Ee][Ss]) + if [ -n "${natd_interface}" ]; then + ${fwcmd} add divert natd ip4 from any to any via ${natd_interface} + fi + ;; + esac + + ${fwcmd} add deny all from "table($BAD_ADDR_TBL)" to any via ${oif} + if [ -n "$inet6" ]; then + # Stop unique local unicast address on the outside interface + ${fwcmd} add deny all from fc00::/7 to any via ${oif6} + ${fwcmd} add deny all from any to fc00::/7 via ${oif6} + + # Stop site-local on the outside interface + ${fwcmd} add deny all from fec0::/10 to any via ${oif6} + ${fwcmd} add deny all from any to fec0::/10 via ${oif6} + + # Disallow "internal" addresses to appear on the wire. + ${fwcmd} add deny all from ::ffff:0.0.0.0/96 to any \ + via ${oif6} + ${fwcmd} add deny all from any to ::ffff:0.0.0.0/96 \ + via ${oif6} + + # Disallow packets to malicious IPv4 compatible prefix. + ${fwcmd} add deny all from ::224.0.0.0/100 to any via ${oif6} + ${fwcmd} add deny all from any to ::224.0.0.0/100 via ${oif6} + ${fwcmd} add deny all from ::127.0.0.0/104 to any via ${oif6} + ${fwcmd} add deny all from any to ::127.0.0.0/104 via ${oif6} + ${fwcmd} add deny all from ::0.0.0.0/104 to any via ${oif6} + ${fwcmd} add deny all from any to ::0.0.0.0/104 via ${oif6} + ${fwcmd} add deny all from ::255.0.0.0/104 to any via ${oif6} + ${fwcmd} add deny all from any to ::255.0.0.0/104 via ${oif6} + + ${fwcmd} add deny all from ::0.0.0.0/96 to any via ${oif6} + ${fwcmd} add deny all from any to ::0.0.0.0/96 via ${oif6} + + # Disallow packets to malicious 6to4 prefix. + ${fwcmd} add deny all from 2002:e000::/20 to any via ${oif6} + ${fwcmd} add deny all from any to 2002:e000::/20 via ${oif6} + ${fwcmd} add deny all from 2002:7f00::/24 to any via ${oif6} + ${fwcmd} add deny all from any to 2002:7f00::/24 via ${oif6} + ${fwcmd} add deny all from 2002:0000::/24 to any via ${oif6} + ${fwcmd} add deny all from any to 2002:0000::/24 via ${oif6} + ${fwcmd} add deny all from 2002:ff00::/24 to any via ${oif6} + ${fwcmd} add deny all from any to 2002:ff00::/24 via ${oif6} + + ${fwcmd} add deny all from 2002:0a00::/24 to any via ${oif6} + ${fwcmd} add deny all from any to 2002:0a00::/24 via ${oif6} + ${fwcmd} add deny all from 2002:ac10::/28 to any via ${oif6} + ${fwcmd} add deny all from any to 2002:ac10::/28 via ${oif6} + ${fwcmd} add deny all from 2002:c0a8::/32 to any via ${oif6} + ${fwcmd} add deny all from any to 2002:c0a8::/32 via ${oif6} + + ${fwcmd} add deny all from ff05::/16 to any via ${oif6} + ${fwcmd} add deny all from any to ff05::/16 via ${oif6} + fi + + # Allow TCP through if setup succeeded + ${fwcmd} add pass tcp from any to any established + + # Allow IP fragments to pass through + ${fwcmd} add pass all from any to any frag + + # Allow setup of incoming email + ${fwcmd} add pass tcp from any to me 25 setup + + # Allow access to our DNS + ${fwcmd} add pass tcp from any to me 53 setup + ${fwcmd} add pass udp from any to me 53 + ${fwcmd} add pass udp from me 53 to any + + # Allow access to our WWW + ${fwcmd} add pass tcp from any to me 80 setup + + # Reject&Log all setup of incoming connections from the outside + ${fwcmd} add deny log ip4 from any to any in via ${oif} setup proto tcp + if [ -n "$inet6" ]; then + ${fwcmd} add deny log ip6 from any to any in via ${oif6} \ + setup proto tcp + fi + + # Allow setup of any other TCP connection + ${fwcmd} add pass tcp from any to any setup + + # Allow DNS queries out in the world + ${fwcmd} add pass udp from me to any 53 keep-state + + # Allow NTP queries out in the world + ${fwcmd} add pass udp from me to any 123 keep-state + + # Everything else is denied by default, unless the + # IPFIREWALL_DEFAULT_TO_ACCEPT option is set in your kernel + # config file. + ;; + +[Ww][Oo][Rr][Kk][Ss][Tt][Aa][Tt][Ii][Oo][Nn]) + # Configuration: + # firewall_myservices: List of ports/protocols on which this + # host offers services. + # firewall_allowservices: List of IPv4 and/or IPv6 addresses + # that have access to + # $firewall_myservices. + # firewall_trusted: List of IPv4 and/or IPv6 addresses + # that have full access to this host. + # Be very careful when setting this. + # This option can seriously degrade + # the level of protection provided by + # the firewall. + # firewall_logdeny: Boolean (YES/NO) specifying if the + # default denied packets should be + # logged (in /var/log/security). + # firewall_nologports: List of TCP/UDP ports for which + # denied incoming packets are not + # logged. + + # Allow packets for which a state has been built. + ${fwcmd} add check-state + + # For services permitted below. + ${fwcmd} add pass tcp from me to any established + + # Allow any connection out, adding state for each. + ${fwcmd} add pass tcp from me to any setup keep-state + ${fwcmd} add pass udp from me to any keep-state + ${fwcmd} add pass icmp from me to any keep-state + if [ $ipv6_available -eq 0 ]; then + ${fwcmd} add pass ipv6-icmp from me to any keep-state + fi + + # Allow DHCP. + ${fwcmd} add pass udp from 0.0.0.0 68 to 255.255.255.255 67 out + ${fwcmd} add pass udp from any 67 to me 68 in + ${fwcmd} add pass udp from any 67 to 255.255.255.255 68 in + if [ $ipv6_available -eq 0 ]; then + ${fwcmd} add pass udp from fe80::/10 to me 546 in + fi + # Some servers will ping the IP while trying to decide if it's + # still in use. + ${fwcmd} add pass icmp from any to any icmptype 8 + if [ $ipv6_available -eq 0 ]; then + ${fwcmd} add pass ipv6-icmp from any to any icmp6type 128,129 + fi + + # Allow "mandatory" ICMP in. + ${fwcmd} add pass icmp from any to any icmptype 3,4,11 + if [ $ipv6_available -eq 0 ]; then + ${fwcmd} add pass ipv6-icmp from any to any icmp6type 3 + fi + + # Add permits for this workstations published services below + # Only IPs and nets in firewall_allowservices is allowed in. + # If you really wish to let anyone use services on your + # workstation, then set "firewall_allowservices='any'" in /etc/rc.conf + # + # Note: We don't use keep-state as that would allow DoS of + # our statetable. + # You can add 'keep-state' to the lines for slightly + # better performance if you fell that DoS of your + # workstation won't be a problem. + # + for i in ${firewall_allowservices} ; do + for j in ${firewall_myservices} ; do + case $j in + [0-9A-Za-z]*/[Pp][Rr][Oo][Tt][Oo]) + ${fwcmd} add pass ${j%/[Pp][Rr][Oo][Tt][Oo]} from $i to me + ;; + [0-9A-Za-z]*/[Tt][Cc][Pp]) + ${fwcmd} add pass tcp from $i to me ${j%/[Tt][Cc][Pp]} + ;; + [0-9A-Za-z]*/[Uu][Dd][Pp]) + ${fwcmd} add pass udp from $i to me ${j%/[Uu][Dd][Pp]} + ;; + *[0-9A-Za-z]) + echo "Consider using ${j}/tcp in firewall_myservices." \ + > /dev/stderr + ${fwcmd} add pass tcp from $i to me $j + ;; + *) + echo "Invalid port in firewall_myservices: $j" > /dev/stderr + ;; + esac + done + done + + # Allow all connections from trusted IPs. + # Playing with the content of firewall_trusted could seriously + # degrade the level of protection provided by the firewall. + for i in ${firewall_trusted} ; do + ${fwcmd} add pass ip from $i to me + done + + ${fwcmd} add 65000 count ip from any to any + + # Drop packets to ports where we don't want logging + for i in ${firewall_nologports} ; do + ${fwcmd} add deny { tcp or udp } from any to any $i in + done + + # Broadcasts and multicasts + ${fwcmd} add deny ip from any to 255.255.255.255 + ${fwcmd} add deny ip from any to 224.0.0.0/24 in # XXX + + # Noise from routers + ${fwcmd} add deny udp from any to any 520 in + + # Noise from webbrowsing. + # The stateful filter is a bit aggressive, and will cause some + # connection teardowns to be logged. + ${fwcmd} add deny tcp from any 80,443 to any 1024-65535 in + + # Deny and (if wanted) log the rest unconditionally. + log="" + if [ ${firewall_logdeny:-x} = "YES" -o ${firewall_logdeny:-x} = "yes" ] ; then + log="log logamount 500" # The default of 100 is too low. + sysctl net.inet.ip.fw.verbose=1 >/dev/null + fi + ${fwcmd} add deny $log ip from any to any + ;; + +[Cc][Ll][Oo][Ss][Ee][Dd]) + ${fwcmd} add 65000 deny ip from any to any + ;; +[Uu][Nn][Kk][Nn][Oo][Ww][Nn]) + ;; +*) + if [ -r "${firewall_type}" ]; then + ${fwcmd} ${firewall_flags} ${firewall_type} + fi + ;; +esac From owner-svn-src-head@freebsd.org Wed May 22 07:40:01 2019 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 5636915A3BD8; Wed, 22 May 2019 07:40:01 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D69A971312; Wed, 22 May 2019 07:40:00 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 66B261A423; Wed, 22 May 2019 07:40:00 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4M7e0fr063216; Wed, 22 May 2019 07:40:00 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4M7e0CH063215; Wed, 22 May 2019 07:40:00 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201905220740.x4M7e0CH063215@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 22 May 2019 07:40:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348104 - in head: etc libexec/rc X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head: etc libexec/rc X-SVN-Commit-Revision: 348104 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D69A971312 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 07:40:01 -0000 Author: manu Date: Wed May 22 07:39:59 2019 New Revision: 348104 URL: https://svnweb.freebsd.org/changeset/base/348104 Log: pkgbase: Really move rc.bsdextended Messed up with git->svn in r348099 Added: head/libexec/rc/rc.bsdextended - copied unchanged from r348103, head/etc/rc.bsdextended Deleted: head/etc/rc.bsdextended Copied: head/libexec/rc/rc.bsdextended (from r348103, head/etc/rc.bsdextended) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/rc/rc.bsdextended Wed May 22 07:39:59 2019 (r348104, copy of r348103, head/etc/rc.bsdextended) @@ -0,0 +1,138 @@ +#!/bin/sh +# +# Copyright (c) 2004 Tom Rhodes +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +#### +# Sample startup policy for the mac_bsdextended(4) security module. +# +# Suck in the system configuration variables. +#### +if [ -z "${source_rc_confs_defined}" ]; then + if [ -r /etc/defaults/rc.conf ]; then + . /etc/defaults/rc.conf + source_rc_confs + elif [ -r /etc/rc.conf ]; then + . /etc/rc.conf + fi +fi + +#### +# Set ugidfw(8) to CMD: +#### +CMD=/usr/sbin/ugidfw + +#### +# WARNING: recommended reading is the handbook's MAC +# chapter and the ugidfw(8) manual page. You can +# lock yourself out of the system very quickly by setting +# incorrect values here. These are only examples. +#### + +#### +# Build a generic list of rules here, these should be +# modified before using this script. +# +# For apache to read user files, the ruleadd must give +# it permissions by default. +#### +#${CMD} add subject uid 80 object not uid 80 mode rxws; +#${CMD} add subject gid 80 object not gid 80 mode rxws; + +#### +# majordomo compat: +#${CMD} add subject uid 54 object not uid 54 mode rxws; +#${CMD} add subject gid 26 object gid 54 mode rxws; + +#### +# This is for root: +${CMD} add subject uid 0 object not uid 0 mode arxws; +${CMD} add subject gid 0 object not gid 0 mode arxws; + +#### +# And for majordomo: +#${CMD} add subject uid 54 object not uid 54 mode rxws; +#${CMD} add subject gid 54 object not gid 54 mode rxws; + +#### +# And for bin: +${CMD} add subject uid 3 object not uid 3 mode rxws; +${CMD} add subject gid 7 object not gid 7 mode rxws; + +#### +# And for mail/pop: +#${CMD} add subject uid 68 object not uid 68 mode rxws; +#${CMD} add subject gid 6 object not gid 6 mode arxws; + +#### +# And for smmsp: +${CMD} add subject uid 25 object not uid 25 mode rxws; +${CMD} add subject gid 25 object not gid 25 mode rxws; + +#### +# And for mailnull: +${CMD} add subject uid 26 object not uid 26 mode rxws; +${CMD} add subject gid 26 object not gid 26 mode rxws; + +#### +# For cyrus: +#${CMD} add subject uid 60 object not uid 60 mode rxws; +#${CMD} add subject gid 60 object not gid 60 mode rxws; + +#### +# For stunnel: +#${CMD} add subject uid 1018 object not uid 1018 mode rxws; +#${CMD} add subject gid 1018 object not gid 1018 mode rxws; + +#### +# For the nobody account: +${CMD} add subject uid 65534 object not uid 65534 mode rxws; +${CMD} add subject gid 65534 object not gid 65534 mode rxws; + +#### +# NOTICE: The next script adds a rule to allow +# access their mailbox which is owned by GID `6'. +# Removing this will give mailbox lock issues. +for x in `awk -F: '($3 >= 1001) && ($3 != 65534) { print $1 }' /etc/passwd`; + do ${CMD} add subject uid $x object gid 6 mode arwxs; +done; + +#### +# Use some script to get a list of users and +# add all users to mode n for all other users. This +# will isolate all users from other user home directories while +# permitting them to use commands and browse the system. +for x in `awk -F: '($3 >= 1001) && ($3 != 65534) { print $1 }' /etc/passwd`; + do ${CMD} add subject not uid $x object uid $x mode n; +done; + +### +# Do the same thing but only for group ids in place of +# user IDs. +for x in `awk -F: '($3 >= 1001) && ($3 != 65534) { print $3 }' /etc/passwd`; + do ${CMD} add subject not gid $x object uid $x mode n; +done; From owner-svn-src-head@freebsd.org Wed May 22 07:40:41 2019 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 31A9415A3CB4; Wed, 22 May 2019 07:40:41 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A22FF7148B; Wed, 22 May 2019 07:40:40 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7BCBA1A42C; Wed, 22 May 2019 07:40:40 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4M7eeZx063284; Wed, 22 May 2019 07:40:40 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4M7eeZV063283; Wed, 22 May 2019 07:40:40 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201905220740.x4M7eeZV063283@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 22 May 2019 07:40:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348105 - in head: etc libexec/rc X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head: etc libexec/rc X-SVN-Commit-Revision: 348105 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A22FF7148B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 07:40:41 -0000 Author: manu Date: Wed May 22 07:40:39 2019 New Revision: 348105 URL: https://svnweb.freebsd.org/changeset/base/348105 Log: pkgbase: Really move rc.sendmail Messed up with git->svn in r348100 Added: head/libexec/rc/rc.sendmail - copied unchanged from r348104, head/etc/rc.sendmail Deleted: head/etc/rc.sendmail Copied: head/libexec/rc/rc.sendmail (from r348104, head/etc/rc.sendmail) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/rc/rc.sendmail Wed May 22 07:40:39 2019 (r348105, copy of r348104, head/etc/rc.sendmail) @@ -0,0 +1,277 @@ +#!/bin/sh + +# +# Copyright (c) 2002 Gregory Neil Shapiro. All Rights Reserved. +# Copyright (c) 2000, 2002 The FreeBSD Project +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +# This script is used by /etc/rc at boot time to start sendmail. It +# is meant to be sendmail specific and not a generic script for all +# MTAs. It is only called by /etc/rc if the rc.conf mta_start_script is +# set to /etc/rc.sendmail. This provides the opportunity for other MTAs +# to provide their own startup script. + +# The script is also used by /etc/mail/Makefile to enable the +# start/stop/restart targets. + +# The source for the script can be found in src/etc/sendmail/rc.sendmail. + +if [ -r /etc/defaults/rc.conf ]; then + . /etc/defaults/rc.conf + source_rc_confs +elif [ -r /etc/rc.conf ]; then + . /etc/rc.conf +fi + +# The sendmail binary +sendmail_program=${sendmail_program:-/usr/sbin/sendmail} + +# The pid is used to stop and restart the running daemon(s). +sendmail_pidfile=${sendmail_pidfile:-/var/run/sendmail.pid} +sendmail_mspq_pidfile=${sendmail_mspq_pidfile:-/var/spool/clientmqueue/sm-client.pid} + +start_mta() +{ + case ${sendmail_enable} in + [Nn][Oo][Nn][Ee]) + ;; + [Yy][Ee][Ss]) + echo -n ' sendmail' + ${sendmail_program} ${sendmail_flags} + ;; + *) + case ${sendmail_submit_enable} in + [Yy][Ee][Ss]) + echo -n ' sendmail-submit' + ${sendmail_program} ${sendmail_submit_flags} + ;; + *) + case ${sendmail_outbound_enable} in + [Yy][Ee][Ss]) + echo -n ' sendmail-outbound' + ${sendmail_program} ${sendmail_outbound_flags} + ;; + esac + ;; + esac + ;; + esac +} + +stop_mta() +{ + # Check to make sure we are configured to start an MTA + case ${sendmail_enable} in + [Nn][Oo][Nn][Ee]) + return + ;; + [Yy][Ee][Ss]) + ;; + *) + case ${sendmail_submit_enable} in + [Yy][Ee][Ss]) + ;; + *) + case ${sendmail_outbound_enable} in + [Yy][Ee][Ss]) + ;; + *) + return + ;; + esac + ;; + esac + ;; + esac + + if [ -r ${sendmail_pidfile} ]; then + echo -n ' sendmail' + kill -TERM `head -1 ${sendmail_pidfile}` + else + echo "$0: stop-mta: ${sendmail_pidfile} not found" + fi +} + +restart_mta() +{ + # Check to make sure we are configured to start an MTA + case ${sendmail_enable} in + [Nn][Oo][Nn][Ee]) + return + ;; + [Yy][Ee][Ss]) + ;; + *) + case ${sendmail_submit_enable} in + [Yy][Ee][Ss]) + ;; + *) + case ${sendmail_outbound_enable} in + [Yy][Ee][Ss]) + ;; + *) + return + ;; + esac + ;; + esac + ;; + esac + if [ -r ${sendmail_pidfile} ]; then + echo -n ' sendmail' + kill -HUP `head -1 ${sendmail_pidfile}` + else + echo "$0: restart-mta: ${sendmail_pidfile} not found" + fi +} + +start_mspq() +{ + case ${sendmail_enable} in + [Nn][Oo][Nn][Ee]) + ;; + *) + if [ -r /etc/mail/submit.cf ]; then + case ${sendmail_msp_queue_enable} in + [Yy][Ee][Ss]) + echo -n ' sendmail-clientmqueue' + ${sendmail_program} ${sendmail_msp_queue_flags} + ;; + esac + fi + ;; + esac +} + +stop_mspq() +{ + # Check to make sure we are configured to start an MSP queue runner + case ${sendmail_enable} in + [Nn][Oo][Nn][Ee]) + return + ;; + *) + if [ -r /etc/mail/submit.cf ]; then + case ${sendmail_msp_queue_enable} in + [Yy][Ee][Ss]) + ;; + *) + return + ;; + esac + fi + ;; + esac + + if [ -r ${sendmail_mspq_pidfile} ]; then + echo -n ' sendmail-clientmqueue' + kill -TERM `head -1 ${sendmail_mspq_pidfile}` + else + echo "$0: stop-mspq: ${sendmail_mspq_pidfile} not found" + fi +} + +restart_mspq() +{ + # Check to make sure we are configured to start an MSP queue runner + case ${sendmail_enable} in + [Nn][Oo][Nn][Ee]) + return + ;; + *) + if [ -r /etc/mail/submit.cf ]; then + case ${sendmail_msp_queue_enable} in + [Yy][Ee][Ss]) + ;; + *) + return + ;; + esac + fi + ;; + esac + + if [ -r ${sendmail_mspq_pidfile} ]; then + echo -n ' sendmail-clientmqueue' + kill -HUP `head -1 ${sendmail_mspq_pidfile}` + else + echo "$0: restart-mspq: ${sendmail_mspq_pidfile} not found" + fi +} + +# If no argument is given, assume we are being called at boot time. +_action=${1:-start} + +case ${_action} in +start) + start_mta + start_mspq + ;; + +stop) + stop_mta + stop_mspq + ;; + +restart) + restart_mta + restart_mspq + ;; + +start-mta) + start_mta + ;; + +stop-mta) + stop_mta + ;; + +restart-mta) + restart_mta + ;; + +start-mspq) + start_mspq + ;; + +stop-mspq) + stop_mspq + ;; + +restart-mspq) + restart_mspq + ;; + +*) + echo "usage: `basename $0` {start|stop|restart}" >&2 + echo " `basename $0` {start-mta|stop-mta|restart-mta}" >&2 + echo " `basename $0` {start-mspq|stop-mspq|restart-mspq}" >&2 + exit 64 + ;; + +esac +exit 0 From owner-svn-src-head@freebsd.org Wed May 22 07:41:22 2019 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 E52A515A3F2A; Wed, 22 May 2019 07:41:21 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8072671791; Wed, 22 May 2019 07:41:21 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5D6971A565; Wed, 22 May 2019 07:41:21 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4M7fLvH064076; Wed, 22 May 2019 07:41:21 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4M7fL9H064075; Wed, 22 May 2019 07:41:21 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201905220741.x4M7fL9H064075@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 22 May 2019 07:41:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348106 - in head: etc share/termcap X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head: etc share/termcap X-SVN-Commit-Revision: 348106 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8072671791 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 07:41:22 -0000 Author: manu Date: Wed May 22 07:41:20 2019 New Revision: 348106 URL: https://svnweb.freebsd.org/changeset/base/348106 Log: pkgbase: Really move termcap.small Messed up with git->svn in r348101 Added: head/share/termcap/termcap.small - copied unchanged from r348105, head/etc/termcap.small Deleted: head/etc/termcap.small Copied: head/share/termcap/termcap.small (from r348105, head/etc/termcap.small) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/termcap/termcap.small Wed May 22 07:41:20 2019 (r348106, copy of r348105, head/etc/termcap.small) @@ -0,0 +1,315 @@ +# Copyright (c) 1980, 1985, 1989 The Regents of the University of California. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. All advertising materials mentioning features or use of this software +# must display the following acknowledgement: +# This product includes software developed by the University of +# California, Berkeley and its contributors. +# 4. Neither the name of the University nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# @(#)termcap.src 5.88 (Berkeley) 4/30/91 +# $FreeBSD$ +# +# for syscons +# common entry without semigraphics +cons25w|ansiw|ansi80x25-raw:\ + :am:bs:NP:ms:pt:AX:eo:bw:ut:km:\ + :co#80:li#25:pa#64:Co#8:it#8:\ + :al=\E[L:cd=\E[J:ce=\E[K:cl=\E[H\E[J:cm=\E[%i%d;%dH:\ + :dc=\E[P:dl=\E[M:do=\E[B:bt=\E[Z:ho=\E[H:ic=\E[@:cb=\E[1K:\ + :nd=\E[C:rs=\Ec:so=\E[7m:se=\E[27m:up=\E[A:cr=^M:ta=^I:\ + :AF=\E[3%dm:AB=\E[4%dm:op=\E[39;49m:sc=\E7:rc=\E8:\ + :k1=\E[M:k2=\E[N:k3=\E[O:k4=\E[P:k5=\E[Q:k6=\E[R:k7=\E[S:k8=\E[T:\ + :k9=\E[U:k;=\E[V:F1=\E[W:F2=\E[X:K2=\E[E:nw=\E[E:ec=\E[%dX:\ + :kb=^H:kh=\E[H:ku=\E[A:kd=\E[B:kl=\E[D:kr=\E[C:le=^H:sf=\E[S:sr=\E[T:\ + :kN=\E[G:kP=\E[I:@7=\E[F:kI=\E[L:kD=\177:kB=\E[Z:\ + :IC=\E[%d@:DC=\E[%dP:SF=\E[%dS:SR=\E[%dT:AL=\E[%dL:DL=\E[%dM:\ + :DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:cv=\E[%i%dd:ch=\E[%i%d`:\ + :mb=\E[5m:md=\E[1m:mr=\E[7m:me=\E[m:bl=^G:\ + :ve=\E[=S:vi=\E[=1S:vs=\E[=2S: +# CP437 FreeBSD console with ACS support +cons25|ansis|ansi80x25:\ + :ac=l\332m\300k\277j\331u\264t\303v\301w\302q\304x\263n\305`^Da\260f\370g\361~\371.^Y-^Xh\261i^U0\333y\363z\362:\ + :tc=cons25w: +cons25-m|ansis-mono|ansi80x25-mono:\ + :pa@:Co@:AF@:AB@:AX@:op@:us=\E[4m:ue=\E[24m:tc=cons25: +cons30|ansi80x30:\ + :li#30:tc=cons25: +cons30-m|ansi80x30-mono:\ + :li#30:tc=cons25-m: +cons43|ansi80x43:\ + :li#43:tc=cons25: +cons43-m|ansi80x43-mono:\ + :li#43:tc=cons25-m: +cons50|ansil|ansi80x50:\ + :li#50:tc=cons25: +cons50-m|ansil-mono|ansi80x50-mono:\ + :li#50:tc=cons25-m: +cons60|ansi80x60:\ + :li#60:tc=cons25: +cons60-m|ansi80x60-mono:\ + :li#60:tc=cons25-m: +# Syscons console with 132 characters (VESA modes) +cons25-w|ansi132x25:\ + :co#132:tc=cons25: +cons30-w|ansi132x30:\ + :co#132:tc=cons30: +cons43-w|ansi132x43:\ + :co#132:tc=cons43: +cons50-w|ansil-w|ansi132x50:\ + :co#132:tc=cons50: +cons60-w|ansi132x60:\ + :co#132:tc=cons60: +# KOI8-R/KOI8-U FreeBSD console with ACS support +cons25r|cons25u|pc3r|ibmpc3r|cons25-koi8:\ + :ac=q\200x\201m\204v\211j\205t\206n\212u\207l\202w\210k\203y\230z\231f\234~\225a\220h\2210\215:\ + :tc=cons25w: +cons25r-m|cons25u-m|pc3r-m|ibmpc3r-mono|cons25-koi8-mono:\ + :pa@:Co@:AF@:AB@:AX@:op@:us=\E[4m:ue=\E[24m:tc=cons25r: +cons30r|cons30u|cons30-koi8:\ + :li#30:tc=cons25r: +cons30r-m|cons30u-m|cons30-koi8-mono:\ + :li#30:tc=cons25r-m: +cons43r|cons43u|cons43-koi8:\ + :li#43:tc=cons25r: +cons43r-m|cons43u-m|cons43-koi8-mono:\ + :li#43:tc=cons25r-m: +cons50r|cons50u|cons50-koi8:\ + :li#50:tc=cons25r: +cons50r-m|cons50u-m|cons50-koi8-mono:\ + :li#50:tc=cons25r-m: +cons60r|cons60u|cons60-koi8:\ + :li#60:tc=cons25r: +cons60r-m|cons60u-m|cons60-koi8-mono:\ + :li#60:tc=cons25r-m: +# Syscons console with 90 characters (VGA modes) +# KOI8-R/KOI8-U FreeBSD console with ACS support. +cons25r-v|cons25u-v|pc3r-v|ibmpc3r-vga|cons25-koi8-vga:\ + :co#90:tc=cons25r: +cons25r-mv|cons25u-mv|pc3r-mv|ibmpc3r-monovga|cons25-koi8-monovga:\ + :co#90:tc=cons25r-m: +cons30r-v|cons30u-v|cons30-koi8-vga:\ + :co#90:tc=cons30r: +cons30r-mv|cons30u-mv|cons30-koi8-monovga:\ + :co#90:tc=cons30r-m: +cons43r-v|cons43u-v|cons43-koi8-vga:\ + :co#90:tc=cons43r: +cons43r-mv|cons43u-mv|cons43-koi8-monovga:\ + :co#90:tc=cons43r-m: +cons50r-v|cons50u-v|cons50-koi8-vga:\ + :co#90:tc=cons50r: +cons50r-mv|cons50u-mv|cons50-koi8-monovga:\ + :co#90:tc=cons50r-m: +cons60r-v|cons60u-v|cons60-koi8-vga:\ + :co#90:tc=cons60r: +cons60r-mv|cons60u-mv|cons60-koi8-monovga:\ + :co#90:tc=cons60r-m: +# ISO 8859-2 FreeBSD console with ACS support +cons25l2|cons25-iso8859-2:\ + :ac=f\260i\247:\ + :tc=cons25w: +cons25l2-m|cons25-iso8859-2-mono:\ + :pa@:Co@:AF@:AB@:AX@:op@:us=\E[4m:ue=\E[24m:tc=cons25l2: +cons30l2|cons30-iso8859-2:\ + :li#30:tc=cons25l2: +cons30l2-m|cons30-iso8859-2-mono:\ + :li#30:tc=cons25l2-m: +cons43l2|cons43-iso8859-2:\ + :li#43:tc=cons25l2: +cons43l2-m|cons43-iso8859-2-mono:\ + :li#43:tc=cons25l2-m: +cons50l2|cons50-iso8859-2:\ + :li#50:tc=cons25l2: +cons50l2-m|cons50-iso8859-2-mono:\ + :li#50:tc=cons25l2-m: +cons60l2|cons60-iso8859-2:\ + :li#60:tc=cons25l2: +cons60l2-m|cons60-iso8859-2-mono:\ + :li#60:tc=cons25l2-m: +# ISO 8859-1 FreeBSD console with ACS support +cons25l1|cons25-iso8859-1:\ + :ac=f\260g\261}\243+\253,\273i\247:\ + :tc=cons25w: +cons25l1-m|cons25-iso8859-1-mono:\ + :pa@:Co@:AF@:AB@:AX@:op@:us=\E[4m:ue=\E[24m:tc=cons25l1: +cons30l1|cons30-iso8859-1:\ + :li#30:tc=cons25l1: +cons30l1-m|cons30-iso8859-1-mono:\ + :li#30:tc=cons25l1-m: +cons43l1|cons43-iso8859-1:\ + :li#43:tc=cons25l1: +cons43l1-m|cons43-iso8859-1-mono:\ + :li#43:tc=cons25l1-m: +cons50l1|cons50-iso8859-1:\ + :li#50:tc=cons25l1: +cons50l1-m|cons50-iso8859-1-mono:\ + :li#50:tc=cons25l1-m: +cons60l1|cons60-iso8859-1:\ + :li#60:tc=cons25l1: +cons60l1-m|cons60-iso8859-1-mono:\ + :li#60:tc=cons25l1-m: +# 132x25 ISO 8859-1 FreeBSD console +cons25l1-w|cons25w-iso8859-1:\ + :co#132:tc=cons25l1: +cons30l1-w|cons30w-iso8859-1:\ + :co#132:tc=cons30l1: +cons43l1-w|cons43w-iso8859-1:\ + :co#132:tc=cons43l1: +cons50l1-w|cons50w-iso8859-1:\ + :co#132:tc=cons50l1: +cons60l1-w|cons60w-iso8859-1:\ + :co#132:tc=cons60l1: +# ISO 8859-7 FreeBSD console with ACS support +cons25l7|cons25-iso8859-7:\ + :ac=f\260g\261{\360}\243+\253,\273i\247:\ + :tc=cons25w: +cons25l7-m|cons25-iso8859-7-mono:\ + :pa@:Co@:AF@:AB@:AX@:op@:us=\E[4m:ue=\E[24m:tc=cons25l7: +cons30l7|cons30-iso8859-7:\ + :li#30:tc=cons25l7: +cons30l7-m|cons30-iso8859-7-mono:\ + :li#30:tc=cons25l7-m: +cons43l7|cons43-iso8859-7:\ + :li#43:tc=cons25l7: +cons43l7-m|cons43-iso8859-7-mono:\ + :li#43:tc=cons25l7-m: +cons50l7|cons50-iso8859-7:\ + :li#50:tc=cons25l7: +cons50l7-m|cons50-iso8859-7-mono:\ + :li#50:tc=cons25l7-m: +cons60l7|cons60-iso8859-7:\ + :li#60:tc=cons25l7: +cons60l7-m|cons60-iso8859-7-mono:\ + :li#60:tc=cons25l7-m: + +SC|screen|VT 100/ANSI X3.64 virtual terminal:\ + :am:xn:ms:mi:G0:km:\ + :DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:bs:bt=\E[Z:\ + :cb=\E[1K:cd=\E[J:ce=\E[K:cl=\E[H\E[J:cm=\E[%i%d;%dH:ct=\E[3g:\ + :do=^J:nd=\E[C:pt:rc=\E8:rs=\Ec:sc=\E7:st=\EH:up=\EM:\ + :le=^H:bl=^G:cr=^M:it#8:ho=\E[H:nw=\EE:ta=^I:is=\E)0:\ + :li#24:co#80:us=\E[4m:ue=\E[24m:so=\E[3m:se=\E[23m:\ + :mb=\E[5m:md=\E[1m:mr=\E[7m:me=\E[m:sr=\EM:al=\E[L:\ + :AL=\E[%dL:dl=\E[M:DL=\E[%dM:cs=\E[%i%d;%dr:dc=\E[P:\ + :DC=\E[%dP:im=\E[4h:ei=\E[4l:IC=\E[%d@:\ + :ks=\E[?1h\E=:ke=\E[?1l\E>:vb=\Eg:\ + :ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:kb=^H:\ + :k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\E[15~:k6=\E[17~:\ + :k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:F1=\E[23~:F2=\E[24~:\ + :F3=\E[25~:F4=\E[26~:F5=\E[28~:F6=\E[29~:\ + :F7=\E[31~:F8=\E[32~:F9=\E[33~:FA=\E[34~:\ + :kh=\E[1~:kI=\E[2~:kD=\E[3~:@7=\E[4~:kP=\E[5~:\ + :kN=\E[6~:eA=\E(B\E)0:as=^N:ae=^O:ti=\E[?1049h:te=\E[?1049l:\ + :vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l:\ + :Co#8:pa#64:AF=\E[3%dm:AB=\E[4%dm:op=\E[39;49m:AX:\ + :ac=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~..--++,,hhII00: + +vt100|dec-vt100|vt100-am|vt100am|dec vt100:\ + :do=2\E[B:co#80:li#24:cl=50\E[H\E[J:sf=2*\ED:\ + :le=^H:bs:am:cm=5\E[%i%d;%dH:nd=2\E[C:up=2\E[A:\ + :ce=3\E[K:cd=50\E[J:so=2\E[7m:se=2\E[m:us=2\E[4m:ue=2\E[m:\ + :md=2\E[1m:mr=2\E[7m:mb=2\E[5m:me=2\E[m:\ + :is=\E>\E[?1;3;4;5l\E[?7;8h\E[1;24r\E[24;1H:\ + :if=/usr/share/tabset/vt100:nw=2\EE:ho=\E[H:\ + :as=2\E(0:ae=2\E(B:\ + :ac=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||:\ + :rs=\E>\E[?1;3;4;5l\E[?7;8h:ks=\E[?1h\E=:ke=\E[?1l\E>:\ + :ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:kb=\177:\ + :k0=\EOy:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\EOt:\ + :k6=\EOu:k7=\EOv:k8=\EOl:k9=\EOw:k;=\EOx:@8=\EOM:\ + :K1=\EOq:K2=\EOr:K3=\EOs:K4=\EOp:K5=\EOn:pt:sr=2*\EM:xn:\ + :sc=2\E7:rc=2\E8:cs=5\E[%i%d;%dr:UP=2\E[%dA:DO=2\E[%dB:RI=2\E[%dC:\ + :LE=2\E[%dD:ct=2\E[3g:st=2\EH:ta=^I:ms:bl=^G:cr=^M:eo:it#8:\ + :RA=\E[?7l:SA=\E[?7h:po=\E[5i:pf=\E[4i: + +# $XTermId: termcap,v 1.78 2009/11/09 00:24:26 tom Exp $ +# +xterm-new|modern xterm:\ + :@7=\EOF:@8=\EOM:F1=\E[23~:F2=\E[24~:K2=\EOE:Km=\E[M:\ + :k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\E[15~:k6=\E[17~:\ + :k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:kI=\E[2~:\ + :kN=\E[6~:kP=\E[5~:kd=\EOB:kh=\EOH:kl=\EOD:kr=\EOC:ku=\EOA:\ + :tc=xterm-basic: +# +# This chunk is used for building the VT220/Sun/PC keyboard variants. +xterm-basic|modern xterm common:\ + :am:bs:km:mi:ms:ut:xn:AX:\ + :Co#8:co#80:kn#12:li#24:pa#64:\ + :AB=\E[4%dm:AF=\E[3%dm:AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:\ + :DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:ae=\E(B:al=\E[L:\ + :as=\E(0:bl=^G:cd=\E[J:ce=\E[K:cl=\E[H\E[2J:\ + :cm=\E[%i%d;%dH:cs=\E[%i%d;%dr:ct=\E[3g:dc=\E[P:dl=\E[M:\ + :ei=\E[4l:ho=\E[H:im=\E[4h:is=\E[!p\E[?3;4l\E[4l\E>:\ + :kD=\E[3~:kb=^H:ke=\E[?1l\E>:ks=\E[?1h\E=:le=^H:md=\E[1m:\ + :me=\E[m:ml=\El:mr=\E[7m:mu=\Em:nd=\E[C:op=\E[39;49m:\ + :rc=\E8:rs=\E[!p\E[?3;4l\E[4l\E>:sc=\E7:se=\E[27m:sf=^J:\ + :so=\E[7m:sr=\EM:st=\EH:\ + :ue=\E[24m:up=\E[A:us=\E[4m:ve=\E[?12l\E[?25h:vi=\E[?25l:vs=\E[?12;25h: +# +# This is the only entry which you should have to customize, since "xterm" +# is widely used for a variety of incompatible terminal emulations including +# color_xterm and rxvt. +xterm|X11 terminal emulator:\ + :tc=xterm-new: +# +# Add the capability to "clear the screen" after exiting vi, more/less, etc. +xterm-clear:\ + :te=\E[?1049l:ti=\E[?1049h:\ + :tc=xterm-new: +# +# This should work for the commonly used "color xterm" variations (XFree86 +# xterm, color_xterm, nxterm, rxvt). Note that it does not set 'bce', so for +# XFree86 and rxvt, some applications that use colors will be less efficient, +# and in a few special cases (with "smart" optimization) the wrong color will +# be painted in spots. +xterm-color|generic "ANSI" color xterm:\ + :Co#8:NC@:pa#64:\ + :AB=\E[4%dm:AF=\E[3%dm:ac=:op=\E[m:tc=xterm-r6: +# +# Compatible with the X11R6.3 xterm +xterm-r6|xterm-old|X11R6 xterm:\ + :am:bs:km:mi:ms:pt:xn:\ + :co#80:kn#20:li#24:\ + :*6=\E[4~:@0=\E[1~:@7=\E[4~:AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:\ + :DO=\E[%dB:F1=\E[23~:F2=\E[24~:F3=\E[25~:F4=\E[26~:\ + :F5=\E[28~:F6=\E[29~:F7=\E[31~:F8=\E[32~:F9=\E[33~:\ + :FA=\E[34~:LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:ae=^O:al=\E[L:\ + :as=^N:bl=^G:cd=\E[J:ce=\E[K:cl=\E[H\E[2J:cm=\E[%i%d;%dH:\ + :cs=\E[%i%d;%dr:ct=\E[3g:dc=\E[P:dl=\E[M:eA=\E)0:ei=\E[4l:\ + :ho=\E[H:im=\E[4h:\ + :is=\E[m\E[?7h\E[4l\E>\E7\E[r\E[?1;3;4;6l\E8:\ + :k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~:k5=\E[15~:\ + :k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:\ + :kD=\E[3~:kI=\E[2~:kN=\E[6~:kP=\E[5~:kb=^H:kd=\EOB:\ + :ke=\E[?1l\E>:kh=\E[1~:kl=\EOD:kr=\EOC:ks=\E[?1h\E=:\ + :ku=\EOA:md=\E[1m:me=\E[m:ml=\El:mr=\E[7m:mu=\Em:nd=\E[C:\ + :rc=\E8:rs=\E[m\E[?7h\E[4l\E>\E7\E[r\E[?1;3;4;6l\E8:\ + :sc=\E7:se=\E[m:sf=^J:so=\E[7m:sr=\EM:\ + :ue=\E[m:up=\E[A:us=\E[4m: +# +# Add the capability to "clear the screen" after exiting vi, more/less, etc. +xterm-r6-clear:\ + :te=\E[2J\E[?47l\E8:ti=\E7\E[?47h:ue=\E[m:\ + :tc=xterm-r6: From owner-svn-src-head@freebsd.org Wed May 22 07:42:00 2019 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 7A54F15A3FF0; Wed, 22 May 2019 07:42:00 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 160F571997; Wed, 22 May 2019 07:42:00 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2F0331A5BD; Wed, 22 May 2019 07:41:59 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4M7fxCd064872; Wed, 22 May 2019 07:41:59 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4M7fx8B064871; Wed, 22 May 2019 07:41:59 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201905220741.x4M7fx8B064871@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 22 May 2019 07:41:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348107 - in head: etc usr.bin/login X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head: etc usr.bin/login X-SVN-Commit-Revision: 348107 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 160F571997 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 07:42:00 -0000 Author: manu Date: Wed May 22 07:41:58 2019 New Revision: 348107 URL: https://svnweb.freebsd.org/changeset/base/348107 Log: pkgbase: Really move login.access Messed up with git->svn r348102 Added: head/usr.bin/login/login.access - copied unchanged from r348106, head/etc/login.access Deleted: head/etc/login.access Copied: head/usr.bin/login/login.access (from r348106, head/etc/login.access) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/login/login.access Wed May 22 07:41:58 2019 (r348107, copy of r348106, head/etc/login.access) @@ -0,0 +1,46 @@ +# $FreeBSD$ +# +# Login access control table. +# +# When someone logs in, the table is scanned for the first entry that +# matches the (user, host) combination, or, in case of non-networked +# logins, the first entry that matches the (user, tty) combination. The +# permissions field of that table entry determines whether the login will +# be accepted or refused. +# +# Format of the login access control table is three fields separated by a +# ":" character: +# +# permission : users : origins +# +# The first field should be a "+" (access granted) or "-" (access denied) +# character. The second field should be a list of one or more login names, +# group names, or ALL (always matches). The third field should be a list +# of one or more tty names (for non-networked logins), host names, domain +# names (begin with "."), host addresses, internet network numbers (end +# with "."), ALL (always matches) or LOCAL (matches any string that does +# not contain a "." character). If you run NIS you can use @netgroupname +# in host or user patterns. +# +# The EXCEPT operator makes it possible to write very compact rules. +# +# The group file is searched only when a name does not match that of the +# logged-in user. Only groups are matched in which users are explicitly +# listed: the program does not look at a user's primary group id value. +# +############################################################################## +# +# Disallow console logins to all but a few accounts. +# +#-:ALL EXCEPT wheel shutdown sync:console +# +# Disallow non-local logins to privileged accounts (group wheel). +# +#-:wheel:ALL EXCEPT LOCAL .win.tue.nl +# +# Some accounts are not allowed to login from anywhere: +# +#-:wsbscaro wsbsecr wsbspac wsbsym wscosor wstaiwde:ALL +# +# All other accounts are allowed to login from anywhere. +# From owner-svn-src-head@freebsd.org Wed May 22 08:30:04 2019 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 AC66415A56DF; Wed, 22 May 2019 08:30:04 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C67873797; Wed, 22 May 2019 08:30:04 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 258DD1AD06; Wed, 22 May 2019 08:30:04 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4M8U478089727; Wed, 22 May 2019 08:30:04 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4M8U46a089726; Wed, 22 May 2019 08:30:04 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201905220830.x4M8U46a089726@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 22 May 2019 08:30:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348108 - head/sys/dev/acpica X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/dev/acpica X-SVN-Commit-Revision: 348108 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4C67873797 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 08:30:04 -0000 Author: avg Date: Wed May 22 08:30:03 2019 New Revision: 348108 URL: https://svnweb.freebsd.org/changeset/base/348108 Log: acpi_hpet: restore support for timers defined only in HPET table This fixes a regress introduced in r339754. After that change the code required that there is a HPET device in the ACPI namespace. The problem has been noticed on an PC Engines apu2 system. While here, fix a small formatting issue. Modified: head/sys/dev/acpica/acpi_hpet.c Modified: head/sys/dev/acpica/acpi_hpet.c ============================================================================== --- head/sys/dev/acpica/acpi_hpet.c Wed May 22 07:41:58 2019 (r348107) +++ head/sys/dev/acpica/acpi_hpet.c Wed May 22 08:30:03 2019 (r348108) @@ -455,9 +455,12 @@ hpet_probe(device_t dev) ACPI_FUNCTION_TRACE((char *)(uintptr_t) __func__); if (acpi_disabled("hpet") || acpi_hpet_disabled) return (ENXIO); - rv = ACPI_ID_PROBE(device_get_parent(dev), dev, hpet_ids, NULL); + if (acpi_get_handle(dev) != NULL) + rv = ACPI_ID_PROBE(device_get_parent(dev), dev, hpet_ids, NULL); + else + rv = 0; if (rv <= 0) - device_set_desc(dev, "High Precision Event Timer"); + device_set_desc(dev, "High Precision Event Timer"); return (rv); } From owner-svn-src-head@freebsd.org Wed May 22 11:40:40 2019 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 7861915A8CF7; Wed, 22 May 2019 11:40:40 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5C71A81351; Wed, 22 May 2019 11:40:39 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lj1-f174.google.com with SMTP id q62so1762582ljq.7; Wed, 22 May 2019 04:40:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=HLtUwxY+E3uTFdbmdDz8sLBN02WZkNWNe5M2MMN5XJY=; b=ZrOonggtxOwD5K+NreLjuMMY/QkzAwFXzUGA+ALGdAfLipf/ghZrHhhD2FYu2JDmnZ rzr04AW14jeFaEo2ifuXCwwUrU8dNv8RdBN/EvIuHRrAVBt1Mn3Nz0SXkhYaQXXRNR5a oVMF49lWb5V3lfQ68sHCznw8lOYbh8TZMMiHA/NEr1ofD1t/hg7byXGaOWKzZRLquFDP xgqFu1qz0Mibmi5EAYI4qh7VRUEbyWvVRK2dMextHWtUNzgadPdXUnQazD5bXxi5+R4h R605JsIhvToacB1FuKQ6BWEbTF+Zt6Rbdh4KVvx9XCOMcjMls0AuPbAmt+DU2H4FBLC+ rogw== X-Gm-Message-State: APjAAAWOaLzpcCb8xbcvMLcc00Z9ivPhFHSa9ZL7TFqkQ+k05EZKZiHG U75RhG2ZFvciqwLg/OUgcWrPCU+Q X-Google-Smtp-Source: APXvYqwp56o3gPY+hzAuSrReczvG5spQWDUMF/QWlaSUdvHGIUa/idePZjFN2YcBFlZ3WtzwDXTyJw== X-Received: by 2002:a2e:9dc6:: with SMTP id x6mr23236430ljj.27.1558525231523; Wed, 22 May 2019 04:40:31 -0700 (PDT) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id o18sm5140918lfb.61.2019.05.22.04.40.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 May 2019 04:40:30 -0700 (PDT) Subject: Re: svn commit: r336547 - in head/etc: defaults rc.d To: Ian Lepore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201807201359.w6KDxT1p087000@repo.freebsd.org> From: Andriy Gapon Openpgp: preference=signencrypt Autocrypt: addr=avg@FreeBSD.org; prefer-encrypt=mutual; keydata= xsFNBFm4LIgBEADNB/3lT7f15UKeQ52xCFQx/GqHkSxEdVyLFZTmY3KyNPQGBtyvVyBfprJ7 mAeXZWfhat6cKNRAGZcL5EmewdQuUfQfBdYmKjbw3a9GFDsDNuhDA2QwFt8BmkiVMRYyvI7l N0eVzszWCUgdc3qqM6qqcgBaqsVmJluwpvwp4ZBXmch5BgDDDb1MPO8AZ2QZfIQmplkj8Y6Z AiNMknkmgaekIINSJX8IzRzKD5WwMsin70psE8dpL/iBsA2cpJGzWMObVTtCxeDKlBCNqM1i gTXta1ukdUT7JgLEFZk9ceYQQMJJtUwzWu1UHfZn0Fs29HTqawfWPSZVbulbrnu5q55R4PlQ /xURkWQUTyDpqUvb4JK371zhepXiXDwrrpnyyZABm3SFLkk2bHlheeKU6Yql4pcmSVym1AS4 dV8y0oHAfdlSCF6tpOPf2+K9nW1CFA8b/tw4oJBTtfZ1kxXOMdyZU5fiG7xb1qDgpQKgHUX8 7Rd2T1UVLVeuhYlXNw2F+a2ucY+cMoqz3LtpksUiBppJhw099gEXehcN2JbUZ2TueJdt1FdS ztnZmsHUXLxrRBtGwqnFL7GSd6snpGIKuuL305iaOGODbb9c7ne1JqBbkw1wh8ci6vvwGlzx rexzimRaBzJxlkjNfMx8WpCvYebGMydNoeEtkWldtjTNVsUAtQARAQABzR5BbmRyaXkgR2Fw b24gPGF2Z0BGcmVlQlNELm9yZz7CwZQEEwEIAD4WIQS+LEO7ngQnXA4Bjr538m7TUc1yjwUC WbgsiAIbIwUJBaOagAULCQgHAgYVCAkKCwIEFgIDAQIeAQIXgAAKCRB38m7TUc1yj+JAEACV l9AK/nOWAt/9cufV2fRj0hdOqB1aCshtSrwHk/exXsDa4/FkmegxXQGY+3GWX3deIyesbVRL rYdtdK0dqJyT1SBqXK1h3/at9rxr9GQA6KWOxTjUFURsU7ok/6SIlm8uLRPNKO+yq0GDjgaO LzN+xykuBA0FlhQAXJnpZLcVfPJdWv7sSHGedL5ln8P8rxR+XnmsA5TUaaPcbhTB+mG+iKFj GghASDSfGqLWFPBlX/fpXikBDZ1gvOr8nyMY9nXhgfXpq3B6QCRYKPy58ChrZ5weeJZ29b7/ QdEO8NFNWHjSD9meiLdWQaqo9Y7uUxN3wySc/YUZxtS0bhAd8zJdNPsJYG8sXgKjeBQMVGuT eCAJFEYJqbwWvIXMfVWop4+O4xB+z2YE3jAbG/9tB/GSnQdVSj3G8MS80iLS58frnt+RSEw/ psahrfh0dh6SFHttE049xYiC+cM8J27Aaf0i9RflyITq57NuJm+AHJoU9SQUkIF0nc6lfA+o JRiyRlHZHKoRQkIg4aiKaZSWjQYRl5Txl0IZUP1dSWMX4s3XTMurC/pnja45dge/4ESOtJ9R 8XuIWg45Oq6MeIWdjKddGhRj3OohsltKgkEU3eLKYtB6qRTQypHHUawCXz88uYt5e3w4V16H lCpSTZV/EVHnNe45FVBlvK7k7HFfDDkryM7BTQRZuCyIARAAlq0slcsVboY/+IUJdcbEiJRW be9HKVz4SUchq0z9MZPX/0dcnvz/gkyYA+OuM78dNS7Mbby5dTvOqfpLJfCuhaNYOhlE0wY+ 1T6Tf1f4c/uA3U/YiadukQ3+6TJuYGAdRZD5EqYFIkreARTVWg87N9g0fT9BEqLw9lJtEGDY EWUE7L++B8o4uu3LQFEYxcrb4K/WKmgtmFcm77s0IKDrfcX4doV92QTIpLiRxcOmCC/OCYuO jB1oaaqXQzZrCutXRK0L5XN1Y1PYjIrEzHMIXmCDlLYnpFkK+itlXwlE2ZQxkfMruCWdQXye syl2fynAe8hvp7Mms9qU2r2K9EcJiR5N1t1C2/kTKNUhcRv7Yd/vwusK7BqJbhlng5ZgRx0m WxdntU/JLEntz3QBsBsWM9Y9wf2V4tLv6/DuDBta781RsCB/UrU2zNuOEkSixlUiHxw1dccI 6CVlaWkkJBxmHX22GdDFrcjvwMNIbbyfQLuBq6IOh8nvu9vuItup7qemDG3Ms6TVwA7BD3j+ 3fGprtyW8Fd/RR2bW2+LWkMrqHffAr6Y6V3h5kd2G9Q8ZWpEJk+LG6Mk3fhZhmCnHhDu6CwN MeUvxXDVO+fqc3JjFm5OxhmfVeJKrbCEUJyM8ESWLoNHLqjywdZga4Q7P12g8DUQ1mRxYg/L HgZY3zfKOqcAEQEAAcLBfAQYAQgAJhYhBL4sQ7ueBCdcDgGOvnfybtNRzXKPBQJZuCyIAhsM BQkFo5qAAAoJEHfybtNRzXKPBVwQAKfFy9P7N3OsLDMB56A4Kf+ZT+d5cIx0Yiaf4n6w7m3i ImHHHk9FIetI4Xe54a2IXh4Bq5UkAGY0667eIs+Z1Ea6I2i27Sdo7DxGwq09Qnm/Y65ADvXs 3aBvokCcm7FsM1wky395m8xUos1681oV5oxgqeRI8/76qy0hD9WR65UW+HQgZRIcIjSel9vR XDaD2HLGPTTGr7u4v00UeTMs6qvPsa2PJagogrKY8RXdFtXvweQFz78NbXhluwix2Tb9ETPk LIpDrtzV73CaE2aqBG/KrboXT2C67BgFtnk7T7Y7iKq4/XvEdDWscz2wws91BOXuMMd4c/c4 OmGW9m3RBLufFrOag1q5yUS9QbFfyqL6dftJP3Zq/xe+mr7sbWbhPVCQFrH3r26mpmy841ym dwQnNcsbIGiBASBSKksOvIDYKa2Wy8htPmWFTEOPRpFXdGQ27awcjjnB42nngyCK5ukZDHi6 w0qK5DNQQCkiweevCIC6wc3p67jl1EMFY5+z+zdTPb3h7LeVnGqW0qBQl99vVFgzLxchKcl0 R/paSFgwqXCZhAKMuUHncJuynDOP7z5LirUeFI8qsBAJi1rXpQoLJTVcW72swZ42IdPiboqx NbTMiNOiE36GqMcTPfKylCbF45JNX4nF9ElM0E+Y8gi4cizJYBRr2FBJgay0b9Cp Message-ID: <6b966875-23f5-28cf-9e65-7c30974eef05@FreeBSD.org> Date: Wed, 22 May 2019 14:40:29 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <201807201359.w6KDxT1p087000@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 5C71A81351 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of agapon@gmail.com designates 209.85.208.174 as permitted sender) smtp.mailfrom=agapon@gmail.com X-Spamd-Result: default: False [-4.17 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[FreeBSD.org]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-1.26)[ip: (-0.50), ipnet: 209.85.128.0/17(-3.47), asn: 15169(-2.27), country: US(-0.06)]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.90)[-0.898,0]; RCVD_IN_DNSWL_NONE(0.00)[174.208.85.209.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FORGED_SENDER(0.30)[avg@FreeBSD.org,agapon@gmail.com]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[avg@FreeBSD.org,agapon@gmail.com] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 11:40:40 -0000 Something I've just noticed about this commit: On 20/07/2018 16:59, Ian Lepore wrote: > Author: ian > Date: Fri Jul 20 13:59:29 2018 > New Revision: 336547 > URL: https://svnweb.freebsd.org/changeset/base/336547 > > Log: > Automatically run ntpd as non-root when possible. [snip] > +ntpd_precmd() > +{ > + local driftopt > + > + # If we can run as a non-root user, switch uid to ntpd and use the > + # new default location for the driftfile inside the ntpd-owned dir. > + # Otherwise, figure out what to do about the driftfile option. If set > + # by the admin, we don't add the option. If the file exists in the old > + # default location we use that, else we use the new default location. > + if can_run_nonroot; then > + _user="ntpd" > + driftopt="-f ${_ntp_default_driftfile}" > + elif [ -z "${rc_flags##*-f*}" ] || > + [ -z "${rc_flags##*--driftfile*}" ] || It seems that the two checks above produce a false positive if rc_flags is empty already. And that's the case on a system that I recently brought up (very recent CURRENT via source install). /etc/defaults/rc.conf has ntpd_flags="". As a result ntpd is started without the drift file option. And the stock /etc/ntp.conf also does not have the directive. > + grep -q "^[ \t]*driftfile" "${ntpd_config}"; then > + driftopt="" # admin set the option, we don't need to add it. > + elif [ -f "${_ntp_old_driftfile}" ]; then > + driftopt="-f ${_ntp_old_driftfile}" > + else > + driftopt="-f ${_ntp_default_driftfile}" > fi -- Andriy Gapon From owner-svn-src-head@freebsd.org Wed May 22 12:42:35 2019 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 A72DE15AB22D; Wed, 22 May 2019 12:42:35 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: from mail-qk1-x730.google.com (mail-qk1-x730.google.com [IPv6:2607:f8b0:4864:20::730]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B80E483D13; Wed, 22 May 2019 12:42:34 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: by mail-qk1-x730.google.com with SMTP id p18so1353383qkk.0; Wed, 22 May 2019 05:42:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to; bh=ZpGT3Fq1B4qZ1a7PN+uQrqHrd7dZfr5Hn2A9AFmgBfU=; b=Fl/QEnLtLcSVVBYTQKfbsqVuffesAMrLZatwA35h3SKq/rt79mROEj2LCGKtTySMZU Jz9QOWEl+7Xl+g4iWrRyr42hGedBmaKLP8iBlGoZ9vb85cvpAsXKzKJyB/5yY7q8bUGe WJ9XfPyEDYnSYpte5Jwtjja8blftFG4tjrRBhJnxN6d2DGDouW7n09fjHPnAYFypBPMJ lq/lQMtTQItYtJsFAOyi9/JF4oIKCoMJ7P+LrgMDDc12v4P5JR6YEJ6VcEsuQOnoiLMn vWQq/uLct/U8BZ4fpQnlf38KvZy/wnf0A3niGxcPR5mX3AF42PtzF9WrIdzdll87d+Cv mM0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:openpgp :autocrypt:message-id:date:user-agent:mime-version:in-reply-to; bh=ZpGT3Fq1B4qZ1a7PN+uQrqHrd7dZfr5Hn2A9AFmgBfU=; b=I3H0HoefJ+sMeP5B+A3W4OCrPksYo3ATRr97VuYnK5K26wCOuRHr04vextvlW3pDu7 kS1jt/7blJZBt0ciAinpPDBT2frLseLdAQP6XT0F2xQWwJuBAL8OfaufEwY4g7ojF/bu i6VDY24/L6kQgCob6M/DtMi7I2AC+U5WdHilYznCD0nUVJAFGRr81c7YM/xz6wjbCX1Z RSed5zef7gV3L2hCau8Qpc1g9hvgEfMABFvQhkp9uKUTO3AKt43JiB2PSbjAZ5Zox+Hr DRHCh8u5ngHgsj4YkWg3o/1uVXNLtGBfuvwWtEfV+S3iZK5OxmUEpnRnb7QWGGiuTcHA VBWQ== X-Gm-Message-State: APjAAAUmIEu1DNHymiYF9lTtzQ7XiRBxJvFDig4oVnUjf//9ZlUCnW3E OCCBeg9T+K6x9gJfJFkMbKrjAcEM X-Google-Smtp-Source: APXvYqxPtAm/jrGbfntsLDNvHR8wxiMOaqrW9i6Y/wXZR5iDhPc6Hw0sUpXBt0UGxXJd/n9avf6flw== X-Received: by 2002:a05:620a:1670:: with SMTP id d16mr1427380qko.288.1558528954024; Wed, 22 May 2019 05:42:34 -0700 (PDT) Received: from mbp-eth.home ([2804:f1c:800:fc00:643a:afe3:8082:5268]) by smtp.gmail.com with ESMTPSA id d58sm18255820qtb.11.2019.05.22.05.42.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 May 2019 05:42:32 -0700 (PDT) Sender: Renato Botelho Subject: Re: svn commit: r347961 - head To: Brad Davis , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201905181936.x4IJaNir001183@repo.freebsd.org> From: Renato Botelho Openpgp: preference=signencrypt Autocrypt: addr=garga@FreeBSD.org; prefer-encrypt=mutual; keydata= mQENBFn4ZqUBCACxJRWi57JkmsCrSU0gZd/CwB+B90OTUeXmF63lDPETOQ+pBA4+vJgzjW1C pv7rR25wxvESJKphxZJOOk9AXTXsg5QrhdP3+KQG/zNcKd2ukbt3ezkhdMx8q81wn4wY2oTl WXdGIVdDKvC8sCp1fc6pPKJin71/skb9wg6ThtlRFlv9en4f8QSVmRuzRKQ6VjCbl+yIpiye /I5BQ4I99uouPzPhzf9ya3cvp4xbiw5wSo1F3nLsThBT2osYy/nRNz2ciuCYyyX87dGhio0T 8Pxl37eBbGQvCGwPQBApCcfoiZBN/5F65Tt4p72gIqT+AYuqq5G7Bhj+fGTC7q0QotL/ABEB AAG0LFJlbmF0byBCb3RlbGhvIChGcmVlQlNEKSA8Z2FyZ2FARnJlZUJTRC5vcmc+iQFXBBMB CgBBAhsDBQkFo5qABQsJCAcDBRUKCQgLBRYDAgEAAh4BAheAFiEExxiLNMqsn7yXmTy7W54E w5ZrhhoFAln4aeUCGQEACgkQW54Ew5ZrhhpTIwf+OS+Gv/ITOy7+8D+8SKXNmkfczsTO+Uqz 6SraXcq32j1C4QcRQCwGPhVJJgKnFSvPm3kbNPFXaQh1zD+mTQ4r/Loc78Rz+fZljYcgNx7n aQKhd9pdpXaELOe+Y10jvGUrT0SE06Y10BP/NmQaLplt9qG8VgLAAB9ZcsuZ9pzbBbQjd9In OK5VcXQzHT/EBBQ1rHsl1Aq8TYdmjbKl+HKc1c8dJ5OfXrgnTIUwQdN1rauXbmH/YW/CKN7z zF59v/sPBTaWfFl2CS/BORhWhe1PBudrVZWFT0oJGNuG6k8dlnssoL/0ojFaN5w5xm8mvMAf uAuixGf4bK6C7hcE34D/ULkBDQRZ+GalAQgApiTibUM0OpeCcxf5YUep4F4y853ClU4TMqZO +ho38sz0GdshQWuBEBqahOtxapHUMtlmC+wJNCBAav5JYjHHrXXE9pgRm5EgVssDpMvplLB4 5CFdx5jBu02Bt9Wp5bD21TPH3rsYJUB3rYmxWfVmdRhNBERrCJu49OIsBSKAlIinx8altYrh Z7bO2C1hKOG6QHWRr4ml4HTD/gZ6TTfsrR+sktBNv/5ZRkcJNDVM+eOGagXkEUOVFe9KXynD 3KcZBbBKpwoaW5GK8OglKJt8ggUfc78CG1xk4b5nL8QCk0CBrC6VPPOYvXTpYSTHmx1QkElm 1iNu1Tc5ccvcyAwTswARAQABiQE8BBgBCgAmFiEExxiLNMqsn7yXmTy7W54Ew5ZrhhoFAln4 ZqUCGwwFCQWjmoAACgkQW54Ew5ZrhhoH3wf+KuIeDyvIJOui+0C5FD5r44Bwkj/SAUVUerfp 0qtRktc+BZoSifPs3Rqjh/PpwRvLTuJnSsiqWLz8NCTThogRzVqEcQHqZR3vOjtYM60sjYJ+ BGQl/bjm1C/YtWEEmKs7mJc+02U8qJA4rbNKSRRRoz6XngnuN6YC0fkeD7c7rxRhOg6OWasZ JinB9+dO1IH7eZ5c97v518qSaLRp0T7I+FpEGOp7tTFHaepZWEnuojr5D6jI1MOEywy0EWJu 3m0TYlh935I8o7gLABqoHEmUeW7JK7r91SZaFnr8zQ6XOAxkPh50uFMTNtNZTnM7k1pRv5Ov fms0VzARITYzTwmpDQ== Message-ID: <47ad59b3-5adf-20bf-5dcc-23da82610cea@FreeBSD.org> Date: Wed, 22 May 2019 09:42:29 -0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <201905181936.x4IJaNir001183@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="RexGqtS0a1CdPsbaAyA9Xn7PK6szj97j0" X-Rspamd-Queue-Id: B80E483D13 X-Spamd-Bar: -------- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=Fl/QEnLt; spf=pass (mx1.freebsd.org: domain of gargabsd@gmail.com designates 2607:f8b0:4864:20::730 as permitted sender) smtp.mailfrom=gargabsd@gmail.com X-Spamd-Result: default: False [-8.30 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; HAS_ATTACHMENT(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-1.00)[-0.997,0]; SIGNED_PGP(-2.00)[]; FORGED_SENDER(0.30)[garga@FreeBSD.org,gargabsd@gmail.com]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FROM_NEQ_ENVFROM(0.00)[garga@FreeBSD.org,gargabsd@gmail.com]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; TAGGED_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.20)[multipart/signed,multipart/mixed,text/plain]; DMARC_NA(0.00)[FreeBSD.org]; IP_SCORE(-2.99)[ip: (-9.35), ipnet: 2607:f8b0::/32(-3.26), asn: 15169(-2.27), country: US(-0.06)]; RCVD_IN_DNSWL_NONE(0.00)[0.3.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 12:42:35 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --RexGqtS0a1CdPsbaAyA9Xn7PK6szj97j0 Content-Type: multipart/mixed; boundary="1V69Y7efo5iSUg3r6A3RGUEI8LRoFEXIr"; protected-headers="v1" From: Renato Botelho To: Brad Davis , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <47ad59b3-5adf-20bf-5dcc-23da82610cea@FreeBSD.org> Subject: Re: svn commit: r347961 - head References: <201905181936.x4IJaNir001183@repo.freebsd.org> In-Reply-To: <201905181936.x4IJaNir001183@repo.freebsd.org> --1V69Y7efo5iSUg3r6A3RGUEI8LRoFEXIr Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 18/05/19 16:36, Brad Davis wrote: > Author: brd > Date: Sat May 18 19:36:23 2019 > New Revision: 347961 > URL: https://svnweb.freebsd.org/changeset/base/347961 >=20 > Log: > Add note to UPDATING for users of mergemaster after the move of maste= r.passwd > and group in r347638. > =20 > Approved by: allanjude (mentor) >=20 > Modified: > head/UPDATING >=20 > Modified: head/UPDATING > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/UPDATING Sat May 18 19:32:38 2019 (r347960) > +++ head/UPDATING Sat May 18 19:36:23 2019 (r347961) > @@ -31,6 +31,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: > disable the most expensive debugging functionality run > "ln -s 'abort:false,junk:false' /etc/malloc.conf".) > =20 > +20190517: > + For users of mergemaster, after recent changes to locations of > + master.passwd and group in the source tree mergemaster needs to be > + updated. Before running `mergemaster -p', cd to usr.sbin/mergemaster= > + and run `make install'. > + etcupdate is installing group and master.passwd to /lib/libc/gen. It seems wrong. root@x230:/usr/src # etcupdate -p A /lib/libc/gen/group A /lib/libc/gen/master.passwd --=20 Renato Botelho --1V69Y7efo5iSUg3r6A3RGUEI8LRoFEXIr-- --RexGqtS0a1CdPsbaAyA9Xn7PK6szj97j0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQGTBAEBCgB9FiEExxiLNMqsn7yXmTy7W54Ew5ZrhhoFAlzlQ7ZfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEM3 MTg4QjM0Q0FBQzlGQkM5Nzk5M0NCQjVCOUUwNEMzOTY2Qjg2MUEACgkQW54Ew5Zr hhqSWAf7BJ/1EpLKOmRNI1tzYp/Ea92DQxXtPkWTORWkLkg/w/dQ1L1c6Flu4ZAZ 18w20fcUoJU7MgrvEpFkR5yzk2EpWulQAJIMkkmHCXDl3ZJGto6Ilw3vSMiA3cqa loXRPsmyDUm3cDGTbKeAJuR861zCQJ5DEg/65Vrw4yaAJ1UB+55TGtY40whuJt80 o6R+w1oU3RhOKkNjst1hTmwT5rV6i3PFpy0KuZ8fV1qlPOPKw0rfsruXLBc5VdYL mHw2ssMKxdp7psUNPfaKwHJhkts4z9AqNepRv+vZFTs7B6whvE67F78OVu8fDRrb Bs3dPDYpcZRlUrftGyXiIngbIByf/w== =OJLu -----END PGP SIGNATURE----- --RexGqtS0a1CdPsbaAyA9Xn7PK6szj97j0-- From owner-svn-src-head@freebsd.org Wed May 22 12:48:23 2019 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 06FD815AB427; Wed, 22 May 2019 12:48:23 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9BDAE84058; Wed, 22 May 2019 12:48:22 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 72B8D1334B; Wed, 22 May 2019 12:48:22 +0000 (UTC) Date: Wed, 22 May 2019 12:48:22 +0000 From: Alexey Dokuchaev To: Renato Botelho Cc: Brad Davis , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r347961 - head Message-ID: <20190522124822.GA99369@FreeBSD.org> References: <201905181936.x4IJaNir001183@repo.freebsd.org> <47ad59b3-5adf-20bf-5dcc-23da82610cea@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47ad59b3-5adf-20bf-5dcc-23da82610cea@FreeBSD.org> User-Agent: Mutt/1.11.4 (2019-03-13) X-Rspamd-Queue-Id: 9BDAE84058 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.955,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 12:48:23 -0000 On Wed, May 22, 2019 at 09:42:29AM -0300, Renato Botelho wrote: > On 18/05/19 16:36, Brad Davis wrote: > > New Revision: 347961 > > URL: https://svnweb.freebsd.org/changeset/base/347961 > > > > Log: > > Add note to UPDATING for users of mergemaster after the move of > > master.passwd and group in r347638. > > > > Approved by: allanjude (mentor) > > > > Modified: > > head/UPDATING > > > > +20190517: > > + For users of mergemaster, after recent changes to locations of > > + master.passwd and group in the source tree mergemaster needs to be > > + updated. Before running `mergemaster -p', cd to usr.sbin/mergemaster > > + and run `make install'. > > + > > etcupdate is installing group and master.passwd to /lib/libc/gen. It > seems wrong. > > root@x230:/usr/src # etcupdate -p > A /lib/libc/gen/group > A /lib/libc/gen/master.passwd *facepalm* Let me ask again: why these files were moved out of their perfectly (and likely the only) reasonable location (etc/) under some cryptic libc/gen/ which not only makes little sense per se, but also breaks mergemaster(8) and similar tools? ./danfe From owner-svn-src-head@freebsd.org Wed May 22 13:11:12 2019 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 89F3C15ABCF3; Wed, 22 May 2019 13:11:12 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) (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 1ACC785253; Wed, 22 May 2019 13:11:12 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [10.1.1.2] (Seawolf.HML3.ScaleEngine.net [209.51.186.28]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id D258F19E94; Wed, 22 May 2019 13:11:10 +0000 (UTC) Subject: Re: svn commit: r348073 - head/lib/libmd To: rgrimes@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201905212303.x4LN3bMd081422@gndrsh.dnsmgr.net> From: Allan Jude Openpgp: preference=signencrypt Autocrypt: addr=allanjude@freebsd.org; prefer-encrypt=mutual; keydata= mQINBFVwZcYBEADwrZDH0xe0ZVjc9ORCc6PcBLwS/RTXA6NkvpD6ea02pZ8lPOVgteuuugFc D34LdDbiWr+479vfrKBh+Y38GL0oZ0/13j10tIlDMHSa5BU0y6ACtnhupFvVlQ57+XaJAb/q 7qkfSiuxVwQ3FY3PL3cl1RrIP5eGHLA9hu4eVbu+FOX/q/XVKz49HaeIaxzo2Q54572VzIo6 C28McX9m65UL5fXMUGJDDLCItLmehZlHsQQ+uBxvODLFpVV2lUgDR/0rDa0B9zHZX8jY8qQ7 ZdCSy7CwClXI054CkXZCaBzgxYh/CotdI8ezmaw7NLs5vWNTxaDEFXaFMQtMVhvqQBpHkfOD 7rjjOmFw00nJL4FuPE5Yut0CPyx8vLjVmNJSt/Y8WxxmhutsqJYFgYfWl/vaWkrFLur/Zcmz IklwLw35HLsCZytCN5A3rGKdRbQjD6QPXOTJu0JPrJF6t2xFkWAT7oxnSV0ELhl2g+JfMMz2 Z1PDmS3NRnyEdqEm7NoRGXJJ7bgxDbN+9SXTyOletqGNXj/bSrBvhvZ0RQrzdHAPwQUfVSU2 qBhQEi2apSZstgVNMan0GUPqCdbE2zpysg+zT7Yhvf9EUQbzPL4LpdK1llT9fZbrdMzEXvEF oSvwJFdV3sqKmZc7b+E3PuxK6GTsKqaukd/3Cj8aLHG1T1im1QARAQABtCJBbGxhbiBKdWRl IDxhbGxhbmp1ZGVAZnJlZWJzZC5vcmc+iQI/BBMBAgApBQJVcGXGAhsjBQkSzAMABwsJCAcD AgEGFQgCCQoLBBYCAwECHgECF4AACgkQGZU1PhKYC34Muw/+JOKpSfhhysWFYiRXynGRDe07 Z6pVsn7DzrPUMRNZfHu8Uujmmy3p2nx9FelIY9yjd2UKHhug+whM54MiIFs90eCRVa4XEsPR 4FFAm0DAWrrb7qhZFcE/GhHdRWpZ341WAElWf6Puj2devtRjfYbikvj5+1V1QmDbju7cEw5D mEET44pTuD2VMRJpu2yZZzkM0i+wKFuPxlhqreufA1VNkZXI/rIfkYWK+nkXd9Efw3YdCyCQ zUgTUCb88ttSqcyhik/li1CDbXBpkzDCKI6I/8fAb7jjOC9LAtrZJrdgONywcVFoyK9ZN7EN AVA+xvYCmuYhR/3zHWH1g4hAm1v1+gIsufhajhfo8/wY1SetlzPaYkSkVQLqD8T6zZyhf+AN bC7ci44UsiKGAplB3phAXrtSPUEqM86kbnHg3fSx37kWKUiYNOnx4AC2VXvEiKsOBlpyt3dw WQbOtOYM+vkfbBwDtoGOOPYAKxc4LOIt9r+J8aD+gTooi9Eo5tvphATf9WkCpl9+aaGbSixB tUpvQMRnSMqTqq4Z7DeiG6VMRQIjsXDSLJEUqcfhnLFo0Ko/RiaHd5xyAQ4DhQ9QpkyQjjNf /3f/dYG7JAtoD30txaQ5V8uHrz210/77DRRX+HJjEj6xCxWUGvQgvEZf5XXyxeePvqZ+zQyT DX61bYw6w6a5Ag0EVXBlxgEQAMy7YVnCCLN4oAOBVLZ5nUbVPvpUhsdA94/0/P+uqCIh28Cz ar56OCX0X19N/nAWecxL4H32zFbIRyDB2V/MEh4p9Qvyu/j4i1r3Ex5GhOT2hnit43Ng46z5 29Es4TijrHJP4/l/rB2VOqMKBS7Cq8zk1cWqaI9XZ59imxDNjtLLPPM+zQ1yE3OAMb475QwN UgWxTMw8rkA7CEaqeIn4sqpTSD5C7kT1Bh26+rbgJDZ77D6Uv1LaCZZOaW52okW3bFbdozV8 yM2u+xz2Qs8bHz67p+s+BlygryiOyYytpkiK6Iy4N7FTolyj5EIwCuqzfk0SaRHeOKX2ZRjC qatkgoD/t13PNT38V9tw3qZVOJDS0W6WM8VSg+F+bkM9LgJ8CmKV+Hj0k3pfGfYPOZJ/v18i +SmZmL/Uw2RghnwDWGAsPCKu4uZR777iw7n9Io6Vfxndw2dcS0e9klvFYoaGS6H2F13Asygr WBzFNGFQscN4mUW+ZYBzpTOcHkdT7w8WS55BmXYLna+dYer9/HaAuUrONjujukN4SPS1fMJ2 /CS/idAUKyyVVX5vozoNK2JVC1h1zUAVsdnmhEzNPsvBoqcVNfyqBFROEVLIPwq+lQMGNVjH ekLTKRWf59MEhUC2ztjSKkGmwdg73d6xSXMuq45EgIJV2wPvOgWQonoHH/kxABEBAAGJAiUE GAECAA8FAlVwZcYCGwwFCRLMAwAACgkQGZU1PhKYC34w5A//YViBtZyDV5O+SJT9FFO3lb9x Zdxf0trA3ooCt7gdBkdnBM6T5EmjgVZ3KYYyFfwXZVkteuCCycMF/zVw5eE9FL1+zz9gg663 nY9q2F77TZTKXVWOLlOV2bY+xaK94U4ytogOGhh9b4UnQ/Ct3+6aviCF78Go608BXbmF/GVT 7uhddemk7ItxM1gE5Hscx3saxGKlayaOsdPKeGTVJCDEtHDuOc7/+jGh5Zxpk/Hpi+DUt1ot 8e6hPYLIQa4uVx4f1xxxV858PQ7QysSLr9pTV7FAQ18JclCaMc7JWIa3homZQL/MNKOfST0S 2e+msuRwQo7AnnfFKBUtb02KwpA4GhWryhkjUh/kbVc1wmGxaU3DgXYQ5GV5+Zf4kk/wqr/7 KG0dkTz6NLCVLyDlmAzuFhf66DJ3zzz4yIo3pbDYi3HB/BwJXVSKB3Ko0oUo+6/qMrOIS02L s++QE/z7K12CCcs7WwOjfCYHK7VtE0Sr/PfybBdTbuDncOuAyAIeIKxdI2nmQHzl035hhvQX s4CSghsP319jAOQiIolCeSbTMD4QWMK8RL/Pe1FI1jC3Nw9s+jq8Dudtbcj2UwAP/STUEbJ9 5rznzuuhPjE0e++EU/RpWmcaIMK/z1zZDMN+ce2v1qzgV936ZhJ3iaVzyqbEE81gDxg3P+IM kiYh4ZtPB4Q= Message-ID: Date: Wed, 22 May 2019 09:11:06 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <201905212303.x4LN3bMd081422@gndrsh.dnsmgr.net> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3BoRBk4dGJi2pjtPiUsIpwHBIUSXw6UF5" X-Rspamd-Queue-Id: 1ACC785253 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.94 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.944,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 13:11:12 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --3BoRBk4dGJi2pjtPiUsIpwHBIUSXw6UF5 Content-Type: multipart/mixed; boundary="CXgCs5BHiKKJpNbRVX8o4ctM0P9GHf0JJ"; protected-headers="v1" From: Allan Jude To: rgrimes@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r348073 - head/lib/libmd References: <201905212303.x4LN3bMd081422@gndrsh.dnsmgr.net> In-Reply-To: <201905212303.x4LN3bMd081422@gndrsh.dnsmgr.net> --CXgCs5BHiKKJpNbRVX8o4ctM0P9GHf0JJ Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 2019-05-21 19:03, Rodney W. Grimes wrote: >> Author: allanjude >> Date: Tue May 21 22:17:00 2019 >> New Revision: 348073 >> URL: https://svnweb.freebsd.org/changeset/base/348073 >> >> Log: >> Add admonitions against using MD5 and SHA1 to the API man pages >> >> Modified: >> head/lib/libmd/mdX.3 >> head/lib/libmd/sha.3 >> >> Modified: head/lib/libmd/mdX.3 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/lib/libmd/mdX.3 Tue May 21 22:11:53 2019 (r348072) >> +++ head/lib/libmd/mdX.3 Tue May 21 22:17:00 2019 (r348073) >> @@ -208,6 +208,8 @@ This code is derived directly from these implement= atio >> .Pp >> Phk ristede runen. >> .Sh BUGS >> -No method is known to exist which finds two files having the same has= h value, >> -nor to find a file with a specific hash value. >> -There is on the other hand no guarantee that such a method does not e= xist. >> +The >> +.Tn MD5 >=20 > There needs to be a discussion about .Tn, some people are ripping > them out of man pages, others are adding them. mandoc is a semantic > mark up language, .Tn gives the following word the semantic of being > a Tradename. >=20 > Yes, I know, mandoc ignroes them BUTT other tools do not, mandoc is > not the end all in what can process our man pages, groff/troff should > still be able to produce photo typesetter output and the .Tn's look > nice when you do that. >=20 > I would like to see that we stop removing them and infact, as this > man page does, properly recognize trademarks/names in our man pages > "as is often required by law." >=20 > Now, one final nit, I can neither verify nor deny that "MD5" is > a tradename. >=20 >> +algorithm has been proven to be vulnerable to practical collision >> +attacks and should not be relied upon to produce unique outputs, >> +.Em nor should they be used as part of a cryptographic signature sche= me. >> >> Modified: head/lib/libmd/sha.3 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/lib/libmd/sha.3 Tue May 21 22:11:53 2019 (r348072) >> +++ head/lib/libmd/sha.3 Tue May 21 22:17:00 2019 (r348073) >> @@ -191,9 +191,11 @@ published >> .Tn FIPS >> standards. >> .Sh BUGS >> -No method is known to exist which finds two files having the same has= h value, >> -nor to find a file with a specific hash value. >> -There is on the other hand no guarantee that such a method does not e= xist. >> +The >> +.Tn SHA1 >> +algorithm has been proven to be vulnerable to practical collision >> +attacks and should not be relied upon to produce unique outputs, >> +.Em nor should they be used as part of a cryptographic signature sche= me. >> .Pp >> The >> .Tn IA32 >> >> >=20 I borrowed the message (with .Tn markup) from the md5(1) man page, and just added it to the library reference man pages since they said 'No method is known to exist which finds two files having the same hash value' which has not been true in a while. I did not spend any effort deciding which markup to use there, as I don't think MD5 or SHA1 are tradenames, just acronyms. --=20 Allan Jude --CXgCs5BHiKKJpNbRVX8o4ctM0P9GHf0JJ-- --3BoRBk4dGJi2pjtPiUsIpwHBIUSXw6UF5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (MingW32) iQIcBAEBAgAGBQJc5UpuAAoJEBmVNT4SmAt+BfoP+wRmgomDHpFGbcqCufhkMuPD zm81SjiK3Yce9sYAHKDffejoOnPPoahMlcPCPLfL4Yr00TK41j1tnbALm3p67Jh0 mowaLUCmj4r1XvaYCeEWDVEzVOUXmenCo/KPC4aFuGnjJmlsP4bFPx2pCJi1QoTd kYgAYTG2N3VrkHDUneQV7WqmJh0+JVlJxwVoWigXTkjlRo/hATRroBhw45JFj8oo QzI7hl5X6ThglaluJAkpYEOQcPOBzMKCDScwqdZImYr2Hkf1BwpFSySmsf20zimA 5F33ebv7Wv2e8zBpI9wji58vr+CCtOUN4NnpXw29XRl6u+97z8jXBWxboocG92cJ 4JEt4zeI1Rprwphkn5SSes8WPb0FjWYe04tBLTsSKVFokMb05v3B0zp9Ofa4q8qI COGqABicQ+SH1qr0+43xeqc0HyHW2YmE/InOtj3nRYNKsffYs6GRUe2Cg63ET5RC 13YyLIHGo0mkn8XylyqsmqRC947tshoLc2M6mzzqZpDFqbyXbxrdCQrcFRqozbtt 48/tIZzFHz1GBUB++RTi99Fy7luon8On2WUy+jyqY43WzSze0lfoNe5LvfqXvtr6 +AQwotytelfpu6AwuMClRmzNXlyn6t05F9QxgvJhfEXaOYrb9eL5MJpK2s0LYZWU cMZRjGt1hH52XZRBlqzP =N3oy -----END PGP SIGNATURE----- --3BoRBk4dGJi2pjtPiUsIpwHBIUSXw6UF5-- From owner-svn-src-head@freebsd.org Wed May 22 13:44:17 2019 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 4AC8315AC9F5; Wed, 22 May 2019 13:44:17 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E25B88662E; Wed, 22 May 2019 13:44:16 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9DB851E3DB; Wed, 22 May 2019 13:44:16 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4MDiG2d056471; Wed, 22 May 2019 13:44:16 GMT (envelope-from gallatin@FreeBSD.org) Received: (from gallatin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4MDiGGV056469; Wed, 22 May 2019 13:44:16 GMT (envelope-from gallatin@FreeBSD.org) Message-Id: <201905221344.x4MDiGGV056469@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gallatin set sender to gallatin@FreeBSD.org using -f From: Andrew Gallatin Date: Wed, 22 May 2019 13:44:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348109 - in head/sys/x86: include x86 X-SVN-Group: head X-SVN-Commit-Author: gallatin X-SVN-Commit-Paths: in head/sys/x86: include x86 X-SVN-Commit-Revision: 348109 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E25B88662E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 13:44:17 -0000 Author: gallatin Date: Wed May 22 13:44:15 2019 New Revision: 348109 URL: https://svnweb.freebsd.org/changeset/base/348109 Log: x86 MCA: introduce MCA hooks for different vendor implementations This is needed for AMD SMCA processors, as SMCA uses different MSR address for access MCA banks. Use IA32 specific msr_ops as defualt, and use SMCA-specific msr_ops when on an SMCA-enabled processor Submitted by: chandu from amd dot com Reviewed by: cem Differential Revision: https://reviews.freebsd.org/D18055 Modified: head/sys/x86/include/specialreg.h head/sys/x86/x86/mca.c Modified: head/sys/x86/include/specialreg.h ============================================================================== --- head/sys/x86/include/specialreg.h Wed May 22 08:30:03 2019 (r348108) +++ head/sys/x86/include/specialreg.h Wed May 22 13:44:15 2019 (r348109) @@ -944,6 +944,16 @@ #define MC_MISC_AMD_PTR_MASK 0x00000000ff000000 /* Pointer to additional registers */ #define MC_MISC_AMD_PTR_SHIFT 24 +/* AMD Scalable MCA */ +#define MSR_SMCA_MC0_CTL 0xc0002000 +#define MSR_SMCA_MC0_STATUS 0xc0002001 +#define MSR_SMCA_MC0_ADDR 0xc0002002 +#define MSR_SMCA_MC0_MISC0 0xc0002003 +#define MSR_SMCA_MC_CTL(x) (MSR_SMCA_MC0_CTL + 0x10 * (x)) +#define MSR_SMCA_MC_STATUS(x) (MSR_SMCA_MC0_STATUS + 0x10 * (x)) +#define MSR_SMCA_MC_ADDR(x) (MSR_SMCA_MC0_ADDR + 0x10 * (x)) +#define MSR_SMCA_MC_MISC(x) (MSR_SMCA_MC0_MISC0 + 0x10 * (x)) + /* * The following four 3-byte registers control the non-cacheable regions. * These registers must be written as three separate bytes. Modified: head/sys/x86/x86/mca.c ============================================================================== --- head/sys/x86/x86/mca.c Wed May 22 08:30:03 2019 (r348108) +++ head/sys/x86/x86/mca.c Wed May 22 13:44:15 2019 (r348109) @@ -90,6 +90,13 @@ struct mca_internal { STAILQ_ENTRY(mca_internal) link; }; +struct mca_enumerator_ops { + unsigned int (*ctl)(int); + unsigned int (*status)(int); + unsigned int (*addr)(int); + unsigned int (*misc)(int); +}; + static MALLOC_DEFINE(M_MCA, "MCA", "Machine Check Architecture"); static volatile int mca_count; /* Number of records stored. */ @@ -124,6 +131,61 @@ static struct taskqueue *mca_tq; static struct task mca_refill_task, mca_scan_task; static struct mtx mca_lock; +static unsigned int +mca_ia32_ctl_reg(int bank) +{ + return (MSR_MC_CTL(bank)); +} + +static unsigned int +mca_ia32_status_reg(int bank) +{ + return (MSR_MC_STATUS(bank)); +} + +static unsigned int +mca_ia32_addr_reg(int bank) +{ + return (MSR_MC_ADDR(bank)); +} + +static unsigned int +mca_ia32_misc_reg(int bank) +{ + return (MSR_MC_MISC(bank)); +} + +static unsigned int +mca_smca_ctl_reg(int bank) +{ + return (MSR_SMCA_MC_CTL(bank)); +} + +static unsigned int +mca_smca_status_reg(int bank) +{ + return (MSR_SMCA_MC_STATUS(bank)); +} + +static unsigned int +mca_smca_addr_reg(int bank) +{ + return (MSR_SMCA_MC_ADDR(bank)); +} + +static unsigned int +mca_smca_misc_reg(int bank) +{ + return (MSR_SMCA_MC_MISC(bank)); +} + +static struct mca_enumerator_ops mca_msr_ops = { + .ctl = mca_ia32_ctl_reg, + .status = mca_ia32_status_reg, + .addr = mca_ia32_addr_reg, + .misc = mca_ia32_misc_reg +}; + #ifdef DEV_APIC static struct cmc_state **cmc_state; /* Indexed by cpuid, bank. */ static struct amd_et_state **amd_et_state; /* Indexed by cpuid, bank. */ @@ -462,7 +524,7 @@ mca_check_status(int bank, struct mca_record *rec) uint64_t status; u_int p[4]; - status = rdmsr(MSR_MC_STATUS(bank)); + status = rdmsr(mca_msr_ops.status(bank)); if (!(status & MC_STATUS_VAL)) return (0); @@ -471,10 +533,10 @@ mca_check_status(int bank, struct mca_record *rec) rec->mr_bank = bank; rec->mr_addr = 0; if (status & MC_STATUS_ADDRV) - rec->mr_addr = rdmsr(MSR_MC_ADDR(bank)); + rec->mr_addr = rdmsr(mca_msr_ops.addr(bank)); rec->mr_misc = 0; if (status & MC_STATUS_MISCV) - rec->mr_misc = rdmsr(MSR_MC_MISC(bank)); + rec->mr_misc = rdmsr(mca_msr_ops.misc(bank)); rec->mr_tsc = rdtsc(); rec->mr_apic_id = PCPU_GET(apic_id); rec->mr_mcg_cap = rdmsr(MSR_MCG_CAP); @@ -488,7 +550,7 @@ mca_check_status(int bank, struct mca_record *rec) * errors so that the BIOS can see them. */ if (!(rec->mr_status & (MC_STATUS_PCC | MC_STATUS_UC))) { - wrmsr(MSR_MC_STATUS(bank), 0); + wrmsr(mca_msr_ops.status(bank), 0); do_cpuid(0, p); } return (1); @@ -648,7 +710,7 @@ amd_thresholding_update(enum scan_mode mode, int bank, int count; cc = &amd_et_state[PCPU_GET(cpuid)][bank]; - misc = rdmsr(MSR_MC_MISC(bank)); + misc = rdmsr(mca_msr_ops.misc(bank)); count = (misc & MC_MISC_AMD_CNT_MASK) >> MC_MISC_AMD_CNT_SHIFT; count = count - (MC_MISC_AMD_CNT_MAX - cc->cur_threshold); @@ -660,7 +722,7 @@ amd_thresholding_update(enum scan_mode mode, int bank, misc |= (uint64_t)(MC_MISC_AMD_CNT_MAX - cc->cur_threshold) << MC_MISC_AMD_CNT_SHIFT; misc &= ~MC_MISC_AMD_OVERFLOW; - wrmsr(MSR_MC_MISC(bank), misc); + wrmsr(mca_msr_ops.misc(bank), misc); if (mode == CMCI && valid) cc->last_intr = time_uptime; } @@ -978,7 +1040,7 @@ amd_thresholding_start(struct amd_et_state *cc, int ba KASSERT(amd_elvt >= 0, ("ELVT offset is not set")); - misc = rdmsr(MSR_MC_MISC(bank)); + misc = rdmsr(mca_msr_ops.misc(bank)); misc &= ~MC_MISC_AMD_INT_MASK; misc |= MC_MISC_AMD_INT_LVT; @@ -993,7 +1055,7 @@ amd_thresholding_start(struct amd_et_state *cc, int ba misc &= ~MC_MISC_AMD_OVERFLOW; misc |= MC_MISC_AMD_CNTEN; - wrmsr(MSR_MC_MISC(bank), misc); + wrmsr(mca_msr_ops.misc(bank), misc); } static void @@ -1011,7 +1073,7 @@ amd_thresholding_monitor(int i) return; /* The counter must be valid and present. */ - misc = rdmsr(MSR_MC_MISC(i)); + misc = rdmsr(mca_msr_ops.misc(i)); if ((misc & (MC_MISC_AMD_VAL | MC_MISC_AMD_CNTP)) != (MC_MISC_AMD_VAL | MC_MISC_AMD_CNTP)) return; @@ -1119,6 +1181,12 @@ _mca_init(int boot) if ((mask & (1UL << 5)) == 0) wrmsr(MSR_MC0_CTL_MASK, mask | (1UL << 5)); } + if (amd_rascap & AMDRAS_SCALABLE_MCA) { + mca_msr_ops.ctl = mca_smca_ctl_reg; + mca_msr_ops.status = mca_smca_status_reg; + mca_msr_ops.addr = mca_smca_addr_reg; + mca_msr_ops.misc = mca_smca_misc_reg; + } /* * The cmci_monitor() must not be executed @@ -1142,12 +1210,13 @@ _mca_init(int boot) skip = 1; } else if (cpu_vendor_id == CPU_VENDOR_AMD) { /* BKDG for Family 10h: unset GartTblWkEn. */ - if (i == MC_AMDNB_BANK && family >= 0xf) + if (i == MC_AMDNB_BANK && family >= 0xf && + family < 0x17) ctl &= ~(1UL << 10); } if (!skip) - wrmsr(MSR_MC_CTL(i), ctl); + wrmsr(mca_msr_ops.ctl(i), ctl); #ifdef DEV_APIC if (cmci_supported(mcg_cap)) { @@ -1164,7 +1233,7 @@ _mca_init(int boot) #endif /* Clear all errors. */ - wrmsr(MSR_MC_STATUS(i), 0); + wrmsr(mca_msr_ops.status(i), 0); } if (boot) mtx_unlock_spin(&mca_lock); From owner-svn-src-head@freebsd.org Wed May 22 15:10:29 2019 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 05FFA15AE10B; Wed, 22 May 2019 15:10:29 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9CB4B89DFA; Wed, 22 May 2019 15:10:28 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 8DE971628A; Wed, 22 May 2019 15:10:28 +0000 (UTC) Date: Wed, 22 May 2019 15:10:28 +0000 From: Alexey Dokuchaev To: Alexander Motin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r345815 - in head: lib/libcam sys/cam sys/cam/nvme Message-ID: <20190522151028.GA29205@FreeBSD.org> References: <201904021937.x32JbrRk067921@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201904021937.x32JbrRk067921@repo.freebsd.org> User-Agent: Mutt/1.11.4 (2019-03-13) X-Rspamd-Queue-Id: 9CB4B89DFA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.89 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.89)[-0.890,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 15:10:29 -0000 On Tue, Apr 02, 2019 at 07:37:53PM +0000, Alexander Motin wrote: > New Revision: 345815 > URL: https://svnweb.freebsd.org/changeset/base/345815 > > Log: > Make cam_error_print() decode NVMe commands. > > Modified: head/sys/cam/nvme/nvme_xpt.c > ... > @@ -769,11 +769,13 @@ nvme_proto_debug_out(union ccb *ccb) > { > char cdb_str[(sizeof(struct nvme_command) * 3) + 1]; > > - if (ccb->ccb_h.func_code != XPT_NVME_IO) > + if (ccb->ccb_h.func_code != XPT_NVME_IO || > + ccb->ccb_h.func_code != XPT_NVME_ADMIN) > return; PVS Studio complains that "Expression is always true. Probably the '&&' operator should be used here". Can you take a look? ./danfe From owner-svn-src-head@freebsd.org Wed May 22 15:11:21 2019 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 21F7C15AE188; Wed, 22 May 2019 15:11:21 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-it1-x134.google.com (mail-it1-x134.google.com [IPv6:2607:f8b0:4864:20::134]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B0F0E8A11A; Wed, 22 May 2019 15:11:20 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-it1-x134.google.com with SMTP id t184so4115188itf.2; Wed, 22 May 2019 08:11:20 -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=jmYyRyRUtdQaPcewqV8dUTpRK7hF3QR35AzpkB0zo/8=; b=lU3crDl6ABlm4wQmN3RmitNrBWe7oohiIVkSv17Tw3m6D4FghrV3ibrLC0ld6kkMrb pde9Zid69n8nJBa5NY00lTPN9x+jEQ3h54ceDMUzLDnwAga/d2BQXI0VN+6y2RNAkMBU zU5LYk+PelBqoqfx/qQGIvIkX4/zXwSPBboBpp+yugBmo9EPq1F6TZG71TnXHV0C5Iay uf0cOrxcnTCPFDYzbON+oLf2/ALNgaEA3wRMgsVkiiYkyj0zT+8VBBVKu7MNwBCPH6V9 SyJUG9Sv5GyCie/DxK3KEtslSdZ5Uzu+htm4/vJONx6ggnKxDIoj+ITnK6C3IVTvnxbS ICtA== 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=jmYyRyRUtdQaPcewqV8dUTpRK7hF3QR35AzpkB0zo/8=; b=H5lSMsQaqfslodx9Woa2xIp+0ofm3w5LtPR6rSd/RdkY83ZJH2OmAQzreEnVF/6+tB MZ1c+20953DJy3WXN7XS7U1n+nFYIG6tg0Xk1aLHsoro/+HI/OZrcFG5Det+ZFbf5V6c h7FsNz4ufH/wLFQSVtr6GDNYdOtDUpohv/aP4OCl1eQEOqVGBBYWHeC3QEzvaGx4XIdA WdXDXXH73Yd1f8bxKGrZgKcyw+gjeQgh9+tph0WL9PN+dtUSI4NVAU5ooYC7dp0LrcDD EbDdI1MFw4OaXN8HWIeU6VtM1HjsEd9DU+1WZN9bHgHPFYxY/mY6YKk3JOlAZDN12bAK Kp/A== X-Gm-Message-State: APjAAAXuwK0RZottlsI5N1/gcKzEP0KLtC16sb553pmXrTKdlZmiGAFT ezKBxdX+xDG6GPhF8avI8Lx1W2Rq X-Google-Smtp-Source: APXvYqwqoPUlvuNu021HKpSrE8FZfi9r/LsimGnuQgH5XW7cCGwJZC8HlOp95y+VZfh+RiY7ifHXRw== X-Received: by 2002:a24:834b:: with SMTP id d72mr8310547ite.109.1558537879502; Wed, 22 May 2019 08:11:19 -0700 (PDT) Received: from spy (cs-auth-dc-129-97-60-193.dynamic.uwaterloo.ca. [129.97.60.193]) by smtp.gmail.com with ESMTPSA id d71sm3073380itc.18.2019.05.22.08.11.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 22 May 2019 08:11:18 -0700 (PDT) Sender: Mark Johnston Date: Wed, 22 May 2019 11:11:16 -0400 From: Mark Johnston To: rgrimes@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r348090 - in head/libexec/bootpd: . bootpgw Message-ID: <20190522151116.GB5125@spy> References: <201905220413.x4M4DvBm057783@repo.freebsd.org> <201905220425.x4M4PNCB082699@gndrsh.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201905220425.x4M4PNCB082699@gndrsh.dnsmgr.net> User-Agent: Mutt/1.11.4 (2019-03-13) X-Rspamd-Queue-Id: B0F0E8A11A X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 15:11:21 -0000 On Tue, May 21, 2019 at 09:25:23PM -0700, Rodney W. Grimes wrote: > > Author: markj > > Date: Wed May 22 04:13:57 2019 > > New Revision: 348090 > > URL: https://svnweb.freebsd.org/changeset/base/348090 > > > > Log: > > Marginally improve usage() message style in bootpd. > > > > - Remove an extra space after "usage:". > > - Avoid lines exceeding 80 columns. > > > > Based on notes from rgrimes. > > Thanks, but you missed an important aspect of those notes, > see inline below. > > > > > MFC with: r348066 > > Event: Waterloo Hackathon 2019 > > > > Modified: > > head/libexec/bootpd/bootpd.c > > head/libexec/bootpd/bootpgw/bootpgw.c > > > > Modified: head/libexec/bootpd/bootpd.c > > ============================================================================== > > --- head/libexec/bootpd/bootpd.c Wed May 22 04:10:24 2019 (r348089) > > +++ head/libexec/bootpd/bootpd.c Wed May 22 04:13:57 2019 (r348090) > > @@ -587,8 +587,8 @@ PRIVATE void > > usage() > > { > > fprintf(stderr, > > - "usage: bootpd [-a] [-i | -s] [-c chdir-path] [-d level] [-h hostname] [-t timeout]\n"); > > - fprintf(stderr, " [bootptab [dumpfile]]\n"); > > + "usage: bootpd [-a] [-i | -s] [-c chdir-path] [-d level] [-h hostname]\n" > > + " [-t timeout] [bootptab [dumpfile]]\n"); > > fprintf(stderr, "\t -a\tdon't modify ARP table\n"); > > fprintf(stderr, "\t -c n\tset current directory\n"); > > fprintf(stderr, "\t -d n\tset debug level\n"); > > These 3 printf's are now miss aligned and contain a \t that should not be there: > there may be more, I am only look at what is in context here. > - fprintf(stderr, "\t -a\tdon't modify ARP table\n"); > - fprintf(stderr, "\t -c n\tset current directory\n"); > - fprintf(stderr, "\t -d n\tset debug level\n"); > + fprintf(stderr, " -a\tdon't modify ARP table\n"); > + fprintf(stderr, " -c n\tset current directory\n"); > + fprintf(stderr, " -d n\tset debug level\n"); They were seemingly misaligned before too. Before: usage: bootpd [-i | -s] [-c chdir-path] [-d level] [-h hostname] [-t timeout] [bootptab [dumpfile]] -c n set current directory -d n set debug level -h n set the hostname to listen on -i force inetd mode (run as child of inetd) -s force standalone mode (run without inetd) -t n set inetd exit timeout to n minutes After: usage: bootpd [-a] [-i | -s] [-c chdir-path] [-d level] [-h hostname] [-t timeout] [bootptab [dumpfile]] -a don't modify ARP table -c n set current directory -d n set debug level -h n set the hostname to listen on -i force inetd mode (run as child of inetd) -s force standalone mode (run without inetd) -t n set inetd exit timeout to n minutes To be honest I have no desire to spend more time on bootpd than I already have. You are welcome to improve the usage formatting if you like. From owner-svn-src-head@freebsd.org Wed May 22 15:21:24 2019 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 B2BDD15AE5C5; Wed, 22 May 2019 15:21:24 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5173C8A727; Wed, 22 May 2019 15:21:24 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 2694616663; Wed, 22 May 2019 15:21:24 +0000 (UTC) Date: Wed, 22 May 2019 15:21:24 +0000 From: Alexey Dokuchaev To: Alexander Motin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r310524 - in head/sys/cam: ctl scsi Message-ID: <20190522152124.GA36423@FreeBSD.org> References: <201612241742.uBOHgYQp045291@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201612241742.uBOHgYQp045291@repo.freebsd.org> User-Agent: Mutt/1.11.4 (2019-03-13) X-Rspamd-Queue-Id: 5173C8A727 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.82 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.82)[-0.825,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 15:21:24 -0000 On Sat, Dec 24, 2016 at 05:42:34PM +0000, Alexander Motin wrote: > New Revision: 310524 > URL: https://svnweb.freebsd.org/changeset/base/310524 > > Log: > Improve length handling when writing sense data. > > - Allow maximal sense size limitation via Control Extension mode page. > - When sense size limited, include descriptors atomically: whole or none. > - Set new SDAT_OVFL bit if some descriptors don't fit the limit. > - Report real written sense length instead of static maximal 252 bytes. > > Modified: head/sys/cam/scsi/scsi_all.c > ... > break; > - case SSD_ELEM_DESC: > - default: > - > - /* > - * If the user passes in descriptor sense, > - * we can't handle that in fixed format. > - * So just skip it, and any unknown argument > - * types. > - */ > + } > + if (len > sizeof(sense->cmd_spec_info)) { > + data += len - sizeof(sense->cmd_spec_info); > + len -= len - sizeof(sense->cmd_spec_info); PVS Studio complains here: error: V765 A compound assignment expression 'x -= x - ...' is suspicious. Consider inspecting it for a possible error. This "len -= len - sizeof(...)" indeed looks weird, can you take a look? ./danfe From owner-svn-src-head@freebsd.org Wed May 22 15:25:11 2019 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 7C30215AE8FC; Wed, 22 May 2019 15:25:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EC38B8AB28; Wed, 22 May 2019 15:25:10 +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 C84FD1F510; Wed, 22 May 2019 15:25:10 +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 x4MFPAxU008773; Wed, 22 May 2019 15:25:10 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4MFPARv008772; Wed, 22 May 2019 15:25:10 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201905221525.x4MFPARv008772@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 22 May 2019 15:25:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348110 - head/sys/cam/nvme X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/cam/nvme X-SVN-Commit-Revision: 348110 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EC38B8AB28 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 15:25:11 -0000 Author: mav Date: Wed May 22 15:25:10 2019 New Revision: 348110 URL: https://svnweb.freebsd.org/changeset/base/348110 Log: Fix condition broken at r345815. Reported by: danfe MFC after: 3 days Modified: head/sys/cam/nvme/nvme_xpt.c Modified: head/sys/cam/nvme/nvme_xpt.c ============================================================================== --- head/sys/cam/nvme/nvme_xpt.c Wed May 22 13:44:15 2019 (r348109) +++ head/sys/cam/nvme/nvme_xpt.c Wed May 22 15:25:10 2019 (r348110) @@ -769,7 +769,7 @@ nvme_proto_debug_out(union ccb *ccb) { char cdb_str[(sizeof(struct nvme_command) * 3) + 1]; - if (ccb->ccb_h.func_code != XPT_NVME_IO || + if (ccb->ccb_h.func_code != XPT_NVME_IO && ccb->ccb_h.func_code != XPT_NVME_ADMIN) return; From owner-svn-src-head@freebsd.org Wed May 22 15:39:36 2019 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 8DCAE15AED4D; Wed, 22 May 2019 15:39:36 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2F05F8B21C; Wed, 22 May 2019 15:39:36 +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 0513C1F6B2; Wed, 22 May 2019 15:39:36 +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 x4MFdZDQ013932; Wed, 22 May 2019 15:39:35 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4MFdZmm013931; Wed, 22 May 2019 15:39:35 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201905221539.x4MFdZmm013931@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 22 May 2019 15:39:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348111 - head/sys/cam/scsi X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/cam/scsi X-SVN-Commit-Revision: 348111 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2F05F8B21C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 15:39:36 -0000 Author: mav Date: Wed May 22 15:39:35 2019 New Revision: 348111 URL: https://svnweb.freebsd.org/changeset/base/348111 Log: Simplify math added in r310524. Should be no functional change. Reported by: danfe MFC after: 1 week Modified: head/sys/cam/scsi/scsi_all.c Modified: head/sys/cam/scsi/scsi_all.c ============================================================================== --- head/sys/cam/scsi/scsi_all.c Wed May 22 15:25:10 2019 (r348110) +++ head/sys/cam/scsi/scsi_all.c Wed May 22 15:39:35 2019 (r348111) @@ -3943,7 +3943,7 @@ scsi_set_sense_data_fixed_va(struct scsi_sense_data *s } if (len > sizeof(sense->cmd_spec_info)) { data += len - sizeof(sense->cmd_spec_info); - len -= len - sizeof(sense->cmd_spec_info); + len = sizeof(sense->cmd_spec_info); } bcopy(data, &sense->cmd_spec_info[ sizeof(sense->cmd_spec_info) - len], len); From owner-svn-src-head@freebsd.org Wed May 22 15:39:58 2019 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 ABF5D15AED87; Wed, 22 May 2019 15:39:58 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-yw1-xc30.google.com (mail-yw1-xc30.google.com [IPv6:2607:f8b0:4864:20::c30]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3811C8B343; Wed, 22 May 2019 15:39:58 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: by mail-yw1-xc30.google.com with SMTP id w21so1014650ywd.6; Wed, 22 May 2019 08:39:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:openpgp:autocrypt:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=z50MBqQ/LytoXX4l1yIAwSRIhs+tDDFAeLu17NLBKgs=; b=mtyZyNvt+c2HjuPLLF3Tz0mQz2ERkmm0eSdFwnMCrHUOC7tOV9Qs+yKxct6LBjd67i kUI88gd2QLfzmMXuNIxFKVVwiI0ucUIjq7+nZxN5jYk7IgdLuRVpGJOZQehag+dPUJZ9 6TTwH7g3OqwcVl1Ahv7XKHISQ7nrMnwsXhpUUMhDmlAves9NIhWQSFLDats07qkOHotJ ytGY8uu5DyFJPxRt41mzUid8adn6/YCq6+NajXp25AT8NC7CHJGdbYyXbV8fYN2yPvUq xnNDnE5uLcb+meGLRg30R1oUjLuK3iHlOmBAR68WUEfc1t0VtdLmStz7vMgq4B3CK/Kz HUeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:openpgp :autocrypt:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=z50MBqQ/LytoXX4l1yIAwSRIhs+tDDFAeLu17NLBKgs=; b=Ls7U0QTi2m9xt0tb3zChJQeZE21g01jLOZJzsDj2IfOoSUieFXeGv5DkHcRLUW1ufL nE/apAa/XyiXSVPiQlwgs7L5l5KFEp/kQnmZ/z5QRZLEbxo+TNiX2XrMYU0bugP7V3g5 Zyz70rRBxFXx7n8ADRp/xzPBWPU0hDWdeRQAsI9dN8hGpQO0kA168h1tAk03lLxyRUAY WaA1ndl7niVUuRC70owmsID2M1UvInJlhhtpSuJKHGiEPcRhad0yDMVIo1Wk2QkrGIc/ Hs/rwzmyp2CaCRaP+x5QjLY5NInS4Hj1bt08PIW9sYvd6VH9Y/aYxP8lUNsx0YThRKpX TU/w== X-Gm-Message-State: APjAAAWG8tZ3hEK/1PbrSpLJ9Ubx2r5le8NCUf9sT5w+NOpHzKL3XOtG LSMZWpLiKMr6M+/MjkzFdyLpTSIEAbo= X-Google-Smtp-Source: APXvYqxSzSZy4PbaRloix06l+3YA4l7GsmaQeIdQXiqCgt4W0bgn8dJAIhRdNCrDlffOG/Vem6Zwug== X-Received: by 2002:a81:5e8b:: with SMTP id s133mr4438935ywb.149.1558539597423; Wed, 22 May 2019 08:39:57 -0700 (PDT) Received: from mavoffice.ixsystems.com ([12.189.233.129]) by smtp.gmail.com with ESMTPSA id o76sm5221529ywd.49.2019.05.22.08.39.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 May 2019 08:39:56 -0700 (PDT) Sender: Alexander Motin Subject: Re: svn commit: r345815 - in head: lib/libcam sys/cam sys/cam/nvme To: Alexey Dokuchaev Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201904021937.x32JbrRk067921@repo.freebsd.org> <20190522151028.GA29205@FreeBSD.org> From: Alexander Motin Openpgp: preference=signencrypt Autocrypt: addr=mav@FreeBSD.org; prefer-encrypt=mutual; keydata= xsBNBFOzxAwBCADkPrax0pI2W/ig0CK9nRJJwsHitAGEZ2HZiFEuti+6/4UVxj81yr4ak/4g 9bKUyC7rMEAp/ZHNhd+MFCPAAcHPvtovnfykqE/vuosCS3wlSLloix2iKVLks0CwbLHGAyne 46lTQW74Xl/33c3W1Z6d8jD9gVFT/xaVzZ0U9xdzOmsYAZaAj4ki0tuxO9F7L+ct9grRe7iP g8t9hai7BL4ee3VRwk2JXnKb7UvBiVITKYWKz1jRvZIrjPokgEcCLOSlv7x/1kjuFnj3xWZU 7HSFFT8J93epBbrSSCsYsppIk2fZH41kaaFXsMQfTPH8wkeM6qwrvOh4HiQM08R+9tThABEB AAHNIUFsZXhhbmRlciBNb3RpbiA8bWF2QEZyZWVCU0Qub3JnPsLAlwQTAQoAQQIbAwULCQgH AwUVCgkICwUWAwIBAAIeAQIXgAIZARYhBOmM88TmnMPNDledVYMYw5VbqyJ/BQJZYMKuBQkN McyiAAoJEIMYw5VbqyJ/tuUIAOG3ONOSNYqjK4eTZ1TVh9jdUBAhWk5nhDFnODN49Wj0AbYm 7aIqy8O1hnCDSZG5LttjSAo3UfXJZDKQM0BLb0gpRMBnAYqO6tdolLNqAbPGJBnGoPjsh24y 6KcbDaNnis+lD4GwPXwQM+92wZGhCUFElPV9NciZGVS65TNIgk7X+yEjjhD1MSWKKijZ1r9Z zIt4OzUTxxNOvzdlABZS88nNRdJkatOQJPmFdd1mpP6UzTNCiLUo1pIqOEtJgvVVDYq5WHY6 tciWWYdmZG/tIBexJmv2mV2OLVjXR6ZeKmntVH14H72/wRHJuYHQC+r5SVRcWWayrThsY6jZ Yr4+raTOwE0EU7PEDAEIAOZgWf2cJIu+58IzP2dkXE/urj3tr4OqrB/yHGWUf71Lz6D0Fi6Z AXgDtmcFLGPfMyWuLAvSM+xmoguk7zC4hRBYvQycmIhuqBq1jO1Wp/Z+lpoPM/1cDYLn8Flv mI/c40MhUZh345DA4jYWWaZNjQHUWVQ1fPf595vdVVMPT/abE8E5DaF6fSkRmqFTmfYRkfbt 3ytU8NdUapDcJVY7cEP2nJBVNZPnOIObR/ZIgSxjjrG5o34yXoqeup8JvwEv+/NylzzuyXEZ R1EdEIzQ/a1nh/0j4NXtzZEqKW4aTWlmSqb6wN8jh1OSOOqkYsfnE3nfxcZbxi4IRoNQYlm5 9R8AEQEAAcLAZQQYAQoADwUCU7PEDAIbDAUJBaOagAAKCRCDGMOVW6sif7FRB/4k9y/GaGqU fcJiXdQHRAKHCUvbKMFgeEDHOg33qx+POS2Ah85/PXVa2jYBldCZDmYc+zl48aEMd163a7s3 0gJaB7CYElwxlKUk6c+5gwoYIJuJJzSzW0JzSD5ch7RIRxbfxrKdsiHrUW8AeduZWzlK6VaW RmWILgLmxfLdhEVFWxbr99GSeVFZaZwn6tl/8CvBcgYoARvJvl0V5zS1akQfEISYkwL9EfUI W44EOHranL5qUXkedXBYp6fRsooGrIimfwYxaC8FbXhk3FMgMjDMRiVq4POHo1iGeYETsUrL NM6184E25gPVtX2fb3RhM8Xh6BkwCZ6ZYbQ+AcD4F/cKwsB8BBgBCgAmAhsMFiEE6YzzxOac w80OV51VgxjDlVurIn8FAllgwtgFCQ0xzMwACgkQgxjDlVurIn9OqAf9FAcKWS95wTTbraXA qg/+bQyHgjlMtGCgkmfxLsbUGeqiFgmSIuoDrF7q6sYPs6p00CXXZRuuNZt0lX7O95re8mgz gxm5iJisZpdbHMVepYlw/AxT2wCHwxGCEe64Lm+A9vjlOd+3D3/6fSLwZ9WFCE6p6lQZ1CDg 09xe+JKSgC+KDqmn0tzGKyfSCuhRAq3XkZyxL1hxBaDeP0eeKlzoy7jXodf3wVvXXc0cmpza B5McuRHK4EU6jIioHo30YqPM4AjPHGxV2X1N6/Aayungzj9EXNZtKCxs6dsTvjniWa5VkZ9F 4SOdSbxEen1DZRYpeWnd7GVmO86n+5USkKCXPg== Message-ID: <66c4b8cb-fca1-da79-fb35-86742e549e60@FreeBSD.org> Date: Wed, 22 May 2019 11:39:56 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20190522151028.GA29205@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 3811C8B343 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 15:39:58 -0000 On 22.05.2019 11:10, Alexey Dokuchaev wrote: > On Tue, Apr 02, 2019 at 07:37:53PM +0000, Alexander Motin wrote: >> New Revision: 345815 >> URL: https://svnweb.freebsd.org/changeset/base/345815 >> >> Log: >> Make cam_error_print() decode NVMe commands. >> >> Modified: head/sys/cam/nvme/nvme_xpt.c >> ... >> @@ -769,11 +769,13 @@ nvme_proto_debug_out(union ccb *ccb) >> { >> char cdb_str[(sizeof(struct nvme_command) * 3) + 1]; >> >> - if (ccb->ccb_h.func_code != XPT_NVME_IO) >> + if (ccb->ccb_h.func_code != XPT_NVME_IO || >> + ccb->ccb_h.func_code != XPT_NVME_ADMIN) >> return; > > PVS Studio complains that "Expression is always true. Probably the '&&' > operator should be used here". Can you take a look? Fixed. Thank you. -- Alexander Motin From owner-svn-src-head@freebsd.org Wed May 22 15:40:44 2019 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 67EF515AEE19; Wed, 22 May 2019 15:40:44 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-yw1-xc2b.google.com (mail-yw1-xc2b.google.com [IPv6:2607:f8b0:4864:20::c2b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E69058B4CF; Wed, 22 May 2019 15:40:43 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: by mail-yw1-xc2b.google.com with SMTP id a130so999791ywe.13; Wed, 22 May 2019 08:40:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:openpgp:autocrypt:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=sR6ntA1/6v/Yn2B4oa1NdLrI1k9UcuJ4m0xdd7y2A5Y=; b=B5WkNK52FtKRNCljmA720qZO2PnS7Hb2n3LhN3OPkoHxB+EPyg853rGUaMfKWKJs1W m4V+clLLDtpY2iRQAAq0CS5kCMRixRkhCnwfzYuuYR2KDUKKrzVt5DO0LZwf1m1i3jj/ 1RCSi+5OQ65scatrwEt8uhGcy717EqSiNBAY81TB7x6M2HPLk5xFPAbqRp8jqNUMTQFc oiW8fa6nJOA8bNRWRAMhfkXBXndlLNWQYTwo42f87ei7ZM+TdCVg7NKRH8JnNNyWBB94 zYWI0MC9MKBinTT/bPOdjRaeV7aA236k4LWAZN84eWusb94BYmYUHTKpeQaz2jQLWBAO T5Sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:openpgp :autocrypt:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=sR6ntA1/6v/Yn2B4oa1NdLrI1k9UcuJ4m0xdd7y2A5Y=; b=sUQbj3qGte5i4cbI/+58IHGYyz5xKa/5IUQ0443m+TuxpkWTlGP/AMJu8hey8dC25I te4lb1eychk2/KxWXzFzCalJiD2YsV4cm+Poo0B91CB+e/bI6oEg+H0OVznI1kxj8TAi EWiTb/Z0pcEAyaAuISJW3gkbfzVU7zlNEHrjeqEyIa5O//6Y/ymgFsQfP+iIYaY1Wobb utY3OkDUqCI5s5ikMgff/O1a+a0uH1gSzVPKvNiI8zcfhX1Fa5hBYvK9Zu3sGT9RLbPO 2/9vzRL6jW4Fx0bHBdB3JAE2S2naXLRDWcCJrBSKwgv1/yPUOHe/K45h/hmyTLHqIKE2 5GlA== X-Gm-Message-State: APjAAAVdMYKvEtLH9o0EHTDQAHoaGK2KuktMn0KnE7agovdqZxo9/K3a Arg30VuSkpErEWVa8d34nMrlLkZ0lHc= X-Google-Smtp-Source: APXvYqwa/sJNx2nDA371sDwRDC7XH+d61LoHWEVjbTwBu+AYm+H9ysc2lG8I7KM6Tmf5AZIhAd0nrA== X-Received: by 2002:a81:5806:: with SMTP id m6mr40086868ywb.102.1558539643092; Wed, 22 May 2019 08:40:43 -0700 (PDT) Received: from mavoffice.ixsystems.com ([12.189.233.129]) by smtp.gmail.com with ESMTPSA id m3sm6539003ywf.39.2019.05.22.08.40.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 May 2019 08:40:42 -0700 (PDT) Sender: Alexander Motin Subject: Re: svn commit: r310524 - in head/sys/cam: ctl scsi To: Alexey Dokuchaev Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201612241742.uBOHgYQp045291@repo.freebsd.org> <20190522152124.GA36423@FreeBSD.org> From: Alexander Motin Openpgp: preference=signencrypt Autocrypt: addr=mav@FreeBSD.org; prefer-encrypt=mutual; keydata= xsBNBFOzxAwBCADkPrax0pI2W/ig0CK9nRJJwsHitAGEZ2HZiFEuti+6/4UVxj81yr4ak/4g 9bKUyC7rMEAp/ZHNhd+MFCPAAcHPvtovnfykqE/vuosCS3wlSLloix2iKVLks0CwbLHGAyne 46lTQW74Xl/33c3W1Z6d8jD9gVFT/xaVzZ0U9xdzOmsYAZaAj4ki0tuxO9F7L+ct9grRe7iP g8t9hai7BL4ee3VRwk2JXnKb7UvBiVITKYWKz1jRvZIrjPokgEcCLOSlv7x/1kjuFnj3xWZU 7HSFFT8J93epBbrSSCsYsppIk2fZH41kaaFXsMQfTPH8wkeM6qwrvOh4HiQM08R+9tThABEB AAHNIUFsZXhhbmRlciBNb3RpbiA8bWF2QEZyZWVCU0Qub3JnPsLAlwQTAQoAQQIbAwULCQgH AwUVCgkICwUWAwIBAAIeAQIXgAIZARYhBOmM88TmnMPNDledVYMYw5VbqyJ/BQJZYMKuBQkN McyiAAoJEIMYw5VbqyJ/tuUIAOG3ONOSNYqjK4eTZ1TVh9jdUBAhWk5nhDFnODN49Wj0AbYm 7aIqy8O1hnCDSZG5LttjSAo3UfXJZDKQM0BLb0gpRMBnAYqO6tdolLNqAbPGJBnGoPjsh24y 6KcbDaNnis+lD4GwPXwQM+92wZGhCUFElPV9NciZGVS65TNIgk7X+yEjjhD1MSWKKijZ1r9Z zIt4OzUTxxNOvzdlABZS88nNRdJkatOQJPmFdd1mpP6UzTNCiLUo1pIqOEtJgvVVDYq5WHY6 tciWWYdmZG/tIBexJmv2mV2OLVjXR6ZeKmntVH14H72/wRHJuYHQC+r5SVRcWWayrThsY6jZ Yr4+raTOwE0EU7PEDAEIAOZgWf2cJIu+58IzP2dkXE/urj3tr4OqrB/yHGWUf71Lz6D0Fi6Z AXgDtmcFLGPfMyWuLAvSM+xmoguk7zC4hRBYvQycmIhuqBq1jO1Wp/Z+lpoPM/1cDYLn8Flv mI/c40MhUZh345DA4jYWWaZNjQHUWVQ1fPf595vdVVMPT/abE8E5DaF6fSkRmqFTmfYRkfbt 3ytU8NdUapDcJVY7cEP2nJBVNZPnOIObR/ZIgSxjjrG5o34yXoqeup8JvwEv+/NylzzuyXEZ R1EdEIzQ/a1nh/0j4NXtzZEqKW4aTWlmSqb6wN8jh1OSOOqkYsfnE3nfxcZbxi4IRoNQYlm5 9R8AEQEAAcLAZQQYAQoADwUCU7PEDAIbDAUJBaOagAAKCRCDGMOVW6sif7FRB/4k9y/GaGqU fcJiXdQHRAKHCUvbKMFgeEDHOg33qx+POS2Ah85/PXVa2jYBldCZDmYc+zl48aEMd163a7s3 0gJaB7CYElwxlKUk6c+5gwoYIJuJJzSzW0JzSD5ch7RIRxbfxrKdsiHrUW8AeduZWzlK6VaW RmWILgLmxfLdhEVFWxbr99GSeVFZaZwn6tl/8CvBcgYoARvJvl0V5zS1akQfEISYkwL9EfUI W44EOHranL5qUXkedXBYp6fRsooGrIimfwYxaC8FbXhk3FMgMjDMRiVq4POHo1iGeYETsUrL NM6184E25gPVtX2fb3RhM8Xh6BkwCZ6ZYbQ+AcD4F/cKwsB8BBgBCgAmAhsMFiEE6YzzxOac w80OV51VgxjDlVurIn8FAllgwtgFCQ0xzMwACgkQgxjDlVurIn9OqAf9FAcKWS95wTTbraXA qg/+bQyHgjlMtGCgkmfxLsbUGeqiFgmSIuoDrF7q6sYPs6p00CXXZRuuNZt0lX7O95re8mgz gxm5iJisZpdbHMVepYlw/AxT2wCHwxGCEe64Lm+A9vjlOd+3D3/6fSLwZ9WFCE6p6lQZ1CDg 09xe+JKSgC+KDqmn0tzGKyfSCuhRAq3XkZyxL1hxBaDeP0eeKlzoy7jXodf3wVvXXc0cmpza B5McuRHK4EU6jIioHo30YqPM4AjPHGxV2X1N6/Aayungzj9EXNZtKCxs6dsTvjniWa5VkZ9F 4SOdSbxEen1DZRYpeWnd7GVmO86n+5USkKCXPg== Message-ID: <8fdc1e42-b8aa-3af1-27b3-f78c3918e7ea@FreeBSD.org> Date: Wed, 22 May 2019 11:40:42 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20190522152124.GA36423@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: E69058B4CF X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 15:40:44 -0000 On 22.05.2019 11:21, Alexey Dokuchaev wrote: > On Sat, Dec 24, 2016 at 05:42:34PM +0000, Alexander Motin wrote: >> New Revision: 310524 >> URL: https://svnweb.freebsd.org/changeset/base/310524 >> >> Log: >> Improve length handling when writing sense data. >> >> - Allow maximal sense size limitation via Control Extension mode page. >> - When sense size limited, include descriptors atomically: whole or none. >> - Set new SDAT_OVFL bit if some descriptors don't fit the limit. >> - Report real written sense length instead of static maximal 252 bytes. >> >> Modified: head/sys/cam/scsi/scsi_all.c >> ... >> + } >> + if (len > sizeof(sense->cmd_spec_info)) { >> + data += len - sizeof(sense->cmd_spec_info); >> + len -= len - sizeof(sense->cmd_spec_info); > > PVS Studio complains here: error: V765 A compound assignment expression 'x > -= x - ...' is suspicious. Consider inspecting it for a possible error. > > This "len -= len - sizeof(...)" indeed looks weird, can you take a look? It may be weird, but not incorrect. Fixed though. -- Alexander Motin From owner-svn-src-head@freebsd.org Wed May 22 15:42:35 2019 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 ED62F15AF02F; Wed, 22 May 2019 15:42:34 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8D57F8B8C7; Wed, 22 May 2019 15:42:34 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 794B016F7C; Wed, 22 May 2019 15:42:34 +0000 (UTC) Date: Wed, 22 May 2019 15:42:34 +0000 From: Alexey Dokuchaev To: Alexander Motin Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r310524 - in head/sys/cam: ctl scsi Message-ID: <20190522154234.GA55867@FreeBSD.org> References: <201612241742.uBOHgYQp045291@repo.freebsd.org> <20190522152124.GA36423@FreeBSD.org> <8fdc1e42-b8aa-3af1-27b3-f78c3918e7ea@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8fdc1e42-b8aa-3af1-27b3-f78c3918e7ea@FreeBSD.org> User-Agent: Mutt/1.11.4 (2019-03-13) X-Rspamd-Queue-Id: 8D57F8B8C7 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.90 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.91)[-0.905,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 15:42:35 -0000 On Wed, May 22, 2019 at 11:40:42AM -0400, Alexander Motin wrote: > On 22.05.2019 11:21, Alexey Dokuchaev wrote: > > On Sat, Dec 24, 2016 at 05:42:34PM +0000, Alexander Motin wrote: > >> New Revision: 310524 > >> URL: https://svnweb.freebsd.org/changeset/base/310524 > >> > >> Modified: head/sys/cam/scsi/scsi_all.c > >> ... > >> + } > >> + if (len > sizeof(sense->cmd_spec_info)) { > >> + data += len - sizeof(sense->cmd_spec_info); > >> + len -= len - sizeof(sense->cmd_spec_info); > > > > PVS Studio complains here: error: V765 A compound assignment expression 'x > > -= x - ...' is suspicious. Consider inspecting it for a possible error. > > > > This "len -= len - sizeof(...)" indeed looks weird, can you take a look? > > It may be weird, but not incorrect. Fixed though. Wow that was fast! Thanks (for both commits), ./danfe From owner-svn-src-head@freebsd.org Wed May 22 15:48:14 2019 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 731E115AF1CB; Wed, 22 May 2019 15:48:14 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC93F8BB58; Wed, 22 May 2019 15:48:13 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x4MFmAZH085474; Wed, 22 May 2019 08:48:10 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x4MFmAIF085473; Wed, 22 May 2019 08:48:10 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201905221548.x4MFmAIF085473@gndrsh.dnsmgr.net> Subject: Re: svn commit: r348090 - in head/libexec/bootpd: . bootpgw In-Reply-To: <20190522151116.GB5125@spy> To: Mark Johnston Date: Wed, 22 May 2019 08:48:10 -0700 (PDT) CC: rgrimes@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: CC93F8BB58 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 15:48:14 -0000 > On Tue, May 21, 2019 at 09:25:23PM -0700, Rodney W. Grimes wrote: > > > Author: markj > > > Date: Wed May 22 04:13:57 2019 > > > New Revision: 348090 > > > URL: https://svnweb.freebsd.org/changeset/base/348090 > > > > > > Log: > > > Marginally improve usage() message style in bootpd. > > > > > > - Remove an extra space after "usage:". > > > - Avoid lines exceeding 80 columns. > > > > > > Based on notes from rgrimes. > > > > Thanks, but you missed an important aspect of those notes, > > see inline below. > > > > > > > > MFC with: r348066 > > > Event: Waterloo Hackathon 2019 > > > > > > Modified: > > > head/libexec/bootpd/bootpd.c > > > head/libexec/bootpd/bootpgw/bootpgw.c > > > > > > Modified: head/libexec/bootpd/bootpd.c > > > ============================================================================== > > > --- head/libexec/bootpd/bootpd.c Wed May 22 04:10:24 2019 (r348089) > > > +++ head/libexec/bootpd/bootpd.c Wed May 22 04:13:57 2019 (r348090) > > > @@ -587,8 +587,8 @@ PRIVATE void > > > usage() > > > { > > > fprintf(stderr, > > > - "usage: bootpd [-a] [-i | -s] [-c chdir-path] [-d level] [-h hostname] [-t timeout]\n"); > > > - fprintf(stderr, " [bootptab [dumpfile]]\n"); > > > + "usage: bootpd [-a] [-i | -s] [-c chdir-path] [-d level] [-h hostname]\n" > > > + " [-t timeout] [bootptab [dumpfile]]\n"); > > > fprintf(stderr, "\t -a\tdon't modify ARP table\n"); > > > fprintf(stderr, "\t -c n\tset current directory\n"); > > > fprintf(stderr, "\t -d n\tset debug level\n"); > > > > These 3 printf's are now miss aligned and contain a \t that should not be there: > > there may be more, I am only look at what is in context here. > > - fprintf(stderr, "\t -a\tdon't modify ARP table\n"); > > - fprintf(stderr, "\t -c n\tset current directory\n"); > > - fprintf(stderr, "\t -d n\tset debug level\n"); > > + fprintf(stderr, " -a\tdon't modify ARP table\n"); > > + fprintf(stderr, " -c n\tset current directory\n"); > > + fprintf(stderr, " -d n\tset debug level\n"); > > They were seemingly misaligned before too. > > Before: > usage: bootpd [-i | -s] [-c chdir-path] [-d level] [-h hostname] [-t timeout] > [bootptab [dumpfile]] > -c n set current directory > -d n set debug level > -h n set the hostname to listen on > -i force inetd mode (run as child of inetd) > -s force standalone mode (run without inetd) > -t n set inetd exit timeout to n minutes > > After: > usage: bootpd [-a] [-i | -s] [-c chdir-path] [-d level] [-h hostname] > [-t timeout] [bootptab [dumpfile]] > -a don't modify ARP table > -c n set current directory > -d n set debug level > -h n set the hostname to listen on > -i force inetd mode (run as child of inetd) > -s force standalone mode (run without inetd) > -t n set inetd exit timeout to n minutes > > To be honest I have no desire to spend more time on bootpd than I > already have. You are welcome to improve the usage formatting if > you like. omg, really? Old "folke lore" You touched, you own it. If I didnt have to go through bde and/or phk I would of just gone and commited the clean up. I have handed you the diff. Perhaps a phab review before would of made this less painfull. And perhaps a phab review once an issue had been raised would of been really less painful. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Wed May 22 15:55:29 2019 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 C67F515AFC53 for ; Wed, 22 May 2019 15:55:29 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (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 41B1F8C673 for ; Wed, 22 May 2019 15:55:29 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1558540519; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=kp97oxDjtV4Cfpq/aZp44VceMRgZFFnJE3aQe5g//DzLWzO2V1hLqcBiQzm+j4OAhEEQVN+HFZwDA gYk0lk/XmZqkPKilzSoq1joz59YemvsKFjDgkHZ6Gyd8AI+mlfUKn1XXlXmFkIrfVvBLAWhXXnqb93 Lp6QoWH13PgVtw4fq7vQH08Cb9cGMtPtT1wrEKF/DuTT0e1w6TgeifAxiqXy02+aztmhfI5OMMlJvL BN5VUmcLBAngr3fhiA/bYTIM8OR+DqY+tuYx1xRx+JtWXitbKiQy+181mKSF81c041icO3qqAb96Vn j3HFYxl86QTzEMKdPq7Hp38XKGe0Plw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=gKnsbhQkIvCxNclI2m/oiLWsOQpjYVU2uFH0D1rHf3Y=; b=SP5Vv8OOQ8IH6NmiaZ5JcaAm8spMlfvmSe+BbbRcTINC5zl92VNv9nsr/yTCErVcy8PR509fliiWL EQEy3L7U+tCHGVD8JqOsilqpm4NcBEP5+MdKZDx2zr6e+AR6cV/P3Pj/YCOPXKo2P3YCvZnWO5SCUK SZDjtJDxkuzuZ0nx1eWSvMvKGqPvygASwxhS+xOCtmMnxMuKlZlWxzPr60kwGV0nZK4LHGjthtR0Ol LiGxJ4s5QwsdN0181eVWgkNTDf3QOppV7VCExiFOradGNmsMWBGwS9Q6ptTkUH5fAwXfecV4gN6NxI NQW1Lfu9m77pv9p5+y2ZY9YiNMXaEgw== ARC-Authentication-Results: i=1; outbound2.eu.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=gKnsbhQkIvCxNclI2m/oiLWsOQpjYVU2uFH0D1rHf3Y=; b=ozWtREdY3fV6K13Z1tYu6y74HOFDZSbMdROSCeOmEru6oO3dfHyf/aiPfiwLH+T2KmVOPevwgsBwK jLin/OXYLyui1g/Gwhl2RpZUQxfZ0UjhelY7m69FzSayw68YFCim5F9h904Z0xqLil3wMwM7lyY5nC hTIqqFPqkV1xhYlBtiS79RKm8oBhYT4TRkXdFdnYihoXh+Y6ZVH+z9GT8UhHHGwMaUcun3NDNKiXI6 xEzt0lA2FS+dteRVjARU0TBNMdH4Iwv7GPJ1Z2+DSc1cdbyReKF6+IMcy9zWKWur7v5I2K4CUmamOR VsmALaULWn3wxknjNDcP0J8ITb5yj+Q== X-MHO-RoutePath: aGlwcGll X-MHO-User: fd796119-7ca9-11e9-85c6-c97e5c048ed3 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound2.eu.mailhop.org (Halon) with ESMTPSA id fd796119-7ca9-11e9-85c6-c97e5c048ed3; Wed, 22 May 2019 15:55:17 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x4MFtFZ3006056; Wed, 22 May 2019 09:55:15 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1d047fa8535df8688a21d17b3a869182df62c942.camel@freebsd.org> Subject: Re: svn commit: r348090 - in head/libexec/bootpd: . bootpgw From: Ian Lepore To: rgrimes@freebsd.org, Mark Johnston Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Wed, 22 May 2019 09:55:15 -0600 In-Reply-To: <201905221548.x4MFmAIF085473@gndrsh.dnsmgr.net> References: <201905221548.x4MFmAIF085473@gndrsh.dnsmgr.net> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 41B1F8C673 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.985,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 15:55:30 -0000 On Wed, 2019-05-22 at 08:48 -0700, Rodney W. Grimes wrote: > > On Tue, May 21, 2019 at 09:25:23PM -0700, Rodney W. Grimes wrote: > > > > Author: markj > > > > Date: Wed May 22 04:13:57 2019 > > > > New Revision: 348090 > > > > URL: https://svnweb.freebsd.org/changeset/base/348090 > > > > > > > > Log: > > > > Marginally improve usage() message style in bootpd. > > > > > > > > - Remove an extra space after "usage:". > > > > - Avoid lines exceeding 80 columns. > > > > > > > > Based on notes from rgrimes. > > > > > > Thanks, but you missed an important aspect of those notes, > > > see inline below. > > > > > > > > > > > MFC with: r348066 > > > > Event: Waterloo Hackathon 2019 > > > > > > > > Modified: > > > > head/libexec/bootpd/bootpd.c > > > > head/libexec/bootpd/bootpgw/bootpgw.c > > > > > > > > Modified: head/libexec/bootpd/bootpd.c > > > > =============================================================== > > > > =============== > > > > --- head/libexec/bootpd/bootpd.c Wed May 22 04:10:24 > > > > 2019 (r348089) > > > > +++ head/libexec/bootpd/bootpd.c Wed May 22 04:13:57 > > > > 2019 (r348090) > > > > @@ -587,8 +587,8 @@ PRIVATE void > > > > usage() > > > > { > > > > fprintf(stderr, > > > > - "usage: bootpd [-a] [-i | -s] [-c > > > > chdir-path] [-d level] [-h hostname] [-t timeout]\n"); > > > > - fprintf(stderr, " [bootptab > > > > [dumpfile]]\n"); > > > > + "usage: bootpd [-a] [-i | -s] [-c chdir-path] > > > > [-d level] [-h hostname]\n" > > > > + " [-t timeout] [bootptab > > > > [dumpfile]]\n"); > > > > fprintf(stderr, "\t -a\tdon't modify ARP table\n"); > > > > fprintf(stderr, "\t -c n\tset current directory\n"); > > > > fprintf(stderr, "\t -d n\tset debug level\n"); > > > > > > These 3 printf's are now miss aligned and contain a \t that > > > should not be there: > > > there may be more, I am only look at what is in context here. > > > - fprintf(stderr, "\t -a\tdon't modify ARP table\n"); > > > - fprintf(stderr, "\t -c n\tset current directory\n"); > > > - fprintf(stderr, "\t -d n\tset debug level\n"); > > > + fprintf(stderr, " -a\tdon't modify ARP table\n"); > > > + fprintf(stderr, " -c n\tset current > > > directory\n"); > > > + fprintf(stderr, " -d n\tset debug level\n"); > > > > They were seemingly misaligned before too. > > > > Before: > > usage: bootpd [-i | -s] [-c chdir-path] [-d level] [-h hostname] > > [-t timeout] > > [bootptab [dumpfile]] > > -c n set current directory > > -d n set debug level > > -h n set the hostname to listen on > > -i force inetd mode (run as child of inetd) > > -s force standalone mode (run without inetd) > > -t n set inetd exit timeout to n minutes > > > > After: > > usage: bootpd [-a] [-i | -s] [-c chdir-path] [-d level] [-h > > hostname] > > [-t timeout] [bootptab [dumpfile]] > > -a don't modify ARP table > > -c n set current directory > > -d n set debug level > > -h n set the hostname to listen on > > -i force inetd mode (run as child of inetd) > > -s force standalone mode (run without inetd) > > -t n set inetd exit timeout to n minutes > > > > To be honest I have no desire to spend more time on bootpd than I > > already have. You are welcome to improve the usage formatting if > > you like. > > omg, really? Old "folke lore" You touched, you own it. > > If I didnt have to go through bde and/or phk I would of just gone > and commited the clean up. I have handed you the diff. > > Perhaps a phab review before would of made this less painfull. > And perhaps a phab review once an issue had been raised would > of been really less painful. > Or perhaps trying to browbeat someone into doing extensive changes when all they intended to do was a simple obvious thing is asking too much. You seem to expend quite a bit of energy in making perfect the enemy of better. The long term result of that is that either people will just habitually ignore your feedback, or they'll stop doing simple things to make the world better because they're tired of being told their work achieves less than perfection. -- Ian From owner-svn-src-head@freebsd.org Wed May 22 15:56:42 2019 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 9A06C15AFD47; Wed, 22 May 2019 15:56:42 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3E57F8C80B; Wed, 22 May 2019 15:56:42 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 141A11FA20; Wed, 22 May 2019 15:56:42 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4MFufsZ024559; Wed, 22 May 2019 15:56:41 GMT (envelope-from luporl@FreeBSD.org) Received: (from luporl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4MFufae024556; Wed, 22 May 2019 15:56:41 GMT (envelope-from luporl@FreeBSD.org) Message-Id: <201905221556.x4MFufae024556@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luporl set sender to luporl@FreeBSD.org using -f From: Leandro Lupori Date: Wed, 22 May 2019 15:56:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348112 - in head/sys: conf powerpc/aim powerpc/powerpc X-SVN-Group: head X-SVN-Commit-Author: luporl X-SVN-Commit-Paths: in head/sys: conf powerpc/aim powerpc/powerpc X-SVN-Commit-Revision: 348112 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3E57F8C80B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 15:56:42 -0000 Author: luporl Date: Wed May 22 15:56:41 2019 New Revision: 348112 URL: https://svnweb.freebsd.org/changeset/base/348112 Log: Fix PPC64 kernel build with clang8 + lld8 This patch fixes the following lld link errors: - unsupported dynamic relocations on read-only sections - out-of-range TOC references Submitted by: git_bdragon.rtk0.net Reviewed by: jhibbits, luporl MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D19352 Modified: head/sys/conf/ldscript.powerpc64 head/sys/powerpc/aim/trap_subr64.S head/sys/powerpc/powerpc/cpu_subr64.S Modified: head/sys/conf/ldscript.powerpc64 ============================================================================== --- head/sys/conf/ldscript.powerpc64 Wed May 22 15:39:35 2019 (r348111) +++ head/sys/conf/ldscript.powerpc64 Wed May 22 15:56:41 2019 (r348112) @@ -98,7 +98,8 @@ SECTIONS .opd : ALIGN(8) { KEEP (*(.opd)) } .branch_lt : ALIGN(8) { *(.branch_lt) } . = ALIGN(4096); - .got : ALIGN(8) { __tocbase = .; *(.got .toc) } + .got : ALIGN(8) { __tocbase = .; *(.got) } + .toc : ALIGN(8) { *(.toc) } .dynamic : { *(.dynamic) } :text :dynamic /* Put .ctors and .dtors next to the .got2 section, so that the pointers Modified: head/sys/powerpc/aim/trap_subr64.S ============================================================================== --- head/sys/powerpc/aim/trap_subr64.S Wed May 22 15:39:35 2019 (r348111) +++ head/sys/powerpc/aim/trap_subr64.S Wed May 22 15:56:41 2019 (r348112) @@ -317,29 +317,33 @@ CNAME(rstcode): * processor is waking up from power saving mode * It is software reset when 46:47 = 0b00 */ + /* 0x00 */ + ld %r2,TRAP_GENTRAP(0) /* Real-mode &generictrap */ mfsrr1 %r9 /* Load SRR1 into r9 */ andis. %r9,%r9,0x3 /* Logic AND with 46:47 bits */ + beq 2f /* Branch if software reset */ - bl 1f - .llong cpu_wakeup_handler + /* 0x10 */ + /* Reset was wakeup */ + addi %r9,%r2,(cpu_wakeup_handler-generictrap) + b 1f /* Was power save, do the wakeup */ - /* It is software reset */ - + /* Reset was software reset */ /* Explicitly set MSR[SF] */ 2: mfmsr %r9 li %r8,1 + /* 0x20 */ insrdi %r9,%r8,1,0 mtmsrd %r9 isync - bl 1f - .llong cpu_reset_handler /* Make sure to maintain 8-byte alignment */ + addi %r9,%r2,(cpu_reset_handler-generictrap) -1: mflr %r9 - ld %r9,0(%r9) - mtlr %r9 - - blr + /* 0x30 */ +1: mtlr %r9 + blr /* Branch to either cpu_reset_handler + * or cpu_wakeup_handler. + */ CNAME(rstcodeend): cpu_reset_handler: @@ -459,52 +463,59 @@ CNAME(hypertrapcode): addi %r1,%r1,(generichypertrap-generictrap) mtlr %r1 li %r1, 0xe0 /* How to get the vector from LR */ - blrl /* Branch to generictrap */ + blrl /* Branch to generichypertrap */ CNAME(hypertrapcodeend): /* * For SLB misses: do special things for the kernel * - * Note: SPRG1 is always safe to overwrite any time the MMU is on, which is + * Note: SPRG1 is always safe to overwrite any time the MMU was on, which is * the only time this can be called. */ .globl CNAME(slbtrap),CNAME(slbtrapend) .p2align 3 CNAME(slbtrap): + /* 0x00 */ mtsprg1 %r1 /* save SP */ GET_CPUINFO(%r1) - std %r2,(PC_SLBSAVE+16)(%r1) - mfcr %r2 /* save CR */ - std %r2,(PC_SLBSAVE+104)(%r1) + std %r2,(PC_SLBSAVE+16)(%r1) /* save r2 */ + mfcr %r2 + /* 0x10 */ + std %r2,(PC_SLBSAVE+104)(%r1) /* save CR */ mfsrr1 %r2 /* test kernel mode */ mtcr %r2 bf 17,2f /* branch if PSL_PR is false */ + /* 0x20 */ /* User mode */ - ld %r2,(PC_SLBSAVE+104)(%r1) /* Restore CR */ - mtcr %r2 - ld %r2,(PC_SLBSAVE+16)(%r1) /* Restore R2 */ - mflr %r1 /* Save the old LR in r1 */ - mtsprg2 %r1 /* And then in SPRG2 */ - /* 52 bytes so far */ - bl 1f - .llong generictrap -1: mflr %r1 - ld %r1,0(%r1) + ld %r2,(PC_SLBSAVE+104)(%r1) + mtcr %r2 /* restore CR */ + ld %r2,(PC_SLBSAVE+16)(%r1) /* restore r2 */ + mflr %r1 + /* 0x30 */ + mtsprg2 %r1 /* save LR in SPRG2 */ + ld %r1,TRAP_GENTRAP(0) /* real-mode &generictrap */ mtlr %r1 li %r1, 0x80 /* How to get the vector from LR */ + /* 0x40 */ blrl /* Branch to generictrap */ - /* 84 bytes */ 2: mflr %r2 /* Save the old LR in r2 */ - nop - bl 3f /* Begin dance to jump to kern_slbtrap*/ - .llong kern_slbtrap -3: mflr %r1 - ld %r1,0(%r1) + /* Kernel mode */ + ld %r1,TRAP_GENTRAP(0) /* Real-mode &generictrap */ + addi %r1,%r1,(kern_slbtrap-generictrap) + /* 0x50 */ mtlr %r1 GET_CPUINFO(%r1) - blrl /* 124 bytes -- 4 to spare */ + blrl /* Branch to kern_slbtrap */ +/* must fit in 128 bytes! */ CNAME(slbtrapend): +/* + * On entry: + * SPRG1: SP + * r1: pcpu + * r2: LR + * LR: branch address in trap region + */ kern_slbtrap: std %r2,(PC_SLBSAVE+136)(%r1) /* old LR */ std %r3,(PC_SLBSAVE+24)(%r1) /* save R3 */ @@ -512,7 +523,7 @@ kern_slbtrap: /* Check if this needs to be handled as a regular trap (userseg miss) */ mflr %r2 andi. %r2,%r2,0xff80 - cmpwi %r2,0x380 + cmpwi %r2,EXC_DSE bne 1f mfdar %r2 b 2f @@ -641,14 +652,8 @@ CNAME(alitrap): mflr %r28 /* save LR */ mfcr %r29 /* save CR */ - /* Begin dance to branch to s_trap in a bit */ - b 1f - .p2align 3 -1: nop - bl 1f - .llong s_trap -1: mflr %r31 - ld %r31,0(%r31) + ld %r31,TRAP_GENTRAP(0) + addi %r31,%r31,(s_trap - generictrap) mtlr %r31 /* Put our exception vector in SPRG3 */ @@ -658,7 +663,7 @@ CNAME(alitrap): /* Test whether we already had PR set */ mfsrr1 %r31 mtcr %r31 - blrl + blrl /* Branch to s_trap */ CNAME(aliend): /* @@ -681,12 +686,10 @@ CNAME(dsitrap): mfsrr1 %r31 /* test kernel mode */ mtcr %r31 mflr %r28 /* save LR (SP already saved) */ - bl 1f /* Begin branching to disitrap */ - .llong disitrap -1: mflr %r1 - ld %r1,0(%r1) + ld %r1,TRAP_GENTRAP(0) + addi %r1,%r1,(disitrap-generictrap) mtlr %r1 - blrl /* Branch to generictrap */ + blrl /* Branch to disitrap */ CNAME(dsiend): /* @@ -956,7 +959,7 @@ CNAME(dblow): mtlr %r1 li %r1, 0 /* How to get the vector from LR */ blrl /* Branch to generictrap */ - + /* No fallthrough */ 1: GET_CPUINFO(%r1) std %r27,(PC_DBSAVE+CPUSAVE_R27)(%r1) /* free r27 */ @@ -966,12 +969,9 @@ CNAME(dblow): std %r30,(PC_DBSAVE+CPUSAVE_R30)(%r1) /* free r30 */ std %r31,(PC_DBSAVE+CPUSAVE_R31)(%r1) /* free r31 */ mflr %r28 /* save LR */ - nop /* alignment */ - bl 9f /* Begin branch */ - .llong dbtrap -9: mflr %r1 - ld %r1,0(%r1) + ld %r1,TRAP_GENTRAP(0) + addi %r1,%r1,(dbtrap-generictrap) mtlr %r1 - blrl /* Branch to generictrap */ + blrl /* Branch to dbtrap */ CNAME(dbend): #endif /* KDB */ Modified: head/sys/powerpc/powerpc/cpu_subr64.S ============================================================================== --- head/sys/powerpc/powerpc/cpu_subr64.S Wed May 22 15:39:35 2019 (r348111) +++ head/sys/powerpc/powerpc/cpu_subr64.S Wed May 22 15:56:41 2019 (r348112) @@ -31,7 +31,6 @@ #include - .globl CNAME(power_save_sequence) .p2align 3 ENTRY(enter_idle_powerx) mfsprg0 %r3 /* Get the pcpu pointer */ @@ -65,11 +64,9 @@ ENTRY(enter_idle_powerx) std %r1,PCB_SP(%r3) /* Save the stack pointer */ std %r2,PCB_TOC(%r3) /* Save the TOC pointer */ - /* Set where we want to jump */ bl 1f - .llong power_save_sequence /* Remember about 8 byte alignment */ 1: mflr %r3 - ld %r3,0(%r3) + addi %r3,%r3,power_save_sequence-1b mtsrr0 %r3 /* Set MSR */ @@ -82,7 +79,7 @@ ENTRY(enter_idle_powerx) rfid .p2align 2 -CNAME(power_save_sequence): +power_save_sequence: bl 1f .llong 0x0 /* Playground for power-save sequence */ 1: mflr %r3 From owner-svn-src-head@freebsd.org Wed May 22 16:20:06 2019 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 2E67215B06A7; Wed, 22 May 2019 16:20:06 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C3F8D8D5D9; Wed, 22 May 2019 16:20:05 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id B5A1317CAD; Wed, 22 May 2019 16:20:05 +0000 (UTC) Date: Wed, 22 May 2019 16:20:05 +0000 From: Alexey Dokuchaev To: Adrian Chadd Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r250609 - head/sys/dev/ath Message-ID: <20190522162005.GA82729@FreeBSD.org> References: <201305131903.r4DJ3DHm045333@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201305131903.r4DJ3DHm045333@svn.freebsd.org> User-Agent: Mutt/1.11.4 (2019-03-13) X-Rspamd-Queue-Id: C3F8D8D5D9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.94)[-0.937,0]; ASN(0.00)[asn:11403, ipnet:96.47.64.0/20, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 16:20:06 -0000 On Mon, May 13, 2013 at 07:03:13PM +0000, Adrian Chadd wrote: > New Revision: 250609 > URL: http://svnweb.freebsd.org/changeset/base/250609 > > Log: > Since the node state is 100% back under the TX lock, just kill the use > of atomics. > > Modified: > head/sys/dev/ath/if_ath.c > > @@ -6140,13 +6133,13 @@ ath_tx_update_tim(struct ath_softc *sc, > /* > * Don't bother grabbing the lock unless the queue is empty. > */ > - if (atomic_load_acq_int(&an->an_swq_depth) != 0) > + if (&an->an_swq_depth != 0) > return; > > if (an->an_is_powersave && > an->an_stack_psq == 0 && > an->an_tim_set == 1 && > - atomic_load_acq_int(&an->an_swq_depth) == 0) { > + an->an_swq_depth == 0) { PVS Studio complains here: warning: V560 A part of conditional expression is always true: an->an_swq_depth == 0. Which probably makes sense since you return earlier if it's != 0. ./danfe From owner-svn-src-head@freebsd.org Wed May 22 16:24:40 2019 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 18B6915B0A2B; Wed, 22 May 2019 16:24:40 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AF95F8DBD5; Wed, 22 May 2019 16:24:39 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 854DF1FF30; Wed, 22 May 2019 16:24:39 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4MGOdYp039740; Wed, 22 May 2019 16:24:39 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4MGOdwc039739; Wed, 22 May 2019 16:24:39 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201905221624.x4MGOdwc039739@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 22 May 2019 16:24:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348113 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 348113 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AF95F8DBD5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 16:24:40 -0000 Author: asomers Date: Wed May 22 16:24:39 2019 New Revision: 348113 URL: https://svnweb.freebsd.org/changeset/base/348113 Log: Update VFS_FHTOVP(9) with the flags argument Revison 222167 added a new argument to VFS_FHTOVP. This revision updates the man page to match. Reviewed by: rmacklem MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20323 Modified: head/share/man/man9/VFS_FHTOVP.9 Modified: head/share/man/man9/VFS_FHTOVP.9 ============================================================================== --- head/share/man/man9/VFS_FHTOVP.9 Wed May 22 15:56:41 2019 (r348112) +++ head/share/man/man9/VFS_FHTOVP.9 Wed May 22 16:24:39 2019 (r348113) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 4, 2010 +.Dd May 19, 2019 .Dt VFS_FHTOVP 9 .Os .Sh NAME @@ -39,18 +39,26 @@ .In sys/mount.h .In sys/vnode.h .Ft int -.Fn VFS_FHTOVP "struct mount *mp" "struct fid *fhp" "struct vnode **vpp" +.Fn VFS_FHTOVP "struct mount *mp" "struct fid *fhp" "int flags" "struct vnode **vpp" .Sh DESCRIPTION The .Fn VFS_FHTOVP macro is used by the NFS server to turn an NFS filehandle into a vnode. .Pp The arguments it expects are: -.Bl -tag -width vpp +.Bl -tag -width flags .It Fa mp The file system. .It Fa fhp The filehandle to convert. +.It Fa flags +Additional locking flags to pass through to +.Xr vget 9 . +File systems are allowed to ignore +.Ar flags +and use +.Dv LK_EXCLUSIVE +instead. .It Fa vpp Return parameter for the new locked vnode. .El From owner-svn-src-head@freebsd.org Wed May 22 16:34:45 2019 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 DA2CE15B0CC3 for ; Wed, 22 May 2019 16:34:44 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound3d.ore.mailhop.org (outbound3d.ore.mailhop.org [54.186.57.195]) (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 4A1448E0D9 for ; Wed, 22 May 2019 16:34:44 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1558542877; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=eGVD4eJ0vEOuVcVPInoGhTe1u0NJnbawFa5mQjiuyETobt40HUiUCTzzUkrrajbjdXrXqoWcNGgi8 oJSqciF3udT5uCN8gR/qsLX0utEPmYAivoMzcxVFmzVoER5hl3Tqtpz2etujpabanvKdl2ZCNqFBjY mP0JVtRqpi8mrPs1lFPnh6nwsTrOv191A3cOcsjc7eCTK2G7ASkKeaKGFgcg+lRlNb/AZN2GlwyssA MLTnBTy7s2vj8/28OmCcc78LU8xC8qoklIcey7jIIRNq9/ZjnIfkIT51gz4OHSKQxbu9pTvTbyiNhV MzpMnC6cqXIU8D3VhFHAd/QpGSY9NnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=OFYVDxmTS1Agp5uPaYVuBEM6pNwW3QOXB/ZgPplSxkQ=; b=nf9hcB0RaCzQo4it3kOedEDxhRiex5bc93vG2r89UVByzZoQ3lxovvuS3EXx+4PqOru5aPbCvvzrm Xzxk08IuCKp9YYIJpwwNUt50Pf8SxSTbnEpNeE75dUH7aKkmrVfzNsio0FSFyAlQwHNfcjT+FqValY vPTtmfu7mjn0kaBPCIuMP8ET1242ffT59osI7HAMgO3W2YHUISUpi4EnBGeYFNHnZ3TALrxCV/FO2V GdM8c6ti1MfGt4Uv8maV9ckqZvpcYQXOPjbp3HR8XCa7/raXQtC4BqvsCepP/NLPu0URMeq3PXmsBW 9ar4+AxHpyWPP6bUcezHtCM/7zn3Jtw== ARC-Authentication-Results: i=1; outbound3.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=OFYVDxmTS1Agp5uPaYVuBEM6pNwW3QOXB/ZgPplSxkQ=; b=p0Ia1r+BTaTM67+Rh/82P1NDSnize8UQ3ynFIxSoNaCH0D+psh8Eatih7OyFqWz2tsyijM7i4uEAL fNWoS0C0+SIGBrXnOmvg0vh9RczfYLt+EXjCBqBa/Qnm9KyupniK7Db9ENZRRd4EsVrO6ud8Ks8Avk FG8e3CyLOB7XuWI80nNyWsludyZW1uJhz7hew0nCYarTBEQq+t/ENhK7u3mQ6hXGZgbzO3Hj+WgNqB ExIIK9J6SD09yjuGb8ZN55y4ojOj25jb7HORlwSi7PODDaJwf3eQcgmuznfAgZpZQw9HgEu7RDMKHy COZYnHZm4BJTu4uUcX3ynOkm4p+yRWQ== X-MHO-RoutePath: aGlwcGll X-MHO-User: 7c0a3dbf-7caf-11e9-990f-673a89bc4518 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound3.ore.mailhop.org (Halon) with ESMTPSA id 7c0a3dbf-7caf-11e9-990f-673a89bc4518; Wed, 22 May 2019 16:34:36 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x4MGYZad006203; Wed, 22 May 2019 10:34:35 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <953361717e24b2e3a6911940881f42dcd05736c0.camel@freebsd.org> Subject: Re: svn commit: r250609 - head/sys/dev/ath From: Ian Lepore To: Alexey Dokuchaev , Adrian Chadd Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Wed, 22 May 2019 10:34:35 -0600 In-Reply-To: <20190522162005.GA82729@FreeBSD.org> References: <201305131903.r4DJ3DHm045333@svn.freebsd.org> <20190522162005.GA82729@FreeBSD.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4A1448E0D9 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 16:34:45 -0000 On Wed, 2019-05-22 at 16:20 +0000, Alexey Dokuchaev wrote: > On Mon, May 13, 2013 at 07:03:13PM +0000, Adrian Chadd wrote: > > New Revision: 250609 > > URL: http://svnweb.freebsd.org/changeset/base/250609 > > > > Log: > > Since the node state is 100% back under the TX lock, just kill > > the use > > of atomics. > > > > Modified: > > head/sys/dev/ath/if_ath.c > > > > @@ -6140,13 +6133,13 @@ ath_tx_update_tim(struct ath_softc *sc, > > /* > > * Don't bother grabbing the lock unless the queue is > > empty. > > */ > > - if (atomic_load_acq_int(&an->an_swq_depth) != 0) > > + if (&an->an_swq_depth != 0) > > return; > > > > if (an->an_is_powersave && > > an->an_stack_psq == 0 && > > an->an_tim_set == 1 && > > - atomic_load_acq_int(&an->an_swq_depth) == 0) { > > + an->an_swq_depth == 0) { > > PVS Studio complains here: warning: V560 A part of conditional > expression > is always true: an->an_swq_depth == 0. Which probably makes sense > since > you return earlier if it's != 0. > > ./danfe > You're replying to a six year old commit? It doesn't check earlier whether that value is 0, it checks whether the address of that value is 0. That's probably a bug. -- Ian From owner-svn-src-head@freebsd.org Wed May 22 16:36:12 2019 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 D890915B0D5C; Wed, 22 May 2019 16:36:12 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 761A08E250; Wed, 22 May 2019 16:36:12 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 67C2418258; Wed, 22 May 2019 16:36:12 +0000 (UTC) Date: Wed, 22 May 2019 16:36:12 +0000 From: Alexey Dokuchaev To: Adrian Chadd Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r244943 - in head/sys/dev/ath/ath_hal: ar5416 ar9002 Message-ID: <20190522163612.GA4626@FreeBSD.org> References: <201301020038.r020c1fN074342@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201301020038.r020c1fN074342@svn.freebsd.org> User-Agent: Mutt/1.11.4 (2019-03-13) X-Rspamd-Queue-Id: 761A08E250 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.937,0]; ASN(0.00)[asn:11403, ipnet:96.47.64.0/20, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 16:36:13 -0000 On Wed, Jan 02, 2013 at 12:38:01AM +0000, Adrian Chadd wrote: > New Revision: 244943 > URL: http://svnweb.freebsd.org/changeset/base/244943 > > Log: > Bring over the basic spectral scan framework code from Qualcomm Atheros. > > This includes the HAL routines to setup, enable/activate/disable spectral > scan and configure the relevant registers. > > Obtained from: Qualcomm Atheros > > Added: > head/sys/dev/ath/ath_hal/ar5416/ar5416_spectral.c > > ... > + if (ss->ss_period != HAL_SPECTRAL_PARAM_NOVAL) { > + val &= ~AR_PHY_SPECTRAL_SCAN_PERIOD; > + val |= SM(ss->ss_period, AR_PHY_SPECTRAL_SCAN_PERIOD); > + } > + > + if (ss->ss_period != HAL_SPECTRAL_PARAM_NOVAL) { > + val &= ~AR_PHY_SPECTRAL_SCAN_PERIOD; > + val |= SM(ss->ss_period, AR_PHY_SPECTRAL_SCAN_PERIOD); > + } PVS Studio complains here: warning: V581 The conditional expressions of the 'if' operators situated alongside each other are identical. ./danfe From owner-svn-src-head@freebsd.org Wed May 22 16:37:53 2019 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 9A3FA15B0E11; Wed, 22 May 2019 16:37:53 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3D5468E3BE; Wed, 22 May 2019 16:37:53 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 2D4F418385; Wed, 22 May 2019 16:37:53 +0000 (UTC) Date: Wed, 22 May 2019 16:37:53 +0000 From: Alexey Dokuchaev To: Ian Lepore Cc: Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r250609 - head/sys/dev/ath Message-ID: <20190522163753.GA5149@FreeBSD.org> References: <201305131903.r4DJ3DHm045333@svn.freebsd.org> <20190522162005.GA82729@FreeBSD.org> <953361717e24b2e3a6911940881f42dcd05736c0.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <953361717e24b2e3a6911940881f42dcd05736c0.camel@freebsd.org> User-Agent: Mutt/1.11.4 (2019-03-13) X-Rspamd-Queue-Id: 3D5468E3BE X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.95)[-0.954,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 16:37:53 -0000 On Wed, May 22, 2019 at 10:34:35AM -0600, Ian Lepore wrote: > On Wed, 2019-05-22 at 16:20 +0000, Alexey Dokuchaev wrote: > > On Mon, May 13, 2013 at 07:03:13PM +0000, Adrian Chadd wrote: > > > New Revision: 250609 > > > URL: http://svnweb.freebsd.org/changeset/base/250609 > > > > > > Log: > > > Since the node state is 100% back under the TX lock, just kill > > > the use > > > of atomics. > > > > > > Modified: > > > head/sys/dev/ath/if_ath.c > > > > > > @@ -6140,13 +6133,13 @@ ath_tx_update_tim(struct ath_softc *sc, > > > /* > > > * Don't bother grabbing the lock unless the queue is > > > empty. > > > */ > > > - if (atomic_load_acq_int(&an->an_swq_depth) != 0) > > > + if (&an->an_swq_depth != 0) > > > return; > > > > > > if (an->an_is_powersave && > > > an->an_stack_psq == 0 && > > > an->an_tim_set == 1 && > > > - atomic_load_acq_int(&an->an_swq_depth) == 0) { > > > + an->an_swq_depth == 0) { > > > > PVS Studio complains here: warning: V560 A part of conditional > > expression > > is always true: an->an_swq_depth == 0. Which probably makes sense > > since > > you return earlier if it's != 0. > > You're replying to a six year old commit? Yeah, anything wrong with it? > It doesn't check earlier whether that value is 0, it checks whether the > address of that value is 0. That's probably a bug. No, the & is a vestige from the atomic_* conversion, it is not present in current code. The check is still there, however. ./danfe From owner-svn-src-head@freebsd.org Wed May 22 16:49:23 2019 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 7DF0715B1145; Wed, 22 May 2019 16:49:23 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1A6C88E912; Wed, 22 May 2019 16:49:23 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-io1-xd2f.google.com with SMTP id z4so2448935iol.0; Wed, 22 May 2019 09:49:23 -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=Y5d/zsUdRPtDhcymNkvXKaVGvKryaTtYeA7AUlqbrGA=; b=XECWld8v6zMCO7YgGl53PK0E3A0xwCYH4hpYzhBpEd8FPOJ1AFncdMmJmoxflOg/d4 /7TqUt+JFs0Td+z6vuU7WBpl1PaGHPjc7hqi+459V/GfY32IjMlbDjNe3oaJr51p3+ST eqh9X7LxtHw2RXi3AT9bgfbZILEj5qL/2qqdIDGbC+q3pMeYadG91rhArrzViEUM5+uk aM1Oy/i6MZQpknMb7l+TCkOwxq8vqCW9zYoW3R0rMXE/Su0dMuCDg67R6LGe3qpgSSbD GvcgS658FHfGyyltoZr8ySILJKSREU8nxfE77vWC5mhYSABeWuqRne9guR+yQ9Noq4Ie 8ZFw== 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=Y5d/zsUdRPtDhcymNkvXKaVGvKryaTtYeA7AUlqbrGA=; b=al/GwAw0wiR76UoYqJyZ8RC3O3Vko4vcgv+XgBscp7b5f44UPd0MH5sNT1S7t01Ub3 8COt04HQvOqp5aVSS8kYSlhSYAea/5fUqgDbZZVz1ZEYjMYX7Zcc2sxldQlyKEf5KQMg wyOtRzWVQ6ufwb4Vd8FBCoaOZmSNdFxapKtbghiysbbm1pgojfUTS57J5tA7tJ7I24sR a2PTcNnDIM+pA8Ma9YiqdnM7FZR0E1HqMZfILFx3zgDaTvqNbi1fYHbhmzeIM9b3W+PM 0nSZZ5UOy5g4Yf2LvZUim/fAPi209JRGVrpVhxu8+Y6wNKTOKTT8FhtT6VCMp3MHmZgl S07g== X-Gm-Message-State: APjAAAWE36HeK5ByJZUG4nwfnYVvxvjn5ZkL0ppkL3SGdINnWiUOSXYC PPJSUfQt3+x6quHiLkH4Pp1c1vo3 X-Google-Smtp-Source: APXvYqwvtguJg8t6N4P3PqH2iwXwDNMjNi+vB7o9MNN0c+oVPIkS8okBlv9FWBiQUb1Ve6XjQu6WrA== X-Received: by 2002:a5e:8513:: with SMTP id i19mr30472602ioj.119.1558543761884; Wed, 22 May 2019 09:49:21 -0700 (PDT) Received: from spy (cs-auth-dc-129-97-60-193.dynamic.uwaterloo.ca. [129.97.60.193]) by smtp.gmail.com with ESMTPSA id y99sm3022842ita.23.2019.05.22.09.49.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 22 May 2019 09:49:21 -0700 (PDT) Sender: Mark Johnston Date: Wed, 22 May 2019 12:49:19 -0400 From: Mark Johnston To: rgrimes@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r348090 - in head/libexec/bootpd: . bootpgw Message-ID: <20190522164919.GC5125@spy> References: <20190522151116.GB5125@spy> <201905221548.x4MFmAIF085473@gndrsh.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201905221548.x4MFmAIF085473@gndrsh.dnsmgr.net> User-Agent: Mutt/1.11.4 (2019-03-13) X-Rspamd-Queue-Id: 1A6C88E912 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 16:49:23 -0000 On Wed, May 22, 2019 at 08:48:10AM -0700, Rodney W. Grimes wrote: > > On Tue, May 21, 2019 at 09:25:23PM -0700, Rodney W. Grimes wrote: > > To be honest I have no desire to spend more time on bootpd than I > > already have. You are welcome to improve the usage formatting if > > you like. > > omg, really? Old "folke lore" You touched, you own it. I own plenty of things already. > If I didnt have to go through bde and/or phk I would of just gone > and commited the clean up. Ok, that's something for you to figure out. > I have handed you the diff. > > Perhaps a phab review before would of made this less painfull. > And perhaps a phab review once an issue had been raised would > of been really less painful. There was a phab review for the original change, and I fixed an issue that was introduced by that change. I think that's sufficient. From owner-svn-src-head@freebsd.org Wed May 22 16:59:24 2019 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 F297E15B1667; Wed, 22 May 2019 16:59:23 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 977158F02B; Wed, 22 May 2019 16:59:23 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6C4CE2045B; Wed, 22 May 2019 16:59:23 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4MGxN4p055454; Wed, 22 May 2019 16:59:23 GMT (envelope-from zeising@FreeBSD.org) Received: (from zeising@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4MGxNYN055453; Wed, 22 May 2019 16:59:23 GMT (envelope-from zeising@FreeBSD.org) Message-Id: <201905221659.x4MGxNYN055453@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zeising set sender to zeising@FreeBSD.org using -f From: Niclas Zeising Date: Wed, 22 May 2019 16:59:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348114 - head X-SVN-Group: head X-SVN-Commit-Author: zeising X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 348114 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 977158F02B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.955,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 16:59:24 -0000 Author: zeising (doc,ports committer) Date: Wed May 22 16:59:22 2019 New Revision: 348114 URL: https://svnweb.freebsd.org/changeset/base/348114 Log: Fix ObsoleteFiles after ethernet driver removal Fix OpsoleteFiles.inc after removal of ethernet drivers. The drivers have manual pages, and manual pages are generally stored compressed, with a .gz suffix, but this is not reflected in ObsoleteFiles and make delete-old fails to remove them. Approved by: brooks Sponsored by: B3 Init Differential Revision: https://reviews.freebsd.org/D20351 Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Wed May 22 16:24:39 2019 (r348113) +++ head/ObsoleteFiles.inc Wed May 22 16:59:22 2019 (r348114) @@ -39,31 +39,31 @@ # done # 20190517: Remove obsolete 10 and 10/100 ethernet drivers. -OLD_FILES+=usr/share/man/man4/bm.4 -OLD_FILES+=usr/share/man/man4/cs.4 -OLD_FILES+=usr/share/man/man4/de.4 -OLD_FILES+=usr/share/man/man4/if_de.4 -OLD_FILES+=usr/share/man/man4/ed.4 -OLD_FILES+=usr/share/man/man4/if_ed.4 -OLD_FILES+=usr/share/man/man4/ep.4 -OLD_FILES+=usr/share/man/man4/ex.4 -OLD_FILES+=usr/share/man/man4/fe.4 -OLD_FILES+=usr/share/man/man4/pcn.4 -OLD_FILES+=usr/share/man/man4/if_pcn.4 -OLD_FILES+=usr/share/man/man4/sf.4 -OLD_FILES+=usr/share/man/man4/if_sf.4 -OLD_FILES+=usr/share/man/man4/sn.4 -OLD_FILES+=usr/share/man/man4/if_sn.4 -OLD_FILES+=usr/share/man/man4/tl.4 -OLD_FILES+=usr/share/man/man4/if_tl.4 -OLD_FILES+=usr/share/man/man4/tx.4 -OLD_FILES+=usr/share/man/man4/if_tx.4 -OLD_FILES+=usr/share/man/man4/txp.4 -OLD_FILES+=usr/share/man/man4/if_txp.4 -OLD_FILES+=usr/share/man/man4/vx.4 -OLD_FILES+=usr/share/man/man4/wb.4 -OLD_FILES+=usr/share/man/man4/xe.4 -OLD_FILES+=usr/share/man/man4/if_xe.4 +OLD_FILES+=usr/share/man/man4/bm.4.gz +OLD_FILES+=usr/share/man/man4/cs.4.gz +OLD_FILES+=usr/share/man/man4/de.4.gz +OLD_FILES+=usr/share/man/man4/if_de.4.gz +OLD_FILES+=usr/share/man/man4/ed.4.gz +OLD_FILES+=usr/share/man/man4/if_ed.4.gz +OLD_FILES+=usr/share/man/man4/ep.4.gz +OLD_FILES+=usr/share/man/man4/ex.4.gz +OLD_FILES+=usr/share/man/man4/fe.4.gz +OLD_FILES+=usr/share/man/man4/pcn.4.gz +OLD_FILES+=usr/share/man/man4/if_pcn.4.gz +OLD_FILES+=usr/share/man/man4/sf.4.gz +OLD_FILES+=usr/share/man/man4/if_sf.4.gz +OLD_FILES+=usr/share/man/man4/sn.4.gz +OLD_FILES+=usr/share/man/man4/if_sn.4.gz +OLD_FILES+=usr/share/man/man4/tl.4.gz +OLD_FILES+=usr/share/man/man4/if_tl.4.gz +OLD_FILES+=usr/share/man/man4/tx.4.gz +OLD_FILES+=usr/share/man/man4/if_tx.4.gz +OLD_FILES+=usr/share/man/man4/txp.4.gz +OLD_FILES+=usr/share/man/man4/if_txp.4.gz +OLD_FILES+=usr/share/man/man4/vx.4.gz +OLD_FILES+=usr/share/man/man4/wb.4.gz +OLD_FILES+=usr/share/man/man4/xe.4.gz +OLD_FILES+=usr/share/man/man4/if_xe.4.gz # 20190513: libcap_sysctl interface change OLD_FILES+=lib/casper/libcap_sysctl.1 # 20190509: tests/sys/opencrypto requires the net/py-dpkt package. From owner-svn-src-head@freebsd.org Wed May 22 17:40:55 2019 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 1B5A415B2FC9; Wed, 22 May 2019 17:40:55 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B6B6A9091C; Wed, 22 May 2019 17:40:54 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8E33020B4E; Wed, 22 May 2019 17:40:54 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4MHesHw077013; Wed, 22 May 2019 17:40:54 GMT (envelope-from dougm@FreeBSD.org) Received: (from dougm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4MHesJW077012; Wed, 22 May 2019 17:40:54 GMT (envelope-from dougm@FreeBSD.org) Message-Id: <201905221740.x4MHesJW077012@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dougm set sender to dougm@FreeBSD.org using -f From: Doug Moore Date: Wed, 22 May 2019 17:40:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348115 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: dougm X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 348115 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B6B6A9091C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 17:40:55 -0000 Author: dougm Date: Wed May 22 17:40:54 2019 New Revision: 348115 URL: https://svnweb.freebsd.org/changeset/base/348115 Log: Passing a parameter to vm_map_entry_resize_free that describes the amount of resizing reduces the number of functions changing the vm_map invariants regarding the max_free field of map entries. Reviewed by: markj (mentor) Approved by: kib (mentor) Differential Revision: https://reviews.freebsd.org/D20356 Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Wed May 22 16:59:22 2019 (r348114) +++ head/sys/vm/vm_map.c Wed May 22 17:40:54 2019 (r348115) @@ -1251,7 +1251,7 @@ vm_map_entry_unlink(vm_map_t map, * The map must be locked, and leaves it so. */ static void -vm_map_entry_resize_free(vm_map_t map, vm_map_entry_t entry) +vm_map_entry_resize_free(vm_map_t map, vm_map_entry_t entry, size_t grow_amount) { vm_map_entry_t llist, rlist, root; @@ -1262,11 +1262,12 @@ vm_map_entry_resize_free(vm_map_t map, vm_map_entry_t ("vm_map_entry_resize_free: resize_free object not mapped")); vm_map_splay_findnext(root, &rlist); root->right = NULL; + entry->end += grow_amount; map->root = vm_map_splay_merge(root, llist, rlist, root->left, root->right); VM_MAP_ASSERT_CONSISTENT(map); - CTR3(KTR_VM, "vm_map_entry_resize_free: map %p, nentries %d, entry %p", map, - map->nentries, entry); + CTR3(KTR_VM, "vm_map_entry_resize_free: map %p, nentries %d, entry %p", + map, map->nentries, entry); } /* @@ -1486,8 +1487,8 @@ charged: prev_entry)); if ((prev_entry->eflags & MAP_ENTRY_GUARD) == 0) map->size += end - prev_entry->end; - prev_entry->end = end; - vm_map_entry_resize_free(map, prev_entry); + vm_map_entry_resize_free(map, prev_entry, + end - prev_entry->end); vm_map_simplify_entry(map, prev_entry); return (KERN_SUCCESS); } @@ -4314,7 +4315,7 @@ retry: } else { MPASS(gap_entry->start < gap_entry->end - grow_amount); gap_entry->end -= grow_amount; - vm_map_entry_resize_free(map, gap_entry); + vm_map_entry_resize_free(map, gap_entry, -grow_amount); gap_deleted = false; } rv = vm_map_insert(map, NULL, 0, grow_start, @@ -4327,10 +4328,9 @@ retry: gap_end, VM_PROT_NONE, VM_PROT_NONE, MAP_CREATE_GUARD | MAP_CREATE_STACK_GAP_DN); MPASS(rv1 == KERN_SUCCESS); - } else { - gap_entry->end += grow_amount; - vm_map_entry_resize_free(map, gap_entry); - } + } else + vm_map_entry_resize_free(map, gap_entry, + grow_amount); } } else { grow_start = stack_entry->end; @@ -4349,9 +4349,8 @@ retry: vm_map_entry_delete(map, gap_entry); else gap_entry->start += grow_amount; - stack_entry->end += grow_amount; map->size += grow_amount; - vm_map_entry_resize_free(map, stack_entry); + vm_map_entry_resize_free(map, stack_entry, grow_amount); rv = KERN_SUCCESS; } else rv = KERN_FAILURE; From owner-svn-src-head@freebsd.org Wed May 22 18:06:01 2019 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 2E68A15B3BEB; Wed, 22 May 2019 18:06:01 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 60AE391C95; Wed, 22 May 2019 18:06:00 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lf1-f46.google.com with SMTP id c17so2394729lfi.2; Wed, 22 May 2019 11:06:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=aSH3gpOzyygIRBq1AQTfexx6/3vze+bj5jdXTWx5Qv8=; b=i4ywK6vpfy5ZGQhzz0jZAFOODBRNPgrfI8/qNqMJWdIDbTDZmBjldlucKSpKUtzTVa I7dY9fI4L1lTTwkpUDi7IPThUL5G5Up9vB08HLLy2OFPOiq4gfG0dqhiD1Ef8r6gi1aV rmnO77tFeeRipu+xYml6REoc+ddE8HR1mh+JJuNwksP9qt5aQYB6JZ9op4pBVaZxZ9Kq 0MZa+me5jAuSQDY9Qj0coGLAlHiTtvF7xYthIo8gQeGcdVbgFmQqIEEpMMRArFCoE1qo wBhlPbGxy82phjlseQBdsFunO9iKt0bFI7xBuVua74YH+I3riMT63Pn7/X+oYXr40lYJ Vm4g== X-Gm-Message-State: APjAAAXaaiMwPsNwtNidbWb2xHUI1zJCtrkJ2Xn7nMO4y1A5CW3RlHKj tlIf16lqHz1oW96/uJZO/OJIhYq0 X-Google-Smtp-Source: APXvYqxkhfbg7PKSHWdPl1BJGRzWcTkykbAFbGl+ZBrn5vBSNcIiQHkhPBoJuFt/GRWfp1qr98hLiw== X-Received: by 2002:a19:c20e:: with SMTP id l14mr378114lfc.5.1558545001829; Wed, 22 May 2019 10:10:01 -0700 (PDT) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id a25sm5499023lfc.28.2019.05.22.10.10.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 May 2019 10:10:00 -0700 (PDT) Subject: Re: svn commit: r348109 - in head/sys/x86: include x86 To: Andrew Gallatin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201905221344.x4MDiGGV056469@repo.freebsd.org> From: Andriy Gapon Openpgp: preference=signencrypt Autocrypt: addr=avg@FreeBSD.org; prefer-encrypt=mutual; keydata= xsFNBFm4LIgBEADNB/3lT7f15UKeQ52xCFQx/GqHkSxEdVyLFZTmY3KyNPQGBtyvVyBfprJ7 mAeXZWfhat6cKNRAGZcL5EmewdQuUfQfBdYmKjbw3a9GFDsDNuhDA2QwFt8BmkiVMRYyvI7l N0eVzszWCUgdc3qqM6qqcgBaqsVmJluwpvwp4ZBXmch5BgDDDb1MPO8AZ2QZfIQmplkj8Y6Z AiNMknkmgaekIINSJX8IzRzKD5WwMsin70psE8dpL/iBsA2cpJGzWMObVTtCxeDKlBCNqM1i gTXta1ukdUT7JgLEFZk9ceYQQMJJtUwzWu1UHfZn0Fs29HTqawfWPSZVbulbrnu5q55R4PlQ /xURkWQUTyDpqUvb4JK371zhepXiXDwrrpnyyZABm3SFLkk2bHlheeKU6Yql4pcmSVym1AS4 dV8y0oHAfdlSCF6tpOPf2+K9nW1CFA8b/tw4oJBTtfZ1kxXOMdyZU5fiG7xb1qDgpQKgHUX8 7Rd2T1UVLVeuhYlXNw2F+a2ucY+cMoqz3LtpksUiBppJhw099gEXehcN2JbUZ2TueJdt1FdS ztnZmsHUXLxrRBtGwqnFL7GSd6snpGIKuuL305iaOGODbb9c7ne1JqBbkw1wh8ci6vvwGlzx rexzimRaBzJxlkjNfMx8WpCvYebGMydNoeEtkWldtjTNVsUAtQARAQABzR5BbmRyaXkgR2Fw b24gPGF2Z0BGcmVlQlNELm9yZz7CwZQEEwEIAD4WIQS+LEO7ngQnXA4Bjr538m7TUc1yjwUC WbgsiAIbIwUJBaOagAULCQgHAgYVCAkKCwIEFgIDAQIeAQIXgAAKCRB38m7TUc1yj+JAEACV l9AK/nOWAt/9cufV2fRj0hdOqB1aCshtSrwHk/exXsDa4/FkmegxXQGY+3GWX3deIyesbVRL rYdtdK0dqJyT1SBqXK1h3/at9rxr9GQA6KWOxTjUFURsU7ok/6SIlm8uLRPNKO+yq0GDjgaO LzN+xykuBA0FlhQAXJnpZLcVfPJdWv7sSHGedL5ln8P8rxR+XnmsA5TUaaPcbhTB+mG+iKFj GghASDSfGqLWFPBlX/fpXikBDZ1gvOr8nyMY9nXhgfXpq3B6QCRYKPy58ChrZ5weeJZ29b7/ QdEO8NFNWHjSD9meiLdWQaqo9Y7uUxN3wySc/YUZxtS0bhAd8zJdNPsJYG8sXgKjeBQMVGuT eCAJFEYJqbwWvIXMfVWop4+O4xB+z2YE3jAbG/9tB/GSnQdVSj3G8MS80iLS58frnt+RSEw/ psahrfh0dh6SFHttE049xYiC+cM8J27Aaf0i9RflyITq57NuJm+AHJoU9SQUkIF0nc6lfA+o JRiyRlHZHKoRQkIg4aiKaZSWjQYRl5Txl0IZUP1dSWMX4s3XTMurC/pnja45dge/4ESOtJ9R 8XuIWg45Oq6MeIWdjKddGhRj3OohsltKgkEU3eLKYtB6qRTQypHHUawCXz88uYt5e3w4V16H lCpSTZV/EVHnNe45FVBlvK7k7HFfDDkryM7BTQRZuCyIARAAlq0slcsVboY/+IUJdcbEiJRW be9HKVz4SUchq0z9MZPX/0dcnvz/gkyYA+OuM78dNS7Mbby5dTvOqfpLJfCuhaNYOhlE0wY+ 1T6Tf1f4c/uA3U/YiadukQ3+6TJuYGAdRZD5EqYFIkreARTVWg87N9g0fT9BEqLw9lJtEGDY EWUE7L++B8o4uu3LQFEYxcrb4K/WKmgtmFcm77s0IKDrfcX4doV92QTIpLiRxcOmCC/OCYuO jB1oaaqXQzZrCutXRK0L5XN1Y1PYjIrEzHMIXmCDlLYnpFkK+itlXwlE2ZQxkfMruCWdQXye syl2fynAe8hvp7Mms9qU2r2K9EcJiR5N1t1C2/kTKNUhcRv7Yd/vwusK7BqJbhlng5ZgRx0m WxdntU/JLEntz3QBsBsWM9Y9wf2V4tLv6/DuDBta781RsCB/UrU2zNuOEkSixlUiHxw1dccI 6CVlaWkkJBxmHX22GdDFrcjvwMNIbbyfQLuBq6IOh8nvu9vuItup7qemDG3Ms6TVwA7BD3j+ 3fGprtyW8Fd/RR2bW2+LWkMrqHffAr6Y6V3h5kd2G9Q8ZWpEJk+LG6Mk3fhZhmCnHhDu6CwN MeUvxXDVO+fqc3JjFm5OxhmfVeJKrbCEUJyM8ESWLoNHLqjywdZga4Q7P12g8DUQ1mRxYg/L HgZY3zfKOqcAEQEAAcLBfAQYAQgAJhYhBL4sQ7ueBCdcDgGOvnfybtNRzXKPBQJZuCyIAhsM BQkFo5qAAAoJEHfybtNRzXKPBVwQAKfFy9P7N3OsLDMB56A4Kf+ZT+d5cIx0Yiaf4n6w7m3i ImHHHk9FIetI4Xe54a2IXh4Bq5UkAGY0667eIs+Z1Ea6I2i27Sdo7DxGwq09Qnm/Y65ADvXs 3aBvokCcm7FsM1wky395m8xUos1681oV5oxgqeRI8/76qy0hD9WR65UW+HQgZRIcIjSel9vR XDaD2HLGPTTGr7u4v00UeTMs6qvPsa2PJagogrKY8RXdFtXvweQFz78NbXhluwix2Tb9ETPk LIpDrtzV73CaE2aqBG/KrboXT2C67BgFtnk7T7Y7iKq4/XvEdDWscz2wws91BOXuMMd4c/c4 OmGW9m3RBLufFrOag1q5yUS9QbFfyqL6dftJP3Zq/xe+mr7sbWbhPVCQFrH3r26mpmy841ym dwQnNcsbIGiBASBSKksOvIDYKa2Wy8htPmWFTEOPRpFXdGQ27awcjjnB42nngyCK5ukZDHi6 w0qK5DNQQCkiweevCIC6wc3p67jl1EMFY5+z+zdTPb3h7LeVnGqW0qBQl99vVFgzLxchKcl0 R/paSFgwqXCZhAKMuUHncJuynDOP7z5LirUeFI8qsBAJi1rXpQoLJTVcW72swZ42IdPiboqx NbTMiNOiE36GqMcTPfKylCbF45JNX4nF9ElM0E+Y8gi4cizJYBRr2FBJgay0b9Cp Message-ID: <00116a41-d811-cda9-304e-589738c54508@FreeBSD.org> Date: Wed, 22 May 2019 20:09:59 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <201905221344.x4MDiGGV056469@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 60AE391C95 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 18:06:01 -0000 On 22/05/2019 16:44, Andrew Gallatin wrote: > This is needed for AMD SMCA processors, as SMCA uses different > MSR address for access MCA banks. Just curious, what is SMCA? -- Andriy Gapon From owner-svn-src-head@freebsd.org Wed May 22 18:43:49 2019 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 605B615B48E0; Wed, 22 May 2019 18:43:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ED3FF93054; Wed, 22 May 2019 18:43:48 +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 C712521716; Wed, 22 May 2019 18:43:48 +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 x4MIhmAT012838; Wed, 22 May 2019 18:43:48 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4MIhmh1012837; Wed, 22 May 2019 18:43:48 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201905221843.x4MIhmh1012837@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 22 May 2019 18:43:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348117 - 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: 348117 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: ED3FF93054 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 18:43:49 -0000 Author: mav Date: Wed May 22 18:43:48 2019 New Revision: 348117 URL: https://svnweb.freebsd.org/changeset/base/348117 Log: Allocate buffers smaller then ABD chunk size as linear. This allows to reduce memory waste by letting UMA to put multiple small buffers into one memory page slab. The page sharing means that UMA may not be able to free memory page when some of buffers are freed, but alternatively memory used by that buffer would just be wasted from the beginning. This change follows alike change in ZoL, but unlike Linux (according to my understanding of it from comments) FreeBSD never shares slabs bigger then one memory page, so this should be even less invasive then there. MFC after: 2 weeks Sponsored by: iXsystems, Inc. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Wed May 22 17:42:22 2019 (r348116) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Wed May 22 18:43:48 2019 (r348117) @@ -290,7 +290,7 @@ abd_free_struct(abd_t *abd) abd_t * abd_alloc(size_t size, boolean_t is_metadata) { - if (!zfs_abd_scatter_enabled) + if (!zfs_abd_scatter_enabled || size <= zfs_abd_chunk_size) return (abd_alloc_linear(size, is_metadata)); VERIFY3U(size, <=, SPA_MAXBLOCKSIZE); From owner-svn-src-head@freebsd.org Wed May 22 19:18:20 2019 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 421DC15B518C; Wed, 22 May 2019 19:18:20 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it1-f173.google.com (mail-it1-f173.google.com [209.85.166.173]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C6BEA9422D; Wed, 22 May 2019 19:18:19 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it1-f173.google.com with SMTP id g24so5192390iti.5; Wed, 22 May 2019 12:18: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:reply-to :from:date:message-id:subject:to:cc; bh=w1vP32h/tsy3+a1r63ikP9RHtnUJVthhBDds06CkFvM=; b=bcOGHP/Lnv3npZpn5mBCq8tqL1ULclaHdBanvatIPGRUDpa216ldvd9ivJRDr3WN+O acz2HpJTxjXIKOwQbbNi2nq8vMbxkVp699F2GsajHWsi6HsLPUHZYJCRsP4BuknZ08Xf 9ks3zXf5McQzr+cl7YTUo1jmzm20+8keEyF8tTx3RKAo0DpEafvmE5T3C3AZnarGUT1o OlTnsFtv9LupYrEy4332rZEUnf1LEmIHidcNF1kWZ1uXXq0Rl8XdgO2d1tCZk55OhWdm +zLYGZKlZ46KvLvStbB4G0B9Xs6nlt4qWgsj5s6Ruambm/MfiuUrF8uKEUayge7B6Nh0 ledA== X-Gm-Message-State: APjAAAV+vGw/3y5bkR1QJagKgCFvRuee+pJQcK7D6rKrZHPYjTmVUCzx NNQrKuJsmm+mJ3hI8OHTiwhJadfO X-Google-Smtp-Source: APXvYqyRynb+bJD5xSTtz1K8dnhoaFTLMHlRtlH5AyCpQFcfJnJ7+b7wnTVoQJCG7rleU0zwPU4oVA== X-Received: by 2002:a24:ac49:: with SMTP id m9mr10561471iti.174.1558552361082; Wed, 22 May 2019 12:12:41 -0700 (PDT) Received: from mail-io1-f45.google.com (mail-io1-f45.google.com. [209.85.166.45]) by smtp.gmail.com with ESMTPSA id e22sm8206178ioe.45.2019.05.22.12.12.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 May 2019 12:12:40 -0700 (PDT) Received: by mail-io1-f45.google.com with SMTP id q21so2760936iog.13; Wed, 22 May 2019 12:12:40 -0700 (PDT) X-Received: by 2002:a6b:c411:: with SMTP id y17mr18796171ioa.265.1558552360073; Wed, 22 May 2019 12:12:40 -0700 (PDT) MIME-Version: 1.0 References: <201905221344.x4MDiGGV056469@repo.freebsd.org> <00116a41-d811-cda9-304e-589738c54508@FreeBSD.org> In-Reply-To: <00116a41-d811-cda9-304e-589738c54508@FreeBSD.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Wed, 22 May 2019 12:12:29 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r348109 - in head/sys/x86: include x86 To: Andriy Gapon Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: C6BEA9422D X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 19:18:20 -0000 On Wed, May 22, 2019 at 11:06 AM Andriy Gapon wrote: > > On 22/05/2019 16:44, Andrew Gallatin wrote: > > This is needed for AMD SMCA processors, as SMCA uses different > > MSR address for access MCA banks. > > Just curious, what is SMCA? Scalable MCA. It's a set of AMD Fam17h MCA extensions. Best, Conrad From owner-svn-src-head@freebsd.org Wed May 22 19:49:19 2019 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 845F515B5D91; Wed, 22 May 2019 19:49:19 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1704B95AB0; Wed, 22 May 2019 19:49:19 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1hTXEh-0005e0-10; Wed, 22 May 2019 22:49:15 +0300 Date: Wed, 22 May 2019 22:49:14 +0300 From: Slawa Olhovchenkov To: Alexander Motin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r348117 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <20190522194914.GF47119@zxy.spb.ru> References: <201905221843.x4MIhmh1012837@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201905221843.x4MIhmh1012837@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-Rspamd-Queue-Id: 1704B95AB0 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 19:49:19 -0000 On Wed, May 22, 2019 at 06:43:48PM +0000, Alexander Motin wrote: > Author: mav > Date: Wed May 22 18:43:48 2019 > New Revision: 348117 > URL: https://svnweb.freebsd.org/changeset/base/348117 > > Log: > Allocate buffers smaller then ABD chunk size as linear. > > This allows to reduce memory waste by letting UMA to put multiple small > buffers into one memory page slab. The page sharing means that UMA > may not be able to free memory page when some of buffers are freed, but > alternatively memory used by that buffer would just be wasted from the > beginning. > > This change follows alike change in ZoL, but unlike Linux (according to > my understanding of it from comments) FreeBSD never shares slabs bigger > then one memory page, so this should be even less invasive then there. > > MFC after: 2 weeks > Sponsored by: iXsystems, Inc. > > Modified: > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c > > Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c > ============================================================================== > --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Wed May 22 17:42:22 2019 (r348116) > +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Wed May 22 18:43:48 2019 (r348117) > @@ -290,7 +290,7 @@ abd_free_struct(abd_t *abd) > abd_t * > abd_alloc(size_t size, boolean_t is_metadata) > { > - if (!zfs_abd_scatter_enabled) > + if (!zfs_abd_scatter_enabled || size <= zfs_abd_chunk_size) > return (abd_alloc_linear(size, is_metadata)); may be `size < zfs_abd_chunk_size`? > VERIFY3U(size, <=, SPA_MAXBLOCKSIZE); > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-head@freebsd.org Wed May 22 19:56:30 2019 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 0B49415B5FF7; Wed, 22 May 2019 19:56:30 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A0DBD96120; Wed, 22 May 2019 19:56:29 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-3.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id C940C1456C; Wed, 22 May 2019 19:56:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r347961 - head To: Alexey Dokuchaev , Renato Botelho Cc: Brad Davis , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201905181936.x4IJaNir001183@repo.freebsd.org> <47ad59b3-5adf-20bf-5dcc-23da82610cea@FreeBSD.org> <20190522124822.GA99369@FreeBSD.org> From: John Baldwin Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: Date: Wed, 22 May 2019 12:56:26 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190522124822.GA99369@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: A0DBD96120 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 19:56:30 -0000 On 5/22/19 5:48 AM, Alexey Dokuchaev wrote: > On Wed, May 22, 2019 at 09:42:29AM -0300, Renato Botelho wrote: >> On 18/05/19 16:36, Brad Davis wrote: >>> New Revision: 347961 >>> URL: https://svnweb.freebsd.org/changeset/base/347961 >>> >>> Log: >>> Add note to UPDATING for users of mergemaster after the move of >>> master.passwd and group in r347638. >>> >>> Approved by: allanjude (mentor) >>> >>> Modified: >>> head/UPDATING >>> >>> +20190517: >>> + For users of mergemaster, after recent changes to locations of >>> + master.passwd and group in the source tree mergemaster needs to be >>> + updated. Before running `mergemaster -p', cd to usr.sbin/mergemaster >>> + and run `make install'. >>> + >> >> etcupdate is installing group and master.passwd to /lib/libc/gen. It >> seems wrong. >> >> root@x230:/usr/src # etcupdate -p >> A /lib/libc/gen/group >> A /lib/libc/gen/master.passwd > > *facepalm* > > Let me ask again: why these files were moved out of their perfectly > (and likely the only) reasonable location (etc/) under some cryptic > libc/gen/ which not only makes little sense per se, but also breaks > mergemaster(8) and similar tools? Because bmake doesn't support .PATH? Oh wait... -- John Baldwin From owner-svn-src-head@freebsd.org Wed May 22 19:59:21 2019 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 E9E7315B6099; Wed, 22 May 2019 19:59:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8BE249634E; Wed, 22 May 2019 19:59:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-3.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id ECC191456D; Wed, 22 May 2019 19:59:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r348109 - in head/sys/x86: include x86 To: cem@freebsd.org, Andriy Gapon Cc: src-committers , svn-src-all , svn-src-head References: <201905221344.x4MDiGGV056469@repo.freebsd.org> <00116a41-d811-cda9-304e-589738c54508@FreeBSD.org> From: John Baldwin Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <32532943-6b1a-71cc-1d95-f180927eb187@FreeBSD.org> Date: Wed, 22 May 2019 12:59:18 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 8BE249634E X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.979,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 19:59:21 -0000 On 5/22/19 12:12 PM, Conrad Meyer wrote: > On Wed, May 22, 2019 at 11:06 AM Andriy Gapon wrote: >> >> On 22/05/2019 16:44, Andrew Gallatin wrote: >>> This is needed for AMD SMCA processors, as SMCA uses different >>> MSR address for access MCA banks. >> >> Just curious, what is SMCA? > > Scalable MCA. It's a set of AMD Fam17h MCA extensions. How is it different aside from using different MSR numbers (which seems a bit gratuitous if that is really all the change is). -- John Baldwin From owner-svn-src-head@freebsd.org Wed May 22 20:01:01 2019 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 6890715B62A1; Wed, 22 May 2019 20:01:01 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-yb1-xb43.google.com (mail-yb1-xb43.google.com [IPv6:2607:f8b0:4864:20::b43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E88D7966AF; Wed, 22 May 2019 20:01:00 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: by mail-yb1-xb43.google.com with SMTP id a3so1349371ybr.6; Wed, 22 May 2019 13:01:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:openpgp:autocrypt:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=G6npryVKK5D7IkZfTDykEfevA4OCojq3SvA97yern14=; b=VjACRsXVLdoFFxt++Qo0NdURv5sd4iYnOU5FArRARHa/a8qGe2Xk91j0rbbhjx+et5 DMC+7HoVnxA48WunKQP4DKwd2sjE9hoIvnDzjDGXwybKieZPn2cf8EIfkDtAoU0uNZCl KehC/lpKTsbVSwNjNlTaOKdWVVFLy5KkgnYrOcMyfHs3548SMjgsAGOLVBFjuGTED6UC xyaiAKsHXxdQVFpM1qaKoQmM2icgaAiDRIH1Y2h85z9TrRbWz5xCO2NYwCJXTZexczGi +AVa9YrrjKh69jfTz68ba/jqPH7Z7oSjzuAl11dwF5+Rk4aW8dyX/EyeMlsegE8toB1e VAhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:openpgp :autocrypt:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=G6npryVKK5D7IkZfTDykEfevA4OCojq3SvA97yern14=; b=B72RIkqeCfKO3WdmmWPlJHlhB0DIdAzXTz8J6NKbMVS0H4oxS3eiQ9vVVgTamDb/ba 4weIFrd6jablXDmdiyXLVaBMrSbH4h+5AowQOEJ8gxa4jpwBTEkPxvextBXmsQ4jtTKh mjgd9zh2HKzm7wr1j9IJBHUxvvDGcAyl/OkinL5g/mUR4TvCnWrBbILfFSuH7dgFST4B qfBtUeE2+/oa0WZmgY2judZc7w1HH6lYbpCVKPNetW4Zw8Cha6zLwIiRDcbXmPYGcBLO Gzww0SqQOfxrazEBhpBbORiMm5xRiioLyQFa094a7ruA00T+fVkyKj4fSLsF9J2I8OGE 2DzQ== X-Gm-Message-State: APjAAAWkx0beuqvc+ucy7oZ1PmtXAi/5ND5PMud3Bq12rUNVsBPDkpal YFFB/LqNVMf119XtmwSsHjbJbajpGJs= X-Google-Smtp-Source: APXvYqyZqfcTubcWrLtyh8o+uhVcN2J1UiHl6YFjoznvKAvTCcLIxLaePKFZhYfIi5X2FDy9Kt9PMw== X-Received: by 2002:a25:f506:: with SMTP id a6mr11738898ybe.33.1558555259937; Wed, 22 May 2019 13:00:59 -0700 (PDT) Received: from mavoffice.ixsystems.com ([12.189.233.129]) by smtp.gmail.com with ESMTPSA id a69sm1253054ywa.84.2019.05.22.13.00.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 May 2019 13:00:59 -0700 (PDT) Sender: Alexander Motin Subject: Re: svn commit: r348117 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs To: Slawa Olhovchenkov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201905221843.x4MIhmh1012837@repo.freebsd.org> <20190522194914.GF47119@zxy.spb.ru> From: Alexander Motin Openpgp: preference=signencrypt Autocrypt: addr=mav@FreeBSD.org; prefer-encrypt=mutual; keydata= xsBNBFOzxAwBCADkPrax0pI2W/ig0CK9nRJJwsHitAGEZ2HZiFEuti+6/4UVxj81yr4ak/4g 9bKUyC7rMEAp/ZHNhd+MFCPAAcHPvtovnfykqE/vuosCS3wlSLloix2iKVLks0CwbLHGAyne 46lTQW74Xl/33c3W1Z6d8jD9gVFT/xaVzZ0U9xdzOmsYAZaAj4ki0tuxO9F7L+ct9grRe7iP g8t9hai7BL4ee3VRwk2JXnKb7UvBiVITKYWKz1jRvZIrjPokgEcCLOSlv7x/1kjuFnj3xWZU 7HSFFT8J93epBbrSSCsYsppIk2fZH41kaaFXsMQfTPH8wkeM6qwrvOh4HiQM08R+9tThABEB AAHNIUFsZXhhbmRlciBNb3RpbiA8bWF2QEZyZWVCU0Qub3JnPsLAlwQTAQoAQQIbAwULCQgH AwUVCgkICwUWAwIBAAIeAQIXgAIZARYhBOmM88TmnMPNDledVYMYw5VbqyJ/BQJZYMKuBQkN McyiAAoJEIMYw5VbqyJ/tuUIAOG3ONOSNYqjK4eTZ1TVh9jdUBAhWk5nhDFnODN49Wj0AbYm 7aIqy8O1hnCDSZG5LttjSAo3UfXJZDKQM0BLb0gpRMBnAYqO6tdolLNqAbPGJBnGoPjsh24y 6KcbDaNnis+lD4GwPXwQM+92wZGhCUFElPV9NciZGVS65TNIgk7X+yEjjhD1MSWKKijZ1r9Z zIt4OzUTxxNOvzdlABZS88nNRdJkatOQJPmFdd1mpP6UzTNCiLUo1pIqOEtJgvVVDYq5WHY6 tciWWYdmZG/tIBexJmv2mV2OLVjXR6ZeKmntVH14H72/wRHJuYHQC+r5SVRcWWayrThsY6jZ Yr4+raTOwE0EU7PEDAEIAOZgWf2cJIu+58IzP2dkXE/urj3tr4OqrB/yHGWUf71Lz6D0Fi6Z AXgDtmcFLGPfMyWuLAvSM+xmoguk7zC4hRBYvQycmIhuqBq1jO1Wp/Z+lpoPM/1cDYLn8Flv mI/c40MhUZh345DA4jYWWaZNjQHUWVQ1fPf595vdVVMPT/abE8E5DaF6fSkRmqFTmfYRkfbt 3ytU8NdUapDcJVY7cEP2nJBVNZPnOIObR/ZIgSxjjrG5o34yXoqeup8JvwEv+/NylzzuyXEZ R1EdEIzQ/a1nh/0j4NXtzZEqKW4aTWlmSqb6wN8jh1OSOOqkYsfnE3nfxcZbxi4IRoNQYlm5 9R8AEQEAAcLAZQQYAQoADwUCU7PEDAIbDAUJBaOagAAKCRCDGMOVW6sif7FRB/4k9y/GaGqU fcJiXdQHRAKHCUvbKMFgeEDHOg33qx+POS2Ah85/PXVa2jYBldCZDmYc+zl48aEMd163a7s3 0gJaB7CYElwxlKUk6c+5gwoYIJuJJzSzW0JzSD5ch7RIRxbfxrKdsiHrUW8AeduZWzlK6VaW RmWILgLmxfLdhEVFWxbr99GSeVFZaZwn6tl/8CvBcgYoARvJvl0V5zS1akQfEISYkwL9EfUI W44EOHranL5qUXkedXBYp6fRsooGrIimfwYxaC8FbXhk3FMgMjDMRiVq4POHo1iGeYETsUrL NM6184E25gPVtX2fb3RhM8Xh6BkwCZ6ZYbQ+AcD4F/cKwsB8BBgBCgAmAhsMFiEE6YzzxOac w80OV51VgxjDlVurIn8FAllgwtgFCQ0xzMwACgkQgxjDlVurIn9OqAf9FAcKWS95wTTbraXA qg/+bQyHgjlMtGCgkmfxLsbUGeqiFgmSIuoDrF7q6sYPs6p00CXXZRuuNZt0lX7O95re8mgz gxm5iJisZpdbHMVepYlw/AxT2wCHwxGCEe64Lm+A9vjlOd+3D3/6fSLwZ9WFCE6p6lQZ1CDg 09xe+JKSgC+KDqmn0tzGKyfSCuhRAq3XkZyxL1hxBaDeP0eeKlzoy7jXodf3wVvXXc0cmpza B5McuRHK4EU6jIioHo30YqPM4AjPHGxV2X1N6/Aayungzj9EXNZtKCxs6dsTvjniWa5VkZ9F 4SOdSbxEen1DZRYpeWnd7GVmO86n+5USkKCXPg== Message-ID: <4766287e-283a-775d-9e8e-4d0442d802f3@FreeBSD.org> Date: Wed, 22 May 2019 16:00:58 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20190522194914.GF47119@zxy.spb.ru> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: E88D7966AF X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.987,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 20:01:01 -0000 On 22.05.2019 15:49, Slawa Olhovchenkov wrote: > On Wed, May 22, 2019 at 06:43:48PM +0000, Alexander Motin wrote: >> Author: mav >> Date: Wed May 22 18:43:48 2019 >> New Revision: 348117 >> URL: https://svnweb.freebsd.org/changeset/base/348117 >> >> Log: >> Allocate buffers smaller then ABD chunk size as linear. >> >> This allows to reduce memory waste by letting UMA to put multiple small >> buffers into one memory page slab. The page sharing means that UMA >> may not be able to free memory page when some of buffers are freed, but >> alternatively memory used by that buffer would just be wasted from the >> beginning. >> >> This change follows alike change in ZoL, but unlike Linux (according to >> my understanding of it from comments) FreeBSD never shares slabs bigger >> then one memory page, so this should be even less invasive then there. >> >> MFC after: 2 weeks >> Sponsored by: iXsystems, Inc. >> >> Modified: >> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c >> >> Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c >> ============================================================================== >> --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Wed May 22 17:42:22 2019 (r348116) >> +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Wed May 22 18:43:48 2019 (r348117) >> @@ -290,7 +290,7 @@ abd_free_struct(abd_t *abd) >> abd_t * >> abd_alloc(size_t size, boolean_t is_metadata) >> { >> - if (!zfs_abd_scatter_enabled) >> + if (!zfs_abd_scatter_enabled || size <= zfs_abd_chunk_size) >> return (abd_alloc_linear(size, is_metadata)); > > may be `size < zfs_abd_chunk_size`? Why? It should be the same from memory usage, but I see theoretical benefits from having linear buffer with one page rather then scatter list with one page. Plus ZoL also had there `size <= PAGESIZE`. -- Alexander Motin From owner-svn-src-head@freebsd.org Wed May 22 20:34:26 2019 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 DC56915B6AAD; Wed, 22 May 2019 20:34:26 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6DF00976CD; Wed, 22 May 2019 20:34:26 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1hTXwO-0005vI-PJ; Wed, 22 May 2019 23:34:24 +0300 Date: Wed, 22 May 2019 23:34:24 +0300 From: Slawa Olhovchenkov To: Alexander Motin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r348117 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <20190522203424.GC2161@zxy.spb.ru> References: <201905221843.x4MIhmh1012837@repo.freebsd.org> <20190522194914.GF47119@zxy.spb.ru> <4766287e-283a-775d-9e8e-4d0442d802f3@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4766287e-283a-775d-9e8e-4d0442d802f3@FreeBSD.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-Rspamd-Queue-Id: 6DF00976CD X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.94 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.94)[-0.944,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 20:34:27 -0000 On Wed, May 22, 2019 at 04:00:58PM -0400, Alexander Motin wrote: > On 22.05.2019 15:49, Slawa Olhovchenkov wrote: > > On Wed, May 22, 2019 at 06:43:48PM +0000, Alexander Motin wrote: > >> Author: mav > >> Date: Wed May 22 18:43:48 2019 > >> New Revision: 348117 > >> URL: https://svnweb.freebsd.org/changeset/base/348117 > >> > >> Log: > >> Allocate buffers smaller then ABD chunk size as linear. > >> > >> This allows to reduce memory waste by letting UMA to put multiple small > >> buffers into one memory page slab. The page sharing means that UMA > >> may not be able to free memory page when some of buffers are freed, but > >> alternatively memory used by that buffer would just be wasted from the > >> beginning. > >> > >> This change follows alike change in ZoL, but unlike Linux (according to > >> my understanding of it from comments) FreeBSD never shares slabs bigger > >> then one memory page, so this should be even less invasive then there. > >> > >> MFC after: 2 weeks > >> Sponsored by: iXsystems, Inc. > >> > >> Modified: > >> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c > >> > >> Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c > >> ============================================================================== > >> --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Wed May 22 17:42:22 2019 (r348116) > >> +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Wed May 22 18:43:48 2019 (r348117) > >> @@ -290,7 +290,7 @@ abd_free_struct(abd_t *abd) > >> abd_t * > >> abd_alloc(size_t size, boolean_t is_metadata) > >> { > >> - if (!zfs_abd_scatter_enabled) > >> + if (!zfs_abd_scatter_enabled || size <= zfs_abd_chunk_size) > >> return (abd_alloc_linear(size, is_metadata)); > > > > may be `size < zfs_abd_chunk_size`? > > Why? It should be the same from memory usage, but I see theoretical > benefits from having linear buffer with one page rather then scatter > list with one page. Plus ZoL also had there `size <= PAGESIZE`. May be malloc() for page size more effictive? Not sure. Less overhead for kegs and etc. From owner-svn-src-head@freebsd.org Wed May 22 20:48:37 2019 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 E944915B6D63; Wed, 22 May 2019 20:48:36 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-yb1-xb42.google.com (mail-yb1-xb42.google.com [IPv6:2607:f8b0:4864:20::b42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 581D497E75; Wed, 22 May 2019 20:48:36 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: by mail-yb1-xb42.google.com with SMTP id a21so1391337ybg.9; Wed, 22 May 2019 13:48:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:openpgp:autocrypt:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ps08Je2LxRAAc2g1TRftceYXyGVuoaLm+xsAB1n7sdg=; b=j0Nkg9+mCMjgCxX/AIm0bv0xuNFDTW1U/1gV3UWsXg6pHC4KzeQInVW/JAAnxzLWso zcZ/m4F5Zmh5j2o3v8F61faZ3Qbj81jj+9v1FqR5oi/SNBOFSj+xGQ8CRzXMayW3cC/U 67qGjetTqv5t8S38SR8d+sgHKd5jjNpt+trVKO1pk1UJg4E9F7jevbrZb8B2kqeuTf03 LTXYLrbkeVB4hjPnAWbrYNOHX3XvrHVb7fMpyX8/G3fvQrjCnEMNOAcqiFr/o/s4EVIY x/MsCoDcmZLZX65z+lpsLNC7HGp+yh634rO+NBd25lOkKHq6LQjfsboZ6lVGbKNdaDWx 9Zow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:openpgp :autocrypt:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=ps08Je2LxRAAc2g1TRftceYXyGVuoaLm+xsAB1n7sdg=; b=pQavRIE7kIWFfOBCEuFI52+lOSno25hRk7idkAUboAcBEk5gMukp6IOuvqKyAwSDfL gnOdMWUpb5hFpn7mLH9wZ00t9A+/6QBAwEug+10Hr3mcxTra0R65pzulGt3tJz/LOwcO HWYGgJ1zpc7Ahmj+SksuHjDsUrRgtnxuRREccJctGrIWIN/4QwxSXY1cj2UiXTPQftau rBd2UuV9HUVHhRDbzoxEFfBfkrjSv67USrrrRbFWJsHav8KaMmg5BWZWnI9yxOht6oC9 F/+/WD2ZCGni0J9vPMFfRY67ootpTMA2zCDFSYUuExfwd5WT3ZkKHK8KrqmXEeo6sIgE Pv3Q== X-Gm-Message-State: APjAAAUqrCuhRC8el/Lo0GEa+zEuSmjU8Z0k0NNdmPqa1HHYWCBV4Tql Xc5pk3LmSgAkjIg53RgnuuDF0tO6Ixc= X-Google-Smtp-Source: APXvYqy1W+7CbARV/X5bmqWHfXn6fJo7K0oUqA/oIKerznl6tIWbpcc48RYsP0HKK2cN6U/6vjalTw== X-Received: by 2002:a25:7642:: with SMTP id r63mr11058504ybc.253.1558558115236; Wed, 22 May 2019 13:48:35 -0700 (PDT) Received: from mavoffice.ixsystems.com ([12.189.233.129]) by smtp.gmail.com with ESMTPSA id o1sm5288711ywo.79.2019.05.22.13.48.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 May 2019 13:48:34 -0700 (PDT) Sender: Alexander Motin Subject: Re: svn commit: r348117 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs To: Slawa Olhovchenkov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201905221843.x4MIhmh1012837@repo.freebsd.org> <20190522194914.GF47119@zxy.spb.ru> <4766287e-283a-775d-9e8e-4d0442d802f3@FreeBSD.org> <20190522203424.GC2161@zxy.spb.ru> From: Alexander Motin Openpgp: preference=signencrypt Autocrypt: addr=mav@FreeBSD.org; prefer-encrypt=mutual; keydata= xsBNBFOzxAwBCADkPrax0pI2W/ig0CK9nRJJwsHitAGEZ2HZiFEuti+6/4UVxj81yr4ak/4g 9bKUyC7rMEAp/ZHNhd+MFCPAAcHPvtovnfykqE/vuosCS3wlSLloix2iKVLks0CwbLHGAyne 46lTQW74Xl/33c3W1Z6d8jD9gVFT/xaVzZ0U9xdzOmsYAZaAj4ki0tuxO9F7L+ct9grRe7iP g8t9hai7BL4ee3VRwk2JXnKb7UvBiVITKYWKz1jRvZIrjPokgEcCLOSlv7x/1kjuFnj3xWZU 7HSFFT8J93epBbrSSCsYsppIk2fZH41kaaFXsMQfTPH8wkeM6qwrvOh4HiQM08R+9tThABEB AAHNIUFsZXhhbmRlciBNb3RpbiA8bWF2QEZyZWVCU0Qub3JnPsLAlwQTAQoAQQIbAwULCQgH AwUVCgkICwUWAwIBAAIeAQIXgAIZARYhBOmM88TmnMPNDledVYMYw5VbqyJ/BQJZYMKuBQkN McyiAAoJEIMYw5VbqyJ/tuUIAOG3ONOSNYqjK4eTZ1TVh9jdUBAhWk5nhDFnODN49Wj0AbYm 7aIqy8O1hnCDSZG5LttjSAo3UfXJZDKQM0BLb0gpRMBnAYqO6tdolLNqAbPGJBnGoPjsh24y 6KcbDaNnis+lD4GwPXwQM+92wZGhCUFElPV9NciZGVS65TNIgk7X+yEjjhD1MSWKKijZ1r9Z zIt4OzUTxxNOvzdlABZS88nNRdJkatOQJPmFdd1mpP6UzTNCiLUo1pIqOEtJgvVVDYq5WHY6 tciWWYdmZG/tIBexJmv2mV2OLVjXR6ZeKmntVH14H72/wRHJuYHQC+r5SVRcWWayrThsY6jZ Yr4+raTOwE0EU7PEDAEIAOZgWf2cJIu+58IzP2dkXE/urj3tr4OqrB/yHGWUf71Lz6D0Fi6Z AXgDtmcFLGPfMyWuLAvSM+xmoguk7zC4hRBYvQycmIhuqBq1jO1Wp/Z+lpoPM/1cDYLn8Flv mI/c40MhUZh345DA4jYWWaZNjQHUWVQ1fPf595vdVVMPT/abE8E5DaF6fSkRmqFTmfYRkfbt 3ytU8NdUapDcJVY7cEP2nJBVNZPnOIObR/ZIgSxjjrG5o34yXoqeup8JvwEv+/NylzzuyXEZ R1EdEIzQ/a1nh/0j4NXtzZEqKW4aTWlmSqb6wN8jh1OSOOqkYsfnE3nfxcZbxi4IRoNQYlm5 9R8AEQEAAcLAZQQYAQoADwUCU7PEDAIbDAUJBaOagAAKCRCDGMOVW6sif7FRB/4k9y/GaGqU fcJiXdQHRAKHCUvbKMFgeEDHOg33qx+POS2Ah85/PXVa2jYBldCZDmYc+zl48aEMd163a7s3 0gJaB7CYElwxlKUk6c+5gwoYIJuJJzSzW0JzSD5ch7RIRxbfxrKdsiHrUW8AeduZWzlK6VaW RmWILgLmxfLdhEVFWxbr99GSeVFZaZwn6tl/8CvBcgYoARvJvl0V5zS1akQfEISYkwL9EfUI W44EOHranL5qUXkedXBYp6fRsooGrIimfwYxaC8FbXhk3FMgMjDMRiVq4POHo1iGeYETsUrL NM6184E25gPVtX2fb3RhM8Xh6BkwCZ6ZYbQ+AcD4F/cKwsB8BBgBCgAmAhsMFiEE6YzzxOac w80OV51VgxjDlVurIn8FAllgwtgFCQ0xzMwACgkQgxjDlVurIn9OqAf9FAcKWS95wTTbraXA qg/+bQyHgjlMtGCgkmfxLsbUGeqiFgmSIuoDrF7q6sYPs6p00CXXZRuuNZt0lX7O95re8mgz gxm5iJisZpdbHMVepYlw/AxT2wCHwxGCEe64Lm+A9vjlOd+3D3/6fSLwZ9WFCE6p6lQZ1CDg 09xe+JKSgC+KDqmn0tzGKyfSCuhRAq3XkZyxL1hxBaDeP0eeKlzoy7jXodf3wVvXXc0cmpza B5McuRHK4EU6jIioHo30YqPM4AjPHGxV2X1N6/Aayungzj9EXNZtKCxs6dsTvjniWa5VkZ9F 4SOdSbxEen1DZRYpeWnd7GVmO86n+5USkKCXPg== Message-ID: Date: Wed, 22 May 2019 16:48:34 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20190522203424.GC2161@zxy.spb.ru> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 581D497E75 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 20:48:37 -0000 On 22.05.2019 16:34, Slawa Olhovchenkov wrote: > On Wed, May 22, 2019 at 04:00:58PM -0400, Alexander Motin wrote: > >> On 22.05.2019 15:49, Slawa Olhovchenkov wrote: >>> On Wed, May 22, 2019 at 06:43:48PM +0000, Alexander Motin wrote: >>>> Author: mav >>>> Date: Wed May 22 18:43:48 2019 >>>> New Revision: 348117 >>>> URL: https://svnweb.freebsd.org/changeset/base/348117 >>>> >>>> Log: >>>> Allocate buffers smaller then ABD chunk size as linear. >>>> >>>> This allows to reduce memory waste by letting UMA to put multiple small >>>> buffers into one memory page slab. The page sharing means that UMA >>>> may not be able to free memory page when some of buffers are freed, but >>>> alternatively memory used by that buffer would just be wasted from the >>>> beginning. >>>> >>>> This change follows alike change in ZoL, but unlike Linux (according to >>>> my understanding of it from comments) FreeBSD never shares slabs bigger >>>> then one memory page, so this should be even less invasive then there. >>>> >>>> MFC after: 2 weeks >>>> Sponsored by: iXsystems, Inc. >>>> >>>> Modified: >>>> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c >>>> >>>> Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c >>>> ============================================================================== >>>> --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Wed May 22 17:42:22 2019 (r348116) >>>> +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Wed May 22 18:43:48 2019 (r348117) >>>> @@ -290,7 +290,7 @@ abd_free_struct(abd_t *abd) >>>> abd_t * >>>> abd_alloc(size_t size, boolean_t is_metadata) >>>> { >>>> - if (!zfs_abd_scatter_enabled) >>>> + if (!zfs_abd_scatter_enabled || size <= zfs_abd_chunk_size) >>>> return (abd_alloc_linear(size, is_metadata)); >>> >>> may be `size < zfs_abd_chunk_size`? >> >> Why? It should be the same from memory usage, but I see theoretical >> benefits from having linear buffer with one page rather then scatter >> list with one page. Plus ZoL also had there `size <= PAGESIZE`. > > May be malloc() for page size more effictive? Not sure. > Less overhead for kegs and etc. malloc()'s up to 64KB are also backed by UMA. May be it could be optimized on platforms with direct map, and may be after 12 VM subsystem would not be too shocked, but on platforms without direct map requests going around UMA causes huge TLB shootdown on free(). Thinking again, I see one benefit of allocating 4KB buffers not as linear but as ABD -- using same ABD UMA zone for both 4KB and above should improve its caching efficiency. On the other side I already saw lock congestion on UMA locks there, so there may be trade-off. -- Alexander Motin From owner-svn-src-head@freebsd.org Wed May 22 20:58:02 2019 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 2C7DF15B729E; Wed, 22 May 2019 20:58:02 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it1-f171.google.com (mail-it1-f171.google.com [209.85.166.171]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B3D0869DCC; Wed, 22 May 2019 20:58:01 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it1-f171.google.com with SMTP id m141so6000574ita.3; Wed, 22 May 2019 13:58:01 -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:reply-to :from:date:message-id:subject:to:cc; bh=ik3HDrh3fYm3DQLPV1hOOTZw57v3p5y7adNAhdsQ1zc=; b=QmyHsAlgEvge79CGfsMwcudHzAP+SUzVs1iLLYlhOcMgMuysdJ7lMmjwG57nYK/FMW 2tKWUtrypYu8wt3P89oedBx07Wz2zt96VESrfCP2TPO56T7y55pzwliqFKkwhAka0XPX vkZb7RqyoUO1Dl1w49eDQpHbnBBOCT4m42lOk2g4rznpsYAh+0kIOTzXtqQmfeWx+Hro zulERlb8MftIMiZPOeAE+ZgzCBaZNz0A3n5MnV5B8hfz+Y9HmJ7tjUEJwlfYAJ1/fOAF HD/XcmV+uRXccARVewSUDxcK6ecV5mRCnze8dKHCwVeHmgXVBsnKz7RLZlpZXsXNaNB1 TtTw== X-Gm-Message-State: APjAAAX5v7f1TVdkvbkoqxSzu5DFoGHNamQTcpFFU+cT1iB1P04samf7 0ZUmMTYJLJTX3A76PDEfPz28rBwa X-Google-Smtp-Source: APXvYqy6PjP+fYPYTg32dLwEX2XLH8BSvBCTLMN6kdKUNp5Od4B42oug8Gc45bRz7pO3hoIyU1vAvw== X-Received: by 2002:a02:6a28:: with SMTP id l40mr54910321jac.25.1558556750674; Wed, 22 May 2019 13:25:50 -0700 (PDT) Received: from mail-it1-f179.google.com (mail-it1-f179.google.com. [209.85.166.179]) by smtp.gmail.com with ESMTPSA id w4sm7888019iob.46.2019.05.22.13.25.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 May 2019 13:25:50 -0700 (PDT) Received: by mail-it1-f179.google.com with SMTP id g24so5547380iti.5; Wed, 22 May 2019 13:25:50 -0700 (PDT) X-Received: by 2002:a24:e3cb:: with SMTP id d194mr10757695ith.100.1558556750240; Wed, 22 May 2019 13:25:50 -0700 (PDT) MIME-Version: 1.0 References: <201905221344.x4MDiGGV056469@repo.freebsd.org> <00116a41-d811-cda9-304e-589738c54508@FreeBSD.org> <32532943-6b1a-71cc-1d95-f180927eb187@FreeBSD.org> In-Reply-To: <32532943-6b1a-71cc-1d95-f180927eb187@FreeBSD.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Wed, 22 May 2019 13:25:39 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r348109 - in head/sys/x86: include x86 To: John Baldwin Cc: Andriy Gapon , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: B3D0869DCC X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 20:58:02 -0000 On Wed, May 22, 2019 at 12:59 PM John Baldwin wrote: > On 5/22/19 12:12 PM, Conrad Meyer wrote: > > On Wed, May 22, 2019 at 11:06 AM Andriy Gapon wrote: > >> > >> On 22/05/2019 16:44, Andrew Gallatin wrote: > >>> This is needed for AMD SMCA processors, as SMCA uses different > >>> MSR address for access MCA banks. > >> > >> Just curious, what is SMCA? > > > > Scalable MCA. It's a set of AMD Fam17h MCA extensions. > > How is it different aside from using different MSR numbers (which seems > a bit gratuitous if that is really all the change is). > > -- > John Baldwin > It adds new MSRs as well, though those are not present in this first change. And adds some information not representable in the =E2=80=9Clegacy= =E2=80=9D MSRs. Some more detail can be found in the linux patches, eg https://lore.kernel.org/patchwork/patch/655889/ . From owner-svn-src-head@freebsd.org Wed May 22 21:06:11 2019 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 4FADF15B7779; Wed, 22 May 2019 21:06:11 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E165F6A7AC; Wed, 22 May 2019 21:06:10 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BCEBA22F14; Wed, 22 May 2019 21:06:10 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4ML6AZ9087363; Wed, 22 May 2019 21:06:10 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4ML6Avj087361; Wed, 22 May 2019 21:06:10 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201905222106.x4ML6Avj087361@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 22 May 2019 21:06:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348120 - head/usr.sbin/i2c X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/usr.sbin/i2c X-SVN-Commit-Revision: 348120 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E165F6A7AC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 21:06:11 -0000 Author: ian Date: Wed May 22 21:06:10 2019 New Revision: 348120 URL: https://svnweb.freebsd.org/changeset/base/348120 Log: Add a new 'tr' (transfer) mode to i2c(8) to support more i2c controllers. Some i2c controller hardware does not provide a way to do individual START, REPEAT-START and STOP actions on the i2c bus. Instead, they can only do a complete transfer as a single operation. Typically they can do either START-data-STOP or START-data-REPEATSTART-data-STOP. In the i2c driver framework, this corresponds to the iicbus_transfer method. In the userland interface they are initiated with the I2CRDWR ioctl command. These changes add a new 'tr' mode which can be specified with the '-m' command line option. This mode should work on all hardware; when an i2c controller driver doesn't directly support the iicbus_transfer method, code in the i2c driver framework uses the lower-level START/REPEAT/STOP methods to implement the transfer. After this new mode has gotten some testing on various hardware, the 'tr' mode should probably become the new default mode. PR: 189914 Modified: head/usr.sbin/i2c/i2c.8 head/usr.sbin/i2c/i2c.c Modified: head/usr.sbin/i2c/i2c.8 ============================================================================== --- head/usr.sbin/i2c/i2c.8 Wed May 22 19:49:25 2019 (r348119) +++ head/usr.sbin/i2c/i2c.8 Wed May 22 21:06:10 2019 (r348120) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 23, 2009 +.Dd May 22, 2019 .Dt I2C 8 .Os .Sh NAME @@ -39,7 +39,7 @@ .Op Fl w Ar 0|8|16 .Op Fl o Ar offset .Op Fl c Ar count -.Op Fl m Ar ss|rs|no +.Op Fl m Ar tr|ss|rs|no .Op Fl b .Op Fl v .Nm @@ -72,10 +72,29 @@ number of bytes to transfer (dec). transfer direction: r - read, w - write. .It Fl f Ar device I2C bus to use (default is /dev/iic0). -.It Fl m Ar ss|rs|no +.It Fl m Ar tr|ss|rs|no addressing mode, i.e., I2C bus operations performed after the offset for the transfer has been written to the device and before the actual read/write -operation. rs - repeated start; ss - stop start; no - none. +operation. +.Bl -tag -compact -offset indent +.It Va tr +complete-transfer +.It Va ss +stop then start +.It Va rs +repeated start +.It Va no +none +.El +Some I2C bus hardware does not provide control over the individual start, +repeat-start, and stop operations. +Such hardware can only perform a complete transfer of the offset and the +data as a single operation. +The +.Va tr +mode creates control structures describing the transfer and submits them +to the driver as a single complete transaction. +This mode works on all types of I2C hardware. .It Fl n Ar skip_addr skip address - address(es) to be skipped during bus scan. There are two ways to specify addresses to ignore: by range 'a..b' or Modified: head/usr.sbin/i2c/i2c.c ============================================================================== --- head/usr.sbin/i2c/i2c.c Wed May 22 19:49:25 2019 (r348119) +++ head/usr.sbin/i2c/i2c.c Wed May 22 21:06:10 2019 (r348120) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #define I2C_MODE_NONE 1 #define I2C_MODE_STOP_START 2 #define I2C_MODE_REPEATED_START 3 +#define I2C_MODE_TRANSFER 4 struct options { int width; @@ -73,7 +74,7 @@ usage(void) { fprintf(stderr, "usage: %s -a addr [-f device] [-d [r|w]] [-o offset] " - "[-w [0|8|16]] [-c count] [-m [ss|rs|no]] [-b] [-v]\n", + "[-w [0|8|16]] [-c count] [-m [tr|ss|rs|no]] [-b] [-v]\n", getprogname()); fprintf(stderr, " %s -s [-f device] [-n skip_addr] -v\n", getprogname()); @@ -297,24 +298,9 @@ static int i2c_write(char *dev, struct options i2c_opt, char *i2c_buf) { struct iiccmd cmd; - int ch, i, error, fd, bufsize; + int error, fd, bufsize; char *err_msg, *buf; - /* - * Read data to be written to the chip from stdin - */ - if (i2c_opt.verbose && !i2c_opt.binary) - fprintf(stderr, "Enter %u bytes of data: ", i2c_opt.count); - - for (i = 0; i < i2c_opt.count; i++) { - ch = getchar(); - if (ch == EOF) { - free(i2c_buf); - err(1, "not enough data, exiting\n"); - } - i2c_buf[i] = ch; - } - fd = open(dev, O_RDWR); if (fd == -1) { free(i2c_buf); @@ -558,6 +544,72 @@ err2: return (1); } +/* + * i2c_rdwr_transfer() - use I2CRDWR to conduct a complete i2c transfer. + * + * Some i2c hardware is unable to provide direct control over START, REPEAT- + * START, and STOP operations. Such hardware can only perform a complete + * START--STOP or START--REPEAT-START--STOP sequence as a + * single operation. The driver framework refers to this sequence as a + * "transfer" so we call it "transfer mode". We assemble either one or two + * iic_msg structures to describe the IO operations, and hand them off to the + * driver to be handled as a single transfer. + */ +static int +i2c_rdwr_transfer(char *dev, struct options i2c_opt, char *i2c_buf) +{ + struct iic_msg msgs[2]; + struct iic_rdwr_data xfer; + int fd, i; + union { + uint8_t buf[2]; + uint8_t off8; + uint16_t off16; + } off; + + i = 0; + if (i2c_opt.width > 0) { + msgs[i].flags = IIC_M_WR | IIC_M_NOSTOP; + msgs[i].slave = i2c_opt.addr; + msgs[i].buf = off.buf; + if (i2c_opt.width == 8) { + off.off8 = (uint8_t)i2c_opt.off; + msgs[i].len = 1; + } else { + off.off16 = (uint16_t)i2c_opt.off; + msgs[i].len = 2; + } + ++i; + } + + /* + * If the transfer direction is write and we did a write of the offset + * above, then we need to elide the start; this transfer is just more + * writing that follows the one started above. For a read, we always do + * a start; if we did an offset write above it'll be a repeat-start + * because of the NOSTOP flag used above. + */ + if (i2c_opt.dir == 'w') + msgs[i].flags = IIC_M_WR | (i > 0) ? IIC_M_NOSTART : 0; + else + msgs[i].flags = IIC_M_RD; + msgs[i].slave = i2c_opt.addr; + msgs[i].len = i2c_opt.count; + msgs[i].buf = i2c_buf; + ++i; + + xfer.msgs = msgs; + xfer.nmsgs = i; + + if ((fd = open(dev, O_RDWR)) == -1) + err(1, "open(%s) failed", dev); + if (ioctl(fd, I2CRDWR, &xfer) == -1 ) + err(1, "ioctl(I2CRDWR) failed"); + close(fd); + + return (0); +} + int main(int argc, char** argv) { @@ -620,6 +672,8 @@ main(int argc, char** argv) i2c_opt.mode = I2C_MODE_STOP_START; else if (!strcmp(optarg, "rs")) i2c_opt.mode = I2C_MODE_REPEATED_START; + else if (!strcmp(optarg, "tr")) + i2c_opt.mode = I2C_MODE_TRANSFER; else usage(); break; @@ -687,19 +741,33 @@ main(int argc, char** argv) if (i2c_buf == NULL) err(1, "data malloc"); + /* + * For a write, read the data to be written to the chip from stdin. + */ if (i2c_opt.dir == 'w') { - error = i2c_write(dev, i2c_opt, i2c_buf); - if (error) { - free(i2c_buf); - return (1); + if (i2c_opt.verbose && !i2c_opt.binary) + fprintf(stderr, "Enter %u bytes of data: ", + i2c_opt.count); + for (i = 0; i < i2c_opt.count; i++) { + ch = getchar(); + if (ch == EOF) { + free(i2c_buf); + err(1, "not enough data, exiting\n"); + } + i2c_buf[i] = ch; } } - if (i2c_opt.dir == 'r') { + + if (i2c_opt.mode == I2C_MODE_TRANSFER) + error = i2c_rdwr_transfer(dev, i2c_opt, i2c_buf); + else if (i2c_opt.dir == 'w') + error = i2c_write(dev, i2c_opt, i2c_buf); + else error = i2c_read(dev, i2c_opt, i2c_buf); - if (error) { - free(i2c_buf); - return (1); - } + + if (error != 0) { + free(i2c_buf); + return (1); } if (i2c_opt.verbose) From owner-svn-src-head@freebsd.org Wed May 22 21:06:28 2019 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 D392415B779E; Wed, 22 May 2019 21:06:27 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E2A36A8A7; Wed, 22 May 2019 21:06:26 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x4ML6IH4086720; Wed, 22 May 2019 14:06:18 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x4ML6Idr086719; Wed, 22 May 2019 14:06:18 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201905222106.x4ML6Idr086719@gndrsh.dnsmgr.net> Subject: Re: svn commit: r347961 - head In-Reply-To: To: John Baldwin Date: Wed, 22 May 2019 14:06:18 -0700 (PDT) CC: Alexey Dokuchaev , Renato Botelho , Brad Davis , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 2E2A36A8A7 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.950,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 21:06:28 -0000 > On 5/22/19 5:48 AM, Alexey Dokuchaev wrote: > > On Wed, May 22, 2019 at 09:42:29AM -0300, Renato Botelho wrote: > >> On 18/05/19 16:36, Brad Davis wrote: > >>> New Revision: 347961 > >>> URL: https://svnweb.freebsd.org/changeset/base/347961 > >>> > >>> Log: > >>> Add note to UPDATING for users of mergemaster after the move of > >>> master.passwd and group in r347638. > >>> > >>> Approved by: allanjude (mentor) > >>> > >>> Modified: > >>> head/UPDATING > >>> > >>> +20190517: > >>> + For users of mergemaster, after recent changes to locations of > >>> + master.passwd and group in the source tree mergemaster needs to be > >>> + updated. Before running `mergemaster -p', cd to usr.sbin/mergemaster > >>> + and run `make install'. > >>> + > >> > >> etcupdate is installing group and master.passwd to /lib/libc/gen. It > >> seems wrong. > >> > >> root@x230:/usr/src # etcupdate -p > >> A /lib/libc/gen/group > >> A /lib/libc/gen/master.passwd > > > > *facepalm* > > > > Let me ask again: why these files were moved out of their perfectly > > (and likely the only) reasonable location (etc/) under some cryptic > > libc/gen/ which not only makes little sense per se, but also breaks > > mergemaster(8) and similar tools? > > Because bmake doesn't support .PATH? Oh wait... I spoke long ago when this whole "rip etc/ apart" started, and objected repeatedly and was shot down. I even asked for a "complete plan" and was more or less told this is by design of pkg base. Let me speak to "by design", the BSD source tree is, by design, to reflect the installed location of a file with very rare exception to that design. The .mk system by design is written with this assumption in mind as well. The above artifact is by that design. Attempts to alter such by design behavior has problems, some of which are now, repeatedly showing there ugly head. .PATH could of easily been used, as well as cd ${SRCTOP}/etc && make FOOCONF to implement exactly what was done without ANY file moves. Oh, wait that was pointed out, I belive twice, maybe 3 times, and by some experts on the .mk system as well. sjg (bmake maintainr) and bdrewery (one of our .mk system experts) have both pushed back on these changes. Good luck with supporting this so not by design package system if it requires this to be operable. Also good luck maintaining any of the ${DESTDIR}/etc files as now no one knows how to find them in the source tree. > John Baldwin -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Wed May 22 21:14:58 2019 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 C7FA515B7BDB; Wed, 22 May 2019 21:14:58 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id BC63B6B08A; Wed, 22 May 2019 21:14:57 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id TYZUhwlrvo7SQTYZVhqn0J; Wed, 22 May 2019 15:14:50 -0600 X-Authority-Analysis: v=2.3 cv=Go88BX9C c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=IkcTkHD0fZMA:10 a=E5NmQfObTbMA:10 a=iKhvJSA4AAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=rS252y2yb20N6vKSIvAA:9 a=QEXdDO2ut3YA:10 a=odh9cflL3HIXMm4fY7Wr:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from android-9b917f0ce39da6e6.esitwifi.local (S0106788a207e2972.gv.shawcable.net [70.66.154.233]) by spqr.komquats.com (Postfix) with ESMTPSA id 1317A9A6; Wed, 22 May 2019 14:14:47 -0700 (PDT) Date: Wed, 22 May 2019 14:14:23 -0700 User-Agent: K-9 Mail for Android In-Reply-To: <201905222106.x4ML6Idr086719@gndrsh.dnsmgr.net> References: <201905222106.x4ML6Idr086719@gndrsh.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: svn commit: r347961 - head To: rgrimes@freebsd.org, "Rodney W. Grimes" , John Baldwin CC: Alexey Dokuchaev , Renato Botelho , Brad Davis , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Cy Schubert Message-ID: X-CMAE-Envelope: MS4wfNmx3tJar3EXRIpb8E+REui3Tw4YmhOs3QMg+2EvgKaPu0watjA5kcAtZu+e1bbvkWtTgEncO3hPntU8P5HWmeX3EXHpba1t+M6sNcx4ZLqETLiKqrEH VArbJFOY1CLSjw4+lIW/9AH/hqEtxBtV1FIsRARp14Jojg76V2ta+JtNDDDowz7YZUE2yLa+mVgMXRO0i82EKya2hNGObB+M2KP1HR1wvoEbF87OPqe/QULN avBOYbqjzQAauJ4Z+wP5vQ/9fa6tupaqc2SCMEj5QbHAaIqh6N8Kz0JgePsXGHfvDrJscMp7mSdn/dMdtufWI9GJGqA4QbrauFF5PwVI1UExPv6pllJiAmtl 9lot1u3SUjWhRuf8bSMomzmT6hRDoI5Ft8gi+ovB5piG02ant9AqGG0I75fZkOlkIrD3V9CgeKcUpcb2NQ472hwIUhkt8A== X-Rspamd-Queue-Id: BC63B6B08A X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 21:14:59 -0000 On May 22, 2019 2:06:18 PM PDT, "Rodney W=2E Grimes" wrote: >> On 5/22/19 5:48 AM, Alexey Dokuchaev wrote: >> > On Wed, May 22, 2019 at 09:42:29AM -0300, Renato Botelho wrote: >> >> On 18/05/19 16:36, Brad Davis wrote: >> >>> New Revision: 347961 >> >>> URL: https://svnweb=2Efreebsd=2Eorg/changeset/base/347961 >> >>> >> >>> Log: >> >>> Add note to UPDATING for users of mergemaster after the move of >> >>> master=2Epasswd and group in r347638=2E >> >>> =20 >> >>> Approved by: allanjude (mentor) >> >>> >> >>> Modified: >> >>> head/UPDATING >> >>> >> >>> +20190517: >> >>> + For users of mergemaster, after recent changes to locations of >> >>> + master=2Epasswd and group in the source tree mergemaster needs to >be >> >>> + updated=2E Before running `mergemaster -p', cd to >usr=2Esbin/mergemaster >> >>> + and run `make install'=2E >> >>> + >> >> >> >> etcupdate is installing group and master=2Epasswd to /lib/libc/gen= =2E=20 >It >> >> seems wrong=2E >> >> >> >> root@x230:/usr/src # etcupdate -p >> >> A /lib/libc/gen/group >> >> A /lib/libc/gen/master=2Epasswd >> >=20 >> > *facepalm* >> >=20 >> > Let me ask again: why these files were moved out of their perfectly >> > (and likely the only) reasonable location (etc/) under some cryptic >> > libc/gen/ which not only makes little sense per se, but also breaks >> > mergemaster(8) and similar tools? >>=20 >> Because bmake doesn't support =2EPATH? Oh wait=2E=2E=2E > >I spoke long ago when this whole "rip etc/ apart" started, and objected >repeatedly and was shot down=2E I even asked for a "complete plan" and >was more or less told this is by design of pkg base=2E > >Let me speak to "by design", the BSD source tree is, by design, to >reflect the installed location of a file with very rare exception >to that design=2E The =2Emk system by design is written with this >assumption in mind as well=2E The above artifact is by that design=2E > >Attempts to alter such by design behavior has problems, some of >which are now, repeatedly showing there ugly head=2E > >=2EPATH could of easily been used, >as well as cd ${SRCTOP}/etc && make FOOCONF >to implement exactly what was done without ANY file moves=2E >Oh, wait that was pointed out, I belive twice, maybe 3 times, >and by some experts on the =2Emk system as well=2E > >sjg (bmake maintainr) and bdrewery (one of our =2Emk system experts) >have both pushed back on these changes=2E > >Good luck with supporting this so not by design package system >if it requires this to be operable=2E Also good luck maintaining >any of the ${DESTDIR}/etc files as now no one knows how to >find them in the source tree=2E > >> John Baldwin I couldn't have said this better, my sentiments exactly=2E --=20 Pardon the typos and autocorrect, small keyboard in use=2E Cheers, Cy Schubert FreeBSD UNIX: Web: http://www=2EFreeBSD=2Eorg The need of the many outweighs the greed of the few=2E From owner-svn-src-head@freebsd.org Wed May 22 21:20:17 2019 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 20CB515B7DA0; Wed, 22 May 2019 21:20:17 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BAD826B55C; Wed, 22 May 2019 21:20:16 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5B98623107; Wed, 22 May 2019 21:20:16 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4MLKGut093249; Wed, 22 May 2019 21:20:16 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4MLKGHl093247; Wed, 22 May 2019 21:20:16 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201905222120.x4MLKGHl093247@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Wed, 22 May 2019 21:20:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348121 - in head/sys: net netinet6 X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: in head/sys: net netinet6 X-SVN-Commit-Revision: 348121 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BAD826B55C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 21:20:17 -0000 Author: melifaro Date: Wed May 22 21:20:15 2019 New Revision: 348121 URL: https://svnweb.freebsd.org/changeset/base/348121 Log: Fix gateway setup for the interface routes. Currently rinit1() and its IPv6 counterpart nd6_prefix_onlink_rtrequest() uses dummy null_sdl gateway address during route insertion and change it afterwards. This behaviour brings complications to the routing stack and the users of its upcoming notification system. This change fixes both rinit1() and nd6_prefix_onlink_rtrequest() by filling in proper gateway in the beginning. It does not change any of the userland notifications as in both cases, they happen after the insertion and fixup process (rt_newaddrmsg_fib() and nd6_rtmsg()). MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D20328 Modified: head/sys/net/route.c head/sys/netinet6/nd6_rtr.c Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Wed May 22 21:06:10 2019 (r348120) +++ head/sys/net/route.c Wed May 22 21:20:15 2019 (r348121) @@ -1995,7 +1995,7 @@ rtinit1(struct ifaddr *ifa, int cmd, int flags, int fi char tempbuf[_SOCKADDR_TMPSIZE]; int didwork = 0; int a_failure = 0; - static struct sockaddr_dl null_sdl = {sizeof(null_sdl), AF_LINK}; + struct sockaddr_dl *sdl = NULL; struct rib_head *rnh; if (flags & RTF_HOST) { @@ -2046,7 +2046,14 @@ rtinit1(struct ifaddr *ifa, int cmd, int flags, int fi rt_maskedcopy(dst, (struct sockaddr *)tempbuf, netmask); dst = (struct sockaddr *)tempbuf; } - } + } else if (cmd == RTM_ADD) { + sdl = (struct sockaddr_dl *)tempbuf; + bzero(sdl, sizeof(struct sockaddr_dl)); + sdl->sdl_family = AF_LINK; + sdl->sdl_len = sizeof(struct sockaddr_dl); + sdl->sdl_type = ifa->ifa_ifp->if_type; + sdl->sdl_index = ifa->ifa_ifp->if_index; + } /* * Now go through all the requested tables (fibs) and do the * requested action. Realistically, this will either be fib 0 @@ -2109,8 +2116,7 @@ rtinit1(struct ifaddr *ifa, int cmd, int flags, int fi * doing this for compatibility reasons */ if (cmd == RTM_ADD) - info.rti_info[RTAX_GATEWAY] = - (struct sockaddr *)&null_sdl; + info.rti_info[RTAX_GATEWAY] = (struct sockaddr *)sdl; else info.rti_info[RTAX_GATEWAY] = ifa->ifa_addr; info.rti_info[RTAX_NETMASK] = netmask; @@ -2137,15 +2143,6 @@ rtinit1(struct ifaddr *ifa, int cmd, int flags, int fi rt->rt_ifa = ifa; } #endif - /* - * doing this for compatibility reasons - */ - if (cmd == RTM_ADD) { - ((struct sockaddr_dl *)rt->rt_gateway)->sdl_type = - rt->rt_ifp->if_type; - ((struct sockaddr_dl *)rt->rt_gateway)->sdl_index = - rt->rt_ifp->if_index; - } RT_ADDREF(rt); RT_UNLOCK(rt); rt_newaddrmsg_fib(cmd, ifa, error, rt, fibnum); Modified: head/sys/netinet6/nd6_rtr.c ============================================================================== --- head/sys/netinet6/nd6_rtr.c Wed May 22 21:06:10 2019 (r348120) +++ head/sys/netinet6/nd6_rtr.c Wed May 22 21:20:15 2019 (r348121) @@ -1894,8 +1894,7 @@ restart: static int nd6_prefix_onlink_rtrequest(struct nd_prefix *pr, struct ifaddr *ifa) { - static struct sockaddr_dl null_sdl = {sizeof(null_sdl), AF_LINK}; - struct rib_head *rnh; + struct sockaddr_dl sdl; struct rtentry *rt; struct sockaddr_in6 mask6; u_long rtflags; @@ -1910,6 +1909,12 @@ nd6_prefix_onlink_rtrequest(struct nd_prefix *pr, stru mask6.sin6_addr = pr->ndpr_mask; rtflags = (ifa->ifa_flags & ~IFA_RTSELF) | RTF_UP; + bzero(&sdl, sizeof(struct sockaddr_dl)); + sdl.sdl_len = sizeof(struct sockaddr_dl); + sdl.sdl_family = AF_LINK; + sdl.sdl_type = ifa->ifa_ifp->if_type; + sdl.sdl_index = ifa->ifa_ifp->if_index; + if(V_rt_add_addr_allfibs) { fibnum = 0; maxfib = rt_numfibs; @@ -1922,26 +1927,13 @@ nd6_prefix_onlink_rtrequest(struct nd_prefix *pr, stru rt = NULL; error = in6_rtrequest(RTM_ADD, - (struct sockaddr *)&pr->ndpr_prefix, ifa->ifa_addr, + (struct sockaddr *)&pr->ndpr_prefix, (struct sockaddr *)&sdl, (struct sockaddr *)&mask6, rtflags, &rt, fibnum); if (error == 0) { KASSERT(rt != NULL, ("%s: in6_rtrequest return no " "error(%d) but rt is NULL, pr=%p, ifa=%p", __func__, error, pr, ifa)); - - rnh = rt_tables_get_rnh(rt->rt_fibnum, AF_INET6); - /* XXX what if rhn == NULL? */ - RIB_WLOCK(rnh); RT_LOCK(rt); - if (rt_setgate(rt, rt_key(rt), - (struct sockaddr *)&null_sdl) == 0) { - struct sockaddr_dl *dl; - - dl = (struct sockaddr_dl *)rt->rt_gateway; - dl->sdl_type = rt->rt_ifp->if_type; - dl->sdl_index = rt->rt_ifp->if_index; - } - RIB_WUNLOCK(rnh); nd6_rtmsg(RTM_ADD, rt); RT_UNLOCK(rt); pr->ndpr_stateflags |= NDPRF_ONLINK; From owner-svn-src-head@freebsd.org Wed May 22 21:47:19 2019 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 1B59B15B86F4; Wed, 22 May 2019 21:47:19 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B6F846C6EC; Wed, 22 May 2019 21:47:18 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9364D2365F; Wed, 22 May 2019 21:47:18 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4MLlIa5009344; Wed, 22 May 2019 21:47:18 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4MLlItj009343; Wed, 22 May 2019 21:47:18 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201905222147.x4MLlItj009343@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Wed, 22 May 2019 21:47:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348122 - in head/libexec: rc/rc.d save-entropy X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head/libexec: rc/rc.d save-entropy X-SVN-Commit-Revision: 348122 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B6F846C6EC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 21:47:19 -0000 Author: cem Date: Wed May 22 21:47:17 2019 New Revision: 348122 URL: https://svnweb.freebsd.org/changeset/base/348122 Log: save-entropy(8), rc.d/random: Set nodump flag Tag saved entropy files as "nodump," to signal that the files should not be backed up by dump(8) or other automated backup software that honors the file flag. Do not produce an error if the target file resides on a filesystem that does not support file flags (e.g., msdos /boot). Reviewed by: delphij Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D20358 Modified: head/libexec/rc/rc.d/random head/libexec/save-entropy/save-entropy.sh Modified: head/libexec/rc/rc.d/random ============================================================================== --- head/libexec/rc/rc.d/random Wed May 22 21:20:15 2019 (r348121) +++ head/libexec/rc/rc.d/random Wed May 22 21:47:17 2019 (r348122) @@ -25,6 +25,7 @@ save_dev_random() for f ; do debug "saving entropy to $f" dd if=/dev/random of="$f" bs=4096 count=1 status=none && + ( chflags nodump "$f" 2>/dev/null || : ) && chmod 600 "$f" && fsync "$f" "$(dirname "$f")" done @@ -99,7 +100,7 @@ random_stop() [Nn][Oo]) ;; *) - echo -n 'Writing entropy file:' + echo -n 'Writing entropy file: ' rm -f ${entropy_file} 2> /dev/null oumask=`umask` umask 077 @@ -118,12 +119,7 @@ random_stop() warn 'write failed (read-only fs?)' ;; *) - dd if=/dev/random of=${entropy_file_confirmed} \ - bs=4096 count=1 2> /dev/null || - warn 'write failed (unwriteable file or full fs?)' - fsync "${entropy_file_confirmed}" \ - "$(dirname "${entropy_file_confirmed}")" \ - 2> /dev/null + save_dev_random "${entropy_file_confirmed}" echo '.' ;; esac @@ -134,7 +130,7 @@ random_stop() [Nn][Oo]) ;; *) - echo -n 'Writing early boot entropy file:' + echo -n 'Writing early boot entropy file: ' rm -f ${entropy_boot_file} 2> /dev/null oumask=`umask` umask 077 @@ -146,12 +142,7 @@ random_stop() warn 'write failed (read-only fs?)' ;; *) - dd if=/dev/random of=${entropy_boot_file_confirmed} \ - bs=4096 count=1 2> /dev/null || - warn 'write failed (unwriteable file or full fs?)' - fsync "${entropy_boot_file_confirmed}" \ - "$(dirname "${entropy_boot_file_confirmed}")" \ - 2> /dev/null + save_dev_random "${entropy_boot_file_confirmed}" echo '.' ;; esac Modified: head/libexec/save-entropy/save-entropy.sh ============================================================================== --- head/libexec/save-entropy/save-entropy.sh Wed May 22 21:20:15 2019 (r348121) +++ head/libexec/save-entropy/save-entropy.sh Wed May 22 21:47:17 2019 (r348122) @@ -90,6 +90,7 @@ while [ ${n} -ge 1 ]; do done dd if=/dev/random of=saved-entropy.1 bs=${entropy_save_sz} count=1 2>/dev/null +chflags nodump saved-entropy.1 2>/dev/null || : fsync saved-entropy.1 "." exit 0 From owner-svn-src-head@freebsd.org Wed May 22 21:47:31 2019 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 49A4E15B8727; Wed, 22 May 2019 21:47:31 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E69516C7E3; Wed, 22 May 2019 21:47:30 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DCBAB23662; Wed, 22 May 2019 21:47:26 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4MLlQoN009394; Wed, 22 May 2019 21:47:26 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4MLlQ5u009393; Wed, 22 May 2019 21:47:26 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201905222147.x4MLlQ5u009393@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 22 May 2019 21:47:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348123 - head/sys/arm/freescale/imx X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/arm/freescale/imx X-SVN-Commit-Revision: 348123 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E69516C7E3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 21:47:31 -0000 Author: ian Date: Wed May 22 21:47:26 2019 New Revision: 348123 URL: https://svnweb.freebsd.org/changeset/base/348123 Log: Add pnp info to the imx_i2c driver. Modified: head/sys/arm/freescale/imx/imx_i2c.c Modified: head/sys/arm/freescale/imx/imx_i2c.c ============================================================================== --- head/sys/arm/freescale/imx/imx_i2c.c Wed May 22 21:47:17 2019 (r348122) +++ head/sys/arm/freescale/imx/imx_i2c.c Wed May 22 21:47:26 2019 (r348123) @@ -194,6 +194,7 @@ DRIVER_MODULE(imx_i2c, simplebus, i2c_driver, i2c_devc DRIVER_MODULE(ofw_iicbus, imx_i2c, ofw_iicbus_driver, ofw_iicbus_devclass, 0, 0); MODULE_DEPEND(imx_i2c, iicbus, 1, 1, 1); MODULE_DEPEND(imx_i2c, ofw_iicbus, 1, 1, 1); +SIMPLEBUS_PNP_INFO(compat_data); static phandle_t i2c_get_node(device_t bus, device_t dev) From owner-svn-src-head@freebsd.org Wed May 22 21:52:54 2019 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 F3E8D15B89E1; Wed, 22 May 2019 21:52:53 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it1-f181.google.com (mail-it1-f181.google.com [209.85.166.181]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A26CE6CDEE; Wed, 22 May 2019 21:52:52 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it1-f181.google.com with SMTP id h20so6232687itk.4; Wed, 22 May 2019 14:52:52 -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:reply-to :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=jqA1L3zQXMVzh4JGM08R8YGQRXvBD+wJnU6/1d1ZL0c=; b=reuLKbSl7cwoNZ+tL3oYDuo6XtyFXsqkxB6sxM3zn6OU7ag8Mlb+Jwamx5hOsgNjQH aOrw4PIk+B6/X82bbuy59StTTVRsfnjGiqrm4H/2V06gmsEphZcnwMV9Abawm4wNl5g8 f92PgzXS8YNg0I+7nYPapM51VwoPCWpLyVkvLC9DpcJ0FelOInhWsSwUXFRgwyz9RjHD uLwD9FTnIwIxjniRogrFNDNhc6WCh5gtr4RnovWmT205wMoRuH9gQBT4+n0ZOXIP4s7l NAvZVtaQ5CKN0FcHzzAsxv4gYM2hQNT7cd08uo+M8eXwrzqycvB6Vv9GOg6ihUuL+tjW 4Ogw== X-Gm-Message-State: APjAAAUqyUpuu7OdfK6618OrYrmZP8cdm8Anfo7o9ZP1txDCFQHAT5kk LddCPFVDdxiA/fxaFdaULPZ05qki X-Google-Smtp-Source: APXvYqznPyGwei/e/yKvhNTTHTi/wb0WnOkMfeN0BmrJHEuuT2i92aVt9ltqUglNpmDFl2Hx+l0NwQ== X-Received: by 2002:a24:c241:: with SMTP id i62mr9964591itg.21.1558561971125; Wed, 22 May 2019 14:52:51 -0700 (PDT) Received: from mail-it1-f170.google.com (mail-it1-f170.google.com. [209.85.166.170]) by smtp.gmail.com with ESMTPSA id w139sm3926576ita.43.2019.05.22.14.52.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 May 2019 14:52:50 -0700 (PDT) Received: by mail-it1-f170.google.com with SMTP id m3so6265126itl.1; Wed, 22 May 2019 14:52:50 -0700 (PDT) X-Received: by 2002:a24:47cc:: with SMTP id t195mr10061944itb.117.1558561970599; Wed, 22 May 2019 14:52:50 -0700 (PDT) MIME-Version: 1.0 References: <201905160109.x4G19DhY080690@repo.freebsd.org> In-Reply-To: Reply-To: cem@freebsd.org From: Conrad Meyer Date: Wed, 22 May 2019 14:52:39 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r347638 - in head: . etc lib/libc/gen To: Brad Davis Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: A26CE6CDEE X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of csecem@gmail.com designates 209.85.166.181 as permitted sender) smtp.mailfrom=csecem@gmail.com X-Spamd-Result: default: False [-5.78 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[cem@freebsd.org]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; REPLYTO_ADDR_EQ_FROM(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.98)[-0.985,0]; FORGED_SENDER(0.30)[cem@freebsd.org,csecem@gmail.com]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_NEQ_ENVFROM(0.00)[cem@freebsd.org,csecem@gmail.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; RCVD_TLS_LAST(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[181.166.85.209.list.dnswl.org : 127.0.5.0]; IP_SCORE(-2.79)[ip: (-8.15), ipnet: 209.85.128.0/17(-3.46), asn: 15169(-2.28), country: US(-0.06)]; RWL_MAILSPIKE_POSSIBLE(0.00)[181.166.85.209.rep.mailspike.net : 127.0.0.17] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 21:52:54 -0000 Hi Brad, Ping. It's still broken. Can you revert this please? Thanks, Conrad On Thu, May 16, 2019 at 8:05 AM Conrad Meyer wrote: > > Hi Brad, > > Can you revert this? It seems to break every config-management tool > we have (mergemaster, etcupdate, beinstall ...). > > Additionally, I don't believe this move has been justified =E2=80=94 the = cons > seem to outweigh the pros, if there are any. I skimmed the > differential and it was not immediately obvious what the benefit was. > The commit message describes what was changed, but not *why* you > thought it was a good idea. > > Thanks, > Conrad > > On Wed, May 15, 2019 at 6:09 PM Brad Davis wrote: > > > > Author: brd > > Date: Thu May 16 01:09:13 2019 > > New Revision: 347638 > > URL: https://svnweb.freebsd.org/changeset/base/347638 > > > > Log: > > Move master.passwd and group to lib/libc/gen/ > > > > 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: will (mentor), rgrimes, manu > > Differential Revision: https://reviews.freebsd.org/D16728 > > > > Added: > > head/lib/libc/gen/group > > - copied unchanged from r347637, head/etc/group > > head/lib/libc/gen/master.passwd > > - copied unchanged from r347637, head/etc/master.passwd > > Deleted: > > head/etc/group > > head/etc/master.passwd > > Modified: > > head/Makefile.inc1 > > head/etc/Makefile > > head/lib/libc/gen/Makefile.inc > > > > Modified: head/Makefile.inc1 > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=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/Makefile.inc1 Thu May 16 00:53:54 2019 (r347637) > > +++ head/Makefile.inc1 Thu May 16 01:09:13 2019 (r347638) > > @@ -871,8 +871,8 @@ DB_FROM_SRC=3D yes > > .endif > > > > .if defined(DB_FROM_SRC) > > -INSTALLFLAGS+=3D -N ${.CURDIR}/etc > > -MTREEFLAGS+=3D -N ${.CURDIR}/etc > > +INSTALLFLAGS+=3D -N ${.CURDIR}/lib/libc/gen > > +MTREEFLAGS+=3D -N ${.CURDIR}/lib/libc/gen > > .endif > > _INSTALL_DDIR=3D ${DESTDIR}/${DISTDIR} > > INSTALL_DDIR=3D ${_INSTALL_DDIR:S://:/:g:C:/$::} > > > > Modified: head/etc/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/etc/Makefile Thu May 16 00:53:54 2019 (r347637) > > +++ head/etc/Makefile Thu May 16 01:09:13 2019 (r347638) > > @@ -15,7 +15,6 @@ SUBDIR+=3Dsendmail > > .endif > > > > BIN1=3D \ > > - group \ > > login.access \ > > rc.bsdextended \ > > rc.firewall \ > > @@ -65,21 +64,7 @@ distribution: > > .endif > > cd ${.CURDIR}; \ > > ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ > > - ${BIN1} ${DESTDIR}/etc; \ > > - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ > > - master.passwd ${DESTDIR}/etc; > > - > > -.if ${MK_TCSH} =3D=3D "no" > > - sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd > > -.endif > > - pwd_mkdb -i -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd > > -.if defined(NO_ROOT) > > - ( \ > > - echo "./etc/passwd type=3Dfile mode=3D0644 uname=3Droot= gname=3Dwheel"; \ > > - echo "./etc/pwd.db type=3Dfile mode=3D0644 uname=3Droot= gname=3Dwheel"; \ > > - echo "./etc/spwd.db type=3Dfile mode=3D0600 uname=3Droo= t gname=3Dwheel"; \ > > - ) | ${METALOG.add} > > -.endif > > + ${BIN1} ${DESTDIR}/etc > > ${_+_}cd ${.CURDIR}/gss; ${MAKE} install > > ${_+_}cd ${.CURDIR}/mtree; ${MAKE} install > > ${_+_}cd ${SRCTOP}/share/termcap; ${MAKE} etc-termcap > > > > Modified: head/lib/libc/gen/Makefile.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/lib/libc/gen/Makefile.inc Thu May 16 00:53:54 2019 = (r347637) > > +++ head/lib/libc/gen/Makefile.inc Thu May 16 01:09:13 2019 = (r347638) > > @@ -4,7 +4,8 @@ > > # machine-independent gen sources > > .PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/gen ${LIBC_SRCTOP}/gen > > > > -CONFS=3D shells > > +CONFS+=3D group master.passwd shells > > +CONFSMODE_master.passwd=3D 600 > > > > SRCS+=3D __getosreldate.c \ > > __pthread_mutex_init_calloc_cb_stub.c \ > > @@ -543,3 +544,16 @@ MLINKS+=3Dvis.3 nvis.3 \ > > vis.3 svis.3 > > > > MLINKS+=3Dwordexp.3 wordfree.3 > > + > > +afterinstallconfig: > > +.if ${MK_TCSH} =3D=3D "no" > > + sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd > > +.endif > > + pwd_mkdb -i -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd > > +.if defined(NO_ROOT) && defined(METALOG) > > + ( \ > > + echo "./etc/pwd.db type=3Dfile mode=3D0644 uname=3Droot= gname=3Dwheel"; \ > > + echo "./etc/spwd.db type=3Dfile mode=3D0600 uname=3Droo= t gname=3Dwheel"; \ > > + echo "./etc/passwd type=3Dfile mode=3D0644 uname=3Droot= gname=3Dwheel"; \ > > + ) | cat -l >> ${METALOG} > > +.endif > > > > Copied: head/lib/libc/gen/group (from r347637, head/etc/group) > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > > +++ head/lib/libc/gen/group Thu May 16 01:09:13 2019 (r34763= 8, copy of r347637, head/etc/group) > > @@ -0,0 +1,36 @@ > > +# $FreeBSD$ > > +# > > +wheel:*:0:root > > +daemon:*:1: > > +kmem:*:2: > > +sys:*:3: > > +tty:*:4: > > +operator:*:5:root > > +mail:*:6: > > +bin:*:7: > > +news:*:8: > > +man:*:9: > > +games:*:13: > > +ftp:*:14: > > +staff:*:20: > > +sshd:*:22: > > +smmsp:*:25: > > +mailnull:*:26: > > +guest:*:31: > > +video:*:44: > > +bind:*:53: > > +unbound:*:59: > > +proxy:*:62: > > +authpf:*:63: > > +_pflogd:*:64: > > +_dhcp:*:65: > > +uucp:*:66: > > +dialer:*:68: > > +network:*:69: > > +audit:*:77: > > +www:*:80: > > +ntpd:*:123: > > +_ypldap:*:160: > > +hast:*:845: > > +nogroup:*:65533: > > +nobody:*:65534: > > > > Copied: head/lib/libc/gen/master.passwd (from r347637, head/etc/master.= passwd) > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > > +++ head/lib/libc/gen/master.passwd Thu May 16 01:09:13 2019 = (r347638, copy of r347637, head/etc/master.passwd) > > @@ -0,0 +1,28 @@ > > +# $FreeBSD$ > > +# > > +root::0:0::0:0:Charlie &:/root:/bin/csh > > +toor:*:0:0::0:0:Bourne-again Superuser:/root: > > +daemon:*:1:1::0:0:Owner of many system processes:/root:/usr/sbin/nolog= in > > +operator:*:2:5::0:0:System &:/:/usr/sbin/nologin > > +bin:*:3:7::0:0:Binaries Commands and Source:/:/usr/sbin/nologin > > +tty:*:4:65533::0:0:Tty Sandbox:/:/usr/sbin/nologin > > +kmem:*:5:65533::0:0:KMem Sandbox:/:/usr/sbin/nologin > > +games:*:7:13::0:0:Games pseudo-user:/:/usr/sbin/nologin > > +news:*:8:8::0:0:News Subsystem:/:/usr/sbin/nologin > > +man:*:9:9::0:0:Mister Man Pages:/usr/share/man:/usr/sbin/nologin > > +sshd:*:22:22::0:0:Secure Shell Daemon:/var/empty:/usr/sbin/nologin > > +smmsp:*:25:25::0:0:Sendmail Submission User:/var/spool/clientmqueue:/u= sr/sbin/nologin > > +mailnull:*:26:26::0:0:Sendmail Default User:/var/spool/mqueue:/usr/sbi= n/nologin > > +bind:*:53:53::0:0:Bind Sandbox:/:/usr/sbin/nologin > > +unbound:*:59:59::0:0:Unbound DNS Resolver:/var/unbound:/usr/sbin/nolog= in > > +proxy:*:62:62::0:0:Packet Filter pseudo-user:/nonexistent:/usr/sbin/no= login > > +_pflogd:*:64:64::0:0:pflogd privsep user:/var/empty:/usr/sbin/nologin > > +_dhcp:*:65:65::0:0:dhcp programs:/var/empty:/usr/sbin/nologin > > +uucp:*:66:66::0:0:UUCP pseudo-user:/var/spool/uucppublic:/usr/local/li= bexec/uucp/uucico > > +pop:*:68:6::0:0:Post Office Owner:/nonexistent:/usr/sbin/nologin > > +auditdistd:*:78:77::0:0:Auditdistd unprivileged user:/var/empty:/usr/s= bin/nologin > > +www:*:80:80::0:0:World Wide Web Owner:/nonexistent:/usr/sbin/nologin > > +ntpd:*:123:123::0:0:NTP Daemon:/var/db/ntp:/usr/sbin/nologin > > +_ypldap:*:160:160::0:0:YP LDAP unprivileged user:/var/empty:/usr/sbin/= nologin > > +hast:*:845:845::0:0:HAST unprivileged user:/var/empty:/usr/sbin/nologi= n > > +nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/usr/sbin/nol= ogin > > From owner-svn-src-head@freebsd.org Wed May 22 23:07:41 2019 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 F32F515906C8; Wed, 22 May 2019 23:07:40 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 980316F72E; Wed, 22 May 2019 23:07:40 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 72C0D24436; Wed, 22 May 2019 23:07:40 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4MN7ebd051861; Wed, 22 May 2019 23:07:40 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4MN7ewC051860; Wed, 22 May 2019 23:07:40 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201905222307.x4MN7ewC051860@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 22 May 2019 23:07:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348127 - head/sbin/bectl X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sbin/bectl X-SVN-Commit-Revision: 348127 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 980316F72E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 23:07:41 -0000 Author: kevans Date: Wed May 22 23:07:40 2019 New Revision: 348127 URL: https://svnweb.freebsd.org/changeset/base/348127 Log: bectl(8): add description for create subcommand In commit r345845, a portion of documentation for the create subcommand was removed. Specifically, for creating a snapshot of an existing boot environment. bectl even has a test-case for this functionality. Removing the sub-command description was discussed in PR 235850. This patch brings back the second "create" description that was originally in place. Albeit, with a few wording/clarifying changes. Submitted by: Rob Fairbanks Reviewed by: kevans MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D20249 Modified: head/sbin/bectl/bectl.8 Modified: head/sbin/bectl/bectl.8 ============================================================================== --- head/sbin/bectl/bectl.8 Wed May 22 22:56:05 2019 (r348126) +++ head/sbin/bectl/bectl.8 Wed May 22 23:07:40 2019 (r348127) @@ -18,7 +18,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 3, 2019 +.Dd May 12, 2019 .Dt BECTL 8 .Os .Sh NAME @@ -35,6 +35,10 @@ .Op Fl e Brq Ar nonActiveBe | Ar beName Ns Cm @ Ns Ar snapshot .Ar newBeName .Nm +.Cm create +.Op Fl r +.Ar beName@snapshot +.Nm .Cm destroy .Op Fl \&Fo .Ar beName Ns Op Cm @ Ns Ar snapshot @@ -120,6 +124,20 @@ Otherwise, the new environment will be created from th If .Nm is creating from another boot environment, a snapshot of that boot environment will be created to clone from. +.It Xo +.Cm create +.Op Fl r +.Ar beName@snapshot +.Xc +Create a snapshot of the boot environment named +.Ar beName . +.Pp +If the +.Fl r +flag is given, a recursive snapshot of the boot environment will be created. +A snapshot is created for each descendant dataset of the boot environment. +.Pp +No new boot environment is created with this command. .It Xo .Cm destroy .Op Fl \&Fo From owner-svn-src-head@freebsd.org Wed May 22 23:11:17 2019 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 C95471590821; Wed, 22 May 2019 23:11:17 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 67D126F99D; Wed, 22 May 2019 23:11:17 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 416C02447E; Wed, 22 May 2019 23:11:17 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4MNBHGR053628; Wed, 22 May 2019 23:11:17 GMT (envelope-from dougm@FreeBSD.org) Received: (from dougm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4MNBH7h053627; Wed, 22 May 2019 23:11:17 GMT (envelope-from dougm@FreeBSD.org) Message-Id: <201905222311.x4MNBH7h053627@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dougm set sender to dougm@FreeBSD.org using -f From: Doug Moore Date: Wed, 22 May 2019 23:11:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348128 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: dougm X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 348128 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 67D126F99D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.955,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 23:11:18 -0000 Author: dougm Date: Wed May 22 23:11:16 2019 New Revision: 348128 URL: https://svnweb.freebsd.org/changeset/base/348128 Log: Cleanups made necessary by r348115, or reactions to it: 1. Change size_t to vm_size_t in some places. 2. Rename vm_map_entry_resize_free to drop the _free part. 3. Fix whitespace errors. 4. Fix screwups in patch-conflict-management that left out important changes related to growing and shrinking objects. Reviewed by: alc Approved by: kib (mentor) Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Wed May 22 23:07:40 2019 (r348127) +++ head/sys/vm/vm_map.c Wed May 22 23:11:16 2019 (r348128) @@ -1241,17 +1241,15 @@ vm_map_entry_unlink(vm_map_t map, } /* - * vm_map_entry_resize_free: + * vm_map_entry_resize: * - * Recompute the amount of free space following a modified vm_map_entry - * and propagate those values up the tree. Call this function after - * resizing a map entry in-place by changing the end value, without a - * call to vm_map_entry_link() or _unlink(). + * Resize a vm_map_entry, recompute the amount of free space that + * follows it and propagate that value up the tree. * * The map must be locked, and leaves it so. */ static void -vm_map_entry_resize_free(vm_map_t map, vm_map_entry_t entry, size_t grow_amount) +vm_map_entry_resize(vm_map_t map, vm_map_entry_t entry, vm_size_t grow_amount) { vm_map_entry_t llist, rlist, root; @@ -1259,15 +1257,15 @@ vm_map_entry_resize_free(vm_map_t map, vm_map_entry_t root = map->root; root = vm_map_splay_split(entry->start, 0, root, &llist, &rlist); KASSERT(root != NULL, - ("vm_map_entry_resize_free: resize_free object not mapped")); + ("%s: resize object not mapped", __func__)); vm_map_splay_findnext(root, &rlist); root->right = NULL; entry->end += grow_amount; map->root = vm_map_splay_merge(root, llist, rlist, root->left, root->right); VM_MAP_ASSERT_CONSISTENT(map); - CTR3(KTR_VM, "vm_map_entry_resize_free: map %p, nentries %d, entry %p", - map, map->nentries, entry); + CTR4(KTR_VM, "%s: map %p, nentries %d, entry %p", + _func__, map, map->nentries, entry); } /* @@ -1487,7 +1485,7 @@ charged: prev_entry)); if ((prev_entry->eflags & MAP_ENTRY_GUARD) == 0) map->size += end - prev_entry->end; - vm_map_entry_resize_free(map, prev_entry, + vm_map_entry_resize(map, prev_entry, end - prev_entry->end); vm_map_simplify_entry(map, prev_entry); return (KERN_SUCCESS); @@ -4168,7 +4166,7 @@ vm_map_growstack(vm_map_t map, vm_offset_t addr, vm_ma struct vmspace *vm; struct ucred *cred; vm_offset_t gap_end, gap_start, grow_start; - size_t grow_amount, guard, max_grow; + vm_size_t grow_amount, guard, max_grow; rlim_t lmemlim, stacklim, vmemlim; int rv, rv1; bool gap_deleted, grow_down, is_procstack; @@ -4314,8 +4312,7 @@ retry: gap_deleted = true; } else { MPASS(gap_entry->start < gap_entry->end - grow_amount); - gap_entry->end -= grow_amount; - vm_map_entry_resize_free(map, gap_entry, -grow_amount); + vm_map_entry_resize(map, gap_entry, -grow_amount); gap_deleted = false; } rv = vm_map_insert(map, NULL, 0, grow_start, @@ -4329,7 +4326,7 @@ retry: MAP_CREATE_GUARD | MAP_CREATE_STACK_GAP_DN); MPASS(rv1 == KERN_SUCCESS); } else - vm_map_entry_resize_free(map, gap_entry, + vm_map_entry_resize(map, gap_entry, grow_amount); } } else { @@ -4344,13 +4341,16 @@ retry: vm_object_coalesce(stack_entry->object.vm_object, stack_entry->offset, (vm_size_t)(stack_entry->end - stack_entry->start), - (vm_size_t)grow_amount, cred != NULL)) { - if (gap_entry->start + grow_amount == gap_entry->end) + grow_amount, cred != NULL)) { + if (gap_entry->start + grow_amount == gap_entry->end) { vm_map_entry_delete(map, gap_entry); - else + vm_map_entry_resize(map, stack_entry, + grow_amount); + } else { gap_entry->start += grow_amount; + stack_entry->end += grow_amount; + } map->size += grow_amount; - vm_map_entry_resize_free(map, stack_entry, grow_amount); rv = KERN_SUCCESS; } else rv = KERN_FAILURE; From owner-svn-src-head@freebsd.org Wed May 22 23:22:37 2019 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 6E5C41590F13; Wed, 22 May 2019 23:22:37 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 13BED703B3; Wed, 22 May 2019 23:22:37 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D6AC8247A6; Wed, 22 May 2019 23:22:36 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4MNMa3K062096; Wed, 22 May 2019 23:22:36 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4MNMa75062095; Wed, 22 May 2019 23:22:36 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201905222322.x4MNMa75062095@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Wed, 22 May 2019 23:22:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348130 - in head/sys/x86: include x86 X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head/sys/x86: include x86 X-SVN-Commit-Revision: 348130 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 13BED703B3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.955,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 23:22:37 -0000 Author: cem Date: Wed May 22 23:22:36 2019 New Revision: 348130 URL: https://svnweb.freebsd.org/changeset/base/348130 Log: Decode and name additional x86 feature bits These are all enumerated in Intel's ISA extension reference, 37th ed. Sponsored by: Dell EMC Isilon Modified: head/sys/x86/include/specialreg.h head/sys/x86/x86/identcpu.c Modified: head/sys/x86/include/specialreg.h ============================================================================== --- head/sys/x86/include/specialreg.h Wed May 22 23:19:20 2019 (r348129) +++ head/sys/x86/include/specialreg.h Wed May 22 23:22:36 2019 (r348130) @@ -433,29 +433,41 @@ /* * CPUID instruction 7 Structured Extended Features, leaf 0 ecx info */ -#define CPUID_STDEXT2_PREFETCHWT1 0x00000001 -#define CPUID_STDEXT2_UMIP 0x00000004 -#define CPUID_STDEXT2_PKU 0x00000008 -#define CPUID_STDEXT2_OSPKE 0x00000010 -#define CPUID_STDEXT2_WAITPKG 0x00000020 -#define CPUID_STDEXT2_GFNI 0x00000100 -#define CPUID_STDEXT2_RDPID 0x00400000 -#define CPUID_STDEXT2_CLDEMOTE 0x02000000 -#define CPUID_STDEXT2_MOVDIRI 0x08000000 +#define CPUID_STDEXT2_PREFETCHWT1 0x00000001 +#define CPUID_STDEXT2_AVX512VBMI 0x00000002 +#define CPUID_STDEXT2_UMIP 0x00000004 +#define CPUID_STDEXT2_PKU 0x00000008 +#define CPUID_STDEXT2_OSPKE 0x00000010 +#define CPUID_STDEXT2_WAITPKG 0x00000020 +#define CPUID_STDEXT2_AVX512VBMI2 0x00000040 +#define CPUID_STDEXT2_GFNI 0x00000100 +#define CPUID_STDEXT2_VAES 0x00000200 +#define CPUID_STDEXT2_VPCLMULQDQ 0x00000400 +#define CPUID_STDEXT2_AVX512VNNI 0x00000800 +#define CPUID_STDEXT2_AVX512BITALG 0x00001000 +#define CPUID_STDEXT2_AVX512VPOPCNTDQ 0x00004000 +#define CPUID_STDEXT2_RDPID 0x00400000 +#define CPUID_STDEXT2_CLDEMOTE 0x02000000 +#define CPUID_STDEXT2_MOVDIRI 0x08000000 #define CPUID_STDEXT2_MOVDIRI64B 0x10000000 -#define CPUID_STDEXT2_SGXLC 0x40000000 +#define CPUID_STDEXT2_ENQCMD 0x20000000 +#define CPUID_STDEXT2_SGXLC 0x40000000 /* * CPUID instruction 7 Structured Extended Features, leaf 0 edx info */ -#define CPUID_STDEXT3_MD_CLEAR 0x00000400 -#define CPUID_STDEXT3_TSXFA 0x00002000 -#define CPUID_STDEXT3_IBPB 0x04000000 -#define CPUID_STDEXT3_STIBP 0x08000000 -#define CPUID_STDEXT3_L1D_FLUSH 0x10000000 -#define CPUID_STDEXT3_ARCH_CAP 0x20000000 -#define CPUID_STDEXT3_CORE_CAP 0x40000000 -#define CPUID_STDEXT3_SSBD 0x80000000 +#define CPUID_STDEXT3_AVX5124VNNIW 0x00000004 +#define CPUID_STDEXT3_AVX5124FMAPS 0x00000008 +#define CPUID_STDEXT3_AVX512VP2INTERSECT 0x00000100 +#define CPUID_STDEXT3_MD_CLEAR 0x00000400 +#define CPUID_STDEXT3_TSXFA 0x00002000 +#define CPUID_STDEXT3_PCONFIG 0x00040000 +#define CPUID_STDEXT3_IBPB 0x04000000 +#define CPUID_STDEXT3_STIBP 0x08000000 +#define CPUID_STDEXT3_L1D_FLUSH 0x10000000 +#define CPUID_STDEXT3_ARCH_CAP 0x20000000 +#define CPUID_STDEXT3_CORE_CAP 0x40000000 +#define CPUID_STDEXT3_SSBD 0x80000000 /* MSR IA32_ARCH_CAP(ABILITIES) bits */ #define IA32_ARCH_CAP_RDCL_NO 0x00000001 Modified: head/sys/x86/x86/identcpu.c ============================================================================== --- head/sys/x86/x86/identcpu.c Wed May 22 23:19:20 2019 (r348129) +++ head/sys/x86/x86/identcpu.c Wed May 22 23:22:36 2019 (r348130) @@ -983,11 +983,18 @@ printcpuinfo(void) "\004PKU" "\005OSPKE" "\006WAITPKG" + "\007AVX512VBMI2" "\011GFNI" + "\012VAES" + "\013VPCLMULQDQ" + "\014AVX512VNNI" + "\015AVX512BITALG" + "\016AVX512VPOPCNTDQ" "\027RDPID" "\032CLDEMOTE" "\034MOVDIRI" "\035MOVDIRI64B" + "\036ENQCMD" "\037SGXLC" ); } @@ -996,8 +1003,12 @@ printcpuinfo(void) printf("\n Structured Extended Features3=0x%b", cpu_stdext_feature3, "\020" + "\003AVX512_4VNNIW" + "\004AVX512_4FMAPS" + "\011AVX512VP2INTERSECT" "\013MD_CLEAR" "\016TSXFA" + "\023PCONFIG" "\033IBPB" "\034STIBP" "\035L1DFL" From owner-svn-src-head@freebsd.org Thu May 23 01:41:51 2019 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 CD26E159425E; Thu, 23 May 2019 01:41:50 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 73B0274F4B; Thu, 23 May 2019 01:41:50 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5038425F61; Thu, 23 May 2019 01:41:50 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4N1foFo034144; Thu, 23 May 2019 01:41:50 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4N1fow7034143; Thu, 23 May 2019 01:41:50 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201905230141.x4N1fow7034143@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 23 May 2019 01:41:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348141 - head/libexec/rc/rc.d X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/libexec/rc/rc.d X-SVN-Commit-Revision: 348141 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 73B0274F4B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 01:41:51 -0000 Author: ian Date: Thu May 23 01:41:49 2019 New Revision: 348141 URL: https://svnweb.freebsd.org/changeset/base/348141 Log: Handle the driftfile option correctly when ntpd_flags is empty. The logic I originally wrote to detect whether a driftfile option was in the set of flags was based on the result of removing the pattern *flag* being an empty string. That didn't handle the case where the string was empty to begin with. Doh! So now it also specifically checks for an empty string. The result of the bad check was that ntpd would run without a driftfile, but it would do so only if it was running as root instead of the non-priveleged ntpd user, which isn't a typical case. Ntpd runs fine without a driftfile, although it does take it longer to stabilize the clock frequency at startup. Reported by: avg@ Pointy hat: ian@ MFC after: some testing Modified: head/libexec/rc/rc.d/ntpd Modified: head/libexec/rc/rc.d/ntpd ============================================================================== --- head/libexec/rc/rc.d/ntpd Thu May 23 01:25:34 2019 (r348140) +++ head/libexec/rc/rc.d/ntpd Thu May 23 01:41:49 2019 (r348141) @@ -87,12 +87,14 @@ ntpd_precmd() # Otherwise, figure out what to do about the driftfile option. If set # by the admin, we don't add the option. If the file exists in the old # default location we use that, else we use the new default location. + if can_run_nonroot; then _user="ntpd" driftopt="-f ${_ntp_default_driftfile}" - elif [ -z "${rc_flags##*-f*}" ] || - [ -z "${rc_flags##*--driftfile*}" ] || - grep -q "^[ \t]*driftfile" "${ntpd_config}"; then + elif grep -q "^[ \t]*driftfile" "${ntpd_config}" || + [ -n "${rc_flags}" ] && + ( [ -z "${rc_flags##*-f*}" ] || + [ -z "${rc_flags##*--driftfile*}" ] ); then driftopt="" # admin set the option, we don't need to add it. elif [ -f "${_ntp_old_driftfile}" ]; then driftopt="-f ${_ntp_old_driftfile}" From owner-svn-src-head@freebsd.org Thu May 23 01:45:32 2019 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 D18B115944C9 for ; Thu, 23 May 2019 01:45:31 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound3d.ore.mailhop.org (outbound3d.ore.mailhop.org [54.186.57.195]) (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 3229575266 for ; Thu, 23 May 2019 01:45:31 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1558575929; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=rEgQfbBP6MbMFD1IpW1ZzA20JOw0p/R+W0qMIQahNGVVhcTqrDMDZYcGwq7hWLpefK6La4uP/HrVY IRU4CZmX+t0CeUcMZ5kvsB2KBbnKACkom+ZpzPnwrx5j15CxEmf0JkFnB0ryuCiRaVXIDrn+OLanbq FGFHzPwkhuEws6qXIlSdQk52VT9KSYc/YfZMAypbB1BrCM+PxWY0TsbHl52fsopRc2vceZC5mmcBj/ JgipobqFG8DtyWZreiqR14uvwjZ9RGeT5m4UTBoeaLVXFS3z8oSy6yMKggviSTj144qxXfUGrPMJij F26nogJMYWr5q9YH6C8qsharQkLI0rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:dkim-signature:from; bh=u//1ZE3/VLHHKmNPF1z8TdQY4/ZkCPSpblQtxeSWr6w=; b=ishBV7L+sW2/TaH4s1YwMVOaqlQ5aHLRLyaXz2MR6a8nMoJW/dwFpXPZxDhTSKF+gedNkjdSFWto1 zJDdahPIxR4Xf7xSiqfVLh/FOuWXyouclbfqxGfJPq7m9pkXGRxMw81hmoOkr+Vdmc/qNcQkhjM4Iy GLNtP/vgIIcZSjIKZ3w1yCpM/H7hMa0LBYPgsu61i9PHQD/jqC117W4xo9+RJgcJYOQl6mfFnrtkR+ Iu+Q71VA1znZbpUKooUMHzptl4ol99inOTa8ltx12SAw4ha3ilGNlQR51gtlEK2GNkTTqCNHcGsqEM ptYYLLPim+EPcn8Z8K8jYQh8MLIMikw== ARC-Authentication-Results: i=1; outbound3.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:from; bh=u//1ZE3/VLHHKmNPF1z8TdQY4/ZkCPSpblQtxeSWr6w=; b=i2c6YBOjeH1BaAYr/g+ofUFqpYvdjcdC5UVJjqy3EYA8cJMsJMx2w4LCWBoNDfjPWFltO3OLhaomq shmvalP711gVlYlDXyOopVGfbIiPYBTq+J5d6+S1rY68BxUu80zEygp8T3l41YvDIZkqBM7lLCzw0i 2PAPa61Ger/QyIpvPBQvbZLVdl2O3cvBS9TIt+ktPFSkrkKvBqhhNldxo3Xw8PuHhkZDCVqD+BRB3R SUMK5btsMHE9Fmtjaaeez/TzK+AiX6HUaLfJ0TiFXDb0u6CHgndRGqVf2qc8/h3p+IdIz0fnWfOyM9 7iod66BAsBmkFY0MJWKSJdMHMxV79pg== X-MHO-RoutePath: aGlwcGll X-MHO-User: 703b0d09-7cfc-11e9-990f-673a89bc4518 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound3.ore.mailhop.org (Halon) with ESMTPSA id 703b0d09-7cfc-11e9-990f-673a89bc4518; Thu, 23 May 2019 01:45:27 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x4N1jQcd008425; Wed, 22 May 2019 19:45:26 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <64935b6f3beef7bde7a32b359187d998a480f258.camel@freebsd.org> Subject: Re: svn commit: r336547 - in head/etc: defaults rc.d From: Ian Lepore To: Andriy Gapon , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Wed, 22 May 2019 19:45:26 -0600 In-Reply-To: <6b966875-23f5-28cf-9e65-7c30974eef05@FreeBSD.org> References: <201807201359.w6KDxT1p087000@repo.freebsd.org> <6b966875-23f5-28cf-9e65-7c30974eef05@FreeBSD.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 3229575266 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.989,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 01:45:32 -0000 On Wed, 2019-05-22 at 14:40 +0300, Andriy Gapon wrote: > Something I've just noticed about this commit: > > On 20/07/2018 16:59, Ian Lepore wrote: > > Author: ian > > Date: Fri Jul 20 13:59:29 2018 > > New Revision: 336547 > > URL: https://svnweb.freebsd.org/changeset/base/336547 > > > > Log: > > Automatically run ntpd as non-root when possible. > > [snip] > > > +ntpd_precmd() > > +{ > > + local driftopt > > + > > + # If we can run as a non-root user, switch uid to ntpd and use > > the > > + # new default location for the driftfile inside the ntpd-owned > > dir. > > + # Otherwise, figure out what to do about the driftfile > > option. If set > > + # by the admin, we don't add the option. If the file exists in > > the old > > + # default location we use that, else we use the new default > > location. > > + if can_run_nonroot; then > > + _user="ntpd" > > + driftopt="-f ${_ntp_default_driftfile}" > > + elif [ -z "${rc_flags##*-f*}" ] || > > + [ -z "${rc_flags##*--driftfile*}" ] || > > It seems that the two checks above produce a false positive if > rc_flags is empty > already. And that's the case on a system that I recently brought up > (very > recent CURRENT via source install). /etc/defaults/rc.conf has > ntpd_flags="". > As a result ntpd is started without the drift file option. > And the stock /etc/ntp.conf also does not have the directive. > Doh! I use that pattern-removal technique all the time at $work, I wonder how many times I've committed this mistake and just haven't been burned by it yet? Good catch, should be fixed by r348141. I'm curious though... it can only hit this condition if can_run_nonroot returns false, and it shouldn't do so on a freshly-installed system. The idea was to make it run non-priv out of the box and only run as root if the admin had done something non-standard. Does it make sense to you that it was running as root on your system? Like have you customized ntp.conf to add some file-related commands? -- Ian From owner-svn-src-head@freebsd.org Thu May 23 01:49:09 2019 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 CD19E15945EC; Thu, 23 May 2019 01:49:09 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 69A33754E2; Thu, 23 May 2019 01:49:09 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3FC5925F95; Thu, 23 May 2019 01:49:09 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4N1n9Vg036792; Thu, 23 May 2019 01:49:09 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4N1n9pO036791; Thu, 23 May 2019 01:49:09 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201905230149.x4N1n9pO036791@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 23 May 2019 01:49:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348143 - head/libexec/rc/rc.d X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/libexec/rc/rc.d X-SVN-Commit-Revision: 348143 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 69A33754E2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 01:49:10 -0000 Author: ian Date: Thu May 23 01:49:08 2019 New Revision: 348143 URL: https://svnweb.freebsd.org/changeset/base/348143 Log: Remove accidentally-added blank line; the style throughout this file is to use no whitespace between a comment block and the code it describes. Modified: head/libexec/rc/rc.d/ntpd Modified: head/libexec/rc/rc.d/ntpd ============================================================================== --- head/libexec/rc/rc.d/ntpd Thu May 23 01:48:07 2019 (r348142) +++ head/libexec/rc/rc.d/ntpd Thu May 23 01:49:08 2019 (r348143) @@ -87,7 +87,6 @@ ntpd_precmd() # Otherwise, figure out what to do about the driftfile option. If set # by the admin, we don't add the option. If the file exists in the old # default location we use that, else we use the new default location. - if can_run_nonroot; then _user="ntpd" driftopt="-f ${_ntp_default_driftfile}" From owner-svn-src-head@freebsd.org Thu May 23 02:10:42 2019 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 DCD3E1594B81; Thu, 23 May 2019 02:10:42 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7E85875E2E; Thu, 23 May 2019 02:10:42 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5AF6726404; Thu, 23 May 2019 02:10:42 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4N2AgNd047913; Thu, 23 May 2019 02:10:42 GMT (envelope-from dougm@FreeBSD.org) Received: (from dougm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4N2AgEe047912; Thu, 23 May 2019 02:10:42 GMT (envelope-from dougm@FreeBSD.org) Message-Id: <201905230210.x4N2AgEe047912@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dougm set sender to dougm@FreeBSD.org using -f From: Doug Moore Date: Thu, 23 May 2019 02:10:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348144 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: dougm X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 348144 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7E85875E2E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 02:10:43 -0000 Author: dougm Date: Thu May 23 02:10:41 2019 New Revision: 348144 URL: https://svnweb.freebsd.org/changeset/base/348144 Log: Fix typo from r348128: _func__ -> __func__ Reported by: LINT Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Thu May 23 01:49:08 2019 (r348143) +++ head/sys/vm/vm_map.c Thu May 23 02:10:41 2019 (r348144) @@ -1265,7 +1265,7 @@ vm_map_entry_resize(vm_map_t map, vm_map_entry_t entry root->left, root->right); VM_MAP_ASSERT_CONSISTENT(map); CTR4(KTR_VM, "%s: map %p, nentries %d, entry %p", - _func__, map, map->nentries, entry); + __func__, map, map->nentries, entry); } /* From owner-svn-src-head@freebsd.org Thu May 23 03:40:50 2019 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 EC9B215971A0; Thu, 23 May 2019 03:40:49 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8E77780888; Thu, 23 May 2019 03:40:49 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 68F3B272B8; Thu, 23 May 2019 03:40:49 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4N3enTn096135; Thu, 23 May 2019 03:40:49 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4N3entC096134; Thu, 23 May 2019 03:40:49 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201905230340.x4N3entC096134@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Thu, 23 May 2019 03:40:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348146 - head/sys/powerpc/booke X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/booke X-SVN-Commit-Revision: 348146 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8E77780888 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 03:40:50 -0000 Author: jhibbits Date: Thu May 23 03:40:48 2019 New Revision: 348146 URL: https://svnweb.freebsd.org/changeset/base/348146 Log: powerpc/booke: It helps to set variables before using them Actually set the source and destination VA's before using them. Fixes a bizarre panic on 32-bit Book-E. Not sure why this wasn't caught by the compiler. Modified: head/sys/powerpc/booke/pmap.c Modified: head/sys/powerpc/booke/pmap.c ============================================================================== --- head/sys/powerpc/booke/pmap.c Thu May 23 02:12:00 2019 (r348145) +++ head/sys/powerpc/booke/pmap.c Thu May 23 03:40:48 2019 (r348146) @@ -3043,11 +3043,12 @@ mmu_booke_copy_page(mmu_t mmu, vm_page_t sm, vm_page_t dva = PHYS_TO_DMAP(VM_PAGE_TO_PHYS(dm)); memcpy((caddr_t)dva, (caddr_t)sva, PAGE_SIZE); #else + sva = copy_page_src_va; + dva = copy_page_dst_va; + mtx_lock(©_page_mutex); mmu_booke_kenter(mmu, sva, VM_PAGE_TO_PHYS(sm)); mmu_booke_kenter(mmu, dva, VM_PAGE_TO_PHYS(dm)); - sva = copy_page_src_va; - dva = copy_page_dst_va; memcpy((caddr_t)dva, (caddr_t)sva, PAGE_SIZE); From owner-svn-src-head@freebsd.org Thu May 23 03:47:26 2019 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 3BA1315974B4; Thu, 23 May 2019 03:47:26 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D729D80D6F; Thu, 23 May 2019 03:47:25 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B138427487; Thu, 23 May 2019 03:47:25 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4N3lPsj000342; Thu, 23 May 2019 03:47:25 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4N3lPFY000341; Thu, 23 May 2019 03:47:25 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201905230347.x4N3lPFY000341@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Thu, 23 May 2019 03:47:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348147 - head/sys/powerpc/mpc85xx X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/mpc85xx X-SVN-Commit-Revision: 348147 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D729D80D6F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 03:47:26 -0000 Author: jhibbits Date: Thu May 23 03:47:25 2019 New Revision: 348147 URL: https://svnweb.freebsd.org/changeset/base/348147 Log: powerpc/mpc85xx: Use the proper (EREF) form of writing to DBCR0 DBCR0, according to the Freescale EREF, is guaranteed to be updated, and changes take effect, after an isync plus change of MSR[DE] from 0 to 1. Otherwise it's guaranteed to be updated "eventually". Use the expected synchronization sequence to write it for resetting. This prevents "Reset failed" from being printed immediately before the CPU resets. MFC after: 2 weeks Modified: head/sys/powerpc/mpc85xx/platform_mpc85xx.c Modified: head/sys/powerpc/mpc85xx/platform_mpc85xx.c ============================================================================== --- head/sys/powerpc/mpc85xx/platform_mpc85xx.c Thu May 23 03:40:48 2019 (r348146) +++ head/sys/powerpc/mpc85xx/platform_mpc85xx.c Thu May 23 03:47:25 2019 (r348147) @@ -517,15 +517,14 @@ mpc85xx_reset(platform_t plat) */ ccsr_write4(OCP85XX_RSTCR, 2); - /* Clear DBCR0, disables debug interrupts and events. */ - mtspr(SPR_DBCR0, 0); + mtmsr(mfmsr() & ~PSL_DE); + + /* Enable debug interrupts and issue reset. */ + mtspr(SPR_DBCR0, DBCR0_IDM | DBCR0_RST_SYSTEM); __asm __volatile("isync"); /* Enable Debug Interrupts in MSR. */ mtmsr(mfmsr() | PSL_DE); - - /* Enable debug interrupts and issue reset. */ - mtspr(SPR_DBCR0, mfspr(SPR_DBCR0) | DBCR0_IDM | DBCR0_RST_SYSTEM); printf("Reset failed...\n"); while (1) From owner-svn-src-head@freebsd.org Thu May 23 05:17:19 2019 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 DA6E11598FC3; Thu, 23 May 2019 05:17:19 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 775AF8341F; Thu, 23 May 2019 05:17:19 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 470D43ED; Thu, 23 May 2019 05:17:19 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4N5HJYW047286; Thu, 23 May 2019 05:17:19 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4N5HJba047285; Thu, 23 May 2019 05:17:19 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201905230517.x4N5HJba047285@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 23 May 2019 05:17:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348148 - head/sys/mips/mips X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/sys/mips/mips X-SVN-Commit-Revision: 348148 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 775AF8341F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.982,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 05:17:20 -0000 Author: delphij Date: Thu May 23 05:17:18 2019 New Revision: 348148 URL: https://svnweb.freebsd.org/changeset/base/348148 Log: Delete unneeded #include from sys/mips. PR: 229763 Submitted by: Yoshihiro Ota Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D20190 Modified: head/sys/mips/mips/elf_trampoline.c Modified: head/sys/mips/mips/elf_trampoline.c ============================================================================== --- head/sys/mips/mips/elf_trampoline.c Thu May 23 03:47:25 2019 (r348147) +++ head/sys/mips/mips/elf_trampoline.c Thu May 23 05:17:18 2019 (r348148) @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); */ #include "opt_global.h" -#include #include #include #include From owner-svn-src-head@freebsd.org Thu May 23 05:32:11 2019 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 56D95159A5FE; Thu, 23 May 2019 05:32:11 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0351183C0D; Thu, 23 May 2019 05:32:03 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lj1-f193.google.com with SMTP id h11so4230004ljb.2; Wed, 22 May 2019 22:32:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=KEaN0BsOASP6aMMB1ueI1/nRGE5tEStYjZPt0kbJ6zE=; b=dbWp4EpbexCxfV9FxOlB5tUvQ4gRpFWLij0F7gwVjyZ+VyEGjdhtYsVh5rl/wxBeOR 1NEE9t5u/J4kFQMHvFzmZcRzqeuIKy9mjJ7qIQMkQ0LAZyhFqgk6rUmAuAyodW264bcw P0AIf31y2RjKWSin6tvMcsocKgmgJZCZqTG9hyXRkTlv/T+CkJYUeVApNDpmEU9izgX3 7dpJIJgCCjtQQ2OjoTTDWruzczO5BMyrr7iepZtD5Gg6uNlX93tKzPBSZv1vX0DmwCi1 4FxmIVYGnMf+ZnisTgpZ707pM9MVOFbw6ueUx/V9ESsjrgl2HcnvfrNAtuLrbmDpX/hm GhMA== X-Gm-Message-State: APjAAAXqqOoRQjOOkWl+HBtwvRjXuAbFS/l6/ALIP7m1DVLpOR2/9yrn NYosQ/Jgf5nO83cfF2ixzhyM+LkE X-Google-Smtp-Source: APXvYqyJJHrRFg9SH2Kp+Zz5tu/HmOXo67IsFrplgNGEmQmy+6A36b68YhquLGI3KR6XupeCtnLMPw== X-Received: by 2002:a2e:4246:: with SMTP id p67mr34089367lja.44.1558589045455; Wed, 22 May 2019 22:24:05 -0700 (PDT) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id o76sm5927190lfo.7.2019.05.22.22.24.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 May 2019 22:24:04 -0700 (PDT) Subject: Re: svn commit: r336547 - in head/etc: defaults rc.d To: Ian Lepore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201807201359.w6KDxT1p087000@repo.freebsd.org> <6b966875-23f5-28cf-9e65-7c30974eef05@FreeBSD.org> <64935b6f3beef7bde7a32b359187d998a480f258.camel@freebsd.org> From: Andriy Gapon Openpgp: preference=signencrypt Autocrypt: addr=avg@FreeBSD.org; prefer-encrypt=mutual; keydata= xsFNBFm4LIgBEADNB/3lT7f15UKeQ52xCFQx/GqHkSxEdVyLFZTmY3KyNPQGBtyvVyBfprJ7 mAeXZWfhat6cKNRAGZcL5EmewdQuUfQfBdYmKjbw3a9GFDsDNuhDA2QwFt8BmkiVMRYyvI7l N0eVzszWCUgdc3qqM6qqcgBaqsVmJluwpvwp4ZBXmch5BgDDDb1MPO8AZ2QZfIQmplkj8Y6Z AiNMknkmgaekIINSJX8IzRzKD5WwMsin70psE8dpL/iBsA2cpJGzWMObVTtCxeDKlBCNqM1i gTXta1ukdUT7JgLEFZk9ceYQQMJJtUwzWu1UHfZn0Fs29HTqawfWPSZVbulbrnu5q55R4PlQ /xURkWQUTyDpqUvb4JK371zhepXiXDwrrpnyyZABm3SFLkk2bHlheeKU6Yql4pcmSVym1AS4 dV8y0oHAfdlSCF6tpOPf2+K9nW1CFA8b/tw4oJBTtfZ1kxXOMdyZU5fiG7xb1qDgpQKgHUX8 7Rd2T1UVLVeuhYlXNw2F+a2ucY+cMoqz3LtpksUiBppJhw099gEXehcN2JbUZ2TueJdt1FdS ztnZmsHUXLxrRBtGwqnFL7GSd6snpGIKuuL305iaOGODbb9c7ne1JqBbkw1wh8ci6vvwGlzx rexzimRaBzJxlkjNfMx8WpCvYebGMydNoeEtkWldtjTNVsUAtQARAQABzR5BbmRyaXkgR2Fw b24gPGF2Z0BGcmVlQlNELm9yZz7CwZQEEwEIAD4WIQS+LEO7ngQnXA4Bjr538m7TUc1yjwUC WbgsiAIbIwUJBaOagAULCQgHAgYVCAkKCwIEFgIDAQIeAQIXgAAKCRB38m7TUc1yj+JAEACV l9AK/nOWAt/9cufV2fRj0hdOqB1aCshtSrwHk/exXsDa4/FkmegxXQGY+3GWX3deIyesbVRL rYdtdK0dqJyT1SBqXK1h3/at9rxr9GQA6KWOxTjUFURsU7ok/6SIlm8uLRPNKO+yq0GDjgaO LzN+xykuBA0FlhQAXJnpZLcVfPJdWv7sSHGedL5ln8P8rxR+XnmsA5TUaaPcbhTB+mG+iKFj GghASDSfGqLWFPBlX/fpXikBDZ1gvOr8nyMY9nXhgfXpq3B6QCRYKPy58ChrZ5weeJZ29b7/ QdEO8NFNWHjSD9meiLdWQaqo9Y7uUxN3wySc/YUZxtS0bhAd8zJdNPsJYG8sXgKjeBQMVGuT eCAJFEYJqbwWvIXMfVWop4+O4xB+z2YE3jAbG/9tB/GSnQdVSj3G8MS80iLS58frnt+RSEw/ psahrfh0dh6SFHttE049xYiC+cM8J27Aaf0i9RflyITq57NuJm+AHJoU9SQUkIF0nc6lfA+o JRiyRlHZHKoRQkIg4aiKaZSWjQYRl5Txl0IZUP1dSWMX4s3XTMurC/pnja45dge/4ESOtJ9R 8XuIWg45Oq6MeIWdjKddGhRj3OohsltKgkEU3eLKYtB6qRTQypHHUawCXz88uYt5e3w4V16H lCpSTZV/EVHnNe45FVBlvK7k7HFfDDkryM7BTQRZuCyIARAAlq0slcsVboY/+IUJdcbEiJRW be9HKVz4SUchq0z9MZPX/0dcnvz/gkyYA+OuM78dNS7Mbby5dTvOqfpLJfCuhaNYOhlE0wY+ 1T6Tf1f4c/uA3U/YiadukQ3+6TJuYGAdRZD5EqYFIkreARTVWg87N9g0fT9BEqLw9lJtEGDY EWUE7L++B8o4uu3LQFEYxcrb4K/WKmgtmFcm77s0IKDrfcX4doV92QTIpLiRxcOmCC/OCYuO jB1oaaqXQzZrCutXRK0L5XN1Y1PYjIrEzHMIXmCDlLYnpFkK+itlXwlE2ZQxkfMruCWdQXye syl2fynAe8hvp7Mms9qU2r2K9EcJiR5N1t1C2/kTKNUhcRv7Yd/vwusK7BqJbhlng5ZgRx0m WxdntU/JLEntz3QBsBsWM9Y9wf2V4tLv6/DuDBta781RsCB/UrU2zNuOEkSixlUiHxw1dccI 6CVlaWkkJBxmHX22GdDFrcjvwMNIbbyfQLuBq6IOh8nvu9vuItup7qemDG3Ms6TVwA7BD3j+ 3fGprtyW8Fd/RR2bW2+LWkMrqHffAr6Y6V3h5kd2G9Q8ZWpEJk+LG6Mk3fhZhmCnHhDu6CwN MeUvxXDVO+fqc3JjFm5OxhmfVeJKrbCEUJyM8ESWLoNHLqjywdZga4Q7P12g8DUQ1mRxYg/L HgZY3zfKOqcAEQEAAcLBfAQYAQgAJhYhBL4sQ7ueBCdcDgGOvnfybtNRzXKPBQJZuCyIAhsM BQkFo5qAAAoJEHfybtNRzXKPBVwQAKfFy9P7N3OsLDMB56A4Kf+ZT+d5cIx0Yiaf4n6w7m3i ImHHHk9FIetI4Xe54a2IXh4Bq5UkAGY0667eIs+Z1Ea6I2i27Sdo7DxGwq09Qnm/Y65ADvXs 3aBvokCcm7FsM1wky395m8xUos1681oV5oxgqeRI8/76qy0hD9WR65UW+HQgZRIcIjSel9vR XDaD2HLGPTTGr7u4v00UeTMs6qvPsa2PJagogrKY8RXdFtXvweQFz78NbXhluwix2Tb9ETPk LIpDrtzV73CaE2aqBG/KrboXT2C67BgFtnk7T7Y7iKq4/XvEdDWscz2wws91BOXuMMd4c/c4 OmGW9m3RBLufFrOag1q5yUS9QbFfyqL6dftJP3Zq/xe+mr7sbWbhPVCQFrH3r26mpmy841ym dwQnNcsbIGiBASBSKksOvIDYKa2Wy8htPmWFTEOPRpFXdGQ27awcjjnB42nngyCK5ukZDHi6 w0qK5DNQQCkiweevCIC6wc3p67jl1EMFY5+z+zdTPb3h7LeVnGqW0qBQl99vVFgzLxchKcl0 R/paSFgwqXCZhAKMuUHncJuynDOP7z5LirUeFI8qsBAJi1rXpQoLJTVcW72swZ42IdPiboqx NbTMiNOiE36GqMcTPfKylCbF45JNX4nF9ElM0E+Y8gi4cizJYBRr2FBJgay0b9Cp Message-ID: <123a85ed-8eff-a841-bec5-9af8e01b4b67@FreeBSD.org> Date: Thu, 23 May 2019 08:24:03 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <64935b6f3beef7bde7a32b359187d998a480f258.camel@freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 0351183C0D X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 05:32:11 -0000 On 23/05/2019 04:45, Ian Lepore wrote: > Doh! I use that pattern-removal technique all the time at $work, I > wonder how many times I've committed this mistake and just haven't been > burned by it yet? > > Good catch, should be fixed by r348141. Thank you! > I'm curious though... it can only hit this condition if can_run_nonroot > returns false, and it shouldn't do so on a freshly-installed system. > The idea was to make it run non-priv out of the box and only run as > root if the admin had done something non-standard. Does it make sense > to you that it was running as root on your system? Like have you > customized ntp.conf to add some file-related commands? I think that it could be because of a customer kernel without MAC. I'll consider adding it. -- Andriy Gapon From owner-svn-src-head@freebsd.org Thu May 23 06:54:00 2019 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 9CB24159ED24; Thu, 23 May 2019 06:54:00 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 306CE86178; Thu, 23 May 2019 06:54:00 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 16E6614D9; Thu, 23 May 2019 06:54:00 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4N6rxfZ099383; Thu, 23 May 2019 06:53:59 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4N6rxE5099382; Thu, 23 May 2019 06:53:59 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201905230653.x4N6rxE5099382@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 23 May 2019 06:53:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348150 - head/libexec/rc/rc.d X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/libexec/rc/rc.d X-SVN-Commit-Revision: 348150 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 306CE86178 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 06:54:00 -0000 Author: manu Date: Thu May 23 06:53:59 2019 New Revision: 348150 URL: https://svnweb.freebsd.org/changeset/base/348150 Log: pkgbase: Remove etc/zfs from being packaged This is an empty directory and it cause a FreeBSD-zfs package to be created when we don't need one. Reviewed by: bapt Modified: head/libexec/rc/rc.d/Makefile Modified: head/libexec/rc/rc.d/Makefile ============================================================================== --- head/libexec/rc/rc.d/Makefile Thu May 23 05:49:43 2019 (r348149) +++ head/libexec/rc/rc.d/Makefile Thu May 23 06:53:59 2019 (r348150) @@ -327,9 +327,6 @@ ZFS+= zfsbe ZFS+= zfsd ZFS+= zvol ZFSPACKAGE= zfs -DIRS+= ETC_ZFS -ETC_ZFS= /etc/zfs -ETC_ZFSPACKAGE= zfs .endif .for fg in ${CONFGROUPS} From owner-svn-src-head@freebsd.org Thu May 23 07:59:17 2019 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 12DF815A129A; Thu, 23 May 2019 07:59:17 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AC86387D7B; Thu, 23 May 2019 07:59:16 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 863451F0C; Thu, 23 May 2019 07:59:16 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4N7xG97031377; Thu, 23 May 2019 07:59:16 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4N7xGc9031376; Thu, 23 May 2019 07:59:16 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201905230759.x4N7xGc9031376@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 23 May 2019 07:59:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348151 - head/usr.sbin/etcupdate X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/usr.sbin/etcupdate X-SVN-Commit-Revision: 348151 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AC86387D7B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 07:59:17 -0000 Author: manu Date: Thu May 23 07:59:16 2019 New Revision: 348151 URL: https://svnweb.freebsd.org/changeset/base/348151 Log: etcupdate: Fix -p after the move of the passwd related files Since PREWORLD_FILES only contain files that needs to be copied into /etc copy directly those files there. Reported by: many Modified: head/usr.sbin/etcupdate/etcupdate.sh Modified: head/usr.sbin/etcupdate/etcupdate.sh ============================================================================== --- head/usr.sbin/etcupdate/etcupdate.sh Thu May 23 06:53:59 2019 (r348150) +++ head/usr.sbin/etcupdate/etcupdate.sh Thu May 23 07:59:16 2019 (r348151) @@ -196,9 +196,9 @@ build_tree() # Build a limited tree that only contains files that are # crucial to installworld. for file in $PREWORLD_FILES; do - dir=`dirname /$file` - mkdir -p $1/$dir >&3 2>&1 || return 1 - cp -p $SRCDIR/$file $1/$file || return 1 + name=$(basename $file) + mkdir -p $1/etc >&3 2>&1 || return 1 + cp -p $SRCDIR/$file etc/$name || return 1 done elif ! [ -n "$nobuild" ]; then (cd $SRCDIR; $make DESTDIR=$destdir distrib-dirs && From owner-svn-src-head@freebsd.org Thu May 23 11:06:39 2019 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 6807615A699A; Thu, 23 May 2019 11:06:39 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EF5D28E46F; Thu, 23 May 2019 11:06:38 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C4B9741B9; Thu, 23 May 2019 11:06:38 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4NB6cVi032259; Thu, 23 May 2019 11:06:38 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NB6cbq032258; Thu, 23 May 2019 11:06:38 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201905231106.x4NB6cbq032258@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 23 May 2019 11:06:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348152 - head/sys/dev/usb X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/dev/usb X-SVN-Commit-Revision: 348152 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EF5D28E46F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 11:06:39 -0000 Author: avg Date: Thu May 23 11:06:38 2019 New Revision: 348152 URL: https://svnweb.freebsd.org/changeset/base/348152 Log: Add USB ID for CP2112 This is a curious small widget for which I might write a driver. It is bridge between USB HID interface and I2C interface plus some GPIO pins. MFC after: 2 weeks Modified: head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Thu May 23 07:59:16 2019 (r348151) +++ head/sys/dev/usb/usbdevs Thu May 23 11:06:38 2019 (r348152) @@ -4342,6 +4342,7 @@ product SILABS CP210X_2 0xea61 CP210x Serial product SILABS CP210X_3 0xea70 CP210x Serial product SILABS CP210X_4 0xea80 CP210x Serial product SILABS INFINITY_MIC 0xea71 Infinity GPS-MIC-1 Radio Monophone +product SILABS CP2112 0xea90 CP2112 HID USB-to-SMBus Bridge with GPIO product SILABS USBSCOPE50 0xf001 USBscope50 product SILABS USBWAVE12 0xf002 USBwave12 product SILABS USBPULSE100 0xf003 USBpulse100 From owner-svn-src-head@freebsd.org Thu May 23 11:15:23 2019 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 501A015A6D31; Thu, 23 May 2019 11:15:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E12CA8EA60; Thu, 23 May 2019 11:15:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B7E07435E; Thu, 23 May 2019 11:15:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4NBFMmN037565; Thu, 23 May 2019 11:15:22 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NBFMSu037564; Thu, 23 May 2019 11:15:22 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201905231115.x4NBFMSu037564@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 23 May 2019 11:15:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348153 - head/sys/dev/gpio X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/dev/gpio X-SVN-Commit-Revision: 348153 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E12CA8EA60 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 11:15:23 -0000 Author: avg Date: Thu May 23 11:15:22 2019 New Revision: 348153 URL: https://svnweb.freebsd.org/changeset/base/348153 Log: gpioled: add a new hint for initial state hint.gpioled.%d.state determines the initial state of the LED when the driver takes control over it: 0 - the LED is off 1 - the LED is on -1 - the LED is kept as it was While here, add a module version declaration. MFC after: 2 weks Modified: head/sys/dev/gpio/gpioled.c Modified: head/sys/dev/gpio/gpioled.c ============================================================================== --- head/sys/dev/gpio/gpioled.c Thu May 23 11:06:38 2019 (r348152) +++ head/sys/dev/gpio/gpioled.c Thu May 23 11:15:22 2019 (r348153) @@ -115,6 +115,8 @@ gpioled_attach(device_t dev) name = NULL; resource_int_value(device_get_name(dev), device_get_unit(dev), "invert", &sc->sc_invert); + resource_int_value(device_get_name(dev), + device_get_unit(dev), "state", &state); sc->sc_leddev = led_create_state(gpioled_control, sc, name ? name : device_get_nameunit(dev), state); @@ -155,3 +157,4 @@ static driver_t gpioled_driver = { DRIVER_MODULE(gpioled, gpiobus, gpioled_driver, gpioled_devclass, 0, 0); MODULE_DEPEND(gpioled, gpiobus, 1, 1, 1); +MODULE_VERSION(gpioled, 1); From owner-svn-src-head@freebsd.org Thu May 23 11:21:28 2019 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 94FCE15A70C5; Thu, 23 May 2019 11:21:28 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3A7B18EE8D; Thu, 23 May 2019 11:21:28 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0FD6F43B0; Thu, 23 May 2019 11:21:28 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4NBLREK039508; Thu, 23 May 2019 11:21:27 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NBLR64039507; Thu, 23 May 2019 11:21:27 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201905231121.x4NBLR64039507@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 23 May 2019 11:21:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348154 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 348154 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3A7B18EE8D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 11:21:28 -0000 Author: avg Date: Thu May 23 11:21:27 2019 New Revision: 348154 URL: https://svnweb.freebsd.org/changeset/base/348154 Log: gpioled: update the manual page after r348153 MFC after: 2 weeks Modified: head/share/man/man4/gpioled.4 Modified: head/share/man/man4/gpioled.4 ============================================================================== --- head/share/man/man4/gpioled.4 Thu May 23 11:15:22 2019 (r348153) +++ head/share/man/man4/gpioled.4 Thu May 23 11:21:27 2019 (r348154) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 30, 2016 +.Dd May 23, 2019 .Dt GPIOLED 4 .Os .Sh NAME @@ -73,6 +73,10 @@ Please note that this mask should only ever have one b (any other bits - i.e., pins - will be ignored). .It Va hint.gpioled.%d.invert If set to 1, the pin will be set to 0 to light the LED, and 1 to clear it. +.It Va hint.gpioled.%d.state +The initial state of the LED when driver takes control over. +If set to 1 or 0, the LED will be on or off correspondingly. +If set to -1 the LED will be kept in its original state. .El .Pp On a From owner-svn-src-head@freebsd.org Thu May 23 11:33:12 2019 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 DD0C215A7370; Thu, 23 May 2019 11:33:11 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3E3548F4CE; Thu, 23 May 2019 11:33:11 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lj1-f178.google.com with SMTP id r76so5088464lja.12; Thu, 23 May 2019 04:33:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=3SBepJ2bhT3IQ9Qg+FL0zrRy73xC6GajSxUywWFqj9g=; b=DjM/2zd5dc2GeNIvq/LmLI6VPLAGJlcnMedegMd3A3d/hZzSJ3YpcOg7CvemAc+Y2u A+lW9Sjtbs9C1/yPb4vkDBgQlTqaVZRHeyywE5qrlZxy+VSyaE87SpuIZL/850JcJ6NW 6KyQlU6GVkCr5JZqPWttlBTx1PdJ0/FszCFd1jzy6YdSdKJvx+Lw4C0oqnfh3jesbejq SPnvaVGx41hYqX9aNZcZUJjPBil4aFJfPWKbuHJjFFNWJaP7lHCrlIEBOY0x8xu3RqOB u4QxKT+KnMzYxQtsjWNRx6DkV2wq5dtMmqzAdxeH7xjXLXXiNNqrwJ+ikpmyfzI5E7OK lKMA== X-Gm-Message-State: APjAAAUAqi01FHiCUrC55xuSRI6RA+A3Aqu5CDLvnOLWxo6kCedMK9Ec 3sT6SQ91c/qNgBQxSB8/crL3I+xr X-Google-Smtp-Source: APXvYqwmtGk+EAQBNZDp1dO0E/hF/5HMmF7nmlwyuZYAb++ckSb/OBWmoHUbXTM4NO6DvmuT1fc4NQ== X-Received: by 2002:a2e:8516:: with SMTP id j22mr18672091lji.119.1558611183527; Thu, 23 May 2019 04:33:03 -0700 (PDT) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id d5sm1907372ljl.59.2019.05.23.04.33.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 May 2019 04:33:02 -0700 (PDT) Subject: Re: svn commit: r348153 - head/sys/dev/gpio To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201905231115.x4NBFMSu037564@repo.freebsd.org> From: Andriy Gapon Openpgp: preference=signencrypt Autocrypt: addr=avg@FreeBSD.org; prefer-encrypt=mutual; keydata= xsFNBFm4LIgBEADNB/3lT7f15UKeQ52xCFQx/GqHkSxEdVyLFZTmY3KyNPQGBtyvVyBfprJ7 mAeXZWfhat6cKNRAGZcL5EmewdQuUfQfBdYmKjbw3a9GFDsDNuhDA2QwFt8BmkiVMRYyvI7l N0eVzszWCUgdc3qqM6qqcgBaqsVmJluwpvwp4ZBXmch5BgDDDb1MPO8AZ2QZfIQmplkj8Y6Z AiNMknkmgaekIINSJX8IzRzKD5WwMsin70psE8dpL/iBsA2cpJGzWMObVTtCxeDKlBCNqM1i gTXta1ukdUT7JgLEFZk9ceYQQMJJtUwzWu1UHfZn0Fs29HTqawfWPSZVbulbrnu5q55R4PlQ /xURkWQUTyDpqUvb4JK371zhepXiXDwrrpnyyZABm3SFLkk2bHlheeKU6Yql4pcmSVym1AS4 dV8y0oHAfdlSCF6tpOPf2+K9nW1CFA8b/tw4oJBTtfZ1kxXOMdyZU5fiG7xb1qDgpQKgHUX8 7Rd2T1UVLVeuhYlXNw2F+a2ucY+cMoqz3LtpksUiBppJhw099gEXehcN2JbUZ2TueJdt1FdS ztnZmsHUXLxrRBtGwqnFL7GSd6snpGIKuuL305iaOGODbb9c7ne1JqBbkw1wh8ci6vvwGlzx rexzimRaBzJxlkjNfMx8WpCvYebGMydNoeEtkWldtjTNVsUAtQARAQABzR5BbmRyaXkgR2Fw b24gPGF2Z0BGcmVlQlNELm9yZz7CwZQEEwEIAD4WIQS+LEO7ngQnXA4Bjr538m7TUc1yjwUC WbgsiAIbIwUJBaOagAULCQgHAgYVCAkKCwIEFgIDAQIeAQIXgAAKCRB38m7TUc1yj+JAEACV l9AK/nOWAt/9cufV2fRj0hdOqB1aCshtSrwHk/exXsDa4/FkmegxXQGY+3GWX3deIyesbVRL rYdtdK0dqJyT1SBqXK1h3/at9rxr9GQA6KWOxTjUFURsU7ok/6SIlm8uLRPNKO+yq0GDjgaO LzN+xykuBA0FlhQAXJnpZLcVfPJdWv7sSHGedL5ln8P8rxR+XnmsA5TUaaPcbhTB+mG+iKFj GghASDSfGqLWFPBlX/fpXikBDZ1gvOr8nyMY9nXhgfXpq3B6QCRYKPy58ChrZ5weeJZ29b7/ QdEO8NFNWHjSD9meiLdWQaqo9Y7uUxN3wySc/YUZxtS0bhAd8zJdNPsJYG8sXgKjeBQMVGuT eCAJFEYJqbwWvIXMfVWop4+O4xB+z2YE3jAbG/9tB/GSnQdVSj3G8MS80iLS58frnt+RSEw/ psahrfh0dh6SFHttE049xYiC+cM8J27Aaf0i9RflyITq57NuJm+AHJoU9SQUkIF0nc6lfA+o JRiyRlHZHKoRQkIg4aiKaZSWjQYRl5Txl0IZUP1dSWMX4s3XTMurC/pnja45dge/4ESOtJ9R 8XuIWg45Oq6MeIWdjKddGhRj3OohsltKgkEU3eLKYtB6qRTQypHHUawCXz88uYt5e3w4V16H lCpSTZV/EVHnNe45FVBlvK7k7HFfDDkryM7BTQRZuCyIARAAlq0slcsVboY/+IUJdcbEiJRW be9HKVz4SUchq0z9MZPX/0dcnvz/gkyYA+OuM78dNS7Mbby5dTvOqfpLJfCuhaNYOhlE0wY+ 1T6Tf1f4c/uA3U/YiadukQ3+6TJuYGAdRZD5EqYFIkreARTVWg87N9g0fT9BEqLw9lJtEGDY EWUE7L++B8o4uu3LQFEYxcrb4K/WKmgtmFcm77s0IKDrfcX4doV92QTIpLiRxcOmCC/OCYuO jB1oaaqXQzZrCutXRK0L5XN1Y1PYjIrEzHMIXmCDlLYnpFkK+itlXwlE2ZQxkfMruCWdQXye syl2fynAe8hvp7Mms9qU2r2K9EcJiR5N1t1C2/kTKNUhcRv7Yd/vwusK7BqJbhlng5ZgRx0m WxdntU/JLEntz3QBsBsWM9Y9wf2V4tLv6/DuDBta781RsCB/UrU2zNuOEkSixlUiHxw1dccI 6CVlaWkkJBxmHX22GdDFrcjvwMNIbbyfQLuBq6IOh8nvu9vuItup7qemDG3Ms6TVwA7BD3j+ 3fGprtyW8Fd/RR2bW2+LWkMrqHffAr6Y6V3h5kd2G9Q8ZWpEJk+LG6Mk3fhZhmCnHhDu6CwN MeUvxXDVO+fqc3JjFm5OxhmfVeJKrbCEUJyM8ESWLoNHLqjywdZga4Q7P12g8DUQ1mRxYg/L HgZY3zfKOqcAEQEAAcLBfAQYAQgAJhYhBL4sQ7ueBCdcDgGOvnfybtNRzXKPBQJZuCyIAhsM BQkFo5qAAAoJEHfybtNRzXKPBVwQAKfFy9P7N3OsLDMB56A4Kf+ZT+d5cIx0Yiaf4n6w7m3i ImHHHk9FIetI4Xe54a2IXh4Bq5UkAGY0667eIs+Z1Ea6I2i27Sdo7DxGwq09Qnm/Y65ADvXs 3aBvokCcm7FsM1wky395m8xUos1681oV5oxgqeRI8/76qy0hD9WR65UW+HQgZRIcIjSel9vR XDaD2HLGPTTGr7u4v00UeTMs6qvPsa2PJagogrKY8RXdFtXvweQFz78NbXhluwix2Tb9ETPk LIpDrtzV73CaE2aqBG/KrboXT2C67BgFtnk7T7Y7iKq4/XvEdDWscz2wws91BOXuMMd4c/c4 OmGW9m3RBLufFrOag1q5yUS9QbFfyqL6dftJP3Zq/xe+mr7sbWbhPVCQFrH3r26mpmy841ym dwQnNcsbIGiBASBSKksOvIDYKa2Wy8htPmWFTEOPRpFXdGQ27awcjjnB42nngyCK5ukZDHi6 w0qK5DNQQCkiweevCIC6wc3p67jl1EMFY5+z+zdTPb3h7LeVnGqW0qBQl99vVFgzLxchKcl0 R/paSFgwqXCZhAKMuUHncJuynDOP7z5LirUeFI8qsBAJi1rXpQoLJTVcW72swZ42IdPiboqx NbTMiNOiE36GqMcTPfKylCbF45JNX4nF9ElM0E+Y8gi4cizJYBRr2FBJgay0b9Cp Message-ID: <2da5318e-ad03-6b20-950c-d43289bd8608@FreeBSD.org> Date: Thu, 23 May 2019 14:33:01 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <201905231115.x4NBFMSu037564@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 3E3548F4CE X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.979,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 11:33:12 -0000 On 23/05/2019 14:15, Andriy Gapon wrote: > Author: avg > Date: Thu May 23 11:15:22 2019 > New Revision: 348153 > URL: https://svnweb.freebsd.org/changeset/base/348153 > > Log: > gpioled: add a new hint for initial state > > hint.gpioled.%d.state determines the initial state of the LED when the > driver takes control over it: > 0 - the LED is off > 1 - the LED is on > -1 - the LED is kept as it was > > While here, add a module version declaration. By the way, can anyone suggest a mechanism to set device properties like this one _programmatically_ ? I am thinking of a case where I know exactly how everything is wired on a platform. And there is no FDT or alike support for it. And hints are not possible to set up correctly (e.g., bus numbers may float). So, I want to create a gpioled child on a specific bus and I want to set some properties for the device. Of course, I can probably do something like kern_setenv("hints.foo.X.bar", ...) using the child's name and unit number. But that feels a bit cumbersome. And this question is not about gpioled specifically. IVARs is definitely not the right mechanism, because it is about bus-specific properties of devices on the bus. So, it is not aware of properties specific to an individual device (or rather its driver). > Modified: > head/sys/dev/gpio/gpioled.c > > Modified: head/sys/dev/gpio/gpioled.c > ============================================================================== > --- head/sys/dev/gpio/gpioled.c Thu May 23 11:06:38 2019 (r348152) > +++ head/sys/dev/gpio/gpioled.c Thu May 23 11:15:22 2019 (r348153) > @@ -115,6 +115,8 @@ gpioled_attach(device_t dev) > name = NULL; > resource_int_value(device_get_name(dev), > device_get_unit(dev), "invert", &sc->sc_invert); > + resource_int_value(device_get_name(dev), > + device_get_unit(dev), "state", &state); > > sc->sc_leddev = led_create_state(gpioled_control, sc, name ? name : > device_get_nameunit(dev), state); > @@ -155,3 +157,4 @@ static driver_t gpioled_driver = { > > DRIVER_MODULE(gpioled, gpiobus, gpioled_driver, gpioled_devclass, 0, 0); > MODULE_DEPEND(gpioled, gpiobus, 1, 1, 1); > +MODULE_VERSION(gpioled, 1); > -- Andriy Gapon From owner-svn-src-head@freebsd.org Thu May 23 11:35:02 2019 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 EA0ED15A742E; Thu, 23 May 2019 11:35:01 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 577578F643; Thu, 23 May 2019 11:35:01 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2D40B46DA; Thu, 23 May 2019 11:35:01 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4NBZ1Pp047965; Thu, 23 May 2019 11:35:01 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NBZ14x047964; Thu, 23 May 2019 11:35:01 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201905231135.x4NBZ14x047964@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 23 May 2019 11:35:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348155 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 348155 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 577578F643 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 11:35:02 -0000 Author: avg Date: Thu May 23 11:35:00 2019 New Revision: 348155 URL: https://svnweb.freebsd.org/changeset/base/348155 Log: gpioled: fix the manual page update in r348154 MFC after: 2 weeks Modified: head/share/man/man4/gpioled.4 Modified: head/share/man/man4/gpioled.4 ============================================================================== --- head/share/man/man4/gpioled.4 Thu May 23 11:21:27 2019 (r348154) +++ head/share/man/man4/gpioled.4 Thu May 23 11:35:00 2019 (r348155) @@ -74,9 +74,9 @@ Please note that this mask should only ever have one b .It Va hint.gpioled.%d.invert If set to 1, the pin will be set to 0 to light the LED, and 1 to clear it. .It Va hint.gpioled.%d.state -The initial state of the LED when driver takes control over. +The initial state of the LED when the driver takes control over it. If set to 1 or 0, the LED will be on or off correspondingly. -If set to -1 the LED will be kept in its original state. +If set to -1, the LED will be kept in its original state. .El .Pp On a From owner-svn-src-head@freebsd.org Thu May 23 12:25:05 2019 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 4484A15A901D; Thu, 23 May 2019 12:25:05 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CDA9A6A394; Thu, 23 May 2019 12:25: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 BB8CA4F1C; Thu, 23 May 2019 12:25: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 x4NCP4dw073856; Thu, 23 May 2019 12:25:04 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NCP4vK073854; Thu, 23 May 2019 12:25:04 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201905231225.x4NCP4vK073854@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 23 May 2019 12:25:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348156 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 348156 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CDA9A6A394 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 12:25:05 -0000 Author: kib Date: Thu May 23 12:25:03 2019 New Revision: 348156 URL: https://svnweb.freebsd.org/changeset/base/348156 Log: Make pack_kinfo() available for external callers. Reviewed by: jilles, tmunro Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D20258 Modified: head/sys/kern/kern_descrip.c head/sys/sys/user.h Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Thu May 23 11:35:00 2019 (r348155) +++ head/sys/kern/kern_descrip.c Thu May 23 12:25:03 2019 (r348156) @@ -3409,7 +3409,7 @@ xlate_fflags(int fflags) } /* Trim unused data from kf_path by truncating the structure size. */ -static void +void pack_kinfo(struct kinfo_file *kif) { Modified: head/sys/sys/user.h ============================================================================== --- head/sys/sys/user.h Thu May 23 11:35:00 2019 (r348155) +++ head/sys/sys/user.h Thu May 23 12:25:03 2019 (r348156) @@ -608,6 +608,7 @@ int kern_proc_vmmap_out(struct proc *p, struct sbuf *s int flags); int vntype_to_kinfo(int vtype); +void pack_kinfo(struct kinfo_file *kif); #endif /* !_KERNEL */ #endif From owner-svn-src-head@freebsd.org Thu May 23 12:27:46 2019 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 3801015A90D9; Thu, 23 May 2019 12:27:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C92F46A611; Thu, 23 May 2019 12:27:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A1FFC4F3C; Thu, 23 May 2019 12:27:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4NCRjSW074012; Thu, 23 May 2019 12:27:45 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NCRjIK074011; Thu, 23 May 2019 12:27:45 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201905231227.x4NCRjIK074011@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 23 May 2019 12:27:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348157 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 348157 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C92F46A611 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 12:27:46 -0000 Author: kib Date: Thu May 23 12:27:45 2019 New Revision: 348157 URL: https://svnweb.freebsd.org/changeset/base/348157 Log: Report ref count of the backing object as st_nlink for posix shm fd. Unless there are transient references to the object, the ref count is equal to the number of the shared memory segment mappings plus one. Reviewed by: jilles, tmunro Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D20258 Modified: head/sys/kern/uipc_shm.c Modified: head/sys/kern/uipc_shm.c ============================================================================== --- head/sys/kern/uipc_shm.c Thu May 23 12:25:03 2019 (r348156) +++ head/sys/kern/uipc_shm.c Thu May 23 12:27:45 2019 (r348157) @@ -419,6 +419,7 @@ shm_stat(struct file *fp, struct stat *sb, struct ucre mtx_unlock(&shm_timestamp_lock); sb->st_dev = shm_dev_ino; sb->st_ino = shmfd->shm_ino; + sb->st_nlink = shmfd->shm_object->ref_count; return (0); } From owner-svn-src-head@freebsd.org Thu May 23 12:35:41 2019 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 5066815A931C; Thu, 23 May 2019 12:35:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E2F156AA71; Thu, 23 May 2019 12:35:40 +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 B07B650DB; Thu, 23 May 2019 12:35:40 +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 x4NCZesi079159; Thu, 23 May 2019 12:35:40 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NCZegC079158; Thu, 23 May 2019 12:35:40 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201905231235.x4NCZegC079158@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 23 May 2019 12:35:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348158 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 348158 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E2F156AA71 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 12:35:41 -0000 Author: kib Date: Thu May 23 12:35:40 2019 New Revision: 348158 URL: https://svnweb.freebsd.org/changeset/base/348158 Log: Add a kern.ipc.posix_shm_list sysctl. The sysctl provides the listing on named linked posix shared memory segments existing in the system. Reuse shm_fill_kinfo() for filling individual struct kinfo_file. Remove unneeded lock around reading of shmfd->shm_mode. Reviewed by: jilles, tmunro Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D20258 Modified: head/sys/kern/uipc_shm.c Modified: head/sys/kern/uipc_shm.c ============================================================================== --- head/sys/kern/uipc_shm.c Thu May 23 12:27:45 2019 (r348157) +++ head/sys/kern/uipc_shm.c Thu May 23 12:35:40 2019 (r348158) @@ -76,6 +76,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -1101,34 +1102,89 @@ shm_unmap(struct file *fp, void *mem, size_t size) } static int -shm_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp) +shm_fill_kinfo_locked(struct shmfd *shmfd, struct kinfo_file *kif, bool list) { const char *path, *pr_path; - struct shmfd *shmfd; size_t pr_pathlen; + bool visible; + sx_assert(&shm_dict_lock, SA_LOCKED); kif->kf_type = KF_TYPE_SHM; - shmfd = fp->f_data; - - mtx_lock(&shm_timestamp_lock); - kif->kf_un.kf_file.kf_file_mode = S_IFREG | shmfd->shm_mode; /* XXX */ - mtx_unlock(&shm_timestamp_lock); + kif->kf_un.kf_file.kf_file_mode = S_IFREG | shmfd->shm_mode; kif->kf_un.kf_file.kf_file_size = shmfd->shm_size; if (shmfd->shm_path != NULL) { - sx_slock(&shm_dict_lock); if (shmfd->shm_path != NULL) { path = shmfd->shm_path; pr_path = curthread->td_ucred->cr_prison->pr_path; if (strcmp(pr_path, "/") != 0) { /* Return the jail-rooted pathname. */ pr_pathlen = strlen(pr_path); - if (strncmp(path, pr_path, pr_pathlen) == 0 && - path[pr_pathlen] == '/') + visible = strncmp(path, pr_path, pr_pathlen) + == 0 && path[pr_pathlen] == '/'; + if (list && !visible) + return (EPERM); + if (visible) path += pr_pathlen; } strlcpy(kif->kf_path, path, sizeof(kif->kf_path)); } - sx_sunlock(&shm_dict_lock); } return (0); } + +static int +shm_fill_kinfo(struct file *fp, struct kinfo_file *kif, + struct filedesc *fdp __unused) +{ + int res; + + sx_slock(&shm_dict_lock); + res = shm_fill_kinfo_locked(fp->f_data, kif, false); + sx_sunlock(&shm_dict_lock); + return (res); +} + +static int +sysctl_posix_shm_list(SYSCTL_HANDLER_ARGS) +{ + struct shm_mapping *shmm; + struct sbuf sb; + struct kinfo_file kif; + u_long i; + ssize_t curlen; + int error, error2; + + sbuf_new_for_sysctl(&sb, NULL, sizeof(struct kinfo_file) * 5, req); + sbuf_clear_flags(&sb, SBUF_INCLUDENUL); + curlen = 0; + error = 0; + sx_slock(&shm_dict_lock); + for (i = 0; i < shm_hash + 1; i++) { + LIST_FOREACH(shmm, &shm_dictionary[i], sm_link) { + error = shm_fill_kinfo_locked(shmm->sm_shmfd, + &kif, true); + if (error == EPERM) + continue; + if (error != 0) + break; + pack_kinfo(&kif); + if (req->oldptr != NULL && + kif.kf_structsize + curlen > req->oldlen) + break; + error = sbuf_bcat(&sb, &kif, kif.kf_structsize) == 0 ? + 0 : ENOMEM; + if (error != 0) + break; + curlen += kif.kf_structsize; + } + } + sx_sunlock(&shm_dict_lock); + error2 = sbuf_finish(&sb); + sbuf_delete(&sb); + return (error != 0 ? error : error2); +} + +SYSCTL_PROC(_kern_ipc, OID_AUTO, posix_shm_list, + CTLFLAG_RD | CTLFLAG_MPSAFE | CTLTYPE_OPAQUE, + NULL, 0, sysctl_posix_shm_list, "", + "POSIX SHM list"); From owner-svn-src-head@freebsd.org Thu May 23 12:51:14 2019 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 979FE15A9861; Thu, 23 May 2019 12:51:14 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 35ECD6B207; Thu, 23 May 2019 12:51:14 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D22FE5408; Thu, 23 May 2019 12:51:13 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4NCpDab084742; Thu, 23 May 2019 12:51:13 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NCpDeT084740; Thu, 23 May 2019 12:51:13 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201905231251.x4NCpDeT084740@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 23 May 2019 12:51:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348159 - head/sys/dev/mrsas X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/dev/mrsas X-SVN-Commit-Revision: 348159 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 35ECD6B207 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 12:51:14 -0000 Author: avg Date: Thu May 23 12:51:13 2019 New Revision: 348159 URL: https://svnweb.freebsd.org/changeset/base/348159 Log: add mrsas_shutdown method It should be safer to flush controller and disk caches on the shutdown. And to gracefully shut down the controller as well. It seems that the Linux driver has been doing that for a long time. Discussed with: scottl Reviewed by: imp, Sumit Saxena (both earlier version) MFC after: 3 weeks Sponsored by: Panzura Differential Revision: https://reviews.freebsd.org/D19817 Modified: head/sys/dev/mrsas/mrsas.c Modified: head/sys/dev/mrsas/mrsas.c ============================================================================== --- head/sys/dev/mrsas/mrsas.c Thu May 23 12:35:40 2019 (r348158) +++ head/sys/dev/mrsas/mrsas.c Thu May 23 12:51:13 2019 (r348159) @@ -1182,6 +1182,39 @@ mrsas_detach(device_t dev) return (0); } +static int +mrsas_shutdown(device_t dev) +{ + struct mrsas_softc *sc; + int i; + + sc = device_get_softc(dev); + sc->remove_in_progress = 1; + if (panicstr == NULL) { + if (sc->ocr_thread_active) + wakeup(&sc->ocr_chan); + i = 0; + while (sc->reset_in_progress && i < 15) { + i++; + if ((i % MRSAS_RESET_NOTICE_INTERVAL) == 0) { + mrsas_dprint(sc, MRSAS_INFO, + "[%2d]waiting for OCR to be finished " + "from %s\n", i, __func__); + } + pause("mr_shutdown", hz); + } + if (sc->reset_in_progress) { + mrsas_dprint(sc, MRSAS_INFO, + "gave up waiting for OCR to be finished\n"); + } + } + + mrsas_flush_cache(sc); + mrsas_shutdown_ctlr(sc, MR_DCMD_CTRL_SHUTDOWN); + mrsas_disable_intr(sc); + return (0); +} + /* * mrsas_free_mem: Frees allocated memory * input: Adapter instance soft state @@ -5028,6 +5061,7 @@ static device_method_t mrsas_methods[] = { DEVMETHOD(device_probe, mrsas_probe), DEVMETHOD(device_attach, mrsas_attach), DEVMETHOD(device_detach, mrsas_detach), + DEVMETHOD(device_shutdown, mrsas_shutdown), DEVMETHOD(device_suspend, mrsas_suspend), DEVMETHOD(device_resume, mrsas_resume), DEVMETHOD(bus_print_child, bus_generic_print_child), From owner-svn-src-head@freebsd.org Thu May 23 14:02:40 2019 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 89A2415AB8F0; Thu, 23 May 2019 14:02:40 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2FC2B6DB48; Thu, 23 May 2019 14:02:40 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F3B2D603D; Thu, 23 May 2019 14:02:39 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4NE2dgE026049; Thu, 23 May 2019 14:02:39 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NE2dQk026048; Thu, 23 May 2019 14:02:39 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201905231402.x4NE2dQk026048@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 23 May 2019 14:02:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348164 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 348164 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2FC2B6DB48 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 14:02:40 -0000 Author: ian Date: Thu May 23 14:02:39 2019 New Revision: 348164 URL: https://svnweb.freebsd.org/changeset/base/348164 Log: Mark i2c slave devices busy while they own the bus. Many i2c slave drivers are in modules that can be unloaded. If they detach while IO is in progress the bus would be hung forever. Conversely, lower-layer drivers (iicbus and the hardware driver) also live in modules and other kinds of bad things happen if they get detached while IO is in progress. Because device_busy() propagates up to parents, marking the slave device busy while it owns the bus solves both kinds of problems that come with detaching i2c devices while IO is in progress. Modified: head/sys/dev/iicbus/iiconf.c Modified: head/sys/dev/iicbus/iiconf.c ============================================================================== --- head/sys/dev/iicbus/iiconf.c Thu May 23 13:05:47 2019 (r348163) +++ head/sys/dev/iicbus/iiconf.c Thu May 23 14:02:39 2019 (r348164) @@ -128,6 +128,12 @@ iicbus_request_bus(device_t bus, device_t dev, int how ++sc->owncount; if (sc->owner == NULL) { sc->owner = dev; + /* + * Mark the device busy while it owns the bus, to + * prevent detaching the device, bus, or hardware + * controller, until ownership is relinquished. + */ + device_busy(dev); /* * Drop the lock around the call to the bus driver, it * should be allowed to sleep in the IIC_WAIT case. @@ -177,6 +183,7 @@ iicbus_release_bus(device_t bus, device_t dev) IICBUS_LOCK(sc); sc->owner = NULL; wakeup_one(sc); + device_unbusy(dev); } IICBUS_UNLOCK(sc); return (0); From owner-svn-src-head@freebsd.org Thu May 23 14:05:43 2019 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 71D6C15AB9C4; Thu, 23 May 2019 14:05:43 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 133616DD0C; Thu, 23 May 2019 14:05:43 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E03846048; Thu, 23 May 2019 14:05:42 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4NE5gXJ026231; Thu, 23 May 2019 14:05:42 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NE5gXP026230; Thu, 23 May 2019 14:05:42 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201905231405.x4NE5gXP026230@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 23 May 2019 14:05:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348165 - head/usr.sbin/etcupdate X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/usr.sbin/etcupdate X-SVN-Commit-Revision: 348165 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 133616DD0C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 14:05:43 -0000 Author: manu Date: Thu May 23 14:05:42 2019 New Revision: 348165 URL: https://svnweb.freebsd.org/changeset/base/348165 Log: etcupdate: Add missing directory when building the tree Missed in 348151 Reported by: lwshu, ci Modified: head/usr.sbin/etcupdate/etcupdate.sh Modified: head/usr.sbin/etcupdate/etcupdate.sh ============================================================================== --- head/usr.sbin/etcupdate/etcupdate.sh Thu May 23 14:02:39 2019 (r348164) +++ head/usr.sbin/etcupdate/etcupdate.sh Thu May 23 14:05:42 2019 (r348165) @@ -198,7 +198,7 @@ build_tree() for file in $PREWORLD_FILES; do name=$(basename $file) mkdir -p $1/etc >&3 2>&1 || return 1 - cp -p $SRCDIR/$file etc/$name || return 1 + cp -p $SRCDIR/$file $1/etc/$name || return 1 done elif ! [ -n "$nobuild" ]; then (cd $SRCDIR; $make DESTDIR=$destdir distrib-dirs && From owner-svn-src-head@freebsd.org Thu May 23 14:10:41 2019 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 BC9E315ABBFA; Thu, 23 May 2019 14:10:41 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F7616E042; Thu, 23 May 2019 14:10:41 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from [192.168.200.4] (c-71-56-186-158.hsd1.va.comcast.net [71.56.186.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: gallatin) by duke.cs.duke.edu (Postfix) with ESMTPSA id A0F2C270021A; Thu, 23 May 2019 10:10:33 -0400 (EDT) DMARC-Filter: OpenDMARC Filter v1.3.1 duke.cs.duke.edu A0F2C270021A DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cs.duke.edu; s=mail0816; t=1558620633; bh=o7Eg5q7rHihN6xqLFPDbYZaOtN8Sqn59U8+KOedF9KA=; h=Subject:To:From:Date:From; b=lAt8FYnhMgp7rn7p7+fGk2zIRzPvc/Ltm5Dm424+Cbyt6O1vw7wqdaehCLf+HbgFX +UtSdSGuU3DshPZIc3giXEmd23VJusEid+O61YWE0j/T18EiPwBfCwi9bLFGdXQmBQ 8RAT02XUtk35u1498WVMARQixD0L1WNUaewdD67W5x2jPwA26dXZ0h6GkKvZiImHEV O+eB0dv1AGTnHm3xz87P4B2XLPnQu+vp4EKeNM18T30YyMwt3tNQXrUyj97R29/WnQ RjQIwIXM7MnItFbFUR6LtijQvhq3PUGeRFpF8xOnq8d2BIVKG++9VOq25sMSW0yNmI aZ+8NISbHIFGQ== Subject: Re: svn commit: r348109 - in head/sys/x86: include x86 To: Andriy Gapon , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201905221344.x4MDiGGV056469@repo.freebsd.org> <00116a41-d811-cda9-304e-589738c54508@FreeBSD.org> From: Andrew Gallatin Message-ID: <8f14727a-6e38-59fa-77f2-ce3aef18c0ed@cs.duke.edu> Date: Thu, 23 May 2019 10:10:31 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <00116a41-d811-cda9-304e-589738c54508@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 5F7616E042 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.992,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 14:10:41 -0000 On 2019-05-22 13:09, Andriy Gapon wrote: > On 22/05/2019 16:44, Andrew Gallatin wrote: >> This is needed for AMD SMCA processors, as SMCA uses different >> MSR address for access MCA banks. > > Just curious, what is SMCA? > > " Scalable Machine Check Architecture " See https://www.nextplatform.com/2017/07/12/heart-amds-epyc-comeback-infinity-fabric/ Drew From owner-svn-src-head@freebsd.org Thu May 23 14:21:24 2019 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 0E69815AC04F; Thu, 23 May 2019 14:21:24 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A01726E6A7; Thu, 23 May 2019 14:21:23 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7D48863AA; Thu, 23 May 2019 14:21:23 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4NELNYm032689; Thu, 23 May 2019 14:21:23 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NELN71032688; Thu, 23 May 2019 14:21:23 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201905231421.x4NELN71032688@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 23 May 2019 14:21:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348166 - head/sys/arm/freescale/imx X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/arm/freescale/imx X-SVN-Commit-Revision: 348166 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A01726E6A7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 14:21:24 -0000 Author: ian Date: Thu May 23 14:21:23 2019 New Revision: 348166 URL: https://svnweb.freebsd.org/changeset/base/348166 Log: Release the bus-recovery gpio pins in detach(), so that unload then reload of the module works without "pin already allocated" errors. Modified: head/sys/arm/freescale/imx/imx_i2c.c Modified: head/sys/arm/freescale/imx/imx_i2c.c ============================================================================== --- head/sys/arm/freescale/imx/imx_i2c.c Thu May 23 14:05:42 2019 (r348165) +++ head/sys/arm/freescale/imx/imx_i2c.c Thu May 23 14:21:23 2019 (r348166) @@ -469,6 +469,10 @@ i2c_detach(device_t dev) if (sc->iicbus != NULL) device_delete_child(dev, sc->iicbus); + /* Release bus-recover pins; gpio_pin_release() handles NULL args. */ + gpio_pin_release(sc->rb_sclpin); + gpio_pin_release(sc->rb_sdapin); + if (sc->res != NULL) bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->res); From owner-svn-src-head@freebsd.org Thu May 23 14:33:03 2019 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 1845915AC756; Thu, 23 May 2019 14:33:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AE7206F104; Thu, 23 May 2019 14:33: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 89DB765C1; Thu, 23 May 2019 14:33: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 x4NEX2Q3042026; Thu, 23 May 2019 14:33:02 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NEX2QF042023; Thu, 23 May 2019 14:33:02 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201905231433.x4NEX2QF042023@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 23 May 2019 14:33:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348167 - in head/usr.bin: . posixshmcontrol X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/usr.bin: . posixshmcontrol X-SVN-Commit-Revision: 348167 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AE7206F104 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 14:33:03 -0000 Author: kib Date: Thu May 23 14:33:01 2019 New Revision: 348167 URL: https://svnweb.freebsd.org/changeset/base/348167 Log: Add posixshmcontrol(1), an utility to manipulate posix shared memory segments. See usage for the command line structure. Man page will come shortly. Reviewed by: jilles, tmunro Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D20258 Added: head/usr.bin/posixshmcontrol/ head/usr.bin/posixshmcontrol/Makefile (contents, props changed) head/usr.bin/posixshmcontrol/posixshmcontrol.c (contents, props changed) Modified: head/usr.bin/Makefile Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Thu May 23 14:21:23 2019 (r348166) +++ head/usr.bin/Makefile Thu May 23 14:33:01 2019 (r348167) @@ -114,6 +114,7 @@ SUBDIR= alias \ patch \ pathchk \ perror \ + posixshmcontrol \ pr \ printenv \ printf \ Added: head/usr.bin/posixshmcontrol/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/posixshmcontrol/Makefile Thu May 23 14:33:01 2019 (r348167) @@ -0,0 +1,8 @@ +# $FreeBSD$ + +PROG= posixshmcontrol +LIBADD= util +WARNS?= 6 +MAN= + +.include Added: head/usr.bin/posixshmcontrol/posixshmcontrol.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/posixshmcontrol/posixshmcontrol.c Thu May 23 14:33:01 2019 (r348167) @@ -0,0 +1,480 @@ +/*- + * Copyright (c) 2019 The FreeBSD Foundation + * + * This software was developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static void +usage(void) +{ + + fprintf(stderr, "Usage:\n" + "posixshmcontrol create [-m ] ...\n" + "posixshmcontrol rm ...\n" + "posixshmcontrol ls [-h] [-n]\n" + "posixshmcontrol dump ...\n" + "posixshmcontrol stat [-h] [-n] ...\n" + "posixshmcontrol truncate [-s ] ...\n"); +} + +static int +create_one_shm(const char *path, long mode) +{ + int fd; + + fd = shm_open(path, O_RDWR | O_CREAT, mode); + if (fd == -1) { + warn("create %s", path); + return (1); + } + close(fd); + return (0); +} + +static int +create_shm(int argc, char **argv) +{ + char *end; + long mode; + int c, i, ret, ret1; + + mode = 0600; + while ((c = getopt(argc, argv, "m:")) != -1) { + switch (c) { + case 'm': + errno = 0; + mode = strtol(optarg, &end, 0); + if (mode == 0 && errno != 0) + err(1, "mode:"); + if (*end != '\0') + errx(1, "non-integer mode"); + break; + case '?': + default: + usage(); + return (2); + } + } + + argc -= optind; + argv += optind; + ret = 0; + for (i = 0; i < argc; i++) { + ret1 = create_one_shm(argv[i], mode); + if (ret1 != 0 && ret == 0) + ret = ret1; + } + return (ret); +} + +static int +delete_one_shm(const char *path) +{ + int error, ret; + + error = shm_unlink(path); + if (error != 0) { + warn("unlink of %s failed", path); + ret = 1; + } else { + ret = 0; + } + return (ret); +} + +static int +delete_shm(int argc, char **argv) +{ + int i, ret, ret1; + + ret = 0; + for (i = 1; i < argc; i++) { + ret1 = delete_one_shm(argv[i]); + if (ret1 != 0 && ret == 0) + ret = ret1; + } + return (ret); +} + +static const char listmib[] = "kern.ipc.posix_shm_list"; + +static void +shm_decode_mode(mode_t m, char *str) +{ + int i; + + i = 0; + str[i++] = (m & S_IRUSR) != 0 ? 'r' : '-'; + str[i++] = (m & S_IWUSR) != 0 ? 'w' : '-'; + str[i++] = (m & S_IXUSR) != 0 ? 'x' : '-'; + str[i++] = (m & S_IRGRP) != 0 ? 'r' : '-'; + str[i++] = (m & S_IWGRP) != 0 ? 'w' : '-'; + str[i++] = (m & S_IXGRP) != 0 ? 'x' : '-'; + str[i++] = (m & S_IROTH) != 0 ? 'r' : '-'; + str[i++] = (m & S_IWOTH) != 0 ? 'w' : '-'; + str[i++] = (m & S_IXOTH) != 0 ? 'x' : '-'; + str[i] = '\0'; +} + +static int +list_shm(int argc, char **argv) +{ + char *buf, *bp, sizebuf[8], str[10], c; + const struct kinfo_file *kif; + struct stat st; + int error, fd, mib[3], ret; + size_t len, miblen; + bool hsize, uname; + + hsize = false; + uname = true; + + while ((c = getopt(argc, argv, "hn")) != -1) { + switch (c) { + case 'h': + hsize = true; + break; + case 'n': + uname = false; + break; + default: + usage(); + return (2); + } + } + if (argc != optind) { + usage(); + return (2); + } + + miblen = nitems(mib); + error = sysctlnametomib(listmib, mib, &miblen); + if (error == -1) { + warn("cannot translate %s", listmib); + return (1); + } + len = 0; + error = sysctl(mib, miblen, NULL, &len, NULL, 0); + if (error == -1) { + warn("cannot get %s length", listmib); + return (1); + } + len = len * 4 / 3; + buf = malloc(len); + if (buf == NULL) { + warn("malloc"); + return (1); + } + error = sysctl(mib, miblen, buf, &len, NULL, 0); + if (error != 0) { + warn("reading %s", listmib); + ret = 1; + goto out; + } + ret = 0; + printf("MODE \tOWNER\tGROUP\tSIZE\tPATH\n"); + for (bp = buf; bp < buf + len; bp += kif->kf_structsize) { + kif = (const struct kinfo_file *)(void *)bp; + if (kif->kf_structsize == 0) + break; + fd = shm_open(kif->kf_path, O_RDONLY, 0); + if (fd == -1) { + warn("open %s", kif->kf_path); + ret = 1; + continue; + } + error = fstat(fd, &st); + close(fd); + if (error != 0) { + warn("stat %s", kif->kf_path); + ret = 1; + continue; + } + shm_decode_mode(kif->kf_un.kf_file.kf_file_mode, str); + printf("%s\t", str); + if (uname) { + printf("%s\t%s\t", user_from_uid(st.st_uid, 0), + group_from_gid(st.st_gid, 0)); + } else { + printf("%d\t%d\t", st.st_uid, st.st_gid); + } + if (hsize) { + humanize_number(sizebuf, sizeof(sizebuf), + kif->kf_un.kf_file.kf_file_size, "", HN_AUTOSCALE, + HN_NOSPACE); + printf("%s\t", sizebuf); + } else { + printf("%jd\t", + (uintmax_t)kif->kf_un.kf_file.kf_file_size); + } + printf("%s\n", kif->kf_path); + } +out: + free(buf); + return (ret); +} + +static int +read_one_shm(const char *path) +{ + char buf[4096]; + ssize_t size, se; + int fd, ret; + + ret = 1; + fd = shm_open(path, O_RDONLY, 0); + if (fd == -1) { + warn("open %s", path); + goto out; + } + for (;;) { + size = read(fd, buf, sizeof(buf)); + if (size > 0) { + se = fwrite(buf, 1, size, stdout); + if (se < size) { + warnx("short write to stdout"); + goto out; + } + } + if (size == (ssize_t)sizeof(buf)) + continue; + if (size >= 0 && size < (ssize_t)sizeof(buf)) { + ret = 0; + goto out; + } + warn("read from %s", path); + goto out; + } +out: + close(fd); + return (ret); +} + +static int +read_shm(int argc, char **argv) +{ + int i, ret, ret1; + + ret = 0; + for (i = 1; i < argc; i++) { + ret1 = read_one_shm(argv[i]); + if (ret1 != 0 && ret == 0) + ret = ret1; + } + return (ret); +} + +static int +stat_one_shm(const char *path, bool hsize, bool uname) +{ + char sizebuf[8]; + struct stat st; + int error, fd, ret; + + fd = shm_open(path, O_RDONLY, 0); + if (fd == -1) { + warn("open %s", path); + return (1); + } + ret = 0; + error = fstat(fd, &st); + if (error == -1) { + warn("stat %s", path); + ret = 1; + } else { + printf("path\t%s\n", path); + printf("inode\t%jd\n", (uintmax_t)st.st_ino); + printf("mode\t%#o\n", st.st_mode); + printf("nlink\t%jd\n", (uintmax_t)st.st_nlink); + if (uname) { + printf("owner\t%s\n", user_from_uid(st.st_uid, 0)); + printf("group\t%s\n", group_from_gid(st.st_gid, 0)); + } else { + printf("uid\t%d\n", st.st_uid); + printf("gid\t%d\n", st.st_gid); + } + if (hsize) { + humanize_number(sizebuf, sizeof(sizebuf), + st.st_size, "", HN_AUTOSCALE, HN_NOSPACE); + printf("size\t%s\n", sizebuf); + } else { + printf("size\t%jd\n", (uintmax_t)st.st_size); + } + printf("atime\t%ld.%09ld\n", (long)st.st_atime, + (long)st.st_atim.tv_nsec); + printf("mtime\t%ld.%09ld\n", (long)st.st_mtime, + (long)st.st_mtim.tv_nsec); + printf("ctime\t%ld.%09ld\n", (long)st.st_ctime, + (long)st.st_ctim.tv_nsec); + printf("birth\t%ld.%09ld\n", (long)st.st_birthtim.tv_sec, + (long)st.st_birthtim.tv_nsec); + } + close(fd); + return (ret); +} + +static int +stat_shm(int argc, char **argv) +{ + int c, i, ret, ret1; + bool hsize, uname; + + hsize = false; + uname = true; + + while ((c = getopt(argc, argv, "hn")) != -1) { + switch (c) { + case 'h': + hsize = true; + break; + case 'n': + uname = false; + break; + default: + usage(); + return (2); + } + } + argc -= optind; + argv += optind; + + ret = 0; + for (i = 0; i < argc; i++) { + ret1 = stat_one_shm(argv[i], hsize, uname); + if (ret1 != 0 && ret == 0) + ret = ret1; + } + return (ret); +} + +static int +truncate_one_shm(const char *path, uint64_t newsize) +{ + int error, fd, ret; + + ret = 0; + fd = shm_open(path, O_RDWR, 0); + if (fd == -1) { + warn("open %s", path); + return (1); + } + error = ftruncate(fd, newsize); + if (error == -1) { + warn("truncate %s", path); + ret = 1; + } + close(fd); + return (ret); +} + +static int +truncate_shm(int argc, char **argv) +{ + uint64_t newsize; + int c, i, ret, ret1; + + newsize = 0; + while ((c = getopt(argc, argv, "s:")) != -1) { + switch (c) { + case 's': + if (expand_number(optarg, &newsize) == -1) + err(1, "size:"); + break; + case '?': + default: + return (2); + } + } + + argc -= optind; + argv += optind; + ret = 0; + for (i = 0; i < argc; i++) { + ret1 = truncate_one_shm(argv[i], newsize); + if (ret1 != 0 && ret == 0) + ret = ret1; + } + return (ret); +} + +struct opmode { + const char *cmd; + int (*impl)(int argc, char **argv); +}; + +static const struct opmode opmodes[] = { + { .cmd = "create", .impl = create_shm}, + { .cmd = "rm", .impl = delete_shm, }, + { .cmd = "ls", .impl = list_shm }, + { .cmd = "dump", .impl = read_shm, }, + { .cmd = "stat", .impl = stat_shm, }, + { .cmd = "truncate", .impl = truncate_shm, }, +}; + +int +main(int argc, char *argv[]) +{ + const struct opmode *opmode; + int i, ret; + + ret = 0; + opmode = NULL; + + if (argc < 2) { + usage(); + exit(2); + } + for (i = 0; i < (int)nitems(opmodes); i++) { + if (strcmp(argv[1], opmodes[i].cmd) == 0) { + opmode = &opmodes[i]; + break; + } + } + if (opmode == NULL) { + usage(); + exit(2); + } + ret = opmode->impl(argc - 1, argv + 1); + exit(ret); +} From owner-svn-src-head@freebsd.org Thu May 23 14:40:29 2019 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 6545C15ACAED; Thu, 23 May 2019 14:40:29 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE1726F5B5; Thu, 23 May 2019 14:40:28 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x4NEeQIW090578; Thu, 23 May 2019 07:40:26 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x4NEeQ7L090577; Thu, 23 May 2019 07:40:26 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201905231440.x4NEeQ7L090577@gndrsh.dnsmgr.net> Subject: Re: svn commit: r348167 - in head/usr.bin: . posixshmcontrol In-Reply-To: <201905231433.x4NEX2QF042023@repo.freebsd.org> To: Konstantin Belousov Date: Thu, 23 May 2019 07:40:26 -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-Rspamd-Queue-Id: CE1726F5B5 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.94 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.995,0]; NEURAL_HAM_SHORT(-0.95)[-0.948,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 14:40:29 -0000 > Author: kib > Date: Thu May 23 14:33:01 2019 > New Revision: 348167 > URL: https://svnweb.freebsd.org/changeset/base/348167 > > Log: > Add posixshmcontrol(1), an utility to manipulate posix shared memory segments. > > See usage for the command line structure. Man page will come shortly. > > Reviewed by: jilles, tmunro > Sponsored by: The FreeBSD Foundation > MFC after: 1 week > Differential revision: https://reviews.freebsd.org/D20258 > > Added: > head/usr.bin/posixshmcontrol/ > head/usr.bin/posixshmcontrol/Makefile (contents, props changed) > head/usr.bin/posixshmcontrol/posixshmcontrol.c (contents, props changed) > Modified: > head/usr.bin/Makefile Can someone extract the usage: and slap a template man page up so that apropos can at least locate this command? Thanks, Rod > + fprintf(stderr, "Usage:\n" > + "posixshmcontrol create [-m ] ...\n" > + "posixshmcontrol rm ...\n" > + "posixshmcontrol ls [-h] [-n]\n" > + "posixshmcontrol dump ...\n" > + "posixshmcontrol stat [-h] [-n] ...\n" > + "posixshmcontrol truncate [-s ] ...\n"); -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Thu May 23 14:58:56 2019 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 2DEC815AD27E; Thu, 23 May 2019 14:58:56 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 03E156FFC0; Thu, 23 May 2019 14:58:54 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id x4NEwk2u041404 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 23 May 2019 17:58:49 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua x4NEwk2u041404 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id x4NEwkv1041403; Thu, 23 May 2019 17:58:46 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 23 May 2019 17:58:45 +0300 From: Konstantin Belousov To: rgrimes@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r348167 - in head/usr.bin: . posixshmcontrol Message-ID: <20190523145845.GH2748@kib.kiev.ua> References: <201905231433.x4NEX2QF042023@repo.freebsd.org> <201905231440.x4NEeQ7L090577@gndrsh.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201905231440.x4NEeQ7L090577@gndrsh.dnsmgr.net> User-Agent: Mutt/1.11.4 (2019-03-13) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 14:58:56 -0000 On Thu, May 23, 2019 at 07:40:26AM -0700, Rodney W. Grimes wrote: > > Author: kib > > Date: Thu May 23 14:33:01 2019 > > New Revision: 348167 > > URL: https://svnweb.freebsd.org/changeset/base/348167 > > > > Log: > > Add posixshmcontrol(1), an utility to manipulate posix shared memory segments. > > > > See usage for the command line structure. Man page will come shortly. > > > > Reviewed by: jilles, tmunro > > Sponsored by: The FreeBSD Foundation > > MFC after: 1 week > > Differential revision: https://reviews.freebsd.org/D20258 > > > > Added: > > head/usr.bin/posixshmcontrol/ > > head/usr.bin/posixshmcontrol/Makefile (contents, props changed) > > head/usr.bin/posixshmcontrol/posixshmcontrol.c (contents, props changed) > > Modified: > > head/usr.bin/Makefile > > Can someone extract the usage: and slap a template man page > up so that apropos can at least locate this command? I do not think it is needed. I will write the manual page after the utility sit in HEAD for some time, to be sure that the cli interface is not changing. From owner-svn-src-head@freebsd.org Thu May 23 15:00:16 2019 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 3AEE715AD350; Thu, 23 May 2019 15:00:16 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D267D70156; Thu, 23 May 2019 15:00:15 +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 AA4566983; Thu, 23 May 2019 15:00:15 +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 x4NF0FsZ052948; Thu, 23 May 2019 15:00:15 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NF0FNI052947; Thu, 23 May 2019 15:00:15 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201905231500.x4NF0FNI052947@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 23 May 2019 15:00:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348168 - head/usr.bin/posixshmcontrol X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/usr.bin/posixshmcontrol X-SVN-Commit-Revision: 348168 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D267D70156 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 15:00:16 -0000 Author: kib Date: Thu May 23 15:00:15 2019 New Revision: 348168 URL: https://svnweb.freebsd.org/changeset/base/348168 Log: Use int for the getopt() result. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/usr.bin/posixshmcontrol/posixshmcontrol.c Modified: head/usr.bin/posixshmcontrol/posixshmcontrol.c ============================================================================== --- head/usr.bin/posixshmcontrol/posixshmcontrol.c Thu May 23 14:33:01 2019 (r348167) +++ head/usr.bin/posixshmcontrol/posixshmcontrol.c Thu May 23 15:00:15 2019 (r348168) @@ -160,10 +160,10 @@ shm_decode_mode(mode_t m, char *str) static int list_shm(int argc, char **argv) { - char *buf, *bp, sizebuf[8], str[10], c; + char *buf, *bp, sizebuf[8], str[10]; const struct kinfo_file *kif; struct stat st; - int error, fd, mib[3], ret; + int c, error, fd, mib[3], ret; size_t len, miblen; bool hsize, uname; From owner-svn-src-head@freebsd.org Thu May 23 15:01:11 2019 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 B3AC015AD3C3; Thu, 23 May 2019 15:01:11 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C43A70328; Thu, 23 May 2019 15:01:10 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x4NF163a090747; Thu, 23 May 2019 08:01:06 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x4NF16FX090746; Thu, 23 May 2019 08:01:06 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201905231501.x4NF16FX090746@gndrsh.dnsmgr.net> Subject: Re: svn commit: r348167 - in head/usr.bin: . posixshmcontrol In-Reply-To: <20190523145845.GH2748@kib.kiev.ua> To: Konstantin Belousov Date: Thu, 23 May 2019 08:01:06 -0700 (PDT) CC: rgrimes@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 3C43A70328 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 15:01:11 -0000 > On Thu, May 23, 2019 at 07:40:26AM -0700, Rodney W. Grimes wrote: > > > Author: kib > > > Date: Thu May 23 14:33:01 2019 > > > New Revision: 348167 > > > URL: https://svnweb.freebsd.org/changeset/base/348167 > > > > > > Log: > > > Add posixshmcontrol(1), an utility to manipulate posix shared memory segments. > > > > > > See usage for the command line structure. Man page will come shortly. > > > > > > Reviewed by: jilles, tmunro > > > Sponsored by: The FreeBSD Foundation > > > MFC after: 1 week > > > Differential revision: https://reviews.freebsd.org/D20258 > > > > > > Added: > > > head/usr.bin/posixshmcontrol/ > > > head/usr.bin/posixshmcontrol/Makefile (contents, props changed) > > > head/usr.bin/posixshmcontrol/posixshmcontrol.c (contents, props changed) > > > Modified: > > > head/usr.bin/Makefile > > > > Can someone extract the usage: and slap a template man page > > up so that apropos can at least locate this command? > > I do not think it is needed. I will write the manual page after the > utility sit in HEAD for some time, to be sure that the cli interface > is not changing. Oh, ok, great, if your going to write a man page everyone else can ignore my comment! Thanks for the utility too, it was surely needed. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Thu May 23 15:47:31 2019 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 51AFE15AE46E; Thu, 23 May 2019 15:47:31 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EC87871D58; Thu, 23 May 2019 15:47:30 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C70FE7206; Thu, 23 May 2019 15:47:30 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4NFlUjS078743; Thu, 23 May 2019 15:47:30 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NFlUfE078741; Thu, 23 May 2019 15:47:30 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201905231547.x4NFlUfE078741@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 23 May 2019 15:47:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348169 - in head/sys/dev: iicbus ofw X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head/sys/dev: iicbus ofw X-SVN-Commit-Revision: 348169 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EC87871D58 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 15:47:31 -0000 Author: ian Date: Thu May 23 15:47:30 2019 New Revision: 348169 URL: https://svnweb.freebsd.org/changeset/base/348169 Log: Define macros making it easier to define bus-specific pnpinfo for FDT systems. Pnpinfo is bus-specific and requires the bus name. The FDTCOMPAT_PNP_INFO() macro makes it easier to define new FDT-based pnpinfo for busses other than simplebus. Differential Revision: https://reviews.freebsd.org/D20382 Modified: head/sys/dev/iicbus/iicbus.h head/sys/dev/ofw/ofw_bus_subr.h Modified: head/sys/dev/iicbus/iicbus.h ============================================================================== --- head/sys/dev/iicbus/iicbus.h Thu May 23 15:00:15 2019 (r348168) +++ head/sys/dev/iicbus/iicbus.h Thu May 23 15:47:30 2019 (r348169) @@ -72,6 +72,12 @@ IICBUS_ACCESSOR(nostop, NOSTOP, bool) #define IICBUS_UNLOCK(sc) mtx_unlock(&(sc)->lock) #define IICBUS_ASSERT_LOCKED(sc) mtx_assert(&(sc)->lock, MA_OWNED) +#ifdef FDT +#define IICBUS_FDT_PNPINFO(t) FDTCOMPAT_PNP_INFO(t, iicbus) +#else +#define IICBUS_FDT_PNPINFO(t) +#endif + int iicbus_generic_intr(device_t dev, int event, char *buf); void iicbus_init_frequency(device_t dev, u_int bus_freq); Modified: head/sys/dev/ofw/ofw_bus_subr.h ============================================================================== --- head/sys/dev/ofw/ofw_bus_subr.h Thu May 23 15:00:15 2019 (r348168) +++ head/sys/dev/ofw/ofw_bus_subr.h Thu May 23 15:47:30 2019 (r348169) @@ -65,9 +65,11 @@ struct intr_map_data_fdt { }; #endif -#define SIMPLEBUS_PNP_DESCR "Z:compat;P:#;" -#define SIMPLEBUS_PNP_INFO(t) \ - MODULE_PNP_INFO(SIMPLEBUS_PNP_DESCR, simplebus, t, t, sizeof(t) / sizeof(t[0])); +#define FDTCOMPAT_PNP_DESCR "Z:compat;P:#;" +#define FDTCOMPAT_PNP_INFO(t, busname) \ + MODULE_PNP_INFO(FDTCOMPAT_PNP_DESCR, busname, t, t, sizeof(t) / sizeof(t[0])); + +#define SIMPLEBUS_PNP_INFO(t) FDTCOMPAT_PNP_INFO(t, simplebus) /* Generic implementation of ofw_bus_if.m methods and helper routines */ int ofw_bus_gen_setup_devinfo(struct ofw_bus_devinfo *, phandle_t); From owner-svn-src-head@freebsd.org Thu May 23 15:51:53 2019 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 EC1C115AE706; Thu, 23 May 2019 15:51:52 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 89BC5720C8; Thu, 23 May 2019 15:51:52 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 41A0B726B; Thu, 23 May 2019 15:51:52 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4NFpqRP082111; Thu, 23 May 2019 15:51:52 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NFpq0i082110; Thu, 23 May 2019 15:51:52 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201905231551.x4NFpq0i082110@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 23 May 2019 15:51:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348170 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 348170 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 89BC5720C8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 15:51:53 -0000 Author: ian Date: Thu May 23 15:51:51 2019 New Revision: 348170 URL: https://svnweb.freebsd.org/changeset/base/348170 Log: Add pnpinfo for icee(4) on fdt systems. Modified: head/sys/dev/iicbus/icee.c Modified: head/sys/dev/iicbus/icee.c ============================================================================== --- head/sys/dev/iicbus/icee.c Thu May 23 15:47:30 2019 (r348169) +++ head/sys/dev/iicbus/icee.c Thu May 23 15:51:51 2019 (r348170) @@ -392,3 +392,4 @@ static devclass_t icee_devclass; DRIVER_MODULE(icee, iicbus, icee_driver, icee_devclass, 0, 0); MODULE_VERSION(icee, 1); MODULE_DEPEND(icee, iicbus, 1, 1, 1); +IICBUS_FDT_PNPINFO(compat_data); From owner-svn-src-head@freebsd.org Thu May 23 15:53:42 2019 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 9E62615AE7AB; Thu, 23 May 2019 15:53:42 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 40AEB723DF; Thu, 23 May 2019 15:53:42 +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 1C24773AA; Thu, 23 May 2019 15:53:42 +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 x4NFrfZw084002; Thu, 23 May 2019 15:53:41 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NFrfAC084001; Thu, 23 May 2019 15:53:41 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201905231553.x4NFrfAC084001@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 23 May 2019 15:53:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348171 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 348171 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 40AEB723DF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 15:53:42 -0000 Author: imp Date: Thu May 23 15:53:41 2019 New Revision: 348171 URL: https://svnweb.freebsd.org/changeset/base/348171 Log: Add warning that the PNP info has to follow the module declaration. Due to how the linker.hints file is laid out, we'll associate the pnp info with the wrong module if the module declaration comes after the pnp info. Until that limiation is removed, we need to have this ordering. Ideally, we'd also enforce the ordering somehow, but I've come up with no way to do that yet... Modified: head/share/man/man9/MODULE_PNP_INFO.9 Modified: head/share/man/man9/MODULE_PNP_INFO.9 ============================================================================== --- head/share/man/man9/MODULE_PNP_INFO.9 Thu May 23 15:51:51 2019 (r348170) +++ head/share/man/man9/MODULE_PNP_INFO.9 Thu May 23 15:53:41 2019 (r348171) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 5, 2018 +.Dd May 23, 2019 .Dt MODULE_PNP_INFO 9 .Os .Sh NAME @@ -196,6 +196,14 @@ MODULE_PNP_INFO("U16:device;D:#;T:vendor=0x1234", pci, .Ed .El .\" +.Sh BUGS +The +.Nm +macro must follow +.Dv DRIVER_MODULE +invocations due to limitations in the +.Dv linker.hints +file format. .Sh SEE ALSO .Xr devmatch 8 , .Xr DRIVER_MODULE 9 , From owner-svn-src-head@freebsd.org Thu May 23 15:59:52 2019 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 286EE15AE88F; Thu, 23 May 2019 15:59:52 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C1F7572644; Thu, 23 May 2019 15:59:51 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9062773DA; Thu, 23 May 2019 15:59:51 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4NFxpbo084317; Thu, 23 May 2019 15:59:51 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NFxoQ2084314; Thu, 23 May 2019 15:59:50 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201905231559.x4NFxoQ2084314@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 23 May 2019 15:59:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348172 - in head/sys/dev: flash spibus X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head/sys/dev: flash spibus X-SVN-Commit-Revision: 348172 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C1F7572644 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 15:59:52 -0000 Author: ian Date: Thu May 23 15:59:50 2019 New Revision: 348172 URL: https://svnweb.freebsd.org/changeset/base/348172 Log: Use the new FDTCOMPAT_PNP_INFO() macro to define SPIBUS_FDT_PNP_INFO(). Also rename SPIBUS_PNP_INFO -> SPIBUS_FDT_PNP_INFO because there could be other kinds of pnpinfo for other (non-fdt) bus attachments. Modified: head/sys/dev/flash/at45d.c head/sys/dev/flash/mx25l.c head/sys/dev/spibus/spi.h Modified: head/sys/dev/flash/at45d.c ============================================================================== --- head/sys/dev/flash/at45d.c Thu May 23 15:53:41 2019 (r348171) +++ head/sys/dev/flash/at45d.c Thu May 23 15:59:50 2019 (r348172) @@ -606,6 +606,6 @@ DRIVER_MODULE(at45d, spibus, at45d_driver, at45d_devcl MODULE_DEPEND(at45d, spibus, 1, 1, 1); #ifdef FDT MODULE_DEPEND(at45d, fdt_slicer, 1, 1, 1); -SPIBUS_PNP_INFO(compat_data); +SPIBUS_FDT_PNP_INFO(compat_data); #endif Modified: head/sys/dev/flash/mx25l.c ============================================================================== --- head/sys/dev/flash/mx25l.c Thu May 23 15:53:41 2019 (r348171) +++ head/sys/dev/flash/mx25l.c Thu May 23 15:59:50 2019 (r348172) @@ -686,5 +686,5 @@ DRIVER_MODULE(mx25l, spibus, mx25l_driver, mx25l_devcl MODULE_DEPEND(mx25l, spibus, 1, 1, 1); #ifdef FDT MODULE_DEPEND(mx25l, fdt_slicer, 1, 1, 1); -SPIBUS_PNP_INFO(compat_data); +SPIBUS_FDT_PNP_INFO(compat_data); #endif Modified: head/sys/dev/spibus/spi.h ============================================================================== --- head/sys/dev/spibus/spi.h Thu May 23 15:53:41 2019 (r348171) +++ head/sys/dev/spibus/spi.h Thu May 23 15:59:50 2019 (r348172) @@ -41,6 +41,8 @@ struct spi_command { #define SPI_CHIP_SELECT_HIGH 0x1 /* Chip select high (else low) */ -#define SPIBUS_PNP_DESCR "Z:compat;P:#;" -#define SPIBUS_PNP_INFO(t) \ - MODULE_PNP_INFO(SPIBUS_PNP_DESCR, spibus, t, t, sizeof(t) / sizeof(t[0])); +#ifdef FDT +#define SPIBUS_FDT_PNP_INFO(t) FDTCOMPAT_PNP_INFO(t, spibus) +#else +#define SPIBUS_FDT_PNP_INFO(t) +#endif From owner-svn-src-head@freebsd.org Thu May 23 16:03:31 2019 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 D08F115AEAEF; Thu, 23 May 2019 16:03:31 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 73B9D72B10; Thu, 23 May 2019 16:03:31 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4867C7598; Thu, 23 May 2019 16:03:31 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4NG3Vpe089278; Thu, 23 May 2019 16:03:31 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NG3U44089276; Thu, 23 May 2019 16:03:30 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201905231603.x4NG3U44089276@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 23 May 2019 16:03:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348173 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 348173 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 73B9D72B10 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 16:03:32 -0000 Author: ian Date: Thu May 23 16:03:30 2019 New Revision: 348173 URL: https://svnweb.freebsd.org/changeset/base/348173 Log: Rename IICBUS_FDT_PNPINFO -> IICBUS_FDT_PNP_INFO because all the other existing pnpinfo-related macros right now use PNP_INFO, not PNPINFO. Modified: head/sys/dev/iicbus/icee.c head/sys/dev/iicbus/iicbus.h Modified: head/sys/dev/iicbus/icee.c ============================================================================== --- head/sys/dev/iicbus/icee.c Thu May 23 15:59:50 2019 (r348172) +++ head/sys/dev/iicbus/icee.c Thu May 23 16:03:30 2019 (r348173) @@ -392,4 +392,4 @@ static devclass_t icee_devclass; DRIVER_MODULE(icee, iicbus, icee_driver, icee_devclass, 0, 0); MODULE_VERSION(icee, 1); MODULE_DEPEND(icee, iicbus, 1, 1, 1); -IICBUS_FDT_PNPINFO(compat_data); +IICBUS_FDT_PNP_INFO(compat_data); Modified: head/sys/dev/iicbus/iicbus.h ============================================================================== --- head/sys/dev/iicbus/iicbus.h Thu May 23 15:59:50 2019 (r348172) +++ head/sys/dev/iicbus/iicbus.h Thu May 23 16:03:30 2019 (r348173) @@ -73,9 +73,9 @@ IICBUS_ACCESSOR(nostop, NOSTOP, bool) #define IICBUS_ASSERT_LOCKED(sc) mtx_assert(&(sc)->lock, MA_OWNED) #ifdef FDT -#define IICBUS_FDT_PNPINFO(t) FDTCOMPAT_PNP_INFO(t, iicbus) +#define IICBUS_FDT_PNP_INFO(t) FDTCOMPAT_PNP_INFO(t, iicbus) #else -#define IICBUS_FDT_PNPINFO(t) +#define IICBUS_FDT_PNP_INFO(t) #endif int iicbus_generic_intr(device_t dev, int event, char *buf); From owner-svn-src-head@freebsd.org Thu May 23 17:18:49 2019 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 6A30215B01D7; Thu, 23 May 2019 17:18:49 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 100C075692; Thu, 23 May 2019 17:18:49 +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 C27D08276; Thu, 23 May 2019 17:18:48 +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 x4NHImkN026423; Thu, 23 May 2019 17:18:48 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NHImrT026422; Thu, 23 May 2019 17:18:48 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201905231718.x4NHImrT026422@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 23 May 2019 17:18:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348175 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 348175 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 100C075692 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.94)[-0.935,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 17:18:49 -0000 Author: imp Date: Thu May 23 17:18:48 2019 New Revision: 348175 URL: https://svnweb.freebsd.org/changeset/base/348175 Log: Implement "VARS_ONLY=1" via special command line args Add -v to print TYPE REVISION BRANCH RELEASE VERSION RELDATE variables Add -V var to print var's value Both of these in ${var}="${val}" format suitable for eval $(sh newvers.sh -v) in shell scripts / makefiles. Add -c to print the copyright / license comment text only. Document these, and remove soon-to-be obsolete comment. Minor code motion as well bunded here to put functions after VARS_ONLY and command line argument parsing. Differential Revision: https://reviews.freebsd.org/D19849 Modified: head/sys/conf/newvers.sh Modified: head/sys/conf/newvers.sh ============================================================================== --- head/sys/conf/newvers.sh Thu May 23 16:05:47 2019 (r348174) +++ head/sys/conf/newvers.sh Thu May 23 17:18:48 2019 (r348175) @@ -34,25 +34,105 @@ # Command line options: # -# -r Reproducible build. Do not embed directory names, user -# names, time stamps or other dynamic information into -# the output file. This is intended to allow two builds -# done at different times and even by different people on -# different hosts to produce identical output. +# -c Print the copyright / license statement as a C comment and exit # -# -R Reproducible build if the tree represents an unmodified -# checkout from a version control system. Metadata is -# included if the tree is modified. +# -r Reproducible build. Do not embed directory names, user names, +# time stamps or other dynamic information into the output file. +# This is intended to allow two builds done at different times +# and even by different people on different hosts to produce +# identical output. +# +# -R Reproducible build if the tree represents an unmodified +# checkout from a version control system. Metadata is included +# if the tree is modified. +# +# -V var Print ${var}="${val-of-var}" and exit +# +# -v Print TYPE REVISION BRANCH RELEASE VERSION RELDATE variabkes +# like the -V command +# -# Note: usr.sbin/amd/include/newvers.sh assumes all variable assignments of -# upper case variables starting in column 1 are on one line w/o continuation. - TYPE="FreeBSD" REVISION="13.0" BRANCH=${BRANCH_OVERRIDE:-CURRENT} RELEASE="${REVISION}-${BRANCH}" VERSION="${TYPE} ${RELEASE}" +if [ -z "${SYSDIR}" ]; then + SYSDIR=$(dirname $0)/.. +fi + +RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' ${PARAMFILE:-${SYSDIR}/sys/param.h}) + +if [ -r "${SYSDIR}/../COPYRIGHT" ]; then + year=$(sed -Ee '/^Copyright .* The FreeBSD Project/!d;s/^.*1992-([0-9]*) .*$/\1/g' ${SYSDIR}/../COPYRIGHT) +else + year=$(date +%Y) +fi +# look for copyright template +b=share/examples/etc/bsd-style-copyright +for bsd_copyright in $b ../$b ../../$b ../../../$b /usr/src/$b /usr/$b +do + if [ -r "$bsd_copyright" ]; then + COPYRIGHT=$(sed \ + -e "s/\[year\]/1992-$year/" \ + -e 's/\[your name here\]\.* /The FreeBSD Project./' \ + -e 's/\[your name\]\.*/The FreeBSD Project./' \ + -e '/\[id for your version control system, if any\]/d' \ + $bsd_copyright) + break + fi +done + +# no copyright found, use a dummy +if [ -z "$COPYRIGHT" ]; then + COPYRIGHT="/*- + * Copyright (c) 1992-$year The FreeBSD Project. + * + */" +fi + +# add newline +COPYRIGHT="$COPYRIGHT +" + +include_metadata=true +while getopts crRvV: opt; do + case "$opt" in + c) + echo "$COPYRIGHT" + exit 0 + ;; + r) + include_metadata= + ;; + R) + if [ -z "${modified}" ]; then + include_metadata= + fi + ;; + v) + # Only put variables that are single lines here. + for v in TYPE REVISION BRANCH RELEASE VERSION RELDATE; do + eval val=\$${v} + echo ${v}=\"${val}\" + done + exit 0 + ;; + V) + v=$OPTARG + eval val=\$${v} + echo ${v}=\"${val}\" + exit 0 + ;; + esac +done +shift $((OPTIND - 1)) + +# VARS_ONLY means no files should be generated, this is just being +# included. +[ -n "$VARS_ONLY" ] && return 0 + # # findvcs dir # Looks up directory dir at world root and up the filesystem @@ -103,49 +183,6 @@ git_tree_modified() return 1 } - -if [ -z "${SYSDIR}" ]; then - SYSDIR=$(dirname $0)/.. -fi - -RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' ${PARAMFILE:-${SYSDIR}/sys/param.h}) - -if [ -r "${SYSDIR}/../COPYRIGHT" ]; then - year=$(sed -Ee '/^Copyright .* The FreeBSD Project/!d;s/^.*1992-([0-9]*) .*$/\1/g' ${SYSDIR}/../COPYRIGHT) -else - year=$(date +%Y) -fi -# look for copyright template -b=share/examples/etc/bsd-style-copyright -for bsd_copyright in ../$b ../../$b ../../../$b /usr/src/$b /usr/$b -do - if [ -r "$bsd_copyright" ]; then - COPYRIGHT=$(sed \ - -e "s/\[year\]/1992-$year/" \ - -e 's/\[your name here\]\.* /The FreeBSD Project./' \ - -e 's/\[your name\]\.*/The FreeBSD Project./' \ - -e '/\[id for your version control system, if any\]/d' \ - $bsd_copyright) - break - fi -done - -# no copyright found, use a dummy -if [ -z "$COPYRIGHT" ]; then - COPYRIGHT="/*- - * Copyright (c) 1992-$year The FreeBSD Project. - * - */" -fi - -# add newline -COPYRIGHT="$COPYRIGHT -" - -# VARS_ONLY means no files should be generated, this is just being -# included. -[ -n "$VARS_ONLY" ] && return 0 - LC_ALL=C; export LC_ALL if [ ! -r version ] then @@ -274,20 +311,6 @@ if [ -n "$hg_cmd" ] ; then hg=" ${hg}" fi fi - -include_metadata=true -while getopts rR opt; do - case "$opt" in - r) - include_metadata= - ;; - R) - if [ -z "${modified}" ]; then - include_metadata= - fi - esac -done -shift $((OPTIND - 1)) if [ -z "${include_metadata}" ]; then VERINFO="${VERSION}${svn}${git}${hg} ${i}" From owner-svn-src-head@freebsd.org Thu May 23 17:19:00 2019 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 46C7A15B0203; Thu, 23 May 2019 17:19:00 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4A0627577D; Thu, 23 May 2019 17:18:59 +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 A752B827C; Thu, 23 May 2019 17:18:56 +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 x4NHIuw7026478; Thu, 23 May 2019 17:18:56 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NHIuQF026477; Thu, 23 May 2019 17:18:56 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201905231718.x4NHIuQF026477@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 23 May 2019 17:18:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348176 - head/usr.sbin/amd/include X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/amd/include X-SVN-Commit-Revision: 348176 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4A0627577D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.93)[-0.933,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 17:19:00 -0000 Author: imp Date: Thu May 23 17:18:56 2019 New Revision: 348176 URL: https://svnweb.freebsd.org/changeset/base/348176 Log: Convert amd newvers to using newvers.sh -v. Rather than the tedious and error-prone grep of sys/conf/newvers.sh, use the new -v arg to dig out the data that's desired. Differential Revision: https://reviews.freebsd.org/D19849 Modified: head/usr.sbin/amd/include/newvers.sh Modified: head/usr.sbin/amd/include/newvers.sh ============================================================================== --- head/usr.sbin/amd/include/newvers.sh Thu May 23 17:18:48 2019 (r348175) +++ head/usr.sbin/amd/include/newvers.sh Thu May 23 17:18:56 2019 (r348176) @@ -5,7 +5,7 @@ # if [ -e $1 ]; then - eval `LC_ALL=C egrep '^[A-Z]+=' $1 | grep -v COPYRIGHT` + eval $(sh $1 -v) OS=`echo ${TYPE} | LC_ALL=C tr 'A-Z' 'a-z'` echo '/* Define name and version of host machine (eg. solaris2.5.1) */' echo "#define HOST_OS \"${OS}${REVISION}\"" From owner-svn-src-head@freebsd.org Thu May 23 17:19:01 2019 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 8494D15B020B; Thu, 23 May 2019 17:19:01 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1B63D7579D; Thu, 23 May 2019 17:19:01 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EC1CB827D; Thu, 23 May 2019 17:19:00 +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 x4NHJ0AG026536; Thu, 23 May 2019 17:19:00 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NHJ0UK026535; Thu, 23 May 2019 17:19:00 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201905231719.x4NHJ0UK026535@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 23 May 2019 17:19:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348177 - head/bin/freebsd-version X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/bin/freebsd-version X-SVN-Commit-Revision: 348177 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1B63D7579D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.93)[-0.933,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 17:19:01 -0000 Author: imp Date: Thu May 23 17:19:00 2019 New Revision: 348177 URL: https://svnweb.freebsd.org/changeset/base/348177 Log: Convert freebsd-version to using -v newvers.sh has supported a variable setting only mode, use that in preference to grep to future proof this script from changes there. Differential Revision: https://reviews.freebsd.org/D19849 Modified: head/bin/freebsd-version/Makefile Modified: head/bin/freebsd-version/Makefile ============================================================================== --- head/bin/freebsd-version/Makefile Thu May 23 17:18:56 2019 (r348176) +++ head/bin/freebsd-version/Makefile Thu May 23 17:19:00 2019 (r348177) @@ -7,7 +7,7 @@ CLEANFILES = freebsd-version freebsd-version.sh NEWVERS = ${SRCTOP}/sys/conf/newvers.sh freebsd-version.sh: ${.CURDIR}/freebsd-version.sh.in ${NEWVERS} - eval $$(egrep '^(TYPE|REVISION|BRANCH)=' ${NEWVERS}) ; \ + eval $$(sh ${NEWVERS} -v); \ if ! sed -e "\ s/@@TYPE@@/$${TYPE}/g; \ s/@@REVISION@@/$${REVISION}/g; \ From owner-svn-src-head@freebsd.org Thu May 23 17:19:08 2019 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 4020815B0246; Thu, 23 May 2019 17:19:08 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D97A57585D; Thu, 23 May 2019 17:19:07 +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 AB04C827E; Thu, 23 May 2019 17:19:05 +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 x4NHJ5YZ026590; Thu, 23 May 2019 17:19:05 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NHJ5K5026589; Thu, 23 May 2019 17:19:05 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201905231719.x4NHJ5K5026589@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 23 May 2019 17:19:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348178 - head/include X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/include X-SVN-Commit-Revision: 348178 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D97A57585D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.93)[-0.933,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 17:19:08 -0000 Author: imp Date: Thu May 23 17:19:05 2019 New Revision: 348178 URL: https://svnweb.freebsd.org/changeset/base/348178 Log: Move to using newvers -c instead of VARS_ONLY=1 Use newvers.sh -c to get the copyright, and newvers.sh -V RELDATE to get the release date. Differential Revision: https://reviews.freebsd.org/D19849 Modified: head/include/mk-osreldate.sh Modified: head/include/mk-osreldate.sh ============================================================================== --- head/include/mk-osreldate.sh Thu May 23 17:19:00 2019 (r348177) +++ head/include/mk-osreldate.sh Thu May 23 17:19:05 2019 (r348178) @@ -38,8 +38,8 @@ trap "rm -f $tmpfile" EXIT ${ECHO} creating osreldate.h from newvers.sh set +e -VARS_ONLY=1 -. "${NEWVERS_SH:=$CURDIR/../sys/conf/newvers.sh}" || exit 1 +COPYRIGHT=$(sh ${NEWVERS_SH:=$CURDIR/../sys/conf/newvers.sh} -c) || exit 1 +eval $(sh ${NEWVERS_SH} -V RELDATE) || exit 1 set -e cat > $tmpfile < 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 175DE15B0754; Thu, 23 May 2019 17:34:35 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A0BF5762AB; Thu, 23 May 2019 17:34:34 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 705AE85D9; Thu, 23 May 2019 17:34:34 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4NHYY12037057; Thu, 23 May 2019 17:34:34 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NHYYTC037056; Thu, 23 May 2019 17:34:34 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201905231734.x4NHYYTC037056@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 23 May 2019 17:34:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348179 - head/sys/arm/allwinner/clkng X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/allwinner/clkng X-SVN-Commit-Revision: 348179 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A0BF5762AB X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.93)[-0.933,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 17:34:35 -0000 Author: manu Date: Thu May 23 17:34:33 2019 New Revision: 348179 URL: https://svnweb.freebsd.org/changeset/base/348179 Log: allwinner: aw_ccu: Add some debug printfs (disabled by default) Also print information about setting frequency at boot under bootverbose Modified: head/sys/arm/allwinner/clkng/aw_ccung.c Modified: head/sys/arm/allwinner/clkng/aw_ccung.c ============================================================================== --- head/sys/arm/allwinner/clkng/aw_ccung.c Thu May 23 17:19:05 2019 (r348178) +++ head/sys/arm/allwinner/clkng/aw_ccung.c Thu May 23 17:34:33 2019 (r348179) @@ -64,6 +64,12 @@ __FBSDID("$FreeBSD$"); #include "clkdev_if.h" #include "hwreset_if.h" +#if 0 +#define dprintf(format, arg...) device_printf(dev, "%s: " format, __func__, arg) +#else +#define dprintf(format, arg...) +#endif + static struct resource_spec aw_ccung_spec[] = { { SYS_RES_MEMORY, 0, RF_ACTIVE }, { -1, 0 } @@ -78,6 +84,7 @@ aw_ccung_write_4(device_t dev, bus_addr_t addr, uint32 struct aw_ccung_softc *sc; sc = device_get_softc(dev); + dprintf("offset=%lx write %x\n", addr, val); CCU_WRITE4(sc, addr, val); return (0); } @@ -90,6 +97,7 @@ aw_ccung_read_4(device_t dev, bus_addr_t addr, uint32_ sc = device_get_softc(dev); *val = CCU_READ4(sc, addr); + dprintf("offset=%lx Read %x\n", addr, *val); return (0); } @@ -101,6 +109,7 @@ aw_ccung_modify_4(device_t dev, bus_addr_t addr, uint3 sc = device_get_softc(dev); + dprintf("offset=%lx clr: %x set: %x\n", addr, clr, set); reg = CCU_READ4(sc, addr); reg &= ~clr; reg |= set; @@ -117,6 +126,7 @@ aw_ccung_reset_assert(device_t dev, intptr_t id, bool sc = device_get_softc(dev); + dprintf("%sassert reset id %ld\n", reset ? "" : "De", id); if (id >= sc->nresets || sc->resets[id].offset == 0) return (0); @@ -224,6 +234,11 @@ aw_ccung_init_clocks(struct aw_ccung_softc *sc) } } if (sc->clk_init[i].default_freq != 0) { + if (bootverbose) + device_printf(sc->dev, + "Setting freq %ju for %s\n", + sc->clk_init[i].default_freq, + sc->clk_init[i].name); error = clknode_set_freq(clknode, sc->clk_init[i].default_freq, 0 , 0); if (error != 0) { From owner-svn-src-head@freebsd.org Thu May 23 17:35:42 2019 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 41DA815B07DE; Thu, 23 May 2019 17:35:42 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DDC00764E2; Thu, 23 May 2019 17:35:41 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9FF2F85E1; Thu, 23 May 2019 17:35:41 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4NHZfxZ037293; Thu, 23 May 2019 17:35:41 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NHZedG037286; Thu, 23 May 2019 17:35:40 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201905231735.x4NHZedG037286@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 23 May 2019 17:35:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348180 - in head/sys: arm/allwinner arm/allwinner/clkng conf X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/sys: arm/allwinner arm/allwinner/clkng conf X-SVN-Commit-Revision: 348180 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DDC00764E2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 17:35:42 -0000 Author: manu Date: Thu May 23 17:35:40 2019 New Revision: 348180 URL: https://svnweb.freebsd.org/changeset/base/348180 Log: arm: allwinner: clk: Add new clock aw_clk_frac Add a clock driver for clock that can either be used in integer mode with one N factor and one M divider or in fractional mode where the output frequency is chosen between two predifined output. Added: head/sys/arm/allwinner/clkng/aw_clk_frac.c (contents, props changed) head/sys/arm/allwinner/clkng/aw_clk_frac.h (contents, props changed) Modified: head/sys/arm/allwinner/clkng/aw_ccung.c head/sys/arm/allwinner/clkng/aw_ccung.h head/sys/arm/allwinner/clkng/aw_clk.h head/sys/arm/allwinner/files.allwinner head/sys/conf/files.arm64 Modified: head/sys/arm/allwinner/clkng/aw_ccung.c ============================================================================== --- head/sys/arm/allwinner/clkng/aw_ccung.c Thu May 23 17:34:33 2019 (r348179) +++ head/sys/arm/allwinner/clkng/aw_ccung.c Thu May 23 17:35:40 2019 (r348180) @@ -305,6 +305,9 @@ aw_ccung_attach(device_t dev) aw_clk_prediv_mux_register(sc->clkdom, sc->clks[i].clk.prediv_mux); break; + case AW_CLK_FRAC: + aw_clk_frac_register(sc->clkdom, sc->clks[i].clk.frac); + break; } } Modified: head/sys/arm/allwinner/clkng/aw_ccung.h ============================================================================== --- head/sys/arm/allwinner/clkng/aw_ccung.h Thu May 23 17:34:33 2019 (r348179) +++ head/sys/arm/allwinner/clkng/aw_ccung.h Thu May 23 17:35:40 2019 (r348180) @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -46,6 +47,7 @@ enum aw_ccung_clk_type { AW_CLK_NKMP, AW_CLK_NM, AW_CLK_PREDIV_MUX, + AW_CLK_FRAC, }; struct aw_ccung_clk { @@ -57,6 +59,7 @@ struct aw_ccung_clk { struct aw_clk_nkmp_def *nkmp; struct aw_clk_nm_def *nm; struct aw_clk_prediv_mux_def *prediv_mux; + struct aw_clk_frac_def *frac; } clk; }; Modified: head/sys/arm/allwinner/clkng/aw_clk.h ============================================================================== --- head/sys/arm/allwinner/clkng/aw_clk.h Thu May 23 17:34:33 2019 (r348179) +++ head/sys/arm/allwinner/clkng/aw_clk.h Thu May 23 17:35:40 2019 (r348180) @@ -309,6 +309,38 @@ aw_clk_factor_get_value(struct aw_clk_factor *factor, .flags = _flags | AW_CLK_HAS_UPDATE, \ } +#define FRAC_CLK(_clkname, _id, _name, _pnames, \ + _offset, \ + _nshift, _nwidth, _nvalue, _nflags, \ + _mshift, _mwidth, _mvalue, _mflags, \ + _gate_shift, _lock_shift,_lock_retries, \ + _flags, _freq0, _freq1, _mode_sel, _freq_sel) \ + static struct aw_clk_frac_def _clkname = { \ + .clkdef = { \ + .id = _id, \ + .name = _name, \ + .parent_names = _pnames, \ + .parent_cnt = nitems(_pnames), \ + }, \ + .offset = _offset, \ + .n.shift = _nshift, \ + .n.width = _nwidth, \ + .n.value = _nvalue, \ + .n.flags = _nflags, \ + .m.shift = _mshift, \ + .m.width = _mwidth, \ + .m.value = _mvalue, \ + .m.flags = _mflags, \ + .gate_shift = _gate_shift, \ + .lock_shift = _lock_shift, \ + .lock_retries = _lock_retries, \ + .flags = _flags | AW_CLK_HAS_FRAC, \ + .frac.freq0 = _freq0, \ + .frac.freq1 = _freq1, \ + .frac.mode_sel = _mode_sel, \ + .frac.freq_sel = _freq_sel, \ + } + #define NM_CLK(_clkname, _id, _name, _pnames, \ _offset, \ _nshift, _nwidth, _nvalue, _nflags, \ Added: head/sys/arm/allwinner/clkng/aw_clk_frac.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/allwinner/clkng/aw_clk_frac.c Thu May 23 17:35:40 2019 (r348180) @@ -0,0 +1,338 @@ +/*- + * Copyright (c) 2019 Emmanuel Vadot + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include + +#include +#include + +#include "clkdev_if.h" + +/* + * clknode for clocks matching the formula : + * + * clk = (24Mhz * n) / m in integer mode + * clk = frac_out1 or frac_out2 in fractional mode + * + */ + +struct aw_clk_frac_sc { + uint32_t offset; + + struct aw_clk_factor m; + struct aw_clk_factor n; + struct aw_clk_frac frac; + + uint32_t mux_shift; + uint32_t mux_mask; + uint32_t gate_shift; + uint32_t lock_shift; + uint32_t lock_retries; + + uint32_t flags; +}; + +#define WRITE4(_clk, off, val) \ + CLKDEV_WRITE_4(clknode_get_device(_clk), off, val) +#define READ4(_clk, off, val) \ + CLKDEV_READ_4(clknode_get_device(_clk), off, val) +#define DEVICE_LOCK(_clk) \ + CLKDEV_DEVICE_LOCK(clknode_get_device(_clk)) +#define DEVICE_UNLOCK(_clk) \ + CLKDEV_DEVICE_UNLOCK(clknode_get_device(_clk)) + +static int +aw_clk_frac_init(struct clknode *clk, device_t dev) +{ + struct aw_clk_frac_sc *sc; + uint32_t val, idx; + + sc = clknode_get_softc(clk); + + idx = 0; + if ((sc->flags & AW_CLK_HAS_MUX) != 0) { + DEVICE_LOCK(clk); + READ4(clk, sc->offset, &val); + DEVICE_UNLOCK(clk); + + idx = (val & sc->mux_mask) >> sc->mux_shift; + } + + clknode_init_parent_idx(clk, idx); + return (0); +} + +static int +aw_clk_frac_set_gate(struct clknode *clk, bool enable) +{ + struct aw_clk_frac_sc *sc; + uint32_t val; + + sc = clknode_get_softc(clk); + + if ((sc->flags & AW_CLK_HAS_GATE) == 0) + return (0); + + DEVICE_LOCK(clk); + READ4(clk, sc->offset, &val); + if (enable) + val |= (1 << sc->gate_shift); + else + val &= ~(1 << sc->gate_shift); + WRITE4(clk, sc->offset, val); + DEVICE_UNLOCK(clk); + + return (0); +} + +static int +aw_clk_frac_set_mux(struct clknode *clk, int index) +{ + struct aw_clk_frac_sc *sc; + uint32_t val; + + sc = clknode_get_softc(clk); + + if ((sc->flags & AW_CLK_HAS_MUX) == 0) + return (0); + + DEVICE_LOCK(clk); + READ4(clk, sc->offset, &val); + val &= ~sc->mux_mask; + val |= index << sc->mux_shift; + WRITE4(clk, sc->offset, val); + DEVICE_UNLOCK(clk); + + return (0); +} + +static uint64_t +aw_clk_frac_find_best(struct aw_clk_frac_sc *sc, uint64_t fparent, uint64_t *fout, + uint32_t *factor_n, uint32_t *factor_m) +{ + uint64_t cur, best; + uint32_t m, n, max_m, max_n, min_m, min_n; + + *factor_n = *factor_m = 0; + best = cur = 0; + + max_m = aw_clk_factor_get_max(&sc->m); + max_n = aw_clk_factor_get_max(&sc->n); + min_m = aw_clk_factor_get_min(&sc->m); + min_n = aw_clk_factor_get_min(&sc->n); + + for (n = min_n; n <= max_n; n++) { + for (m = min_m; m <= max_m; m++) { + cur = fparent * n / m; + if ((*fout - cur) < (*fout - best)) { + best = cur; + *factor_n = n; + *factor_m = m; + } + if (best == *fout) + return (best); + } + } + + return (best); +} + +static int +aw_clk_frac_set_freq(struct clknode *clk, uint64_t fparent, uint64_t *fout, + int flags, int *stop) +{ + struct aw_clk_frac_sc *sc; + uint64_t cur, best, best_frac; + uint32_t val, m, n, best_m, best_n; + int retry; + + sc = clknode_get_softc(clk); + + best = best_frac = cur = 0; + + if (*fout == sc->frac.freq0) + best = best_frac = sc->frac.freq0; + else if (*fout == sc->frac.freq1) + best = best_frac = sc->frac.freq1; + else + best = aw_clk_frac_find_best(sc, fparent, fout, + &best_n, &best_m); + + if ((flags & CLK_SET_DRYRUN) != 0) { + *fout = best; + *stop = 1; + return (0); + } + + if ((best < *fout) && + ((flags & CLK_SET_ROUND_DOWN) == 0)) { + *stop = 1; + return (ERANGE); + } + if ((best > *fout) && + ((flags & CLK_SET_ROUND_UP) == 0)) { + *stop = 1; + return (ERANGE); + } + + DEVICE_LOCK(clk); + READ4(clk, sc->offset, &val); + /* Disable clock during freq changes */ + val &= ~(1 << sc->gate_shift); + WRITE4(clk, sc->offset, val); + + if (best_frac != 0) { + val &= ~sc->frac.mode_sel; + /* M should be 0 per the manual */ + val &= ~sc->m.mask; + if (best_frac == sc->frac.freq0) + val &= ~sc->frac.freq_sel; + else + val |= sc->frac.freq_sel; + } else { + val |= sc->frac.mode_sel; /* Select integer mode */ + n = aw_clk_factor_get_value(&sc->n, best_n); + m = aw_clk_factor_get_value(&sc->m, best_m); + val &= ~sc->n.mask; + val &= ~sc->m.mask; + val |= n << sc->n.shift; + val |= m << sc->m.shift; + } + + /* Write the clock changes */ + WRITE4(clk, sc->offset, val); + + /* Enable clock now that we've change it */ + val |= 1 << sc->gate_shift; + WRITE4(clk, sc->offset, val); + DEVICE_UNLOCK(clk); + + for (retry = 0; retry < sc->lock_retries; retry++) { + READ4(clk, sc->offset, &val); + if ((val & (1 << sc->lock_shift)) != 0) + break; + DELAY(1000); + } + + *fout = best; + *stop = 1; + + return (0); +} + +static int +aw_clk_frac_recalc(struct clknode *clk, uint64_t *freq) +{ + struct aw_clk_frac_sc *sc; + uint32_t val, m, n; + + sc = clknode_get_softc(clk); + + DEVICE_LOCK(clk); + READ4(clk, sc->offset, &val); + DEVICE_UNLOCK(clk); + + if ((val & sc->frac.mode_sel) == 0) { + if (val & sc->frac.freq_sel) + *freq = sc->frac.freq1; + else + *freq = sc->frac.freq0; + } else { + m = aw_clk_get_factor(val, &sc->m); + n = aw_clk_get_factor(val, &sc->n); + + *freq = *freq * n / m; + } + + return (0); +} + +static clknode_method_t aw_frac_clknode_methods[] = { + /* Device interface */ + CLKNODEMETHOD(clknode_init, aw_clk_frac_init), + CLKNODEMETHOD(clknode_set_gate, aw_clk_frac_set_gate), + CLKNODEMETHOD(clknode_set_mux, aw_clk_frac_set_mux), + CLKNODEMETHOD(clknode_recalc_freq, aw_clk_frac_recalc), + CLKNODEMETHOD(clknode_set_freq, aw_clk_frac_set_freq), + CLKNODEMETHOD_END +}; + +DEFINE_CLASS_1(aw_frac_clknode, aw_frac_clknode_class, aw_frac_clknode_methods, + sizeof(struct aw_clk_frac_sc), clknode_class); + +int +aw_clk_frac_register(struct clkdom *clkdom, struct aw_clk_frac_def *clkdef) +{ + struct clknode *clk; + struct aw_clk_frac_sc *sc; + + clk = clknode_create(clkdom, &aw_frac_clknode_class, &clkdef->clkdef); + if (clk == NULL) + return (1); + + sc = clknode_get_softc(clk); + + sc->offset = clkdef->offset; + + sc->m.shift = clkdef->m.shift; + sc->m.width = clkdef->m.width; + sc->m.mask = ((1 << sc->m.width) - 1) << sc->m.shift; + sc->m.value = clkdef->m.value; + sc->m.flags = clkdef->m.flags; + + sc->n.shift = clkdef->n.shift; + sc->n.width = clkdef->n.width; + sc->n.mask = ((1 << sc->n.width) - 1) << sc->n.shift; + sc->n.value = clkdef->n.value; + sc->n.flags = clkdef->n.flags; + + sc->frac.freq0 = clkdef->frac.freq0; + sc->frac.freq1 = clkdef->frac.freq1; + sc->frac.mode_sel = 1 << clkdef->frac.mode_sel; + sc->frac.freq_sel = 1 << clkdef->frac.freq_sel; + + sc->mux_shift = clkdef->mux_shift; + sc->mux_mask = ((1 << clkdef->mux_width) - 1) << sc->mux_shift; + + sc->gate_shift = clkdef->gate_shift; + + sc->lock_shift = clkdef->lock_shift; + sc->lock_retries = clkdef->lock_retries; + + sc->flags = clkdef->flags; + + clknode_register(clkdom, clk); + + return (0); +} Added: head/sys/arm/allwinner/clkng/aw_clk_frac.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/allwinner/clkng/aw_clk_frac.h Thu May 23 17:35:40 2019 (r348180) @@ -0,0 +1,52 @@ +/*- + * Copyright (c) 2019 Emmanuel Vadot + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef __AW_CLK_FRAC_H__ +#define __AW_CLK_FRAC_H__ + +#include + +struct aw_clk_frac_def { + struct clknode_init_def clkdef; + uint32_t offset; + + struct aw_clk_factor m; + struct aw_clk_factor n; + struct aw_clk_frac frac; + + uint32_t mux_shift; + uint32_t mux_width; + uint32_t gate_shift; + uint32_t lock_shift; + uint32_t lock_retries; + + uint32_t flags; +}; + +int aw_clk_frac_register(struct clkdom *clkdom, struct aw_clk_frac_def *clkdef); + +#endif /* __AW_CLK_FRAC_H__ */ Modified: head/sys/arm/allwinner/files.allwinner ============================================================================== --- head/sys/arm/allwinner/files.allwinner Thu May 23 17:34:33 2019 (r348179) +++ head/sys/arm/allwinner/files.allwinner Thu May 23 17:35:40 2019 (r348180) @@ -36,6 +36,7 @@ arm/allwinner/aw_ccu.c standard arm/allwinner/aw_gmacclk.c standard arm/allwinner/clkng/aw_ccung.c standard +arm/allwinner/clkng/aw_clk_frac.c standard arm/allwinner/clkng/aw_clk_nkmp.c standard arm/allwinner/clkng/aw_clk_nm.c standard arm/allwinner/clkng/aw_clk_prediv_mux.c standard Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Thu May 23 17:34:33 2019 (r348179) +++ head/sys/conf/files.arm64 Thu May 23 17:35:40 2019 (r348180) @@ -49,6 +49,7 @@ arm/allwinner/if_awg.c optional awg ext_resources sys # Allwinner clock driver arm/allwinner/clkng/aw_ccung.c optional aw_ccu fdt +arm/allwinner/clkng/aw_clk_frac.c optional aw_ccu fdt arm/allwinner/clkng/aw_clk_nkmp.c optional aw_ccu fdt arm/allwinner/clkng/aw_clk_nm.c optional aw_ccu fdt arm/allwinner/clkng/aw_clk_prediv_mux.c optional aw_ccu fdt From owner-svn-src-head@freebsd.org Thu May 23 17:36:21 2019 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 D8F7C15B0833; Thu, 23 May 2019 17:36:20 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7992A765FE; Thu, 23 May 2019 17:36:20 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 55CE385E2; Thu, 23 May 2019 17:36:20 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4NHaKUY037365; Thu, 23 May 2019 17:36:20 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NHaJLK037362; Thu, 23 May 2019 17:36:19 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201905231736.x4NHaJLK037362@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 23 May 2019 17:36:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348181 - head/sys/arm/allwinner/clkng X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/allwinner/clkng X-SVN-Commit-Revision: 348181 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7992A765FE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 17:36:21 -0000 Author: manu Date: Thu May 23 17:36:19 2019 New Revision: 348181 URL: https://svnweb.freebsd.org/changeset/base/348181 Log: arm: allwinner: clk: Use the new frac clock Some clocks used the NM type but this clock is for the ones with the formula "clk = clkin / n / m" and not "clk = clkin * n / m" Use the new frac clock for them. Modified: head/sys/arm/allwinner/clkng/ccu_a10.c head/sys/arm/allwinner/clkng/ccu_a31.c head/sys/arm/allwinner/clkng/ccu_a64.c head/sys/arm/allwinner/clkng/ccu_h3.c Modified: head/sys/arm/allwinner/clkng/ccu_a10.c ============================================================================== --- head/sys/arm/allwinner/clkng/ccu_a10.c Thu May 23 17:35:40 2019 (r348180) +++ head/sys/arm/allwinner/clkng/ccu_a10.c Thu May 23 17:36:19 2019 (r348181) @@ -212,7 +212,7 @@ NKMP_CLK(pll_core_clk, 0, 0, /* lock */ AW_CLK_HAS_GATE); /* flags */ -NM_CLK_WITH_FRAC(pll_video0_clk, +FRAC_CLK(pll_video0_clk, CLK_PLL_VIDEO0, /* id */ "pll_video0", pll_parents, /* name, parents */ 0x10, /* offset */ @@ -231,7 +231,7 @@ FIXED_CLK(pll_video0_2x_clk, 1, /* div */ 0); /* flags */ -NM_CLK_WITH_FRAC(pll_video1_clk, +FRAC_CLK(pll_video1_clk, CLK_PLL_VIDEO1, /* id */ "pll_video1", pll_parents, /* name, parents */ 0x30, /* offset */ @@ -537,8 +537,8 @@ static struct aw_ccung_clk a10_ccu_clks[] = { { .type = AW_CLK_NM, .clk.nm = &ahb_clk}, { .type = AW_CLK_NM, .clk.nm = &apb0_clk}, { .type = AW_CLK_NM, .clk.nm = &apb1_clk}, - { .type = AW_CLK_NM, .clk.nm = &pll_video0_clk}, - { .type = AW_CLK_NM, .clk.nm = &pll_video1_clk}, + { .type = AW_CLK_FRAC, .clk.frac = &pll_video0_clk}, + { .type = AW_CLK_FRAC, .clk.frac = &pll_video1_clk}, { .type = AW_CLK_NM, .clk.nm = &nand_clk}, { .type = AW_CLK_NM, .clk.nm = &ms_clk}, { .type = AW_CLK_NM, .clk.nm = &mmc0_clk}, Modified: head/sys/arm/allwinner/clkng/ccu_a31.c ============================================================================== --- head/sys/arm/allwinner/clkng/ccu_a31.c Thu May 23 17:35:40 2019 (r348180) +++ head/sys/arm/allwinner/clkng/ccu_a31.c Thu May 23 17:36:19 2019 (r348181) @@ -293,7 +293,7 @@ FIXED_CLK(pll_audio_8x_clk, 1, /* div */ 0); /* flags */ -NM_CLK_WITH_FRAC(pll_video0_clk, +FRAC_CLK(pll_video0_clk, CLK_PLL_VIDEO0, /* id */ "pll_video0", pll_parents, /* name, parents */ 0x10, /* offset */ @@ -314,7 +314,7 @@ FIXED_CLK(pll_video0_2x_clk, 1, /* div */ 0); /* flags */ -NM_CLK_WITH_FRAC(pll_ve_clk, +FRAC_CLK(pll_ve_clk, CLK_PLL_VE, /* id */ "pll_ve", pll_parents, /* name, parents */ 0x18, /* offset */ @@ -360,7 +360,7 @@ FIXED_CLK(pll_periph_2x_clk, 1, /* div */ 0); /* flags */ -NM_CLK_WITH_FRAC(pll_video1_clk, +FRAC_CLK(pll_video1_clk, CLK_PLL_VIDEO1, /* id */ "pll_video1", pll_parents, /* name, parents */ 0x30, /* offset */ @@ -381,7 +381,7 @@ FIXED_CLK(pll_video1_2x_clk, 1, /* div */ 0); /* flags */ -NM_CLK_WITH_FRAC(pll_gpu_clk, +FRAC_CLK(pll_gpu_clk, CLK_PLL_GPU, /* id */ "pll_gpu", pll_parents, /* name, parents */ 0x38, /* offset */ @@ -405,7 +405,7 @@ NKMP_CLK(pll_mipi_clk, 28, 1000, /* lock */ AW_CLK_HAS_GATE | AW_CLK_HAS_LOCK); /* flags */ -NM_CLK_WITH_FRAC(pll9_clk, +FRAC_CLK(pll9_clk, CLK_PLL9, /* id */ "pll9", pll_parents, /* name, parents */ 0x44, /* offset */ @@ -416,7 +416,7 @@ NM_CLK_WITH_FRAC(pll9_clk, 270000000, 297000000, /* freq0, freq1 */ 24, 25); /* mode sel, freq sel */ -NM_CLK_WITH_FRAC(pll10_clk, +FRAC_CLK(pll10_clk, CLK_PLL10, /* id */ "pll10", pll_parents, /* name, parents */ 0x48, /* offset */ @@ -869,12 +869,12 @@ static struct aw_ccung_clk a31_ccu_clks[] = { { .type = AW_CLK_NKMP, .clk.nkmp = &pll_periph_clk}, { .type = AW_CLK_NKMP, .clk.nkmp = &pll_ddr_clk}, { .type = AW_CLK_NKMP, .clk.nkmp = &pll_mipi_clk}, - { .type = AW_CLK_NM, .clk.nm = &pll_video0_clk}, - { .type = AW_CLK_NM, .clk.nm = &pll_ve_clk}, - { .type = AW_CLK_NM, .clk.nm = &pll_video1_clk}, - { .type = AW_CLK_NM, .clk.nm = &pll_gpu_clk}, - { .type = AW_CLK_NM, .clk.nm = &pll9_clk}, - { .type = AW_CLK_NM, .clk.nm = &pll10_clk}, + { .type = AW_CLK_FRAC, .clk.frac = &pll_video0_clk}, + { .type = AW_CLK_FRAC, .clk.frac = &pll_ve_clk}, + { .type = AW_CLK_FRAC, .clk.frac = &pll_video1_clk}, + { .type = AW_CLK_FRAC, .clk.frac = &pll_gpu_clk}, + { .type = AW_CLK_FRAC, .clk.frac = &pll9_clk}, + { .type = AW_CLK_FRAC, .clk.frac = &pll10_clk}, { .type = AW_CLK_NM, .clk.nm = &apb2_clk}, { .type = AW_CLK_NM, .clk.nm = &nand0_clk}, { .type = AW_CLK_NM, .clk.nm = &nand1_clk}, Modified: head/sys/arm/allwinner/clkng/ccu_a64.c ============================================================================== --- head/sys/arm/allwinner/clkng/ccu_a64.c Thu May 23 17:35:40 2019 (r348180) +++ head/sys/arm/allwinner/clkng/ccu_a64.c Thu May 23 17:36:19 2019 (r348181) @@ -279,7 +279,7 @@ FIXED_CLK(pll_audio_8x_clk, 0); /* flags */ static const char *pll_video0_parents[] = {"osc24M"}; -NM_CLK_WITH_FRAC(pll_video0_clk, +FRAC_CLK(pll_video0_clk, CLK_PLL_VIDEO0, /* id */ "pll_video0", pll_video0_parents, /* name, parents */ 0x10, /* offset */ @@ -300,7 +300,7 @@ FIXED_CLK(pll_video0_2x_clk, 0); /* flags */ static const char *pll_ve_parents[] = {"osc24M"}; -NM_CLK_WITH_FRAC(pll_ve_clk, +FRAC_CLK(pll_ve_clk, CLK_PLL_VE, /* id */ "pll_ve", pll_ve_parents, /* name, parents */ 0x18, /* offset */ @@ -370,7 +370,7 @@ FIXED_CLK(pll_periph1_clk, 0); /* flags */ static const char *pll_video1_parents[] = {"osc24M"}; -NM_CLK_WITH_FRAC(pll_video1_clk, +FRAC_CLK(pll_video1_clk, CLK_PLL_VIDEO1, /* id */ "pll_video1", pll_video1_parents, /* name, parents */ 0x30, /* offset */ @@ -382,7 +382,7 @@ NM_CLK_WITH_FRAC(pll_video1_clk, 24, 25); /* mode sel, freq sel */ static const char *pll_gpu_parents[] = {"osc24M"}; -NM_CLK_WITH_FRAC(pll_gpu_clk, +FRAC_CLK(pll_gpu_clk, CLK_PLL_GPU, /* id */ "pll_gpu", pll_gpu_parents, /* name, parents */ 0x38, /* offset */ @@ -396,7 +396,7 @@ NM_CLK_WITH_FRAC(pll_gpu_clk, /* PLL MIPI is missing */ static const char *pll_hsic_parents[] = {"osc24M"}; -NM_CLK_WITH_FRAC(pll_hsic_clk, +FRAC_CLK(pll_hsic_clk, CLK_PLL_HSIC, /* id */ "pll_hsic", pll_hsic_parents, /* name, parents */ 0x44, /* offset */ @@ -408,7 +408,7 @@ NM_CLK_WITH_FRAC(pll_hsic_clk, 24, 25); /* mode sel, freq sel */ static const char *pll_de_parents[] = {"osc24M"}; -NM_CLK_WITH_FRAC(pll_de_clk, +FRAC_CLK(pll_de_clk, CLK_PLL_DE, /* id */ "pll_de", pll_de_parents, /* name, parents */ 0x48, /* offset */ @@ -723,16 +723,18 @@ NM_CLK(gpu_clk, static struct aw_ccung_clk a64_ccu_clks[] = { { .type = AW_CLK_NKMP, .clk.nkmp = &pll_cpux_clk}, { .type = AW_CLK_NKMP, .clk.nkmp = &pll_audio_clk}, + { .type = AW_CLK_FRAC, .clk.frac = &pll_video0_clk}, + { .type = AW_CLK_FRAC, .clk.frac = &pll_ve_clk}, + { .type = AW_CLK_NKMP, .clk.nkmp = &pll_ddr0_clk}, { .type = AW_CLK_NKMP, .clk.nkmp = &pll_periph0_2x_clk}, { .type = AW_CLK_NKMP, .clk.nkmp = &pll_periph1_2x_clk}, - { .type = AW_CLK_NKMP, .clk.nkmp = &pll_ddr0_clk}, + { .type = AW_CLK_FRAC, .clk.frac = &pll_video1_clk}, + { .type = AW_CLK_FRAC, .clk.frac = &pll_gpu_clk}, + /* PLL_MIPI */ + { .type = AW_CLK_FRAC, .clk.frac = &pll_hsic_clk}, + { .type = AW_CLK_FRAC, .clk.frac = &pll_de_clk}, { .type = AW_CLK_NKMP, .clk.nkmp = &pll_ddr1_clk}, - { .type = AW_CLK_NM, .clk.nm = &pll_video0_clk}, - { .type = AW_CLK_NM, .clk.nm = &pll_video1_clk}, - { .type = AW_CLK_NM, .clk.nm = &pll_ve_clk}, - { .type = AW_CLK_NM, .clk.nm = &pll_gpu_clk}, - { .type = AW_CLK_NM, .clk.nm = &pll_de_clk}, - { .type = AW_CLK_NM, .clk.nm = &pll_hsic_clk}, + { .type = AW_CLK_NM, .clk.nm = &apb2_clk}, { .type = AW_CLK_NM, .clk.nm = &nand_clk}, { .type = AW_CLK_NM, .clk.nm = &mmc0_clk}, Modified: head/sys/arm/allwinner/clkng/ccu_h3.c ============================================================================== --- head/sys/arm/allwinner/clkng/ccu_h3.c Thu May 23 17:35:40 2019 (r348180) +++ head/sys/arm/allwinner/clkng/ccu_h3.c Thu May 23 17:36:19 2019 (r348181) @@ -297,7 +297,7 @@ FIXED_CLK(pll_audio_8x_clk, 0); /* flags */ static const char *pll_video_parents[] = {"osc24M"}; -NM_CLK_WITH_FRAC(pll_video_clk, +FRAC_CLK(pll_video_clk, CLK_PLL_VIDEO, /* id */ "pll_video", pll_video_parents, /* name, parents */ 0x10, /* offset */ @@ -309,7 +309,7 @@ NM_CLK_WITH_FRAC(pll_video_clk, 24, 25); /* mode sel, freq sel */ static const char *pll_ve_parents[] = {"osc24M"}; -NM_CLK_WITH_FRAC(pll_ve_clk, +FRAC_CLK(pll_ve_clk, CLK_PLL_VE, /* id */ "pll_ve", pll_ve_parents, /* name, parents */ 0x18, /* offset */ @@ -357,7 +357,7 @@ FIXED_CLK(pll_periph0_2x_clk, 0); /* flags */ static const char *pll_gpu_parents[] = {"osc24M"}; -NM_CLK_WITH_FRAC(pll_gpu_clk, +FRAC_CLK(pll_gpu_clk, CLK_PLL_GPU, /* id */ "pll_gpu", pll_gpu_parents, /* name, parents */ 0x38, /* offset */ @@ -382,7 +382,7 @@ NKMP_CLK(pll_periph1_clk, AW_CLK_HAS_GATE | AW_CLK_HAS_LOCK); /* flags */ static const char *pll_de_parents[] = {"osc24M"}; -NM_CLK_WITH_FRAC(pll_de_clk, +FRAC_CLK(pll_de_clk, CLK_PLL_DE, /* id */ "pll_de", pll_de_parents, /* name, parents */ 0x48, /* offset */ @@ -684,10 +684,10 @@ static struct aw_ccung_clk h3_ccu_clks[] = { { .type = AW_CLK_NKMP, .clk.nkmp = &pll_periph0_clk}, { .type = AW_CLK_NKMP, .clk.nkmp = &pll_periph1_clk}, { .type = AW_CLK_NKMP, .clk.nkmp = &pll_ddr_clk}, - { .type = AW_CLK_NM, .clk.nm = &pll_video_clk}, - { .type = AW_CLK_NM, .clk.nm = &pll_ve_clk}, - { .type = AW_CLK_NM, .clk.nm = &pll_gpu_clk}, - { .type = AW_CLK_NM, .clk.nm = &pll_de_clk}, + { .type = AW_CLK_FRAC, .clk.frac = &pll_video_clk}, + { .type = AW_CLK_FRAC, .clk.frac = &pll_ve_clk}, + { .type = AW_CLK_FRAC, .clk.frac = &pll_gpu_clk}, + { .type = AW_CLK_FRAC, .clk.frac = &pll_de_clk}, { .type = AW_CLK_NM, .clk.nm = &apb2_clk}, { .type = AW_CLK_NM, .clk.nm = &nand_clk}, { .type = AW_CLK_NM, .clk.nm = &mmc0_clk}, From owner-svn-src-head@freebsd.org Thu May 23 17:36:57 2019 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 573B115B08B1; Thu, 23 May 2019 17:36:57 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F304676774; Thu, 23 May 2019 17:36:56 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C6A8B85E3; Thu, 23 May 2019 17:36:56 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4NHaujo037439; Thu, 23 May 2019 17:36:56 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NHaufm037436; Thu, 23 May 2019 17:36:56 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201905231736.x4NHaufm037436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 23 May 2019 17:36:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348182 - head/sys/arm/allwinner/clkng X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/allwinner/clkng X-SVN-Commit-Revision: 348182 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F304676774 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 17:36:57 -0000 Author: manu Date: Thu May 23 17:36:55 2019 New Revision: 348182 URL: https://svnweb.freebsd.org/changeset/base/348182 Log: arm: allwinner: Remove frac mode from NM clk We have a correct clock type aw_clk_frac now for this. Modified: head/sys/arm/allwinner/clkng/aw_clk.h head/sys/arm/allwinner/clkng/aw_clk_nm.c head/sys/arm/allwinner/clkng/aw_clk_nm.h Modified: head/sys/arm/allwinner/clkng/aw_clk.h ============================================================================== --- head/sys/arm/allwinner/clkng/aw_clk.h Thu May 23 17:36:19 2019 (r348181) +++ head/sys/arm/allwinner/clkng/aw_clk.h Thu May 23 17:36:55 2019 (r348182) @@ -64,7 +64,6 @@ struct aw_clk_init { #define AW_CLK_HAS_MUX 0x0004 #define AW_CLK_REPARENT 0x0008 #define AW_CLK_SCALE_CHANGE 0x0010 -#define AW_CLK_HAS_FRAC 0x0020 #define AW_CLK_HAS_UPDATE 0x0040 #define AW_CLK_HAS_PREDIV 0x0080 @@ -334,7 +333,7 @@ aw_clk_factor_get_value(struct aw_clk_factor *factor, .gate_shift = _gate_shift, \ .lock_shift = _lock_shift, \ .lock_retries = _lock_retries, \ - .flags = _flags | AW_CLK_HAS_FRAC, \ + .flags = _flags, \ .frac.freq0 = _freq0, \ .frac.freq1 = _freq1, \ .frac.mode_sel = _mode_sel, \ @@ -368,38 +367,6 @@ aw_clk_factor_get_value(struct aw_clk_factor *factor, .mux_width = _mux_width, \ .gate_shift = _gate_shift, \ .flags = _flags, \ - } - -#define NM_CLK_WITH_FRAC(_clkname, _id, _name, _pnames, \ - _offset, \ - _nshift, _nwidth, _nvalue, _nflags, \ - _mshift, _mwidth, _mvalue, _mflags, \ - _gate_shift, _lock_shift,_lock_retries, \ - _flags, _freq0, _freq1, _mode_sel, _freq_sel) \ - static struct aw_clk_nm_def _clkname = { \ - .clkdef = { \ - .id = _id, \ - .name = _name, \ - .parent_names = _pnames, \ - .parent_cnt = nitems(_pnames), \ - }, \ - .offset = _offset, \ - .n.shift = _nshift, \ - .n.width = _nwidth, \ - .n.value = _nvalue, \ - .n.flags = _nflags, \ - .m.shift = _mshift, \ - .m.width = _mwidth, \ - .m.value = _mvalue, \ - .m.flags = _mflags, \ - .gate_shift = _gate_shift, \ - .lock_shift = _lock_shift, \ - .lock_retries = _lock_retries, \ - .flags = _flags | AW_CLK_HAS_FRAC, \ - .frac.freq0 = _freq0, \ - .frac.freq1 = _freq1, \ - .frac.mode_sel = _mode_sel, \ - .frac.freq_sel = _freq_sel, \ } #define PREDIV_CLK(_clkname, _id, _name, _pnames, \ Modified: head/sys/arm/allwinner/clkng/aw_clk_nm.c ============================================================================== --- head/sys/arm/allwinner/clkng/aw_clk_nm.c Thu May 23 17:36:19 2019 (r348181) +++ head/sys/arm/allwinner/clkng/aw_clk_nm.c Thu May 23 17:36:55 2019 (r348182) @@ -53,7 +53,6 @@ struct aw_clk_nm_sc { struct aw_clk_factor m; struct aw_clk_factor n; struct aw_clk_factor prediv; - struct aw_clk_frac frac; uint32_t mux_shift; uint32_t mux_mask; @@ -182,13 +181,13 @@ aw_clk_nm_set_freq(struct clknode *clk, uint64_t fpare struct aw_clk_nm_sc *sc; struct clknode *p_clk; const char **p_names; - uint64_t cur, best, best_frac; + uint64_t cur, best; uint32_t val, m, n, best_m, best_n; int p_idx, best_parent, retry; sc = clknode_get_softc(clk); - best = best_frac = cur = 0; + best = cur = 0; best_parent = 0; if ((sc->flags & AW_CLK_REPARENT) != 0) { @@ -210,13 +209,8 @@ aw_clk_nm_set_freq(struct clknode *clk, uint64_t fpare p_clk = clknode_get_parent(clk); clknode_get_freq(p_clk, &fparent); } else { - if (sc->flags & AW_CLK_HAS_FRAC && - (*fout == sc->frac.freq0 || *fout == sc->frac.freq1)) - best = best_frac = *fout; - - if (best == 0) - best = aw_clk_nm_find_best(sc, fparent, fout, - &best_n, &best_m); + best = aw_clk_nm_find_best(sc, fparent, fout, + &best_n, &best_m); } if ((flags & CLK_SET_DRYRUN) != 0) { @@ -242,20 +236,12 @@ aw_clk_nm_set_freq(struct clknode *clk, uint64_t fpare DEVICE_LOCK(clk); READ4(clk, sc->offset, &val); - if (best_frac != 0) { - val &= ~sc->frac.mode_sel; - if (best_frac == sc->frac.freq0) - val &= ~sc->frac.freq_sel; - else - val |= sc->frac.freq_sel; - } else { - n = aw_clk_factor_get_value(&sc->n, best_n); - m = aw_clk_factor_get_value(&sc->m, best_m); - val &= ~sc->n.mask; - val &= ~sc->m.mask; - val |= n << sc->n.shift; - val |= m << sc->m.shift; - } + n = aw_clk_factor_get_value(&sc->n, best_n); + m = aw_clk_factor_get_value(&sc->m, best_m); + val &= ~sc->n.mask; + val &= ~sc->m.mask; + val |= n << sc->n.shift; + val |= m << sc->m.shift; WRITE4(clk, sc->offset, val); DEVICE_UNLOCK(clk); @@ -287,25 +273,14 @@ aw_clk_nm_recalc(struct clknode *clk, uint64_t *freq) READ4(clk, sc->offset, &val); DEVICE_UNLOCK(clk); - if (sc->flags & AW_CLK_HAS_FRAC && ((val & sc->frac.mode_sel) == 0)) { - if (val & sc->frac.freq_sel) - *freq = sc->frac.freq1; - else - *freq = sc->frac.freq0; - } else { - m = aw_clk_get_factor(val, &sc->m); - n = aw_clk_get_factor(val, &sc->n); - if (sc->flags & AW_CLK_HAS_PREDIV) - prediv = aw_clk_get_factor(val, &sc->prediv); - else - prediv = 1; + m = aw_clk_get_factor(val, &sc->m); + n = aw_clk_get_factor(val, &sc->n); + if (sc->flags & AW_CLK_HAS_PREDIV) + prediv = aw_clk_get_factor(val, &sc->prediv); + else + prediv = 1; - /* For FRAC NM the formula is freq_parent * n / m */ - if (sc->flags & AW_CLK_HAS_FRAC) - *freq = *freq * n / m; - else - *freq = *freq / prediv / n / m; - } + *freq = *freq / prediv / n / m; return (0); } @@ -360,11 +335,6 @@ aw_clk_nm_register(struct clkdom *clkdom, struct aw_cl else sc->prediv.cond_mask = clkdef->prediv.cond_mask; sc->prediv.cond_value = clkdef->prediv.cond_value; - - sc->frac.freq0 = clkdef->frac.freq0; - sc->frac.freq1 = clkdef->frac.freq1; - sc->frac.mode_sel = 1 << clkdef->frac.mode_sel; - sc->frac.freq_sel = 1 << clkdef->frac.freq_sel; sc->mux_shift = clkdef->mux_shift; sc->mux_mask = ((1 << clkdef->mux_width) - 1) << sc->mux_shift; Modified: head/sys/arm/allwinner/clkng/aw_clk_nm.h ============================================================================== --- head/sys/arm/allwinner/clkng/aw_clk_nm.h Thu May 23 17:36:19 2019 (r348181) +++ head/sys/arm/allwinner/clkng/aw_clk_nm.h Thu May 23 17:36:55 2019 (r348182) @@ -38,7 +38,6 @@ struct aw_clk_nm_def { struct aw_clk_factor m; struct aw_clk_factor n; struct aw_clk_factor prediv; - struct aw_clk_frac frac; uint32_t mux_shift; uint32_t mux_width; From owner-svn-src-head@freebsd.org Thu May 23 17:46:29 2019 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 B824C15B0BF2; Thu, 23 May 2019 17:46:29 +0000 (UTC) (envelope-from kp@krion.cc) Received: from krion.cc (krion.cc [148.251.235.209]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53D7976F5C; Thu, 23 May 2019 17:46:29 +0000 (UTC) (envelope-from kp@krion.cc) Date: Thu, 23 May 2019 19:46:21 +0200 From: Kirill Ponomarev To: Brad Davis Cc: svn-src-head , svn-src-all , src-committers , Conrad Meyer Subject: Re: svn commit: r347638 - in head: . etc lib/libc/gen Message-ID: <20190523174621.GE5335@krion.cc> References: <201905160109.x4G19DhY080690@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="dFWYt1i2NyOo1oI9" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) X-Rspamd-Queue-Id: 53D7976F5C X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.96)[-0.959,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 17:46:29 -0000 --dFWYt1i2NyOo1oI9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 05/22, Conrad Meyer wrote: > Hi Brad, >=20 > Ping. It's still broken. Can you revert this please? Please, revert these changes, it's still broken here as well. --dFWYt1i2NyOo1oI9 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEJCHRFhEAQujKni1pDyI9/LMCykUFAlzm3G0ACgkQDyI9/LMC ykUDRwf+M/BsGugGoZw534OHX64bh/AZ3Wel/c4Jn7otoU4QtBKZ8uJvQ9ZV8QaC qf+fKUOQ8rBanQAL0na5K6LkJEQH3u7SsMYJf9X48uXlAtrh51wNrKRPCUkE131y luuaYyCFlBOcndM+Kh7e/42fq4rtZ7cmw6MzOJ0E1fF6L7knf2/QyyJNbKrxauMr xXDIMAHL8P8N5MGoAXH3psisMYjiCZHjVP6Z+8Qkj0dcr/y0cQqc6uz7H38y14s1 VBjK1iJx+Kfm0iVYlKNb+dSNi1gcs74I7TUKOFAFfixpf1jmB/AeAZtdud5/uZWH m8dOpoe6AepgxScJPFLT0Jijpgi+wQ== =SgO7 -----END PGP SIGNATURE----- --dFWYt1i2NyOo1oI9-- From owner-svn-src-head@freebsd.org Thu May 23 17:50:59 2019 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 5EA0415B0DF8; Thu, 23 May 2019 17:50:59 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F0AEC7727C; Thu, 23 May 2019 17:50:58 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 2BFB13C0182; Thu, 23 May 2019 17:50:52 +0000 (UTC) Date: Thu, 23 May 2019 17:50:52 +0000 From: Brooks Davis To: Kirill Ponomarev Cc: Brad Davis , svn-src-head , svn-src-all , src-committers , Conrad Meyer Subject: Re: svn commit: r347638 - in head: . etc lib/libc/gen Message-ID: <20190523175052.GA79329@spindle.one-eyed-alien.net> References: <201905160109.x4G19DhY080690@repo.freebsd.org> <20190523174621.GE5335@krion.cc> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jI8keyz6grp/JLjh" Content-Disposition: inline In-Reply-To: <20190523174621.GE5335@krion.cc> User-Agent: Mutt/1.9.4 (2018-02-28) X-Rspamd-Queue-Id: F0AEC7727C X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.75 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_SHORT(-0.77)[-0.765,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 17:50:59 -0000 --jI8keyz6grp/JLjh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 23, 2019 at 07:46:21PM +0200, Kirill Ponomarev wrote: > On 05/22, Conrad Meyer wrote: > > Hi Brad, > >=20 > > Ping. It's still broken. Can you revert this please? >=20 > Please, revert these changes, it's still broken here as well. In addition the in-tree breakage for updates, the broke external update systems and image building systems. I don't care what mechanism is used (.PATH, ${SRCTOP}, something to tag the files in the src/etc Makefile), but moving these files is unacceptable and should be reverted. -- Brooks --jI8keyz6grp/JLjh Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJc5t17AAoJEKzQXbSebgfAifwIAJjsUcjoBXLzP2mSMBeBGV6X 6ZPZKLkcSdgNQL+EG2GY4DuTYDwfmdW1qP+souRuVfXrRs/8ecHwXvLxqoFC8dNV puKV9889mUy34PBJUsjNjjV/6XtMt9dzW2zUEW/Au3uZ9xKdIqo9EjBL542og8hQ CB1igTd6ApPDVPaZGmZd9pmLLF5ENpsjev6l586Me4eUERKpp2gbZMWrMS9OOUgK 7iR+bFOwLc0K52MjuK7jCYLMZrFA9hk+J3FQCxlrVXNBaa0is3fhD/XhTOVS3WTb wmNTnjHUr3X4ne4lHJDJa1mEInmo2mOGAymbVbx1a2NF9MgEhELj2N1elZju6zE= =4S/r -----END PGP SIGNATURE----- --jI8keyz6grp/JLjh-- From owner-svn-src-head@freebsd.org Thu May 23 18:06:36 2019 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 7B48B15B150B; Thu, 23 May 2019 18:06:36 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DCB8277E6E; Thu, 23 May 2019 18:06:35 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x4NI6XqW091593; Thu, 23 May 2019 11:06:33 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x4NI6Xq0091592; Thu, 23 May 2019 11:06:33 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201905231806.x4NI6Xq0091592@gndrsh.dnsmgr.net> Subject: Re: svn commit: r347638 - in head: . etc lib/libc/gen In-Reply-To: <20190523175052.GA79329@spindle.one-eyed-alien.net> To: Brooks Davis Date: Thu, 23 May 2019 11:06:33 -0700 (PDT) CC: Kirill Ponomarev , Brad Davis , svn-src-head , svn-src-all , src-committers , Conrad Meyer Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: DCB8277E6E X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.90 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.91)[-0.907,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 18:06:36 -0000 -- Start of PGP signed section. > On Thu, May 23, 2019 at 07:46:21PM +0200, Kirill Ponomarev wrote: > > On 05/22, Conrad Meyer wrote: > > > Hi Brad, > > > > > > Ping. It's still broken. Can you revert this please? > > > > Please, revert these changes, it's still broken here as well. > > In addition the in-tree breakage for updates, the broke external update > systems and image building systems. I don't care what mechanism is > used (.PATH, ${SRCTOP}, something to tag the files in the src/etc > Makefile), but moving these files is unacceptable and should be > reverted. I may have another, temporary solution/sugestion. First revert this, then add a comment that while the pkgbase work is sorted out that these files live in 2 places and you must commit 2 both if you have to touch one of them. Then svn cp the files to the new location. Everyone happy with that temporary, hackash, work around so that both groups can move forward while all the sharp pointy sticks are cleaned up? Thanks, -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Thu May 23 18:07:38 2019 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 797D615B15EB; Thu, 23 May 2019 18:07:38 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1DA1680022; Thu, 23 May 2019 18:07:38 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from ivaldir.etoilebsd.net (etoilebsd.net [178.32.217.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id D59EA1E7F8; Thu, 23 May 2019 18:07:37 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by ivaldir.etoilebsd.net (Postfix, from userid 1001) id 6B767957AB; Thu, 23 May 2019 20:07:36 +0200 (CEST) Date: Thu, 23 May 2019 20:07:36 +0200 From: Baptiste Daroussin To: Brooks Davis Cc: Kirill Ponomarev , svn-src-head , svn-src-all , src-committers , Brad Davis , Conrad Meyer Subject: Re: svn commit: r347638 - in head: . etc lib/libc/gen Message-ID: <20190523180735.xrsjwhls3gaiqyk5@ivaldir.net> References: <201905160109.x4G19DhY080690@repo.freebsd.org> <20190523174621.GE5335@krion.cc> <20190523175052.GA79329@spindle.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ngugdkyogeqgs5vh" Content-Disposition: inline In-Reply-To: <20190523175052.GA79329@spindle.one-eyed-alien.net> User-Agent: NeoMutt/20180716 X-Rspamd-Queue-Id: 1DA1680022 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.981,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 18:07:38 -0000 --ngugdkyogeqgs5vh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 23, 2019 at 05:50:52PM +0000, Brooks Davis wrote: > On Thu, May 23, 2019 at 07:46:21PM +0200, Kirill Ponomarev wrote: > > On 05/22, Conrad Meyer wrote: > > > Hi Brad, > > >=20 > > > Ping. It's still broken. Can you revert this please? > >=20 > > Please, revert these changes, it's still broken here as well. >=20 > In addition the in-tree breakage for updates, the broke external update > systems and image building systems. I don't care what mechanism is > used (.PATH, ${SRCTOP}, something to tag the files in the src/etc > Makefile), but moving these files is unacceptable and should be > reverted. >=20 > -- Brooks So before everyone goes further, manu and I are working on a version that should please everyone, and allow to revert any changes to mergemaster and etcupdate. Best regards, Bapt --ngugdkyogeqgs5vh Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAlzm4WQACgkQY4mL3PG3 Plo8TxAAxxCu0amHj7tNt6vUzezGq30Ur7xwIiAxNQYuCVGrIpVNPOUFzP104U2b hIipLo6DaR8fPeDEOUQdJ165U6NFomPpiRPXpgJpTHgU6awDqu/msDOy4xlk1CA/ HkxqgDNuhV3vuyA6o1F2NSs9qH2+nfFz9AWxaHqZWLx+fFo0Hb9RcrfkcHJGjmNl HGu41cFGTXQWHPm+TwUpzRBl1VyBqLPNn5BgaeD+CNK/js/oj09n/R8IcZXLRp2z d04LaRL+Bh5N8hUbfhaM+vqdIc10khetFA0lzaJDGIh0d22Ym54cPIUzO0p7+RSO 6dCAFpKmS/ZbrmTUiyRruDTklcnOcwvelKoW0lHFQ3ykqvCuq8ipy5KiY7wINQJi T/yfpFVWnAPSAM9gXbOJXBp1iDGudAxkXbD74phB3aoxrOlNlxyIJEfDcH0bjDVs q0XPbfE3c7IKxfO1YNyFfQoba2xtjfGthi0FJhllwbdR1kBHQbwurw9r67oCAV3o 3zQqL4Z9UlYcA3ALTL2lNu0VnOM8c1aV3PX1RV4VbFkJAis80KH0wg41pNeDzVMJ x6pkUITzcqU5kCrYuM2Og4ig3U3EXqd6d3nQw792f4rbyDWZ5ZFe2DQgxvTRlx2v IVhysgEyHq68j9dqDhWhtSTroYW6zZ2n+cTQpb2KzgVUSPifQi0= =/JJ8 -----END PGP SIGNATURE----- --ngugdkyogeqgs5vh-- From owner-svn-src-head@freebsd.org Thu May 23 18:19:58 2019 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 2AA3515B199A; Thu, 23 May 2019 18:19:58 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C005180634; Thu, 23 May 2019 18:19:57 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 93D358CB5; Thu, 23 May 2019 18:19:57 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4NIJv0b058473; Thu, 23 May 2019 18:19:57 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NIJvI3058472; Thu, 23 May 2019 18:19:57 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201905231819.x4NIJvI3058472@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 23 May 2019 18:19:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348183 - head/sys/dev/iicbus/twsi X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/iicbus/twsi X-SVN-Commit-Revision: 348183 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C005180634 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 18:19:58 -0000 Author: ian Date: Thu May 23 18:19:56 2019 New Revision: 348183 URL: https://svnweb.freebsd.org/changeset/base/348183 Log: Add pnpinfo. Modified: head/sys/dev/iicbus/twsi/a10_twsi.c head/sys/dev/iicbus/twsi/mv_twsi.c Modified: head/sys/dev/iicbus/twsi/a10_twsi.c ============================================================================== --- head/sys/dev/iicbus/twsi/a10_twsi.c Thu May 23 17:36:55 2019 (r348182) +++ head/sys/dev/iicbus/twsi/a10_twsi.c Thu May 23 18:19:56 2019 (r348183) @@ -152,3 +152,4 @@ EARLY_DRIVER_MODULE(a10_twsi, simplebus, a10_twsi_driv EARLY_DRIVER_MODULE(iicbus, a10_twsi, iicbus_driver, iicbus_devclass, 0, 0, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_LATE); MODULE_DEPEND(a10_twsi, iicbus, 1, 1, 1); +SIMPLEBUS_PNP_INFO(compat_data); Modified: head/sys/dev/iicbus/twsi/mv_twsi.c ============================================================================== --- head/sys/dev/iicbus/twsi/mv_twsi.c Thu May 23 17:36:55 2019 (r348182) +++ head/sys/dev/iicbus/twsi/mv_twsi.c Thu May 23 18:19:56 2019 (r348183) @@ -125,6 +125,7 @@ static devclass_t mv_twsi_devclass; DRIVER_MODULE(twsi, simplebus, mv_twsi_driver, mv_twsi_devclass, 0, 0); DRIVER_MODULE(iicbus, twsi, iicbus_driver, iicbus_devclass, 0, 0); MODULE_DEPEND(twsi, iicbus, 1, 1, 1); +SIMPLEBUS_PNP_INFO(compat_data); static phandle_t mv_twsi_get_node(device_t bus, device_t dev) From owner-svn-src-head@freebsd.org Thu May 23 18:24:29 2019 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 A38FA15B1CFA; Thu, 23 May 2019 18:24:29 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46D2580C65; Thu, 23 May 2019 18:24:29 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3873B8E56; Thu, 23 May 2019 18:24:29 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4NIOSc9063368; Thu, 23 May 2019 18:24:28 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NIORuu063362; Thu, 23 May 2019 18:24:27 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201905231824.x4NIORuu063362@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 23 May 2019 18:24:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348184 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 348184 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 46D2580C65 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 18:24:29 -0000 Author: ian Date: Thu May 23 18:24:27 2019 New Revision: 348184 URL: https://svnweb.freebsd.org/changeset/base/348184 Log: Add pnpinfo to all i2c drivers that have FDT compat data. Modified: head/sys/dev/iicbus/ds1307.c head/sys/dev/iicbus/ds13rtc.c head/sys/dev/iicbus/isl12xx.c head/sys/dev/iicbus/nxprtc.c head/sys/dev/iicbus/rtc8583.c head/sys/dev/iicbus/sy8106a.c head/sys/dev/iicbus/syr827.c Modified: head/sys/dev/iicbus/ds1307.c ============================================================================== --- head/sys/dev/iicbus/ds1307.c Thu May 23 18:19:56 2019 (r348183) +++ head/sys/dev/iicbus/ds1307.c Thu May 23 18:24:27 2019 (r348184) @@ -435,3 +435,4 @@ static devclass_t ds1307_devclass; DRIVER_MODULE(ds1307, iicbus, ds1307_driver, ds1307_devclass, NULL, NULL); MODULE_VERSION(ds1307, 1); MODULE_DEPEND(ds1307, iicbus, 1, 1, 1); +IICBUS_FDT_PNP_INFO(ds1307_compat_data); Modified: head/sys/dev/iicbus/ds13rtc.c ============================================================================== --- head/sys/dev/iicbus/ds13rtc.c Thu May 23 18:19:56 2019 (r348183) +++ head/sys/dev/iicbus/ds13rtc.c Thu May 23 18:24:27 2019 (r348184) @@ -617,3 +617,4 @@ static devclass_t ds13rtc_devclass; DRIVER_MODULE(ds13rtc, iicbus, ds13rtc_driver, ds13rtc_devclass, NULL, NULL); MODULE_VERSION(ds13rtc, 1); MODULE_DEPEND(ds13rtc, iicbus, IICBB_MINVER, IICBB_PREFVER, IICBB_MAXVER); +IICBUS_FDT_PNP_INFO(compat_data); Modified: head/sys/dev/iicbus/isl12xx.c ============================================================================== --- head/sys/dev/iicbus/isl12xx.c Thu May 23 18:19:56 2019 (r348183) +++ head/sys/dev/iicbus/isl12xx.c Thu May 23 18:24:27 2019 (r348184) @@ -356,3 +356,4 @@ static devclass_t isl12xx_devclass; DRIVER_MODULE(isl12xx, iicbus, isl12xx_driver, isl12xx_devclass, NULL, NULL); MODULE_VERSION(isl12xx, 1); MODULE_DEPEND(isl12xx, iicbus, IICBUS_MINVER, IICBUS_PREFVER, IICBUS_MAXVER); +IICBUS_FDT_PNP_INFO(compat_data); Modified: head/sys/dev/iicbus/nxprtc.c ============================================================================== --- head/sys/dev/iicbus/nxprtc.c Thu May 23 18:19:56 2019 (r348183) +++ head/sys/dev/iicbus/nxprtc.c Thu May 23 18:24:27 2019 (r348184) @@ -826,3 +826,4 @@ static devclass_t nxprtc_devclass; DRIVER_MODULE(nxprtc, iicbus, nxprtc_driver, nxprtc_devclass, NULL, NULL); MODULE_VERSION(nxprtc, 1); MODULE_DEPEND(nxprtc, iicbus, IICBUS_MINVER, IICBUS_PREFVER, IICBUS_MAXVER); +IICBUS_FDT_PNP_INFO(compat_data); Modified: head/sys/dev/iicbus/rtc8583.c ============================================================================== --- head/sys/dev/iicbus/rtc8583.c Thu May 23 18:19:56 2019 (r348183) +++ head/sys/dev/iicbus/rtc8583.c Thu May 23 18:24:27 2019 (r348184) @@ -300,3 +300,4 @@ static devclass_t rtc8583_devclass; DRIVER_MODULE(rtc8583, iicbus, rtc8583_driver, rtc8583_devclass, NULL, NULL); MODULE_VERSION(rtc8583, 1); MODULE_DEPEND(rtc8583, iicbus, IICBUS_MINVER, IICBUS_PREFVER, IICBUS_MAXVER); +IICBUS_FDT_PNP_INFO(compat_data); Modified: head/sys/dev/iicbus/sy8106a.c ============================================================================== --- head/sys/dev/iicbus/sy8106a.c Thu May 23 18:19:56 2019 (r348183) +++ head/sys/dev/iicbus/sy8106a.c Thu May 23 18:24:27 2019 (r348184) @@ -300,3 +300,4 @@ EARLY_DRIVER_MODULE(sy8106a, iicbus, sy8106a_driver, s BUS_PASS_RESOURCE); MODULE_VERSION(sy8106a, 1); MODULE_DEPEND(sy8106a, iicbus, 1, 1, 1); +IICBUS_FDT_PNP_INFO(compat_data); Modified: head/sys/dev/iicbus/syr827.c ============================================================================== --- head/sys/dev/iicbus/syr827.c Thu May 23 18:19:56 2019 (r348183) +++ head/sys/dev/iicbus/syr827.c Thu May 23 18:24:27 2019 (r348184) @@ -352,3 +352,4 @@ EARLY_DRIVER_MODULE(syr827, iicbus, syr827_driver, syr BUS_PASS_RESOURCE); MODULE_VERSION(syr827, 1); MODULE_DEPEND(syr827, iicbus, 1, 1, 1); +IICBUS_FDT_PNP_INFO(compat_data); From owner-svn-src-head@freebsd.org Thu May 23 18:37:07 2019 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 AE41C15B219E; Thu, 23 May 2019 18:37:07 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F6C6814C3; Thu, 23 May 2019 18:37:07 +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 3EC249028; Thu, 23 May 2019 18:37:07 +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 x4NIb79m069043; Thu, 23 May 2019 18:37:07 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NIb5Jj069036; Thu, 23 May 2019 18:37:05 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201905231837.x4NIb5Jj069036@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 23 May 2019 18:37:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348185 - in head: . etc lib/libc/gen usr.sbin/etcupdate usr.sbin/mergemaster X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: in head: . etc lib/libc/gen usr.sbin/etcupdate usr.sbin/mergemaster X-SVN-Commit-Revision: 348185 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4F6C6814C3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 18:37:07 -0000 Author: bapt Date: Thu May 23 18:37:05 2019 New Revision: 348185 URL: https://svnweb.freebsd.org/changeset/base/348185 Log: Move back group, master.passwd and shells to etc directory Use the .PATH mechanism instead so keep installing them from lib/libc/gen While here revert 347961 and 347893 which are no longer needed Discussed with: manu Tested by: manu ok manu@ Added: head/etc/group - copied unchanged from r348184, head/lib/libc/gen/group head/etc/master.passwd - copied unchanged from r348184, head/lib/libc/gen/master.passwd head/etc/shells - copied unchanged from r348184, head/lib/libc/gen/shells Deleted: head/lib/libc/gen/group head/lib/libc/gen/master.passwd head/lib/libc/gen/shells Modified: head/UPDATING head/lib/libc/gen/Makefile.inc head/usr.sbin/etcupdate/etcupdate.sh head/usr.sbin/mergemaster/mergemaster.sh Modified: head/UPDATING ============================================================================== --- head/UPDATING Thu May 23 18:24:27 2019 (r348184) +++ head/UPDATING Thu May 23 18:37:05 2019 (r348185) @@ -31,12 +31,6 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) -20190517: - For users of mergemaster, after recent changes to locations of - master.passwd and group in the source tree mergemaster needs to be - updated. Before running `mergemaster -p', cd to usr.sbin/mergemaster - and run `make install'. - 20190513: User-wired pages now have their own counter, vm.stats.vm.v_user_wire_count. The vm.max_wired sysctl was renamed Copied: head/etc/group (from r348184, head/lib/libc/gen/group) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/group Thu May 23 18:37:05 2019 (r348185, copy of r348184, head/lib/libc/gen/group) @@ -0,0 +1,36 @@ +# $FreeBSD$ +# +wheel:*:0:root +daemon:*:1: +kmem:*:2: +sys:*:3: +tty:*:4: +operator:*:5:root +mail:*:6: +bin:*:7: +news:*:8: +man:*:9: +games:*:13: +ftp:*:14: +staff:*:20: +sshd:*:22: +smmsp:*:25: +mailnull:*:26: +guest:*:31: +video:*:44: +bind:*:53: +unbound:*:59: +proxy:*:62: +authpf:*:63: +_pflogd:*:64: +_dhcp:*:65: +uucp:*:66: +dialer:*:68: +network:*:69: +audit:*:77: +www:*:80: +ntpd:*:123: +_ypldap:*:160: +hast:*:845: +nogroup:*:65533: +nobody:*:65534: Copied: head/etc/master.passwd (from r348184, head/lib/libc/gen/master.passwd) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/master.passwd Thu May 23 18:37:05 2019 (r348185, copy of r348184, head/lib/libc/gen/master.passwd) @@ -0,0 +1,28 @@ +# $FreeBSD$ +# +root::0:0::0:0:Charlie &:/root:/bin/csh +toor:*:0:0::0:0:Bourne-again Superuser:/root: +daemon:*:1:1::0:0:Owner of many system processes:/root:/usr/sbin/nologin +operator:*:2:5::0:0:System &:/:/usr/sbin/nologin +bin:*:3:7::0:0:Binaries Commands and Source:/:/usr/sbin/nologin +tty:*:4:65533::0:0:Tty Sandbox:/:/usr/sbin/nologin +kmem:*:5:65533::0:0:KMem Sandbox:/:/usr/sbin/nologin +games:*:7:13::0:0:Games pseudo-user:/:/usr/sbin/nologin +news:*:8:8::0:0:News Subsystem:/:/usr/sbin/nologin +man:*:9:9::0:0:Mister Man Pages:/usr/share/man:/usr/sbin/nologin +sshd:*:22:22::0:0:Secure Shell Daemon:/var/empty:/usr/sbin/nologin +smmsp:*:25:25::0:0:Sendmail Submission User:/var/spool/clientmqueue:/usr/sbin/nologin +mailnull:*:26:26::0:0:Sendmail Default User:/var/spool/mqueue:/usr/sbin/nologin +bind:*:53:53::0:0:Bind Sandbox:/:/usr/sbin/nologin +unbound:*:59:59::0:0:Unbound DNS Resolver:/var/unbound:/usr/sbin/nologin +proxy:*:62:62::0:0:Packet Filter pseudo-user:/nonexistent:/usr/sbin/nologin +_pflogd:*:64:64::0:0:pflogd privsep user:/var/empty:/usr/sbin/nologin +_dhcp:*:65:65::0:0:dhcp programs:/var/empty:/usr/sbin/nologin +uucp:*:66:66::0:0:UUCP pseudo-user:/var/spool/uucppublic:/usr/local/libexec/uucp/uucico +pop:*:68:6::0:0:Post Office Owner:/nonexistent:/usr/sbin/nologin +auditdistd:*:78:77::0:0:Auditdistd unprivileged user:/var/empty:/usr/sbin/nologin +www:*:80:80::0:0:World Wide Web Owner:/nonexistent:/usr/sbin/nologin +ntpd:*:123:123::0:0:NTP Daemon:/var/db/ntp:/usr/sbin/nologin +_ypldap:*:160:160::0:0:YP LDAP unprivileged user:/var/empty:/usr/sbin/nologin +hast:*:845:845::0:0:HAST unprivileged user:/var/empty:/usr/sbin/nologin +nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/usr/sbin/nologin Copied: head/etc/shells (from r348184, head/lib/libc/gen/shells) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/shells Thu May 23 18:37:05 2019 (r348185, copy of r348184, head/lib/libc/gen/shells) @@ -0,0 +1,9 @@ +# $FreeBSD$ +# +# List of acceptable shells for chpass(1). +# Ftpd will not allow users to connect who are not using +# one of these shells. + +/bin/sh +/bin/csh +/bin/tcsh Modified: head/lib/libc/gen/Makefile.inc ============================================================================== --- head/lib/libc/gen/Makefile.inc Thu May 23 18:24:27 2019 (r348184) +++ head/lib/libc/gen/Makefile.inc Thu May 23 18:37:05 2019 (r348185) @@ -2,7 +2,7 @@ # $FreeBSD$ # machine-independent gen sources -.PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/gen ${LIBC_SRCTOP}/gen +.PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/gen ${LIBC_SRCTOP}/gen ${SRCTOP}/etc CONFS+= group master.passwd shells CONFSMODE_master.passwd= 600 Modified: head/usr.sbin/etcupdate/etcupdate.sh ============================================================================== --- head/usr.sbin/etcupdate/etcupdate.sh Thu May 23 18:24:27 2019 (r348184) +++ head/usr.sbin/etcupdate/etcupdate.sh Thu May 23 18:37:05 2019 (r348185) @@ -1737,9 +1737,7 @@ WARNINGS=$WORKDIR/warnings EDITOR=${EDITOR:-/usr/bin/vi} # Files that need to be updated before installworld. -PREWORLD_FILES="lib/libc/gen/master.passwd lib/libc/gen/group" -# If on an older tree, use it instead. Delete after 13.0. -[ -f ${SRCDIR}/etc/master.passwd ] && PREWORLD_FILES="etc/master.passwd etc/group" +PREWORLD_FILES="etc/master.passwd etc/group" # Handle command-specific argument processing such as complaining # about unsupported options. Since the configuration file is always Modified: head/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- head/usr.sbin/mergemaster/mergemaster.sh Thu May 23 18:24:27 2019 (r348184) +++ head/usr.sbin/mergemaster/mergemaster.sh Thu May 23 18:37:05 2019 (r348185) @@ -669,12 +669,9 @@ case "${RERUN}" in ;; *) # Only set up files that are crucial to {build|install}world - { MM_PASSDIR="${SOURCEDIR}/lib/libc/gen" - # If on an older tree, use it instead. Delete after 13.0. - [ -f ${SOURCEDIR}/etc/master.passwd ] && MM_PASSDIR="${SOURCEDIR}/etc" - mkdir -p ${TEMPROOT}/etc && - cp -p ${MM_PASSDIR}/master.passwd ${TEMPROOT}/etc && - install -p -o root -g wheel -m 0644 ${MM_PASSDIR}/group ${TEMPROOT}/etc;} || + { mkdir -p ${TEMPROOT}/etc && + cp -p ${SOURCEDIR}/etc/master.passwd ${TEMPROOT}/etc && + install -p -o root -g wheel -m 0644 ${SOURCEDIR}/etc/group ${TEMPROOT}/etc;} || { echo ''; echo ' *** FATAL ERROR: Cannot copy files to the temproot environment'; echo ''; From owner-svn-src-head@freebsd.org Thu May 23 18:44:49 2019 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 5418015B24CB; Thu, 23 May 2019 18:44:49 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3B1B81AE7; Thu, 23 May 2019 18:44:48 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id A3CDF3C0182; Thu, 23 May 2019 18:44:47 +0000 (UTC) Date: Thu, 23 May 2019 18:44:47 +0000 From: Brooks Davis To: Baptiste Daroussin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r348185 - in head: . etc lib/libc/gen usr.sbin/etcupdate usr.sbin/mergemaster Message-ID: <20190523184447.GB79329@spindle.one-eyed-alien.net> References: <201905231837.x4NIb5Jj069036@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZoaI/ZTpAVc4A5k6" Content-Disposition: inline In-Reply-To: <201905231837.x4NIb5Jj069036@repo.freebsd.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-Rspamd-Queue-Id: C3B1B81AE7 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 18:44:49 -0000 --ZoaI/ZTpAVc4A5k6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 23, 2019 at 06:37:05PM +0000, Baptiste Daroussin wrote: > Author: bapt > Date: Thu May 23 18:37:05 2019 > New Revision: 348185 > URL: https://svnweb.freebsd.org/changeset/base/348185 >=20 > Log: > Move back group, master.passwd and shells to etc directory > =20 > Use the .PATH mechanism instead so keep installing them from lib/libc/g= en > =20 > While here revert 347961 and 347893 which are no longer needed Thanks, this should let us revert path changes in our build tools. -- Brooks --ZoaI/ZTpAVc4A5k6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJc5uoeAAoJEKzQXbSebgfAdqoH/jFjri20coHP9V1arnHet51p 0axk5ZukwqnP2VQ+noLUbxs+HEqwGRsLtCXbIPsduI4UWh/Kg0/b4+gqwPIoR5+x jC4y9GPBIQ91vdwMqAZYaduKFDzXVIpKHN+z8P3UsKW0/kkAfQzlJ3M+q9LPjvbv JYuTMOTuLoPbHl0NbyqAcrWYrim2IwBFBQBtit9vnemp80CW3R5cbr4zVQFKG6Nn FWRZ0m6xEedmm2SgE2qLftMNsT7PiKFidAAHb7dXXHwnBC1e0dWMhE/PMTqKiyOo 29Lom3ad+d3PBBPFsiVACoiz5pa2ULtl3nuHpYt1bk0rYaQoTnj514ILdLI0hB8= =Ahaw -----END PGP SIGNATURE----- --ZoaI/ZTpAVc4A5k6-- From owner-svn-src-head@freebsd.org Thu May 23 18:55:49 2019 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 0538615B29B0; Thu, 23 May 2019 18:55:49 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9F75982437; Thu, 23 May 2019 18:55:48 +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 75F8F9388; Thu, 23 May 2019 18:55:48 +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 x4NItmIf079708; Thu, 23 May 2019 18:55:48 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NItmKO079707; Thu, 23 May 2019 18:55:48 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201905231855.x4NItmKO079707@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 23 May 2019 18:55:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348187 - head X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 348187 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9F75982437 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 18:55:49 -0000 Author: bapt Date: Thu May 23 18:55:48 2019 New Revision: 348187 URL: https://svnweb.freebsd.org/changeset/base/348187 Log: Change package the MTREEFLAGS and INSTALLFLAGS missed in r348185 Reported by: lwhsu Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu May 23 18:48:46 2019 (r348186) +++ head/Makefile.inc1 Thu May 23 18:55:48 2019 (r348187) @@ -871,8 +871,8 @@ DB_FROM_SRC= yes .endif .if defined(DB_FROM_SRC) -INSTALLFLAGS+= -N ${.CURDIR}/lib/libc/gen -MTREEFLAGS+= -N ${.CURDIR}/lib/libc/gen +INSTALLFLAGS+= -N ${.CURDIR}/etc +MTREEFLAGS+= -N ${.CURDIR}/etc .endif _INSTALL_DDIR= ${DESTDIR}/${DISTDIR} INSTALL_DDIR= ${_INSTALL_DDIR:S://:/:g:C:/$::} From owner-svn-src-head@freebsd.org Thu May 23 19:26:51 2019 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 B9B5115B36BE; Thu, 23 May 2019 19:26:51 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6D75583FFC; Thu, 23 May 2019 19:26:51 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 45FBF98B4; Thu, 23 May 2019 19:26:51 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4NJQpLt096317; Thu, 23 May 2019 19:26:51 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NJQodS096314; Thu, 23 May 2019 19:26:50 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201905231926.x4NJQodS096314@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 23 May 2019 19:26:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348194 - in head/stand: common fdt X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/stand: common fdt X-SVN-Commit-Revision: 348194 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6D75583FFC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 19:26:52 -0000 Author: manu Date: Thu May 23 19:26:50 2019 New Revision: 348194 URL: https://svnweb.freebsd.org/changeset/base/348194 Log: loader: Add pnp functions for autoloading modules based on linker.hints This adds some new commands to loader : - pnpmatch This takes a pnpinfo string as argument and tries to find a kernel module associated with it. -v and -d option are available and are the same as in devmatch (v is verbose, d dumps the hints). - pnpload This takes a pnpinfo string as argument and tries to load a kernel module associated with it. - pnpautoload This will attempt to load every kernel module for each buses. Each buses are probed, the probe function will generate pnpinfo string and load kernel module associated with it if it exists. Only simplebus for FDT system is implemented for now. Since we need the dtb and overlays to be applied before searching the tree fdt_devmatch_next will load and apply the dtb + overlays. All the pnp parsing code comes from devmatch and is the same at 99%. Reviewed by: imp, kevans Differential Revision: https://reviews.freebsd.org/D19498 Modified: head/stand/common/module.c head/stand/fdt/fdt_loader_cmd.c head/stand/fdt/fdt_platform.h Modified: head/stand/common/module.c ============================================================================== --- head/stand/common/module.c Thu May 23 19:20:37 2019 (r348193) +++ head/stand/common/module.c Thu May 23 19:26:50 2019 (r348194) @@ -39,6 +39,10 @@ __FBSDID("$FreeBSD$"); #include #include +#if defined(LOADER_FDT_SUPPORT) +#include +#endif + #include "bootstrap.h" #define MDIR_REMOVED 0x0001 @@ -52,18 +56,18 @@ struct moduledir { STAILQ_ENTRY(moduledir) d_link; }; -static int file_load(char *, vm_offset_t, struct preloaded_file **); -static int file_load_dependencies(struct preloaded_file *); -static char * file_search(const char *, char **); -static struct kernel_module *file_findmodule(struct preloaded_file *, char *, - struct mod_depend *); -static int file_havepath(const char *); -static char *mod_searchmodule(char *, struct mod_depend *); -static void file_insert_tail(struct preloaded_file *); -static void file_remove(struct preloaded_file *); -struct file_metadata *metadata_next(struct file_metadata *, int); -static void moduledir_readhints(struct moduledir *); -static void moduledir_rebuild(void); +static int file_load(char *filename, vm_offset_t dest, struct preloaded_file **result); +static int file_load_dependencies(struct preloaded_file *base_mod); +static char * file_search(const char *name, char **extlist); +static struct kernel_module * file_findmodule(struct preloaded_file *fp, char *modname, struct mod_depend *verinfo); +static int file_havepath(const char *name); +static char *mod_searchmodule(char *name, struct mod_depend *verinfo); +static char * mod_searchmodule_pnpinfo(const char *bus, const char *pnpinfo); +static void file_insert_tail(struct preloaded_file *mp); +static void file_remove(struct preloaded_file *fp); +struct file_metadata* metadata_next(struct file_metadata *base_mp, int type); +static void moduledir_readhints(struct moduledir *mdp); +static void moduledir_rebuild(void); /* load address should be tweaked by first module loaded (kernel) */ static vm_offset_t loadaddr = 0; @@ -344,6 +348,187 @@ command_lsmod(int argc, char *argv[]) return(CMD_OK); } +COMMAND_SET(pnpmatch, "pnpmatch", "list matched modules based on pnpinfo", command_pnpmatch); + +static int pnp_all_flag = 0; +static int pnp_dump_flag = 0; +static int pnp_unbound_flag = 0; +static int pnp_verbose_flag = 0; + +static int +command_pnpmatch(int argc, char *argv[]) +{ + char *module; + int ch; + + pnp_verbose_flag = 0; + pnp_dump_flag = 0; + optind = 1; + optreset = 1; + while ((ch = getopt(argc, argv, "vd")) != -1) { + switch(ch) { + case 'v': + pnp_verbose_flag = 1; + break; + case 'd': + pnp_dump_flag = 1; + break; + case '?': + default: + /* getopt has already reported an error */ + return(CMD_OK); + } + } + argv += (optind - 1); + argc -= (optind - 1); + + module = mod_searchmodule_pnpinfo(argv[1], argv[2]); + if (module) + printf("Matched module: %s\n", module); + else if(argv[1]) + printf("No module matches %s\n", argv[1]); + + return (CMD_OK); +} + +COMMAND_SET(pnpload, "pnpload", "load matched modules based on pnpinfo", command_pnpload); + +static int +command_pnpload(int argc, char *argv[]) +{ + char *module; + int ch, error; + + pnp_verbose_flag = 0; + pnp_dump_flag = 0; + optind = 1; + optreset = 1; + while ((ch = getopt(argc, argv, "vd")) != -1) { + switch(ch) { + case 'v': + pnp_verbose_flag = 1; + break; + case 'd': + pnp_dump_flag = 1; + break; + case '?': + default: + /* getopt has already reported an error */ + return(CMD_OK); + } + } + argv += (optind - 1); + argc -= (optind - 1); + + if (argc != 2) + return (CMD_ERROR); + + module = mod_searchmodule_pnpinfo(argv[1], argv[2]); + + error = mod_load(module, NULL, 0, NULL); + if (error == EEXIST) { + snprintf(command_errbuf, sizeof(command_errbuf), + "warning: module '%s' already loaded", argv[1]); + return (CMD_WARN); + } + + return (error == 0 ? CMD_OK : CMD_CRIT); +} + +#if defined(LOADER_FDT_SUPPORT) +static void +pnpautoload_simplebus(void) { + const char *pnpstring; + const char *compatstr; + char *pnpinfo = NULL; + char *module; + int tag = 0, len, pnplen; + int error; + + while (1) { + pnpstring = fdt_devmatch_next(&tag, &len); + if (pnpstring == NULL) + return; + + compatstr = pnpstring; + for (pnplen = 0; pnplen != len; compatstr = pnpstring + pnplen) { + pnplen += strlen(compatstr) + 1; + asprintf(&pnpinfo, "compat=%s", compatstr); + + module = mod_searchmodule_pnpinfo("simplebus", pnpinfo); + if (module) { + error = mod_loadkld(module, 0, NULL); + if (error) + printf("Cannot load module %s\n", module); + break; + } + } + free(pnpinfo); + free(module); + } +} +#endif + +struct pnp_bus { + const char *name; + void (*load)(void); +}; + +struct pnp_bus pnp_buses[] = { +#if defined(LOADER_FDT_SUPPORT) + {"simplebus", pnpautoload_simplebus}, +#endif +}; + +COMMAND_SET(pnpautoload, "pnpautoload", "auto load modules based on pnpinfo", command_pnpautoload); + +static int +command_pnpautoload(int argc, char *argv[]) +{ + int i; + int verbose; + int ch, error, match; + + pnp_verbose_flag = 0; + pnp_dump_flag = 0; + verbose = 0; + optind = 1; + optreset = 1; + match = 0; + while ((ch = getopt(argc, argv, "v")) != -1) { + switch(ch) { + case 'v': + verbose = 1; + break; + case '?': + default: + /* getopt has already reported an error */ + return(CMD_OK); + } + } + argv += (optind - 1); + argc -= (optind - 1); + + if (argc > 2) + return (CMD_ERROR); + + for (i = 0; i < nitems(pnp_buses); i++) { + if (argc == 2 && strcmp(argv[1], pnp_buses[i].name) != 0) { + if (verbose) + printf("Skipping bus %s\n", pnp_buses[i].name); + continue; + } + if (verbose) + printf("Autoloading modules for simplebus\n"); + pnp_buses[i].load(); + match = 1; + } + if (match == 0) + printf("Unsupported bus %s\n", argv[1]); + + return (CMD_OK); +} + /* * File level interface, functions file_* */ @@ -908,6 +1093,284 @@ bad: return result; } +static int +getint(void **ptr) +{ + int *p = *ptr; + int rv; + + p = (int *)roundup2((intptr_t)p, sizeof(int)); + rv = *p++; + *ptr = p; + return rv; +} + +static void +getstr(void **ptr, char *val) +{ + int *p = *ptr; + char *c = (char *)p; + int len = *(uint8_t *)c; + + memcpy(val, c + 1, len); + val[len] = 0; + c += len + 1; + *ptr = (void *)c; +} + +static int +pnpval_as_int(const char *val, const char *pnpinfo) +{ + int rv; + char key[256]; + char *cp; + + if (pnpinfo == NULL) + return -1; + + cp = strchr(val, ';'); + key[0] = ' '; + if (cp == NULL) + strlcpy(key + 1, val, sizeof(key) - 1); + else { + memcpy(key + 1, val, cp - val); + key[cp - val + 1] = '\0'; + } + strlcat(key, "=", sizeof(key)); + if (strncmp(key + 1, pnpinfo, strlen(key + 1)) == 0) + rv = strtol(pnpinfo + strlen(key + 1), NULL, 0); + else { + cp = strstr(pnpinfo, key); + if (cp == NULL) + rv = -1; + else + rv = strtol(cp + strlen(key), NULL, 0); + } + return rv; +} + +static void +quoted_strcpy(char *dst, const char *src) +{ + char q = ' '; + + if (*src == '\'' || *src == '"') + q = *src++; + while (*src && *src != q) + *dst++ = *src++; // XXX backtick quoting + *dst++ = '\0'; + // XXX overflow +} + +static char * +pnpval_as_str(const char *val, const char *pnpinfo) +{ + static char retval[256]; + char key[256]; + char *cp; + + if (pnpinfo == NULL) { + *retval = '\0'; + return retval; + } + + cp = strchr(val, ';'); + key[0] = ' '; + if (cp == NULL) + strlcpy(key + 1, val, sizeof(key) - 1); + else { + memcpy(key + 1, val, cp - val); + key[cp - val + 1] = '\0'; + } + strlcat(key, "=", sizeof(key)); + if (strncmp(key + 1, pnpinfo, strlen(key + 1)) == 0) + quoted_strcpy(retval, pnpinfo + strlen(key + 1)); + else { + cp = strstr(pnpinfo, key); + if (cp == NULL) + strcpy(retval, "MISSING"); + else + quoted_strcpy(retval, cp + strlen(key)); + } + return retval; +} + +static char * +devmatch_search_hints(struct moduledir *mdp, const char *bus, const char *dev, const char *pnpinfo) +{ + char val1[256], val2[256]; + int ival, len, ents, i, notme, mask, bit, v, found; + void *ptr, *walker, *hints_end; + char *lastmod = NULL, *cp, *s; + + moduledir_readhints(mdp); + found = 0; + if (mdp->d_hints == NULL) + goto bad; + walker = mdp->d_hints; + hints_end = walker + mdp->d_hintsz; + while (walker < hints_end && !found) { + len = getint(&walker); + ival = getint(&walker); + ptr = walker; + switch (ival) { + case MDT_VERSION: + getstr(&ptr, val1); + ival = getint(&ptr); + getstr(&ptr, val2); + if (pnp_dump_flag || pnp_verbose_flag) + printf("Version: if %s.%d kmod %s\n", val1, ival, val2); + break; + case MDT_MODULE: + getstr(&ptr, val1); + getstr(&ptr, val2); + if (lastmod) + free(lastmod); + lastmod = strdup(val2); + if (pnp_dump_flag || pnp_verbose_flag) + printf("module %s in %s\n", val1, val1); + break; + case MDT_PNP_INFO: + if (!pnp_dump_flag && !pnp_unbound_flag && lastmod && strcmp(lastmod, "kernel") == 0) + break; + getstr(&ptr, val1); + getstr(&ptr, val2); + ents = getint(&ptr); + if (pnp_dump_flag || pnp_verbose_flag) + printf("PNP info for bus %s format %s %d entries (%s)\n", + val1, val2, ents, lastmod); + if (strcmp(val1, "usb") == 0) { + if (pnp_verbose_flag) + printf("Treating usb as uhub -- bug in source table still?\n"); + strcpy(val1, "uhub"); + } + if (bus && strcmp(val1, bus) != 0) { + if (pnp_verbose_flag) + printf("Skipped because table for bus %s, looking for %s\n", + val1, bus); + break; + } + for (i = 0; i < ents; i++) { + if (pnp_verbose_flag) + printf("---------- Entry %d ----------\n", i); + if (pnp_dump_flag) + printf(" "); + cp = val2; + notme = 0; + mask = -1; + bit = -1; + do { + switch (*cp) { + /* All integer fields */ + case 'I': + case 'J': + case 'G': + case 'L': + case 'M': + ival = getint(&ptr); + if (pnp_dump_flag) { + printf("%#x:", ival); + break; + } + if (bit >= 0 && ((1 << bit) & mask) == 0) + break; + v = pnpval_as_int(cp + 2, pnpinfo); + if (pnp_verbose_flag) + printf("Matching %s (%c) table=%#x tomatch=%#x\n", + cp + 2, *cp, v, ival); + switch (*cp) { + case 'J': + if (ival == -1) + break; + /*FALLTHROUGH*/ + case 'I': + if (v != ival) + notme++; + break; + case 'G': + if (v < ival) + notme++; + break; + case 'L': + if (v > ival) + notme++; + break; + case 'M': + mask = ival; + break; + } + break; + /* String fields */ + case 'D': + case 'Z': + getstr(&ptr, val1); + if (pnp_dump_flag) { + printf("'%s':", val1); + break; + } + if (*cp == 'D') + break; + s = pnpval_as_str(cp + 2, pnpinfo); + if (strcmp(s, val1) != 0) + notme++; + break; + /* Key override fields, required to be last in the string */ + case 'T': + /* + * This is imperfect and only does one key and will be redone + * to be more general for multiple keys. Currently, nothing + * does that. + */ + if (pnp_dump_flag) /* No per-row data stored */ + break; + if (cp[strlen(cp) - 1] == ';') /* Skip required ; at end */ + cp[strlen(cp) - 1] = '\0'; /* in case it's not there */ + if ((s = strstr(pnpinfo, cp + 2)) == NULL) + notme++; + else if (s > pnpinfo && s[-1] != ' ') + notme++; + break; + default: + printf("Unknown field type %c\n:", *cp); + break; + } + bit++; + cp = strchr(cp, ';'); + if (cp) + cp++; + } while (cp && *cp); + if (pnp_dump_flag) + printf("\n"); + else if (!notme) { + if (!pnp_unbound_flag) { + if (pnp_verbose_flag) + printf("Matches --- %s ---\n", lastmod); + } + found++; + } + } + break; + default: + break; + } + walker = (void *)(len - sizeof(int) + (intptr_t)walker); + } + if (pnp_unbound_flag && found == 0 && *pnpinfo) { + if (pnp_verbose_flag) + printf("------------------------- "); + printf("%s on %s pnpinfo %s", *dev ? dev : "unattached", bus, pnpinfo); + if (pnp_verbose_flag) + printf(" -------------------------"); + printf("\n"); + } + if (found != 0) + return (lastmod); + free(lastmod); + +bad: + return (NULL); +} + /* * Attempt to locate the file containing the module (name) */ @@ -924,6 +1387,26 @@ mod_searchmodule(char *name, struct mod_depend *verinf result = NULL; STAILQ_FOREACH(mdp, &moduledir_list, d_link) { result = mod_search_hints(mdp, name, verinfo); + if (result) + break; + } + + return(result); +} + +static char * +mod_searchmodule_pnpinfo(const char *bus, const char *pnpinfo) +{ + struct moduledir *mdp; + char *result; + + moduledir_rebuild(); + /* + * Now we ready to lookup module in the given directories + */ + result = NULL; + STAILQ_FOREACH(mdp, &moduledir_list, d_link) { + result = devmatch_search_hints(mdp, bus, NULL, pnpinfo); if (result) break; } Modified: head/stand/fdt/fdt_loader_cmd.c ============================================================================== --- head/stand/fdt/fdt_loader_cmd.c Thu May 23 19:20:37 2019 (r348193) +++ head/stand/fdt/fdt_loader_cmd.c Thu May 23 19:26:50 2019 (r348194) @@ -67,6 +67,8 @@ static struct fdt_header *fdt_to_load = NULL; static struct fdt_header *fdtp = NULL; /* Size of FDT blob */ static size_t fdtp_size = 0; +/* Have we loaded all the needed overlays */ +static int fdt_overlays_applied = 0; static int fdt_load_dtb(vm_offset_t va); static void fdt_print_overlay_load_error(int err, const char *filename); @@ -439,6 +441,9 @@ fdt_apply_overlays() if ((fdtp == NULL) || (fdtp_size == 0)) return; + if (fdt_overlays_applied) + return; + max_overlay_size = 0; for (fp = file_findfile(NULL, "dtbo"); fp != NULL; fp = fp->f_next) { if (max_overlay_size < fp->f_size) @@ -507,6 +512,7 @@ fdt_apply_overlays() fdtp_size = current_fdtp_size; } free(overlay); + fdt_overlays_applied = 1; } int @@ -1858,4 +1864,66 @@ fdt_cmd_nyi(int argc, char *argv[]) printf("command not yet implemented\n"); return (CMD_ERROR); +} + +const char * +fdt_devmatch_next(int *tag, int *compatlen) +{ + const struct fdt_property *p; + const struct fdt_property *status; + int o, len = -1; + static int depth = 0; + + if (fdtp == NULL) { + fdt_setup_fdtp(); + fdt_apply_overlays(); + } + + if (*tag != 0) { + o = *tag; + /* We are at the end of the DTB */ + if (o < 0) + return (NULL); + } else { + o = fdt_path_offset(fdtp, "/"); + if (o < 0) { + printf("Can't find dtb\n"); + return (NULL); + } + depth = 0; + } + + /* Find the next node with a compatible property */ + while (1) { + p = NULL; + if (o >= 0 && depth >= 0) { + /* skip disabled nodes */ + status = fdt_get_property(fdtp, o, "status", &len); + if (len > 0) { + if (strcmp(status->data, "disabled") == 0) { + o = fdt_next_node(fdtp, o, &depth); + if (o < 0) /* End of tree */ + return (NULL); + continue; + } + } + + p = fdt_get_property(fdtp, o, "compatible", &len); + } + if (p) + break; + o = fdt_next_node(fdtp, o, &depth); + if (o < 0) /* End of tree */ + return (NULL); + } + + /* Prepare next node for next call */ + o = fdt_next_node(fdtp, o, &depth); + *tag = o; + + if (len >= 0) { + *compatlen = len; + return (p->data); + } + return (NULL); } Modified: head/stand/fdt/fdt_platform.h ============================================================================== --- head/stand/fdt/fdt_platform.h Thu May 23 19:20:37 2019 (r348193) +++ head/stand/fdt/fdt_platform.h Thu May 23 19:26:50 2019 (r348194) @@ -55,4 +55,7 @@ int fdt_platform_load_dtb(void); void fdt_platform_load_overlays(void); void fdt_platform_fixups(void); +/* Devmatch/pnp function */ +const char *fdt_devmatch_next(int *tag, int *compatlen); + #endif /* FDT_PLATFORM_H */ From owner-svn-src-head@freebsd.org Thu May 23 19:55:55 2019 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 4A6A415B4244; Thu, 23 May 2019 19:55:55 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E66D985400; Thu, 23 May 2019 19:55:54 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A7A649DEC; Thu, 23 May 2019 19:55:54 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4NJtsTW011790; Thu, 23 May 2019 19:55:54 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NJtrpO011784; Thu, 23 May 2019 19:55:53 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201905231955.x4NJtrpO011784@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Thu, 23 May 2019 19:55:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348195 - in head/sys: conf dev/uart X-SVN-Group: head X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: in head/sys: conf dev/uart X-SVN-Commit-Revision: 348195 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E66D985400 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 19:55:55 -0000 Author: cperciva Date: Thu May 23 19:55:53 2019 New Revision: 348195 URL: https://svnweb.freebsd.org/changeset/base/348195 Log: Use ACPI SPCR on x86 This takes the SPCR code currently in uart_cpu_arm64.c, moves it into a new uart_cpu_acpi.c (with some associated refactoring), and uses it from both arm64 and x86. An SPCR serial port address AccessWidth field value of 0 ("reserved") is now treated as 1 ("byte access") in order to work around a buggy SPCR table on Amazon EC2 i3.metal instances. Reviewed by: manu, Greg V MFC after: 3 days Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D20357 Added: head/sys/dev/uart/uart_cpu_acpi.c (contents, props changed) Modified: head/sys/conf/files head/sys/dev/uart/uart_cpu_acpi.h head/sys/dev/uart/uart_cpu_arm64.c head/sys/dev/uart/uart_cpu_x86.c Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu May 23 19:26:50 2019 (r348194) +++ head/sys/conf/files Thu May 23 19:55:53 2019 (r348195) @@ -3164,6 +3164,7 @@ dev/uart/uart_bus_pci.c optional uart pci dev/uart/uart_bus_puc.c optional uart puc dev/uart/uart_bus_scc.c optional uart scc dev/uart/uart_core.c optional uart +dev/uart/uart_cpu_acpi.c optional uart acpi dev/uart/uart_dbg.c optional uart gdb dev/uart/uart_dev_msm.c optional uart uart_msm fdt dev/uart/uart_dev_mvebu.c optional uart uart_mvebu Added: head/sys/dev/uart/uart_cpu_acpi.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/uart/uart_cpu_acpi.c Thu May 23 19:55:53 2019 (r348195) @@ -0,0 +1,167 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2016 The FreeBSD Foundation + * Copyright (c) 2019 Colin Percival + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include +#include +#include + +extern bus_space_tag_t uart_bus_space_io; +extern bus_space_tag_t uart_bus_space_mem; + +static struct acpi_uart_compat_data * +uart_cpu_acpi_scan(uint8_t interface_type) +{ + struct acpi_uart_compat_data **cd, *curcd; + int i; + + SET_FOREACH(cd, uart_acpi_class_and_device_set) { + curcd = *cd; + for (i = 0; curcd[i].cd_hid != NULL; i++) { + if (curcd[i].cd_port_subtype == interface_type) + return (&curcd[i]); + } + } + + SET_FOREACH(cd, uart_acpi_class_set) { + curcd = *cd; + for (i = 0; curcd[i].cd_hid != NULL; i++) { + if (curcd[i].cd_port_subtype == interface_type) + return (&curcd[i]); + } + } + + return (NULL); +} + +int +uart_cpu_acpi_spcr(int devtype, struct uart_devinfo *di) +{ + vm_paddr_t spcr_physaddr; + ACPI_TABLE_SPCR *spcr; + struct acpi_uart_compat_data *cd; + struct uart_class *class; + int error = ENXIO; + + /* SPCR only tells us about consoles. */ + if (devtype != UART_DEV_CONSOLE) + return (error); + + /* Look for the SPCR table. */ + spcr_physaddr = acpi_find_table(ACPI_SIG_SPCR); + if (spcr_physaddr == 0) + return (error); + spcr = acpi_map_table(spcr_physaddr, ACPI_SIG_SPCR); + if (spcr == NULL) { + printf("Unable to map the SPCR table!\n"); + return (error); + } + + /* Search for information about this SPCR interface type. */ + cd = uart_cpu_acpi_scan(spcr->InterfaceType); + if (cd == NULL) + goto out; + class = cd->cd_class; + + /* Fill in some fixed details. */ + di->bas.chan = 0; + di->bas.rclk = 0; + di->databits = 8; + di->stopbits = 1; + di->parity = UART_PARITY_NONE; + di->ops = uart_getops(class); + + /* Fill in details from SPCR table. */ + switch (spcr->SerialPort.SpaceId) { + case 0: + di->bas.bst = uart_bus_space_mem; + break; + case 1: + di->bas.bst = uart_bus_space_io; + break; + default: + printf("UART in unrecognized address space: %d!\n", + (int)spcr->SerialPort.SpaceId); + goto out; + } + if (spcr->SerialPort.AccessWidth == 0) + di->bas.regshft = 0; + else + di->bas.regshft = spcr->SerialPort.AccessWidth - 1; + di->bas.regiowidth = spcr->SerialPort.BitWidth / 8; + switch (spcr->BaudRate) { + case 0: + /* Special value; means "keep current value unchanged". */ + di->baudrate = 0; + break; + case 3: + di->baudrate = 9600; + break; + case 4: + di->baudrate = 19200; + break; + case 6: + di->baudrate = 57600; + break; + case 7: + di->baudrate = 115200; + break; + default: + printf("SPCR has reserved BaudRate value: %d!\n", + (int)spcr->BaudRate); + goto out; + } + + /* Apply device tweaks. */ + if ((cd->cd_quirks & UART_F_IGNORE_SPCR_REGSHFT) == + UART_F_IGNORE_SPCR_REGSHFT) { + di->bas.regshft = cd->cd_regshft; + } + + /* Create a bus space handle. */ + error = bus_space_map(di->bas.bst, spcr->SerialPort.Address, + uart_getrange(class), 0, &di->bas.bsh); + +out: + acpi_unmap_table(spcr); + return (error); +} Modified: head/sys/dev/uart/uart_cpu_acpi.h ============================================================================== --- head/sys/dev/uart/uart_cpu_acpi.h Thu May 23 19:26:50 2019 (r348194) +++ head/sys/dev/uart/uart_cpu_acpi.h Thu May 23 19:55:53 2019 (r348195) @@ -66,4 +66,7 @@ SET_DECLARE(uart_acpi_class_set, struct acpi_uart_comp #define UART_ACPI_CLASS(data) \ DATA_SET(uart_acpi_class_set, data) +/* Try to initialize UART device from SPCR data. */ +int uart_cpu_acpi_spcr(int devtype, struct uart_devinfo *di); + #endif /* _DEV_UART_CPU_ACPI_H_ */ Modified: head/sys/dev/uart/uart_cpu_arm64.c ============================================================================== --- head/sys/dev/uart/uart_cpu_arm64.c Thu May 23 19:26:50 2019 (r348194) +++ head/sys/dev/uart/uart_cpu_arm64.c Thu May 23 19:55:53 2019 (r348195) @@ -80,97 +80,6 @@ uart_cpu_eqres(struct uart_bas *b1, struct uart_bas *b return ((pmap_kextract(b1->bsh) == pmap_kextract(b2->bsh)) ? 1 : 0); } -#ifdef DEV_ACPI -static struct acpi_uart_compat_data * -uart_cpu_acpi_scan(uint8_t interface_type) -{ - struct acpi_uart_compat_data **cd, *curcd; - int i; - - SET_FOREACH(cd, uart_acpi_class_and_device_set) { - curcd = *cd; - for (i = 0; curcd[i].cd_hid != NULL; i++) { - if (curcd[i].cd_port_subtype == interface_type) - return (&curcd[i]); - } - } - - SET_FOREACH(cd, uart_acpi_class_set) { - curcd = *cd; - for (i = 0; curcd[i].cd_hid != NULL; i++) { - if (curcd[i].cd_port_subtype == interface_type) - return (&curcd[i]); - } - } - - return (NULL); -} - -static int -uart_cpu_acpi_probe(struct uart_class **classp, bus_space_tag_t *bst, - bus_space_handle_t *bsh, int *baud, u_int *rclk, u_int *shiftp, - u_int *iowidthp) -{ - struct acpi_uart_compat_data *cd; - ACPI_TABLE_SPCR *spcr; - vm_paddr_t spcr_physaddr; - int err; - - err = ENXIO; - spcr_physaddr = acpi_find_table(ACPI_SIG_SPCR); - if (spcr_physaddr == 0) - return (ENXIO); - - spcr = acpi_map_table(spcr_physaddr, ACPI_SIG_SPCR); - - cd = uart_cpu_acpi_scan(spcr->InterfaceType); - if (cd == NULL) - goto out; - - switch(spcr->BaudRate) { - case 0: - /* - * A BaudRate of 0 is a special value which means not to - * change the rate that's already programmed. - */ - *baud = 0; - break; - case 3: - *baud = 9600; - break; - case 4: - *baud = 19200; - break; - case 6: - *baud = 57600; - break; - case 7: - *baud = 115200; - break; - default: - goto out; - } - - err = acpi_map_addr(&spcr->SerialPort, bst, bsh, PAGE_SIZE); - if (err != 0) - goto out; - - *classp = cd->cd_class; - *rclk = 0; - *shiftp = spcr->SerialPort.AccessWidth - 1; - *iowidthp = spcr->SerialPort.BitWidth / 8; - - if ((cd->cd_quirks & UART_F_IGNORE_SPCR_REGSHFT) == - UART_F_IGNORE_SPCR_REGSHFT) { - *shiftp = cd->cd_regshft; - } - -out: - acpi_unmap_table(spcr); - return (err); -} -#endif - int uart_cpu_getdev(int devtype, struct uart_devinfo *di) { @@ -186,14 +95,16 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di) if (err == 0) return (0); +#ifdef DEV_ACPI + /* Check if SPCR can tell us what console to use. */ + if (uart_cpu_acpi_spcr(devtype, di) == 0) + return (0); +#endif + if (devtype != UART_DEV_CONSOLE) return (ENXIO); err = ENXIO; -#ifdef DEV_ACPI - err = uart_cpu_acpi_probe(&class, &bst, &bsh, &br, &rclk, &shift, - &iowidth); -#endif #ifdef FDT if (err != 0) { err = uart_cpu_fdt_probe(&class, &bst, &bsh, &br, &rclk, Modified: head/sys/dev/uart/uart_cpu_x86.c ============================================================================== --- head/sys/dev/uart/uart_cpu_x86.c Thu May 23 19:26:50 2019 (r348194) +++ head/sys/dev/uart/uart_cpu_x86.c Thu May 23 19:55:53 2019 (r348195) @@ -26,6 +26,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "opt_acpi.h" + #include __FBSDID("$FreeBSD$"); @@ -37,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include bus_space_tag_t uart_bus_space_io = X86_BUS_SPACE_IO; bus_space_tag_t uart_bus_space_mem = X86_BUS_SPACE_MEM; @@ -61,6 +64,12 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di) /* Check the environment. */ if (uart_getenv(devtype, di, class) == 0) return (0); + +#ifdef DEV_ACPI + /* Check if SPCR can tell us what console to use. */ + if (uart_cpu_acpi_spcr(devtype, di) == 0) + return (0); +#endif /* * Scan the hints. We only try units 0 to 3 (inclusive). This From owner-svn-src-head@freebsd.org Thu May 23 20:04:23 2019 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 CA92915B44D0; Thu, 23 May 2019 20:04:23 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6EA6E8592F; Thu, 23 May 2019 20:04:23 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4BD9B9F95; Thu, 23 May 2019 20:04:23 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4NK4NGC017171; Thu, 23 May 2019 20:04:23 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NK4NpG017170; Thu, 23 May 2019 20:04:23 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201905232004.x4NK4NpG017170@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 23 May 2019 20:04:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348196 - head/stand/common X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/stand/common X-SVN-Commit-Revision: 348196 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6EA6E8592F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.98)[-0.982,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 20:04:24 -0000 Author: manu Date: Thu May 23 20:04:22 2019 New Revision: 348196 URL: https://svnweb.freebsd.org/changeset/base/348196 Log: loader: Remove unused variable Reported by: lwshu, ci@ Modified: head/stand/common/module.c Modified: head/stand/common/module.c ============================================================================== --- head/stand/common/module.c Thu May 23 19:55:53 2019 (r348195) +++ head/stand/common/module.c Thu May 23 20:04:22 2019 (r348196) @@ -487,7 +487,7 @@ command_pnpautoload(int argc, char *argv[]) { int i; int verbose; - int ch, error, match; + int ch, match; pnp_verbose_flag = 0; pnp_dump_flag = 0; From owner-svn-src-head@freebsd.org Thu May 23 20:12:26 2019 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 19C6215B47D5; Thu, 23 May 2019 20:12:26 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B1C0985E19; Thu, 23 May 2019 20:12:25 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8EA9FA14A; Thu, 23 May 2019 20:12:25 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4NKCPac022120; Thu, 23 May 2019 20:12:25 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NKCOWT022116; Thu, 23 May 2019 20:12:24 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201905232012.x4NKCOWT022116@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Thu, 23 May 2019 20:12:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348197 - in head: sbin/decryptcore sbin/dumpon sys/kern sys/sys X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head: sbin/decryptcore sbin/dumpon sys/kern sys/sys X-SVN-Commit-Revision: 348197 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B1C0985E19 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 20:12:26 -0000 Author: cem Date: Thu May 23 20:12:24 2019 New Revision: 348197 URL: https://svnweb.freebsd.org/changeset/base/348197 Log: EKCD: Add Chacha20 encryption mode Add Chacha20 mode to Encrypted Kernel Crash Dumps. Chacha20 does not require messages to be multiples of block size, so it is valid to use the cipher on non-block-sized messages without the explicit padding AES-CBC would require. Therefore, allow use with simultaneous dump compression. (Continue to disallow use of AES-CBC EKCD with compression.) dumpon(8) gains a -C cipher flag to select between chacha and aes-cbc. It defaults to chacha if no -C option is provided. The man page documents this behavior. Relnotes: sure Sponsored by: Dell EMC Isilon Modified: head/sbin/decryptcore/decryptcore.c head/sbin/dumpon/dumpon.8 head/sbin/dumpon/dumpon.c head/sys/kern/kern_shutdown.c head/sys/sys/kerneldump.h Modified: head/sbin/decryptcore/decryptcore.c ============================================================================== --- head/sbin/decryptcore/decryptcore.c Thu May 23 20:04:22 2019 (r348196) +++ head/sbin/decryptcore/decryptcore.c Thu May 23 20:12:24 2019 (r348197) @@ -119,7 +119,8 @@ static bool decrypt(int ofd, const char *privkeyfile, const char *keyfile, const char *input) { - uint8_t buf[KERNELDUMP_BUFFER_SIZE], key[KERNELDUMP_KEY_MAX_SIZE]; + uint8_t buf[KERNELDUMP_BUFFER_SIZE], key[KERNELDUMP_KEY_MAX_SIZE], + chachaiv[4 * 4]; EVP_CIPHER_CTX *ctx; const EVP_CIPHER *cipher; FILE *fp; @@ -207,6 +208,9 @@ decrypt(int ofd, const char *privkeyfile, const char * case KERNELDUMP_ENC_AES_256_CBC: cipher = EVP_aes_256_cbc(); break; + case KERNELDUMP_ENC_CHACHA20: + cipher = EVP_chacha20(); + break; default: pjdlog_error("Invalid encryption algorithm."); goto failed; @@ -222,7 +226,23 @@ decrypt(int ofd, const char *privkeyfile, const char * RSA_free(privkey); privkey = NULL; - EVP_DecryptInit_ex(ctx, cipher, NULL, key, kdk->kdk_iv); + if (kdk->kdk_encryption == KERNELDUMP_ENC_CHACHA20) { + /* + * OpenSSL treats the IV as 4 little-endian 32 bit integers. + * + * The first two represent a 64-bit counter, where the low half + * is the first 32-bit word. + * + * Start at counter block zero... + */ + memset(chachaiv, 0, 4 * 2); + /* + * And use the IV specified by the dump. + */ + memcpy(&chachaiv[4 * 2], kdk->kdk_iv, 4 * 2); + EVP_DecryptInit_ex(ctx, cipher, NULL, key, chachaiv); + } else + EVP_DecryptInit_ex(ctx, cipher, NULL, key, kdk->kdk_iv); EVP_CIPHER_CTX_set_padding(ctx, 0); explicit_bzero(key, sizeof(key)); Modified: head/sbin/dumpon/dumpon.8 ============================================================================== --- head/sbin/dumpon/dumpon.8 Thu May 23 20:04:22 2019 (r348196) +++ head/sbin/dumpon/dumpon.8 Thu May 23 20:12:24 2019 (r348197) @@ -28,7 +28,7 @@ .\" From: @(#)swapon.8 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd May 21, 2019 +.Dd May 23, 2019 .Dt DUMPON 8 .Os .Sh NAME @@ -39,6 +39,7 @@ .Op Fl i Ar index .Op Fl r .Op Fl v +.Op Fl C Ar cipher .Op Fl k Ar pubkey .Op Fl Z .Op Fl z @@ -47,6 +48,7 @@ .Op Fl i Ar index .Op Fl r .Op Fl v +.Op Fl C Ar cipher .Op Fl k Ar pubkey .Op Fl Z .Op Fl z @@ -129,6 +131,14 @@ The goal of the mechanism is to provide confidentialit The .Va pubkey file should be a PEM-formatted RSA key of at least 1024 bits. +.It Fl C Ar cipher +Select the symmetric algorithm used for encrypted kernel crash dump. +The default is +.Dq chacha20 +but +.Dq aes256-cbc +is also available. +(AES256-CBC mode does not work in conjunction with compression.) .It Fl l List the currently configured dump device(s), or /dev/null if no devices are configured. @@ -420,10 +430,6 @@ requires the .Dv GZIO option. .Sh BUGS -It is currently not possible to configure both compression and encryption. -The encrypted dump format assumes that the kernel dump size is a multiple -of the cipher block size, which may not be true when the dump is compressed. -.Pp Netdump only supports IPv4 at this time. .Sh SECURITY CONSIDERATIONS The current encrypted kernel core dump scheme does not provide integrity nor Modified: head/sbin/dumpon/dumpon.c ============================================================================== --- head/sbin/dumpon/dumpon.c Thu May 23 20:04:22 2019 (r348196) +++ head/sbin/dumpon/dumpon.c Thu May 23 20:12:24 2019 (r348197) @@ -276,7 +276,16 @@ genkey(const char *pubkeyfile, struct diocskerneldump_ if (kdap->kda_encryptedkey == NULL) err(1, "Unable to allocate encrypted key"); - kdap->kda_encryption = KERNELDUMP_ENC_AES_256_CBC; + /* + * If no cipher was specified, choose a reasonable default. + */ + if (kdap->kda_encryption == KERNELDUMP_ENC_NONE) + kdap->kda_encryption = KERNELDUMP_ENC_CHACHA20; + else if (kdap->kda_encryption == KERNELDUMP_ENC_AES_256_CBC && + kdap->kda_compression != KERNELDUMP_COMP_NONE) + errx(EX_USAGE, "Unpadded AES256-CBC mode cannot be used " + "with compression."); + arc4random_buf(kdap->kda_key, sizeof(kdap->kda_key)); if (RSA_public_encrypt(sizeof(kdap->kda_key), kdap->kda_key, kdap->kda_encryptedkey, pubkey, @@ -378,7 +387,7 @@ main(int argc, char *argv[]) struct diocskerneldump_arg ndconf, *kdap; struct addrinfo hints, *res; const char *dev, *pubkeyfile, *server, *client, *gateway; - int ch, error, fd; + int ch, error, fd, cipher; bool gzip, list, netdump, zstd, insert, rflag; uint8_t ins_idx; @@ -387,9 +396,21 @@ main(int argc, char *argv[]) pubkeyfile = NULL; server = client = gateway = NULL; ins_idx = KDA_APPEND; + cipher = KERNELDUMP_ENC_NONE; - while ((ch = getopt(argc, argv, "c:g:i:k:lrs:vZz")) != -1) + while ((ch = getopt(argc, argv, "C:c:g:i:k:lrs:vZz")) != -1) switch ((char)ch) { + case 'C': + if (strcasecmp(optarg, "chacha") == 0 || + strcasecmp(optarg, "chacha20") == 0) + cipher = KERNELDUMP_ENC_CHACHA20; + else if (strcasecmp(optarg, "aes-cbc") == 0 || + strcasecmp(optarg, "aes256-cbc") == 0) + cipher = KERNELDUMP_ENC_AES_256_CBC; + else + errx(EX_USAGE, "Unrecognized cipher algorithm " + "'%s'", optarg); + break; case 'c': client = optarg; break; @@ -451,7 +472,10 @@ main(int argc, char *argv[]) if (argc != 1) usage(); -#ifndef HAVE_CRYPTO +#ifdef HAVE_CRYPTO + if (cipher != KERNELDUMP_ENC_NONE && pubkeyfile == NULL) + errx(EX_USAGE, "-C option requires a public key file."); +#else if (pubkeyfile != NULL) errx(EX_UNAVAILABLE,"Unable to use the public key." " Recompile dumpon with OpenSSL support."); @@ -526,8 +550,10 @@ main(int argc, char *argv[]) } #ifdef HAVE_CRYPTO - if (pubkeyfile != NULL) + if (pubkeyfile != NULL) { + kdap->kda_encryption = cipher; genkey(pubkeyfile, kdap); + } #endif error = ioctl(fd, DIOCSKERNELDUMP, kdap); if (error != 0) Modified: head/sys/kern/kern_shutdown.c ============================================================================== --- head/sys/kern/kern_shutdown.c Thu May 23 20:04:22 2019 (r348196) +++ head/sys/kern/kern_shutdown.c Thu May 23 20:12:24 2019 (r348197) @@ -80,6 +80,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -180,8 +181,16 @@ MALLOC_DEFINE(M_EKCD, "ekcd", "Encrypted kernel crash struct kerneldumpcrypto { uint8_t kdc_encryption; uint8_t kdc_iv[KERNELDUMP_IV_MAX_SIZE]; - keyInstance kdc_ki; - cipherInstance kdc_ci; + union { + struct { + keyInstance aes_ki; + cipherInstance aes_ci; + } u_aes; + struct chacha_ctx u_chacha; + } u; +#define kdc_ki u.u_aes.aes_ki +#define kdc_ci u.u_aes.aes_ci +#define kdc_chacha u.u_chacha uint32_t kdc_dumpkeysize; struct kerneldumpkey kdc_dumpkey[]; }; @@ -1024,6 +1033,9 @@ kerneldumpcrypto_create(size_t blocksize, uint8_t encr if (rijndael_makeKey(&kdc->kdc_ki, DIR_ENCRYPT, 256, key) <= 0) goto failed; break; + case KERNELDUMP_ENC_CHACHA20: + chacha_keysetup(&kdc->kdc_chacha, key, 256); + break; default: goto failed; } @@ -1072,6 +1084,9 @@ kerneldumpcrypto_init(struct kerneldumpcrypto *kdc) goto out; } break; + case KERNELDUMP_ENC_CHACHA20: + chacha_ivsetup(&kdc->kdc_chacha, kdc->kdc_iv, NULL); + break; default: error = EINVAL; goto out; @@ -1208,11 +1223,12 @@ dumper_insert(const struct dumperinfo *di_template, co } if (kda->kda_compression != KERNELDUMP_COMP_NONE) { /* - * We currently can't support simultaneous encryption and - * compression because our only encryption mode is an unpadded - * block cipher, go figure. This is low hanging fruit to fix. + * We can't support simultaneous unpadded block cipher + * encryption and compression because there is no guarantee the + * length of the compressed result is exactly a multiple of the + * cipher block size. */ - if (kda->kda_encryption != KERNELDUMP_ENC_NONE) { + if (kda->kda_encryption == KERNELDUMP_ENC_AES_256_CBC) { error = EOPNOTSUPP; goto cleanup; } @@ -1367,6 +1383,9 @@ dump_encrypt(struct kerneldumpcrypto *kdc, uint8_t *bu buf + size - 16 /* IV size for AES-256-CBC */) <= 0) { return (EIO); } + break; + case KERNELDUMP_ENC_CHACHA20: + chacha_encrypt_bytes(&kdc->kdc_chacha, buf, buf, size); break; default: return (EINVAL); Modified: head/sys/sys/kerneldump.h ============================================================================== --- head/sys/sys/kerneldump.h Thu May 23 20:04:22 2019 (r348196) +++ head/sys/sys/kerneldump.h Thu May 23 20:12:24 2019 (r348197) @@ -63,6 +63,7 @@ #define KERNELDUMP_ENC_NONE 0 #define KERNELDUMP_ENC_AES_256_CBC 1 +#define KERNELDUMP_ENC_CHACHA20 2 #define KERNELDUMP_BUFFER_SIZE 4096 #define KERNELDUMP_IV_MAX_SIZE 32 From owner-svn-src-head@freebsd.org Thu May 23 20:18:47 2019 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 C2D5E15B4BB5; Thu, 23 May 2019 20:18:47 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6251686190; Thu, 23 May 2019 20:18:47 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3B63AA163; Thu, 23 May 2019 20:18:47 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4NKIlBr022448; Thu, 23 May 2019 20:18:47 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NKIl5q022447; Thu, 23 May 2019 20:18:47 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201905232018.x4NKIl5q022447@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Thu, 23 May 2019 20:18:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348198 - head/sys/dev/uart X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/dev/uart X-SVN-Commit-Revision: 348198 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6251686190 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.98)[-0.982,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 20:18:47 -0000 Author: cem Date: Thu May 23 20:18:46 2019 New Revision: 348198 URL: https://svnweb.freebsd.org/changeset/base/348198 Log: uart_cpu_acpi: Fix GCC build break from r348195 extern declarations are redundant with those in uart_cpu.h, which this file includes. X-MFC-with: r348195 Modified: head/sys/dev/uart/uart_cpu_acpi.c Modified: head/sys/dev/uart/uart_cpu_acpi.c ============================================================================== --- head/sys/dev/uart/uart_cpu_acpi.c Thu May 23 20:12:24 2019 (r348197) +++ head/sys/dev/uart/uart_cpu_acpi.c Thu May 23 20:18:46 2019 (r348198) @@ -45,9 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include -extern bus_space_tag_t uart_bus_space_io; -extern bus_space_tag_t uart_bus_space_mem; - static struct acpi_uart_compat_data * uart_cpu_acpi_scan(uint8_t interface_type) { From owner-svn-src-head@freebsd.org Thu May 23 21:02:29 2019 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 0C8B615B5A96; Thu, 23 May 2019 21:02:29 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A735987EE6; Thu, 23 May 2019 21:02:28 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 857ACAA72; Thu, 23 May 2019 21:02:28 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4NL2SWo049072; Thu, 23 May 2019 21:02:28 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NL2RDC049069; Thu, 23 May 2019 21:02:27 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201905232102.x4NL2RDC049069@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Thu, 23 May 2019 21:02:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348199 - head/sys/dev/random X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/dev/random X-SVN-Commit-Revision: 348199 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A735987EE6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 21:02:29 -0000 Author: cem Date: Thu May 23 21:02:27 2019 New Revision: 348199 URL: https://svnweb.freebsd.org/changeset/base/348199 Log: random(4): deduplicate explicit_bzero() in harvest Pull the responsibility for zeroing events, which is general to any conceivable implementation of a random device algorithm, out of the algorithm-specific Fortuna code and into the callers. Most callers indirect through random_fortuna_process_event(), so add the logic there. Most callers already explicitly bzeroed the events they provided, so the logic in Fortuna was mostly redundant. Add one missing bzero in randomdev_accumulate(). Also, remove a redundant bzero in the same function -- randomdev_hash_finish() is obliged to bzero the hash state. Reviewed by: delphij Approved by: secteam(delphij) Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D20318 Modified: head/sys/dev/random/fortuna.c head/sys/dev/random/random_harvestq.c head/sys/dev/random/randomdev.c Modified: head/sys/dev/random/fortuna.c ============================================================================== --- head/sys/dev/random/fortuna.c Thu May 23 20:18:46 2019 (r348198) +++ head/sys/dev/random/fortuna.c Thu May 23 21:02:27 2019 (r348199) @@ -254,7 +254,6 @@ random_fortuna_process_event(struct harvest_event *eve fortuna_state.fs_pool[pl].fsp_length = MIN(RANDOM_FORTUNA_MAXPOOLSIZE, fortuna_state.fs_pool[pl].fsp_length + sizeof(event->he_somecounter) + event->he_size); - explicit_bzero(event, sizeof(*event)); RANDOM_RESEED_UNLOCK(); } Modified: head/sys/dev/random/random_harvestq.c ============================================================================== --- head/sys/dev/random/random_harvestq.c Thu May 23 20:18:46 2019 (r348198) +++ head/sys/dev/random/random_harvestq.c Thu May 23 21:02:27 2019 (r348199) @@ -163,6 +163,7 @@ random_harvestq_fast_process_event(struct harvest_even #if defined(RANDOM_LOADABLE) RANDOM_CONFIG_S_UNLOCK(); #endif + explicit_bzero(event, sizeof(*event)); } static void @@ -437,7 +438,6 @@ random_harvestq_prime(void *unused __unused) harvest_context.hc_destination[RANDOM_CACHED]++; memcpy(event.he_entropy, data + i, sizeof(event.he_entropy)); random_harvestq_fast_process_event(&event); - explicit_bzero(&event, sizeof(event)); } explicit_bzero(data, size); if (bootverbose) @@ -540,7 +540,6 @@ random_harvest_direct_(const void *entropy, u_int size event.he_destination = harvest_context.hc_destination[origin]++; memcpy(event.he_entropy, entropy, size); random_harvestq_fast_process_event(&event); - explicit_bzero(&event, sizeof(event)); } void Modified: head/sys/dev/random/randomdev.c ============================================================================== --- head/sys/dev/random/randomdev.c Thu May 23 20:18:46 2019 (r348198) +++ head/sys/dev/random/randomdev.c Thu May 23 21:02:27 2019 (r348199) @@ -321,7 +321,6 @@ randomdev_accumulate(uint8_t *buf, u_int count) timestamp = (uint32_t)get_cyclecount(); randomdev_hash_iterate(&hash, ×tamp, sizeof(timestamp)); randomdev_hash_finish(&hash, entropy_data); - explicit_bzero(&hash, sizeof(hash)); for (i = 0; i < RANDOM_KEYSIZE_WORDS; i += sizeof(event.he_entropy)/sizeof(event.he_entropy[0])) { event.he_somecounter = (uint32_t)get_cyclecount(); event.he_size = sizeof(event.he_entropy); @@ -330,6 +329,7 @@ randomdev_accumulate(uint8_t *buf, u_int count) memcpy(event.he_entropy, entropy_data + i, sizeof(event.he_entropy)); p_random_alg_context->ra_event_processor(&event); } + explicit_bzero(&event, sizeof(event)); explicit_bzero(entropy_data, sizeof(entropy_data)); } From owner-svn-src-head@freebsd.org Thu May 23 22:01:06 2019 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 34FA215B72A7; Thu, 23 May 2019 22:01:06 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CE65C8AD33; Thu, 23 May 2019 22:01:05 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A81DFB3A1; Thu, 23 May 2019 22:01:05 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4NM15D1079227; Thu, 23 May 2019 22:01:05 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NM15Af079226; Thu, 23 May 2019 22:01:05 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201905232201.x4NM15Af079226@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 23 May 2019 22:01:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348204 - head/stand/common X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: head/stand/common X-SVN-Commit-Revision: 348204 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CE65C8AD33 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 22:01:06 -0000 Author: jkim Date: Thu May 23 22:01:05 2019 New Revision: 348204 URL: https://svnweb.freebsd.org/changeset/base/348204 Log: Remove yet another unused variable. Modified: head/stand/common/module.c Modified: head/stand/common/module.c ============================================================================== --- head/stand/common/module.c Thu May 23 21:57:58 2019 (r348203) +++ head/stand/common/module.c Thu May 23 22:01:05 2019 (r348204) @@ -350,7 +350,6 @@ command_lsmod(int argc, char *argv[]) COMMAND_SET(pnpmatch, "pnpmatch", "list matched modules based on pnpinfo", command_pnpmatch); -static int pnp_all_flag = 0; static int pnp_dump_flag = 0; static int pnp_unbound_flag = 0; static int pnp_verbose_flag = 0; From owner-svn-src-head@freebsd.org Thu May 23 22:06:58 2019 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 96CE115B76F4; Thu, 23 May 2019 22:06:58 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 391FD8B8F4; Thu, 23 May 2019 22:06:58 +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 0F8CCB53B; Thu, 23 May 2019 22:06:58 +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 x4NM6v3I085247; Thu, 23 May 2019 22:06:57 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NM6vQt085245; Thu, 23 May 2019 22:06:57 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201905232206.x4NM6vQt085245@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 23 May 2019 22:06:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348205 - head/sys/netipsec X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/netipsec X-SVN-Commit-Revision: 348205 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 391FD8B8F4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 22:06:58 -0000 Author: jhb Date: Thu May 23 22:06:57 2019 New Revision: 348205 URL: https://svnweb.freebsd.org/changeset/base/348205 Log: Add deprecation warnings for IPsec algorithms deprecated in RFC 8221. All of these algorithms are either explicitly marked MUST NOT, or they are implicitly MUST NOTs by virtue of not being included in IETF's list of protocols at all despite having assignments from IANA. Specifically, this adds warnings for the following ciphers: - des-cbc - blowfish-cbc - cast128-cbc - des-deriv - des-32iv - camellia-cbc Warnings for the following authentication algorithms are also added: - hmac-md5 - keyed-md5 - keyed-sha1 - hmac-ripemd160 Reviewed by: cem, gnn MFC after: 3 days Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D20340 Modified: head/sys/netipsec/xform_ah.c head/sys/netipsec/xform_esp.c Modified: head/sys/netipsec/xform_ah.c ============================================================================== --- head/sys/netipsec/xform_ah.c Thu May 23 22:01:05 2019 (r348204) +++ head/sys/netipsec/xform_ah.c Thu May 23 22:06:57 2019 (r348205) @@ -108,6 +108,8 @@ SYSCTL_VNET_PCPUSTAT(_net_inet_ah, IPSECCTL_STATS, sta #endif static unsigned char ipseczeroes[256]; /* larger than an ip6 extension hdr */ +static struct timeval md5warn, ripewarn, kpdkmd5warn, kpdksha1warn; +static struct timeval warninterval = { .tv_sec = 1, .tv_usec = 0 }; static int ah_input_cb(struct cryptop*); static int ah_output_cb(struct cryptop*); @@ -184,6 +186,26 @@ ah_init0(struct secasvar *sav, struct xformsw *xsp, st __func__, sav->alg_auth)); return EINVAL; } + + switch (sav->alg_auth) { + case SADB_AALG_MD5HMAC: + if (ratecheck(&md5warn, &warninterval)) + gone_in(13, "MD5-HMAC authenticator for IPsec"); + break; + case SADB_X_AALG_RIPEMD160HMAC: + if (ratecheck(&ripewarn, &warninterval)) + gone_in(13, "RIPEMD160-HMAC authenticator for IPsec"); + break; + case SADB_X_AALG_MD5: + if (ratecheck(&kpdkmd5warn, &warninterval)) + gone_in(13, "Keyed-MD5 authenticator for IPsec"); + break; + case SADB_X_AALG_SHA: + if (ratecheck(&kpdksha1warn, &warninterval)) + gone_in(13, "Keyed-SHA1 authenticator for IPsec"); + break; + } + /* * Verify the replay state block allocation is consistent with * the protocol type. We check here so we can make assumptions Modified: head/sys/netipsec/xform_esp.c ============================================================================== --- head/sys/netipsec/xform_esp.c Thu May 23 22:01:05 2019 (r348204) +++ head/sys/netipsec/xform_esp.c Thu May 23 22:06:57 2019 (r348205) @@ -94,6 +94,9 @@ SYSCTL_VNET_PCPUSTAT(_net_inet_esp, IPSECCTL_STATS, st struct espstat, espstat, "ESP statistics (struct espstat, netipsec/esp_var.h"); +static struct timeval deswarn, blfwarn, castwarn, camelliawarn; +static struct timeval warninterval = { .tv_sec = 1, .tv_usec = 0 }; + static int esp_input_cb(struct cryptop *op); static int esp_output_cb(struct cryptop *crp); @@ -156,6 +159,26 @@ esp_init(struct secasvar *sav, struct xformsw *xsp) __func__)); return EINVAL; } + + switch (sav->alg_enc) { + case SADB_EALG_DESCBC: + if (ratecheck(&deswarn, &warninterval)) + gone_in(13, "DES cipher for IPsec"); + break; + case SADB_X_EALG_BLOWFISHCBC: + if (ratecheck(&blfwarn, &warninterval)) + gone_in(13, "Blowfish cipher for IPsec"); + break; + case SADB_X_EALG_CAST128CBC: + if (ratecheck(&castwarn, &warninterval)) + gone_in(13, "CAST cipher for IPsec"); + break; + case SADB_X_EALG_CAMELLIACBC: + if (ratecheck(&camelliawarn, &warninterval)) + gone_in(13, "Camellia cipher for IPsec"); + break; + } + /* subtract off the salt, RFC4106, 8.1 and RFC3686, 5.1 */ keylen = _KEYLEN(sav->key_enc) - SAV_ISCTRORGCM(sav) * 4; if (txform->minkey > keylen || keylen > txform->maxkey) { From owner-svn-src-head@freebsd.org Thu May 23 22:08:36 2019 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 3466615B782E; Thu, 23 May 2019 22:08:36 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D086C8BCCB; Thu, 23 May 2019 22:08:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-3.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 2FA90801; Thu, 23 May 2019 22:08:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r348185 - in head: . etc lib/libc/gen usr.sbin/etcupdate usr.sbin/mergemaster To: Baptiste Daroussin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201905231837.x4NIb5Jj069036@repo.freebsd.org> From: John Baldwin Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <9315313a-6a35-05b9-d319-f48eb9ba8088@FreeBSD.org> Date: Thu, 23 May 2019 15:08:31 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <201905231837.x4NIb5Jj069036@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: D086C8BCCB X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.992,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 22:08:36 -0000 On 5/23/19 11:37 AM, Baptiste Daroussin wrote: > Author: bapt > Date: Thu May 23 18:37:05 2019 > New Revision: 348185 > URL: https://svnweb.freebsd.org/changeset/base/348185 > > Log: > Move back group, master.passwd and shells to etc directory > > Use the .PATH mechanism instead so keep installing them from lib/libc/gen > > While here revert 347961 and 347893 which are no longer needed > > Discussed with: manu > Tested by: manu > ok manu@ Thank you. -- John Baldwin From owner-svn-src-head@freebsd.org Thu May 23 22:10:44 2019 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 86BFB15B79A2; Thu, 23 May 2019 22:10:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2E4158C138; Thu, 23 May 2019 22:10:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-3.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 9847F802; Thu, 23 May 2019 22:10:43 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r348205 - head/sys/netipsec From: John Baldwin To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201905232206.x4NM6vQt085245@repo.freebsd.org> Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <7e3ef228-f9a7-5bd5-1826-5408eb368a71@FreeBSD.org> Date: Thu, 23 May 2019 15:10:42 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <201905232206.x4NM6vQt085245@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 2E4158C138 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.992,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 22:10:44 -0000 On 5/23/19 3:06 PM, John Baldwin wrote: > Author: jhb > Date: Thu May 23 22:06:57 2019 > New Revision: 348205 > URL: https://svnweb.freebsd.org/changeset/base/348205 > > Log: > Add deprecation warnings for IPsec algorithms deprecated in RFC 8221. > > All of these algorithms are either explicitly marked MUST NOT, or they > are implicitly MUST NOTs by virtue of not being included in IETF's > list of protocols at all despite having assignments from IANA. > > Specifically, this adds warnings for the following ciphers: > - des-cbc > - blowfish-cbc > - cast128-cbc > - des-deriv > - des-32iv > - camellia-cbc > > Warnings for the following authentication algorithms are also added: > - hmac-md5 > - keyed-md5 > - keyed-sha1 > - hmac-ripemd160 > > Reviewed by: cem, gnn > MFC after: 3 days > Sponsored by: Chelsio Communications > Differential Revision: https://reviews.freebsd.org/D20340 The quick turnaround time is so that these warnings can be MFC'd. I will wait a while to see how that fairs before pulling the plug on removing actual functionality in head. -- John Baldwin From owner-svn-src-head@freebsd.org Thu May 23 22:31:57 2019 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 2415C15B8038; Thu, 23 May 2019 22:31:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C05BE8D5A8; Thu, 23 May 2019 22:31:56 +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 A0019B93F; Thu, 23 May 2019 22:31:56 +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 x4NMVue4098830; Thu, 23 May 2019 22:31:56 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NMVuM1098826; Thu, 23 May 2019 22:31:56 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201905232231.x4NMVuM1098826@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 23 May 2019 22:31:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348206 - in head: lib/geom/eli sys/geom/eli X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head: lib/geom/eli sys/geom/eli X-SVN-Commit-Revision: 348206 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C05BE8D5A8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 22:31:57 -0000 Author: jhb Date: Thu May 23 22:31:55 2019 New Revision: 348206 URL: https://svnweb.freebsd.org/changeset/base/348206 Log: Add deprecation warnings for weaker algorithms to geli(4). - Triple DES has been formally deprecated in Kerberos (RFC 8429) and is soon to be deprecated in IPsec (RFC 8221). - Blowfish is deprecated. FreeBSD doesn't support its successor (Twofish). - MD5 is generally considered a weak digest that has known attacks. geli refuses to create new volumes using these algorithms via 'geli init'. It also warns when attaching to existing volumes or creating temporary volumes via 'geli onetime' . The plan is to fully remove support for these algorithms in FreeBSD 13. Note that none of these algorithms have ever been the default algorithm used by geli(8). Users would have had to explicitly select these algorithms when creating volumes in the past. Reviewed by: cem, delphij MFC after: 3 days Relnotes: yes Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D20344 Modified: head/lib/geom/eli/geli.8 head/lib/geom/eli/geom_eli.c head/sys/geom/eli/g_eli.c Modified: head/lib/geom/eli/geli.8 ============================================================================== --- head/lib/geom/eli/geli.8 Thu May 23 22:06:57 2019 (r348205) +++ head/lib/geom/eli/geli.8 Thu May 23 22:31:55 2019 (r348206) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 3, 2019 +.Dd May 23, 2019 .Dt GELI 8 .Os .Sh NAME @@ -901,6 +901,18 @@ specified in .El .Sh EXIT STATUS Exit status is 0 on success, and 1 if the command fails. +.Sh DEPRECATION NOTICE +Support for the +.Nm Blowfish-CBC +and +.Nm 3DES-CBC +cryptographic algorithms and +.Nm HMAC/MD5 +authentication algorithm will be removed in +.Fx 13.0 . +New volumes cannot be created using these algorithms. +Existing volumes should be migrated to a new volume that uses +non-deprecated algorithms. .Sh EXAMPLES Initialize a provider which is going to be encrypted with a passphrase and random data from a file on the user's pen drive. @@ -1134,7 +1146,7 @@ utility appeared in .Fx 6.0 . Support for the .Nm Camellia -block cipher is implemented by Yoshisato Yanagisawa in +block cipher was implemented by Yoshisato Yanagisawa in .Fx 7.0 . .Pp Highest Modified: head/lib/geom/eli/geom_eli.c ============================================================================== --- head/lib/geom/eli/geom_eli.c Thu May 23 22:06:57 2019 (r348205) +++ head/lib/geom/eli/geom_eli.c Thu May 23 22:31:55 2019 (r348206) @@ -805,6 +805,22 @@ eli_init(struct gctl_req *req) return; } } + if (md.md_flags & G_ELI_FLAG_AUTH) { + switch (md.md_aalgo) { + case CRYPTO_MD5_HMAC: + gctl_error(req, + "The %s authentication algorithm is deprecated.", + g_eli_algo2str(md.md_aalgo)); + return; + } + } + switch (md.md_ealgo) { + case CRYPTO_3DES_CBC: + case CRYPTO_BLF_CBC: + gctl_error(req, "The %s encryption algorithm is deprecated.", + g_eli_algo2str(md.md_aalgo)); + return; + } val = gctl_get_intmax(req, "keylen"); md.md_keylen = val; md.md_keylen = g_eli_keylen(md.md_ealgo, md.md_keylen); Modified: head/sys/geom/eli/g_eli.c ============================================================================== --- head/sys/geom/eli/g_eli.c Thu May 23 22:06:57 2019 (r348205) +++ head/sys/geom/eli/g_eli.c Thu May 23 22:31:55 2019 (r348206) @@ -960,8 +960,25 @@ g_eli_create(struct gctl_req *req, struct g_class *mp, G_ELI_DEBUG(0, "Device %s created.", pp->name); G_ELI_DEBUG(0, "Encryption: %s %u", g_eli_algo2str(sc->sc_ealgo), sc->sc_ekeylen); - if (sc->sc_flags & G_ELI_FLAG_AUTH) + switch (sc->sc_ealgo) { + case CRYPTO_3DES_CBC: + gone_in(13, + "support for GEOM_ELI volumes encrypted with 3des"); + break; + case CRYPTO_BLF_CBC: + gone_in(13, + "support for GEOM_ELI volumes encrypted with blowfish"); + break; + } + if (sc->sc_flags & G_ELI_FLAG_AUTH) { G_ELI_DEBUG(0, " Integrity: %s", g_eli_algo2str(sc->sc_aalgo)); + switch (sc->sc_aalgo) { + case CRYPTO_MD5_HMAC: + gone_in(13, + "support for GEOM_ELI volumes authenticated with hmac/md5"); + break; + } + } G_ELI_DEBUG(0, " Crypto: %s", sc->sc_crypto == G_ELI_CRYPTO_SW ? "software" : "hardware"); return (gp); From owner-svn-src-head@freebsd.org Thu May 23 22:49:04 2019 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 75E0015B85CF; Thu, 23 May 2019 22:49:04 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 18E748DC56; Thu, 23 May 2019 22:49:04 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E49C4BE01; Thu, 23 May 2019 22:49:03 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4NMn3Kc008276; Thu, 23 May 2019 22:49:03 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NMn3Zp008275; Thu, 23 May 2019 22:49:03 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201905232249.x4NMn3Zp008275@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 23 May 2019 22:49:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348207 - head/stand/common X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: head/stand/common X-SVN-Commit-Revision: 348207 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 18E748DC56 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 22:49:04 -0000 Author: jkim Date: Thu May 23 22:49:03 2019 New Revision: 348207 URL: https://svnweb.freebsd.org/changeset/base/348207 Log: Initialize a variable to fix build with GCC. Modified: head/stand/common/module.c Modified: head/stand/common/module.c ============================================================================== --- head/stand/common/module.c Thu May 23 22:31:55 2019 (r348206) +++ head/stand/common/module.c Thu May 23 22:49:03 2019 (r348207) @@ -440,7 +440,7 @@ pnpautoload_simplebus(void) { const char *pnpstring; const char *compatstr; char *pnpinfo = NULL; - char *module; + char *module = NULL; int tag = 0, len, pnplen; int error; From owner-svn-src-head@freebsd.org Thu May 23 23:37:12 2019 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 AEF0015B92B1; Thu, 23 May 2019 23:37:12 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4EDFF8F6AB; Thu, 23 May 2019 23:37:12 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 28CFBC656; Thu, 23 May 2019 23:37:12 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4NNbC7u035098; Thu, 23 May 2019 23:37:12 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4NNbBQ5035096; Thu, 23 May 2019 23:37:11 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201905232337.x4NNbBQ5035096@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 23 May 2019 23:37:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348210 - in head/sys: amd64/amd64 x86/include X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/sys: amd64/amd64 x86/include X-SVN-Commit-Revision: 348210 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4EDFF8F6AB X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 23:37:13 -0000 Author: jhb Date: Thu May 23 23:37:11 2019 New Revision: 348210 URL: https://svnweb.freebsd.org/changeset/base/348210 Log: Add a constant for the LS config MSR on AMD CPUs. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D19506 Modified: head/sys/amd64/amd64/initcpu.c head/sys/x86/include/specialreg.h Modified: head/sys/amd64/amd64/initcpu.c ============================================================================== --- head/sys/amd64/amd64/initcpu.c Thu May 23 23:06:26 2019 (r348209) +++ head/sys/amd64/amd64/initcpu.c Thu May 23 23:37:11 2019 (r348210) @@ -124,9 +124,9 @@ init_amd(void) */ if (CPUID_TO_FAMILY(cpu_id) == 0x16 && CPUID_TO_MODEL(cpu_id) <= 0xf) { if ((cpu_feature2 & CPUID2_HV) == 0) { - msr = rdmsr(0xc0011020); + msr = rdmsr(MSR_LS_CFG); msr |= (uint64_t)1 << 15; - wrmsr(0xc0011020, msr); + wrmsr(MSR_LS_CFG, msr); } } @@ -139,9 +139,9 @@ init_amd(void) wrmsr(0xc0011029, msr); /* 1033 */ - msr = rdmsr(0xc0011020); + msr = rdmsr(MSR_LS_CFG); msr |= 0x10; - wrmsr(0xc0011020, msr); + wrmsr(MSR_LS_CFG, msr); /* 1049 */ msr = rdmsr(0xc0011028); @@ -149,9 +149,9 @@ init_amd(void) wrmsr(0xc0011028, msr); /* 1095 */ - msr = rdmsr(0xc0011020); + msr = rdmsr(MSR_LS_CFG); msr |= 0x200000000000000; - wrmsr(0xc0011020, msr); + wrmsr(MSR_LS_CFG, msr); } /* Modified: head/sys/x86/include/specialreg.h ============================================================================== --- head/sys/x86/include/specialreg.h Thu May 23 23:06:26 2019 (r348209) +++ head/sys/x86/include/specialreg.h Thu May 23 23:37:11 2019 (r348210) @@ -1098,6 +1098,7 @@ #define MSR_VM_HSAVE_PA 0xc0010117 /* SVM: host save area address */ #define MSR_AMD_CPUID07 0xc0011002 /* CPUID 07 %ebx override */ #define MSR_EXTFEATURES 0xc0011005 /* Extended CPUID Features override */ +#define MSR_LS_CFG 0xc0011020 #define MSR_IC_CFG 0xc0011021 /* Instruction Cache Configuration */ /* MSR_VM_CR related */ From owner-svn-src-head@freebsd.org Fri May 24 00:34:14 2019 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 96F2C158FBB5; Fri, 24 May 2019 00:34:14 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3DC936B24A; Fri, 24 May 2019 00:34:14 +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 1A787D129; Fri, 24 May 2019 00:34:14 +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 x4O0YDai067415; Fri, 24 May 2019 00:34:13 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4O0YD5B067410; Fri, 24 May 2019 00:34:13 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201905240034.x4O0YD5B067410@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 24 May 2019 00:34:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348212 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 348212 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3DC936B24A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 00:34:14 -0000 Author: jhb Date: Fri May 24 00:34:13 2019 New Revision: 348212 URL: https://svnweb.freebsd.org/changeset/base/348212 Log: Add support for writing to guest memory in the debug server. - Add a write_mem counterpart to read_mem to handle writes to MMIO. - Add support for the GDB 'M' packet to write bytes to the guest's memory. For MMIO writes, attempt to batch writes up into words. This is imprecise, but if you write a single 2 or 4-byte aligned word, it should be treated as a single MMIO write operation. - While here, tidy up the parsing of the 'm' command used for reading memory to match 'M'. Reviewed by: markj, Scott Phillips MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D20307 Modified: head/usr.sbin/bhyve/gdb.c head/usr.sbin/bhyve/mem.c head/usr.sbin/bhyve/mem.h Modified: head/usr.sbin/bhyve/gdb.c ============================================================================== --- head/usr.sbin/bhyve/gdb.c Fri May 24 00:00:29 2019 (r348211) +++ head/usr.sbin/bhyve/gdb.c Fri May 24 00:34:13 2019 (r348212) @@ -767,15 +767,24 @@ gdb_read_mem(const uint8_t *data, size_t len) bool started; int error; + /* Skip 'm' */ + data += 1; + len -= 1; + + /* Parse and consume address. */ cp = memchr(data, ',', len); - if (cp == NULL) { + if (cp == NULL || cp == data) { send_error(EINVAL); return; } - gva = parse_integer(data + 1, cp - (data + 1)); - resid = parse_integer(cp + 1, len - (cp + 1 - data)); - started = false; + gva = parse_integer(data, cp - data); + len -= (cp - data) + 1; + data += (cp - data) + 1; + /* Parse length. */ + resid = parse_integer(data, len); + + started = false; while (resid > 0) { error = guest_vaddr2paddr(cur_vcpu, gva, &gpa); if (error == -1) { @@ -861,6 +870,119 @@ gdb_read_mem(const uint8_t *data, size_t len) finish_packet(); } +static void +gdb_write_mem(const uint8_t *data, size_t len) +{ + uint64_t gpa, gva, val; + uint8_t *cp; + size_t resid, todo, bytes; + int error; + + /* Skip 'M' */ + data += 1; + len -= 1; + + /* Parse and consume address. */ + cp = memchr(data, ',', len); + if (cp == NULL || cp == data) { + send_error(EINVAL); + return; + } + gva = parse_integer(data, cp - data); + len -= (cp - data) + 1; + data += (cp - data) + 1; + + /* Parse and consume length. */ + cp = memchr(data, ':', len); + if (cp == NULL || cp == data) { + send_error(EINVAL); + return; + } + resid = parse_integer(data, cp - data); + len -= (cp - data) + 1; + data += (cp - data) + 1; + + /* Verify the available bytes match the length. */ + if (len != resid * 2) { + send_error(EINVAL); + return; + } + + while (resid > 0) { + error = guest_vaddr2paddr(cur_vcpu, gva, &gpa); + if (error == -1) { + send_error(errno); + return; + } + if (error == 0) { + send_error(EFAULT); + return; + } + + /* Write bytes to current page. */ + todo = getpagesize() - gpa % getpagesize(); + if (todo > resid) + todo = resid; + + cp = paddr_guest2host(ctx, gpa, todo); + if (cp != NULL) { + /* + * If this page is guest RAM, write it a byte + * at a time. + */ + while (todo > 0) { + assert(len >= 2); + *cp = parse_byte(data); + data += 2; + len -= 2; + cp++; + gpa++; + gva++; + resid--; + todo--; + } + } else { + /* + * If this page isn't guest RAM, try to handle + * it via MMIO. For MMIO requests, use + * aligned writes of words when possible. + */ + while (todo > 0) { + if (gpa & 1 || todo == 1) { + bytes = 1; + val = parse_byte(data); + } else if (gpa & 2 || todo == 2) { + bytes = 2; + val = parse_byte(data) | + (parse_byte(data + 2) << 8); + } else { + bytes = 4; + val = parse_byte(data) | + (parse_byte(data + 2) << 8) | + (parse_byte(data + 4) << 16) | + (parse_byte(data + 6) << 24); + } + error = write_mem(ctx, cur_vcpu, gpa, val, + bytes); + if (error == 0) { + gpa += bytes; + gva += bytes; + resid -= bytes; + todo -= bytes; + data += 2 * bytes; + len -= 2 * bytes; + } else { + send_error(EFAULT); + return; + } + } + } + assert(resid == 0 || gpa % getpagesize() == 0); + } + assert(len == 0); + send_ok(); +} + static bool command_equals(const uint8_t *data, size_t len, const char *cmd) { @@ -1000,6 +1122,9 @@ handle_command(const uint8_t *data, size_t len) case 'm': gdb_read_mem(data, len); break; + case 'M': + gdb_write_mem(data, len); + break; case 'T': { int tid; @@ -1035,7 +1160,6 @@ handle_command(const uint8_t *data, size_t len) finish_packet(); break; case 'G': /* TODO */ - case 'M': /* TODO */ case 'v': /* Handle 'vCont' */ /* 'vCtrlC' */ Modified: head/usr.sbin/bhyve/mem.c ============================================================================== --- head/usr.sbin/bhyve/mem.c Fri May 24 00:00:29 2019 (r348211) +++ head/usr.sbin/bhyve/mem.c Fri May 24 00:34:13 2019 (r348212) @@ -251,30 +251,43 @@ emulate_mem(struct vmctx *ctx, int vcpu, uint64_t padd return (access_memory(ctx, vcpu, paddr, emulate_mem_cb, &ema)); } -struct read_mem_args { - uint64_t *rval; +struct rw_mem_args { + uint64_t *val; int size; + int operation; }; static int -read_mem_cb(struct vmctx *ctx, int vcpu, uint64_t paddr, struct mem_range *mr, +rw_mem_cb(struct vmctx *ctx, int vcpu, uint64_t paddr, struct mem_range *mr, void *arg) { - struct read_mem_args *rma; + struct rw_mem_args *rma; rma = arg; - return (mr->handler(ctx, vcpu, MEM_F_READ, paddr, rma->size, - rma->rval, mr->arg1, mr->arg2)); + return (mr->handler(ctx, vcpu, rma->operation, paddr, rma->size, + rma->val, mr->arg1, mr->arg2)); } int read_mem(struct vmctx *ctx, int vcpu, uint64_t gpa, uint64_t *rval, int size) { - struct read_mem_args rma; + struct rw_mem_args rma; - rma.rval = rval; + rma.val = rval; rma.size = size; - return (access_memory(ctx, vcpu, gpa, read_mem_cb, &rma)); + rma.operation = MEM_F_READ; + return (access_memory(ctx, vcpu, gpa, rw_mem_cb, &rma)); +} + +int +write_mem(struct vmctx *ctx, int vcpu, uint64_t gpa, uint64_t wval, int size) +{ + struct rw_mem_args rma; + + rma.val = &wval; + rma.size = size; + rma.operation = MEM_F_WRITE; + return (access_memory(ctx, vcpu, gpa, rw_mem_cb, &rma)); } static int Modified: head/usr.sbin/bhyve/mem.h ============================================================================== --- head/usr.sbin/bhyve/mem.h Fri May 24 00:00:29 2019 (r348211) +++ head/usr.sbin/bhyve/mem.h Fri May 24 00:34:13 2019 (r348212) @@ -61,5 +61,7 @@ int read_mem(struct vmctx *ctx, int vcpu, uint64_t gpa int register_mem(struct mem_range *memp); int register_mem_fallback(struct mem_range *memp); int unregister_mem(struct mem_range *memp); +int write_mem(struct vmctx *ctx, int vcpu, uint64_t gpa, uint64_t wval, + int size); #endif /* _MEM_H_ */ From owner-svn-src-head@freebsd.org Fri May 24 00:51:31 2019 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 859171591324; Fri, 24 May 2019 00:51:31 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DAD946BB47; Fri, 24 May 2019 00:51:30 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x4O0pS8s093117; Thu, 23 May 2019 17:51:28 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x4O0pSI3093116; Thu, 23 May 2019 17:51:28 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201905240051.x4O0pSI3093116@gndrsh.dnsmgr.net> Subject: Re: svn commit: r348205 - head/sys/netipsec In-Reply-To: <201905232206.x4NM6vQt085245@repo.freebsd.org> To: John Baldwin Date: Thu, 23 May 2019 17:51:28 -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-Rspamd-Queue-Id: DAD946BB47 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 00:51:31 -0000 > Author: jhb > Date: Thu May 23 22:06:57 2019 > New Revision: 348205 > URL: https://svnweb.freebsd.org/changeset/base/348205 > > Log: > Add deprecation warnings for IPsec algorithms deprecated in RFC 8221. > > All of these algorithms are either explicitly marked MUST NOT, or they > are implicitly MUST NOTs by virtue of not being included in IETF's > list of protocols at all despite having assignments from IANA. Can you provide me these specific ones and I'll investigate the Ietf datatracker and IANA documents and see if I can get the long story. Ie what IANA assignments are you refering to that do not appear in RFC, it may simply be the case there is a final RFC that says "new foo are assigned numbers by IANA and no RFC is needed" That is how port numbers and other such things just are, there is not a RFC for everything! > Specifically, this adds warnings for the following ciphers: > - des-cbc > - blowfish-cbc > - cast128-cbc > - des-deriv > - des-32iv > - camellia-cbc > > Warnings for the following authentication algorithms are also added: > - hmac-md5 > - keyed-md5 > - keyed-sha1 > - hmac-ripemd160 > > Reviewed by: cem, gnn > MFC after: 3 days > Sponsored by: Chelsio Communications > Differential Revision: https://reviews.freebsd.org/D20340 > > Modified: > head/sys/netipsec/xform_ah.c > head/sys/netipsec/xform_esp.c > > Modified: head/sys/netipsec/xform_ah.c > ============================================================================== > --- head/sys/netipsec/xform_ah.c Thu May 23 22:01:05 2019 (r348204) > +++ head/sys/netipsec/xform_ah.c Thu May 23 22:06:57 2019 (r348205) > @@ -108,6 +108,8 @@ SYSCTL_VNET_PCPUSTAT(_net_inet_ah, IPSECCTL_STATS, sta > #endif > > static unsigned char ipseczeroes[256]; /* larger than an ip6 extension hdr */ > +static struct timeval md5warn, ripewarn, kpdkmd5warn, kpdksha1warn; > +static struct timeval warninterval = { .tv_sec = 1, .tv_usec = 0 }; > > static int ah_input_cb(struct cryptop*); > static int ah_output_cb(struct cryptop*); > @@ -184,6 +186,26 @@ ah_init0(struct secasvar *sav, struct xformsw *xsp, st > __func__, sav->alg_auth)); > return EINVAL; > } > + > + switch (sav->alg_auth) { > + case SADB_AALG_MD5HMAC: > + if (ratecheck(&md5warn, &warninterval)) > + gone_in(13, "MD5-HMAC authenticator for IPsec"); > + break; > + case SADB_X_AALG_RIPEMD160HMAC: > + if (ratecheck(&ripewarn, &warninterval)) > + gone_in(13, "RIPEMD160-HMAC authenticator for IPsec"); > + break; > + case SADB_X_AALG_MD5: > + if (ratecheck(&kpdkmd5warn, &warninterval)) > + gone_in(13, "Keyed-MD5 authenticator for IPsec"); > + break; > + case SADB_X_AALG_SHA: > + if (ratecheck(&kpdksha1warn, &warninterval)) > + gone_in(13, "Keyed-SHA1 authenticator for IPsec"); > + break; > + } > + > /* > * Verify the replay state block allocation is consistent with > * the protocol type. We check here so we can make assumptions > > Modified: head/sys/netipsec/xform_esp.c > ============================================================================== > --- head/sys/netipsec/xform_esp.c Thu May 23 22:01:05 2019 (r348204) > +++ head/sys/netipsec/xform_esp.c Thu May 23 22:06:57 2019 (r348205) > @@ -94,6 +94,9 @@ SYSCTL_VNET_PCPUSTAT(_net_inet_esp, IPSECCTL_STATS, st > struct espstat, espstat, > "ESP statistics (struct espstat, netipsec/esp_var.h"); > > +static struct timeval deswarn, blfwarn, castwarn, camelliawarn; > +static struct timeval warninterval = { .tv_sec = 1, .tv_usec = 0 }; > + > static int esp_input_cb(struct cryptop *op); > static int esp_output_cb(struct cryptop *crp); > > @@ -156,6 +159,26 @@ esp_init(struct secasvar *sav, struct xformsw *xsp) > __func__)); > return EINVAL; > } > + > + switch (sav->alg_enc) { > + case SADB_EALG_DESCBC: > + if (ratecheck(&deswarn, &warninterval)) > + gone_in(13, "DES cipher for IPsec"); > + break; > + case SADB_X_EALG_BLOWFISHCBC: > + if (ratecheck(&blfwarn, &warninterval)) > + gone_in(13, "Blowfish cipher for IPsec"); > + break; > + case SADB_X_EALG_CAST128CBC: > + if (ratecheck(&castwarn, &warninterval)) > + gone_in(13, "CAST cipher for IPsec"); > + break; > + case SADB_X_EALG_CAMELLIACBC: > + if (ratecheck(&camelliawarn, &warninterval)) > + gone_in(13, "Camellia cipher for IPsec"); > + break; > + } > + > /* subtract off the salt, RFC4106, 8.1 and RFC3686, 5.1 */ > keylen = _KEYLEN(sav->key_enc) - SAV_ISCTRORGCM(sav) * 4; > if (txform->minkey > keylen || keylen > txform->maxkey) { > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Fri May 24 00:53:18 2019 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 4B3521591573; Fri, 24 May 2019 00:53:18 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BEE586BD7E; Fri, 24 May 2019 00:53:17 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x4O0rF3W093134; Thu, 23 May 2019 17:53:15 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x4O0rFxp093133; Thu, 23 May 2019 17:53:15 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201905240053.x4O0rFxp093133@gndrsh.dnsmgr.net> Subject: Re: svn commit: r348205 - head/sys/netipsec In-Reply-To: <7e3ef228-f9a7-5bd5-1826-5408eb368a71@FreeBSD.org> To: John Baldwin Date: Thu, 23 May 2019 17:53:15 -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-Rspamd-Queue-Id: BEE586BD7E X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.975,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 00:53:18 -0000 > On 5/23/19 3:06 PM, John Baldwin wrote: > > Author: jhb > > Date: Thu May 23 22:06:57 2019 > > New Revision: 348205 > > URL: https://svnweb.freebsd.org/changeset/base/348205 > > > > Log: > > Add deprecation warnings for IPsec algorithms deprecated in RFC 8221. > > > > All of these algorithms are either explicitly marked MUST NOT, or they > > are implicitly MUST NOTs by virtue of not being included in IETF's > > list of protocols at all despite having assignments from IANA. > > > > Specifically, this adds warnings for the following ciphers: > > - des-cbc > > - blowfish-cbc > > - cast128-cbc > > - des-deriv > > - des-32iv > > - camellia-cbc > > > > Warnings for the following authentication algorithms are also added: > > - hmac-md5 > > - keyed-md5 > > - keyed-sha1 > > - hmac-ripemd160 > > > > Reviewed by: cem, gnn > > MFC after: 3 days > > Sponsored by: Chelsio Communications > > Differential Revision: https://reviews.freebsd.org/D20340 > > The quick turnaround time is so that these warnings can be MFC'd. I will wait a > while to see how that fairs before pulling the plug on removing actual functionality > in head. Are you targeting this at 11.3, which if your not I would encourage you to do as the earlier on this type stuff the better. > John Baldwin -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Fri May 24 01:13:02 2019 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 D5BD11591DDE; Fri, 24 May 2019 01:13:01 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6B7766C730; Fri, 24 May 2019 01:13:01 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-3.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 7E1BD1E90; Fri, 24 May 2019 01:13:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r348205 - head/sys/netipsec To: rgrimes@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201905240051.x4O0pSI3093116@gndrsh.dnsmgr.net> From: John Baldwin Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <2ccc4dd0-19d4-981e-82cb-c6fcab355eda@FreeBSD.org> Date: Thu, 23 May 2019 18:12:59 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <201905240051.x4O0pSI3093116@gndrsh.dnsmgr.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6B7766C730 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.96)[-0.965,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 01:13:02 -0000 On 5/23/19 5:51 PM, Rodney W. Grimes wrote: >> Author: jhb >> Date: Thu May 23 22:06:57 2019 >> New Revision: 348205 >> URL: https://svnweb.freebsd.org/changeset/base/348205 >> >> Log: >> Add deprecation warnings for IPsec algorithms deprecated in RFC 8221. >> >> All of these algorithms are either explicitly marked MUST NOT, or they >> are implicitly MUST NOTs by virtue of not being included in IETF's >> list of protocols at all despite having assignments from IANA. > > Can you provide me these specific ones and I'll investigate > the Ietf datatracker and IANA documents and see if I can > get the long story. Ie what IANA assignments are you refering > to that do not appear in RFC, it may simply be the case there > is a final RFC that says "new foo are assigned numbers by IANA > and no RFC is needed" That is how port numbers and other > such things just are, there is not a RFC for everything! I suggest you start by reading RFC 8221 to get an understanding for why the commit log uses the language it does. >> Specifically, this adds warnings for the following ciphers: >> - des-cbc >> - blowfish-cbc >> - cast128-cbc >> - des-deriv >> - des-32iv >> - camellia-cbc The RFC explicitly lists all DES variants and blowfish as MUST NOT in the table in section 5. As far as I can tell, the draft document for CAST expired in 1997: https://tools.ietf.org/html/draft-ietf-ipsec-esp-cast-128-cbc-00 As noted in the review comments, Camellia is the only one of these ciphers that might be worth retaining if there are actual users. It is in theory comparable to AES, but it is not widely used. In addition, whereas with AES we support AEAD modes such as AES-GCM and AES-CCM (though we do not currently support AES-CCM with IPsec), for Camellia we only support CBC. I believe there are specs for CCM and GCM modes for Camellia but no one has implemented them. In terms of algorithm diversity, it would be better to expend effort on supporting chacha20 + poly1035-hmac (as RFC 8221 suggests since these are now a SHOULD) rather than Camellia. >> Warnings for the following authentication algorithms are also added: >> - hmac-md5 >> - keyed-md5 >> - keyed-sha1 >> - hmac-ripemd160 hmac-md5 and keyed-md5 are both MUST NOT in 8221. The Internet (google) doesn't seem to think that keyed-sha1 even exists, so I wonder if it's a local invention in FreeBSD. sha1 is MUST- in 8221 so we probably should be removing it soon, but this change does not do that. ripemd160 is a more obscure hash that is more like sha1 than the sha2 variants. RFC 6071 states that you can't use ripemd with IKE due to no IANA number which would seem to preclude its use in any "real" deployments (and 6071 is already 8 years old). -- John Baldwin From owner-svn-src-head@freebsd.org Fri May 24 01:13:38 2019 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 786431591E3D; Fri, 24 May 2019 01:13:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 17FFE6C864; Fri, 24 May 2019 01:13:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-3.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 701EA1E91; Fri, 24 May 2019 01:13:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r348205 - head/sys/netipsec To: rgrimes@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201905240053.x4O0rFxp093133@gndrsh.dnsmgr.net> From: John Baldwin Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <72b76588-8983-9274-1e49-38ef1d809ac8@FreeBSD.org> Date: Thu, 23 May 2019 18:13:36 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <201905240053.x4O0rFxp093133@gndrsh.dnsmgr.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 17FFE6C864 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.96)[-0.965,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 01:13:38 -0000 On 5/23/19 5:53 PM, Rodney W. Grimes wrote: >> On 5/23/19 3:06 PM, John Baldwin wrote: >>> Author: jhb >>> Date: Thu May 23 22:06:57 2019 >>> New Revision: 348205 >>> URL: https://svnweb.freebsd.org/changeset/base/348205 >>> >>> Log: >>> Add deprecation warnings for IPsec algorithms deprecated in RFC 8221. >>> >>> All of these algorithms are either explicitly marked MUST NOT, or they >>> are implicitly MUST NOTs by virtue of not being included in IETF's >>> list of protocols at all despite having assignments from IANA. >>> >>> Specifically, this adds warnings for the following ciphers: >>> - des-cbc >>> - blowfish-cbc >>> - cast128-cbc >>> - des-deriv >>> - des-32iv >>> - camellia-cbc >>> >>> Warnings for the following authentication algorithms are also added: >>> - hmac-md5 >>> - keyed-md5 >>> - keyed-sha1 >>> - hmac-ripemd160 >>> >>> Reviewed by: cem, gnn >>> MFC after: 3 days >>> Sponsored by: Chelsio Communications >>> Differential Revision: https://reviews.freebsd.org/D20340 >> >> The quick turnaround time is so that these warnings can be MFC'd. I will wait a >> while to see how that fairs before pulling the plug on removing actual functionality >> in head. > > Are you targeting this at 11.3, which if your not I would encourage you > to do as the earlier on this type stuff the better. Yes, the 3 days for both this and geli is purely for the sake of 11.3. -- John Baldwin From owner-svn-src-head@freebsd.org Fri May 24 01:28:08 2019 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 2CD9E15922C1; Fri, 24 May 2019 01:28:08 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BE48C6CDE7; Fri, 24 May 2019 01:28:07 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8AC06D9AA; Fri, 24 May 2019 01:28:07 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4O1S7Fv093660; Fri, 24 May 2019 01:28:07 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4O1S77N093659; Fri, 24 May 2019 01:28:07 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201905240128.x4O1S77N093659@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 24 May 2019 01:28:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348215 - head/lib/libjail X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/lib/libjail X-SVN-Commit-Revision: 348215 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BE48C6CDE7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.96)[-0.957,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 01:28:08 -0000 Author: kevans Date: Fri May 24 01:28:07 2019 New Revision: 348215 URL: https://svnweb.freebsd.org/changeset/base/348215 Log: jail_getid(3): validate jid string input Currently, if jail_getid(3) is passed in a numeric string, it assumes that this is a jid string and passes it back converted to an int without checking that it's a valid/existing jid. This breaks consumers that might use jail_getid(3) to see if it can trivially grab a jid from a name if that name happens to be numeric but not actually the name/jid of the jail. Instead of returning -1 for the jail not existing, it'll return the int version of the input and the consumer will not fallback to trying other methods. Pass the numeric input to jail_get(2) as the jid for validation, rather than the name. This works well- the kernel enforces that jid=name if name is numeric, so doing the safe thing and checking numeric input as a jid will still DTRT based on the description of jail_getid. Reported by: Wes Maag Reviewed by: jamie, Wes Maag MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D20388 Modified: head/lib/libjail/jail_getid.c Modified: head/lib/libjail/jail_getid.c ============================================================================== --- head/lib/libjail/jail_getid.c Fri May 24 00:56:50 2019 (r348214) +++ head/lib/libjail/jail_getid.c Fri May 24 01:28:07 2019 (r348215) @@ -53,13 +53,18 @@ jail_getid(const char *name) struct iovec jiov[4]; jid = strtoul(name, &ep, 10); - if (*name && !*ep) - return jid; - jiov[0].iov_base = __DECONST(char *, "name"); - jiov[0].iov_len = sizeof("name"); - jiov[1].iov_len = strlen(name) + 1; - jiov[1].iov_base = alloca(jiov[1].iov_len); - strcpy(jiov[1].iov_base, name); + if (*name && !*ep) { + jiov[0].iov_base = __DECONST(char *, "jid"); + jiov[0].iov_len = sizeof("jid"); + jiov[1].iov_base = &jid; + jiov[1].iov_len = sizeof(jid); + } else { + jiov[0].iov_base = __DECONST(char *, "name"); + jiov[0].iov_len = sizeof("name"); + jiov[1].iov_len = strlen(name) + 1; + jiov[1].iov_base = alloca(jiov[1].iov_len); + strcpy(jiov[1].iov_base, name); + } jiov[2].iov_base = __DECONST(char *, "errmsg"); jiov[2].iov_len = sizeof("errmsg"); jiov[3].iov_base = jail_errmsg; From owner-svn-src-head@freebsd.org Fri May 24 01:34:42 2019 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 683921592591; Fri, 24 May 2019 01:34:42 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 951B36D278; Fri, 24 May 2019 01:34:32 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x4O1YUl5093318; Thu, 23 May 2019 18:34:30 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x4O1YUbA093317; Thu, 23 May 2019 18:34:30 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201905240134.x4O1YUbA093317@gndrsh.dnsmgr.net> Subject: Re: svn commit: r348205 - head/sys/netipsec In-Reply-To: <2ccc4dd0-19d4-981e-82cb-c6fcab355eda@FreeBSD.org> To: John Baldwin Date: Thu, 23 May 2019 18:34:30 -0700 (PDT) CC: rgrimes@FreeBSD.org, src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Reply-To: rgrimes@FreeBSD.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 951B36D278 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 01:34:42 -0000 > On 5/23/19 5:51 PM, Rodney W. Grimes wrote: > >> Author: jhb > >> Date: Thu May 23 22:06:57 2019 > >> New Revision: 348205 > >> URL: https://svnweb.freebsd.org/changeset/base/348205 > >> > >> Log: > >> Add deprecation warnings for IPsec algorithms deprecated in RFC 8221. > >> > >> All of these algorithms are either explicitly marked MUST NOT, or they > >> are implicitly MUST NOTs by virtue of not being included in IETF's > >> list of protocols at all despite having assignments from IANA. > > > > Can you provide me these specific ones and I'll investigate > > the Ietf datatracker and IANA documents and see if I can > > get the long story. Ie what IANA assignments are you refering > > to that do not appear in RFC, it may simply be the case there > > is a final RFC that says "new foo are assigned numbers by IANA > > and no RFC is needed" That is how port numbers and other > > such things just are, there is not a RFC for everything! > > I suggest you start by reading RFC 8221 to get an understanding for > why the commit log uses the language it does. I understand the language, I want to know which IANA assigned numbers entries are at issue here without having to recreate that list from your commit and RFC 8221. I have 0 issue with the deprecation as it stands, and am wanting to see why this issue in the Ietf/IANA documentation exists. > >> Specifically, this adds warnings for the following ciphers: > >> - des-cbc > >> - blowfish-cbc > >> - cast128-cbc > >> - des-deriv > >> - des-32iv > >> - camellia-cbc > > The RFC explicitly lists all DES variants and blowfish as MUST NOT in > the table in section 5. As far as I can tell, the draft document for > CAST expired in 1997: > > https://tools.ietf.org/html/draft-ietf-ipsec-esp-cast-128-cbc-00 Well at least 00 expired, the problem here is that this is attempting to track things in the wrong direction, and it may of totally changed name shapes so is hard to find in the data tracker. I did confirm that this document pretty much died at submission. > As noted in the review comments, Camellia is the only one of these > ciphers that might be worth retaining if there are actual users. > It is in theory comparable to AES, but it is not widely used. > In addition, whereas with AES we support AEAD modes such as AES-GCM > and AES-CCM (though we do not currently support AES-CCM with IPsec), > for Camellia we only support CBC. I believe there are specs for > CCM and GCM modes for Camellia but no one has implemented them. > In terms of algorithm diversity, it would be better to expend > effort on supporting chacha20 + poly1035-hmac (as RFC 8221 suggests > since these are now a SHOULD) rather than Camellia. > > >> Warnings for the following authentication algorithms are also added: > >> - hmac-md5 > >> - keyed-md5 > >> - keyed-sha1 > >> - hmac-ripemd160 > > hmac-md5 and keyed-md5 are both MUST NOT in 8221. The Internet (google) > doesn't seem to think that keyed-sha1 even exists, so I wonder if it's > a local invention in FreeBSD. sha1 is MUST- in 8221 so we probably > should be removing it soon, but this change does not do that. > ripemd160 is a more obscure hash that is more like sha1 than the sha2 > variants. RFC 6071 states that you can't use ripemd with IKE due to no > IANA number which would seem to preclude its use in any "real" > deployments (and 6071 is already 8 years old). I did not need that info, just a list of IANA assigned numbers of things you can not find in RFC/Ietf documents. I'll do the leg work from the other side and if Ietf/Iana documents need fixed I'll get that in process. > -- > John Baldwin -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Fri May 24 01:43:30 2019 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 06939159293C; Fri, 24 May 2019 01:43:30 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 96C636D70B; Fri, 24 May 2019 01:43:29 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 84B9BDD0A; Fri, 24 May 2019 01:43:29 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4O1hTn7003856; Fri, 24 May 2019 01:43:29 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4O1hTu6003855; Fri, 24 May 2019 01:43:29 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201905240143.x4O1hTu6003855@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 24 May 2019 01:43:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348216 - head/sys/dev/aac X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/aac X-SVN-Commit-Revision: 348216 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 96C636D70B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.96)[-0.957,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 01:43:30 -0000 Author: imp Date: Fri May 24 01:43:29 2019 New Revision: 348216 URL: https://svnweb.freebsd.org/changeset/base/348216 Log: Make uniqueifier match the module definition. Modified: head/sys/dev/aac/aac_pci.c Modified: head/sys/dev/aac/aac_pci.c ============================================================================== --- head/sys/dev/aac/aac_pci.c Fri May 24 01:28:07 2019 (r348215) +++ head/sys/dev/aac/aac_pci.c Fri May 24 01:43:29 2019 (r348216) @@ -494,7 +494,7 @@ static driver_t aacch_driver = { static devclass_t aacch_devclass; DRIVER_MODULE(aacch, pci, aacch_driver, aacch_devclass, NULL, NULL); -MODULE_PNP_INFO("U16:vendor;U16:device;", pci, aac, +MODULE_PNP_INFO("U16:vendor;U16:device;", pci, aacch, aac_identifiers, nitems(aac_identifiers) - 1); static int From owner-svn-src-head@freebsd.org Fri May 24 01:43:40 2019 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 B7C3215929A1; Fri, 24 May 2019 01:43:40 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CF4AB6D7EB; Fri, 24 May 2019 01:43:39 +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 415FFDD0D; Fri, 24 May 2019 01:43:36 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4O1haUl003913; Fri, 24 May 2019 01:43:36 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4O1hZ0J003912; Fri, 24 May 2019 01:43:35 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201905240143.x4O1hZ0J003912@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 24 May 2019 01:43:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348217 - in head/sys/mips: atheros/ar531x mips X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys/mips: atheros/ar531x mips X-SVN-Commit-Revision: 348217 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CF4AB6D7EB X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.96)[-0.957,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 01:43:40 -0000 Author: imp Date: Fri May 24 01:43:35 2019 New Revision: 348217 URL: https://svnweb.freebsd.org/changeset/base/348217 Log: Display CPU model in dmesg on mips targets Also, save the CPU model for atheros ar531x boards. Submitted by: Hiroki Mori Differential Revision: https://reviews.freebsd.org/D20371 Modified: head/sys/mips/atheros/ar531x/ar5315_machdep.c head/sys/mips/mips/machdep.c Modified: head/sys/mips/atheros/ar531x/ar5315_machdep.c ============================================================================== --- head/sys/mips/atheros/ar531x/ar5315_machdep.c Fri May 24 01:43:29 2019 (r348216) +++ head/sys/mips/atheros/ar531x/ar5315_machdep.c Fri May 24 01:43:35 2019 (r348217) @@ -146,6 +146,8 @@ SYSCTL_STRING(_hw_device, OID_AUTO, revision, CTLFLAG_ "Board revision"); #endif +extern char cpu_model[]; + void platform_start(__register_t a0 __unused, __register_t a1 __unused, __register_t a2 __unused, __register_t a3 __unused) @@ -259,6 +261,8 @@ platform_start(__register_t a0 __unused, __register_t printf(" a1 = %08x\n", a1); printf(" a2 = %08x\n", a2); printf(" a3 = %08x\n", a3); + + strcpy(cpu_model, ar5315_get_system_type()); /* * XXX this code is very redboot specific. Modified: head/sys/mips/mips/machdep.c ============================================================================== --- head/sys/mips/mips/machdep.c Fri May 24 01:43:29 2019 (r348216) +++ head/sys/mips/mips/machdep.c Fri May 24 01:43:35 2019 (r348217) @@ -186,6 +186,8 @@ cpu_startup(void *dummy) if (boothowto & RB_VERBOSE) bootverbose++; + printf("CPU model: %s\n", cpu_model); + printf("real memory = %ju (%juK bytes)\n", ptoa((uintmax_t)realmem), ptoa((uintmax_t)realmem) / 1024); From owner-svn-src-head@freebsd.org Fri May 24 01:53:46 2019 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 073A31592F29; Fri, 24 May 2019 01:53:46 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9A06D6DF15; Fri, 24 May 2019 01:53:45 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 76C26DEB5; Fri, 24 May 2019 01:53:45 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4O1rjx7009417; Fri, 24 May 2019 01:53:45 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4O1rjxA009416; Fri, 24 May 2019 01:53:45 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201905240153.x4O1rjxA009416@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 24 May 2019 01:53:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348219 - head/sbin/bectl/tests X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sbin/bectl/tests X-SVN-Commit-Revision: 348219 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9A06D6DF15 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 01:53:46 -0000 Author: kevans Date: Fri May 24 01:53:45 2019 New Revision: 348219 URL: https://svnweb.freebsd.org/changeset/base/348219 Log: bectl(8): Add a test for jail/unjail of numeric BE names Fixed by r348215, bectl ujail first attempts the trivial fetch of a jid by passing the first argument to 'ujail' to jail_getid(3) in case a jid/name have been passed in instead of a BE name. For numerically named BEs, this was doing the wrong thing: instead of failing to locate the jid specified and falling back to mountpath search, jail_getid(3) would return the input as-is. While here, I've fixed bectl_jail_cleanup which still used a hard-coded pool name that was overlooked w.r.t. other work that was in-flight around the same time. MFC after: 3 days Modified: head/sbin/bectl/tests/bectl_test.sh Modified: head/sbin/bectl/tests/bectl_test.sh ============================================================================== --- head/sbin/bectl/tests/bectl_test.sh Fri May 24 01:51:58 2019 (r348218) +++ head/sbin/bectl/tests/bectl_test.sh Fri May 24 01:53:45 2019 (r348219) @@ -294,9 +294,16 @@ bectl_jail_body() atf_check cp /rescue/rescue ${root}/rescue/rescue atf_check bectl -r ${zpool}/ROOT umount default - # Prepare a second boot environment + # Prepare some more boot environments atf_check -o empty -s exit:0 bectl -r ${zpool}/ROOT create -e default target + atf_check -o empty -s exit:0 bectl -r ${zpool}/ROOT create -e default 1234 + # Attempt to unjail a BE with numeric name; jail_getid at one point + # did not validate that the input was a valid jid before returning the + # jid. + atf_check -o empty -s exit:0 bectl -r ${zpool}/ROOT jail -b 1234 + atf_check -o empty -s exit:0 bectl -r ${zpool}/ROOT unjail 1234 + # When a jail name is not explicit, it should match the jail id. atf_check -o empty -s exit:0 bectl -r ${zpool}/ROOT jail -b -o jid=233637 default atf_check -o inline:"233637\n" -s exit:0 -x "jls -j 233637 name" @@ -340,9 +347,10 @@ bectl_jail_body() # attempts to destroy the zpool. bectl_jail_cleanup() { - for bootenv in "default" "target"; do + zpool=$(get_zpool_name) + for bootenv in "default" "target" "1234"; do # mountpoint of the boot environment - mountpoint="$(bectl -r bectl_test/ROOT list -H | grep ${bootenv} | awk '{print $3}')" + mountpoint="$(bectl -r ${zpool}/ROOT list -H | grep ${bootenv} | awk '{print $3}')" # see if any jail paths match the boot environment mountpoint jailid="$(jls | grep ${mountpoint} | awk '{print $1}')" @@ -353,7 +361,7 @@ bectl_jail_cleanup() jail -r ${jailid} done; - bectl_cleanup $(get_zpool_name) + bectl_cleanup ${zpool} } atf_init_test_cases() From owner-svn-src-head@freebsd.org Fri May 24 02:44:17 2019 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 EC5791594414; Fri, 24 May 2019 02:44:16 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9183D6F925; Fri, 24 May 2019 02:44:16 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4AD85E796; Fri, 24 May 2019 02:44:16 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4O2iGsQ035559; Fri, 24 May 2019 02:44:16 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4O2iGqI035558; Fri, 24 May 2019 02:44:16 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201905240244.x4O2iGqI035558@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 24 May 2019 02:44:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348222 - head/sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/sys/opencrypto X-SVN-Commit-Revision: 348222 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9183D6F925 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 02:44:17 -0000 Author: delphij Date: Fri May 24 02:44:15 2019 New Revision: 348222 URL: https://svnweb.freebsd.org/changeset/base/348222 Log: cryptodeflate: Drop z_stream zbuf.state->dummy from SDT probe. For older versions of zlib, dummy was a workaround for compilers that do not handle opaque type definition well; on FreeBSD, it's representing a value that is not really useful for monitoring purposes, and the field would be gone in newer zlib versions. PR: 229763 Submitted by: Yoshihiro Ota Differential Revision: https://reviews.freebsd.org/D20222 Modified: head/sys/opencrypto/cryptodeflate.c Modified: head/sys/opencrypto/cryptodeflate.c ============================================================================== --- head/sys/opencrypto/cryptodeflate.c Fri May 24 02:10:51 2019 (r348221) +++ head/sys/opencrypto/cryptodeflate.c Fri May 24 02:44:15 2019 (r348222) @@ -50,10 +50,10 @@ __FBSDID("$FreeBSD$"); SDT_PROVIDER_DECLARE(opencrypto); SDT_PROBE_DEFINE2(opencrypto, deflate, deflate_global, entry, "int", "u_int32_t"); -SDT_PROBE_DEFINE5(opencrypto, deflate, deflate_global, bad, - "int", "int", "int", "int", "int"); -SDT_PROBE_DEFINE5(opencrypto, deflate, deflate_global, iter, - "int", "int", "int", "int", "int"); +SDT_PROBE_DEFINE6(opencrypto, deflate, deflate_global, bad, + "int", "int", "int", "int", "int", "int"); +SDT_PROBE_DEFINE6(opencrypto, deflate, deflate_global, iter, + "int", "int", "int", "int", "int", "int"); SDT_PROBE_DEFINE2(opencrypto, deflate, deflate_global, return, "int", "u_int32_t"); @@ -105,8 +105,8 @@ deflate_global(data, size, decomp, out) bufh = bufp = malloc(sizeof(*bufp) + (size_t)(size * i), M_CRYPTO_DATA, M_NOWAIT); if (bufp == NULL) { - SDT_PROBE5(opencrypto, deflate, deflate_global, bad, - decomp, 0, __LINE__, 0, 0); + SDT_PROBE6(opencrypto, deflate, deflate_global, bad, + decomp, 0, __LINE__, 0, 0, 0); goto bad2; } bufp->next = NULL; @@ -125,8 +125,8 @@ deflate_global(data, size, decomp, out) deflateInit2(&zbuf, Z_DEFAULT_COMPRESSION, Z_METHOD, window_deflate, Z_MEMLEVEL, Z_DEFAULT_STRATEGY); if (error != Z_OK) { - SDT_PROBE5(opencrypto, deflate, deflate_global, bad, - decomp, error, __LINE__, 0, 0); + SDT_PROBE6(opencrypto, deflate, deflate_global, bad, + decomp, error, __LINE__, 0, 0, 0); goto bad; } @@ -134,24 +134,14 @@ deflate_global(data, size, decomp, out) error = decomp ? inflate(&zbuf, Z_SYNC_FLUSH) : deflate(&zbuf, Z_FINISH); if (error != Z_OK && error != Z_STREAM_END) { - /* - * Unfortunately we are limited to 5 arguments, - * thus use two probes. - */ - SDT_PROBE5(opencrypto, deflate, deflate_global, bad, + SDT_PROBE6(opencrypto, deflate, deflate_global, bad, decomp, error, __LINE__, - zbuf.avail_in, zbuf.avail_out); - SDT_PROBE5(opencrypto, deflate, deflate_global, bad, - decomp, error, __LINE__, - zbuf.state->dummy, zbuf.total_out); + zbuf.avail_in, zbuf.avail_out, zbuf.total_out); goto bad; } - SDT_PROBE5(opencrypto, deflate, deflate_global, iter, + SDT_PROBE6(opencrypto, deflate, deflate_global, iter, decomp, error, __LINE__, - zbuf.avail_in, zbuf.avail_out); - SDT_PROBE5(opencrypto, deflate, deflate_global, iter, - decomp, error, __LINE__, - zbuf.state->dummy, zbuf.total_out); + zbuf.avail_in, zbuf.avail_out, zbuf.total_out); if (decomp && zbuf.avail_in == 0 && error == Z_STREAM_END) { /* Done. */ break; @@ -165,8 +155,8 @@ deflate_global(data, size, decomp, out) p = malloc(sizeof(*p) + (size_t)(size * i), M_CRYPTO_DATA, M_NOWAIT); if (p == NULL) { - SDT_PROBE5(opencrypto, deflate, deflate_global, - bad, decomp, 0, __LINE__, 0, 0); + SDT_PROBE6(opencrypto, deflate, deflate_global, + bad, decomp, 0, __LINE__, 0, 0, 0); goto bad; } p->next = NULL; @@ -177,16 +167,9 @@ deflate_global(data, size, decomp, out) zbuf.avail_out = bufp->size; } else { /* Unexpect result. */ - /* - * Unfortunately we are limited to 5 arguments, - * thus, again, use two probes. - */ - SDT_PROBE5(opencrypto, deflate, deflate_global, bad, + SDT_PROBE6(opencrypto, deflate, deflate_global, bad, decomp, error, __LINE__, - zbuf.avail_in, zbuf.avail_out); - SDT_PROBE5(opencrypto, deflate, deflate_global, bad, - decomp, error, __LINE__, - zbuf.state->dummy, zbuf.total_out); + zbuf.avail_in, zbuf.avail_out, zbuf.total_out); goto bad; } } @@ -195,8 +178,8 @@ deflate_global(data, size, decomp, out) *out = malloc(result, M_CRYPTO_DATA, M_NOWAIT); if (*out == NULL) { - SDT_PROBE5(opencrypto, deflate, deflate_global, bad, - decomp, 0, __LINE__, 0, 0); + SDT_PROBE6(opencrypto, deflate, deflate_global, bad, + decomp, 0, __LINE__, 0, 0, 0); goto bad; } if (decomp) From owner-svn-src-head@freebsd.org Fri May 24 05:34:23 2019 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 9B61B1598729; Fri, 24 May 2019 05:34:23 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 41CFD74E9A; Fri, 24 May 2019 05:34:23 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1DB3F18594; Fri, 24 May 2019 05:34:23 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4O5YNEx026179; Fri, 24 May 2019 05:34:23 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4O5YL7l026173; Fri, 24 May 2019 05:34:21 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201905240534.x4O5YL7l026173@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 24 May 2019 05:34:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348225 - in head: . stand/i386 stand/i386/kgzldr targets/pseudo/userland targets/pseudo/userland/misc usr.sbin usr.sbin/kgzip X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: in head: . stand/i386 stand/i386/kgzldr targets/pseudo/userland targets/pseudo/userland/misc usr.sbin usr.sbin/kgzip X-SVN-Commit-Revision: 348225 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 41CFD74E9A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.96)[-0.957,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 05:34:23 -0000 Author: delphij Date: Fri May 24 05:34:21 2019 New Revision: 348225 URL: https://svnweb.freebsd.org/changeset/base/348225 Log: Remove kgzip and kgzldr. PR: 183666, 229763 Submitted by: Yoshihiro Ota Differential Revision: https://reviews.freebsd.org/D20248 Deleted: head/stand/i386/kgzldr/ head/usr.sbin/kgzip/ Modified: head/ObsoleteFiles.inc head/stand/i386/Makefile head/targets/pseudo/userland/Makefile.depend head/targets/pseudo/userland/misc/Makefile.depend head/usr.sbin/Makefile.amd64 head/usr.sbin/Makefile.i386 Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Fri May 24 05:12:43 2019 (r348224) +++ head/ObsoleteFiles.inc Fri May 24 05:34:21 2019 (r348225) @@ -38,6 +38,11 @@ # xargs -n1 | sort | uniq -d; # done +# 20190523: Remove obsolete kgzip and support files +OLD_FILES+=usr/sbin/kgzip +OLD_FILES+=usr/lib/kgzldr.o +OLD_FILES+=usr/share/man/man8/kgzip.8.gz + # 20190517: Remove obsolete 10 and 10/100 ethernet drivers. OLD_FILES+=usr/share/man/man4/bm.4.gz OLD_FILES+=usr/share/man/man4/cs.4.gz Modified: head/stand/i386/Makefile ============================================================================== --- head/stand/i386/Makefile Fri May 24 05:12:43 2019 (r348224) +++ head/stand/i386/Makefile Fri May 24 05:34:21 2019 (r348225) @@ -16,10 +16,6 @@ SUBDIR.yes+= loader_simp # special boot programs, 'self-extracting boot2+loader' SUBDIR.yes+= pxeldr -.if ${MACHINE_CPUARCH} == "i386" -SUBDIR.yes+= kgzldr -.endif - SUBDIR.${MK_LOADER_ZFS}+= zfsboot gptzfsboot .include Modified: head/targets/pseudo/userland/Makefile.depend ============================================================================== --- head/targets/pseudo/userland/Makefile.depend Fri May 24 05:12:43 2019 (r348224) +++ head/targets/pseudo/userland/Makefile.depend Fri May 24 05:34:21 2019 (r348225) @@ -827,7 +827,6 @@ DIRDEPS.i386= \ usr.sbin/hyperv/tools/kvp \ usr.sbin/hyperv/tools/vss \ usr.sbin/kgmon \ - usr.sbin/kgzip \ usr.sbin/lptcontrol \ usr.sbin/mptable \ usr.sbin/ndiscvt \ Modified: head/targets/pseudo/userland/misc/Makefile.depend ============================================================================== --- head/targets/pseudo/userland/misc/Makefile.depend Fri May 24 05:12:43 2019 (r348224) +++ head/targets/pseudo/userland/misc/Makefile.depend Fri May 24 05:34:21 2019 (r348225) @@ -83,7 +83,7 @@ DIRDEPS+= \ DIRDEPS.arm= ${_sys_boot_fdt} ${_sys_boot_efi} DIRDEPS.arm64= ${_sys_boot_fdt} ${_sys_boot_efi} -DIRDEPS.i386= ${DIRDEPS.x86sys} ${_sys_boot_efi} stand/i386/kgzldr +DIRDEPS.i386= ${DIRDEPS.x86sys} ${_sys_boot_efi} DIRDEPS.powerpc= ${_sys_boot_fdt} stand/libsa32 stand/ofw stand/uboot DIRDEPS.sparc64= stand/ofw ${_sys_boot_zfs} .endif Modified: head/usr.sbin/Makefile.amd64 ============================================================================== --- head/usr.sbin/Makefile.amd64 Fri May 24 05:12:43 2019 (r348224) +++ head/usr.sbin/Makefile.amd64 Fri May 24 05:34:21 2019 (r348225) @@ -1,6 +1,5 @@ # $FreeBSD$ -# kgzip: builds, but missing support files # mptable: broken (not 64 bit clean) # pnpinfo: crashes (not really useful anyway) .if ${MK_ACPI} != "no" Modified: head/usr.sbin/Makefile.i386 ============================================================================== --- head/usr.sbin/Makefile.i386 Fri May 24 05:12:43 2019 (r348224) +++ head/usr.sbin/Makefile.i386 Fri May 24 05:34:21 2019 (r348225) @@ -16,7 +16,6 @@ SUBDIR+= cpucontrol SUBDIR+= hyperv .endif SUBDIR+= kgmon -SUBDIR+= kgzip SUBDIR+= lptcontrol SUBDIR+= mptable .if ${MK_NDIS} != "no" From owner-svn-src-head@freebsd.org Fri May 24 06:02:52 2019 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 18C46159A621; Fri, 24 May 2019 06:02:52 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ADCC8760C6; Fri, 24 May 2019 06:02:51 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 87F1B18AC6; Fri, 24 May 2019 06:02:51 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4O62ptM042165; Fri, 24 May 2019 06:02:51 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4O62pFK042164; Fri, 24 May 2019 06:02:51 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201905240602.x4O62pFK042164@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 24 May 2019 06:02:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348227 - head/sys/dev/amdgpio X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/dev/amdgpio X-SVN-Commit-Revision: 348227 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: ADCC8760C6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 06:02:52 -0000 Author: avg Date: Fri May 24 06:02:51 2019 New Revision: 348227 URL: https://svnweb.freebsd.org/changeset/base/348227 Log: amdgpio: remove new line symbols from pin names That made, for example, gpioc -l output quite hard to read and parse. Also, fix formatting of a nearby statement with too long lines. MFC after: 2 weeks Modified: head/sys/dev/amdgpio/amdgpio.c Modified: head/sys/dev/amdgpio/amdgpio.c ============================================================================== --- head/sys/dev/amdgpio/amdgpio.c Fri May 24 05:47:16 2019 (r348226) +++ head/sys/dev/amdgpio/amdgpio.c Fri May 24 06:02:51 2019 (r348227) @@ -386,7 +386,7 @@ amdgpio_attach(device_t dev) /* Initialize all possible pins to be Invalid */ for (i = 0; i < AMD_GPIO_PINS_MAX ; i++) { snprintf(sc->sc_gpio_pins[i].gp_name, GPIOMAXNAME, - "Unexposed PIN %d\n", i); + "Unexposed PIN %d", i); sc->sc_gpio_pins[i].gp_pin = -1; sc->sc_gpio_pins[i].gp_caps = 0; sc->sc_gpio_pins[i].gp_flags = 0; @@ -396,12 +396,13 @@ amdgpio_attach(device_t dev) for (i = 0; i < AMD_GPIO_PINS_EXPOSED ; i++) { pin = kernzp_pins[i].pin_num; bank = pin/AMD_GPIO_PINS_PER_BANK; - snprintf(sc->sc_gpio_pins[pin].gp_name, GPIOMAXNAME, "%s%d_%s\n", + snprintf(sc->sc_gpio_pins[pin].gp_name, GPIOMAXNAME, "%s%d_%s", AMD_GPIO_PREFIX, bank, kernzp_pins[i].pin_name); sc->sc_gpio_pins[pin].gp_pin = pin; sc->sc_gpio_pins[pin].gp_caps = AMDGPIO_DEFAULT_CAPS; - sc->sc_gpio_pins[pin].gp_flags = (amdgpio_is_pin_output(sc, pin)? - GPIO_PIN_OUTPUT : GPIO_PIN_INPUT); + sc->sc_gpio_pins[pin].gp_flags = + amdgpio_is_pin_output(sc, pin) ? + GPIO_PIN_OUTPUT : GPIO_PIN_INPUT; } sc->sc_busdev = gpiobus_attach_bus(dev); From owner-svn-src-head@freebsd.org Fri May 24 06:06:42 2019 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 DDAB6159A78E; Fri, 24 May 2019 06:06:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8005876267; Fri, 24 May 2019 06:06:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 70E0C18ACA; Fri, 24 May 2019 06:06:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4O66geZ042366; Fri, 24 May 2019 06:06:42 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4O66gqw042365; Fri, 24 May 2019 06:06:42 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201905240606.x4O66gqw042365@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 24 May 2019 06:06:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348228 - head/sys/dev/amdgpio X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/dev/amdgpio X-SVN-Commit-Revision: 348228 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8005876267 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 06:06:43 -0000 Author: avg Date: Fri May 24 06:06:42 2019 New Revision: 348228 URL: https://svnweb.freebsd.org/changeset/base/348228 Log: amdgpio: fix reading status of input pins AMD FCH GPIO controller uses different bits for setting the output level and for reporting the input level. MFC after: 2 weeks Modified: head/sys/dev/amdgpio/amdgpio.c Modified: head/sys/dev/amdgpio/amdgpio.c ============================================================================== --- head/sys/dev/amdgpio/amdgpio.c Fri May 24 06:02:51 2019 (r348227) +++ head/sys/dev/amdgpio/amdgpio.c Fri May 24 06:06:42 2019 (r348228) @@ -264,10 +264,17 @@ amdgpio_pin_get(device_t dev, uint32_t pin, unsigned i reg = AMDGPIO_PIN_REGISTER(pin); val = amdgpio_read_4(sc, reg); - if (val & BIT(OUTPUT_VALUE_OFF)) - *value = GPIO_PIN_HIGH; - else - *value = GPIO_PIN_LOW; + if ((sc->sc_gpio_pins[pin].gp_flags & GPIO_PIN_OUTPUT) != 0) { + if (val & BIT(OUTPUT_VALUE_OFF)) + *value = GPIO_PIN_HIGH; + else + *value = GPIO_PIN_LOW; + } else { + if (val & BIT(PIN_STS_OFF)) + *value = GPIO_PIN_HIGH; + else + *value = GPIO_PIN_LOW; + } dprintf("pin %d value 0x%x\n", pin, *value); From owner-svn-src-head@freebsd.org Fri May 24 06:07:35 2019 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 EF57C159A80C; Fri, 24 May 2019 06:07:34 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8DD25763B2; Fri, 24 May 2019 06:07:34 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6A79318ACB; Fri, 24 May 2019 06:07:34 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4O67Y34042443; Fri, 24 May 2019 06:07:34 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4O67YvI042442; Fri, 24 May 2019 06:07:34 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201905240607.x4O67YvI042442@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 24 May 2019 06:07:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348229 - head/sys/dev/amdgpio X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/dev/amdgpio X-SVN-Commit-Revision: 348229 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8DD25763B2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 06:07:35 -0000 Author: avg Date: Fri May 24 06:07:33 2019 New Revision: 348229 URL: https://svnweb.freebsd.org/changeset/base/348229 Log: amdgpio: small formatting cleanup MFC after: 2 weeks Modified: head/sys/dev/amdgpio/amdgpio.c Modified: head/sys/dev/amdgpio/amdgpio.c ============================================================================== --- head/sys/dev/amdgpio/amdgpio.c Fri May 24 06:06:42 2019 (r348228) +++ head/sys/dev/amdgpio/amdgpio.c Fri May 24 06:07:33 2019 (r348229) @@ -352,14 +352,13 @@ amdgpio_probe(device_t dev) { static char *gpio_ids[] = { "AMD0030", "AMDI0030", NULL }; int rv; - + if (acpi_disabled("gpio")) return (ENXIO); rv = ACPI_ID_PROBE(device_get_parent(dev), dev, gpio_ids, NULL); - if (rv <= 0) device_set_desc(dev, "AMD GPIO Controller"); - + return (rv); } From owner-svn-src-head@freebsd.org Fri May 24 06:49:48 2019 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 67109159EC96; Fri, 24 May 2019 06:49:48 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 097C8777EE; Fri, 24 May 2019 06:49:48 +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 D0D3019182; Fri, 24 May 2019 06:49:47 +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 x4O6nlHv063552; Fri, 24 May 2019 06:49:47 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4O6nlKZ063551; Fri, 24 May 2019 06:49:47 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <201905240649.x4O6nlKZ063551@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Fri, 24 May 2019 06:49:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348231 - head/lib/geom/eli X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/lib/geom/eli X-SVN-Commit-Revision: 348231 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 097C8777EE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 06:49:48 -0000 Author: lwhsu Date: Fri May 24 06:49:47 2019 New Revision: 348231 URL: https://svnweb.freebsd.org/changeset/base/348231 Log: Correct the argument passed to g_eli_algo2str() MFC with: r348206 Sponsored by: The FreeBSD Foundation Modified: head/lib/geom/eli/geom_eli.c Modified: head/lib/geom/eli/geom_eli.c ============================================================================== --- head/lib/geom/eli/geom_eli.c Fri May 24 06:27:11 2019 (r348230) +++ head/lib/geom/eli/geom_eli.c Fri May 24 06:49:47 2019 (r348231) @@ -818,7 +818,7 @@ eli_init(struct gctl_req *req) case CRYPTO_3DES_CBC: case CRYPTO_BLF_CBC: gctl_error(req, "The %s encryption algorithm is deprecated.", - g_eli_algo2str(md.md_aalgo)); + g_eli_algo2str(md.md_ealgo)); return; } val = gctl_get_intmax(req, "keylen"); From owner-svn-src-head@freebsd.org Fri May 24 09:11:36 2019 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 8729015A4CD8; Fri, 24 May 2019 09:11:36 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2C3FF84488; Fri, 24 May 2019 09:11:36 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 1E23EA8; Fri, 24 May 2019 09:11:36 +0000 (UTC) Date: Fri, 24 May 2019 09:11:36 +0000 From: Alexey Dokuchaev To: Mateusz Guzik Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r344648 - in head: . sys/kern sys/sys Message-ID: <20190524091136.GA80897@FreeBSD.org> References: <201902272256.x1RMutdK085216@repo.freebsd.org> <20190228074750.GA35369@FreeBSD.org> <20190310151140.GB97029@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190310151140.GB97029@FreeBSD.org> User-Agent: Mutt/1.11.4 (2019-03-13) X-Rspamd-Queue-Id: 2C3FF84488 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.993,0]; NEURAL_HAM_SHORT(-0.94)[-0.937,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 09:11:36 -0000 On Sun, Mar 10, 2019 at 03:11:40PM +0000, Alexey Dokuchaev wrote: > On Thu, Feb 28, 2019 at 07:47:51AM +0000, Alexey Dokuchaev wrote: > > On Wed, Feb 27, 2019 at 10:56:55PM +0000, Mateusz Guzik wrote: > > > New Revision: 344648 > > > URL: https://svnweb.freebsd.org/changeset/base/344648 > > > > > > Log: > > > Rename seq to seqc to avoid namespace clashes with Linux > > > > > > ... > > > Added: > > > head/sys/sys/seqc.h (contents, props changed) > > > Deleted: > > > head/sys/sys/seq.h > > > > Why it was deleted and added as new file instead of being repocopied? > > Retransmit. Ping! ./danfe From owner-svn-src-head@freebsd.org Fri May 24 11:06:26 2019 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 63BD415A7A71; Fri, 24 May 2019 11:06:26 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0701388802; Fri, 24 May 2019 11:06:26 +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 D17DC1BDB7; Fri, 24 May 2019 11:06:25 +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 x4OB6PGr003863; Fri, 24 May 2019 11:06:25 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4OB6PXv003860; Fri, 24 May 2019 11:06:25 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201905241106.x4OB6PXv003860@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 24 May 2019 11:06:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348235 - head/sbin/ipfw X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: head/sbin/ipfw X-SVN-Commit-Revision: 348235 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0701388802 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 11:06:26 -0000 Author: ae Date: Fri May 24 11:06:24 2019 New Revision: 348235 URL: https://svnweb.freebsd.org/changeset/base/348235 Log: Add `missing` and `or-flush` options to "ipfw table create" command to simplify firewall reloading. The `missing` option suppresses EEXIST error code, but does check that existing table has the same parameters as new one. The `or-flush` option implies `missing` option and additionally does flush for table if it is already exist. Submitted by: lev MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D18339 Modified: head/sbin/ipfw/ipfw.8 head/sbin/ipfw/ipfw2.h head/sbin/ipfw/tables.c Modified: head/sbin/ipfw/ipfw.8 ============================================================================== --- head/sbin/ipfw/ipfw.8 Fri May 24 09:01:54 2019 (r348234) +++ head/sbin/ipfw/ipfw.8 Fri May 24 11:06:24 2019 (r348235) @@ -1,7 +1,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 21, 2019 +.Dd May 24, 2019 .Dt IPFW 8 .Os .Sh NAME @@ -2138,7 +2138,7 @@ The following creation options are supported: .Bl -tag -width indent .It Ar create-options : Ar create-option | create-options .It Ar create-option : Cm type Ar table-type | Cm valtype Ar value-mask | Cm algo Ar algo-desc | -.Cm limit Ar number | Cm locked +.Cm limit Ar number | Cm locked | Cm missing | Cm or-flush .It Cm type Table key type. .It Cm valtype @@ -2149,6 +2149,13 @@ Table algorithm to use (see below). Maximum number of items that may be inserted into table. .It Cm locked Restrict any table modifications. +.It Cm missing +Do not fail if table already exists and has exactly same options as new one. +.It Cm or-flush +Flush existing table with same name instead of returning error. +Implies +.Cm missing +so existing table must be compatible with new one. .El .Pp Some of these options may be modified later via Modified: head/sbin/ipfw/ipfw2.h ============================================================================== --- head/sbin/ipfw/ipfw2.h Fri May 24 09:01:54 2019 (r348234) +++ head/sbin/ipfw/ipfw2.h Fri May 24 11:06:24 2019 (r348235) @@ -264,6 +264,9 @@ enum tokens { TOK_UNLOCK, TOK_VLIST, TOK_OLIST, + TOK_MISSING, + TOK_ORFLUSH, + TOK_OPTIONAL, /* NAT64 tokens */ TOK_NAT64STL, Modified: head/sbin/ipfw/tables.c ============================================================================== --- head/sbin/ipfw/tables.c Fri May 24 09:01:54 2019 (r348234) +++ head/sbin/ipfw/tables.c Fri May 24 11:06:24 2019 (r348235) @@ -327,6 +327,8 @@ static struct _s_x tablenewcmds[] = { { "algo", TOK_ALGO }, { "limit", TOK_LIMIT }, { "locked", TOK_LOCK }, + { "missing", TOK_MISSING }, + { "or-flush", TOK_ORFLUSH }, { NULL, 0 } }; @@ -389,19 +391,19 @@ table_print_type(char *tbuf, size_t size, uint8_t type * Creates new table * * ipfw table NAME create [ type { addr | iface | number | flow } ] - * [ algo algoname ] + * [ algo algoname ] [missing] [or-flush] */ static void table_create(ipfw_obj_header *oh, int ac, char *av[]) { - ipfw_xtable_info xi; - int error, tcmd, val; + ipfw_xtable_info xi, xie; + int error, missing, orflush, tcmd, val; uint32_t fset, fclear; char *e, *p; char tbuf[128]; + missing = orflush = 0; memset(&xi, 0, sizeof(xi)); - while (ac > 0) { tcmd = get_token(tablenewcmds, *av, "option"); ac--; av++; @@ -457,6 +459,12 @@ table_create(ipfw_obj_header *oh, int ac, char *av[]) case TOK_LOCK: xi.flags |= IPFW_TGFLAGS_LOCKED; break; + case TOK_ORFLUSH: + orflush = 1; + /* FALLTHROUGH */ + case TOK_MISSING: + missing = 1; + break; } } @@ -466,8 +474,28 @@ table_create(ipfw_obj_header *oh, int ac, char *av[]) if (xi.vmask == 0) xi.vmask = IPFW_VTYPE_LEGACY; - if ((error = table_do_create(oh, &xi)) != 0) + error = table_do_create(oh, &xi); + + if (error == 0) + return; + + if (errno != EEXIST || missing == 0) err(EX_OSERR, "Table creation failed"); + + /* Check that existing table is the same we are trying to create */ + if (table_get_info(oh, &xie) != 0) + err(EX_OSERR, "Existing table check failed"); + + if (xi.limit != xie.limit || xi.type != xie.type || + xi.tflags != xie.tflags || xi.vmask != xie.vmask || ( + xi.algoname[0] != '\0' && strcmp(xi.algoname, + xie.algoname) != 0) || xi.flags != xie.flags) + errx(EX_DATAERR, "The existing table is not compatible " + "with one you are creating."); + + /* Flush existing table if instructed to do so */ + if (orflush != 0 && table_flush(oh) != 0) + err(EX_OSERR, "Table flush on creation failed"); } /* From owner-svn-src-head@freebsd.org Fri May 24 11:45:34 2019 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 E80F815A8798; Fri, 24 May 2019 11:45:33 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8DD3E89B2D; Fri, 24 May 2019 11:45:33 +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 661D91C475; Fri, 24 May 2019 11:45:33 +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 x4OBjXLD024685; Fri, 24 May 2019 11:45:33 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4OBjXcO024684; Fri, 24 May 2019 11:45:33 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201905241145.x4OBjXcO024684@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 24 May 2019 11:45:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348236 - head/sys/netinet6 X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: head/sys/netinet6 X-SVN-Commit-Revision: 348236 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8DD3E89B2D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.95)[-0.951,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 11:45:34 -0000 Author: ae Date: Fri May 24 11:45:32 2019 New Revision: 348236 URL: https://svnweb.freebsd.org/changeset/base/348236 Log: Restore IPV6_NEXTHOP option support that seem was partially broken since r286195. Do not forget results of route lookup and initialize rt and ifp pointers. PR: 238098 Submitted by: Masse Nicolas MFC after: 1 week Modified: head/sys/netinet6/in6_src.c Modified: head/sys/netinet6/in6_src.c ============================================================================== --- head/sys/netinet6/in6_src.c Fri May 24 11:06:24 2019 (r348235) +++ head/sys/netinet6/in6_src.c Fri May 24 11:45:32 2019 (r348236) @@ -724,6 +724,10 @@ selectroute(struct sockaddr_in6 *dstsock, struct ip6_p if (ron->ro_rt == NULL || (ron->ro_rt->rt_flags & RTF_GATEWAY) != 0) error = EHOSTUNREACH; + else { + rt = ron->ro_rt; + ifp = rt->rt_ifp; + } goto done; } From owner-svn-src-head@freebsd.org Fri May 24 14:44:45 2019 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 99F6715AD4A7; Fri, 24 May 2019 14:44:45 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 41E91685B7; Fri, 24 May 2019 14:44:45 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-3.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 94C7E80AB; Fri, 24 May 2019 14:44:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r348205 - head/sys/netipsec To: rgrimes@FreeBSD.org Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201905240134.x4O1YUbA093317@gndrsh.dnsmgr.net> From: John Baldwin Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: Date: Fri, 24 May 2019 07:44:42 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <201905240134.x4O1YUbA093317@gndrsh.dnsmgr.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 41E91685B7 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.97)[-0.967,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 14:44:46 -0000 On 5/23/19 6:34 PM, Rodney W. Grimes wrote: > I did not need that info, just a list of IANA assigned numbers > of things you can not find in RFC/Ietf documents. I'll do the > leg work from the other side and if Ietf/Iana documents need > fixed I'll get that in process. Oh, to be clear, that specific language is direct from RFC 8221. For example, in section 5 after the table of encryption algorithms: IANA has allocated codes for cryptographic algorithms that have not been specified by the IETF. Such algorithms are noted as UNSPECIFIED. Usually, the use of these algorithms is limited to specific cases, and the absence of specification makes interoperability difficult for IPsec communications. These algorithms were not mentioned in [RFC7321], and this document clarifies that such algorithms MUST NOT be implemented for IPsec communications. Similarly, IANA also allocated code points for algorithms that are not expected to be used to secure IPsec communications. Such algorithms are noted as non-IPsec. As a result, these algorithms MUST NOT be implemented. Various ciphers that are older, not well tested, and never widely implemented have been changed to MUST NOT. On my (8th?) reading though, it may be that the first paragraph is only applying to the algorithms marked UNSPECIFIED in the earlier table which would cover des-32iv and possibly des-deriv in which case the wording I used in the commit log isn't quite clear. Also, just to make it clear, I don't care about IANA numbers, I was merely referencing the RFC's wording as the "why". -- John Baldwin From owner-svn-src-head@freebsd.org Fri May 24 15:21:24 2019 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 5C7EF15AE1DA; Fri, 24 May 2019 15:21:24 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 033876B394; Fri, 24 May 2019 15:21:24 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D44C71E858; Fri, 24 May 2019 15:21:23 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4OFLNqk043596; Fri, 24 May 2019 15:21:23 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4OFLNAa043595; Fri, 24 May 2019 15:21:23 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201905241521.x4OFLNAa043595@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 24 May 2019 15:21:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348239 - in head/tools/tools/nanobsd: dhcpd pcengines X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/tools/tools/nanobsd: dhcpd pcengines X-SVN-Commit-Revision: 348239 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 033876B394 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 15:21:24 -0000 Author: emaste Date: Fri May 24 15:21:23 2019 New Revision: 348239 URL: https://svnweb.freebsd.org/changeset/base/348239 Log: nanobsd: exclude .git (and .hg) in the same places we exclude .svn Allow support of other VCSes. Note that two other nanobsd files already had a similar case, excluding .git and .hg in addition to CVS and .svn. Sponsored by: The FreeBSD Foundation Modified: head/tools/tools/nanobsd/dhcpd/common head/tools/tools/nanobsd/pcengines/common.conf Modified: head/tools/tools/nanobsd/dhcpd/common ============================================================================== --- head/tools/tools/nanobsd/dhcpd/common Fri May 24 14:38:31 2019 (r348238) +++ head/tools/tools/nanobsd/dhcpd/common Fri May 24 15:21:23 2019 (r348239) @@ -83,7 +83,7 @@ cust_install_machine_files() { echo "cd ${NANO_CFG_BASE}/Files" cd ${NANO_CFG_BASE}/Files - find . -print | grep -Ev '/(CVS|\.svn)' | cpio -dumpv ${NANO_WORLDDIR} + find . -print | grep -Ev '/(CVS|\.git|\.hg|\.svn)' | cpio -dumpv ${NANO_WORLDDIR} } customize_cmd cust_install_files customize_cmd cust_install_machine_files Modified: head/tools/tools/nanobsd/pcengines/common.conf ============================================================================== --- head/tools/tools/nanobsd/pcengines/common.conf Fri May 24 14:38:31 2019 (r348238) +++ head/tools/tools/nanobsd/pcengines/common.conf Fri May 24 15:21:23 2019 (r348239) @@ -39,7 +39,7 @@ cust_install_machine_files() ( MACHINE_DIR="${NANO_TOOLS}/Files.${NANO_NAME}" if [ -d "${MACHINE_DIR}" ]; then cd ${MACHINE_DIR} - find . -print | grep -Ev '/(CVS|\.svn)' | cpio -dumpv ${NANO_WORLDDIR} + find . -print | grep -Ev '/(CVS|\.git|\.hg|\.svn)' | cpio -dumpv ${NANO_WORLDDIR} else echo "${MACHINE_DIR} not found, skipping step" fi From owner-svn-src-head@freebsd.org Fri May 24 15:45:44 2019 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 43DA015AEC8B; Fri, 24 May 2019 15:45: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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DD7D96C7A0; Fri, 24 May 2019 15:45:43 +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 B38211EDB6; Fri, 24 May 2019 15:45:43 +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 x4OFjhdI057403; Fri, 24 May 2019 15:45:43 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4OFjh4N057402; Fri, 24 May 2019 15:45:43 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201905241545.x4OFjh4N057402@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 24 May 2019 15:45:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348241 - head X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 348241 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DD7D96C7A0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 15:45:44 -0000 Author: markj Date: Fri May 24 15:45:43 2019 New Revision: 348241 URL: https://svnweb.freebsd.org/changeset/base/348241 Log: Modernize the MAKE_JUST_KERNELS hint in the top-level makefile. It doesn't make sense to limit to -j12 anymore, build scalability is better than it used to be. Fold the hint into the description of the universe target. Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D20342 Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Fri May 24 15:37:54 2019 (r348240) +++ head/Makefile Fri May 24 15:45:43 2019 (r348241) @@ -4,7 +4,8 @@ # The user-driven targets are: # # universe - *Really* build *everything* (buildworld and -# all kernels on all architectures). +# all kernels on all architectures). Define the +# MAKE_JUST_KERNELS variable to only build kernels. # tinderbox - Same as universe, but presents a list of failed build # targets and exits with an error if there were any. # buildworld - Rebuild *everything*, including glue to help do @@ -45,12 +46,6 @@ # native-xtools-install # - Install the files to the given DESTDIR/NXTP where # NXTP defaults to /nxb-bin. -# -# "quick" way to test all kernel builds: -# _jflag=`sysctl -n hw.ncpu` -# _jflag=$(($_jflag * 2)) -# [ $_jflag -gt 12 ] && _jflag=12 -# make universe -DMAKE_JUST_KERNELS JFLAG=-j${_jflag} # # This makefile is simple by design. The FreeBSD make automatically reads # the /usr/share/mk/sys.mk unless the -m argument is specified on the From owner-svn-src-head@freebsd.org Fri May 24 16:24:03 2019 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 D625A15AF979; Fri, 24 May 2019 16:24:03 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 772896DCF3; Fri, 24 May 2019 16:24:03 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from [192.168.200.4] (c-71-56-186-158.hsd1.va.comcast.net [71.56.186.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: gallatin) by duke.cs.duke.edu (Postfix) with ESMTPSA id 2C4692700120; Fri, 24 May 2019 12:23:57 -0400 (EDT) DMARC-Filter: OpenDMARC Filter v1.3.1 duke.cs.duke.edu 2C4692700120 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cs.duke.edu; s=mail0816; t=1558715037; bh=LEcK88BpJJ1DDCJJ3aB3HcoPMSIRFtVVhGQRDpporJM=; h=Subject:To:From:Date:From; b=d/dJIVeo1Itd9cqCUSycU8nszmr9pmFJs7SuFo8agSerOVpTB2VUosf1ohNb0aWIA JB3vK+f/fK9zYwYMJhvIB5EGmTcHChXgIy924Ns6aubc45K0eHfJwEj3rVv5AWH+Xw 19Wtgi/jE0N8nrUbK4Gg+DpIp4mCA40czkNIUlDufXief+PLT4L4NAFD9VOaxB0yHO e0Pni1V7PlF+vJ2vKertUslB2qzeiE6AOk1QZkODt1Q9q7Xh6iDt3oEAE1AOxZ9q3p UsGlqs5pXCsrjyQtpseINdjbvgNhuSgjlXDCvkqpBREEYXW3R2DFXX1NT6GacdHhVk ZL0mZ38PxuntQ== Subject: Re: svn commit: r348241 - head To: Mark Johnston , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201905241545.x4OFjh4N057402@repo.freebsd.org> From: Andrew Gallatin Message-ID: <857f545b-c766-b9e0-3f01-6b80420c540c@cs.duke.edu> Date: Fri, 24 May 2019 12:23:56 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <201905241545.x4OFjh4N057402@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 772896DCF3 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.96)[-0.961,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 16:24:04 -0000 On 2019-05-24 11:45, Mark Johnston wrote: > Modernize the MAKE_JUST_KERNELS hint in the top-level makefile. > > It doesn't make sense to limit to -j12 anymore, build scalability > is better than it used to be. Fold the hint into the description > of the universe target. > > Reviewed by: imp Dumb question about this: Will it update toolchains, or just use what can find? Thanks, Drew From owner-svn-src-head@freebsd.org Fri May 24 17:09:13 2019 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 0284015B07C7; Fri, 24 May 2019 17:09:13 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it1-f177.google.com (mail-it1-f177.google.com [209.85.166.177]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 911606F473; Fri, 24 May 2019 17:09:12 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it1-f177.google.com with SMTP id j17so11494598itk.0; Fri, 24 May 2019 10:09:12 -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:reply-to :from:date:message-id:subject:to:cc; bh=6QNHiZtg1UsBwJ4lV01mE0pyWt44GY+cxvwQF+QaLB0=; b=FyDJKE2TBR3XuPAesxnVY5dw65FbLsoGeWpxIJ7To+zIJEaCdblOqvJcMKy82QouFA sutNnKkhBo5h5ltvq7Z7EuEFB8oVNShawFUd1tNtsxXaYZyv1DlB9Sjt8A31KGkDPUxC GLGXJGbmD9778MzNfrslWfFZds1CoEijvakNBIGUCnpDwtwOMvQUHQq5nvvDYH1pBcn+ U90UJjL8RBqQKLIJ/OH/QZpPta55EA9PV9iovbPkOAZail3VZmVlb5LI8GNQM5OOTh7U ZDKEeouFdighNWPjS82hBM8WTi+QqfxsU0Jl2OyWqDrK9xpD4uW6fGuanibE6BOTeql0 0J+w== X-Gm-Message-State: APjAAAV89Pf/j7SrHWoULXw4CgvF0C/gHAhWpRf9yA6YJQCtVf1ezuST n34/JM6o+W0jlMa7ZwI12kWnvfiH X-Google-Smtp-Source: APXvYqwUEUvOsRp8AzMaGttsJedjj5HNnAuA40YXl4fiVL6tywfLmbVxF2co0GetLbiMBd9LzLwwFg== X-Received: by 2002:a24:35d8:: with SMTP id k207mr18127994ita.84.1558717745743; Fri, 24 May 2019 10:09:05 -0700 (PDT) Received: from mail-io1-f50.google.com (mail-io1-f50.google.com. [209.85.166.50]) by smtp.gmail.com with ESMTPSA id f71sm1604944itc.5.2019.05.24.10.09.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 May 2019 10:09:04 -0700 (PDT) Received: by mail-io1-f50.google.com with SMTP id a17so8313708iot.8; Fri, 24 May 2019 10:09:04 -0700 (PDT) X-Received: by 2002:a05:6602:157:: with SMTP id v23mr13424323iot.80.1558717744154; Fri, 24 May 2019 10:09:04 -0700 (PDT) MIME-Version: 1.0 References: <201905241545.x4OFjh4N057402@repo.freebsd.org> <857f545b-c766-b9e0-3f01-6b80420c540c@cs.duke.edu> In-Reply-To: <857f545b-c766-b9e0-3f01-6b80420c540c@cs.duke.edu> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Fri, 24 May 2019 10:08:53 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r348241 - head To: Andrew Gallatin Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 911606F473 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 17:09:13 -0000 On Fri, May 24, 2019 at 9:24 AM Andrew Gallatin wrote: > Dumb question about this: Will it update toolchains, or just use what > can find? -DMAKE_JUST_KERNELS doesn't touch toolchains. For that, there is the less memorable build step: export NCPU=$((1 * $(sysctl -n hw.ncpu) / 3)); make -sj${NCPU} tinderbox JFLAG=-j${NCPU} UNIVERSE_TARGET=kernel-toolchain -DNO_CLEAN From owner-svn-src-head@freebsd.org Fri May 24 17:19:08 2019 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 1F3D715B0B1E; Fri, 24 May 2019 17:19:08 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B06BA6FAF8; Fri, 24 May 2019 17:19:07 +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 8620A1FD4F; Fri, 24 May 2019 17:19:07 +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 x4OHJ7FP004742; Fri, 24 May 2019 17:19:07 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4OHJ7DA004740; Fri, 24 May 2019 17:19:07 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201905241719.x4OHJ7DA004740@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 24 May 2019 17:19:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348246 - in head/sys: amd64/amd64 i386/i386 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: amd64/amd64 i386/i386 X-SVN-Commit-Revision: 348246 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B06BA6FAF8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 17:19:08 -0000 Author: kib Date: Fri May 24 17:19:06 2019 New Revision: 348246 URL: https://svnweb.freebsd.org/changeset/base/348246 Log: Fix a corner case in demotion of kernel mappings. It is possible for the kernel mapping to be created with superpage by directly installing pde using pmap_enter_2mpage() without filling the corresponding page table page. This can happen e.g. if the range is already backed by reservation and vm_fault_soft_fast() conditions are satisfied, which was observed on the pipe_map. In this case, demotion must fill the page obtained from the pmap radix, same as if the page is newly allocated. Use PG_PROMOTED bit as an indicator that the page is valid, instead of the wire count of the page table page. Since the PG_PROMOTED bit is set on pde when we leave TLB entries for 4k pages around, which in particular means that the ptes were filled, it provides more correct indicator. Note that pmap_protect_pde() clears PG_PROMOTED, which handles the case when protection was changed on the superpage without adjusting ptes. Reported by: pho In collaboration with: alc Tested by: alc, pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D20380 Modified: head/sys/amd64/amd64/pmap.c head/sys/i386/i386/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Fri May 24 17:14:07 2019 (r348245) +++ head/sys/amd64/amd64/pmap.c Fri May 24 17:19:06 2019 (r348246) @@ -4537,8 +4537,10 @@ pmap_demote_pde_locked(pmap_t pmap, pd_entry_t *pde, v " in pmap %p", va, pmap); return (FALSE); } - if (va < VM_MAXUSER_ADDRESS) + if (va < VM_MAXUSER_ADDRESS) { + mpte->wire_count = NPTEPG; pmap_resident_count_inc(pmap, 1); + } } mptepa = VM_PAGE_TO_PHYS(mpte); firstpte = (pt_entry_t *)PHYS_TO_DMAP(mptepa); @@ -4551,12 +4553,12 @@ pmap_demote_pde_locked(pmap_t pmap, pd_entry_t *pde, v newpte = pmap_swap_pat(pmap, newpte); /* - * If the page table page is new, initialize it. + * If the page table page is not leftover from an earlier promotion, + * initialize it. */ - if (mpte->wire_count == 1) { - mpte->wire_count = NPTEPG; + if ((oldpde & PG_PROMOTED) == 0) pmap_fill_ptp(firstpte, newpte); - } + KASSERT((*firstpte & PG_FRAME) == (newpte & PG_FRAME), ("pmap_demote_pde: firstpte and newpte map different physical" " addresses")); Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Fri May 24 17:14:07 2019 (r348245) +++ head/sys/i386/i386/pmap.c Fri May 24 17:19:06 2019 (r348246) @@ -2768,8 +2768,10 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t *pde, vm_offse " in pmap %p", va, pmap); return (FALSE); } - if (pmap != kernel_pmap) + if (pmap != kernel_pmap) { + mpte->wire_count = NPTEPG; pmap->pm_stats.resident_count++; + } } mptepa = VM_PAGE_TO_PHYS(mpte); @@ -2818,12 +2820,12 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t *pde, vm_offse newpte ^= PG_PDE_PAT | PG_PTE_PAT; /* - * If the page table page is new, initialize it. + * If the page table page is not leftover from an earlier promotion, + * initialize it. */ - if (mpte->wire_count == 1) { - mpte->wire_count = NPTEPG; + if ((oldpde & PG_PROMOTED) == 0) pmap_fill_ptp(firstpte, newpte); - } + KASSERT((*firstpte & PG_FRAME) == (newpte & PG_FRAME), ("pmap_demote_pde: firstpte and newpte map different physical" " addresses")); From owner-svn-src-head@freebsd.org Fri May 24 17:25:03 2019 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 CB94C15B0DD9; Fri, 24 May 2019 17:25:02 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-it1-x12e.google.com (mail-it1-x12e.google.com [IPv6:2607:f8b0:4864:20::12e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5E443700ED; Fri, 24 May 2019 17:25:02 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-it1-x12e.google.com with SMTP id t184so17042945itf.2; Fri, 24 May 2019 10:25:02 -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=uLnLTCEeh4i+udUvIygQ0IRPFy2XzCWdpIc5F1ixn2s=; b=u8tseB68kLUsJKuO5XQpsuQWYXXpe9f98KU/UVGR8LLZI1n7VV7F+h0zPzVrPEBZbe JlpW8xI11AW3ZIYigeuBML8knMG6tDyTz+3ee/3Xnf6yt0YFUseVvKZil43LJStp+cSB X+6QNz3VWHfwizErS5k6lZMzKaYN0IDA/Izl5EEYQcqVOObszfxe2YRZuTGyuEr/S2o8 OWkTeFa0zI3OhU0t8xjx6vyafLiAYRmybyfTyASKr5aA35gziMTDRRbhFY5BVP87TsA3 TNTXYIfvaXDXgxEkEfsaNNU9iDf7wFp8QKwJ05FA/OZw20mIT3aK8G0IRo88+1NL9ajN UWnQ== 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=uLnLTCEeh4i+udUvIygQ0IRPFy2XzCWdpIc5F1ixn2s=; b=tXOEgICz76zNRisVAon5xzTM4h0/bpUG8QiFe813Xep68aFx7A9Lz6NXrd6PaErVKT UPWhXqHzIgIZ4Cfp3aHYQwImmXs0eoTjfqKMSb6WX5YlqE0m+Yd5PjwXhlh9sCnV1r+A /U1/qjtP7SZiq3Mo10/MXGPhyMZZcrFoZu6TfpU5YQXBbvtqNFkTHPaNKdcqIuIhwfrF pOn3KKAVPxlxlNYxgAQxh/Zu7qPRlu+ZNN/U+/X7noCelfeiyhqojXlf+peZHAySKjPY vUDGwtbTr12etCRHK0b2n9gE4CWFjUIohkUvSuoMVYRRkUGQDkGU5Klc0rAcuJq/hUC3 Si5g== X-Gm-Message-State: APjAAAUGd758jJzSVP8Kieu9hGk8ni5xNib8oOpgdRAz7AsBjN3F4s/Q /0rrW7h0+0yLJuLcnKXtAaj2cnGu X-Google-Smtp-Source: APXvYqx/FrJ8LWItqGJWeinclwoNLnYrBagfehKwiWjggDXualJBpRhUHu2Cf1sdH9ntPt9a3HX7qw== X-Received: by 2002:a05:6638:6a9:: with SMTP id d9mr33726644jad.21.1558718701308; Fri, 24 May 2019 10:25:01 -0700 (PDT) Received: from raichu (toroon0560w-lp140-01-69-159-36-31.dsl.bell.ca. [69.159.36.31]) by smtp.gmail.com with ESMTPSA id w4sm1133058iob.46.2019.05.24.10.24.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 24 May 2019 10:25:00 -0700 (PDT) Sender: Mark Johnston Date: Fri, 24 May 2019 13:24:55 -0400 From: Mark Johnston To: Conrad Meyer Cc: Andrew Gallatin , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r348241 - head Message-ID: <20190524172455.GA92430@raichu> References: <201905241545.x4OFjh4N057402@repo.freebsd.org> <857f545b-c766-b9e0-3f01-6b80420c540c@cs.duke.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) X-Rspamd-Queue-Id: 5E443700ED X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.984,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 17:25:03 -0000 On Fri, May 24, 2019 at 10:08:53AM -0700, Conrad Meyer wrote: > On Fri, May 24, 2019 at 9:24 AM Andrew Gallatin wrote: > > Dumb question about this: Will it update toolchains, or just use what > > can find? > > -DMAKE_JUST_KERNELS doesn't touch toolchains. For that, there is the > less memorable build step: > > export NCPU=$((1 * $(sysctl -n hw.ncpu) / 3)); make -sj${NCPU} > tinderbox JFLAG=-j${NCPU} UNIVERSE_TARGET=kernel-toolchain -DNO_CLEAN Isn't that basically what the kernel-toolchains target does? From owner-svn-src-head@freebsd.org Fri May 24 17:25:21 2019 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 6AD3515B0E04; Fri, 24 May 2019 17:25:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0A7AD70228; Fri, 24 May 2019 17:25:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-3.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 51D929393; Fri, 24 May 2019 17:25:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r348241 - head To: cem@freebsd.org, Andrew Gallatin Cc: src-committers , svn-src-all , svn-src-head References: <201905241545.x4OFjh4N057402@repo.freebsd.org> <857f545b-c766-b9e0-3f01-6b80420c540c@cs.duke.edu> From: John Baldwin Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <57325dfa-7078-84e1-26d0-978e6bff0a28@FreeBSD.org> Date: Fri, 24 May 2019 10:25:19 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 0A7AD70228 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.94 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.939,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 17:25:21 -0000 On 5/24/19 10:08 AM, Conrad Meyer wrote: > On Fri, May 24, 2019 at 9:24 AM Andrew Gallatin wrote: >> Dumb question about this: Will it update toolchains, or just use what >> can find? > > -DMAKE_JUST_KERNELS doesn't touch toolchains. For that, there is the > less memorable build step: > > export NCPU=$((1 * $(sysctl -n hw.ncpu) / 3)); make -sj${NCPU} > tinderbox JFLAG=-j${NCPU} UNIVERSE_TARGET=kernel-toolchain -DNO_CLEAN You can spell it slightly shorter as 'make kernel-toolchains' (but still needing -j, etc.) -- John Baldwin From owner-svn-src-head@freebsd.org Fri May 24 17:58:30 2019 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 4989615B1796; Fri, 24 May 2019 17:58:30 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E118B71843; Fri, 24 May 2019 17:58:29 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B82B22041D; Fri, 24 May 2019 17:58:29 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4OHwTJA025938; Fri, 24 May 2019 17:58:29 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4OHwTQj025936; Fri, 24 May 2019 17:58:29 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201905241758.x4OHwTQj025936@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Fri, 24 May 2019 17:58:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348247 - head/sys/dev/isp X-SVN-Group: head X-SVN-Commit-Author: ken X-SVN-Commit-Paths: head/sys/dev/isp X-SVN-Commit-Revision: 348247 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E118B71843 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 17:58:30 -0000 Author: ken Date: Fri May 24 17:58:29 2019 New Revision: 348247 URL: https://svnweb.freebsd.org/changeset/base/348247 Log: Fix FC-Tape bugs caused in part by r345008. The point of r345008 was to reset the Command Reference Number (CRN) in some situations where a device stayed in the topology, but had changed somehow. This can include moving from a switch connection to a direct connection or vice versa, or a device that temporarily goes away and comes back. (e.g. moving to a different switch port) There were a couple of bugs in that change: - We were reporting that a device had not changed whenever the Establish Image Pair bit was not set. That is not quite correct. Instead, if the Establish Image Pair bit stays the same (set or not), the device hasn't changed in that way. - We weren't setting PRLI Word0 in the port database when a new device arrived, so comparisons with the old value for the Establish Image Pair bit weren't really possible. So, make sure PRLI Word0 is set in the port database for new devices. - We were resetting the CRN whenever the Establish Image Pair bit was set for a device, even when the device had stayed the same and the value of the bit hadn't changed. Now, only reset the CRN for devices that have changed, not devices that sayed the same. The result of all of this was that if we had a single FC device on an FC port and it went away and came back, we would wind up correctly resetting the CRN. But, if we had multiple devices connected via a switch, and there was any change in one or more of those devices, all of the devices that stayed the same would also have their CRN values reset. The result, from a user standpoint, is that the tape drives, etc. would all start to time out commands and the initiator would send aborts. sys/dev/isp/isp.c: In isp_pdb_add_update(), look at whether the Establish Image Pair bit has changed as part of the check to determine whether a device is still the same. This was causing erroneous change notifications. Also, when creating a new port database entry, initialize the PRLI Word 0 values. sys/dev/isp/isp_freebsd.c: In isp_async(), in the changed/stayed case, instead of looking at the Establish Image Pair bit to determine whether to reset the CRN, look at the command value. (Changed vs. Stayed.) Only reset the CRN for devices that have changed. Sponsored by: Spectra Logic MFC after: 3 days Modified: head/sys/dev/isp/isp.c head/sys/dev/isp/isp_freebsd.c Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Fri May 24 17:19:06 2019 (r348246) +++ head/sys/dev/isp/isp.c Fri May 24 17:58:29 2019 (r348247) @@ -3251,7 +3251,8 @@ isp_pdb_add_update(ispsoftc_t *isp, int chan, isp_pdb_ if (lp->portid == pdb->portid && lp->handle == pdb->handle && lp->prli_word3 == pdb->prli_word3 && - ((pdb->prli_word0 & PRLI_WD0_EST_IMAGE_PAIR) == 0)) { + ((pdb->prli_word0 & PRLI_WD0_EST_IMAGE_PAIR) == + (lp->prli_word0 & PRLI_WD0_EST_IMAGE_PAIR))) { if (lp->state != FC_PORTDB_STATE_NEW) lp->state = FC_PORTDB_STATE_VALID; isp_prt(isp, ISP_LOG_SANCFG, @@ -3282,6 +3283,7 @@ isp_pdb_add_update(ispsoftc_t *isp, int chan, isp_pdb_ lp->probational = 0; lp->state = FC_PORTDB_STATE_NEW; lp->portid = lp->new_portid = pdb->portid; + lp->prli_word0 = lp->new_prli_word0 = pdb->prli_word0; lp->prli_word3 = lp->new_prli_word3 = pdb->prli_word3; lp->handle = pdb->handle; lp->port_wwn = wwpn; Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Fri May 24 17:19:06 2019 (r348246) +++ head/sys/dev/isp/isp_freebsd.c Fri May 24 17:58:29 2019 (r348247) @@ -3789,7 +3789,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cmd, ...) xpt_async(AC_CONTRACT, fc->path, &ac); } - if ((lp->new_prli_word0 & PRLI_WD0_EST_IMAGE_PAIR) && + if ((cmd == ISPASYNC_DEV_CHANGED) && (crn_reset_done == 0)) isp_fcp_reset_crn(isp, bus, tgt, /*tgt_set*/ 1); From owner-svn-src-head@freebsd.org Fri May 24 18:41:32 2019 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 8257E15B28B1; Fri, 24 May 2019 18:41:32 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2928C72F8B; Fri, 24 May 2019 18:41:32 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1723120B38; Fri, 24 May 2019 18:41:32 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4OIfVs9048527; Fri, 24 May 2019 18:41:31 GMT (envelope-from luporl@FreeBSD.org) Received: (from luporl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4OIfVKV048526; Fri, 24 May 2019 18:41:31 GMT (envelope-from luporl@FreeBSD.org) Message-Id: <201905241841.x4OIfVKV048526@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luporl set sender to luporl@FreeBSD.org using -f From: Leandro Lupori Date: Fri, 24 May 2019 18:41:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348248 - head/sys/powerpc/conf X-SVN-Group: head X-SVN-Commit-Author: luporl X-SVN-Commit-Paths: head/sys/powerpc/conf X-SVN-Commit-Revision: 348248 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2928C72F8B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 18:41:32 -0000 Author: luporl Date: Fri May 24 18:41:31 2019 New Revision: 348248 URL: https://svnweb.freebsd.org/changeset/base/348248 Log: Make options MD_ROOT_MEM default on PPC64 Having this option enabled by default on PowerPC64 kernels makes booting ISO images much easier when on PowerNV. With it, the ISO may simply be given to the -i flag of kexec. Better yet, the ISO may be loop mounted on PetitBoot and its kernel may be used to load itself. Without this option, booting ISOs on remote PPC64 machines usually involve preparing a separate kernel, with this option enabled. Modified: head/sys/powerpc/conf/GENERIC64 Modified: head/sys/powerpc/conf/GENERIC64 ============================================================================== --- head/sys/powerpc/conf/GENERIC64 Fri May 24 17:58:29 2019 (r348247) +++ head/sys/powerpc/conf/GENERIC64 Fri May 24 18:41:31 2019 (r348248) @@ -53,6 +53,7 @@ options UFS_DIRHASH #Improve performance on big dire options UFS_GJOURNAL #Enable gjournal-based UFS journaling options QUOTA #Enable disk quotas for UFS options MD_ROOT #MD is a potential root device +options MD_ROOT_MEM #Enable use of initrd as MD root options NFSCL #Network Filesystem Client options NFSD #Network Filesystem Server options NFSLOCKD #Network Lock Manager From owner-svn-src-head@freebsd.org Fri May 24 19:43:40 2019 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 1D3DA15B3ECA; Fri, 24 May 2019 19:43:40 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9DD86751A5; Fri, 24 May 2019 19:43:39 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 747F0216B0; Fri, 24 May 2019 19:43:39 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4OJhdgD082854; Fri, 24 May 2019 19:43:39 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4OJhcWP082851; Fri, 24 May 2019 19:43:38 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201905241943.x4OJhcWP082851@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Fri, 24 May 2019 19:43:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348249 - in head/stand: . ficl libsa X-SVN-Group: head X-SVN-Commit-Author: sjg X-SVN-Commit-Paths: in head/stand: . ficl libsa X-SVN-Commit-Revision: 348249 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9DD86751A5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.94)[-0.944,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 19:43:40 -0000 Author: sjg Date: Fri May 24 19:43:38 2019 New Revision: 348249 URL: https://svnweb.freebsd.org/changeset/base/348249 Log: ficl pfopen: verify file If the file is verified - do not allow write otherwise do not allow read. Add O_ACCMODE to stand.h Reviewed by: stevek, mindal_semihalf.com MFC after: 3 days Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org/D20387 Modified: head/stand/ficl.mk head/stand/ficl/loader.c head/stand/libsa/stand.h Modified: head/stand/ficl.mk ============================================================================== --- head/stand/ficl.mk Fri May 24 18:41:31 2019 (r348248) +++ head/stand/ficl.mk Fri May 24 19:43:38 2019 (r348249) @@ -16,3 +16,7 @@ CFLAGS+= -fPIC CFLAGS+= -I${FICLSRC} -I${FICLSRC}/${FICL_CPUARCH} -I${LDRSRC} CFLAGS+= -DBF_DICTSIZE=15000 + +.if ${MK_LOADER_VERIEXEC} != "no" +CFLAGS+= -DLOADER_VERIEXEC -I${SRCTOP}/lib/libsecureboot/h +.endif Modified: head/stand/ficl/loader.c ============================================================================== --- head/stand/ficl/loader.c Fri May 24 18:41:31 2019 (r348248) +++ head/stand/ficl/loader.c Fri May 24 19:43:38 2019 (r348249) @@ -502,6 +502,23 @@ static void pfopen(FICL_VM *pVM) /* open the file */ fd = open(name, mode); +#ifdef LOADER_VERIEXEC + if (fd >= 0) { + if (verify_file(fd, name, 0, VE_GUESS) < 0) { + /* not verified writing ok but reading is not */ + if ((mode & O_ACCMODE) != O_WRONLY) { + close(fd); + fd = -1; + } + } else { + /* verified reading ok but writing is not */ + if ((mode & O_ACCMODE) != O_RDONLY) { + close(fd); + fd = -1; + } + } + } +#endif free(name); stackPushINT(pVM->pStack, fd); return; Modified: head/stand/libsa/stand.h ============================================================================== --- head/stand/libsa/stand.h Fri May 24 18:41:31 2019 (r348248) +++ head/stand/libsa/stand.h Fri May 24 19:43:38 2019 (r348249) @@ -286,6 +286,7 @@ extern int open(const char *, int); #define O_RDONLY 0x0 #define O_WRONLY 0x1 #define O_RDWR 0x2 +#define O_ACCMODE 0x3 /* NOT IMPLEMENTED */ #define O_CREAT 0x0200 /* create if nonexistent */ #define O_TRUNC 0x0400 /* truncate to zero length */ From owner-svn-src-head@freebsd.org Fri May 24 20:02:00 2019 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 728CB15B41FC; Fri, 24 May 2019 20:02:00 +0000 (UTC) (envelope-from pkubaj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 109C575A9B; Fri, 24 May 2019 20:02:00 +0000 (UTC) (envelope-from pkubaj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E24AE219FC; Fri, 24 May 2019 20:01:59 +0000 (UTC) (envelope-from pkubaj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4OK1x74091026; Fri, 24 May 2019 20:01:59 GMT (envelope-from pkubaj@FreeBSD.org) Received: (from pkubaj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4OK1xA6091025; Fri, 24 May 2019 20:01:59 GMT (envelope-from pkubaj@FreeBSD.org) Message-Id: <201905242001.x4OK1xA6091025@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pkubaj set sender to pkubaj@FreeBSD.org using -f From: Piotr Kubaj Date: Fri, 24 May 2019 20:01:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348250 - head/sys/powerpc/conf X-SVN-Group: head X-SVN-Commit-Author: pkubaj X-SVN-Commit-Paths: head/sys/powerpc/conf X-SVN-Commit-Revision: 348250 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 109C575A9B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.94)[-0.944,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 20:02:00 -0000 Author: pkubaj (ports committer) Date: Fri May 24 20:01:59 2019 New Revision: 348250 URL: https://svnweb.freebsd.org/changeset/base/348250 Log: Add snd_hda(4) to GENERIC64 used by powerpc64. amd64 also has snd_hda(4) in GENERIC. Approved by: jhibbits (src committer), linimon (mentor) Modified: head/sys/powerpc/conf/GENERIC64 Modified: head/sys/powerpc/conf/GENERIC64 ============================================================================== --- head/sys/powerpc/conf/GENERIC64 Fri May 24 19:43:38 2019 (r348249) +++ head/sys/powerpc/conf/GENERIC64 Fri May 24 20:01:59 2019 (r348250) @@ -246,6 +246,7 @@ device pmu # Sound support device sound # Generic sound driver (required) device snd_ai2s # Apple I2S audio +device snd_hda # Intel High Definition Audio device snd_uaudio # USB Audio # Netmap provides direct access to TX/RX rings on supported NICs From owner-svn-src-head@freebsd.org Fri May 24 20:17:03 2019 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 E45A015B4556; Fri, 24 May 2019 20:17:02 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 79C4D75FC7; Fri, 24 May 2019 20:17:02 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-io1-xd29.google.com with SMTP id q21so8698124iog.13; Fri, 24 May 2019 13:17:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gE9uKYq5OIQYG/EnZcwocIBTas8VGaSZaHfWk6N2Sro=; b=DuTcSBFbNKFxKER9Az/CF8C7Xd64h2jyMqXgeQxr2stPOUuCzOA2eXEv/9eTkLXB5V gLrwvLvaFI4MbsiU3Duj7XMrDBQ8ZDa8lT5yBWQ8syJouA07xKeLzwbAa0CRKvlymaOq HS1GCQ/yT/uGrttWWJvmQHVxzr5SZS9X+J806ZNJOSA7Y9WsULOsroFPH0xw/JjgNyjt x0Hv8wv/1Bpm9UbRVmvqFwt1fobZvrIyoOTZKWVRel+c5HHQ8hzoetQjmuMYrWal7mMr u/MkDngD1qL7s2DVnJvYC3QRFOlUnZl7jGWa5/uaQ21Ai0Lh+z7fAZM+4VFp/Lz50bjl kvVQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=gE9uKYq5OIQYG/EnZcwocIBTas8VGaSZaHfWk6N2Sro=; b=WoFFHuUxmtmooznZ9W+8fANuT+xgL8a1Sux6OlxzkQ9hiQu3vfpQZ+vbV1GM/r+km/ uxr/2hBQ9dwZ4/mfaslcWN71jiD43Gni1xSJ6SNbeSLyG2Ix6Fd1uYF1Z4h+1cqQH1lv enawbWzcSODWJTcxNDFvRgxwLTTINljCN9nn1vHwEMJXptRMGjHkHkMBVmucpb998lkD +44Pl35AUbMObTUGUl6KrheRGrXQ6nB/AKJVn9i6ByYYKBZ0wVOhctSfWKtGKXaPpCf2 ojnR+HQx+6wbMuEaLiAbnpk30YbLDhwMr6EPV7pl9xkr5VFhfevnyBb+BSEQhJFX2ZRU 7hYg== X-Gm-Message-State: APjAAAXUJJn6Jf6L3pSzl9MLKcZ8z//vJFIBLpSEaOd8PvelRByk/euh fZdi3R/fRiLA+2FHZ5Bl3hTt3gE+ X-Google-Smtp-Source: APXvYqzrDoX3sh5Tq0wkLT4BGwbHjugM1vALOcV8pjKBAOCONBbmpHujIhuL5gGGCKcSGUvN37si3w== X-Received: by 2002:a6b:bc02:: with SMTP id m2mr1982128iof.25.1558729021118; Fri, 24 May 2019 13:17:01 -0700 (PDT) Received: from titan.knownspace (173-25-245-129.client.mchsi.com. [173.25.245.129]) by smtp.gmail.com with ESMTPSA id w139sm1739519ita.43.2019.05.24.13.16.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 24 May 2019 13:17:00 -0700 (PDT) Date: Fri, 24 May 2019 15:16:51 -0500 From: Justin Hibbits To: Piotr Kubaj Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r348250 - head/sys/powerpc/conf Message-ID: <20190524151651.7e6b7f09@titan.knownspace> In-Reply-To: <201905242001.x4OK1xA6091025@repo.freebsd.org> References: <201905242001.x4OK1xA6091025@repo.freebsd.org> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; powerpc64-portbld-freebsd13.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 79C4D75FC7 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.96)[-0.962,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 20:17:03 -0000 On Fri, 24 May 2019 20:01:59 +0000 (UTC) Piotr Kubaj wrote: > Author: pkubaj (ports committer) > Date: Fri May 24 20:01:59 2019 > New Revision: 348250 > URL: https://svnweb.freebsd.org/changeset/base/348250 > > Log: > Add snd_hda(4) to GENERIC64 used by powerpc64. > > amd64 also has snd_hda(4) in GENERIC. > > Approved by: jhibbits (src committer), linimon (mentor) > > Modified: > head/sys/powerpc/conf/GENERIC64 > > Modified: head/sys/powerpc/conf/GENERIC64 > ============================================================================== > --- head/sys/powerpc/conf/GENERIC64 Fri May 24 19:43:38 > 2019 (r348249) +++ head/sys/powerpc/conf/GENERIC64 Fri > May 24 20:01:59 2019 (r348250) @@ -246,6 +246,7 @@ > device pmu # Sound support > device sound # Generic sound driver > (required) device snd_ai2s # Apple I2S audio > +device snd_hda # Intel High Definition > Audio device snd_uaudio # USB Audio > > # Netmap provides direct access to TX/RX rings on supported NICs > To note: This was done because there's a strange bug in the snd_hda module, with the hdaa component. For some reason it either doesn't find all the internal components it needs, or something, because there's a NULL dereference when trying to call a kobj method in hdaa_attach(). - Justin From owner-svn-src-head@freebsd.org Fri May 24 20:22:53 2019 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 66C2B15B480B; Fri, 24 May 2019 20:22:53 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F1BD576576; Fri, 24 May 2019 20:22:52 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 965D4AA14; Fri, 24 May 2019 20:22:52 +0000 (UTC) Date: Fri, 24 May 2019 20:22:52 +0000 From: Alexey Dokuchaev To: Justin Hibbits Cc: Piotr Kubaj , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r348250 - head/sys/powerpc/conf Message-ID: <20190524202252.GA72774@FreeBSD.org> References: <201905242001.x4OK1xA6091025@repo.freebsd.org> <20190524151651.7e6b7f09@titan.knownspace> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190524151651.7e6b7f09@titan.knownspace> User-Agent: Mutt/1.11.4 (2019-03-13) X-Rspamd-Queue-Id: F1BD576576 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.955,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 20:22:53 -0000 On Fri, May 24, 2019 at 03:16:51PM -0500, Justin Hibbits wrote: > On Fri, 24 May 2019 20:01:59 +0000 (UTC) Piotr Kubaj wrote: > > New Revision: 348250 > > URL: https://svnweb.freebsd.org/changeset/base/348250 > > > > Log: > > Add snd_hda(4) to GENERIC64 used by powerpc64. > > > > amd64 also has snd_hda(4) in GENERIC. > > > > Modified: > > head/sys/powerpc/conf/GENERIC64 > > ... > > To note: This was done because there's a strange bug in the snd_hda > module, with the hdaa component. For some reason it either doesn't > find all the internal components it needs, or something, because > there's a NULL dereference when trying to call a kobj method in > hdaa_attach(). So this commit essentially masks the real bug somewhere rather than fixing it, is this what you're saying? ./danfe From owner-svn-src-head@freebsd.org Fri May 24 20:27:53 2019 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 9A6D415B490F; Fri, 24 May 2019 20:27:53 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3986676794; Fri, 24 May 2019 20:27:53 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0ECCB21D81; Fri, 24 May 2019 20:27:53 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4OKRq45004498; Fri, 24 May 2019 20:27:52 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4OKRonA004487; Fri, 24 May 2019 20:27:50 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201905242027.x4OKRonA004487@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 24 May 2019 20:27:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348251 - in head/sys: fs/ext2fs fs/fuse fs/msdosfs fs/nfsclient kern sys ufs/ffs X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in head/sys: fs/ext2fs fs/fuse fs/msdosfs fs/nfsclient kern sys ufs/ffs X-SVN-Commit-Revision: 348251 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3986676794 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.947,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 20:27:53 -0000 Author: asomers Date: Fri May 24 20:27:50 2019 New Revision: 348251 URL: https://svnweb.freebsd.org/changeset/base/348251 Log: Remove "struct ucred*" argument from vtruncbuf vtruncbuf takes a "struct ucred*" argument. AFAICT, it's been unused ever since that function was first added in r34611. Remove it. Also, remove some "struct ucred" arguments from fuse and nfs functions that were only used by vtruncbuf. Reviewed by: cem MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20377 Modified: head/sys/fs/ext2fs/ext2_inode.c head/sys/fs/fuse/fuse_io.c head/sys/fs/fuse/fuse_node.c head/sys/fs/fuse/fuse_node.h head/sys/fs/fuse/fuse_vnops.c head/sys/fs/msdosfs/msdosfs_denode.c head/sys/fs/nfsclient/nfs.h head/sys/fs/nfsclient/nfs_clbio.c head/sys/fs/nfsclient/nfs_clvnops.c head/sys/kern/vfs_subr.c head/sys/sys/vnode.h head/sys/ufs/ffs/ffs_inode.c Modified: head/sys/fs/ext2fs/ext2_inode.c ============================================================================== --- head/sys/fs/ext2fs/ext2_inode.c Fri May 24 20:01:59 2019 (r348250) +++ head/sys/fs/ext2fs/ext2_inode.c Fri May 24 20:27:50 2019 (r348251) @@ -356,7 +356,7 @@ ext2_ind_truncate(struct vnode *vp, off_t length, int oip->i_ib[i] = oldblks[EXT2_NDADDR + i]; } oip->i_size = osize; - error = vtruncbuf(ovp, cred, length, (int)fs->e2fs_bsize); + error = vtruncbuf(ovp, length, (int)fs->e2fs_bsize); if (error && (allerror == 0)) allerror = error; vnode_pager_setsize(ovp, length); @@ -530,7 +530,7 @@ ext2_ext_truncate(struct vnode *vp, off_t length, int } oip->i_size = osize; - error = vtruncbuf(ovp, cred, length, (int)fs->e2fs_bsize); + error = vtruncbuf(ovp, length, (int)fs->e2fs_bsize); if (error) return (error); Modified: head/sys/fs/fuse/fuse_io.c ============================================================================== --- head/sys/fs/fuse/fuse_io.c Fri May 24 20:01:59 2019 (r348250) +++ head/sys/fs/fuse/fuse_io.c Fri May 24 20:27:50 2019 (r348251) @@ -389,7 +389,7 @@ fuse_write_directbackend(struct vnode *vp, struct uio if (uio->uio_offset > fvdat->filesize && fuse_data_cache_mode != FUSE_CACHE_UC) { - fuse_vnode_setsize(vp, cred, uio->uio_offset); + fuse_vnode_setsize(vp, uio->uio_offset); fvdat->flag &= ~FN_SIZECHANGE; } } @@ -462,7 +462,7 @@ again: if (bp != NULL) { long save; - err = fuse_vnode_setsize(vp, cred, + err = fuse_vnode_setsize(vp, uio->uio_offset + n); if (err) { brelse(bp); @@ -490,7 +490,7 @@ again: lbn, on, n, uio, bcount, false); bp = getblk(vp, lbn, bcount, PCATCH, 0, 0); if (bp && uio->uio_offset + n > fvdat->filesize) { - err = fuse_vnode_setsize(vp, cred, + err = fuse_vnode_setsize(vp, uio->uio_offset + n); if (err) { brelse(bp); Modified: head/sys/fs/fuse/fuse_node.c ============================================================================== --- head/sys/fs/fuse/fuse_node.c Fri May 24 20:01:59 2019 (r348250) +++ head/sys/fs/fuse/fuse_node.c Fri May 24 20:27:50 2019 (r348251) @@ -408,7 +408,7 @@ fuse_vnode_refreshsize(struct vnode *vp, struct ucred } int -fuse_vnode_setsize(struct vnode *vp, struct ucred *cred, off_t newsize) +fuse_vnode_setsize(struct vnode *vp, off_t newsize) { struct fuse_vnode_data *fvdat = VTOFUD(vp); off_t oldsize; @@ -421,7 +421,7 @@ fuse_vnode_setsize(struct vnode *vp, struct ucred *cre fvdat->flag |= FN_SIZECHANGE; if (newsize < oldsize) { - err = vtruncbuf(vp, cred, newsize, fuse_iosize(vp)); + err = vtruncbuf(vp, newsize, fuse_iosize(vp)); } vnode_pager_setsize(vp, newsize); return err; Modified: head/sys/fs/fuse/fuse_node.h ============================================================================== --- head/sys/fs/fuse/fuse_node.h Fri May 24 20:01:59 2019 (r348250) +++ head/sys/fs/fuse/fuse_node.h Fri May 24 20:27:50 2019 (r348251) @@ -127,6 +127,6 @@ void fuse_vnode_refreshsize(struct vnode *vp, struct u int fuse_vnode_savesize(struct vnode *vp, struct ucred *cred); -int fuse_vnode_setsize(struct vnode *vp, struct ucred *cred, off_t newsize); +int fuse_vnode_setsize(struct vnode *vp, off_t newsize); #endif /* _FUSE_NODE_H_ */ Modified: head/sys/fs/fuse/fuse_vnops.c ============================================================================== --- head/sys/fs/fuse/fuse_vnops.c Fri May 24 20:01:59 2019 (r348250) +++ head/sys/fs/fuse/fuse_vnops.c Fri May 24 20:27:50 2019 (r348251) @@ -530,7 +530,7 @@ fuse_vnop_getattr(struct vop_getattr_args *ap) fdi.answ)->attr.size; if (fvdat->filesize != new_filesize) { - fuse_vnode_setsize(vp, cred, new_filesize); + fuse_vnode_setsize(vp, new_filesize); fvdat->flag &= ~FN_SIZECHANGE; } } @@ -971,7 +971,7 @@ calldaemon: "%s!\n", __func__, vnode_mount(vp)->mnt_stat.f_mntonname); - (void)fuse_vnode_setsize(vp, cred, fattr->size); + (void)fuse_vnode_setsize(vp, fattr->size); fvdat->flag &= ~FN_SIZECHANGE; } *vpp = vp; @@ -1654,7 +1654,7 @@ fuse_vnop_setattr(struct vop_setattr_args *ap) out: fdisp_destroy(&fdi); if (!err && sizechanged) { - fuse_vnode_setsize(vp, cred, newsize); + fuse_vnode_setsize(vp, newsize); VTOFUD(vp)->flag &= ~FN_SIZECHANGE; } return err; Modified: head/sys/fs/msdosfs/msdosfs_denode.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_denode.c Fri May 24 20:01:59 2019 (r348250) +++ head/sys/fs/msdosfs/msdosfs_denode.c Fri May 24 20:27:50 2019 (r348251) @@ -429,7 +429,7 @@ detrunc(struct denode *dep, u_long length, int flags, dep->de_FileSize = length; if (!isadir) dep->de_flag |= DE_UPDATE | DE_MODIFIED; - allerror = vtruncbuf(DETOV(dep), cred, length, pmp->pm_bpcluster); + allerror = vtruncbuf(DETOV(dep), length, pmp->pm_bpcluster); #ifdef MSDOSFS_DEBUG if (allerror) printf("detrunc(): vtruncbuf error %d\n", allerror); Modified: head/sys/fs/nfsclient/nfs.h ============================================================================== --- head/sys/fs/nfsclient/nfs.h Fri May 24 20:01:59 2019 (r348250) +++ head/sys/fs/nfsclient/nfs.h Fri May 24 20:27:50 2019 (r348251) @@ -91,8 +91,7 @@ enum nfsiod_state { /* * Function prototypes. */ -int ncl_meta_setsize(struct vnode *, struct ucred *, struct thread *, - u_quad_t); +int ncl_meta_setsize(struct vnode *, struct thread *, u_quad_t); void ncl_doio_directwrite(struct buf *); int ncl_bioread(struct vnode *, struct uio *, int, struct ucred *); int ncl_biowrite(struct vnode *, struct uio *, int, struct ucred *); Modified: head/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clbio.c Fri May 24 20:01:59 2019 (r348250) +++ head/sys/fs/nfsclient/nfs_clbio.c Fri May 24 20:27:50 2019 (r348251) @@ -1832,7 +1832,7 @@ ncl_doio(struct vnode *vp, struct buf *bp, struct ucre */ int -ncl_meta_setsize(struct vnode *vp, struct ucred *cred, struct thread *td, u_quad_t nsize) +ncl_meta_setsize(struct vnode *vp, struct thread *td, u_quad_t nsize) { struct nfsnode *np = VTONFS(vp); u_quad_t tsize; @@ -1854,7 +1854,7 @@ ncl_meta_setsize(struct vnode *vp, struct ucred *cred, * truncation point. We may have a B_DELWRI and/or B_CACHE * buffer that now needs to be truncated. */ - error = vtruncbuf(vp, cred, nsize, biosize); + error = vtruncbuf(vp, nsize, biosize); lbn = nsize / biosize; bufsize = nsize - (lbn * biosize); bp = nfs_getcacheblk(vp, lbn, bufsize, td); Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Fri May 24 20:01:59 2019 (r348250) +++ head/sys/fs/nfsclient/nfs_clvnops.c Fri May 24 20:27:50 2019 (r348251) @@ -979,8 +979,7 @@ nfs_setattr(struct vop_setattr_args *ap) mtx_lock(&np->n_mtx); tsize = np->n_size; mtx_unlock(&np->n_mtx); - error = ncl_meta_setsize(vp, ap->a_cred, td, - vap->va_size); + error = ncl_meta_setsize(vp, td, vap->va_size); mtx_lock(&np->n_mtx); if (np->n_flag & NMODIFIED) { tsize = np->n_size; Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Fri May 24 20:01:59 2019 (r348250) +++ head/sys/kern/vfs_subr.c Fri May 24 20:27:50 2019 (r348251) @@ -1863,15 +1863,15 @@ again: * sync activity. */ int -vtruncbuf(struct vnode *vp, struct ucred *cred, off_t length, int blksize) +vtruncbuf(struct vnode *vp, off_t length, int blksize) { struct buf *bp, *nbp; int anyfreed; daddr_t trunclbn; struct bufobj *bo; - CTR5(KTR_VFS, "%s: vp %p with cred %p and block %d:%ju", __func__, - vp, cred, blksize, (uintmax_t)length); + CTR4(KTR_VFS, "%s: vp %p with block %d:%ju", __func__, + vp, blksize, (uintmax_t)length); /* * Round up to the *next* lbn. Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Fri May 24 20:01:59 2019 (r348250) +++ head/sys/sys/vnode.h Fri May 24 20:27:50 2019 (r348251) @@ -658,8 +658,7 @@ void vgone(struct vnode *vp); void _vhold(struct vnode *, bool); void vinactive(struct vnode *, struct thread *); int vinvalbuf(struct vnode *vp, int save, int slpflag, int slptimeo); -int vtruncbuf(struct vnode *vp, struct ucred *cred, off_t length, - int blksize); +int vtruncbuf(struct vnode *vp, off_t length, int blksize); void vunref(struct vnode *); void vn_printf(struct vnode *vp, const char *fmt, ...) __printflike(2,3); int vrecycle(struct vnode *vp); Modified: head/sys/ufs/ffs/ffs_inode.c ============================================================================== --- head/sys/ufs/ffs/ffs_inode.c Fri May 24 20:01:59 2019 (r348250) +++ head/sys/ufs/ffs/ffs_inode.c Fri May 24 20:27:50 2019 (r348251) @@ -509,7 +509,7 @@ ffs_truncate(vp, length, flags, cred) ip->i_size = osize; DIP_SET(ip, i_size, osize); - error = vtruncbuf(vp, cred, length, fs->fs_bsize); + error = vtruncbuf(vp, length, fs->fs_bsize); if (error && (allerror == 0)) allerror = error; From owner-svn-src-head@freebsd.org Fri May 24 20:29:54 2019 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 D576715B4A38; Fri, 24 May 2019 20:29:53 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-it1-x12a.google.com (mail-it1-x12a.google.com [IPv6:2607:f8b0:4864:20::12a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6DB4676960; Fri, 24 May 2019 20:29:53 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-it1-x12a.google.com with SMTP id m140so15632466itg.2; Fri, 24 May 2019 13:29:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IdbtFmNn57k6PHikOarFxmgA6CJXY2FsQWr8DBef3Sk=; b=Dhe+C0nzsyh/MLAfzk+HdkuPvemk2fDt8HrVc0weCqPHafhXY1wniLAt2fYY6r7opL uyOvHhYqGS7LnT4uPS1keQEkQWYe/gAj6NNmHBTXMpV7d+WNgnjh740J5PWiPXifZGqL YlCS3MH14LNm6fco7Pnscvjn7b3qrQsY1aFy05BP6Wy+IhffFfbFPU8mbynezllbUBWs P56dmXnkVIUz2WAI5E2ho/xNPS2+JG7b/lb8hg0DWZnrx0gGSZ5vMbcPujGVw5UJwiZO BpeYD1PvvPw15swgpl+D4udi/dioN8PQH0Y3JLyJh/mkRNibLNIvIBZI14EqAFEYVL7/ 0I+A== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=IdbtFmNn57k6PHikOarFxmgA6CJXY2FsQWr8DBef3Sk=; b=OBjy/s1FTX64wd6L208au+1E4Q8GpTcjLbeXt4NRbe+qqBQWZvIG8m7QlO5JG60PUj YXRqc/kzN+d+KQrf74ctm1ssR6cVtI2dVVvNw0IXjVR1ZuX2k3KtGcicNFl0qWhrHQQz w2K8Ah+0rwitLRUfw6su2vWNhCF0k774rjRn+RjZFJCViK/wZ4oa0BZy4Ba0scg8H5ul Rxtv6KMz2wd9biIDMggDcKRhyu3631/+n0BXmgD/xwvH55vLbNFlDzHcoICDhohv95Au hcH8NcoXKEuwI2Ffi9t3++dAlsyKfb6tUt8U/NcIw/l/uHkeSbQyfARTd7Z5B9MVer7z z8WA== X-Gm-Message-State: APjAAAV0faEcGagUTSCQUEprTjcgF/aoze41zCPI2wzyoWutHJtelahS 1kZ4ohewMg3p4EhJ0e0Yx864EqcItmw= X-Google-Smtp-Source: APXvYqxswZdeAHU6KzFw3GQmiehRHo7UxbSAn1TxQQ0U7obAyAlE9JU7BLeSgI/qr0IKsZATTn52pw== X-Received: by 2002:a02:b47:: with SMTP id 68mr24430096jad.66.1558729792351; Fri, 24 May 2019 13:29:52 -0700 (PDT) Received: from titan.knownspace (173-25-245-129.client.mchsi.com. [173.25.245.129]) by smtp.gmail.com with ESMTPSA id e2sm1596066ith.39.2019.05.24.13.29.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 24 May 2019 13:29:52 -0700 (PDT) Date: Fri, 24 May 2019 15:29:41 -0500 From: Justin Hibbits To: Alexey Dokuchaev Cc: Piotr Kubaj , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r348250 - head/sys/powerpc/conf Message-ID: <20190524152941.40f7e239@titan.knownspace> In-Reply-To: <20190524202252.GA72774@FreeBSD.org> References: <201905242001.x4OK1xA6091025@repo.freebsd.org> <20190524151651.7e6b7f09@titan.knownspace> <20190524202252.GA72774@FreeBSD.org> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; powerpc64-portbld-freebsd13.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 6DB4676960 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.97)[-0.969,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 20:29:54 -0000 On Fri, 24 May 2019 20:22:52 +0000 Alexey Dokuchaev wrote: > On Fri, May 24, 2019 at 03:16:51PM -0500, Justin Hibbits wrote: > > On Fri, 24 May 2019 20:01:59 +0000 (UTC) Piotr Kubaj wrote: > > > New Revision: 348250 > > > URL: https://svnweb.freebsd.org/changeset/base/348250 > > > > > > Log: > > > Add snd_hda(4) to GENERIC64 used by powerpc64. > > > > > > amd64 also has snd_hda(4) in GENERIC. > > > > > > Modified: > > > head/sys/powerpc/conf/GENERIC64 > > > ... > > > > To note: This was done because there's a strange bug in the snd_hda > > module, with the hdaa component. For some reason it either doesn't > > find all the internal components it needs, or something, because > > there's a NULL dereference when trying to call a kobj method in > > hdaa_attach(). > > So this commit essentially masks the real bug somewhere rather than > fixing it, is this what you're saying? > > ./danfe It's a viable workaround to a problem that reaches a wide audience. Since it works built-in, I found it acceptable. I probably should have filed a bug for it a year ago when I hit it and worked around it, but it could also very well be a compiler issue. By the way, it works fine on powerpc (32-bit) loaded as a module. - Justin From owner-svn-src-head@freebsd.org Fri May 24 22:11:38 2019 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 2009415B65C2; Fri, 24 May 2019 22:11:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B790481E3D; Fri, 24 May 2019 22:11:37 +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 82AF422FF6; Fri, 24 May 2019 22:11:37 +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 x4OMBbp5060451; Fri, 24 May 2019 22:11:37 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4OMBbLc060450; Fri, 24 May 2019 22:11:37 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201905242211.x4OMBbLc060450@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 24 May 2019 22:11:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348253 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 348253 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B790481E3D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 22:11:38 -0000 Author: jhb Date: Fri May 24 22:11:37 2019 New Revision: 348253 URL: https://svnweb.freebsd.org/changeset/base/348253 Log: Add initial support for 'qSupported' to the debug server. This doesn't recognize any features yet, but does parse the features string. It advertises an arbitrary packet size of 4k. Reviewed by: markj, Scott Phillips MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D20308 Modified: head/usr.sbin/bhyve/gdb.c Modified: head/usr.sbin/bhyve/gdb.c ============================================================================== --- head/usr.sbin/bhyve/gdb.c Fri May 24 20:36:07 2019 (r348252) +++ head/usr.sbin/bhyve/gdb.c Fri May 24 22:11:37 2019 (r348253) @@ -993,13 +993,72 @@ command_equals(const uint8_t *data, size_t len, const } static void +check_features(const uint8_t *data, size_t len) +{ + char *feature, *next_feature, *str, *value; + bool supported; + + str = malloc(len + 1); + memcpy(str, data, len); + str[len] = '\0'; + next_feature = str; + + while ((feature = strsep(&next_feature, ";")) != NULL) { + /* + * Null features shouldn't exist, but skip if they + * do. + */ + if (strcmp(feature, "") == 0) + continue; + + /* + * Look for the value or supported / not supported + * flag. + */ + value = strchr(feature, '='); + if (value != NULL) { + *value = '\0'; + value++; + supported = true; + } else { + value = feature + strlen(feature) - 1; + switch (*value) { + case '+': + supported = true; + break; + case '-': + supported = false; + break; + default: + /* + * This is really a protocol error, + * but we just ignore malformed + * features for ease of + * implementation. + */ + continue; + } + value = NULL; + } + + /* No currently supported features. */ + } + free(str); + + start_packet(); + + /* This is an arbitrary limit. */ + append_string("PacketSize=4096"); + finish_packet(); +} + +static void gdb_query(const uint8_t *data, size_t len) { /* * TODO: * - qSearch - * - qSupported */ if (command_equals(data, len, "qAttached")) { start_packet(); @@ -1037,6 +1096,10 @@ gdb_query(const uint8_t *data, size_t len) start_packet(); append_char('l'); finish_packet(); + } else if (command_equals(data, len, "qSupported")) { + data += strlen("qSupported"); + len -= strlen("qSupported"); + check_features(data, len); } else if (command_equals(data, len, "qThreadExtraInfo")) { char buf[16]; int tid; From owner-svn-src-head@freebsd.org Fri May 24 22:30:45 2019 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 8DEE715B6A62; Fri, 24 May 2019 22:30:45 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3B1468269C; Fri, 24 May 2019 22:30:45 +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 177152323A; Fri, 24 May 2019 22:30:45 +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 x4OMUjHn067069; Fri, 24 May 2019 22:30:45 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4OMUfMo067047; Fri, 24 May 2019 22:30:41 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201905242230.x4OMUfMo067047@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 24 May 2019 22:30:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348254 - in head/sys: dev/cxgbe dev/mlx5/mlx5_en kern net net80211 netinet netinet6 netpfil/ipfw sys X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/sys: dev/cxgbe dev/mlx5/mlx5_en kern net net80211 netinet netinet6 netpfil/ipfw sys X-SVN-Commit-Revision: 348254 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3B1468269C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 22:30:45 -0000 Author: jhb Date: Fri May 24 22:30:40 2019 New Revision: 348254 URL: https://svnweb.freebsd.org/changeset/base/348254 Log: Restructure mbuf send tags to provide stronger guarantees. - Perform ifp mismatch checks (to determine if a send tag is allocated for a different ifp than the one the packet is being output on), in ip_output() and ip6_output(). This avoids sending packets with send tags to ifnet drivers that don't support send tags. Since we are now checking for ifp mismatches before invoking if_output, we can now try to allocate a new tag before invoking if_output sending the original packet on the new tag if allocation succeeds. To avoid code duplication for the fragment and unfragmented cases, add ip_output_send() and ip6_output_send() as wrappers around if_output and nd6_output_ifp, respectively. All of the logic for setting send tags and dealing with send tag-related errors is done in these wrapper functions. For pseudo interfaces that wrap other network interfaces (vlan and lagg), wrapper send tags are now allocated so that ip*_output see the wrapper ifp as the ifp in the send tag. The if_transmit routines rewrite the send tags after performing an ifp mismatch check. If an ifp mismatch is detected, the transmit routines fail with EAGAIN. - To provide clearer life cycle management of send tags, especially in the presence of vlan and lagg wrapper tags, add a reference count to send tags managed via m_snd_tag_ref() and m_snd_tag_rele(). Provide a helper function (m_snd_tag_init()) for use by drivers supporting send tags. m_snd_tag_init() takes care of the if_ref on the ifp meaning that code alloating send tags via if_snd_tag_alloc no longer has to manage that manually. Similarly, m_snd_tag_rele drops the refcount on the ifp after invoking if_snd_tag_free when the last reference to a send tag is dropped. This also closes use after free races if there are pending packets in driver tx rings after the socket is closed (e.g. from tcpdrop). In order for m_free to work reliably, add a new CSUM_SND_TAG flag in csum_flags to indicate 'snd_tag' is set (rather than 'rcvif'). Drivers now also check this flag instead of checking snd_tag against NULL. This avoids false positive matches when a forwarded packet has a non-NULL rcvif that was treated as a send tag. - cxgbe was relying on snd_tag_free being called when the inp was detached so that it could kick the firmware to flush any pending work on the flow. This is because the driver doesn't require ACK messages from the firmware for every request, but instead does a kind of manual interrupt coalescing by only setting a flag to request a completion on a subset of requests. If all of the in-flight requests don't have the flag when the tag is detached from the inp, the flow might never return the credits. The current snd_tag_free command issues a flush command to force the credits to return. However, the credit return is what also frees the mbufs, and since those mbufs now hold references on the tag, this meant that snd_tag_free would never be called. To fix, explicitly drop the mbuf's reference on the snd tag when the mbuf is queued in the firmware work queue. This means that once the inp's reference on the tag goes away and all in-flight mbufs have been queued to the firmware, tag's refcount will drop to zero and snd_tag_free will kick in and send the flush request. Note that we need to avoid doing this in the middle of ethofld_tx(), so the driver grabs a temporary reference on the tag around that loop to defer the free to the end of the function in case it sends the last mbuf to the queue after the inp has dropped its reference on the tag. - mlx5 preallocates send tags and was using the ifp pointer even when the send tag wasn't in use. Explicitly use the ifp from other data structures instead. - Sprinkle some assertions in various places to assert that received packets don't have a send tag, and that other places that overwrite rcvif (e.g. 802.11 transmit) don't clobber a send tag pointer. Reviewed by: gallatin, hselasky, rgrimes, ae Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D20117 Modified: head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/t4_sched.c head/sys/dev/cxgbe/t4_sge.c head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c head/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c head/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c head/sys/kern/kern_mbuf.c head/sys/kern/uipc_mbuf.c head/sys/net/bpf.c head/sys/net/if.c head/sys/net/if_ethersubr.c head/sys/net/if_lagg.c head/sys/net/if_vlan.c head/sys/net/netisr.c head/sys/net80211/ieee80211_hwmp.c head/sys/net80211/ieee80211_mesh.c head/sys/net80211/ieee80211_output.c head/sys/net80211/ieee80211_wds.c head/sys/netinet/in_pcb.c head/sys/netinet/ip_output.c head/sys/netinet6/ip6_output.c head/sys/netpfil/ipfw/ip_fw2.c head/sys/sys/mbuf.h Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Fri May 24 22:11:37 2019 (r348253) +++ head/sys/dev/cxgbe/t4_main.c Fri May 24 22:30:40 2019 (r348254) @@ -2057,13 +2057,8 @@ cxgbe_transmit(struct ifnet *ifp, struct mbuf *m) return (rc); } #ifdef RATELIMIT - if (m->m_pkthdr.snd_tag != NULL) { - /* EAGAIN tells the stack we are not the correct interface. */ - if (__predict_false(ifp != m->m_pkthdr.snd_tag->ifp)) { - m_freem(m); - return (EAGAIN); - } - + if (m->m_pkthdr.csum_flags & CSUM_SND_TAG) { + MPASS(m->m_pkthdr.snd_tag->ifp == ifp); return (ethofld_transmit(ifp, m)); } #endif Modified: head/sys/dev/cxgbe/t4_sched.c ============================================================================== --- head/sys/dev/cxgbe/t4_sched.c Fri May 24 22:11:37 2019 (r348253) +++ head/sys/dev/cxgbe/t4_sched.c Fri May 24 22:30:40 2019 (r348254) @@ -789,7 +789,7 @@ failed: mtx_init(&cst->lock, "cst_lock", NULL, MTX_DEF); mbufq_init(&cst->pending_tx, INT_MAX); mbufq_init(&cst->pending_fwack, INT_MAX); - cst->com.ifp = ifp; + m_snd_tag_init(&cst->com, ifp); cst->flags |= EO_FLOWC_PENDING | EO_SND_TAG_REF; cst->adapter = sc; cst->port_id = pi->port_id; Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Fri May 24 22:11:37 2019 (r348253) +++ head/sys/dev/cxgbe/t4_sge.c Fri May 24 22:30:40 2019 (r348254) @@ -2325,7 +2325,7 @@ static inline int needs_eo(struct mbuf *m) { - return (m->m_pkthdr.snd_tag != NULL); + return (m->m_pkthdr.csum_flags & CSUM_SND_TAG); } #endif @@ -2539,8 +2539,11 @@ restart: * checksumming is enabled. needs_l4_csum happens to check for all the * right things. */ - if (__predict_false(needs_eo(m0) && !needs_l4_csum(m0))) + if (__predict_false(needs_eo(m0) && !needs_l4_csum(m0))) { + m_snd_tag_rele(m0->m_pkthdr.snd_tag); m0->m_pkthdr.snd_tag = NULL; + m0->m_pkthdr.csum_flags &= ~CSUM_SND_TAG; + } #endif if (!needs_tso(m0) && @@ -5922,6 +5925,21 @@ ethofld_tx(struct cxgbe_snd_tag *cst) cst->tx_nocompl = 0; } (void) mbufq_dequeue(&cst->pending_tx); + + /* + * Drop the mbuf's reference on the tag now rather + * than waiting until m_freem(). This ensures that + * cxgbe_snd_tag_free gets called when the inp drops + * its reference on the tag and there are no more + * mbufs in the pending_tx queue and can flush any + * pending requests. Otherwise if the last mbuf + * doesn't request a completion the etid will never be + * released. + */ + m->m_pkthdr.snd_tag = NULL; + m->m_pkthdr.csum_flags &= ~CSUM_SND_TAG; + m_snd_tag_rele(&cst->com); + mbufq_enqueue(&cst->pending_fwack, m); } } @@ -5933,6 +5951,7 @@ ethofld_transmit(struct ifnet *ifp, struct mbuf *m0) int rc; MPASS(m0->m_nextpkt == NULL); + MPASS(m0->m_pkthdr.csum_flags & CSUM_SND_TAG); MPASS(m0->m_pkthdr.snd_tag != NULL); cst = mst_to_cst(m0->m_pkthdr.snd_tag); @@ -5967,8 +5986,18 @@ ethofld_transmit(struct ifnet *ifp, struct mbuf *m0) mbufq_enqueue(&cst->pending_tx, m0); cst->plen += m0->m_pkthdr.len; + /* + * Hold an extra reference on the tag while generating work + * requests to ensure that we don't try to free the tag during + * ethofld_tx() in case we are sending the final mbuf after + * the inp was freed. + */ + m_snd_tag_ref(&cst->com); ethofld_tx(cst); - rc = 0; + mtx_unlock(&cst->lock); + m_snd_tag_rele(&cst->com); + return (0); + done: mtx_unlock(&cst->lock); if (__predict_false(rc != 0)) @@ -6015,7 +6044,6 @@ ethofld_fw4_ack(struct sge_iq *iq, const struct rss_he cst->flags &= ~EO_FLUSH_RPL_PENDING; cst->tx_credits += cpl->credits; -freetag: cxgbe_snd_tag_free_locked(cst); return (0); /* cst is gone. */ } @@ -6033,21 +6061,26 @@ freetag: cst->tx_credits += cpl->credits; MPASS(cst->tx_credits <= cst->tx_total); - m = mbufq_first(&cst->pending_tx); - if (m != NULL && cst->tx_credits >= mbuf_eo_len16(m)) - ethofld_tx(cst); - - if (__predict_false((cst->flags & EO_SND_TAG_REF) == 0) && - cst->ncompl == 0) { - if (cst->tx_credits == cst->tx_total) - goto freetag; - else { - MPASS((cst->flags & EO_FLUSH_RPL_PENDING) == 0); - send_etid_flush_wr(cst); - } + if (cst->flags & EO_SND_TAG_REF) { + /* + * As with ethofld_transmit(), hold an extra reference + * so that the tag is stable across ethold_tx(). + */ + m_snd_tag_ref(&cst->com); + m = mbufq_first(&cst->pending_tx); + if (m != NULL && cst->tx_credits >= mbuf_eo_len16(m)) + ethofld_tx(cst); + mtx_unlock(&cst->lock); + m_snd_tag_rele(&cst->com); + } else { + /* + * There shouldn't be any pending packets if the tag + * was freed by the kernel since any pending packet + * should hold a reference to the tag. + */ + MPASS(mbufq_first(&cst->pending_tx) == NULL); + mtx_unlock(&cst->lock); } - - mtx_unlock(&cst->lock); return (0); } Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri May 24 22:11:37 2019 (r348253) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri May 24 22:30:40 2019 (r348254) @@ -1247,7 +1247,7 @@ mlx5e_create_rq(struct mlx5e_channel *c, wq_sz = mlx5_wq_ll_get_size(&rq->wq); - err = -tcp_lro_init_args(&rq->lro, c->tag.m_snd_tag.ifp, TCP_LRO_ENTRIES, wq_sz); + err = -tcp_lro_init_args(&rq->lro, priv->ifp, TCP_LRO_ENTRIES, wq_sz); if (err) goto err_rq_wq_destroy; @@ -1288,7 +1288,7 @@ mlx5e_create_rq(struct mlx5e_channel *c, } } - rq->ifp = c->tag.m_snd_tag.ifp; + rq->ifp = priv->ifp; rq->channel = c; rq->ix = c->ix; @@ -2145,7 +2145,6 @@ mlx5e_open_channel(struct mlx5e_priv *priv, int ix, c->priv = priv; c->ix = ix; /* setup send tag */ - c->tag.m_snd_tag.ifp = priv->ifp; c->tag.type = IF_SND_TAG_TYPE_UNLIMITED; c->mkey_be = cpu_to_be32(priv->mr.key); c->num_tc = priv->num_tc; @@ -3987,6 +3986,8 @@ mlx5e_ul_snd_tag_alloc(struct ifnet *ifp, if (unlikely(pch->sq[0].running == 0)) return (ENXIO); mlx5e_ref_channel(priv); + MPASS(pch->tag.m_snd_tag.refcount == 0); + m_snd_tag_init(&pch->tag.m_snd_tag, ifp); *ppmt = &pch->tag.m_snd_tag; return (0); } Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c Fri May 24 22:11:37 2019 (r348253) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c Fri May 24 22:30:40 2019 (r348254) @@ -843,7 +843,6 @@ mlx5e_rl_init(struct mlx5e_priv *priv) for (i = 0; i < rl->param.tx_channels_per_worker_def; i++) { struct mlx5e_rl_channel *channel = rlw->channels + i; channel->worker = rlw; - channel->tag.m_snd_tag.ifp = priv->ifp; channel->tag.type = IF_SND_TAG_TYPE_RATE_LIMIT; STAILQ_INSERT_TAIL(&rlw->index_list_head, channel, entry); } @@ -1127,6 +1126,8 @@ mlx5e_rl_snd_tag_alloc(struct ifnet *ifp, } /* store pointer to mbuf tag */ + MPASS(channel->tag.m_snd_tag.refcount == 0); + m_snd_tag_init(&channel->tag.m_snd_tag, ifp); *ppmt = &channel->tag.m_snd_tag; done: return (error); Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Fri May 24 22:11:37 2019 (r348253) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Fri May 24 22:30:40 2019 (r348254) @@ -83,10 +83,6 @@ mlx5e_select_queue_by_send_tag(struct ifnet *ifp, stru struct mlx5e_snd_tag *ptag; struct mlx5e_sq *sq; - /* check for route change */ - if (mb->m_pkthdr.snd_tag->ifp != ifp) - return (NULL); - /* get pointer to sendqueue */ ptag = container_of(mb->m_pkthdr.snd_tag, struct mlx5e_snd_tag, m_snd_tag); @@ -609,21 +605,10 @@ mlx5e_xmit(struct ifnet *ifp, struct mbuf *mb) struct mlx5e_sq *sq; int ret; - if (mb->m_pkthdr.snd_tag != NULL) { + if (mb->m_pkthdr.csum_flags & CSUM_SND_TAG) { + MPASS(mb->m_pkthdr.snd_tag->ifp == ifp); sq = mlx5e_select_queue_by_send_tag(ifp, mb); if (unlikely(sq == NULL)) { - /* Check for route change */ - if (mb->m_pkthdr.snd_tag->ifp != ifp) { - /* Free mbuf */ - m_freem(mb); - - /* - * Tell upper layers about route - * change and to re-transmit this - * packet: - */ - return (EAGAIN); - } goto select_queue; } } else { Modified: head/sys/kern/kern_mbuf.c ============================================================================== --- head/sys/kern/kern_mbuf.c Fri May 24 22:11:37 2019 (r348253) +++ head/sys/kern/kern_mbuf.c Fri May 24 22:30:40 2019 (r348254) @@ -46,8 +46,12 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include +#include + #include #include #include @@ -112,6 +116,10 @@ static quad_t maxmbufmem; /* overall real memory limit SYSCTL_QUAD(_kern_ipc, OID_AUTO, maxmbufmem, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &maxmbufmem, 0, "Maximum real memory allocatable to various mbuf types"); +static counter_u64_t snd_tag_count; +SYSCTL_COUNTER_U64(_kern_ipc, OID_AUTO, num_snd_tags, CTLFLAG_RW, + &snd_tag_count, "# of active mbuf send tags"); + /* * tunable_mbinit() has to be run before any mbuf allocations are done. */ @@ -378,6 +386,8 @@ mbuf_init(void *dummy) */ EVENTHANDLER_REGISTER(vm_lowmem, mb_reclaim, NULL, EVENTHANDLER_PRI_FIRST); + + snd_tag_count = counter_u64_alloc(M_WAITOK); } SYSINIT(mbuf, SI_SUB_MBUF, SI_ORDER_FIRST, mbuf_init, NULL); @@ -1148,4 +1158,25 @@ m_freem(struct mbuf *mb) MBUF_PROBE1(m__freem, mb); while (mb != NULL) mb = m_free(mb); +} + +void +m_snd_tag_init(struct m_snd_tag *mst, struct ifnet *ifp) +{ + + if_ref(ifp); + mst->ifp = ifp; + refcount_init(&mst->refcount, 1); + counter_u64_add(snd_tag_count, 1); +} + +void +m_snd_tag_destroy(struct m_snd_tag *mst) +{ + struct ifnet *ifp; + + ifp = mst->ifp; + ifp->if_snd_tag_free(mst); + if_rele(ifp); + counter_u64_add(snd_tag_count, -1); } Modified: head/sys/kern/uipc_mbuf.c ============================================================================== --- head/sys/kern/uipc_mbuf.c Fri May 24 22:11:37 2019 (r348253) +++ head/sys/kern/uipc_mbuf.c Fri May 24 22:30:40 2019 (r348254) @@ -382,6 +382,10 @@ m_move_pkthdr(struct mbuf *to, struct mbuf *from) to->m_pkthdr = from->m_pkthdr; /* especially tags */ SLIST_INIT(&from->m_pkthdr.tags); /* purge tags from src */ from->m_flags &= ~M_PKTHDR; + if (from->m_pkthdr.csum_flags & CSUM_SND_TAG) { + from->m_pkthdr.csum_flags &= ~CSUM_SND_TAG; + from->m_pkthdr.snd_tag = NULL; + } } /* @@ -414,6 +418,8 @@ m_dup_pkthdr(struct mbuf *to, const struct mbuf *from, if ((to->m_flags & M_EXT) == 0) to->m_data = to->m_pktdat; to->m_pkthdr = from->m_pkthdr; + if (from->m_pkthdr.csum_flags & CSUM_SND_TAG) + m_snd_tag_ref(from->m_pkthdr.snd_tag); SLIST_INIT(&to->m_pkthdr.tags); return (m_tag_copy_chain(to, from, how)); } @@ -924,7 +930,12 @@ m_split(struct mbuf *m0, int len0, int wait) return (NULL); n->m_next = m->m_next; m->m_next = NULL; - n->m_pkthdr.rcvif = m0->m_pkthdr.rcvif; + if (m0->m_pkthdr.csum_flags & CSUM_SND_TAG) { + n->m_pkthdr.snd_tag = + m_snd_tag_ref(m0->m_pkthdr.snd_tag); + n->m_pkthdr.csum_flags |= CSUM_SND_TAG; + } else + n->m_pkthdr.rcvif = m0->m_pkthdr.rcvif; n->m_pkthdr.len = m0->m_pkthdr.len - len0; m0->m_pkthdr.len = len0; return (n); @@ -932,7 +943,12 @@ m_split(struct mbuf *m0, int len0, int wait) n = m_gethdr(wait, m0->m_type); if (n == NULL) return (NULL); - n->m_pkthdr.rcvif = m0->m_pkthdr.rcvif; + if (m0->m_pkthdr.csum_flags & CSUM_SND_TAG) { + n->m_pkthdr.snd_tag = + m_snd_tag_ref(m0->m_pkthdr.snd_tag); + n->m_pkthdr.csum_flags |= CSUM_SND_TAG; + } else + n->m_pkthdr.rcvif = m0->m_pkthdr.rcvif; n->m_pkthdr.len = m0->m_pkthdr.len - len0; m0->m_pkthdr.len = len0; if (m->m_flags & M_EXT) Modified: head/sys/net/bpf.c ============================================================================== --- head/sys/net/bpf.c Fri May 24 22:11:37 2019 (r348253) +++ head/sys/net/bpf.c Fri May 24 22:30:40 2019 (r348254) @@ -2304,7 +2304,7 @@ bpf_mtap(struct bpf_if *bp, struct mbuf *m) int gottime; /* Skip outgoing duplicate packets. */ - if ((m->m_flags & M_PROMISC) != 0 && m->m_pkthdr.rcvif == NULL) { + if ((m->m_flags & M_PROMISC) != 0 && m_rcvif(m) == NULL) { m->m_flags &= ~M_PROMISC; return; } @@ -2314,7 +2314,7 @@ bpf_mtap(struct bpf_if *bp, struct mbuf *m) NET_EPOCH_ENTER(et); CK_LIST_FOREACH(d, &bp->bif_dlist, bd_next) { - if (BPF_CHECK_DIRECTION(d, m->m_pkthdr.rcvif, bp->bif_ifp)) + if (BPF_CHECK_DIRECTION(d, m_rcvif(m), bp->bif_ifp)) continue; counter_u64_add(d->bd_rcount, 1); #ifdef BPF_JITTER Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Fri May 24 22:11:37 2019 (r348253) +++ head/sys/net/if.c Fri May 24 22:30:40 2019 (r348254) @@ -4295,6 +4295,8 @@ if_getsoftc(if_t ifp) void if_setrcvif(struct mbuf *m, if_t ifp) { + + MPASS((m->m_pkthdr.csum_flags & CSUM_SND_TAG) == 0); m->m_pkthdr.rcvif = (struct ifnet *)ifp; } Modified: head/sys/net/if_ethersubr.c ============================================================================== --- head/sys/net/if_ethersubr.c Fri May 24 22:11:37 2019 (r348253) +++ head/sys/net/if_ethersubr.c Fri May 24 22:30:40 2019 (r348254) @@ -816,6 +816,7 @@ ether_input(struct ifnet *ifp, struct mbuf *m) * We will rely on rcvif being set properly in the deferred context, * so assert it is correct here. */ + MPASS((m->m_pkthdr.csum_flags & CSUM_SND_TAG) == 0); KASSERT(m->m_pkthdr.rcvif == ifp, ("%s: ifnet mismatch m %p " "rcvif %p ifp %p", __func__, m, m->m_pkthdr.rcvif, ifp)); CURVNET_SET_QUIET(ifp->if_vnet); Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Fri May 24 22:11:37 2019 (r348253) +++ head/sys/net/if_lagg.c Fri May 24 22:30:40 2019 (r348254) @@ -95,6 +95,11 @@ static struct { {0, NULL} }; +struct lagg_snd_tag { + struct m_snd_tag com; + struct m_snd_tag *tag; +}; + VNET_DEFINE(SLIST_HEAD(__trhead, lagg_softc), lagg_list); /* list of laggs */ #define V_lagg_list VNET(lagg_list) VNET_DEFINE_STATIC(struct mtx, lagg_list_mtx); @@ -134,6 +139,10 @@ static int lagg_ioctl(struct ifnet *, u_long, caddr_t) static int lagg_snd_tag_alloc(struct ifnet *, union if_snd_tag_alloc_params *, struct m_snd_tag **); +static int lagg_snd_tag_modify(struct m_snd_tag *, + union if_snd_tag_modify_params *); +static int lagg_snd_tag_query(struct m_snd_tag *, + union if_snd_tag_query_params *); static void lagg_snd_tag_free(struct m_snd_tag *); #endif static int lagg_setmulti(struct lagg_port *); @@ -525,6 +534,8 @@ lagg_clone_create(struct if_clone *ifc, int unit, cadd ifp->if_flags = IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST; #ifdef RATELIMIT ifp->if_snd_tag_alloc = lagg_snd_tag_alloc; + ifp->if_snd_tag_modify = lagg_snd_tag_modify; + ifp->if_snd_tag_query = lagg_snd_tag_query; ifp->if_snd_tag_free = lagg_snd_tag_free; #endif ifp->if_capenable = ifp->if_capabilities = IFCAP_HWSTATS; @@ -1537,63 +1548,126 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data } #ifdef RATELIMIT -static int -lagg_snd_tag_alloc(struct ifnet *ifp, - union if_snd_tag_alloc_params *params, - struct m_snd_tag **ppmt) +static inline struct lagg_snd_tag * +mst_to_lst(struct m_snd_tag *mst) { - struct lagg_softc *sc = (struct lagg_softc *)ifp->if_softc; + + return (__containerof(mst, struct lagg_snd_tag, com)); +} + +/* + * Look up the port used by a specific flow. This only works for lagg + * protocols with deterministic port mappings (e.g. not roundrobin). + * In addition protocols which use a hash to map flows to ports must + * be configured to use the mbuf flowid rather than hashing packet + * contents. + */ +static struct lagg_port * +lookup_snd_tag_port(struct ifnet *ifp, uint32_t flowid, uint32_t flowtype) +{ + struct lagg_softc *sc; struct lagg_port *lp; struct lagg_lb *lb; uint32_t p; - LAGG_RLOCK(); + sc = ifp->if_softc; + switch (sc->sc_proto) { case LAGG_PROTO_FAILOVER: - lp = lagg_link_active(sc, sc->sc_primary); - break; + return (lagg_link_active(sc, sc->sc_primary)); case LAGG_PROTO_LOADBALANCE: if ((sc->sc_opts & LAGG_OPT_USE_FLOWID) == 0 || - params->hdr.flowtype == M_HASHTYPE_NONE) { - LAGG_RUNLOCK(); - return (EOPNOTSUPP); - } - p = params->hdr.flowid >> sc->flowid_shift; + flowtype == M_HASHTYPE_NONE) + return (NULL); + p = flowid >> sc->flowid_shift; p %= sc->sc_count; lb = (struct lagg_lb *)sc->sc_psc; lp = lb->lb_ports[p]; - lp = lagg_link_active(sc, lp); - break; + return (lagg_link_active(sc, lp)); case LAGG_PROTO_LACP: if ((sc->sc_opts & LAGG_OPT_USE_FLOWID) == 0 || - params->hdr.flowtype == M_HASHTYPE_NONE) { - LAGG_RUNLOCK(); - return (EOPNOTSUPP); - } - lp = lacp_select_tx_port_by_hash(sc, params->hdr.flowid); - break; + flowtype == M_HASHTYPE_NONE) + return (NULL); + return (lacp_select_tx_port_by_hash(sc, flowid)); default: + return (NULL); + } +} + +static int +lagg_snd_tag_alloc(struct ifnet *ifp, + union if_snd_tag_alloc_params *params, + struct m_snd_tag **ppmt) +{ + struct lagg_snd_tag *lst; + struct lagg_softc *sc; + struct lagg_port *lp; + struct ifnet *lp_ifp; + int error; + + sc = ifp->if_softc; + + LAGG_RLOCK(); + lp = lookup_snd_tag_port(ifp, params->hdr.flowid, params->hdr.flowtype); + if (lp == NULL) { LAGG_RUNLOCK(); return (EOPNOTSUPP); } - if (lp == NULL) { + if (lp->lp_ifp == NULL || lp->lp_ifp->if_snd_tag_alloc == NULL) { LAGG_RUNLOCK(); return (EOPNOTSUPP); } - ifp = lp->lp_ifp; + lp_ifp = lp->lp_ifp; + if_ref(lp_ifp); LAGG_RUNLOCK(); - if (ifp == NULL || ifp->if_snd_tag_alloc == NULL || - (ifp->if_capenable & IFCAP_TXRTLMT) == 0) - return (EOPNOTSUPP); - /* forward allocation request */ - return (ifp->if_snd_tag_alloc(ifp, params, ppmt)); + lst = malloc(sizeof(*lst), M_LAGG, M_NOWAIT); + if (lst == NULL) { + if_rele(lp_ifp); + return (ENOMEM); + } + + error = lp_ifp->if_snd_tag_alloc(lp_ifp, params, &lst->tag); + if_rele(lp_ifp); + if (error) { + free(lst, M_LAGG); + return (error); + } + + m_snd_tag_init(&lst->com, ifp); + + *ppmt = &lst->com; + return (0); } +static int +lagg_snd_tag_modify(struct m_snd_tag *mst, + union if_snd_tag_modify_params *params) +{ + struct lagg_snd_tag *lst; + + lst = mst_to_lst(mst); + return (lst->tag->ifp->if_snd_tag_modify(lst->tag, params)); +} + +static int +lagg_snd_tag_query(struct m_snd_tag *mst, + union if_snd_tag_query_params *params) +{ + struct lagg_snd_tag *lst; + + lst = mst_to_lst(mst); + return (lst->tag->ifp->if_snd_tag_query(lst->tag, params)); +} + static void -lagg_snd_tag_free(struct m_snd_tag *tag) +lagg_snd_tag_free(struct m_snd_tag *mst) { - tag->ifp->if_snd_tag_free(tag); + struct lagg_snd_tag *lst; + + lst = mst_to_lst(mst); + m_snd_tag_rele(lst->tag); + free(lst, M_LAGG); } #endif @@ -1720,6 +1794,10 @@ lagg_transmit(struct ifnet *ifp, struct mbuf *m) struct lagg_softc *sc = (struct lagg_softc *)ifp->if_softc; int error; +#ifdef RATELIMIT + if (m->m_pkthdr.csum_flags & CSUM_SND_TAG) + MPASS(m->m_pkthdr.snd_tag->ifp == ifp); +#endif LAGG_RLOCK(); /* We need a Tx algorithm and at least one port */ if (sc->sc_proto == LAGG_PROTO_NONE || sc->sc_count == 0) { @@ -1910,6 +1988,21 @@ int lagg_enqueue(struct ifnet *ifp, struct mbuf *m) { +#ifdef RATELIMIT + if (m->m_pkthdr.csum_flags & CSUM_SND_TAG) { + struct lagg_snd_tag *lst; + struct m_snd_tag *mst; + + mst = m->m_pkthdr.snd_tag; + lst = mst_to_lst(mst); + if (lst->tag->ifp != ifp) { + m_freem(m); + return (EAGAIN); + } + m->m_pkthdr.snd_tag = m_snd_tag_ref(lst->tag); + m_snd_tag_rele(mst); + } +#endif return (ifp->if_transmit)(ifp, m); } Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Fri May 24 22:11:37 2019 (r348253) +++ head/sys/net/if_vlan.c Fri May 24 22:30:40 2019 (r348254) @@ -103,6 +103,20 @@ struct ifvlantrunk { int refcnt; }; +#ifdef RATELIMIT +struct vlan_snd_tag { + struct m_snd_tag com; + struct m_snd_tag *tag; +}; + +static inline struct vlan_snd_tag * +mst_to_vst(struct m_snd_tag *mst) +{ + + return (__containerof(mst, struct vlan_snd_tag, com)); +} +#endif + /* * This macro provides a facility to iterate over every vlan on a trunk with * the assumption that none will be added/removed during iteration. @@ -267,7 +281,11 @@ static int vlan_ioctl(struct ifnet *ifp, u_long cmd, c #ifdef RATELIMIT static int vlan_snd_tag_alloc(struct ifnet *, union if_snd_tag_alloc_params *, struct m_snd_tag **); -static void vlan_snd_tag_free(struct m_snd_tag *); +static int vlan_snd_tag_modify(struct m_snd_tag *, + union if_snd_tag_modify_params *); +static int vlan_snd_tag_query(struct m_snd_tag *, + union if_snd_tag_query_params *); +static void vlan_snd_tag_free(struct m_snd_tag *); #endif static void vlan_qflush(struct ifnet *ifp); static int vlan_setflag(struct ifnet *ifp, int flag, int status, @@ -1048,6 +1066,8 @@ vlan_clone_create(struct if_clone *ifc, char *name, si ifp->if_ioctl = vlan_ioctl; #ifdef RATELIMIT ifp->if_snd_tag_alloc = vlan_snd_tag_alloc; + ifp->if_snd_tag_modify = vlan_snd_tag_modify; + ifp->if_snd_tag_query = vlan_snd_tag_query; ifp->if_snd_tag_free = vlan_snd_tag_free; #endif ifp->if_flags = VLAN_IFFLAGS; @@ -1137,6 +1157,26 @@ vlan_transmit(struct ifnet *ifp, struct mbuf *m) BPF_MTAP(ifp, m); +#ifdef RATELIMIT + if (m->m_pkthdr.csum_flags & CSUM_SND_TAG) { + struct vlan_snd_tag *vst; + struct m_snd_tag *mst; + + MPASS(m->m_pkthdr.snd_tag->ifp == ifp); + mst = m->m_pkthdr.snd_tag; + vst = mst_to_vst(mst); + if (vst->tag->ifp != p) { + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + NET_EPOCH_EXIT(et); + m_freem(m); + return (EAGAIN); + } + + m->m_pkthdr.snd_tag = m_snd_tag_ref(vst->tag); + m_snd_tag_rele(mst); + } +#endif + /* * Do not run parent's if_transmit() if the parent is not up, * or parent's driver will cause a system crash. @@ -1928,18 +1968,71 @@ vlan_snd_tag_alloc(struct ifnet *ifp, union if_snd_tag_alloc_params *params, struct m_snd_tag **ppmt) { + struct epoch_tracker et; + struct vlan_snd_tag *vst; + struct ifvlan *ifv; + struct ifnet *parent; + int error; - /* get trunk device */ - ifp = vlan_trunkdev(ifp); - if (ifp == NULL || (ifp->if_capenable & IFCAP_TXRTLMT) == 0) + NET_EPOCH_ENTER(et); + ifv = ifp->if_softc; + if (ifv->ifv_trunk != NULL) + parent = PARENT(ifv); + else + parent = NULL; + if (parent == NULL || parent->if_snd_tag_alloc == NULL) { + NET_EPOCH_EXIT(et); return (EOPNOTSUPP); - /* forward allocation request */ - return (ifp->if_snd_tag_alloc(ifp, params, ppmt)); + } + if_ref(parent); + NET_EPOCH_EXIT(et); + + vst = malloc(sizeof(*vst), M_VLAN, M_NOWAIT); + if (vst == NULL) { + if_rele(parent); + return (ENOMEM); + } + + error = parent->if_snd_tag_alloc(parent, params, &vst->tag); + if_rele(parent); + if (error) { + free(vst, M_VLAN); + return (error); + } + + m_snd_tag_init(&vst->com, ifp); + + *ppmt = &vst->com; + return (0); } +static int +vlan_snd_tag_modify(struct m_snd_tag *mst, + union if_snd_tag_modify_params *params) +{ + struct vlan_snd_tag *vst; + + vst = mst_to_vst(mst); + return (vst->tag->ifp->if_snd_tag_modify(vst->tag, params)); +} + +static int +vlan_snd_tag_query(struct m_snd_tag *mst, + union if_snd_tag_query_params *params) +{ + struct vlan_snd_tag *vst; + + vst = mst_to_vst(mst); + return (vst->tag->ifp->if_snd_tag_query(vst->tag, params)); +} + static void -vlan_snd_tag_free(struct m_snd_tag *tag) +vlan_snd_tag_free(struct m_snd_tag *mst) { - tag->ifp->if_snd_tag_free(tag); + struct vlan_snd_tag *vst; + + vst = mst_to_vst(mst); + m_snd_tag_rele(vst->tag); + free(vst, M_VLAN); } #endif Modified: head/sys/net/netisr.c ============================================================================== --- head/sys/net/netisr.c Fri May 24 22:11:37 2019 (r348253) +++ head/sys/net/netisr.c Fri May 24 22:30:40 2019 (r348254) @@ -839,6 +839,7 @@ netisr_select_cpuid(struct netisr_proto *npp, u_int di ("%s: invalid policy %u for %s", __func__, npp->np_policy, npp->np_name)); + MPASS((m->m_pkthdr.csum_flags & CSUM_SND_TAG) == 0); ifp = m->m_pkthdr.rcvif; if (ifp != NULL) *cpuidp = nws_array[(ifp->if_index + source) % nws_count]; Modified: head/sys/net80211/ieee80211_hwmp.c ============================================================================== --- head/sys/net80211/ieee80211_hwmp.c Fri May 24 22:11:37 2019 (r348253) +++ head/sys/net80211/ieee80211_hwmp.c Fri May 24 22:30:40 2019 (r348254) @@ -2015,6 +2015,7 @@ done: */ IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_HWMP, dest, "%s", "queue frame until path found"); + MPASS((m->m_pkthdr.csum_flags & CSUM_SND_TAG) == 0); m->m_pkthdr.rcvif = (void *)(uintptr_t) ieee80211_mac_hash(ic, dest); /* XXX age chosen randomly */ Modified: head/sys/net80211/ieee80211_mesh.c ============================================================================== --- head/sys/net80211/ieee80211_mesh.c Fri May 24 22:11:37 2019 (r348253) +++ head/sys/net80211/ieee80211_mesh.c Fri May 24 22:30:40 2019 (r348254) @@ -1225,6 +1225,7 @@ mesh_forward(struct ieee80211vap *vap, struct mbuf *m, M_WME_SETAC(mcopy, WME_AC_BE); /* XXX do we know m_nextpkt is NULL? */ + MPASS((mcopy->m_pkthdr.csum_flags & CSUM_SND_TAG) == 0); mcopy->m_pkthdr.rcvif = (void *) ni; /* Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Fri May 24 22:11:37 2019 (r348253) +++ head/sys/net80211/ieee80211_output.c Fri May 24 22:30:40 2019 (r348254) @@ -163,6 +163,7 @@ ieee80211_vap_pkt_send_dest(struct ieee80211vap *vap, * uses any existing value for rcvif to identify the * interface it (might have been) received on. */ + MPASS((m->m_pkthdr.csum_flags & CSUM_SND_TAG) == 0); m->m_pkthdr.rcvif = (void *)ni; mcast = (m->m_flags & (M_MCAST | M_BCAST)) ? 1: 0; @@ -528,6 +529,7 @@ ieee80211_raw_output(struct ieee80211vap *vap, struct * that the mbuf has the same node value that * it would if it were going via the normal path. */ + MPASS((m->m_pkthdr.csum_flags & CSUM_SND_TAG) == 0); m->m_pkthdr.rcvif = (void *)ni; /* Modified: head/sys/net80211/ieee80211_wds.c ============================================================================== --- head/sys/net80211/ieee80211_wds.c Fri May 24 22:11:37 2019 (r348253) +++ head/sys/net80211/ieee80211_wds.c Fri May 24 22:30:40 2019 (r348254) @@ -299,6 +299,7 @@ ieee80211_dwds_mcast(struct ieee80211vap *vap0, struct continue; } mcopy->m_flags |= M_MCAST; + MPASS((mcopy->m_pkthdr.csum_flags & CSUM_SND_TAG) == 0); mcopy->m_pkthdr.rcvif = (void *) ni; err = ieee80211_parent_xmitpkt(ic, mcopy); @@ -332,6 +333,7 @@ ieee80211_dwds_discover(struct ieee80211_node *ni, str * XXX handle overflow? * XXX per/vap beacon interval? */ + MPASS((m->m_pkthdr.csum_flags & CSUM_SND_TAG) == 0); m->m_pkthdr.rcvif = (void *)(uintptr_t) ieee80211_mac_hash(ic, ni->ni_macaddr); (void) ieee80211_ageq_append(&ic->ic_stageq, m, Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Fri May 24 22:11:37 2019 (r348253) +++ head/sys/netinet/in_pcb.c Fri May 24 22:30:40 2019 (r348254) @@ -3274,13 +3274,6 @@ in_pcbattach_txrtlmt(struct inpcb *inp, struct ifnet * error = EOPNOTSUPP; } else { error = ifp->if_snd_tag_alloc(ifp, ¶ms, &inp->inp_snd_tag); - - /* - * At success increment the refcount on - * the send tag's network interface: - */ - if (error == 0) - if_ref(inp->inp_snd_tag->ifp); } return (error); } @@ -3293,7 +3286,6 @@ void in_pcbdetach_txrtlmt(struct inpcb *inp) { struct m_snd_tag *mst; - struct ifnet *ifp; INP_WLOCK_ASSERT(inp); @@ -3303,19 +3295,7 @@ in_pcbdetach_txrtlmt(struct inpcb *inp) if (mst == NULL) return; - ifp = mst->ifp; - if (ifp == NULL) - return; - - /* - * If the device was detached while we still had reference(s) - * on the ifp, we assume if_snd_tag_free() was replaced with - * stubs. - */ - ifp->if_snd_tag_free(mst); - - /* release reference count on network interface */ - if_rele(ifp); + m_snd_tag_rele(mst); } /* @@ -3359,6 +3339,17 @@ in_pcboutput_txrtlmt(struct inpcb *inp, struct ifnet * * variable read itself will be atomic. */ max_pacing_rate = socket->so_max_pacing_rate; + + /* + * If the existing send tag is for the wrong interface due to + * a route change, first drop the existing tag. Set the + * CHANGED flag so that we will keep trying to allocate a new + * tag if we fail to allocate one this time. + */ + if (inp->inp_snd_tag != NULL && inp->inp_snd_tag->ifp != ifp) { + in_pcbdetach_txrtlmt(inp); + inp->inp_flags2 |= INP_RATE_LIMIT_CHANGED; + } /* * NOTE: When attaching to a network interface a reference is Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Fri May 24 22:11:37 2019 (r348253) +++ head/sys/netinet/ip_output.c Fri May 24 22:30:40 2019 (r348254) @@ -204,6 +204,51 @@ ip_output_pfil(struct mbuf **mp, struct ifnet *ifp, st return 0; } +static int +ip_output_send(struct inpcb *inp, struct ifnet *ifp, struct mbuf *m, + const struct sockaddr_in *gw, struct route *ro) +{ + struct m_snd_tag *mst; + int error; + + MPASS((m->m_pkthdr.csum_flags & CSUM_SND_TAG) == 0); + mst = NULL; + +#ifdef RATELIMIT + if (inp != NULL) { + if ((inp->inp_flags2 & INP_RATE_LIMIT_CHANGED) != 0 || + (inp->inp_snd_tag != NULL && + inp->inp_snd_tag->ifp != ifp)) + in_pcboutput_txrtlmt(inp, ifp, m); + + if (inp->inp_snd_tag != NULL) + mst = inp->inp_snd_tag; + } +#endif + if (mst != NULL) { + KASSERT(m->m_pkthdr.rcvif == NULL, + ("trying to add a send tag to a forwarded packet")); + if (mst->ifp != ifp) { + error = EAGAIN; + goto done; + } + + /* stamp send tag on mbuf */ + m->m_pkthdr.snd_tag = m_snd_tag_ref(mst); + m->m_pkthdr.csum_flags |= CSUM_SND_TAG; + } + + error = (*ifp->if_output)(ifp, m, (const struct sockaddr *)gw, ro); + +done: + /* Check for route change invalidating send tags. */ +#ifdef RATELIMIT + if (error == EAGAIN) + in_pcboutput_eagain(inp); +#endif + return (error); +} + /* * IP output. The packet in mbuf chain m contains a skeletal IP * header (with len, off, ttl, proto, tos, src, dst). @@ -687,23 +732,7 @@ sendit: */ m_clrprotoflags(m); IP_PROBE(send, NULL, NULL, ip, ifp, ip, NULL); -#ifdef RATELIMIT - if (inp != NULL) { - if (inp->inp_flags2 & INP_RATE_LIMIT_CHANGED) - in_pcboutput_txrtlmt(inp, ifp, m); - /* stamp send tag on mbuf */ - m->m_pkthdr.snd_tag = inp->inp_snd_tag; - } else { - m->m_pkthdr.snd_tag = NULL; - } -#endif - error = (*ifp->if_output)(ifp, m, - (const struct sockaddr *)gw, ro); -#ifdef RATELIMIT - /* check for route change */ - if (error == EAGAIN) - in_pcboutput_eagain(inp); -#endif + error = ip_output_send(inp, ifp, m, gw, ro); goto done; } @@ -739,23 +768,7 @@ sendit: IP_PROBE(send, NULL, NULL, mtod(m, struct ip *), ifp, mtod(m, struct ip *), NULL); -#ifdef RATELIMIT - if (inp != NULL) { - if (inp->inp_flags2 & INP_RATE_LIMIT_CHANGED) - in_pcboutput_txrtlmt(inp, ifp, m); - /* stamp send tag on mbuf */ - m->m_pkthdr.snd_tag = inp->inp_snd_tag; - } else { - m->m_pkthdr.snd_tag = NULL; - } -#endif - error = (*ifp->if_output)(ifp, m, - (const struct sockaddr *)gw, ro); -#ifdef RATELIMIT - /* check for route change */ - if (error == EAGAIN) - in_pcboutput_eagain(inp); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Fri May 24 22:33:15 2019 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 3177915B6C71; Fri, 24 May 2019 22:33:15 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C4BC182B77; Fri, 24 May 2019 22:33:14 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A254D233E5; Fri, 24 May 2019 22:33:14 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4OMXEjs071845; Fri, 24 May 2019 22:33:14 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4OMXEAr071844; Fri, 24 May 2019 22:33:14 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201905242233.x4OMXEAr071844@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Fri, 24 May 2019 22:33:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348255 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 348255 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C4BC182B77 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 22:33:15 -0000 Author: cem Date: Fri May 24 22:33:14 2019 New Revision: 348255 URL: https://svnweb.freebsd.org/changeset/base/348255 Log: Disable intr_storm_threshold mechanism by default The ixl.4 manual page has documented that the threshold falsely detects interrupt storms on 40Gbit NICs as long ago as 2015, and we have seen similar false positives with the ioat(4) DMA device (which can push GB/s). For example, synthetic load can be generated with tools/tools/ioat 'ioatcontrol 0 200 8192 1 1000' (allocate 200x8kB buffers, generate an interrupt for each one, and do this for 1000 milliseconds). With storm-detection disabled, the Broadwell-EP version of this device is capable of generating ~350k real interrupts per second. The following historical context comes from jhb@: Originally, the threshold worked around incorrect routing of PCI INTx interrupts on single-CPU systems which would end up in a hard hang during boot. Since the threshold was added, our PCI interrupt routing was improved, most PCI interrupts use edge-triggered MSI instead of level-triggered INTx, and typical systems have multiple CPUs available to service interrupts. On the off chance that the threshold is useful in the future, it remains available as a tunable and sysctl. Reviewed by: jhb Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D20401 Modified: head/sys/kern/kern_intr.c Modified: head/sys/kern/kern_intr.c ============================================================================== --- head/sys/kern/kern_intr.c Fri May 24 22:30:40 2019 (r348254) +++ head/sys/kern/kern_intr.c Fri May 24 22:33:14 2019 (r348255) @@ -91,7 +91,7 @@ struct proc *intrproc; static MALLOC_DEFINE(M_ITHREAD, "ithread", "Interrupt Threads"); -static int intr_storm_threshold = 1000; +static int intr_storm_threshold = 0; SYSCTL_INT(_hw, OID_AUTO, intr_storm_threshold, CTLFLAG_RWTUN, &intr_storm_threshold, 0, "Number of consecutive interrupts before storm protection is enabled"); From owner-svn-src-head@freebsd.org Fri May 24 23:01:44 2019 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 9B23715B7512; Fri, 24 May 2019 23:01:44 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 043EC83927; Fri, 24 May 2019 23:01:43 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x4ON1ZDJ098366; Fri, 24 May 2019 16:01:35 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x4ON1Zju098365; Fri, 24 May 2019 16:01:35 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201905242301.x4ON1Zju098365@gndrsh.dnsmgr.net> Subject: Re: svn commit: r348250 - head/sys/powerpc/conf In-Reply-To: <20190524152941.40f7e239@titan.knownspace> To: Justin Hibbits Date: Fri, 24 May 2019 16:01:35 -0700 (PDT) CC: Alexey Dokuchaev , Piotr Kubaj , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 043EC83927 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 23:01:44 -0000 > On Fri, 24 May 2019 20:22:52 +0000 > Alexey Dokuchaev wrote: > > > On Fri, May 24, 2019 at 03:16:51PM -0500, Justin Hibbits wrote: > > > On Fri, 24 May 2019 20:01:59 +0000 (UTC) Piotr Kubaj wrote: > > > > New Revision: 348250 > > > > URL: https://svnweb.freebsd.org/changeset/base/348250 > > > > > > > > Log: > > > > Add snd_hda(4) to GENERIC64 used by powerpc64. > > > > > > > > amd64 also has snd_hda(4) in GENERIC. > > > > > > > > Modified: > > > > head/sys/powerpc/conf/GENERIC64 > > > > ... > > > > > > To note: This was done because there's a strange bug in the snd_hda > > > module, with the hdaa component. For some reason it either doesn't > > > find all the internal components it needs, or something, because > > > there's a NULL dereference when trying to call a kobj method in > > > hdaa_attach(). > > > > So this commit essentially masks the real bug somewhere rather than > > fixing it, is this what you're saying? > > > > ./danfe > > It's a viable workaround to a problem that reaches a wide audience. > Since it works built-in, I found it acceptable. I probably should have > filed a bug for it a year ago when I hit it and worked around it, but it > could also very well be a compiler issue. > > By the way, it works fine on powerpc (32-bit) loaded as a module. Please do file a bug report now, please do mark the line in GENERIC64 with a comment XXX This is needed to work around foo so that it is documented why it is there and someone removing it does not go down a rabit hole others have already been down, and so that some day someone may go down that rabbit hole of there own free will and fix this for us. Paving over the top of obscure bugs with a hackish fix is ok, not documenting this state of affairs is not, IMHO. > - Justin -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Fri May 24 23:21:52 2019 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 B520615B7A9D for ; Fri, 24 May 2019 23:21:52 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 276E7842DC for ; Fri, 24 May 2019 23:21:51 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by mail-lj1-x229.google.com with SMTP id w1so10060537ljw.0 for ; Fri, 24 May 2019 16:21:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=OaRPxNiOZGgeK3Rq556SEPDaQoEviIzR8r/qchDg3MM=; b=YeOKaOABZrHa3DONQMgV7WJttpQNmpbIQaoBQ834xvrwoIb1gmrt62pw4EmEK1OGqV xk7P+OfIU/1Ls1yWj7/46l5n7hIMOqzhKIRQ8WNCgrJn1yiaEzGQJSf1o7UAn0xORihC j+dDXwupjohRUCETysp9y9/9u90SxUe+iFAoRTkmXu3+rjYverqexlkzipvK5rSUeGCj Z7mXUwbWQY2LQWMGnwGMd3g9d+BWXwtFYKpJLianR/0cqWSU6FJ84VGJFyFdzGES5h/Q tooeQEW4zWrISKf4RJvmhbDSLR0yAgcu0poRic8Um3++ehZqjX12bAUGVEYFZSah/qHf iGkw== 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=OaRPxNiOZGgeK3Rq556SEPDaQoEviIzR8r/qchDg3MM=; b=bAVFZvjbeUsV625yM0Yh+cpWBxXkRNqGMJ4GgXTo09T1fCh7f+kBKR0nPNrdGvHJhg DmQdAicvsElZWy7rJQUwMmBLSw74x2vcUBhAmkQLcY7I2exp90AFeFYdxx/STfOYe7L+ PtqPDHpHPmfUs8bvSXiMxvBfrE++ksRrTPi+8GUz8BKm183zdid6pY7xlAmuFwXIpPh9 oPJKzaQC9y0AFkX28xfawRjOfWH4m4m3CVEf1JNrHSxOvCobkaEp49dS7I8+uRZvT3lT bl86fNa2CA7GIX7lyx4kfeVfbu40zxXM7ZP13tCcuvNi6DttKb71FwvHQ+E5aeItRAnM j/ug== X-Gm-Message-State: APjAAAXypd7Os+Eiw4RmD6CmOKyPO12AC6HCJAV9BsAKNoIUKbqbe7G/ FgXztQ8Yn38xRb73CD01VGSMPozaBMK5XIaRndn1a8UI X-Google-Smtp-Source: APXvYqyFnx0r5KfvFTzQSTP/J/X5a3UwgK0+LvoxVCrDJWlHM7UKOhR8fipwJT2QJls/NI9z6Id6YMze1XFv8HnT/kc= X-Received: by 2002:a2e:90d1:: with SMTP id o17mr40556440ljg.187.1558740110030; Fri, 24 May 2019 16:21:50 -0700 (PDT) MIME-Version: 1.0 References: <201905242233.x4OMXEAr071844@repo.freebsd.org> In-Reply-To: <201905242233.x4OMXEAr071844@repo.freebsd.org> From: Steven Hartland Date: Sat, 25 May 2019 00:21:39 +0100 Message-ID: Subject: Re: svn commit: r348255 - head/sys/kern To: Conrad Meyer Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 276E7842DC X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 23:21:53 -0000 Just wanted to say I really appreciate the details in this commit message. Its often the case the message get overlooked when it comes to the time needed to write a truly useful message to others and this a great example of the quality we should all try to follow. Regards Steve On Fri, 24 May 2019 at 23:33, Conrad Meyer wrote: > Author: cem > Date: Fri May 24 22:33:14 2019 > New Revision: 348255 > URL: https://svnweb.freebsd.org/changeset/base/348255 > > Log: > Disable intr_storm_threshold mechanism by default > > The ixl.4 manual page has documented that the threshold falsely detects > interrupt storms on 40Gbit NICs as long ago as 2015, and we have seen > similar false positives with the ioat(4) DMA device (which can push > GB/s). > > For example, synthetic load can be generated with tools/tools/ioat > 'ioatcontrol 0 200 8192 1 1000' (allocate 200x8kB buffers, generate an > interrupt for each one, and do this for 1000 milliseconds). With > storm-detection disabled, the Broadwell-EP version of this device is > capable > of generating ~350k real interrupts per second. > > The following historical context comes from jhb@: Originally, the > threshold > worked around incorrect routing of PCI INTx interrupts on single-CPU > systems > which would end up in a hard hang during boot. Since the threshold was > added, our PCI interrupt routing was improved, most PCI interrupts use > edge-triggered MSI instead of level-triggered INTx, and typical systems > have > multiple CPUs available to service interrupts. > > On the off chance that the threshold is useful in the future, it remains > available as a tunable and sysctl. > > Reviewed by: jhb > Sponsored by: Dell EMC Isilon > Differential Revision: https://reviews.freebsd.org/D20401 > > Modified: > head/sys/kern/kern_intr.c > > Modified: head/sys/kern/kern_intr.c > > ============================================================================== > --- head/sys/kern/kern_intr.c Fri May 24 22:30:40 2019 (r348254) > +++ head/sys/kern/kern_intr.c Fri May 24 22:33:14 2019 (r348255) > @@ -91,7 +91,7 @@ struct proc *intrproc; > > static MALLOC_DEFINE(M_ITHREAD, "ithread", "Interrupt Threads"); > > -static int intr_storm_threshold = 1000; > +static int intr_storm_threshold = 0; > SYSCTL_INT(_hw, OID_AUTO, intr_storm_threshold, CTLFLAG_RWTUN, > &intr_storm_threshold, 0, > "Number of consecutive interrupts before storm protection is > enabled"); > > From owner-svn-src-head@freebsd.org Fri May 24 23:26:18 2019 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 1DFE215B7B56; Fri, 24 May 2019 23:26:18 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B142E844DF; Fri, 24 May 2019 23:26: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 8564723CAC; Fri, 24 May 2019 23:26: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 x4ONQHUF098387; Fri, 24 May 2019 23:26:17 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4ONQH8N098386; Fri, 24 May 2019 23:26:17 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201905242326.x4ONQH8N098386@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 24 May 2019 23:26:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348257 - head/sys/amd64/include X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/amd64/include X-SVN-Commit-Revision: 348257 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B142E844DF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 23:26:18 -0000 Author: kib Date: Fri May 24 23:26:17 2019 New Revision: 348257 URL: https://svnweb.freebsd.org/changeset/base/348257 Log: Add PG_PS_PDP_FRAME symbol. Similar to PG_FRAME and PG_PS_FRAME, it denotes the mask of the physical address component of 1G superpage PDP entry. Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D20386 Modified: head/sys/amd64/include/pmap.h Modified: head/sys/amd64/include/pmap.h ============================================================================== --- head/sys/amd64/include/pmap.h Fri May 24 23:07:32 2019 (r348256) +++ head/sys/amd64/include/pmap.h Fri May 24 23:26:17 2019 (r348257) @@ -119,6 +119,7 @@ #define PG_PROMOTED X86_PG_AVAIL(54) /* PDE only */ #define PG_FRAME (0x000ffffffffff000ul) #define PG_PS_FRAME (0x000fffffffe00000ul) +#define PG_PS_PDP_FRAME (0x000fffffc0000000ul) /* * Promotion to a 2MB (PDE) page mapping requires that the corresponding 4KB From owner-svn-src-head@freebsd.org Fri May 24 23:28:12 2019 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 9B7D415B7C1F; Fri, 24 May 2019 23:28:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 415BD8467A; Fri, 24 May 2019 23:28:12 +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 1B4F223CB3; Fri, 24 May 2019 23:28:12 +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 x4ONSBlB098509; Fri, 24 May 2019 23:28:11 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4ONSB48098508; Fri, 24 May 2019 23:28:11 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201905242328.x4ONSB48098508@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 24 May 2019 23:28:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348258 - 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: 348258 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 415BD8467A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 23:28:12 -0000 Author: kib Date: Fri May 24 23:28:11 2019 New Revision: 348258 URL: https://svnweb.freebsd.org/changeset/base/348258 Log: Fix too loose assert in pmap_large_unmap(). The upper bound for the valid address from the large map used LARGEMAP_MAX_ADDRESS instead of LARGEMAP_MIN_ADDRESS. Provide a function-like macro for proper upper value. Noted by: markj Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D20386 Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Fri May 24 23:26:17 2019 (r348257) +++ head/sys/amd64/amd64/pmap.c Fri May 24 23:28:11 2019 (r348258) @@ -421,6 +421,8 @@ static int pmap_flags = PMAP_PDE_SUPERPAGE; /* flags f static vmem_t *large_vmem; static u_int lm_ents; +#define PMAP_LARGEMAP_MAX_ADDRESS() \ + (LARGEMAP_MIN_ADDRESS + NBPML4 * (u_long)lm_ents) int pmap_pcid_enabled = 1; SYSCTL_INT(_vm_pmap, OID_AUTO, pcid_enabled, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, @@ -1060,6 +1062,7 @@ static void pmap_invalidate_pde_page(pmap_t pmap, vm_o pd_entry_t pde); static void pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mode); static vm_page_t pmap_large_map_getptp_unlocked(void); +static vm_paddr_t pmap_large_map_kextract(vm_offset_t va); static void pmap_pde_attr(pd_entry_t *pde, int cache_bits, int mask); #if VM_NRESERVLEVEL > 0 static void pmap_promote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va, @@ -2961,6 +2964,9 @@ pmap_kextract(vm_offset_t va) if (va >= DMAP_MIN_ADDRESS && va < DMAP_MAX_ADDRESS) { pa = DMAP_TO_PHYS(va); + } else if (LARGEMAP_MIN_ADDRESS <= va && + va < PMAP_LARGEMAP_MAX_ADDRESS()) { + pa = pmap_large_map_kextract(va); } else { pde = *vtopde(va); if (pde & PG_PS) { @@ -8775,6 +8781,39 @@ retry: return ((pt_entry_t *)PHYS_TO_DMAP(mphys) + pmap_pte_index(va)); } +static vm_paddr_t +pmap_large_map_kextract(vm_offset_t va) +{ + pdp_entry_t *pdpe, pdp; + pd_entry_t *pde, pd; + pt_entry_t *pte, pt; + + KASSERT(LARGEMAP_MIN_ADDRESS <= va && va < PMAP_LARGEMAP_MAX_ADDRESS(), + ("not largemap range %#lx", (u_long)va)); + pdpe = pmap_large_map_pdpe(va); + pdp = *pdpe; + KASSERT((pdp & X86_PG_V) != 0, + ("invalid pdp va %#lx pdpe %#lx pdp %#lx", va, + (u_long)pdpe, pdp)); + if ((pdp & X86_PG_PS) != 0) { + KASSERT((amd_feature & AMDID_PAGE1GB) != 0, + ("no 1G pages, va %#lx pdpe %#lx pdp %#lx", va, + (u_long)pdpe, pdp)); + return ((pdp & PG_PS_PDP_FRAME) | (va & PDPMASK)); + } + pde = pmap_pdpe_to_pde(pdpe, va); + pd = *pde; + KASSERT((pd & X86_PG_V) != 0, + ("invalid pd va %#lx pde %#lx pd %#lx", va, (u_long)pde, pd)); + if ((pd & X86_PG_PS) != 0) + return ((pd & PG_PS_FRAME) | (va & PDRMASK)); + pte = pmap_pde_to_pte(pde, va); + pt = *pte; + KASSERT((pt & X86_PG_V) != 0, + ("invalid pte va %#lx pte %#lx pt %#lx", va, (u_long)pte, pt)); + return ((pt & PG_FRAME) | (va & PAGE_MASK)); +} + static int pmap_large_map_getva(vm_size_t len, vm_offset_t align, vm_offset_t phase, vmem_addr_t *vmem_res) @@ -8891,8 +8930,8 @@ pmap_large_unmap(void *svaa, vm_size_t len) return; SLIST_INIT(&spgf); - KASSERT(LARGEMAP_MIN_ADDRESS <= sva && sva + len <= - LARGEMAP_MAX_ADDRESS + NBPML4 * (u_long)lm_ents, + KASSERT(LARGEMAP_MIN_ADDRESS <= sva && + sva + len <= PMAP_LARGEMAP_MAX_ADDRESS(), ("not largemap range %#lx %#lx", (u_long)svaa, (u_long)svaa + len)); PMAP_LOCK(kernel_pmap); for (va = sva; va < sva + len; va += inc) { From owner-svn-src-head@freebsd.org Fri May 24 23:33:12 2019 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 04AD215B7E78; Fri, 24 May 2019 23:33:12 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2040884CCF; Fri, 24 May 2019 23:33:11 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id x4ONX31v026512 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 25 May 2019 02:33:06 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua x4ONX31v026512 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id x4ONX3Vj026511; Sat, 25 May 2019 02:33:03 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 25 May 2019 02:33:03 +0300 From: Konstantin Belousov To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r348258 - head/sys/amd64/amd64 Message-ID: <20190524233303.GS2748@kib.kiev.ua> References: <201905242328.x4ONSB48098508@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201905242328.x4ONSB48098508@repo.freebsd.org> User-Agent: Mutt/1.11.4 (2019-03-13) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2019 23:33:12 -0000 On Fri, May 24, 2019 at 11:28:11PM +0000, Konstantin Belousov wrote: > Author: kib > Date: Fri May 24 23:28:11 2019 > New Revision: 348258 > URL: https://svnweb.freebsd.org/changeset/base/348258 > > Log: > Fix too loose assert in pmap_large_unmap(). > > The upper bound for the valid address from the large map used > LARGEMAP_MAX_ADDRESS instead of LARGEMAP_MIN_ADDRESS. Provide a > function-like macro for proper upper value. This commit was inadvertently merged with the next one, where the commit message was supposed to be 'Make pmap_kextract() operational over the large map.' Other metadata in the log is correct. I do not want to revert it for re-commit. > > Noted by: markj > Reviewed by: alc, markj > Sponsored by: The FreeBSD Foundation > MFC after: 1 week > Differential revision: https://reviews.freebsd.org/D20386 > > Modified: > head/sys/amd64/amd64/pmap.c > > Modified: head/sys/amd64/amd64/pmap.c > ============================================================================== > --- head/sys/amd64/amd64/pmap.c Fri May 24 23:26:17 2019 (r348257) > +++ head/sys/amd64/amd64/pmap.c Fri May 24 23:28:11 2019 (r348258) > @@ -421,6 +421,8 @@ static int pmap_flags = PMAP_PDE_SUPERPAGE; /* flags f > > static vmem_t *large_vmem; > static u_int lm_ents; > +#define PMAP_LARGEMAP_MAX_ADDRESS() \ > + (LARGEMAP_MIN_ADDRESS + NBPML4 * (u_long)lm_ents) > > int pmap_pcid_enabled = 1; > SYSCTL_INT(_vm_pmap, OID_AUTO, pcid_enabled, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, > @@ -1060,6 +1062,7 @@ static void pmap_invalidate_pde_page(pmap_t pmap, vm_o > pd_entry_t pde); > static void pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mode); > static vm_page_t pmap_large_map_getptp_unlocked(void); > +static vm_paddr_t pmap_large_map_kextract(vm_offset_t va); > static void pmap_pde_attr(pd_entry_t *pde, int cache_bits, int mask); > #if VM_NRESERVLEVEL > 0 > static void pmap_promote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va, > @@ -2961,6 +2964,9 @@ pmap_kextract(vm_offset_t va) > > if (va >= DMAP_MIN_ADDRESS && va < DMAP_MAX_ADDRESS) { > pa = DMAP_TO_PHYS(va); > + } else if (LARGEMAP_MIN_ADDRESS <= va && > + va < PMAP_LARGEMAP_MAX_ADDRESS()) { > + pa = pmap_large_map_kextract(va); > } else { > pde = *vtopde(va); > if (pde & PG_PS) { > @@ -8775,6 +8781,39 @@ retry: > return ((pt_entry_t *)PHYS_TO_DMAP(mphys) + pmap_pte_index(va)); > } > > +static vm_paddr_t > +pmap_large_map_kextract(vm_offset_t va) > +{ > + pdp_entry_t *pdpe, pdp; > + pd_entry_t *pde, pd; > + pt_entry_t *pte, pt; > + > + KASSERT(LARGEMAP_MIN_ADDRESS <= va && va < PMAP_LARGEMAP_MAX_ADDRESS(), > + ("not largemap range %#lx", (u_long)va)); > + pdpe = pmap_large_map_pdpe(va); > + pdp = *pdpe; > + KASSERT((pdp & X86_PG_V) != 0, > + ("invalid pdp va %#lx pdpe %#lx pdp %#lx", va, > + (u_long)pdpe, pdp)); > + if ((pdp & X86_PG_PS) != 0) { > + KASSERT((amd_feature & AMDID_PAGE1GB) != 0, > + ("no 1G pages, va %#lx pdpe %#lx pdp %#lx", va, > + (u_long)pdpe, pdp)); > + return ((pdp & PG_PS_PDP_FRAME) | (va & PDPMASK)); > + } > + pde = pmap_pdpe_to_pde(pdpe, va); > + pd = *pde; > + KASSERT((pd & X86_PG_V) != 0, > + ("invalid pd va %#lx pde %#lx pd %#lx", va, (u_long)pde, pd)); > + if ((pd & X86_PG_PS) != 0) > + return ((pd & PG_PS_FRAME) | (va & PDRMASK)); > + pte = pmap_pde_to_pte(pde, va); > + pt = *pte; > + KASSERT((pt & X86_PG_V) != 0, > + ("invalid pte va %#lx pte %#lx pt %#lx", va, (u_long)pte, pt)); > + return ((pt & PG_FRAME) | (va & PAGE_MASK)); > +} > + > static int > pmap_large_map_getva(vm_size_t len, vm_offset_t align, vm_offset_t phase, > vmem_addr_t *vmem_res) > @@ -8891,8 +8930,8 @@ pmap_large_unmap(void *svaa, vm_size_t len) > return; > > SLIST_INIT(&spgf); > - KASSERT(LARGEMAP_MIN_ADDRESS <= sva && sva + len <= > - LARGEMAP_MAX_ADDRESS + NBPML4 * (u_long)lm_ents, > + KASSERT(LARGEMAP_MIN_ADDRESS <= sva && > + sva + len <= PMAP_LARGEMAP_MAX_ADDRESS(), > ("not largemap range %#lx %#lx", (u_long)svaa, (u_long)svaa + len)); > PMAP_LOCK(kernel_pmap); > for (va = sva; va < sva + len; va += inc) { From owner-svn-src-head@freebsd.org Sat May 25 00:07:50 2019 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 2450E15B86C5; Sat, 25 May 2019 00:07:50 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B1843859B9; Sat, 25 May 2019 00:07:49 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9B4B924392; Sat, 25 May 2019 00:07:49 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4P07nOr019188; Sat, 25 May 2019 00:07:49 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4P07nfA019187; Sat, 25 May 2019 00:07:49 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201905250007.x4P07nfA019187@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Sat, 25 May 2019 00:07:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348259 - head/sys/geom/nop X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/sys/geom/nop X-SVN-Commit-Revision: 348259 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B1843859B9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 May 2019 00:07:50 -0000 Author: mckusick Date: Sat May 25 00:07:49 2019 New Revision: 348259 URL: https://svnweb.freebsd.org/changeset/base/348259 Log: When using the destroy option to shut down a nop GEOM module, I/O operations already in its queue were not being properly drained. The GEOM framework does the queue draining, but the module needs to wait for the draining to happen. The waiting is done by adding a g_nop_providergone() function to wait for the I/O operations to finish up. This change is similar to change -r345758 made to the memory-disk driver. Submitted by: Chuck Silvers Tested by: Chuck Silvers MFC after: 1 week Sponsored by: Netflix Modified: head/sys/geom/nop/g_nop.c Modified: head/sys/geom/nop/g_nop.c ============================================================================== --- head/sys/geom/nop/g_nop.c Fri May 24 23:28:11 2019 (r348258) +++ head/sys/geom/nop/g_nop.c Sat May 25 00:07:49 2019 (r348259) @@ -54,17 +54,26 @@ static int g_nop_destroy_geom(struct gctl_req *req, st struct g_geom *gp); static void g_nop_config(struct gctl_req *req, struct g_class *mp, const char *verb); -static void g_nop_dumpconf(struct sbuf *sb, const char *indent, - struct g_geom *gp, struct g_consumer *cp, struct g_provider *pp); +static g_access_t g_nop_access; +static g_dumpconf_t g_nop_dumpconf; +static g_orphan_t g_nop_orphan; +static g_provgone_t g_nop_providergone; +static g_resize_t g_nop_resize; +static g_start_t g_nop_start; struct g_class g_nop_class = { .name = G_NOP_CLASS_NAME, .version = G_VERSION, .ctlreq = g_nop_config, - .destroy_geom = g_nop_destroy_geom + .destroy_geom = g_nop_destroy_geom, + .access = g_nop_access, + .dumpconf = g_nop_dumpconf, + .orphan = g_nop_orphan, + .providergone = g_nop_providergone, + .resize = g_nop_resize, + .start = g_nop_start, }; - static void g_nop_orphan(struct g_consumer *cp) { @@ -320,11 +329,6 @@ g_nop_create(struct gctl_req *req, struct g_class *mp, sc->sc_wrotebytes = 0; mtx_init(&sc->sc_lock, "gnop lock", NULL, MTX_DEF); gp->softc = sc; - gp->start = g_nop_start; - gp->orphan = g_nop_orphan; - gp->resize = g_nop_resize; - gp->access = g_nop_access; - gp->dumpconf = g_nop_dumpconf; newpp = g_new_providerf(gp, "%s", gp->name); newpp->flags |= G_PF_DIRECT_SEND | G_PF_DIRECT_RECEIVE; @@ -357,6 +361,18 @@ fail: return (error); } +static void +g_nop_providergone(struct g_provider *pp) +{ + struct g_geom *gp = pp->geom; + struct g_nop_softc *sc = gp->softc; + + gp->softc = NULL; + free(sc->sc_physpath, M_GEOM); + mtx_destroy(&sc->sc_lock); + g_free(sc); +} + static int g_nop_destroy(struct g_geom *gp, boolean_t force) { @@ -367,7 +383,6 @@ g_nop_destroy(struct g_geom *gp, boolean_t force) sc = gp->softc; if (sc == NULL) return (ENXIO); - free(sc->sc_physpath, M_GEOM); pp = LIST_FIRST(&gp->provider); if (pp != NULL && (pp->acr != 0 || pp->acw != 0 || pp->ace != 0)) { if (force) { @@ -381,9 +396,6 @@ g_nop_destroy(struct g_geom *gp, boolean_t force) } else { G_NOP_DEBUG(0, "Device %s removed.", gp->name); } - gp->softc = NULL; - mtx_destroy(&sc->sc_lock); - g_free(sc); g_wither_geom(gp, ENXIO); return (0); From owner-svn-src-head@freebsd.org Sat May 25 00:38:55 2019 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 C6EFB15B8F95; Sat, 25 May 2019 00:38:55 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.12]) (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 2854F8673C; Sat, 25 May 2019 00:38:54 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id UKi1h4qaisAGkUKi3hDEoN; Fri, 24 May 2019 18:38:52 -0600 X-Authority-Analysis: v=2.3 cv=WeVylHpX c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=E5NmQfObTbMA:10 a=ASrO2z8EAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=UEpEsKYdWQD3eQkOumkA:9 a=Rc5TUw_wQp4Z_7gz:21 a=eqxhlmoB-vvMXGhw:21 a=QEXdDO2ut3YA:10 a=i8UNxtqY09YYJATF_ugA:9 a=HIt_kXhqRHWN5h8v:21 a=bn3e2i_yJ9W2f3Ef:21 a=ci6mo512LUvLpNOh:21 a=_W_S_7VecoQA:10 a=hMlqHZxbFqNCaWTKXPQf:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from [10.224.108.1] (unknown [24.244.23.196]) by spqr.komquats.com (Postfix) with ESMTPSA id B5580CEB; Fri, 24 May 2019 17:38:48 -0700 (PDT) Date: Fri, 24 May 2019 17:38:24 -0700 User-Agent: K-9 Mail for Android In-Reply-To: References: <201905242233.x4OMXEAr071844@repo.freebsd.org> MIME-Version: 1.0 Subject: Re: svn commit: r348255 - head/sys/kern To: Steven Hartland , Conrad Meyer CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Cy Schubert Message-ID: <003FD1FE-C765-4873-A784-D743F6A2156C@cschubert.com> X-CMAE-Envelope: MS4wfFoiywZUpU3etClt8mdHA81u4zTKgAC7wCs3mK9tf20KdMzco07r3xmQL9SdjK18gTjvuEOucZ8f9rwOgk61lAmJNa+w/+l7DIZTKFqMfDIzw6k4kZ14 hebWAjVWuJuWDTrvBUqcM2YW2Wwdt8sv1QtauY3ULpKRkyUmgMSWBbC2tLQQ59zDtZuBulqd0j5B2NNAdoyg8bcQN+GhBH9DVDAjRVrfLsRw2dN1leaDJh+8 GZZ30lY8yWegBmqeTkeeOMYrNOOK/ADlGnJrRs/2CEpORAHuq7X09LbaW6pwKUnUV22X/saf6Pj+HGYMVqdYod5Gog8cB0cq+ZjKIZfbbqI= X-Rspamd-Queue-Id: 2854F8673C X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 May 2019 00:38:56 -0000 +1 -------- Original Message -------- From: Steven Hartland Sent: May 24, 2019 4:21:39 PM PDT To: Conrad Meyer Cc: src-committers@freebsd=2Eorg, svn-src-all@freebsd=2Eorg, svn-src-head@= freebsd=2Eorg Subject: Re: svn commit: r348255 - head/sys/kern Just wanted to say I really appreciate the details in this commit message= =2E Its often the case the message get overlooked when it comes to the time needed to write a truly useful message to others and this a great example of the quality we should all try to follow=2E Regards Steve On Fri, 24 May 2019 at 23:33, Conrad Meyer wrote: > Author: cem > Date: Fri May 24 22:33:14 2019 > New Revision: 348255 > URL: https://svnweb=2Efreebsd=2Eorg/changeset/base/348255 > > Log: > Disable intr_storm_threshold mechanism by default > > The ixl=2E4 manual page has documented that the threshold falsely dete= cts > interrupt storms on 40Gbit NICs as long ago as 2015, and we have seen > similar false positives with the ioat(4) DMA device (which can push > GB/s)=2E > > For example, synthetic load can be generated with tools/tools/ioat > 'ioatcontrol 0 200 8192 1 1000' (allocate 200x8kB buffers, generate an > interrupt for each one, and do this for 1000 milliseconds)=2E With > storm-detection disabled, the Broadwell-EP version of this device is > capable > of generating ~350k real interrupts per second=2E > > The following historical context comes from jhb@: Originally, the > threshold > worked around incorrect routing of PCI INTx interrupts on single-CPU > systems > which would end up in a hard hang during boot=2E Since the threshold = was > added, our PCI interrupt routing was improved, most PCI interrupts use > edge-triggered MSI instead of level-triggered INTx, and typical system= s > have > multiple CPUs available to service interrupts=2E > > On the off chance that the threshold is useful in the future, it remai= ns > available as a tunable and sysctl=2E > > Reviewed by: jhb > Sponsored by: Dell EMC Isilon > Differential Revision: https://reviews=2Efreebsd=2Eorg/D20401 > > Modified: > head/sys/kern/kern_intr=2Ec > > Modified: head/sys/kern/kern_intr=2Ec > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/kern/kern_intr=2Ec Fri May 24 22:30:40 2019 (r3482= 54) > +++ head/sys/kern/kern_intr=2Ec Fri May 24 22:33:14 2019 (r3482= 55) > @@ -91,7 +91,7 @@ struct proc *intrproc; > > static MALLOC_DEFINE(M_ITHREAD, "ithread", "Interrupt Threads"); > > -static int intr_storm_threshold =3D 1000; > +static int intr_storm_threshold =3D 0; > SYSCTL_INT(_hw, OID_AUTO, intr_storm_threshold, CTLFLAG_RWTUN, > &intr_storm_threshold, 0, > "Number of consecutive interrupts before storm protection is > enabled"); > > --=20 Pardon the typos and autocorrect, small keyboard in use=2E Cheers, Cy Schubert FreeBSD UNIX: Web: http://www=2EFreeBSD=2Eorg The need of the many outweighs the greed of the few=2E From owner-svn-src-head@freebsd.org Sat May 25 01:59:26 2019 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 E5D8115BA6FA; Sat, 25 May 2019 01:59:25 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 88A6388E1C; Sat, 25 May 2019 01:59:25 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 631192562D; Sat, 25 May 2019 01:59:25 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4P1xPHA077153; Sat, 25 May 2019 01:59:25 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4P1xPiV077152; Sat, 25 May 2019 01:59:25 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201905250159.x4P1xPiV077152@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sat, 25 May 2019 01:59:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348262 - head/sys/dev/virtio/pci X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/dev/virtio/pci X-SVN-Commit-Revision: 348262 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 88A6388E1C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 May 2019 01:59:26 -0000 Author: cem Date: Sat May 25 01:59:24 2019 New Revision: 348262 URL: https://svnweb.freebsd.org/changeset/base/348262 Log: virtio_pci(4): Fix typo in read_ivar method Prior to this revision, vtpci's BUS_READ_IVAR method on VIRTIO_IVAR_SUBVENDOR accidentally returned the PCI subdevice. The typo seems to have been introduced with the original commit adding VIRTIO_IVAR_{{SUB,}DEVICE,{SUB,}VENDOR} to virtio_pci. The commit log and code strongly suggest that the ivar was intended to return the subvendor rather than the subdevice; it was likely just a copy/paste mistake. Go ahead and rectify that. Modified: head/sys/dev/virtio/pci/virtio_pci.c Modified: head/sys/dev/virtio/pci/virtio_pci.c ============================================================================== --- head/sys/dev/virtio/pci/virtio_pci.c Sat May 25 01:58:00 2019 (r348261) +++ head/sys/dev/virtio/pci/virtio_pci.c Sat May 25 01:59:24 2019 (r348262) @@ -408,7 +408,7 @@ vtpci_read_ivar(device_t dev, device_t child, int inde *result = pci_get_device(dev); break; case VIRTIO_IVAR_SUBVENDOR: - *result = pci_get_subdevice(dev); + *result = pci_get_subvendor(dev); break; default: return (ENOENT); From owner-svn-src-head@freebsd.org Sat May 25 02:41:24 2019 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 A2E9B15955EC; Sat, 25 May 2019 02:41:24 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 186E989F84; Sat, 25 May 2019 02:41:24 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-lf1-x142.google.com with SMTP id d8so8425431lfb.8; Fri, 24 May 2019 19:41:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Aq463CB5WCkNULTebLHQFwkUKCD0T5HlnJ314ndE9uY=; b=a1eL4Vw1watZCw/5n2lbmoKatPcBjShoLTl32RBaISJykAuvsLk920QWRFxE2ongaO mgjH5XO7y8ARcHBDEi9ACZsVlzmfAD/cm7tcd0YK6bOBlcwtt757fNqpOwuIoTDgnH0/ 5d8l0BT0dEZcYatW1j89aqf85MTrjk7XOuT5dkiIXSdHRC1lCZnSaEavRezKG5Oz6vhh zivqUTXO0fRVcz7lwZpSSaleFjHGCsfqQgShPQyIWJE6AjtxDhAEIpjJUKOffhDf6dHb ITYI2T8wsujbnqpvWS9kKJRUeSLIDPyFHcSAHrrb4UiYwhshNyp5ERNTodPNVAZy11Pz iDGw== 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=Aq463CB5WCkNULTebLHQFwkUKCD0T5HlnJ314ndE9uY=; b=WbnkpEXP6zVxa5GO4Cd5ac7b0XKvAh6Rfbp8Q6REaCD0eVqJoycRsUhrv19l3GyigI DtzgyNXn92Pf25xSx+Na9xOTI9oIXp3R2mjn0cG13nukP7H1Hq4uXfeW7sgL1Y2jo/06 vvSTRsS8fWb0YcPdP9AhC3g6ZrsocuICLYbrLnXibgvpPOakKP9asYOHJ0DAYUx7Nce/ BO/B+ozSXtCXGtgYMymt6jAfpWLyDwgXEQDCKzfEI3T76jFFTFJX6P54P0Q1CJHB+mu7 BWp/oSIXoN6caP6isulbKgh85jshezvDswGhdDZJ/qnfsXzmuhBBsxKjwhKnTr2572vY IjLg== X-Gm-Message-State: APjAAAVetfhXxNGfapVo6llyh6aOb1CsQ9qIKu6f3/zUjcxoNWUGNtOb Ns2kO9B9wOhLlOK+ypB/pG451ZtUcdiegH4dJZj6UA7l X-Google-Smtp-Source: APXvYqwk8bcAgBtCIlEvXESTMLofTQFTnCmtnvVLNkg6o8Bc4ET7kO7wJPULEoSiwBEEydQ00ffFPAsDx6V1m1gxmYA= X-Received: by 2002:a19:f60f:: with SMTP id x15mr1748453lfe.61.1558752080584; Fri, 24 May 2019 19:41:20 -0700 (PDT) MIME-Version: 1.0 References: <20190524152941.40f7e239@titan.knownspace> <201905242301.x4ON1Zju098365@gndrsh.dnsmgr.net> In-Reply-To: <201905242301.x4ON1Zju098365@gndrsh.dnsmgr.net> From: Justin Hibbits Date: Fri, 24 May 2019 21:41:08 -0500 Message-ID: Subject: Re: svn commit: r348250 - head/sys/powerpc/conf To: rgrimes@freebsd.org Cc: Alexey Dokuchaev , Piotr Kubaj , svn-src-head , svn-src-all , src-committers Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 186E989F84 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.99)[-0.993,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 May 2019 02:41:24 -0000 On Fri, May 24, 2019 at 6:01 PM Rodney W. Grimes wrote: > > > On Fri, 24 May 2019 20:22:52 +0000 > > Alexey Dokuchaev wrote: > > > > > On Fri, May 24, 2019 at 03:16:51PM -0500, Justin Hibbits wrote: > > > > On Fri, 24 May 2019 20:01:59 +0000 (UTC) Piotr Kubaj wrote: > > > > > New Revision: 348250 > > > > > URL: https://svnweb.freebsd.org/changeset/base/348250 > > > > > > > > > > Log: > > > > > Add snd_hda(4) to GENERIC64 used by powerpc64. > > > > > > > > > > amd64 also has snd_hda(4) in GENERIC. > > > > > > > > > > Modified: > > > > > head/sys/powerpc/conf/GENERIC64 > > > > > ... > > > > > > > > To note: This was done because there's a strange bug in the snd_hda > > > > module, with the hdaa component. For some reason it either doesn't > > > > find all the internal components it needs, or something, because > > > > there's a NULL dereference when trying to call a kobj method in > > > > hdaa_attach(). > > > > > > So this commit essentially masks the real bug somewhere rather than > > > fixing it, is this what you're saying? > > > > > > ./danfe > > > > It's a viable workaround to a problem that reaches a wide audience. > > Since it works built-in, I found it acceptable. I probably should have > > filed a bug for it a year ago when I hit it and worked around it, but it > > could also very well be a compiler issue. > > > > By the way, it works fine on powerpc (32-bit) loaded as a module. > > Please do file a bug report now, please do mark the line in GENERIC64 with > a comment XXX This is needed to work around foo so that it is documented > why it is there and someone removing it does not go down a rabit > hole others have already been down, and so that some day someone > may go down that rabbit hole of there own free will and fix this > for us. > > Paving over the top of obscure bugs with a hackish fix is ok, > not documenting this state of affairs is not, IMHO. > > > - Justin > -- > Rod Grimes rgrimes@freebsd.org Bug filed as kern/238113. I don't think a XXX is necessarily needed in GENERIC64, since it's also parity with GENERIC on amd64. - Justin From owner-svn-src-head@freebsd.org Sat May 25 03:02:36 2019 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 1E1C71595E5F; Sat, 25 May 2019 03:02:36 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D7688ACAA; Sat, 25 May 2019 03:02:35 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x4P32Wgd099332; Fri, 24 May 2019 20:02:32 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x4P32V8m099331; Fri, 24 May 2019 20:02:31 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201905250302.x4P32V8m099331@gndrsh.dnsmgr.net> Subject: Re: svn commit: r348250 - head/sys/powerpc/conf In-Reply-To: To: Justin Hibbits Date: Fri, 24 May 2019 20:02:31 -0700 (PDT) CC: rgrimes@freebsd.org, Alexey Dokuchaev , Piotr Kubaj , svn-src-head , svn-src-all , src-committers Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 6D7688ACAA X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-7.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-1.00)[-0.997,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 May 2019 03:02:36 -0000 > On Fri, May 24, 2019 at 6:01 PM Rodney W. Grimes > wrote: > > > > > On Fri, 24 May 2019 20:22:52 +0000 > > > Alexey Dokuchaev wrote: > > > > > > > On Fri, May 24, 2019 at 03:16:51PM -0500, Justin Hibbits wrote: > > > > > On Fri, 24 May 2019 20:01:59 +0000 (UTC) Piotr Kubaj wrote: > > > > > > New Revision: 348250 > > > > > > URL: https://svnweb.freebsd.org/changeset/base/348250 > > > > > > > > > > > > Log: > > > > > > Add snd_hda(4) to GENERIC64 used by powerpc64. > > > > > > > > > > > > amd64 also has snd_hda(4) in GENERIC. > > > > > > > > > > > > Modified: > > > > > > head/sys/powerpc/conf/GENERIC64 > > > > > > ... > > > > > > > > > > To note: This was done because there's a strange bug in the snd_hda > > > > > module, with the hdaa component. For some reason it either doesn't > > > > > find all the internal components it needs, or something, because > > > > > there's a NULL dereference when trying to call a kobj method in > > > > > hdaa_attach(). > > > > > > > > So this commit essentially masks the real bug somewhere rather than > > > > fixing it, is this what you're saying? > > > > > > > > ./danfe > > > > > > It's a viable workaround to a problem that reaches a wide audience. > > > Since it works built-in, I found it acceptable. I probably should have > > > filed a bug for it a year ago when I hit it and worked around it, but it > > > could also very well be a compiler issue. > > > > > > By the way, it works fine on powerpc (32-bit) loaded as a module. > > > > Please do file a bug report now, please do mark the line in GENERIC64 with > > a comment XXX This is needed to work around foo so that it is documented > > why it is there and someone removing it does not go down a rabit > > hole others have already been down, and so that some day someone > > may go down that rabbit hole of there own free will and fix this > > for us. > > > > Paving over the top of obscure bugs with a hackish fix is ok, > > not documenting this state of affairs is not, IMHO. > > > > > - Justin > > -- > > Rod Grimes rgrimes@freebsd.org > > Bug filed as kern/238113. I don't think a XXX is necessarily needed > in GENERIC64, since it's also parity with GENERIC on amd64. Does the bug also exist on amd64? > - Justin -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sat May 25 03:22:29 2019 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 879CE15965FE; Sat, 25 May 2019 03:22:29 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EE0EE8B623; Sat, 25 May 2019 03:22:28 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-lj1-x241.google.com with SMTP id h19so1879826ljj.4; Fri, 24 May 2019 20:22:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0rfwTA5D6abBPRymgxWYmeKUyqnokJN3rrRlJ9MjgZs=; b=G/43IcB27uem5CgGaoJ8vBwLZ78C4EISQNkHkkEe5pQiDvfYKrNCaz2+4d+8i+Zmlt W3GWYLPWiW7qW7/e3sCpiQyno+24w3f9U8AADtavp996O3MSaUUnEELKhO3myzAQykHP Ix94lV2f60bAvTERV/E00XY+v/yOIT+iwB+HXAigU2WZ576VL2S3aUTwvTzJiuX0ZOfH c9Y9B25BBo5PF6GoiWvijEi3rhSNDvCWW6ZE9PlafSpt97GxxXv/H9K1zjPbk7tdd7/6 KffJIEq1Qqm6RRth6flKG57PMzyd5Nk1LEoDxxEOyPcVXVx5bm7KfE+k68cGdyDgofHy zxBQ== 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=0rfwTA5D6abBPRymgxWYmeKUyqnokJN3rrRlJ9MjgZs=; b=FpmL6tkMjU0AShFoGTZu0L//Do4WcX/s8QYXwTAfcyqokM83ilULpb8frvt4AS87qv IXMZ7BG9CKdozwhG0yCO0yrLKAldskeIM10hox3m2qz3MGeOPO4MLwZhRGROoKUlaqc1 /K53Gi3mJUrzoNoc8bC2MsR7B7oGdbaNqeuxNk+BDPYMpoImfwt+299VHv711+KmLORa Fe7vg4CwigNjbfvzc68CgNejN49yXnk6Tn/p6dI2hLB9i/rqRgcaXps1vVVkcobXOHAE b31pYu8whq/XcFipEIr2UcpqHN/1ORDrgebwviV/1c0SXOTH8CyXE8pFZiCZPO/3jodg kwJw== X-Gm-Message-State: APjAAAXQxpAX5qebzATjOMx1umd64kpSDeHRzNNMvb3ZFgnW4CKL5m5Z 2aezXd9V+YD9K2z/aWpiZxV60NG1N/mDaoLMeCyydm0t X-Google-Smtp-Source: APXvYqyGCBJdRGpM8ATb94YcJdnYknqOdoyjQnAwGHK08hr8WzofA49hBG74y01z2FhLw3xKj1lZyaZJ7TjVMxuUVeg= X-Received: by 2002:a2e:8716:: with SMTP id m22mr2512034lji.128.1558754546785; Fri, 24 May 2019 20:22:26 -0700 (PDT) MIME-Version: 1.0 References: <201905250302.x4P32V8m099331@gndrsh.dnsmgr.net> In-Reply-To: <201905250302.x4P32V8m099331@gndrsh.dnsmgr.net> From: Justin Hibbits Date: Fri, 24 May 2019 22:22:13 -0500 Message-ID: Subject: Re: svn commit: r348250 - head/sys/powerpc/conf To: rgrimes@freebsd.org Cc: Alexey Dokuchaev , Piotr Kubaj , svn-src-head , svn-src-all , src-committers Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: EE0EE8B623 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.99)[-0.993,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 May 2019 03:22:29 -0000 On Fri, May 24, 2019 at 10:02 PM Rodney W. Grimes wrote: > > > On Fri, May 24, 2019 at 6:01 PM Rodney W. Grimes > > wrote: > > > > > > > On Fri, 24 May 2019 20:22:52 +0000 > > > > Alexey Dokuchaev wrote: > > > > > > > > > On Fri, May 24, 2019 at 03:16:51PM -0500, Justin Hibbits wrote: > > > > > > On Fri, 24 May 2019 20:01:59 +0000 (UTC) Piotr Kubaj wrote: > > > > > > > New Revision: 348250 > > > > > > > URL: https://svnweb.freebsd.org/changeset/base/348250 > > > > > > > > > > > > > > Log: > > > > > > > Add snd_hda(4) to GENERIC64 used by powerpc64. > > > > > > > > > > > > > > amd64 also has snd_hda(4) in GENERIC. > > > > > > > > > > > > > > Modified: > > > > > > > head/sys/powerpc/conf/GENERIC64 > > > > > > > ... > > > > > > > > > > > > To note: This was done because there's a strange bug in the snd_hda > > > > > > module, with the hdaa component. For some reason it either doesn't > > > > > > find all the internal components it needs, or something, because > > > > > > there's a NULL dereference when trying to call a kobj method in > > > > > > hdaa_attach(). > > > > > > > > > > So this commit essentially masks the real bug somewhere rather than > > > > > fixing it, is this what you're saying? > > > > > > > > > > ./danfe > > > > > > > > It's a viable workaround to a problem that reaches a wide audience. > > > > Since it works built-in, I found it acceptable. I probably should have > > > > filed a bug for it a year ago when I hit it and worked around it, but it > > > > could also very well be a compiler issue. > > > > > > > > By the way, it works fine on powerpc (32-bit) loaded as a module. > > > > > > Please do file a bug report now, please do mark the line in GENERIC64 with > > > a comment XXX This is needed to work around foo so that it is documented > > > why it is there and someone removing it does not go down a rabit > > > hole others have already been down, and so that some day someone > > > may go down that rabbit hole of there own free will and fix this > > > for us. > > > > > > Paving over the top of obscure bugs with a hackish fix is ok, > > > not documenting this state of affairs is not, IMHO. > > > > > > > - Justin > > > -- > > > Rod Grimes rgrimes@freebsd.org > > > > Bug filed as kern/238113. I don't think a XXX is necessarily needed > > in GENERIC64, since it's also parity with GENERIC on amd64. > > Does the bug also exist on amd64? No idea. I don't have any amd64 hardware, and it's been in GENERIC for as long as I know. My unfounded guess is that it doesn't exist on amd64, but someone else would have to confirm that. - Justin From owner-svn-src-head@freebsd.org Sat May 25 04:56:07 2019 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 7C52215989F4; Sat, 25 May 2019 04:56:07 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1DED58E48A; Sat, 25 May 2019 04:56:07 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E70F5275A0; Sat, 25 May 2019 04:56:06 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4P4u6I4072469; Sat, 25 May 2019 04:56:06 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4P4u6Ef072468; Sat, 25 May 2019 04:56:06 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201905250456.x4P4u6Ef072468@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 25 May 2019 04:56:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348267 - head/sys/powerpc/aim X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/aim X-SVN-Commit-Revision: 348267 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1DED58E48A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.93)[-0.931,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 May 2019 04:56:07 -0000 Author: jhibbits Date: Sat May 25 04:56:06 2019 New Revision: 348267 URL: https://svnweb.freebsd.org/changeset/base/348267 Log: powerpc64/pmap: Reapply r334235 to OEA64 pmap, clearing HID0_RADIX This was lost in the re-merger of ISA3 MMU into moea64_native. Modified: head/sys/powerpc/aim/moea64_native.c Modified: head/sys/powerpc/aim/moea64_native.c ============================================================================== --- head/sys/powerpc/aim/moea64_native.c Sat May 25 04:31:04 2019 (r348266) +++ head/sys/powerpc/aim/moea64_native.c Sat May 25 04:56:06 2019 (r348267) @@ -401,6 +401,12 @@ moea64_cpu_bootstrap_native(mmu_t mmup, int ap) mtmsr(mfmsr() & ~PSL_DR & ~PSL_IR); + switch(mfpvr() >> 16) { + case IBMPOWER9: + mtspr(SPR_HID0, mfspr(SPR_HID0) & ~HID0_RADIX); + break; + } + /* * Install kernel SLB entries */ From owner-svn-src-head@freebsd.org Sat May 25 07:26:33 2019 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 B6BEE15A4B99; Sat, 25 May 2019 07:26:32 +0000 (UTC) (envelope-from sef@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47E4492CF8; Sat, 25 May 2019 07:26:32 +0000 (UTC) (envelope-from sef@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B470F10; Sat, 25 May 2019 07:26:32 +0000 (UTC) (envelope-from sef@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4P7QWlx050354; Sat, 25 May 2019 07:26:32 GMT (envelope-from sef@FreeBSD.org) Received: (from sef@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4P7QUBd050347; Sat, 25 May 2019 07:26:30 GMT (envelope-from sef@FreeBSD.org) Message-Id: <201905250726.x4P7QUBd050347@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sef set sender to sef@FreeBSD.org using -f From: Sean Eric Fagan Date: Sat, 25 May 2019 07:26:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348268 - in head/sys: conf crypto/aesni modules/aesni X-SVN-Group: head X-SVN-Commit-Author: sef X-SVN-Commit-Paths: in head/sys: conf crypto/aesni modules/aesni X-SVN-Commit-Revision: 348268 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 47E4492CF8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 May 2019 07:26:33 -0000 Author: sef Date: Sat May 25 07:26:30 2019 New Revision: 348268 URL: https://svnweb.freebsd.org/changeset/base/348268 Log: Add an AESNI-optimized version of the CCM/CBC cryptographic and authentication code. The primary client of this is probably going to be ZFS encryption. Reviewed by: jhb, cem Sponsored by: iXsystems Inc, Kithrup Enterprises Differential Revision: https://reviews.freebsd.org/D19298 Added: head/sys/crypto/aesni/aesni_ccm.c (contents, props changed) Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/crypto/aesni/aesni.c head/sys/crypto/aesni/aesni.h head/sys/crypto/aesni/aesni_wrap.c head/sys/modules/aesni/Makefile Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Sat May 25 04:56:06 2019 (r348267) +++ head/sys/conf/files.amd64 Sat May 25 07:26:30 2019 (r348268) @@ -175,6 +175,11 @@ aesni_ghash.o optional aesni \ compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes -mpclmul ${.IMPSRC}" \ no-implicit-rule \ clean "aesni_ghash.o" +aesni_ccm.o optional aesni \ + dependency "$S/crypto/aesni/aesni_ccm.c" \ + compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes -mpclmul ${.IMPSRC}" \ + no-implicit-rule \ + clean "aesni_ccm.o" aesni_wrap.o optional aesni \ dependency "$S/crypto/aesni/aesni_wrap.c" \ compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes ${.IMPSRC}" \ Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Sat May 25 04:56:06 2019 (r348267) +++ head/sys/conf/files.i386 Sat May 25 07:26:30 2019 (r348268) @@ -127,6 +127,11 @@ aesni_ghash.o optional aesni \ compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes -mpclmul ${.IMPSRC}" \ no-implicit-rule \ clean "aesni_ghash.o" +aesni_ccm.o optional aesni \ + dependency "$S/crypto/aesni/aesni_ccm.c" \ + compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes -mpclmul ${.IMPSRC}" \ + no-implicit-rule \ + clean "aesni_ccm.o" aesni_wrap.o optional aesni \ dependency "$S/crypto/aesni/aesni_wrap.c" \ compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes ${.IMPSRC}" \ Modified: head/sys/crypto/aesni/aesni.c ============================================================================== --- head/sys/crypto/aesni/aesni.c Sat May 25 04:56:06 2019 (r348267) +++ head/sys/crypto/aesni/aesni.c Sat May 25 07:26:30 2019 (r348268) @@ -132,9 +132,10 @@ aesni_probe(device_t dev) return (EINVAL); } else if (has_aes && has_sha) device_set_desc(dev, - "AES-CBC,AES-XTS,AES-GCM,AES-ICM,SHA1,SHA256"); + "AES-CBC,AES-CCM,AES-GCM,AES-ICM,AES-XTS,SHA1,SHA256"); else if (has_aes) - device_set_desc(dev, "AES-CBC,AES-XTS,AES-GCM,AES-ICM"); + device_set_desc(dev, + "AES-CBC,AES-CCM,AES-GCM,AES-ICM,AES-XTS"); else device_set_desc(dev, "SHA1,SHA256"); @@ -194,6 +195,8 @@ aesni_attach(device_t dev) crypto_register(sc->cid, CRYPTO_AES_192_NIST_GMAC, 0, 0); crypto_register(sc->cid, CRYPTO_AES_256_NIST_GMAC, 0, 0); crypto_register(sc->cid, CRYPTO_AES_XTS, 0, 0); + crypto_register(sc->cid, CRYPTO_AES_CCM_16, 0, 0); + crypto_register(sc->cid, CRYPTO_AES_CCM_CBC_MAC, 0, 0); } if (sc->has_sha) { crypto_register(sc->cid, CRYPTO_SHA1, 0, 0); @@ -227,6 +230,7 @@ aesni_newsession(device_t dev, crypto_session_t cses, struct aesni_session *ses; struct cryptoini *encini, *authini; bool gcm_hash, gcm; + bool cbc_hash, ccm; int error; KASSERT(cses != NULL, ("EDOOFUS")); @@ -243,10 +247,17 @@ aesni_newsession(device_t dev, crypto_session_t cses, encini = NULL; gcm = false; gcm_hash = false; + ccm = cbc_hash = false; + for (; cri != NULL; cri = cri->cri_next) { switch (cri->cri_alg) { case CRYPTO_AES_NIST_GCM_16: - gcm = true; + case CRYPTO_AES_CCM_16: + if (cri->cri_alg == CRYPTO_AES_NIST_GCM_16) { + gcm = true; + } else if (cri->cri_alg == CRYPTO_AES_CCM_16) { + ccm = true; + } /* FALLTHROUGH */ case CRYPTO_AES_CBC: case CRYPTO_AES_ICM: @@ -259,6 +270,10 @@ aesni_newsession(device_t dev, crypto_session_t cses, } encini = cri; break; + case CRYPTO_AES_CCM_CBC_MAC: + cbc_hash = true; + authini = cri; + break; case CRYPTO_AES_128_NIST_GMAC: case CRYPTO_AES_192_NIST_GMAC: case CRYPTO_AES_256_NIST_GMAC: @@ -266,7 +281,12 @@ aesni_newsession(device_t dev, crypto_session_t cses, * nothing to do here, maybe in the future cache some * values for GHASH */ + if (authini != NULL) { + CRYPTDEB("authini already set"); + return (EINVAL); + } gcm_hash = true; + authini = cri; break; case CRYPTO_SHA1: case CRYPTO_SHA1_HMAC: @@ -296,9 +316,16 @@ unhandled: * GMAC algorithms are only supported with simultaneous GCM. Likewise * GCM is not supported without GMAC. */ - if (gcm_hash != gcm) + if (gcm_hash != gcm) { + CRYPTDEB("gcm_hash != gcm"); return (EINVAL); + } + if (cbc_hash != ccm) { + CRYPTDEB("cbc_hash != ccm"); + return (EINVAL); + } + if (encini != NULL) ses->algo = encini->cri_alg; if (authini != NULL) @@ -339,6 +366,7 @@ aesni_process(device_t dev, struct cryptop *crp, int h for (crd = crp->crp_desc; crd != NULL; crd = crd->crd_next) { switch (crd->crd_alg) { case CRYPTO_AES_NIST_GCM_16: + case CRYPTO_AES_CCM_16: needauth = 1; /* FALLTHROUGH */ case CRYPTO_AES_CBC: @@ -354,6 +382,7 @@ aesni_process(device_t dev, struct cryptop *crp, int h case CRYPTO_AES_128_NIST_GMAC: case CRYPTO_AES_192_NIST_GMAC: case CRYPTO_AES_256_NIST_GMAC: + case CRYPTO_AES_CCM_CBC_MAC: case CRYPTO_SHA1: case CRYPTO_SHA1_HMAC: case CRYPTO_SHA2_224: @@ -648,6 +677,7 @@ aesni_cipher_process(struct aesni_session *ses, struct if (enccrd != NULL) { if ((enccrd->crd_alg == CRYPTO_AES_ICM || + enccrd->crd_alg == CRYPTO_AES_CCM_16 || enccrd->crd_alg == CRYPTO_AES_NIST_GCM_16) && (enccrd->crd_flags & CRD_F_IV_EXPLICIT) == 0) return (EINVAL); @@ -701,8 +731,9 @@ aesni_cipher_crypt(struct aesni_session *ses, struct c int error, ivlen; bool encflag, allocated, authallocated; - KASSERT(ses->algo != CRYPTO_AES_NIST_GCM_16 || authcrd != NULL, - ("AES_NIST_GCM_16 must include MAC descriptor")); + KASSERT((ses->algo != CRYPTO_AES_NIST_GCM_16 && + ses->algo != CRYPTO_AES_CCM_16) || authcrd != NULL, + ("AES_NIST_GCM_16/AES_CCM_16 must include MAC descriptor")); ivlen = 0; authbuf = NULL; @@ -712,7 +743,8 @@ aesni_cipher_crypt(struct aesni_session *ses, struct c return (ENOMEM); authallocated = false; - if (ses->algo == CRYPTO_AES_NIST_GCM_16) { + if (ses->algo == CRYPTO_AES_NIST_GCM_16 || + ses->algo == CRYPTO_AES_CCM_16) { authbuf = aesni_cipher_alloc(authcrd, crp, &authallocated); if (authbuf == NULL) { error = ENOMEM; @@ -738,6 +770,7 @@ aesni_cipher_crypt(struct aesni_session *ses, struct c ivlen = 8; break; case CRYPTO_AES_NIST_GCM_16: + case CRYPTO_AES_CCM_16: ivlen = 12; /* should support arbitarily larger */ break; } @@ -787,7 +820,7 @@ aesni_cipher_crypt(struct aesni_session *ses, struct c case CRYPTO_AES_NIST_GCM_16: if (!encflag) crypto_copydata(crp->crp_flags, crp->crp_buf, - authcrd->crd_inject, GMAC_DIGEST_LEN, tag); + authcrd->crd_inject, sizeof(tag), tag); else bzero(tag, sizeof tag); @@ -798,7 +831,7 @@ aesni_cipher_crypt(struct aesni_session *ses, struct c if (authcrd != NULL) crypto_copyback(crp->crp_flags, crp->crp_buf, - authcrd->crd_inject, GMAC_DIGEST_LEN, tag); + authcrd->crd_inject, sizeof(tag), tag); } else { if (!AES_GCM_decrypt(buf, buf, authbuf, iv, tag, enccrd->crd_len, authcrd->crd_len, ivlen, @@ -806,9 +839,28 @@ aesni_cipher_crypt(struct aesni_session *ses, struct c error = EBADMSG; } break; + case CRYPTO_AES_CCM_16: + if (!encflag) + crypto_copydata(crp->crp_flags, crp->crp_buf, + authcrd->crd_inject, sizeof(tag), tag); + else + bzero(tag, sizeof tag); + if (encflag) { + AES_CCM_encrypt(buf, buf, authbuf, iv, tag, + enccrd->crd_len, authcrd->crd_len, ivlen, + ses->enc_schedule, ses->rounds); + if (authcrd != NULL) + crypto_copyback(crp->crp_flags, crp->crp_buf, + authcrd->crd_inject, sizeof(tag), tag); + } else { + if (!AES_CCM_decrypt(buf, buf, authbuf, iv, tag, + enccrd->crd_len, authcrd->crd_len, ivlen, + ses->enc_schedule, ses->rounds)) + error = EBADMSG; + } + break; } - - if (allocated) + if (allocated && error == 0) crypto_copyback(crp->crp_flags, crp->crp_buf, enccrd->crd_skip, enccrd->crd_len, buf); Modified: head/sys/crypto/aesni/aesni.h ============================================================================== --- head/sys/crypto/aesni/aesni.h Sat May 25 04:56:06 2019 (r348267) +++ head/sys/crypto/aesni/aesni.h Sat May 25 07:26:30 2019 (r348268) @@ -111,6 +111,15 @@ int AES_GCM_decrypt(const unsigned char *in, unsigned const unsigned char *tag, uint32_t nbytes, uint32_t abytes, int ibytes, const unsigned char *key, int nr); +/* CCM + CBC-MAC functions */ +void AES_CCM_encrypt(const unsigned char *in, unsigned char *out, + const unsigned char *addt, const unsigned char *ivec, + unsigned char *tag, uint32_t nbytes, uint32_t abytes, int ibytes, + const unsigned char *key, int nr); +int AES_CCM_decrypt(const unsigned char *in, unsigned char *out, + const unsigned char *addt, const unsigned char *ivec, + const unsigned char *tag, uint32_t nbytes, uint32_t abytes, int ibytes, + const unsigned char *key, int nr); int aesni_cipher_setup_common(struct aesni_session *ses, const uint8_t *key, int keylen); Added: head/sys/crypto/aesni/aesni_ccm.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/crypto/aesni/aesni_ccm.c Sat May 25 07:26:30 2019 (r348268) @@ -0,0 +1,439 @@ +/*- + * Copyright (c) 2014 The FreeBSD Foundation + * Copyright (c) 2018 iXsystems, Inc + * All rights reserved. + * + * This software was developed by John-Mark Gurney under + * the sponsorship of the FreeBSD Foundation and + * Rubicon Communications, LLC (Netgate). + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * + * $FreeBSD$ + * + * This file implements AES-CCM+CBC-MAC, as described + * at https://tools.ietf.org/html/rfc3610, using Intel's + * AES-NI instructions. + * + */ + +#include +#include +#include + +#include +#include +#include +#include +#define AESNI_ENC(d, k, nr) aesni_enc(nr-1, (const __m128i*)k, d) + +#include +#include +#include + +/* + * Encrypt a single 128-bit block after + * doing an xor. This is also used to + * decrypt (yay symmetric encryption). + */ +static inline __m128i +xor_and_encrypt(__m128i a, __m128i b, const unsigned char *k, int nr) +{ + __m128 retval = _mm_xor_si128(a, b); + + retval = AESNI_ENC(retval, k, nr); + return (retval); +} + +/* + * Put value at the end of block, starting at offset. + * (This goes backwards, putting bytes in *until* it + * reaches offset.) + */ +static void +append_int(size_t value, __m128i *block, size_t offset) +{ + int indx = sizeof(*block) - 1; + uint8_t *bp = (uint8_t*)block; + + while (indx > (sizeof(*block) - offset)) { + bp[indx] = value & 0xff; + indx--; + value >>= 8; + } +} + +/* + * Start the CBC-MAC process. This handles the auth data. + */ +static __m128i +cbc_mac_start(const unsigned char *auth_data, size_t auth_len, + const unsigned char *nonce, size_t nonce_len, + const unsigned char *key, int nr, + size_t data_len, size_t tag_len) +{ + __m128i cbc_block, staging_block; + uint8_t *byte_ptr; + /* This defines where the message length goes */ + int L = sizeof(__m128i) - 1 - nonce_len; + + /* + * Set up B0 here. This has the flags byte, + * followed by the nonce, followed by the + * length of the message. + */ + cbc_block = _mm_setzero_si128(); + byte_ptr = (uint8_t*)&cbc_block; + byte_ptr[0] = ((auth_len > 0) ? 1 : 0) * 64 | + (((tag_len - 2) / 2) * 8) | + (L - 1); + bcopy(nonce, byte_ptr + 1, nonce_len); + append_int(data_len, &cbc_block, L+1); + cbc_block = AESNI_ENC(cbc_block, key, nr); + + if (auth_len != 0) { + /* + * We need to start by appending the length descriptor. + */ + uint32_t auth_amt; + size_t copy_amt; + const uint8_t *auth_ptr = auth_data; + + staging_block = _mm_setzero_si128(); + + /* + * The current OCF calling convention means that + * there can never be more than 4g of authentication + * data, so we don't handle the 0xffff case. + */ + KASSERT(auth_len < (1ULL << 32), + ("%s: auth_len (%zu) larger than 4GB", + __FUNCTION__, auth_len)); + + if (auth_len < ((1 << 16) - (1 << 8))) { + /* + * If the auth data length is less than + * 0xff00, we don't need to encode a length + * specifier, just the length of the auth + * data. + */ + be16enc(&staging_block, auth_len); + auth_amt = 2; + } else if (auth_len < (1ULL << 32)) { + /* + * Two bytes for the length prefix, and then + * four bytes for the length. This makes a total + * of 6 bytes to describe the auth data length. + */ + be16enc(&staging_block, 0xfffe); + be32enc((char*)&staging_block + 2, auth_len); + auth_amt = 6; + } else + panic("%s: auth len too large", __FUNCTION__); + + /* + * Need to copy abytes into blocks. The first block is + * already partially filled, by auth_amt, so we need + * to handle that. The last block needs to be zero padded. + */ + copy_amt = MIN(auth_len - auth_amt, + sizeof(staging_block) - auth_amt); + byte_ptr = (uint8_t*)&staging_block; + bcopy(auth_ptr, &byte_ptr[auth_amt], copy_amt); + auth_ptr += copy_amt; + + cbc_block = xor_and_encrypt(cbc_block, staging_block, key, nr); + + while (auth_ptr < auth_data + auth_len) { + copy_amt = MIN((auth_data + auth_len) - auth_ptr, + sizeof(staging_block)); + if (copy_amt < sizeof(staging_block)) + bzero(&staging_block, sizeof(staging_block)); + bcopy(auth_ptr, &staging_block, copy_amt); + cbc_block = xor_and_encrypt(cbc_block, staging_block, + key, nr); + auth_ptr += copy_amt; + } + } + return (cbc_block); +} + +/* + * Implement AES CCM+CBC-MAC encryption and authentication. + * + * A couple of notes: + * The specification allows for a different number of tag lengths; + * however, they're always truncated from 16 bytes, and the tag + * length isn't passed in. (This could be fixed by changing the + * code in aesni.c:aesni_cipher_crypt().) + * Similarly, although the nonce length is passed in, the + * OpenCrypto API that calls us doesn't have a way to set the nonce + * other than by having different crypto algorithm types. As a result, + * this is currently always called with nlen=12; this means that we + * also have a maximum message length of 16 megabytes. And similarly, + * since abytes is limited to a 32 bit value here, the AAD is + * limited to 4 gigabytes or less. + */ +void +AES_CCM_encrypt(const unsigned char *in, unsigned char *out, + const unsigned char *addt, const unsigned char *nonce, + unsigned char *tag, uint32_t nbytes, uint32_t abytes, int nlen, + const unsigned char *key, int nr) +{ + static const int tag_length = 16; /* 128 bits */ + int L; + int counter = 1; /* S0 has 0, S1 has 1 */ + size_t copy_amt, total = 0; + uint8_t *byte_ptr; + __m128i s0, rolling_mac, s_x, staging_block; + + if (nbytes == 0 && abytes == 0) + return; + + /* NIST 800-38c section A.1 says n is [7, 13]. */ + if (nlen < 7 || nlen > 13) + panic("%s: bad nonce length %d", __FUNCTION__, nlen); + + /* + * We need to know how many bytes to use to describe + * the length of the data. Normally, nlen should be + * 12, which leaves us 3 bytes to do that -- 16mbytes of + * data to encrypt. But it can be longer or shorter; + * this impacts the length of the message. + */ + L = sizeof(__m128i) - 1 - nlen; + + /* + * Now, this shouldn't happen, but let's make sure that + * the data length isn't too big. + */ + KASSERT(nbytes <= ((1 << (8 * L)) - 1), + ("%s: nbytes is %u, but length field is %d bytes", + __FUNCTION__, nbytes, L)); + + /* + * Clear out the blocks + */ + s0 = _mm_setzero_si128(); + + rolling_mac = cbc_mac_start(addt, abytes, nonce, nlen, + key, nr, nbytes, tag_length); + + /* s0 has flags, nonce, and then 0 */ + byte_ptr = (uint8_t*)&s0; + byte_ptr[0] = L - 1; /* but the flags byte only has L' */ + bcopy(nonce, &byte_ptr[1], nlen); + + /* + * Now to cycle through the rest of the data. + */ + bcopy(&s0, &s_x, sizeof(s0)); + + while (total < nbytes) { + /* + * Copy the plain-text data into staging_block. + * This may need to be zero-padded. + */ + copy_amt = MIN(nbytes - total, sizeof(staging_block)); + bcopy(in+total, &staging_block, copy_amt); + if (copy_amt < sizeof(staging_block)) { + byte_ptr = (uint8_t*)&staging_block; + bzero(&byte_ptr[copy_amt], + sizeof(staging_block) - copy_amt); + } + rolling_mac = xor_and_encrypt(rolling_mac, staging_block, + key, nr); + /* Put the counter into the s_x block */ + append_int(counter++, &s_x, L+1); + /* Encrypt that */ + __m128i X = AESNI_ENC(s_x, key, nr); + /* XOR the plain-text with the encrypted counter block */ + staging_block = _mm_xor_si128(staging_block, X); + /* And copy it out */ + bcopy(&staging_block, out+total, copy_amt); + total += copy_amt; + } + /* + * Allegedly done with it! Except for the tag. + */ + s0 = AESNI_ENC(s0, key, nr); + staging_block = _mm_xor_si128(s0, rolling_mac); + bcopy(&staging_block, tag, tag_length); + explicit_bzero(&s0, sizeof(s0)); + explicit_bzero(&staging_block, sizeof(staging_block)); + explicit_bzero(&s_x, sizeof(s_x)); + explicit_bzero(&rolling_mac, sizeof(rolling_mac)); +} + +/* + * Implement AES CCM+CBC-MAC decryption and authentication. + * Returns 0 on failure, 1 on success. + * + * The primary difference here is that each encrypted block + * needs to be hashed&encrypted after it is decrypted (since + * the CBC-MAC is based on the plain text). This means that + * we do the decryption twice -- first to verify the tag, + * and second to decrypt and copy it out. + * + * To avoid annoying code copying, we implement the main + * loop as a separate function. + * + * Call with out as NULL to not store the decrypted results; + * call with hashp as NULL to not run the authentication. + * Calling with neither as NULL does the decryption and + * authentication as a single pass (which is not allowed + * per the specification, really). + * + * If hashp is non-NULL, it points to the post-AAD computed + * checksum. + */ +static void +decrypt_loop(const unsigned char *in, unsigned char *out, size_t nbytes, + __m128i s0, size_t nonce_length, __m128i *macp, + const unsigned char *key, int nr) +{ + size_t total = 0; + __m128i s_x = s0, mac_block; + int counter = 1; + const size_t L = sizeof(__m128i) - 1 - nonce_length; + __m128i pad_block, staging_block; + + /* + * The starting mac (post AAD, if any). + */ + if (macp != NULL) + mac_block = *macp; + + while (total < nbytes) { + size_t copy_amt = MIN(nbytes - total, sizeof(staging_block)); + + if (copy_amt < sizeof(staging_block)) { + staging_block = _mm_setzero_si128(); + } + bcopy(in+total, &staging_block, copy_amt); + + /* + * staging_block has the current block of input data, + * zero-padded if necessary. This is used in computing + * both the decrypted data, and the authentication tag. + */ + append_int(counter++, &s_x, L+1); + /* + * The tag is computed based on the decrypted data. + */ + pad_block = AESNI_ENC(s_x, key, nr); + if (copy_amt < sizeof(staging_block)) { + /* + * Need to pad out pad_block with 0. + * (staging_block was set to 0's above.) + */ + uint8_t *end_of_buffer = (uint8_t*)&pad_block; + bzero(end_of_buffer + copy_amt, + sizeof(pad_block) - copy_amt); + } + staging_block = _mm_xor_si128(staging_block, pad_block); + + if (out) + bcopy(&staging_block, out+total, copy_amt); + + if (macp) + mac_block = xor_and_encrypt(mac_block, staging_block, + key, nr); + total += copy_amt; + } + + if (macp) + *macp = mac_block; + + explicit_bzero(&pad_block, sizeof(pad_block)); + explicit_bzero(&staging_block, sizeof(staging_block)); + explicit_bzero(&mac_block, sizeof(mac_block)); +} + +/* + * The exposed decryption routine. This is practically a + * copy of the encryption routine, except that the order + * in which the tag is created is changed. + * XXX combine the two functions at some point! + */ +int +AES_CCM_decrypt(const unsigned char *in, unsigned char *out, + const unsigned char *addt, const unsigned char *nonce, + const unsigned char *tag, uint32_t nbytes, uint32_t abytes, int nlen, + const unsigned char *key, int nr) +{ + static const int tag_length = 16; /* 128 bits */ + int L; + __m128i s0, rolling_mac, staging_block; + uint8_t *byte_ptr; + + if (nbytes == 0 && abytes == 0) + return (1); // No message means no decryption! + if (nlen < 0 || nlen > 15) + panic("%s: bad nonce length %d", __FUNCTION__, nlen); + + /* + * We need to know how many bytes to use to describe + * the length of the data. Normally, nlen should be + * 12, which leaves us 3 bytes to do that -- 16mbytes of + * data to encrypt. But it can be longer or shorter. + */ + L = sizeof(__m128i) - 1 - nlen; + + /* + * Now, this shouldn't happen, but let's make sure that + * the data length isn't too big. + */ + if (nbytes > ((1 << (8 * L)) - 1)) + panic("%s: nbytes is %u, but length field is %d bytes", + __FUNCTION__, nbytes, L); + /* + * Clear out the blocks + */ + s0 = _mm_setzero_si128(); + + rolling_mac = cbc_mac_start(addt, abytes, nonce, nlen, + key, nr, nbytes, tag_length); + /* s0 has flags, nonce, and then 0 */ + byte_ptr = (uint8_t*)&s0; + byte_ptr[0] = L-1; /* but the flags byte only has L' */ + bcopy(nonce, &byte_ptr[1], nlen); + + /* + * Now to cycle through the rest of the data. + */ + decrypt_loop(in, NULL, nbytes, s0, nlen, &rolling_mac, key, nr); + + /* + * Compare the tag. + */ + staging_block = _mm_xor_si128(AESNI_ENC(s0, key, nr), rolling_mac); + if (timingsafe_bcmp(&staging_block, tag, tag_length) != 0) { + return (0); + } + + /* + * Push out the decryption results this time. + */ + decrypt_loop(in, out, nbytes, s0, nlen, NULL, key, nr); + return (1); +} Modified: head/sys/crypto/aesni/aesni_wrap.c ============================================================================== --- head/sys/crypto/aesni/aesni_wrap.c Sat May 25 04:56:06 2019 (r348267) +++ head/sys/crypto/aesni/aesni_wrap.c Sat May 25 07:26:30 2019 (r348268) @@ -446,6 +446,7 @@ aesni_cipher_setup_common(struct aesni_session *ses, c switch (ses->algo) { case CRYPTO_AES_ICM: case CRYPTO_AES_NIST_GCM_16: + case CRYPTO_AES_CCM_16: decsched = 0; /* FALLTHROUGH */ case CRYPTO_AES_CBC: Modified: head/sys/modules/aesni/Makefile ============================================================================== --- head/sys/modules/aesni/Makefile Sat May 25 04:56:06 2019 (r348267) +++ head/sys/modules/aesni/Makefile Sat May 25 07:26:30 2019 (r348268) @@ -8,16 +8,20 @@ SRCS= aesni.c SRCS+= aeskeys_${MACHINE_CPUARCH}.S SRCS+= device_if.h bus_if.h opt_bus.h cryptodev_if.h -OBJS+= aesni_ghash.o aesni_wrap.o +OBJS+= aesni_ghash.o aesni_wrap.o aesni_ccm.o OBJS+= intel_sha1.o intel_sha256.o # Remove -nostdinc so we can get the intrinsics. aesni_ghash.o: aesni_ghash.c - # XXX - gcc won't understand -mpclmul ${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${PROF} \ -mmmx -msse -msse4 -maes -mpclmul ${.IMPSRC} ${CTFCONVERT_CMD} +aesni_ccm.o: aesni_ccm.c + ${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${PROF} \ + -mmmx -msse -msse4 -maes -mpclmul ${.IMPSRC} + ${CTFCONVERT_CMD} + aesni_wrap.o: aesni_wrap.c ${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${PROF} \ -mmmx -msse -msse4 -maes ${.IMPSRC} @@ -35,6 +39,7 @@ intel_sha256.o: intel_sha256.c aesni_ghash.o: aesni.h aesni_wrap.o: aesni.h +aesni_ccm.o: aesni.h intel_sha1.o: sha_sse.h immintrin.h shaintrin.h tmmintrin.h xmmintrin.h intel_sha256.o: sha_sse.h immintrin.h shaintrin.h tmmintrin.h xmmintrin.h From owner-svn-src-head@freebsd.org Sat May 25 11:22:50 2019 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 7D90215AA0C8; Sat, 25 May 2019 11:22:50 +0000 (UTC) (envelope-from rgrimes@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1DE866D18D; Sat, 25 May 2019 11:22:50 +0000 (UTC) (envelope-from rgrimes@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E34E53991; Sat, 25 May 2019 11:22:49 +0000 (UTC) (envelope-from rgrimes@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4PBMn24082696; Sat, 25 May 2019 11:22:49 GMT (envelope-from rgrimes@FreeBSD.org) Received: (from rgrimes@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4PBMnsX082695; Sat, 25 May 2019 11:22:49 GMT (envelope-from rgrimes@FreeBSD.org) Message-Id: <201905251122.x4PBMnsX082695@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rgrimes set sender to rgrimes@FreeBSD.org using -f From: "Rodney W. Grimes" Date: Sat, 25 May 2019 11:22:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348270 - head/libexec/bootpd X-SVN-Group: head X-SVN-Commit-Author: rgrimes X-SVN-Commit-Paths: head/libexec/bootpd X-SVN-Commit-Revision: 348270 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1DE866D18D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.948,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 May 2019 11:22:50 -0000 Author: rgrimes Date: Sat May 25 11:22:49 2019 New Revision: 348270 URL: https://svnweb.freebsd.org/changeset/base/348270 Log: Correctly align usage: output Modified: head/libexec/bootpd/bootpd.c Modified: head/libexec/bootpd/bootpd.c ============================================================================== --- head/libexec/bootpd/bootpd.c Sat May 25 10:17:03 2019 (r348269) +++ head/libexec/bootpd/bootpd.c Sat May 25 11:22:49 2019 (r348270) @@ -589,13 +589,13 @@ usage() fprintf(stderr, "usage: bootpd [-a] [-i | -s] [-c chdir-path] [-d level] [-h hostname]\n" " [-t timeout] [bootptab [dumpfile]]\n"); - fprintf(stderr, "\t -a\tdon't modify ARP table\n"); - fprintf(stderr, "\t -c n\tset current directory\n"); - fprintf(stderr, "\t -d n\tset debug level\n"); - fprintf(stderr, "\t -h n\tset the hostname to listen on\n"); - fprintf(stderr, "\t -i\tforce inetd mode (run as child of inetd)\n"); - fprintf(stderr, "\t -s\tforce standalone mode (run without inetd)\n"); - fprintf(stderr, "\t -t n\tset inetd exit timeout to n minutes\n"); + fprintf(stderr, " -a\tdon't modify ARP table\n"); + fprintf(stderr, " -c n\tset current directory\n"); + fprintf(stderr, " -d n\tset debug level\n"); + fprintf(stderr, " -h n\tset the hostname to listen on\n"); + fprintf(stderr, " -i\tforce inetd mode (run as child of inetd)\n"); + fprintf(stderr, " -s\tforce standalone mode (run without inetd)\n"); + fprintf(stderr, " -t n\tset inetd exit timeout to n minutes\n"); exit(1); } From owner-svn-src-head@freebsd.org Sat May 25 17:08:21 2019 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 D215015B1464 for ; Sat, 25 May 2019 17:08:20 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1.eu.mailhop.org (outbound1.eu.mailhop.org [52.28.251.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3626C8026B for ; Sat, 25 May 2019 17:08:20 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1558804096; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=ZeaIE5hYxrVZ1sjFY9PeXIgaewxiLVds2vAyHuWdwJQ+vLaqITs2fY3Kbqb2BG0V6jMhkbYJ333wM wW+dIhv8Cl/YfLO/AJYvZC+FG85+W9TIy3gm4MgIcrqW+Ih7ofSYkGxAsH2v+8CCC+FbqH/H0ujCZf amy1qTUhoAVLC1B+yyZXT3n3hsuSAzdKgb/TYvQD5jUiiXoRyiuK2HZXYvwMfCt5827EEYoWyodfm+ B9704mK4fMxT/ta9NRYK9VjvzbATNl2t42y7Bwk5+7ReGi74kUDFCCwKcB2fHv0gfKI2XSpNUfzZ4y 05PAZi5c4QdHcvQKvyh7D9E4EAQKboA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=hBZqK0+i/2OgiBhX/Bjyj30HBd1QjHsZ1tpBmUbDzAo=; b=qDyR4QqzSP4kJyOBqUh2ntW7wmszTk8CDhP4jGKLj5dFxchY95UQWi6JCC1OrKL+NERxsfLIaqHAO 7U4zqvviyLnLDEt5kFY11265XIE9Wgxg00lcAWzaRInz6FEPUYRgFP/eZVccfo3jT4au7bk38atnyo q976iJh1NdMhBPiZsw0iweuOtRYRMKSZbEfYiJdaC6MbAok1L4cjlQGiDIypXUQnnQviaI/wMfNShH OGh2j2Afj00Z6MmIhaydU+AHy3EPmEDaXxwuAlTKdIZaxvZj271XxVbMCQfQ0kPdiuyS+4xMBcmPwn LyTdv6/4NGuCpEkoKmWPXgT4pERlFxw== ARC-Authentication-Results: i=1; outbound3.eu.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=hBZqK0+i/2OgiBhX/Bjyj30HBd1QjHsZ1tpBmUbDzAo=; b=CwBqw6S0ENmsaIbe56GrVyShkA55g8C2uzC5PGyPWr241NXFc9EqmrEbPts0qezswQXaUCyuv0Hbw QuiP9WEBYx0Da6EG3GSivTALFmaZUuaxpthcngeyRxo5uqAKpqpMaX4CTEVnpbgyqCArv+2FxT7hN1 i4Qi1XLR7L6QXUkveGKNBHEU43pAV/5qd4WE7dk7INyVnQdkOpP/ewBnykqkcI162UAe4S4NbhJsw0 UFoTSJCp2Dacl4AOlqyrM0krSds6Ys6BkY3OQEpXEkbALN9CE2+GNjfhpH+rPlcyunH4ZXW/7qlNqv sKXGp9wyX8NeUXsh/vwH+ClRBeOxl2g== X-MHO-RoutePath: aGlwcGll X-MHO-User: ad6c9c1d-7f0f-11e9-91aa-b56e4e6b5865 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound3.eu.mailhop.org (Halon) with ESMTPSA id ad6c9c1d-7f0f-11e9-91aa-b56e4e6b5865; Sat, 25 May 2019 17:08:14 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x4PH8BQ4019978; Sat, 25 May 2019 11:08:11 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <27f68cdadcf92080f83d8d672b8cc82e9932606b.camel@freebsd.org> Subject: Re: svn commit: r348241 - head From: Ian Lepore To: cem@freebsd.org, Andrew Gallatin Cc: src-committers , svn-src-all , svn-src-head Date: Sat, 25 May 2019 11:08:11 -0600 In-Reply-To: References: <201905241545.x4OFjh4N057402@repo.freebsd.org> <857f545b-c766-b9e0-3f01-6b80420c540c@cs.duke.edu> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 3626C8026B X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.988,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 May 2019 17:08:21 -0000 On Fri, 2019-05-24 at 10:08 -0700, Conrad Meyer wrote: > On Fri, May 24, 2019 at 9:24 AM Andrew Gallatin > wrote: > > Dumb question about this: Will it update toolchains, or just use > > what > > can find? > > -DMAKE_JUST_KERNELS doesn't touch toolchains. For that, there is the > less memorable build step: > > export NCPU=$((1 * $(sysctl -n hw.ncpu) / 3)); make -sj${NCPU} > tinderbox JFLAG=-j${NCPU} UNIVERSE_TARGET=kernel-toolchain -DNO_CLEAN > Or "make toolchains". Or "make kernel-toolchains". But I think those two build the same thing these days. -- Ian From owner-svn-src-head@freebsd.org Sat May 25 17:37:44 2019 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 5610115B1DD8; Sat, 25 May 2019 17:37:44 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7F2538184B; Sat, 25 May 2019 17:37:33 +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 72EB37910; Sat, 25 May 2019 17:37:29 +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 x4PHbTRe080287; Sat, 25 May 2019 17:37:29 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4PHbTS3080286; Sat, 25 May 2019 17:37:29 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201905251737.x4PHbTS3080286@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 25 May 2019 17:37:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348274 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 348274 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7F2538184B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 May 2019 17:37:44 -0000 Author: trasz Date: Sat May 25 17:37:28 2019 New Revision: 348274 URL: https://svnweb.freebsd.org/changeset/base/348274 Log: We don't really need two entries to describe how to deal with optical drives in devfs.conf(5). MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/share/man/man5/devfs.conf.5 Modified: head/share/man/man5/devfs.conf.5 ============================================================================== --- head/share/man/man5/devfs.conf.5 Sat May 25 17:17:08 2019 (r348273) +++ head/share/man/man5/devfs.conf.5 Sat May 25 17:37:28 2019 (r348274) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 13, 2015 +.Dd May 25, 2019 .Dt DEVFS.CONF 5 .Os .Sh NAME @@ -98,18 +98,9 @@ as explained in .Sh EXAMPLES To create a .Pa /dev/cdrom -link that points to the first -.Xr SCSI 4 -CD-ROM, +link that points to the first CD-ROM, the following may be added to .Nm : -.Bd -literal -offset indent -link cd0 cdrom -.Ed -.Pp -Similarly, to link -.Pa /dev/cdrom -to the first SCSI CD-ROM device, the following action may be used: .Bd -literal -offset indent link cd0 cdrom .Ed From owner-svn-src-head@freebsd.org Sat May 25 21:57:03 2019 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 24C7C15B775E; Sat, 25 May 2019 21:57: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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AF42D8B025; Sat, 25 May 2019 21:57:02 +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 7BEB5A503; Sat, 25 May 2019 21:57:02 +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 x4PLv2YS018815; Sat, 25 May 2019 21:57:02 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4PLv2vN018814; Sat, 25 May 2019 21:57:02 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <201905252157.x4PLv2vN018814@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Sat, 25 May 2019 21:57:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348282 - head/usr.sbin/pw X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/usr.sbin/pw X-SVN-Commit-Revision: 348282 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AF42D8B025 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.95)[-0.952,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 May 2019 21:57:03 -0000 Author: lwhsu Date: Sat May 25 21:57:01 2019 New Revision: 348282 URL: https://svnweb.freebsd.org/changeset/base/348282 Log: Remove an uneeded indentation introduced in r286196 to silence gcc warnging MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/pw/pw_user.c Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Sat May 25 21:40:27 2019 (r348281) +++ head/usr.sbin/pw/pw_user.c Sat May 25 21:57:01 2019 (r348282) @@ -589,7 +589,7 @@ print_user(struct passwd * pwd, bool pretty, bool v7) } if (pwd->pw_expire > (time_t)0 && (tptr = localtime(&pwd->pw_expire)) != NULL) strftime(acexpire, sizeof acexpire, "%c", tptr); - if (pwd->pw_change > (time_t)0 && (tptr = localtime(&pwd->pw_change)) != NULL) + if (pwd->pw_change > (time_t)0 && (tptr = localtime(&pwd->pw_change)) != NULL) strftime(pwexpire, sizeof pwexpire, "%c", tptr); printf("Login Name: %-15s #%-12ju Group: %-15s #%ju\n" " Full Name: %s\n" From owner-svn-src-head@freebsd.org Sat May 25 23:36:22 2019 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 CF18215B98A0; Sat, 25 May 2019 23:36:21 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6F7CB8F46F; Sat, 25 May 2019 23:36:21 +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 437B2B602; Sat, 25 May 2019 23:36:21 +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 x4PNaLYl074612; Sat, 25 May 2019 23:36:21 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4PNaLbf074611; Sat, 25 May 2019 23:36:21 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201905252336.x4PNaLbf074611@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 25 May 2019 23:36:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348283 - head/sys/i386/i386 X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/i386/i386 X-SVN-Commit-Revision: 348283 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6F7CB8F46F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 May 2019 23:36:22 -0000 Author: markj Date: Sat May 25 23:36:20 2019 New Revision: 348283 URL: https://svnweb.freebsd.org/changeset/base/348283 Log: Remove pmap_pid_dump() from the i386 pmap. It has not been compilable in a long time and doesn't seem very useful. Suggested by: kib MFC after: 1 week Modified: head/sys/i386/i386/pmap.c Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Sat May 25 21:57:01 2019 (r348282) +++ head/sys/i386/i386/pmap.c Sat May 25 23:36:20 2019 (r348283) @@ -5901,67 +5901,6 @@ __CONCAT(PMTYPE, trm_free)(void *addr, size_t size) vmem_free(pmap_trm_arena, (uintptr_t)addr, roundup2(size, 4)); } -#if defined(PMAP_DEBUG) -pmap_pid_dump(int pid) -{ - pmap_t pmap; - struct proc *p; - int npte = 0; - int index; - - sx_slock(&allproc_lock); - FOREACH_PROC_IN_SYSTEM(p) { - if (p->p_pid != pid) - continue; - - if (p->p_vmspace) { - int i,j; - index = 0; - pmap = vmspace_pmap(p->p_vmspace); - for (i = 0; i < NPDEPTD; i++) { - pd_entry_t *pde; - pt_entry_t *pte; - vm_offset_t base = i << PDRSHIFT; - - pde = &pmap->pm_pdir[i]; - if (pde && pmap_pde_v(pde)) { - for (j = 0; j < NPTEPG; j++) { - vm_offset_t va = base + (j << PAGE_SHIFT); - if (va >= (vm_offset_t) VM_MIN_KERNEL_ADDRESS) { - if (index) { - index = 0; - printf("\n"); - } - sx_sunlock(&allproc_lock); - return (npte); - } - pte = pmap_pte(pmap, va); - if (pte && pmap_pte_v(pte)) { - pt_entry_t pa; - vm_page_t m; - pa = *pte; - m = PHYS_TO_VM_PAGE(pa & PG_FRAME); - printf("va: 0x%x, pt: 0x%x, h: %d, w: %d, f: 0x%x", - va, pa, m->hold_count, m->wire_count, m->flags); - npte++; - index++; - if (index >= 2) { - index = 0; - printf("\n"); - } else { - printf(" "); - } - } - } - } - } - } - } - sx_sunlock(&allproc_lock); - return (npte); -} -#endif - static void __CONCAT(PMTYPE, ksetrw)(vm_offset_t va) { From owner-svn-src-head@freebsd.org Sat May 25 23:58:10 2019 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 D6A6B15B9F72; Sat, 25 May 2019 23:58:10 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7C5C78FCD7; Sat, 25 May 2019 23:58:10 +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 4D682B95A; Sat, 25 May 2019 23:58:10 +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 x4PNwAuF085046; Sat, 25 May 2019 23:58:10 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4PNwANq085045; Sat, 25 May 2019 23:58:10 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <201905252358.x4PNwANq085045@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Sat, 25 May 2019 23:58:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348284 - head/sys/netpfil/pf X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/sys/netpfil/pf X-SVN-Commit-Revision: 348284 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7C5C78FCD7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 May 2019 23:58:11 -0000 Author: lwhsu Date: Sat May 25 23:58:09 2019 New Revision: 348284 URL: https://svnweb.freebsd.org/changeset/base/348284 Log: Remove an uneeded indentation introduced in r223637 to silence gcc warnging MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/sys/netpfil/pf/pf.c Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Sat May 25 23:36:20 2019 (r348283) +++ head/sys/netpfil/pf/pf.c Sat May 25 23:58:09 2019 (r348284) @@ -5260,7 +5260,7 @@ pf_test_state_other(struct pf_state **state, int direc nk->addr[pd->didx].v4.s_addr, 0); - break; + break; #endif /* INET */ #ifdef INET6 case AF_INET6: