From owner-svn-src-head@freebsd.org Sun Mar 12 00:37:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED1C3CF9561; Sun, 12 Mar 2017 00:37:46 +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 mx1.freebsd.org (Postfix) with ESMTPS id B198014A9; Sun, 12 Mar 2017 00:37:46 +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 v2C0bjWU045398; Sun, 12 Mar 2017 00:37:45 GMT (envelope-from rgrimes@FreeBSD.org) Received: (from rgrimes@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2C0bjdq045397; Sun, 12 Mar 2017 00:37:45 GMT (envelope-from rgrimes@FreeBSD.org) Message-Id: <201703120037.v2C0bjdq045397@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rgrimes set sender to rgrimes@FreeBSD.org using -f From: "Rodney W. Grimes" Date: Sun, 12 Mar 2017 00:37:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315091 - head/share/termcap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 00:37:47 -0000 Author: rgrimes Date: Sun Mar 12 00:37:45 2017 New Revision: 315091 URL: https://svnweb.freebsd.org/changeset/base/315091 Log: Revert r314833 until the problem with INSTALL_RSYMLINKS can be found as it appears to break arm release builds. PR: 217705 Reported by: cyclaero@gmail.com Approved by: grehan (mentor) implict as reverting Modified: head/share/termcap/Makefile Modified: head/share/termcap/Makefile ============================================================================== --- head/share/termcap/Makefile Sat Mar 11 22:34:02 2017 (r315090) +++ head/share/termcap/Makefile Sun Mar 12 00:37:45 2017 (r315091) @@ -24,6 +24,6 @@ termcap.db: termcap cap_mkdb ${CAP_MKDB_ENDIAN} -f ${.TARGET:R} ${.ALLSRC} etc-termcap: - ${INSTALL_RSYMLINK} ${BINDIR}/misc/termcap ${DESTDIR}/etc/termcap + ${INSTALL_SYMLINK} ${BINDIR}/misc/termcap ${DESTDIR}/etc/termcap .include From owner-svn-src-head@freebsd.org Sun Mar 12 00:52:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5AA21CF9B08; Sun, 12 Mar 2017 00:52:18 +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 mx1.freebsd.org (Postfix) with ESMTPS id 329D21F6D; Sun, 12 Mar 2017 00:52:18 +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 v2C0qHC3053607; Sun, 12 Mar 2017 00:52:17 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2C0qH44053604; Sun, 12 Mar 2017 00:52:17 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201703120052.v2C0qH44053604@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sun, 12 Mar 2017 00:52:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315093 - in head/sys: amd64/conf conf i386/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 00:52:18 -0000 Author: manu Date: Sun Mar 12 00:52:16 2017 New Revision: 315093 URL: https://svnweb.freebsd.org/changeset/base/315093 Log: Remove i915drm and radeondrm from NOTES and conf. This unbreak LINT kernel. Reported by: lwhsu Modified: head/sys/amd64/conf/NOTES head/sys/conf/files head/sys/i386/conf/NOTES Modified: head/sys/amd64/conf/NOTES ============================================================================== --- head/sys/amd64/conf/NOTES Sun Mar 12 00:46:49 2017 (r315092) +++ head/sys/amd64/conf/NOTES Sun Mar 12 00:52:16 2017 (r315093) @@ -288,11 +288,9 @@ device cpufreq # Direct Rendering modules for 3D acceleration. device drm # DRM core module required by DRM drivers -device i915drm # Intel i830 through i915 device mach64drm # ATI Rage Pro, Rage Mobility P/M, Rage XL device mgadrm # AGP Matrox G200, G400, G450, G550 device r128drm # ATI Rage 128 -device radeondrm # ATI Radeon device savagedrm # S3 Savage3D, Savage4 device sisdrm # SiS 300/305, 540, 630 device tdfxdrm # 3dfx Voodoo 3/4/5 and Banshee Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sun Mar 12 00:46:49 2017 (r315092) +++ head/sys/conf/files Sun Mar 12 00:52:16 2017 (r315093) @@ -1458,11 +1458,6 @@ dev/drm/drm_scatter.c optional drm dev/drm/drm_sman.c optional drm dev/drm/drm_sysctl.c optional drm dev/drm/drm_vm.c optional drm -dev/drm/i915_dma.c optional i915drm -dev/drm/i915_drv.c optional i915drm -dev/drm/i915_irq.c optional i915drm -dev/drm/i915_mem.c optional i915drm -dev/drm/i915_suspend.c optional i915drm dev/drm/mach64_dma.c optional mach64drm dev/drm/mach64_drv.c optional mach64drm dev/drm/mach64_irq.c optional mach64drm @@ -1477,17 +1472,6 @@ dev/drm/r128_cce.c optional r128drm \ dev/drm/r128_drv.c optional r128drm dev/drm/r128_irq.c optional r128drm dev/drm/r128_state.c optional r128drm -dev/drm/r300_cmdbuf.c optional radeondrm -dev/drm/r600_blit.c optional radeondrm -dev/drm/r600_cp.c optional radeondrm \ - compile-with "${NORMAL_C} ${NO_WCONSTANT_CONVERSION}" -dev/drm/radeon_cp.c optional radeondrm \ - compile-with "${NORMAL_C} ${NO_WCONSTANT_CONVERSION}" -dev/drm/radeon_cs.c optional radeondrm -dev/drm/radeon_drv.c optional radeondrm -dev/drm/radeon_irq.c optional radeondrm -dev/drm/radeon_mem.c optional radeondrm -dev/drm/radeon_state.c optional radeondrm dev/drm/savage_bci.c optional savagedrm dev/drm/savage_drv.c optional savagedrm dev/drm/savage_state.c optional savagedrm Modified: head/sys/i386/conf/NOTES ============================================================================== --- head/sys/i386/conf/NOTES Sun Mar 12 00:46:49 2017 (r315092) +++ head/sys/i386/conf/NOTES Sun Mar 12 00:52:16 2017 (r315093) @@ -508,11 +508,9 @@ device cpufreq # Direct Rendering modules for 3D acceleration. device drm # DRM core module required by DRM drivers -device i915drm # Intel i830 through i915 device mach64drm # ATI Rage Pro, Rage Mobility P/M, Rage XL device mgadrm # AGP Matrox G200, G400, G450, G550 device r128drm # ATI Rage 128 -device radeondrm # ATI Radeon device savagedrm # S3 Savage3D, Savage4 device sisdrm # SiS 300/305, 540, 630 device tdfxdrm # 3dfx Voodoo 3/4/5 and Banshee From owner-svn-src-head@freebsd.org Sun Mar 12 01:55:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24663D06A0F; Sun, 12 Mar 2017 01:55:39 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-wr0-f180.google.com (mail-wr0-f180.google.com [209.85.128.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B99ED14C8; Sun, 12 Mar 2017 01:55:38 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-wr0-f180.google.com with SMTP id l37so84824730wrc.1; Sat, 11 Mar 2017 17:55:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=QsQn46hoXATFR5tZ3TsWMamSuz6ZD5C6ZqZKOBZYQYE=; b=DxahLPlRZh6ZwFNU1Xe+Y+QXueDihaguoyCaGyGhkhKglMBvWr6SBdnoVIPXg5cdj3 sm9kUKmUVoQ8boz3MU4pzoPyQc3vNzoaN56ZOTe/WNEy4XYMFQskQFOSc15UYI1y+uIp iSA3lZKzGzmQk+Uaba7URMWckOWtvJhmMfxrJh3QHsNwpJ85+eMc5J5E1DHqYsyQo6ov DrZJxZL1r4CsubXsx86Ly/k24GreKg6LK34Ni43agsmlh5Z/Wn5iary2QwFIbFdJT+YK 4buLRERXo/TA0nwQ34fq/ZWha/kRUn8NLDie9PtEbBh5ijbvkRm0W4nfrsxu9R6tC51B kW1g== X-Gm-Message-State: AMke39nKzfEQMVo6K8PAGy4K7GNC7ltyhG0CNHz8IA7Tzi8nQ5HLcp3PrwnDHZfjR1xqoQ== X-Received: by 10.223.179.216 with SMTP id x24mr21995186wrd.171.1489283422813; Sat, 11 Mar 2017 17:50:22 -0800 (PST) Received: from mail-wr0-f180.google.com (mail-wr0-f180.google.com. [209.85.128.180]) by smtp.gmail.com with ESMTPSA id z70sm19341235wrc.2.2017.03.11.17.50.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 Mar 2017 17:50:22 -0800 (PST) Received: by mail-wr0-f180.google.com with SMTP id u48so84826987wrc.0; Sat, 11 Mar 2017 17:50:22 -0800 (PST) X-Received: by 10.223.133.6 with SMTP id 6mr22356358wrh.57.1489283422477; Sat, 11 Mar 2017 17:50:22 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.80.169.4 with HTTP; Sat, 11 Mar 2017 17:50:21 -0800 (PST) In-Reply-To: <201703110436.v2B4aF6Z037011@repo.freebsd.org> References: <201703110436.v2B4aF6Z037011@repo.freebsd.org> From: Conrad Meyer Date: Sat, 11 Mar 2017 17:50:21 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r315049 - head/usr.bin/vmstat To: Marcelo Araujo Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 01:55:39 -0000 Hi Marcelo, Should we add WARNS=2 in vmstat's Makefile so that developers notice when they break warnings at that level? Thanks, Conrad On Fri, Mar 10, 2017 at 8:36 PM, Marcelo Araujo wrote: > Author: araujo > Date: Sat Mar 11 04:36:15 2017 > New Revision: 315049 > URL: https://svnweb.freebsd.org/changeset/base/315049 > > Log: > Bring back the cast removed in my previous commit to allow us build vmstat > with WARNS 2. This cast was first introduced at r87690. > > Reported by: bde, pfg and ngie > MFC after: 3 weeks. > > Modified: > head/usr.bin/vmstat/vmstat.c > > Modified: head/usr.bin/vmstat/vmstat.c > ============================================================================== > --- head/usr.bin/vmstat/vmstat.c Sat Mar 11 04:03:13 2017 (r315048) > +++ head/usr.bin/vmstat/vmstat.c Sat Mar 11 04:36:15 2017 (r315049) > @@ -288,13 +288,13 @@ retry_nlist: > namelist[X_SUM].n_name = "_cnt"; > goto retry_nlist; > } > - for (c = 0; c < nitems(namelist); c++) > + for (c = 0; c < (int)(nitems(namelist)); c++) > if (namelist[c].n_type == 0) > bufsize += strlen(namelist[c].n_name) + 1; > bufsize += len + 1; > buf = bp = alloca(bufsize); > > - for (c = 0; c < nitems(namelist); c++) > + for (c = 0; c < (int)(nitems(namelist)); c++) > if (namelist[c].n_type == 0) { > xo_error(" %s", > namelist[c].n_name); > From owner-svn-src-head@freebsd.org Sun Mar 12 02:05:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB36CD06CB3; Sun, 12 Mar 2017 02:05:26 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x243.google.com (mail-pg0-x243.google.com [IPv6:2607:f8b0:400e:c05::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9604A19D3; Sun, 12 Mar 2017 02:05:26 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x243.google.com with SMTP id 77so14379705pgc.0; Sat, 11 Mar 2017 18:05:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=Zq66uekQD968FcDrYHijXl0zYs5Sc7kb60OrkPt2lxI=; b=XDaBpWigV7P5bvuqwZlt3zaxanxptLI5s9Jr38xTR+uzzJ0Z4ddsT0YIW2IG5UK3BX q+3n7DgvTAH1zvRbPMm8C1dOwnminRmYCxNU101ISPTFbnhwCaayU3xelva/lhRNq1xC sBlZwWa3s7Mh9XH/Cv/C+KQlugfwFT2yyiN3XxoN04yjroSMzvqv7pgTVMqdrJpMrHnY HpdDHzmI3nknYVP0mKh1nnxeovcdP/Y11kcLngroh7spYTRe4udlol2s1C/e4aZAdYDv aex2Gv1Ad3wnmNNMGQQkFq3rv8MbNCGWE1+qjYfvcG60EZPfPmiZR6yGYl8JimIPdCUa 8jzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=Zq66uekQD968FcDrYHijXl0zYs5Sc7kb60OrkPt2lxI=; b=MPwwOlCwBwwM+wcaQFaW+NXJcIUnxXJdmeMP4Voepxb+M8Kq1tZB4tCbmqpU/fG2rp 6NVXvSMVTfp5yoa4F8bS/GqbHy5+/4LDtCfOUKUAHBQEYj81cC/NFAM4Jz/gtWgi4Z8X +iBkJokYbtlXS47nMXCRU7cWF97rDRUcnMzVIzmRyRs8fJD62rjUKxeXxS0sOSgHWG68 KVx/pp1exYyc/38ZlRd5YdEKI/2s+UpZnkwev0KoHhwuwBl0vvvtNp2VHM+oir7F1b29 9P460IQMc+/8tTMJygEfREaq0QTLUbwDtWarAzwwTrnW/KKZzTPuQffvpnV26K17XMrK SCMA== X-Gm-Message-State: AMke39n8N4Tl+PtPDLIHwl23H7/SW1DGQvEMr4utyDcOBYpZLu+v/iyq+oay+W6QG4UxCw== X-Received: by 10.84.141.1 with SMTP id 1mr37544683plu.178.1489284325882; Sat, 11 Mar 2017 18:05:25 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id b190sm26109815pfa.110.2017.03.11.18.05.24 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 11 Mar 2017 18:05:25 -0800 (PST) Subject: Re: svn commit: r315049 - head/usr.bin/vmstat Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_FC515EDB-8367-485B-BD6B-2CAD794F7857"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201703110436.v2B4aF6Z037011@repo.freebsd.org> Date: Sat, 11 Mar 2017 18:05:23 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201703110436.v2B4aF6Z037011@repo.freebsd.org> To: Marcelo Araujo X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 02:05:26 -0000 --Apple-Mail=_FC515EDB-8367-485B-BD6B-2CAD794F7857 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Mar 10, 2017, at 20:36, Marcelo Araujo wrote: >=20 > Author: araujo > Date: Sat Mar 11 04:36:15 2017 > New Revision: 315049 > URL: https://svnweb.freebsd.org/changeset/base/315049 >=20 > Log: > Bring back the cast removed in my previous commit to allow us build = vmstat > with WARNS 2. This cast was first introduced at r87690. >=20 > Reported by: bde, pfg and ngie > MFC after: 3 weeks. >=20 > Modified: > head/usr.bin/vmstat/vmstat.c >=20 > Modified: head/usr.bin/vmstat/vmstat.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/usr.bin/vmstat/vmstat.c Sat Mar 11 04:03:13 2017 = (r315048) > +++ head/usr.bin/vmstat/vmstat.c Sat Mar 11 04:36:15 2017 = (r315049) > @@ -288,13 +288,13 @@ retry_nlist: > namelist[X_SUM].n_name =3D "_cnt"; > goto retry_nlist; > } > - for (c =3D 0; c < nitems(namelist); c++) > + for (c =3D 0; c < (int)(nitems(namelist)); c++) Before bde@ notes this, it=E2=80=99s stylistically incorrect (additional = unnecessary parentheses around the nitems call. Thanks, -Ngie --Apple-Mail=_FC515EDB-8367-485B-BD6B-2CAD794F7857 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYxKzkAAoJEPWDqSZpMIYVIsIP/izalFLh6BHf/ZjsPiWc7F2e cGvkvLhQiWt/Ojc8FIWNml2JaCOTiDiCjmW1ii+JJA5pHh7dQv9z/+uGMZPRRWyv A67HQ7qDDPyRLNVhIEGmbHsp6bVBq7MTBducdOHTkoTTHLzyJkASqX4NtUhrrLbE md5awRhWLNugP6xWQdIP1T53FyedHc9rhuYoWlLtkuiGZ4ARe+BoTpIIBPnP4n1M 2jMJrAgWxdiXhpFPkkUbHRdTpXXW7dj9owm2uICUx29FbU+JhbOHpK4RU38rYRB4 imEQzajQkkAra7KenCGvyBLkosVsfS0Y9oSJ0gnZa3dtfBpaiUifJYryVXyXuy2/ UiLw3ZzZnkiABi8d6SMHiOl+0etNRP9ROEPc5af4RApsNLqrau4KO1hPR2FO7BDv MwUE6AF+wBe5Nr34Ic8c4rOe48i68GKi10Y5Y7RzB/KvZhgU+tMpust1K5w/J3R1 5tGiXTjF54PO7Lw8EGV3gocdrd+7W9ZM3rhD3NwJ23DKj1MGVQFTi0jJKclaZa99 g/c3DpOP3AiAHLxKXw7kbYMc5X9DQmAZcol5WnzWQv19rRklUKNbpLJeVw0ogSVl nPnA8z1aJyrHtInuzDZ/VqOWmWolCDmE1oAxRuHHsDMLSul+EtPpogunTiiCgkxc JrI4w+3ceQf9H+83n5LV =59ce -----END PGP SIGNATURE----- --Apple-Mail=_FC515EDB-8367-485B-BD6B-2CAD794F7857-- From owner-svn-src-head@freebsd.org Sun Mar 12 02:06:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 561BDD06D5F; Sun, 12 Mar 2017 02:06:46 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x242.google.com (mail-pg0-x242.google.com [IPv6:2607:f8b0:400e:c05::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 234CD1B6F; Sun, 12 Mar 2017 02:06:46 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x242.google.com with SMTP id 25so14413563pgy.3; Sat, 11 Mar 2017 18:06:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=tQ9jznwfkrvgsvvwmSnAED57+GMCIClmrleT4SuLgRI=; b=KMKClxVVl2KajUiCEtWZ6HiwZIPunQbQg8m7l/Md8obVkA6Am+yMV1lch7tB03kLiE zXOiXrF9HJW+CKVf7W0ZF6QgbUvP6BnH7Ulg7aVChKmrC55mjPbJKpkziKiDfYGSrns5 u49++7yed3ZqwrDvRMNY7Kt9vUIRipuvQkPJGT+AMiodJ6T7Ghgr9L1swxCNg4hBKD0a M0WRw+JccfOVf8cV1G+tDjEqx3/Qvs8n2offvxN9rb0o+/do+SgM7sGnnu7wRfvU0cIc gLdZYL2Wf25mSX8vcXQwXOSUyj0s+zbnYHF85nSiA2rBQVMsuxZB9PfHgukBMXwwyCzb 8cyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=tQ9jznwfkrvgsvvwmSnAED57+GMCIClmrleT4SuLgRI=; b=QW4LypLi9Uigpw4YBuMcsuEyMpTcrNdwQ5vAczsUOLhbFx4oC50D+7Ev40+9OR/R/2 vJvT1RiqHQt9knqNigJGi50SReLVrkmRbi//akJ1LG3v09EuPdOjSAsZkjm7yWfNfGyN RDSKiH3qHfod/Al4BfFhL+PULWts5rWwHgw6YyWbUPAf5xEu6oGY4SjMuQ+uEOQCKEHX J6DIH49Le9b5i8Buq25WeGI2KzirmIxWcM0XXp3PiKMQkfJHvzZIgUdFplueYkTln6mo m9ez8qPo73XQcPhyX2MeYIERJEb5kmh2FyvEBemFPR1zvZWcqHwa7jwzoPPRKRXmEJcB 5sIA== X-Gm-Message-State: AMke39nTBe3XdR21Eb1+P6e5DJp1osh9WPFyWZ8u4BTln78ZxptV/Ti3EHwjCta0BSfosg== X-Received: by 10.99.104.199 with SMTP id d190mr28904670pgc.59.1489284405487; Sat, 11 Mar 2017 18:06:45 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id b7sm26181557pfg.53.2017.03.11.18.06.44 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 11 Mar 2017 18:06:44 -0800 (PST) Subject: Re: svn commit: r315045 - in head/sys: dev/drm modules/drm modules/drm/i915 modules/drm/radeon Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_3175E089-11FE-4ED1-9FBE-0C8FFD224996"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201703110301.v2B31I2Q096339@repo.freebsd.org> Date: Sat, 11 Mar 2017 18:06:44 -0800 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201703110301.v2B31I2Q096339@repo.freebsd.org> To: Emmanuel Vadot X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 02:06:46 -0000 --Apple-Mail=_3175E089-11FE-4ED1-9FBE-0C8FFD224996 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii > On Mar 10, 2017, at 19:01, Emmanuel Vadot wrote: > > Author: manu > Date: Sat Mar 11 03:01:18 2017 > New Revision: 315045 > URL: https://svnweb.freebsd.org/changeset/base/315045 > > Log: > drm(old): Remove i915 and radeon drivers > > They cannot be used anymore with the userland bits we provide. > Furthermore, their KMS versions support the same hardware. > > Submitted by: dumbbell > Reviewed by: emaste, manu > Sponsored by: AsiaBSDCon > Differential Revision: https://reviews.freebsd.org/D5614 Relnotes: yes Please add an entry to UPDATING if possible too. Thank you :)!! -Ngie --Apple-Mail=_3175E089-11FE-4ED1-9FBE-0C8FFD224996 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYxK00AAoJEPWDqSZpMIYVDbsP/RmsPGvzB97GngPiq0gFrtT0 7i3dQPddOpCjkaoTnIE19Pc+03vvQtTHSTEUVWUuYRqhoyX7+boSM3P2yJskcqaq UkGRtkWNtomPzxvti8v8vNCtvnMuUmdvzTvPRIOhMsoqWFFUkD4ZpUutJ6kOShxy Cp/PpOltaR+fWsKWg8jyP7fhrQkOu69g/oJVUtvop0hcFYOheu0o7ur/a5TsFI59 nqJFQ/hdvjogJB25fw66dGgkfJxvzl6XNtVeRKcuuw2JtUEsLhHviC+zyJVO4gYt Nv+0vf9I5fhrQhMqDy7EGjPFRq+TRrnhE9Ui4jbBGZ+X6OKxZtbSoBgNln7gmAhw fWl8EHocULQJlRGA+4ZyHmR0ymAL2+CAbsKkmcX1n4GO5EaTK72SCob10uj/ETRG +0qfSqZPbK6X8txfoZxte/E2hxdFBvosA1wEtlptQPezV7NsJUzMS21pIB8ij2nL VIgTizoiUg3hDtR5gHbjDLWqP/tXzIKtu43bLfG91hnp1QvsHAwoZjKLbvQppbG+ ywvofLAbSkxcFG86/YaiW0YgzYMijjMur7bg5l9V+L2ziiaQuSBvHvVCZIqiLqgE urN4mxcV8XawrSDbmYf2EkTIvMtVSuvJeuCQuuLCH9bZ8hFBmn2l0jnNB9/rcTuI Q5Fo/yhbCoovsVL59P/J =XxXj -----END PGP SIGNATURE----- --Apple-Mail=_3175E089-11FE-4ED1-9FBE-0C8FFD224996-- From owner-svn-src-head@freebsd.org Sun Mar 12 02:21:17 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E112ED071F3; Sun, 12 Mar 2017 02:21: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 mx1.freebsd.org (Postfix) with ESMTPS id B0C5F14F2; Sun, 12 Mar 2017 02:21: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 v2C2LGth088909; Sun, 12 Mar 2017 02:21:16 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2C2LGp1088908; Sun, 12 Mar 2017 02:21:16 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703120221.v2C2LGp1088908@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 12 Mar 2017 02:21:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315094 - head/sbin/setkey X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 02:21:18 -0000 Author: ngie Date: Sun Mar 12 02:21:16 2017 New Revision: 315094 URL: https://svnweb.freebsd.org/changeset/base/315094 Log: Delete duplicate -I /lib/libipsec added in r171135 It's already handled earlier on in the Makefile, per the change made in r80029. MFC after: 1 month Sponsored by: Dell EMC Isilon Modified: head/sbin/setkey/Makefile Modified: head/sbin/setkey/Makefile ============================================================================== --- head/sbin/setkey/Makefile Sun Mar 12 00:52:16 2017 (r315093) +++ head/sbin/setkey/Makefile Sun Mar 12 02:21:16 2017 (r315094) @@ -46,7 +46,7 @@ CLEANFILES= y.tab.c y.tab.h key_test.o k # ipsec_strerror.c is for avoiding shlib reference to non-exported function. .PATH: ${SRCTOP}/lib/libipsec ${SRCTOP}/sys/netipsec SRCS+= pfkey.c pfkey_dump.c key_debug.c ipsec_strerror.c -CFLAGS+= -I${SRCTOP}/lib/libipsec -I${SRCTOP}/sys/netipsec +CFLAGS+= -I${SRCTOP}/sys/netipsec SRCS+= y.tab.h y.tab.h: parse.y From owner-svn-src-head@freebsd.org Sun Mar 12 02:44:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C69ACD07D22; Sun, 12 Mar 2017 02:44:59 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id 90A371561; Sun, 12 Mar 2017 02:44:58 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 5A209102F2F; Sun, 12 Mar 2017 13:44:51 +1100 (AEDT) Date: Sun, 12 Mar 2017 13:44:50 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Andriy Gapon cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r315068 - head/sys/modules/qlxgbe In-Reply-To: <201703111516.v2BFGtkn006959@repo.freebsd.org> Message-ID: <20170312124945.C4483@besplex.bde.org> References: <201703111516.v2BFGtkn006959@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=AYLBJzfG c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=TpLjFTHyFfqqnH7asFwA:9 a=CjuIK1q_8ugA:10 a=HzLR6qCuIIUA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 02:44:59 -0000 On Sat, 11 Mar 2017, Andriy Gapon wrote: > Log: > revert r314862, use of GCC_MS_EXTENSIONS in qlxgbe > > Commit r278913 made explicit use of GCC_MS_EXTENSIONS unnecessary. > > Requested by: glebius Does this module actually use ms extensions? This seems unlikely, since only gcc supports them. My kernels compile correctly with the correct CFLAGS (gcc -std=gnu99 -fno-ms-extensions). Bruce From owner-svn-src-head@freebsd.org Sun Mar 12 02:57:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 789ADD07082 for ; Sun, 12 Mar 2017 02:57:43 +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 161C01B98 for ; Sun, 12 Mar 2017 02:57:42 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: a9973b53-06cf-11e7-95b5-6dfd7dbb0ee5 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.eu.mailhop.org (Halon) with ESMTPSA id a9973b53-06cf-11e7-95b5-6dfd7dbb0ee5; Sun, 12 Mar 2017 02:57:44 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v2C2vXB9002472; Sat, 11 Mar 2017 19:57:33 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1489287453.40576.75.camel@freebsd.org> Subject: Re: svn commit: r315091 - head/share/termcap From: Ian Lepore To: "Rodney W. Grimes" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sat, 11 Mar 2017 19:57:33 -0700 In-Reply-To: <201703120037.v2C0bjdq045397@repo.freebsd.org> References: <201703120037.v2C0bjdq045397@repo.freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 02:57:43 -0000 On Sun, 2017-03-12 at 00:37 +0000, Rodney W. Grimes wrote: > Author: rgrimes > Date: Sun Mar 12 00:37:45 2017 > New Revision: 315091 > URL: https://svnweb.freebsd.org/changeset/base/315091 > > Log: >   Revert r314833 until the problem with INSTALL_RSYMLINKS can be > found >   as it appears to break arm release builds. >    >   PR: 217705 >   Reported by: cyclaero@gmail.com >   Approved by: grehan (mentor) implict as reverting > > Modified: >   head/share/termcap/Makefile > > Modified: head/share/termcap/Makefile > ===================================================================== > ========= > --- head/share/termcap/Makefile Sat Mar 11 22:34:02 2017 > (r315090) > +++ head/share/termcap/Makefile Sun Mar 12 00:37:45 2017 > (r315091) > @@ -24,6 +24,6 @@ termcap.db: termcap >   cap_mkdb ${CAP_MKDB_ENDIAN} -f ${.TARGET:R} ${.ALLSRC} >   >  etc-termcap: > - ${INSTALL_RSYMLINK} ${BINDIR}/misc/termcap > ${DESTDIR}/etc/termcap > + ${INSTALL_SYMLINK} ${BINDIR}/misc/termcap > ${DESTDIR}/etc/termcap >   >  .include > In an arm build sandbox I ran "make distribution DESTDIR=/tmp/ian" and this is what happened with termcap: --- etc-termcap --- install -l rs /usr/share/misc/termcap /tmp/ian/etc/termcap ... revolution > file /tmp/ian/etc/termcap /tmp/ian/etc/termcap: symbolic link to ../../../usr/share/misc/termcap Then I changed the rsymlink in share/termcap/Makefile to: ${INSTALL_RSYMLINK} ${DESTDIR}/${BINDIR}/misc/termcap ${DESTDIR}/etc/termcap and it did the right thing: --- etc-termcap --- install -l rs /tmp/ian//usr/share/misc/termcap /tmp/ian/etc/termcap ... revolution > file /tmp/ian/etc/termcap /tmp/ian/etc/termcap: symbolic link to ../usr/share/misc/termcap I haven't thought hard about whether adding DESTDIR like that would always fix the problem the right way. -- Ian From owner-svn-src-head@freebsd.org Sun Mar 12 03:00:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E7A0D07146; Sun, 12 Mar 2017 03:00:22 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x242.google.com (mail-pf0-x242.google.com [IPv6:2607:f8b0:400e:c00::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0BF321D15; Sun, 12 Mar 2017 03:00:22 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x242.google.com with SMTP id j5so15185839pfb.3; Sat, 11 Mar 2017 19:00:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=ok24xQy1vRtIRo9fh44lfRcECeaZoBRLzWgaA3ltyJQ=; b=vG/FuZjibcnd9Tjp9OhcuZM2C9rvdO7aJaI2Ws1cplvNht/Rz0qj6kRUo8EQIm+BQN rdDUdTEJeRioHQwjTDsLGZSNxMNPLSC/fclHIeP5NJGWMjc0JB2WM5OSpU1ZYViFA63s 9jvp6d3+s5/L/TL4Hpyr4xWjWePZqwj9x9cHpY7WzdROZDcWoVPnzV6d9HWxe9FbZ5zY cMPov/D/8rLapRhluX3gsV+SO7b8YiBfW6oiw7+lcS1aOBcnh/UREzSzb6inRSoCyLzc 0PfzY/aPJq/EPaLN/7Jm7V1nTcuKCi2SmmvnjJtLOxk1xqD/CNXdmOxSmPY2qjr8rsOn 232A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=ok24xQy1vRtIRo9fh44lfRcECeaZoBRLzWgaA3ltyJQ=; b=Y3CDw3/Og4C8O67VmA8OJJxccr5s//1ejHNlayxxxr71yq4KSyhFU7Tn7oN8wZ6XyX Ac9yW32MPzJaPVft23B2zNF5DKM5lS2HFQoiQ2zNdohv938aMEjvq6txHQWl6w/pa4nk Yt6trkxexjNbN0Jdwz/wjergg4s2I/hM5a70rRvExvWOQK4yerDWuSZCy0q+H7POPuQY /bPm2eLm/lFD8XtgmxZCFqGhjSe6DXfA3dNymRGokXuTsAmxeB9xHsb711EagNn9bc1e d2XQ67Mdo3GvlmcHPfYkejX+WAMTrfGP0ys1uzOJ5yNQV7FwM5w4ZFalKjiCXZtGTKRK kK1A== X-Gm-Message-State: AMke39kvYDWLtl24rt/n7ZI5m5T4sb6bt07dmG9GkDAfhGn3O2O1kIomJLtBNhv6E7BtJQ== X-Received: by 10.98.84.67 with SMTP id i64mr30389798pfb.44.1489287621315; Sat, 11 Mar 2017 19:00:21 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id g78sm26335615pfe.5.2017.03.11.19.00.20 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 11 Mar 2017 19:00:20 -0800 (PST) Subject: Re: svn commit: r315091 - head/share/termcap Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_24BC341D-78D2-44F3-BBC5-79EC88AEDAE2"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201703120037.v2C0bjdq045397@repo.freebsd.org> Date: Sat, 11 Mar 2017 19:00:19 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <58F3A212-D538-4D21-A2ED-29DB934CA040@gmail.com> References: <201703120037.v2C0bjdq045397@repo.freebsd.org> To: "Rodney W. Grimes" X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 03:00:22 -0000 --Apple-Mail=_24BC341D-78D2-44F3-BBC5-79EC88AEDAE2 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Mar 11, 2017, at 16:37, Rodney W. Grimes = wrote: >=20 > Author: rgrimes > Date: Sun Mar 12 00:37:45 2017 > New Revision: 315091 > URL: https://svnweb.freebsd.org/changeset/base/315091 >=20 > Log: > Revert r314833 until the problem with INSTALL_RSYMLINKS can be found > as it appears to break arm release builds. >=20 > PR: 217705 > Reported by: cyclaero@gmail.com > Approved by: grehan (mentor) implict as reverting >=20 > Modified: > head/share/termcap/Makefile >=20 > Modified: head/share/termcap/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/share/termcap/Makefile Sat Mar 11 22:34:02 2017 = (r315090) > +++ head/share/termcap/Makefile Sun Mar 12 00:37:45 2017 = (r315091) > @@ -24,6 +24,6 @@ termcap.db: termcap > cap_mkdb ${CAP_MKDB_ENDIAN} -f ${.TARGET:R} ${.ALLSRC} >=20 > etc-termcap: > - ${INSTALL_RSYMLINK} ${BINDIR}/misc/termcap = ${DESTDIR}/etc/termcap > + ${INSTALL_SYMLINK} ${BINDIR}/misc/termcap ${DESTDIR}/etc/termcap Rod, You needed to add ${DESTDIR} to both the source and the = destination target, as I=E2=80=99ve said more than once in other = reviews/emails. This is how install -l rs determines the relative path = from the source to the destination =E2=80=94 otherwise you=E2=80=99re = creating a relative path from ${BINDIR}/misc -> ${DESTDIR}/etc . Thanks, -Ngie --Apple-Mail=_24BC341D-78D2-44F3-BBC5-79EC88AEDAE2 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYxLnEAAoJEPWDqSZpMIYVz+UP/38Oss3qGtfvWojwKljM+0fi K7onKbR+XjQ8qS1cVSFctOaX2OcJPLxKlxJ3tyb+mHxu+EvJrpPxIBRQ8KKBu0P1 p1k0WPGUBvAG4mlP6dt2uY51YzuMkVWPQlU2PtweMvPqb/2g36l6S3+bQs+57y8p R48dMXx0I8Z9sJl8AQktGQuJ6bq4w75Jn2VIpUUDvPJ/Jfp7fehX+mL3b8IT85lF BtrgXAIo5rs+rOd1K/WNyOyKnWi7pnWfIZuzWxEFdz/ZmmoFqO4YUwYy4EUwKylh ZixgounCMCAfUHgP8knLVDW2Qx8eGQIV3XazwWaa27f9Mlgdj7b2yMreNimgrZwC KJ8lDPUS/JcrQ9R9ybJcywK9tGwArOvoMYMPP0H/UKNQQA3w08JBju65Ti4o/Yxa rb+7Q65eom4sd1ZI6zFlYmBpUFc3akOBzkLIuBuy7QTZlonuwT8VN1MRxv0530E5 FOaGOsJe8dVDepqMjWzqgAcvIxfuv4UY189fFpZx/Gn8YBXayoptaTdbWq07PzNz Zl82DIcHsG1FNNuig4QnVfoWQoyuF1HXxJlcWYKOpw8OTNL0SFL8w6fcc+xlMySZ Hk1Ljrqdy6kvZS8W3Zb8jMpV77NJNJwF7+iVck0T1nNGPCiHN+5zwvZwQc8tHj+v Rerl3USh+qmyr0GG86bq =9jyF -----END PGP SIGNATURE----- --Apple-Mail=_24BC341D-78D2-44F3-BBC5-79EC88AEDAE2-- From owner-svn-src-head@freebsd.org Sun Mar 12 03:06:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3EBC6D077EC; Sun, 12 Mar 2017 03:06:04 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x241.google.com (mail-pf0-x241.google.com [IPv6:2607:f8b0:400e:c00::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0AEB316D2; Sun, 12 Mar 2017 03:06:04 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x241.google.com with SMTP id o126so15215137pfb.1; Sat, 11 Mar 2017 19:06:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=F0tXN0X0Vix+nsuZE+19QpZX91o9by88OSeSnomhVSg=; b=SPOZJPJMWfJrcr7yS8dee1MRo7q0EqUcK/b7i9FsL1tbvBjbUrV614LlLWVhlzf2ur F1H+Lf1dOPosjhMypsSiqJcyjsTQNG0/OMMR3ZfSfyD4fpq3ImEdJFmSEijs8agwbYiO GbzF6ZyDEqZAdHqAiYCOCVWOcpPZcs30kRcGQulICtkcwykPA3wuzqnnQH5IHEU6hE2X H9fYr4f0d/8GlFzCrCHsPFWIhiM4JYZrT7kCDmwip4y75jDBDRoLlLmb5GpWVU6MAN6G 8vAawAoGS/lkJatLvc9wvJjpNFb5A9lVcUxGugqBOqBgsOme9iLpJA2XlS0Ey8SL+PGM 3KpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=F0tXN0X0Vix+nsuZE+19QpZX91o9by88OSeSnomhVSg=; b=HbNJzhRjvaTDXK8kL+B5hWLc+UkXMCctPn6L7QmSeDpzwTNgO3BbFX+SLvCE+h07fT bi2uHBtNJnjApnwfJAqayAw19E3VwiOjowOQDUVMh850EaL8RyVutejMMYeTWVbvodkN Tad0aFJEH2trqGF+ZSdd3dfTVn7o0Q37XvCEuyQ/V/uUurQAPjIgxovpUEY8dLdLtVPF 0JuLgj+N2CjFboDeXUdWbaRJ5wIMjgM8nJ2i35PUAgwGgD+w4To/8pS+6yuSRbOlQGjy 8T+SQhmDtKkOmr7Chx8e/XxFpX+YekspuDq8Zoky9i6/zo1F0EIz4TeMFom5UyqkCAv9 Yz+g== X-Gm-Message-State: AMke39kRT8rwa0LNpjpp5Zxxy7U883msw+K5mRStKW0gomXXjvXKwjN/unDESAvp/Md9Bg== X-Received: by 10.99.8.4 with SMTP id 4mr29161891pgi.204.1489287963472; Sat, 11 Mar 2017 19:06:03 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id i15sm26344019pfj.0.2017.03.11.19.06.02 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 11 Mar 2017 19:06:02 -0800 (PST) Subject: Re: svn commit: r315091 - head/share/termcap Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_9AB7A29B-FDE6-4B97-9B25-B4218B992969"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <1489287453.40576.75.camel@freebsd.org> Date: Sat, 11 Mar 2017 19:06:02 -0800 Cc: "Rodney W. Grimes" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <0EAE6C58-4573-4A71-97C8-0D672C814945@gmail.com> References: <201703120037.v2C0bjdq045397@repo.freebsd.org> <1489287453.40576.75.camel@freebsd.org> To: Ian Lepore X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 03:06:04 -0000 --Apple-Mail=_9AB7A29B-FDE6-4B97-9B25-B4218B992969 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Mar 11, 2017, at 18:57, Ian Lepore wrote: =E2=80=A6 > In an arm build sandbox I ran "make distribution DESTDIR=3D/tmp/ian" = and > this is what happened with termcap: >=20 > --- etc-termcap --- > install -l rs /usr/share/misc/termcap /tmp/ian/etc/termcap > ... > revolution > file /tmp/ian/etc/termcap > /tmp/ian/etc/termcap: symbolic link to = ../../../usr/share/misc/termcap >=20 >=20 > Then I changed the rsymlink in share/termcap/Makefile to: >=20 > ${INSTALL_RSYMLINK} ${DESTDIR}/${BINDIR}/misc/termcap = ${DESTDIR}/etc/termcap >=20 > and it did the right thing: >=20 > --- etc-termcap --- > install -l rs /tmp/ian//usr/share/misc/termcap /tmp/ian/etc/termcap > ... > revolution > file /tmp/ian/etc/termcap > /tmp/ian/etc/termcap: symbolic link to ../usr/share/misc/termcap >=20 >=20 > I haven't thought hard about whether adding DESTDIR like that would > always fix the problem the right way. DESTDIR !=3D =E2=80=9C=E2=80=9D is the key point to triggering = the bug that was causing the failures I noted in my other email (it has = nothing to do with arm specifically). Rod=E2=80=99s code will only work = for DESTDIR =3D=3D =E2=80=9C=E2=80=9D. Thanks, -Ngie --Apple-Mail=_9AB7A29B-FDE6-4B97-9B25-B4218B992969 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYxLsaAAoJEPWDqSZpMIYVNq4P/15F2TXTjynMO/EZAx2NGUDi 1ARd6dynMGxR+5uuiU910Rj010SyA6lodRAanZ4wLDNiXsTHbhf5smWGuIie/8yV rUss5AzUDS9dCHvCis3eOOm9F8uR48q712VBIvCiq9lhZhS2uzfSvsmQFsdVnTff VRwkGs/UrQ11ur30nePHqZLY+VThjHl03VvoNcnjrILbhi2EHSr9ArDPjSEx4Z0R i4rsh8nm8ckRWmtrCwCfVfV9tQCp3hK1GTEYXxXq1FdLmtgiTO/2kWF7Nutk4ZH1 HnvI/p8c4ty1gheo86Duu46UKH/KHn6L+qRahl1xdvoFAbWqrjEYUEABB/jKucqo +mBQT0VAhn6fDDs28Atm4ZtCJli83vsBI/1pD2BxuZTVwjXkc3MdALK+oel1cpsB WZcvTaNnbEcx5/trD2tDHK1fMZG2N+8pFTuLc0CeG/BFKcVIDnxKgkMukW4hEs0C JFdqqipAb3JiypzfYJXa+LOOuRzqwJZAYPxdiJvoCQ5R1VBywuTLwV8DcrA8R3nK eD5w3GfKaXCff8+DBQDaGOYPqWEkQYIU/qZ1JKdUHivty7WX/UDasfxt8qlIJeA6 RriNeOizPPSNI+UnlnzKpf2IMZ/b0v3TJ+BPFyMhpovpnBpYw0TVYXT2Mi37MMo+ YOyUwG7ZD1SUAE5O9Aen =Rh+E -----END PGP SIGNATURE----- --Apple-Mail=_9AB7A29B-FDE6-4B97-9B25-B4218B992969-- From owner-svn-src-head@freebsd.org Sun Mar 12 03:07:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96B16D0787A; Sun, 12 Mar 2017 03:07:40 +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 61D6E184D; Sun, 12 Mar 2017 03:07:39 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 4AAAB10439CF; Sun, 12 Mar 2017 14:07:33 +1100 (AEDT) Date: Sun, 12 Mar 2017 14:07:32 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Emmanuel Vadot cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r315093 - in head/sys: amd64/conf conf i386/conf In-Reply-To: <201703120052.v2C0qH44053604@repo.freebsd.org> Message-ID: <20170312134913.W4632@besplex.bde.org> References: <201703120052.v2C0qH44053604@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=VbSHBBh9 c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=OCxMDMbtnObn2ko5xekA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 03:07:40 -0000 On Sun, 12 Mar 2017, Emmanuel Vadot wrote: > Log: > Remove i915drm and radeondrm from NOTES and conf. > This unbreak LINT kernel. i915kms is too broken to even be puttable in LINT, since it is not in conf/files*. Only 44 of 157 .c files in dev/drm2 are in conf/files*. It is puttable in NOTES as comments, but isn't. According to apropos, even old drm and radeon are not in any man page. I don't want modules, but when I tried to build some, new i915 had many more build errors than old i915, do to the bug that makeoptions in kernel config files doesn't work for modules and new i915 having more unportabilities affected by CC and CFLAGS. i915kms seemed to depend on lots of other modules that I don't want. With no NOTES, no dependency lists in conf/files* and no man page, it is hard to find which ones. Bruce From owner-svn-src-head@freebsd.org Sun Mar 12 03:22:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9989DD07C7D; Sun, 12 Mar 2017 03:22:19 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 505AF100B; Sun, 12 Mar 2017 03:22:19 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2C3MIq4016365; Sun, 12 Mar 2017 03:22:18 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2C3MIxW016364; Sun, 12 Mar 2017 03:22:18 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201703120322.v2C3MIxW016364@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 12 Mar 2017 03:22:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315095 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 03:22:19 -0000 Author: pfg Date: Sun Mar 12 03:22:18 2017 New Revision: 315095 URL: https://svnweb.freebsd.org/changeset/base/315095 Log: libc: small cleanups. Rename nitems to numitems: it shares the anme with an existing macro in sys/params.h. Also initialize the value later which avoids asigning the value if we exit early. Reviewed by: ngie MFC after: 3 days Modified: head/lib/libc/gen/scandir.c Modified: head/lib/libc/gen/scandir.c ============================================================================== --- head/lib/libc/gen/scandir.c Sun Mar 12 02:21:16 2017 (r315094) +++ head/lib/libc/gen/scandir.c Sun Mar 12 03:22:18 2017 (r315095) @@ -82,7 +82,7 @@ scandir(const char *dirname, struct dire #endif { struct dirent *d, *p, **names = NULL; - size_t nitems = 0; + size_t numitems; long arraysz; DIR *dirp; @@ -94,6 +94,7 @@ scandir(const char *dirname, struct dire if (names == NULL) goto fail; + numitems = 0; while ((d = readdir(dirp)) != NULL) { if (select != NULL && !SELECT(d)) continue; /* just selected names */ @@ -112,7 +113,7 @@ scandir(const char *dirname, struct dire * Check to make sure the array has space left and * realloc the maximum size. */ - if (nitems >= arraysz) { + if (numitems >= arraysz) { struct dirent **names2; names2 = (struct dirent **)realloc((char *)names, @@ -124,22 +125,22 @@ scandir(const char *dirname, struct dire names = names2; arraysz *= 2; } - names[nitems++] = p; + names[numitems++] = p; } closedir(dirp); - if (nitems && dcomp != NULL) + if (numitems && dcomp != NULL) #ifdef I_AM_SCANDIR_B - qsort_b(names, nitems, sizeof(struct dirent *), (void*)dcomp); + qsort_b(names, numitems, sizeof(struct dirent *), (void*)dcomp); #else - qsort_r(names, nitems, sizeof(struct dirent *), + qsort_r(names, numitems, sizeof(struct dirent *), &dcomp, alphasort_thunk); #endif *namelist = names; - return (nitems); + return (numitems); fail: - while (nitems > 0) - free(names[--nitems]); + while (numitems > 0) + free(names[--numitems]); free(names); closedir(dirp); return (-1); From owner-svn-src-head@freebsd.org Sun Mar 12 03:26:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 726B6D07D1D; Sun, 12 Mar 2017 03:26:26 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 421CE11CF; Sun, 12 Mar 2017 03:26:26 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2C3QP3e016564; Sun, 12 Mar 2017 03:26:25 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2C3QPVb016563; Sun, 12 Mar 2017 03:26:25 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201703120326.v2C3QPVb016563@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 12 Mar 2017 03:26:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315096 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 03:26:26 -0000 Author: pfg Date: Sun Mar 12 03:26:25 2017 New Revision: 315096 URL: https://svnweb.freebsd.org/changeset/base/315096 Log: libc: small cleanups. Unsign setlen: it is local and will never be negative. Having one more bit for growth is beneficial and it avoids a cast when it's going to be used for allocation. Reviewed by: ngie MFC after: 3 days Modified: head/lib/libc/gen/setmode.c Modified: head/lib/libc/gen/setmode.c ============================================================================== --- head/lib/libc/gen/setmode.c Sun Mar 12 03:22:18 2017 (r315095) +++ head/lib/libc/gen/setmode.c Sun Mar 12 03:26:25 2017 (r315096) @@ -175,7 +175,7 @@ setmode(const char *p) mode_t mask, perm, permXbits, who; long perml; int equalopdone; - int setlen; + u_int setlen; if (!*p) { errno = EINVAL; @@ -190,7 +190,7 @@ setmode(const char *p) setlen = SET_LEN + 2; - if ((set = malloc((u_int)(sizeof(BITCMD) * setlen))) == NULL) + if ((set = malloc(setlen * sizeof(BITCMD))) == NULL) return (NULL); saveset = set; endset = set + (setlen - 2); From owner-svn-src-head@freebsd.org Sun Mar 12 03:29:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 564BCD07DC2; Sun, 12 Mar 2017 03:29:24 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2613C1359; Sun, 12 Mar 2017 03:29:24 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2C3TNuX016756; Sun, 12 Mar 2017 03:29:23 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2C3TNg5016755; Sun, 12 Mar 2017 03:29:23 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201703120329.v2C3TNg5016755@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 12 Mar 2017 03:29:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315097 - head/lib/libc/iconv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 03:29:24 -0000 Author: pfg Date: Sun Mar 12 03:29:23 2017 New Revision: 315097 URL: https://svnweb.freebsd.org/changeset/base/315097 Log: libc: small cleanups. Remove unused initialization: "num" is properly defined before use. Reviewed by: ngie MFC after: 3 days Modified: head/lib/libc/iconv/citrus_esdb.c Modified: head/lib/libc/iconv/citrus_esdb.c ============================================================================== --- head/lib/libc/iconv/citrus_esdb.c Sun Mar 12 03:26:25 2017 (r315096) +++ head/lib/libc/iconv/citrus_esdb.c Sun Mar 12 03:29:23 2017 (r315097) @@ -263,8 +263,6 @@ _citrus_esdb_get_list(char ***rlist, siz size_t num; int ret; - num = 0; - ret = _lookup_seq_open(&cla, _PATH_ESDB "/" ESDB_ALIAS, _LOOKUP_CASE_IGNORE); if (ret) From owner-svn-src-head@freebsd.org Sun Mar 12 03:29:50 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E489CD07E5A; Sun, 12 Mar 2017 03:29:50 +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 mx1.freebsd.org (Postfix) with ESMTPS id B44D41501; Sun, 12 Mar 2017 03:29:50 +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 v2C3Tnu1016830; Sun, 12 Mar 2017 03:29:49 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2C3TnKO016829; Sun, 12 Mar 2017 03:29:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703120329.v2C3TnKO016829@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 12 Mar 2017 03:29:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315098 - head/usr.bin/xinstall/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 03:29:51 -0000 Author: ngie Date: Sun Mar 12 03:29:49 2017 New Revision: 315098 URL: https://svnweb.freebsd.org/changeset/base/315098 Log: Clarify src vs dest path mismatch in :symbolic_link_{absolute,relative}_body Unfortunately kyua does not omit the path mismatch on failure, so it must be coded into the error message. Cache the values, run the test(1) call, then print out the values in an atf_fail call to emit the required diagnostics to debug why things are failing. MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/usr.bin/xinstall/tests/install_test.sh Modified: head/usr.bin/xinstall/tests/install_test.sh ============================================================================== --- head/usr.bin/xinstall/tests/install_test.sh Sun Mar 12 03:29:23 2017 (r315097) +++ head/usr.bin/xinstall/tests/install_test.sh Sun Mar 12 03:29:49 2017 (r315098) @@ -283,7 +283,11 @@ symbolic_link_absolute_body() { atf_check install -l sa testf copyf [ testf -ef copyf ] || atf_fail "not same file" [ -L copyf ] || atf_fail "copy is not symlink" - [ "$(readlink copyf)" = "$(pwd -P)/testf" ] || atf_fail "unexpected symlink contents" + copyf_path=$(readlink copyf) + testf_path="$(pwd -P)/testf" + if [ "$copyf_path" != "$testf_path" ]; then + atf_fail "unexpected symlink ('$copyf_path' != '$testf_path')" + fi } atf_test_case symbolic_link_relative @@ -292,7 +296,11 @@ symbolic_link_relative_body() { atf_check install -l sr testf copyf [ testf -ef copyf ] || atf_fail "not same file" [ -L copyf ] || atf_fail "copy is not symlink" - [ "$(readlink copyf)" = "testf" ] || atf_fail "unexpected symlink contents" + copyf_path=$(readlink copyf) + testf_path="testf" + if [ "$copyf_path" != "$testf_path" ]; then + atf_fail "unexpected symlink ('$copyf_path' != '$testf_path')" + fi } atf_test_case mkdir_simple From owner-svn-src-head@freebsd.org Sun Mar 12 03:33:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16569D08011; Sun, 12 Mar 2017 03:33:22 +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 mx1.freebsd.org (Postfix) with ESMTPS id CCD081952; Sun, 12 Mar 2017 03:33:21 +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 v2C3XK4C020635; Sun, 12 Mar 2017 03:33:20 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2C3XKfV020634; Sun, 12 Mar 2017 03:33:20 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201703120333.v2C3XKfV020634@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 12 Mar 2017 03:33:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315099 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 03:33:22 -0000 Author: bapt Date: Sun Mar 12 03:33:20 2017 New Revision: 315099 URL: https://svnweb.freebsd.org/changeset/base/315099 Log: Fix native-xtools after replacement of GNU diff Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sun Mar 12 03:29:49 2017 (r315098) +++ head/Makefile.inc1 Sun Mar 12 03:33:20 2017 (r315099) @@ -1936,7 +1936,7 @@ native-xtools: .PHONY ${_clang} \ sbin/md5 \ sbin/sysctl \ - gnu/usr.bin/diff \ + usr.bin/diff \ usr.bin/awk \ usr.bin/basename \ usr.bin/bmake \ From owner-svn-src-head@freebsd.org Sun Mar 12 03:35:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C262D0807C; Sun, 12 Mar 2017 03:35:03 +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 mx1.freebsd.org (Postfix) with ESMTPS id 0BE131ACE; Sun, 12 Mar 2017 03:35:02 +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 v2C3Z2iq020757; Sun, 12 Mar 2017 03:35:02 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2C3Z2vZ020755; Sun, 12 Mar 2017 03:35:02 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201703120335.v2C3Z2vZ020755@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 12 Mar 2017 03:35:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315100 - in head: . share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 03:35:03 -0000 Author: bapt Date: Sun Mar 12 03:35:01 2017 New Revision: 315100 URL: https://svnweb.freebsd.org/changeset/base/315100 Log: Finish removal of WITHOUT_MANDOCDB Modified: head/ObsoleteFiles.inc head/share/mk/src.opts.mk Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Mar 12 03:33:20 2017 (r315099) +++ head/ObsoleteFiles.inc Sun Mar 12 03:35:01 2017 (r315100) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20170311: Remove WITHOUT_MANDOCDB option +OLD_FILES=/usr/share/man/man1/makewhatis.1.gz # 20170311: remove GNU diff OLD_FILES+=usr/share/man/man7/diff.7.gz # 20170308: rename some tests Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Sun Mar 12 03:33:20 2017 (r315099) +++ head/share/mk/src.opts.mk Sun Mar 12 03:35:01 2017 (r315100) @@ -131,7 +131,6 @@ __DEFAULT_YES_OPTIONS = \ MAIL \ MAILWRAPPER \ MAKE \ - MANDOCDB \ NDIS \ NETCAT \ NETGRAPH \ From owner-svn-src-head@freebsd.org Sun Mar 12 03:35:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B820BD080DD; Sun, 12 Mar 2017 03:35:49 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x241.google.com (mail-pf0-x241.google.com [IPv6:2607:f8b0:400e:c00::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 856B91C4C; Sun, 12 Mar 2017 03:35:49 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x241.google.com with SMTP id v190so15251847pfb.0; Sat, 11 Mar 2017 19:35:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=PlcMZVYiKqr8b1xxqIyEu24i/pK7yKo1VOHz0cSEjds=; b=HdW3Ofhejv4tl/7fcrc0gr4cPwbjlIzTysNnMt1I1Z/kAm0F/fobhdEMFTq/ux3Gah qr909fEXq7uCoKzBHPBvXp6L52Y+7PtzGXvQq8Xtrp9BWw9BuFq3xx354I9Lqhw+F93b NtkxQVLPLhZNyF4LO6nB776sTHvHHiJftFI+ZP2aTI42JPt5Ql/3K6fgE/T0vk9DUKQA hX3PfGjP1H6jRpoV45/7JeFiesWYg4bVJ/sI6gk19cI5wv4WA8sXLzX9xN45QfPKulGU 2yqs9NqMKvfVbhpWrYgNJypzJN/50HaegAAegAGTC6Ofozx4Z0HOZFRfyR07i7mCilum obFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=PlcMZVYiKqr8b1xxqIyEu24i/pK7yKo1VOHz0cSEjds=; b=ZdQLFuLsKhp57jBIw3ykgCmbe6MnDtQX7arqvpXbKBAQX1kopJz8MYb1WcF7T261EK 5/3etoUhIke1oxJdHM/HeubelATvqIIYnTwtW4xSmryt1nk4t27Bf8i+MVnoTVd926nV apGg0ZUrbPa+FjJDA8KtBhNiskdy5HAcKHbkeM5dV+llF1U+b8/hreB+1fjJB0rFmk+0 zzuH0VofHjqpbYgc2R4OXwZInk8rp/ZQroBRYVMc6anV7gQt82JqPKH7WIBmVJFeFqjg 7dEK9mmZ+vMjBVBxqthmZXMXSHO7m34Cf+mhGLala5JeQPS7WnL8S268mQkqCWi0jYK8 6VQw== X-Gm-Message-State: AMke39lmOt8V9kibK6Jq5q18UdjsyS8XxNdSOEPMpdxh8kDXZuIYd+TzJhnxPLqKdXdlkQ== X-Received: by 10.99.154.9 with SMTP id o9mr29509718pge.69.1489289748933; Sat, 11 Mar 2017 19:35:48 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id g29sm26397925pfg.37.2017.03.11.19.35.48 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 11 Mar 2017 19:35:48 -0800 (PST) Subject: Re: svn commit: r315100 - in head: . share/mk Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_FA76B0E4-B7DC-4A1C-BEE7-7E039471C489"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201703120335.v2C3Z2vZ020755@repo.freebsd.org> Date: Sat, 11 Mar 2017 19:35:47 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <32D8FF24-5239-4524-8BA1-F4D6284A5926@gmail.com> References: <201703120335.v2C3Z2vZ020755@repo.freebsd.org> To: Baptiste Daroussin X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 03:35:49 -0000 --Apple-Mail=_FA76B0E4-B7DC-4A1C-BEE7-7E039471C489 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Mar 11, 2017, at 19:35, Baptiste Daroussin = wrote: >=20 > Author: bapt > Date: Sun Mar 12 03:35:01 2017 > New Revision: 315100 > URL: https://svnweb.freebsd.org/changeset/base/315100 >=20 > Log: > Finish removal of WITHOUT_MANDOCDB >=20 > Modified: > head/ObsoleteFiles.inc > head/share/mk/src.opts.mk >=20 > Modified: head/ObsoleteFiles.inc > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/ObsoleteFiles.inc Sun Mar 12 03:33:20 2017 = (r315099) > +++ head/ObsoleteFiles.inc Sun Mar 12 03:35:01 2017 = (r315100) > @@ -38,6 +38,8 @@ > # xargs -n1 | sort | uniq -d; > # done >=20 > +# 20170311: Remove WITHOUT_MANDOCDB option > +OLD_FILES=3D/usr/share/man/man1/makewhatis.1.gz Bad leading slash. -Ngie --Apple-Mail=_FA76B0E4-B7DC-4A1C-BEE7-7E039471C489 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYxMITAAoJEPWDqSZpMIYV6YAQAKfAe7HVkioI5eGSWQwbCLe/ HZUYDEN8Kio5ojKBEuIROkWA5cjufCrrjSiMc9fKswuXQlZPA9IQg6uwKG0HAN+v s7TqXc7uL6QvzNKghI7dkeduNPdou2Nt/trc1ArT5c0uacWKs7JJmDf1TzudJ5rP QIMDv8Lut8mpuuzr8oTqCzL0YDjGaDXlohZup0fbtg6gR4XqxahrdAM4RyAvSbrJ 7CiOVVG0RRBEmeLsWZFwqtF5O0Jqkj7a+/RGD3JQY3h2dGlGr+8Or1TM00+kYmDz ahL+oYsvvofmuLvZG17oMH7Yjd5MbmK39fyd9XMqbjM4GcxGhKCpGjNkoxOFeGvd g1Fj71SCJVnHaMGmg1Dfa1kPS0ki6OfNQbrcddA5ALvowl0gd8Rt/r5SS8lgKvw0 lIxy4oZ6QpIh0aAylJ750RwM4ma93Mukgy9RzU9tIwEFPiBe2kXBsXU0zGrAtsVS 2mDqTryjeGk3QjiT205RW9th2KZBYy+9FYcweTVuUFYYkWWIkFITunScvD4D8FBX XsGyqxYbp8wobQ/ViVM4QMZCdnndY6GP5zcQp/gMndUBk+ZQUz6qnsV0gJ1Bk+Xo /c1kggx6m1pQxHJQYq3SQBLZEAHN4zsVHgMnyD1v5AZrDsNYGDIFrxczDja0hCWn Y06YklSwD6bWEhuJ9dh2 =fzES -----END PGP SIGNATURE----- --Apple-Mail=_FA76B0E4-B7DC-4A1C-BEE7-7E039471C489-- From owner-svn-src-head@freebsd.org Sun Mar 12 03:36:35 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3AA5AD0816F; Sun, 12 Mar 2017 03:36:35 +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 mx1.freebsd.org (Postfix) with ESMTPS id 07DCB1DCC; Sun, 12 Mar 2017 03:36:34 +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 v2C3aYAU020858; Sun, 12 Mar 2017 03:36:34 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2C3aY30020857; Sun, 12 Mar 2017 03:36:34 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201703120336.v2C3aY30020857@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 12 Mar 2017 03:36:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315101 - head/usr.bin/diff X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 03:36:35 -0000 Author: bapt Date: Sun Mar 12 03:36:33 2017 New Revision: 315101 URL: https://svnweb.freebsd.org/changeset/base/315101 Log: Fix wrong date in diff(1) Reported by: rgrimes Modified: head/usr.bin/diff/diff.1 Modified: head/usr.bin/diff/diff.1 ============================================================================== --- head/usr.bin/diff/diff.1 Sun Mar 12 03:35:01 2017 (r315100) +++ head/usr.bin/diff/diff.1 Sun Mar 12 03:36:33 2017 (r315101) @@ -30,7 +30,7 @@ .\" @(#)diff.1 8.1 (Berkeley) 6/30/93 .\" $FreeBSD$ .\" -.Dd Septembr 03, 2017 +.Dd March 11, 2017 .Dt DIFF 1 .Os .Sh NAME From owner-svn-src-head@freebsd.org Sun Mar 12 03:43:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40792D0837F; Sun, 12 Mar 2017 03:43:30 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 0CEFF125E; Sun, 12 Mar 2017 03:43:29 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2C3hTWs024838; Sun, 12 Mar 2017 03:43:29 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2C3hTIL024837; Sun, 12 Mar 2017 03:43:29 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201703120343.v2C3hTIL024837@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Sun, 12 Mar 2017 03:43:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315102 - head/usr.sbin/bsnmpd/modules/snmp_hostres X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 03:43:30 -0000 Author: araujo Date: Sun Mar 12 03:43:28 2017 New Revision: 315102 URL: https://svnweb.freebsd.org/changeset/base/315102 Log: Use nitems() from sys/param.h. Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D9943 Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_fs_tbl.c Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_fs_tbl.c ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_fs_tbl.c Sun Mar 12 03:36:33 2017 (r315101) +++ head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_fs_tbl.c Sun Mar 12 03:43:28 2017 (r315102) @@ -143,7 +143,7 @@ static const struct { { "hpfs", &OIDX_hrFSHPFS_c }, { "smbfs", &OIDX_hrFSOther_c }, }; -#define N_FS_TYPE_MAP (sizeof(fs_type_map) / sizeof(fs_type_map[0])) +#define N_FS_TYPE_MAP nitems(fs_type_map) /** * Create an entry into the FS table and an entry in the map (if needed). From owner-svn-src-head@freebsd.org Sun Mar 12 03:46:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C26C6D084BC; Sun, 12 Mar 2017 03:46:41 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x22f.google.com (mail-pg0-x22f.google.com [IPv6:2607:f8b0:400e:c05::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 881B71437; Sun, 12 Mar 2017 03:46:41 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x22f.google.com with SMTP id 25so52166632pgy.0; Sat, 11 Mar 2017 19:46:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=kLjEi8lA2WJ6kxLIWBXSRsE9yOlfHQJcKiz7uDZSOws=; b=p5blGvdynrwRERh+9G9bd4St65iw8RtIRTAwzQmWRHn2uDz+A+NiSqHAkiBbflOX0J W4/yjjseticmcF+iY7QCtooWfPguqlVxMpCBDkejgtMgag9CMZSV6Q5mJ8mL1yy+9sAn 1J478r28ASZiY/p1i4xVxikEPATziwYIB4Q29rvjGWM2/jj49rqaeaGFR36+/GeRIbk5 2PtzY8fYI7cN77sU666LinsTM9KK7qPvY+ksWFujeDwYqr4dAmLknm7bZnoheUeHGSJy g4Ly5aeDrOmQZNTigUV3ipq7MXIpdfGL12PCJ4vI3skkdRYBcglZaFC4T/c4+BYv9BYb XAYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=kLjEi8lA2WJ6kxLIWBXSRsE9yOlfHQJcKiz7uDZSOws=; b=thiDBP0tnPnUbqp7MOvpaWClneMWnl2h/OMM0RsiaU8NugFV0IdxBkefaYDoNr+cUK eRP1XsSCGCwaZ9Nf66qlX7jALmM+QFTP4h2OBat8Sq5z4AHsJOi5MaLbVhT2rktqkIxM wU7PTWmDGpSVGuZaXcN7/0Udir752GWTM/S+mhucLMPy1nKUqHaXH1ZvXgocAnOxasWP N/dRwObf4RItTp/vEJwYsToXJtDL3PvawHGuFfJTsm+M5Vb7MIW3lIWC7LJpw10O/j0r 14e967zliuA5oFUn/XVbq+oAzK0TRM88X4JsMb2wyMFJFwlfzDS46pYqhhTb/sBCzdlw xvKw== X-Gm-Message-State: AMke39mIfvIy0S6YhBn17XzBWpPlMoO2Xz2d3RKURVxKHwOKUpUwYEqFDSZvLmQkP4m/Ng== X-Received: by 10.84.232.72 with SMTP id f8mr36831626pln.85.1489290400960; Sat, 11 Mar 2017 19:46:40 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id d63sm26340451pfg.132.2017.03.11.19.46.40 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 11 Mar 2017 19:46:40 -0800 (PST) Subject: Re: svn commit: r315051 - in head: . gnu/usr.bin gnu/usr.bin/diff usr.bin usr.bin/diff usr.bin/diff/tests Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_8C620D9C-1AA0-475D-894B-2D8BB011CD0B"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201703110501.v2B51UJQ045535@repo.freebsd.org> Date: Sat, 11 Mar 2017 19:46:39 -0800 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201703110501.v2B51UJQ045535@repo.freebsd.org> To: Baptiste Daroussin X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 03:46:41 -0000 --Apple-Mail=_8C620D9C-1AA0-475D-894B-2D8BB011CD0B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Mar 10, 2017, at 21:01, Baptiste Daroussin = wrote: >=20 > Author: bapt > Date: Sat Mar 11 05:01:29 2017 > New Revision: 315051 > URL: https://svnweb.freebsd.org/changeset/base/315051 >=20 > Log: > Import diff from OpenBSD and remove GNU diff >=20 > Some of the modifications from the previous summer of code has been = integrated > Modification for compatibility with GNU diff output has been added >=20 > Main difference with OpenBSD: > Implement multiple GNU diff options: > * --ignore-file-name-case > * --no-ignore-file-name-case > * --normal > * --tabsize > * --strip-trailing-cr > Make diff -p compatible with GNU diff > Implement diff -l > Make diff -r compatible with GNU diff >=20 > Capsicumize diffing 2 regular files > Add a simple test suite >=20 > Approved by: AsiaBSDcon devsummit > Obtained from: OpenBSD, GSoC > Relnotes: yes >=20 > Added: > head/usr.bin/diff/ > head/usr.bin/diff/Makefile (contents, props changed) > head/usr.bin/diff/TODO (contents, props changed) > head/usr.bin/diff/diff.1 (contents, props changed) > head/usr.bin/diff/diff.c (contents, props changed) > head/usr.bin/diff/diff.h (contents, props changed) > head/usr.bin/diff/diffdir.c (contents, props changed) > head/usr.bin/diff/diffreg.c (contents, props changed) > head/usr.bin/diff/tests/ > head/usr.bin/diff/tests/Makefile (contents, props changed) > head/usr.bin/diff/tests/diff.sh (contents, props changed) > head/usr.bin/diff/tests/input1.in (contents, props changed) > head/usr.bin/diff/tests/input2.in (contents, props changed) > head/usr.bin/diff/tests/input_c1.in (contents, props changed) > head/usr.bin/diff/tests/input_c2.in (contents, props changed) > head/usr.bin/diff/tests/simple.out (contents, props changed) > head/usr.bin/diff/tests/simple_b.out (contents, props changed) > head/usr.bin/diff/tests/simple_e.out (contents, props changed) > head/usr.bin/diff/tests/simple_i.out (contents, props changed) > head/usr.bin/diff/tests/simple_n.out (contents, props changed) > head/usr.bin/diff/tests/simple_p.out (contents, props changed) > head/usr.bin/diff/tests/simple_u.out (contents, props changed) > head/usr.bin/diff/tests/simple_w.out (contents, props changed) > head/usr.bin/diff/tests/unified_9999.out (contents, props changed) > head/usr.bin/diff/tests/unified_c9999.out (contents, props changed) > head/usr.bin/diff/tests/unified_p.out (contents, props changed) > head/usr.bin/diff/xmalloc.c (contents, props changed) > head/usr.bin/diff/xmalloc.h (contents, props changed) > Deleted: > head/gnu/usr.bin/diff/ > Modified: > head/ObsoleteFiles.inc > head/UPDATING > head/gnu/usr.bin/Makefile > head/usr.bin/Makefile Hi Baptiste, This change fails with gcc riscv due to some -Wunused errors: = https://ci.freebsd.org/job/FreeBSD-head-riscv64-build/697/console . Thanks, -Ngie --Apple-Mail=_8C620D9C-1AA0-475D-894B-2D8BB011CD0B Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYxMSfAAoJEPWDqSZpMIYVaysP/1kebQmRPDl9Jhpu0gdcxiMk 3m/BhjYFsb4lHDz4LL7TICaU6yfGUdly5/EZpIIRPO4EInCeDD+8SE0kVuzMEL1i 1cW6k+TX8gylqJoNG34+As0fj4/jHXeDmQhFrcAlAdVKXZ2G34MXdYEYD2txOcfl V/YYOomt72ej8BtieUBTp1hA5fmkklwYpSh8CiwRvqVRfV6XyBIKTkC8rap7QSze 0bmD5Q4bWtApSgE++TjPTl7l0HFqggvHAR0eUmorO4kYZWUDvAyRcSu6Zepfz5xX e7sUfMZrdBIArGiU3dX45UVbtYX/7OVNSE7jwWSQ1NnjiU+ML2B+m1UaG3LGZina S+8R4ZPVL8RWDDPCsStwjzOGxaIXjoU9DcM/Jo/NC5hVQLGGdVWtAo7cqStsSxYy AvxULA60AYJWKjJcf8Cb8p1HjG6WeECdu1YmYSWdOnumxplSOkOrS45kWyX8ICCG vGHn9q7Pqw9BkXP2pENkYf51ggAYdqKYMTD3fABr0URWh+i4Hub2EGfqKtCDb/pl ZTNU+Wm0rbziGbdpOIo8JBwwsiDj7CbU6qv8p01nx1ZOfkHE2Kcv0Ri7lgSSUl6u 26/HIlfrI1ZAuIgqBWkfT6X3vPfbvnCHh0ICGO447g6BKfcFYpi8l6XWV+feTWz0 fYHT6qu7faeXkahJFN// =XNF6 -----END PGP SIGNATURE----- --Apple-Mail=_8C620D9C-1AA0-475D-894B-2D8BB011CD0B-- From owner-svn-src-head@freebsd.org Sun Mar 12 03:49:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A617D08603; Sun, 12 Mar 2017 03:49: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 mx1.freebsd.org (Postfix) with ESMTPS id CBA801616; Sun, 12 Mar 2017 03:49:06 +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 v2C3n5qG025103; Sun, 12 Mar 2017 03:49:05 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2C3n5gK025102; Sun, 12 Mar 2017 03:49:05 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201703120349.v2C3n5gK025102@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 12 Mar 2017 03:49:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315103 - head/usr.bin/diff X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 03:49:07 -0000 Author: bapt Date: Sun Mar 12 03:49:05 2017 New Revision: 315103 URL: https://svnweb.freebsd.org/changeset/base/315103 Log: Implement a stub --horizon-lines=NUM for compatibility with GNU diff3 some options of GNU diff3 would call diff with --horizon-lines, rcs is depending on that. Reported by: antoine Modified: head/usr.bin/diff/diff.c Modified: head/usr.bin/diff/diff.c ============================================================================== --- head/usr.bin/diff/diff.c Sun Mar 12 03:43:28 2017 (r315102) +++ head/usr.bin/diff/diff.c Sun Mar 12 03:49:05 2017 (r315103) @@ -54,6 +54,7 @@ enum { OPT_IGN_FN_CASE, OPT_NO_IGN_FN_CASE, OPT_NORMAL, + OPT_HORIZON_LINES, }; static struct option longopts[] = { @@ -83,6 +84,7 @@ static struct option longopts[] = { { "exclude", required_argument, 0, 'x' }, { "exclude-from", required_argument, 0, 'X' }, { "ignore-file-name-case", no_argument, NULL, OPT_IGN_FN_CASE }, + { "horizon-lines", required_argument, NULL, OPT_HORIZON_LINES }, { "no-ignore-file-name-case", no_argument, NULL, OPT_NO_IGN_FN_CASE }, { "normal", no_argument, NULL, OPT_NORMAL }, { "strip-trailing-cr", no_argument, NULL, OPT_STRIPCR }, @@ -225,6 +227,8 @@ main(int argc, char **argv) case 'x': push_excludes(optarg); break; + case OPT_HORIZON_LINES: + break; /* XXX TODO for compatibility with GNU diff3 */ case OPT_IGN_FN_CASE: ignore_file_case = 1; break; From owner-svn-src-head@freebsd.org Sun Mar 12 03:50:14 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0B7DD08746; Sun, 12 Mar 2017 03:50:14 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C07F6177D; Sun, 12 Mar 2017 03:50:14 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2C3oDmF025208; Sun, 12 Mar 2017 03:50:13 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2C3oDwP025207; Sun, 12 Mar 2017 03:50:13 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201703120350.v2C3oDwP025207@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 12 Mar 2017 03:50:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315104 - head/lib/libc/stdio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 03:50:15 -0000 Author: pfg Date: Sun Mar 12 03:50:13 2017 New Revision: 315104 URL: https://svnweb.freebsd.org/changeset/base/315104 Log: libc: small cleanup. Initialize newsize in the code section so we avoids asigning the value if we exit early. Modified: head/lib/libc/stdio/printf-pos.c Modified: head/lib/libc/stdio/printf-pos.c ============================================================================== --- head/lib/libc/stdio/printf-pos.c Sun Mar 12 03:49:05 2017 (r315103) +++ head/lib/libc/stdio/printf-pos.c Sun Mar 12 03:50:13 2017 (r315104) @@ -641,12 +641,13 @@ __grow_type_table(struct typetable *type enum typeid *const oldtable = types->table; const int oldsize = types->tablesize; enum typeid *newtable; - u_int n, newsize = oldsize * 2; + u_int n, newsize; /* Detect overflow */ if (types->nextarg > NL_ARGMAX) return (-1); + newsize = oldsize * 2; if (newsize < types->nextarg + 1) newsize = types->nextarg + 1; if (oldsize == STATIC_ARG_TBL_SIZE) { From owner-svn-src-head@freebsd.org Sun Mar 12 03:53:42 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 712ADD0897E; Sun, 12 Mar 2017 03:53:42 +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 mx1.freebsd.org (Postfix) with ESMTPS id 3A8571C5F; Sun, 12 Mar 2017 03:53:42 +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 v2C3rfZW029114; Sun, 12 Mar 2017 03:53:41 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2C3rfYT029113; Sun, 12 Mar 2017 03:53:41 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201703120353.v2C3rfYT029113@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 12 Mar 2017 03:53:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315105 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 03:53:42 -0000 Author: bapt Date: Sun Mar 12 03:53:41 2017 New Revision: 315105 URL: https://svnweb.freebsd.org/changeset/base/315105 Log: Fix bad latest entry Reported by: ngie Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Mar 12 03:50:13 2017 (r315104) +++ head/ObsoleteFiles.inc Sun Mar 12 03:53:41 2017 (r315105) @@ -39,7 +39,7 @@ # done # 20170311: Remove WITHOUT_MANDOCDB option -OLD_FILES=/usr/share/man/man1/makewhatis.1.gz +OLD_FILES+=usr/share/man/man1/makewhatis.1.gz # 20170311: remove GNU diff OLD_FILES+=usr/share/man/man7/diff.7.gz # 20170308: rename some tests From owner-svn-src-head@freebsd.org Sun Mar 12 03:58:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70585D08A97; Sun, 12 Mar 2017 03:58:55 +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 mx1.freebsd.org (Postfix) with ESMTPS id 42DE81E1C; Sun, 12 Mar 2017 03:58:55 +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 v2C3wsOY029360; Sun, 12 Mar 2017 03:58:54 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2C3wsKW029359; Sun, 12 Mar 2017 03:58:54 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703120358.v2C3wsKW029359@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 12 Mar 2017 03:58:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315106 - head/usr.bin/xinstall/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 03:58:55 -0000 Author: ngie Date: Sun Mar 12 03:58:54 2017 New Revision: 315106 URL: https://svnweb.freebsd.org/changeset/base/315106 Log: Add 3 more testcases demonstrating how install -l sr works The additional testcases use absolute paths for sources and targets, as the other testcase which tested `-l sr` used flat relative paths in the same directory. Please note that these testcases do not test `-l a` -- that's already addressed in the battery of tests. MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/usr.bin/xinstall/tests/install_test.sh Modified: head/usr.bin/xinstall/tests/install_test.sh ============================================================================== --- head/usr.bin/xinstall/tests/install_test.sh Sun Mar 12 03:53:41 2017 (r315105) +++ head/usr.bin/xinstall/tests/install_test.sh Sun Mar 12 03:58:54 2017 (r315106) @@ -303,6 +303,69 @@ symbolic_link_relative_body() { fi } +atf_test_case symbolic_link_relative_absolute_source_and_dest1 +symbolic_link_relative_absolute_source_and_dest1_head() { + atf_set "descr" "Verify -l rs with absolute paths (.../copyf -> .../a/b/c/testf)" +} +symbolic_link_relative_absolute_source_and_dest1_body() { + src_path=a/b/c/testf + src_path_prefixed=$PWD/$src_path + dest_path=$PWD/copyf + + atf_check mkdir -p a/b/c + atf_check touch $src_path + atf_check install -l sr $src_path_prefixed $dest_path + [ $src_path_prefixed -ef $dest_path ] || atf_fail "not same file" + [ -L $dest_path ] || atf_fail "copy is not symlink" + dest_path_relative=$(readlink $dest_path) + src_path_relative="$src_path" + if [ "$src_path_relative" != "$dest_path_relative" ]; then + atf_fail "unexpected symlink contents ('$src_path_relative' != '$dest_path_relative')" + fi +} + +atf_test_case symbolic_link_relative_absolute_source_and_dest1_double_slash +symbolic_link_relative_absolute_source_and_dest1_double_slash_head() { + atf_set "descr" "Verify -l rs with absolute paths (.../copyf -> .../a/b/c/testf), using double-slashes" +} +symbolic_link_relative_absolute_source_and_dest1_double_slash_body() { + src_path=a//b//c//testf + src_path_prefixed=$PWD/$src_path + dest_path=$PWD/copyf + + atf_check mkdir -p a/b/c + atf_check touch $src_path + atf_check install -l sr $src_path_prefixed $dest_path + [ $src_path_prefixed -ef $dest_path ] || atf_fail "not same file" + [ -L $dest_path ] || atf_fail "copy is not symlink" + dest_path_relative=$(readlink $dest_path) + src_path_relative="$(echo $src_path | sed -e 's,//,/,g')" + if [ "$src_path_relative" != "$dest_path_relative" ]; then + atf_fail "unexpected symlink contents ('$src_path_relative' != '$dest_path_relative')" + fi +} + +atf_test_case symbolic_link_relative_absolute_source_and_dest2 +symbolic_link_relative_absolute_source_and_dest2_head() { + atf_set "descr" "Verify -l rs with absolute paths (.../a/b/c/copyf -> .../testf)" +} +symbolic_link_relative_absolute_source_and_dest2_body() { + src_path=testf + src_path_prefixed=$PWD/$src_path + dest_path=$PWD/a/b/c/copyf + + atf_check mkdir -p a/b/c + atf_check touch $src_path + atf_check install -l sr $src_path_prefixed $dest_path + [ $src_path_prefixed -ef $dest_path ] || atf_fail "not same file" + [ -L $dest_path ] || atf_fail "copy is not symlink" + dest_path_relative=$(readlink $dest_path) + src_path_relative="../../../$src_path" + if [ "$src_path_relative" != "$dest_path_relative" ]; then + atf_fail "unexpected symlink contents ('$src_path_relative' != '$dest_path_relative')" + fi +} + atf_test_case mkdir_simple mkdir_simple_body() { atf_check install -d dir1/dir2 @@ -349,5 +412,8 @@ atf_init_test_cases() { atf_add_test_case symbolic_link atf_add_test_case symbolic_link_absolute atf_add_test_case symbolic_link_relative + atf_add_test_case symbolic_link_relative_absolute_source_and_dest1 + atf_add_test_case symbolic_link_relative_absolute_source_and_dest1_double_slash + atf_add_test_case symbolic_link_relative_absolute_source_and_dest2 atf_add_test_case mkdir_simple } From owner-svn-src-head@freebsd.org Sun Mar 12 04:04:17 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8184D08CBC; Sun, 12 Mar 2017 04:04:17 +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 mx1.freebsd.org (Postfix) with ESMTPS id 9DD4912AE; Sun, 12 Mar 2017 04:04:17 +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 v2C44G1N033089; Sun, 12 Mar 2017 04:04:16 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2C44GZZ033087; Sun, 12 Mar 2017 04:04:16 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201703120404.v2C44GZZ033087@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 12 Mar 2017 04:04:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315107 - head/usr.bin/diff X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 04:04:18 -0000 Author: bapt Date: Sun Mar 12 04:04:16 2017 New Revision: 315107 URL: https://svnweb.freebsd.org/changeset/base/315107 Log: Fix building with recent gcc Reported by: lwhsu, ngie Modified: head/usr.bin/diff/diffdir.c head/usr.bin/diff/diffreg.c Modified: head/usr.bin/diff/diffdir.c ============================================================================== --- head/usr.bin/diff/diffdir.c Sun Mar 12 03:58:54 2017 (r315106) +++ head/usr.bin/diff/diffdir.c Sun Mar 12 04:04:16 2017 (r315107) @@ -57,6 +57,8 @@ diffdir(char *p1, char *p2, int flags) char path1[PATH_MAX], path2[PATH_MAX]; int pos; + edp1 = edp2 = NULL; + dirlen1 = strlcpy(path1, *p1 ? p1 : ".", sizeof(path1)); if (dirlen1 >= sizeof(path1) - 1) { warnc(ENAMETOOLONG, "%s", p1); Modified: head/usr.bin/diff/diffreg.c ============================================================================== --- head/usr.bin/diff/diffreg.c Sun Mar 12 03:58:54 2017 (r315106) +++ head/usr.bin/diff/diffreg.c Sun Mar 12 04:04:16 2017 (r315107) @@ -200,7 +200,7 @@ static void range(int, int, const char static void uni_range(int, int); static void dump_context_vec(FILE *, FILE *, int); static void dump_unified_vec(FILE *, FILE *, int); -static void prepare(int, FILE *, off_t, int); +static void prepare(int, FILE *, size_t, int); static void prune(void); static void equiv(struct line *, int, struct line *, int, int *); static void unravel(int); @@ -315,6 +315,8 @@ diffreg(char *file1, char *file2, int fl struct kevent *e; cap_rights_t rights_ro; + e = NULL; + kq = -1; f1 = f2 = NULL; rval = D_SAME; anychange = 0; @@ -474,7 +476,7 @@ diffreg(char *file1, char *file2, int fl ixnew = xreallocarray(ixnew, len[1] + 2, sizeof(*ixnew)); check(f1, f2, flags); output(file1, f1, file2, f2, flags); - if (ostdout != -1) { + if (ostdout != -1 && e != NULL) { /* close the pipe to pr and restore stdout */ int wstatus; @@ -555,7 +557,7 @@ splice(char *dir, char *path) } static void -prepare(int i, FILE *fd, off_t filesize, int flags) +prepare(int i, FILE *fd, size_t filesize, int flags) { struct line *p; int h; From owner-svn-src-head@freebsd.org Sun Mar 12 04:05:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61C65D08D6C; Sun, 12 Mar 2017 04:05:45 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x241.google.com (mail-pg0-x241.google.com [IPv6:2607:f8b0:400e:c05::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2F6CC1470; Sun, 12 Mar 2017 04:05:45 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x241.google.com with SMTP id b5so14588092pgg.1; Sat, 11 Mar 2017 20:05:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=JIuvlzmuvNoqbz4lpUWUV03El5zKJXoLKdyQ0VYbDU0=; b=FWYqZM78IpJhxR+4EpKtz2Zj4xdhlafQZjI5sJKxnHXMY46ww8xzVtZ2pxi1Zpm4gZ pQdnmsKrET7GRLYDnPcNOwvqw6cwp/dbCiAGWQU3HelQAnbENqU9kTHVCVHOXRAva8GU B8LIAKOgcZ4QJUhh5A3bl9oCxQ7kO+ngFYU/DsLMWjnLilh34sM57Bkb995Ziro/kOww pwx4IIphYdLCnvFy8PCwP9ttDlu84wtk/NTidZ9OtyYeI7Wihlt8FTtrRQmYnXtcut22 HXu/JWsC1+iQbj6eJ7m8EtBwdqxiHm/NoSuZ8HAP3g1xJATzSBmOWUBIOQjxarrP7Qg0 rhdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=JIuvlzmuvNoqbz4lpUWUV03El5zKJXoLKdyQ0VYbDU0=; b=LSjpeVOMjF5oCBojAJZHvvcJpFbr7Q52BuQidH91SkIcKUPB9SdoVmNX402HyZ5WWb a6Qxsj4MEaR13xYB21TY00Z6WfMoxy6izja9PE4xxg0bT/NRHhaDlXTLLo2N/LXfC117 cMMQbd6PBGrWcCFfytRGMVqb8iWTwx3KB4e4oQmbnSrhL6cVK0a8OCAvrV8Hhr7wOEd5 cF/pauxzdTyJvuep0bJ5fioIRNekTOj3VsB9+uslmoPT3GUsSIk1eDgn14CDOT8bVgUW K4aTT3IAIjbPNCCIjinXYD+0LOVdGiFMrzl16uUT3hP9XfwL0XX1+2gnt7zDAGnSaPnD A/iw== X-Gm-Message-State: AMke39nE4Oz4eALae16ja3RrryvywbF98U8dB2uN+6uM4Q0y+8iQMoW99WBNReocTWZVwQ== X-Received: by 10.99.173.69 with SMTP id y5mr29415856pgo.35.1489291544550; Sat, 11 Mar 2017 20:05:44 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id 15sm26594962pgh.21.2017.03.11.20.05.43 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 11 Mar 2017 20:05:43 -0800 (PST) Subject: Re: svn commit: r315107 - head/usr.bin/diff Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_99C629C9-58E2-4D3F-AC54-01FB88CB34BC"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201703120404.v2C44GZZ033087@repo.freebsd.org> Date: Sat, 11 Mar 2017 20:05:42 -0800 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201703120404.v2C44GZZ033087@repo.freebsd.org> To: Baptiste Daroussin X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 04:05:45 -0000 --Apple-Mail=_99C629C9-58E2-4D3F-AC54-01FB88CB34BC Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Mar 11, 2017, at 20:04, Baptiste Daroussin = wrote: >=20 > Author: bapt > Date: Sun Mar 12 04:04:16 2017 > New Revision: 315107 > URL: https://svnweb.freebsd.org/changeset/base/315107 >=20 > Log: > Fix building with recent gcc >=20 > Reported by: lwhsu, ngie Technically, gcc 4.2.1 was broken as well, as I saw with make = tinderbox TARGET=3Dpowerpc TARGET_ARCH=3Dpowerpc :/. Thanks for the quick fix! -Ngie /scratch/tmp/ngie/svn/usr.bin/diff/diffdir.c: In function 'diffdir': /scratch/tmp/ngie/svn/usr.bin/diff/diffdir.c:55: warning: 'edp2' may be = used uninitialized in this function /scratch/tmp/ngie/svn/usr.bin/diff/diffdir.c:54: warning: 'edp1' may be = used uninitialized in this function --Apple-Mail=_99C629C9-58E2-4D3F-AC54-01FB88CB34BC Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYxMkXAAoJEPWDqSZpMIYVpmMP/A1clDp/XLOhyz5MD2s6cnC6 XN0MFfOI9IS16M94cpypss0d/9kKBvUKcl5ToVj2Oc3m6PQ4slX64bqqh9Wjiauy iRxabYR3lr3Mr7MuWr4UzzvKI+qD/M+kYGFRILduhNZg16iDGyFAT1hUjGGfuWR9 0jsrgTjQ6Y1go1MNw0nxdQt+4BZQKxc5ZpYNdo12vIR70Uc9y6Z8OWB8JY4ZWJYn ZHtfZhXJyb24aErdK4wVAvVpt6wh/yVzR+a489KIpRi3t64xepJ9icIulSrecLmi 3OmwbyaO1jr/WGMD9Zrpqe11+yY+CrXivEQh66TlSbwPIMwS/iMukky9teJ1MA0U IqEz7jbbTsdS4HXQHPm+5JYLuMepuGV3MkVSHKBo30dYAZ/Pgyd6E5xYCzvN1viv 1fRtTt/RMLJxdavko7FVDrU+59uYvYzzUUrW9i7oO7EdE6WMA8FzOkWjMaN1exxv 2E1YgyBCbAugM54b1zQGJpYiD1mDl5CddoR9X8vze/2Kbgyhtn3KXnXlzz0zgsXY 3765hu2UOBm5eQN8psQAJWK6uE8GWQIsN78aDsY1O/nW4uYnlKAhZyYIvMAUYw19 NB1fxvqDJwwsAQS1DV+LTfAVvAdzeTlBfnesqvrgZuSktKPYfUaTTUegWCNidrOm m7gZCt1Ky+6lMqE9RroZ =qwKM -----END PGP SIGNATURE----- --Apple-Mail=_99C629C9-58E2-4D3F-AC54-01FB88CB34BC-- From owner-svn-src-head@freebsd.org Sun Mar 12 04:08:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 286A3D08E07; Sun, 12 Mar 2017 04:08:38 +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 mx1.freebsd.org (Postfix) with ESMTPS id E9A1E1608; Sun, 12 Mar 2017 04:08:37 +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 v2C48bAr033263; Sun, 12 Mar 2017 04:08:37 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2C48adc033262; Sun, 12 Mar 2017 04:08:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703120408.v2C48adc033262@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 12 Mar 2017 04:08:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315108 - head/usr.bin/xinstall/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 04:08:38 -0000 Author: ngie Date: Sun Mar 12 04:08:36 2017 New Revision: 315108 URL: https://svnweb.freebsd.org/changeset/base/315108 Log: Restore some of the error message text accidentally removed in r315098 "unexpected symlink contents" is more pedantically correct than "unexpected symlink". MFC after: 1 week X-MFC with: r315098 Sponsored by: Dell EMC Isilon Modified: head/usr.bin/xinstall/tests/install_test.sh Modified: head/usr.bin/xinstall/tests/install_test.sh ============================================================================== --- head/usr.bin/xinstall/tests/install_test.sh Sun Mar 12 04:04:16 2017 (r315107) +++ head/usr.bin/xinstall/tests/install_test.sh Sun Mar 12 04:08:36 2017 (r315108) @@ -286,7 +286,7 @@ symbolic_link_absolute_body() { copyf_path=$(readlink copyf) testf_path="$(pwd -P)/testf" if [ "$copyf_path" != "$testf_path" ]; then - atf_fail "unexpected symlink ('$copyf_path' != '$testf_path')" + atf_fail "unexpected symlink contents ('$copyf_path' != '$testf_path')" fi } @@ -299,7 +299,7 @@ symbolic_link_relative_body() { copyf_path=$(readlink copyf) testf_path="testf" if [ "$copyf_path" != "$testf_path" ]; then - atf_fail "unexpected symlink ('$copyf_path' != '$testf_path')" + atf_fail "unexpected symlink contents ('$copyf_path' != '$testf_path')" fi } From owner-svn-src-head@freebsd.org Sun Mar 12 04:14:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41657D091B1; Sun, 12 Mar 2017 04:14:23 +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 mx1.freebsd.org (Postfix) with ESMTPS id 0E68E1D3E; Sun, 12 Mar 2017 04:14: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 v2C4EMmq037258; Sun, 12 Mar 2017 04:14:22 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2C4EM0e037257; Sun, 12 Mar 2017 04:14:22 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703120414.v2C4EM0e037257@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 12 Mar 2017 04:14:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315111 - head/tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 04:14:23 -0000 Author: ngie Date: Sun Mar 12 04:14:21 2017 New Revision: 315111 URL: https://svnweb.freebsd.org/changeset/base/315111 Log: Remove /rescue/iscsictl and /rescue/iscsid if MK_ISCSI == no MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Mar 12 04:12:41 2017 (r315110) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Mar 12 04:14:21 2017 (r315111) @@ -3444,6 +3444,8 @@ OLD_FILES+=usr/share/man/man8/natd.8.gz .if ${MK_ISCSI} == no OLD_FILES+=etc/rc.d/iscsictl OLD_FILES+=etc/rc.d/iscsid +OLD_FILES+=rescue/iscsictl +OLD_FILES+=rescue/iscsid OLD_FILES+=sbin/iscontrol OLD_FILES+=usr/bin/iscsictl OLD_FILES+=usr/sbin/iscsid From owner-svn-src-head@freebsd.org Sun Mar 12 04:15:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 806A6D0921A; Sun, 12 Mar 2017 04:15:57 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 5B06F1E8F; Sun, 12 Mar 2017 04:15:57 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2C4Fu2Y037361; Sun, 12 Mar 2017 04:15:56 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2C4Fuiq037358; Sun, 12 Mar 2017 04:15:56 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201703120415.v2C4Fuiq037358@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Sun, 12 Mar 2017 04:15:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315112 - in head: sbin/geom/class/label sys/geom/part X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 04:15:57 -0000 Author: araujo Date: Sun Mar 12 04:15:56 2017 New Revision: 315112 URL: https://svnweb.freebsd.org/changeset/base/315112 Log: Add the capability to refresh the gpart(8) label without need a reboot. gpart(8) has functionality to change the label of an GPT partition. This functionality works like it should, however, after a label change the /dev/gpt/ entries remain unchanged. glabel(8) status output remains unchanged. The change only takes effect after a reboot. PR: 162690 Submitted by: sub.mesa@gmail, Ben RUBSON , ae Reviewed by: allanjude, bapt, bcr MFC after: 6 weeks. Differential Revision: https://reviews.freebsd.org/D9935 Modified: head/sbin/geom/class/label/geom_label.c head/sbin/geom/class/label/glabel.8 head/sys/geom/part/g_part.c Modified: head/sbin/geom/class/label/geom_label.c ============================================================================== --- head/sbin/geom/class/label/geom_label.c Sun Mar 12 04:14:21 2017 (r315111) +++ head/sbin/geom/class/label/geom_label.c Sun Mar 12 04:15:56 2017 (r315112) @@ -53,6 +53,7 @@ static void label_main(struct gctl_req * static void label_clear(struct gctl_req *req); static void label_dump(struct gctl_req *req); static void label_label(struct gctl_req *req); +static void label_refresh(struct gctl_req *req); struct g_command PUBSYM(class_commands)[] = { { "clear", G_FLAG_VERBOSE, label_main, G_NULL_OPTS, @@ -74,6 +75,9 @@ struct g_command PUBSYM(class_commands)[ { "label", G_FLAG_VERBOSE | G_FLAG_LOADKLD, label_main, G_NULL_OPTS, "[-v] name dev" }, + { "refresh", 0, label_main, G_NULL_OPTS, + "dev ..." + }, { "stop", G_FLAG_VERBOSE, NULL, { { 'f', "force", NULL, G_TYPE_BOOL }, @@ -105,6 +109,8 @@ label_main(struct gctl_req *req, unsigne label_clear(req); else if (strcmp(name, "dump") == 0) label_dump(req); + else if (strcmp(name, "refresh") == 0) + label_refresh(req); else gctl_error(req, "Unknown command: %s.", name); } @@ -223,3 +229,28 @@ label_dump(struct gctl_req *req) printf("\n"); } } + +static void +label_refresh(struct gctl_req *req) +{ + const char *name; + int i, nargs, fd; + + nargs = gctl_get_int(req, "nargs"); + if (nargs < 1) { + gctl_error(req, "Too few arguments."); + return; + } + + for (i = 0; i < nargs; i++) { + name = gctl_get_ascii(req, "arg%d", i); + fd = g_open(name, 1); + if (fd == -1) { + printf("Can't refresh metadata from %s: %s.\n", + name, strerror(errno)); + } else { + printf("Metadata from %s refreshed.\n", name); + (void)g_close(fd); + } + } +} Modified: head/sbin/geom/class/label/glabel.8 ============================================================================== --- head/sbin/geom/class/label/glabel.8 Sun Mar 12 04:14:21 2017 (r315111) +++ head/sbin/geom/class/label/glabel.8 Sun Mar 12 04:15:56 2017 (r315112) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 22, 2013 +.Dd March 12, 2017 .Dt GLABEL 8 .Os .Sh NAME @@ -57,6 +57,9 @@ .Cm dump .Ar dev ... .Nm +.Cm refresh +.Ar dev ... +.Nm .Cm list .Nm .Cm status @@ -186,6 +189,8 @@ Same as Clear metadata on the given devices. .It Cm dump Dump metadata stored on the given devices. +.It Cm refresh +Refresh / rediscover metadata from the given devices. .It Cm list See .Xr geom 8 . Modified: head/sys/geom/part/g_part.c ============================================================================== --- head/sys/geom/part/g_part.c Sun Mar 12 04:14:21 2017 (r315111) +++ head/sys/geom/part/g_part.c Sun Mar 12 04:15:56 2017 (r315112) @@ -888,6 +888,10 @@ g_part_ctl_commit(struct gctl_req *req, LIST_FOREACH_SAFE(entry, &table->gpt_entry, gpe_entry, tmp) { if (!entry->gpe_deleted) { + /* Notify consumers that provider might be changed. */ + if (entry->gpe_modified && ( + entry->gpe_pp->acw + entry->gpe_pp->ace) == 0) + g_media_changed(entry->gpe_pp, 0); entry->gpe_created = 0; entry->gpe_modified = 0; continue; From owner-svn-src-head@freebsd.org Sun Mar 12 04:24:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4EA48D094D7; Sun, 12 Mar 2017 04:24:31 +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 mx1.freebsd.org (Postfix) with ESMTPS id 05CD41436; Sun, 12 Mar 2017 04:24:30 +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 v2C4OUeK041409; Sun, 12 Mar 2017 04:24:30 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2C4OU3m041407; Sun, 12 Mar 2017 04:24:30 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703120424.v2C4OU3m041407@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 12 Mar 2017 04:24:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315113 - in head: rescue/rescue tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 04:24:31 -0000 Author: ngie Date: Sun Mar 12 04:24:29 2017 New Revision: 315113 URL: https://svnweb.freebsd.org/changeset/base/315113 Log: Conditionally compile [additional] programs into rescue(8) if requested Trivial oversight missed in r314240 cleanup because I enable these knobs on my test machines. MK_INET6_SUPPORT - rtsol MK_NETCAT - nc MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/rescue/rescue/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/rescue/rescue/Makefile ============================================================================== --- head/rescue/rescue/Makefile Sun Mar 12 04:15:56 2017 (r315112) +++ head/rescue/rescue/Makefile Sun Mar 12 04:24:29 2017 (r315113) @@ -98,7 +98,7 @@ CRUNCH_PROGS_sbin= badsect \ mount_msdosfs mount_nfs mount_nullfs \ mount_udf mount_unionfs newfs \ newfs_msdos nos-tun ping reboot \ - restore rcorder route rtsol savecore \ + restore rcorder route savecore \ shutdown spppcontrol swapon sysctl tunefs umount .if ${MK_ATM} != "no" @@ -111,6 +111,7 @@ CRUNCH_PROGS_sbin+= ccdconfig .if ${MK_INET6_SUPPORT} != "no" CRUNCH_PROGS_sbin+= ping6 +CRUNCH_PROGS_sbin+= rtsol .endif .if ${MK_IPFILTER} != "no" @@ -186,7 +187,7 @@ CRUNCH_BUILDOPTS_dhclient= -DRELEASE_CRU # CRUNCH_SRCDIRS+= usr.bin -CRUNCH_PROGS_usr.bin= head mt nc sed tail tee +CRUNCH_PROGS_usr.bin= head mt sed tail tee CRUNCH_PROGS_usr.bin+= gzip CRUNCH_ALIAS_gzip= gunzip gzcat zcat @@ -208,6 +209,10 @@ CRUNCH_LIBS+= -lcrypto .endif CRUNCH_LIBS+= -lmd +.if ${MK_NETCAT} != "no" +CRUNCH_PROGS_usr.bin= nc +.endif + .if ${MK_VI} != "no" CRUNCH_PROGS_usr.bin+= vi CRUNCH_ALIAS_vi= ex Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Mar 12 04:15:56 2017 (r315112) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Mar 12 04:24:29 2017 (r315113) @@ -3338,6 +3338,7 @@ OLD_FILES+=usr/share/man/man8/traceroute .if ${MK_INET6_SUPPORT} == no OLD_FILES+=rescue/ping6 +OLD_FILES+=rescue/rtsol .endif .if ${MK_INETD} == no @@ -6682,6 +6683,7 @@ OLD_FILES+=usr/share/misc/windrv_stub.c .endif .if ${MK_NETCAT} == no +OLD_FILES+=rescue/nc OLD_FILES+=usr/bin/nc OLD_FILES+=usr/share/man/man1/nc.1.gz .endif From owner-svn-src-head@freebsd.org Sun Mar 12 04:28:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A81DD095F4; Sun, 12 Mar 2017 04:28: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 mx1.freebsd.org (Postfix) with ESMTPS id 2A1F61703; Sun, 12 Mar 2017 04:28: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 v2C4SjsS041756; Sun, 12 Mar 2017 04:28:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2C4SjiW041755; Sun, 12 Mar 2017 04:28:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703120428.v2C4SjiW041755@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 12 Mar 2017 04:28:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315114 - head/tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 04:28:46 -0000 Author: ngie Date: Sun Mar 12 04:28:45 2017 New Revision: 315114 URL: https://svnweb.freebsd.org/changeset/base/315114 Log: Remove /rescue/zdb if MK_ZFS == no Missed in r202452. MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Mar 12 04:24:29 2017 (r315113) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Mar 12 04:28:45 2017 (r315114) @@ -1311,6 +1311,7 @@ OLD_FILES+=etc/periodic/daily/800.scrub- OLD_LIBS+=lib/libzfs.so.2 OLD_LIBS+=lib/libzfs_core.so.2 OLD_LIBS+=lib/libzpool.so.2 +OLD_FILES+=rescue/zdb OLD_FILES+=rescue/zfs OLD_FILES+=rescue/zpool OLD_FILES+=sbin/zfs From owner-svn-src-head@freebsd.org Sun Mar 12 04:36:17 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40448D0989F; Sun, 12 Mar 2017 04:36:17 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 133271F32; Sun, 12 Mar 2017 04:36:17 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by freefall.freebsd.org (Postfix, from userid 1235) id 531733DA2; Sun, 12 Mar 2017 04:36:16 +0000 (UTC) Date: Sun, 12 Mar 2017 05:36:16 +0100 From: Baptiste Daroussin To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Cc: "Bjoern A. Zeeb" , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Li-Wen Hsu Subject: Re: svn commit: r308996 - head/lib/libfetch Message-ID: <20170312043615.ax5a6xtuf2zmebc2@ivaldir.net> References: <201611221330.uAMDU7fg052989@repo.freebsd.org> <77B1B45A-D837-4853-B1E9-958D3B0DD519@lists.zabbadoz.net> <867f468rx5.fsf@desk.des.no> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="g2vx6qbgkf4owmri" Content-Disposition: inline In-Reply-To: <867f468rx5.fsf@desk.des.no> User-Agent: NeoMutt/20170225 (1.8.0) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 04:36:17 -0000 --g2vx6qbgkf4owmri Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 03, 2017 at 01:29:26PM +0100, Dag-Erling Sm=C3=B8rgrav wrote: > "Bjoern A. Zeeb" writes: > > Dag-Erling Sm=C3=B8rgrav writes: > >> + /* split address if necessary */ > >> + err =3D EAI_SYSTEM; > >> + if ((sep =3D strchr(addr, ':')) !=3D NULL) { > >> + len =3D snprintf(hbuf, sizeof(hbuf), > >> + "%.*s", (int)(sep - addr), addr); > > I believe this code is what broke > > fetch http://[::1]:6666/ > > just to give an example; and the printf traces will not reveal this > > but =E2=80=9Caddr=E2=80=9D at this point has no more addr:port in it gi= ven the > > function arguments, right? >=20 > I think you're right, I'll look into it. It means replacing strchr() > with a loop. Is there a ticket for this bug, and if not, could you > please open one? >=20 This causes breakage on the cluster for everything using libfetch: On the jenkins cluster we cannot run anymore fetch inside i386 chroots # chroot ufs fetch -v http://pkg.freebsd.org resolving server address: pkg.freebsd.org:80 fetch: http://pkg.freebsd.org: Non-recoverable resolver failure What is specific is the host only have ipv6 is amd64 and the chroot is i386 I can't figure out the issue can you have a look? Best regards, Bapt --g2vx6qbgkf4owmri Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAljE0DwACgkQY4mL3PG3 PloCVBAAqg1bx98kzoBl0nkt0kn5//jKwvw8y5IBVgqO6kmloihvoMItx3JGeGrr c2UQ9FXyaHI5zpyUBlp5hQnf7KrLKAoqjegqsqqf3maf6eJQBD8L2xfmys50fNjp 7E9xI7vQ3T8jB+CQS3t4oAXRiCGb9Ic3a8bN3vKubA3Ib4Ce4L89e0KHV3p8W3M/ vOJ+2ou9EA9n/2DRW5KcrVCjfdtN0KRf+Lz7zJ5trBJ45sjMPwUI8qDkjUakl+35 YllESg4YyorAyh4+2IVEJP1MBXMO25R5aqNgfGaEKAKc+Td2f5xDvZBDmMORAblY p7CQvF8kPCGLNN4SJm+5BQkKpPfT0GrUgK0mcS4oiVuCawxo5qXnKF2h5I4e5LwK 5UyuHxwm6wBFIu1Xg6MjDkPep7oABuHYmVHAWHmik2H2fm6Q3OnVe+VzUzwmQYh4 zn3oHU5WIssmDNtfkOCU4w5pS6NuoO1Iv+ZIGzOdcxodO/fRxhez7fxpMdQGqDBG 8791VAy56OsVj/qP/bEpHH+dsLc9cM1eyxDrkeFYbxFuG0sW+vrr99HZjDrym6Ru vIxfBHHi95IQN1VIc2VzhE+lcUEZVpuppGyk/VrLok2lBbi3NJOp/y6izmuXAFWH hkKl+uaN5ji4HcoztclHcGifjdB/bAh9z87KEhFHywIg4mYjfA8= =J3yS -----END PGP SIGNATURE----- --g2vx6qbgkf4owmri-- From owner-svn-src-head@freebsd.org Sun Mar 12 04:46:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1DE5D09C5A; Sun, 12 Mar 2017 04:46:18 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x241.google.com (mail-pf0-x241.google.com [IPv6:2607:f8b0:400e:c00::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A42ED1892; Sun, 12 Mar 2017 04:46:18 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x241.google.com with SMTP id o126so15357710pfb.1; Sat, 11 Mar 2017 20:46:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=sOPMdydurtUWTYRfkdW1S24IA3FbStDkhZ3l3bt56yo=; b=thKGU37cTW/EyR/eURdBEB+1FRbmUjk9VsZ7DDBsUUHBsrXkzOohfZLdsdtXFtR6I+ QcEjRBZX5MGuE/z63+SEwBXweumMBULJN8GQ2JY4HyHdOHXaOQNjI49i7MrM9ZA0rtoP /KO+kPtWbd9k015pVKbAL4hnBcrQpVUNprMm2EBsx14PiSKDvmlMGwEXenYug23CpZHQ U2B1ji3O+uhB4VXgMJCbRr5eOmFKAjydwPuKFzWyfKA+Xt52WTy2JPTzOkOeR/XQ20XJ hdBThbYele6QJqR7oA3qGzx1SxMThvwk7ZjK/Rsqa7yjMZldpxPVndofFrr5gpAnGWLB 2VUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=sOPMdydurtUWTYRfkdW1S24IA3FbStDkhZ3l3bt56yo=; b=PF3SoUOSA6mlyc40CsG2uU9torFZG7/uUtaat5+naVekU7pS7W7KRHyRIvbcCbirGD vbBFUecSL/n0uI/h0dr9UIEVdN/Aa8/odUzpkSWeag6g9C/pMhK+bvUee0ig5jFMORSF h6vjBohy4QTflYxRUSZet5v4WmUyLQh5/+G3o5j2VjjxixtoeG6NjRLiyNfJXnGFx0C0 Sh2MdumkFHbhnC6d/9Es52WSKajen2gf3BFL+2LB1eDYl1CPGUeZEvSmFT0S5rW07v2i 1Y2Jb738chQBNq6ZTJ/pepXpePE27AVMO53OzHRbC7JFa/63nmcb6Th4lJ5GIdtv7Hxl En+Q== X-Gm-Message-State: AMke39l3vXKSRsafQdQ94oVCE8Tnrr6H+NJ7F5s6COg9lJRniZ09SoZIOpBSUjYnj1i89Q== X-Received: by 10.99.225.5 with SMTP id z5mr28966171pgh.145.1489293978052; Sat, 11 Mar 2017 20:46:18 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id d3sm26579782pfc.51.2017.03.11.20.46.17 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 11 Mar 2017 20:46:17 -0800 (PST) Subject: Re: svn commit: r308996 - head/lib/libfetch Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_D5E517D9-231F-4316-98E0-B939EF01E241"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201611221330.uAMDU7fg052989@repo.freebsd.org> Date: Sat, 11 Mar 2017 20:46:16 -0800 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <93505FD7-FB42-4BD5-834C-6F73EFD9B1CF@gmail.com> References: <201611221330.uAMDU7fg052989@repo.freebsd.org> To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 04:46:19 -0000 --Apple-Mail=_D5E517D9-231F-4316-98E0-B939EF01E241 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Nov 22, 2016, at 05:30, Dag-Erling Sm=C3=B8rgrav = wrote: >=20 > Author: des > Date: Tue Nov 22 13:30:07 2016 > New Revision: 308996 > URL: https://svnweb.freebsd.org/changeset/base/308996 >=20 > Log: > Refactor fetch_connect() and fetch_bind() to improve readability and = avoid > repeating the same DNS lookups. >=20 > MFC after: 3 weeks >=20 > Modified: > head/lib/libfetch/common.c > head/lib/libfetch/common.h > head/lib/libfetch/ftp.c >=20 > Modified: head/lib/libfetch/common.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/lib/libfetch/common.c Tue Nov 22 13:24:57 2016 = (r308995) > +++ head/lib/libfetch/common.c Tue Nov 22 13:30:07 2016 = (r308996) > @@ -1,5 +1,5 @@ > /*- > - * Copyright (c) 1998-2014 Dag-Erling Sm=C3=B8rgrav > + * Copyright (c) 1998-2016 Dag-Erling Sm=C3=B8rgrav > * Copyright (c) 2013 Michael Gmelin > * All rights reserved. > * > @@ -241,27 +241,83 @@ fetch_ref(conn_t *conn) >=20 >=20 > /* > + * Resolve an address > + */ > +struct addrinfo * > +fetch_resolve(const char *addr, int port, int af) > +{ > + char hbuf[256], sbuf[8]; > + struct addrinfo hints, *res; > + const char *sep, *host, *service; > + int err, len; > + > + /* split address if necessary */ > + err =3D EAI_SYSTEM; > + if ((sep =3D strchr(addr, ':')) !=3D NULL) { Hi Bjoern, Shouldn=E2=80=99t this be strrchr instead of strchr since = you=E2=80=99re scanning for the service from the right side of the host, = e.g. =E2=80=9Cfoo:service=E2=80=9D or =E2=80=9C[::1]:service=E2=80=9D? = This code would match index 3 in the first example, but it would match = index 2 in the second example. Thanks, -Ngie --Apple-Mail=_D5E517D9-231F-4316-98E0-B939EF01E241 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYxNKYAAoJEPWDqSZpMIYV3J0QALZxTlr5dYE2gmWTfsURk/Py nUPfo5voDiFEZPDtkQZ1uXL5cydYirByBZxRDTFLqOxzSfaro5xLC512w4aOD5Fv LL4GyH+nVYLfEi4Wo3j7JxR81QMCDpVgGFCuk5cA1c3yvV7v0F8hAfDhNekMEY6k nkO7gUmAL3pOW7NSjeotI8/kVal0nKRVvkg3+QlLbHZixNhThXuhLgIZSaYOjEan 1fUmEyHdGRuzCp7DELjXEvElCaycZe7jSEWHDJydw2VJvVYb3RQQv8nHuGmA3yq9 tvUagd5wd+sCy4l9hXanrzuZs7D8O5MHvQXCUoH/rMUKtjfOs7l9AZdpWf9wFmz9 NmHL0BMxrbRJ+UN/N6eH+dqK8j9YuV8G+b+5C0S2e3llY+pnyGNnAcv2h/ouWgUy H6zrrJJHU/ZNP28QtEvgYVedWHQprTLVmfah5I9evQ723kL6mNtmRCZVTgx+IfoB VvwVITru8DcYs63B5IU4B09bnguIg4MtnHpMIIu5f36CibfBGFV+kUzvsgiVqZGY 4IgXqByjDFUL8DwGlTEOZiU0z+z3KfETCw23XpWCmPRPnyY6nJxitL4UpuPBUQGj aLj+Xojq2jiSC7/mgmxO/WSRf0h/tQxcDnEa3C2CKcn4DIP6z8aF1fyo+njJDHsu o1djBBUk1kk188glJp3b =lVHI -----END PGP SIGNATURE----- --Apple-Mail=_D5E517D9-231F-4316-98E0-B939EF01E241-- From owner-svn-src-head@freebsd.org Sun Mar 12 05:00:05 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B4FAD0836F; Sun, 12 Mar 2017 05:00:05 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B3021B6D; Sun, 12 Mar 2017 05:00:05 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2C504e9055296; Sun, 12 Mar 2017 05:00:04 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2C504fH055295; Sun, 12 Mar 2017 05:00:04 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201703120500.v2C504fH055295@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sun, 12 Mar 2017 05:00:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315131 - head/sys/netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 05:00:05 -0000 Author: kp Date: Sun Mar 12 05:00:04 2017 New Revision: 315131 URL: https://svnweb.freebsd.org/changeset/base/315131 Log: pf: Do not lose the VNET lock when ending the purge thread When the pf_purge_thread() exits it must make sure to release the VNET_LIST_RLOCK it still holds. kproc_exit() does not return. Modified: head/sys/netpfil/pf/pf.c Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Sun Mar 12 04:59:02 2017 (r315130) +++ head/sys/netpfil/pf/pf.c Sun Mar 12 05:00:04 2017 (r315131) @@ -1440,6 +1440,7 @@ pf_purge_thread(void *unused __unused) if (pf_end_threads) { pf_end_threads++; wakeup(pf_purge_thread); + VNET_LIST_RUNLOCK(); kproc_exit(0); } From owner-svn-src-head@freebsd.org Sun Mar 12 05:07:35 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64551D08829; Sun, 12 Mar 2017 05:07:35 +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 mx1.freebsd.org (Postfix) with ESMTPS id 11F2E101D; Sun, 12 Mar 2017 05:07:34 +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 v2C57Yr9059279; Sun, 12 Mar 2017 05:07:34 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2C57Ysa059278; Sun, 12 Mar 2017 05:07:34 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703120507.v2C57Ysa059278@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 12 Mar 2017 05:07:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315132 - head/lib/libcam X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 05:07:35 -0000 Author: ngie Date: Sun Mar 12 05:07:33 2017 New Revision: 315132 URL: https://svnweb.freebsd.org/changeset/base/315132 Log: Use .Dv when referencing NULL This is the correct markup macro, as opposed to .Va (variable names) While here, annotate several bare references to `NULL` with .Dv. MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/lib/libcam/cam.3 Modified: head/lib/libcam/cam.3 ============================================================================== --- head/lib/libcam/cam.3 Sun Mar 12 05:00:04 2017 (r315131) +++ head/lib/libcam/cam.3 Sun Mar 12 05:07:33 2017 (r315132) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 10, 1998 +.Dd March 11, 2017 .Dt CAM 3 .Os .Sh NAME @@ -208,7 +208,7 @@ structure. If the .Ar device argument is -.Va NULL , +.Dv NULL , .Fn cam_open_spec_device will allocate space for the .Va cam_device @@ -258,7 +258,9 @@ argument, as with .Fn cam_open_spec_device and .Fn cam_open_btl , -should be NULL if the user wants the CAM library to allocate space for the +should be +.Dv NULL +if the user wants the CAM library to allocate space for the .Va cam_device structure. .Fn cam_close_device @@ -365,11 +367,14 @@ and .Fn cam_open_pass return a pointer to a .Va cam_device -structure, or NULL if there was an error. +structure, or +.Dv NULL +if there was an error. .Pp .Fn cam_getccb -returns an allocated and partially initialized CCB, or NULL if allocation -of the CCB failed. +returns an allocated and partially initialized CCB, or +.Dv NULL +if allocation of the CCB failed. .Pp .Fn cam_send_ccb returns a value of -1 if an error occurred, and @@ -386,7 +391,9 @@ that is passed into .Fn cam_device_dup returns a copy of the .Va device -passed in, or NULL if an error occurred. +passed in, or +.Dv NULL +if an error occurred. .Pp .Fn cam_get_device returns 0 for success, and -1 to indicate failure. From owner-svn-src-head@freebsd.org Sun Mar 12 05:20:50 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA3ADD08ADE; Sun, 12 Mar 2017 05:20:50 +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 mx1.freebsd.org (Postfix) with ESMTPS id B070B1637; Sun, 12 Mar 2017 05:20:50 +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 v2C5KnKw063482; Sun, 12 Mar 2017 05:20:49 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2C5KnPW063481; Sun, 12 Mar 2017 05:20:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703120520.v2C5KnPW063481@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 12 Mar 2017 05:20:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315133 - head/lib/libcam X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 05:20:51 -0000 Author: ngie Date: Sun Mar 12 05:20:49 2017 New Revision: 315133 URL: https://svnweb.freebsd.org/changeset/base/315133 Log: lib/libcam/cam.3: fix manpage warnings - spelling: "mis-named" should be "misnamed". - delete spaces interspersed in literal representation of `struct cam_device` as hard-tabs separate the types and fields. - Add commas after `e.g.`. Reported by: igor MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/lib/libcam/cam.3 Modified: head/lib/libcam/cam.3 ============================================================================== --- head/lib/libcam/cam.3 Sun Mar 12 05:07:33 2017 (r315132) +++ head/lib/libcam/cam.3 Sun Mar 12 05:20:49 2017 (r315133) @@ -132,7 +132,7 @@ Many of the CAM library functions use th structure: .Bd -literal struct cam_device { - char device_path[MAXPATHLEN+1];/* + char device_path[MAXPATHLEN+1];/* * Pathname of the * device given by the * user. This may be @@ -151,7 +151,7 @@ struct cam_device { */ char device_name[DEV_IDLEN+1];/* * Name of the device, - * e.g. 'pass' + * e.g., 'pass' */ uint32_t dev_unit_num; /* Unit number of the passthrough * device associated with this @@ -159,7 +159,7 @@ struct cam_device { */ char sim_name[SIM_IDLEN+1];/* - * Controller name, e.g.'ahc' + * Controller name, e.g., 'ahc' */ uint32_t sim_unit_number; /* Controller unit number */ uint32_t bus_id; /* Controller bus number */ @@ -429,4 +429,4 @@ require a definitive way to identify a d .Xr pass 4 device. .Pp -Some of the functions are possibly mis-named or poorly named. +Some of the functions are possibly misnamed or poorly named. From owner-svn-src-head@freebsd.org Sun Mar 12 05:42:58 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85863CF9430; Sun, 12 Mar 2017 05:42:58 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 52C5F143B; Sun, 12 Mar 2017 05:42:58 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2C5gvWg075393; Sun, 12 Mar 2017 05:42:57 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2C5gvM4075391; Sun, 12 Mar 2017 05:42:57 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201703120542.v2C5gvM4075391@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sun, 12 Mar 2017 05:42:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315136 - head/sys/netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 05:42:58 -0000 Author: kp Date: Sun Mar 12 05:42:57 2017 New Revision: 315136 URL: https://svnweb.freebsd.org/changeset/base/315136 Log: pf: Fix incorrect rw_sleep() in pf_unload() When we unload we don't hold the pf_rules_lock, so we cannot call rw_sleep() with it, because it would release a lock we do not hold. There's no need for the lock either, so we can just tsleep(). While here also make the same change in pf_purge_thread(), because it explicitly takes the lock before rw_sleep() and then immediately releases it afterwards. Modified: head/sys/netpfil/pf/pf.c head/sys/netpfil/pf/pf_ioctl.c Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Sun Mar 12 05:36:31 2017 (r315135) +++ head/sys/netpfil/pf/pf.c Sun Mar 12 05:42:57 2017 (r315136) @@ -1429,9 +1429,7 @@ pf_purge_thread(void *unused __unused) u_int idx = 0; for (;;) { - PF_RULES_RLOCK(); - rw_sleep(pf_purge_thread, &pf_rules_lock, 0, "pftm", hz / 10); - PF_RULES_RUNLOCK(); + tsleep(pf_purge_thread, 0, "pftm", hz / 10); VNET_LIST_RLOCK(); VNET_FOREACH(vnet_iter) { Modified: head/sys/netpfil/pf/pf_ioctl.c ============================================================================== --- head/sys/netpfil/pf/pf_ioctl.c Sun Mar 12 05:36:31 2017 (r315135) +++ head/sys/netpfil/pf/pf_ioctl.c Sun Mar 12 05:42:57 2017 (r315136) @@ -3791,7 +3791,7 @@ pf_unload(void) pf_end_threads = 1; while (pf_end_threads < 2) { wakeup_one(pf_purge_thread); - rw_sleep(pf_purge_thread, &pf_rules_lock, 0, "pftmo", 0); + tsleep(pf_purge_thread, 0, "pftmo", 0); } if (pf_dev != NULL) From owner-svn-src-head@freebsd.org Sun Mar 12 07:09:53 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46D63D09855; Sun, 12 Mar 2017 07:09:53 +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 mx1.freebsd.org (Postfix) with ESMTPS id 1E7C41762; Sun, 12 Mar 2017 07:09:53 +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 v2C79qGb008252; Sun, 12 Mar 2017 07:09:52 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2C79p2H008242; Sun, 12 Mar 2017 07:09:51 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201703120709.v2C79p2H008242@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sun, 12 Mar 2017 07:09:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315141 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 07:09:53 -0000 Author: manu Date: Sun Mar 12 07:09:50 2017 New Revision: 315141 URL: https://svnweb.freebsd.org/changeset/base/315141 Log: Use 'options EXT_RESOURCES' instead of 'device ext_resources' for FDT enabled MIPS kernel config. Modified: head/sys/mips/conf/JZ4780 head/sys/mips/conf/MT7620A_FDT head/sys/mips/conf/MT7620N_FDT head/sys/mips/conf/MT7621_FDT head/sys/mips/conf/MT7628_FDT head/sys/mips/conf/RT3050_FDT head/sys/mips/conf/RT3352_FDT head/sys/mips/conf/RT3883_FDT head/sys/mips/conf/RT5350_FDT head/sys/mips/conf/X1000 Modified: head/sys/mips/conf/JZ4780 ============================================================================== --- head/sys/mips/conf/JZ4780 Sun Mar 12 06:20:28 2017 (r315140) +++ head/sys/mips/conf/JZ4780 Sun Mar 12 07:09:50 2017 (r315141) @@ -71,7 +71,7 @@ device fdt_pinctrl device clk device regulator -device ext_resources +options EXT_RESOURCES device gpio Modified: head/sys/mips/conf/MT7620A_FDT ============================================================================== --- head/sys/mips/conf/MT7620A_FDT Sun Mar 12 06:20:28 2017 (r315140) +++ head/sys/mips/conf/MT7620A_FDT Sun Mar 12 07:09:50 2017 (r315141) @@ -73,5 +73,5 @@ device bpf device if_bridge # Extres -device ext_resources +options EXT_RESOURCES device clk Modified: head/sys/mips/conf/MT7620N_FDT ============================================================================== --- head/sys/mips/conf/MT7620N_FDT Sun Mar 12 06:20:28 2017 (r315140) +++ head/sys/mips/conf/MT7620N_FDT Sun Mar 12 07:09:50 2017 (r315141) @@ -70,5 +70,5 @@ device bpf device if_bridge # Extres -device ext_resources +options EXT_RESOURCES device clk Modified: head/sys/mips/conf/MT7621_FDT ============================================================================== --- head/sys/mips/conf/MT7621_FDT Sun Mar 12 06:20:28 2017 (r315140) +++ head/sys/mips/conf/MT7621_FDT Sun Mar 12 07:09:50 2017 (r315141) @@ -69,5 +69,5 @@ device bpf device if_bridge # Extres -device ext_resources +options EXT_RESOURCES device clk Modified: head/sys/mips/conf/MT7628_FDT ============================================================================== --- head/sys/mips/conf/MT7628_FDT Sun Mar 12 06:20:28 2017 (r315140) +++ head/sys/mips/conf/MT7628_FDT Sun Mar 12 07:09:50 2017 (r315141) @@ -72,5 +72,5 @@ device bpf device if_bridge # Extres -device ext_resources +options EXT_RESOURCES device clk Modified: head/sys/mips/conf/RT3050_FDT ============================================================================== --- head/sys/mips/conf/RT3050_FDT Sun Mar 12 06:20:28 2017 (r315140) +++ head/sys/mips/conf/RT3050_FDT Sun Mar 12 07:09:50 2017 (r315141) @@ -74,5 +74,5 @@ device bpf device if_bridge # Extres -device ext_resources +options EXT_RESOURCES device clk Modified: head/sys/mips/conf/RT3352_FDT ============================================================================== --- head/sys/mips/conf/RT3352_FDT Sun Mar 12 06:20:28 2017 (r315140) +++ head/sys/mips/conf/RT3352_FDT Sun Mar 12 07:09:50 2017 (r315141) @@ -70,5 +70,5 @@ device bpf device if_bridge # Extres -device ext_resources +options EXT_RESOURCES device clk Modified: head/sys/mips/conf/RT3883_FDT ============================================================================== --- head/sys/mips/conf/RT3883_FDT Sun Mar 12 06:20:28 2017 (r315140) +++ head/sys/mips/conf/RT3883_FDT Sun Mar 12 07:09:50 2017 (r315141) @@ -74,7 +74,7 @@ device bpf device if_bridge # Extres -device ext_resources +options EXT_RESOURCES device clk # For now there's no etherswitch support for RT3662/RT3883 Modified: head/sys/mips/conf/RT5350_FDT ============================================================================== --- head/sys/mips/conf/RT5350_FDT Sun Mar 12 06:20:28 2017 (r315140) +++ head/sys/mips/conf/RT5350_FDT Sun Mar 12 07:09:50 2017 (r315141) @@ -70,5 +70,5 @@ device bpf device if_bridge # Extres -device ext_resources +options EXT_RESOURCES device clk Modified: head/sys/mips/conf/X1000 ============================================================================== --- head/sys/mips/conf/X1000 Sun Mar 12 06:20:28 2017 (r315140) +++ head/sys/mips/conf/X1000 Sun Mar 12 07:09:50 2017 (r315141) @@ -68,7 +68,7 @@ device fdt_pinctrl device clk device regulator -device ext_resources +options EXT_RESOURCES device gpio From owner-svn-src-head@freebsd.org Sun Mar 12 09:05:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EAB03D07810; Sun, 12 Mar 2017 09:05:44 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B6F9B1904; Sun, 12 Mar 2017 09:05:44 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smtp.greenhost.nl ([213.108.104.138]) by smarthost1.greenhost.nl with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1cmzRZ-0007hM-6L; Sun, 12 Mar 2017 10:05:37 +0100 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, "Emmanuel Vadot" Subject: Re: svn commit: r315141 - head/sys/mips/conf References: <201703120709.v2C79p2H008242@repo.freebsd.org> Date: Sun, 12 Mar 2017 10:05:36 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Ronald Klop" Message-ID: In-Reply-To: <201703120709.v2C79p2H008242@repo.freebsd.org> User-Agent: Opera Mail/12.16 (FreeBSD) X-Authenticated-As-Hash: 398f5522cb258ce43cb679602f8cfe8b62a256d1 X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: / X-Spam-Score: -0.2 X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 autolearn=disabled version=3.4.0 X-Scan-Signature: 96329e479c93ffb0716cf569fedf443d X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 09:05:45 -0000 Hi, Your commit message shows in English what the diff already shows: the 'what changed'. IMHO it would add more value to the commit message to describe the 'why it changed'. What are your ideas about that? Regards, Ronald. On Sun, 12 Mar 2017 08:09:51 +0100, Emmanuel Vadot wrote: > Author: manu > Date: Sun Mar 12 07:09:50 2017 > New Revision: 315141 > URL: https://svnweb.freebsd.org/changeset/base/315141 > > Log: > Use 'options EXT_RESOURCES' instead of 'device ext_resources' for FDT > enabled > MIPS kernel config. > > Modified: > head/sys/mips/conf/JZ4780 > head/sys/mips/conf/MT7620A_FDT > head/sys/mips/conf/MT7620N_FDT > head/sys/mips/conf/MT7621_FDT > head/sys/mips/conf/MT7628_FDT > head/sys/mips/conf/RT3050_FDT > head/sys/mips/conf/RT3352_FDT > head/sys/mips/conf/RT3883_FDT > head/sys/mips/conf/RT5350_FDT > head/sys/mips/conf/X1000 > > Modified: head/sys/mips/conf/JZ4780 > ============================================================================== > --- head/sys/mips/conf/JZ4780 Sun Mar 12 06:20:28 2017 (r315140) > +++ head/sys/mips/conf/JZ4780 Sun Mar 12 07:09:50 2017 (r315141) > @@ -71,7 +71,7 @@ device fdt_pinctrl > device clk > device regulator > -device ext_resources > +options EXT_RESOURCES > device gpio > > Modified: head/sys/mips/conf/MT7620A_FDT > ============================================================================== > --- head/sys/mips/conf/MT7620A_FDT Sun Mar 12 06:20:28 2017 (r315140) > +++ head/sys/mips/conf/MT7620A_FDT Sun Mar 12 07:09:50 2017 (r315141) > @@ -73,5 +73,5 @@ device bpf > device if_bridge > # Extres > -device ext_resources > +options EXT_RESOURCES > device clk > > Modified: head/sys/mips/conf/MT7620N_FDT > ============================================================================== > --- head/sys/mips/conf/MT7620N_FDT Sun Mar 12 06:20:28 2017 (r315140) > +++ head/sys/mips/conf/MT7620N_FDT Sun Mar 12 07:09:50 2017 (r315141) > @@ -70,5 +70,5 @@ device bpf > device if_bridge > # Extres > -device ext_resources > +options EXT_RESOURCES > device clk > > Modified: head/sys/mips/conf/MT7621_FDT > ============================================================================== > --- head/sys/mips/conf/MT7621_FDT Sun Mar 12 06:20:28 2017 (r315140) > +++ head/sys/mips/conf/MT7621_FDT Sun Mar 12 07:09:50 2017 (r315141) > @@ -69,5 +69,5 @@ device bpf > device if_bridge > # Extres > -device ext_resources > +options EXT_RESOURCES > device clk > > Modified: head/sys/mips/conf/MT7628_FDT > ============================================================================== > --- head/sys/mips/conf/MT7628_FDT Sun Mar 12 06:20:28 2017 (r315140) > +++ head/sys/mips/conf/MT7628_FDT Sun Mar 12 07:09:50 2017 (r315141) > @@ -72,5 +72,5 @@ device bpf > device if_bridge > # Extres > -device ext_resources > +options EXT_RESOURCES > device clk > > Modified: head/sys/mips/conf/RT3050_FDT > ============================================================================== > --- head/sys/mips/conf/RT3050_FDT Sun Mar 12 06:20:28 2017 (r315140) > +++ head/sys/mips/conf/RT3050_FDT Sun Mar 12 07:09:50 2017 (r315141) > @@ -74,5 +74,5 @@ device bpf > device if_bridge > # Extres > -device ext_resources > +options EXT_RESOURCES > device clk > > Modified: head/sys/mips/conf/RT3352_FDT > ============================================================================== > --- head/sys/mips/conf/RT3352_FDT Sun Mar 12 06:20:28 2017 (r315140) > +++ head/sys/mips/conf/RT3352_FDT Sun Mar 12 07:09:50 2017 (r315141) > @@ -70,5 +70,5 @@ device bpf > device if_bridge > # Extres > -device ext_resources > +options EXT_RESOURCES > device clk > > Modified: head/sys/mips/conf/RT3883_FDT > ============================================================================== > --- head/sys/mips/conf/RT3883_FDT Sun Mar 12 06:20:28 2017 (r315140) > +++ head/sys/mips/conf/RT3883_FDT Sun Mar 12 07:09:50 2017 (r315141) > @@ -74,7 +74,7 @@ device bpf > device if_bridge > # Extres > -device ext_resources > +options EXT_RESOURCES > device clk > # For now there's no etherswitch support for RT3662/RT3883 > > Modified: head/sys/mips/conf/RT5350_FDT > ============================================================================== > --- head/sys/mips/conf/RT5350_FDT Sun Mar 12 06:20:28 2017 (r315140) > +++ head/sys/mips/conf/RT5350_FDT Sun Mar 12 07:09:50 2017 (r315141) > @@ -70,5 +70,5 @@ device bpf > device if_bridge > # Extres > -device ext_resources > +options EXT_RESOURCES > device clk > > Modified: head/sys/mips/conf/X1000 > ============================================================================== > --- head/sys/mips/conf/X1000 Sun Mar 12 06:20:28 2017 (r315140) > +++ head/sys/mips/conf/X1000 Sun Mar 12 07:09:50 2017 (r315141) > @@ -68,7 +68,7 @@ device fdt_pinctrl > device clk > device regulator > -device ext_resources > +options EXT_RESOURCES > device gpio > _______________________________________________ > 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 Mar 12 09:32:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7C40D07FC2; Sun, 12 Mar 2017 09:32:32 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citapm.icyb.net.ua (citapm.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id ACDAB1611; Sun, 12 Mar 2017 09:32:31 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citapm.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id LAA25952; Sun, 12 Mar 2017 11:32:28 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1cmzrY-000MIC-3j; Sun, 12 Mar 2017 11:32:28 +0200 Subject: Re: svn commit: r315068 - head/sys/modules/qlxgbe To: Bruce Evans References: <201703111516.v2BFGtkn006959@repo.freebsd.org> <20170312124945.C4483@besplex.bde.org> Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org From: Andriy Gapon Message-ID: <18e52ee7-0b27-7aff-6b69-75b27673a8f4@FreeBSD.org> Date: Sun, 12 Mar 2017 11:31:31 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <20170312124945.C4483@besplex.bde.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 09:32:32 -0000 On 12/03/2017 04:44, Bruce Evans wrote: > On Sat, 11 Mar 2017, Andriy Gapon wrote: > >> Log: >> revert r314862, use of GCC_MS_EXTENSIONS in qlxgbe >> >> Commit r278913 made explicit use of GCC_MS_EXTENSIONS unnecessary. >> >> Requested by: glebius > > Does this module actually use ms extensions? This seems unlikely, since > only gcc supports them. It probably doesn't. > My kernels compile correctly with the correct CFLAGS (gcc -std=gnu99 > -fno-ms-extensions). How did you manage to pass -std=gnu99 to the module build? No matter what flags I tried to modify the actual compiler invocations still had -std=iso9899:1999 after -std=gnu99 in them, so my modifications had no effect. GCC_MS_EXTENSIONS was the easiest way to get the job done. -- Andriy Gapon From owner-svn-src-head@freebsd.org Sun Mar 12 10:56:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56CABD08947; Sun, 12 Mar 2017 10:56:21 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 09CF11A58; Sun, 12 Mar 2017 10:56:20 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2CAuKRo001003; Sun, 12 Mar 2017 10:56:20 GMT (envelope-from tijl@FreeBSD.org) Received: (from tijl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2CAuJ3T001001; Sun, 12 Mar 2017 10:56:19 GMT (envelope-from tijl@FreeBSD.org) Message-Id: <201703121056.v2CAuJ3T001001@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tijl set sender to tijl@FreeBSD.org using -f From: Tijl Coosemans Date: Sun, 12 Mar 2017 10:56:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315142 - head/usr.bin/man X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 10:56:21 -0000 Author: tijl Date: Sun Mar 12 10:56:19 2017 New Revision: 315142 URL: https://svnweb.freebsd.org/changeset/base/315142 Log: - Remove separate handling of /bin and /usr/bin in manpath. They are no longer a special case. - Prefer PREFIX/share/man over PREFIX/man. - Add /usr/local/share/man to man_default_path. - Update manpath man page. Reviewed by: bapt Modified: head/usr.bin/man/man.sh head/usr.bin/man/manpath.1 Modified: head/usr.bin/man/man.sh ============================================================================== --- head/usr.bin/man/man.sh Sun Mar 12 07:09:50 2017 (r315141) +++ head/usr.bin/man/man.sh Sun Mar 12 10:56:19 2017 (r315142) @@ -778,26 +778,19 @@ search_path() { IFS=: for path in $PATH; do - # Do a little special casing since the base manpages - # are in /usr/share/man instead of /usr/man or /man. - case "$path" in - /bin|/usr/bin) add_to_manpath "/usr/share/man" ;; - *) if add_to_manpath "$path/man"; then - : - elif add_to_manpath "$path/MAN"; then - : - else - case "$path" in - */bin) p="${path%/bin}/man" - add_to_manpath "$p" - p="${path%/bin}/share/man" - add_to_manpath "$p" - ;; - *) ;; - esac - fi - ;; - esac + if add_to_manpath "$path/man"; then + : + elif add_to_manpath "$path/MAN"; then + : + else + case "$path" in + */bin) p="${path%/bin}/share/man" + add_to_manpath "$p" + p="${path%/bin}/man" + add_to_manpath "$p" + ;; + esac + fi done unset IFS @@ -1007,7 +1000,7 @@ SYSCTL=/sbin/sysctl debug=0 man_default_sections='1:8:2:3:n:4:5:6:7:9:l' -man_default_path='/usr/share/man:/usr/share/openssl/man:/usr/local/man' +man_default_path='/usr/share/man:/usr/share/openssl/man:/usr/local/share/man:/usr/local/man' cattool='/usr/bin/zcat -f' config_global='/etc/man.conf' Modified: head/usr.bin/man/manpath.1 ============================================================================== --- head/usr.bin/man/manpath.1 Sun Mar 12 07:09:50 2017 (r315141) +++ head/usr.bin/man/manpath.1 Sun Mar 12 10:56:19 2017 (r315142) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 1, 2010 +.Dd March 11, 2017 .Dt MANPATH 1 .Os .Sh NAME @@ -66,15 +66,10 @@ for the first of: .Pa pathname/MAN .It If pathname ends with /bin: +.Pa pathname/../share/man +and .Pa pathname/../man .El -Note: Special logic exists to make -.Pa /bin -and -.Pa /usr/bin -look in -.Pa /usr/share/man -for manual files. .It The configuration files listed in the .Sx FILES From owner-svn-src-head@freebsd.org Sun Mar 12 11:26:35 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A2F9CF94B0; Sun, 12 Mar 2017 11:26:35 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id E7F4C18ED; Sun, 12 Mar 2017 11:26:34 +0000 (UTC) (envelope-from des@des.no) Received: from desk.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id 7868D9C89; Sun, 12 Mar 2017 11:26:27 +0000 (UTC) Received: by desk.des.no (Postfix, from userid 1001) id 48F477357; Sun, 12 Mar 2017 12:26:27 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "Ngie Cooper \(yaneurabeya\)" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r308996 - head/lib/libfetch References: <201611221330.uAMDU7fg052989@repo.freebsd.org> <93505FD7-FB42-4BD5-834C-6F73EFD9B1CF@gmail.com> Date: Sun, 12 Mar 2017 12:26:26 +0100 In-Reply-To: <93505FD7-FB42-4BD5-834C-6F73EFD9B1CF@gmail.com> (Ngie Cooper's message of "Sat, 11 Mar 2017 20:46:16 -0800") Message-ID: <86shmid9ct.fsf@desk.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 11:26:35 -0000 "Ngie Cooper (yaneurabeya)" writes: > Hi Bjoern, No, that was my father :) > Shouldn=E2=80=99t this be strrchr instead of strchr since you=E2=80=99re > scanning for the service from the right side of the host, > e.g. =E2=80=9Cfoo:service=E2=80=9D or =E2=80=9C[::1]:service=E2=80=9D? Th= is code would match index 3 > in the first example, but it would match index 2 in the second > example. Correct, although it may be slightly more complicated, which is why I didn't immediately jump on it when bz@ pointed it out. I'm working on it right now. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@freebsd.org Sun Mar 12 11:54:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E035CF9DC3; Sun, 12 Mar 2017 11:54:36 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6AD1D16F6; Sun, 12 Mar 2017 11:54:36 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2CBsZ9L025364; Sun, 12 Mar 2017 11:54:35 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2CBsZZN025363; Sun, 12 Mar 2017 11:54:35 GMT (envelope-from des@FreeBSD.org) Message-Id: <201703121154.v2CBsZZN025363@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Sun, 12 Mar 2017 11:54:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315143 - head/lib/libfetch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 11:54:36 -0000 Author: des Date: Sun Mar 12 11:54:35 2017 New Revision: 315143 URL: https://svnweb.freebsd.org/changeset/base/315143 Log: Add a __printflike() that would have caught the bug fixed in r314396. Modified: head/lib/libfetch/common.h Modified: head/lib/libfetch/common.h ============================================================================== --- head/lib/libfetch/common.h Sun Mar 12 10:56:19 2017 (r315142) +++ head/lib/libfetch/common.h Sun Mar 12 11:54:35 2017 (r315143) @@ -73,7 +73,7 @@ struct iovec; void fetch_seterr(struct fetcherr *, int); void fetch_syserr(void); -void fetch_info(const char *, ...); +void fetch_info(const char *, ...) __printflike(1, 2); int fetch_default_port(const char *); int fetch_default_proxy_port(const char *); struct addrinfo *fetch_resolve(const char *, int, int); From owner-svn-src-head@freebsd.org Sun Mar 12 12:38:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11BD7D0951A; Sun, 12 Mar 2017 12:38:18 +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 mx1.freebsd.org (Postfix) with ESMTPS id B939F13B5; Sun, 12 Mar 2017 12:38:17 +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 v2CCcGnY041767; Sun, 12 Mar 2017 12:38:16 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2CCcG85041766; Sun, 12 Mar 2017 12:38:16 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703121238.v2CCcG85041766@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 12 Mar 2017 12:38:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315146 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 12:38:18 -0000 Author: mav Date: Sun Mar 12 12:38:16 2017 New Revision: 315146 URL: https://svnweb.freebsd.org/changeset/base/315146 Log: Some more polishing. MFC after: 13 days Modified: head/share/man/man4/ctl.4 Modified: head/share/man/man4/ctl.4 ============================================================================== --- head/share/man/man4/ctl.4 Sun Mar 12 12:12:59 2017 (r315145) +++ head/share/man/man4/ctl.4 Sun Mar 12 12:38:16 2017 (r315146) @@ -31,7 +31,8 @@ .Nm ctl .Nd CAM Target Layer / SCSI target subsystem .Sh SYNOPSIS -To compile this driver into the kernel, place the following line in your +To compile this driver into the kernel, +place the following line in your kernel configuration file: .Bd -ragged -offset indent .Cd "device iscsi" @@ -47,15 +48,14 @@ ctl_load="YES" .Sh DESCRIPTION The .Nm -subsystem provides featured, performant and reliable SCSI target devices -emulation. +subsystem provides SCSI target devices emulation. It supports features such as: .Pp .Bl -bullet -compact .It -Disk, processor and cdrom device emulation +Disk, CD-ROM and processor device emulation .It -Tagged and untagged queueing +Tagged queueing .It SCSI task attribute support (ordered, head of queue, simple tags) .It @@ -122,7 +122,7 @@ subsystem includes two backends to creat kinds of backing stores: .Bl -tag -width ramdisk .It block -Stores data on ZFS ZVOLs, files or raw block devices. +Stores data in ZFS ZVOLs, files or raw block devices. .It ramdisk Stores data in RAM, that makes it mostly useful for performance testing. Depending on configured capacity can work as black hole, thin or thick @@ -187,7 +187,7 @@ primary; .It 1 secondary. .El -This role can be overriden on per-LUN basis using "ha_role" LUN option, +This role can be overridden on per-LUN basis using "ha_role" LUN option, so that for one LUN one node is primary, while for another -- another. Role change from primary to secondary for HA modes 0 and 2 closes backends, the opposite change -- opens. From owner-svn-src-head@freebsd.org Sun Mar 12 13:48:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B720D09F6C; Sun, 12 Mar 2017 13:48:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA3081517; Sun, 12 Mar 2017 13:48:25 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2CDmPTG070777; Sun, 12 Mar 2017 13:48:25 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2CDmOpp070774; Sun, 12 Mar 2017 13:48:24 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201703121348.v2CDmOpp070774@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 12 Mar 2017 13:48:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315155 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 13:48:26 -0000 Author: kib Date: Sun Mar 12 13:48:24 2017 New Revision: 315155 URL: https://svnweb.freebsd.org/changeset/base/315155 Log: Ktracing kevent(2) calls with unusual arguments might leads to an overly large allocation requests. When ktrace-ing io, sys_kevent() allocates memory to copy the requested changes and reported events. Allocations are sized by the incoming syscall lengths arguments, which are user-controlled, and might cause overflow in calculations or too large allocations. Since io trace chunks are limited by ktr_geniosize, there is no sense it even trying to satisfy unbounded allocations. Export ktr_geniosize and clamp the buffers sizes in advance. PR: 217435 Reported by: Tim Newsham Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/kern_event.c head/sys/kern/kern_ktrace.c head/sys/sys/ktrace.h Modified: head/sys/kern/kern_event.c ============================================================================== --- head/sys/kern/kern_event.c Sun Mar 12 13:42:40 2017 (r315154) +++ head/sys/kern/kern_event.c Sun Mar 12 13:48:24 2017 (r315155) @@ -887,6 +887,15 @@ kern_kqueue(struct thread *td, int flags return (0); } +static size_t +kev_iovlen(int n, u_int kgio) +{ + + if (n < 0 || n >= kgio / sizeof(struct kevent)) + return (kgio); + return (n * sizeof(struct kevent)); +} + #ifndef _SYS_SYSPROTO_H_ struct kevent_args { int fd; @@ -910,6 +919,7 @@ sys_kevent(struct thread *td, struct kev struct iovec ktriov; struct uio *ktruioin = NULL; struct uio *ktruioout = NULL; + u_int kgio; #endif if (uap->timeout != NULL) { @@ -922,13 +932,15 @@ sys_kevent(struct thread *td, struct kev #ifdef KTRACE if (KTRPOINT(td, KTR_GENIO)) { + kgio = ktr_geniosize; ktriov.iov_base = uap->changelist; - ktriov.iov_len = uap->nchanges * sizeof(struct kevent); + ktriov.iov_len = kev_iovlen(uap->nchanges, kgio); ktruio = (struct uio){ .uio_iov = &ktriov, .uio_iovcnt = 1, .uio_segflg = UIO_USERSPACE, .uio_rw = UIO_READ, .uio_td = td }; ktruioin = cloneuio(&ktruio); ktriov.iov_base = uap->eventlist; + ktriov.iov_len = kev_iovlen(uap->nevents, kgio); ktriov.iov_len = uap->nevents * sizeof(struct kevent); ktruioout = cloneuio(&ktruio); } @@ -939,9 +951,9 @@ sys_kevent(struct thread *td, struct kev #ifdef KTRACE if (ktruioin != NULL) { - ktruioin->uio_resid = uap->nchanges * sizeof(struct kevent); + ktruioin->uio_resid = kev_iovlen(uap->nchanges, kgio); ktrgenio(uap->fd, UIO_WRITE, ktruioin, 0); - ktruioout->uio_resid = td->td_retval[0] * sizeof(struct kevent); + ktruioout->uio_resid = kev_iovlen(td->td_retval[0], kgio); ktrgenio(uap->fd, UIO_READ, ktruioout, error); } #endif Modified: head/sys/kern/kern_ktrace.c ============================================================================== --- head/sys/kern/kern_ktrace.c Sun Mar 12 13:42:40 2017 (r315154) +++ head/sys/kern/kern_ktrace.c Sun Mar 12 13:48:24 2017 (r315155) @@ -132,7 +132,7 @@ static SYSCTL_NODE(_kern, OID_AUTO, ktra static u_int ktr_requestpool = KTRACE_REQUEST_POOL; TUNABLE_INT("kern.ktrace.request_pool", &ktr_requestpool); -static u_int ktr_geniosize = PAGE_SIZE; +u_int ktr_geniosize = PAGE_SIZE; SYSCTL_UINT(_kern_ktrace, OID_AUTO, genio_size, CTLFLAG_RWTUN, &ktr_geniosize, 0, "Maximum size of genio event payload"); Modified: head/sys/sys/ktrace.h ============================================================================== --- head/sys/sys/ktrace.h Sun Mar 12 13:42:40 2017 (r315154) +++ head/sys/sys/ktrace.h Sun Mar 12 13:48:24 2017 (r315155) @@ -276,7 +276,7 @@ void ktrcapfail(enum ktr_cap_fail_type, ktrstruct("sockaddr", (s), ((struct sockaddr *)(s))->sa_len) #define ktrstat(s) \ ktrstruct("stat", (s), sizeof(struct stat)) - +extern u_int ktr_geniosize; #else #include From owner-svn-src-head@freebsd.org Sun Mar 12 13:49:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC3C2D09025; Sun, 12 Mar 2017 13:49:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9BFF816F3; Sun, 12 Mar 2017 13:49:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2CDngSP070871; Sun, 12 Mar 2017 13:49:42 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2CDng6r070870; Sun, 12 Mar 2017 13:49:42 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201703121349.v2CDng6r070870@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 12 Mar 2017 13:49:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315156 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 13:49:43 -0000 Author: kib Date: Sun Mar 12 13:49:42 2017 New Revision: 315156 URL: https://svnweb.freebsd.org/changeset/base/315156 Log: Style. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/imgact_elf.c Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Sun Mar 12 13:48:24 2017 (r315155) +++ head/sys/kern/imgact_elf.c Sun Mar 12 13:49:42 2017 (r315156) @@ -508,7 +508,7 @@ __elfN(load_section)(struct image_params size_t map_len; vm_map_t map; vm_object_t object; - vm_offset_t map_addr; + vm_offset_t off, map_addr; int error, rv, cow; size_t copy_len; vm_ooffset_t file_addr; @@ -559,9 +559,8 @@ __elfN(load_section)(struct image_params return (EINVAL); /* we can stop now if we've covered it all */ - if (memsz == filsz) { + if (memsz == filsz) return (0); - } } @@ -580,14 +579,11 @@ __elfN(load_section)(struct image_params if (map_len != 0) { rv = __elfN(map_insert)(imgp, map, NULL, 0, map_addr, map_addr + map_len, VM_PROT_ALL, 0); - if (rv != KERN_SUCCESS) { + if (rv != KERN_SUCCESS) return (EINVAL); - } } if (copy_len != 0) { - vm_offset_t off; - sf = vm_imgact_map_page(object, offset + filsz); if (sf == NULL) return (EIO); @@ -598,14 +594,12 @@ __elfN(load_section)(struct image_params error = copyout((caddr_t)sf_buf_kva(sf) + off, (caddr_t)map_addr, copy_len); vm_imgact_unmap_page(sf); - if (error) { + if (error != 0) return (error); - } } /* * set it to the specified protection. - * XXX had better undo the damage from pasting over the cracks here! */ vm_map_protect(map, trunc_page(map_addr), round_page(map_addr + map_len), prot, FALSE); From owner-svn-src-head@freebsd.org Sun Mar 12 13:51:14 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EBE07D0909D; Sun, 12 Mar 2017 13:51: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 mx1.freebsd.org (Postfix) with ESMTPS id A02CF18EC; Sun, 12 Mar 2017 13:51: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 v2CDpDRg070987; Sun, 12 Mar 2017 13:51:13 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2CDpDWe070986; Sun, 12 Mar 2017 13:51:13 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201703121351.v2CDpDWe070986@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 12 Mar 2017 13:51:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315157 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 13:51:15 -0000 Author: kib Date: Sun Mar 12 13:51:13 2017 New Revision: 315157 URL: https://svnweb.freebsd.org/changeset/base/315157 Log: Accept linkers representation for ELF segments with zero on-disk length. For such segments, GNU bfd linker writes knowingly incorrect value into the the file offset field of the program header entry, with the motivation that file should not be mapped for creation of this segment at all. Relax checks for the ELF structure validity when on-disk segment length is zero, and explicitely set mapping length to zero for such segments to avoid validating rounding arithmetic. PR: 217610 Reported by: Robert Clausecker Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/imgact_elf.c Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Sun Mar 12 13:49:42 2017 (r315156) +++ head/sys/kern/imgact_elf.c Sun Mar 12 13:51:13 2017 (r315157) @@ -522,7 +522,8 @@ __elfN(load_section)(struct image_params * While I'm here, might as well check for something else that * is invalid: filsz cannot be greater than memsz. */ - if ((off_t)filsz + offset > imgp->attr->va_size || filsz > memsz) { + if ((filsz != 0 && (off_t)filsz + offset > imgp->attr->va_size) || + filsz > memsz) { uprintf("elf_load_section: truncated ELF file\n"); return (ENOEXEC); } @@ -538,7 +539,9 @@ __elfN(load_section)(struct image_params * early and copy the initialized data into that first page. We * choose the second. */ - if (memsz > filsz) + if (filsz == 0) + map_len = 0; + else if (memsz > filsz) map_len = trunc_page_ps(offset + filsz, pagesize) - file_addr; else map_len = round_page_ps(offset + filsz, pagesize) - file_addr; @@ -570,7 +573,8 @@ __elfN(load_section)(struct image_params * segment in the file is extended to provide bss. It's a neat idea * to try and save a page, but it's a pain in the behind to implement. */ - copy_len = (offset + filsz) - trunc_page_ps(offset + filsz, pagesize); + copy_len = filsz == 0 ? 0 : (offset + filsz) - trunc_page_ps(offset + + filsz, pagesize); map_addr = trunc_page_ps((vm_offset_t)vmaddr + filsz, pagesize); map_len = round_page_ps((vm_offset_t)vmaddr + memsz, pagesize) - map_addr; From owner-svn-src-head@freebsd.org Sun Mar 12 13:53:14 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94692D092E1; Sun, 12 Mar 2017 13:53: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 mx1.freebsd.org (Postfix) with ESMTPS id 61BD81DB7; Sun, 12 Mar 2017 13:53: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 v2CDrDg4074588; Sun, 12 Mar 2017 13:53:13 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2CDrDq0074587; Sun, 12 Mar 2017 13:53:13 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201703121353.v2CDrDq0074587@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 12 Mar 2017 13:53:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315158 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 13:53:14 -0000 Author: kib Date: Sun Mar 12 13:53:13 2017 New Revision: 315158 URL: https://svnweb.freebsd.org/changeset/base/315158 Log: Follow-up to r313690. Fix two missed places where vm_object offset to index calculation should use unsigned shift, to allow handling of full range of unsigned offsets used to create device mappings. Reported and tested by: royger (previous version) Reviewed by: alc (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Sun Mar 12 13:51:13 2017 (r315157) +++ head/sys/vm/vm_map.c Sun Mar 12 13:53:13 2017 (r315158) @@ -4122,7 +4122,7 @@ RetryLookup:; * Return the object/offset from this entry. If the entry was * copy-on-write or empty, it has been fixed up. */ - *pindex = OFF_TO_IDX((vaddr - entry->start) + entry->offset); + *pindex = UOFF_TO_IDX((vaddr - entry->start) + entry->offset); *object = entry->object.vm_object; *out_prot = prot; @@ -4203,7 +4203,7 @@ vm_map_lookup_locked(vm_map_t *var_map, * Return the object/offset from this entry. If the entry was * copy-on-write or empty, it has been fixed up. */ - *pindex = OFF_TO_IDX((vaddr - entry->start) + entry->offset); + *pindex = UOFF_TO_IDX((vaddr - entry->start) + entry->offset); *object = entry->object.vm_object; *out_prot = prot; From owner-svn-src-head@freebsd.org Sun Mar 12 13:58:53 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42B03D0946F; Sun, 12 Mar 2017 13:58:53 +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 mx1.freebsd.org (Postfix) with ESMTPS id E9EED103E; Sun, 12 Mar 2017 13:58:52 +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 v2CDwq5K074834; Sun, 12 Mar 2017 13:58:52 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2CDwpxU074833; Sun, 12 Mar 2017 13:58:51 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201703121358.v2CDwpxU074833@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 12 Mar 2017 13:58:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315159 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 13:58:53 -0000 Author: kib Date: Sun Mar 12 13:58:51 2017 New Revision: 315159 URL: https://svnweb.freebsd.org/changeset/base/315159 Log: Avoid reusing p_ksi while it is on queue. When sending SIGCHLD informing reaper that a zombie was reparented to it, we might race with the situation where the previous parent still not finished delivering SIGCHLD and having its p_ksi structure on the signal queue. While on queue, the ksi should not be used for another send. Fix this by copying p_ksi into newly allocated ksi, which is directly put onto reaper sigqueue. The later ensures that siginfo for reaper SIGCHLD is always present, similar to guarantees for siginfo of child. Reported by: bdrewery Discussed with: jilles Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/kern_exit.c Modified: head/sys/kern/kern_exit.c ============================================================================== --- head/sys/kern/kern_exit.c Sun Mar 12 13:53:13 2017 (r315158) +++ head/sys/kern/kern_exit.c Sun Mar 12 13:58:51 2017 (r315159) @@ -189,6 +189,7 @@ exit1(struct thread *td, int rval, int s { struct proc *p, *nq, *q, *t; struct thread *tdt; + ksiginfo_t *ksi, *ksi1; mtx_assert(&Giant, MA_NOTOWNED); KASSERT(rval == 0 || signo == 0, ("exit1 rv %d sig %d", rval, signo)); @@ -449,14 +450,32 @@ exit1(struct thread *td, int rval, int s wakeup(q->p_reaper); for (; q != NULL; q = nq) { nq = LIST_NEXT(q, p_sibling); + ksi = ksiginfo_alloc(TRUE); PROC_LOCK(q); q->p_sigparent = SIGCHLD; if (!(q->p_flag & P_TRACED)) { proc_reparent(q, q->p_reaper); if (q->p_state == PRS_ZOMBIE) { + /* + * Inform reaper about the reparented + * zombie, since wait(2) has something + * new to report. Guarantee queueing + * of the SIGCHLD signal, similar to + * the _exit() behaviour, by providing + * our ksiginfo. Ksi is freed by the + * signal delivery. + */ + if (q->p_ksi == NULL) { + ksi1 = NULL; + } else { + ksiginfo_copy(q->p_ksi, ksi); + ksi->ksi_flags |= KSI_INS; + ksi1 = ksi; + ksi = NULL; + } PROC_LOCK(q->p_reaper); - pksignal(q->p_reaper, SIGCHLD, q->p_ksi); + pksignal(q->p_reaper, SIGCHLD, ksi1); PROC_UNLOCK(q->p_reaper); } } else { @@ -489,6 +508,8 @@ exit1(struct thread *td, int rval, int s kern_psignal(q, SIGKILL); } PROC_UNLOCK(q); + if (ksi != NULL) + ksiginfo_free(ksi); } /* From owner-svn-src-head@freebsd.org Sun Mar 12 14:07:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC03DD09741; Sun, 12 Mar 2017 14:07:06 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x242.google.com (mail-pf0-x242.google.com [IPv6:2607:f8b0:400e:c00::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AC30D14FD; Sun, 12 Mar 2017 14:07:06 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x242.google.com with SMTP id v190so16162728pfb.0; Sun, 12 Mar 2017 07:07:06 -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=rxJRkaeJfAoUmFV6Mr/iEpc3SryLnvquE3YtNw7gRgY=; b=CNeEVSmlKYUCJjgUtimQPKtLmuIB8hcPSJeFPgiQZU2GqXLn/I5HWAQdpuLJqYS6AE 5i1Lb9bTEh8YZd3rFmQ3PJqLnJyA6qLp+75ucma68YbwnuRYzp4kfsXaswjoi8W8mzhS gCu79Dihl4v5Wc5vK50+v5V1Q52c71yIpMC0puJ+wIzedgHQqTCM3SoBMPN6fnnYv8fr KB+5OY9dsurPPZCKbeVyXp5Idhv5STJK2V5rkXXq+N1O7Xlg69NoHRBNEjL1PgtkZ3NR ek1oWFBsoMQbOsC2jBIKddE/oDksVIb1FU3vEQkka+d0by9qRvTq6mxtuuIs80qfwMMJ X3sw== 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=rxJRkaeJfAoUmFV6Mr/iEpc3SryLnvquE3YtNw7gRgY=; b=E956WJko2ZGm9U1nZTF+GhvxXnpQGRikTR/teQofxGDIEd2JMErcnKJgGZWuiZ0PUc +/kncnDV2eWvsEXt7HAprgjpkcoRZT+rnUUjGKtvbj4YpH6dSZSKjSyPgYkwzFZgc5W2 1eFxTOWbFSPBr0Qk8wBK+5xHplrARnueBsmxEEmex/iNG3YwXcLSED9B5ZuUtGiEE9bg +/No/IQQlpnTLb+x8m67XtYisS8RYSCp67QjIM5Vcsy37TAWdWYTn0FjshQj4jpzbpqy C8H46Al6dUPTfWpg/6xyrM/qDXqHyCvVAQ6kAEYyFFmesyjkJPwWdtR83izn/N7HQarK /x4A== X-Gm-Message-State: AMke39nSLLwxTF0mxsQPRU/jdYFKmJGRIHwumRCeM/dqifnRWS2/B30S9QFBBs2pSh2fWA== X-Received: by 10.84.128.98 with SMTP id 89mr41270995pla.24.1489327626185; Sun, 12 Mar 2017 07:07:06 -0700 (PDT) Received: from [192.168.20.13] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id 80sm28632746pfn.61.2017.03.12.07.07.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 Mar 2017 07:07:05 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r308996 - head/lib/libfetch From: Ngie Cooper X-Mailer: iPhone Mail (14D27) In-Reply-To: <86shmid9ct.fsf@desk.des.no> Date: Sun, 12 Mar 2017 07:07:05 -0700 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <92F67C24-E539-4810-9014-DCC019DD0CBB@gmail.com> References: <201611221330.uAMDU7fg052989@repo.freebsd.org> <93505FD7-FB42-4BD5-834C-6F73EFD9B1CF@gmail.com> <86shmid9ct.fsf@desk.des.no> To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 14:07:07 -0000 > On Mar 12, 2017, at 04:26, Dag-Erling Sm=C3=B8rgrav wrote: >=20 > "Ngie Cooper (yaneurabeya)" writes: >> Hi Bjoern, >=20 > No, that was my father :) :D.. >> Shouldn=E2=80=99t this be strrchr instead of strchr since you=E2=80=99= re >> scanning for the service from the right side of the host, >> e.g. =E2=80=9Cfoo:service=E2=80=9D or =E2=80=9C[::1]:service=E2=80=9D? Th= is code would match index 3 >> in the first example, but it would match index 2 in the second >> example. >=20 > Correct, although it may be slightly more complicated, which is why I > didn't immediately jump on it when bz@ pointed it out. I'm working on > it right now. Awesome! Great teamwork! -Ngie= From owner-svn-src-head@freebsd.org Sun Mar 12 14:17:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A805D09A60; Sun, 12 Mar 2017 14:17:59 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2AE061A98; Sun, 12 Mar 2017 14:17:59 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2CEHw6D082984; Sun, 12 Mar 2017 14:17:58 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2CEHvSv082980; Sun, 12 Mar 2017 14:17:57 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703121417.v2CEHvSv082980@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 12 Mar 2017 14:17:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315160 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 14:17:59 -0000 Author: mav Date: Sun Mar 12 14:17:57 2017 New Revision: 315160 URL: https://svnweb.freebsd.org/changeset/base/315160 Log: Remove code for unsupported FreeBSD versions. MFC after: 2 weeks Modified: head/sys/dev/isp/isp.c head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_freebsd.h head/sys/dev/isp/isp_target.c Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Sun Mar 12 13:58:51 2017 (r315159) +++ head/sys/dev/isp/isp.c Sun Mar 12 14:17:57 2017 (r315160) @@ -4514,15 +4514,7 @@ isp_start(XS_T *xs) t7->req_tidlo = lp->portid; t7->req_tidhi = lp->portid >> 16; t7->req_vpidx = ISP_GET_VPIDX(isp, XS_CHANNEL(xs)); -#if __FreeBSD_version >= 1000700 be64enc(t7->req_lun, CAM_EXTLUN_BYTE_SWIZZLE(XS_LUN(xs))); -#else - if (XS_LUN(xs) >= 256) { - t7->req_lun[0] = XS_LUN(xs) >> 8; - t7->req_lun[0] |= 0x40; - } - t7->req_lun[1] = XS_LUN(xs); -#endif if (FCPARAM(isp, XS_CHANNEL(xs))->fctape_enabled && (lp->prli_word3 & PRLI_WD3_RETRY)) { if (FCP_NEXT_CRN(isp, &t7->req_crn, xs)) { isp_prt(isp, ISP_LOG_WARN1, @@ -4555,19 +4547,11 @@ isp_start(XS_T *xs) ispreqt2e_t *t2e = (ispreqt2e_t *)local; t2e->req_target = lp->handle; t2e->req_scclun = XS_LUN(xs); -#if __FreeBSD_version < 1000700 - if (XS_LUN(xs) >= 256) - t2e->req_scclun |= 0x4000; -#endif cdbp = t2e->req_cdb; } else if (ISP_CAP_SCCFW(isp)) { ispreqt2_t *t2 = (ispreqt2_t *)local; t2->req_target = lp->handle; t2->req_scclun = XS_LUN(xs); -#if __FreeBSD_version < 1000700 - if (XS_LUN(xs) >= 256) - t2->req_scclun |= 0x4000; -#endif cdbp = t2->req_cdb; } else { t2->req_target = lp->handle; Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Sun Mar 12 13:58:51 2017 (r315159) +++ head/sys/dev/isp/isp_freebsd.c Sun Mar 12 14:17:57 2017 (r315160) @@ -391,9 +391,7 @@ isp_freeze_loopdown(ispsoftc_t *isp, int isp_prt(isp, ISP_LOGDEBUG0, "Chan %d Freeze simq (loopdown)", chan); fc->simqfrozen = SIMQFRZ_LOOPDOWN; -#if __FreeBSD_version >= 1000039 xpt_hold_boot(); -#endif xpt_freeze_simq(fc->sim, 1); } else { isp_prt(isp, ISP_LOGDEBUG0, @@ -414,9 +412,7 @@ isp_unfreeze_loopdown(ispsoftc_t *isp, i isp_prt(isp, ISP_LOGDEBUG0, "Chan %d Release simq", chan); xpt_release_simq(fc->sim, 1); -#if __FreeBSD_version >= 1000039 xpt_release_boot(); -#endif } } } @@ -1736,10 +1732,6 @@ isp_target_putback_atio(union ccb *ccb) at->at_header.rqs_entry_count = 1; if (ISP_CAP_SCCFW(isp)) { at->at_scclun = (uint16_t) ccb->ccb_h.target_lun; -#if __FreeBSD_version < 1000700 - if (at->at_scclun >= 256) - at->at_scclun |= 0x4000; -#endif } else { at->at_lun = (uint8_t) ccb->ccb_h.target_lun; } @@ -1788,9 +1780,6 @@ isp_handle_platform_atio2(ispsoftc_t *is fcp = FCPARAM(isp, 0); if (ISP_CAP_SCCFW(isp)) { lun = aep->at_scclun; -#if __FreeBSD_version < 1000700 - lun &= 0x3fff; -#endif } else { lun = aep->at_lun; } @@ -1926,12 +1915,7 @@ isp_handle_platform_atio7(ispsoftc_t *is did = (aep->at_hdr.d_id[0] << 16) | (aep->at_hdr.d_id[1] << 8) | aep->at_hdr.d_id[2]; sid = (aep->at_hdr.s_id[0] << 16) | (aep->at_hdr.s_id[1] << 8) | aep->at_hdr.s_id[2]; -#if __FreeBSD_version >= 1000700 lun = CAM_EXTLUN_BYTE_SWIZZLE(be64dec(aep->at_cmnd.fcp_cmnd_lun)); -#else - lun = (aep->at_cmnd.fcp_cmnd_lun[0] & 0x3f << 8) | - aep->at_cmnd.fcp_cmnd_lun[1]; -#endif /* * Find the N-port handle, and Virtual Port Index for this command. @@ -2419,9 +2403,6 @@ isp_handle_platform_notify_fc(ispsoftc_t if (ISP_CAP_SCCFW(isp)) { lun = inp->in_scclun; -#if __FreeBSD_version < 1000700 - lun &= 0x3fff; -#endif } else { lun = inp->in_lun; } @@ -3879,12 +3860,7 @@ isp_action(struct cam_sim *sim, union cc fcparam *fcp = FCPARAM(isp, bus); cpi->hba_misc = PIM_NOBUSRESET | PIM_UNMAPPED; -#if __FreeBSD_version >= 1000700 - cpi->hba_misc |= PIM_EXTLUNS; -#endif -#if __FreeBSD_version >= 1000039 - cpi->hba_misc |= PIM_NOSCAN; -#endif + cpi->hba_misc |= PIM_EXTLUNS | PIM_NOSCAN; /* * Because our loop ID can shift from time to time, Modified: head/sys/dev/isp/isp_freebsd.h ============================================================================== --- head/sys/dev/isp/isp_freebsd.h Sun Mar 12 13:58:51 2017 (r315159) +++ head/sys/dev/isp/isp_freebsd.h Sun Mar 12 14:17:57 2017 (r315160) @@ -384,13 +384,8 @@ struct isposinfo { #define ISP_MEMCPY memcpy #define ISP_SNPRINTF snprintf #define ISP_DELAY(x) DELAY(x) -#if __FreeBSD_version < 1000029 -#define ISP_SLEEP(isp, x) msleep(&(isp)->isp_osinfo.is_exiting, \ - &(isp)->isp_osinfo.lock, 0, "isp_sleep", ((x) + tick - 1) / tick) -#else #define ISP_SLEEP(isp, x) msleep_sbt(&(isp)->isp_osinfo.is_exiting, \ &(isp)->isp_osinfo.lock, 0, "isp_sleep", (x) * SBT_1US, 0, 0) -#endif #define ISP_MIN imin Modified: head/sys/dev/isp/isp_target.c ============================================================================== --- head/sys/dev/isp/isp_target.c Sun Mar 12 13:58:51 2017 (r315159) +++ head/sys/dev/isp/isp_target.c Sun Mar 12 14:17:57 2017 (r315160) @@ -726,9 +726,6 @@ isp_got_msg_fc(ispsoftc_t *isp, in_fcent /* nt_tgt set in outer layers */ if (ISP_CAP_SCCFW(isp)) { notify.nt_lun = inp->in_scclun; -#if __FreeBSD_version < 1000700 - notify.nt_lun &= 0x3fff; -#endif } else { notify.nt_lun = inp->in_lun; } @@ -1017,9 +1014,6 @@ isp_handle_atio2(ispsoftc_t *isp, at2_en if (ISP_CAP_SCCFW(isp)) { lun = aep->at_scclun; -#if __FreeBSD_version < 1000700 - lun &= 0x3fff; -#endif } else { lun = aep->at_lun; } From owner-svn-src-head@freebsd.org Sun Mar 12 15:35:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30558D09032; Sun, 12 Mar 2017 15:35:30 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id EDE57114B; Sun, 12 Mar 2017 15:35:29 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 9AB73D64DCB; Mon, 13 Mar 2017 02:35:20 +1100 (AEDT) Date: Mon, 13 Mar 2017 02:35:19 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Andriy Gapon cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r315068 - head/sys/modules/qlxgbe In-Reply-To: <18e52ee7-0b27-7aff-6b69-75b27673a8f4@FreeBSD.org> Message-ID: <20170313020809.P31989@besplex.bde.org> References: <201703111516.v2BFGtkn006959@repo.freebsd.org> <20170312124945.C4483@besplex.bde.org> <18e52ee7-0b27-7aff-6b69-75b27673a8f4@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=AYLBJzfG c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=I_GFfGCxctvMgBUQ9gcA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 15:35:30 -0000 On Sun, 12 Mar 2017, Andriy Gapon wrote: > On 12/03/2017 04:44, Bruce Evans wrote: >> On Sat, 11 Mar 2017, Andriy Gapon wrote: >> >>> Log: >>> revert r314862, use of GCC_MS_EXTENSIONS in qlxgbe >>> >>> Commit r278913 made explicit use of GCC_MS_EXTENSIONS unnecessary. >>> >>> Requested by: glebius >> >> Does this module actually use ms extensions? This seems unlikely, since >> only gcc supports them. > > It probably doesn't. > >> My kernels compile correctly with the correct CFLAGS (gcc -std=gnu99 >> -fno-ms-extensions). > > How did you manage to pass -std=gnu99 to the module build? I edited kern.mk to change CSTD together with removing -fms-extensions. > No matter what flags I tried to modify the actual compiler invocations still had > -std=iso9899:1999 after -std=gnu99 in them, so my modifications had no effect. > GCC_MS_EXTENSIONS was the easiest way to get the job done. Hmm, more bugs: - kern.mk forces its wrong CSTD using '='. bsd.sys.mk uses '?=' as well as the correct CSTD. - -fms-extensions is now hard-coded too. However, it is a bit earlier in CFLAGS so might be easier to override. Controlling the order of CFLAGS has always been a problem. There are many undocumented macros and it isn't clear which ones are implementation details. Now I get -std second last and -Werror last CFLAGS. -Werror is set by WERROR?=, so WERROR can be used for overrides. Overriding -std is accepted and hopefully works. WERROR is before PROF in NORMAL_C, but PROF is not in NORMAL_S or PROFILE_C, so of you want to override PROF then you have to fix this or duplicate the overrides in WERROR and PROF. There are further problems with special rules. The ones for aesni are of nearly the lowest quality. These ensure breaking gcc using the order WERROR, NO_CAST_QUAL, PROF, then main unportable -m's (with at least -msse4 unsupported by gcc-4.2.1), then .IMPSRC. Bruce From owner-svn-src-head@freebsd.org Sun Mar 12 15:36:09 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C233D090A5; Sun, 12 Mar 2017 15:36:09 +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 mx1.freebsd.org (Postfix) with ESMTPS id C203C12AE; Sun, 12 Mar 2017 15:36:08 +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 v2CFa7As016636; Sun, 12 Mar 2017 15:36:07 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2CFa78J016633; Sun, 12 Mar 2017 15:36:07 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703121536.v2CFa78J016633@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 12 Mar 2017 15:36:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315161 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 15:36:09 -0000 Author: mav Date: Sun Mar 12 15:36:07 2017 New Revision: 315161 URL: https://svnweb.freebsd.org/changeset/base/315161 Log: Try to slight untangle I/O and loop status handling. MFC after: 2 weeks Modified: head/sys/dev/isp/isp.c head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_freebsd.h Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Sun Mar 12 14:17:57 2017 (r315160) +++ head/sys/dev/isp/isp.c Sun Mar 12 15:36:07 2017 (r315161) @@ -4343,13 +4343,6 @@ isp_start(XS_T *xs) return (CMD_COMPLETE); } - /* - * Try again later. - */ - if (fcp->isp_loopstate != LOOP_READY) { - return (CMD_RQLATER); - } - isp_prt(isp, ISP_LOGDEBUG2, "XS_TGT(xs)=%d", target); lp = &fcp->portdb[target]; if (target < 0 || target >= MAX_FC_TARG || @@ -4357,6 +4350,12 @@ isp_start(XS_T *xs) XS_SETERR(xs, HBA_SELTIMEOUT); return (CMD_COMPLETE); } + if (fcp->isp_loopstate != LOOP_READY) { + isp_prt(isp, ISP_LOGDEBUG1, + "%d.%d.%jx loop is not ready", + XS_CHANNEL(xs), target, (uintmax_t)XS_LUN(xs)); + return (CMD_RQLATER); + } if (lp->state == FC_PORTDB_STATE_ZOMBIE) { isp_prt(isp, ISP_LOGDEBUG1, "%d.%d.%jx target zombie", @@ -6544,7 +6543,8 @@ isp_parse_status(ispsoftc_t *isp, ispsta case RQCS_PORT_CHANGED: isp_prt(isp, ISP_LOGWARN, "port changed for target %d", XS_TGT(xs)); if (XS_NOERR(xs)) { - XS_SETERR(xs, HBA_SELTIMEOUT); + *XS_STSP(xs) = SCSI_BUSY; + XS_SETERR(xs, HBA_TGTBSY); } return; @@ -6693,11 +6693,11 @@ isp_parse_status_24xx(ispsoftc_t *isp, i case RQCS_PORT_CHANGED: isp_prt(isp, ISP_LOGWARN, "port changed for target %d chan %d", XS_TGT(xs), chan); if (XS_NOERR(xs)) { - XS_SETERR(xs, HBA_SELTIMEOUT); + *XS_STSP(xs) = SCSI_BUSY; + XS_SETERR(xs, HBA_TGTBSY); } return; - case RQCS_24XX_ENOMEM: /* f/w resource unavailable */ isp_prt(isp, ISP_LOGWARN, "f/w resource unavailable for target %d chan %d", XS_TGT(xs), chan); if (XS_NOERR(xs)) { Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Sun Mar 12 14:17:57 2017 (r315160) +++ head/sys/dev/isp/isp_freebsd.c Sun Mar 12 15:36:07 2017 (r315161) @@ -3073,7 +3073,6 @@ isp_loop_changed(ispsoftc_t *isp, int ch isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "Chan %d Loop changed", chan); if (fcp->role & ISP_ROLE_INITIATOR) isp_freeze_loopdown(isp, chan); - fc->loop_dead = 0; fc->loop_down_time = time_uptime; wakeup(fc); } @@ -3085,7 +3084,6 @@ isp_loop_up(ispsoftc_t *isp, int chan) isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "Chan %d Loop is up", chan); fc->loop_seen_once = 1; - fc->loop_dead = 0; fc->loop_down_time = 0; isp_unfreeze_loopdown(isp, chan); } @@ -3149,7 +3147,6 @@ isp_loop_dead(ispsoftc_t *isp, int chan) } isp_unfreeze_loopdown(isp, chan); - fc->loop_dead = 1; fc->loop_down_time = 0; } @@ -3377,18 +3374,6 @@ isp_action(struct cam_sim *sim, union cc callout_reset(&PISP_PCMD(ccb)->wdog, ts, isp_watchdog, ccb); break; case CMD_RQLATER: - /* - * We get this result if the loop isn't ready - * or if the device in question has gone zombie. - */ - if (ISP_FC_PC(isp, bus)->loop_dead) { - isp_prt(isp, ISP_LOGDEBUG0, - "%d.%jx loop is dead", - XS_TGT(ccb), (uintmax_t)XS_LUN(ccb)); - ccb->ccb_h.status = CAM_SEL_TIMEOUT; - isp_done((struct ccb_scsiio *) ccb); - break; - } isp_prt(isp, ISP_LOGDEBUG0, "%d.%jx retry later", XS_TGT(ccb), (uintmax_t)XS_LUN(ccb)); cam_freeze_devq(ccb->ccb_h.path); @@ -3913,8 +3898,6 @@ isp_action(struct cam_sim *sim, union cc } } -#define ISPDDB (CAM_DEBUG_INFO|CAM_DEBUG_TRACE|CAM_DEBUG_CDB) - void isp_done(XS_T *sccb) { @@ -3935,27 +3918,10 @@ isp_done(XS_T *sccb) sccb->ccb_h.status &= ~CAM_SIM_QUEUED; status = sccb->ccb_h.status & CAM_STATUS_MASK; - if (status != CAM_REQ_CMP) { - if (status != CAM_SEL_TIMEOUT) - isp_prt(isp, ISP_LOGDEBUG0, - "target %d lun %jx CAM status 0x%x SCSI status 0x%x", - XS_TGT(sccb), (uintmax_t)XS_LUN(sccb), - sccb->ccb_h.status, sccb->scsi_status); - else if ((IS_FC(isp)) - && (XS_TGT(sccb) < MAX_FC_TARG)) { - fcparam *fcp; - - fcp = FCPARAM(isp, XS_CHANNEL(sccb)); - fcp->portdb[XS_TGT(sccb)].is_target = 0; - } - if ((sccb->ccb_h.status & CAM_DEV_QFRZN) == 0) { - sccb->ccb_h.status |= CAM_DEV_QFRZN; - xpt_freeze_devq(sccb->ccb_h.path, 1); - } - } - - if ((CAM_DEBUGGED(sccb->ccb_h.path, ISPDDB)) && (sccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { - xpt_print(sccb->ccb_h.path, "cam completion status 0x%x\n", sccb->ccb_h.status); + if (status != CAM_REQ_CMP && + (sccb->ccb_h.status & CAM_DEV_QFRZN) == 0) { + sccb->ccb_h.status |= CAM_DEV_QFRZN; + xpt_freeze_devq(sccb->ccb_h.path, 1); } if (ISP_PCMD(sccb)) { Modified: head/sys/dev/isp/isp_freebsd.h ============================================================================== --- head/sys/dev/isp/isp_freebsd.h Sun Mar 12 14:17:57 2017 (r315160) +++ head/sys/dev/isp/isp_freebsd.h Sun Mar 12 15:36:07 2017 (r315161) @@ -225,8 +225,6 @@ struct isp_fc { simqfrozen : 3, default_id : 8, def_role : 2, /* default role */ - gdt_running : 1, - loop_dead : 1, loop_seen_once : 1, fcbsy : 1, ready : 1; From owner-svn-src-head@freebsd.org Sun Mar 12 16:03:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1A18D09BFB; Sun, 12 Mar 2017 16:03:36 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F9401157; Sun, 12 Mar 2017 16:03:36 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2CG3ZgT028604; Sun, 12 Mar 2017 16:03:35 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2CG3YdU028591; Sun, 12 Mar 2017 16:03:34 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201703121603.v2CG3YdU028591@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 12 Mar 2017 16:03:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315162 - in head/lib/libc: gen iconv net regex rpc stdio stdlib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 16:03:36 -0000 Author: pfg Date: Sun Mar 12 16:03:34 2017 New Revision: 315162 URL: https://svnweb.freebsd.org/changeset/base/315162 Log: libc: provide some bounds-checking through reallocarray(3). reallocarray(3) is a non portable extension that originated in OpenBSD. Given that it is already in FreeBSD's libc it is useful for the cases where reallocation involves a multiplication. MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D9955 Modified: head/lib/libc/gen/glob.c head/lib/libc/gen/scandir.c head/lib/libc/gen/setmode.c head/lib/libc/gen/wordexp.c head/lib/libc/iconv/citrus_esdb.c head/lib/libc/net/nsdispatch.c head/lib/libc/regex/regcomp.c head/lib/libc/rpc/getnetconfig.c head/lib/libc/stdio/open_wmemstream.c head/lib/libc/stdio/printf-pos.c head/lib/libc/stdio/ungetc.c head/lib/libc/stdlib/getenv.c Modified: head/lib/libc/gen/glob.c ============================================================================== --- head/lib/libc/gen/glob.c Sun Mar 12 15:36:07 2017 (r315161) +++ head/lib/libc/gen/glob.c Sun Mar 12 16:03:34 2017 (r315162) @@ -850,7 +850,7 @@ globextend(const Char *path, glob_t *pgl const char *origpat) { char **pathv; - size_t i, newsize, len; + size_t i, newn, len; char *copy; const Char *p; @@ -860,9 +860,9 @@ globextend(const Char *path, glob_t *pgl return (GLOB_NOSPACE); } - newsize = sizeof(*pathv) * (2 + pglob->gl_pathc + pglob->gl_offs); - /* realloc(NULL, newsize) is equivalent to malloc(newsize). */ - pathv = realloc((void *)pglob->gl_pathv, newsize); + newn = 2 + pglob->gl_pathc + pglob->gl_offs; + /* reallocarray(NULL, newn, size) is equivalent to malloc(newn*size). */ + pathv = reallocarray(pglob->gl_pathv, newn, sizeof(*pathv)); if (pathv == NULL) return (GLOB_NOSPACE); Modified: head/lib/libc/gen/scandir.c ============================================================================== --- head/lib/libc/gen/scandir.c Sun Mar 12 15:36:07 2017 (r315161) +++ head/lib/libc/gen/scandir.c Sun Mar 12 16:03:34 2017 (r315162) @@ -116,8 +116,8 @@ scandir(const char *dirname, struct dire if (numitems >= arraysz) { struct dirent **names2; - names2 = (struct dirent **)realloc((char *)names, - (arraysz * 2) * sizeof(struct dirent *)); + names2 = reallocarray(names, arraysz, + 2 * sizeof(struct dirent *)); if (names2 == NULL) { free(p); goto fail; Modified: head/lib/libc/gen/setmode.c ============================================================================== --- head/lib/libc/gen/setmode.c Sun Mar 12 15:36:07 2017 (r315161) +++ head/lib/libc/gen/setmode.c Sun Mar 12 16:03:34 2017 (r315162) @@ -155,7 +155,7 @@ common: if (set->cmd2 & CMD2_CLR) { if (set >= endset) { \ BITCMD *newset; \ setlen += SET_LEN_INCR; \ - newset = realloc(saveset, sizeof(BITCMD) * setlen); \ + newset = reallocarray(saveset, setlen, sizeof(BITCMD)); \ if (newset == NULL) \ goto out; \ set = newset + (set - saveset); \ Modified: head/lib/libc/gen/wordexp.c ============================================================================== --- head/lib/libc/gen/wordexp.c Sun Mar 12 15:36:07 2017 (r315161) +++ head/lib/libc/gen/wordexp.c Sun Mar 12 16:03:34 2017 (r315162) @@ -234,8 +234,8 @@ we_askshell(const char *words, wordexp_t vofs += we->we_offs; we->we_wordc += nwords; we->we_nbytes += nbytes; - if ((nwv = realloc(we->we_wordv, (we->we_wordc + 1 + - (flags & WRDE_DOOFFS ? we->we_offs : 0)) * + if ((nwv = reallocarray(we->we_wordv, (we->we_wordc + 1 + + (flags & WRDE_DOOFFS ? we->we_offs : 0)), sizeof(char *))) == NULL) { error = WRDE_NOSPACE; goto cleanup; Modified: head/lib/libc/iconv/citrus_esdb.c ============================================================================== --- head/lib/libc/iconv/citrus_esdb.c Sun Mar 12 15:36:07 2017 (r315161) +++ head/lib/libc/iconv/citrus_esdb.c Sun Mar 12 16:03:34 2017 (r315162) @@ -347,7 +347,7 @@ _citrus_esdb_get_list(char ***rlist, siz ret = 0; /* XXX: why reallocing the list space posteriorly? shouldn't be done earlier? */ - q = realloc(list, num * sizeof(char *)); + q = reallocarray(list, num, sizeof(char *)); if (!q) { ret = ENOMEM; goto quit3; Modified: head/lib/libc/net/nsdispatch.c ============================================================================== --- head/lib/libc/net/nsdispatch.c Sun Mar 12 15:36:07 2017 (r315161) +++ head/lib/libc/net/nsdispatch.c Sun Mar 12 16:03:34 2017 (r315162) @@ -213,7 +213,7 @@ vector_append(const void *elem, void *ve void *p; if ((*count % ELEMSPERCHUNK) == 0) { - p = realloc(vec, (*count + ELEMSPERCHUNK) * esize); + p = reallocarray(vec, *count + ELEMSPERCHUNK, esize); if (p == NULL) { nss_log_simple(LOG_ERR, "memory allocation failure"); return (vec); Modified: head/lib/libc/regex/regcomp.c ============================================================================== --- head/lib/libc/regex/regcomp.c Sun Mar 12 15:36:07 2017 (r315161) +++ head/lib/libc/regex/regcomp.c Sun Mar 12 16:03:34 2017 (r315162) @@ -1143,7 +1143,7 @@ allocset(struct parse *p) { cset *cs, *ncs; - ncs = realloc(p->g->sets, (p->g->ncsets + 1) * sizeof(*ncs)); + ncs = reallocarray(p->g->sets, p->g->ncsets + 1, sizeof(*ncs)); if (ncs == NULL) { SETERROR(REG_ESPACE); return (NULL); @@ -1206,7 +1206,7 @@ CHadd(struct parse *p, cset *cs, wint_t if (ch < NC) cs->bmp[ch >> 3] |= 1 << (ch & 7); else { - newwides = realloc(cs->wides, (cs->nwides + 1) * + newwides = reallocarray(cs->wides, cs->nwides + 1, sizeof(*cs->wides)); if (newwides == NULL) { SETERROR(REG_ESPACE); @@ -1235,7 +1235,7 @@ CHaddrange(struct parse *p, cset *cs, wi CHadd(p, cs, min); if (min >= max) return; - newranges = realloc(cs->ranges, (cs->nranges + 1) * + newranges = reallocarray(cs->ranges, cs->nranges + 1, sizeof(*cs->ranges)); if (newranges == NULL) { SETERROR(REG_ESPACE); @@ -1259,7 +1259,7 @@ CHaddtype(struct parse *p, cset *cs, wct for (i = 0; i < NC; i++) if (iswctype(i, wct)) CHadd(p, cs, i); - newtypes = realloc(cs->types, (cs->ntypes + 1) * + newtypes = reallocarray(cs->types, cs->ntypes + 1, sizeof(*cs->types)); if (newtypes == NULL) { SETERROR(REG_ESPACE); @@ -1382,7 +1382,7 @@ enlarge(struct parse *p, sopno size) if (p->ssize >= size) return 1; - sp = (sop *)realloc(p->strip, size*sizeof(sop)); + sp = reallocarray(p->strip, size, sizeof(sop)); if (sp == NULL) { SETERROR(REG_ESPACE); return 0; @@ -1400,7 +1400,7 @@ static void stripsnug(struct parse *p, struct re_guts *g) { g->nstates = p->slen; - g->strip = (sop *)realloc((char *)p->strip, p->slen * sizeof(sop)); + g->strip = reallocarray((char *)p->strip, p->slen, sizeof(sop)); if (g->strip == NULL) { SETERROR(REG_ESPACE); g->strip = p->strip; Modified: head/lib/libc/rpc/getnetconfig.c ============================================================================== --- head/lib/libc/rpc/getnetconfig.c Sun Mar 12 15:36:07 2017 (r315161) +++ head/lib/libc/rpc/getnetconfig.c Sun Mar 12 16:03:34 2017 (r315162) @@ -630,8 +630,8 @@ parse_ncp(char *stringp, struct netconfi ncp->nc_lookups = NULL; ncp->nc_nlookups = 0; while ((cp = tokenp) != NULL) { - if ((nc_lookups = realloc(ncp->nc_lookups, - (ncp->nc_nlookups + 1) * sizeof *ncp->nc_lookups)) == NULL) { + if ((nc_lookups = reallocarray(ncp->nc_lookups, + ncp->nc_nlookups + 1, sizeof(*ncp->nc_lookups))) == NULL) { free(ncp->nc_lookups); ncp->nc_lookups = NULL; return (-1); Modified: head/lib/libc/stdio/open_wmemstream.c ============================================================================== --- head/lib/libc/stdio/open_wmemstream.c Sun Mar 12 15:36:07 2017 (r315161) +++ head/lib/libc/stdio/open_wmemstream.c Sun Mar 12 16:03:34 2017 (r315162) @@ -63,7 +63,7 @@ wmemstream_grow(struct wmemstream *ms, f else newsize = newoff; if (newsize > ms->len) { - buf = realloc(*ms->bufp, (newsize + 1) * sizeof(wchar_t)); + buf = reallocarray(*ms->bufp, newsize + 1, sizeof(wchar_t)); if (buf != NULL) { #ifdef DEBUG fprintf(stderr, "WMS: %p growing from %zd to %zd\n", Modified: head/lib/libc/stdio/printf-pos.c ============================================================================== --- head/lib/libc/stdio/printf-pos.c Sun Mar 12 15:36:07 2017 (r315161) +++ head/lib/libc/stdio/printf-pos.c Sun Mar 12 16:03:34 2017 (r315162) @@ -655,7 +655,7 @@ __grow_type_table(struct typetable *type return (-1); bcopy(oldtable, newtable, oldsize * sizeof(enum typeid)); } else { - newtable = realloc(oldtable, newsize * sizeof(enum typeid)); + newtable = reallocarray(oldtable, newsize, sizeof(enum typeid)); if (newtable == NULL) return (-1); } Modified: head/lib/libc/stdio/ungetc.c ============================================================================== --- head/lib/libc/stdio/ungetc.c Sun Mar 12 15:36:07 2017 (r315161) +++ head/lib/libc/stdio/ungetc.c Sun Mar 12 16:03:34 2017 (r315162) @@ -73,14 +73,14 @@ __submore(FILE *fp) return (0); } i = fp->_ub._size; - p = realloc(fp->_ub._base, (size_t)(i << 1)); + p = reallocarray(fp->_ub._base, i, 2); if (p == NULL) return (EOF); /* no overlap (hence can use memcpy) because we doubled the size */ (void)memcpy((void *)(p + i), (void *)p, (size_t)i); fp->_p = p + i; fp->_ub._base = p; - fp->_ub._size = i << 1; + fp->_ub._size = i * 2; return (0); } Modified: head/lib/libc/stdlib/getenv.c ============================================================================== --- head/lib/libc/stdlib/getenv.c Sun Mar 12 15:36:07 2017 (r315161) +++ head/lib/libc/stdlib/getenv.c Sun Mar 12 16:03:34 2017 (r315162) @@ -272,8 +272,8 @@ __rebuild_environ(int newEnvironSize) /* Resize environ. */ if (newEnvironSize > environSize) { tmpEnvironSize = newEnvironSize * 2; - tmpEnviron = realloc(intEnviron, sizeof (*intEnviron) * - (tmpEnvironSize + 1)); + tmpEnviron = reallocarray(intEnviron, tmpEnvironSize + 1, + sizeof(*intEnviron)); if (tmpEnviron == NULL) return (-1); environSize = tmpEnvironSize; @@ -306,8 +306,8 @@ __enlarge_env(void) envVarsTotal++; if (envVarsTotal > envVarsSize) { newEnvVarsSize = envVarsTotal * 2; - tmpEnvVars = realloc(envVars, sizeof (*envVars) * - newEnvVarsSize); + tmpEnvVars = reallocarray(envVars, newEnvVarsSize, + sizeof(*envVars)); if (tmpEnvVars == NULL) { envVarsTotal--; return (false); From owner-svn-src-head@freebsd.org Sun Mar 12 16:55:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2FD60D09940; Sun, 12 Mar 2017 16:55:20 +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 mx1.freebsd.org (Postfix) with ESMTPS id 07F6217F5; Sun, 12 Mar 2017 16:55:19 +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 v2CGtJBp049533; Sun, 12 Mar 2017 16:55:19 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2CGtIjX049531; Sun, 12 Mar 2017 16:55:18 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703121655.v2CGtIjX049531@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 12 Mar 2017 16:55:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315163 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 16:55:20 -0000 Author: mav Date: Sun Mar 12 16:55:18 2017 New Revision: 315163 URL: https://svnweb.freebsd.org/changeset/base/315163 Log: Remove strange config_intrhook_establish() magic. Interrupts are enabled as part of chip reset just during driver attach. Later "enabling" of already enabled interrupts is useless. MFC after: 2 weeks Modified: head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_freebsd.h Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Sun Mar 12 16:03:34 2017 (r315162) +++ head/sys/dev/isp/isp_freebsd.c Sun Mar 12 16:55:18 2017 (r315163) @@ -278,25 +278,11 @@ isp_attach(ispsoftc_t *isp) int du = device_get_unit(isp->isp_dev); int chan; - isp->isp_osinfo.ehook.ich_func = isp_intr_enable; - isp->isp_osinfo.ehook.ich_arg = isp; - /* - * Haha. Set this first, because if we're loaded as a module isp_intr_enable - * will be called right awawy, which will clear isp_osinfo.ehook_active, - * which would be unwise to then set again later. - */ - isp->isp_osinfo.ehook_active = 1; - if (config_intrhook_establish(&isp->isp_osinfo.ehook) != 0) { - isp_prt(isp, ISP_LOGERR, "could not establish interrupt enable hook"); - return (-EIO); - } - /* * Create the device queue for our SIM(s). */ isp->isp_osinfo.devq = cam_simq_alloc(isp->isp_maxcmds); if (isp->isp_osinfo.devq == NULL) { - config_intrhook_disestablish(&isp->isp_osinfo.ehook); return (EIO); } @@ -330,10 +316,6 @@ unwind: ISP_UNLOCK(isp); cam_sim_free(sim, FALSE); } - if (isp->isp_osinfo.ehook_active) { - config_intrhook_disestablish(&isp->isp_osinfo.ehook); - isp->isp_osinfo.ehook_active = 0; - } if (isp->isp_osinfo.cdev) { destroy_dev(isp->isp_osinfo.cdev); isp->isp_osinfo.cdev = NULL; @@ -371,10 +353,6 @@ isp_detach(ispsoftc_t *isp) destroy_dev(isp->isp_osinfo.cdev); isp->isp_osinfo.cdev = NULL; } - if (isp->isp_osinfo.ehook_active) { - config_intrhook_disestablish(&isp->isp_osinfo.ehook); - isp->isp_osinfo.ehook_active = 0; - } if (isp->isp_osinfo.devq != NULL) { cam_simq_free(isp->isp_osinfo.devq); isp->isp_osinfo.devq = NULL; @@ -786,28 +764,6 @@ ispioctl(struct cdev *dev, u_long c, cad return (retval); } -static void -isp_intr_enable(void *arg) -{ - int chan; - ispsoftc_t *isp = arg; - ISP_LOCK(isp); - if (IS_FC(isp)) { - for (chan = 0; chan < isp->isp_nchan; chan++) { - if (FCPARAM(isp, chan)->role != ISP_ROLE_NONE) { - ISP_ENABLE_INTS(isp); - break; - } - } - } else { - ISP_ENABLE_INTS(isp); - } - isp->isp_osinfo.ehook_active = 0; - ISP_UNLOCK(isp); - /* Release our hook so that the boot can continue. */ - config_intrhook_disestablish(&isp->isp_osinfo.ehook); -} - /* * Local Inlines */ Modified: head/sys/dev/isp/isp_freebsd.h ============================================================================== --- head/sys/dev/isp/isp_freebsd.h Sun Mar 12 16:03:34 2017 (r315162) +++ head/sys/dev/isp/isp_freebsd.h Sun Mar 12 16:55:18 2017 (r315163) @@ -270,7 +270,6 @@ struct isposinfo { struct mtx lock; device_t dev; struct cdev * cdev; - struct intr_config_hook ehook; struct cam_devq * devq; /* @@ -310,7 +309,6 @@ struct isposinfo { sixtyfourbit : 1, /* sixtyfour bit platform */ timer_active : 1, autoconf : 1, - ehook_active : 1, mbox_sleeping : 1, mbox_sleep_ok : 1, mboxcmd_done : 1, From owner-svn-src-head@freebsd.org Sun Mar 12 17:15:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9098BD0915B; Sun, 12 Mar 2017 17:15:56 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lauren.room52.net (unknown [IPv6:2001:19f0:5801:2ba:5400:ff:fe59:15d6]) (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 511081305; Sun, 12 Mar 2017 17:15:56 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lgwl-lstewart2.corp.netflix.com (c110-22-60-167.eburwd6.vic.optusnet.com.au [110.22.60.167]) by lauren.room52.net (Postfix) with ESMTPSA id B375AC71; Mon, 13 Mar 2017 04:15:39 +1100 (AEDT) Subject: Re: svn commit: r314780 - head/lib/libpam/modules/pam_exec To: "Pedro F. Giffuni" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201703061545.v26FjkNI027057@repo.freebsd.org> From: Lawrence Stewart Message-ID: <739617a4-3eed-28d1-73e4-86d25d6d5fed@freebsd.org> Date: Mon, 13 Mar 2017 04:14:14 +1100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <201703061545.v26FjkNI027057@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 17:15:56 -0000 Hi Pedro, On 07/03/2017 02:45, Pedro F. Giffuni wrote: > Author: pfg > Date: Mon Mar 6 15:45:46 2017 > New Revision: 314780 > URL: https://svnweb.freebsd.org/changeset/base/314780 > > Log: > libpam: extra bounds checking through reallocarray(3). > > Reviewed by: des > MFC after: 1 week > > Modified: > head/lib/libpam/modules/pam_exec/pam_exec.c > > Modified: head/lib/libpam/modules/pam_exec/pam_exec.c > ============================================================================== > --- head/lib/libpam/modules/pam_exec/pam_exec.c Mon Mar 6 15:42:03 2017 (r314779) > +++ head/lib/libpam/modules/pam_exec/pam_exec.c Mon Mar 6 15:45:46 2017 (r314780) > @@ -138,7 +138,7 @@ _pam_exec(pam_handle_t *pamh __unused, > nitems = sizeof(env_items) / sizeof(*env_items); > /* Count PAM return values put in the environment. */ > nitems_rv = options->return_prog_exit_status ? PAM_RV_COUNT : 0; > - tmp = realloc(envlist, (envlen + nitems + 1 + nitems_rv + 1) * > + tmp = reallocarray(envlist, envlen + nitems + 1 + nitems_rv + 1, > sizeof(*envlist)); > if (tmp == NULL) { > openpam_free_envlist(envlist); > This commit breaks pam_exec for me... without this change I see the expected PAM_* environment variables from my execed script, but with this change I no longer see any of them. Cheers, Lawrence From owner-svn-src-head@freebsd.org Sun Mar 12 17:27:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C90D7D09475 for ; Sun, 12 Mar 2017 17:27:15 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm1-vm0.bullet.mail.ne1.yahoo.com (nm1-vm0.bullet.mail.ne1.yahoo.com [98.138.91.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 949BE1858 for ; Sun, 12 Mar 2017 17:27:15 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1489339628; bh=sHTBfKWy5CSYToi5T/X9RoEXrQJRrx4tKzIcnAXWNPw=; h=Subject:To:References:From:Date:In-Reply-To:From:Subject; b=KFRSz8ZkhcNK0tppXZBRTOdzvYhie0GMOs5W/zVJKEHxVNH0ngK3kduZtyK5BaFsnUCytUjcHVULb6BOjIw3555W+xOwhC8w5gkzu7X8RY0dNn2vjVj1msRNMWsgLGL5FB6F4mVAyVs0mKgRjb3xAkW5EaCtD2528dFFagAYmLMf+/0Tphnv+TetD5ZVovD6NpV+3lh8kSxxbRWwJ9VXi7jifCodQL3yq52WTeneSfF26t2FRCdcuztu7dAhe2a4o9iQFTaHS/++2Px8VdfRnjD8bUnDa/MT6Qlc5kY674sNS/3ntYRGJq+2Tqm6c+SyhgelYohXLhbviKA3EMXGvg== Received: from [98.138.101.131] by nm1.bullet.mail.ne1.yahoo.com with NNFMP; 12 Mar 2017 17:27:08 -0000 Received: from [98.138.226.128] by tm19.bullet.mail.ne1.yahoo.com with NNFMP; 12 Mar 2017 17:27:08 -0000 Received: from [127.0.0.1] by smtp215.mail.ne1.yahoo.com with NNFMP; 12 Mar 2017 17:27:08 -0000 X-Yahoo-Newman-Id: 87942.82415.bm@smtp215.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: zXD0roQVM1mJ6yJh02ZGuIVJ6ZsUBkygbCxTkP6Z85_OykK Cjlum.bfqFNvDQost5qyJCc2wZG7lYh8ODewTNoqzASdEvXCEIxT4SuYBA0m 3h1fbBZ5NVqJOVKmuB6TWU67K9hylQ0ihDndvMXO5zEnH.3WRrZeO9P21tPO 2rg.d2Iln5PcazQ4SWrIjVg_sorgoR5U0UmCDMZ9yrBFKl5t14e4eSmv.xnM 0QfRvzfAEyG.eokZjaU_8sa0ffvHf81o2MDCSfoLCrZ9njon46C0eQGmDxTE lKC_ei79Z2.6Lva7uLDDiGwhve_T38DVHZjjNQ.eBk.BJH0whVshVe_qEqar CWk.GLi84Lr5gku_IKP3AXaAUBpVPx0ifKqRNa6sVKWscXvm6lhTIWVBXrGY DT2cNyy3YVmh585czsEo8tTwoKm3pBwM_V8Uz0wm8tlKQEOmkxDIcFb8C2bg 8H1grv5q257x5K0YXt1tOD8UMpiyXoWYtCHByQIVfWuku1Ta7gkrlGlYdAbi eKfrwdiHbWY_SRYYz.X6CHBQ_qIcJT0Lxx8__k5.ectZRgUA- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r314780 - head/lib/libpam/modules/pam_exec To: Lawrence Stewart , src-committers@freebsd.org, =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= , svn-src-head@freebsd.org References: <201703061545.v26FjkNI027057@repo.freebsd.org> <739617a4-3eed-28d1-73e4-86d25d6d5fed@freebsd.org> From: Pedro Giffuni Message-ID: <1839903b-fb05-bf3f-17bb-697afca9ecb7@FreeBSD.org> Date: Sun, 12 Mar 2017 12:30:14 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <739617a4-3eed-28d1-73e4-86d25d6d5fed@freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 17:27:15 -0000 On 3/12/2017 12:14 PM, Lawrence Stewart wrote: > Hi Pedro, > > On 07/03/2017 02:45, Pedro F. Giffuni wrote: >> Author: pfg >> Date: Mon Mar 6 15:45:46 2017 >> New Revision: 314780 >> URL: https://svnweb.freebsd.org/changeset/base/314780 >> >> Log: >> libpam: extra bounds checking through reallocarray(3). >> >> Reviewed by: des >> MFC after: 1 week >> >> Modified: >> head/lib/libpam/modules/pam_exec/pam_exec.c >> >> Modified: head/lib/libpam/modules/pam_exec/pam_exec.c >> ============================================================================== >> --- head/lib/libpam/modules/pam_exec/pam_exec.c Mon Mar 6 15:42:03 2017 (r314779) >> +++ head/lib/libpam/modules/pam_exec/pam_exec.c Mon Mar 6 15:45:46 2017 (r314780) >> @@ -138,7 +138,7 @@ _pam_exec(pam_handle_t *pamh __unused, >> nitems = sizeof(env_items) / sizeof(*env_items); >> /* Count PAM return values put in the environment. */ >> nitems_rv = options->return_prog_exit_status ? PAM_RV_COUNT : 0; >> - tmp = realloc(envlist, (envlen + nitems + 1 + nitems_rv + 1) * >> + tmp = reallocarray(envlist, envlen + nitems + 1 + nitems_rv + 1, >> sizeof(*envlist)); >> if (tmp == NULL) { >> openpam_free_envlist(envlist); >> > This commit breaks pam_exec for me... without this change I see the > expected PAM_* environment variables from my execed script, but with > this change I no longer see any of them. Thanks for the report. It seems strange this can cause any failure. Perhaps there is a latent overflow here and we have been living with it? I will revert while it is investigated. BTW, the "nitems" variable may conflict with nitems() in sys/param.h. Pedro. From owner-svn-src-head@freebsd.org Sun Mar 12 17:41:53 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 232D6D09AA0; Sun, 12 Mar 2017 17:41:53 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E45CA1BCF; Sun, 12 Mar 2017 17:41:52 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2CHfp8U070218; Sun, 12 Mar 2017 17:41:51 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2CHfpSA070217; Sun, 12 Mar 2017 17:41:51 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201703121741.v2CHfpSA070217@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 12 Mar 2017 17:41:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315164 - head/lib/libpam/modules/pam_exec X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 17:41:53 -0000 Author: pfg Date: Sun Mar 12 17:41:51 2017 New Revision: 315164 URL: https://svnweb.freebsd.org/changeset/base/315164 Log: Revert r314780 libpam: extra bounds checking through reallocarray(3). It appears to be causing brokenness when reporting PAM_* environment variables. This requires more investigation. Reported by: lstewart Modified: head/lib/libpam/modules/pam_exec/pam_exec.c Modified: head/lib/libpam/modules/pam_exec/pam_exec.c ============================================================================== --- head/lib/libpam/modules/pam_exec/pam_exec.c Sun Mar 12 16:55:18 2017 (r315163) +++ head/lib/libpam/modules/pam_exec/pam_exec.c Sun Mar 12 17:41:51 2017 (r315164) @@ -138,7 +138,7 @@ _pam_exec(pam_handle_t *pamh __unused, nitems = sizeof(env_items) / sizeof(*env_items); /* Count PAM return values put in the environment. */ nitems_rv = options->return_prog_exit_status ? PAM_RV_COUNT : 0; - tmp = reallocarray(envlist, envlen + nitems + 1 + nitems_rv + 1, + tmp = realloc(envlist, (envlen + nitems + 1 + nitems_rv + 1) * sizeof(*envlist)); if (tmp == NULL) { openpam_free_envlist(envlist); From owner-svn-src-head@freebsd.org Sun Mar 12 17:42:00 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DE21D09AD1 for ; Sun, 12 Mar 2017 17:42:00 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lauren.room52.net (unknown [IPv6:2001:19f0:5801:2ba:5400:ff:fe59:15d6]) (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 BB68D1C3E; Sun, 12 Mar 2017 17:41:59 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lgwl-lstewart2.corp.netflix.com (c110-22-60-167.eburwd6.vic.optusnet.com.au [110.22.60.167]) by lauren.room52.net (Postfix) with ESMTPSA id B22B0C96; Mon, 13 Mar 2017 04:41:54 +1100 (AEDT) Subject: Re: svn commit: r314780 - head/lib/libpam/modules/pam_exec To: Pedro Giffuni , src-committers@FreeBSD.org, =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= , svn-src-head@FreeBSD.org References: <201703061545.v26FjkNI027057@repo.freebsd.org> <739617a4-3eed-28d1-73e4-86d25d6d5fed@freebsd.org> <1839903b-fb05-bf3f-17bb-697afca9ecb7@FreeBSD.org> From: Lawrence Stewart Message-ID: Date: Mon, 13 Mar 2017 04:40:29 +1100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <1839903b-fb05-bf3f-17bb-697afca9ecb7@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 17:42:00 -0000 On 13/03/2017 04:30, Pedro Giffuni wrote: > > > On 3/12/2017 12:14 PM, Lawrence Stewart wrote: >> Hi Pedro, >> >> On 07/03/2017 02:45, Pedro F. Giffuni wrote: >>> Author: pfg >>> Date: Mon Mar 6 15:45:46 2017 >>> New Revision: 314780 >>> URL: https://svnweb.freebsd.org/changeset/base/314780 >>> >>> Log: >>> libpam: extra bounds checking through reallocarray(3). >>> Reviewed by: des >>> MFC after: 1 week >>> >>> Modified: >>> head/lib/libpam/modules/pam_exec/pam_exec.c >>> >>> Modified: head/lib/libpam/modules/pam_exec/pam_exec.c >>> ============================================================================== >>> >>> --- head/lib/libpam/modules/pam_exec/pam_exec.c Mon Mar 6 >>> 15:42:03 2017 (r314779) >>> +++ head/lib/libpam/modules/pam_exec/pam_exec.c Mon Mar 6 >>> 15:45:46 2017 (r314780) >>> @@ -138,7 +138,7 @@ _pam_exec(pam_handle_t *pamh __unused, >>> nitems = sizeof(env_items) / sizeof(*env_items); >>> /* Count PAM return values put in the environment. */ >>> nitems_rv = options->return_prog_exit_status ? PAM_RV_COUNT : 0; >>> - tmp = realloc(envlist, (envlen + nitems + 1 + nitems_rv + 1) * >>> + tmp = reallocarray(envlist, envlen + nitems + 1 + nitems_rv + 1, >>> sizeof(*envlist)); >>> if (tmp == NULL) { >>> openpam_free_envlist(envlist); >>> >> This commit breaks pam_exec for me... without this change I see the >> expected PAM_* environment variables from my execed script, but with >> this change I no longer see any of them. > Thanks for the report. > > It seems strange this can cause any failure. Perhaps there is a latent > overflow here and we have been living with it? I will revert while it is > investigated. > > BTW, the "nitems" variable may conflict with nitems() in sys/param.h. I don't think so. I manually ran the compile step in /usr/src/lib/libpam/modules/pam_exec replacing -o with -E per: cc -DOPENPAM_STATIC_MODULES -O2 -pipe -I/usr/src/contrib/openpam/include -I/usr/src/lib/libpam -DOPENPAM_DEBUG -MD -MF.depend.pam_exec.o -MTpam_exec.o -std=gnu99 -fstack-protector-strong -Wsystem-headers -Werror -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Wno-parentheses -Qunused-arguments -c pam_exec.c -E | vim - and the preprocessed code in question looks sane (included a few lines of context either side): envlist = pam_getenvlist(pamh); for (envlen = 0; envlist[envlen] != ((void *)0); ++envlen) ; nitems = sizeof(env_items) / sizeof(*env_items); nitems_rv = options->return_prog_exit_status ? 24 : 0; tmp = reallocarray(envlist, envlen + nitems + 1 + nitems_rv + 1, sizeof(*envlist)); if (tmp == ((void *)0)) { openpam_free_envlist(envlist); return (PAM_BUF_ERR); } Cheers, Lawrence From owner-svn-src-head@freebsd.org Sun Mar 12 17:43:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C1E0D09C62; Sun, 12 Mar 2017 17:43:47 +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 mx1.freebsd.org (Postfix) with ESMTPS id E01951EA9; Sun, 12 Mar 2017 17:43:46 +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 v2CHhkV6072604; Sun, 12 Mar 2017 17:43:46 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2CHhk7c072603; Sun, 12 Mar 2017 17:43:46 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201703121743.v2CHhk7c072603@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 12 Mar 2017 17:43:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315165 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 17:43:47 -0000 Author: ian Date: Sun Mar 12 17:43:45 2017 New Revision: 315165 URL: https://svnweb.freebsd.org/changeset/base/315165 Log: Correct the abbreviations for microseconds (us, not ms), and for Hz (not HZ). Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sun Mar 12 17:41:51 2017 (r315164) +++ head/sys/kern/vfs_subr.c Sun Mar 12 17:43:45 2017 (r315165) @@ -767,7 +767,7 @@ enum { TSP_SEC, TSP_HZ, TSP_USEC, TSP_NS static int timestamp_precision = TSP_USEC; SYSCTL_INT(_vfs, OID_AUTO, timestamp_precision, CTLFLAG_RW, ×tamp_precision, 0, "File timestamp precision (0: seconds, " - "1: sec + ns accurate to 1/HZ, 2: sec + ns truncated to ms, " + "1: sec + ns accurate to 1/Hz, 2: sec + ns truncated to us, " "3+: sec + ns (max. precision))"); /* From owner-svn-src-head@freebsd.org Sun Mar 12 17:45:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F587D09CE9; Sun, 12 Mar 2017 17:45:22 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-ot0-x229.google.com (mail-ot0-x229.google.com [IPv6:2607:f8b0:4003:c0f::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 441371011; Sun, 12 Mar 2017 17:45:22 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: by mail-ot0-x229.google.com with SMTP id 19so101668734oti.0; Sun, 12 Mar 2017 10:45:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=NBBjiDuWRbPz6YrVAoCrEK9wB7pO5K1vScXrcev1ohw=; b=CZsknlM9HeOmYc1abEixGq43prkDuKtJeJjsSZ0J9mSJO006MaCPRQu5fnXneLsFBK MQTjrEBZJMQHjjOJHiMRap5taQi2gBkSYum1nklvs6DyvVjupO8dZnnNWlLdU90ooPlT U752pL2JZsJ9nVQDL5VE8UAXTdPFU2hzems2iM3/T5gcAMbxy4bzjZWzf73U0rXD1Gyz DI/wyzuPk3ddxM5KKfFa2AF7frQ9NR5tWuP1AwH2ll5JaVKKiDlFMspKRf/nW6u1iT+9 pPdx7q+8FsMPqUuAmP6bmm4yRg5+rnV2y1rG0VIqpwUQ47VMmAKx9aXddQel00GPf+Lh 6RvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=NBBjiDuWRbPz6YrVAoCrEK9wB7pO5K1vScXrcev1ohw=; b=Cu9V/jUShc10QU4JJqmnJjjsb453xUrynSTtKkrcagNH2xuxMuyzGXEIzGmUwCiZId cQPyhkLGdU4OknU4U6RIt4xi6MrRCz9WDPj8uUyCqx4MLIVZbrDIfjEGFGY2g5Py8T5x ztay/oj0JerArp+Z4JPTvXxq6VWVhhYctyCWgohtJ0YLK/xrYWtv9qc1jQFJ4joEVko1 CGiy9XJi4rkRMUfwR3Fl64ol4lS3LBNpK2C8RxmiR/uLnduI4KGZvaCtSPcRK+GXRsaG yyNfeY2rscvDI0HP2X91DrF8q/KEdaVD61HeQrhmcRj16XoSbOaniKa/B1jqfFrUAkiW jv6A== X-Gm-Message-State: AFeK/H0KmAnCUHnke6BRDzbZFL+U6wkaJLh64Xv3XMYHNz3+/t6JWi2Ap47OABVXKiXFCr5OyQXmG+SwaB5LKA== X-Received: by 10.157.43.19 with SMTP id o19mr13985493otb.149.1489340721037; Sun, 12 Mar 2017 10:45:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.88.138 with HTTP; Sun, 12 Mar 2017 10:45:20 -0700 (PDT) In-Reply-To: <201703121743.v2CHhk7c072603@repo.freebsd.org> References: <201703121743.v2CHhk7c072603@repo.freebsd.org> From: Benjamin Kaduk Date: Sun, 12 Mar 2017 12:45:20 -0500 Message-ID: Subject: Re: svn commit: r315165 - head/sys/kern To: Ian Lepore Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 17:45:22 -0000 On Sun, Mar 12, 2017 at 12:43 PM, Ian Lepore wrote: > Author: ian > Date: Sun Mar 12 17:43:45 2017 > New Revision: 315165 > URL: https://svnweb.freebsd.org/changeset/base/315165 > > Log: > Correct the abbreviations for microseconds (us, not ms), and for Hz (not > HZ). > > Modified: > head/sys/kern/vfs_subr.c > > Modified: head/sys/kern/vfs_subr.c > ============================================================ > ================== > --- head/sys/kern/vfs_subr.c Sun Mar 12 17:41:51 2017 (r315164) > +++ head/sys/kern/vfs_subr.c Sun Mar 12 17:43:45 2017 (r315165) > @@ -767,7 +767,7 @@ enum { TSP_SEC, TSP_HZ, TSP_USEC, TSP_NS > static int timestamp_precision = TSP_USEC; > SYSCTL_INT(_vfs, OID_AUTO, timestamp_precision, CTLFLAG_RW, > ×tamp_precision, 0, "File timestamp precision (0: seconds, " > - "1: sec + ns accurate to 1/HZ, 2: sec + ns truncated to ms, " > + "1: sec + ns accurate to 1/Hz, 2: sec + ns truncated to us, " > HZ looks like the kernel configuration parameter here, not the unit. -Ben > "3+: sec + ns (max. precision))"); > > /* > _______________________________________________ > 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 Mar 12 17:54:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E45FD09109 for ; Sun, 12 Mar 2017 17:54:16 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm16-vm3.bullet.mail.ne1.yahoo.com (nm16-vm3.bullet.mail.ne1.yahoo.com [98.138.91.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 417591703 for ; Sun, 12 Mar 2017 17:54:16 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1489341249; bh=kZUcHMati0ecJRYuB6Rl45fYGapwR2qDrvufx+IwSCw=; h=Subject:To:References:From:Date:In-Reply-To:From:Subject; b=B8A8cKil1JUBdC80xvdooJQCRzhtiCWSMOpKJR/x5G0arKRhAN6Xjk/iBMQaqXYFmX3kaJevRMVRkSES22bMoy8WVwHhtuMrsK5DVHktOoXxxu3KtTdwCdzkxrClBsbbPNyreZhxkV5zuawqROT09GAtzvXNBZlUtLSvEN+6NP5ABqTTXo/tUTNLNQhUkhFs/5ecOQ70r/NgbXm+ZuPO6obxE6q1Sgn0MCIalGbElxVrQqzkf42FHC2t73nqGwjwoI938LXEx2y2HbQHlwZ/saSJCV+nmT0qcIyCWzQc+jp+w7+ZK40wELuGnrYgZ8EoB9fhOU35w2LgxJtkW8gNZA== Received: from [98.138.101.128] by nm16.bullet.mail.ne1.yahoo.com with NNFMP; 12 Mar 2017 17:54:09 -0000 Received: from [98.138.226.132] by tm16.bullet.mail.ne1.yahoo.com with NNFMP; 12 Mar 2017 17:54:08 -0000 Received: from [127.0.0.1] by smtp219.mail.ne1.yahoo.com with NNFMP; 12 Mar 2017 17:54:08 -0000 X-Yahoo-Newman-Id: 983024.60398.bm@smtp219.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: FKZB_qAVM1kjReVCdDnASvLI5Rx_9oU4R.QRU6BvuibFLIo SlwaMiM2lEaAIgaTLZyy5VVXpgYSCza4ePL2nOQB1L5zmOgQqjown6B3Nlzg iPwjwCNzqTjIelIzrR6sJd2NYj21QkvBMzRTn5MmwqS0YyNo5spTMlNk0Jlc 4hZXuthANCeQAcNjY7F8uEw.DfgnA4QrG1HI04We.QHjd81Ya8lHIqofBpte 7JPlpqsrb4B5UgFv_eeeukKSP6FuxeACgZKK.nj.ZDDTskeUyCnfd88c5nsQ r8SQ2ICpyH61gthxqDOpXaXJsLaT4czrhNsY7.Bt2PStTNrc9ehqA1W2Yho_ 1JhUKpXKUfg7LmqsIL43kuB2f8eisbfHAkht15.tO5aTiSO7oxMtvlpuAzrc UQMLpJO67nswLOhXg1GVJ277nh5r9t79Lj1TbP_WHcjejZDt1eSF_NgcOCZz .jMJoC1qk2Tc3FDh33xMIUbKUsoAUFCdUui6dAZFzqP7qvtsJOmlLcxKIOIM WxGZj00lWK2CCTELjzuqmCG.lTtzWovgbN_DcQs3g2aN3_Ko- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r314780 - head/lib/libpam/modules/pam_exec To: Lawrence Stewart , src-committers@FreeBSD.org, =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= , svn-src-head@FreeBSD.org References: <201703061545.v26FjkNI027057@repo.freebsd.org> <739617a4-3eed-28d1-73e4-86d25d6d5fed@freebsd.org> <1839903b-fb05-bf3f-17bb-697afca9ecb7@FreeBSD.org> From: Pedro Giffuni Message-ID: Date: Sun, 12 Mar 2017 12:57:11 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 17:54:16 -0000 On 3/12/2017 12:40 PM, Lawrence Stewart wrote: > On 13/03/2017 04:30, Pedro Giffuni wrote: >> >> On 3/12/2017 12:14 PM, Lawrence Stewart wrote: >>> Hi Pedro, >>> >>> On 07/03/2017 02:45, Pedro F. Giffuni wrote: >>>> Author: pfg >>>> Date: Mon Mar 6 15:45:46 2017 >>>> New Revision: 314780 >>>> URL: https://svnweb.freebsd.org/changeset/base/314780 >>>> >>>> Log: >>>> libpam: extra bounds checking through reallocarray(3). >>>> Reviewed by: des >>>> MFC after: 1 week >>>> >>>> Modified: >>>> head/lib/libpam/modules/pam_exec/pam_exec.c >>>> >>>> Modified: head/lib/libpam/modules/pam_exec/pam_exec.c >>>> ============================================================================== >>>> >>>> --- head/lib/libpam/modules/pam_exec/pam_exec.c Mon Mar 6 >>>> 15:42:03 2017 (r314779) >>>> +++ head/lib/libpam/modules/pam_exec/pam_exec.c Mon Mar 6 >>>> 15:45:46 2017 (r314780) >>>> @@ -138,7 +138,7 @@ _pam_exec(pam_handle_t *pamh __unused, >>>> nitems = sizeof(env_items) / sizeof(*env_items); >>>> /* Count PAM return values put in the environment. */ >>>> nitems_rv = options->return_prog_exit_status ? PAM_RV_COUNT : 0; >>>> - tmp = realloc(envlist, (envlen + nitems + 1 + nitems_rv + 1) * >>>> + tmp = reallocarray(envlist, envlen + nitems + 1 + nitems_rv + 1, >>>> sizeof(*envlist)); >>>> if (tmp == NULL) { >>>> openpam_free_envlist(envlist); >>>> >>> This commit breaks pam_exec for me... without this change I see the >>> expected PAM_* environment variables from my execed script, but with >>> this change I no longer see any of them. >> Thanks for the report. >> >> It seems strange this can cause any failure. Perhaps there is a latent >> overflow here and we have been living with it? I will revert while it is >> investigated. >> >> BTW, the "nitems" variable may conflict with nitems() in sys/param.h. > I don't think so. I manually ran the compile step in > /usr/src/lib/libpam/modules/pam_exec replacing -o with -E per: > > cc -DOPENPAM_STATIC_MODULES -O2 -pipe -I/usr/src/contrib/openpam/include > -I/usr/src/lib/libpam -DOPENPAM_DEBUG -MD -MF.depend.pam_exec.o > -MTpam_exec.o -std=gnu99 -fstack-protector-strong -Wsystem-headers > -Werror -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int > -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value > -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion > -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch > -Wno-switch-enum -Wno-knr-promoted-parameter -Wno-parentheses > -Qunused-arguments -c pam_exec.c -E | vim - > > and the preprocessed code in question looks sane (included a few lines > of context either side): > > envlist = pam_getenvlist(pamh); > for (envlen = 0; envlist[envlen] != ((void *)0); ++envlen) > ; > nitems = sizeof(env_items) / sizeof(*env_items); > > nitems_rv = options->return_prog_exit_status ? 24 : 0; > tmp = reallocarray(envlist, envlen + nitems + 1 + nitems_rv + 1, > sizeof(*envlist)); > if (tmp == ((void *)0)) { > openpam_free_envlist(envlist); > return (PAM_BUF_ERR); > } OK, the nitems issue is cosmetical at this time. Are you getting PAM_BUF_ERR, in other words, is tmp NULL? We may be hitting some strict limit in reallocarray(). Pedro. From owner-svn-src-head@freebsd.org Sun Mar 12 18:00:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DDC1BD092A5; Sun, 12 Mar 2017 18:00:03 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AAFEB1AE6; Sun, 12 Mar 2017 18:00:03 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2CI02jN077072; Sun, 12 Mar 2017 18:00:02 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2CI02gr077071; Sun, 12 Mar 2017 18:00:02 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201703121800.v2CI02gr077071@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 12 Mar 2017 18:00:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315166 - head/sys/dev/acpica X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 18:00:04 -0000 Author: imp Date: Sun Mar 12 18:00:02 2017 New Revision: 315166 URL: https://svnweb.freebsd.org/changeset/base/315166 Log: Export the actual LID state via sysctl. This allows more complex policies about when to suspend based on other events happening AND the lid being closed through the use of clever devd or other scripts. Modified: head/sys/dev/acpica/acpi_lid.c Modified: head/sys/dev/acpica/acpi_lid.c ============================================================================== --- head/sys/dev/acpica/acpi_lid.c Sun Mar 12 17:43:45 2017 (r315165) +++ head/sys/dev/acpica/acpi_lid.c Sun Mar 12 18:00:02 2017 (r315166) @@ -122,6 +122,14 @@ acpi_lid_attach(device_t dev) if (acpi_parse_prw(sc->lid_handle, &prw) == 0) AcpiEnableGpe(prw.gpe_handle, prw.gpe_bit); + /* + * Export the lid status + */ + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, + "state", CTLFLAG_RD, &sc->lid_status, 0, + "Device set to wake the system"); + return (0); } From owner-svn-src-head@freebsd.org Sun Mar 12 18:04:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F9D9D0950F for ; Sun, 12 Mar 2017 18:04:25 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (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 EDB1910E4 for ; Sun, 12 Mar 2017 18:04:24 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 363430f4-074e-11e7-b3c2-c9f38144898e X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound2.ore.mailhop.org (Halon) with ESMTPSA id 363430f4-074e-11e7-b3c2-c9f38144898e; Sun, 12 Mar 2017 18:03:36 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v2CI4GW9001630; Sun, 12 Mar 2017 12:04:16 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1489341856.40576.88.camel@freebsd.org> Subject: Re: svn commit: r314780 - head/lib/libpam/modules/pam_exec From: Ian Lepore To: Pedro Giffuni , Lawrence Stewart , src-committers@freebsd.org, Dag-Erling =?ISO-8859-1?Q?Sm=F8rgrav?= , svn-src-head@freebsd.org Date: Sun, 12 Mar 2017 12:04:16 -0600 In-Reply-To: <1839903b-fb05-bf3f-17bb-697afca9ecb7@FreeBSD.org> References: <201703061545.v26FjkNI027057@repo.freebsd.org> <739617a4-3eed-28d1-73e4-86d25d6d5fed@freebsd.org> <1839903b-fb05-bf3f-17bb-697afca9ecb7@FreeBSD.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 18:04:25 -0000 On Sun, 2017-03-12 at 12:30 -0500, Pedro Giffuni wrote: > > On 3/12/2017 12:14 PM, Lawrence Stewart wrote: > > > > Hi Pedro, > > > > On 07/03/2017 02:45, Pedro F. Giffuni wrote: > > > > > > Author: pfg > > > Date: Mon Mar  6 15:45:46 2017 > > > New Revision: 314780 > > > URL: https://svnweb.freebsd.org/changeset/base/314780 > > > > > > Log: > > >    libpam: extra bounds checking through reallocarray(3). > > >     > > >    Reviewed by: des > > >    MFC after: 1 week > > > > > > Modified: > > >    head/lib/libpam/modules/pam_exec/pam_exec.c > > > > > > Modified: head/lib/libpam/modules/pam_exec/pam_exec.c > > > ================================================================= > > > ============= > > > --- head/lib/libpam/modules/pam_exec/pam_exec.c Mon Mar  6 > > > 15:42:03 2017 (r314779) > > > +++ head/lib/libpam/modules/pam_exec/pam_exec.c Mon Mar  6 > > > 15:45:46 2017 (r314780) > > > @@ -138,7 +138,7 @@ _pam_exec(pam_handle_t *pamh __unused, > > >    nitems = sizeof(env_items) / sizeof(*env_items); > > >    /* Count PAM return values put in the environment. */ > > >    nitems_rv = options->return_prog_exit_status ? > > > PAM_RV_COUNT : 0; > > > - tmp = realloc(envlist, (envlen + nitems + 1 + nitems_rv > > > + 1) * > > > + tmp = reallocarray(envlist, envlen + nitems + 1 + > > > nitems_rv + 1, > > >        sizeof(*envlist)); > > >    if (tmp == NULL) { > > >    openpam_free_envlist(envlist); > > > > > This commit breaks pam_exec for me... without this change I see the > > expected PAM_* environment variables from my execed script, but > > with > > this change I no longer see any of them. > Thanks for the report. > > It seems strange this can cause any failure. Perhaps there is a > latent  > overflow here and we have been living with it? I will revert while it > is  > investigated. > > BTW, the "nitems" variable may conflict with nitems() in sys/param.h. > A quirk of C that's often forgotten is that a function-like macro is only expanded as a macro if the token following the macro name is an open paren.  So nitems() is a macro invokation and nitems = 0; is just a variable. I'm not arguing against the replacement of variables named nitems, I actually think that should have been done as part of importing the function-like definition of nitems from netbsd. -- Ian From owner-svn-src-head@freebsd.org Sun Mar 12 18:05:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2860BD09551 for ; Sun, 12 Mar 2017 18:05:31 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (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 0BC5E11EF for ; Sun, 12 Mar 2017 18:05:30 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 613e88e4-074e-11e7-b3c2-c9f38144898e X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound2.ore.mailhop.org (Halon) with ESMTPSA id 613e88e4-074e-11e7-b3c2-c9f38144898e; Sun, 12 Mar 2017 18:04:48 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v2CI5SPX001638; Sun, 12 Mar 2017 12:05:28 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1489341928.40576.89.camel@freebsd.org> Subject: Re: svn commit: r315165 - head/sys/kern From: Ian Lepore To: Benjamin Kaduk Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Date: Sun, 12 Mar 2017 12:05:28 -0600 In-Reply-To: References: <201703121743.v2CHhk7c072603@repo.freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 18:05:31 -0000 On Sun, 2017-03-12 at 12:45 -0500, Benjamin Kaduk wrote: > On Sun, Mar 12, 2017 at 12:43 PM, Ian Lepore wrote: > > > > > Author: ian > > Date: Sun Mar 12 17:43:45 2017 > > New Revision: 315165 > > URL: https://svnweb.freebsd.org/changeset/base/315165 > > > > Log: > >   Correct the abbreviations for microseconds (us, not ms), and for > > Hz (not > > HZ). > > > > Modified: > >   head/sys/kern/vfs_subr.c > > > > Modified: head/sys/kern/vfs_subr.c > > ============================================================ > > ================== > > --- head/sys/kern/vfs_subr.c    Sun Mar 12 17:41:51 > > 2017        (r315164) > > +++ head/sys/kern/vfs_subr.c    Sun Mar 12 17:43:45 > > 2017        (r315165) > > @@ -767,7 +767,7 @@ enum { TSP_SEC, TSP_HZ, TSP_USEC, TSP_NS > >  static int timestamp_precision = TSP_USEC; > >  SYSCTL_INT(_vfs, OID_AUTO, timestamp_precision, CTLFLAG_RW, > >      ×tamp_precision, 0, "File timestamp precision (0: > > seconds, " > > -    "1: sec + ns accurate to 1/HZ, 2: sec + ns truncated to ms, " > > +    "1: sec + ns accurate to 1/Hz, 2: sec + ns truncated to us, " > > > HZ looks like the kernel configuration parameter here, not the unit. > > -Ben > > > > > >      "3+: sec + ns (max. precision))"); > > > >  /* > > _______________________________________________ Doh!  Now that you mention it, I'm sure you're right. -- Ian From owner-svn-src-head@freebsd.org Sun Mar 12 18:07:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C067D095D7; Sun, 12 Mar 2017 18:07:04 +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 mx1.freebsd.org (Postfix) with ESMTPS id 66A9B1354; Sun, 12 Mar 2017 18:07:04 +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 v2CI73Wi080843; Sun, 12 Mar 2017 18:07:03 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2CI73gK080842; Sun, 12 Mar 2017 18:07:03 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201703121807.v2CI73gK080842@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 12 Mar 2017 18:07:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315167 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 18:07:04 -0000 Author: ian Date: Sun Mar 12 18:07:03 2017 New Revision: 315167 URL: https://svnweb.freebsd.org/changeset/base/315167 Log: Change 'Hz' back to 'HZ'... it's referring to the kernel config option named HZ, not being used as an abbreviation of the unit of measure. Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sun Mar 12 18:00:02 2017 (r315166) +++ head/sys/kern/vfs_subr.c Sun Mar 12 18:07:03 2017 (r315167) @@ -767,7 +767,7 @@ enum { TSP_SEC, TSP_HZ, TSP_USEC, TSP_NS static int timestamp_precision = TSP_USEC; SYSCTL_INT(_vfs, OID_AUTO, timestamp_precision, CTLFLAG_RW, ×tamp_precision, 0, "File timestamp precision (0: seconds, " - "1: sec + ns accurate to 1/Hz, 2: sec + ns truncated to us, " + "1: sec + ns accurate to 1/HZ, 2: sec + ns truncated to us, " "3+: sec + ns (max. precision))"); /* From owner-svn-src-head@freebsd.org Sun Mar 12 18:41:50 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB7EDD085CE; Sun, 12 Mar 2017 18:41:50 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x243.google.com (mail-pg0-x243.google.com [IPv6:2607:f8b0:400e:c05::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9C3DF183E; Sun, 12 Mar 2017 18:41:50 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x243.google.com with SMTP id g2so11391230pge.2; Sun, 12 Mar 2017 11:41:50 -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=10TIkoQsjViCO44T0saWVbB6TKSnl0AhlPe4nBv7dto=; b=ZUAm6mKTEuxr3ckzvDI3A3a6eY2CwZAki4RppLYW2BRLCpA/Kk8r5TuOotkIw9R9dZ 7A0i2c6eXsVaQMOrEWpu6gJfBsIkgjTXkHzqqf5fJk8xNoxqIWnY8CKn+rHXQr53DE2p pLuNVdhCaMnGv8SdhyQwtSTORkF/B+4ecQJlkf0HbhZ9QBZt5qrTmTH0pfhrccE93i9p ALqa8ebVUI/9SLp7DGkcdIBmor7nzs37Iz/4k0Y+yU1aeO9utm1kI0aLe6ZQbKBjiMkq hn0OD2ly4/H/1g0hzB5zmlqmSewwjkOpTrSh8fdsx/fAFsonAom8B3RgsqI3Ob4f2+Pn 1Kdg== 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=10TIkoQsjViCO44T0saWVbB6TKSnl0AhlPe4nBv7dto=; b=MjxQLKAYIsO3jqp9eUXDqwde3/Ac3fzv/ZTeseFeT+KClcJGiP9xE3VBqKNjz8AVZh aE1HRRF8RKpcnH8+xzw54XM699X8zrNEIS9ohnwqCLN1gb4aqvGZBMDwG1e3wO17P5CH S+USzG0fQgCE5g3QtnxiPUpN4QRTURzR0q+ggDyJTujtF7JY1FsX8GpPPi5bH9w0F98k cwQJObHVkDgDU8OYh6aYeYIZ8UTdoKH192uIQW4fpwZDh5JGswqLLtWU/ZgNIQ6fEhQK LStwo006VePfA41J7C1zeYtYQgbLaRwgqoFI/EuEAmhfhTPMJFlobaGkylefCrdYdjOp 2wKQ== X-Gm-Message-State: AMke39lOtzddKJxZBdagdzBkY+I6PQb0ufWf6IiacSBp55HQphVSDuP51hdlyLCeeaqa7w== X-Received: by 10.99.54.7 with SMTP id d7mr23163656pga.186.1489344110043; Sun, 12 Mar 2017 11:41:50 -0700 (PDT) Received: from ?IPv6:2607:fb90:8117:a021:701c:cd2:10ac:ee5f? ([2607:fb90:8117:a021:701c:cd2:10ac:ee5f]) by smtp.gmail.com with ESMTPSA id n185sm29564569pga.9.2017.03.12.11.41.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 Mar 2017 11:41:49 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r315164 - head/lib/libpam/modules/pam_exec From: Ngie Cooper X-Mailer: iPhone Mail (14D27) In-Reply-To: <201703121741.v2CHfpSA070217@repo.freebsd.org> Date: Sun, 12 Mar 2017 11:41:48 -0700 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201703121741.v2CHfpSA070217@repo.freebsd.org> To: "Pedro F. Giffuni" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 18:41:50 -0000 > On Mar 12, 2017, at 10:41, Pedro F. Giffuni wrote: >=20 > Author: pfg > Date: Sun Mar 12 17:41:51 2017 > New Revision: 315164 > URL: https://svnweb.freebsd.org/changeset/base/315164 >=20 > Log: > Revert r314780 > libpam: extra bounds checking through reallocarray(3). >=20 > It appears to be causing brokenness when reporting PAM_* environment > variables. This requires more investigation. >=20 > Reported by: lstewart >=20 > Modified: > head/lib/libpam/modules/pam_exec/pam_exec.c >=20 > Modified: head/lib/libpam/modules/pam_exec/pam_exec.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/lib/libpam/modules/pam_exec/pam_exec.c Sun Mar 12 16:55:18 201= 7 (r315163) > +++ head/lib/libpam/modules/pam_exec/pam_exec.c Sun Mar 12 17:41:51 201= 7 (r315164) > @@ -138,7 +138,7 @@ _pam_exec(pam_handle_t *pamh __unused, > nitems =3D sizeof(env_items) / sizeof(*env_items); > /* Count PAM return values put in the environment. */ > nitems_rv =3D options->return_prog_exit_status ? PAM_RV_COUNT : 0; > - tmp =3D reallocarray(envlist, envlen + nitems + 1 + nitems_rv + 1, > + tmp =3D realloc(envlist, (envlen + nitems + 1 + nitems_rv + 1) * Eep. nitems variable use here too (masking nitems macro). -Ngie= From owner-svn-src-head@freebsd.org Sun Mar 12 18:58:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E301CD08ADD; Sun, 12 Mar 2017 18:58:51 +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 mx1.freebsd.org (Postfix) with ESMTPS id 726AC1039; Sun, 12 Mar 2017 18:58:51 +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 v2CIwokY001658; Sun, 12 Mar 2017 18:58:50 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2CIwi2a001598; Sun, 12 Mar 2017 18:58:44 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201703121858.v2CIwi2a001598@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 12 Mar 2017 18:58:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315170 - in head/usr.bin: bsdiff/bsdiff bzip2 bzip2recover chkey chpass compile_et cpio ctlstat drill ee elfcopy factor file ftp host ipcrm iscsictl kdump less lessecho lesskey lex lex... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 18:58:52 -0000 Author: imp Date: Sun Mar 12 18:58:44 2017 New Revision: 315170 URL: https://svnweb.freebsd.org/changeset/base/315170 Log: Adopt SRCTOP in usr.bin Prefer ${SRCTOP}/foo over ${.CURDIR}/../../foo and ${SRCTOP}/usr.bin/foo over ${.CURDIR}/../foo for paths in Makefiles. Differential Revision: https://reviews.freebsd.org/D9932 Sponsored by: Netflix Silence on: arch@ (twice) Modified: head/usr.bin/bsdiff/bsdiff/Makefile head/usr.bin/bzip2/Makefile head/usr.bin/bzip2recover/Makefile head/usr.bin/chkey/Makefile head/usr.bin/chpass/Makefile head/usr.bin/compile_et/Makefile head/usr.bin/cpio/Makefile head/usr.bin/ctlstat/Makefile head/usr.bin/drill/Makefile head/usr.bin/ee/Makefile head/usr.bin/elfcopy/Makefile head/usr.bin/factor/Makefile head/usr.bin/file/Makefile head/usr.bin/ftp/Makefile head/usr.bin/host/Makefile head/usr.bin/ipcrm/Makefile head/usr.bin/iscsictl/Makefile head/usr.bin/kdump/Makefile head/usr.bin/less/Makefile.common head/usr.bin/lessecho/Makefile head/usr.bin/lesskey/Makefile head/usr.bin/lex/Makefile head/usr.bin/lex/lib/Makefile head/usr.bin/locale/Makefile head/usr.bin/localedef/Makefile head/usr.bin/lzmainfo/Makefile head/usr.bin/m4/Makefile head/usr.bin/mandoc/Makefile head/usr.bin/minigzip/Makefile head/usr.bin/mkcsmapper/Makefile head/usr.bin/mkcsmapper/Makefile.inc head/usr.bin/mkcsmapper_static/Makefile head/usr.bin/mkesdb/Makefile head/usr.bin/mkesdb_static/Makefile head/usr.bin/mklocale/Makefile head/usr.bin/nc/Makefile head/usr.bin/opieinfo/Makefile head/usr.bin/opiekey/Makefile head/usr.bin/opiepasswd/Makefile head/usr.bin/pamtest/Makefile head/usr.bin/readelf/Makefile head/usr.bin/rsh/Makefile head/usr.bin/smbutil/Makefile head/usr.bin/svn/lib/Makefile.inc head/usr.bin/tar/Makefile head/usr.bin/telnet/Makefile head/usr.bin/tftp/Makefile head/usr.bin/top/Makefile head/usr.bin/truss/Makefile head/usr.bin/unvis/Makefile head/usr.bin/vacation/Makefile head/usr.bin/vi/Makefile head/usr.bin/vis/Makefile head/usr.bin/w/Makefile head/usr.bin/xinstall/Makefile head/usr.bin/xz/Makefile head/usr.bin/xzdec/Makefile head/usr.bin/yacc/Makefile head/usr.bin/ypwhich/Makefile Modified: head/usr.bin/bsdiff/bsdiff/Makefile ============================================================================== --- head/usr.bin/bsdiff/bsdiff/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/bsdiff/bsdiff/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -4,11 +4,11 @@ PROG= bsdiff # libdivsufsort configured with: # cmake -DCMAKE_BUILD_TYPE="Release" -DBUILD_DIVSUFSORT64=ON -.PATH: ${.CURDIR}/../../../contrib/libdivsufsort/lib +.PATH: ${SRCTOP}/contrib/libdivsufsort/lib CFLAGS+= -DHAVE_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE CFLAGS+= -D_LARGE_FILES -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS CFLAGS+= -D__STDC_LIMIT_MACROS -DBUILD_DIVSUFSORT64 -CFLAGS+= -I${.CURDIR}/../../../contrib/libdivsufsort/include -I${.CURDIR} +CFLAGS+= -I${SRCTOP}/contrib/libdivsufsort/include -I${.CURDIR} SRCS= divsufsort.c sssort.c trsort.c utils.c SRCS+= bsdiff.c Modified: head/usr.bin/bzip2/Makefile ============================================================================== --- head/usr.bin/bzip2/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/bzip2/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -1,6 +1,6 @@ # $FreeBSD$ -BZ2DIR= ${.CURDIR}/../../contrib/bzip2 +BZ2DIR= ${SRCTOP}/contrib/bzip2 .PATH: ${BZ2DIR} PROG= bzip2 Modified: head/usr.bin/bzip2recover/Makefile ============================================================================== --- head/usr.bin/bzip2recover/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/bzip2recover/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -1,6 +1,6 @@ # $FreeBSD$ -BZ2DIR= ${.CURDIR}/../../contrib/bzip2 +BZ2DIR= ${SRCTOP}/contrib/bzip2 .PATH: ${BZ2DIR} PROG= bzip2recover Modified: head/usr.bin/chkey/Makefile ============================================================================== --- head/usr.bin/chkey/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/chkey/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -2,11 +2,11 @@ .include -.PATH: ${.CURDIR}/../newkey +.PATH: ${SRCTOP}/usr.bin/newkey PROG= chkey SRCS= chkey.c generic.c update.c -CFLAGS+= -I${.CURDIR}/../newkey +CFLAGS+= -I${SRCTOP}/usr.bin/newkey .if ${MK_NIS} != "no" CFLAGS+= -DYP .endif Modified: head/usr.bin/chpass/Makefile ============================================================================== --- head/usr.bin/chpass/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/chpass/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -3,7 +3,7 @@ .include -.PATH: ${.CURDIR}/../../usr.sbin/pwd_mkdb ${.CURDIR}/../../lib/libc/gen +.PATH: ${SRCTOP}/usr.sbin/pwd_mkdb ${SRCTOP}/lib/libc/gen PROG= chpass SRCS= chpass.c edit.c field.c pw_scan.c table.c util.c @@ -15,7 +15,7 @@ CFLAGS+= -DYP .endif #Some people need this, uncomment to activate #CFLAGS+=-DRESTRICT_FULLNAME_CHANGE -CFLAGS+=-I${.CURDIR}/../../usr.sbin/pwd_mkdb -I${.CURDIR}/../../lib/libc/gen -I. +CFLAGS+=-I${SRCTOP}/usr.sbin/pwd_mkdb -I${SRCTOP}/lib/libc/gen -I. LIBADD= crypt util .if ${MK_NIS} != "no" Modified: head/usr.bin/compile_et/Makefile ============================================================================== --- head/usr.bin/compile_et/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/compile_et/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -1,11 +1,11 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../contrib/com_err +.PATH: ${SRCTOP}/contrib/com_err PROG= compile_et SRCS= compile_et.c parse.y lex.l LIBADD= roken vers -CFLAGS+=-I. -I${.CURDIR}/../../contrib/com_err +CFLAGS+=-I. -I${SRCTOP}/contrib/com_err WARNS?= 0 Modified: head/usr.bin/cpio/Makefile ============================================================================== --- head/usr.bin/cpio/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/cpio/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -2,8 +2,8 @@ .include -_LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive -_LIBARCHIVECONFDIR= ${.CURDIR}/../../lib/libarchive +_LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive +_LIBARCHIVECONFDIR= ${SRCTOP}/lib/libarchive PROG= bsdcpio BSDCPIO_VERSION_STRING= 3.3.1 Modified: head/usr.bin/ctlstat/Makefile ============================================================================== --- head/usr.bin/ctlstat/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/ctlstat/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -2,7 +2,7 @@ PROG= ctlstat MAN= ctlstat.8 -SDIR= ${.CURDIR}/../../sys +SDIR= ${SRCTOP}/sys CFLAGS+= -I${SDIR} .include Modified: head/usr.bin/drill/Makefile ============================================================================== --- head/usr.bin/drill/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/drill/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -1,7 +1,7 @@ # $FreeBSD$ # Vendor sources and generated files -LDNSDIR= ${.CURDIR}/../../contrib/ldns +LDNSDIR= ${SRCTOP}/contrib/ldns .PATH: ${LDNSDIR}/drill Modified: head/usr.bin/ee/Makefile ============================================================================== --- head/usr.bin/ee/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/ee/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../contrib/ee +.PATH: ${SRCTOP}/contrib/ee CFLAGS+= -DHAS_NCURSES -DHAS_UNISTD -DHAS_STDARG -DHAS_STDLIB \ -DHAS_SYS_WAIT @@ -29,7 +29,7 @@ NLSSRCFILES=ee.msg . if exists(${.CURDIR}/nls/${lang}/ee.msg) NLSSRCDIR_${lang}= ${.CURDIR}/nls/${lang} . else -NLSSRCDIR_${lang}= ${.CURDIR}/../../contrib/ee +NLSSRCDIR_${lang}= ${SRCTOP}/contrib/ee . endif .endfor Modified: head/usr.bin/elfcopy/Makefile ============================================================================== --- head/usr.bin/elfcopy/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/elfcopy/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -28,7 +28,7 @@ LINKS= ${BINDIR}/${PROG} ${BINDIR}/strip # This same hack is in lib/libelf/Makefile and usr.bin/readelf/Makefile # We need to link against the correct version of these files. One -# solution is to include ../../sys in the include path. This causes +# solution is to include SRCTOP/sys in the include path. This causes # problems when a header file in sys depends on a file in another # part of the tree, e.g. a machine dependent header. # Modified: head/usr.bin/factor/Makefile ============================================================================== --- head/usr.bin/factor/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/factor/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -5,7 +5,7 @@ PROG= factor SRCS= factor.c pr_tbl.c -CFLAGS+=-I${.CURDIR}/../primes +CFLAGS+=-I${SRCTOP}/usr.bin/primes .if ${MK_OPENSSL} != "no" CFLAGS+=-DHAVE_OPENSSL @@ -14,6 +14,6 @@ LIBADD+=crypto MAN= factor.6 MLINKS+=factor.6 primes.6 -.PATH: ${.CURDIR}/../primes +.PATH: ${SRCTOP}/usr.bin/primes .include Modified: head/usr.bin/file/Makefile ============================================================================== --- head/usr.bin/file/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/file/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -20,7 +20,7 @@ # ever read sources, credits must appear in the documentation. # 4. This notice may not be removed or altered. -SRCDIR= ${.CURDIR}/../../contrib/file +SRCDIR= ${SRCTOP}/contrib/file .PATH: ${SRCDIR}/src .PATH: ${SRCDIR}/doc @@ -29,12 +29,12 @@ PROG= file MAGICPATH?= /usr/share/misc CFLAGS+= -DMAGIC='"${MAGICPATH}/magic"' -DHAVE_CONFIG_H -CFLAGS+= -I${.CURDIR}/../../lib/libmagic +CFLAGS+= -I${SRCTOP}/lib/libmagic LIBADD= magic FILEVER!= awk '$$1 == "\#define" && $$2 == "VERSION" { print $$3; exit }' \ - ${.CURDIR}/../../lib/libmagic/config.h + ${SRCTOP}/lib/libmagic/config.h CLEANFILES+= ${MAN} Modified: head/usr.bin/ftp/Makefile ============================================================================== --- head/usr.bin/ftp/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/ftp/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -8,7 +8,7 @@ # #CFLAGS+=-DGATE_SERVER=\"ftp-gw.host\" # -DGATE_PORT=21 -TNFTP= ${.CURDIR}/../../contrib/tnftp +TNFTP= ${SRCTOP}/contrib/tnftp .PATH: ${TNFTP}/src PROG= ftp Modified: head/usr.bin/host/Makefile ============================================================================== --- head/usr.bin/host/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/host/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -1,7 +1,7 @@ # $FreeBSD$ -LDNSDIR= ${.CURDIR}/../../contrib/ldns -LDNSHOSTDIR= ${.CURDIR}/../../contrib/ldns-host +LDNSDIR= ${SRCTOP}/contrib/ldns +LDNSHOSTDIR= ${SRCTOP}/contrib/ldns-host .PATH: ${LDNSHOSTDIR} Modified: head/usr.bin/ipcrm/Makefile ============================================================================== --- head/usr.bin/ipcrm/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/ipcrm/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -3,8 +3,8 @@ PROG= ipcrm SRCS= ipcrm.c ipc.c LIBADD= kvm -CFLAGS+=-I${.CURDIR}/../ipcs -.PATH: ${.CURDIR}/../ipcs +CFLAGS+=-I${SRCTOP}/usr.bin/ipcs +.PATH: ${SRCTOP}/usr.bin/ipcs WARNS?= 0 Modified: head/usr.bin/iscsictl/Makefile ============================================================================== --- head/usr.bin/iscsictl/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/iscsictl/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -4,7 +4,7 @@ PACKAGE= iscsi PROG= iscsictl SRCS= iscsictl.c periphs.c parse.y token.l y.tab.h CFLAGS+= -I${.CURDIR} -CFLAGS+= -I${.CURDIR}/../../sys/dev/iscsi +CFLAGS+= -I${SRCTOP}/sys/dev/iscsi MAN= iscsi.conf.5 iscsictl.8 LIBADD= xo Modified: head/usr.bin/kdump/Makefile ============================================================================== --- head/usr.bin/kdump/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/kdump/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -3,11 +3,11 @@ .include -.PATH: ${.CURDIR}/../ktrace +.PATH: ${SRCTOP}/usr.bin/ktrace PROG= kdump SRCS= kdump.c subr.c -CFLAGS+= -I${.CURDIR}/../ktrace #-I${.CURDIR}/../... +CFLAGS+= -I${SRCTOP}/usr.bin/ktrace LIBADD= sysdecode .if ${MK_CASPER} != "no" Modified: head/usr.bin/less/Makefile.common ============================================================================== --- head/usr.bin/less/Makefile.common Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/less/Makefile.common Sun Mar 12 18:58:44 2017 (r315170) @@ -1,9 +1,9 @@ # $FreeBSD$ -LSDIR= ${.CURDIR}/../../contrib/less +LSDIR= ${SRCTOP}/contrib/less .PATH: ${LSDIR} -CFLAGS+=-I${.CURDIR}/../less -I${LSDIR} +CFLAGS+=-I${SRCTOP}/usr.bin/less -I${LSDIR} WARNS?= 1 .SUFFIXES: .nro .1 Modified: head/usr.bin/lessecho/Makefile ============================================================================== --- head/usr.bin/lessecho/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/lessecho/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -4,5 +4,5 @@ PROG= lessecho SRCS= lessecho.c version.c CLEANFILES= lessecho.1 -.include "${.CURDIR}/../less/Makefile.common" +.include "${SRCTOP}/usr.bin/less/Makefile.common" .include Modified: head/usr.bin/lesskey/Makefile ============================================================================== --- head/usr.bin/lesskey/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/lesskey/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -4,5 +4,5 @@ PROG= lesskey SRCS= lesskey.c version.c CLEANFILES= lesskey.1 -.include "${.CURDIR}/../less/Makefile.common" +.include "${SRCTOP}/usr.bin/less/Makefile.common" .include Modified: head/usr.bin/lex/Makefile ============================================================================== --- head/usr.bin/lex/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/lex/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -14,7 +14,7 @@ LINKS+= ${BINDIR}/lex ${BINDIR}/lex++ LINKS+= ${BINDIR}/lex ${BINDIR}/flex LINKS+= ${BINDIR}/lex ${BINDIR}/flex++ -FLEXDIR= ${.CURDIR}/../../contrib/flex +FLEXDIR= ${SRCTOP}/contrib/flex .PATH: ${FLEXDIR} Modified: head/usr.bin/lex/lib/Makefile ============================================================================== --- head/usr.bin/lex/lib/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/lex/lib/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -2,7 +2,7 @@ .include -.PATH: ${.CURDIR}/../../../contrib/flex +.PATH: ${SRCTOP}/contrib/flex LIB= ln SRCS= libmain.c libyywrap.c Modified: head/usr.bin/locale/Makefile ============================================================================== --- head/usr.bin/locale/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/locale/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -1,6 +1,6 @@ # $FreeBSD$ PROG= locale -CFLAGS+= -I${.CURDIR}/../../lib/libc/locale +CFLAGS+= -I${SRCTOP}/lib/libc/locale .include Modified: head/usr.bin/localedef/Makefile ============================================================================== --- head/usr.bin/localedef/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/localedef/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -20,7 +20,7 @@ parser.h: parser.y IGNORE_PRAGMA= yes CFLAGS+= -I. -I${.CURDIR} -CFLAGS+= -I${.CURDIR}/../../lib/libc/locale -CFLAGS+= -I${.CURDIR}/../../lib/libc/stdtime +CFLAGS+= -I${SRCTOP}/lib/libc/locale +CFLAGS+= -I${SRCTOP}/lib/libc/stdtime .include Modified: head/usr.bin/lzmainfo/Makefile ============================================================================== --- head/usr.bin/lzmainfo/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/lzmainfo/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -2,8 +2,8 @@ PROG= lzmainfo -XZDIR= ${.CURDIR}/../../contrib/xz/src -LZMALIBDIR= ${.CURDIR}/../../lib/liblzma +XZDIR= ${SRCTOP}/contrib/xz/src +LZMALIBDIR= ${SRCTOP}/lib/liblzma .PATH: ${XZDIR}/lzmainfo SRCS+= lzmainfo.c Modified: head/usr.bin/m4/Makefile ============================================================================== --- head/usr.bin/m4/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/m4/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -7,7 +7,7 @@ .include PROG= m4 -CFLAGS+=-DEXTENDED -I${.CURDIR} -I${.CURDIR}/../../lib/libopenbsd +CFLAGS+=-DEXTENDED -I${.CURDIR} -I${SRCTOP}/lib/libopenbsd LIBADD= y l m openbsd NO_WMISSING_VARIABLE_DECLARATIONS= Modified: head/usr.bin/mandoc/Makefile ============================================================================== --- head/usr.bin/mandoc/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/mandoc/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -2,7 +2,7 @@ .include -MDOCMLDIR= ${.CURDIR}/../../contrib/mdocml +MDOCMLDIR= ${SRCTOP}/contrib/mdocml .PATH: ${MDOCMLDIR} PROG= mandoc @@ -89,7 +89,7 @@ SRCS= ${LIB_SRCS} \ WARNS?= 3 CFLAGS+= -DHAVE_CONFIG_H \ - -I${.CURDIR}/../../lib/libopenbsd/ + -I${SRCTOP}/lib/libopenbsd/ LIBADD= openbsd z .include Modified: head/usr.bin/minigzip/Makefile ============================================================================== --- head/usr.bin/minigzip/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/minigzip/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -1,6 +1,6 @@ # $FreeBSD$ -SRCDIR= ${.CURDIR}/../../contrib/zlib/test +SRCDIR= ${SRCTOP}/contrib/zlib/test .PATH: ${SRCDIR} PROG= minigzip Modified: head/usr.bin/mkcsmapper/Makefile ============================================================================== --- head/usr.bin/mkcsmapper/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/mkcsmapper/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -1,9 +1,9 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../lib/libc/iconv +.PATH: ${SRCTOP}/lib/libc/iconv PROG= mkcsmapper -LDFLAGS+= -L${.CURDIR}/../../lib/libc +LDFLAGS+= -L${SRCTOP}/lib/libc NO_WMISSING_VARIABLE_DECLARATIONS= Modified: head/usr.bin/mkcsmapper/Makefile.inc ============================================================================== --- head/usr.bin/mkcsmapper/Makefile.inc Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/mkcsmapper/Makefile.inc Sun Mar 12 18:58:44 2017 (r315170) @@ -3,7 +3,7 @@ .include SRCS+= lex.l yacc.y -CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../mkcsmapper \ - -I${.CURDIR}/../../lib/libc/iconv \ - -I${.CURDIR}/../../lib/libiconv_modules/mapper_std +CFLAGS+= -I${.CURDIR} -I${SRCTOP}/usr.bin/mkcsmapper \ + -I${SRCTOP}/lib/libc/iconv \ + -I${SRCTOP}/lib/libiconv_modules/mapper_std CFLAGS.gcc+= --param max-inline-insns-single=64 Modified: head/usr.bin/mkcsmapper_static/Makefile ============================================================================== --- head/usr.bin/mkcsmapper_static/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/mkcsmapper_static/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../lib/libc/iconv ${.CURDIR}/../mkcsmapper +.PATH: ${SRCTOP}/lib/libc/iconv ${SRCTOP}/usr.bin/mkcsmapper PROG= mkcsmapper_static SRCS= citrus_bcs.c citrus_db_factory.c citrus_db_hash.c \ @@ -11,7 +11,7 @@ NO_WMISSING_VARIABLE_DECLARATIONS= build-tools: mkcsmapper_static -.include "${.CURDIR}/../mkcsmapper/Makefile.inc" +.include "${SRCTOP}/usr.bin/mkcsmapper/Makefile.inc" .include ${PROG}: ${BUILD_TOOLS_META} Modified: head/usr.bin/mkesdb/Makefile ============================================================================== --- head/usr.bin/mkesdb/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/mkesdb/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../lib/libc/iconv +.PATH: ${SRCTOP}/lib/libc/iconv PROG= mkesdb Modified: head/usr.bin/mkesdb_static/Makefile ============================================================================== --- head/usr.bin/mkesdb_static/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/mkesdb_static/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../lib/libc/iconv ${.CURDIR}/../mkesdb +.PATH: ${SRCTOP}/lib/libc/iconv ${SRCTOP}/usr.bin/mkesdb PROG= mkesdb_static SRCS= citrus_bcs.c citrus_db_factory.c citrus_db_hash.c \ @@ -11,7 +11,7 @@ NO_WMISSING_VARIABLE_DECLARATIONS= build-tools: mkesdb_static -.include "${.CURDIR}/../mkesdb/Makefile.inc" +.include "${SRCTOP}/usr.bin/mkesdb/Makefile.inc" .include ${PROG}: ${BUILD_TOOLS_META} Modified: head/usr.bin/mklocale/Makefile ============================================================================== --- head/usr.bin/mklocale/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/mklocale/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -3,7 +3,7 @@ PROG= mklocale SRCS= yacc.y lex.l y.tab.h -CFLAGS+= -I. -I${.CURDIR} -I${.CURDIR}/../../lib/libc/locale +CFLAGS+= -I. -I${.CURDIR} -I${SRCTOP}/lib/libc/locale NO_WMISSING_VARIABLE_DECLARATIONS= Modified: head/usr.bin/nc/Makefile ============================================================================== --- head/usr.bin/nc/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/nc/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../contrib/netcat +.PATH: ${SRCTOP}/contrib/netcat PROG= nc SRCS= netcat.c atomicio.c socks.c Modified: head/usr.bin/opieinfo/Makefile ============================================================================== --- head/usr.bin/opieinfo/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/opieinfo/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -1,10 +1,10 @@ # $FreeBSD$ # -OPIE_DIST?= ${.CURDIR}/../../contrib/opie +OPIE_DIST?= ${SRCTOP}/contrib/opie PROG= opieinfo -CFLAGS+=-I${.CURDIR}/../../lib/libopie +CFLAGS+=-I${SRCTOP}/lib/libopie CFLAGS+=-I${OPIE_DIST} CFLAGS+=-DINSECURE_OVERRIDE Modified: head/usr.bin/opiekey/Makefile ============================================================================== --- head/usr.bin/opiekey/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/opiekey/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -1,10 +1,10 @@ # $FreeBSD$ # -OPIE_DIST?= ${.CURDIR}/../../contrib/opie +OPIE_DIST?= ${SRCTOP}/contrib/opie PROG= opiekey -CFLAGS+=-I${.CURDIR}/../../lib/libopie +CFLAGS+=-I${SRCTOP}/lib/libopie CFLAGS+=-I${OPIE_DIST} CFLAGS+=-DINSECURE_OVERRIDE Modified: head/usr.bin/opiepasswd/Makefile ============================================================================== --- head/usr.bin/opiepasswd/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/opiepasswd/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -1,10 +1,10 @@ # $FreeBSD$ # -OPIE_DIST?= ${.CURDIR}/../../contrib/opie +OPIE_DIST?= ${SRCTOP}/contrib/opie PROG= opiepasswd -CFLAGS+=-I${.CURDIR}/../../lib/libopie +CFLAGS+=-I${SRCTOP}/lib/libopie CFLAGS+=-I${OPIE_DIST} CFLAGS+=-DINSECURE_OVERRIDE Modified: head/usr.bin/pamtest/Makefile ============================================================================== --- head/usr.bin/pamtest/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/pamtest/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -1,6 +1,6 @@ # $FreeBSD$ -OPENPAM= ${.CURDIR}/../../contrib/openpam +OPENPAM= ${SRCTOP}/contrib/openpam .PATH: ${OPENPAM}/include ${OPENPAM}/bin/pamtest PROG= pamtest Modified: head/usr.bin/readelf/Makefile ============================================================================== --- head/usr.bin/readelf/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/readelf/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -14,7 +14,7 @@ CFLAGS+=-I${ELFTCDIR}/libelftc -I${ELFTC # This same hack is in lib/libelf/Makefile and lib/libdwarf/Makefile # We need to link against the correct version of these files. One -# solution is to include ../../sys in the include path. This causes +# solution is to include SRCTOP/sys in the include path. This causes # problems when a header file in sys depends on a file in another # part of the tree, e.g. a machine dependent header. # Modified: head/usr.bin/rsh/Makefile ============================================================================== --- head/usr.bin/rsh/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/rsh/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -2,7 +2,7 @@ # $FreeBSD$ PROG= rsh -CFLAGS+=-I${.CURDIR}/../../libexec/rlogind +CFLAGS+=-I${SRCTOP}/libexec/rlogind PACKAGE=rcmds Modified: head/usr.bin/smbutil/Makefile ============================================================================== --- head/usr.bin/smbutil/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/smbutil/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -5,7 +5,7 @@ SRCS= smbutil.c dumptree.c login.c looku LIBADD= smb -CONTRIBDIR= ${.CURDIR}/../../contrib/smbfs +CONTRIBDIR= ${SRCTOP}/contrib/smbfs CFLAGS+= -I${CONTRIBDIR}/include WARNS?= 0 Modified: head/usr.bin/svn/lib/Makefile.inc ============================================================================== --- head/usr.bin/svn/lib/Makefile.inc Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/svn/lib/Makefile.inc Sun Mar 12 18:58:44 2017 (r315170) @@ -2,11 +2,11 @@ .if !defined(SVNDIR) -SVNDIR= ${.CURDIR}/../../../../contrib/subversion/subversion -APRU= ${.CURDIR}/../../../../contrib/apr-util -APR= ${.CURDIR}/../../../../contrib/apr -SQLITE= ${.CURDIR}/../../../../contrib/sqlite3 -SERF= ${.CURDIR}/../../../../contrib/serf +SVNDIR= ${SRCTOP}/contrib/subversion/subversion +APRU= ${SRCTOP}/contrib/apr-util +APR= ${SRCTOP}/contrib/apr +SQLITE= ${SRCTOP}/contrib/sqlite3 +SERF= ${SRCTOP}/contrib/serf WARNS?= 0 # definitely not ready Modified: head/usr.bin/tar/Makefile ============================================================================== --- head/usr.bin/tar/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/tar/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -1,7 +1,7 @@ # $FreeBSD$ .include -_LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive +_LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive PROG= bsdtar BSDTAR_VERSION_STRING= 3.3.1 @@ -27,7 +27,7 @@ CFLAGS+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1 .endif CFLAGS+= -DBSDTAR_VERSION_STRING=\"${BSDTAR_VERSION_STRING}\" -CFLAGS+= -DPLATFORM_CONFIG_H=\"${.CURDIR}/../../lib/libarchive/config_freebsd.h\" +CFLAGS+= -DPLATFORM_CONFIG_H=\"${SRCTOP}/lib/libarchive/config_freebsd.h\" CFLAGS+= -I${_LIBARCHIVEDIR}/tar -I${_LIBARCHIVEDIR}/libarchive CFLAGS+= -I${_LIBARCHIVEDIR}/libarchive_fe SYMLINKS= bsdtar ${BINDIR}/tar Modified: head/usr.bin/telnet/Makefile ============================================================================== --- head/usr.bin/telnet/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/telnet/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -2,7 +2,7 @@ .include -TELNETDIR= ${.CURDIR}/../../contrib/telnet +TELNETDIR= ${SRCTOP}/contrib/telnet .PATH: ${TELNETDIR}/telnet PROG= telnet Modified: head/usr.bin/tftp/Makefile ============================================================================== --- head/usr.bin/tftp/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/tftp/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -1,12 +1,12 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ -.PATH: ${.CURDIR}/../../libexec/tftpd +.PATH: ${SRCTOP}/libexec/tftpd PROG= tftp SRCS= main.c tftp-file.c tftp-io.c tftp-options.c tftp-transfer.c SRCS+= tftp-utils.c tftp.c -CFLAGS+=-I${.CURDIR}/../../libexec/tftpd +CFLAGS+=-I${SRCTOP}/libexec/tftpd LIBADD= edit Modified: head/usr.bin/top/Makefile ============================================================================== --- head/usr.bin/top/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/top/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -1,6 +1,6 @@ # $FreeBSD$ -TOPDIR= ${.CURDIR}/../../contrib/top +TOPDIR= ${SRCTOP}/contrib/top .PATH: ${TOPDIR} PROG= top @@ -24,7 +24,7 @@ CFLAGS+= -D"Table_size=${TOP_TABLE_SIZE} LIBADD= ncursesw m kvm jail CLEANFILES= sigdesc.h -SIGCONV_AWK= ${.CURDIR}/../../contrib/top/sigconv.awk +SIGCONV_AWK= ${SRCTOP}/contrib/top/sigconv.awk STAGED_INCLUDE_DIR?= ${DESTDIR}/usr/include SIGNAL_H= ${STAGED_INCLUDE_DIR}/sys/signal.h sigdesc.h: ${SIGCONV_AWK} ${SIGNAL_H} Modified: head/usr.bin/truss/Makefile ============================================================================== --- head/usr.bin/truss/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/truss/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -6,8 +6,8 @@ SRCS= main.c setup.c syscalls.c LIBADD= sysdecode -#CFLAGS+= -I${.CURDIR} -I. -I${.CURDIR}/../../sys -CFLAGS+= -I${.CURDIR}/../../sys +#CFLAGS+= -I${.CURDIR} -I. -I${SRCTOP}/sys +CFLAGS+= -I${SRCTOP}/sys ABIS+= freebsd # Each ABI is expected to have an ABI.c, MACHINE_ARCH-ABI.c or Modified: head/usr.bin/unvis/Makefile ============================================================================== --- head/usr.bin/unvis/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/unvis/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -3,6 +3,6 @@ PROG= unvis -.PATH: ${.CURDIR}/../../contrib/unvis +.PATH: ${SRCTOP}/contrib/unvis .include Modified: head/usr.bin/vacation/Makefile ============================================================================== --- head/usr.bin/vacation/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/vacation/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -1,6 +1,6 @@ # $FreeBSD$ -SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail +SENDMAIL_DIR=${SRCTOP}/contrib/sendmail .PATH: ${SENDMAIL_DIR}/vacation PROG= vacation Modified: head/usr.bin/vi/Makefile ============================================================================== --- head/usr.bin/vi/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/vi/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -5,7 +5,7 @@ .include PACKAGE= vi -SRCDIR= ${.CURDIR}/../../contrib/nvi +SRCDIR= ${SRCTOP}/contrib/nvi SUBDIR+= catalog WARNS?= 0 # some warn issues on 32 bit machines Modified: head/usr.bin/vis/Makefile ============================================================================== --- head/usr.bin/vis/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/vis/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -4,7 +4,7 @@ PROG= vis SRCS= vis.c foldit.c -.PATH: ${.CURDIR}/../../contrib/vis -CFLAGS+= -I${.CURDIR}/../../contrib/vis +.PATH: ${SRCTOP}/contrib/vis +CFLAGS+= -I${SRCTOP}/contrib/vis .include Modified: head/usr.bin/w/Makefile ============================================================================== --- head/usr.bin/w/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/w/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -7,6 +7,6 @@ MAN= w.1 uptime.1 LIBADD= kvm sbuf xo util LINKS= ${BINDIR}/w ${BINDIR}/uptime -.PATH: ${.CURDIR}/../../bin/ps +.PATH: ${SRCTOP}/bin/ps .include Modified: head/usr.bin/xinstall/Makefile ============================================================================== --- head/usr.bin/xinstall/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/xinstall/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -8,9 +8,9 @@ PROGNAME= install SRCS= xinstall.c getid.c MAN= install.1 -.PATH: ${.CURDIR}/../../contrib/mtree -CFLAGS+= -I${.CURDIR}/../../contrib/mtree -CFLAGS+= -I${.CURDIR}/../../lib/libnetbsd +.PATH: ${SRCTOP}/contrib/mtree +CFLAGS+= -I${SRCTOP}/contrib/mtree +CFLAGS+= -I${SRCTOP}/lib/libnetbsd LIBADD= md Modified: head/usr.bin/xz/Makefile ============================================================================== --- head/usr.bin/xz/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/xz/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -10,8 +10,8 @@ LINKS+= ${BINDIR}/xz ${BINDIR}/lzcat MLINKS= xz.1 unxz.1 xz.1 lzma.1 xz.1 unlzma.1 xz.1 xzcat.1 xz.1 lzcat.1 -XZDIR= ${.CURDIR}/../../contrib/xz/src -LZMALIBDIR= ${.CURDIR}/../../lib/liblzma +XZDIR= ${SRCTOP}/contrib/xz/src +LZMALIBDIR= ${SRCTOP}/lib/liblzma .PATH: ${XZDIR}/xz Modified: head/usr.bin/xzdec/Makefile ============================================================================== --- head/usr.bin/xzdec/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/xzdec/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -6,8 +6,8 @@ LINKS= ${BINDIR}/xzdec ${BINDIR}/lzdec MLINKS= xzdec.1 lzmadec.1 -XZDIR= ${.CURDIR}/../../contrib/xz/src -LZMALIBDIR= ${.CURDIR}/../../lib/liblzma +XZDIR= ${SRCTOP}/contrib/xz/src +LZMALIBDIR= ${SRCTOP}/lib/liblzma .PATH: ${XZDIR}/xzdec Modified: head/usr.bin/yacc/Makefile ============================================================================== --- head/usr.bin/yacc/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/yacc/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -3,7 +3,7 @@ .include -BYACC_SRC= ${.CURDIR}/../../contrib/byacc +BYACC_SRC= ${SRCTOP}/contrib/byacc .PATH: ${BYACC_SRC} PROG= yacc Modified: head/usr.bin/ypwhich/Makefile ============================================================================== --- head/usr.bin/ypwhich/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/ypwhich/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -1,7 +1,7 @@ # from: @(#)Makefile 5.8 (Berkeley) 7/28/90 # $FreeBSD$ -YPSERV=${.CURDIR}/../../usr.sbin/ypserv/common +YPSERV=${SRCTOP}/usr.sbin/ypserv/common .PATH: ${YPSERV} PROG= ypwhich From owner-svn-src-head@freebsd.org Sun Mar 12 18:58:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12872D08B01; Sun, 12 Mar 2017 18:58:57 +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 mx1.freebsd.org (Postfix) with ESMTPS id E1977104F; Sun, 12 Mar 2017 18:58: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 v2CIwufQ001711; Sun, 12 Mar 2017 18:58:56 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2CIwtI1001709; Sun, 12 Mar 2017 18:58:55 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201703121858.v2CIwtI1001709@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 12 Mar 2017 18:58:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315171 - in head/etc: . sendmail X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 18:58:57 -0000 Author: imp Date: Sun Mar 12 18:58:55 2017 New Revision: 315171 URL: https://svnweb.freebsd.org/changeset/base/315171 Log: Move /etc/ to SRCTOP Prefer ${SRCTOP}/ to ${.CURDIR}/../ and ${.CURDIR}/../../ as appropriate. Differential Revision: https://reviews.freebsd.org/D9932 Sponsored by: Netflix Silence On: arch@ (twice) Modified: head/etc/Makefile head/etc/sendmail/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Sun Mar 12 18:58:44 2017 (r315170) +++ head/etc/Makefile Sun Mar 12 18:58:55 2017 (r315171) @@ -64,7 +64,7 @@ BIN1+= etc.${MACHINE_CPUARCH}/ttys .error etc.MACHINE/ttys missing .endif -OPENBSMDIR= ${.CURDIR}/../contrib/openbsm +OPENBSMDIR= ${SRCTOP}/contrib/openbsm BSM_ETC_OPEN_FILES= ${OPENBSMDIR}/etc/audit_class \ ${OPENBSMDIR}/etc/audit_event BSM_ETC_RESTRICTED_FILES= ${OPENBSMDIR}/etc/audit_control \ @@ -103,7 +103,7 @@ BIN1+= inetd.conf .endif .if ${MK_LOCATE} != "no" -BIN1+= ${.CURDIR}/../usr.bin/locate/locate/locate.rc +BIN1+= ${SRCTOP}/usr.bin/locate/locate/locate.rc .endif .if ${MK_LPR} != "no" @@ -111,7 +111,7 @@ BIN1+= hosts.lpd printcap .endif .if ${MK_MAIL} != "no" -BIN1+= ${.CURDIR}/../usr.bin/mail/misc/mail.rc +BIN1+= ${SRCTOP}/usr.bin/mail/misc/mail.rc .endif .if ${MK_NTP} != "no" @@ -119,12 +119,12 @@ BIN1+= ntp.conf .endif .if ${MK_OPENSSH} != "no" -SSH= ${.CURDIR}/../crypto/openssh/ssh_config \ - ${.CURDIR}/../crypto/openssh/sshd_config \ - ${.CURDIR}/../crypto/openssh/moduli +SSH= ${SRCTOP}/crypto/openssh/ssh_config \ + ${SRCTOP}/crypto/openssh/sshd_config \ + ${SRCTOP}/crypto/openssh/moduli .endif .if ${MK_OPENSSL} != "no" -SSL= ${.CURDIR}/../crypto/openssl/apps/openssl.cnf +SSL= ${SRCTOP}/crypto/openssl/apps/openssl.cnf .endif .if ${MK_NS_CACHING} != "no" @@ -185,7 +185,7 @@ DESTDIR:= ${DESTDIR:C://*:/:g} afterinstall: .if ${MK_MAN} != "no" - ${_+_}cd ${.CURDIR}/../share/man; ${MAKE} makedb + ${_+_}cd ${SRCTOP}/share/man; ${MAKE} makedb .endif distribute: @@ -263,8 +263,8 @@ distribution: ${_+_}cd ${.CURDIR}/pkg; ${MAKE} install .endif ${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install - ${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap - ${_+_}cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt + ${_+_}cd ${SRCTOP}/share/termcap; ${MAKE} etc-termcap + ${_+_}cd ${SRCTOP}/usr.sbin/rmt; ${MAKE} etc-rmt ${_+_}cd ${.CURDIR}/pam.d; ${MAKE} install cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0444 \ ${BSM_ETC_OPEN_FILES} ${BSM_ETC_DIR} @@ -328,9 +328,9 @@ distribution: cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ ${FREEBSD} ${DESTDIR}/ .if ${MK_BOOT} != "no" -.if exists(${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints) +.if exists(${SRCTOP}/sys/${MACHINE}/conf/GENERIC.hints) ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ - ${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints \ + ${SRCTOP}/sys/${MACHINE}/conf/GENERIC.hints \ ${DESTDIR}/boot/device.hints .endif .endif Modified: head/etc/sendmail/Makefile ============================================================================== --- head/etc/sendmail/Makefile Sun Mar 12 18:58:44 2017 (r315170) +++ head/etc/sendmail/Makefile Sun Mar 12 18:58:55 2017 (r315171) @@ -6,7 +6,7 @@ CHMOD= chmod ROMODE= 444 RM= rm -f -SENDMAIL_DIR= ${.CURDIR}/../../contrib/sendmail +SENDMAIL_DIR= ${SRCTOP}/contrib/sendmail SMDIR= ${SENDMAIL_DIR}/src SENDMAIL_CF_DIR?=${SENDMAIL_DIR}/cf From owner-svn-src-head@freebsd.org Sun Mar 12 18:59:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BBEB5D08B2F; Sun, 12 Mar 2017 18:59: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 mx1.freebsd.org (Postfix) with ESMTPS id 95CEB10BF; Sun, 12 Mar 2017 18:59:01 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2CIx0E1001769; Sun, 12 Mar 2017 18:59:00 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2CIx0OT001768; Sun, 12 Mar 2017 18:59:00 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201703121859.v2CIx0OT001768@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 12 Mar 2017 18:59:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315172 - head/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 18:59:01 -0000 Author: imp Date: Sun Mar 12 18:59:00 2017 New Revision: 315172 URL: https://svnweb.freebsd.org/changeset/base/315172 Log: Convert include over to SRCTOP Use SRCTOP in place of .CURDIR/.. as appropriate. The hand-crafted relative paths for the "links" option remain, though, since those are relative to /usr/include/sys/ not to the source tree. Differential Revision: https://reviews.freebsd.org/D9932 Sponsored by: Netflix Silence On: arch@ (twice) Modified: head/include/Makefile Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Sun Mar 12 18:58:55 2017 (r315171) +++ head/include/Makefile Sun Mar 12 18:59:00 2017 (r315172) @@ -29,7 +29,7 @@ INCS= a.out.h ar.h assert.h bitstring.h uchar.h ulimit.h unistd.h utime.h utmpx.h uuid.h varargs.h \ wchar.h wctype.h wordexp.h xlocale.h -.PATH: ${.CURDIR}/../contrib/libc-vis +.PATH: ${SRCTOP}/contrib/libc-vis INCS+= vis.h MHDRS= float.h floatingpoint.h stdarg.h @@ -103,7 +103,7 @@ SHARED?= copies INCS+= osreldate.h -SYSDIR= ${.CURDIR}/../sys +SYSDIR= ${SRCTOP}/sys NEWVERS_SH= ${SYSDIR}/conf/newvers.sh PARAM_H= ${SYSDIR}/sys/param.h MK_OSRELDATE_SH= ${.CURDIR}/mk-osreldate.sh @@ -142,7 +142,7 @@ compat: fi .endfor mtree -deU ${MTREE_FOLLOWS_SYMLINKS} \ - -f ${.CURDIR}/../etc/mtree/BSD.include.dist \ + -f ${SRCTOP}/etc/mtree/BSD.include.dist \ -p ${DESTDIR}${INCLUDEDIR} > /dev/null copies: .PHONY .META @@ -156,101 +156,101 @@ copies: .PHONY .META fi .endfor .for i in ${LDIRS} ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/bktr:Ndev/evdev:Ndev/hyperv:Ndev/nand:Ndev/pci} ${LSUBSUBDIRS} - cd ${.CURDIR}/../sys; \ + cd ${SRCTOP}/sys; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 $i/*.h \ ${DESTDIR}${INCLUDEDIR}/$i .endfor - cd ${.CURDIR}/../sys/dev/acpica; \ + cd ${SRCTOP}/sys/dev/acpica; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 acpiio.h \ ${DESTDIR}${INCLUDEDIR}/dev/acpica; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 acpi_hpet.h \ ${DESTDIR}${INCLUDEDIR}/dev/acpica - cd ${.CURDIR}/../sys/dev/agp; \ + cd ${SRCTOP}/sys/dev/agp; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 agpreg.h \ ${DESTDIR}${INCLUDEDIR}/dev/agp - cd ${.CURDIR}/../sys/dev/bktr; \ + cd ${SRCTOP}/sys/dev/bktr; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 ioctl_*.h \ ${DESTDIR}${INCLUDEDIR}/dev/bktr .if ${MK_NAND} != "no" - cd ${.CURDIR}/../sys/dev/nand; \ + cd ${SRCTOP}/sys/dev/nand; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 nandsim.h \ ${DESTDIR}${INCLUDEDIR}/dev/nand; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 nand_dev.h \ ${DESTDIR}${INCLUDEDIR}/dev/nand .endif - cd ${.CURDIR}/../sys/dev/evdev; \ + cd ${SRCTOP}/sys/dev/evdev; \ ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 input.h \ ${DESTDIR}${INCLUDEDIR}/dev/evdev; \ ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 input-event-codes.h \ ${DESTDIR}${INCLUDEDIR}/dev/evdev; \ ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 uinput.h \ ${DESTDIR}${INCLUDEDIR}/dev/evdev - cd ${.CURDIR}/../sys/dev/hyperv/include; \ + cd ${SRCTOP}/sys/dev/hyperv/include; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 hyperv.h \ ${DESTDIR}${INCLUDEDIR}/dev/hyperv - cd ${.CURDIR}/../sys/dev/hyperv/utilities; \ + cd ${SRCTOP}/sys/dev/hyperv/utilities; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 hv_snapshot.h \ ${DESTDIR}${INCLUDEDIR}/dev/hyperv - cd ${.CURDIR}/../sys/dev/pci; \ + cd ${SRCTOP}/sys/dev/pci; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 pcireg.h \ ${DESTDIR}${INCLUDEDIR}/dev/pci - cd ${.CURDIR}/../sys/fs/cd9660/; \ + cd ${SRCTOP}/sys/fs/cd9660/; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ ${DESTDIR}${INCLUDEDIR}/isofs/cd9660 .if ${MK_IPFILTER} != "no" - cd ${.CURDIR}/../sys/contrib/ipfilter/netinet; \ + cd ${SRCTOP}/sys/contrib/ipfilter/netinet; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ ${DESTDIR}${INCLUDEDIR}/netinet .endif .if ${MK_PF} != "no" - cd ${.CURDIR}/../sys/netpfil/pf; \ + cd ${SRCTOP}/sys/netpfil/pf; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ ${DESTDIR}${INCLUDEDIR}/netpfil/pf .endif - cd ${.CURDIR}/../sys/crypto; \ + cd ${SRCTOP}/sys/crypto; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 rijndael/rijndael.h \ ${DESTDIR}${INCLUDEDIR}/crypto - cd ${.CURDIR}/../sys/opencrypto; \ + cd ${SRCTOP}/sys/opencrypto; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ ${DESTDIR}${INCLUDEDIR}/crypto - cd ${.CURDIR}/../sys/${MACHINE}/include; \ + cd ${SRCTOP}/sys/${MACHINE}/include; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ ${DESTDIR}${INCLUDEDIR}/machine -.if exists(${.CURDIR}/../sys/${MACHINE}/include/pc) - cd ${.CURDIR}/../sys/${MACHINE}/include/pc; \ +.if exists(${SRCTOP}/sys/${MACHINE}/include/pc) + cd ${SRCTOP}/sys/${MACHINE}/include/pc; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ ${DESTDIR}${INCLUDEDIR}/machine/pc .endif .for _MARCH in ${_MARCHS} -.if exists(${.CURDIR}/../sys/${_MARCH}/include) +.if exists(${SRCTOP}/sys/${_MARCH}/include) ${INSTALL} -d ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 \ ${DESTDIR}${INCLUDEDIR}/${_MARCH}; \ - cd ${.CURDIR}/../sys/${_MARCH}/include; \ + cd ${SRCTOP}/sys/${_MARCH}/include; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ ${DESTDIR}${INCLUDEDIR}/${_MARCH} -.if exists(${.CURDIR}/../sys/${_MARCH}/include/pc) +.if exists(${SRCTOP}/sys/${_MARCH}/include/pc) ${INSTALL} -d ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 \ ${DESTDIR}${INCLUDEDIR}/${_MARCH}/pc; \ - cd ${.CURDIR}/../sys/${_MARCH}/include/pc; \ + cd ${SRCTOP}/sys/${_MARCH}/include/pc; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ ${DESTDIR}${INCLUDEDIR}/${_MARCH}/pc .endif .endif .endfor - cd ${.CURDIR}/../sys/rpc; \ + cd ${SRCTOP}/sys/rpc; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 types.h \ ${DESTDIR}${INCLUDEDIR}/rpc - cd ${.CURDIR}/../sys/teken; \ + cd ${SRCTOP}/sys/teken; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 teken.h \ ${DESTDIR}${INCLUDEDIR}/teken .if ${MK_CDDL} != "no" - cd ${.CURDIR}/../cddl/contrib/opensolaris/lib/libzfs_core/common; \ + cd ${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs_core/common; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 libzfs_core.h \ ${DESTDIR}${INCLUDEDIR} - cd ${.CURDIR}/../cddl/contrib/opensolaris/lib/libnvpair; \ + cd ${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 libnvpair.h \ ${DESTDIR}${INCLUDEDIR} - cd ${.CURDIR}/../sys/cddl/contrib/opensolaris/uts/common/sys; \ + cd ${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 nvpair.h \ ${DESTDIR}${INCLUDEDIR}/sys .endif @@ -258,114 +258,114 @@ copies: .PHONY .META symlinks: .PHONY .META @${ECHO} "Setting up symlinks to kernel source tree..." .for i in ${LDIRS} - cd ${.CURDIR}/../sys/$i; \ + cd ${SRCTOP}/sys/$i; \ for h in *.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/$i/$$h ${DESTDIR}${INCLUDEDIR}/$i; \ done .endfor .for i in ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/bktr:Ndev/evdev:Ndev/hyperv:Ndev/nand:Ndev/pci} - cd ${.CURDIR}/../sys/$i; \ + cd ${SRCTOP}/sys/$i; \ for h in *.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/$i/$$h ${DESTDIR}${INCLUDEDIR}/$i; \ done .endfor - cd ${.CURDIR}/../sys/dev/acpica; \ + cd ${SRCTOP}/sys/dev/acpica; \ for h in acpiio.h acpi_hpet.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/acpica/$$h \ ${DESTDIR}${INCLUDEDIR}/dev/acpica; \ done - cd ${.CURDIR}/../sys/dev/agp; \ + cd ${SRCTOP}/sys/dev/agp; \ for h in agpreg.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/agp/$$h \ ${DESTDIR}${INCLUDEDIR}/dev/agp; \ done - cd ${.CURDIR}/../sys/dev/bktr; \ + cd ${SRCTOP}/sys/dev/bktr; \ for h in ioctl_*.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/bktr/$$h \ ${DESTDIR}${INCLUDEDIR}/dev/bktr; \ done .if ${MK_NAND} != "no" - cd ${.CURDIR}/../sys/dev/nand; \ + cd ${SRCTOP}/sys/dev/nand; \ for h in nandsim.h nand_dev.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/nand/$$h \ ${DESTDIR}${INCLUDEDIR}/dev/nand; \ done .endif - cd ${.CURDIR}/../sys/dev/evdev; \ + cd ${SRCTOP}/sys/dev/evdev; \ for h in input.h input-event-codes.h uinput.h; do \ ln -fs ../../../../sys/dev/evdev/$$h \ ${DESTDIR}${INCLUDEDIR}/dev/evdev; \ done - cd ${.CURDIR}/../sys/dev/hyperv/include; \ + cd ${SRCTOP}/sys/dev/hyperv/include; \ for h in hyperv.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/hyperv/include/$$h \ ${DESTDIR}${INCLUDEDIR}/dev/hyperv; \ done - cd ${.CURDIR}/../sys/dev/hyperv/utilities; \ + cd ${SRCTOP}/sys/dev/hyperv/utilities; \ for h in hv_snapshot.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/hyperv/utilities/$$h \ ${DESTDIR}${INCLUDEDIR}/dev/hyperv; \ done - cd ${.CURDIR}/../sys/dev/pci; \ + cd ${SRCTOP}/sys/dev/pci; \ for h in pcireg.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/pci/$$h \ ${DESTDIR}${INCLUDEDIR}/dev/pci; \ done .for i in ${LSUBSUBDIRS} - cd ${.CURDIR}/../sys/$i; \ + cd ${SRCTOP}/sys/$i; \ for h in *.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../../sys/$i/$$h ${DESTDIR}${INCLUDEDIR}/$i; \ done .endfor .if ${MK_IPFILTER} != "no" - cd ${.CURDIR}/../sys/contrib/ipfilter/netinet; \ + cd ${SRCTOP}/sys/contrib/ipfilter/netinet; \ for h in *.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/contrib/ipfilter/netinet/$$h \ ${DESTDIR}${INCLUDEDIR}/netinet; \ done .endif .if ${MK_PF} != "no" - cd ${.CURDIR}/../sys/netpfil/pf; \ + cd ${SRCTOP}/sys/netpfil/pf; \ for h in *.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/netpfil/pf/$$h \ ${DESTDIR}${INCLUDEDIR}/netpfil/pf; \ done .endif - cd ${.CURDIR}/../sys/crypto; \ + cd ${SRCTOP}/sys/crypto; \ for h in rijndael/rijndael.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/crypto/$$h \ ${DESTDIR}${INCLUDEDIR}/crypto; \ done - cd ${.CURDIR}/../sys/opencrypto; \ + cd ${SRCTOP}/sys/opencrypto; \ for h in *.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/opencrypto/$$h \ ${DESTDIR}${INCLUDEDIR}/crypto; \ done - cd ${.CURDIR}/../sys/${MACHINE}/include; \ + cd ${SRCTOP}/sys/${MACHINE}/include; \ for h in *.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/${MACHINE}/include/$$h \ ${DESTDIR}${INCLUDEDIR}/machine; \ done -.if exists(${.CURDIR}/../sys/${MACHINE}/include/pc) - cd ${.CURDIR}/../sys/${MACHINE}/include/pc; \ +.if exists(${SRCTOP}/sys/${MACHINE}/include/pc) + cd ${SRCTOP}/sys/${MACHINE}/include/pc; \ for h in *.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/${MACHINE}/include/pc/$$h \ ${DESTDIR}${INCLUDEDIR}/machine/pc; \ done .endif .for _MARCH in ${_MARCHS} -.if exists(${.CURDIR}/../sys/${_MARCH}/include) +.if exists(${SRCTOP}/sys/${_MARCH}/include) ${INSTALL} -d ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 \ ${DESTDIR}${INCLUDEDIR}/${_MARCH}; \ - cd ${.CURDIR}/../sys/${_MARCH}/include; \ + cd ${SRCTOP}/sys/${_MARCH}/include; \ for h in *.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/${_MARCH}/include/$$h \ ${DESTDIR}${INCLUDEDIR}/${_MARCH}; \ done -.if exists(${.CURDIR}/../sys/${_MARCH}/include/pc) +.if exists(${SRCTOP}/sys/${_MARCH}/include/pc) ${INSTALL} -d ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 \ ${DESTDIR}${INCLUDEDIR}/${_MARCH}/pc; \ - cd ${.CURDIR}/../sys/${_MARCH}/include/pc; \ + cd ${SRCTOP}/sys/${_MARCH}/include/pc; \ for h in *.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/${_MARCH}/include/pc/$$h \ ${DESTDIR}${INCLUDEDIR}/${_MARCH}/pc; \ @@ -373,12 +373,12 @@ symlinks: .PHONY .META .endif .endif .endfor - cd ${.CURDIR}/../sys/fs/cd9660; \ + cd ${SRCTOP}/sys/fs/cd9660; \ for h in *.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/fs/cd9660/$$h \ ${DESTDIR}${INCLUDEDIR}/isofs/cd9660; \ done - cd ${.CURDIR}/../sys/rpc; \ + cd ${SRCTOP}/sys/rpc; \ for h in types.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/rpc/$$h \ ${DESTDIR}${INCLUDEDIR}/rpc; \ From owner-svn-src-head@freebsd.org Sun Mar 12 18:59:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF2E9D08B5C; Sun, 12 Mar 2017 18:59:06 +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 mx1.freebsd.org (Postfix) with ESMTPS id 7ADD51151; Sun, 12 Mar 2017 18:59:06 +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 v2CIx5VQ001823; Sun, 12 Mar 2017 18:59:05 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2CIx5qm001821; Sun, 12 Mar 2017 18:59:05 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201703121859.v2CIx5qm001821@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 12 Mar 2017 18:59:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315173 - in head/lib: libipsec libpathconv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 18:59:06 -0000 Author: imp Date: Sun Mar 12 18:59:05 2017 New Revision: 315173 URL: https://svnweb.freebsd.org/changeset/base/315173 Log: Fix two CURDIR references in comments that should be SRCTOP references. Differential Revision: https://reviews.freebsd.org/D9932 Sponsored by: Netflix Silence On: arch@ (twice) Modified: head/lib/libipsec/Makefile head/lib/libpathconv/Makefile Modified: head/lib/libipsec/Makefile ============================================================================== --- head/lib/libipsec/Makefile Sun Mar 12 18:59:00 2017 (r315172) +++ head/lib/libipsec/Makefile Sun Mar 12 18:59:05 2017 (r315173) @@ -40,7 +40,7 @@ CFLAGS+=-DIPSEC_DEBUG -DIPSEC CFLAGS+=-DINET6 .endif -#.PATH: ${.CURDIR}/../../sys/netipsec +#.PATH: ${SRCTOP}/sys/netipsec #SRCS= pfkey.c pfkey_dump.c SRCS+= ipsec_strerror.c policy_parse.y policy_token.l SRCS+= ipsec_dump_policy.c ipsec_get_policylen.c Modified: head/lib/libpathconv/Makefile ============================================================================== --- head/lib/libpathconv/Makefile Sun Mar 12 18:59:00 2017 (r315172) +++ head/lib/libpathconv/Makefile Sun Mar 12 18:59:05 2017 (r315173) @@ -10,7 +10,7 @@ INCS= pathconv.h SRCS= abs2rel.c rel2abs.c -#VERSION_DEF= ${.CURDIR}/../libc/Versions.def +#VERSION_DEF= ${SRCTOP/lib/libc/Versions.def #SYMBOL_MAPS= ${.CURDIR}/Symbol.map .if ${MK_TESTS} != "no" From owner-svn-src-head@freebsd.org Sun Mar 12 18:59:11 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E1B0D08B99; Sun, 12 Mar 2017 18:59:11 +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 mx1.freebsd.org (Postfix) with ESMTPS id 13FA711D4; Sun, 12 Mar 2017 18:59:11 +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 v2CIxAvt001877; Sun, 12 Mar 2017 18:59:10 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2CIxA3R001875; Sun, 12 Mar 2017 18:59:10 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201703121859.v2CIxA3R001875@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 12 Mar 2017 18:59:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315174 - in head/rescue: librescue rescue X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 18:59:11 -0000 Author: imp Date: Sun Mar 12 18:59:09 2017 New Revision: 315174 URL: https://svnweb.freebsd.org/changeset/base/315174 Log: Make rescue use SRCTOP Transition to SRCTOP. Also, standardize of {} instead of () variable deliminators while I'm here. Differential Revision: https://reviews.freebsd.org/D9932 Sponsored by: Netflix Silence On: arch@ (twice) Modified: head/rescue/librescue/Makefile head/rescue/rescue/Makefile Modified: head/rescue/librescue/Makefile ============================================================================== --- head/rescue/librescue/Makefile Sun Mar 12 18:59:05 2017 (r315173) +++ head/rescue/librescue/Makefile Sun Mar 12 18:59:09 2017 (r315174) @@ -13,10 +13,10 @@ MK_SSP= no # This library should never be installed, and isn't even linked # with in the normal way. (See ../rescue/Makefile for details.) -.PATH: ${.CURDIR}/../../lib/libc/gen \ - ${.CURDIR}/../../lib/libc/net \ - ${.CURDIR}/../../lib/libc/stdlib \ - ${.CURDIR}/../../lib/libutil +.PATH: ${SRCTOP}/lib/libc/gen \ + ${SRCTOP}/lib/libc/net \ + ${SRCTOP}/lib/libc/stdlib \ + ${SRCTOP}/lib/libutil LIB= rescue INTERNALLIB= # Don't install this library @@ -42,6 +42,6 @@ CFLAGS+= -DYP .if ${MK_HESIOD} != "no" CFLAGS+= -DHESIOD .endif -CFLAGS+= -I${.CURDIR}/../../lib/libc/include +CFLAGS+= -I${SRCTOP}/lib/libc/include .include Modified: head/rescue/rescue/Makefile ============================================================================== --- head/rescue/rescue/Makefile Sun Mar 12 18:59:05 2017 (r315173) +++ head/rescue/rescue/Makefile Sun Mar 12 18:59:09 2017 (r315174) @@ -160,16 +160,16 @@ CRUNCH_PROGS_sbin+= bsdlabel fdisk CRUNCH_ALIAS_bsdlabel= disklabel .endif -CRUNCH_SRCDIR_atm= $(.CURDIR)/../../sbin/atm/atm -CRUNCH_SRCDIR_atmconfig= $(.CURDIR)/../../sbin/atm/atmconfig -CRUNCH_SRCDIR_fore_dnld= $(.CURDIR)/../../sbin/atm/fore_dnld -CRUNCH_SRCDIR_ilmid= $(.CURDIR)/../../sbin/atm/ilmid -CRUNCH_SRCDIR_rtquery= $(.CURDIR)/../../sbin/routed/rtquery -CRUNCH_SRCDIR_ipf= $(.CURDIR)/../../sbin/ipf/ipf +CRUNCH_SRCDIR_atm= ${SRCTOP}/sbin/atm/atm +CRUNCH_SRCDIR_atmconfig= ${SRCTOP}/sbin/atm/atmconfig +CRUNCH_SRCDIR_fore_dnld= ${SRCTOP}/sbin/atm/fore_dnld +CRUNCH_SRCDIR_ilmid= ${SRCTOP}/sbin/atm/ilmid +CRUNCH_SRCDIR_rtquery= ${SRCTOP}/sbin/routed/rtquery +CRUNCH_SRCDIR_ipf= ${SRCTOP}/sbin/ipf/ipf .if ${MK_ZFS} != "no" -CRUNCH_SRCDIR_zfs= ${.CURDIR}/../../cddl/sbin/zfs -CRUNCH_SRCDIR_zpool= ${.CURDIR}/../../cddl/sbin/zpool -CRUNCH_SRCDIR_zdb= ${.CURDIR}/../../cddl/usr.sbin/zdb +CRUNCH_SRCDIR_zfs= ${SRCTOP}/cddl/sbin/zfs +CRUNCH_SRCDIR_zpool= ${SRCTOP}/cddl/sbin/zpool +CRUNCH_SRCDIR_zdb= ${SRCTOP}/cddl/usr.sbin/zdb .endif CRUNCH_ALIAS_reboot= fastboot halt fasthalt CRUNCH_ALIAS_restore= rrestore From owner-svn-src-head@freebsd.org Sun Mar 12 18:59:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1807BD08BF7; Sun, 12 Mar 2017 18:59:19 +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 mx1.freebsd.org (Postfix) with ESMTPS id E3A4312D8; Sun, 12 Mar 2017 18:59:18 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2CIxHg2001946; Sun, 12 Mar 2017 18:59:17 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2CIxGFh001931; Sun, 12 Mar 2017 18:59:16 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201703121859.v2CIxGFh001931@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 12 Mar 2017 18:59:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315175 - in head/gnu: lib/csu lib/libdialog lib/libgcov lib/libgomp lib/libreadline lib/libregex lib/libssp lib/libssp/libssp_nonshared lib/libstdc++ usr.bin/cc usr.bin/cc/include usr.... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 18:59:19 -0000 Author: imp Date: Sun Mar 12 18:59:16 2017 New Revision: 315175 URL: https://svnweb.freebsd.org/changeset/base/315175 Log: Convert gnu to using SRCTOP Prefer SRCTOP over CURDIR/../../contrib, etc. However, retain the "up one level" instances of ../ because they are really relative to this part of the tree and not a means to find the root of the tree. As such, it's better to leave them since that further the goal of being able to move directories if watned to in the future. Differential Revision: https://reviews.freebsd.org/D9932 Sponsored by: Netflix Silence On: arch@ (twice) Modified: head/gnu/lib/csu/Makefile head/gnu/lib/libdialog/Makefile head/gnu/lib/libgcov/Makefile head/gnu/lib/libgomp/Makefile head/gnu/lib/libreadline/Makefile.inc head/gnu/lib/libregex/Makefile head/gnu/lib/libssp/Makefile head/gnu/lib/libssp/libssp_nonshared/Makefile head/gnu/lib/libstdc++/Makefile head/gnu/usr.bin/cc/Makefile.inc head/gnu/usr.bin/cc/include/Makefile head/gnu/usr.bin/dialog/Makefile head/gnu/usr.bin/diff3/Makefile head/gnu/usr.bin/gperf/Makefile Modified: head/gnu/lib/csu/Makefile ============================================================================== --- head/gnu/lib/csu/Makefile Sun Mar 12 18:59:09 2017 (r315174) +++ head/gnu/lib/csu/Makefile Sun Mar 12 18:59:16 2017 (r315175) @@ -3,9 +3,9 @@ .include MK_SSP= no -GCCDIR= ${.CURDIR}/../../../contrib/gcc -GCCLIB= ${.CURDIR}/../../../contrib/gcclibs -CCDIR= ${.CURDIR}/../../usr.bin/cc +GCCDIR= ${SRCTOP}/contrib/gcc +GCCLIB= ${SRCTOP}/contrib/gcclibs +CCDIR= ${SRCTOP}/gnu/usr.bin/cc .include "${CCDIR}/Makefile.tgt" .include "${CCDIR}/cc_tools/Makefile.hdrs" Modified: head/gnu/lib/libdialog/Makefile ============================================================================== --- head/gnu/lib/libdialog/Makefile Sun Mar 12 18:59:09 2017 (r315174) +++ head/gnu/lib/libdialog/Makefile Sun Mar 12 18:59:16 2017 (r315175) @@ -1,6 +1,6 @@ # $FreeBSD$ -DIALOG= ${.CURDIR}/../../../contrib/dialog +DIALOG= ${SRCTOP}/contrib/dialog LIB= dialog SHLIB_MAJOR= 8 Modified: head/gnu/lib/libgcov/Makefile ============================================================================== --- head/gnu/lib/libgcov/Makefile Sun Mar 12 18:59:09 2017 (r315174) +++ head/gnu/lib/libgcov/Makefile Sun Mar 12 18:59:16 2017 (r315175) @@ -5,9 +5,9 @@ MK_SSP= no .include -GCCDIR= ${.CURDIR}/../../../contrib/gcc -GCCLIB= ${.CURDIR}/../../../contrib/gcclibs -CCDIR= ${.CURDIR}/../../usr.bin/cc +GCCDIR= ${SRCTOP}/contrib/gcc +GCCLIB= ${SRCTOP}/contrib/gcclibs +CCDIR= ${SRCTOP}/gnu/usr.bin/cc .include "${CCDIR}/Makefile.tgt" .include "${CCDIR}/cc_tools/Makefile.hdrs" Modified: head/gnu/lib/libgomp/Makefile ============================================================================== --- head/gnu/lib/libgomp/Makefile Sun Mar 12 18:59:09 2017 (r315174) +++ head/gnu/lib/libgomp/Makefile Sun Mar 12 18:59:16 2017 (r315175) @@ -1,7 +1,7 @@ # $FreeBSD$ -GCCDIR= ${.CURDIR}/../../../contrib/gcc -GCCLIB= ${.CURDIR}/../../../contrib/gcclibs +GCCDIR= ${SRCTOP}/contrib/gcc +GCCLIB= ${SRCTOP}/contrib/gcclibs SRCDIR= ${GCCLIB}/libgomp .PATH: ${SRCDIR} ${SRCDIR}/config/posix Modified: head/gnu/lib/libreadline/Makefile.inc ============================================================================== --- head/gnu/lib/libreadline/Makefile.inc Sun Mar 12 18:59:09 2017 (r315174) +++ head/gnu/lib/libreadline/Makefile.inc Sun Mar 12 18:59:16 2017 (r315175) @@ -3,7 +3,7 @@ SHLIB_MAJOR=8 RL_LIBRARY_VERSION=5.2 -SRCDIR= ${.CURDIR}/../../../../contrib/libreadline +SRCDIR= ${SRCTOP}/contrib/libreadline .PATH: ${SRCDIR} ${.CURDIR}/.. LOCAL_CFLAGS= -DRL_LIBRARY_VERSION='"$(RL_LIBRARY_VERSION)"' Modified: head/gnu/lib/libregex/Makefile ============================================================================== --- head/gnu/lib/libregex/Makefile Sun Mar 12 18:59:09 2017 (r315174) +++ head/gnu/lib/libregex/Makefile Sun Mar 12 18:59:16 2017 (r315175) @@ -3,7 +3,7 @@ LIB= gnuregex SHLIB_MAJOR= 5 -REGEXDIR= ${.CURDIR}/../../../contrib/libgnuregex +REGEXDIR= ${SRCTOP}/contrib/libgnuregex .PATH: ${REGEXDIR} SRCS= gnuregex.c Modified: head/gnu/lib/libssp/Makefile ============================================================================== --- head/gnu/lib/libssp/Makefile Sun Mar 12 18:59:09 2017 (r315174) +++ head/gnu/lib/libssp/Makefile Sun Mar 12 18:59:16 2017 (r315175) @@ -7,8 +7,8 @@ MK_SSP= no .include -GCCDIR= ${.CURDIR}/../../../contrib/gcc -GCCLIB= ${.CURDIR}/../../../contrib/gcclibs +GCCDIR= ${SRCTOP}/contrib/gcc +GCCLIB= ${SRCTOP}/contrib/gcclibs SRCDIR= ${GCCLIB}/libssp .PATH: ${SRCDIR} ${SRCDIR}/ssp Modified: head/gnu/lib/libssp/libssp_nonshared/Makefile ============================================================================== --- head/gnu/lib/libssp/libssp_nonshared/Makefile Sun Mar 12 18:59:09 2017 (r315174) +++ head/gnu/lib/libssp/libssp_nonshared/Makefile Sun Mar 12 18:59:16 2017 (r315175) @@ -1,7 +1,7 @@ # $FreeBSD$ -GCCDIR= ${.CURDIR}/../../../../contrib/gcc -GCCLIB= ${.CURDIR}/../../../../contrib/gcclibs +GCCDIR= ${SRCTOP}/contrib/gcc +GCCLIB= ${SRCTOP}/contrib/gcclibs .PATH: ${GCCLIB}/libssp ${GCCLIB}/libssp/ssp Modified: head/gnu/lib/libstdc++/Makefile ============================================================================== --- head/gnu/lib/libstdc++/Makefile Sun Mar 12 18:59:09 2017 (r315174) +++ head/gnu/lib/libstdc++/Makefile Sun Mar 12 18:59:16 2017 (r315175) @@ -3,9 +3,9 @@ .include GCCVER= 4.2 -GCCDIR= ${.CURDIR}/../../../contrib/gcc -GCCLIB= ${.CURDIR}/../../../contrib/gcclibs -SRCDIR= ${.CURDIR}/../../../contrib/libstdc++ +GCCDIR= ${SRCTOP}/contrib/gcc +GCCLIB= ${SRCTOP}/contrib/gcclibs +SRCDIR= ${SRCTOP}/contrib/libstdc++ SUPDIR= ${SRCDIR}/libsupc++ .PATH: ${SRCDIR}/src ${SRCDIR}/libmath ${SRCDIR}/config/io \ Modified: head/gnu/usr.bin/cc/Makefile.inc ============================================================================== --- head/gnu/usr.bin/cc/Makefile.inc Sun Mar 12 18:59:09 2017 (r315174) +++ head/gnu/usr.bin/cc/Makefile.inc Sun Mar 12 18:59:16 2017 (r315175) @@ -8,8 +8,8 @@ __CC_MAKEFILE_INC__= ${MFILE} GCCVER= 4.2 -GCCDIR= ${.CURDIR}/../../../../contrib/gcc -GCCLIB= ${.CURDIR}/../../../../contrib/gcclibs +GCCDIR= ${SRCTOP}/contrib/gcc +GCCLIB= ${SRCTOP}/contrib/gcclibs .include "Makefile.tgt" Modified: head/gnu/usr.bin/cc/include/Makefile ============================================================================== --- head/gnu/usr.bin/cc/include/Makefile Sun Mar 12 18:59:09 2017 (r315174) +++ head/gnu/usr.bin/cc/include/Makefile Sun Mar 12 18:59:16 2017 (r315175) @@ -6,7 +6,7 @@ INCSDIR=${INCLUDEDIR}/gcc/${GCCVER} -.PATH: ${GCCDIR}/config/${GCC_CPU} ${.CURDIR}/../../../../contrib/llvm/tools/clang/lib/Headers +.PATH: ${GCCDIR}/config/${GCC_CPU} ${SRCTOP}/contrib/llvm/tools/clang/lib/Headers .if ${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "amd64" INCS= ammintrin.h emmintrin.h mmintrin.h mm3dnow.h pmmintrin.h \ Modified: head/gnu/usr.bin/dialog/Makefile ============================================================================== --- head/gnu/usr.bin/dialog/Makefile Sun Mar 12 18:59:09 2017 (r315174) +++ head/gnu/usr.bin/dialog/Makefile Sun Mar 12 18:59:16 2017 (r315175) @@ -1,6 +1,6 @@ # $FreeBSD$ -DIALOG= ${.CURDIR}/../../../contrib/dialog +DIALOG= ${SRCTOP}/contrib/dialog PROG= dialog LIBADD= dialog ncursesw m Modified: head/gnu/usr.bin/diff3/Makefile ============================================================================== --- head/gnu/usr.bin/diff3/Makefile Sun Mar 12 18:59:09 2017 (r315174) +++ head/gnu/usr.bin/diff3/Makefile Sun Mar 12 18:59:16 2017 (r315175) @@ -1,9 +1,9 @@ # $FreeBSD$ -DIFFSRC=${.CURDIR}/../../../contrib/diff/src +DIFFSRC=${SRCTOP}/contrib/diff/src .PATH: ${DIFFSRC} \ - ${.CURDIR}/../../../contrib/diff/lib \ - ${.CURDIR}/../../../contrib/diff/man + ${SRCTOP}/contrib/diff/lib \ + ${SRCTOP}/contrib/diff/man PROG= diff3 SRCS= diff3.c version-etc.c \ @@ -12,9 +12,9 @@ SRCS= diff3.c version-etc.c \ # Important for ctype macros! CFLAGS+=-funsigned-char -CFLAGS+=-I${.CURDIR}/../../../contrib/diff/ -CFLAGS+=-I${.CURDIR}/../../../contrib/diff/src -CFLAGS+=-I${.CURDIR}/../../../contrib/diff/lib +CFLAGS+=-I${SRCTOP}/contrib/diff/ +CFLAGS+=-I${SRCTOP}/contrib/diff/src +CFLAGS+=-I${SRCTOP}/contrib/diff/lib CFLAGS+=-DHAVE_CONFIG_H CFLAGS+=-DDEFAULT_DIFF_PROGRAM=\"/usr/bin/diff\" Modified: head/gnu/usr.bin/gperf/Makefile ============================================================================== --- head/gnu/usr.bin/gperf/Makefile Sun Mar 12 18:59:09 2017 (r315174) +++ head/gnu/usr.bin/gperf/Makefile Sun Mar 12 18:59:16 2017 (r315175) @@ -1,7 +1,7 @@ # $FreeBSD$ .include -GPERFDIR= ${.CURDIR}/../../../contrib/gperf +GPERFDIR= ${SRCTOP}/contrib/gperf .PATH: ${GPERFDIR}/src ${GPERFDIR}/lib ${GPERFDIR}/doc From owner-svn-src-head@freebsd.org Sun Mar 12 19:26:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 549D4D098EA; Sun, 12 Mar 2017 19:26:26 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1BB4C1888; Sun, 12 Mar 2017 19:26:26 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2CJQP7p015188; Sun, 12 Mar 2017 19:26:25 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2CJQPXS015187; Sun, 12 Mar 2017 19:26:25 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201703121926.v2CJQPXS015187@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 12 Mar 2017 19:26:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315176 - head/sys/dev/evdev X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 19:26:26 -0000 Author: gonzo Date: Sun Mar 12 19:26:24 2017 New Revision: 315176 URL: https://svnweb.freebsd.org/changeset/base/315176 Log: [evdev] Do not ignore result evdev_register in UI_DEV_CREATE handler Make sure that uinput state field reflects actual state by checking evdev_register result for errors Submitted by: Vladimir Kondratiev Differential Revision: https://reviews.freebsd.org/D9320 Modified: head/sys/dev/evdev/uinput.c Modified: head/sys/dev/evdev/uinput.c ============================================================================== --- head/sys/dev/evdev/uinput.c Sun Mar 12 18:59:16 2017 (r315175) +++ head/sys/dev/evdev/uinput.c Sun Mar 12 19:26:24 2017 (r315176) @@ -501,9 +501,10 @@ uinput_ioctl_sub(struct uinput_cdev_stat evdev_set_methods(state->ucs_evdev, state, &uinput_ev_methods); evdev_set_flag(state->ucs_evdev, EVDEV_FLAG_SOFTREPEAT); - evdev_register(state->ucs_evdev); - state->ucs_state = UINPUT_RUNNING; - return (0); + ret = evdev_register(state->ucs_evdev); + if (ret == 0) + state->ucs_state = UINPUT_RUNNING; + return (ret); case UI_DEV_DESTROY: if (state->ucs_state != UINPUT_RUNNING) From owner-svn-src-head@freebsd.org Sun Mar 12 19:27:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 041A6D0999C; Sun, 12 Mar 2017 19:27:46 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7E831A31; Sun, 12 Mar 2017 19:27:45 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2CJRibm015277; Sun, 12 Mar 2017 19:27:44 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2CJRitH015276; Sun, 12 Mar 2017 19:27:44 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201703121927.v2CJRitH015276@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 12 Mar 2017 19:27:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315177 - head/sys/dev/evdev X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 19:27:46 -0000 Author: gonzo Date: Sun Mar 12 19:27:44 2017 New Revision: 315177 URL: https://svnweb.freebsd.org/changeset/base/315177 Log: [evdev] Fix race condition between client's event queue reading and dropping Submitted by: Vladimir Kondratiev MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D9320 Modified: head/sys/dev/evdev/cdev.c Modified: head/sys/dev/evdev/cdev.c ============================================================================== --- head/sys/dev/evdev/cdev.c Sun Mar 12 19:26:24 2017 (r315176) +++ head/sys/dev/evdev/cdev.c Sun Mar 12 19:27:44 2017 (r315177) @@ -162,7 +162,7 @@ static int evdev_read(struct cdev *dev, struct uio *uio, int ioflag) { struct evdev_client *client; - struct input_event *event; + struct input_event event; int ret = 0; int remaining; @@ -197,13 +197,14 @@ evdev_read(struct cdev *dev, struct uio } while (ret == 0 && !EVDEV_CLIENT_EMPTYQ(client) && remaining > 0) { - event = &client->ec_buffer[client->ec_buffer_head]; + memcpy(&event, &client->ec_buffer[client->ec_buffer_head], + sizeof(struct input_event)); client->ec_buffer_head = (client->ec_buffer_head + 1) % client->ec_buffer_size; remaining--; EVDEV_CLIENT_UNLOCKQ(client); - ret = uiomove(event, sizeof(struct input_event), uio); + ret = uiomove(&event, sizeof(struct input_event), uio); EVDEV_CLIENT_LOCKQ(client); } From owner-svn-src-head@freebsd.org Sun Mar 12 19:28:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 75658D099F9 for ; Sun, 12 Mar 2017 19:28:18 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm21-vm3.bullet.mail.ne1.yahoo.com (nm21-vm3.bullet.mail.ne1.yahoo.com [98.138.91.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48D871BCB for ; Sun, 12 Mar 2017 19:28:18 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1489346891; bh=hc290taOLmOTCF1Af7JWdWhCY3/TP0F3bS2yaaW2sgY=; h=Subject:To:References:From:Date:In-Reply-To:From:Subject; b=ReUAGnDUEFFn4uAJB98PVGH2fxVpdDN2FkzZhqfA7M96Lc2AypT2UpaSBbJul+mxE3egPAyCLp9UhEQQP7xI1uLDWqcCJDnPusj/GVd0jYcKQE/3g6/azNoekQpWoZ4TYSbfvmAq263FY755PB3cZBjyhcfmNprfFd4Lms7I/6FA/XBKNmtlXhq1HtMyLO/EkmFm2gL7ktNUXCJcoHxNb6z4TX0Zm43IZSUUbmLpLJzKcmIE1XUjVGdfK/OdoABaa75dnJ9yk2bsk+nfxqjeRPHrxVdaqPKnk/n1zupxp223V0cxTV8/464RKW7Z6Sk6d+a7YVt3uCSbQsLenRcBJg== Received: from [98.138.101.129] by nm21.bullet.mail.ne1.yahoo.com with NNFMP; 12 Mar 2017 19:28:11 -0000 Received: from [98.138.104.113] by tm17.bullet.mail.ne1.yahoo.com with NNFMP; 12 Mar 2017 19:28:11 -0000 Received: from [127.0.0.1] by smtp222.mail.ne1.yahoo.com with NNFMP; 12 Mar 2017 19:28:11 -0000 X-Yahoo-Newman-Id: 421483.71081.bm@smtp222.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: ctAxCbEVM1muwk9UTHASqPbElz6Gs0yZ0UjMncKbO.3sAQ8 MOSA.SvHTHw5dojuUWNlvbB34dUJ27PuWRPG1vjWk6Dcyh8iEDYRIXO0N2Li 8lTXSHDUC1sD2vbqXm6eBJ1sF6ZjX0Yo11qeL.OfOZkwANoppkMeR1igaFEC 9jUsjQeiiTuxQN0qKlGAbwwFzxo.UDjBLVkIXSvPK1FUahiOnZeue73YMcMo .ucIMjvdUZtyUdq_jP26bzyL1u.MzICJfdiLK1RAutNZDeyXrX7TKTLdZevP txEB6Zw2oydfe8kK_uT1al_cpbQUQjn8H5zlNDDkkovi6kNU3C1IJJsvIXuc E4l76VHjfza3.8MfkTg5zzqiUp7zBvI.nxXcC_Zf56BbFJelUQqhMvHTW7ll 0uNVVxpx.GHv9iPD_Wf5bnYcjItC34bjxzl0e_MPO9cf1NcrOJy.3knMhtYG tsA_q_0fpxD4KWH8mPe5q3JfC.8MXj6nWs3uRIdoelLBVifvA2jwSX0wIX9j 6y0dwvtImiy.lUI3PgYJYMVqvFZl.V1wj0ZKbznzxHR0f_eY- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r314780 - head/lib/libpam/modules/pam_exec To: Ian Lepore , Lawrence Stewart , src-committers@freebsd.org, =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= , svn-src-head@freebsd.org References: <201703061545.v26FjkNI027057@repo.freebsd.org> <739617a4-3eed-28d1-73e4-86d25d6d5fed@freebsd.org> <1839903b-fb05-bf3f-17bb-697afca9ecb7@FreeBSD.org> <1489341856.40576.88.camel@freebsd.org> From: Pedro Giffuni Message-ID: <374fa6f7-9e02-7c50-ccde-7f2c5386123e@FreeBSD.org> Date: Sun, 12 Mar 2017 14:31:17 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <1489341856.40576.88.camel@freebsd.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 19:28:18 -0000 On 3/12/2017 1:04 PM, Ian Lepore wrote: > On Sun, 2017-03-12 at 12:30 -0500, Pedro Giffuni wrote: >> On 3/12/2017 12:14 PM, Lawrence Stewart wrote: >>> Hi Pedro, >>> >>> On 07/03/2017 02:45, Pedro F. Giffuni wrote: >>>> Author: pfg >>>> Date: Mon Mar 6 15:45:46 2017 >>>> New Revision: 314780 >>>> URL: https://svnweb.freebsd.org/changeset/base/314780 >>>> >>>> Log: >>>> libpam: extra bounds checking through reallocarray(3). >>>> >>>> Reviewed by: des >>>> MFC after: 1 week >>>> >>>> Modified: >>>> head/lib/libpam/modules/pam_exec/pam_exec.c >>>> >>>> Modified: head/lib/libpam/modules/pam_exec/pam_exec.c >>>> ================================================================= >>>> ============= >>>> --- head/lib/libpam/modules/pam_exec/pam_exec.c Mon Mar 6 >>>> 15:42:03 2017 (r314779) >>>> +++ head/lib/libpam/modules/pam_exec/pam_exec.c Mon Mar 6 >>>> 15:45:46 2017 (r314780) >>>> @@ -138,7 +138,7 @@ _pam_exec(pam_handle_t *pamh __unused, >>>> nitems = sizeof(env_items) / sizeof(*env_items); >>>> /* Count PAM return values put in the environment. */ >>>> nitems_rv = options->return_prog_exit_status ? >>>> PAM_RV_COUNT : 0; >>>> - tmp = realloc(envlist, (envlen + nitems + 1 + nitems_rv >>>> + 1) * >>>> + tmp = reallocarray(envlist, envlen + nitems + 1 + >>>> nitems_rv + 1, >>>> sizeof(*envlist)); >>>> if (tmp == NULL) { >>>> openpam_free_envlist(envlist); >>>> >>> This commit breaks pam_exec for me... without this change I see the >>> expected PAM_* environment variables from my execed script, but >>> with >>> this change I no longer see any of them. >> Thanks for the report. >> >> It seems strange this can cause any failure. Perhaps there is a >> latent >> overflow here and we have been living with it? I will revert while it >> is >> investigated. >> >> BTW, the "nitems" variable may conflict with nitems() in sys/param.h. >> > A quirk of C that's often forgotten is that a function-like macro is > only expanded as a macro if the token following the macro name is an > open paren. So nitems() is a macro invokation and nitems = 0; is just > a variable. > > I'm not arguing against the replacement of variables named nitems, I > actually think that should have been done as part of importing the > function-like definition of nitems from netbsd. I am not worried about 'nitems', which is actually FreeBSD-native (NetBSD has another name for it). I do think reallocarray() found an underlying issue here though. Pedro. From owner-svn-src-head@freebsd.org Sun Mar 12 19:28:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94D2AD09A33; Sun, 12 Mar 2017 19:28:45 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 648311CD3; Sun, 12 Mar 2017 19:28:45 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2CJSiE8015362; Sun, 12 Mar 2017 19:28:44 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2CJSiEq015361; Sun, 12 Mar 2017 19:28:44 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201703121928.v2CJSiEq015361@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 12 Mar 2017 19:28:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315178 - head/sys/dev/evdev X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 19:28:45 -0000 Author: gonzo Date: Sun Mar 12 19:28:44 2017 New Revision: 315178 URL: https://svnweb.freebsd.org/changeset/base/315178 Log: [evdev] Fix Right Alt and Keypad Enter event codes for atkbd(4) and kbdmux(4) drivers Submitted by: Vladimir Kondratiev MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D9320 Modified: head/sys/dev/evdev/evdev_utils.c Modified: head/sys/dev/evdev/evdev_utils.c ============================================================================== --- head/sys/dev/evdev/evdev_utils.c Sun Mar 12 19:27:44 2017 (r315177) +++ head/sys/dev/evdev/evdev_utils.c Sun Mar 12 19:28:44 2017 (r315178) @@ -159,7 +159,7 @@ static uint16_t evdev_at_set1_scancodes[ KEY_PREVIOUSSONG, NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE, KEY_NEXTSONG, NONE, NONE, - NONE, KEY_KPENTER, KEY_RIGHTCTRL, NONE, + KEY_KPENTER, KEY_RIGHTCTRL, NONE, NONE, /* 0x20 - 0x3f. 0xE0 prefixed */ KEY_MUTE, KEY_CALC, KEY_PLAYPAUSE, NONE, KEY_STOPCD, NONE, NONE, NONE, From owner-svn-src-head@freebsd.org Sun Mar 12 20:19:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADFD8D09A0C; Sun, 12 Mar 2017 20:19:38 +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 mx1.freebsd.org (Postfix) with ESMTPS id 6416B1CBD; Sun, 12 Mar 2017 20:19:38 +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 v2CKJbsA036746; Sun, 12 Mar 2017 20:19:37 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2CKJb04036745; Sun, 12 Mar 2017 20:19:37 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201703122019.v2CKJb04036745@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 12 Mar 2017 20:19:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315180 - head/usr.bin/diff X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 20:19:38 -0000 Author: bapt Date: Sun Mar 12 20:19:37 2017 New Revision: 315180 URL: https://svnweb.freebsd.org/changeset/base/315180 Log: Readd codes that creates a tmp file for diffing stdout or devices Modified: head/usr.bin/diff/diffreg.c Modified: head/usr.bin/diff/diffreg.c ============================================================================== --- head/usr.bin/diff/diffreg.c Sun Mar 12 19:49:08 2017 (r315179) +++ head/usr.bin/diff/diffreg.c Sun Mar 12 20:19:37 2017 (r315180) @@ -194,6 +194,7 @@ struct context_vec { }; #define diff_output printf +static FILE *opentemp(const char *); static void output(char *, FILE *, char *, FILE *, int); static void check(FILE *, FILE *, int); static void range(int, int, const char *); @@ -335,7 +336,14 @@ diffreg(char *file1, char *file2, int fl if (flags & D_EMPTY1) f1 = fopen(_PATH_DEVNULL, "r"); else { - if (strcmp(file1, "-") == 0) + if (!S_ISREG(stb1.st_mode)) { + if ((f1 = opentemp(file1)) == NULL || + fstat(fileno(f1), &stb1) < 0) { + warn("%s", file1); + status |= 2; + goto closem; + } + } else if (strcmp(file1, "-") == 0) f1 = stdin; else f1 = fopen(file1, "r"); @@ -349,7 +357,14 @@ diffreg(char *file1, char *file2, int fl if (flags & D_EMPTY2) f2 = fopen(_PATH_DEVNULL, "r"); else { - if (strcmp(file2, "-") == 0) + if (!S_ISREG(stb2.st_mode)) { + if ((f2 = opentemp(file2)) == NULL || + fstat(fileno(f2), &stb2) < 0) { + warn("%s", file2); + status |= 2; + goto closem; + } + } else if (strcmp(file2, "-") == 0) f2 = stdin; else f2 = fopen(file2, "r"); @@ -539,6 +554,37 @@ files_differ(FILE *f1, FILE *f2, int fla } } +static FILE * +opentemp(const char *f) +{ + char buf[BUFSIZ], tempfile[PATH_MAX]; + ssize_t nread; + int ifd, ofd; + + if (strcmp(f, "-") == 0) + ifd = STDIN_FILENO; + else if ((ifd = open(f, O_RDONLY, 0644)) < 0) + return (NULL); + + (void)strlcpy(tempfile, _PATH_TMP "/diff.XXXXXXXX", sizeof(tempfile)); + + if ((ofd = mkstemp(tempfile)) < 0) { + close(ifd); + return (NULL); + } + unlink(tempfile); + while ((nread = read(ifd, buf, BUFSIZ)) > 0) { + if (write(ofd, buf, nread) != nread) { + close(ifd); + close(ofd); + return (NULL); + } + } + close(ifd); + lseek(ofd, (off_t)0, SEEK_SET); + return (fdopen(ofd, "r")); +} + char * splice(char *dir, char *path) { From owner-svn-src-head@freebsd.org Sun Mar 12 23:54:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A712D09652 for ; Sun, 12 Mar 2017 23:54:43 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x243.google.com (mail-pf0-x243.google.com [IPv6:2607:f8b0:400e:c00::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 17D6A1D9D; Sun, 12 Mar 2017 23:54:43 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x243.google.com with SMTP id j5so17153300pfb.3; Sun, 12 Mar 2017 16:54:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=2oJRRwa7WJ8R3N0B0WJMrkilT57hDT76Ai7Axc38DBQ=; b=GkvHDDZYLfB/NeHhUHmyFQeVYauBq8LFrU33gl1C/BdG7QT+lRLHBittRq5+CD0kfY nXYCPN7Wh0r+NaYbW1QJWq5VWzSrPvdcl7XrTyZDWhcWl+t2MdQfVDdej7pnsRygDM1+ CPaotm4zFpWsVu56Bhd8h+dnvSxLtSpI8ikiRcTWrJIny7MmqxKaC+XJr9ucyCSIvsSR 3Pq27/nQI4LNDwEuqyweSyBH63Cb+8amuqAlyoOTEw1F6bMTVM+50mvtwun0il94y/r6 kFki/jiaI08oSJsbSPsp9CglYyXPmmrdGH9o9Mh6wCGOo0I36HpIaCfsmRYjEpz70Gyi 8fXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=2oJRRwa7WJ8R3N0B0WJMrkilT57hDT76Ai7Axc38DBQ=; b=XiwpmcmPp5JudhZBHC+/E2Mvay2ZPTAWrm244saw3Ys6G/Wk+IXAfWq1UOUAsa2ZEL MP845oD3U28vHO509CaZdnJkD+DGmTQbi9uGCeuOCakBsSh/xzNM/T4S+SRoPLuzEm0J G96Hm/KNiLbRbUuZkqnLrtfCDnG2mvdzKDkWhMPob0NdCNVsO//Gev2aC2ACxhAdLPn0 Nxai+11lw5+RgXil/ubfBncOK9q5NLfJCDpBM9RYKX976PY0cVT6DySGfzGyg4VkJmyM Pg35bt1jxIJxvuZPoZvPdAHdVtuDEsWf014CZbxQy0Y08B+n0yDT7ms65qxOppvySF9V F3zQ== X-Gm-Message-State: AMke39kws4uI8ZlKl5hW2TFCZJ4F0XOnMOfS6twl4YB5dTdUvJF9lFJ6/m8WcQc6Of8LRg== X-Received: by 10.99.65.1 with SMTP id o1mr33366573pga.93.1489362882576; Sun, 12 Mar 2017 16:54:42 -0700 (PDT) Received: from ?IPv6:2607:fb90:8118:3a44:8ef:a92a:b7c7:1e88? ([2607:fb90:8118:3a44:8ef:a92a:b7c7:1e88]) by smtp.gmail.com with ESMTPSA id t12sm29987826pfg.14.2017.03.12.16.54.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 Mar 2017 16:54:41 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable From: Ngie Cooper Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r314780 - head/lib/libpam/modules/pam_exec Date: Sun, 12 Mar 2017 16:54:22 -0700 Message-Id: References: <201703061545.v26FjkNI027057@repo.freebsd.org> <739617a4-3eed-28d1-73e4-86d25d6d5fed@freebsd.org> <1839903b-fb05-bf3f-17bb-697afca9ecb7@FreeBSD.org> <1489341856.40576.88.camel@freebsd.org> Cc: Pedro Giffuni , Lawrence Stewart , src-committers@freebsd.org, =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= , svn-src-head@freebsd.org In-Reply-To: <1489341856.40576.88.camel@freebsd.org> To: Ian Lepore X-Mailer: iPhone Mail (14D27) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 12 Mar 2017 23:54:43 -0000 > On Mar 12, 2017, at 11:04, Ian Lepore wrote: ... > A quirk of C that's often forgotten is that a function-like macro is > only expanded as a macro if the token following the macro name is an > open paren. So nitems() is a macro invokation and nitems =3D 0; is just > a variable. >=20 > I'm not arguing against the replacement of variables named nitems, I > actually think that should have been done as part of importing the > function-like definition of nitems from netbsd. Minor correction (as Pedro noted later): - NetBSD uses __arraycount. - OpenBSD uses nitems. FreeBSD has standardized on nitems, probably because it came about in 8.x, w= hereas __arraycount came about later. Cheers, -Ngie= From owner-svn-src-head@freebsd.org Mon Mar 13 01:05:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D2D9D07AE0; Mon, 13 Mar 2017 01:05:26 +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 mx1.freebsd.org (Postfix) with ESMTPS id 2A2D41D6D; Mon, 13 Mar 2017 01:05: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 v2D15PUQ056345; Mon, 13 Mar 2017 01:05:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2D15PQK056344; Mon, 13 Mar 2017 01:05:25 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703130105.v2D15PQK056344@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 13 Mar 2017 01:05:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315181 - head/sbin/setkey X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Mar 2017 01:05:26 -0000 Author: ngie Date: Mon Mar 13 01:05:25 2017 New Revision: 315181 URL: https://svnweb.freebsd.org/changeset/base/315181 Log: Fix CFLAGS for including netipsec headers #includes The netipsec headers are referenced via netipsec/..., not ./... . Thus, assuming that the netipsec/... is nested under ${SRCTOP}/sys/netipsec is wrong. This tripped up some individuals building ^/head on systems pre-r314812. MFC after: 1 week Reported by: Roberto Rodriguez Jr Sponsored by: Dell EMC Isilon Modified: head/sbin/setkey/Makefile Modified: head/sbin/setkey/Makefile ============================================================================== --- head/sbin/setkey/Makefile Sun Mar 12 20:19:37 2017 (r315180) +++ head/sbin/setkey/Makefile Mon Mar 13 01:05:25 2017 (r315181) @@ -46,7 +46,7 @@ CLEANFILES= y.tab.c y.tab.h key_test.o k # ipsec_strerror.c is for avoiding shlib reference to non-exported function. .PATH: ${SRCTOP}/lib/libipsec ${SRCTOP}/sys/netipsec SRCS+= pfkey.c pfkey_dump.c key_debug.c ipsec_strerror.c -CFLAGS+= -I${SRCTOP}/sys/netipsec +CFLAGS+= -I${SRCTOP}/sys SRCS+= y.tab.h y.tab.h: parse.y From owner-svn-src-head@freebsd.org Mon Mar 13 01:37:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C08DD08719 for ; Mon, 13 Mar 2017 01:37:20 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id F40CE121A; Mon, 13 Mar 2017 01:37:19 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id DD978D43E10; Mon, 13 Mar 2017 12:16:09 +1100 (AEDT) Date: Mon, 13 Mar 2017 12:16:09 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Ngie Cooper cc: Ian Lepore , Pedro Giffuni , Lawrence Stewart , src-committers@freebsd.org, =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= , svn-src-head@freebsd.org Subject: Re: svn commit: r314780 - head/lib/libpam/modules/pam_exec In-Reply-To: Message-ID: <20170313110832.H1060@besplex.bde.org> References: <201703061545.v26FjkNI027057@repo.freebsd.org> <739617a4-3eed-28d1-73e4-86d25d6d5fed@freebsd.org> <1839903b-fb05-bf3f-17bb-697afca9ecb7@FreeBSD.org> <1489341856.40576.88.camel@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=AYLBJzfG c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=n-9ZFgpRNMLjgGdWWi0A:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Mar 2017 01:37:20 -0000 On Sun, 12 Mar 2017, Ngie Cooper wrote: >> On Mar 12, 2017, at 11:04, Ian Lepore wrote: > > ... > >> A quirk of C that's often forgotten is that a function-like macro is >> only expanded as a macro if the token following the macro name is an >> open paren. So nitems() is a macro invokation and nitems = 0; is just >> a variable. Perhaps it was a quirk in some pre-C90 compilers, but it is now intentional. >> I'm not arguing against the replacement of variables named nitems, I >> actually think that should have been done as part of importing the >> function-like definition of nitems from netbsd. I am arguing against it. Changing the it in the application would be punishing the application for the system stealing the application's namespace with undocumented pollution. > Minor correction (as Pedro noted later): > - NetBSD uses __arraycount. > - OpenBSD uses nitems. > FreeBSD has standardized on nitems, probably because it came about in 8.x, whereas __arraycount came about later. Good for NetBSD. __arraycount is not pollution and is clearly unusable in applications, at least when undocumented, since its name is reserved for the implementation. BTW, I lost the mail about churning HZ. Neither HZ or Hz is correct. HZ is only a bad name for the compile time default for the frequency of "clock ticks". The runtime frequency of "clock ticks" has the bad name "hz". The comment is trying to describe the latter. That is wrong too (see below). These names are bad because the name of a variable holding a freqency, or even the value of the variable, are very different from the units of the variable. "clock ticks" at the frequency of the misnamed variable "hz" are partly virtual now. On modern x86, there is no periodic clock, but one running at frequency hz is faked. The comment is trying to refer to this clock. But this is not the clock controlling the accuracy of the so-called "HZ" timestamp precision (TSP_HZ_. When hz is too large, the virtual clock ticks at frequency hz are scaled down by a factor of tc_tick that is larger than 1. This gives an accuracy of about 1/(hz/tc_tick). /sys/kern doesn't have many conflations of units with values under the spelling HZ (I think it has lots under the spelling hz; these are hard to avoid since the variable hz sometimes gives the correct frequency): - kern_poll.c says HZ=1000 in a comment (it means something like hz=1000) - sched_ule.c has a conversion macro named SCHED_TICK_HZ (it means from ticks in local units to ticks at frequency hz) - subr_param.c copies the bad example set by the config parameter HZ for HZ_VM - vfs_subr.c has 2 instances of HZ which should be (hz/tc_tick), and 2 instances of TSP_HZ. The sysctl for tc_tick has an incomplete description. It says that tc_tick is the "Approximate number of hardclock ticks in a millisecond". This is a bit verbose, but it avoids conflations with Hz and complications with the hz variable and units errors for "milli". But the stated approximation is impossible when hz is much smaller than 1000. Then tc_tick is 1. The sysctl is read-only, so users can't modify the scale factor to get more accuracy from TSP_HZ, etc. The implementation depends on hz/tc_tick being not much larger than 1000 (to work on slow or high latency systems) and tc_tick is chosen to give this. So description comment remains correct if it was correct originally. It is still simpler to describe this as a scale factor. It is not useful for users to know that this variable holds the stated value (except when it doesn't). It is useful for them to know that it scales the accuracy of hardclock ticks in some cases. Bruce From owner-svn-src-head@freebsd.org Mon Mar 13 01:54:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8213CD08CD3; Mon, 13 Mar 2017 01:54:43 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x241.google.com (mail-pg0-x241.google.com [IPv6:2607:f8b0:400e:c05::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 526101BE7; Mon, 13 Mar 2017 01:54:43 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x241.google.com with SMTP id g2so12031344pge.2; Sun, 12 Mar 2017 18:54:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=TgeqhQBZBfMGnepk7sBmRYcV9r02dFZxfnsEsc7eG50=; b=vPMkYAFPTx/X46+Rw6Oz/aglzPjBaoBZEEEhHbtNTf0517/WX/cpg0WQeChUkqnZFX p8IlE0F1vFoCX2dUGuZHAtmAMf1bKmNbXGjK0WE0WKQ3x2eqXfzKaqILdKzx6QgNDcKH RenvgmKhUnq/vynyQ5MaFELBxGe2wdTq5rmI1Nz4//26JkRg8Ymfm5ty3wh52Uy3LV8M o9WnViBrUiAK4lIyp6QaXnApmNh5/Q9LgztEquPAtvpfca0duUnf2alxwrAgt45Nbcf/ doYxIdCCpb13lVsVe/5OyDtBGcUIgvFto53atbV5f7xnNw/kykzvkegqDdcNK341bE/H oMsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=TgeqhQBZBfMGnepk7sBmRYcV9r02dFZxfnsEsc7eG50=; b=JUMKNgYQqS/TzrIDceSEeIWpRvfqXogYqZan4/YhE+0i+9feOOTq3pwE9+fN5uqROs IoiAVrmgnACWo7Rn1poXoO0Jo3V0FYj1LjqfMAIjLXSKeUHtQsnQhhDdjfHJ4wSZZpjy 5cHsCvYsS8q0aNX9X+3ydlS8CaDYotZq+l8uMWhyLxfhm8dSxOEw7ojTJOsg5+gVH6RE mTtbPTzBt/V78szEUg0GqMvtoqp0QU01O7lZWPuNU/hrXwpiTjBYrTsa1UhC7Syg/16P 4ABPnPgslNSl6ftROQp7rUQEip/HPWwM6R9XLVnkklMC2g9PAI7YKMDcTFkZKyNMNjvT IvTQ== X-Gm-Message-State: AMke39kJduWHIS2M5sKuqq6LVSs3fOPeoB4vmwYhPnNFWKhtvfer7bhQAKdGEP+SFXRVLA== X-Received: by 10.99.66.193 with SMTP id p184mr33989919pga.213.1489370082635; Sun, 12 Mar 2017 18:54:42 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id e2sm30380133pga.61.2017.03.12.18.54.41 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 12 Mar 2017 18:54:41 -0700 (PDT) Subject: Re: svn commit: r315112 - in head: sbin/geom/class/label sys/geom/part Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_29B2CF87-A514-47F3-8684-DDED9DE479C5"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201703120415.v2C4Fuiq037358@repo.freebsd.org> Date: Sun, 12 Mar 2017 18:54:40 -0700 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <5BE954A3-C6A1-4001-BEAD-914DCD9C6714@gmail.com> References: <201703120415.v2C4Fuiq037358@repo.freebsd.org> To: Marcelo Araujo X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Mar 2017 01:54:43 -0000 --Apple-Mail=_29B2CF87-A514-47F3-8684-DDED9DE479C5 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Mar 11, 2017, at 20:15, Marcelo Araujo wrote: >=20 > Author: araujo > Date: Sun Mar 12 04:15:56 2017 > New Revision: 315112 > URL: https://svnweb.freebsd.org/changeset/base/315112 >=20 > Log: > Add the capability to refresh the gpart(8) label without need a = reboot. >=20 > gpart(8) has functionality to change the label of an GPT partition. > This functionality works like it should, however, after a label = change > the /dev/gpt/ entries remain unchanged. glabel(8) status output = remains > unchanged. The change only takes effect after a reboot. >=20 > PR: 162690 > Submitted by: sub.mesa@gmail, Ben RUBSON = , ae > Reviewed by: allanjude, bapt, bcr > MFC after: 6 weeks. > Differential Revision: https://reviews.freebsd.org/D9935 Hi Marcel, This change broke GENERIC when running the eli tests with a = KASSERT: https://ci.freebsd.org/job/FreeBSD-head-amd64-test/2104/console = .Please fix or revert and fix later. Thanks, -Ngie --Apple-Mail=_29B2CF87-A514-47F3-8684-DDED9DE479C5 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYxfvhAAoJEPWDqSZpMIYVu/oP/1ivNdrRbOFCK01jRVoIhO7d rg4D55deIlmKRlLK1VFLO2wFjXvOL/X1Kha+jUDEHbalUBd5YbU2Q+bXeMKdXout To5My4yywPSX63th6gHjW/7KYS9PYD7i2dCuvblMHlWxgWAzWVkbih+MdiOSaTw3 JoLDSojOvVI11dfrbb1edgP/ddY1u/Jcy5TJ693Uh/XOM1wyYOQPlfg2roUrHS/J M0gZE0hSh4+KK+heBij0GqNUpry90EU1s2ZDmyHeXRF/7DEZAdx6e9Z+sXTWIxsX GTvKvtDnSIp0eeYIYnUz5kzsJlQVeP7ROuLxA5Yn1vSnc6VcFJNF/VU9nNObe2+n frsI2SJSS+DEyNTKfQyoz3cg6hM4DfGZxu7kMOv5pfhy7LA3D9hYThsu5gYbhMoO X50ZssqQAX2yE4UogFHs3MQWCqjbdi0xwGw/CRrboU8yq2hegd4IX5U7VdJgj1Oj 1IsOFsjM8IHOedLFoaBLQwPZ0P8QTgXbclMolRWmemX8J2kK6D7WgCcTBYCrX9ws CqIbKw2QTDLOux4R0yZ2iXxxlyi9lYJdvWZIOrZuEGMBnBXlYyRg1JRhV865oOyV 6soAfGx1flee02uDxJhWsiSC6LKAzTpOnuabRDH/62imfKqmvFf7HGp2HoBynvKL azJgr0muEhS0AVumUiOf =8e/p -----END PGP SIGNATURE----- --Apple-Mail=_29B2CF87-A514-47F3-8684-DDED9DE479C5-- From owner-svn-src-head@freebsd.org Mon Mar 13 02:12:35 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E838D07196; Mon, 13 Mar 2017 02:12:35 +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 mx1.freebsd.org (Postfix) with ESMTPS id 189E0790; Mon, 13 Mar 2017 02:12:35 +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 v2D2CYJ6084696; Mon, 13 Mar 2017 02:12:34 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2D2CYPP084695; Mon, 13 Mar 2017 02:12:34 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703130212.v2D2CYPP084695@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 13 Mar 2017 02:12:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315186 - head/lib/libcam X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Mar 2017 02:12:35 -0000 Author: ngie Date: Mon Mar 13 02:12:33 2017 New Revision: 315186 URL: https://svnweb.freebsd.org/changeset/base/315186 Log: lib/libcam/cam.3: note that cam_freeccb(3) with ccb == NULL is a no-op This allows me to accurately test this scenario, and for others to rely on the behavior, instead of relying on knowledge obtained via code inspection. Wording borrowed from free(3). MFC after: 1 week Requested by: ken (D9928) Reviewed by: imp Sponsored by: Dell EMC Isilon Differential Revision: D9969 Modified: head/lib/libcam/cam.3 Modified: head/lib/libcam/cam.3 ============================================================================== --- head/lib/libcam/cam.3 Mon Mar 13 01:34:42 2017 (r315185) +++ head/lib/libcam/cam.3 Mon Mar 13 02:12:33 2017 (r315186) @@ -302,6 +302,11 @@ structure. .Fn cam_freeccb frees CCBs allocated by .Fn cam_getccb . +If +.Va ccb +is +.Dv NULL , +no action is taken. .Pp .Fn cam_path_string takes as arguments a From owner-svn-src-head@freebsd.org Mon Mar 13 04:14:05 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 523E6D0ADF0; Mon, 13 Mar 2017 04:14:05 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1DD6CA95; Mon, 13 Mar 2017 04:14:05 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2D4E4AV035181; Mon, 13 Mar 2017 04:14:04 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2D4E4KG035180; Mon, 13 Mar 2017 04:14:04 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201703130414.v2D4E4KG035180@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 13 Mar 2017 04:14:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315187 - head/lib/libc/stdlib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Mar 2017 04:14:05 -0000 Author: pfg Date: Mon Mar 13 04:14:03 2017 New Revision: 315187 URL: https://svnweb.freebsd.org/changeset/base/315187 Log: Minor libc cleanup: let calloc(3) do the multiplication. MFC after: 3 days Modified: head/lib/libc/stdlib/getenv.c Modified: head/lib/libc/stdlib/getenv.c ============================================================================== --- head/lib/libc/stdlib/getenv.c Mon Mar 13 02:12:33 2017 (r315186) +++ head/lib/libc/stdlib/getenv.c Mon Mar 13 04:14:03 2017 (r315187) @@ -342,7 +342,7 @@ __build_env(void) envVarsSize = envVarsTotal * 2; /* Create new environment. */ - envVars = calloc(1, sizeof (*envVars) * envVarsSize); + envVars = calloc(envVarsSize, sizeof(*envVars)); if (envVars == NULL) goto Failure; From owner-svn-src-head@freebsd.org Mon Mar 13 07:45:17 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21F50D0A9E7; Mon, 13 Mar 2017 07:45:17 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 E59D4925; Mon, 13 Mar 2017 07:45:16 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2D7jGSj019943; Mon, 13 Mar 2017 07:45:16 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2D7jFtL019941; Mon, 13 Mar 2017 07:45:15 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201703130745.v2D7jFtL019941@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Mon, 13 Mar 2017 07:45:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315190 - in head: sys/dev/pci usr.sbin/pciconf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Mar 2017 07:45:17 -0000 Author: scottl Date: Mon Mar 13 07:45:15 2017 New Revision: 315190 URL: https://svnweb.freebsd.org/changeset/base/315190 Log: Add constants and descriptions for some new PCI class definitions Modified: head/sys/dev/pci/pcireg.h head/usr.sbin/pciconf/pciconf.c Modified: head/sys/dev/pci/pcireg.h ============================================================================== --- head/sys/dev/pci/pcireg.h Mon Mar 13 06:52:29 2017 (r315189) +++ head/sys/dev/pci/pcireg.h Mon Mar 13 07:45:15 2017 (r315190) @@ -478,6 +478,11 @@ #define PCIS_DASP_MGMT_CARD 0x20 #define PCIS_DASP_OTHER 0x80 +#define PCIC_ACCEL 0x12 +#define PCIS_ACCEL_PROCESSING 0x00 + +#define PCIC_INSTRUMENT 0x13 + #define PCIC_OTHER 0xff /* Bridge Control Values. */ Modified: head/usr.sbin/pciconf/pciconf.c ============================================================================== --- head/usr.sbin/pciconf/pciconf.c Mon Mar 13 06:52:29 2017 (r315189) +++ head/usr.sbin/pciconf/pciconf.c Mon Mar 13 07:45:15 2017 (r315190) @@ -700,6 +700,9 @@ static struct {PCIC_DASP, PCIS_DASP_PERFCNTRS, "performance counters"}, {PCIC_DASP, PCIS_DASP_COMM_SYNC, "communication synchronizer"}, {PCIC_DASP, PCIS_DASP_MGMT_CARD, "signal processing management"}, + {PCIC_ACCEL, -1, "processing accelerators"}, + {PCIC_ACCEL, PCIS_ACCEL_PROCESSING, "processing accelerators"}, + {PCIC_INSTRUMENT, -1, "non-essential instrumentation"}, {0, 0, NULL} }; From owner-svn-src-head@freebsd.org Mon Mar 13 08:55:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2ACFBD0A480; Mon, 13 Mar 2017 08:55:57 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: from mail-wr0-x244.google.com (mail-wr0-x244.google.com [IPv6:2a00:1450:400c:c0c::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B202810B5; Mon, 13 Mar 2017 08:55:56 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: by mail-wr0-x244.google.com with SMTP id u108so19167535wrb.2; Mon, 13 Mar 2017 01:55:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:references:to:reply-to:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=alHdyCbxJot/kQlRQ0UPqIcdCPE96C4uMUDjPstw+w4=; b=oiTOFRrJlUOko3x5xAT5kKIkgKYFdflLVbrFxQEqdrubFOuBrPwQGl3OaJcYm6K4xh bf7qNSN0i8vrx7Ia8Xz+ia3TyFcdLx/4xgyI04txYaUdkqhQBpV4Erc83W9q6F03cP7r veMLC4YNEXO9SUcpeo59cbx8qOlqS4JWVww8R7xEnCX4+4FwvbK+5TS9ebIr9lzWyEk8 VI/a++r6pxAEaOaTqTV1GR2A1NByqG4c7UY5YVAQM4xGI11FP/UhedN32qvPHfiehDGX /vOYV9WCEjfUkahRe62xJoQDy7mfu/yOvvmIybBIwlO/kgROGE8JYyv7dBSE1Ap0XbCs vgHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:references:to:reply-to:message-id :date:user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=alHdyCbxJot/kQlRQ0UPqIcdCPE96C4uMUDjPstw+w4=; b=VOcLRLH+32hwP1ORC9M3Bx9AZNGruD11YQt4rUteGHMjxq4wFwfpfNeii0M86Wd81D 46SbGMQPM17pSipNpl3yHtyRjZJWLbVS6bJGTihTyft+Q2aYO8V5btzASJAdJTFLVHWi HaEZKzXSDjq9nK9ABqYK4eOQC7kFAVKvqzj0+0oB82RmXvnwlzV5yb19rq/QrobwAiLP ZPbz31QFNq7JNC4khjMQUB6EM8wvm0u8W2n39WRq6kCbcHG6dsauVJ3sBTroMYudkW2E FWdX7J0Ns3S4Z7VWwotz3QLK8xgSWyioUKxQNCB/dfm4FzuxhaqvqFsxZryABrPFadsj 68Bg== X-Gm-Message-State: AMke39loGJGE4/adQYSiZjNEcj0WwgBm2/t4qL1Gyz/7tAq9Xmcj5zFPO8RpVwRklfA1YA== X-Received: by 10.223.141.148 with SMTP id o20mr28089511wrb.75.1489395354232; Mon, 13 Mar 2017 01:55:54 -0700 (PDT) Received: from [88.208.79.100] (halouny.humusoft.cz. [88.208.79.100]) by smtp.gmail.com with ESMTPSA id 32sm23974799wrr.64.2017.03.13.01.55.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Mar 2017 01:55:53 -0700 (PDT) From: Michal Meloun X-Google-Original-From: Michal Meloun Subject: Re: svn commit: r315051 - in head: . gnu/usr.bin gnu/usr.bin/diff usr.bin usr.bin/diff usr.bin/diff/tests References: <201703110501.v2B51UJQ045535@repo.freebsd.org> To: Baptiste Daroussin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: mmel@freebsd.org Message-ID: <758cfa1c-0985-f392-aa74-228f257a676c@freebsd.org> Date: Mon, 13 Mar 2017 09:55:52 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <201703110501.v2B51UJQ045535@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Mar 2017 08:55:57 -0000 On 11.03.2017 6:01, Baptiste Daroussin wrote: > Author: bapt > Date: Sat Mar 11 05:01:29 2017 > New Revision: 315051 > URL: https://svnweb.freebsd.org/changeset/base/315051 > > Log: > Import diff from OpenBSD and remove GNU diff > > Some of the modifications from the previous summer of code has been integrated > Modification for compatibility with GNU diff output has been added > > Main difference with OpenBSD: > Implement multiple GNU diff options: > * --ignore-file-name-case > * --no-ignore-file-name-case > * --normal > * --tabsize > * --strip-trailing-cr > Make diff -p compatible with GNU diff > Implement diff -l > Make diff -r compatible with GNU diff > > Capsicumize diffing 2 regular files > Add a simple test suite > > Approved by: AsiaBSDcon devsummit > Obtained from: OpenBSD, GSoC > Relnotes: yes > It seems that this commit breaks mergemaster (but I'm not sure): ----- diff: unable to limit rights on: /etc/casper/system.dns: Function not implemented --- Michal > Added: > head/usr.bin/diff/ > head/usr.bin/diff/Makefile (contents, props changed) > head/usr.bin/diff/TODO (contents, props changed) > head/usr.bin/diff/diff.1 (contents, props changed) > head/usr.bin/diff/diff.c (contents, props changed) > head/usr.bin/diff/diff.h (contents, props changed) > head/usr.bin/diff/diffdir.c (contents, props changed) > head/usr.bin/diff/diffreg.c (contents, props changed) > head/usr.bin/diff/tests/ > head/usr.bin/diff/tests/Makefile (contents, props changed) > head/usr.bin/diff/tests/diff.sh (contents, props changed) > head/usr.bin/diff/tests/input1.in (contents, props changed) > head/usr.bin/diff/tests/input2.in (contents, props changed) > head/usr.bin/diff/tests/input_c1.in (contents, props changed) > head/usr.bin/diff/tests/input_c2.in (contents, props changed) > head/usr.bin/diff/tests/simple.out (contents, props changed) > head/usr.bin/diff/tests/simple_b.out (contents, props changed) > head/usr.bin/diff/tests/simple_e.out (contents, props changed) > head/usr.bin/diff/tests/simple_i.out (contents, props changed) > head/usr.bin/diff/tests/simple_n.out (contents, props changed) > head/usr.bin/diff/tests/simple_p.out (contents, props changed) > head/usr.bin/diff/tests/simple_u.out (contents, props changed) > head/usr.bin/diff/tests/simple_w.out (contents, props changed) > head/usr.bin/diff/tests/unified_9999.out (contents, props changed) > head/usr.bin/diff/tests/unified_c9999.out (contents, props changed) > head/usr.bin/diff/tests/unified_p.out (contents, props changed) > head/usr.bin/diff/xmalloc.c (contents, props changed) > head/usr.bin/diff/xmalloc.h (contents, props changed) > Deleted: > head/gnu/usr.bin/diff/ > Modified: > head/ObsoleteFiles.inc > head/UPDATING > head/gnu/usr.bin/Makefile > head/usr.bin/Makefile > > Modified: head/ObsoleteFiles.inc > ============================================================================== > --- head/ObsoleteFiles.inc Sat Mar 11 04:57:52 2017 (r315050) > +++ head/ObsoleteFiles.inc Sat Mar 11 05:01:29 2017 (r315051) > @@ -38,6 +38,8 @@ > # xargs -n1 | sort | uniq -d; > # done > > +# 20170311: remove GNU diff > +OLD_FILES+=usr/share/man/man7/diff.7.gz > # 20170308: rename some tests > OLD_FILES+=usr/tests/bin/pwait/pwait > OLD_FILES+=usr/tests/usr.bin/timeout/timeout > > Modified: head/UPDATING > ============================================================================== > --- head/UPDATING Sat Mar 11 04:57:52 2017 (r315050) > +++ head/UPDATING Sat Mar 11 05:01:29 2017 (r315051) > @@ -51,6 +51,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 > > ****************************** SPECIAL WARNING: ****************************** > > +20170311: > + GNU diff has been replaced by a BSD licensed diff. Some features of GNU > + diff has not been implemented, if those are needed a newer version of > + GNU diff is available via the diffutils package under the gdiff name. > + > 20170302: > Clang, llvm, lldb, compiler-rt and libc++ have been upgraded to 4.0.0. > Please see the 20141231 entry below for information about prerequisites > > Modified: head/gnu/usr.bin/Makefile > ============================================================================== > --- head/gnu/usr.bin/Makefile Sat Mar 11 04:57:52 2017 (r315050) > +++ head/gnu/usr.bin/Makefile Sat Mar 11 05:01:29 2017 (r315051) > @@ -17,7 +17,7 @@ SUBDIR.${MK_GDB}+= gdb > .endif > > SUBDIR.${MK_GCC}+= cc > -SUBDIR.${MK_GNU_DIFF}+= diff diff3 > +SUBDIR.${MK_GNU_DIFF}+= diff3 > SUBDIR.${MK_GNU_GREP}+= grep > SUBDIR.${MK_GPL_DTC}+= dtc > SUBDIR.${MK_TESTS}+= tests > > Modified: head/usr.bin/Makefile > ============================================================================== > --- head/usr.bin/Makefile Sat Mar 11 04:57:52 2017 (r315050) > +++ head/usr.bin/Makefile Sat Mar 11 05:01:29 2017 (r315051) > @@ -34,6 +34,7 @@ SUBDIR= alias \ > csplit \ > ctlstat \ > cut \ > + diff \ > dirname \ > du \ > elf2aout \ > > Added: head/usr.bin/diff/Makefile > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/diff/Makefile Sat Mar 11 05:01:29 2017 (r315051) > @@ -0,0 +1,12 @@ > +# $FreeBSD$ > + > +.include > + > +PROG= diff > +SRCS= diff.c diffdir.c diffreg.c xmalloc.c > + > +.if ${MK_TESTS} != "no" > +SUBDIR+= tests > +.endif > + > +.include > > Added: head/usr.bin/diff/TODO > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/diff/TODO Sat Mar 11 05:01:29 2017 (r315051) > @@ -0,0 +1,18 @@ > +-y: > + * soc implemented it via calling sdiff directly, but some options are > + incompatible so it is fragile > + * just recommend the user to run sdiff directly and do not implement it > + * make a libsdiff and use that directly to avoid duplicating the code > + > +to be implemented: > +--suppress-common-lines: depends on -y > +--ignore-blank-lines > +--horizon-lines > +--ignore-tab-expansion > +--line-format > + > +Will probably be not implemented: > +--GTYPE-group-format > +--LTYPE-line-format > +--speed-large-file: (Do we need that? only a stub?) > +--help (We have a manpage already) > > Added: head/usr.bin/diff/diff.1 > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/diff/diff.1 Sat Mar 11 05:01:29 2017 (r315051) > @@ -0,0 +1,506 @@ > +.\" $OpenBSD: diff.1,v 1.47 2015/11/24 19:35:41 jmc Exp $ > +.\" > +.\" Copyright (c) 1980, 1990, 1993 > +.\" The Regents of the University of California. All rights reserved. > +.\" > +.\" Redistribution and use in source and binary forms, with or without > +.\" modification, are permitted provided that the following conditions > +.\" are met: > +.\" 1. Redistributions of source code must retain the above copyright > +.\" notice, this list of conditions and the following disclaimer. > +.\" 2. Redistributions in binary form must reproduce the above copyright > +.\" notice, this list of conditions and the following disclaimer in the > +.\" documentation and/or other materials provided with the distribution. > +.\" 3. Neither the name of the University nor the names of its contributors > +.\" may be used to endorse or promote products derived from this software > +.\" without specific prior written permission. > +.\" > +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > +.\" SUCH DAMAGE. > +.\" > +.\" @(#)diff.1 8.1 (Berkeley) 6/30/93 > +.\" $FreeBSD$ > +.\" > +.Dd Septembr 03, 2017 > +.Dt DIFF 1 > +.Os > +.Sh NAME > +.Nm diff > +.Nd differential file and directory comparator > +.Sh SYNOPSIS > +.Nm diff > +.Op Fl abdipTtw > +.Oo > +.Fl c | e | f | > +.Fl n | q | u > +.Oc > +.Op Fl -ignore-case > +.Op Fl -no-ignore-case > +.Op Fl -normal > +.Op Fl -strip-trailing-cr > +.Op Fl -tabsize > +.Op Fl I Ar pattern > +.Op Fl L Ar label > +.Ar file1 file2 > +.Nm diff > +.Op Fl abdilpTtw > +.Op Fl I Ar pattern > +.Op Fl L Ar label > +.Op Fl -ignore-case > +.Op Fl -no-ignore-case > +.Op Fl -normal > +.Op Fl -strip-trailing-cr > +.Op Fl -tabsize > +.Fl C Ar number > +.Ar file1 file2 > +.Nm diff > +.Op Fl abdiltw > +.Op Fl I Ar pattern > +.Op Fl -ignore-case > +.Op Fl -no-ignore-case > +.Op Fl -normal > +.Op Fl -strip-trailing-cr > +.Op Fl -tabsize > +.Fl D Ar string > +.Ar file1 file2 > +.Nm diff > +.Op Fl abdilpTtw > +.Op Fl I Ar pattern > +.Op Fl L Ar label > +.Op Fl -ignore-case > +.Op Fl -no-ignore-case > +.Op Fl -normal > +.Op Fl -tabsize > +.Op Fl -strip-trailing-cr > +.Fl U Ar number > +.Ar file1 file2 > +.Nm diff > +.Op Fl abdilNPprsTtw > +.Oo > +.Fl c | e | f | > +.Fl n | q | u > +.Oc > +.Op Fl -ignore-case > +.Op Fl -no-ignore-case > +.Op Fl -normal > +.Op Fl -tabsize > +.Op Fl I Ar pattern > +.Bk -words > +.Op Fl L Ar label > +.Op Fl S Ar name > +.Op Fl X Ar file > +.Op Fl x Ar pattern > +.Ek > +.Ar dir1 dir2 > +.Sh DESCRIPTION > +The > +.Nm > +utility compares the contents of > +.Ar file1 > +and > +.Ar file2 > +and writes to the standard output the list of changes necessary to > +convert one file into the other. > +No output is produced if the files are identical. > +.Pp > +Output options (mutually exclusive): > +.Bl -tag -width Ds > +.It Fl C Ar number > +Like > +.Fl c > +but produces a diff with > +.Ar number > +lines of context. > +.It Fl c > +Produces a diff with 3 lines of context. > +With > +.Fl c > +the output format is modified slightly: > +the output begins with identification of the files involved and > +their creation dates and then each change is separated > +by a line with fifteen > +.Li * Ns 's . > +The lines removed from > +.Ar file1 > +are marked with > +.Sq \&-\ \& ; > +those added to > +.Ar file2 > +are marked > +.Sq \+\ \& . > +Lines which are changed from one file to the other are marked in > +both files with > +.Sq !\ \& . > +Changes which lie within 3 lines of each other are grouped together on > +output. > +.It Fl D Ar string > +Creates a merged version of > +.Ar file1 > +and > +.Ar file2 > +on the standard output, with C preprocessor controls included so that > +a compilation of the result without defining > +.Ar string > +is equivalent to compiling > +.Ar file1 , > +while defining > +.Ar string > +will yield > +.Ar file2 . > +.It Fl e > +Produces output in a form suitable as input for the editor utility, > +.Xr ed 1 , > +which can then be used to convert file1 into file2. > +.Pp > +Extra commands are added to the output when comparing directories with > +.Fl e , > +so that the result is a > +.Xr sh 1 > +script for converting text files which are common to the two directories > +from their state in > +.Ar dir1 > +to their state in > +.Ar dir2 . > +.It Fl f > +Identical output to that of the > +.Fl e > +flag, but in reverse order. > +It cannot be digested by > +.Xr ed 1 . > +.It Fl n > +Produces a script similar to that of > +.Fl e , > +but in the opposite order and with a count of changed lines on each > +insert or delete command. > +This is the form used by > +.Xr rcsdiff 1 . > +.It Fl q > +Just print a line when the files differ. > +Does not output a list of changes. > +.It Fl U Ar number > +Like > +.Fl u > +but produces a diff with > +.Ar number > +lines of context. > +.It Fl u > +Produces a > +.Em unified > +diff with 3 lines of context. > +A unified diff is similar to the context diff produced by the > +.Fl c > +option. > +However, unlike with > +.Fl c , > +all lines to be changed (added and/or removed) are present in > +a single section. > +.El > +.Pp > +Comparison options: > +.Bl -tag -width Ds > +.It Fl a > +Treat all files as > +.Tn ASCII > +text. > +Normally > +.Nm > +will simply print > +.Dq Binary files ... differ > +if files contain binary characters. > +Use of this option forces > +.Nm > +to produce a diff. > +.It Fl b > +Causes trailing blanks (spaces and tabs) to be ignored, and other > +strings of blanks to compare equal. > +.It Fl d > +Try very hard to produce a diff as small as possible. > +This may consume a lot of processing power and memory when processing > +large files with many changes. > +.It Fl I Ar pattern > +Ignores changes, insertions, and deletions whose lines match the > +extended regular expression > +.Ar pattern . > +Multiple > +.Fl I > +patterns may be specified. > +All lines in the change must match some pattern for the change to be > +ignored. > +See > +.Xr re_format 7 > +for more information on regular expression patterns. > +.It Fl i > +Ignores the case of letters. > +E.g., > +.Dq A > +will compare equal to > +.Dq a . > +.It Fl l > +Pass the output through > +.Xr pr 1 > +to paginate it. > +.It Fl L Ar label > +Print > +.Ar label > +instead of the first (and second, if this option is specified twice) > +file name and time in the context or unified diff header. > +.It Fl p > +With unified and context diffs, show with each change > +the first 40 characters of the last line before the context beginning > +with a letter, an underscore or a dollar sign. > +For C source code following standard layout conventions, this will > +show the prototype of the function the change applies to. > +.It Fl T > +Print a tab rather than a space before the rest of the line for the > +normal, context or unified output formats. > +This makes the alignment of tabs in the line consistent. > +.It Fl t > +Will expand tabs in output lines. > +Normal or > +.Fl c > +output adds character(s) to the front of each line which may screw up > +the indentation of the original source lines and make the output listing > +difficult to interpret. > +This option will preserve the original source's indentation. > +.It Fl w > +Is similar to > +.Fl b > +but causes whitespace (blanks and tabs) to be totally ignored. > +E.g., > +.Dq if (\ \&a == b \&) > +will compare equal to > +.Dq if(a==b) . > +.El > +.Pp > +Directory comparison options: > +.Bl -tag -width Ds > +.It Fl N > +If a file is found in only one directory, act as if it was found in the > +other directory too but was of zero size. > +.It Fl P > +If a file is found only in > +.Ar dir2 , > +act as if it was found in > +.Ar dir1 > +too but was of zero size. > +.It Fl r > +Causes application of > +.Nm > +recursively to common subdirectories encountered. > +.It Fl S Ar name > +Re-starts a directory > +.Nm > +in the middle, beginning with file > +.Ar name . > +.It Fl s > +Causes > +.Nm > +to report files which are the same, which are otherwise not mentioned. > +.It Fl X Ar file > +Exclude files and subdirectories from comparison whose basenames match > +lines in > +.Ar file . > +Multiple > +.Fl X > +options may be specified. > +.It Fl x Ar pattern > +Exclude files and subdirectories from comparison whose basenames match > +.Ar pattern . > +Patterns are matched using shell-style globbing via > +.Xr fnmatch 3 . > +Multiple > +.Fl x > +options may be specified. > +.El > +.Pp > +If both arguments are directories, > +.Nm > +sorts the contents of the directories by name, and then runs the > +regular file > +.Nm > +algorithm, producing a change list, > +on text files which are different. > +Binary files which differ, > +common subdirectories, and files which appear in only one directory > +are described as such. > +In directory mode only regular files and directories are compared. > +If a non-regular file such as a device special file or > +.Tn FIFO > +is encountered, a diagnostic message is printed. > +.Pp > +If only one of > +.Ar file1 > +and > +.Ar file2 > +is a directory, > +.Nm > +is applied to the non-directory file and the file contained in > +the directory file with a filename that is the same as the > +last component of the non-directory file. > +.Pp > +If either > +.Ar file1 > +or > +.Ar file2 > +is > +.Sq - , > +the standard input is > +used in its place. > +.Ss Output Style > +The default (without > +.Fl e , > +.Fl c , > +or > +.Fl n > +.\" -C > +options) > +output contains lines of these forms, where > +.Va XX , YY , ZZ , QQ > +are line numbers respective of file order. > +.Pp > +.Bl -tag -width "XX,YYcZZ,QQ" -compact > +.It Li XX Ns Ic a Ns Li YY > +At (the end of) line > +.Va XX > +of > +.Ar file1 , > +append the contents > +of line > +.Va YY > +of > +.Ar file2 > +to make them equal. > +.It Li XX Ns Ic a Ns Li YY,ZZ > +Same as above, but append the range of lines, > +.Va YY > +through > +.Va ZZ > +of > +.Ar file2 > +to line > +.Va XX > +of file1. > +.It Li XX Ns Ic d Ns Li YY > +At line > +.Va XX > +delete > +the line. > +The value > +.Va YY > +tells to which line the change would bring > +.Ar file1 > +in line with > +.Ar file2 . > +.It Li XX,YY Ns Ic d Ns Li ZZ > +Delete the range of lines > +.Va XX > +through > +.Va YY > +in > +.Ar file1 . > +.It Li XX Ns Ic c Ns Li YY > +Change the line > +.Va XX > +in > +.Ar file1 > +to the line > +.Va YY > +in > +.Ar file2 . > +.It Li XX,YY Ns Ic c Ns Li ZZ > +Replace the range of specified lines with the line > +.Va ZZ . > +.It Li XX,YY Ns Ic c Ns Li ZZ,QQ > +Replace the range > +.Va XX , Ns Va YY > +from > +.Ar file1 > +with the range > +.Va ZZ , Ns Va QQ > +from > +.Ar file2 . > +.El > +.Pp > +These lines resemble > +.Xr ed 1 > +subcommands to convert > +.Ar file1 > +into > +.Ar file2 . > +The line numbers before the action letters pertain to > +.Ar file1 ; > +those after pertain to > +.Ar file2 . > +Thus, by exchanging > +.Ic a > +for > +.Ic d > +and reading the line in reverse order, one can also > +determine how to convert > +.Ar file2 > +into > +.Ar file1 . > +As in > +.Xr ed 1 , > +identical > +pairs (where num1 = num2) are abbreviated as a single > +number. > +.Sh FILES > +.Bl -tag -width /tmp/diff.XXXXXXXX -compact > +.It Pa /tmp/diff. Ns Ar XXXXXXXX > +Temporary file used when comparing a device or the standard input. > +Note that the temporary file is unlinked as soon as it is created > +so it will not show up in a directory listing. > +.El > +.Sh EXIT STATUS > +The > +.Nm > +utility exits with one of the following values: > +.Pp > +.Bl -tag -width Ds -offset indent -compact > +.It 0 > +No differences were found. > +.It 1 > +Differences were found. > +.It >1 > +An error occurred. > +.El > +.Sh SEE ALSO > +.Xr cmp 1 , > +.Xr comm 1 , > +.Xr diff3 1 , > +.Xr ed 1 , > +.Xr patch 1 , > +.Xr sdiff 1 > +.Rs > +.%A James W. Hunt > +.%A M. Douglas McIlroy > +.%T "An Algorithm for Differential File Comparison" > +.%J Computing Science Technical Report > +.%Q Bell Laboratories 41 > +.%D June 1976 > +.Re > +.Sh STANDARDS > +The > +.Nm > +utility is compliant with the > +.St -p1003.1-2008 > +specification. > +.Pp > +The flags > +.Op Fl aDdIiLlNnPpqSsTtwXx > +are extensions to that specification. > +.Sh HISTORY > +A > +.Nm > +command appeared in > +.At v6 . > > Added: head/usr.bin/diff/diff.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/diff/diff.c Sat Mar 11 05:01:29 2017 (r315051) > @@ -0,0 +1,454 @@ > +/* $OpenBSD: diff.c,v 1.65 2015/12/29 19:04:46 gsoares Exp $ */ > + > +/* > + * Copyright (c) 2003 Todd C. Miller > + * > + * Permission to use, copy, modify, and distribute this software for any > + * purpose with or without fee is hereby granted, provided that the above > + * copyright notice and this permission notice appear in all copies. > + * > + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES > + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF > + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR > + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES > + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN > + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF > + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. > + * > + * Sponsored in part by the Defense Advanced Research Projects > + * Agency (DARPA) and Air Force Research Laboratory, Air Force > + * Materiel Command, USAF, under agreement number F39502-99-1-0512. > + */ > + > +#include > +__FBSDID("$FreeBSD$"); > + > +#include > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include "diff.h" > +#include "xmalloc.h" > + > +int lflag, Nflag, Pflag, rflag, sflag, Tflag, cflag; > +int diff_format, diff_context, status, ignore_file_case; > +int tabsize = 8; > +char *start, *ifdefname, *diffargs, *label[2], *ignore_pats; > +struct stat stb1, stb2; > +struct excludes *excludes_list; > +regex_t ignore_re; > + > +#define OPTIONS "0123456789aBbC:cdD:efhI:iL:lnNPpqrS:sTtU:uwX:x:" > +enum { > + OPT_TSIZE = CHAR_MAX + 1, > + OPT_STRIPCR, > + OPT_IGN_FN_CASE, > + OPT_NO_IGN_FN_CASE, > + OPT_NORMAL, > +}; > + > +static struct option longopts[] = { > + { "text", no_argument, 0, 'a' }, > + { "ignore-space-change", no_argument, 0, 'b' }, > + { "context", optional_argument, 0, 'C' }, > + { "ifdef", required_argument, 0, 'D' }, > + { "minimal", no_argument, 0, 'd' }, > + { "ed", no_argument, 0, 'e' }, > + { "forward-ed", no_argument, 0, 'f' }, > + { "ignore-matching-lines", required_argument, 0, 'I' }, > + { "ignore-case", no_argument, 0, 'i' }, > + { "paginate", no_argument, NULL, 'l' }, > + { "label", required_argument, 0, 'L' }, > + { "new-file", no_argument, 0, 'N' }, > + { "rcs", no_argument, 0, 'n' }, > + { "unidirectional-new-file", no_argument, 0, 'P' }, > + { "show-c-function", no_argument, 0, 'p' }, > + { "brief", no_argument, 0, 'q' }, > + { "recursive", no_argument, 0, 'r' }, > + { "report-identical-files", no_argument, 0, 's' }, > + { "starting-file", required_argument, 0, 'S' }, > + { "expand-tabs", no_argument, 0, 't' }, > + { "initial-tab", no_argument, 0, 'T' }, > + { "unified", optional_argument, 0, 'U' }, > + { "ignore-all-space", no_argument, 0, 'w' }, > + { "exclude", required_argument, 0, 'x' }, > + { "exclude-from", required_argument, 0, 'X' }, > + { "ignore-file-name-case", no_argument, NULL, OPT_IGN_FN_CASE }, > + { "no-ignore-file-name-case", no_argument, NULL, OPT_NO_IGN_FN_CASE }, > + { "normal", no_argument, NULL, OPT_NORMAL }, > + { "strip-trailing-cr", no_argument, NULL, OPT_STRIPCR }, > + { "tabsize", optional_argument, NULL, OPT_TSIZE }, > + { NULL, 0, 0, '\0'} > +}; > + > +void usage(void) __dead2; > +void push_excludes(char *); > +void push_ignore_pats(char *); > +void read_excludes_file(char *file); > +void set_argstr(char **, char **); > + > +int > +main(int argc, char **argv) > +{ > + const char *errstr = NULL; > + char *ep, **oargv; > + long l; > + int ch, dflags, lastch, gotstdin, prevoptind, newarg; > + > + oargv = argv; > + gotstdin = 0; > + dflags = 0; > + lastch = '\0'; > + prevoptind = 1; > + newarg = 1; > + diff_context = 3; > + diff_format = 0; > + while ((ch = getopt_long(argc, argv, OPTIONS, longopts, NULL)) != -1) { > + switch (ch) { > + case '0': case '1': case '2': case '3': case '4': > + case '5': case '6': case '7': case '8': case '9': > + if (newarg) > + usage(); /* disallow -[0-9]+ */ > + else if (lastch == 'c' || lastch == 'u') > + diff_context = 0; > + else if (!isdigit(lastch) || diff_context > INT_MAX / 10) > + usage(); > + diff_context = (diff_context * 10) + (ch - '0'); > + break; > + case 'a': > + dflags |= D_FORCEASCII; > + break; > + case 'b': > + dflags |= D_FOLDBLANKS; > + break; > + case 'C': > + case 'c': > + cflag = 1; > + diff_format = D_CONTEXT; > + if (optarg != NULL) { > + l = strtol(optarg, &ep, 10); > + if (*ep != '\0' || l < 0 || l >= INT_MAX) > + usage(); > + diff_context = (int)l; > + } > + break; > + case 'd': > + dflags |= D_MINIMAL; > + break; > + case 'D': > + diff_format = D_IFDEF; > + ifdefname = optarg; > + break; > + case 'e': > + diff_format = D_EDIT; > + break; > + case 'f': > + diff_format = D_REVERSE; > + break; > + case 'h': > + /* silently ignore for backwards compatibility */ > + break; > + case 'I': > + push_ignore_pats(optarg); > + break; > + case 'i': > + dflags |= D_IGNORECASE; > + break; > + case 'L': > + if (label[0] == NULL) > + label[0] = optarg; > + else if (label[1] == NULL) > + label[1] = optarg; > + else > + usage(); > + break; > + case 'l': > + lflag = 1; > + break; > + case 'N': > + Nflag = 1; > + break; > + case 'n': > + diff_format = D_NREVERSE; > + break; > + case 'p': > + if (diff_format == 0) > + diff_format = D_CONTEXT; > + dflags |= D_PROTOTYPE; > + break; > + case 'P': > + Pflag = 1; > + break; > + case 'r': > + rflag = 1; > + break; > + case 'q': > + diff_format = D_BRIEF; > + break; > + case 'S': > + start = optarg; > + break; > + case 's': > + sflag = 1; > + break; > + case 'T': > + Tflag = 1; > + break; > + case 't': > + dflags |= D_EXPANDTABS; > + break; > + case 'U': > + case 'u': > + diff_format = D_UNIFIED; > + if (optarg != NULL) { > + l = strtol(optarg, &ep, 10); > + if (*ep != '\0' || l < 0 || l >= INT_MAX) > + usage(); > + diff_context = (int)l; > + } > + break; > + case 'w': > + dflags |= D_IGNOREBLANKS; > + break; > + case 'X': > + read_excludes_file(optarg); > + break; > + case 'x': > + push_excludes(optarg); > + break; > + case OPT_IGN_FN_CASE: > + ignore_file_case = 1; > + break; > + case OPT_NO_IGN_FN_CASE: > + ignore_file_case = 0; > + break; > + case OPT_NORMAL: > + diff_format = D_NORMAL; > + break; > + case OPT_TSIZE: > + tabsize = (int) strtonum(optarg, 1, INT_MAX, &errstr); > + if (errstr) { > + warnx("Invalid argument for tabsize"); > + usage(); > + } > + break; > + case OPT_STRIPCR: > + dflags |= D_STRIPCR; > + break; > + default: > + usage(); > + break; > + } > + lastch = ch; > + newarg = optind != prevoptind; > + prevoptind = optind; > + } > + argc -= optind; > + argv += optind; > + > +#ifdef __OpenBSD__ > + if (pledge("stdio rpath tmppath", NULL) == -1) > + err(2, "pledge"); > +#endif > + > + /* > + * Do sanity checks, fill in stb1 and stb2 and call the appropriate > + * driver routine. Both drivers use the contents of stb1 and stb2. > + */ > + if (argc != 2) > + usage(); > + if (ignore_pats != NULL) { > + char buf[BUFSIZ]; > + int error; > + > + if ((error = regcomp(&ignore_re, ignore_pats, > + REG_NEWLINE | REG_EXTENDED)) != 0) { > + regerror(error, &ignore_re, buf, sizeof(buf)); > + if (*ignore_pats != '\0') > + errx(2, "%s: %s", ignore_pats, buf); > + else > + errx(2, "%s", buf); > + } > + } > + if (strcmp(argv[0], "-") == 0) { > + fstat(STDIN_FILENO, &stb1); > + gotstdin = 1; > + } else if (stat(argv[0], &stb1) != 0) > + err(2, "%s", argv[0]); > + if (strcmp(argv[1], "-") == 0) { > + fstat(STDIN_FILENO, &stb2); > + gotstdin = 1; > + } else if (stat(argv[1], &stb2) != 0) > + err(2, "%s", argv[1]); > + if (gotstdin && (S_ISDIR(stb1.st_mode) || S_ISDIR(stb2.st_mode))) > + errx(2, "can't compare - to a directory"); > + set_argstr(oargv, argv); > + if (S_ISDIR(stb1.st_mode) && S_ISDIR(stb2.st_mode)) { > + if (diff_format == D_IFDEF) > + errx(2, "-D option not supported with directories"); > + diffdir(argv[0], argv[1], dflags); > + } else { > + if (S_ISDIR(stb1.st_mode)) { > + argv[0] = splice(argv[0], argv[1]); > + if (stat(argv[0], &stb1) < 0) > + err(2, "%s", argv[0]); > + } > + if (S_ISDIR(stb2.st_mode)) { > + argv[1] = splice(argv[1], argv[0]); > + if (stat(argv[1], &stb2) < 0) > + err(2, "%s", argv[1]); > + } > + print_status(diffreg(argv[0], argv[1], dflags, 1), argv[0], > + argv[1], ""); > + } > + exit(status); > +} > + > +void > +set_argstr(char **av, char **ave) > +{ > + size_t argsize; > + char **ap; > + > + argsize = 4 + *ave - *av + 1; > + diffargs = xmalloc(argsize); > + strlcpy(diffargs, "diff", argsize); > + for (ap = av + 1; ap < ave; ap++) { > + if (strcmp(*ap, "--") != 0) { > + strlcat(diffargs, " ", argsize); > + strlcat(diffargs, *ap, argsize); > + } > + } > +} > + > +/* > + * Read in an excludes file and push each line. > + */ > +void > +read_excludes_file(char *file) > +{ > + FILE *fp; > + char *buf, *pattern; > + size_t len; > + > + if (strcmp(file, "-") == 0) > + fp = stdin; > + else if ((fp = fopen(file, "r")) == NULL) > + err(2, "%s", file); > + while ((buf = fgetln(fp, &len)) != NULL) { > + if (buf[len - 1] == '\n') > + len--; > + pattern = xmalloc(len + 1); > + memcpy(pattern, buf, len); > + pattern[len] = '\0'; > + push_excludes(pattern); > + } > + if (strcmp(file, "-") != 0) > + fclose(fp); > +} > + > +/* > + * Push a pattern onto the excludes list. > + */ > +void > +push_excludes(char *pattern) > +{ > + struct excludes *entry; > + > + entry = xmalloc(sizeof(*entry)); > + entry->pattern = pattern; > + entry->next = excludes_list; > + excludes_list = entry; > +} > + > +void > +push_ignore_pats(char *pattern) > +{ > + size_t len; > + > + if (ignore_pats == NULL) > + ignore_pats = xstrdup(pattern); > + else { > + /* old + "|" + new + NUL */ > + len = strlen(ignore_pats) + strlen(pattern) + 2; > + ignore_pats = xreallocarray(ignore_pats, 1, len); > + strlcat(ignore_pats, "|", len); > + strlcat(ignore_pats, pattern, len); > + } > +} > + > +void > +print_only(const char *path, size_t dirlen, const char *entry) > +{ > + if (dirlen > 1) > + dirlen--; > + printf("Only in %.*s: %s\n", (int)dirlen, path, entry); > +} > + > +void > +print_status(int val, char *path1, char *path2, const char *entry) > +{ > + switch (val) { > + case D_BINARY: > + printf("Binary files %s%s and %s%s differ\n", > + path1, entry, path2, entry); > + break; > + case D_DIFFER: > + if (diff_format == D_BRIEF) > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > From owner-svn-src-head@freebsd.org Mon Mar 13 09:04:11 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C2D3D0A83F; Mon, 13 Mar 2017 09:04:11 +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 mx1.freebsd.org (Postfix) with ESMTPS id 4968216B3; Mon, 13 Mar 2017 09:04:11 +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 v2D94Ax7052099; Mon, 13 Mar 2017 09:04:10 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2D94AwZ052098; Mon, 13 Mar 2017 09:04:10 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201703130904.v2D94AwZ052098@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 13 Mar 2017 09:04:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315192 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Mar 2017 09:04:11 -0000 Author: ae Date: Mon Mar 13 09:04:10 2017 New Revision: 315192 URL: https://svnweb.freebsd.org/changeset/base/315192 Log: Ignore ifnet renaming in the bpf ifnet departure handler. PR: 213015 MFC after: 1 week Modified: head/sys/net/bpf.c Modified: head/sys/net/bpf.c ============================================================================== --- head/sys/net/bpf.c Mon Mar 13 08:04:25 2017 (r315191) +++ head/sys/net/bpf.c Mon Mar 13 09:04:10 2017 (r315192) @@ -2678,6 +2678,10 @@ bpf_ifdetach(void *arg __unused, struct struct bpf_if *bp, *bp_temp; int nmatched = 0; + /* Ignore ifnet renaming. */ + if (ifp->if_flags & IFF_RENAMING) + return; + BPF_LOCK(); /* * Find matching entries in free list. From owner-svn-src-head@freebsd.org Mon Mar 13 09:50:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99C0AD084CE; Mon, 13 Mar 2017 09:50:33 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward1j.cmail.yandex.net (forward1j.cmail.yandex.net [IPv6:2a02:6b8:0:1630::14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Yandex CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1DC7C1057; Mon, 13 Mar 2017 09:50:32 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b6:8]) by forward1j.cmail.yandex.net (Yandex) with ESMTP id 0D66920F3B; Mon, 13 Mar 2017 12:50:20 +0300 (MSK) Received: from smtp3p.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp3p.mail.yandex.net (Yandex) with ESMTP id D3A9C132007C; Mon, 13 Mar 2017 12:50:17 +0300 (MSK) Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id apcWlxyu0E-oGF8nYAx; Mon, 13 Mar 2017 12:50:16 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1489398616; bh=TotyL6jaACZ6LFYjSBCX4S/W8fNf0emZgZRBZjJP8Lc=; h=Subject:To:References:Cc:From:Message-ID:Date:In-Reply-To; b=TuyirByxf6MObWAu2i0KK4z3O6MA37Uelkb8j4a+LGMIke/enLJ/n7beaEATGUNmc +krN/29eq7Xf23OpqJzvB05WN8KGKm4Ew8Jtr70k6Ci9GtFkjYRypm7nIL48y+9GAI ldGIwF2T+d8sXR+EVQzyWWjziCGz6ni/o09IO0zc= Authentication-Results: smtp3p.mail.yandex.net; dkim=pass header.i=@yandex.ru X-Yandex-Suid-Status: 1 0,1 0,1 0,1 0,1 0 Subject: Re: svn commit: r315112 - in head: sbin/geom/class/label sys/geom/part To: "Ngie Cooper (yaneurabeya)" , Marcelo Araujo References: <201703120415.v2C4Fuiq037358@repo.freebsd.org> <5BE954A3-C6A1-4001-BEAD-914DCD9C6714@gmail.com> Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: "Andrey V. Elsukov" Openpgp: id=E6591E1B41DA1516F0C9BC0001C5EA0410C8A17A Message-ID: Date: Mon, 13 Mar 2017 12:48:45 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <5BE954A3-C6A1-4001-BEAD-914DCD9C6714@gmail.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="2DRKml0lVsCcHoU79tMuqtKh6Vg4LXLCD" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Mar 2017 09:50:33 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --2DRKml0lVsCcHoU79tMuqtKh6Vg4LXLCD Content-Type: multipart/mixed; boundary="xoVIjhAVTJE7jC984WhiHPNwUaIW5KM8D"; protected-headers="v1" From: "Andrey V. Elsukov" To: "Ngie Cooper (yaneurabeya)" , Marcelo Araujo Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r315112 - in head: sbin/geom/class/label sys/geom/part References: <201703120415.v2C4Fuiq037358@repo.freebsd.org> <5BE954A3-C6A1-4001-BEAD-914DCD9C6714@gmail.com> In-Reply-To: <5BE954A3-C6A1-4001-BEAD-914DCD9C6714@gmail.com> --xoVIjhAVTJE7jC984WhiHPNwUaIW5KM8D Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 13.03.2017 04:54, Ngie Cooper (yaneurabeya) wrote: > Hi Marcel, This change broke GENERIC when running the eli tests with > a KASSERT: > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/2104/console > .Please fix or revert and fix later. Thanks, -Ngie >=20 It seems g_media_changed() should be called with M_NOWAIT flag instead of zero. --=20 WBR, Andrey V. Elsukov --xoVIjhAVTJE7jC984WhiHPNwUaIW5KM8D-- --2DRKml0lVsCcHoU79tMuqtKh6Vg4LXLCD Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEzBAEBCAAdFiEE5lkeG0HaFRbwybwAAcXqBBDIoXoFAljGav0ACgkQAcXqBBDI oXol1AgAuijf7Bxt65MsKE2zfk/0GR/gS8l4GiGiVz8ZLNvzLk495GGLHvFh4PXo QDkdFcImkMUAVvQtflXDkG/JGYdrNE7PTqsW8Z3HNS9JUAZSH+KTtxm1tyd5ANxf irGislXvus5tme0WNnp0D8PvwN2o4VOpsZ4STsrznOnkKQOg9Mj5UoP2Jgzigvzk wQ9E0/kd070qVlwYcPfcl5Rl9AexFcr4oj+Dret862UVuRKFazO+5nAYBBlFHDvb lg8C7NDyY7Ii1B9IWts0u/6AWrpUVxh+s/mxGchk533ixVM3y04gIQ/u3R/UGGUR wVPxYRnqQlk2k7gr7T3jNxmwIRvrlQ== =/50u -----END PGP SIGNATURE----- --2DRKml0lVsCcHoU79tMuqtKh6Vg4LXLCD-- From owner-svn-src-head@freebsd.org Mon Mar 13 11:09:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5CF2C32980; Mon, 13 Mar 2017 11:09:18 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 9556B10EC; Mon, 13 Mar 2017 11:09:18 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2DB9Hkb004886; Mon, 13 Mar 2017 11:09:17 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2DB9Hdv004885; Mon, 13 Mar 2017 11:09:17 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201703131109.v2DB9Hdv004885@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Mon, 13 Mar 2017 11:09:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315195 - head/sys/geom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Mar 2017 11:09:18 -0000 Author: scottl Date: Mon Mar 13 11:09:17 2017 New Revision: 315195 URL: https://svnweb.freebsd.org/changeset/base/315195 Log: Report disk flags via the sysctl tree Modified: head/sys/geom/geom_disk.c Modified: head/sys/geom/geom_disk.c ============================================================================== --- head/sys/geom/geom_disk.c Mon Mar 13 10:49:36 2017 (r315194) +++ head/sys/geom/geom_disk.c Mon Mar 13 11:09:17 2017 (r315195) @@ -77,6 +77,8 @@ static g_ioctl_t g_disk_ioctl; static g_dumpconf_t g_disk_dumpconf; static g_provgone_t g_disk_providergone; +static int g_disk_sysctl_flags(SYSCTL_HANDLER_ARGS); + static struct g_class g_disk_class = { .name = G_DISK_CLASS_NAME, .version = G_VERSION, @@ -725,6 +727,10 @@ g_disk_create(void *arg, int flag) SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO, "led", CTLFLAG_RWTUN, sc->led, sizeof(sc->led), "LED name"); + SYSCTL_ADD_PROC(&sc->sysctl_ctx, + SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO, "flags", + CTLTYPE_STRING | CTLFLAG_RD, dp, 0, g_disk_sysctl_flags, + "A", "Report disk flags"); } pp->private = sc; dp->d_geom = gp; @@ -995,6 +1001,30 @@ g_kern_disks(void *p, int flag __unused) } static int +g_disk_sysctl_flags(SYSCTL_HANDLER_ARGS) +{ + struct disk *dp; + struct sbuf *sb; + int error; + + sb = sbuf_new_auto(); + dp = (struct disk *)arg1; + sbuf_printf(sb, "%b", dp->d_flags, + "\20" + "\2OPEN" + "\3CANDELETE" + "\4CANFLUSHCACHE" + "\5UNMAPPEDBIO" + "\6DIRECTCOMPLETION" + "\10CANZONE"); + + sbuf_finish(sb); + error = SYSCTL_OUT(req, sbuf_data(sb), sbuf_len(sb) + 1); + sbuf_delete(sb); + return (error); +} + +static int sysctl_disks(SYSCTL_HANDLER_ARGS) { int error; From owner-svn-src-head@freebsd.org Mon Mar 13 13:25:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2DA0D08360; Mon, 13 Mar 2017 13:25:36 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: from mail-oi0-x235.google.com (mail-oi0-x235.google.com [IPv6:2607:f8b0:4003:c06::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A5C2B1155; Mon, 13 Mar 2017 13:25:36 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: by mail-oi0-x235.google.com with SMTP id 62so77539355oih.2; Mon, 13 Mar 2017 06:25:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc; bh=I4XB12x+TmR/4QfLMPnt9xMTNYyE0XpjHiBdMrVgUyE=; b=VeTjiDrVHeZencdg3lZ9ZZYJXkCOze7QHATwW7BQxeonROOeFLi5fu4xDJ+Sm0JLRz 7p50m63/IXNKNGCqFnytqnAatmTcQe4SSAAImV18pSkhzsej24Eb8AWKiDqyli8f6/ns FVPEcqA+spT3hJLS1mPraIwJ23FlABPlIF5M9j8s8TwimPhMjGO++WG3YdAb+8ME0TES dFy3hwS+DyuEpOq1jXnSN272T1r8YKSu8plXzMuS/8/6vU+RPXstDxUoJ3Gu+oTukZg2 0IMnPJxBXf6y0U2M0rzP68zjEHZbbzXiFTaLTuqm9BAzrFn1exfBS6NTGOIBZBmPpwT/ P3Vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=I4XB12x+TmR/4QfLMPnt9xMTNYyE0XpjHiBdMrVgUyE=; b=WWYpgfRYUHshg0iSNF/042uLjqyWNKpMfvcOq97rfFwsu84glaCikutQ6jDYHkvS5r Sm9YQX2C0/8qmYLyOTXGOFsf22e0xSLQbyzu2in+QeOB9WTJNmVltWQzDud3nD0vyTVd vP65J7GwuXPmNBJl4Kv7eFnE9REnqQIkbTalE6l4ayV+a01OCHSYK+fCp8i9jkcHFov4 66c3w+t5PHU9C3sEidTnWzQRmKvaqFAtf7CixvAD/KacLgIYgWMd8pIexG0UyXCr5neq UlEJIhK8kOCo0DP9F31M4Xc3AeO0Y0GNJGUiwBILT0R844mx2kNtc7OsOVBiWUT5xo/v yqag== X-Gm-Message-State: AMke39mkR8E+y6LvOPAAUBlsWnDABaUsHY7gok3TAkGLoSAJLcD6jdOVO4WawmGmAei7Y9ME2gsOi5RL0K3bVw== X-Received: by 10.202.181.11 with SMTP id e11mr17237934oif.57.1489411536032; Mon, 13 Mar 2017 06:25:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.34.229 with HTTP; Mon, 13 Mar 2017 06:25:35 -0700 (PDT) Received: by 10.157.34.229 with HTTP; Mon, 13 Mar 2017 06:25:35 -0700 (PDT) Reply-To: araujo@freebsd.org In-Reply-To: References: <201703120415.v2C4Fuiq037358@repo.freebsd.org> <5BE954A3-C6A1-4001-BEAD-914DCD9C6714@gmail.com> From: Marcelo Araujo Date: Mon, 13 Mar 2017 21:25:35 +0800 Message-ID: Subject: Re: svn commit: r315112 - in head: sbin/geom/class/label sys/geom/part To: "Andrey V. Elsukov" Cc: Garrett Cooper , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Marcelo Araujo Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Mar 2017 13:25:37 -0000 Yes, I saw it too. I'm back to my hotel in Japan, and I will commit it soon. Thank you all for the hands up. Best, On Mar 13, 2017 6:50 PM, "Andrey V. Elsukov" wrote: > On 13.03.2017 04:54, Ngie Cooper (yaneurabeya) wrote: > > Hi Marcel, This change broke GENERIC when running the eli tests with > > a KASSERT: > > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/2104/console > > .Please fix or revert and fix later. Thanks, -Ngie > > > > It seems g_media_changed() should be called with M_NOWAIT flag instead > of zero. > > -- > WBR, Andrey V. Elsukov > > From owner-svn-src-head@freebsd.org Mon Mar 13 13:56:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26212D0A10F; Mon, 13 Mar 2017 13:56:03 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 E9AB8145A; Mon, 13 Mar 2017 13:56:02 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2DDu2or073711; Mon, 13 Mar 2017 13:56:02 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2DDu2iB073710; Mon, 13 Mar 2017 13:56:02 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201703131356.v2DDu2iB073710@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Mon, 13 Mar 2017 13:56:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315196 - head/sys/geom/part X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Mar 2017 13:56:03 -0000 Author: araujo Date: Mon Mar 13 13:56:01 2017 New Revision: 315196 URL: https://svnweb.freebsd.org/changeset/base/315196 Log: After r315112 I broke the tests with eli, instead to pass 0, I should pass M_NOWAIT to g_media_changed() that will call g_post_event() with this flag. Reported by: lwhsu, ngie and ae Modified: head/sys/geom/part/g_part.c Modified: head/sys/geom/part/g_part.c ============================================================================== --- head/sys/geom/part/g_part.c Mon Mar 13 11:09:17 2017 (r315195) +++ head/sys/geom/part/g_part.c Mon Mar 13 13:56:01 2017 (r315196) @@ -891,7 +891,7 @@ g_part_ctl_commit(struct gctl_req *req, /* Notify consumers that provider might be changed. */ if (entry->gpe_modified && ( entry->gpe_pp->acw + entry->gpe_pp->ace) == 0) - g_media_changed(entry->gpe_pp, 0); + g_media_changed(entry->gpe_pp, M_NOWAIT); entry->gpe_created = 0; entry->gpe_modified = 0; continue; From owner-svn-src-head@freebsd.org Mon Mar 13 13:59:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9D21D0A18A; Mon, 13 Mar 2017 13:59:21 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: from mail-ot0-x233.google.com (mail-ot0-x233.google.com [IPv6:2607:f8b0:4003:c0f::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9D42A1626; Mon, 13 Mar 2017 13:59:21 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: by mail-ot0-x233.google.com with SMTP id x37so113043485ota.2; Mon, 13 Mar 2017 06:59:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc; bh=Kn4qYl7Ra/yFpCf9MewMm+FRrXsASUSbWUEpVGk3Twk=; b=FnZRfxksyoEDitNRJSlQyBkockAbHm8H2P67mkuLB40+g7CEiRFsm6Q/ag5ZYSxlMZ mHdr1K53YFL+txhAVxLjfVFH61h8ii+/hgLFRFsuwsERUsQ7rKsvR1fo29cr6ZTTjLjS N35zKGVckg6bEmSmo14joyPAezwU7hejh3cX6U1XxSVlSkX8fUARIK1Txu8+z079he42 fWVTlT1ON6A4g3+qouUz4FizYgMq1jlQQ7J6l8wcKcfNWvD36Hyrq0j4OD0XZnQC9q1I qf+/XhtCA8b6ocCLf+tT4ASYoco5itKsuLpy/xPT2vcyfIhgKGMEWIkGTdDlncHbbjf6 boHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=Kn4qYl7Ra/yFpCf9MewMm+FRrXsASUSbWUEpVGk3Twk=; b=kAWt4q9SQRuuk7HX8xZAIe1fAh4jlDGj1H8GVjUBr2kklVOa9gw2QP2pFSY/Ujd6A/ ZHnK81QBlD+esJS9noqBFt0PZWWf+XrV2RhHCxliJI+mpBxLFCGWM6VF7ZSGVIw8Jp1S DPcn7r3NbZNLIfG81wkjXR5qt6ukRlXENc5/xJVqU71oXTJUecUHUzwwuRZF25WSTAvN TAq1EEtBvQ9tgwlvQAooo7aMRsI9zxyeMjHBKGq//MJaTyRRsyFK4ayATtvepYorHc4t dbkNVr8ipHxl9DIvJfDMNU7l4pM+DFekKaFvM3IgoI9QTfp72sBS+dnRnh0YZTXOFE1r ip8A== X-Gm-Message-State: AFeK/H1hsXC8/2sUsm4ixnzYOu5TJ0P3DESPCkVAcWl1G14Ikxp2YtPHglApAFITUsIFFPe4DavVfmXKVAqucA== X-Received: by 10.157.53.103 with SMTP id l36mr17361558ote.57.1489413561052; Mon, 13 Mar 2017 06:59:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.34.229 with HTTP; Mon, 13 Mar 2017 06:59:20 -0700 (PDT) Reply-To: araujo@freebsd.org In-Reply-To: References: <201703120415.v2C4Fuiq037358@repo.freebsd.org> <5BE954A3-C6A1-4001-BEAD-914DCD9C6714@gmail.com> From: Marcelo Araujo Date: Mon, 13 Mar 2017 21:59:20 +0800 Message-ID: Subject: Re: svn commit: r315112 - in head: sbin/geom/class/label sys/geom/part To: "Andrey V. Elsukov" Cc: "Ngie Cooper (yaneurabeya)" , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Mar 2017 13:59:22 -0000 Hi, Commit r315196 shall fix it! Let me know if it is fixed or not, or otherwise I need to revert those bits from sys/geom till I figure out a better solution. And taking the opportunity, ngie@ how I can run only that geli(8) test manually? Best, 2017-03-13 17:48 GMT+08:00 Andrey V. Elsukov : > On 13.03.2017 04:54, Ngie Cooper (yaneurabeya) wrote: > > Hi Marcel, This change broke GENERIC when running the eli tests with > > a KASSERT: > > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/2104/console > > .Please fix or revert and fix later. Thanks, -Ngie > > > > It seems g_media_changed() should be called with M_NOWAIT flag instead > of zero. > > -- > WBR, Andrey V. Elsukov > > -- -- Marcelo Araujo (__)araujo@FreeBSD.org \\\'',)http://www.FreeBSD.org \/ \ ^ Power To Server. .\. /_) From owner-svn-src-head@freebsd.org Mon Mar 13 14:02:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CEB60D0A38A; Mon, 13 Mar 2017 14:02:44 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x244.google.com (mail-pg0-x244.google.com [IPv6:2607:f8b0:400e:c05::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9B6391A66; Mon, 13 Mar 2017 14:02:44 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x244.google.com with SMTP id g2so13674462pge.2; Mon, 13 Mar 2017 07:02:44 -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=KFzUZZWp+j8yGHV6oJ+0UW2MIa9KyqHRia8C/fdZXio=; b=bGA5MnF/peD7pybu9Qnelqtj6ykcGav47yYI5aSU5RIBlCd7cLiOQFg1HTJDW5lY1b 2SD4zJ9JVWndVG8qSs4IR0XMHuy4Ibs6h8WnqnvpXsHAGcrLojAUxHQ90eXMTZVzS7ZZ npWsQJhSeeyXIchYGz11rJWfzMBBTWCeNVn8dK922pUUivtsvDp7PWfwa6juXwind0Fs EDFnOtzJmBGOjo4WQIwpLBHy193csPK1k6nsHmpXxLFZ+YpoYxVrAIH350VzRkfd1Alt /BSXtnI+tPaNQmqtsUut+nT8MgylgE4usuQs8pJA/vELwhoMwyatgvERf9V/XkbiIy8k GBEg== 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=KFzUZZWp+j8yGHV6oJ+0UW2MIa9KyqHRia8C/fdZXio=; b=oESgT6mIwoXpknQqjbbyl3XeGbHWvh9+213JtkoaM4REyoAgQduLi8onZBsz5HjcjF 29pKa/w3FsxqCO2jUVrOzrmSe7Sv2cppkuoivp51/tkZLfgJu795tijwcOK1ZB6qncS2 /nfYTrdxPFBrA4hwVd2dE/W449XiehSjI6Zd4AYBbNPzDvMjA5M3s/RtGSjyt4+FnIIg FcndDPIVYCz8UH4tdzH8hU0+JuJmmRUYJ3+5VLENAA8CZSDV6gbBacD4yZLFWork6TLw yjw4dE7fJjj1U/ZKFeTDu52iwXoV3FnPJdYTmL/R4MnR1yxt5BSqcAooi8J2pUAlJmFG Rprw== X-Gm-Message-State: AMke39lSDMJaV1oCzZLIqZlRb00srujOjQtZxATMj8e0EQIgz6G+YLRrgLr1qKqbJhEffA== X-Received: by 10.99.169.17 with SMTP id u17mr36379623pge.191.1489413763914; Mon, 13 Mar 2017 07:02:43 -0700 (PDT) Received: from [192.168.20.13] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id 19sm33177498pfo.50.2017.03.13.07.02.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Mar 2017 07:02:43 -0700 (PDT) Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r315112 - in head: sbin/geom/class/label sys/geom/part From: Ngie Cooper X-Mailer: iPhone Mail (14D27) In-Reply-To: Date: Mon, 13 Mar 2017 07:02:42 -0700 Cc: "Andrey V. Elsukov" , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers Message-Id: <2437BADD-CD01-456E-9DAC-E0237BF5FED5@gmail.com> References: <201703120415.v2C4Fuiq037358@repo.freebsd.org> <5BE954A3-C6A1-4001-BEAD-914DCD9C6714@gmail.com> To: araujo@freebsd.org Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Mar 2017 14:02:44 -0000 > On Mar 13, 2017, at 06:25, Marcelo Araujo wrote:= >=20 > Yes, I saw it too. > I'm back to my hotel in Japan, and I will commit it soon. >=20 > Thank you all for the hands up. https://img.clipartfest.com/6aa6e076f5af13d0dd77062e11c691fc_now-hands-in-ai= r-roller-coaster-fun-clipart_400-408.jpeg Thanks :}... -Ngie= From owner-svn-src-head@freebsd.org Mon Mar 13 14:05:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0C27D0A49D; Mon, 13 Mar 2017 14:05:31 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x236.google.com (mail-pg0-x236.google.com [IPv6:2607:f8b0:400e:c05::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8C1031CDF; Mon, 13 Mar 2017 14:05:31 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x236.google.com with SMTP id g2so46687793pge.3; Mon, 13 Mar 2017 07:05:31 -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=B6ZenjmIgGE7Vwr4MF86WYoYaqtMOUteZf7Bqa9cphU=; b=TRsp0KJUSBfaWH14rkuYJp2KhMKato+amprSz7B3e7J7XYu0buIcagd2/uxTDSlLLh wJP9cKqEbY+LQbo98EWeNBZ/XhArCzJY4i/PHKXTAAfcDMGZSPVkLIf6+OhdDAIwvNWI dh3VghRdk5y91Y/rH/9nluccK7iuzNWmqSBqVB3sGAyE8/+kPSUvyeMxSF1550KkDLhA H7mxnMwEhBfRRRe2FuObZmKE6Xa8TYYCFLHiSkS3uY/YEBGjyUGZ4dJLVurcFDnaOTiF yIUL9PTNei0RhsaDGZ8Rt4OvtM9bWYUYQl2wegFCY5nMRXt7886oKNTJ8qXECCP/CzR3 8+DA== 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=B6ZenjmIgGE7Vwr4MF86WYoYaqtMOUteZf7Bqa9cphU=; b=aHF7Rg/JJeRx4eYiI90eI0cgCICq776svcBDFJ5mRfAY+VoFbhvisyUE2V71uMmWTD VDqldjCub39rx3j+z6KLnRg+70kYFpT9bba1GolVZPiwTLrYJbdoxpbZBtL6EpWtR3v6 uAfeThdjlBgQeFGrpwx5Ul8DnRY8o9pO5DwU8Rlyo67/NI3lKBiLTCuEW5i/gqyVCnWN 9ytCB0UrTSkmmM+Qx05JF23UpBerOW+Q5jwNi2+NRxLN0EUWAQ2yCamCgC2C6GGb2La9 n865yR1n/iG25JTE8/EcExwUohQp0Ffy7f8ofkgupBrfO6bMe6xGhdRhELL7CopuknZe svPQ== X-Gm-Message-State: AMke39ld80MWh5xHZXVlW5nfgeSAdr4YdeuObXJ94SJFvfIwFSttOMkkmj8PuYEib/FqxQ== X-Received: by 10.84.216.15 with SMTP id m15mr48700492pli.22.1489413931177; Mon, 13 Mar 2017 07:05:31 -0700 (PDT) Received: from [192.168.20.13] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id t189sm33152617pfb.81.2017.03.13.07.05.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Mar 2017 07:05:30 -0700 (PDT) Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r315112 - in head: sbin/geom/class/label sys/geom/part From: Ngie Cooper X-Mailer: iPhone Mail (14D27) In-Reply-To: Date: Mon, 13 Mar 2017 07:05:30 -0700 Cc: "Andrey V. Elsukov" , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <76669C12-0CD3-4549-B9D1-BD9E8114D511@gmail.com> References: <201703120415.v2C4Fuiq037358@repo.freebsd.org> <5BE954A3-C6A1-4001-BEAD-914DCD9C6714@gmail.com> To: araujo@freebsd.org Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Mar 2017 14:05:31 -0000 > On Mar 13, 2017, at 06:59, Marcelo Araujo wrote:= >=20 > Hi, >=20 > Commit r315196 shall fix it! Let me know if it is fixed or not, or otherwi= se I need to revert those bits from sys/geom till I figure out a better solu= tion. >=20 > And taking the opportunity, ngie@ how I can run only that geli(8) test man= ually? sudo make -C tests/sys/geom/class/eli check ... is probably one of the easier ways. HTH! -Ngie > 2017-03-13 17:48 GMT+08:00 Andrey V. Elsukov : >> On 13.03.2017 04:54, Ngie Cooper (yaneurabeya) wrote: >> > Hi Marcel, This change broke GENERIC when running the eli tests with >> > a KASSERT: >> > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/2104/console >> > .Please fix or revert and fix later. Thanks, -Ngie >> > >>=20 >> It seems g_media_changed() should be called with M_NOWAIT flag instead >> of zero. >>=20 >> -- >> WBR, Andrey V. Elsukov >>=20 >=20 >=20 >=20 > --=20 >=20 > --=20 > Marcelo Araujo (__) > araujo@FreeBSD.org \\\'',) > http://www.FreeBSD.org \/ \ ^ > Power To Server. .\. /_) From owner-svn-src-head@freebsd.org Mon Mar 13 15:29:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B659D0AD78; Mon, 13 Mar 2017 15:29:43 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: from mail-oi0-x22a.google.com (mail-oi0-x22a.google.com [IPv6:2607:f8b0:4003:c06::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0BE7F1951; Mon, 13 Mar 2017 15:29:43 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: by mail-oi0-x22a.google.com with SMTP id 126so79304405oig.3; Mon, 13 Mar 2017 08:29:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc; bh=WfTzzNW/GM7ZH6RvPk84Z9VuS3F+8UF1hbPcrPhXUeo=; b=cb3l5pCl5674egWAew9sxlG4U87kgqr0rgCUmz3Y70JuqO7i1hkF8G6I42AbCn4/qd NYmBNDIgDiknf+JKJVLnQNZIEe5Afhv2nbtr+PIa4oEHV5dF5OkQ2CLB1mPlYBTVbfLy Cnqo8D/gYm9Ks+dGWmtvhqVh7BVX/SywZTKoXnoeCJKr1Nr4V/qxqcI8bcXqayM2Me5W nm8GdnmdwPoQelipGUvcFvCUlCJaqHkDRFy7g5XcQTtnObeAiDhWltj59nea9gJ4lqxt MlDBbU41WqP8QgRWd2BIbX/4LMBsZqynIDxYsB9CgdFEx4rJsXsT+k8H5JSslVs3DJzQ zCkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=WfTzzNW/GM7ZH6RvPk84Z9VuS3F+8UF1hbPcrPhXUeo=; b=SHAboq8kRQlxmUkHVxEayCLFB62bsdCmIC10VIOL4KvT50RLx1uN/LI8ycgK6nIh/F 08AO9lzW1ylgTWPdW+y/47JyenwpYDHm55SKT5wNVBjI1C73SAqE3umTK+yTsFX71yfg qLEBq+5oKiPsOk+jvvTIfdiniMsganjGGWosL3Y34jX0M8kClEVfaQZwvsdgm4Fl+3w/ lzA3Xvs3VG4kmk1TqDBY0MKc78DmHYPvo6jzpIxtHrogpasQ/Yb6ncdDvCA1T/KeWI6p hHybSym6OzJOOH3pGPUF/HNoKRd6hCZLNLVw/Q7cEULNivbIMep0qE98dv6FdKZGjgd8 wZdQ== X-Gm-Message-State: AMke39m13ElCuv/AJRRL2ru2HZi0F2eknwCjVMz7r3mjh7FHaNjHcp9WGO+XkRFbUkejK3URDfxedyXNxduJog== X-Received: by 10.202.240.70 with SMTP id o67mr17834326oih.195.1489418982479; Mon, 13 Mar 2017 08:29:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.34.229 with HTTP; Mon, 13 Mar 2017 08:29:40 -0700 (PDT) Received: by 10.157.34.229 with HTTP; Mon, 13 Mar 2017 08:29:40 -0700 (PDT) Reply-To: araujo@freebsd.org In-Reply-To: <76669C12-0CD3-4549-B9D1-BD9E8114D511@gmail.com> References: <201703120415.v2C4Fuiq037358@repo.freebsd.org> <5BE954A3-C6A1-4001-BEAD-914DCD9C6714@gmail.com> <76669C12-0CD3-4549-B9D1-BD9E8114D511@gmail.com> From: Marcelo Araujo Date: Mon, 13 Mar 2017 23:29:40 +0800 Message-ID: Subject: Re: svn commit: r315112 - in head: sbin/geom/class/label sys/geom/part To: Garrett Cooper Cc: "Andrey V. Elsukov" , Marcelo Araujo , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Mar 2017 15:29:43 -0000 Thank you! Seems we are good now. Br, On Mar 13, 2017 11:05 PM, "Ngie Cooper" wrote: > > On Mar 13, 2017, at 06:59, Marcelo Araujo wrote: > > Hi, > > Commit r315196 shall fix it! Let me know if it is fixed or not, or > otherwise I need to revert those bits from sys/geom till I figure out a > better solution. > > And taking the opportunity, ngie@ how I can run only that geli(8) test > manually? > > > sudo make -C tests/sys/geom/class/eli check > > ... is probably one of the easier ways. > > HTH! > -Ngie > > 2017-03-13 17:48 GMT+08:00 Andrey V. Elsukov : > >> On 13.03.2017 04:54, Ngie Cooper (yaneurabeya) wrote: >> > Hi Marcel, This change broke GENERIC when running the eli tests with >> > a KASSERT: >> > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/2104/console >> > .Please fix or revert and fix later. Thanks, -Ngie >> > >> >> It seems g_media_changed() should be called with M_NOWAIT flag instead >> of zero. >> >> -- >> WBR, Andrey V. Elsukov >> >> > > > -- > > -- > Marcelo Araujo (__)araujo@FreeBSD.org \\\'',)http://www.FreeBSD.org \/ \ ^ > Power To Server. .\. /_) > > From owner-svn-src-head@freebsd.org Mon Mar 13 15:34:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E603D0A06F; Mon, 13 Mar 2017 15:34:23 +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 mx1.freebsd.org (Postfix) with ESMTPS id CFA001F0D; Mon, 13 Mar 2017 15:34:22 +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 v2DFYLQ7013626; Mon, 13 Mar 2017 15:34:21 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2DFYLbq013625; Mon, 13 Mar 2017 15:34:21 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201703131534.v2DFYLbq013625@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 13 Mar 2017 15:34:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315197 - head/usr.bin/diff X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Mar 2017 15:34:23 -0000 Author: bapt Date: Mon Mar 13 15:34:21 2017 New Revision: 315197 URL: https://svnweb.freebsd.org/changeset/base/315197 Log: Do not die if cap_rights_limit reports ENOSYS Reported by: mmel Modified: head/usr.bin/diff/diffreg.c Modified: head/usr.bin/diff/diffreg.c ============================================================================== --- head/usr.bin/diff/diffreg.c Mon Mar 13 13:56:01 2017 (r315196) +++ head/usr.bin/diff/diffreg.c Mon Mar 13 15:34:21 2017 (r315197) @@ -424,9 +424,11 @@ diffreg(char *file1, char *file2, int fl if (capsicum) { cap_rights_init(&rights_ro, CAP_READ, CAP_FSTAT, CAP_SEEK); - if (cap_rights_limit(fileno(f1), &rights_ro) < 0) + if (cap_rights_limit(fileno(f1), &rights_ro) < 0 + && errno != ENOSYS) err(2, "unable to limit rights on: %s", file1); - if (cap_rights_limit(fileno(f2), &rights_ro) < 0) + if (cap_rights_limit(fileno(f2), &rights_ro) < 0 && + errno != ENOSYS) err(2, "unable to limit rights on: %s", file2); if (fileno(f1) == STDIN_FILENO || fileno(f2) == STDIN_FILENO) { /* stding has already been limited */ From owner-svn-src-head@freebsd.org Mon Mar 13 15:41:00 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4A6DD0A20C; Mon, 13 Mar 2017 15:41:00 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 851941339; Mon, 13 Mar 2017 15:41:00 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by freefall.freebsd.org (Postfix, from userid 1235) id CD1695C7F; Mon, 13 Mar 2017 15:40:59 +0000 (UTC) Date: Mon, 13 Mar 2017 16:40:59 +0100 From: Baptiste Daroussin To: mmel@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r315051 - in head: . gnu/usr.bin gnu/usr.bin/diff usr.bin usr.bin/diff usr.bin/diff/tests Message-ID: <20170313154059.ibzxffsw46uz73lk@ivaldir.net> References: <201703110501.v2B51UJQ045535@repo.freebsd.org> <758cfa1c-0985-f392-aa74-228f257a676c@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="o4igkzfpgvy7d5ao" Content-Disposition: inline In-Reply-To: <758cfa1c-0985-f392-aa74-228f257a676c@freebsd.org> User-Agent: NeoMutt/20170225 (1.8.0) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Mar 2017 15:41:00 -0000 --o4igkzfpgvy7d5ao Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 13, 2017 at 09:55:52AM +0100, Michal Meloun wrote: >=20 >=20 > On 11.03.2017 6:01, Baptiste Daroussin wrote: > > Author: bapt > > Date: Sat Mar 11 05:01:29 2017 > > New Revision: 315051 > > URL: https://svnweb.freebsd.org/changeset/base/315051 > >=20 > > Log: > > Import diff from OpenBSD and remove GNU diff > > =20 > > Some of the modifications from the previous summer of code has been i= ntegrated > > Modification for compatibility with GNU diff output has been added > > =20 > > Main difference with OpenBSD: > > Implement multiple GNU diff options: > > * --ignore-file-name-case > > * --no-ignore-file-name-case > > * --normal > > * --tabsize > > * --strip-trailing-cr > > Make diff -p compatible with GNU diff > > Implement diff -l > > Make diff -r compatible with GNU diff > > =20 > > Capsicumize diffing 2 regular files > > Add a simple test suite > > =20 > > Approved by: AsiaBSDcon devsummit > > Obtained from: OpenBSD, GSoC > > Relnotes: yes > >=20 >=20 > It seems that this commit breaks mergemaster (but I'm not sure): >=20 > ----- > diff: unable to limit rights on: /etc/casper/system.dns: Function not > implemented > --- >=20 > Michal Yes you were right I forgot a test against systems without capsicum, but th= at makes me wonder why you do build your system without capsicum? Best regards, Bapt --o4igkzfpgvy7d5ao Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAljGvW4ACgkQY4mL3PG3 Plrlvw//fYzrrHjyZ/sDad81lFVCO5J45bI5pgNOnFLzuCXy+pm4AzGFyF/RZL5Q kKtk2zKirhfuMKHMJXxl2Rt2cErkjLm43wCk4E7MAyFT50KD/i6ntGbyXFgFnAvd lXFdQ7vptJVnr12h/30SfZsr91hBXNQedIKFyaqhA/qeb8xhdeD4hux5+cI5Wmpy uLJMl4KZLNYFIbR47vfz0UhtvKvYAkcx5Rzmb6aYzsyC1tL2gYuilJLUqXCw1iSW 6rKeX9brd5OYSwrhNY0ayH69pW32j3R8B+NWXWvqCW+0+N1Lue5yEORD9ZOsGHtl 0lspexmlqrdcjGqjO5ipTYwiahcnmg6qa9cTqrzuyMHWgzJcBWdfPG7Oun2e8pt5 TriaqZoNshMCwzX5vEyqYQ96Qs9RU8hq5dkpF1reKxAp7Iq7iOLq8bFC/ao/DGDz 0gXWn0nHs7NTmNlkk8QZDM8tgeBchPRtG8vJEpL9kMDR6FjiCfmn5a1nMRJeR7pc 3x1furz2WBrUJxt1MzROR0HKJRZxTr/M30QJEIzpL3V0u/3ybzOyA+bw2EKTGAQF dg/P5K377qjt+eQENqklEZiMQ50Re8YKREWvIxYqQKfFcz2IklJFGJv+fnKpszpH OrkRGSLXVCr3yhdP0n/qLnM2CEkEPcV0DE4WLOorm/7v1xe0iJE= =zK7Y -----END PGP SIGNATURE----- --o4igkzfpgvy7d5ao-- From owner-svn-src-head@freebsd.org Mon Mar 13 16:44:08 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E51FD0A521; Mon, 13 Mar 2017 16:44:08 +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 mx1.freebsd.org (Postfix) with ESMTPS id 4C7A7153D; Mon, 13 Mar 2017 16:44:08 +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 v2DGi7Rb041763; Mon, 13 Mar 2017 16:44:07 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2DGi7mY041759; Mon, 13 Mar 2017 16:44:07 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201703131644.v2DGi7mY041759@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 13 Mar 2017 16:44:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315198 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Mar 2017 16:44:08 -0000 Author: adrian Date: Mon Mar 13 16:44:06 2017 New Revision: 315198 URL: https://svnweb.freebsd.org/changeset/base/315198 Log: [net80211] begin fleshing out per-VAP WME configurations. As part of (eventual) p2p/tdls/multi-STA support, a lot of global configuration parameters (WME, ERP (slot, preamble), channel width, HT protmode, etc are the biggest offenders) should be per-VAP. For multi-BSS VAP operation they may be linked, but for p2p/TDLS operation that can be off-channel they can definitely be different (think: 2GHz STA, 5GHz p2p.) The global configuration view of these is mostly a "configure the current non-smart-firmware NIC" view. This should be split up into per-VAP state, then a global non-smart-firmware-NIC management layer to handle channel changes and such in software. This is step one in a loooong road for this. It should be a big non-functional change for everyone. * create a per-VAP WME update call. * call it if its set, and call the global callback if it isn't This still uses global WME state - it's just preparation for a future change which will make the WME state per-VAP and fall through to a shared WME configuration for hostap operation. Note: this requires a full kernel recompile; the internal net80211 ABI has changed. Reviewed by: avos Differential Revision: https://reviews.freebsd.org/D9986 Modified: head/sys/net80211/ieee80211.c head/sys/net80211/ieee80211_proto.c head/sys/net80211/ieee80211_var.h Modified: head/sys/net80211/ieee80211.c ============================================================================== --- head/sys/net80211/ieee80211.c Mon Mar 13 15:34:21 2017 (r315197) +++ head/sys/net80211/ieee80211.c Mon Mar 13 16:44:06 2017 (r315198) @@ -727,6 +727,7 @@ ieee80211_vap_detach(struct ieee80211vap */ ieee80211_draintask(ic, &vap->iv_nstate_task); ieee80211_draintask(ic, &vap->iv_swbmiss_task); + ieee80211_draintask(ic, &vap->iv_wme_task); /* XXX band-aid until ifnet handles this for us */ taskqueue_drain(taskqueue_swi, &ifp->if_linktask); Modified: head/sys/net80211/ieee80211_proto.c ============================================================================== --- head/sys/net80211/ieee80211_proto.c Mon Mar 13 15:34:21 2017 (r315197) +++ head/sys/net80211/ieee80211_proto.c Mon Mar 13 16:44:06 2017 (r315198) @@ -241,7 +241,7 @@ static void update_mcast(void *, int); static void update_promisc(void *, int); static void update_channel(void *, int); static void update_chw(void *, int); -static void update_wme(void *, int); +static void vap_update_wme(void *, int); static void restart_vaps(void *, int); static void ieee80211_newstate_cb(void *, int); @@ -280,7 +280,6 @@ ieee80211_proto_attach(struct ieee80211c TASK_INIT(&ic->ic_chan_task, 0, update_channel, ic); TASK_INIT(&ic->ic_bmiss_task, 0, beacon_miss, ic); TASK_INIT(&ic->ic_chw_task, 0, update_chw, ic); - TASK_INIT(&ic->ic_wme_task, 0, update_wme, ic); TASK_INIT(&ic->ic_restart_task, 0, restart_vaps, ic); ic->ic_wme.wme_hipri_switch_hysteresis = @@ -338,6 +337,7 @@ ieee80211_proto_vattach(struct ieee80211 callout_init(&vap->iv_mgtsend, 1); TASK_INIT(&vap->iv_nstate_task, 0, ieee80211_newstate_cb, vap); TASK_INIT(&vap->iv_swbmiss_task, 0, beacon_swmiss, vap); + TASK_INIT(&vap->iv_wme_task, 0, vap_update_wme, vap); /* * Install default tx rate handling: no fixed rate, lowest * supported rate for mgmt and multicast frames. Default @@ -1285,7 +1285,7 @@ ieee80211_wme_updateparams_locked(struct } /* schedule the deferred WME update */ - ieee80211_runtask(ic, &ic->ic_wme_task); + ieee80211_runtask(ic, &vap->iv_wme_task); IEEE80211_DPRINTF(vap, IEEE80211_MSG_WME, "%s: WME params updated, cap_info 0x%x\n", __func__, @@ -1350,15 +1350,25 @@ update_chw(void *arg, int npending) ic->ic_update_chw(ic); } +/* + * Deferred WME update. + * + * In preparation for per-VAP WME configuration, call the VAP + * method if the VAP requires it. Otherwise, just call the + * older global method. There isn't a per-VAP WME configuration + * just yet so for now just use the global configuration. + */ static void -update_wme(void *arg, int npending) +vap_update_wme(void *arg, int npending) { - struct ieee80211com *ic = arg; + struct ieee80211vap *vap = arg; + struct ieee80211com *ic = vap->iv_ic; - /* - * XXX should we defer the WME configuration update until now? - */ - ic->ic_wme.wme_update(ic); + if (vap->iv_wme_update != NULL) + vap->iv_wme_update(vap, + ic->ic_wme.wme_chanParams.cap_wmeParams); + else + ic->ic_wme.wme_update(ic); } static void @@ -1385,7 +1395,6 @@ ieee80211_waitfor_parent(struct ieee8021 ieee80211_draintask(ic, &ic->ic_chan_task); ieee80211_draintask(ic, &ic->ic_bmiss_task); ieee80211_draintask(ic, &ic->ic_chw_task); - ieee80211_draintask(ic, &ic->ic_wme_task); taskqueue_unblock(ic->ic_tq); } Modified: head/sys/net80211/ieee80211_var.h ============================================================================== --- head/sys/net80211/ieee80211_var.h Mon Mar 13 15:34:21 2017 (r315197) +++ head/sys/net80211/ieee80211_var.h Mon Mar 13 16:44:06 2017 (r315198) @@ -149,7 +149,6 @@ struct ieee80211com { struct task ic_chan_task; /* deferred channel change */ struct task ic_bmiss_task; /* deferred beacon miss hndlr */ struct task ic_chw_task; /* deferred HT CHW update */ - struct task ic_wme_task; /* deferred WME update */ struct task ic_restart_task; /* deferred device restart */ counter_u64_t ic_ierrors; /* input errors */ @@ -557,6 +556,10 @@ struct ieee80211vap { int (*iv_output)(struct ifnet *, struct mbuf *, const struct sockaddr *, struct route *); + int (*iv_wme_update)(struct ieee80211vap *, + const struct wmeParams *wme_params); + struct task iv_wme_task; /* deferred VAP WME update */ + uint64_t iv_spare[6]; }; MALLOC_DECLARE(M_80211_VAP); From owner-svn-src-head@freebsd.org Mon Mar 13 16:45:27 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7CE1D0A5EB; Mon, 13 Mar 2017 16:45:27 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wm0-x230.google.com (mail-wm0-x230.google.com [IPv6:2a00:1450:400c:c09::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6616A17F2; Mon, 13 Mar 2017 16:45:27 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-wm0-x230.google.com with SMTP id v186so45081280wmd.0; Mon, 13 Mar 2017 09:45:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=osH4URHcfN8dQvsjzyKqEfvyU5bAhUDPaic/j8yUXh4=; b=Dvn7tsFIdKlZxQRXuPzzBj7bqES4GbGuXi71FgFdx4wRDvH2pDZM9mUlKiP7+ZG3/g G9MIZ4Fj3bfD28MY6obTzaTKUKsZzNJJCvdCklm96aUtcfnoDn08CNbR6q7brkcFAjAt lf9/E+ZPGnyLm0O91iAcLaVpCedXhvlaJuJ8ldWyv3J3R8LWIc0scXtAWIZ2KJntasu3 4Tk6i+b83SlaxsgUTeqb1JpAdhYpj1lKHSjnySHmu1wfDAseld+MQnzp1JRYalYdS3dw Oq9k/QxvXWpxgDU5kfNfUVSIaQByLysS2NUS7aUJ+uqJMUKTlTlesBzgc0jtCV09ixbx ZOKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=osH4URHcfN8dQvsjzyKqEfvyU5bAhUDPaic/j8yUXh4=; b=WHI6bHRFUhFtFWkGYwY3jUcdk+cDXf0mkjEL/TugGKgKltfHLuGlA5+l5Fhl57ooNg lImTFU5jyMX1qTXwq/+rJ6QiWCxU6eaeUyuFIWL3Pg94Uj7wvCrIOH9dryVRXH82irC/ CNZNDHZtPwokE0r9Xer62IHHkU0jqidaXO9IhI45hAl0AUHYsruIp2OcYfVoM71dhz5F PfM8fOFj36l3QOnvfb/8OvCv53DnRP/bGb6WAnjWwssek9Tm60HM250KG8mray+bBiXn yDzwteXVoMvhZHi79jS8hZa+YykJDzPMMQjzFGUGC9fAJ3GLT2zAatnM30C3o/uESOtc MqGw== X-Gm-Message-State: AFeK/H196ijvakfLvNepqLQVPbCSwnBiKtdTMuwPyw7FEKNOzsDi7LSRsuAlPJ/TE8ql+ago4DMBifEd6GsuTQ== X-Received: by 10.28.72.193 with SMTP id v184mr11175744wma.105.1489423525736; Mon, 13 Mar 2017 09:45:25 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.128.133 with HTTP; Mon, 13 Mar 2017 09:45:25 -0700 (PDT) In-Reply-To: <20170313154059.ibzxffsw46uz73lk@ivaldir.net> References: <201703110501.v2B51UJQ045535@repo.freebsd.org> <758cfa1c-0985-f392-aa74-228f257a676c@freebsd.org> <20170313154059.ibzxffsw46uz73lk@ivaldir.net> From: Adrian Chadd Date: Mon, 13 Mar 2017 09:45:25 -0700 Message-ID: Subject: Re: svn commit: r315051 - in head: . gnu/usr.bin gnu/usr.bin/diff usr.bin usr.bin/diff usr.bin/diff/tests To: Baptiste Daroussin Cc: Michal Meloun , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Mar 2017 16:45:27 -0000 size. think 32/64mb RAM, 8mb flash storage. -adrian On 13 March 2017 at 08:40, Baptiste Daroussin wrote: > On Mon, Mar 13, 2017 at 09:55:52AM +0100, Michal Meloun wrote: >> >> >> On 11.03.2017 6:01, Baptiste Daroussin wrote: >> > Author: bapt >> > Date: Sat Mar 11 05:01:29 2017 >> > New Revision: 315051 >> > URL: https://svnweb.freebsd.org/changeset/base/315051 >> > >> > Log: >> > Import diff from OpenBSD and remove GNU diff >> > >> > Some of the modifications from the previous summer of code has been integrated >> > Modification for compatibility with GNU diff output has been added >> > >> > Main difference with OpenBSD: >> > Implement multiple GNU diff options: >> > * --ignore-file-name-case >> > * --no-ignore-file-name-case >> > * --normal >> > * --tabsize >> > * --strip-trailing-cr >> > Make diff -p compatible with GNU diff >> > Implement diff -l >> > Make diff -r compatible with GNU diff >> > >> > Capsicumize diffing 2 regular files >> > Add a simple test suite >> > >> > Approved by: AsiaBSDcon devsummit >> > Obtained from: OpenBSD, GSoC >> > Relnotes: yes >> > >> >> It seems that this commit breaks mergemaster (but I'm not sure): >> >> ----- >> diff: unable to limit rights on: /etc/casper/system.dns: Function not >> implemented >> --- >> >> Michal > > Yes you were right I forgot a test against systems without capsicum, but that > makes me wonder why you do build your system without capsicum? > > Best regards, > Bapt From owner-svn-src-head@freebsd.org Mon Mar 13 17:05:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05914D0AB90; Mon, 13 Mar 2017 17:05:51 +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 mx1.freebsd.org (Postfix) with ESMTPS id C96001444; Mon, 13 Mar 2017 17:05:50 +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 v2DH5nEq050142; Mon, 13 Mar 2017 17:05:49 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2DH5nLH050141; Mon, 13 Mar 2017 17:05:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703131705.v2DH5nLH050141@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 13 Mar 2017 17:05:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315199 - head/sbin/dhclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Mar 2017 17:05:51 -0000 Author: ngie Date: Mon Mar 13 17:05:49 2017 New Revision: 315199 URL: https://svnweb.freebsd.org/changeset/base/315199 Log: sbin/dhclient: fix a memory leak in parse_client_lease_statement(..) The memory stored by `lease` would have previously been leaked if an unterminated lease declaration was found in an early-return code path. MFC after: 1 week Reported by: clang static analyzer, Coverity CID: 1007114 Submitted by: Tom Rix Sponsored by: Dell EMC Isilon; Juniper, Inc Differential Revision: D9992 Modified: head/sbin/dhclient/clparse.c Modified: head/sbin/dhclient/clparse.c ============================================================================== --- head/sbin/dhclient/clparse.c Mon Mar 13 16:44:06 2017 (r315198) +++ head/sbin/dhclient/clparse.c Mon Mar 13 17:05:49 2017 (r315199) @@ -512,6 +512,7 @@ parse_client_lease_statement(FILE *cfile token = peek_token(&val, cfile); if (token == EOF) { parse_warn("unterminated lease declaration."); + free_client_lease(lease); return; } if (token == RBRACE) From owner-svn-src-head@freebsd.org Mon Mar 13 17:15:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE5C4D0AEED; Mon, 13 Mar 2017 17:15: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 mx1.freebsd.org (Postfix) with ESMTPS id 9E0161D2A; Mon, 13 Mar 2017 17:15: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 v2DHFjZT054215; Mon, 13 Mar 2017 17:15:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2DHFja9054214; Mon, 13 Mar 2017 17:15:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703131715.v2DHFja9054214@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 13 Mar 2017 17:15:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315200 - head/sbin/dhclient/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Mar 2017 17:15:46 -0000 Author: ngie Date: Mon Mar 13 17:15:45 2017 New Revision: 315200 URL: https://svnweb.freebsd.org/changeset/base/315200 Log: Fix -Wunused-but-set-warning with `ret` While here, resolve Coverity warnings by demonstrating that vfprintf's return value is being explicitly ignored. MFC after: 1 week Reported by: gcc 6.3.0 Tested with: clang, gcc 4.2.1, gcc 6.3.0 Sponsored by: Dell EMC Isilon Modified: head/sbin/dhclient/tests/fake.c Modified: head/sbin/dhclient/tests/fake.c ============================================================================== --- head/sbin/dhclient/tests/fake.c Mon Mar 13 17:05:49 2017 (r315199) +++ head/sbin/dhclient/tests/fake.c Mon Mar 13 17:15:45 2017 (r315200) @@ -14,7 +14,7 @@ error(char *fmt, ...) va_list ap; va_start(ap, fmt); - vfprintf(stderr, fmt, ap); + (void)vfprintf(stderr, fmt, ap); va_end(ap); fprintf(stderr, "\n"); @@ -24,11 +24,10 @@ error(char *fmt, ...) int warning(char *fmt, ...) { - int ret; va_list ap; va_start(ap, fmt); - ret = vfprintf(stderr, fmt, ap); + (void)vfprintf(stderr, fmt, ap); va_end(ap); fprintf(stderr, "\n"); From owner-svn-src-head@freebsd.org Mon Mar 13 17:16:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A549D0AF58; Mon, 13 Mar 2017 17:16:30 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 678C31E81; Mon, 13 Mar 2017 17:16:30 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2DHGTO0054294; Mon, 13 Mar 2017 17:16:29 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2DHGTcS054293; Mon, 13 Mar 2017 17:16:29 GMT (envelope-from np@FreeBSD.org) Message-Id: <201703131716.v2DHGTcS054293@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 13 Mar 2017 17:16:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315201 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Mar 2017 17:16:30 -0000 Author: np Date: Mon Mar 13 17:16:29 2017 New Revision: 315201 URL: https://svnweb.freebsd.org/changeset/base/315201 Log: cxgbe(4): Fix an always-true assertion (reported by PVS-Studio). sys/dev/cxgbe/t4_main.c: PVS-Studio: Expression is Always True (CWE-571) (3) PR: 217746 Submitted by: Svyatoslav (razmyslov at viva64 com) MFC after: 1 week Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Mon Mar 13 17:15:45 2017 (r315200) +++ head/sys/dev/cxgbe/t4_main.c Mon Mar 13 17:16:29 2017 (r315201) @@ -7999,9 +7999,9 @@ sysctl_tp_timer(SYSCTL_HANDLER_ARGS) u_int cclk_ps = 1000000000 / sc->params.vpd.cclk; MPASS(reg == A_TP_RXT_MIN || reg == A_TP_RXT_MAX || - reg == A_TP_PERS_MIN || reg == A_TP_PERS_MAX || - reg == A_TP_KEEP_IDLE || A_TP_KEEP_INTVL || reg == A_TP_INIT_SRTT || - reg == A_TP_FINWAIT2_TIMER); + reg == A_TP_PERS_MIN || reg == A_TP_PERS_MAX || + reg == A_TP_KEEP_IDLE || reg == A_TP_KEEP_INTVL || + reg == A_TP_INIT_SRTT || reg == A_TP_FINWAIT2_TIMER); tre = G_TIMERRESOLUTION(t4_read_reg(sc, A_TP_TIMER_RESOLUTION)); tp_tick_us = (cclk_ps << tre) / 1000000; From owner-svn-src-head@freebsd.org Mon Mar 13 17:35:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B08A0D0A9AC; Mon, 13 Mar 2017 17:35:56 +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 mx1.freebsd.org (Postfix) with ESMTPS id 7185F11C0; Mon, 13 Mar 2017 17:35:56 +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 v2DHZtwF062413; Mon, 13 Mar 2017 17:35:55 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2DHZtCN062412; Mon, 13 Mar 2017 17:35:55 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703131735.v2DHZtCN062412@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 13 Mar 2017 17:35:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315202 - head/lib/libcam X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Mar 2017 17:35:56 -0000 Author: ngie Date: Mon Mar 13 17:35:55 2017 New Revision: 315202 URL: https://svnweb.freebsd.org/changeset/base/315202 Log: lib/libcam/cam_cdbparse.3: fix manpage warnings - Add comma before and after 'e.g.'; remove surrounding parentheses that were unnecessary after this change [1]. - Add .Mt when referencing ken and Peter Dufault's email addresses [2]. - Sprinkle around .An use where proper [2]. Bump .Dd for the change MFC after: 1 week Reported by: igor [1], manlint [2] Reviewed by: imp Sponsored by: Dell EMC Isilon Differential Revision: D9968 Modified: head/lib/libcam/cam_cdbparse.3 Modified: head/lib/libcam/cam_cdbparse.3 ============================================================================== --- head/lib/libcam/cam_cdbparse.3 Mon Mar 13 17:16:29 2017 (r315201) +++ head/lib/libcam/cam_cdbparse.3 Mon Mar 13 17:35:55 2017 (r315202) @@ -61,7 +61,7 @@ .\" SUCH DAMAGE. .\" .\" -.Dd October 13, 1998 +.Dd March 13, 2017 .Dt CAM_CDBPARSE 3 .Os .Sh NAME @@ -170,12 +170,11 @@ layer. These functions may be used in new applications, but users may find it easier to use the various SCSI CCB building functions included with the .Xr cam 3 -library. -(e.g.\& +library, e.g., \& .Fn cam_fill_csio , .Fn scsi_start_stop , and -.Fn scsi_read_write ) +.Fn scsi_read_write . .Pp .Fn csio_build builds up a @@ -522,17 +521,18 @@ implemented for the old layer. The encoding/decoding functions in the old .Tn SCSI -code were written by Peter Dufault. +code were written by +.An Peter Dufault Aq Mt dufault@hda.com . .Pp Many systems have comparable interfaces to permit a user to construct a SCSI command in user space. .Pp The old .Va scsireq -data structure was almost identical to the SGI /dev/scsi data -structure. -If anyone knows the name of the authors it should -go here; Peter Dufault first read about it in a 1989 Sun Expert magazine. +data structure was almost identical to the SGI /dev/scsi data structure. +If anyone knows the name of the authors it should go here; +Peter Dufault +first read about it in a 1989 Sun Expert magazine. .Pp The new CCB data structures are derived from the CAM-2 and CAM-3 specifications. @@ -545,11 +545,14 @@ led to the original .Fx .Tn SCSI library and the related kernel ioctl. -If anyone needs that for compatibility contact dufault@hda.com. +If anyone needs that for compatibility, contact +.Mt dufault@hda.com . .Sh AUTHORS -Kenneth Merry implemented the CAM versions of these encoding and decoding -functions. -This current work is based upon earlier work by Peter Dufault. +.An -nosplit +.An Kenneth Merry Aq Mt ken@FreeBSD.org +implemented the CAM versions of these encoding and decoding functions. +This current work is based upon earlier work by +.An Peter Dufault Aq Mt dufault@hda.com . .Sh BUGS There should probably be a function that encodes both the CDB and the data buffer portions of a From owner-svn-src-head@freebsd.org Mon Mar 13 17:45:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 83C7DD0A143; Mon, 13 Mar 2017 17:45:01 +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 mx1.freebsd.org (Postfix) with ESMTPS id 509191C2F; Mon, 13 Mar 2017 17:45:01 +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 v2DHj0F9067128; Mon, 13 Mar 2017 17:45:00 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2DHj0VX067127; Mon, 13 Mar 2017 17:45:00 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703131745.v2DHj0VX067127@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 13 Mar 2017 17:45:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315203 - head/sbin/dhclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Mar 2017 17:45:01 -0000 Author: ngie Date: Mon Mar 13 17:45:00 2017 New Revision: 315203 URL: https://svnweb.freebsd.org/changeset/base/315203 Log: sbin/dhclient: fix `vendor` storage leak in parse_option_decl(..) This ensures the storage isn't leaked when non-NULL and the function returns early, prior to the `free(vendor)` later on in the function. MFC after: 1 week Reported by: Coverity CID: 1007111-1007113 Reviewed by: cem Sponsored by: Dell EMC Isilon Differential Revision: D9993 Modified: head/sbin/dhclient/clparse.c Modified: head/sbin/dhclient/clparse.c ============================================================================== --- head/sbin/dhclient/clparse.c Mon Mar 13 17:35:55 2017 (r315202) +++ head/sbin/dhclient/clparse.c Mon Mar 13 17:45:00 2017 (r315203) @@ -714,6 +714,7 @@ parse_option_decl(FILE *cfile, struct op parse_warn("expecting identifier after '.'"); if (token != SEMI) skip_to_semi(cfile); + free(vendor); return (NULL); } @@ -726,6 +727,7 @@ parse_option_decl(FILE *cfile, struct op if (!universe) { parse_warn("no vendor named %s.", vendor); skip_to_semi(cfile); + free(vendor); return (NULL); } } else { @@ -747,6 +749,7 @@ parse_option_decl(FILE *cfile, struct op parse_warn("no option named %s for vendor %s", val, vendor); skip_to_semi(cfile); + free(vendor); return (NULL); } From owner-svn-src-head@freebsd.org Mon Mar 13 17:53:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6608DD0A603; Mon, 13 Mar 2017 17:53: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 mx1.freebsd.org (Postfix) with ESMTPS id 35C7B17B2; Mon, 13 Mar 2017 17:53: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 v2DHrk44071517; Mon, 13 Mar 2017 17:53:46 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2DHrkab071516; Mon, 13 Mar 2017 17:53:46 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201703131753.v2DHrkab071516@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Mon, 13 Mar 2017 17:53:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315204 - head/sys/netpfil/ipfw/nat64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Mar 2017 17:53:47 -0000 Author: cem Date: Mon Mar 13 17:53:46 2017 New Revision: 315204 URL: https://svnweb.freebsd.org/changeset/base/315204 Log: nat64lsn: Use memset() with structure, not pointer, size PR: 217738 Submitted by: Svyatoslav Sponsored by: Viva64 (PVS-Studio) Modified: head/sys/netpfil/ipfw/nat64/nat64lsn.c Modified: head/sys/netpfil/ipfw/nat64/nat64lsn.c ============================================================================== --- head/sys/netpfil/ipfw/nat64/nat64lsn.c Mon Mar 13 17:45:00 2017 (r315203) +++ head/sys/netpfil/ipfw/nat64/nat64lsn.c Mon Mar 13 17:53:46 2017 (r315204) @@ -215,7 +215,7 @@ nat64lsn_log(struct pfloghdr *plog, stru uint32_t n, uint32_t sn) { - memset(plog, 0, sizeof(plog)); + memset(plog, 0, sizeof(*plog)); plog->length = PFLOG_REAL_HDRLEN; plog->af = family; plog->action = PF_NAT; From owner-svn-src-head@freebsd.org Mon Mar 13 17:58:09 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 827E5D0A945; Mon, 13 Mar 2017 17:58:09 +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 mx1.freebsd.org (Postfix) with ESMTPS id 4FADC1CF6; Mon, 13 Mar 2017 17:58:09 +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 v2DHw8j8071841; Mon, 13 Mar 2017 17:58:08 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2DHw8NC071840; Mon, 13 Mar 2017 17:58:08 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201703131758.v2DHw8NC071840@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Mon, 13 Mar 2017 17:58:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315205 - head/sys/dev/isci/scil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Mar 2017 17:58:09 -0000 Author: cem Date: Mon Mar 13 17:58:08 2017 New Revision: 315205 URL: https://svnweb.freebsd.org/changeset/base/315205 Log: scif_sas_controller: Fix inverted logic range check PR: 217742 Submitted by: Svyatoslav Sponsored by: Viva64 (PVS-Studio) Modified: head/sys/dev/isci/scil/scif_sas_controller.c Modified: head/sys/dev/isci/scil/scif_sas_controller.c ============================================================================== --- head/sys/dev/isci/scil/scif_sas_controller.c Mon Mar 13 17:53:46 2017 (r315204) +++ head/sys/dev/isci/scil/scif_sas_controller.c Mon Mar 13 17:58:08 2017 (r315205) @@ -528,7 +528,7 @@ SCI_STATUS scif_user_parameters_set( if (scif_parms->sas.is_sata_ncq_enabled != 1 && scif_parms->sas.is_sata_ncq_enabled != 0) return SCI_FAILURE_INVALID_PARAMETER_VALUE; - if (scif_parms->sas.max_ncq_depth < 1 && scif_parms->sas.max_ncq_depth > 32) + if (scif_parms->sas.max_ncq_depth < 1 || scif_parms->sas.max_ncq_depth > 32) return SCI_FAILURE_INVALID_PARAMETER_VALUE; if (scif_parms->sas.is_sata_standby_timer_enabled != 1 From owner-svn-src-head@freebsd.org Mon Mar 13 18:01:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18051D0AA9D; Mon, 13 Mar 2017 18:01:03 +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 mx1.freebsd.org (Postfix) with ESMTPS id DBED310A8; Mon, 13 Mar 2017 18:01:02 +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 v2DI112q072032; Mon, 13 Mar 2017 18:01:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2DI11ue072031; Mon, 13 Mar 2017 18:01:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703131801.v2DI11ue072031@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 13 Mar 2017 18:01:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315206 - head/contrib/bsnmp/snmpd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Mar 2017 18:01:03 -0000 Author: ngie Date: Mon Mar 13 18:01:01 2017 New Revision: 315206 URL: https://svnweb.freebsd.org/changeset/base/315206 Log: bsnmpd: fix segfault when trans_insert_port(..) is called with multiple out of order addresses Move `port->transport` initialization before the TAILQ_FOREACH(..) loop to ensure that the value is properly initialized before it's inserted into the TAILQ. MFC after: 1 week PR: 217760 Submitted by: eugen Sponsored by: Dell EMC Isilon Modified: head/contrib/bsnmp/snmpd/main.c Modified: head/contrib/bsnmp/snmpd/main.c ============================================================================== --- head/contrib/bsnmp/snmpd/main.c Mon Mar 13 17:58:08 2017 (r315205) +++ head/contrib/bsnmp/snmpd/main.c Mon Mar 13 18:01:01 2017 (r315206) @@ -765,13 +765,13 @@ trans_insert_port(struct transport *t, s { struct tport *p; + port->transport = t; TAILQ_FOREACH(p, &t->table, link) { if (asn_compare_oid(&p->index, &port->index) > 0) { TAILQ_INSERT_BEFORE(p, port, link); return; } } - port->transport = t; TAILQ_INSERT_TAIL(&t->table, port, link); } From owner-svn-src-head@freebsd.org Mon Mar 13 18:05:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D706D0AC25; Mon, 13 Mar 2017 18:05: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 mx1.freebsd.org (Postfix) with ESMTPS id D3F1B1376; Mon, 13 Mar 2017 18:05:32 +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 v2DI5VsU075702; Mon, 13 Mar 2017 18:05:31 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2DI5V69075701; Mon, 13 Mar 2017 18:05:31 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201703131805.v2DI5V69075701@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Mon, 13 Mar 2017 18:05:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315207 - head/sys/netinet/libalias X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Mar 2017 18:05:33 -0000 Author: cem Date: Mon Mar 13 18:05:31 2017 New Revision: 315207 URL: https://svnweb.freebsd.org/changeset/base/315207 Log: alias_proxy.c: Fix accidental error quashing This was introduced on accident in r165243, when return sites were unified to add a lock around LibAliasProxyRule(). PR: 217749 Submitted by: Svyatoslav Sponsored by: Viva64 (PVS-Studio) Modified: head/sys/netinet/libalias/alias_proxy.c Modified: head/sys/netinet/libalias/alias_proxy.c ============================================================================== --- head/sys/netinet/libalias/alias_proxy.c Mon Mar 13 18:01:01 2017 (r315206) +++ head/sys/netinet/libalias/alias_proxy.c Mon Mar 13 18:05:31 2017 (r315207) @@ -720,7 +720,8 @@ LibAliasProxyRule(struct libalias *la, c err = RuleNumberDelete(la, rule_to_delete); if (err) ret = -1; - ret = 0; + else + ret = 0; goto getout; } From owner-svn-src-head@freebsd.org Mon Mar 13 18:43:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CDEA0D0A99F; Mon, 13 Mar 2017 18:43:01 +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 mx1.freebsd.org (Postfix) with ESMTPS id 954D41E1D; Mon, 13 Mar 2017 18:43:01 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2DIh01v091964; Mon, 13 Mar 2017 18:43:00 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2DIh0Pv091963; Mon, 13 Mar 2017 18:43:00 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201703131843.v2DIh0Pv091963@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 13 Mar 2017 18:43:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315208 - head/sys/cddl/dev/dtrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Mar 2017 18:43:01 -0000 Author: markj Date: Mon Mar 13 18:43:00 2017 New Revision: 315208 URL: https://svnweb.freebsd.org/changeset/base/315208 Log: Fix a backwards comparison in the code to dump a DTrace debug buffer. PR: 217739 MFC after: 1 week Modified: head/sys/cddl/dev/dtrace/dtrace_debug.c Modified: head/sys/cddl/dev/dtrace/dtrace_debug.c ============================================================================== --- head/sys/cddl/dev/dtrace/dtrace_debug.c Mon Mar 13 18:05:31 2017 (r315207) +++ head/sys/cddl/dev/dtrace/dtrace_debug.c Mon Mar 13 18:43:00 2017 (r315208) @@ -106,7 +106,7 @@ dtrace_debug_output(void) for (p = d->first; p < d->next; p++) *p1++ = *p; - } else if (d->next > d->first) { + } else if (d->first > d->next) { char *p1 = dtrace_debug_bufr; count = (uintptr_t) d->last - (uintptr_t) d->first; From owner-svn-src-head@freebsd.org Mon Mar 13 18:45:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 764CAD0AB13; Mon, 13 Mar 2017 18:45:26 +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 mx1.freebsd.org (Postfix) with ESMTPS id 3C6971025; Mon, 13 Mar 2017 18:45:26 +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 v2DIjPJE092193; Mon, 13 Mar 2017 18:45:25 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2DIjP7u092192; Mon, 13 Mar 2017 18:45:25 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201703131845.v2DIjP7u092192@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 13 Mar 2017 18:45:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315209 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Mar 2017 18:45:26 -0000 Author: markj Date: Mon Mar 13 18:45:25 2017 New Revision: 315209 URL: https://svnweb.freebsd.org/changeset/base/315209 Log: Update a comment to reflect reality. MFC after: 1 week Modified: head/sys/vm/uma.h Modified: head/sys/vm/uma.h ============================================================================== --- head/sys/vm/uma.h Mon Mar 13 18:43:00 2017 (r315208) +++ head/sys/vm/uma.h Mon Mar 13 18:45:25 2017 (r315209) @@ -242,7 +242,7 @@ uma_zone_t uma_zcache_create(char *name, * Definitions for uma_zcreate flags * * These flags share space with UMA_ZFLAGs in uma_int.h. Be careful not to - * overlap when adding new features. 0xf0000000 is in use by uma_int.h. + * overlap when adding new features. 0xff000000 is in use by uma_int.h. */ #define UMA_ZONE_PAGEABLE 0x0001 /* Return items not fully backed by physical memory XXX Not yet */ From owner-svn-src-head@freebsd.org Mon Mar 13 19:54:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E14CDD0A7D7; Mon, 13 Mar 2017 19:54:21 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B09791EAB; Mon, 13 Mar 2017 19:54:21 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2DJsKgj021475; Mon, 13 Mar 2017 19:54:20 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2DJsKb6021474; Mon, 13 Mar 2017 19:54:20 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201703131954.v2DJsKb6021474@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 13 Mar 2017 19:54:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315211 - head/share/man/man7 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Mar 2017 19:54:22 -0000 Author: bdrewery Date: Mon Mar 13 19:54:20 2017 New Revision: 315211 URL: https://svnweb.freebsd.org/changeset/base/315211 Log: hier(7): Fix entry location for /usr/share/vt. MFC after: 2 weeks Modified: head/share/man/man7/hier.7 Modified: head/share/man/man7/hier.7 ============================================================================== --- head/share/man/man7/hier.7 Mon Mar 13 19:12:18 2017 (r315210) +++ head/share/man/man7/hier.7 Mon Mar 13 19:54:20 2017 (r315211) @@ -28,7 +28,7 @@ .\" @(#)hier.7 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd March 8, 2017 +.Dd March 13, 2017 .Dt HIER 7 .Os .Sh NAME @@ -644,11 +644,6 @@ and .It Pa vi/ localization support and utilities for .Xr vi 1 -.It Pa zoneinfo/ -timezone configuration information; -see -.Xr tzfile 5 -.El .It Pa vt/ files used by vt; see @@ -669,6 +664,11 @@ and .\" .It Pa scrnmaps/ .\" console screen maps .El +.It Pa zoneinfo/ +timezone configuration information; +see +.Xr tzfile 5 +.El .It Pa src/ .Bx , third-party, and/or local source files From owner-svn-src-head@freebsd.org Mon Mar 13 20:14:08 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE09DD0A116; Mon, 13 Mar 2017 20:14:08 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ADB4D1DB4; Mon, 13 Mar 2017 20:14:08 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2DKE7Oh029777; Mon, 13 Mar 2017 20:14:07 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2DKE76m029776; Mon, 13 Mar 2017 20:14:07 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201703132014.v2DKE76m029776@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 13 Mar 2017 20:14:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315212 - head/usr.bin/mkimg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Mar 2017 20:14:09 -0000 Author: pfg Date: Mon Mar 13 20:14:07 2017 New Revision: 315212 URL: https://svnweb.freebsd.org/changeset/base/315212 Log: mkimg(1): let calloc(3) do the multiplication. Reviewed by: marcel MFC after: 1 week Modified: head/usr.bin/mkimg/qcow.c Modified: head/usr.bin/mkimg/qcow.c ============================================================================== --- head/usr.bin/mkimg/qcow.c Mon Mar 13 19:54:20 2017 (r315211) +++ head/usr.bin/mkimg/qcow.c Mon Mar 13 20:14:07 2017 (r315212) @@ -216,7 +216,7 @@ qcow_write(int fd, u_int version) ofs = clstrsz * l2clno; nclstrs = 1 + clstr_l1tblsz + clstr_rctblsz; - l1tbl = calloc(1, clstrsz * clstr_l1tblsz); + l1tbl = calloc(clstr_l1tblsz, clstrsz); if (l1tbl == NULL) { error = ENOMEM; goto out; @@ -247,7 +247,7 @@ qcow_write(int fd, u_int version) } while (n < clstr_rcblks); if (rcclno > 0) { - rctbl = calloc(1, clstrsz * clstr_rctblsz); + rctbl = calloc(clstr_rctblsz, clstrsz); if (rctbl == NULL) { error = ENOMEM; goto out; @@ -297,7 +297,7 @@ qcow_write(int fd, u_int version) l1tbl = NULL; if (rcclno > 0) { - rcblk = calloc(1, clstrsz * clstr_rcblks); + rcblk = calloc(clstr_rcblks, clstrsz); if (rcblk == NULL) { error = ENOMEM; goto out; From owner-svn-src-head@freebsd.org Mon Mar 13 20:34:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 147FAD0A5FE; Mon, 13 Mar 2017 20:34:55 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E092B16E1; Mon, 13 Mar 2017 20:34:54 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2DKYrpT037515; Mon, 13 Mar 2017 20:34:53 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2DKYru2037511; Mon, 13 Mar 2017 20:34:53 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201703132034.v2DKYru2037511@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 13 Mar 2017 20:34:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315213 - head/usr.sbin/nscd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Mar 2017 20:34:55 -0000 Author: pfg Date: Mon Mar 13 20:34:53 2017 New Revision: 315213 URL: https://svnweb.freebsd.org/changeset/base/315213 Log: nscd(8): let calloc(3) do the multiplying. MFC after: 1 week Modified: head/usr.sbin/nscd/cachelib.c head/usr.sbin/nscd/config.c head/usr.sbin/nscd/hashtable.h head/usr.sbin/nscd/nscd.c Modified: head/usr.sbin/nscd/cachelib.c ============================================================================== --- head/usr.sbin/nscd/cachelib.c Mon Mar 13 20:14:07 2017 (r315212) +++ head/usr.sbin/nscd/cachelib.c Mon Mar 13 20:34:53 2017 (r315213) @@ -487,8 +487,8 @@ init_cache(struct cache_params const *pa assert(params != NULL); memcpy(&retval->params, params, sizeof(struct cache_params)); - retval->entries = calloc(1, - sizeof(*retval->entries) * INITIAL_ENTRIES_CAPACITY); + retval->entries = calloc(INITIAL_ENTRIES_CAPACITY, + sizeof(*retval->entries)); assert(retval->entries != NULL); retval->entries_capacity = INITIAL_ENTRIES_CAPACITY; @@ -540,8 +540,8 @@ register_cache_entry(struct cache_ *the_ new_capacity = the_cache->entries_capacity + ENTRIES_CAPACITY_STEP; - new_entries = calloc(1, - sizeof(*new_entries) * new_capacity); + new_entries = calloc(new_capacity, + sizeof(*new_entries)); assert(new_entries != NULL); memcpy(new_entries, the_cache->entries, @@ -582,8 +582,8 @@ register_cache_entry(struct cache_ *the_ else policies_size = 2; - new_common_entry->policies = calloc(1, - sizeof(*new_common_entry->policies) * policies_size); + new_common_entry->policies = calloc(policies_size, + sizeof(*new_common_entry->policies)); assert(new_common_entry->policies != NULL); new_common_entry->policies_size = policies_size; Modified: head/usr.sbin/nscd/config.c ============================================================================== --- head/usr.sbin/nscd/config.c Mon Mar 13 20:14:07 2017 (r315212) +++ head/usr.sbin/nscd/config.c Mon Mar 13 20:34:53 2017 (r315213) @@ -274,9 +274,8 @@ add_configuration_entry(struct configura struct configuration_entry **new_entries; config->entries_capacity *= 2; - new_entries = calloc(1, - sizeof(*new_entries) * - config->entries_capacity); + new_entries = calloc(config->entries_capacity, + sizeof(*new_entries)); assert(new_entries != NULL); memcpy(new_entries, config->entries, sizeof(struct configuration_entry *) * @@ -522,9 +521,8 @@ init_configuration(void) assert(retval != NULL); retval->entries_capacity = INITIAL_ENTRIES_CAPACITY; - retval->entries = calloc(1, - sizeof(*retval->entries) * - retval->entries_capacity); + retval->entries = calloc(retval->entries_capacity, + sizeof(*retval->entries)); assert(retval->entries != NULL); pthread_rwlock_init(&retval->rwlock, NULL); Modified: head/usr.sbin/nscd/hashtable.h ============================================================================== --- head/usr.sbin/nscd/hashtable.h Mon Mar 13 20:14:07 2017 (r315212) +++ head/usr.sbin/nscd/hashtable.h Mon Mar 13 20:34:53 2017 (r315213) @@ -75,8 +75,8 @@ typedef unsigned int hashtable_index_t; #define HASHTABLE_INIT(table, type, field, _entries_size) \ do { \ hashtable_index_t var; \ - (table)->entries = calloc(1, \ - sizeof(*(table)->entries) * (_entries_size)); \ + (table)->entries = calloc(_entries_size, \ + sizeof(*(table)->entries)); \ (table)->entries_size = (_entries_size); \ for (var = 0; var < HASHTABLE_ENTRIES_COUNT(table); ++var) {\ (table)->entries[var].field.capacity = \ Modified: head/usr.sbin/nscd/nscd.c ============================================================================== --- head/usr.sbin/nscd/nscd.c Mon Mar 13 20:14:07 2017 (r315212) +++ head/usr.sbin/nscd/nscd.c Mon Mar 13 20:34:53 2017 (r315213) @@ -828,8 +828,8 @@ main(int argc, char *argv[]) } if (s_configuration->threads_num > 1) { - threads = calloc(1, sizeof(*threads) * - s_configuration->threads_num); + threads = calloc(s_configuration->threads_num, + sizeof(*threads)); for (i = 0; i < s_configuration->threads_num; ++i) { thread_args = malloc( sizeof(*thread_args)); From owner-svn-src-head@freebsd.org Mon Mar 13 20:49:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9C52D0A85F; Mon, 13 Mar 2017 20:49:32 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 76EE01D31; Mon, 13 Mar 2017 20:49:32 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2DKnVxo042065; Mon, 13 Mar 2017 20:49:31 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2DKnVvm042064; Mon, 13 Mar 2017 20:49:31 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201703132049.v2DKnVvm042064@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 13 Mar 2017 20:49:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315214 - head/usr.sbin/mpsutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Mar 2017 20:49:32 -0000 Author: pfg Date: Mon Mar 13 20:49:31 2017 New Revision: 315214 URL: https://svnweb.freebsd.org/changeset/base/315214 Log: mpsutil(8): let calloc(3) do the multiplying. Modified: head/usr.sbin/mpsutil/mps_cmd.c Modified: head/usr.sbin/mpsutil/mps_cmd.c ============================================================================== --- head/usr.sbin/mpsutil/mps_cmd.c Mon Mar 13 20:34:53 2017 (r315213) +++ head/usr.sbin/mpsutil/mps_cmd.c Mon Mar 13 20:49:31 2017 (r315214) @@ -486,7 +486,7 @@ mps_firmware_get(int fd, unsigned char * } size = reply.ActualImageSize; - *firmware = calloc(1, sizeof(unsigned char) * size); + *firmware = calloc(size, sizeof(unsigned char)); if (*firmware == NULL) { warn("calloc"); return (-1); From owner-svn-src-head@freebsd.org Mon Mar 13 20:51:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66FBCD0AB2C; Mon, 13 Mar 2017 20:51:01 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3467810E2; Mon, 13 Mar 2017 20:51:01 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2DKp0G9043062; Mon, 13 Mar 2017 20:51:00 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2DKp0lf043061; Mon, 13 Mar 2017 20:51:00 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201703132051.v2DKp0lf043061@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 13 Mar 2017 20:51:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315215 - head/usr.sbin/ypbind X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Mar 2017 20:51:01 -0000 Author: pfg Date: Mon Mar 13 20:51:00 2017 New Revision: 315215 URL: https://svnweb.freebsd.org/changeset/base/315215 Log: ypbind(8): let calloc(3) do the multiplying. Modified: head/usr.sbin/ypbind/yp_ping.c Modified: head/usr.sbin/ypbind/yp_ping.c ============================================================================== --- head/usr.sbin/ypbind/yp_ping.c Mon Mar 13 20:49:31 2017 (r315214) +++ head/usr.sbin/ypbind/yp_ping.c Mon Mar 13 20:51:00 2017 (r315215) @@ -226,7 +226,7 @@ __yp_ping(struct in_addr *restricted_add int validsrvs = 0; /* Set up handles. */ - reqs = calloc(1, sizeof(struct ping_req *) * cnt); + reqs = calloc(cnt, sizeof(struct ping_req *)); xid_seed = time(NULL) ^ getpid(); for (i = 0; i < cnt; i++) { From owner-svn-src-head@freebsd.org Mon Mar 13 20:55:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E78ED0ABD5; Mon, 13 Mar 2017 20:55:39 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qt0-x22a.google.com (mail-qt0-x22a.google.com [IPv6:2607:f8b0:400d:c0d::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 35D3D15A8; Mon, 13 Mar 2017 20:55:39 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-qt0-x22a.google.com with SMTP id n21so41931565qta.1; Mon, 13 Mar 2017 13:55:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=getT5rmN9lS7gwAdJhhZQFB+/sHm6bU3Y+TWcfbD9Ng=; b=U9k2TKVBLappCkBLb5Lng3eSXsIdjyMxGcBvpD+f7/ikDEGCyQA6PW+RqQOKV3KCjS rfbW+BMivdqXqi6C+iprhPt7PLP1FRc/GQP0o1ooksB9clfBqHWeWo1Bm008RbGQmWb6 LRCTV9EgF4aR5JeZ6Vug/OgEDB+73W5QVeXUllghikEUOMg3XuVcV+0kYOe+jjKvqcb+ E9C0hPcHbGkBA25GIj4obOOHWr0z4ihAerOXUTfPNCo2Q/tGDr+iN06/egXJEoMNDMBS DqvJSSF92mSc+v17FJXK0PSByKga4umlR5Ugo9x5gQky4toU1a+HQVtgKBTV6/2qGTpu T+og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=getT5rmN9lS7gwAdJhhZQFB+/sHm6bU3Y+TWcfbD9Ng=; b=SXtaSKgzWbISJq4KTUzYE5fyZv/i/wGAGj14Z67zo3Il964pMJ6dc/K8lz0lCzZw5m F4AsmSVhzfKx4HupghzVDWoAj2I/xlvn0Vfok87qlf6X4KKs8djrbweUnx+lAvTAZ4e9 yl83YWe4fiF6mIDvSWDV02ZN9RB1hsmX0xDtEA5vYBaf3pYJ0EHbMRIZj2zHQOC042oE ffNgRP3Ty8IvCsEU7D4ssqyXThNXHKZnp7BrsqLW77CxEsXzmEOWmxjN5MvZRXzC8Udo mXSdewziDrQVF4qPWuB9e26lg+Dk1kAKG/XLVmfcs7WwMGpZ7ANn9iSdksl5lxCz+F2w vcYg== X-Gm-Message-State: AMke39mz8YX9MMcQ29xSR4p4P++ddgCpBsSxhtutSi1CGRsqHpzYTQQRdLtZQhnvdDwvnKjAJjJ8cSr1qcrHiw== X-Received: by 10.237.33.240 with SMTP id m45mr36392620qtc.246.1489438538152; Mon, 13 Mar 2017 13:55:38 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.104.200 with HTTP; Mon, 13 Mar 2017 13:55:37 -0700 (PDT) In-Reply-To: <201703132049.v2DKnVvm042064@repo.freebsd.org> References: <201703132049.v2DKnVvm042064@repo.freebsd.org> From: Ngie Cooper Date: Mon, 13 Mar 2017 13:55:37 -0700 Message-ID: Subject: Re: svn commit: r315214 - head/usr.sbin/mpsutil To: "Pedro F. Giffuni" Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Mar 2017 20:55:39 -0000 On Mon, Mar 13, 2017 at 1:49 PM, Pedro F. Giffuni wrote: > Author: pfg > Date: Mon Mar 13 20:49:31 2017 > New Revision: 315214 > URL: https://svnweb.freebsd.org/changeset/base/315214 > > Log: > mpsutil(8): let calloc(3) do the multiplying. Should this change and the next one (ypbind) be MFCed? Thanks! -Ngie From owner-svn-src-head@freebsd.org Mon Mar 13 21:20:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE436D0A933 for ; Mon, 13 Mar 2017 21:20:19 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm2-vm5.bullet.mail.ne1.yahoo.com (nm2-vm5.bullet.mail.ne1.yahoo.com [98.138.91.224]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 993191324 for ; Mon, 13 Mar 2017 21:20:19 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1489440012; bh=l63FPBqGMlaVHeg/LTHY4ad0wc5TWfCluEJOsyzapXo=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From:Subject; b=cuJOjD0BdNTVXNRodTtmL0uHMrVpAcxPXEdTqp7Rgi5m2beK01+fKIDJOC3g1GiO0orj1Dh9n39ovMwi2MDW0ljeAQWuB3t3k20WeI5pDFm0bzR7ikkhBbUz5TelHlohyUPAuBQIz2OF3vQ6TMIsZexqcViIp88A+8LSTiM/uLIrVRM9LmOTsrERX9uiDccXSZLufOZYxkS077Li0fOo+9iMZZFNW1lSH+i1K7J2v/CwSCJYCNFHgH1a7T/JWr0LbAG6W16J0zCpG/1pCMER2oLRcYd+N6fu7uz8Qeq3XHtBBCecWNIsGsAd82y3fFrlt8NXxSp2BSh1su0L+XaApg== Received: from [98.138.101.128] by nm2.bullet.mail.ne1.yahoo.com with NNFMP; 13 Mar 2017 21:20:12 -0000 Received: from [98.138.226.61] by tm16.bullet.mail.ne1.yahoo.com with NNFMP; 13 Mar 2017 21:20:12 -0000 Received: from [127.0.0.1] by smtp212.mail.ne1.yahoo.com with NNFMP; 13 Mar 2017 21:20:12 -0000 X-Yahoo-Newman-Id: 826596.98204.bm@smtp212.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: zKE1SoYVM1lbTEl6c7LCxxNoRNVhUSwUwHZu8HPN6MtbnaK NaQd9vqLnCjfY0.wmXediqRQl7Rk8pYZ9GxLOlmhQfZih602NrdMHo5iEIYH 2FRv5XMT_W01asc6JhFu4KZdjB66rjm5_JkrmEqpToR3muyfhteO7FvR8Vdp .J3urtVVkaBUOzT6I4qsJLpMZC9azQiByhD09pgUq5h0x6HBYuqRQXcq.K7F qnqWVypykPVYHjyLLcBS2SeKKbxCUVvzJmRR4abdTxkNV.43armHJF9L88_y L7lyh9YG5TdZsM9iEWCouVjsd5J60VFAy1ieLJMkJ2nAu6srM0PLTrlUt0l4 dwfIOsDDFRgIOeNMr6ze24grl82.Ev8yZD4FmX.0b0uxXT5u9DPJljfD5TZ1 43Ru7Mz0B2.UFXpQoTfIzX9fjMC3ZmeHMsHXdzHmzhkNacJntZBExIYCjJR3 v74sWcdP1xHip3qbh1SqbfQTlU5BuB9Q7cTFz7Tr8gexAPTRIVl9liSZCNY5 DlPQaokNPgzsR.8NN9IJKCeN8QDocJsItGTiIim.ZDLJ0 X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r315214 - head/usr.sbin/mpsutil To: Ngie Cooper References: <201703132049.v2DKnVvm042064@repo.freebsd.org> Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Pedro Giffuni Message-ID: Date: Mon, 13 Mar 2017 16:23:20 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Mar 2017 21:20:19 -0000 On 3/13/2017 3:55 PM, Ngie Cooper wrote: > On Mon, Mar 13, 2017 at 1:49 PM, Pedro F. Giffuni wrote: >> Author: pfg >> Date: Mon Mar 13 20:49:31 2017 >> New Revision: 315214 >> URL: https://svnweb.freebsd.org/changeset/base/315214 >> >> Log: >> mpsutil(8): let calloc(3) do the multiplying. > Should this change and the next one (ypbind) be MFCed? They are really minor and they hit my lazyness threshold. I don't think I want to be reminded, at least not for now :-P. Pedro. From owner-svn-src-head@freebsd.org Mon Mar 13 22:53:08 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59363D0A417; Mon, 13 Mar 2017 22:53:08 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 219691AF3; Mon, 13 Mar 2017 22:53:08 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2DMr7dJ094180; Mon, 13 Mar 2017 22:53:07 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2DMr7Qq094175; Mon, 13 Mar 2017 22:53:07 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201703132253.v2DMr7Qq094175@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Mon, 13 Mar 2017 22:53:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315217 - in head/sys: dev/bnxt dev/e1000 net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 13 Mar 2017 22:53:08 -0000 Author: sbruno Date: Mon Mar 13 22:53:06 2017 New Revision: 315217 URL: https://svnweb.freebsd.org/changeset/base/315217 Log: IFLIB updates - unconditionally enable BUS_DMA on non-x86 architectures - speed up rxd zeroing via customized function - support out of order updates to rxd's - add prefetching to hardware descriptor rings - only prefetch on 10G or faster hardware - add seperate tx queue intr function - preliminary rework of NETMAP interfaces, WIP Submitted by: Matt Macy Sponsored by: Limelight Networks Modified: head/sys/dev/bnxt/bnxt_txrx.c head/sys/dev/bnxt/if_bnxt.c head/sys/dev/e1000/em_txrx.c head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_em.h head/sys/dev/e1000/igb_txrx.c head/sys/net/ifdi_if.m head/sys/net/iflib.c head/sys/net/iflib.h Modified: head/sys/dev/bnxt/bnxt_txrx.c ============================================================================== --- head/sys/dev/bnxt/bnxt_txrx.c Mon Mar 13 22:45:51 2017 (r315216) +++ head/sys/dev/bnxt/bnxt_txrx.c Mon Mar 13 22:53:06 2017 (r315217) @@ -48,17 +48,19 @@ __FBSDID("$FreeBSD$"); */ static int bnxt_isc_txd_encap(void *sc, if_pkt_info_t pi); -static void bnxt_isc_txd_flush(void *sc, uint16_t txqid, uint32_t pidx); -static int bnxt_isc_txd_credits_update(void *sc, uint16_t txqid, uint32_t cidx, - bool clear); +static void bnxt_isc_txd_flush(void *sc, uint16_t txqid, qidx_t pidx); +static int bnxt_isc_txd_credits_update(void *sc, uint16_t txqid, bool clear); -static void bnxt_isc_rxd_refill(void *sc, uint16_t rxqid, uint8_t flid, +static void bnxt_isc_rxd_refill(void *sc, if_rxd_update_t iru); + +/* uint16_t rxqid, uint8_t flid, uint32_t pidx, uint64_t *paddrs, caddr_t *vaddrs, uint16_t count, uint16_t buf_size); +*/ static void bnxt_isc_rxd_flush(void *sc, uint16_t rxqid, uint8_t flid, - uint32_t pidx); -static int bnxt_isc_rxd_available(void *sc, uint16_t rxqid, uint32_t idx, - int budget); + qidx_t pidx); +static int bnxt_isc_rxd_available(void *sc, uint16_t rxqid, qidx_t idx, + qidx_t budget); static int bnxt_isc_rxd_pkt_get(void *sc, if_rxd_info_t ri); static int bnxt_intr(void *sc); @@ -172,7 +174,7 @@ bnxt_isc_txd_encap(void *sc, if_pkt_info } static void -bnxt_isc_txd_flush(void *sc, uint16_t txqid, uint32_t pidx) +bnxt_isc_txd_flush(void *sc, uint16_t txqid, qidx_t pidx) { struct bnxt_softc *softc = (struct bnxt_softc *)sc; struct bnxt_ring *tx_ring = &softc->tx_rings[txqid]; @@ -185,7 +187,7 @@ bnxt_isc_txd_flush(void *sc, uint16_t tx } static int -bnxt_isc_txd_credits_update(void *sc, uint16_t txqid, uint32_t idx, bool clear) +bnxt_isc_txd_credits_update(void *sc, uint16_t txqid, bool clear) { struct bnxt_softc *softc = (struct bnxt_softc *)sc; struct bnxt_cp_ring *cpr = &softc->tx_cp_rings[txqid]; @@ -249,15 +251,27 @@ done: } static void -bnxt_isc_rxd_refill(void *sc, uint16_t rxqid, uint8_t flid, - uint32_t pidx, uint64_t *paddrs, - caddr_t *vaddrs, uint16_t count, uint16_t len) +bnxt_isc_rxd_refill(void *sc, if_rxd_update_t iru) { struct bnxt_softc *softc = (struct bnxt_softc *)sc; struct bnxt_ring *rx_ring; struct rx_prod_pkt_bd *rxbd; uint16_t type; uint16_t i; + uint16_t rxqid; + uint16_t count, len; + uint32_t pidx; + uint8_t flid; + uint64_t *paddrs; + caddr_t *vaddrs; + + rxqid = iru->iru_qsidx; + count = iru->iru_count; + len = iru->iru_buf_size; + pidx = iru->iru_pidx; + flid = iru->iru_flidx; + vaddrs = iru->iru_vaddrs; + paddrs = iru->iru_paddrs; if (flid == 0) { rx_ring = &softc->rx_rings[rxqid]; @@ -284,7 +298,7 @@ bnxt_isc_rxd_refill(void *sc, uint16_t r static void bnxt_isc_rxd_flush(void *sc, uint16_t rxqid, uint8_t flid, - uint32_t pidx) + qidx_t pidx) { struct bnxt_softc *softc = (struct bnxt_softc *)sc; struct bnxt_ring *rx_ring; @@ -310,7 +324,7 @@ bnxt_isc_rxd_flush(void *sc, uint16_t rx } static int -bnxt_isc_rxd_available(void *sc, uint16_t rxqid, uint32_t idx, int budget) +bnxt_isc_rxd_available(void *sc, uint16_t rxqid, qidx_t idx, qidx_t budget) { struct bnxt_softc *softc = (struct bnxt_softc *)sc; struct bnxt_cp_ring *cpr = &softc->rx_cp_rings[rxqid]; @@ -412,37 +426,6 @@ cmpl_invalid: return avail; } -static void -bnxt_set_rsstype(if_rxd_info_t ri, uint8_t rss_hash_type) -{ - uint8_t rss_profile_id; - - rss_profile_id = BNXT_GET_RSS_PROFILE_ID(rss_hash_type); - switch (rss_profile_id) { - case BNXT_RSS_HASH_TYPE_TCPV4: - ri->iri_rsstype = M_HASHTYPE_RSS_TCP_IPV4; - break; - case BNXT_RSS_HASH_TYPE_UDPV4: - ri->iri_rsstype = M_HASHTYPE_RSS_UDP_IPV4; - break; - case BNXT_RSS_HASH_TYPE_IPV4: - ri->iri_rsstype = M_HASHTYPE_RSS_IPV4; - break; - case BNXT_RSS_HASH_TYPE_TCPV6: - ri->iri_rsstype = M_HASHTYPE_RSS_TCP_IPV6; - break; - case BNXT_RSS_HASH_TYPE_UDPV6: - ri->iri_rsstype = M_HASHTYPE_RSS_UDP_IPV6; - break; - case BNXT_RSS_HASH_TYPE_IPV6: - ri->iri_rsstype = M_HASHTYPE_RSS_IPV6; - break; - default: - ri->iri_rsstype = M_HASHTYPE_OPAQUE; - break; - } -} - static int bnxt_pkt_get_l2(struct bnxt_softc *softc, if_rxd_info_t ri, struct bnxt_cp_ring *cpr, uint16_t flags_type) @@ -460,7 +443,13 @@ bnxt_pkt_get_l2(struct bnxt_softc *softc /* Extract from the first 16-byte BD */ if (flags_type & RX_PKT_CMPL_FLAGS_RSS_VALID) { ri->iri_flowid = le32toh(rcp->rss_hash); - bnxt_set_rsstype(ri, rcp->rss_hash_type); + /* + * TODO: Extract something useful from rcp->rss_hash_type + * (undocumented) + * May be documented in the "LSI ES" + * also check the firmware code. + */ + ri->iri_rsstype = M_HASHTYPE_OPAQUE; } else { ri->iri_rsstype = M_HASHTYPE_NONE; @@ -540,7 +529,13 @@ bnxt_pkt_get_tpa(struct bnxt_softc *soft /* Extract from the first 16-byte BD */ if (le16toh(tpas->low.flags_type) & RX_TPA_START_CMPL_FLAGS_RSS_VALID) { ri->iri_flowid = le32toh(tpas->low.rss_hash); - bnxt_set_rsstype(ri, tpas->low.rss_hash_type); + /* + * TODO: Extract something useful from tpas->low.rss_hash_type + * (undocumented) + * May be documented in the "LSI ES" + * also check the firmware code. + */ + ri->iri_rsstype = M_HASHTYPE_OPAQUE; } else { ri->iri_rsstype = M_HASHTYPE_NONE; Modified: head/sys/dev/bnxt/if_bnxt.c ============================================================================== --- head/sys/dev/bnxt/if_bnxt.c Mon Mar 13 22:45:51 2017 (r315216) +++ head/sys/dev/bnxt/if_bnxt.c Mon Mar 13 22:53:06 2017 (r315217) @@ -253,7 +253,8 @@ static device_method_t bnxt_iflib_method DEVMETHOD(ifdi_update_admin_status, bnxt_update_admin_status), DEVMETHOD(ifdi_intr_enable, bnxt_intr_enable), - DEVMETHOD(ifdi_queue_intr_enable, bnxt_queue_intr_enable), + DEVMETHOD(ifdi_tx_queue_intr_enable, bnxt_queue_intr_enable), + DEVMETHOD(ifdi_rx_queue_intr_enable, bnxt_queue_intr_enable), DEVMETHOD(ifdi_intr_disable, bnxt_disable_intr), DEVMETHOD(ifdi_msix_intr_assign, bnxt_msix_intr_assign), @@ -711,6 +712,8 @@ bnxt_attach_pre(if_ctx_t ctx) scctx->isc_tx_tso_size_max = BNXT_TSO_SIZE; scctx->isc_tx_tso_segsize_max = BNXT_TSO_SIZE; scctx->isc_vectors = softc->func.max_cp_rings; + scctx->isc_txrx = &bnxt_txrx; + if (scctx->isc_nrxd[0] < ((scctx->isc_nrxd[1] * 4) + scctx->isc_nrxd[2])) device_printf(softc->dev, @@ -1479,7 +1482,7 @@ bnxt_msix_intr_assign(if_ctx_t ctx, int for (i=0; iscctx->isc_nrxqsets; i++) { rc = iflib_irq_alloc_generic(ctx, &softc->rx_cp_rings[i].irq, - softc->rx_cp_rings[i].ring.id + 1, IFLIB_INTR_RX, + softc->rx_cp_rings[i].ring.id + 1, IFLIB_INTR_RXTX, bnxt_handle_rx_cp, &softc->rx_cp_rings[i], i, "rx_cp"); if (rc) { device_printf(iflib_get_dev(ctx), Modified: head/sys/dev/e1000/em_txrx.c ============================================================================== --- head/sys/dev/e1000/em_txrx.c Mon Mar 13 22:45:51 2017 (r315216) +++ head/sys/dev/e1000/em_txrx.c Mon Mar 13 22:53:06 2017 (r315217) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2016 Matt Macy + * Copyright (c) 2016-2017 Matt Macy * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,7 +27,7 @@ /* $FreeBSD$ */ #include "if_em.h" -#ifdef RSS +#ifdef RSS #include #include #endif @@ -41,23 +41,24 @@ /********************************************************************* * Local Function prototypes *********************************************************************/ -static int em_tso_setup(struct adapter *adapter, if_pkt_info_t pi, u32 *txd_upper, u32 *txd_lower); -static int em_transmit_checksum_setup(struct adapter *adapter, if_pkt_info_t pi, u32 *txd_upper, u32 *txd_lower); +static int em_tso_setup(struct adapter *adapter, if_pkt_info_t pi, u32 *txd_upper, + u32 *txd_lower); +static int em_transmit_checksum_setup(struct adapter *adapter, if_pkt_info_t pi, + u32 *txd_upper, u32 *txd_lower); static int em_isc_txd_encap(void *arg, if_pkt_info_t pi); -static void em_isc_txd_flush(void *arg, uint16_t txqid, uint32_t pidx); -static int em_isc_txd_credits_update(void *arg, uint16_t txqid, uint32_t cidx_init, bool clear); -static void em_isc_rxd_refill(void *arg, uint16_t rxqid, uint8_t flid __unused, - uint32_t pidx, uint64_t *paddrs, caddr_t *vaddrs __unused, uint16_t count, uint16_t buflen __unused); -static void em_isc_rxd_flush(void *arg, uint16_t rxqid, uint8_t flid __unused, uint32_t pidx); -static int em_isc_rxd_available(void *arg, uint16_t rxqid, uint32_t idx, - int budget); +static void em_isc_txd_flush(void *arg, uint16_t txqid, qidx_t pidx); +static int em_isc_txd_credits_update(void *arg, uint16_t txqid, bool clear); +static void em_isc_rxd_refill(void *arg, if_rxd_update_t iru); +static void em_isc_rxd_flush(void *arg, uint16_t rxqid, uint8_t flid __unused, + qidx_t pidx); +static int em_isc_rxd_available(void *arg, uint16_t rxqid, qidx_t idx, + qidx_t budget); static int em_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri); -static void lem_isc_rxd_refill(void *arg, uint16_t rxqid, uint8_t flid __unused, - uint32_t pidx, uint64_t *paddrs, caddr_t *vaddrs __unused, uint16_t count, uint16_t buflen __unused); +static void lem_isc_rxd_refill(void *arg, if_rxd_update_t iru); -static int lem_isc_rxd_available(void *arg, uint16_t rxqid, uint32_t idx, - int budget); +static int lem_isc_rxd_available(void *arg, uint16_t rxqid, qidx_t idx, + qidx_t budget); static int lem_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri); static void lem_receive_checksum(int status, int errors, if_rxd_info_t ri); @@ -65,7 +66,7 @@ static void em_receive_checksum(uint32_t static int em_determine_rsstype(u32 pkt_info); extern int em_intr(void *arg); -struct if_txrx em_txrx = { +struct if_txrx em_txrx = { em_isc_txd_encap, em_isc_txd_flush, em_isc_txd_credits_update, @@ -76,7 +77,7 @@ struct if_txrx em_txrx = { em_intr }; -struct if_txrx lem_txrx = { +struct if_txrx lem_txrx = { em_isc_txd_encap, em_isc_txd_flush, em_isc_txd_credits_update, @@ -87,7 +88,42 @@ struct if_txrx lem_txrx = { em_intr }; -extern if_shared_ctx_t em_sctx; +extern if_shared_ctx_t em_sctx; + +void +em_dump_rs(struct adapter *adapter) +{ + if_softc_ctx_t scctx = adapter->shared; + struct em_tx_queue *que; + struct tx_ring *txr; + qidx_t i, ntxd, qid, cur; + int16_t rs_cidx; + uint8_t status; + + printf("\n"); + ntxd = scctx->isc_ntxd[0]; + for (qid = 0; qid < adapter->tx_num_queues; qid++) { + que = &adapter->tx_queues[qid]; + txr = &que->txr; + rs_cidx = txr->tx_rs_cidx; + if (rs_cidx != txr->tx_rs_pidx) { + cur = txr->tx_rsq[rs_cidx]; + status = txr->tx_base[cur].upper.fields.status; + if (!(status & E1000_TXD_STAT_DD)) + printf("qid[%d]->tx_rsq[%d]: %d clear ", qid, rs_cidx, cur); + } else { + rs_cidx = (rs_cidx-1)&(ntxd-1); + cur = txr->tx_rsq[rs_cidx]; + printf("qid[%d]->tx_rsq[rs_cidx-1=%d]: %d ", qid, rs_cidx, cur); + } + printf("cidx_prev=%d rs_pidx=%d ",txr->tx_cidx_processed, txr->tx_rs_pidx); + for (i = 0; i < ntxd; i++) { + if (txr->tx_base[i].upper.fields.status & E1000_TXD_STAT_DD) + printf("%d set ", i); + } + printf("\n"); + } +} /********************************************************************** * @@ -99,14 +135,13 @@ static int em_tso_setup(struct adapter *adapter, if_pkt_info_t pi, u32 *txd_upper, u32 *txd_lower) { if_softc_ctx_t scctx = adapter->shared; - struct em_tx_queue *que = &adapter->tx_queues[pi->ipi_qsidx]; - struct tx_ring *txr = &que->txr; + struct em_tx_queue *que = &adapter->tx_queues[pi->ipi_qsidx]; + struct tx_ring *txr = &que->txr; struct e1000_context_desc *TXD; - struct em_txbuffer *tx_buffer; - int cur, hdr_len; + int cur, hdr_len; hdr_len = pi->ipi_ehdrlen + pi->ipi_ip_hlen + pi->ipi_tcp_hlen; - *txd_lower = (E1000_TXD_CMD_DEXT | /* Extended descr type */ + *txd_lower = (E1000_TXD_CMD_DEXT | /* Extended descr type */ E1000_TXD_DTYP_D | /* Data descr type */ E1000_TXD_CMD_TSE); /* Do TSE on this packet */ @@ -114,10 +149,9 @@ em_tso_setup(struct adapter *adapter, if *txd_upper = (E1000_TXD_POPTS_IXSM | E1000_TXD_POPTS_TXSM) << 8; cur = pi->ipi_pidx; - TXD = (struct e1000_context_desc *)&txr->tx_base[cur]; - tx_buffer = &txr->tx_buffers[cur]; - - /* + TXD = (struct e1000_context_desc *)&txr->tx_base[cur]; + + /* * Start offset for header checksum calculation. * End offset for header checksum calculation. * Offset of place put the checksum. @@ -127,7 +161,7 @@ em_tso_setup(struct adapter *adapter, if htole16(pi->ipi_ehdrlen + pi->ipi_ip_hlen - 1); TXD->lower_setup.ip_fields.ipcso = pi->ipi_ehdrlen + offsetof(struct ip, ip_sum); - /* + /* * Start offset for payload checksum calculation. * End offset for payload checksum calculation. * Offset of place to put the checksum. @@ -136,8 +170,8 @@ em_tso_setup(struct adapter *adapter, if TXD->upper_setup.tcp_fields.tucse = 0; TXD->upper_setup.tcp_fields.tucso = pi->ipi_ehdrlen + pi->ipi_ip_hlen + offsetof(struct tcphdr, th_sum); - - /* + + /* * Payload size per packet w/o any headers. * Length of all headers up to payload. */ @@ -150,7 +184,6 @@ em_tso_setup(struct adapter *adapter, if E1000_TXD_CMD_IP | /* Do IP csum */ E1000_TXD_CMD_TCP | /* Do TCP checksum */ (pi->ipi_len - hdr_len)); /* Total len */ - tx_buffer->eop = -1; txr->tx_tso = TRUE; if (++cur == scctx->isc_ntxd[0]) { @@ -178,21 +211,20 @@ em_tso_setup(struct adapter *adapter, if * until the previous request completes. This means setting up * a new context effectively disables pipelined Tx data DMA which * in turn greatly slow down performance to send small sized - * frames. + * frames. **********************************************************************/ static int em_transmit_checksum_setup(struct adapter *adapter, if_pkt_info_t pi, u32 *txd_upper, u32 *txd_lower) { - struct e1000_context_desc *TXD = NULL; - if_softc_ctx_t scctx = adapter->shared; - struct em_tx_queue *que = &adapter->tx_queues[pi->ipi_qsidx]; - struct tx_ring *txr = &que->txr; - struct em_txbuffer *tx_buffer; - int csum_flags = pi->ipi_csum_flags; - int cur, hdr_len; - u32 cmd; - + struct e1000_context_desc *TXD = NULL; + if_softc_ctx_t scctx = adapter->shared; + struct em_tx_queue *que = &adapter->tx_queues[pi->ipi_qsidx]; + struct tx_ring *txr = &que->txr; + int csum_flags = pi->ipi_csum_flags; + int cur, hdr_len; + u32 cmd; + cur = pi->ipi_pidx; hdr_len = pi->ipi_ehdrlen + pi->ipi_ip_hlen; cmd = adapter->txd_cmd; @@ -220,7 +252,7 @@ em_transmit_checksum_setup(struct adapte TXD = (struct e1000_context_desc *)&txr->tx_base[cur]; if (csum_flags & CSUM_IP) { - *txd_upper |= E1000_TXD_POPTS_IXSM << 8; + *txd_upper |= E1000_TXD_POPTS_IXSM << 8; /* * Start offset for header checksum calculation. * End offset for header checksum calculation. @@ -235,7 +267,7 @@ em_transmit_checksum_setup(struct adapte if (csum_flags & (CSUM_TCP|CSUM_UDP)) { uint8_t tucso; - *txd_upper |= E1000_TXD_POPTS_TXSM << 8; + *txd_upper |= E1000_TXD_POPTS_TXSM << 8; *txd_lower = E1000_TXD_CMD_DEXT | E1000_TXD_DTYP_D; if (csum_flags & CSUM_TCP) { @@ -243,9 +275,9 @@ em_transmit_checksum_setup(struct adapte cmd |= E1000_TXD_CMD_TCP; } else tucso = hdr_len + offsetof(struct udphdr, uh_sum); - TXD->upper_setup.tcp_fields.tucss = hdr_len; - TXD->upper_setup.tcp_fields.tucse = htole16(0); - TXD->upper_setup.tcp_fields.tucso = tucso; + TXD->upper_setup.tcp_fields.tucss = hdr_len; + TXD->upper_setup.tcp_fields.tucse = htole16(0); + TXD->upper_setup.tcp_fields.tucso = tucso; } txr->csum_lhlen = pi->ipi_ehdrlen; @@ -258,9 +290,6 @@ em_transmit_checksum_setup(struct adapte TXD->cmd_and_length = htole32(E1000_TXD_CMD_IFCS | E1000_TXD_CMD_DEXT | cmd); - tx_buffer = &txr->tx_buffers[cur]; - tx_buffer->eop = -1; - if (++cur == scctx->isc_ntxd[0]) { cur = 0; } @@ -272,24 +301,26 @@ em_transmit_checksum_setup(struct adapte static int em_isc_txd_encap(void *arg, if_pkt_info_t pi) { - struct adapter *sc = arg; - if_softc_ctx_t scctx = sc->shared; - struct em_tx_queue *que = &sc->tx_queues[pi->ipi_qsidx]; - struct tx_ring *txr = &que->txr; - bus_dma_segment_t *segs = pi->ipi_segs; - int nsegs = pi->ipi_nsegs; - int csum_flags = pi->ipi_csum_flags; - int i, j, first, pidx_last; - u32 txd_upper = 0, txd_lower = 0; - - struct em_txbuffer *tx_buffer; + struct adapter *sc = arg; + if_softc_ctx_t scctx = sc->shared; + struct em_tx_queue *que = &sc->tx_queues[pi->ipi_qsidx]; + struct tx_ring *txr = &que->txr; + bus_dma_segment_t *segs = pi->ipi_segs; + int nsegs = pi->ipi_nsegs; + int csum_flags = pi->ipi_csum_flags; + int i, j, first, pidx_last; + u32 txd_flags, txd_upper = 0, txd_lower = 0; + struct e1000_tx_desc *ctxd = NULL; - bool do_tso, tso_desc; - - i = first = pi->ipi_pidx; + bool do_tso, tso_desc; + qidx_t ntxd; + + txd_flags = pi->ipi_flags & IPI_TX_INTR ? E1000_TXD_CMD_RS : 0; + i = first = pi->ipi_pidx; do_tso = (csum_flags & CSUM_TSO); tso_desc = FALSE; - /* + ntxd = scctx->isc_ntxd[0]; + /* * TSO Hardware workaround, if this packet is not * TSO, and is only a single descriptor long, and * it follows a TSO burst, then we need to add a @@ -310,10 +341,10 @@ em_isc_txd_encap(void *arg, if_pkt_info_ } if (pi->ipi_mflags & M_VLANTAG) { - /* Set the vlan id. */ + /* Set the vlan id. */ txd_upper |= htole16(pi->ipi_vtag) << 16; - /* Tell hardware to add tag */ - txd_lower |= htole32(E1000_TXD_CMD_VLE); + /* Tell hardware to add tag */ + txd_lower |= htole32(E1000_TXD_CMD_VLE); } DPRINTF(iflib_get_dev(sc->ctx), "encap: set up tx: nsegs=%d first=%d i=%d\n", nsegs, first, i); @@ -326,28 +357,26 @@ em_isc_txd_encap(void *arg, if_pkt_info_ uint32_t cmd; ctxd = &txr->tx_base[i]; - tx_buffer = &txr->tx_buffers[i]; seg_addr = segs[j].ds_addr; seg_len = segs[j].ds_len; cmd = E1000_TXD_CMD_IFCS | sc->txd_cmd; /* - ** TSO Workaround: - ** If this is the last descriptor, we want to - ** split it so we have a small final sentinel - */ + * TSO Workaround: + * If this is the last descriptor, we want to + * split it so we have a small final sentinel + */ if (tso_desc && (j == (nsegs - 1)) && (seg_len > 8)) { seg_len -= TSO_WORKAROUND; ctxd->buffer_addr = htole64(seg_addr); ctxd->lower.data = htole32(cmd | txd_lower | seg_len); ctxd->upper.data = htole32(txd_upper); - if (++i == scctx->isc_ntxd[0]) + if (++i == scctx->isc_ntxd[0]) i = 0; /* Now make the sentinel */ ctxd = &txr->tx_base[i]; - tx_buffer = &txr->tx_buffers[i]; ctxd->buffer_addr = htole64(seg_addr + seg_len); ctxd->lower.data = htole32(cmd | txd_lower | TSO_WORKAROUND); ctxd->upper.data = htole32(txd_upper); @@ -364,27 +393,28 @@ em_isc_txd_encap(void *arg, if_pkt_info_ i = 0; DPRINTF(iflib_get_dev(sc->ctx), "pidx_last=%d i=%d ntxd[0]=%d\n", pidx_last, i, scctx->isc_ntxd[0]); } - tx_buffer->eop = -1; } /* - * Last Descriptor of Packet + * Last Descriptor of Packet * needs End Of Packet (EOP) * and Report Status (RS) - */ - ctxd->lower.data |= - htole32(E1000_TXD_CMD_EOP | E1000_TXD_CMD_RS); - - tx_buffer = &txr->tx_buffers[first]; - tx_buffer->eop = pidx_last; + */ + if (txd_flags) { + txr->tx_rsq[txr->tx_rs_pidx] = pidx_last; + DPRINTF(iflib_get_dev(sc->ctx), "setting to RS on %d rs_pidx %d first: %d\n", pidx_last, txr->tx_rs_pidx, first); + txr->tx_rs_pidx = (txr->tx_rs_pidx+1) & (ntxd-1); + MPASS(txr->tx_rs_pidx != txr->tx_rs_cidx); + } + ctxd->lower.data |= htole32(E1000_TXD_CMD_EOP | txd_flags); DPRINTF(iflib_get_dev(sc->ctx), "tx_buffers[%d]->eop = %d ipi_new_pidx=%d\n", first, pidx_last, i); pi->ipi_new_pidx = i; - return (0); + return (0); } static void -em_isc_txd_flush(void *arg, uint16_t txqid, uint32_t pidx) +em_isc_txd_flush(void *arg, uint16_t txqid, qidx_t pidx) { struct adapter *adapter = arg; struct em_tx_queue *que = &adapter->tx_queues[txqid]; @@ -394,86 +424,72 @@ em_isc_txd_flush(void *arg, uint16_t txq } static int -em_isc_txd_credits_update(void *arg, uint16_t txqid, uint32_t cidx_init, bool clear) +em_isc_txd_credits_update(void *arg, uint16_t txqid, bool clear) { struct adapter *adapter = arg; if_softc_ctx_t scctx = adapter->shared; struct em_tx_queue *que = &adapter->tx_queues[txqid]; struct tx_ring *txr = &que->txr; - u32 cidx, processed = 0; - int last, done; - struct em_txbuffer *buf; - struct e1000_tx_desc *tx_desc, *eop_desc; - - cidx = cidx_init; - buf = &txr->tx_buffers[cidx]; - tx_desc = &txr->tx_base[cidx]; - last = buf->eop; - if (last == -1) - return (processed); - eop_desc = &txr->tx_base[last]; - - DPRINTF(iflib_get_dev(adapter->ctx), - "credits_update: cidx_init=%d clear=%d last=%d\n", - cidx_init, clear, last); - /* - * What this does is get the index of the - * first descriptor AFTER the EOP of the - * first packet, that way we can do the - * simple comparison on the inner while loop. - */ - if (++last == scctx->isc_ntxd[0]) - last = 0; - done = last; - - - while (eop_desc->upper.fields.status & E1000_TXD_STAT_DD) { - /* We clean the range of the packet */ - while (cidx != done) { - if (clear) { - tx_desc->upper.data = 0; - tx_desc->lower.data = 0; - tx_desc->buffer_addr = 0; - buf->eop = -1; - } - tx_desc++; - buf++; - processed++; - - /* wrap the ring ? */ - if (++cidx == scctx->isc_ntxd[0]) { - cidx = 0; - } - buf = &txr->tx_buffers[cidx]; - tx_desc = &txr->tx_base[cidx]; - } - /* See if we can continue to the next packet */ - last = buf->eop; - if (last == -1) + qidx_t processed = 0; + int updated; + qidx_t cur, prev, ntxd, rs_cidx; + int32_t delta; + uint8_t status; + + rs_cidx = txr->tx_rs_cidx; + if (rs_cidx == txr->tx_rs_pidx) + return (0); + cur = txr->tx_rsq[rs_cidx]; + MPASS(cur != QIDX_INVALID); + status = txr->tx_base[cur].upper.fields.status; + updated = !!(status & E1000_TXD_STAT_DD); + + if (clear == false || updated == 0) + return (updated); + + prev = txr->tx_cidx_processed; + ntxd = scctx->isc_ntxd[0]; + do { + delta = (int32_t)cur - (int32_t)prev; + MPASS(prev == 0 || delta != 0); + if (delta < 0) + delta += ntxd; + DPRINTF(iflib_get_dev(adapter->ctx), + "%s: cidx_processed=%u cur=%u clear=%d delta=%d\n", + __FUNCTION__, prev, cur, clear, delta); + + processed += delta; + prev = cur; + rs_cidx = (rs_cidx + 1) & (ntxd-1); + if (rs_cidx == txr->tx_rs_pidx) break; - eop_desc = &txr->tx_base[last]; - /* Get new done point */ - if (++last == scctx->isc_ntxd[0]) - last = 0; - done = last; - } + cur = txr->tx_rsq[rs_cidx]; + MPASS(cur != QIDX_INVALID); + status = txr->tx_base[cur].upper.fields.status; + } while ((status & E1000_TXD_STAT_DD)); - DPRINTF(iflib_get_dev(adapter->ctx), "Processed %d credits update\n", processed); + txr->tx_rs_cidx = rs_cidx; + txr->tx_cidx_processed = prev; return(processed); } static void -lem_isc_rxd_refill(void *arg, uint16_t rxqid, uint8_t flid __unused, - uint32_t pidx, uint64_t *paddrs, caddr_t *vaddrs __unused, uint16_t count, uint16_t buflen __unused) +lem_isc_rxd_refill(void *arg, if_rxd_update_t iru) { struct adapter *sc = arg; if_softc_ctx_t scctx = sc->shared; - struct em_rx_queue *que = &sc->rx_queues[rxqid]; + struct em_rx_queue *que = &sc->rx_queues[iru->iru_qsidx]; struct rx_ring *rxr = &que->rxr; struct e1000_rx_desc *rxd; + uint64_t *paddrs; + uint32_t next_pidx, pidx; + uint16_t count; int i; - uint32_t next_pidx; + + paddrs = iru->iru_paddrs; + pidx = iru->iru_pidx; + count = iru->iru_count; for (i = 0, next_pidx = pidx; i < count; i++) { rxd = (struct e1000_rx_desc *)&rxr->rx_base[next_pidx]; @@ -487,48 +503,60 @@ lem_isc_rxd_refill(void *arg, uint16_t r } static void -em_isc_rxd_refill(void *arg, uint16_t rxqid, uint8_t flid __unused, - uint32_t pidx, uint64_t *paddrs, caddr_t *vaddrs __unused, uint16_t count, uint16_t buflen __unused) +em_isc_rxd_refill(void *arg, if_rxd_update_t iru) { struct adapter *sc = arg; if_softc_ctx_t scctx = sc->shared; + uint16_t rxqid = iru->iru_qsidx; struct em_rx_queue *que = &sc->rx_queues[rxqid]; struct rx_ring *rxr = &que->rxr; union e1000_rx_desc_extended *rxd; + uint64_t *paddrs; + uint32_t next_pidx, pidx; + uint16_t count; int i; - uint32_t next_pidx; + + paddrs = iru->iru_paddrs; + pidx = iru->iru_pidx; + count = iru->iru_count; for (i = 0, next_pidx = pidx; i < count; i++) { rxd = &rxr->rx_base[next_pidx]; rxd->read.buffer_addr = htole64(paddrs[i]); /* DD bits must be cleared */ - rxd->wb.upper.status_error = 0; - + rxd->wb.upper.status_error = 0; + if (++next_pidx == scctx->isc_nrxd[0]) next_pidx = 0; } } static void -em_isc_rxd_flush(void *arg, uint16_t rxqid, uint8_t flid __unused, uint32_t pidx) +em_isc_rxd_flush(void *arg, uint16_t rxqid, uint8_t flid __unused, qidx_t pidx) { - struct adapter *sc = arg; - struct em_rx_queue *que = &sc->rx_queues[rxqid]; - struct rx_ring *rxr = &que->rxr; + struct adapter *sc = arg; + struct em_rx_queue *que = &sc->rx_queues[rxqid]; + struct rx_ring *rxr = &que->rxr; - E1000_WRITE_REG(&sc->hw, E1000_RDT(rxr->me), pidx); + E1000_WRITE_REG(&sc->hw, E1000_RDT(rxr->me), pidx); } static int -lem_isc_rxd_available(void *arg, uint16_t rxqid, uint32_t idx, int budget) +lem_isc_rxd_available(void *arg, uint16_t rxqid, qidx_t idx, qidx_t budget) { - struct adapter *sc = arg; + struct adapter *sc = arg; if_softc_ctx_t scctx = sc->shared; - struct em_rx_queue *que = &sc->rx_queues[rxqid]; - struct rx_ring *rxr = &que->rxr; + struct em_rx_queue *que = &sc->rx_queues[rxqid]; + struct rx_ring *rxr = &que->rxr; struct e1000_rx_desc *rxd; - u32 staterr = 0; - int cnt, i; + u32 staterr = 0; + int cnt, i; + + if (budget == 1) { + rxd = (struct e1000_rx_desc *)&rxr->rx_base[idx]; + staterr = rxd->status; + return (staterr & E1000_RXD_STAT_DD); + } for (cnt = 0, i = idx; cnt < scctx->isc_nrxd[0] && cnt <= budget;) { rxd = (struct e1000_rx_desc *)&rxr->rx_base[i]; @@ -547,15 +575,21 @@ lem_isc_rxd_available(void *arg, uint16_ } static int -em_isc_rxd_available(void *arg, uint16_t rxqid, uint32_t idx, int budget) +em_isc_rxd_available(void *arg, uint16_t rxqid, qidx_t idx, qidx_t budget) { - struct adapter *sc = arg; + struct adapter *sc = arg; if_softc_ctx_t scctx = sc->shared; - struct em_rx_queue *que = &sc->rx_queues[rxqid]; - struct rx_ring *rxr = &que->rxr; + struct em_rx_queue *que = &sc->rx_queues[rxqid]; + struct rx_ring *rxr = &que->rxr; union e1000_rx_desc_extended *rxd; - u32 staterr = 0; - int cnt, i; + u32 staterr = 0; + int cnt, i; + + if (budget == 1) { + rxd = &rxr->rx_base[idx]; + staterr = le32toh(rxd->wb.upper.status_error); + return (staterr & E1000_RXD_STAT_DD); + } for (cnt = 0, i = idx; cnt < scctx->isc_nrxd[0] && cnt <= budget;) { rxd = &rxr->rx_base[i]; @@ -578,15 +612,15 @@ em_isc_rxd_available(void *arg, uint16_t static int lem_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) { - struct adapter *adapter = arg; - if_softc_ctx_t scctx = adapter->shared; - struct em_rx_queue *que = &adapter->rx_queues[ri->iri_qsidx]; - struct rx_ring *rxr = &que->rxr; + struct adapter *adapter = arg; + if_softc_ctx_t scctx = adapter->shared; + struct em_rx_queue *que = &adapter->rx_queues[ri->iri_qsidx]; + struct rx_ring *rxr = &que->rxr; struct e1000_rx_desc *rxd; - u16 len; - u32 status, errors; - bool eop; - int i, cidx; + u16 len; + u32 status, errors; + bool eop; + int i, cidx; status = errors = i = 0; cidx = ri->iri_cidx; @@ -639,31 +673,31 @@ lem_isc_rxd_pkt_get(void *arg, if_rxd_in static int em_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) { - struct adapter *adapter = arg; - if_softc_ctx_t scctx = adapter->shared; - struct em_rx_queue *que = &adapter->rx_queues[ri->iri_qsidx]; - struct rx_ring *rxr = &que->rxr; + struct adapter *adapter = arg; + if_softc_ctx_t scctx = adapter->shared; + struct em_rx_queue *que = &adapter->rx_queues[ri->iri_qsidx]; + struct rx_ring *rxr = &que->rxr; union e1000_rx_desc_extended *rxd; - u16 len; - u32 pkt_info; - u32 staterr = 0; - bool eop; - int i, cidx, vtag; + u16 len; + u32 pkt_info; + u32 staterr = 0; + bool eop; + int i, cidx, vtag; i = vtag = 0; cidx = ri->iri_cidx; do { rxd = &rxr->rx_base[cidx]; - staterr = le32toh(rxd->wb.upper.status_error); + staterr = le32toh(rxd->wb.upper.status_error); pkt_info = le32toh(rxd->wb.lower.mrq); - + /* Error Checking then decrement count */ MPASS ((staterr & E1000_RXD_STAT_DD) != 0); len = le16toh(rxd->wb.upper.length); - ri->iri_len += len; + ri->iri_len += len; eop = (staterr & E1000_RXD_STAT_EOP) != 0; @@ -690,15 +724,14 @@ em_isc_rxd_pkt_get(void *arg, if_rxd_inf if (staterr & E1000_RXD_STAT_VP) { vtag = le16toh(rxd->wb.upper.vlan); - } - + } + ri->iri_vtag = vtag; if (vtag) ri->iri_flags |= M_VLANTAG; - - ri->iri_flowid = - le32toh(rxd->wb.lower.hi_dword.rss); - ri->iri_rsstype = em_determine_rsstype(pkt_info); + + ri->iri_flowid = le32toh(rxd->wb.lower.hi_dword.rss); + ri->iri_rsstype = em_determine_rsstype(pkt_info); ri->iri_nfrags = i; return (0); @@ -736,23 +769,24 @@ lem_receive_checksum(int status, int err static int em_determine_rsstype(u32 pkt_info) { - switch (pkt_info & E1000_RXDADV_RSSTYPE_MASK) { - case E1000_RXDADV_RSSTYPE_IPV4_TCP: - return M_HASHTYPE_RSS_TCP_IPV4; - case E1000_RXDADV_RSSTYPE_IPV4: - return M_HASHTYPE_RSS_IPV4; - case E1000_RXDADV_RSSTYPE_IPV6_TCP: - return M_HASHTYPE_RSS_TCP_IPV6; - case E1000_RXDADV_RSSTYPE_IPV6_EX: - return M_HASHTYPE_RSS_IPV6_EX; - case E1000_RXDADV_RSSTYPE_IPV6: - return M_HASHTYPE_RSS_IPV6; - case E1000_RXDADV_RSSTYPE_IPV6_TCP_EX: - return M_HASHTYPE_RSS_TCP_IPV6_EX; - default: - return M_HASHTYPE_OPAQUE; - } + switch (pkt_info & E1000_RXDADV_RSSTYPE_MASK) { + case E1000_RXDADV_RSSTYPE_IPV4_TCP: + return M_HASHTYPE_RSS_TCP_IPV4; + case E1000_RXDADV_RSSTYPE_IPV4: + return M_HASHTYPE_RSS_IPV4; + case E1000_RXDADV_RSSTYPE_IPV6_TCP: + return M_HASHTYPE_RSS_TCP_IPV6; + case E1000_RXDADV_RSSTYPE_IPV6_EX: + return M_HASHTYPE_RSS_IPV6_EX; + case E1000_RXDADV_RSSTYPE_IPV6: + return M_HASHTYPE_RSS_IPV6; + case E1000_RXDADV_RSSTYPE_IPV6_TCP_EX: + return M_HASHTYPE_RSS_TCP_IPV6_EX; + default: + return M_HASHTYPE_OPAQUE; + } } + static void em_receive_checksum(uint32_t status, if_rxd_info_t ri) { @@ -764,7 +798,7 @@ em_receive_checksum(uint32_t status, if_ /* If the IP checksum exists and there is no IP Checksum error */ if ((status & (E1000_RXD_STAT_IPCS | E1000_RXDEXT_STATERR_IPE)) == - E1000_RXD_STAT_IPCS) { + E1000_RXD_STAT_IPCS) { ri->iri_csum_flags = (CSUM_IP_CHECKED | CSUM_IP_VALID); } Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Mon Mar 13 22:45:51 2017 (r315216) +++ head/sys/dev/e1000/if_em.c Mon Mar 13 22:53:06 2017 (r315217) @@ -50,113 +50,113 @@ char em_driver_version[] = "7.6.1-k"; static pci_vendor_info_t em_vendor_info_array[] = { /* Intel(R) PRO/1000 Network Connection - Legacy em*/ - PVID(0x8086, E1000_DEV_ID_82540EM, "Intel(R) PRO/1000 Network Connection"), - PVID(0x8086, E1000_DEV_ID_82540EM_LOM, "Intel(R) PRO/1000 Network Connection"), - PVID(0x8086, E1000_DEV_ID_82540EP, "Intel(R) PRO/1000 Network Connection"), - PVID(0x8086, E1000_DEV_ID_82540EP_LOM, "Intel(R) PRO/1000 Network Connection"), - PVID(0x8086, E1000_DEV_ID_82540EP_LP, "Intel(R) PRO/1000 Network Connection"), - - PVID(0x8086, E1000_DEV_ID_82541EI, "Intel(R) PRO/1000 Network Connection"), - PVID(0x8086, E1000_DEV_ID_82541ER, "Intel(R) PRO/1000 Network Connection"), - PVID(0x8086, E1000_DEV_ID_82541ER_LOM, "Intel(R) PRO/1000 Network Connection"), - PVID(0x8086, E1000_DEV_ID_82541EI_MOBILE, "Intel(R) PRO/1000 Network Connection"), - PVID(0x8086, E1000_DEV_ID_82541GI, "Intel(R) PRO/1000 Network Connection"), - PVID(0x8086, E1000_DEV_ID_82541GI_LF, "Intel(R) PRO/1000 Network Connection"), - PVID(0x8086, E1000_DEV_ID_82541GI_MOBILE, "Intel(R) PRO/1000 Network Connection"), - - PVID(0x8086, E1000_DEV_ID_82542, "Intel(R) PRO/1000 Network Connection"), - - PVID(0x8086, E1000_DEV_ID_82543GC_FIBER, "Intel(R) PRO/1000 Network Connection"), - PVID(0x8086, E1000_DEV_ID_82543GC_COPPER, "Intel(R) PRO/1000 Network Connection"), - - PVID(0x8086, E1000_DEV_ID_82544EI_COPPER, "Intel(R) PRO/1000 Network Connection"), - PVID(0x8086, E1000_DEV_ID_82544EI_FIBER, "Intel(R) PRO/1000 Network Connection"), - PVID(0x8086, E1000_DEV_ID_82544GC_COPPER, "Intel(R) PRO/1000 Network Connection"), - PVID(0x8086, E1000_DEV_ID_82544GC_LOM, "Intel(R) PRO/1000 Network Connection"), - - PVID(0x8086, E1000_DEV_ID_82545EM_COPPER, "Intel(R) PRO/1000 Network Connection"), - PVID(0x8086, E1000_DEV_ID_82545EM_FIBER, "Intel(R) PRO/1000 Network Connection"), - PVID(0x8086, E1000_DEV_ID_82545GM_COPPER, "Intel(R) PRO/1000 Network Connection"), - PVID(0x8086, E1000_DEV_ID_82545GM_FIBER, "Intel(R) PRO/1000 Network Connection"), - PVID(0x8086, E1000_DEV_ID_82545GM_SERDES, "Intel(R) PRO/1000 Network Connection"), - - PVID(0x8086, E1000_DEV_ID_82546EB_COPPER, "Intel(R) PRO/1000 Network Connection"), - PVID(0x8086, E1000_DEV_ID_82546EB_FIBER, "Intel(R) PRO/1000 Network Connection"), - PVID(0x8086, E1000_DEV_ID_82546EB_QUAD_COPPER, "Intel(R) PRO/1000 Network Connection"), - PVID(0x8086, E1000_DEV_ID_82546GB_COPPER, "Intel(R) PRO/1000 Network Connection"), - PVID(0x8086, E1000_DEV_ID_82546GB_FIBER, "Intel(R) PRO/1000 Network Connection"), - PVID(0x8086, E1000_DEV_ID_82546GB_SERDES, "Intel(R) PRO/1000 Network Connection"), - PVID(0x8086, E1000_DEV_ID_82546GB_PCIE, "Intel(R) PRO/1000 Network Connection"), - PVID(0x8086, E1000_DEV_ID_82546GB_QUAD_COPPER, "Intel(R) PRO/1000 Network Connection"), - PVID(0x8086, E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3, "Intel(R) PRO/1000 Network Connection"), - - PVID(0x8086, E1000_DEV_ID_82547EI, "Intel(R) PRO/1000 Network Connection"), *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Tue Mar 14 00:41:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A6CCD09493; Tue, 14 Mar 2017 00:41:56 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from mr11p00im-asmtp002.me.com (mr11p00im-asmtp002.me.com [17.110.69.253]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA1AD15CB; Tue, 14 Mar 2017 00:41:55 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from process-dkim-sign-daemon.mr11p00im-asmtp002.me.com by mr11p00im-asmtp002.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) id <0OMS00K0049R2800@mr11p00im-asmtp002.me.com>; Tue, 14 Mar 2017 00:41:49 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mac.com; s=4d515a; t=1489452109; bh=MfmcmhoHiX6nBVl2fAx02HVn9NR6nyRBRKRBbWlE8Rg=; h=Date:Subject:From:To:Message-id:MIME-version:Content-type; b=CsS8GRCNZiW+g3lEJ9pnC/gXKImITD86i4FqF9EXQCJPe3iDOz4TDMDffw5UOZPY+ wjvK8psUDfC22ioCvje1XnNv6DGebx9dOlQv+3UrsetLlmP84MNbz673TxwsccbAzM h1xqSKSRr3o8vQEE65WKoeSg2in3wyaXXLJBPS6qpXdjxYNEZAA+KsGhR74XAN6TXL 9BnQRFZGZ69TuBZJb2WcbB30U8xHbB8hPdg40dGvV5Zfy7kTVqNrSPTdXz+BNalMMQ oyOTTZaEESHuJEbPKEYI48Mfln3N27NUiwp7WSf2ggW0wqmM+AxdeqOpfmfhEQ9IUw rOEL5Miea5HEQ== Received: from icloud.com ([127.0.0.1]) by mr11p00im-asmtp002.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) with ESMTPSA id <0OMS00DKF4LLV610@mr11p00im-asmtp002.me.com>; Tue, 14 Mar 2017 00:41:46 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-03-13_18:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1034 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1701120000 definitions=main-1703140005 User-Agent: Microsoft-MacOutlook/f.1f.0.170216 Date: Mon, 13 Mar 2017 17:41:43 -0700 Subject: Re: svn commit: r315155 - in head/sys: kern sys From: Ravi Pokala Sender: "Pokala, Ravi" To: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-id: <9F3E9E31-579D-460E-B1CA-389C1FE476E0@panasas.com> Thread-topic: svn commit: r315155 - in head/sys: kern sys References: <201703121348.v2CDmOpp070774@repo.freebsd.org> In-reply-to: <201703121348.v2CDmOpp070774@repo.freebsd.org> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 00:41:56 -0000 Hi Konstantin, This appears to break mips kernels: _.mips.ADM5120:cc1: warnings being treated as errors _.mips.ADM5120-/usr/home/rpokala/freebsd/clean/base/head/sys/kern/kern_event.c:892: warning: 'kev_iovlen' defined but not used _.mips.ALCHEMY:cc1: warnings being treated as errors _.mips.ALCHEMY-/usr/home/rpokala/freebsd/clean/base/head/sys/kern/kern_event.c:892: warning: 'kev_iovlen' defined but not used _.mips.AR71XX_BASE:cc1: warnings being treated as errors _.mips.AR71XX_BASE-/usr/home/rpokala/freebsd/clean/base/head/sys/kern/kern_event.c:892: warning: 'kev_iovlen' defined but not used _.mips.AR724X_BASE:cc1: warnings being treated as errors _.mips.AR724X_BASE-/usr/home/rpokala/freebsd/clean/base/head/sys/kern/kern_event.c:892: warning: 'kev_iovlen' defined but not used etc. Thanks, Ravi (rpokala@) -----Original Message----- From: on behalf of Konstantin Belousov Date: 2017-03-12, Sunday at 06:48 To: , , Subject: svn commit: r315155 - in head/sys: kern sys Author: kib Date: Sun Mar 12 13:48:24 2017 New Revision: 315155 URL: https://svnweb.freebsd.org/changeset/base/315155 Log: Ktracing kevent(2) calls with unusual arguments might leads to an overly large allocation requests. When ktrace-ing io, sys_kevent() allocates memory to copy the requested changes and reported events. Allocations are sized by the incoming syscall lengths arguments, which are user-controlled, and might cause overflow in calculations or too large allocations. Since io trace chunks are limited by ktr_geniosize, there is no sense it even trying to satisfy unbounded allocations. Export ktr_geniosize and clamp the buffers sizes in advance. PR: 217435 Reported by: Tim Newsham Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/kern_event.c head/sys/kern/kern_ktrace.c head/sys/sys/ktrace.h Modified: head/sys/kern/kern_event.c ============================================================================== --- head/sys/kern/kern_event.c Sun Mar 12 13:42:40 2017 (r315154) +++ head/sys/kern/kern_event.c Sun Mar 12 13:48:24 2017 (r315155) @@ -887,6 +887,15 @@ kern_kqueue(struct thread *td, int flags return (0); } +static size_t +kev_iovlen(int n, u_int kgio) +{ + + if (n < 0 || n >= kgio / sizeof(struct kevent)) + return (kgio); + return (n * sizeof(struct kevent)); +} + #ifndef _SYS_SYSPROTO_H_ struct kevent_args { int fd; @@ -910,6 +919,7 @@ sys_kevent(struct thread *td, struct kev struct iovec ktriov; struct uio *ktruioin = NULL; struct uio *ktruioout = NULL; + u_int kgio; #endif if (uap->timeout != NULL) { @@ -922,13 +932,15 @@ sys_kevent(struct thread *td, struct kev #ifdef KTRACE if (KTRPOINT(td, KTR_GENIO)) { + kgio = ktr_geniosize; ktriov.iov_base = uap->changelist; - ktriov.iov_len = uap->nchanges * sizeof(struct kevent); + ktriov.iov_len = kev_iovlen(uap->nchanges, kgio); ktruio = (struct uio){ .uio_iov = &ktriov, .uio_iovcnt = 1, .uio_segflg = UIO_USERSPACE, .uio_rw = UIO_READ, .uio_td = td }; ktruioin = cloneuio(&ktruio); ktriov.iov_base = uap->eventlist; + ktriov.iov_len = kev_iovlen(uap->nevents, kgio); ktriov.iov_len = uap->nevents * sizeof(struct kevent); ktruioout = cloneuio(&ktruio); } @@ -939,9 +951,9 @@ sys_kevent(struct thread *td, struct kev #ifdef KTRACE if (ktruioin != NULL) { - ktruioin->uio_resid = uap->nchanges * sizeof(struct kevent); + ktruioin->uio_resid = kev_iovlen(uap->nchanges, kgio); ktrgenio(uap->fd, UIO_WRITE, ktruioin, 0); - ktruioout->uio_resid = td->td_retval[0] * sizeof(struct kevent); + ktruioout->uio_resid = kev_iovlen(td->td_retval[0], kgio); ktrgenio(uap->fd, UIO_READ, ktruioout, error); } #endif Modified: head/sys/kern/kern_ktrace.c ============================================================================== --- head/sys/kern/kern_ktrace.c Sun Mar 12 13:42:40 2017 (r315154) +++ head/sys/kern/kern_ktrace.c Sun Mar 12 13:48:24 2017 (r315155) @@ -132,7 +132,7 @@ static SYSCTL_NODE(_kern, OID_AUTO, ktra static u_int ktr_requestpool = KTRACE_REQUEST_POOL; TUNABLE_INT("kern.ktrace.request_pool", &ktr_requestpool); -static u_int ktr_geniosize = PAGE_SIZE; +u_int ktr_geniosize = PAGE_SIZE; SYSCTL_UINT(_kern_ktrace, OID_AUTO, genio_size, CTLFLAG_RWTUN, &ktr_geniosize, 0, "Maximum size of genio event payload"); Modified: head/sys/sys/ktrace.h ============================================================================== --- head/sys/sys/ktrace.h Sun Mar 12 13:42:40 2017 (r315154) +++ head/sys/sys/ktrace.h Sun Mar 12 13:48:24 2017 (r315155) @@ -276,7 +276,7 @@ void ktrcapfail(enum ktr_cap_fail_type, ktrstruct("sockaddr", (s), ((struct sockaddr *)(s))->sa_len) #define ktrstat(s) \ ktrstruct("stat", (s), sizeof(struct stat)) - +extern u_int ktr_geniosize; #else #include From owner-svn-src-head@freebsd.org Tue Mar 14 00:43:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48161D096AD; Tue, 14 Mar 2017 00:43:45 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from mr11p00im-asmtp003.me.com (mr11p00im-asmtp003.me.com [17.110.69.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D86E18EB; Tue, 14 Mar 2017 00:43:45 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from process-dkim-sign-daemon.mr11p00im-asmtp003.me.com by mr11p00im-asmtp003.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) id <0OMS00J0049FNQ00@mr11p00im-asmtp003.me.com>; Tue, 14 Mar 2017 00:43:38 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mac.com; s=4d515a; t=1489452218; bh=gHVcsWsUMAFLed5DSQhjqVEK9jFWDCoaV7I5xi3Uo6o=; h=Date:Subject:From:To:Message-id:MIME-version:Content-type; b=gvu8hqY9ltMqaBDK8csQFAMgxjq5YHSWhU4V+aoeRW+8ypfS7i0Mj57k0nFv+NWUY o9BtMrMChSI9luLBid73it8Nhz1qPj+rHZElEC5BTcVpSYsBs9DzMhlwXqm0VNtBUZ smKTifPJY99XrKOYsckt8YqzzYOuO+gS+yRxucTNupV523GWwVA1sc3erBcvXiJoy1 AGXOFlyN57oELqh5vUoygJxxdsSP/46afkER1kNfvBgOgHft+ragMsWg9us3VhEEVv EG2cCC4S8q/2HLVEzFdgGbOgOHNnjZ+6amgGjkKW9W3efO9klASBE89F3RaUTE1eBv T7R/V3E930Lmw== Received: from icloud.com ([127.0.0.1]) by mr11p00im-asmtp003.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) with ESMTPSA id <0OMS00HM44ONZX10@mr11p00im-asmtp003.me.com>; Tue, 14 Mar 2017 00:43:36 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-03-13_18:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1034 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1701120000 definitions=main-1703140005 User-Agent: Microsoft-MacOutlook/f.1f.0.170216 Date: Mon, 13 Mar 2017 17:43:35 -0700 Subject: Re: svn commit: r315163 - head/sys/dev/isp From: Ravi Pokala Sender: "Pokala, Ravi" To: Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-id: <5AE94770-B65A-4B09-A770-6EC55B29D121@panasas.com> Thread-topic: svn commit: r315163 - head/sys/dev/isp References: <201703121655.v2CGtIjX049531@repo.freebsd.org> In-reply-to: <201703121655.v2CGtIjX049531@repo.freebsd.org> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 00:43:45 -0000 Hi Alexander, This appears to break powerpc and sparc64 kernels: _.powerpc.GENERIC:cc1: warnings being treated as errors _.powerpc.GENERIC-/usr/home/rpokala/freebsd/clean/base/head/sys/dev/isp/isp_freebsd.c:55: warning: 'isp_intr_enable' declared 'static' but never defined -- _.powerpc.GENERIC:cc1: warnings being treated as errors _.powerpc.GENERIC-/usr/home/rpokala/freebsd/clean/base/head/sys/dev/isp/isp_freebsd.c:55: warning: 'isp_intr_enable' declared 'static' but never defined ... _.sparc64.GENERIC:cc1: warnings being treated as errors _.sparc64.GENERIC-/usr/home/rpokala/freebsd/clean/base/head/sys/dev/isp/isp_freebsd.c:55: warning: 'isp_intr_enable' declared 'static' but never defined _.sparc64.GENERIC-NODEBUG:cc1: warnings being treated as errors _.sparc64.GENERIC-NODEBUG-/usr/home/rpokala/freebsd/clean/base/head/sys/dev/isp/isp_freebsd.c:55: warning: 'isp_intr_enable' declared 'static' but never defined etc. Thanks, Ravi (rpokala@) -----Original Message----- From: on behalf of Alexander Motin Date: 2017-03-12, Sunday at 09:55 To: , , Subject: svn commit: r315163 - head/sys/dev/isp Author: mav Date: Sun Mar 12 16:55:18 2017 New Revision: 315163 URL: https://svnweb.freebsd.org/changeset/base/315163 Log: Remove strange config_intrhook_establish() magic. Interrupts are enabled as part of chip reset just during driver attach. Later "enabling" of already enabled interrupts is useless. MFC after: 2 weeks Modified: head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_freebsd.h Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Sun Mar 12 16:03:34 2017 (r315162) +++ head/sys/dev/isp/isp_freebsd.c Sun Mar 12 16:55:18 2017 (r315163) @@ -278,25 +278,11 @@ isp_attach(ispsoftc_t *isp) int du = device_get_unit(isp->isp_dev); int chan; - isp->isp_osinfo.ehook.ich_func = isp_intr_enable; - isp->isp_osinfo.ehook.ich_arg = isp; - /* - * Haha. Set this first, because if we're loaded as a module isp_intr_enable - * will be called right awawy, which will clear isp_osinfo.ehook_active, - * which would be unwise to then set again later. - */ - isp->isp_osinfo.ehook_active = 1; - if (config_intrhook_establish(&isp->isp_osinfo.ehook) != 0) { - isp_prt(isp, ISP_LOGERR, "could not establish interrupt enable hook"); - return (-EIO); - } - /* * Create the device queue for our SIM(s). */ isp->isp_osinfo.devq = cam_simq_alloc(isp->isp_maxcmds); if (isp->isp_osinfo.devq == NULL) { - config_intrhook_disestablish(&isp->isp_osinfo.ehook); return (EIO); } @@ -330,10 +316,6 @@ unwind: ISP_UNLOCK(isp); cam_sim_free(sim, FALSE); } - if (isp->isp_osinfo.ehook_active) { - config_intrhook_disestablish(&isp->isp_osinfo.ehook); - isp->isp_osinfo.ehook_active = 0; - } if (isp->isp_osinfo.cdev) { destroy_dev(isp->isp_osinfo.cdev); isp->isp_osinfo.cdev = NULL; @@ -371,10 +353,6 @@ isp_detach(ispsoftc_t *isp) destroy_dev(isp->isp_osinfo.cdev); isp->isp_osinfo.cdev = NULL; } - if (isp->isp_osinfo.ehook_active) { - config_intrhook_disestablish(&isp->isp_osinfo.ehook); - isp->isp_osinfo.ehook_active = 0; - } if (isp->isp_osinfo.devq != NULL) { cam_simq_free(isp->isp_osinfo.devq); isp->isp_osinfo.devq = NULL; @@ -786,28 +764,6 @@ ispioctl(struct cdev *dev, u_long c, cad return (retval); } -static void -isp_intr_enable(void *arg) -{ - int chan; - ispsoftc_t *isp = arg; - ISP_LOCK(isp); - if (IS_FC(isp)) { - for (chan = 0; chan < isp->isp_nchan; chan++) { - if (FCPARAM(isp, chan)->role != ISP_ROLE_NONE) { - ISP_ENABLE_INTS(isp); - break; - } - } - } else { - ISP_ENABLE_INTS(isp); - } - isp->isp_osinfo.ehook_active = 0; - ISP_UNLOCK(isp); - /* Release our hook so that the boot can continue. */ - config_intrhook_disestablish(&isp->isp_osinfo.ehook); -} - /* * Local Inlines */ Modified: head/sys/dev/isp/isp_freebsd.h ============================================================================== --- head/sys/dev/isp/isp_freebsd.h Sun Mar 12 16:03:34 2017 (r315162) +++ head/sys/dev/isp/isp_freebsd.h Sun Mar 12 16:55:18 2017 (r315163) @@ -270,7 +270,6 @@ struct isposinfo { struct mtx lock; device_t dev; struct cdev * cdev; - struct intr_config_hook ehook; struct cam_devq * devq; /* @@ -310,7 +309,6 @@ struct isposinfo { sixtyfourbit : 1, /* sixtyfour bit platform */ timer_active : 1, autoconf : 1, - ehook_active : 1, mbox_sleeping : 1, mbox_sleep_ok : 1, mboxcmd_done : 1, From owner-svn-src-head@freebsd.org Tue Mar 14 01:00:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C9A3D09B91; Tue, 14 Mar 2017 01:00:10 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49F6611E6; Tue, 14 Mar 2017 01:00:10 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2E109jX042880; Tue, 14 Mar 2017 01:00:09 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2E109jA042879; Tue, 14 Mar 2017 01:00:09 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201703140100.v2E109jA042879@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 14 Mar 2017 01:00:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315218 - head/sbin/ipf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 01:00:10 -0000 Author: cy Date: Tue Mar 14 01:00:09 2017 New Revision: 315218 URL: https://svnweb.freebsd.org/changeset/base/315218 Log: Disconnect ipftest and ipresend from the build until it can be verified that they still work. These utilities have become out of sync with the code in the kernel and need work to bring them back into shape. Most people test on real systems or VMs on real networks. Sugested by: glebius Modified: head/sbin/ipf/Makefile Modified: head/sbin/ipf/Makefile ============================================================================== --- head/sbin/ipf/Makefile Mon Mar 13 22:53:06 2017 (r315217) +++ head/sbin/ipf/Makefile Tue Mar 14 01:00:09 2017 (r315218) @@ -1,7 +1,9 @@ # $FreeBSD$ SUBDIR= libipf .WAIT -SUBDIR+= ipf ipfs ipfstat ipftest ipmon ipnat ippool ipresend +SUBDIR+= ipf ipfs ipftest ipmon ipnat ippool +# XXX: Disconnected for now. +# XXX: SUBDIR+= ipftest ipresend SUBDIR_PARALLEL= .include From owner-svn-src-head@freebsd.org Tue Mar 14 01:15:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53520D0A6CE; Tue, 14 Mar 2017 01:15:15 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2352A1DB8; Tue, 14 Mar 2017 01:15:15 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2E1FEtd050756; Tue, 14 Mar 2017 01:15:14 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2E1FEQA050755; Tue, 14 Mar 2017 01:15:14 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201703140115.v2E1FEQA050755@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 14 Mar 2017 01:15:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315219 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 01:15:15 -0000 Author: cy Date: Tue Mar 14 01:15:14 2017 New Revision: 315219 URL: https://svnweb.freebsd.org/changeset/base/315219 Log: Temporarily remove sbin/ipftest and sbin/ipresend until it can be verified that they still work. See r315218 for the reason why. In support of: r315218 Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Mar 14 01:00:09 2017 (r315218) +++ head/ObsoleteFiles.inc Tue Mar 14 01:15:14 2017 (r315219) @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20170313: sbin/ipftest and ipresend temporarily disconnected (r315218). +OLD_FILES+=sbin/ipftest +OLD_FILES+=sbin/ipresend # 20170311: Remove WITHOUT_MANDOCDB option OLD_FILES+=usr/share/man/man1/makewhatis.1.gz # 20170311: remove GNU diff From owner-svn-src-head@freebsd.org Tue Mar 14 02:04:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7257BD0B606; Tue, 14 Mar 2017 02:04:45 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 424D31A12; Tue, 14 Mar 2017 02:04:45 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2E24iJ1070772; Tue, 14 Mar 2017 02:04:44 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2E24i8q070771; Tue, 14 Mar 2017 02:04:44 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201703140204.v2E24i8q070771@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 14 Mar 2017 02:04:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315220 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 02:04:45 -0000 Author: cy Date: Tue Mar 14 02:04:44 2017 New Revision: 315220 URL: https://svnweb.freebsd.org/changeset/base/315220 Log: Revert r315219 so that it may be committed together with r315218. Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Mar 14 01:15:14 2017 (r315219) +++ head/ObsoleteFiles.inc Tue Mar 14 02:04:44 2017 (r315220) @@ -38,9 +38,6 @@ # xargs -n1 | sort | uniq -d; # done -# 20170313: sbin/ipftest and ipresend temporarily disconnected (r315218). -OLD_FILES+=sbin/ipftest -OLD_FILES+=sbin/ipresend # 20170311: Remove WITHOUT_MANDOCDB option OLD_FILES+=usr/share/man/man1/makewhatis.1.gz # 20170311: remove GNU diff From owner-svn-src-head@freebsd.org Tue Mar 14 02:06:14 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08F54D0B6B3; Tue, 14 Mar 2017 02:06:14 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA9301BCC; Tue, 14 Mar 2017 02:06:13 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2E26Cok070975; Tue, 14 Mar 2017 02:06:12 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2E26Cxb070974; Tue, 14 Mar 2017 02:06:12 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201703140206.v2E26Cxb070974@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 14 Mar 2017 02:06:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315222 - head/sbin/ipf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 02:06:14 -0000 Author: cy Date: Tue Mar 14 02:06:12 2017 New Revision: 315222 URL: https://svnweb.freebsd.org/changeset/base/315222 Log: Revert r315218 so that it may be committed together with r315219. Modified: head/sbin/ipf/Makefile Modified: head/sbin/ipf/Makefile ============================================================================== --- head/sbin/ipf/Makefile Tue Mar 14 02:06:03 2017 (r315221) +++ head/sbin/ipf/Makefile Tue Mar 14 02:06:12 2017 (r315222) @@ -1,9 +1,7 @@ # $FreeBSD$ SUBDIR= libipf .WAIT -SUBDIR+= ipf ipfs ipftest ipmon ipnat ippool -# XXX: Disconnected for now. -# XXX: SUBDIR+= ipftest ipresend +SUBDIR+= ipf ipfs ipfstat ipftest ipmon ipnat ippool ipresend SUBDIR_PARALLEL= .include From owner-svn-src-head@freebsd.org Tue Mar 14 02:10:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5B0ED0B942; Tue, 14 Mar 2017 02:10:38 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B58081F70; Tue, 14 Mar 2017 02:10:38 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2E2Abrb071183; Tue, 14 Mar 2017 02:10:37 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2E2Ab5b071181; Tue, 14 Mar 2017 02:10:37 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201703140210.v2E2Ab5b071181@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 14 Mar 2017 02:10:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315223 - in head: . sbin/ipf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 02:10:39 -0000 Author: cy Date: Tue Mar 14 02:10:37 2017 New Revision: 315223 URL: https://svnweb.freebsd.org/changeset/base/315223 Log: Disconnect ipftest and ipresend from the build until it can be verified that they still work. These utilities have become out of sync with the code in the kernel and need work to bring them back into shape. Most people test on real systems or VMs on real networks. Suggested by: glebius Modified: head/ObsoleteFiles.inc head/sbin/ipf/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Mar 14 02:06:12 2017 (r315222) +++ head/ObsoleteFiles.inc Tue Mar 14 02:10:37 2017 (r315223) @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20170313: sbin/ipftest and ipresend temporarily disconnected. +OLD_FILES+=sbin/ipftest +OLD_FILES+=sbin/ipresend # 20170311: Remove WITHOUT_MANDOCDB option OLD_FILES+=usr/share/man/man1/makewhatis.1.gz # 20170311: remove GNU diff Modified: head/sbin/ipf/Makefile ============================================================================== --- head/sbin/ipf/Makefile Tue Mar 14 02:06:12 2017 (r315222) +++ head/sbin/ipf/Makefile Tue Mar 14 02:10:37 2017 (r315223) @@ -1,7 +1,9 @@ # $FreeBSD$ SUBDIR= libipf .WAIT -SUBDIR+= ipf ipfs ipfstat ipftest ipmon ipnat ippool ipresend +SUBDIR+= ipf ipfs ipfstat ipmon ipnat ippool +# XXX Temporarily disconnected. +# SUBDIR+= ipftest ipresend SUBDIR_PARALLEL= .include From owner-svn-src-head@freebsd.org Tue Mar 14 06:00:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0FD1ED0A9FF; Tue, 14 Mar 2017 06:00:46 +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 mx1.freebsd.org (Postfix) with ESMTPS id D36A61EBB; Tue, 14 Mar 2017 06:00:45 +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 v2E60iei067345; Tue, 14 Mar 2017 06:00:44 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2E60iq5067343; Tue, 14 Mar 2017 06:00:44 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201703140600.v2E60iq5067343@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 14 Mar 2017 06:00:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315225 - in head: lib/libc/gen sys/libkern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 06:00:46 -0000 Author: delphij Date: Tue Mar 14 06:00:44 2017 New Revision: 315225 URL: https://svnweb.freebsd.org/changeset/base/315225 Log: Discard first 3072 bytes of RC4 keystream, this is a bandaid that allows us to work on switching to a more modern PRNG. Submitted by: Steven Chamberlain Approved by: so Modified: head/lib/libc/gen/arc4random.c head/sys/libkern/arc4random.c Modified: head/lib/libc/gen/arc4random.c ============================================================================== --- head/lib/libc/gen/arc4random.c Tue Mar 14 02:13:59 2017 (r315224) +++ head/lib/libc/gen/arc4random.c Tue Mar 14 06:00:44 2017 (r315225) @@ -160,7 +160,7 @@ arc4_stir(void) * Discard early keystream, as per recommendations in: * "(Not So) Random Shuffles of RC4" by Ilya Mironov. */ - for (i = 0; i < 1024; i++) + for (i = 0; i < 3072; i++) (void)arc4_getbyte(); arc4_count = 1600000; } Modified: head/sys/libkern/arc4random.c ============================================================================== --- head/sys/libkern/arc4random.c Tue Mar 14 02:13:59 2017 (r315224) +++ head/sys/libkern/arc4random.c Tue Mar 14 06:00:44 2017 (r315225) @@ -84,11 +84,11 @@ arc4_randomstir(struct arc4_s* arc4) /* * Throw away the first N words of output, as suggested in the * paper "Weaknesses in the Key Scheduling Algorithm of RC4" - * by Fluher, Mantin, and Shamir. (N = 256 in our case.) + * by Fluher, Mantin, and Shamir. (N = 768 in our case.) * * http://dl.acm.org/citation.cfm?id=646557.694759 */ - for (n = 0; n < 256*4; n++) + for (n = 0; n < 768*4; n++) arc4_randbyte(arc4); mtx_unlock(&arc4->mtx); From owner-svn-src-head@freebsd.org Tue Mar 14 06:52:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 052A7D0BE33; Tue, 14 Mar 2017 06:52:56 +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 mx1.freebsd.org (Postfix) with ESMTPS id C5E8A1D94; Tue, 14 Mar 2017 06:52:55 +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 v2E6qsYf091460; Tue, 14 Mar 2017 06:52:54 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2E6qssX091459; Tue, 14 Mar 2017 06:52:54 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703140652.v2E6qssX091459@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 14 Mar 2017 06:52:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315228 - head/tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 06:52:56 -0000 Author: ngie Date: Tue Mar 14 06:52:54 2017 New Revision: 315228 URL: https://svnweb.freebsd.org/changeset/base/315228 Log: Redirect standard error from find /rescue to /dev/null This mutes noise from find when /rescue doesn't exist. MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Tue Mar 14 06:12:51 2017 (r315227) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Tue Mar 14 06:52:54 2017 (r315228) @@ -7484,9 +7484,9 @@ OLD_FILES+=usr/share/man/man8/rwhod.8.gz .if ${MK_RESCUE} == no . if exists(${DESTDIR}${TESTSBASE}) -RESCUE_DIRS!=find ${DESTDIR}/rescue -type d | sed -e 's,^${DESTDIR}/,,'; echo +RESCUE_DIRS!=find ${DESTDIR}/rescue -type d 2>/dev/null | sed -e 's,^${DESTDIR}/,,'; echo OLD_DIRS+=${RESCUE_DIRS} -RESCUE_FILES!=find ${DESTDIR}/rescue \! -type d | sed -e 's,^${DESTDIR}/,,'; echo +RESCUE_FILES!=find ${DESTDIR}/rescue \! -type d 2>/dev/null | sed -e 's,^${DESTDIR}/,,'; echo OLD_FILES+=${RESCUE_FILES} . endif .endif From owner-svn-src-head@freebsd.org Tue Mar 14 06:57:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3401BD0B057; Tue, 14 Mar 2017 06:57:57 +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 mx1.freebsd.org (Postfix) with ESMTPS id EF7F510B0; Tue, 14 Mar 2017 06:57:56 +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 v2E6vu6W091733; Tue, 14 Mar 2017 06:57:56 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2E6vuG0091732; Tue, 14 Mar 2017 06:57:56 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703140657.v2E6vuG0091732@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 14 Mar 2017 06:57:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315229 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 06:57:57 -0000 Author: mav Date: Tue Mar 14 06:57:55 2017 New Revision: 315229 URL: https://svnweb.freebsd.org/changeset/base/315229 Log: Remove remnant of r315163. MFC after: 13 days Modified: head/sys/dev/isp/isp_freebsd.c Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Tue Mar 14 06:52:54 2017 (r315228) +++ head/sys/dev/isp/isp_freebsd.c Tue Mar 14 06:57:55 2017 (r315229) @@ -52,7 +52,6 @@ static const char prom3[] = "Chan %d [%u static void isp_freeze_loopdown(ispsoftc_t *, int); static void isp_loop_changed(ispsoftc_t *isp, int chan); static d_ioctl_t ispioctl; -static void isp_intr_enable(void *); static void isp_cam_async(void *, uint32_t, struct cam_path *, void *); static void isp_poll(struct cam_sim *); static timeout_t isp_watchdog; From owner-svn-src-head@freebsd.org Tue Mar 14 07:00:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63267D0B12E; Tue, 14 Mar 2017 07:00:25 +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 mx1.freebsd.org (Postfix) with ESMTPS id 203891243; Tue, 14 Mar 2017 07:00:24 +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 v2E70NIg091925; Tue, 14 Mar 2017 07:00:23 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2E70MXc091919; Tue, 14 Mar 2017 07:00:22 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703140700.v2E70MXc091919@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 14 Mar 2017 07:00:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315230 - in head: etc/mtree tests/sys/geom tests/sys/geom/class/eli tests/sys/geom/eli X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 07:00:25 -0000 Author: ngie Date: Tue Mar 14 07:00:22 2017 New Revision: 315230 URL: https://svnweb.freebsd.org/changeset/base/315230 Log: Move .../sys/geom/eli/pbkdf2... to .../sys/geom/class/eli/... This change moves the tests added in r313962 to an existing directory structure used by the geli TAP tests. It also, renames the test from pbkdf2 to pbkdf2_test . The changes to ObsoleteFiles.inc are being committed separately as they aren't needed for the MFC to ^/stable/11, etc, if the MFC for the tests is done all in one commit. MFC after: 2 weeks X-MFC with: r313962, r313972-r313973 Reviewed by: allanjude Sponsored by: Dell EMC Isilon Differential Revision: D9985 Added: - copied unchanged from r315229, head/tests/sys/geom/eli/pbkdf2/gentestvect.py - copied unchanged from r315229, head/tests/sys/geom/eli/pbkdf2/hmactest.c - copied unchanged from r315229, head/tests/sys/geom/eli/pbkdf2/testvect.h Directory Properties: head/tests/sys/geom/class/eli/gentestvect.py (props changed) head/tests/sys/geom/class/eli/hmac_test.c (props changed) head/tests/sys/geom/class/eli/testvect.h (props changed) Deleted: head/tests/sys/geom/eli/ Modified: head/etc/mtree/BSD.tests.dist head/tests/sys/geom/Makefile head/tests/sys/geom/class/eli/Makefile Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Tue Mar 14 06:57:55 2017 (r315229) +++ head/etc/mtree/BSD.tests.dist Tue Mar 14 07:00:22 2017 (r315230) @@ -425,10 +425,6 @@ .. .. .. - eli - pbkdf2 - .. - .. .. kern acct Modified: head/tests/sys/geom/Makefile ============================================================================== --- head/tests/sys/geom/Makefile Tue Mar 14 06:57:55 2017 (r315229) +++ head/tests/sys/geom/Makefile Tue Mar 14 07:00:22 2017 (r315230) @@ -3,6 +3,5 @@ TESTSDIR= ${TESTSBASE}/sys/geom TESTS_SUBDIRS+= class -TESTS_SUBDIRS+= eli .include Modified: head/tests/sys/geom/class/eli/Makefile ============================================================================== --- head/tests/sys/geom/class/eli/Makefile Tue Mar 14 06:57:55 2017 (r315229) +++ head/tests/sys/geom/class/eli/Makefile Tue Mar 14 07:00:22 2017 (r315230) @@ -1,9 +1,13 @@ # $FreeBSD$ +.PATH: ${SRCTOP}/sys/geom/eli ${SRCTOP}/sys/crypto/sha2 + PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/geom/class/${.CURDIR:T} +ATF_TESTS_C= pbkdf2_test + TAP_TESTS_SH+= attach_d_test TAP_TESTS_SH+= configure_b_B_test TAP_TESTS_SH+= delkey_test @@ -40,4 +44,19 @@ ${PACKAGE}FILES+= conf.sh TEST_METADATA.$t+= required_user="root" .endfor +CFLAGS.pbkdf2_test= -I${SYSDIR}/sys + +SRCS.pbkdf2_test= \ + hmac_test.c \ + g_eli_crypto.c \ + g_eli_hmac.c \ + pkcs5v2.c \ + sha512c.c \ + sha256c.c + +LIBADD.pbkdf2_test= crypto + +testvect.h: + python gentestvect.py > ${.TARGET} + .include Copied: head/tests/sys/geom/class/eli/gentestvect.py (from r315229, head/tests/sys/geom/eli/pbkdf2/gentestvect.py) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/geom/class/eli/gentestvect.py Tue Mar 14 07:00:22 2017 (r315230, copy of r315229, head/tests/sys/geom/eli/pbkdf2/gentestvect.py) @@ -0,0 +1,63 @@ +#!/usr/bin/env python +# $FreeBSD$ + +from hashlib import pbkdf2_hmac +import hashlib +import itertools +import string + +#From: https://stackoverflow.com/questions/14945095/how-to-escape-string-for-generated-c +def cstring(s, encoding='ascii'): + if isinstance(s, unicode): + s = s.encode(encoding) + + result = '' + for c in s: + if not (32 <= ord(c) < 127) or c in ('\\', '"'): + result += '\\%03o' % ord(c) + else: + result += c + + return '"' + result + '"' + +intarr = lambda y: ', '.join(map(lambda x: str(ord(x)), y)) + +_randfd = open('/dev/urandom', 'rb') +_maketrans = string.maketrans('', '') +def randgen(l, delchrs=None): + if delchrs is None: + return _randfd.read(l) + + s = '' + while len(s) < l: + s += string.translate(_randfd.read(l - len(s)), _maketrans, + delchrs) + return s + +def printhmacres(salt, passwd, itr, hmacout): + print '\t{ %s, %d, %s, %d, %s, %d },' % (cstring(salt), len(salt), + cstring(passwd), itr, cstring(hmacout), len(hmacout)) + +if __name__ == '__main__': + import sys + + if len(sys.argv) == 1: + hashfun = 'sha512' + else: + hashfun = sys.argv[1] + + if hashfun not in hashlib.algorithms: + print 'Invalid hash function: %s' % `hashfun` + sys.exit(1) + + print '/* Test Vectors for PBKDF2-%s */' % hashfun.upper() + print '\t/* salt, saltlen, passwd, itr, hmacout, hmacoutlen */' + for saltl in xrange(8, 64, 8): + for itr in itertools.chain(xrange(100, 1000, 100), xrange(1000, + 10000, 1000)): + for passlen in xrange(8, 80, 8): + salt = randgen(saltl) + passwd = randgen(passlen, '\x00') + hmacout = pbkdf2_hmac(hashfun, passwd, salt, + itr) + printhmacres(salt, passwd, itr, hmacout) Copied: head/tests/sys/geom/class/eli/hmac_test.c (from r315229, head/tests/sys/geom/eli/pbkdf2/hmactest.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/geom/class/eli/hmac_test.c Tue Mar 14 07:00:22 2017 (r315230, copy of r315229, head/tests/sys/geom/eli/pbkdf2/hmactest.c) @@ -0,0 +1,41 @@ +/* + * $FreeBSD$ + */ + +#include +#include + +#include + +const struct { + char *salt; + size_t saltlen; + char *passwd; + int iterations; + char *hmacout; + size_t hmaclen; +} testdata[] = { +#include "testvect.h" +}; + +ATF_TC_WITHOUT_HEAD(hmactest); +ATF_TC_BODY(hmactest, tc) +{ + size_t i; + uint8_t hmacout[64]; + + for (i = 0; i < nitems(testdata); i++) { + pkcs5v2_genkey(hmacout, testdata[i].hmaclen, + (uint8_t *)testdata[i].salt, testdata[i].saltlen, + testdata[i].passwd, testdata[i].iterations); + ATF_REQUIRE(bcmp(hmacout, testdata[i].hmacout, + testdata[i].hmaclen) == 0); + } +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, hmactest); + + return (atf_no_error()); +} Copied: head/tests/sys/geom/class/eli/testvect.h (from r315229, head/tests/sys/geom/eli/pbkdf2/testvect.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/geom/class/eli/testvect.h Tue Mar 14 07:00:22 2017 (r315230, copy of r315229, head/tests/sys/geom/eli/pbkdf2/testvect.h) @@ -0,0 +1,1137 @@ +/* $FreeBSD$ */ +/* Test Vectors for PBKDF2-SHA512 */ + /* salt, saltlen, passwd, itr, hmacout, hmacoutlen */ + { "\331}\035\215\000\272\350\261", 8, "\323\303\210\231\260\225\217\035", 100, "J\257\275\352n\371\300!tp\367\257\347c'\000\243F\246\376\274H\263\312m\336\304\3515P\222Cb\037-\313W\0067\232\024%\235\252\322\035\225k\025\2248\251r\312]v\316\021j\231\224\2556\350", 64 }, + { "\321\213\277\330\210E\207x", 8, "(C\371\344\354\356\232\212\346\014\335M(\234g\226", 100, "\035MoB\245\001\000\315\332\235\356?alD\231I[%A\372\367\027\267,\303\022\324\004\302a\302t\257\306S\251\250;-pa\246Z\200\003*+\026\305_\250\214n\321\340.\032a3\371\346\025\042", 64 }, + { "\344\353\215\257\020\315\245\367", 8, "/pj@N\344\271\243^\352\236gu\352\344os\366FR\362\001\347\301", 100, "\223eS:\015\311\023\317\230O\012\347\014\32070\321\337p\353\305\361\223\323\333&\011'\360?\022\374P\336\337\031\266,~@!\037\000\320v\360!\225\221@C\266|k\370@\305\202\235+\314\247\305&", 64 }, + { "\364\275\222\376\0064\240g", 8, "_\2000 A\233#\372\351\332\247\010\313\274\334\255\362J\356\333\302\345\317\305*\357 \366Aj\344\346", 100, "\223\015X\340\024\244\2767\027\253\261\232\360(?\350H7\326K\322\246\341\222\202:@\254\3218\016T\275\212^\005\344\202\230\220s\311\201\025\233~K6\241*b\244\203\273\355\270\277\242\300V3\037\224\311", 64 }, + { "\272\207\326\030\010\374\263f", 8, "\323\230\233\317\337\001\241]G\312\347\320K\3374\247\016\343\246\353\300\373\267\335\314h\216\245$\373\210\214\014b\340\377\256\0202E", 100, "a\274S.\032\246\330\321\322\207\004\241n\303\363\361\361\215\367Xi\250\275\246\037\355\255\342\004\253\250\243&\032\357\250\204\207K\2612\0318\3353\253\335Z\351\337\253v\345\322r\030\0066\230jp\345\373\203", 64 }, + { "j\276\230\215\031$\326v", 8, "gy\264\354\363\322(w\262\272\203\306{\356\031\376\277+\276L\337\270G\345!>29\010\204m\240!\326\255\326\321\272(\325T\033B\262[\267]\272", 100, "\2563\024\201\310\372\017\373\270\232\277\265:j\231\365\032zS\3723\012\341i\302V\233l\247\030:\355\262]\337\361JUe:\350|#D\262\335)\260\333\273\221\252\005\226\322'\371+a\270a\302\276p", 64 }, + { ",;\270P\012\035\262\235", 8, "\375 \232J\304\271_\272\033\027\363\021\227\260\323\310\304k\004.\327\354\217,\357\353]I0\332We\245\257\371,\260\360\325\224\026q[VuS\217\004\262\376T\353\262\321\241\024", 100, "\313\246&~\374Zq(0\000\002\332\356\355M\353Z?\310~\234\327\011\242\370\032GK\250\020\203sJ\234I,\271\012\230\204g\323\345\343\343\350\231\227\015\350b\256\012\367Q\255v\365\210\247\2614\210\365", 64 }, + { "\021\325\267u\203$\352\274", 8, "\232\032\225'\021*'a\042\023{\250\361r\262\365\370\032\347\336\363Re28\033J\3763^\311I\322:\036\204\320\033\245\200\262\225\341\377\334\241p\314\334\005O,\374\225\234\014\266\365\030i6\210a\205", 100, "\220\006\216\2420-8m\2766\353(6\212\306\261C@\252\2104\005\205\274\204\365\226\373\016\345\332\207\361A\244\023W\3051:\277\2705Z\253\262\371M\024L\215\224\340p\336\355\250\030*8\300\017\254f", 64 }, + { "[\353e\224\2423\270m", 8, "\1776\374\302o0\007\307w\032\307\266\376\320\042/\266\352\233\224\316\3616\314!`\015d\316\370L{\201B\245\317\366@V\036\227\273I\205\251\306GW\200*\340P\267\202#\354\330\266O\347\254(\203\270\366w\274\375\272\016\240\313", 100, "?j\005\340=\022\012NM\024\231\220_u\023@\042\214\014b\375\251\023\244y3m\330\377\341\271~V0\263\223\274\325Rmug\026Dt!\347%\270\244\371@\177\350\250N\320\246\034\320\013|\276\027", 64 }, + { "\262\304(\244\326\272\262\311", 8, "\210C(\273\376\013/\034", 200, "6+\233\201\350\374\2053\013\377SA\007\037\303\027RyrC\361\303\321\031\225d\215\314\213\210\006\031\217\035L)\377'\016\263\310\206\326\372\362\230\226.F\134\277\367\35357(\214\262\036\310@\363#\020", 64 }, + { "\246<\216\226^F\004\036", 8, "\344].\210\212\236\252f\256n\006\250\2615\325\371", 200, "\213J\234\270\227$St\265\035\323\001&\025\027T>\015F\205\325\361_\003l\245|\213S\232@\254o\227\235l$\355\037\214\220\032\213\320\265lM\334\320\313+\205.\355\310\201K\370^\025\134\346[K", 64 }, + { "9s72\020\270\251\350", 8, "\323\370:k\323o\271Y\335\306\375#\333\222\246?C\313\023\202>\005\025\216", 200, "\371\373\341\202(\231\010\325_\335\205\253\216\371\227\354\352Os2\356e\033L\236znr;\337a'\025\335n\032f\304\177u\001n{\236`\261\346N\2748R\017\243\226[\256@<\021m\202r\363g", 64 }, + { "\032\216\254\215\022l\001H", 8, "\027J\232\302\240lTSU\215y\262\360\017\346\3253\276r\276\211\306>\3740\263\264\002\333J;\262", 200, "\3206K,\267r<\302r\207y\373\3625]2Y\3710\343\272\211\202\3465g\340jG\001`\341\352\313\203\250x\221K\254iV\350w\2220\257Yc\360Z\263\237\255\042\325\341\307\330\232s@?\210", 64 }, + { "D\302g\023\316\224l\271", 8, "\262t\301{\366\345Bv\271!\213\303\244O8\314\336\363\325|\206x\034d$#\001x9\012\241\256W\241\334\307\240\207F", 64 }, + { "\037\346\010\241]\004x\204", 8, "T\334\371\316I\33656Q\027\277\203\033\303\240\371\231\352\214\3701@\002\015?2\264\002\257R\205\250\264}\021\012\326\366wF\311\267\271\0042C:/\341\031\242\337\237.\021V\034\263`W\306Y\3533", 200, "V\370Nt\341W\226|\367\226\200\033|\006Kii\263\304\307\347\301#L\371\335l|O\304\300v\361d\255h^\322\026\332U\224\270\255\227\022\226G\326\363\303\244\234\235\016/<\331\247\307\242\355\226\307", 64 }, + { "\364\303X\325\327\256\342f", 8, "\227E\237\320\214GB\332\005\0333\250=\020c(\345\007?\032)\2643\243\202\371\200\030\002\225\011/\030\030\003Q\354\344\361B\214\333.\015\336`\376.\360\243$\017\367K\207\212\347L\356S\230\346\034*\307\207\203\233a\310\370\255", 200, "L(\217#(\300jA\343\037\251rR\312G\024\016dj:\212|\024\373\275\134\375\374\247\266FpF\275:\373_\314\134\244\016\373\203k\265\225\243\212t\240\310\347\226\262%\233\213\332w\042WL\302\331", 64 }, + { "c\027\266\220\010\031\241\313", 8, "F#\323\2367\260\323\273", 300, "@\200\033\254\020\246\206L$\203\026.T\223\205\364\362@\204*\316\232u\033\321\212;l\202\313s\205\333<1~\211\267\213\336Z\276\233W\322\366!\3629l\343@O\216+[!\262I\350\262\312\022\357", 64 }, + { "\001\277`\003x\301n\313", 8, "\257'\372i.M$\356\230\032\252yq\302\004c", 300, "?\037\327=m\335R\367?\242q\002\023V\203\017q8\252\325?6\213\241\274\275\356\344*\312/p~.<\305\346]\377\242\361\025\311\375\303\247\305\345@U\230\364F\275\211n\250Ay\352\026+\253V", 64 }, + { "\203\020{)\016R\324\350", 8, "\261\200\031:\346l\242u\352\300\014_\320\221y\213e\214\352\042c\371\257\361", 300, "\001\2111R\305R'b.L\007$\042\267\346\304(|+2\240\260\021\042\243J\344\237\006\236\203A\032\363\356\251\015.\321\336\03431X\002\355\221\313]\264\310\315o\316aw\246|\312bT:\325\300", 64 }, + { "\002X\311\253\033h\036'", 8, "P\206\257!\305E\377\275\310\005\364Bn\005\342>!w\017@}\245\350\177\305\312\323\361,\301y\022", 300, "\360\301\033\007\367,\374\242\177\3153D\251*_>{\005\272NQ\021\024:0\036\357\333c\254/\001\035\202\341\330\005\0245\265b}\261\232\273\0318\225\227\252\210\361\300\016\357\323\204\202\246\376\277@\225w", 64 }, + { ">+\207\003k\311\225\276", 8, "((\260Eak\253\305\3243Q\332*N\276\323\325_48\317\264&\340\005\323N\224p\003\331Fl\215\317 w\034u?", 300, "\276\317.\310Gj \217\3502.za\021\230\322C6\255\301\354-\263\247\002\352\377\267]\243\201n\245\213D\240\010D|\324\336\251\326\342e\231\350*\300\315\007\234\236\002}\372\013\364\257\232\262:\207e", 64 }, + { "\265G\357\330S\302?8", 8, "7S-\203\036\340\015\356\027\253\302\376\222\037\2276\0141|p\255\313\325\211\206\265\230\333\027\343\231\007\335\366\356\011 $ \312`\333y\267K4\317\277", 300, "\004\264\241\262\204\361YL%#v\373\013@E/\335\353 l\365\242u\215\301p\360O\030{\0236\033\206$\340\263\202bC\032\014\252\365\323\325\350u\210\234\020\037\015\275\000{h\363a\244\024\177\356\236", 64 }, + { "I\257\321\376\365\317\267I", 8, "\200!XxW\233B\374,\362\027,\343\022\204\220\373\231=\376\343\362\246\224 \001\233\015\0338\337\224#%\320\037\342\276\314X{h\036\210w\377\011@=\021\034\3429!\211\350", 300, "`\277s c\215t\251,\306:L\267`u%D\244\021\340\036C\304\032\014u\042\134Mzo\313\225\3641\017\037\271q*\321\023\227\253\215\330\351\373\202\220\274`P\267\277\373\007\366\370\031\350\015\214\245", 64 }, + { "\324\366\347;\363R\300!", 8, "y\262~C\031\252 \004\215a\033\355l9\024C\237b/\032Kk\316q\257K\017\017\036\316\003\246\005\225(\0168\264\032pT\030\250\334\341\020\012X K\325\002\254mh\265\134N*?\233\007Zn", 300, "\202\252\261h$8%\335rv\260\0005\313Lj\244\262\342\202\352\277\005 \2418\2740Y\333\036\014[\015\030'O\351\377|D\0114O\344\203\177\360\337\3610\315\323\2528\247\307\3535R\366)\033\236", 64 }, + { "\301\357\263\261\347O\344,", 8, "\216\376\312\271K}\224Pt\022\2572\230lR\177\340m\224\271\305\237Z\374\252\204\313M\307&\330]^W[\001\317\207\264\305\017\224\331\245\361\301Z\371r\264\223\202\201\353\252k\223Bk\361\323c\307\255(\010:x%\257\3352", 300, "\312\240!.\3606\236]\235\315\2409\042?\027\015\271\030\352l>\272s\345\340\231\317\263\306W6[\342\360\307\305 !\357\003|g][\275j=ptx\344\265\271~\036_\361\004\246\261\313\241D)", 64 }, + { "\257\000;+\233Q\214b", 8, "eoq{\270\246ua", 400, "\251B\370\245m\000>\134\007\256\373\001\251\262,\310\367\376\323\334{K\202\177\235\376x\365D(+\367\361\373\031\376\254H\243\305/N\267\205\2108\301*\025@\030\311\012.\261\237\377\015\205h\261\042\372\034", 64 }, + { "hU\325\246:obb", 8, "?/\352\332\327c\027\331\305N'\321\355\337\316\241", 400, "\177\312\2275\203 \026aNXF\010\377\336=\240\025\312\252r\01363\234\351\2754[y7E\334CQ\371\243F\010l\2545\253\214\341\323\300u\202\225\236\250\356\007Q\000Q\302\207M@g\350m:", 64 }, + { "p(\256-\313\020{\300", 8, "\334\310\227\225J\356\360\307!\353\023\332|\214\306\036\026\253|-\267\341\321\223", 400, "\267\250\271J-\265\303\247\337ib\237l>\352\344\302\3321\3006\240\233\232N\2661\236\022s+\300\1342\375%\251Yl\032kK}\227T`\364\233v0|/\217\026\032\261\020\225\335k@`\021\227", 64 }, + { ",\032\034\337\304,\340\334", 8, "\011F\350\213N\0058\212}N\267\007\007E\276\203C\315\332\013\030`\372\030\370\001\240\030\354@9\327", 400, "\206A\034\355\042\030\025\220\000\251\025`\356\372Fr\313\246L\307\255@;\366\354\346\362\206h\023>A\271\273r\036\224\325Q\246\2527 ^\014!\240:|\335G\322\333\032\005ok~\371\372\255oD\257", 64 }, + { "H\322\305\000\020\341\365\243", 8, "\330\313R\037\276\004\355\327\363QH\327\364r\305}\014\370\007B\252xS\345\003\346\202\366\250\375\237\315 \205\355\214Rj\037\365", 400, "u\346\0049k\347\134\211\023\330\015\360o`\217\266\234\012\007\003\270\025A}\373^\366d:n\344\000PqM\314\200\213<\204:N\0279\323z\337\271\031\337x\0007\352\220\032b \303\346`\201\2729", 64 }, + { "\236\271\202\214\310\003r\323", 8, "\020>\356\364\222*\307l\337\312\351\343R\273pxL6|\305\324\362\273>\332\245t\3267\212\276\231\310\343\243\034X\360,\224il\313\374\217\2407\134", 400, "\224?^QsO\227|\332iTx\204=g\360\033\352\240`\330L\212\276(\201Dx\017\216\016\231\307^\204K%^\327\360\257\236\005j\010\233\371H\203n`zx\230cH\320,M\315\344%\215\024", 64 }, + { "\353h~\2307\320gN", 8, "\235H\252\037+\014\003\265\235*v\020I\376\207\331\222\266\274\0270tb\341\276.\306w^\331\270\263k\341%\270\200\232\321b/\244\310\016\361\316\362:\375/\371\255B\307./", 400, "\221Y)\236*\214\226e\360\324\257\367\230R\014_\314\214\236\027O\004\305\370\317w\257\260\001w\245\003P\371\335Y\240\227\365\243bh\254\372\247\375\301)k\255\245&\262\036\374_\026\224\326D\220\336\246\351", 64 }, + { "\362\023\013 \331\240-M", 8, "\353~\003\260'd@\026_<\301\360]EU\332i\336\177g\347\313\232\337\3562\010\250\345c\235\265\236\343;\322\302~\317\371\002~\027\012\332\301r\014#\322\004\353\261\275g\263\017(W>{`\322P", 400, "SA\003b\271\034\227\224gN\023\203\207 mW\365\257Nz\267wn\016\221\017g%(n\256/\330\311\377+\335\261\343CA\015A\272\352-\345`\245\370W6\020Y\215\2212\000\272\001\022$*\376", 64 }, + { "\250c`\236vN\302\210", 8, "\257(\256\0171z\243\023\042\134\363\223\252}GzB\307\261\220\301\270\027\327\326\353\253>\313\276\006UAd\355}\276\320)\375`E\353*-\370\226\370\021\004\203\374e\016e\275\202\313\227AP/?5\260\225\217\243\276Ag\377", 400, "\203\022\352c\27522Z\265mo\224\016G\376/C\026\000{\0201\015(\224\005!fV\262\204N\265\206\202\336\255\362\036\015\330\241!5\247\035rVG\346v\301W\306\204\335HS\371Tlq\207\334", 64 }, + { "\327\002\265\344\005\337@O", 8, "\233\317\326\221:\2409Y", 500, "\134\021\253\352\370\313yg<\015\200\022b\317Vq\262\220\257fL\315\302\201\266\036lxQ\371\021 J\337)(2\346\017V2\310\217\030\274I\357\215\2115\277p\351\236\012\272\346V:\317\003\326\2062", 64 }, + { "\320u\027+-\245\0217", 8, "\216\257\376\3147\035d\300\366\365\315\320w\304\236$", 500, "\001_\134H\237\352\244\340\034\274\366\034H\321\311\216\255R_U\263\221\206J\301\2641\304J~\274oH\007\340\246a\313\204>\216\330\311x*<\334T\216\251S\322at\360\234\243w3\033\2061PL", 64 }, + { "#@\256\000\333y\350\327", 8, "Rb\213R\263\262W\317\333\354\261\340\246\26119H\334\277U\253\266C\247", 500, "\343\224\023a\337\367\347\276\245\310-(\363\021\271\221_\360\245\233\356S\236\363\027\212\0046*\244\376\3032\352\007\023Fs-\332\203#+\355\244\33654\205a\200\302w\314\335\0157\212S\227\271l\202*", 64 }, + { "\350e\303Y\257\366M\223", 8, "d\311\323\036\030%\266j\372\006\016\024;\344\350\256\234\026\341el\325\270\236\226\020\312b[\212\353\343", 500, "F\026H&\347}\264@\307\246ap\356W\272P\023\254\204/-\006\337u\230K\221\204\312h\337Q\021\037p9\222U\032\262k~\013e\017X\134/\243\264>j\251=DBu_*\350Z\260\010z", 64 }, + { "\277\212\2413\001K\016_", 8, "\005<#\022(`\277\021/J4~\363\354x\207\271\211Ft\233\026\252\326:\236", 500, "\220\344\307\355\203\332\013\207\2504\364\207\303\026\316\251\026X\367\373sN\225\2540\243\006\233/l\224\370\310\346\352\227}K\267\223E,\010G{e\270>})\274\312\001\3350\311\261\367?7\251|i\243", 64 }, + { "\271\035\035\334\321\366u\304", 8, "\325L\272\252\211;\134\014}^\270\007<\316[68S\361\3264lA\240}\025l\032\265\036\247\227!\035x\354C\262[\177\320\324\305%\333{\317*V\220\027\367\322_\234\017\253]\024\347dDB#>\373\003\216\347\333r\220Z\334\301\346\356']\323 \375t7cQh\010\004v\2253", 64 }, + { "\275\303\226\316\005\315-\300", 8, "\223\241?\356\014`\255l\337ad\241k\345\355\226\334\266@\217C\221\237\005", 600, "\312\375\227\367e\311\261\367\012\304\303\372K:\226\326\010E\235\355A\225\331j\026n\3264\303\301\324\214YnM\261\310\020\002bi\324\311\247\011\237{;\013\216C<> \017-xk\370\265\303\333\311\014", 64 }, + { "J\242\213\023\026l\3506", 8, "\303\020\346\376\230\303\347=_\355#\0015\363\345+\233\216\203l\347rSa\272Q9\336>\034\257\233", 600, "\3331\377\232\361\326D\362V#\2124l\237\327\215\231\375%|)aM\037\201\030\027\341OxFU<\306\302\355fO\326\325\242\177A\254\316H\247V\227\342\032\377\002\256VY\220\303\363\206[j\222\226", 64 }, + { "\222\360%qi`\034\316", 8, "\370Hx\232\025]yH\337ys\310\032f\317g\371\315-zT\225c4\033Uy\021\314\013\337\260\247G_4s%\261\004", 600, "\336lk\337\003M\223\020y\344p\356\250\000\301z\337\263.WN),\335!\375\227\210\367d\263Z\214Y\330\333\264\030\004\326\011W\005\323\3448\354(^T'\200\255\301\320\012\355F\240\271\203\012\353\313", 64 }, + { "0\015\376\022\354\343\255/", 8, "\304\347\345\335\327g\331\204\343\025\246\030\247y\365-\266\264\361\212\366\211\035\216\276+\235<\371\321\226[\250\336\346tn<}\247\2076%\231\373\227o\351", 600, "\201\306eLu\262\032\355\246H`2\246\247-\007\217H;\017\370\277\237)\275='\001HG$\134\223N\000\335n\304y\272\205N\2265\310\305o\250# \235r\312\236\217W\324\360\323\007\351\215\232+", 64 }, + { "\030\253\370\026\377\013s\252", 8, "\337\202p\313\334&[ql\346\042\350\016\272+\322|\004S5d\223]9}\250\253EW\357+\215\315\255\246\023\352>\274\001\027\231x\225#\261:n\342\012l\253\005\036\134\327", 600, "\223\241\274\227M\2322t\205\027\016\377\267\015\350\012Y \321\217\000\305\305Y\322\301\260\316\230\200\003rQ\235\245\177\003\305\342\022Iu\375\323>1W\002\013\321k\264\334?\225:!\377\014\331\206\270\371'", 64 }, + { "a\033o\014\314\261\004\243", 8, "y\340j\235ZH+4\023}\372=4\262\303\213\134|\220\252\255\0014\021\262\355\224\212\312\341\277 l^\021t\261S^j\007\313N\005\277\340\224\345\320\346\226eH\042\313q\271i\317\023U]B\331", 600, "\355=1\261\000\236>\260t@\241\370\305\323\2139\016\316vb\352\2533\336L\015\371\321\265\211_\273\177c\311UAa8P\263\017\272\037\217<\201\327\205\002IV\227\034\273\002\002\3312#\243\225\327b", 64 }, + { "[$\035\042a\220:c", 8, "j\312\316\373\207\241\335\304\0327\033\263\274[\305\234\371\224\253\012\266x\340\224V\230\335\374l3\320L\252\306qA\344\3069C&H\265\211\306X\347\311:\376\223It,\251\300!h\24791\371V\007\375\233J\032\330.\236U", 600, "`l\213nT\353\237\304\251I\256 >C\231\000X\377\332\206\204K\262Z\353\327\022\265}\245y\232\3368WI\332/\213\316\042\371\200\033\0378\322U4J\363\360\357\350\361*\367.>\363\377\334\0232", 64 }, + { "\354\304\015\017\355\240\021\276", 8, "\247\274\225<\353\357\376c", 700, "\374\221\245\277Y\007w\274\375\266'l\316\243\333\312\223\257\301\270\303K\337q_\331\354\347\376\012\223\275\344\001t\373F`\235\302\3108W\332\205Q\223d\004\207\223aki\277\307\313}\326\254\234v\042\341", 64 }, + { "IZ\367\257\273\377\332k", 8, "i\027\226\010\004~\257w\273?\222\224\212\274 C", 700, "\253\034\346./iA\3661T32Zw\312\266.\357\034\032\202\213\332\320\356\356\327\275\217\251\326\356\042\377^\270\362\346W\367\353\237\331B[\021\034\310& Me]|\355\274\207\325\372=\373iR\177", 64 }, + { "G\334S\242\304\334Y<", 8, "\330x<\264\323\016\237-\300\231\260\364\210B\314bW\255/\235\014\277\3450", 700, ";U\042\252\241\200\357\247\366\020?gb\0358\231W\354\331\377MS\273 F\3361\313\377\344\361\004edjn\276\261[\0221\225\017\3731\203`\350a\301a\005\036wwQ\034m\323\226", 64 }, + { "T\236\334\030&\300sl", 8, "\006\377L|^\220T\213\307-f\214\024\215\251\366\224\240\250L\364\346=\224\001m\206D\335\375i\371.\261\3026\364\270\225\320", 700, "|i\376\031T\307y\012)\250\211\242c\200\244\370\232\212\206\316$-\031~\274\264\302IJ\243\356\367\232C\314c\013U\037\236\305\313\264\207\322}\273VHX\300\321\002Yi\237\261\345e\031\005{L|", 64 }, + { "A\313\345\257\373[@]", 8, ")\227\310\042\306\361\235\256\363y\337\341\265\3144\344\012\342\3540\260>\343\246\214id\013\254c:\203>\020\365\267x\243\013B7w4\235\267\015\330,", 700, "\0428\377Wc\042\366\266\227\254\030_w\263g\202\376\326\267\253\336\265\353\026\200t\017\354l\227\352\314[;\364\263\361\203\215\220\374.\272\042:.@m\033\250\274}\3646\000\330b^\363\364\327(A\015", 64 }, + { "\210\332a\312\367\024()", 8, "]\215\337\017p\215\251/\2747[\206\312\314Zk\267'\324\223c4\265Z%\315\210&\014\021&\262\270U\274@\374\221\0262\2720\3360?\274\214\330\302\373\240G\205RwQ", 700, "0\3646)\364\337\3250\333!\010\356\306D\241]wn\353\303\265:\374\315~6C%\250\346\234\231\367\330\367\220\221\324\255\221\375\344mc\271+R\324\374z\027\237H?k\343\211\022\014\375\134J\256\014", 64 }, + { "\305\354v] \232v\253", 8, "9\230\361c\001XS\355\303\361*\366\267z\363\226\237\331E\336\222#\305\037\326\005v\336\375_+=\277\212_\0269!A=\235\007h\254\370Z7K\346\277\246\360*\015Kb6\303\022\224\322\026M\313", 700, "\253\232\256))\226\212\353\237S+\307u<>$\3440\367\363v\222\250\321k:\323^\234P\351\236f\205?\003F\326\016\355\311\244\023\346\321\243|\256!\273\2243y\226P\026\323m\250\306\360Q\267p", 64 }, + { "\001\363\342\257~\177S\275", 8, "B\012\033\376\003<9&\264 \214\003\212\001j\004;/\321@\231r\267\024\302\270\344c\0306\262\215\205@\263_\360\033j\3177Z\220\042E#\206\231X_}j\012\340\365\325\336\376D[\273g\366O\377\300\265\373\256\203\2779", 700, "\013\331\003N\240.\215\336\022\230\317\271\042\376lv\311\036\305[f4\351\314\237f\323e2u2\272g\225\261b1\027\246>\251\235\261\326$\243\201\342\250CG\224MY\3737\225\312o\355TU\032\275", 64 }, + { "\017\327\331x\230\001\363\353", 8, ".\331\317\373;\330h_", 800, "\265udMk\214\004v\236Q\366c\336\020\010/\243\236\262\020\320\004\016\241\371\242\232i |)\240\305=\266\316\201\350UAY$J\243\230\267P\377\011\000o\033+\211\236\020r\356|\261\317\033\355u", 64 }, + { "\032\276\352\212\347\313\231;", 8, "\311\365\134;\311+\024N\037\134\0020\362\354\324x", 800, "\276\004-\013\036\334\372\350\311\270\306T3\014\230\351\015\230^@\330\342\304\324\034F\264e\367\013\273\355\251\260\271O4\257\020x\362*\354il)\363\201\017\232\032\344:\312\037\005\341\325\3720\326\366\002b", 64 }, + { "]]Yk\304T\222f", 8, "H\031\273\324T\210$\267\222\324\027\270_\2514\214\347\317o\177C\272\313\012", 800, "\325\007\134%\256\3015\242\203%;\261\350\324!\262\367\002H\177\355\247Mk\042m\373\263\306#\301\3472\354\344\353\031\346\246\017\202\342\306V\005D\266giX\205\012\016H3\231\344bn:;v\225,", 64 }, + { "\346\320\306\0348\265\356\000", 8, "\376S\210\356d\366\033O0\352\265\314ZV\263\3701p\023\262f\227\356\025\361\002EV\204\337\304\206", 800, "Z\2104\306`\244\211\342\010\204%\343\240\207VL\375_T\342\360\031\017\257_\207\345\327\014\347Fn?\331QY\310\375\334b\244\337\241\003\370\202\0356!\305\326z\330@\201\0241\244\332:v\371/\264", 64 }, + { "r\206Tl\304\226\231\356", 8, "g_B@\2277\267\027l\314\247W\306\346\221\226\223\201\013\263R\245A<\024\177\007\230\222|\216\331~\233{\350n\244\341\362", 800, "f8ma\263y|\237\2600q\021'\276I\3642\276\344\255\345\032\270\273\032\262\365\026\004\364j\211x:\330_\207\250\336\311\016g\376\261\366\307\345\223\204k\362\355\252l!\357X\211\003\035L`]\341", 64 }, + { "\016\320!\037;\311\210\213", 8, "\347\042\302\3575\315\031\013\267\340\377)\031DY\177`G\316D\251\025\327o\311\233We3\236\022L\017\354\314\342d\207\343\017\345\235\010H\210\225E\345", 800, "4V\003\007\215ht\377\262zSoW\277\3314\316L\376oAw\367\015\224\304\201\2176\277\375}9r\042\304hZU\374\306\202\205\354\2167M!(\371]\313\357]\233\005\345\256N\252]\177Q#", 64 }, + { "\347\274e\2157\327\016 ", 8, "\272xp\134\303\305\032\372\217\330\225\227\354\372?D\027\354\212\376\311\236\260?H\362\257\006\261\003\350|p\266\331R\363\036{\332\335t\021\327\213.\253\202Ss \335\252#*%", 800, "\1346\322\026\247m\011\012,\203\263\2449,\344\250\235\360|t>\225\277.Z\215\037\226)5\356\345JV\334\234\211\357c\024=\2534\257\026\225\005\023\221\330\275\010\246\011^\374\034A\246Pd\212\234\317", 64 }, + { "Z\207\036\243J\207\322D", 8, "\323\326\355\204\245}\341\034\322\331\364\234\240\241\260\2203,X\355\362\335O9^V\212\373;\214\342\334\020\316\234\214\324H\317wH_\313S\257\335\240e\007n\372\036](\317\024\331\231`\031\023\002\243\033", 800, "\224\343\262\023\213\042XE\317\300\260\327\316\217{{\322\307\234yqc\011BMd\312\373\375M\323]@X\3400\012\2175k\235_X\307a\134\023\376\035\323Z\312\011\376?\346\006C\356x \332\323\227", 64 }, + { "4\324\256]z\277\006\304", 8, "Os\324\324\223\211\353X\217\245\344\317\334w C\265\024\371e5\007\235\230\364CH*\036\243\251\222,|/\270+\31386ywY\202.ByB J\245p\237(\315\024l\362\240SC\352\261D\24176\026\024D\023u", 800, "\014\217}\334\346\012\202\320\323x\317\341\363\307y\261\134\355\0259|\237\224\200Q\002q#\232t\336\215\303\355\020\263\221\0257\205)\374-\316\271sj(\000\332h\303&\003\323%\3052x\035\230\3673\267", 64 }, + { "\2311\362\360(*\314c", 8, "\226\205\332a\235\200\177\002", 900, "\266N>\311\351\345\223>\327\365/\202\006\211\317\345\265z\001\276\340'\355\303QyH\367\311\042\032\350\331\012\034\261\327po\323\275E\317\000D\234\355\032\241\242\332]e\276Pk\264\000\211ia0q5", 64 }, + { "\020\277\212\360H>\226S", 8, "\333\342rh\323\302\366\223vK\376\004\340\213\316;", 900, "\344\254\354@\367\243\012\310\303\042\263\330\230\230\307\266-\011\134\024\221[\371\320\324\244\375^S\314u\303\335:", 8, "\035)\304;g\254m\313n\232Rn\276\022\264\317.\210WB\272\026M~", 900, "[i{\304\237n\213\314\375\2223w\134T\257\027\265\307\015\264\016\022\245~\250\031\257\342w\211Q\242{\012\370&\003P\016\311\032+\235,F\260\362\327&2wxw\030\277D#\365'c\216\303A\356", 64 }, + { "\324\210\245\303\375jc\134", 8, "\003\042\006\004.8\256\321\013\216'\227\210\353\226.\364\037\300\351e\206\357JY\201\254x\015\352\023\212", 900, "\2727$\177\202\237\0142`&\034\321\224P\3620\013\367pg\371h\315 \134\227\306\241\257\3333uS\025\206\030\2704n\013\354^\032\034\266]\024\254\000\256\356\2356\331nz\263\310Q\2178\201\310\320", 64 }, + { "\322;F\214L\230wH", 8, "\330%\316\307\264\310\375q;+\256*\315h\300\274\215yZ\320\360\203)\353|\310!\016u\260\350\222\323\177\303\226\212o\3255", 900, "m\267\007?\353\220\220$\231\316;f\201\253X\312\320\006{\307\014\334s\3257\277[^\0055\2567\134\270yr9A\342\273N\217i\374\314\364\301\312\335G\036\014R\341|w\323ei\226\014I\034C", 64 }, + { "\345\342>\335\2457/,", 8, "\355\262\340\201\134\012o\2011F\234^\321\211\216w\207\022[\361\310\004\236\256`x`j^\263v*\2250\336=*\340\017\317R|\00164\353<\244", 900, "\004\240\005\275jv\352M\360\350\036U\306l\237[\031C\224\205C0iT\370\242\011K\042\030\333\375\302^\255B\301\354\310\240*\323\257\310\222\240\354\233\221\346h\311;\214\321\240\341]\363\326\335\022\216\224", 64 }, + { ".\245\313\031\277\374\042l", 8, "-]\026q\347=q\004<\002@^\242\277\355\212\334\337M\304B\351\015:p\323!lA\357\204\206\364*N\317\363\016\016\230D6\227\337\347*t\243\177\021]Y|\240\035\006", 900, "p\006\336\010\351\337\304\260\372\210\267\013\231 t\265\231\274{%DScF\3726\320\205\275 \011h'\251B\363\323L\014V\260\362#z'\233\322H_\306t\273\027\353\272\021f0Q\222\244\0316\225", 64 }, + { "\014Y>\242\331\270\367G", 8, "\222\344 \364|\347CP.9\372Tu\341n\014\333\321\034\204k4y\312\314\363\323(\221\365\023\032\342Y!\010n\273\213ot\346\310h\304\220y./\235\342Pg\214\037\217\352\316\374\276\3740\256e", 900, "\211\042{m\201\233_\3020\350\237<\315\272\256\200\010\323)\210\210*\042\200~\266\343\177ic\212\300\363L\215\271\022\2609_\361eWbF8\203\271\363\214t\272\275X5\011\355<\2233[T]P", 64 }, + { "\334\023\304\233\305\200\206\272", 8, "\314\332|aD\003\341\033_\3733\374\263\042L&9\014g\336\253\355Ir`\004\014\377\306\2031\212nX)uG\236I\021\031\337\336u0m;\3126u\332\025Q\370u\303$2*YH\211\343Z\3628\237\274\2061sw", 900, "\005Zx\257\262D\357n\005b\014(\012\277O<\313\361M\331\373mB8\031\215\035/\247\005B\343\346\305\337o\024\275\357|Y\235@\221}\202M1\0325\306\325A\253\250\241JY\326\255\032\272\314c", 64 }, + { "Z\270\301ED\237U|", 8, "\0272-\237\010\275\377\042", 1000, "\360\355\220\212\252\371b9P\343K\301,\024$\227|\305\346\327$>\215R\243\214Vs\273W{\306\234x\347Jlb\211\355\321\310\015\002\267\352[\210\335Zl\341\023\236u{\225\264\027\370Wc\343&", 64 }, + { "\262\3435,q\037^\014", 8, "G\330\246\256\356\260\201)P|\336R\254\301\265m", 1000, "\314\320h\267\227\350\034\216p\334\250\372\230\300\273\220s\352K\341\347\253\317\321\362\042R\311fN\177S[\376b\354@R\320\010\251W\374\256]\243\262NO\000\206\347\005\306`\215u4/!\365\025T\026", 64 }, + { "\033\341\202Z\263\274s\025", 8, "\317\320\367\371\200\035\361Z\240oE~t\347\300\227\330V]g\337r\316@", 1000, "\234\313t+9d;3\226!\325\256\242\211`\323\030\352\336\377\306\215rZ\263#{\306\037{7\307\203\325M\032\031Q^\260[8$a\272\215\337?p\022A\335n%u\214\232\303^\352\241\251~\247", 64 }, + { "uc\214\232\3031l\300", 8, "\013(7Vl\341\013JA\276\222u\345\271\363\015\134\317\340R\214\335\312\245\264z\324\326\366L\344\250", 1000, "'\352\216\246\314\215\365\333%\334\202\342\334\352\347\211%\312\215(R\312k\246\330\207\223\004LhVFw\374\322\331\275\265\334k7\343\013\312\010_\264\362b[\254\366\226\224hvgG\307\200\347\216\033\036", 64 }, + { "cD\020\266.C`u", 8, "\247&^M\360@\266Y\365\322'\367\262l\376\250\042KU\360\237nOl\207\346\2520\203\0428\003\332o\344\0046`\226a", 1000, "\241u\001\027W\202YT\341\275\204.Y\242_U\016t\003\025\001\340\304\213\364L\264)\023\346\031(d\234\256\313\204\260\262x\220N\017\274\340\315\000\276q\017\001;x\375v\004\025\300\276U9\336\260\375", 64 }, + { "a\0162\201\011\221d\017", 8, "\256aW\215\327\374\235\334;\303\032\021\037wg\306K@\001d\213L\244>\343Z\234u\336\313\024b\344`\233\271\234\333\365\305Z\306\0218\310UK\306", 1000, "\304\023e\243|\032k\320ni\270\002\252\306\036tZ\015j\373\340\331\207\245\347\032\261L\354kh\012\356\363e7\015\334\352\206\036;\320~\331\260\330\003\257\310\244\364\244\370\305\233:J\363\367\324\362\025[", 64 }, + { "\324\304\265\306\270\217\276\015", 8, "\276\027jRk0X\215\227lG\236\240RpJ\220N\005\250b\345tQ\221h\321\354P\371\035\244$\256l\023HZ[\031\255- O\236\222:\267t\254d\313's\317\024", 1000, "\250\316\327\215\271\374\206\207\220\351D\263\306Q\362\366c|\273VQ\241\016\377\004n\314f\215\253\305\321\350\236.ZjX\037|!\314m\331\3775\011\034n_\263x\267\345\241\322j\230l^G\334\256L", 64 }, + { "\030\302&\234\200)\230\305", 8, "+L\221:5T\274h\237\256q\323\353m\333fh\201}Q\351*\351\240\267\276\327\007\254\316\214J\342\350\351\367\367\266\301\010\3775\015\014\351\337\3264\355K\027\355\327m\300\241@?#\232\225\263\037\007", 1000, "\201\355F\216\035\037@\350_\232\325Mx5\353\004*\372\250\370%X\247)\315\324\314\256\315\242}?\373L3\346a\331\302\134\334=\237n\275 \330_OZ]VW\007q\312\254\244\276\024\034K,C", 64 }, + { "?\362\015\253q\331|\250", 8, "}\020\020\337\215V\263\334p\346\003G\363\301A\333\134\177\222w\271\262\306>m\2774\343\006#P\260\306mS#Gs\250\363u\230\227\377\015\361\235\336\273V\230\316\214\276l\201\272\241}\361\260\357Aw\015\263\246/\366\026\375\037", 1000, "u'\305L\233\270\032\326\225\2422\323\347\335g\374\270\023\352E\305\332\240\231\244\035\343\226\322z\264\346\354M\036\211ye:A1\257K\236\215\333B#BV!\333\245\336|\217\317P\257>\257\265\252\003", 64 }, + { "(\134\324\014\245*\260?", 8, "\263nO\374\320BL\042", 2000, "\354`\262\357X\301\351\240\333\374\3536\307\367A\273gVR\366B\1775\217_]\214\016\2641j$kE\201g\270,\276$\213\205\250\237\005\211D$\351\241\334\222\337\326\360\372\277P\002k\224\235\2137", 64 }, + { "VC\260\247\227+K\325", 8, "\214y\202\334\330\323;\206\274k\026\333#X\247H", 2000, "\005\366 t\203\277\030z|\241z+\222\344\134C\306XV\367\042\032Y\2074j\211\034g~\013\263Z}\354d\342\246\005\011\250\230\244\222\336(\224\320\320\221\237lj\227\003\345c\311P\023t\000\243<", 64 }, + { "\226\264\332\250Q\332\033?", 8, "6\177z\010St\034J\240\224\003\367\252I\322/\034ZS\243\322\307\374\311", 2000, "\225\325\364`R\004\354\021\306\2123\337\341M\273\023xsu\030\210\267U\375\011\223{\002!3a\031\254\247\200\302\265\016\277\301\235\024\014Vj\363\022\367H\224\372\205\337\302G\035\351\257~\316\371\252D\342", 64 }, + { "\347\016\225\220\026\324\301Y", 8, "\351\314\237M\230\305o\321\374\374\253H\236(*=1\364\203\007\210\344\001\245\2736\022\340C\314\265\224", 2000, "kN3z\003R\340\020D\033\221{\234\352\211\201\315\356\017\234\370\270\214\035J\335KM\255\200I\010=:\3512\030\260(+\257\276\275\001\361\263j\030\002\224\352\372\031$q_\023\330\333\021\233\240\222x", 64 }, + { "\340r\267}u]\377\350", 8, "\242\360\243\361\363\020jX_g\376\016X\352dF\022;'+\306\213\375\036\224\214A\242L\022\334\025\231\015\267\305\001:\032\270", 2000, "\230D8\251\010\031,p\016\330\310\233\241O\031#\310[\324u\261\207\2042\361u\310;\366\342[9\201\005\037\20261\316\351;&\273\325\263\305\325@\251\027\343Ak\225\270\014K\342\037\015\305\247e\231", 64 }, + { "\013n\007\254\357\255\217\340", 8, "\334\015\217\312\237\315sW\026\357{W\321,\031\034\374\023\2720y\251\235q\030\2170\357\251\366\370\364\312E\205.w\273r\242`\246\005}>,\231\250", 2000, "w\210\363\2605\020\134\374\231\024\327\314\205\310\325\247\033%\322T\226\271@\302\004\266q\304\345\326\275\347\260\322\361\2435\344\010\356\300%g\307\217K\0423!`R,\005\327\201\0037U\266\2705\275\343r", 64 }, + { "\202\361W\024^\252\307\235", 8, "\356\247\020\315\037(p\361\006\223 \261\035\332b\222m\236\027\367n\020dw\323\247\3017:8\034\256\302\363\263|\273\134TF\260M_D\3418h\237\365\260\262\257\007\344\231\351", 2000, "\327G\376I\211\335s\3060\367\277\200\015\270\327\351\023\3539\245\203\356\244\367Y\244\340\277\207\235\360\027\347\352\343.\301\3570\347\330\324\352\353S\242>\324w\213\271\262\013\211\250\035\261a\011\271\370\034\3633", 64 }, + { "\207-J\204\243\334\335\016", 8, "\261\134\241\340\024\3441\306'\32061\256\202\267\232\370\2327\257\357\342R\202\326\345\300\362Cp\315!;\320\305\240\013Zm\234\343\217\373f)#\223\343s7\320R\342d\224\027\212,+\304\262k\243l", 2000, "\271\317r\177#\201M\306\320\314\317e\236\042k\031\032\242W\364\321\255\026YkJ\371zp`\337\264\212\253x\034Ef\2003\214-\370o\277\305\3671\355\013\320C\247d\214nA\273!C\375\025\2218", 64 }, + { "\300H\213\371\272>\337\241", 8, "\001qO\241\310Gs\274\036\375\272\362\033\014\256\327v^\037\321\246\277e\224\300\235\231U\367\316'\014\327\232\265Z\033*s\302\252}xo\374(a\231\355\301\0350\021\231\024F\177\276\341\221N\316\025f\320\324\134\247\376\335\274c", 2000, "\301\360\262PJf1\243rl\320\364\320\017\312@~\240\031\206\211\261\330\035?\314\356\253\263>\016\252wt\341\213\001!\014.N\264\350\377]\243\234\245\354\325Au\353\227\236;L\333\332k\340\343\352z", 64 }, + { "z\015\256n_HF\264", 8, "IO\305\325\253\232\001\022", 3000, "\021\032\252P\005v\354\234q:\204\326\203U\2162\246\371\343\340b\327+\037\330\360\241_\215\134H\214c\373Ix\364j>\036L\016\355i\226\034Q\370\320'\320'\014i\336A\210Z|D\200\006\006\202", 64 }, + { "\027\035\353\321\372\222%>", 8, "\375\3772\334\316\222?\333\300\325\265\005\360\361\347F", 3000, "\231\0011>Jk\031l\324q\271\2308\316\025B\362/JA\010\370\021\377C[3\016G\260/l~\042\350_8\252%\373Q\275-\263}>\356\330\337&\005\265L\353\377\021\324~\255\371\346\316R\204", 64 }, + { "'\331\374\255\355\315\206^", 8, "~Wx\355\211\365/\372@\022c3\337\311\233\253\007\215j\356\264\254\321\032", 3000, "}\344w\013/\000n\371<7", 3000, "f8\205}\321\371=\330\3410\034\030\354\323\033\270\333\227\320vUS\336\305\010\332`\306q8\351\027\034n\372\356\363$u\376@\017\244\3467Ft6H{\264\345\275k\302G \334\202\275\257\375\242r", 64 }, + { "\241\364\000\231\250^_\277", 8, "R4\332\217\332\374?\341\030\277\345\025~Q\364#l\307\273\331\357\0352\361\373\246\320M\220\250\265EP\225\221(\236\026\332\272", 3000, "\177\243\277\322\005\134\016\015E\251\300\205\250\352\366e_~\377\251+\223\011\021\326\042\033\277\267\206\037\224\231g\260\031_V\341.\300{\243-x\025Q>\177u8\223\177\032\201T3\360\033\336\201\255\234\024", 64 }, + { "\020\011\277\006(\215\353j", 8, "\215\341\262\207s/M\323\274\341\223\322q\215t\177\225\246\367?\326\245Y\330\026\221:\370`u1\305\377\261\215p\311[D\0229\200(\205\216\341\247\230", 3000, "\236\022O\372{|'\313\011\216[d\364\210\030\36249\2122\266\221\022xD\266\363\207'z\215t\2448\007Be{\272\244\207\251\352\365_\353t\333u\355\317\327\327\205\222\250\003\330\201B\023\004#5", 64 }, + { "C\251\361u\026\34102", 8, "5\343\200wqFK\2739\260#\224\301\256\323$\247\033\272\322\346_\227k\274\250Wzt\3062\134VI\202\234\325fv\013*m\003\355=R\366\214\233\305O\333|\200\376b", 3000, "\030\177WT\007\014.\134XcB\245\202\004\363\021\313E\344M\216\332<\330W\360N\314\134\341\255\030%\031\323\024\035\312O\370\213\017\263\034*\261\344\031\356\237\271Oi\213.\276\315\314\367\222\212\027\024W", 64 }, + { "\311\254\331ZS\226@L", 8, "\013\320= \345\032S\317t\255\2550\245\3062\232\316\241\002\235\333\015$Lx\376\026\334K\010\360=\237*;\007\134\3506O\352,\037\322\342\013", 3000, "\344\202\347\365^\026e&\200\260\214A\324\264\022\313\225\351\033\254\254o\357\255(\215^z\034\200\220\312K\301\240\227MO\030\231\366\020\031=\203\012\224=\024\004>\316W2:\363D\365\231hy\366\365j", 64 }, + { "\134#\216 D[\241\223", 8, "\017P\274\200^(R\220\266g;\211Z\265\036\345\337\360\2310y\031\330\206rF\253\254\375\271dr\321\367iT\304\2003fV\367\333\264\247\2370S:\377&\216\360yfs\202h>\327\347C\261\345\274\357q\037\331^\305\134", 3000, "\177\373nj\013\324\202\021\035]!)\370\370%\005\353\016~W\330\265\217\362\337\301Z\275\321V\000g71\335\377v\013R\335K\315\241\225\216qE\312\272@.\020\315b\247l\3359:\242\265\000)\310", 64 }, + { "\304\326\303\344\272\260A?", 8, "`f\262P\027'\211\217", 4000, "\012^\363\365\134\265*$\014\270]F\274|\375>p\341\003dT\242\337u{\314\205\307\260\360\322\025\214\007E\307y\365\352\310\240\372\134Fji\370\241\017\305\336\262\351\332\002{\026\270\376\363\266\134\274;", 64 }, + { "1\2004\011\006-\032R", 8, "\353\371\330A\261\263)\213u\007\233-\354\230!\202", 4000, "{o\014.\322\016\323\244\021\037&W4*\362\300)mGv\014\016\306\307\237/6G[\267\033\213u\313\266J'\276GtN!\000\216\363^7Y\037\370\021\014\333\250\374\332\274\235l\230\263\220\347\222", 64 }, + { "\354n\227\202\363\306j8", 8, "T\334\212\366\246\020\042\264\342r\271\317a\0047\322\317\354O\031\202\342\370o", 4000, "\312~\260\260\027\266G\247\236\312`n\335\342\262Ec\247\272x\001\003\252y=\002\362\362\004\326\350\007\0252!\263\312\360H\344\246\016\207vEO\022\205\212\306\276\251O\325;Gz\307O\266}\020\322\376", 64 }, + { "\360\263\275l\234\244zO", 8, "\335\375\273\001\261%\233,\007\350\255\247\342\235\310-\032\035\314\246\252\027+a\233f\204\274M5W\262", 4000, "\317\365.\214hyP\313\205\356(4Y\251\224W\367\263\361\027\262\324\277\255M\010z\263\314?0\025\003\367\332\236.\004\331\302\232\011R\332D8;]Dz`v\000\246\242a\247b\033M\031\270\011?", 64 }, + { "v\327\346&\035C\320\322", 8, "\260 ^\376\355\375\2567_\272\252\255Wb\376v\0057M\226\346\031\272a#Up\264#\015\311\342+\2128`(\224\224V", 4000, "`s7\365\307p\250\356x\310^7\320f\2442mm\242\0207\023\360\300\264\336\252.\266\244\202\134\042\311\023F\374\206\225'\371|\327R\371\277\357\307\304\250\352E\016\253\010N@-/9\257'\0235", 64 }, + { "\252\317\025\232\012l\372\275", 8, "\216\020\363\015\245F\277y5\254}\016'\272\204Rf\226\340\341E\230L\024\352\205\312\306\340\042\241\017\263\375\337\355\013\020KJ\273\342\3572^\313\312U", 4000, "\222\010Cw\275\317./j@\012\032LH^\222s\205\240\335\011\026\310\275i\246\264\347\305\302\365\302\336\221}R\016]\231\006#G\321\222\255\215E\262\272\013\202\260%~\027\350U\031\220(U\210\221\314", 64 }, + { "\035dQ9@Z\267$", 8, "\204]\013SSO\332\324\322\327\216\362D\203\253\241/\262\21093\374Z\213\001t\376>\207\024e\273\371.\037|\036\334p\005}\353\277'/\346\014#NP\362\2504w6/", 4000, "\252BW%6\265\317\000\271\024C\010C\202nYZ\027\006@\334\321\365g\371z\017\3469J\374\262\366\242G\200\017\363\313\223=\251s\213`\343\362\007\000~_CV\336\207\240\352F*\313#x\212P", 64 }, + { "\344\263\246\321\357 \003\347", 8, "aT\363\245-\012\023\032\333\253\3049D\372\033\332I\370\005o\267\177\340\226\211&\356T(\210\017\355\372\003\207\277F\012\010\221\213\274s\314\200xLST\260\375\217\013\331wG\240\343\344\347\347\301\324\302", 4000, "\324\336\003\003\337\337\215\354\327z\217\0319E\000\020\353\011\366\347\001\035x\3660D\332\014\276\374\2363\3635\026\227\031f0G#=\015\213\275\210\237\032\207\342s\002\263\2438h'\301)M\351\213\200\274", 64 }, + { "fJ\325L\311M\364\333", 8, "\2640\311\202\3471\2310\011\271\345\002\265\225\257>\220\277\205\311f_I3\247|l\351\222\341\353j\240|2G\035(\353\203\250\031Jl]\317\226\223\343\205]Z\324\356\245,\264v\030\333~t\035\220*f\027k\207\364Yr", 4000, "42\335%\022\372\310&W\2374\335bp\217\247m#\210\006\207\021\371\134N\306\335a]S\274\350y\247oZ\024\272j%\326\213;\324\273\347w\300E]\347%'Z\261\206w\2350(\265\205\301\302", 64 }, + { "\363\237$\002\006\023\357\001", 8, "f\327\370v\0061\026\200", 5000, "\331\303\025\301\344\370\222\004z\275\364\374h\253Y9i\027md\032\020<\042\017\250\261\317%#ne\303Z\324!\354\300\006\235\374[Y\341\036`\373a0\357\357\015\246\3464\352*'\241\272-\317\325M", 64 }, + { "\332|{6Q\346v\313", 8, "\134!gL\026\024\376\2430~\306\2743\232c\206", 5000, "3\325\201\34598\202\330\263Y\005\244\321}}w+\245:\274\177\255\365\265\000e7\375\312gc\261'OG\266hPp\365\250\364\042\333\373\323|\205m\005\2572\021\027\271]\233\360\216-;\210\371\274", 64 }, + { "\333\220G-\240N\205\232\303\177 \012\324\374rl\034", 5000, "U\342\2200*K\262\010\177\273\024\2455|\367\336\2311\225\366/\005b\305\345{\233\301k\030\023?e\250Cf\007\134\036:\377\213\027)\353%\323R\322:b\255Rqr\007!\020r6\305a)F", 64 }, + { "\234\004/\345\032\000v\220", 8, "ar\031\272\305\245\232*\007\247\025HL\274\010\336E+\311\336\2557\266\300\263%\3031\337F\227<", 5000, "\320\254\3477Do\003\227NL\334\355\217)\317\302\221\344\300\320\356\204\266\350\305\223\275\273&r\327\014\261\352\324@\356\032\325\221\330C\346\202\233\013\007\304\031#h\202\244L\207\236p\351\371\335\213O\341^", 64 }, + { "k\317u\332\217\324\322\216", 8, "\177Te\253\271\260\255\276\353o\223D\324\001s\317L\033V\242\247,\2566\233\206\313\315\014\332b\317\312\134\322\216\314d\344\344", 5000, "\316\021\033\027\375R\207\327\021\341\340\253Y\230\016\257\355\024\027B\226\322\346\025\017\2429.\336\2262\352\324\375\225\356\367\353\235\012X\011\361$Q,s\240\033\372\254p\202>\343\034^\303<\211\242\273AA", 64 }, + { "`\226\222T\332\377\223\015", 8, "\351\350a \311\352J/ \015\270I~3\360\2378\265kP\302\371q\202\3006\000", 64 }, + { "\303\327\253eb|\362\227", 8, "\30630\364^\006>\227\224\315o\217]aL\236*\256DZ\270<^N.\326\014y!!Ng\375\325P-v\220\341\206\315'>\314X\315\364\276\014L\324\212\374\354e\230", 5000, "\267\272\262\235\213^\042E\255\330\372\010&\012p\354nBG\344\246\266#t\300\237a\271)\275\010x\356b\274a7^\327\303S9s\343\203\236!=\332n06\241\312\254s\335\265\334\356\324\367\177\375", 64 }, + { "Z\3378}!\257\020\301", 8, "\301.\2642Q\250\277$\271\334M\307\250jz\364\354\361+K\322\275\343\242\322\021Z\2747\333\213\241\224\011\0320j\267\011\337O\023~{7/y\350\012_\202\331\216L\206\003\006\026iQ^\310\036\360", 5000, "\216\202S\222}\336pr\331?\232X\323M!\202<\372\263%\353\264\334\035\370_\323\363\217\322\014\301\177", 8, "\344\303W\177\317\032+u\032B\353\375\317,\225r", 6000, "\212\205\266\373(\344\246\213'\247\262\257\030vZ\355L)\242\375\353p\227\3250h\022Xg\356\310\350=\353\247=/k%\021\364\030\223\013\272-\177\277iX\005?\000\200\325\310\245\0137\247\365\034\234\007", 64 }, + { "\235z\200\0425D\206\326", 8, "ZC\014\243\032t3g\336&\0058\016`U\317\210K$\205\236\264\274\224", 6000, "\233__\371\276\213\263L\005\211\250jO\042\364m,B\020S9\014\332\263~`R\334\236\020\224d\374\037\201\311\327\262:l\221\315&\277\351A\251\262\000\012\200R\203\360\011\371.\373\323b\000\316\277\275", 64 }, + { "\013\216\203\231;\177\030\022", 8, ";\250\2605\215\314[\2478\314\343\342gM\352\211\020:\336\3271E\260\042\3444\274\305\234:\226\221", 6000, "k\255\012\344\344\350\306;fm\253<\277T\017\020?\234\215\216A\373\303\3375l\325\333\027P\301\006\214\221\202\375\342\240\213\012\307g3`\377@*F\3518\000?\010\002\021\005\023\227+E\177\363\022\236", 64 }, + { "\211\354\257\301\023\201\377\374", 8, "t\235\202\224\274\013\350\134Cnm77\352w\200B>\250\213\211l\275\357\234/\004\342\311\216)\260a\016B\216o\253&\317", 6000, "\304\225\214\273\016\374\375V\215\207G\264?/\273*\276\257\343\012\234/\025&/\017\331\211\355\016\351+\301bS\004x\017\326\252\032&\205\030\222\347\272\002\036\231\261\033\200\276\330\367\007\252\376\005#\217~\212", 64 }, + { "{\355d\364\020MGs", 8, "\324\301)\225SI\220\322\320\333\263[\375\2154\006X\303\014\275x\300a\313O:E]\011\236\134\203\344\220wj\231\320\300\015\222\321\324\177\341\320\237\372", 6000, "]\005'\026\210\036\250\037{}hs7\254d\327\243$Ch\000.\011E|\213_\347\3579d\342\321E\212\334\251~\231\221o9\006\323\317\013L9L\312\206\357\372\007Hv\234Q\311'+\001\276\034", 64 }, + { "DR\0073?q\272\374", 8, "\250l\002\017#4\320=p\032\202\257s\207\352\347I\373\244z\377jD\227\214IG\364\206\004\322\261-\217\305\301\214.\314\206\373p\341 TSu\323\377L\373Bu{\032\247\370\270Q\260\307PZ\337\203\304\235\004\254\354\322\363\260\001\004", 64 }, + { "PB\323`z9_2", 8, "\373\317\015\021\275\311\335\315\323\231\212}\307j\336::\201\343Y\210\042P+M\263Gh\031d1\034jz&\134\366\363\012\374\274\212\244\315j|\207\331 \345\312\027x\026\261f\016\311\035Mt\370x\243\323\3550A\014R\033h", 6000, "\134L\334\310\334X\035\356S\015v\243\242|\002\037\305\022\375\372qK]\020\300\226\001\334\310P\357\376s\203\225 \037\305\373o\261\020\303\264\370\256\262\337\237\251\273>:E\335e\260\316\246U`c}\016", 64 }, + { "\027\223!\256N\260<\200", 8, "\020\374\203\034\005b\230\201", 7000, "\302I|/\305\025\001\003\233\244@\332R<&1\333\030B<\010\3315\267\213\317\231U\225\303\336S\217\037\337\212C\202\022p\270\207o\205D\177!}j\221\215\027)\306~s\004h\323\342\336Z\252\377", 64 }, + { "\201\016\210\273m\345&W", 8, "\253\363\011\215\2646\222:gr\001:h{\012Y", 7000, "\244*>\204\042@\302A*b\010\024j\270\220P!\2114\327\031\237\304\231Lb\303\336J\325\321K\263d0\200\327\005l\320\344\336\353\323\012y}N\251!h\275\363\376\320\225\341f\246RE\310\2418", 64 }, + { "\276\257\256+\244\247\211\226", 8, "?\235\347\030\024\362ng\234\254\017@\033\321\331TO_\255\277!\042\233t", 7000, "\216I\365\206\200\134\002\353\213I$\327$U\275\240(\351\352\2738{\313H\202\275F/\322\013h(8\263\205\326\303\042\2621\032\204M\264hT\221\205\310\263\214\273\262\313\221\267\206m|)G\324\241\025", 64 }, + { "\2020\274j\042\224\231\221", 8, "\334\260p\216\333[3\014\301-\223\026&\315G|\231\207\205{\310\336@H\246\3257M\020\031\362-", 7000, "x\213\321\215\223\332\313\016\323\012\310\330?o\300\277\177j\312\220\255H\247&\366\232BX\232\352\362N0\225=\373\010\260\027'\271v\376\220\324\263\225~\354\035\277r\222f\221\260R\253\215m\203|$\334", 64 }, + { "\372+1\367\246\333\271w", 8, "`\220^\277$Y\341q?\315!\014J\221\210\242\232ySd'\354\361z\306\301\016\252\274\342\267sso_TZ\200fe", 7000, "d\224\227\252\306\204\012g\201\237\314i~\216\214QV(1C\271\320\233K\341\351\313\005\342\343>\361\341\377\030\204b7N\340\356\274Ma\023\212\314\222\240\211\033\013\211-\356\264\267\027\262\005\313\270[\204", 64 }, + { "e/\227\361\021\350\237E", 8, "-NQ\342\360?\267#\011s\303\241\227\353\232\227\010f\003f\012;[\022\217iu\317\024g,caX\370.\214\321\273\035|\337EB\014\2636\235", 7000, "\247_\330\233!\237~,D\351\274\202\265Z\026G\224a}\277q1\250?\023!\276\011j\254e\233\255\374\246b\024\275ss\200\031\036\312\322\257i\357\367\371\022\324\213W\014\246<}_\003G\317\204\247", 64 }, + { "\230\373\305\254hVc5", 8, "\362\306\303B\214\210\020QR\316\205\356\241\373>W\307q\237\261\227\355\251R\334\332j\303\231\202Y\356~\213C$l\353f\017\031US\334\324\016\034D:\374\345\252\235D\303\214", 7000, "\331[#\367\002\331}\306\266\3258\246n\226\357M\204u\226\320\306\323n\015$\320\247\305;\265~\2478\025V\364\222\366s\240f\270\314\034\250\277\347d\275\351\326\310]\213\244d\264v\303\317\371p\235\263", 64 }, + { "j\332\311\021\016q~\273", 8, "G\026\002J\024d]\255~\231\271\322d\335T1\203\371(\350\331b\013\302n\244\004pi\231\210\205\332\327oE\205\345\011\300\216df>F@\323\020\240I)\026\335\362\345ndx\321b|a\304U", 7000, "\371?q\263\265\2344%\200;\333\251G\020E\316\333\331RD`\275\260\006\261\356\332b\027Tv\251\243\001S(p\361\313\011(g\327^\241\0030\376\365\3425\376\363\307\216\234\316\216\377b{\310\347\003", 64 }, + { "oS\366\311V \247u", 8, "\217\350\316\355\003>f\334\306W\026\213\307? \304a\245\370\333\364[\236\0256\267\320g\360xn{\037\015\356H\271\010\255\360\265\3136\025\266\342\324\246\204\211\311k\244\322\342\231\307\204o\2376\361cy3w\314\347/\246@\022", 7000, "\211\314\257hDW;\257\3702\271\243\322\314\3131\352\250e\313\006\364/\001\207\327J\350\214\350\232U\353\216\024\344\177(\325\366K\031Rt\220\201L\265\263{\366\305\305\215]\373x\177\373\020K\224\346\350", 64 }, + { "\2713\267\214\012\302\311g", 8, "bo\2109\255\305P\036", 8000, "\236bG>\215\363\021\012\242\265P8\373\332\017,\367o\217}\210\320\035\320\255\316}1\005\021m'\205\214B\236y\232\377\300\262&\240pJRXQ9\226\011\212\316\346E3\302\252!l\266\304\134\017", 64 }, + { "l\364\370\012\341\025\344z", 8, "\201\004\012\261\355\255N]*\324i\346\002z\300O", 8000, "\024\220\237\352h\017\263\237Vk7\015\250\007\000\253\203\305\255\220\337|\306\233\240\023\361\226d\304\315g!GGY\363g\331\005\376\354\243\371\207Q\212\246Ez\030|\341\315;h?Pe\351\256\004\364\373", 64 }, + { "\302\241:W\337\336\036\342", 8, "\273\233\362\231\357\212^\310 $n\370\314\324a\225\235\004L|\322\015\357\256", 8000, "\357\333\324\221\253\207\002\244\006\352S#\326\352Y\201\034\307\301e\22120\252\036\333\2151\010\134*~\235T\322\007\200\020x\221phGw4p\221d\251\262\355\013=\236I_Vm\241\003CN\245]", 64 }, + { "\250\275\025\013\365\363\227\210", 8, "\030\02582\351Z8\344\017\0252\203\305sTM6\322\336\214\037\303\223!H\306\276R3\235\323D", 8000, "\337/\303\204\376H\020/\366\036\3336O\234\237b\012Q,=9z*4VZ<\320\214\270\341\277\262gjEu,I\224\242\316c\217h\042\211\005\300+\033&\336\024\254&\227&\301\324\004\362\377r", 64 }, + { "\366\345\301\371\301\220\3759", 8, "\315\012\003\227M\042[2[ \036\264dB\022a\326\372\203%\223\005\330&\007\304\012\300n\347\233\012\263o\330)\177DC\323", 8000, "\023\006\222\026\010\342gH\220\370\372\277Z\327/?\240P\244\244-\326\333e\234g8p\323\263OG2K_\272S=\276\012\011\314\217G\027{\215\246\360 \024\224\244\352\363\003\307\371o\305\212\341\3706", 64 }, + { "\272\010\025[\365PR<", 8, "\270\205:\014\2338\264k\246~\025\245z3\345\001?\005Nk\006\202\357\220:|\251\2522\276Z\243\232<~8\341i\326IQq\265\355\013$c\241", 8000, "\031\240\307X\344 m0\221(p%\247>\215B\244\325\211#\036\355\215\356\231\247\263=B\232G\264E\260\222\214`\006v\315L\011\355\025F\235\352\347\365Pm\230\211\273\255N\0023\021\202\362\370\004\340", 64 }, + { "\031\322*2\357\375S\022", 8, "\366\252\324S\223=\016\205>\011\374\2703\234\226\316\004\327\231\1774K\236\030T\232_\315AS'\374H\326\226E\037\225\263.s\004g\332\360\372\0147\200\364Z\003\262\225GJ", 8000, "Y$ \014\261L\304\307\264F\212M\362\364\272\375f5\223\016\275&3z|\227\021]mvP-\024\225!+\361\371\250\335\375\377\310\035\017=\233\347\225\235\042\335\241\300\264\260E*\327\034\220E\204\325", 64 }, + { "\031\220H$e\221aZ", 8, "\366\331\016o\241W!J\177\212U\230\316F\042\345xO@\324\314cQfu\315\261\312j\252\005{\001\035\362/`i|\361\237\367GmJ\303\356\035\366sV<\031\346\2736\266t\302\024x\001\360t", 8000, "IB\042P\213'\260\225\275a\244\255\225\361\346a%\321tT\251t?gbp\344@x\016\002A\025\242\264\177\224\256'~;\256\216\277\301Nc\302a\216\325\220~\213\240\245\252\260E2\371\216w\134", 64 }, + { "\004\341juF>\010\303", 8, "\012\374\210H\310\034\235\215\205\261\207r\3443\224\300\027\275\304\271\366\021\300\034\024b\256\337\0164\007w\335\243$T\300m\010O\202]%\306h\205\311\260B\206c\236\011\233m\305\305V\042\020\274\001[zM", 8000, "e\327,[\030\205\3270?\251o\320\177\305\134\272`\256\332~\363\017\200(\035s=\343\300\244A\231\243\267\247\032\353\325\275\256k\221\364\230\301\301\2658\260D\035\244\207>\211\354\035\220\202$:\012\345\177", 64 }, + { "\244\276\254\240~1|k", 8, "\251>\326\357\223\360I\224", 9000, "\202\327C\273\265\315pa&\261\02517B\232V\007\200q\302i\240\265\250\302FH\230\002]\357\216\204\245\351\221\223\335\250[\0274\265\307\214\362\347_\213\003]\244\360\344\014\011\003t\226\031\016\354\034L", 64 }, + { "v\015\177M_\312\0052", 8, "\366;\234/9\024b`\042Np7\3674\335\254", 9000, "\363{J[\233\031\001=k\307d\011w?\300 `\320\005\253\303\373\134\004Q\212\334\344} \355v\221\370\315a\314\205\236\343\363H=\357/\026\2531\024\316ZC\200D\345\212\3025\011\333!`:q", 64 }, + { "\272\021\314kDz,\250", 8, "\1774.\331\031\134\003wT\204\366\216@\2057N\223\237m<\341\307Z\307", 9000, "\323`\024\332+\270\220\374#eZ\314\217\274\015\275\234>X\342\363\240l\202\321\3030\245n44\267\007\377\042\334\225\323>t\310\316\301\333\213\215\205N\330\274+\214\323(\342\012\336\255\233\233T\220\345\352", 64 }, + { "\346G\354\015KEg9", 8, "\320i\372\224\255\204t\310p\216(.\260j\241\215\217\245\350o\362=\024d\323\350\364\212\010\300\351\265", 9000, "\237\006\200\214I\354\024/O\134\026\322\201i\203\031vjkO\024\234\311\351M\020\202\350\016vO\331}^\333\223\247\006\366\251\260\3661()\027\322\361\350v\310F\005n\337\277'\361\327\220\330\031\374\037", 64 }, + { "\350V\321\365\262\311q\250", 8, "\343m\037\250\273\367\033\260\306+\343\236\021\337\216;&\366\361\237\301\244\224\035\017m\033\241T\206\011\006\030\220\240\222(\226=%", 9000, "\215,\364\267-?M\243\134l\345\312s\270\224lu\363@\337\360Gz\357 =0\374\320\027E~\206t\347\031\222\371\211H\333\242\210p\371H\023E\262u\004\042@\250\341.\316IYA%\364\010o", 64 }, + { "\134\012\274\273\331\3564\247", 8, "o\2669\261\335\134\307M'\373{\361\367\325\253\331\243qy\316^\031\315\223>\024\007\177\375L\216\001\272Y\235\246\340\341$rG\352<\203s\255%#", 9000, "-\017\003\263@\273\011\274\3138Fx\036\312\320/3y\26458\035V\222\376\004\312\330]\263\317*\265q\324\340a%\016\214\241\255v\033U4j\006\002n\346\014\326\011\211\201\237I4\330\034\0002\335", 64 }, + { "\276Z\205\372\215/E^", 8, "\260X\264\010\316\224\021_\014\005\246\0046\005I\377j\356N\365\013\253}\007\250BlGu\224\027\37541\352\316\3704\305\024\343%\037\342\265\236YA\200\005j\352\203\254\315\237", 9000, "\266t\3301\355\364\233_\353*\333\220Z\007\360\343t\343&\260\036\334\201\254\335R\373&b\237\027\221\343]U\304\212+\0367\307\375w\250\227\233\042U\227\215\324\017`_\254\3125.E\002D\321\200;", 64 }, + { "\226\005\201\252\315+\266a", 8, "\377\315Y\201\220\361\037\222\262r \237\226*r\005\236\225\036\323\313(n\257b\011\330\357H:# \321\271\344\202,\231Q\016\013\034\222\003\364\205|m\335\232\0172V\355\275*vH\262\177\205\307\210D", 9000, "\234GS\240:\220\213\346l\004u\204\234\243\351I\370\260\375\010\201\035\223_E\354\271v\036\250\266h\227[\243=\337\315?\220\3253\300\366\346\024[\307w\325\313y&l\027\010-", 9000, "\307\367\342\016j\337\217Jr\210\226)\242A\315v6U\313S\042\025`\335\346\002\240'U\312\342\210]=|DZU\253\237\320\235\264\311p\200\221EP\311z*\207\267\305J\273P\033Utu\254\300", 64 }, + { "\347H\205\004\340w\177\321\313\337\042G\204\274\033\334", 16, "h}o\344Iv:b", 100, "\037 \023\347\332\024\007\042\036e\253\276\016\270RM\224\223w\012i\223\305\2474]_=\257\303.\331\025EqB}\214\204s\253sD\037\317b\034\000\376e\012\340V\220\224\00532+\024f\206\032a", 64 }, + { "S>\007\330\027\271yp\211\357\017\246\200q\302\376", 16, "\266\042\300\276\377Z\362X\241\271\005\257\355l\232\235", 100, "\320\302\134\002$F\034\315\343\211\010\256\264\222\021\363\177\003T\030\225\027\333\376\213\256\357\202\324\272\350\201\3161\233\277\327\04293 \332>?\327A\377\361\265b\274\202\246\3123\236\366\001g\211u\223\354\354", 64 }, + { "B\031~Q\003^\310\367\210K\014\256\245\202\316j", 16, "\015-L\002\032\352\005\215\322f\024\344\3559\360\273\222\336\347\221\356_c\320", 100, "\177\207_s#\007\301m\206\013\2300!\365\000\2125o\261\376\343\365x\220\313\356\264p\304\013\033\306\354\246}\304\004Z\311l]\002b\362yd\013\234c\007\340\262Bh\001\013\314\364\021l=T\344~", 64 }, + { "\245\360\247\005\370r{\215\303#0\353\344>\002d", 16, "_k\016jF9i\254\253\026,\251e\003\315\3136\016\023\213\337/\331q\343\356n_\355\242\200\231", 100, "\303\207[\317\226\277\341}\225.\324<\006jL\035\372\247\245\332j\334V\015\266\012\366\273\213;\213\275\021\020\341\271\325W\277\303oy\260\215\021U1\333\205D-`-[<\335E$V\253\014\213mg\267\355k\262\211(7(\016\003\036\231$\257", 64 }, + { "\3746\000\2150\247\037#\313\331\351l\012\333\247A", 16, "\234y\004\241[\363vH\207.\227X3\234\366G", 200, "\314z=\265I\243\201;\010\234\015.\042\377\265`\220\223M \006\234\276\035\036\2571\322\237+~C\241qv\223\006\223I\034\225qT'Q\232q7\3102\336\371\271\237~F(~\350\317W\236D\000", 64 }, + { "\305\363\361\241\301\257\317\177\3327\134\252\316f \307", 16, "\324)\212\012\226\034\330\315\313\323n\361&s(,\205\322\034\211a\236\335\375", 200, "&\3403J!17\345\026 \211\235C\025R\212\177\374\273\343\027\3772\026}\232\347\016\362U\352\025|-\373V\300Q\221\003\317,\037x\334Dq\230j\277\206(iW\037.\336vJ\230W=\013\376", 64 }, + { "\342\015\026\337\254d\021\237\010\216O\314\271\015\202>", 16, "\272\010\351vz\243\205y\234\345\354\262[\353^z\346G\324\177@\217\357\252z\254\354\240\241Yb0", 200, "_\235S\033v\365x\3567c\255\216L\267\200\307\204\006\365\271\276>H#\260\015\335\025d\000\230H4\255\365\264\370& \204[\345w\035ne\301\254\312\246$\213\345\362\261\256s;,\321\304\371o\333", 64 }, + { "P\220Zg>x\313,\234\260\240\262\260\351\177{", 16, "\3762s\2309\276B\215}-\215&\363Z\374\305\233\325\203\254\367\212\250\266H\222\002\256\362~m\374mr\354\305\317\330\215\214", 200, "B\2700\007hU\301p|\227\275\342e\005%\374\023D\242x\311l\0344\211\256k(\264%\011\362\266:a\305\330\252\320\303\365uh6\240\0033\271\236c\220M:}\365|\210\010\305g\000\364\027\347", 64 }, + { "\032\222\254\003\000n\311\010x\225ny~\226p\016", 16, "\303\3346\310>\2656\271\251L\272\243\007\315\221OZ\300\212q\335\367\246t\234`\213\214\347\332U\340\352\275\265\134\354\203\333( ?\256\304\035D\012?", 200, "t\301\031U\330\0141Jw\010\027\212\334q,\306\307\313\354\177L^h\376&\033\310-\231\220\273=\277?n\201>~\0263\216\012M\341\224\037\034\244\036:\325\017\2024\230\342\006i=$\3546*\243", 64 }, + { "z\012!\011\346\202\316+8\217e\255\023>\350\221", 16, "\177\015\264RK\134=\005j\210\255\202\373z\327\304\377\027\267g\254\3139\333\354\215\273\177\0112\237\327\343D\205>\213\231j#\235\355\363,\237\315t\021\335Q\300t.\346v\210", 200, "\233c\377\253\202\010\203\256\372\357<\200\231\334\3074\207\371\232\243\206\023\212zj\272\273\216\217\210f\200`\031\202Z\337/\2467?\177\226\321\215\300\216\260\222t\320i\361\012oT\017\302\340\353=\302\240z", 64 }, + { "8\346\2320\027\300\302e_\224V5\347!\037<", 16, "\247b\235u\341\201tX7\372$\260M\312R\344\275\241i\233\255\253\030\206\256u!\334\201\275\202\042\036_\237\335=\031,\015\230\372\303\224\312\334\220V\035\323\226\340;\177\250v\375{k\344\331\255\214$", 200, "\216\323\264\300\362\373?\027\346\000\323\275\267q\001\222 y\303D\366{@f\034\226O\234\341\216\230/\226\324\034{\001\264\042\326\357\015\360\037\362\2602\306\277.s\244\001t\346V\333\016\3111\015r0\316\005b\330s\204\317uxc", 64 }, + { "`\204\233i\237g%EA\265\241\220\240\311\271\277", 16, "\007{\3171vCb\215", 300, "\231\365\3613x\302\240\021\024\331\3726O\333\340E\304 OVy^\0121\360\353\237\210PM\261P\011\325\311\307{ -\307\016\204R\300+\003\324M\312h\003\304+\251\214\005\205&\002\252\022\240\3702", 64 }, + { "t\271\276\220\376\026\002Q\320(\350\3108\032\234\227", 16, "\275'o.\375\363f\266\245\373IN`\331\016]", 300, "\234\203\367\265\303\221\335\243F\363!\225\007..\177v\266\321oe\227\013_/3\032\330\225d3\233*\252\042A\323gR\303}A\374\300A\353s*~\205LdO\305\002[\201\204\033>\244\207\330\030", 64 }, + { "\200|\315\327\367T6\016E/+~\016\267\042\366", 16, "hR\302J\352\242*>\306R\202R\354\214^\317\216\270\277\014\316\322P*", 300, "\215.\042\007PDE\315\3073\355\007^\2619\323ET\250\004\334|\364lQ8\020/f|\206\344Q\010p')\013\220\277\231\362\272\00462\344r\211%i\273U\012y\346\322<\005s\204\017\200\274", 64 }, + { "\302\354a`\2242\277\372\213\134P\021lU\200u", 16, "\320\311\272#\313\335\306\264\251J\255lR}\002\273G\3006\371\205h\235Ah-X\001\312\3341\027", 300, "\022\220u_\275S\011\301u+\222\351\307~q\226\007\233d\231\276\026e\251x\3123(\243B\227\021\215\277\031\315\226\315Y<\360\213$h\203\017\266\335\024\247cSC\350<\340\303\343\237\241*\200}\265", 64 }, + { "/\342EJ\341\2354E\202N)\376\311\231S\231", 16, "\266\012\010\366\027c\3434\364\272\373\260 \263\207\262\344\237\350\271Y\245+\011 \341\344\277", 16, "\326&\352]\243\333[\211\035t!\366\204\204.\351\005\036:\260F<\210?\343m\226\035_\134\255@\016\260\017\347\033\256\377\361Cd,\343@\007\264e\177L\275f\216\346rP", 400, "\300\042\035WU\336\316\023i\201\215\215KSU\215aH=\010\332C\207\276\207\254}\373\331\325\312\013)%<)WM\330r+ \014\214\217\012c\266\023\364\330\356t\264\042(\031\312\271\312\351\3356J", 64 }, + { "\260\354\027\023%\230\372\345'\315\035rq\356<\327", 16, "\300#\263\231\336\337J9\346\354\007\273\351\244z\013\247C\342\337\042cF\221\022\221\203z\200\244\323H\015\366p\364*1\2271\134\326\377>\002{\260:\242\224\323\035\211\002\277\347\246\227\237\223\315\315\361=", 400, "/\015\317\021n>l.\252\256A\340'/\327vM\233\262C*\241\361\036\353\203sjK\003\007\331\361][\204\3643\237$\234\353\205_\206\226\337\275\375\025\255\314\263\250\311\244.\362P\336w8_\344", 64 }, + { "\366\317\345\225\251\365g\205\211\324*\313\001E\314R", 16, "{-\027(\230\231a\371\302\271rc\302\204\32402\204\312\005f\227\336R@f+%\250\372%\023\340\002!\203\037\237!\1346\012\355\345\246\020\346\263\204\204\222\356\221\2334=\3333\364)bs\242\314w\001g\214\212\020Gq", 400, "\212K\270\302:\017\317\343\266*H-\373\241\321\200\021\204y\276\272\252\347#\333V\025sI&\325@\337\015t\312JR\312\222\243le-\204\354WAi\364d\353\364+\023\376\363\210}\261\236\242\262\222", 64 }, + { "'\225\026", 500, "\341\213,\254\202dg\312T3&z\363\354#\350\301\204b\302\357\253~\315a\342\235Z\206J\002\341\042\004\342h+\274Z\305\350.8^\377C\241c'\231+UI\216`a\002\203>>H\276q\330", 64 }, + { "\355\2508\036\235/\211\331\356\0223S\2121`\224", 16, "Zk\3217\020B\320\302u\222N\357UBC\364\221M<\344\210Rq\254\327[v\266\347\251Y\022\367E\376m\303\332\134\270\020\332\333\026\224\204\367\254\362U\011 \324\276m\330 \032\222^W\2304\345F\005fw\364\277\322VXJ\345\0167KM\213\022fv'~\032k", 64 }, + { "\134\244y5\2355\245\326E\016:R\206\032\334\202", 16, "\233\364\201H8\215y\376\014\277\016\334\013\337Jm", 600, "8\337\036\337\322h\016\272\377\261\302jZ\271\312!F\372\364\327>XPTg\232\226F\021\362\024%~\371@\314\226;\026\244\2356\312\134\134\236K\217\243\341\0052J\304\014\354n\205\321\365\256\214t\337", 64 }, + { "Q\361\217DR\030\023l0f\316\321\317\370\000\270", 16, "\210\323\252\322\0060{\223\006\022On0fm\202\011\315\357a\031\373*\317", 600, "\300\241\266\226\264\202\202\216m\0166|\321<:^\367\256B\327\211\036d\030\002i\207\311\322RSC\252\303G*xD\203\213\003\343\252=D\261b6\033?\351\257Y\251\261)\254j6I\203e<\333", 64 }, + { "W\240\211i \373\342$O\315\042y\243\371o\203", 16, "m\225\254MJ\265\037\231)\021\336\371\254\253\256\317.\204\210N\300\226\320w\354\021G>\014\256\310\034", 600, "\373\356\000o\004\330\262\234\262\250\346f\212ap\337e\220,\007f\333\202\270\253_ms\351\013\373\234\251j\204\360\033\257e\344\360\200A\324S\320\251\235)\015\013m\202\206$eE\370\243\001\014\221\300\275", 64 }, + { "\305\337\271 *\214\274\272\356\013\307u\215/<'", 16, "\323>\273\2563S\220)\265\367\346\246\002l),\025\177\027f\332\223\014\004\260}A%R0 #Z\357h\340e\261\025>", 600, "\333\224\212N\256t\331\335\002\315\266\324W\214\017\016\273\250\303\021\326\340\016fC\015&\305\213\266Pi\261\344D\325A\367z\251\326n\321\305\2120L\324v\006\262r\320\211[\023\253\301\330\376\017\245w\000", 64 }, + { "\227\317\337v\243\316\223\362\003=\022\307\243\250o\216", 16, "\247\270\205\312\252b\325\344\227\372q6\3660\004\035i&r\212 \253\177\211\365\034\207`\213\310&\005\307zo\332\363\344R`\217\267\270l<\275\321\317", 600, "\312\021O\242AA,?\251\335\207\244\357\274\2753\020\006\321\240\362\262\304\253\210\370\231>\323v}\335C\000r\362|f\273\246\225\314\354\244\272\260\330o\221e\233\005ea'7\336\232\232:\221S\031\334r`\316\2015\257\377\203:j\221\264d@\342", 64 }, + { "\255\377\250\342\216\0156\217\331\352\220r\302\236\376w", 16, "\377I\023\011\206\313\214=\006\344\0217\037\034\312Q\013\303;#v\275,\276b\036\023\375r\332\302G\335\307\333B\325\374\347\271", 700, "0\2629)\037Z\226\272\312\021\215\345\266_\036\373\277\012\023\364\271%\271\272\366\353\205\322\243\220\1342<\233\372\311M\232\027,\215<\334Z\357N6F\207O#\031n\215\235<\256\333\304k\223\323\240]", 64 }, + { "\243<+\014\304\027\016\025\023\373@\377rt@\336", 16, "\316\023W\361\200\325\241\255_\347\247V\0324U\031.\377u1F=\234\206\365\342\256\210\243\346\217\317m\3334\267\242\263|.\015H9\212\313\360\331,", 700, "B\322\302\014Tt\014A\243K\347\353K\031\364_)\340Q\356\216\006\367\275\355\246\035\362k)\322$\242jn\3077\255@\036d#\266\267\274\267\343ti\211\376\032\200x\313[\306\267\247n\222\222\347\021", 64 }, + { "\371)r\237\3421+4\356s\277\234\343\330\212\313", 16, "\262\017\333\260\372\305\253\325SWj\350\233\231\222\372s\277\032\272[p;5\204T\014\243\017A\345\314\217\210\323&9\222!y\247U\3673'\351\266W\216N\215\265\0331\331\373", 700, "r\016\300\215\261\246E\350\234\360\035\340\025\033\206C`\206b.\326\223\367sV\320\232\006\374\227\234N\027\222\376\273\264\356\206\340\317\337>\237\266r\207\206\224zp\343\335b\333\237k\240\306\204I9qF", 64 }, + { "\351\236t\270\232A\203a}#a\340\217\314\235\246", 16, "\345a\00716#31\263\314\220\255\005<\306\277\3574;\025\004\341\323\215\023\210l\373|\226\234\251O\242\2334\311\336g\260\033<\261\236\237\271\357\230\035\273\016c\212\200\3406\361g\022\263\030\311E\277", 700, "\300\270 \346\234{<\357^\225\303\255u\351\042\254\267A6\032?\023\251\226\320\361AToOc\201\220\335\241\276\363.\277\227G\042i\300x^`\230\253\247S\205\231\2700\370]\304\343y-\134\262\274", 64 }, + { "\326\315\030\330\327m\324g`\357\314\374,m\313\027", 16, "\222\231=\273\242\212\226\031\325\251e5\213\256\244i\036\370\247\361\2530\377\372E\244\265\367\346\251\312\300<\304\221\035\201\277\342\304\015@", 64 }, + { "o}J\242\212Q\201\317\222\006\331dI:\362T", 16, "\227\363\374\030\2151\324W\373\366>QP\367\032\315", 900, "\374\010\253\244u\317\244|\366\2348h\341\373\322\350\234,{x>V\036\006\266m\042\374\335,\351Vl\376\341\026\000\233\302\021\013u\274\246\363#F\321\234\226A[J\323\253\371\201\344\306\312\222\300\232!", 64 }, + { "fW`\315\042.\323\234/\024e/\235.\367{", 16, "\377\001Rk\017\237\367\371WR4q\271\242\200\034\374\224\224\026\371\3056\305", 900, "\314e3\234\224\216\231\334\257\005\354\223\241\322\363t\134 T\343l\246q\237[\300n.\014F\207I6 Hp21\271l\244b\023\352\214\356\331+\331\006'\321\215\301}\223!\3318Mp7\005\330", 64 }, + { "\365\016\371I\230s\357\307\245\037\373\023N\2579\236", 16, "+\214\007\212\252%\034\006\337Z\013\267\134l\211\030\302\271\267\376W\014!\370 \354\272k\013 \265\035", 900, "\026\345\251\321>\361;\226\251\251\277\3261$\233\224tk\373\011h\030\256N\030\314e\352M\2200\273\341\351\350\302\257\03796Lc\3615\215\033J\326q\347\364T\0232B<\015\202\251b\021\352\271\224", 64 }, + { "\357\305\300\016h4\217\213\205|\365\275\2402M\212", 16, "\232{\261\235\227\366}\037?xZ\217{\271\352\3539\3628\370T\207\370\222\334\221PJ6\237`\235\343\020n\323\370}+\025", 900, "\006An\011@\267Z\023\026aW\274\002\263\316S\006\374\372\362%\003\357C\355\307\202\023\266YN\245\361\324:\311\201/Pa\342e4\2122\203\255\312T\201\243l\357\337}\361\302\347\034}\315l\007\301", 64 }, + { "\254\373N\035\251\017\360\304\005\333`\256\301\240\351\020", 16, "\257\231q%\353\262\257\37167\260\364e\222*\0135\242\214-\263;\011\232e\237\221\202\026\352\334\034=\326\346\246\016\353\375hH\020\2666;\276\254\254", 900, "{1\200C\304@\350\255\323d\266\042|\2019\262\264\177/T\362\020\346V=\032\360\226WC\234\260u\244X/6\326\202\363\025[\327Y1\240\243\030\373m$Yp8\220\272v\321]\361\343\305?\226", 64 }, + { "\200\323\244\005\342\327}\330\0329D\266v\037\332\234", 16, "\305sYC\035z\357\246\025\315'\376\305Do\345\022\320\016L\321\236rW)\0128>;\042\215\2640\244\370\245\271\312\220\222\211j\247\323\252\324\252\316G\014\307\303\220\026>\241", 900, ":\015\356\340\031MC[\210\244\201QVg/u5\331\215\134Q\277J\322E\306\222\372\346X0\210N^\207'\300I\345\011\020\366R\014\177\213\037\3425&\252>\264H\316\335\235W\264\265\256\3774\002", 64 }, + { "\033t\350)6\260R\333\031\346'3\021x\014)", 16, "\317\036\207|'\372vD9\324\306m\004B96\3643\007/\337\212\015\042\015\317\022\375\3434\3669\266\243\234+\336\261\234!@P\204\377\220d\236\370\254\370vx\312\134\017\204\3509\225+\034\351\024\267aH}p\364fW\006+;=", 900, "\023\234\016G\310\260[R\353\236BW\207\317\016H\245'\203'\3209L\0148\230(x\027\337\025\256\355&O\2170\024\177\312\200\005\320\365Z\353c\365\207\333\134\264?\321j\0170\312\263\366\350\2733\030", 64 }, + { "}\026\215\320q$\364\307\271\035\234s\210bw\265", 16, "\260d\255\307\300\313\321\370", 1000, "ko~\027fI:q\276\226\305\216\270\317\010\340)d\020\353l\010\274H\013-\306\331\014\277\252\254}\007~\371\327{\352\216\255\211<\366\221\201\311\001\340\267JV\227+\347\253.\222\200U\317F_\276", 64 }, + { "\302\316l\266\270\312\0316W\200lJD\344\263\264", 16, "\353L\235\037:<\341\377\357z\035R\322\221b\010", 1000, "\357\261'\225|\274\201H\253\332.\240:\2151\3776\250\032Sa\351\3659\223\366\240H\200\2439\007\223\240\300k?,\004\203$\200\220M\236\202\314\032\321/\231;\210\312\013\214=U\0129\246\247\347\324", 64 }, + { "\351%\241\263p\261\200\362S\377%\206e\350\237p", 16, "\347x\025h\232\331\240\015\006\035\273\353\233\001@\004\177>\254We\361\353\215", 1000, "\302\000\266c\330\375\3350W\022\272\3446\345EY+\311~\244\0162\006=\353N\212\343\257/-B\271\270\343!\030Q\210\242F\307r\276342\261F[\342\337\277\321\217\360v\015\215\301\005\367\232C", 64 }, + { "\224U\367\245\357\276\004zv\004\017`\350\315\220^", 16, "\230G\361u\016\305\221\367\253\334\344Dg&x0\314\301/j\042\211~\320\207\207y\217r\237p\354", 1000, "{8\226FL\023\270\334N,\247>\033\032B\032\354k\010\001\373\222;t\023X\304\371\276\244\203\316Vw\352\214\310yI\010x\025\215\250}\301\027\205 .\042P`\306Xrx\322\257\235\340J;\277", 64 }, + { "\225t\353\356\367\376\013\326RX\246\016\134D\243\336", 16, "D\006}S\362\262u\220p\364\313\365&{\346n\277\322Jv\2202xdk\230g\327\341C1\220\374\322>;C\263\254W", 1000, "\026.X\262\251\361\032\206=\326\251\214\2721.!5n:\266-\267\015\213\216\313\335vP\013\305\034*\301\177\226\010\345\030\322\213C\313\233\251n\245p*\207tO\021\022\221\020)\006\212\237\014\223\020\256", 64 }, + { ")\035\350\023\325\370\321\370\243\005\263dm\3147\252", 16, "\015m$\343M\220\3573\304\200,C\032m\237}\256\366=A@\200\223\177z|~\263a\321\320\344=z\0229\244\200\222\253\013\224\021\265\224\023Hf", 1000, "x\351\246kB\345\355\201\134K M\003\321V\307\024\257\246\251\031\224>\244\021e]\014\262\272\004\206>\251\270D\372\226\206\352\225\273\010\036!\364_\327\244\001\353\012\250\232\227W(\034\231p\301\031\203\325", 64 }, + { "\246\337^`\273\277pp\204\370\235\023\256\026&Z", 16, "\327 h\205i7+eN\362\265T\320\321\237\214s\036,\326\021\357:7S\302\212\253\016e+\251\253\334z]\022\256]c\007\310`\223\364\022\206\245\217O\036\251\366\214\242\370", 1000, "\346\364s\202y\026\347\275\220gk\304\232\326\234\025\257Rg\254\233\216\344a\306\225\366N\216?\276\367\032pn\364-\322\331\367y\002*\276\322x\340Q\016\354:\341\216\320b\216w:\267_\227>\274\235", 64 }, + { ";\355],\232J\026\265\200\333\220Di\271\362\325", 16, "\217p\015\025\3636\334\234\011:\304\3378\203T\247\207\350qA\370\365\307\021\230\250\312:\214l\311~\274\220\303\225S\250\230\343hc\261\374\343gI\374JO\013\325N\271\255A\264\032\215\013>>\262\021", 1000, "Tm\271\346\333\031\034\261o\233\342G\006\277\264\2759\015$\351\352\331\214\200BL\375\356\322\376\340\337)f\356%\346Tm@\277F\027\012\315>\327\276\001\302\2576\313\244\315\276H3\346A\266\226\312T", 64 }, + { "1\317C\247\340O\362+\332\245\006\261\2069\252\342", 16, "l\31548\373\321n\375\007\337\320\277WV\334\205Q\230:\021\010*g?\3702\004\005\306\305\324\025\256 \203\351^\276\347H\306\345=k\310\247G}\326\020\347\363\350\016\215{\023\374\357\335\2669\315\353\336\250\224\303W\370\246\221", 1000, "E66r;h\253\215\200\205\375d\261\331\275\264\330\3146o\011W\210\217NI\343w\256;\226\351\351\000h\346\340wi\221\275\302C}l{\336\272\030\177\273o[6zV3j6\007)L\244T\025\256\353\2726\023\241\3501\221Qz\342\001S*^\327x", 64 }, + { "^u\024=)!f\324L\251Z\200\377#\134\362", 16, "\224v\363\204\345\353\263&e\242g\310\227\323\231\370\320\350u(3>\346\013?\3316\360n\316\2560\032\264n\003\177\352b\360", 2000, "u64\012\241KEM\001(>Z\237\042\027\240\361|\252\216\357\214\017-\302\002\365\224\355\277\351\033\011\030\324\363\034\320q\340&F4uCc\235{\347\013l\2671zB\025\236\3174\215k\361IJ", 64 }, + { "\256\002\200\356\321\334\300\0423Y\021fv\323iD", 16, "\224\307\134\316\002\320\273^[g\332G\320U\0139\004\022\220\010\372\200'iw\376\236\012\034\304\017\035\334a%/\322\277\3206o\262*8\014<\004\202", 2000, "4\274\031mr\012\340\305s\042/\217\205y3\374`\224\223\311\377\222\301\202\214\351\337\010\015\315m\213\263\334g\314oT\372\330\246(\333\306X\321\376X2\206\026\230\333\361\325z=\277n98\334\377@", 64 }, + { "\250\346\251\243\207\200\303\011\307\231z\220\332\004\367\021", 16, "F\251%7\247?A\003\200\015@A\260\042\247\310\356\004/`#\222\244\201\317\375>\134B\023\024\007\032\251z\330\371\3456\006Be\207\343\354CR<\261O\352\362J\361\377\367", 2000, "\276\207\365,\306\033P\0200\231\2013c\351-\301\032\207\212#\301\3233D\374b\027\206\357\335\341\321\205TO<\316\225\011\271\013Ca\235\315>\214\325\222R$\003a\224\005v\253\226\243s$\375\345\240", 64 }, + { "\222\324\307\304'\000\210\255 [),\322\357l\332", 16, "\007\345\242+\012\357t\231\202\266\324\250iv\277\257n\315\354r\025\004\356\233\317n\256\042\202\372\251\223\230\226c\203=\334\331\230\237\034\2129\215\365\317\006\250\010\361\335\226\261\367u[zT63|\365!", 2000, "\371\270dr\215\025\035\212\004\012q>\263\267*L\201\373g<\333+\215@\334\260E\253,\302\261>\222\201)Y\006\316,{?\303H\240\253\326\362b\134\374\177\013c\351\237h\025\2350\313\3422\313\272", 64 }, + { "\325\351\200@r/\240=\323\331\372\023\244H\013\236", 16, "\326\307\360\340u/\260\312d\314E\240r\134\025h\272\202\230\177\364\346\134-L\345\362\260Y$\207\027fv\257(\336a\307\215\341!X{\024\0317\345\257\240\263q\332\032Y\230k\026\254\037-t\031\244'\353\324\344\3014pD", 2000, "sf\252}\216![5`hs\210\324T5H\346\037v\314\344\346\330c\240\373\021\023-s\350\356kj\224M~i\206\325\246\325b\347\335\252\303+\277n\003\307lgw\217\245\025R\205\301\257gb", 64 }, + { "\244 \262P\000\300\360\311\042\251hn\226\023A\270", 16, "R{\337\244\226\014\276w", 3000, "b\254\205l3\271@=Y`\251\226<\316\334\013$\321\357[\357\324P\201\246!\355W;\362{\367h\2072\270\247\353 \271\357\233_\330C\322\231\341\251\315\010xm\270\350\260\352\304\035\304\204K$m", 64 }, + { "\015}\205\262\251\331\300M\312\216\024H;\313O\030", 16, "@\225\032!\031\231W`\325%\332\334+\345L\257", 3000, "S\042\245F\263\330\001\203\365\020Q(Q\032O\302\236\311jA[Yq$\000\210\266\026BIFj\255\263\362L\357^\304I\266\222\223\001~\321N2\202\206\301Ml?.R\321\215h\327*\347\317\324", 64 }, + { "\270\257g\226\273\231t\256;\025\270\267mL\177y", 16, "\224\2678\3320\274\306\365\254a\260\307\276\377\012Y\231\372-\3652\026\225\026", 3000, "5\3706\342[/{PT\265sHl\345\275\215\273W\300\354\341\342 \334\011\013T\003l\225Q\333\277B\240s\211\231s\360\353\301A4yj&`\024\005_\307\216\325E3\235R\032>\213\034[4", 64 }, + { "\312\207\223Gfp\250\306\342\002|\233\1349U\004", 16, "4\321\374\364\375ycx\020g\345\224\352\0424\313\011c*p\267\376\232_\370|\240\010.\3227\033", 3000, "\341.\134\262?0\256n\334\263\356\273\3141m*\352\344\237\302\300\364>\347Kq,mu<\327\010\267.lg\002\232\226\350\354\010\263\215+\032\014\230\262\375R\264\032\204\334\351/\314q\361w\246D\274", 64 }, + { "\2645\264\241X\321\351\352\342\015\253\257\241\354xn", 16, "\214Ihf0\343\371\323=X6\244\327\237l%\340\300\021\006\271Q\340\002\267\331\234\0100\231#j\005\342[\367\012\042J\237", 3000, "A?@\303a\325\243\015\200\206\256\025m\2471\254|\252\203j$Y(\013'\346\336\011\217\355I\346m.\001\337\033V\022\342\2177\216\264\211\000\253\330\007\315\323s\365o\371\330t\361\235:\0231\266#", 64 }, + { "\250b\326\230\271\352\346\357\305\245\303:\3236\036\300", 16, "Fe\247\220E?\206\201p\303G\006\357\027\204xD\264\237\247t\042\357N\335\351\351B6\177Q\301\307\334\012H>\2572\275.'tu#\014\371\260", 3000, "\3270\222r\024-Gf*\352\204\271\305\315l\234\370\364\313\304\250N\267\321i_=5\370R-\302Oi\251\305\236\244\376\005\033\270\265\031\007\242\234\301\02166q\243\042\035\326j\224w\035\232J#m", 64 }, + { "\226 \316\360\363n\302\012\207I\3022\252\232\271\221", 16, "\213\316\027t\212l\242\354\014\304\376\344\377\352o\207\330\376\037?t/\214\316\017\027\363Y\010\017\027N\326\007\003\263\274\042\177\230z\264x\340\017\204\005\203\200}w8R\304|g", 3000, "x\330\300Nq\0371t=\326=O'i\0176\314k\351\301\335\134\372s\200\331\010\322\226e3N\016\341\251\3670QT\322\200\346\217\300\202w\010\253\242\342\272\024&|i\307\270[H\357\306Vu\004", 64 }, + { "ng,\206\357\313\353!`\263a\237\375\256\224s", 16, "\334\370\260\331\016\0355\342]/\207\227K\2323\256\003\004\314\256\020\020Wc\241\367!s\366\223\025\254\245\227`\335\226-<\375\367\010_p\2151*\204\2501\263\242r\324y\231>Ej\324\374\265\247+", 3000, "\233\241\316\316\335\307~\260\336\332\273\337\263yqH^\202\037\265\375\032\353\364\277\241\241\2456\325\3558\364\360ft\316\031F\350\300\026\026\264;\345{Ru\002~\027\340U\316\313\231\205\205p\3167\256*", 64 }, + { "]\340\304\315\250W\316\336J\263\231\002\216\251\364\242", 16, "\201\376\003\177\021\346\237\211\320\262\334k\320Hu\220r\357\237%\222\357\013\350\330\042{\210t\227\376\372\016\3707\340\230f\200\360\300u\312\034\220\376]ct\225\311\275\005z1\243l\373-\234\2154\317zZ\0306\312\2435\032C", 3000, "V\373\262\256p\232H\0424\034\215\015\273)\217\366\237\253\323R\226\256A\257\334\355\035\376\331=\251.T)OVJd0\005q#\356\346\012\223,\017\015S\227\007\034\010\026\370\271\233\267\030\010\357*\244", 64 }, + { "\021\225f`U!\334\331P\355\312\351-\032E)", 16, "+d'\210\235<\262\204", 4000, "'\276\227\331e\015\206\231\234\323\2578\306/\0338\007U8\354}%\310\265\335%O%\255\377\376Lo\303\350n0\353Zi\355\277\315l\010\252\366'G\272\263f\341\310N2V\346\334\257\214\333\002G", 64 }, + { "^\314\361\023\376q\261\003\245N\240\353\031\300\031I", 16, "\355^\377\321#:\253X@7\201\251\215\257&\310", 4000, "\266=p\000\366\231n\365r\310\011\266\315\357\242\011\333\237o\030k\364\341T\042E\332\313\255\227\246\251.^\372\012\317\222\355\244\2066\034\336\000\250\277x\000\315\002\373\263]\037b\350S\036\303\341X\002\335", 64 }, + { "\300&m\242\343a\326$\210e\200x\012\335\036Z", 16, "SG\363E\013\273\017VO\360a#J\220,\263\375\322\202\227\242;Pr", 4000, "\242\351.\17783>g\001<\034\004\030\002\312\345\270\021k\342\375\243/\342-\346\240\017\260bj\342e\206\225\134\367x\330\020/\363v\214\241\025\205lg\347$\275\300\315\205\021u-1\246SH\205$", 64 }, + { "\235QV\311\015\001\301Sd\204*\270o\026\177A", 16, "w\020\211E\315W\014\015\342\344j\251X\341\2528\354\371\336\214\260B\367)\264r\345r~\221k\255", 4000, "\3260\375\203\347\030\375\023\351t]\015=\301\267\303\035\204\2345cJ\2565\243\266G\211\333\024\311\320\2556\031\302\310\257\273{\340\274A\011\305\206\272\232\264\336\217\012)\375\036~q]\241\267\220[\203\330", 64 }, + { "\303g\3655f\271\332\250\306${\317S'\270U", 16, "\300RV\321<\333\2779\031\216\346/\305Dv\021\333a\374\344\303\355\370\0367\201\315\346]\242\375)\323=e\023\013\201\306 ", 4000, "@\253ur\230\326\344l!\004\026\352D\222,\021l\0316S\205-,\035\374#E\023q\034\312\0003?\234\000bs\334\011\011\204w\2558\356v\343\255y\260\023\320\305T\314\300K\232\000\013\352\305:", 64 }, + { "\366\307\305\200i\370k\246sc\035zh#`\035", 16, "\341@\032\010\373\0114'\275\204P\256\314\324>\030\266\343 \034jB\372\0124\255^\234\207\274\322\227\357\244VJ\273wq\326\224\373x\360\327k\3508", 4000, "\323u\002\267\022\271\274t\002\305B\017\015\366y`\256\201{w\017\240/\225p\356\036yj\277\277\242\243)$\244\333\272j\367\024\223>\021o\370Aq\343nV\237\031\234\350z\226\201\300\024\256\006Gh", 64 }, + { "\365\236\311\322\134\327\033F\230F\370_\217\221H\315", 16, "\214\207u\217\253\234Y\236\377\343qB\374\035\231b\267\266\314\226V\207T\367\352V\001jY<\337~q\203\345\265\230zB\2110\346U0\231\205\246\254\013\213\011\134\236\351YO", 4000, "\315\360d\246\273\364\265\217\210\306dnuA\004\347\022w\200\375\267\341\336\340\226jlc\354\205\310\316\251G\373\347\237Cee]O\351\237UN\236`\305\244W6al;#\336\377n\335(\337qO", 64 }, + { "\341\325\003\214aV\254\361\365\314\333y}\005\036p", 16, "\274\271\3200UV\327\273\263H\022\362@\322\300\362)SMQ\335'6}\017\255\332e\341=\377v}\024\012\316\233\324xJ\367\011\016\260[\260N\322\257\011\005h\273\237L\010C\263\3300\321C\365H", 4000, "\336=?\327\210\002\245G\275:Q\371\271\233\300\273v\274@\002\363\340A\305\372\272%\355\365\343\012\000a\204\276\243$|\237\223\221\240*\351\311\262\327\367U\000\316$G\224q\036\033\327\224\247\371rzY", 64 }, + { "E\352\312,\222$\365\267\303\016\331\276\345f\305\134", 16, "\01152\236\032\242H}L\263\334qk-9\013\006\356\357\251\372\026Tb\304\256\226#Ad\216\3024\333\264\240S\217:S\257\024\347\030\321\026\223\024f\301\261]\301\002\272\350\023M<\254\255A\270]Yh\251g\2235\206*", 4000, "\352\317\323\300\357w\365m\200D*\277\024\330\246H\207\347\257\211^\240\362\005\001D\237\310\332@T\243pB\247\025\236\204V\377\346u\242\203q\324\307\320\314\207\372\376\222\206m\134\037\365[\307,\240\377c", 64 }, + { "ho\014\234\352\310\134-\224\021\301\134\015d\356\351", 16, "'\256\217k~\376y\335", 5000, "_\341\264f\012\003\275\012It\363\322\301\032\342\337\331j$'\006\014!3\3029\313\200n\266\003\254@\236[\011\214XK\372\020\210\335\031\134\303\011\042-\004\365\003sn5\235NK\375\013`\022\336\025", 64 }, + { "4\020\304\323y$t\014\202P\251H\371\235|\035", 16, "\303\370Y \366f\325\317\352\030^\245\234\366\010u", 5000, "#W\033\270\241m\245%\357\270\243\340\211\271\263y*\341-\002\277I\332\227\042\271x\321\344\246\030x\252\233\326-s\302\334\327G:(!\315\220c\346\240\375\012@F8@\205\271Vx\321\202\024!}", 64 }, + { "\034.{\0068\255D\335\340\303m\273\356\223x\204", 16, "\247z\325\244A\337\245'5\373\351\336X\330\003\2576\243H\020s\226\266p", 5000, "\353\206?\351#+\346\206\330\225;ua\020\263\312p\024\2229\213h\015\336q\254\216P\256 \004}\001\355\230\214emU\323E\371g--\237\303\022'\016\033\355\274\267\271\351T\0327\300\306\253\031v", 64 }, + { "\015\363\324\364\323\220\323f\177rR&v\375\027U", 16, "C\020\362\262F\351H\240l\271\245_G\134\034mC}\277\354\017\377_Ab,l\322_6[v", 5000, "\370\357\015*{\001\221\310\244\235\134\214k\335\310%\274\226\3203o6\223\361\243\356\200\000\340\240\330~\225\266\004\224\254\211\276\270\202^\251P4\237\350^\036\3671MV\317\214\227\022\211\344\022\321\001\257}", 64 }, + { "\312\272\240\233x{\372:;\253\370\330\334#\267A", 16, "\323&\213|\016\3346>\224\345\032;R\233\0056\316:\037\315V?\221!h\0308\231\333\207\221k\035\222\252\014I\2215K", 5000, "\004\012\245\017y\316\355)\320\007\331\236c\324+\3771\247\257|\336C\332\331\317\037\007KG\321\334\235\237\265\301\360\315Im\212\260\012d\033DIb\042\260\025\304\311I6\2158\3527n[\032\347x\371", 64 }, + { "\215R\005M\032\350\240=\023x\0165\246\231$.", 16, "\021\272d\364Y\217\317\346\026\0161\327\214\001\357\335D\030\364OE\264\266\012\270\350c\276\340\327\254(\2638\361O\253\254!Lb\021\014S\234Z8Y", 5000, "_\3748\356H\220\264;\253\233\323\376\2548\235\004\357)\002\277#Gz\253\363j\026\015^\335\024#\211\002\354\207\373E\364\2513\344(f`\214\227\3319\031SIh\260\234\202\301\375\204\315 \002\347\376", 64 }, + { "\245\313\007\234\303h\224\215\356\243\352O\206,e\266", 16, "\031\033p\375\350W\006\004\213\313]3\214\257v\333\0357\016\375\364\021\344\305\323,;_\330E\224\351&N\244\026\275J\354\024\340\310'/(\012V\217\253P\361\236\273PMl", 5000, "v\276{&\342:\355Rm1\362\320E\344J?\015\023\323l\315\331\252\031\245\206\231\014\303\340\022\231\241\332qe\036\226qF\213\254\037^\220\042\324L\204\011q\277\233T\303\350o\217k[\327x2\346", 64 }, + { "\273E~\201\327n\340\231\001G\001\367l\206\021\030", 16, "<0=\371\010\317Aa\375\340\261\234F\275\251\236\024\310d\003\265^\345|\372-\223\305\235\272\344\350\271\3669-Q\264\312S\323 \236\343\352x\304)\341\334\355>j\024\251\377\252-\356\241.QW\256", 5000, "\307\241^1\271\302UOY$\250\372pd\343l\031\205\353\272s\004\311\002R\276\006\232I?\327\020\237[\363\012\2656-\361Z\177\025\210V\204ZF\351w|\206RqU\042T\205+\222Op\235\376", 64 }, + { "[\034\223\310a\210w\351\020J\351\263\240z\034\261", 16, "<\217A\265\347 \264\242\024\324:\011\370b\263\345R\012'\271.\005\350d\027\314\017\034\361W\316Tj\225n\1778Y\356'\012ie\307\342cF\266?M\300. \271\247`\042\344\272\371\013\273s\316\357X\207\304\357\013\322\315", 5000, "\241\224\024\317\303\227\241\317\332\351\301\3567j\326\320w)\275\223\234m\241{B\356\274P\274,\012|\235\367.E\345c ^Z\321\031\352I\042\005\365\264\360\245\357K;\306\202h\350\206fV1\000\325", 64 }, + { "5\265\376M\262\3518<\353of\232AA \374", 16, "WSKsW#\354W", 6000, "o\027\243%Q.\3759\331k\011R\363\367jK\234\357o\363\317\220|'\245\233l\250\001N\203\322\002Q\026\027H\267\253v.\351\242\220\257e=}\010/v!9\346\352\3749\2014q-\340N\376", 64 }, + { "\350\203\337\210]\367\213\335\270\213\232\026\221|,\370", 16, "\346\327\263\312\213\345\005\011'~\221\027\355\241J\231", 6000, "*\022\205kO\256\322\231(\361\367\342\277\266\220\000nj\330xh\340\215O\356d\210\225\303\2373\340\2130;\005\254S\3115R\257g\344\233\023\347\205\237\274M\307\367\327\364-W\246W\203\275\373\237\272", 64 }, + { "m\326\335]k)2U\200G\347\000\311\010\311\302", 16, "\340\250^(]nb\003\212\354b\177\344\011y\300P\016cl/0\016\213", 6000, "\273\333\252\306\015\232\306\321\251_]Y\006\042\345\350r\222\010\372\026\205Mg\373\347\267\014\234\032\016d\210i@n*aP\316s\366\206\200\004\015\017\034\325g\334OS\177\214\374\230\211eP\213rNp", 64 }, + { "f\323\354%,\247\330/\027\373\267@~\345\352\256", 16, "=\354\324\017\336\012\214\370\014Pd\217\317f\364\301a\207\032+\227\2247\201\317\215\333\020\276B&0", 6000, "\245+\223Y\302\363Wl\312\0344J\245)\347\217\027l\027\321\0121\341\365/\263\374t\330\262\210\220\250\354\240q\020^\033M\274\261\350Sp\325\254_\262\304\357U\031*\262$\363\371\030\036ay\200\242", 64 }, + { "|\035\377\326\376\2752^\335\207\230\271\341\326z*", 16, "P\271\315\034\230[z$j\377\266\015\205\3064h_\316\254\271\353\342\301*\366\366\350iV\004\351f}\260wr\257\236\025\241", 6000, "\301\354S\253]c\332 \277\205!Y\356v%\225\367c`gB\006\024\247t\314\300Q\323\225\020d\036\024A\353d\335\007\025\014\245?\252\246W\222w'\301\263\003M\014\300.\014\2420\011\355\342XA", 64 }, + { "\364;\377\002H\026A\016P\352\331g\2407[\261", 16, "p\271\243\3110\372w{O\317\315Q\035\371\221\016\236\215\002\222\317Z{\372\375X\316 8\226\270\024\344\373^>\235\274\320\337\313\366\223\246\336\250\134K", 6000, "\340Lv+w\360\311\322\355_\036@Hd\246\275\324\033\235\274\013RJr&zD\230\345\033\216\234\213\255\237[\217U\367\300\356\331\372\237\021)x\362\216\306/\351\374\314\210\2341h\227|\230,\336D", 64 }, + { "\134.\271\033\351\232P\020\356k\321X\351q\331\004", 16, "\277\207!\216\312\324\347\223\234\202\360\220}m\3773\210\232pe\020\254\371\334\266(\227\254?\305\017T5\020\210\223\006O\223\375\357!+\363\003\245.\325\255vF\350\3565s\221", 6000, "\352*\003U\323P\225\256\254\374\001\337\312\377[\134>\2306\270\001\217V\033\006<\243\265\012\355+\024&\374\313\031\254|\302\006\216\216\250wD\352\320\3128zf\000\205[P\323\013E{\025\353\276\316\034", 64 }, + { "\015\372\205\371:m\005T\000n\3255\366\220\2653", 16, "\266\234\036\134e\020:],5\005\201\331`S\305\224\017kW=@.\025\376\017\353\022\210\007#|M6\354\210\3121N\356\331\033\223\230\344\305sR\241\232p*t\217\366\243\352E\255\332\004\270\365\361", 6000, "qq\245\012\237#\004\316%\345a6\322\340\353\0344\265\013LH`\237A\232\337\357]\363\023[\353\2631\000\277\013\317\336\371\3125\312y\305`\236*]]\204\236\302\344e#L\270F\232\372\267\232\250", 64 }, + { "F\256\277\366N\234\235\316\042\230\263\256\025Q\320'", 16, "\200\254Yq.\205\373\373\0056\331\214\376C\235\277\323\350\261Rc<\177.<\326\237B\353\373\360\313\257\333^\212\303\023>\223\004\327Q\333\271\011I\303\230N\325N\0172vT\011\214\330a\260\216n\017\207xd\264\327\272f\276", 6000, "9\343\311g\224\222\221\275\256Mb\206nD\361\232L\327s\222P\005;\255\027\240\261R-M\231\347\315\3164\264\314F\347\245\372\247\247\303Q\341\241\271\003\035\207\303\304\335,\012\360?Y\320Y\227\376q", 64 }, + { "#\256)c\376QG\273\245\222Y\010\357x\221;", 16, "\315Ysi\036\266I\332", 7000, "Z\213\027\2367\231\205\005\224\300'\224>u*\372\031\003U\205\242e\223\274Q6F\362;?\022\327_\343!\214\276\262\247L\260MLX\247N*Y+\331\361\215\220l\331\213\361\335c\314\203.\330~", 64 }, + { "\360\343\200\367\344\250O\260\215`\247Z\341\274\346\270", 16, "\310\2524/j\334(\344\303\017Bs-\201\264\312", 7000, "\037$}\362F\213\254\306\345R\345i\326Z&\262Q\017\304\210\026\216\336#\220:A]\210[W\246\272\005\011z\337\036g\366\206)\245\201\214K\335#\212\205\350B\376h\034!\235\006M\272\256\225\257\220", 64 }, + { "<\230\261\363\334\357\217\022\276\000R\306\240\210Dg", 16, "FQ\263I\223\375\335\2135\006\374-1/\227\207S\341\202!\372\206\253\236", 7000, "\266|\263\374\266\265}\000\261eB\307;\233\241V\253C\014\224\230\012\326q\276\242>M\214[wt \361\361\205\303\311\320\355dV\245\242A\237MAt\237\340\242K\3133\355\357\034\303\200\0277\267U", 64 }, + { "\213.\310\205\014W\307\364sd\223u\363\035M\260", 16, "\331\007K\015\367D\224\016Q@\243a\264\342\346\216t\2161\030p\345{\227\245]\245\274\235{\322\245", 7000, "nX\013K/^l\377\237\3044\010\277\367\134.\222\215/\3471\023&:]!^\261\177g\272\011\177\374#2\177\326v\251\003\005\374\232z\030\274@\311\321n\323\227*\024H\225PA\241y(\276\361", 64 }, + { "`k\271x\304Cf\230\313;O\277\236\2448\207", 16, "r(\245\265\003\237kT\204@\321\252\202j\242\352\365\366FZZ:\366\272#\323\017\2666U\240v\252\236S\332\011\001\361p", 7000, "W\200\361\034j\376\022\254\325\205\257|\232\255w/0\373\267n~\355u_\331\007\242jXi\034E\254\032S\205\034/\023i\356\310\250\226\3517\201\311\360\237\201\221O\267w\355`\366\217\257\006z\357\321", 64 }, + { "bg\316Zg(\330\371\016:\011^\202\000\235f", 16, "_\177\346\022\375\256%\310\347m\336p`_J\333\334\003\312k\254X,Z\361\372\303#\305q;\343&XT\316`\006\036\215\306\207\327\311\255(\203/", 7000, "\313\000\3670T+\346TF\365[6\223rBb\241\267_\035\321y\315o\255\321\035\361\230\371\230\015\264\347y\364'\376-\240yL\036\260\265\234\265n.\217\312\261a\234\032\227\257\207a\331\354\010\263X", 64 }, + { "\350\026px{\014~\0317\015\314\231h\336\237\217", 16, "\347A\307^u\267Qc\027\235j\323\012\315\311\031\234\2003R'\015\221\370\030\227\003)h\214\236\012Qok\210`\320\227\307\354\303\305\317\314~|\014Z\012WA\036M\322I", 7000, "\227|\356\271\333\257\235G", 16, "\311\372\032x.?\3452L\331*\235\356\356\261sY\313\266\260\014\202\333\016\006\322j\3516\007U\377\215p\177s\267&\010\352\010A\361\315\357\0103k\220\311\042\250\267\022\312\030\034>\343\250\320\300\002\0123i\361\025~V\037\273\277\322\272sI\375m\375\337(\345*\220\362w\231\373\315y\230\273l3\017\226\260`", 64 }, + { ",<\361\027\343\375\355\265O\264\234[w5\261\340", 16, "dS:\242\350\2612,\314\224}\367\361kW\335+Gj\357Q\355\251i@\326r\024K\346\034B\340\360\242\356\016\272\216m\232u\220\300\236\333\312\363\036\241(\322&\244\211=\275\376\006.\377\013\034\220\020\306\353\274\374\042[\300", 7000, "\277\364m'[]\305CMd`\345G\237\352\371\225\215\373j>V\362\241!\364l\033<\236\364O\023\276?n\231\207\3735\201r\270\305\337\177'b\031\014\251\213\217mZ\320\266O\211\364&\0304x", 64 }, + { "\225\306\272{\341v\275 [\231\230\317\371\363Je", 16, "\343\036pA\252Q\264\242", 8000, "sJ\331\240\3206G\226\015\2441\370e\317\012u\356\372V>}\251l\1340\033U\177\215\316\317\037v\226\016\272O\275Z\341\307\370\317q\311\010\332\304\012a\375\343y\336ZT\377-2\361\203 \042\336", 64 }, + { "\320\231-\337g\034\212\004\342\037QU:X\277\316", 16, "\216k\037\361.T\244\366\003\010E\323U\233v\240", 8000, "\021\375\214G\326\017\316\350\013*\236-\013\026S\223\310,d\036L\311\032CM\006\0352\241\232\000\342\224\025x:\215S\2146wvh\205\306-[p2\003\322M\224\353\237\263/\216\134`Z8\273_", 64 }, + { "*/E\206\367\224\243\334\243\262r\326\360\231*H", 16, "\345\315t\032\021\207@\026\330=HF\320\204\304\330!\232Om\322\246\0260", 8000, "\200\306R\350\230V\334N\020\001Ol\242\024yN:\350\241\332\214\262\016\2629V\264(\2059\220\326b\340\303\020h\232gb\202ZCiR\275z\347+\326\267\027+A\246!\345\206k6\344\255\264*", 64 }, + { "S\345P\373\311\016\352\202\352`)Ecl\336\361", 16, "\376\007\354p2\333q\006\237q%\037\220/,\007\264\366\006-\335\273\235\377\036\345\035:\351\042k<", 8000, "\204\256G\244\332\302{GC\274\335x\200\216\001\232\211>\263\211\360\032\031\267\236\317\257\211\273\031u?.M\022\014\220!\202\225\310_VC)L\001\323\362\014\231\341\244\350\222\022\243\361t\364\357\316G\257", 64 }, + { "F\042a\201rU \373\374e\273\351=\364w\222", 16, "\212\030=]!}o\373VP\036\303\376/\373\322\025\222n\234\300Rl\264\010\2311(Y\275\232\3137\013i>\327\233)\207", 8000, "\233\276*\331\257\377\012\270|\212\272\2466cAh\225\024\334\2332\026\177\330'\006\210\210V\277\323\251\211\230\212\363W\2258y\224\236=9\337(]\010\3171N\342\016.Cjm\322Y\356\26574\207\332\355^\351f\0258\343\267w\361B", 64 }, + { "\305?\017\233\177\271m4\354\221@\216j\376%_", 16, "_,H\223\264<\314\342", 9000, "\236\314\367\273Z6(]M\214\215U\254\264\325Gb\24793\042l66\014g\317\342a\236\317\251\254CaS\326![\210\303\323\202\032f\014M\247\034w\225a\220\303\332\024L\317M\324\022\023\206\316", 64 }, + { "?0`\205\22034\220\217B\361\242\217+'\022", 16, "\177\315\237t\250\213S\313\337\265\337\371]l8\026", 9000, "\377n\327S\215\306\365\346\375Gj\247\245e\2004\343\202\221^_\275}\323\2345\302\007\333\337p\353\265\222\350t\227g\356\032\272G't\242r3V\276\362Lf\222\016\244Ez\200\315\247\370B|\372", 64 }, + { "\306$\211\276,\353}W.\355\274\330\215Ay\346", 16, "\330\362\015\255\012+e\264\241.\036#\377\327\001\011\205\254i;[P\223\363", 9000, "\204\003\342\235\365\213\361\303\3248_\324\346\330RpT4\235J\0106j\263\032\2113bjHj\233\332\365oA\222\247s;\250\247\017\377U\354-f\005\277p\377\345\345&ILO05\232R\325\311", 64 }, + { "\257\364\250\253\267\304/\330\357ch\230xu]1", 16, "\247\336\344\240\322\251G\223\222\225P\370\322\311/\204f}\253\222\252\363y\214\346\016x\262&N_\002", 9000, "\262\003\321\0362H\220\310\344\306\265\020\373\300T3\2652+\252g\275\225\224\036\357\2050B?\375E\273\232\344\024\310\344Zh\004(%@e)\264\202\2022iAZ\030\210\033r\346\211\332x\363\023\032", 64 }, + { "\340\000\323\220e,\371U\242\254f\245\272\337\001\357", 16, "\215\306\001}9&\307\2221d\253\212q\236\3316G\005|\015\042\012\361+\005w\270\367\211\332N\026\331\037\250\014\212d\330\246", 9000, "\260\342\217\247s\321\350A\016\221\371\222W\304&<`\312c#\366\002\225\241fJ\033\211F\252\300\251Z\313\225q\202\036w\253\264\277+\361\256\235\354\300\203g\334qz\310[\022\326\212\223\314H\247Wg", 64 }, + { "\025[\275\212\134\0013L[|\034k\356Q\321\267", 16, "#YZ\033(t\272\257\363\262\134\225y\206zF\234rB\266\221\254\367\310\042\264\270\236\026\372#v\354\213\265\372\221\304-i\020\042\0107\344\253\3678", 9000, "E\267\177\372_&\305\201\215\351\335\007irx\302U\037\252\012q4\201U\356%\366m\245\202\373bqh\244;\271z\372l\2516u\267\004\013\246z\274F\021\312E\177\2159|\037\033C\340\351\332\353", 64 }, + { "\312\016\206\247\361E\252\245\001\033\031\234\227\246L\332", 16, "^S8\353\353\0307\031}\012\247}o\352@\027\217\200s\220\206c\320`D\270\232\275#\361\223\210ur\361%\003\034\3607\255E\016\271p\336\274\260Q\027\0136r\246\025\263", 9000, "\202d\317\362\315$\311J\377+\037\244V\342.\336\363Mx^\347\202\206Vm:\363[\3353\324\316\3403\012\357\351\364\221TN\340\275ALC\033mC\224\225\274\000{n>i\327\006\221p\360:\020", 64 }, + { "I-\350\031\2302\352\226OO\234*?me\030", 16, "\004'\254\034\206\216\214\277\213/\235\237\007\312K\347\034\361?\376\327C64w\313\300\004Z\226\207\303\363\0066\377\375=\341\371\207Aq\247V\237\024T\246\200X\342]\005\356\337\273\023tq\226\032\021\202", 9000, "\367\317\013/\030\210_\377\013k\366C\234s\237\011\212\330!.\016\263@\353\017\007\034\345B\212s\204\371q\336;\334\032\313E\324>\326e\344\304v\205\004\342\000\343v\025\346ZO\2243Y\264\366Z{", 64 }, + { "\237\234O\246\003\264m\356\326\201\266\313\345\227j\324", 16, "\027\016\205\250\331\027\275\260Q\032'\204\373j<\233N\251v\234\346T\250\270n\017\244\225\275\340\354\346LJ\376\2779\2311\311\312P\335\036\323\202h\255\254\376\261\350kO\3324\277\266\223\207Q\263\373\351&\0030\247\330lL9", 9000, "r\036\301q\371B\034\017/H\010>\242\326\247F\353\014\333:)9\353\261c\003\177\223\3277\250Sm\263\306\316\261\341\321\321\134\232b\312\235\014@\336l\330\3356\001nw>\363\015\210O!*{Z", 64 }, + { "\227\346\344\330,\020\250\376\033v\253F\236\207\374\245C\230\255&\277\300\310M", 24, "\333\256\034\031\307s\315'", 100, "\267@0\237\025s\217\307\3646\231O\246za\000\340\233Q\254$\277/=)M\250\213i\245\275t\333\322U\256S\025\030<\200fFkO\2528Y\272\243:\033\315\304\313\237\017\356\255\274\357m\323\215", 64 }, + { "\3410\3103\201\025\037\366'2\340N\277\256q\345Gc\020\036kH\373w", 24, "\302\330?\225\200d\3510\335\346\211\317\324\365\366*", 100, "FN\014\374\031a\240\212\202H\314\016\371|{\025\267\243\353r\257\365{35\134q\252\205\357]\317,Y\350G\206\365Tuf9\356\267\365S\371\332+\245f\332\213\371\320\215\215\300\242\243\216F\361-", 64 }, + { "\265\001\263W\336\011\274\204=\356p6\210\000\216k\216k\203\365>W\275k", 24, "\270\342\331\242\013|j\306\324$X\035R\365\326\242\307\036Z\321\303\357hi", 100, "\005\301\361qhJ\263\253\2069O\003\242E\333Z\014\003\274\336f\322De(\376\024T\336\250\2111T\270\320>\366\266\311P\177\234\264(\015Vd\260+ De[\0301}gzZ/\263\263ma", 64 }, + { "C\347\306\033\005#\201X+OL\177\310\360:\207'L\316B\325\264\324\264", 24, "\021\357\353jzG\377\235V\012u\262'\256\354:\007\343A-'{Z\204\204\226\321GbTP\270", 100, "\200GB\211ui\244\352\343Sj\207|\250\213\035\010[\335\312\345k)&a\035\363\213\371\217\212\317\364\031{]\355\315E\222@n\026\375k\357\004\3505\025\226w<\134\226\324\326\254\345$\322l\302\247", 64 }, + { "\236\030\042\231=f\332wq\260\342\364o\372S\374t^\343\027\374\006\002\024", 24, "\344\273\215\371\325wt\273n\225\221\020\263\214~\226\266\237\226\323w\026\313\327\377\201\022\226\356.7`C\362jR\217,\362.", 100, "\235\361\025\375f\302\004\271\274\003\354w\027\001f\034\246\323HME~<%\303I\037 \266\042\335PY\306\134<]\364\377\026\254d^a\327\275\012\134\223\027\265\277\177\035W\3347,d\362\250`\006\342", 64 }, + { "\035x\237%7I1\271N\370\236\340\214p\331\367@\355o\134\256\032\355\243", 24, "3w\231\014p'd\220\317\366[Kz\241\271\010\200u\225.E\277\313q\262\341\313\031\271\205\016\024\3616\021\345\030\254\367\314\312] \026\211\273fs", 100, "-\300\221\205rc1\013\374\370_xC\315\013Y\21477\320\202m(\345(%:\260\232\304\004\263\303\275\304\317D\376\245\331K\310\027\343\322\221q\200.Kp\206\311\231\306!a\240\203\324^)%\026", 64 }, + { "\023\366\263t\006\015l\264\316Gq\271\3468j\220\271\232\361\223tW\224\020", 24, "\365\367`yT7jO\360\247/;-K\241\031\227\034\211\251[\236S\015\035P\304\256\342E!q\205WJ\207\373\016\006\355`\235\367[~\300\264'\232\200u\241\234\210io", 100, "\271\034\330\262\216K\312\224\375\206\243\341{\372}\232\210R2H\032n\264\377J\021*\263\022\240\277i\242\356GS\302\243b\230@\034<\261\276\025\016\340EIt$;\347\221\024W\311\275R\254\272A\037", 64 }, + { "\373Oc{\307\313=\3414>\340\016\245\217jar]\035\307\252\010\031\025", 24, "kk\262\256\340\255Z\310\235\020\320_\032\345\260\243\352\202\321\301\246s\300)\3314FJ\267\361b\237\034*BrjY=z\336\300\344\370\371\035\227\334[5*\325\3152\233Z\022\302\3733Wr\012\005", 100, "\246\372\3420\204\346\034\314$wZT/\240\376d\252\354?\331y\225\037\252\374Ah.\304\3737\242\013K\351\035tH(\255\353\240\214\304\350\245s\273\326\265\340\300\253,\022/\311\223\024\3369\002{V", 64 }, + { "\201\012\000\332_\206`\206GD\336\346Gm\227j>\301Y\333\2658\354\001", 24, "\361\321\374qZ\346\016\307Xm(a\256\301\002\245\352\216\244/ca\247,\315V\017+H\004\355wmR\225Upz\373\217\333\206\337>\257\313\275\307\260\342PS\013\260\356\377\322\267e\027\250\030\262B\012\346Q\260\025C\311\317", 100, "\254\012\230\016\257A\017\210\264Z&\234\320\375BRb?\266\012\2509\222\355UgM\322Y^\321b\225\243\353\374\374\224\2545$q\030\030\370\332M\302\350\014F\023p\033\201\316\004\000\270b\016!)$", 64 }, + { "n( \210$O\004\366\207T\3158\361!\212\3606\317<\330G\250\260\272", 24, "\204+\330\321\244\030h\275", 200, "\353Ko\207&\357t\224\036\266ob\222)Cz\360#p\020E\357k\320\370\007R\375\311'\347\007\364p\340\341\275\220\341\260\032\316]-Rthu\206\202\255QY\251.\214\245\330\007\312\354@\375\204", 64 }, + { "'\273`n\012l\345{r4\347\264\223\376LW\311\363P_h\302\001C", 24, "\324\200pH\263\220\2615\305\341\371Gp:\323\322", 200, "\205-\343\243<\333\375na\337\314\271J\354S\300D7\011J\364\023?\2222\360\267\221\010Fr\256\366{\366\235\255\331K 1\370\307V\373\020o\363\367\036\226\004\246G\331o\321%\314\220\254\234\317\033", 64 }, + { "\345/\334G\221\360\212(\211i\247\012\215\223h(P\366\215\371\300w\336\274", 24, "o\341\236\363w\371x\217Y)\013\331\006\034\222\007\221oA\022\037\332\252-", 200, "os\235_H\326N\300\244\310\361o0\202j4\334YO \345#:/\227\042=$@\363h\212\365\376\277\34220\301\371\373\250\327\201\374\012!)_\001\346Y\2061\220\302e\323\004E\364\025\334Q", 64 }, + { "|fm*#\220r\246\343f\364\364\241\370P\313\315}\216x\303,\335w", 24, "\342\177\034\326\226\223Oo\035\214\227\361\305\316\314\307\323\223\353\271\303_\213^\337\017\204C\316\037t\345", 200, "\2571!\373\364\361]\225\332K\267\042\317\314\030\2360.\257\037H\215E\276I,\356\033\13411\267\335>;\226\254g\2532\024\323t\024\237\275\014\021\267\251\004\004\331o\305\036\256\221\234\242\210[\273\271", 64 }, + { "\315\3742x\230\331D\375G\256R\363g\316 \024Q\034\317C\271X\240K", 24, "<3~d\026V9\2178\224\202\324U\335\006%\270=\225^\001l\212\212UC\277\270\233r\211lR\300\275\223\275\300\346J", 200, "`[\366\233Zk==\042\033\211\322-r\354e6D\210\302\275\247\274\374\0266\203d\234\315\331\244\2671\226\014\336\243\350\216^\206\255\242\023ueK\017%CN\002t\300N\244\272?/s\243\200\327", 64 }, + { "v\313\001I\364\011(l\005=7\330\0012\000C@w\317\206\230\306\363\000", 24, " \300\300\271\3443iMC\254\301*%S\325\211\212Rw\350\3027N\233\237\334\3134\204\332\031HS\374\3749\214 \3503FN\367\002\030\312\351D", 200, "S\007a\011\031\231\366\371g\003@\3407\024\016\376yl\373M ksH\327=6\210Y\225Q\325(\2348\334\362E/w#\375\354qY5\324\356F\212\232:\033\231\306\235\302\321\330y\226\005\260X", 64 }, + { "\335\002\277\030F@\273\340E\000\300\304\372\322n\230\262\354\032\250/*\351\230", 24, "\270\207\0010\377\337\347\375\213\331q\315\033\371\253\012n\275\262D\267\226G\367\371P\213*xA!\364!J\342\2113\242\321:\205\203hF\015\315D\026\313\353[`\213`\374j", 200, "3\301\365]\214s%u\230\234\215e\331<.\347<\320T/\254\351\243huF\003dA\341\342\372\206\243\005\277\257\033\364\042[\200Y\326\017@\015\271R\225\035\330z\37523*\313\3347\027\226\325\355", 64 }, + { "C\325RQ/\246$:h\177\362\331\223\261\312\006\237%\326zY\375\033\341", 24, "\002d\2740-\177h\221\356\310\211B\036K/H\335\336X\326\324\3304\251D\365\377\234\220\375\325,`\003O?\340\276=1\246+\231\336\233\211\272\265\257K\036\316\333\204\223g\035\336s\347h\230\270f", 200, "[\037\344w\257\272\235\230\032\270\263xh\361\014\273\350:\273\201Z[\314W\254\224\222\364;z\303\372D:\022a\366\266\364U\3467\314\337\357\246su\014FO\240\030:\325\362ZA\363`\362\005q!", 64 }, + { "=e\0029fU\375,?\262\327\273+f\013\263\201\021\027N\026y\341\340", 24, "\312\204\344\332=f\0336\341\017\264#j\216\206\236k\022Z`B\242\355'Y\016\267h?F\270\213B0\245;\367f\363\246J\012\200\330y\230\200}\347$\243\343\216\032\037\006\271\214\322X\255\256\032\276\021%\263aM\264\252G", 200, "H)\352\343\007'}5\333\013:e\354\225zG\271\032\340~\262\351\261\177\004\227~\333I\363\301u\210S\252\231\340+R\271\336\317\027\354\351\364<\276\220\042a\373\320en\370\001\301\305\356\344\244\236,", 64 }, + { "\376\374`\300n\003\362\372\017\2253-\307\232\264a\351F\247\002\011\270\336\311", 24, "\023\265B\220\374\244\304\323", 300, "{\346'N\227\254\343\334b\323\220\316&\335\375\227\013\314K\214~E\374$n.Mi\337\223\326L\361\342\237\242\257D\207'#\237\373.\2729\363\005\003O\216\011\005$\261O\214\343\275(X\336]\317", 64 }, + { "\177\337\370\037J\313\252R\367\027-\303\274\322?(]\370\017_?\010\360a", 24, "~hCg\251\003\302}\372\2644,v\264q\251", 300, "\003\253\302X\215\255\034\206\337\272\327Z}\206\000\333\311\026\377T\336\347\315\341>\210gsS*\276@3(T\340\263#\325\327\335\027~\310\201;C\2723?\042\341R\346\247\273\355\344\002\300\341\314\245\345", 64 }, + { "mD\363\333\332\276\206\023\340y\331\010\326\322\331vHX\265:\277\042\350_", 24, "w\011\263\376{\016R3\025\013<\033\261\320\024\017\356)\371\235c\021\353\262", 300, "\304\010\302K\273#u\237\227\3135^\134\2743z\326F\265=}0#m\240@\303\020\356\373\042Xl\223^)\242\031\374\215\031T\316\020\203\255\273$\024\034h1\370\270;\276\277P\250k\252\352\232\371", 64 }, + { "Z\2556U\206\026\34258E\247BT\276%L\367\0119r\032\233L\272", 24, "8@\034\305j[D\015A\317!\227jgy\313D\315ZIu\367\266{@]\335\311}\351dC", 300, "\022\23418\340\022\235\005\024\016\010m\217\370\271\262\307z\325\003\237:a\216\255w\023y=#fx\323k\346\215\331\275\206YGw_\261\353\007", 64 }, + { "\247\005\202\025\315\206zP\360\241\134\036C<-\006\327\363\201q\251\002`\267", 24, "\271]\336\352\244%\215\020\330\3458\377\225\350\302\237\253\033\202\367\265\373\331\261o\250\031Q\374q\217\254\233o\230\375\236\327\333f", 300, " ~\303\251\370\211U\337,\237Ln}E\320.k\245\246i\234\202r\314\324MU\365\377v\3177\266nXT\002%\346<;\350\3354\262\330\275\303W\242\014\024UN\274Hd\210 W\244\222Fv", 64 }, + { "%\312/\275\212\305\002\376\340\362\311b\224\3203\012\317R\370]\336\204\260>", 24, "\343';\334\363\247E\332\354\203kj\3654>+_E\310\353~xO\202n\234\217\227\360\371\261\343\314E\331-\210\203\032]\177;)$~\333\367\313", 300, "\2553\037\301\022E\356\010\274\241\216\332\333\037!9X\374z\314\306T\345\274'Z\256\375\036\355HL\337Dw\276\235D\225\213\304\214\350\250\031\316\200B\317\320:\0253\233\233\025n\264\016Y\271\242\035\316", 64 }, + { "\273o\033\015`\0168\005\343\233[\262$q\314\315\246\011\036(\233\203\211'", 24, "Qsa\3029\213*\321F\261}\270\357\330\030\200\335\375'\261cT$\2101\303\035\253\024\267\240\246\377&\316\357\331\221\361nl\0327B\015[\332h\333\376\351\0258\232\203\321", 300, "\260<4h\346\217Q\237=\376N\213\261R\257\374@!&\300\311\027\263\346'\230\377\224\134\225\237\002vQu\006\033y\036D\357T\362\316\311.\321\271\207r8\304\035T\226\233\326\345,\327\361W\217\364", 64 }, + { "-\207,\240\261txU\001\360Q\213R3\332\236\037_7\016H\261d,", 24, ",U^\351\036\003\300?0&+'`\363\252j\202\270V\375\007\355DR^\032\011\237}B\304\031\267.[\266J\273]\325y\335\327\2555\201m\233\254\352A\315\214\337\022Q\270\330\367?\363A\021f", 300, "\220\326\330u\2268\305\223\255\2359\332\203\273F\203I~\012\232g\001\355jb\224\212\226\032\277\036z\326\0361\265\025[N\226\261$f\216\311\236X:.\366\036_\020:\247\004d\276_\276\237`\323=", 64 }, + { "\276\035\274eI\033\356\262M3\021I\315\006j\241T\025\216\342\246\223\035}", 24, "1\316\345\252\312\377\027_\302v+.\276[\002j\006\266\233\037\265UR\023\255\244o\263\333\276+\264s\336\304f'\250\377\003\300\006\320\006B\375\205\300\332\341p\241\223\254\024j\274\231\024:\003\276\233\232\006\011\201\220\356\257\257\361", 300, "\271\353O+ C\226\325Qu\362\201Cb\304)\014\367\001\376\243\027\360U\273\356Y\235\234\357\243\002a\210\324\017`\304F\317;\022\014\021Y\375?\356\343\253\306\371\006\330fdD\333O6\042\203\214\354", 64 }, + { "\342$\336\336[\306\001\033/\216\277\201\367\014\257\362\331\320\374\036\034\361\371N", 24, "\220F\317Y\0232\2022", 400, "\351\321\325*\035\023\026\377\273d.\016s\225\276\321.\330u\014V+\331Z\223\365\034\371\377\236^\203\213\240\375\220/\313P\024WS\331\034\251\347\220ux\231[$\334:x\014|\344\010\233U)\276\344", 64 }, + { "D\255;\367\374\305_\373\372\020$\201\275\3735p`S\330\333\246\271\316)", 24, "\300M\273:\024\362\017\002\247j\376#8\321\260\346", 400, "rW\235\326[\326(\001\223\221\340\316\006z Z$\217\321\372\3722\277\024\334\025I\252\374\134\232\342!\2111\351\323}^\324\217L\032\350n1\372>\311\001\323\3239\321\345i\262\323\013\014\262j \336", 64 }, + { "\200q\243(\134z\361\042cG\335'v\231\025X:\016\316\0170\342hH", 24, "!8\347\001?\220\313\251\3042\306\201\004l\012\356.\177\367~e\305\3269", 400, "\371\230\253b7m\177\266\325\344\350\375>!D\246b", 24, "\314\354\361@\255\027O\232\037\322w\032\316\356i\023\333\331\342n-\301Q\002\244\2328z\026\304$\372\366\260cc\310_S\236\241\237\304\212[\022'\365\226e\016_X\303\323\005'\374\010}O\336\242\321", 400, "\273\265\023\023\343\261\201\026t\300\270#E\336\012I8\300\271\011\016`\234\326\2417\015\311t\012\322\341\355T\335\254\217L\243\253\211\364\234d\222-\344\203\027o\342y1\305\266\261$\316\376\364\220\317I\267", 64 }, + { "\275\272\371\314\250`\370\331\324d(\227\364e\203!\014\322m\254kH\012\354", 24, "\2617\007\347\243\255u9\320\226\035d\341\311\344L\272\352\023\256\361\332\364\2700\014\247\331s]\234\223\223\210/\273V\364\335\015\032\267\357_\001q\310\367\260E\374!E\335\200\337\316sQ\205\023\240M\355\267\250\020{\207\254\231i", 400, "R\300\302\270\242\312\331\300\376P\201\353\0128\370\241o\233\316\260\030\222\303\322)\376\017>\007\011\005\222JPb\361\233\340)\036\352\242\035*>\373R\020\203\355\340\000\0212K8\311\240\266\134\347\351\216\326", 64 }, + { "\330\2011\262\366s\232\025\317~\260\312\237+J\202\020t?\134l\207\310\304", 24, "cE\245\266X\315\3545", 500, "\315\247\030\277\337=T\214\254\331&\364\374\030\246\000]\220\345\274\373k\243O\0234\006\210\2606\031\360y\205\226\221\212I\341\006\216M\206K\211\342\314s\343\327\316\353A]}z@b\0053\202\212R[", 64 }, + { "\250+>b\307\310\001\233\331\261o\360>\206\2733Dp\340y\017\372V\023", 24, "E\241\134\345\365\327\016\336D,\217\032\022E\233\262", 500, "O5\263\352\317g89k\247\351\020/\037\3033\370T7\304\256o\216\337\227\321\225\254hH\211G\316\224j^c\271?\340\036\003\177\001\205Y\303a3\376f \021\211\344q\362\255Q\341\264\244u\321", 64 }, + { "\2153$\257\243\042\257\230\3443\276Y\275\000\354^\363\317\342#\343\272~?", 24, ")\246LD\006}w(\243\307w\260\336\241\024w{O\237/\236\004\230\016", 500, "\304\373j\036\0062\302._\327q\002\302 \023~\367\007.TC,\206\177DX\275Y]\224\366\232\212\001U\207z\305\233\317\320\203\3543\353s\374\012\272q`]\333W\305\250E\336VG\223\343I\257", 64 }, + { "\224\302\305\230\315\313\231\243pxO_\014\374\342\256\237\231\356\330\215:\260S", 24, "\310D\2217\341\363\362\243&@$\221\340\320\266\213\236`LOy:'\300\244\314\212\302^Q\373\376", 500, "i\311\241\337\357s\333\356P+\023'\330\310\273\205D\354\233\343\310\306;\037\213N6\230\006\273\261H\272X\243\367\341t\234\035\263\2034{\203p\034\371gY\265^_\010\267\321~\272\34364\227\322\027", 64 }, + { "m#\277k\323P\307\256\351\316\020\370d\202\377\023P~l\024\201p\033\015", 24, "\366g\225\335\215\223\322\241\007\333\007Y\275\343\330\267\346\003\006\306q\332\317\355\355\377\373}\303i\3322\262\322\221\226\217\305\027\354", 500, "\351\011\202M\306\035&\257KE\357\361\3644\243^\272\346\024\375\267gK4\010y\013\021\361o\253\025\2719\267yk\374\261 [\010\036\360yP\311\351v\0252\236\270i\217\356\022\006\214\224k@L\343", 64 }, + { "\264\276S\014\276;\012]s|\330\273\223+\222\230\004j-\035u\260\336\364", 24, "\177\010jO\370\237\274\370J\333u\240\013\255\374\3621\342\013\240H\374l\372\225\016\266Vy\315\371\030*\024\231\302pLl\234\336\255\271T\001V\254\263", 500, "\225$\317\031\226?\314Cy\201\035-@<\030\252\205\014\245\231\277\271\013\317\375\260", 64 }, + { ".\373qW\226\272\303\354\235\374\302\320h\345\357\034\014\250\344\266\244\325\244\270", 24, "\240/%\223\314\333\316\363\361\034q\245\312\134]\254\263\267\255f\225\217\313\313!ax\035\273\264\272_\027\037\323c\253\271\372\246\013\361\305\364\014\016@-\310\361\233Tc(\015\014", 500, "\010\250\337\244J\255\022/\001\035M\334\2426i\327\255\012i\333\217Y4\250uG\007D\225:\276\344|\027(\311\302\307\321!!A\003\343y\202\247\267\253R\032\312Y\243\134\007\252\321\236\251\364\307\342\366", 64 }, + { "3\244\330\322\257\350\201\244$\032V\270\032\236T:YU\211U\265\327\262\355", 24, "\227o]\354 ;iq\224\345\203Z\231L9+\374\316\265\226\226{\375\377\204\007\223\274\273RH\244\134\243\224A\337W-k\362\372\317'\207\023\272\361\347\015\3371\344\334\226\277\215\277\237\351O\307\362}", 500, "I^J\373\327{\005\200L\373\304\022M\022\250J\253Iu`\345;/\023\325\362\001\032\367{B\017\366_\034a\257x\000\025}tA\347\332]#_\260\023\211{\301\310/@.&\272-\005\323\262\355", 64 }, + { "\343~<_Kd\253{\262\357W95\256\337n\325\336\357\257\260-\227\011", 24, "\251\014\025\254\015\257!\326\256@1\225Ay\027\311\313\204'#\230\306\254\036\324p\221e>\230{\373ZP\236\025\025\3610\001\313\002\275\315\204\263\332\315\342\003-\326\356\216[+\270g\255p%\224O\306\365\241H\262\001q\231\346", 500, "\307\204\357\347\320l\0328\015\373G\336\271\322h\326\034\245\301,G\215Jf\031\177\355fhtW\034g\266\316V\034\222\042\346U\253Ac\036\304g$1\004\244\245VP=41\313\200\272FJe\374", 64 }, + { ".\246\322\250\363\276\370\266\342\207\226\210p\366P\025FM\371\232\203*\036\303", 24, "m\221\370\307\016\020\374\317", 600, "\252D\266\320\035\2649\007=\003\326\355p\332;\021\277\360\200\255\033\313w\366}\201a\325\377A\033\365\321\320S\357G\241e\344\375)\0303E;\256\017 \031'\223\204\2630\027\253\225\354\305T\366\360\005", 64 }, + { "\277\010D\025\241\325\032%\235\032y2A;H\020\214\333\306\356j$", 64 }, + { "\002\261>m$`\016\02494\263\307\353\263\252r\006\356x\223\215\321\236\037", 24, ".\222M\266\201\371\370\375\214\134\223)\242\011\371\225\365Y\203*\365\275\252\037\262\315\024;\032\256SuK\275hn\231\233HN", 600, "q\223\223]O\3412\371D\304\246Z\277P\267\307\247\327\213\036$\223\234Q\021e\332u\004\240\254\316_\012\036!\230\213\233~=\233Ay/\313\010\204\207\220\312j*\016\324\347\042=\017\217Qn4\302", 64 }, + { "\216i\036Z\247\365\202\373\255\243\035o\301\221\013\3434*r\347\214\002\342T", 24, "F-\311\364o3?M\260\205\340:)\302.>#\203O\340\245@6\375\356\313X\267\302c0\014\325\261{\013\267\253\277\027W\254\004a\353\350\255b", 600, "Uq\242\257\354/\372\365\027\376\020\267#S\277\237\300\314t\021\234\370\034\320\206-\357T\272\370\204r\002ZAsX\356j}\012\2259\247\231\211<6-\372\027V8ZM]\200\2344\227\276q\033\322", 64 }, + { "g,R\261\255\355\242\315\344\302\207\312\216\326$&\246\352\351\004\230\372\357\342", 24, "\011\237\227\033\026b\224\320Z\340\2019r\220\367\304m\256%&&\3424zt!CY F\014\347\345v\255\230Se\372\021\242\203YH\277\262\213\301\327\267\314\036\205\0020$", 600, "\020*\217~@\030\030z\241\300Cf\230\362\037\343r\203\344A\304Z\223\2310\331X\377\365k\237\245'l\223\024\012`\345*\324?\310L\344!\270\340>\001 aL\220\001\221KD\235n9\333\362\227", 64 }, + { "-^[\305D\215\276\210\007\255\365\315\023\340\343\011\212_\340?\215(\221|", 24, "'(\221\177\261K\003\247;*\201=\251?\240\345\026U\225\252\355lg\342\310\021-\006\004\270-\256\340&\007e\304\042;]K\306b ;h\222d\353\277\030\332}\355\030\001\347o\375a:#\207\232", 600, "\213{K\321\232\301\253\312\037\324\340\2454\262\376J\335\210J\235\252\220\370-\004\042\134C\316\025\275Te\250\333\212\227\324\035\006\244c\273\004Mq2\276\373\005w'\212f\266u\010\320(\361\332\217W\000", 64 }, + { "E\223\025>\255\312\337\310X\234\377\032\243\275\366\347~QmZ\027\013\257l", 24, "\202\021:\372K\001\252\250\363`\260Lk\255\042^|m\312\370\200,Gv'\255\024\022<\357\346\002\016b\252\315,\303\374\247\326\324\352\254\322\250L\306;\315\311\374\264\042z\354\256\304\021BD\231%\236s\321n\236\251\022\006\262", 600, "T\024\252$\261\307\0362\033@Y92dA\366\341\204\33236\265\357\205\232\266\027oI\245J\272\233O\215\317\302\246\374Ko\204\270z\356\236\042\315\360\312l\231{\274\026\225\221\345\377\343MG\321\320", 64 }, + { "ew\357\210D\321\347\2421\315\323\264_\036\253\332^\253\325\271I\211\212\250", 24, "h5\202`\361F\354\312", 700, "o\325\241\254!\217\211\331~e\346{\211Z5\371+\353\334\134\034\207\213\243\270I\334\317S\312X\344\326y\217f\261\021\243\223\251\015h\022C\303\026\036\222E,\203\366G\362Sy`\3241\3205\262\265", 64 }, + { "\275\247\376Y\223o+\2440\255\024e\351\324_\203\206\326t\333\134\332J7", 24, "trXoC\241\333\350\3415x\210\356\307]\243", 700, "gyBJl\234\206\356:\023K\310gd\312\200\346\320\2479V\272\340\000\024J\316\362PI\271\263\202\022Yhs\302L1\234\037\267\200\312\3641\0171\265\217\215\205S6\243\222\300d5x9\306\275", 64 }, + { "\001\024\003\337\276\355UDd\202\271\302\262m\021\205b\021\234\3108\220\226\343", 24, "<\015&\212c@\264\015n4z\261\252>\355\025\231\363C\224\311n\313-", 700, "g\2301\253WQM\014\240kG#\037t\014gaF\007\234\317:\261|C=\344+\252)~*Pr_\037\376\013y,\377\376\344\2419\266J\227\260\2123\225s\344s\224(\204\024\344@\001c\255", 64 }, + { ">\030*\353\341\240\203\312r\031t\260\265\012\345\331\354\016\014}\306SI\351", 24, "Z\020\013K\254\006\0164\347J\264)O0^a\025T_(\243\025p\261\210j\203\260\233\026\263\360", 700, "\223\3078V\010{G\373\301\030Ea\340\335\315\251\237\257W&B@\022+yHu\2165Y\377p2\344\003\340\341\326f\134\262\267\253\037\300d\312\030t\030\324\211\032Y\255\257T\237K\332\220\310\307P", 64 }, + { "\374\310\024\302\321W\213\250C\252\275\336\024\341i''\022\373xg\007\247x", 24, "\3404>\007'\303\215\331\2719\357\362\010\2146Nf,\272\304Hd\226%\251\2659\252\336\224@\355\357W\024\322\265\341\355\226", 700, "\273\207\247\374n\350\247\030\2469m\313-'\204\200h\022\356\320\341\302\001%ON\343\244\316\227W\212\3252\317\234\366\275,\033\261}\325\350\341\207\203\306y\010\034{%z]r\350\206\201{\017\330|\031", 64 }, + { "\240+\274h}\2040K(f\267\320\015\265CC\337\226\200\335\032E2[", 24, "\240\266\274n\2077\260C\005\223\036\004\011]\322q^*3\276\235\226\320\027=\344$M^\227N\370\022\234\313\007Wk\366.\205\016\365\350\200\020\217E", 700, "\212\232\234:U\323\302L(\362\221\016[\270\266\001v3\253\225\340t{\016\226|EC2Jx\377\264hn6\331\266\014W\245\233\277m\020\353\245\023\221\016H\000|c\307\362P\027)5\323\0230\344", 64 }, + { "\030\307\267{\345\270MM\201\325\330:O\224f\313\005\311\325\310\210tJa\022\002\010\374\335S/\247\253\270\010-\205f\257?\330\234\032", 24, "\335I!\203\271D\364\336OF\220\225]! \362\013%Bsp\326\341\343\360K\267\267\367L\354\370@\371\035\227\225\360Z\205mx\276\371F\247P\344.\223\264\221x}\322\225!\346\350\256\2742\253\265C\367\377\022\036;\017P", 700, "(\036gv\030n\0139/\250P\272\313\230\351\226\211\363\237\312Y\037\272\311\265=\351\343\305\374_\246\235A\264YD\304\334\202K>\037\274\336)\301%\366\242\246D\324\134A\303\2414\276*\031Y\376\357", 64 }, + { "#\0427\244K\257\006l\005*\256m~8+\317\373\325x`\224.\320\221", 24, "\261f\203\226F\362\245\334", 800, "\267c\357A}cz\243\206\233+\230\256=\203\034H\007[\32169\375\366\322J=hG\336o60\336{\244\037\2775\326\243\213\320)\337\003\370\323Q\232\242A\306ZRT\016\242\242\350\372\015\220\260", 64 }, + { "\347\377\324\375\314\303n\375%,\010\336{\375\3320\227\344\2662\0024\325\365", 24, "\361\311\366\227\314\275\335}\213\1773o\371\231\357K", 800, "\273\267\010\210e`\307P\264k\012\345K\247\362\367\033\310=\000\225\035V\220\312\213X\314\341\273|9\325\275\304\241m\012EI\271\302\2747\331A~\177\032#\233\376\353]N\301\365^Mh\272.+\260", 64 }, + { "\357\2528\231\262a\032ZJm\3157\260\331<[\232\27441\372\310\267\036", 24, "l\001\255\324\355\0220\246E\206G-~-\333\004\331Y\026\363\303R\010\324", 800, "\246\354\213\206<\223h\204\367\333W\021!2G\376\014:\373\013\327m\225\227\336\250\342\221\310\321\363\253z\354\022uk\342\177\302\213F\3758\021\341mgESmN\257\356\014\276\344ju\372\332\361\014\011", 64 }, + { "u\267\0421[S\023km]\353\002\364\331~J\3503\376Ay\335L\012", 24, "\352\204\321\301fO\005\370g\003m\307\304\344\354:\030\244\216\215\026\331\262\2267\223\3655qX\252x", 800, "\011\254b\343o*\216\240Dp\215\015A!.E0", 800, "\375\240\241\236\314\214\274}\266\250\225p\024zo\012\354\220\377#_\210\001\301\343KG2\362\312B\335\331\304L\224\205\267o\320E\305\233G\021\031\2726iE\267\257E\217\310\313\247\312\232\200p`\266\375", 64 }, + { "\255\032\237A_\223m\000!7E\226\354wSZ \375\207\316\2177d\031", 24, "\324\234\005\333;6(\316k9\134\271r_\035p%\350Rm6\2418\025\204vv\212b$\321\027\314\250_\3478\233y\303\301\370\016\200\301IZ\316", 800, "\316\312\267%f\212!y0\237 \243\207\371\274\321\134\274!\327\362\004\014\210D\250\232\307PbslaL:\252\262\201#\315<\220\232\275\273\246G\311\333/\032p;D\253\235\2401b\016\224\215\134\341", 64 }, + { "z\006\205PE\271u\361w$g\362u'\134\013\240U\303\0055\305!U", 24, "\0279\275\233\304 \031Fb\231\224\204\276\203\021\011kM@\341\223\236+ \262q\337\212\376\222\3471\243\3615\333\247\340`7\004\3137'\263\231\302\327\3253\353\326VP[\263", 800, "\011\253 \313\264\371\333\363\017o3(F\001\234\207\243\263\376G)Y>x\271\332`\270!\250I\375V\300$\000C\206}v\345{\247\257\314\276\017*\365%\332\374\242\242\343\271\243\210D\200{+\254;", 64 }, + { "\367\212\237\347\371`\021\024\317\363m\366\226P\240\271~\353l\015\204[\350\306", 24, "B\343\221\021\345\275\004\353ZB\274\223t7\313:\233\255\233\363\361\351\014\315\314\325\343^\370\301S\012\212\317>%\022\023\210\352<2(\224\311\312\027\232\327:\227\214\230\363\023\037\337.\024\010\372\317h\023", 800, "\327\304K\020\214\277B\366\002\330C:n\353t\334fXe\351P\033\032\311M+`\320/r\265!\301B\231\350`\001\013\311c?\220\333\326\202\216\243\365\245^\245j\377\372\210\307\272\303\342\216\370\210\355", 64 }, + { "\212\264Q\307\376[/\236\013n\346\243\030\322\026\321\205\216\324\214\360=\370}", 24, "\202e\341xV\033\272\236\340\342\216:\016\2516y2G\267D\211\375!\247I\342\021\277b\031P*\207\035P\205\244\235\311\310_2\346\023\354T\004\304\327.\332TR\312\346\034\212\302\251\134\005\310\016\004\200\257L|\205c\303\205", 800, "\220\242\272\200\024,\341E\312\361`\270\304\345\016\037\273\273\341\301\134\224\316\032\003\324$(\316\234o<\250\263?6\351\024\312\042d\373\366\320\036Pa\015'nX\213\033:\313N{i\134/s$=@", 64 }, + { "\274\322\370Z\025\306%\003\310\201(b\362P\000g\264\011\212\340{3\244\236", 24, "\256e\007,5\002=\262", 900, "\005\001w|\222\320\330\021\015P\305/k\244+(\002\366\277\207\243a\302\350\301\227;Mdc\250\024\370\006\311\007\226\302\037o\367Wg\377q?k\005\223u\021\036\375U\321@\363\232\317\363\225\177\3303", 64 }, + { "f\247\021,n\027\321:\311Y\243M\345.\204Qe\302\206\301(\205\031\235", 24, "\037^\213\344\352\177&\134\004\203\203{%&\027i", 900, "\253m\201\326M\344} \345K\2152,\245a\255\306'\265\353\216\011\217\004\207Y\271b\234\222\230m\016mu\340\231\035\235\215\3413:\004\332\015\310yR\260\023b\206\000\230\007\314\214\370 8\011\210\313", 64 }, + { "U\257m1\225~y\202\247\245\346\262\261&\252\253\261\375\022\303\247e\351\342\321\260\237\275L\220^)\3519\017\261\013\364\243\037\030\277\375MkIo\275y\004_j\241", 64 }, + { "\367B\325\214\226\364F9!\304<\320{\342kg\315I\315\023\316\372A\336", 24, "\240a\265\361\241\204\221O\347\345\026K2\336a\357\304\037F\311\341\276\216\343\360A\334\014E\317\265\203Ik\346]\317\031\272~\365\267ft\241\015\350GX\235\021\037;\024\033\354\2124J\337\377\304\203\250", 900, "\202\242\3013\2208U:\340\237\377\261,\312\016\251^\260\271l\324\213\034\311j4\011\236\254\360\251\341\347\310{H\017\320 }\232\274Jg{\217\324\257\363o\357\344\026\026G\277\310\004\242\235\263\357-\222", 64 }, + { "\016\270E&%\327f4\252\212>4r\344d\252\234\271'\254S\324\352\350", 24, "\375\306\361\014e1\036\264\033W\024j\367\214\265\027*\201\337\333\233\275y?\027\270~F\274\346dC\364w\211`L@\364PCo\257)#\346\343?)m(_k\252K\375\275\003\3456\376\2240\036\360\222\373C\265\217\322\251", 900, "\302\205\312\343Gl\252\336J7\013\234\355z\377E\3711U\311\204\213\332X07Z\222\333\017s\351k3\333\370\273\352\361nvB,w\315\202\214\327\367\351W\3560\350\377\016\2111\323\315Rd\360\241", 64 }, + { "X\241g:\042LD\026\033\305\2103\347%\313\222M%IxT\3311[", 24, "\354*\024\334zTk&", 1000, "TW\205I\026\261\327\304\271\241.\340\134\260\241U\257\312\000L\177\012\002\020c\266\333W\352q\331P\336\027\357\363j\356P\3036y\357\306.\361C\232\134\245[\366\203\213\307}r\255\350\324~\330J@", 64 }, + { "P\273\256\313\320\002{\007\246Q\235\261\314\225\325f+\265c\221f3\037|", 24, "\3772#\270\014I\036\251\274\343\270*\254r\244S", 64 }, + { "~\021+\245uZ\362\213\366\200\022\206\215\334\351NYt\355\377{\353m\027", 24, "\2447u\244\364\217\330\177\207zVy\210\026|h\302\255\343\012l\034W\235\214w\263\270\256\236\255\312\134j\272Z\350\134v\357", 1000, "\323\021P\223\322\235O\310\243\376\254\014W\021\250#\357\307'\305\362)z\177Y\177\354w\265\015qzf\333>\020G}\011\355\350O]\253<\221\251A\013\315:\023\201\267\010\210\372\277B6\241\244*\314", 64 }, + { "`\216\220\304\345\323\032\361\230\006\373k\0015w\247j2xL\303\242\021\301", 24, "\354\314=\001]\034\307\013\035\250P\231Pi&\031\205\203\027Y?\360\215nEQ\021\336\373\215\332O}h\264\207\253Ah\377\376a\264u\251\002z\252", 1000, "\321=R\262\037DS\377\205\222t\316\371\353\206\267\315\313\246\364\3673\010%\224\351\307z2\230\360\273\220\311aGp\2636\015l9\300\345\003\326r\356m\203Q\235\232O\227 \352\341\021{\267M;E", 64 }, + { "\354\004\006\232\301c\330+\321\346{\032\251+\226\274\273r\2126K\000\000\320", 24, "\244\371\011l\010r\042\231\366N\007\354\251\304\237\021\200\314\321d\330P\027Jgm\022NQ\015u\354\016\023s\363\0059\003x\243\366\361'\375s\330\266\310\334]\350\201\037\330\177", 1000, "\262\340\313\343-\0366\257\034\321\223hwX\317D\305h_\036\012\323\303\360(\016\014\351\244\256|;\031\316\355\317&\244\221\374Do\370\351\372\233\344\027\237x\225\212\032\026\321>\203\335{\263\343h\254\245", 64 }, + { "\306\321\026\304\337ii\326\313\346\326Vw\314&B=\233:\237?\221\201\353", 24, ")\344\304\012\2374O\241\033;\035\3024u\021\243\347\201\314\277u\304\210h\252\022\241\237y\031In&\3374\356\315b\214\004\277\370;\330~\237\335\262\275[\373\3121t\005',\211\201=I\321\216\334", 1000, "\376L\243\307O\223 ;d\203\232\017\217\324\246\260*=>\377\373z8\226\237\255\341\320\342Z\301\015m\363\005\201X\026\202\221\017\351\301\003M\366J\031\263\035\001{:\307R\026\356\367Ww\226\2106N", 64 }, + { "a\201~E\177k^\377\225\372\322\254\303%\007\300\327\315\250\025\257VA0", 24, "\270SB\012l\322\243\037q\035\317;\324\307\324\351\347\030]\245\265\366X\2650e\322e=P\205R4\344\245\227\221F\272\356\034&\323&\022m`z2\275\303\266:\207\212\213U:,\035\227I\275\347\257\023\211\206\211\324\377\364", 1000, "\224F\035\020\272\0235\366!5\234\200\355y^\042+\321\275nk\247\366\034#b\235o\214\277\020\375\344q\374\035\261\263\222\246TI\221 \240u\232[\214\346HB\221\322\003\377r\371wG\025\035y\345", 64 }, + { "(A\2328\302\034m\303m\265$2&\227\250\016Q\3779\275,\313\013h", 24, "\250\337%\227r\334&S", 2000, "\241}n\035\312\202l\273\322\352\272\252\212)\335\230\226\325\012\362eE\004\315\357\177\245'\022\0052\244\024\014\225\227\007\243As\277\251\351-\262\246u4\312Z\214\274\202O\376\324\262m\035\201\360*\343\006", 64 }, + { "\224\227\346\024\316\015\012\374\275#\026\307#\012\262Nr\313\353+ \216\372\032", 24, "t[\215\345V\325<\254\367\361\255\343\245\023\017C", 2000, "u-\242\357\275\260\2226\270\312\037\230\275\372rS\327\216l9\316Q\356\210\323\210E5@\217\347\036\032C\202)\033\230f<\227\023\256'o\233\247\006c\320j\244\341\020\134\177\313\177A\214\336\215\230\322", 64 }, + { "b\247o\224K\245\234t/\302\265\264>\310\225\024\015#\255\227>\225\022@", 24, "\211e\230C\273\3177\2211j\365\030\320\203H\255\017^\256\324S\212\266\372", 2000, "\302\004\0071\000\034\042\360R\205>\020.\016\334\042W\230c\250\222zs\337-\377\373r\333c\001\371\272z\363\0003'\362\202raS\244V\354\377\344\336$\201\336\322\372Uqy`>{B\021\234\030", 64 }, + { "\002,v\342\377\027yk\360b6]\032eS\242\353\011\353\204T\307\207\022", 24, "\236\177\303M\345\365\027T\017\323:\360\225z\271\361\220\265\017\300\273\030\223\2531U\316T\020)\225\375", 2000, "\340\214P\252yt\0126\301i\3054U\217\267\024\364\035\306\003\376!/\345\374?9\250\207,S\031K\276\223\257\364\346\367\241 &\256\271\314-:\272+n\367\023\272\311Y\346\004\225\315\016\236\205\306\350", 64 }, + { "\004\000\227\245\266\231UzT\033sW\240t\234\004\356\320xazQZ\033", 24, "\257\341\327r\023?z\022Y\205t\302{\252\341\027\341\333\260_d\030\206\354\367\026\302*M2\225\347\336N\253\251&Ad\276", 2000, "\353\364R\036\042\354w$=(^!\317\207\266\342\212\215\263\250+\307H#P\011\3448'\212'\030m\037V\021\212\375\3601\311B\233\361!9\036\2135\034\337\264T\331\346-k\222z6I;\303\360", 64 }, + { "\015\213l\014\376\305F\340\317\356[<8l\000\235L\361\327\3623\251,\032", 24, "\356~\011\332\242\011\203:\271\222\204xV\274#\0064\016\237\364[\377\231|j\031\336\272Q\007\331\371$\010\361\231\346\205\337\340U%\230\241\221\202f\267", 2000, "*\230O\020\204]\354H\245&VSOk\247\352Jd>\243\322\351(kX\302c\177UhS]\001hq\245K\320oB\201;\335 %\3164\256\024`\233\273\256\304\324\247\321\345|\023$?cJ", 64 }, + { "\203\371\026\261\020\021\004\370\246\244o\321\365\355j\004\200\367V\304>)\355\300", 24, "\260\347Jg9\373\303\270u\270\253\343C\300\336\010\307?\016bu\366<\334!\312\337v\240w\177[j\227\224AU'\037{\032\245\347n\343\011\370\342o)\214\354\265\236\234B", 2000, "G\345\0377\201\012\226\231\207F\224\006\035\236p9\303\365\3250\223\226>,\313\330d\317\237\312\3238BN.\257\0155h\377\034\236\331\223\037\307\3416\317]\203\302\252\356\234\230^\027\220\375|\0341\006", 64 }, + { "!\323\234\201\027.\265K1\243\334w\375W\367s\264\232]^\011\243'k", 24, "`C\241\225\020\3131\226V\311\257\355\361\313\326\304\003K\206\266\311L:\327'\370@\317U\300\027\207\012[\246h\247\004d Re\027\247\222\323\212\225\324\020v\252_\252\255\361\367\303\020(b\015\346\336", 2000, "\332\363\361a\364\375z\356\215\366N\256\330L\022H\2644\134I\362\373\310\212\213\262\326%\366\351`)\315\014\356a\266\037\352\262\236\365\326z)uU\374\364cq\307=\331\013\316\243\335\033{\273\244'c", 64 }, + { "\263\266\230s\247\032\243\235\271\203y\245\243\012\276\015\230C\230\262\213T\346", 24, "4GO\256\202.5\272\256\313\017\307\220\252\234E", 3000, "\223\021;\244\350D\254W\275\346\222\261N:\235\364\316N`V\307\134\004\037\005m\332\222J\324H\020^\325=\233\356\350'!\035^\245\025\263\022.\272\004\254\342\243?\010\011k\224\331\331\2322\336R\242", 64 }, + { "\237V\216}VW3\357\037qC\305\317\207\302\220\351\331\037\375L:\022 ", 24, "\336\277\323o\333\220q\304\274\313h\237|a\327\323\230\261(\371~\020\327d", 3000, "\211\017E*\360`\315\036-Q\374A^B\343\020\200y\034\177U7\340\260\371?U\221\323}\321\212\261\255\3411L\246\315\334\004%K\01749\207\341\027\313X\230v\300\032=\304\340\307\240\005cu\036", 64 }, + { "\277^\326\265S(\042\033\000\346Y\234M\000\310\025\344\3171\343\230\017s:", 24, "j\301\025\325\364\345h6p,\377h\322\372[\215\262\261\235{\355\352ae3:\042\337o^\270\226", 3000, "\367\314\334~\313\305\216R\375\313\317( W\2524\237\367t\006V\356l\270\305\025b\351\372\016\205\274\032yn\321\366B,Z\300\245\310\364\202\374\336y\325\015\221\342\343\223\254)\340GH\354\021\235u\354", 64 }, + { "oP\0024\027P6\376C\272\232\025\207\225\3616\361\26629\313\004\375$", 24, "\031r\357\216B\274\223?U\2367\002<&\2615Lj\012\276\303\327~\373\314\373\3762\010N\177\231\324\036n\334`\317\013\200", 3000, "&\322\212\306\227\365|H\226f\313\2425.p\030V\261j\350|\352\205:|L\316[\023\305\222`W\264\246-\232DO*+\343:\241\251\320\233\354\377\203\246\235S\027\341\250\316\327C<\226~\346o", 64 }, + { "O7\204\017\015\252\361\327R\030\367$\314\307\217\207\252\323\333\270\213\207]0", 24, "'\234\271/\326l\237\264-\337%\332\012n\372\276H\262\134\263\336\213\337\021M\234\321Q\227\333r\266\304XS\343\211\256T\322\303\234\211\260\241[\037\271", 3000, "_\203,Z\033\317!\350W\356\335\2426T\015IE\012s\331~\301D\012\374\306\235V\321p\340$\353\263\331\237(76I+\000P\342/\001N\345\313\241\214\377\333\377\360Z9}\3544\236\201\370\351", 64 }, + { "\244\350\3759f9f\300\002\015\214P\344\022\200\351[\134RvR\363\225~", 24, "\204\253i\244\217\223s=\217_\313\242\024<\252\241\3530\215,\212^\335S\257j\331\003DNLn\2414\035\017,p{\364\360\342U\032\254\007\021\036\256\345t\253\316M\021\254", 3000, "F\264\340\263\355%\367\007CHC\304!5o\030K^=\305\204P\305gIJ\274\177s\232?\341\000\364\014>\214n\236\004\363\250\323\324\211g\025\371\004Y\357c\351\033(O%\312\267\214\313\001\003\274", 64 }, + { " \373\314\232\000\2625\230_\303\350zD\210\252*\034\305\005\017\355\356\227\270", 24, "R)\032\244p\363 !9\274-\205\343'\231)X\346\025E\323r\032\357\024\020Fr@\013K\221M\376a\336$\024q1\310zU\031\271\274\325(\352\265\017\042\210\016\276\271]\330\252#\244X\261O", 3000, "\241\362\014\177\002\312\211G\001\312\001z5_3\207\232\300\227\245\201J\255\376n/\177(\371x<\303f$\353\210\014\232\232[\244\277h\353\341\022\320\325\002TF\352\037\264Tf\2676\370\271\321\363!\307", 64 }, + { "\333\025O\227@h\274\2608\237\300\004\377\223\022\320\341\312e\202`xN\263", 24, "a\042V\324\255~rU\355\206\366\202\005\354\002}w\033\215\266\010` \215\226-@\231\246\376\340\010\023\015\216)z\221\365\327\372\262\203\035j=5\265\243\242E\035n\036\014\0177\367\205\237\363\031\346\264!K\357Y\350d\375\373", 3000, "\003\242\243\204\364\011Z\213&\276\020\270\364\204\275&v\013\015?/d\352XM\302\306\371\242l\360\033/\247=\277c\331:\021OUK\262^l\270]qh\242\257b\213TJ4L1\364\366\253\201r", 64 }, + { "(n\026\312\205\343\005\033\363+;\013\305ww\340`ET\312*\2063\371", 24, "\327\336n\263\257uk\336", 4000, "Fj?_\352\260\304u^\354\210\205e\025_K\026\277\346Vrq(\224n\204\371\024\221\021dc\360\030z\270eu*\203\365\336p\32321\305w\347\245\265\337\212}S\302\247LR\377{\002\203\235", 64 }, + { "\275\277G\270\316\265\317Y\033\321\261\3341^\036)\235\253\253\274\014\227\327\374", 24, ":\311\227\357\355\353V\261iP\265L\354xr\262", 4000, "\021\332D\300\265\336P\356\226\215\014[=\000\234\027\224eX\022\260P\220\207\315\274~\030(e'\314\134\256KX\015\022\361`\315N7\021$\005\213\027\327\230\300\212\246\267\010UF\322}\260\276\006[\273", 64 }, + { "e\3241\366\225:\037\220p\032\242\346\364\341\237s\332\235+\033`\007\333\260$\241\007p\013j\007", 24, "q\326\233\230 \340\376\340\330\241\255\270}Qb\037\331L\363\243\021Fe\012\204\210\220 \246'e\323", 4000, "\233A\343!1\343\230\230\201Xu\272V\314L\330\204\217\301\265\376Ph\035s\321\253_\303\224\201\262M\350\365\375\302\325\217&D\234\314\320D\210S\370L\3674\217B\311\251\313\237\243\202)\030\022\307\336", 64 }, + { "\266\015\355@-\222\245\034\2232\353\327a\326[\223H>\212BBP\212\221", 24, "\207Q\350>\367*\313\020LH\353Ap\025/e\240\033\230\221=\367\325\243\326Bp\037KHzi\302\017\247\254\306\375@\346", 4000, "Ii\225\355?a\327\357\035d\007@`A\307M\214\027\304\205\376\343\2641.\325^\336\030g\275u\351\333_\205@Q2v\255\263\353O\243\006Q\243\303\031\252\252\036_\020\3739\202\307\177C\314{\271", 64 }, + { "\362\272&\200\012\014\365\001\341\023T\232,j\201\202\324\0042\256h\377L\250", 24, "=\013\254\322\351\270\307\341\322\310Y\262\211%\357\356\273\233\346'\265\277\350\313\342\263\244\017\361\005?\033\352\374+\305\244e\270\232$bB\375/k\355\316", 4000, "\222a\254\336Z1\3035)c\302\226\031v\216\345qr\234\247\211\134\004O\010\033\205\221YR\313\365\034`\244\276m8\204\255\217}\333\013p\017\307,\245\270\344~\037.\027@\243\3008\226\346\364\004^", 64 }, + { "g\027\243\247\030\210\246\017\355\022\306\212\347\226pup\007v\374H\261\006b", 24, "s\006v\241m\353\271\320{X]\346V\027\345\331\360\017\302\210\010\213\243\134\361`\235\306\265\036U\025\264\373T\373\324n\033\226\037\252\031\340s_xtA\310\335a|A\252\274", 4000, "l\247\361\333NE h\255\336\021\374\356\327}\347\314\347lZ\336\335\377\341\354\342\206\317\310\036\302G\2039-\374\005\027\204\313\304\340\334\032\032z{S\273\330\1772Q\220a\201\260\264\312\222\003\317\034U", 64 }, + { ":\243\340\307\302'\256\134\326\301W\356]\307\3327", 5000, "\205\254\255LW\275\210\264\205a\214\001\323\312\254\251\233%O\222!0\037\177\274:\212\357\354`\005\335W\254\265[\275>S\243s\225\032\341\313\214\321D\177*\246\001\366\005S\234\230\010\300\301\024\337\3777", 64 }, + { "i\347u\243(?];\2174p\027|w\252\232\374\252\031\360\013<\244\313", 24, "U\204\031A\265u\316;\325\340\215C\340\026\245\366\027V#\3607\320\223\315\352\364\316\240\020\276\034\342", 5000, "p\216\236P/^Q\034\303A/:C\012-V\363\242J\370\310\265\333b4\2267\177!pX:e\306\242(c\325\033\306\315\312B{\311\026\250k\026\257\207\217E\306\013\246>:@%\203\272\001A", 64 }, + { "#E2\2447&#\202\264\042-e\346\315\327\212S`\354\357T\373\374\356", 24, "}+\227\036\352<\035B\325jB\225\343w\237\034\206\255\235\260\233\336\204Sx\216\317\202\001\261\242wb\035\352\304\235D\221\267", 5000, "\242\246\366\007v\255\267\332>O\332\005\024)K>f\350\031\325)\224\236\277/j9\373w\375\224\207\327B\321\354\265!f\373\013\375\024o\3768\345c\351\202\305~\366\221\301\237\3504}\215\313\306aK", 64 }, + { "n\342f\266\256\206\242}}3\011Iw\350\264de\356\210\365.A\357I", 24, "\313\366\372-\305\017\251\134\366\265\2732\304\203\300\275\224\300\314ZKR\016\260\363\273\014\255\344\304kW\217\275\021\357\334*\342\022\243\312\303\265\016OM1", 5000, "9H\012\364@\023gk\224\324\007\340\017\215U\013\247(\006\007\305\335\006xAp\372\343\267\322\355\250\344#385;D\342\310Q\030\214\271b\275\265S\246A\020\247\030%\233,$C\267\334\036I\020", 64 }, + { "p\224\002t\321\207- x\331MZn\352\042*\220Cv\230\303\244u\233", 24, "DE.\236\2209#`\026\303\274.\352\300\310\230\216\032\216\214\307\254\024\253\317U\033b\327\3532\033\231\370\344<\376\013-\330\0032\260\264L\012\305\020\254\356N\375c\333\010\236", 5000, "\324\235\2268\20247\200[\222\042\315\006\244\002\207\367h\31422p\371\205\206Y\202\331\307V\227\210\024@\002q\226\225\345\305`iwI\274\334\373\310\345\330\271\226N\331\242\371g{\231\266\035F\330\263", 64 }, + { "I\2423\320\015(\222H\242\017\252\211\353\375Ja8\033\340\3765\314\322u", 24, "\346M\375k'| \307\351{\221\376\304T\026\0058)!\025\306\022\271\227\032G\254\200+\201\033\021e\032\334\002\301\317\201V\3658$\042\266\362\216i\217\266\021Y\312\017r-\354j9R\022\037\321)", 5000, "\224I\371i\265\005\262\257\262\253\373zV\250\240<\311\201\257\362\222UH\340\367\200Q\212\017\335\251J\020\002\341PB\202\030\022\017\277\032fT\256\013\266\355\227=\224!D\371\225\240J\215w\002\255>\300", 64 }, + { "\205\027X\235\021\3344\2458U\361\222k\375\353\370\226z\3140\321v\353\026", 24, "\254\365t\304\343\317\275\254\0273g\241\003\320C\326\264\034Ep\360\267\273\2332\210B'\222\210\303W\202\021\364\246\302\320\236\256#\3074\324\313\216V\231\242c*\003\2345l\0365\353n\347\276c^\366>\257\215\227\215-R\207", 5000, "\337F\336\013{\253\267\314\001wC\321\201G\344", 6000, "\226\341q(.\361\024R\272\037\201Z\202\300\271\002\216AM[g\263=\0039\034m\250pb\235_\205\3468A\007\213\276\366oK\273]\277k\010\011#\255\264V.)m\032_|\372x\230mnv", 64 }, + { ";\346\354\013\230\227\031F\357Nz\350\262\002\025\305\013\337\377\332\350\256\014\030", 24, "\222G\375\327\177$\353\274\353\357@\007\026\356\266\303\240\370\271\241h\241\003f\233\0061=U\264\177\320\311\312\334\036\031\025\275'\324\341QQ`\277A\347J|\012\3315\243\230\217", 6000, "\332\363q\304\333D\240\347\241\032i\333P\231b\271\344\317\024\355\314\301\267\316\021\237\321`\013\215\202l\365\330\311g\235\247\232\361\336\257\206,\321\317\330\006\253\233\302$T\357\324\035\241\0316\030\036(\204\251\331\376M^\2559.\225@\0110[j\201\350", 64 }, + { "7Y\231\310\325x\221\333\3057~t\254\265\325\335\247\326\227\363:\134\355\201", 24, "\340\341y\031.\267\217\264\012\020M\250\347\274l\311_\255\361o\232\260I\342", 7000, "\202\267\254}\0042\357\253\273\261\022\024H\020\203\013\032to}\347m\337\376\371$\250\255\321r\016\006\274\367\311\323\243^wsG\237Vw\004p]\325\261\365\027\356b\230\205\322L]\021\203\371\2709d", 64 }, + { "\177\335\200\3270AM\247Y\322\010*\234\035A\261C\366n\036>r`l", 24, "\214\014\337\257?\303=\024\240\307\343\00255#\326\0235\267\327K>\354\375\211\321b\021[i6>", 7000, "K\000\352K\222\245\260\275\361\361o\365\326\364\036\2770\207\331 \312LL\350c\006\226\247\014\217\217\261/;AP2N\327\343\013\246d@f\250-\364\304\013\002\314T\032\025\247\017\217c\366\003\305\037\362", 64 }, + { "\200s3/\021\217F\036\305x\321\206\215\004mk\314<\000\300\226(*\244", 24, "\247\250\3112z~\236L\327\215\003\367\022\244\217\201\373f\010$HE\221\026%w\326>\033\017\226\020\207G\367\352iL\322/", 7000, "\311\374\230\374$\026\042\360\254\307\307\252\207ZP\232\364", 24, "\207tG[%\035\246\377\337\325\331N\022~\365\236/\304\201\374\021@U\372] \226\375\037E8\007\254\354\370}5vZ\031\206`\366!\322\366\342^", 7000, "\245\210\355\305?\007\012\026-\377\272\025\2700\270\375T\332iM?\216$tT\216.}\356\005ExPe\005\262?\223\226,O'\365\000k\246E\202\021\213\324\035qRg'c\024'\200X\026\240o", 64 }, + { "\021\300\216*\364\017\360\1340\321\362\221`G\234W\363\333h\324\216b\217\307", 24, "+E\251\013\223\005\246S3R\255\016G`\212\214\246\352\012t\353\324\237\230\242\241c\227\021\374\316#\260\351\317\0252\243\007\002\346\026\237\023\216\3117\344S}.9\274\203h\371", 7000, "\362\315\306z\261\307\255\373\276u6\243\021\347\234C\370\206\306Bv\257\211\347\242", 7000, "\033\256\213\370\341\215jM\215\216\262\324d\007\316\365\227\371\2034\134\272\012\206h8\212\253Z\027\314\305\017z\371\010\216s\343\313\277{A\262>\312k\376`*d\300\360\2516\241:%aj\215\242\275\375", 64 }, + { "2\214\342\377V\332?\2433\233\177\347:\352\242\364\337\340\331X\237\257}6", 24, "\320\326\244\261\006:\026\037p\252$B\205\265\036`\362\327%w\241\271\317\367\004\026\215\364\260\023F\3245\220\276\367\347\260G&g$,\2219\015\177a\224\211\313\016\346\027+ \011\354\017`\026#>a\327\022\372\177|_\023\231", 7000, "\332\3414\351\013\042V\243\371\033\321o\023\023m7T^\220X\343\300H\010\306a\307+9\326\315\323\226\032\205\030\024b\371\365j\220n\014\312\024\003p\345X\017\341=\321\304\205\340Q\300\362`\307\314\365", 64 }, + { "55v.A\333M\011\253\244\245\331H\317t\353\235\243\306\200\307\241\330d", 24, "\301\032\244\327Z\351#\344", 8000, ">\334a\343\370\316\221c\363\253\306\042\325\007\310UU\351g\340|&\203l\034Q*\36754\206\134\264<\341q\342\332bg\014\000\301}yR:pI\342\301\343\250x\232p.\373\211\033o\016\015\300", 64 }, + { "u\034\247\2249\312\031?K\134\367\227\373\015w\005\303v\375\311\227Y\264P", 24, "\347\374w\031d0O\321\342+\036q\026\015+L", 8000, "\000\307\323\245\336\306|\361i\245\221\003\013Mn\233\211\227\230=\272\211Ybv.\007\256\244u\364\350\201k\274RA\022\327\212\325\234Or\0137gx\340$\365`\355\255\3310r\205CF\246\3554\003", 64 }, + { ">\372\324z\264\3456\210u\275\205\315\302%$\323\023\204.\245\305O\266\215", 24, "\210\036\242\335\310\002\367\363\365\034\003\030\207\017\007\022m\0369Z\322\032\272\213", 8000, "wO\311(\236\027@\354\006YJ\353\207~\360\237`Y\316\242\247\307uz)\307\023\267\262\340\007\307u\2256\0220\347\1774\274\042\271M\335\026D\342`\356\004\255\2702\21587\0270\346\310\231\303\215", 64 }, + { "\205\015pw\204\330\315l\327UI\003\134\005\033j!\202\007M9\030\017\257", 24, "\243\006_`Ge\333\270\232\361\256\305\266\204\351\231\232\310k\230}\035\225oh,F \177\213\3508", 8000, "|\206d\356K\204\337\023\357\324\325\377U\314\343\001\177Q{m\277Y\3232\347Z\264\343\032b\367\337\204\347\237\340\220\000\005\240\015\256\207\240\266\020{#p\216Kd\031\245\266\237\366\327\003\352\20096\270", 64 }, + { "\234\317\267X\261\316p\305\317\270\037\223\364s`)\266\360\255\372Cx\034\344", 24, "\037*ZQG\262z\310\302\331\247\036\355\331S\227\271\245\240=K\342\360}\015o\376\275\353\370v\326\011\352\366\011\035\346t\315", 8000, "X\246h\312\331\270l\217;7\371z\357\213}\021\200`\035\335\277S\211#\024\257\253\367\270$\306\334\346\236e\030r\031\356Z\314\340_\237\242\025\134\314z\360\216\020\337\205\272z\314\036L\216Y\217G>", 64 }, + { "\216\336\334\260\010\376\034\330\025Ilx\217\376+\341?A\303\320\212)\242[", 24, "\002\257\245\0163\344\244v\375\344\023\272\244;\353\242\371|\010H\337(\200ut\252\252W\260\256\355\251\244|\013H\257\350P\003\210\330Ji\026\361\230\313", 8000, "H\320\325\372\034/\365\265\000Z\356\250\353{\205\202\247\006\313|I\032\013+F\373\270\134S\015\036\3443\240\376\334\3018\3343h^\344\200\243\312Nk\264,\302K\365\267\315\346y\030!\020\313\373\241\272", 64 }, + { "\364[\025a\015\244\351\226\361\277\362RnY\016Vg\011\004\032\0243V\334", 24, "\303\035t\266\010\251('\331\304\035\276E2\030\216\305\330\026\3153\271\227szf\361\307Jg\217\003\200.\031\034ga{\247\042\021VG\262\216\264t\015\006\014\232\236\300\335\360", 8000, "\373Ng\266cw\232\023\340\345\134(\241\223\330\251P*.\251p\023I\216\222\016s\274\2610\2719-QX\017s'\364\367\203[z;\321\275\367N]\016\205\216\032\246\351\013\014\230u:a!\340\344", 64 }, + { "\036-\324\033\321\251\200\377\035C\2173\352\252);\211\025\316\215\375\214w\215", 24, "\300\007\353\005\230\026\313\261\017\376~\245\312\375R\275\336UpX\223\261R\321\012\257\305\361\354\305y\016[P\026\302\367\203\210\222\320\267\341A\374\323Lk\237\360\277\303\226v\214\362\372\303\363\2325\032Y\216", 8000, "G\277\034+\204mQ\037Jh\3735M\226yb\271T\333\216\320\233+\3414.\010\243\335\030vR\223r*\272O\263\222\310\204\366\266)\037\012o\344\333#\027\260\037\300F\010f\336\236\236\367\203\213\222", 64 }, + { "\266c\307\213\340;\202\254\364tO\370\023\221\332\006w3Q\352d\224\000a", 24, "p\035\261\247\274*,[\341\236\263\237,\272\361\301\232\301w\203\023\024}\265]\313E\203g\364\247o\005\134Az_\007G\007\010\220;\326RR\216\262\025\200\255\262>\330\321\276\316\331\356\310\334(\241e\345D\263\330Gx\324\325", 8000, "\253h\230\377\267\373 \214\322-\273\273~\336\356\177\024\205\277\240\277[\227\023\332\316\315\374\000\272\351\357Z\011\021\300\377\371\376o\223\336\235\312\021U\330\257mz\250N\206\210jB\134m%\276/o\357\354", 64 }, + { "\245\221f\320]\012k\303\031\336Wr\336'kl%\250\3559=\266P\274", 24, "\243 \351Hp\230\003\351", 9000, "Z0\012\276\353\351\232\246\223\035\333\243S\367\365\272\376;\035\314\004HG\030\213\275yU\355\005'\341\134\002O\014\310\134\21217\020\011\317\311\032\031\317\355/=h\201N\305\243\232\300\354\342\005\206\216\200", 64 }, + { "K\213x;{\306\322N-=\201\352v\366\255\013\005\012\221\2142\336\014\300", 24, "\200>\242~\026\241\226\204\221\351\213\303\223\237*\345", 9000, "\273\325T\251\032q\370\2077\310\220FF9e\204\342\226\374\247BP\370_\273\024%\314r/Y\270\231\343\323\353A{r\334\013$\315\224-\226\272\276\244x\337\220d*H\021G\307\271\347\251\304\360a", 64 }, + { "X8\022-Z\303\263\357\3236\371-\322\352\212}\226xVF\200KH\271", 24, "\352\321\241\333\217\016\012\344\245\240\216\017-\367\340\324\260i/\320\377{$Z", 9000, "\363\313A;\203\243u\267\276\002\327\036\2234\323\217o(k\372\333\023\240\221\300\254\2677\234\2040\300\350uv\327\371\262\215\272x'\213\274\010\021\034|\352\3338\353\273\027\272\265\376n\134\210r\300\006\247", 64 }, + { "\335y\005\355Q\326\204\360\222$g\356s\374o\200W\011\220\001\247\025'u", 24, "\035*\242\310`G,\244Q\372\256\301\305p\034\271)t4bW\2076\225\177y\335\322\317\245\256&", 9000, "f\326\017\227\016\302R\363\324\314\010\271\320U\341Y\222\370\265\277z\370\313\303TA\334b\371\226\254\264pq\336^D\330\134Q/n\324\320,`ay8\203-\035\223\351\301%3\032\355\217<\233\256\236", 64 }, + { " \250t\357\202 ;\3730`p\201\373k+r]\354;\370\244\030p?", 24, "\363\217\315\313~\351\231+$\215\216\362W\26569\223\027\300<\252\336=?\320\015t\333\004\265\316$'Z\010\337\032\300\356o", 9000, "\013\263\374\335\225\200S$\237\251\312#@\227@iE\373\364tpE_\342\203\204\364q\350\333\215\237\345\262n\217X\023\020`\257\327\257\236a\273\007\271\020\213`9\363:\011\240\014\257u\013B\302\365Z", 64 }, + { "\037\211\342J\233OL\256\313,\272\317E\355__\006\211\354\343)a\326\366", 24, "\3069v\303-\210\007`\270\242\024-\010\203d\242\210\250\347g\031\343\265}\035\317WY\2600n\342\263\317\300\010\007A\023\313\311\320\361Y\266\206\326\256", 9000, "\037\232\322\324l|\277\265I9\377\203-F\026`\202\206;f\256-6\312\374b\0152\016@p\017\374*\250\213\255i|\274.\326\364y\336}@\252\012\377D\202:LL\274'\010\222\304\265\360\324V", 64 }, + { ";I\027SS_\355\250\257M\025\034\252\332C*}=A{S\012\267\020", 24, "h\324z\036\2161^\373N\027iO\210.\344\361\370\213\300\274\204!q6\277rja\216tk\243\371#\353\201\272t\312j\206+L\005*fh\033?B\323K\213\300u\310", 9000, "\323\004\241\010\242'?&\207\347n\2659\262c\327\356\373Af{\363k\244u\315\271\257\215\002&#\350\244\253\345\004\362\245\341!\370\367\235L\324t\325V\232i\261\177\3241\010~\310\347z:\263\177\211", 64 }, + { "\331\363[@JRZ\206\223\334\330\027\234\035\3774\273l\316\322]\310\212`", 24, "\250\0109m\246\376;\177\2612T<\274\327\2363\344\324U\343\343\340\206%;\347()\364\322}?\376\214?\246\361\005#\273\020r\200\260\3608\335\217\017\202\212F7\202\325\353\323\367\305\034M\033\303{", 9000, "\205\373\010\365Z\241;\3701a\253D\025\351\374\254eX\244\037?u\372f\346\231g-t\274\325h\030\365X\363\322N\011@\270#\027\212\271\307\221\302\275(\033{\221\270^\264ku\017H\367H\201\002", 64 }, + { ".\354\201\342\256\244\227\276\215j(\026Va\3359\206l\377\020\253\376vu", 24, "\014\346\240i\217\206\263\300Aq\336\242;,,\240\035-\253\3070\367B\352\325\042\366\351\013\200\134\372\245\227u\233B\212\016\244.\021\362!\214\221\016%\224A\231\004f/\346\343|\007\3014K\334\015\2660\302\332\243\330\331\277\225", 9000, "?\341\377#\006\027\300O\217\020\267]\3708K\301b\177Flug\301\212T{\304\255>\260\357\266\2368\336^\134\326\335\0268\357\214\230R&&\372\223\315\212\374\341\320\234\224\203\017\310f\254\017\365\371", 64 }, + { "\035Uw\245\207fy\341\213Cf\313\250\356\333#\365\330\025\214V\365V\315C\301\312A;\265\324\333", 32, "\237\306\371M\211\275\020}", 100, "\277\325\220\301\016\372\256@NS\004\207\201\3778`\215_\211w%.\337\374\353\367\220Z\272\373\326]\275\224,^\036\311a\206\211\260\005\317U\0154\001\237\273\305\316\033uu\251Q\213z\351x\036\243\265", 64 }, + { "I\333\366\014@\0225Jgoz\373\270\002\020\037(\012\177V$\232\250(\264;\320\371!\324p\235", 32, "p\340\214\234\324\205\224\324\020h\221\357Ej\330J", 100, "\317]\000c\226\304\271\261\023h\365\3636ZV\016\353\356\222y4 \340\013\223\223\301\356<\004\234+\300\201V\230\370\375z(\177m\364\306\351\231s\254\360\227T\351ebLA\316\207\011\273\353n\323c", 64 }, + { "\342\206\301N\363g\353|\226Wd\356\240\3630,z\343\225\024\031\252a\275Jg\337\361\000\224_\273", 32, "F\342{{\365w\331/Pi,}$\303\260\344\265,\032\134r\362s?", 100, "A_o\223\300\360\016\264Z\223&\300D\2500\310\316U\347\004/\226\364\336\353\034\217\011](\237r\356hd\245\205k\037\252\042/n\241'eZ\316\310K\233\017{\247\234\303/\205,J\373l\362.", 64 }, + { "k\007z\262\2607\030\372\326\240\273\317\332\2406\031\203\014\211KOT\330H\001\356@\360:6\310\336", 32, "\301\261#\301\224\212~\323\326\237\037\202\036N\342\034\323\034\332\245s\002&n\035\265)kU\314+\244", 100, ":\276\200\342\261\1345\243N\265\304\334\375\364\323\371\304\213KB\336\372i$5\205\344\313\012.X\273\021\306n\222\025\224\207\321\365\265\333\304\363\225C\256Yf$\235\340d\026\027\207\216\267\006\361\030\353@", 64 }, + { "\212nj\377V\332\013\370O\246\366+\370\264\321V\252\246\341\232\000\250t\341\241y\217\2764\213\234\203", 32, "\210\370\011\356\265\343X\235\3101\255m],h\253[\347{\134B\360x\215\222\324\275=\212}\363\247\326\004m\034\003C\241t", 100, "pc\205\224\356\344\247b\310\251\222\224\357\315\277]\000\272/\303T'\371\336\221u\370\355*\264\226~L\357\004\237\345\215\236\224\310n\032n\345\357\347\204\231\2543\020\234\032\042'\014\361,o\134\305\2233", 64 }, + { "\227\222\262P\202\346\315\316\216#\250\032\346\007U\375-\317j\020<\220F\344\215X\234\004\374uM#", 32, "\215\215\254\311\351\001\253\313\331\364\304\315\032\276r6(\261\325\224\346 d\357\257\013\240T%\314\305\270\200\350\204\343\276\371\021\011\206\221(\310!+\034)", 100, "1W\302\356\244\310\375,&oW\334\355\230ipU/\026\236\352\250X\010p\335c$\032V=\375\316\037T&ja1{\225\262\177\313M\360Q\313\220\177M\307/.6\206\333\256@<[\331x\212", 64 }, + { "\016j\376}|\201\341\346\214\014}\023\353||\360K`\336\205\261\336\015J\243MP\341-Z\016\224", 32, "\013\350b=%\356\202\247\222\201\3362\222gr\331Lf\201\340=\365\002?>\011h\246\306C\361\274\306mK\002\005Z\230\267\372\0364\342\254<\032'\215FR\231\210re\035", 100, "Fr\342\330}\351*D4\314\003G\366\270z\016\345\233\241\331\225j\262\324\362o\016\306\205\272\333J\255\350G\001\365\225\2548c\202\036\275\353\375-\031\032\023m\220u\337\236\265f\357\033O\341\332\235\246", 64 }, + { "\037h\035C\201\200\227\347\245\205a\334g\343\330F\330\267\276\254\350\234=\317$\220e_?7\014\020", 32, "\363\34664\0316\003!\264\262\016C\225\026-\230(\363\007(R\347\013\014\012\304\244S\032\367\203\336x\251^\365\200\004G\354Vv\236\277S_2\363\260MU+\240\263p[\274\357\343\227\264TN\244", 100, "=\304\257c\200^\221\207\253\275\301\300\245\370\303\326Lt\026\235\337\334K\026B/&\0273\352q\024Pf\377\305\326\015\353\217~:\223bxyC\036/\021\134@\324,\337@O\024\356\252\352\314\001w", 64 }, + { "\350B\315\204\370D;A\224\200\004{,\202\302Ba\310=\214\012U\002\007\265h\007\262ou\251f\372\337\227\012\310\357\277\346\321\351\236?\310\303.\263\377`", 64 }, + { "\372\252\370u<\365\355\222\214g\324\027\302\020\214\357\013;\334A\042\331\227\267c\3001\035\215^\245\316", 32, "8Kt_\242\015\235\007d\013\376\241ml\211Bf\225k\357\226\031\042m", 200, "\214\323$\343\001&.\301\226\220\260R\263\253\207\226\321.\276E\233\267\351BW\230\365sc\273\034\005\342\006\033\2051\227*1\017\216\221\024\276Db\222\212Y\032\017X\333\320\210\177\356U\366\321\256\002\216", 64 }, + { "\203\000$\374>\2270*\334\000*\254(8\020o\311\213!\000\253q\333`r<\201IS\020\217\246", 32, "d\315\226\314\202\321\343\360\351\203\033\343\312\315\245\024x\351\274&\032\034\364m\241}\376}T\253]d", 200, "}1)\202\266\331\2179l!M\277\251\265=\3449\310\220\346\310w\330\210\026\305\251\375*\207\233\276s\277\273\202o\326wes\224\023\3222\223\365\304\375\371K\274\344t+S\314M\217d\320\221I'", 64 }, + { "\2519\015GJ\241\362a*\252\307\253B+\226\204\226\320\276TlW]xHr\244L\354<1\363", 32, "1\207\307\303\232\276\322\277\037}b\023\256\211A\371\333\220\217\342\216\304\011`\3450\270\207\343\365\277\311\301\351p\002\223\011\372\362", 200, "\354\034\351Z\226\347\033\212*\253\011X\355\254\336s\363\365\257]/\202\256c\305\203X>\251\027A\233\357s5\337\022wW\240A2\351\271v'D\376\205[\246\313\361\375\301\251\307c\202\365tf\000\305", 64 }, + { "+we\241*9\342\353\272\365\313\366\241\031\272\231R=\310#\372'\322s\014\253y\372ym\314\260", 32, "\230\327\217\225\203D\015\036\364D'2\042,\001&W\310\326*\375n\255\2530*\323\210~\203\361\234m\375\215\2151\342`\360\353\224\224\2510cW\260", 200, "\017\317\2567\134\357G\343 f\3122\011\377\334R<\365j\230\021_N\230\235\006\245\035\274\037-P\012P\225D\024\021Zy\256o\223\242\030\032Y\024\213z\265\012\374c\325\342\2735\370+\274\360&\020", 64 }, + { "\234T\251\237\350\325\232\3613\253\322p\252\327Y\212\213,\374\326\203\235\037\274\203\2665kO\025\356\012", 32, "\263Bg\330\260$a\243\027$\303M\2553\2347Qm^8\2041\011`\216@\013\011}\302%\352\360\316\352\370\003\220?\321F,\236\360\362F\327\350R@\327\247d\325\272I", 200, "\244\015\341\362\031\363\032!/\221\207\204\325\303\254xl=\267\373\336\357-\322\304o#\314\027Q\015G~\012\211l\314\265\3305T\005\247\324\000\2406vp\372t\352\204u\374O\347\032\010h\277[8\257", 64 }, + { "\257\330\002\330n\015\300\364\026\251V\016\3308\231\221\207m\003\024CL\271\251\364\324r\036\313[u&", 32, "\240\032\225W\314\311S\204\0351\027\177\361\367eO\224\260\214\274\266Yj\275#V\265\32533\244\00139m\356\256\363\312\221\015u\334\036r\205q\300\024\264\002\311\277Z\271\333\006a\326\206M\357\253B", 200, "\270\367\357\237\004\177T\024\266\332\342 g\261\336\024 \035\243\255a\336\2006Uq\217-\362\372\037S\301\314\314\327+n\252\235c\004\042\020f\311\337\177\211S\266]\346\033\210\244\254\377\333\305\314\007\355\311", 64 }, + { "\224!/\213\360\357\220!5,h\322LnTY\025{\334XqV\236qY\026A'`\021\364/", 32, "\247\213\203\223K\362\366\255\020\217\2265\222%\030T\265\313:SW\237Y\346\256\324\012\2358\235\257J\276\034\031a`\337\202\317\352Z\017\323\303 \264\042\016\015\012\253\004\264$i:F+\003\301\266)\270Im\234@\271\014\026\312", 200, "\207\261\336J\2314\262\330\025I\012\316}\354|\357\033t\006\361\326\333\232\031\325y\003K\277\3518\334\301\357\365\234\301.w\230K\256\201\266\350@~\340\222\310\014\376\355Fk\257x\242D\374\037gxU", 64 }, + { "_\005\231\003\225\334q\370mQ\321\252X\031\265=I\224{\343u)\217\201\370J?\364\013\315D\177", 32, "Q,\356e\355p\312\232\311\270O\333\024g\301vY\364\032\351\352Nw\320\247!\241\367\003\006", 64 }, + { "92\200 \224\243\3026Vp\376\270X,\300V\315\265\270$H`\262\324\271\337\320\253\367P\2525", 32, "\360\371\017\302\303~\016~\334\013(|S\017\315\2465\264\227\3060\334\014w6\235C\256I\346\022Z\012O\023\221\262\252\355\237\346\323F\3111>L.", 300, "\274\0251\006\345\321\275[id\316<\370{\026\210\350KjB\324,lS:\345O\263\301\355J\364\346\271/\3262\223j\347\231\245\234\022\241\254h\002\265\234J\275\2521V\325Xg)\215\300VFN", 64 }, + { "\224-3\372E\373y\366q6\375r\201\250\276\235\212\276R\275\347\317\331I\2572\031{k\354Sm", 32, "\335\213\324\011\243y'\302X`\317 \300nj\240\002\355\177\322\003\350\004\250\3265\333L\210\134\354\260\327Qty\007\033\337\350\234\216\340)\230/\321!|\361\2669\246\335\266\360", 300, "\240\270\256\340\027\016\010W\030L\305\234~\362\011C\234\022\267g\207\301\246p\216`\234>\245`0n\231\326\303\032\2464.\215\310\347\236\237i\220 \336i/\275q\315\205\034$Y\307\2310\326\276\252\224", 64 }, + { "\347w?8\316\356\356u\030FA\011cQ0\032\301{\322z\364\007\344\244P\003\312t\271\370\022g", 32, "\270\003\340}\246\274jA\267\033\366Z\275\177\227\331\205%v\323\260-\012\340\015?t\2752'i\302z\212\300\332\317\231\234\220\015\241\035\3523g\025\263\244\042y\340\274\322a\252\005\251\336:\275B\020E", 300, "v7\377au\016Z%\270\215\300\011\237\324S\021\207\014\357<\335-p\306\034\224\362Dn\331cK@Ji\354\217\324p\324\212\310\313Ho.\224\340\031/H\373*\335\033\357\253\037\222\204\234\265\037-", 64 }, + { "\255\002vG\234h\247N\257\033\370\323\353\003Z\352.\361\373!\003\304Z\374R\012\265\255K\273\223\005", 32, "\335'+\321\275\250\200\315\216I\235\253\307\266\310\357G\004\372\301\311\031\352y\004\247\252\277\325$-,\340\352j3\331\042\360S:}>\276\313:%N*\226\273\311\264\363W\217yBLK\225?\343W\020\360\261\347?\267\344\203", 300, "\212\336y\264\270\212\272\345y\231nX\323\343t\236|\334\370\346<\347\322[\013Z\036\200\267\333t\014\3361\347O\210\357\206\031?\314Q!\275\310)%_\325T9\376\204\260\241\223\003\363\334{K\360f", 64 }, + { "\257\324S\205\231\324\023n\317*\321\373\341\307p\302\300A\251\304\014\325\276&p=\307#\341\220\274\000", 32, "\203%ft\036\202Iv", 400, "5\213\375C\213\233\346\347\003\243\243\304\255\035\213xV\007\275\042\013\265\015\231\267\322\021~rZ\271\227~\010 T\277rS^\326\211\305\032]4\023G\224K%x\005\312\3131No\177\230O#\0423", 64 }, + { "\234$\001\017m\223\035\315\265X\360u&\202D&\321\020\216\334\261\236QA\302\004D\367R\302\255\341", 32, "\247\334\314\177\366|5\235\231h\323\217\332\364O\016", 400, ";\015\000\340\014\206\252\307\206\376\314v$\224x/\033g\027S\003\262\270\273bT\036\020\001!\261\003h\314u\003T\014\030\037V\202\005\327\216\324\213\336\020\303Le\3237B\012\374B\310\035\322\320\006\324", 64 }, + { "!B\007Pw^\277\024m\232\342jH\2722\376\326+?\3568\217WT\037\273\037\311\352\240\007\273", 32, "\374Vhd\263\246\255W\226\015\276h\241\253.\274*\012o\003D1\360\021", 400, "\0119\322\250\350\027\226G\260\203 \316\245\027[lV\313\005d6K/\217}L\353\337\273*\250]J~\223\320\266\331\225\222p\262\027\007\227DV\223\340\332\305|\211\303~N\211~\353U\340\324\261\042", 64 }, + { "`m\302\221<\360\306\306)\220)\2751sl\022\216\363\233*\257\000\251^m\006\261\367k\007\355?", 32, "\300_\016\250\265\234\3131\241\030\033L\253F\003B|\272\250\021\242z\235\011c\013\231ty\277M\027", 400, "Rb\332\252\340\0128\177\311\030p\330\0265\337\206\212\217\213\322c\240\370\200\016\370hC\012\026HB\275W\255l\316\354}\225\354M\310A(\307\372_\254\260mY\277\032\375F[{\323P\030\273\321.", 64 }, + { "\020\301r\264\274\330C\264`DH\360>V\370\005\234\013\270\273\223\234\02137\345\275{\042\326\236X", 32, "\274(\277C\310%D\305\035zk\212\360\020\324\324\223\212\234+\312$Y\221\250\006\357\325F>9\212\313n\250\2323\314\343 ", 400, "\276\012\347\225\301\271\344\223V\3001\004\212\033y\001\351\313vU\331\021C\036\360\343!\324\321%\222sh\221\232\313lo\3063\2471\354\335s\256\237.\241\267\323\247\261\340=\272\370c\276\336\134\214>\204", 64 }, + { "H\325\277\243\331\206\273\317R\005\324\030^,\370t\276j\0003\230~\370i\346\363!\223\273\244d\333", 32, "\367\241s\025\264\023%I\355:^XHr\003\230\177\331\245\347\025\372\234i\325\350-_\177\375\323\370#\320\332\320\311\241nED;\134\370:\012\026=", 400, "5\325\243\265{\033-\344\370u\020\1342B\017r\301\277\134+4\016\001+_T\367\354\012\325\311\257\023\200s \262[7jy,@\205\254\364\350\033\212\223\275\236\332o\031\350\026c\366%\377\272\333,", 64 }, + { "\012rD\010t\322\202\251\355\253W<\201J\363\312\206\323\337dN\244V\025zG\324\375\361\207RK", 32, "\207\227\350\201v\263\376\206\215\360\221\3046\022\217\002+\022[0\216G\225bQ)s\204\321,\225\352\256`!\250\333\216\364\217\30602i\017\262\013\352\326\301\250\022\244iLf", 400, "\034\033\242g\257\230{\316\363{U\253\0049\000\257\265\264\030\264\011E\320J1<\274)\201[c\252\323\266\353\222\022Jy\366\301\024\252\024m\272\261\307=\2047\371Ril\222/\230eL\003\325c\276", 64 }, + { "\207xrV%\324mBu\004\356\222\302;`T\347\0040\302\356\324\012\335\015#\324\330\214\335\221\205", 32, "\346)|\356\355q\266\340?\377\220\364\361\022\004\274eTvh>@\231\205\003\3354\234\001\337\260\031\225\3546C0i-\377\3657\021\340\354\225\352@\314\313\336\035\313\014\347\327\320\250\314\276\247#\356`", 400, "\341\017\177\253\177\265\002.\322\235\224\177\244$k\307H\245&fLi\354|u\241^^\0231#\300\317<\316\230\254\0302\264\134\011\016\275\356)\307\374\365\313\324\311\267\246\236\371Sl\366\327\254\333c!", 64 }, + { "\024\201\3045\325ty\362\270\271\253!\260hE4\220W\255\240\277\377\326\320\202\206t\264I\324\215\204", 32, "_\271\352z\017\375Q\326\256`\372g=\274\261c\367\033#\275\356\0242\315<\220[#\023\371\2636\3131\360:\324\375\242 mC\227\315\220\302\006#\204\273\011\252\245\002\026\030&_\241:T\215(\002\372\213\252\331lX\017\370", 400, "\242\304\265c@\230\004N\354\001\252\263\211\037\201\276-]\015g\365\204\323\252\355\272\3165iB\364\357HS\345\253\303+\006\251g]\370\323\204\267\346\031[#`\225\343\272\201\253Rxn\347l-\3050", 64 }, + { "A\316\347I\012\032\011\224\206\310LF}\377\212\035q.\031\206\241Tt\346\252\220(o\223\272\325\257", 32, "\011\025\200\201\221V\177\373", 500, "C\275\213\366A\324\330s\323\322\231\342\353\355F\226Z\253T| f\331\134\377\337K\325 ^[#\275\012\231\325\032\362S\371\027\312\223*\356\222\364\226\042\311\006\260s\360\236\034\253\310\357\365\265h\374\236", 64 }, + { "663\230\3430\362\027D#\210\010\013P\017\224>\020\005\216\272m\006\035\225\355Zly\221\005\223", 32, "\335\374\334\026Y\254Z\211\272\353\306L\354)\251\002", 500, "\022e\035\371\012\311q\335%W\011\312B\377\263=\376\214'\275}K\254\221R\205\321\212'X\221\354\337_e\327\362\372\323\320\311\300b\263\253\273\020\305\302\251\002\266\005|F\245g_?<\361\314P\201", 64 }, + { "\031\236|\263)\012v8?A\033\332\003\363\2020sLS\230&\353B\031\242\010\245=\027\217\037p", 32, "\012]\202\012\2107`\233\373\265r\217\234\273\213|M|\315\357Yue\327", 500, "g,v\236\024\021\267gL{\262\341\213\346\356B\250a\361\354\276\267-\313\201d\211[\001bu\314`T\036\134\212\022\330o\366_\254\3731\354\024Z\300\272\250>%Y&Y\354v\271K<\316\246H", 64 }, + { "\301\031\014\272\325+ \361B\361\360\204\343A\230\220l\221\017\337\250\316\134T\351\211\037eO\305.x", 32, "J\244-\214\267\363s8\302\242\237\204\351\274q\204\3478\227z\263\311u\312~\336\317\250\241\341\206q", 500, "\316\205\233\374\320\350\232\001\355\277E\227\230:\372q\230\024\373y\356\264\306F3\2551\320\246\275\025\036\206{\323\264\272f\276\330\1778\262?\235\204\363\363\261w\030\251\242\347}\002\305\223|)\340{\264\257", 64 }, + { "\364wG\247F\300\250\203\364rB\337\311\272Td\221\207\034\251\303\265\217\014\273P\034\377\342\254\363\037", 32, "\361\134\360\257\305\010\030w\345\030Y\244\236\002ge\324\326\340\276\022\362\335\353\366\362\205\307\020A\232\274\034\240\366\274\310C\242v", 500, "\260\311x\272\213L,\223\333U\363\022\355\366?\231Fr\227\025\253\321\203\025\013M(\033\300\302\226\256\272\344\370\217\034\256o\376\325[\004\035\007\004M\220\005\334y\234O\367\334wp\2750'\032y\306T", 64 }, + { "t\246\251p\322\247`B\337\225i\007\362\317\201\023\010\263H]\373\344\226\005\304^@z\226\210>\250", 32, "\315\310T\325\200ys9\324G\3320\034J\376\024\366\365\310\351\350\221\362\251u\372\334xiUD\205Q\247\206\276\232\204\015\2034\264\347x\303\270\375[", 500, ">F\372\306+\2150\024\263\031\340\226\215d\350\373!\237\272\263\340\362aBZ\354\263N\377!r\351\307\223\257\215\224\322\305\253j\016\201W\303\3706\177%\262$\212\334P\015uwj#\267\037(\254\204", 64 }, + { "\351\275\340\351\264\341\017\033f|\233\331pOK\277)\013\354\312\356\211\344@(\320\321\322,\367Z\212", 32, "\360\340\021bp\367\336\246\352\231\244.\232\370M\257\204\033/v\236\226I\215\033\243}#e\362\030>g\361\242'\334\220\177\003t\353<\370\023f\034\354\177\017\267\013\335\315\350\355", 500, "\001\266i\240c\265i\314\204Y\252!\335\042\373\211\332U\303(\273\304m\261\020l!\360\300\006\376j8\2547E\037+\242yO8\002\377]\256\245Q\032}R\343\311\344H\353/\227\3566\270V\263D", 64 }, + { "\217\025\363\021\024\006\013\355\005N2/\250-+\3704\354M\001t\245\000\233\361j\324:\340\266D\036", 32, "\177\226\351\134a]/i\247`\370\346\243\006Q8\302\211r\021gQb\006\244s\350\273\303\202\220\236\341:\372\026\335_\247f\203\254\303\010\231\035gG\252e\375 \326H\3469\270\014d\215\273{yw", 500, "\270\334>\273H\035}\215\322\350,\353r\212\020\362Hd\033\214\021g}\366\352\346\2725K\022K\217\220z\221n;M5\024\012\310\225Uv\377.\203\260\026W\351\000\263\003\266\017\202\324x\313~/\302", 64 }, + { "\214k\277\217\215\031\022\204\207\011_E\321BRrkE\020\015\375\223\367\346\370\013f2\306R\217\356", 32, "\307\337r\321\366\245\307A\013\015t\352\362\006?\245 \333\334\264f\260N\250\225\341\030J\334`#\263j\275\231WU8\366\203K\223\365X,\266?n(_v\347\303\305|\316\207\013\042\251\233\232\011\324\3714g\010#C\241\336", 500, "\007YI\203\310+\236\336\020\221YU\351\376\232\266DF@Y\006\226\242\256\270r\303eO'\366?+\323\032\225\345\320\015\227rsge\317\260\342jp\231\372\306nG\350Mx/\337f\2757\0121", 64 }, + { "\134\355\220\225k\203\013\271o\037N\364\237\343\352c\336:\335n0\213\247\365K\204A\253\005\205\211=", 32, "u\267\316\322\344I\327a", 600, "\263OO\366\217\232\213i\216se\234\231\2740!\311#\256~2\267\134\025\367\310\020\3541-T\223\227\025\010\276\212c~\265Sf1\200\017MO\002\006\352\374\316}\313\032\317\221\007\322]S\224jl", 64 }, + { "\014\274\263\346f\231?\005\223\3336\036u\301z\361\324\277\351\013\320\244\247_\365\315n\222\345s\023\134", 32, "\336I\3260\310g\341\234\3012\376\205\002\301f\311", 600, "\362\246 u\364\216c\037\232*\037\253\031\335\347\022[\007\256j\303O\225\270\204/\031E\244\253FdC\272\305\233i\343\357\327b\273\241j\243\261\321\255\345\304\365\363\337\277\222(&hL\325\361\011J\266", 64 }, + { "YC\314\276\211\370\003\272\320\325\232?v\203\001\274\2738qt\256\330\365\276Ad)\256$5\353v", 32, "g\346W\016*\233\311\344_\267D\346\261\322>\031\274J\300A:\355\232\330", 600, "\304\2457j\205\3131Z\021oA\234FI\254(O\026\334N\017\324\206\033_C\375\231$\314\270\212\245aV\035+\220GC\264\035@\241\231\0124\235\014<\334j\257d9\355\301(\236\226\210$\235\230", 64 }, + { "\207j\363\010\013\313\273v\326\270\265e\260\033\313\3237\211*tQ\366\215\216J\212\235\324 W\035\033", 32, "\303\374\023\372y\363\307\320(w\236\200H]\371\262\010\006\020\361M\030\346\222\361\216S!bc\3612", 600, "Y\301\037?z\341Y\350_\374@\210\324\274\014f\377\317\023\303lOh\032\253\035\332\217|\375.m\203\031\361^\320v\323^ s\031\347\215Z\012Zj\335\206\363\024:F\310\035\211\255\216\301\203\251M", 64 }, + { "\216PY\256\343yt=H\205\303\011\353\232\340\2630^\021\365\266\004r\001\307wV\251a3k\370", 32, "I\256\322\255atb\305@\004Z\352H\032\205\212\254\215", 32, "vU\273'/j`\351", 700, "\360\255\227x\024|z\360JY\364\273B\240\037+\027\376\346\207?\030A`K\216Ba\366\241^A\030n\027\363\225\301z]Y_e\012\273*0\222\274\242\313Q\003\201\336\034\210T\361\2268E\243\303", 64 }, + { "\352J\265\255z\256\252C\363\273\332\3044\351\214\311\012\2516~\226\355\225/\347T\264\260A\330\377\355", 32, "dv\016\032\340<\207.\260\037\354\234Csm\337", 700, "\360|\337\257\240\016)LW\230]\035T\016\001\256\252Ew\222\016\003{yE\025^A\274\377\346\265\370W\361\336`\352\0118~\241\356BW\272\315\260P\240\273\273v\322.P\322\301\177\033`\317\244\346", 64 }, + { "Q\026o\230\010\276b\336kNrzjJ\021D\302\364'\353'1\202\345\207\203\207\201\034\203\000\257", 32, "lwS\255\204\030M\357jIx\363\301\271q\304!r\215s\356\322\340$", 700, "Fx\263\350\210|\223Thrl\326\215A\366u\2168z\225U\255\314_v\020\017\314\025U\304S\023}N\021\363a\314\267G\2444\205C\200\011^Q\253{\216}[zfQG<\232\242r\314\334", 64 }, + { "Y+b\271\212\342\325\025\343\277\012\223\0121\243d\004\240\342<\205\013f0k\307\254\335\014e\364\261", 32, "\343j4%\254\352o \0116ksr)-\341\366\366P)\021\362\305\305\003T\204\302\317\312\313f", 700, "\016r\343>\207\376\003\177dw\037AN\262\334\017Y\236\374L\253<,\226\027d\317;\250`\216\326\334d\251\355\300i3eV\241Iy\220\001\356\035\364[\303\220:\242|eN\313\354\3039\3309\272", 64 }, + { "\354\261t\321\217\227\3512\321}N\214E\257\251~\006\014\372\200R\017\261\007\021\220\371\370@@P\222", 32, "\277\301+;*+3M\352\373\365\246\304\356\250nf\320-\241\325\244\306\357kXYX\325R/u\326*\277\265<\200\360\270", 700, "\265%\225}\007\257W\255.\306\000\201U>\271\330F*\253DD\317\021aj\374\223`3\367f;\026\010\342f\0150o\232\303\015\377\017\205\357%\277]\277\216m&\236\344\366\313?\373P\214\223\000\324", 64 }, + { "\310F\324\335\367\301A4\252\337\342\331\016\000\241V\341>\237\034C\204\301\276\255e\276q\341\3778\301", 32, "\214\222\134\343\224:\336\012B\323z\310\262\021\205\225\216<\313|\227L\267\024^s\316\257\014\2259\261\371tB\242\373\366\232\374\353\336[\343\026k\307\256", 700, "u:_q\370\012\235@\315X|\367\377C\217\353(\3051a\251\001\003\226\205\342\227\212\306\337$\274\201\212P\315\017\221\347\006\021\230\354\266\200.v\213\361'\320\227\331Wi\034\374\346)\332\273O\372\225", 64 }, + { "o\210\323\375q@\013U\011)\020\252TE\206\233\306\2058\324\371\354P\374?\212\235e;r\207\261", 32, "U[{7\230\215\213\276\344\336\223\322,P\214\360\205\007\202\276e\005\025H\2048\212\247Vq\232q\303\272r\273\001=\201\261\265I\311\266\323\206\203\207J\212\323\200A\375!\276", 700, "\211B\011\227\272\0275k\016\015\266\202B\0301\223\226@\037\005\377H#\302~B\020|\002\226\015\242C\342\273T\306\245\376\307\320I\301f\021f\316[_Q\356\210M!\271m\011p\027\361x\316\353]", 64 }, + { "\033\310\253\302A\013u\205\252\020.\233;\372vs\243\275\351 \015G\220l);\265\245\362c0[", 32, "\306\233y\253,\303\222I\343\335\211\242\243\026\320\253\177\211x\215\033\234\177*\333\343~\215\364\333t\326\005\240\256\300\362\015\022\344\212+)\237\277k\354;FFL\323\373\2342\022\001\254S\353\265\253\323\363", 700, "(#\342K\312\320\243\035\234y\366\000\333\023\256\305\042\361u\035\026\201?\252}Y\015=\203\332\235;&\344\027\235f\353\252\235\257Z\042k\377:\346\365l\236\335\035\274X\237WL\342\237U.y\003H", 64 }, + { "\003!:\341;,\031hr\233W\265|O\015!eO\352\272\355\210\304\360\3318q\004pw)\364", 32, "\317\243\314\370\315\317\025\017\002\273\020\344\354\222^\007\217\245\336\362\002\307c\207\376\236[\373`\257\226\332\025\202\246\010\230>\311|#\273\134\322A\364y\354V\021*=\344\326jb_:Z\221\214\203\011\277h\042v\212\211\241\303r", 700, "\252'\212\362^\0326\2114\216J#\367z\024KZIf{~\375\345C\302\307\236\030\002\262\346\012\033\317\272\230\244\320\220\272\242*\021\327\240>k`\222\263DT\231\204';\301i\027.\302\223\320\236", 64 }, + { "\321\334^\2313\347D\003\200\003RyA\002\241\321b\264d\337k]\005\260\265\226\001\017\3361$\341", 32, "6\327\246\342\376\260\013\303", 800, "\304\350\334c\025Q\240R\263\243M\320\011D\351\230\375\257Q\134\346V\303\267i\362\221\277?\323\363\207?`Qx\023\356H*wm\032\343F\017\304\033\327\204\242\2064^\214\204n3\000oqF3\347", 64 }, + { "<\204\330om\325\200\322\261\262\343\010\364z\017\317\223\366\313\311'\263\344V\270\134\2008\005'\267K", 32, "\015<\014\200\270\270\134\036\277\352\025\350Gk,\301", 800, "\331[p+\273\317\247\205\026\353\262\311\226D0Q\273U\014\366Rc\371\346>\255\206Z\253\260\267\226\200\321\357\134\3309\002X\014\015\241Wu2Y2$\331\265M\267\377\262\255r\252-\021d\201\341\217", 64 }, + { "\206\362\247\200tY~\344\264,\2113{Myk\366\370\3025\310_\343g6 \261nK ~\310", 32, "\323\372Uv{\243\026\035\350\261\323(B\257.\334v\024K\016\334\227\034\266", 800, "]\275\033\351\007\357\036\375\264\375$\360\322{\213Jaxg\027\21729\251\357\274\246\222\267K\271\351\237\321o\2451\035\310\2423\267|\272~\254\222\030\356c\003\240\337\373\231\033\270\340\277\240\3505V`", 64 }, + { "y\207\206\361\236\374\200\304St\364l\263z\244\375\270!\355\334\370\205\372(\027#\320!xij\313\314", 64 }, + { "\200\364\370;\271\323\015f\203%k\217\262E?*\305\243\211S\370\010fV\255\271IA\312sL\303", 32, "P'\305'\353+.\324[\364\241]\231\231_\215\357\004\345\322\2315\250F\335I\3471u\026\325{\204\241l\235\365\233\357x", 800, "\226v\235\300y\206\023\337\027\266B+1\377\312\214/\027\343m~\036\361\222R\024}\337S$\003\001\330\317cW\200iKJ\362sy\227\307\2670S\341;\252dE\343\217\375\270\206\373,1\020\352\312", 64 }, + { "ZN\344\3253\000'\217\224\223\206\257\3662\321\235j\204K\236\264'\312\030\327\276*\363\001q\272\223", 32, "\246\017~\226\231#gE\374\224\224E\374d\367\301\027\336XL\242+-\247\227\020F\215e\354\020i\272\214\271F>v\030\230t\007n\263\301\275\231\214", 800, "\332\003m>\274\2375.p0[\0234\037\245\256\227\2617%2\374u/\201,\316\324\200\323\225a\242\023c\332\233\211\342\254\011\230\032AV\235`\246PC\222\301\222/\342\354\261\251;\3505\357ey", 64 }, + { "\371\374\236\365\2432\210\021\205\300A[\365\017\207\2611\252\236`\015\031\205\326E\324\010\253\037\312\267\304", 32, "e\316\2516%\025\333\014\300QA\220O\343\366\001J5\251\353\300\262\262A\2748-R\025\027\263\227z\231E}Z\207\017\250\365\030\001\344\231\376\002j!\375\317\206 \347\3046", 800, "S]:v\220\373\206M\244y$\240\260>\030q\335+\206\205\305\361\251\326\0039\332.\034X\250x\004O\016\221\022\027\001\022\221,r\377F\262M\307=\033\042\341\312\014/\024v\224\265\200R\363\223|\360\235\200qp\225$o\201\020\2500\375\024^\217d\347*\355\257\211L \007", 64 }, + { "\206\307\0424\261\034\255\242\033\233\205VS*\003W8\226n\302\042\263\366YL\343\033\256'R\007\331", 32, "\035\241\217\002\364\341\305\313Cu\347@)\020\376\336\372\375\257Y3\202\237\266\365)J\270\351\265\310\212v$\201\207_@u\013\301\177j94\202\304k\345W_\324\310z\215_\304\2554U\236\245\314\330\313r\271\001\335\0075\322", 800, "\237\225\217\301\200\264\242I\240Z}\303\365n\227ps\365\302\013U3\373\311\273`KQ\354\360\335\212p\227\245h\332\225\374\375\374\300\261#[\240\246y\212\013\332/\342\212ns\243'\243\036\023\375\002[", 64 }, + { "d\375\042\033\372\337\277O4\004\270\037G|\234oY\032\214\211|6\374\374\207\221\205\261Z\034h\362", 32, "\332jcz)%\345\206", 900, "\312\233\266M|)\265Y\277UY\323MYj\034\203\011\353\215\361\247:(/o\270\321\362\034&\302$\2402\277\260\262\371\231\030\204\373\230;\276\371\000\323\302\025\314\027\205\035\2404\257]Kyl\363\203", 64 }, + { "\272\211\350\227\343N9\013\232\254RC\003\362)-M\324)\211\002\343l\331\300\177`\255\373\017r[", 32, "O[\2002X\323wW\374\204vg\355\270\003t", 900, "\243FM\260\206\333G\331\341\347\337\336\001;rr\306\343\211\360\272'g\207>'\224\334\2664nLA\311\221\321\030\024\015\036\246[\224\364P\270\223q\221QN\254\272+]\246G\337z@\211FQ~", 64 }, + { "x\357\024\247\310&1j\252\035r\024\301\217\241\012\336\300[\342\201\312\335<\307y(\273\321Wp\323", 32, "u#j\303\340\326h\242\367\023&\377\334M\201\202Y\342F\205\241\357\220\036", 900, "1\343\316\341e\365\233Z\355\313\013\021\302@\027\274\223\342\331\367\343z\353R\276r [\273\344\332~\015\311\255\324\325\014i\266dH\357s\3040\304\002\355\257\274\022\212\346\27511\300\272\215\210m\042|", 64 }, + { "Y}\011\134e\265|\3432\274gZi\334\340\320\011E\360\353\033\374\373\004\023n\025Z\325j\036\003", 32, "~\034V#\3239\346\017\020m\212/\203\370\372'\341\005\021\246\304\341v\352\275\224\036M\313S\211\257", 900, "\377\374\030KE\325Clh$K|\350#Ns\267X\3442\031%\270\012\024\17744_P\317Y\244\316s[\240\312\347F\305Q\322\021\013D\350\022V\014\2677\017q\306\361\222\260\306\037\257\236\010\263", 64 }, + { "\301\271z:r\325\332&s\200|W\361\220\270V\327\337\376\266Q\343/Z\224\245\021\226f\012\227\321", 32, "\1342m}<\220\234r\367W?\235p\234k\216.Z\260Q\304\212u\006\323\317\3103\300&@\257\354\276\245\311_9\004\252", 900, "\351\010\311ad_\347\271\204\243\007\377\311\236C\027,\215e\200\030\024=:B\253fp,1C\221\311d\214l \317T\027\376\030\320\204o:\362\235h\270\366\353\001eJu\004\202\300`\215%\355\201", 64 }, + { "\241\371#\267\251}\342\250k\275/\364dhP\000\340rX\010\006f\241\371\377>>\032\370\265h\253", 32, "\333/\273\006\213P\330\305\304\357\357\324.A!\002\250\210brD\302{\026n\007\350}\327,\371\260\240\322\253Q\243\266\254\037\001fm\233\257Z\315-", 900, "\030{p\375!\357\134*\353\017C%\217C+\225m\005_\206+\004 J:N\370\367\2041o7\241\236\222\261 \313\222\177\340\134\376r;l\224cC\035v?\022\316\321D \372K\214\317\216A>", 64 }, + { "\014b\217 (,\360\311\026\343\360yQ\215\363?\030\3467f\352\251%4\361Pt\037\261\371\014b", 32, "\032\257\353]'\003&l`\315\012\274\356L\346\001\255\303\3150{?/K\270\305\346\2311$O\244C--\351\004\206n\327S\217[\134\274c\372P}\243\355A\354\266\207\006", 900, "\007t\223\367\034\352H\312\205\030\314|\272\240\360\362\006\002(@\261\224\004\225\204Q,{qhp\240\271S\340B\015C\376f/\370B&Gf\024\022\312M\262O\316\177 \325i>\274\377E&\220\220", 64 }, + { "=`\230\314\234r\206\304\134\367\363!\023\2774\301\323\026\011\366\265\265/(\343!\007\335\242\214P\012", 32, "e\024\351\002y\227a\260\331\026\213Y\267\251\310*\230\030W\214p\255\230u\001j\3704\315\375MSX\030c\336\306w\325\346\262\2640\255\2465\253\3334\337Nex\234\334\216\316\314|-\257\017\022(", 900, "t\221\347C\244\016:\216QD[$r\347\227\325\256\343P\203.\012\277\3216N\241\351!\037\211\322U\017h\021\042\352\030\221=\317r\306 \367G\372\270\214\004\000\207n1\3646\344\034\371R\215K\305", 64 }, + { "\355\361\227|\310\247\256\014p\026\017\037?\364\277\355\314\030\236\306\032\306\240\321%\262\256\265\244Y\216\252", 32, "\263\354<\350\215\312\311\366\242xX'\234\312}f$>Ez\327\023x\320\355\331'\372uF\231\257\251^\034\364d\230\022\304\245\322\261>\325,\273\357\303\311N\3374~\323Q\014\342b\342\025\226y\307\245\026\231Q\266dm\215", 900, "\325\361\300\010\312\311\037\017Mh\310]\254@NC\324\205+Y6\027\362'b`x\353\007\211\035\264b\005\225|&\321AH+W\007z\377#\361\274\265:\371=\257\225\361ec]\315\203Jv\203R", 64 }, + { "\242\341U\355j\004k\356\204\330\351ufb\327\337\357A\223\341\233\3668\220\352\134\247\202\373\006\310\323", 32, "]\331\327\016\205\272\246\206", 1000, "?\230\007\216(\272\307M\015J\344W\242_\233\230\2201\243iM\254\362+\254\333\3658I'\335\241\377\2061\013d\212T<\327\201\257*U=\014\226\321\251\227y\370y\016\216=C\363$j\272\241\365", 64 }, + { "\017\376\364^4\254p\016=\353\344\366\352\006\227)\030\357\004\263R\373\177#\211 \335V*[\344\257", 32, "\3722\017\275\232\262\323fcgiW\232\224\262f", 1000, "\373P\274\357\005\026n\3021wkI\355\325\026\376\021", 64 }, + { "\042t\014\315\227K\273\323\237\220!\270\0172O?\2645\030\265J\325F\343!\241\344\323\301\241\024\272", 32, "\316\027A>\233\225\212m0\037Z\277d-f\017\200\303z\334Y@\261\230\254XT\227P\301\260\014\242\266\244\262f\334\365\324", 1000, "q2\353W\236\364\266\204\340G2\337\224;\220\223/|\2132\202%\215+\362\023\340>\210\360]\217n\374'\353-\010\217\000\212U\335,\012*_\325\001\370\037\322\007uCu\037\331\242\212eb\343\035", 64 }, + { "|{v\001\223\245`d\005\263$\321\225f\344\340\010,\305\273\025$\370\275<\315\373j\304\226\350\233", 32, "\224\263<\367\330\351A*\260\300\235\337))y\221\367\306\373G\324\266\227\372\027g\013OH\321f\326\025\333\334|\013\002e\005\025\205\004j\212\206\244\216", 1000, "\341\371\031\340\344\313\002M\255\020I\333\324\265\242ra\371mhr\017\214\366\274\337\200l\336R\305\276F\024\264\035:'Hg\231\245\217\350\306\251\376\032\310\010\311\250\013\354Tr\017c\367\241\300\031h\211", 64 }, + { "\303\341\317.\250\305\257\235F\324\011OjZ2\312s\224st\2041KS\233H\022gm\354\276<", 32, "%\264\212\004p\266<\314:\376\324\250\341\3151\251 F~\223\267\032\252\245\370\001[\257~v\363\242\253\240g\042j\306\233\336\312\042\345\257:\266Rc?\011$\344\313\267t|", 1000, ">a>\272\354,h\337\205\232\204Z\212\230\257e\307D\322\263\2539,\264\271!\034Rg=\201\334~\201\252@etE\326\241Q3f\205\314cc\237\216\373\272>,\0112\010\273 \307\332z\223\274", 64 }, + { "\211\211\354\215f\332\255Z\340\337P\031\217G\266c\200J\323\042\361\250[\210\022\007R\341A\017xD", 32, "\256\303\241\352Ij\317\253XL\262\221\031\375S\343\275\225\301\033\356\264\332'\014\004\326\230\036\275\002\325\260\301-2\223\247\0041m\251\210a\356\251\274\324\204\361AP,\312\025\247^\363t[\350\223WY", 1000, "\311\035\334V-zy\017\370\244\203\300W_f\2177\002\237T;\301\261\221G[S.\037\2030`1\321\010\300(b~\371\217\034\301\276\250\023\2462\342\374\332`\372\204x\035\247\012\237ju\275\224\362", 64 }, + { " \313\304\230\206\234\222pk\244\005\2711u \340 \223\322\345\002w\275\020\324\316\224\325\036r\223;", 32, "\372\344\357\324a\333\254c\215i\177\320\300\242\020\025[\005\3252;b\277&@I\270\015}F.;\242\304!\177\343\012=U\253\253o[qR\371\201n\357\361\330\277\253\346\177^\332\042\322$\201\377\340.IOk\273\363\005w", 1000, "\310\012_\254\372k\220\263\272\361\134l,\345/\371\371\357\237\301>\205\237\237m\036\272~^L\355\0210X\221x\331\0256LD\264(1f\357\014#?w\034\023'\210&\355\261\235\361^\004\277\313\014", 64 }, + { "\373\253'\357\233\227]\260\212\305\037\273`\364\001\032H\177\203\342\012\022\225\2572o`\240\277|\275M", 32, "U7%\340\031!\012%", 2000, "\024\2525\230j}\315\267\244\345e6oY\226\027\347\017\336\134\316\355*\252F,\034\247\267\270'\017\245\201I\2735\205^\205!\205\312\221\352\216\270\274\222\276\011 |-E\301#\240ifGA\375\210", 64 }, + { "\207K/>\226\027\221N{?\037s\003\323&S\243\355$R\361\254Q\026R9\2540\231Zx\374", 32, "\314\260\226\231\312\037\245u\230\345]T&\037>\375", 2000, "\010\267\374\351\370\303s,\323\030N\244\353\252e\275\205\253\206TL\340\3205E\004\253\204f\220\362\330\231\037?\204'D\274+\367\363\316\340\340x:\230\254\313U\016\347\023|G?\363\017\037M\177l\321", 64 }, + { "\215\3425\215\223\0224\311Y\251\213\337\240nw\233\343\320\335\244U!\300\023\023\347\012w1\222\011\263", 32, "\010uJ\261\030JR\357vV\257Wd\012\004i\257\351\360\266\303\200/\256", 2000, "\211\243QK\231\376\321\212\322\350\321*\245~\311+6S\013E$\351\217\227\224\217B\006\230\212\251L\264\245.ZJ\350$!u\000Q]\021}`\022\370U\364\224\215\274%\353\333Ys\177*\265#\314", 64 }, + { "O\2649\000z2\177w\372mk@\345\277\270$\231\330\246\001\334\350\271-\264\343\307\342Nw\231\221", 32, "\201VZ\223\246\217\224\263\241AO\325\367\251\031\322\221\200g\354BM\2600\340x\276\307\246zIT", 2000, "\316\341$\022\261\303\322yZh\227\205\310(\347\233\326g\031\220>\011\226.\352J\242\311\274\247\211\010\355\336\220\214,\2440\214\311\241\253I\042^\257\361\336\241\360\177UB\356G^\325\203A\3040,\042", 64 }, + { "\177\016\252\362g\010?|\0168\364*!(\042\343\015]m\253>\012\012/\3471\205\015\321\014jh", 32, "%$\263U\023\275\273\230SxJ\363o\373\241JK\234\252<)\207\026\302\267\215\016C\357\014V(\021J\336pq%\360\214", 2000, "\301\365\314\263\264K\025\305[161\030\015\211\207\0358h\020\231\042\351\031\323\253wC\320\330\351\205Nm\216\024\033\201e\324\037\354\006Z\331\305O\335\272\333\233\243\262\271b\023/\342\320l\177\311L\000", 64 }, + { "L\027CQ\252\262\232\343\237\205\245\344C\014F4\134\210\345\213G\256.~;\240\252<\332\202(\032", 32, "\313\376\250X\267T\235\320\236T\242[\255'\0117\207\332 \2130\242kz\246}\336\321\022_\316\377\323}\340_H.\001\337\327\205\372q\022\355\013m", 2000, "\302\002\343\242\245\365L\016\366\205WD\242\015\330\375\300\357\357\020\206\344j\237\022\002\036\247\265>\350\036\212\027\242\325\2135a\320\312\344\330O\366\335=h\253\330b\216\221\017\031\026\027\233 \260\254\204\345#", 64 }, + { "\013\207\005\265\235\252\020\354d\367\342\006\341\2004\311\021l\000\256\246\241\342v\342\026B\225\333&\214L", 32, "xW\265\230\242\345\002d\230\216\315\347!\232\272\3751J7\3271\011;-\3309:\207\374\204\244\203\244\333\026\011\344\366\134\364j\324\004y4\347^\005\313\202)_\030\217\236\355", 2000, "F<\236\376\203\266\204\306\361\367/\001:\220\350a\366\035\326\374\332\244\304`\202\367oA\335\331\013\330\204\361\353$\347\206\345\231\005\231l\215\013L\351\302\267]\244\006\335\374G\342\311)\245q\301B_I", 64 }, + { "\241\021vc\346\211\270V\212A\302t8\233G\232&c\001_\263\211k\232~\241\001\305z;}\204\371F<\200\350\260%E\036\374\013Nu\200\242>\321\234\316Y\232\375\220\036\243C\250)N\375\341\3775\336\357@O\232\304\225gH\351\270\316\003V\364\003\206;\352.\320", 2000, "\360\350\222\354\320\364\042y\245\343W\2413\024\250\221\377\245\325GH\277ZAu\274\026\265\275\231\304\2722.\010np\217\302f#\346Z\347]@\216a\302\177F\233k?\326\337x\301}\230ek\300\332", 64 }, + { "\030\344U\2107\244N\237\230d\255\376\324\213\343l\224\201\325\027Xb\201sH\200\245\263\244\035\005\300", 32, "]\371\274\014\217\177([--\347Z{\021\350\330\301\134\255n/&@N/\177?\2006\2026\360\241'\3025\215\362\253\322\027\034\201mA\353>3\247\366d\327\007g\335Z\367|L\026\234\301\340\016\325\204\261\244i\036\016*", 2000, "\225q\223-\325\221\257:\351t\266\032n\250\357\002\350\003:\020\242\302\236\311\245zi(\333\010B.\311\256>\265Uue7B\030-\243((%\332\362\303D\325\242\314\243\321g\264\201\331\001@\207{", 64 }, + { ".\356\217\343\212\004\001a\027\213\207[,\042\231Xj\221\315\276HB\037F+\372B\251|\265t\026", 32, "\330R]2\031E\351U", 3000, "Z\271\372U\365\246\007\342\272\236\251\271%V\347\027Q\303\237\356\304\242\220\231\026GJ\011\031R>\252Y\223\014\017]\311\365\265>8\370\211\323\014\2027\225\304\030\273\000[Jj\204\015\025c\211\302\361\331", 64 }, + { "\333?\003\246\275\035\007?\027Y\354w\012\344f$\3309\030Rf\263\366\306\350]\332\002\221\346/t", 32, "\361A\234}\315\361C\366\227\177h\325\235'\001\205", 3000, "f\367\374\346\006B\013x%\010]\371I]\256F\042\264\334\233#'\013\271|\347\355I?#7\266\257\253\353\027\217\025\276/G\334\020'\271\004>A\033\233WM\237\377S)\347}\2357\252=\277\313", 64 }, + { "\334\276\227$\003\200y\2567l0kC1\3330\310*x>V\273\021\015\305\246=\250\353\361Y\221", 32, "\364\023\034&\371R\363\231\003\342\350\236\0131\333u\266\314\327\266-8\243\374", 3000, "(\004s\333p/\003\201\333\376F\024K\313\004\374\371\310W{\037\313\377J!\304[\303:\3329\340\200E\204\177\212p\235^\221pu~\270\361Jvl\267;W\225\034\311Lm\371Yl\301Q\032f", 64 }, + { "\221\326\310\317\321-OH\334\006\007P\374uz\213\300\226h\231G\2220E\237\235\323\030\235=\316\267", 32, "ZO\241\0178\261\034\025\311\353E=t\353\331\003\364\243}\005\343\364\006\340\024t\341w\310\303\235\035", 3000, "\363Nm\010\373\315G\216_\354\021\200I\242]\014y\026u\301\346?\273/\304\213z\264\231e\322\304\010\217\205\303\204\277.\234\371\22699L\242\342\313\027\210\316\026z\252\215\235\307\347\361\002\306\037D\302", 64 }, + { "\032\370|S\365\270uTK\326O\353r\255\271\034#\327\307\370\242\262\374\266\312\263#\277J\215\251\362", 32, "\301\225\303\340w\312\303}~\011+\261z\216\320\220c\237\250\037\011\253\300%\267\011q\224\266z\271\025m\266\361|\341\374\301\007", 3000, "\364\037VE\343\326\327v\222\042\300\250\272Mr\036\023\270~o\316\314?Z\321\232c\261\374Rq\020~\032\344\333\134\272\223)\035\005Di\205\345\012;\3076\227\205Y/Z\350\016\236\317J\253\323`=", 64 }, + { "\245\223u0\342\000R\223\240\033e\340**\244\254K\302\031\363\177`M\240$\247\361\317Y\220\227\344", 32, "\372U\371\002\134:\304\002\023\314\037x\372\231\375\241\210\360\224_}r\334\302+\372t\2741I6\035\232\226\036\336\012\211\316\260\205\220\3374\316\256m\343", 3000, "\273\361\376/\034`\322Sy\031\333*\033\134U~$b\362\363\236\361$\313H\022\243\203\306\352\314\375\204\347\223S\246\314\230jB,%\241\000\335\237\364I\000\215\266\300DR\211`\322\271\306\026.\215\341", 64 }, + { "\273G\256e\220\336\234\0325]\177\324\012\204\230\031\322\023<\020~;\347J\355\027\244\032\342\304\340t", 32, "A\350>\021x_\311\275\017\322!\315\376\357\177t\236\001~\355\315Tg\344_\012\002j\2454\002 \233\012&\212g\224\221m\242\315\353\250e\322o\004L\005<)\220 \177R", 3000, "S:z\324\320\361s\320>bW\326\0118\026b\316[\021\265\375\273\021\343\031\205u7-.\307+\360W\237\321\236 z_\347H\256q\255\022\242%\2746\032\251B\224\2446^\266\261\177|\272\010\246", 64 }, + { "\367>aQ\260\374\262\260\020\201%\260[M\244G3\337H\200\025g:\002\275@\373H\364Q\030x", 32, "\321~\273\020-L\224;2\342G\223\025\235i {\256\342 =\316e\376\014\215\221\034\252\235\25762\007\210\3158\257(\235\277i\350\272\011\016\231fb\007\243)\307\376\2409\234\011\034\207\262\307\026\230", 3000, "\307\312QT\215\034\320`\314\352\251]\210w&\203\004\2716\352\251\311\311\261\001\220\276\224\301Y\020\241\245\364L\305\335NP#$]\251\023}z\304\351\304?\214\000\354r\323\000\300\220\003\343@Q4\366", 64 }, + { "1\211\332\336\2713\223\3103\310\247]\376\015\275K\036\233\266\036\275\362\211\343\013\312\134b\306v\227\272", 32, "\134\253eO\347\267\226\220n\360+a\374\362a\314\202\304\221oy\275\020\367\201}:Eu\214\303\2002[\2270jFO\245\237<\241\323N\032\200>\314\330\261V\342\364\361S\243\215.H\012gTu\345\212M\026\024q\236\337", 3000, "m\324)\245\253\323\022\134HK\340v\314\270\315)~Y5y\270,T\3453\366\376\360 @\234\362\006\012\216\210\216.\360G\233.\326\363\253\006\031\277q\303&\215O\203\257\214\002\037\223\365\023\022\303\361", 64 }, + { "v\352_\013\314\201C\025V\042\015h\374\375\272=\361\320\337\302i<\264\275H\002\2622\321\3266\265", 32, "\361H\3748\322\242\2249", 4000, "\025\332a\365\371\230\207\270h\260\011d5`\307%\235\311\354\337r\012P\323\005\214\330\202aT\356\202\225(Z1'\237\246\177:I_]@\327\317\332\266E\241\233h$\312q\217\325\256\230L>\353k", 64 }, + { ")2\223N,\364T\011\236\322\2671\214\240\220\306m,Xt\322\025\241\013\276'/\027\022A}\367", 32, "Pv\327\262\275\253WCP\010\004\341,\227\242\263", 4000, "\206\345\207oIg\320\275\200\246~\243\233S\303\330a(\301\367;wh\212\016\243\335/\034\202\201yN\352\200A\261;\226\277\222\230\256\243\342\021\340#\006T7=\324=\013\231\376\255\216\025\251C\224!", 64 }, + { "A\375*|\023?\215\251\2717\204\366\2310\356\004%\206\331\326]\022-\234\372q\243\371\231\314\207W", 32, "\031\003f\276o\314\232\2038@\307#z\312\222\376\007\376\351\346[g\005i", 4000, "\252e\003QJl\010#\235*5+8\210)A\251\250\032<6\003\215\221\364k\211\233\312\225\356\026f\220\254\303H0k\201\2565Adv\236\247Dt\3735](\3508\2602\315\035V\240\247\013\266", 64 }, + { "_\026N\013=\247\000\330\377\233a0!\007H\0054\021\337\027\242\315\361\004\373\360t\216\203\240qa", 32, "<\252\210&-\264*1\312\334\235q\316\011\024-Cm2bX&\356\033\233\207\001&\277t\311\325", 4000, "\002R\002W\3036\276\213w8\007Y\362\377y~#\347\207+\216\225\2272\271Jh9\354*\016\361\2554\233\263\025\353\267\015\026K\016Y\340\340\377\304\015=iz\341-\275q\315Ed2n:~4", 64 }, + { "\217\243/\333S*\205\365\302\330HZ\235\347C\007\003m\364\015,\316\032$\036\274\225\317\010,\244\213", 32, ":\226\370{n\035?\032\006(\257\302\366\036\301\275HI\342\230\303 \230\301\230\226k_2Ur\210=O\3602\253\277s\205", 4000, "\266x72y\026W\037Yu\222\207\244(0K\340\305\233\310s\021\011\275\022\004\213|\210D\002\240S\276\207\000\207v'\206w\271\320\362\302{q\231\355ff\361\374B\022\363\272;\223\316|[\301\217", 64 }, + { "Yf\027I8L\371^\314Y\006*BK\36582A\221\252\030\322\352D_\266ux\377\035\367\023", 32, "\362d\335&o`\242r@\363\2426n}\234\004t\275\213\254\236\020\341\021\304.\042\321\361'o.\002\223[\266\224\233?%\004\337\240\340<\323\267\3039\220u\334\330\242\3239", 4000, "d\315\310\234\260\364\012\230\023\235\2756I\352\305\247_F\260\3602\350\324\2067\353\341-\232\020?\247\302\014\232\253\006S\016\241\320\251\000\022!DA\022\011P\356\372qL\277\263o\303\242\007\347\225\370\331", 64 }, + { "@>\004\006\352\316\314\230\032\255\237\021\276h\037i\032/=^<}}R\313\265\001\270n\267\274\340", 32, "3\245B\276\234\220I\261\336\323\014\353\325?6\360_O/I#\270S\362\331\270\200\360\242Mp\213\361\356;2\316\304\251\227\003\352\327\027\003\271\026\275\230\237\233'\316\003\332j\260\032\014\323\243SO\006", 4000, "_\347Q\374R\016[\274\365~\217(\266\016\364\253\306\365~W\335\223:`Q\301L>\033\344(\253\027\211\372\352.\355\251\233\005\036\225\134\220\034\357'<\031\227\223f\253\240[>\031\344\300+\025\243\365", 64 }, + { "\017\024\253{G\272\276x`\224}\324\216\324W\363\357o\266{Z\347\200\342*s;\3159\036\320]", 32, "/\203\306Y\243\30672\2236\257\335\233\352,W\351R2\004\237n\325y*\3525\371!^r\222\364A\217\311\370\301\3677A#9\212\030q\220r\042\321\031\303\036\003\235\274F\252\134\327XKI\344\370\215\266\316\013\3704\352", 4000, "\216o\275\201\220\001\2209\010\241\307\260\352\274\220\020\004\352`'\3552\372T\204{M\221\202oy\226\223lhIe%\260\325\303\314BX\347\331\316TN\311\332\177\251;W12\006X\376\307\235^\227", 64 }, + { "\375\367\261\310P\032\253\300s\271\362\034Q\000\267\231wh\274[\367N\031\272\313\333Lg\016\233\032\246", 32, "w4\376Oe\334\337(", 5000, "\265\320\254NT0=/r<\341)\226*\376\345\364\004\134\201\024m\020\375Z\216t\212l\313G-\232%\321\272\256\336W$\371\310]m\335\334\242\306\241\367\220\263}F0\216\267\364\341D^\212\251\341", 64 }, + { "\341\3615\215\010Wr\235\353\224\272`%vA\336\2122KT\237t\233\321(\213\316$\340\206\237\001", 32, "\337\362\246Z\225\307J\215c\244\007W\221/m\027", 5000, "z\033/\267\300\001z\320\334\020\034\255m\3321\364d\227\012\247\032\017\370C\031\340$\307TCn\004Y$\017\220\371\274/\350\306\303\002\012,]T\034\301\017\3459\365\252\032\321\316j\231\245\341\322%)", 64 }, + { "\355p\310\241\334\272\230LP\241\235\324\302\312\202\002bm#\375\324\314\266L\212\016\340x\0370\333\304", 32, "\031\3057\204`\205\372\200;\320i\264\027I\007\027\267*-\365K\134\243Y", 5000, "mB\302\302\253l\313x;_y\012{\273N\340\303ohA\210TQ\310\321[lK\015lWL/\252\134iB\224a\265\207+[\016\241\330\005DRam\250\335}\356wZ\006\015\256\226a\216h", 64 }, + { "\240\367\032Y\306a\312*U\314\322\335\022\016\377\213jMmr\244\042\274\257)\267\220\3307\221\033A", 32, "\027\277\033\343S\023\203\300\354nzy\226\254a\307\2146\215\033 p\256\342 \016B1\015C\027\266", 5000, "j=:\035`\342S/}\343\240\311\033N\227\377\327\270|\215\353\241\310\206\042\265\367\206\243\222\315\023a\303\274G\037\245\345\323H`\010\231\344\342\351X\001^r\353\314 &\234\024\002\242\317\021\254\340.", 64 }, + { "\250\277w^\361\217\026b\210\177\306\3461%\252=\266\234A\211\002q\264\357e\232\3257;\036-\362", 32, "\261\363r\305^\275\322\224\3328\261\352\242\275\201O\317\275{\020\263{YD\241%2;\340\352?\366t\300\272h\351W\303+", 5000, "d\364y\350\264o\356\017\320\011\2317\326\027\254\033V\326/\200\276\374\360d\321\265\015\212_x\017\246bE\003\256\337F\265\260X!N\354\031o\216\335O\3278\202\027\222\266\262\356\311]Ok5=m", 64 }, + { "\374;\134\361\232\355\314\370sC\252\275N\372\2732\335\213*\232*\310\352\0312\0047\3758\230\022\010", 32, "\332\205i\265\023\022\002\372\234S\253,W*\303^o\204\316\360\332\353\237[x\030\210\2003eBX\342u\224\363\232Q\262\220\212`$\026l\207\330\302", 5000, "d\021\307\254\221XR\257$\322]9\306}\306aqr\333\224\337M\266\245-\001\2148\203\346\002\032\031ax2\336\230\024W8p\346\310\300!\213\203\241\306|\222\206i.\272\251\026\022O\007\207\262?", 64 }, + { "\204K\335O\134`\227I\204P\241\370G\324\350\313\305\346X\221\312\313S:\371t\341\011\275\327\301W", 32, ";h\002\331bk\375\014\232b:\334\367\341\361h\261\005\266\265\316!$N/i\201\002\272\005\351\212\031<\332Y3A\243\036\303\254\255\317\317\0356\020LD\210\337aU\007\023", 5000, "\002\036\314;\347rW\266\310(9\304\223\015\220\367\334~\3175W\354\233(\372\177n\304)\270\221\352\233\256[\370\320\222\042\202!\265\201\251\262\214m\234N\352\371\314\2724\201\001\272\3643\347\265/d\205", 64 }, + { "I\304\026\242\014M\013\255)\257wq\205\273\337\252\256\2626\233faR\365\262\257\010\010\333@~\322", 32, "\377\235?i\251n\222\2608\250N\304r\353\331\313Byx\236u\212\340\322\243\376y=fv\367\244\303\232A\214\244*p\253\333\134\335\250X\223\320\325R\311\243G\2524\337\344\134I\340E=\253\300\301", 5000, "\335\011\020j[V\242\266q\257^\2139\027XpWl\367G+\224\210\371\320\002\2170\007\223\361s\271\033\374\134\301A\320\234N\357\252:\343\275\025'\012\035]\311/H\341\315\310\303\310}Q\021\375r", 64 }, + { "Dml\351(\305\351#\355\004||\231$h\227j\361\3136\210l\375T\213\315\375\234~dF.", 32, "n\353',\204G\017\242\020\255N\026Io\221\224v$\324I(\246\016\036\035\374[\343\260]\326\021\013ne\371\356\301D\350\030k+\357nGJ\270E\262\035\351R\303\010f\233\246>\326\355|:\2552\003\021\234>dr\313", 5000, "\220\243\001\307\364\032\262\304\372\017\266%r\204;\301!\374\042[+,Z\321\373\020S\014\243s\305\335r\331\350\370\216\277\267\224GT\035\301\030\261\237kge\006\017|z\220\224\274\033\215\201\301\026uJ", 64 }, + { "\270\0170\011\344\012A%\357\323\236(t.v\263l\231\00450?bA\325*?<\251j\256\230", 32, ";\354h\272\035\251\026\346", 6000, "<\220\344\337G\206\302WjF\342\302\323\276\371\3105d\240\376QF\003 VL\024\357\217%\237\331\360g\326\362\224p\322\032\204Y\254\230\227A\2048\201\023AaN\363\264h\347F\222'\232\352\356\042", 64 }, + { "+\2547\326e\016\371\243\360E\373\0228\222sO\203\374\322\204\247\240\320f\227\201\364\371\223\323\216-", 32, "\215L\237\227\342\276aw\036\025\374\246\201\030\010\352", 6000, "oT:^\276\374\027\266\300\375v`Yz\330\206\325[~/\134\364o*hW\371\213\375w&\275\006\011\361\037!j\370\317\337\301\346\234\341\354\225\321\264\305\346iz\313&\324|O\305\317\2629?\022", 64 }, + { "\354\332\023}\256\222\332\241 \362\302\351MG\3479\276\332\334\023\362\271\253\211u\275\200\334/\246\013\244", 32, "\266\243\134H\272\356\332/\011\305Q\357n\371\354\001\020\307\177\333\037\362\315\242", 6000, "\306\231\246\333A\300/\22328l\017\305+\010\037\256\341\202\313pq9'X\264(Z\246m\177\300.\352 \372\20368*\274p\305\033\2251ar\211.\2624,\326B\031\134\335o\033\310\037\2469", 64 }, + { "\327'\333\2626\365\015l\373\244\377\016\314T\205\023\255T\244\217\346\304s\275\370\134o\226\241\000\3653", 32, "\204\340\237\333\347B Zh\352@\2206\262\303\002|\312\203\327\333<\372o\200\035\276G\210S\134Z", 6000, "\334B\327\177g\003$\351\375\134F\266\375\211\212\241\366y\323\375\373_\267\215l[\203\305\370\216\202$p>\241\264\377\032\022\211I\257,:&\317f\245\242w\364*q\037.\347\276\277\275\244\205?\034\317", 64 }, + { "\234>s\026\201USYC\367\314\261\324w\355\264\037\377\236\274\021\3211\006\372\354\201\250o\20011", 32, "'&A<4\356\331\213\213y\222#=_(\361\346\226\350\3564\177\261\024\350\3528 \331\235g?\007\361rYB\003\220}", 6000, "\304\232K\203\301\022\0351\220\354\260\350\311\321\337\023\264\354\256\365\333\215\373\325\201\274\204\216\310=\252y\006I7\250Y\210\204\226N]\036h<\016@\231$\234\134\271\357\307\225\273\331\245\272\2650\357q\203", 64 }, + { "\351\000z&j\354\276\2739+7\300\022\264\327\244\275\345\003\365>\204;\276\217\307)`XP:\345", 32, "\234\365\001{\277}\042\367\222\230\030\327\264\201\016>\241\001\037\336\340z%>\324\032#\352\204\351\212eC\304\027i\205\362\215Sn\226i\215\313\374\210\354", 6000, "?A\017\245L]\214\344\373i?\212\306\252\013Lg\277\015\256\260\001\306C\375\354D\025L\134\337\263\363\025V\336\227\013\237\353>F]_\035\314D\240ES\253\357\210\344\014r\220!\222\220\010\374-\265", 64 }, + { "T\217D\316|\373{}\037\354\234\177S\327\270\016-\231\316RE2\376E\030\245't\005)<\200", 32, "2\316\204\337k\213\260o\273\020-\351q,\220\202]e+\376ci\312\367L'\331\237\035\024\025,|\323\220z\332\211B\314\226\261E:.\002\0238\376\315\320\274.&\233\036", 6000, "\312X.<\3273\237\320\2349\267Rg'\337\230\326~\223\323}\204\010\005\352\035\221\223\244\374\262D;O\2356i0\311\333\360W\203%\321m\037\3220\267\0162\254w\0161\342\320\031u\206\032\370\271", 64 }, + { "D\243\026\222\253]\312\252\020% ^w\024\024\377\312~Q\221\334t\215\377\365#\353\305\340\273\341\364", 32, "r\012Vc\246\013\020\364\221>\227\273DJc\233\2373F\235\001\307G\223\210\260\033\236\361\365J\037K$\372\245\270\370\2402x|\360\033,\002b\307#\305\026\345\2572\325\241\321Sk#\364\035\342\363", 6000, "\342\3053\272\022\221\021F\344AvW~\350\355\314\342|\303\324\315\002U\311\236\315#\2776)\3219\033.T?0\035\264\207\350d\247\247\042w\365\371\262\217\2051\001E}\201\301\034\025\177\016\314\246\312", 64 }, + { ";\370<_m\217w\363\0054hx\333\347:\247\033\337\364\363n\370\042\244\303\014\306G\322\027\323U", 32, "4\331\020,\014\345\314\367~DR7\345\013\2001P\261\273\333\257\306\373\300\033\361\257\256\271\362\302\134\342<\320\301\224\034\034g\033\206\022\005\220N\260\014\207\347\265|\206'Q\323\214\276\305\357\356O\355Gr>\237\204Z\371\354\375", 6000, "\027\304\207\017\213\207_\0117\262Yu\004\012J.\274\307xu\273\372V\004z\243P\007n\363n\222:A\311\351\031\212\2748f\352@\217\347;[@\177:\023nq\260\221n\244\014\246*\361\033\212\042", 64 }, + { "~_\236f\256=\004\026S\320\325Tz\237U\327d2#w\202)Ir\003%\220>$u4\215", 32, "\372v\342\354;>9\312", 7000, "\134\017I=\243`|\314\225\014\263\254K\014r\372l4R\015<\3138'3Pw\214\3051 J!^G\364l\334\037\314\177m\220\247\321\001\307P\317B;\316\037BC\246\310@\250\250\367V\031\223", 64 }, + { "\371\311\302+J{\330+%\236\312\021P\377\377I\235\356\2664\000[\270Q\042\022\357\235\374\307.=", 32, "r\244\035~\327Y\310\266#\364\324D\203hd\266", 7000, "\272\304O|Wj\3136{g_+\347\355j\265/\300!lR+\341\231\2032\322:\032\272\350\331J\347Q\203DQc'4\335@i\347\334}))a\004(\313\255\3220\206\000\346\014\206\206\365\012", 64 }, + { "4\203\215\242\377.\236%\324\260\315@\275i\310C\241U\350\363\3107\337\371\2607\223\036\015:tQ", 32, "y;\315-J\314\274\357\264\210\020\222\007\240\272N\015\331\370\037\334Y\267\016", 7000, "\351\334\341R\305\301\022\273C8\001\000\270i\226\343\304\016z\322d\370_Q\377\2671\215Zu\376nS\245\030Za\374\353\255\305H\024\202\024\0110\037i9\003\363\337\377\304\214\331\207\366\226W\012\307\376", 64 }, + { "l?\242\3334\336\353R\233b\216|C!\013\000\022\274^$xfn\231\237!\037\357k\351\345\374", 32, "\005\276\347\3550\023\213\226w\2313\312\351\253PuJ+\027\003!\255\322\340\006\334__\017\317!\341", 7000, "=\015\237\267?\333$u\274\201\353e\204.Zls}H\344O\020!W\036@\222\362Qp\013\212\225T\274\265\256\024\2221#v\245\254\203K\202\020\355\0118\262\001\333\346\364\332\240\347\017\3227>\245", 64 }, + { "\027\344\376D\230{\335\276\012\027xc\247h\300\221\253\2004\231N\337XVPH\350\177\202\324\336(", 32, "\014;\3008\375\017N\372G\354\331\201\031\263A\027a\351\315\256\344rE\326P\247G\375\2502\262\375\353\344NA\035\317i\212", 7000, "Y\222\200\251;I<\227Q]\356\335\317\263\351\231\042Q\322s\313n\006-P'RKDZ\330\237q\213\332\374c\266\022\352,y6\231\226\001\233\354\027\245k22\312\331^i\026\2764\244\353\306\251", 64 }, + { "\267\366\277\006\327\363\330(~,Wd\275\303A\203\315\016\230\333\327X=*\326yB\364\213v&%", 32, "\274M\257\261N\266.k\356\343p \331wdX\324>\366a\031\362\207\3732\323\302\255\013\212r\003\321:d\220\200PI\010\0029HA\011\003\326\220", 7000, "i\364Q(V\223\200\223\340\007\374\330&H\342E\032\215\2515\3556X\022\215O\365\363\264\247Vwu>\371\320\332j\305\354\267R\323\022\274\232\216\262\361\301\225\3124\004\215=\236\237\341\347\365z(/", 64 }, + { ";~ \241\225\021\325\357\016\232\310=\214\261\3451\270\316\233-\303g\361\216\033Nxz\377\361.\236", 32, "\272x^\233\036p\375\304\204\200\034\306\224\352\307g\361\310\003K\224\276\211%\202\336\346;c\207\240A\021\005\206\255\006%6\312\233G\017,3\230\310\301\202\226A% \0341\353", 7000, "\331\326\014\373X\343aJI\247Cn-?\201B\223\271R\230\015\346\204\350\350w\012Y\373\240\265\020\274\232\000\366\207s\263\360\323\0254S\226i\007\371]\354\314\015aV>\337\303\260f\030\275\214\233\372", 64 }, + { "zt\362W\316\317\032\273\343zzZ\207)ZLm\224\345=\350_\361:\033X\324`\305\306\202-", 32, "\010\306xU:i\204\2235\375\346w6Q?\036\010M\267\275\265\240\223[p\022\255\213K-iKnR\263oP\263\002\036\331\200J\363\365\314\214\036\026\343\304\316\352=a\211\274*I\340.\266\015\265", 7000, "\337\242\214[V\263\350\233\377\006\301\201\275G-\365;\260\241\030\035\355\010\242k\361,\271\344\377bB<\304\242h\357\015\225\313\203\266b\031\322\270\235\376\365\351h\212b\2250\317\2567\254\033\223PLq", 64 }, + { "\004\221\352\003\252\354\313\377UT\030\207\205\362+\004\033\015\2140\004\261Yr\001\340jA2\241\2625", 32, "\256\300\3735\301\013\223\035\221Hl\304mj\340\375\215\254\337\0332\3472\274\254g(.\323\322g\0122\177\347\377\343\353\271t\010R\024\215\331\033\0027e\237\305{U\034k\357\220S\240v ;R\266\177\344p|Tw,\230", 7000, "\335\227U\002aP\016>\270\376g\266\312\211+\305&\013\273\312\262\364\365*\002\227\256/tg\007\341\3777 \351\323\337\031\246\025\227\301!\330\221\032;tX\007\030\004\353\004oX\277j\250\257\323J\230", 64 }, + { "\347\324\310U\204\323j\341\215\317&\325zo\327\025D\024&\352'gZ+>w5\256x\3500\353", 32, "\311b;\237!Zc\350", 8000, "\032\210\262\273W\324\134P\216\315\300\312\325\270\346\032^\031\022\260\372u\313\336\234\315h\005\264\2010\373$4u/\271\311VX\226V\304\261\042B\241A\227}\265jR@O\3651\364!\012w\246\335\200", 64 }, + { "Dn\207\341\204X\030\206\355vO@\340B\275\354\000\023\311\265\225T\237m\013\364\034\247\353\217\316w", 32, "\372\366\303\033\331\272uy\262\371j\302\256\356\334\257", 8000, "\250KJ\204a\031\225\204\016\325x\310?\230\013\2070\322\302\263\231r\264\001\240VR\237\270F#\330\353!\337\330V\256\223\357\262\030\2421\205\037x\272\305L\350Z\031\245W|\360\325\305w\223\020oc", 64 }, + { "\355\015e\250>p\225X\225*\011\316{\311\244f\364g\372\300\336\351=\216-W\324\257\316\373i\376", 32, "\226l\330`I\331\035r\203A\354~\251\373^yQK\322\343.Z E", 8000, "70`<\225^\221|\350*\017|\244\004`\317\221\134\376\352}%\245\324\360\216IY\042\311l|\201\350\230\210{\346\034\271\264R,&#\001\337\261[I\357kBl\336\335\213T\352;\015\024\301\033", 64 }, + { "\317|uV\275\303X\214t\250w\274\335\0028z\376\025\223^2\326F\250i\006\024\006Jm\303\017", 32, "\012\375\360\206\245\022J<\212H\177\267\247\370gr\326\322\251\011\324\331\010B^_IC\317JP\327", 8000, "`n\314\361\221\2161\263%w}y\006-\323\010S\354\240\332\026l)\325\266\023\013\036.\273\000u\247'\273Y\316j,ap\345\206*\264\324inn\022\203tj\260pb\023\210c\306R\234-\320", 64 }, + { "\231\230\221\276\330\2648\017\330v\311\346E\364\272<\037\243'\355\356\252*\210f\006\036\206Z\346[I", 32, "/Ws\213\262\202\020\005n\351i\334\233\303\375~\374\341\251]\227\247aeU\246H\263\031\035\015[\250\316\205\031{\222\016\205", 8000, "T(\016UCC$\370\236\251|\013s\237\023\325G\014\327\376Q\013\306\244*\233E;\014\264sZ\2449\242!m\200\243\264\342M\257\0350\370\357\224\373\262\201K\023\204\334\320\340\016y\272P\311A\217", 64 }, + { "\372\310Z\030\0367\234\257\361J\306F\267\310\216\2069+\013\224\275T/S\257\3554e\177P\243\134", 32, "p\237\036hc\362\305I\350\222\316\022\310v\240\240rE\200\277\241\212\245\330\260\035y_i\374\332\240\304\031w-QX\357\022Q\025\343n\371\273D\201", 8000, "c&\346\353\305F\004P\307\212\3268\356\255\252\225vy\214\213%\340Zz\242\252\301\263R\344qUhOG\334\363\177\203\030\014m\241\306\313\366m<\322\241\254{\334A\007\371\035\0210\211\320\357\042\014", 64 }, + { "\274\023\233g\226\220\266b~\011M\215\240\304:\345\216)\2338O\031\205c2nj\364\332\245\252\275", 32, "\023x\251\256\246*\363\004nr\336\240\357\031\011\315J\210\243:\023f\263\202H\333u0s\323\345\2516i\212\012>d\344\004\231:\217\371%P3\004\333\225M\037\321\036'z", 8000, "\305\373\334\202\333DvE\007\302L\246\273O1\312\006\327\203m 1\227\322\262\275\262$}\343n\377\275\325\034\323c\242\337e\352\247\217\264\200\276l\203\207*MG\245wI`4\261\200\025w\277\374\273", 64 }, + { "\310M\231/BX\015\3022,D\221\343\336{AB\373\305\232\223~\332\001$p%\236\311?\307\255", 32, "\346\237C\3322L\307\240\003+\342@\244\356\210\3652@\231uyajh\3672)\3133k\015\247\011\221\360\256$}G\232\326\344sB9\266\326a\273\276\273t\134\330Q)\2555O\212\204\207K\251", 8000, "Fg\027\253\252e\334-\306!7\300\374\277\235\274\261\350\005D\327\262\302\037\025\016\306|p3+\031\230\216\224\362\370&34\314\240LA\326\010\307b\371\177Pw\310\2605\210\275\305q$YPw\024", 64 }, + { "\243%\302\344P\210:6\271\3316\330|\234\377\325x\317\255\356u\266\204_\264\232\306\221H\235\323\233", 32, "\203\355\374\337L8\346\314\340\310\310)iB\261\313\303`\254\263\356\011\360LVf[\240\372\033\263\031 \237\361\263\264\007\257\323\224\205\207\366)\344\220\270H\216\005K\310\200\256~\341w\352\365m\305\316\231\315!\354\232\270\030\327\027", 8000, "/p\266KV\336\250\270\214\3752\255>\253\011\261\353Lu\022y\313+\300v\201\005^\333\310\370\016\375x\023N\340v&\222\042\353W'\277\014\226ss\240\314T/\020\347\2303\225i\337\255\217\275\310", 64 }, + { "\020\352\211\2704\337\355MK\251\237\315\207w=\345M\253j\013Q\312A\323v\256\212\273\346\314\206Z", 32, "\356\327\312\324\304XV\042", 9000, "<\252\305rA1WHK\030\310K\220\312\214/\225\222#\211\020y5J.\373.\375\250\246\344=U\326_\322\205\303\357\316\212*2\252\1347yP)/y\330\030q(;\275\222\316B\345N/'", 64 }, + { "\246\200\343|\000\363\320\004c1/\252 \230\027f\221\010\300L8<\315\333\014\000~\013=\224m`", 32, "\344h\347\244\325\331\22483=Nft\360\302\261", 9000, "\330Y+Q\337\302\005\230&\257\271\201\020\266\346rXi\310\342\234l\365\374}\242\365&\377\214Fn\240\315\272\026\322\326\2318\332\325\001\362\007G\316\346T\001\225\273\377\042\345?\377\330\302\361:\354Q\270", 64 }, + { "\300^\277,{\327^\347;\023\366\331\344\214@\224\226/\231\304z\212\024\264\343\305u\353Y\301\305\031", 32, "e0H}\001o\0238|<\317\200\275\255I\300\2211SZ\350\024\010x", 9000, "\346\352\302\366Gt<\261;\010((\022\360\232w\323\024~\3107\323\001\003\331X\006\245\235\364V\302\000\233~9\370\225\340\312\2120\011\362\274W\036\272\270\3168\311d\366\361\270\254E\363Zg\001\326\227", 64 }, + { "\302\3170F\365\303\367\304\340\000\332\3223F|\363\231o\336\315\010\334\000\327\225,\300\205\214\301\272)", 32, "\017\015*/]\217\334\262S\312\317\235r\371m\225\273\013\215N\360\016\324\003 \257\222\315\371\014\326t", 9000, "Q\213LROW\365\360C\375\251\233\235\237\273f\370\333&Qv\035\231bj|\2621\134\365\213\254\264\221\377N\321\305\036\272\236I\331K\375 \276\212\177R(T\370\030\376\322\201!a\230\014g2\330", 64 }, + { "VW\226?\011\206\237\332\316^\201\211F\363\242#\2414\260\034f\253F\020\015\356\022\026\030wy\207", 32, "\134X>oO\341\2221p\023\236\217\357\355\213qc\222\237$q\311\271\224\317\005\354\243\010'\365\246Q\371)N_\226\353m", 9000, "\310Z1\202\257\017\276\0118bF\322\213U\222~\243\033\323[\324\371\365(\344R\363\347\313\342\255\033\320\316\374]\207\371\004\353e\311+\316`%p\236\327\326o\017\235yu\234=+\216\303\3420\246\333", 64 }, + { "\265\321\227\226\355\037\225\225f\000`\331\364x_h\261\236\302F\356\277\305\203\337n\324\242XlX\276", 32, "\353\325\230[\314*\371$\233U\335d\302\356+M+\217K\255:\305i\217\315U5dmm1r\034`^\033\200\311\366\323\244\254\134\354*.C\261", 9000, "\203\205\206;\334K\261)~\005a\365\232$.\246\250\333\351\036\237\227T\326\007\266\277\337\267\012i\252\277f/\367", 64 }, + { "g\342u\261\360\205W\253\3757\224>\2007\261$\321\326[A\030Nl>\300\255\270\310j\230\000\317", 32, "\205R\344\134\355S;_$R9\207\216\351\035\355\344\246\230\347\305\225y\365'\264\273\273\002\3004\3074\321%j\237\246\352\345Y(\224\334\371\274\012WL\232$z\246\331m\020", 9000, "\042\307\336\011n\273.\027\006Z\200\335\244N)\210\325\177M\000\270U\2167\007\331\217\002u\262\030\257\223\325]\371WI\207\226\211\331s\007.\224P\3330\023E\273\3256\324\2250|h\332\134\306M}", 64 }, + { "\205\222\255d0\015\236\365\024\002w\355:\025Q\206(\000\014\315*`6\343\233\217\377\036\227\231\001\310", 32, "\031\345\002\252\206*\014\226\235[\012\333\340K\207$\010\010\332s8*\346|\245\323h}^\202`\233\200\2460\304H9\031H\2321x\013\033\363\322=B\223\224\321\2335\204\262#%\245#N\236\205\360", 9000, "\376\304\247X\265W\252\204.\025\177:\360\227\0259$\005h\205\364\030o\324p\023\206\006\325\302B:\311\252\240\015\253\000\370\313\007\002\276:\037/\001\240-T\241\221\007\247`Z\012|M\027\316\2303\004", 64 }, + { "\262\332x\2240\1348{\351ow\377\220.\005\010\351\313\365w\310\006\042\312O\234\256\254I\225P\236", 32, "\003\262\327\213\033E\352\255k\031x_V1\330\217\232\333TCjCG\257\222\207\302aA_&\303\022\242T2V\301l\230U=\204\255\013?9\212W\217R\254\246\264J\310\243\340\215\276\324\264\211\371H~d\334V\0048\210", 9000, "\2428\360\032\336\004$\015\303\304\203\271/\302\252\361\204\366\314\201\231\324\323\340\031E\355\205\372\201?JX\264\256\177\242L\362\001oc\310\134{pO\232\234\200x03\270\364@\346\134\214\330\202\010\254\350", 64 }, + { "`\210\003\226\023\271\363\251\376u\032@4R\227A\233\177\204+\331D\302jJ\035I~\033Va\334\306\134\337\3708\3159\374", 40, "g:\354\200:\353\237\314", 100, "\247\204y~\264\003\374\263YbJ1\265\256\370b\020\377?\034\240{\014\275Z\011\347\213\206\356\037Q\010^\306\207Q9\021\374q\270\242DI\034-\232o=\212\202\134\037+\305pB\2152CI\275[", 64 }, + { "\330\3067\035\364 \2267\266\226]\315\242\015X{\270Vn9\260\277\277\375a\014\251k2P\003f{Z\037[t|o=", 40, "\375\276EL5\306\235A\371\032\272\364\014\340\014\374", 100, "8\255\030MN[\002\3162\250\340\323\262\011O\0374\012V'\303a\010\026\372\337\022p\002\321*\032\255\205\217\377`\264\015\255\217\005\300`\352\261\313\370`\217en.\252\205V_\331b\261\302g\333\273", 64 }, + { "\247\3113>'\341Z\226\015E\235\221\200}d\217\021\263\134r\205NX\241\366\014\257\243\261y\212r\263D\272\243\021\207\235\216", 40, "(\213\353B\221\216\0302\003R}\310}\331\006\343\001\333\326\236\017x3\005", 100, "\261\201\255\301\037\027-\004\242}\361\027\264\250\210r\231\274=d\010\371\2662\357\017\233d\224\230\0300\356\273\264\245\212A*%\333 \326(c#\273X\026\312\226\317\031X\257,\353\213\307\254\304\337C\326", 64 }, + { "\024B\327M\362\134\210]Iu3\223\322\277\361\3646\276H\263\030\2348XC\271\206d5\242\231\263*\334w\317\015\376\002\014", 40, "\321\357!\351~\005{\304\267\313\205\027\005\307\232a\367\212r\302\306\032\231\26567\246\356\227!R2", 100, "`\236%\333\327{\331~X\022m\274\337\203\257\326\012\247\021\326\270l\3271W\244A:T\261\250\252n\230\327\231\305v\024\245\371\377\346\007\305\204\360\215\252\267G\007\005_E\0221\223\340\3714\243\220\303", 64 }, + { "\002\325\230\270\245\022\320|\042<\274\236\243{IF\255\2123~1\324NX\343\212\002\230+,\321\253\320\334\246\273\264\265\215\350", 40, "M\361.*\033\362\022\226*k\333\225B\320\377\266\011\307\034w4s\274\316\217\034\221W\373\003\256\244\210e\260\242)\206\254\223", 100, "\371d\211g\2024\010\257M\023f\177\247\376\000e\036\353\372\375%l4\272\370\026\343\330\240\022L\214y\025\235\360\0213\014\375B\326\331\300G\336\212}\342*,\254~\001B\204\370\200d\254 \303E\367", 64 }, + { "\243\035i\361t\264\370\31688\017\261Ph\267\224\271\357Y4\035gZ\2631\021\253\236\364\311\031E\364K\240\313xi\253o", 40, "\313h\035\345a9\260^n\335\014\337v'\371\330D\215`\332|1\357\023\253\215\213X,\215h\306X\244C\232\236h\256\372\247\020N\275\020d\360\005", 100, "{\320\345i\277g\336.\253(|\256\347\302\022\260\330\315\247j3\217\257\236\260\302\024\204\000,+}I\202Ow\321\205\013\315\324\001\332\331\003\367E%C\205\354\345\366E\314\351\032\340\314\2568\233=#", 64 }, + { "R.\220Q\306\005\331\013_\274\263\364\305\363\253ut\215T\042\354}\011\014\256\254J\245c\353f/R3s\342$<\205\366", 40, "\042L;\375\240\241\376\322\232GY\375\004PV\261\331}\305#d=\210T\261\233\246\322\377\365\350\365\304\202\256\264\003WX\021=\273\247;\007\215\377Y\360\212\004\324\2525\260\223", 100, "]\370(3IL\232v\357\336\347\350j\3428=\337\205g\331\211=w\023\373\311q\321fM\372\134\037o\312\270\207E\232$\246\224\0069q\245;_U\256\207\246\224~\265lfX\217+\241\177\012\000", 64 }, + { "\005F\364\361\037\250}\236\013\315z\330\022B\011U\222\372\236Z\033ZH|G\313j\247\263\363\222\350\362\243~;8\203\276Y", 40, "'\006e\223)\331-D/\272>1\236\236\202\360\034\015\253\305\312\036\202;\306\254\036\313)\235\011\217\270y\235 9'\355cs5\311\300I\042\235ls}\202\364\002\303S\223L\3528\262\305\001\203\011", 100, "NY\261\274\311\225i^\034\326=\353\301\204\312\357y\263r\031\234\240O<%\253\221\022\321\264\015rH\311\327\302\201yi\304\360\3748z\036\022\205\236W\026\023\006\256B\227mJ\234\231\263\253\3368\202", 64 }, + { "\006\336\254*o{\322\024\361\337\007S\353\357\243\370\244\033\261\024`\3159\311\001\027:\342h\275)R#_S\030\217V\336\024", 40, "\001/Wmb8\260\026\246\270#\346W\360\277/\347\177\233\322t%|\226\334\261~\001tJE\326+\204X\304\324&\036\134\252\004\362\020Y\347V\245\015\023\332EQ\345U\002F\321\202T\012\356\313\235f\206h\356]+\314\324", 100, "I\177\227\177z\320\023\255\352\036\233\272\216\032\231\236\236\220\034\304\263\006x\212\004\340~\371a\034\375R\254T\321\237,\351>\367Be\335\020d\343\363\216\271\011!\344\345\271\325u\006Jdv\004\350\277\301g\007\211_\336", 64 }, + { "\011d*\215\352[\313\3051?\362\360c\277?7\1771\306\221\271\022\275\205Y1E\240M\214T\225R\363\010\3130!*y", 40, "\310l3\2262\346\215Z\223\005\236\302\241\025~\276'\334r<\030Ou\273", 200, "\022\251\266\330\274\244\022\001\042g?\014Q\334^\032\320\203\004\023\231VI\236\351\032\234\200\220\272}/\255\356\322C\342\315\340mR/\024\003WvC\362}0\204\274x\315u\216\014\203\337\353\0350\216\241", 64 }, + { "N{\366HE\323\251BA2\337\035lQ9y\377\206_\354\217\210\210\237\301\277Tm\234\001\033\237\200\261:\314$\007Ro", 40, "\226L\252\227\244 P\217\303\022\353\351\357u|\367X\206\134h\354]\006\257\247b\277ug\266\371\305", 200, "\331\343\322@\363\303\324CF\204on\225pD1\260\342\250h\337\376<\376oqrOrC\260,\014\330\234@ \363\236v\206\201;\335\020+\253#\232x\267-\035\035P\010G\277\322\200d\241d\337", 64 }, + { "RjMU\235u\300\005\020s\3026\244C \010T\277\204\025}6\221\260t\030\347\262y\246\004\004\022nP\003E\224B\275", 40, "\361|Oc\337\006\334\314}y\037}5'L\363\3776(W\331\015+\005y\211\036X\006\33121\012Y\017\011c\016\353\025", 200, "\037^\036", 300, "^b\177X\310\203*\016\340f\343R\233\025\025\222\017l|R\203\227F\217\311@\261\207\325\013\273\042\375\260\256b\333\036\221\220\026\377\223X\336\243\217\235h\006\3110\231R\314\247\3401q\365>dA\010", 64 }, + { "\350$\307\023\016\225\330\3677\315F]9\3447F\306\036?w\000w\266\266\214\244|w\354\204*9~\331y\262x4\237E", 40, "\023*\200k:\322 \321O\214W\374R\223>\232G\202\230\223u\231.\266", 300, "z\223\217\302\200\321_U\300\304W\241/a~\367X\24385\244\207\224M/\255,\232\252\366C\377>5\312\210\273k\001\377\353>g\204\032>\017\303\207#1\021\373\257\031(M*\014 h\334P\370", 64 }, + { "\341\320\235C\357(E\316\332\224\353$\002\330\352{m\215\310l%\255\247\035>fQN\270\217\001\211\355\265@\2036W\263\210", 40, "\232\001\020\307\220Q\244C\312\213%\0206bK~y\272Bh\302\323D8OE\205\323\356\003\235\300", 300, "\227\366^\335\033\330\023e+w\242!B*~t\226\326\322\201\020\251\025O\336 \302\354\355b=\3732,\304\311\025\005y\032\376\005y\347I\031\260\336\360puq/\340\235\325(\337\023\344y\225Hs", 64 }, + { "E,\342\3250\250\275N5\307?b\016f\215\200E7\3260\2062z\026X\243R\245A\210R\014\262\240r\305Z\303\211\042", 40, "\213n0gD'Y$\2742\031\330\027\247\253\343Y\345\263Y\335\354\270\0275\205`\015\227\002\3527\336\367\354\337\024\204v0", 300, "\305\042\312\304t\351\241\223H<~\212\257N\201\022\363\032~\231\241\373\300L\344\333\302F\272\233\306\037\231\260\236\243\326\035\370lOM[v6N\214\042\362D\224\001\372\316Z\372\220t\177\301>\020}2", 64 }, + { "&\3372)\301\232E\222\030&{\236\272\013\210\011\034%1\352s\310\341^\310\251\352\177\257l*\3071}\343\011\317\377\012\221", 40, "\332%\357\310,%\202/Ei\2600\0219\256\305\225}\344F\273*\231\272\317\004@G\334\242\311\270F\0232\240\264\003\234JL\304P\2627\271\234U", 300, "\017\356\256\272\201\031Kf\300\365Z\246\362Z\2765b\346\272c\011\222\241\033\337L\356\323h\034%\001\270\020\016u5\251\030\013u\343%\361%c\005d\242\340p\224L\255\261\370\025\216=9S\225\027X", 64 }, + { "\023\225\225\225a\205\3544\023J\002\345\037\024\217$\252P\240\347\025-\206\0266wn\353*Jx\327\323\213qo\322~JV", 40, "<\225(\247f\351\21182x\003\036Z\333I\376\347\211\037\340{\241\0017jPQ\037\206N(\365\354$$\001X\253\3713\253?\263.W?]\260\327')\347\200\240%\354", 300, "\362wD\306Q!\204\002\0347J\363\256\214\210\3030\266\007\3170\323\346\375\301n+\300\010\025\345\010\0316\363\344%*\377\360\260#\212Ut\324\347\334;\011\356(&A\207\0332\013\320\3060\367\271\333", 64 }, + { "\267\244\274\263\273\230jf&\202Y\220\226\354\216\363\010\031\206\326p\363ux\3536%.~<\213\324;vCi\0217\004\311", 40, "\230\250\225\200\265%,\326\017\035?\274\237{D\272\224\303\3037ea\205:\042\022B1\272\017\275G\263\317\344 \306\204\233\244\273\254\235m/1\317\223\344Uf \273\372.\305\306?\005\011[\217\302p", 300, "\360\214I\303\037J\034r\211\204\333\023u\217\274\134\373G\024\327Z\016\331\022\210aOM\014\212\226\240\257N\215nH\266\343\006e?X\244\370&-\313|\252%\353\351{\345\340\004\345\271\004Q\314^0", 64 }, + { "G.\325\033\317\202j\005\253z1\227\033\207\2061<0\003\311+\3337L9\264\004h&\027@:\030H\331\313/N\270/", 40, "\006\032\324w1\247)\271\337H\335\312\316\2467\214\042\207\245\373\361\250J\207\354c\253f\371\001\276o\343\300h\010A\300\366\331\301NI\255\322\270\350lf\246\020\257\263m\231\311H\3175{>\257\223\313\262Y\245\254hghv", 300, "d8\023\233e\020}\215\007\036\002\367H\003\367\336\010\260\364\255 \360\200\223\265\252\203y\315\322\013\252\376E-gi\000IY\325\367\353)\322\311g\023\301\245\245\134\223n\211\324\245\301coXc.\320", 64 }, + { "\302\347\272e\366\307\3749\015< ^\330\275\344*\370\033\274_\361\227=-\350d\340[V\025#\225\255\017\252g\325;H9", 40, "\272w\001\242\254\207\370\351", 400, "\304>v\275T\012F\025\366\200\362K'\263v\211\232\267oM$\337\134R~&\262\205IM\300\372\3549\014\177\267H{!\241$\234S=t\355T\247O|?\310\247U\263\326y\000\221\214\2404\266", 64 }, + { "8\217\216\363!u\361\212Kw?\134\251\346\316\012\000\0055\042g\230\010T\374\365y\312\213\333\307z\022\363\313\330d\354\226\325", 40, "\331\326\007\325[\226\374\225\250\021\225\214\012c\240\310", 400, "\016e\302\330?9\223s=\3620\302X\221\336==v\365\351iF\340\227\223;?b\005;\010\201)\327\262\006\247\0077\345\224\250=\026\341tP\303-+M\025\014[\367\007\022w\013k\374\032\234&", 64 }, + { "\027\271\230\271\345\254vz%`\006\201P\331\3222-\323\374\222[S!\003\011\323\231\262+\325\224\250=|\277 \201\254\201_", 40, "\010\214t\242\242\352\314\021\304\320\367\322I\3120\314Ry:\334u\354\272\370", 400, "\334\230\272\330r `\333\030E^\250m\023}\302\022\025th\024\364UC7b\001\301\023d\272\265\207.\037\377\371\011\362\344\270o\2101Bk@\340\332\351\253\257yp\361\377\331v\016\3105\020\363\317", 64 }, + { "B>\351\352\241\021\035\330U73\250J\266\243\374+\340\306\337\263\316\377{U\331\250\304\033jy\0032\216\021\211\345N)d", 40, "\250,\252\367X\257\022\264\331\373\042\223\226Z\021PQ`d\021\371\201\227w\374r\2028\033\3662\377", 400, "\315j\243\042p\000\266\016]BH\350\270\356\257\236\013\214'\347\347\001\010\341v\357\271\355avY\354\250\367\032\260:dRv\377\134?Abn\262\026\020\010\371\255#\227F\035\326,lx\251+D\372E.\263A", 40, "\350\3618b\270\207+:1\033\366\322`\321,\240\244/TDD\315\362\335\354\231\327\333hI\365~\270\271\244\374EU\237\270", 400, "jY\035\262\337\213\327\204\367\352u\230\024\020\021/\027\261\021\037D\2740\354\276G\035\222~\037\3065\201\002\350\042\371\276ye\020\253^B0\234\237v\363\252\267\221\305\373\336\016\034\351\236\243\215\375\236\305", 64 }, + { "\270\322\236\314\345\206Gv@\370=\210\267\316\245\215!F\264\211I7\032\231\225\360?\020\375\256\371\0020V\204&\134\273yk", 40, "\265\257\037\360V\302\357\200\373\024R1X\211!\362\327\027\275\134>X\371\334W9jt=1\331r\241\0138\265\344{hWe^?rZ\301\305\375", 400, "o\212\230=\031.r\255\037}3Q\3413\237%\320\323\362\260/\014\377w\312\370!\236\335\371\010\377\240hR\252\254\016\000\030\332\004\243\305G\371\024<\025r\243X\312\371\320p%n\340K\317\346\2710", 64 }, + { "v\203'\352\031\202O\037i\246\205\355\211^AW\331\251g\257\356vw5\003v\247\304\225\310\232\206\373kqS\360'\252\255", 40, "\252\275\277Tw\316\320$\304s>\372\236\264\330\354\341\314\275\315\034E\240f\001\330=ZK\001\026b\317\333\007\224\230\272\020\366\314\332\027\265\221\033\244\034fA\323\214\032\227\010\225", 400, "\327\262\021>\322}w \177&\302\357\351\356\350\345\217\300\004\24057\0254*\367\365a\200\263\353\000\134h!\226O\243\202\231I+\003\006\244JK\210\005\336\363\032\352\242\206\330\266JQL\013\356\356\307", 64 }, + { "@\257T\377\244\313W+}\242\241gP_\252\2466u\016U\335\230\344\210S\323\030\01608\237\351`\320\332a\3702t\327", 40, "lB;^\004{\301\301\2000\367\227\226\026\222cQl\322\225\374\221\351\277\134\301\023,\002_c[V\333\010z\271\200tQP\237;\277\213\265C6\3474\361=cs\267\200\247\012h\253\233\017k\025", 400, "b\016\304n\314l\007\256\316\042\300\033\006\033\356\305@\237H\356s\026u\276\013Z\016%g\340\344a\0330W\004\244 \241K\216\255V\345\360;\026+u\340\374\006$\201\371\004X\274\332\360D\233s\011", 64 }, + { "h\026\013#^#\3608\361\241y\335\311\364\257\251\0033\202s.0\032I\254\256\250\305[L\332x\032\035M\275\373#41", 40, "n\272\237\200{L\204\300\313\253c\332\220c\225\325\024\243\266$$\364s\344\271\327\270i\245\375\002yu\245`\250\042!\341\200\025\017\203w\253\002{9i~Y\337\316\215G\222\273\031\200\005\221)\370\004e\200\313\2531\335*)", 400, "]J\212\037\332v\225s\225A\361\336b\015`X\010\301\352C\225\020\333\215\226\354\264\205/\034\033\345Q\316\310\311\335\025@\323\376L\373\365N\014\207\333\377\373\030c?\263o \270y1\327'\011\275\300", 64 }, + { "\037$\023\200l\203\315\362\001r:\251Y\265N\006\033\223\177\266\276}\235\042.{\340@(\361\042u\250\364\374/\017\225\203?", 40, "o'P\035\276\332b\015", 500, "\027+\241\256=XP\216\265\203C\372\367\026_g\042W\277\042\017Q\200\260\363\021\031\370\017\354\214H#\247\233\012\244*\277\325fi\261\344\005\026\206\262v->\344\340\332\367C6RpF\273Y(c", 64 }, + { "i\356+\334\331\004\246\024\364t\321l&\254\240['=B^\351Y\222e\332\267\227++\320,\351\315$\025H4\036\307\305", 40, "\232%\344]\343?\304T\007\016\323\211\341\264\350\003", 500, "\376%\230\250'\221\371L\315\021\017^\256\034\273;\335\337\360p\305k\331\256\370\021\371\230kZk\234\353\026\227\340\313{\203\206r\032\034\034\374J\025\352\015\335 \373V\365\347\024\005\276*\363\021\331\3446", 64 }, + { "B\276J\227\335\347dq0\204\341\373\352\264v$\311g\306b\314,\252a\030^,\333\202\327\353(\245l\240\313\267B\243s", 40, "]r\312\3217\237OJfZR\274\021\261Q (\244\241\013bm\306\001", 500, "\020\307H\233\2222\307\276\233\134\220Sc\226&\230\273\353\315\265\004*\253\030\222\031\016\203\022`\242\360/}\301z\226\270\231L\203\346\034sh\201\216\030\201 \223j\341Y\337\350\366\256\347\301X\372V?", 64 }, + { "\367\373\350:\033`v#:q\264G\032\235Y\3419(\211bK\002\012\317\237\217\261\277|\367'F\225\346\322M\262oO\032", 40, "\017q*\266,_U\373\216\351\001\035\3237u\354\251^r\022'X\237\206\230]\331{@%\301\311", 500, "\211\366\134\340\227K~6!L>7(#\032\2176\230\000J\344\321\013\371A6\206#^\350/N\021\341\365V\211\230;\266v\013\327\000\221X\360\025ag]\344\011\002\322\357\363\254\270\324j\333e\232", 64 }, + { "`r\253B\0145\341=\303\240Yp%\023\256\003\232\354\212!F\246Q\232\207\224\337\347Z\216\261\235\244c\332\242w\206-\337", 40, "Z\216\370\311}==\002\367]w65\340\302\340\221\002\032@\302\210AP\273\215\335\322Q>\011I[\004\231\241\310\246\022\322", 500, "H:DD\322bY\205\003\134,\367\345\265\352\021\331\375\007\261\2251\334{g\336\022bso\015\203\277\312\264)\005\2372(\335RK\225^qM]\2626j\266\324\006\023n\371\321\340\260\354/\357\225", 64 }, + { "\036;{cq\252\200V\205y\367HY\042\373\323<\235\252F4\31601v\341\235\005%\204x&\177\316.\222\032\214\357>", 40, "\023\321:\305B\361\352\322\345J\042\202\333Q\214c\007-\026MN\352\252\231t\205\012Y\365\340=\212\374\245\275\021\177?g)\006c\0104%6A/", 500, "\250\303\354\237a\347#'\230\270\035^\357\275\231\254\000\001z\315{\312@u\365s\310x\326z=\007S\213\336\026`}/\324\220\275\217\232\323\321\273Z@\027\317|\223\011e,2\023P\021^\325\000b", 64 }, + { "*z\225F\206\0151/t\213\026\2309~\313\313\374\205\235*\342\026\003\267\347\223\333\034:N\2051\001O\3031\207\375H\265", 40, "/?\0267\245\223\272\370\225Ad\214,H\332\265\376'\377NE\035bP\342\311\030\202\031\311\014\340\276\266 bW]\373\255+W\316\020\211,\277S\035c\020%\365g\350\271", 500, "\031Q\035\3656\223\042s\342\21538\340\235\226v\014\357\260\013\363\201g\241\271\226\213\220\316Zj\000\306\000\220\021V\027\250\230\302\265'\255\235\334N\230\355\251\326&\207\307;4\2550p\377d\315\342\222", 64 }, + { "\247g\321K\211\224K\024H-}\217\260\373\332\325;L/e.\307e-,\013\263n\255\271\312\213\231\241\266\264\264\010\220\177", 40, "\026\227\357\264\367\222d\234F\311\363\371\316:,\366\007\007\240b\272\361\244\215\007U$PW\007\321jGm\033]M)@\326\234\341K~G\005$\024MU\266f\333\247\374\002_\34273\020\301\036D", 500, "\2177\022\2258\227\032v\042f\134\2542D\314\315\271\320\315\026M<\2708r|@c!\351E%\035@v~j\245m\276a\367\364\311\237\016\370Zy\352k\230\322\315\355a\3212\367\252'8\027\010", 64 }, + { "1\010\366:\322\246\037\312\007Jc|d\302)\233\366\134\224\351\272\237\3669\305\247T}\245*\3402m\241\214\035\365\341\274U", 40, "\260\042\205\205\337\006\014\3020%\243\020\221J\361\352\337\003\317\352-\006\303\032\353\333\030:y)aP\003\206\376K\313>\332,\340\202\245\331\333\034Hd\342q\315m\002\256M@4\340:99o6\013\3201\253\355\347R;\022", 500, "f_\215\220\321\254\317rr\306_[\007H\267\334\332\271P\270\220\360mbZ?\012\220\322\357\351e\330E\250N\251\256/?z\261J\276\013\226%\224.4\327\367\310.\320\324bk#x\250P\205`", 64 }, + { "\205\310\260\004\314\016\205\266\337>I\276\336XNQ\371\2057\001oj0|\033\022u\255\233\250\307R#\220_u\021\350\222\317", 40, "\321\234C\254C=\026\005", 600, "\230m\022Q\007v\331W\031'/0\0336\235\241\254g\231v\367\244\013[8\007\016\351\200\371\305b\203\231r\241\324\363/\246\256\222\234\001\223\325\231\267\245\005Pav\241\257\323\265\254\355\134\250\224\033\245", 64 }, + { "\032G5\256\134!\321-\371\005\331b3\321\321\351'%v\361\316\2378\213\356\032{o\042\220\355\006z\277\351\332\342\304\3146", 40, "\200h\016\361\347\034\302\327\3315\371\344:\203\331W", 600, "X\275\364\247\307\262\230\202f\255^X\225\330\225\254\223\203iL\037Gq\001M\304{&\330\342\354\002\322\252\001\301=\231\313[)\236v\012CT\2719\340S~\371\001=\312\234H\323\217\343\020\022m\237", 64 }, + { "18\333\277\367\221\366w\230\253K\012\351\2526\234^\270/\247JD\204,\034\361!Y\266\336\274\354\322\226R6\030\207\305\304", 40, "g\241\307h\373\326X\200\134\002s\362C\011\230-\012\277-\011\377\001\274`", 600, "\236\207\032|\264\025\321-\203\236Ug\306\360\366\262L\022\333\370s\207O]\344+\326\334U\266\340\310>=\360re\227\017Nz\026\216\331\204n$\007\365\323\257>\334;M\213\024\320\252_E\010$\042", 64 }, + { "|\017\325Z\222\240\336\245\247\207\000\326`\221e\2770\360\226\232$\274\375(B\024\264\336t`SwhX\354|D\327Z\236", 40, "\356^\021\042^\200\272j:Z\377\216\247KVH\334\241\263\307\220\223Gi\337r\001Q\246\261 \207", 600, "\323\247\260\306\013&\234n\235\213;{\234\276\241\016\270\012\006\340:6\337g+\234\0264cV\367\307\361\341Iqu\210\307\370\0056\002\343Oy\264w\230X\3239H\024\207\027\377\315\204\333\340\302\220\250", 64 }, + { "}\017\344\277/u\246\350\315\226\323\033\277\356o\024h\004\234\343\036\005\014s\265\375\023\001\363\206d\265a\266\374\036\344\200*\364", 40, ":\361\031\206\006\321\276\321\206^*\330\027\257:\204i\311\012\233\3404\236\0040Zk\326\007\013\015\310\022\367i\313)m\341\026", 600, "\236\317\231\200E\323\025aM\347\231R\345\020\324\364\254\367{\024F~]c\204\350G\364\364\204\355k'4k\343\221\034W}TL\311B\027T\246\353\311\333|\340\2266\231\017\323\307\254\337A\007\373\333", 64 }, + { "\247KD\327\323`\024v \344}H4C;\307#J*\323\314\021\362/\214\254ED\201\042:\341\204\313\231U;\351\362\336\362\024\223^\341L\0328\350\235\247\342\371\254'\257J\357\323\2046\362\363\247\260 V\025w\244\253\246\177&n\275\212.V", 700, "\310\245K\3722\340P\316g\224`\021\2139\225\207\324\277\251{;\036\376\001c\235\342[E\314\007\324\217J\316\331y\216\216\305O\210\374\277\3710\227\276/\033i\205\316\247/\215\256\330\037\271\273\251\310 ", 64 }, + { "\250\003\231s\236\374(\2562\314\007\365\037&\2730O\376=k\236#mm\035J\315\333\335\022\377\236\2177\304\266\177\037\352\201", 40, "\207\207\017\306y\205G\030\023\012\312-\215g\345\252\016\244Z\215\200b\021\201D\253\306\001|\024\227\363V\313~`\207o\003\263\207^\246\345\025\262\252\036~\262\304\350kvD\365|\377\301\346(\252}D", 700, "\002\345y\325*\313\214\003-7\371d\134\220\017\215j\246\304iH\271Sx)q\275n\016\361L\253\213\362\206\367\022\017\375\272Q\245\220\353.\264\011?\257\311\233\013\3441\005\370]Z\235@\200\010\231h", 64 }, + { "\266\361)\254\304\357\342\2513\207\262ND\246\022\210\234\262\013m\331tD\036\216\256W\221\337tW\201\245\254\035.\252j\037\246", 40, "\317\036!DOSD\017\215RzN\235\344\266R\320\275,R\030\356\3542\241\217\346\310\002\020\264\260\235A\022\016\037\247\027zb\236\023\323{\301\205\323B\342B[-2\312\363 \217~\216\332\347\317\355vnZ:T6/M", 700, "\254\355\201.s;\233PQ\344\304\255\230\272\016s\332\341\035\014\023C\254\352\2167\010R\037\253\025\325PV\305k\336\364\316\347\370\375\317\247\274\3319\015\375*\265U\222g\00126Y\265\220\331W\026\300", 64 }, + { "\236\003\332\3109\303\331\310\316\216\276\331\011\305\003\217\316R\343oW\036\362\015\321\205`\224:#cpm8v\202\200z.\316", 40, "\226\1340\320oh\347\016", 800, "N\251K\255\026\242\251J\361\374\033\356\007.\006\205\035\317\006\202\272[&<\255\244D&D\032\017m\307\345 \001\016\272k\024\134\252-$\346Y\330\031\035W\250\031~>,\346\260\242\352\001'Iw1\363\365\223\255\3738\276\344\202\325\042C\2714\252\254\273\215\244\250q;\375\344?\201\233a\334\332]", 64 }, + { "\272\210\031:*\250\216=\324\274\240L\340\220#\351\042s\203zR\2328\367\012\014\265&\372\225p\204S\310vFS\360\221\304", 40, "\244D\351Q\254>(\306\235&\226\314|\306\211\364\010\247\323\361\356\247\224\340", 800, "\360\245`M\036\222\270\011\207\000\377,LH\254\217\034\273\023[\367C^\366<\213\302\352u\035\355\367H", 800, "m\230\007Ou^\233\342\007\326MA\333J\010\256^\336\231mw\3463S\203\035~63\363\222U\201\375\311:\032\3244T\316Z\031\345\021;\356\222\010\245\262\214\204\316\273\320\266\036^\371W\005\372[", 64 }, + { "\025U\274\365\264D\325M\362\270\031\134\277y\240\201\017\367\011=\234B\206\216\275Z_:\310\022\034\226#\276\311z\356^\006m", 40, "\375\252kc`9\356\355\347\361wv4~\324\024\324\242", 64 }, + { "\2277\226\352\341\316T\3078\305\005\370\357\257\3065\270d\027\031\200I\245\016\243JC_\301\332\230p\323\345\274\252U\345\364\374", 40, "\321\257\023dE\264\202\246\274\342\024Y\307\377L~\244N\254\213\202\027\2641>\015\235\205\020\010/\333\275Z\350\030\305\006\3614\266\034\244\251\211X\241\217\212M\315\310K\252\374\351]f\267$X_\266\242", 800, "\303W\001v\301H\013*\303D\267\013\246\003\333Nr\213\363\214\023\231\300\334B\271\240\020A\214+\321\006\250\037\251p\230\373\020\262\333\255\210\251\031\013\206\366\000\246%\005\250\266\006I\274\257\337\031n\250D", 64 }, + { "v\036\315v\000\305_\303\343^\006?L$\025\304Xr\014\203'\257y\2462\274p\251\351\221,\211\001\313\024\234ua2S", 40, "\004\222\311 d\350\256\035pO'\302\255\260%5\210j\277T6a%\251F\017\013\300|]e\360\317\0245\037B\216\276mMZo\247\340\021\017~\305\326\242=OJu]shHr\212Y\254\304Gl\236\332\2600\042\216", 800, "\323\004MM>\322@<\321\23672O#\360\030\234\335~\352\345;\016\301^\237\304\260T\274\304\010\247\356iT\207kU\207\134\353\235\251 \377\270M\303#\300\274m\3151k\2259\240\327t\275\371d", 64 }, + { "\272\246\030\303\247i@\262\342\042sn\0006\222\247\366\013\002\205\034\363\246b\237\226\032\377\226\244r\243\377\362", 40, "1\324K\006\307I\330R", 900, "\215G|*\014\234\000^>$\313\363p\327\250QD\343\337\232D\042\256\331-\303LE\3602\0019\3137]\337\006\352\017\026 }Q\035\036\325\261\246\320\027+\357\007HP\200+\345\264\300\362\026\374\320", 64 }, + { "P\255'\277m\2654\026\225\362y\206\002\311\313\032J\213\315.R\201\375\025rP\236\254\333\357*\221,Nk\025\004\014\005\271", 40, "\322\002\261\273*\303\310\2203\375\240s\317\027\206\265", 900, "\311{\342#h\025\214A0\351T\253.\361\350w\200\336\367\331\241\023\006\201\375U\264\376,AL\276\373\360y\266\243\017\253\252'\232\346#\207\223\254\023\002Q);r\223\271\025\322\035\336\266\001*}\314", 64 }, + { "\375\021:w<-\363\227v\242\220s\343\37651\006\257x\331\004\213\363\336\266w9I\336\323QCN\216\354\215\306>[ ", 40, "Xm?\205\340\010\207\256\003#g\224\331\333XE\251\303\331Gr\025N\217", 900, "\316YO\221\237+`\004\0179 \317\322\220\374<\266rl\377\246\331T~3\235\304\014\023\335.'\273\034W\340\226\235\244 \033~J\222\021\240\014\327rD\007\235lR\022\321u\264~Yd\337\014\200", 64 }, + { "\035\264\036.]6\335\000\277zG\326\304\363\236\012\215\227\334\226 \375\220\325g\312D^jv\014\011\001>\263\364\330\260\271U", 40, "+\134<\316[s\224\272\360\201\201\031#\233n\261\317\205v\363\230\262^\215\213b\2162\244r\322Q", 900, "\373fya$\300>\001=\340\335\240\200T\321(\317\310\227xM\241q\237\305\351\335\253r\027/s\277vc\212\232w\332\026W\362:\361=\302\377\350\317\227\365+\223\033g\337\347p\344\273\012\366\317\345", 64 }, + { "\007Z\255E%IM\035\302\343\304d\276\354\312\042\211\015\266>|0Z\377\320m\303\254\334\231\206\266eFw\314\025\2734n", 40, "\354\272\341\373\202=\177\030\134A\224\256\246\217\336,\207\375\230\241D{\035\222q\275\220:o\240\321\375fP\303\375&Ak\205", 900, "7>\250Ar\323b\375\207\336\000\003\257\204\244\203\0137b\213\042\260\134<\372m\333*\3515\200\024\211\313\365y\345\276$\016\276\276\253\032Y\321\237x\367\000u\245\026s\015\014\326+\347\245j\251\221\236", 64 }, + { "\234\012J\305\000\361\2322b\357\3757\252\2230^Y=\310\353|\002>\013\257eF\230\200s\275V\214X\222\272|_j\215", 40, "\266\305(\042U\226dza\035\006h@\035t\335L\247#\360IqL\260\307\347\2761~_\316\032U7\206\255_\222\205\301\207\324\325<\222y\373\335", 900, "\373q\021\255\334\2365\216.\366\206i\034\217\256\227\210\3675\314\274\3716G\032\360\030$S\270\313Y\314k\022y\2272M\033C\277\003\221\334:h\001x\306\302yx\221\217\016\277;\012N\261%\211\240", 64 }, + { ">\346'MZ\252D.\350\326\241\240\2335cH\334\261f\371\224\236\032\375e\312b~\0165\324[\012\134\215=\277$", 900, "\027@\215A\225!\233*\003m\364\006\373+L\031^\007-l\010\242\377\242Y6aa\235\313\265\260\262b4\325\305T4\203\011\315\320\336_>\004\342\264\353O\351\266O\226;\313U\214\353\362RI\277", 64 }, + { "\223)\222Fg\257\022\2141\375\232Q\356\251\270A\021\237u\213C\010\371\243\250Z\233&\002\334-|\3267\340\026\354\276k\221", 40, "\243\370\024\263dz\312\234+\326\225\267g\254\317\205\346\350\303L\311\026\225\024\042\20679\266RG=\022\273\276\021\342\324\336\314\353\232M,M\334\025T\035\340\210\225\357\316)\374\265l\031\215\222\011\201K", 900, " \321\337\221\312.4*\351\042\242\026\134\221\002f#u\342\266\033\015\007\335\230\205\037E\016\324P\273\013q'\210\002\344AE6\206P\323N\221\260\362%\346\301t\246It\230RY\366\020\220\334K\017", 64 }, + { "V\215\330\206\025D\027\363\346\134\010\376\201\305\275_\366\034\344i\231\017\236\007\006\330s\351\033\336\011g\325\037\3173\023", 1000, "\211\272(\272\325\230{{\033k\220\260\341\026\225m\365\201|\276)\374\355\255\221\223\352;\235M\001\010\006\023tE<\340?o\001\246\226\232\012\343\306\234\001Iq\371\373r9\021\032\016:i\277\351C[", 64 }, + { "d\211\205{8\004\024\223f\011\313y\323\344\034\326\362\304X\320\241sG\235W\201\352\340u\215$\271\330\320\376\267\237 \324s", 40, "\310\034\021\375\023\330\206\027\323\1773D*N\003\317", 1000, "Pf\365\012\011i[?I\015%\343W\233\027\345\005\345\344\024\271\203\355\311fS\212\012\3022\021k\366\316\200[\250]\377.J\322u{\341\313`\323.i&*\037\327(\325\237\372\377\015)C\3507", 64 }, + { "\263\011\250\275\025\371Z\0101]\350mf\343\257p(\232p\375\013\350\2748J\327\024W\310-Xo\033.I\213\263\307T\350", 40, "/|\3329\253\374\350\017{\246Y\213\340\232J\226\261|A6\2306\220\267", 1000, "r>\177\026\256\271\343\015\236\212\217l\216R\0140pA\371\321\027:<\005\270,%\364\263#\221\274\344{8(;cR\346\302,<\035jG\247B\242\213\301\310\334\025\257\026B5[\023U\235\231\021", 64 }, + { "6P\203\023g\301\004\023\216)\306^h}\224-\020u\277\202\005\215\326q&\301\305-\001\313DU\343i8LJ\261%#", 40, "H\373x\252\220\007\246\251\353b\013S\223\314\364\017\305\326\341\347|\003\361\2411\215\363\2177\362}\333", 1000, "\035G\260X5\372\306\321\216\255\336\177\226.\2416j\302\315\220\270\2442\343(\236\017\376t\344\377\355!y\236L;\352\200\2603e\255$f\305\304\025\024\034\320+\000g>\371.)d&\201\225\211\001", 64 }, + { "\275\267\241\311\255\003A\347la\224=\205\012\312\320\315nNQ`B:8E9\257z\261\210\251#\003\321\007\360b\210\352t", 40, "\326\364~\371\340\012\011\247\221\223\373H\221g16\321\317\335\271\264\263:\217\201\373Cy6\344bG\315J\376?@\353\341?", 1000, "\334g[\011\227?\316|\030~\233Q\030\326\237 \244\376\016\026C~E\032_\022S\214\317\331L\270\3726\030\306\333\344ce\006\016\371\254\251\254m\254\225\305\277\301\000\257\035\363\340\321\350\211\332\000\023\304", 64 }, + { "\313\260\003\264?r\237\205$\220~n\016n\036\252\311\2724\241_\356}\362G\340K\373m\034\233\362\000\373\2329\204\253?q", 40, "\213\252\265?\016+v\221\020\234\261\012\254\305\200\326\027~a[\252^\024\350<\334\205\253%v\362\277Z\327\356\305/\253\215\010\261\221\276\224\306\355\237\033", 1000, "O\257}r\305\306\214\240p\023N\367u\336\275Q\340\011\005\377}\001\203\231}SE\221\303{\251\310\027\200\326\026\300\204p3\2726\212\224\355\237u\200\233\004\215dNd\243~\254\216\323\361\201\233\220\277", 64 }, + { "\217\252\036 M-\337\272Pzu\215\221?!\253\134\220\3331\320\352\2520,\232z\372\304\3133X\320\270ba\042\363\222\335", 40, "\331E\026\277\027J\200\301MA\345>\306@*L~\347-X\242\361\035\042\251\230\177\334Q\235\330\371c\322\300\242*c\322\364>|\250[\326\350\022\241\216\303\243\221\267\206\253\225", 1000, "\312G{\134\201\277o\201EE`\260E=~dQ& \212|O!\2507\177\336\274\220\0060G\354\316\006\243o\254lC\231\371\002v\004\013\234\251;\361wZ\210(JFj[\210\360t\263\363t", 64 }, + { "c\346\307Q\376\034zU\020%+\207\274\361.\222\231W\233\034\024\371\302\335\243\214\034\215\244\0076W\3629\367e\233\031Z\032", 40, "\042\006\220\030}-~\351a~\0349\354\270\336#c\301/\347X\014o\256\265>\357\004~\002\261q\215\012\042\025\370\260Q\236\324\262\356C\207\010\245\376*+\031P\320j\277.\234\231\377~+\003\022\356", 1000, "\233i\253\245\234\027Pe\201\215\321l\262\350\352\271\202\232\307\004\000Aaj\327W\265\372 \210\211 S;\037M\037/p\341\267\246\017\273R%\003\316\313\226\342\365\012\347\000\274\001\331\022z\313\2502\310", 64 }, + { "'\241\373B\206`\215\306\266\042\273F\242\205\356L\323\370\370N^\332\331\312=|\015B%o\004\337\361\346`\372\001\325\314J", 40, "\273\037G\277\315+\250\305\332`Q}ou\247\2227\357\012\336\255\366\303\027\330\247N\262\212n\277\213\241o\0010\231Z\210+\312\277\021\246\010m\211\377\001\376\325\234\303\033W\3723\222\240\351&\215\005\214\220K\257\3311%g%", 1000, "\276\005n\341E@}\262\034\244t\311O&\246;9s\034a\342\211H\004\275d){G\013\374\207|\271\023\316\303\365\337DdUY\337V\0375_\320\221\337c\202Evx\024\032\266\221\274\213\031\025", 64 }, + { "m\134\004\204\357\247%}5\327hN\356!\226\021\240\014\006\222\300\202\233H\366\245\235`\263Ua\000\220K\361\222\315\030\030V", 40, "Q\241\243\224|\243\305\211", 2000, "\320DN\260\222\254\336<\304\3538\324(\233\233\242\274S\372\224\216]\267\042\340\251\375S\213\335\217\243\3523\356c\325R\255\011\002\347\022\236fb4\242\363~n\301\226P\255\237P\030\362\324\252$\372\204", 64 }, + { "\342\007S\226t\2532\237\254u\361MMY\246\177\214i\256\343M\246\362\204\355'\335#\264\276\315[\321\236!!G\134\273\217", 40, "\246 y\253.\353\205\022se\355\015\273\352iI", 2000, "\201\303L9\227\266\301\245\372\243\036\235\016@,\027\370\223a;\331>\271^9\342P(\003\344\227\265=\032\033\022\224\0165\337\002\375>A\316\203<\222mp\016\0243\3068/\353\367\306\270\306%\177H", 64 }, + { "/\252\340\020\222?k\371?|p\371-\271\012O\002\255O\316\240&\303.\226U\204\347Zp\352\355!X\221\225\034\205\355\331", 40, "\241/\342\261\015ZAZM\217\316\374\357\212c\330+\203$\375\255\2075\341", 2000, "9\213W0\242u\022^\357\327Z[m\023\177\310\237\346J\340#(?4&\031y\310\005\34293\232o$?~\200\277O\255&=\360x\310\336\304\314Y5\214?2\313\034(\312\375\350\012=\334\263", 64 }, + { "\2058\365\033v\273$a\001\305%}QW\037\376\212\377!\005Z\347\366\375\010\253t\032\240\012P\247TC\267\330Y\335\206z", 40, "N\027>D\017\2778\324\346\012\264?\222w\276\202\207#\367:\206.\0313E\363\330\275.\265x7", 2000, "\254L\354\232\275\274\246|\323\213\236X=9'\332\233uX\333deG\013\217\262y\223\314\007\350\331S\244\356m75\016\015\314\331\334i\350za\010*\360\373\206;\272\003\336|\007\226!L_C\252", 64 }, + { "H\004\267\271\232\367\366y\362\342,\221$\037/82, \256\014`1\226\215\035\303%#p5\303\015\376\333\362\371\352\342\310", 40, "\022\3154\234\374[\232 \030HA~S\321\207\265\272\330z\236\356\212\360\236\323\215\373\231_\273Gk\220\256\331\264\005\230\267H", 2000, "<\360\033NOuN\014\207)\325@\302\0262\210\355!\367\033\302\253wN\372\370?|\217m\215\234\242e\243\004z\010:\330\032\315/y\326\213\267U1\362\242O5_=\264J\253\377\364\032\035W\375", 64 }, + { "R\225J\021F\232\376(\260\300\0304y\230%\327\352%\352\204\211\013\362\265\375Jc\0326A\206\0357\042\005G\025\354\253\006", 40, "\232\212\252\221\374`\030(\227%{\023\327~$BM\376\226?\177T\3368\353\214\321\216b\367\353S\366\042\177\330;\341\230\353\214\363\235\324\005s\234E", 2000, "O\021\336_6\247)\246\005CX\031\302\346\241\035\365CQ\310\037\274\265\377\247\235\257&\254J\315\250'\210\356hl>\027\246\013)\350p\004\267'=\025\236;\220\002x'\035Ij0\373\265\013\357\023", 64 }, + { "\374:\010\203(\0329\201D\346\246`\372\311\221\036C\256\030\024\335?\312\277\340l\344D\307\254\246\342+3;\312\301O\235\303", 40, "\237\233\317JL\336\027\026lj\264A\012)\005\225\210!b\267fn0\264e\2521Ko\235zd8]\031\213@\230T\3726\256\304\213K\211\231s\307\015\031!\237\020\233w", 2000, "S2\030\011\244\331Oq/{\000\330\177v-1X)\207\226}8\020\032H\310\000\215m\214;\011g\215\233\033\000\222\201\317c\237\2358T`:@\234\316\034\007A\337^\235\315lW\256A\214\237l", 64 }, + { "\270\224\207\301\240\001`\311\327\371\211\2550\254>\220%k\025d\306xg\250\276\322\245;\326N\237\311\276-\372\321l\214\321D", 40, "l+#\215\304\301\264\331\303\363\021\304\237\366gT\333\340\240\302{\200\370\207\221\205F\243\375t\357w\303<\371GM\237\006\352Q\344lg\266q\020\223X\274\023>\302\007\371CI\240e1U&u\223", 2000, "\017\360_\264\037\250\221\031\134\274\315\265\177\377m\355\205\246\202{\016|\214OI/\327\205\270\017\220G\3402n\014\233\236i\017Z{\036b\356\340O\033~\037\362\306\253j\324I'\265L\211wO\000\237", 64 }, + { "HU\270>(\233{\312\014\211\005\242\206\341\027\033\347\217KY\260\231\255\010\207\340\030s\037\340'\031\003\231\267W\031)\324\270", 40, "\304\232F#\277'\371\351GwI\343\233\374\2569\004Q\336\322z\305'\243n\270\023\377\330h\375\235\365F)\244yq\027\276\223'*\033\311\362h\221\322g\300\356+\241\300\365\301K_\231\363\005?[L\374\227\255j\216H\347", 2000, "\377)\253\322@\211\324\134CI\333\034>>m\374\270\207\375\025\372\367$2\235\337|\331t\251 \244\370\271F\012\341\250$\0221\210\276 \026\134\031\224\360k,8\034\262\013\360\225\260\352\031\240@\303\243", 64 }, + { "v\014\202\367\330\015\0016v\220\351\311\003u\263\236\205\251\334\260\257\203\020\300\204\332\245\257-\350\3476\303\325\377t#<[%", 40, "\346x\031\351=\212\362\002", 3000, "\236f'\326l\345\210x9\310\206\304Qb\247\335\351\246\310\255\200\007\373\301\272{Z\360h7W\005\355e{n\312\226\203/\357}\332o\314\2270\026'\357\342\012\331\376\000E\337U\374&\256\367\252`", 64 }, + { "tHN\335\351\026j\345\347\265\303js&\276\000\027`A\251\242\263\016 #\267\313\272\242\275\024\3430\333ah\276\342C.", 40, "\334\020y\342a\350!Y\332p\012a\247\217\223t", 3000, "\343ur\205\201\3444\263\011\373snRl\207\002\211\2332\260\302{\022\250t\210\250\030\177\277\304[\315}Fzi\333\210\303\234\010\337\244\216\360V\007*\305\243\327\371\007[\330J \027\257\1770:\001", 64 }, + { "\020((\271~1\371\354\134\256\025\362\323\332\010\200\010i]3Fw\003\324\237\250\301\247p\311\240\342G\335\255\006s\265\351\373", 40, "y\365\011\223\001\346\262\360#\245\027\313\026i\213Q\372\031\005\017sr\242\221", 3000, "\042?\357Y\375x\355a\024\200\003Y\245\356A0\267k^\203 \224\232I\260\304UQp\355D\233\253\326T\353\271\022l\377\247\300\307\351c\177\233v\002\266\336>\035\2711\307WM\321\377\000\371\007D", 64 }, + { "J\236\237\344\246\252\331\360~/\033\032kpw\321\235\036-}\233)\250Z\017\316W\3158\042\334(\216\227\373\324V\374QL", 40, "\216G\344\346]\013\356|g\005\363k\250\360\255E\225\263\327n\332\225\253\033\364\222.4#^-\355", 3000, "\324\224\245<*\230=\324Mf\352\224:\004\024\031\255qI\327\377'\327\223F\007\264v\037\367p7\301\366\253\225\266y\320\025=AZ\373\310\034\326n\311\272\270t%X\253\232\372\357X\270\205\201\376\036", 64 }, + { "\350\312\011|2E\205K3\036eK\177\355\265M\344\001\255\277(\231\376CG\301'\237\346pN]&\177\273\000R\015\336\353", 40, "Ui\256\334\260\242}$\372\237U*\265\020\023\264\027\247\367T\234\351MN>\0126lLv\360\016\223j\343\220\034\325\374\365", 3000, "#\012 \354\261\226\226=\251\271l{\001\013\301\260\012W\247\020\366\204*\341\352R\371\353\010\036V\375\037\345o\244*,\000\262\013Y\375\311,\033@R\3140\037\264L\031\360\020\354A\210\213\022\201\336M", 64 }, + { ",\347+3\364\305P\245\223\300<\323C=\213*S\373\0163>T\357\360\304[\202*P\004\004\224\33585\3249\332\032\253", 40, "Gs\271\225\331\274\026?XX\021\254\205\205Mrn\341s_\217\006\000\134\375:\301\334!\341\322\202\262\002\332\365\257O1B\305\376]\016\021l2\225\277\025I\012U\321\363\221\002\206,y\210\224\217g>\0258\254\261M\340\3714\274\013", 64 }, + { "\277\313O\320\373~\303\235\255\327\022\212&z\367\015r\270i\332A\222\320q\215\025\263\233\215\371Rc\337\012W\360t>\202\337", 40, "\005\271\372\326x{W\034\256\244\343\013\305\332\342\036R>\205'Im?z\350\014\006W\227\032\022\235S\352\025@O\036^\002\364\333G\373\242\201R\325\214\011W3\325$G\024", 3000, "\033\333ct\032Lr+\011C5\034>k5JL/l\003y$\225\022~3\347I\361fd\321\376\351\366\004'\365if\320\014\362\007\377\204\313\254\347\210]\033\331\025\005\243\255\271\037 \243\2633\254", 64 }, + { "\022 \253~\327\267\303s\016\037\331T\333zT=\330}-1\364\022\343\360D\307\377<\232\364Z\001\205\360\236\030\376\2163\243", 40, "I\222\331\177\265\220\372\015\351\001\220\213'{\334\362G\365\252s\201&#\263\357&\366D\302\023k\360#\2510bJ\342e\306\220\005T#\323\365`\013aQ%j\223\275\335|\363\200\304]m\212\251\304", 3000, "#U.\217\271\211\346\352y\3342\365DQ\035\374r\207\331\356u\346\211\246\255\347s\011\252/\374'\357\002\227zv{y\211Rz\300\206\254U\225>\207b\011\222f\313\005\374\202\010\272\313\032\242'i", 64 }, + { "\221\335\035[!\200\342\272\204\016\320H\250x\225\264Y\371rO]{\247I\316\020\314\376\256\267\331\302\311?\300[TGK\302", 40, "\214\217\316\227\270t6\374\010\211\320\217\213\220\023\004\305O\251m\306(\222\361\037\001r\3364\331\376u\203\344\273\342\266\224\201\215%\230=\235\341\331X\255\232\021\304\227\346V\340\331y\272\3321\216lKo\310\233\202\301\200Uk\355", 3000, "\222~6LF\263sIa\313\266\021\262\264 \250\012\2010\247\336\275\011zySN\270~\272\025N\025wT)%\206t\312@\253\352\033;Eby\270\231\025\207\362\363\356\3531\304\244*\364!\361s", 64 }, + { ";\244\030\035\035\032\256BP)X\202\277\214|]c\002\361r\214\220\367\037hU\347V\241\314\012\250\250\321p \032\254\335\031", 40, "\377\311\272\264\0173\245+", 4000, "\317\333,\233.\220\351\334\236B\341\200\252\021\306\254\001\355u\307\262\022\275_\236h\035\322|\370\346n\004\303\205)\037)\321\253\267\221\236\2446\252\226\250\334\225s\2761\334\244=\323\376\240\364\237\037\206~", 64 }, + { ".\362\232\346\221\3370e\363\2018S\366n\220\212CM\354K\015L\214\205\271\215\301J\003Q\240=f\001\240\036\027\363\245\210", 40, "\270$\3356\362\262.g\261\204\001\177tH\303\223", 4000, "\365S+K\204p\330\243\342\230\343\225\342\266\277\306\0113\001\027\214\326\2070r\334h\256\361$5O\033ze\336#\242\260W\321\311\211\020\262\342v~G-\223S\267\263\372J\305Kw\247\274\354\233Q", 64 }, + { "\221^\330\236-6\207\017\240\250:\317\255\035\234\362o_\344:w\334\236i'JH\304V\320`\255;\363\011H^\207J8", 40, "\305OM\233\221\204\0010\314d-}Z\376pSi\022\323\313\023\370\346\024", 4000, "\315\312\356\271\366\301\134=4\222\013qYj\206\352|\015J\312C\206\327t\305D\225X\324f\337v``\035u|\317\206\342\000\367E\233]M\372\351\134\304A\245\271\206~\301\362p#F`|+\206", 64 }, + { "RL\275F\026S\037q\0277\023\207\253\245s\301\363\002=m\307i\003\337\313\026\336x=\017A\212\343\206tGb\346,^", 40, "\262\215\200|\220`FH\353\321[\022\211\321\357\207\355\352\361LY\3416\032.pv$\202\200\311,", 4000, "\327\303\255\024\231\307\253\007\274%9\207\240SxB\223\037\367\203\246O\316\351\271\260<\312\223\305r\025\366(\214\276\334u\266\274\023}\343)Sr\332\206\224\333\375x\354\020D\243\013Z\374:\263d\355\230", 64 }, + { "zoK\020E\344\266\327\350\326\301\042ay\277/\027;k\036\210\343[\377\014W\307\277H#%\023d\323\255\373\3728\355\334", 40, "\224{J\344\244\356]\345\376\235\2521|D\210u\376\0337\367\245\343\360\035w\342y\351\340\030]Ys\320\3052H\036\253j", 4000, "kX\307\311\033v\211\230i\303S\020\231\313\334e\251p\010QnHK\261)\001W`\275\261:\347\345N\232\346m^\042\336oI\216\342JB\245\347W\227\234K\264\330\376\373\003\301\277Z\007k\311\003", 64 }, + { ";\346\033\200\372(h;\347\364\342\013\240\320J\254\311\313\326\332\207\020\012\276SlpS\221\206(\276*\012]2\264\357\353\333", 40, "#\233j\343\021\317\331\033\241\204O\326\207\375!\221\247<\271\237p\343R\253\017&\327\356\221[\255i\251.g\212Q\014\320\276~\244\005\3155k\251\010", 4000, "\276\001\247\265\317\006\331\235\337\310\301\212m\344\013v:K\337\134\360t\024\012\244\023\311u[C\303\324\033\351E\015]\234\363\351>}D7gL\324\364\244\306f\267\235\377\231z(I\214g\346\240\3447", 64 }, + { "}\251_'\352\042\262{u\213e\353\301&,\023\227\327\006\206\356\215\016\233\255B\015\033\211l\015\360\237\322\225\013zx|t", 40, "F'm\243\321/\261\3521 \366\342n\017\322k\333Q\026\010o\306\004x\254a,C\364\201\027\231\232\215\353\003ZS\227$Xk%\313\201tX\327\216|\275\242\313s\320d", 4000, "\217g3\243_\275\301\025G\345\354\363\253\220/\024lL/\351p\337\302&\263\011\300&\23191\345uu\345\301\230\337\362\042\360\352rZ>\312M:\355]`\360\273\205\223D \002\042\221\003\306tH", 64 }, + { "\245HR\177'\360\330\340\032[\203\254Z(,\272G\360\223\201\306\364\234'\010u\217\013\273\227\026\037\251\221\007\246 )[\235", 40, "\371\255\347\205\201U;\255\350_(\222q\235\261p\376\325\326&\203\042\224\3215Jy\352:\205\362\211f@l\221\015E\002P\207\252\200\233B\207\3329\202\042\256\001_\334h\023\001\003\374\216\237\353qJ", 4000, "\311\262\026\036\313\3243&UG\006\336\224\261\001\353\210\355\032\2372W\316Sw{\254\267\315\234\263\024\365\256\220\021\220A\231F\001A1\347\255q\224\305\220'[0\315Q\240a\221\236*\221\034\376i\313", 64 }, + { "j \331\356\021\266\302\373\305\037\234\305y\013\367\372i\222\236#\253E\221\215\222\022\223\007\203\134\207a\300\321\017\346\222?=v", 40, "\336\220\315rU\233\013\342D\314f\016\037\230\372\007'\003\361\037\234Q\221pf\356\017\203\010\264\321\370\211\360\251V\353\236\232l\220@\004\027\334b\366\265\006p\225JW\236\227\251fiN\232\233\200o\234|\274\015\265\317\001\200\012", 4000, "~M\276\371\346\345\324\242\202\212\337\025\277\227\024+\037\371P\263U\015\016\007\362\177T\370Y\346w\025h1I\307F\364\303<\023F\014\350\221\215H\276\353\206J\244kT\031r\330\246\016hj\250x/", 64 }, + { "\302E\227\301\254y7\247\337\332\015I\243\021\025-\320\361\315\262\377\327Q\277\367Y\203=\011\366u\362\006Ci\374\323\203B\236", 40, "\003V\223D\273\375{V", 5000, "\231\305\276)\251'^7\336\227\212\234\230\350\034\353\304=\215\033\230~\340,\261\351\317\246I.\212\023\217?_\225\012z\002\356\201v\215rA_6o\214/\264\347\006W:\006v\030\212=o\327\226+", 64 }, + { "4\314(\203E\260'\215c\345\331\341\017V\311\346\006;\013e\312\022\215\021D]Y\251D\227\027\366c_\276V\022\037\340\264", 40, "\2103\375Ru\276NAI\345\254\036/\252w2", 5000, "\214\345$\014\000\333\027\204>\326p\320-\020En\034\371+\207\023\327<\314\266\312\277\010\353H\2049\037J3\220\247\3302=\032'\205-}\005BB\372\355\371X\365\325}A\025&!.\311\252|\236", 64 }, + { "_[\347\031\345\200`\000t\302\207\327=\366\270/\322\350;\007\221\207A\027\256\250\364\313\355\370T\240\317Xb\224\363e\313b", 40, "\337\303I\267n\336+\240\134\243_\351\3100\317ZF\016\302m\263\220\302_", 5000, "\213\263Za\221\346\370\303+R\024\335\214C\222\372\332u\313\252#\347\353\006\332 \010\324\034\276\310\321\2165\2403\016\342\306\322\026Y\134~&g\367[\346\021t\221X\035\223\317t\270j\212\211\334\003Q", 64 }, + { "\361m\332Y\307\254=\374\376\312Km\012\013\312\012\206\210B\313j\227:\323&\233>\240\314\211\353\226%\322\035 +\346\305\302", 40, "\211\014jR\233\265\360\224\042\274\034\326y\311\310\200\016\376\356\301\216\205\353+6V\302q\276\247\253\240", 5000, "\201\205\336\014]\323\211\027\312]\276\307\034f\002g\035\310\214)\310d=\376\334\221\252\271L\014\307\202\373\357\226i\0365\210H\0201\260\227\277\2070\222\354\230\277\265\341\251\037\030?\270L\300I\342\030k", 64 }, + { "\302\265\353\372,\300O\312\032\035\205\376^\333?\330\362ZW\004\004\030\264\036J\255\341^b^\024\177\035_\0129\230\335\206o", 40, "\347/\326gV\324l\210\233\301\013\375\3151\314T%\271J\374\327\331\177!\035\312m:\376\247-\271k$JE\262\243}f", 5000, "\042bQM\317\245\256\010YW\336e_\023\354\372\206v=Y_\033!R\342\2103\331\374\204\034\016k\324H\374o\332\032*\012\014\031d\255k\324\300VI\351\244I\230\027\025\357G\206\300\000\222Mk", 64 }, + { "u\263\272CY\021`n\345\307\203\030\012\357T)\377\317\357f\025\361\015\337QM\253\215\367\022\217_\275a\244=/\205\360)", 40, "0M\352w 0\255\033\242penz\365\252O\327\002e\241\263_\015%xG\333g\344}\340\243v|\377\240e\011\354\203\316\352\377T\2143-\370", 5000, "49\310^\216\307t%\355\337\227\301\342\365\302\225MG\223\201-e\203\370Q\376\205w]\264\250)\010\002\367\213\303\256\363\265z\364)\201\276f\006\002\366\2458})4F\250\364\233m)\207 R9", 64 }, + { "6\353u\336\003\275APas\275*\356\210\325\270\274Z\303`N\022\261m\250\235\247\205\344\033\003\343\322o\000;\335R\023\273", 40, "N&{\2130%\355\335\335H\033\2166L\222\371o\374\246\012\033\256\301\235\271\314\345\206V\267?\013~\030\032)k(5\362\267\377#\276xRs\377\205\322\006!\225z\314~", 5000, "\256\213v\006\364ft\342-\254t#\024\244\020\015xM\036\337}\036\267\313C#*N\210\207d\351NG\037s\250\336\257v'\333F\253\244\242\207?\227\317h\337\025\344\2602.G\325:\214\337\373\202", 64 }, + { "\261q\320\011;tg\211\011\333\365\306pUw\272\271\276Tm4\370\373FXt\201\262\031\270\3704\177\0214J0\234\235\324", 40, "\316\264\004\246\371=\031\371*xZ\010\256\245*\355\022\012\260\231h\026z\214\363\277\372\250\302X>\016`\336\345\007\304/ >\234\217\330[\362Z]\343\275e\341\257t\316\232\235 \320\273\004f\261$5", 5000, "?*\034kY\205\002\241\226\003-\242e\003$\020?\345\005\311y\237>1\241\3324s\363\230\356:\206n\042\257\326\366\276n/\177\360\217\322z\335\016\203\353\356\037\213+iH\374\350\371\346y{\177\304", 64 }, + { "\027\252\311\265\024\350\347@\042Uh\245\021_\024;\241\265\2175\345hmj\365\325\300\362\000o\205u;x{cX\313\004\351", 40, "?\177\260\340\0031\020n\352t\261\032\361g\275\207`o\246\031\226\020\361$\352)oN\334\330,_S\2148\005E8\016\263\354i\243\322`\032\024w\307\225\011\275^i\312\032Y-,;\333c\375aX\002\214\327w\374\253\240", 5000, "\252\310U\245\245\134N\247\374z\317DEN;+\342h\231n\000h\015\032S;\333\245\244\201\340-\235\015\332\015\277\253\377\200\271\203\223p\204\252\341\264<\231\134\300\224c/\366u\253f9\337j\200\224", 64 }, + { "\001\257f\007F!\225t\202w\366\277\211\232 \202\246n\204\200pgdp7\365\033#\221\341\023\310\230\216\013\245#\201\365\274", 40, "\372\277\012\266\031\334\375\215", 6000, "\273HFL\315W\015\217\2275\377\356*\225\2074\351p\227\035\365\271\016\312=\373\220\251be\344\345\223\363\261\035e\330\2327\377z\226\355\015\242\314V\326\331Skm\311\323\252Y\3536?.\334\013(", 64 }, + { "\200\313\010\003\253\353HE\362\346\303J\205\346\232R\2477C\217\312&\023\244{\324A\310\2625\260\370\303o\353\360\262\267\236y", 40, "('z_\337\037M9\2131\036\204r[i1", 6000, "7\134(\341\220\2024\317Zm7\323Jg\267\274\376x7\377\253\016\254\366\213\363\24001\236\245'dr(\303\311#\015\335\223\273\342\323\353;\372\342\252\026\372\023tW\241\240\364\357\306!\3761\201\010", 64 }, + { "d\345L\034\356D\017-\277,\007n:5\226\014\227\210jN\000e\020\307C?K\267\323\010\011\257\347\277\350\032^\017\227]", 40, "\3435\273ab+KN\264O\201\211\242\325\251\233\311Hi\363\007=U\026", 6000, "\016u\265\242\011RP\313\341\316\345\370\303\365\327+\225\205\352\312\221g\001/\266\027\312\333!\247\361z\277\336\303\000A1\3715\341\262\374\224y{\223\013+'UB\242u\003R\217\311\316\042N\231\265\033", 64 }, + { "K\264\033\201\243)o'2\253\305C\007\355O\353r\310h\321\256zd>.\221\0330\244j\3349\015\240\225\317\347\344\260\220", 40, "/T!4a/\015v\243}\342\211f\274p\314q\267M\2352v\251\236r\015\327u\211\343\212w", 6000, "\037\211\024g\307|V\037\007O4\006\262\227\335\3174\306\011\015\230\277\022\207\374x\014\234\234_V\026.\352\232\231h,\236\205\035\333\271\227\335]\373\020\320\262\263\216\372\243_lA\244IEK\251}\272", 64 }, + { "\003\006I\015\227\203\320\264\024k\261\002\261k\375`\001\247\333\260\307\364\351\217\3228\377\342)\243\213\3446\351\266)\355\232\353\271", 40, "\245\033r\214\247\344II\366\256@\036\015\015{\260[\270\227\253\254\350\265\355\024\247&g~E\301\015\027\006D\346`\243\317=", 6000, "J\334\343\350\306\134w\367\333\377\220\004\201\025b\236\245J-\005\370\004\235[:\3718\222G8\027\036\215R\021\317\012\013\321MF+R_\341\004\206#\230\134\346\025\353=\026\200\216\256\203\342@\344\251\244", 64 }, + { "*\266\352zh\265\215\235\307~\357~&\262\354\232I\235\376\233;\3240\273r\243#^\003\354\0300\267\325\035bB\346\355\274", 40, "\270\274{\245'\246\304\0049\366\304\300\227^\302\024-\2140\261\236\323\273%:O\022\013\250I\354\275\223\372\037\270\177\301\304f4\2508\252\247\005pb", 6000, "\2323\251\356eT\177\244\020\004\264\251\320\327\0007:\037\322\227b\253Z\010z\305\204Z*\303(-v2W\266u\001\256\373\352~\017\215>\316\340&\333\331\206\030W\366\336D\3000\235Ma\270\031\003", 64 }, + { "\257\247u\250\333z\015\007\221\013\031nz\017\272\216C4I$\361h\310N\324\260D\223|\213\252\237l\007\300\361\2308\033\265", 40, "\300\351\273P\263c\222\222=\356r\337%\037a \226\002\355\330A\207\033\306z\214I\374qc\342\347\251Cp\237\204\322\253\214\010\221\361\324\351\314\030\0330\266\202\002=A\320D", 6000, "A\371[p\255$\364]A\313\177\322\346\354\270\250h\364\347m0 [*\376\213%\211\025L\263!\224\307ZR\263&\202\324n!\223\3475\374:s\2036\225'\347\356\025N\207\375\337r\011b\037\274", 64 }, + { "\251(R\225\234\026\3011t)IIC\345\235a\345\203\270\201\226\235\000y\024\356\240D\325f\210\200#\332\333\277\266p`\254", 40, "\375\010\333?yf\325\367e\202l70+\257\312\3228CX\2546\235q\203\245\134bk\316/\202O\0152\320D\002\3327\037\013\007>\222\247\351\334\2152\316\310H\304\251\200h\230\360\277Bh#D", 6000, "\030s0\2213\201\230\035\216*s\037\014}d\272{\006\372\177\237\036&\246Ylz\255\345\373s\042\333\034\005\244\235M%_[\026^\361\217\3119[\030\004\311e\205\316\003@\010\322I\017A%\246\370", 64 }, + { "\012'`d\013B\231\266\374\302\004\336\016\202\214\333\0120\246?\302\270a\242\003\334\343\022\341\241\352q/\273\323;z\012\355\306", 40, ")mKR[\252\253\024\321\034\236\033\306\243\360\320\331\300\261\346W\361_\263\226\310\013\346\010:\037\200\333\3300\313\255g\223l\177<\306S\216\325\346\335\027\244s ~#\256\224#\011\214\342G\350\015\021\315\307\335\214\027", 6000, "\023\220\224\005&\237LK\2207\363\221\020\037dL,\0230(\230\017x\375*\272\344\031\351\247\012|g\364\342\022\220\2566\221H\020\200\350\211\011I2\341\3277\3609\250\3164\332\377\370\241\227'\243\340", 64 }, + { "\262\362R(~\026\210J(H\232\034\237\314\321\227\376\272\252\242\226\0027uC\035\042\242R\377Pl\016\220T\242H\030i\320\215$\254`f\333>\024(\322\364H!\0008NK\000quQ>\027\363\013", 64 }, + { "\230,\310\226\255\024)\207\357`x\314\210l\252\361CC\240|\363t\322X'8Xbz\231\245d\000\003\025]\260;\350\245", 40, "\255\007Y\022Gk\265r\304]\207W\352\027TC", 7000, "\355\353\317\011\342\342f\336v\370\313[a\363\352\234?\371\234\254*\017%=\032}\257\375<\355\000\232q\305I%\327\017\300\032\253md\250\037\032\306\241\320t\211+\231\364\247\375\314[\204'j\322\272\022", 64 }, + { "B ko\350vU=\244~\353q\233\037@\022\215\273J\313\235\376\001\241\237\341\330\000\310\371J#)\335\262\245\000\207\325\023", 40, "\320\265\271\302]5\246-:J\0011Q\355#\373\271]\236;:l.\244", 7000, "HS\236-\206\233bC-0\327\311'=\206\014-\343gW\021\232P\246L\020:C\226\252(,\134M\240FIa[\260\277\225\015\275\376\000\273X\213\033p\241\371b\212\356\272\316\253\204LuK=", 64 }, + { "\210\323\042\001Y\3122\230\004\020\236g\001\016)\260\323.\204Xj2\360\320\343\357aW\214n1`:\277\352\264\376\356\367\227", 40, "X\014\020\274\005N\342\004\211j5=\2640\262B[?U9\334\020\277\341\255\234:mzGD\270", 7000, "\035$\354\365k%\310\367W\3049\001f(\207s\242\376\026\361v&\226\042\361\247\201x\322\212\233$\210\227\214\250I\346\236p\370lp\012a\215\351\217\304:\326(1\013\017\257\243\352!d\261j#'", 64 }, + { "~@<\225p\276\020\313]\245\331^8\017\204>\310\231E)\346\006_\362\236\331\253}x6\316O\237\271\216\000\253\304\371E", 40, "BD\027\320\345\300\267\013H\342\332\216.\227\247G \212\367\207\017i\365\257\212\317\333\351\217<\361b\010Xy|l\037\216^", 7000, ";t\042r\011\377\204\033\036\235%.\271~\235q\355F\264\215\236\250w\022#\255u1\252M\376\267z\337\004\236\346\203.sqh\223\025\002\033BE\204h\317\317x\026K\332;\372\357G\203\362\346\275", 64 }, + { "\027\231\333\257\306\3570\325\033\266\036\204\206#\030\006nT \255\356\277B\331\201\340A{\212ttQ\177y\374\353\254\025\274`", 40, "\321\005\246\023\042\306\027\177Hv\351W\025\0158\315s'\022KX\036~\367/4\247\223\377^z\324_Q\233\206\023\355H\265l0RkB^\241\207\250\366\240\320\340@\376\362\270;\267#\363\277q=%\365I\261\310\3268\201\324x\257\350c\250\256\311\355\2006\366", 7000, "\350\312+\222.\134\265\366+j\362t\042\317\014\307\2450\236\361/\207\324\362\222\360\262Q,I\254s\370\277w\346\203\261s\302\376\300\030\321\224\327\003\371U\016.$\274\256\362\004\016\312A\236O\242i\235", 64 }, + { "\035\376\031\3777\014\372b\372\316\207\314\334\245\242\374\022\233v\226\227A\303B\245\367\006U\032R\006\032\357\205\345\275Xe\344\001", 40, "v\277\337qw\301\203B\207\372N_\216\332\311p\0101\134\035O\232b\314\331\362z\036\005\327\205R\261\024&dSW\255\252\370\315UY\2716\335-DH\260\222\3627\371o\217\313\236\323\365H\310@\226\032\031\256\347lN\302", 7000, "iz\243\257\217P\205\341\3410t\250\341\244k\351\022\334\311\347I\221\216\244h\352\242y\355\253\374y\323\237g3\235J\232D}\333\310\217p\220\231\304U\026Kf\350\013\365\251\042\275\334\306e9\234e", 64 }, + { "so|\334\340\356\262\312\334\317@GX{l\234\03104Tw!'\332\237a\270\271\0246\333\31447M)3?\036\357", 40, "\357\2626\371\375L\006Q", 8000, "[\347\034s\255S\2004\012\233*\013c_\343\277\213p\314r\274@\373\230\252):;+\007\232D\276\3402\372\300\330\3713\307\227\303H`\376c<<\306\252\251\0241]u\256u\272U\332@l\330", 64 }, + { "\222y\345\357\037\366\020t\321\270\236H\262\273]\244@\253o\365\224\376,tN\245?^\216\034{\361\240`\022\001Q\354\362\357", 40, "\356\310w\353\307t\362\346'\204\202.\277\207\310\341", 8000, "\350\247\235\274\265\301\315\232Fj\366\3460\255\225*C\203G\033\320]\311j\273\264B\276\202\370\274&O\303\374\327$\373\023%7kX\0061\212\274\252\3371\332\213\232\313Cn\353\364U\326\215\352\347*", 64 }, + { "I\221@)\032\264\220^\211\253\025\222\202\236z\335\177\333\225\247\134\321\377\217\321\224\024Ve\304\364\302G3(3Y\266\221\020", 40, "%\242\270\266\326\262\215|\351\353\370B\336\312g\222\343\227\366z\341\036\207=", 8000, "\234D\201\323^\351\320\034\2358\026\360\032fU\357\030\234P\354\247/N\250J\355\011&;\277\134Z\024\343o\262\270\206m\253\254\366\375:\265$\034\321\200\011\261\347", 40, "x\373\357\225\035v\364\3700:\356eB\206\206\266\037L\356ip\301@eI\027\371\253X]]\326$\245D\357\322\007G\214\347\374\350~@h2o\021\001\251\247\224\030\250;}a8\256\247\005$\206\242.\212\261 ^\341\004", 8000, "pQ\266K\355\240CT\242N\326\002\026\241\300w\220\240\026NkK6\201\010N@\177\315\324\276\214\210\333\200\240:iX\216\206\252yy\322\333\330\317_+\235\273\317g\220\134 \203\302D\254$\360N", 64 }, + { "\207\356hc\332\311\262\221\017!\224L`\234\322g\242;\311\030t\240\371\247\304_\367\262\204xz=\306\351\367\007\3268\002\022", 40, "\024\231\371\007*\236k\272", 9000, "\232\035\200\0108\362\327\310\016\210h\244bi\365}v\342\243\034=\366\313\310Is\364\332\360\216\247\231g\352\322\364~R\360v\370\225\225{\034\007\325\305\231\025%\327O\231\272\3101\011\341\356\357\322\204\243", 64 }, + { "\347\232\037t\232\325\134\270\246\231:\000\216\341\364\327\243\233\336\374\233\254:f\234;\261\023T\211^\023\274e\277\331\224\254\361\022", 40, "\231\374k\017\264\022Z\310E\224\373\215G0\323l", 9000, "\242]\315\226Pn@\346\220\257~\134\340\031\325w\0057P\354Z\227\213\004w\255\215\244\305&\020\324\220`NY\262\227B\261\357\337\347\035\35701,jH\237\031\0423\262\321\344W\307\242\042\204\370?", 64 }, + { "\351\222\0071B\005V\022\340\224\323\035\331ry\303\333\214g\374WJ\346\310N\034\027\371H\021K\261b|\212\221k!\227\374", 40, "\235\3570\3671\254\004\034^:g3\274\230\042\314F\310\274\355\226\001\253\315", 9000, "#\335\027Q\374\272[\264x\366?\330\347\372N\366b\336\306[<5\314J\333%\223\321\016\266\333x\251\036W\266\336v\212\332\333\3400\006\302 \334\370{h\015n\374Q\276\026M\244P\026\253\352`\206", 64 }, + { "A9\335N\304O\264hp\360\036V\277c{\356\037$S\331\272\246\023#\254\341\345\252\372{\213q\005a\022\202 \336G\032", 40, "r\333\017\004\376\276\347\351F\362\241\221\026\211HC\374\032\022\004\0101dU\326(\343*y\2774\370", 9000, "cux \267k\007\254\005\211\304\235G\336\200\207\003tZ\010 WP<\360\3709\037\367\233\377\222\360\210\325Q\351\002/\325\134\234O\275~\363\355:_\267\006\316\362n\012\225\265\210i\2451\355\327Q", 64 }, + { "~\327n\210\367Y\1346o\001\235@\031\265\026\331\247;\262v\347,=\310\212}d\327A+V\372\246\011\034F\307r\021\236", 40, "=\232\244p\320Q\003B\224,\020}\340\267\270o\2408\321\256\261\360\332\211\346qM\345\276\004lS\270\010\336|\274\215\224\257", 9000, "\255\314\336\220vu\346\367\321\212W5\010+J\134\275\310\202\350\334\214\252,f\205t\2525\252\344\344\023\277G`<\353=1h\257\326U\025SY\027\352 x\340\026\272\363[\016{B\364T\347\337\025", 64 }, + { "&\007\346\021Eya_^(\217&\372\222\020X\246\367Q\015o,y\240\273\357\352\345\321\005\264p\031\034}e\244\274\003\247", 40, "\341E\304{\336\344\364w\231.Q)\334c\3024\305V\375jvam\004:\235\312\305t{T\205w\313\374\021\345\251\023l\264\036\325u\375\352\3710", 9000, "M\2779\257\330,\023S\354jg\345M\306tTW\036)\015%{\313\032\005\261_\377\370w\220\360N\266\366H\222U;\032`\031\261xzOS\356~\327\232\030\017\321!\334.\216\271\203\205\246\304]", 64 }, + { "\214e\042X\244P>-7\351\310\252\242\311\223\032PFX\215,\333\313\036N\0322\322\325\3340\366\242\226\366K\345y~\306", 40, "\134\307Ui \271\307\301p\225)\267\024\373\303\363v\214\002\017\270#\300\321\024e\025\371\025\305Y\252w;;\327\357\337\351\2130\244,\252\005\316D2\375\261\034^\367Ar\002", 9000, "_\227\217\237;:(\330\254\277(\202\301\303W>\346\372x\012#8\272\244G\371\134\214S\301\252\010\241\315\313\362\027\035\203\023zUV%\347\337\354,\225\375\345\275e]U\234.\007\023-\320o\272X", 64 }, + { "\254|F\033\270\264\331\247\266.9\233\013\212\036\3258H\203}\237\003\267O\325\317\336\375XC\220\362n\241d0\256\012E%", 40, "\340$\356g^;\224Y\340\2251\367\212\235\134\264\216\316\023\316;s\3010\272\340\242\313\244\206\310\354J\305\264\021\334\265\216g\331\304E\212r\010\341\224D\252d0\333F\246\212)\220\313\007W\2412\323", 9000, "\207w8\211 T\261\360\276u.\263)\252\303\233\270\317p\352\213G;\021-\025\2572C\250U\260\031\263\025?\343\216bs\042'\341[\007\242\337\342\022\374\207\237L\266\005\3305\305\366\335\231SDx", 64 }, + { "\212\341\3665{\373\267\340\360b/\234\313\327\235N\242%\334\246\274\216\024\350\304\134\271\321\0316P\013$\332\370\346\010r\351\326", 40, "\372\263P1\315\027\012\301u)\234\334\365\211\333\310g\303\203\240a\312_\276\2755\333\324r\275l\014\2311\356,\017\272\010t\033\354$\010\347`\321\235A\221\311\205\327\276\310\257\305h\262\245\315\204\366\334\013\313\363\027\303\216\202\015", 9000, "\257\316\015\202\024\245\365\303#%\303\351L\327\332L^\317j\370\250\261\337\177\277\276\321\302\246i\275\270\324\311\224\264\252\024\346\262Q9^\001\205\223l\250\343\007+\372\344w\270\350\372\350\326K\015v\346\014", 64 }, + { "\031tE\340P\214\336\351\311:\226@\254\206?MP\247\224d\271\251\266y_\036\371_\134\275\227\333\311\235Sb\307;\272\024\303\302\373\007M\3414\037", 48, "\021\201\255\007\253>\337z", 100, "\177?Y\235<\025\237c-q\203\035K\253_\276bE\236?L\220\016\237d\317W\376\337C}|\370d\000\004\304\331sJ\264\251\345\322\011\033\352k\341\272\323-\003\313ss\020F\201\021Yy\274\370", 64 }, + { "\361\225EV\034Lo\324\302\177\265\004\352\340\300\271K\372\263'b=\021\014<\244\035I\231\276\270\273o#\334P\227\317\364\026W\316\267\033\030L;\331", 48, "\347\276C\014\313y\201\013\217\230|\315\356=\256\213", 100, "\373\302\027\231[\013&'\375J2)\3601\356\260\356\226\377q?9\342\027\023\255\346\2219\302\301\256k\004\224\005\361\027\301d\255\322g\375\177\033\302\226V\232Iu\300\000W\364\010'd\033'\002\271\243", 64 }, + { "\232)\225y\274\233\203\256O[*\212\311\217Cr\005\332\031]I\212H\327\370e\203k;\340G\263>\321x\214s\350\262{\276\042f\370n-\325c", 48, "\317\277C\314B3!\207\217\214Y4m#\202\036\011\264\206\310L,}\225", 100, "U\263q5\313\207\331.v\021z\020I\204g\322\255+\326<\304@d\256d\020\203\205\342m\237!\337\005\261\353\302\216\215)\334\235-t\203\303\324P\3069d\314\253\301u\223\223\303\224yA\325\311\206", 64 }, + { "gk\0051\366\256\225\374T*:8\016\307\211\042\332\356\020\206?\014\353 UK\256\300)\371\274\356c\374\250\042\311\377\275\242\334\276\247\311\015\001\321g", 48, "K\346\020\021 \322\220\223\362\0178i\341\312b\223\200\241\310\011\027\020bR\343G\305\211\220\340\315\004", 100, "\3516\020\200.\042\206\302\212K\340\037\370\271@x\0013\251\301\012k\272\352wA\216\006y\270%.\343?\341\237\253A\236\232\377\217\240(\002W\345\311.Z\327\224K\304\015\251\200\252C\021\316]X\307", 64 }, + { "\241\243\332j\033\357\354S\364\247\334i\302\264[>8\351\326;A\030\003F\270\016S\320\014*\013\3555\320\270D\226\371`v\003\357\331\326\306\231\311&", 48, "\026|\301 \027`\301\032\2317\230\246\376\352>R D\250\263!\250^Q]H8\322\217\2377N@\341$\273\341\031\306\357", 100, "\377\025\011\030Ve\223\272K\275\230\002&=V\271\2043\243\013\004\270\016\201\377z1\335\241\005q\035\016\016-\314XR\177\3371N\252RR\206v\351\032q\370\207\321\033*\3410\277yjA\320\236X", 64 }, + { "\304\2053\034\271~\263W\025\300\311\253\321\265\201\303s\336s\262\230\212-\374\3737\336\331\0256\205\226o sp\264\274B\267\356\034\362\0130B\255R", 48, "\376\306\264\014\224\245\200\022\344\367\353\213s\376J\261U\200Q\371\330!\263\206\360\251\351_\0140\205\004\255\257\205\261\017\243[U\351\372~:\0350\211~", 100, "\272a\373KE\010KD\001\361\134\311\345Z\005\341H\036\035\324.r\233O\037;\217Z>\273\355\267\035=\204\215\017%\270,\256&p\212YI\356\246RL(\025Y\026Yd\237\264p\364\244\134\011\361", 64 }, + { "\246nj~QCr|u\223\234\331<-\226\320|\356\360\236j\273hr\021R4\254\034\345\032\025\262\037\042S\274\216\236%\375\361\224\006\243\357f\335", 48, "\200\025\363A\033\210\2445\333\263&\244\002R\026\227\221\024\177\236\201\2766^.\250\262\240W:\352\334F\233\210Hf\022\273\305-\273\312\246\274\256\257v\344\361\346\333\233\216\375\033", 100, "\336\007\257\321\234\327\323\354\251\223\244\266\331&\032\352\220\335ZJ\000\002\222y-\022\3648\256'\355\003\256\333\211\276\321fY'u\252\017\202U\353\0123G\012R\002\206\374\023\026\341@\356\202\330\243\357\017", 64 }, + { "\334^\236\035+\253\251\261\313#*C\273\226\221\266\223W:\322f\340F\234\241\277\031\002\263\340\347\271\017<\025\261\334G\313\035\343\042~\342\320\221\2420\042<2ZN\227Z}\221\231\216\134\334\263", 64 }, + { "\322<\332T\271\207f\242\337\256P\376\331\274\220E\351\251\331b\324{\261\315\353\237~\267\134O0P\244\205\334D@AR\020Q\305!\217}\204'\034", 48, "\134\277\013\215[R+\223V;yS\134\334~\311\351\017\321\246k\0349\207\300\221\332T1\227z7\256\003\371Wh\313]m\037G)4\257\177\031\373I\353\227\355\3219\365g4\010\362\243O\251\333\342\015\300\227\205M-\303\261", 100, "Z\032\013\325z\312$7B\024\241\035?$5\005\374h\300b\267\375Ah\251\311\210l\200\323M\333}\203XIf@\367\222\261\357T\301\256(\004'60\334\304\255\237h\300\361, \336\331(\364\335", 64 }, + { "\333'(\350\331\304A]*\271\315\031\002\372\361\011\035\211\317'\010\355\320.\376\265\262\343F\222A\006\312\037k\224_\327\003\312\256x\337>\304\205\2778", 48, "\215a\037X\3719K(", 200, "\203\363`'\026\233\226/+\260O%\306s\361\015\257\363w\326\042\212\250V\025\023\271\344\351/73\211\206G\2627\355Y8p\324\224\335\242\213\247DJ&\343\031]\362\343cQ\360D_\031\300A\005", 64 }, + { "y\042\366\351\206\036<\213\015Y\013Jb\245,\200bcRZ\253\013\034\346\276,\352\221\365{m\215\255(\251\274aA\231Qo\314\220\000\215[\025_", 48, "/\272\034\233d\274\376i\001\316s5,.qf", 200, "\301\322mH\217C4\207\042\375a\020[\315#$\336\264\012-\236\372\247A\323p\016\370e#6\221\224w\305\331l;A\233\374\311\231\030\236\244\022\002\336\313\202\300\333@)\316\325\042\017Wl\010\352\244", 64 }, + { "\243\034\205\371_\266\334W\037\345\300+@*7\033DN+\025\366\316\235\3720\177\267J\007\004\3030a\356\245!{/Ph8\223\037 %;\320~", 48, "\211\332\202T\321|k\027\207d!\223x\036*O\210U\005\032m\245\306\276", 200, "\214$\026\211\256*\222r|\334\364\000\232\005/I\277\030\015\264\336\344\000q7\235G\327\274AKx\221\257:\004\244:?\030\257^r:\251\312vj\036V\304\231K\317\325\215\015\202?\305\357\225\311\223", 64 }, + { "BS\204Y\226\027rk\273\322\022uFq2\343\324\373x~?\026\003\350$\370\276\242\314\374\177\325Z'\035uh\2213\204Z\314\340\243\221=g\037", 48, "<\225\331HzR\273\272\323c\203\312Z\302\344\226q\305\0241AE\042\251\336\274r<+_X\244", 200, "k\042\212\314OLc\3329\373a\353\256\316\2749>=\244P\260\134x,w\006\203\000L\004\230\223\025&)\241:\255\226\210\265K~)%\134a^\236\215I\023\3725\346Z\327\204\221\350\032\334\376\355", 64 }, + { "\025B\316\263\210\305R\004\013\362\2013\345)\237\023\006uR\305a\366\347\310\001\215\246\021|\014\006~\340\274\335\302\017~\350C\310\0151\204&\015_\332", 48, "\243j\023\234O\272\233|\212\264\2748\340\023\240\360j\314,\213H\367\344=\320\205\336\312\333O\314\344\002\230\316\362e\347\033x", 200, "\341u\033\206O\346\300\206_!\331>\002\203\273\352\351i\007\272\371 \2139:\353\231\255\015\223\262\035\355\375W\213\004\237>&f\042xi\242\266\365g,h\350\324\007\271dt\350\323\267\317\232\346G\247", 64 }, + { "3\303\365\236\271x\021y\227j\002\351\255\225&+{\221\326cUA\331\315\012\325X\035.\014\037\215ng$\370\345gG`\004\353\305\366\226\350\344t", 48, "\366@\247\226\256\020\017\215w\241/F-\033\315\347\204\250\252/\277\336\337\022\211\365\314\036\204z\261\226T\016o2\361}\321A\256\017\270>c\216\010\231", 200, "i\350\326-\342\324\032\205\034>U\346\2228q\207\207Z~\315\375\253\317\222>\373\035\212\021Kiq\316\352\036\3025\037\220\011g7!NHAO\332\257\220\304\206\202\236\246c*\3167\227\024\234U\207", 64 }, + { "\311\3651R\231\201cT@H_\210\352\224;\273)\3454n\213R\377\022Z\244[\222z!\234\004\3760\3162m\310\333}\022\353J\016Vb\367\245", 48, "\267G\341\021\361\231D\345\301\325\277\376g\305\256\2147\271\202Q\320\341\034M\333\251wz\247'\274\311\373\037\263\250\345\233\004\337\345l\325\321\266\370k\222\017M\030'n\033\210\363", 200, "zq/h\233Q\377\001\007i\020d\371\241\217\354\307\022$h\236\210\210\042\233\370=\246\323\236o\222\337;\316\213+\332\251\343\020\320\006\003g\013\025\230\250p\263\252\367\362+L\304\213\356\222P\317\024:", 64 }, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Tue Mar 14 07:09:53 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C70CD0B78E; Tue, 14 Mar 2017 07:09:53 +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 mx1.freebsd.org (Postfix) with ESMTPS id 09D7B1E32; Tue, 14 Mar 2017 07:09:52 +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 v2E79q6o096198; Tue, 14 Mar 2017 07:09:52 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2E79qth096197; Tue, 14 Mar 2017 07:09:52 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703140709.v2E79qth096197@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 14 Mar 2017 07:09:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315232 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 07:09:53 -0000 Author: ngie Date: Tue Mar 14 07:09:51 2017 New Revision: 315232 URL: https://svnweb.freebsd.org/changeset/base/315232 Log: Remove /usr/tests/sys/geom/eli/... The path was elided with the existing geli tests under /usr/tests/sys/geom/class/eli/... in r315230. MFC after: 2 weeks (if r315230, etc isn't MFCed at once) Sponsored by: Dell EMC Isilon Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Mar 14 07:06:05 2017 (r315231) +++ head/ObsoleteFiles.inc Tue Mar 14 07:09:51 2017 (r315232) @@ -38,6 +38,12 @@ # xargs -n1 | sort | uniq -d; # done +# 20170313: move .../sys/geom/eli/... to .../sys/geom/class/eli/... +OLD_FILES+=usr/tests/sys/geom/eli/pbkdf2/pbkdf2 +OLD_FILES+=usr/tests/sys/geom/eli/pbkdf2/Kyuafile +OLD_FILES+=usr/tests/sys/geom/eli/Kyuafile +OLD_DIRS+=usr/tests/sys/geom/eli/pbkdf2 +OLD_DIRS+=usr/tests/sys/geom/eli # 20170313: sbin/ipftest and ipresend temporarily disconnected. OLD_FILES+=sbin/ipftest OLD_FILES+=sbin/ipresend From owner-svn-src-head@freebsd.org Tue Mar 14 07:57:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 75CF0D0B7AB; Tue, 14 Mar 2017 07:57:34 +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 mx1.freebsd.org (Postfix) with ESMTPS id 4499B175A; Tue, 14 Mar 2017 07:57:34 +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 v2E7vXUF016649; Tue, 14 Mar 2017 07:57:33 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2E7vXb7016648; Tue, 14 Mar 2017 07:57:33 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201703140757.v2E7vXb7016648@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 14 Mar 2017 07:57:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315233 - head/sys/netpfil/ipfw/nat64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 07:57:34 -0000 Author: ae Date: Tue Mar 14 07:57:33 2017 New Revision: 315233 URL: https://svnweb.freebsd.org/changeset/base/315233 Log: Use memset with structure size. Modified: head/sys/netpfil/ipfw/nat64/nat64stl.c Modified: head/sys/netpfil/ipfw/nat64/nat64stl.c ============================================================================== --- head/sys/netpfil/ipfw/nat64/nat64stl.c Tue Mar 14 07:09:51 2017 (r315232) +++ head/sys/netpfil/ipfw/nat64/nat64stl.c Tue Mar 14 07:57:33 2017 (r315233) @@ -69,7 +69,7 @@ nat64stl_log(struct pfloghdr *plog, stru { static uint32_t pktid = 0; - memset(plog, 0, sizeof(plog)); + memset(plog, 0, sizeof(*plog)); plog->length = PFLOG_REAL_HDRLEN; plog->af = family; plog->action = PF_NAT; From owner-svn-src-head@freebsd.org Tue Mar 14 08:03:58 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A4EBD0BDF1; Tue, 14 Mar 2017 08:03:58 +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 mx1.freebsd.org (Postfix) with ESMTPS id D6FAA1F79; Tue, 14 Mar 2017 08:03:57 +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 v2E83v0n020446; Tue, 14 Mar 2017 08:03:57 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2E83u75020439; Tue, 14 Mar 2017 08:03:56 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703140803.v2E83u75020439@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 14 Mar 2017 08:03:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315234 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 08:03:58 -0000 Author: mav Date: Tue Mar 14 08:03:56 2017 New Revision: 315234 URL: https://svnweb.freebsd.org/changeset/base/315234 Log: Improvements around attach, reset and detach. This change fixes DMA resource leak on driver unload. Also it removes DMA resources allocation for hardcoded number of requests before fetching the real number from firmware. Also it prepares ground for more flexible IRQs allocation according to firmware capabilities. MFC after: 2 weeks Modified: head/sys/dev/isp/isp.c head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_freebsd.h head/sys/dev/isp/isp_library.c head/sys/dev/isp/isp_library.h head/sys/dev/isp/isp_pci.c head/sys/dev/isp/isp_sbus.c head/sys/dev/isp/ispvar.h Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Tue Mar 14 07:57:33 2017 (r315233) +++ head/sys/dev/isp/isp.c Tue Mar 14 08:03:56 2017 (r315234) @@ -178,13 +178,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d const char *btype = "????"; static const char dcrc[] = "Downloaded RISC Code Checksum Failure"; - isp->isp_state = ISP_NILSTATE; - if (isp->isp_dead) { - isp_shutdown(isp); - ISP_DISABLE_INTS(isp); - return; - } - /* * Basic types (SCSI, FibreChannel and PCI or SBus) * have been set in the MD code. We figure out more @@ -195,56 +188,10 @@ isp_reset(ispsoftc_t *isp, int do_load_d * for SCSI adapters and do other settings for the 2100. */ + isp->isp_state = ISP_NILSTATE; ISP_DISABLE_INTS(isp); /* - * Pick an initial maxcmds value which will be used - * to allocate xflist pointer space. It may be changed - * later by the firmware. - */ - if (IS_24XX(isp)) { - isp->isp_maxcmds = 4096; - } else if (IS_2322(isp)) { - isp->isp_maxcmds = 2048; - } else if (IS_23XX(isp) || IS_2200(isp)) { - isp->isp_maxcmds = 1024; - } else { - isp->isp_maxcmds = 512; - } - - /* - * Set up DMA for the request and response queues. - * - * We do this now so we can use the request queue - * for dma to load firmware from. - */ - if (ISP_MBOXDMASETUP(isp) != 0) { - isp_prt(isp, ISP_LOGERR, "Cannot setup DMA"); - return; - } - - /* - * Set up default request/response queue in-pointer/out-pointer - * register indices. - */ - if (IS_24XX(isp)) { - isp->isp_rqstinrp = BIU2400_REQINP; - isp->isp_rqstoutrp = BIU2400_REQOUTP; - isp->isp_respinrp = BIU2400_RSPINP; - isp->isp_respoutrp = BIU2400_RSPOUTP; - } else if (IS_23XX(isp)) { - isp->isp_rqstinrp = BIU_REQINP; - isp->isp_rqstoutrp = BIU_REQOUTP; - isp->isp_respinrp = BIU_RSPINP; - isp->isp_respoutrp = BIU_RSPOUTP; - } else { - isp->isp_rqstinrp = INMAILBOX4; - isp->isp_rqstoutrp = OUTMAILBOX4; - isp->isp_respinrp = OUTMAILBOX5; - isp->isp_respoutrp = INMAILBOX5; - } - - /* * Put the board into PAUSE mode (so we can read the SXP registers * or write FPM/FBM registers). */ @@ -468,7 +415,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d isp->isp_clock = isp->isp_mdvec->dv_clock; } } - } /* @@ -477,11 +423,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d isp->isp_intcnt = isp->isp_intbogus = 0; /* - * Do MD specific pre initialization - */ - ISP_RESET0(isp); - - /* * Hit the chip over the head with hammer, * and give it a chance to recover. */ @@ -513,7 +454,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d } } if (val & BIU2400_DMA_ACTIVE) { - ISP_RESET0(isp); isp_prt(isp, ISP_LOGERR, "DMA Failed to Stop on Reset"); return; } @@ -533,7 +473,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d } } if (val & BIU2400_SOFT_RESET) { - ISP_RESET0(isp); isp_prt(isp, ISP_LOGERR, "Failed to come out of reset"); return; } @@ -572,7 +511,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d ISP_DELAY(100); if (--loops < 0) { ISP_DUMPREGS(isp, "chip reset timed out"); - ISP_RESET0(isp); return; } } @@ -613,7 +551,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d } } if (val != 0) { - ISP_RESET0(isp); isp_prt(isp, ISP_LOGERR, "reset didn't clear"); return; } @@ -655,6 +592,26 @@ isp_reset(ispsoftc_t *isp, int do_load_d ISP_WRITE(isp, HCCR, HCCR_CMD_RELEASE); } + /* + * Set up default request/response queue in-pointer/out-pointer + * register indices. + */ + if (IS_24XX(isp)) { + isp->isp_rqstinrp = BIU2400_REQINP; + isp->isp_rqstoutrp = BIU2400_REQOUTP; + isp->isp_respinrp = BIU2400_RSPINP; + isp->isp_respoutrp = BIU2400_RSPOUTP; + } else if (IS_23XX(isp)) { + isp->isp_rqstinrp = BIU_REQINP; + isp->isp_rqstoutrp = BIU_REQOUTP; + isp->isp_respinrp = BIU_RSPINP; + isp->isp_respoutrp = BIU_RSPOUTP; + } else { + isp->isp_rqstinrp = INMAILBOX4; + isp->isp_rqstoutrp = OUTMAILBOX4; + isp->isp_respinrp = OUTMAILBOX5; + isp->isp_respoutrp = INMAILBOX5; + } ISP_WRITE(isp, isp->isp_rqstinrp, 0); ISP_WRITE(isp, isp->isp_rqstoutrp, 0); ISP_WRITE(isp, isp->isp_respinrp, 0); @@ -668,10 +625,10 @@ isp_reset(ispsoftc_t *isp, int do_load_d ISP_WRITE(isp, BIU2400_ATIO_RSPOUTP, 0); } - /* - * Do MD specific post initialization - */ - ISP_RESET1(isp); + if (!IS_24XX(isp) && isp->isp_bustype == ISP_BT_PCI) { + /* Make sure the BIOS is disabled */ + ISP_WRITE(isp, HCCR, PCI_HCCR_CMD_BIOS); + } /* * Wait for everything to finish firing up. @@ -686,7 +643,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d while (ISP_READ(isp, OUTMAILBOX0) == MBOX_BUSY) { ISP_DELAY(100); if (--loops < 0) { - ISP_RESET0(isp); isp_prt(isp, ISP_LOGERR, "MBOX_BUSY never cleared on reset"); return; } @@ -707,14 +663,12 @@ isp_reset(ispsoftc_t *isp, int do_load_d isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { isp_prt(isp, ISP_LOGERR, "NOP command failed (%x)", mbs.param[0]); - ISP_RESET0(isp); return; } /* * Do some operational tests */ - if (IS_SCSI(isp) || IS_24XX(isp)) { static const uint16_t patterns[MAX_MAILBOX] = { 0x0000, 0xdead, 0xbeef, 0xffff, @@ -735,12 +689,10 @@ isp_reset(ispsoftc_t *isp, int do_load_d } isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { - ISP_RESET0(isp); return; } for (i = 1; i < nmbox; i++) { if (mbs.param[i] != patterns[i]) { - ISP_RESET0(isp); isp_prt(isp, ISP_LOGERR, "Register Test Failed at Register %d: should have 0x%04x but got 0x%04x", i, patterns[i], mbs.param[i]); return; } @@ -758,6 +710,17 @@ isp_reset(ispsoftc_t *isp, int do_load_d */ if ((isp->isp_mdvec->dv_ispfw == NULL) || (isp->isp_confopts & ISP_CFG_NORELOAD)) { dodnld = 0; + } else { + + /* + * Set up DMA for the request and response queues. + * We do this now so we can use the request queue + * for dma to load firmware from. + */ + if (ISP_MBOXDMASETUP(isp) != 0) { + isp_prt(isp, ISP_LOGERR, "Cannot setup DMA"); + return; + } } if (IS_24XX(isp)) { @@ -849,7 +812,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d goto again; } isp_prt(isp, ISP_LOGERR, "F/W Risc Ram Load Failed"); - ISP_RESET0(isp); return; } la += nw; @@ -918,7 +880,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { isp_prt(isp, ISP_LOGERR, "F/W Risc Ram Load Failed"); - ISP_RESET0(isp); return; } la += nw; @@ -961,7 +922,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { isp_prt(isp, ISP_LOGERR, "F/W download failed at word %d", isp->isp_mbxwrk1 - code_org); - ISP_RESET0(isp); return; } } else if (IS_26XX(isp)) { @@ -971,7 +931,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { isp_prt(isp, ISP_LOGERR, "Flash F/W load failed"); - ISP_RESET0(isp); return; } } else { @@ -992,7 +951,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { isp_prt(isp, ISP_LOGERR, dcrc); - ISP_RESET0(isp); return; } } @@ -1003,8 +961,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d * If we didn't actually download f/w, * we still need to (re)start it. */ - - MBSINIT(&mbs, MBOX_EXEC_FIRMWARE, MBLOGALL, 5000000); if (IS_24XX(isp)) { mbs.param[1] = code_org >> 16; @@ -1027,7 +983,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d isp_mboxcmd(isp, &mbs); if (IS_2322(isp) || IS_24XX(isp)) { if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { - ISP_RESET0(isp); return; } } @@ -1051,7 +1006,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d MBSINIT(&mbs, MBOX_ABOUT_FIRMWARE, MBLOGALL, 0); isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { - ISP_RESET0(isp); return; } @@ -1249,22 +1203,16 @@ isp_reset(ispsoftc_t *isp, int do_load_d MBSINIT(&mbs, MBOX_GET_RESOURCE_COUNT, MBLOGALL, 0); isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { - ISP_RESET0(isp); return; } - if (isp->isp_maxcmds >= mbs.param[3]) { - isp->isp_maxcmds = mbs.param[3]; - } + isp->isp_maxcmds = mbs.param[3]; } else { MBSINIT(&mbs, MBOX_GET_FIRMWARE_STATUS, MBLOGALL, 0); isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { - ISP_RESET0(isp); return; } - if (isp->isp_maxcmds >= mbs.param[2]) { - isp->isp_maxcmds = mbs.param[2]; - } + isp->isp_maxcmds = mbs.param[2]; } isp_prt(isp, ISP_LOGCONFIG, "%d max I/O command limit set", isp->isp_maxcmds); @@ -1284,15 +1232,28 @@ isp_reset(ispsoftc_t *isp, int do_load_d isp->isp_nchan = 1; } } + + /* + * Final DMA setup after we got isp_maxcmds. + */ + if (ISP_MBOXDMASETUP(isp) != 0) { + isp_prt(isp, ISP_LOGERR, "Cannot setup DMA"); + return; + } + + /* + * Setup interrupts. + */ + if (ISP_IRQSETUP(isp) != 0) { + isp_prt(isp, ISP_LOGERR, "Cannot setup IRQ"); + return; + } + ISP_ENABLE_INTS(isp); + if (IS_FC(isp)) { for (i = 0; i < isp->isp_nchan; i++) isp_change_fw_state(isp, i, FW_CONFIG_WAIT); } - if (isp->isp_dead) { - isp_shutdown(isp); - ISP_DISABLE_INTS(isp); - return; - } isp->isp_state = ISP_RESETSTATE; @@ -1303,7 +1264,7 @@ isp_reset(ispsoftc_t *isp, int do_load_d * of knowing how many luns we support. * * Expanded lun firmware gives you 32 luns for SCSI cards and - * 16384 luns for Fibre Channel cards. + * unlimited luns for Fibre Channel cards. * * It turns out that even for QLogic 2100s with ROM 1.10 and above * we do get a firmware attributes word returned in mailbox register 6. @@ -1351,7 +1312,7 @@ isp_reset(ispsoftc_t *isp, int do_load_d * Clean firmware shutdown. */ static int -isp_deinit(ispsoftc_t *isp) +isp_stop(ispsoftc_t *isp) { mbreg_t mbs; @@ -1370,6 +1331,35 @@ isp_deinit(ispsoftc_t *isp) } /* + * Hardware shutdown. + */ +void +isp_shutdown(ispsoftc_t *isp) +{ + + if (isp->isp_state >= ISP_RESETSTATE) + isp_stop(isp); + ISP_DISABLE_INTS(isp); + if (IS_FC(isp)) { + if (IS_24XX(isp)) { + ISP_WRITE(isp, BIU2400_ICR, 0); + ISP_WRITE(isp, BIU2400_HCCR, HCCR_2400_CMD_PAUSE); + } else { + ISP_WRITE(isp, BIU_ICR, 0); + ISP_WRITE(isp, HCCR, HCCR_CMD_PAUSE); + ISP_WRITE(isp, BIU2100_CSR, BIU2100_FPM0_REGS); + ISP_WRITE(isp, FPM_DIAG_CONFIG, FPM_SOFT_RESET); + ISP_WRITE(isp, BIU2100_CSR, BIU2100_FB_REGS); + ISP_WRITE(isp, FBM_CMD, FBMCMD_FIFO_RESET_ALL); + ISP_WRITE(isp, BIU2100_CSR, BIU2100_RISC_REGS); + } + } else { + ISP_WRITE(isp, BIU_ICR, 0); + ISP_WRITE(isp, HCCR, HCCR_CMD_PAUSE); + } +} + +/* * Initialize Parameters of Hardware to a known state. * * Locks are held before coming here. @@ -5599,7 +5589,6 @@ isp_parse_async(ispsoftc_t *isp, uint16_ isp_async(isp, ISPASYNC_BUS_RESET, chan); break; case ASYNC_SYSTEM_ERROR: - isp->isp_dead = 1; isp->isp_state = ISP_CRASHED; /* * Were we waiting for a mailbox command to complete? @@ -5770,7 +5759,6 @@ isp_parse_async_fc(ispsoftc_t *isp, uint switch (mbox) { case ASYNC_SYSTEM_ERROR: - isp->isp_dead = 1; isp->isp_state = ISP_CRASHED; FCPARAM(isp, chan)->isp_loopstate = LOOP_NIL; isp_change_fw_state(isp, chan, FW_CONFIG_WAIT); @@ -6052,7 +6040,6 @@ isp_parse_async_fc(ispsoftc_t *isp, uint "Point-to-Point -> Loop mode (BAD LIP)"); break; case ISP_CONN_FATAL: - isp->isp_dead = 1; isp->isp_state = ISP_CRASHED; isp_prt(isp, ISP_LOGERR, "FATAL CONNECTION ERROR"); isp_async(isp, ISPASYNC_FW_CRASH); @@ -7895,14 +7882,13 @@ isp_reinit(ispsoftc_t *isp, int do_load_ { int i, res = 0; - if (isp->isp_state == ISP_RUNSTATE) - isp_deinit(isp); + if (isp->isp_state > ISP_RESETSTATE) + isp_stop(isp); if (isp->isp_state != ISP_RESETSTATE) isp_reset(isp, do_load_defaults); if (isp->isp_state != ISP_RESETSTATE) { res = EIO; isp_prt(isp, ISP_LOGERR, "%s: cannot reset card", __func__); - ISP_DISABLE_INTS(isp); goto cleanup; } Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Tue Mar 14 07:57:33 2017 (r315233) +++ head/sys/dev/isp/isp_freebsd.c Tue Mar 14 08:03:56 2017 (r315234) @@ -1529,7 +1529,7 @@ isp_target_start_ctio(ispsoftc_t *isp, u isp_prt(isp, ISP_LOGTDEBUG0, "%s: ests base %p vaddr %p ecmd_dma %jx addr %jx len %u", __func__, isp->isp_osinfo.ecmd_base, atp->ests, (uintmax_t) isp->isp_osinfo.ecmd_dma, (uintmax_t)addr, MIN_FCP_RESPONSE_SIZE + sense_length); cto->rsp.m2.ct_datalen = MIN_FCP_RESPONSE_SIZE + sense_length; - if (isp->isp_osinfo.sixtyfourbit) { + if (cto->ct_header.rqs_entry_type == RQSTYPE_CTIO3) { cto->rsp.m2.u.ct_fcp_rsp_iudata_64.ds_base = DMA_LO32(addr); cto->rsp.m2.u.ct_fcp_rsp_iudata_64.ds_basehi = DMA_HI32(addr); cto->rsp.m2.u.ct_fcp_rsp_iudata_64.ds_count = MIN_FCP_RESPONSE_SIZE + sense_length; @@ -4304,21 +4304,6 @@ changed: } } - -/* - * Locks are held before coming here. - */ -void -isp_uninit(ispsoftc_t *isp) -{ - if (IS_24XX(isp)) { - ISP_WRITE(isp, BIU2400_HCCR, HCCR_2400_CMD_RESET); - } else { - ISP_WRITE(isp, HCCR, HCCR_CMD_RESET); - } - ISP_DISABLE_INTS(isp); -} - uint64_t isp_default_wwn(ispsoftc_t * isp, int chan, int isactive, int iswwnn) { Modified: head/sys/dev/isp/isp_freebsd.h ============================================================================== --- head/sys/dev/isp/isp_freebsd.h Tue Mar 14 07:57:33 2017 (r315233) +++ head/sys/dev/isp/isp_freebsd.h Tue Mar 14 08:03:56 2017 (r315234) @@ -697,7 +697,6 @@ default: \ */ extern int isp_attach(ispsoftc_t *); extern int isp_detach(ispsoftc_t *); -extern void isp_uninit(ispsoftc_t *); extern uint64_t isp_default_wwn(ispsoftc_t *, int, int, int); /* Modified: head/sys/dev/isp/isp_library.c ============================================================================== --- head/sys/dev/isp/isp_library.c Tue Mar 14 07:57:33 2017 (r315233) +++ head/sys/dev/isp/isp_library.c Tue Mar 14 08:03:56 2017 (r315234) @@ -632,28 +632,6 @@ isp_clear_commands(ispsoftc_t *isp) #endif } -void -isp_shutdown(ispsoftc_t *isp) -{ - if (IS_FC(isp)) { - if (IS_24XX(isp)) { - ISP_WRITE(isp, BIU2400_ICR, 0); - ISP_WRITE(isp, BIU2400_HCCR, HCCR_2400_CMD_PAUSE); - } else { - ISP_WRITE(isp, BIU_ICR, 0); - ISP_WRITE(isp, HCCR, HCCR_CMD_PAUSE); - ISP_WRITE(isp, BIU2100_CSR, BIU2100_FPM0_REGS); - ISP_WRITE(isp, FPM_DIAG_CONFIG, FPM_SOFT_RESET); - ISP_WRITE(isp, BIU2100_CSR, BIU2100_FB_REGS); - ISP_WRITE(isp, FBM_CMD, FBMCMD_FIFO_RESET_ALL); - ISP_WRITE(isp, BIU2100_CSR, BIU2100_RISC_REGS); - } - } else { - ISP_WRITE(isp, BIU_ICR, 0); - ISP_WRITE(isp, HCCR, HCCR_CMD_PAUSE); - } -} - /* * Functions to move stuff to a form that the QLogic RISC engine understands * and functions to move stuff back to a form the processor understands. Modified: head/sys/dev/isp/isp_library.h ============================================================================== --- head/sys/dev/isp/isp_library.h Tue Mar 14 07:57:33 2017 (r315233) +++ head/sys/dev/isp/isp_library.h Tue Mar 14 08:03:56 2017 (r315234) @@ -77,11 +77,6 @@ const char *isp_fc_toponame(fcparam *); void isp_clear_commands(ispsoftc_t *); /* - * Common chip shutdown function - */ -void isp_shutdown(ispsoftc_t *); - -/* * Put/Get routines to push from CPU view to device view * or to pull from device view to CPU view for various * data structures (IOCB) Modified: head/sys/dev/isp/isp_pci.c ============================================================================== --- head/sys/dev/isp/isp_pci.c Tue Mar 14 07:57:33 2017 (r315233) +++ head/sys/dev/isp/isp_pci.c Tue Mar 14 08:03:56 2017 (r315234) @@ -65,11 +65,9 @@ static int isp_pci_rd_isr(ispsoftc_t *, static int isp_pci_rd_isr_2300(ispsoftc_t *, uint16_t *, uint16_t *, uint16_t *); static int isp_pci_rd_isr_2400(ispsoftc_t *, uint16_t *, uint16_t *, uint16_t *); static int isp_pci_mbxdma(ispsoftc_t *); +static void isp_pci_mbxdmafree(ispsoftc_t *); static int isp_pci_dmasetup(ispsoftc_t *, XS_T *, void *); - - -static void isp_pci_reset0(ispsoftc_t *); -static void isp_pci_reset1(ispsoftc_t *); +static int isp_pci_irqsetup(ispsoftc_t *); static void isp_pci_dumpregs(ispsoftc_t *, const char *); static struct ispmdvec mdvec = { @@ -79,8 +77,7 @@ static struct ispmdvec mdvec = { isp_pci_mbxdma, isp_pci_dmasetup, isp_common_dmateardown, - isp_pci_reset0, - isp_pci_reset1, + isp_pci_irqsetup, isp_pci_dumpregs, NULL, BIU_BURST_ENABLE|BIU_PCI_CONF1_FIFO_64 @@ -93,8 +90,7 @@ static struct ispmdvec mdvec_1080 = { isp_pci_mbxdma, isp_pci_dmasetup, isp_common_dmateardown, - isp_pci_reset0, - isp_pci_reset1, + isp_pci_irqsetup, isp_pci_dumpregs, NULL, BIU_BURST_ENABLE|BIU_PCI_CONF1_FIFO_64 @@ -107,8 +103,7 @@ static struct ispmdvec mdvec_12160 = { isp_pci_mbxdma, isp_pci_dmasetup, isp_common_dmateardown, - isp_pci_reset0, - isp_pci_reset1, + isp_pci_irqsetup, isp_pci_dumpregs, NULL, BIU_BURST_ENABLE|BIU_PCI_CONF1_FIFO_64 @@ -121,8 +116,7 @@ static struct ispmdvec mdvec_2100 = { isp_pci_mbxdma, isp_pci_dmasetup, isp_common_dmateardown, - isp_pci_reset0, - isp_pci_reset1, + isp_pci_irqsetup, isp_pci_dumpregs }; @@ -133,8 +127,7 @@ static struct ispmdvec mdvec_2200 = { isp_pci_mbxdma, isp_pci_dmasetup, isp_common_dmateardown, - isp_pci_reset0, - isp_pci_reset1, + isp_pci_irqsetup, isp_pci_dumpregs }; @@ -145,8 +138,7 @@ static struct ispmdvec mdvec_2300 = { isp_pci_mbxdma, isp_pci_dmasetup, isp_common_dmateardown, - isp_pci_reset0, - isp_pci_reset1, + isp_pci_irqsetup, isp_pci_dumpregs }; @@ -157,8 +149,7 @@ static struct ispmdvec mdvec_2400 = { isp_pci_mbxdma, isp_pci_dmasetup, isp_common_dmateardown, - isp_pci_reset0, - isp_pci_reset1, + isp_pci_irqsetup, NULL }; @@ -169,8 +160,7 @@ static struct ispmdvec mdvec_2500 = { isp_pci_mbxdma, isp_pci_dmasetup, isp_common_dmateardown, - isp_pci_reset0, - isp_pci_reset1, + isp_pci_irqsetup, NULL }; @@ -181,8 +171,7 @@ static struct ispmdvec mdvec_2600 = { isp_pci_mbxdma, isp_pci_dmasetup, isp_common_dmateardown, - isp_pci_reset0, - isp_pci_reset1, + isp_pci_irqsetup, NULL }; @@ -681,26 +670,19 @@ isp_get_specific_options(device_t dev, i static int isp_pci_attach(device_t dev) { - int i, locksetup = 0; + struct isp_pcisoftc *pcs = device_get_softc(dev); + ispsoftc_t *isp = &pcs->pci_isp; + int i; uint32_t data, cmd, linesz, did; - struct isp_pcisoftc *pcs; - ispsoftc_t *isp; size_t psize, xsize; char fwname[32]; - pcs = device_get_softc(dev); - if (pcs == NULL) { - device_printf(dev, "cannot get softc\n"); - return (ENOMEM); - } - memset(pcs, 0, sizeof (*pcs)); - pcs->pci_dev = dev; - isp = &pcs->pci_isp; isp->isp_dev = dev; isp->isp_nchan = 1; if (sizeof (bus_addr_t) > 4) isp->isp_osinfo.sixtyfourbit = 1; + mtx_init(&isp->isp_osinfo.lock, "isp", NULL, MTX_DEF); /* * Get Generic Options @@ -980,10 +962,6 @@ isp_pci_attach(device_t dev) goto bad; } - /* Make sure the lock is set up. */ - mtx_init(&isp->isp_osinfo.lock, "isp", NULL, MTX_DEF); - locksetup++; - if (isp_setup_intr(dev, pcs->irq, ISP_IFLAGS, NULL, isp_platform_intr, isp, &pcs->ih)) { device_printf(dev, "could not setup interrupt\n"); goto bad; @@ -1007,7 +985,7 @@ isp_pci_attach(device_t dev) ISP_UNLOCK(isp); if (isp_attach(isp)) { ISP_LOCK(isp); - isp_uninit(isp); + isp_shutdown(isp); ISP_UNLOCK(isp); goto bad; } @@ -1017,9 +995,6 @@ bad: if (pcs->ih) { (void) bus_teardown_intr(dev, pcs->irq, pcs->ih); } - if (locksetup) { - mtx_destroy(&isp->isp_osinfo.lock); - } if (pcs->irq) { (void) bus_release_resource(dev, SYS_RES_IRQ, pcs->iqd, pcs->irq); } @@ -1040,43 +1015,34 @@ bad: free(pcs->pci_isp.isp_osinfo.pc.ptr, M_DEVBUF); pcs->pci_isp.isp_osinfo.pc.ptr = NULL; } + mtx_destroy(&isp->isp_osinfo.lock); return (ENXIO); } static int isp_pci_detach(device_t dev) { - struct isp_pcisoftc *pcs; - ispsoftc_t *isp; + struct isp_pcisoftc *pcs = device_get_softc(dev); + ispsoftc_t *isp = &pcs->pci_isp; int status; - pcs = device_get_softc(dev); - if (pcs == NULL) { - return (ENXIO); - } - isp = (ispsoftc_t *) pcs; status = isp_detach(isp); if (status) return (status); ISP_LOCK(isp); - isp_uninit(isp); - if (pcs->ih) { - (void) bus_teardown_intr(dev, pcs->irq, pcs->ih); - } + isp_shutdown(isp); ISP_UNLOCK(isp); - mtx_destroy(&isp->isp_osinfo.lock); + if (pcs->ih) + (void) bus_teardown_intr(dev, pcs->irq, pcs->ih); (void) bus_release_resource(dev, SYS_RES_IRQ, pcs->iqd, pcs->irq); - if (pcs->msicount) { + if (pcs->msicount) pci_release_msi(dev); - } (void) bus_release_resource(dev, pcs->rtp, pcs->rgd, pcs->regs); if (pcs->regs1) (void) bus_release_resource(dev, pcs->rtp1, pcs->rgd1, pcs->regs1); if (pcs->regs2) (void) bus_release_resource(dev, pcs->rtp2, pcs->rgd2, pcs->regs2); - /* - * XXX: THERE IS A LOT OF LEAKAGE HERE - */ + isp_pci_mbxdmafree(isp); if (pcs->pci_isp.isp_param) { free(pcs->pci_isp.isp_param, M_DEVBUF); pcs->pci_isp.isp_param = NULL; @@ -1085,6 +1051,7 @@ isp_pci_detach(device_t dev) free(pcs->pci_isp.isp_osinfo.pc.ptr, M_DEVBUF); pcs->pci_isp.isp_osinfo.pc.ptr = NULL; } + mtx_destroy(&isp->isp_osinfo.lock); return (0); } @@ -1571,56 +1538,39 @@ isp_pci_mbxdma(ispsoftc_t *isp) struct imush im; isp_ecmd_t *ecmd; - /* - * Already been here? If so, leave... - */ - if (isp->isp_rquest) { + /* Already been here? If so, leave... */ + if (isp->isp_xflist != NULL) + return (0); + if (isp->isp_rquest != NULL && isp->isp_maxcmds == 0) return (0); - } ISP_UNLOCK(isp); - - if (isp->isp_maxcmds == 0) { - isp_prt(isp, ISP_LOGERR, "maxcmds not set"); - ISP_LOCK(isp); - return (1); - } + if (isp->isp_rquest != NULL) + goto gotmaxcmds; hlim = BUS_SPACE_MAXADDR; if (IS_ULTRA2(isp) || IS_FC(isp) || IS_1240(isp)) { - if (sizeof (bus_size_t) > 4) { + if (sizeof (bus_size_t) > 4) slim = (bus_size_t) (1ULL << 32); - } else { + else slim = (bus_size_t) (1UL << 31); - } llim = BUS_SPACE_MAXADDR; } else { - llim = BUS_SPACE_MAXADDR_32BIT; slim = (1UL << 24); + llim = BUS_SPACE_MAXADDR_32BIT; } - - len = isp->isp_maxcmds * sizeof (struct isp_pcmd); - isp->isp_osinfo.pcmd_pool = (struct isp_pcmd *) malloc(len, M_DEVBUF, M_WAITOK | M_ZERO); - - if (isp->isp_osinfo.sixtyfourbit) { + if (isp->isp_osinfo.sixtyfourbit) nsegs = ISP_NSEG64_MAX; - } else { + else nsegs = ISP_NSEG_MAX; - } - if (isp_dma_tag_create(BUS_DMA_ROOTARG(ISP_PCD(isp)), 1, slim, llim, hlim, NULL, NULL, BUS_SPACE_MAXSIZE, nsegs, slim, 0, &isp->isp_osinfo.dmat)) { - free(isp->isp_osinfo.pcmd_pool, M_DEVBUF); + if (isp_dma_tag_create(BUS_DMA_ROOTARG(ISP_PCD(isp)), 1, + slim, llim, hlim, NULL, NULL, BUS_SPACE_MAXSIZE, nsegs, slim, 0, + &isp->isp_osinfo.dmat)) { ISP_LOCK(isp); isp_prt(isp, ISP_LOGERR, "could not create master dma tag"); return (1); } - len = sizeof (isp_hdl_t) * isp->isp_maxcmds; - isp->isp_xflist = (isp_hdl_t *) malloc(len, M_DEVBUF, M_WAITOK | M_ZERO); - for (len = 0; len < isp->isp_maxcmds - 1; len++) { - isp->isp_xflist[len].cmd = &isp->isp_xflist[len+1]; - } - isp->isp_xffree = isp->isp_xflist; - /* * Allocate and map the request queue and a region for external * DMA addressable command/status structures (22XX and later). @@ -1632,20 +1582,20 @@ isp_pci_mbxdma(ispsoftc_t *isp) BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, len, 1, len, 0, &isp->isp_osinfo.reqdmat)) { isp_prt(isp, ISP_LOGERR, "cannot create request DMA tag"); - goto bad1; + goto bad; } if (bus_dmamem_alloc(isp->isp_osinfo.reqdmat, (void **)&base, BUS_DMA_COHERENT, &isp->isp_osinfo.reqmap) != 0) { isp_prt(isp, ISP_LOGERR, "cannot allocate request DMA memory"); bus_dma_tag_destroy(isp->isp_osinfo.reqdmat); - goto bad1; + goto bad; } isp->isp_rquest = base; im.error = 0; if (bus_dmamap_load(isp->isp_osinfo.reqdmat, isp->isp_osinfo.reqmap, base, len, imc, &im, 0) || im.error) { isp_prt(isp, ISP_LOGERR, "error loading request DMA map %d", im.error); - goto bad1; + goto bad; } isp_prt(isp, ISP_LOGDEBUG0, "request area @ 0x%jx/0x%jx", (uintmax_t)im.maddr, (uintmax_t)len); @@ -1673,20 +1623,20 @@ isp_pci_mbxdma(ispsoftc_t *isp) BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, len, 1, len, 0, &isp->isp_osinfo.respdmat)) { isp_prt(isp, ISP_LOGERR, "cannot create response DMA tag"); - goto bad1; + goto bad; } if (bus_dmamem_alloc(isp->isp_osinfo.respdmat, (void **)&base, BUS_DMA_COHERENT, &isp->isp_osinfo.respmap) != 0) { isp_prt(isp, ISP_LOGERR, "cannot allocate response DMA memory"); bus_dma_tag_destroy(isp->isp_osinfo.respdmat); - goto bad1; + goto bad; } isp->isp_result = base; im.error = 0; if (bus_dmamap_load(isp->isp_osinfo.respdmat, isp->isp_osinfo.respmap, base, len, imc, &im, 0) || im.error) { isp_prt(isp, ISP_LOGERR, "error loading response DMA map %d", im.error); - goto bad1; + goto bad; } isp_prt(isp, ISP_LOGDEBUG0, "response area @ 0x%jx/0x%jx", (uintmax_t)im.maddr, (uintmax_t)len); @@ -1702,13 +1652,13 @@ isp_pci_mbxdma(ispsoftc_t *isp) BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, len, 1, len, 0, &isp->isp_osinfo.atiodmat)) { isp_prt(isp, ISP_LOGERR, "cannot create ATIO DMA tag"); - goto bad1; + goto bad; } if (bus_dmamem_alloc(isp->isp_osinfo.atiodmat, (void **)&base, BUS_DMA_COHERENT, &isp->isp_osinfo.atiomap) != 0) { isp_prt(isp, ISP_LOGERR, "cannot allocate ATIO DMA memory"); bus_dma_tag_destroy(isp->isp_osinfo.atiodmat); - goto bad1; + goto bad; } isp->isp_atioq = base; im.error = 0; @@ -1754,6 +1704,7 @@ isp_pci_mbxdma(ispsoftc_t *isp) base, ISP_FC_SCRLEN, imc, &im, 0) || im.error) { bus_dmamem_free(isp->isp_osinfo.scdmat, base, fc->scmap); + FCPARAM(isp, cmap)->isp_scratch = NULL; goto bad; } FCPARAM(isp, cmap)->isp_scdma = im.maddr; @@ -1775,83 +1726,134 @@ isp_pci_mbxdma(ispsoftc_t *isp) } } + if (isp->isp_maxcmds == 0) { + ISP_LOCK(isp); + return (0); + } + +gotmaxcmds: + len = isp->isp_maxcmds * sizeof (struct isp_pcmd); + isp->isp_osinfo.pcmd_pool = (struct isp_pcmd *) + malloc(len, M_DEVBUF, M_WAITOK | M_ZERO); for (i = 0; i < isp->isp_maxcmds; i++) { struct isp_pcmd *pcmd = &isp->isp_osinfo.pcmd_pool[i]; error = bus_dmamap_create(isp->isp_osinfo.dmat, 0, &pcmd->dmap); if (error) { isp_prt(isp, ISP_LOGERR, "error %d creating per-cmd DMA maps", error); while (--i >= 0) { - bus_dmamap_destroy(isp->isp_osinfo.dmat, isp->isp_osinfo.pcmd_pool[i].dmap); + bus_dmamap_destroy(isp->isp_osinfo.dmat, + isp->isp_osinfo.pcmd_pool[i].dmap); } goto bad; } callout_init_mtx(&pcmd->wdog, &isp->isp_osinfo.lock, 0); - if (i == isp->isp_maxcmds-1) { + if (i == isp->isp_maxcmds-1) pcmd->next = NULL; - } else { + else pcmd->next = &isp->isp_osinfo.pcmd_pool[i+1]; - } } isp->isp_osinfo.pcmd_free = &isp->isp_osinfo.pcmd_pool[0]; + + len = sizeof (isp_hdl_t) * isp->isp_maxcmds; + isp->isp_xflist = (isp_hdl_t *) malloc(len, M_DEVBUF, M_WAITOK | M_ZERO); + for (len = 0; len < isp->isp_maxcmds - 1; len++) + isp->isp_xflist[len].cmd = &isp->isp_xflist[len+1]; + isp->isp_xffree = isp->isp_xflist; + ISP_LOCK(isp); return (0); bad: + isp_pci_mbxdmafree(isp); + ISP_LOCK(isp); + return (1); +} + +static void +isp_pci_mbxdmafree(ispsoftc_t *isp) +{ + int i; + + if (isp->isp_xflist != NULL) { + free(isp->isp_xflist, M_DEVBUF); + isp->isp_xflist = NULL; + } + if (isp->isp_osinfo.pcmd_pool != NULL) { + for (i = 0; i < isp->isp_maxcmds; i++) { + bus_dmamap_destroy(isp->isp_osinfo.dmat, + isp->isp_osinfo.pcmd_pool[i].dmap); + } + free(isp->isp_osinfo.pcmd_pool, M_DEVBUF); + isp->isp_osinfo.pcmd_pool = NULL; + } if (IS_FC(isp)) { - while (--cmap >= 0) { - struct isp_fc *fc = ISP_FC_PC(isp, cmap); - bus_dmamap_unload(isp->isp_osinfo.scdmat, fc->scmap); - bus_dmamem_free(isp->isp_osinfo.scdmat, - FCPARAM(isp, cmap)->isp_scratch, fc->scmap); + for (i = 0; i < isp->isp_nchan; i++) { + struct isp_fc *fc = ISP_FC_PC(isp, i); + if (FCPARAM(isp, i)->isp_scdma != 0) { + bus_dmamap_unload(isp->isp_osinfo.scdmat, + fc->scmap); + FCPARAM(isp, i)->isp_scdma = 0; + } + if (FCPARAM(isp, i)->isp_scratch != NULL) { + bus_dmamem_free(isp->isp_osinfo.scdmat, + FCPARAM(isp, i)->isp_scratch, fc->scmap); + FCPARAM(isp, i)->isp_scratch = NULL; + } while (fc->nexus_free_list) { struct isp_nexus *n = fc->nexus_free_list; fc->nexus_free_list = n->next; free(n, M_DEVBUF); } } - bus_dma_tag_destroy(isp->isp_osinfo.scdmat); - bus_dmamap_unload(isp->isp_osinfo.iocbdmat, isp->isp_osinfo.iocbmap); - bus_dmamem_free(isp->isp_osinfo.iocbdmat, isp->isp_iocb, - isp->isp_osinfo.iocbmap); - bus_dma_tag_destroy(isp->isp_osinfo.iocbdmat); - } -bad1: - if (isp->isp_rquest_dma != 0) { - bus_dmamap_unload(isp->isp_osinfo.reqdmat, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Tue Mar 14 08:12:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5012ED0B2EA; Tue, 14 Mar 2017 08:12:15 +0000 (UTC) (envelope-from dexuan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 1FBCF1715; Tue, 14 Mar 2017 08:12:15 +0000 (UTC) (envelope-from dexuan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2E8CEVk024652; Tue, 14 Mar 2017 08:12:14 GMT (envelope-from dexuan@FreeBSD.org) Received: (from dexuan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2E8CE6V024651; Tue, 14 Mar 2017 08:12:14 GMT (envelope-from dexuan@FreeBSD.org) Message-Id: <201703140812.v2E8CE6V024651@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dexuan set sender to dexuan@FreeBSD.org using -f From: Dexuan Cui Date: Tue, 14 Mar 2017 08:12:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315235 - head/sys/boot/efi/loader X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 08:12:15 -0000 Author: dexuan Date: Tue Mar 14 08:12:14 2017 New Revision: 315235 URL: https://svnweb.freebsd.org/changeset/base/315235 Log: loader.efi: use stricter check for Hyper-V Some other hypervisors like Xen can pretend to be Hyper-V but obviously they can't implement all Hyper-V features. Let's make sure we're genuine Hyper-V here. Also fix some minor coding style issues. PR: 211746 MFC after: 2 weeks Sponsored by: Microsoft Modified: head/sys/boot/efi/loader/copy.c Modified: head/sys/boot/efi/loader/copy.c ============================================================================== --- head/sys/boot/efi/loader/copy.c Tue Mar 14 08:03:56 2017 (r315234) +++ head/sys/boot/efi/loader/copy.c Tue Mar 14 08:12:14 2017 (r315235) @@ -52,8 +52,11 @@ __FBSDID("$FreeBSD$"); #define CPUID_LEAF_HV_FEATURES 0x40000003 #define CPUID_LEAF_HV_LIMITS 0x40000005 #define CPUID_HV_IFACE_HYPERV 0x31237648 /* HV#1 */ +#define CPUID_HV_MSR_TIME_REFCNT 0x0002 /* MSR_HV_TIME_REF_COUNT */ #define CPUID_HV_MSR_HYPERCALL 0x0020 -static int running_on_hyperv(void) + +static int +running_on_hyperv(void) { char hv_vendor[16]; uint32_t regs[4]; @@ -80,6 +83,8 @@ static int running_on_hyperv(void) do_cpuid(CPUID_LEAF_HV_FEATURES, regs); if ((regs[0] & CPUID_HV_MSR_HYPERCALL) == 0) return (0); + if ((regs[0] & CPUID_HV_MSR_TIME_REFCNT) == 0) + return (0); return (1); } @@ -157,7 +162,7 @@ efi_verify_staging_size(unsigned long *n out: free(map); } -#endif +#endif /* __i386__ || __amd64__ */ #ifndef EFI_STAGING_SIZE #define EFI_STAGING_SIZE 64 From owner-svn-src-head@freebsd.org Tue Mar 14 08:45:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D92A8D0A540; Tue, 14 Mar 2017 08:45:34 +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 mx1.freebsd.org (Postfix) with ESMTPS id A62511E03; Tue, 14 Mar 2017 08:45:34 +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 v2E8jXp7037000; Tue, 14 Mar 2017 08:45:33 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2E8jX4A036999; Tue, 14 Mar 2017 08:45:33 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703140845.v2E8jX4A036999@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 14 Mar 2017 08:45:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315236 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 08:45:35 -0000 Author: mav Date: Tue Mar 14 08:45:33 2017 New Revision: 315236 URL: https://svnweb.freebsd.org/changeset/base/315236 Log: Remove dangerous and questionable isp_mboxcmd_qnw() call. MFC after: 2 weeks Modified: head/sys/dev/isp/isp.c Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Tue Mar 14 08:12:14 2017 (r315235) +++ head/sys/dev/isp/isp.c Tue Mar 14 08:45:33 2017 (r315236) @@ -6503,20 +6503,8 @@ isp_parse_status(ispsoftc_t *isp, ispsta isp_prt(isp, ISP_LOGINFO, "port %s for target %d", reason, XS_TGT(xs)); - /* - * If we're on a local loop, force a LIP (which is overkill) - * to force a re-login of this unit. If we're on fabric, - * then we'll have to log in again as a matter of course. - */ - if (fcp->isp_topo == TOPO_NL_PORT || - fcp->isp_topo == TOPO_FL_PORT) { - mbreg_t mbs; - MBSINIT(&mbs, MBOX_INIT_LIP, MBLOGALL, 0); - if (ISP_CAP_2KLOGIN(isp)) { - mbs.ibits = (1 << 10); - } - isp_mboxcmd_qnw(isp, &mbs, 1); - } + /* XXX: Should we trigger rescan or FW announce change? */ + if (XS_NOERR(xs)) { lp = &fcp->portdb[XS_TGT(xs)]; if (lp->state == FC_PORTDB_STATE_ZOMBIE) { @@ -6664,9 +6652,8 @@ isp_parse_status_24xx(ispsoftc_t *isp, i isp_prt(isp, ISP_LOGINFO, "Chan %d port %s for target %d", chan, reason, XS_TGT(xs)); - /* - * There is no MBOX_INIT_LIP for the 24XX. - */ + /* XXX: Should we trigger rescan or FW announce change? */ + if (XS_NOERR(xs)) { lp = &fcp->portdb[XS_TGT(xs)]; if (lp->state == FC_PORTDB_STATE_ZOMBIE) { From owner-svn-src-head@freebsd.org Tue Mar 14 08:45:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 307F9D0A58E; Tue, 14 Mar 2017 08:45:54 +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 mx1.freebsd.org (Postfix) with ESMTPS id 003A31F53; Tue, 14 Mar 2017 08:45:53 +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 v2E8jrcI037058; Tue, 14 Mar 2017 08:45:53 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2E8jrh5037057; Tue, 14 Mar 2017 08:45:53 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201703140845.v2E8jrh5037057@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 14 Mar 2017 08:45:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315237 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 08:45:54 -0000 Author: kib Date: Tue Mar 14 08:45:52 2017 New Revision: 315237 URL: https://svnweb.freebsd.org/changeset/base/315237 Log: Hide kev_iovlen() definition under #ifdef KTRACE, fixing build of kernel configs without KTRACE. Reported by: rpokala Sponsored by: The FreeBSD Foundation MFC after: 4 days Modified: head/sys/kern/kern_event.c Modified: head/sys/kern/kern_event.c ============================================================================== --- head/sys/kern/kern_event.c Tue Mar 14 08:45:33 2017 (r315236) +++ head/sys/kern/kern_event.c Tue Mar 14 08:45:52 2017 (r315237) @@ -887,6 +887,7 @@ kern_kqueue(struct thread *td, int flags return (0); } +#ifdef KTRACE static size_t kev_iovlen(int n, u_int kgio) { @@ -895,6 +896,7 @@ kev_iovlen(int n, u_int kgio) return (kgio); return (n * sizeof(struct kevent)); } +#endif #ifndef _SYS_SYSPROTO_H_ struct kevent_args { From owner-svn-src-head@freebsd.org Tue Mar 14 09:25:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5AA37D0B983; Tue, 14 Mar 2017 09:25:03 +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 mx1.freebsd.org (Postfix) with ESMTPS id 1F49E1B26; Tue, 14 Mar 2017 09:25:03 +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 v2E9P2gp053876; Tue, 14 Mar 2017 09:25:02 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2E9P2Oh053874; Tue, 14 Mar 2017 09:25:02 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201703140925.v2E9P2Oh053874@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 14 Mar 2017 09:25:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315238 - in head/sys: compat/freebsd32 kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 09:25:03 -0000 Author: kib Date: Tue Mar 14 09:25:01 2017 New Revision: 315238 URL: https://svnweb.freebsd.org/changeset/base/315238 Log: Use designated initializers for kevent_copyops. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/compat/freebsd32/freebsd32_misc.c head/sys/kern/kern_event.c Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Tue Mar 14 08:45:52 2017 (r315237) +++ head/sys/compat/freebsd32/freebsd32_misc.c Tue Mar 14 09:25:01 2017 (r315238) @@ -651,9 +651,11 @@ freebsd32_kevent(struct thread *td, stru { struct timespec32 ts32; struct timespec ts, *tsp; - struct kevent_copyops k_ops = { uap, - freebsd32_kevent_copyout, - freebsd32_kevent_copyin}; + struct kevent_copyops k_ops = { + .arg = uap, + .k_copyout = freebsd32_kevent_copyout, + .k_copyin = freebsd32_kevent_copyin, + }; int error; Modified: head/sys/kern/kern_event.c ============================================================================== --- head/sys/kern/kern_event.c Tue Mar 14 08:45:52 2017 (r315237) +++ head/sys/kern/kern_event.c Tue Mar 14 09:25:01 2017 (r315238) @@ -912,9 +912,11 @@ int sys_kevent(struct thread *td, struct kevent_args *uap) { struct timespec ts, *tsp; - struct kevent_copyops k_ops = { uap, - kevent_copyout, - kevent_copyin}; + struct kevent_copyops k_ops = { + .arg = uap, + .k_copyout = kevent_copyout, + .k_copyin = kevent_copyin, + }; int error; #ifdef KTRACE struct uio ktruio; From owner-svn-src-head@freebsd.org Tue Mar 14 12:39:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1F3FD0A849; Tue, 14 Mar 2017 12:39:20 +0000 (UTC) (envelope-from amdmi3@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 76C531D6D; Tue, 14 Mar 2017 12:39:20 +0000 (UTC) (envelope-from amdmi3@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2ECdJxn033067; Tue, 14 Mar 2017 12:39:19 GMT (envelope-from amdmi3@FreeBSD.org) Received: (from amdmi3@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2ECdJQt033066; Tue, 14 Mar 2017 12:39:19 GMT (envelope-from amdmi3@FreeBSD.org) Message-Id: <201703141239.v2ECdJQt033066@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: amdmi3 set sender to amdmi3@FreeBSD.org using -f From: Dmitry Marakasov Date: Tue, 14 Mar 2017 12:39:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315242 - head/sbin/swapon X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 12:39:20 -0000 Author: amdmi3 (ports committer) Date: Tue Mar 14 12:39:19 2017 New Revision: 315242 URL: https://svnweb.freebsd.org/changeset/base/315242 Log: Fix late and noauto with geli swap With the following in /etc/fstab: /dev/gpt/swap.eli none swap sw,late 0 0 swap will not be enabled, with `swapon -aL' complaining: swapon: Invalid option: late This happens because swap_on_geli_args() which parses geli arguments out of all mount options does not expect late or noauto among them. Fix this by explicitly allowing these arguments. Reviewed by: jilles Approved by: jilles MFC after: 2 weeks Differential Revision: D9835 Modified: head/sbin/swapon/swapon.c Modified: head/sbin/swapon/swapon.c ============================================================================== --- head/sbin/swapon/swapon.c Tue Mar 14 10:09:50 2017 (r315241) +++ head/sbin/swapon/swapon.c Tue Mar 14 12:39:19 2017 (r315242) @@ -375,8 +375,12 @@ swap_on_geli_args(const char *mntops) free(ops); return (NULL); } - } else if ((p = strstr(token, "notrim")) == token) { + } else if (strcmp(token, "notrim") == 0) { Tflag = " -T "; + } else if (strcmp(token, "late") == 0) { + /* ignore known option */ + } else if (strcmp(token, "noauto") == 0) { + /* ignore known option */ } else if (strcmp(token, "sw") != 0) { warnx("Invalid option: %s", token); free(ops); From owner-svn-src-head@freebsd.org Tue Mar 14 13:54:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2009D0C7D0; Tue, 14 Mar 2017 13:54:19 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 8AB811113; Tue, 14 Mar 2017 13:54:19 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2EDsI9G066105; Tue, 14 Mar 2017 13:54:18 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2EDsIFu066104; Tue, 14 Mar 2017 13:54:18 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201703141354.v2EDsIFu066104@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Tue, 14 Mar 2017 13:54:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315243 - head/sys/dev/bnxt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 13:54:20 -0000 Author: sbruno Date: Tue Mar 14 13:54:18 2017 New Revision: 315243 URL: https://svnweb.freebsd.org/changeset/base/315243 Log: Restore changes for RSS routing improvements made in 314369 that were reverted in the IFLIB update I made in 315217. Submitted by: Venkat Duvvuru Modified: head/sys/dev/bnxt/bnxt_txrx.c Modified: head/sys/dev/bnxt/bnxt_txrx.c ============================================================================== --- head/sys/dev/bnxt/bnxt_txrx.c Tue Mar 14 12:39:19 2017 (r315242) +++ head/sys/dev/bnxt/bnxt_txrx.c Tue Mar 14 13:54:18 2017 (r315243) @@ -426,6 +426,37 @@ cmpl_invalid: return avail; } +static void +bnxt_set_rsstype(if_rxd_info_t ri, uint8_t rss_hash_type) +{ + uint8_t rss_profile_id; + + rss_profile_id = BNXT_GET_RSS_PROFILE_ID(rss_hash_type); + switch (rss_profile_id) { + case BNXT_RSS_HASH_TYPE_TCPV4: + ri->iri_rsstype = M_HASHTYPE_RSS_TCP_IPV4; + break; + case BNXT_RSS_HASH_TYPE_UDPV4: + ri->iri_rsstype = M_HASHTYPE_RSS_UDP_IPV4; + break; + case BNXT_RSS_HASH_TYPE_IPV4: + ri->iri_rsstype = M_HASHTYPE_RSS_IPV4; + break; + case BNXT_RSS_HASH_TYPE_TCPV6: + ri->iri_rsstype = M_HASHTYPE_RSS_TCP_IPV6; + break; + case BNXT_RSS_HASH_TYPE_UDPV6: + ri->iri_rsstype = M_HASHTYPE_RSS_UDP_IPV6; + break; + case BNXT_RSS_HASH_TYPE_IPV6: + ri->iri_rsstype = M_HASHTYPE_RSS_IPV6; + break; + default: + ri->iri_rsstype = M_HASHTYPE_OPAQUE; + break; + } +} + static int bnxt_pkt_get_l2(struct bnxt_softc *softc, if_rxd_info_t ri, struct bnxt_cp_ring *cpr, uint16_t flags_type) @@ -443,13 +474,7 @@ bnxt_pkt_get_l2(struct bnxt_softc *softc /* Extract from the first 16-byte BD */ if (flags_type & RX_PKT_CMPL_FLAGS_RSS_VALID) { ri->iri_flowid = le32toh(rcp->rss_hash); - /* - * TODO: Extract something useful from rcp->rss_hash_type - * (undocumented) - * May be documented in the "LSI ES" - * also check the firmware code. - */ - ri->iri_rsstype = M_HASHTYPE_OPAQUE; + bnxt_set_rsstype(ri, rcp->rss_hash_type); } else { ri->iri_rsstype = M_HASHTYPE_NONE; @@ -529,13 +554,7 @@ bnxt_pkt_get_tpa(struct bnxt_softc *soft /* Extract from the first 16-byte BD */ if (le16toh(tpas->low.flags_type) & RX_TPA_START_CMPL_FLAGS_RSS_VALID) { ri->iri_flowid = le32toh(tpas->low.rss_hash); - /* - * TODO: Extract something useful from tpas->low.rss_hash_type - * (undocumented) - * May be documented in the "LSI ES" - * also check the firmware code. - */ - ri->iri_rsstype = M_HASHTYPE_OPAQUE; + bnxt_set_rsstype(ri, tpas->low.rss_hash_type); } else { ri->iri_rsstype = M_HASHTYPE_NONE; From owner-svn-src-head@freebsd.org Tue Mar 14 14:02:48 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C31E1D0C9D5; Tue, 14 Mar 2017 14:02:48 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9255D1632; Tue, 14 Mar 2017 14:02:48 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2EE2lsw070154; Tue, 14 Mar 2017 14:02:47 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2EE2lWV070153; Tue, 14 Mar 2017 14:02:47 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201703141402.v2EE2lWV070153@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 14 Mar 2017 14:02:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315244 - head/sys/compat/linuxkpi/common/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 14:02:48 -0000 Author: hselasky Date: Tue Mar 14 14:02:47 2017 New Revision: 315244 URL: https://svnweb.freebsd.org/changeset/base/315244 Log: Set "current" pointer for LinuxKPI interrupts and timer callbacks. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Tue Mar 14 13:54:18 2017 (r315243) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Tue Mar 14 14:02:47 2017 (r315244) @@ -999,6 +999,8 @@ linux_timer_callback_wrapper(void *conte { struct timer_list *timer; + linux_set_current(curthread); + timer = context; timer->function(timer->data); } @@ -1343,6 +1345,8 @@ linux_irq_handler(void *ent) { struct irq_ent *irqe; + linux_set_current(curthread); + irqe = ent; irqe->handler(irqe->irq, irqe->arg); } From owner-svn-src-head@freebsd.org Tue Mar 14 15:08:58 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48914D0BC1B; Tue, 14 Mar 2017 15:08:58 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 1833F1A9E; Tue, 14 Mar 2017 15:08:58 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2EF8vaX095222; Tue, 14 Mar 2017 15:08:57 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2EF8vLk095221; Tue, 14 Mar 2017 15:08:57 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201703141508.v2EF8vLk095221@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Tue, 14 Mar 2017 15:08:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315245 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 15:08:58 -0000 Author: sbruno Date: Tue Mar 14 15:08:56 2017 New Revision: 315245 URL: https://svnweb.freebsd.org/changeset/base/315245 Log: Fixup LINT by using uint64_t type as we do on all other calls to PNMB() Found with Jenkins. Reported by: lwshu Sponsored by: Limelight Networks Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Tue Mar 14 14:02:47 2017 (r315244) +++ head/sys/net/iflib.c Tue Mar 14 15:08:56 2017 (r315245) @@ -860,7 +860,7 @@ iflib_netmap_txsync(struct netmap_kring for (n = 0; nm_i != head; n++) { struct netmap_slot *slot = &ring->slot[nm_i]; u_int len = slot->len; - vm_paddr_t paddr; + uint64_t paddr; void *addr = PNMB(na, slot, &paddr); int flags = (slot->flags & NS_REPORT || nic_i == 0 || nic_i == report_frequency) ? From owner-svn-src-head@freebsd.org Tue Mar 14 16:06:58 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA0E4D0CC77; Tue, 14 Mar 2017 16:06:58 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 8ABA6F9C; Tue, 14 Mar 2017 16:06:58 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2EG6vaH022436; Tue, 14 Mar 2017 16:06:57 GMT (envelope-from fabient@FreeBSD.org) Received: (from fabient@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2EG6vDf022435; Tue, 14 Mar 2017 16:06:57 GMT (envelope-from fabient@FreeBSD.org) Message-Id: <201703141606.v2EG6vDf022435@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fabient set sender to fabient@FreeBSD.org using -f From: Fabien Thomas Date: Tue, 14 Mar 2017 16:06:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315270 - in head/sys: arm/include dev/hwpmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 16:06:58 -0000 Author: fabient Date: Tue Mar 14 16:06:57 2017 New Revision: 315270 URL: https://svnweb.freebsd.org/changeset/base/315270 Log: Fix arm stack frame walking support: - Adjust stack offset for Clang - Correctly fill registers for fake stack frame (soft PMC) MFC after: 1 week Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D7396 Modified: head/sys/arm/include/pmc_mdep.h head/sys/dev/hwpmc/hwpmc_arm.c Modified: head/sys/arm/include/pmc_mdep.h ============================================================================== --- head/sys/arm/include/pmc_mdep.h Tue Mar 14 16:01:36 2017 (r315269) +++ head/sys/arm/include/pmc_mdep.h Tue Mar 14 16:06:57 2017 (r315270) @@ -70,7 +70,9 @@ union pmc_md_pmc { /* Build a fake kernel trapframe from current instruction pointer. */ #define PMC_FAKE_TRAPFRAME(TF) \ do { \ + (TF)->tf_spsr = PSR_SVC32_MODE; \ __asm __volatile("mov %0, pc" : "=r" ((TF)->tf_pc)); \ + __asm __volatile("mov %0, r11" : "=r" ((TF)->tf_r11)); \ } while (0) /* Modified: head/sys/dev/hwpmc/hwpmc_arm.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_arm.c Tue Mar 14 16:01:36 2017 (r315269) +++ head/sys/dev/hwpmc/hwpmc_arm.c Tue Mar 14 16:06:57 2017 (r315270) @@ -42,6 +42,17 @@ __FBSDID("$FreeBSD$"); #include #include +/* XXX: Userland code compiled with gcc will need an heuristic + * to be correctly detected. + */ +#ifdef __clang__ +#define PC_OFF 1 +#define FP_OFF 0 +#else +#define PC_OFF -1 +#define FP_OFF -3 +#endif + struct pmc_mdep * pmc_md_initialize() { @@ -100,7 +111,7 @@ pmc_save_kernel_callchain(uintptr_t *cc, for (count = 1; count < maxsamples; count++) { /* Use saved lr as pc. */ - r = fp - sizeof(uintptr_t); + r = fp + PC_OFF * sizeof(uintptr_t); if (!PMC_IN_KERNEL_STACK(r, stackstart, stackend)) break; pc = *(uintptr_t *)r; @@ -110,7 +121,7 @@ pmc_save_kernel_callchain(uintptr_t *cc, *cc++ = pc; /* Switch to next frame up */ - r = fp - 3 * sizeof(uintptr_t); + r = fp + FP_OFF * sizeof(uintptr_t); if (!PMC_IN_KERNEL_STACK(r, stackstart, stackend)) break; fp = *(uintptr_t *)r; @@ -147,7 +158,7 @@ pmc_save_user_callchain(uintptr_t *cc, i for (count = 1; count < maxsamples; count++) { /* Use saved lr as pc. */ - r = fp - sizeof(uintptr_t); + r = fp + PC_OFF * sizeof(uintptr_t); if (copyin((void *)r, &pc, sizeof(pc)) != 0) break; if (!PMC_IN_USERSPACE(pc)) @@ -157,7 +168,7 @@ pmc_save_user_callchain(uintptr_t *cc, i /* Switch to next frame up */ oldfp = fp; - r = fp - 3 * sizeof(uintptr_t); + r = fp + FP_OFF * sizeof(uintptr_t); if (copyin((void *)r, &fp, sizeof(fp)) != 0) break; if (fp < oldfp || !PMC_IN_USERSPACE(fp)) From owner-svn-src-head@freebsd.org Tue Mar 14 16:25:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1861D0C25C; Tue, 14 Mar 2017 16:25:51 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from mr11p00im-asmtp004.me.com (mr11p00im-asmtp004.me.com [17.110.69.135]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9784C1C95; Tue, 14 Mar 2017 16:25:51 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from process-dkim-sign-daemon.mr11p00im-asmtp004.me.com by mr11p00im-asmtp004.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) id <0OMT00C00BEF1J00@mr11p00im-asmtp004.me.com>; Tue, 14 Mar 2017 16:25:35 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mac.com; s=4d515a; t=1489508735; bh=4Ve47TK45GGt15559BFHgzh5qWVfw59ttbLmdV4yEqg=; h=Date:Subject:From:To:Message-id:MIME-version:Content-type; b=DU2cWfC1OI6wbzbZBLi5HsLjijgLrXWHI/o9w+T7M7m+EDvi79HbrdgA5azmNU3LJ Nu0Xg/jUsx0OcTH0QCrwHN6fLHJz61C5tFjI2o0AxGpp+mNGp1hTqxLnIRhR1LLvIS IJJT4uzxDKDJCVmblpt16zeOUO1psh0TDlxF+vXgDaz9E2a2/V/y8vnYOF++VobCQG E8ZleMsDUIDt/Xeu0X7NDhR5y411PP7z3zQBT2Vof0WschN7OzL3+WMMeb/J5NjsM0 AHAgkostlsuUOagxUmyhJxtHS5148sZ7MuyO9JgEUSQxUjY2lmyBLs7KiX1kxMfay2 hNqyjcCk9jQ6g== Received: from icloud.com ([127.0.0.1]) by mr11p00im-asmtp004.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) with ESMTPSA id <0OMT00JYQCALGA30@mr11p00im-asmtp004.me.com>; Tue, 14 Mar 2017 16:25:34 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-03-14_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1034 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1701120000 definitions=main-1703140127 User-Agent: Microsoft-MacOutlook/f.1f.0.170216 Date: Tue, 14 Mar 2017 09:25:32 -0700 Subject: Re: svn commit: r315245 - head/sys/net From: Ravi Pokala Sender: "Pokala, Ravi" To: Sean Bruno , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-id: <48897A80-CB0A-425E-8AA7-C1DD7FCFB566@panasas.com> Thread-topic: svn commit: r315245 - head/sys/net References: <201703141508.v2EF8vLk095221@repo.freebsd.org> In-reply-to: <201703141508.v2EF8vLk095221@repo.freebsd.org> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 16:25:51 -0000 Hi Sean, A few MIPS (XLPN32, XLRN32), and PowerPC (MPC85XX, MPC85XXSPE) configs are still broken: --- iflib.o --- cc1: warnings being treated as errors /usr/home/rpokala/freebsd/clean/base/head/sys/net/iflib.c: In function 'calc_next_rxd': /usr/home/rpokala/freebsd/clean/base/head/sys/net/iflib.c:2280: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] /usr/home/rpokala/freebsd/clean/base/head/sys/net/iflib.c:2280: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] /usr/home/rpokala/freebsd/clean/base/head/sys/net/iflib.c: In function 'calc_next_txd': /usr/home/rpokala/freebsd/clean/base/head/sys/net/iflib.c:2990: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] /usr/home/rpokala/freebsd/clean/base/head/sys/net/iflib.c:2990: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] *** [iflib.o] Error code 1 Thanks, Ravi (rpokala@) -----Original Message----- From: on behalf of Sean Bruno Date: 2017-03-14, Tuesday at 08:08 To: , , Subject: svn commit: r315245 - head/sys/net Author: sbruno Date: Tue Mar 14 15:08:56 2017 New Revision: 315245 URL: https://svnweb.freebsd.org/changeset/base/315245 Log: Fixup LINT by using uint64_t type as we do on all other calls to PNMB() Found with Jenkins. Reported by: lwshu Sponsored by: Limelight Networks Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Tue Mar 14 14:02:47 2017 (r315244) +++ head/sys/net/iflib.c Tue Mar 14 15:08:56 2017 (r315245) @@ -860,7 +860,7 @@ iflib_netmap_txsync(struct netmap_kring for (n = 0; nm_i != head; n++) { struct netmap_slot *slot = &ring->slot[nm_i]; u_int len = slot->len; - vm_paddr_t paddr; + uint64_t paddr; void *addr = PNMB(na, slot, &paddr); int flags = (slot->flags & NS_REPORT || nic_i == 0 || nic_i == report_frequency) ? From owner-svn-src-head@freebsd.org Tue Mar 14 16:40:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2AF1D0C5ED; Tue, 14 Mar 2017 16:40:19 +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 mx1.freebsd.org (Postfix) with ESMTPS id AFA12645; Tue, 14 Mar 2017 16:40:19 +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 v2EGeIAY035216; Tue, 14 Mar 2017 16:40:18 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2EGeIG6035215; Tue, 14 Mar 2017 16:40:18 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201703141640.v2EGeIG6035215@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 14 Mar 2017 16:40:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315271 - head/usr.sbin/makefs/ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 16:40:20 -0000 Author: emaste Date: Tue Mar 14 16:40:18 2017 New Revision: 315271 URL: https://svnweb.freebsd.org/changeset/base/315271 Log: makefs: remove unused variable NetBSD revisions: mkfs.c 1.32 Obtained from: NetBSD Modified: head/usr.sbin/makefs/ffs/mkfs.c Modified: head/usr.sbin/makefs/ffs/mkfs.c ============================================================================== --- head/usr.sbin/makefs/ffs/mkfs.c Tue Mar 14 16:06:57 2017 (r315270) +++ head/usr.sbin/makefs/ffs/mkfs.c Tue Mar 14 16:40:18 2017 (r315271) @@ -119,7 +119,7 @@ ffs_mkfs(const char *fsys, const fsinfo_ int32_t cylno, i, csfrags; long long sizepb; void *space; - int size, blks; + int size; int nprintcols, printcolwidth; ffs_opt_t *ffs_opts = fsopts->fs_specific; @@ -400,7 +400,6 @@ ffs_mkfs(const char *fsys, const fsinfo_ * Cribbed from ffs_mountfs(). */ size = sblock.fs_cssize; - blks = howmany(size, sblock.fs_fsize); if (sblock.fs_contigsumsize > 0) size += sblock.fs_ncg * sizeof(int32_t); if ((space = (char *)calloc(1, size)) == NULL) From owner-svn-src-head@freebsd.org Tue Mar 14 16:43:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B3C8D0C7F6; Tue, 14 Mar 2017 16:43:29 +0000 (UTC) (envelope-from sbruno@freebsd.org) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (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 E06BFCC1; Tue, 14 Mar 2017 16:43:28 +0000 (UTC) (envelope-from sbruno@freebsd.org) Received: from [192.168.0.6] (75-173-99-247.albq.qwest.net [75.173.99.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id 5F5521928BA; Tue, 14 Mar 2017 16:43:25 +0000 (UTC) Subject: Re: svn commit: r315245 - head/sys/net To: Ravi Pokala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201703141508.v2EF8vLk095221@repo.freebsd.org> <48897A80-CB0A-425E-8AA7-C1DD7FCFB566@panasas.com> From: Sean Bruno Message-ID: Date: Tue, 14 Mar 2017 10:43:22 -0600 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <48897A80-CB0A-425E-8AA7-C1DD7FCFB566@panasas.com> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="cWXfFKsTwERS3Wo7msHNa1gM9kc0r3PTn" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 16:43:29 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --cWXfFKsTwERS3Wo7msHNa1gM9kc0r3PTn Content-Type: multipart/mixed; boundary="tcCqRDAvUUOluaWctRrppcQD8mHnUUhCR"; protected-headers="v1" From: Sean Bruno To: Ravi Pokala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r315245 - head/sys/net References: <201703141508.v2EF8vLk095221@repo.freebsd.org> <48897A80-CB0A-425E-8AA7-C1DD7FCFB566@panasas.com> In-Reply-To: <48897A80-CB0A-425E-8AA7-C1DD7FCFB566@panasas.com> --tcCqRDAvUUOluaWctRrppcQD8mHnUUhCR Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 03/14/17 10:25, Ravi Pokala wrote: > Hi Sean, >=20 > A few MIPS (XLPN32, XLRN32), and PowerPC (MPC85XX, MPC85XXSPE) configs = are still broken: >=20 > --- iflib.o --- > cc1: warnings being treated as errors > /usr/home/rpokala/freebsd/clean/base/head/sys/net/iflib.c: In funct= ion 'calc_next_rxd': > /usr/home/rpokala/freebsd/clean/base/head/sys/net/iflib.c:2280: war= ning: cast from pointer to integer of different size [-Wpointer-to-int-ca= st] > /usr/home/rpokala/freebsd/clean/base/head/sys/net/iflib.c:2280: war= ning: cast to pointer from integer of different size [-Wint-to-pointer-ca= st] > /usr/home/rpokala/freebsd/clean/base/head/sys/net/iflib.c: In funct= ion 'calc_next_txd': > /usr/home/rpokala/freebsd/clean/base/head/sys/net/iflib.c:2990: war= ning: cast from pointer to integer of different size [-Wpointer-to-int-ca= st] > /usr/home/rpokala/freebsd/clean/base/head/sys/net/iflib.c:2990: war= ning: cast to pointer from integer of different size [-Wint-to-pointer-ca= st] > *** [iflib.o] Error code 1 >=20 > Thanks, >=20 > Ravi (rpokala@) >=20 Hrm. Ok. Will fixup directly. sean > -----Original Message----- > From: on behalf of Sean Bruno > Date: 2017-03-14, Tuesday at 08:08 > To: , , > Subject: svn commit: r315245 - head/sys/net >=20 > Author: sbruno > Date: Tue Mar 14 15:08:56 2017 > New Revision: 315245 > URL: https://svnweb.freebsd.org/changeset/base/315245 >=20 > Log: > Fixup LINT by using uint64_t type as we do on all other calls to PNMB= () > =20 > Found with Jenkins. > =20 > Reported by: lwshu > Sponsored by: Limelight Networks >=20 > Modified: > head/sys/net/iflib.c >=20 > Modified: head/sys/net/iflib.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/net/iflib.c Tue Mar 14 14:02:47 2017 (r315244) > +++ head/sys/net/iflib.c Tue Mar 14 15:08:56 2017 (r315245) > @@ -860,7 +860,7 @@ iflib_netmap_txsync(struct netmap_kring=20 > for (n =3D 0; nm_i !=3D head; n++) { > struct netmap_slot *slot =3D &ring->slot[nm_i]; > u_int len =3D slot->len; > - vm_paddr_t paddr; > + uint64_t paddr; > void *addr =3D PNMB(na, slot, &paddr); > int flags =3D (slot->flags & NS_REPORT || > nic_i =3D=3D 0 || nic_i =3D=3D report_frequency) ? >=20 >=20 >=20 >=20 >=20 --tcCqRDAvUUOluaWctRrppcQD8mHnUUhCR-- --cWXfFKsTwERS3Wo7msHNa1gM9kc0r3PTn Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQGTBAEBCgB9FiEEuq1GMucSHejSCZfdEgHvyh5yfmQFAljIHa1fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEJB QUQ0NjMyRTcxMjFERThEMjA5OTdERDEyMDFFRkNBMUU3MjdFNjQACgkQEgHvyh5y fmSSLwgAvmII3FbzPzdr2SGVHrvEO3oMpZz8T6j4pY8r2dlIvxWFofdZz8fAikVF TOK1RoeLiPUlCx+olcjlwi6zsE47eLEqmKB2J35/2g2dhmLgsCaUEGqN/vzXBUBx 7m44T58VNZlYyLtQkDz3f7v8Gu+BC9wYkGJmYE+WGMivSHqd/9Zk/dlVoU6soHna f6e1VSribVgCxuD8h2QpoIEnl1yeyxgU2Fh0fSTFy1sZYG8Qvzht5kWnw+UobhAe BoEi/Rj/F024ORxceGThcLACJ6OwGibKug8eZAS42XuS0vBDVZEoIowDCRq3lvTJ FK46546n898fLDTbgCQe/7xJ6SofEA== =Op/1 -----END PGP SIGNATURE----- --cWXfFKsTwERS3Wo7msHNa1gM9kc0r3PTn-- From owner-svn-src-head@freebsd.org Tue Mar 14 17:10:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26AD9D0C1C2; Tue, 14 Mar 2017 17:10:44 +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 mx1.freebsd.org (Postfix) with ESMTPS id F2ECC1BB4; Tue, 14 Mar 2017 17:10:43 +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 v2EHAhF4047603; Tue, 14 Mar 2017 17:10:43 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2EHAgxB047599; Tue, 14 Mar 2017 17:10:42 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201703141710.v2EHAgxB047599@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 14 Mar 2017 17:10:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315272 - in head: lib/libc/sys sys/sys sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 17:10:44 -0000 Author: delphij Date: Tue Mar 14 17:10:42 2017 New Revision: 315272 URL: https://svnweb.freebsd.org/changeset/base/315272 Log: Implement INHERIT_ZERO for minherit(2). INHERIT_ZERO is an OpenBSD feature. When a page is marked as such, it would be zeroed upon fork(). This would be used in new arc4random(3) functions. PR: 182610 Reviewed by: kib (earlier version) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D427 Modified: head/lib/libc/sys/minherit.2 head/sys/sys/mman.h head/sys/vm/vm.h head/sys/vm/vm_map.c Modified: head/lib/libc/sys/minherit.2 ============================================================================== --- head/lib/libc/sys/minherit.2 Tue Mar 14 16:40:18 2017 (r315271) +++ head/lib/libc/sys/minherit.2 Tue Mar 14 17:10:42 2017 (r315272) @@ -29,7 +29,7 @@ .\" .\" @(#)minherit.2 8.1 (Berkeley) 6/9/93 .\" -.Dd October 30, 2007 +.Dd March 15, 2017 .Dt MINHERIT 2 .Os .Sh NAME @@ -91,6 +91,11 @@ it will no longer be shared in the paren after the parent forks and there is no way to get the previous shared-backing-store mapping without unmapping and remapping the address space in the parent. +.It Dv INHERIT_ZERO +This option causes the address space in question to be mapped as new +anonymous pages, +which would be initialized to all zero bytes, +in the child process. .El .Sh RETURN VALUES .Rv -std minherit @@ -130,6 +135,13 @@ system call first appeared in .Ox and then in .Fx 2.2 . +.Pp +The +.Dv INHERIT_ZERO +support first appeared in +.Ox 5.6 +and then in +.Fx 12.0 . .Sh BUGS Once you set inheritance to .Dv MAP_PRIVATE Modified: head/sys/sys/mman.h ============================================================================== --- head/sys/sys/mman.h Tue Mar 14 16:40:18 2017 (r315271) +++ head/sys/sys/mman.h Tue Mar 14 17:10:42 2017 (r315272) @@ -43,6 +43,7 @@ #define INHERIT_SHARE 0 #define INHERIT_COPY 1 #define INHERIT_NONE 2 +#define INHERIT_ZERO 3 #endif /* Modified: head/sys/vm/vm.h ============================================================================== --- head/sys/vm/vm.h Tue Mar 14 16:40:18 2017 (r315271) +++ head/sys/vm/vm.h Tue Mar 14 17:10:42 2017 (r315272) @@ -68,6 +68,7 @@ typedef char vm_inherit_t; /* inheritanc #define VM_INHERIT_SHARE ((vm_inherit_t) 0) #define VM_INHERIT_COPY ((vm_inherit_t) 1) #define VM_INHERIT_NONE ((vm_inherit_t) 2) +#define VM_INHERIT_ZERO ((vm_inherit_t) 3) #define VM_INHERIT_DEFAULT VM_INHERIT_COPY typedef u_char vm_prot_t; /* protection codes */ Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Tue Mar 14 16:40:18 2017 (r315271) +++ head/sys/vm/vm_map.c Tue Mar 14 17:10:42 2017 (r315272) @@ -2285,6 +2285,7 @@ vm_map_inherit(vm_map_t map, vm_offset_t case VM_INHERIT_NONE: case VM_INHERIT_COPY: case VM_INHERIT_SHARE: + case VM_INHERIT_ZERO: break; default: return (KERN_INVALID_ARGUMENT); @@ -3443,6 +3444,36 @@ vmspace_fork(struct vmspace *vm1, vm_oof vm_map_copy_entry(old_map, new_map, old_entry, new_entry, fork_charge); break; + + case VM_INHERIT_ZERO: + /* + * Create a new anonymous mapping entry modelled from + * the old one. + */ + new_entry = vm_map_entry_create(new_map); + memset(new_entry, 0, sizeof(*new_entry)); + + new_entry->start = old_entry->start; + new_entry->end = old_entry->end; + new_entry->avail_ssize = old_entry->avail_ssize; + new_entry->adj_free = old_entry->adj_free; + new_entry->max_free = old_entry->max_free; + new_entry->eflags = old_entry->eflags & + ~(MAP_ENTRY_USER_WIRED | MAP_ENTRY_IN_TRANSITION | + MAP_ENTRY_VN_WRITECNT); + new_entry->protection = old_entry->protection; + new_entry->max_protection = old_entry->max_protection; + new_entry->inheritance = VM_INHERIT_ZERO; + + vm_map_entry_link(new_map, new_map->header.prev, + new_entry); + vmspace_map_entry_forked(vm1, vm2, new_entry); + + new_entry->cred = curthread->td_ucred; + crhold(new_entry->cred); + *fork_charge += (new_entry->end - new_entry->start); + + break; } old_entry = old_entry->next; } From owner-svn-src-head@freebsd.org Tue Mar 14 17:34:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D6B8D0C754; Tue, 14 Mar 2017 17:34:46 +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 mx1.freebsd.org (Postfix) with ESMTPS id 0E649CE8; Tue, 14 Mar 2017 17:34:45 +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 v2EHYjCx059794; Tue, 14 Mar 2017 17:34:45 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2EHYir0059790; Tue, 14 Mar 2017 17:34:44 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703141734.v2EHYir0059790@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 14 Mar 2017 17:34:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315273 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 17:34:46 -0000 Author: mav Date: Tue Mar 14 17:34:44 2017 New Revision: 315273 URL: https://svnweb.freebsd.org/changeset/base/315273 Log: Remove tangled isp_mbox_continue() mechanism. It was implemented to reduce context switches when uploading firmware to card's RAM. But this mechanism is not used last 10 years since all mbox operations are now polled, and it was never used for cards produced in last 15 years. Newer cards can use DMA to upload firmware. MFC after: 2 weeks Modified: head/sys/dev/isp/isp.c head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_freebsd.h head/sys/dev/isp/ispvar.h Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Tue Mar 14 17:10:42 2017 (r315272) +++ head/sys/dev/isp/isp.c Tue Mar 14 17:34:44 2017 (r315273) @@ -101,7 +101,6 @@ static int isp_handle_other_response(isp static void isp_parse_status(ispsoftc_t *, ispstatusreq_t *, XS_T *, long *); static void isp_parse_status_24xx(ispsoftc_t *, isp24xx_statusreq_t *, XS_T *, long *); static void isp_fastpost_complete(ispsoftc_t *, uint32_t); -static int isp_mbox_continue(ispsoftc_t *); static void isp_scsi_init(ispsoftc_t *); static void isp_scsi_channel_init(ispsoftc_t *, int); static void isp_fibre_init(ispsoftc_t *); @@ -130,7 +129,6 @@ static int isp_register_port_name_24xx(i static int isp_register_node_name_24xx(ispsoftc_t *, int); static uint16_t isp_next_handle(ispsoftc_t *, uint16_t *); static int isp_fw_state(ispsoftc_t *, int); -static void isp_mboxcmd_qnw(ispsoftc_t *, mbreg_t *, int); static void isp_mboxcmd(ispsoftc_t *, mbreg_t *); static void isp_spi_update(ispsoftc_t *, int); @@ -734,87 +732,47 @@ isp_reset(ispsoftc_t *isp, int do_load_d isp->isp_loaded_fw = 0; if (dodnld && IS_24XX(isp)) { const uint32_t *ptr = isp->isp_mdvec->dv_ispfw; - int wordload; + uint32_t la, wi, wl; /* * Keep loading until we run out of f/w. */ code_org = ptr[2]; /* 1st load address is our start addr */ - wordload = 0; for (;;) { - uint32_t la, wi, wl; isp_prt(isp, ISP_LOGDEBUG0, "load 0x%x words of code at load address 0x%x", ptr[3], ptr[2]); wi = 0; la = ptr[2]; wl = ptr[3]; - while (wi < ptr[3]) { uint32_t *cp; uint32_t nw; - nw = ISP_QUEUE_SIZE(RQUEST_QUEUE_LEN(isp)) >> 2; - if (nw > wl) { - nw = wl; - } + nw = min(wl, ISP_QUEUE_SIZE(RQUEST_QUEUE_LEN(isp)) / 4); cp = isp->isp_rquest; - for (i = 0; i < nw; i++) { - ISP_IOXPUT_32(isp, ptr[wi++], &cp[i]); - wl--; - } + for (i = 0; i < nw; i++) + ISP_IOXPUT_32(isp, ptr[wi + i], &cp[i]); MEMORYBARRIER(isp, SYNC_REQUEST, 0, ISP_QUEUE_SIZE(RQUEST_QUEUE_LEN(isp)), -1); - again: - MBSINIT(&mbs, 0, MBLOGALL, 0); - if (la < 0x10000 && nw < 0x10000) { - mbs.param[0] = MBOX_LOAD_RISC_RAM_2100; - mbs.param[1] = la; - mbs.param[2] = DMA_WD1(isp->isp_rquest_dma); - mbs.param[3] = DMA_WD0(isp->isp_rquest_dma); - mbs.param[4] = nw; - mbs.param[6] = DMA_WD3(isp->isp_rquest_dma); - mbs.param[7] = DMA_WD2(isp->isp_rquest_dma); - isp_prt(isp, ISP_LOGDEBUG0, "LOAD RISC RAM 2100 %u words at load address 0x%x", nw, la); - } else if (wordload) { - union { - const uint32_t *cp; - uint32_t *np; - } ucd; - ucd.cp = (const uint32_t *)cp; - mbs.param[0] = MBOX_WRITE_RAM_WORD_EXTENDED; - mbs.param[1] = la; - mbs.param[2] = (*ucd.np); - mbs.param[3] = (*ucd.np) >> 16; - mbs.param[8] = la >> 16; - isp->isp_mbxwrk0 = nw - 1; - isp->isp_mbxworkp = ucd.np+1; - isp->isp_mbxwrk1 = (la + 1); - isp->isp_mbxwrk8 = (la + 1) >> 16; - isp_prt(isp, ISP_LOGDEBUG0, "WRITE RAM WORD EXTENDED %u words at load address 0x%x", nw, la); - } else { - mbs.param[0] = MBOX_LOAD_RISC_RAM; - mbs.param[1] = la; - mbs.param[2] = DMA_WD1(isp->isp_rquest_dma); - mbs.param[3] = DMA_WD0(isp->isp_rquest_dma); - mbs.param[4] = nw >> 16; - mbs.param[5] = nw; - mbs.param[6] = DMA_WD3(isp->isp_rquest_dma); - mbs.param[7] = DMA_WD2(isp->isp_rquest_dma); - mbs.param[8] = la >> 16; - isp_prt(isp, ISP_LOGDEBUG0, "LOAD RISC RAM %u words at load address 0x%x", nw, la); - } + MBSINIT(&mbs, MBOX_LOAD_RISC_RAM, MBLOGALL, 0); + mbs.param[1] = la; + mbs.param[2] = DMA_WD1(isp->isp_rquest_dma); + mbs.param[3] = DMA_WD0(isp->isp_rquest_dma); + mbs.param[4] = nw >> 16; + mbs.param[5] = nw; + mbs.param[6] = DMA_WD3(isp->isp_rquest_dma); + mbs.param[7] = DMA_WD2(isp->isp_rquest_dma); + mbs.param[8] = la >> 16; + isp_prt(isp, ISP_LOGDEBUG0, "LOAD RISC RAM %u words at load address 0x%x", nw, la); isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { - if (mbs.param[0] == MBOX_HOST_INTERFACE_ERROR) { - isp_prt(isp, ISP_LOGERR, "switching to word load"); - wordload = 1; - goto again; - } - isp_prt(isp, ISP_LOGERR, "F/W Risc Ram Load Failed"); + isp_prt(isp, ISP_LOGERR, "F/W download failed"); return; } la += nw; + wi += nw; + wl -= nw; } if (ptr[1] == 0) { @@ -843,18 +801,10 @@ isp_reset(ispsoftc_t *isp, int do_load_d uint16_t *cp; uint16_t nw; - nw = ISP_QUEUE_SIZE(RQUEST_QUEUE_LEN(isp)) >> 1; - if (nw > wl) { - nw = wl; - } - if (nw > (1 << 15)) { - nw = 1 << 15; - } + nw = min(wl, min((1 << 15), ISP_QUEUE_SIZE(RQUEST_QUEUE_LEN(isp)) / 2)); cp = isp->isp_rquest; - for (i = 0; i < nw; i++) { - ISP_IOXPUT_16(isp, ptr[wi++], &cp[i]); - wl--; - } + for (i = 0; i < nw; i++) + ISP_IOXPUT_16(isp, ptr[wi + i], &cp[i]); MEMORYBARRIER(isp, SYNC_REQUEST, 0, ISP_QUEUE_SIZE(RQUEST_QUEUE_LEN(isp)), -1); MBSINIT(&mbs, 0, MBLOGALL, 0); if (la < 0x10000) { @@ -879,10 +829,12 @@ isp_reset(ispsoftc_t *isp, int do_load_d } isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { - isp_prt(isp, ISP_LOGERR, "F/W Risc Ram Load Failed"); + isp_prt(isp, ISP_LOGERR, "F/W download failed"); return; } la += nw; + wi += nw; + wl -= nw; } if (!IS_2322(isp)) { @@ -907,22 +859,22 @@ isp_reset(ispsoftc_t *isp, int do_load_d } isp->isp_loaded_fw = 1; } else if (dodnld) { - union { - const uint16_t *cp; - uint16_t *np; - } ucd; - ucd.cp = isp->isp_mdvec->dv_ispfw; - isp->isp_mbxworkp = &ucd.np[1]; - isp->isp_mbxwrk0 = ucd.np[3] - 1; - isp->isp_mbxwrk1 = code_org + 1; - MBSINIT(&mbs, MBOX_WRITE_RAM_WORD, MBLOGNONE, 0); - mbs.param[1] = code_org; - mbs.param[2] = ucd.np[0]; - isp_prt(isp, ISP_LOGDEBUG1, "WRITE RAM %u words at load address 0x%x", ucd.np[3], code_org); - isp_mboxcmd(isp, &mbs); - if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { - isp_prt(isp, ISP_LOGERR, "F/W download failed at word %d", isp->isp_mbxwrk1 - code_org); - return; + const uint16_t *ptr = isp->isp_mdvec->dv_ispfw; + u_int i, wl; + + wl = ptr[3]; + isp_prt(isp, ISP_LOGDEBUG1, + "WRITE RAM %u words at load address 0x%x", wl, code_org); + for (i = 0; i < wl; i++) { + MBSINIT(&mbs, MBOX_WRITE_RAM_WORD, MBLOGNONE, 0); + mbs.param[1] = code_org + i; + mbs.param[2] = ptr[i]; + isp_mboxcmd(isp, &mbs); + if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { + isp_prt(isp, ISP_LOGERR, + "F/W download failed at word %d", i); + return; + } } } else if (IS_26XX(isp)) { MBSINIT(&mbs, MBOX_LOAD_FLASH_FIRMWARE, MBLOGALL, 5000000); @@ -4993,11 +4945,6 @@ again: } isp->isp_mboxtmp[i] = ISP_READ(isp, MBOX_OFF(i)); } - if (isp->isp_mbxwrk0) { - if (isp_mbox_continue(isp) == 0) { - return; - } - } MBOX_NOTIFY_COMPLETE(isp); } else { isp_prt(isp, ISP_LOGWARN, "mailbox cmd (0x%x) with no waiters", info); @@ -6730,96 +6677,6 @@ isp_fastpost_complete(ispsoftc_t *isp, u isp_done(xs); } -static int -isp_mbox_continue(ispsoftc_t *isp) -{ - mbreg_t mbs; - uint16_t *ptr; - uint32_t offset; - - switch (isp->isp_lastmbxcmd) { - case MBOX_WRITE_RAM_WORD: - case MBOX_READ_RAM_WORD: - case MBOX_WRITE_RAM_WORD_EXTENDED: - case MBOX_READ_RAM_WORD_EXTENDED: - break; - default: - return (1); - } - if (isp->isp_mboxtmp[0] != MBOX_COMMAND_COMPLETE) { - isp->isp_mbxwrk0 = 0; - return (-1); - } - - /* - * Clear the previous interrupt. - */ - if (IS_24XX(isp)) { - ISP_WRITE(isp, BIU2400_HCCR, HCCR_2400_CMD_CLEAR_RISC_INT); - } else { - ISP_WRITE(isp, HCCR, HCCR_CMD_CLEAR_RISC_INT); - ISP_WRITE(isp, BIU_SEMA, 0); - } - - /* - * Continue with next word. - */ - ISP_MEMZERO(&mbs, sizeof (mbs)); - ptr = isp->isp_mbxworkp; - switch (isp->isp_lastmbxcmd) { - case MBOX_WRITE_RAM_WORD: - mbs.param[1] = isp->isp_mbxwrk1++; - mbs.param[2] = *ptr++; - break; - case MBOX_READ_RAM_WORD: - *ptr++ = isp->isp_mboxtmp[2]; - mbs.param[1] = isp->isp_mbxwrk1++; - break; - case MBOX_WRITE_RAM_WORD_EXTENDED: - if (IS_24XX(isp)) { - uint32_t *lptr = (uint32_t *)ptr; - mbs.param[2] = lptr[0]; - mbs.param[3] = lptr[0] >> 16; - lptr++; - ptr = (uint16_t *)lptr; - } else { - mbs.param[2] = *ptr++; - } - offset = isp->isp_mbxwrk1; - offset |= isp->isp_mbxwrk8 << 16; - mbs.param[1] = offset; - mbs.param[8] = offset >> 16; - offset++; - isp->isp_mbxwrk1 = offset; - isp->isp_mbxwrk8 = offset >> 16; - break; - case MBOX_READ_RAM_WORD_EXTENDED: - if (IS_24XX(isp)) { - uint32_t *lptr = (uint32_t *)ptr; - uint32_t val = isp->isp_mboxtmp[2]; - val |= (isp->isp_mboxtmp[3]) << 16; - *lptr++ = val; - ptr = (uint16_t *)lptr; - } else { - *ptr++ = isp->isp_mboxtmp[2]; - } - offset = isp->isp_mbxwrk1; - offset |= isp->isp_mbxwrk8 << 16; - mbs.param[1] = offset; - mbs.param[8] = offset >> 16; - offset++; - isp->isp_mbxwrk1 = offset; - isp->isp_mbxwrk8 = offset >> 16; - break; - } - isp->isp_mbxworkp = ptr; - isp->isp_mbxwrk0--; - mbs.param[0] = isp->isp_lastmbxcmd; - mbs.logval = MBLOGALL; - isp_mboxcmd_qnw(isp, &mbs, 0); - return (0); -} - #define ISP_SCSI_IBITS(op) (mbpscsi[((op)<<1)]) #define ISP_SCSI_OBITS(op) (mbpscsi[((op)<<1) + 1]) #define ISP_SCSI_OPMAP(in, out) in, out @@ -7294,49 +7151,6 @@ static const char *fc_mbcmd_names[] = { }; static void -isp_mboxcmd_qnw(ispsoftc_t *isp, mbreg_t *mbp, int nodelay) -{ - unsigned int ibits, obits, box, opcode; - - opcode = mbp->param[0]; - if (IS_FC(isp)) { - ibits = ISP_FC_IBITS(opcode); - obits = ISP_FC_OBITS(opcode); - } else { - ibits = ISP_SCSI_IBITS(opcode); - obits = ISP_SCSI_OBITS(opcode); - } - ibits |= mbp->ibits; - obits |= mbp->obits; - for (box = 0; box < ISP_NMBOX(isp); box++) { - if (ibits & (1 << box)) { - ISP_WRITE(isp, MBOX_OFF(box), mbp->param[box]); - } - if (nodelay == 0) { - isp->isp_mboxtmp[box] = mbp->param[box] = 0; - } - } - if (nodelay == 0) { - isp->isp_lastmbxcmd = opcode; - isp->isp_obits = obits; - isp->isp_mboxbsy = 1; - } - if (IS_24XX(isp)) { - ISP_WRITE(isp, BIU2400_HCCR, HCCR_2400_CMD_SET_HOST_INT); - } else { - ISP_WRITE(isp, HCCR, HCCR_CMD_SET_HOST_INT); - } - /* - * Oddly enough, if we're not delaying for an answer, - * delay a bit to give the f/w a chance to pick up the - * command. - */ - if (nodelay) { - ISP_DELAY(1000); - } -} - -static void isp_mboxcmd(ispsoftc_t *isp, mbreg_t *mbp) { const char *cname, *xname, *sname; Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Tue Mar 14 17:10:42 2017 (r315272) +++ head/sys/dev/isp/isp_freebsd.c Tue Mar 14 17:34:44 2017 (r315273) @@ -4413,50 +4413,33 @@ isp_mbox_acquire(ispsoftc_t *isp) void isp_mbox_wait_complete(ispsoftc_t *isp, mbreg_t *mbp) { - unsigned int usecs = mbp->timeout; - unsigned int max, olim, ilim; - - if (usecs == 0) { - usecs = MBCMD_DEFAULT_TIMEOUT; - } - max = isp->isp_mbxwrk0 + 1; + u_int t, to; + to = (mbp->timeout == 0) ? MBCMD_DEFAULT_TIMEOUT : mbp->timeout; if (isp->isp_osinfo.mbox_sleep_ok) { - unsigned int ms = (usecs + 999) / 1000; - isp->isp_osinfo.mbox_sleep_ok = 0; isp->isp_osinfo.mbox_sleeping = 1; - for (olim = 0; olim < max; olim++) { - msleep(&isp->isp_mbxworkp, &isp->isp_osinfo.lock, PRIBIO, "ispmbx_sleep", isp_mstohz(ms)); - if (isp->isp_osinfo.mboxcmd_done) { - break; - } - } + msleep_sbt(&isp->isp_osinfo.mboxcmd_done, &isp->isp_osinfo.lock, + PRIBIO, "ispmbx_sleep", to * SBT_1US, 0, 0); isp->isp_osinfo.mbox_sleep_ok = 1; isp->isp_osinfo.mbox_sleeping = 0; } else { - for (olim = 0; olim < max; olim++) { - for (ilim = 0; ilim < usecs; ilim += 100) { - uint16_t isr, sema, info; - if (isp->isp_osinfo.mboxcmd_done) { - break; - } - if (ISP_READ_ISR(isp, &isr, &sema, &info)) { - isp_intr(isp, isr, sema, info); - if (isp->isp_osinfo.mboxcmd_done) { - break; - } - } - ISP_DELAY(100); - } - if (isp->isp_osinfo.mboxcmd_done) { + for (t = 0; t < to; t += 100) { + uint16_t isr, sema, info; + if (isp->isp_osinfo.mboxcmd_done) break; + if (ISP_READ_ISR(isp, &isr, &sema, &info)) { + isp_intr(isp, isr, sema, info); + if (isp->isp_osinfo.mboxcmd_done) + break; } + ISP_DELAY(100); } } if (isp->isp_osinfo.mboxcmd_done == 0) { - isp_prt(isp, ISP_LOGWARN, "%s Mailbox Command (0x%x) Timeout (%uus) (started @ %s:%d)", - isp->isp_osinfo.mbox_sleep_ok? "Interrupting" : "Polled", isp->isp_lastmbxcmd, usecs, mbp->func, mbp->lineno); + isp_prt(isp, ISP_LOGWARN, "%s Mailbox Command (0x%x) Timeout (%uus) (%s:%d)", + isp->isp_osinfo.mbox_sleep_ok? "Interrupting" : "Polled", + isp->isp_lastmbxcmd, to, mbp->func, mbp->lineno); mbp->param[0] = MBOX_TIMEOUT; isp->isp_osinfo.mboxcmd_done = 1; } @@ -4465,10 +4448,9 @@ isp_mbox_wait_complete(ispsoftc_t *isp, void isp_mbox_notify_done(ispsoftc_t *isp) { - if (isp->isp_osinfo.mbox_sleeping) { - wakeup(&isp->isp_mbxworkp); - } isp->isp_osinfo.mboxcmd_done = 1; + if (isp->isp_osinfo.mbox_sleeping) + wakeup(&isp->isp_osinfo.mboxcmd_done); } void Modified: head/sys/dev/isp/isp_freebsd.h ============================================================================== --- head/sys/dev/isp/isp_freebsd.h Tue Mar 14 17:10:42 2017 (r315272) +++ head/sys/dev/isp/isp_freebsd.h Tue Mar 14 17:34:44 2017 (r315273) @@ -308,11 +308,11 @@ struct isposinfo { #endif sixtyfourbit : 1, /* sixtyfour bit platform */ timer_active : 1, - autoconf : 1, - mbox_sleeping : 1, - mbox_sleep_ok : 1, - mboxcmd_done : 1, - mboxbsy : 1; + autoconf : 1; + int mbox_sleeping; + int mbox_sleep_ok; + int mboxbsy; + int mboxcmd_done; struct callout tmo; /* general timer */ Modified: head/sys/dev/isp/ispvar.h ============================================================================== --- head/sys/dev/isp/ispvar.h Tue Mar 14 17:10:42 2017 (r315272) +++ head/sys/dev/isp/ispvar.h Tue Mar 14 17:34:44 2017 (r315273) @@ -575,12 +575,7 @@ struct ispsoftc { volatile uint32_t isp_serno; /* rolling serial number */ volatile uint16_t isp_mboxtmp[MAX_MAILBOX]; volatile uint16_t isp_lastmbxcmd; /* last mbox command sent */ - volatile uint16_t isp_mbxwrk0; - volatile uint16_t isp_mbxwrk1; - volatile uint16_t isp_mbxwrk2; - volatile uint16_t isp_mbxwrk8; volatile uint16_t isp_seqno; /* running sequence number */ - void * isp_mbxworkp; /* * Active commands are stored here, indexed by handle functions. From owner-svn-src-head@freebsd.org Tue Mar 14 18:08:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 586E0D0C304; Tue, 14 Mar 2017 18:08:34 +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 mx1.freebsd.org (Postfix) with ESMTPS id 2578F681; Tue, 14 Mar 2017 18:08:34 +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 v2EI8XBJ072387; Tue, 14 Mar 2017 18:08:33 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2EI8X6c072386; Tue, 14 Mar 2017 18:08:33 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201703141808.v2EI8X6c072386@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 14 Mar 2017 18:08:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315276 - head/usr.sbin/makefs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 18:08:34 -0000 Author: emaste Date: Tue Mar 14 18:08:32 2017 New Revision: 315276 URL: https://svnweb.freebsd.org/changeset/base/315276 Log: makefs: sync -T timestamp with NetBSD NetBSD revision: makefs.c 1.51 Obtained from: NetBSD Modified: head/usr.sbin/makefs/makefs.c Modified: head/usr.sbin/makefs/makefs.c ============================================================================== --- head/usr.sbin/makefs/makefs.c Tue Mar 14 17:56:36 2017 (r315275) +++ head/usr.sbin/makefs/makefs.c Tue Mar 14 18:08:32 2017 (r315276) @@ -112,10 +112,13 @@ main(int argc, char *argv[]) fstype->prepare_options(&fsoptions); specfile = NULL; +#ifdef CLOCK_REALTIME + ch = clock_gettime(CLOCK_REALTIME, &start_time); +#else ch = gettimeofday(&start, NULL); start_time.tv_sec = start.tv_sec; start_time.tv_nsec = start.tv_usec * 1000; - +#endif if (ch == -1) err(1, "Unable to get system time"); From owner-svn-src-head@freebsd.org Tue Mar 14 18:27:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E8F1D0CE98; Tue, 14 Mar 2017 18:27:49 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C085147B; Tue, 14 Mar 2017 18:27:49 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2EIRmLq080311; Tue, 14 Mar 2017 18:27:48 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2EIRmLv080307; Tue, 14 Mar 2017 18:27:48 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201703141827.v2EIRmLv080307@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Tue, 14 Mar 2017 18:27:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315277 - in head/sys: dev/cxgb/ulp/iw_cxgb netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 18:27:49 -0000 Author: vangyzen Date: Tue Mar 14 18:27:48 2017 New Revision: 315277 URL: https://svnweb.freebsd.org/changeset/base/315277 Log: KTR: log IPv4 addresses in hex rather than dotted-quad When I made the changes in r313821, I fell victim to one of the classic blunders, the most famous of which is: never get involved in a land war in Asia. But only slightly less well known is this: Keep your brain turned on and engaged when making a tedious, sweeping, mechanical change. KTR can correctly log the immediate integral values passed to it, as well as constant strings, but not non-constant strings, since they might change by the time ktrdump retrieves them. Reported by: glebius MFC after: 3 days Sponsored by: Dell EMC Modified: head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c head/sys/netinet/igmp.c head/sys/netinet/in_mcast.c head/sys/netinet/ip_mroute.c Modified: head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c ============================================================================== --- head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c Tue Mar 14 18:08:32 2017 (r315276) +++ head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c Tue Mar 14 18:27:48 2017 (r315277) @@ -1461,9 +1461,6 @@ static void process_data(struct iwch_ep *ep) { struct sockaddr_in *local, *remote; -#ifdef KTR - char local_str[INET_ADDRSTRLEN], remote_str[INET_ADDRSTRLEN]; -#endif CTR4(KTR_IW_CXGB, "%s ep %p so %p state %s", __FUNCTION__, ep, ep->com.so, states[ep->com.state]); @@ -1481,9 +1478,8 @@ process_data(struct iwch_ep *ep) */ in_getsockaddr(ep->com.so, (struct sockaddr **)&local); in_getpeeraddr(ep->com.so, (struct sockaddr **)&remote); - CTR3(KTR_IW_CXGB, "%s local %s remote %s", __FUNCTION__, - inet_ntoa_r(local->sin_addr, local_str), - inet_ntoa_r(remote->sin_addr, remote_str)); + CTR3(KTR_IW_CXGB, "%s local 0x%08x remote 0x%08x", __FUNCTION__, + local->sin_addr.s_addr, remote->sin_addr.s_addr); ep->com.local_addr = *local; ep->com.remote_addr = *remote; free(local, M_SONAME); @@ -1522,9 +1518,6 @@ process_newconn(struct iw_cm_id *parent_ struct sockaddr_in *local; struct sockaddr_in *remote; struct iwch_ep *parent_ep = parent_cm_id->provider_data; -#ifdef KTR - char buf[INET_ADDRSTRLEN]; -#endif CTR3(KTR_IW_CXGB, "%s parent ep %p so %p", __FUNCTION__, parent_ep, parent_ep->com.so); if (!child_so) { @@ -1544,8 +1537,8 @@ process_newconn(struct iw_cm_id *parent_ in_getsockaddr(child_so, (struct sockaddr **)&local); in_getpeeraddr(child_so, (struct sockaddr **)&remote); - CTR3(KTR_IW_CXGB, "%s remote addr %s port %d", __FUNCTION__, - inet_ntoa_r(remote->sin_addr, buf), ntohs(remote->sin_port)); + CTR3(KTR_IW_CXGB, "%s remote addr 0x%08x port %d", __FUNCTION__, + remote->sin_addr.s_addr, ntohs(remote->sin_port)); child_ep->com.tdev = parent_ep->com.tdev; child_ep->com.local_addr.sin_family = parent_ep->com.local_addr.sin_family; child_ep->com.local_addr.sin_port = parent_ep->com.local_addr.sin_port; Modified: head/sys/netinet/igmp.c ============================================================================== --- head/sys/netinet/igmp.c Tue Mar 14 18:08:32 2017 (r315276) +++ head/sys/netinet/igmp.c Tue Mar 14 18:27:48 2017 (r315277) @@ -312,17 +312,6 @@ igmp_scrub_context(struct mbuf *m) m->m_pkthdr.flowid = 0; } -#ifdef KTR -static __inline char * -inet_ntoa_haddr(in_addr_t haddr, char *addrbuf) -{ - struct in_addr ia; - - ia.s_addr = htonl(haddr); - return (inet_ntoa_r(ia, addrbuf)); -} -#endif - /* * Restore context from a queued IGMP output chain. * Return saved ifindex. @@ -804,9 +793,6 @@ igmp_input_v2_query(struct ifnet *ifp, c struct in_multi *inm; int is_general_query; uint16_t timer; -#ifdef KTR - char addrbuf[INET_ADDRSTRLEN]; -#endif is_general_query = 0; @@ -875,9 +861,9 @@ igmp_input_v2_query(struct ifnet *ifp, c */ inm = inm_lookup(ifp, igmp->igmp_group); if (inm != NULL) { - CTR3(KTR_IGMPV3, "process v2 query %s on ifp %p(%s)", - inet_ntoa_r(igmp->igmp_group, addrbuf), ifp, - ifp->if_xname); + CTR3(KTR_IGMPV3, + "process v2 query 0x%08x on ifp %p(%s)", + igmp->igmp_group.s_addr, ifp, ifp->if_xname); igmp_v2_update_group(inm, timer); } } @@ -907,12 +893,9 @@ out_locked: static void igmp_v2_update_group(struct in_multi *inm, const int timer) { -#ifdef KTR - char addrbuf[INET_ADDRSTRLEN]; -#endif - CTR4(KTR_IGMPV3, "%s: %s/%s timer=%d", __func__, - inet_ntoa_r(inm->inm_addr, addrbuf), inm->inm_ifp->if_xname, timer); + CTR4(KTR_IGMPV3, "0x%08x: %s/%s timer=%d", __func__, + inm->inm_addr.s_addr, inm->inm_ifp->if_xname, timer); IN_MULTI_LOCK_ASSERT(); @@ -963,9 +946,6 @@ igmp_input_v3_query(struct ifnet *ifp, c uint32_t maxresp, nsrc, qqi; uint16_t timer; uint8_t qrv; -#ifdef KTR - char addrbuf[INET_ADDRSTRLEN]; -#endif is_general_query = 0; @@ -1095,9 +1075,8 @@ igmp_input_v3_query(struct ifnet *ifp, c goto out_locked; } } - CTR3(KTR_IGMPV3, "process v3 %s query on ifp %p(%s)", - inet_ntoa_r(igmpv3->igmp_group, addrbuf), ifp, - ifp->if_xname); + CTR3(KTR_IGMPV3, "process v3 0x%08x query on ifp %p(%s)", + igmpv3->igmp_group.s_addr, ifp, ifp->if_xname); /* * If there is a pending General Query response * scheduled sooner than the selected delay, no @@ -1230,9 +1209,6 @@ igmp_input_v1_report(struct ifnet *ifp, struct rm_priotracker in_ifa_tracker; struct in_ifaddr *ia; struct in_multi *inm; -#ifdef KTR - char addrbuf[INET_ADDRSTRLEN]; -#endif IGMPSTAT_INC(igps_rcv_reports); @@ -1260,8 +1236,8 @@ igmp_input_v1_report(struct ifnet *ifp, } } - CTR3(KTR_IGMPV3, "process v1 report %s on ifp %p(%s)", - inet_ntoa_r(igmp->igmp_group, addrbuf), ifp, ifp->if_xname); + CTR3(KTR_IGMPV3, "process v1 report 0x%08x on ifp %p(%s)", + igmp->igmp_group.s_addr, ifp, ifp->if_xname); /* * IGMPv1 report suppression. @@ -1303,16 +1279,16 @@ igmp_input_v1_report(struct ifnet *ifp, case IGMP_LAZY_MEMBER: case IGMP_AWAKENING_MEMBER: CTR3(KTR_IGMPV3, - "report suppressed for %s on ifp %p(%s)", - inet_ntoa_r(igmp->igmp_group, addrbuf), ifp, + "report suppressed for 0x%08x on ifp %p(%s)", + igmp->igmp_group.s_addr, ifp, ifp->if_xname); case IGMP_SLEEPING_MEMBER: inm->inm_state = IGMP_SLEEPING_MEMBER; break; case IGMP_REPORTING_MEMBER: CTR3(KTR_IGMPV3, - "report suppressed for %s on ifp %p(%s)", - inet_ntoa_r(igmp->igmp_group, addrbuf), ifp, + "report suppressed for 0x%08x on ifp %p(%s)", + igmp->igmp_group.s_addr, ifp, ifp->if_xname); if (igi->igi_version == IGMP_VERSION_1) inm->inm_state = IGMP_LAZY_MEMBER; @@ -1344,9 +1320,6 @@ igmp_input_v2_report(struct ifnet *ifp, struct rm_priotracker in_ifa_tracker; struct in_ifaddr *ia; struct in_multi *inm; -#ifdef KTR - char addrbuf[INET_ADDRSTRLEN]; -#endif /* * Make sure we don't hear our own membership report. Fast @@ -1389,8 +1362,8 @@ igmp_input_v2_report(struct ifnet *ifp, if (ia != NULL) ifa_free(&ia->ia_ifa); - CTR3(KTR_IGMPV3, "process v2 report %s on ifp %p(%s)", - inet_ntoa_r(igmp->igmp_group, addrbuf), ifp, ifp->if_xname); + CTR3(KTR_IGMPV3, "process v2 report 0x%08x on ifp %p(%s)", + igmp->igmp_group.s_addr, ifp, ifp->if_xname); /* * IGMPv2 report suppression. @@ -1430,9 +1403,8 @@ igmp_input_v2_report(struct ifnet *ifp, case IGMP_IDLE_MEMBER: case IGMP_AWAKENING_MEMBER: CTR3(KTR_IGMPV3, - "report suppressed for %s on ifp %p(%s)", - inet_ntoa_r(igmp->igmp_group, addrbuf), ifp, - ifp->if_xname); + "report suppressed for 0x%08x on ifp %p(%s)", + igmp->igmp_group.s_addr, ifp, ifp->if_xname); case IGMP_LAZY_MEMBER: inm->inm_state = IGMP_LAZY_MEMBER; break; @@ -1834,9 +1806,6 @@ igmp_v3_process_group_timers(struct igmp { int query_response_timer_expired; int state_change_retransmit_timer_expired; -#ifdef KTR - char addrbuf[INET_ADDRSTRLEN]; -#endif IN_MULTI_LOCK_ASSERT(); IGMP_LOCK_ASSERT(); @@ -1922,9 +1891,8 @@ igmp_v3_process_group_timers(struct igmp (void)igmp_v3_merge_state_changes(inm, scq); inm_commit(inm); - CTR3(KTR_IGMPV3, "%s: T1 -> T0 for %s/%s", __func__, - inet_ntoa_r(inm->inm_addr, addrbuf), - inm->inm_ifp->if_xname); + CTR3(KTR_IGMPV3, "%s: T1 -> T0 for 0x%08x/%s", __func__, + inm->inm_addr.s_addr, inm->inm_ifp->if_xname); /* * If we are leaving the group for good, make sure @@ -2370,13 +2338,9 @@ igmp_initial_join(struct in_multi *inm, struct ifnet *ifp; struct mbufq *mq; int error, retval, syncstates; -#ifdef KTR - char addrbuf[INET_ADDRSTRLEN]; -#endif - CTR4(KTR_IGMPV3, "%s: initial join %s on ifp %p(%s)", - __func__, inet_ntoa_r(inm->inm_addr, addrbuf), inm->inm_ifp, - inm->inm_ifp->if_xname); + CTR4(KTR_IGMPV3, "%s: initial join 0x%08x on ifp %p(%s)", __func__, + inm->inm_addr.s_addr, inm->inm_ifp, inm->inm_ifp->if_xname); error = 0; syncstates = 1; @@ -2485,9 +2449,8 @@ igmp_initial_join(struct in_multi *inm, */ if (syncstates) { inm_commit(inm); - CTR3(KTR_IGMPV3, "%s: T1 -> T0 for %s/%s", __func__, - inet_ntoa_r(inm->inm_addr, addrbuf), - inm->inm_ifp->if_xname); + CTR3(KTR_IGMPV3, "%s: T1 -> T0 for 0x%08x/%s", __func__, + inm->inm_addr.s_addr, inm->inm_ifp->if_xname); } return (error); @@ -2501,13 +2464,9 @@ igmp_handle_state_change(struct in_multi { struct ifnet *ifp; int retval; -#ifdef KTR - char addrbuf[INET_ADDRSTRLEN]; -#endif - CTR4(KTR_IGMPV3, "%s: state change for %s on ifp %p(%s)", - __func__, inet_ntoa_r(inm->inm_addr, addrbuf), inm->inm_ifp, - inm->inm_ifp->if_xname); + CTR4(KTR_IGMPV3, "%s: state change for 0x%08x on ifp %p(%s)", __func__, + inm->inm_addr.s_addr, inm->inm_ifp, inm->inm_ifp->if_xname); ifp = inm->inm_ifp; @@ -2526,9 +2485,8 @@ igmp_handle_state_change(struct in_multi } CTR1(KTR_IGMPV3, "%s: nothing to do", __func__); inm_commit(inm); - CTR3(KTR_IGMPV3, "%s: T1 -> T0 for %s/%s", __func__, - inet_ntoa_r(inm->inm_addr, addrbuf), - inm->inm_ifp->if_xname); + CTR3(KTR_IGMPV3, "%s: T1 -> T0 for 0x%08x/%s", __func__, + inm->inm_addr.s_addr, inm->inm_ifp->if_xname); return (0); } @@ -2563,14 +2521,11 @@ static void igmp_final_leave(struct in_multi *inm, struct igmp_ifsoftc *igi) { int syncstates; -#ifdef KTR - char addrbuf[INET_ADDRSTRLEN]; -#endif syncstates = 1; - CTR4(KTR_IGMPV3, "%s: final leave %s on ifp %p(%s)", - __func__, inet_ntoa_r(inm->inm_addr, addrbuf), inm->inm_ifp, + CTR4(KTR_IGMPV3, "%s: final leave 0x%08x on ifp %p(%s)", + __func__, inm->inm_addr.s_addr, inm->inm_ifp, inm->inm_ifp->if_xname); IN_MULTI_LOCK_ASSERT(); @@ -2611,9 +2566,9 @@ igmp_final_leave(struct in_multi *inm, s } else { inm->inm_scrv = igi->igi_rv; } - CTR4(KTR_IGMPV3, "%s: Leaving %s/%s with %d " + CTR4(KTR_IGMPV3, "%s: Leaving 0x%08x/%s with %d " "pending retransmissions.", __func__, - inet_ntoa_r(inm->inm_addr, addrbuf), + inm->inm_addr.s_addr, inm->inm_ifp->if_xname, inm->inm_scrv); if (inm->inm_scrv == 0) { inm->inm_state = IGMP_NOT_MEMBER; @@ -2646,13 +2601,11 @@ igmp_final_leave(struct in_multi *inm, s if (syncstates) { inm_commit(inm); - CTR3(KTR_IGMPV3, "%s: T1 -> T0 for %s/%s", __func__, - inet_ntoa_r(inm->inm_addr, addrbuf), - inm->inm_ifp->if_xname); + CTR3(KTR_IGMPV3, "%s: T1 -> T0 for 0x%08x/%s", __func__, + inm->inm_addr.s_addr, inm->inm_ifp->if_xname); inm->inm_st[1].iss_fmode = MCAST_UNDEFINED; - CTR3(KTR_IGMPV3, "%s: T1 now MCAST_UNDEFINED for %s/%s", - __func__, inet_ntoa_r(inm->inm_addr, addrbuf), - inm->inm_ifp->if_xname); + CTR3(KTR_IGMPV3, "%s: T1 now MCAST_UNDEFINED for 0x%08x/%s", + __func__, inm->inm_addr.s_addr, inm->inm_ifp->if_xname); } } @@ -2700,9 +2653,6 @@ igmp_v3_enqueue_group_record(struct mbuf int type; in_addr_t naddr; uint8_t mode; -#ifdef KTR - char addrbuf[INET_ADDRSTRLEN]; -#endif IN_MULTI_LOCK_ASSERT(); @@ -2780,9 +2730,8 @@ igmp_v3_enqueue_group_record(struct mbuf return (igmp_v3_enqueue_filter_change(mq, inm)); if (type == IGMP_DO_NOTHING) { - CTR3(KTR_IGMPV3, "%s: nothing to do for %s/%s", - __func__, inet_ntoa_r(inm->inm_addr, addrbuf), - inm->inm_ifp->if_xname); + CTR3(KTR_IGMPV3, "%s: nothing to do for 0x%08x/%s", __func__, + inm->inm_addr.s_addr, inm->inm_ifp->if_xname); return (0); } @@ -2795,8 +2744,8 @@ igmp_v3_enqueue_group_record(struct mbuf if (record_has_sources) minrec0len += sizeof(in_addr_t); - CTR4(KTR_IGMPV3, "%s: queueing %s for %s/%s", __func__, - igmp_rec_type_to_str(type), inet_ntoa_r(inm->inm_addr, addrbuf), + CTR4(KTR_IGMPV3, "%s: queueing %s for 0x%08x/%s", __func__, + igmp_rec_type_to_str(type), inm->inm_addr.s_addr, inm->inm_ifp->if_xname); /* @@ -2884,8 +2833,8 @@ igmp_v3_enqueue_group_record(struct mbuf } msrcs = 0; RB_FOREACH_SAFE(ims, ip_msource_tree, &inm->inm_srcs, nims) { - CTR2(KTR_IGMPV3, "%s: visit node %s", __func__, - inet_ntoa_haddr(ims->ims_haddr, addrbuf)); + CTR2(KTR_IGMPV3, "%s: visit node 0x%08x", __func__, + htonl(ims->ims_haddr)); now = ims_get_mode(inm, ims, 1); CTR2(KTR_IGMPV3, "%s: node is %d", __func__, now); if ((now != mode) || @@ -2980,8 +2929,8 @@ igmp_v3_enqueue_group_record(struct mbuf msrcs = 0; RB_FOREACH_FROM(ims, ip_msource_tree, nims) { - CTR2(KTR_IGMPV3, "%s: visit node %s", __func__, - inet_ntoa_haddr(ims->ims_haddr, addrbuf)); + CTR2(KTR_IGMPV3, "%s: visit node 0x%08x", __func__, + htonl(ims->ims_haddr)); now = ims_get_mode(inm, ims, 1); if ((now != mode) || (now == mode && mode == MCAST_UNDEFINED)) { @@ -3064,9 +3013,6 @@ igmp_v3_enqueue_filter_change(struct mbu int nallow, nblock; uint8_t mode, now, then; rectype_t crt, drt, nrt; -#ifdef KTR - char addrbuf[INET_ADDRSTRLEN]; -#endif IN_MULTI_LOCK_ASSERT(); @@ -3175,9 +3121,8 @@ igmp_v3_enqueue_filter_change(struct mbu if (nims == NULL) nims = RB_MIN(ip_msource_tree, &inm->inm_srcs); RB_FOREACH_FROM(ims, ip_msource_tree, nims) { - CTR2(KTR_IGMPV3, "%s: visit node %s", - __func__, - inet_ntoa_haddr(ims->ims_haddr, addrbuf)); + CTR2(KTR_IGMPV3, "%s: visit node 0x%08x", + __func__, htonl(ims->ims_haddr)); now = ims_get_mode(inm, ims, 1); then = ims_get_mode(inm, ims, 0); CTR3(KTR_IGMPV3, "%s: mode: t0 %d, t1 %d", Modified: head/sys/netinet/in_mcast.c ============================================================================== --- head/sys/netinet/in_mcast.c Tue Mar 14 18:08:32 2017 (r315276) +++ head/sys/netinet/in_mcast.c Tue Mar 14 18:27:48 2017 (r315277) @@ -877,10 +877,6 @@ inm_get_source(struct in_multi *inm, con { struct ip_msource find; struct ip_msource *ims, *nims; -#ifdef KTR - struct in_addr ia; - char addrbuf[INET_ADDRSTRLEN]; -#endif find.ims_haddr = haddr; ims = RB_FIND(ip_msource_tree, &inm->inm_srcs, &find); @@ -896,9 +892,8 @@ inm_get_source(struct in_multi *inm, con ++inm->inm_nsrc; ims = nims; #ifdef KTR - ia.s_addr = htonl(haddr); - CTR3(KTR_IGMPV3, "%s: allocated %s as %p", __func__, - inet_ntoa_r(ia, addrbuf), ims); + CTR3(KTR_IGMPV3, "%s: allocated 0x%08x as %p", __func__, + htonl(haddr), ims); #endif } @@ -916,29 +911,28 @@ ims_merge(struct ip_msource *ims, const { int n = rollback ? -1 : 1; #ifdef KTR - char addrbuf[INET_ADDRSTRLEN]; - struct in_addr ia; + uint32_t addr; - ia.s_addr = htonl(ims->ims_haddr); + addr = htonl(ims->ims_haddr); #endif if (lims->imsl_st[0] == MCAST_EXCLUDE) { - CTR3(KTR_IGMPV3, "%s: t1 ex -= %d on %s", - __func__, n, inet_ntoa_r(ia, addrbuf)); + CTR3(KTR_IGMPV3, "%s: t1 ex -= %d on 0x%08x", + __func__, n, addr); ims->ims_st[1].ex -= n; } else if (lims->imsl_st[0] == MCAST_INCLUDE) { - CTR3(KTR_IGMPV3, "%s: t1 in -= %d on %s", - __func__, n, inet_ntoa_r(ia, addrbuf)); + CTR3(KTR_IGMPV3, "%s: t1 in -= %d on 0x%08x", + __func__, n, addr); ims->ims_st[1].in -= n; } if (lims->imsl_st[1] == MCAST_EXCLUDE) { - CTR3(KTR_IGMPV3, "%s: t1 ex += %d on %s", - __func__, n, inet_ntoa_r(ia, addrbuf)); + CTR3(KTR_IGMPV3, "%s: t1 ex += %d on 0x%08x", + __func__, n, addr); ims->ims_st[1].ex += n; } else if (lims->imsl_st[1] == MCAST_INCLUDE) { - CTR3(KTR_IGMPV3, "%s: t1 in += %d on %s", - __func__, n, inet_ntoa_r(ia, addrbuf)); + CTR3(KTR_IGMPV3, "%s: t1 in += %d on 0x%08x", + __func__, n, addr); ims->ims_st[1].in += n; } } @@ -1171,14 +1165,11 @@ in_joingroup_locked(struct ifnet *ifp, c struct in_mfilter timf; struct in_multi *inm; int error; -#ifdef KTR - char addrbuf[INET_ADDRSTRLEN]; -#endif IN_MULTI_LOCK_ASSERT(); - CTR4(KTR_IGMPV3, "%s: join %s on %p(%s))", __func__, - inet_ntoa_r(*gina, addrbuf), ifp, ifp->if_xname); + CTR4(KTR_IGMPV3, "%s: join 0x%08x on %p(%s))", __func__, + gina->s_addr, ifp, ifp->if_xname); error = 0; inm = NULL; @@ -1256,16 +1247,13 @@ in_leavegroup_locked(struct in_multi *in { struct in_mfilter timf; int error; -#ifdef KTR - char addrbuf[INET_ADDRSTRLEN]; -#endif error = 0; IN_MULTI_LOCK_ASSERT(); - CTR5(KTR_IGMPV3, "%s: leave inm %p, %s/%s, imf %p", __func__, - inm, inet_ntoa_r(inm->inm_addr, addrbuf), + CTR5(KTR_IGMPV3, "%s: leave inm %p, 0x%08x/%s, imf %p", __func__, + inm, inm->inm_addr.s_addr, (inm_is_ifp_detached(inm) ? "null" : inm->inm_ifp->if_xname), imf); @@ -1364,9 +1352,6 @@ inp_block_unblock_source(struct inpcb *i size_t idx; uint16_t fmode; int error, doblock; -#ifdef KTR - char addrbuf[INET_ADDRSTRLEN]; -#endif ifp = NULL; error = 0; @@ -1401,8 +1386,8 @@ inp_block_unblock_source(struct inpcb *i if (sopt->sopt_name == IP_BLOCK_SOURCE) doblock = 1; - CTR3(KTR_IGMPV3, "%s: imr_interface = %s, ifp = %p", - __func__, inet_ntoa_r(mreqs.imr_interface, addrbuf), ifp); + CTR3(KTR_IGMPV3, "%s: imr_interface = 0x%08x, ifp = %p", + __func__, mreqs.imr_interface.s_addr, ifp); break; } @@ -1474,9 +1459,8 @@ inp_block_unblock_source(struct inpcb *i */ ims = imo_match_source(imo, idx, &ssa->sa); if ((ims != NULL && doblock) || (ims == NULL && !doblock)) { - CTR3(KTR_IGMPV3, "%s: source %s %spresent", __func__, - inet_ntoa_r(ssa->sin.sin_addr, addrbuf), - doblock ? "" : "not "); + CTR3(KTR_IGMPV3, "%s: source 0x%08x %spresent", __func__, + ssa->sin.sin_addr.s_addr, doblock ? "" : "not "); error = EADDRNOTAVAIL; goto out_inp_locked; } @@ -1953,9 +1937,6 @@ inp_join_group(struct inpcb *inp, struct struct in_msource *lims; size_t idx; int error, is_new; -#ifdef KTR - char addrbuf[INET_ADDRSTRLEN]; -#endif ifp = NULL; imf = NULL; @@ -2007,8 +1988,8 @@ inp_join_group(struct inpcb *inp, struct ifp = inp_lookup_mcast_ifp(inp, &gsa->sin, mreqs.imr_interface); - CTR3(KTR_IGMPV3, "%s: imr_interface = %s, ifp = %p", - __func__, inet_ntoa_r(mreqs.imr_interface, addrbuf), ifp); + CTR3(KTR_IGMPV3, "%s: imr_interface = 0x%08x, ifp = %p", + __func__, mreqs.imr_interface.s_addr, ifp); break; } @@ -2255,9 +2236,6 @@ inp_leave_group(struct inpcb *inp, struc struct in_multi *inm; size_t idx; int error, is_final; -#ifdef KTR - char addrbuf[INET_ADDRSTRLEN]; -#endif ifp = NULL; error = 0; @@ -2311,8 +2289,8 @@ inp_leave_group(struct inpcb *inp, struc if (!in_nullhost(mreqs.imr_interface)) INADDR_TO_IFP(mreqs.imr_interface, ifp); - CTR3(KTR_IGMPV3, "%s: imr_interface = %s, ifp = %p", - __func__, inet_ntoa_r(mreqs.imr_interface, addrbuf), ifp); + CTR3(KTR_IGMPV3, "%s: imr_interface = 0x%08x, ifp = %p", + __func__, mreqs.imr_interface.s_addr, ifp); break; @@ -2392,8 +2370,8 @@ inp_leave_group(struct inpcb *inp, struc } ims = imo_match_source(imo, idx, &ssa->sa); if (ims == NULL) { - CTR3(KTR_IGMPV3, "%s: source %s %spresent", __func__, - inet_ntoa_r(ssa->sin.sin_addr, addrbuf), "not "); + CTR3(KTR_IGMPV3, "%s: source 0x%08x %spresent", + __func__, ssa->sin.sin_addr.s_addr, "not "); error = EADDRNOTAVAIL; goto out_inp_locked; } @@ -2475,9 +2453,6 @@ inp_set_multicast_if(struct inpcb *inp, struct ifnet *ifp; struct ip_moptions *imo; int error; -#ifdef KTR - char addrbuf[INET_ADDRSTRLEN]; -#endif if (sopt->sopt_valsize == sizeof(struct ip_mreqn)) { /* @@ -2515,8 +2490,8 @@ inp_set_multicast_if(struct inpcb *inp, if (ifp == NULL) return (EADDRNOTAVAIL); } - CTR3(KTR_IGMPV3, "%s: ifp = %p, addr = %s", __func__, ifp, - inet_ntoa_r(addr, addrbuf)); + CTR3(KTR_IGMPV3, "%s: ifp = %p, addr = 0x%08x", __func__, ifp, + addr.s_addr); } /* Reject interfaces which do not support multicast. */ @@ -2874,9 +2849,6 @@ sysctl_ip_mcast_filters(SYSCTL_HANDLER_A int retval; u_int namelen; uint32_t fmode, ifindex; -#ifdef KTR - char addrbuf[INET_ADDRSTRLEN]; -#endif name = (int *)arg1; namelen = arg2; @@ -2896,8 +2868,8 @@ sysctl_ip_mcast_filters(SYSCTL_HANDLER_A group.s_addr = name[1]; if (!IN_MULTICAST(ntohl(group.s_addr))) { - CTR2(KTR_IGMPV3, "%s: group %s is not multicast", - __func__, inet_ntoa_r(group, addrbuf)); + CTR2(KTR_IGMPV3, "%s: group 0x%08x is not multicast", + __func__, group.s_addr); return (EINVAL); } @@ -2928,12 +2900,8 @@ sysctl_ip_mcast_filters(SYSCTL_HANDLER_A if (retval != 0) break; RB_FOREACH(ims, ip_msource_tree, &inm->inm_srcs) { -#ifdef KTR - struct in_addr ina; - ina.s_addr = htonl(ims->ims_haddr); - CTR2(KTR_IGMPV3, "%s: visit node %s", __func__, - inet_ntoa_r(ina, addrbuf)); -#endif + CTR2(KTR_IGMPV3, "%s: visit node 0x%08x", __func__, + htonl(ims->ims_haddr)); /* * Only copy-out sources which are in-mode. */ Modified: head/sys/netinet/ip_mroute.c ============================================================================== --- head/sys/netinet/ip_mroute.c Tue Mar 14 18:08:32 2017 (r315276) +++ head/sys/netinet/ip_mroute.c Tue Mar 14 18:27:48 2017 (r315277) @@ -845,9 +845,6 @@ add_vif(struct vifctl *vifcp) struct ifaddr *ifa; struct ifnet *ifp; int error; -#ifdef KTR - char addrbuf[INET_ADDRSTRLEN]; -#endif VIF_LOCK(); if (vifcp->vifc_vifi >= MAXVIFS) { @@ -931,8 +928,8 @@ add_vif(struct vifctl *vifcp) VIF_UNLOCK(); - CTR4(KTR_IPMF, "%s: add vif %d laddr %s thresh %x", __func__, - (int)vifcp->vifc_vifi, inet_ntoa_r(vifcp->vifc_lcl_addr, addrbuf), + CTR4(KTR_IPMF, "%s: add vif %d laddr 0x%08x thresh %x", __func__, + (int)vifcp->vifc_vifi, vifcp->vifc_lcl_addr.s_addr, (int)vifcp->vifc_threshold); return 0; @@ -1055,9 +1052,6 @@ add_mfc(struct mfcctl2 *mfccp) struct rtdetq *rte, *nrte; u_long hash = 0; u_short nstl; -#ifdef KTR - char addrbuf[INET_ADDRSTRLEN]; -#endif VIF_LOCK(); MFC_LOCK(); @@ -1066,8 +1060,8 @@ add_mfc(struct mfcctl2 *mfccp) /* If an entry already exists, just update the fields */ if (rt) { - CTR4(KTR_IPMF, "%s: update mfc orig %s group %lx parent %x", - __func__, inet_ntoa_r(mfccp->mfcc_origin, addrbuf), + CTR4(KTR_IPMF, "%s: update mfc orig 0x%08x group %lx parent %x", + __func__, mfccp->mfcc_origin.s_addr, (u_long)ntohl(mfccp->mfcc_mcastgrp.s_addr), mfccp->mfcc_parent); update_mfc_params(rt, mfccp); @@ -1086,8 +1080,8 @@ add_mfc(struct mfcctl2 *mfccp) in_hosteq(rt->mfc_mcastgrp, mfccp->mfcc_mcastgrp) && !TAILQ_EMPTY(&rt->mfc_stall)) { CTR5(KTR_IPMF, - "%s: add mfc orig %s group %lx parent %x qh %p", - __func__, inet_ntoa_r(mfccp->mfcc_origin, addrbuf), + "%s: add mfc orig 0x%08x group %lx parent %x qh %p", + __func__, mfccp->mfcc_origin.s_addr, (u_long)ntohl(mfccp->mfcc_mcastgrp.s_addr), mfccp->mfcc_parent, TAILQ_FIRST(&rt->mfc_stall)); @@ -1161,15 +1155,12 @@ del_mfc(struct mfcctl2 *mfccp) struct in_addr origin; struct in_addr mcastgrp; struct mfc *rt; -#ifdef KTR - char addrbuf[INET_ADDRSTRLEN]; -#endif origin = mfccp->mfcc_origin; mcastgrp = mfccp->mfcc_mcastgrp; - CTR3(KTR_IPMF, "%s: delete mfc orig %s group %lx", __func__, - inet_ntoa_r(origin, addrbuf), (u_long)ntohl(mcastgrp.s_addr)); + CTR3(KTR_IPMF, "%s: delete mfc orig 0x%08x group %lx", __func__, + origin.s_addr, (u_long)ntohl(mcastgrp.s_addr)); MFC_LOCK(); @@ -1232,13 +1223,9 @@ X_ip_mforward(struct ip *ip, struct ifne struct mfc *rt; int error; vifi_t vifi; -#ifdef KTR - char addrbuf[INET_ADDRSTRLEN]; -#endif - CTR3(KTR_IPMF, "ip_mforward: delete mfc orig %s group %lx ifp %p", - inet_ntoa_r(ip->ip_src, addrbuf), (u_long)ntohl(ip->ip_dst.s_addr), - ifp); + CTR3(KTR_IPMF, "ip_mforward: delete mfc orig 0x%08x group %lx ifp %p", + ntohl(ip->ip_src.s_addr), (u_long)ntohl(ip->ip_dst.s_addr), ifp); if (ip->ip_hl < (sizeof(struct ip) + TUNNEL_LEN) >> 2 || ((u_char *)(ip + 1))[1] != IPOPT_LSRR ) { @@ -1300,8 +1287,8 @@ X_ip_mforward(struct ip *ip, struct ifne MRTSTAT_INC(mrts_mfc_misses); MRTSTAT_INC(mrts_no_route); - CTR2(KTR_IPMF, "ip_mforward: no mfc for (%s,%lx)", - inet_ntoa_r(ip->ip_src, addrbuf), (u_long)ntohl(ip->ip_dst.s_addr)); + CTR2(KTR_IPMF, "ip_mforward: no mfc for (0x%08x,%lx)", + ntohl(ip->ip_src.s_addr), (u_long)ntohl(ip->ip_dst.s_addr)); /* * Allocate mbufs early so that we don't do extra work if we are @@ -2583,9 +2570,6 @@ pim_input(struct mbuf **mp, int *offp, i int minlen; int datalen = ntohs(ip->ip_len) - iphlen; int ip_tos; -#ifdef KTR - char addrbuf[INET_ADDRSTRLEN]; -#endif *mp = NULL; @@ -2598,8 +2582,8 @@ pim_input(struct mbuf **mp, int *offp, i */ if (datalen < PIM_MINLEN) { PIMSTAT_INC(pims_rcv_tooshort); - CTR3(KTR_IPMF, "%s: short packet (%d) from %s", - __func__, datalen, inet_ntoa_r(ip->ip_src, addrbuf)); + CTR3(KTR_IPMF, "%s: short packet (%d) from 0x%08x", + __func__, datalen, ntohl(ip->ip_src.s_addr)); m_freem(m); return (IPPROTO_DONE); } @@ -2698,8 +2682,8 @@ pim_input(struct mbuf **mp, int *offp, i reghdr = (u_int32_t *)(pim + 1); encap_ip = (struct ip *)(reghdr + 1); - CTR3(KTR_IPMF, "%s: register: encap ip src %s len %d", - __func__, inet_ntoa_r(encap_ip->ip_src, addrbuf), + CTR3(KTR_IPMF, "%s: register: encap ip src 0x%08x len %d", + __func__, ntohl(encap_ip->ip_src.s_addr), ntohs(encap_ip->ip_len)); /* verify the version number of the inner packet */ @@ -2713,8 +2697,8 @@ pim_input(struct mbuf **mp, int *offp, i /* verify the inner packet is destined to a mcast group */ if (!IN_MULTICAST(ntohl(encap_ip->ip_dst.s_addr))) { PIMSTAT_INC(pims_rcv_badregisters); - CTR2(KTR_IPMF, "%s: bad encap ip dest %s", __func__, - inet_ntoa_r(encap_ip->ip_dst, addrbuf)); + CTR2(KTR_IPMF, "%s: bad encap ip dest 0x%08x", __func__, + ntohl(encap_ip->ip_dst.s_addr)); m_freem(m); return (IPPROTO_DONE); } From owner-svn-src-head@freebsd.org Tue Mar 14 18:29:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6A47D0B118; Tue, 14 Mar 2017 18:29:24 +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 mx1.freebsd.org (Postfix) with ESMTPS id A39F5178D; Tue, 14 Mar 2017 18:29:24 +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 v2EITNgg080408; Tue, 14 Mar 2017 18:29:23 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2EITNSY080407; Tue, 14 Mar 2017 18:29:23 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201703141829.v2EITNSY080407@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Tue, 14 Mar 2017 18:29:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315278 - head/sys/compat/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 18:29:24 -0000 Author: dchagin Date: Tue Mar 14 18:29:23 2017 New Revision: 315278 URL: https://svnweb.freebsd.org/changeset/base/315278 Log: Fix usage of the same 'i' variable in the external and nested loops. Submitted by: Svyatoslav Sponsored by: PVS-Studio MFC after: 1 week Modified: head/sys/compat/linux/linux_vdso.c Modified: head/sys/compat/linux/linux_vdso.c ============================================================================== --- head/sys/compat/linux/linux_vdso.c Tue Mar 14 18:27:48 2017 (r315277) +++ head/sys/compat/linux/linux_vdso.c Tue Mar 14 18:29:23 2017 (r315278) @@ -147,7 +147,7 @@ __elfN(linux_vdso_reloc)(struct sysentve Elf_Shdr *shdr; Elf_Dyn *dyn; Elf_Sym *sym; - int i, symcnt; + int i, j, symcnt; ehdr = (Elf_Ehdr *) sv->sv_sigcode; @@ -205,7 +205,7 @@ __elfN(linux_vdso_reloc)(struct sysentve sym = (Elf_Sym *)((caddr_t)ehdr + shdr[i].sh_offset); symcnt = shdr[i].sh_size / sizeof(*sym); - for(i = 0; i < symcnt; i++, sym++) { + for(j = 0; j < symcnt; j++, sym++) { if (sym->st_shndx == SHN_UNDEF || sym->st_shndx == SHN_ABS) continue; From owner-svn-src-head@freebsd.org Tue Mar 14 18:42:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0721D0B653; Tue, 14 Mar 2017 18:42:34 +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 mx1.freebsd.org (Postfix) with ESMTPS id 9AAD59A; Tue, 14 Mar 2017 18:42:34 +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 v2EIgXZw088484; Tue, 14 Mar 2017 18:42:33 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2EIgXj8088480; Tue, 14 Mar 2017 18:42:33 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703141842.v2EIgXj8088480@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 14 Mar 2017 18:42:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315279 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 18:42:35 -0000 Author: mav Date: Tue Mar 14 18:42:33 2017 New Revision: 315279 URL: https://svnweb.freebsd.org/changeset/base/315279 Log: Remove some dead/broken code paths around async handling MFC after: 2 weeks Modified: head/sys/dev/isp/isp.c head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_target.c head/sys/dev/isp/ispvar.h Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Tue Mar 14 18:29:23 2017 (r315278) +++ head/sys/dev/isp/isp.c Tue Mar 14 18:42:33 2017 (r315279) @@ -95,11 +95,11 @@ static const uint8_t alpa_map[] = { /* * Local function prototypes. */ -static int isp_parse_async(ispsoftc_t *, uint16_t); -static int isp_parse_async_fc(ispsoftc_t *, uint16_t); +static void isp_parse_async(ispsoftc_t *, uint16_t); +static void isp_parse_async_fc(ispsoftc_t *, uint16_t); static int isp_handle_other_response(ispsoftc_t *, int, isphdr_t *, uint32_t *); -static void isp_parse_status(ispsoftc_t *, ispstatusreq_t *, XS_T *, long *); static void -isp_parse_status_24xx(ispsoftc_t *, isp24xx_statusreq_t *, XS_T *, long *); +static void isp_parse_status(ispsoftc_t *, ispstatusreq_t *, XS_T *, long *); +static void isp_parse_status_24xx(ispsoftc_t *, isp24xx_statusreq_t *, XS_T *, long *); static void isp_fastpost_complete(ispsoftc_t *, uint32_t); static void isp_scsi_init(ispsoftc_t *); static void isp_scsi_channel_init(ispsoftc_t *, int); @@ -4950,10 +4950,10 @@ again: isp_prt(isp, ISP_LOGWARN, "mailbox cmd (0x%x) with no waiters", info); } } else { - i = IS_FC(isp)? isp_parse_async_fc(isp, info) : isp_parse_async(isp, info); - if (i < 0) { - return; - } + if (IS_FC(isp)) + isp_parse_async_fc(isp, info); + else + isp_parse_async(isp, info); } if ((IS_FC(isp) && info != ASYNC_RIOZIO_STALL) || isp->isp_state != ISP_RUNSTATE) { goto out; @@ -5504,13 +5504,10 @@ isp_prt_endcmd(ispsoftc_t *isp, XS_T *xs /* * Parse an ASYNC mailbox complete - * - * Return non-zero if the event has been acknowledged. */ -static int +static void isp_parse_async(ispsoftc_t *isp, uint16_t mbox) { - int acked = 0; uint32_t h1 = 0, h2 = 0; uint16_t chan = 0; @@ -5529,9 +5526,7 @@ isp_parse_async(ispsoftc_t *isp, uint16_ case ASYNC_BUS_RESET: ISP_SET_SENDMARKER(isp, chan, 1); #ifdef ISP_TARGET_MODE - if (isp_target_async(isp, chan, mbox)) { - acked = 1; - } + isp_target_async(isp, chan, mbox); #endif isp_async(isp, ISPASYNC_BUS_RESET, chan); break; @@ -5551,7 +5546,6 @@ isp_parse_async(ispsoftc_t *isp, uint16_ * restart the firmware */ isp_async(isp, ISPASYNC_FW_CRASH); - acked = 1; break; case ASYNC_RQS_XFER_ERR: @@ -5575,9 +5569,7 @@ isp_parse_async(ispsoftc_t *isp, uint16_ isp_prt(isp, ISP_LOGWARN, "timeout initiated SCSI bus reset of chan %d", chan); ISP_SET_SENDMARKER(isp, chan, 1); #ifdef ISP_TARGET_MODE - if (isp_target_async(isp, chan, mbox)) { - acked = 1; - } + isp_target_async(isp, chan, mbox); #endif break; @@ -5585,9 +5577,7 @@ isp_parse_async(ispsoftc_t *isp, uint16_ isp_prt(isp, ISP_LOGINFO, "device reset on chan %d", chan); ISP_SET_SENDMARKER(isp, chan, 1); #ifdef ISP_TARGET_MODE - if (isp_target_async(isp, chan, mbox)) { - acked = 1; - } + isp_target_async(isp, chan, mbox); #endif break; @@ -5687,14 +5677,12 @@ isp_parse_async(ispsoftc_t *isp, uint16_ } else { isp->isp_intoasync++; } - return (acked); } -static int +static void isp_parse_async_fc(ispsoftc_t *isp, uint16_t mbox) { fcparam *fcp; - int acked = 0; uint16_t chan; if (IS_DUALBUS(isp)) { @@ -5723,7 +5711,6 @@ isp_parse_async_fc(ispsoftc_t *isp, uint * restart the firmware */ isp_async(isp, ISPASYNC_FW_CRASH); - acked = 1; break; case ASYNC_RQS_XFER_ERR: @@ -5756,11 +5743,9 @@ isp_parse_async_fc(ispsoftc_t *isp, uint case ASYNC_CTIO_DONE: #ifdef ISP_TARGET_MODE - if (isp_target_async(isp, (ISP_READ(isp, OUTMAILBOX2) << 16) | ISP_READ(isp, OUTMAILBOX1), mbox)) { - acked = 1; - } else { - isp->isp_fphccmplt++; - } + isp_target_async(isp, (ISP_READ(isp, OUTMAILBOX2) << 16) | + ISP_READ(isp, OUTMAILBOX1), mbox); + isp->isp_fphccmplt++; #else isp_prt(isp, ISP_LOGWARN, "unexpected ASYNC CTIO done"); #endif @@ -5785,9 +5770,7 @@ isp_parse_async_fc(ispsoftc_t *isp, uint ISP_SET_SENDMARKER(isp, chan, 1); isp_async(isp, ISPASYNC_LIP, chan); #ifdef ISP_TARGET_MODE - if (isp_target_async(isp, chan, mbox)) { - acked = 1; - } + isp_target_async(isp, chan, mbox); #endif /* * We've had problems with data corruption occurring on @@ -5841,9 +5824,7 @@ isp_parse_async_fc(ispsoftc_t *isp, uint ISP_SET_SENDMARKER(isp, chan, 1); isp_async(isp, ISPASYNC_LOOP_UP, chan); #ifdef ISP_TARGET_MODE - if (isp_target_async(isp, chan, mbox)) { - acked = 1; - } + isp_target_async(isp, chan, mbox); #endif } break; @@ -5862,9 +5843,7 @@ isp_parse_async_fc(ispsoftc_t *isp, uint fcp->isp_loopstate = LOOP_NIL; isp_async(isp, ISPASYNC_LOOP_DOWN, chan); #ifdef ISP_TARGET_MODE - if (isp_target_async(isp, chan, mbox)) { - acked = 1; - } + isp_target_async(isp, chan, mbox); #endif } break; @@ -5884,9 +5863,7 @@ isp_parse_async_fc(ispsoftc_t *isp, uint fcp->isp_loopstate = LOOP_HAVE_LINK; isp_async(isp, ISPASYNC_LOOP_RESET, chan); #ifdef ISP_TARGET_MODE - if (isp_target_async(isp, chan, mbox)) { - acked = 1; - } + isp_target_async(isp, chan, mbox); #endif } break; @@ -5990,7 +5967,7 @@ isp_parse_async_fc(ispsoftc_t *isp, uint isp->isp_state = ISP_CRASHED; isp_prt(isp, ISP_LOGERR, "FATAL CONNECTION ERROR"); isp_async(isp, ISPASYNC_FW_CRASH); - return (-1); + return; case ISP_CONN_LOOPBACK: isp_prt(isp, ISP_LOGWARN, "Looped Back in Point-to-Point mode"); @@ -6043,7 +6020,6 @@ isp_parse_async_fc(ispsoftc_t *isp, uint if (mbox != ASYNC_CTIO_DONE && mbox != ASYNC_CMD_CMPLT) { isp->isp_intoasync++; } - return (acked); } /* Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Tue Mar 14 18:29:23 2017 (r315278) +++ head/sys/dev/isp/isp_freebsd.c Tue Mar 14 18:42:33 2017 (r315279) @@ -4291,11 +4291,13 @@ changed: mbox6 = 0; } isp_prt(isp, ISP_LOGERR, "Internal Firmware Error on bus %d @ RISC Address 0x%x", mbox6, mbox1); +#if 0 mbox1 = isp->isp_osinfo.mbox_sleep_ok; isp->isp_osinfo.mbox_sleep_ok = 0; isp_reinit(isp, 1); isp->isp_osinfo.mbox_sleep_ok = mbox1; isp_async(isp, ISPASYNC_FW_RESTARTED, NULL); +#endif break; } default: Modified: head/sys/dev/isp/isp_target.c ============================================================================== --- head/sys/dev/isp/isp_target.c Tue Mar 14 18:29:23 2017 (r315278) +++ head/sys/dev/isp/isp_target.c Tue Mar 14 18:42:33 2017 (r315279) @@ -617,7 +617,7 @@ isp_endcmd(ispsoftc_t *isp, ...) * These are either broadcast events or specifically CTIO fast completion */ -int +void isp_target_async(ispsoftc_t *isp, int bus, int event) { isp_notify_t notify; @@ -694,7 +694,6 @@ isp_target_async(ispsoftc_t *isp, int bu } break; } - return (0); } /* Modified: head/sys/dev/isp/ispvar.h ============================================================================== --- head/sys/dev/isp/ispvar.h Tue Mar 14 18:29:23 2017 (r315278) +++ head/sys/dev/isp/ispvar.h Tue Mar 14 18:42:33 2017 (r315279) @@ -1141,9 +1141,7 @@ int isp_endcmd(ispsoftc_t *, ...); /* * Handle an asynchronous event - * - * Return nonzero if the interrupt that generated this event has been dismissed. */ -int isp_target_async(ispsoftc_t *, int, int); +void isp_target_async(ispsoftc_t *, int, int); #endif #endif /* _ISPVAR_H */ From owner-svn-src-head@freebsd.org Tue Mar 14 19:02:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96F1CD0BBE6 for ; Tue, 14 Mar 2017 19:02:36 +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 34DFDC7F for ; Tue, 14 Mar 2017 19:02:35 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: c6e3f79d-08e8-11e7-95b5-6dfd7dbb0ee5 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.eu.mailhop.org (Halon) with ESMTPSA id c6e3f79d-08e8-11e7-95b5-6dfd7dbb0ee5; Tue, 14 Mar 2017 19:02:33 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v2EJ2LTW001759; Tue, 14 Mar 2017 13:02:21 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1489518141.40576.119.camel@freebsd.org> Subject: Re: svn commit: r315277 - in head/sys: dev/cxgb/ulp/iw_cxgb netinet From: Ian Lepore To: Eric van Gyzen , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Tue, 14 Mar 2017 13:02:21 -0600 In-Reply-To: <201703141827.v2EIRmLv080307@repo.freebsd.org> References: <201703141827.v2EIRmLv080307@repo.freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 19:02:36 -0000 On Tue, 2017-03-14 at 18:27 +0000, Eric van Gyzen wrote: > Author: vangyzen > Date: Tue Mar 14 18:27:48 2017 > New Revision: 315277 > URL: https://svnweb.freebsd.org/changeset/base/315277 > > Log: >   KTR: log IPv4 addresses in hex rather than dotted-quad >    Don't all those s_addr fields now need some ntohl() love to print properly as an integer value? -- ian From owner-svn-src-head@freebsd.org Tue Mar 14 19:06:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 914FCD0BD67; Tue, 14 Mar 2017 19:06:46 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6051BF23; Tue, 14 Mar 2017 19:06:46 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2EJ6jSb096683; Tue, 14 Mar 2017 19:06:45 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2EJ6i0x096677; Tue, 14 Mar 2017 19:06:44 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201703141906.v2EJ6i0x096677@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Tue, 14 Mar 2017 19:06:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315280 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 19:06:46 -0000 Author: vangyzen Date: Tue Mar 14 19:06:44 2017 New Revision: 315280 URL: https://svnweb.freebsd.org/changeset/base/315280 Log: When the RTC is adjusted, reevaluate absolute sleep times based on the RTC POSIX 2008 says this about clock_settime(2): If the value of the CLOCK_REALTIME clock is set via clock_settime(), the new value of the clock shall be used to determine the time of expiration for absolute time services based upon the CLOCK_REALTIME clock. This applies to the time at which armed absolute timers expire. If the absolute time requested at the invocation of such a time service is before the new value of the clock, the time service shall expire immediately as if the clock had reached the requested time normally. Setting the value of the CLOCK_REALTIME clock via clock_settime() shall have no effect on threads that are blocked waiting for a relative time service based upon this clock, including the nanosleep() function; nor on the expiration of relative timers based upon this clock. Consequently, these time services shall expire when the requested relative interval elapses, independently of the new or old value of the clock. When the real-time clock is adjusted, such as by clock_settime(3), wake any threads sleeping until an absolute real-clock time. Such a sleep is indicated by a non-zero td_rtcgen. The sleep functions will set that field to zero and return zero to tell the caller to reevaluate its sleep duration based on the new value of the clock. At present, this affects the following functions: pthread_cond_timedwait(3) pthread_mutex_timedlock(3) pthread_rwlock_timedrdlock(3) pthread_rwlock_timedwrlock(3) sem_timedwait(3) sem_clockwait_np(3) I'm working on adding clock_nanosleep(2), which will also be affected. Reported by: Sebastian Huber Reviewed by: jhb, kib MFC after: 2 weeks Relnotes: yes Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D9791 Modified: head/sys/kern/kern_tc.c head/sys/kern/kern_umtx.c head/sys/kern/subr_sleepqueue.c head/sys/sys/proc.h head/sys/sys/sleepqueue.h head/sys/sys/time.h Modified: head/sys/kern/kern_tc.c ============================================================================== --- head/sys/kern/kern_tc.c Tue Mar 14 18:42:33 2017 (r315279) +++ head/sys/kern/kern_tc.c Tue Mar 14 19:06:44 2017 (r315280) @@ -28,7 +28,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include #include @@ -126,6 +128,8 @@ SYSCTL_PROC(_kern_timecounter, OID_AUTO, sysctl_kern_timecounter_adjprecision, "I", "Allowed time interval deviation in percents"); +volatile int rtc_generation = 1; + static int tc_chosen; /* Non-zero if a specific tc was chosen via sysctl. */ static void tc_windup(struct bintime *new_boottimebin); @@ -1261,6 +1265,17 @@ tc_getfrequency(void) return (timehands->th_counter->tc_frequency); } +static bool +sleeping_on_old_rtc(struct thread *td) +{ + + if (td->td_rtcgen != 0 && td->td_rtcgen != rtc_generation) { + td->td_rtcgen = 0; + return (true); + } + return (false); +} + static struct mtx tc_setclock_mtx; MTX_SYSINIT(tc_setclock_init, &tc_setclock_mtx, "tcsetc", MTX_SPIN); @@ -1284,6 +1299,9 @@ tc_setclock(struct timespec *ts) /* XXX fiddle all the little crinkly bits around the fiords... */ tc_windup(&bt); mtx_unlock_spin(&tc_setclock_mtx); + /* Avoid rtc_generation == 0, since td_rtcgen == 0 is special. */ + atomic_add_rel_int(&rtc_generation, 2); + sleepq_chains_remove_matching(sleeping_on_old_rtc); if (timestepwarnings) { nanotime(&taft); log(LOG_INFO, Modified: head/sys/kern/kern_umtx.c ============================================================================== --- head/sys/kern/kern_umtx.c Tue Mar 14 18:42:33 2017 (r315279) +++ head/sys/kern/kern_umtx.c Tue Mar 14 19:06:44 2017 (r315280) @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -70,6 +71,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #ifdef COMPAT_FREEBSD32 @@ -210,6 +212,7 @@ struct umtxq_chain { struct abs_timeout { int clockid; + bool is_abs_real; /* TIMER_ABSTIME && CLOCK_REALTIME* */ struct timespec cur; struct timespec end; }; @@ -257,6 +260,8 @@ SYSCTL_LONG(_debug_umtx, OID_AUTO, max_l static SYSCTL_NODE(_debug_umtx, OID_AUTO, chains, CTLFLAG_RD, 0, "umtx chain stats"); #endif +static void abs_timeout_update(struct abs_timeout *timo); + static void umtx_shm_init(void); static void umtxq_sysinit(void *); static void umtxq_hash(struct umtx_key *key); @@ -772,12 +777,22 @@ abs_timeout_init(struct abs_timeout *tim timo->clockid = clockid; if (!absolute) { - kern_clock_gettime(curthread, clockid, &timo->end); - timo->cur = timo->end; + timo->is_abs_real = false; + abs_timeout_update(timo); + timo->end = timo->cur; timespecadd(&timo->end, timeout); } else { timo->end = *timeout; - kern_clock_gettime(curthread, clockid, &timo->cur); + timo->is_abs_real = clockid == CLOCK_REALTIME || + clockid == CLOCK_REALTIME_FAST || + clockid == CLOCK_REALTIME_PRECISE; + /* + * If is_abs_real, umtxq_sleep will read the clock + * after setting td_rtcgen; otherwise, read it here. + */ + if (!timo->is_abs_real) { + abs_timeout_update(timo); + } } } @@ -831,26 +846,41 @@ umtxq_sleep(struct umtx_q *uq, const cha struct umtxq_chain *uc; int error, timo; + if (abstime != NULL && abstime->is_abs_real) { + curthread->td_rtcgen = atomic_load_acq_int(&rtc_generation); + abs_timeout_update(abstime); + } + uc = umtxq_getchain(&uq->uq_key); UMTXQ_LOCKED_ASSERT(uc); for (;;) { - if (!(uq->uq_flags & UQF_UMTXQ)) - return (0); + if (!(uq->uq_flags & UQF_UMTXQ)) { + error = 0; + break; + } if (abstime != NULL) { timo = abs_timeout_gethz(abstime); - if (timo < 0) - return (ETIMEDOUT); + if (timo < 0) { + error = ETIMEDOUT; + break; + } } else timo = 0; error = msleep(uq, &uc->uc_lock, PCATCH | PDROP, wmesg, timo); - if (error != EWOULDBLOCK) { + if (error == EINTR || error == ERESTART) { umtxq_lock(&uq->uq_key); break; } - if (abstime != NULL) + if (abstime != NULL) { + if (abstime->is_abs_real) + curthread->td_rtcgen = + atomic_load_acq_int(&rtc_generation); abs_timeout_update(abstime); + } umtxq_lock(&uq->uq_key); } + + curthread->td_rtcgen = 0; return (error); } Modified: head/sys/kern/subr_sleepqueue.c ============================================================================== --- head/sys/kern/subr_sleepqueue.c Tue Mar 14 18:42:33 2017 (r315279) +++ head/sys/kern/subr_sleepqueue.c Tue Mar 14 19:06:44 2017 (r315280) @@ -78,6 +78,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include + +#include #include @@ -539,6 +542,7 @@ sleepq_switch(void *wchan, int pri) struct sleepqueue_chain *sc; struct sleepqueue *sq; struct thread *td; + bool rtc_changed; td = curthread; sc = SC_LOOKUP(wchan); @@ -557,9 +561,15 @@ sleepq_switch(void *wchan, int pri) /* * If TDF_TIMEOUT is set, then our sleep has been timed out * already but we are still on the sleep queue, so dequeue the - * thread and return. + * thread and return. Do the same if the real-time clock has + * been adjusted since this thread calculated its timeout + * based on that clock. */ - if (td->td_flags & TDF_TIMEOUT) { + rtc_changed = td->td_rtcgen != 0 && td->td_rtcgen != rtc_generation; + if ((td->td_flags & TDF_TIMEOUT) || rtc_changed) { + if (rtc_changed) { + td->td_rtcgen = 0; + } MPASS(TD_ON_SLEEPQ(td)); sq = sleepq_lookup(wchan); if (sleepq_resume_thread(sq, td, 0)) { @@ -886,6 +896,12 @@ sleepq_signal(void *wchan, int flags, in return (wakeup_swapper); } +static bool +match_any(struct thread *td __unused) +{ + return (true); +} + /* * Resume all threads sleeping on a specified wait channel. */ @@ -893,8 +909,6 @@ int sleepq_broadcast(void *wchan, int flags, int pri, int queue) { struct sleepqueue *sq; - struct thread *td, *tdn; - int wakeup_swapper; CTR2(KTR_PROC, "sleepq_broadcast(%p, %d)", wchan, flags); KASSERT(wchan != NULL, ("%s: invalid NULL wait channel", __func__)); @@ -905,18 +919,33 @@ sleepq_broadcast(void *wchan, int flags, KASSERT(sq->sq_type == (flags & SLEEPQ_TYPE), ("%s: mismatch between sleep/wakeup and cv_*", __func__)); + return (sleepq_remove_matching(sq, queue, match_any, pri)); +} + +/* + * Resume threads on the sleep queue that match the given predicate. + */ +int +sleepq_remove_matching(struct sleepqueue *sq, int queue, + bool (*matches)(struct thread *), int pri) +{ + struct thread *td, *tdn; + int wakeup_swapper; + /* - * Resume all blocked threads on the sleep queue. The last thread will - * be given ownership of sq and may re-enqueue itself before - * sleepq_resume_thread() returns, so we must cache the "next" queue - * item at the beginning of the final iteration. + * The last thread will be given ownership of sq and may + * re-enqueue itself before sleepq_resume_thread() returns, + * so we must cache the "next" queue item at the beginning + * of the final iteration. */ wakeup_swapper = 0; TAILQ_FOREACH_SAFE(td, &sq->sq_blocked[queue], td_slpq, tdn) { thread_lock(td); - wakeup_swapper |= sleepq_resume_thread(sq, td, pri); + if (matches(td)) + wakeup_swapper |= sleepq_resume_thread(sq, td, pri); thread_unlock(td); } + return (wakeup_swapper); } @@ -1052,6 +1081,32 @@ sleepq_abort(struct thread *td, int intr return (sleepq_resume_thread(sq, td, 0)); } +void +sleepq_chains_remove_matching(bool (*matches)(struct thread *)) +{ + struct sleepqueue_chain *sc; + struct sleepqueue *sq; + int i, wakeup_swapper; + + wakeup_swapper = 0; + for (sc = &sleepq_chains[0]; sc < sleepq_chains + SC_TABLESIZE; ++sc) { + if (LIST_EMPTY(&sc->sc_queues)) { + continue; + } + mtx_lock_spin(&sc->sc_lock); + LIST_FOREACH(sq, &sc->sc_queues, sq_hash) { + for (i = 0; i < NR_SLEEPQS; ++i) { + wakeup_swapper |= sleepq_remove_matching(sq, i, + matches, 0); + } + } + mtx_unlock_spin(&sc->sc_lock); + } + if (wakeup_swapper) { + kick_proc0(); + } +} + /* * Prints the stacks of all threads presently sleeping on wchan/queue to * the sbuf sb. Sets count_stacks_printed to the number of stacks actually Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Tue Mar 14 18:42:33 2017 (r315279) +++ head/sys/sys/proc.h Tue Mar 14 19:06:44 2017 (r315280) @@ -148,6 +148,7 @@ struct pargs { * o - ktrace lock * q - td_contested lock * r - p_peers lock + * s - by curthread, or by others when curthread is on sleepqueue * t - thread lock * u - process stat lock * w - process timer lock @@ -283,6 +284,7 @@ struct thread { int td_dom_rr_idx; /* (k) RR Numa domain selection. */ void *td_su; /* (k) FFS SU private */ sbintime_t td_sleeptimo; /* (t) Sleep timeout. */ + int td_rtcgen; /* (s) rtc_generation of abs. sleep */ #define td_endzero td_sigmask /* Copied during fork1() or create_thread(). */ Modified: head/sys/sys/sleepqueue.h ============================================================================== --- head/sys/sys/sleepqueue.h Tue Mar 14 18:42:33 2017 (r315279) +++ head/sys/sys/sleepqueue.h Tue Mar 14 19:06:44 2017 (r315280) @@ -90,11 +90,14 @@ void sleepq_add(void *wchan, struct lock int flags, int queue); struct sleepqueue *sleepq_alloc(void); int sleepq_broadcast(void *wchan, int flags, int pri, int queue); +void sleepq_chains_remove_matching(bool (*matches)(struct thread *)); void sleepq_free(struct sleepqueue *sq); void sleepq_lock(void *wchan); struct sleepqueue *sleepq_lookup(void *wchan); void sleepq_release(void *wchan); void sleepq_remove(struct thread *td, void *wchan); +int sleepq_remove_matching(struct sleepqueue *sq, int queue, + bool (*matches)(struct thread *), int pri); int sleepq_signal(void *wchan, int flags, int pri, int queue); void sleepq_set_timeout_sbt(void *wchan, sbintime_t sbt, sbintime_t pr, int flags); Modified: head/sys/sys/time.h ============================================================================== --- head/sys/sys/time.h Tue Mar 14 18:42:33 2017 (r315279) +++ head/sys/sys/time.h Tue Mar 14 19:06:44 2017 (r315280) @@ -383,6 +383,8 @@ extern struct bintime bt_tickthreshold; extern sbintime_t sbt_timethreshold; extern sbintime_t sbt_tickthreshold; +extern volatile int rtc_generation; + /* * Functions for looking at our clock: [get]{bin,nano,micro}[up]time() * From owner-svn-src-head@freebsd.org Tue Mar 14 19:39:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78135D0CBDD; Tue, 14 Mar 2017 19:39:19 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FF152DE; Tue, 14 Mar 2017 19:39:19 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2EJdIRB009449; Tue, 14 Mar 2017 19:39:18 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2EJdHFV009438; Tue, 14 Mar 2017 19:39:17 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201703141939.v2EJdHFV009438@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 14 Mar 2017 19:39:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315281 - in head/sys: dev/drm dev/drm2 kern vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 19:39:19 -0000 Author: kib Date: Tue Mar 14 19:39:17 2017 New Revision: 315281 URL: https://svnweb.freebsd.org/changeset/base/315281 Log: Use atop() instead of OFF_TO_IDX() for convertion of addresses or addresses offsets, as intended. Suggested and reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/dev/drm/drm_scatter.c head/sys/dev/drm2/drm_scatter.c head/sys/kern/kern_proc.c head/sys/kern/vfs_bio.c head/sys/vm/vm_fault.c head/sys/vm/vm_kern.c head/sys/vm/vm_map.c head/sys/vm/vm_mmap.c head/sys/vm/vm_object.c Modified: head/sys/dev/drm/drm_scatter.c ============================================================================== --- head/sys/dev/drm/drm_scatter.c Tue Mar 14 19:06:44 2017 (r315280) +++ head/sys/dev/drm/drm_scatter.c Tue Mar 14 19:39:17 2017 (r315281) @@ -48,7 +48,7 @@ drm_sg_alloc(struct drm_device *dev, str entry = malloc(sizeof(*entry), DRM_MEM_DRIVER, M_WAITOK | M_ZERO); size = round_page(request->size); - entry->pages = OFF_TO_IDX(size); + entry->pages = atop(size); entry->busaddr = malloc(entry->pages * sizeof(*entry->busaddr), DRM_MEM_SGLISTS, M_WAITOK | M_ZERO); Modified: head/sys/dev/drm2/drm_scatter.c ============================================================================== --- head/sys/dev/drm2/drm_scatter.c Tue Mar 14 19:06:44 2017 (r315280) +++ head/sys/dev/drm2/drm_scatter.c Tue Mar 14 19:39:17 2017 (r315281) @@ -74,7 +74,7 @@ int drm_sg_alloc(struct drm_device *dev, DRM_DEBUG("request size=%ld\n", request->size); size = round_page(request->size); - entry->pages = OFF_TO_IDX(size); + entry->pages = atop(size); entry->busaddr = malloc(entry->pages * sizeof(*entry->busaddr), DRM_MEM_SGLISTS, M_NOWAIT | M_ZERO); if (!entry->busaddr) { Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Tue Mar 14 19:06:44 2017 (r315280) +++ head/sys/kern/kern_proc.c Tue Mar 14 19:39:17 2017 (r315281) @@ -2258,7 +2258,7 @@ kern_proc_vmmap_resident(vm_map_t map, v if (m_adv != NULL) { m = m_adv; } else { - pi_adv = OFF_TO_IDX(entry->end - addr); + pi_adv = atop(entry->end - addr); pindex = pi; for (tobj = obj;; tobj = tobj->backing_object) { m = vm_page_find_least(tobj, pindex); @@ -2282,7 +2282,7 @@ kern_proc_vmmap_resident(vm_map_t map, v (pmap_mincore(map->pmap, addr, &locked_pa) & MINCORE_SUPER) != 0) { kve->kve_flags |= KVME_FLAG_SUPER; - pi_adv = OFF_TO_IDX(pagesizes[1]); + pi_adv = atop(pagesizes[1]); } else { /* * We do not test the found page on validity. Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Tue Mar 14 19:06:44 2017 (r315280) +++ head/sys/kern/vfs_bio.c Tue Mar 14 19:39:17 2017 (r315281) @@ -3894,7 +3894,7 @@ biodone(struct bio *bp) start = trunc_page((vm_offset_t)bp->bio_data); end = round_page((vm_offset_t)bp->bio_data + bp->bio_length); bp->bio_data = unmapped_buf; - pmap_qremove(start, OFF_TO_IDX(end - start)); + pmap_qremove(start, atop(end - start)); vmem_free(transient_arena, start, end - start); atomic_add_int(&inflight_transient_maps, -1); } Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Tue Mar 14 19:06:44 2017 (r315280) +++ head/sys/vm/vm_fault.c Tue Mar 14 19:39:17 2017 (r315281) @@ -1544,7 +1544,7 @@ vm_fault_copy_entry(vm_map_t dst_map, vm * actually shadow anything - we copy the pages directly.) */ dst_object = vm_object_allocate(OBJT_DEFAULT, - OFF_TO_IDX(dst_entry->end - dst_entry->start)); + atop(dst_entry->end - dst_entry->start)); #if VM_NRESERVLEVEL > 0 dst_object->flags |= OBJ_COLORED; dst_object->pg_color = atop(dst_entry->start); Modified: head/sys/vm/vm_kern.c ============================================================================== --- head/sys/vm/vm_kern.c Tue Mar 14 19:06:44 2017 (r315280) +++ head/sys/vm/vm_kern.c Tue Mar 14 19:39:17 2017 (r315281) @@ -165,8 +165,7 @@ kmem_alloc_attr(vmem_t *vmem, vm_size_t vm_paddr_t high, vm_memattr_t memattr) { vm_object_t object = vmem == kmem_arena ? kmem_object : kernel_object; - vm_offset_t addr, i; - vm_ooffset_t offset; + vm_offset_t addr, i, offset; vm_page_t m; int pflags, tries; @@ -179,7 +178,7 @@ kmem_alloc_attr(vmem_t *vmem, vm_size_t for (i = 0; i < size; i += PAGE_SIZE) { tries = 0; retry: - m = vm_page_alloc_contig(object, OFF_TO_IDX(offset + i), + m = vm_page_alloc_contig(object, atop(offset + i), pflags, 1, low, high, PAGE_SIZE, 0, memattr); if (m == NULL) { VM_OBJECT_WUNLOCK(object); @@ -220,8 +219,7 @@ kmem_alloc_contig(struct vmem *vmem, vm_ vm_memattr_t memattr) { vm_object_t object = vmem == kmem_arena ? kmem_object : kernel_object; - vm_offset_t addr, tmp; - vm_ooffset_t offset; + vm_offset_t addr, offset, tmp; vm_page_t end_m, m; u_long npages; int pflags, tries; @@ -235,7 +233,7 @@ kmem_alloc_contig(struct vmem *vmem, vm_ VM_OBJECT_WLOCK(object); tries = 0; retry: - m = vm_page_alloc_contig(object, OFF_TO_IDX(offset), pflags, + m = vm_page_alloc_contig(object, atop(offset), pflags, npages, low, high, alignment, boundary, memattr); if (m == NULL) { VM_OBJECT_WUNLOCK(object); @@ -346,7 +344,7 @@ kmem_back(vm_object_t object, vm_offset_ VM_OBJECT_WLOCK(object); for (i = 0; i < size; i += PAGE_SIZE) { retry: - m = vm_page_alloc(object, OFF_TO_IDX(offset + i), pflags); + m = vm_page_alloc(object, atop(offset + i), pflags); /* * Ran out of space, free everything up and return. Don't need @@ -398,7 +396,7 @@ kmem_unback(vm_object_t object, vm_offse offset = addr - VM_MIN_KERNEL_ADDRESS; VM_OBJECT_WLOCK(object); for (i = 0; i < size; i += PAGE_SIZE) { - m = vm_page_lookup(object, OFF_TO_IDX(offset + i)); + m = vm_page_lookup(object, atop(offset + i)); vm_page_unwire(m, PQ_NONE); vm_page_free(m); } Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Tue Mar 14 19:06:44 2017 (r315280) +++ head/sys/vm/vm_map.c Tue Mar 14 19:39:17 2017 (r315281) @@ -2903,7 +2903,7 @@ vm_map_entry_delete(vm_map_t map, vm_map { vm_object_t object; vm_pindex_t offidxstart, offidxend, count, size1; - vm_ooffset_t size; + vm_size_t size; vm_map_entry_unlink(map, entry); object = entry->object.vm_object; @@ -2920,7 +2920,7 @@ vm_map_entry_delete(vm_map_t map, vm_map KASSERT(entry->cred == NULL || object->cred == NULL || (entry->eflags & MAP_ENTRY_NEEDS_COPY), ("OVERCOMMIT vm_map_entry_delete: both cred %p", entry)); - count = OFF_TO_IDX(size); + count = atop(size); offidxstart = OFF_TO_IDX(entry->offset); offidxend = offidxstart + count; VM_OBJECT_WLOCK(object); Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Tue Mar 14 19:06:44 2017 (r315280) +++ head/sys/vm/vm_mmap.c Tue Mar 14 19:39:17 2017 (r315281) @@ -885,7 +885,7 @@ RestartScan: /* * calculate index into user supplied byte vector */ - vecindex = OFF_TO_IDX(addr - first_addr); + vecindex = atop(addr - first_addr); /* * If we have skipped map entries, we need to make sure that @@ -931,7 +931,7 @@ RestartScan: /* * Zero the last entries in the byte vector. */ - vecindex = OFF_TO_IDX(end - first_addr); + vecindex = atop(end - first_addr); while ((lastvecindex + 1) < vecindex) { ++lastvecindex; error = subyte(vec + lastvecindex, 0); Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Tue Mar 14 19:06:44 2017 (r315280) +++ head/sys/vm/vm_object.c Tue Mar 14 19:39:17 2017 (r315281) @@ -273,16 +273,16 @@ vm_object_init(void) mtx_init(&vm_object_list_mtx, "vm object_list", NULL, MTX_DEF); rw_init(&kernel_object->lock, "kernel vm object"); - _vm_object_allocate(OBJT_PHYS, OFF_TO_IDX(VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS), - kernel_object); + _vm_object_allocate(OBJT_PHYS, atop(VM_MAX_KERNEL_ADDRESS - + VM_MIN_KERNEL_ADDRESS), kernel_object); #if VM_NRESERVLEVEL > 0 kernel_object->flags |= OBJ_COLORED; kernel_object->pg_color = (u_short)atop(VM_MIN_KERNEL_ADDRESS); #endif rw_init(&kmem_object->lock, "kmem vm object"); - _vm_object_allocate(OBJT_PHYS, OFF_TO_IDX(VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS), - kmem_object); + _vm_object_allocate(OBJT_PHYS, atop(VM_MAX_KERNEL_ADDRESS - + VM_MIN_KERNEL_ADDRESS), kmem_object); #if VM_NRESERVLEVEL > 0 kmem_object->flags |= OBJ_COLORED; kmem_object->pg_color = (u_short)atop(VM_MIN_KERNEL_ADDRESS); @@ -1028,7 +1028,7 @@ vm_object_sync(vm_object_t object, vm_oo (void) vn_start_write(vp, &mp, V_WAIT); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); if (syncio && !invalidate && offset == 0 && - OFF_TO_IDX(size) == object->size) { + atop(size) == object->size) { /* * If syncing the whole mapping of the file, * it is faster to schedule all the writes in From owner-svn-src-head@freebsd.org Tue Mar 14 20:31:11 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 742A9D0CB42; Tue, 14 Mar 2017 20:31:11 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 43D442C5; Tue, 14 Mar 2017 20:31:11 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2EKVAcN031236; Tue, 14 Mar 2017 20:31:10 GMT (envelope-from tobik@FreeBSD.org) Received: (from tobik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2EKVAXt031235; Tue, 14 Mar 2017 20:31:10 GMT (envelope-from tobik@FreeBSD.org) Message-Id: <201703142031.v2EKVAXt031235@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tobik set sender to tobik@FreeBSD.org using -f From: Tobias Kortkamp Date: Tue, 14 Mar 2017 20:31:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315283 - head/lib/libsysdecode X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 20:31:11 -0000 Author: tobik (ports committer) Date: Tue Mar 14 20:31:10 2017 New Revision: 315283 URL: https://svnweb.freebsd.org/changeset/base/315283 Log: Fix sysdecode_cap_rights which currently prints bogus capability rights PR: 217787 Reviewed by: jhb, emaste Approved by: jhb Modified: head/lib/libsysdecode/flags.c Modified: head/lib/libsysdecode/flags.c ============================================================================== --- head/lib/libsysdecode/flags.c Tue Mar 14 20:14:57 2017 (r315282) +++ head/lib/libsysdecode/flags.c Tue Mar 14 20:31:10 2017 (r315283) @@ -962,23 +962,15 @@ sysdecode_umtx_rwlock_flags(FILE *fp, u_ return (print_mask_0ul(fp, umtxrwlockflags, flags, rem)); } -/* XXX: This should be in */ -#define CAPMASK(right) ((right) & (((uint64_t)1 << 57) - 1)) - void sysdecode_cap_rights(FILE *fp, cap_rights_t *rightsp) { struct name_table *t; - int idx; bool comma; comma = false; for (t = caprights; t->str != NULL; t++) { - idx = ffs(CAPIDXBIT(t->val)) - 1; - if (CAPARSIZE(rightsp) < idx) - continue; - if ((rightsp->cr_rights[CAPIDXBIT(t->val)] & CAPMASK(t->val)) == - CAPMASK(t->val)) { + if (cap_rights_is_set(rightsp, t->val)) { fprintf(fp, "%s%s", comma ? "," : "", t->str); comma = true; } From owner-svn-src-head@freebsd.org Tue Mar 14 20:57:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4697AD0D77A; Tue, 14 Mar 2017 20:57:56 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 080CD188B; Tue, 14 Mar 2017 20:57:55 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2EKvtSf043038; Tue, 14 Mar 2017 20:57:55 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2EKvssk043033; Tue, 14 Mar 2017 20:57:54 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201703142057.v2EKvssk043033@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Tue, 14 Mar 2017 20:57:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315286 - in head/sys: dev/cxgb/ulp/iw_cxgb netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 20:57:56 -0000 Author: vangyzen Date: Tue Mar 14 20:57:54 2017 New Revision: 315286 URL: https://svnweb.freebsd.org/changeset/base/315286 Log: Add some ntohl() love to r315277 inet_ntoa() and inet_ntoa_r() take the address in network byte-order. When I removed those calls, I should have replaced them with ntohl() to make the hex addresses slightly less unreadable. Here they are. See r315277 regarding classic blunders. vangyzen: you're deep in "no good deed" territory, it seems --badger Reported by: ian MFC after: 3 days MFC when: I finally get it right Sponsored by: Dell EMC Modified: head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c head/sys/netinet/igmp.c head/sys/netinet/in_mcast.c head/sys/netinet/ip_mroute.c Modified: head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c ============================================================================== --- head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c Tue Mar 14 20:43:04 2017 (r315285) +++ head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c Tue Mar 14 20:57:54 2017 (r315286) @@ -1479,7 +1479,8 @@ process_data(struct iwch_ep *ep) in_getsockaddr(ep->com.so, (struct sockaddr **)&local); in_getpeeraddr(ep->com.so, (struct sockaddr **)&remote); CTR3(KTR_IW_CXGB, "%s local 0x%08x remote 0x%08x", __FUNCTION__, - local->sin_addr.s_addr, remote->sin_addr.s_addr); + ntohl(local->sin_addr.s_addr), + ntohl(remote->sin_addr.s_addr)); ep->com.local_addr = *local; ep->com.remote_addr = *remote; free(local, M_SONAME); @@ -1538,7 +1539,7 @@ process_newconn(struct iw_cm_id *parent_ in_getpeeraddr(child_so, (struct sockaddr **)&remote); CTR3(KTR_IW_CXGB, "%s remote addr 0x%08x port %d", __FUNCTION__, - remote->sin_addr.s_addr, ntohs(remote->sin_port)); + ntohl(remote->sin_addr.s_addr), ntohs(remote->sin_port)); child_ep->com.tdev = parent_ep->com.tdev; child_ep->com.local_addr.sin_family = parent_ep->com.local_addr.sin_family; child_ep->com.local_addr.sin_port = parent_ep->com.local_addr.sin_port; Modified: head/sys/netinet/igmp.c ============================================================================== --- head/sys/netinet/igmp.c Tue Mar 14 20:43:04 2017 (r315285) +++ head/sys/netinet/igmp.c Tue Mar 14 20:57:54 2017 (r315286) @@ -863,7 +863,7 @@ igmp_input_v2_query(struct ifnet *ifp, c if (inm != NULL) { CTR3(KTR_IGMPV3, "process v2 query 0x%08x on ifp %p(%s)", - igmp->igmp_group.s_addr, ifp, ifp->if_xname); + ntohl(igmp->igmp_group.s_addr), ifp, ifp->if_xname); igmp_v2_update_group(inm, timer); } } @@ -895,7 +895,7 @@ igmp_v2_update_group(struct in_multi *in { CTR4(KTR_IGMPV3, "0x%08x: %s/%s timer=%d", __func__, - inm->inm_addr.s_addr, inm->inm_ifp->if_xname, timer); + ntohl(inm->inm_addr.s_addr), inm->inm_ifp->if_xname, timer); IN_MULTI_LOCK_ASSERT(); @@ -1076,7 +1076,7 @@ igmp_input_v3_query(struct ifnet *ifp, c } } CTR3(KTR_IGMPV3, "process v3 0x%08x query on ifp %p(%s)", - igmpv3->igmp_group.s_addr, ifp, ifp->if_xname); + ntohl(igmpv3->igmp_group.s_addr), ifp, ifp->if_xname); /* * If there is a pending General Query response * scheduled sooner than the selected delay, no @@ -1237,7 +1237,7 @@ igmp_input_v1_report(struct ifnet *ifp, } CTR3(KTR_IGMPV3, "process v1 report 0x%08x on ifp %p(%s)", - igmp->igmp_group.s_addr, ifp, ifp->if_xname); + ntohl(igmp->igmp_group.s_addr), ifp, ifp->if_xname); /* * IGMPv1 report suppression. @@ -1280,7 +1280,7 @@ igmp_input_v1_report(struct ifnet *ifp, case IGMP_AWAKENING_MEMBER: CTR3(KTR_IGMPV3, "report suppressed for 0x%08x on ifp %p(%s)", - igmp->igmp_group.s_addr, ifp, + ntohl(igmp->igmp_group.s_addr), ifp, ifp->if_xname); case IGMP_SLEEPING_MEMBER: inm->inm_state = IGMP_SLEEPING_MEMBER; @@ -1288,7 +1288,7 @@ igmp_input_v1_report(struct ifnet *ifp, case IGMP_REPORTING_MEMBER: CTR3(KTR_IGMPV3, "report suppressed for 0x%08x on ifp %p(%s)", - igmp->igmp_group.s_addr, ifp, + ntohl(igmp->igmp_group.s_addr), ifp, ifp->if_xname); if (igi->igi_version == IGMP_VERSION_1) inm->inm_state = IGMP_LAZY_MEMBER; @@ -1363,7 +1363,7 @@ igmp_input_v2_report(struct ifnet *ifp, ifa_free(&ia->ia_ifa); CTR3(KTR_IGMPV3, "process v2 report 0x%08x on ifp %p(%s)", - igmp->igmp_group.s_addr, ifp, ifp->if_xname); + ntohl(igmp->igmp_group.s_addr), ifp, ifp->if_xname); /* * IGMPv2 report suppression. @@ -1404,7 +1404,7 @@ igmp_input_v2_report(struct ifnet *ifp, case IGMP_AWAKENING_MEMBER: CTR3(KTR_IGMPV3, "report suppressed for 0x%08x on ifp %p(%s)", - igmp->igmp_group.s_addr, ifp, ifp->if_xname); + ntohl(igmp->igmp_group.s_addr), ifp, ifp->if_xname); case IGMP_LAZY_MEMBER: inm->inm_state = IGMP_LAZY_MEMBER; break; @@ -1892,7 +1892,8 @@ igmp_v3_process_group_timers(struct igmp inm_commit(inm); CTR3(KTR_IGMPV3, "%s: T1 -> T0 for 0x%08x/%s", __func__, - inm->inm_addr.s_addr, inm->inm_ifp->if_xname); + ntohl(inm->inm_addr.s_addr), + inm->inm_ifp->if_xname); /* * If we are leaving the group for good, make sure @@ -2340,7 +2341,7 @@ igmp_initial_join(struct in_multi *inm, int error, retval, syncstates; CTR4(KTR_IGMPV3, "%s: initial join 0x%08x on ifp %p(%s)", __func__, - inm->inm_addr.s_addr, inm->inm_ifp, inm->inm_ifp->if_xname); + ntohl(inm->inm_addr.s_addr), inm->inm_ifp, inm->inm_ifp->if_xname); error = 0; syncstates = 1; @@ -2450,7 +2451,7 @@ igmp_initial_join(struct in_multi *inm, if (syncstates) { inm_commit(inm); CTR3(KTR_IGMPV3, "%s: T1 -> T0 for 0x%08x/%s", __func__, - inm->inm_addr.s_addr, inm->inm_ifp->if_xname); + ntohl(inm->inm_addr.s_addr), inm->inm_ifp->if_xname); } return (error); @@ -2466,7 +2467,7 @@ igmp_handle_state_change(struct in_multi int retval; CTR4(KTR_IGMPV3, "%s: state change for 0x%08x on ifp %p(%s)", __func__, - inm->inm_addr.s_addr, inm->inm_ifp, inm->inm_ifp->if_xname); + ntohl(inm->inm_addr.s_addr), inm->inm_ifp, inm->inm_ifp->if_xname); ifp = inm->inm_ifp; @@ -2486,7 +2487,7 @@ igmp_handle_state_change(struct in_multi CTR1(KTR_IGMPV3, "%s: nothing to do", __func__); inm_commit(inm); CTR3(KTR_IGMPV3, "%s: T1 -> T0 for 0x%08x/%s", __func__, - inm->inm_addr.s_addr, inm->inm_ifp->if_xname); + ntohl(inm->inm_addr.s_addr), inm->inm_ifp->if_xname); return (0); } @@ -2525,7 +2526,7 @@ igmp_final_leave(struct in_multi *inm, s syncstates = 1; CTR4(KTR_IGMPV3, "%s: final leave 0x%08x on ifp %p(%s)", - __func__, inm->inm_addr.s_addr, inm->inm_ifp, + __func__, ntohl(inm->inm_addr.s_addr), inm->inm_ifp, inm->inm_ifp->if_xname); IN_MULTI_LOCK_ASSERT(); @@ -2568,7 +2569,7 @@ igmp_final_leave(struct in_multi *inm, s } CTR4(KTR_IGMPV3, "%s: Leaving 0x%08x/%s with %d " "pending retransmissions.", __func__, - inm->inm_addr.s_addr, + ntohl(inm->inm_addr.s_addr), inm->inm_ifp->if_xname, inm->inm_scrv); if (inm->inm_scrv == 0) { inm->inm_state = IGMP_NOT_MEMBER; @@ -2602,10 +2603,11 @@ igmp_final_leave(struct in_multi *inm, s if (syncstates) { inm_commit(inm); CTR3(KTR_IGMPV3, "%s: T1 -> T0 for 0x%08x/%s", __func__, - inm->inm_addr.s_addr, inm->inm_ifp->if_xname); + ntohl(inm->inm_addr.s_addr), inm->inm_ifp->if_xname); inm->inm_st[1].iss_fmode = MCAST_UNDEFINED; CTR3(KTR_IGMPV3, "%s: T1 now MCAST_UNDEFINED for 0x%08x/%s", - __func__, inm->inm_addr.s_addr, inm->inm_ifp->if_xname); + __func__, ntohl(inm->inm_addr.s_addr), + inm->inm_ifp->if_xname); } } @@ -2731,7 +2733,7 @@ igmp_v3_enqueue_group_record(struct mbuf if (type == IGMP_DO_NOTHING) { CTR3(KTR_IGMPV3, "%s: nothing to do for 0x%08x/%s", __func__, - inm->inm_addr.s_addr, inm->inm_ifp->if_xname); + ntohl(inm->inm_addr.s_addr), inm->inm_ifp->if_xname); return (0); } @@ -2745,7 +2747,7 @@ igmp_v3_enqueue_group_record(struct mbuf minrec0len += sizeof(in_addr_t); CTR4(KTR_IGMPV3, "%s: queueing %s for 0x%08x/%s", __func__, - igmp_rec_type_to_str(type), inm->inm_addr.s_addr, + igmp_rec_type_to_str(type), ntohl(inm->inm_addr.s_addr), inm->inm_ifp->if_xname); /* @@ -2834,7 +2836,7 @@ igmp_v3_enqueue_group_record(struct mbuf msrcs = 0; RB_FOREACH_SAFE(ims, ip_msource_tree, &inm->inm_srcs, nims) { CTR2(KTR_IGMPV3, "%s: visit node 0x%08x", __func__, - htonl(ims->ims_haddr)); + ims->ims_haddr); now = ims_get_mode(inm, ims, 1); CTR2(KTR_IGMPV3, "%s: node is %d", __func__, now); if ((now != mode) || @@ -2930,7 +2932,7 @@ igmp_v3_enqueue_group_record(struct mbuf msrcs = 0; RB_FOREACH_FROM(ims, ip_msource_tree, nims) { CTR2(KTR_IGMPV3, "%s: visit node 0x%08x", __func__, - htonl(ims->ims_haddr)); + ims->ims_haddr); now = ims_get_mode(inm, ims, 1); if ((now != mode) || (now == mode && mode == MCAST_UNDEFINED)) { @@ -3122,7 +3124,7 @@ igmp_v3_enqueue_filter_change(struct mbu nims = RB_MIN(ip_msource_tree, &inm->inm_srcs); RB_FOREACH_FROM(ims, ip_msource_tree, nims) { CTR2(KTR_IGMPV3, "%s: visit node 0x%08x", - __func__, htonl(ims->ims_haddr)); + __func__, ims->ims_haddr); now = ims_get_mode(inm, ims, 1); then = ims_get_mode(inm, ims, 0); CTR3(KTR_IGMPV3, "%s: mode: t0 %d, t1 %d", Modified: head/sys/netinet/in_mcast.c ============================================================================== --- head/sys/netinet/in_mcast.c Tue Mar 14 20:43:04 2017 (r315285) +++ head/sys/netinet/in_mcast.c Tue Mar 14 20:57:54 2017 (r315286) @@ -893,7 +893,7 @@ inm_get_source(struct in_multi *inm, con ims = nims; #ifdef KTR CTR3(KTR_IGMPV3, "%s: allocated 0x%08x as %p", __func__, - htonl(haddr), ims); + haddr, ims); #endif } @@ -910,29 +910,24 @@ ims_merge(struct ip_msource *ims, const const int rollback) { int n = rollback ? -1 : 1; -#ifdef KTR - uint32_t addr; - - addr = htonl(ims->ims_haddr); -#endif if (lims->imsl_st[0] == MCAST_EXCLUDE) { CTR3(KTR_IGMPV3, "%s: t1 ex -= %d on 0x%08x", - __func__, n, addr); + __func__, n, ims->ims_haddr); ims->ims_st[1].ex -= n; } else if (lims->imsl_st[0] == MCAST_INCLUDE) { CTR3(KTR_IGMPV3, "%s: t1 in -= %d on 0x%08x", - __func__, n, addr); + __func__, n, ims->ims_haddr); ims->ims_st[1].in -= n; } if (lims->imsl_st[1] == MCAST_EXCLUDE) { CTR3(KTR_IGMPV3, "%s: t1 ex += %d on 0x%08x", - __func__, n, addr); + __func__, n, ims->ims_haddr); ims->ims_st[1].ex += n; } else if (lims->imsl_st[1] == MCAST_INCLUDE) { CTR3(KTR_IGMPV3, "%s: t1 in += %d on 0x%08x", - __func__, n, addr); + __func__, n, ims->ims_haddr); ims->ims_st[1].in += n; } } @@ -1169,7 +1164,7 @@ in_joingroup_locked(struct ifnet *ifp, c IN_MULTI_LOCK_ASSERT(); CTR4(KTR_IGMPV3, "%s: join 0x%08x on %p(%s))", __func__, - gina->s_addr, ifp, ifp->if_xname); + ntohl(gina->s_addr), ifp, ifp->if_xname); error = 0; inm = NULL; @@ -1253,7 +1248,7 @@ in_leavegroup_locked(struct in_multi *in IN_MULTI_LOCK_ASSERT(); CTR5(KTR_IGMPV3, "%s: leave inm %p, 0x%08x/%s, imf %p", __func__, - inm, inm->inm_addr.s_addr, + inm, ntohl(inm->inm_addr.s_addr), (inm_is_ifp_detached(inm) ? "null" : inm->inm_ifp->if_xname), imf); @@ -1387,7 +1382,7 @@ inp_block_unblock_source(struct inpcb *i doblock = 1; CTR3(KTR_IGMPV3, "%s: imr_interface = 0x%08x, ifp = %p", - __func__, mreqs.imr_interface.s_addr, ifp); + __func__, ntohl(mreqs.imr_interface.s_addr), ifp); break; } @@ -1460,7 +1455,7 @@ inp_block_unblock_source(struct inpcb *i ims = imo_match_source(imo, idx, &ssa->sa); if ((ims != NULL && doblock) || (ims == NULL && !doblock)) { CTR3(KTR_IGMPV3, "%s: source 0x%08x %spresent", __func__, - ssa->sin.sin_addr.s_addr, doblock ? "" : "not "); + ntohl(ssa->sin.sin_addr.s_addr), doblock ? "" : "not "); error = EADDRNOTAVAIL; goto out_inp_locked; } @@ -1989,7 +1984,7 @@ inp_join_group(struct inpcb *inp, struct ifp = inp_lookup_mcast_ifp(inp, &gsa->sin, mreqs.imr_interface); CTR3(KTR_IGMPV3, "%s: imr_interface = 0x%08x, ifp = %p", - __func__, mreqs.imr_interface.s_addr, ifp); + __func__, ntohl(mreqs.imr_interface.s_addr), ifp); break; } @@ -2290,7 +2285,7 @@ inp_leave_group(struct inpcb *inp, struc INADDR_TO_IFP(mreqs.imr_interface, ifp); CTR3(KTR_IGMPV3, "%s: imr_interface = 0x%08x, ifp = %p", - __func__, mreqs.imr_interface.s_addr, ifp); + __func__, ntohl(mreqs.imr_interface.s_addr), ifp); break; @@ -2371,7 +2366,7 @@ inp_leave_group(struct inpcb *inp, struc ims = imo_match_source(imo, idx, &ssa->sa); if (ims == NULL) { CTR3(KTR_IGMPV3, "%s: source 0x%08x %spresent", - __func__, ssa->sin.sin_addr.s_addr, "not "); + __func__, ntohl(ssa->sin.sin_addr.s_addr), "not "); error = EADDRNOTAVAIL; goto out_inp_locked; } @@ -2491,7 +2486,7 @@ inp_set_multicast_if(struct inpcb *inp, return (EADDRNOTAVAIL); } CTR3(KTR_IGMPV3, "%s: ifp = %p, addr = 0x%08x", __func__, ifp, - addr.s_addr); + ntohl(addr.s_addr)); } /* Reject interfaces which do not support multicast. */ @@ -2869,7 +2864,7 @@ sysctl_ip_mcast_filters(SYSCTL_HANDLER_A group.s_addr = name[1]; if (!IN_MULTICAST(ntohl(group.s_addr))) { CTR2(KTR_IGMPV3, "%s: group 0x%08x is not multicast", - __func__, group.s_addr); + __func__, ntohl(group.s_addr)); return (EINVAL); } @@ -2901,7 +2896,7 @@ sysctl_ip_mcast_filters(SYSCTL_HANDLER_A break; RB_FOREACH(ims, ip_msource_tree, &inm->inm_srcs) { CTR2(KTR_IGMPV3, "%s: visit node 0x%08x", __func__, - htonl(ims->ims_haddr)); + ims->ims_haddr); /* * Only copy-out sources which are in-mode. */ Modified: head/sys/netinet/ip_mroute.c ============================================================================== --- head/sys/netinet/ip_mroute.c Tue Mar 14 20:43:04 2017 (r315285) +++ head/sys/netinet/ip_mroute.c Tue Mar 14 20:57:54 2017 (r315286) @@ -929,7 +929,7 @@ add_vif(struct vifctl *vifcp) VIF_UNLOCK(); CTR4(KTR_IPMF, "%s: add vif %d laddr 0x%08x thresh %x", __func__, - (int)vifcp->vifc_vifi, vifcp->vifc_lcl_addr.s_addr, + (int)vifcp->vifc_vifi, ntohl(vifcp->vifc_lcl_addr.s_addr), (int)vifcp->vifc_threshold); return 0; @@ -1061,7 +1061,7 @@ add_mfc(struct mfcctl2 *mfccp) /* If an entry already exists, just update the fields */ if (rt) { CTR4(KTR_IPMF, "%s: update mfc orig 0x%08x group %lx parent %x", - __func__, mfccp->mfcc_origin.s_addr, + __func__, ntohl(mfccp->mfcc_origin.s_addr), (u_long)ntohl(mfccp->mfcc_mcastgrp.s_addr), mfccp->mfcc_parent); update_mfc_params(rt, mfccp); @@ -1081,7 +1081,7 @@ add_mfc(struct mfcctl2 *mfccp) !TAILQ_EMPTY(&rt->mfc_stall)) { CTR5(KTR_IPMF, "%s: add mfc orig 0x%08x group %lx parent %x qh %p", - __func__, mfccp->mfcc_origin.s_addr, + __func__, ntohl(mfccp->mfcc_origin.s_addr), (u_long)ntohl(mfccp->mfcc_mcastgrp.s_addr), mfccp->mfcc_parent, TAILQ_FIRST(&rt->mfc_stall)); @@ -1160,7 +1160,7 @@ del_mfc(struct mfcctl2 *mfccp) mcastgrp = mfccp->mfcc_mcastgrp; CTR3(KTR_IPMF, "%s: delete mfc orig 0x%08x group %lx", __func__, - origin.s_addr, (u_long)ntohl(mcastgrp.s_addr)); + ntohl(origin.s_addr), (u_long)ntohl(mcastgrp.s_addr)); MFC_LOCK(); From owner-svn-src-head@freebsd.org Tue Mar 14 21:03:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BCCA5D0DAC2; Tue, 14 Mar 2017 21:03:54 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from smtp.vangyzen.net (hotblack.vangyzen.net [IPv6:2607:fc50:1000:7400:216:3eff:fe72:314f]) by mx1.freebsd.org (Postfix) with ESMTP id A79AB1F53; Tue, 14 Mar 2017 21:03:54 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from sweettea.beer.town (unknown [76.164.8.130]) by smtp.vangyzen.net (Postfix) with ESMTPSA id 25F4856575; Tue, 14 Mar 2017 16:03:48 -0500 (CDT) Subject: Re: svn commit: r315277 - in head/sys: dev/cxgb/ulp/iw_cxgb netinet To: Ian Lepore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201703141827.v2EIRmLv080307@repo.freebsd.org> <1489518141.40576.119.camel@freebsd.org> From: Eric van Gyzen Message-ID: Date: Tue, 14 Mar 2017 16:03:47 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <1489518141.40576.119.camel@freebsd.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 21:03:54 -0000 On 03/14/2017 14:02, Ian Lepore wrote: > On Tue, 2017-03-14 at 18:27 +0000, Eric van Gyzen wrote: >> Author: vangyzen >> Date: Tue Mar 14 18:27:48 2017 >> New Revision: 315277 >> URL: https://svnweb.freebsd.org/changeset/base/315277 >> >> Log: >> KTR: log IPv4 addresses in hex rather than dotted-quad >> > > Don't all those s_addr fields now need some ntohl() love to print > properly as an integer value? *sigh* Yes, of course. Fixed in r315286. Thanks, Ian. How did I get it right in several places in ip_mroute.c, but wrong in all the other places? That was rhetorical. Please, for my sake, don't share your postulations about my malfunctioning brain. Eric From owner-svn-src-head@freebsd.org Tue Mar 14 21:57:08 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A402ED0CF86; Tue, 14 Mar 2017 21:57:08 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 6DD1E1087; Tue, 14 Mar 2017 21:57:07 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id v2ELv6HX001718 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 14 Mar 2017 14:57:07 -0700 (PDT) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id v2ELv6SI001717; Tue, 14 Mar 2017 14:57:06 -0700 (PDT) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 14 Mar 2017 14:57:06 -0700 From: Gleb Smirnoff To: Kristof Provost Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r315136 - head/sys/netpfil/pf Message-ID: <20170314215706.GB1072@FreeBSD.org> References: <201703120542.v2C5gvM4075391@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201703120542.v2C5gvM4075391@repo.freebsd.org> User-Agent: Mutt/1.7.2 (2016-11-26) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 21:57:08 -0000 Kristof, On Sun, Mar 12, 2017 at 05:42:57AM +0000, Kristof Provost wrote: K> Log: K> pf: Fix incorrect rw_sleep() in pf_unload() K> K> When we unload we don't hold the pf_rules_lock, so we cannot call rw_sleep() K> with it, because it would release a lock we do not hold. There's no need for the K> lock either, so we can just tsleep(). K> K> While here also make the same change in pf_purge_thread(), because it explicitly K> takes the lock before rw_sleep() and then immediately releases it afterwards. The correct change would to be grab lock in pf_unload(), exactly as pf_purge_thread() does. With your change you introduces a possible infinite sleep due to race, since there is no timeout and no lock. No... Actually both cases should PF_RULES_WLOCK(), and read/write the pf_end_threads variable under this lock. And use rw_sleep. K> Modified: K> head/sys/netpfil/pf/pf.c K> head/sys/netpfil/pf/pf_ioctl.c K> K> Modified: head/sys/netpfil/pf/pf.c K> ============================================================================== K> --- head/sys/netpfil/pf/pf.c Sun Mar 12 05:36:31 2017 (r315135) K> +++ head/sys/netpfil/pf/pf.c Sun Mar 12 05:42:57 2017 (r315136) K> @@ -1429,9 +1429,7 @@ pf_purge_thread(void *unused __unused) K> u_int idx = 0; K> K> for (;;) { K> - PF_RULES_RLOCK(); K> - rw_sleep(pf_purge_thread, &pf_rules_lock, 0, "pftm", hz / 10); K> - PF_RULES_RUNLOCK(); K> + tsleep(pf_purge_thread, 0, "pftm", hz / 10); K> K> VNET_LIST_RLOCK(); K> VNET_FOREACH(vnet_iter) { K> K> Modified: head/sys/netpfil/pf/pf_ioctl.c K> ============================================================================== K> --- head/sys/netpfil/pf/pf_ioctl.c Sun Mar 12 05:36:31 2017 (r315135) K> +++ head/sys/netpfil/pf/pf_ioctl.c Sun Mar 12 05:42:57 2017 (r315136) K> @@ -3791,7 +3791,7 @@ pf_unload(void) K> pf_end_threads = 1; K> while (pf_end_threads < 2) { K> wakeup_one(pf_purge_thread); K> - rw_sleep(pf_purge_thread, &pf_rules_lock, 0, "pftmo", 0); K> + tsleep(pf_purge_thread, 0, "pftmo", 0); K> } K> K> if (pf_dev != NULL) K> _______________________________________________ K> svn-src-all@freebsd.org mailing list K> https://lists.freebsd.org/mailman/listinfo/svn-src-all K> To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" -- Totus tuus, Glebius. From owner-svn-src-head@freebsd.org Tue Mar 14 22:02:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6BA6CD0D197; Tue, 14 Mar 2017 22:02:04 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 252F21527; Tue, 14 Mar 2017 22:02:04 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2EM23n2072478; Tue, 14 Mar 2017 22:02:03 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2EM22O9072474; Tue, 14 Mar 2017 22:02:02 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201703142202.v2EM22O9072474@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Tue, 14 Mar 2017 22:02:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315287 - in head: share/man/man9 sys/kern sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 22:02:04 -0000 Author: vangyzen Date: Tue Mar 14 22:02:02 2017 New Revision: 315287 URL: https://svnweb.freebsd.org/changeset/base/315287 Log: Add missing pieces of r315280 I moved this branch from github to a private server, and pulled from the wrong one when committing r315280, so I failed to include two recent commits. Thankfully, they were only cosmetic and were included in the review. Specifically: Add documentation, polish comments, and improve style(9). Tested by: pho (r315280) MFC after: 2 weeks Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D9791 Modified: head/share/man/man9/sleep.9 head/sys/kern/kern_tc.c head/sys/kern/subr_sleepqueue.c head/sys/sys/proc.h Modified: head/share/man/man9/sleep.9 ============================================================================== --- head/share/man/man9/sleep.9 Tue Mar 14 20:57:54 2017 (r315286) +++ head/share/man/man9/sleep.9 Tue Mar 14 22:02:02 2017 (r315287) @@ -280,6 +280,21 @@ to pay particular attention to ensure that no other threads wait on the same .Fa chan . +.Pp +If the timeout given by +.Fa timo +or +.Fa sbt +is based on an absolute real-time clock value, +then the thread should copy the global +.Va rtc_generation +into its +.Va td_rtcgen +member before reading the RTC. +If the real-time clock is adjusted, these functions will set +.Va td_rtcgen +to zero and return zero. +The caller should reconsider its orientation with the new RTC value. .Sh RETURN VALUES When awakened by a call to .Fn wakeup @@ -298,6 +313,9 @@ the .Fn msleep_spin , .Fn tsleep , and locking primitive sleep functions return 0. +Zero can also be returned when the real-time clock is adjusted; +see above regarding +.Va td_rtcgen . Otherwise, a non-zero error code is returned. .Sh ERRORS .Fn msleep , Modified: head/sys/kern/kern_tc.c ============================================================================== --- head/sys/kern/kern_tc.c Tue Mar 14 20:57:54 2017 (r315286) +++ head/sys/kern/kern_tc.c Tue Mar 14 22:02:02 2017 (r315287) @@ -1269,6 +1269,15 @@ static bool sleeping_on_old_rtc(struct thread *td) { + /* + * td_rtcgen is modified by curthread when it is running, + * and by other threads in this function. By finding the thread + * on a sleepqueue and holding the lock on the sleepqueue + * chain, we guarantee that the thread is not running and that + * modifying td_rtcgen is safe. Setting td_rtcgen to zero informs + * the thread that it was woken due to a real-time clock adjustment. + * (The declaration of td_rtcgen refers to this comment.) + */ if (td->td_rtcgen != 0 && td->td_rtcgen != rtc_generation) { td->td_rtcgen = 0; return (true); @@ -1299,6 +1308,7 @@ tc_setclock(struct timespec *ts) /* XXX fiddle all the little crinkly bits around the fiords... */ tc_windup(&bt); mtx_unlock_spin(&tc_setclock_mtx); + /* Avoid rtc_generation == 0, since td_rtcgen == 0 is special. */ atomic_add_rel_int(&rtc_generation, 2); sleepq_chains_remove_matching(sleeping_on_old_rtc); Modified: head/sys/kern/subr_sleepqueue.c ============================================================================== --- head/sys/kern/subr_sleepqueue.c Tue Mar 14 20:57:54 2017 (r315286) +++ head/sys/kern/subr_sleepqueue.c Tue Mar 14 22:02:02 2017 (r315287) @@ -561,9 +561,21 @@ sleepq_switch(void *wchan, int pri) /* * If TDF_TIMEOUT is set, then our sleep has been timed out * already but we are still on the sleep queue, so dequeue the - * thread and return. Do the same if the real-time clock has - * been adjusted since this thread calculated its timeout - * based on that clock. + * thread and return. + * + * Do the same if the real-time clock has been adjusted since this + * thread calculated its timeout based on that clock. This handles + * the following race: + * - The Ts thread needs to sleep until an absolute real-clock time. + * It copies the global rtc_generation into curthread->td_rtcgen, + * reads the RTC, and calculates a sleep duration based on that time. + * See umtxq_sleep() for an example. + * - The Tc thread adjusts the RTC, bumps rtc_generation, and wakes + * threads that are sleeping until an absolute real-clock time. + * See tc_setclock() and the POSIX specification of clock_settime(). + * - Ts reaches the code below. It holds the sleepqueue chain lock, + * so Tc has finished waking, so this thread must test td_rtcgen. + * (The declaration of td_rtcgen refers to this comment.) */ rtc_changed = td->td_rtcgen != 0 && td->td_rtcgen != rtc_generation; if ((td->td_flags & TDF_TIMEOUT) || rtc_changed) { @@ -899,6 +911,7 @@ sleepq_signal(void *wchan, int flags, in static bool match_any(struct thread *td __unused) { + return (true); } Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Tue Mar 14 20:57:54 2017 (r315286) +++ head/sys/sys/proc.h Tue Mar 14 22:02:02 2017 (r315287) @@ -148,7 +148,7 @@ struct pargs { * o - ktrace lock * q - td_contested lock * r - p_peers lock - * s - by curthread, or by others when curthread is on sleepqueue + * s - see sleepq_switch(), sleeping_on_old_rtc(), and sleep(9) * t - thread lock * u - process stat lock * w - process timer lock From owner-svn-src-head@freebsd.org Tue Mar 14 22:09:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C920D0D2EF; Tue, 14 Mar 2017 22:09:19 +0000 (UTC) (envelope-from ermal.luci@gmail.com) Received: from mail-it0-x22b.google.com (mail-it0-x22b.google.com [IPv6:2607:f8b0:4001:c0b::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E8B9C1873; Tue, 14 Mar 2017 22:09:18 +0000 (UTC) (envelope-from ermal.luci@gmail.com) Received: by mail-it0-x22b.google.com with SMTP id m27so55969166iti.0; Tue, 14 Mar 2017 15:09:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=6Lbn79Gu5klDLCppl2HDpVWECdh3uhHeVoAAEeQyy5Q=; b=L/j31fUtz6ntguvU2mLeawzFrACHv70E0HqwEK9ySvV8XFEfbEe6NRplYFFHRjEvy1 E+yDJ6aTecFfeCz/bInKuct5hXDChmDjISq+PBkjGAswL1mdKq09j4qgbH+2xzQNEtEP aI+FSFGM+l4TvOurDvFwQNQseFJHP14gKUMlnZKP/itV5edY3ATCCWt6a5XrivQHpvOq QNjYXbrCx3sDfHitPts4v72mzogizLfPTpIKvLql0N0uvDNUEdXYMOEa+6XelcmoLQCs tg6+f5ynTO0PaBaxVw7vexLEkuZ3oE7Keu5Z2IR0ZnFqWKEpzn9es1XGMg1EWGUDjrqI /8Hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=6Lbn79Gu5klDLCppl2HDpVWECdh3uhHeVoAAEeQyy5Q=; b=aA2MP66sU3ybin7f4kUGMGIYT75M8MbbwQefKd88V29X3kw8xaVbtyPIzguMs3lN3P +rSrgxJYxDHhP+zgbulCdphaTastOTCH0Y9AWUaflnq6x3PZAJkB/Ku6gQyJgDSULjJY I6td2pxhcX6nhU2+zQ1ux5XyuGwRKWmLm4JPfivsnTC/svh7owkDPXfrOVCCGrk9pzHE 60RCz3uJxeALnerRReynJjQ6k1Y2BJ+znjlfmfK3CKts+rBr2xFARrveeo6wJrYKveV1 8Ai3vfehzd4mi8Z2cJr8SKYOpsCRVWZMDWa704ln9v/21I1rFji9z0XaEx553miuG9jq xfOw== X-Gm-Message-State: AFeK/H3MzUpq9RLZhhaDLHxzoGjn2xTTgEobHR0q6UYpxOdo/CXjKVb7ZNsJF7FWk9MAPuRk/oAawfqfvrUMVQ== X-Received: by 10.36.153.197 with SMTP id a188mr18757487ite.5.1489529358143; Tue, 14 Mar 2017 15:09:18 -0700 (PDT) MIME-Version: 1.0 Sender: ermal.luci@gmail.com Received: by 10.107.149.135 with HTTP; Tue, 14 Mar 2017 15:09:17 -0700 (PDT) In-Reply-To: <20170314215706.GB1072@FreeBSD.org> References: <201703120542.v2C5gvM4075391@repo.freebsd.org> <20170314215706.GB1072@FreeBSD.org> From: =?UTF-8?Q?Ermal_Lu=C3=A7i?= Date: Tue, 14 Mar 2017 15:09:17 -0700 X-Google-Sender-Auth: lGZM-2-wlZymMIpbxHPnNA4lSO4 Message-ID: Subject: Re: svn commit: r315136 - head/sys/netpfil/pf To: Gleb Smirnoff Cc: Kristof Provost , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 22:09:19 -0000 On Tue, Mar 14, 2017 at 2:57 PM, Gleb Smirnoff wrote: > Kristof, > > On Sun, Mar 12, 2017 at 05:42:57AM +0000, Kristof Provost wrote: > K> Log: > K> pf: Fix incorrect rw_sleep() in pf_unload() > K> > K> When we unload we don't hold the pf_rules_lock, so we cannot call > rw_sleep() > K> with it, because it would release a lock we do not hold. There's no > need for the > K> lock either, so we can just tsleep(). > K> > K> While here also make the same change in pf_purge_thread(), because it > explicitly > K> takes the lock before rw_sleep() and then immediately releases it > afterwards. > > The correct change would to be grab lock in pf_unload(), exactly as > pf_purge_thread() > does. With your change you introduces a possible infinite sleep due to > race, since > there is no timeout and no lock. > > No... Actually both cases should PF_RULES_WLOCK(), and read/write the > pf_end_threads > variable under this lock. And use rw_sleep. > I already provided the same concerns privately and solutions to it. > > K> Modified: > K> head/sys/netpfil/pf/pf.c > K> head/sys/netpfil/pf/pf_ioctl.c > K> > K> Modified: head/sys/netpfil/pf/pf.c > K> ============================================================ > ================== > K> --- head/sys/netpfil/pf/pf.c Sun Mar 12 05:36:31 2017 (r315135) > K> +++ head/sys/netpfil/pf/pf.c Sun Mar 12 05:42:57 2017 (r315136) > K> @@ -1429,9 +1429,7 @@ pf_purge_thread(void *unused __unused) > K> u_int idx = 0; > K> > K> for (;;) { > K> - PF_RULES_RLOCK(); > K> - rw_sleep(pf_purge_thread, &pf_rules_lock, 0, "pftm", hz / > 10); > K> - PF_RULES_RUNLOCK(); > K> + tsleep(pf_purge_thread, 0, "pftm", hz / 10); > K> > K> VNET_LIST_RLOCK(); > K> VNET_FOREACH(vnet_iter) { > K> > K> Modified: head/sys/netpfil/pf/pf_ioctl.c > K> ============================================================ > ================== > K> --- head/sys/netpfil/pf/pf_ioctl.c Sun Mar 12 05:36:31 2017 > (r315135) > K> +++ head/sys/netpfil/pf/pf_ioctl.c Sun Mar 12 05:42:57 2017 > (r315136) > K> @@ -3791,7 +3791,7 @@ pf_unload(void) > K> pf_end_threads = 1; > K> while (pf_end_threads < 2) { > K> wakeup_one(pf_purge_thread); > K> - rw_sleep(pf_purge_thread, &pf_rules_lock, 0, "pftmo", 0); > K> + tsleep(pf_purge_thread, 0, "pftmo", 0); > K> } > K> > K> if (pf_dev != NULL) > K> _______________________________________________ > K> svn-src-all@freebsd.org mailing list > K> https://lists.freebsd.org/mailman/listinfo/svn-src-all > K> To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" > > -- > Totus tuus, Glebius. > > -- > Ermal > From owner-svn-src-head@freebsd.org Tue Mar 14 22:16:13 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F19BD0D4A9; Tue, 14 Mar 2017 22:16:13 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qk0-x234.google.com (mail-qk0-x234.google.com [IPv6:2607:f8b0:400d:c09::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F28F21DB7; Tue, 14 Mar 2017 22:16:12 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-qk0-x234.google.com with SMTP id v127so3443690qkb.2; Tue, 14 Mar 2017 15:16:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=tATd1UjWt7xbeI6kcZsBObh5JYPSOk1VT9LFSz2o51g=; b=FFNTVUtZcrs5DT1b4d5qFkFSFfigT6dOMcw5hwy4AN7WWvEuFJtGIvEA9sxFdkcwhE r0CKfU81/a/qxmqorPKc8C3tf4NRi5NAdgnfObW9z2XZ9X8qLQjkQUHJwnbztvQX/xKI d5tBjbKOuWzgwiGwC1tJl2IQ7FPKADmiQMIAWaAvZNuJeraniRbfR/XX/p4WqX5ghegT bI+kgGtMU4nKv9HAO4MbU40fm+1GwN/4sc2sAeSN3ug5PBOwNen+S1m6h/ADRVNnHIAw ZrvdACyJRCooTvto8sq1xpmVYUoT3ytJ4iizJr8T5fzfv7RndxsvKBKDQPOs7yoFCCE8 Sb9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=tATd1UjWt7xbeI6kcZsBObh5JYPSOk1VT9LFSz2o51g=; b=ulcR3oy1/Az1dwVtOKQgJxXBxbps8Q5VYpHEFN18TzF6ncfx4bCEgVt+tReVg80V9B 1fr7ulHVq88zMvqgv8yrNmtblMWavdrRIu8R8eoeGitY2y9Fdn4E636QA+rhTqogNd24 RxFPPRrACAFeJU+rj9rXMs656hANBexhkNpWCyBpYdE68oFF+7A+4tysdC+t1Po+UrAI ka+iYvHB7flUzAhNCoe5XokC0G1CF73iNFLKWe5p0m76f6jd1gYGu915Ah8es0cAlRMZ zdpKsa3FtXxf7Xfo0DVaoPwaF4z1KuwrrkJYO+F4p4pnlibZTgvRIaYfC8M6+cFaJOV9 lbKw== X-Gm-Message-State: AFeK/H3oF2ZXrhaHR/rWd4Q+k8QCXxyRUH5fxyiLgYdhH2KlzOUjoQe5IALADCtIE+S9PCyre9evKmGgMBrREA== X-Received: by 10.55.58.193 with SMTP id h184mr1341qka.40.1489529771950; Tue, 14 Mar 2017 15:16:11 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.104.200 with HTTP; Tue, 14 Mar 2017 15:16:11 -0700 (PDT) In-Reply-To: <201703141906.v2EJ6i0x096677@repo.freebsd.org> References: <201703141906.v2EJ6i0x096677@repo.freebsd.org> From: Ngie Cooper Date: Tue, 14 Mar 2017 15:16:11 -0700 Message-ID: Subject: Re: svn commit: r315280 - in head/sys: kern sys To: Eric van Gyzen Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 22:16:13 -0000 On Tue, Mar 14, 2017 at 12:06 PM, Eric van Gyzen wrote: > Author: vangyzen > Date: Tue Mar 14 19:06:44 2017 > New Revision: 315280 > URL: https://svnweb.freebsd.org/changeset/base/315280 > > Log: > When the RTC is adjusted, reevaluate absolute sleep times based on the RTC > > POSIX 2008 says this about clock_settime(2): > > If the value of the CLOCK_REALTIME clock is set via clock_settime(), > the new value of the clock shall be used to determine the time > of expiration for absolute time services based upon the > CLOCK_REALTIME clock. This applies to the time at which armed > absolute timers expire. If the absolute time requested at the > invocation of such a time service is before the new value of > the clock, the time service shall expire immediately as if the > clock had reached the requested time normally. > > Setting the value of the CLOCK_REALTIME clock via clock_settime() > shall have no effect on threads that are blocked waiting for > a relative time service based upon this clock, including the > nanosleep() function; nor on the expiration of relative timers > based upon this clock. Consequently, these time services shall > expire when the requested relative interval elapses, independently > of the new or old value of the clock. > > When the real-time clock is adjusted, such as by clock_settime(3), > wake any threads sleeping until an absolute real-clock time. > Such a sleep is indicated by a non-zero td_rtcgen. The sleep functions > will set that field to zero and return zero to tell the caller > to reevaluate its sleep duration based on the new value of the clock. > > At present, this affects the following functions: > > pthread_cond_timedwait(3) > pthread_mutex_timedlock(3) > pthread_rwlock_timedrdlock(3) > pthread_rwlock_timedwrlock(3) > sem_timedwait(3) > sem_clockwait_np(3) > > I'm working on adding clock_nanosleep(2), which will also be affected. > > Reported by: Sebastian Huber > Reviewed by: jhb, kib > MFC after: 2 weeks > Relnotes: yes > Sponsored by: Dell EMC > Differential Revision: https://reviews.freebsd.org/D9791 Thanks for this! I'll take a look at running "open_posix_testsuite" from LTP and (when time/appropriate), I'll help out with integrating in the clock_nanosleep tests from NetBSD (contrib/netbsd-tests/lib/libc/sys/t_clock_nanosleep.c, ). Cheers! -Ngie From owner-svn-src-head@freebsd.org Tue Mar 14 22:25:08 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4567D0D6EB; Tue, 14 Mar 2017 22:25:08 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 A91321294; Tue, 14 Mar 2017 22:25:08 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2EMP7LV082619; Tue, 14 Mar 2017 22:25:07 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2EMP70D082618; Tue, 14 Mar 2017 22:25:07 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201703142225.v2EMP70D082618@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Tue, 14 Mar 2017 22:25:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315288 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 22:25:09 -0000 Author: sbruno Date: Tue Mar 14 22:25:07 2017 New Revision: 315288 URL: https://svnweb.freebsd.org/changeset/base/315288 Log: Change casting to a uintptr_t to be compatible with non-x86 architectures. Submitted by: Matt Macy Reported by: rpokala Sponsored by: Limelight Networks Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Tue Mar 14 22:02:02 2017 (r315287) +++ head/sys/net/iflib.c Tue Mar 14 22:25:07 2017 (r315288) @@ -257,7 +257,7 @@ iflib_get_sctx(if_ctx_t ctx) #define IP_ALIGNED(m) ((((uintptr_t)(m)->m_data) & 0x3) == 0x2) #define CACHE_PTR_INCREMENT (CACHE_LINE_SIZE/sizeof(void*)) -#define CACHE_PTR_NEXT(ptr) ((void *)(((vm_paddr_t)(ptr)+CACHE_LINE_SIZE-1) & (CACHE_LINE_SIZE-1))) +#define CACHE_PTR_NEXT(ptr) ((void *)(((uintptr_t)(ptr)+CACHE_LINE_SIZE-1) & (CACHE_LINE_SIZE-1))) #define LINK_ACTIVE(ctx) ((ctx)->ifc_link_state == LINK_STATE_UP) #define CTX_IS_VF(ctx) ((ctx)->ifc_sctx->isc_flags & IFLIB_IS_VF) From owner-svn-src-head@freebsd.org Tue Mar 14 22:28:35 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B062ED0D79E; Tue, 14 Mar 2017 22:28:35 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qk0-x230.google.com (mail-qk0-x230.google.com [IPv6:2607:f8b0:400d:c09::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6D1041462; Tue, 14 Mar 2017 22:28:35 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-qk0-x230.google.com with SMTP id v127so73589qkb.2; Tue, 14 Mar 2017 15:28:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=G8A1aqI6MBm2ti4S6EcmtBdr9RLyYWH6B8vYa9YIPX0=; b=l4jTUP6dA8T/d4aXAzisoDeHG54fm71fRzTQ6RHkY0L1jDp5H+PON0HkOWloK+cbCw ftls7w8ErFs2oiPAfT49MYMBn1+q3mo4OJlzc4ge6xJyJgA9pWmIw3TvlS5DqmuSxpPW gn9K0BdI2NWPPqLNLbPeTTF4pEkNrHMrNpHbM+UvDZOf0h90McIkEs+wVOfOjgmmY4m3 IMlbfyIRboNQV0+hSt5XdMpDahmsLIb4C6m0r4+aWvaAwlCvgomyNF8i4ebYaO+Jhcy2 bCict40uURXoa/fx2ZaQ5hPrgz32hC82UIb8haO2X/xXbAG/Cl6qaeOKwjK28ITjNHU+ eqqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=G8A1aqI6MBm2ti4S6EcmtBdr9RLyYWH6B8vYa9YIPX0=; b=j8lODSx8vmKR8L6BwtZLK7RyfS3Oj4WSZUVCnE+pL+uc+O1HRsrTMfi5sB9bwG7Ik5 z4BRszaaftm+sckvjETddENhwVPQ7GDNk2bWQO4cF1RHUp8SBCEDcYUPUr06KO5hsbzM 69z8FKRCNgzFc1viE+UEDAhgwqAJpQaBAH/KFbY5cCNSrAB8pxQyUwjhXrLE/vbitEzg 0oUGwfV9icGqqaWnfMKo2dFubVaOXDtjjzuINJSSNPt6L7ii4QyFHt0limMem0p/Dock Og/LNBR3sttg0hPdQm4JlTIGAgssbniyWr2YXYZAmMrmuk/J5sTxO8uP0TcMmANcy+Dk UgSw== X-Gm-Message-State: AFeK/H2bQCOqYmTHk7yHe+7nSwq02xmG8iWC6y9qImmUOiSJFZ9cH8NppqLm7GkJeeSAL1MLYjmrEQDFhV6WBw== X-Received: by 10.55.67.135 with SMTP id q129mr39625qka.98.1489530514530; Tue, 14 Mar 2017 15:28:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.104.200 with HTTP; Tue, 14 Mar 2017 15:28:34 -0700 (PDT) In-Reply-To: <201703141827.v2EIRmLv080307@repo.freebsd.org> References: <201703141827.v2EIRmLv080307@repo.freebsd.org> From: Ngie Cooper Date: Tue, 14 Mar 2017 15:28:34 -0700 Message-ID: Subject: Re: svn commit: r315277 - in head/sys: dev/cxgb/ulp/iw_cxgb netinet To: Eric van Gyzen Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 22:28:35 -0000 On Tue, Mar 14, 2017 at 11:27 AM, Eric van Gyzen wrote: > Author: vangyzen > Date: Tue Mar 14 18:27:48 2017 > New Revision: 315277 > URL: https://svnweb.freebsd.org/changeset/base/315277 > > Log: > KTR: log IPv4 addresses in hex rather than dotted-quad > > When I made the changes in r313821, I fell victim to one of the > classic blunders, the most famous of which is: never get involved > in a land war in Asia. But only slightly less well known is this: > Keep your brain turned on and engaged when making a tedious, sweeping, > mechanical change. KTR can correctly log the immediate integral values > passed to it, as well as constant strings, but not non-constant strings, > since they might change by the time ktrdump retrieves them. Love the Princess Bride reference :). Some might say, bugs like this are, "Inconceivable!" Take care! -Ngie From owner-svn-src-head@freebsd.org Tue Mar 14 23:33:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 535ECD0D930; Tue, 14 Mar 2017 23:33:49 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from mr11p00im-asmtp001.me.com (mr11p00im-asmtp001.me.com [17.110.69.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 335CD16BF; Tue, 14 Mar 2017 23:33:49 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from process-dkim-sign-daemon.mr11p00im-asmtp001.me.com by mr11p00im-asmtp001.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) id <0OMT00900UF8VJ00@mr11p00im-asmtp001.me.com>; Tue, 14 Mar 2017 23:33:23 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mac.com; s=4d515a; t=1489534403; bh=TzjCq8HOnKTE5ZDR55VDTGfPC1mwqhJmHvwXc08kM7U=; h=Date:Subject:From:To:Message-id:MIME-version:Content-type; b=SIBu8rIzYoAqw9rVcpyRegVqf2pIKrM4qR/WO5I1Uv3Yjar1feyngtFOlgZF5c/jj 7i4TUdNhl4701VXTcXQjTMaZ9Z5GV5JXQ5kUWzU9pQkkE8RNNXkb8T+HjZkCNSszz9 ahlbn0EhNIYndOCQPkGC7R9tRwkHH2gmPT5ugFUu87u99deGJ49eFf1EsqBR0zcMQ3 1tOuY/6b4+aNtT1WCXxgT0NL6RgQ23flAb6s8wOnGHOW8VQhJcUsjsIU00X3bSDsWh uelUQCx2o01Ow2Qcp+J2lkTRM+tfYSZC2AHlK/h4vXZV4QZtdZD3pYJ915ZAeB5nOJ PfENwrjop101Q== Received: from icloud.com ([127.0.0.1]) by mr11p00im-asmtp001.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) with ESMTPSA id <0OMT00468W3K8M00@mr11p00im-asmtp001.me.com>; Tue, 14 Mar 2017 23:33:20 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-03-14_12:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1034 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1701120000 definitions=main-1703140182 User-Agent: Microsoft-MacOutlook/f.1f.0.170216 Date: Tue, 14 Mar 2017 16:33:19 -0700 Subject: Re: svn commit: r314646 - head/sys/dev/syscons From: Ravi Pokala Sender: "Pokala, Ravi" To: Bruce Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-id: Thread-topic: svn commit: r314646 - head/sys/dev/syscons References: <201703040847.v248lVZS064744@repo.freebsd.org> In-reply-to: <201703040847.v248lVZS064744@repo.freebsd.org> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 14 Mar 2017 23:33:49 -0000 Hi Bruce, This breaks all sparc64 kernconfs. (And no, this is *not* fixed by r314997.) --- syscons.o --- cc1: warnings being treated as errors /usr/home/rpokala/freebsd/clean/base/head/sys/dev/syscons/syscons.c:261: warning: 'ec_scroffset' defined but not used /usr/home/rpokala/freebsd/clean/base/head/sys/dev/syscons/syscons.c:269: warning: 'fake_main_console' defined but not used *** [syscons.o] Error code 1 Thanks, Ravi (rpokala@) -----Original Message----- From: on behalf of Bruce Evans Date: 2017-03-04, Saturday at 00:47 To: , , Subject: svn commit: r314646 - head/sys/dev/syscons Author: bde Date: Sat Mar 4 08:47:31 2017 New Revision: 314646 URL: https://svnweb.freebsd.org/changeset/base/314646 Log: Implement ec_putc() (emergency kernel [syscons] console putc()) and use it in emergency in sc_cnputc(). Locking fixes in sc_cnputc() previously turned off normal output in near-deadlock conditions and added deferred output which might never be completed. Emergency output goes to the frame buffer using sufficiently atomic non-blocking writes if the console is in text mode (in graphics mode, nothing is done, modulo races setting the graphics mode bit). Screen updates overwrite the emergency output if the emergency condition clears enough to reach them. ec_putc() also works for "early" console output in normal x86 text mode as soon as this mode is initialized (if ever). This uses a hard-coded x86 frame buffer address before cninit() and a hopefully MI address after cninit(). But non-x86 is more likely to not support text mode, when ec_putc() will be null. ec_putc() has no dependencies of syscons before cninit(), and only has them later to track syscons' mode changes. This commit doesn't attach ec_putc() for early use. To test emergency use, put a breakpoint in central syscons output code like sc_puts() and do some user output. The system used to race or deadlock in ddb output soon after entry to ddb. The locking fixes deferred the output until after leaving ddb, so ddb was unusable and you had to try typing c[ontinue] blindly until it exited, or better use a serial console in parallel. Now the output goes to a window in the middle 2/3 of the screen. Scrolling is circular and there is no cursor, but otherwise ec_putc() provides full dumb terminal functionality and very fast output that hides artificates from dumb overwrites. Modified: head/sys/dev/syscons/syscons.c Modified: head/sys/dev/syscons/syscons.c ============================================================================== --- head/sys/dev/syscons/syscons.c Sat Mar 4 08:46:57 2017 (r314645) +++ head/sys/dev/syscons/syscons.c Sat Mar 4 08:47:31 2017 (r314646) @@ -266,6 +266,65 @@ static struct cdevsw consolectl_devsw = .d_name = "consolectl", }; +/* ec -- emergency console. */ + +static u_int ec_scroffset; + +/* + * Fake enough of main_console for ec_putc() to work very early on x86 if + * the kernel starts in normal color text mode. On non-x86, scribbling + * to the x86 normal color text frame buffer's addresses is unsafe, so + * set (likely non-fake) graphics mode to get a null initial ec_putc(). + */ +static scr_stat fake_main_console = { + .scr.vtb_buffer = 0xb8000, + .xsize = 80, + .ysize = 25, +#if !defined(__amd64__) && !defined(__i386__) + .status = GRAPHICS_MODE, +#endif +}; + +#define main_console (sc_console == NULL ? fake_main_console : main_console) + +static void +ec_putc(int c) +{ + u_short *scrptr; + u_int ind; + int attr, column, mysize, width, xsize, yborder, ysize; + + if (main_console.status & GRAPHICS_MODE || + c < 0 || c > 0xff || c == '\a') + return; + xsize = main_console.xsize; + ysize = main_console.ysize; + yborder = ysize / 5; + scrptr = (u_short *)main_console.scr.vtb_buffer + xsize * yborder; + mysize = xsize * (ysize - 2 * yborder); + do { + ind = ec_scroffset; + column = ind % xsize; + width = (c == '\b' ? -1 : c == '\t' ? (column + 8) & ~7 : + c == '\r' ? -column : c == '\n' ? xsize - column : 1); + if (width == 0 || (width < 0 && ind < -width)) + return; + } while (atomic_cmpset_rel_int(&ec_scroffset, ind, ind + width) == 0); + if (c == '\b' || c == '\r') + return; + if (c == '\n') + ind += xsize; /* XXX clearing from new pos is not atomic */ + + attr = sc_kattr(); + if (c == '\t' || c == '\n') + c = ' '; + do + scrptr[ind++ % mysize] = (attr << 8) | c; + while (--width != 0); +} + +#undef main_console + int sc_probe_unit(int unit, int flags) { @@ -1861,10 +1920,13 @@ sc_cnputc(struct consdev *cd, int c) sc_cnputc_log[head % sizeof(sc_cnputc_log)] = c; /* - * If we couldn't open, return to defer output. + * If we couldn't open, do special reentrant output and return to defer + * normal output. */ - if (!st.scr_opened) + if (!st.scr_opened) { + ec_putc(c); return; + } #ifndef SC_NO_HISTORY if (scp == scp->sc->cur_scp && scp->status & SLKED) { From owner-svn-src-head@freebsd.org Wed Mar 15 00:29:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 489FED0D790; Wed, 15 Mar 2017 00:29: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 mx1.freebsd.org (Postfix) with ESMTPS id 03EFF1E4A; Wed, 15 Mar 2017 00:29:28 +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 v2F0TS0a031685; Wed, 15 Mar 2017 00:29:28 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2F0TSSE031684; Wed, 15 Mar 2017 00:29:28 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201703150029.v2F0TSSE031684@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 15 Mar 2017 00:29:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315289 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 00:29:29 -0000 Author: markj Date: Wed Mar 15 00:29:27 2017 New Revision: 315289 URL: https://svnweb.freebsd.org/changeset/base/315289 Log: When draining a callout, don't clear CALLOUT_ACTIVE while it is running. The callout may reschedule itself and execute again before callout_drain() returns, but we should not clear CALLOUT_ACTIVE until the callout is stopped. Tested by: pho MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/sys/kern/kern_timeout.c Modified: head/sys/kern/kern_timeout.c ============================================================================== --- head/sys/kern/kern_timeout.c Tue Mar 14 22:25:07 2017 (r315288) +++ head/sys/kern/kern_timeout.c Wed Mar 15 00:29:27 2017 (r315289) @@ -1254,9 +1254,12 @@ again: if (cc_exec_curr(cc, direct) == c) { /* * Succeed we to stop it or not, we must clear the - * active flag - this is what API users expect. + * active flag - this is what API users expect. If we're + * draining and the callout is currently executing, first wait + * until it finishes. */ - c->c_flags &= ~CALLOUT_ACTIVE; + if ((flags & CS_DRAIN) == 0) + c->c_flags &= ~CALLOUT_ACTIVE; if ((flags & CS_DRAIN) != 0) { /* @@ -1315,6 +1318,7 @@ again: PICKUP_GIANT(); CC_LOCK(cc); } + c->c_flags &= ~CALLOUT_ACTIVE; } else if (use_lock && !cc_exec_cancel(cc, direct) && (drain == NULL)) { From owner-svn-src-head@freebsd.org Wed Mar 15 01:26:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4476BD0A709; Wed, 15 Mar 2017 01:26:49 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [IPv6:2a01:4f8:162:1127::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.codepro.be", Issuer "Gandi Standard SSL CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 10BD01878; Wed, 15 Mar 2017 01:26:49 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from [192.168.8.218] (203.141.139.231.static.zoot.jp [203.141.139.231]) (Authenticated sender: kp) by venus.codepro.be (Postfix) with ESMTPSA id 2ECF61E97C; Wed, 15 Mar 2017 02:26:42 +0100 (CET) From: "Kristof Provost" To: "Gleb Smirnoff" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r315136 - head/sys/netpfil/pf Date: Wed, 15 Mar 2017 10:26:39 +0900 Message-ID: <7B1C8879-E636-4315-99A2-A258AB9AE500@FreeBSD.org> In-Reply-To: <20170314215706.GB1072@FreeBSD.org> References: <201703120542.v2C5gvM4075391@repo.freebsd.org> <20170314215706.GB1072@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Mailer: MailMate (2.0BETAr6080) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 01:26:49 -0000 On 15 Mar 2017, at 6:57, Gleb Smirnoff wrote: > On Sun, Mar 12, 2017 at 05:42:57AM +0000, Kristof Provost wrote: > K> Log: > K> pf: Fix incorrect rw_sleep() in pf_unload() > K> > K> When we unload we don't hold the pf_rules_lock, so we cannot call > rw_sleep() > K> with it, because it would release a lock we do not hold. There's > no need for the > K> lock either, so we can just tsleep(). > K> > K> While here also make the same change in pf_purge_thread(), > because it explicitly > K> takes the lock before rw_sleep() and then immediately releases it > afterwards. > > The correct change would to be grab lock in pf_unload(), exactly as > pf_purge_thread() > does. With your change you introduces a possible infinite sleep due to > race, since > there is no timeout and no lock. > I must be missing something, because I don’t see the race, and don’t see how we could end up with an infinite sleep. Even if pf_purge_thread() somehow misses that pf_end_threads is non-zero (say it was not sleeping but executing the last vnet cleanup after the pf_end_threads check) while pf_unload() calls the wakeup_one(pf_purge_thread) it would still terminate the next time the tsleep() timed out. The only way around that would be to hold the PF_RULES_LOCK() during all of pf_purge_thread() that’s not actually sleeping. That’s non-trivial because pf_purge_unlinked_rules() also takes the PF_RULES_LOCK and there are lock ordering constraints with some of the other locks taken in the other cleanup code. Given that unloading pf is a non-supported development use case (see MOD_QUIESCE in pf_modevent()), I think I’d rather accept the occasional 10 second delay in unloading. There is another issue with unloading (vnet_pf_uninit() gets called after pf_unload(), which means we try to take a destroyed lock), for which I’ll have a patch soon. Regards, Kristof From owner-svn-src-head@freebsd.org Wed Mar 15 01:53:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8554D0ACF3; Wed, 15 Mar 2017 01:53:30 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id 7BB64135E; Wed, 15 Mar 2017 01:53:30 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 6E720105F1F; Wed, 15 Mar 2017 12:53:21 +1100 (AEDT) Date: Wed, 15 Mar 2017 12:53:20 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Eric van Gyzen cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r315277 - in head/sys: dev/cxgb/ulp/iw_cxgb netinet In-Reply-To: <201703141827.v2EIRmLv080307@repo.freebsd.org> Message-ID: <20170315110727.M964@besplex.bde.org> References: <201703141827.v2EIRmLv080307@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=KeqiiUQD c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=wRcB3c5BtoXeLLscNvUA:9 a=Pq97Be7vu5kELnKR:21 a=ugwPLQF33PDyiZ65:21 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 01:53:31 -0000 On Tue, 14 Mar 2017, Eric van Gyzen wrote: > Log: > KTR: log IPv4 addresses in hex rather than dotted-quad > > When I made the changes in r313821, I fell victim to one of the > classic blunders, the most famous of which is: never get involved > in a land war in Asia. But only slightly less well known is this: > Keep your brain turned on and engaged when making a tedious, sweeping, > mechanical change. KTR can correctly log the immediate integral values > passed to it, as well as constant strings, but not non-constant strings, > since they might change by the time ktrdump retrieves them. > > Reported by: glebius > MFC after: 3 days > Sponsored by: Dell EMC The new format is too raw. Hex is just as easy to read as dotted-quad, but inet_ntoa() also does the equivalent of htonl(). Due to not using it, addresses are now printed reversed in most but not all cases on little-endian arches. They should be converted to host byte order using ntohl() except when they are already in host byte order. Old code already prints some addresses using the bad format %lx or worse (this should be 0x%08x like new code) and still does this conversion. This conversion is still correct, except it doesn't do the reversal on little-endian arches, so users would have to guess which cases are reversed. Addresses are sometimes in host byte order to begin with. Old code might print these in hex without conversion, but when it called inet_ntoa() it first converted to network byte order using htonl(). This now gives consistent reversals on little-endian arches. This commit also fixes the style bug of messes from using the badly-designed API inet_ntoa_r(), but not nearby style bugs. > Modified: head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c > ============================================================================== > --- head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c Tue Mar 14 18:08:32 2017 (r315276) > +++ head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c Tue Mar 14 18:27:48 2017 (r315277) > @@ -1481,9 +1478,8 @@ process_data(struct iwch_ep *ep) > */ > in_getsockaddr(ep->com.so, (struct sockaddr **)&local); > in_getpeeraddr(ep->com.so, (struct sockaddr **)&remote); > - CTR3(KTR_IW_CXGB, "%s local %s remote %s", __FUNCTION__, > - inet_ntoa_r(local->sin_addr, local_str), > - inet_ntoa_r(remote->sin_addr, remote_str)); > + CTR3(KTR_IW_CXGB, "%s local 0x%08x remote 0x%08x", __FUNCTION__, > + local->sin_addr.s_addr, remote->sin_addr.s_addr); > ep->com.local_addr = *local; > ep->com.remote_addr = *remote; > free(local, M_SONAME); Still has 3 style bugs: - continuation indent of 8 instead of KNF 4 - obfuscates the function name by not using a string literal - doesn't even spell the obfuscation using its C99 name __func__. CTR*() uses obfuscated macros which prevent checking for printf() format errors. The macros convert all args to u_long, so all formats except %lx are technically broken. Using htonl() would also convert to a consistent type that is technically correct. htonl() used to return long, but it now returns uint32_t, and the type hacks for CTR*() depend on much the same magic as long sort of being the same as uint32_t for the purposes of htonl(). But changing the type of htonl() broke lots of printf() formats, expecially in code that was careful enough to use the right format to print longs. [... another instances of the above style bugs, and more __FUNCTION__'s visible in unchanged code. > Modified: head/sys/netinet/igmp.c > ============================================================================== > --- head/sys/netinet/igmp.c Tue Mar 14 18:08:32 2017 (r315276) > +++ head/sys/netinet/igmp.c Tue Mar 14 18:27:48 2017 (r315277) > @@ -312,17 +312,6 @@ igmp_scrub_context(struct mbuf *m) > m->m_pkthdr.flowid = 0; > } > > -#ifdef KTR > -static __inline char * > -inet_ntoa_haddr(in_addr_t haddr, char *addrbuf) > -{ > - struct in_addr ia; > - > - ia.s_addr = htonl(haddr); > - return (inet_ntoa_r(ia, addrbuf)); > -} > -#endif This did a double reversal on little-endian arches. The first reversal is now done directly. So the order is even more confusing but less MD than I first thought. I think the address now ends up looking consistently backwards on little-endian arches (provided all callers remember to do the above conversion iff their address starts in host byte order). > @@ -875,9 +861,9 @@ igmp_input_v2_query(struct ifnet *ifp, c > */ > inm = inm_lookup(ifp, igmp->igmp_group); > if (inm != NULL) { > - CTR3(KTR_IGMPV3, "process v2 query %s on ifp %p(%s)", > - inet_ntoa_r(igmp->igmp_group, addrbuf), ifp, > - ifp->if_xname); > + CTR3(KTR_IGMPV3, > + "process v2 query 0x%08x on ifp %p(%s)", > + igmp->igmp_group.s_addr, ifp, ifp->if_xname); > igmp_v2_update_group(inm, timer); > } > } This doesn't have the obfuscations to print the function's name, since it doesn't print the name. Like for KASSERT(), the function name probably shouldn't supplied explicitly or omitted explicity fby the caller, but should be supplied automatically like for assert(3), but not as badly implemented as for assert(3). It can be recovered from the program counter in a way that shouldn't pessimize for space or time. For KTR, it seems to be necessary to pessimize in the generated record (if the user wants function names). The program counter would have to be recorded. Always recording it would be shorter than usually recording pointers to the function's name or literal strings. > @@ -907,12 +893,9 @@ out_locked: > static void > igmp_v2_update_group(struct in_multi *inm, const int timer) > { > -#ifdef KTR > - char addrbuf[INET_ADDRSTRLEN]; > -#endif > > - CTR4(KTR_IGMPV3, "%s: %s/%s timer=%d", __func__, > - inet_ntoa_r(inm->inm_addr, addrbuf), inm->inm_ifp->if_xname, timer); > + CTR4(KTR_IGMPV3, "0x%08x: %s/%s timer=%d", __func__, > + inm->inm_addr.s_addr, inm->inm_ifp->if_xname, timer); This uses the usual obfuscation of the function's name. > ... Most calls print the function name using the __func__ obfuscation, and don't have indentation errors, and are prefectly backwards for htonl()/ ntohl(). > ... > Modified: head/sys/netinet/ip_mroute.c > ============================================================================== > --- head/sys/netinet/ip_mroute.c Tue Mar 14 18:08:32 2017 (r315276) > +++ head/sys/netinet/ip_mroute.c Tue Mar 14 18:27:48 2017 (r315277) > @@ -1066,8 +1060,8 @@ add_mfc(struct mfcctl2 *mfccp) > > /* If an entry already exists, just update the fields */ > if (rt) { > - CTR4(KTR_IPMF, "%s: update mfc orig %s group %lx parent %x", > - __func__, inet_ntoa_r(mfccp->mfcc_origin, addrbuf), > + CTR4(KTR_IPMF, "%s: update mfc orig 0x%08x group %lx parent %x", > + __func__, mfccp->mfcc_origin.s_addr, > (u_long)ntohl(mfccp->mfcc_mcastgrp.s_addr), > mfccp->mfcc_parent); > update_mfc_params(rt, mfccp); This one already printed 1 address in confusing hex format with a not-so bogus cast and a confusing host/network conversion for the printing, and and another confusing hex format. The old hex formats are missing 0x prefixes, so are more confusing that before now that there is a hex format not missing the prefix on the same line. ntohl() no longer returns long, but is cast to u_long for portability. This might be best for printf(), but CTR*() does the same cast. The 'l' in %lx is also technically needed and it is not having 'l' for %x in all CTR*() is technically wrong, (ktrdump copies the args to an array of u_long's and then applies the format string to this, and %x's instead of %lx's in it usually work magically) but it is best to consistently omit casts and consistently use wrong %x formats. Finally, the ntohl() is confusing. I think it is actually correct, and is what this commit should have added where inet_ntoa() was used with no htonl() before it. Apparently the variable is in network byte order, and we need to fudge it into host byte order because printf() will convert from host byte order to network byte order. printf() actually converts host integers in host byte order to big-endian order for printing, but since network byte order is big endian this is like htonl() to reverse the ntohl() in the above. Bruce From owner-svn-src-head@freebsd.org Wed Mar 15 05:22:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B248FD0A549; Wed, 15 Mar 2017 05:22:41 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 99D901309; Wed, 15 Mar 2017 05:22:41 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id v2F5MdeV004158 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 14 Mar 2017 22:22:40 -0700 (PDT) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id v2F5Mdgc004157; Tue, 14 Mar 2017 22:22:39 -0700 (PDT) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 14 Mar 2017 22:22:39 -0700 From: Gleb Smirnoff To: Ngie Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r315230 - in head: etc/mtree tests/sys/geom tests/sys/geom/class/eli tests/sys/geom/eli Message-ID: <20170315052239.GC1072@FreeBSD.org> References: <201703140700.v2E70MXc091919@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201703140700.v2E70MXc091919@repo.freebsd.org> User-Agent: Mutt/1.7.2 (2016-11-26) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 05:22:41 -0000 On Tue, Mar 14, 2017 at 07:00:22AM +0000, Ngie Cooper wrote: N> Author: ngie N> Date: Tue Mar 14 07:00:22 2017 N> New Revision: 315230 N> URL: https://svnweb.freebsd.org/changeset/base/315230 N> N> Log: N> Move .../sys/geom/eli/pbkdf2... to .../sys/geom/class/eli/... N> N> This change moves the tests added in r313962 to an existing directory N> structure used by the geli TAP tests. It also, renames the test from N> pbkdf2 to pbkdf2_test . N> N> The changes to ObsoleteFiles.inc are being committed separately as they N> aren't needed for the MFC to ^/stable/11, etc, if the MFC for the tests N> is done all in one commit. N> N> MFC after: 2 weeks N> X-MFC with: r313962, r313972-r313973 N> Reviewed by: allanjude N> Sponsored by: Dell EMC Isilon N> Differential Revision: D9985 This breaks buildworld for a system that doesn't have SYSDIR defined in src.conf, and also doesn't have /usr/src/sys. What happens is that include path is /sys. On some systems this is meaningful, on others not. glebius@morannon:/usr/src/head/tests/sys/geom/class/eli:|>make (cd /usr/src/head/tests/sys/geom/class/eli && DEPENDFILE=.depend.pbkdf2_test NO_SUBDIR=1 make -f /usr/src/head/tests/sys/geom/class/eli/Makefile _RECURSING_PROGS=t PROG=pbkdf2_test ) cc -O2 -pipe -I/sys -g -MD -MF.depend.pbkdf2_test.g_eli_crypto.o -MTg_eli_crypto.o -std=gnu99 -fstack-protector-strong -Qunused-arguments -c /usr/src/head/sys/geom/eli/g_eli_crypto.c -o g_eli_crypto.o In file included from /usr/src/head/sys/geom/eli/g_eli_crypto.c:44: /usr/include/geom/eli/g_eli.h:35:10: fatal error: 'crypto/sha2/sha256.h' file not found #include This also breaks buildworld. -- Totus tuus, Glebius. From owner-svn-src-head@freebsd.org Wed Mar 15 05:31:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3BEDCD0A6FB; Wed, 15 Mar 2017 05:31:04 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02EA015CA; Wed, 15 Mar 2017 05:31:03 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2F5V34E054562; Wed, 15 Mar 2017 05:31:03 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2F5V3aS054561; Wed, 15 Mar 2017 05:31:03 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201703150531.v2F5V3aS054561@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 15 Mar 2017 05:31:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315292 - head/tests/sys/geom/class/eli X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 05:31:04 -0000 Author: glebius Date: Wed Mar 15 05:31:02 2017 New Revision: 315292 URL: https://svnweb.freebsd.org/changeset/base/315292 Log: Fix buildworld broken in r315230 when /sys doesn't point into a right source tree. Usage of SYSDIR is apparently wrong here. Discussed with: allanjude Modified: head/tests/sys/geom/class/eli/Makefile Modified: head/tests/sys/geom/class/eli/Makefile ============================================================================== --- head/tests/sys/geom/class/eli/Makefile Wed Mar 15 04:18:40 2017 (r315291) +++ head/tests/sys/geom/class/eli/Makefile Wed Mar 15 05:31:02 2017 (r315292) @@ -44,7 +44,7 @@ ${PACKAGE}FILES+= conf.sh TEST_METADATA.$t+= required_user="root" .endfor -CFLAGS.pbkdf2_test= -I${SYSDIR}/sys +CFLAGS.pbkdf2_test= -I${SRCTOP}/sys SRCS.pbkdf2_test= \ hmac_test.c \ From owner-svn-src-head@freebsd.org Wed Mar 15 05:45:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C986BD0ACDB; Wed, 15 Mar 2017 05:45:20 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x233.google.com (mail-pf0-x233.google.com [IPv6:2607:f8b0:400e:c00::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9709E1D5F; Wed, 15 Mar 2017 05:45:20 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x233.google.com with SMTP id w189so4167873pfb.0; Tue, 14 Mar 2017 22:45:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=dNZ6hdLr38OwW6r7OPzT1auQahaDr7rA5EgsAgozz7k=; b=Sv/9CMO+u9zzt7Z4dEXH+x0GUHuTu1sn4seBdkzrozElEylbbGrZpizz6NEA3sc0PL wA0idnk0YemOTJ3DaFj+o78vs7SawJiZWWNiKBgKSrYyA1QW6OnaR9OR1+cLQKRuQoP0 D5qdg+RFjHm7Vruiexc6PHNWR+JUcQ6RqEntJst73kC07sBTogurdSK7ai05ueAqcbCE xmWp5mo7g1ba3oo8YGEoWdoF+j6pHyF83hOKPyrCE+OVgwJlG/Ld6AnKY7kuVMAFjZ9o WvC1PeWjWWKRxJAtxdt0MSfpOsCT2pKftrJMqMaV06ApdNvMheotD2W1CyJVt2/qrGH0 y9sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=dNZ6hdLr38OwW6r7OPzT1auQahaDr7rA5EgsAgozz7k=; b=XVyHvKRlORbxhBYTB+RCvBpLSXGnzzSgpODQ0KYYJwhTpgbQHF5Qyzzeciam1eGNyi Ypi8sh3ShMyNsx3vzkc0VY9WECRVZKD5kTsnyHyhQjbR1pE3006wXm4bqC0cVyhjbFEy nV5SndzGNzkAZ31Eh0BeY/wg3FNdKSRHZnp6v+PRQDof5B7qqwUSSRuqmfPySXSen7sO gKQ0sDVN30WEz1BNuY4xbTprK3kq890AwKEKhlEkV0xisGYE4W6q0BAzvEyM85oZAtBW /4YQyWtFW19uJV6acJUDUV/PplEAYDPg/jasilFCFlVvAUvdmQzlEambczhAUvtqKau3 eTOQ== X-Gm-Message-State: AFeK/H3yuODetQeWzC34lI6biI1qCcto3UvBGYv2Eeqvia72JewS+oi8qpt2rtwYBdxt/A== X-Received: by 10.98.65.211 with SMTP id g80mr1647470pfd.187.1489556719989; Tue, 14 Mar 2017 22:45:19 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id y184sm1353808pfg.86.2017.03.14.22.45.19 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 14 Mar 2017 22:45:19 -0700 (PDT) Subject: Re: svn commit: r315292 - head/tests/sys/geom/class/eli Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_4026DE0B-6FFF-4D0C-A039-DCC4EEAFA2E4"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201703150531.v2F5V3aS054561@repo.freebsd.org> Date: Tue, 14 Mar 2017 22:45:17 -0700 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <8F707A90-15BE-4AF0-932E-3A6BC5ED94B0@gmail.com> References: <201703150531.v2F5V3aS054561@repo.freebsd.org> To: Gleb Smirnoff X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 05:45:20 -0000 --Apple-Mail=_4026DE0B-6FFF-4D0C-A039-DCC4EEAFA2E4 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii > On Mar 14, 2017, at 22:31, Gleb Smirnoff wrote: > > Author: glebius > Date: Wed Mar 15 05:31:02 2017 > New Revision: 315292 > URL: https://svnweb.freebsd.org/changeset/base/315292 > > Log: > Fix buildworld broken in r315230 when /sys doesn't point into a right > source tree. Usage of SYSDIR is apparently wrong here. > > Discussed with: allanjude Apologies and thank you for fixing that obvious mistake. -Ngie --Apple-Mail=_4026DE0B-6FFF-4D0C-A039-DCC4EEAFA2E4 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYyNTuAAoJEPWDqSZpMIYV3WYQAJyWsmzLF6mVWLWF8pY0Gp1a n+/BK1mG7Hv1rlJRomWdp88uhDqMwJcdyVSfPKE97CtC8DhzLMmxEJJDotxytiMA TSnLbTa3mmu1Z6m1JfGtjEIidtbMls6h93ZtepIY3vzS4LcUmnWho788fWM5ngh8 S7CaQ3LTi+yy+gKGbLUgHsJ5gmyNDVzlfv5NH0J577SGY5Dp3N4LJfBiPWwy8IHV MXNaeGRYgaZpDTwVKJdJFGrlSIGJwGSgFJNPGsvwAkksGcJX5NNCR+H02zLtXkvt fi8XypRcmhPxJ+cVtMICIzQt3RktX4r9D3sUFkwx9YRiL9JmwsJVOkvmD5mRBdjQ fkmMcKryE+TyzQP8lNVWlX/qysVaPoseP0ucq+4DmaPMA0tIGj9cg3kBxV4KlCVe oUa4x6hem/kezgmiI1h0LvSN1LSXc5kGV5xCdqEWGP35M2EmBZt306aFS6uxz6CI qejTI9iVlLtx23f7MnoenRF2HVzj5PdZ/vgjHfSQws7pitvapTjNCst97TdpkjuY V9IDQiJCi+WsrJn6KQl49g89gP5T6RapRK/JklgnMr3x9JtkopOdbGFmyQdenGr8 CqOxCSEt1GBqRE/IDfqoDjcxxfB/58GBA9FNJclYz1M8ZBkYS/U7rMpCSXyvzPwk 2U60mEIcb26+6GC/j/gU =FHu8 -----END PGP SIGNATURE----- --Apple-Mail=_4026DE0B-6FFF-4D0C-A039-DCC4EEAFA2E4-- From owner-svn-src-head@freebsd.org Wed Mar 15 06:02:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7BE3FD0B080; Wed, 15 Mar 2017 06:02:15 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com [IPv6:2607:f8b0:400e:c00::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4149E15B0; Wed, 15 Mar 2017 06:02:15 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x244.google.com with SMTP id o126so1056738pfb.1; Tue, 14 Mar 2017 23:02:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=3q+9UFcZwlWreIIv5hweJ7adRFNQvisrV6J4G4IVGQA=; b=jfbZHqz3iTiwXOvlLPjfBfkFxrj3gm9o8gOokCtX57Ic0d9WDtqrmeksKACGNITKgv 9sV11sDoFeCipz+iet11AJVyKhodDsQWc1BIUVG8walP31pLN/Jl5HWK4dsRzmbwpRzF Si/ur+OgpYFB/0CO4wH18Ik2+6yw74HkLBKQV8ReDKFce2oAYy6ObfUClzf0R9N9q5Y+ EvGKAurOtShBQ7yJTenTDBcxyJmUsg8AnuoLvISAIJxOiVFtDhY5r8cah6C7eX3wLEyT ZT5z/0AZj7H83maOiEED5luOzgkoq+mCkODjIdYkpkzYZTW5uliu2rG2EMvElB+CudcZ 9LbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=3q+9UFcZwlWreIIv5hweJ7adRFNQvisrV6J4G4IVGQA=; b=XiWPlCfmFBfDmQaaldEzcrZ07vNkuP0x5puk20zm2IK5cR5VQIwS184UMSgCLaWZvc RGAdFy80HPkvlspDYCe5nnCgQ9m4Ec4ljEqPgKjsCc2RnTQg6MoCsostPN8CoRjm0p75 L8NK7af5FQknn95HyA8HWSBLB8xtiMjhgeJbTkPolL5gxPWJ79LLOene11mr/HMXBq77 UoiSLIVJCQ7OFCsXiRmbyZzKmMkJiVxfPaeX3epvNdGzz3V/PdIYP2D1D467vhWDuuXH p5T/VEGmwYM+B+90qf2KC8Eo14hSZiD6OcA9lRkt9JPHFuJpHtEgk4wWZjyhOgOH795G n1gw== X-Gm-Message-State: AFeK/H0UAO6kr2GSMiz5l0DMiZLwSJwWix4EjWZutmZ+hxVo3GoFjS5LGpB4D8xLBh/bJA== X-Received: by 10.99.102.135 with SMTP id a129mr1691277pgc.220.1489557734350; Tue, 14 Mar 2017 23:02:14 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id j62sm1474791pgc.54.2017.03.14.23.02.13 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 14 Mar 2017 23:02:13 -0700 (PDT) Subject: Re: svn commit: r315051 - in head: . gnu/usr.bin gnu/usr.bin/diff usr.bin usr.bin/diff usr.bin/diff/tests Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_BACBD6CE-CA76-4C76-904B-1D81BF97B362"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201703110501.v2B51UJQ045535@repo.freebsd.org> Date: Tue, 14 Mar 2017 23:02:12 -0700 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <3A41B310-CDCE-4CA5-9155-3621E55AA8CF@gmail.com> References: <201703110501.v2B51UJQ045535@repo.freebsd.org> To: Baptiste Daroussin X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 06:02:15 -0000 --Apple-Mail=_BACBD6CE-CA76-4C76-904B-1D81BF97B362 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Mar 10, 2017, at 21:01, Baptiste Daroussin = wrote: >=20 > Author: bapt > Date: Sat Mar 11 05:01:29 2017 > New Revision: 315051 > URL: https://svnweb.freebsd.org/changeset/base/315051 >=20 > Log: > Import diff from OpenBSD and remove GNU diff >=20 > Some of the modifications from the previous summer of code has been = integrated > Modification for compatibility with GNU diff output has been added >=20 > Main difference with OpenBSD: > Implement multiple GNU diff options: > * --ignore-file-name-case > * --no-ignore-file-name-case > * --normal > * --tabsize > * --strip-trailing-cr > Make diff -p compatible with GNU diff > Implement diff -l > Make diff -r compatible with GNU diff >=20 > Capsicumize diffing 2 regular files > Add a simple test suite >=20 > Approved by: AsiaBSDcon devsummit > Obtained from: OpenBSD, GSoC > Relnotes: yes etcupdate(8) is broken after this commit, along with commands = that implement --*group-format=3D: = https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D217795 . Cheers, -Ngie --Apple-Mail=_BACBD6CE-CA76-4C76-904B-1D81BF97B362 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYyNjkAAoJEPWDqSZpMIYVIvsP/0S5whGKR8nFexrxIKyrQeS8 TNVuMPU0OGNbMx/Dky27mIfJBU7E73t4gH1GrDxgpDxOvt3lC9AzzKPTIrbZxf8m rqFaLWv3HQAHHc3t9PwQoLu8vWEfOCaU+okOfBg1iucU5Do7O8/+qSVRbfHgFdw9 16pI5V++E22//paY/0/FDdvGTzvcDQv8x0L0Jobp+9Q8WKyFddJYl+0EXuC76dAr 3EK3Y2oBryz8n9crU3OVu1nFwoiXO/HAFnQSYbaBIN4qkA0Sdwte0H/6Bj/EzpfP zOGXLp2l6CxARjDE0XkTiIwqAC3CAlzVAdU8YF+sBEjtIb1lauMbncVH7gGnq+cg sxB3w0vWx6pHTt8dvKT/JRYzraGwYTvpqofCJJNNYl/UrqkyEHmqC8WeB8nS4Uxo d4DHIZx8MDKvtuYGNG5zbqEaeYMJyW6NSBH+sV/0hIthts2AnjfXcjUOZme7d2Eh 2TgzqO4AIyfWr3eibEnFCZyYRTwWz31xZO8/JfIJo+SR5ZKchFshCqmNRUYmvBSP I0At0WHRsYCTLyeXgT6jn6FeeP3kzNz8w4v+G3Vt8od745H7YEWhKCRwjhECiZnQ EuRC8kgkzJ24kYYAV95u2ypYePlq7dx6ehZVpJvCuRvD/UBJ5GQyNYAzOqcdm50s aZeQ7jQO2oxy/9pZ3TVa =TFRz -----END PGP SIGNATURE----- --Apple-Mail=_BACBD6CE-CA76-4C76-904B-1D81BF97B362-- From owner-svn-src-head@freebsd.org Wed Mar 15 06:18:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3757D0B5CA; Wed, 15 Mar 2017 06:18:15 +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 mx1.freebsd.org (Postfix) with ESMTPS id 9333B1D0E; Wed, 15 Mar 2017 06:18:15 +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 v2F6IEck073724; Wed, 15 Mar 2017 06:18:14 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2F6IExf073723; Wed, 15 Mar 2017 06:18:14 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703150618.v2F6IExf073723@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 15 Mar 2017 06:18:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315293 - head/usr.bin/diff/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 06:18:15 -0000 Author: ngie Date: Wed Mar 15 06:18:14 2017 New Revision: 315293 URL: https://svnweb.freebsd.org/changeset/base/315293 Log: Integrate contrib/netbsd-tests/usr.bin/diff/t_diff.sh in as .../usr.bin/diff/diff_test Some minor adjustment needed to be done for :same as it currently has the test script hardcoded into the test, instead of using an idiom like $(dirname $0) MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/usr.bin/diff/tests/Makefile Modified: head/usr.bin/diff/tests/Makefile ============================================================================== --- head/usr.bin/diff/tests/Makefile Wed Mar 15 05:31:02 2017 (r315292) +++ head/usr.bin/diff/tests/Makefile Wed Mar 15 06:18:14 2017 (r315293) @@ -21,4 +21,14 @@ ${PACKAGE}FILES+= \ unified_c9999.out \ unified_9999.out +NETBSD_ATF_TESTS_SH+= diff_test + +${PACKAGE}FILES+= \ + d_mallocv1.in \ + d_mallocv2.in + +ATF_TESTS_SH_SED_diff_test+= -e 's,t_diff,diff_test,g' + +.include + .include From owner-svn-src-head@freebsd.org Wed Mar 15 06:26:53 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F315D0B8AB; Wed, 15 Mar 2017 06:26:53 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7D08011FA; Wed, 15 Mar 2017 06:26:53 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by freefall.freebsd.org (Postfix, from userid 1235) id C0B387FB1; Wed, 15 Mar 2017 06:26:52 +0000 (UTC) Date: Wed, 15 Mar 2017 07:26:52 +0100 From: Baptiste Daroussin To: "Ngie Cooper (yaneurabeya)" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r315051 - in head: . gnu/usr.bin gnu/usr.bin/diff usr.bin usr.bin/diff usr.bin/diff/tests Message-ID: <20170315062652.5qmvzu4jcqr3637n@ivaldir.net> References: <201703110501.v2B51UJQ045535@repo.freebsd.org> <3A41B310-CDCE-4CA5-9155-3621E55AA8CF@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="2rpogljjh4xumtgz" Content-Disposition: inline In-Reply-To: <3A41B310-CDCE-4CA5-9155-3621E55AA8CF@gmail.com> User-Agent: NeoMutt/20170225 (1.8.0) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 06:26:53 -0000 --2rpogljjh4xumtgz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 14, 2017 at 11:02:12PM -0700, Ngie Cooper (yaneurabeya) wrote: >=20 > > On Mar 10, 2017, at 21:01, Baptiste Daroussin wrote: > >=20 > > Author: bapt > > Date: Sat Mar 11 05:01:29 2017 > > New Revision: 315051 > > URL: https://svnweb.freebsd.org/changeset/base/315051 > >=20 > > Log: > > Import diff from OpenBSD and remove GNU diff > >=20 > > Some of the modifications from the previous summer of code has been in= tegrated > > Modification for compatibility with GNU diff output has been added > >=20 > > Main difference with OpenBSD: > > Implement multiple GNU diff options: > > * --ignore-file-name-case > > * --no-ignore-file-name-case > > * --normal > > * --tabsize > > * --strip-trailing-cr > > Make diff -p compatible with GNU diff > > Implement diff -l > > Make diff -r compatible with GNU diff > >=20 > > Capsicumize diffing 2 regular files > > Add a simple test suite > >=20 > > Approved by: AsiaBSDcon devsummit > > Obtained from: OpenBSD, GSoC > > Relnotes: yes >=20 > etcupdate(8) is broken after this commit, along with commands that imple= ment --*group-format=3D: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id= =3D217795 . I ran the etcupdate testsuite to validate and it was ok I will have a look Best regards, Bapt --2rpogljjh4xumtgz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAljI3qwACgkQY4mL3PG3 PlprNg//SJzPYSPi4sORA+nTK8JEauBTOba1kjEke3KwzAA/OW5hDKC/JvlXyBsZ 4HQrmMujewXR3phqf5sss6TJRIE6TXv/LwJTIpPQPdvnlbehGrAMZleoYoxCUzJs 4lqTC9S8KhrCQAow01f9hYQcRiqcybRMfXHcGPj9LhoAcqZRD+OUHWB7rtJmGlGT jni15rgyehb0+KAEngflIhCZHFqSeoNzNdlzdMwzog1gEkq9MfVU8yJMCoQoqGcv msUAwoTccJjTW/m6sWRA6eeqb6QMbhBQfT1iNrjQCPHgGKi+TGceJxMIcVT8FuTd 81+EXFAogPYNAmJwgNFgovdQ4fimMQgd5GMLfh7U+aSiJ/tgu8gF9rpS20ynNN1O tm6DR0D0NsQ8FiO2R97hXtLfH6WP7id1gBUi20vluJalwtl6Yi3A87BhS+oDpgV6 wykfu7FZDodztNa1D5LqPhMDk2sJGrd0FWf8w7ayKuFPaoORCB4kYqfJ0igYaoQT cLG1RONgFSMuTwOvZ1bs37F+yclizEuhHfARJaIhXyRlk9HfBH6nxkBeKy+FVZAh 0uYbWuKJHzBYXqNb/P8dCEAijXBGZmn9FbsM3+G/zZpCXuzJ3m+vN8K46h179i2F HeYEskrk26AbAPXKLJum5dWNO4vnrFEGDKM+sbcwbqksj+1dibo= =Qwj6 -----END PGP SIGNATURE----- --2rpogljjh4xumtgz-- From owner-svn-src-head@freebsd.org Wed Mar 15 09:31:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 572DED0D3DE; Wed, 15 Mar 2017 09:31:59 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 1C1C01ED9; Wed, 15 Mar 2017 09:31:59 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2F9VwN8055129; Wed, 15 Mar 2017 09:31:58 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2F9Vw1X055128; Wed, 15 Mar 2017 09:31:58 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201703150931.v2F9Vw1X055128@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Wed, 15 Mar 2017 09:31:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315294 - head/sys/dev/wi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 09:31:59 -0000 Author: kevlo Date: Wed Mar 15 09:31:58 2017 New Revision: 315294 URL: https://svnweb.freebsd.org/changeset/base/315294 Log: Fix unreachable code in wi_pci_resume(). PR: 217784 Submitted by: Svyatoslav Found by: PVS-Studio Modified: head/sys/dev/wi/if_wi_pci.c Modified: head/sys/dev/wi/if_wi_pci.c ============================================================================== --- head/sys/dev/wi/if_wi_pci.c Wed Mar 15 06:18:14 2017 (r315293) +++ head/sys/dev/wi/if_wi_pci.c Wed Mar 15 09:31:58 2017 (r315294) @@ -254,8 +254,8 @@ wi_pci_resume(device_t dev) WI_LOCK(sc); if (sc->wi_bus_type != WI_BUS_PCI_NATIVE) { - return (0); WI_UNLOCK(sc); + return (0); } if (ic->ic_nrunning > 0) wi_init(sc); From owner-svn-src-head@freebsd.org Wed Mar 15 10:33:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1AD8D0D773; Wed, 15 Mar 2017 10:33:45 +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 mx1.freebsd.org (Postfix) with ESMTPS id 6ED772AA; Wed, 15 Mar 2017 10:33:45 +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 v2FAXiVW079761; Wed, 15 Mar 2017 10:33:44 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2FAXi1p079760; Wed, 15 Mar 2017 10:33:44 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703151033.v2FAXi1p079760@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 15 Mar 2017 10:33:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315298 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 10:33:45 -0000 Author: mav Date: Wed Mar 15 10:33:44 2017 New Revision: 315298 URL: https://svnweb.freebsd.org/changeset/base/315298 Log: Fix ancient bug from r84597, which broke 23xx after r315234. MFC after: 13 days Modified: head/sys/dev/isp/isp_pci.c Modified: head/sys/dev/isp/isp_pci.c ============================================================================== --- head/sys/dev/isp/isp_pci.c Wed Mar 15 10:31:32 2017 (r315297) +++ head/sys/dev/isp/isp_pci.c Wed Mar 15 10:33:44 2017 (r315298) @@ -1123,7 +1123,7 @@ isp_pci_rd_isr_2300(ispsoftc_t *isp, uin { uint32_t hccr, r2hisr; - if (!(BXR2(isp, IspVirt2Off(isp, BIU_ISR) & BIU2100_ISR_RISC_INT))) { + if ((BXR2(isp, IspVirt2Off(isp, BIU_ISR)) & BIU2100_ISR_RISC_INT) == 0) { *isrp = 0; return (0); } From owner-svn-src-head@freebsd.org Wed Mar 15 11:16:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5328FD0D60F; Wed, 15 Mar 2017 11:16:28 +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 mx1.freebsd.org (Postfix) with ESMTPS id 068831FA2; Wed, 15 Mar 2017 11:16:27 +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 v2FBGRqf096364; Wed, 15 Mar 2017 11:16:27 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2FBGRKF096363; Wed, 15 Mar 2017 11:16:27 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703151116.v2FBGRKF096363@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 15 Mar 2017 11:16:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315303 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 11:16:28 -0000 Author: mav Date: Wed Mar 15 11:16:26 2017 New Revision: 315303 URL: https://svnweb.freebsd.org/changeset/base/315303 Log: Fix panic when SIM dereferenced before allocation. MFC after: 2 weeks Modified: head/sys/dev/isp/isp_freebsd.c Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Wed Mar 15 10:53:40 2017 (r315302) +++ head/sys/dev/isp/isp_freebsd.c Wed Mar 15 11:16:26 2017 (r315303) @@ -362,39 +362,40 @@ isp_detach(ispsoftc_t *isp) static void isp_freeze_loopdown(ispsoftc_t *isp, int chan) { - if (IS_FC(isp)) { - struct isp_fc *fc = ISP_FC_PC(isp, chan); - if (fc->simqfrozen == 0) { - isp_prt(isp, ISP_LOGDEBUG0, - "Chan %d Freeze simq (loopdown)", chan); - fc->simqfrozen = SIMQFRZ_LOOPDOWN; - xpt_hold_boot(); - xpt_freeze_simq(fc->sim, 1); - } else { - isp_prt(isp, ISP_LOGDEBUG0, - "Chan %d Mark simq frozen (loopdown)", chan); - fc->simqfrozen |= SIMQFRZ_LOOPDOWN; - } + struct isp_fc *fc = ISP_FC_PC(isp, chan); + + if (fc->sim == NULL) + return; + if (fc->simqfrozen == 0) { + isp_prt(isp, ISP_LOGDEBUG0, + "Chan %d Freeze simq (loopdown)", chan); + fc->simqfrozen = SIMQFRZ_LOOPDOWN; + xpt_hold_boot(); + xpt_freeze_simq(fc->sim, 1); + } else { + isp_prt(isp, ISP_LOGDEBUG0, + "Chan %d Mark simq frozen (loopdown)", chan); + fc->simqfrozen |= SIMQFRZ_LOOPDOWN; } } static void isp_unfreeze_loopdown(ispsoftc_t *isp, int chan) { - if (IS_FC(isp)) { - struct isp_fc *fc = ISP_FC_PC(isp, chan); - int wasfrozen = fc->simqfrozen & SIMQFRZ_LOOPDOWN; - fc->simqfrozen &= ~SIMQFRZ_LOOPDOWN; - if (wasfrozen && fc->simqfrozen == 0) { - isp_prt(isp, ISP_LOGDEBUG0, - "Chan %d Release simq", chan); - xpt_release_simq(fc->sim, 1); - xpt_release_boot(); - } + struct isp_fc *fc = ISP_FC_PC(isp, chan); + + if (fc->sim == NULL) + return; + int wasfrozen = fc->simqfrozen & SIMQFRZ_LOOPDOWN; + fc->simqfrozen &= ~SIMQFRZ_LOOPDOWN; + if (wasfrozen && fc->simqfrozen == 0) { + isp_prt(isp, ISP_LOGDEBUG0, + "Chan %d Release simq", chan); + xpt_release_simq(fc->sim, 1); + xpt_release_boot(); } } - static int ispioctl(struct cdev *dev, u_long c, caddr_t addr, int flags, struct thread *td) { From owner-svn-src-head@freebsd.org Wed Mar 15 12:52:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D739D0C57B; Wed, 15 Mar 2017 12:52:32 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (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 00E6611CE; Wed, 15 Mar 2017 12:52:31 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 5AA7F1FE025; Wed, 15 Mar 2017 13:51:37 +0100 (CET) Subject: Re: svn commit: r310232 - head/sys/dev/mlx4/mlx4_ib To: Dimitry Andric , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Meny Yossefi References: <201612181521.uBIFLcB3030383@repo.freebsd.org> From: Hans Petter Selasky Message-ID: <9290641f-00e0-4091-e641-448d2d0d24d6@selasky.org> Date: Wed, 15 Mar 2017 13:51:33 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <201612181521.uBIFLcB3030383@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 12:52:32 -0000 Hi, Can you MFC this patch to 11-stable and 10-stable. The directory layout is a bit different, so you'll need to manually apply the patch to sys/ofed/drivers/infiniband/hw/mlx4/sysfs.c after merging the patch and resolving the non-existing path. --HPS On 12/18/16 16:21, Dimitry Andric wrote: > Author: dim > Date: Sun Dec 18 15:21:38 2016 > New Revision: 310232 > URL: https://svnweb.freebsd.org/changeset/base/310232 > > Log: > After r310171, the kernel version of sscanf() has format string checking > enabled. This results in a -Werror warning in mlx4ib: > > sys/dev/mlx4/mlx4_ib/mlx4_ib_sysfs.c:90:22: error: format specifies type 'unsigned long long *' but the argument has type 'u64 *' (aka 'unsigned long *') [-Werror,-Wformat] > sscanf(buf, "%llx", &sysadmin_ag_val); > ~~~~ ^~~~~~~~~~~~~~~~ > > Change sysadmin_ag_val to unsigned long long to avoid the warning. > > Reviewed by: hselasky > MFC after: 3 days > Differential Revision: https://reviews.freebsd.org/D8831 > > Modified: > head/sys/dev/mlx4/mlx4_ib/mlx4_ib_sysfs.c > > Modified: head/sys/dev/mlx4/mlx4_ib/mlx4_ib_sysfs.c > ============================================================================== > --- head/sys/dev/mlx4/mlx4_ib/mlx4_ib_sysfs.c Sun Dec 18 15:10:08 2016 (r310231) > +++ head/sys/dev/mlx4/mlx4_ib/mlx4_ib_sysfs.c Sun Dec 18 15:21:38 2016 (r310232) > @@ -79,7 +79,7 @@ static ssize_t store_admin_alias_guid(st > container_of(attr, struct mlx4_ib_iov_sysfs_attr, dentry); > struct mlx4_ib_iov_port *port = mlx4_ib_iov_dentry->ctx; > struct mlx4_ib_dev *mdev = port->dev; > - u64 sysadmin_ag_val; > + unsigned long long sysadmin_ag_val; > > record_num = mlx4_ib_iov_dentry->entry_num / 8; > guid_index_in_rec = mlx4_ib_iov_dentry->entry_num % 8; > > From owner-svn-src-head@freebsd.org Wed Mar 15 13:06:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B739ED0C962; Wed, 15 Mar 2017 13:06:47 +0000 (UTC) (envelope-from alc@rice.edu) Received: from pp2.rice.edu (proofpoint2.mail.rice.edu [128.42.201.101]) (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 966F41BE6; Wed, 15 Mar 2017 13:06:46 +0000 (UTC) (envelope-from alc@rice.edu) Received: from pps.filterd (pp2.rice.edu [127.0.0.1]) by pp2.rice.edu (8.16.0.17/8.16.0.17) with SMTP id v2FA1wlF032162; Wed, 15 Mar 2017 08:06:39 -0500 Received: from mh2.mail.rice.edu (mh2.mail.rice.edu [128.42.201.21]) by pp2.rice.edu with ESMTP id 296nkjgawa-1; Wed, 15 Mar 2017 08:06:39 -0500 X-Virus-Scanned: by amavis-2.7.0 at mh2.mail.rice.edu, auth channel Received: from 108-254-203-201.lightspeed.hstntx.sbcglobal.net (108-254-203-201.lightspeed.hstntx.sbcglobal.net [108.254.203.201]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh2.mail.rice.edu (Postfix) with ESMTPSA id 2827C500093; Wed, 15 Mar 2017 08:06:39 -0500 (CDT) Subject: Re: svn commit: r315272 - in head: lib/libc/sys sys/sys sys/vm To: Xin LI , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201703141710.v2EHAgxB047599@repo.freebsd.org> From: Alan Cox Message-ID: <1a83c3e4-e46f-440f-12a4-9120406a3f74@rice.edu> Date: Wed, 15 Mar 2017 08:06:38 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <201703141710.v2EHAgxB047599@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=10 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1611190142 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 13:06:47 -0000 On 03/14/2017 12:10, Xin LI wrote: > Author: delphij > Date: Tue Mar 14 17:10:42 2017 > New Revision: 315272 > URL: https://svnweb.freebsd.org/changeset/base/315272 > > Log: > Implement INHERIT_ZERO for minherit(2). > =20 > INHERIT_ZERO is an OpenBSD feature. > =20 > When a page is marked as such, it would be zeroed > upon fork(). > =20 > This would be used in new arc4random(3) functions. > =20 > PR: 182610 > Reviewed by: kib (earlier version) > MFC after: 1 month > Differential Revision: https://reviews.freebsd.org/D427 > > Modified: > head/lib/libc/sys/minherit.2 > head/sys/sys/mman.h > head/sys/vm/vm.h > head/sys/vm/vm_map.c > > Modified: head/lib/libc/sys/minherit.2 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/sys/minherit.2 Tue Mar 14 16:40:18 2017 (r315271) > +++ head/lib/libc/sys/minherit.2 Tue Mar 14 17:10:42 2017 (r315272) > @@ -29,7 +29,7 @@ > .\" > .\" @(#)minherit.2 8.1 (Berkeley) 6/9/93 > .\" > -.Dd October 30, 2007 > +.Dd March 15, 2017 > .Dt MINHERIT 2 > .Os > .Sh NAME > @@ -91,6 +91,11 @@ it will no longer be shared in the paren > after the parent forks and there is no way to get the previous > shared-backing-store mapping without unmapping and remapping the addre= ss > space in the parent. > +.It Dv INHERIT_ZERO > +This option causes the address space in question to be mapped as new > +anonymous pages, > +which would be initialized to all zero bytes, > +in the child process. > .El > .Sh RETURN VALUES > .Rv -std minherit > @@ -130,6 +135,13 @@ system call first appeared in > .Ox > and then in > .Fx 2.2 . > +.Pp > +The > +.Dv INHERIT_ZERO > +support first appeared in > +.Ox 5.6 > +and then in > +.Fx 12.0 . > .Sh BUGS > Once you set inheritance to > .Dv MAP_PRIVATE > > Modified: head/sys/sys/mman.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/sys/mman.h Tue Mar 14 16:40:18 2017 (r315271) > +++ head/sys/sys/mman.h Tue Mar 14 17:10:42 2017 (r315272) > @@ -43,6 +43,7 @@ > #define INHERIT_SHARE 0 > #define INHERIT_COPY 1 > #define INHERIT_NONE 2 > +#define INHERIT_ZERO 3 > #endif > =20 > /* > > Modified: head/sys/vm/vm.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/vm/vm.h Tue Mar 14 16:40:18 2017 (r315271) > +++ head/sys/vm/vm.h Tue Mar 14 17:10:42 2017 (r315272) > @@ -68,6 +68,7 @@ typedef char vm_inherit_t; /* inheritanc > #define VM_INHERIT_SHARE ((vm_inherit_t) 0) > #define VM_INHERIT_COPY ((vm_inherit_t) 1) > #define VM_INHERIT_NONE ((vm_inherit_t) 2) > +#define VM_INHERIT_ZERO ((vm_inherit_t) 3) > #define VM_INHERIT_DEFAULT VM_INHERIT_COPY > =20 > typedef u_char vm_prot_t; /* protection codes */ > > Modified: head/sys/vm/vm_map.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/vm/vm_map.c Tue Mar 14 16:40:18 2017 (r315271) > +++ head/sys/vm/vm_map.c Tue Mar 14 17:10:42 2017 (r315272) > @@ -2285,6 +2285,7 @@ vm_map_inherit(vm_map_t map, vm_offset_t > case VM_INHERIT_NONE: > case VM_INHERIT_COPY: > case VM_INHERIT_SHARE: > + case VM_INHERIT_ZERO: > break; > default: > return (KERN_INVALID_ARGUMENT); > @@ -3443,6 +3444,36 @@ vmspace_fork(struct vmspace *vm1, vm_oof > vm_map_copy_entry(old_map, new_map, old_entry, > new_entry, fork_charge); > break; > + > + case VM_INHERIT_ZERO: > + /* > + * Create a new anonymous mapping entry modelled from > + * the old one. > + */ > + new_entry =3D vm_map_entry_create(new_map); > + memset(new_entry, 0, sizeof(*new_entry)); > + > + new_entry->start =3D old_entry->start; > + new_entry->end =3D old_entry->end; > + new_entry->avail_ssize =3D old_entry->avail_ssize; > + new_entry->adj_free =3D old_entry->adj_free; > + new_entry->max_free =3D old_entry->max_free; The previous two fields should not be copied. The values from the old entry are not necessarily correct for the new entry. The correct values are calculated and assigned by the call to vm_map_entry_link() below.=20 So, these two assignments are harmless but also pointless. > + new_entry->eflags =3D old_entry->eflags & > + ~(MAP_ENTRY_USER_WIRED | MAP_ENTRY_IN_TRANSITION | > + MAP_ENTRY_VN_WRITECNT); > + new_entry->protection =3D old_entry->protection; > + new_entry->max_protection =3D old_entry->max_protection; > + new_entry->inheritance =3D VM_INHERIT_ZERO; > + > + vm_map_entry_link(new_map, new_map->header.prev, > + new_entry); > + vmspace_map_entry_forked(vm1, vm2, new_entry); > + > + new_entry->cred =3D curthread->td_ucred; > + crhold(new_entry->cred); > + *fork_charge +=3D (new_entry->end - new_entry->start); > + > + break; > } > old_entry =3D old_entry->next; > } > > From owner-svn-src-head@freebsd.org Wed Mar 15 13:34:53 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82815D0D6B2; Wed, 15 Mar 2017 13:34:53 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ADFE110E; Wed, 15 Mar 2017 13:34:53 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2FDYqcw057253; Wed, 15 Mar 2017 13:34:52 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2FDYqY8057248; Wed, 15 Mar 2017 13:34:52 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201703151334.v2FDYqY8057248@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 15 Mar 2017 13:34:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315304 - head/usr.sbin/makefs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 13:34:53 -0000 Author: emaste Date: Wed Mar 15 13:34:51 2017 New Revision: 315304 URL: https://svnweb.freebsd.org/changeset/base/315304 Log: makefs: sync option parsing with NetBSD - add support for parsing different types; not just int - homogenize option parsing - fix single letter parsing - remove duplicated code NetBSD revisions: cd9660.c 1.36 1.37 1.38 1.41 1.42 1.43 ffs.c 1.50 1.51 1.52 1.53 1.56 1.57 makefs.c 1.36 1.37 1.38 1.39 1.40 1.42 1.43 1.44 1.46 makefs.h 1.28 1.29 1.31 1.32 Obtained from: NetBSD Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/makefs/cd9660.c head/usr.sbin/makefs/cd9660.h head/usr.sbin/makefs/ffs.c head/usr.sbin/makefs/makefs.c head/usr.sbin/makefs/makefs.h Modified: head/usr.sbin/makefs/cd9660.c ============================================================================== --- head/usr.sbin/makefs/cd9660.c Wed Mar 15 11:16:26 2017 (r315303) +++ head/usr.sbin/makefs/cd9660.c Wed Mar 15 13:34:51 2017 (r315304) @@ -256,7 +256,70 @@ cd9660_prep_opts(fsinfo_t *fsopts) if ((diskStructure = calloc(1, sizeof(*diskStructure))) == NULL) err(EXIT_FAILURE, "%s: calloc", __func__); +#define OPT_STR(letter, name, desc) \ + { letter, name, NULL, OPT_STRBUF, 0, 0, desc } + +#define OPT_NUM(letter, name, field, min, max, desc) \ + { letter, name, &diskStructure->field, \ + sizeof(diskStructure->field) == 8 ? OPT_INT64 : \ + (sizeof(diskStructure->field) == 4 ? OPT_INT32 : \ + (sizeof(diskStructure->field) == 2 ? OPT_INT16 : OPT_INT8)), \ + min, max, desc } + +#define OPT_BOOL(letter, name, field, desc) \ + OPT_NUM(letter, name, field, 0, 1, desc) + + const option_t cd9660_options[] = { + OPT_NUM('l', "isolevel", isoLevel, + 1, 2, "ISO Level"), + OPT_NUM('v', "verbose", verbose_level, + 0, 2, "Turns on verbose output"), + + OPT_BOOL('h', "help", displayHelp, + "Show help message"), + OPT_BOOL('S', "follow-symlinks", follow_sym_links, + "Resolve symlinks in pathnames"), + OPT_BOOL('R', "rockridge", rock_ridge_enabled, + "Enable Rock-Ridge extensions"), + OPT_BOOL('C', "chrp-boot", chrp_boot, + "Enable CHRP boot"), + OPT_BOOL('K', "keep-bad-images", keep_bad_images, + "Keep bad images"), + OPT_BOOL('D', "allow-deep-trees", allow_deep_trees, + "Allow trees more than 8 levels"), + OPT_BOOL('a', "allow-max-name", allow_max_name, + "Allow 37 char filenames (unimplemented)"), + OPT_BOOL('i', "allow-illegal-chars", allow_illegal_chars, + "Allow illegal characters in filenames"), + OPT_BOOL('d', "allow-multidot", allow_multidot, + "Allow multiple periods in filenames"), + OPT_BOOL('o', "omit-trailing-period", omit_trailing_period, + "Omit trailing periods in filenames"), + OPT_BOOL('\0', "allow-lowercase", allow_lowercase, + "Allow lowercase characters in filenames"), + OPT_BOOL('\0', "archimedes", archimedes_enabled, + "Enable Archimedes structure"), + OPT_BOOL('\0', "no-trailing-padding", include_padding_areas, + "Include padding areas"), + + OPT_STR('A', "applicationid", "Application Identifier"), + OPT_STR('P', "publisher", "Publisher Identifier"), + OPT_STR('p', "preparer", "Preparer Identifier"), + OPT_STR('L', "label", "Disk Label"), + OPT_STR('V', "volumeid", "Volume Set Identifier"), + OPT_STR('B', "bootimage", "Boot image parameter"), + OPT_STR('G', "generic-bootimage", "Generic boot image param"), + OPT_STR('\0', "bootimagedir", "Boot image directory"), + OPT_STR('\0', "no-emul-boot", "No boot emulation"), + OPT_STR('\0', "no-boot", "No boot support"), + OPT_STR('\0', "hard-disk-boot", "Boot from hard disk"), + OPT_STR('\0', "boot-load-segment", "Boot load segment"), + + { .name = NULL } + }; + fsopts->fs_specific = diskStructure; + fsopts->fs_options = copy_opts(cd9660_options); cd9660_set_defaults(diskStructure); } @@ -265,6 +328,7 @@ void cd9660_cleanup_opts(fsinfo_t *fsopts) { free(fsopts->fs_specific); + free(fsopts->fs_options); } static int @@ -301,144 +365,106 @@ cd9660_arguments_set_string(const char * int cd9660_parse_opts(const char *option, fsinfo_t *fsopts) { - char *var, *val; - int rv; + int rv, i; iso9660_disk *diskStructure = fsopts->fs_specific; - - /* Set up allowed options - integer options ONLY */ - option_t cd9660_options[] = { - { "l", &diskStructure->isoLevel, 1, 2, "ISO Level" }, - { "isolevel", &diskStructure->isoLevel, 1, 2, "ISO Level" }, - { "verbose", &diskStructure->verbose_level, 0, 2, - "Turns on verbose output" }, - { "v", &diskStructure->verbose_level, 0 , 2, - "Turns on verbose output"}, - { .name = NULL } - }; - - /* - * Todo : finish implementing this, and make a function that - * parses them - */ - /* - string_option_t cd9660_string_options[] = { - { "L", "Label", &diskStructure.primaryDescriptor.volume_id, 1, 32, "Disk Label", ISO_STRING_FILTER_DCHARS }, - { NULL } - } - */ + option_t *cd9660_options = fsopts->fs_options; + char buf[1024]; + const char *name, *desc; assert(option != NULL); if (debug & DEBUG_FS_PARSE_OPTS) printf("cd9660_parse_opts: got `%s'\n", option); - if ((var = strdup(option)) == NULL) - err(1, "allocating memory for copy of option string"); - rv = 1; - - val = strchr(var, '='); - if (val != NULL) - *val++ = '\0'; - - /* First handle options with no parameters */ - if (strcmp(var, "h") == 0) { - diskStructure->displayHelp = 1; - rv = 1; - } else if (CD9660_IS_COMMAND_ARG_DUAL(var, "S", "follow-symlinks")) { - /* this is not handled yet */ - diskStructure->follow_sym_links = 1; - rv = 1; - } else if (CD9660_IS_COMMAND_ARG_DUAL(var, "L", "label")) { - rv = cd9660_arguments_set_string(val, "Disk Label", 32, 'd', - diskStructure->primaryDescriptor.volume_id); - } else if (CD9660_IS_COMMAND_ARG_DUAL(var, "A", "applicationid")) { - rv = cd9660_arguments_set_string(val, "Application Identifier", 128, 'a', - diskStructure->primaryDescriptor.application_id); - } else if(CD9660_IS_COMMAND_ARG_DUAL(var, "P", "publisher")) { - rv = cd9660_arguments_set_string(val, "Publisher Identifier", - 128, 'a', diskStructure->primaryDescriptor.publisher_id); - } else if (CD9660_IS_COMMAND_ARG_DUAL(var, "p", "preparer")) { - rv = cd9660_arguments_set_string(val, "Preparer Identifier", - 128, 'a', diskStructure->primaryDescriptor.preparer_id); - } else if (CD9660_IS_COMMAND_ARG_DUAL(var, "V", "volumeid")) { - rv = cd9660_arguments_set_string(val, "Volume Set Identifier", - 128, 'a', diskStructure->primaryDescriptor.volume_set_id); - /* Boot options */ - } else if (CD9660_IS_COMMAND_ARG_DUAL(var, "B", "bootimage")) { - if (val == NULL) - warnx("error: The Boot Image parameter requires a valid boot information string"); - else - rv = cd9660_add_boot_disk(diskStructure, val); - } else if (CD9660_IS_COMMAND_ARG(var, "bootimagedir")) { - /* - * XXXfvdl this is unused. - */ - if (val == NULL) - errx(1, "error: The Boot Image Directory parameter" - " requires a directory name\n"); - else { - if ((diskStructure->boot_image_directory = - malloc(strlen(val) + 1)) == NULL) { - CD9660_MEM_ALLOC_ERROR("cd9660_parse_opts"); - exit(1); - } + i = set_option(cd9660_options, option, buf, sizeof(buf)); + if (i == -1) + return 0; - /* BIG TODO: Add the max length function here */ - cd9660_arguments_set_string(val, "Boot Image Directory", - 12 , 'd', diskStructure->boot_image_directory); - } - } else if (CD9660_IS_COMMAND_ARG_DUAL(var, "G", "generic-bootimage")) { - if (val == NULL) - warnx("error: The Boot Image parameter requires a valid boot information string"); - else - rv = cd9660_add_generic_bootimage(diskStructure, val); - } else if (CD9660_IS_COMMAND_ARG(var, "no-trailing-padding")) - diskStructure->include_padding_areas = 0; - /* RRIP */ - else if (CD9660_IS_COMMAND_ARG_DUAL(var, "R", "rockridge")) - diskStructure->rock_ridge_enabled = 1; - else if (CD9660_IS_COMMAND_ARG_DUAL(var, "A", "archimedes")) - diskStructure->archimedes_enabled = 1; - else if (CD9660_IS_COMMAND_ARG(var, "chrp-boot")) - diskStructure->chrp_boot = 1; - else if (CD9660_IS_COMMAND_ARG_DUAL(var, "K", "keep-bad-images")) - diskStructure->keep_bad_images = 1; - else if (CD9660_IS_COMMAND_ARG(var, "allow-deep-trees")) - diskStructure->allow_deep_trees = 1; - else if (CD9660_IS_COMMAND_ARG(var, "allow-max-name")) - diskStructure->allow_max_name = 1; - else if (CD9660_IS_COMMAND_ARG(var, "allow-illegal-chars")) - diskStructure->allow_illegal_chars = 1; - else if (CD9660_IS_COMMAND_ARG(var, "allow-lowercase")) - diskStructure->allow_lowercase = 1; - else if (CD9660_IS_COMMAND_ARG(var,"allow-multidot")) - diskStructure->allow_multidot = 1; - else if (CD9660_IS_COMMAND_ARG(var, "omit-trailing-period")) - diskStructure->omit_trailing_period = 1; - else if (CD9660_IS_COMMAND_ARG(var, "no-emul-boot") || - CD9660_IS_COMMAND_ARG(var, "no-boot") || - CD9660_IS_COMMAND_ARG(var, "hard-disk-boot")) { - cd9660_eltorito_add_boot_option(diskStructure, var, 0); - - /* End of flag variables */ - } else if (CD9660_IS_COMMAND_ARG(var, "boot-load-segment")) { - if (val == NULL) { - warnx("Option `%s' doesn't contain a value", var); + if (cd9660_options[i].name == NULL) + abort(); + + name = cd9660_options[i].name; + desc = cd9660_options[i].desc; + switch (cd9660_options[i].letter) { + case 'h': + case 'S': + rv = 0; /* this is not handled yet */ + break; + case 'L': + rv = cd9660_arguments_set_string(buf, desc, 32, 'd', + diskStructure->primaryDescriptor.volume_id); + break; + case 'A': + rv = cd9660_arguments_set_string(buf, desc, 128, 'a', + diskStructure->primaryDescriptor.application_id); + break; + case 'P': + rv = cd9660_arguments_set_string(buf, desc, 128, 'a', + diskStructure->primaryDescriptor.publisher_id); + break; + case 'p': + rv = cd9660_arguments_set_string(buf, desc, 128, 'a', + diskStructure->primaryDescriptor.preparer_id); + break; + case 'V': + rv = cd9660_arguments_set_string(buf, desc, 128, 'a', + diskStructure->primaryDescriptor.volume_set_id); + break; + /* Boot options */ + case 'B': + if (buf[0] == '\0') { + warnx("The Boot Image parameter requires a valid boot" + "information string"); rv = 0; - } else { - cd9660_eltorito_add_boot_option(diskStructure, var, - val); - } - } else { - if (val == NULL) { - warnx("Option `%s' doesn't contain a value", var); + } else + rv = cd9660_add_boot_disk(diskStructure, buf); + break; + case 'G': + if (buf[0] == '\0') { + warnx("The Generic Boot Image parameter requires a" + " valid boot information string"); rv = 0; } else - rv = set_option(cd9660_options, var, val); + rv = cd9660_add_generic_bootimage(diskStructure, buf); + break; + default: + if (strcmp(name, "bootimagedir") == 0) { + /* + * XXXfvdl this is unused. + */ + if (buf[0] == '\0') { + warnx("The Boot Image Directory parameter" + " requires a directory name\n"); + rv = 0; + } else { + diskStructure->boot_image_directory = + malloc(strlen(buf) + 1); + if (diskStructure->boot_image_directory == NULL) + err(1, "malloc"); + /* BIG TODO: Add the max length function here */ + rv = cd9660_arguments_set_string(buf, desc, 12, + 'd', diskStructure->boot_image_directory); + } + } else if (strcmp(name, "no-emul-boot") == 0 || + strcmp(name, "no-boot") == 0 || + strcmp(name, "hard-disk-boot") == 0) { + /* RRIP */ + cd9660_eltorito_add_boot_option(diskStructure, name, 0); + rv = 1; + } else if (strcmp(name, "boot-load-segment") == 0) { + if (buf[0] == '\0') { + warnx("Option `%s' doesn't contain a value", + name); + rv = 0; + } else { + cd9660_eltorito_add_boot_option(diskStructure, + name, buf); + rv = 1; + } + } else + rv = 1; } - - free(var); - return (rv); + return rv; } /* Modified: head/usr.sbin/makefs/cd9660.h ============================================================================== --- head/usr.sbin/makefs/cd9660.h Wed Mar 15 11:16:26 2017 (r315303) +++ head/usr.sbin/makefs/cd9660.h Wed Mar 15 13:34:51 2017 (r315304) @@ -120,12 +120,6 @@ typedef struct { #define CD9660_MEM_ALLOC_ERROR(_F) \ err(EXIT_FAILURE, "%s, %s l. %d", _F, __FILE__, __LINE__) -#define CD9660_IS_COMMAND_ARG_DUAL(var,short,long)\ - (strcmp((var),(short)) == 0) || (strcmp((var),(long))==0) - -#define CD9660_IS_COMMAND_ARG(var,arg)\ - (strcmp((var),(arg)) == 0) - #define CD9660_TYPE_FILE 0x01 #define CD9660_TYPE_DIR 0x02 #define CD9660_TYPE_DOT 0x04 Modified: head/usr.sbin/makefs/ffs.c ============================================================================== --- head/usr.sbin/makefs/ffs.c Wed Mar 15 11:16:26 2017 (r315303) +++ head/usr.sbin/makefs/ffs.c Wed Mar 15 13:34:51 2017 (r315304) @@ -144,7 +144,6 @@ static void *ffs_build_dinode2(struct u int sectorsize; /* XXX: for buf.c::getblk() */ - /* publicly visible functions */ void @@ -155,7 +154,33 @@ ffs_prep_opts(fsinfo_t *fsopts) if ((ffs_opts = calloc(1, sizeof(ffs_opt_t))) == NULL) err(1, "Allocating memory for ffs_options"); - fsopts->fs_specific = ffs_opts; + const option_t ffs_options[] = { + { 'b', "bsize", &ffs_opts->bsize, OPT_INT32, + 1, INT_MAX, "block size" }, + { 'f', "fsize", &ffs_opts->fsize, OPT_INT32, + 1, INT_MAX, "fragment size" }, + { 'd', "density", &ffs_opts->density, OPT_INT32, + 1, INT_MAX, "bytes per inode" }, + { 'm', "minfree", &ffs_opts->minfree, OPT_INT32, + 0, 99, "minfree" }, + { 'M', "maxbpg", &ffs_opts->maxbpg, OPT_INT32, + 1, INT_MAX, "max blocks per file in a cg" }, + { 'a', "avgfilesize", &ffs_opts->avgfilesize, OPT_INT32, + 1, INT_MAX, "expected average file size" }, + { 'n', "avgfpdir", &ffs_opts->avgfpdir, OPT_INT32, + 1, INT_MAX, "expected # of files per directory" }, + { 'x', "extent", &ffs_opts->maxbsize, OPT_INT32, + 1, INT_MAX, "maximum # extent size" }, + { 'g', "maxbpcg", &ffs_opts->maxblkspercg, OPT_INT32, + 1, INT_MAX, "max # of blocks per group" }, + { 'v', "version", &ffs_opts->version, OPT_INT32, + 1, 2, "UFS version" }, + { 'o', "optimization", NULL, OPT_STRBUF, + 0, 0, "Optimization (time|space)" }, + { 'l', "label", ffs_opts->label, OPT_STRARRAY, + 1, sizeof(ffs_opts->label), "UFS label" }, + { .name = NULL } + }; ffs_opts->bsize= -1; ffs_opts->fsize= -1; @@ -168,45 +193,25 @@ ffs_prep_opts(fsinfo_t *fsopts) ffs_opts->avgfilesize= -1; ffs_opts->avgfpdir= -1; ffs_opts->version = 1; + + fsopts->fs_specific = ffs_opts; + fsopts->fs_options = copy_opts(ffs_options); } void ffs_cleanup_opts(fsinfo_t *fsopts) { - if (fsopts->fs_specific) - free(fsopts->fs_specific); + free(fsopts->fs_specific); + free(fsopts->fs_options); } int ffs_parse_opts(const char *option, fsinfo_t *fsopts) { ffs_opt_t *ffs_opts = fsopts->fs_specific; + option_t *ffs_options = fsopts->fs_options; + char buf[1024]; - option_t ffs_options[] = { - { "bsize", &ffs_opts->bsize, 1, INT_MAX, - "block size" }, - { "fsize", &ffs_opts->fsize, 1, INT_MAX, - "fragment size" }, - { "density", &ffs_opts->density, 1, INT_MAX, - "bytes per inode" }, - { "minfree", &ffs_opts->minfree, 0, 99, - "minfree" }, - { "maxbpg", &ffs_opts->maxbpg, 1, INT_MAX, - "max blocks per file in a cg" }, - { "avgfilesize", &ffs_opts->avgfilesize,1, INT_MAX, - "expected average file size" }, - { "avgfpdir", &ffs_opts->avgfpdir, 1, INT_MAX, - "expected # of files per directory" }, - { "extent", &ffs_opts->maxbsize, 1, INT_MAX, - "maximum # extent size" }, - { "maxbpcg", &ffs_opts->maxblkspercg,1, INT_MAX, - "max # of blocks per group" }, - { "version", &ffs_opts->version, 1, 2, - "UFS version" }, - { .name = NULL } - }; - - char *var, *val; int rv; assert(option != NULL); @@ -216,36 +221,28 @@ ffs_parse_opts(const char *option, fsinf if (debug & DEBUG_FS_PARSE_OPTS) printf("ffs_parse_opts: got `%s'\n", option); - if ((var = strdup(option)) == NULL) - err(1, "Allocating memory for copy of option string"); - rv = 0; - - if ((val = strchr(var, '=')) == NULL) { - warnx("Option `%s' doesn't contain a value", var); - goto leave_ffs_parse_opts; - } - *val++ = '\0'; - - if (strcmp(var, "optimization") == 0) { - if (strcmp(val, "time") == 0) { + rv = set_option(ffs_options, option, buf, sizeof(buf)); + if (rv == -1) + return 0; + + if (ffs_options[rv].name == NULL) + abort(); + + switch (ffs_options[rv].letter) { + case 'o': + if (strcmp(buf, "time") == 0) { ffs_opts->optimization = FS_OPTTIME; - } else if (strcmp(val, "space") == 0) { + } else if (strcmp(buf, "space") == 0) { ffs_opts->optimization = FS_OPTSPACE; } else { - warnx("Invalid optimization `%s'", val); - goto leave_ffs_parse_opts; + warnx("Invalid optimization `%s'", buf); + return 0; } - rv = 1; - } else if (strcmp(var, "label") == 0) { - strlcpy(ffs_opts->label, val, sizeof(ffs_opts->label)); - rv = 1; - } else - rv = set_option(ffs_options, var, val); - - leave_ffs_parse_opts: - if (var) - free(var); - return (rv); + break; + default: + break; + } + return 1; } Modified: head/usr.sbin/makefs/makefs.c ============================================================================== --- head/usr.sbin/makefs/makefs.c Wed Mar 15 11:16:26 2017 (r315303) +++ head/usr.sbin/makefs/makefs.c Wed Mar 15 13:34:51 2017 (r315304) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "makefs.h" #include "mtree.h" @@ -82,7 +83,7 @@ struct stat stampst; static fstype_t *get_fstype(const char *); static int get_tstamp(const char *, struct stat *); -static void usage(void); +static void usage(fstype_t *, fsinfo_t *); int main(int, char *[]); int @@ -141,7 +142,7 @@ main(int argc, char *argv[]) #endif } else { warnx("Invalid endian `%s'.", optarg); - usage(); + usage(fstype, &fsoptions); } break; @@ -210,7 +211,7 @@ main(int argc, char *argv[]) if (*p == '\0') errx(1, "Empty option"); if (! fstype->parse_options(p, &fsoptions)) - usage(); + usage(fstype, &fsoptions); } break; } @@ -263,7 +264,7 @@ main(int argc, char *argv[]) case '?': default: - usage(); + usage(fstype, &fsoptions); /* NOTREACHED */ } @@ -278,7 +279,7 @@ main(int argc, char *argv[]) argv += optind; if (argc < 2) - usage(); + usage(fstype, &fsoptions); /* -x must be accompanied by -F */ if (fsoptions.onlyspec != 0 && specfile == NULL) @@ -344,21 +345,84 @@ main(int argc, char *argv[]) /* NOTREACHED */ } +int +set_option(const option_t *options, const char *option, char *buf, size_t len) +{ + char *var, *val; + int retval; + + assert(option != NULL); + + if ((var = strdup(option)) == NULL) { + err(EXIT_FAILURE, "Allocating memory for copy of option string"); + } + + for (val = var; *val; val++) + if (*val == '=') { + *val++ = '\0'; + break; + } + retval = set_option_var(options, var, val, buf, len); + free(var); + return retval; +} int -set_option(option_t *options, const char *var, const char *val) +set_option_var(const option_t *options, const char *var, const char *val, + char *buf, size_t len) { - int i; + char *s; + size_t i; + +#define NUM(type) \ + if (!*val) { \ + *(type *)options[i].value = 1; \ + break; \ + } \ + *(type *)options[i].value = (type)strsuftoll(options[i].desc, val, \ + options[i].minimum, options[i].maximum); break for (i = 0; options[i].name != NULL; i++) { - if (strcmp(options[i].name, var) != 0) + if (var[1] == '\0') { + if (options[i].letter != var[0]) + continue; + } else if (strcmp(options[i].name, var) != 0) continue; - *options[i].value = (int)strsuftoll(options[i].desc, val, - options[i].minimum, options[i].maximum); - return (1); + switch (options[i].type) { + case OPT_BOOL: + *(bool *)options[i].value = 1; + break; + case OPT_STRARRAY: + strlcpy((void *)options[i].value, val, (size_t) + options[i].maximum); + break; + case OPT_STRPTR: + if ((s = strdup(val)) == NULL) + err(1, NULL); + *(char **)options[i].value = s; + break; + case OPT_STRBUF: + if (buf == NULL) + abort(); + strlcpy(buf, val, len); + break; + case OPT_INT64: + NUM(uint64_t); + case OPT_INT32: + NUM(uint32_t); + case OPT_INT16: + NUM(uint16_t); + case OPT_INT8: + NUM(uint8_t); + default: + warnx("Unknown type %d in option %s", options[i].type, + val); + return 0; + } + return i; } warnx("Unknown option `%s'", var); - return (0); + return -1; } @@ -373,6 +437,20 @@ get_fstype(const char *type) return (NULL); } +option_t * +copy_opts(const option_t *o) +{ + size_t i; + void *rv; + + for (i = 0; o[i].name; i++) + continue; + i++; + if ((rv = calloc(i, sizeof(*o))) == NULL) + err(1, "calloc"); + return memcpy(rv, o, i * sizeof(*o)); +} + static int get_tstamp(const char *b, struct stat *st) { @@ -400,17 +478,29 @@ get_tstamp(const char *b, struct stat *s } static void -usage(void) +usage(fstype_t *fstype, fsinfo_t *fsoptions) { const char *prog; prog = getprogname(); fprintf(stderr, -"usage: %s [-xZ] [-B endian] [-b free-blocks] [-d debug-mask]\n" +"Usage: %s [-xZ] [-B endian] [-b free-blocks] [-d debug-mask]\n" "\t[-F mtree-specfile] [-f free-files] [-M minimum-size] [-m maximum-size]\n" "\t[-N userdb-dir] [-o fs-options] [-R roundup-size] [-S sector-size]\n" "\t[-s image-size] [-T ] [-t fs-type]\n" "\timage-file directory | manifest [extra-directory ...]\n", prog); + + if (fstype) { + size_t i; + option_t *o = fsoptions->fs_options; + + fprintf(stderr, "\n%s specific options:\n", fstype->type); + for (i = 0; o[i].name != NULL; i++) + fprintf(stderr, "\t%c%c%20.20s\t%s\n", + o[i].letter ? o[i].letter : ' ', + o[i].letter ? ',' : ' ', + o[i].name, o[i].desc); + } exit(1); } Modified: head/usr.sbin/makefs/makefs.h ============================================================================== --- head/usr.sbin/makefs/makefs.h Wed Mar 15 11:16:26 2017 (r315303) +++ head/usr.sbin/makefs/makefs.h Wed Mar 15 13:34:51 2017 (r315304) @@ -104,11 +104,37 @@ typedef struct _fsnode { #define FSNODE_F_OPTIONAL 0x02 /* fsnode is optional */ /* + * option_t - contains option name, description, pointer to location to store + * result, and range checks for the result. Used to simplify fs specific + * option setting + */ +typedef enum { + OPT_STRARRAY, + OPT_STRPTR, + OPT_STRBUF, + OPT_BOOL, + OPT_INT8, + OPT_INT16, + OPT_INT32, + OPT_INT64 +} opttype_t; + +typedef struct { + char letter; /* option letter NUL for none */ + const char *name; /* option name */ + void *value; /* where to stuff the value */ + opttype_t type; /* type of entry */ + long long minimum; /* minimum for value */ + long long maximum; /* maximum for value */ + const char *desc; /* option description */ +} option_t; + +/* * fsinfo_t - contains various settings and parameters pertaining to * the image, including current settings, global options, and fs * specific options */ -typedef struct { +typedef struct makefs_fsinfo { /* current settings */ off_t size; /* total size */ off_t inodes; /* number of inodes */ @@ -124,8 +150,8 @@ typedef struct { off_t minsize; /* minimum size image should be */ off_t maxsize; /* maximum size image can be */ off_t freefiles; /* free file entries to leave */ - int freefilepc; /* free file % */ off_t freeblocks; /* free blocks to leave */ + int freefilepc; /* free file % */ int freeblockpc; /* free block % */ int needswap; /* non-zero if byte swapping needed */ int sectorsize; /* sector size */ @@ -133,30 +159,20 @@ typedef struct { off_t roundup; /* round image size up to this value */ void *fs_specific; /* File system specific additions. */ + option_t *fs_options; /* File system specific options */ } fsinfo_t; -/* - * option_t - contains option name, description, pointer to location to store - * result, and range checks for the result. Used to simplify fs specific - * option setting - */ -typedef struct { - const char *name; /* option name */ - int *value; /* where to stuff the value */ - int minimum; /* minimum for value */ - int maximum; /* maximum for value */ - const char *desc; /* option description */ -} option_t; - - void apply_specfile(const char *, const char *, fsnode *, int); void dump_fsnodes(fsnode *); const char * inode_type(mode_t); fsnode * read_mtree(const char *, fsnode *); -int set_option(option_t *, const char *, const char *); +int set_option(const option_t *, const char *, char *, size_t); +int set_option_var(const option_t *, const char *, const char *, + char *, size_t); fsnode * walk_dir(const char *, const char *, fsnode *, fsnode *); void free_fsnodes(fsnode *); +option_t * copy_opts(const option_t *); #define DECLARE_FUN(fs) \ void fs ## _prep_opts(fsinfo_t *); \ From owner-svn-src-head@freebsd.org Wed Mar 15 13:36:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A68ACD0D8BB; Wed, 15 Mar 2017 13:36:36 +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 mx1.freebsd.org (Postfix) with ESMTPS id 80F4F13B7; Wed, 15 Mar 2017 13:36:36 +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 v2FDaZCR057375; Wed, 15 Mar 2017 13:36:35 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2FDaZS7057372; Wed, 15 Mar 2017 13:36:35 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201703151336.v2FDaZS7057372@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 15 Mar 2017 13:36:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315305 - in head: . sbin/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 13:36:36 -0000 Author: ae Date: Wed Mar 15 13:36:35 2017 New Revision: 315305 URL: https://svnweb.freebsd.org/changeset/base/315305 Log: Change the syntax of ipfw's named states. Since the state name is an optional argument, it often can conflict with other options. To avoid ambiguity now the state name must be prefixed with a colon. Obtained from: Yandex LLC MFC after: 2 week Sponsored by: Yandex LLC Modified: head/UPDATING head/sbin/ipfw/ipfw.8 head/sbin/ipfw/ipfw2.c Modified: head/UPDATING ============================================================================== --- head/UPDATING Wed Mar 15 13:34:51 2017 (r315304) +++ head/UPDATING Wed Mar 15 13:36:35 2017 (r315305) @@ -51,6 +51,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 ****************************** SPECIAL WARNING: ****************************** +20170315: + The syntax of ipfw(8) named states was changed to avoid ambiguity. + If you have used named states in the firewall rules, you need to modify + them after installworld and before rebooting. Now named states must + be prefixed with colon. + 20170311: The old drm (sys/dev/drm/) drivers for i915 and radeon have been removed as the userland we provide cannot use them. The KMS version Modified: head/sbin/ipfw/ipfw.8 ============================================================================== --- head/sbin/ipfw/ipfw.8 Wed Mar 15 13:34:51 2017 (r315304) +++ head/sbin/ipfw/ipfw.8 Wed Mar 15 13:36:35 2017 (r315305) @@ -1,7 +1,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 18, 2016 +.Dd March 15, 2017 .Dt IPFW 8 .Os .Sh NAME @@ -781,7 +781,7 @@ will be executed when the packet matches .It Cm allow | accept | pass | permit Allow packets that match rule. The search terminates. -.It Cm check-state Op Ar flowname | Cm any +.It Cm check-state Op Ar :flowname | Cm :any Checks the packet against the dynamic ruleset. If a match is found, execute the action associated with the rule which generated this dynamic rule, otherwise @@ -797,15 +797,15 @@ or .Cm limit rule. The -.Ar flowname +.Ar :flowname is symbolic name assigned to dynamic rule by .Cm keep-state opcode. The special flowname -.Cm any +.Cm :any can be used to ignore states flowname when matching. The -.Cm default +.Cm :default keyword is special name used for compatibility with old rulesets. .It Cm count Update counters for all packets that match rule. @@ -1662,7 +1662,7 @@ specified in the same way as .It Cm ipversion Ar ver Matches IP packets whose IP version field is .Ar ver . -.It Cm keep-state Op Ar flowname +.It Cm keep-state Op Ar :flowname Upon a match, the firewall will create a dynamic rule, whose default behaviour is to match bidirectional traffic between source and destination IP/port using the same protocol. @@ -1671,19 +1671,19 @@ The rule has a limited lifetime (control variables), and the lifetime is refreshed every time a matching packet is found. The -.Ar flowname +.Ar :flowname is used to assign additional to addresses, ports and protocol parameter to dynamic rule. It can be used for more accurate matching by .Cm check-state rule. The -.Cm default +.Cm :default keyword is special name used for compatibility with old rulesets. .It Cm layer2 Matches only layer2 packets, i.e., those passed to .Nm from ether_demux() and ether_output_frame(). -.It Cm limit Bro Cm src-addr | src-port | dst-addr | dst-port Brc Ar N Op Ar flowname +.It Cm limit Bro Cm src-addr | src-port | dst-addr | dst-port Brc Ar N Op Ar :flowname The firewall will only allow .Ar N connections with the same @@ -2286,7 +2286,7 @@ are completely equivalent afterwards). Rules created by .Cm keep-state option also have a -.Ar flowname +.Ar :flowname taken from it. This name is used in matching together with addresses, ports and protocol. Dynamic rules will be checked at the first @@ -2297,23 +2297,23 @@ occurrence, and the action performed upo as in the parent rule. .Pp Note that no additional attributes other than protocol and IP addresses -and ports and flowname are checked on dynamic rules. +and ports and :flowname are checked on dynamic rules. .Pp The typical use of dynamic rules is to keep a closed firewall configuration, but let the first TCP SYN packet from the inside network install a dynamic rule for the flow so that packets belonging to that session will be allowed through the firewall: .Pp -.Dl "ipfw add check-state OUTBOUND" -.Dl "ipfw add allow tcp from my-subnet to any setup keep-state OUTBOUND" +.Dl "ipfw add check-state :OUTBOUND" +.Dl "ipfw add allow tcp from my-subnet to any setup keep-state :OUTBOUND" .Dl "ipfw add deny tcp from any to any" .Pp A similar approach can be used for UDP, where an UDP packet coming from the inside will install a dynamic rule to let the response through the firewall: .Pp -.Dl "ipfw add check-state OUTBOUND" -.Dl "ipfw add allow udp from my-subnet to any keep-state OUTBOUND" +.Dl "ipfw add check-state :OUTBOUND" +.Dl "ipfw add allow udp from my-subnet to any keep-state :OUTBOUND" .Dl "ipfw add deny udp from any to any" .Pp Dynamic rules expire after some time, which depends on the status Modified: head/sbin/ipfw/ipfw2.c ============================================================================== --- head/sbin/ipfw/ipfw2.c Wed Mar 15 13:34:51 2017 (r315304) +++ head/sbin/ipfw/ipfw2.c Wed Mar 15 13:36:35 2017 (r315305) @@ -1483,7 +1483,7 @@ show_static_rule(struct cmdline_opts *co cmd->arg1, IPFW_TLV_STATE_NAME); else ename = NULL; - bprintf(bp, " %s", ename ? ename: "any"); + bprintf(bp, " :%s", ename ? ename: "any"); /* avoid printing anything else */ flags = HAVE_PROTO | HAVE_SRCIP | HAVE_DSTIP | HAVE_IP; @@ -2076,7 +2076,7 @@ show_static_rule(struct cmdline_opts *co case O_KEEP_STATE: bprintf(bp, " keep-state"); - bprintf(bp, " %s", + bprintf(bp, " :%s", object_search_ctlv(fo->tstate, cmd->arg1, IPFW_TLV_STATE_NAME)); break; @@ -2095,7 +2095,7 @@ show_static_rule(struct cmdline_opts *co comma = ","; } bprint_uint_arg(bp, " ", c->conn_limit); - bprintf(bp, " %s", + bprintf(bp, " :%s", object_search_ctlv(fo->tstate, cmd->arg1, IPFW_TLV_STATE_NAME)); break; @@ -2198,7 +2198,7 @@ show_dyn_state(struct cmdline_opts *co, } else bprintf(bp, " UNKNOWN <-> UNKNOWN"); if (d->kidx != 0) - bprintf(bp, " %s", object_search_ctlv(fo->tstate, + bprintf(bp, " :%s", object_search_ctlv(fo->tstate, d->kidx, IPFW_TLV_STATE_NAME)); } @@ -3714,27 +3714,25 @@ compile_rule(char *av[], uint32_t *rbuf, case TOK_CHECKSTATE: have_state = action; action->opcode = O_CHECK_STATE; - if (*av == NULL) { + if (*av == NULL || + match_token(rule_options, *av) == TOK_COMMENT) { action->arg1 = pack_object(tstate, default_state_name, IPFW_TLV_STATE_NAME); break; } - if (strcmp(*av, "any") == 0) - action->arg1 = 0; - else if ((i = match_token(rule_options, *av)) != -1) { - action->arg1 = pack_object(tstate, - default_state_name, IPFW_TLV_STATE_NAME); - if (i != TOK_COMMENT) - warn("Ambiguous state name '%s', '%s'" - " used instead.\n", *av, - default_state_name); - break; - } else if (state_check_name(*av) == 0) - action->arg1 = pack_object(tstate, *av, - IPFW_TLV_STATE_NAME); - else - errx(EX_DATAERR, "Invalid state name %s", *av); - av++; + if (*av[0] == ':') { + if (strcmp(*av + 1, "any") == 0) + action->arg1 = 0; + else if (state_check_name(*av + 1) == 0) + action->arg1 = pack_object(tstate, *av + 1, + IPFW_TLV_STATE_NAME); + else + errx(EX_DATAERR, "Invalid state name %s", + *av); + av++; + break; + } + errx(EX_DATAERR, "Invalid state name %s", *av); break; case TOK_ACCEPT: @@ -4577,22 +4575,16 @@ read_options: if (have_state) errx(EX_USAGE, "only one of keep-state " "and limit is allowed"); - if (*av == NULL || - (i = match_token(rule_options, *av)) != -1) { - if (*av != NULL && i != TOK_COMMENT) - warn("Ambiguous state name '%s'," - " '%s' used instead.\n", *av, - default_state_name); - uidx = pack_object(tstate, default_state_name, - IPFW_TLV_STATE_NAME); - } else { - if (state_check_name(*av) != 0) + if (*av != NULL && *av[0] == ':') { + if (state_check_name(*av + 1) != 0) errx(EX_DATAERR, "Invalid state name %s", *av); - uidx = pack_object(tstate, *av, + uidx = pack_object(tstate, *av + 1, IPFW_TLV_STATE_NAME); av++; - } + } else + uidx = pack_object(tstate, default_state_name, + IPFW_TLV_STATE_NAME); have_state = cmd; fill_cmd(cmd, O_KEEP_STATE, 0, uidx); break; @@ -4629,22 +4621,16 @@ read_options: TOK_LIMIT, rule_options); av++; - if (*av == NULL || - (i = match_token(rule_options, *av)) != -1) { - if (*av != NULL && i != TOK_COMMENT) - warn("Ambiguous state name '%s'," - " '%s' used instead.\n", *av, - default_state_name); - cmd->arg1 = pack_object(tstate, - default_state_name, IPFW_TLV_STATE_NAME); - } else { - if (state_check_name(*av) != 0) + if (*av != NULL && *av[0] == ':') { + if (state_check_name(*av + 1) != 0) errx(EX_DATAERR, "Invalid state name %s", *av); - cmd->arg1 = pack_object(tstate, *av, + cmd->arg1 = pack_object(tstate, *av + 1, IPFW_TLV_STATE_NAME); av++; - } + } else + cmd->arg1 = pack_object(tstate, + default_state_name, IPFW_TLV_STATE_NAME); break; } From owner-svn-src-head@freebsd.org Wed Mar 15 14:45:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 17910D0E892; Wed, 15 Mar 2017 14:45:01 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 D8D95131A; Wed, 15 Mar 2017 14:45:00 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2FEix2a086034; Wed, 15 Mar 2017 14:44:59 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2FEixfZ086033; Wed, 15 Mar 2017 14:44:59 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201703151444.v2FEixfZ086033@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Wed, 15 Mar 2017 14:44:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315306 - head/sys/dev/e1000 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 14:45:01 -0000 Author: sbruno Date: Wed Mar 15 14:44:59 2017 New Revision: 315306 URL: https://svnweb.freebsd.org/changeset/base/315306 Log: Actually set the MTU to the requested value and fixup handling of jumbo frames. Submitted by: Matt Macy Reported by: pho Sponsored by: Limelight Networks Modified: head/sys/dev/e1000/if_em.c Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Wed Mar 15 13:36:35 2017 (r315305) +++ head/sys/dev/e1000/if_em.c Wed Mar 15 14:44:59 2017 (r315306) @@ -1116,7 +1116,6 @@ em_if_mtu_set(if_ctx_t ctx, uint32_t mtu { int max_frame_size; struct adapter *adapter = iflib_get_softc(ctx); - struct ifnet *ifp = iflib_get_ifp(ctx); if_softc_ctx_t scctx = iflib_get_softc_ctx(ctx); IOCTL_DEBUGOUT("ioctl rcv'd: SIOCSIFMTU (Set Interface MTU)"); @@ -1154,7 +1153,7 @@ em_if_mtu_set(if_ctx_t ctx, uint32_t mtu } scctx->isc_max_frame_size = adapter->hw.mac.max_frame_size = - if_getmtu(ifp) + ETHER_HDR_LEN + ETHER_CRC_LEN; + mtu + ETHER_HDR_LEN + ETHER_CRC_LEN; return (0); } From owner-svn-src-head@freebsd.org Wed Mar 15 14:53:14 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3AF4D0EAA7; Wed, 15 Mar 2017 14:53:14 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x22d.google.com (mail-io0-x22d.google.com [IPv6:2607:f8b0:4001:c06::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8D3521A59; Wed, 15 Mar 2017 14:53:14 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x22d.google.com with SMTP id z13so21705922iof.2; Wed, 15 Mar 2017 07:53:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=PBO5MKYkSGXK6Beg1WTLWVvURT7jl+aXOEcyZcfOjxs=; b=uDEkhBcrtxoCtag9b75/GsQMULfA4NxqA6tYToj0Bi/nbXolLpk9B4EIuCIulb1PzC e/PyUDWuu94Hgbb3teeISj+WB/j9h6lDO3ImLxEhXN8YDvrvAIb761UZP4eia/TLz7ZD GVpePOmQXlCQc6koAUhmZUJyZ+1qqjoqxx3qBZPVwBsHFD02mOKykrey6WkwQkEOmb2E s1R4oh/cg5Bhi2f9Krp8z+mp7L3LWhXJmmyTn1o0r9sWryOHuGyyvU/VnQeedSeukq5x ORhu6j349YllXKxc+BOdrphbe6RjsI6t0bMyrj97QoMKbXMHdxo63cxjRsvol1RmOLEw Z5Nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=PBO5MKYkSGXK6Beg1WTLWVvURT7jl+aXOEcyZcfOjxs=; b=eJHqVP6trunqZNOnjqLklehHwpKKwv5F6NCsRNK7/QD6NDUpe6zGLhlN6eBSJ3Kq2y YcXzOPQ0cbNBf1vAW3NbVWoa10YDv9rOFFsT8DYGxDc/760dpcjXSiR6sSgZR0UpIJ+N mNqtPjVuTRYCMlpcImDFK+svJ/n8KHfC8xLbOdiOx2I7D2bj7voGdq4no9FYWwUaf+LO 6MjSZ+2FDM15+v7iLqHyTmAgX8y+UdIjRTuof9AOjDYiKRL5fu/PPdbiGwMxPDeyqmiI 2/TOkE98FtUQqtMrQEY78x0mEzsJHZjKDdtvV713nOZzfwUClh+CBFOyB8Xbdhmotj1l +f+w== X-Gm-Message-State: AFeK/H308uXzUZoSXOUsvKU1cvl5g0szL6n3zbC2bAnO6PWPg0kYB/xaN/o+QzN2tAnVoFojHG9pEJ3vc/iRfw== X-Received: by 10.107.47.102 with SMTP id j99mr5443321ioo.52.1489589592734; Wed, 15 Mar 2017 07:53:12 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.30.209 with HTTP; Wed, 15 Mar 2017 07:52:52 -0700 (PDT) In-Reply-To: <201703102245.v2AMj7h1088240@repo.freebsd.org> References: <201703102245.v2AMj7h1088240@repo.freebsd.org> From: Ed Maste Date: Wed, 15 Mar 2017 10:52:52 -0400 X-Google-Sender-Auth: bfGsL4mXlIZq8KXgg5KXO74BCYY Message-ID: Subject: Re: svn commit: r315031 - head/sys/tools/fdt To: Oleksandr Tymoshenko Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 14:53:14 -0000 On 10 March 2017 at 17:45, Oleksandr Tymoshenko wrote: > Author: gonzo > Date: Fri Mar 10 22:45:07 2017 > New Revision: 315031 > URL: https://svnweb.freebsd.org/changeset/base/315031 > > Log: > [fdt] Make DTBs generated by make_dtb.sh overlay-ready This breaks WITHOUT_GPL_DTC builds as the BSD dtc does not yet support -@. I've opened a GitHub issue at https://github.com/davidchisnall/dtc/issues/15 to track it. From owner-svn-src-head@freebsd.org Wed Mar 15 14:58:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9FF3FD0EC24; Wed, 15 Mar 2017 14:58:31 +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 mx1.freebsd.org (Postfix) with ESMTPS id 6C0451D7F; Wed, 15 Mar 2017 14:58:31 +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 v2FEwUUV096834; Wed, 15 Mar 2017 14:58:30 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2FEwU9b096829; Wed, 15 Mar 2017 14:58:30 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703151458.v2FEwU9b096829@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 15 Mar 2017 14:58:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315307 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 14:58:31 -0000 Author: mav Date: Wed Mar 15 14:58:29 2017 New Revision: 315307 URL: https://svnweb.freebsd.org/changeset/base/315307 Log: Refactor interrupt handling. Instead of single isp_intr() function doing all possible magic, introduce four different functions to handle mailbox operation completions, async events, response and ATIO queues. The goal is to isolate different code paths to make code more readable, and to make easier support for multiple interrupt vectors. Even oldest hardware in many cases can identify what code path it should run on interrupt. Contemporary hardware can assign them to different interrupt vectors. MFC after: 2 weeks Modified: head/sys/dev/isp/isp.c head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_pci.c head/sys/dev/isp/isp_sbus.c head/sys/dev/isp/ispvar.h Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Wed Mar 15 14:44:59 2017 (r315306) +++ head/sys/dev/isp/isp.c Wed Mar 15 14:58:29 2017 (r315307) @@ -416,11 +416,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d } /* - * Clear instrumentation - */ - isp->isp_intcnt = isp->isp_intbogus = 0; - - /* * Hit the chip over the head with hammer, * and give it a chance to recover. */ @@ -4404,7 +4399,7 @@ isp_start(XS_T *xs) ((ispreqt7_t *)reqp)->req_task_attribute = ttype; } else if (IS_FC(isp)) { /* - * See comment in isp_intr + * See comment in isp_intr_respq */ /* XS_SET_RESID(xs, 0); */ @@ -4911,6 +4906,70 @@ isp_control(ispsoftc_t *isp, ispctl_t ct * and the locking will be held throughout this function. */ +#ifdef ISP_TARGET_MODE +void +isp_intr_atioq(ispsoftc_t *isp) +{ + uint8_t qe[QENTRY_LEN]; + isphdr_t *hp; + void *addr; + uint32_t iptr, optr, oop; + + iptr = ISP_READ(isp, BIU2400_ATIO_RSPINP); + optr = isp->isp_atioodx; + while (optr != iptr) { + oop = optr; + MEMORYBARRIER(isp, SYNC_ATIOQ, oop, QENTRY_LEN, -1); + addr = ISP_QUEUE_ENTRY(isp->isp_atioq, oop); + isp_get_hdr(isp, addr, (isphdr_t *)qe); + hp = (isphdr_t *)qe; + switch (hp->rqs_entry_type) { + case RQSTYPE_NOTIFY: + case RQSTYPE_ATIO: + (void) isp_target_notify(isp, addr, &oop); + break; + default: + isp_print_qentry(isp, "?ATIOQ entry?", oop, addr); + break; + } + optr = ISP_NXT_QENTRY(oop, RESULT_QUEUE_LEN(isp)); + } + if (isp->isp_atioodx != optr) { + ISP_WRITE(isp, BIU2400_ATIO_RSPOUTP, optr); + isp->isp_atioodx = optr; + } +} +#endif + +void +isp_intr_async(ispsoftc_t *isp, uint16_t event) +{ + + if (IS_FC(isp)) + isp_parse_async_fc(isp, event); + else + isp_parse_async(isp, event); +} + +void +isp_intr_mbox(ispsoftc_t *isp, uint16_t mbox0) +{ + int i, obits; + + if (!isp->isp_mboxbsy) { + isp_prt(isp, ISP_LOGWARN, "mailbox 0x%x with no waiters", mbox0); + return; + } + obits = isp->isp_obits; + isp->isp_mboxtmp[0] = mbox0; + for (i = 1; i < ISP_NMBOX(isp); i++) { + if ((obits & (1 << i)) == 0) + continue; + isp->isp_mboxtmp[i] = ISP_READ(isp, MBOX_OFF(i)); + } + MBOX_NOTIFY_COMPLETE(isp); +} + /* * Limit our stack depth by sticking with the max likely number * of completions on a request queue at any one time. @@ -4920,165 +4979,32 @@ isp_control(ispsoftc_t *isp, ispctl_t ct #endif void -isp_intr(ispsoftc_t *isp, uint16_t isr, uint16_t sema, uint16_t info) +isp_intr_respq(ispsoftc_t *isp) { XS_T *complist[MAX_REQUESTQ_COMPLETIONS], *xs; uint32_t iptr, optr, junk; int i, nlooked = 0, ndone = 0, continuations_expected = 0; int etype, last_etype = 0; -again: - /* - * Is this a mailbox related interrupt? - * The mailbox semaphore will be nonzero if so. - */ - if (sema) { - fmbox: - if (info & MBOX_COMMAND_COMPLETE) { - isp->isp_intmboxc++; - if (isp->isp_mboxbsy) { - int obits = isp->isp_obits; - isp->isp_mboxtmp[0] = info; - for (i = 1; i < ISP_NMBOX(isp); i++) { - if ((obits & (1 << i)) == 0) { - continue; - } - isp->isp_mboxtmp[i] = ISP_READ(isp, MBOX_OFF(i)); - } - MBOX_NOTIFY_COMPLETE(isp); - } else { - isp_prt(isp, ISP_LOGWARN, "mailbox cmd (0x%x) with no waiters", info); - } - } else { - if (IS_FC(isp)) - isp_parse_async_fc(isp, info); - else - isp_parse_async(isp, info); - } - if ((IS_FC(isp) && info != ASYNC_RIOZIO_STALL) || isp->isp_state != ISP_RUNSTATE) { - goto out; - } - } - /* * We can't be getting this now. */ if (isp->isp_state != ISP_RUNSTATE) { - /* - * This seems to happen to 23XX and 24XX cards- don't know why. - */ - if (isp->isp_mboxbsy && isp->isp_lastmbxcmd == MBOX_ABOUT_FIRMWARE) { - goto fmbox; - } - isp_prt(isp, ISP_LOGINFO, "interrupt (ISR=%x SEMA=%x INFO=%x) " - "when not ready", isr, sema, info); - /* - * Thank you very much! *Burrrp*! - */ - isp->isp_residx = ISP_READ(isp, isp->isp_respinrp); - isp->isp_resodx = isp->isp_residx; - ISP_WRITE(isp, isp->isp_respoutrp, isp->isp_resodx); - if (IS_24XX(isp)) { - ISP_DISABLE_INTS(isp); - } - goto out; - } - -#ifdef ISP_TARGET_MODE - /* - * Check for ATIO Queue entries. - */ - if (IS_24XX(isp) && - (isr == ISPR2HST_ATIO_UPDATE || isr == ISPR2HST_ATIO_RSPQ_UPDATE || - isr == ISPR2HST_ATIO_UPDATE2)) { - iptr = ISP_READ(isp, BIU2400_ATIO_RSPINP); - optr = isp->isp_atioodx; - - while (optr != iptr) { - uint8_t qe[QENTRY_LEN]; - isphdr_t *hp; - uint32_t oop; - void *addr; - - oop = optr; - MEMORYBARRIER(isp, SYNC_ATIOQ, oop, QENTRY_LEN, -1); - addr = ISP_QUEUE_ENTRY(isp->isp_atioq, oop); - isp_get_hdr(isp, addr, (isphdr_t *)qe); - hp = (isphdr_t *)qe; - switch (hp->rqs_entry_type) { - case RQSTYPE_NOTIFY: - case RQSTYPE_ATIO: - (void) isp_target_notify(isp, addr, &oop); - break; - default: - isp_print_qentry(isp, "?ATIOQ entry?", oop, addr); - break; - } - optr = ISP_NXT_QENTRY(oop, RESULT_QUEUE_LEN(isp)); - } - if (isp->isp_atioodx != optr) { - ISP_WRITE(isp, BIU2400_ATIO_RSPOUTP, optr); - isp->isp_atioodx = optr; - } + isp_prt(isp, ISP_LOGINFO, "respq interrupt when not ready"); + return; } -#endif - /* - * You *must* read the Response Queue In Pointer - * prior to clearing the RISC interrupt. - * - * Debounce the 2300 if revision less than 2. - */ + iptr = ISP_READ(isp, isp->isp_respinrp); + /* Debounce the 2300 if revision less than 2. */ if (IS_2100(isp) || (IS_2300(isp) && isp->isp_revision < 2)) { - i = 0; do { + junk = iptr; iptr = ISP_READ(isp, isp->isp_respinrp); - junk = ISP_READ(isp, isp->isp_respinrp); - } while (junk != iptr && ++i < 1000); - - if (iptr != junk) { - isp_prt(isp, ISP_LOGWARN, "Response Queue Out Pointer Unstable (%x, %x)", iptr, junk); - goto out; - } - } else { - iptr = ISP_READ(isp, isp->isp_respinrp); - } - - optr = isp->isp_resodx; - if (optr == iptr && sema == 0) { - /* - * There are a lot of these- reasons unknown- mostly on - * faster Alpha machines. - * - * I tried delaying after writing HCCR_CMD_CLEAR_RISC_INT to - * make sure the old interrupt went away (to avoid 'ringing' - * effects), but that didn't stop this from occurring. - */ - if (IS_24XX(isp)) { - junk = 0; - } else if (IS_23XX(isp)) { - ISP_DELAY(100); - iptr = ISP_READ(isp, isp->isp_respinrp); - junk = ISP_READ(isp, BIU_R2HSTSLO); - } else { - junk = ISP_READ(isp, BIU_ISR); - } - if (optr == iptr) { - if (IS_23XX(isp) || IS_24XX(isp)) { - ; - } else { - sema = ISP_READ(isp, BIU_SEMA); - info = ISP_READ(isp, OUTMAILBOX0); - if ((sema & 0x3) && (info & 0x8000)) { - goto again; - } - } - isp->isp_intbogus++; - isp_prt(isp, ISP_LOGDEBUG1, "bogus intr- isr %x (%x) iptr %x optr %x", isr, junk, iptr, optr); - } + } while (junk != iptr); } isp->isp_residx = iptr; + optr = isp->isp_resodx; while (optr != iptr) { uint8_t qe[QENTRY_LEN]; ispstatusreq_t *sp = (ispstatusreq_t *) qe; @@ -5130,9 +5056,6 @@ again: for (i = 0; i < rio->req_header.rqs_seqno; i++) { isp_fastpost_complete(isp, rio->req_handles[i]); } - if (isp->isp_fpcchiwater < rio->req_header.rqs_seqno) { - isp->isp_fpcchiwater = rio->req_header.rqs_seqno; - } ISP_MEMZERO(hp, QENTRY_LEN); /* PERF */ last_etype = etype; continue; @@ -5377,10 +5300,8 @@ again: if (ndone > (MAX_REQUESTQ_COMPLETIONS - continuations_expected - 1)) { /* we'll lose some stats, but that's a small price to pay */ for (i = 0; i < ndone; i++) { - if (complist[i]) { - isp->isp_rsltccmplt++; + if (complist[i]) isp_done(complist[i]); - } } ndone = 0; } @@ -5453,17 +5374,6 @@ again: if (nlooked) { ISP_WRITE(isp, isp->isp_respoutrp, optr); isp->isp_resodx = optr; - if (isp->isp_rscchiwater < ndone) - isp->isp_rscchiwater = ndone; - } - -out: - - if (IS_24XX(isp)) { - ISP_WRITE(isp, BIU2400_HCCR, HCCR_2400_CMD_CLEAR_RISC_INT); - } else { - ISP_WRITE(isp, HCCR, HCCR_CMD_CLEAR_RISC_INT); - ISP_WRITE(isp, BIU_SEMA, 0); } for (i = 0; i < ndone; i++) { @@ -5473,7 +5383,6 @@ out: ((isp->isp_dblev & (ISP_LOGDEBUG0|ISP_LOG_CWARN) && ((!XS_NOERR(xs)) || (*XS_STSP(xs) != SCSI_GOOD))))) { isp_prt_endcmd(isp, xs); } - isp->isp_rsltccmplt++; isp_done(xs); } } @@ -5666,16 +5575,7 @@ isp_parse_async(ispsoftc_t *isp, uint16_ if (h2) { isp_prt(isp, ISP_LOGDEBUG3, "fast post/rio completion of 0x%08x", h2); isp_fastpost_complete(isp, h2); - if (isp->isp_fpcchiwater < 2) { - isp->isp_fpcchiwater = 2; - } - } else { - if (isp->isp_fpcchiwater < 1) { - isp->isp_fpcchiwater = 1; - } } - } else { - isp->isp_intoasync++; } } @@ -5733,19 +5633,16 @@ isp_parse_async_fc(ispsoftc_t *isp, uint case ASYNC_CMD_CMPLT: isp_fastpost_complete(isp, (ISP_READ(isp, OUTMAILBOX2) << 16) | ISP_READ(isp, OUTMAILBOX1)); - if (isp->isp_fpcchiwater < 1) { - isp->isp_fpcchiwater = 1; - } break; case ASYNC_RIOZIO_STALL: + isp_intr_respq(isp); break; case ASYNC_CTIO_DONE: #ifdef ISP_TARGET_MODE isp_target_async(isp, (ISP_READ(isp, OUTMAILBOX2) << 16) | ISP_READ(isp, OUTMAILBOX1), mbox); - isp->isp_fphccmplt++; #else isp_prt(isp, ISP_LOGWARN, "unexpected ASYNC CTIO done"); #endif @@ -6017,9 +5914,6 @@ isp_parse_async_fc(ispsoftc_t *isp, uint isp_prt(isp, ISP_LOGWARN, "Unknown Async Code 0x%x", mbox); break; } - if (mbox != ASYNC_CTIO_DONE && mbox != ASYNC_CMD_CMPLT) { - isp->isp_intoasync++; - } } /* @@ -6106,11 +6000,9 @@ isp_handle_other_response(ispsoftc_t *is case RQSTYPE_CTIO7: case RQSTYPE_ABTS_RCVD: case RQSTYPE_ABTS_RSP: - isp->isp_rsltccmplt++; /* count as a response completion */ #ifdef ISP_TARGET_MODE - if (isp_target_notify(isp, (ispstatusreq_t *) hp, optrp)) { + if (isp_target_notify(isp, (ispstatusreq_t *) hp, optrp)) return (1); - } #endif /* FALLTHROUGH */ case RQSTYPE_REQUEST: @@ -6649,7 +6541,6 @@ isp_fastpost_complete(ispsoftc_t *isp, u if (isp->isp_nactive) { isp->isp_nactive--; } - isp->isp_fphccmplt++; isp_done(xs); } Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Wed Mar 15 14:44:59 2017 (r315306) +++ head/sys/dev/isp/isp_freebsd.c Wed Mar 15 14:58:29 2017 (r315307) @@ -512,40 +512,6 @@ ispioctl(struct cdev *dev, u_long c, cad } break; } - case ISP_GET_STATS: - { - isp_stats_t *sp = (isp_stats_t *) addr; - - ISP_MEMZERO(sp, sizeof (*sp)); - sp->isp_stat_version = ISP_STATS_VERSION; - sp->isp_type = isp->isp_type; - sp->isp_revision = isp->isp_revision; - ISP_LOCK(isp); - sp->isp_stats[ISP_INTCNT] = isp->isp_intcnt; - sp->isp_stats[ISP_INTBOGUS] = isp->isp_intbogus; - sp->isp_stats[ISP_INTMBOXC] = isp->isp_intmboxc; - sp->isp_stats[ISP_INGOASYNC] = isp->isp_intoasync; - sp->isp_stats[ISP_RSLTCCMPLT] = isp->isp_rsltccmplt; - sp->isp_stats[ISP_FPHCCMCPLT] = isp->isp_fphccmplt; - sp->isp_stats[ISP_RSCCHIWAT] = isp->isp_rscchiwater; - sp->isp_stats[ISP_FPCCHIWAT] = isp->isp_fpcchiwater; - ISP_UNLOCK(isp); - retval = 0; - break; - } - case ISP_CLR_STATS: - ISP_LOCK(isp); - isp->isp_intcnt = 0; - isp->isp_intbogus = 0; - isp->isp_intmboxc = 0; - isp->isp_intoasync = 0; - isp->isp_rsltccmplt = 0; - isp->isp_fphccmplt = 0; - isp->isp_rscchiwater = 0; - isp->isp_fpcchiwater = 0; - ISP_UNLOCK(isp); - retval = 0; - break; case ISP_FC_GETHINFO: { struct isp_hba_device *hba = (struct isp_hba_device *) addr; @@ -2829,10 +2795,8 @@ static void isp_poll(struct cam_sim *sim) { ispsoftc_t *isp = cam_sim_softc(sim); - uint16_t isr, sema, info; - if (ISP_READ_ISR(isp, &isr, &sema, &info)) - isp_intr(isp, isr, sema, info); + ISP_RUN_ISR(isp); } @@ -2851,9 +2815,7 @@ isp_watchdog(void *arg) * Hand crank the interrupt code just to be sure the command isn't stuck somewhere. */ if (handle != ISP_HANDLE_FREE) { - uint16_t isr, sema, info; - if (ISP_READ_ISR(isp, &isr, &sema, &info) != 0) - isp_intr(isp, isr, sema, info); + ISP_RUN_ISR(isp); ohandle = handle; handle = isp_find_handle(isp, xs); } @@ -4428,14 +4390,11 @@ isp_mbox_wait_complete(ispsoftc_t *isp, isp->isp_osinfo.mbox_sleeping = 0; } else { for (t = 0; t < to; t += 100) { - uint16_t isr, sema, info; if (isp->isp_osinfo.mboxcmd_done) break; - if (ISP_READ_ISR(isp, &isr, &sema, &info)) { - isp_intr(isp, isr, sema, info); - if (isp->isp_osinfo.mboxcmd_done) - break; - } + ISP_RUN_ISR(isp); + if (isp->isp_osinfo.mboxcmd_done) + break; ISP_DELAY(100); } } @@ -4495,14 +4454,9 @@ void isp_platform_intr(void *arg) { ispsoftc_t *isp = arg; - uint16_t isr, sema, info; ISP_LOCK(isp); - isp->isp_intcnt++; - if (ISP_READ_ISR(isp, &isr, &sema, &info)) - isp_intr(isp, isr, sema, info); - else - isp->isp_intbogus++; + ISP_RUN_ISR(isp); ISP_UNLOCK(isp); } Modified: head/sys/dev/isp/isp_pci.c ============================================================================== --- head/sys/dev/isp/isp_pci.c Wed Mar 15 14:44:59 2017 (r315306) +++ head/sys/dev/isp/isp_pci.c Wed Mar 15 14:58:29 2017 (r315307) @@ -61,9 +61,9 @@ static uint32_t isp_pci_rd_reg_2400(isps static void isp_pci_wr_reg_2400(ispsoftc_t *, int, uint32_t); static uint32_t isp_pci_rd_reg_2600(ispsoftc_t *, int); static void isp_pci_wr_reg_2600(ispsoftc_t *, int, uint32_t); -static int isp_pci_rd_isr(ispsoftc_t *, uint16_t *, uint16_t *, uint16_t *); -static int isp_pci_rd_isr_2300(ispsoftc_t *, uint16_t *, uint16_t *, uint16_t *); -static int isp_pci_rd_isr_2400(ispsoftc_t *, uint16_t *, uint16_t *, uint16_t *); +static void isp_pci_run_isr(ispsoftc_t *); +static void isp_pci_run_isr_2300(ispsoftc_t *); +static void isp_pci_run_isr_2400(ispsoftc_t *); static int isp_pci_mbxdma(ispsoftc_t *); static void isp_pci_mbxdmafree(ispsoftc_t *); static int isp_pci_dmasetup(ispsoftc_t *, XS_T *, void *); @@ -71,7 +71,7 @@ static int isp_pci_irqsetup(ispsoftc_t * static void isp_pci_dumpregs(ispsoftc_t *, const char *); static struct ispmdvec mdvec = { - isp_pci_rd_isr, + isp_pci_run_isr, isp_pci_rd_reg, isp_pci_wr_reg, isp_pci_mbxdma, @@ -84,7 +84,7 @@ static struct ispmdvec mdvec = { }; static struct ispmdvec mdvec_1080 = { - isp_pci_rd_isr, + isp_pci_run_isr, isp_pci_rd_reg_1080, isp_pci_wr_reg_1080, isp_pci_mbxdma, @@ -97,7 +97,7 @@ static struct ispmdvec mdvec_1080 = { }; static struct ispmdvec mdvec_12160 = { - isp_pci_rd_isr, + isp_pci_run_isr, isp_pci_rd_reg_1080, isp_pci_wr_reg_1080, isp_pci_mbxdma, @@ -110,7 +110,7 @@ static struct ispmdvec mdvec_12160 = { }; static struct ispmdvec mdvec_2100 = { - isp_pci_rd_isr, + isp_pci_run_isr, isp_pci_rd_reg, isp_pci_wr_reg, isp_pci_mbxdma, @@ -121,7 +121,7 @@ static struct ispmdvec mdvec_2100 = { }; static struct ispmdvec mdvec_2200 = { - isp_pci_rd_isr, + isp_pci_run_isr, isp_pci_rd_reg, isp_pci_wr_reg, isp_pci_mbxdma, @@ -132,7 +132,7 @@ static struct ispmdvec mdvec_2200 = { }; static struct ispmdvec mdvec_2300 = { - isp_pci_rd_isr_2300, + isp_pci_run_isr_2300, isp_pci_rd_reg, isp_pci_wr_reg, isp_pci_mbxdma, @@ -143,7 +143,7 @@ static struct ispmdvec mdvec_2300 = { }; static struct ispmdvec mdvec_2400 = { - isp_pci_rd_isr_2400, + isp_pci_run_isr_2400, isp_pci_rd_reg_2400, isp_pci_wr_reg_2400, isp_pci_mbxdma, @@ -154,7 +154,7 @@ static struct ispmdvec mdvec_2400 = { }; static struct ispmdvec mdvec_2500 = { - isp_pci_rd_isr_2400, + isp_pci_run_isr_2400, isp_pci_rd_reg_2400, isp_pci_wr_reg_2400, isp_pci_mbxdma, @@ -165,7 +165,7 @@ static struct ispmdvec mdvec_2500 = { }; static struct ispmdvec mdvec_2600 = { - isp_pci_rd_isr_2400, + isp_pci_run_isr_2400, isp_pci_rd_reg_2600, isp_pci_wr_reg_2600, isp_pci_mbxdma, @@ -1066,35 +1066,27 @@ isp_pci_detach(device_t dev) #define B2R4(isp, off) bus_read_4((isp)->isp_regs2, (off)) #define B2W4(isp, off, v) bus_write_4((isp)->isp_regs2, (off), (v)) -static ISP_INLINE int -isp_pci_rd_debounced(ispsoftc_t *isp, int off, uint16_t *rp) +static ISP_INLINE uint16_t +isp_pci_rd_debounced(ispsoftc_t *isp, int off) { - uint32_t val0, val1; - int i = 0; + uint16_t val, prev; + val = BXR2(isp, IspVirt2Off(isp, off)); do { - val0 = BXR2(isp, IspVirt2Off(isp, off)); - val1 = BXR2(isp, IspVirt2Off(isp, off)); - } while (val0 != val1 && ++i < 1000); - if (val0 != val1) { - return (1); - } - *rp = val0; - return (0); + prev = val; + val = BXR2(isp, IspVirt2Off(isp, off)); + } while (val != prev); + return (val); } -static int -isp_pci_rd_isr(ispsoftc_t *isp, uint16_t *isrp, uint16_t *semap, uint16_t *info) +static void +isp_pci_run_isr(ispsoftc_t *isp) { - uint16_t isr, sema; + uint16_t isr, sema, info; if (IS_2100(isp)) { - if (isp_pci_rd_debounced(isp, BIU_ISR, &isr)) { - return (0); - } - if (isp_pci_rd_debounced(isp, BIU_SEMA, &sema)) { - return (0); - } + isr = isp_pci_rd_debounced(isp, BIU_ISR); + sema = isp_pci_rd_debounced(isp, BIU_SEMA); } else { isr = BXR2(isp, IspVirt2Off(isp, BIU_ISR)); sema = BXR2(isp, IspVirt2Off(isp, BIU_SEMA)); @@ -1102,59 +1094,61 @@ isp_pci_rd_isr(ispsoftc_t *isp, uint16_t isp_prt(isp, ISP_LOGDEBUG3, "ISR 0x%x SEMA 0x%x", isr, sema); isr &= INT_PENDING_MASK(isp); sema &= BIU_SEMA_LOCK; - if (isr == 0 && sema == 0) { - return (0); - } - *isrp = isr; - if ((*semap = sema) != 0) { - if (IS_2100(isp)) { - if (isp_pci_rd_debounced(isp, OUTMAILBOX0, info)) { - return (0); - } - } else { - *info = BXR2(isp, IspVirt2Off(isp, OUTMAILBOX0)); - } - } - return (1); + if (isr == 0 && sema == 0) + return; + if (sema != 0) { + if (IS_2100(isp)) + info = isp_pci_rd_debounced(isp, OUTMAILBOX0); + else + info = BXR2(isp, IspVirt2Off(isp, OUTMAILBOX0)); + if (info & MBOX_COMMAND_COMPLETE) + isp_intr_mbox(isp, info); + else + isp_intr_async(isp, info); + if (!IS_FC(isp) && isp->isp_state == ISP_RUNSTATE) + isp_intr_respq(isp); + } else + isp_intr_respq(isp); + ISP_WRITE(isp, HCCR, HCCR_CMD_CLEAR_RISC_INT); + if (sema) + ISP_WRITE(isp, BIU_SEMA, 0); } -static int -isp_pci_rd_isr_2300(ispsoftc_t *isp, uint16_t *isrp, uint16_t *semap, uint16_t *info) +static void +isp_pci_run_isr_2300(ispsoftc_t *isp) { uint32_t hccr, r2hisr; + uint16_t isr, info; - if ((BXR2(isp, IspVirt2Off(isp, BIU_ISR)) & BIU2100_ISR_RISC_INT) == 0) { - *isrp = 0; - return (0); - } + if ((BXR2(isp, IspVirt2Off(isp, BIU_ISR)) & BIU2100_ISR_RISC_INT) == 0) + return; r2hisr = BXR4(isp, IspVirt2Off(isp, BIU_R2HSTSLO)); isp_prt(isp, ISP_LOGDEBUG3, "RISC2HOST ISR 0x%x", r2hisr); - if ((r2hisr & BIU_R2HST_INTR) == 0) { - *isrp = 0; - return (0); - } - switch ((*isrp = r2hisr & BIU_R2HST_ISTAT_MASK)) { + if ((r2hisr & BIU_R2HST_INTR) == 0) + return; + isr = r2hisr & BIU_R2HST_ISTAT_MASK; + info = r2hisr >> 16; + switch (isr) { case ISPR2HST_ROM_MBX_OK: case ISPR2HST_ROM_MBX_FAIL: case ISPR2HST_MBX_OK: case ISPR2HST_MBX_FAIL: + isp_intr_mbox(isp, info); + break; case ISPR2HST_ASYNC_EVENT: - *semap = 1; + isp_intr_async(isp, info); break; case ISPR2HST_RIO_16: - *info = ASYNC_RIO16_1; - *semap = 1; - return (1); + isp_intr_async(isp, ASYNC_RIO16_1); + break; case ISPR2HST_FPOST: - *info = ASYNC_CMD_CMPLT; - *semap = 1; - return (1); + isp_intr_async(isp, ASYNC_CMD_CMPLT); + break; case ISPR2HST_FPOST_CTIO: - *info = ASYNC_CTIO_DONE; - *semap = 1; - return (1); + isp_intr_async(isp, ASYNC_CTIO_DONE); + break; case ISPR2HST_RSPQ_UPDATE: - *semap = 0; + isp_intr_respq(isp); break; default: hccr = ISP_READ(isp, HCCR); @@ -1165,45 +1159,52 @@ isp_pci_rd_isr_2300(ispsoftc_t *isp, uin } else { isp_prt(isp, ISP_LOGERR, "unknown interrupt 0x%x\n", r2hisr); } - return (0); } - *info = (r2hisr >> 16); - return (1); + ISP_WRITE(isp, HCCR, HCCR_CMD_CLEAR_RISC_INT); + ISP_WRITE(isp, BIU_SEMA, 0); } -static int -isp_pci_rd_isr_2400(ispsoftc_t *isp, uint16_t *isrp, uint16_t *semap, uint16_t *info) +static void +isp_pci_run_isr_2400(ispsoftc_t *isp) { uint32_t r2hisr; + uint16_t isr, info; r2hisr = BXR4(isp, IspVirt2Off(isp, BIU2400_R2HSTSLO)); isp_prt(isp, ISP_LOGDEBUG3, "RISC2HOST ISR 0x%x", r2hisr); - if ((r2hisr & BIU_R2HST_INTR) == 0) { - *isrp = 0; - return (0); - } - switch ((*isrp = r2hisr & BIU_R2HST_ISTAT_MASK)) { + if ((r2hisr & BIU_R2HST_INTR) == 0) + return; + isr = r2hisr & BIU_R2HST_ISTAT_MASK; + info = (r2hisr >> 16); + switch (isr) { case ISPR2HST_ROM_MBX_OK: case ISPR2HST_ROM_MBX_FAIL: case ISPR2HST_MBX_OK: case ISPR2HST_MBX_FAIL: + isp_intr_mbox(isp, info); + break; case ISPR2HST_ASYNC_EVENT: - *semap = 1; + isp_intr_async(isp, info); break; case ISPR2HST_RSPQ_UPDATE: + isp_intr_respq(isp); + break; case ISPR2HST_RSPQ_UPDATE2: - case ISPR2HST_ATIO_UPDATE: +#ifdef ISP_TARGET_MODE case ISPR2HST_ATIO_RSPQ_UPDATE: +#endif + isp_intr_respq(isp); + /* FALLTHROUGH */ +#ifdef ISP_TARGET_MODE + case ISPR2HST_ATIO_UPDATE: case ISPR2HST_ATIO_UPDATE2: - *semap = 0; + isp_intr_atioq(isp); +#endif break; default: - ISP_WRITE(isp, BIU2400_HCCR, HCCR_2400_CMD_CLEAR_RISC_INT); isp_prt(isp, ISP_LOGERR, "unknown interrupt 0x%x\n", r2hisr); - return (0); } - *info = (r2hisr >> 16); - return (1); + ISP_WRITE(isp, BIU2400_HCCR, HCCR_2400_CMD_CLEAR_RISC_INT); } static uint32_t Modified: head/sys/dev/isp/isp_sbus.c ============================================================================== --- head/sys/dev/isp/isp_sbus.c Wed Mar 15 14:44:59 2017 (r315306) +++ head/sys/dev/isp/isp_sbus.c Wed Mar 15 14:58:29 2017 (r315307) @@ -53,14 +53,14 @@ __FBSDID("$FreeBSD$"); static uint32_t isp_sbus_rd_reg(ispsoftc_t *, int); static void isp_sbus_wr_reg(ispsoftc_t *, int, uint32_t); -static int isp_sbus_rd_isr(ispsoftc_t *, uint16_t *, uint16_t *, uint16_t *); +static void isp_sbus_run_isr(ispsoftc_t *); static int isp_sbus_mbxdma(ispsoftc_t *); static void isp_sbus_mbxdmafree(ispsoftc_t *); static int isp_sbus_dmasetup(ispsoftc_t *, XS_T *, void *); static void isp_sbus_dumpregs(ispsoftc_t *, const char *); static struct ispmdvec mdvec = { - isp_sbus_rd_isr, + isp_sbus_run_isr, isp_sbus_rd_reg, isp_sbus_wr_reg, isp_sbus_mbxdma, @@ -344,23 +344,31 @@ isp_sbus_detach(device_t dev) #define BXR2(isp, off) bus_read_2((isp)->isp_regs, (off)) -static int -isp_sbus_rd_isr(ispsoftc_t *isp, uint16_t *isrp, uint16_t *semap, uint16_t *info) +static void +isp_sbus_run_isr(ispsoftc_t *isp) { - uint16_t isr, sema; + uint16_t isr, sema, info; isr = BXR2(isp, IspVirt2Off(isp, BIU_ISR)); sema = BXR2(isp, IspVirt2Off(isp, BIU_SEMA)); isp_prt(isp, ISP_LOGDEBUG3, "ISR 0x%x SEMA 0x%x", isr, sema); isr &= INT_PENDING_MASK(isp); sema &= BIU_SEMA_LOCK; - if (isr == 0 && sema == 0) { - return (0); - } - *isrp = isr; - if ((*semap = sema) != 0) - *info = BXR2(isp, IspVirt2Off(isp, OUTMAILBOX0)); - return (1); + if (isr == 0 && sema == 0) + return; + if (sema != 0) { + info = BXR2(isp, IspVirt2Off(isp, OUTMAILBOX0)); + if (info & MBOX_COMMAND_COMPLETE) + isp_intr_mbox(isp, info); + else + isp_intr_async(isp, info); + if (isp->isp_state == ISP_RUNSTATE) + isp_intr_respq(isp); + } else + isp_intr_respq(isp); + ISP_WRITE(isp, HCCR, HCCR_CMD_CLEAR_RISC_INT); + if (sema) + ISP_WRITE(isp, BIU_SEMA, 0); } static uint32_t Modified: head/sys/dev/isp/ispvar.h ============================================================================== --- head/sys/dev/isp/ispvar.h Wed Mar 15 14:44:59 2017 (r315306) +++ head/sys/dev/isp/ispvar.h Wed Mar 15 14:58:29 2017 (r315307) @@ -58,7 +58,7 @@ */ typedef struct ispsoftc ispsoftc_t; struct ispmdvec { - int (*dv_rd_isr) (ispsoftc_t *, uint16_t *, uint16_t *, uint16_t *); + void (*dv_run_isr) (ispsoftc_t *); uint32_t (*dv_rd_reg) (ispsoftc_t *, int); void (*dv_wr_reg) (ispsoftc_t *, int, uint32_t); int (*dv_mbxdma) (ispsoftc_t *); @@ -85,8 +85,8 @@ struct ispmdvec { * Macros to access ISP registers through bus specific layers- * mostly wrappers to vector through the mdvec structure. */ -#define ISP_READ_ISR(isp, isrp, semap, info) \ - (*(isp)->isp_mdvec->dv_rd_isr)(isp, isrp, semap, info) +#define ISP_RUN_ISR(isp) \ + (*(isp)->isp_mdvec->dv_run_isr)(isp) #define ISP_READ(isp, reg) \ (*(isp)->isp_mdvec->dv_rd_reg)((isp), (reg)) @@ -544,18 +544,6 @@ struct ispsoftc { uint32_t isp_rqstoutrp; /* register for REQOUTP */ uint32_t isp_respinrp; /* register for RESINP */ uint32_t isp_respoutrp; /* register for RESOUTP */ - - /* - * Instrumentation - */ - uint64_t isp_intcnt; /* total int count */ - uint64_t isp_intbogus; /* spurious int count */ - uint64_t isp_intmboxc; /* mbox completions */ - uint64_t isp_intoasync; /* other async */ - uint64_t isp_rsltccmplt; /* CMDs on result q */ - uint64_t isp_fphccmplt; /* CMDs via fastpost */ - uint16_t isp_rscchiwater; - uint16_t isp_fpcchiwater; NANOTIME_T isp_init_time; /* time were last initialized */ /* @@ -813,12 +801,13 @@ void isp_shutdown(ispsoftc_t *); /* * Internal Interrupt Service Routine - * - * The outer layers do the spade work to get the appropriate status register, - * semaphore register and first mailbox register (if appropriate). This also - * means that most spurious/bogus interrupts not for us can be filtered first. */ -void isp_intr(ispsoftc_t *, uint16_t, uint16_t, uint16_t); +#ifdef ISP_TARGET_MODE +void isp_intr_atioq(ispsoftc_t *); +#endif +void isp_intr_async(ispsoftc_t *, uint16_t event); +void isp_intr_mbox(ispsoftc_t *, uint16_t mbox0); +void isp_intr_respq(ispsoftc_t *); /* From owner-svn-src-head@freebsd.org Wed Mar 15 15:29:14 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C71BD0964B; Wed, 15 Mar 2017 15:29:14 +0000 (UTC) (envelope-from rionda@gmail.com) Received: from mail-qt0-x22d.google.com (mail-qt0-x22d.google.com [IPv6:2607:f8b0:400d:c0d::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 453E2EE5; Wed, 15 Mar 2017 15:29:14 +0000 (UTC) (envelope-from rionda@gmail.com) Received: by mail-qt0-x22d.google.com with SMTP id n21so15071276qta.1; Wed, 15 Mar 2017 08:29:14 -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=NuoqWoyUT8NKRa1N65iW2jn+y9mEre9vErC6oHqFS/U=; b=U9KnxLxKBCeRr12swS1lF8RUPDfaOz8D3a0dyb9zd2oRIneyy+cRHbT2pzEcZbdk8e QM/SPRjmQfbNZMj1SHioI93yZ/ZO6ZnzVz3FTgw/tuT9gEI4QnqV9rhvXjWjwi9kXGBY YYKIBXesqw+i3cL+Z0lsP4sPE1SDapuTsPQnSIC1CENAbFOATJS6JTiwqRYMwLIVsqyC 3zkE5+tTB6bu9L21KNLc8uq6g/ikgmaKOKZ4ZzQD1pnAaPn3nejAXwFXnNjTQB3dmZq+ XzAtI7QmRccXqITAba6y2i3irfEAJNezWSsWoo4pv1EXfTwHrFFFiVv5w+6BcjaJXgOz l7qQ== 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=NuoqWoyUT8NKRa1N65iW2jn+y9mEre9vErC6oHqFS/U=; b=sovwmS7J2U+XQV43LeFTKMViZBXGP29H8+RIn/BKSCmxJLzJTstMcUtFwiSyqZvBPp 2RrZGraknoCkcCE+qHcoUJWNyF3ZfEd9PJ/zf7CkMghke30X0RKpAm1u3tIBLOln2p/I 9BJ66eWNDti220zx30hSSTH0kIJ9rnsh4+lhekf6p0Rt5btBCSXvnq9Rp4AZetD6+ciH l7epm0/blmAfpVK190xpE2UfBNjIBZnwd+L9LXxPN5/pQNf1961Lhwi5l8I0YoyTGqqE g9CfWtQYwho2BEyZOmc4QyMaT83mg2s0zl3oJ/HchMtz3fCEGw1YmwlxFUmLJ5hagWMo RUpQ== X-Gm-Message-State: AFeK/H1tcEM2ogAA+vwQuVGDWQ9xHfjH2y74xNmVxDJ2NpbhBDSZ9HH3mUtdtAvpRGmoPg== X-Received: by 10.200.49.230 with SMTP id i35mr3835485qte.254.1489591752047; Wed, 15 Mar 2017 08:29:12 -0700 (PDT) Received: from [172.31.30.181] (gzac12-mdf2-1.aoa.twosigma.com. [208.77.215.155]) by smtp.gmail.com with ESMTPSA id v39sm1479984qtv.61.2017.03.15.08.29.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Mar 2017 08:29:10 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Re: svn commit: r315305 - in head: . sbin/ipfw From: Matteo Riondato In-Reply-To: <201703151336.v2FDaZS7057372@repo.freebsd.org> Date: Wed, 15 Mar 2017 11:29:09 -0400 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: References: <201703151336.v2FDaZS7057372@repo.freebsd.org> To: "Andrey V. Elsukov" X-Mailer: Apple Mail (2.3259) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 15:29:14 -0000 > On Mar 15, 2017, at 9:36 AM, Andrey V. Elsukov wrote: > > Author: ae > Date: Wed Mar 15 13:36:35 2017 > New Revision: 315305 > URL: https://svnweb.freebsd.org/changeset/base/315305 > > Log: > Change the syntax of ipfw's named states. > > Since the state name is an optional argument, it often can conflict > with other options. To avoid ambiguity now the state name must be > prefixed with a colon. > > Obtained from: Yandex LLC > MFC after: 2 week > Sponsored by: Yandex LLC Relnotes: yes probably? Matteo From owner-svn-src-head@freebsd.org Wed Mar 15 15:32:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF292D09957; Wed, 15 Mar 2017 15:32:37 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward3p.cmail.yandex.net (forward3p.cmail.yandex.net [77.88.31.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Yandex CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 30DAF13E5; Wed, 15 Mar 2017 15:32:36 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [95.108.130.59]) by forward3p.cmail.yandex.net (Yandex) with ESMTP id 6319C210F8; Wed, 15 Mar 2017 18:32:27 +0300 (MSK) Received: from smtp1j.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp1j.mail.yandex.net (Yandex) with ESMTP id 9A7AC3C811EA; Wed, 15 Mar 2017 18:32:25 +0300 (MSK) Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 4FznoTKe1Y-WOv4sXMd; Wed, 15 Mar 2017 18:32:24 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1489591944; bh=SMeWseCQCdlXg0eDCYTeIGb5wYgpM+HZkPvCVlc2xJQ=; h=Subject:To:References:Cc:From:Message-ID:Date:In-Reply-To; b=oBsN84rdKc7kK1pQlVovmQugLXAl7n5QbGUxH1entUqFoLF9m24A2+al3LiqUOT45 qtZP7/P+4QpUY0+ft7ARH0b+3SOTTOIkOBsyK9YWe/gMcvhcxgxM/xWxOs7jIWa+zl 8DQU6ImR1c6yTAJU/grOdDvpPfIFS1lSalPyC7cE= Authentication-Results: smtp1j.mail.yandex.net; dkim=pass header.i=@yandex.ru X-Yandex-Suid-Status: 1 0,1 0,1 0,1 0 Subject: Re: svn commit: r315305 - in head: . sbin/ipfw To: Matteo Riondato References: <201703151336.v2FDaZS7057372@repo.freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: "Andrey V. Elsukov" Openpgp: id=E6591E1B41DA1516F0C9BC0001C5EA0410C8A17A Message-ID: <1042672b-34a8-b1c8-8f13-41df69e4e785@yandex.ru> Date: Wed, 15 Mar 2017 18:30:47 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ESx8axnUSswliu3gL4CeaXkJIM0TPwmwF" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 15:32:37 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ESx8axnUSswliu3gL4CeaXkJIM0TPwmwF Content-Type: multipart/mixed; boundary="JX6fxCjr3k1ITuLgMJdFSNfUdE13s9EL7"; protected-headers="v1" From: "Andrey V. Elsukov" To: Matteo Riondato Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <1042672b-34a8-b1c8-8f13-41df69e4e785@yandex.ru> Subject: Re: svn commit: r315305 - in head: . sbin/ipfw References: <201703151336.v2FDaZS7057372@repo.freebsd.org> In-Reply-To: --JX6fxCjr3k1ITuLgMJdFSNfUdE13s9EL7 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 15.03.2017 18:29, Matteo Riondato wrote: >=20 >> On Mar 15, 2017, at 9:36 AM, Andrey V. Elsukov wrote:= >> >> Author: ae >> Date: Wed Mar 15 13:36:35 2017 >> New Revision: 315305 >> URL: https://svnweb.freebsd.org/changeset/base/315305 >> >> Log: >> Change the syntax of ipfw's named states. >> >> Since the state name is an optional argument, it often can conflict >> with other options. To avoid ambiguity now the state name must be >> prefixed with a colon. >> >> Obtained from: Yandex LLC >> MFC after: 2 week >> Sponsored by: Yandex LLC >=20 > Relnotes: yes Named states was not merged into stable/11 yet, so I think the description from r303018 is still suitable for relnotes. --=20 WBR, Andrey V. Elsukov --JX6fxCjr3k1ITuLgMJdFSNfUdE13s9EL7-- --ESx8axnUSswliu3gL4CeaXkJIM0TPwmwF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEzBAEBCAAdFiEE5lkeG0HaFRbwybwAAcXqBBDIoXoFAljJXicACgkQAcXqBBDI oXprqggAh+cqfLhyJrWYPD6B3ogKG4hTL1rxDfy6lfwhZi755Cub3vl5UNr236eg 8MzJcKTgiz2/pV6+qBednkyht4d/iWI6u3z5VB/SpjXh2i5I0dU/JQB4zRDMvKRN 7MJNH3JcIqLKBbwu5/9mxqKGCEnbVK2nXdPB5Ric9ALJHQrlAJFmiB8zir0NAy2A iFxNFl/VrYgMRL94dQB8Mpc7Xb/yzhPPNpD8XZ4gQyOuRa+gNEoYEZSOLk5eIoKH oLfkLp8aLdOVxMIP1mNuTSF4PfBCA2TDonRtmuwrXUuxn6V3EIDSFsdxfSkFreHL +uT9zMTBVkKGnzqj+xQtDRRxv3e9pw== =jo5y -----END PGP SIGNATURE----- --ESx8axnUSswliu3gL4CeaXkJIM0TPwmwF-- From owner-svn-src-head@freebsd.org Wed Mar 15 15:57:13 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38EECD0D456; Wed, 15 Mar 2017 15:57:13 +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 mx1.freebsd.org (Postfix) with ESMTPS id 05EAE14E3; Wed, 15 Mar 2017 15:57:12 +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 v2FFvCxe021386; Wed, 15 Mar 2017 15:57:12 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2FFvCYS021385; Wed, 15 Mar 2017 15:57:12 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201703151557.v2FFvCYS021385@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 15 Mar 2017 15:57:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315309 - head/usr.bin/lam X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 15:57:13 -0000 Author: bapt Date: Wed Mar 15 15:57:11 2017 New Revision: 315309 URL: https://svnweb.freebsd.org/changeset/base/315309 Log: Do not die on system built without CAPSICUM Modified: head/usr.bin/lam/lam.c Modified: head/usr.bin/lam/lam.c ============================================================================== --- head/usr.bin/lam/lam.c Wed Mar 15 15:33:32 2017 (r315308) +++ head/usr.bin/lam/lam.c Wed Mar 15 15:57:11 2017 (r315309) @@ -134,7 +134,8 @@ getargs(char *av[]) else if ((ip->fp = fopen(p, "r")) == NULL) { err(1, "%s", p); } - if (cap_rights_limit(fileno(ip->fp), &rights_ro) < 0) + if (cap_rights_limit(fileno(ip->fp), &rights_ro) < 0 + && errno != ENOSYS) err(1, "unable to limit rights on: %s", p); ip->pad = P; if (!ip->sepstring) From owner-svn-src-head@freebsd.org Wed Mar 15 16:13:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 194DED0DAAC; Wed, 15 Mar 2017 16:13:54 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 DCE7F1FBB; Wed, 15 Mar 2017 16:13:53 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2FGDrmq029609; Wed, 15 Mar 2017 16:13:53 GMT (envelope-from maxim@FreeBSD.org) Received: (from maxim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2FGDqGW029608; Wed, 15 Mar 2017 16:13:52 GMT (envelope-from maxim@FreeBSD.org) Message-Id: <201703151613.v2FGDqGW029608@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: maxim set sender to maxim@FreeBSD.org using -f From: Maxim Konovalov Date: Wed, 15 Mar 2017 16:13:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315310 - head/lib/libsysdecode X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 16:13:54 -0000 Author: maxim Date: Wed Mar 15 16:13:52 2017 New Revision: 315310 URL: https://svnweb.freebsd.org/changeset/base/315310 Log: Spell "const" properly. PR: 217797 Submitted by: tobik Modified: head/lib/libsysdecode/sysdecode_ioctlname.3 Modified: head/lib/libsysdecode/sysdecode_ioctlname.3 ============================================================================== --- head/lib/libsysdecode/sysdecode_ioctlname.3 Wed Mar 15 15:57:11 2017 (r315309) +++ head/lib/libsysdecode/sysdecode_ioctlname.3 Wed Mar 15 16:13:52 2017 (r315310) @@ -37,7 +37,7 @@ .In sys/types.h .In stdbool.h .In sysdecode.h -.Ft conts char * +.Ft const char * .Fn sysdecode_ioctlname "unsigned long request" .Sh DESCRIPTION The From owner-svn-src-head@freebsd.org Wed Mar 15 16:16:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7CBED0DC76; Wed, 15 Mar 2017 16:16:31 +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 mx1.freebsd.org (Postfix) with ESMTPS id A4DFC26B; Wed, 15 Mar 2017 16:16:31 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2FGGUBR029775; Wed, 15 Mar 2017 16:16:30 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2FGGU8N029774; Wed, 15 Mar 2017 16:16:30 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201703151616.v2FGGU8N029774@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 15 Mar 2017 16:16:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315311 - head/usr.sbin/makefs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 16:16:31 -0000 Author: emaste Date: Wed Mar 15 16:16:30 2017 New Revision: 315311 URL: https://svnweb.freebsd.org/changeset/base/315311 Log: makefs: use 'm' for cd9660 allow-multidot, per NetBSD NetBSD revisions: cd9660.c 1.55 Obtained from: NetBSD Modified: head/usr.sbin/makefs/cd9660.c Modified: head/usr.sbin/makefs/cd9660.c ============================================================================== --- head/usr.sbin/makefs/cd9660.c Wed Mar 15 16:13:52 2017 (r315310) +++ head/usr.sbin/makefs/cd9660.c Wed Mar 15 16:16:30 2017 (r315311) @@ -291,7 +291,7 @@ cd9660_prep_opts(fsinfo_t *fsopts) "Allow 37 char filenames (unimplemented)"), OPT_BOOL('i', "allow-illegal-chars", allow_illegal_chars, "Allow illegal characters in filenames"), - OPT_BOOL('d', "allow-multidot", allow_multidot, + OPT_BOOL('m', "allow-multidot", allow_multidot, "Allow multiple periods in filenames"), OPT_BOOL('o', "omit-trailing-period", omit_trailing_period, "Omit trailing periods in filenames"), From owner-svn-src-head@freebsd.org Wed Mar 15 17:26:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF538D0EB3A; Wed, 15 Mar 2017 17:26:20 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A273E1BF3; Wed, 15 Mar 2017 17:26:20 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2FHQJm1058963; Wed, 15 Mar 2017 17:26:19 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2FHQJs0058962; Wed, 15 Mar 2017 17:26:19 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201703151726.v2FHQJs0058962@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 15 Mar 2017 17:26:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315317 - head/usr.sbin/makefs/ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 17:26:21 -0000 Author: emaste Date: Wed Mar 15 17:26:19 2017 New Revision: 315317 URL: https://svnweb.freebsd.org/changeset/base/315317 Log: makefs: don't print pointers in debugging messages NetBSD revisions: ffs/buf.c 1.14 Obtained from: NetBSD Modified: head/usr.sbin/makefs/ffs/buf.c Modified: head/usr.sbin/makefs/ffs/buf.c ============================================================================== --- head/usr.sbin/makefs/ffs/buf.c Wed Mar 15 17:16:43 2017 (r315316) +++ head/usr.sbin/makefs/ffs/buf.c Wed Mar 15 17:26:19 2017 (r315317) @@ -71,13 +71,12 @@ bread(struct vnode *vp, daddr_t blkno, i assert (bpp != NULL); if (debug & DEBUG_BUF_BREAD) - printf("bread: fs %p blkno %lld size %d\n", - fs, (long long)blkno, size); + printf("bread: blkno %lld size %d\n", (long long)blkno, size); *bpp = getblk(vp, blkno, size, 0, 0, 0); offset = (*bpp)->b_blkno * sectorsize; /* XXX */ if (debug & DEBUG_BUF_BREAD) - printf("bread: bp %p blkno %lld offset %lld bcount %ld\n", - (*bpp), (long long)(*bpp)->b_blkno, (long long) offset, + printf("bread: blkno %lld offset %lld bcount %ld\n", + (long long)(*bpp)->b_blkno, (long long) offset, (*bpp)->b_bcount); if (lseek((*bpp)->b_fd, offset, SEEK_SET) == -1) err(1, "bread: lseek %lld (%lld)", @@ -135,8 +134,8 @@ bwrite(struct buf *bp) assert (bp != NULL); offset = bp->b_blkno * sectorsize; /* XXX */ if (debug & DEBUG_BUF_BWRITE) - printf("bwrite: bp %p blkno %lld offset %lld bcount %ld\n", - bp, (long long)bp->b_blkno, (long long) offset, + printf("bwrite: blkno %lld offset %lld bcount %ld\n", + (long long)bp->b_blkno, (long long) offset, bp->b_bcount); if (lseek(bp->b_fd, offset, SEEK_SET) == -1) return (errno); @@ -188,8 +187,7 @@ getblk(struct vnode *vp, daddr_t blkno, blkno += vp->offset; assert (fs != NULL); if (debug & DEBUG_BUF_GETBLK) - printf("getblk: fs %p blkno %lld size %d\n", fs, - (long long)blkno, size); + printf("getblk: blkno %lld size %d\n", (long long)blkno, size); bp = NULL; if (!buftailinitted) { From owner-svn-src-head@freebsd.org Wed Mar 15 17:32:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78E57D0ECD7; Wed, 15 Mar 2017 17:32:49 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com [IPv6:2607:f8b0:400e:c00::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4682767; Wed, 15 Mar 2017 17:32:49 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x244.google.com with SMTP id v190so2844471pfb.0; Wed, 15 Mar 2017 10:32:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=Xr4bEeskWwhlLhg5kj2qYBdlAVscsrvBcENDZruWW1I=; b=REf61eeztv4Dmihea86LD+K9+alvaue6lYnGnfZsqsFF+ZHkMP99ybPfDczgcYeyHg iIF7AwcpHKijwesPukzvE60DuGh7BmPkKJHvxEyKmYnfH1KyZtudx4QkxR+8dnU2vFh4 eoGNLD5BrzdoJyKQLeZeK0s56li8D9cLdY1+G1DtTnM3XR3zLNuMa6UYkI59g8vdNoHd IM49/3W79A2rtedC+Ly/Ptg6GNA3Xmiyp3dvJsAyerPasAX94vUuv701IE4sp2ot95ap OhYEiQZetLM3J2uZoIH8F306ZUJKUg5HSmYN2VRay8U5Fyt1oKBS97VaBOeQTWhlonIp 7zbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=Xr4bEeskWwhlLhg5kj2qYBdlAVscsrvBcENDZruWW1I=; b=BlawZFqCdli7BIYPtXVD5aypiptOuMPeCc3NkSIsYuS4pZrfViKWkb+Fd/dFIsl6Kx AMLEVCnyOUSDkclnBupkFktwjkfmUQoFWH0zMocI/tNemaZFXmZBRHqXWRQf/HWDvXeo BNsJfmwxjGoI6/QkLeNufrLfjmNERoK2s+JfE39urkzCajf2ypUXH+eVRv/rgN3PzBX6 Egi3UXsUC3JxwQ0xhv2/6Nj+fxTkD0B0qm17Dgz++NX54iItEcNGtClpABQftqyYAO2R 64VNzL2BekRM57rveNRaAV64kMRM9A+khHmcqn6JtNOC/nuF0HO6vRyIybkePWsxDviI aQwg== X-Gm-Message-State: AFeK/H043Uy6kWNnerye87SdleaEiH/5g3OU4wo0H+ca7poJ3XSS9KS2qqrW0qttIutv9g== X-Received: by 10.98.9.29 with SMTP id e29mr4963965pfd.101.1489599168521; Wed, 15 Mar 2017 10:32:48 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id w123sm5534647pfb.44.2017.03.15.10.32.47 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 15 Mar 2017 10:32:47 -0700 (PDT) Subject: Re: svn commit: r315311 - head/usr.sbin/makefs Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_E00E9696-BC1A-42F7-B3F0-02F8CE030954"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201703151616.v2FGGU8N029774@repo.freebsd.org> Date: Wed, 15 Mar 2017 10:32:46 -0700 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201703151616.v2FGGU8N029774@repo.freebsd.org> To: Ed Maste X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 17:32:49 -0000 --Apple-Mail=_E00E9696-BC1A-42F7-B3F0-02F8CE030954 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Mar 15, 2017, at 09:16, Ed Maste wrote: >=20 > Author: emaste > Date: Wed Mar 15 16:16:30 2017 > New Revision: 315311 > URL: https://svnweb.freebsd.org/changeset/base/315311 >=20 > Log: > makefs: use 'm' for cd9660 allow-multidot, per NetBSD >=20 > NetBSD revisions: > cd9660.c 1.55 >=20 > Obtained from: NetBSD Hi Ed, I agree with the change, but doesn=E2=80=99t this break = backwards compatibility in FreeBSD? It also seems like it=E2=80=99s = missing a Relnotes: yes in the commit message (maybe with a bit more = full explanation of what it does). Thanks, -Ngie --Apple-Mail=_E00E9696-BC1A-42F7-B3F0-02F8CE030954 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYyXq/AAoJEPWDqSZpMIYVa68QAJo7YzWIQBrWeNJZIkdb7/UY NGQjMx+vge8VWyT6DxJkadap71oOWSRAZMg4AIQ19z+8NxEGpds/rBDTbWn6FP6z NY/hwliOpE4OBnBOM/oFkerpv5l+w5OwsneQAmSNaHwD1u2rDAczo7wEJSDCZQ/4 vc5DAr3d72mNwlLMrWRzVOgYtTxXLaIdE7VLzOw/Wkoa72r3Gn55XXeIrtC/C+/N A3PxlmEGK+aRBzj2w+aF9HqSwx+q1bJZ+8CZ2vcaO2Uz++XutygsvbztcaDTZUQc 6tEDyc9Xy765io1zMV/meTunyldY1NFEiJZla0kgSx6xr9ufssG8/5sHPi1G1IRr 3lFEUoPu6wDQ65cLeaqGRJUFZrfPVyA+KgdmJ4Ir61/CFbJ4NSzXLyx4dfnG0Cwi ZKLGr2uC+w6WGr+IjRVlUrmKsjTxxVUAOng9OrKFvcSSU09ke2JnPdpGsT+hTlaD eL6g8fM2IfApv3qXKfOi8JJ+VOo63TVjw39gI85h3TyMjFyiqxP6O2BtVvY/vYtq 06+gM7ghMmuT4f5pxP8vV5HZcZkxPGEkzwx/aEV/CYA0Z1RKLuesfk9AK7BrqdC6 6HeMLRPPjyPLQeWAQFl7LFXG7JdMx9j3liakrBinyNkM0QaWq1nXu9JyA+E07Xru bARnTpouqZGAmGKKXrNX =XMyJ -----END PGP SIGNATURE----- --Apple-Mail=_E00E9696-BC1A-42F7-B3F0-02F8CE030954-- From owner-svn-src-head@freebsd.org Wed Mar 15 17:34:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD558D0ED52; Wed, 15 Mar 2017 17:34:34 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x243.google.com (mail-pf0-x243.google.com [IPv6:2607:f8b0:400e:c00::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9AE701C7; Wed, 15 Mar 2017 17:34:34 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x243.google.com with SMTP id o126so2846547pfb.1; Wed, 15 Mar 2017 10:34:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=vvZUo7Lg0WPsyBJkASxl8fCNvQKgeea7BndV4dX1sNk=; b=HWGc8Cz8CstiYn5KjrmJpAsRLqR5m12N+zZLoHHUN8GGkzHRRSmbDyfVprP4v5TQcG T0H9j2JyJhwQSoaXk8ej22AwblQQ8b/TpyQE9swzIpIKB1KQHzBjDAFG/RiXNp2FSBlY uBeIzYVsdYLq47wtlPjH+tDnm9Cyl5LCrIgn/VSrMekIfIAgokWwttoQEcOr1TyfUyBo /QJQSH/N6pjLOrY7s5PmAREXs1jHjJpyOu0OvxpnfBRgvrFpzH+/y6MXfQD4jo9U4Jdf ebjkJ7mSfEzA+tArO/NGi6h+W2WSChSOPztu7R/ErMhrPxiyOW1fVWo89+UwYFdJgsPU Kptg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=vvZUo7Lg0WPsyBJkASxl8fCNvQKgeea7BndV4dX1sNk=; b=dIoItwwCZvzgNr8yyOyADCUANkmLlhXkTtPzW6KSNTBXwpFLEQ0vpi9Js6qI8IozuD zgcCm2C3LFx68YCnkWPsJnCr/6l0y8ap0jtPsCUGCkGT8vpIEGl9M9aegyGG7OziNnQF HNeLWyI3Qw/J9tB1t4xY1zUC1eRphD9XJzrUD2W/iUG4NAVjYSktrHXG76rkk+yMSEHh CzQP86pOZqZF94Aa5tQdWek7MzpwHsBLbWaLE22OBZ/tqqE77P74dPeslQDDwziA/kLW l3LL5wtDmOJa1m7Thc/U5CUFz9Y99QUIcCv3KjyrfEckn8aB+5WLF2++vmFVn9z+DT9b d+CA== X-Gm-Message-State: AFeK/H22M1I/yQwTcH8Mz7lhA9eBMHENkhoORrhf1Dbem8y0kdu8xQ4gca+KLUo7eFijhA== X-Received: by 10.84.224.131 with SMTP id s3mr6241106plj.162.1489599273951; Wed, 15 Mar 2017 10:34:33 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id x10sm5531430pff.72.2017.03.15.10.34.32 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 15 Mar 2017 10:34:33 -0700 (PDT) Subject: Re: svn commit: r315304 - head/usr.sbin/makefs Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_F883C7AA-8EA8-4FB6-9269-AC0100AB044C"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201703151334.v2FDYqY8057248@repo.freebsd.org> Date: Wed, 15 Mar 2017 10:34:32 -0700 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201703151334.v2FDYqY8057248@repo.freebsd.org> To: Ed Maste X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 17:34:34 -0000 --Apple-Mail=_F883C7AA-8EA8-4FB6-9269-AC0100AB044C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Mar 15, 2017, at 06:34, Ed Maste wrote: >=20 > Author: emaste > Date: Wed Mar 15 13:34:51 2017 > New Revision: 315304 > URL: https://svnweb.freebsd.org/changeset/base/315304 >=20 > Log: > makefs: sync option parsing with NetBSD >=20 > - add support for parsing different types; not just int > - homogenize option parsing > - fix single letter parsing > - remove duplicated code >=20 > NetBSD revisions: > cd9660.c 1.36 1.37 1.38 1.41 1.42 1.43 > ffs.c 1.50 1.51 1.52 1.53 1.56 1.57 > makefs.c 1.36 1.37 1.38 1.39 1.40 1.42 1.43 1.44 1.46 > makefs.h 1.28 1.29 1.31 1.32 >=20 > Obtained from: NetBSD > Sponsored by: The FreeBSD Foundation Hi Ed! This probably deserves "Relnotes: yes", because it might change = options (and because =E2=80=94 heck, yes.. good features!). Also, does this need to be MFCed? Thanks, -Ngie --Apple-Mail=_F883C7AA-8EA8-4FB6-9269-AC0100AB044C Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYyXsoAAoJEPWDqSZpMIYVcvEP/iBOadHb9+r/Dqb+CJiS9ftf PXMr6wYU10ehRpF7iY+0XTRKaGqgVZvsdr1z8HS9YtVrvJlqUKjA4jBMp1JAD0dv z/+NTe0IAKaVN3C/5h6UIKPlVlepKsBRV/Hu0KftTkZ8VBwpnYafo/Ub09mW6hxY UBx3WrhsJ4Fn0X3iIuWUmh2O7dbWJ2jvlRKj1WX33SlsKVO/si/IkdAkRpdxYZuj lpBRW+zw0pJ/6IJM8RC6qWrjk0St9QyIn4mGv2sw8rl31Z7wKk6SPG3ygA31ghpM uhXQjzDqX4ZaoCqXDiNzVDnMpJumRl88zpoBcGRvXPv2njdizeQo7HvXzv6ykCke HJYz1VVUjGIvzj7G+YHUBa8hoN9ZGFcQKUehprtoMIRxYuf2/FevzAuSsOyG5EtU jGclA9C25sH98+djb+eLq0mLNDHEd1sWp2yX+sTGLvwxu8SxoVDnRFani5FvIKlq KLWWP4h0XYA0fLfPqqB00iXtCDXjjcF+f6MCblRL+CZfi7XZdn6/aMLC2EgbpEZk 4YPq5BuCiNpVskL293WRCcXhYQBVb0UNHrr4CtjTAlYmERrYZ6DphfWWO3XLv+s9 FUJJIciOQiFzUDciwcfPEs1gWKZqW1lxItXV/ftZy6smwj82tEAWzQsi31P/mHLT OGB1nOknJ0aQQPxe/JSV =ZMT+ -----END PGP SIGNATURE----- --Apple-Mail=_F883C7AA-8EA8-4FB6-9269-AC0100AB044C-- From owner-svn-src-head@freebsd.org Wed Mar 15 17:34:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C62BD0ED8D for ; Wed, 15 Mar 2017 17:34:47 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x233.google.com (mail-it0-x233.google.com [IPv6:2607:f8b0:4001:c0b::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1D4A4283 for ; Wed, 15 Mar 2017 17:34:47 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x233.google.com with SMTP id m27so24050896iti.1 for ; Wed, 15 Mar 2017 10:34:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=sFEi+OcyHlIjYPrpYTz8tLuCqUCAFj+cF4dWrkNwEME=; b=T3o8Wv7XzkLdNG08RkyYh5XC6FejmYtykph2ub3VYyu0pXn5a83695F19BA6hQ1HaM 7819eJkCbKd075lQR3uBxR+8nOtigNqf0zmudML0T0byp4aKdadAl3wcRCZxPq8bYOUP wLG+zKowOnl4Be4zIFyXIGVyeVebYq9a+glnjtH7FCHXiJ2xZDeP/e8CSyRbqgDzimDk QeFQa2HNpFLxBLvQmXoUmcyb1Xzb223gWxG0QE8iZyIyysYBc7bwN9RscVW/ufthUOPc OcwdS47xBQL0EVSg1NwGj4isUWL90HaTs66Lvq7CY42VhqUd6ByZtJDekZh6xzVe5F2S Htlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=sFEi+OcyHlIjYPrpYTz8tLuCqUCAFj+cF4dWrkNwEME=; b=ZNdWphgG414RB88VLJcMiczfOv657cHhx3oD6sYeYj32xTTx5vAxsrSFo0n0miC8KN C/IbPvImgHA+waf0e+nrdsUTTFKw/Wcz9hNvxpwMsRXUdY5h/A+YMOPRH1yxTmk8wRs7 nNbWpXSohCz+BFx2iVhQwN/ZqPxna346B4pioBpB69UwvN/5qWJWs7ekx0ifTTlGFXCU U2n936deao45OHs0QvtHgf5UbMX2S+gnfqzyTssJHBYT5+3MtX/B17fS50LFh6t+WfrJ tHMqVGIYpYxaw9JI+f774fQ+tT3UnZrm2S4VdeoldEJx5dcvgsmhUuNW6bZUfQgM+Iqi W2cg== X-Gm-Message-State: AFeK/H0viI//UKUOPXzktKvYvVT7fKDUs1bzj4t2l44Wrh+UGbNEJMPN1/3TXUsWPqaUlOtJnBkV9EJOGrpcKQ== X-Received: by 10.36.67.209 with SMTP id s200mr8980004itb.60.1489599286295; Wed, 15 Mar 2017 10:34:46 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.134.129 with HTTP; Wed, 15 Mar 2017 10:34:45 -0700 (PDT) X-Originating-IP: [50.253.99.174] In-Reply-To: References: <201703102245.v2AMj7h1088240@repo.freebsd.org> From: Warner Losh Date: Wed, 15 Mar 2017 11:34:45 -0600 X-Google-Sender-Auth: 6Hpcx_2t7iDajNw_G1jxJdiQRW4 Message-ID: Subject: Re: svn commit: r315031 - head/sys/tools/fdt To: Ed Maste Cc: Oleksandr Tymoshenko , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 17:34:47 -0000 On Wed, Mar 15, 2017 at 8:52 AM, Ed Maste wrote: > On 10 March 2017 at 17:45, Oleksandr Tymoshenko wrote: >> Author: gonzo >> Date: Fri Mar 10 22:45:07 2017 >> New Revision: 315031 >> URL: https://svnweb.freebsd.org/changeset/base/315031 >> >> Log: >> [fdt] Make DTBs generated by make_dtb.sh overlay-ready > > This breaks WITHOUT_GPL_DTC builds as the BSD dtc does not yet support > -@. I've opened a GitHub issue at > https://github.com/davidchisnall/dtc/issues/15 to track it. The BSD dtc also doesn't support overlays properly, which will we need to allow "shields" to work on the various embedded boards. Warner From owner-svn-src-head@freebsd.org Wed Mar 15 17:36:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A47D1D0EE47; Wed, 15 Mar 2017 17:36:10 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x244.google.com (mail-pg0-x244.google.com [IPv6:2607:f8b0:400e:c05::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 71F946CA; Wed, 15 Mar 2017 17:36:10 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x244.google.com with SMTP id y17so2985941pgh.0; Wed, 15 Mar 2017 10:36:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=nNguhS3wUy8L9aLkJzkJ+YwwAvybEV2585CMGW3nI34=; b=WIV+lqs2ybllG72yPl686F+cwGWAJG82NqubyNGsL4qsCCAZss+i3Az99VABVjkJRT Nuf8kcSeQH2uOoCba68b82h5me3Pq0tJRM8SfFnSgzj4M77Y5Sw9Mx3FgVnMAGZtQtnE iyTevTZZTE3Pyb9HL4yRl1JjBBY403ZYU7zs/VFTvWp9v0KBHFXSn1Lb8sc+Zk04nhHr jlNn1UXrHMCc6+GrZuwBB3P9MOZEo+StJ800ZEPCKA+ltMPohQdcSDtwd5axOwaKg8Ke Zicj9DahD91+D3p88aWGaAV3VxiFaO71BZIAHikCbU46EDHqgCSt4ijQqHvURxardGKY QK1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=nNguhS3wUy8L9aLkJzkJ+YwwAvybEV2585CMGW3nI34=; b=cOCs7TkSwdgSsHr6p0hG/ImEbvDDj57YEN4T3Yv7eM7Um9sd/fd+LDLP5YjcViHQZA pDkJQD+izQ9QBY7AIRfKFHNgbFqs/s/DTHzttfdje5b2SCDFrzzCVHli/ac99OItq9Aq v4I4LuEHBfHeeTErKTpOPBHRkD69HELHhkCD957lVE9L9ZGACOrIb3gthRKmZHCKywiu 3SxhirxcTv8CzsCKFJjVf7mcTlz49Pd5qsSPt3ShSI8mVf64C/Ux/cewsiu+Ntj9Kur/ YQoaUVEy2AQTXjBAvKjDw5RMogbsQosmh6G5t+5dbtSMDuzW8f+8YwITA3ueGi28eeX5 pk9w== X-Gm-Message-State: AFeK/H0fAO5mvaY9f723W9be5tXdg2q/lHhlUf/z4M62CUuSkOi3Unda6/HWRbg2XCIIRA== X-Received: by 10.99.167.9 with SMTP id d9mr4954485pgf.19.1489599369748; Wed, 15 Mar 2017 10:36:09 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id s20sm5556470pfg.11.2017.03.15.10.36.08 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 15 Mar 2017 10:36:09 -0700 (PDT) Subject: Re: svn commit: r315298 - head/sys/dev/isp Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_6136B0C2-8C11-45D0-B0C1-F879A7130BC1"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201703151033.v2FAXi1p079760@repo.freebsd.org> Date: Wed, 15 Mar 2017 10:36:08 -0700 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201703151033.v2FAXi1p079760@repo.freebsd.org> To: Alexander Motin X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 17:36:10 -0000 --Apple-Mail=_6136B0C2-8C11-45D0-B0C1-F879A7130BC1 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Mar 15, 2017, at 03:33, Alexander Motin wrote: >=20 > Author: mav > Date: Wed Mar 15 10:33:44 2017 > New Revision: 315298 > URL: https://svnweb.freebsd.org/changeset/base/315298 >=20 > Log: > Fix ancient bug from r84597, which broke 23xx after r315234. To someone purely reading the commit messages, this doesn=E2=80=99= t describe what the bug was. Could you please expound on it? Thanks! -Ngie --Apple-Mail=_6136B0C2-8C11-45D0-B0C1-F879A7130BC1 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIbBAEBCgAGBQJYyXuIAAoJEPWDqSZpMIYVKNEP+KYViUdpSSkByaqzeCAEKl5o 9BNoIDvF4yMdl2sWkVksvGRlg2Yi+dinTrWao4/LnFtDcPAmjoUV3cMutyObEmzX lG/yxF7UJOzZuPyC/Ycab4pXcqHs0knt8jO2c2qJvMv4GHTTJaEmej7SrRWyK1p0 tn4dQVkgHK0GEsxKBG+rCyW2zrIIGPDUquCei54WNkNnHKNQGFnLAD/DE04CGDGx DLpWa6PKh0CSvoEjzp49Vnu5t355qNmQkgs9JsgpqDb9Mudl05U8Ad+E1dKsIQUV NTEiIzfHY2xCGMARNfldhRx7ZGOnqKdDviwgRz+gn7kWyjyuEaFfK5TQjTLCgBe6 cTjWs73RUTF2XsvbGpviiquJ0NMSP3qR1c24bn62ihixvjczfjASh2WSAPAe6ATn WXvqeKLppmL2y3HmYViglYziVy6koIx3ylHXgTAmW+GlntAr0JtEggtVIfNdo3lU RaeRDRnf35/0RKz6qh564ok5NgoSTms06nug/eFyHdnCKXbIw4jJCP6cuyDEb7Hp VuIy1UDmw+gvPu4/Iq03atC9XUWTxZ66NIZg26+8nKFTlji2qRL/FrOEmRdRCMGq dpHT9DWpMZDRAikxZaQ4CqBffcSF9VaYUfR194d4eX5UvkwzmoKVyzzAGzyMrLlh 2N2q/6iL7P0UZzwrhNw= =zbgU -----END PGP SIGNATURE----- --Apple-Mail=_6136B0C2-8C11-45D0-B0C1-F879A7130BC1-- From owner-svn-src-head@freebsd.org Wed Mar 15 17:39:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97C01D0EEEF; Wed, 15 Mar 2017 17:39:49 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-wr0-x243.google.com (mail-wr0-x243.google.com [IPv6:2a00:1450:400c:c0c::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3E06D8FB; Wed, 15 Mar 2017 17:39:49 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: by mail-wr0-x243.google.com with SMTP id u108so2914291wrb.2; Wed, 15 Mar 2017 10:39:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=qR3RRWxQfoL7Ibu+XE1PyjSW9pmEUOQb9kd1OdIMy+c=; b=G15pxUSf8+PToW/gssu4JotWK+YWs8QjhQjuY2ix0fA/tl/OSLiTnApiA0B33Cpz7i MggNwyzF/qSE3BCyPaX8BQmJBn7RI5aXCPN8c0n4AG9OZh0AWOt6v8UeiBNJWOPPmyeR 4Wdq5PgipMaSf4LneCfMFXf1pVEu5NloapOK1+xykBmDnuklYhZID7TybtDioCQPFfQG jk9D6Pxo2RJAYRkAmbBGvcC6/Vq1+JJaa2JsSMDgdej23ZCGxo0WzZVHkEQBp/s4YGlh javZCX+HnvhpKIVTIh6+q0Y+BVtFDhOSvRF7YvAlgCSXohXWuisizOgOhROqwZCadJyF Ce6w== 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:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=qR3RRWxQfoL7Ibu+XE1PyjSW9pmEUOQb9kd1OdIMy+c=; b=Ey34UPaQFYWZ35QRCYIksYDYD1nNJ6RW26EVv2xgH6Nm3/nukVH6JyafL6YVb58QfB wk2feQUkHEwbp+JVfYHHVoSMz0RCS58G5aGvzendxYbDbVNxuxzpO6RJM33qZR+Uaw4T gylVkmbFPTpHVp7wkm3BquxRKYBomFthAnCwiFVK3NmZPiAoPQagS9SS1NH0wLnmvUAI U39+tia2ljCEsid9QP5HNgzGza04TJP+H97QCovwnze1Bgez5DLN3l5b6P/wmkVA6kH3 9tt9s3st+ZC5R21gm9ZFAkP++01Iw9y85ASb8abgp9k866gzupfc44kpirlT1CTdJjrm VcAA== X-Gm-Message-State: AFeK/H26sJ+OojOLObv9bRs/bqxK6XpGJ8KZ1ykFmnNRThi7WQiKEMMDlHdZQOJqHDkCXA== X-Received: by 10.223.135.109 with SMTP id 42mr4536795wrz.141.1489599587361; Wed, 15 Mar 2017 10:39:47 -0700 (PDT) Received: from spectre.mavhome.dp.ua ([134.249.139.101]) by smtp.gmail.com with ESMTPSA id j80sm1276345wmd.14.2017.03.15.10.39.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Mar 2017 10:39:46 -0700 (PDT) Sender: Alexander Motin Subject: Re: svn commit: r315298 - head/sys/dev/isp To: "Ngie Cooper (yaneurabeya)" References: <201703151033.v2FAXi1p079760@repo.freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Alexander Motin Message-ID: Date: Wed, 15 Mar 2017 19:39:45 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 17:39:49 -0000 On 15.03.2017 19:36, Ngie Cooper (yaneurabeya) wrote: >> On Mar 15, 2017, at 03:33, Alexander Motin wrote: >> Author: mav >> Date: Wed Mar 15 10:33:44 2017 >> New Revision: 315298 >> URL: https://svnweb.freebsd.org/changeset/base/315298 >> >> Log: >> Fix ancient bug from r84597, which broke 23xx after r315234. > > To someone purely reading the commit messages, this doesn’t describe what the bug was. Could you please expound on it? This trivial one line change. Braces in expression were put in wrong place, that caused wrong register to be read. -- Alexander Motin From owner-svn-src-head@freebsd.org Wed Mar 15 17:43:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 22668D0D0A2; Wed, 15 Mar 2017 17:43:47 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 E36B9CF1; Wed, 15 Mar 2017 17:43:46 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2FHhjBW066659; Wed, 15 Mar 2017 17:43:45 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2FHhjLn066656; Wed, 15 Mar 2017 17:43:45 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201703151743.v2FHhjLn066656@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Wed, 15 Mar 2017 17:43:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315318 - in head/sys: kern vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 17:43:47 -0000 Author: alc Date: Wed Mar 15 17:43:45 2017 New Revision: 315318 URL: https://svnweb.freebsd.org/changeset/base/315318 Log: Relax the locking requirements for vm_object_page_noreuse(). While reviewing all uses of OFF_TO_IDX(), I observed that vm_object_page_noreuse() is requiring an exclusive lock on the object when, in fact, a shared lock suffices. Reviewed by: kib, markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D10011 Modified: head/sys/kern/vfs_default.c head/sys/vm/vm_object.c Modified: head/sys/kern/vfs_default.c ============================================================================== --- head/sys/kern/vfs_default.c Wed Mar 15 17:26:19 2017 (r315317) +++ head/sys/kern/vfs_default.c Wed Mar 15 17:43:45 2017 (r315318) @@ -1100,10 +1100,10 @@ vop_stdadvise(struct vop_advise_args *ap if (vp->v_object != NULL) { start = trunc_page(ap->a_start); end = round_page(ap->a_end); - VM_OBJECT_WLOCK(vp->v_object); + VM_OBJECT_RLOCK(vp->v_object); vm_object_page_noreuse(vp->v_object, OFF_TO_IDX(start), OFF_TO_IDX(end)); - VM_OBJECT_WUNLOCK(vp->v_object); + VM_OBJECT_RUNLOCK(vp->v_object); } bo = &vp->v_bufobj; Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Wed Mar 15 17:26:19 2017 (r315317) +++ head/sys/vm/vm_object.c Wed Mar 15 17:43:45 2017 (r315318) @@ -1978,7 +1978,7 @@ vm_object_page_noreuse(vm_object_t objec struct mtx *mtx, *new_mtx; vm_page_t p, next; - VM_OBJECT_ASSERT_WLOCKED(object); + VM_OBJECT_ASSERT_LOCKED(object); KASSERT((object->flags & (OBJ_FICTITIOUS | OBJ_UNMANAGED)) == 0, ("vm_object_page_noreuse: illegal object %p", object)); if (object->resident_page_count == 0) From owner-svn-src-head@freebsd.org Wed Mar 15 17:54:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44E00D0D398; Wed, 15 Mar 2017 17:54: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 mx1.freebsd.org (Postfix) with ESMTPS id 13E811320; Wed, 15 Mar 2017 17:54:49 +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 v2FHsmWX071299; Wed, 15 Mar 2017 17:54:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2FHsm8j071298; Wed, 15 Mar 2017 17:54:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703151754.v2FHsm8j071298@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 15 Mar 2017 17:54:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315319 - head/usr.bin/diff X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 17:54:49 -0000 Author: ngie Date: Wed Mar 15 17:54:47 2017 New Revision: 315319 URL: https://svnweb.freebsd.org/changeset/base/315319 Log: diff(1): sort long options under -D example in SYNOPSYS Sponsored by: Dell EMC Isilon Modified: head/usr.bin/diff/diff.1 Modified: head/usr.bin/diff/diff.1 ============================================================================== --- head/usr.bin/diff/diff.1 Wed Mar 15 17:43:45 2017 (r315318) +++ head/usr.bin/diff/diff.1 Wed Mar 15 17:54:47 2017 (r315319) @@ -30,7 +30,7 @@ .\" @(#)diff.1 8.1 (Berkeley) 6/30/93 .\" $FreeBSD$ .\" -.Dd March 11, 2017 +.Dd March 15, 2017 .Dt DIFF 1 .Os .Sh NAME @@ -79,8 +79,8 @@ .Op Fl -ignore-case .Op Fl -no-ignore-case .Op Fl -normal -.Op Fl -tabsize .Op Fl -strip-trailing-cr +.Op Fl -tabsize .Fl U Ar number .Ar file1 file2 .Nm diff From owner-svn-src-head@freebsd.org Wed Mar 15 17:59:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47CB6D0D46D; Wed, 15 Mar 2017 17:59:30 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-ot0-x233.google.com (mail-ot0-x233.google.com [IPv6:2607:f8b0:4003:c0f::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 15CEF1588; Wed, 15 Mar 2017 17:59:30 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: by mail-ot0-x233.google.com with SMTP id x37so27775310ota.2; Wed, 15 Mar 2017 10:59:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=JPen19aQ+S6AwjZ8vzodPaRUI17C8y8SPoTBYxhRwr0=; b=AeZWma2u5bY9SboLbGy1rw8XbSFCIF1spVqkqfoZQYriYkAYxDcrc7P3Xv+MsiwJy3 P/U+6DdZ4FRzYvqMpP/XKa69+e+Ea6yIQr3mHA2LjaHqtkgzw4x+3QWNdz7IYE90VTHg xaF0HZ9JZ4d3C/LWbludM0ptuybJh/f8wweby+Idf1iJArI5TcAJBUvBp9gVIaSGQMqk EHV5Sa3+Fq1TXG9NmecfrXMLe5zP5+lUCEhde9ixr6rUBQDShQC8Fdnocz+THL2LySu2 7F8aOo3IIUgj82865JlbJQ2eWWqkG3B69t/ONMNqa13CcxCK+BEMHB76XNopY4kKKUF4 i0Vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=JPen19aQ+S6AwjZ8vzodPaRUI17C8y8SPoTBYxhRwr0=; b=NGXXS2yAoriP0SpfLpM8xdh5ovU+eChawbdNT6JM3rDBLd/DejogMwgKp++1Mtyg5h wY7+eoRb1JtHN370RQl/m5TlVpkfKJHxNobAUrLpo3bV1Ole+1ypjLv+14UNf6vspPoG IIuYzR6ipuaL2U6rZ4cx79yQKvOmfrziY6RWT0hbUJxqfygFtDbMww+2iFmbWT5GUMdM vBN3v53gi+BMcpTB9nbeRCNdrZ+khMMd2lAwYZNsSOELlpXtbimFQQBaRIhv4VisEIJ9 25BsO/CtI+C4D+/faENpWbKu0F6HJlHpOm3Txx0E8qWS49oavFlVOqskqMcLPmdQXmme uISA== X-Gm-Message-State: AFeK/H3ikQpuRUU/vQeG4Cy+ry/ws3kCQ7DdBSQ+Hnda9lj2fgY9vz5rKnZbUovGz9EKzv09s9Hu5qbS17C1IA== X-Received: by 10.202.216.8 with SMTP id p8mr2398857oig.109.1489600768900; Wed, 15 Mar 2017 10:59:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.88.138 with HTTP; Wed, 15 Mar 2017 10:59:28 -0700 (PDT) In-Reply-To: <201703151743.v2FHhjLn066656@repo.freebsd.org> References: <201703151743.v2FHhjLn066656@repo.freebsd.org> From: Benjamin Kaduk Date: Wed, 15 Mar 2017 12:59:28 -0500 Message-ID: Subject: Re: svn commit: r315318 - in head/sys: kern vm To: Alan Cox Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 17:59:30 -0000 Should __FreeBSD_version be bumped, e.g., for out-of-tree filesystems that have custom vop_advise? -Ben On Wed, Mar 15, 2017 at 12:43 PM, Alan Cox wrote: > Author: alc > Date: Wed Mar 15 17:43:45 2017 > New Revision: 315318 > URL: https://svnweb.freebsd.org/changeset/base/315318 > > Log: > Relax the locking requirements for vm_object_page_noreuse(). While > reviewing all uses of OFF_TO_IDX(), I observed that > vm_object_page_noreuse() is requiring an exclusive lock on the object > when, in fact, a shared lock suffices. > > Reviewed by: kib, markj > MFC after: 3 days > Differential Revision: https://reviews.freebsd.org/D10011 > > Modified: > head/sys/kern/vfs_default.c > head/sys/vm/vm_object.c > > Modified: head/sys/kern/vfs_default.c > ============================================================ > ================== > --- head/sys/kern/vfs_default.c Wed Mar 15 17:26:19 2017 (r315317) > +++ head/sys/kern/vfs_default.c Wed Mar 15 17:43:45 2017 (r315318) > @@ -1100,10 +1100,10 @@ vop_stdadvise(struct vop_advise_args *ap > if (vp->v_object != NULL) { > start = trunc_page(ap->a_start); > end = round_page(ap->a_end); > - VM_OBJECT_WLOCK(vp->v_object); > + VM_OBJECT_RLOCK(vp->v_object); > vm_object_page_noreuse(vp->v_object, > OFF_TO_IDX(start), > OFF_TO_IDX(end)); > - VM_OBJECT_WUNLOCK(vp->v_object); > + VM_OBJECT_RUNLOCK(vp->v_object); > } > > bo = &vp->v_bufobj; > > Modified: head/sys/vm/vm_object.c > ============================================================ > ================== > --- head/sys/vm/vm_object.c Wed Mar 15 17:26:19 2017 (r315317) > +++ head/sys/vm/vm_object.c Wed Mar 15 17:43:45 2017 (r315318) > @@ -1978,7 +1978,7 @@ vm_object_page_noreuse(vm_object_t objec > struct mtx *mtx, *new_mtx; > vm_page_t p, next; > > - VM_OBJECT_ASSERT_WLOCKED(object); > + VM_OBJECT_ASSERT_LOCKED(object); > KASSERT((object->flags & (OBJ_FICTITIOUS | OBJ_UNMANAGED)) == 0, > ("vm_object_page_noreuse: illegal object %p", object)); > if (object->resident_page_count == 0) > _______________________________________________ > 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 Mar 15 18:00:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3FA5ED0D675; Wed, 15 Mar 2017 18:00:56 +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 mx1.freebsd.org (Postfix) with ESMTPS id EEBDD176A; Wed, 15 Mar 2017 18:00:55 +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 v2FI0tTm071631; Wed, 15 Mar 2017 18:00:55 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2FI0s15071627; Wed, 15 Mar 2017 18:00:54 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703151800.v2FI0s15071627@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 15 Mar 2017 18:00:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315320 - in head: etc/mtree lib/libcam lib/libcam/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 18:00:56 -0000 Author: ngie Date: Wed Mar 15 18:00:54 2017 New Revision: 315320 URL: https://svnweb.freebsd.org/changeset/base/315320 Log: Start adding basic tests for cam(3) This change contains several negative and positive tests for: - cam_open_device - cam_close_device - cam_getccb - cam_freeccb This also contains a test for the failure case noted in bug 217649, i.e., O_RDWR must be specified because pass(4) requires it. This test unfortunately cannot assume that cam-capable devices are present, so the user must explicitly provide a device via `test_suites.FreeBSD.cam_test_device`. In the future, a test kernel module might be shipped, or ctl(4) might be used, as a test device when testing out libcam, which will allow the tests to do away with having to specify an explicit test device. Reviewed by: asomers, ken (earlier diff) MFC after: 1 week Sponsored by: Dell EMC Isilon Differential Revision: D9928 Added: head/lib/libcam/tests/ head/lib/libcam/tests/Makefile (contents, props changed) head/lib/libcam/tests/libcam_test.c (contents, props changed) Modified: head/etc/mtree/BSD.tests.dist head/lib/libcam/Makefile Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Wed Mar 15 17:54:47 2017 (r315319) +++ head/etc/mtree/BSD.tests.dist Wed Mar 15 18:00:54 2017 (r315320) @@ -310,6 +310,8 @@ ttyio .. .. + libcam + .. libcasper services cap_dns Modified: head/lib/libcam/Makefile ============================================================================== --- head/lib/libcam/Makefile Wed Mar 15 17:54:47 2017 (r315319) +++ head/lib/libcam/Makefile Wed Mar 15 18:00:54 2017 (r315320) @@ -43,4 +43,8 @@ CFLAGS+= -I${.CURDIR} -I${SRCTOP}/sys SHLIB_MAJOR= 7 +.include + +SUBDIR.${MK_TESTS}+= tests + .include Added: head/lib/libcam/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libcam/tests/Makefile Wed Mar 15 18:00:54 2017 (r315320) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +ATF_TESTS_C+= libcam_test + +LIBADD+= cam + +WARNS?= 6 + +.include Added: head/lib/libcam/tests/libcam_test.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libcam/tests/libcam_test.c Wed Mar 15 18:00:54 2017 (r315320) @@ -0,0 +1,217 @@ +/*- + * Copyright (c) 2017 Ngie Cooper + * 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$ + */ + +#include +#include +#include +#include + +#include + +static const char * +get_cam_test_device(const atf_tc_t *tc) +{ + const char *cam_test_device; + + cam_test_device = atf_tc_get_config_var(tc, "cam_test_device"); + + return (cam_test_device); +} + +static void +cam_clear_error(void) +{ + + strcpy(cam_errbuf, ""); +} + +static bool +cam_has_error(void) +{ + + return (strlen(cam_errbuf) != 0); +} + +ATF_TC(cam_open_device_negative_test_O_RDONLY); +ATF_TC_HEAD(cam_open_device_negative_test_O_RDONLY, tc) +{ + + atf_tc_set_md_var(tc, "descr", + "test that cam_open_device(`cam_device`, O_RDONLY) fails to open " + "the underlying pass(4) device (bug 217649)"); + atf_tc_set_md_var(tc, "require.config", "cam_test_device"); + atf_tc_set_md_var(tc, "require.user", "root"); +} + +ATF_TC_BODY(cam_open_device_negative_test_O_RDONLY, tc) +{ + const char *cam_test_device; + + cam_test_device = get_cam_test_device(tc); + + cam_clear_error(); + ATF_CHECK(cam_open_device(cam_test_device, O_RDONLY) == NULL); + ATF_REQUIRE(cam_has_error()); +} + +ATF_TC(cam_open_device_negative_test_nonexistent); +ATF_TC_HEAD(cam_open_device_negative_test_nonexistent, tc) +{ + + atf_tc_set_md_var(tc, "require.user", "root"); +} + +ATF_TC_BODY(cam_open_device_negative_test_nonexistent, tc) +{ + + cam_clear_error(); + ATF_REQUIRE(cam_open_device("/nonexistent", O_RDWR) == NULL); + ATF_REQUIRE(cam_has_error()); +} + +ATF_TC(cam_open_device_negative_test_unprivileged); +ATF_TC_HEAD(cam_open_device_negative_test_unprivileged, tc) +{ + + atf_tc_set_md_var(tc, "require.config", "cam_test_device"); + atf_tc_set_md_var(tc, "require.user", "unprivileged"); +} + +ATF_TC_BODY(cam_open_device_negative_test_unprivileged, tc) +{ + const char *cam_test_device; + + cam_test_device = get_cam_test_device(tc); + + cam_clear_error(); + ATF_CHECK(cam_open_device(cam_test_device, O_RDONLY) == NULL); + ATF_REQUIRE(cam_has_error()); + + cam_clear_error(); + ATF_CHECK(cam_open_device(cam_test_device, O_RDWR) == NULL); + ATF_REQUIRE(cam_has_error()); +} + +ATF_TC(cam_open_device_positive_test); +ATF_TC_HEAD(cam_open_device_positive_test, tc) +{ + + atf_tc_set_md_var(tc, "require.config", "cam_test_device"); + atf_tc_set_md_var(tc, "require.user", "root"); +} + +ATF_TC_BODY(cam_open_device_positive_test, tc) +{ + struct cam_device *cam_dev; + const char *cam_test_device; + + cam_test_device = get_cam_test_device(tc); + + cam_clear_error(); + cam_dev = cam_open_device(cam_test_device, O_RDWR); + ATF_CHECK_MSG(cam_dev != NULL, "cam_open_device failed: %s", + cam_errbuf); + ATF_REQUIRE(!cam_has_error()); + cam_close_device(cam_dev); +} + +ATF_TC(cam_close_device_negative_test_NULL); +ATF_TC_HEAD(cam_close_device_negative_test_NULL, tc) +{ + + atf_tc_set_md_var(tc, "descr", + "test that cam_close_device(NULL) succeeds without error"); + atf_tc_set_md_var(tc, "require.user", "root"); +} + +ATF_TC_BODY(cam_close_device_negative_test_NULL, tc) +{ + + cam_clear_error(); + cam_close_device(NULL); + ATF_REQUIRE(!cam_has_error()); +} + +ATF_TC(cam_getccb_positive_test); +ATF_TC_HEAD(cam_getccb_positive_test, tc) +{ + + atf_tc_set_md_var(tc, "require.config", "cam_test_device"); + atf_tc_set_md_var(tc, "require.user", "root"); +} + +ATF_TC_BODY(cam_getccb_positive_test, tc) +{ + union ccb *cam_ccb; + struct cam_device *cam_dev; + const char *cam_test_device; + + cam_test_device = get_cam_test_device(tc); + + cam_clear_error(); + cam_dev = cam_open_device(cam_test_device, O_RDWR); + ATF_CHECK_MSG(cam_dev != NULL, "cam_open_device failed: %s", + cam_errbuf); + ATF_REQUIRE(!cam_has_error()); + cam_ccb = cam_getccb(cam_dev); + ATF_CHECK_MSG(cam_ccb != NULL, "get_camccb failed: %s", cam_errbuf); + ATF_REQUIRE(!cam_has_error()); + cam_freeccb(cam_ccb); + cam_close_device(cam_dev); +} + +ATF_TC(cam_freeccb_negative_test_NULL); +ATF_TC_HEAD(cam_freeccb_negative_test_NULL, tc) +{ + + atf_tc_set_md_var(tc, "descr", + "test that cam_freeccb(NULL) succeeds without error"); + atf_tc_set_md_var(tc, "require.user", "root"); +} + +ATF_TC_BODY(cam_freeccb_negative_test_NULL, tc) +{ + + cam_clear_error(); + cam_freeccb(NULL); + ATF_REQUIRE(!cam_has_error()); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, cam_open_device_negative_test_O_RDONLY); + ATF_TP_ADD_TC(tp, cam_open_device_negative_test_nonexistent); + ATF_TP_ADD_TC(tp, cam_open_device_negative_test_unprivileged); + ATF_TP_ADD_TC(tp, cam_open_device_positive_test); + ATF_TP_ADD_TC(tp, cam_close_device_negative_test_NULL); + ATF_TP_ADD_TC(tp, cam_getccb_positive_test); + ATF_TP_ADD_TC(tp, cam_freeccb_negative_test_NULL); + + return (atf_no_error()); +} From owner-svn-src-head@freebsd.org Wed Mar 15 18:06:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CCD8D0D820; Wed, 15 Mar 2017 18:06:34 +0000 (UTC) (envelope-from alc@rice.edu) Received: from pp1.rice.edu (proofpoint1.mail.rice.edu [128.42.201.100]) (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 489591D1D; Wed, 15 Mar 2017 18:06:33 +0000 (UTC) (envelope-from alc@rice.edu) Received: from pps.filterd (pp1.rice.edu [127.0.0.1]) by pp1.rice.edu (8.16.0.17/8.16.0.17) with SMTP id v2FGPwuv018263; Wed, 15 Mar 2017 13:06:27 -0500 Received: from mh2.mail.rice.edu (mh2.mail.rice.edu [128.42.201.21]) by pp1.rice.edu with ESMTP id 29794h82gg-1; Wed, 15 Mar 2017 13:06:27 -0500 X-Virus-Scanned: by amavis-2.7.0 at mh2.mail.rice.edu, auth channel Received: from 108-254-203-201.lightspeed.hstntx.sbcglobal.net (108-254-203-201.lightspeed.hstntx.sbcglobal.net [108.254.203.201]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh2.mail.rice.edu (Postfix) with ESMTPSA id EBAD350015F; Wed, 15 Mar 2017 13:06:26 -0500 (CDT) Subject: Re: svn commit: r315318 - in head/sys: kern vm To: Benjamin Kaduk , Alan Cox References: <201703151743.v2FHhjLn066656@repo.freebsd.org> Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Alan Cox Message-ID: <4fd159d0-6509-98a9-7af0-6efada1def26@rice.edu> Date: Wed, 15 Mar 2017 13:06:26 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=12 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1611190142 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 18:06:34 -0000 On 03/15/2017 12:59, Benjamin Kaduk wrote: > Should __FreeBSD_version be bumped, e.g., for out-of-tree filesystems > that have custom vop_advise? No, I don't think so. > On Wed, Mar 15, 2017 at 12:43 PM, Alan Cox > wrote: > > Author: alc > Date: Wed Mar 15 17:43:45 2017 > New Revision: 315318 > URL: https://svnweb.freebsd.org/changeset/base/315318 > > > Log: > Relax the locking requirements for vm_object_page_noreuse(). While > reviewing all uses of OFF_TO_IDX(), I observed that > vm_object_page_noreuse() is requiring an exclusive lock on the > object > when, in fact, a shared lock suffices. > > Reviewed by: kib, markj > MFC after: 3 days > Differential Revision: https://reviews.freebsd.org/D10011 > > > Modified: > head/sys/kern/vfs_default.c > head/sys/vm/vm_object.c > > Modified: head/sys/kern/vfs_default.c > ============================================================================== > --- head/sys/kern/vfs_default.c Wed Mar 15 17:26:19 2017 > (r315317) > +++ head/sys/kern/vfs_default.c Wed Mar 15 17:43:45 2017 > (r315318) > @@ -1100,10 +1100,10 @@ vop_stdadvise(struct vop_advise_args *ap > if (vp->v_object != NULL) { > start = trunc_page(ap->a_start); > end = round_page(ap->a_end); > - VM_OBJECT_WLOCK(vp->v_object); > + VM_OBJECT_RLOCK(vp->v_object); > vm_object_page_noreuse(vp->v_object, > OFF_TO_IDX(start), > OFF_TO_IDX(end)); > - VM_OBJECT_WUNLOCK(vp->v_object); > + VM_OBJECT_RUNLOCK(vp->v_object); > } > > bo = &vp->v_bufobj; > > Modified: head/sys/vm/vm_object.c > ============================================================================== > --- head/sys/vm/vm_object.c Wed Mar 15 17:26:19 2017 > (r315317) > +++ head/sys/vm/vm_object.c Wed Mar 15 17:43:45 2017 > (r315318) > @@ -1978,7 +1978,7 @@ vm_object_page_noreuse(vm_object_t objec > struct mtx *mtx, *new_mtx; > vm_page_t p, next; > > - VM_OBJECT_ASSERT_WLOCKED(object); > + VM_OBJECT_ASSERT_LOCKED(object); > KASSERT((object->flags & (OBJ_FICTITIOUS | OBJ_UNMANAGED)) > == 0, > ("vm_object_page_noreuse: illegal object %p", object)); > if (object->resident_page_count == 0) > _______________________________________________ > 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 Mar 15 18:14:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 79DB8D0DF3B; Wed, 15 Mar 2017 18:14:56 +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 mx1.freebsd.org (Postfix) with ESMTPS id 31D1F80C; Wed, 15 Mar 2017 18:14:56 +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 v2FIEtsI079243; Wed, 15 Mar 2017 18:14:55 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2FIEst8079239; Wed, 15 Mar 2017 18:14:54 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201703151814.v2FIEst8079239@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 15 Mar 2017 18:14:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315321 - in head/usr.sbin/makefs: . ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 18:14:56 -0000 Author: emaste Date: Wed Mar 15 18:14:54 2017 New Revision: 315321 URL: https://svnweb.freebsd.org/changeset/base/315321 Log: makefs: improve error messages - remove \n - use __func__ - err adds the error string itself NetBSD revs: cd9660.c 1.48 1.49 ffs/buf.c 1.21 ffs/mkfs.c 1.27 Obtained from: NetBSD Modified: head/usr.sbin/makefs/cd9660.c head/usr.sbin/makefs/ffs.c head/usr.sbin/makefs/ffs/buf.c head/usr.sbin/makefs/ffs/mkfs.c Modified: head/usr.sbin/makefs/cd9660.c ============================================================================== --- head/usr.sbin/makefs/cd9660.c Wed Mar 15 18:00:54 2017 (r315320) +++ head/usr.sbin/makefs/cd9660.c Wed Mar 15 18:14:54 2017 (r315321) @@ -374,7 +374,7 @@ cd9660_parse_opts(const char *option, fs assert(option != NULL); if (debug & DEBUG_FS_PARSE_OPTS) - printf("cd9660_parse_opts: got `%s'\n", option); + printf("%s: got `%s'\n", __func__, option); i = set_option(cd9660_options, option, buf, sizeof(buf)); if (i == -1) @@ -434,7 +434,7 @@ cd9660_parse_opts(const char *option, fs */ if (buf[0] == '\0') { warnx("The Boot Image Directory parameter" - " requires a directory name\n"); + " requires a directory name"); rv = 0; } else { diskStructure->boot_image_directory = @@ -489,11 +489,11 @@ cd9660_makefs(const char *image, const c iso9660_disk *diskStructure = fsopts->fs_specific; if (diskStructure->verbose_level > 0) - printf("cd9660_makefs: ISO level is %i\n", + printf("%s: ISO level is %i\n", __func__, diskStructure->isoLevel); if (diskStructure->isoLevel < 2 && diskStructure->allow_multidot) - errx(1, "allow-multidot requires iso level of 2\n"); + errx(EXIT_FAILURE, "allow-multidot requires iso level of 2"); assert(image != NULL); assert(dir != NULL); @@ -508,7 +508,7 @@ cd9660_makefs(const char *image, const c } if (diskStructure->verbose_level > 0) - printf("cd9660_makefs: image %s directory %s root %p\n", + printf("%s: image %s directory %s root %p\n", __func__, image, dir, root); /* Set up some constants. Later, these will be defined with options */ @@ -539,13 +539,13 @@ cd9660_makefs(const char *image, const c &numDirectories, &error); if (TAILQ_EMPTY(&real_root->cn_children)) { - errx(1, "cd9660_makefs: converted directory is empty. " - "Tree conversion failed\n"); + errx(EXIT_FAILURE, "%s: converted directory is empty. " + "Tree conversion failed", __func__); } else if (error != 0) { - errx(1, "cd9660_makefs: tree conversion failed\n"); + errx(EXIT_FAILURE, "%s: tree conversion failed", __func__); } else { if (diskStructure->verbose_level > 0) - printf("cd9660_makefs: tree converted\n"); + printf("%s: tree converted\n", __func__); } /* Add the dot and dot dot records */ @@ -554,7 +554,7 @@ cd9660_makefs(const char *image, const c cd9660_setup_root_node(diskStructure); if (diskStructure->verbose_level > 0) - printf("cd9660_makefs: done converting tree\n"); + printf("%s: done converting tree\n", __func__); /* non-SUSP extensions */ if (diskStructure->archimedes_enabled) @@ -578,7 +578,7 @@ cd9660_makefs(const char *image, const c firstAvailableSector = cd9660_setup_boot(diskStructure, firstAvailableSector); if (firstAvailableSector < 0) - errx(1, "setup_boot failed"); + errx(EXIT_FAILURE, "setup_boot failed"); } /* LE first, then BE */ diskStructure->primaryLittleEndianTableSector = firstAvailableSector; @@ -592,8 +592,9 @@ cd9660_makefs(const char *image, const c diskStructure->dataFirstSector = diskStructure->primaryBigEndianTableSector + pathTableSectors; if (diskStructure->verbose_level > 0) - printf("cd9660_makefs: Path table conversion complete. " - "Each table is %i bytes, or %" PRIu64 " sectors.\n", + printf("%s: Path table conversion complete. " + "Each table is %i bytes, or %" PRIu64 " sectors.\n", + __func__, diskStructure->pathTableLength, pathTableSectors); startoffset = diskStructure->sectorSize*diskStructure->dataFirstSector; @@ -621,13 +622,14 @@ cd9660_makefs(const char *image, const c /* Debugging output */ if (diskStructure->verbose_level > 0) { - printf("cd9660_makefs: Sectors 0-15 reserved\n"); - printf("cd9660_makefs: Primary path tables starts in sector %" - PRId64 "\n", diskStructure->primaryLittleEndianTableSector); - printf("cd9660_makefs: File data starts in sector %" - PRId64 "\n", diskStructure->dataFirstSector); - printf("cd9660_makefs: Total sectors: %" - PRId64 "\n", diskStructure->totalSectors); + printf("%s: Sectors 0-15 reserved\n", __func__); + printf("%s: Primary path tables starts in sector %" + PRId64 "\n", __func__, + diskStructure->primaryLittleEndianTableSector); + printf("%s: File data starts in sector %" + PRId64 "\n", __func__, diskStructure->dataFirstSector); + printf("%s: Total sectors: %" + PRId64 "\n", __func__, diskStructure->totalSectors); } /* @@ -649,7 +651,7 @@ cd9660_makefs(const char *image, const c cd9660_free_structure(real_root); if (diskStructure->verbose_level > 0) - printf("cd9660_makefs: done\n"); + printf("%s: done\n", __func__); } /* Generic function pointer - implement later */ @@ -895,8 +897,7 @@ cd9660_translate_node(iso9660_disk *disk { if (node == NULL) { if (diskStructure->verbose_level > 0) - printf("cd9660_translate_node: NULL node passed, " - "returning\n"); + printf("%s: NULL node passed, returning\n", __func__); return 0; } if ((newnode->isoDirRecord = @@ -1270,7 +1271,7 @@ cd9660_count_collisions(cd9660node *copy } #if 0 if ((next = TAILQ_NEXT(iter, cn_next_child)) != NULL) { - printf("cd9660_recurse_on_collision: count is %i \n", count); + printf("%s: count is %i\n", __func__, count); compare = cd9660_compare_filename(iter->isoDirRecord->name, next->isoDirRecord->name); if (compare == 0) { @@ -1393,7 +1394,7 @@ cd9660_convert_structure(iso9660_disk *d * Newer, more efficient method, reduces recursion depth */ if (root == NULL) { - warnx("%s: root is null\n", __func__); + warnx("%s: root is null", __func__); return; } @@ -1629,7 +1630,7 @@ cd9660_compute_full_filename(cd9660node len = snprintf(buf, len, "%s/%s/%s", node->node->root, node->node->path, node->node->name); if (len > CD9660MAXPATH) - errx(1, "Pathname too long."); + errx(EXIT_FAILURE, "Pathname too long."); } /* NEW filename conversion method */ Modified: head/usr.sbin/makefs/ffs.c ============================================================================== --- head/usr.sbin/makefs/ffs.c Wed Mar 15 18:00:54 2017 (r315320) +++ head/usr.sbin/makefs/ffs.c Wed Mar 15 18:14:54 2017 (r315321) @@ -505,7 +505,7 @@ ffs_create_image(const char *image, fsin bufrem = fsopts->size; if (fsopts->sparse) { if (ftruncate(fsopts->fd, bufrem) == -1) { - warn("sparse option disabled.\n"); + warn("sparse option disabled."); fsopts->sparse = 0; } } Modified: head/usr.sbin/makefs/ffs/buf.c ============================================================================== --- head/usr.sbin/makefs/ffs/buf.c Wed Mar 15 18:00:54 2017 (r315320) +++ head/usr.sbin/makefs/ffs/buf.c Wed Mar 15 18:14:54 2017 (r315321) @@ -71,25 +71,26 @@ bread(struct vnode *vp, daddr_t blkno, i assert (bpp != NULL); if (debug & DEBUG_BUF_BREAD) - printf("bread: blkno %lld size %d\n", (long long)blkno, size); + printf("%s: blkno %lld size %d\n", __func__, (long long)blkno, + size); *bpp = getblk(vp, blkno, size, 0, 0, 0); offset = (*bpp)->b_blkno * sectorsize; /* XXX */ if (debug & DEBUG_BUF_BREAD) - printf("bread: blkno %lld offset %lld bcount %ld\n", + printf("%s: blkno %lld offset %lld bcount %ld\n", __func__, (long long)(*bpp)->b_blkno, (long long) offset, (*bpp)->b_bcount); if (lseek((*bpp)->b_fd, offset, SEEK_SET) == -1) - err(1, "bread: lseek %lld (%lld)", + err(1, "%s: lseek %lld (%lld)", __func__, (long long)(*bpp)->b_blkno, (long long)offset); rv = read((*bpp)->b_fd, (*bpp)->b_data, (*bpp)->b_bcount); if (debug & DEBUG_BUF_BREAD) - printf("bread: read %ld (%lld) returned %d\n", + printf("%s: read %ld (%lld) returned %d\n", __func__, (*bpp)->b_bcount, (long long)offset, (int)rv); if (rv == -1) /* read error */ - err(1, "bread: read %ld (%lld) returned %d", + err(1, "%s: read %ld (%lld) returned %d", __func__, (*bpp)->b_bcount, (long long)offset, (int)rv); else if (rv != (*bpp)->b_bcount) /* short read */ - err(1, "bread: read %ld (%lld) returned %d", + err(1, "%s: read %ld (%lld) returned %d", __func__, (*bpp)->b_bcount, (long long)offset, (int)rv); else return (0); Modified: head/usr.sbin/makefs/ffs/mkfs.c ============================================================================== --- head/usr.sbin/makefs/ffs/mkfs.c Wed Mar 15 18:00:54 2017 (r315320) +++ head/usr.sbin/makefs/ffs/mkfs.c Wed Mar 15 18:14:54 2017 (r315321) @@ -778,17 +778,17 @@ ffs_rdfs(daddr_t bno, int size, void *bf offset = bno; offset *= fsopts->sectorsize; if (lseek(fsopts->fd, offset, SEEK_SET) < 0) - err(1, "ffs_rdfs: seek error for sector %lld: %s\n", - (long long)bno, strerror(errno)); + err(1, "%s: seek error for sector %lld", __func__, + (long long)bno); n = read(fsopts->fd, bf, size); if (n == -1) { abort(); - err(1, "ffs_rdfs: read error bno %lld size %d", (long long)bno, - size); + err(1, "%s: read error bno %lld size %d", __func__, + (long long)bno, size); } else if (n != size) - errx(1, "ffs_rdfs: read error for sector %lld: %s\n", - (long long)bno, strerror(errno)); + errx(1, "%s: read error for sector %lld", __func__, + (long long)bno); } /* @@ -803,15 +803,15 @@ ffs_wtfs(daddr_t bno, int size, void *bf offset = bno; offset *= fsopts->sectorsize; if (lseek(fsopts->fd, offset, SEEK_SET) < 0) - err(1, "wtfs: seek error for sector %lld: %s\n", - (long long)bno, strerror(errno)); + err(1, "%s: seek error for sector %lld", __func__, + (long long)bno ); n = write(fsopts->fd, bf, size); if (n == -1) - err(1, "wtfs: write error for sector %lld: %s\n", - (long long)bno, strerror(errno)); + err(1, "%s: write error for sector %lld", __func__, + (long long)bno); else if (n != size) - errx(1, "wtfs: write error for sector %lld: %s\n", - (long long)bno, strerror(errno)); + errx(1, "%s: write error for sector %lld", __func__, + (long long)bno); } @@ -834,5 +834,5 @@ ilog2(int val) for (n = 0; n < sizeof(n) * CHAR_BIT; n++) if (1 << n == val) return (n); - errx(1, "ilog2: %d is not a power of 2\n", val); + errx(1, "%s: %d is not a power of 2", __func__, val); } From owner-svn-src-head@freebsd.org Wed Mar 15 18:15:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E326D0DFC7; Wed, 15 Mar 2017 18:15:32 +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 mx1.freebsd.org (Postfix) with ESMTPS id F22E1969; Wed, 15 Mar 2017 18:15:31 +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 v2FIFV9b079323; Wed, 15 Mar 2017 18:15:31 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2FIFVnH079322; Wed, 15 Mar 2017 18:15:31 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703151815.v2FIFVnH079322@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 15 Mar 2017 18:15:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315322 - head/usr.sbin/syslogd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 18:15:32 -0000 Author: ngie Date: Wed Mar 15 18:15:30 2017 New Revision: 315322 URL: https://svnweb.freebsd.org/changeset/base/315322 Log: syslogd: fix memory leaks in main(..) and allowaddr(..) - main(..): free memory assigned to fdsr before calling die(..). - allowaddr(..): free memory assigned to ap before returning from the function early. Add a `err` goto label to reduce freeaddrinfo/free(ap) logic duplication. MFC after: 1 week X-MFC notes: some of this is dependent on refactoring not MFCed Reported by: clang static analyzer, Coverity CID: 1367750 (ap leakage in allowaddr(..)) Submitted by: Tom Rix Reviewed by: ngie Sponsored by: Dell EMC Isilon, Juniper Differential Revision: D10004 Modified: head/usr.sbin/syslogd/syslogd.c Modified: head/usr.sbin/syslogd/syslogd.c ============================================================================== --- head/usr.sbin/syslogd/syslogd.c Wed Mar 15 18:14:54 2017 (r315321) +++ head/usr.sbin/syslogd/syslogd.c Wed Mar 15 18:15:30 2017 (r315322) @@ -685,8 +685,10 @@ main(int argc, char *argv[]) reapchild(WantReapchild); if (MarkSet) markit(); - if (WantDie) + if (WantDie) { + free(fdsr); die(WantDie); + } bzero(fdsr, howmany(fdsrmax+1, NFDBITS) * sizeof(fd_mask)); @@ -2438,7 +2440,7 @@ allowaddr(char *s) struct allowedpeer *ap; struct servent *se; int masklen = -1; - struct addrinfo hints, *res; + struct addrinfo hints, *res = NULL; #ifdef INET in_addr_t *addrp, *maskp; #endif @@ -2465,8 +2467,9 @@ allowaddr(char *s) ap->port = ntohs(se->s_port); } else { ap->port = strtol(cp1, &cp2, 0); + /* port not numeric */ if (*cp2 != '\0') - return (-1); /* port not numeric */ + goto err; } } else { if ((se = getservbyname("syslog", "udp"))) @@ -2480,7 +2483,7 @@ allowaddr(char *s) strspn(cp1 + 1, "0123456789") == strlen(cp1 + 1)) { *cp1 = '\0'; if ((masklen = atoi(cp1 + 1)) < 0) - return (-1); + goto err; } #ifdef INET6 if (*s == '[') { @@ -2526,8 +2529,7 @@ allowaddr(char *s) /* convert masklen to netmask */ *maskp = htonl(~((1 << (32 - masklen)) - 1)); } else { - freeaddrinfo(res); - return (-1); + goto err; } /* Lose any host bits in the network number. */ *addrp &= *maskp; @@ -2535,10 +2537,9 @@ allowaddr(char *s) #endif #ifdef INET6 case AF_INET6: - if (masklen > 128) { - freeaddrinfo(res); - return (-1); - } + if (masklen > 128) + goto err; + if (masklen < 0) masklen = 128; mask6p = (uint32_t *)&sstosin6(&ap->a_mask)->sin6_addr.s6_addr32[0]; @@ -2559,8 +2560,7 @@ allowaddr(char *s) break; #endif default: - freeaddrinfo(res); - return (-1); + goto err; } freeaddrinfo(res); } else { @@ -2596,7 +2596,13 @@ allowaddr(char *s) printf("port = %d\n", ap->port); } #endif + return (0); +err: + if (res != NULL) + freeaddrinfo(res); + free(ap); + return (-1); } /* From owner-svn-src-head@freebsd.org Wed Mar 15 18:23:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B771ED0E31E; Wed, 15 Mar 2017 18:23:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83DA610B8; Wed, 15 Mar 2017 18:23:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2FINW5k083380; Wed, 15 Mar 2017 18:23:32 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2FINWN9083379; Wed, 15 Mar 2017 18:23:32 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201703151823.v2FINWN9083379@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 15 Mar 2017 18:23:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315323 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 18:23:33 -0000 Author: jhb Date: Wed Mar 15 18:23:32 2017 New Revision: 315323 URL: https://svnweb.freebsd.org/changeset/base/315323 Log: Use UMA_ALIGN_PTR instead of sizeof(void *) for zone alignment. uma_zcreate()'s alignment argument is supposed to be sizeof(foo) - 1, and uma.h provides a set of helper macros for common types. Passing sizeof(void *) results in all of the members being misaligned triggering unaligned access faults on certain architectures (notably MIPS). Reported by: brooks Obtained from: CheriBSD MFC after: 3 days Sponsored by: DARPA / AFRL Modified: head/sys/kern/vfs_lookup.c Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Wed Mar 15 18:15:30 2017 (r315322) +++ head/sys/kern/vfs_lookup.c Wed Mar 15 18:23:32 2017 (r315323) @@ -153,7 +153,7 @@ nameiinit(void *dummy __unused) namei_zone = uma_zcreate("NAMEI", MAXPATHLEN, NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); nt_zone = uma_zcreate("rentr", sizeof(struct nameicap_tracker), - NULL, NULL, NULL, NULL, sizeof(void *), 0); + NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); getnewvnode("crossmp", NULL, &crossmp_vnodeops, &vp_crossmp); } SYSINIT(vfs, SI_SUB_VFS, SI_ORDER_SECOND, nameiinit, NULL); From owner-svn-src-head@freebsd.org Wed Mar 15 18:33:48 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0BBDCD0E6EB; Wed, 15 Mar 2017 18:33:48 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-it0-x232.google.com (mail-it0-x232.google.com [IPv6:2607:f8b0:4001:c0b::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C88961942; Wed, 15 Mar 2017 18:33:47 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it0-x232.google.com with SMTP id m27so25206771iti.1; Wed, 15 Mar 2017 11:33:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=XwaeQiN6+NsSwLFMRmGA2afeGe+GOto3qD8ulrWwsr4=; b=nepqBHeblzt4yX+PJ/C5BoLN8pamrvPhWUSAQrdPz9lf1GuSTKPtNf/AzImlRIf9YC 7uAQHcY8P3mH0iZ+Z8S/UyUI+zwZixwvCGL/Ca9FdCvS4dRnAF/4Y9xKPkhUuw2Bm4mD ppMj2g6za38TOpA15IQiRaxJQfws67VHmiHJgvxw9EgEIaDIVEFMWTqWd4q7iCt9L8A2 8g7TdqIevcpZofHCVdz44mur781zJ3S3uCk501tL6mL+0Ux8wwhkzowTZQtOY5Eyk0hc joTdGM689+TCNX1b2ZReankyRMxxrhHfI+DOLCxUzcZ7zgiW2dPVKdVoOabCZd1Z+Ux/ 948A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=XwaeQiN6+NsSwLFMRmGA2afeGe+GOto3qD8ulrWwsr4=; b=nbJVf7l6m5NHn8z9OrIGLmxHfpk7MoqFTtSimPoJt6pjS5DRqY72PMzHK5MXlWq2aK unU+B8Z+EKuwcgdqoBkAFCcR38Wm3y1B1K48B7WL8w3u8ts5Mgg6MaCgPYCz0UALQa7R P33p+0HZKvysAA2YZqcJCoTgc5fSbqmZtWqA/AeAqlZNe1KPWQ4hm07tTUewb1yGoIGF Bsg10cUdKAo1mcKwtbbfgUxt8msayJnwZ91/la7auMvFPQ2vlHSs1Z51KpBCIdO81jH3 tenLcUx+VnvCtE0KuSy/OZJePzPSh8u7n/DV7ibfVAZhuPjvPFcEoA1RAWxdGd44iqML 7Rpg== X-Gm-Message-State: AFeK/H1M7ooE3bqDwul1tyiYX9jEOHNhrD6t3KfZSwFaQONr57tcEqehpgnpqWXCSpI+JLzP7XkTpap4dla0PQ== X-Received: by 10.36.213.196 with SMTP id a187mr21878731itg.4.1489602827198; Wed, 15 Mar 2017 11:33:47 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.30.209 with HTTP; Wed, 15 Mar 2017 11:33:26 -0700 (PDT) In-Reply-To: References: <201703151616.v2FGGU8N029774@repo.freebsd.org> From: Ed Maste Date: Wed, 15 Mar 2017 14:33:26 -0400 X-Google-Sender-Auth: RyUOzif0ItgyTt7qN46V1BgKbus Message-ID: Subject: Re: svn commit: r315311 - head/usr.sbin/makefs To: "Ngie Cooper (yaneurabeya)" Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 18:33:48 -0000 On 15 March 2017 at 13:32, Ngie Cooper (yaneurabeya) wrote: > > Hi Ed, > I agree with the change, but doesn=E2=80=99t this break backwards= compatibility in FreeBSD? Not really: the 'd' option only appeared as of r315304 earlier today. The options are documented in makefs(8), although the single-letter aliases are not. I'll try to work with NetBSD folks to rectify that. From owner-svn-src-head@freebsd.org Wed Mar 15 18:35:48 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 185E8D0E775 for ; Wed, 15 Mar 2017 18:35:48 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x231.google.com (mail-io0-x231.google.com [IPv6:2607:f8b0:4001:c06::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D323D1AEB for ; Wed, 15 Mar 2017 18:35:47 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x231.google.com with SMTP id z13so26480941iof.2 for ; Wed, 15 Mar 2017 11:35:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=FpZPJJ+1WC561+aGKER2bfsa7gFzjYfZS+Yo5oBUa/k=; b=tN5WICbd2+gdTwL7sKKrSHmrKrJFB+vfR2iPPa9leQDUSACJ6VywBHCAwdq06BFm77 W1A7OsZfuWzeLPE8VCSEtu5u0T32VPD0P6IVbd9NPkww7QJPfJ59hCIfvMbn8RCtL7/L 1tbK9qgzZFd1M7vVmIYUPKNb8hV0djzvJQsCtCtBT6t2kHzIXcM2fqtMH80wKcjBL/S0 SMacu6RUQNqWULXbs5U+MtJ7+QJ7wehActmR5Iuw/CZUVuZwFzb0sH8NNfhKBWTV2nvS sOi3qMlTsIVq0o1dqx0qlLdunsVMpMdA6GT5sTywm3qW7m1/yBSKb1xx2sChuomYdwZe B7AA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=FpZPJJ+1WC561+aGKER2bfsa7gFzjYfZS+Yo5oBUa/k=; b=SRG3eCKtnY0HrnOGkySXwTP0atQdt5JKifvl4J5Qk8xMe8bVyNgX8YDels9I192jSR 4H4IYILaJEvETt5wMnG86OxSKh5uaY5AbueSM8WTtjgaEHyKh6NmZ9HggqTZSOT7GK6F BBJcaRLZKOLL67X0MczIhtbsBEMdFAjLfeaAvuBZzIICXmZ0wUkqRtjEMXNhCmgXpuYj bQCGD+qfIEpY5gmT+ikHzp8UU9QR2INfumolErRP3cf/OhFHAVtM68zSSnV7oP90UVNn FfqJ0bafnu70UdA1Pzwb6TuRVqBexQXHoQUay7Ct4Vfto+8+YVa2aKxvXRu+vzhFVSO5 O0Nw== X-Gm-Message-State: AFeK/H3I5gUqthhoBSCEF2JeYDa/yYDVduzsbElTYd83MfnGU5gtA+g3/ArmgBoMWpfaZDfohT9qBSrIF6ErEQ== X-Received: by 10.107.174.220 with SMTP id n89mr7087707ioo.166.1489602947161; Wed, 15 Mar 2017 11:35:47 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.134.129 with HTTP; Wed, 15 Mar 2017 11:35:46 -0700 (PDT) X-Originating-IP: [50.253.99.174] In-Reply-To: References: <201703151616.v2FGGU8N029774@repo.freebsd.org> From: Warner Losh Date: Wed, 15 Mar 2017 12:35:46 -0600 X-Google-Sender-Auth: ZN2xaeYbjIpZ5aI0qZVjZpM0GsI Message-ID: Subject: Re: svn commit: r315311 - head/usr.sbin/makefs To: Ed Maste Cc: "Ngie Cooper (yaneurabeya)" , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 18:35:48 -0000 On Wed, Mar 15, 2017 at 12:33 PM, Ed Maste wrote: > On 15 March 2017 at 13:32, Ngie Cooper (yaneurabeya) > wrote: >> >> Hi Ed, >> I agree with the change, but doesn=E2=80=99t this break backward= s compatibility in FreeBSD? > > Not really: the 'd' option only appeared as of r315304 earlier today. > > The options are documented in makefs(8), although the single-letter > aliases are not. I'll try to work with NetBSD folks to rectify that. But I put thousands of hours into my build system that depends on it since you committed it earlier today! Down with incompatibility. :P Warner From owner-svn-src-head@freebsd.org Wed Mar 15 18:36:58 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E768D0E85A; Wed, 15 Mar 2017 18:36:58 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x242.google.com (mail-pf0-x242.google.com [IPv6:2607:f8b0:400e:c00::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1931B1D3D; Wed, 15 Mar 2017 18:36:58 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x242.google.com with SMTP id x63so2884552pfx.2; Wed, 15 Mar 2017 11:36:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=2iZJdYko0LmrfRcplijceTWX4DO4meZd+DyYb4FCuCo=; b=qjAuHglAaIMRDmiH5iFj7q6XenwlY4HhCV1XQ0atkkLdcUgEJdHf0s5UQM5xvme/z4 G4cKWJK1IT9P4Q2b/SAW6PW5HvfNovw22lvc8fRuZCz+PrjITKwlr310kDPG/xEyhq6C b2kNvRDMx8MPGGVUqgDqXojs2OfA6MZro/7v+qLHQNJzOAXOp6Rdp7PivqTvf+Ofjy5Y t+vPRVFjtYKYDzKn9prYyyEMikIzgE5Z4gFge/1iMrla7eIfK688xrQtuq1ZNvQqX8xG 6DOW9rrQs7E9lH81R1vl5Ilf/0dmr4vuyHruHSWLULhyyhOyC/TSYMFFmEB4Num1+ZlE Z69Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=2iZJdYko0LmrfRcplijceTWX4DO4meZd+DyYb4FCuCo=; b=YTAYxFxjw7TUyQ1SP1ibDAaEFB6vD26os6rD8hsH4H/AXsJo31Ew6m282ct5PrDSMU /M53Zy6JwRN3JX2gFKAMBlav7ahVjs1eLPLx8nsrDFGBVoWez+zD1gAZS8Nzm85w73E+ DasSudSGva7p9MCsWAfuYfCM1hEjYw+kV5Jm71xBMyLJvwWwyn3cwXLSvtdvlGfjtA6j wj1KK8+oz02gqEzzznt1ffZLVHvcBGIsfeJvPdcz6sNkWfl7zBZYhzYPHaHxwqxdvUYW SLVCqfSBmZ4cxNGVnxlSzsriJO3xagjZ6UyVpEUAUlCgtleqwItVUK0gU6Uc3Bu1l2wc hxdA== X-Gm-Message-State: AFeK/H3TVhvOdv3hjKNEYUZbOJPP0+Dt3GxHbVTQzQVCB2nHhJaSudk1VhrrUu/xBBA99Q== X-Received: by 10.98.155.28 with SMTP id r28mr5176275pfd.212.1489603017659; Wed, 15 Mar 2017 11:36:57 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id b14sm5686934pfh.114.2017.03.15.11.36.56 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 15 Mar 2017 11:36:57 -0700 (PDT) Subject: Re: svn commit: r315311 - head/usr.sbin/makefs Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_E7B1747D-EC0D-41D9-A2F7-49D2F6CC76F9"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Wed, 15 Mar 2017 11:36:56 -0700 Cc: Ed Maste , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <149A08DB-44D0-4534-81D6-77DA9F584931@gmail.com> References: <201703151616.v2FGGU8N029774@repo.freebsd.org> To: Warner Losh X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 18:36:58 -0000 --Apple-Mail=_E7B1747D-EC0D-41D9-A2F7-49D2F6CC76F9 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Mar 15, 2017, at 11:35, Warner Losh wrote: >=20 > On Wed, Mar 15, 2017 at 12:33 PM, Ed Maste wrote: >> On 15 March 2017 at 13:32, Ngie Cooper (yaneurabeya) >> wrote: >>>=20 >>> Hi Ed, >>> I agree with the change, but doesn=E2=80=99t this break = backwards compatibility in FreeBSD? >>=20 >> Not really: the 'd' option only appeared as of r315304 earlier today. >>=20 >> The options are documented in makefs(8), although the single-letter >> aliases are not. I'll try to work with NetBSD folks to rectify that. >=20 > But I put thousands of hours into my build system that depends on it > since you committed it earlier today! Down with incompatibility. :P Buwahahaha=E2=80=A6 yeah, I totally missed that comment earlier :D. --Apple-Mail=_E7B1747D-EC0D-41D9-A2F7-49D2F6CC76F9 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYyYnIAAoJEPWDqSZpMIYVIHwQANPEUIYZtPvjymVzNxecsc7f FQnkxbR2S965etiJIeWjYKxaLC/EYtYvKkPdlU64zCDzv4TWtPHso4Efzab9Egx/ T8d5i7LjCtugLsXMWcy6Ax35vMK3R+qCdlfgDsoI07NWor56KO4eEhwUJKgdf9iR rKJxWh/dXGVbQyPjeV6gND5/cpcHaa6n2SC4ZYuOkSL6Y12eycvz9zQRNnpYCeF4 j+GwY66U+lzIpaocAeNh4oXqBK2uirNImnChK3eN4BGMx1P7+6eW+XbheM4OxRzb Eh4Ib2Kb5Gh4MpmPLM0md4d9Xh9Ss4VnY368qYtQzcNHC0i1yLwL2r5s2a5itKtp 4MQdkkPPJ7xH2eGHh9gKQDTrTVCJbrMhHanPa5MU/OcFQSwknjff6bIMJBVcqZ0/ aYzpCo6kpptnXD2qqmEoy2xznAZ9lbKUQ7eovKg6sIwa/A6vhw9I3Y73NtCHf54o ndxFsXTaGrM48wdcn4Krux5n8lOHDx95PeXe0mhcUzo65nsMkT/d8mihsMCLRvT0 rv7yiFpXze4pDqLURvSbxcbe8nEBfhAjMmMuhSTYrCu/kP+hQmhgAoLzGKlVnCdP 99KGJ+vOJDMGVzRNGWV+2KCgF+zmeJwGxPfVfB3loBpd3zIMwcuhbbHBu6luD9wz uKIts424+NADF2+DrXFH =XHN8 -----END PGP SIGNATURE----- --Apple-Mail=_E7B1747D-EC0D-41D9-A2F7-49D2F6CC76F9-- From owner-svn-src-head@freebsd.org Wed Mar 15 18:38:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1DB7D0E926; Wed, 15 Mar 2017 18:38:07 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x22e.google.com (mail-io0-x22e.google.com [IPv6:2607:f8b0:4001:c06::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AA74B1EC2; Wed, 15 Mar 2017 18:38:07 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x22e.google.com with SMTP id b140so26549878iof.1; Wed, 15 Mar 2017 11:38:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=tptuJsbd22XZpbGs6IssyGzxqMO2rzQmD6GpZk+xOuI=; b=EmnlxqIDgsceOmVqXhodnFcF2juD+W9FpP/1mMLZKYn5k3cqj5J5tmIk9QK6BfufFO BngadAFO1vRp2jJWCUWxNvDNMNJxay4JlrriMiLf3dRnkUF9Ko7JTxeBvP1Sa67t1OMq nokdWnAYObNv3LgzqACTpk7ISCYqBsl/LDQUqpRMjhEjj6SucXUDkHGdNv3Lat3gF/v1 pVgE3827MbRYTpWfuv7LPLk7V++HyrHLn6Ks9JaXrVBa6jEROmPN2dKIYRmmQ/iPRYeb cLTvxc+cOYAXsh+i30zdnD59XJAAkEJ1yZbuVUSeQkZ5BGW7FpruxpraBfIZ6C/m39CR WS8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=tptuJsbd22XZpbGs6IssyGzxqMO2rzQmD6GpZk+xOuI=; b=gnmfN/I8DgTGTOaMbB0EsSzG0QqeAOFIMFngQPyi8nPd1oFvzn/KhhJEsLsgtEkMKt oK9BunYL8Gy6YBrvDNMOhSRwMwGvWlEufEMvf9oON7Y9t0hC4wjVYIfl4SMwmXjfJPQp NixZGJxPQyjNO16sjbW1kDm8cz8XZXqlNrrvY/NeTARJyMyHZj+55ydHbLNs4ayEpp/2 F/m4Ew0LVQNCYRWI6Q9mIZEnYNQlUfK/QsJXxgBMVVLWollS83CjX8VLfBMjKN6rxVXp EsvTvV+vd/KLJALUFLue06PDtQNNATPOq9ghqQ34HcF/lToYWwrtcvDpKYTBy5LvpxTV frxA== X-Gm-Message-State: AFeK/H2ae+NtxMpEM3+MXT5Kg1h7gOQDKcT2Xjejj97hMKBRUrlO70cLd5pVFsftlrzrP4mgqr9p8fBi5AZWPQ== X-Received: by 10.107.47.102 with SMTP id j99mr6546277ioo.52.1489603087097; Wed, 15 Mar 2017 11:38:07 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.30.209 with HTTP; Wed, 15 Mar 2017 11:37:46 -0700 (PDT) In-Reply-To: References: <201703151334.v2FDYqY8057248@repo.freebsd.org> From: Ed Maste Date: Wed, 15 Mar 2017 14:37:46 -0400 X-Google-Sender-Auth: E0czp3FEm66PlvNnrqfrL4OCmAw Message-ID: Subject: Re: svn commit: r315304 - head/usr.sbin/makefs To: "Ngie Cooper (yaneurabeya)" Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 18:38:08 -0000 On 15 March 2017 at 13:34, Ngie Cooper (yaneurabeya) wrote: > >> On Mar 15, 2017, at 06:34, Ed Maste wrote: >> >> Author: emaste >> Date: Wed Mar 15 13:34:51 2017 >> New Revision: 315304 >> URL: https://svnweb.freebsd.org/changeset/base/315304 >> >> Log: >> makefs: sync option parsing with NetBSD >> >> - add support for parsing different types; not just int >> - homogenize option parsing >> - fix single letter parsing >> - remove duplicated code >> >> NetBSD revisions: >> cd9660.c 1.36 1.37 1.38 1.41 1.42 1.43 >> ffs.c 1.50 1.51 1.52 1.53 1.56 1.57 >> makefs.c 1.36 1.37 1.38 1.39 1.40 1.42 1.43 1.44 1.46 >> makefs.h 1.28 1.29 1.31 1.32 >> >> Obtained from: NetBSD >> Sponsored by: The FreeBSD Foundation > > Hi Ed! > This probably deserves "Relnotes: yes", because it might change o= ptions (and because =E2=80=94 heck, yes.. good features!). This is largely an internal refactoring without user-facing changes. It mainly moves ad-hoc option parsing in individual filesystems into common code. The only visible effect should be that filesystem-specific options now have a single-letter alias as well. From owner-svn-src-head@freebsd.org Wed Mar 15 18:39:08 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CE6ED0E9BA; Wed, 15 Mar 2017 18:39:08 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x22f.google.com (mail-pg0-x22f.google.com [IPv6:2607:f8b0:400e:c05::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48EA88E; Wed, 15 Mar 2017 18:39:08 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x22f.google.com with SMTP id 141so12927468pgd.1; Wed, 15 Mar 2017 11:39:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=qZ+jGYVYDcR9REJpPDuvJm5nKtysmHwctXFdfB//7Eo=; b=iQC6mmuOfw3rTqZUSaOQaS+SR+TYbeHHtw8UU6zAtr6IhHhzw0F0PFi93Fdu8Z55uV MaxxH1d2PYgt6qlWGXRB3eZSZN6l3inRNuuL8f/7p45PhSN2rRW6xiH3WhX+9x8S2S9g 18eRRUJ9TkXpdsW8BXcuw/wgg86/7PSjj0iby7W0xQ8CFMA8a/sARqSHhSLFz6PxVxfK CLIzCc0zDGkfpnJdiKbv1XMsEnijTd87zULBBlAlIYc9CoLhbDmm1Ixxr95vmYQCrNJY 3gRnSqmv9+AXH3cU7OZm26iQswwX7al8Q3OMcZX9n2vv/iaRSnWi6o5344I/p90Md9Qp FJ0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=qZ+jGYVYDcR9REJpPDuvJm5nKtysmHwctXFdfB//7Eo=; b=Hg4vAaNLmPnhDYLT1Djcms04iVE8CtEvWz9xmqUTLH8e3yXxnvsJRM15tnhkQ53oF4 HJYQjbF9j1fK1Et6mu7DvWtJNVOb3yNWJry4uknEiUZIwdzsRAvRaQZRuq/lIHCNzUgG fi4QXK5LR3dOqV245wlfz3VnMqkjSNeyuxwKjvnnzTmvjwGNP69Hzx/kBn5ivTK47EmK qegvcAVyLtrimREW3HIPnxN2N8eSIAT/8PQdHZsL2fVBdsI8a28h/rOv6OG91lxE1jU1 Lpmd1aSyL1vQoVMOMH/5Jqy7Ze4yQ4PCQeCgJAuim6nRX7gbSJPGTNoJEjgVyvGEeqH1 eJRQ== X-Gm-Message-State: AFeK/H26NCbtWkRZptoSOw2o3GqvzFZLsX+WDHNcgFP+K/bN7Nttg3+n6mUPyh4M8yxABw== X-Received: by 10.84.134.164 with SMTP id 33mr6652470plh.116.1489603147561; Wed, 15 Mar 2017 11:39:07 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id h20sm5703982pfh.79.2017.03.15.11.39.06 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 15 Mar 2017 11:39:06 -0700 (PDT) Subject: Re: svn commit: r315311 - head/usr.sbin/makefs Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_B0E910BB-F81D-4AB4-8338-889F5789671E"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Wed, 15 Mar 2017 11:39:06 -0700 Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <9502A8F5-6198-407F-B836-9B6458AC5F3D@gmail.com> References: <201703151616.v2FGGU8N029774@repo.freebsd.org> To: Ed Maste X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 18:39:08 -0000 --Apple-Mail=_B0E910BB-F81D-4AB4-8338-889F5789671E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Mar 15, 2017, at 11:33, Ed Maste wrote: >=20 > On 15 March 2017 at 13:32, Ngie Cooper (yaneurabeya) > wrote: >>=20 >> Hi Ed, >> I agree with the change, but doesn=E2=80=99t this break = backwards compatibility in FreeBSD? >=20 > Not really: the 'd' option only appeared as of r315304 earlier today. >=20 > The options are documented in makefs(8), although the single-letter > aliases are not. I'll try to work with NetBSD folks to rectify that. Lol. Whoops! Didn=E2=80=99t realize the feature just appeared today. Yeah=E2=80=A6 I think I filed a bug, somewhere for improving the = makefs(8) manpage (maybe NetBSD=E2=80=99s GNATS; maybe FreeBSD = bugzilla). mail.app isn=E2=80=99t finding the results I want for the = query I=E2=80=99m inputting (alternatively, I could have filed it so = long ago in the past that I deleted it when purging my email in the past = year)=E2=80=A6 Thanks! -Ngie --Apple-Mail=_B0E910BB-F81D-4AB4-8338-889F5789671E Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYyYpKAAoJEPWDqSZpMIYVW+oP/jVuD3rV6UlA7sVRz+9737FA PBer31b6UM+edSnC3tuslt6M7FaWGgw20YaWetWuXRzvipk/Fwwqwnov7W3tAXBP jh98gcwylxm1YHC/yC7VjLwHeBrLUthNbqJHgapKF7kI95WdUyHppVwudBrsAB63 ke47I0/ubAGYbPhZaZu5xvf8+/3KjfJEinjaNv4ElHOFgBttqmmaQPAKOGJHacM2 glIGei1rHb0f957Kw/lhfa5MEDjZL0AsRkyj9DV0kERfZJXRxcvZHXmKm9tud1Hk 1WJ7Rai86T0G0WxxEN6fjpMaZ+zs/WBaoqL0aXOpk/cj3rNkp8iwfF/eSNO8jzi+ yUvIymruHwk14I1zi9tMJuUGROLzVg0CeDKXaPCfl0I+P3LG9ENOnAXSrk/OqF0f /pAG54jfJ5J3r24v+VYLLj9e24ythqAc9XWJTuI7UWZ7IyqryP/SGSDewA9yFxWG So7reJGIeK/V9M1inxwrVl+y7DnLa3oGZJI0FxTsWsAV82mVhCRaLiNeSU+NluqH 1Dq13u1hxBS74KfPXmIj2dl29pTh0y02qVDtOdqqIoL4b97+ZB5m3kkB4+Jn+GKw D2viKTrrMy60D5fwDDQWtp2D/xYjGMLCbEUYA0mVfZww7Abq0BjpvIcIs2zS6ug7 dIkG2SRfqzCrCtSR0tBC =DgcX -----END PGP SIGNATURE----- --Apple-Mail=_B0E910BB-F81D-4AB4-8338-889F5789671E-- From owner-svn-src-head@freebsd.org Wed Mar 15 18:44:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74552D0EBFF; Wed, 15 Mar 2017 18:44:33 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x244.google.com (mail-io0-x244.google.com [IPv6:2607:f8b0:4001:c06::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3BC22782; Wed, 15 Mar 2017 18:44:33 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x244.google.com with SMTP id f84so3874334ioj.0; Wed, 15 Mar 2017 11:44:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=mIukLWdHlKHMYcuBLPbCGvepJwRO1SeLHwL4yCWVdW8=; b=OxqTOGoYigPidJIXQdQywcGOvhthu4wa1RacwcGJBA0bQCaLsQhZwrYZatBLTDF+59 /ZsVsmlzUkOa2JWSnQ/KYjKPvhTWuNAck4H4HQ2cYto8Am8MF4KGPzYVeOSvyWLxsAPW YQ8tkUoT69aPTLK+kbzC0s3/jPRPZjuIRdZWHkLZ+VfZbvIlP89DdUSAJsVuXEp4ckbh +D8ibOAfzem+dW/O4JKhbULOLWlFOsqdK0rHhPVPgqoWkGEVFUItP4RJEBmf3TB+UiPa ULVfhAaU9Z6hiLOb46tOlFguXL0natnh1INAEOV9emU7rGBdwbiZc4+QBFaKKuE+aHPv mXGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=mIukLWdHlKHMYcuBLPbCGvepJwRO1SeLHwL4yCWVdW8=; b=h0j28Qdyo5F6ZSDeqfdcYZlXSVlkcHtZ/4EmqpBqTovVSvMt4MZuYv9LLaT/QOgLdf XihtDqShe48TaJ5PQmhjNwCjPLLFtrxz8Vjb+gGB2t3Vi6D8QrBWePmd4HwdKpU7/ptB oYlxcDu8K5x2lW6/w8nWVeOYrji1U3sheP4AglqMPW/blW0sUhKR5vb3CijGrVCT5+Kt Z6M0oSIDrdHLse8MB1UwhpDbHA113IAb8YbtkzIgIplbyxw47iAl/p3ZE6b6eTIXorGF RUIk5GPQ6hdY9C2pkxPPmH1RPhOUx+ucmYHN7PSvKZVp3j3DHLMVuZE9m8ij5+61kMbi a8Vw== X-Gm-Message-State: AFeK/H3qz2PYGuXUD1n//7H1nbQ6hkje2bYdqndnXtGu2icsWK8rucs7DJhNDWytSpvHQqmQhbNXmNt1EG8BEA== X-Received: by 10.107.47.102 with SMTP id j99mr6572442ioo.52.1489603472624; Wed, 15 Mar 2017 11:44:32 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.30.209 with HTTP; Wed, 15 Mar 2017 11:44:12 -0700 (PDT) In-Reply-To: <9502A8F5-6198-407F-B836-9B6458AC5F3D@gmail.com> References: <201703151616.v2FGGU8N029774@repo.freebsd.org> <9502A8F5-6198-407F-B836-9B6458AC5F3D@gmail.com> From: Ed Maste Date: Wed, 15 Mar 2017 14:44:12 -0400 X-Google-Sender-Auth: _7uywXFS293ATDE4ogGBwrj5kvw Message-ID: Subject: Re: svn commit: r315311 - head/usr.sbin/makefs To: "Ngie Cooper (yaneurabeya)" Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 18:44:33 -0000 On 15 March 2017 at 14:39, Ngie Cooper (yaneurabeya) wrote: > >> Yeah=E2=80=A6 I think I filed a bug, somewhere for improving the makefs(= 8) manpage (maybe NetBSD=E2=80=99s GNATS; maybe FreeBSD bugzilla). mail.app= isn=E2=80=99t finding the results I want for the query I=E2=80=99m inputti= ng (alternatively, I could have filed it so long ago in the past that I del= eted it when purging my email in the past year)=E2=80=A6 Ok, if you happen to find it again feel free to add me to CC. My goal here is to add msdos support from NetBSD's makefs. Dependencies include today's option parsing refactoring, and the newfs_msdos refactoring from some time ago. From owner-svn-src-head@freebsd.org Wed Mar 15 18:49:05 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F158D0EE39; Wed, 15 Mar 2017 18:49:05 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x241.google.com (mail-pf0-x241.google.com [IPv6:2607:f8b0:400e:c00::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 39A94B8E; Wed, 15 Mar 2017 18:49:05 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x241.google.com with SMTP id o126so3027173pfb.1; Wed, 15 Mar 2017 11:49:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=gkxl6ZFvUkSk5vDB/2Cs/5050lXjfmogGU5Rm9i39Hw=; b=tSH/lac3PmFq0Jx/xNs+OHzjJuhaOg9x7wNOYQdR8ztSLKlDbKOnJZk4f7ocgbRFEe QF+Ho4v8ETcfKLMYW0ICR+zaZzdzeVqZY87ah5SBq+CeIPX4M5H2Az4DoGvrdxsNUt57 fXCXRPHrO8SWJ85HAEu4BHB5xSyBZyRbXMJS4xkw1367QFyJez0+FvIou+Jk7u6iOp2U 92jMJjxO2+Bb/z2xnM+UWMn+vvYu992V+vXIFPX9nWq2Axig1neGTKEAlU/U6SIc0N8Q cesMYge9jsdXq4JP4hSZJoG9Ki2hSVN219YuF7gV+W3R8wKLOriGNvY8nONYwX22kucN S/uQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=gkxl6ZFvUkSk5vDB/2Cs/5050lXjfmogGU5Rm9i39Hw=; b=Gs7IGX0tTSgduZRoDnLlHY+Di2nKcNLF4ZrjfdzhdWY9EdLrImZyvCXkwtGHuKFD2+ wxFDR84rItR3Ymst7RdCFF3eknm0R1HHX8Vt+/50ad5qklEDnYyhMAobIafJwueNoTYS wvTRiwdb9jsGWvVztwRo7GPRTrTxcAUYt2cWKaS9fC0QJ6y6/N78fl3WB5FJsBRlOhOF OTbuKU0lnMo9DC/GsUN8eAamVegd9O87MkbzhV80JTMZXc3eegJzIv9KvXP8Vnd4bBAO UGNJaRzVPqBSzQMTm7nX0UgqHniAwzUSlS5bBkX6ugS0+rlI+q3b1YAMzF8uRTPdxssa 36yg== X-Gm-Message-State: AFeK/H3e98ovqQhLL6+P+TP3XfCa2bTg2L8X39kBpUH+pyfvcfj8vFCmJFhNOsv80bzdIQ== X-Received: by 10.98.9.29 with SMTP id e29mr5320653pfd.101.1489603744663; Wed, 15 Mar 2017 11:49:04 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id b11sm5745714pfj.27.2017.03.15.11.49.03 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 15 Mar 2017 11:49:03 -0700 (PDT) Subject: Re: svn commit: r315311 - head/usr.sbin/makefs Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_B2C376D6-131C-43C5-A63F-AA0A35B15FC3"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Wed, 15 Mar 2017 11:49:03 -0700 Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <6C2922D2-F2E1-42A7-90BB-9218DF327C25@gmail.com> References: <201703151616.v2FGGU8N029774@repo.freebsd.org> <9502A8F5-6198-407F-B836-9B6458AC5F3D@gmail.com> To: Ed Maste X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 18:49:05 -0000 --Apple-Mail=_B2C376D6-131C-43C5-A63F-AA0A35B15FC3 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Mar 15, 2017, at 11:44, Ed Maste wrote: >=20 > On 15 March 2017 at 14:39, Ngie Cooper (yaneurabeya) > wrote: >>=20 >>> Yeah=E2=80=A6 I think I filed a bug, somewhere for improving the = makefs(8) manpage (maybe NetBSD=E2=80=99s GNATS; maybe FreeBSD = bugzilla). mail.app isn=E2=80=99t finding the results I want for the = query I=E2=80=99m inputting (alternatively, I could have filed it so = long ago in the past that I deleted it when purging my email in the past = year)=E2=80=A6 >=20 > Ok, if you happen to find it again feel free to add me to CC. >=20 > My goal here is to add msdos support from NetBSD's makefs. > Dependencies include today's option parsing refactoring, and the > newfs_msdos refactoring from some time ago. I didn=E2=80=99t find anything. I was probably thinking about it but = didn=E2=80=99t get around to it. Thanks! -Ngie --Apple-Mail=_B2C376D6-131C-43C5-A63F-AA0A35B15FC3 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYyYyfAAoJEPWDqSZpMIYVvmoP/AwRp/a551iAmQCtjsqo78ny VXtH9Co3DQOz/PYp1ohiMr4PYpyvENenpOXJ6GPBeLW4I01Q9JOoel9ys6r62EuZ cQWhi50b8m5obd4a1PPqMYQMU7lk3GLUZZ+RNpA0t1tbAN3fihBF16fcAR4J8g2u tdXntdQk0+IoP1EyIHyt8LqoEcFfhPzvdA1bbn0xALco1zUgcSm2xzdah8ARhfg+ fM+iKNfLRp/qlJkTmxiz3Z3lwpgeawHACKF+FDtmxs2Ha5NtPIJZdj4cG0mTp+kh vdu8uLIloQMJVvx+ANxyg71KS3WXvtRjpKwDkTg1RSAk2ewv5FhZ994qQGSidbDB Q5tl1uAC49qNNyDZWzloDqTmkRWdCnfFTIX9Sxa8tQucQIEs1eEEqL2W3L3fF8CO X2dg2QqWgU8ajLyCccFrAGdA80k1sELXzZldrM229E9oou7CRRJ92Rq8WfXjO/f+ 8GbALTqgErlCLB/PhpB9W/xeCxlWaqx5NHLY1v0JJ/AR85ZSedzoV43jzNVrJ8Ok aoHlLV5dox1dN9upmfZh0gj88y3ckrznXS8l4HVhUwKl0GYqzOLB7SM72N71pchr knwtexCIO8qP/BG3wHfK7TD2Cud36YCbhr8HGBGXZXyrUG4HBtKW51eSQPonFBFn SOszMJNhmmy19Pdo/JXx =i6Hg -----END PGP SIGNATURE----- --Apple-Mail=_B2C376D6-131C-43C5-A63F-AA0A35B15FC3-- From owner-svn-src-head@freebsd.org Wed Mar 15 18:57:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13504D0E32D; Wed, 15 Mar 2017 18:57:20 +0000 (UTC) (envelope-from mizhka@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 D6CFB13E6; Wed, 15 Mar 2017 18:57:19 +0000 (UTC) (envelope-from mizhka@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2FIvIM6095591; Wed, 15 Mar 2017 18:57:18 GMT (envelope-from mizhka@FreeBSD.org) Received: (from mizhka@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2FIvI7I095590; Wed, 15 Mar 2017 18:57:18 GMT (envelope-from mizhka@FreeBSD.org) Message-Id: <201703151857.v2FIvI7I095590@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mizhka set sender to mizhka@FreeBSD.org using -f From: Michael Zhilin Date: Wed, 15 Mar 2017 18:57:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315324 - head/sys/dev/bhnd/cores/pmu X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 18:57:20 -0000 Author: mizhka Date: Wed Mar 15 18:57:18 2017 New Revision: 315324 URL: https://svnweb.freebsd.org/changeset/base/315324 Log: [bhnd] fix mask for PMU control This patch fixes typo which results in extra bits of PMU control register. PR: 217782 Submitted by: Svyatoslav Found by: PVS-Studio Modified: head/sys/dev/bhnd/cores/pmu/bhnd_pmu_subr.c Modified: head/sys/dev/bhnd/cores/pmu/bhnd_pmu_subr.c ============================================================================== --- head/sys/dev/bhnd/cores/pmu/bhnd_pmu_subr.c Wed Mar 15 18:23:32 2017 (r315323) +++ head/sys/dev/bhnd/cores/pmu/bhnd_pmu_subr.c Wed Mar 15 18:57:18 2017 (r315324) @@ -2023,7 +2023,7 @@ bhnd_pmu1_pllinit0(struct bhnd_pmu_softc /* Write XtalFreq. Set the divisor also. */ pmuctrl = BHND_PMU_READ_4(sc, BHND_PMU_CTRL); - pmuctrl = ~(BHND_PMU_CTRL_ILP_DIV_MASK | BHND_PMU_CTRL_XTALFREQ_MASK); + pmuctrl &= ~(BHND_PMU_CTRL_ILP_DIV_MASK | BHND_PMU_CTRL_XTALFREQ_MASK); pmuctrl |= BHND_PMU_SET_BITS(((xt->fref + 127) / 128) - 1, BHND_PMU_CTRL_ILP_DIV); pmuctrl |= BHND_PMU_SET_BITS(xt->xf, BHND_PMU_CTRL_XTALFREQ); From owner-svn-src-head@freebsd.org Wed Mar 15 18:58:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC409D0E411; Wed, 15 Mar 2017 18:58:44 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x235.google.com (mail-pg0-x235.google.com [IPv6:2607:f8b0:400e:c05::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B68B1168F; Wed, 15 Mar 2017 18:58:44 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x235.google.com with SMTP id g2so13110809pge.3; Wed, 15 Mar 2017 11:58:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=bg+qAnOtnLjBWhg2va78N1/HUJfNvlwn5QxxtmP/X00=; b=bd/+I7Gq4ft0ejjXqO6bEjzxvFeWRnjtgZJrNwvNbW4088Yi5UMU9sqrdaeTfjnAip isAZyvdn8DeaNqinwjXLlMg+G6TWcLPJgGx4WrOAmIviVFy7Boe41ciGTKdsr1rAVV9G O/MuV/KLuxbtL6jcPQvcTMJN78bhF5NzQrFQGumDmNy+xo7GOO9ccXsRNu/uN93TCuAl gXctqht1psNOHx+gnWdyxcNWdjsbi6dJ1WLTWXmRmDzeJN8pmbDOMuztePtnwAHPlK9n pQoQpWoZJ/sOxtT/01ku8VXSNb+weP7oKnEG8+gO6KIKxpVzs5wdWl6q1r0uUoz6zZaD 1zKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=bg+qAnOtnLjBWhg2va78N1/HUJfNvlwn5QxxtmP/X00=; b=dxaq1xeZqV0ncnBCSlHwBOITlIY2vkX0Xo86PtXSgg7Ttm7GvFNkKMkvVL2rkJs1/p S7k038bQm+6L0aCsaGuzTnHftKPlXdlHJzLnufWjkTXklqVw5UQ5t31FJKuUhCKW5rWE +Q7d1CUq+zHHJ4gMi50AMjaA0HG2sPALAr7dI9XYhkgRUsQzyBUwNZEwP7h+opYsToGt TNdIa0OaFR2CSWHT7cIPZCjozmDcD+U88SsS3Z+d6erVEM/0ut601ZU5Eg+Q2mSUPXJA KEWAt8nXkKRpa6i+q3xSkJuNEP2NQ4js+WI++rURTWsbJUGU0jzOXZEx0miqTPlA00sb nWFg== X-Gm-Message-State: AFeK/H3oxVOFpOn7awV19xFZp8n0HHR8utBZB0h1//Yrehv6mDW1JyOPP/229nvAHm09aA== X-Received: by 10.98.93.90 with SMTP id r87mr5300453pfb.226.1489604324061; Wed, 15 Mar 2017 11:58:44 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id z74sm5753398pfd.70.2017.03.15.11.58.43 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 15 Mar 2017 11:58:43 -0700 (PDT) Subject: Re: svn commit: r315311 - head/usr.sbin/makefs Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_98CE3AAA-DA52-4058-9C4F-D316A34F5E94"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <6C2922D2-F2E1-42A7-90BB-9218DF327C25@gmail.com> Date: Wed, 15 Mar 2017 11:58:42 -0700 Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: References: <201703151616.v2FGGU8N029774@repo.freebsd.org> <9502A8F5-6198-407F-B836-9B6458AC5F3D@gmail.com> <6C2922D2-F2E1-42A7-90BB-9218DF327C25@gmail.com> To: Ed Maste X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 18:58:45 -0000 --Apple-Mail=_98CE3AAA-DA52-4058-9C4F-D316A34F5E94 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Mar 15, 2017, at 11:49, Ngie Cooper (yaneurabeya) = wrote: >=20 >=20 >> On Mar 15, 2017, at 11:44, Ed Maste wrote: >>=20 >> On 15 March 2017 at 14:39, Ngie Cooper (yaneurabeya) >> wrote: >>>=20 >>>> Yeah=E2=80=A6 I think I filed a bug, somewhere for improving the = makefs(8) manpage (maybe NetBSD=E2=80=99s GNATS; maybe FreeBSD = bugzilla). mail.app isn=E2=80=99t finding the results I want for the = query I=E2=80=99m inputting (alternatively, I could have filed it so = long ago in the past that I deleted it when purging my email in the past = year)=E2=80=A6 >>=20 >> Ok, if you happen to find it again feel free to add me to CC. >>=20 >> My goal here is to add msdos support from NetBSD's makefs. >> Dependencies include today's option parsing refactoring, and the >> newfs_msdos refactoring from some time ago. >=20 > I didn=E2=80=99t find anything. I was probably thinking about it but = didn=E2=80=99t get around to it. Sidenote: if you open a CR in FreeBSD, I=E2=80=99ll be more than = happy to review the manpage in Phabricator, then we can work on = upstreaming it. Thanks! -Ngie --Apple-Mail=_98CE3AAA-DA52-4058-9C4F-D316A34F5E94 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYyY7iAAoJEPWDqSZpMIYVBB4QAKefivmQVEaKqIWPtcyC5iO5 cRuYBoKhs6NVpIUlH3+n29OaNiwdjYfCW2LEXhjhr0JvMLcO3rShQknckR2lxO3D 3HWgkkhj2M9Gswvm/Mz+mYx1UuIR8DnrWJdwo/RZgXj4t4lUkEO8CNeXk6kDm3QO GROI8nrVK0ANS3oRa6HH94fJbJFmd9EoCzfYkNX8JpYwa9FTEoXkJNR3mS4Nov7R s/RNLwFszhqgiFiuw1c8Oo70cpNQYecXPcGDs6D8Io85NljS3N06uas3uZ+NUKBS sEYtt3s8BMsDBzLC2NP3hh4eIZvHFkb+XW8llGyVpuz7wN4cBDRHdd6NHrETDAr8 U4u/VGh+aKED4NdSCaxKOcZE3d6X6uaDGIveWft4s3Hd+4/+ZPN5oaEURL5B5C+L j/NB6MsunK3QSJq5EwCNXFCJLIPZN34hvOPgJYgtJKdI9i7NudHxiFKWdDh0pIAw jVuv2kHW3vwQHfRGAxHX7Ohel02jDNncNVnV54WUZzbv6fuTuH/lc/m+Kou1KqvG Ao7w5CQVjccc2QCmDLPq2NchDiMW+fFjGPVwE7AA2EoizNZAHJyL6s41PXOuWZKA lm/OxfgdYBfU7HWAH0Rh76hYSXOxz1PhHpdGb7qVMbE1v2SqAtsjPFfGOeWI9VxI 9hFuCZkMoiNTB+fUFzJc =hrdE -----END PGP SIGNATURE----- --Apple-Mail=_98CE3AAA-DA52-4058-9C4F-D316A34F5E94-- From owner-svn-src-head@freebsd.org Wed Mar 15 19:10:05 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5344D0E621; Wed, 15 Mar 2017 19:10:05 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B21C91BF5; Wed, 15 Mar 2017 19:10:05 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2FJA4Si000166; Wed, 15 Mar 2017 19:10:04 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2FJA4LZ000165; Wed, 15 Mar 2017 19:10:04 GMT (envelope-from np@FreeBSD.org) Message-Id: <201703151910.v2FJA4LZ000165@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 15 Mar 2017 19:10:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315325 - head/sys/dev/cxgbe/iw_cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 19:10:06 -0000 Author: np Date: Wed Mar 15 19:10:04 2017 New Revision: 315325 URL: https://svnweb.freebsd.org/changeset/base/315325 Log: cxgbe/iw_cxgbe: Use the socket and not the toepcb to reach for the inpcb. t4_tom detaches the inpcb from the toepcb as soon as the hardware is done with the connection (in final_cpl_received) but the socket is around as long as the cm_id and the rest of iWARP state is. This fixes an intermittent NULL dereference during abort. Submitted by: KrishnamRaju ErapaRaju @ Chelsio MFC after: 3 days Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/iw_cxgbe/qp.c Modified: head/sys/dev/cxgbe/iw_cxgbe/qp.c ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/qp.c Wed Mar 15 18:57:18 2017 (r315324) +++ head/sys/dev/cxgbe/iw_cxgbe/qp.c Wed Mar 15 19:10:04 2017 (r315325) @@ -64,7 +64,7 @@ struct cpl_set_tcb_rpl; #include "iw_cxgbe.h" #include "user.h" -static void creds(struct toepcb *toep, size_t wrsize); +static int creds(struct toepcb *toep, struct inpcb *inp, size_t wrsize); static void set_state(struct c4iw_qp *qhp, enum c4iw_qp_state state) @@ -961,6 +961,7 @@ static inline void build_term_codes(stru static void post_terminate(struct c4iw_qp *qhp, struct t4_cqe *err_cqe, gfp_t gfp) { + int ret; struct fw_ri_wr *wqe; struct terminate_message *term; struct wrqe *wr; @@ -991,7 +992,11 @@ static void post_terminate(struct c4iw_q term->ecode = qhp->attr.ecode; } else build_term_codes(err_cqe, &term->layer_etype, &term->ecode); - creds(toep, sizeof(*wqe)); + ret = creds(toep, inp, sizeof(*wqe)); + if (ret) { + free_wrqe(wr); + return; + } t4_wrq_tx(qhp->rhp->rdev.adap, wr); } @@ -1094,7 +1099,11 @@ rdma_fini(struct c4iw_dev *rhp, struct c c4iw_init_wr_wait(&ep->com.wr_wait); - creds(toep, sizeof(*wqe)); + ret = creds(toep, inp, sizeof(*wqe)); + if (ret) { + free_wrqe(wr); + return ret; + } t4_wrq_tx(sc, wr); ret = c4iw_wait_for_reply(rdev, &ep->com.wr_wait, ep->hwtid, @@ -1127,13 +1136,17 @@ static void build_rtr_msg(u8 p2p_type, s } } -static void -creds(struct toepcb *toep, size_t wrsize) +static int +creds(struct toepcb *toep, struct inpcb *inp, size_t wrsize) { struct ofld_tx_sdesc *txsd; CTR3(KTR_IW_CXGBE, "%s:creB %p %u", __func__, toep , wrsize); - INP_WLOCK(toep->inp); + INP_WLOCK(inp); + if ((inp->inp_flags & (INP_DROPPED | INP_TIMEWAIT)) != 0) { + INP_WUNLOCK(inp); + return (EINVAL); + } txsd = &toep->txsd[toep->txsd_pidx]; txsd->tx_credits = howmany(wrsize, 16); txsd->plen = 0; @@ -1143,9 +1156,10 @@ creds(struct toepcb *toep, size_t wrsize if (__predict_false(++toep->txsd_pidx == toep->txsd_total)) toep->txsd_pidx = 0; toep->txsd_avail--; - INP_WUNLOCK(toep->inp); + INP_WUNLOCK(inp); CTR5(KTR_IW_CXGBE, "%s:creE %p %u %u %u", __func__, toep , txsd->tx_credits, toep->tx_credits, toep->txsd_pidx); + return (0); } static int rdma_init(struct c4iw_dev *rhp, struct c4iw_qp *qhp) @@ -1216,7 +1230,11 @@ static int rdma_init(struct c4iw_dev *rh c4iw_init_wr_wait(&ep->com.wr_wait); - creds(toep, sizeof(*wqe)); + ret = creds(toep, inp, sizeof(*wqe)); + if (ret) { + free_wrqe(wr); + return ret; + } t4_wrq_tx(sc, wr); ret = c4iw_wait_for_reply(rdev, &ep->com.wr_wait, ep->hwtid, From owner-svn-src-head@freebsd.org Wed Mar 15 19:18:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 405F6D0E87F; Wed, 15 Mar 2017 19:18:44 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F2CD21E; Wed, 15 Mar 2017 19:18:44 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 3755810A814; Wed, 15 Mar 2017 15:18:42 -0400 (EDT) From: John Baldwin To: Kristof Provost Cc: Gleb Smirnoff , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r315136 - head/sys/netpfil/pf Date: Tue, 14 Mar 2017 23:45:57 -0700 Message-ID: <1803226.Igex2bR0P8@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <7B1C8879-E636-4315-99A2-A258AB9AE500@FreeBSD.org> References: <201703120542.v2C5gvM4075391@repo.freebsd.org> <20170314215706.GB1072@FreeBSD.org> <7B1C8879-E636-4315-99A2-A258AB9AE500@FreeBSD.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Wed, 15 Mar 2017 15:18:42 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 19:18:44 -0000 On Wednesday, March 15, 2017 10:26:39 AM Kristof Provost wrote: > On 15 Mar 2017, at 6:57, Gleb Smirnoff wrote: > > On Sun, Mar 12, 2017 at 05:42:57AM +0000, Kristof Provost wrote: > > K> Log: > > K> pf: Fix incorrect rw_sleep() in pf_unload() > > K> > > K> When we unload we don't hold the pf_rules_lock, so we cannot c= all=20 > > rw_sleep() > > K> with it, because it would release a lock we do not hold. There= 's=20 > > no need for the > > K> lock either, so we can just tsleep(). > > K> > > K> While here also make the same change in pf_purge_thread(),=20 > > because it explicitly > > K> takes the lock before rw_sleep() and then immediately releases= it=20 > > afterwards. > > > > The correct change would to be grab lock in pf_unload(), exactly as= =20 > > pf_purge_thread() > > does. With your change you introduces a possible infinite sleep due= to=20 > > race, since > > there is no timeout and no lock. > > > I must be missing something, because I don=E2=80=99t see the race, an= d don=E2=80=99t=20 > see how we > could end up with an infinite sleep. You are ignoring interrupts and preemption. Suppose you get an interru= pt after 'wakeup_one(pf_purge_thread)' and before 'tsleep(..., 0)' in pf_unload(). If the interrupt preempts and results in the purge thread= running and issuing its wakeup before the thread executing pf_unload() resumes, then eventually when pf_unload() resumes it will do a tsleep()= with no timeout that will never be awoken. You obviously didn't test this in a debug kernel since there is a KASSE= RT explicitly to catch obvious tsleep races in _sleep(): KASSERT(sbt !=3D 0 || mtx_owned(&Giant) || lock !=3D NULL, ("sleeping without a lock")); You should fix this in the way that Gleb suggested. Also, all kthreads/kprocs do a wakeup() inside of exit1() or kthread_ex= it() to allow you to wait for a kthread to exit when unloading a module. Th= e general structure should be something like: struct thread *my_thread; void thread_main(void *arg) { LOCK(&mylock); while (!thread_quit) { UNLOCK(&mylock); /* do work */ LOCK(&mylock); if (!thread_quit && no_work_to_do) lock_sleep(&some_wchan, &mylock, ...); } UNLOCK(&mylock); kthread_exit(); } void unload_handler(...) { ... LOCK(&mylock); thread_quit =3D true; wakeup(&some_wchan); lock_sleep(my_thread, &mylock, ...); UNLOCK(&mylock); } void load_handler(...) { ... kthread_add(thread_main, arg, NULL, &my_thread, ...); } If you want to create a proc then you can use 'struct proc *my_proc' and sleep on 'my_proc' instead (along with using kproc_exit(), though kthread_exit() from the last thread in a kproc should call kproc_exit()= for you). --=20 John Baldwin From owner-svn-src-head@freebsd.org Wed Mar 15 19:21:58 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CDCD4D0EB61; Wed, 15 Mar 2017 19:21:58 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AEF108B7; Wed, 15 Mar 2017 19:21:58 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id B881810A7B9; Wed, 15 Mar 2017 15:21:57 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r315323 - head/sys/kern Date: Wed, 15 Mar 2017 12:21 -0700 Message-ID: <3167768.s4jIG6eyGp@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201703151823.v2FINWN9083379@repo.freebsd.org> References: <201703151823.v2FINWN9083379@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Wed, 15 Mar 2017 15:21:57 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 19:21:58 -0000 On Wednesday, March 15, 2017 06:23:32 PM John Baldwin wrote: > Author: jhb > Date: Wed Mar 15 18:23:32 2017 > New Revision: 315323 > URL: https://svnweb.freebsd.org/changeset/base/315323 > > Log: > Use UMA_ALIGN_PTR instead of sizeof(void *) for zone alignment. > > uma_zcreate()'s alignment argument is supposed to be sizeof(foo) - 1, > and uma.h provides a set of helper macros for common types. Passing > sizeof(void *) results in all of the members being misaligned triggering > unaligned access faults on certain architectures (notably MIPS). > > Reported by: brooks > Obtained from: CheriBSD > MFC after: 3 days > Sponsored by: DARPA / AFRL > > Modified: > head/sys/kern/vfs_lookup.c We should perhaps add a KASSERT() to uma_zcreate to catch this sort of thing. Something like KASSERT(powerof2(align + 1)) (assuming there isn't a real use case for having non-power-of-2 alignments)? -- John Baldwin From owner-svn-src-head@freebsd.org Wed Mar 15 19:48:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85798D0E179; Wed, 15 Mar 2017 19:48:23 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46482135F; Wed, 15 Mar 2017 19:48:23 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2FJmMxx016153; Wed, 15 Mar 2017 19:48:22 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2FJmMG7016152; Wed, 15 Mar 2017 19:48:22 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201703151948.v2FJmMG7016152@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Wed, 15 Mar 2017 19:48:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315326 - head/sys/boot/efi/boot1 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 19:48:23 -0000 Author: tsoome Date: Wed Mar 15 19:48:22 2017 New Revision: 315326 URL: https://svnweb.freebsd.org/changeset/base/315326 Log: boot1.efi: can't boot from ZFS on 4kn HDD The boot1.efi immediate issue from PR216964 is that we are reading into too small buffer, from UEFI spec 2.6: The size of the Buffer in bytes. This must be a multiple of the intrinsic block size of the device. The secondary issue is that LBA calculation does not check reminder from division. This fix does check the provided buffer size and if we read less than media sector size or the read offset is not aligned to sector boundary, we allocate bounce buffer and perform the read by single sector. PR: 216964 Reported by: Sergey Kozlov Reviewed by: allanjude, Sergey Kozlov Approved by: allanjude (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D9870 Modified: head/sys/boot/efi/boot1/zfs_module.c Modified: head/sys/boot/efi/boot1/zfs_module.c ============================================================================== --- head/sys/boot/efi/boot1/zfs_module.c Wed Mar 15 19:10:04 2017 (r315325) +++ head/sys/boot/efi/boot1/zfs_module.c Wed Mar 15 19:48:22 2017 (r315326) @@ -44,23 +44,61 @@ static int vdev_read(vdev_t *vdev, void *priv, off_t off, void *buf, size_t bytes) { dev_info_t *devinfo; - off_t lba; + uint64_t lba; + size_t size, remainder, rb_size, blksz; + char *bouncebuf = NULL, *rb_buf; EFI_STATUS status; devinfo = (dev_info_t *)priv; lba = off / devinfo->dev->Media->BlockSize; + remainder = off % devinfo->dev->Media->BlockSize; - status = devinfo->dev->ReadBlocks(devinfo->dev, - devinfo->dev->Media->MediaId, lba, bytes, buf); - if (status != EFI_SUCCESS) { - DPRINTF("vdev_read: failed dev: %p, id: %u, lba: %jd, size: %zu," - " status: %lu\n", devinfo->dev, - devinfo->dev->Media->MediaId, (intmax_t)lba, bytes, - EFI_ERROR_CODE(status)); - return (-1); + rb_buf = buf; + rb_size = bytes; + + /* + * If we have remainder from off, we need to add remainder part. + * Since buffer must be multiple of the BlockSize, round it all up. + */ + size = roundup2(bytes + remainder, devinfo->dev->Media->BlockSize); + blksz = size; + if (remainder != 0 || size != bytes) { + rb_size = devinfo->dev->Media->BlockSize; + bouncebuf = malloc(rb_size); + if (bouncebuf == NULL) { + printf("vdev_read: out of memory\n"); + return (-1); + } + rb_buf = bouncebuf; + blksz = rb_size - remainder; } + while (bytes > 0) { + status = devinfo->dev->ReadBlocks(devinfo->dev, + devinfo->dev->Media->MediaId, lba, rb_size, rb_buf); + if (EFI_ERROR(status)) + goto error; + if (bytes < blksz) + blksz = bytes; + if (bouncebuf != NULL) + memcpy(buf, rb_buf + remainder, blksz); + buf = (void *)((uintptr_t)buf + blksz); + bytes -= blksz; + lba++; + remainder = 0; + blksz = rb_size; + } + + free(bouncebuf); return (0); + +error: + free(bouncebuf); + DPRINTF("vdev_read: failed dev: %p, id: %u, lba: %ju, size: %zu," + " rb_size: %zu, status: %lu\n", devinfo->dev, + devinfo->dev->Media->MediaId, (uintmax_t)lba, bytes, rb_size, + EFI_ERROR_CODE(status)); + return (-1); } static EFI_STATUS From owner-svn-src-head@freebsd.org Wed Mar 15 19:49:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6AA4D0E268; Wed, 15 Mar 2017 19:49:46 +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 mx1.freebsd.org (Postfix) with ESMTPS id 9146F15F3; Wed, 15 Mar 2017 19:49:46 +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 v2FJnjex016262; Wed, 15 Mar 2017 19:49:45 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2FJnjFe016260; Wed, 15 Mar 2017 19:49:45 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703151949.v2FJnjFe016260@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 15 Mar 2017 19:49:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315327 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 19:49:46 -0000 Author: mav Date: Wed Mar 15 19:49:45 2017 New Revision: 315327 URL: https://svnweb.freebsd.org/changeset/base/315327 Log: Remove not very useful ATIO/INOT stats. While there polish respective debug logging. MFC after: 2 weeks Modified: head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_freebsd.h Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Wed Mar 15 19:48:22 2017 (r315326) +++ head/sys/dev/isp/isp_freebsd.c Wed Mar 15 19:49:45 2017 (r315327) @@ -1742,8 +1742,7 @@ isp_handle_platform_atio2(ispsoftc_t *is atp->state = ATPD_STATE_ATIO; SLIST_REMOVE_HEAD(&tptr->atios, sim_links.sle); - tptr->atio_count--; - isp_prt(isp, ISP_LOGTDEBUG2, "Take FREE ATIO count now %d", tptr->atio_count); + ISP_PATH_PRT(isp, ISP_LOGTDEBUG2, atiop->ccb_h.path, "Take FREE ATIO\n"); atiop->ccb_h.target_id = fcp->isp_loopid; atiop->ccb_h.target_lun = lun; @@ -1955,8 +1954,7 @@ isp_handle_platform_atio7(ispsoftc_t *is atp->word3 = lp->prli_word3; atp->state = ATPD_STATE_ATIO; SLIST_REMOVE_HEAD(&tptr->atios, sim_links.sle); - tptr->atio_count--; - ISP_PATH_PRT(isp, ISP_LOGTDEBUG2, atiop->ccb_h.path, "Take FREE ATIO count now %d\n", tptr->atio_count); + ISP_PATH_PRT(isp, ISP_LOGTDEBUG2, atiop->ccb_h.path, "Take FREE ATIO\n"); atiop->init_id = FC_PORTDB_TGT(isp, chan, lp); atiop->ccb_h.target_id = FCPARAM(isp, chan)->isp_loopid; atiop->ccb_h.target_lun = lun; @@ -2697,9 +2695,8 @@ isp_handle_platform_target_tmf(ispsoftc_ ntp->seq_id = notify->nt_tagval; ntp->tag_id = notify->nt_tagval >> 32; - tptr->inot_count--; SLIST_REMOVE_HEAD(&tptr->inots, sim_links.sle); - ISP_PATH_PRT(isp, ISP_LOGTDEBUG2, inot->ccb_h.path, "%s: Take FREE INOT count now %d\n", __func__, tptr->inot_count); + ISP_PATH_PRT(isp, ISP_LOGTDEBUG2, inot->ccb_h.path, "Take FREE INOT\n"); inot->ccb_h.status = CAM_MESSAGE_RECV; xpt_done((union ccb *)inot); return; @@ -3155,7 +3152,8 @@ isp_abort_atio(ispsoftc_t *isp, union cc if (sccb != &accb->ccb_h) continue; SLIST_REMOVE(&tptr->atios, sccb, ccb_hdr, sim_links.sle); - tptr->atio_count--; + ISP_PATH_PRT(isp, ISP_LOGTDEBUG2, sccb->path, + "Abort FREE ATIO\n"); accb->ccb_h.status = CAM_REQ_ABORTED; xpt_done(accb); ccb->ccb_h.status = CAM_REQ_CMP; @@ -3205,7 +3203,8 @@ isp_abort_inot(ispsoftc_t *isp, union cc if (sccb != &accb->ccb_h) continue; SLIST_REMOVE(&tptr->inots, sccb, ccb_hdr, sim_links.sle); - tptr->inot_count--; + ISP_PATH_PRT(isp, ISP_LOGTDEBUG2, sccb->path, + "Abort FREE INOT\n"); accb->ccb_h.status = CAM_REQ_ABORTED; xpt_done(accb); ccb->ccb_h.status = CAM_REQ_CMP; @@ -3349,16 +3348,14 @@ isp_action(struct cam_sim *sim, union cc if (ccb->ccb_h.func_code == XPT_ACCEPT_TARGET_IO) { ccb->atio.tag_id = 0; - tptr->atio_count++; SLIST_INSERT_HEAD(&tptr->atios, &ccb->ccb_h, sim_links.sle); ISP_PATH_PRT(isp, ISP_LOGTDEBUG2, ccb->ccb_h.path, - "Put FREE ATIO, count now %d\n", tptr->atio_count); + "Put FREE ATIO\n"); } else if (ccb->ccb_h.func_code == XPT_IMMEDIATE_NOTIFY) { ccb->cin1.seq_id = ccb->cin1.tag_id = 0; - tptr->inot_count++; SLIST_INSERT_HEAD(&tptr->inots, &ccb->ccb_h, sim_links.sle); ISP_PATH_PRT(isp, ISP_LOGTDEBUG2, ccb->ccb_h.path, - "Put FREE INOT, count now %d\n", tptr->inot_count); + "Put FREE INOT\n"); } ccb->ccb_h.status = CAM_REQ_INPROG; break; Modified: head/sys/dev/isp/isp_freebsd.h ============================================================================== --- head/sys/dev/isp/isp_freebsd.h Wed Mar 15 19:48:22 2017 (r315326) +++ head/sys/dev/isp/isp_freebsd.h Wed Mar 15 19:49:45 2017 (r315327) @@ -160,8 +160,6 @@ typedef struct tstate { struct ccb_hdr_slist atios; struct ccb_hdr_slist inots; struct ntpdlist restart_queue; - uint16_t atio_count; - uint16_t inot_count; } tstate_t; #define LUN_HASH_SIZE 32 From owner-svn-src-head@freebsd.org Wed Mar 15 21:12:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 429A0D0DCAD; Wed, 15 Mar 2017 21:12:01 +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 mx1.freebsd.org (Postfix) with ESMTPS id 02D97184A; Wed, 15 Mar 2017 21:12:00 +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 v2FLC0Sq051950; Wed, 15 Mar 2017 21:12:00 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2FLBwrD051923; Wed, 15 Mar 2017 21:11:58 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201703152111.v2FLBwrD051923@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 15 Mar 2017 21:11:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315331 - in head/libexec/rtld-elf: . aarch64 amd64 arm i386 mips powerpc powerpc64 riscv sparc64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 21:12:01 -0000 Author: kib Date: Wed Mar 15 21:11:57 2017 New Revision: 315331 URL: https://svnweb.freebsd.org/changeset/base/315331 Log: Implement LD_BIND_NOT knob for rtld. From the manpage: When set to a nonempty string, prevents modifications of the PLT slots when doing bindings. As result, each call of the PLT-resolved function is resolved. In combination with debug output, this provides complete account of all bind actions at runtime. Same feature exists on Linux and Solaris. Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/libexec/rtld-elf/aarch64/reloc.c head/libexec/rtld-elf/aarch64/rtld_machdep.h head/libexec/rtld-elf/amd64/reloc.c head/libexec/rtld-elf/amd64/rtld_machdep.h head/libexec/rtld-elf/arm/reloc.c head/libexec/rtld-elf/arm/rtld_machdep.h head/libexec/rtld-elf/i386/reloc.c head/libexec/rtld-elf/i386/rtld_machdep.h head/libexec/rtld-elf/mips/reloc.c head/libexec/rtld-elf/mips/rtld_machdep.h head/libexec/rtld-elf/powerpc/reloc.c head/libexec/rtld-elf/powerpc/rtld_machdep.h head/libexec/rtld-elf/powerpc64/reloc.c head/libexec/rtld-elf/powerpc64/rtld_machdep.h head/libexec/rtld-elf/riscv/reloc.c head/libexec/rtld-elf/riscv/rtld_machdep.h head/libexec/rtld-elf/rtld.1 head/libexec/rtld-elf/rtld.c head/libexec/rtld-elf/rtld.h head/libexec/rtld-elf/sparc64/reloc.c head/libexec/rtld-elf/sparc64/rtld_machdep.h Modified: head/libexec/rtld-elf/aarch64/reloc.c ============================================================================== --- head/libexec/rtld-elf/aarch64/reloc.c Wed Mar 15 21:03:51 2017 (r315330) +++ head/libexec/rtld-elf/aarch64/reloc.c Wed Mar 15 21:11:57 2017 (r315331) @@ -298,10 +298,9 @@ reloc_jmpslot(Elf_Addr *where, Elf_Addr assert(ELF_R_TYPE(rel->r_info) == R_AARCH64_JUMP_SLOT); - if (*where != target) + if (*where != target && !ld_bind_not) *where = target; - - return target; + return (target); } void Modified: head/libexec/rtld-elf/aarch64/rtld_machdep.h ============================================================================== --- head/libexec/rtld-elf/aarch64/rtld_machdep.h Wed Mar 15 21:03:51 2017 (r315330) +++ head/libexec/rtld-elf/aarch64/rtld_machdep.h Wed Mar 15 21:11:57 2017 (r315331) @@ -47,9 +47,8 @@ struct Struct_Obj_Entry; }) Elf_Addr reloc_jmpslot(Elf_Addr *where, Elf_Addr target, - const struct Struct_Obj_Entry *defobj, - const struct Struct_Obj_Entry *obj, - const Elf_Rel *rel); + const struct Struct_Obj_Entry *defobj, const struct Struct_Obj_Entry *obj, + const Elf_Rel *rel); #define make_function_pointer(def, defobj) \ ((defobj)->relocbase + (def)->st_value) Modified: head/libexec/rtld-elf/amd64/reloc.c ============================================================================== --- head/libexec/rtld-elf/amd64/reloc.c Wed Mar 15 21:03:51 2017 (r315330) +++ head/libexec/rtld-elf/amd64/reloc.c Wed Mar 15 21:11:57 2017 (r315331) @@ -387,6 +387,20 @@ reloc_jmpslots(Obj_Entry *obj, int flags return 0; } +/* Fixup the jump slot at "where" to transfer control to "target". */ +Elf_Addr +reloc_jmpslot(Elf_Addr *where, Elf_Addr target, + const struct Struct_Obj_Entry *obj, const struct Struct_Obj_Entry *refobj, + const Elf_Rel *rel) +{ +#ifdef dbg + dbg("reloc_jmpslot: *%p = %p", where, (void *)target); +#endif + if (!ld_bind_not) + *where = target; + return (target); +} + int reloc_iresolve(Obj_Entry *obj, RtldLockState *lockstate) { Modified: head/libexec/rtld-elf/amd64/rtld_machdep.h ============================================================================== --- head/libexec/rtld-elf/amd64/rtld_machdep.h Wed Mar 15 21:03:51 2017 (r315330) +++ head/libexec/rtld-elf/amd64/rtld_machdep.h Wed Mar 15 21:11:57 2017 (r315331) @@ -38,21 +38,11 @@ struct Struct_Obj_Entry; Elf_Dyn *rtld_dynamic_addr(void); #define rtld_dynamic(obj) rtld_dynamic_addr() -/* Fixup the jump slot at "where" to transfer control to "target". */ -static inline Elf_Addr -reloc_jmpslot(Elf_Addr *where, Elf_Addr target, - const struct Struct_Obj_Entry *obj, - const struct Struct_Obj_Entry *refobj, const Elf_Rel *rel) -{ -#ifdef dbg - dbg("reloc_jmpslot: *%p = %p", (void *)(where), - (void *)(target)); -#endif - (*(Elf_Addr *)(where) = (Elf_Addr)(target)); - return target; -} +Elf_Addr reloc_jmpslot(Elf_Addr *where, Elf_Addr target, + const struct Struct_Obj_Entry *obj, const struct Struct_Obj_Entry *refobj, + const Elf_Rel *rel); -#define make_function_pointer(def, defobj) \ +#define make_function_pointer(def, defobj) \ ((defobj)->relocbase + (def)->st_value) #define call_initfini_pointer(obj, target) \ Modified: head/libexec/rtld-elf/arm/reloc.c ============================================================================== --- head/libexec/rtld-elf/arm/reloc.c Wed Mar 15 21:03:51 2017 (r315330) +++ head/libexec/rtld-elf/arm/reloc.c Wed Mar 15 21:11:57 2017 (r315331) @@ -468,15 +468,14 @@ reloc_gnu_ifunc(Obj_Entry *obj, int flag Elf_Addr reloc_jmpslot(Elf_Addr *where, Elf_Addr target, const Obj_Entry *defobj, - const Obj_Entry *obj, const Elf_Rel *rel) + const Obj_Entry *obj, const Elf_Rel *rel) { assert(ELF_R_TYPE(rel->r_info) == R_ARM_JUMP_SLOT); - if (*where != target) + if (*where != target && !ld_bind_not) *where = target; - - return target; + return (target); } void Modified: head/libexec/rtld-elf/arm/rtld_machdep.h ============================================================================== --- head/libexec/rtld-elf/arm/rtld_machdep.h Wed Mar 15 21:03:51 2017 (r315330) +++ head/libexec/rtld-elf/arm/rtld_machdep.h Wed Mar 15 21:11:57 2017 (r315331) @@ -38,9 +38,8 @@ struct Struct_Obj_Entry; #define rtld_dynamic(obj) (&_DYNAMIC) Elf_Addr reloc_jmpslot(Elf_Addr *where, Elf_Addr target, - const struct Struct_Obj_Entry *defobj, - const struct Struct_Obj_Entry *obj, - const Elf_Rel *rel); + const struct Struct_Obj_Entry *defobj, const struct Struct_Obj_Entry *obj, + const Elf_Rel *rel); #define make_function_pointer(def, defobj) \ ((defobj)->relocbase + (def)->st_value) Modified: head/libexec/rtld-elf/i386/reloc.c ============================================================================== --- head/libexec/rtld-elf/i386/reloc.c Wed Mar 15 21:03:51 2017 (r315330) +++ head/libexec/rtld-elf/i386/reloc.c Wed Mar 15 21:11:57 2017 (r315331) @@ -344,6 +344,20 @@ reloc_jmpslots(Obj_Entry *obj, int flags return 0; } +/* Fixup the jump slot at "where" to transfer control to "target". */ +Elf_Addr +reloc_jmpslot(Elf_Addr *where, Elf_Addr target, + const struct Struct_Obj_Entry *obj, const struct Struct_Obj_Entry *refobj, + const Elf_Rel *rel) +{ +#ifdef dbg + dbg("reloc_jmpslot: *%p = %p", where, (void *)target); +#endif + if (!ld_bind_not) + *where = target; + return (target); +} + int reloc_iresolve(Obj_Entry *obj, RtldLockState *lockstate) { Modified: head/libexec/rtld-elf/i386/rtld_machdep.h ============================================================================== --- head/libexec/rtld-elf/i386/rtld_machdep.h Wed Mar 15 21:03:51 2017 (r315330) +++ head/libexec/rtld-elf/i386/rtld_machdep.h Wed Mar 15 21:11:57 2017 (r315331) @@ -38,21 +38,11 @@ struct Struct_Obj_Entry; #define rtld_dynamic(obj) \ ((const Elf_Dyn *)((obj)->relocbase + (Elf_Addr)&_DYNAMIC)) -/* Fixup the jump slot at "where" to transfer control to "target". */ -static inline Elf_Addr -reloc_jmpslot(Elf_Addr *where, Elf_Addr target, - const struct Struct_Obj_Entry *obj, - const struct Struct_Obj_Entry *refobj, const Elf_Rel *rel) -{ -#ifdef dbg - dbg("reloc_jmpslot: *%p = %p", (void *)(where), - (void *)(target)); -#endif - (*(Elf_Addr *)(where) = (Elf_Addr)(target)); - return target; -} +Elf_Addr reloc_jmpslot(Elf_Addr *where, Elf_Addr target, + const struct Struct_Obj_Entry *obj, const struct Struct_Obj_Entry *refobj, + const Elf_Rel *rel); -#define make_function_pointer(def, defobj) \ +#define make_function_pointer(def, defobj) \ ((defobj)->relocbase + (def)->st_value) #define call_initfini_pointer(obj, target) \ Modified: head/libexec/rtld-elf/mips/reloc.c ============================================================================== --- head/libexec/rtld-elf/mips/reloc.c Wed Mar 15 21:03:51 2017 (r315330) +++ head/libexec/rtld-elf/mips/reloc.c Wed Mar 15 21:11:57 2017 (r315331) @@ -274,7 +274,8 @@ _mips_rtld_bind(Obj_Entry *obj, Elf_Size obj->path, (intmax_t)reloff, defobj->strtab + def->st_name, (void *)*where, (void *)target); - *where = target; + if (!ld_bind_not) + *where = target; lock_release(rtld_bind_lock, &lockstate); return (Elf_Addr)target; } Modified: head/libexec/rtld-elf/mips/rtld_machdep.h ============================================================================== --- head/libexec/rtld-elf/mips/rtld_machdep.h Wed Mar 15 21:03:51 2017 (r315330) +++ head/libexec/rtld-elf/mips/rtld_machdep.h Wed Mar 15 21:11:57 2017 (r315331) @@ -39,9 +39,8 @@ struct Struct_Obj_Entry; #define rtld_dynamic(obj) (&_DYNAMIC) Elf_Addr reloc_jmpslot(Elf_Addr *where, Elf_Addr target, - const struct Struct_Obj_Entry *defobj, - const struct Struct_Obj_Entry *obj, - const Elf_Rel *rel); + const struct Struct_Obj_Entry *defobj, const struct Struct_Obj_Entry *obj, + const Elf_Rel *rel); #define make_function_pointer(def, defobj) \ ((defobj)->relocbase + (def)->st_value) Modified: head/libexec/rtld-elf/powerpc/reloc.c ============================================================================== --- head/libexec/rtld-elf/powerpc/reloc.c Wed Mar 15 21:03:51 2017 (r315330) +++ head/libexec/rtld-elf/powerpc/reloc.c Wed Mar 15 21:11:57 2017 (r315331) @@ -468,7 +468,7 @@ reloc_jmpslots(Obj_Entry *obj, int flags */ Elf_Addr reloc_jmpslot(Elf_Addr *wherep, Elf_Addr target, const Obj_Entry *defobj, - const Obj_Entry *obj, const Elf_Rel *rel) + const Obj_Entry *obj, const Elf_Rel *rel) { Elf_Addr offset; const Elf_Rela *rela = (const Elf_Rela *) rel; @@ -476,6 +476,9 @@ reloc_jmpslot(Elf_Addr *wherep, Elf_Addr dbg(" reloc_jmpslot: where=%p, target=%p", (void *)wherep, (void *)target); + if (ld_bind_not) + goto out; + /* * At the PLT entry pointed at by `wherep', construct * a direct transfer to the now fully resolved function @@ -519,6 +522,7 @@ reloc_jmpslot(Elf_Addr *wherep, Elf_Addr } } +out: return (target); } Modified: head/libexec/rtld-elf/powerpc/rtld_machdep.h ============================================================================== --- head/libexec/rtld-elf/powerpc/rtld_machdep.h Wed Mar 15 21:03:51 2017 (r315330) +++ head/libexec/rtld-elf/powerpc/rtld_machdep.h Wed Mar 15 21:11:57 2017 (r315331) @@ -38,9 +38,8 @@ struct Struct_Obj_Entry; #define rtld_dynamic(obj) (&_DYNAMIC) Elf_Addr reloc_jmpslot(Elf_Addr *where, Elf_Addr target, - const struct Struct_Obj_Entry *defobj, - const struct Struct_Obj_Entry *obj, - const Elf_Rel *rel); + const struct Struct_Obj_Entry *defobj, const struct Struct_Obj_Entry *obj, + const Elf_Rel *rel); #define make_function_pointer(def, defobj) \ ((defobj)->relocbase + (def)->st_value) Modified: head/libexec/rtld-elf/powerpc64/reloc.c ============================================================================== --- head/libexec/rtld-elf/powerpc64/reloc.c Wed Mar 15 21:03:51 2017 (r315330) +++ head/libexec/rtld-elf/powerpc64/reloc.c Wed Mar 15 21:11:57 2017 (r315331) @@ -433,7 +433,7 @@ reloc_jmpslots(Obj_Entry *obj, int flags */ Elf_Addr reloc_jmpslot(Elf_Addr *wherep, Elf_Addr target, const Obj_Entry *defobj, - const Obj_Entry *obj, const Elf_Rel *rel) + const Obj_Entry *obj, const Elf_Rel *rel) { /* @@ -447,6 +447,9 @@ reloc_jmpslot(Elf_Addr *wherep, Elf_Addr (void *)wherep, (void *)target, *(Elf_Addr *)target, (Elf_Addr)defobj->relocbase); + if (ld_bind_not) + goto out; + /* * For the trampoline, the second two elements of the function * descriptor are unused, so we are fine replacing those at any time @@ -476,11 +479,13 @@ reloc_jmpslot(Elf_Addr *wherep, Elf_Addr ((struct funcdesc *)(wherep))->toc += (Elf_Addr)defobj->relocbase; } +out: #else dbg(" reloc_jmpslot: where=%p, target=%p", (void *)wherep, (void *)target); - *wherep = target; + if (!ld_bind_not) + *wherep = target; #endif return (target); Modified: head/libexec/rtld-elf/powerpc64/rtld_machdep.h ============================================================================== --- head/libexec/rtld-elf/powerpc64/rtld_machdep.h Wed Mar 15 21:03:51 2017 (r315330) +++ head/libexec/rtld-elf/powerpc64/rtld_machdep.h Wed Mar 15 21:11:57 2017 (r315331) @@ -38,9 +38,8 @@ struct Struct_Obj_Entry; #define rtld_dynamic(obj) (&_DYNAMIC) Elf_Addr reloc_jmpslot(Elf_Addr *where, Elf_Addr target, - const struct Struct_Obj_Entry *defobj, - const struct Struct_Obj_Entry *obj, - const Elf_Rel *rel); + const struct Struct_Obj_Entry *defobj, const struct Struct_Obj_Entry *obj, + const Elf_Rel *rel); #define make_function_pointer(def, defobj) \ ((defobj)->relocbase + (def)->st_value) Modified: head/libexec/rtld-elf/riscv/reloc.c ============================================================================== --- head/libexec/rtld-elf/riscv/reloc.c Wed Mar 15 21:03:51 2017 (r315330) +++ head/libexec/rtld-elf/riscv/reloc.c Wed Mar 15 21:11:57 2017 (r315331) @@ -226,10 +226,9 @@ reloc_jmpslot(Elf_Addr *where, Elf_Addr assert(ELF_R_TYPE(rel->r_info) == R_RISCV_JUMP_SLOT); - if (*where != target) + if (*where != target && !ld_bind_not) *where = target; - - return target; + return (target); } /* Modified: head/libexec/rtld-elf/riscv/rtld_machdep.h ============================================================================== --- head/libexec/rtld-elf/riscv/rtld_machdep.h Wed Mar 15 21:03:51 2017 (r315330) +++ head/libexec/rtld-elf/riscv/rtld_machdep.h Wed Mar 15 21:11:57 2017 (r315331) @@ -54,9 +54,8 @@ uint64_t set_gp(struct Struct_Obj_Entry }) Elf_Addr reloc_jmpslot(Elf_Addr *where, Elf_Addr target, - const struct Struct_Obj_Entry *defobj, - const struct Struct_Obj_Entry *obj, - const Elf_Rel *rel); + const struct Struct_Obj_Entry *defobj, const struct Struct_Obj_Entry *obj, + const Elf_Rel *rel); #define make_function_pointer(def, defobj) \ ((defobj)->relocbase + (def)->st_value) Modified: head/libexec/rtld-elf/rtld.1 ============================================================================== --- head/libexec/rtld-elf/rtld.1 Wed Mar 15 21:03:51 2017 (r315330) +++ head/libexec/rtld-elf/rtld.1 Wed Mar 15 21:11:57 2017 (r315331) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 20, 2014 +.Dd March 16, 2017 .Dt RTLD 1 .Os .Sh NAME @@ -199,6 +199,12 @@ This is intended for use within sandboxes, when global namespaces such as the filesystem are unavailable. It is consulted just after LD_LIBRARY_PATH. This variable is unset for set-user-ID and set-group-ID programs. +.It Ev LD_BIND_NOT +When set to a nonempty string, prevents modifications of the PLT slots when +doing bindings. +As result, each call of the PLT-resolved function is resolved. +In combination with debug output, this provides complete account of +all bind actions at runtime. .It Ev LD_BIND_NOW When set to a nonempty string, causes .Nm Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Wed Mar 15 21:03:51 2017 (r315330) +++ head/libexec/rtld-elf/rtld.c Wed Mar 15 21:11:57 2017 (r315331) @@ -178,6 +178,7 @@ static char *libmap_override; /* Maps to static bool trust; /* False for setuid and setgid programs */ static bool dangerous_ld_env; /* True if environment variables have been used to affect the libraries loaded */ +bool ld_bind_not; /* Disable PLT update */ static char *ld_bind_now; /* Environment variable for immediate binding */ static char *ld_debug; /* Environment variable for debugging */ static char *ld_library_path; /* Environment variable for search path */ @@ -416,6 +417,9 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ md_abi_variant_hook(aux_info); ld_bind_now = getenv(_LD("BIND_NOW")); + if (ld_bind_now == NULL) + ld_bind_not = getenv(_LD("BIND_NOT")) != NULL; + /* * If the process is tainted, then we un-set the dangerous environment * variables. The process will be marked as tainted until setuid(2) Modified: head/libexec/rtld-elf/rtld.h ============================================================================== --- head/libexec/rtld-elf/rtld.h Wed Mar 15 21:03:51 2017 (r315330) +++ head/libexec/rtld-elf/rtld.h Wed Mar 15 21:11:57 2017 (r315331) @@ -358,6 +358,7 @@ void *malloc_aligned(size_t size, size_t void free_aligned(void *ptr); extern Elf_Addr _GLOBAL_OFFSET_TABLE_[]; extern Elf_Sym sym_zero; /* For resolving undefined weak refs. */ +extern bool ld_bind_not; void dump_relocations(Obj_Entry *); void dump_obj_relocations(Obj_Entry *); Modified: head/libexec/rtld-elf/sparc64/reloc.c ============================================================================== --- head/libexec/rtld-elf/sparc64/reloc.c Wed Mar 15 21:03:51 2017 (r315330) +++ head/libexec/rtld-elf/sparc64/reloc.c Wed Mar 15 21:11:57 2017 (r315331) @@ -581,7 +581,9 @@ reloc_jmpslot(Elf_Addr *wherep, Elf_Addr Elf_Addr offset; Elf_Word *where; - if (rela - refobj->pltrela < 32764) { + if (ld_bind_not) { + /* Skip any PLT modifications */ + } else if (rela - refobj->pltrela < 32764) { /* * At the PLT entry pointed at by `where', we now construct * a direct transfer to the now fully resolved function Modified: head/libexec/rtld-elf/sparc64/rtld_machdep.h ============================================================================== --- head/libexec/rtld-elf/sparc64/rtld_machdep.h Wed Mar 15 21:03:51 2017 (r315330) +++ head/libexec/rtld-elf/sparc64/rtld_machdep.h Wed Mar 15 21:11:57 2017 (r315331) @@ -39,9 +39,8 @@ Elf_Dyn *rtld_dynamic_addr(void); #define rtld_dynamic(obj) rtld_dynamic_addr() Elf_Addr reloc_jmpslot(Elf_Addr *, Elf_Addr, - const struct Struct_Obj_Entry *, - const struct Struct_Obj_Entry *, - const Elf_Rel *); + const struct Struct_Obj_Entry *, const struct Struct_Obj_Entry *, + const Elf_Rel *); #define make_function_pointer(def, defobj) \ ((defobj)->relocbase + (def)->st_value) From owner-svn-src-head@freebsd.org Wed Mar 15 21:17:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB55AD0DD97; Wed, 15 Mar 2017 21:17:46 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2F2F1BDE; Wed, 15 Mar 2017 21:17:46 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2FLHjgp052846; Wed, 15 Mar 2017 21:17:45 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2FLHj7w052845; Wed, 15 Mar 2017 21:17:45 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201703152117.v2FLHj7w052845@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 15 Mar 2017 21:17:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315332 - head/gnu/usr.bin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 21:17:47 -0000 Author: bdrewery Date: Wed Mar 15 21:17:45 2017 New Revision: 315332 URL: https://svnweb.freebsd.org/changeset/base/315332 Log: Fix SUBDIR_DEPEND for gdb on binutils after r307659. Sponsored by: Dell EMC Isilon Modified: head/gnu/usr.bin/Makefile Modified: head/gnu/usr.bin/Makefile ============================================================================== --- head/gnu/usr.bin/Makefile Wed Mar 15 21:11:57 2017 (r315331) +++ head/gnu/usr.bin/Makefile Wed Mar 15 21:17:45 2017 (r315332) @@ -2,7 +2,6 @@ .include -SUBDIR_DEPEND_gdb= ${_binutils} .if ${MK_CXX} != "no" SUBDIR.${MK_GCC}+= gperf @@ -14,6 +13,7 @@ SUBDIR.${MK_DIALOG}+= dialog .if ${MK_BINUTILS} != "no" SUBDIR.${MK_GDB}+= gdb +SUBDIR_DEPEND_gdb= binutils .endif SUBDIR.${MK_GCC}+= cc From owner-svn-src-head@freebsd.org Wed Mar 15 21:19:58 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E4E8D0DF2C for ; Wed, 15 Mar 2017 21:19:58 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-qk0-x229.google.com (mail-qk0-x229.google.com [IPv6:2607:f8b0:400d:c09::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B87F11EA5 for ; Wed, 15 Mar 2017 21:19:57 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-qk0-x229.google.com with SMTP id y76so24440073qkb.0 for ; Wed, 15 Mar 2017 14:19:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=btQ2aQOpJBYiXf/NtjbQkNM4ILDr0EnNrbjo5NqNxiQ=; b=Fua+E2DelrKNEZ+SOVyDZxs+TKOpxLpN5ZGH9LZBPJJrMnrDhzDhqcaapuectNG0WJ 7O5ZgOk5YNFKIvC1t4vEiYDpvh6IeFkhKensDEdW8RFZqBBj8iuBX9OMcCYsNekcpiK0 qC4WA2LokJbpai9e0hRRyjzmlSm0rn7yKqkjoSCDoV3GtncXpCaS+qhagcr+zcufT5Nh 2WSQfYGj/pBcO0g3GM2p3YolLB+W0SPYYv8ITAagS3YDJtHuYrftXVvuNADVBJlIP15F TvR+57hC39EqKg7VVgvlTbdKo+5O1rFYikcbuSP4RXIATD17epDa4coNUjMujar/8oHQ 3Adw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=btQ2aQOpJBYiXf/NtjbQkNM4ILDr0EnNrbjo5NqNxiQ=; b=krCb+ua/B2BPlfokFYYmq2A4tPL4OB7mo7YWzgABGtn0r6qL5k+OKsd8Rv9jdLwmw3 R9k571/srpA6Un/g90DtYWw09qopBMKi3wSqljfJYCcLp1cpQO12+5fUatiGB0FSEhPx 0ZGF+Gr1BRZ86rXSLHhlbDFQ0WftQxgL0/xYe7ltOzrfFsgUZxQ7sBAzCCixED7LHnOF fdrxyXzAhsxFlS2vL2Ucm4ysyldsdPSus+jcn3fheNydC9jtQ9UklPdSuyyI/a1tdAZs 17nz5Z/iyzWQ2gmoZScrlZD7btb6acLGUmJsjEvBss5cTxgqu3/VfC+cNCpat0U+Xw2+ qTGQ== X-Gm-Message-State: AFeK/H04vhHK4TRW8rQ/6qfZMVf9xeYkeycaHefb4yqvqcNSF6lN6i23foSE2ezmvOKLunKD X-Received: by 10.55.135.66 with SMTP id j63mr1752419qkd.310.1489612796755; Wed, 15 Mar 2017 14:19:56 -0700 (PDT) Received: from mutt-hbsd ([63.88.83.66]) by smtp.gmail.com with ESMTPSA id h184sm2143206qkf.68.2017.03.15.14.19.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 Mar 2017 14:19:55 -0700 (PDT) Date: Wed, 15 Mar 2017 17:19:54 -0400 From: Shawn Webb To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r315331 - in head/libexec/rtld-elf: . aarch64 amd64 arm i386 mips powerpc powerpc64 riscv sparc64 Message-ID: <20170315211954.cspzjr7xltemzfv2@mutt-hbsd> References: <201703152111.v2FLBwrD051923@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="4jmumflztpb3vfoj" Content-Disposition: inline In-Reply-To: <201703152111.v2FLBwrD051923@repo.freebsd.org> X-Operating-System: FreeBSD mutt-hbsd 12.0-CURRENT-HBSD FreeBSD 12.0-CURRENT-HBSD X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: NeoMutt/20170206 (1.7.2) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 21:19:58 -0000 --4jmumflztpb3vfoj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 15, 2017 at 09:11:58PM +0000, Konstantin Belousov wrote: > Author: kib > Date: Wed Mar 15 21:11:57 2017 > New Revision: 315331 > URL: https://svnweb.freebsd.org/changeset/base/315331 >=20 > Log: > Implement LD_BIND_NOT knob for rtld. > =20 > From the manpage: > When set to a nonempty string, prevents modifications of the PLT slots > when doing bindings. As result, each call of the PLT-resolved > function is resolved. In combination with debug output, this provides > complete account of all bind actions at runtime. > =20 > Same feature exists on Linux and Solaris. > =20 > Sponsored by: The FreeBSD Foundation > MFC after: 2 weeks Hey Kostik, I'm curious what the use case is for this. When would someone use LD_BIND_NOT? Thanks, --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --4jmumflztpb3vfoj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKrq2ve9q9Ia+iT2eaoRlj1JFbu4FAljJr/cACgkQaoRlj1JF bu6JNRAAgxdSHHDaR1eUyqu8nANAJi0pEqlm6H2eQOiDWJf/97bV+yoxpc/1PUMO 8dJyqzDlEqKS+Y29qv/I5o2+SCp9IG/YyePlK+sD2alTGzH07FzNXVJmINCRlSa+ jqgobaKkXMUgkdQOLFOuPPptcAazbg1UJ0jGNt9Kh4RRM0WG4ivLzz4/JS5JZZjO DSWBY9f4T+uJXWaVdeASN+AHyKva4g/fIdGhJ0s9ZXdS4n2jsZfkteroCg4Uu412 lkK0QTxdrAyHAFzpOLkMTFGg3hKoTQHzbOiChn1FJN8Uq/ZA4CirZXGOeKZDb4MU w8qM2MAk3Th6DkH5gZS0TooXcPSVnruEZNj/vq2BojMv5xYzTQIbRpbZwuAmVrid Wu+BVCNKkGcMI3O9elKoq6McYamPZMGQ1VLyA6pNDmxX9I3Asr3NQfM3DWp9zpey 9wX6MpWA4RSVmp5kUzSNILqizlCkQjWaMDX0hfkyDawgJMcxuv2rQPvtX1j1QisN gOO4b3a33ybZr0EoI4VUHTex+KaJQCG8FACNOJ/nhDLmRfrPpik3Oagdqi8yEnpn uAzDytmtVMpGh0W1vSHvOlw5QNAxPMr0r8dDRfuHF1NVKd0gwdZU6xTx/p/w7B8E sF1Uo9sS7/dL4J+rvnNCIOjW8EP3q/TooetAwQMcfoKK7yWb1OQ= =cY8V -----END PGP SIGNATURE----- --4jmumflztpb3vfoj-- From owner-svn-src-head@freebsd.org Wed Mar 15 22:36:27 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9B5DD0E53D; Wed, 15 Mar 2017 22:36:27 +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 mx1.freebsd.org (Postfix) with ESMTPS id 7C2B617D1; Wed, 15 Mar 2017 22:36:27 +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 v2FMaQXP085331; Wed, 15 Mar 2017 22:36:26 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2FMaQMJ085330; Wed, 15 Mar 2017 22:36:26 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201703152236.v2FMaQMJ085330@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 15 Mar 2017 22:36:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315334 - head/usr.bin/kdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 22:36:27 -0000 Author: jhb Date: Wed Mar 15 22:36:26 2017 New Revision: 315334 URL: https://svnweb.freebsd.org/changeset/base/315334 Log: Decode arguments to chflagsat(). Modified: head/usr.bin/kdump/kdump.c Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Wed Mar 15 21:20:17 2017 (r315333) +++ head/usr.bin/kdump/kdump.c Wed Mar 15 22:36:26 2017 (r315334) @@ -840,6 +840,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_in quad_slots = 1; switch (ktr->ktr_code) { case SYS_bindat: + case SYS_chflagsat: case SYS_connectat: case SYS_faccessat: case SYS_fchmodat: @@ -982,6 +983,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_in narg--; break; case SYS_chflags: + case SYS_chflagsat: case SYS_fchflags: case SYS_lchflags: print_number(ip, narg, c); From owner-svn-src-head@freebsd.org Wed Mar 15 22:39:17 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 364A4D0E5CA; Wed, 15 Mar 2017 22:39:17 +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 mx1.freebsd.org (Postfix) with ESMTPS id 0382419A0; Wed, 15 Mar 2017 22:39:16 +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 v2FMdGpn085469; Wed, 15 Mar 2017 22:39:16 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2FMdGbL085468; Wed, 15 Mar 2017 22:39:16 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201703152239.v2FMdGbL085468@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 15 Mar 2017 22:39:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315335 - head/usr.bin/truss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 22:39:17 -0000 Author: jhb Date: Wed Mar 15 22:39:15 2017 New Revision: 315335 URL: https://svnweb.freebsd.org/changeset/base/315335 Log: Remove duplicate argument from linux_stat64() decoding. Modified: head/usr.bin/truss/syscalls.c Modified: head/usr.bin/truss/syscalls.c ============================================================================== --- head/usr.bin/truss/syscalls.c Wed Mar 15 22:36:26 2017 (r315334) +++ head/usr.bin/truss/syscalls.c Wed Mar 15 22:39:15 2017 (r315335) @@ -377,8 +377,8 @@ static struct syscall decoded_syscalls[] .args = { { Name, 0 }, { Name | OUT, 1 }, { Int, 2 } } }, { .name = "linux_socketcall", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { LinuxSockArgs, 1 } } }, - { .name = "linux_stat64", .ret_type = 1, .nargs = 3, - .args = { { Name | IN, 0 }, { Ptr | OUT, 1 }, { Ptr | IN, 1 } } }, + { .name = "linux_stat64", .ret_type = 1, .nargs = 2, + .args = { { Name | IN, 0 }, { Ptr | OUT, 1 } } }, /* CloudABI system calls. */ { .name = "cloudabi_sys_clock_res_get", .ret_type = 1, .nargs = 1, From owner-svn-src-head@freebsd.org Wed Mar 15 22:42:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DDD7DD0E883; Wed, 15 Mar 2017 22:42:45 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from smtp.vangyzen.net (hotblack.vangyzen.net [199.48.133.146]) by mx1.freebsd.org (Postfix) with ESMTP id C7B451F67; Wed, 15 Mar 2017 22:42:45 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from ford.home.vangyzen.net (unknown [76.164.15.242]) by smtp.vangyzen.net (Postfix) with ESMTPSA id 63857564F6; Wed, 15 Mar 2017 17:42:44 -0500 (CDT) Subject: Re: svn commit: r315280 - in head/sys: kern sys To: Ngie Cooper References: <201703141906.v2EJ6i0x096677@repo.freebsd.org> Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Eric van Gyzen Message-ID: <1c228422-638c-63fe-fdfa-ba92ae196781@FreeBSD.org> Date: Wed, 15 Mar 2017 17:42:37 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 22:42:46 -0000 On 03/14/2017 17:16, Ngie Cooper wrote: > I'll take a look at running "open_posix_testsuite" from LTP and (when > time/appropriate), I'll help out with integrating in the > clock_nanosleep tests from NetBSD > (contrib/netbsd-tests/lib/libc/sys/t_clock_nanosleep.c, ). I hadn't heard of open_posix_testsuite. That sounds perfect. I'm very interested in your results. There isn't a lot of automated testing of {clock_,}nanosleep in our tree, as far as I can see. By the way, clock_nanosleep() is up for review. I took the liberty of making you a subscriber. https://reviews.freebsd.org/D10020 Eric From owner-svn-src-head@freebsd.org Wed Mar 15 22:50:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4261ED0EA33; Wed, 15 Mar 2017 22:50:21 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::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 B343112B3; Wed, 15 Mar 2017 22:50:20 +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 v2FMoFkX068702 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 16 Mar 2017 00:50:15 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v2FMoFkX068702 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v2FMoEIu068701; Thu, 16 Mar 2017 00:50:14 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 16 Mar 2017 00:50:14 +0200 From: Konstantin Belousov To: Shawn Webb Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r315331 - in head/libexec/rtld-elf: . aarch64 amd64 arm i386 mips powerpc powerpc64 riscv sparc64 Message-ID: <20170315225014.GL16105@kib.kiev.ua> References: <201703152111.v2FLBwrD051923@repo.freebsd.org> <20170315211954.cspzjr7xltemzfv2@mutt-hbsd> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170315211954.cspzjr7xltemzfv2@mutt-hbsd> User-Agent: Mutt/1.8.0 (2017-02-23) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 22:50:21 -0000 On Wed, Mar 15, 2017 at 05:19:54PM -0400, Shawn Webb wrote: > On Wed, Mar 15, 2017 at 09:11:58PM +0000, Konstantin Belousov wrote: > > Author: kib > > Date: Wed Mar 15 21:11:57 2017 > > New Revision: 315331 > > URL: https://svnweb.freebsd.org/changeset/base/315331 > > > > Log: > > Implement LD_BIND_NOT knob for rtld. > > > > From the manpage: > > When set to a nonempty string, prevents modifications of the PLT slots > > when doing bindings. As result, each call of the PLT-resolved > > function is resolved. In combination with debug output, this provides > > complete account of all bind actions at runtime. > > > > Same feature exists on Linux and Solaris. > > > > Sponsored by: The FreeBSD Foundation > > MFC after: 2 weeks > > Hey Kostik, > > I'm curious what the use case is for this. When would someone use > LD_BIND_NOT? The commit message explicitely describes the supposed use case, which also triggered my implementation of the feature. From owner-svn-src-head@freebsd.org Wed Mar 15 22:58:00 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9DB37D0EF10; Wed, 15 Mar 2017 22:58:00 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mailout.stack.nl (mailout05.stack.nl [IPv6:2001:610:1108:5010::202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mailout.stack.nl", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 6BD211A42; Wed, 15 Mar 2017 22:58:00 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mailout.stack.nl (Postfix) with ESMTP id 8C69A55; Wed, 15 Mar 2017 23:57:49 +0100 (CET) Received: by snail.stack.nl (Postfix, from userid 1677) id 7B6FC28497; Wed, 15 Mar 2017 23:57:49 +0100 (CET) Date: Wed, 15 Mar 2017 23:57:49 +0100 From: Jilles Tjoelker To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r315331 - in head/libexec/rtld-elf: . aarch64 amd64 arm i386 mips powerpc powerpc64 riscv sparc64 Message-ID: <20170315225749.GB8141@stack.nl> References: <201703152111.v2FLBwrD051923@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201703152111.v2FLBwrD051923@repo.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 22:58:00 -0000 On Wed, Mar 15, 2017 at 09:11:58PM +0000, Konstantin Belousov wrote: > Author: kib > Date: Wed Mar 15 21:11:57 2017 > New Revision: 315331 > URL: https://svnweb.freebsd.org/changeset/base/315331 > Log: > Implement LD_BIND_NOT knob for rtld. > From the manpage: > When set to a nonempty string, prevents modifications of the PLT slots > when doing bindings. As result, each call of the PLT-resolved > function is resolved. In combination with debug output, this provides > complete account of all bind actions at runtime. > Same feature exists on Linux and Solaris. Since this feature heavily affects timing (possibly making race conditions easier to exploit) and may prevent making parts of the GOT read-only, it seems a good idea to treat this environment variable as dangerous for setuid and setgid processes. -- Jilles Tjoelker From owner-svn-src-head@freebsd.org Wed Mar 15 23:08:12 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70124D0E270; Wed, 15 Mar 2017 23:08: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 mx1.freebsd.org (Postfix) with ESMTPS id 2DF9310CB; Wed, 15 Mar 2017 23:08: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 v2FN8BJa097483; Wed, 15 Mar 2017 23:08:11 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2FN8B7r097482; Wed, 15 Mar 2017 23:08:11 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201703152308.v2FN8B7r097482@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 15 Mar 2017 23:08:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315336 - head/usr.bin/truss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 23:08:12 -0000 Author: jhb Date: Wed Mar 15 23:08:11 2017 New Revision: 315336 URL: https://svnweb.freebsd.org/changeset/base/315336 Log: Automate the handling of QUAD_ALIGN and QUAD_SLOTS. Previously, the offset in a system call description specified the array index of the start of a system call argument. For most system call arguments this was the same as the index of the argument in the function signature. 64-bit arguments (off_t and id_t values) passed on 32-bit platforms use two slots in the array however. This was handled by adding (QUAD_SLOTS - 1) to the slot indicies of any subsequent arguments after a 64-bit argument (though written as ("{ Quad, 1 }, { Int, 1 + QUAD_SLOTS }" rather than "{ Quad, 1 }, { Int, 2 + QUAD_SLOTS - 1 }"). If a system call contained multiple 64-bit arguments (such as posix_fadvise()), then additional arguments would need to use 'QUAD_SLOTS * 2' but remember to subtract 2 from the initial number, etc. In addition, 32-bit powerpc requires 64-bit arguments to be 64-bit aligned, so if the effective index in the array of a 64-bit argument is odd, it needs QUAD_ALIGN added to the current and any subsequent slots. However, if the effective index in the array of a 64-bit argument was even, QUAD_ALIGN was omitted. This approach was messy and error prone. This commit replaces it with automated pre-processing of the system call table to do fixups for 64-bit argument offsets. The offset in a system call description now indicates the index of an argument in the associated function call's signature. A fixup function is run against each decoded system call description during startup on 32-bit platforms. The fixup function maintains an 'offset' value which holds an offset to be added to each remaining system call argument's index. Initially offset is 0. When a 64-bit system call argument is encountered, the offset is first aligned to a 64-bit boundary (only on powerpc) and then incremented to account for the second argument slot used by the argument. This modified 'offset' is then applied to any remaining arguments. This approach does require a few things that were not previously required: 1) Each system call description must now list arguments in ascending order (existing ones all do) without using duplicate slots in the register array. A new assert() should catch any future descriptions which violate this rule. 2) A system call description is still permitted to omit arguments (though none currently do), but if the call accepts 64-bit arguments those cannot be omitted or incorrect results will be displated on 32-bit systems. Tested on: amd64 and i386 Modified: head/usr.bin/truss/syscalls.c Modified: head/usr.bin/truss/syscalls.c ============================================================================== --- head/usr.bin/truss/syscalls.c Wed Mar 15 22:39:15 2017 (r315335) +++ head/usr.bin/truss/syscalls.c Wed Mar 15 23:08:11 2017 (r315336) @@ -71,20 +71,6 @@ __FBSDID("$FreeBSD$"); #include "extern.h" #include "syscall.h" -/* 64-bit alignment on 32-bit platforms. */ -#if !defined(__LP64__) && defined(__powerpc__) -#define QUAD_ALIGN 1 -#else -#define QUAD_ALIGN 0 -#endif - -/* Number of slots needed for a 64-bit argument. */ -#ifdef __LP64__ -#define QUAD_SLOTS 1 -#else -#define QUAD_SLOTS 2 -#endif - /* * This should probably be in its own file, sorted alphabetically. */ @@ -154,7 +140,7 @@ static struct syscall decoded_syscalls[] { .name = "fstatfs", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { StatFs | OUT, 1 } } }, { .name = "ftruncate", .ret_type = 1, .nargs = 2, - .args = { { Int | IN, 0 }, { QuadHex | IN, 1 + QUAD_ALIGN } } }, + .args = { { Int | IN, 0 }, { QuadHex | IN, 1 } } }, { .name = "futimens", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { Timespec2 | IN, 1 } } }, { .name = "futimes", .ret_type = 1, .nargs = 2, @@ -210,8 +196,7 @@ static struct syscall decoded_syscalls[] .args = { { Atfd, 0 }, { Name, 1 }, { Atfd, 2 }, { Name, 3 }, { Atflags, 4 } } }, { .name = "lseek", .ret_type = 2, .nargs = 3, - .args = { { Int, 0 }, { QuadHex, 1 + QUAD_ALIGN }, - { Whence, 1 + QUAD_SLOTS + QUAD_ALIGN } } }, + .args = { { Int, 0 }, { QuadHex, 1 }, { Whence, 2 } } }, { .name = "lstat", .ret_type = 1, .nargs = 2, .args = { { Name | IN, 0 }, { Stat | OUT, 1 } } }, { .name = "lutimes", .ret_type = 1, .nargs = 2, @@ -230,7 +215,7 @@ static struct syscall decoded_syscalls[] .args = { { Atfd, 0 }, { Name, 1 }, { Octal, 2 }, { Int, 3 } } }, { .name = "mmap", .ret_type = 1, .nargs = 6, .args = { { Ptr, 0 }, { Int, 1 }, { Mprot, 2 }, { Mmapflags, 3 }, - { Int, 4 }, { QuadHex, 5 + QUAD_ALIGN } } }, + { Int, 4 }, { QuadHex, 5 } } }, { .name = "modfind", .ret_type = 1, .nargs = 1, .args = { { Name | IN, 0 } } }, { .name = "mount", .ret_type = 1, .nargs = 4, @@ -257,9 +242,7 @@ static struct syscall decoded_syscalls[] { .name = "posix_openpt", .ret_type = 1, .nargs = 1, .args = { { Open, 0 } } }, { .name = "procctl", .ret_type = 1, .nargs = 4, - .args = { { Idtype, 0 }, { Quad, 1 + QUAD_ALIGN }, - { Procctl, 1 + QUAD_ALIGN + QUAD_SLOTS }, - { Ptr, 2 + QUAD_ALIGN + QUAD_SLOTS } } }, + .args = { { Idtype, 0 }, { Quad, 1 }, { Procctl, 2 }, { Ptr, 3 } } }, { .name = "read", .ret_type = 1, .nargs = 3, .args = { { Int, 0 }, { BinString | OUT, 1 }, { Int, 2 } } }, { .name = "readlink", .ret_type = 1, .nargs = 3, @@ -326,7 +309,7 @@ static struct syscall decoded_syscalls[] { .name = "thr_self", .ret_type = 1, .nargs = 1, .args = { { Ptr, 0 } } }, { .name = "truncate", .ret_type = 1, .nargs = 2, - .args = { { Name | IN, 0 }, { QuadHex | IN, 1 + QUAD_ALIGN } } }, + .args = { { Name | IN, 0 }, { QuadHex | IN, 1 } } }, #if 0 /* Does not exist */ { .name = "umount", .ret_type = 1, .nargs = 2, @@ -349,11 +332,8 @@ static struct syscall decoded_syscalls[] .args = { { Int, 0 }, { ExitStatus | OUT, 1 }, { Waitoptions, 2 }, { Rusage | OUT, 3 } } }, { .name = "wait6", .ret_type = 1, .nargs = 6, - .args = { { Idtype, 0 }, { Quad, 1 + QUAD_ALIGN }, - { ExitStatus | OUT, 1 + QUAD_ALIGN + QUAD_SLOTS }, - { Waitoptions, 2 + QUAD_ALIGN + QUAD_SLOTS }, - { Rusage | OUT, 3 + QUAD_ALIGN + QUAD_SLOTS }, - { Ptr, 4 + QUAD_ALIGN + QUAD_SLOTS } } }, + .args = { { Idtype, 0 }, { Quad, 1 }, { ExitStatus | OUT, 2 }, + { Waitoptions, 3 }, { Rusage | OUT, 4 }, { Ptr, 5 } } }, { .name = "write", .ret_type = 1, .nargs = 3, .args = { { Int, 0 }, { BinString | IN, 1 }, { Int, 2 } } }, @@ -811,14 +791,65 @@ print_mask_arg(bool (*decoder)(FILE *, i fprintf(fp, "|0x%x", rem); } +#ifndef __LP64__ +/* + * Add argument padding to subsequent system calls afater a Quad + * syscall arguments as needed. This used to be done by hand in the + * decoded_syscalls table which was ugly and error prone. It is + * simpler to do the fixup of offsets at initalization time than when + * decoding arguments. + */ +static void +quad_fixup(struct syscall *sc) +{ + int offset, prev; + u_int i; + + offset = 0; + prev = -1; + for (i = 0; i < sc->nargs; i++) { + /* This arg type is a dummy that doesn't use offset. */ + if ((sc->args[i].type & ARG_MASK) == PipeFds) + continue; + + assert(prev < sc->args[i].offset); + prev = sc->args[i].offset; + sc->args[i].offset += offset; + switch (sc->args[i].type & ARG_MASK) { + case Quad: + case QuadHex: +#ifdef __powerpc__ + /* + * 64-bit arguments on 32-bit powerpc must be + * 64-bit aligned. If the current offset is + * not aligned, the calling convention inserts + * a 32-bit pad argument that should be skipped. + */ + if (sc->args[i].offset % 2 == 1) { + sc->args[i].offset++; + offset++; + } +#endif + offset++; + default: + break; + } + } +} +#endif + void init_syscalls(void) { struct syscall *sc; STAILQ_INIT(&syscalls); - for (sc = decoded_syscalls; sc->name != NULL; sc++) + for (sc = decoded_syscalls; sc->name != NULL; sc++) { +#ifndef __LP64__ + quad_fixup(sc); +#endif STAILQ_INSERT_HEAD(&syscalls, sc, entries); + } } static struct syscall * From owner-svn-src-head@freebsd.org Wed Mar 15 23:47:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1FA69D0EDC0; Wed, 15 Mar 2017 23:47:21 +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 mx1.freebsd.org (Postfix) with ESMTPS id E36DE14C9; Wed, 15 Mar 2017 23:47:20 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2FNlK1P013825; Wed, 15 Mar 2017 23:47:20 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2FNlKws013824; Wed, 15 Mar 2017 23:47:20 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201703152347.v2FNlKws013824@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 15 Mar 2017 23:47:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315337 - head/libexec/rtld-elf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 23:47:21 -0000 Author: kib Date: Wed Mar 15 23:47:19 2017 New Revision: 315337 URL: https://svnweb.freebsd.org/changeset/base/315337 Log: Disable LD_BIND_NOT for setugid processes. Requested by: jilles Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Wed Mar 15 23:08:11 2017 (r315336) +++ head/libexec/rtld-elf/rtld.c Wed Mar 15 23:47:19 2017 (r315337) @@ -417,8 +417,6 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ md_abi_variant_hook(aux_info); ld_bind_now = getenv(_LD("BIND_NOW")); - if (ld_bind_now == NULL) - ld_bind_not = getenv(_LD("BIND_NOT")) != NULL; /* * If the process is tainted, then we un-set the dangerous environment @@ -429,7 +427,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ if (!trust) { if (unsetenv(_LD("PRELOAD")) || unsetenv(_LD("LIBMAP")) || unsetenv(_LD("LIBRARY_PATH")) || unsetenv(_LD("LIBRARY_PATH_FDS")) || - unsetenv(_LD("LIBMAP_DISABLE")) || + unsetenv(_LD("LIBMAP_DISABLE")) || unsetenv(_LD("BIND_NOT")) || unsetenv(_LD("DEBUG")) || unsetenv(_LD("ELF_HINTS_PATH")) || unsetenv(_LD("LOADFLTR")) || unsetenv(_LD("LIBRARY_PATH_RPATH"))) { _rtld_error("environment corrupt; aborting"); @@ -437,6 +435,8 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ } } ld_debug = getenv(_LD("DEBUG")); + if (ld_bind_now == NULL) + ld_bind_not = getenv(_LD("BIND_NOT")) != NULL; libmap_disable = getenv(_LD("LIBMAP_DISABLE")) != NULL; libmap_override = getenv(_LD("LIBMAP")); ld_library_path = getenv(_LD("LIBRARY_PATH")); From owner-svn-src-head@freebsd.org Wed Mar 15 23:52:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1B5BD0EFA2; Wed, 15 Mar 2017 23:52:01 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::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 4F89C17AB; Wed, 15 Mar 2017 23:52:01 +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 v2FNpuZN082624 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 16 Mar 2017 01:51:56 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v2FNpuZN082624 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v2FNpu0x082623; Thu, 16 Mar 2017 01:51:56 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 16 Mar 2017 01:51:56 +0200 From: Konstantin Belousov To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r315323 - head/sys/kern Message-ID: <20170315235156.GM16105@kib.kiev.ua> References: <201703151823.v2FINWN9083379@repo.freebsd.org> <3167768.s4jIG6eyGp@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3167768.s4jIG6eyGp@ralph.baldwin.cx> User-Agent: Mutt/1.8.0 (2017-02-23) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 15 Mar 2017 23:52:01 -0000 On Wed, Mar 15, 2017 at 12:21:00PM -0700, John Baldwin wrote: > On Wednesday, March 15, 2017 06:23:32 PM John Baldwin wrote: > > Author: jhb > > Date: Wed Mar 15 18:23:32 2017 > > New Revision: 315323 > > URL: https://svnweb.freebsd.org/changeset/base/315323 > > > > Log: > > Use UMA_ALIGN_PTR instead of sizeof(void *) for zone alignment. > > > > uma_zcreate()'s alignment argument is supposed to be sizeof(foo) - 1, > > and uma.h provides a set of helper macros for common types. Passing > > sizeof(void *) results in all of the members being misaligned triggering > > unaligned access faults on certain architectures (notably MIPS). > > > > Reported by: brooks > > Obtained from: CheriBSD > > MFC after: 3 days > > Sponsored by: DARPA / AFRL > > > > Modified: > > head/sys/kern/vfs_lookup.c > > We should perhaps add a KASSERT() to uma_zcreate to catch this sort of > thing. Something like KASSERT(powerof2(align + 1)) (assuming there isn't > a real use case for having non-power-of-2 alignments)? > Will you do it ? From owner-svn-src-head@freebsd.org Thu Mar 16 00:50:00 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C9DA9D0C613; Thu, 16 Mar 2017 00:50:00 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 A44BA1921; Thu, 16 Mar 2017 00:50:00 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2G0nxGS038057; Thu, 16 Mar 2017 00:49:59 GMT (envelope-from kan@FreeBSD.org) Received: (from kan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2G0nxM6038056; Thu, 16 Mar 2017 00:49:59 GMT (envelope-from kan@FreeBSD.org) Message-Id: <201703160049.v2G0nxM6038056@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kan set sender to kan@FreeBSD.org using -f From: Alexander Kabaev Date: Thu, 16 Mar 2017 00:49:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315338 - head/sys/mips/cavium X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 00:50:00 -0000 Author: kan Date: Thu Mar 16 00:49:59 2017 New Revision: 315338 URL: https://svnweb.freebsd.org/changeset/base/315338 Log: Add cavium octeon 'bootoctlinux' boot argument support While there, parse u-boot provided command line arguments for supported switches and update boothowto appropriately. Also support setting kenv variables from the kernel comman line. PR: 216831 (modified) Modified: head/sys/mips/cavium/octeon_machdep.c Modified: head/sys/mips/cavium/octeon_machdep.c ============================================================================== --- head/sys/mips/cavium/octeon_machdep.c Wed Mar 15 23:47:19 2017 (r315337) +++ head/sys/mips/cavium/octeon_machdep.c Thu Mar 16 00:49:59 2017 (r315338) @@ -95,6 +95,7 @@ struct octeon_feature_description { extern int *end; extern char cpu_model[]; extern char cpu_board[]; +static char octeon_kenv[0x2000]; static const struct octeon_feature_description octeon_feature_descriptions[] = { { OCTEON_FEATURE_SAAD, "SAAD" }, @@ -130,6 +131,7 @@ static uint64_t octeon_get_ticks(void); static unsigned octeon_get_timecount(struct timecounter *tc); static void octeon_boot_params_init(register_t ptr); +static void octeon_init_kenv(register_t ptr); static struct timecounter octeon_timecounter = { octeon_get_timecount, /* get_timecount */ @@ -341,12 +343,11 @@ platform_start(__register_t a0, __regist octeon_ciu_reset(); /* - * XXX - * We can certainly parse command line arguments or U-Boot environment - * to determine whether to bootverbose / single user / ... I think - * stass has patches to add support for loader things to U-Boot even. + * Convert U-Boot 'bootoctlinux' loader command line arguments into + * boot flags and kernel environment variables. */ bootverbose = 1; + octeon_init_kenv(a3); /* * For some reason on the cn38xx simulator ebase register is set to @@ -660,3 +661,59 @@ octeon_boot_params_init(register_t ptr) __cvmx_helper_cfg_init(); } /* impEND: This stuff should move back into the Cavium SDK */ + +static void +boothowto_parse(const char *v) +{ + if ((v == NULL) || (*v != '-')) + return; + + while (*v != '\0') { + v++; + switch (*v) { + case 'a': boothowto |= RB_ASKNAME; break; + case 'C': boothowto |= RB_CDROM; break; + case 'd': boothowto |= RB_KDB; break; + case 'D': boothowto |= RB_MULTIPLE; break; + case 'm': boothowto |= RB_MUTE; break; + case 'g': boothowto |= RB_GDB; break; + case 'h': boothowto |= RB_SERIAL; break; + case 'p': boothowto |= RB_PAUSE; break; + case 'r': boothowto |= RB_DFLTROOT; break; + case 's': boothowto |= RB_SINGLE; break; + case 'v': boothowto |= RB_VERBOSE; break; + } + } +} + +/* + * The boot loader command line may specify kernel environment variables or + * applicable boot flags of boot(8). + */ +static void +octeon_init_kenv(register_t ptr) +{ + int i; + char *n; + char *v; + octeon_boot_descriptor_t *app_desc_ptr; + + app_desc_ptr = (octeon_boot_descriptor_t *)(intptr_t)ptr; + memset(octeon_kenv, 0, sizeof(octeon_kenv)); + init_static_kenv(octeon_kenv, sizeof(octeon_kenv)); + + for (i = 0; i < app_desc_ptr->argc; i++) { + v = cvmx_phys_to_ptr(app_desc_ptr->argv[i]); + if (v == NULL) + continue; + if (*v == '-') { + boothowto_parse(v); + continue; + } + n = strsep(&v, "="); + if (v == NULL) + kern_setenv(n, "1"); + else + kern_setenv(n, v); + } +} From owner-svn-src-head@freebsd.org Thu Mar 16 02:31:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F632D0E7C1; Thu, 16 Mar 2017 02:31: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 mx1.freebsd.org (Postfix) with ESMTPS id D33FA13E0; Thu, 16 Mar 2017 02:31: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 v2G2Vgaw082642; Thu, 16 Mar 2017 02:31:42 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2G2VgxK082641; Thu, 16 Mar 2017 02:31:42 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703160231.v2G2VgxK082641@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 16 Mar 2017 02:31:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315360 - head/lib/libkvm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 02:31:44 -0000 Author: ngie Date: Thu Mar 16 02:31:42 2017 New Revision: 315360 URL: https://svnweb.freebsd.org/changeset/base/315360 Log: Return NULL instead of 0 on failure in _kvm_open, kvm_open{,2,files} This is being done for the following reasons: - kvm_open(3), etc says they will return NULL. - NULL by definition is (void*)0 per POSIX, but can be redefined, depending on the compiler, etc. MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/lib/libkvm/kvm.c Modified: head/lib/libkvm/kvm.c ============================================================================== --- head/lib/libkvm/kvm.c Thu Mar 16 02:09:51 2017 (r315359) +++ head/lib/libkvm/kvm.c Thu Mar 16 02:31:42 2017 (r315360) @@ -217,7 +217,7 @@ failed: if (errout != NULL) strlcpy(errout, kd->errbuf, _POSIX2_LINE_MAX); (void)kvm_close(kd); - return (0); + return (NULL); } kvm_t * @@ -230,7 +230,7 @@ kvm_openfiles(const char *uf, const char if (errout != NULL) (void)strlcpy(errout, strerror(errno), _POSIX2_LINE_MAX); - return (0); + return (NULL); } return (_kvm_open(kd, uf, mf, flag, errout)); } @@ -245,7 +245,7 @@ kvm_open(const char *uf, const char *mf, if (errstr != NULL) (void)fprintf(stderr, "%s: %s\n", errstr, strerror(errno)); - return (0); + return (NULL); } kd->program = errstr; return (_kvm_open(kd, uf, mf, flag, NULL)); @@ -261,7 +261,7 @@ kvm_open2(const char *uf, const char *mf if (errout != NULL) (void)strlcpy(errout, strerror(errno), _POSIX2_LINE_MAX); - return (0); + return (NULL); } kd->resolve_symbol = resolver; return (_kvm_open(kd, uf, mf, flag, errout)); From owner-svn-src-head@freebsd.org Thu Mar 16 02:32:48 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C215D0E82B; Thu, 16 Mar 2017 02:32:48 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [IPv6:2a01:4f8:162:1127::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.codepro.be", Issuer "Gandi Standard SSL CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 170531646; Thu, 16 Mar 2017 02:32:48 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from [192.168.8.218] (203.141.139.231.static.zoot.jp [203.141.139.231]) (Authenticated sender: kp) by venus.codepro.be (Postfix) with ESMTPSA id C87B61E0F6; Thu, 16 Mar 2017 03:32:43 +0100 (CET) From: "Kristof Provost" To: "John Baldwin" Cc: "Gleb Smirnoff" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r315136 - head/sys/netpfil/pf Date: Thu, 16 Mar 2017 11:32:38 +0900 Message-ID: <00566E96-2330-4354-9095-6D8F77C3AB26@FreeBSD.org> In-Reply-To: <1803226.Igex2bR0P8@ralph.baldwin.cx> References: <201703120542.v2C5gvM4075391@repo.freebsd.org> <20170314215706.GB1072@FreeBSD.org> <7B1C8879-E636-4315-99A2-A258AB9AE500@FreeBSD.org> <1803226.Igex2bR0P8@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Mailer: MailMate (2.0BETAr6080) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 02:32:48 -0000 On 15 Mar 2017, at 15:45, John Baldwin wrote: > You are ignoring interrupts and preemption. Suppose you get an > interrupt > after 'wakeup_one(pf_purge_thread)' and before 'tsleep(..., 0)' in > pf_unload(). If the interrupt preempts and results in the purge > thread > running and issuing its wakeup before the thread executing pf_unload() > resumes, then eventually when pf_unload() resumes it will do a > tsleep() with > no timeout that will never be awoken. > Thank you for the thorough explanation. I’ll work on a fix and post it for review as soon as I can. > You obviously didn't test this in a debug kernel since there is a > KASSERT > explicitly to catch obvious tsleep races in _sleep(): > > KASSERT(sbt != 0 || mtx_owned(&Giant) || lock != NULL, > ("sleeping without a lock")); > I’m sure I did test this with both INVARIANTS and WITNESS enabled. Is Giant held during module load/unload? Regards, Kristof From owner-svn-src-head@freebsd.org Thu Mar 16 03:06:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 444F8D0E47E; Thu, 16 Mar 2017 03:06:52 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 113391AD5; Thu, 16 Mar 2017 03:06:51 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2G36pE7096480; Thu, 16 Mar 2017 03:06:51 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2G36oAX096478; Thu, 16 Mar 2017 03:06:51 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <201703160306.v2G36oAX096478@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Thu, 16 Mar 2017 03:06:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315361 - in head/sys/x86: include x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 03:06:52 -0000 Author: grehan Date: Thu Mar 16 03:06:50 2017 New Revision: 315361 URL: https://svnweb.freebsd.org/changeset/base/315361 Log: Add the AMD MONITORX/MWAITX feature definition introduced in Bulldozer/Ryzen CPUs. Reviewed by: kib MFC after: 1 week 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 Thu Mar 16 02:31:42 2017 (r315360) +++ head/sys/x86/include/specialreg.h Thu Mar 16 03:06:50 2017 (r315361) @@ -227,6 +227,7 @@ #define AMDID2_DBE 0x04000000 #define AMDID2_PTSC 0x08000000 #define AMDID2_PTSCEL2I 0x10000000 +#define AMDID2_MWAITX 0x20000000 /* * CPUID instruction 1 eax info Modified: head/sys/x86/x86/identcpu.c ============================================================================== --- head/sys/x86/x86/identcpu.c Thu Mar 16 02:31:42 2017 (r315360) +++ head/sys/x86/x86/identcpu.c Thu Mar 16 03:06:50 2017 (r315361) @@ -906,7 +906,7 @@ printcpuinfo(void) "\033DBE" /* Data Breakpoint extension */ "\034PTSC" /* Performance TSC */ "\035PL2I" /* L2I perf count */ - "\036" + "\036MWAITX" /* MONITORX/MWAITX instructions */ "\037" "\040" ); From owner-svn-src-head@freebsd.org Thu Mar 16 03:18:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B662ED0E821; Thu, 16 Mar 2017 03:18:07 +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 mx1.freebsd.org (Postfix) with ESMTPS id 863111FF6; Thu, 16 Mar 2017 03:18:07 +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 v2G3I6qe000535; Thu, 16 Mar 2017 03:18:06 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2G3I6bh000534; Thu, 16 Mar 2017 03:18:06 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703160318.v2G3I6bh000534@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 16 Mar 2017 03:18:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315362 - head/lib/libkvm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 03:18:07 -0000 Author: ngie Date: Thu Mar 16 03:18:06 2017 New Revision: 315362 URL: https://svnweb.freebsd.org/changeset/base/315362 Log: Capitalize .Dt macro argument By convention, per mdoc(7), the document title should be all caps. MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/lib/libkvm/kvm_native.3 Modified: head/lib/libkvm/kvm_native.3 ============================================================================== --- head/lib/libkvm/kvm_native.3 Thu Mar 16 03:06:50 2017 (r315361) +++ head/lib/libkvm/kvm_native.3 Thu Mar 16 03:18:06 2017 (r315362) @@ -25,8 +25,8 @@ .\" .\" $FreeBSD$ .\" -.Dd November 27, 2015 -.Dt kvm_native 3 +.Dd March 15, 2017 +.Dt KVM_NATIVE 3 .Os .Sh NAME .Nm kvm_native From owner-svn-src-head@freebsd.org Thu Mar 16 03:21:00 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB25DD0E957; Thu, 16 Mar 2017 03:21:00 +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 mx1.freebsd.org (Postfix) with ESMTPS id B83D7122D; Thu, 16 Mar 2017 03:21:00 +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 v2G3KxwB000696; Thu, 16 Mar 2017 03:20:59 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2G3Kxrd000695; Thu, 16 Mar 2017 03:20:59 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703160320.v2G3Kxrd000695@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 16 Mar 2017 03:20:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315363 - head/lib/libkvm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 03:21:01 -0000 Author: ngie Date: Thu Mar 16 03:20:59 2017 New Revision: 315363 URL: https://svnweb.freebsd.org/changeset/base/315363 Log: Fix manlint errors - Add missing comma after kvm_dpcpu_setcpu .Nm macro use (multiple .Nm entries should be separated by commas) - Add missing section for kvm_dpcpu_setcpu Xr. MFC after: 1 week Reported by: make manlint Sponsored by: Dell EMC Isilon Modified: head/lib/libkvm/kvm_getpcpu.3 Modified: head/lib/libkvm/kvm_getpcpu.3 ============================================================================== --- head/lib/libkvm/kvm_getpcpu.3 Thu Mar 16 03:18:06 2017 (r315362) +++ head/lib/libkvm/kvm_getpcpu.3 Thu Mar 16 03:20:59 2017 (r315363) @@ -28,11 +28,11 @@ .\" .\" $FreeBSD$ .\" -.Dd February 12, 2014 +.Dd March 15, 2017 .Dt KVM_GETPCPU 3 .Os .Sh NAME -.Nm kvm_dpcpu_setcpu +.Nm kvm_dpcpu_setcpu , .Nm kvm_getmaxcpu , .Nm kvm_getpcpu .Nd access per-CPU data @@ -120,7 +120,7 @@ Symbols for dynamic per-CPU data are acc as with other symbols. .Nm libkvm maintains a notion of the "current CPU", set by -.Xr kvm_dpcpu_setcpu , +.Xr kvm_dpcpu_setcpu 3 , which defaults to 0. Once another CPU is selected, .Xr kvm_nlist 3 From owner-svn-src-head@freebsd.org Thu Mar 16 03:21:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28411D0EADC; Thu, 16 Mar 2017 03:21:44 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E92711588; Thu, 16 Mar 2017 03:21:43 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2G3Lgns003068; Thu, 16 Mar 2017 03:21:42 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2G3Lgkb003067; Thu, 16 Mar 2017 03:21:42 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <201703160321.v2G3Lgkb003067@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Thu, 16 Mar 2017 03:21:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315364 - head/sys/amd64/vmm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 03:21:44 -0000 Author: grehan Date: Thu Mar 16 03:21:42 2017 New Revision: 315364 URL: https://svnweb.freebsd.org/changeset/base/315364 Log: Hide the AMD MONITORX/MWAITX capability. Otherwise, recent Linux guests will use these instructions, resulting in #UD exceptions since bhyve doesn't implement MONITOR/MWAIT exits. This fixes boot-time hangs in recent Linux guests on Ryzen CPUs (and probably Bulldozer aka AMD FX as well). Reviewed by: kib MFC after: 1 week Modified: head/sys/amd64/vmm/x86.c Modified: head/sys/amd64/vmm/x86.c ============================================================================== --- head/sys/amd64/vmm/x86.c Thu Mar 16 03:20:59 2017 (r315363) +++ head/sys/amd64/vmm/x86.c Thu Mar 16 03:21:42 2017 (r315364) @@ -176,6 +176,9 @@ x86_emulate_cpuid(struct vm *vm, int vcp /* Don't advertise the OS visible workaround feature */ regs[2] &= ~AMDID2_OSVW; + /* Hide mwaitx/monitorx capability from the guest */ + regs[2] &= ~AMDID2_MWAITX; + /* * Hide rdtscp/ia32_tsc_aux until we know how * to deal with them. From owner-svn-src-head@freebsd.org Thu Mar 16 03:24:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1314D0EB72; Thu, 16 Mar 2017 03:24: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 mx1.freebsd.org (Postfix) with ESMTPS id 7E7C817B0; Thu, 16 Mar 2017 03:24: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 v2G3OFHw004813; Thu, 16 Mar 2017 03:24:15 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2G3OFHh004812; Thu, 16 Mar 2017 03:24:15 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703160324.v2G3OFHh004812@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 16 Mar 2017 03:24:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315365 - head/lib/libkvm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 03:24:16 -0000 Author: ngie Date: Thu Mar 16 03:24:15 2017 New Revision: 315365 URL: https://svnweb.freebsd.org/changeset/base/315365 Log: Tweak r315363 slightly I noticed after commit that kvm_dpcpu_setcpu was defined in the manpage. Thus, the correct macro for the function reference is .Fn, not .Xr. MFC after: 1 week X-MFC with: r315363 Sponsored by: Dell EMC Isilon Modified: head/lib/libkvm/kvm_getpcpu.3 Modified: head/lib/libkvm/kvm_getpcpu.3 ============================================================================== --- head/lib/libkvm/kvm_getpcpu.3 Thu Mar 16 03:21:42 2017 (r315364) +++ head/lib/libkvm/kvm_getpcpu.3 Thu Mar 16 03:24:15 2017 (r315365) @@ -120,7 +120,7 @@ Symbols for dynamic per-CPU data are acc as with other symbols. .Nm libkvm maintains a notion of the "current CPU", set by -.Xr kvm_dpcpu_setcpu 3 , +.Fn kvm_dpcpu_setcpu , which defaults to 0. Once another CPU is selected, .Xr kvm_nlist 3 From owner-svn-src-head@freebsd.org Thu Mar 16 04:00:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DCC25D0E773; Thu, 16 Mar 2017 04:00:24 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id 60A571E17; Thu, 16 Mar 2017 04:00:23 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id C08D3D42D30; Thu, 16 Mar 2017 15:00:15 +1100 (AEDT) Date: Thu, 16 Mar 2017 15:00:14 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Ngie Cooper cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r315365 - head/lib/libkvm In-Reply-To: <201703160324.v2G3OFHh004812@repo.freebsd.org> Message-ID: <20170316144923.O1839@besplex.bde.org> References: <201703160324.v2G3OFHh004812@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=VbSHBBh9 c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=DiyqzgTmKoGjrKZWp48A:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 04:00:25 -0000 On Thu, 16 Mar 2017, Ngie Cooper wrote: > Log: > Tweak r315363 slightly > > I noticed after commit that kvm_dpcpu_setcpu was defined in the manpage. > Thus, the correct macro for the function reference is .Fn, not .Xr. Is .Xr ever correct for a function? I think it names man pages, not functions, and only the higher-quality man pages document only 1 function and have the same name as that function. Rendering might be different for function. I don't like generic .Xr's. They often point to very large man pages with relevant 1 clause in sentence, and no hint about what this clause might say or how to find it. Generic .Xr's are typically found in the main .Xr section, with no hints about how they are relevant to the current man page either. Ones in other sections at least have some nearby context. Naming functions in other pages is actually more useful than naming the man page containing them. Then you can grep for clauses containing the function name. Bruce From owner-svn-src-head@freebsd.org Thu Mar 16 04:05:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5EA61D0E96E; Thu, 16 Mar 2017 04:05:32 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x242.google.com (mail-pg0-x242.google.com [IPv6:2607:f8b0:400e:c05::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2B8721257; Thu, 16 Mar 2017 04:05:32 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x242.google.com with SMTP id g2so4463959pge.2; Wed, 15 Mar 2017 21:05:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=nv7D8r7G8qcLxOLVCp5mE4Fl4+a9fZ42leAzbSJHauU=; b=lUM0R0lbbdlWZH2WW7cRG4yXRs6ntkUKmA0o/dNnnHwUrmLOsk4YPSzfV1vgQZP11V zAZMKHr+BnvFNrSx1Wexs2KgnMriy+YryPggE5urOwRP1++kFwg+Tip0xgSEOSDMv1GU tM4uH41XltlW8VeXM8ZwKMtdQX0TSceIJTxB7bO/u9r1QJcpb0eDgN/N0Us+jaMAtrLE BhPdhLxyO/ERIGet/FYKJOl0dbBACXXTt2F3Y/4J23WYNb3qIJ6FBXlwsx+C9Mt7mBIQ lkrls1fndNOEWGG+4FvK9ZQa0fdT0PNfpnFy3rKROQnHAvTHPnFX9E/kkI7lDcvdykl6 9cjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=nv7D8r7G8qcLxOLVCp5mE4Fl4+a9fZ42leAzbSJHauU=; b=jFMlhjAFdkdHw9sF83HI2WVUUkAB16zWq5mV1VKFMuOA/NCrh3hRDyAq+pt9vy7ML/ AgB0PSFA5B2BPYFKz7KNU1RZP4y+/59Fd0faP/nsBdkEZ7yAqBF6KsW21Ec8AtnnJU1Z WMWoruwnaqhcSPZdT5jRvHrbaqI0twyuJMlAYTLkTS945Qp2y07OCcacmMXCnpVX7KPa BVztHF6r1U0zo/IVK6KTuiAua14d+V7VVbbLqV3rGINENq9LYIJoZCkntMCrjg09aKEK zN+33wCdfKwHHwLwRR7Jg2/E68S5CRlUnGupc1O8jkiLIdcxsYFPtSeSFoWlOjxuen0/ NqWg== X-Gm-Message-State: AFeK/H2H1MljLjEw4teySfRYhFshoiV/ViA4ZIydiFUOq6yl4o/Zz1znktXXwTniCrIOhQ== X-Received: by 10.84.209.204 with SMTP id y70mr9373230plh.69.1489637131671; Wed, 15 Mar 2017 21:05:31 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id d1sm6914408pfk.20.2017.03.15.21.05.30 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 15 Mar 2017 21:05:30 -0700 (PDT) Subject: Re: svn commit: r315365 - head/lib/libkvm Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_8268C623-C698-4F1C-A905-56CA46F188DB"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <20170316144923.O1839@besplex.bde.org> Date: Wed, 15 Mar 2017 21:05:29 -0700 Cc: Ngie Cooper , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201703160324.v2G3OFHh004812@repo.freebsd.org> <20170316144923.O1839@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 04:05:32 -0000 --Apple-Mail=_8268C623-C698-4F1C-A905-56CA46F188DB Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Mar 15, 2017, at 21:00, Bruce Evans wrote: >=20 > On Thu, 16 Mar 2017, Ngie Cooper wrote: >=20 >> Log: >> Tweak r315363 slightly >>=20 >> I noticed after commit that kvm_dpcpu_setcpu was defined in the = manpage. >> Thus, the correct macro for the function reference is .Fn, not .Xr. >=20 > Is .Xr ever correct for a function? I think it names man pages, not > functions, and only the higher-quality man pages document only 1 > function and have the same name as that function. Rendering might be > different for function. >=20 > I don't like generic .Xr's. They often point to very large man pages > with relevant 1 clause in sentence, and no hint about what this clause > might say or how to find it. Generic .Xr's are typically found in the > main .Xr section, with no hints about how they are relevant to the > current man page either. Ones in other sections at least have some > nearby context. >=20 > Naming functions in other pages is actually more useful than naming > the man page containing them. Then you can grep for clauses = containing > the function name. Hi Bruce, In this case, the .Xr was incorrect, since it was = self-referential; .Fn was the right answer for the second part of = r315363. Thanks, -Ngie --Apple-Mail=_8268C623-C698-4F1C-A905-56CA46F188DB Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYyg8JAAoJEPWDqSZpMIYVXtcP/RxMbYOrCAbjm7E7uOeczBCV IbxyRfKx+quBdXAtQK+JfTpScLOV2Wd6vw6qMYrf1tqlHjYWbYWPeIRS8zMg6nmU FG9PjdVfYPmDLHQFrZwUZCWiKdSROWmxO5Z+ygbXu/qiW6pXhZFDQaYPyswSn37f 8y86ia7mt+jX44dks3jomllLyZ5GApsxIWykyHEa0hjm4F7MIbP8OOA4QwpZ++UO fVr164YMt+GEXc+58RRhvQoL8kBTOV6gsXK65hhumSkuKLNQfC5QyDGbyfNXOIu8 SjflUkzZjnzgKpAKqWmkC5uLOoLk6of3iHc02KEdoRwLA3VcxFbyeCIt20PZ8Zwb v7LVuBwKsWoPY+pDN3485d8bK8YgdoS13yo/Da4aFP3s1gA2E9b5jrOSuoM2MIBH ld8ZgpC1J3SH5DBBNDYFozcYmO4wzBVTWFAM7Em2MH7P5M/rrxNZvon8cNmvTplz z6NyE9KsZmJuis1MTdp576WHAG+K5924rYvaWeqrlW8fCurWJZAljpf6tb2/9zRv HjuS6+s5b30IUlH/z0SVHLcWQ9lS85L0pdLfaOMNL44fF2dPDiLr7BOvU5XUohxe QM5UQ4U8nk65mLrNV7I0Ze+VcFG/94ELZQgH7Tlcvcsu6zcc4yWka6THNopzEnAd dL0NqcUNPW9oY24yZxll =UTGn -----END PGP SIGNATURE----- --Apple-Mail=_8268C623-C698-4F1C-A905-56CA46F188DB-- From owner-svn-src-head@freebsd.org Thu Mar 16 04:25:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53CA1D0EDE2; Thu, 16 Mar 2017 04:25:33 +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 124A81B46; Thu, 16 Mar 2017 04:25:32 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [10.1.1.2] (unknown [10.1.1.2]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id 97652138A9; Thu, 16 Mar 2017 04:25:30 +0000 (UTC) Subject: Re: svn commit: r315230 - in head: etc/mtree tests/sys/geom tests/sys/geom/class/eli tests/sys/geom/eli To: Ngie Cooper References: <201703140700.v2E70MXc091919@repo.freebsd.org> <20170315052239.GC1072@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Allan Jude Message-ID: Date: Thu, 16 Mar 2017 00:25:27 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <20170315052239.GC1072@FreeBSD.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="R1piW4I2HUtC9BGLi882l2HoSF7JcjHA3" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 04:25:33 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --R1piW4I2HUtC9BGLi882l2HoSF7JcjHA3 Content-Type: multipart/mixed; boundary="jU1Xmn5UO9Ov85T5eITs0vLeelw3ts0li"; protected-headers="v1" From: Allan Jude To: Ngie Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r315230 - in head: etc/mtree tests/sys/geom tests/sys/geom/class/eli tests/sys/geom/eli References: <201703140700.v2E70MXc091919@repo.freebsd.org> <20170315052239.GC1072@FreeBSD.org> In-Reply-To: <20170315052239.GC1072@FreeBSD.org> --jU1Xmn5UO9Ov85T5eITs0vLeelw3ts0li Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 2017-03-15 01:22, Gleb Smirnoff wrote: > On Tue, Mar 14, 2017 at 07:00:22AM +0000, Ngie Cooper wrote: > N> Author: ngie > N> Date: Tue Mar 14 07:00:22 2017 > N> New Revision: 315230 > N> URL: https://svnweb.freebsd.org/changeset/base/315230 > N>=20 > N> Log: > N> Move .../sys/geom/eli/pbkdf2... to .../sys/geom/class/eli/... > N> =20 > N> This change moves the tests added in r313962 to an existing direct= ory > N> structure used by the geli TAP tests. It also, renames the test fr= om > N> pbkdf2 to pbkdf2_test . > N> =20 > N> The changes to ObsoleteFiles.inc are being committed separately as= they > N> aren't needed for the MFC to ^/stable/11, etc, if the MFC for the = tests > N> is done all in one commit. > N> =20 > N> MFC after: 2 weeks > N> X-MFC with: r313962, r313972-r313973 > N> Reviewed by: allanjude > N> Sponsored by: Dell EMC Isilon > N> Differential Revision: D9985 >=20 > This breaks buildworld for a system that doesn't have SYSDIR defined in= src.conf, > and also doesn't have /usr/src/sys. >=20 > What happens is that include path is /sys. On some systems this is > meaningful, on others not. >=20 > glebius@morannon:/usr/src/head/tests/sys/geom/class/eli:|>make > (cd /usr/src/head/tests/sys/geom/class/eli && DEPENDFILE=3D.depend.pbk= df2_test NO_SUBDIR=3D1 make -f /usr/src/head/tests/sys/geom/class/eli/Ma= kefile _RECURSING_PROGS=3Dt PROG=3Dpbkdf2_test ) > cc -O2 -pipe -I/sys -g -MD -MF.depend.pbkdf2_test.g_eli_crypto.o -M= Tg_eli_crypto.o -std=3Dgnu99 -fstack-protector-strong -Qunused-argumen= ts -c /usr/src/head/sys/geom/eli/g_eli_crypto.c -o g_eli_crypto.o > In file included from /usr/src/head/sys/geom/eli/g_eli_crypto.c:44: > /usr/include/geom/eli/g_eli.h:35:10: fatal error: 'crypto/sha2/sha256.h= ' file > not found > #include >=20 > This also breaks buildworld. >=20 I think we also need to update the mtree files, as I get this failure @ installworld: =3D=3D=3D> tests/sys/geom/class/eli (install) install -s -o root -g wheel -m 555 pbkdf2_test /usr/tests/sys/geom/class/eli/pbkdf2_test install: pbkdf2_test: No such file or directory *** Error code 71 Stop. --=20 Allan Jude --jU1Xmn5UO9Ov85T5eITs0vLeelw3ts0li-- --R1piW4I2HUtC9BGLi882l2HoSF7JcjHA3 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) iQIcBAEBAgAGBQJYyhO6AAoJEBmVNT4SmAt+HCUP/0hT7Q4dYCmxfEZrLOoouesh vSAefrbEk70n+qVpLwEZPug6y2SEsSWebMfZatUFBBCc56vCNT4PDaJ/I6bLIw/F pyyRhW1B1enBGP5J1j1Ts5NlBsudwnoGVBXvZ06/ARLu6y7LmYKKTYWOKYTMa6Gz 3ZZg4Jb5pg61al0MMN9GzlknEXVfhK5KkvLmw6Y1ocSnBpu74J3h6dSPVy+lo29y 3K3tjIPyEtILqeS6m60q7OIaT4F77jCkTqqZ8Z/ICnYgyTn9rEclM8YiO2hY6pts V0zQa0zLLdVcSW2ibGATn1BEfO9WYlAx24Zi7yc0gmlCHe55ZStozInLiRvekHtJ JiB/AXLyXmfY77ZLbY8QVVzIvnra604Bhc4CbkiV49JPpjm5jkCNOctas+8WPnmH 4YMzTYhHxeLPc44Hlxg+Zr4HUIUGD8z6XkpkUt1b4SbVYJxZWOKOb1icPS/q/u5S 3ZUwvG1JBsNhgHznbU1goNuGILl9ZA/Oso7ukHfOX1hx7UAVnvQrW9QCKTePDMNQ y6vuhJ9DLqGDMXPAnjma7EkRv8V6gtlEyYw6Lh73MVDueo5+rHbGJHrmrpX4mPb2 JRvt1YhE/QhPGBBdJZtTErdHwVEmlZ63Jkwo/5sR/n3XJhJIk+/6B0Ivy++HmlGu ZuLFF3GaC3ygvFY41Uro =rsqu -----END PGP SIGNATURE----- --R1piW4I2HUtC9BGLi882l2HoSF7JcjHA3-- From owner-svn-src-head@freebsd.org Thu Mar 16 04:32:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B65CD0D0A0 for ; Thu, 16 Mar 2017 04:32:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x230.google.com (mail-it0-x230.google.com [IPv6:2607:f8b0:4001:c0b::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E8D431FBE for ; Thu, 16 Mar 2017 04:32:55 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x230.google.com with SMTP id g138so32964595itb.0 for ; Wed, 15 Mar 2017 21:32:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=N9Zz1cgDrkqCB3NwT03UaWPdmNqrmnHCKrq2dz32rTY=; b=DgSwzZJoe8cQIRDM+Y51UJyGsuRyUm7p38whLruDYzWzFTmh4/3xMwagsUUe5zf0uw dMsKSFJHsa1xtaw1+8mqRmie2Pfem5k53iXYOlCtmIwOGdx+eoG0YHAu5CQK+aqk0m3I jFbPy/eUFpCY8uxhQpKhGuFjN4XZkejMuWoXUCk05VurcDiJU5WbX32Q6tfpXx0Hi10b ZcfokWgqGj/d4xAMKPJ/ENtrMml9UQvPAKgw4MAKtXPa2wUG04xU1uTpqzukcT1vIHKk gVqiC4Hr+g9T3S1xGXkd8DhhEZySoeBYU8v1omL/KE2usyYFtqftciWgEqg4lFgGdKZ4 YH6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=N9Zz1cgDrkqCB3NwT03UaWPdmNqrmnHCKrq2dz32rTY=; b=PdB1t3lBWbX4tjFBzvRDQbuJExZfJ5soNimc3Iaf2653VDHgmpjRFqa+Mh0LX9MaWi A0EMdeGsQuj3dFZ6wf5nm/gIVb+guW4GewNCOS5HdYkqKJbHqLCDxYTWwNSbsQidnisL qK1RTjH0mT44FEnkL6Ln4WLdalI+ILR3HQp8eVLwjW+ZUQUdBi4w6xPW+O28KUkAvdZ7 UwqCkjtO9dylyWO8VJgODMkgeVAxLAiR3LYoVjAyxHcIOr4GKrDulQeNZ8UOpH7uX2+C FBpHSs6c9E0fjgQLIBpOr+PxBB3C0mKwU7RhMurXupOLbbVXRJh0XwUaQZUq67UympJH t4bQ== X-Gm-Message-State: AFeK/H3yZI8JR4DFyanSe4iflgHbtUv+W0+vBZxWkyoCABW9l3QtZfIUwkQynwqxByEZsVZjgEnxL8mAyFutQg== X-Received: by 10.36.34.212 with SMTP id o203mr10299530ito.103.1489638775135; Wed, 15 Mar 2017 21:32:55 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.134.129 with HTTP; Wed, 15 Mar 2017 21:32:54 -0700 (PDT) X-Originating-IP: [50.253.99.174] In-Reply-To: <201703160231.v2G2VgxK082641@repo.freebsd.org> References: <201703160231.v2G2VgxK082641@repo.freebsd.org> From: Warner Losh Date: Wed, 15 Mar 2017 22:32:54 -0600 X-Google-Sender-Auth: LW1jfRqUJlExKMZbrQvAHk071NM Message-ID: Subject: Re: svn commit: r315360 - head/lib/libkvm To: Ngie Cooper Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 04:32:56 -0000 On Wed, Mar 15, 2017 at 8:31 PM, Ngie Cooper wrote: > Author: ngie > Date: Thu Mar 16 02:31:42 2017 > New Revision: 315360 > URL: https://svnweb.freebsd.org/changeset/base/315360 > > Log: > Return NULL instead of 0 on failure in _kvm_open, kvm_open{,2,files} > > This is being done for the following reasons: > - kvm_open(3), etc says they will return NULL. > - NULL by definition is (void*)0 per POSIX, but can be redefined, > depending on the compiler, etc. No, it can't. The C language requires all integral expressions that evaluate to zero to convert to the NULL pointer. This is independent of the internal representation of the NULL pointer. So this change is an NOP for all compilers. It's a good STYLE change. Warner From owner-svn-src-head@freebsd.org Thu Mar 16 04:40:09 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B275AD0D172; Thu, 16 Mar 2017 04:40:09 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A332115D; Thu, 16 Mar 2017 04:40:09 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2G4e8rG033510; Thu, 16 Mar 2017 04:40:08 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2G4e7at033496; Thu, 16 Mar 2017 04:40:07 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201703160440.v2G4e7at033496@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 16 Mar 2017 04:40:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315368 - in head/contrib/ipfilter: . iplang ipsd ipsend lib tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 04:40:09 -0000 Author: cy Date: Thu Mar 16 04:40:07 2017 New Revision: 315368 URL: https://svnweb.freebsd.org/changeset/base/315368 Log: calloc() and realloc() modernization. This commit replaces calloc calls, which called calloc() as if it were malloc() by allocating a multiple of objects as a sizeof multiplied by the number of objects. The patch rectifies this by calling calloc() as it was meant to be called. This commit also replaces realloc() with reallocarray() in a similar fashion as above. Instead of calculating the memory to reallocated (changed) by multiplying sizeof by the number of objects, the sizeof and number are passed as separate arguments to reallocarray(), letting reallocarray() do the multiplication instead. Like the calloc() adjustment above, this is approach is cleaner and more elegant than than the previous code. This has been tested on my production firewall and a laptop (also running ipfilter). Submitted by: pfg MFC after: 6 weeks Modified: head/contrib/ipfilter/ip_fil.c head/contrib/ipfilter/iplang/iplang_l.l head/contrib/ipfilter/ipsd/ipsd.c head/contrib/ipfilter/ipsd/ipsdr.c head/contrib/ipfilter/ipsend/lsock.c head/contrib/ipfilter/ipsend/sock.c head/contrib/ipfilter/lib/parsefields.c head/contrib/ipfilter/lib/parseipfexpr.c head/contrib/ipfilter/radix_ipf.c head/contrib/ipfilter/tools/ipf_y.y head/contrib/ipfilter/tools/ipfcomp.c head/contrib/ipfilter/tools/ipfstat.c Modified: head/contrib/ipfilter/ip_fil.c ============================================================================== --- head/contrib/ipfilter/ip_fil.c Thu Mar 16 03:49:06 2017 (r315367) +++ head/contrib/ipfilter/ip_fil.c Thu Mar 16 04:40:07 2017 (r315368) @@ -317,8 +317,8 @@ get_unit(name, family) } else { old_ifneta = ifneta; nifs++; - ifneta = (struct ifnet **)realloc(ifneta, - (nifs + 1) * sizeof(ifp)); + ifneta = (struct ifnet **)reallocarray(ifneta, nifs + 1, + sizeof(ifp)); if (!ifneta) { free(old_ifneta); nifs = 0; Modified: head/contrib/ipfilter/iplang/iplang_l.l ============================================================================== --- head/contrib/ipfilter/iplang/iplang_l.l Thu Mar 16 03:49:06 2017 (r315367) +++ head/contrib/ipfilter/iplang/iplang_l.l Thu Mar 16 04:40:07 2017 (r315368) @@ -195,7 +195,8 @@ void push_proto() if (!prstack) prstack = (int *)malloc(sizeof(int)); else - prstack = (int *)realloc((char *)prstack, numpr * sizeof(int)); + prstack = (int *)reallocarray((char *)prstack, numpr, + sizeof(int)); prstack[numpr - 1] = oldipproto; } Modified: head/contrib/ipfilter/ipsd/ipsd.c ============================================================================== --- head/contrib/ipfilter/ipsd/ipsd.c Thu Mar 16 03:49:06 2017 (r315367) +++ head/contrib/ipfilter/ipsd/ipsd.c Thu Mar 16 04:40:07 2017 (r315368) @@ -129,7 +129,7 @@ int detect(ip, tcp) if (++ihp->sd_cnt == ihp->sd_sz) { ihp->sd_sz += 8; - sh = realloc(sh, ihp->sd_sz * sizeof(*sh)); + sh = reallocarray(sh, ihp->sd_sz, sizeof(*sh)); ihp->sd_hit = sh; } qsort(sh, ihp->sd_cnt, sizeof(*sh), ipcmp); Modified: head/contrib/ipfilter/ipsd/ipsdr.c ============================================================================== --- head/contrib/ipfilter/ipsd/ipsdr.c Thu Mar 16 03:49:06 2017 (r315367) +++ head/contrib/ipfilter/ipsd/ipsdr.c Thu Mar 16 04:40:07 2017 (r315368) @@ -140,7 +140,7 @@ int detect(srcip, dport, date) if (++ihp->sd_cnt == ihp->sd_sz) { ihp->sd_sz += 8; - sh = realloc(sh, ihp->sd_sz * sizeof(*sh)); + sh = reallocarray(sh, ihp->sd_sz, sizeof(*sh)); ihp->sd_hit = sh; } qsort(sh, ihp->sd_cnt, sizeof(*sh), ipcmp); Modified: head/contrib/ipfilter/ipsend/lsock.c ============================================================================== --- head/contrib/ipfilter/ipsend/lsock.c Thu Mar 16 03:49:06 2017 (r315367) +++ head/contrib/ipfilter/ipsend/lsock.c Thu Mar 16 04:40:07 2017 (r315368) @@ -163,7 +163,7 @@ struct sock *find_tcp(fd, ti) return NULL; fs = p->files; - o = (struct file **)calloc(1, sizeof(*o) * (fs->count + 1)); + o = (struct file **)calloc(fs->count + 1, sizeof(*o)); if (KMCPY(o, fs->fd, (fs->count + 1) * sizeof(*o)) == -1) { fprintf(stderr, "read(%#x,%#x,%d) - fd - failed\n", Modified: head/contrib/ipfilter/ipsend/sock.c ============================================================================== --- head/contrib/ipfilter/ipsend/sock.c Thu Mar 16 03:49:06 2017 (r315367) +++ head/contrib/ipfilter/ipsend/sock.c Thu Mar 16 04:40:07 2017 (r315368) @@ -226,7 +226,7 @@ struct tcpcb *find_tcp(fd, ti) } #endif - o = (struct file **)calloc(1, sizeof(*o) * (up->u_lastfile + 1)); + o = (struct file **)calloc(up->u_lastfile + 1, sizeof(*o)); if (KMCPY(o, up->u_ofile, (up->u_lastfile + 1) * sizeof(*o)) == -1) { fprintf(stderr, "read(%#x,%#x,%d) - u_ofile - failed\n", @@ -330,7 +330,7 @@ struct tcpcb *find_tcp(tfd, ti) i = NULL; t = NULL; - o = (struct file **)calloc(1, sizeof(*o) * (fd->fd_lastfile + 1)); + o = (struct file **)calloc(fd->fd_lastfile + 1, sizeof(*o)); if (KMCPY(o, fd->fd_ofiles, (fd->fd_lastfile + 1) * sizeof(*o)) == -1) { fprintf(stderr, "read(%#lx,%#lx,%lu) - u_ofile - failed\n", Modified: head/contrib/ipfilter/lib/parsefields.c ============================================================================== --- head/contrib/ipfilter/lib/parsefields.c Thu Mar 16 03:49:06 2017 (r315367) +++ head/contrib/ipfilter/lib/parsefields.c Thu Mar 16 04:40:07 2017 (r315368) @@ -31,7 +31,7 @@ wordtab_t *parsefields(table, arg) if (fields == NULL) { fields = malloc(2 * sizeof(*fields)); } else { - fields = realloc(fields, (num + 1) * sizeof(*fields)); + fields = reallocarray(fields, num + 1, sizeof(*fields)); } if (t == NULL) { Modified: head/contrib/ipfilter/lib/parseipfexpr.c ============================================================================== --- head/contrib/ipfilter/lib/parseipfexpr.c Thu Mar 16 03:49:06 2017 (r315367) +++ head/contrib/ipfilter/lib/parseipfexpr.c Thu Mar 16 04:40:07 2017 (r315368) @@ -123,9 +123,9 @@ parseipfexpr(line, errorptr) osize = asize; asize += 4 + (items * e->ipoe_nbasearg * e->ipoe_argsize); if (oplist == NULL) - oplist = calloc(1, sizeof(int) * (asize + 2)); + oplist = calloc(asize + 2, sizeof(int)); else - oplist = realloc(oplist, sizeof(int) * (asize + 2)); + oplist = reallocarray(oplist, asize + 2, sizeof(int)); if (oplist == NULL) { error = "oplist alloc failed"; goto parseerror; Modified: head/contrib/ipfilter/radix_ipf.c ============================================================================== --- head/contrib/ipfilter/radix_ipf.c Thu Mar 16 03:49:06 2017 (r315367) +++ head/contrib/ipfilter/radix_ipf.c Thu Mar 16 04:40:07 2017 (r315368) @@ -1192,7 +1192,7 @@ buildtab(void) if (lines == 1) tab = malloc(sizeof(*tab) * 2); else - tab = realloc(tab, (lines + 1) * sizeof(*tab)); + tab = reallocarray(tab, lines + 1, sizeof(*tab)); tab[lines - 1].host = strdup(line); s = strchr(tab[lines - 1].host, '/'); *s++ = '\0'; Modified: head/contrib/ipfilter/tools/ipf_y.y ============================================================================== --- head/contrib/ipfilter/tools/ipf_y.y Thu Mar 16 03:49:06 2017 (r315367) +++ head/contrib/ipfilter/tools/ipf_y.y Thu Mar 16 04:40:07 2017 (r315368) @@ -2194,7 +2194,7 @@ char *phrase; for (i = 0, s = strtok(phrase, " \r\n\t"); s != NULL; s = strtok(NULL, " \r\n\t"), i++) { - fb = realloc(fb, (i / 4 + 1) * sizeof(*fb)); + fb = reallocarray(fb, i / 4 + 1, sizeof(*fb)); l = (u_32_t)strtol(s, NULL, 0); switch (i & 3) { Modified: head/contrib/ipfilter/tools/ipfcomp.c ============================================================================== --- head/contrib/ipfilter/tools/ipfcomp.c Thu Mar 16 03:49:06 2017 (r315367) +++ head/contrib/ipfilter/tools/ipfcomp.c Thu Mar 16 04:40:07 2017 (r315368) @@ -965,7 +965,7 @@ void printC(dir) frgroup_t *g; if (m == NULL) - m = (mc_t *)calloc(1, sizeof(*m) * FRC_MAX); + m = (mc_t *)calloc(FRC_MAX, sizeof(*m)); for (g = groups; g != NULL; g = g->fg_next) { if ((dir == 0) && ((g->fg_flags & FR_INQUE) != 0)) Modified: head/contrib/ipfilter/tools/ipfstat.c ============================================================================== --- head/contrib/ipfilter/tools/ipfstat.c Thu Mar 16 03:49:06 2017 (r315367) +++ head/contrib/ipfilter/tools/ipfstat.c Thu Mar 16 04:40:07 2017 (r315368) @@ -1422,8 +1422,8 @@ static void topipstates(saddr, daddr, sp tsentry++; if (!maxtsentries || tsentry == maxtsentries) { maxtsentries += STGROWSIZE; - tstable = realloc(tstable, - maxtsentries * sizeof(statetop_t)); + tstable = reallocarray(tstable, maxtsentries, + sizeof(statetop_t)); if (tstable == NULL) { perror("realloc"); exit(-1); From owner-svn-src-head@freebsd.org Thu Mar 16 04:44:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C22CBD0D35B; Thu, 16 Mar 2017 04:44:06 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x234.google.com (mail-pg0-x234.google.com [IPv6:2607:f8b0:400e:c05::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 839A215DF; Thu, 16 Mar 2017 04:44:06 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x234.google.com with SMTP id g2so19020449pge.3; Wed, 15 Mar 2017 21:44:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=KpzY+bgBPdTmx0I7doD8Ke/bQmFGeTez8doxBa5IwPw=; b=SDS/KOIJtpLP8Y52QlWvYEELYVaPYh9sfiMDwSsncNlz3+DSOTQyMtU9cuDwQFVQ+R qntrf9boERL7kodku7pELR/sa7VT7TkD5duS4V/TUde0C4yJSHuqaHmBIXa3K2O/yhRA J2XAVDb1Bg7FtgDXnIK5NBvBNVPOqyns3/b53N4DIzzcPUXMFTzLIf13Piw5se1LCzeP jE3Zlr7u2wFkzZLhdUNgYJg5zJiGgaL8oVtI6CresdMIHFaEn6WEduRyMYj466LVtaf9 ORtsqvbMDotnJsGHzKzWszY5YrvMNndxeQ4fsDIs2bL65SIaGrnAaDLGPk8emJVB+ehp 5Wrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=KpzY+bgBPdTmx0I7doD8Ke/bQmFGeTez8doxBa5IwPw=; b=By75b0rKAoVY/raDLer64iy+bf+ZDgd72O79JV9y1gWS0YcR7rH6ytUPz0ghtNvUtS Aar/6MDl+tDwmitqgzYFYWy62ZYrtZgv/7Z34GAKXm+VWKOwrwgbkmC5+oWA77naCvGo PExher1FXprIZYjFRNhQ3RcABKb0VNg1FErQ0dbH/gUR5IaLLN3Di5ZTSGpn3ChVPAgb PcqfhVYGULhDVimBJpZ7X6yCcEapCy89uS0nXpbwB+Yw3Bd7KrG+dSwj8e6l/+DTR1KY QSb0wnAKY8GWu91vi0LBpqA/WeChio9L1FwoTr7S87nDRp8JE3VNYqaOrxybIOTiVVIN eSnQ== X-Gm-Message-State: AFeK/H1oYu5PNAOIEGYqS4ETFTVGDnciuOeOANvgBxbr14voZxLA8WQTfc4P48spOZ8a9w== X-Received: by 10.98.66.155 with SMTP id h27mr7810097pfd.182.1489639446075; Wed, 15 Mar 2017 21:44:06 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id t70sm6889175pfe.64.2017.03.15.21.44.04 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 15 Mar 2017 21:44:05 -0700 (PDT) Subject: Re: svn commit: r315360 - head/lib/libkvm Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_4FE0695C-43BB-4832-800C-D8D5F039D0B5"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Wed, 15 Mar 2017 21:44:03 -0700 Cc: Ngie Cooper , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <58A53702-FFF6-45E7-ACCD-9B776530064E@gmail.com> References: <201703160231.v2G2VgxK082641@repo.freebsd.org> To: Warner Losh X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 04:44:06 -0000 --Apple-Mail=_4FE0695C-43BB-4832-800C-D8D5F039D0B5 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Mar 15, 2017, at 21:32, Warner Losh wrote: >=20 > On Wed, Mar 15, 2017 at 8:31 PM, Ngie Cooper wrote: >> Author: ngie >> Date: Thu Mar 16 02:31:42 2017 >> New Revision: 315360 >> URL: https://svnweb.freebsd.org/changeset/base/315360 >>=20 >> Log: >> Return NULL instead of 0 on failure in _kvm_open, kvm_open{,2,files} >>=20 >> This is being done for the following reasons: >> - kvm_open(3), etc says they will return NULL. >> - NULL by definition is (void*)0 per POSIX, but can be redefined, >> depending on the compiler, etc. >=20 > No, it can't. The C language requires all integral expressions that > evaluate to zero to convert to the NULL pointer. This is independent > of the internal representation of the NULL pointer. >=20 > So this change is an NOP for all compilers. It's a good STYLE change. Someone made an argument a few weeks ago about NULL being definable as a = non-zero value on some esoteric architectures or OSes. I agree though, this is largely stylistic/pedantic for a good cause. If = someone set NULL to something non-zero in value, they would be looking = for pain :). -Ngie --Apple-Mail=_4FE0695C-43BB-4832-800C-D8D5F039D0B5 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYyhgUAAoJEPWDqSZpMIYVu3IQAKcnuoyftDZrW4T3DVCcT36D 4vprKNb/fVJ0OH9PororOFmw9F/FEHxC4z5FF+sxMsaL9zgSrS30nO7zWpajtSid zb3tcYVGrWm5W5eXPXx0fmpNMrOOPHSSgBrQFAb9t6XNfJC8RlKITNDhMpypX6WC DOywWzW1G/LqtmMemPufw4UmQO7sjYS+gTUPzBkffGvhhjS+HNqIcpgyklBpP/li rHM+HB1flh+mpW6PUO8tdHoI1GxPvKdTpOdDFV6N4nmx4MX1AIz4hlbonG6aAjiR I6D1uzD7oEXGcvSmDriv5c4z3Dc92fZRLKnbDHOGy6P0Cqo5LozWFw2682vJX/vh H2ByhDkZGUwU5IDFnGk1/gr80t+3E0iFmjUSeK4BSkQ6KNRn80WBovLPbdG5fnrJ R44R3fYDbdYdb4FzgJu+qxsNZG7wmpDrpdFUhwBRqJLSywTW6QCySWpPvJd77YV3 KwFLDkkW+b6zaVwBML7KT5ZMIibFM89OB9mJbG/o3whUCOBqbUa0ZfRvY+oNvQIt x9Qs1rv/0e5G5BFN46Am14r5bO9BFTXRzIqMYZOGOYqsA9noJacQa5tirTpncxxO B1IyZsRgyJR50BbHBOVhmrZ5PyWGKrn+Yp9dqgJ7OyITTAcy7/xLXGpT1whwetDI HTQ+AoYgHU86iqAlQGTY =UfoL -----END PGP SIGNATURE----- --Apple-Mail=_4FE0695C-43BB-4832-800C-D8D5F039D0B5-- From owner-svn-src-head@freebsd.org Thu Mar 16 04:48:09 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C886ED0D427; Thu, 16 Mar 2017 04:48:09 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x229.google.com (mail-pg0-x229.google.com [IPv6:2607:f8b0:400e:c05::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 93DF1174A; Thu, 16 Mar 2017 04:48:09 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x229.google.com with SMTP id b129so19092897pgc.2; Wed, 15 Mar 2017 21:48:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=7wjEjhOeWp+ZyASOr2+lMJbvp4Blt1nxZh3iCCEsdSs=; b=PIC8+7+ieo7pO3ke05+GbzpYKUkx1wUmXEN9ECLbLZTfvHoST0e3lwP5HPWVxy2nzZ CJa649pJ7vVHnqICj8jdqaoNbbo7tsncLg4SYEXp833CGvDl5YG+w3B216c3QzdYWyTB XQLKDXI804SiNYnj7dZVICOacvdQ60ox0fCfo7m9qTV1e2whHP8Y/adco1dYbP8RmI6G 0xUlePZlkX9H83/DaKWEZhYjcM56xalWBLDO+6lK02aRzcbvkBE0IPDdxdES2vo3Wvsl Gj8MBcJ3peEu4+Vyrd/kpC4nIpoBBov7PL8d0IBhsQdy3sOr4yYnFQkjorpcyetUOkiS 7g5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=7wjEjhOeWp+ZyASOr2+lMJbvp4Blt1nxZh3iCCEsdSs=; b=IynnnSgn5Iu8wL+PXsQefFeMTbWjzpqq6G15rxDVBNObwUq8On4t+kLqQtplBQOrEt 2XDcKlqP4HFjqt9M6QYLa55wnByK6TWtVY8xEy7QRQxNRHeYRJcwWClU9nj7CAIMkFNm p8R70M3+JUkgt8DRkcSqPq2bLGKqPd3bUeHT+NClQmv/cQpGNWv4lXBXQZ8TQFTksC9G zBDOEE31kpZtXPs1Us6/PcuQ0rzDTZ7LNZGilSspTBrVs8ObQTcWovi0rx3cuprJSdYc 8fosCPwLzN/W0/S2YYO8iPL/Xf+m4tIAZhhJuNGLO5st5wuiQZ+YmYdRA2bGit9nzcKh zx/w== X-Gm-Message-State: AFeK/H3axljj1r48xRSILe0wK1yeTNQ/Ccpok/B4i7ne2eRZ/vC/4ttnzjAx/IzAxVQ83w== X-Received: by 10.84.224.11 with SMTP id r11mr9724315plj.130.1489639688656; Wed, 15 Mar 2017 21:48:08 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id i3sm7126235pfg.117.2017.03.15.21.48.07 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 15 Mar 2017 21:48:07 -0700 (PDT) Subject: Re: svn commit: r315230 - in head: etc/mtree tests/sys/geom tests/sys/geom/class/eli tests/sys/geom/eli Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_A1F0865A-1C89-4652-8916-7EFF15BCA470"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Wed, 15 Mar 2017 21:48:06 -0700 Cc: Ngie Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <54F7AE74-0DD8-445B-A880-28B4BAF4001F@gmail.com> References: <201703140700.v2E70MXc091919@repo.freebsd.org> <20170315052239.GC1072@FreeBSD.org> To: Allan Jude X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 04:48:09 -0000 --Apple-Mail=_A1F0865A-1C89-4652-8916-7EFF15BCA470 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 > On Mar 15, 2017, at 21:25, Allan Jude wrote: >=20 > On 2017-03-15 01:22, Gleb Smirnoff wrote: >> On Tue, Mar 14, 2017 at 07:00:22AM +0000, Ngie Cooper wrote: >> N> Author: ngie >> N> Date: Tue Mar 14 07:00:22 2017 >> N> New Revision: 315230 >> N> URL: https://svnweb.freebsd.org/changeset/base/315230 >> N> >> N> Log: >> N> Move .../sys/geom/eli/pbkdf2... to .../sys/geom/class/eli/... >> N> >> N> This change moves the tests added in r313962 to an existing = directory >> N> structure used by the geli TAP tests. It also, renames the test = from >> N> pbkdf2 to pbkdf2_test . >> N> >> N> The changes to ObsoleteFiles.inc are being committed separately = as they >> N> aren't needed for the MFC to ^/stable/11, etc, if the MFC for = the tests >> N> is done all in one commit. >> N> >> N> MFC after: 2 weeks >> N> X-MFC with: r313962, r313972-r313973 >> N> Reviewed by: allanjude >> N> Sponsored by: Dell EMC Isilon >> N> Differential Revision: D9985 >>=20 >> This breaks buildworld for a system that doesn't have SYSDIR defined = in src.conf, >> and also doesn't have /usr/src/sys. >>=20 >> What happens is that include path is /sys. On some systems this is >> meaningful, on others not. >>=20 >> glebius@morannon:/usr/src/head/tests/sys/geom/class/eli:|>make >> (cd /usr/src/head/tests/sys/geom/class/eli && = DEPENDFILE=3D.depend.pbkdf2_test NO_SUBDIR=3D1 make -f = /usr/src/head/tests/sys/geom/class/eli/Makefile _RECURSING_PROGS=3Dt = PROG=3Dpbkdf2_test ) >> cc -O2 -pipe -I/sys -g -MD -MF.depend.pbkdf2_test.g_eli_crypto.o = -MTg_eli_crypto.o -std=3Dgnu99 -fstack-protector-strong = -Qunused-arguments -c /usr/src/head/sys/geom/eli/g_eli_crypto.c -o = g_eli_crypto.o >> In file included from /usr/src/head/sys/geom/eli/g_eli_crypto.c:44: >> /usr/include/geom/eli/g_eli.h:35:10: fatal error: = 'crypto/sha2/sha256.h' file >> not found >> #include >>=20 >> This also breaks buildworld. >>=20 >=20 > I think we also need to update the mtree files, as I get this failure = @ > installworld: >=20 > =3D=3D=3D> tests/sys/geom/class/eli (install) > install -s -o root -g wheel -m 555 pbkdf2_test > /usr/tests/sys/geom/class/eli/pbkdf2_test > install: pbkdf2_test: No such file or directory > *** Error code 71 Is everything being built properly? It works for me=85 Thanks! -Ngie $ sudo rm -Rf /usr/tests/sys/geom/ $ (cd /usr/src/; sudo make hier) cd /usr/src/etc; = PATH=3D/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/us= r/bin:/usr/obj/usr/src/tmp/legacy/bin:/usr/obj/usr/src/tmp/usr/sbin:/usr/o= bj/usr/src/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin make LOCAL_MTREE=3D = distrib-dirs for file in /usr/share/doc/usd/10.exref /usr/share/doc/usd/11.edit = /usr/share/doc/usd/12.vi /usr/share/doc/usd/13.viref; do if [ -f = /${file} ]; then rm -f /${file}; fi; done mtree -deU -i -f /usr/src/etc/mtree/BSD.root.dist -p / boot/kernel: type (dir, link) mtree -deU -i -f /usr/src/etc/mtree/BSD.var.dist -p /var mtree -deU -i -f /usr/src/etc/mtree/BSD.usr.dist -p /usr mtree -deU -i -f /usr/src/etc/mtree/BSD.include.dist -p /usr/include mtree -deU -i -f /usr/src/etc/mtree/BSD.debug.dist -p /usr/lib mtree -deU -i -f /usr/src/etc/mtree/BSD.groff.dist -p /usr mtree -deU -i -f /usr/src/etc/mtree/BSD.tests.dist -p /usr/tests ./sys/geom missing (created) ./sys/geom/class missing (created) ./sys/geom/class/concat missing (created) ./sys/geom/class/eli missing (created) ./sys/geom/class/gate missing (created) ./sys/geom/class/gpt missing (created) ./sys/geom/class/mirror missing (created) ./sys/geom/class/nop missing (created) ./sys/geom/class/raid3 missing (created) ./sys/geom/class/shsec missing (created) ./sys/geom/class/stripe missing (created) ./sys/geom/class/uzip missing (created) ./sys/geom/class/uzip/etalon missing (created) mtree -deU -i -f /usr/src/etc/mtree/BSD.tests.dist -p = /usr/lib/debug//usr/tests mtree -deU -i -f /usr/src/etc/mtree/BSD.sendmail.dist -p / install -l s usr/src/sys /sys cd /usr/share/man; for mandir in man*; do install -l s ../$mandir = /usr/share/man/en.ISO8859-1/; install -l s ../$mandir = /usr/share/man/en.UTF-8/; done cd /usr/share/openssl/man; for mandir in man*; do install -l s = ../$mandir /usr/share/openssl/man/en.ISO8859-1/; done set - `grep "^[a-zA-Z]" /usr/src/etc/man.alias`; while [ $# -gt 0 ] ; = do install -l s "$2" "/usr/share/man/$1"; if [ "yes" !=3D "no" ]; then = install -l s "$2" "/usr/share/openssl/man/$1"; fi; shift; shift; = done set - `grep "^[a-zA-Z]" /usr/src/etc/nls.alias`; while [ $# -gt 0 ] ; = do install -l s "$2" "/usr/share/nls/$1"; shift; shift; done $ cd tests/sys/geom $ (cd class/eli/; make -s clean; make -s) /usr/src/sys/geom/eli/pkcs5v2.c:72:39: warning: passing 'const char *' = to parameter of type 'const uint8_t *' (aka 'const unsigned char *') = converts between pointers to integer types with different sign [-Wpointer-sign] g_eli_crypto_hmac_init(&startpoint, passphrase, = passlen); ^~~~~~~~~~ /usr/src/sys/geom/eli/g_eli.h:699:66: note: passing argument to = parameter 'hkey' here void g_eli_crypto_hmac_init(struct hmac_ctx *ctx, const uint8_t *hkey, ^ /usr/src/sys/geom/eli/pkcs5v2.c:103:55: warning: passing 'uint8_t [11]' = to parameter of type 'const char *' converts between pointers to integer = types with different sign [-Wpointer-sign] pkcs5v2_genkey(key, sizeof(key), salt, sizeof(salt), passphrase, ^~~~~~~~~~ /usr/src/sys/geom/eli/pkcs5v2.c:53:34: note: passing argument to = parameter 'passphrase' here size_t saltsize, const char *passphrase, u_int iterations) ^ 2 warnings generated. $ sudo make -s install =3D=3D=3D> class (install) =3D=3D=3D> class/concat (install) =3D=3D=3D> class/eli (install) =3D=3D=3D> class/gate (install) =3D=3D=3D> class/mirror (install) =3D=3D=3D> class/nop (install) =3D=3D=3D> class/raid3 (install) =3D=3D=3D> class/shsec (install) =3D=3D=3D> class/stripe (install) =3D=3D=3D> class/uzip (install) $ echo $? 0 $ --Apple-Mail=_A1F0865A-1C89-4652-8916-7EFF15BCA470 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYyhkHAAoJEPWDqSZpMIYVFxsP/3c8wMZ1oLwUsSvGEahmFMlN FO3aLEULUk/nicP6f8t24YTzN55KfKcG0VBJvMtuCb2HH6JTjFKnfVOXNcv7jbhc keLbYR3MV6wEvz0VmXmIbpMRvwX1P2SLHfnOQsVzcZbl/Ui4mfgLfrJ+e6iIfcW+ BxqNZVywSf9vKE+bCKithpC7dr3atozvmkddNlCy7Jqs3VJqygwXYobwlFq1b8Ul 2I/J41x7jYvHF/7OzTT5x2vMyFLfE4eGjjXXHyGlkrtazh6JUHf3TKFHxuZzUBTs QyTMTtO2wxzNSESwSuspnY0dq3yxW1EhDnn0aW0Qn3yy08Jr3SSWyfJilmerpQ9L /3RDQbRsvoJIkHtPv3/YxpNMLR706ocRS72o2PDxnpkPKrI968QNeFyzfNB2C7Rk RnV+5RPasJne6a/OirYg4RfQbXMU/l3PD3kt+sgqUVa21MrfwyClPFk2j1wFpMDB 60kcy1HxQT3jOJdWSBvl2y+LANQGKX8+eNBh3CT1fHUYSbWcUnDHEZKHBvLTj4lg ZYoyNmxzQR5UawgNFALOsxzqJanjn1g1J9pmE0NsIQJg+5osYQtf8ns2LFNh+eb9 MFdL2mOsrz9/qWzCJSy8mNec/VbomDEzHjUd7+9Qnhu97vBAIyIVPwR5nDQRPsH/ /d++PmC4A23An/HN52No =2oQv -----END PGP SIGNATURE----- --Apple-Mail=_A1F0865A-1C89-4652-8916-7EFF15BCA470-- From owner-svn-src-head@freebsd.org Thu Mar 16 04:50:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C5A1D0D4CD; Thu, 16 Mar 2017 04:50:32 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x230.google.com (mail-pf0-x230.google.com [IPv6:2607:f8b0:400e:c00::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 175A118DD; Thu, 16 Mar 2017 04:50:32 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x230.google.com with SMTP id x63so13150578pfx.2; Wed, 15 Mar 2017 21:50:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=QSuGmoM5MpDYn+ci8DSHps3DSHgn0t1F+sUbPS70NOE=; b=LIKcKlRXvmOogXBrkCGaJypt9SSKqPuPA60YHX5OfhaqcCJpyFioMb/JJTSTnfSxvP ckqkydQTBJajB1wwKct4MyQOXuVtXx3ggQaf1jE+s5Vj5WcqikZN/htrZ0z3N4XoGXQ1 BVZ949iNXQ8eNp/DASBaW4dza6LRIegD+Kxpr68+OjqifUFHIBmdAI5V9ypVk1qmmizC jawIP++gH4fx8vGrL3NMZTIPQyqxrIQuOVPx8Orgj0W0iwsJeNGlYar+qwqbVcfePLzv dupg3jOr7xyM9lJG13+TXSg8IV1DdWPO5/fQS4v6tpld9TA6ufWXDrK80Cj/mGdHkazO MCdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=QSuGmoM5MpDYn+ci8DSHps3DSHgn0t1F+sUbPS70NOE=; b=fGLAD45iHzju750ne/ikJZAHpTo1aui6hp7KqeP+9kim5p+QDhHnq+w6RJUPFmRhQR jsRrFPdRUCG218klEbgMUBNl2hRPV8cEloEmX+7fq1tX8Vya88FkUIOPOKSVRWjtqW8i giO6RnR4w7h6lVZ/v6irJgkXc03qg2CHl7ndrDviSsnhgK/NXoXFd6PuLCgegl7NdawH 2+XIj/Y2PFhXq7w2R092l1OsXFDQG5uimu4B1spbG9VUNaJ6km9H49mObISbDlF2Xju8 bqwmRJtl3kTOVSY8II1yHO+yk9CsChZyrE023987jFBTBG9/9u9zuNuwtjNEurDf44wx 5oiQ== X-Gm-Message-State: AFeK/H3814FAZveq95xILO6crMKi7rh96ceCWwj7EiZCe144wPUNgBxOE6bzMVGf30edMA== X-Received: by 10.84.229.10 with SMTP id b10mr9576313plk.148.1489639831319; Wed, 15 Mar 2017 21:50:31 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id d68sm7137926pfj.92.2017.03.15.21.50.30 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 15 Mar 2017 21:50:30 -0700 (PDT) Subject: Re: svn commit: r315230 - in head: etc/mtree tests/sys/geom tests/sys/geom/class/eli tests/sys/geom/eli Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_49F8D5CF-EAA7-499A-85AA-CD1434105B51"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <54F7AE74-0DD8-445B-A880-28B4BAF4001F@gmail.com> Date: Wed, 15 Mar 2017 21:50:29 -0700 Cc: Ngie Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <74021F66-E352-4B05-9000-2FA8682E8487@gmail.com> References: <201703140700.v2E70MXc091919@repo.freebsd.org> <20170315052239.GC1072@FreeBSD.org> <54F7AE74-0DD8-445B-A880-28B4BAF4001F@gmail.com> To: Allan Jude X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 04:50:32 -0000 --Apple-Mail=_49F8D5CF-EAA7-499A-85AA-CD1434105B51 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 > On Mar 15, 2017, at 21:48, Ngie Cooper (yaneurabeya) = wrote: >=20 >>=20 >> On Mar 15, 2017, at 21:25, Allan Jude wrote: >>=20 >> On 2017-03-15 01:22, Gleb Smirnoff wrote: >>> On Tue, Mar 14, 2017 at 07:00:22AM +0000, Ngie Cooper wrote: >>> N> Author: ngie >>> N> Date: Tue Mar 14 07:00:22 2017 >>> N> New Revision: 315230 >>> N> URL: https://svnweb.freebsd.org/changeset/base/315230 >>> N> >>> N> Log: >>> N> Move .../sys/geom/eli/pbkdf2... to .../sys/geom/class/eli/... >>> N> >>> N> This change moves the tests added in r313962 to an existing = directory >>> N> structure used by the geli TAP tests. It also, renames the test = from >>> N> pbkdf2 to pbkdf2_test . >>> N> >>> N> The changes to ObsoleteFiles.inc are being committed separately = as they >>> N> aren't needed for the MFC to ^/stable/11, etc, if the MFC for = the tests >>> N> is done all in one commit. >>> N> >>> N> MFC after: 2 weeks >>> N> X-MFC with: r313962, r313972-r313973 >>> N> Reviewed by: allanjude >>> N> Sponsored by: Dell EMC Isilon >>> N> Differential Revision: D9985 >>>=20 >>> This breaks buildworld for a system that doesn't have SYSDIR defined = in src.conf, >>> and also doesn't have /usr/src/sys. >>>=20 >>> What happens is that include path is /sys. On some systems this is >>> meaningful, on others not. >>>=20 >>> glebius@morannon:/usr/src/head/tests/sys/geom/class/eli:|>make >>> (cd /usr/src/head/tests/sys/geom/class/eli && = DEPENDFILE=3D.depend.pbkdf2_test NO_SUBDIR=3D1 make -f = /usr/src/head/tests/sys/geom/class/eli/Makefile _RECURSING_PROGS=3Dt = PROG=3Dpbkdf2_test ) >>> cc -O2 -pipe -I/sys -g -MD -MF.depend.pbkdf2_test.g_eli_crypto.o = -MTg_eli_crypto.o -std=3Dgnu99 -fstack-protector-strong = -Qunused-arguments -c /usr/src/head/sys/geom/eli/g_eli_crypto.c -o = g_eli_crypto.o >>> In file included from /usr/src/head/sys/geom/eli/g_eli_crypto.c:44: >>> /usr/include/geom/eli/g_eli.h:35:10: fatal error: = 'crypto/sha2/sha256.h' file >>> not found >>> #include >>>=20 >>> This also breaks buildworld. >>>=20 >>=20 >> I think we also need to update the mtree files, as I get this failure = @ >> installworld: >>=20 >> =3D=3D=3D> tests/sys/geom/class/eli (install) >> install -s -o root -g wheel -m 555 pbkdf2_test >> /usr/tests/sys/geom/class/eli/pbkdf2_test >> install: pbkdf2_test: No such file or directory >> *** Error code 71 >=20 > Is everything being built properly? It works for me=85 > Thanks! > -Ngie >=20 > $ sudo rm -Rf /usr/tests/sys/geom/ > $ (cd /usr/src/; sudo make hier) > cd /usr/src/etc; = PATH=3D/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/us= r/bin:/usr/obj/usr/src/tmp/legacy/bin:/usr/obj/usr/src/tmp/usr/sbin:/usr/o= bj/usr/src/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin make LOCAL_MTREE=3D = distrib-dirs > for file in /usr/share/doc/usd/10.exref /usr/share/doc/usd/11.edit = /usr/share/doc/usd/12.vi /usr/share/doc/usd/13.viref; do if [ -f = /${file} ]; then rm -f /${file}; fi; done > mtree -deU -i -f /usr/src/etc/mtree/BSD.root.dist -p / > boot/kernel: > type (dir, link) > mtree -deU -i -f /usr/src/etc/mtree/BSD.var.dist -p /var > mtree -deU -i -f /usr/src/etc/mtree/BSD.usr.dist -p /usr > mtree -deU -i -f /usr/src/etc/mtree/BSD.include.dist -p /usr/include > mtree -deU -i -f /usr/src/etc/mtree/BSD.debug.dist -p /usr/lib > mtree -deU -i -f /usr/src/etc/mtree/BSD.groff.dist -p /usr > mtree -deU -i -f /usr/src/etc/mtree/BSD.tests.dist -p /usr/tests > ./sys/geom missing (created) > ./sys/geom/class missing (created) > ./sys/geom/class/concat missing (created) > ./sys/geom/class/eli missing (created) > ./sys/geom/class/gate missing (created) > ./sys/geom/class/gpt missing (created) > ./sys/geom/class/mirror missing (created) > ./sys/geom/class/nop missing (created) > ./sys/geom/class/raid3 missing (created) > ./sys/geom/class/shsec missing (created) > ./sys/geom/class/stripe missing (created) > ./sys/geom/class/uzip missing (created) > ./sys/geom/class/uzip/etalon missing (created) > mtree -deU -i -f /usr/src/etc/mtree/BSD.tests.dist -p = /usr/lib/debug//usr/tests > mtree -deU -i -f /usr/src/etc/mtree/BSD.sendmail.dist -p / > install -l s usr/src/sys /sys > cd /usr/share/man; for mandir in man*; do install -l s ../$mandir = /usr/share/man/en.ISO8859-1/; install -l s ../$mandir = /usr/share/man/en.UTF-8/; done > cd /usr/share/openssl/man; for mandir in man*; do install -l s = ../$mandir /usr/share/openssl/man/en.ISO8859-1/; done > set - `grep "^[a-zA-Z]" /usr/src/etc/man.alias`; while [ $# -gt 0 ] ; = do install -l s "$2" "/usr/share/man/$1"; if [ "yes" !=3D "no" ]; then = install -l s "$2" "/usr/share/openssl/man/$1"; fi; shift; shift; = done > set - `grep "^[a-zA-Z]" /usr/src/etc/nls.alias`; while [ $# -gt 0 ] ; = do install -l s "$2" "/usr/share/nls/$1"; shift; shift; done > $ cd tests/sys/geom > $ (cd class/eli/; make -s clean; make -s) > /usr/src/sys/geom/eli/pkcs5v2.c:72:39: warning: passing 'const char *' = to parameter of type 'const uint8_t *' (aka 'const unsigned char *') = converts between pointers to integer types with different sign > [-Wpointer-sign] > g_eli_crypto_hmac_init(&startpoint, passphrase, = passlen); > ^~~~~~~~~~ > /usr/src/sys/geom/eli/g_eli.h:699:66: note: passing argument to = parameter 'hkey' here > void g_eli_crypto_hmac_init(struct hmac_ctx *ctx, const uint8_t *hkey, > ^ > /usr/src/sys/geom/eli/pkcs5v2.c:103:55: warning: passing 'uint8_t = [11]' to parameter of type 'const char *' converts between pointers to = integer types with different sign [-Wpointer-sign] > pkcs5v2_genkey(key, sizeof(key), salt, sizeof(salt), = passphrase, > ^~~~~~~~~~ > /usr/src/sys/geom/eli/pkcs5v2.c:53:34: note: passing argument to = parameter 'passphrase' here > size_t saltsize, const char *passphrase, u_int iterations) > ^ > 2 warnings generated. > $ sudo make -s install > =3D=3D=3D> class (install) > =3D=3D=3D> class/concat (install) > =3D=3D=3D> class/eli (install) > =3D=3D=3D> class/gate (install) > =3D=3D=3D> class/mirror (install) > =3D=3D=3D> class/nop (install) > =3D=3D=3D> class/raid3 (install) > =3D=3D=3D> class/shsec (install) > =3D=3D=3D> class/stripe (install) > =3D=3D=3D> class/uzip (install) > $ echo $? > 0 > $ For reference, here=92s the revision I=92m on: $ svnversion 315340 Thanks! -Ngie --Apple-Mail=_49F8D5CF-EAA7-499A-85AA-CD1434105B51 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYyhmVAAoJEPWDqSZpMIYV8XkQALQ/QTayrYaQPxBRInT5gsVF EFgD2C8I0IL61RQWCFYRAVryiEKrTHxZHNY663RdufAhLAA0hl3A/CXSyJRu79f6 ipt1HRaTOS0dq3tNsxxX6PszEH8TKlVKXaCpueZeJiaCN+9BlCIGGbI3QzWvdEtt 7xCMgLdGZb6XxgPcLOyGo41xk2QCLcq1QbY3HEDV+n7tpqxBlu2DfwdcgInPo6p9 d7y2+gh6aJz+czsNSmfWB4sch8siseW6U7bElsI4xSzJ2sPoFzRnMOmuza7JUWbU 8L8HC169eqxJZPBCrvxeDZQDoRxq2lfZYiCesLgZTtuxBhz2K+7TQFInFVmuhAhu mHQIRjCD3JX9uO/i7rlwpz011jTamVBmDlNPEah/D+piLWuoFluSJdu3wzk2WviZ 98CROu8sMK9EGtD+2BP5J7Hq7dKZ4s2/Xzcupf0SisXOpSWXxgXqhk7AUMkuUzpu dnWQ7BWZT7nR+WFNuCD2v1O6mZPgvrA6r3g0wbFYnlH2AEThr69cVBT7o9ERbwdp BH2kleouRZ4MxMZg8KOjDFy1yxi/ZSXDInWH7rVHG5rbgMuJD2Br1yUOyfJwnKMR k+3KYyuwRyeFiD3cv0JPIXH4snDEa2CFbGI00ErfweTAU+hjmaGaPdiUyXxiaNL2 EmADWycrkVb3iOl05rXF =/Xq2 -----END PGP SIGNATURE----- --Apple-Mail=_49F8D5CF-EAA7-499A-85AA-CD1434105B51-- From owner-svn-src-head@freebsd.org Thu Mar 16 04:53:48 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B694D0D708 for ; Thu, 16 Mar 2017 04:53:48 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x229.google.com (mail-it0-x229.google.com [IPv6:2607:f8b0:4001:c0b::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 431CF1D6B for ; Thu, 16 Mar 2017 04:53:48 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x229.google.com with SMTP id m27so1312833iti.1 for ; Wed, 15 Mar 2017 21:53:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=DZgDUiyaE1JZ8UvvZlSB9MQVvhGjJ4LjuGYPFoakIx8=; b=BTCa7rVke+RgKWDdvHynA4KVtRnWomM242tCKMqF3ah6OroFmKer5wh04ykXycUiYS 92mOGi2PB7Vivq4BUzAYVXJJcH8E1reRS17F2Bf1gp7HG/0cWGFr2pRMqWcUmLSyQUVW WeHI41weZWPMtqt5VRh9V7YwJ1V8UYiOkOOKgMTTJJfSRzl4O+VSvU1kOWFQOUzcFVIk LmKmxoArnouSaVwZUWlYjAZnZcaq1V86NKEH/mGy3c89IIrHDYIFNEZOA+dwMottd+Fl 4YM9WPhb1o4qaVYFH+dlA711k8eibhIqSM+sM+fRUbXJL42b3YH+lJehTqqRCqyF2sCD hXfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=DZgDUiyaE1JZ8UvvZlSB9MQVvhGjJ4LjuGYPFoakIx8=; b=RxvKrlt8zn33SSONqwzHrf9XOglE4c7DWKaBcJs6BweWwLGpSTDYG1Ds/vI4ECrwcO sk5GyCK9X7SjEG1Jr18z8qrR8BBoTfkvzqq5YX9RfqPA/+MKwUyJ75k3RYQcHv4B/jQ+ 9Nk3Ai4G9aO+M8gtcElJ75obltJkk9szb8fZIbNjCXRAAeyj1zSv/rom8pm6gxWTJAJ7 AhtPoaJWZk/zuhwPxUZa7ZJhwboKaLSI2AJHD/3eBIi8xzoJ2qMYz3ijn1C3SjnzzLPC fKfOPAOvbgwcvU4OSotkdpuB/YhS3un9z6ZAC5Bq0PQgGrABV6+ytqj9ae8u5aXPrjmk 9W9g== X-Gm-Message-State: AFeK/H25P5qnOm2Cs3Ry8kfTU04mlfr7gyxxBx/n9KqxzTaTy6X08ff1pbhhE9rXSIEUkok6HPg8Am6w4VMZVQ== X-Received: by 10.36.147.71 with SMTP id y68mr8197697itd.85.1489640027587; Wed, 15 Mar 2017 21:53:47 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.134.129 with HTTP; Wed, 15 Mar 2017 21:53:47 -0700 (PDT) X-Originating-IP: [50.253.99.174] In-Reply-To: <58A53702-FFF6-45E7-ACCD-9B776530064E@gmail.com> References: <201703160231.v2G2VgxK082641@repo.freebsd.org> <58A53702-FFF6-45E7-ACCD-9B776530064E@gmail.com> From: Warner Losh Date: Wed, 15 Mar 2017 22:53:47 -0600 X-Google-Sender-Auth: 2EdLVEecw7Wp3YklOT5VFirH7xM Message-ID: Subject: Re: svn commit: r315360 - head/lib/libkvm To: "Ngie Cooper (yaneurabeya)" Cc: Ngie Cooper , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 04:53:48 -0000 On Wed, Mar 15, 2017 at 10:44 PM, Ngie Cooper (yaneurabeya) wrote: > >> On Mar 15, 2017, at 21:32, Warner Losh wrote: >> >> On Wed, Mar 15, 2017 at 8:31 PM, Ngie Cooper wrote: >>> Author: ngie >>> Date: Thu Mar 16 02:31:42 2017 >>> New Revision: 315360 >>> URL: https://svnweb.freebsd.org/changeset/base/315360 >>> >>> Log: >>> Return NULL instead of 0 on failure in _kvm_open, kvm_open{,2,files} >>> >>> This is being done for the following reasons: >>> - kvm_open(3), etc says they will return NULL. >>> - NULL by definition is (void*)0 per POSIX, but can be redefined, >>> depending on the compiler, etc. >> >> No, it can't. The C language requires all integral expressions that >> evaluate to zero to convert to the NULL pointer. This is independent >> of the internal representation of the NULL pointer. >> >> So this change is an NOP for all compilers. It's a good STYLE change. > > Someone made an argument a few weeks ago about NULL being definable as a non-zero value on some esoteric architectures or OSes. No. That's confused. NULL must always be 0. A conversion between 0 and a pointer always must give a null-pointer. Always. You can't defined NULL to -1 ever. Even if that happens to be the binary representation of a NULL pointer, it must be 0. > I agree though, this is largely stylistic/pedantic for a good cause. If someone set NULL to something non-zero in value, they would be looking for pain :). You can never set NULL to non-zero integral value (possibly with a cast). You can have the internal representation have non-zero bits, but the compiler must hide that. This does mean that M_ZERO and calloc() won't set pointers to null pointers on such architectures, but this 0 that you replaced is completely safe. I can provide references to the appropriate standards. I made the same point when someone made that (incorrect) argument. From owner-svn-src-head@freebsd.org Thu Mar 16 04:55:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3FCAD0D7A5; Thu, 16 Mar 2017 04:55:06 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x231.google.com (mail-pf0-x231.google.com [IPv6:2607:f8b0:400e:c00::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AE3C51EC2; Thu, 16 Mar 2017 04:55:06 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x231.google.com with SMTP id v190so18596082pfb.1; Wed, 15 Mar 2017 21:55:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=veJhJ4aHWBusM41T0DvdEwDGcZjikpwIj6YIR9xd8XY=; b=h3t0fOoR+sjgOFmQHdsgW+Q7QgaQd1a8xXhNCcXZQQGeNOBtGHbz29tJPn5BhX+Sv6 KuHjADV7RQ9XAmLtQNHmHiqR2fr6RglB8ys+rjCObAg+dwB6Hp8OrW8CWRI2Sj588Ys/ d6GOZzc6BKBVqXMLUB1F5ZmRHLefa1t6XWwreiOF6gf4oM7l8SsiEvMH2aCGwAM25qao XT+/DtmNHHqtfy7Tp7xxkk28rj2ymMTlAd+xEBmdcIA1L8zIBkGnY0Wj3ZNHzu/Nx8HR BQ08a6UL1FH8WYSS6vUQlX4pZG3nSr0dn/B7XxCMf+xbEjrwmUVBikEHNWZtNai/5vzF vCvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=veJhJ4aHWBusM41T0DvdEwDGcZjikpwIj6YIR9xd8XY=; b=j7onDfeIQ1cl6bfcTJFcQr0OEXnl4GX/ow+yDHeby/8rhx+t8lPY2xrMA1/HU4jw6v osVTzyv7G6efZ7oIR4Ei/3IVXndJIi14s+nF8Ax3TFVZWV9dLHoZ+CBbskEbHiX6FMCK zRbdrB+iVvlcH71SRDyhS0Lp1ZpJHYyAmVY95PQmMqNwWwUVjgYXMu6tN9zJAMEHiptz EKE+Y9GR6HUTicvhERfaE3/4o8es8QOnmobWz3hyYl3TMyOrpap4gqDGUzbN/z6Cc54y 47fsDyj1jBPmIQjVRXDA2hGq8CjVrOl7hEpGYSxexkdLggd24c2MjBhr4SuEqaKhSMrD +Nfg== X-Gm-Message-State: AFeK/H2aAd8uR1fxvk8dzO1lmprhJE7pl7G44KZ02YRwevAbH6dijvUs93s3pmEAciadKg== X-Received: by 10.98.75.28 with SMTP id y28mr8143253pfa.157.1489640106269; Wed, 15 Mar 2017 21:55:06 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id v4sm7177883pfb.36.2017.03.15.21.55.05 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 15 Mar 2017 21:55:05 -0700 (PDT) Subject: Re: svn commit: r315360 - head/lib/libkvm Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_225A83DC-6257-47B4-9AED-1F841C82B4B4"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Wed, 15 Mar 2017 21:55:04 -0700 Cc: Ngie Cooper , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <09597F88-6F43-4A9C-B89B-6B634928C7FC@gmail.com> References: <201703160231.v2G2VgxK082641@repo.freebsd.org> <58A53702-FFF6-45E7-ACCD-9B776530064E@gmail.com> To: Warner Losh X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 04:55:07 -0000 --Apple-Mail=_225A83DC-6257-47B4-9AED-1F841C82B4B4 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Mar 15, 2017, at 21:53, Warner Losh wrote: >=20 > On Wed, Mar 15, 2017 at 10:44 PM, Ngie Cooper (yaneurabeya) > wrote: >>=20 >>> On Mar 15, 2017, at 21:32, Warner Losh wrote: >>>=20 >>> On Wed, Mar 15, 2017 at 8:31 PM, Ngie Cooper = wrote: >>>> Author: ngie >>>> Date: Thu Mar 16 02:31:42 2017 >>>> New Revision: 315360 >>>> URL: https://svnweb.freebsd.org/changeset/base/315360 >>>>=20 >>>> Log: >>>> Return NULL instead of 0 on failure in _kvm_open, = kvm_open{,2,files} >>>>=20 >>>> This is being done for the following reasons: >>>> - kvm_open(3), etc says they will return NULL. >>>> - NULL by definition is (void*)0 per POSIX, but can be redefined, >>>> depending on the compiler, etc. >>>=20 >>> No, it can't. The C language requires all integral expressions that >>> evaluate to zero to convert to the NULL pointer. This is independent >>> of the internal representation of the NULL pointer. >>>=20 >>> So this change is an NOP for all compilers. It's a good STYLE = change. >>=20 >> Someone made an argument a few weeks ago about NULL being definable = as a non-zero value on some esoteric architectures or OSes. >=20 > No. That's confused. NULL must always be 0. A conversion between 0 and > a pointer always must give a null-pointer. Always. You can't defined > NULL to -1 ever. Even if that happens to be the binary representation > of a NULL pointer, it must be 0. >=20 >> I agree though, this is largely stylistic/pedantic for a good cause. = If someone set NULL to something non-zero in value, they would be = looking for pain :). >=20 > You can never set NULL to non-zero integral value (possibly with a > cast). You can have the internal representation have non-zero bits, > but the compiler must hide that. >=20 > This does mean that M_ZERO and calloc() won't set pointers to null > pointers on such architectures, but this 0 that you replaced is > completely safe. >=20 > I can provide references to the appropriate standards. I made the same > point when someone made that (incorrect) argument. No worries =E2=80=94 I=E2=80=99ll take your word :). Thanks :)! -Ngie --Apple-Mail=_225A83DC-6257-47B4-9AED-1F841C82B4B4 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYyhqoAAoJEPWDqSZpMIYVfroP/A7TCDC5ls3ntSS+3uMzN04S Q+4F1clYkgBCz0/T3WHCRixz85qyLUtCK1OS+nTp/HKu8M4N7ffS4Dw49lj+wWt1 Hm+HcGSWmupgwDSSZKRvtTZDP5zOse3tYbC+KR4PmNFtC5kNk7t2dA35RFQU4KdZ dbNnfpPC1I4+YoZ5pwjwTKKnFy9Slm1zaeNPZWNqE+OsUX2DBZLRbrePXbJPx4mb QwmDKcjEcUduRURwtYzlhzMmd0nL6OcGInQmZecLbOQ3AAiLXr2HcxGctZoJbPLe mzrhJIE55m/foQisKruxNVD/UH3k9SuxfvNSQeJwiD6rISiQX+pC6Jyl+ukcEDNA 3qa+FxUE4LULS7OgXYBh+wwNtM1+VBC9LkXBC7fMlcO55iy+dOgREqg0HuumHfTZ RjAQG2CD61oJjwiR1YnrQ0/s5gstnbacCHyAjmFvsxSvtHtl11b9585s9eXGFu33 lOcSRttPLDyzamaT1AyogDxJd1pjr7q3e/fsbtDUfEIrsmVR36sh7hMNIrSIg9qt wXcSIO+/gaA1MePOPggidOw4suwVKXLh+OrsCSo0Z2RkxginNLeLx1e4Oxtu4V3Y 21DlTgSDzpBZ4EwoltYz0Hkx47h8m23YgrAyujSp7DStPTehzTzTpnOrynZHsqoX 7Qw1QlXgUudPcyPccP50 =yg0I -----END PGP SIGNATURE----- --Apple-Mail=_225A83DC-6257-47B4-9AED-1F841C82B4B4-- From owner-svn-src-head@freebsd.org Thu Mar 16 05:10:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D0C43D0DCFC; Thu, 16 Mar 2017 05:10:46 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 64EA115BE; Thu, 16 Mar 2017 05:10:46 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-wm0-f48.google.com with SMTP id n11so102762816wma.1; Wed, 15 Mar 2017 22:10:46 -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:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=m38EyLZTxBOyKZvJE0VQYw8LF9gcPglQrFgvsoOO+dE=; b=RhvbcxMLf4shK6RaHvX5VpZ+IjtpQoF8L2z+31muDmjPA2gu0NDZ6LHP3/rUWyXJrE VKJ/aavtxV6qpDUxr69JzVC9Zf8/AIf8wzk02TjYT6f4ERjtchy1GjTTEgH9GOm3eV4o pt+FM5uuMV48n2ci3pPiraLklo4sgJBJcECL8RVoEo58GhotE0eT9g4ljdXkHW0Q0e9N ES/cZK306khYaHrRQpYxE8w2Bg/0y0yFOKEQLG/GuDlm8BNLMtXOzltQa3SHO4wN5JgG XYYzJ4B3o4xQYw077NIoAo35vsq7l4+BUaez2BXuAcpAdwXXl/iCDhiLaRK3RaGIkX1k FpFA== X-Gm-Message-State: AFeK/H1cHEv+ZQdk/vegU5DZuX+wh5Sx1x9iR0hlZyFB05syPA4FP0VnYa4q/QI97rvUwg== X-Received: by 10.28.4.10 with SMTP id 10mr4636985wme.124.1489641043313; Wed, 15 Mar 2017 22:10:43 -0700 (PDT) Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com. [74.125.82.44]) by smtp.gmail.com with ESMTPSA id 53sm4700640wrt.52.2017.03.15.22.10.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Mar 2017 22:10:43 -0700 (PDT) Received: by mail-wm0-f44.google.com with SMTP id n11so102762683wma.1; Wed, 15 Mar 2017 22:10:43 -0700 (PDT) X-Received: by 10.28.154.14 with SMTP id c14mr22123664wme.75.1489641043048; Wed, 15 Mar 2017 22:10:43 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.80.169.4 with HTTP; Wed, 15 Mar 2017 22:10:42 -0700 (PDT) In-Reply-To: References: <201703160231.v2G2VgxK082641@repo.freebsd.org> <58A53702-FFF6-45E7-ACCD-9B776530064E@gmail.com> From: Conrad Meyer Date: Wed, 15 Mar 2017 22:10:42 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r315360 - head/lib/libkvm To: Warner Losh Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 05:10:46 -0000 I don't have much to add. Warner is totally correct here. It is a (good) style cleanup with no functional change. Let's leave it alone. Thanks, Conrad On Wed, Mar 15, 2017 at 9:53 PM, Warner Losh wrote: > On Wed, Mar 15, 2017 at 10:44 PM, Ngie Cooper (yaneurabeya) > wrote: >> >>> On Mar 15, 2017, at 21:32, Warner Losh wrote: >>> >>> On Wed, Mar 15, 2017 at 8:31 PM, Ngie Cooper wrote: >>>> Author: ngie >>>> Date: Thu Mar 16 02:31:42 2017 >>>> New Revision: 315360 >>>> URL: https://svnweb.freebsd.org/changeset/base/315360 >>>> >>>> Log: >>>> Return NULL instead of 0 on failure in _kvm_open, kvm_open{,2,files} >>>> >>>> This is being done for the following reasons: >>>> - kvm_open(3), etc says they will return NULL. >>>> - NULL by definition is (void*)0 per POSIX, but can be redefined, >>>> depending on the compiler, etc. >>> >>> No, it can't. The C language requires all integral expressions that >>> evaluate to zero to convert to the NULL pointer. This is independent >>> of the internal representation of the NULL pointer. >>> >>> So this change is an NOP for all compilers. It's a good STYLE change. >> >> Someone made an argument a few weeks ago about NULL being definable as a non-zero value on some esoteric architectures or OSes. > > No. That's confused. NULL must always be 0. A conversion between 0 and > a pointer always must give a null-pointer. Always. You can't defined > NULL to -1 ever. Even if that happens to be the binary representation > of a NULL pointer, it must be 0. > >> I agree though, this is largely stylistic/pedantic for a good cause. If someone set NULL to something non-zero in value, they would be looking for pain :). > > You can never set NULL to non-zero integral value (possibly with a > cast). You can have the internal representation have non-zero bits, > but the compiler must hide that. > > This does mean that M_ZERO and calloc() won't set pointers to null > pointers on such architectures, but this 0 that you replaced is > completely safe. > > I can provide references to the appropriate standards. I made the same > point when someone made that (incorrect) argument. > From owner-svn-src-head@freebsd.org Thu Mar 16 05:13:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A705D0E002; Thu, 16 Mar 2017 05:13:41 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB1F51B32; Thu, 16 Mar 2017 05:13:40 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id B655210A7B9; Thu, 16 Mar 2017 01:13:32 -0400 (EDT) From: John Baldwin To: Kristof Provost Cc: Gleb Smirnoff , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r315136 - head/sys/netpfil/pf Date: Wed, 15 Mar 2017 22:10:40 -0700 Message-ID: <2786760.AftPCYT2ud@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <00566E96-2330-4354-9095-6D8F77C3AB26@FreeBSD.org> References: <201703120542.v2C5gvM4075391@repo.freebsd.org> <1803226.Igex2bR0P8@ralph.baldwin.cx> <00566E96-2330-4354-9095-6D8F77C3AB26@FreeBSD.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Thu, 16 Mar 2017 01:13:32 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 05:13:41 -0000 On Thursday, March 16, 2017 11:32:38 AM Kristof Provost wrote: > On 15 Mar 2017, at 15:45, John Baldwin wrote: > > You are ignoring interrupts and preemption. Suppose you get an=20 > > interrupt > > after 'wakeup_one(pf_purge_thread)' and before 'tsleep(..., 0)' in > > pf_unload(). If the interrupt preempts and results in the purge=20= > > thread > > running and issuing its wakeup before the thread executing pf_unloa= d() > > resumes, then eventually when pf_unload() resumes it will do a=20 > > tsleep() with > > no timeout that will never be awoken. > > > Thank you for the thorough explanation. I=E2=80=99ll work on a fix an= d post it=20 > for > review as soon as I can. >=20 > > You obviously didn't test this in a debug kernel since there is a=20= > > KASSERT > > explicitly to catch obvious tsleep races in _sleep(): > > > > KASSERT(sbt !=3D 0 || mtx_owned(&Giant) || lock !=3D NULL, > > ("sleeping without a lock")); > > > I=E2=80=99m sure I did test this with both INVARIANTS and WITNESS ena= bled. > Is Giant held during module load/unload? Oh fooey, it is. :-P That's one of the few holdouts is peeling Giant off of that, but my apologies as that would indeed prevent this KASSERT= from firing for module load/unload. --=20 John Baldwin From owner-svn-src-head@freebsd.org Thu Mar 16 05:44:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42978D0E7F7; Thu, 16 Mar 2017 05:44:18 +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 mx1.freebsd.org (Postfix) with ESMTPS id 05146177D; Thu, 16 Mar 2017 05:44:17 +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 v2G5iHJW061605; Thu, 16 Mar 2017 05:44:17 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2G5iHol061604; Thu, 16 Mar 2017 05:44:17 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201703160544.v2G5iHol061604@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 16 Mar 2017 05:44:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315370 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 05:44:18 -0000 Author: delphij Date: Thu Mar 16 05:44:16 2017 New Revision: 315370 URL: https://svnweb.freebsd.org/changeset/base/315370 Log: The adj_free and max_free values of new_entry will be calculated and assigned by subsequent vm_map_entry_link(), therefore, remove the pointless copying. Submitted by: alc MFC after: 3 days Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Thu Mar 16 04:58:12 2017 (r315369) +++ head/sys/vm/vm_map.c Thu Mar 16 05:44:16 2017 (r315370) @@ -3456,8 +3456,6 @@ vmspace_fork(struct vmspace *vm1, vm_oof new_entry->start = old_entry->start; new_entry->end = old_entry->end; new_entry->avail_ssize = old_entry->avail_ssize; - new_entry->adj_free = old_entry->adj_free; - new_entry->max_free = old_entry->max_free; new_entry->eflags = old_entry->eflags & ~(MAP_ENTRY_USER_WIRED | MAP_ENTRY_IN_TRANSITION | MAP_ENTRY_VN_WRITECNT); From owner-svn-src-head@freebsd.org Thu Mar 16 06:20:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43E01D0E892; Thu, 16 Mar 2017 06:20:41 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id CC9A01F76; Thu, 16 Mar 2017 06:20:40 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id AA0C21007E1; Thu, 16 Mar 2017 17:20:38 +1100 (AEDT) Date: Thu, 16 Mar 2017 17:20:37 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Ravi Pokala cc: Bruce Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r314646 - head/sys/dev/syscons In-Reply-To: Message-ID: <20170316165626.F2172@besplex.bde.org> References: <201703040847.v248lVZS064744@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=KeqiiUQD c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=PK28YiDChQQnVCYcIGkA:9 a=7Ke2wKcxxGIwSC4K:21 a=elx9iTffSvj_Y1C8:21 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 06:20:41 -0000 On Tue, 14 Mar 2017, Ravi Pokala wrote: > This breaks all sparc64 kernconfs. (And no, this is *not* fixed by r314997.) > > --- syscons.o --- > cc1: warnings being treated as errors > /usr/home/rpokala/freebsd/clean/base/head/sys/dev/syscons/syscons.c:261: warning: 'ec_scroffset' defined but not used > /usr/home/rpokala/freebsd/clean/base/head/sys/dev/syscons/syscons.c:269: warning: 'fake_main_console' defined but not used > *** [syscons.o] Error code 1 > > -----Original Message----- > [Lost to top posting] Oops. I tried to do minimal ifdefs without leaving anything unused. I'm testing the following more elaborate patch. It reduces initialization hacks and finds the frame buffer in a more portable way. scr and its scr.vtb_buffer are apparently just optimizations for x86 only, but they are not ifdefed away on other arches except sparc64. They are used on all arches expect sparc64 for preserving the initial screen, which I recently fixed on x86. I doubt that this actually works except on x86, but if it does then ec_putc() should work too (after cninit()). This depends on the frame buffer address main_console.sc->adp->va_window being a mapped virtual address at the base of the frame buffer, with no offsets, and not needing bus_space to address it, and characters in CGA text encoding. I think it often points to pixels, and that is the least of the problems. In graphics mode, ec_putc() doesn't work, but fails harmlessly (just returns). Preserving the initial screen doesn't check, but copies garbage from the screen to a temporary buffer which is supposed to be converted to history later, but history is text mode so the copy can't be converted and might be copied directly, giving garbage in the history buffer. That is if the mapping is actually to the screen. If not, reading garbage might crash but is otherwise harmless. Writing to a garbage address is more dangerous. This version might be too successful in finding text mode but a garbage address. Please check it at runtime. I think it will usually find graphics mode and do nothing. X Index: syscons.c X =================================================================== X --- syscons.c (revision 315183) X +++ syscons.c (working copy) X @@ -260,40 +260,36 @@ X X static u_int ec_scroffset; X X -/* X - * Fake enough of main_console for ec_putc() to work very early on x86 if X - * the kernel starts in normal color text mode. On non-x86, scribbling X - * to the x86 normal color text frame buffer's addresses is unsafe, so X - * set (likely non-fake) graphics mode to get a null initial ec_putc(). X - */ X -static scr_stat fake_main_console = { X -#ifndef __sparc64__ X - .scr.vtb_buffer = 0xb8000, X -#endif X - .xsize = 80, X - .ysize = 25, X -#if !defined(__amd64__) && !defined(__i386__) X - .status = GRAPHICS_MODE, X -#endif X -}; X - X -#define main_console (sc_console == NULL ? fake_main_console : main_console) X - X static void X ec_putc(int c) X { X -#ifndef __sparc64__ X + uintptr_t fb; X u_short *scrptr; X u_int ind; X int attr, column, mysize, width, xsize, yborder, ysize; X X - if (main_console.status & GRAPHICS_MODE || X - c < 0 || c > 0xff || c == '\a') X + if (c < 0 || c > 0xff || c == '\a') X return; X - xsize = main_console.xsize; X - ysize = main_console.ysize; X + if (sc_console == NULL) { X +#if !defined(__amd64__) && !defined(__i386__) X + return; X +#endif X + /* X + * This is enough for ec_putc() to work very early on x86 X + * if the kernel starts in normal color text mode. X + */ X + fb = 0xb8000; X + xsize = 80; X + ysize = 25; X + } else { X + if (main_console.status & GRAPHICS_MODE) X + return; X + fb = main_console.sc->adp->va_window; X + xsize = main_console.xsize; X + ysize = main_console.ysize; X + } X yborder = ysize / 5; X - scrptr = (u_short *)main_console.scr.vtb_buffer + xsize * yborder; X + scrptr = (u_short *)(void *)fb + xsize * yborder; X mysize = xsize * (ysize - 2 * yborder); X do { X ind = ec_scroffset; X @@ -314,11 +310,8 @@ X do X scrptr[ind++ % mysize] = (attr << 8) | c; X while (--width != 0); X -#endif /* !__sparc64__ */ X } X X -#undef main_console X - X int X sc_probe_unit(int unit, int flags) X { From owner-svn-src-head@freebsd.org Thu Mar 16 07:40:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD61FD0F510; Thu, 16 Mar 2017 07:40:34 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 932DE14A7; Thu, 16 Mar 2017 07:40:34 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2G7eXnZ008214; Thu, 16 Mar 2017 07:40:33 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2G7eXXI008213; Thu, 16 Mar 2017 07:40:33 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201703160740.v2G7eXXI008213@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Thu, 16 Mar 2017 07:40:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315390 - head/sys/dev/syscons X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 07:40:35 -0000 Author: bde Date: Thu Mar 16 07:40:33 2017 New Revision: 315390 URL: https://svnweb.freebsd.org/changeset/base/315390 Log: The previous fix didn't ifdef out enough for sparc64 to actually work. Fix this by using more dynamic initialization with simpler ifdefs for the machine dependencies. Find a frame buffer address in a more portable way that at least compiles on sparc64. Modified: head/sys/dev/syscons/syscons.c Modified: head/sys/dev/syscons/syscons.c ============================================================================== --- head/sys/dev/syscons/syscons.c Thu Mar 16 07:20:32 2017 (r315389) +++ head/sys/dev/syscons/syscons.c Thu Mar 16 07:40:33 2017 (r315390) @@ -260,40 +260,36 @@ static struct cdevsw consolectl_devsw = static u_int ec_scroffset; -/* - * Fake enough of main_console for ec_putc() to work very early on x86 if - * the kernel starts in normal color text mode. On non-x86, scribbling - * to the x86 normal color text frame buffer's addresses is unsafe, so - * set (likely non-fake) graphics mode to get a null initial ec_putc(). - */ -static scr_stat fake_main_console = { -#ifndef __sparc64__ - .scr.vtb_buffer = 0xb8000, -#endif - .xsize = 80, - .ysize = 25, -#if !defined(__amd64__) && !defined(__i386__) - .status = GRAPHICS_MODE, -#endif -}; - -#define main_console (sc_console == NULL ? fake_main_console : main_console) - static void ec_putc(int c) { -#ifndef __sparc64__ + uintptr_t fb; u_short *scrptr; u_int ind; int attr, column, mysize, width, xsize, yborder, ysize; - if (main_console.status & GRAPHICS_MODE || - c < 0 || c > 0xff || c == '\a') + if (c < 0 || c > 0xff || c == '\a') return; - xsize = main_console.xsize; - ysize = main_console.ysize; + if (sc_console == NULL) { +#if !defined(__amd64__) && !defined(__i386__) + return; +#endif + /* + * This is enough for ec_putc() to work very early on x86 + * if the kernel starts in normal color text mode. + */ + fb = 0xb8000; + xsize = 80; + ysize = 25; + } else { + if (main_console.status & GRAPHICS_MODE) + return; + fb = main_console.sc->adp->va_window; + xsize = main_console.xsize; + ysize = main_console.ysize; + } yborder = ysize / 5; - scrptr = (u_short *)main_console.scr.vtb_buffer + xsize * yborder; + scrptr = (u_short *)(void *)fb + xsize * yborder; mysize = xsize * (ysize - 2 * yborder); do { ind = ec_scroffset; @@ -314,11 +310,8 @@ ec_putc(int c) do scrptr[ind++ % mysize] = (attr << 8) | c; while (--width != 0); -#endif /* !__sparc64__ */ } -#undef main_console - int sc_probe_unit(int unit, int flags) { From owner-svn-src-head@freebsd.org Thu Mar 16 08:29:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1760CD0E4EB for ; Thu, 16 Mar 2017 08:29:21 +0000 (UTC) (envelope-from junchoon@dec.sakura.ne.jp) Received: from dec.sakura.ne.jp (dec.sakura.ne.jp [210.188.226.8]) (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 D1267107F; Thu, 16 Mar 2017 08:29:20 +0000 (UTC) (envelope-from junchoon@dec.sakura.ne.jp) Received: from fortune.joker.local (123-48-19-110.dz.commufa.jp [123.48.19.110]) (authenticated bits=0) by dec.sakura.ne.jp (8.15.2/8.15.2/[SAKURA-WEB]/20080708) with ESMTPA id v2G8TCEp064450; Thu, 16 Mar 2017 17:29:12 +0900 (JST) (envelope-from junchoon@dec.sakura.ne.jp) Date: Thu, 16 Mar 2017 17:29:11 +0900 From: Tomoaki AOKI To: svn-src-head@freebsd.org Cc: delphij@FreeBSD.org Subject: Re: svn commit: r315370 - head/sys/vm Message-Id: <20170316172911.8012ee4dd86e2ed6208cc468@dec.sakura.ne.jp> Organization: Junchoon corps X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.29; amd64-portbld-freebsd11.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 08:29:21 -0000 > Author: delphij > Date: Thu Mar 16 05:44:16 2017 > New Revision: 315370 > URL: https://svnweb.freebsd.org/changeset/base/315370 > > Log: > The adj_free and max_free values of new_entry will be calculated and > assigned by subsequent vm_map_entry_link(), therefore, remove the > pointless copying. > > Submitted by: alc > MFC after: 3 days Should be X-MFC with: r315272. This modifies what r315272 implements and meaningless without it. Is r315272 planned to be MFC'ed in 3 days? (Originally, 1month.) > > Modified: > head/sys/vm/vm_map.c > > Modified: head/sys/vm/vm_map.c > ============================================================================== > --- head/sys/vm/vm_map.c Thu Mar 16 04:58:12 2017 (r315369) > +++ head/sys/vm/vm_map.c Thu Mar 16 05:44:16 2017 (r315370) > @@ -3456,8 +3456,6 @@ vmspace_fork(struct vmspace *vm1, vm_oof > new_entry->start = old_entry->start; > new_entry->end = old_entry->end; > new_entry->avail_ssize = old_entry->avail_ssize; > - new_entry->adj_free = old_entry->adj_free; > - new_entry->max_free = old_entry->max_free; > new_entry->eflags = old_entry->eflags & > ~(MAP_ENTRY_USER_WIRED | MAP_ENTRY_IN_TRANSITION | > MAP_ENTRY_VN_WRITECNT); -- Tomoaki AOKI From owner-svn-src-head@freebsd.org Thu Mar 16 09:33:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06C1CD0D23A; Thu, 16 Mar 2017 09:33:38 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 C785F1FF1; Thu, 16 Mar 2017 09:33:37 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2G9Xa5b057832; Thu, 16 Mar 2017 09:33:36 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2G9XaDX057831; Thu, 16 Mar 2017 09:33:36 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201703160933.v2G9XaDX057831@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Thu, 16 Mar 2017 09:33:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315402 - head/sys/x86/acpica X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 09:33:38 -0000 Author: royger Date: Thu Mar 16 09:33:36 2017 New Revision: 315402 URL: https://svnweb.freebsd.org/changeset/base/315402 Log: x86/srat: fix parsing of APIC IDs > MAX_APIC_ID Ignore them like it's done in the MADT parser. This allows booting on a box with SRAT and APIC IDs > 255. Reported by: Wei Liu Tested by: Wei Liu Reviewed by: kib MFC after: 2 weeks Sponsored by: Citrix Systems R&D Modified: head/sys/x86/acpica/srat.c Modified: head/sys/x86/acpica/srat.c ============================================================================== --- head/sys/x86/acpica/srat.c Thu Mar 16 09:17:14 2017 (r315401) +++ head/sys/x86/acpica/srat.c Thu Mar 16 09:33:36 2017 (r315402) @@ -202,6 +202,12 @@ srat_parse_entry(ACPI_SUBTABLE_HEADER *e "enabled" : "disabled"); if (!(cpu->Flags & ACPI_SRAT_CPU_ENABLED)) break; + if (cpu->ApicId > MAX_APIC_ID) { + printf("SRAT: Ignoring local APIC ID %u (too high)\n", + cpu->ApicId); + break; + } + if (cpus[cpu->ApicId].enabled) { printf("SRAT: Duplicate local APIC ID %u\n", cpu->ApicId); @@ -220,6 +226,12 @@ srat_parse_entry(ACPI_SUBTABLE_HEADER *e "enabled" : "disabled"); if (!(x2apic->Flags & ACPI_SRAT_CPU_ENABLED)) break; + if (x2apic->ApicId > MAX_APIC_ID) { + printf("SRAT: Ignoring local APIC ID %u (too high)\n", + x2apic->ApicId); + break; + } + KASSERT(!cpus[x2apic->ApicId].enabled, ("Duplicate local APIC ID %u", x2apic->ApicId)); cpus[x2apic->ApicId].domain = x2apic->ProximityDomain; From owner-svn-src-head@freebsd.org Thu Mar 16 09:59:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CD85D0DB1E; Thu, 16 Mar 2017 09:59:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF0261CD3; Thu, 16 Mar 2017 09:59:36 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2G9xZft066575; Thu, 16 Mar 2017 09:59:35 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2G9xZMp066571; Thu, 16 Mar 2017 09:59:35 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201703160959.v2G9xZMp066571@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 16 Mar 2017 09:59:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315404 - in head/sys: compat/linuxkpi/common/include/linux compat/linuxkpi/common/src ofed/drivers/infiniband/core X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 09:59:37 -0000 Author: hselasky Date: Thu Mar 16 09:59:35 2017 New Revision: 315404 URL: https://svnweb.freebsd.org/changeset/base/315404 Log: Add basic support for VIMAGE to the LinuxKPI and ibcore. Support is implemented by mapping Linux's "struct net" into FreeBSD's "struct vnet". Currently only vnet0 is supported by ibcore. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/inetdevice.h head/sys/compat/linuxkpi/common/include/linux/netdevice.h head/sys/compat/linuxkpi/common/src/linux_compat.c head/sys/ofed/drivers/infiniband/core/addr.c Modified: head/sys/compat/linuxkpi/common/include/linux/inetdevice.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/inetdevice.h Thu Mar 16 09:40:54 2017 (r315403) +++ head/sys/compat/linuxkpi/common/include/linux/inetdevice.h Thu Mar 16 09:59:35 2017 (r315404) @@ -34,23 +34,25 @@ #include static inline struct net_device * -ip_dev_find(struct net *net, uint32_t addr) +ip_dev_find(struct vnet *vnet, uint32_t addr) { struct sockaddr_in sin; struct ifaddr *ifa; struct ifnet *ifp; - ifp = NULL; memset(&sin, 0, sizeof(sin)); sin.sin_addr.s_addr = addr; - sin.sin_port = 0; sin.sin_len = sizeof(sin); sin.sin_family = AF_INET; + CURVNET_SET_QUIET(vnet); ifa = ifa_ifwithaddr((struct sockaddr *)&sin); + CURVNET_RESTORE(); if (ifa) { ifp = ifa->ifa_ifp; if_ref(ifp); ifa_free(ifa); + } else { + ifp = NULL; } return (ifp); } Modified: head/sys/compat/linuxkpi/common/include/linux/netdevice.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/netdevice.h Thu Mar 16 09:40:54 2017 (r315403) +++ head/sys/compat/linuxkpi/common/include/linux/netdevice.h Thu Mar 16 09:59:35 2017 (r315404) @@ -2,7 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013-2016 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2017 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -40,25 +40,38 @@ #include #include +#include #include #include #include #include #include -struct net { -}; - -extern struct net init_net; +#ifdef VIMAGE +#define init_net *vnet0 +#else +#define init_net *((struct vnet *)0) +#endif #define MAX_ADDR_LEN 20 #define net_device ifnet -#define dev_get_by_index(n, idx) ifnet_byindex_ref((idx)) -#define dev_hold(d) if_ref((d)) -#define dev_put(d) if_rele((d)) -#define dev_net(d) (&init_net) +static inline struct ifnet * +dev_get_by_index(struct vnet *vnet, int if_index) +{ + struct ifnet *retval; + + CURVNET_SET(vnet); + retval = ifnet_byindex_ref(if_index); + CURVNET_RESTORE(); + + return (retval); +} + +#define dev_hold(d) if_ref(d) +#define dev_put(d) if_rele(d) +#define dev_net(d) ((d)->if_vnet) #define net_eq(a,b) ((a) == (b)) Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Thu Mar 16 09:40:54 2017 (r315403) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Thu Mar 16 09:59:35 2017 (r315404) @@ -92,7 +92,6 @@ struct device linux_root_device; struct class linux_class_misc; struct list_head pci_drivers; struct list_head pci_devices; -struct net init_net; spinlock_t pci_lock; unsigned long linux_timer_hz_mask; Modified: head/sys/ofed/drivers/infiniband/core/addr.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/addr.c Thu Mar 16 09:40:54 2017 (r315403) +++ head/sys/ofed/drivers/infiniband/core/addr.c Thu Mar 16 09:59:35 2017 (r315404) @@ -161,7 +161,9 @@ int rdma_translate_ip(struct sockaddr *a scope_id = sin6->sin6_scope_id; if (IN6_IS_SCOPE_LINKLOCAL(&sin6->sin6_addr)) SCOPE_ID_CACHE(scope_id, sin6); + CURVNET_SET_QUIET(&init_net); ifa = ifa_ifwithaddr(addr); + CURVNET_RESTORE(); sin6->sin6_port = port; if (IN6_IS_SCOPE_LINKLOCAL(&sin6->sin6_addr)) SCOPE_ID_RESTORE(scope_id, sin6); @@ -231,6 +233,9 @@ static int addr_resolve(struct sockaddr int bcast; int is_gw = 0; int error = 0; + + CURVNET_SET_QUIET(&init_net); + /* * Determine whether the address is unicast, multicast, or broadcast * and whether the source interface is valid. @@ -271,7 +276,9 @@ static int addr_resolve(struct sockaddr * up first and verify that it is a local * interface: */ + CURVNET_SET_QUIET(&init_net); ifa = ifa_ifwithaddr(src_in); + CURVNET_RESTORE(); sin->sin_port = port; if (ifa == NULL) { error = ENETUNREACH; @@ -312,7 +319,9 @@ static int addr_resolve(struct sockaddr * up first and verify that it is a local * interface: */ + CURVNET_SET_QUIET(&init_net); ifa = ifa_ifwithaddr(src_in); + CURVNET_RESTORE(); sin6->sin6_port = port; if (ifa == NULL) { error = ENETUNREACH; @@ -426,6 +435,8 @@ done: #endif if (error == EWOULDBLOCK) error = ENODATA; + + CURVNET_RESTORE(); return -error; } From owner-svn-src-head@freebsd.org Thu Mar 16 10:02:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 109FFD0DE16; Thu, 16 Mar 2017 10:02:47 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D14081142; Thu, 16 Mar 2017 10:02:46 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2GA2jEQ070304; Thu, 16 Mar 2017 10:02:45 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2GA2jk4070303; Thu, 16 Mar 2017 10:02:45 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201703161002.v2GA2jk4070303@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 16 Mar 2017 10:02:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315405 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 10:02:47 -0000 Author: hselasky Date: Thu Mar 16 10:02:45 2017 New Revision: 315405 URL: https://svnweb.freebsd.org/changeset/base/315405 Log: Add helper function similar to ip_dev_find() to the LinuxKPI to lookup a network device by its IPv6 address in the given VNET. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/inetdevice.h Modified: head/sys/compat/linuxkpi/common/include/linux/inetdevice.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/inetdevice.h Thu Mar 16 09:59:35 2017 (r315404) +++ head/sys/compat/linuxkpi/common/include/linux/inetdevice.h Thu Mar 16 10:02:45 2017 (r315405) @@ -2,7 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2017 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -57,4 +57,28 @@ ip_dev_find(struct vnet *vnet, uint32_t return (ifp); } +static inline struct net_device * +ip6_dev_find(struct vnet *vnet, struct in6_addr addr) +{ + struct sockaddr_in6 sin6; + struct ifaddr *ifa; + struct ifnet *ifp; + + memset(&sin6, 0, sizeof(sin6)); + sin6.sin6_addr = addr; + sin6.sin6_len = sizeof(sin6); + sin6.sin6_family = AF_INET6; + CURVNET_SET_QUIET(vnet); + ifa = ifa_ifwithaddr((struct sockaddr *)&sin6); + CURVNET_RESTORE(); + if (ifa) { + ifp = ifa->ifa_ifp; + if_ref(ifp); + ifa_free(ifa); + } else { + ifp = NULL; + } + return (ifp); +} + #endif /* _LINUX_INETDEVICE_H_ */ From owner-svn-src-head@freebsd.org Thu Mar 16 10:14:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9FEF1D0E21C; Thu, 16 Mar 2017 10:14:54 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward2j.cmail.yandex.net (forward2j.cmail.yandex.net [IPv6:2a02:6b8:0:1630::15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Yandex CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 21E3B17C8; Thu, 16 Mar 2017 10:14:53 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [IPv6:2a02:6b8:0:801::ab]) by forward2j.cmail.yandex.net (Yandex) with ESMTP id F2A7320EA7; Thu, 16 Mar 2017 13:14:49 +0300 (MSK) Received: from smtp1j.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp1j.mail.yandex.net (Yandex) with ESMTP id 060F43C81438; Thu, 16 Mar 2017 13:14:44 +0300 (MSK) Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 9vXNhUvkBl-EipOrEun; Thu, 16 Mar 2017 13:14:44 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1489659284; bh=SKVpsLWs7lLJHfZDFUdVpYoo0djAECcmrOheQ4B7Lb8=; h=Subject:To:References:From:Message-ID:Date:In-Reply-To; b=q9HBF4PObxkwj0yJO17139b99F21V2HjeBoq+hKu/eeCZM71Dz7AKJX+gLh9ReIU0 8PyuoKJ/yAxDovSAkWFEvivUlI+5FaXzFLUPtTr0fnLGuMpetisaqVN7X0YZKarwGx zRMWYeMNplUEA0htjKekbmngby0cRdV5nQCWq5CE= Authentication-Results: smtp1j.mail.yandex.net; dkim=pass header.i=@yandex.ru X-Yandex-Suid-Status: 1 0,1 0,1 0,1 0 Subject: Re: svn commit: r315405 - head/sys/compat/linuxkpi/common/include/linux To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201703161002.v2GA2jk4070303@repo.freebsd.org> From: "Andrey V. Elsukov" Openpgp: id=E6591E1B41DA1516F0C9BC0001C5EA0410C8A17A Message-ID: <554fb619-815d-2530-8df2-8df6e8e27030@yandex.ru> Date: Thu, 16 Mar 2017 13:12:59 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <201703161002.v2GA2jk4070303@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="q7qo8E6FmxwV90bnIG02VND4bJUatVeis" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 10:14:54 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --q7qo8E6FmxwV90bnIG02VND4bJUatVeis Content-Type: multipart/mixed; boundary="W5CP8EXkPoWhRPUJQxaxloO0HGD5pkHVo"; protected-headers="v1" From: "Andrey V. Elsukov" To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <554fb619-815d-2530-8df2-8df6e8e27030@yandex.ru> Subject: Re: svn commit: r315405 - head/sys/compat/linuxkpi/common/include/linux References: <201703161002.v2GA2jk4070303@repo.freebsd.org> In-Reply-To: <201703161002.v2GA2jk4070303@repo.freebsd.org> --W5CP8EXkPoWhRPUJQxaxloO0HGD5pkHVo Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 16.03.2017 13:02, Hans Petter Selasky wrote: > Author: hselasky > Date: Thu Mar 16 10:02:45 2017 > New Revision: 315405 > URL: https://svnweb.freebsd.org/changeset/base/315405 >=20 > Log: > Add helper function similar to ip_dev_find() to the LinuxKPI to looku= p > a network device by its IPv6 address in the given VNET. > =20 > +static inline struct net_device * > +ip6_dev_find(struct vnet *vnet, struct in6_addr addr) > +{ > + struct sockaddr_in6 sin6; > + struct ifaddr *ifa; > + struct ifnet *ifp; > + > + memset(&sin6, 0, sizeof(sin6)); > + sin6.sin6_addr =3D addr; > + sin6.sin6_len =3D sizeof(sin6); > + sin6.sin6_family =3D AF_INET6; > + CURVNET_SET_QUIET(vnet); > + ifa =3D ifa_ifwithaddr((struct sockaddr *)&sin6); Hi Hans, There are at least two IPv6-specific functions to this task: in6ifa_ifwithaddr() and in6ifa_ifpwithaddr(). --=20 WBR, Andrey V. Elsukov --W5CP8EXkPoWhRPUJQxaxloO0HGD5pkHVo-- --q7qo8E6FmxwV90bnIG02VND4bJUatVeis Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEzBAEBCAAdFiEE5lkeG0HaFRbwybwAAcXqBBDIoXoFAljKZSwACgkQAcXqBBDI oXqFugf/Ypx3siCCUwuPguTz70FGSVszLWp3LJop3r4dHgNSiazCDWJuqp8AUtL/ ho2c3WYik9FccrG7jquD5e2ETwZPK8whS7vkXKyNu6g+QvihJeBIAOWBUEp+ollc IoU4ftnv91aPRJmcH1jDHC4XD9ZaaEL0s6i4ISg85jCY8G79+lMjk7JWfyOScFd0 D4hqrvE/tQhPLO7MVRXHCss4DJ2tO56JNpbgmpJGoyI5Va5APlVoLBhoCCujQd82 P2ciOuBRc/Z6m1ZUTtJ/lyzhePZqMisX8yosSIog+0jf6T2JcCpKB4USikA7QcvT JKcdYzvjX8Mh1Gx6WYBKN35+b8XmiQ== =kyaQ -----END PGP SIGNATURE----- --q7qo8E6FmxwV90bnIG02VND4bJUatVeis-- From owner-svn-src-head@freebsd.org Thu Mar 16 10:16:09 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13540D0E2A5; Thu, 16 Mar 2017 10:16:09 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward4o.cmail.yandex.net (forward4o.cmail.yandex.net [IPv6:2a02:6b8:0:1a72::289]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Yandex CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 87549193F; Thu, 16 Mar 2017 10:16:08 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from smtp3j.mail.yandex.net (smtp3j.mail.yandex.net [95.108.130.68]) by forward4o.cmail.yandex.net (Yandex) with ESMTP id B905F20F8E; Thu, 16 Mar 2017 13:16:05 +0300 (MSK) Received: from smtp3j.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp3j.mail.yandex.net (Yandex) with ESMTP id 9C9AE6240932; Thu, 16 Mar 2017 13:16:02 +0300 (MSK) Received: by smtp3j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id ae4tlM1JFd-G2Nm8aP2; Thu, 16 Mar 2017 13:16:02 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1489659362; bh=QmzomWQAwp/LdjgcSOVWkvcczklvkWnJgx5pAl7d1Zw=; h=Subject:To:References:From:Message-ID:Date:In-Reply-To; b=TZmXt0YWgn0ziyyFbtR7riHmVR53ppKEAxipmAhH2rt5S3fjFv7UH6Hbe+ByU7tjM 5D/e5thtDEMkapGDzgS+c1gpXt+Qe0/kypf9Hi81kzL5ko2w3BvUlxorGP6mDha5JJ puOUEChSDBm8KnMIG7MWeSKG1lm/2VHQAJ8MQ3yw= Authentication-Results: smtp3j.mail.yandex.net; dkim=pass header.i=@yandex.ru X-Yandex-Suid-Status: 1 0,1 0,1 0,1 0 Subject: Re: svn commit: r315405 - head/sys/compat/linuxkpi/common/include/linux To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201703161002.v2GA2jk4070303@repo.freebsd.org> <554fb619-815d-2530-8df2-8df6e8e27030@yandex.ru> From: "Andrey V. Elsukov" Openpgp: id=E6591E1B41DA1516F0C9BC0001C5EA0410C8A17A Message-ID: <31a86179-6d43-f5c4-ad1b-36bdacfdffc8@yandex.ru> Date: Thu, 16 Mar 2017 13:14:22 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <554fb619-815d-2530-8df2-8df6e8e27030@yandex.ru> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="FGVocNFiN8Xo95IEhPqCwm2fuRQiR2c7h" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 10:16:09 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --FGVocNFiN8Xo95IEhPqCwm2fuRQiR2c7h Content-Type: multipart/mixed; boundary="Q4RBQMPA6KpaKgPWNCBd8ascw48848TBG"; protected-headers="v1" From: "Andrey V. Elsukov" To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <31a86179-6d43-f5c4-ad1b-36bdacfdffc8@yandex.ru> Subject: Re: svn commit: r315405 - head/sys/compat/linuxkpi/common/include/linux References: <201703161002.v2GA2jk4070303@repo.freebsd.org> <554fb619-815d-2530-8df2-8df6e8e27030@yandex.ru> In-Reply-To: <554fb619-815d-2530-8df2-8df6e8e27030@yandex.ru> --Q4RBQMPA6KpaKgPWNCBd8ascw48848TBG Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 16.03.2017 13:12, Andrey V. Elsukov wrote: > On 16.03.2017 13:02, Hans Petter Selasky wrote: >> Author: hselasky >> Date: Thu Mar 16 10:02:45 2017 >> New Revision: 315405 >> URL: https://svnweb.freebsd.org/changeset/base/315405 >> >> Log: >> Add helper function similar to ip_dev_find() to the LinuxKPI to look= up >> a network device by its IPv6 address in the given VNET. >> =20 >> +static inline struct net_device * >> +ip6_dev_find(struct vnet *vnet, struct in6_addr addr) >> +{ >> + struct sockaddr_in6 sin6; >> + struct ifaddr *ifa; >> + struct ifnet *ifp; >> + >> + memset(&sin6, 0, sizeof(sin6)); >> + sin6.sin6_addr =3D addr; >> + sin6.sin6_len =3D sizeof(sin6); >> + sin6.sin6_family =3D AF_INET6; >> + CURVNET_SET_QUIET(vnet); >> + ifa =3D ifa_ifwithaddr((struct sockaddr *)&sin6); >=20 > Hi Hans, >=20 > There are at least two IPv6-specific functions to this task: > in6ifa_ifwithaddr() and in6ifa_ifpwithaddr(). Sorry, it is only in6ifa_ifwithaddr(). --=20 WBR, Andrey V. Elsukov --Q4RBQMPA6KpaKgPWNCBd8ascw48848TBG-- --FGVocNFiN8Xo95IEhPqCwm2fuRQiR2c7h Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEzBAEBCAAdFiEE5lkeG0HaFRbwybwAAcXqBBDIoXoFAljKZX4ACgkQAcXqBBDI oXqONQf+Pfden/TafSPBkH7iakBG+4yRT2VYTs0z2/pNSFq0/ZmZVlvDRoBaRBeG o1B7OUpG7Vuuua+VHNc/YB2dhZnTIvag2b6AYNvj/WXcbPyp1Mk4PYhK87HYb3pN t1mIHHKacNYZ/cHu+oDblcBtqVOd2r9O15PDzjDjctyNSOOmdLo7ADOoXQJql9Ck 5TwTLm1n5IZqFsRXgbhcUMC3yl9YAe7U+jlSg8zOYdvth8NWNnPK8aHVtU5Ew9eZ PruMQTbeegdQGOVPdV2/YmF96KWp0iundQyKlroUWOt0NgKMI3QVh3o7VmzXJgpX GwrCNl6jy5MqQDJCFQjU6cIbMkN+VA== =s6Nq -----END PGP SIGNATURE----- --FGVocNFiN8Xo95IEhPqCwm2fuRQiR2c7h-- From owner-svn-src-head@freebsd.org Thu Mar 16 10:28:14 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4FFB3D0E733; Thu, 16 Mar 2017 10:28:14 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 1F85C1FFE; Thu, 16 Mar 2017 10:28:14 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2GASDX6078570; Thu, 16 Mar 2017 10:28:13 GMT (envelope-from maxim@FreeBSD.org) Received: (from maxim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2GASDQa078569; Thu, 16 Mar 2017 10:28:13 GMT (envelope-from maxim@FreeBSD.org) Message-Id: <201703161028.v2GASDQa078569@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: maxim set sender to maxim@FreeBSD.org using -f From: Maxim Konovalov Date: Thu, 16 Mar 2017 10:28:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315406 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 10:28:14 -0000 Author: maxim Date: Thu Mar 16 10:28:13 2017 New Revision: 315406 URL: https://svnweb.freebsd.org/changeset/base/315406 Log: NetBSD 7.1 release added. Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree ============================================================================== --- head/share/misc/bsd-family-tree Thu Mar 16 10:02:45 2017 (r315405) +++ head/share/misc/bsd-family-tree Thu Mar 16 10:28:13 2017 (r315406) @@ -346,9 +346,11 @@ FreeBSD 5.2 | | | 10.3 | | | | | | NetBSD 7.0.1 | | | | | | DragonFly 4.6.0 + | | | | | + | | | | | *--FreeBSD macOS | OpenBSD 6.0 | | 11.0 10.12 | | | - | | | | | + | | NetBSD 7.1 | | | | | | | FreeBSD 12 -current | NetBSD -current OpenBSD -current DragonFly -current | | | | | @@ -704,6 +706,7 @@ NetBSD 7.0.1 2016-05-22 [NBD] DragonFly 4.6.0 2016-08-02 [DFB] OpenBSD 6.0 2016-09-01 [OBD] FreeBSD 11.0 2016-10-10 [FBD] +NetBSD 7.1 2017-03-11 [NBD] Bibliography ------------------------ From owner-svn-src-head@freebsd.org Thu Mar 16 10:30:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A69CBD0E990; Thu, 16 Mar 2017 10:30:41 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 670251445; Thu, 16 Mar 2017 10:30:41 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2GAUec6080814; Thu, 16 Mar 2017 10:30:40 GMT (envelope-from maxim@FreeBSD.org) Received: (from maxim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2GAUeuR080813; Thu, 16 Mar 2017 10:30:40 GMT (envelope-from maxim@FreeBSD.org) Message-Id: <201703161030.v2GAUeuR080813@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: maxim set sender to maxim@FreeBSD.org using -f From: Maxim Konovalov Date: Thu, 16 Mar 2017 10:30:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315407 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 10:30:41 -0000 Author: maxim Date: Thu Mar 16 10:30:40 2017 New Revision: 315407 URL: https://svnweb.freebsd.org/changeset/base/315407 Log: Indentation for the DragonFlyBSD trunk fixed, EoL whitespace removed. Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree ============================================================================== --- head/share/misc/bsd-family-tree Thu Mar 16 10:28:13 2017 (r315406) +++ head/share/misc/bsd-family-tree Thu Mar 16 10:30:40 2017 (r315407) @@ -176,7 +176,7 @@ FreeBSD 4.0 | | | | | NetBSD 1. | | | | \ FreeBSD 5.0 | | | | | | | | | -FreeBSD 5.1 | | | DragonFly 1.0 +FreeBSD 5.1 | | | DragonFly 1.0 | \ | | | | | ----- Mac OS X | | | | 10.3 | | | @@ -187,7 +187,7 @@ FreeBSD 5.2 | | *-------FreeBSD 5.3 | | | | | | | | OpenBSD 3.6 | | | | NetBSD 2.0 | | - | | | | | | | DragonFly 1.2.0 + | | | | | | | DragonFly 1.2.0 | | Mac OS X | | NetBSD 2.0.2 | | | | 10.4 | | | | | | FreeBSD 5.4 | | | | | | @@ -200,50 +200,50 @@ FreeBSD 5.2 | | | | | | | NetBSD 2.1 | | | | | | | | | | | | | NetBSD 3.0 | | - | | | | | | | | DragonFly 1.4.0 + | | | | | | | | DragonFly 1.4.0 | | | | | | | OpenBSD 3.9 | | FreeBSD | | | | | | | | 6.1 | | | | | | | | | FreeBSD 5.5 | | | | | | - | | | | | NetBSD 3.0.1 | DragonFly 1.6.0 + | | | | | NetBSD 3.0.1 | DragonFly 1.6.0 | | | | | | | | | | | | | | OpenBSD 4.0 | | | | | | NetBSD 3.0.2 | | | | | | NetBSD 3.1 | | | FreeBSD 6.2 | | | | - | | | | | DragonFly 1.8.0 + | | | | | DragonFly 1.8.0 | | | | OpenBSD 4.1 | - | | | | | DragonFly 1.10.0 + | | | | | DragonFly 1.10.0 | | Mac OS X | | | | | 10.5 | | | | | | | OpenBSD 4.2 | | | | NetBSD 4.0 | | | FreeBSD 6.3 | | | | | | \ | | | | | - *--FreeBSD | | | | | DragonFly 1.12.0 + *--FreeBSD | | | | | DragonFly 1.12.0 | 7.0 | | | | | | | | | | | | OpenBSD 4.3 | - | | | | | NetBSD | DragonFly 2.0.0 + | | | | | NetBSD | DragonFly 2.0.0 | | FreeBSD | | 4.0.1 OpenBSD 4.4 | | | 6.4 | | | | | | | | | | | FreeBSD 7.1 | | | | - | | | | | DragonFly 2.2.0 + | | | | | DragonFly 2.2.0 | FreeBSD 7.2 | NetBSD 5.0 OpenBSD 4.5 | | \ | | | \ | | | | Mac OS X | | \ | | | | 10.6 | | \ | | - | | | | | NetBSD | DragonFly 2.4.0 + | | | | | NetBSD | DragonFly 2.4.0 | | | | | 5.0.1 OpenBSD 4.6 | | | | | | | | | *--FreeBSD | | | | | | | | 8.0 | | | | | | | | | FreeBSD | | | NetBSD | | - | | 7.3 | | | 5.0.2 | DragonFly 2.6.0 + | | 7.3 | | | 5.0.2 | DragonFly 2.6.0 | | | | | | OpenBSD 4.7 | | FreeBSD | | | | | | | 8.1 | | | | | | - | | | | | | | DragonFly 2.8.2 + | | | | | | | DragonFly 2.8.2 | | | | | | OpenBSD 4.8 | | | | | | *--NetBSD | | | FreeBSD FreeBSD | | | 5.1 | | @@ -281,7 +281,7 @@ FreeBSD 5.2 | | | | | | | | | OpenBSD 5.3 DragonFly 3.4.1 | | | | | | NetBSD | | | | | | | | 6.0.2 | | - | | | | | | | | | + | | | | | | | | | | | | | | | NetBSD | | | | | | | | 6.0.3 | | | | | | | | | | | @@ -352,7 +352,7 @@ FreeBSD 5.2 | | | 11.0 10.12 | | | | | NetBSD 7.1 | | | | | | | -FreeBSD 12 -current | NetBSD -current OpenBSD -current DragonFly -current +FreeBSD 12 -current | NetBSD -current OpenBSD -current DragonFly -current | | | | | v v v v v From owner-svn-src-head@freebsd.org Thu Mar 16 12:04:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80F30D0EB6F; Thu, 16 Mar 2017 12:04:45 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D90A157A; Thu, 16 Mar 2017 12:04:45 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2GC4iPV020280; Thu, 16 Mar 2017 12:04:44 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2GC4hxC020272; Thu, 16 Mar 2017 12:04:43 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201703161204.v2GC4hxC020272@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Thu, 16 Mar 2017 12:04:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315408 - in head/sys/boot: common efi/libefi i386/libi386 mips/beri/loader uboot/lib usb/storage userboot/userboot X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 12:04:45 -0000 Author: tsoome Date: Thu Mar 16 12:04:43 2017 New Revision: 315408 URL: https://svnweb.freebsd.org/changeset/base/315408 Log: loader: remove open_disk cache As we provide the disk size verification and correction via disk_ioctl and disk state provided by disk_open(), we can not share the partition state in disk_devdesc structure. Also the sharing does make a lot of sense with ufs, as only one partition is open at any given time, but zfs pools do keep the disk devices open. To make sure we do get the correct information about the open device, just remove the cache. Reviewed by: allanjude, smh Approved by: allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D9757 Modified: head/sys/boot/common/disk.c head/sys/boot/common/disk.h head/sys/boot/efi/libefi/efipart.c head/sys/boot/i386/libi386/biosdisk.c head/sys/boot/mips/beri/loader/beri_disk_cfi.c head/sys/boot/mips/beri/loader/beri_disk_sdcard.c head/sys/boot/uboot/lib/disk.c head/sys/boot/usb/storage/umass_loader.c head/sys/boot/userboot/userboot/userboot_disk.c Modified: head/sys/boot/common/disk.c ============================================================================== --- head/sys/boot/common/disk.c Thu Mar 16 10:30:40 2017 (r315407) +++ head/sys/boot/common/disk.c Thu Mar 16 12:04:43 2017 (r315408) @@ -48,8 +48,6 @@ struct open_disk { uint64_t mediasize; uint64_t entrysize; u_int sectorsize; - u_int flags; - int rcnt; }; struct print_args { @@ -58,96 +56,6 @@ struct print_args { int verbose; }; -struct dentry { - const struct devsw *d_dev; - int d_unit; - int d_slice; - int d_partition; - - struct open_disk *od; - uint64_t d_offset; - STAILQ_ENTRY(dentry) entry; -#ifdef DISK_DEBUG - uint32_t count; -#endif -}; - -static STAILQ_HEAD(, dentry) opened_disks = - STAILQ_HEAD_INITIALIZER(opened_disks); - -static int -disk_lookup(struct disk_devdesc *dev) -{ - struct dentry *entry; - int rc; - - rc = ENOENT; - STAILQ_FOREACH(entry, &opened_disks, entry) { - if (entry->d_dev != dev->d_dev || - entry->d_unit != dev->d_unit) - continue; - dev->d_opendata = entry->od; - if (entry->d_slice == dev->d_slice && - entry->d_partition == dev->d_partition) { - dev->d_offset = entry->d_offset; - DEBUG("%s offset %lld", disk_fmtdev(dev), - (long long)dev->d_offset); -#ifdef DISK_DEBUG - entry->count++; -#endif - return (0); - } - rc = EAGAIN; - } - return (rc); -} - -static void -disk_insert(struct disk_devdesc *dev) -{ - struct dentry *entry; - - entry = (struct dentry *)malloc(sizeof(struct dentry)); - if (entry == NULL) { - DEBUG("no memory"); - return; - } - entry->d_dev = dev->d_dev; - entry->d_unit = dev->d_unit; - entry->d_slice = dev->d_slice; - entry->d_partition = dev->d_partition; - entry->od = (struct open_disk *)dev->d_opendata; - entry->od->rcnt++; - entry->d_offset = dev->d_offset; -#ifdef DISK_DEBUG - entry->count = 1; -#endif - STAILQ_INSERT_TAIL(&opened_disks, entry, entry); - DEBUG("%s cached", disk_fmtdev(dev)); -} - -#ifdef DISK_DEBUG -COMMAND_SET(dcachestat, "dcachestat", "get disk cache stats", - command_dcachestat); - -static int -command_dcachestat(int argc, char *argv[]) -{ - struct disk_devdesc dev; - struct dentry *entry; - - STAILQ_FOREACH(entry, &opened_disks, entry) { - dev.d_dev = (struct devsw *)entry->d_dev; - dev.d_unit = entry->d_unit; - dev.d_slice = entry->d_slice; - dev.d_partition = entry->d_partition; - printf("%s %d => %p [%d]\n", disk_fmtdev(&dev), entry->count, - entry->od, entry->od->rcnt); - } - return (CMD_OK); -} -#endif /* DISK_DEBUG */ - /* Convert size to a human-readable number. */ static char * display_size(uint64_t size, u_int sectorsize) @@ -187,6 +95,7 @@ ptblread(void *d, void *buf, size_t bloc static int ptable_print(void *arg, const char *pname, const struct ptable_entry *part) { + struct disk_devdesc dev; struct print_args *pa, bsd; struct open_disk *od; struct ptable *table; @@ -207,17 +116,24 @@ ptable_print(void *arg, const char *pnam res = 0; if (part->type == PART_FREEBSD) { /* Open slice with BSD label */ - pa->dev->d_offset = part->start; - table = ptable_open(pa->dev, part->end - part->start + 1, - od->sectorsize, ptblread); - if (table == NULL) - return 0; - sprintf(line, " %s%s", pa->prefix, pname); - bsd.dev = pa->dev; - bsd.prefix = line; - bsd.verbose = pa->verbose; - res = ptable_iterate(table, &bsd, ptable_print); - ptable_close(table); + dev.d_dev = pa->dev->d_dev; + dev.d_unit = pa->dev->d_unit; + dev.d_slice = part->index; + dev.d_partition = -1; + if (disk_open(&dev, part->end - part->start + 1, + od->sectorsize) == 0) { + table = ptable_open(&dev, part->end - part->start + 1, + od->sectorsize, ptblread); + if (table != NULL) { + sprintf(line, " %s%s", pa->prefix, pname); + bsd.dev = pa->dev; + bsd.prefix = line; + bsd.verbose = pa->verbose; + res = ptable_iterate(table, &bsd, ptable_print); + ptable_close(table); + } + disk_close(&dev); + } } return (res); @@ -290,8 +206,7 @@ disk_ioctl(struct disk_devdesc *dev, u_l } int -disk_open(struct disk_devdesc *dev, uint64_t mediasize, u_int sectorsize, - u_int flags) +disk_open(struct disk_devdesc *dev, uint64_t mediasize, u_int sectorsize) { struct open_disk *od; struct ptable *table; @@ -299,11 +214,6 @@ disk_open(struct disk_devdesc *dev, uint int rc, slice, partition; rc = 0; - if ((flags & DISK_F_NOCACHE) == 0) { - rc = disk_lookup(dev); - if (rc == 0) - return (0); - } /* * While we are reading disk metadata, make sure we do it relative * to the start of the disk @@ -312,30 +222,15 @@ disk_open(struct disk_devdesc *dev, uint table = NULL; slice = dev->d_slice; partition = dev->d_partition; - if (rc == EAGAIN) { - /* - * This entire disk was already opened and there is no - * need to allocate new open_disk structure and open the - * main partition table. - */ - od = (struct open_disk *)dev->d_opendata; - DEBUG("%s unit %d, slice %d, partition %d => %p (cached)", - disk_fmtdev(dev), dev->d_unit, dev->d_slice, - dev->d_partition, od); - goto opened; - } else { - od = (struct open_disk *)malloc(sizeof(struct open_disk)); - if (od == NULL) { - DEBUG("no memory"); - return (ENOMEM); - } - dev->d_opendata = od; - od->rcnt = 0; - od->entrysize = 0; + od = (struct open_disk *)malloc(sizeof(struct open_disk)); + if (od == NULL) { + DEBUG("no memory"); + return (ENOMEM); } + dev->d_opendata = od; + od->entrysize = 0; od->mediasize = mediasize; od->sectorsize = sectorsize; - od->flags = flags; DEBUG("%s unit %d, slice %d, partition %d => %p", disk_fmtdev(dev), dev->d_unit, dev->d_slice, dev->d_partition, od); @@ -355,8 +250,7 @@ disk_open(struct disk_devdesc *dev, uint if (mediasize > od->mediasize) { od->mediasize = mediasize; } -opened: - rc = 0; + if (ptable_gettype(od->table) == PTABLE_BSD && partition >= 0) { /* It doesn't matter what value has d_slice */ @@ -424,15 +318,11 @@ out: ptable_close(table); if (rc != 0) { - if (od->rcnt < 1) { - if (od->table != NULL) - ptable_close(od->table); - free(od); - } + if (od->table != NULL) + ptable_close(od->table); + free(od); DEBUG("%s could not open", disk_fmtdev(dev)); } else { - if ((flags & DISK_F_NOCACHE) == 0) - disk_insert(dev); /* Save the slice and partition number to the dev */ dev->d_slice = slice; dev->d_partition = partition; @@ -448,44 +338,12 @@ disk_close(struct disk_devdesc *dev) struct open_disk *od; od = (struct open_disk *)dev->d_opendata; - DEBUG("%s closed => %p [%d]", disk_fmtdev(dev), od, od->rcnt); - if (od->flags & DISK_F_NOCACHE) { - ptable_close(od->table); - free(od); - } + DEBUG("%s closed => %p", disk_fmtdev(dev), od); + ptable_close(od->table); + free(od); return (0); } -void -disk_cleanup(const struct devsw *d_dev) -{ -#ifdef DISK_DEBUG - struct disk_devdesc dev; -#endif - struct dentry *entry, *tmp; - - STAILQ_FOREACH_SAFE(entry, &opened_disks, entry, tmp) { - if (entry->d_dev != d_dev) - continue; - entry->od->rcnt--; -#ifdef DISK_DEBUG - dev.d_dev = (struct devsw *)entry->d_dev; - dev.d_unit = entry->d_unit; - dev.d_slice = entry->d_slice; - dev.d_partition = entry->d_partition; - DEBUG("%s was freed => %p [%d]", disk_fmtdev(&dev), - entry->od, entry->od->rcnt); -#endif - STAILQ_REMOVE(&opened_disks, entry, dentry, entry); - if (entry->od->rcnt < 1) { - if (entry->od->table != NULL) - ptable_close(entry->od->table); - free(entry->od); - } - free(entry); - } -} - char* disk_fmtdev(struct disk_devdesc *dev) { Modified: head/sys/boot/common/disk.h ============================================================================== --- head/sys/boot/common/disk.h Thu Mar 16 10:30:40 2017 (r315407) +++ head/sys/boot/common/disk.h Thu Mar 16 12:04:43 2017 (r315408) @@ -78,6 +78,9 @@ * the device's strategy method. */ +#ifndef _DISK_H +#define _DISK_H + struct disk_devdesc { struct devsw *d_dev; @@ -97,23 +100,18 @@ enum disk_ioctl { /* * Parse disk metadata and initialise dev->d_offset. */ -extern int disk_open(struct disk_devdesc *dev, uint64_t mediasize, - u_int sectorsize, u_int flags); -#define DISK_F_NOCACHE 0x0001 /* Do not use metadata caching */ -extern int disk_close(struct disk_devdesc *dev); -extern void disk_cleanup(const struct devsw *d_dev); -extern int disk_ioctl(struct disk_devdesc *dev, u_long cmd, void *buf); -extern int disk_read(struct disk_devdesc *dev, void *buf, uint64_t offset, - u_int blocks); -extern int disk_write(struct disk_devdesc *dev, void *buf, uint64_t offset, - u_int blocks); -extern int ptblread(void *d, void *buf, size_t blocks, uint64_t offset); +extern int disk_open(struct disk_devdesc *, uint64_t, u_int); +extern int disk_close(struct disk_devdesc *); +extern int disk_ioctl(struct disk_devdesc *, u_long, void *); +extern int disk_read(struct disk_devdesc *, void *, uint64_t, u_int); +extern int disk_write(struct disk_devdesc *, void *, uint64_t, u_int); +extern int ptblread(void *, void *, size_t, uint64_t); /* * Print information about slices on a disk. */ -extern int disk_print(struct disk_devdesc *dev, char *prefix, int verbose); -extern char* disk_fmtdev(struct disk_devdesc *dev); -extern int disk_parsedev(struct disk_devdesc *dev, const char *devspec, - const char **path); +extern int disk_print(struct disk_devdesc *, char *, int); +extern char* disk_fmtdev(struct disk_devdesc *); +extern int disk_parsedev(struct disk_devdesc *, const char *, const char **); +#endif /* _DISK_H */ Modified: head/sys/boot/efi/libefi/efipart.c ============================================================================== --- head/sys/boot/efi/libefi/efipart.c Thu Mar 16 10:30:40 2017 (r315407) +++ head/sys/boot/efi/libefi/efipart.c Thu Mar 16 12:04:43 2017 (r315408) @@ -635,8 +635,7 @@ efipart_print_common(struct devsw *dev, pd_dev.d_opendata = blkio; ret = disk_open(&pd_dev, blkio->Media->BlockSize * (blkio->Media->LastBlock + 1), - blkio->Media->BlockSize, - blkio->Media->RemovableMedia? DISK_F_NOCACHE: 0); + blkio->Media->BlockSize); if (ret == 0) { ret = disk_print(&pd_dev, line, verbose); disk_close(&pd_dev); @@ -726,8 +725,7 @@ efipart_open(struct open_file *f, ...) if (dev->d_dev->dv_type == DEVT_DISK) { return (disk_open(dev, blkio->Media->BlockSize * (blkio->Media->LastBlock + 1), - blkio->Media->BlockSize, - blkio->Media->RemovableMedia? DISK_F_NOCACHE: 0)); + blkio->Media->BlockSize)); } return (0); } Modified: head/sys/boot/i386/libi386/biosdisk.c ============================================================================== --- head/sys/boot/i386/libi386/biosdisk.c Thu Mar 16 10:30:40 2017 (r315407) +++ head/sys/boot/i386/libi386/biosdisk.c Thu Mar 16 12:04:43 2017 (r315408) @@ -137,7 +137,6 @@ static int bd_open(struct open_file *f, static int bd_close(struct open_file *f); static int bd_ioctl(struct open_file *f, u_long cmd, void *data); static int bd_print(int verbose); -static void bd_cleanup(void); #ifdef LOADER_GELI_SUPPORT static enum isgeli { @@ -160,7 +159,7 @@ struct devsw biosdisk = { bd_close, bd_ioctl, bd_print, - bd_cleanup + NULL }; /* @@ -231,13 +230,6 @@ bd_init(void) return(0); } -static void -bd_cleanup(void) -{ - - disk_cleanup(&biosdisk); -} - /* * Try to detect a device supported by the legacy int13 BIOS */ @@ -364,9 +356,7 @@ bd_print(int verbose) dev.d_partition = -1; if (disk_open(&dev, bdinfo[i].bd_sectorsize * bdinfo[i].bd_sectors, - bdinfo[i].bd_sectorsize, - (bdinfo[i].bd_flags & BD_FLOPPY) ? - DISK_F_NOCACHE: 0) == 0) { + bdinfo[i].bd_sectorsize) == 0) { snprintf(line, sizeof(line), " disk%d", i); ret = disk_print(&dev, line, verbose); disk_close(&dev); @@ -421,8 +411,7 @@ bd_open(struct open_file *f, ...) disk.d_partition = -1; disk.d_offset = 0; if (disk_open(&disk, BD(dev).bd_sectors * BD(dev).bd_sectorsize, - BD(dev).bd_sectorsize, (BD(dev).bd_flags & BD_FLOPPY) ? - DISK_F_NOCACHE: 0) == 0) { + BD(dev).bd_sectorsize) == 0) { if (disk_ioctl(&disk, DIOCGMEDIASIZE, &size) == 0) { size /= BD(dev).bd_sectorsize; @@ -433,8 +422,7 @@ bd_open(struct open_file *f, ...) } err = disk_open(dev, BD(dev).bd_sectors * BD(dev).bd_sectorsize, - BD(dev).bd_sectorsize, (BD(dev).bd_flags & BD_FLOPPY) ? - DISK_F_NOCACHE: 0); + BD(dev).bd_sectorsize); #ifdef LOADER_GELI_SUPPORT static char gelipw[GELI_PW_MAXLEN]; @@ -954,8 +942,7 @@ bd_getdev(struct i386_devdesc *d) if (biosdev == -1) /* not a BIOS device */ return(-1); if (disk_open(dev, BD(dev).bd_sectors * BD(dev).bd_sectorsize, - BD(dev).bd_sectorsize,(BD(dev).bd_flags & BD_FLOPPY) ? - DISK_F_NOCACHE: 0) != 0) /* oops, not a viable device */ + BD(dev).bd_sectorsize) != 0) /* oops, not a viable device */ return (-1); else disk_close(dev); Modified: head/sys/boot/mips/beri/loader/beri_disk_cfi.c ============================================================================== --- head/sys/boot/mips/beri/loader/beri_disk_cfi.c Thu Mar 16 10:30:40 2017 (r315407) +++ head/sys/boot/mips/beri/loader/beri_disk_cfi.c Thu Mar 16 12:04:43 2017 (r315408) @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); static int beri_cfi_disk_init(void); static int beri_cfi_disk_open(struct open_file *, ...); static int beri_cfi_disk_close(struct open_file *); -static void beri_cfi_disk_cleanup(void); static int beri_cfi_disk_strategy(void *, int, daddr_t, size_t, char *, size_t *); static int beri_cfi_disk_print(int); @@ -58,7 +57,7 @@ struct devsw beri_cfi_disk = { .dv_close = beri_cfi_disk_close, .dv_ioctl = noioctl, .dv_print = beri_cfi_disk_print, - .dv_cleanup = beri_cfi_disk_cleanup, + .dv_cleanup = NULL, }; static int @@ -100,7 +99,7 @@ beri_cfi_disk_open(struct open_file *f, if (dev->d_unit != 0) return (EIO); - return (disk_open(dev, cfi_get_mediasize(), cfi_get_sectorsize(), 0)); + return (disk_open(dev, cfi_get_mediasize(), cfi_get_sectorsize())); } static int @@ -131,8 +130,7 @@ beri_cfi_disk_print(int verbose) dev.d_unit = 0; dev.d_slice = -1; dev.d_partition = -1; - if (disk_open(&dev, cfi_get_mediasize(), - cfi_get_sectorsize(), 0) == 0) { + if (disk_open(&dev, cfi_get_mediasize(), cfi_get_sectorsize()) == 0) { snprintf(line, sizeof(line), " cfi%d", 0); ret = disk_print(&dev, line, verbose); disk_close(&dev); @@ -140,10 +138,3 @@ beri_cfi_disk_print(int verbose) return (ret); } - -static void -beri_cfi_disk_cleanup(void) -{ - - disk_cleanup(&beri_cfi_disk); -} Modified: head/sys/boot/mips/beri/loader/beri_disk_sdcard.c ============================================================================== --- head/sys/boot/mips/beri/loader/beri_disk_sdcard.c Thu Mar 16 10:30:40 2017 (r315407) +++ head/sys/boot/mips/beri/loader/beri_disk_sdcard.c Thu Mar 16 12:04:43 2017 (r315408) @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); static int beri_sdcard_disk_init(void); static int beri_sdcard_disk_open(struct open_file *, ...); static int beri_sdcard_disk_close(struct open_file *); -static void beri_sdcard_disk_cleanup(void); static int beri_sdcard_disk_strategy(void *, int, daddr_t, size_t, char *, size_t *); static int beri_sdcard_disk_print(int); @@ -58,7 +57,7 @@ struct devsw beri_sdcard_disk = { .dv_close = beri_sdcard_disk_close, .dv_ioctl = noioctl, .dv_print = beri_sdcard_disk_print, - .dv_cleanup = beri_sdcard_disk_cleanup, + .dv_cleanup = NULL, }; static int @@ -106,7 +105,7 @@ beri_sdcard_disk_open(struct open_file * if (dev->d_unit != 0) return (EIO); return (disk_open(dev, altera_sdcard_get_mediasize(), - altera_sdcard_get_sectorsize(), 0)); + altera_sdcard_get_sectorsize())); } static int @@ -138,17 +137,10 @@ beri_sdcard_disk_print(int verbose) dev.d_slice = -1; dev.d_partition = -1; if (disk_open(&dev, altera_sdcard_get_mediasize(), - altera_sdcard_get_sectorsize(), 0) == 0) { + altera_sdcard_get_sectorsize()) == 0) { snprintf(line, sizeof(line), " sdcard%d", 0); ret = disk_print(&dev, line, verbose); disk_close(&dev); } return (ret); } - -static void -beri_sdcard_disk_cleanup(void) -{ - - disk_cleanup(&beri_sdcard_disk); -} Modified: head/sys/boot/uboot/lib/disk.c ============================================================================== --- head/sys/boot/uboot/lib/disk.c Thu Mar 16 10:30:40 2017 (r315407) +++ head/sys/boot/uboot/lib/disk.c Thu Mar 16 12:04:43 2017 (r315408) @@ -139,7 +139,6 @@ stor_cleanup(void) for (i = 0; i < stor_info_no; i++) if (stor_info[i].opened > 0) ub_dev_close(stor_info[i].handle); - disk_cleanup(&uboot_storage); } static int @@ -203,7 +202,7 @@ stor_opendev(struct disk_devdesc *dev) SI(dev).opened++; } return (disk_open(dev, SI(dev).blocks * SI(dev).bsize, - SI(dev).bsize, 0)); + SI(dev).bsize)); } static int Modified: head/sys/boot/usb/storage/umass_loader.c ============================================================================== --- head/sys/boot/usb/storage/umass_loader.c Thu Mar 16 10:30:40 2017 (r315407) +++ head/sys/boot/usb/storage/umass_loader.c Thu Mar 16 12:04:43 2017 (r315408) @@ -116,7 +116,7 @@ umass_disk_open_sub(struct disk_devdesc if (usb_msc_read_capacity(umass_uaa.device, 0, &nblock, &blocksize) != 0) return (EINVAL); - return (disk_open(dev, ((uint64_t)nblock + 1) * (uint64_t)blocksize, blocksize, 0)); + return (disk_open(dev, ((uint64_t)nblock + 1) * (uint64_t)blocksize, blocksize)); } static int @@ -208,7 +208,6 @@ umass_disk_print(int verbose) static void umass_disk_cleanup(void) { - disk_cleanup(&umass_disk); usb_uninit(); } Modified: head/sys/boot/userboot/userboot/userboot_disk.c ============================================================================== --- head/sys/boot/userboot/userboot/userboot_disk.c Thu Mar 16 10:30:40 2017 (r315407) +++ head/sys/boot/userboot/userboot/userboot_disk.c Thu Mar 16 12:04:43 2017 (r315408) @@ -141,7 +141,7 @@ userdisk_print(int verbose) dev.d_slice = -1; dev.d_partition = -1; if (disk_open(&dev, ud_info[i].mediasize, - ud_info[i].sectorsize, 0) == 0) { + ud_info[i].sectorsize) == 0) { snprintf(line, sizeof(line), " disk%d", i); ret = disk_print(&dev, line, verbose); disk_close(&dev); @@ -171,7 +171,7 @@ userdisk_open(struct open_file *f, ...) if (ud_info[dev->d_unit].ud_bcache == NULL) ud_info[dev->d_unit].ud_bcache = bcache_allocate(); return (disk_open(dev, ud_info[dev->d_unit].mediasize, - ud_info[dev->d_unit].sectorsize, 0)); + ud_info[dev->d_unit].sectorsize)); } static int From owner-svn-src-head@freebsd.org Thu Mar 16 12:16:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 021BDD06225; Thu, 16 Mar 2017 12:16:25 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 C34571CC0; Thu, 16 Mar 2017 12:16:24 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2GCGNUf024270; Thu, 16 Mar 2017 12:16:23 GMT (envelope-from maxim@FreeBSD.org) Received: (from maxim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2GCGNaT024269; Thu, 16 Mar 2017 12:16:23 GMT (envelope-from maxim@FreeBSD.org) Message-Id: <201703161216.v2GCGNaT024269@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: maxim set sender to maxim@FreeBSD.org using -f From: Maxim Konovalov Date: Thu, 16 Mar 2017 12:16:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315409 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 12:16:25 -0000 Author: maxim Date: Thu Mar 16 12:16:23 2017 New Revision: 315409 URL: https://svnweb.freebsd.org/changeset/base/315409 Log: Spell kern.trap_enotcap. PR: 217836 Submitted by: tobik Modified: head/lib/libc/sys/cap_enter.2 Modified: head/lib/libc/sys/cap_enter.2 ============================================================================== --- head/lib/libc/sys/cap_enter.2 Thu Mar 16 12:04:43 2017 (r315408) +++ head/lib/libc/sys/cap_enter.2 Thu Mar 16 12:16:23 2017 (r315409) @@ -71,7 +71,7 @@ returns a flag indicating whether or not sandbox. .Sh RUN-TIME SETTINGS If the -.Dv kern.trap_enocap +.Dv kern.trap_enotcap sysctl MIB is set to a non-zero value, then for any process executing in a capability mode sandbox, any syscall which results in either an .Er ENOTCAPABLE From owner-svn-src-head@freebsd.org Thu Mar 16 12:33:35 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0388D067E5; Thu, 16 Mar 2017 12:33:35 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF61516C8; Thu, 16 Mar 2017 12:33:35 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2GCXYwl032515; Thu, 16 Mar 2017 12:33:34 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2GCXYPo032514; Thu, 16 Mar 2017 12:33:34 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201703161233.v2GCXYPo032514@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 16 Mar 2017 12:33:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315410 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 12:33:36 -0000 Author: hselasky Date: Thu Mar 16 12:33:34 2017 New Revision: 315410 URL: https://svnweb.freebsd.org/changeset/base/315410 Log: Define some more LinuxKPI task related macros. Obtained from: kmacy @ MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/sched.h Modified: head/sys/compat/linuxkpi/common/include/linux/sched.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/sched.h Thu Mar 16 12:16:23 2017 (r315409) +++ head/sys/compat/linuxkpi/common/include/linux/sched.h Thu Mar 16 12:33:34 2017 (r315410) @@ -69,6 +69,12 @@ struct task_struct { #define current ((struct task_struct *)curthread->td_lkpi_task) +#define task_pid(task) ((task)->task_thread->td_proc->p_pid) +#define task_pid_nr(task) ((task)->task_thread->td_tid) +#define get_pid(x) (x) +#define put_pid(x) +#define current_euid() (curthread->td_ucred->cr_uid) + #define set_current_state(x) \ atomic_store_rel_int((volatile int *)¤t->state, (x)) #define __set_current_state(x) current->state = (x) From owner-svn-src-head@freebsd.org Thu Mar 16 13:01:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BCA4CD0C509; Thu, 16 Mar 2017 13:01:24 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C6F5180F; Thu, 16 Mar 2017 13:01:24 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2GD1NPU043762; Thu, 16 Mar 2017 13:01:23 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2GD1N3S043761; Thu, 16 Mar 2017 13:01:23 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201703161301.v2GD1N3S043761@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Thu, 16 Mar 2017 13:01:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315411 - head/contrib/traceroute X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 13:01:24 -0000 Author: mmel Date: Thu Mar 16 13:01:23 2017 New Revision: 315411 URL: https://svnweb.freebsd.org/changeset/base/315411 Log: Unbreak traceroute on system built without CAPSICUM Modified: head/contrib/traceroute/traceroute.c Modified: head/contrib/traceroute/traceroute.c ============================================================================== --- head/contrib/traceroute/traceroute.c Thu Mar 16 12:33:34 2017 (r315410) +++ head/contrib/traceroute/traceroute.c Thu Mar 16 13:01:23 2017 (r315411) @@ -1023,8 +1023,13 @@ main(int argc, char **argv) * We must connect(2) our socket before this point. */ if (cansandbox && cap_enter() < 0) { - Fprintf(stderr, "%s: cap_enter: %s\n", prog, strerror(errno)); - exit(1); + if (errno != ENOSYS) { + Fprintf(stderr, "%s: cap_enter: %s\n", prog, + strerror(errno)); + exit(1); + } else { + cansandbox = false; + } } cap_rights_init(&rights, CAP_SEND, CAP_SETSOCKOPT); From owner-svn-src-head@freebsd.org Thu Mar 16 13:03:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9EC68D0C755; Thu, 16 Mar 2017 13:03:32 +0000 (UTC) (envelope-from badger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 76C961BCC; Thu, 16 Mar 2017 13:03:32 +0000 (UTC) (envelope-from badger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2GD3Vd6044723; Thu, 16 Mar 2017 13:03:31 GMT (envelope-from badger@FreeBSD.org) Received: (from badger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2GD3V3m044721; Thu, 16 Mar 2017 13:03:31 GMT (envelope-from badger@FreeBSD.org) Message-Id: <201703161303.v2GD3V3m044721@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: badger set sender to badger@FreeBSD.org using -f From: Eric Badger Date: Thu, 16 Mar 2017 13:03:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315412 - in head: sys/kern tests/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 13:03:32 -0000 Author: badger Date: Thu Mar 16 13:03:31 2017 New Revision: 315412 URL: https://svnweb.freebsd.org/changeset/base/315412 Log: Don't clear p_ptevents on normal SIGKILL delivery The ptrace() user has the option of discarding the signal. In such a case, p_ptevents should not be modified. If the ptrace() user decides to send a SIGKILL, ptevents will be cleared in ptracestop(). procfs events do not have the capability to discard the signal, so continue to clear the mask in that case. Reviewed by: jhb (initial revision) MFC after: 1 week Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D9939 Modified: head/sys/kern/kern_sig.c head/tests/sys/kern/ptrace_test.c Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Thu Mar 16 13:01:23 2017 (r315411) +++ head/sys/kern/kern_sig.c Thu Mar 16 13:03:31 2017 (r315412) @@ -2179,11 +2179,9 @@ tdsendsignal(struct proc *p, struct thre if (action == SIG_HOLD && !((prop & SIGPROP_CONT) && (p->p_flag & P_STOPPED_SIG))) return (ret); - /* - * SIGKILL: Remove procfs STOPEVENTs and ptrace events. - */ + + /* SIGKILL: Remove procfs STOPEVENTs. */ if (sig == SIGKILL) { - p->p_ptevents = 0; /* from procfs_ioctl.c: PIOCBIC */ p->p_stops = 0; /* from procfs_ioctl.c: PIOCCONT */ Modified: head/tests/sys/kern/ptrace_test.c ============================================================================== --- head/tests/sys/kern/ptrace_test.c Thu Mar 16 13:01:23 2017 (r315411) +++ head/tests/sys/kern/ptrace_test.c Thu Mar 16 13:03:31 2017 (r315412) @@ -2919,6 +2919,79 @@ ATF_TC_BODY(ptrace__parent_terminate_wit terminate_with_pending_sigstop(false); } +/* + * Verify that after ptrace() discards a SIGKILL signal, the event mask + * is not modified. + */ +ATF_TC_WITHOUT_HEAD(ptrace__event_mask_sigkill_discard); +ATF_TC_BODY(ptrace__event_mask_sigkill_discard, tc) +{ + struct ptrace_lwpinfo pl; + pid_t fpid, wpid; + int status, event_mask, new_event_mask; + + ATF_REQUIRE((fpid = fork()) != -1); + if (fpid == 0) { + trace_me(); + raise(SIGSTOP); + exit(0); + } + + /* The first wait() should report the stop from trace_me(). */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + + /* Set several unobtrusive event bits. */ + event_mask = PTRACE_EXEC | PTRACE_FORK | PTRACE_LWP; + ATF_REQUIRE(ptrace(PT_SET_EVENT_MASK, wpid, (caddr_t)&event_mask, + sizeof(event_mask)) == 0); + + /* Send a SIGKILL without using ptrace. */ + ATF_REQUIRE(kill(fpid, SIGKILL) == 0); + + /* Continue the child ignoring the SIGSTOP. */ + ATF_REQUIRE(ptrace(PT_CONTINUE, fpid, (caddr_t)1, 0) == 0); + + /* The next stop should be due to the SIGKILL. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGKILL); + + ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, sizeof(pl)) != -1); + ATF_REQUIRE(pl.pl_flags & PL_FLAG_SI); + ATF_REQUIRE(pl.pl_siginfo.si_signo == SIGKILL); + + /* Continue the child ignoring the SIGKILL. */ + ATF_REQUIRE(ptrace(PT_CONTINUE, fpid, (caddr_t)1, 0) == 0); + + /* The next wait() should report the stop from SIGSTOP. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + + /* Check the current event mask. It should not have changed. */ + new_event_mask = 0; + ATF_REQUIRE(ptrace(PT_GET_EVENT_MASK, wpid, (caddr_t)&new_event_mask, + sizeof(new_event_mask)) == 0); + ATF_REQUIRE(event_mask == new_event_mask); + + /* Continue the child to let it exit. */ + ATF_REQUIRE(ptrace(PT_CONTINUE, fpid, (caddr_t)1, 0) == 0); + + /* The last event should be for the child process's exit. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(WIFEXITED(status)); + ATF_REQUIRE(WEXITSTATUS(status) == 0); + + wpid = wait(&status); + ATF_REQUIRE(wpid == -1); + ATF_REQUIRE(errno == ECHILD); +} + ATF_TP_ADD_TCS(tp) { @@ -2965,6 +3038,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, ptrace__PT_CONTINUE_with_signal_thread_sigmask); ATF_TP_ADD_TC(tp, ptrace__parent_terminate_with_pending_sigstop1); ATF_TP_ADD_TC(tp, ptrace__parent_terminate_with_pending_sigstop2); + ATF_TP_ADD_TC(tp, ptrace__event_mask_sigkill_discard); return (atf_no_error()); } From owner-svn-src-head@freebsd.org Thu Mar 16 13:19:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5A1AD0CE89; Thu, 16 Mar 2017 13:19:39 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 92A711673; Thu, 16 Mar 2017 13:19:39 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2GDJcdA049229; Thu, 16 Mar 2017 13:19:38 GMT (envelope-from maxim@FreeBSD.org) Received: (from maxim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2GDJcXr049228; Thu, 16 Mar 2017 13:19:38 GMT (envelope-from maxim@FreeBSD.org) Message-Id: <201703161319.v2GDJcXr049228@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: maxim set sender to maxim@FreeBSD.org using -f From: Maxim Konovalov Date: Thu, 16 Mar 2017 13:19:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315413 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 13:19:39 -0000 Author: maxim Date: Thu Mar 16 13:19:38 2017 New Revision: 315413 URL: https://svnweb.freebsd.org/changeset/base/315413 Log: More trap_enotcap spelling fixes. PR: 217839 Submitted by: tobik Modified: head/lib/libc/sys/procctl.2 Modified: head/lib/libc/sys/procctl.2 ============================================================================== --- head/lib/libc/sys/procctl.2 Thu Mar 16 13:03:31 2017 (r315412) +++ head/lib/libc/sys/procctl.2 Thu Mar 16 13:19:38 2017 (r315413) @@ -355,7 +355,7 @@ calls. .It Dv PROC_TRAPCAP_CTL_DISABLE Disable the signal delivery on capability mode access violations. Note that the global sysctl -.Dv kern.trap_enocap +.Dv kern.trap_enotcap might still cause the signal to be delivered. See .Xr capsicum 4 . @@ -386,7 +386,7 @@ value if the process control enables sig otherwise. .Pp See the note about sysctl -.Dv kern.trap_enocap +.Dv kern.trap_enotcap above, which gives independent global control of signal delivery. .El .Sh NOTES From owner-svn-src-head@freebsd.org Thu Mar 16 16:40:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33CF7D0FEF9; Thu, 16 Mar 2017 16:40:56 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 0E7CF1AD4; Thu, 16 Mar 2017 16:40:55 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2GGetd1033825; Thu, 16 Mar 2017 16:40:55 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2GGes8N033822; Thu, 16 Mar 2017 16:40:54 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201703161640.v2GGes8N033822@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Thu, 16 Mar 2017 16:40:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315418 - in head/sys/teken: . libteken X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 16:40:56 -0000 Author: bde Date: Thu Mar 16 16:40:54 2017 New Revision: 315418 URL: https://svnweb.freebsd.org/changeset/base/315418 Log: Add teken_256to16() to convert xterm-256 256-color codes to xterm 16-color codes. This will be used to fix bright colors. Improve teken_256to8(). Use a lookup table instead of calculations. The calculations were inaccurate since they used indexes into the xterm-256 6x6x6 color map instead of actual xterm colors. Also, change the threshold for converting to a primary color: require the primary's component to be 2 or more higher instead of just higher. This affects about 1/5 of the table entries and gives uniformly distributed colors in the 6x6x6 submap except for greys (35 entries each for red, green, blue, cyan, brown and magenta, instead of approx. only 15 each for the mixed colors). Even more mixed colors would be better for matching colors, but uniform distribution is best for preserving contrast. For teken_256to16(), bright colors are just the ones with luminosity >= 60%. These are actually light colors (more white instead of more saturation), while xterm bright colors except for white itself are actually saturated with no white, so have luminosity only 50%. These functions are layering violations. teken cannot do correct conversions since it shouldn't know the color maps of anything except xterm. Translating through xterm-16 colors loses information. This gives bugs like xterm-256 near-brown -> xterm-16 red -> VGA red. Modified: head/sys/teken/libteken/teken.3 head/sys/teken/teken.c head/sys/teken/teken.h Modified: head/sys/teken/libteken/teken.3 ============================================================================== --- head/sys/teken/libteken/teken.3 Thu Mar 16 15:43:32 2017 (r315417) +++ head/sys/teken/libteken/teken.3 Thu Mar 16 16:40:54 2017 (r315418) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 9, 2011 +.Dd Mar 13, 2017 .Dt TEKEN 3 .Os .Sh NAME @@ -57,6 +57,8 @@ .Ft const char * .Fn teken_get_sequence "teken_t *t" "unsigned int id" .Ft teken_color_t +.Fn teken_256to16 "teken_color_t color" +.Ft teken_color_t .Fn teken_256to8 "teken_color_t color" .Ft void .Fn teken_get_defattr_cons25 "teken_t *t" "int *fg" "int *bg" @@ -163,10 +165,22 @@ This library also provides a set of func any modern applications. .Pp The +.Fn teken_256to16 +function converts an xterm-256 256-color code to an xterm 16-color code +whose color with default palettes is as similar as possible (not very +similar). +The lower 3 bits of the result are the ANSI color and the next lowest +bit is brightness. +Other layers (hardare and software) that only support 16 colors can use +this to avoid knowing the details of 256-color codes. +.Pp +The .Fn teken_256to8 -function converts a color code to one of the 8 primary colors, allowing -the terminal to be rendered on graphics hardware that only supports 8 or -16 colors (e.g. VGA). +function is similar to +.Fn teken_256to16 +except it converts to an ANSI 8-color code. +This is more accurate than discarding the brigtness bit in the result of +.Fn teken_256to16 . .Pp The .Fn teken_get_defattr_cons25 Modified: head/sys/teken/teken.c ============================================================================== --- head/sys/teken/teken.c Thu Mar 16 15:43:32 2017 (r315417) +++ head/sys/teken/teken.c Thu Mar 16 16:40:54 2017 (r315418) @@ -452,55 +452,203 @@ teken_state_numbers(teken_t *t, teken_ch return (0); } +#define k TC_BLACK +#define b TC_BLUE +#define y TC_BROWN +#define c TC_CYAN +#define g TC_GREEN +#define m TC_MAGENTA +#define r TC_RED +#define w TC_WHITE +#define K (TC_BLACK | TC_LIGHT) +#define B (TC_BLUE | TC_LIGHT) +#define Y (TC_BROWN | TC_LIGHT) +#define C (TC_CYAN | TC_LIGHT) +#define G (TC_GREEN | TC_LIGHT) +#define M (TC_MAGENTA | TC_LIGHT) +#define R (TC_RED | TC_LIGHT) +#define W (TC_WHITE | TC_LIGHT) + +/** + * The xterm-256 color map has steps of 0x28 (in the range 0-0xff), except + * for the first step which is 0x5f. Scale to the range 0-6 by dividing + * by 0x28 and rounding down. The range of 0-5 cannot represent the + * larger first step. + * + * This table is generated by the follow rules: + * - if all components are equal, the result is black for (0, 0, 0) and + * (2, 2, 2), else white; otherwise: + * - subtract the smallest component from all components + * - if this gives only one nonzero component, then that is the color + * - else if one component is 2 or more larger than the other nonzero one, + * then that component gives the color + * - else there are 2 nonzero components. The color is that of a small + * equal mixture of these components (cyan, yellow or magenta). E.g., + * (0, 5, 6) (Turquoise2) is a much purer cyan than (0, 2, 3) + * (DeepSkyBlue4), but we map both to cyan since we can't represent + * delicate shades of either blue or cyan and blue would be worse. + * Here it is important that components of 1 never occur. Blue would + * be twice as large as green in (0, 1, 2). + */ +static const teken_color_t teken_256to8tab[] = { + /* xterm-16+ 8 dark colors: */ + 0, r, g, y, b, m, c, w, + + /* xterm-16+ 8 light colors: */ + 0, R, G, Y, B, M, C, W, + + /* Red0 submap. */ + k, b, b, b, b, b, + g, c, c, b, b, b, + g, c, c, c, b, b, + g, g, c, c, c, b, + g, g, g, c, c, c, + g, g, g, g, c, c, + + /* Red2 submap. */ + r, m, m, b, b, b, + y, k, b, b, b, b, + y, g, c, c, b, b, + g, g, c, c, c, b, + g, g, g, c, c, c, + g, g, g, g, c, c, + + /* Red3 submap. */ + r, m, m, m, b, b, + y, r, m, m, b, b, + y, y, w, b, b, b, + y, y, g, c, c, b, + g, g, g, c, c, c, + g, g, g, g, c, c, + + /* Red4 submap. */ + r, r, m, m, m, b, + r, r, m, m, m, b, + y, y, r, m, m, b, + y, y, y, w, b, b, + y, y, y, g, c, c, + g, g, g, g, c, c, + + /* Red5 submap. */ + r, r, r, m, m, m, + r, r, r, m, m, m, + r, r, r, m, m, m, + y, y, y, r, m, m, + y, y, y, y, w, b, + y, y, y, y, g, c, + + /* Red6 submap. */ + r, r, r, r, m, m, + r, r, r, r, m, m, + r, r, r, r, m, m, + r, r, r, r, m, m, + y, y, y, y, r, m, + y, y, y, y, y, w, + + /* Grey submap. */ + k, k, k, k, k, k, + k, k, k, k, k, k, + w, w, w, w, w, w, + w, w, w, w, w, w, +}; + +/* + * This table is generated from the previous one by setting TC_LIGHT for + * entries whose luminosity in the xterm256 color map is 60% or larger. + * Thus the previous table is currently not really needed. It will be + * used for different fine tuning of the tables. + */ +static const teken_color_t teken_256to16tab[] = { + /* xterm-16+ 8 dark colors: */ + 0, r, g, y, b, m, c, w, + + /* xterm-16+ 8 light colors: */ + 0, R, G, Y, B, M, C, W, + + /* Red0 submap. */ + k, b, b, b, b, b, + g, c, c, b, b, b, + g, c, c, c, b, b, + g, g, c, c, c, b, + g, g, g, c, c, c, + g, g, g, g, c, c, + + /* Red2 submap. */ + r, m, m, b, b, b, + y, K, b, b, B, B, + y, g, c, c, B, B, + g, g, c, c, C, B, + g, G, G, C, C, C, + g, G, G, G, C, C, + + /* Red3 submap. */ + r, m, m, m, b, b, + y, r, m, m, B, B, + y, y, w, B, B, B, + y, y, G, C, C, B, + g, G, G, C, C, C, + g, G, G, G, C, C, + + /* Red4 submap. */ + r, r, m, m, m, b, + r, r, m, m, M, B, + y, y, R, M, M, B, + y, y, Y, W, B, B, + y, Y, Y, G, C, C, + g, G, G, G, C, C, + + /* Red5 submap. */ + r, r, r, m, m, m, + r, R, R, M, M, M, + r, R, R, M, M, M, + y, Y, Y, R, M, M, + y, Y, Y, Y, W, B, + y, Y, Y, Y, G, C, + + /* Red6 submap. */ + r, r, r, r, m, m, + r, R, R, R, M, M, + r, R, R, R, M, M, + r, R, R, R, M, M, + y, Y, Y, Y, R, M, + y, Y, Y, Y, Y, W, + + /* Grey submap. */ + k, k, k, k, k, k, + K, K, K, K, K, K, + w, w, w, w, w, w, + W, W, W, W, W, W, +}; + +#undef k +#undef b +#undef y +#undef c +#undef g +#undef m +#undef r +#undef w +#undef K +#undef B +#undef Y +#undef C +#undef G +#undef M +#undef R +#undef W + teken_color_t teken_256to8(teken_color_t c) { - unsigned int r, g, b; - if (c < 16) { - /* Traditional color indices. */ - return (c % 8); - } else if (c >= 244) { - /* Upper grayscale colors. */ - return (TC_WHITE); - } else if (c >= 232) { - /* Lower grayscale colors. */ - return (TC_BLACK); - } - - /* Convert to RGB. */ - c -= 16; - b = c % 6; - g = (c / 6) % 6; - r = c / 36; - - if (r < g) { - /* Possibly green. */ - if (g < b) - return (TC_BLUE); - else if (g > b) - return (TC_GREEN); - else - return (TC_CYAN); - } else if (r > g) { - /* Possibly red. */ - if (r < b) - return (TC_BLUE); - else if (r > b) - return (TC_RED); - else - return (TC_MAGENTA); - } else { - /* Possibly brown. */ - if (g < b) - return (TC_BLUE); - else if (g > b) - return (TC_BROWN); - else if (r < 3) - return (TC_BLACK); - else - return (TC_WHITE); - } + return (teken_256to8tab[c % 256]); +} + +teken_color_t +teken_256to16(teken_color_t c) +{ + + return (teken_256to16tab[c % 256]); } static const char * const special_strings_cons25[] = { Modified: head/sys/teken/teken.h ============================================================================== --- head/sys/teken/teken.h Thu Mar 16 15:43:32 2017 (r315417) +++ head/sys/teken/teken.h Thu Mar 16 16:40:54 2017 (r315418) @@ -56,6 +56,7 @@ typedef unsigned char teken_color_t; #define TC_CYAN 6 #define TC_WHITE 7 #define TC_NCOLORS 8 +#define TC_LIGHT 8 /* ORed with the others. */ typedef struct { teken_unit_t tp_row; @@ -203,6 +204,7 @@ void teken_set_8bit(teken_t *); void teken_set_cons25(teken_t *); /* Color conversion. */ +teken_color_t teken_256to16(teken_color_t); teken_color_t teken_256to8(teken_color_t); #endif /* !_TEKEN_H_ */ From owner-svn-src-head@freebsd.org Thu Mar 16 16:49:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B40CD0E20A; Thu, 16 Mar 2017 16:49:29 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D3A91F1E; Thu, 16 Mar 2017 16:49:29 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2GGnShd035013; Thu, 16 Mar 2017 16:49:28 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2GGnSZp035011; Thu, 16 Mar 2017 16:49:28 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201703161649.v2GGnSZp035011@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 16 Mar 2017 16:49:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315419 - in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 16:49:29 -0000 Author: hselasky Date: Thu Mar 16 16:49:27 2017 New Revision: 315419 URL: https://svnweb.freebsd.org/changeset/base/315419 Log: Implement more userspace memory access functions in the LinuxKPI. Obtained from: kmacy @ MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/uaccess.h head/sys/compat/linuxkpi/common/src/linux_compat.c Modified: head/sys/compat/linuxkpi/common/include/linux/uaccess.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/uaccess.h Thu Mar 16 16:40:54 2017 (r315418) +++ head/sys/compat/linuxkpi/common/include/linux/uaccess.h Thu Mar 16 16:49:27 2017 (r315419) @@ -29,11 +29,22 @@ * * $FreeBSD$ */ + #ifndef _LINUX_UACCESS_H_ #define _LINUX_UACCESS_H_ +#include +#include +#include + +#include +#include + #include +#define VERIFY_READ VM_PROT_READ +#define VERIFY_WRITE VM_PROT_WRITE + #define __get_user(_x, _p) ({ \ int __err; \ __typeof(*(_p)) __x; \ @@ -48,9 +59,13 @@ }) #define get_user(_x, _p) linux_copyin((_p), &(_x), sizeof(*(_p))) #define put_user(_x, _p) linux_copyout(&(_x), (_p), sizeof(*(_p))) +#define clear_user(...) linux_clear_user(__VA_ARGS__) +#define access_ok(...) linux_access_ok(__VA_ARGS__) extern int linux_copyin(const void *uaddr, void *kaddr, size_t len); extern int linux_copyout(const void *kaddr, void *uaddr, size_t len); +extern size_t linux_clear_user(void *uaddr, size_t len); +extern int linux_access_ok(int rw, const void *uaddr, size_t len); /* * NOTE: The returned value from pagefault_disable() must be stored @@ -69,4 +84,10 @@ pagefault_enable(int save) vm_fault_enable_pagefaults(save); } -#endif /* _LINUX_UACCESS_H_ */ +static inline bool +pagefault_disabled(void) +{ + return ((curthread->td_pflags & TDP_NOFAULTING) != 0); +} + +#endif /* _LINUX_UACCESS_H_ */ Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Thu Mar 16 16:40:54 2017 (r315418) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Thu Mar 16 16:49:27 2017 (r315419) @@ -508,6 +508,53 @@ linux_copyout(const void *kaddr, void *u return (-copyout(kaddr, uaddr, len)); } +size_t +linux_clear_user(void *_uaddr, size_t _len) +{ + uint8_t *uaddr = _uaddr; + size_t len = _len; + + /* make sure uaddr is aligned before going into the fast loop */ + while (((uintptr_t)uaddr & 7) != 0 && len > 7) { + if (subyte(uaddr, 0)) + return (_len); + uaddr++; + len--; + } + + /* zero 8 bytes at a time */ + while (len > 7) { + if (suword64(uaddr, 0)) + return (_len); + uaddr += 8; + len -= 8; + } + + /* zero fill end, if any */ + while (len > 0) { + if (subyte(uaddr, 0)) + return (_len); + uaddr++; + len--; + } + return (0); +} + +int +linux_access_ok(int rw, const void *uaddr, size_t len) +{ + uintptr_t saddr; + uintptr_t eaddr; + + /* get start and end address */ + saddr = (uintptr_t)uaddr; + eaddr = (uintptr_t)uaddr + len; + + /* verify addresses are valid for userspace */ + return ((saddr == eaddr) || + (eaddr > saddr && eaddr <= VM_MAXUSER_ADDRESS)); +} + static int linux_dev_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thread *td) From owner-svn-src-head@freebsd.org Thu Mar 16 16:53:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7DB4D0E60B; Thu, 16 Mar 2017 16:53:24 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83F86152D; Thu, 16 Mar 2017 16:53:23 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2GGrMFh038811; Thu, 16 Mar 2017 16:53:22 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2GGrMHg038810; Thu, 16 Mar 2017 16:53:22 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201703161653.v2GGrMHg038810@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 16 Mar 2017 16:53:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315420 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 16:53:24 -0000 Author: hselasky Date: Thu Mar 16 16:53:22 2017 New Revision: 315420 URL: https://svnweb.freebsd.org/changeset/base/315420 Log: The LinuxKPI pagefault disable and enable functions can only be used pairwise to support the FreeBSD way of pushing and popping the page fault flags. Ensure this by requiring every occurrence of pagefault disable function call to have a corresponding pagefault enable call. Obtained from: kmacy @ MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/uaccess.h Modified: head/sys/compat/linuxkpi/common/include/linux/uaccess.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/uaccess.h Thu Mar 16 16:49:27 2017 (r315419) +++ head/sys/compat/linuxkpi/common/include/linux/uaccess.h Thu Mar 16 16:53:22 2017 (r315420) @@ -67,22 +67,13 @@ extern int linux_copyout(const void *kad extern size_t linux_clear_user(void *uaddr, size_t len); extern int linux_access_ok(int rw, const void *uaddr, size_t len); -/* - * NOTE: The returned value from pagefault_disable() must be stored - * and passed to pagefault_enable(). Else possible recursion on the - * state can be lost. - */ -static inline int __must_check -pagefault_disable(void) -{ - return (vm_fault_disable_pagefaults()); -} +#define pagefault_disable(void) do { \ + int __saved_pflags = \ + vm_fault_disable_pagefaults() -static inline void -pagefault_enable(int save) -{ - vm_fault_enable_pagefaults(save); -} +#define pagefault_enable(void) \ + vm_fault_enable_pagefaults(__saved_pflags); \ +} while (0) static inline bool pagefault_disabled(void) From owner-svn-src-head@freebsd.org Thu Mar 16 17:46:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D80FD0F9D3; Thu, 16 Mar 2017 17:46:40 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 92E42192D; Thu, 16 Mar 2017 17:46:39 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 4FA26D61F06; Fri, 17 Mar 2017 04:46:36 +1100 (AEDT) Date: Fri, 17 Mar 2017 04:46:35 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bruce Evans cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r315418 - in head/sys/teken: . libteken In-Reply-To: <201703161640.v2GGes8N033822@repo.freebsd.org> Message-ID: <20170317040832.N26977@besplex.bde.org> References: <201703161640.v2GGes8N033822@repo.freebsd.org> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-884451554-1489686395=:26977" X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=KeqiiUQD c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=nlC_4_pT8q9DhB4Ho9EA:9 a=F-3Qla34dP4qacPy338A:9 a=CjuIK1q_8ugA:10 a=wm9pWYYYZ7nb34CoUz0A:9 a=ukFY2jYFVQwU3x9OMZcA:9 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 17:46:40 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-884451554-1489686395=:26977 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed On Thu, 16 Mar 2017, Bruce Evans wrote: > Log: > Add teken_256to16() to convert xterm-256 256-color codes to xterm 16-color > codes. This will be used to fix bright colors. > > Improve teken_256to8(). Use a lookup table instead of calculations. The > ... A shell script for printing some text color maps is attached. Also a sloppier one for printing some CSI sequences. The first one can easily be translated to xterm sequences. I used syscons F and G sequences to print bright colors with sc and vt since pure xterm bright colors are too broken to display themselves without bold hacks. The F and G sequences generate bold hacks in the kernel, and further complications are needed to turn these off to test if bright colors are fixed. Real xterm doesn't fake bold using brightness, so bold hacks on dark characters don't work for it. The first one needs the user to load a cp437 font for syscons and a unicode font for vt. The script doesn't load a font since it is too hard to restore or reset fonts. Similarly for colors. Run the first one on a kernel without this commit to see the old color map. It looked just wrong (unstructured) before I found a good tabular format to print it. I then wrote "improved" maps based on expanding the 2x2x2 and 3x3x3 maps. These were too simple. Some of the comments/printfs are out of date and still refer to this expansion. Bruce --0-884451554-1489686395=:26977 Content-Type: TEXT/PLAIN; charset=US-ASCII; name=sc-vt-colormap Content-Transfer-Encoding: BASE64 Content-ID: <20170317044635.X26977@besplex.bde.org> Content-Description: Content-Disposition: attachment; filename=sc-vt-colormap IyEvYmluL3NoDQoNCiMgUHJpbnQgc29tZSBjb2xvciBtYXBzIGZvciBzeXNj b25zIGFuZCB2dC4NCg0KVlRZPSQoc3lzY3RsIC1uIGtlcm4udnR5IDI+L2Rl di9udWxsKQ0KDQojIFhYWCB1c2VyIG11c3QgbG9hZCBmb250IHdpdGggYmxv Y2sgY2hhciB3aGVyZSB3ZSBleHBlY3QgaXQuDQpjYXNlICRWVFkgaW4NCnZ0 KQ0KCSMgWFhYIGJyb2tlbiBpbiB0ZXh0IG1vZGUgKG5vIGV4dGVuc2lvbiBm cm9tIDh0aCBiaXQgdG8gOXRoKS4NCglCTD0iXDM0MlwyMjZcMjEwIjs7CSMg QmxvY2sgY2hhciAweDI1ODggaW4gVVRGOCBmb3IgdW5pY29kZSBmb250Lg0K KikNCglCTD0iXDMzMyI7OwkJIyBCbG9jayBjaGFyIDB4REIgaW4gQVNDSUkg Zm9yIGNwNDM3IGZvbnQuDQplc2FjDQpDU0k9IlwwMzNbIg0KDQprKCkgew0K CXByaW50ZiAiJENTST0wRiRCTCRCTCINCn0NCmIoKSB7DQoJcHJpbnRmICIk Q1NJPTFGJEJMJEJMIg0KfQ0KZygpIHsNCglwcmludGYgIiRDU0k9MkYkQkwk QkwiDQp9DQpjKCkgew0KCXByaW50ZiAiJENTST0zRiRCTCRCTCINCn0NCnIo KSB7DQoJcHJpbnRmICIkQ1NJPTRGJEJMJEJMIg0KfQ0KbSgpIHsNCglwcmlu dGYgIiRDU0k9NUYkQkwkQkwiDQp9DQp5KCkgew0KCXByaW50ZiAiJENTST02 RiRCTCRCTCINCn0NCncoKSB7DQoJcHJpbnRmICIkQ1NJPTdGJEJMJEJMIg0K fQ0KSygpIHsNCglwcmludGYgIiRDU0k9OEYkQkwkQkwiDQp9DQpCKCkgew0K CXByaW50ZiAiJENTST05RiRCTCRCTCINCn0NCkcoKSB7DQoJcHJpbnRmICIk Q1NJPTEwRiRCTCRCTCINCn0NCkMoKSB7DQoJcHJpbnRmICIkQ1NJPTExRiRC TCRCTCINCn0NClIoKSB7DQoJcHJpbnRmICIkQ1NJPTEyRiRCTCRCTCINCn0N Ck0oKSB7DQoJcHJpbnRmICIkQ1NJPTEzRiRCTCRCTCINCn0NClkoKSB7DQoJ cHJpbnRmICIkQ1NJPTE0RiRCTCRCTCINCn0NClcoKSB7DQoJcHJpbnRmICIk Q1NJPTE1RiRCTCRCTCINCn0NCm1heWJlX2NscmVvbCgpIHsNCgljYXNlICRW VFkgaW4NCgl2dCkNCgkJOzsJCSMgTm90IG5lZWRlZCwgYW5kIGhhcm1mdWws IGlmIG5vIGF1dG9tYXJnLg0KCSopDQoJCXByaW50ZiAiJHtDU0l9MEsiOzsN Cgllc2FjDQp9DQpkZW1vX2RlZmNvbG9ycygpIHsNCglwcmludGYgIiR7Q1NJ fTBtIg0KCXByaW50ZiAiJENTST0xNUYkQ1NJPTBHIg0KfQ0KbmwoKSB7DQoJ ZGVtb19kZWZjb2xvcnMNCgltYXliZV9jbHJlb2wJCSMgUGFydC4gZml4IGZv ciBtZXNzIG1hZGUgYnkgYXV0b21hcmcrc2Nyb2xsLg0KCXByaW50ZiAiXG4i DQp9DQpkZWZjb2xvcnMoKSB7DQoJcHJpbnRmICIke0NTSX0wbSINCglwcmlu dGYgIiRDU0k9N0YkQ1NJPTBHIgkjIFBhcnRpYWwgZml4IGZvciBicm9rZW4g JHtDU0l9MHguDQoJcHJpbnRmICIke0NTSX0weCINCn0NCnVuaGFja2JvbGQo KSB7DQoJIyBXZSBzZXQgYnJpZ2h0IHcgaW4gZGVtb19kZWZlZmNvbG9ycyBm b3IgcHJpbnRpbmcgbWVzc2FnZXMNCgkjIGFuZCBiZyBjb2xvciB0ZXN0cywg YnV0IHRoZSB0ZWtlbiBib2xkIGhhY2sgZm9yIHRoaXMgc2V0dGluZw0KCSMg bGVha3MgaW50byBmb2xsb3dpbmcgZmcgY29sb3Igc2V0dGluZ3MuICBVbmRv IHRoZSBoYWNrLCBpZiBhbnkuDQoJcHJpbnRmICIke0NTSX0yMm0iDQp9DQoN CmRlbW9fZGVmY29sb3JzDQoNCnByaW50ZiAiMngyeDIgY21hcCwgdmVydGlj YWw6XG4iDQprOyBiOyBubA0KZzsgYzsgbmwNCnI7IG07IG5sDQp5OyB3OyBu bA0KcHJpbnRmICIyeDJ4MiBjbWFwLCBob3Jpem9udGFsOlxuIg0KazsgYjsg ZzsgYzsgcjsgbTsgeTsgdzsgbmwNCg0KcHJpbnRmICJcbjN4M3gzIGNtYXAs IHZlcnRpY2FsOlxuIg0KazsgYjsgQjsgbmwNCmc7IGM7IEM7IG5sDQpHOyBD OyBDOyBubA0KcjsgbTsgTTsgbmwNCnk7IHc7IEI7IG5sDQpZOyBHOyBDOyBu bA0KUjsgTTsgTTsgbmwNClk7IFI7IE07IG5sDQpZOyBZOyBXOyBubA0KcHJp bnRmICIzeDN4MyBjbWFwLCBob3Jpem9udGFsOlxuIg0KazsgYjsgQjsgZzsg YzsgQzsgRzsgQzsgQzsgbmwNCnI7IG07IE07IHk7IHc7IEI7IFk7IEc7IEM7 IG5sDQpSOyBNOyBNOyBZOyBSOyBNOyBZOyBZOyBXOyBubA0KDQpubDIoKSB7 DQoJIyBubA0KfQ0KDQpFWElUKCkgew0KCWRlZmNvbG9ycw0KCXByaW50ZiAn XDAzM1t4XDAzM1syOzZ4XDAzM1sxOzB4XDAzM1s2Ozd4XDAzM1s1OzR4Jw0K CXByaW50ZiAnXDAzM1s9M0ZcMDMzWz0wRycNCglleGl0DQp9DQoNCnByaW50 ZiAiXG44LWNvbG9yIDZ4Nng2ICsgMjQgY21hcCBmcm9tIGV4cGFuc2lvbiBv ZiAyeDJ4MiArIDJncmV5LCBzdHJ1Y3R1cmVkOlxuIg0KIyAwMDAgMDAyIDAw MyAwMDQgMDA1IDAwNg0KazsgICAgYjsgIGI7ICBiOyAgYjsgIGINCm5sMg0K IyAwMjAgMDIyIDAyMyAwMjQgMDI1IDAyNg0KZzsgICAgYzsgIGM7ICBiOyAg YjsgIGINCm5sMg0KIyAwMzAgMDMyIDAzMyAwMzQgMDM1IDAzNg0KZzsgICAg YzsgIGM7ICBjOyAgYjsgIGINCm5sMg0KIyAwNDAgMDQyIDA0MyAwNDQgMDQ1 IDA0Ng0KZzsgICAgZzsgIGM7ICBjOyAgYzsgIGINCm5sMg0KIyAwNTAgMDUy IDA1MyAwNTQgMDU1IDA1Ng0KZzsgICAgZzsgIGc7ICBjOyAgYzsgIGMNCm5s Mg0KIyAwNjAgMDYyIDA2MyAwNjQgMDY1IDA2Ng0KZzsgICAgZzsgIGc7ICBn OyAgYzsgIGMNCm5sDQoNCiMgMjAwIDIwMiAyMDMgMjA0IDIwNSAyMDYNCnI7 ICAgIG07ICBtOyAgYjsgIGI7ICBiDQpubDINCiMgMjIwIDIyMiAyMjMgMjI0 IDIyNSAyMjYNCnk7ICAgIGs7ICBiOyAgYjsgIGI7ICBiDQpubDINCiMgMjMw IDIzMiAyMzMgMjM0IDIzNSAyMzYNCnk7ICAgIGc7ICBjOyAgYzsgIGI7ICBi DQpubDINCiMgMjQwIDI0MiAyNDMgMjQ0IDI0NSAyNDYNCmc7ICAgIGc7ICBj OyAgYzsgIGM7ICBiDQpubDINCiMgMjUwIDI1MiAyNTMgMjU0IDI1NSAyNTYN Cmc7ICAgIGc7ICBnOyAgYzsgIGM7ICBjDQpubDINCiMgMjYwIDI2MiAyNjMg MjY0IDI2NSAyNjYNCmc7ICAgIGc7ICBnOyAgZzsgIGM7ICBjDQpubA0KDQoj IDMwMCAzMDIgMzAzIDMwNCAzMDUgMzA2DQpyOyAgICBtOyAgbTsgIG07ICBi OyAgYg0KbmwyDQojIDMyMCAzMjIgMzIzIDMyNCAzMjUgMzI2DQp5OyAgICBy OyAgbTsgIG07ICBiOyAgYg0KbmwyDQojIDMzMCAzMzIgMzMzIDMzNCAzMzUg MzM2DQp5OyAgICB5OyAgdzsgIGI7ICBiOyAgYg0KbmwyDQojIDM0MCAzNDIg MzQzIDM0NCAzNDUgMzQ2DQp5OyAgICB5OyAgZzsgIGM7ICBjOyAgYg0Kbmwy DQojIDM1MCAzNTIgMzUzIDM1NCAzNTUgMzU2DQpnOyAgICBnOyAgZzsgIGM7 ICBjOyAgYw0KbmwyDQojIDM2MCAzNjIgMzYzIDM2NCAzNjUgMzY2DQpnOyAg ICBnOyAgZzsgIGc7ICBjOyAgYw0KbmwNCg0KIyA0MDAgNDAyIDQwMyA0MDQg NDA1IDQwNg0KcjsgICAgcjsgIG07ICBtOyAgbTsgIGINCm5sMg0KIyA0MjAg NDIyIDQyMyA0MjQgNDI1IDQyNg0KcjsgICAgcjsgIG07ICBtOyAgbTsgIGIN Cm5sMg0KIyA0MzAgNDMyIDQzMyA0MzQgNDM1IDQzNg0KeTsgICAgeTsgIHI7 ICBtOyAgbTsgIGINCm5sMg0KIyA0NDAgNDQyIDQ0MyA0NDQgNDQ1IDQ0Ng0K eTsgICAgeTsgIHk7ICB3OyAgYjsgIGINCm5sMg0KIyA0NTAgNDUyIDQ1MyA0 NTQgNDU1IDQ1Ng0KeTsgICAgeTsgIHk7ICBnOyAgYzsgIGMNCm5sMg0KIyA0 NjAgNDYyIDQ2MyA0NjQgNDY1IDQ2Ng0KZzsgICAgZzsgIGc7ICBnOyAgYzsg IGMNCm5sDQoNCiMgNTAwIDUwMiA1MDMgNTA0IDUwNSA1MDYNCnI7ICAgIHI7 ICByOyAgbTsgIG07ICBtDQpubDINCiMgNTIwIDUyMiA1MjMgNTI0IDUyNSA1 MjYNCnI7ICAgIHI7ICByOyAgbTsgIG07ICBtDQpubDINCiMgNTMwIDUzMiA1 MzMgNTM0IDUzNSA1MzYNCnI7ICAgIHI7ICByOyAgbTsgIG07ICBtDQpubDIN CiMgNTQwIDU0MiA1NDMgNTQ0IDU0NSA1NDYNCnk7ICAgIHk7ICB5OyAgcjsg IG07ICBtDQpubDINCiMgNTUwIDU1MiA1NTMgNTU0IDU1NSA1NTYNCnk7ICAg IHk7ICB5OyAgeTsgIHc7ICBiDQpubDINCiMgNTYwIDU2MiA1NjMgNTY0IDU2 NSA1NjYNCnk7ICAgIHk7ICB5OyAgeTsgIGc7ICBjDQpubA0KDQojIDYwMCA2 MDIgNjAzIDYwNCA2MDUgNjA2DQpyOyAgICByOyAgcjsgIHI7ICBtOyAgbQ0K bmwyDQojIDYyMCA2MjIgNjIzIDYyNCA2MjUgNjI2DQpyOyAgICByOyAgcjsg IHI7ICBtOyAgbQ0KbmwyDQojIDYzMCA2MzIgNjMzIDYzNCA2MzUgNjM2DQpy OyAgICByOyAgcjsgIHI7ICBtOyAgbQ0KbmwyDQojIDY0MCA2NDIgNjQzIDY0 NCA2NDUgNjQ2DQpyOyAgICByOyAgcjsgIHI7ICBtOyAgbQ0KbmwyDQojIDY1 MCA2NTIgNjUzIDY1NCA2NTUgNjU2DQp5OyAgICB5OyAgeTsgIHk7ICByOyAg bQ0KbmwyDQojIDY2MCA2NjIgNjYzIDY2NCA2NjUgNjY2DQp5OyAgICB5OyAg eTsgIHk7ICB5OyAgdw0KbmwNCg0Kazsgazsgazsgazsgazsgaw0Kazsgazsg azsgazsgazsgaw0Kdzsgdzsgdzsgdzsgdzsgdw0Kdzsgdzsgdzsgdzsgdzsg dw0KbmwNCg0KcHJpbnRmICJcbjE2LWNvbG9yIDZ4Nng2ICsgMjQgY21hcCBm cm9tIGV4cGFuc2lvbiBvZiAzeDN4MyArIDRncmV5LCBzdHJ1Y3R1cmVkOlxu Ig0KIyAwMDAgMDAyIDAwMyAwMDQgMDA1IDAwNg0KazsgICAgYjsgIGI7ICBi OyAgYjsgIGINCm5sMg0KIyAwMjAgMDIyIDAyMyAwMjQgMDI1IDAyNg0KZzsg ICAgYzsgIGM7ICBiOyAgYjsgIGINCm5sMg0KIyAwMzAgMDMyIDAzMyAwMzQg MDM1IDAzNg0KZzsgICAgYzsgIGM7ICBjOyAgYjsgIGINCm5sMg0KIyAwNDAg MDQyIDA0MyAwNDQgMDQ1IDA0Ng0KZzsgICAgZzsgIGM7ICBjOyAgYzsgIGIN Cm5sMg0KIyAwNTAgMDUyIDA1MyAwNTQgMDU1IDA1Ng0KZzsgICAgZzsgIGc7 ICBjOyAgYzsgIGMNCm5sMg0KIyAwNjAgMDYyIDA2MyAwNjQgMDY1IDA2Ng0K ZzsgICAgZzsgIGc7ICBnOyAgYzsgIGMNCm5sDQoNCiMgMjAwIDIwMiAyMDMg MjA0IDIwNSAyMDYNCnI7ICAgIG07ICBtOyAgYjsgIGI7ICBiDQpubDINCiMg MjIwIDIyMiAyMjMgMjI0IDIyNSAyMjYNCnk7ICAgIEs7ICBiOyAgYjsgIEI7 ICBCDQpubDINCiMgMjMwIDIzMiAyMzMgMjM0IDIzNSAyMzYNCnk7ICAgIGc7 ICBjOyAgYzsgIEI7ICBCDQpubDINCiMgMjQwIDI0MiAyNDMgMjQ0IDI0NSAy NDYNCmc7ICAgIGc7ICBjOyAgYzsgIEM7ICBCDQpubDINCiMgMjUwIDI1MiAy NTMgMjU0IDI1NSAyNTYNCmc7ICAgIEc7ICBHOyAgQzsgIEM7ICBDDQpubDIN CiMgMjYwIDI2MiAyNjMgMjY0IDI2NSAyNjYNCmc7ICAgIEc7ICBHOyAgRzsg IEM7ICBDDQpubA0KDQojIDMwMCAzMDIgMzAzIDMwNCAzMDUgMzA2DQpyOyAg ICBtOyAgbTsgIG07ICBiOyAgYg0KbmwyDQojIDMyMCAzMjIgMzIzIDMyNCAz MjUgMzI2DQp5OyAgICByOyAgbTsgIG07ICBCOyAgQg0KbmwyDQojIDMzMCAz MzIgMzMzIDMzNCAzMzUgMzM2DQp5OyAgICB5OyAgdzsgIEI7ICBCOyAgQg0K bmwyDQojIDM0MCAzNDIgMzQzIDM0NCAzNDUgMzQ2DQp5OyAgICB5OyAgRzsg IEM7ICBDOyAgQg0KbmwyDQojIDM1MCAzNTIgMzUzIDM1NCAzNTUgMzU2DQpn OyAgICBHOyAgRzsgIEM7ICBDOyAgQw0KbmwyDQojIDM2MCAzNjIgMzYzIDM2 NCAzNjUgMzY2DQpnOyAgICBHOyAgRzsgIEc7ICBDOyAgQw0KbmwNCg0KIyA0 MDAgNDAyIDQwMyA0MDQgNDA1IDQwNg0KcjsgICAgcjsgIG07ICBtOyAgbTsg IGINCm5sMg0KIyA0MjAgNDIyIDQyMyA0MjQgNDI1IDQyNg0KcjsgICAgcjsg IG07ICBtOyAgTTsgIEINCm5sMg0KIyA0MzAgNDMyIDQzMyA0MzQgNDM1IDQz Ng0KeTsgICAgeTsgIFI7ICBNOyAgTTsgIEINCm5sMg0KIyA0NDAgNDQyIDQ0 MyA0NDQgNDQ1IDQ0Ng0KeTsgICAgeTsgIFk7ICBXOyAgQjsgIEINCm5sMg0K IyA0NTAgNDUyIDQ1MyA0NTQgNDU1IDQ1Ng0KeTsgICAgWTsgIFk7ICBHOyAg QzsgIEMNCm5sMg0KIyA0NjAgNDYyIDQ2MyA0NjQgNDY1IDQ2Ng0KZzsgICAg RzsgIEc7ICBHOyAgQzsgIEMNCm5sDQoNCiMgNTAwIDUwMiA1MDMgNTA0IDUw NSA1MDYNCnI7ICAgIHI7ICByOyAgbTsgIG07ICBtDQpubDINCiMgNTIwIDUy MiA1MjMgNTI0IDUyNSA1MjYNCnI7ICAgIFI7ICBSOyAgTTsgIE07ICBNDQpu bDINCiMgNTMwIDUzMiA1MzMgNTM0IDUzNSA1MzYNCnI7ICAgIFI7ICBSOyAg TTsgIE07ICBNDQpubDINCiMgNTQwIDU0MiA1NDMgNTQ0IDU0NSA1NDYNCnk7 ICAgIFk7ICBZOyAgUjsgIE07ICBNDQpubDINCiMgNTUwIDU1MiA1NTMgNTU0 IDU1NSA1NTYNCnk7ICAgIFk7ICBZOyAgWTsgIFc7ICBCDQpubDINCiMgNTYw IDU2MiA1NjMgNTY0IDU2NSA1NjYNCnk7ICAgIFk7ICBZOyAgWTsgIEc7ICBD DQpubA0KDQojIDYwMCA2MDIgNjAzIDYwNCA2MDUgNjA2DQpyOyAgICByOyAg cjsgIHI7ICBtOyAgbQ0KbmwyDQojIDYyMCA2MjIgNjIzIDYyNCA2MjUgNjI2 DQpyOyAgICBSOyAgUjsgIFI7ICBNOyAgTQ0KbmwyDQojIDYzMCA2MzIgNjMz IDYzNCA2MzUgNjM2DQpyOyAgICBSOyAgUjsgIFI7ICBNOyAgTQ0KbmwyDQoj IDY0MCA2NDIgNjQzIDY0NCA2NDUgNjQ2DQpyOyAgICBSOyAgUjsgIFI7ICBN OyAgTQ0KbmwyDQojIDY1MCA2NTIgNjUzIDY1NCA2NTUgNjU2DQp5OyAgICBZ OyAgWTsgIFk7ICBSOyAgTQ0KbmwyDQojIDY2MCA2NjIgNjYzIDY2NCA2NjUg NjY2DQp5OyAgICBZOyAgWTsgIFk7ICBZOyAgVw0KbmwNCg0Kazsgazsgazsg azsgazsgaw0KSzsgSzsgSzsgSzsgSzsgSw0Kdzsgdzsgdzsgdzsgdzsgdw0K VzsgVzsgVzsgVzsgVzsgVw0KbmwNCg0KcHJpbnRmICJcbmFjdHVhbCA2eDZ4 NiArIDI0IHh0ZXJtMjU2LWlzaCBmZyBjbWFwLCBzdHJ1Y3R1cmVkOlxuIg0K dW5oYWNrYm9sZA0KZm9yIGkgaW4gJChqb3QgMjQwIDE2KQ0KZG8NCglwcmlu dGYgIiR7Q1NJfTM4OzU7JWRtJEJMJEJMIiAkaQ0KCSMgaWYgdGVzdCAkKCgo JGkgLSAxNikgJSA2KSkgPSA1OyB0aGVuIG5sOyB1bmhhY2tib2xkOyBmaQ0K CWlmIHRlc3QgJCgoKCRpIC0gMTYpICUgMzYpKSA9IDM1OyB0aGVuIG5sOyB1 bmhhY2tib2xkOyBmaQ0KZG9uZQ0KbmwNCg0KIyBFWElUDQoNCnByaW50ZiAi XG5hY3R1YWwgNng2eDYgKyAyNCB4dGVybTI1Ni1pc2ggYmcgY21hcCwgc3Ry dWN0dXJlZDpcbiINCmZvciBpIGluICQoam90IDI0MCAxNikNCmRvDQoJcHJp bnRmICIke0NTSX00ODs1OyVkbUFBIiAkaQ0KCWlmIHRlc3QgJCgoKCRpIC0g MTYpICUgMzYpKSA9IDM1OyB0aGVuIG5sOyBmaQ0KZG9uZQ0KbmwNCg0KcHJp bnRmICJcbmFjdHVhbCBhbnNpIGR1bGwgZmcgY29sb3JzLCBsaW5lYXI6XG4i DQp1bmhhY2tib2xkDQpmb3IgaSBpbiAkKGpvdCA4IDMwKQ0KZG8NCglwcmlu dGYgIiRDU0klZG0kQkwkQkwiICRpDQpkb25lDQpubA0KDQpwcmludGYgIlxu YWN0dWFsIGFuc2kgZHVsbCBiZyBjb2xvcnMsIGxpbmVhcjpcbiINCmZvciBp IGluICQoam90IDggNDApDQpkbw0KCXByaW50ZiAiJENTSSVkbUFBIiAkaQ0K ZG9uZQ0KbmwNCg0KcHJpbnRmICJcbmFjdHVhbCB4dGVybS1pc2ggMTYtY29s b3IgZmcgY29sb3JzLCBsaW5lYXI6XG4iDQp1bmhhY2tib2xkDQpmb3IgaSBp biAkKGpvdCA4IDkwKQ0KZG8NCglwcmludGYgIiRDU0klZG0kQkwkQkwiICRp DQpkb25lDQpubA0KDQpwcmludGYgIlxuYWN0dWFsIHh0ZXJtLWlzaCAxNi1j b2xvciBiZyBjb2xvcnMsIGxpbmVhcjpcbiINCmZvciBpIGluICQoam90IDgg MTAwKQ0KZG8NCglwcmludGYgIiRDU0klZG1BQSIgJGkNCmRvbmUNCm5sDQoN CmRlZmNvbG9ycw0K --0-884451554-1489686395=:26977 Content-Type: TEXT/PLAIN; charset=US-ASCII; name=sc-vt-CSI Content-Transfer-Encoding: BASE64 Content-ID: <20170317044635.Q26977@besplex.bde.org> Content-Description: Content-Disposition: attachment; filename=sc-vt-CSI cHJpbnRmICdcMDMzW20nDQpwcmludGYgJ1wwMzNbeCcNCmlmIGZhbHNlOyB0 aGVuDQpmb3IgaSBpbiAkKGpvdCAxNiAwKQ0KZG8NCglwcmludGYgJ1wwMzNb MjslZHgnICRpDQoJbHMgL3Zhci9kYg0KCWVjaG8gJGkNCglyZWFkIHgNCmRv bmUNCnByaW50ZiAnXDAzM1syOzZ4JyAgICAgICMgNiA9IGN5YW4gZmcNCmZv ciBpIGluICQoam90IDE2IDApDQpkbw0KCXByaW50ZiAnXDAzM1sxOyVkeCcg JGkNCglscyAvdmFyL2RiDQoJZWNobyAkaQ0KCXJlYWQgeA0KZG9uZQ0KcHJp bnRmICdcMDMzWzE7MHgnICAgICAgIyAwID0gYmxhY2sgYmcNCmZvciBpIGlu ICQoam90IDE2IDApDQpkbw0KCXByaW50ZiAnXDAzM1s2OyVkeCcgJGkNCgls cyAvdmFyL2RiDQoJZWNobyAkaQ0KCXJlYWQgeA0KZG9uZQ0KcHJpbnRmICdc MDMzWzY7N3gnICAgICAgIyA3ID0gd2hpdGUgcmV2IGZnDQpmb3IgaSBpbiAk KGpvdCAxNiAwKQ0KZG8NCglwcmludGYgJ1wwMzNbNTslZHgnICRpDQoJbHMg L3Zhci9kYg0KCWVjaG8gJGkNCglyZWFkIHgNCmRvbmUNCnByaW50ZiAnXDAz M1s1OzR4JyAgICAgICMgNCA9IGJsdWUgcmV2IGJnDQpmaQ0KIA0KcHJpbnRm ICdcMDMzWzI7NngnICAgICAjIDYgPSBjeWFuIGZnDQpwcmludGYgJ1wwMzNb MTsweCcgICAgICAjIDAgPSBibGFjayBiZw0KcHJpbnRmICdcMDMzWzY7N3gn ICAgICAgIyA3ID0gd2hpdGUgcmV2IGZnDQpwcmludGYgJ1wwMzNbNTs0eCcg ICAgICAjIDQgPSBibHVlIHJldiBiZw0KIA0KcHJpbnRmICdcMDMzWzdtJw0K Zm9yIGkgaW4gJChqb3QgMjU2IDApDQpkbw0KCSBwcmludGYgJ1wwMzNbbScN CgkjIHByaW50ZiAnXDAzM1s3bScNCglwcmludGYgJ1wwMzNbJWRtJyAkaQ0K CWxzIC92YXIvZGINCgllY2hvICRpDQoJcmVhZCB4DQpkb25lDQo= --0-884451554-1489686395=:26977-- From owner-svn-src-head@freebsd.org Thu Mar 16 17:49:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61716D0FA9D; Thu, 16 Mar 2017 17:49:39 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2370D1AF6; Thu, 16 Mar 2017 17:49:39 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2GHncVM059954; Thu, 16 Mar 2017 17:49:38 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2GHncYp059950; Thu, 16 Mar 2017 17:49:38 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201703161749.v2GHncYp059950@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 16 Mar 2017 17:49:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315421 - in head/sys: arm64/cavium dev/pci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 17:49:39 -0000 Author: andrew Date: Thu Mar 16 17:49:37 2017 New Revision: 315421 URL: https://svnweb.freebsd.org/changeset/base/315421 Log: If ofw_bus_msimap fails don't try to use the invalid MSI/MSI-X parent node. Sponsored by: ABT Systems Ltd Modified: head/sys/arm64/cavium/thunder_pcie_pem_fdt.c head/sys/dev/pci/pci_host_generic_fdt.c Modified: head/sys/arm64/cavium/thunder_pcie_pem_fdt.c ============================================================================== --- head/sys/arm64/cavium/thunder_pcie_pem_fdt.c Thu Mar 16 16:53:22 2017 (r315420) +++ head/sys/arm64/cavium/thunder_pcie_pem_fdt.c Thu Mar 16 17:49:37 2017 (r315421) @@ -114,9 +114,12 @@ thunder_pem_fdt_alloc_msi(device_t pci, int *irqs) { phandle_t msi_parent; + int err; - ofw_bus_msimap(ofw_bus_get_node(pci), pci_get_rid(child), &msi_parent, - NULL); + err = ofw_bus_msimap(ofw_bus_get_node(pci), pci_get_rid(child), + &msi_parent, NULL); + if (err != 0) + return (err); return (intr_alloc_msi(pci, child, msi_parent, count, maxcount, irqs)); } @@ -125,9 +128,12 @@ static int thunder_pem_fdt_release_msi(device_t pci, device_t child, int count, int *irqs) { phandle_t msi_parent; + int err; - ofw_bus_msimap(ofw_bus_get_node(pci), pci_get_rid(child), &msi_parent, - NULL); + err = ofw_bus_msimap(ofw_bus_get_node(pci), pci_get_rid(child), + &msi_parent, NULL); + if (err != 0) + return (err); return (intr_release_msi(pci, child, msi_parent, count, irqs)); } @@ -135,9 +141,12 @@ static int thunder_pem_fdt_alloc_msix(device_t pci, device_t child, int *irq) { phandle_t msi_parent; + int err; - ofw_bus_msimap(ofw_bus_get_node(pci), pci_get_rid(child), &msi_parent, - NULL); + err = ofw_bus_msimap(ofw_bus_get_node(pci), pci_get_rid(child), + &msi_parent, NULL); + if (err != 0) + return (err); return (intr_alloc_msix(pci, child, msi_parent, irq)); } @@ -145,9 +154,12 @@ static int thunder_pem_fdt_release_msix(device_t pci, device_t child, int irq) { phandle_t msi_parent; + int err; - ofw_bus_msimap(ofw_bus_get_node(pci), pci_get_rid(child), &msi_parent, - NULL); + err = ofw_bus_msimap(ofw_bus_get_node(pci), pci_get_rid(child), + &msi_parent, NULL); + if (err != 0) + return (err); return (intr_release_msix(pci, child, msi_parent, irq)); } @@ -156,9 +168,12 @@ thunder_pem_fdt_map_msi(device_t pci, de uint32_t *data) { phandle_t msi_parent; + int err; - ofw_bus_msimap(ofw_bus_get_node(pci), pci_get_rid(child), &msi_parent, - NULL); + err = ofw_bus_msimap(ofw_bus_get_node(pci), pci_get_rid(child), + &msi_parent, NULL); + if (err != 0) + return (err); return (intr_map_msi(pci, child, msi_parent, irq, addr, data)); } @@ -167,6 +182,7 @@ thunder_pem_fdt_get_id(device_t dev, dev uintptr_t *id) { phandle_t node; + int err; uint32_t rid; uint16_t pci_rid; @@ -176,7 +192,9 @@ thunder_pem_fdt_get_id(device_t dev, dev node = ofw_bus_get_node(dev); pci_rid = pci_get_rid(child); - ofw_bus_msimap(node, pci_rid, NULL, &rid); + err = ofw_bus_msimap(node, pci_rid, NULL, &rid); + if (err != 0) + return (err); *id = rid; return (0); Modified: head/sys/dev/pci/pci_host_generic_fdt.c ============================================================================== --- head/sys/dev/pci/pci_host_generic_fdt.c Thu Mar 16 16:53:22 2017 (r315420) +++ head/sys/dev/pci/pci_host_generic_fdt.c Thu Mar 16 17:49:37 2017 (r315421) @@ -461,9 +461,12 @@ generic_pcie_fdt_alloc_msi(device_t pci, { #if defined(INTRNG) phandle_t msi_parent; + int err; - ofw_bus_msimap(ofw_bus_get_node(pci), pci_get_rid(child), &msi_parent, - NULL); + err = ofw_bus_msimap(ofw_bus_get_node(pci), pci_get_rid(child), + &msi_parent, NULL); + if (err != 0) + return (err); return (intr_alloc_msi(pci, child, msi_parent, count, maxcount, irqs)); #else @@ -476,9 +479,12 @@ generic_pcie_fdt_release_msi(device_t pc { #if defined(INTRNG) phandle_t msi_parent; + int err; - ofw_bus_msimap(ofw_bus_get_node(pci), pci_get_rid(child), &msi_parent, - NULL); + err = ofw_bus_msimap(ofw_bus_get_node(pci), pci_get_rid(child), + &msi_parent, NULL); + if (err != 0) + return (err); return (intr_release_msi(pci, child, msi_parent, count, irqs)); #else return (ENXIO); @@ -491,9 +497,12 @@ generic_pcie_fdt_map_msi(device_t pci, d { #if defined(INTRNG) phandle_t msi_parent; + int err; - ofw_bus_msimap(ofw_bus_get_node(pci), pci_get_rid(child), &msi_parent, - NULL); + err = ofw_bus_msimap(ofw_bus_get_node(pci), pci_get_rid(child), + &msi_parent, NULL); + if (err != 0) + return (err); return (intr_map_msi(pci, child, msi_parent, irq, addr, data)); #else return (ENXIO); @@ -505,9 +514,12 @@ generic_pcie_fdt_alloc_msix(device_t pci { #if defined(INTRNG) phandle_t msi_parent; + int err; - ofw_bus_msimap(ofw_bus_get_node(pci), pci_get_rid(child), &msi_parent, - NULL); + err = ofw_bus_msimap(ofw_bus_get_node(pci), pci_get_rid(child), + &msi_parent, NULL); + if (err != 0) + return (err); return (intr_alloc_msix(pci, child, msi_parent, irq)); #else return (ENXIO); @@ -519,9 +531,12 @@ generic_pcie_fdt_release_msix(device_t p { #if defined(INTRNG) phandle_t msi_parent; + int err; - ofw_bus_msimap(ofw_bus_get_node(pci), pci_get_rid(child), &msi_parent, - NULL); + err = ofw_bus_msimap(ofw_bus_get_node(pci), pci_get_rid(child), + &msi_parent, NULL); + if (err != 0) + return (err); return (intr_release_msix(pci, child, msi_parent, irq)); #else return (ENXIO); @@ -533,6 +548,7 @@ generic_pcie_get_id(device_t pci, device uintptr_t *id) { phandle_t node; + int err; uint32_t rid; uint16_t pci_rid; @@ -542,7 +558,9 @@ generic_pcie_get_id(device_t pci, device node = ofw_bus_get_node(pci); pci_rid = pci_get_rid(child); - ofw_bus_msimap(node, pci_rid, NULL, &rid); + err = ofw_bus_msimap(node, pci_rid, NULL, &rid); + if (err != 0) + return (err); *id = rid; return (0); From owner-svn-src-head@freebsd.org Thu Mar 16 18:45:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56D62D0FDDC for ; Thu, 16 Mar 2017 18:45:03 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-vk0-x236.google.com (mail-vk0-x236.google.com [IPv6:2607:f8b0:400c:c05::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 10D961940 for ; Thu, 16 Mar 2017 18:45:03 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-vk0-x236.google.com with SMTP id j64so14517485vkg.3 for ; Thu, 16 Mar 2017 11:45:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=eu2NNbPGMHArCzSj/8zXDJEzkVe3GPE9ESEcJj0x3gI=; b=k1ErasS+asIjbNUh4/+WB2zDsUokWTHe97rT5QN1aCecYcwL1S4GEBaQL0iY5sNn+m tYLp92+A46DUaDMJhnmrZmWfyrZP7Z9aRLms1NuFKpgxwRz7h0JtnWf1wnhB6uegrZ1F upvUqex4C4OpK1L2FNoH7g8JlL5BBJh0+GwD4gmiRStX1035Oqk/KkuLObdUHUExRitm 5oCl4z7Pd4dMPMmBsyU+37dNuI/T7I4Ih+IzJ7NGvD7BQ2WKrupeumBrl3UMVeMfB6Az KlKU3q7hQ89wE0alXbWKz1rBsxMd6S1HxOjz7TQXuJCrZkdP1OpmUOLXwPIHtU4MmV4s 2dlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=eu2NNbPGMHArCzSj/8zXDJEzkVe3GPE9ESEcJj0x3gI=; b=a2QSevtMuyERHaAIf+b40tLjOnKGvqEpYmGE/VODgK+PTeOVLXNwCRo7fYGJM9GC0o bxKdOORoWCn2PwE4MN3bCbCQ725zh/BNGPtUasmXmUyYe/4AX6iarUMMjgbrfdj4J5E1 mN9+kII0ClS8g9ofRHr1TK81rB8zplvyskK+SpY4cGlHGuBx28ygKGToHrIKhyrgA7p7 w2CBXE0FKP1IToIlTNn6j4m4E1g7v0UcPlN6JgGKe+djtKaGDcHZpaGMsrWIEVxHcdVH EQ4DX8OBbvI6uFWKnM6KXDLoJ0NBOLz8JKTCDei8/ZRO24LIoJJ5N0bdrQ58kz0AOGGD ZcDw== X-Gm-Message-State: AFeK/H3v/DCdTvLfSWU5qVI8eP7t4EYahvxRV7nb2fA/ZIituhLOfaD8VVGjpbSpztwvcXINCIBoPnMgkaiR1hUB X-Received: by 10.31.188.4 with SMTP id m4mr4203629vkf.39.1489689902032; Thu, 16 Mar 2017 11:45:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.45.2 with HTTP; Thu, 16 Mar 2017 11:45:01 -0700 (PDT) In-Reply-To: <20170317040832.N26977@besplex.bde.org> References: <201703161640.v2GGes8N033822@repo.freebsd.org> <20170317040832.N26977@besplex.bde.org> From: Oliver Pinter Date: Thu, 16 Mar 2017 19:45:01 +0100 Message-ID: Subject: Re: svn commit: r315418 - in head/sys/teken: . libteken To: Bruce Evans Cc: Bruce Evans , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 18:45:03 -0000 On 3/16/17, Bruce Evans wrote: > On Thu, 16 Mar 2017, Bruce Evans wrote: > >> Log: >> Add teken_256to16() to convert xterm-256 256-color codes to xterm >> 16-color >> codes. This will be used to fix bright colors. >> >> Improve teken_256to8(). Use a lookup table instead of calculations. >> The >> ... > > A shell script for printing some text color maps is attached. Also a > sloppier one for printing some CSI sequences. > > The first one can easily be translated to xterm sequences. I used syscons > F and G sequences to print bright colors with sc and vt since pure xterm > bright colors are too broken to display themselves without bold hacks. > The F and G sequences generate bold hacks in the kernel, and further > complications are needed to turn these off to test if bright colors > are fixed. Real xterm doesn't fake bold using brightness, so bold > hacks on dark characters don't work for it. > > The first one needs the user to load a cp437 font for syscons and a > unicode font for vt. The script doesn't load a font since it is too > hard to restore or reset fonts. Similarly for colors. > > Run the first one on a kernel without this commit to see the old color > map. It looked just wrong (unstructured) before I found a good > tabular format to print it. I then wrote "improved" maps based on > expanding the 2x2x2 and 3x3x3 maps. These were too simple. Some of > the comments/printfs are out of date and still refer to this expansion. If I'm not wrong, these scripts where made on OS X. They use \r\n line endings, and this triggers random cryptic runtime errors: op@opn /tmp> sh -x sc-vt-CSI + printf $'\\033[m\r' + printf $'\\033[x\r' sc-vt-CSI: 5: Syntax error: word unexpected The simple fix is to delete the '\r's from the scripts: cat sc-vt-CSI | tr -d '\r' > trans.sh op > > Bruce From owner-svn-src-head@freebsd.org Thu Mar 16 18:55:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8BC72D0F151; Thu, 16 Mar 2017 18:55:18 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 4D4D7103C; Thu, 16 Mar 2017 18:55:18 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 069233C3A51; Fri, 17 Mar 2017 05:55:08 +1100 (AEDT) Date: Fri, 17 Mar 2017 05:55:07 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Oliver Pinter cc: Bruce Evans , Bruce Evans , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r315418 - in head/sys/teken: . libteken In-Reply-To: Message-ID: <20170317055036.D27477@besplex.bde.org> References: <201703161640.v2GGes8N033822@repo.freebsd.org> <20170317040832.N26977@besplex.bde.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=VbSHBBh9 c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=VG8G3FbURGeNryjcWkYA:9 a=CjuIK1q_8ugA:10 a=Oa0T6EYmKFNB-xRHvYM1:22 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 18:55:18 -0000 On Thu, 16 Mar 2017, Oliver Pinter wrote: > On 3/16/17, Bruce Evans wrote: >> On Thu, 16 Mar 2017, Bruce Evans wrote: >> >>> Log: >>> Add teken_256to16() to convert xterm-256 256-color codes to xterm >>> 16-color >>> codes. This will be used to fix bright colors. >>> >>> Improve teken_256to8(). Use a lookup table instead of calculations. >>> The >>> ... >> >> A shell script for printing some text color maps is attached. Also a >> sloppier one for printing some CSI sequences. >> ... > > If I'm not wrong, these scripts where made on OS X. They use \r\n line endings, > and this triggers random cryptic runtime errors: > > op@opn /tmp> sh -x sc-vt-CSI > + printf $'\\033[m\r' > + printf $'\\033[x\r' > sc-vt-CSI: 5: Syntax error: word unexpected > > The simple fix is to delete the '\r's from the scripts: > > cat sc-vt-CSI | tr -d '\r' > trans.sh No OS X here. It means that some mailers mangle even attachments. Shells should probably accept \r\n as newline on systems where this is not the native newline. Some C compilers do. Bruce From owner-svn-src-head@freebsd.org Thu Mar 16 19:17:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CBA76D0FA4B for ; Thu, 16 Mar 2017 19:17:03 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-ua0-x232.google.com (mail-ua0-x232.google.com [IPv6:2607:f8b0:400c:c08::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 816B81D10 for ; Thu, 16 Mar 2017 19:17:03 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-ua0-x232.google.com with SMTP id 72so32304626uaf.3 for ; Thu, 16 Mar 2017 12:17:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=/m8ypeyE4W7uq8o01whoQuyxmyELIVRoXTwFhFkRYhg=; b=irlnmdbeCmzKZ1KVLiSYjLAr8A6fFvmit/lUtgLcIb8MqAC4OTik+/8Dj2HknPOXZp f17D82mMQ/96M5ZmBeSLeyGDg6xIu/N0yNqfZNVzeIcMRoF/AEMYUVZVWEdKvHqYB1IS SKsfTESIFgWTGyIEdl7mtrGDeU6TiyPy102P7w+GUZ2Z10UKK/2+DOe8AQX9ZBNJzI8/ +amSnUpOVUUGqzzuDW8+75HkvyyJQBs89syBj5ykqSt7TwP/SJbmrldiTRRZ6kLH7/iZ r/2Qxu0dY2BKJj4KGkFj6WlYLM1Kk8mfjIBJ15r1hQWt6i+7CRDBSib3xqU6cxrEuHTv Ofsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=/m8ypeyE4W7uq8o01whoQuyxmyELIVRoXTwFhFkRYhg=; b=K3471nm1M7gMV06UEmZ7IiS5SqVnocaACE5OAxbp8jkJueg61N4nQMyOD/ghcMbq3+ Ddm1/+eeafeygqvoIaPeH/pUknYNyUv9e11kgu0m6P1sdeMYyWuIrZQJtkfJLrVluqZG GsOx6iDKIXBM5MIcc/Z4j96UKYM9OEw4eGr9teLPLujc9kZAQVqHKV2tODdtdJ1FycNW mA4O7b2NaRGs8T7b6qV4elxWMTtnolNTF0e3TjLZjUdCOW/nFrqw8Km8u4XmO6jGmDHY dTCiE66vDJg0c8my+qhhTbpx9pwbQMPNqH8MxVpAvc3kNvG7VagJ/seJbsBh4a8YNbcS U12g== X-Gm-Message-State: AFeK/H1QuYc1xH28UNxs2nwygek1z2MH/ZR5ugpxWsKwNBrVurnSTdGXcKdR3F5fr1tlUn3+gKCCqq1mOke9Znby X-Received: by 10.159.35.137 with SMTP id 9mr4686566uao.110.1489691822525; Thu, 16 Mar 2017 12:17:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.45.2 with HTTP; Thu, 16 Mar 2017 12:17:02 -0700 (PDT) In-Reply-To: <20170317055036.D27477@besplex.bde.org> References: <201703161640.v2GGes8N033822@repo.freebsd.org> <20170317040832.N26977@besplex.bde.org> <20170317055036.D27477@besplex.bde.org> From: Oliver Pinter Date: Thu, 16 Mar 2017 20:17:02 +0100 Message-ID: Subject: Re: svn commit: r315418 - in head/sys/teken: . libteken To: Bruce Evans Cc: Bruce Evans , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 19:17:03 -0000 On 3/16/17, Bruce Evans wrote: > On Thu, 16 Mar 2017, Oliver Pinter wrote: > >> On 3/16/17, Bruce Evans wrote: >>> On Thu, 16 Mar 2017, Bruce Evans wrote: >>> >>>> Log: >>>> Add teken_256to16() to convert xterm-256 256-color codes to xterm >>>> 16-color >>>> codes. This will be used to fix bright colors. >>>> >>>> Improve teken_256to8(). Use a lookup table instead of calculations. >>>> The >>>> ... >>> >>> A shell script for printing some text color maps is attached. Also a >>> sloppier one for printing some CSI sequences. >>> ... >> >> If I'm not wrong, these scripts where made on OS X. They use \r\n line >> endings, >> and this triggers random cryptic runtime errors: >> >> op@opn /tmp> sh -x sc-vt-CSI >> + printf $'\\033[m\r' >> + printf $'\\033[x\r' >> sc-vt-CSI: 5: Syntax error: word unexpected >> >> The simple fix is to delete the '\r's from the scripts: >> >> cat sc-vt-CSI | tr -d '\r' > trans.sh > > No OS X here. > > It means that some mailers mangle even attachments. > > Shells should probably accept \r\n as newline on systems where this is > not the native newline. Some C compilers do. The problems stats with imgact_shell, you can easily verify this with the following: op@opn /tmp> printf '#\!/bin/sh\r\n' > test.sh op@opn /tmp> chmod +x test.sh op@opn /tmp> ./test.sh ./test.sh: Command not found. op@opn /tmp> sh -x ./test.sh op@opn /tmp> A possible solution would be the following patch: Xdiff --git a/sys/kern/imgact_shell.c b/sys/kern/imgact_shell.c Xindex aaf521cf251..7b3feb20a3c 100644 X--- a/sys/kern/imgact_shell.c X+++ b/sys/kern/imgact_shell.c X@@ -146,7 +146,7 @@ exec_shell_imgact(imgp) X ihp++; X interpb = ihp; X while (ihp < maxp && ((*ihp != ' ') && (*ihp != '\t') && (*ihp != '\n') X- && (*ihp != '\0'))) X+ && (*ihp != '\r') && (*ihp != '\0'))) X ihp++; X interpe = ihp; X if (interpb == interpe) X@@ -162,7 +162,7 @@ exec_shell_imgact(imgp) X while (ihp < maxp && ((*ihp == ' ') || (*ihp == '\t'))) X ihp++; X optb = ihp; X- while (ihp < maxp && ((*ihp != '\n') && (*ihp != '\0'))) X+ while (ihp < maxp && ((*ihp != '\n') && (*ihp != '\r') && (*ihp != '\0'))) X ihp++; X opte = ihp; X if (opte == maxp) this is not tested, even nor compile tested, just a PoC. > > Bruce > From owner-svn-src-head@freebsd.org Thu Mar 16 20:39:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5519FD0F772; Thu, 16 Mar 2017 20:39:32 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 247371891; Thu, 16 Mar 2017 20:39:32 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2GKdVGT028943; Thu, 16 Mar 2017 20:39:31 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2GKdV3F028942; Thu, 16 Mar 2017 20:39:31 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201703162039.v2GKdV3F028942@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 16 Mar 2017 20:39:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315422 - head/sys/compat/linuxkpi/common/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 20:39:32 -0000 Author: hselasky Date: Thu Mar 16 20:39:31 2017 New Revision: 315422 URL: https://svnweb.freebsd.org/changeset/base/315422 Log: Use __LP64__ to detect presence of suword64() to fix linking and loading of the LinuxKPI on 32-bit platforms. Reported by: lwhsu @ MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Thu Mar 16 17:49:37 2017 (r315421) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Thu Mar 16 20:39:31 2017 (r315422) @@ -524,8 +524,15 @@ linux_clear_user(void *_uaddr, size_t _l /* zero 8 bytes at a time */ while (len > 7) { +#ifdef __LP64__ if (suword64(uaddr, 0)) return (_len); +#else + if (suword32(uaddr, 0)) + return (_len); + if (suword32(uaddr + 4, 0)) + return (_len); +#endif uaddr += 8; len -= 8; } From owner-svn-src-head@freebsd.org Thu Mar 16 20:55:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86D29D0FE74; Thu, 16 Mar 2017 20:55:02 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 3BC03AA6; Thu, 16 Mar 2017 20:55:02 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2GKt1mC037422; Thu, 16 Mar 2017 20:55:01 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2GKt1rL037420; Thu, 16 Mar 2017 20:55:01 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201703162055.v2GKt1rL037420@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Thu, 16 Mar 2017 20:55:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315423 - head/lib/libsysdecode X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 20:55:02 -0000 Author: smh Date: Thu Mar 16 20:55:00 2017 New Revision: 315423 URL: https://svnweb.freebsd.org/changeset/base/315423 Log: Fix libsysdecode vmprot flag decoding Fix the regex used to find vmprot table entries and add the missing include. This fixes kdumps output of PFLT arguments which would previously look like: 5202 101546 ktrace PFLT 0x5ae000 0x2<>2 They now display correctly: 5202 101546 ktrace PFLT 0x5ac000 0x2 MFC after: 1 week Modified: head/lib/libsysdecode/flags.c head/lib/libsysdecode/mktables Modified: head/lib/libsysdecode/flags.c ============================================================================== --- head/lib/libsysdecode/flags.c Thu Mar 16 20:39:31 2017 (r315422) +++ head/lib/libsysdecode/flags.c Thu Mar 16 20:55:00 2017 (r315423) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/lib/libsysdecode/mktables ============================================================================== --- head/lib/libsysdecode/mktables Thu Mar 16 20:39:31 2017 (r315422) +++ head/lib/libsysdecode/mktables Thu Mar 16 20:55:00 2017 (r315423) @@ -135,7 +135,7 @@ gen_table "sockoptudp" "UDP_[[:alnu gen_table "socktype" "SOCK_[A-Z]+[[:space:]]+[1-9]+[0-9]*" "sys/socket.h" gen_table "thrcreateflags" "THR_[A-Z]+[[:space:]]+0x[0-9]+" "sys/thr.h" gen_table "umtxop" "UMTX_OP_[[:alnum:]_]+[[:space:]]+[0-9]+" "sys/umtx.h" -gen_table "vmprot" "VM_PROT_[A-Z]+[[:space:]]+\(\(vm_prot_t\)\)" "vm/vm.h" +gen_table "vmprot" "VM_PROT_[A-Z]+[[:space:]]+\(\(vm_prot_t\)[[:space:]]+0x[0-9]+\)" "vm/vm.h" gen_table "vmresult" "KERN_[A-Z]+[[:space:]]+[0-9]+" "vm/vm_param.h" gen_table "wait6opt" "W[A-Z]+[[:space:]]+[0-9]+" "sys/wait.h" gen_table "seekwhence" "SEEK_[A-Z]+[[:space:]]+[0-9]+" "sys/unistd.h" From owner-svn-src-head@freebsd.org Thu Mar 16 21:05:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74347D0F666; Thu, 16 Mar 2017 21:05:23 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 34FB01E99; Thu, 16 Mar 2017 21:05:23 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2GL5MME043147; Thu, 16 Mar 2017 21:05:22 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2GL5LxU043140; Thu, 16 Mar 2017 21:05:21 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201703162105.v2GL5LxU043140@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 16 Mar 2017 21:05:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315424 - in head/lib: libc/mips libc/mips/gen msun/mips X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 21:05:23 -0000 Author: brooks Date: Thu Mar 16 21:05:21 2017 New Revision: 315424 URL: https://svnweb.freebsd.org/changeset/base/315424 Log: Replace SOFTFLOAT with __mips_soft_float, which gcc/clang define for us. D8376 extended softfloat/hardfloat support, but used a macro that never actually gets set except in libc and msun's Makefile.inc. So libc and libm got built correctly, but any program including fenv.h itself assumed it was on a hardfloat systen and emitted inline fpu instructions for fedisableexcept() and friends. Using __mips_soft_float makes everything work in all cases, since it's a compiler-internal macro that is always set correctly for the target PR: 217845 Submitted by: Dan Nelson MFC after: 1 week Modified: head/lib/libc/mips/Makefile.inc head/lib/libc/mips/gen/_setjmp.S head/lib/libc/mips/gen/flt_rounds.c head/lib/libc/mips/gen/setjmp.S head/lib/msun/mips/Makefile.inc head/lib/msun/mips/fenv.c head/lib/msun/mips/fenv.h Modified: head/lib/libc/mips/Makefile.inc ============================================================================== --- head/lib/libc/mips/Makefile.inc Thu Mar 16 20:55:00 2017 (r315423) +++ head/lib/libc/mips/Makefile.inc Thu Mar 16 21:05:21 2017 (r315424) @@ -1,9 +1,5 @@ # $NetBSD: Makefile.inc,v 1.7 2005/09/17 11:49:39 tsutsui Exp $ # $FreeBSD$ -.if ${MACHINE_ARCH:Mmips*hf} == "" -CFLAGS+=-DSOFTFLOAT -.endif - SRCS+= machdep_ldisd.c SYM_MAPS+= ${LIBC_SRCTOP}/mips/Symbol.map Modified: head/lib/libc/mips/gen/_setjmp.S ============================================================================== --- head/lib/libc/mips/gen/_setjmp.S Thu Mar 16 20:55:00 2017 (r315423) +++ head/lib/libc/mips/gen/_setjmp.S Thu Mar 16 21:05:21 2017 (r315424) @@ -90,7 +90,7 @@ LEAF(_setjmp) * In N64, FP registers F24 .. F31 are callee-saved. * In O32, FP registers F20 .. F23 are callee-saved. */ -#ifndef SOFTFLOAT +#ifndef __mips_soft_float cfc1 v0, $31 # too bad can't check if FP used #if defined(__mips_n64) || defined(__mips_n32) FP_S $f30, (_JB_FPREG_F30 * SZREG)(a0) @@ -113,7 +113,7 @@ LEAF(_setjmp) FP_S $f31, (_JB_FPREG_F31 * SZREG)(a0) #endif INT_S v0, (_JB_FPREG_FCSR * SZREG)(a0) -#endif /* ! SOFTFLOAT */ +#endif /* ! __mips_soft_float */ REG_EPILOGUE j ra @@ -151,7 +151,7 @@ LEAF(_longjmp) #if defined(__mips_n32) || defined(__mips_n64) REG_L gp, (_JB_REG_GP * SZREG)(a0) #endif -#ifndef SOFTFLOAT +#ifndef __mips_soft_float # get fpu status INT_L v0, (_JB_FPREG_FCSR * SZREG)(a0) ctc1 v0, $31 @@ -181,7 +181,7 @@ LEAF(_longjmp) FP_L $f29, (_JB_FPREG_F29 * SZREG)(a0) FP_L $f31, (_JB_FPREG_F31 * SZREG)(a0) #endif -#endif /* ! SOFTFLOAT */ +#endif /* ! __mips_soft_float */ REG_EPILOGUE move v0, a1 # get return value in 1st arg Modified: head/lib/libc/mips/gen/flt_rounds.c ============================================================================== --- head/lib/libc/mips/gen/flt_rounds.c Thu Mar 16 20:55:00 2017 (r315423) +++ head/lib/libc/mips/gen/flt_rounds.c Thu Mar 16 21:05:21 2017 (r315424) @@ -14,7 +14,7 @@ __RCSID("$NetBSD: flt_rounds.c,v 1.5 200 #include #include -#ifdef SOFTFLOAT +#ifdef __mips_soft_float #include "softfloat-for-gcc.h" #include "milieu.h" #include "softfloat.h" @@ -32,7 +32,7 @@ __flt_rounds() { int mode; -#ifdef SOFTFLOAT +#ifdef __mips_soft_float mode = __softfloat_float_rounding_mode; #else __asm __volatile("cfc1 %0,$31" : "=r" (mode)); Modified: head/lib/libc/mips/gen/setjmp.S ============================================================================== --- head/lib/libc/mips/gen/setjmp.S Thu Mar 16 20:55:00 2017 (r315423) +++ head/lib/libc/mips/gen/setjmp.S Thu Mar 16 21:05:21 2017 (r315424) @@ -106,7 +106,7 @@ NESTED(setjmp, SETJMP_FRAME_SIZE, ra) #if defined(__mips_n32) || defined(__mips_n64) REG_S gp, (_JB_REG_GP * SZREG)(a0) #endif -#ifndef SOFTFLOAT +#ifndef __mips_soft_float /* * From "MIPSpro N32 ABI Handbook", Table 2-1: * In N32, FP registers F20, F22, F24, F26, F28, F30 are callee-saved. @@ -135,7 +135,7 @@ NESTED(setjmp, SETJMP_FRAME_SIZE, ra) FP_S $f29, (_JB_FPREG_F29 * SZREG)(a0) FP_S $f31, (_JB_FPREG_F31 * SZREG)(a0) #endif -#endif /* ! SOFTFLOAT */ +#endif /* ! __mips_soft_float */ move v0, zero jr ra @@ -190,7 +190,7 @@ NESTED(longjmp, LONGJMP_FRAME_SIZE, ra) #if defined(__mips_n32) || defined(__mips_n64) REG_L gp, (_JB_REG_GP * SZREG)(a0) #endif -#ifndef SOFTFLOAT +#ifndef __mips_soft_float /* * From "MIPSpro N32 ABI Handbook", Table 2-1: * In N32, FP registers F20, F22, F24, F26, F28, F30 are callee-saved. @@ -219,7 +219,7 @@ NESTED(longjmp, LONGJMP_FRAME_SIZE, ra) FP_L $f29, (_JB_FPREG_F29 * SZREG)(a0) FP_L $f31, (_JB_FPREG_F31 * SZREG)(a0) #endif -#endif /* ! SOFTFLOAT */ +#endif /* ! __mips_soft_float */ move v0, a1 j ra Modified: head/lib/msun/mips/Makefile.inc ============================================================================== --- head/lib/msun/mips/Makefile.inc Thu Mar 16 20:55:00 2017 (r315423) +++ head/lib/msun/mips/Makefile.inc Thu Mar 16 21:05:21 2017 (r315424) @@ -1,8 +1,4 @@ # $FreeBSD$ -.if ${MACHINE_ARCH:Mmips*hf} == "" -CFLAGS+=-DSOFTFLOAT -.endif - LDBL_PREC = 53 SYM_MAPS += ${.CURDIR}/mips/Symbol.map Modified: head/lib/msun/mips/fenv.c ============================================================================== --- head/lib/msun/mips/fenv.c Thu Mar 16 20:55:00 2017 (r315423) +++ head/lib/msun/mips/fenv.c Thu Mar 16 21:05:21 2017 (r315424) @@ -39,7 +39,7 @@ */ const fenv_t __fe_dfl_env = 0; -#ifdef SOFTFLOAT +#ifdef __mips_soft_float #define __set_env(env, flags, mask, rnd) env = ((flags) \ | (mask)<<_FPUSW_SHIFT \ | (rnd) << 24) Modified: head/lib/msun/mips/fenv.h ============================================================================== --- head/lib/msun/mips/fenv.h Thu Mar 16 20:55:00 2017 (r315423) +++ head/lib/msun/mips/fenv.h Thu Mar 16 21:05:21 2017 (r315424) @@ -39,7 +39,7 @@ typedef __uint32_t fenv_t; typedef __uint32_t fexcept_t; /* Exception flags */ -#ifdef SOFTFLOAT +#ifdef __mips_soft_float #define _FPUSW_SHIFT 16 #define FE_INVALID 0x0001 #define FE_DIVBYZERO 0x0002 @@ -74,12 +74,16 @@ extern const fenv_t __fe_dfl_env; #define _ENABLE_SHIFT 5 #define _ENABLE_MASK (FE_ALL_EXCEPT << _ENABLE_SHIFT) -#ifndef SOFTFLOAT +#if !defined(__mips_soft_float) && !defined(__mips_hard_float) +#error compiler didnt set soft/hard float macros +#endif + +#ifndef __mips_soft_float #define __cfc1(__fcsr) __asm __volatile("cfc1 %0, $31" : "=r" (__fcsr)) #define __ctc1(__fcsr) __asm __volatile("ctc1 %0, $31" :: "r" (__fcsr)) #endif -#ifdef SOFTFLOAT +#ifdef __mips_soft_float int feclearexcept(int __excepts); int fegetexceptflag(fexcept_t *__flagp, int __excepts); int fesetexceptflag(const fexcept_t *__flagp, int __excepts); @@ -223,13 +227,13 @@ feupdateenv(const fenv_t *__envp) return (0); } -#endif /* !SOFTFLOAT */ +#endif /* !__mips_soft_float */ #if __BSD_VISIBLE /* We currently provide no external definitions of the functions below. */ -#ifdef SOFTFLOAT +#ifdef __mips_soft_float int feenableexcept(int __mask); int fedisableexcept(int __mask); int fegetexcept(void); @@ -268,7 +272,7 @@ fegetexcept(void) return ((fcsr & _ENABLE_MASK) >> _ENABLE_SHIFT); } -#endif /* !SOFTFLOAT */ +#endif /* !__mips_soft_float */ #endif /* __BSD_VISIBLE */ From owner-svn-src-head@freebsd.org Thu Mar 16 21:32:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C948D0FFFF; Thu, 16 Mar 2017 21:32:07 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7E5ADC5; Thu, 16 Mar 2017 21:32:06 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2GLW5el055222; Thu, 16 Mar 2017 21:32:05 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2GLW5RF055221; Thu, 16 Mar 2017 21:32:05 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201703162132.v2GLW5RF055221@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 16 Mar 2017 21:32:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315426 - head/contrib/one-true-awk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 21:32:07 -0000 Author: pfg Date: Thu Mar 16 21:32:05 2017 New Revision: 315426 URL: https://svnweb.freebsd.org/changeset/base/315426 Log: MFV r315425: one-true-awk: have calloc(3) do the multiplication. MFC after: 3 days Modified: head/contrib/one-true-awk/b.c Directory Properties: head/contrib/one-true-awk/ (props changed) Modified: head/contrib/one-true-awk/b.c ============================================================================== --- head/contrib/one-true-awk/b.c Thu Mar 16 21:26:26 2017 (r315425) +++ head/contrib/one-true-awk/b.c Thu Mar 16 21:32:05 2017 (r315426) @@ -140,7 +140,7 @@ fa *mkdfa(const char *s, int anchor) /* f->accept = poscnt-1; /* penter has computed number of positions in re */ cfoll(f, p1); /* set up follow sets */ freetr(p1); - if ((f->posns[0] = (int *) calloc(1, *(f->re[0].lfollow)*sizeof(int))) == NULL) + if ((f->posns[0] = (int *) calloc(*(f->re[0].lfollow), sizeof(int))) == NULL) overflo("out of space in makedfa"); if ((f->posns[1] = (int *) calloc(1, sizeof(int))) == NULL) overflo("out of space in makedfa"); @@ -160,7 +160,7 @@ int makeinit(fa *f, int anchor) f->reset = 0; k = *(f->re[0].lfollow); xfree(f->posns[2]); - if ((f->posns[2] = (int *) calloc(1, (k+1)*sizeof(int))) == NULL) + if ((f->posns[2] = (int *) calloc(k+1, sizeof(int))) == NULL) overflo("out of space in makeinit"); for (i=0; i <= k; i++) { (f->posns[2])[i] = (f->re[0].lfollow)[i]; @@ -375,7 +375,7 @@ void cfoll(fa *f, Node *v) /* enter foll setvec[i] = 0; setcnt = 0; follow(v); /* computes setvec and setcnt */ - if ((p = (int *) calloc(1, (setcnt+1)*sizeof(int))) == NULL) + if ((p = (int *) calloc(setcnt+1, sizeof(int))) == NULL) overflo("out of space building follow set"); f->re[info(v)].lfollow = p; *p = setcnt; @@ -549,7 +549,7 @@ int pmatch(fa *f, const char *p0) /* lon for (i = 2; i <= f->curstat; i++) xfree(f->posns[i]); k = *f->posns[0]; - if ((f->posns[2] = (int *) calloc(1, (k+1)*sizeof(int))) == NULL) + if ((f->posns[2] = (int *) calloc(k+1, sizeof(int))) == NULL) overflo("out of space in pmatch"); for (i = 0; i <= k; i++) (f->posns[2])[i] = (f->posns[0])[i]; @@ -606,7 +606,7 @@ int nematch(fa *f, const char *p0) /* no for (i = 2; i <= f->curstat; i++) xfree(f->posns[i]); k = *f->posns[0]; - if ((f->posns[2] = (int *) calloc(1, (k+1)*sizeof(int))) == NULL) + if ((f->posns[2] = (int *) calloc(k+1, sizeof(int))) == NULL) overflo("out of state space"); for (i = 0; i <= k; i++) (f->posns[2])[i] = (f->posns[0])[i]; @@ -943,7 +943,7 @@ int cgoto(fa *f, int s, int c) for (i = 0; i < NCHARS; i++) f->gototab[f->curstat][i] = 0; xfree(f->posns[f->curstat]); - if ((p = (int *) calloc(1, (setcnt+1)*sizeof(int))) == NULL) + if ((p = (int *) calloc(setcnt+1, sizeof(int))) == NULL) overflo("out of space in cgoto"); f->posns[f->curstat] = p; From owner-svn-src-head@freebsd.org Thu Mar 16 21:34:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C20EAD0F0ED; Thu, 16 Mar 2017 21:34:15 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 794FC111A; Thu, 16 Mar 2017 21:34:15 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2GLYEqj055360; Thu, 16 Mar 2017 21:34:14 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2GLYEZ6055359; Thu, 16 Mar 2017 21:34:14 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201703162134.v2GLYEZ6055359@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Thu, 16 Mar 2017 21:34:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315427 - head/sys/boot/i386/libi386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 21:34:15 -0000 Author: tsoome Date: Thu Mar 16 21:34:14 2017 New Revision: 315427 URL: https://svnweb.freebsd.org/changeset/base/315427 Log: loader: biosdisk should report IO error from INT13 We should be more verbose about read errors from biosdisk, except filter out the floppy controller errors, which apparently are resulting from read attempt from device without the media present. Reviewed by: allanjude Approved by: allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D10032 Modified: head/sys/boot/i386/libi386/biosdisk.c Modified: head/sys/boot/i386/libi386/biosdisk.c ============================================================================== --- head/sys/boot/i386/libi386/biosdisk.c Thu Mar 16 21:32:05 2017 (r315426) +++ head/sys/boot/i386/libi386/biosdisk.c Thu Mar 16 21:34:14 2017 (r315427) @@ -559,7 +559,7 @@ bd_realstrategy(void *devdata, int rw, d { struct disk_devdesc *dev = (struct disk_devdesc *)devdata; uint64_t disk_blocks; - int blks; + int blks, rc; #ifdef BD_SUPPORT_FRAGS /* XXX: sector size */ char fragbuf[BIOSDISK_SECSIZE]; size_t fragsize; @@ -616,8 +616,12 @@ bd_realstrategy(void *devdata, int rw, d case F_READ: DEBUG("read %d from %lld to %p", blks, dblk, buf); - if (blks && bd_read(dev, dblk, blks, buf)) { - DEBUG("read error"); + if (blks && (rc = bd_read(dev, dblk, blks, buf))) { + /* Filter out floppy controller errors */ + if (BD(dev).bd_flags != BD_FLOPPY || rc != 0x20) { + printf("read %d from %lld to %p, error: 0x%x", blks, dblk, + buf, rc); + } return (EIO); } #ifdef BD_SUPPORT_FRAGS /* XXX: sector size */ @@ -676,7 +680,9 @@ bd_edd_io(struct disk_devdesc *dev, dadd v86.ds = VTOPSEG(&packet); v86.esi = VTOPOFF(&packet); v86int(); - return (V86_CY(v86.efl)); + if (V86_CY(v86.efl)) + return (v86.eax >> 8); + return (0); } static int @@ -710,7 +716,9 @@ bd_chs_io(struct disk_devdesc *dev, dadd v86.es = VTOPSEG(dest); v86.ebx = VTOPOFF(dest); v86int(); - return (V86_CY(v86.efl)); + if (V86_CY(v86.efl)) + return (v86.eax >> 8); + return (0); } static int @@ -797,7 +805,7 @@ bd_io(struct disk_devdesc *dev, daddr_t DEBUG("Read %d sector(s) from %lld to %p (0x%x) %s", x, dblk, p, VTOP(p), result ? "failed" : "ok"); if (result) { - return(-1); + return (result); } if (!write && bbuf != NULL) bcopy(bbuf, p, x * BD(dev).bd_sectorsize); From owner-svn-src-head@freebsd.org Thu Mar 16 21:53:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 781CAD0F5C2; Thu, 16 Mar 2017 21:53:56 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 364BA1A41; Thu, 16 Mar 2017 21:53:56 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2GLrtqr063248; Thu, 16 Mar 2017 21:53:55 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2GLrtZT063247; Thu, 16 Mar 2017 21:53:55 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201703162153.v2GLrtZT063247@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Thu, 16 Mar 2017 21:53:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315428 - head/bin/sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 21:53:56 -0000 Author: jilles Date: Thu Mar 16 21:53:55 2017 New Revision: 315428 URL: https://svnweb.freebsd.org/changeset/base/315428 Log: sh: Get rid of global variable argbackq. Modified: head/bin/sh/expand.c Modified: head/bin/sh/expand.c ============================================================================== --- head/bin/sh/expand.c Thu Mar 16 21:34:14 2017 (r315427) +++ head/bin/sh/expand.c Thu Mar 16 21:53:55 2017 (r315428) @@ -89,15 +89,18 @@ struct worddest { }; static char *expdest; /* output of current string */ -static struct nodelist *argbackq; /* list of back quote expressions */ -static const char *argstr(const char *, int, struct worddest *); +static const char *argstr(const char *, struct nodelist **restrict, int, + struct worddest *); static const char *exptilde(const char *, int); -static const char *expari(const char *, int, struct worddest *); +static const char *expari(const char *, struct nodelist **restrict, int, + struct worddest *); static void expbackq(union node *, int, int, struct worddest *); -static void subevalvar_trim(const char *, int, int, int); -static int subevalvar_misc(const char *, const char *, int, int, int); -static const char *evalvar(const char *, int, struct worddest *); +static void subevalvar_trim(const char *, struct nodelist *, int, int, int); +static int subevalvar_misc(const char *, struct nodelist *, const char *, int, + int, int); +static const char *evalvar(const char *, struct nodelist **restrict, int, + struct worddest *); static int varisset(const char *, int); static void strtodest(const char *, int, int, int, struct worddest *); static void reprocess(int, int, int, int, struct worddest *); @@ -224,6 +227,7 @@ void expandarg(union node *arg, struct arglist *arglist, int flag) { struct worddest exparg; + struct nodelist *argbackq; if (fflag) flag &= ~EXP_GLOB; @@ -231,7 +235,7 @@ expandarg(union node *arg, struct arglis exparg.list = arglist; exparg.state = WORD_IDLE; STARTSTACKSTR(expdest); - argstr(arg->narg.text, flag, &exparg); + argstr(arg->narg.text, &argbackq, flag, &exparg); if (arglist == NULL) { STACKSTRNUL(expdest); return; /* here document expanded */ @@ -263,7 +267,8 @@ expandarg(union node *arg, struct arglis * If EXP_SPLIT is set, dst receives any complete words produced. */ static const char * -argstr(const char *p, int flag, struct worddest *dst) +argstr(const char *p, struct nodelist **restrict argbackq, int flag, + struct worddest *dst) { char c; int quotes = flag & (EXP_GLOB | EXP_CASE); /* do CTLESC */ @@ -308,15 +313,15 @@ argstr(const char *p, int flag, struct w USTPUTC(c, expdest); break; case CTLVAR: - p = evalvar(p, flag, dst); + p = evalvar(p, argbackq, flag, dst); break; case CTLBACKQ: case CTLBACKQ|CTLQUOTE: - expbackq(argbackq->n, c & CTLQUOTE, flag, dst); - argbackq = argbackq->next; + expbackq((*argbackq)->n, c & CTLQUOTE, flag, dst); + *argbackq = (*argbackq)->next; break; case CTLARI: - p = expari(p, flag, dst); + p = expari(p, argbackq, flag, dst); break; case ':': case '=': @@ -405,7 +410,8 @@ exptilde(const char *p, int flag) * Expand arithmetic expression. */ static const char * -expari(const char *p, int flag, struct worddest *dst) +expari(const char *p, struct nodelist **restrict argbackq, int flag, + struct worddest *dst) { char *q, *start; arith_t result; @@ -415,7 +421,7 @@ expari(const char *p, int flag, struct w quoted = *p++ == '"'; begoff = expdest - stackblock(); - p = argstr(p, 0, NULL); + p = argstr(p, argbackq, 0, NULL); STPUTC('\0', expdest); start = stackblock() + begoff; @@ -448,7 +454,6 @@ expbackq(union node *cmd, int quoted, in char buf[128]; char *p; char *dest = expdest; - struct nodelist *saveargbackq; char lastc; char const *syntax = quoted? DQSYNTAX : BASESYNTAX; int quotes = flag & (EXP_GLOB | EXP_CASE); @@ -456,7 +461,6 @@ expbackq(union node *cmd, int quoted, in const char *ifs; INTOFF; - saveargbackq = argbackq; p = grabstackstr(dest); evalbackcmd(cmd, &in); ungrabstackstr(p, dest); @@ -522,7 +526,6 @@ expbackq(union node *cmd, int quoted, in ((dest - stackblock()) - startloc), (int)((dest - stackblock()) - startloc), stackblock() + startloc)); - argbackq = saveargbackq; expdest = dest; INTON; } @@ -541,18 +544,18 @@ recordleft(const char *str, const char * } static void -subevalvar_trim(const char *p, int strloc, int subtype, int startloc) +subevalvar_trim(const char *p, struct nodelist *argbackq, int strloc, + int subtype, int startloc) { char *startp; char *loc = NULL; char *str; int c = 0; - struct nodelist *saveargbackq = argbackq; + struct nodelist *argbackqcopy = argbackq; int amount; - argstr(p, EXP_CASE | EXP_TILDE, NULL); + argstr(p, &argbackqcopy, EXP_CASE | EXP_TILDE, NULL); STACKSTRNUL(expdest); - argbackq = saveargbackq; startp = stackblock() + startloc; str = stackblock() + strloc; @@ -615,16 +618,15 @@ subevalvar_trim(const char *p, int strlo static int -subevalvar_misc(const char *p, const char *var, int subtype, int startloc, +subevalvar_misc(const char *p, struct nodelist *argbackq, const char *var, int subtype, int startloc, int varflags) { char *startp; - struct nodelist *saveargbackq = argbackq; + struct nodelist *argbackqcopy = argbackq; int amount; - argstr(p, EXP_TILDE, NULL); + argstr(p, &argbackqcopy, EXP_TILDE, NULL); STACKSTRNUL(expdest); - argbackq = saveargbackq; startp = stackblock() + startloc; switch (subtype) { @@ -655,7 +657,8 @@ subevalvar_misc(const char *p, const cha */ static const char * -evalvar(const char *p, int flag, struct worddest *dst) +evalvar(const char *p, struct nodelist **restrict argbackq, int flag, + struct worddest *dst) { int subtype; int varflags; @@ -759,7 +762,8 @@ again: /* jump here after setting a vari case VSPLUS: case VSMINUS: if (!set) { - argstr(p, flag | (flag & EXP_SPLIT ? EXP_SPLIT_LIT : 0) | + argstr(p, argbackq, + flag | (flag & EXP_SPLIT ? EXP_SPLIT_LIT : 0) | (varflags & VSQUOTE ? EXP_LIT_QUOTED : 0), dst); break; } @@ -779,7 +783,7 @@ again: /* jump here after setting a vari */ STPUTC('\0', expdest); patloc = expdest - stackblock(); - subevalvar_trim(p, patloc, subtype, startloc); + subevalvar_trim(p, *argbackq, patloc, subtype, startloc); reprocess(startloc, flag, VSNORMAL, varflags & VSQUOTE, dst); if (flag & EXP_SPLIT && *var == '@' && varflags & VSQUOTE) dst->state = WORD_QUOTEMARK; @@ -788,8 +792,8 @@ again: /* jump here after setting a vari case VSASSIGN: case VSQUESTION: if (!set) { - if (subevalvar_misc(p, var, subtype, startloc, - varflags)) { + if (subevalvar_misc(p, *argbackq, var, subtype, + startloc, varflags)) { varflags &= ~VSNUL; goto again; } @@ -813,7 +817,7 @@ again: /* jump here after setting a vari p++; else if (c == CTLBACKQ || c == (CTLBACKQ|CTLQUOTE)) { if (set) - argbackq = argbackq->next; + *argbackq = (*argbackq)->next; } else if (c == CTLVAR) { if ((*p++ & VSTYPE) != VSNORMAL) nesting++; @@ -1440,13 +1444,14 @@ int casematch(union node *pattern, const char *val) { struct stackmark smark; + struct nodelist *argbackq; int result; char *p; setstackmark(&smark); argbackq = pattern->narg.backquote; STARTSTACKSTR(expdest); - argstr(pattern->narg.text, EXP_TILDE | EXP_CASE, NULL); + argstr(pattern->narg.text, &argbackq, EXP_TILDE | EXP_CASE, NULL); STPUTC('\0', expdest); p = grabstackstr(expdest); result = patmatch(p, val); From owner-svn-src-head@freebsd.org Thu Mar 16 22:15:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC303D0FB5C; Thu, 16 Mar 2017 22:15:44 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 A93143AF; Thu, 16 Mar 2017 22:15:44 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2GMFhAo071518; Thu, 16 Mar 2017 22:15:43 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2GMFheB071517; Thu, 16 Mar 2017 22:15:43 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201703162215.v2GMFheB071517@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Thu, 16 Mar 2017 22:15:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315429 - head/libexec/rtld-elf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 22:15:45 -0000 Author: jilles Date: Thu Mar 16 22:15:43 2017 New Revision: 315429 URL: https://svnweb.freebsd.org/changeset/base/315429 Log: rtld(1): Document that LD_BIND_NOT is unset for setugid processes. MFC after: 2 weeks Modified: head/libexec/rtld-elf/rtld.1 Modified: head/libexec/rtld-elf/rtld.1 ============================================================================== --- head/libexec/rtld-elf/rtld.1 Thu Mar 16 21:53:55 2017 (r315428) +++ head/libexec/rtld-elf/rtld.1 Thu Mar 16 22:15:43 2017 (r315429) @@ -205,6 +205,7 @@ doing bindings. As result, each call of the PLT-resolved function is resolved. In combination with debug output, this provides complete account of all bind actions at runtime. +This variable is unset for set-user-ID and set-group-ID programs. .It Ev LD_BIND_NOW When set to a nonempty string, causes .Nm From owner-svn-src-head@freebsd.org Thu Mar 16 22:23:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7C49D0FE02; Thu, 16 Mar 2017 22:23:06 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 559D2B99; Thu, 16 Mar 2017 22:23:06 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2GMN5aQ075501; Thu, 16 Mar 2017 22:23:05 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2GMN4F4075490; Thu, 16 Mar 2017 22:23:04 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201703162223.v2GMN4F4075490@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Thu, 16 Mar 2017 22:23:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315430 - in head: . etc/mtree include sys/arm/ti sys/conf sys/dev/mmc sys/dev/sdhci sys/modules/mmc sys/modules/mmcsd sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 22:23:06 -0000 Author: marius Date: Thu Mar 16 22:23:04 2017 New Revision: 315430 URL: https://svnweb.freebsd.org/changeset/base/315430 Log: - Add support for eMMC "partitions". Besides the user data area, i. e. the default partition, eMMC v4.41 and later devices can additionally provide up to: 1 enhanced user data area partition 2 boot partitions 1 RPMB (Replay Protected Memory Block) partition 4 general purpose partitions (optionally with a enhanced or extended attribute) Of these "partitions", only the enhanced user data area one actually slices the user data area partition and, thus, gets handled with the help of geom_flashmap(4). The other types of partitions have address space independent from the default partition and need to be switched to via CMD6 (SWITCH), i. e. constitute a set of additional "disks". The second kind of these "partitions" doesn't fit that well into the design of mmc(4) and mmcsd(4). I've decided to let mmcsd(4) hook all of these "partitions" up as disk(9)'s (except for the RPMB partition as it didn't seem to make much sense to be able to put a file-system there and may require authentication; therefore, RPMB partitions are solely accessible via the newly added IOCTL interface currently; see also below). This approach for one resulted in cleaner code. Second, it retains the notion of mmcsd(4) children corresponding to a single physical device each. With the addition of some layering violations, it also would have been possible for mmc(4) to add separate mmcsd(4) instances with one disk each for all of these "partitions", however. Still, both mmc(4) and mmcsd(4) share some common code now e. g. for issuing CMD6, which has been factored out into mmc_subr.c. Besides simply subdividing eMMC devices, some Intel NUCs having UEFI code in the boot partitions etc., another use case for the partition support is the activation of pseudo-SLC mode, which manufacturers of eMMC chips typically associate with the enhanced user data area and/ or the enhanced attribute of general purpose partitions. CAVEAT EMPTOR: Partitioning eMMC devices is a one-time operation. - Now that properly issuing CMD6 is crucial (so data isn't written to the wrong partition for example), make a step into the direction of correctly handling the timeout for these commands in the MMC layer. Also, do a SEND_STATUS when CMD6 is invoked with an R1B response as recommended by relevant specifications. However, quite some work is left to be done in this regard; all other R1B-type commands done by the MMC layer also should be followed by a SEND_STATUS (CMD13), the erase timeout calculations/handling as documented in specifications are entirely ignored so far, the MMC layer doesn't provide timeouts applicable up to the bridge drivers and at least sdhci(4) currently is hardcoding 1 s as timeout for all command types unconditionally. Let alone already available return codes often not being checked in the MMC layer ... - Add an IOCTL interface to mmcsd(4); this is sufficiently compatible with Linux so that the GNU mmc-utils can be ported to and used with FreeBSD (note that due to the remaining deficiencies outlined above SANITIZE operations issued by/with `mmc` currently most likely will fail). These latter will be added to ports as sysutils/mmc-utils in a bit. Among others, the `mmc` tool of the GNU mmc-utils allows for partitioning eMMC devices (tested working). - For devices following the eMMC specification v4.41 or later, year 0 is 2013 rather than 1997; so correct this for assembling the device ID string properly. - Let mmcsd.ko depend on mmc.ko. Additionally, bump MMC_VERSION as at least for some of the above a matching pair is required. - In the ACPI front-end of sdhci(4) describe the Intel eMMC and SDXC controllers as such in order to match the PCI one. Additionally, in the entry for the 80860F14 SDXC controller remove the eMMC-only SDHCI_QUIRK_INTEL_POWER_UP_RESET. OKed by: imp Submitted by: ian (mmc_switch_status() implementation) Added: head/sys/dev/mmc/mmc_ioctl.h (contents, props changed) head/sys/dev/mmc/mmc_private.h (contents, props changed) head/sys/dev/mmc/mmc_subr.c - copied, changed from r313250, head/sys/dev/mmc/mmc.c head/sys/dev/mmc/mmc_subr.h (contents, props changed) Modified: head/UPDATING head/etc/mtree/BSD.include.dist head/include/Makefile head/sys/arm/ti/ti_sdhci.c head/sys/conf/files head/sys/dev/mmc/bridge.h head/sys/dev/mmc/mmc.c head/sys/dev/mmc/mmcbrvar.h head/sys/dev/mmc/mmcreg.h head/sys/dev/mmc/mmcsd.c head/sys/dev/mmc/mmcvar.h head/sys/dev/sdhci/sdhci.c head/sys/dev/sdhci/sdhci.h head/sys/dev/sdhci/sdhci_acpi.c head/sys/dev/sdhci/sdhci_pci.c head/sys/modules/mmc/Makefile head/sys/modules/mmcsd/Makefile head/sys/sys/param.h Modified: head/UPDATING ============================================================================== --- head/UPDATING Thu Mar 16 22:15:43 2017 (r315429) +++ head/UPDATING Thu Mar 16 22:23:04 2017 (r315430) @@ -51,6 +51,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 ****************************** SPECIAL WARNING: ****************************** +20170316: + The mmcsd.ko module now additionally depends on geom_flashmap.ko. + Also, mmc.ko and mmcsd.ko need to be a matching pair built from the + same source (previously, the dependency of mmcsd.ko on mmc.ko was + missing, but mmcsd.ko now will refuse to load if it is incompatible + with mmc.ko). + 20170315: The syntax of ipfw(8) named states was changed to avoid ambiguity. If you have used named states in the firewall rules, you need to modify Modified: head/etc/mtree/BSD.include.dist ============================================================================== --- head/etc/mtree/BSD.include.dist Thu Mar 16 22:15:43 2017 (r315429) +++ head/etc/mtree/BSD.include.dist Thu Mar 16 22:23:04 2017 (r315430) @@ -130,6 +130,8 @@ .. mfi .. + mmc + .. mpt mpilib .. Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Thu Mar 16 22:15:43 2017 (r315429) +++ head/include/Makefile Thu Mar 16 22:23:04 2017 (r315430) @@ -45,7 +45,7 @@ LDIRS= bsm cam geom net net80211 netgrap LSUBDIRS= cam/ata cam/nvme cam/scsi \ dev/acpica dev/agp dev/an dev/bktr dev/ciss dev/filemon dev/firewire \ dev/hwpmc dev/hyperv \ - dev/ic dev/iicbus dev/io dev/lmc dev/mfi dev/nvme \ + dev/ic dev/iicbus dev/io dev/lmc dev/mfi dev/mmc dev/nvme \ dev/ofw dev/pbio dev/pci ${_dev_powermac_nvram} dev/ppbus dev/smbus \ dev/speaker dev/utopia dev/vkbd dev/wi \ fs/devfs fs/fdescfs fs/msdosfs fs/nandfs fs/nfs fs/nullfs \ Modified: head/sys/arm/ti/ti_sdhci.c ============================================================================== --- head/sys/arm/ti/ti_sdhci.c Thu Mar 16 22:15:43 2017 (r315429) +++ head/sys/arm/ti/ti_sdhci.c Thu Mar 16 22:23:04 2017 (r315430) @@ -606,6 +606,11 @@ ti_sdhci_attach(device_t dev) * before waiting to see them de-asserted. */ sc->slot.quirks |= SDHCI_QUIRK_WAITFOR_RESET_ASSERTED; + + /* + * The controller waits for busy responses. + */ + sc->slot.quirks |= SDHCI_QUIRK_WAIT_WHILE_BUSY; /* * DMA is not really broken, I just haven't implemented it yet. Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Mar 16 22:15:43 2017 (r315429) +++ head/sys/conf/files Thu Mar 16 22:23:04 2017 (r315430) @@ -2218,6 +2218,7 @@ dev/mlx/mlx.c optional mlx dev/mlx/mlx_disk.c optional mlx dev/mlx/mlx_pci.c optional mlx pci dev/mly/mly.c optional mly +dev/mmc/mmc_subr.c optional mmc | mmcsd dev/mmc/mmc.c optional mmc dev/mmc/mmcbr_if.m standard dev/mmc/mmcbus_if.m standard @@ -3429,7 +3430,7 @@ geom/geom_disk.c standard geom/geom_dump.c standard geom/geom_event.c standard geom/geom_fox.c optional geom_fox -geom/geom_flashmap.c optional fdt cfi | fdt nand | fdt mx25l +geom/geom_flashmap.c optional fdt cfi | fdt nand | fdt mx25l | mmcsd geom/geom_io.c standard geom/geom_kern.c standard geom/geom_map.c optional geom_map Modified: head/sys/dev/mmc/bridge.h ============================================================================== --- head/sys/dev/mmc/bridge.h Thu Mar 16 22:15:43 2017 (r315429) +++ head/sys/dev/mmc/bridge.h Thu Mar 16 22:23:04 2017 (r315430) @@ -132,6 +132,8 @@ struct mmc_host { #define MMC_CAP_4_BIT_DATA (1 << 0) /* Can do 4-bit data transfers */ #define MMC_CAP_8_BIT_DATA (1 << 1) /* Can do 8-bit data transfers */ #define MMC_CAP_HSPEED (1 << 2) /* Can do High Speed transfers */ +#define MMC_CAP_BOOT_NOACC (1 << 4) /* Cannot access boot partitions */ +#define MMC_CAP_WAIT_WHILE_BUSY (1 << 5) /* Host waits for busy responses */ enum mmc_card_mode mode; struct mmc_ios ios; /* Current state of the host */ }; @@ -139,10 +141,12 @@ struct mmc_host { extern driver_t mmc_driver; extern devclass_t mmc_devclass; -#define MMC_VERSION 1 +#define MMC_VERSION 2 #define MMC_DECLARE_BRIDGE(name) \ DRIVER_MODULE(mmc, name, mmc_driver, mmc_devclass, NULL, NULL); \ MODULE_DEPEND(name, mmc, MMC_VERSION, MMC_VERSION, MMC_VERSION); +#define MMC_DEPEND(name) \ + MODULE_DEPEND(name, mmc, MMC_VERSION, MMC_VERSION, MMC_VERSION); #endif /* DEV_MMC_BRIDGE_H */ Modified: head/sys/dev/mmc/mmc.c ============================================================================== --- head/sys/dev/mmc/mmc.c Thu Mar 16 22:15:43 2017 (r315429) +++ head/sys/dev/mmc/mmc.c Thu Mar 16 22:23:04 2017 (r315430) @@ -65,25 +65,16 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include +#include #include #include #include + #include "mmcbr_if.h" #include "mmcbus_if.h" -struct mmc_softc { - device_t dev; - struct mtx sc_mtx; - struct intr_config_hook config_intrhook; - device_t owner; - uint32_t last_rca; - int squelched; /* suppress reporting of (expected) errors */ - int log_count; - struct timeval log_time; -}; - -#define LOG_PPS 5 /* Log no more than 5 errors per second. */ - /* * Per-card data */ @@ -91,7 +82,7 @@ struct mmc_ivars { uint32_t raw_cid[4]; /* Raw bits of the CID */ uint32_t raw_csd[4]; /* Raw bits of the CSD */ uint32_t raw_scr[2]; /* Raw bits of the SCR */ - uint8_t raw_ext_csd[512]; /* Raw bits of the EXT_CSD */ + uint8_t raw_ext_csd[MMC_EXTCSD_SIZE]; /* Raw bits of the EXT_CSD */ uint32_t raw_sd_status[16]; /* Raw bits of the SD_STATUS */ uint16_t rca; enum mmc_card_mode mode; @@ -107,6 +98,7 @@ struct mmc_ivars { uint32_t tran_speed; /* Max speed in normal mode */ uint32_t hs_tran_speed; /* Max speed in high speed mode */ uint32_t erase_sector; /* Card native erase sector size */ + uint32_t cmd6_time; /* Generic switch timeout [us] */ char card_id_string[64];/* Formatted CID info (serial, MFG, etc) */ char card_sn_string[16];/* Formatted serial # for disk->d_ident */ }; @@ -156,7 +148,8 @@ static int mmc_app_sd_status(struct mmc_ static int mmc_app_send_scr(struct mmc_softc *sc, uint16_t rca, uint32_t *rawscr); static int mmc_calculate_clock(struct mmc_softc *sc); -static void mmc_decode_cid_mmc(uint32_t *raw_cid, struct mmc_cid *cid); +static void mmc_decode_cid_mmc(uint32_t *raw_cid, struct mmc_cid *cid, + bool is_4_41p); static void mmc_decode_cid_sd(uint32_t *raw_cid, struct mmc_cid *cid); static void mmc_decode_csd_mmc(uint32_t *raw_csd, struct mmc_csd *csd); static void mmc_decode_csd_sd(uint32_t *raw_csd, struct mmc_csd *csd); @@ -182,25 +175,17 @@ static uint32_t mmc_select_vdd(struct mm static int mmc_send_app_op_cond(struct mmc_softc *sc, uint32_t ocr, uint32_t *rocr); static int mmc_send_csd(struct mmc_softc *sc, uint16_t rca, uint32_t *rawcsd); -static int mmc_send_ext_csd(struct mmc_softc *sc, uint8_t *rawextcsd); static int mmc_send_if_cond(struct mmc_softc *sc, uint8_t vhs); static int mmc_send_op_cond(struct mmc_softc *sc, uint32_t ocr, uint32_t *rocr); static int mmc_send_relative_addr(struct mmc_softc *sc, uint32_t *resp); -static int mmc_send_status(struct mmc_softc *sc, uint16_t rca, - uint32_t *status); static int mmc_set_blocklen(struct mmc_softc *sc, uint32_t len); -static int mmc_set_card_bus_width(struct mmc_softc *sc, uint16_t rca, - int width); +static int mmc_set_card_bus_width(struct mmc_softc *sc, + struct mmc_ivars *ivar); static int mmc_set_relative_addr(struct mmc_softc *sc, uint16_t resp); -static int mmc_set_timing(struct mmc_softc *sc, int timing); -static int mmc_switch(struct mmc_softc *sc, uint8_t set, uint8_t index, - uint8_t value); +static int mmc_set_timing(struct mmc_softc *sc, struct mmc_ivars *ivar, + int timing); static int mmc_test_bus_width(struct mmc_softc *sc); -static int mmc_wait_for_app_cmd(struct mmc_softc *sc, uint32_t rca, - struct mmc_command *cmd, int retries); -static int mmc_wait_for_cmd(struct mmc_softc *sc, struct mmc_command *cmd, - int retries); static int mmc_wait_for_command(struct mmc_softc *sc, uint32_t opcode, uint32_t arg, uint32_t flags, uint32_t *resp, int retries); static int mmc_wait_for_req(struct mmc_softc *sc, struct mmc_request *req); @@ -299,19 +284,19 @@ mmc_acquire_bus(device_t busdev, device_ * unselect unless the bus code itself wants the mmc * bus, and constantly reselecting causes problems. */ - rca = mmc_get_rca(dev); + ivar = device_get_ivars(dev); + rca = ivar->rca; if (sc->last_rca != rca) { mmc_select_card(sc, rca); sc->last_rca = rca; /* Prepare bus width for the new card. */ - ivar = device_get_ivars(dev); if (bootverbose || mmc_debug) { device_printf(busdev, "setting bus width to %d bits\n", (ivar->bus_width == bus_width_4) ? 4 : (ivar->bus_width == bus_width_8) ? 8 : 1); } - mmc_set_card_bus_width(sc, rca, ivar->bus_width); + mmc_set_card_bus_width(sc, ivar); mmcbr_set_bus_width(busdev, ivar->bus_width); mmcbr_update_ios(busdev); } @@ -417,74 +402,6 @@ mmc_wait_for_request(device_t brdev, dev } static int -mmc_wait_for_cmd(struct mmc_softc *sc, struct mmc_command *cmd, int retries) -{ - struct mmc_request mreq; - int err; - - do { - memset(&mreq, 0, sizeof(mreq)); - memset(cmd->resp, 0, sizeof(cmd->resp)); - cmd->retries = 0; /* Retries done here, not in hardware. */ - cmd->mrq = &mreq; - mreq.cmd = cmd; - if (mmc_wait_for_req(sc, &mreq) != 0) - err = MMC_ERR_FAILED; - else - err = cmd->error; - } while (err != MMC_ERR_NONE && retries-- > 0); - - if (err != MMC_ERR_NONE && sc->squelched == 0) { - if (ppsratecheck(&sc->log_time, &sc->log_count, LOG_PPS)) { - device_printf(sc->dev, "CMD%d failed, RESULT: %d\n", - cmd->opcode, err); - } - } - - return (err); -} - -static int -mmc_wait_for_app_cmd(struct mmc_softc *sc, uint32_t rca, - struct mmc_command *cmd, int retries) -{ - struct mmc_command appcmd; - int err; - - /* Squelch error reporting at lower levels, we report below. */ - sc->squelched++; - do { - memset(&appcmd, 0, sizeof(appcmd)); - appcmd.opcode = MMC_APP_CMD; - appcmd.arg = rca << 16; - appcmd.flags = MMC_RSP_R1 | MMC_CMD_AC; - appcmd.data = NULL; - if (mmc_wait_for_cmd(sc, &appcmd, 0) != 0) - err = MMC_ERR_FAILED; - else - err = appcmd.error; - if (err == MMC_ERR_NONE) { - if (!(appcmd.resp[0] & R1_APP_CMD)) - err = MMC_ERR_FAILED; - else if (mmc_wait_for_cmd(sc, cmd, 0) != 0) - err = MMC_ERR_FAILED; - else - err = cmd->error; - } - } while (err != MMC_ERR_NONE && retries-- > 0); - sc->squelched--; - - if (err != MMC_ERR_NONE && sc->squelched == 0) { - if (ppsratecheck(&sc->log_time, &sc->log_count, LOG_PPS)) { - device_printf(sc->dev, "ACMD%d failed, RESULT: %d\n", - cmd->opcode, err); - } - } - - return (err); -} - -static int mmc_wait_for_command(struct mmc_softc *sc, uint32_t opcode, uint32_t arg, uint32_t flags, uint32_t *resp, int retries) { @@ -496,7 +413,7 @@ mmc_wait_for_command(struct mmc_softc *s cmd.arg = arg; cmd.flags = flags; cmd.data = NULL; - err = mmc_wait_for_cmd(sc, &cmd, retries); + err = mmc_wait_for_cmd(sc->dev, sc->dev, &cmd, retries); if (err) return (err); if (resp) { @@ -524,7 +441,7 @@ mmc_idle_cards(struct mmc_softc *sc) cmd.arg = 0; cmd.flags = MMC_RSP_NONE | MMC_CMD_BC; cmd.data = NULL; - mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); + mmc_wait_for_cmd(sc->dev, sc->dev, &cmd, CMD_RETRIES); mmc_ms_delay(1); mmcbr_set_chip_select(dev, cs_dontcare); @@ -545,7 +462,8 @@ mmc_send_app_op_cond(struct mmc_softc *s cmd.data = NULL; for (i = 0; i < 1000; i++) { - err = mmc_wait_for_app_cmd(sc, 0, &cmd, CMD_RETRIES); + err = mmc_wait_for_app_cmd(sc->dev, sc->dev, 0, &cmd, + CMD_RETRIES); if (err != MMC_ERR_NONE) break; if ((cmd.resp[0] & MMC_OCR_CARD_BUSY) || @@ -572,7 +490,7 @@ mmc_send_op_cond(struct mmc_softc *sc, u cmd.data = NULL; for (i = 0; i < 1000; i++) { - err = mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); + err = mmc_wait_for_cmd(sc->dev, sc->dev, &cmd, CMD_RETRIES); if (err != MMC_ERR_NONE) break; if ((cmd.resp[0] & MMC_OCR_CARD_BUSY) || @@ -598,7 +516,7 @@ mmc_send_if_cond(struct mmc_softc *sc, u cmd.flags = MMC_RSP_R7 | MMC_CMD_BCR; cmd.data = NULL; - err = mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); + err = mmc_wait_for_cmd(sc->dev, sc->dev, &cmd, CMD_RETRIES); return (err); } @@ -649,24 +567,6 @@ mmc_select_card(struct mmc_softc *sc, ui } static int -mmc_switch(struct mmc_softc *sc, uint8_t set, uint8_t index, uint8_t value) -{ - struct mmc_command cmd; - int err; - - memset(&cmd, 0, sizeof(cmd)); - cmd.opcode = MMC_SWITCH_FUNC; - cmd.arg = (MMC_SWITCH_FUNC_WR << 24) | - (index << 16) | - (value << 8) | - set; - cmd.flags = MMC_RSP_R1B | MMC_CMD_AC; - cmd.data = NULL; - err = mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); - return (err); -} - -static int mmc_sd_switch(struct mmc_softc *sc, uint8_t mode, uint8_t grp, uint8_t value, uint8_t *res) { @@ -690,12 +590,12 @@ mmc_sd_switch(struct mmc_softc *sc, uint data.len = 64; data.flags = MMC_DATA_READ; - err = mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); + err = mmc_wait_for_cmd(sc->dev, sc->dev, &cmd, CMD_RETRIES); return (err); } static int -mmc_set_card_bus_width(struct mmc_softc *sc, uint16_t rca, int width) +mmc_set_card_bus_width(struct mmc_softc *sc, struct mmc_ivars *ivar) { struct mmc_command cmd; int err; @@ -706,13 +606,14 @@ mmc_set_card_bus_width(struct mmc_softc cmd.opcode = ACMD_SET_CLR_CARD_DETECT; cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; cmd.arg = SD_CLR_CARD_DETECT; - err = mmc_wait_for_app_cmd(sc, rca, &cmd, CMD_RETRIES); + err = mmc_wait_for_app_cmd(sc->dev, sc->dev, ivar->rca, &cmd, + CMD_RETRIES); if (err != 0) return (err); memset(&cmd, 0, sizeof(cmd)); cmd.opcode = ACMD_SET_BUS_WIDTH; cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; - switch (width) { + switch (ivar->bus_width) { case bus_width_1: cmd.arg = SD_BUS_WIDTH_1; break; @@ -722,9 +623,10 @@ mmc_set_card_bus_width(struct mmc_softc default: return (MMC_ERR_INVALID); } - err = mmc_wait_for_app_cmd(sc, rca, &cmd, CMD_RETRIES); + err = mmc_wait_for_app_cmd(sc->dev, sc->dev, ivar->rca, &cmd, + CMD_RETRIES); } else { - switch (width) { + switch (ivar->bus_width) { case bus_width_1: value = EXT_CSD_BUS_WIDTH_1; break; @@ -737,18 +639,19 @@ mmc_set_card_bus_width(struct mmc_softc default: return (MMC_ERR_INVALID); } - err = mmc_switch(sc, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_BUS_WIDTH, - value); + err = mmc_switch(sc->dev, sc->dev, ivar->rca, + EXT_CSD_CMD_SET_NORMAL, EXT_CSD_BUS_WIDTH, value, + ivar->cmd6_time, true); } return (err); } static int -mmc_set_timing(struct mmc_softc *sc, int timing) +mmc_set_timing(struct mmc_softc *sc, struct mmc_ivars *ivar, int timing) { u_char switch_res[64]; - int err; uint8_t value; + int err; switch (timing) { case bus_timing_normal: @@ -760,12 +663,26 @@ mmc_set_timing(struct mmc_softc *sc, int default: return (MMC_ERR_INVALID); } - if (mmcbr_get_mode(sc->dev) == mode_sd) + if (mmcbr_get_mode(sc->dev) == mode_sd) { err = mmc_sd_switch(sc, SD_SWITCH_MODE_SET, SD_SWITCH_GROUP1, value, switch_res); - else - err = mmc_switch(sc, EXT_CSD_CMD_SET_NORMAL, - EXT_CSD_HS_TIMING, value); + if (err != MMC_ERR_NONE) + return (err); + if ((switch_res[16] & 0xf) != value) + return (MMC_ERR_FAILED); + mmcbr_set_timing(sc->dev, timing); + mmcbr_update_ios(sc->dev); + } else { + err = mmc_switch(sc->dev, sc->dev, ivar->rca, + EXT_CSD_CMD_SET_NORMAL, EXT_CSD_HS_TIMING, value, + ivar->cmd6_time, false); + if (err != MMC_ERR_NONE) + return (err); + mmcbr_set_timing(sc->dev, timing); + mmcbr_update_ios(sc->dev); + err = mmc_switch_status(sc->dev, sc->dev, ivar->rca, + ivar->cmd6_time); + } return (err); } @@ -808,7 +725,7 @@ mmc_test_bus_width(struct mmc_softc *sc) data.data = __DECONST(void *, p8); data.len = 8; data.flags = MMC_DATA_WRITE; - mmc_wait_for_cmd(sc, &cmd, 0); + mmc_wait_for_cmd(sc->dev, sc->dev, &cmd, 0); memset(&cmd, 0, sizeof(cmd)); memset(&data, 0, sizeof(data)); @@ -820,7 +737,7 @@ mmc_test_bus_width(struct mmc_softc *sc) data.data = buf; data.len = 8; data.flags = MMC_DATA_READ; - err = mmc_wait_for_cmd(sc, &cmd, 0); + err = mmc_wait_for_cmd(sc->dev, sc->dev, &cmd, 0); sc->squelched--; mmcbr_set_bus_width(sc->dev, bus_width_1); @@ -845,7 +762,7 @@ mmc_test_bus_width(struct mmc_softc *sc) data.data = __DECONST(void *, p4); data.len = 4; data.flags = MMC_DATA_WRITE; - mmc_wait_for_cmd(sc, &cmd, 0); + mmc_wait_for_cmd(sc->dev, sc->dev, &cmd, 0); memset(&cmd, 0, sizeof(cmd)); memset(&data, 0, sizeof(data)); @@ -857,7 +774,7 @@ mmc_test_bus_width(struct mmc_softc *sc) data.data = buf; data.len = 4; data.flags = MMC_DATA_READ; - err = mmc_wait_for_cmd(sc, &cmd, 0); + err = mmc_wait_for_cmd(sc->dev, sc->dev, &cmd, 0); sc->squelched--; mmcbr_set_bus_width(sc->dev, bus_width_1); @@ -899,7 +816,7 @@ mmc_decode_cid_sd(uint32_t *raw_cid, str } static void -mmc_decode_cid_mmc(uint32_t *raw_cid, struct mmc_cid *cid) +mmc_decode_cid_mmc(uint32_t *raw_cid, struct mmc_cid *cid, bool is_4_41p) { int i; @@ -913,7 +830,11 @@ mmc_decode_cid_mmc(uint32_t *raw_cid, st cid->prv = mmc_get_bits(raw_cid, 128, 48, 8); cid->psn = mmc_get_bits(raw_cid, 128, 16, 32); cid->mdt_month = mmc_get_bits(raw_cid, 128, 12, 4); - cid->mdt_year = mmc_get_bits(raw_cid, 128, 8, 4) + 1997; + cid->mdt_year = mmc_get_bits(raw_cid, 128, 8, 4); + if (is_4_41p) + cid->mdt_year += 2013; + else + cid->mdt_year += 1997; } static void @@ -1125,7 +1046,7 @@ mmc_all_send_cid(struct mmc_softc *sc, u cmd.arg = 0; cmd.flags = MMC_RSP_R2 | MMC_CMD_BCR; cmd.data = NULL; - err = mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); + err = mmc_wait_for_cmd(sc->dev, sc->dev, &cmd, CMD_RETRIES); memcpy(rawcid, cmd.resp, 4 * sizeof(uint32_t)); return (err); } @@ -1141,7 +1062,7 @@ mmc_send_csd(struct mmc_softc *sc, uint1 cmd.arg = rca << 16; cmd.flags = MMC_RSP_R2 | MMC_CMD_BCR; cmd.data = NULL; - err = mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); + err = mmc_wait_for_cmd(sc->dev, sc->dev, &cmd, CMD_RETRIES); memcpy(rawcsd, cmd.resp, 4 * sizeof(uint32_t)); return (err); } @@ -1166,37 +1087,13 @@ mmc_app_send_scr(struct mmc_softc *sc, u data.len = 8; data.flags = MMC_DATA_READ; - err = mmc_wait_for_app_cmd(sc, rca, &cmd, CMD_RETRIES); + err = mmc_wait_for_app_cmd(sc->dev, sc->dev, rca, &cmd, CMD_RETRIES); rawscr[0] = be32toh(rawscr[0]); rawscr[1] = be32toh(rawscr[1]); return (err); } static int -mmc_send_ext_csd(struct mmc_softc *sc, uint8_t *rawextcsd) -{ - struct mmc_command cmd; - struct mmc_data data; - int err; - - memset(&cmd, 0, sizeof(cmd)); - memset(&data, 0, sizeof(data)); - - memset(rawextcsd, 0, 512); - cmd.opcode = MMC_SEND_EXT_CSD; - cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; - cmd.arg = 0; - cmd.data = &data; - - data.data = rawextcsd; - data.len = 512; - data.flags = MMC_DATA_READ; - - err = mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); - return (err); -} - -static int mmc_app_sd_status(struct mmc_softc *sc, uint16_t rca, uint32_t *rawsdstatus) { struct mmc_command cmd; @@ -1216,7 +1113,7 @@ mmc_app_sd_status(struct mmc_softc *sc, data.len = 64; data.flags = MMC_DATA_READ; - err = mmc_wait_for_app_cmd(sc, rca, &cmd, CMD_RETRIES); + err = mmc_wait_for_app_cmd(sc->dev, sc->dev, rca, &cmd, CMD_RETRIES); for (i = 0; i < 16; i++) rawsdstatus[i] = be32toh(rawsdstatus[i]); return (err); @@ -1233,7 +1130,7 @@ mmc_set_relative_addr(struct mmc_softc * cmd.arg = resp << 16; cmd.flags = MMC_RSP_R6 | MMC_CMD_BCR; cmd.data = NULL; - err = mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); + err = mmc_wait_for_cmd(sc->dev, sc->dev, &cmd, CMD_RETRIES); return (err); } @@ -1248,28 +1145,12 @@ mmc_send_relative_addr(struct mmc_softc cmd.arg = 0; cmd.flags = MMC_RSP_R6 | MMC_CMD_BCR; cmd.data = NULL; - err = mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); + err = mmc_wait_for_cmd(sc->dev, sc->dev, &cmd, CMD_RETRIES); *resp = cmd.resp[0]; return (err); } static int -mmc_send_status(struct mmc_softc *sc, uint16_t rca, uint32_t *status) -{ - struct mmc_command cmd; - int err; - - memset(&cmd, 0, sizeof(cmd)); - cmd.opcode = MMC_SEND_STATUS; - cmd.arg = rca << 16; - cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; - cmd.data = NULL; - err = mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); - *status = cmd.resp[0]; - return (err); -} - -static int mmc_set_blocklen(struct mmc_softc *sc, uint32_t len) { struct mmc_command cmd; @@ -1280,13 +1161,14 @@ mmc_set_blocklen(struct mmc_softc *sc, u cmd.arg = len; cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; cmd.data = NULL; - err = mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); + err = mmc_wait_for_cmd(sc->dev, sc->dev, &cmd, CMD_RETRIES); return (err); } static void mmc_log_card(device_t dev, struct mmc_ivars *ivar, int newcard) { + device_printf(dev, "Card at relative address 0x%04x%s:\n", ivar->rca, newcard ? " added" : ""); device_printf(dev, " card: %s\n", ivar->card_id_string); @@ -1374,7 +1256,8 @@ mmc_discover_cards(struct mmc_softc *sc) ivar->erase_sector = ivar->csd.erase_sector * ivar->csd.write_bl_len / MMC_SECTOR_SIZE; - err = mmc_send_status(sc, ivar->rca, &status); + err = mmc_send_status(sc->dev, sc->dev, ivar->rca, + &status); if (err != MMC_ERR_NONE) { device_printf(sc->dev, "Error reading card status %d\n", err); @@ -1386,7 +1269,7 @@ mmc_discover_cards(struct mmc_softc *sc) break; } - /* Get card SCR. Card must be selected to fetch it. */ + /* Get card SCR. Card must be selected to fetch it. */ mmc_select_card(sc, ivar->rca); mmc_app_send_scr(sc, ivar->rca, ivar->raw_scr); mmc_app_decode_scr(ivar->raw_scr, &ivar->scr); @@ -1396,7 +1279,7 @@ mmc_discover_cards(struct mmc_softc *sc) mmc_sd_switch(sc, SD_SWITCH_MODE_CHECK, SD_SWITCH_GROUP1, SD_SWITCH_NOCHANGE, switch_res); - if (switch_res[13] & 2) { + if (switch_res[13] & (1 << SD_SWITCH_HS_MODE)) { ivar->timing = bus_timing_hs; ivar->hs_tran_speed = SD_MAX_HS; } @@ -1453,7 +1336,6 @@ mmc_discover_cards(struct mmc_softc *sc) mmc_select_card(sc, 0); return; } - mmc_decode_cid_mmc(ivar->raw_cid, &ivar->cid); ivar->rca = rca++; mmc_set_relative_addr(sc, ivar->rca); /* Get card CSD. */ @@ -1471,7 +1353,7 @@ mmc_discover_cards(struct mmc_softc *sc) ivar->erase_sector = ivar->csd.erase_sector * ivar->csd.write_bl_len / MMC_SECTOR_SIZE; - err = mmc_send_status(sc, ivar->rca, &status); + err = mmc_send_status(sc->dev, sc->dev, ivar->rca, &status); if (err != MMC_ERR_NONE) { device_printf(sc->dev, "Error reading card status %d\n", err); @@ -1485,9 +1367,15 @@ mmc_discover_cards(struct mmc_softc *sc) mmc_select_card(sc, ivar->rca); - /* Only MMC >= 4.x cards support EXT_CSD. */ + /* Only MMC >= 4.x devices support EXT_CSD. */ if (ivar->csd.spec_vers >= 4) { - mmc_send_ext_csd(sc, ivar->raw_ext_csd); + err = mmc_send_ext_csd(sc->dev, sc->dev, + ivar->raw_ext_csd); + if (err != MMC_ERR_NONE) { + device_printf(sc->dev, + "Error reading EXT_CSD %d\n", err); + break; + } /* Handle extended capacity from EXT_CSD */ sec_count = ivar->raw_ext_csd[EXT_CSD_SEC_CNT] + (ivar->raw_ext_csd[EXT_CSD_SEC_CNT + 1] << 8) + @@ -1507,14 +1395,31 @@ mmc_discover_cards(struct mmc_softc *sc) ivar->hs_tran_speed = MMC_TYPE_26_MAX_HS; else ivar->hs_tran_speed = ivar->tran_speed; + /* + * Determine generic switch timeout (provided in + * units of 10 ms), defaulting to 500 ms. + */ + ivar->cmd6_time = 500 * 1000; + if (ivar->csd.spec_vers >= 6) + ivar->cmd6_time = 10 * + ivar->raw_ext_csd[EXT_CSD_GEN_CMD6_TIME]; /* Find max supported bus width. */ ivar->bus_width = mmc_test_bus_width(sc); /* Handle HC erase sector size. */ if (ivar->raw_ext_csd[EXT_CSD_ERASE_GRP_SIZE] != 0) { ivar->erase_sector = 1024 * ivar->raw_ext_csd[EXT_CSD_ERASE_GRP_SIZE]; - mmc_switch(sc, EXT_CSD_CMD_SET_NORMAL, - EXT_CSD_ERASE_GRP_DEF, 1); + err = mmc_switch(sc->dev, sc->dev, ivar->rca, + EXT_CSD_CMD_SET_NORMAL, + EXT_CSD_ERASE_GRP_DEF, + EXT_CSD_ERASE_GRP_DEF_EN, + ivar->cmd6_time, true); + if (err != MMC_ERR_NONE) { + device_printf(sc->dev, + "Error setting erase group %d\n", + err); + break; + } } } else { ivar->bus_width = bus_width_1; @@ -1533,6 +1438,8 @@ mmc_discover_cards(struct mmc_softc *sc) ivar->csd.write_bl_len != MMC_SECTOR_SIZE) mmc_set_blocklen(sc, MMC_SECTOR_SIZE); + mmc_decode_cid_mmc(ivar->raw_cid, &ivar->cid, + ivar->raw_ext_csd[EXT_CSD_REV] >= 5); mmc_format_card_id_string(ivar); if (bootverbose || mmc_debug) @@ -1672,8 +1579,6 @@ mmc_go_discovery(struct mmc_softc *sc) mmcbr_set_bus_mode(dev, pushpull); mmcbr_update_ios(dev); mmc_calculate_clock(sc); - bus_generic_attach(dev); -/* mmc_update_children_sysctl(dev);*/ } static int @@ -1700,27 +1605,26 @@ mmc_calculate_clock(struct mmc_softc *sc if (ivar->hs_tran_speed < max_hs_dtr) max_hs_dtr = ivar->hs_tran_speed; } + if (bootverbose || mmc_debug) { + device_printf(sc->dev, + "setting transfer rate to %d.%03dMHz%s\n", + max_dtr / 1000000, (max_dtr / 1000) % 1000, + max_timing == bus_timing_hs ? " (high speed timing)" : ""); + } for (i = 0; i < nkid; i++) { ivar = device_get_ivars(kids[i]); if (ivar->timing == bus_timing_normal) continue; mmc_select_card(sc, ivar->rca); - mmc_set_timing(sc, max_timing); + mmc_set_timing(sc, ivar, max_timing); } mmc_select_card(sc, 0); free(kids, M_TEMP); if (max_timing == bus_timing_hs) max_dtr = max_hs_dtr; - if (bootverbose || mmc_debug) { - device_printf(sc->dev, - "setting transfer rate to %d.%03dMHz%s\n", - max_dtr / 1000000, (max_dtr / 1000) % 1000, - max_timing == bus_timing_hs ? " (high speed timing)" : ""); - } - mmcbr_set_timing(sc->dev, max_timing); mmcbr_set_clock(sc->dev, max_dtr); mmcbr_update_ios(sc->dev); - return max_dtr; + return (max_dtr); } static void @@ -1731,6 +1635,8 @@ mmc_scan(struct mmc_softc *sc) mmc_acquire_bus(dev, dev); mmc_go_discovery(sc); mmc_release_bus(dev, dev); + + bus_generic_attach(dev); } static int @@ -1741,6 +1647,9 @@ mmc_read_ivar(device_t bus, device_t chi switch (which) { default: return (EINVAL); + case MMC_IVAR_SPEC_VERS: + *result = ivar->csd.spec_vers; + break; case MMC_IVAR_DSR_IMP: *result = ivar->csd.dsr_imp; break; @@ -1840,4 +1749,4 @@ driver_t mmc_driver = { }; devclass_t mmc_devclass; -MODULE_VERSION(mmc, 1); +MODULE_VERSION(mmc, MMC_VERSION); Added: head/sys/dev/mmc/mmc_ioctl.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/mmc/mmc_ioctl.h Thu Mar 16 22:23:04 2017 (r315430) @@ -0,0 +1,64 @@ +/*- + * Copyright (c) 2017 Marius Strobl + * 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$ + */ + +#ifndef _DEV_MMC_MMC_IOCTL_H_ +#define _DEV_MMC_MMC_IOCTL_H_ + +struct mmc_ioc_cmd { + int write_flag; /* 0: RD, 1: WR, (1 << 31): reliable WR */ + int is_acmd; /* 0: normal, 1: use CMD55 */ + uint32_t opcode; + uint32_t arg; + uint32_t response[4]; + u_int flags; + u_int blksz; + u_int blocks; + u_int __spare[4]; + uint32_t __pad; + uint64_t data_ptr; +}; + +#define mmc_ioc_cmd_set_data(mic, ptr) \ + (mic).data_ptr = (uint64_t)(uintptr_t)(ptr) + +struct mmc_ioc_multi_cmd { + uint64_t num_of_cmds; + struct mmc_ioc_cmd cmds[0]; +}; + +#define MMC_IOC_BASE 'M' + +#define MMC_IOC_CMD _IOWR(MMC_IOC_BASE, 0, struct mmc_ioc_cmd) +#define MMC_IOC_CMD_MULTI _IOWR(MMC_IOC_BASE, 1, struct mmc_ioc_multi_cmd) + +/* Maximum accepted data transfer size */ +#define MMC_IOC_MAX_BYTES (512 * 256) +/* Maximum accepted number of commands */ +#define MMC_IOC_MAX_CMDS 255 + +#endif /* _DEV_MMC_MMC_IOCTL_H_ */ Added: head/sys/dev/mmc/mmc_private.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/mmc/mmc_private.h Thu Mar 16 22:23:04 2017 (r315430) @@ -0,0 +1,69 @@ +/*- + * Copyright (c) 2006 Bernd Walter. All rights reserved. + * Copyright (c) 2006 M. Warner Losh. 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. + * + * Portions of this software may have been developed with reference to + * the SD Simplified Specification. The following disclaimer may apply: + * + * The following conditions apply to the release of the simplified + * specification ("Simplified Specification") by the SD Card Association and + * the SD Group. The Simplified Specification is a subset of the complete SD + * Specification which is owned by the SD Card Association and the SD + * Group. This Simplified Specification is provided on a non-confidential + * basis subject to the disclaimers below. Any implementation of the + * Simplified Specification may require a license from the SD Card + * Association, SD Group, SD-3C LLC or other third parties. + * + * Disclaimers: + * + * The information contained in the Simplified Specification is presented only + * as a standard specification for SD Cards and SD Host/Ancillary products and + * is provided "AS-IS" without any representations or warranties of any + * kind. No responsibility is assumed by the SD Group, SD-3C LLC or the SD + * Card Association for any damages, any infringements of patents or other + * right of the SD Group, SD-3C LLC, the SD Card Association or any third + * parties, which may result from its use. No license is granted by + * implication, estoppel or otherwise under any patent or other rights of the + * SD Group, SD-3C LLC, the SD Card Association or any third party. Nothing + * herein shall be construed as an obligation by the SD Group, the SD-3C LLC + * or the SD Card Association to disclose or distribute any technical + * information, know-how or other confidential information to any third party. + * + * $FreeBSD$ + */ + +#ifndef DEV_MMC_PRIVATE_H +#define DEV_MMC_PRIVATE_H + +struct mmc_softc { + device_t dev; + struct mtx sc_mtx; + struct intr_config_hook config_intrhook; + device_t owner; + uint32_t last_rca; + int squelched; /* suppress reporting of (expected) errors */ + int log_count; + struct timeval log_time; +}; + +#endif /* DEV_MMC_PRIVATE_H */ Copied and modified: head/sys/dev/mmc/mmc_subr.c (from r313250, head/sys/dev/mmc/mmc.c) ============================================================================== --- head/sys/dev/mmc/mmc.c Sat Feb 4 19:35:38 2017 (r313250, copy source) +++ head/sys/dev/mmc/mmc_subr.c Thu Mar 16 22:23:04 2017 (r315430) @@ -56,369 +56,27 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include -#include #include -#include -#include -#include #include +#include +#include +#include #include #include -#include -#include "mmcbr_if.h" -#include "mmcbus_if.h" - -struct mmc_softc { - device_t dev; - struct mtx sc_mtx; - struct intr_config_hook config_intrhook; - device_t owner; - uint32_t last_rca; - int squelched; /* suppress reporting of (expected) errors */ - int log_count; - struct timeval log_time; -}; - -#define LOG_PPS 5 /* Log no more than 5 errors per second. */ -/* - * Per-card data - */ -struct mmc_ivars { - uint32_t raw_cid[4]; /* Raw bits of the CID */ - uint32_t raw_csd[4]; /* Raw bits of the CSD */ - uint32_t raw_scr[2]; /* Raw bits of the SCR */ - uint8_t raw_ext_csd[512]; /* Raw bits of the EXT_CSD */ - uint32_t raw_sd_status[16]; /* Raw bits of the SD_STATUS */ - uint16_t rca; - enum mmc_card_mode mode; - struct mmc_cid cid; /* cid decoded */ - struct mmc_csd csd; /* csd decoded */ - struct mmc_scr scr; /* scr decoded */ - struct mmc_sd_status sd_status; /* SD_STATUS decoded */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Thu Mar 16 22:42:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF943D0F3B9; Thu, 16 Mar 2017 22:42:18 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 B02D416C8; Thu, 16 Mar 2017 22:42:18 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2GMgHD4082930; Thu, 16 Mar 2017 22:42:17 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2GMgHp6082928; Thu, 16 Mar 2017 22:42:17 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201703162242.v2GMgHp6082928@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Thu, 16 Mar 2017 22:42:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315431 - head/sys/dev/sdhci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 16 Mar 2017 22:42:19 -0000 Author: marius Date: Thu Mar 16 22:42:17 2017 New Revision: 315431 URL: https://svnweb.freebsd.org/changeset/base/315431 Log: - Adds macros for the content of SDHCI_ADMA_ERR and SDHCI_HOST_CONTROL2 registers. - Add slot type capability bits. These bits should allow recognizing removable card slots, embedded cards and shared buses (shared bus supposedly is always comprised of non-removable cards). - Dump CAPABILITIES2, ADMA_ERR, HOST_CONTROL2 and ADMA_ADDRESS_LO registers in sdhci_dumpregs(). - The drive type support flags in the CAPABILITIES2 register are for drive types A,C,D, drive type B is the default setting (value 0) of the drive strength field in the SDHCI_HOST_CONTROL2 register. Obtained from: DragonFlyBSD (9e3c8f63, 455bd1b1) Modified: head/sys/dev/sdhci/sdhci.c head/sys/dev/sdhci/sdhci.h Modified: head/sys/dev/sdhci/sdhci.c ============================================================================== --- head/sys/dev/sdhci/sdhci.c Thu Mar 16 22:23:04 2017 (r315430) +++ head/sys/dev/sdhci/sdhci.c Thu Mar 16 22:42:17 2017 (r315431) @@ -157,10 +157,14 @@ sdhci_dumpregs(struct sdhci_slot *slot) RD1(slot, SDHCI_TIMEOUT_CONTROL), RD4(slot, SDHCI_INT_STATUS)); slot_printf(slot, "Int enab: 0x%08x | Sig enab: 0x%08x\n", RD4(slot, SDHCI_INT_ENABLE), RD4(slot, SDHCI_SIGNAL_ENABLE)); - slot_printf(slot, "AC12 err: 0x%08x | Slot int: 0x%08x\n", - RD2(slot, SDHCI_ACMD12_ERR), RD2(slot, SDHCI_SLOT_INT_STATUS)); - slot_printf(slot, "Caps: 0x%08x | Max curr: 0x%08x\n", - RD4(slot, SDHCI_CAPABILITIES), RD4(slot, SDHCI_MAX_CURRENT)); + slot_printf(slot, "AC12 err: 0x%08x | Host ctl2: 0x%08x\n", + RD2(slot, SDHCI_ACMD12_ERR), RD2(slot, SDHCI_HOST_CONTROL2)); + slot_printf(slot, "Caps: 0x%08x | Caps2: 0x%08x\n", + RD4(slot, SDHCI_CAPABILITIES), RD4(slot, SDHCI_CAPABILITIES2)); + slot_printf(slot, "Max curr: 0x%08x | ADMA err: 0x%08x\n", + RD4(slot, SDHCI_MAX_CURRENT), RD1(slot, SDHCI_ADMA_ERR)); + slot_printf(slot, "ADMA addr: 0x%08x | Slot int: 0x%08x\n", + RD4(slot, SDHCI_ADMA_ADDRESS_LO), RD2(slot, SDHCI_SLOT_INT_STATUS)); slot_printf(slot, "===========================================\n"); Modified: head/sys/dev/sdhci/sdhci.h ============================================================================== --- head/sys/dev/sdhci/sdhci.h Thu Mar 16 22:23:04 2017 (r315430) +++ head/sys/dev/sdhci/sdhci.h Thu Mar 16 22:42:17 2017 (r315431) @@ -219,7 +219,24 @@ SDHCI_INT_DATA_END_BIT) #define SDHCI_ACMD12_ERR 0x3C + #define SDHCI_HOST_CONTROL2 0x3E +#define SDHCI_CTRL2_PRESET_VALUE 0x8000 +#define SDHCI_CTRL2_ASYNC_INTR 0x4000 +#define SDHCI_CTRL2_SAMPLING_CLOCK 0x0080 +#define SDHCI_CTRL2_EXEC_TUNING 0x0040 +#define SDHCI_CTRL2_DRIVER_TYPE_MASK 0x0030 +#define SDHCI_CTRL2_DRIVER_TYPE_B 0x0000 +#define SDHCI_CTRL2_DRIVER_TYPE_A 0x0010 +#define SDHCI_CTRL2_DRIVER_TYPE_C 0x0020 +#define SDHCI_CTRL2_DRIVER_TYPE_D 0x0030 +#define SDHCI_CTRL2_S18_ENABLE 0x0008 +#define SDHCI_CTRL2_UHS_MASK 0x0007 +#define SDHCI_CTRL2_UHS_SDR12 0x0000 +#define SDHCI_CTRL2_UHS_SDR25 0x0001 +#define SDHCI_CTRL2_UHS_SDR50 0x0002 +#define SDHCI_CTRL2_UHS_SDR104 0x0003 +#define SDHCI_CTRL2_UHS_DDR50 0x0004 #define SDHCI_CAPABILITIES 0x40 #define SDHCI_TIMEOUT_CLK_MASK 0x0000003F @@ -240,14 +257,18 @@ #define SDHCI_CAN_VDD_180 0x04000000 #define SDHCI_CAN_DO_64BIT 0x10000000 #define SDHCI_CAN_ASYNC_INTR 0x20000000 +#define SDHCI_SLOTTYPE_MASK 0xC0000000 +#define SDHCI_SLOTTYPE_REMOVABLE 0x00000000 +#define SDHCI_SLOTTYPE_EMBEDDED 0x40000000 +#define SDHCI_SLOTTYPE_SHARED 0x80000000 #define SDHCI_CAPABILITIES2 0x44 #define SDHCI_CAN_SDR50 0x00000001 #define SDHCI_CAN_SDR104 0x00000002 #define SDHCI_CAN_DDR50 0x00000004 #define SDHCI_CAN_DRIVE_TYPE_A 0x00000010 -#define SDHCI_CAN_DRIVE_TYPE_B 0x00000020 -#define SDHCI_CAN_DRIVE_TYPE_C 0x00000040 +#define SDHCI_CAN_DRIVE_TYPE_C 0x00000020 +#define SDHCI_CAN_DRIVE_TYPE_D 0x00000040 #define SDHCI_RETUNE_CNT_MASK 0x00000F00 #define SDHCI_RETUNE_CNT_SHIFT 8 #define SDHCI_TUNE_SDR50 0x00002000 @@ -259,9 +280,17 @@ #define SDHCI_MAX_CURRENT 0x48 #define SDHCI_FORCE_AUTO_EVENT 0x50 #define SDHCI_FORCE_INTR_EVENT 0x52 + #define SDHCI_ADMA_ERR 0x54 -#define SDHCI_ADMA_ADDRESS_LOW 0x58 +#define SDHCI_ADMA_ERR_LENGTH 0x04 +#define SDHCI_ADMA_ERR_STATE_MASK 0x03 +#define SDHCI_ADMA_ERR_STATE_STOP 0x00 +#define SDHCI_ADMA_ERR_STATE_FDS 0x01 +#define SDHCI_ADMA_ERR_STATE_TFR 0x03 + +#define SDHCI_ADMA_ADDRESS_LO 0x58 #define SDHCI_ADMA_ADDRESS_HI 0x5C + #define SDHCI_PRESET_VALUE 0x60 #define SDHCI_SHARED_BUS_CTRL 0xE0 @@ -275,6 +304,7 @@ #define SDHCI_SPEC_100 0 #define SDHCI_SPEC_200 1 #define SDHCI_SPEC_300 2 +#define SDHCI_SPEC_400 3 SYSCTL_DECL(_hw_sdhci); From owner-svn-src-head@freebsd.org Fri Mar 17 00:46:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99543D0E69F; Fri, 17 Mar 2017 00:46:52 +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 mx1.freebsd.org (Postfix) with ESMTPS id 662F51A5F; Fri, 17 Mar 2017 00:46:52 +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 v2H0kp6F033055; Fri, 17 Mar 2017 00:46:51 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2H0koIl033049; Fri, 17 Mar 2017 00:46:50 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201703170046.v2H0koIl033049@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Fri, 17 Mar 2017 00:46:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315435 - in head: contrib/top usr.bin/top X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 17 Mar 2017 00:46:52 -0000 Author: allanjude Date: Fri Mar 17 00:46:50 2017 New Revision: 315435 URL: https://svnweb.freebsd.org/changeset/base/315435 Log: Add ZFS compressed ARC stats to top(1) Provides: amount of compressed data logical size of compressed data (how much it would have taken uncompressed) compression ratio (logical size : total ARC size) Overhead (space consumed for compression headers) Example output: ARC: 31G Total, 18G MFU, 9067M MRU, 2236K Anon, 615M Header, 2947M Other 25G Compressed, 54G Uncompressed, 1.76:1 Ratio, 2265M Overhead Reviewed by: jpaetzel, smh, imp, jhb (previous version) MFC after: 2 week Relnotes: yes Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D9829 Modified: head/contrib/top/display.c head/contrib/top/display.h head/contrib/top/layout.h head/contrib/top/machine.h head/contrib/top/top.c head/usr.bin/top/machine.c Modified: head/contrib/top/display.c ============================================================================== --- head/contrib/top/display.c Thu Mar 16 23:18:57 2017 (r315434) +++ head/contrib/top/display.c Fri Mar 17 00:46:50 2017 (r315435) @@ -69,6 +69,7 @@ static char **procstate_names; static char **cpustate_names; static char **memory_names; static char **arc_names; +static char **carc_names; static char **swap_names; static int num_procstates; @@ -105,6 +106,8 @@ int x_mem = 5; int y_mem = 3; int x_arc = 5; int y_arc = 4; +int x_carc = 5; +int y_carc = 5; int x_swap = 6; int y_swap = 4; int y_message = 5; @@ -222,6 +225,7 @@ struct statics *statics; lmemory = (int *)malloc(num_memory * sizeof(int)); arc_names = statics->arc_names; + carc_names = statics->carc_names; /* calculate starting columns where needed */ cpustate_total_length = 0; @@ -684,6 +688,47 @@ int *stats; line_update(arc_buffer, new, x_arc, y_arc); } + +/* + * *_carc(stats) - print "Compressed ARC: " followed by the summary string + * + * Assumptions: cursor is on "lastline" + * for i_carc ONLY: cursor is on the previous line + */ +char carc_buffer[MAX_COLS]; + +void +i_carc(stats) + +int *stats; + +{ + if (carc_names == NULL) + return; + + fputs("\n ", stdout); + lastline++; + + /* format and print the memory summary */ + summary_format(carc_buffer, stats, carc_names); + fputs(carc_buffer, stdout); +} + +void +u_carc(stats) + +int *stats; + +{ + static char new[MAX_COLS]; + + if (carc_names == NULL) + return; + + /* format the new line */ + summary_format(new, stats, carc_names); + line_update(carc_buffer, new, x_carc, y_carc); +} /* * *_swap(stats) - print "Swap: " followed by the swap summary string @@ -1174,6 +1219,7 @@ register char **names; register int num; register char *thisname; register int useM = No; + char rbuf[6]; /* format each number followed by its string */ p = str; @@ -1194,6 +1240,14 @@ register char **names; /* skip over the K, since it was included by format_k */ p = strecpy(p, thisname+1); } + /* is this number a ratio? */ + else if (thisname[0] == ':') + { + (void) snprintf(rbuf, sizeof(rbuf), "%.2f", + (float)*(numbers - 2) / (float)num); + p = strecpy(p, rbuf); + p = strecpy(p, thisname); + } else { p = strecpy(p, itoa(num)); Modified: head/contrib/top/display.h ============================================================================== --- head/contrib/top/display.h Thu Mar 16 23:18:57 2017 (r315434) +++ head/contrib/top/display.h Fri Mar 17 00:46:50 2017 (r315435) @@ -16,6 +16,7 @@ char *cpustates_tag(void); void display_header(int t); int display_init(struct statics *statics); void i_arc(int *stats); +void i_carc(int *stats); void i_cpustates(int *states); void i_loadave(int mpid, double *avenrun); void i_memory(int *stats); @@ -29,6 +30,7 @@ void new_message(); int readline(char *buffer, int size, int numeric); char *trim_header(char *text); void u_arc(int *stats); +void u_carc(int *stats); void u_cpustates(int *states); void u_endscreen(int hi); void u_header(char *text); Modified: head/contrib/top/layout.h ============================================================================== --- head/contrib/top/layout.h Thu Mar 16 23:18:57 2017 (r315434) +++ head/contrib/top/layout.h Fri Mar 17 00:46:50 2017 (r315435) @@ -21,6 +21,8 @@ extern int x_mem; /* 5 */ extern int y_mem; /* 3 */ extern int x_arc; /* 5 */ extern int y_arc; /* 4 */ +extern int x_carc; /* 5 */ +extern int y_carc; /* 5 */ extern int x_swap; /* 6 */ extern int y_swap; /* 4 */ extern int y_message; /* 5 */ Modified: head/contrib/top/machine.h ============================================================================== --- head/contrib/top/machine.h Thu Mar 16 23:18:57 2017 (r315434) +++ head/contrib/top/machine.h Fri Mar 17 00:46:50 2017 (r315435) @@ -21,6 +21,7 @@ struct statics char **cpustate_names; char **memory_names; char **arc_names; + char **carc_names; char **swap_names; #ifdef ORDER char **order_names; @@ -48,6 +49,7 @@ struct system_info int *cpustates; int *memory; int *arc; + int *carc; int *swap; struct timeval boottime; int ncpus; Modified: head/contrib/top/top.c ============================================================================== --- head/contrib/top/top.c Thu Mar 16 23:18:57 2017 (r315434) +++ head/contrib/top/top.c Fri Mar 17 00:46:50 2017 (r315435) @@ -125,6 +125,7 @@ void (*d_procstates)() = i_procstates; void (*d_cpustates)() = i_cpustates; void (*d_memory)() = i_memory; void (*d_arc)() = i_arc; +void (*d_carc)() = i_carc; void (*d_swap)() = i_swap; void (*d_message)() = i_message; void (*d_header)() = i_header; @@ -658,6 +659,7 @@ restart: /* display memory stats */ (*d_memory)(system_info.memory); (*d_arc)(system_info.arc); + (*d_carc)(system_info.carc); /* display swap stats */ (*d_swap)(system_info.swap); @@ -724,6 +726,7 @@ restart: d_cpustates = u_cpustates; d_memory = u_memory; d_arc = u_arc; + d_carc = u_carc; d_swap = u_swap; d_message = u_message; d_header = u_header; @@ -1190,6 +1193,7 @@ reset_display() d_cpustates = i_cpustates; d_memory = i_memory; d_arc = i_arc; + d_carc = i_carc; d_swap = i_swap; d_message = i_message; d_header = i_header; Modified: head/usr.bin/top/machine.c ============================================================================== --- head/usr.bin/top/machine.c Thu Mar 16 23:18:57 2017 (r315434) +++ head/usr.bin/top/machine.c Fri Mar 17 00:46:50 2017 (r315435) @@ -188,6 +188,12 @@ char *arcnames[] = { NULL }; +int carc_stats[5]; +char *carcnames[] = { + "K Compressed, ", "K Uncompressed, ", ":1 Ratio, ", "K Overhead", + NULL +}; + int swap_stats[7]; char *swapnames[] = { "K Total, ", "K Used, ", "K Free, ", "% Inuse, ", "K In, ", "K Out", @@ -223,6 +229,7 @@ static long total_majflt; /* these are for getting the memory statistics */ static int arc_enabled; +static int carc_enabled; static int pageshift; /* log base 2 of the pagesize */ /* define pagetok in terms of pageshift */ @@ -283,16 +290,18 @@ update_layout(void) y_mem = 3; y_arc = 4; - y_swap = 4 + arc_enabled; - y_idlecursor = 5 + arc_enabled; - y_message = 5 + arc_enabled; - y_header = 6 + arc_enabled; - y_procs = 7 + arc_enabled; - Header_lines = 7 + arc_enabled; + y_carc = 5; + y_swap = 4 + arc_enabled + carc_enabled; + y_idlecursor = 5 + arc_enabled + carc_enabled; + y_message = 5 + arc_enabled + carc_enabled; + y_header = 6 + arc_enabled + carc_enabled; + y_procs = 7 + arc_enabled + carc_enabled; + Header_lines = 7 + arc_enabled + carc_enabled; if (pcpu_stats) { y_mem += ncpus - 1; y_arc += ncpus - 1; + y_carc += ncpus - 1; y_swap += ncpus - 1; y_idlecursor += ncpus - 1; y_message += ncpus - 1; @@ -319,6 +328,10 @@ machine_init(struct statics *statics, ch smpmode = 0; size = sizeof(arc_size); + if (sysctlbyname("vfs.zfs.compressed_arc_enabled", &arc_size, &size, + NULL, 0) == 0 && arc_size == 1) + carc_enabled = 1; + size = sizeof(arc_size); if (sysctlbyname("kstat.zfs.misc.arcstats.size", &arc_size, &size, NULL, 0) == 0 && arc_size != 0) arc_enabled = 1; @@ -368,6 +381,10 @@ machine_init(struct statics *statics, ch statics->arc_names = arcnames; else statics->arc_names = NULL; + if (carc_enabled) + statics->carc_names = carcnames; + else + statics->carc_names = NULL; statics->swap_names = swapnames; #ifdef ORDER statics->order_names = ordernames; @@ -559,6 +576,16 @@ get_system_info(struct system_info *si) arc_stats[5] = arc_stat >> 10; si->arc = arc_stats; } + if (carc_enabled) { + GETSYSCTL("kstat.zfs.misc.arcstats.compressed_size", arc_stat); + carc_stats[0] = arc_stat >> 10; + GETSYSCTL("kstat.zfs.misc.arcstats.uncompressed_size", arc_stat); + carc_stats[1] = arc_stat >> 10; + carc_stats[2] = arc_stats[0]; /* ARC Total */ + GETSYSCTL("kstat.zfs.misc.arcstats.overhead_size", arc_stat); + carc_stats[3] = arc_stat >> 10; + si->carc = carc_stats; + } /* set arrays and strings */ if (pcpu_stats) { From owner-svn-src-head@freebsd.org Fri Mar 17 03:14:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ECFBDD0F7BA; Fri, 17 Mar 2017 03:14:16 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B7CE71AC8; Fri, 17 Mar 2017 03:14:16 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2H3EF4x094873; Fri, 17 Mar 2017 03:14:15 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2H3EFYf094872; Fri, 17 Mar 2017 03:14:15 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201703170314.v2H3EFYf094872@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 17 Mar 2017 03:14:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315438 - head/share/man/man4/man4.powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 17 Mar 2017 03:14:17 -0000 Author: jhibbits Date: Fri Mar 17 03:14:15 2017 New Revision: 315438 URL: https://svnweb.freebsd.org/changeset/base/315438 Log: Update dtsec man page with correct config requirements. Modified: head/share/man/man4/man4.powerpc/dtsec.4 Modified: head/share/man/man4/man4.powerpc/dtsec.4 ============================================================================== --- head/share/man/man4/man4.powerpc/dtsec.4 Fri Mar 17 03:03:58 2017 (r315437) +++ head/share/man/man4/man4.powerpc/dtsec.4 Fri Mar 17 03:14:15 2017 (r315438) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 28, 2016 +.Dd March 16, 2017 .Dt DTSEC 4 .Os .Sh NAME @@ -35,10 +35,8 @@ To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent -.Cd "include ""dpaa/DPAA"" -.Cd "options QORIQ_DPAA" +.Cd "include ""dpaa/config.dpaa"" .Cd "device dpaa" -.Cd "device dtsec" .Cd "device miibus" .Ed .Sh DESCRIPTION From owner-svn-src-head@freebsd.org Fri Mar 17 04:16:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89ACBD0E934; Fri, 17 Mar 2017 04:16:15 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 51CF9174A; Fri, 17 Mar 2017 04:16:15 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2H4GER7018987; Fri, 17 Mar 2017 04:16:14 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2H4GEiL018986; Fri, 17 Mar 2017 04:16:14 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201703170416.v2H4GEiL018986@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 17 Mar 2017 04:16:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315439 - head/libexec/rpc.rstatd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 17 Mar 2017 04:16:15 -0000 Author: glebius Date: Fri Mar 17 04:16:14 2017 New Revision: 315439 URL: https://svnweb.freebsd.org/changeset/base/315439 Log: Remove unused vmmeter. Modified: head/libexec/rpc.rstatd/rstat_proc.c Modified: head/libexec/rpc.rstatd/rstat_proc.c ============================================================================== --- head/libexec/rpc.rstatd/rstat_proc.c Fri Mar 17 03:14:15 2017 (r315438) +++ head/libexec/rpc.rstatd/rstat_proc.c Fri Mar 17 04:16:14 2017 (r315439) @@ -47,7 +47,6 @@ static const char rcsid[] = #include #include #include -#include #include #include @@ -166,7 +165,6 @@ updatestat(void) { int i, hz; struct clockinfo clockrate; - struct vmmeter cnt; struct ifmibdata ifmd; double avrun[3]; struct timeval tm, btm; From owner-svn-src-head@freebsd.org Fri Mar 17 08:02:48 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58EA1D0F080; Fri, 17 Mar 2017 08:02:48 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C5FA1C85; Fri, 17 Mar 2017 08:02:48 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2H82l7E014284; Fri, 17 Mar 2017 08:02:47 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2H82lK3014283; Fri, 17 Mar 2017 08:02:47 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201703170802.v2H82lK3014283@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 17 Mar 2017 08:02:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315442 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 17 Mar 2017 08:02:48 -0000 Author: hselasky Date: Fri Mar 17 08:02:46 2017 New Revision: 315442 URL: https://svnweb.freebsd.org/changeset/base/315442 Log: Add comment describing the use of pagefault_disable() and pagefault_enable() in the LinuxKPI. Suggested by: rpokala@ MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/uaccess.h Modified: head/sys/compat/linuxkpi/common/include/linux/uaccess.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/uaccess.h Fri Mar 17 07:56:20 2017 (r315441) +++ head/sys/compat/linuxkpi/common/include/linux/uaccess.h Fri Mar 17 08:02:46 2017 (r315442) @@ -67,6 +67,13 @@ extern int linux_copyout(const void *kad extern size_t linux_clear_user(void *uaddr, size_t len); extern int linux_access_ok(int rw, const void *uaddr, size_t len); +/* + * NOTE: Each pagefault_disable() call must have a corresponding + * pagefault_enable() call in the same scope. The former creates a new + * block and defines a temporary variable, and the latter uses the + * temporary variable and closes the block. Failure to balance the + * calls will result in a compile-time error. + */ #define pagefault_disable(void) do { \ int __saved_pflags = \ vm_fault_disable_pagefaults() From owner-svn-src-head@freebsd.org Fri Mar 17 10:30:08 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 411CBD10B3E; Fri, 17 Mar 2017 10:30:08 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E4DD1F83; Fri, 17 Mar 2017 10:30:07 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2HAU7g1072627; Fri, 17 Mar 2017 10:30:07 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2HAU6v6072623; Fri, 17 Mar 2017 10:30:06 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201703171030.v2HAU6v6072623@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 17 Mar 2017 10:30:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315443 - in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 17 Mar 2017 10:30:08 -0000 Author: hselasky Date: Fri Mar 17 10:30:06 2017 New Revision: 315443 URL: https://svnweb.freebsd.org/changeset/base/315443 Log: Implement minimalistic memory mapping structure, struct mm_struct, and some associated helper functions in the LinuxKPI. Let the existing linux_alloc_current() function allocate and initialize the new structure and let linux_free_current() drop the refcount on the memory mapping structure. When the mm_struct's refcount reaches zero, the structure is freed. Obtained from: kmacy @ MFC after: 1 week Sponsored by: Mellanox Technologies Added: head/sys/compat/linuxkpi/common/include/linux/mm_types.h (contents, props changed) Modified: head/sys/compat/linuxkpi/common/include/linux/mm.h head/sys/compat/linuxkpi/common/include/linux/sched.h head/sys/compat/linuxkpi/common/src/linux_current.c Modified: head/sys/compat/linuxkpi/common/include/linux/mm.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/mm.h Fri Mar 17 08:02:46 2017 (r315442) +++ head/sys/compat/linuxkpi/common/include/linux/mm.h Fri Mar 17 10:30:06 2017 (r315443) @@ -36,6 +36,7 @@ #include #include #include +#include #define PAGE_ALIGN(x) ALIGN(x, PAGE_SIZE) Added: head/sys/compat/linuxkpi/common/include/linux/mm_types.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/linuxkpi/common/include/linux/mm_types.h Fri Mar 17 10:30:06 2017 (r315443) @@ -0,0 +1,71 @@ +/*- + * Copyright (c) 2017 Mellanox Technologies, Ltd. + * 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 unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _LINUX_MM_TYPES_H_ +#define _LINUX_MM_TYPES_H_ + +#include +#include +#include +#include + +#include + +struct vm_area_struct; +struct task_struct; +struct vmspace; + +struct mm_struct { + struct vm_area_struct *mmap; + struct vmspace *vmspace; + atomic_t mm_count; + atomic_t mm_users; + size_t pinned_vm; + struct rw_semaphore mmap_sem; +}; + +extern void linux_mm_dtor(struct mm_struct *mm); + +static inline void +mmdrop(struct mm_struct *mm) +{ + if (__predict_false(atomic_dec_and_test(&mm->mm_count))) + linux_mm_dtor(mm); +} + +static inline void +mmput(struct mm_struct *mm) +{ + if (__predict_false(atomic_dec_and_test(&mm->mm_users))) + mmdrop(mm); +} + +extern struct mm_struct *linux_get_task_mm(struct task_struct *); +#define get_task_mm(task) linux_get_task_mm(task) + +#endif /* _LINUX_MM_TYPES_H_ */ Modified: head/sys/compat/linuxkpi/common/include/linux/sched.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/sched.h Fri Mar 17 08:02:46 2017 (r315442) +++ head/sys/compat/linuxkpi/common/include/linux/sched.h Fri Mar 17 10:30:06 2017 (r315443) @@ -40,6 +40,7 @@ #include #include #include +#include #include @@ -54,6 +55,7 @@ struct task_struct { struct thread *task_thread; + struct mm_struct *mm; linux_task_fn_t *task_fn; void *task_data; int task_ret; Modified: head/sys/compat/linuxkpi/common/src/linux_current.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_current.c Fri Mar 17 08:02:46 2017 (r315442) +++ head/sys/compat/linuxkpi/common/src/linux_current.c Fri Mar 17 10:30:06 2017 (r315443) @@ -43,6 +43,7 @@ int linux_alloc_current(struct thread *td, int flags) { struct task_struct *ts; + struct mm_struct *mm; MPASS(td->td_lkpi_task == NULL); @@ -50,18 +51,55 @@ linux_alloc_current(struct thread *td, i if (ts == NULL) return (ENOMEM); + mm = malloc(sizeof(*mm), M_LINUX_CURRENT, flags | M_ZERO); + if (mm == NULL) { + free(ts, M_LINUX_CURRENT); + return (ENOMEM); + } + atomic_set(&ts->kthread_flags, 0); ts->task_thread = td; ts->comm = td->td_name; ts->pid = td->td_tid; + ts->mm = mm; ts->state = TASK_RUNNING; + + /* setup mm_struct */ + init_rwsem(&mm->mmap_sem); + atomic_set(&mm->mm_count, 1); + atomic_set(&mm->mm_users, 1); + mm->vmspace = vmspace_acquire_ref(td->td_proc); + + /* store pointer to task struct */ td->td_lkpi_task = ts; return (0); } +struct mm_struct * +linux_get_task_mm(struct task_struct *task) +{ + struct mm_struct *mm; + + mm = task->mm; + if (mm != NULL && mm->vmspace != NULL) { + atomic_inc(&mm->mm_users); + return (mm); + } + return (NULL); +} + +void +linux_mm_dtor(struct mm_struct *mm) +{ + if (mm->vmspace != NULL) + vmspace_free(mm->vmspace); + free(mm, M_LINUX_CURRENT); +} + void linux_free_current(struct task_struct *ts) { + mmput(ts->mm); free(ts, M_LINUX_CURRENT); } @@ -75,7 +113,7 @@ linuxkpi_thread_dtor(void *arg __unused, return; td->td_lkpi_task = NULL; - free(ts, M_LINUX_CURRENT); + linux_free_current(ts); } static void From owner-svn-src-head@freebsd.org Fri Mar 17 11:45:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6DD40D0E844; Fri, 17 Mar 2017 11:45:47 +0000 (UTC) (envelope-from robak@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 23CA6102A; Fri, 17 Mar 2017 11:45:47 +0000 (UTC) (envelope-from robak@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2HBjkpP005935; Fri, 17 Mar 2017 11:45:46 GMT (envelope-from robak@FreeBSD.org) Received: (from robak@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2HBjkaV005934; Fri, 17 Mar 2017 11:45:46 GMT (envelope-from robak@FreeBSD.org) Message-Id: <201703171145.v2HBjkaV005934@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: robak set sender to robak@FreeBSD.org using -f From: Bartek Rutkowski Date: Fri, 17 Mar 2017 11:45:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315447 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 17 Mar 2017 11:45:47 -0000 Author: robak (ports committer) Date: Fri Mar 17 11:45:46 2017 New Revision: 315447 URL: https://svnweb.freebsd.org/changeset/base/315447 Log: Revert changes introduced in r314036 on demand by jhb and bapt. Approved by: bapt, jhb Modified: head/usr.sbin/bsdinstall/scripts/hardening Modified: head/usr.sbin/bsdinstall/scripts/hardening ============================================================================== --- head/usr.sbin/bsdinstall/scripts/hardening Fri Mar 17 11:45:16 2017 (r315446) +++ head/usr.sbin/bsdinstall/scripts/hardening Fri Mar 17 11:45:46 2017 (r315447) @@ -36,15 +36,15 @@ FEATURES=$( dialog --backtitle "FreeBSD --title "System Hardening" --nocancel --separate-output \ --checklist "Choose system security hardening options:" \ 0 0 0 \ - "0 hide_uids" "Hide processes running as other users" ${hide_uids:-on} \ - "1 hide_gids" "Hide processes running as other groups" ${hide_gids:-on} \ - "2 read_msgbuf" "Disable reading kernel message buffer for unprivileged users" ${read_msgbuf:-on} \ - "3 proc_debug" "Disable process debugging facilities for unprivileged users" ${proc_debug:-on} \ - "4 random_pid" "Randomize the PID of newly created processes" ${random_pid:-on} \ - "5 stack_guard" "Insert stack guard page ahead of the growable segments" ${stack_guard:-on} \ - "6 clear_tmp" "Clean the /tmp filesystem on system startup" ${clear_tmp:-on} \ - "7 disable_syslogd" "Disable opening Syslogd network socket (disables remote logging)" ${disable_syslogd:-on} \ - "8 disable_sendmail" "Disable Sendmail service" ${disable_sendmail:-on} \ + "0 hide_uids" "Hide processes running as other users" ${hide_uids:-off} \ + "1 hide_gids" "Hide processes running as other groups" ${hide_gids:-off} \ + "2 read_msgbuf" "Disable reading kernel message buffer for unprivileged users" ${read_msgbuf:-off} \ + "3 proc_debug" "Disable process debugging facilities for unprivileged users" ${proc_debug:-off} \ + "4 random_pid" "Randomize the PID of newly created processes" ${random_pid:-off} \ + "5 stack_guard" "Insert stack guard page ahead of the growable segments" ${stack_guard:-off} \ + "6 clear_tmp" "Clean the /tmp filesystem on system startup" ${clear_tmp:-off} \ + "7 disable_syslogd" "Disable opening Syslogd network socket (disables remote logging)" ${disable_syslogd:-off} \ + "8 disable_sendmail" "Disable Sendmail service" ${disable_sendmail:-off} \ 2>&1 1>&3 ) exec 3>&- From owner-svn-src-head@freebsd.org Fri Mar 17 12:34:58 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9392AD10172; Fri, 17 Mar 2017 12:34:58 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 607771D28; Fri, 17 Mar 2017 12:34:58 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2HCYvf7026430; Fri, 17 Mar 2017 12:34:57 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2HCYvgd026429; Fri, 17 Mar 2017 12:34:57 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201703171234.v2HCYvgd026429@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Fri, 17 Mar 2017 12:34:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315449 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 17 Mar 2017 12:34:58 -0000 Author: smh Date: Fri Mar 17 12:34:57 2017 New Revision: 315449 URL: https://svnweb.freebsd.org/changeset/base/315449 Log: Reduce ARC fragmentation threshold As ZFS can request up to SPA_MAXBLOCKSIZE memory block e.g. during zfs recv, update the threshold at which we start agressive reclamation to use SPA_MAXBLOCKSIZE (16M) instead of the lower zfs_max_recordsize which defaults to 1M. PR: 194513 Reviewed by: avg, mav MFC after: 1 month Sponsored by: Multiplay Differential Revision: https://reviews.freebsd.org/D10012 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Mar 17 12:34:56 2017 (r315448) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Mar 17 12:34:57 2017 (r315449) @@ -3978,7 +3978,7 @@ arc_available_memory(void) * Start aggressive reclamation if too little sequential KVA left. */ if (lowest > 0) { - n = (vmem_size(heap_arena, VMEM_MAXFREE) < zfs_max_recordsize) ? + n = (vmem_size(heap_arena, VMEM_MAXFREE) < SPA_MAXBLOCKSIZE) ? -((int64_t)vmem_size(heap_arena, VMEM_ALLOC) >> 4) : INT64_MAX; if (n < lowest) { From owner-svn-src-head@freebsd.org Fri Mar 17 12:34:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4554D1016E; Fri, 17 Mar 2017 12:34:57 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74F6F1D27; Fri, 17 Mar 2017 12:34:57 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2HCYu1d026386; Fri, 17 Mar 2017 12:34:56 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2HCYuOJ026381; Fri, 17 Mar 2017 12:34:56 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201703171234.v2HCYuOJ026381@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 17 Mar 2017 12:34:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315448 - in head/sys/arm: conf freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 17 Mar 2017 12:34:57 -0000 Author: andrew Date: Fri Mar 17 12:34:56 2017 New Revision: 315448 URL: https://svnweb.freebsd.org/changeset/base/315448 Log: Move the IMX6 kernels to use PLATFORM_SMP. This is the last SMP config to be migrated to this and will allow the removal of this option. Reviewed by: ian Sponsored by: ABT Systems Ltd Differential Revision: https://reviews.freebsd.org/D9907 Added: head/sys/arm/freescale/imx/imx6_mp.h (contents, props changed) Modified: head/sys/arm/conf/IMX6 head/sys/arm/freescale/imx/imx6_machdep.c head/sys/arm/freescale/imx/imx6_mp.c Modified: head/sys/arm/conf/IMX6 ============================================================================== --- head/sys/arm/conf/IMX6 Fri Mar 17 11:45:46 2017 (r315447) +++ head/sys/arm/conf/IMX6 Fri Mar 17 12:34:56 2017 (r315448) @@ -30,6 +30,7 @@ options SCHED_ULE # ULE scheduler #options NFSD # Network Filesystem Server options INCLUDE_CONFIG_FILE # Include this file in kernel options PLATFORM +options PLATFORM_SMP options SMP # Enable multiple cores # NFS root from boopt/dhcp Modified: head/sys/arm/freescale/imx/imx6_machdep.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_machdep.c Fri Mar 17 11:45:46 2017 (r315447) +++ head/sys/arm/freescale/imx/imx6_machdep.c Fri Mar 17 12:34:56 2017 (r315448) @@ -50,6 +50,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include "platform_if.h" static uint32_t gpio1_node; @@ -346,6 +348,11 @@ static platform_method_t imx6_methods[] PLATFORMMETHOD(platform_late_init, imx6_late_init), PLATFORMMETHOD(platform_cpu_reset, imx6_cpu_reset), +#ifdef SMP + PLATFORMMETHOD(platform_mp_start_ap, imx6_mp_start_ap), + PLATFORMMETHOD(platform_mp_setmaxid, imx6_mp_setmaxid), +#endif + PLATFORMMETHOD_END, }; Modified: head/sys/arm/freescale/imx/imx6_mp.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_mp.c Fri Mar 17 11:45:46 2017 (r315447) +++ head/sys/arm/freescale/imx/imx6_mp.c Fri Mar 17 12:34:56 2017 (r315448) @@ -41,6 +41,10 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include + +#include #define SCU_PHYSBASE 0x00a00000 #define SCU_SIZE 0x00001000 @@ -67,7 +71,7 @@ __FBSDID("$FreeBSD$"); #define SRC_GPR1_C1ARG 0x24 /* Register for Core 1 entry arg */ void -platform_mp_setmaxid(void) +imx6_mp_setmaxid(platform_t plat) { bus_space_handle_t scu; int hwcpu, ncpu; @@ -92,8 +96,8 @@ platform_mp_setmaxid(void) mp_maxid = ncpu - 1; } -void -platform_mp_start_ap(void) +void +imx6_mp_start_ap(platform_t plat) { bus_space_handle_t scu; bus_space_handle_t src; Added: head/sys/arm/freescale/imx/imx6_mp.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/freescale/imx/imx6_mp.h Fri Mar 17 12:34:56 2017 (r315448) @@ -0,0 +1,35 @@ +/*- + * Copyright (c) 2017 Andrew Turner + * 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$ + */ + +#ifndef IMX6_MP_H +#define IMX6_MP_H + +void imx6_mp_start_ap(platform_t); +void imx6_mp_setmaxid(platform_t); + +#endif /* IMX6_MP_H */ From owner-svn-src-head@freebsd.org Fri Mar 17 12:45:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8180AD105AB; Fri, 17 Mar 2017 12:45:55 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 599FB1690; Fri, 17 Mar 2017 12:45:55 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2HCjsIN030345; Fri, 17 Mar 2017 12:45:54 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2HCjsJL030342; Fri, 17 Mar 2017 12:45:54 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201703171245.v2HCjsJL030342@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 17 Mar 2017 12:45:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315450 - in head/sys: arm/qemu dev/fdt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 17 Mar 2017 12:45:55 -0000 Author: andrew Date: Fri Mar 17 12:45:53 2017 New Revision: 315450 URL: https://svnweb.freebsd.org/changeset/base/315450 Log: Make the default FDT implementation of platform_mp_setmaxid use the cpu nodes from the DTB by default. This will allow us to enumerate the CPUs without hard coding the CPU count into code. Reviewed by: br Sponsored by: ABT Systems Ltd Differential Revision: https://reviews.freebsd.org/D9827 Modified: head/sys/arm/qemu/virt_machdep.c head/sys/arm/qemu/virt_mp.c head/sys/dev/fdt/fdt_arm_platform.c Modified: head/sys/arm/qemu/virt_machdep.c ============================================================================== --- head/sys/arm/qemu/virt_machdep.c Fri Mar 17 12:34:57 2017 (r315449) +++ head/sys/arm/qemu/virt_machdep.c Fri Mar 17 12:45:53 2017 (r315450) @@ -60,7 +60,6 @@ static platform_method_t virt_methods[] #ifdef SMP PLATFORMMETHOD(platform_mp_start_ap, virt_mp_start_ap), - PLATFORMMETHOD(platform_mp_setmaxid, virt_mp_setmaxid), #endif PLATFORMMETHOD_END, Modified: head/sys/arm/qemu/virt_mp.c ============================================================================== --- head/sys/arm/qemu/virt_mp.c Fri Mar 17 12:34:57 2017 (r315449) +++ head/sys/arm/qemu/virt_mp.c Fri Mar 17 12:45:53 2017 (r315450) @@ -50,27 +50,6 @@ __FBSDID("$FreeBSD$"); static int running_cpus; static boolean_t -virt_maxid(u_int id, phandle_t node, u_int addr_cells, pcell_t *reg) -{ - - if (mp_maxid < id) - mp_maxid = id; - - return (true); -} - -void -virt_mp_setmaxid(platform_t plat) -{ - - mp_maxid = PCPU_GET(cpuid); - mp_ncpus = ofw_cpu_early_foreach(virt_maxid, true); - if (mp_ncpus < 1) - mp_ncpus = 1; - mp_ncpus = MIN(mp_ncpus, MAXCPU); -} - -static boolean_t virt_start_ap(u_int id, phandle_t node, u_int addr_cells, pcell_t *reg) { int err; Modified: head/sys/dev/fdt/fdt_arm_platform.c ============================================================================== --- head/sys/dev/fdt/fdt_arm_platform.c Fri Mar 17 12:34:57 2017 (r315449) +++ head/sys/dev/fdt/fdt_arm_platform.c Fri Mar 17 12:45:53 2017 (r315450) @@ -30,12 +30,14 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include #include +#include #include #include "platform_if.h" @@ -43,6 +45,10 @@ __FBSDID("$FreeBSD$"); #define FDT_PLATFORM(plat) \ ((fdt_platform_def_t *)(plat)->cls->baseclasses[0]) +#if defined(SMP) +static platform_mp_setmaxid_t fdt_platform_mp_setmaxid; +#endif + static int fdt_platform_probe(platform_t plat) { @@ -66,8 +72,36 @@ fdt_platform_probe(platform_t plat) return 1; } +#if defined(SMP) +static boolean_t +fdt_platform_maxid(u_int id, phandle_t node, u_int addr_cells, pcell_t *reg) +{ + + if (mp_maxid < id) + mp_maxid = id; + + return (true); +} + +static void +fdt_platform_mp_setmaxid(platform_t plat) +{ + + mp_maxid = PCPU_GET(cpuid); + mp_ncpus = ofw_cpu_early_foreach(fdt_platform_maxid, true); + if (mp_ncpus < 1) + mp_ncpus = 1; + mp_ncpus = MIN(mp_ncpus, MAXCPU); +} +#endif + platform_method_t fdt_platform_methods[] = { PLATFORMMETHOD(platform_probe, fdt_platform_probe), + +#if defined(SMP) + PLATFORMMETHOD(platform_mp_setmaxid, fdt_platform_mp_setmaxid), +#endif + PLATFORMMETHOD_END }; From owner-svn-src-head@freebsd.org Fri Mar 17 12:59:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB9E7D10766; Fri, 17 Mar 2017 12:59:18 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7BB581C6D; Fri, 17 Mar 2017 12:59:18 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2HCxHKi034372; Fri, 17 Mar 2017 12:59:17 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2HCxHYk034367; Fri, 17 Mar 2017 12:59:17 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201703171259.v2HCxHYk034367@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 17 Mar 2017 12:59:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315451 - in head/sys: arm/mv conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 17 Mar 2017 12:59:18 -0000 Author: andrew Date: Fri Mar 17 12:59:16 2017 New Revision: 315451 URL: https://svnweb.freebsd.org/changeset/base/315451 Log: Remove code for Marvell SoCs that lack a kernel config. It seems to be old code from the armv6 project branch that never had a kernel config. Reviewed by: mmel Sponsored by: ABT Systems Lrd Differential Revision: https://reviews.freebsd.org/D7166 Modified: head/sys/arm/mv/mv_common.c head/sys/arm/mv/mv_machdep.c head/sys/arm/mv/mvreg.h head/sys/arm/mv/mvwin.h head/sys/conf/options.arm Modified: head/sys/arm/mv/mv_common.c ============================================================================== --- head/sys/arm/mv/mv_common.c Fri Mar 17 12:45:53 2017 (r315450) +++ head/sys/arm/mv/mv_common.c Fri Mar 17 12:59:16 2017 (r315451) @@ -76,9 +76,7 @@ MALLOC_DEFINE(M_IDMA, "idma", "idma dma static int win_eth_can_remap(int i); -#ifndef SOC_MV_FREY static int decode_win_cpu_valid(void); -#endif static int decode_win_usb_valid(void); static int decode_win_usb3_valid(void); static int decode_win_eth_valid(void); @@ -88,9 +86,7 @@ static int decode_win_sata_valid(void); static int decode_win_idma_valid(void); static int decode_win_xor_valid(void); -#ifndef SOC_MV_FREY static void decode_win_cpu_setup(void); -#endif #ifdef SOC_MV_ARMADAXP static int decode_win_sdram_fixup(void); #endif @@ -359,7 +355,7 @@ uint32_t soc_power_ctrl_get(uint32_t mask) { -#if !defined(SOC_MV_ORION) && !defined(SOC_MV_LOKIPLUS) && !defined(SOC_MV_FREY) +#if !defined(SOC_MV_ORION) if (mask != CPU_PM_CTRL_NONE) mask &= read_cpu_ctrl(CPU_PM_CTRL); @@ -377,7 +373,7 @@ void soc_power_ctrl_set(uint32_t mask) { -#if !defined(SOC_MV_ORION) && !defined(SOC_MV_LOKIPLUS) +#if !defined(SOC_MV_ORION) if (mask != CPU_PM_CTRL_NONE) write_cpu_ctrl(CPU_PM_CTRL, mask); #endif @@ -569,7 +565,6 @@ soc_decode_win(void) return(err); #endif -#ifndef SOC_MV_FREY if (!decode_win_cpu_valid() || !decode_win_usb_valid() || !decode_win_eth_valid() || !decode_win_idma_valid() || !decode_win_pcie_valid() || !decode_win_sata_valid() || @@ -577,13 +572,6 @@ soc_decode_win(void) return (EINVAL); decode_win_cpu_setup(); -#else - if (!decode_win_usb_valid() || - !decode_win_eth_valid() || !decode_win_idma_valid() || - !decode_win_pcie_valid() || !decode_win_sata_valid() || - !decode_win_xor_valid() || !decode_win_usb3_valid()) - return (EINVAL); -#endif if (MV_DUMP_WIN) soc_dump_decode_win(); @@ -598,7 +586,6 @@ soc_decode_win(void) /************************************************************************** * Decode windows registers accessors **************************************************************************/ -#if !defined(SOC_MV_FREY) WIN_REG_IDX_RD(win_cpu, cr, MV_WIN_CPU_CTRL, MV_MBUS_BRIDGE_BASE) WIN_REG_IDX_RD(win_cpu, br, MV_WIN_CPU_BASE, MV_MBUS_BRIDGE_BASE) WIN_REG_IDX_RD(win_cpu, remap_l, MV_WIN_CPU_REMAP_LO, MV_MBUS_BRIDGE_BASE) @@ -607,7 +594,6 @@ WIN_REG_IDX_WR(win_cpu, cr, MV_WIN_CPU_C WIN_REG_IDX_WR(win_cpu, br, MV_WIN_CPU_BASE, MV_MBUS_BRIDGE_BASE) WIN_REG_IDX_WR(win_cpu, remap_l, MV_WIN_CPU_REMAP_LO, MV_MBUS_BRIDGE_BASE) WIN_REG_IDX_WR(win_cpu, remap_h, MV_WIN_CPU_REMAP_HI, MV_MBUS_BRIDGE_BASE) -#endif WIN_REG_BASE_IDX_RD(win_usb, cr, MV_WIN_USB_CTRL) WIN_REG_BASE_IDX_RD(win_usb, br, MV_WIN_USB_BASE) @@ -712,7 +698,6 @@ static inline uint32_t ddr_sz_read(int i } #endif -#if !defined(SOC_MV_FREY) /************************************************************************** * Decode windows helper routines **************************************************************************/ @@ -935,7 +920,6 @@ decode_win_cpu_setup(void) cpu_wins[i].size, cpu_wins[i].remap); } -#endif #ifdef SOC_MV_ARMADAXP static int @@ -1294,11 +1278,7 @@ decode_win_eth_dump(u_long base) win_eth_epap_read(base)); } -#if defined(SOC_MV_LOKIPLUS) -#define MV_WIN_ETH_DDR_TRGT(n) 0 -#else #define MV_WIN_ETH_DDR_TRGT(n) ddr_target(n) -#endif static void decode_win_eth_setup(u_long base) Modified: head/sys/arm/mv/mv_machdep.c ============================================================================== --- head/sys/arm/mv/mv_machdep.c Fri Mar 17 12:45:53 2017 (r315450) +++ head/sys/arm/mv/mv_machdep.c Fri Mar 17 12:59:16 2017 (r315451) @@ -244,14 +244,9 @@ platform_late_init(void) /* * Re-initialise decode windows */ -#if !defined(SOC_MV_FREY) if (soc_decode_win() != 0) printf("WARNING: could not re-initialise decode windows! " "Running with existing settings...\n"); -#else - /* Disable watchdog and timers */ - write_cpu_ctrl(CPU_TIMERS_BASE + CPU_TIMER_CONTROL, 0); -#endif #if defined(SOC_MV_ARMADAXP) #if !defined(SMP) /* For SMP case it should be initialized after APs are booted */ Modified: head/sys/arm/mv/mvreg.h ============================================================================== --- head/sys/arm/mv/mvreg.h Fri Mar 17 12:45:53 2017 (r315450) +++ head/sys/arm/mv/mvreg.h Fri Mar 17 12:59:16 2017 (r315451) @@ -52,18 +52,6 @@ #define ENDPOINT_IRQ_MASK(n) 0x30 #define ENDPOINT_IRQ_MASK_HI(n) 0x34 #define ENDPOINT_IRQ_CAUSE_SELECT 0x38 -#elif defined (SOC_MV_LOKIPLUS) || defined (SOC_MV_FREY) -#define IRQ_CAUSE 0x0 -#define IRQ_MASK 0x4 -#define FIQ_MASK 0x8 -#define ENDPOINT_IRQ_MASK(n) (0xC + (n) * 4) -#define IRQ_CAUSE_HI (-1) /* Fake defines for unified */ -#define IRQ_MASK_HI (-1) /* interrupt controller code */ -#define FIQ_MASK_HI (-1) -#define ENDPOINT_IRQ_MASK_HI(n) (-1) -#define ENDPOINT_IRQ_MASK_ERROR(n) (-1) -#define IRQ_CAUSE_ERROR (-1) -#define IRQ_MASK_ERROR (-1) #elif defined (SOC_MV_ARMADAXP) #define IRQ_CAUSE 0x18 #define IRQ_MASK 0x30 @@ -84,17 +72,7 @@ #define IRQ_MASK_ERROR (-1) /* interrupt controller code */ #endif -#if defined(SOC_MV_FREY) -#define BRIDGE_IRQ_CAUSE 0x118 -#define IRQ_TIMER0 0x00000002 -#define IRQ_TIMER1 0x00000004 -#define IRQ_TIMER_WD 0x00000008 - -#define BRIDGE_IRQ_MASK 0x11c -#define IRQ_TIMER0_MASK 0x00000002 -#define IRQ_TIMER1_MASK 0x00000004 -#define IRQ_TIMER_WD_MASK 0x00000008 -#elif defined(SOC_MV_ARMADAXP) +#if defined(SOC_MV_ARMADAXP) #define BRIDGE_IRQ_CAUSE 0x68 #define IRQ_TIMER0 0x00000001 #define IRQ_TIMER1 0x00000002 @@ -113,17 +91,10 @@ #define IRQ_TIMER_WD_MASK 0x00000008 #endif -#if defined(SOC_MV_LOKIPLUS) || defined(SOC_MV_FREY) -#define IRQ_CPU_SELF_CLR IRQ_CPU_SELF -#define IRQ_TIMER0_CLR IRQ_TIMER0 -#define IRQ_TIMER1_CLR IRQ_TIMER1 -#define IRQ_TIMER_WD_CLR IRQ_TIMER_WD -#else #define IRQ_CPU_SELF_CLR (~IRQ_CPU_SELF) #define IRQ_TIMER0_CLR (~IRQ_TIMER0) #define IRQ_TIMER1_CLR (~IRQ_TIMER1) #define IRQ_TIMER_WD_CLR (~IRQ_TIMER_WD) -#endif /* * System reset @@ -348,22 +319,14 @@ #define GPIO2IRQ(gpio) ((gpio) + NIRQ) #define IRQ2GPIO(irq) ((irq) - NIRQ) -#if defined(SOC_MV_ORION) || defined(SOC_MV_LOKIPLUS) +#if defined(SOC_MV_ORION) #define SAMPLE_AT_RESET 0x10 #elif defined(SOC_MV_KIRKWOOD) #define SAMPLE_AT_RESET 0x30 -#elif defined(SOC_MV_FREY) -#define SAMPLE_AT_RESET 0x100 #elif defined(SOC_MV_ARMADA38X) #define SAMPLE_AT_RESET 0x400 #endif -#if defined(SOC_MV_DISCOVERY) -#define SAMPLE_AT_RESET_LO 0x30 -#define SAMPLE_AT_RESET_HI 0x34 -#elif defined(SOC_MV_DOVE) -#define SAMPLE_AT_RESET_LO 0x14 -#define SAMPLE_AT_RESET_HI 0x18 -#elif defined(SOC_MV_ARMADAXP) +#if defined(SOC_MV_DISCOVERY) || defined(SOC_MV_ARMADAXP) #define SAMPLE_AT_RESET_LO 0x30 #define SAMPLE_AT_RESET_HI 0x34 #endif @@ -377,9 +340,6 @@ #elif defined(SOC_MV_DISCOVERY) #define TCLK_MASK 0x00000180 #define TCLK_SHIFT 0x07 -#elif defined(SOC_MV_LOKIPLUS) -#define TCLK_MASK 0x0000F000 -#define TCLK_SHIFT 0x0C #elif defined(SOC_MV_ARMADA38X) #define TCLK_MASK 0x00008000 #define TCLK_SHIFT 15 @@ -452,15 +412,9 @@ #define MV_DRBL_PCIE_TO_CPU 0 #define MV_DRBL_CPU_TO_PCIE 1 -#if defined(SOC_MV_FREY) -#define MV_DRBL_CAUSE(d,u) (0x60 + 0x20 * (d) + 0x8 * (u)) -#define MV_DRBL_MASK(d,u) (0x60 + 0x20 * (d) + 0x8 * (u) + 0x4) -#define MV_DRBL_MSG(m,d,u) (0x8 * (u) + 0x20 * (d) + 0x4 * (m)) -#else #define MV_DRBL_CAUSE(d,u) (0x10 * (u) + 0x8 * (d)) #define MV_DRBL_MASK(d,u) (0x10 * (u) + 0x8 * (d) + 0x4) #define MV_DRBL_MSG(m,d,u) (0x10 * (u) + 0x8 * (d) + 0x4 * (m) + 0x30) -#endif /* * SCU Modified: head/sys/arm/mv/mvwin.h ============================================================================== --- head/sys/arm/mv/mvwin.h Fri Mar 17 12:45:53 2017 (r315450) +++ head/sys/arm/mv/mvwin.h Fri Mar 17 12:59:16 2017 (r315451) @@ -52,25 +52,16 @@ /* SRAM */ #define MV_CESA_SRAM_BASE 0xF1100000 -/* AXI Regs */ -#ifdef SOC_MV_DOVE -#define MV_AXI_PHYS_BASE 0xF1800000 -#define MV_AXI_BASE MV_AXI_PHYS_BASE -#define MV_AXI_SIZE (16 * 1024 * 1024) /* 16 MB */ -#endif - /* * External devices: 0x80000000, 1 GB (VA == PA) * Includes Device Bus, PCI and PCIE. */ #if defined(SOC_MV_ORION) #define MV_PCI_PORTS 2 /* 1x PCI + 1x PCIE */ -#elif defined(SOC_MV_KIRKWOOD) || defined(SOC_MV_FREY) +#elif defined(SOC_MV_KIRKWOOD) #define MV_PCI_PORTS 1 /* 1x PCIE */ #elif defined(SOC_MV_DISCOVERY) #define MV_PCI_PORTS 8 /* 8x PCIE */ -#elif defined(SOC_MV_DOVE) || defined(SOC_MV_LOKIPLUS) -#define MV_PCI_PORTS 2 /* 2x PCIE */ #elif defined(SOC_MV_ARMADAXP) #define MV_PCI_PORTS 3 /* 3x PCIE */ #elif defined(SOC_MV_ARMADA38X) @@ -93,11 +84,7 @@ #define MV_PCI_IO_SLICE_SIZE (MV_PCI_IO_SIZE / MV_PCI_PORTS) #define MV_PCI_IO_SLICE(n) (MV_PCI_IO_BASE + ((n) * MV_PCI_IO_SLICE_SIZE)) -#if defined(SOC_MV_FREY) -#define MV_PCI_VA_MEM_BASE MV_PCI_MEM_BASE -#else #define MV_PCI_VA_MEM_BASE 0 -#endif #define MV_PCI_VA_IO_BASE 0 /* @@ -120,11 +107,7 @@ * Integrated SoC peripherals addresses */ #define MV_BASE MV_PHYS_BASE /* VA == PA mapping */ -#if defined(SOC_MV_DOVE) -#define MV_DDR_CADR_BASE (MV_AXI_BASE + 0x100) -#elif defined(SOC_MV_LOKIPLUS) -#define MV_DDR_CADR_BASE (MV_BASE + 0xF1500) -#elif defined(SOC_MV_ARMADAXP) || defined(SOC_MV_ARMADA38X) +#if defined(SOC_MV_ARMADAXP) || defined(SOC_MV_ARMADA38X) #define MV_DDR_CADR_BASE (MV_BASE + 0x20180) #else #define MV_DDR_CADR_BASE (MV_BASE + 0x1500) @@ -137,20 +120,16 @@ #define MV_INTREGS_BASE (MV_MBUS_BRIDGE_BASE + 0x80) #define MV_MP_CLOCKS_BASE (MV_MBUS_BRIDGE_BASE + 0x700) #define MV_CPU_CONTROL_BASE (MV_MBUS_BRIDGE_BASE + 0x1800) -#elif !defined(SOC_MV_FREY) +#else #define MV_MBUS_BRIDGE_BASE (MV_BASE + 0x20000) #define MV_INTREGS_BASE (MV_MBUS_BRIDGE_BASE + 0x80) #define MV_CPU_CONTROL_BASE (MV_MBUS_BRIDGE_BASE + 0x100) -#else -#define MV_CPU_CONTROL_BASE (MV_BASE + 0x10000) #endif #define MV_PCI_BASE (MV_BASE + 0x30000) #define MV_PCI_SIZE 0x2000 -#if defined(SOC_MV_FREY) -#define MV_PCIE_BASE (MV_BASE + 0x8000) -#elif defined(SOC_MV_ARMADA38X) +#if defined(SOC_MV_ARMADA38X) #define MV_PCIE_BASE (MV_BASE + 0x80000) #else #define MV_PCIE_BASE (MV_BASE + 0x40000) @@ -193,26 +172,12 @@ #endif #define MV_WIN_CPU_ATTR_SHIFT 8 -#if defined(SOC_MV_LOKIPLUS) -#define MV_WIN_CPU_TARGET_SHIFT 0 -#define MV_WIN_CPU_ENABLE_BIT (1 << 5) -#else #define MV_WIN_CPU_TARGET_SHIFT 4 #define MV_WIN_CPU_ENABLE_BIT 1 -#endif -#if defined(SOC_MV_DOVE) -#define MV_WIN_DDR_MAX 2 -#else /* SOC_MV_DOVE */ -#if defined(SOC_MV_LOKIPLUS) -#define MV_WIN_DDR_BASE(n) (0xc * (n) + 0x4) -#define MV_WIN_DDR_SIZE(n) (0xc * (n) + 0x0) -#else /* SOC_MV_LOKIPLUS */ #define MV_WIN_DDR_BASE(n) (0x8 * (n) + 0x0) #define MV_WIN_DDR_SIZE(n) (0x8 * (n) + 0x4) -#endif /* SOC_MV_LOKIPLUS */ #define MV_WIN_DDR_MAX 4 -#endif /* SOC_MV_DOVE */ /* * These values are valid only for peripherals decoding windows @@ -280,7 +245,7 @@ #define MV_XOR_CHAN_MAX 2 #define MV_XOR_NON_REMAP 4 -#if defined(SOC_MV_DISCOVERY) || defined(SOC_MV_KIRKWOOD) || defined(SOC_MV_DOVE) +#if defined(SOC_MV_DISCOVERY) || defined(SOC_MV_KIRKWOOD) #define MV_WIN_PCIE_TARGET(n) 4 #define MV_WIN_PCIE_MEM_ATTR(n) 0xE8 #define MV_WIN_PCIE_IO_ATTR(n) 0xE0 @@ -296,10 +261,6 @@ #define MV_WIN_PCIE_TARGET(n) 4 #define MV_WIN_PCIE_MEM_ATTR(n) 0x59 #define MV_WIN_PCIE_IO_ATTR(n) 0x51 -#elif defined(SOC_MV_LOKIPLUS) -#define MV_WIN_PCIE_TARGET(n) (3 + (n)) -#define MV_WIN_PCIE_MEM_ATTR(n) 0x59 -#define MV_WIN_PCIE_IO_ATTR(n) 0x51 #endif #define MV_WIN_PCI_TARGET 3 Modified: head/sys/conf/options.arm ============================================================================== --- head/sys/conf/options.arm Fri Mar 17 12:45:53 2017 (r315450) +++ head/sys/conf/options.arm Fri Mar 17 12:59:16 2017 (r315451) @@ -60,10 +60,7 @@ SOC_IMX6 opt_global.h SOC_MV_ARMADAXP opt_global.h SOC_MV_ARMADA38X opt_global.h SOC_MV_DISCOVERY opt_global.h -SOC_MV_DOVE opt_global.h -SOC_MV_FREY opt_global.h SOC_MV_KIRKWOOD opt_global.h -SOC_MV_LOKIPLUS opt_global.h SOC_MV_ORION opt_global.h SOC_OMAP3 opt_global.h SOC_OMAP4 opt_global.h From owner-svn-src-head@freebsd.org Fri Mar 17 13:31:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACF83D10FE4; Fri, 17 Mar 2017 13:31:25 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72F351D86; Fri, 17 Mar 2017 13:31:25 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2HDVOJj046461; Fri, 17 Mar 2017 13:31:24 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2HDVO4k046460; Fri, 17 Mar 2017 13:31:24 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201703171331.v2HDVO4k046460@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 17 Mar 2017 13:31:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315452 - head/sys/boot/efi/loader/arch/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 17 Mar 2017 13:31:25 -0000 Author: andrew Date: Fri Mar 17 13:31:24 2017 New Revision: 315452 URL: https://svnweb.freebsd.org/changeset/base/315452 Log: Mark the EFI PE header as allocated. While ld.bfd doesn't seem to care about not having this flag ld.lld fails to link without it. Sponsored by: DARPA, AFRL Modified: head/sys/boot/efi/loader/arch/arm64/start.S Modified: head/sys/boot/efi/loader/arch/arm64/start.S ============================================================================== --- head/sys/boot/efi/loader/arch/arm64/start.S Fri Mar 17 12:59:16 2017 (r315451) +++ head/sys/boot/efi/loader/arch/arm64/start.S Fri Mar 17 13:31:24 2017 (r315452) @@ -40,7 +40,7 @@ #define IMAGE_SCN_MEM_EXECUTE 0x20000000 #define IMAGE_SCN_MEM_READ 0x40000000 - .section .peheader + .section .peheader,"a" efi_start: /* The MS-DOS Stub, only used to get the offset of the COFF header */ .ascii "MZ" From owner-svn-src-head@freebsd.org Fri Mar 17 13:37:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 970CED10451; Fri, 17 Mar 2017 13:37:38 +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 mx1.freebsd.org (Postfix) with ESMTPS id 667A91326; Fri, 17 Mar 2017 13:37:38 +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 v2HDbbPe050403; Fri, 17 Mar 2017 13:37:37 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2HDbbqn050402; Fri, 17 Mar 2017 13:37:37 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201703171337.v2HDbbqn050402@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 17 Mar 2017 13:37:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315453 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 17 Mar 2017 13:37:38 -0000 Author: kib Date: Fri Mar 17 13:37:37 2017 New Revision: 315453 URL: https://svnweb.freebsd.org/changeset/base/315453 Log: When clearing altsigstack settings on exec, do it to the right thread. Diagnosed by: smh Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Fri Mar 17 13:31:24 2017 (r315452) +++ head/sys/kern/kern_sig.c Fri Mar 17 13:37:37 2017 (r315453) @@ -976,7 +976,6 @@ execsigs(struct proc *p) * and are now ignored by default). */ PROC_LOCK_ASSERT(p, MA_OWNED); - td = FIRST_THREAD_IN_PROC(p); ps = p->p_sigacts; mtx_lock(&ps->ps_mtx); while (SIGNOTEMPTY(ps->ps_sigcatch)) { @@ -1007,6 +1006,8 @@ execsigs(struct proc *p) * Reset stack state to the user stack. * Clear set of signals caught on the signal stack. */ + td = curthread; + MPASS(td->td_proc == p); td->td_sigstk.ss_flags = SS_DISABLE; td->td_sigstk.ss_size = 0; td->td_sigstk.ss_sp = 0; From owner-svn-src-head@freebsd.org Fri Mar 17 13:49:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C617BD10695; Fri, 17 Mar 2017 13:49:07 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 8455218E0; Fri, 17 Mar 2017 13:49:07 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2HDn6CX054732; Fri, 17 Mar 2017 13:49:06 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2HDn6u0054727; Fri, 17 Mar 2017 13:49:06 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201703171349.v2HDn6u0054727@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Fri, 17 Mar 2017 13:49:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315454 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 17 Mar 2017 13:49:07 -0000 Author: bde Date: Fri Mar 17 13:49:05 2017 New Revision: 315454 URL: https://svnweb.freebsd.org/changeset/base/315454 Log: Don't access the reserved registers %dr4 and %dr5 on i386. On the original i386, %dr[4-5] were unimplemented but not very clearly reserved, so debuggers read them to print them. i386 was still doing this. On the original athlon64, %dr[4-5] are documented as reserved but are aliased to %dr[6-7] unless CR4_DE is set, when accessing them traps. On 2 of my systems, accessing %dr[4-5] trapped sometimes. On my Haswell system, the apparent randomness was because the boot CPU starts with CR4_DE set while all other CPUs start with CR4_DE clear. FreeBSD doesn't support the data breakpoints enabled by CR4_DE and it never changes this flag, so the flag remains different across CPUs and the behaviour seemed inconsistent except while booting when the CPU doesn't change. The invalid accesses broke: - read access for printing the registers in ddb "show watches" on CPUs with CR4_DE set - read accesses in fill_dbregs() on CPUs with CR4_DE set. This didn't implement panic(3) since the user case always skipped %dr[4-5]. - write accesses in set_dbregs(). This also didn't affect userland. When it didn't trap, the aliasing made it fragile. Don't print the dummy (zero) values of %dr[4-5] in "show watches" for i386 or amd64. Fix style bugs near this printing. amd64 also has space in the dbregs struct for the reserved %dr[8-15] and already didn't print the dummy values for these, and never accessed any of the 10 reserved debug registers. Remove cpufuncs for making the invalid accesses. Even amd64 had these. Modified: head/sys/amd64/amd64/db_trace.c head/sys/amd64/include/cpufunc.h head/sys/i386/i386/db_trace.c head/sys/i386/i386/machdep.c head/sys/i386/include/cpufunc.h Modified: head/sys/amd64/amd64/db_trace.c ============================================================================== --- head/sys/amd64/amd64/db_trace.c Fri Mar 17 13:37:37 2017 (r315453) +++ head/sys/amd64/amd64/db_trace.c Fri Mar 17 13:49:05 2017 (r315454) @@ -575,7 +575,7 @@ watchtype_str(type) void -db_md_list_watchpoints() +db_md_list_watchpoints(void) { struct dbreg d; int i, len, type; @@ -595,7 +595,7 @@ db_md_list_watchpoints() len++; db_printf(" %-5d %-8s %10s %3d ", i, "enabled", watchtype_str(type), len); - db_printsym((db_addr_t)DBREG_DRX((&d), i), DB_STGY_ANY); + db_printsym((db_addr_t)DBREG_DRX(&d, i), DB_STGY_ANY); db_printf("\n"); } else { db_printf(" %-5d disabled\n", i); @@ -603,9 +603,9 @@ db_md_list_watchpoints() } db_printf("\ndebug register values:\n"); - for (i = 0; i < 8; i++) { - db_printf(" dr%d 0x%016lx\n", i, DBREG_DRX((&d), i)); - } + for (i = 0; i < 8; i++) + if (i != 4 && i != 5) + db_printf(" dr%d 0x%016lx\n", i, DBREG_DRX(&d, i)); db_printf("\n"); } Modified: head/sys/amd64/include/cpufunc.h ============================================================================== --- head/sys/amd64/include/cpufunc.h Fri Mar 17 13:37:37 2017 (r315453) +++ head/sys/amd64/include/cpufunc.h Fri Mar 17 13:49:05 2017 (r315454) @@ -759,34 +759,6 @@ load_dr3(uint64_t dr3) } static __inline uint64_t -rdr4(void) -{ - uint64_t data; - __asm __volatile("movq %%dr4,%0" : "=r" (data)); - return (data); -} - -static __inline void -load_dr4(uint64_t dr4) -{ - __asm __volatile("movq %0,%%dr4" : : "r" (dr4)); -} - -static __inline uint64_t -rdr5(void) -{ - uint64_t data; - __asm __volatile("movq %%dr5,%0" : "=r" (data)); - return (data); -} - -static __inline void -load_dr5(uint64_t dr5) -{ - __asm __volatile("movq %0,%%dr5" : : "r" (dr5)); -} - -static __inline uint64_t rdr6(void) { uint64_t data; @@ -863,8 +835,6 @@ void load_dr0(uint64_t dr0); void load_dr1(uint64_t dr1); void load_dr2(uint64_t dr2); void load_dr3(uint64_t dr3); -void load_dr4(uint64_t dr4); -void load_dr5(uint64_t dr5); void load_dr6(uint64_t dr6); void load_dr7(uint64_t dr7); void load_fs(u_short sel); @@ -887,8 +857,6 @@ uint64_t rdr0(void); uint64_t rdr1(void); uint64_t rdr2(void); uint64_t rdr3(void); -uint64_t rdr4(void); -uint64_t rdr5(void); uint64_t rdr6(void); uint64_t rdr7(void); uint64_t rdtsc(void); Modified: head/sys/i386/i386/db_trace.c ============================================================================== --- head/sys/i386/i386/db_trace.c Fri Mar 17 13:37:37 2017 (r315453) +++ head/sys/i386/i386/db_trace.c Fri Mar 17 13:49:05 2017 (r315454) @@ -735,7 +735,7 @@ watchtype_str(type) void -db_md_list_watchpoints() +db_md_list_watchpoints(void) { struct dbreg d; int i, len, type; @@ -751,7 +751,7 @@ db_md_list_watchpoints() len = DBREG_DR7_LEN(d.dr[7], i); db_printf(" %-5d %-8s %10s %3d ", i, "enabled", watchtype_str(type), len + 1); - db_printsym((db_addr_t)DBREG_DRX((&d), i), DB_STGY_ANY); + db_printsym((db_addr_t)DBREG_DRX(&d, i), DB_STGY_ANY); db_printf("\n"); } else { db_printf(" %-5d disabled\n", i); @@ -759,10 +759,8 @@ db_md_list_watchpoints() } db_printf("\ndebug register values:\n"); - for (i = 0; i < 8; i++) { - db_printf(" dr%d 0x%08x\n", i, DBREG_DRX((&d), i)); - } + for (i = 0; i < 8; i++) + if (i != 4 && i != 5) + db_printf(" dr%d 0x%08x\n", i, DBREG_DRX(&d, i)); db_printf("\n"); } - - Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Fri Mar 17 13:37:37 2017 (r315453) +++ head/sys/i386/i386/machdep.c Fri Mar 17 13:49:05 2017 (r315454) @@ -2901,8 +2901,6 @@ fill_dbregs(struct thread *td, struct db dbregs->dr[1] = rdr1(); dbregs->dr[2] = rdr2(); dbregs->dr[3] = rdr3(); - dbregs->dr[4] = rdr4(); - dbregs->dr[5] = rdr5(); dbregs->dr[6] = rdr6(); dbregs->dr[7] = rdr7(); } else { @@ -2911,11 +2909,11 @@ fill_dbregs(struct thread *td, struct db dbregs->dr[1] = pcb->pcb_dr1; dbregs->dr[2] = pcb->pcb_dr2; dbregs->dr[3] = pcb->pcb_dr3; - dbregs->dr[4] = 0; - dbregs->dr[5] = 0; dbregs->dr[6] = pcb->pcb_dr6; dbregs->dr[7] = pcb->pcb_dr7; } + dbregs->dr[4] = 0; + dbregs->dr[5] = 0; return (0); } @@ -2930,8 +2928,6 @@ set_dbregs(struct thread *td, struct dbr load_dr1(dbregs->dr[1]); load_dr2(dbregs->dr[2]); load_dr3(dbregs->dr[3]); - load_dr4(dbregs->dr[4]); - load_dr5(dbregs->dr[5]); load_dr6(dbregs->dr[6]); load_dr7(dbregs->dr[7]); } else { Modified: head/sys/i386/include/cpufunc.h ============================================================================== --- head/sys/i386/include/cpufunc.h Fri Mar 17 13:37:37 2017 (r315453) +++ head/sys/i386/include/cpufunc.h Fri Mar 17 13:49:05 2017 (r315454) @@ -632,34 +632,6 @@ load_dr3(u_int dr3) } static __inline u_int -rdr4(void) -{ - u_int data; - __asm __volatile("movl %%dr4,%0" : "=r" (data)); - return (data); -} - -static __inline void -load_dr4(u_int dr4) -{ - __asm __volatile("movl %0,%%dr4" : : "r" (dr4)); -} - -static __inline u_int -rdr5(void) -{ - u_int data; - __asm __volatile("movl %%dr5,%0" : "=r" (data)); - return (data); -} - -static __inline void -load_dr5(u_int dr5) -{ - __asm __volatile("movl %0,%%dr5" : : "r" (dr5)); -} - -static __inline u_int rdr6(void) { u_int data; @@ -750,8 +722,6 @@ void load_dr0(u_int dr0); void load_dr1(u_int dr1); void load_dr2(u_int dr2); void load_dr3(u_int dr3); -void load_dr4(u_int dr4); -void load_dr5(u_int dr5); void load_dr6(u_int dr6); void load_dr7(u_int dr7); void load_fs(u_short sel); @@ -773,8 +743,6 @@ u_int rdr0(void); u_int rdr1(void); u_int rdr2(void); u_int rdr3(void); -u_int rdr4(void); -u_int rdr5(void); u_int rdr6(void); u_int rdr7(void); uint64_t rdtsc(void); From owner-svn-src-head@freebsd.org Fri Mar 17 14:18:53 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B5E5D10E94; Fri, 17 Mar 2017 14:18:53 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C2B61AE4; Fri, 17 Mar 2017 14:18:53 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2HEIqrV066932; Fri, 17 Mar 2017 14:18:52 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2HEIqHO066929; Fri, 17 Mar 2017 14:18:52 GMT (envelope-from des@FreeBSD.org) Message-Id: <201703171418.v2HEIqHO066929@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Fri, 17 Mar 2017 14:18:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315455 - head/lib/libfetch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 17 Mar 2017 14:18:53 -0000 Author: des Date: Fri Mar 17 14:18:52 2017 New Revision: 315455 URL: https://svnweb.freebsd.org/changeset/base/315455 Log: r308996 broke IP literals by assuming that a colon could only occur as a separator between host and port, and using strchr() to search for it. Rewrite fetch_resolve() so it handles bracketed literals correctly, and remove similar code elsewhere to avoid passing unbracketed literals to fetch_resolve(). Remove #ifdef INET6 so we still parse IP literals correctly even if we do not have the ability to connect to them. While there, fix an off-by-one error which caused HTTP 400 errors to be misinterpreted as redirects. PR: 217723 MFC after: 1 week Reported by: bapt, bz, cem, ngie Modified: head/lib/libfetch/common.c head/lib/libfetch/fetch.c head/lib/libfetch/http.c Modified: head/lib/libfetch/common.c ============================================================================== --- head/lib/libfetch/common.c Fri Mar 17 13:49:05 2017 (r315454) +++ head/lib/libfetch/common.c Fri Mar 17 14:18:52 2017 (r315455) @@ -248,37 +248,51 @@ fetch_resolve(const char *addr, int port { char hbuf[256], sbuf[8]; struct addrinfo hints, *res; - const char *sep, *host, *service; + const char *hb, *he, *sep; + const char *host, *service; int err, len; - /* split address if necessary */ - err = EAI_SYSTEM; - if ((sep = strchr(addr, ':')) != NULL) { + /* first, check for a bracketed IPv6 address */ + if (*addr == '[') { + hb = addr + 1; + if ((sep = strchr(hb, ']')) == NULL) { + errno = EINVAL; + goto syserr; + } + he = sep++; + } else { + hb = addr; + sep = strchrnul(hb, ':'); + he = sep; + } + + /* see if we need to copy the host name */ + if (*he != '\0') { len = snprintf(hbuf, sizeof(hbuf), - "%.*s", (int)(sep - addr), addr); + "%.*s", (int)(he - hb), hb); if (len < 0) - return (NULL); + goto syserr; if (len >= (int)sizeof(hbuf)) { errno = ENAMETOOLONG; - fetch_syserr(); - return (NULL); + goto syserr; } host = hbuf; - service = sep + 1; - } else if (port != 0) { + } else { + host = hb; + } + + /* was it followed by a service name? */ + if (*sep == '\0' && port != 0) { if (port < 1 || port > 65535) { errno = EINVAL; - fetch_syserr(); - return (NULL); - } - if (snprintf(sbuf, sizeof(sbuf), "%d", port) < 0) { - fetch_syserr(); - return (NULL); + goto syserr; } - host = addr; + if (snprintf(sbuf, sizeof(sbuf), "%d", port) < 0) + goto syserr; service = sbuf; + } else if (*sep != '\0') { + service = sep; } else { - host = addr; service = NULL; } @@ -292,6 +306,9 @@ fetch_resolve(const char *addr, int port return (NULL); } return (res); +syserr: + fetch_syserr(); + return (NULL); } Modified: head/lib/libfetch/fetch.c ============================================================================== --- head/lib/libfetch/fetch.c Fri Mar 17 13:49:05 2017 (r315454) +++ head/lib/libfetch/fetch.c Fri Mar 17 14:18:52 2017 (r315455) @@ -386,18 +386,17 @@ fetchParseURL(const char *URL) } /* hostname */ -#ifdef INET6 if (*p == '[' && (q = strchr(p + 1, ']')) != NULL && (*++q == '\0' || *q == '/' || *q == ':')) { - if ((i = q - p - 2) > MAXHOSTNAMELEN) + if ((i = q - p) > MAXHOSTNAMELEN) i = MAXHOSTNAMELEN; - strncpy(u->host, ++p, i); + strncpy(u->host, p, i); p = q; - } else -#endif + } else { for (i = 0; *p && (*p != '/') && (*p != ':'); p++) if (i < MAXHOSTNAMELEN) u->host[i++] = *p; + } /* port */ if (*p == ':') { @@ -444,12 +443,12 @@ nohost: } DEBUG(fprintf(stderr, - "scheme: [%s]\n" - "user: [%s]\n" - "password: [%s]\n" - "host: [%s]\n" - "port: [%d]\n" - "document: [%s]\n", + "scheme: \"%s\"\n" + "user: \"%s\"\n" + "password: \"%s\"\n" + "host: \"%s\"\n" + "port: \"%d\"\n" + "document: \"%s\"\n", u->scheme, u->user, u->pwd, u->host, u->port, u->doc)); Modified: head/lib/libfetch/http.c ============================================================================== --- head/lib/libfetch/http.c Fri Mar 17 13:49:05 2017 (r315454) +++ head/lib/libfetch/http.c Fri Mar 17 14:18:52 2017 (r315455) @@ -118,7 +118,7 @@ __FBSDID("$FreeBSD$"); || (xyz) == HTTP_USE_PROXY \ || (xyz) == HTTP_SEE_OTHER) -#define HTTP_ERROR(xyz) ((xyz) > 400 && (xyz) < 599) +#define HTTP_ERROR(xyz) ((xyz) >= 400 && (xyz) <= 599) /***************************************************************************** @@ -1604,20 +1604,11 @@ http_request_body(struct url *URL, const if ((conn = http_connect(url, purl, flags)) == NULL) goto ouch; + /* append port number only if necessary */ host = url->host; -#ifdef INET6 - if (strchr(url->host, ':')) { - snprintf(hbuf, sizeof(hbuf), "[%s]", url->host); - host = hbuf; - } -#endif if (url->port != fetch_default_port(url->scheme)) { - if (host != hbuf) { - strcpy(hbuf, host); - host = hbuf; - } - snprintf(hbuf + strlen(hbuf), - sizeof(hbuf) - strlen(hbuf), ":%d", url->port); + snprintf(hbuf, sizeof(hbuf), "%s:%d", host, url->port); + host = hbuf; } /* send request */ From owner-svn-src-head@freebsd.org Fri Mar 17 15:40:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A237D106D3; Fri, 17 Mar 2017 15:40:26 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E8E231603; Fri, 17 Mar 2017 15:40:25 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2HFePNJ099162; Fri, 17 Mar 2017 15:40:25 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2HFeOxZ099158; Fri, 17 Mar 2017 15:40:24 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201703171540.v2HFeOxZ099158@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 17 Mar 2017 15:40:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315457 - in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 17 Mar 2017 15:40:26 -0000 Author: hselasky Date: Fri Mar 17 15:40:24 2017 New Revision: 315457 URL: https://svnweb.freebsd.org/changeset/base/315457 Log: Implement get_pid_task(), pid_task() and some other PID helper functions in the LinuxKPI. Add a usage atomic to the task_struct structure to facilitate refcounting the task structure when returned from get_pid_task(). The get_task_struct() and put_task_struct() function is used to manage atomic refcounting. After this change the task_struct should only be freed through put_task_struct(). Obtained from: kmacy @ MFC after: 1 week Sponsored by: Mellanox Technologies Added: head/sys/compat/linuxkpi/common/include/linux/pid.h (contents, props changed) Modified: head/sys/compat/linuxkpi/common/include/linux/sched.h head/sys/compat/linuxkpi/common/src/linux_current.c head/sys/compat/linuxkpi/common/src/linux_kthread.c Added: head/sys/compat/linuxkpi/common/include/linux/pid.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/linuxkpi/common/include/linux/pid.h Fri Mar 17 15:40:24 2017 (r315457) @@ -0,0 +1,65 @@ +/*- + * Copyright (c) 2017 Mellanox Technologies, Ltd. + * 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 unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _LINUX_PID_H_ +#define _LINUX_PID_H_ + +#include +#include +#include + +enum pid_type { + PIDTYPE_PID, + PIDTYPE_PGID, + PIDTYPE_SID, + PIDTYPE_MAX +}; + +#define pid_nr(n) (n) +#define pid_vnr(n) (n) +#define from_kuid_munged(a, uid) (uid) + +#define pid_task(pid, type) ({ \ + struct task_struct *__ts; \ + CTASSERT((type) == PIDTYPE_PID); \ + __ts = linux_pid_task(pid); \ + __ts; \ +}) + +#define get_pid_task(pid, type) ({ \ + struct task_struct *__ts; \ + CTASSERT((type) == PIDTYPE_PID); \ + __ts = linux_get_pid_task(pid); \ + __ts; \ +}) + +struct task_struct; +extern struct task_struct *linux_pid_task(pid_t); +extern struct task_struct *linux_get_pid_task(pid_t); + +#endif /* _LINUX_PID_H_ */ Modified: head/sys/compat/linuxkpi/common/include/linux/sched.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/sched.h Fri Mar 17 14:54:10 2017 (r315456) +++ head/sys/compat/linuxkpi/common/include/linux/sched.h Fri Mar 17 15:40:24 2017 (r315457) @@ -38,7 +38,9 @@ #include #include +#include #include +#include #include #include @@ -59,9 +61,10 @@ struct task_struct { linux_task_fn_t *task_fn; void *task_data; int task_ret; + atomic_t usage; int state; atomic_t kthread_flags; - pid_t pid; + pid_t pid; /* BSD thread ID */ const char *comm; void *bsd_ioctl_data; unsigned bsd_ioctl_len; @@ -71,16 +74,30 @@ struct task_struct { #define current ((struct task_struct *)curthread->td_lkpi_task) -#define task_pid(task) ((task)->task_thread->td_proc->p_pid) -#define task_pid_nr(task) ((task)->task_thread->td_tid) -#define get_pid(x) (x) -#define put_pid(x) +#define task_pid_group_leader(task) \ + FIRST_THREAD_IN_PROC((task)->task_thread->td_proc)->td_tid +#define task_pid(task) ((task)->pid) +#define task_pid_nr(task) ((task)->pid) +#define get_pid(x) (x) +#define put_pid(x) do { } while (0) #define current_euid() (curthread->td_ucred->cr_uid) #define set_current_state(x) \ atomic_store_rel_int((volatile int *)¤t->state, (x)) #define __set_current_state(x) current->state = (x) +static inline void +get_task_struct(struct task_struct *task) +{ + atomic_inc(&task->usage); +} + +static inline void +put_task_struct(struct task_struct *task) +{ + if (atomic_dec_and_test(&task->usage)) + linux_free_current(task); +} #define schedule() \ do { \ Modified: head/sys/compat/linuxkpi/common/src/linux_current.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_current.c Fri Mar 17 14:54:10 2017 (r315456) +++ head/sys/compat/linuxkpi/common/src/linux_current.c Fri Mar 17 15:40:24 2017 (r315457) @@ -62,6 +62,7 @@ linux_alloc_current(struct thread *td, i ts->comm = td->td_name; ts->pid = td->td_tid; ts->mm = mm; + atomic_set(&ts->usage, 1); ts->state = TASK_RUNNING; /* setup mm_struct */ @@ -113,7 +114,37 @@ linuxkpi_thread_dtor(void *arg __unused, return; td->td_lkpi_task = NULL; - linux_free_current(ts); + put_task_struct(ts); +} + +struct task_struct * +linux_pid_task(pid_t pid) +{ + struct thread *td; + + td = tdfind(pid, -1); + if (td != NULL) { + struct task_struct *ts = td->td_lkpi_task; + PROC_UNLOCK(td->td_proc); + return (ts); + } + return (NULL); +} + +struct task_struct * +linux_get_pid_task(pid_t pid) +{ + struct thread *td; + + td = tdfind(pid, -1); + if (td != NULL) { + struct task_struct *ts = td->td_lkpi_task; + if (ts != NULL) + get_task_struct(ts); + PROC_UNLOCK(td->td_proc); + return (ts); + } + return (NULL); } static void Modified: head/sys/compat/linuxkpi/common/src/linux_kthread.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_kthread.c Fri Mar 17 14:54:10 2017 (r315456) +++ head/sys/compat/linuxkpi/common/src/linux_kthread.c Fri Mar 17 15:40:24 2017 (r315457) @@ -72,7 +72,7 @@ kthread_stop(struct task_struct *task) * Get return code and free task structure: */ retval = task->task_ret; - linux_free_current(task); + put_task_struct(task); return (retval); } From owner-svn-src-head@freebsd.org Fri Mar 17 16:50:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 579D2D1096C; Fri, 17 Mar 2017 16:50: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 mx1.freebsd.org (Postfix) with ESMTPS id 1F9AD1CE1; Fri, 17 Mar 2017 16:50: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 v2HGocl6027415; Fri, 17 Mar 2017 16:50:38 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2HGobnC027407; Fri, 17 Mar 2017 16:50:37 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201703171650.v2HGobnC027407@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 17 Mar 2017 16:50:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315458 - in head: sys/netinet6 tests/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 17 Mar 2017 16:50:39 -0000 Author: asomers Date: Fri Mar 17 16:50:37 2017 New Revision: 315458 URL: https://svnweb.freebsd.org/changeset/base/315458 Log: Constrain IPv6 routes to single FIBs when net.add_addr_allfibs=0 sys/netinet6/icmp6.c Use the interface's FIB for source address selection in ICMPv6 error responses. sys/netinet6/in6.c In in6_newaddrmsg, announce arrival of local addresses on the interface's FIB only. In in6_lltable_rtcheck, use a per-fib ND6 cache instead of a single cache. sys/netinet6/in6_src.c In in6_selectsrc, use the caller's fib instead of the default fib. In in6_selectsrc_socket, remove a superfluous check. sys/netinet6/nd6.c In nd6_lle_event, use the interface's fib for routing socket messages. In nd6_is_new_addr_neighbor, check all FIBs when trying to determine whether an address is a neighbor. Also, simplify the code for point to point interfaces. sys/netinet6/nd6.h sys/netinet6/nd6.c sys/netinet6/nd6_rtr.c Make defrouter_select fib-aware, and make all of its callers pass in the interface fib. sys/netinet6/nd6_nbr.c When inputting a Neighbor Solicitation packet, consider the interface fib instead of the default fib for DAD. Output NS and Neighbor Advertisement packets on the correct fib. sys/netinet6/nd6_rtr.c Allow installing the same host route on different interfaces in different FIBs. If rt_add_addr_allfibs=0, only install or delete the prefix route on the interface fib. tests/sys/netinet/fibs_test.sh Clear some expected failures, but add a skip for the newly revealed BUG217871. PR: 196361 Submitted by: Erick Turnquist Reported by: Jason Healy Reviewed by: asomers MFC after: 3 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D9451 Modified: head/sys/netinet6/icmp6.c head/sys/netinet6/in6.c head/sys/netinet6/in6_src.c head/sys/netinet6/nd6.c head/sys/netinet6/nd6.h head/sys/netinet6/nd6_nbr.c head/sys/netinet6/nd6_rtr.c head/tests/sys/netinet/fibs_test.sh Modified: head/sys/netinet6/icmp6.c ============================================================================== --- head/sys/netinet6/icmp6.c Fri Mar 17 15:40:24 2017 (r315457) +++ head/sys/netinet6/icmp6.c Fri Mar 17 16:50:37 2017 (r315458) @@ -2147,7 +2147,7 @@ icmp6_reflect(struct mbuf *m, size_t off * source address of the erroneous packet. */ in6_splitscope(&ip6->ip6_src, &dst6, &scopeid); - error = in6_selectsrc_addr(RT_DEFAULT_FIB, &dst6, + error = in6_selectsrc_addr(M_GETFIB(m), &dst6, scopeid, NULL, &src6, &hlim); if (error) { @@ -2289,7 +2289,7 @@ icmp6_redirect_input(struct mbuf *m, int uint32_t scopeid; in6_splitscope(&reddst6, &kdst, &scopeid); - if (fib6_lookup_nh_basic(RT_DEFAULT_FIB, &kdst, scopeid, 0, 0,&nh6)==0){ + if (fib6_lookup_nh_basic(ifp->if_fib, &kdst, scopeid, 0, 0,&nh6)==0){ if ((nh6.nh_flags & NHF_GATEWAY) == 0) { nd6log((LOG_ERR, "ICMP6 redirect rejected; no route " Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Fri Mar 17 15:40:24 2017 (r315457) +++ head/sys/netinet6/in6.c Fri Mar 17 16:50:37 2017 (r315458) @@ -159,6 +159,7 @@ in6_newaddrmsg(struct in6_ifaddr *ia, in struct sockaddr_dl gateway; struct sockaddr_in6 mask, addr; struct rtentry rt; + int fibnum; /* * initialize for rtmsg generation @@ -176,8 +177,9 @@ in6_newaddrmsg(struct in6_ifaddr *ia, in rt.rt_flags = RTF_HOST | RTF_STATIC; if (cmd == RTM_ADD) rt.rt_flags |= RTF_UP; - /* Announce arrival of local address to all FIBs. */ - rt_newaddrmsg(cmd, &ia->ia_ifa, 0, &rt); + fibnum = V_rt_add_addr_allfibs ? RT_ALL_FIBS : ia62ifa(ia)->ifa_ifp->if_fib; + /* Announce arrival of local address to this FIB. */ + rt_newaddrmsg_fib(cmd, &ia->ia_ifa, 0, &rt, fibnum); } int @@ -2117,15 +2119,15 @@ in6_lltable_rtcheck(struct ifnet *ifp, uint32_t scopeid; int error; char ip6buf[INET6_ADDRSTRLEN]; + int fibnum; KASSERT(l3addr->sa_family == AF_INET6, ("sin_family %d", l3addr->sa_family)); - /* Our local addresses are always only installed on the default FIB. */ - sin6 = (const struct sockaddr_in6 *)l3addr; in6_splitscope(&sin6->sin6_addr, &dst, &scopeid); - error = fib6_lookup_nh_basic(RT_DEFAULT_FIB, &dst, scopeid, 0, 0, &nh6); + fibnum = V_rt_add_addr_allfibs ? RT_DEFAULT_FIB : ifp->if_fib; + error = fib6_lookup_nh_basic(fibnum, &dst, scopeid, 0, 0, &nh6); if (error != 0 || (nh6.nh_flags & NHF_GATEWAY) || nh6.nh_ifp != ifp) { struct ifaddr *ifa; /* Modified: head/sys/netinet6/in6_src.c ============================================================================== --- head/sys/netinet6/in6_src.c Fri Mar 17 15:40:24 2017 (r315457) +++ head/sys/netinet6/in6_src.c Fri Mar 17 16:50:37 2017 (r315458) @@ -297,7 +297,7 @@ in6_selectsrc(uint32_t fibnum, struct so */ /* get the outgoing interface */ if ((error = in6_selectif(dstsock, opts, mopts, &ifp, oifp, - (inp != NULL) ? inp->inp_inc.inc_fibnum : RT_DEFAULT_FIB)) != 0) + (inp != NULL) ? inp->inp_inc.inc_fibnum : fibnum)) != 0) return (error); #ifdef DIAGNOSTIC @@ -563,7 +563,7 @@ in6_selectsrc_socket(struct sockaddr_in6 uint32_t fibnum; int error; - fibnum = (inp != NULL) ? inp->inp_inc.inc_fibnum : RT_DEFAULT_FIB; + fibnum = inp->inp_inc.inc_fibnum; retifp = NULL; error = in6_selectsrc(fibnum, dstsock, opts, inp, cred, &retifp, srcp); Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Fri Mar 17 15:40:24 2017 (r315457) +++ head/sys/netinet6/nd6.c Fri Mar 17 16:50:37 2017 (r315458) @@ -157,6 +157,7 @@ nd6_lle_event(void *arg __unused, struct struct sockaddr_dl gw; struct ifnet *ifp; int type; + int fibnum; LLE_WLOCK_ASSERT(lle); @@ -194,8 +195,9 @@ nd6_lle_event(void *arg __unused, struct rtinfo.rti_info[RTAX_DST] = (struct sockaddr *)&dst; rtinfo.rti_info[RTAX_GATEWAY] = (struct sockaddr *)&gw; rtinfo.rti_addrs = RTA_DST | RTA_GATEWAY; + fibnum = V_rt_add_addr_allfibs ? RT_ALL_FIBS : ifp->if_fib; rt_missmsg_fib(type, &rtinfo, RTF_HOST | RTF_LLDATA | ( - type == RTM_ADD ? RTF_UP: 0), 0, RT_DEFAULT_FIB); + type == RTM_ADD ? RTF_UP: 0), 0, fibnum); } /* @@ -1200,7 +1202,7 @@ nd6_purge(struct ifnet *ifp) if (ND_IFINFO(ifp)->flags & ND6_IFF_ACCEPT_RTADV) { /* Refresh default router list. */ - defrouter_select(); + defrouter_select_fib(ifp->if_fib); } } @@ -1253,7 +1255,7 @@ static int nd6_is_new_addr_neighbor(const struct sockaddr_in6 *addr, struct ifnet *ifp) { struct nd_prefix *pr; - struct ifaddr *dstaddr; + struct ifaddr *ifa; struct rt_addrinfo info; struct sockaddr_in6 rt_key; const struct sockaddr *dst6; @@ -1287,9 +1289,6 @@ nd6_is_new_addr_neighbor(const struct so bzero(&info, sizeof(info)); info.rti_info[RTAX_DST] = (struct sockaddr *)&rt_key; - /* Always use the default FIB here. XXME - why? */ - fibnum = RT_DEFAULT_FIB; - /* * If the address matches one of our addresses, * it should be a neighbor. @@ -1303,19 +1302,31 @@ restart: continue; if ((pr->ndpr_stateflags & NDPRF_ONLINK) == 0) { - /* Always use the default FIB here. */ dst6 = (const struct sockaddr *)&pr->ndpr_prefix; - genid = V_nd6_list_genid; - ND6_RUNLOCK(); - - /* Restore length field before retrying lookup */ - rt_key.sin6_len = sizeof(rt_key); - error = rib_lookup_info(fibnum, dst6, 0, 0, &info); + /* + * We only need to check all FIBs if add_addr_allfibs + * is unset. If set, checking any FIB will suffice. + */ + fibnum = V_rt_add_addr_allfibs ? rt_numfibs - 1 : 0; + for (; fibnum < rt_numfibs; fibnum++) { + genid = V_nd6_list_genid; + ND6_RUNLOCK(); - ND6_RLOCK(); - if (genid != V_nd6_list_genid) - goto restart; + /* + * Restore length field before + * retrying lookup + */ + rt_key.sin6_len = sizeof(rt_key); + error = rib_lookup_info(fibnum, dst6, 0, 0, + &info); + + ND6_RLOCK(); + if (genid != V_nd6_list_genid) + goto restart; + if (error == 0) + break; + } if (error != 0) continue; @@ -1346,13 +1357,18 @@ restart: * If the address is assigned on the node of the other side of * a p2p interface, the address should be a neighbor. */ - dstaddr = ifa_ifwithdstaddr((const struct sockaddr *)addr, RT_ALL_FIBS); - if (dstaddr != NULL) { - if (dstaddr->ifa_ifp == ifp) { - ifa_free(dstaddr); - return (1); + if (ifp->if_flags & IFF_POINTOPOINT) { + IF_ADDR_RLOCK(ifp); + TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { + if (ifa->ifa_addr->sa_family != addr->sin6_family) + continue; + if (ifa->ifa_dstaddr != NULL && + sa_equal(addr, ifa->ifa_dstaddr)) { + IF_ADDR_RUNLOCK(ifp); + return 1; + } } - ifa_free(dstaddr); + IF_ADDR_RUNLOCK(ifp); } /* @@ -1485,7 +1501,7 @@ nd6_free(struct llentry **lnp, int gc) /* * We need to unlock to avoid a LOR with rt6_flush() with the * rnh and for the calls to pfxlist_onlink_check() and - * defrouter_select() in the block further down for calls + * defrouter_select_fib() in the block further down for calls * into nd6_lookup(). We still hold a ref. */ LLE_WUNLOCK(ln); @@ -1500,7 +1516,7 @@ nd6_free(struct llentry **lnp, int gc) if (dr) { /* - * Since defrouter_select() does not affect the + * Since defrouter_select_fib() does not affect the * on-link determination and MIP6 needs the check * before the default router selection, we perform * the check now. @@ -1510,7 +1526,7 @@ nd6_free(struct llentry **lnp, int gc) /* * Refresh default router list. */ - defrouter_select(); + defrouter_select_fib(dr->ifp->if_fib); } /* @@ -2104,11 +2120,11 @@ nd6_cache_lladdr(struct ifnet *ifp, stru * Question: can we restrict the first condition to the "is_newentry" * case? * XXX: when we hear an RA from a new router with the link-layer - * address option, defrouter_select() is called twice, since + * address option, defrouter_select_fib() is called twice, since * defrtrlist_update called the function as well. However, I believe * we can compromise the overhead, since it only happens the first * time. - * XXX: although defrouter_select() should not have a bad effect + * XXX: although defrouter_select_fib() should not have a bad effect * for those are not autoconfigured hosts, we explicitly avoid such * cases for safety. */ @@ -2117,7 +2133,7 @@ nd6_cache_lladdr(struct ifnet *ifp, stru /* * guaranteed recursion */ - defrouter_select(); + defrouter_select_fib(ifp->if_fib); } } Modified: head/sys/netinet6/nd6.h ============================================================================== --- head/sys/netinet6/nd6.h Fri Mar 17 15:40:24 2017 (r315457) +++ head/sys/netinet6/nd6.h Fri Mar 17 16:50:37 2017 (r315458) @@ -469,6 +469,7 @@ void nd6_dad_stop(struct ifaddr *); void nd6_rs_input(struct mbuf *, int, int); void nd6_ra_input(struct mbuf *, int, int); void defrouter_reset(void); +void defrouter_select_fib(int fibnum); void defrouter_select(void); void defrouter_ref(struct nd_defrouter *); void defrouter_rele(struct nd_defrouter *); Modified: head/sys/netinet6/nd6_nbr.c ============================================================================== --- head/sys/netinet6/nd6_nbr.c Fri Mar 17 15:40:24 2017 (r315457) +++ head/sys/netinet6/nd6_nbr.c Fri Mar 17 16:50:37 2017 (r315458) @@ -262,8 +262,7 @@ nd6_ns_input(struct mbuf *m, int off, in bzero(&info, sizeof(info)); info.rti_info[RTAX_GATEWAY] = (struct sockaddr *)&rt_gateway; - /* Always use the default FIB. */ - if (rib_lookup_info(RT_DEFAULT_FIB, (struct sockaddr *)&dst6, + if (rib_lookup_info(ifp->if_fib, (struct sockaddr *)&dst6, 0, 0, &info) == 0) { if ((info.rti_flags & RTF_ANNOUNCE) != 0 && rt_gateway.sdl_family == AF_LINK) { @@ -485,7 +484,7 @@ nd6_ns_output_fib(struct ifnet *ifp, con uint32_t scopeid; in6_splitscope(&ip6->ip6_dst, &dst6, &scopeid); - error = in6_selectsrc_addr(RT_DEFAULT_FIB, &dst6, + error = in6_selectsrc_addr(fibnum, &dst6, scopeid, ifp, &src6, NULL); if (error) { char ip6buf[INET6_ADDRSTRLEN]; @@ -982,7 +981,7 @@ nd6_na_output_fib(struct ifnet *ifp, con * Select a source whose scope is the same as that of the dest. */ in6_splitscope(&daddr6, &dst6, &scopeid); - error = in6_selectsrc_addr(RT_DEFAULT_FIB, &dst6, + error = in6_selectsrc_addr(fibnum, &dst6, scopeid, ifp, &src6, NULL); if (error) { char ip6buf[INET6_ADDRSTRLEN]; Modified: head/sys/netinet6/nd6_rtr.c ============================================================================== --- head/sys/netinet6/nd6_rtr.c Fri Mar 17 15:40:24 2017 (r315457) +++ head/sys/netinet6/nd6_rtr.c Fri Mar 17 16:50:37 2017 (r315458) @@ -500,7 +500,7 @@ defrouter_addreq(struct nd_defrouter *ne error = in6_rtrequest(RTM_ADD, (struct sockaddr *)&def, (struct sockaddr *)&gate, (struct sockaddr *)&mask, - RTF_GATEWAY, &newrt, RT_DEFAULT_FIB); + RTF_GATEWAY, &newrt, new->ifp->if_fib); if (newrt) { nd6_rtmsg(RTM_ADD, newrt); /* tell user process */ RTFREE(newrt); @@ -551,8 +551,8 @@ defrouter_rele(struct nd_defrouter *dr) /* * Remove the default route for a given router. - * This is just a subroutine function for defrouter_select(), and should - * not be called from anywhere else. + * This is just a subroutine function for defrouter_select_fib(), and + * should not be called from anywhere else. */ static void defrouter_delreq(struct nd_defrouter *dr) @@ -571,7 +571,7 @@ defrouter_delreq(struct nd_defrouter *dr in6_rtrequest(RTM_DELETE, (struct sockaddr *)&def, (struct sockaddr *)&gate, - (struct sockaddr *)&mask, RTF_GATEWAY, &oldrt, RT_DEFAULT_FIB); + (struct sockaddr *)&mask, RTF_GATEWAY, &oldrt, dr->ifp->if_fib); if (oldrt) { nd6_rtmsg(RTM_DELETE, oldrt); RTFREE(oldrt); @@ -698,11 +698,11 @@ defrouter_del(struct nd_defrouter *dr) /* * If the router is the primary one, choose a new one. - * Note that defrouter_select() will remove the current gateway - * from the routing table. + * Note that defrouter_select_fib() will remove the current + * gateway from the routing table. */ if (deldr) - defrouter_select(); + defrouter_select_fib(deldr->ifp->if_fib); /* * Release the list reference. @@ -730,13 +730,23 @@ defrouter_del(struct nd_defrouter *dr) * even when the multipath routing is available, because we're not sure about * the benefits for stub hosts comparing to the risk of making the code * complicated and the possibility of introducing bugs. + * + * We maintain a single list of routers for multiple FIBs, only considering one + * at a time based on the receiving interface's FIB. If @fibnum is RT_ALL_FIBS, + * we do the whole thing multiple times. */ void -defrouter_select(void) +defrouter_select_fib(int fibnum) { struct nd_defrouter *dr, *selected_dr, *installed_dr; struct llentry *ln = NULL; + if (fibnum == RT_ALL_FIBS) { + for (fibnum = 0; fibnum < rt_numfibs; fibnum++) { + defrouter_select_fib(fibnum); + } + } + ND6_RLOCK(); /* * Let's handle easy case (3) first: @@ -755,7 +765,7 @@ defrouter_select(void) selected_dr = installed_dr = NULL; TAILQ_FOREACH(dr, &V_nd_defrouter, dr_entry) { IF_AFDATA_RLOCK(dr->ifp); - if (selected_dr == NULL && + if (selected_dr == NULL && dr->ifp->if_fib == fibnum && (ln = nd6_lookup(&dr->rtaddr, 0, dr->ifp)) && ND6_IS_LLINFO_PROBREACH(ln)) { selected_dr = dr; @@ -767,14 +777,17 @@ defrouter_select(void) ln = NULL; } - if (dr->installed) { + if (dr->installed && dr->ifp->if_fib == fibnum) { if (installed_dr == NULL) { installed_dr = dr; defrouter_ref(installed_dr); } else { - /* this should not happen. warn for diagnosis. */ - log(LOG_ERR, - "defrouter_select: more than one router is installed\n"); + /* + * this should not happen. + * warn for diagnosis. + */ + log(LOG_ERR, "defrouter_select_fib: more than " + "one router is installed\n"); } } } @@ -789,14 +802,24 @@ defrouter_select(void) if (selected_dr == NULL) { if (installed_dr == NULL || TAILQ_NEXT(installed_dr, dr_entry) == NULL) - selected_dr = TAILQ_FIRST(&V_nd_defrouter); + dr = TAILQ_FIRST(&V_nd_defrouter); else - selected_dr = TAILQ_NEXT(installed_dr, dr_entry); - defrouter_ref(selected_dr); + dr = TAILQ_NEXT(installed_dr, dr_entry); + + /* Ensure we select a router for this FIB. */ + TAILQ_FOREACH_FROM(dr, &V_nd_defrouter, dr_entry) { + if (dr->ifp->if_fib == fibnum) { + selected_dr = dr; + defrouter_ref(selected_dr); + break; + } + } } else if (installed_dr != NULL) { IF_AFDATA_RLOCK(installed_dr->ifp); - if ((ln = nd6_lookup(&installed_dr->rtaddr, 0, installed_dr->ifp)) && + if ((ln = nd6_lookup(&installed_dr->rtaddr, 0, + installed_dr->ifp)) && ND6_IS_LLINFO_PROBREACH(ln) && + installed_dr->ifp->if_fib == fibnum && rtpref(selected_dr) <= rtpref(installed_dr)) { defrouter_rele(selected_dr); selected_dr = installed_dr; @@ -808,18 +831,30 @@ defrouter_select(void) ND6_RUNLOCK(); /* - * If the selected router is different than the installed one, - * remove the installed router and install the selected one. - * Note that the selected router is never NULL here. + * If we selected a router for this FIB and it's different + * than the installed one, remove the installed router and + * install the selected one in its place. */ if (installed_dr != selected_dr) { if (installed_dr != NULL) { defrouter_delreq(installed_dr); defrouter_rele(installed_dr); } - defrouter_addreq(selected_dr); + if (selected_dr != NULL) + defrouter_addreq(selected_dr); } - defrouter_rele(selected_dr); + if (selected_dr != NULL) + defrouter_rele(selected_dr); +} + +/* + * Maintain old KPI for default router selection. + * If unspecified, we can re-select routers for all FIBs. + */ +void +defrouter_select(void) +{ + defrouter_select_fib(RT_ALL_FIBS); } /* @@ -942,7 +977,7 @@ restart: V_nd6_list_genid++; ND6_WUNLOCK(); - defrouter_select(); + defrouter_select_fib(new->ifp->if_fib); return (n); } @@ -1731,7 +1766,7 @@ nd6_prefix_onlink_rtrequest(struct nd_pr struct rtentry *rt; struct sockaddr_in6 mask6; u_long rtflags; - int error, a_failure, fibnum; + int error, a_failure, fibnum, maxfib; /* * in6_ifinit() sets nd6_rtrequest to ifa_rtrequest for all ifaddrs. @@ -1742,8 +1777,15 @@ nd6_prefix_onlink_rtrequest(struct nd_pr mask6.sin6_addr = pr->ndpr_mask; rtflags = (ifa->ifa_flags & ~IFA_RTSELF) | RTF_UP; + if(V_rt_add_addr_allfibs) { + fibnum = 0; + maxfib = rt_numfibs; + } else { + fibnum = ifa->ifa_ifp->if_fib; + maxfib = fibnum + 1; + } a_failure = 0; - for (fibnum = 0; fibnum < rt_numfibs; fibnum++) { + for (; fibnum < maxfib; fibnum++) { rt = NULL; error = in6_rtrequest(RTM_ADD, @@ -1831,6 +1873,10 @@ nd6_prefix_onlink(struct nd_prefix *pr) if ((opr->ndpr_stateflags & NDPRF_ONLINK) == 0) continue; + if (!V_rt_add_addr_allfibs && + opr->ndpr_ifp->if_fib != pr->ndpr_ifp->if_fib) + continue; + if (opr->ndpr_plen == pr->ndpr_plen && in6_are_prefix_equal(&pr->ndpr_prefix.sin6_addr, &opr->ndpr_prefix.sin6_addr, pr->ndpr_plen)) { @@ -1891,7 +1937,7 @@ nd6_prefix_offlink(struct nd_prefix *pr) struct rtentry *rt; char ip6buf[INET6_ADDRSTRLEN]; uint64_t genid; - int fibnum, a_failure; + int fibnum, maxfib, a_failure; ND6_ONLINK_LOCK_ASSERT(); ND6_UNLOCK_ASSERT(); @@ -1909,8 +1955,16 @@ nd6_prefix_offlink(struct nd_prefix *pr) mask6.sin6_len = sizeof(sa6); bcopy(&pr->ndpr_mask, &mask6.sin6_addr, sizeof(struct in6_addr)); + if (V_rt_add_addr_allfibs) { + fibnum = 0; + maxfib = rt_numfibs; + } else { + fibnum = ifp->if_fib; + maxfib = fibnum + 1; + } + a_failure = 0; - for (fibnum = 0; fibnum < rt_numfibs; fibnum++) { + for (; fibnum < maxfib; fibnum++) { rt = NULL; error = in6_rtrequest(RTM_DELETE, (struct sockaddr *)&sa6, NULL, (struct sockaddr *)&mask6, 0, &rt, fibnum); Modified: head/tests/sys/netinet/fibs_test.sh ============================================================================== --- head/tests/sys/netinet/fibs_test.sh Fri Mar 17 15:40:24 2017 (r315457) +++ head/tests/sys/netinet/fibs_test.sh Fri Mar 17 16:50:37 2017 (r315458) @@ -163,7 +163,6 @@ loopback_and_network_routes_on_nondefaul loopback_and_network_routes_on_nondefault_fib_inet6_body() { - atf_expect_fail "PR196361 IPv6 network routes don't respect net.add_addr_allfibs=0" # Configure the TAP interface to use a nonrouteable RFC3849 # address and a non-default fib ADDR="2001:db8::2" @@ -452,6 +451,7 @@ slaac_on_nondefault_fib6_head() } slaac_on_nondefault_fib6_body() { + atf_skip "BUG217871 SLAAC on a newly created epair sometimes fails to add routes" # Configure the epair interfaces to use nonrouteable RFC3849 # addresses and non-default FIBs ADDR="2001:db8::2" @@ -459,8 +459,6 @@ slaac_on_nondefault_fib6_body() SUBNET="2001:db8:" MASK="64" - atf_expect_fail "PR196361 IPv6 network routes don't respect net.add_addr_allfibs=0" - # Check system configuration if [ 0 != `sysctl -n net.add_addr_allfibs` ]; then atf_skip "This test requires net.add_addr_allfibs=0" @@ -478,8 +476,8 @@ slaac_on_nondefault_fib6_body() # Configure epair interfaces get_epair setup_iface "$EPAIRA" "$FIB0" inet6 ${ADDR} ${MASK} - echo ifconfig "$EPAIRB" up inet6 fib $FIB1 -ifdisabled accept_rtadv - ifconfig "$EPAIRB" inet6 -ifdisabled accept_rtadv fib $FIB1 up + echo setfib $FIB1 ifconfig "$EPAIRB" inet6 -ifdisabled accept_rtadv fib $FIB1 up + setfib $FIB1 ifconfig "$EPAIRB" inet6 -ifdisabled accept_rtadv fib $FIB1 up rtadvd -p rtadvd.pid -C rtadvd.sock -c /dev/null "$EPAIRA" rtsol "$EPAIRB" @@ -514,7 +512,7 @@ slaac_on_nondefault_fib6_cleanup() cleanup_ifaces if [ -f "rtadvd.pid" ]; then pkill -F rtadvd.pid - rm rtadvd.pid + rm -f rtadvd.pid fi if [ -f "rfc6204w3.state" ] ; then sysctl "net.inet6.ip6.rfc6204w3"=`cat "rfc6204w3.state"` @@ -685,8 +683,6 @@ udp_dontroute6_body() TARGET="2001:db8::100" SRCDIR=`atf_get_srcdir` - atf_expect_fail "PR196361 IPv6 network routes don't respect net.add_addr_allfibs=0" - # Check system configuration if [ 0 != `sysctl -n net.add_addr_allfibs` ]; then atf_skip "This test requires net.add_addr_allfibs=0" @@ -767,7 +763,7 @@ get_epair() local EPAIRD if EPAIRD=`ifconfig epair create`; then - # Record the TAP device so we can clean it up later + # Record the epair device so we can clean it up later echo ${EPAIRD} >> "ifaces_to_cleanup" EPAIRA=${EPAIRD} EPAIRB=${EPAIRD%a}b From owner-svn-src-head@freebsd.org Fri Mar 17 18:08:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F5F3D10210; Fri, 17 Mar 2017 18:08:02 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1196F1DF7; Fri, 17 Mar 2017 18:08:01 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2HI81oJ059912; Fri, 17 Mar 2017 18:08:01 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2HI817Y059911; Fri, 17 Mar 2017 18:08:01 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201703171808.v2HI817Y059911@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 17 Mar 2017 18:08:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315459 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 17 Mar 2017 18:08:02 -0000 Author: bdrewery Date: Fri Mar 17 18:08:00 2017 New Revision: 315459 URL: https://svnweb.freebsd.org/changeset/base/315459 Log: kmod: Fix depending on ILINKS for tracked DEPENDOBJS. The objects that may be in the dependency graph may not match ${OBJS}. Ensure the ilink link is added as a dependency for all of them when a .depend file is missing for that objfile. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/sys/conf/kmod.mk Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Fri Mar 17 16:50:37 2017 (r315458) +++ head/sys/conf/kmod.mk Fri Mar 17 18:08:00 2017 (r315459) @@ -274,7 +274,7 @@ beforebuild: ${_ILINKS} # causes all the modules to be rebuilt when the directory pointed to changes. .for _link in ${_ILINKS} .if !exists(${.OBJDIR}/${_link}) -${OBJS}: ${_link} +OBJS_DEPEND_GUESS+= ${_link} .endif .endfor From owner-svn-src-head@freebsd.org Fri Mar 17 18:08:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5BB4FD10287; Fri, 17 Mar 2017 18:08:34 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B4FE1F43; Fri, 17 Mar 2017 18:08:34 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2HI8X1X059971; Fri, 17 Mar 2017 18:08:33 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2HI8X4e059970; Fri, 17 Mar 2017 18:08:33 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201703171808.v2HI8X4e059970@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 17 Mar 2017 18:08:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315460 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 17 Mar 2017 18:08:34 -0000 Author: bdrewery Date: Fri Mar 17 18:08:33 2017 New Revision: 315460 URL: https://svnweb.freebsd.org/changeset/base/315460 Log: kmod: Fix building assym.o not building missing dependencies. For instance, in the dtrace/dtrace module, building dtrace_asm.o wants to build genassym.o first, but it doesn't build the missing ilinks and if_*.h headers which are part of the OBJS_DEPEND_GUESS list of dependencies to build if a .depend file is missing. MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/sys/conf/kmod.mk Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Fri Mar 17 18:08:00 2017 (r315459) +++ head/sys/conf/kmod.mk Fri Mar 17 18:08:33 2017 (r315460) @@ -453,6 +453,7 @@ acpi_quirks.h: ${SYSDIR}/tools/acpi_quir .if !empty(SRCS:Massym.s) CLEANFILES+= assym.s genassym.o +DEPENDOBJS+= genassym.o assym.s: genassym.o .if defined(KERNBUILDDIR) genassym.o: opt_global.h From owner-svn-src-head@freebsd.org Fri Mar 17 18:08:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 71F7ED102B5; Fri, 17 Mar 2017 18:08:37 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F9071F4C; Fri, 17 Mar 2017 18:08:37 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2HI8afp060017; Fri, 17 Mar 2017 18:08:36 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2HI8anB060016; Fri, 17 Mar 2017 18:08:36 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201703171808.v2HI8anB060016@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 17 Mar 2017 18:08:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315461 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 17 Mar 2017 18:08:37 -0000 Author: bdrewery Date: Fri Mar 17 18:08:36 2017 New Revision: 315461 URL: https://svnweb.freebsd.org/changeset/base/315461 Log: META_MODE: Fix not using .depend files when no OBJDIR is present. By default bmake does not allow meta mode to work unless an OBJDIR is present. It allows this if curdirok= is set with a value not starting with [0NnFf], but usually it is "yes". MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Fri Mar 17 18:08:33 2017 (r315460) +++ head/share/mk/bsd.dep.mk Fri Mar 17 18:08:36 2017 (r315461) @@ -75,6 +75,13 @@ tags: ${SRCS} .if !empty(.MAKE.MODE:Mmeta) && empty(.MAKE.MODE:Mnofilemon) _meta_filemon= 1 .endif +# By default META_MODE is disabled in bmake if there is no OBJDIR +# unless .MAKE.MODE contains "curdirOk=[^0nNfF]" +.if defined(_meta_filemon) && ${.OBJDIR} == ${.CURDIR} && \ + (empty(.MAKE.MODE:tl:Mcurdirok=*) || \ + !empty(.MAKE.MODE:tl:Mcurdirok=[0NnFf]*)) +.undef _meta_filemon +.endif # Skip reading .depend when not needed to speed up tree-walks and simple # lookups. See _SKIP_BUILD logic in bsd.init.mk for more details. From owner-svn-src-head@freebsd.org Fri Mar 17 21:40:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 671A1D10F00; Fri, 17 Mar 2017 21:40:16 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1709015EE; Fri, 17 Mar 2017 21:40:16 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2HLeF4A044991; Fri, 17 Mar 2017 21:40:15 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2HLeEhw044986; Fri, 17 Mar 2017 21:40:14 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201703172140.v2HLeEhw044986@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 17 Mar 2017 21:40:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315464 - in head/sys/powerpc: booke conf include powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 17 Mar 2017 21:40:16 -0000 Author: jhibbits Date: Fri Mar 17 21:40:14 2017 New Revision: 315464 URL: https://svnweb.freebsd.org/changeset/base/315464 Log: Introduce 64-bit PowerPC Book-E support Extend the Book-E pmap to support 64-bit operation. Much of this was taken from Juniper's Junos FreeBSD port. It uses a 3-level page table (page directory list -- PP2D, page directory, page table), but has gaps in the page directory list where regions will repeat, due to the design of the PP2D hash (a 20-bit gap between the two parts of the index). In practice this may not be a problem given the expanded address space. However, an alternative to this would be to use a 4-level page table, like Linux, and possibly reduce the available address space; Linux appears to use a 46-bit address space. Alternatively, a cache of page directory pointers could be used to keep the overall design as-is, but remove the gaps in the address space. This includes a new kernel config for 64-bit QorIQ SoCs, based on MPC85XX, with the following notes: * The DPAA driver has not yet been ported to 64-bit so is not included in the kernel config. * This has been tested on the AmigaOne X5000, using a MD_ROOT compiled in (total size kernel+mdroot must be under 64MB). * This can run both 32-bit and 64-bit processes, and has even been tested to run a 32-bit init with 64-bit children. Many thanks to stevek and marcel for getting Juniper's FreeBSD patches open sourced to be used here, and to stevek for reviewing, and providing some historical contexts on quirks of the code. Reviewed by: stevek Obtained from: Juniper (in part) MFC after: 2 months Relnotes: yes Differential Revision: https://reviews.freebsd.org/D9433 Added: head/sys/powerpc/conf/QORIQ64 (contents, props changed) Modified: head/sys/powerpc/booke/booke_machdep.c head/sys/powerpc/booke/locore.S head/sys/powerpc/booke/mp_cpudep.c head/sys/powerpc/booke/pmap.c head/sys/powerpc/booke/trap_subr.S head/sys/powerpc/include/asm.h head/sys/powerpc/include/pcpu.h head/sys/powerpc/include/pmap.h head/sys/powerpc/include/psl.h head/sys/powerpc/include/pte.h head/sys/powerpc/include/spr.h head/sys/powerpc/include/tlb.h head/sys/powerpc/include/vmparam.h head/sys/powerpc/powerpc/db_interface.c head/sys/powerpc/powerpc/exec_machdep.c head/sys/powerpc/powerpc/genassym.c Modified: head/sys/powerpc/booke/booke_machdep.c ============================================================================== --- head/sys/powerpc/booke/booke_machdep.c Fri Mar 17 21:24:09 2017 (r315463) +++ head/sys/powerpc/booke/booke_machdep.c Fri Mar 17 21:40:14 2017 (r315464) @@ -216,7 +216,7 @@ void ivor_setup(void) { - mtspr(SPR_IVPR, ((uintptr_t)&interrupt_vector_base) & 0xffff0000); + mtspr(SPR_IVPR, ((uintptr_t)&interrupt_vector_base) & ~0xffffUL); SET_TRAP(SPR_IVOR0, int_critical_input); SET_TRAP(SPR_IVOR1, int_machine_check); @@ -250,6 +250,11 @@ ivor_setup(void) SET_TRAP(SPR_IVOR32, int_vec); break; } + +#ifdef __powerpc64__ + /* Set 64-bit interrupt mode. */ + mtspr(SPR_EPCR, mfspr(SPR_EPCR) | EPCR_ICM); +#endif } static int @@ -353,7 +358,7 @@ booke_init(u_long arg1, u_long arg2) } #define RES_GRANULE 32 -extern uint32_t tlb0_miss_locks[]; +extern uintptr_t tlb0_miss_locks[]; /* Initialise a struct pcpu. */ void @@ -363,8 +368,8 @@ cpu_pcpu_init(struct pcpu *pcpu, int cpu pcpu->pc_tid_next = TID_MIN; #ifdef SMP - uint32_t *ptr; - int words_per_gran = RES_GRANULE / sizeof(uint32_t); + uintptr_t *ptr; + int words_per_gran = RES_GRANULE / sizeof(uintptr_t); ptr = &tlb0_miss_locks[cpuid * words_per_gran]; pcpu->pc_booke_tlb_lock = ptr; Modified: head/sys/powerpc/booke/locore.S ============================================================================== --- head/sys/powerpc/booke/locore.S Fri Mar 17 21:24:09 2017 (r315463) +++ head/sys/powerpc/booke/locore.S Fri Mar 17 21:40:14 2017 (r315464) @@ -41,6 +41,39 @@ #define TMPSTACKSZ 16384 +#ifdef __powerpc64__ +#define GET_TOCBASE(r) \ + mfspr r, SPR_SPRG8 +#define TOC_RESTORE nop +#define CMPI cmpdi +#define CMPL cmpld +#define LOAD ld +#define LOADX ldarx +#define STORE std +#define STOREX stdcx. +#define STU stdu +#define CALLSIZE 48 +#define REDZONE 288 +#define THREAD_REG %r13 +#define ADDR(x) \ + .llong x +#else +#define GET_TOCBASE(r) +#define TOC_RESTORE +#define CMPI cmpwi +#define CMPL cmplw +#define LOAD lwz +#define LOADX lwarx +#define STOREX stwcx. +#define STORE stw +#define STU stwu +#define CALLSIZE 8 +#define REDZONE 0 +#define THREAD_REG %r2 +#define ADDR(x) \ + .long x +#endif + .text .globl btext btext: @@ -101,6 +134,9 @@ __start: * Initial cleanup */ li %r3, PSL_DE /* Keep debug exceptions for CodeWarrior. */ +#ifdef __powerpc64__ + oris %r3, %r3, PSL_CM@h +#endif mtmsr %r3 isync @@ -200,11 +236,8 @@ __start: mtspr SPR_MAS1, %r3 /* note TS was not filled, so it's TS=0 */ isync - lis %r3, KERNBASE@h - ori %r3, %r3, KERNBASE@l /* EPN = KERNBASE */ -#ifdef SMP + LOAD_ADDR(%r3, KERNBASE) ori %r3, %r3, (_TLB_ENTRY_SHARED | MAS2_M)@l /* WIMGE = 0b00100 */ -#endif mtspr SPR_MAS2, %r3 isync @@ -224,11 +257,19 @@ __start: /* Switch to the above TLB1[1] mapping */ bl 4f 4: mflr %r4 - rlwinm %r4, %r4, 0, 8, 31 /* Current offset from kernel load address */ +#ifdef __powerpc64__ + clrldi %r4, %r4, 38 + clrrdi %r3, %r3, 12 +#else + rlwinm %r4, %r4, 0, 6, 31 /* Current offset from kernel load address */ rlwinm %r3, %r3, 0, 0, 19 +#endif add %r4, %r4, %r3 /* Convert to kernel virtual address */ addi %r4, %r4, (5f - 4b) li %r3, PSL_DE /* Note AS=0 */ +#ifdef __powerpc64__ + oris %r3, %r3, PSL_CM@h +#endif mtspr SPR_SRR0, %r4 mtspr SPR_SRR1, %r3 rfi @@ -242,6 +283,33 @@ __start: done_mapping: +#ifdef __powerpc64__ + /* Set up the TOC pointer */ + b 0f + .align 3 +0: nop + bl 1f + .llong __tocbase + 0x8000 - . +1: mflr %r2 + ld %r1,0(%r2) + add %r2,%r1,%r2 + mtspr SPR_SPRG8, %r2 + + /* Get load offset */ + ld %r31,-0x8000(%r2) /* First TOC entry is TOC base */ + subf %r31,%r31,%r2 /* Subtract from real TOC base to get base */ + + /* Set up the stack pointer */ + ld %r1,TOC_REF(tmpstack)(%r2) + addi %r1,%r1,TMPSTACKSZ-96 + add %r1,%r1,%r31 + bl 1f + .llong _DYNAMIC-. +1: mflr %r3 + ld %r4,0(%r3) + add %r3,%r4,%r3 + mr %r4,%r31 +#else /* * Setup a temporary stack */ @@ -265,12 +333,15 @@ done_mapping: add %r4,%r4,%r5 lwz %r4,4(%r4) /* got[0] is _DYNAMIC link addr */ subf %r4,%r4,%r3 /* subtract to calculate relocbase */ - bl elf_reloc_self +#endif + bl CNAME(elf_reloc_self) + TOC_RESTORE /* * Initialise exception vector offsets */ - bl ivor_setup + bl CNAME(ivor_setup) + TOC_RESTORE /* * Set up arguments and jump to system initialization code @@ -279,15 +350,17 @@ done_mapping: mr %r4, %r31 /* Prepare core */ - bl booke_init + bl CNAME(booke_init) + TOC_RESTORE /* Switch to thread0.td_kstack now */ mr %r1, %r3 li %r3, 0 - stw %r3, 0(%r1) + STORE %r3, 0(%r1) /* Machine independet part, does not return */ - bl mi_startup + bl CNAME(mi_startup) + TOC_RESTORE /* NOT REACHED */ 5: b 5b @@ -364,6 +437,9 @@ bp_kernload: mfmsr %r3 ori %r3, %r3, (PSL_IS | PSL_DS) +#ifdef __powerpc64__ + oris %r3, %r3, PSL_CM@h +#endif bl 3f 3: mflr %r4 addi %r4, %r4, (4f - 3b) @@ -393,20 +469,31 @@ bp_kernload: mtspr SPR_MAS1, %r3 /* note TS was not filled, so it's TS=0 */ isync - lis %r3, KERNBASE@h - ori %r3, %r3, KERNBASE@l /* EPN = KERNBASE */ + LOAD_ADDR(%r3, KERNBASE) ori %r3, %r3, (_TLB_ENTRY_SHARED | MAS2_M)@l /* WIMGE = 0b00100 */ mtspr SPR_MAS2, %r3 isync /* Retrieve kernel load [physical] address from bp_kernload */ - bl 5f - .long bp_kernload - .long __boot_page +#ifdef __powerpc64__ + b 0f + .align 3 +0: + nop +#endif + bl 5f + ADDR(bp_kernload) + ADDR(__boot_page) 5: mflr %r3 +#ifdef __powerpc64__ + ld %r4, 0(%r3) + ld %r5, 8(%r3) + clrrdi %r3, %r3, 12 +#else lwz %r4, 0(%r3) lwz %r5, 4(%r3) rlwinm %r3, %r3, 0, 0, 19 +#endif sub %r4, %r4, %r5 /* offset of bp_kernload within __boot_page */ lwzx %r3, %r4, %r3 @@ -426,7 +513,11 @@ bp_kernload: rlwinm %r3, %r3, 0, 0xfff /* Offset from boot page start */ add %r3, %r3, %r5 /* Make this virtual address */ addi %r3, %r3, (7f - 6b) +#ifdef __powerpc64__ + lis %r4, PSL_CM@h /* Note AS=0 */ +#else li %r4, 0 /* Note AS=0 */ +#endif mtspr SPR_SRR0, %r3 mtspr SPR_SRR1, %r4 rfi @@ -444,6 +535,27 @@ bp_kernload: mr %r3, %r28 bl tlb1_inval_entry +#ifdef __powerpc64__ + /* Set up the TOC pointer */ + b 0f + .align 3 +0: nop + bl 1f + .llong __tocbase + 0x8000 - . +1: mflr %r2 + ld %r1,0(%r2) + add %r2,%r1,%r2 + mtspr SPR_SPRG8, %r2 + + /* Get load offset */ + ld %r31,-0x8000(%r2) /* First TOC entry is TOC base */ + subf %r31,%r31,%r2 /* Subtract from real TOC base to get base */ + + /* Set up the stack pointer */ + ld %r1,TOC_REF(tmpstack)(%r2) + addi %r1,%r1,TMPSTACKSZ-96 + add %r1,%r1,%r31 +#else /* * Setup a temporary stack */ @@ -454,11 +566,13 @@ bp_kernload: add %r1,%r1,%r2 stw %r1, 0(%r1) addi %r1, %r1, (TMPSTACKSZ - 16) +#endif /* * Initialise exception vector offsets */ - bl ivor_setup + bl CNAME(ivor_setup) + TOC_RESTORE /* * Assign our pcpu instance @@ -468,16 +582,19 @@ bp_kernload: 1: mflr %r4 lwz %r3, 0(%r4) add %r3, %r3, %r4 - lwz %r3, 0(%r3) + LOAD %r3, 0(%r3) mtsprg0 %r3 - bl pmap_bootstrap_ap + bl CNAME(pmap_bootstrap_ap) + TOC_RESTORE - bl cpudep_ap_bootstrap + bl CNAME(cpudep_ap_bootstrap) + TOC_RESTORE /* Switch to the idle thread's kstack */ mr %r1, %r3 - bl machdep_ap_bootstrap + bl CNAME(machdep_ap_bootstrap) + TOC_RESTORE /* NOT REACHED */ 6: b 6b @@ -594,7 +711,6 @@ tlb1_temp_mapping_as1: * r3-r5 scratched */ tlb1_inval_all_but_current: - mr %r6, %r3 mfspr %r3, SPR_TLB1CFG /* Get number of entries */ andi. %r3, %r3, TLBCFG_NENTRY_MASK@l li %r4, 0 /* Start from Entry 0 */ @@ -864,14 +980,18 @@ ENTRY(get_spr) .data .align 3 GLOBAL(__startkernel) - .long begin + ADDR(begin) GLOBAL(__endkernel) - .long end + ADDR(end) .align 4 tmpstack: .space TMPSTACKSZ tmpstackbound: .space 10240 /* XXX: this really should not be necessary */ +#ifdef __powerpc64__ +TOC_ENTRY(tmpstack) +TOC_ENTRY(bp_kernload) +#endif /* * Compiled KERNBASE locations Modified: head/sys/powerpc/booke/mp_cpudep.c ============================================================================== --- head/sys/powerpc/booke/mp_cpudep.c Fri Mar 17 21:24:09 2017 (r315463) +++ head/sys/powerpc/booke/mp_cpudep.c Fri Mar 17 21:40:14 2017 (r315464) @@ -50,7 +50,8 @@ volatile void *ap_pcpu; uintptr_t cpudep_ap_bootstrap() { - uint32_t msr, sp, csr; + uint32_t msr, csr; + uintptr_t sp; /* Enable L1 caches */ csr = mfspr(SPR_L1CSR0); @@ -66,7 +67,11 @@ cpudep_ap_bootstrap() } /* Set MSR */ +#ifdef __powerpc64__ + msr = PSL_CM | PSL_ME; +#else msr = PSL_ME; +#endif mtmsr(msr); /* Assign pcpu fields, return ptr to this AP's idle thread kstack */ Modified: head/sys/powerpc/booke/pmap.c ============================================================================== --- head/sys/powerpc/booke/pmap.c Fri Mar 17 21:24:09 2017 (r315463) +++ head/sys/powerpc/booke/pmap.c Fri Mar 17 21:40:14 2017 (r315464) @@ -34,18 +34,42 @@ * Kernel and user threads run within one common virtual address space * defined by AS=0. * + * 32-bit pmap: * Virtual address space layout: * ----------------------------- - * 0x0000_0000 - 0xafff_ffff : user process - * 0xb000_0000 - 0xbfff_ffff : pmap_mapdev()-ed area (PCI/PCIE etc.) + * 0x0000_0000 - 0x7fff_ffff : user process + * 0x8000_0000 - 0xbfff_ffff : pmap_mapdev()-ed area (PCI/PCIE etc.) * 0xc000_0000 - 0xc0ff_ffff : kernel reserved * 0xc000_0000 - data_end : kernel code+data, env, metadata etc. - * 0xc100_0000 - 0xfeef_ffff : KVA + * 0xc100_0000 - 0xffff_ffff : KVA * 0xc100_0000 - 0xc100_3fff : reserved for page zero/copy * 0xc100_4000 - 0xc200_3fff : reserved for ptbl bufs * 0xc200_4000 - 0xc200_8fff : guard page + kstack0 * 0xc200_9000 - 0xfeef_ffff : actual free KVA space - * 0xfef0_0000 - 0xffff_ffff : I/O devices region + * + * 64-bit pmap: + * Virtual address space layout: + * ----------------------------- + * 0x0000_0000_0000_0000 - 0xbfff_ffff_ffff_ffff : user process + * 0x0000_0000_0000_0000 - 0x8fff_ffff_ffff_ffff : text, data, heap, maps, libraries + * 0x9000_0000_0000_0000 - 0xafff_ffff_ffff_ffff : mmio region + * 0xb000_0000_0000_0000 - 0xbfff_ffff_ffff_ffff : stack + * 0xc000_0000_0000_0000 - 0xcfff_ffff_ffff_ffff : kernel reserved + * 0xc000_0000_0000_0000 - endkernel-1 : kernel code & data + * endkernel - msgbufp-1 : flat device tree + * msgbufp - ptbl_bufs-1 : message buffer + * ptbl_bufs - kernel_pdir-1 : kernel page tables + * kernel_pdir - kernel_pp2d-1 : kernel page directory + * kernel_pp2d - . : kernel pointers to page directory + * pmap_zero_copy_min - crashdumpmap-1 : reserved for page zero/copy + * crashdumpmap - ptbl_buf_pool_vabase-1 : reserved for ptbl bufs + * ptbl_buf_pool_vabase - virtual_avail-1 : user page directories and page tables + * virtual_avail - 0xcfff_ffff_ffff_ffff : actual free KVA space + * 0xd000_0000_0000_0000 - 0xdfff_ffff_ffff_ffff : coprocessor region + * 0xe000_0000_0000_0000 - 0xefff_ffff_ffff_ffff : mmio region + * 0xf000_0000_0000_0000 - 0xffff_ffff_ffff_ffff : direct map + * 0xf000_0000_0000_0000 - +Maxmem : physmem map + * - 0xffff_ffff_ffff_ffff : device direct map */ #include @@ -83,6 +107,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -103,6 +128,12 @@ __FBSDID("$FreeBSD$"); #define debugf(fmt, args...) #endif +#ifdef __powerpc64__ +#define PRI0ptrX "016lx" +#else +#define PRI0ptrX "08x" +#endif + #define TODO panic("%s: not implemented", __func__); extern unsigned char _etext[]; @@ -144,6 +175,9 @@ static int mmu_booke_enter_locked(mmu_t, unsigned int kptbl_min; /* Index of the first kernel ptbl. */ unsigned int kernel_ptbls; /* Number of KVA ptbls. */ +#ifdef __powerpc64__ +unsigned int kernel_pdirs; +#endif /* * If user pmap is processed with mmu_booke_remove and the resident count @@ -152,7 +186,9 @@ unsigned int kernel_ptbls; /* Number of #define PMAP_REMOVE_DONE(pmap) \ ((pmap) != kernel_pmap && (pmap)->pm_stats.resident_count == 0) +#if defined(COMPAT_FREEBSD32) || !defined(__powerpc64__) extern int elf32_nxstack; +#endif /**************************************************************************/ /* TLB and TID handling */ @@ -175,14 +211,17 @@ uint32_t tlb1_entries; #define TLB0_ENTRIES_PER_WAY (tlb0_entries_per_way) #define TLB1_ENTRIES (tlb1_entries) -#define TLB1_MAXENTRIES 64 static vm_offset_t tlb1_map_base = VM_MAXUSER_ADDRESS + PAGE_SIZE; static tlbtid_t tid_alloc(struct pmap *); static void tid_flush(tlbtid_t tid); +#ifdef __powerpc64__ +static void tlb_print_entry(int, uint32_t, uint64_t, uint32_t, uint32_t); +#else static void tlb_print_entry(int, uint32_t, uint32_t, uint32_t, uint32_t); +#endif static void tlb1_read_entry(tlb_entry_t *, unsigned int); static void tlb1_write_entry(tlb_entry_t *, unsigned int); @@ -219,17 +258,24 @@ static struct ptbl_buf *ptbl_buf_alloc(v static void ptbl_buf_free(struct ptbl_buf *); static void ptbl_free_pmap_ptbl(pmap_t, pte_t *); +#ifdef __powerpc64__ +static pte_t *ptbl_alloc(mmu_t, pmap_t, pte_t **, + unsigned int, boolean_t); +static void ptbl_free(mmu_t, pmap_t, pte_t **, unsigned int); +static void ptbl_hold(mmu_t, pmap_t, pte_t **, unsigned int); +static int ptbl_unhold(mmu_t, pmap_t, vm_offset_t); +#else static pte_t *ptbl_alloc(mmu_t, pmap_t, unsigned int, boolean_t); static void ptbl_free(mmu_t, pmap_t, unsigned int); static void ptbl_hold(mmu_t, pmap_t, unsigned int); static int ptbl_unhold(mmu_t, pmap_t, unsigned int); +#endif static vm_paddr_t pte_vatopa(mmu_t, pmap_t, vm_offset_t); -static pte_t *pte_find(mmu_t, pmap_t, vm_offset_t); static int pte_enter(mmu_t, pmap_t, vm_page_t, vm_offset_t, uint32_t, boolean_t); static int pte_remove(mmu_t, pmap_t, vm_offset_t, uint8_t); -static void kernel_pte_alloc(vm_offset_t data_end, vm_offset_t addr, - vm_offset_t pdir); +static pte_t *pte_find(mmu_t, pmap_t, vm_offset_t); +static void kernel_pte_alloc(vm_offset_t, vm_offset_t, vm_offset_t); static pv_entry_t pv_alloc(void); static void pv_free(pv_entry_t); @@ -239,7 +285,11 @@ static void pv_remove(pmap_t, vm_offset_ static void booke_pmap_init_qpages(void); /* Number of kva ptbl buffers, each covering one ptbl (PTBL_PAGES). */ +#ifdef __powerpc64__ +#define PTBL_BUFS (16UL * 16 * 16) +#else #define PTBL_BUFS (128 * 16) +#endif struct ptbl_buf { TAILQ_ENTRY(ptbl_buf) link; /* list link */ @@ -503,6 +553,364 @@ tlb1_get_tlbconf(void) /* Page table related */ /**************************************************************************/ +#ifdef __powerpc64__ +/* Initialize pool of kva ptbl buffers. */ +static void +ptbl_init(void) +{ + int i; + + mtx_init(&ptbl_buf_freelist_lock, "ptbl bufs lock", NULL, MTX_DEF); + TAILQ_INIT(&ptbl_buf_freelist); + + for (i = 0; i < PTBL_BUFS; i++) { + ptbl_bufs[i].kva = ptbl_buf_pool_vabase + + i * MAX(PTBL_PAGES,PDIR_PAGES) * PAGE_SIZE; + TAILQ_INSERT_TAIL(&ptbl_buf_freelist, &ptbl_bufs[i], link); + } +} + +/* Get an sf_buf from the freelist. */ +static struct ptbl_buf * +ptbl_buf_alloc(void) +{ + struct ptbl_buf *buf; + + mtx_lock(&ptbl_buf_freelist_lock); + buf = TAILQ_FIRST(&ptbl_buf_freelist); + if (buf != NULL) + TAILQ_REMOVE(&ptbl_buf_freelist, buf, link); + mtx_unlock(&ptbl_buf_freelist_lock); + + return (buf); +} + +/* Return ptbl buff to free pool. */ +static void +ptbl_buf_free(struct ptbl_buf *buf) +{ + mtx_lock(&ptbl_buf_freelist_lock); + TAILQ_INSERT_TAIL(&ptbl_buf_freelist, buf, link); + mtx_unlock(&ptbl_buf_freelist_lock); +} + +/* + * Search the list of allocated ptbl bufs and find on list of allocated ptbls + */ +static void +ptbl_free_pmap_ptbl(pmap_t pmap, pte_t * ptbl) +{ + struct ptbl_buf *pbuf; + + TAILQ_FOREACH(pbuf, &pmap->pm_ptbl_list, link) { + if (pbuf->kva == (vm_offset_t) ptbl) { + /* Remove from pmap ptbl buf list. */ + TAILQ_REMOVE(&pmap->pm_ptbl_list, pbuf, link); + + /* Free corresponding ptbl buf. */ + ptbl_buf_free(pbuf); + + break; + } + } +} + +/* Get a pointer to a PTE in a page table. */ +static __inline pte_t * +pte_find(mmu_t mmu, pmap_t pmap, vm_offset_t va) +{ + pte_t **pdir; + pte_t *ptbl; + + KASSERT((pmap != NULL), ("pte_find: invalid pmap")); + + pdir = pmap->pm_pp2d[PP2D_IDX(va)]; + if (!pdir) + return NULL; + ptbl = pdir[PDIR_IDX(va)]; + return ((ptbl != NULL) ? &ptbl[PTBL_IDX(va)] : NULL); +} + +/* + * Search the list of allocated pdir bufs and find on list of allocated pdirs + */ +static void +ptbl_free_pmap_pdir(mmu_t mmu, pmap_t pmap, pte_t ** pdir) +{ + struct ptbl_buf *pbuf; + + TAILQ_FOREACH(pbuf, &pmap->pm_pdir_list, link) { + if (pbuf->kva == (vm_offset_t) pdir) { + /* Remove from pmap ptbl buf list. */ + TAILQ_REMOVE(&pmap->pm_pdir_list, pbuf, link); + + /* Free corresponding pdir buf. */ + ptbl_buf_free(pbuf); + + break; + } + } +} +/* Free pdir pages and invalidate pdir entry. */ +static void +pdir_free(mmu_t mmu, pmap_t pmap, unsigned int pp2d_idx) +{ + pte_t **pdir; + vm_paddr_t pa; + vm_offset_t va; + vm_page_t m; + int i; + + pdir = pmap->pm_pp2d[pp2d_idx]; + + KASSERT((pdir != NULL), ("pdir_free: null pdir")); + + pmap->pm_pp2d[pp2d_idx] = NULL; + + for (i = 0; i < PDIR_PAGES; i++) { + va = ((vm_offset_t) pdir + (i * PAGE_SIZE)); + pa = pte_vatopa(mmu, kernel_pmap, va); + m = PHYS_TO_VM_PAGE(pa); + vm_page_free_zero(m); + atomic_subtract_int(&vm_cnt.v_wire_count, 1); + pmap_kremove(va); + } + + ptbl_free_pmap_pdir(mmu, pmap, pdir); +} + +/* + * Decrement pdir pages hold count and attempt to free pdir pages. Called + * when removing directory entry from pdir. + * + * Return 1 if pdir pages were freed. + */ +static int +pdir_unhold(mmu_t mmu, pmap_t pmap, u_int pp2d_idx) +{ + pte_t **pdir; + vm_paddr_t pa; + vm_page_t m; + int i; + + KASSERT((pmap != kernel_pmap), + ("pdir_unhold: unholding kernel pdir!")); + + pdir = pmap->pm_pp2d[pp2d_idx]; + + KASSERT(((vm_offset_t) pdir >= VM_MIN_KERNEL_ADDRESS), + ("pdir_unhold: non kva pdir")); + + /* decrement hold count */ + for (i = 0; i < PDIR_PAGES; i++) { + pa = pte_vatopa(mmu, kernel_pmap, + (vm_offset_t) pdir + (i * PAGE_SIZE)); + m = PHYS_TO_VM_PAGE(pa); + m->wire_count--; + } + + /* + * Free pdir pages if there are no dir entries in this pdir. + * wire_count has the same value for all ptbl pages, so check the + * last page. + */ + if (m->wire_count == 0) { + pdir_free(mmu, pmap, pp2d_idx); + return (1); + } + return (0); +} + +/* + * Increment hold count for pdir pages. This routine is used when new ptlb + * entry is being inserted into pdir. + */ +static void +pdir_hold(mmu_t mmu, pmap_t pmap, pte_t ** pdir) +{ + vm_paddr_t pa; + vm_page_t m; + int i; + + KASSERT((pmap != kernel_pmap), + ("pdir_hold: holding kernel pdir!")); + + KASSERT((pdir != NULL), ("pdir_hold: null pdir")); + + for (i = 0; i < PDIR_PAGES; i++) { + pa = pte_vatopa(mmu, kernel_pmap, + (vm_offset_t) pdir + (i * PAGE_SIZE)); + m = PHYS_TO_VM_PAGE(pa); + m->wire_count++; + } +} + +/* Allocate page table. */ +static pte_t * +ptbl_alloc(mmu_t mmu, pmap_t pmap, pte_t ** pdir, unsigned int pdir_idx, + boolean_t nosleep) +{ + vm_page_t mtbl [PTBL_PAGES]; + vm_page_t m; + struct ptbl_buf *pbuf; + unsigned int pidx; + pte_t *ptbl; + int i, j; + int req; + + KASSERT((pdir[pdir_idx] == NULL), + ("%s: valid ptbl entry exists!", __func__)); + + pbuf = ptbl_buf_alloc(); + if (pbuf == NULL) + panic("%s: couldn't alloc kernel virtual memory", __func__); + + ptbl = (pte_t *) pbuf->kva; + + for (i = 0; i < PTBL_PAGES; i++) { + pidx = (PTBL_PAGES * pdir_idx) + i; + req = VM_ALLOC_NOOBJ | VM_ALLOC_WIRED; + while ((m = vm_page_alloc(NULL, pidx, req)) == NULL) { + PMAP_UNLOCK(pmap); + rw_wunlock(&pvh_global_lock); + if (nosleep) { + ptbl_free_pmap_ptbl(pmap, ptbl); + for (j = 0; j < i; j++) + vm_page_free(mtbl[j]); + atomic_subtract_int(&vm_cnt.v_wire_count, i); + return (NULL); + } + VM_WAIT; + rw_wlock(&pvh_global_lock); + PMAP_LOCK(pmap); + } + mtbl[i] = m; + } + + /* Mapin allocated pages into kernel_pmap. */ + mmu_booke_qenter(mmu, (vm_offset_t) ptbl, mtbl, PTBL_PAGES); + /* Zero whole ptbl. */ + bzero((caddr_t) ptbl, PTBL_PAGES * PAGE_SIZE); + + /* Add pbuf to the pmap ptbl bufs list. */ + TAILQ_INSERT_TAIL(&pmap->pm_ptbl_list, pbuf, link); + + return (ptbl); +} + +/* Free ptbl pages and invalidate pdir entry. */ +static void +ptbl_free(mmu_t mmu, pmap_t pmap, pte_t ** pdir, unsigned int pdir_idx) +{ + pte_t *ptbl; + vm_paddr_t pa; + vm_offset_t va; + vm_page_t m; + int i; + + ptbl = pdir[pdir_idx]; + + KASSERT((ptbl != NULL), ("ptbl_free: null ptbl")); + + pdir[pdir_idx] = NULL; + + for (i = 0; i < PTBL_PAGES; i++) { + va = ((vm_offset_t) ptbl + (i * PAGE_SIZE)); + pa = pte_vatopa(mmu, kernel_pmap, va); + m = PHYS_TO_VM_PAGE(pa); + vm_page_free_zero(m); + atomic_subtract_int(&vm_cnt.v_wire_count, 1); + pmap_kremove(va); + } + + ptbl_free_pmap_ptbl(pmap, ptbl); +} + +/* + * Decrement ptbl pages hold count and attempt to free ptbl pages. Called + * when removing pte entry from ptbl. + * + * Return 1 if ptbl pages were freed. + */ +static int +ptbl_unhold(mmu_t mmu, pmap_t pmap, vm_offset_t va) +{ + pte_t *ptbl; + vm_paddr_t pa; + vm_page_t m; + u_int pp2d_idx; + pte_t **pdir; + u_int pdir_idx; + int i; + + pp2d_idx = PP2D_IDX(va); + pdir_idx = PDIR_IDX(va); + + KASSERT((pmap != kernel_pmap), + ("ptbl_unhold: unholding kernel ptbl!")); + + pdir = pmap->pm_pp2d[pp2d_idx]; + ptbl = pdir[pdir_idx]; + + KASSERT(((vm_offset_t) ptbl >= VM_MIN_KERNEL_ADDRESS), + ("ptbl_unhold: non kva ptbl")); + + /* decrement hold count */ + for (i = 0; i < PTBL_PAGES; i++) { + pa = pte_vatopa(mmu, kernel_pmap, + (vm_offset_t) ptbl + (i * PAGE_SIZE)); + m = PHYS_TO_VM_PAGE(pa); + m->wire_count--; + } + + /* + * Free ptbl pages if there are no pte entries in this ptbl. + * wire_count has the same value for all ptbl pages, so check the + * last page. + */ + if (m->wire_count == 0) { + /* A pair of indirect entries might point to this ptbl page */ +#if 0 + tlb_flush_entry(pmap, va & ~((2UL * PAGE_SIZE_1M) - 1), + TLB_SIZE_1M, MAS6_SIND); + tlb_flush_entry(pmap, (va & ~((2UL * PAGE_SIZE_1M) - 1)) | PAGE_SIZE_1M, + TLB_SIZE_1M, MAS6_SIND); +#endif + ptbl_free(mmu, pmap, pdir, pdir_idx); + pdir_unhold(mmu, pmap, pp2d_idx); + return (1); + } + return (0); +} + +/* + * Increment hold count for ptbl pages. This routine is used when new pte + * entry is being inserted into ptbl. + */ +static void +ptbl_hold(mmu_t mmu, pmap_t pmap, pte_t ** pdir, unsigned int pdir_idx) +{ + vm_paddr_t pa; + pte_t *ptbl; + vm_page_t m; + int i; + + KASSERT((pmap != kernel_pmap), + ("ptbl_hold: holding kernel ptbl!")); + + ptbl = pdir[pdir_idx]; + + KASSERT((ptbl != NULL), ("ptbl_hold: null ptbl")); + + for (i = 0; i < PTBL_PAGES; i++) { + pa = pte_vatopa(mmu, kernel_pmap, + (vm_offset_t) ptbl + (i * PAGE_SIZE)); + m = PHYS_TO_VM_PAGE(pa); + m->wire_count++; + } +} +#else + /* Initialize pool of kva ptbl buffers. */ static void ptbl_init(void) @@ -518,7 +926,8 @@ ptbl_init(void) TAILQ_INIT(&ptbl_buf_freelist); for (i = 0; i < PTBL_BUFS; i++) { - ptbl_bufs[i].kva = ptbl_buf_pool_vabase + i * PTBL_PAGES * PAGE_SIZE; + ptbl_bufs[i].kva = + ptbl_buf_pool_vabase + i * PTBL_PAGES * PAGE_SIZE; TAILQ_INSERT_TAIL(&ptbl_buf_freelist, &ptbl_bufs[i], link); } } @@ -602,7 +1011,6 @@ ptbl_alloc(mmu_t mmu, pmap_t pmap, unsig CTR2(KTR_PMAP, "%s: ptbl kva = %p", __func__, ptbl); - /* Allocate ptbl pages, this will sleep! */ for (i = 0; i < PTBL_PAGES; i++) { pidx = (PTBL_PAGES * pdir_idx) + i; while ((m = vm_page_alloc(NULL, pidx, @@ -763,6 +1171,7 @@ ptbl_hold(mmu_t mmu, pmap_t pmap, unsign m->wire_count++; } } +#endif /* Allocate pv_entry structure. */ pv_entry_t @@ -843,6 +1252,235 @@ pv_remove(pmap_t pmap, vm_offset_t va, v //debugf("pv_remove: e\n"); } +#ifdef __powerpc64__ +/* + * Clean pte entry, try to free page table page if requested. + * + * Return 1 if ptbl pages were freed, otherwise return 0. + */ +static int +pte_remove(mmu_t mmu, pmap_t pmap, vm_offset_t va, u_int8_t flags) +{ + vm_page_t m; + pte_t *pte; + + pte = pte_find(mmu, pmap, va); + KASSERT(pte != NULL, ("%s: NULL pte", __func__)); + + if (!PTE_ISVALID(pte)) + return (0); + + /* Get vm_page_t for mapped pte. */ + m = PHYS_TO_VM_PAGE(PTE_PA(pte)); + + if (PTE_ISWIRED(pte)) + pmap->pm_stats.wired_count--; + + /* Handle managed entry. */ + if (PTE_ISMANAGED(pte)) { + + /* Handle modified pages. */ + if (PTE_ISMODIFIED(pte)) + vm_page_dirty(m); + + /* Referenced pages. */ + if (PTE_ISREFERENCED(pte)) + vm_page_aflag_set(m, PGA_REFERENCED); + + /* Remove pv_entry from pv_list. */ + pv_remove(pmap, va, m); + } + mtx_lock_spin(&tlbivax_mutex); + tlb_miss_lock(); + + tlb0_flush_entry(va); + *pte = 0; + + tlb_miss_unlock(); + mtx_unlock_spin(&tlbivax_mutex); + + pmap->pm_stats.resident_count--; + + if (flags & PTBL_UNHOLD) { + return (ptbl_unhold(mmu, pmap, va)); + } + return (0); +} + +/* + * allocate a page of pointers to page directories, do not preallocate the + * page tables + */ +static pte_t ** +pdir_alloc(mmu_t mmu, pmap_t pmap, unsigned int pp2d_idx, bool nosleep) +{ + vm_page_t mtbl [PDIR_PAGES]; + vm_page_t m; + struct ptbl_buf *pbuf; + pte_t **pdir; + unsigned int pidx; + int i; + int req; + + pbuf = ptbl_buf_alloc(); + + if (pbuf == NULL) + panic("%s: couldn't alloc kernel virtual memory", __func__); + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Fri Mar 17 22:02:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89F37D10A6B; Fri, 17 Mar 2017 22:02:03 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 613A3153D; Fri, 17 Mar 2017 22:02:03 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2HM22kj054133; Fri, 17 Mar 2017 22:02:02 GMT (envelope-from landonf@FreeBSD.org) Received: (from landonf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2HM22C8054132; Fri, 17 Mar 2017 22:02:02 GMT (envelope-from landonf@FreeBSD.org) Message-Id: <201703172202.v2HM22C8054132@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: landonf set sender to landonf@FreeBSD.org using -f From: "Landon J. Fuller" Date: Fri, 17 Mar 2017 22:02:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315465 - head/sys/mips/broadcom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 17 Mar 2017 22:02:03 -0000 Author: landonf Date: Fri Mar 17 22:02:02 2017 New Revision: 315465 URL: https://svnweb.freebsd.org/changeset/base/315465 Log: Add MIPS boot support for the BCM4706/Northstar ChipCommon core. This adds support for matching against a core lookup table when performing early boot core lookup, and includes the BCM4706/Northstar-specific ChipCommon core ID in the set of supported ChipCommon cores. Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D10033 Modified: head/sys/mips/broadcom/bcm_machdep.c Modified: head/sys/mips/broadcom/bcm_machdep.c ============================================================================== --- head/sys/mips/broadcom/bcm_machdep.c Fri Mar 17 21:40:14 2017 (r315464) +++ head/sys/mips/broadcom/bcm_machdep.c Fri Mar 17 22:02:02 2017 (r315465) @@ -98,9 +98,9 @@ __FBSDID("$FreeBSD$"); static int bcm_init_platform_data(struct bcm_platform *bp); -static int bcm_find_core(struct bcm_platform *bp, uint16_t vendor, - uint16_t device, int unit, struct bhnd_core_info *info, - uintptr_t *addr); +static int bcm_find_core(struct bcm_platform *bp, + const struct bhnd_core_match *descs, size_t num_descs, + struct bhnd_core_info *info, uintptr_t *addr); static int bcm_erom_probe_and_attach(bhnd_erom_class_t **erom_cls, kobj_ops_t erom_ops, bhnd_erom_t *erom, size_t esize, @@ -112,6 +112,15 @@ extern int *end; static struct bcm_platform bcm_platform_data; static bool bcm_platform_data_avail = false; +static const struct bhnd_core_match bcm_chipc_cores[] = { + { BHND_MATCH_CORE(BHND_MFGID_BCM, BHND_COREID_CC) }, + { BHND_MATCH_CORE(BHND_MFGID_BCM, BHND_COREID_4706_CC) }, +}; + +static const struct bhnd_core_match bcm_pmu_cores[] = { + { BHND_MATCH_CORE(BHND_MFGID_BCM, BHND_COREID_PMU) }, +}; + struct bcm_platform * bcm_get_platform(void) { @@ -133,39 +142,41 @@ bcm_get_bus_addr(void) } /** - * Search the device enumeration table for a core matching @p vendor, - * @p device, and @p unit. + * Search the device enumeration table for a core matching @p descs, * * @param bp Platform state containing a valid EROM parser. - * @param vendor The core's required vendor. - * @param device The core's required device id. - * @param unit The core's required unit number. + * @param descs The core match descriptor table. + * @param num_descs The number of match descriptors in @p descs. * @param[out] info If non-NULL, will be populated with the core * info. * @param[out] addr If non-NULL, will be populated with the core's * physical register address. */ static int -bcm_find_core(struct bcm_platform *bp, uint16_t vendor, uint16_t device, - int unit, struct bhnd_core_info *info, uintptr_t *addr) +bcm_find_core(struct bcm_platform *bp, const struct bhnd_core_match *descs, + size_t num_descs, struct bhnd_core_info *info, uintptr_t *addr) { - struct bhnd_core_match md; bhnd_addr_t b_addr; bhnd_size_t b_size; int error; - md = (struct bhnd_core_match) { - BHND_MATCH_CORE_VENDOR(vendor), - BHND_MATCH_CORE_ID(BHND_COREID_CC), - BHND_MATCH_CORE_UNIT(0) - }; - /* Fetch core info */ - error = bhnd_erom_lookup_core_addr(&bp->erom.obj, &md, BHND_PORT_DEVICE, - 0, 0, info, &b_addr, &b_size); - if (error) - return (error); + for (size_t i = 0; i < num_descs; i++) { + error = bhnd_erom_lookup_core_addr(&bp->erom.obj, &descs[i], + BHND_PORT_DEVICE, 0, 0, info, &b_addr, &b_size); + + /* Terminate search on first match */ + if (error == 0) + break; + /* Terminate on first error (other than core not found) */ + if (error != ENOENT) + return (error); + + /* Continue search ... */ + } + + /* Provide the core's base address */ if (addr != NULL && b_addr > UINTPTR_MAX) { BCM_ERR("core address %#jx overflows native address width\n", (uintmax_t)b_addr); @@ -286,8 +297,8 @@ bcm_init_platform_data(struct bcm_platfo } /* Fetch chipcommon core info */ - error = bcm_find_core(bp, BHND_MFGID_BCM, BHND_COREID_CC, 0, &bp->cc_id, - &bp->cc_addr); + error = bcm_find_core(bp, bcm_chipc_cores, nitems(bcm_chipc_cores), + &bp->cc_id, &bp->cc_addr); if (error) { BCM_ERR("error locating chipc core: %d\n", error); return (error); @@ -306,9 +317,8 @@ bcm_init_platform_data(struct bcm_platfo if (pmu && aob) { /* PMU block mapped to a PMU core on the Always-on-Bus (aob) */ - error = bcm_find_core(bp, BHND_MFGID_BCM, BHND_COREID_PMU, 0, + error = bcm_find_core(bp, bcm_pmu_cores, nitems(bcm_pmu_cores), &bp->pmu_id, &bp->pmu_addr); - if (error) { BCM_ERR("error locating pmu core: %d\n", error); return (error); From owner-svn-src-head@freebsd.org Fri Mar 17 22:57:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 195C8D10B76; Fri, 17 Mar 2017 22:57:39 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 CB8E71852; Fri, 17 Mar 2017 22:57:38 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2HMvbFu078395; Fri, 17 Mar 2017 22:57:37 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2HMvbXp078389; Fri, 17 Mar 2017 22:57:37 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201703172257.v2HMvbXp078389@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Fri, 17 Mar 2017 22:57:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315466 - in head/sys/dev: mmc sdhci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 17 Mar 2017 22:57:39 -0000 Author: marius Date: Fri Mar 17 22:57:37 2017 New Revision: 315466 URL: https://svnweb.freebsd.org/changeset/base/315466 Log: Again, fixes regarding style(4), to comments, includes and unused parameters. Modified: head/sys/dev/mmc/bridge.h head/sys/dev/mmc/mmc.c head/sys/dev/mmc/mmcbr_if.m head/sys/dev/sdhci/sdhci.c head/sys/dev/sdhci/sdhci_acpi.c head/sys/dev/sdhci/sdhci_if.m head/sys/dev/sdhci/sdhci_pci.c Modified: head/sys/dev/mmc/bridge.h ============================================================================== --- head/sys/dev/mmc/bridge.h Fri Mar 17 22:02:02 2017 (r315465) +++ head/sys/dev/mmc/bridge.h Fri Mar 17 22:57:37 2017 (r315466) @@ -111,7 +111,7 @@ enum mmc_bus_timing { struct mmc_ios { uint32_t clock; /* Speed of the clock in Hz to move data */ - enum mmc_vdd vdd; /* Voltage to apply to the power pins/ */ + enum mmc_vdd vdd; /* Voltage to apply to the power pins */ enum mmc_bus_mode bus_mode; enum mmc_chip_select chip_select; enum mmc_bus_width bus_width; Modified: head/sys/dev/mmc/mmc.c ============================================================================== --- head/sys/dev/mmc/mmc.c Fri Mar 17 22:02:02 2017 (r315465) +++ head/sys/dev/mmc/mmc.c Fri Mar 17 22:57:37 2017 (r315466) @@ -792,6 +792,7 @@ mmc_get_bits(uint32_t *bits, int bit_len const int i = (bit_len / 32) - (start / 32) - 1; const int shift = start & 31; uint32_t retval = bits[i] >> shift; + if (size + shift > 32) retval |= bits[i - 1] << (32 - shift); return (retval & ((1llu << size) - 1)); @@ -1464,7 +1465,7 @@ mmc_rescan_cards(struct mmc_softc *sc) return; for (i = 0; i < devcount; i++) { ivar = device_get_ivars(devlist[i]); - if (mmc_select_card(sc, ivar->rca)) { + if (mmc_select_card(sc, ivar->rca) != MMC_ERR_NONE) { if (bootverbose || mmc_debug) device_printf(sc->dev, "Card at relative address %d lost.\n", Modified: head/sys/dev/mmc/mmcbr_if.m ============================================================================== --- head/sys/dev/mmc/mmcbr_if.m Fri Mar 17 22:02:02 2017 (r315465) +++ head/sys/dev/mmc/mmcbr_if.m Fri Mar 17 22:57:37 2017 (r315466) @@ -65,8 +65,9 @@ INTERFACE mmcbr; # -# Called by the mmcbus to setup the IO pins correctly, the voltage to use -# for the card, the type of selects, power modes and bus width. +# Called by the mmcbus to set up the IO pins correctly, the common/core +# supply voltage (VDD/VCC) to use for the device, the clock frequency, the +# type of SPI chip select, power mode and bus width. # METHOD int update_ios { device_t brdev; @@ -76,8 +77,8 @@ METHOD int update_ios { # # Called by the mmcbus or its children to schedule a mmc request. These # requests are queued. Time passes. The bridge then gets notification -# of the status of request, who then notifies the requesting device via -# the xfer_done mmcbus method. +# of the status of the request, who then notifies the requesting device +# by calling the completion function supplied as part of the request. # METHOD int request { device_t brdev; Modified: head/sys/dev/sdhci/sdhci.c ============================================================================== --- head/sys/dev/sdhci/sdhci.c Fri Mar 17 22:02:02 2017 (r315465) +++ head/sys/dev/sdhci/sdhci.c Fri Mar 17 22:57:37 2017 (r315466) @@ -309,9 +309,8 @@ sdhci_set_clock(struct sdhci_slot *slot, } /* Divider 1:1 is 0x00, 2:1 is 0x01, 256:1 is 0x80 ... */ div >>= 1; - } - else { - /* Version 3.0 divisors are multiples of two up to 1023*2 */ + } else { + /* Version 3.0 divisors are multiples of two up to 1023 * 2 */ if (clock >= clk_base) div = 0; else { @@ -1349,7 +1348,7 @@ sdhci_data_irq(struct sdhci_slot *slot, if (intmask & SDHCI_INT_DMA_END) { data = slot->curcmd->data; - /* Unload DMA buffer... */ + /* Unload DMA buffer ... */ left = data->len - slot->offset; if (data->flags & MMC_DATA_READ) { bus_dmamap_sync(slot->dmatag, slot->dmamap, Modified: head/sys/dev/sdhci/sdhci_acpi.c ============================================================================== --- head/sys/dev/sdhci/sdhci_acpi.c Fri Mar 17 22:02:02 2017 (r315465) +++ head/sys/dev/sdhci/sdhci_acpi.c Fri Mar 17 22:57:37 2017 (r315466) @@ -87,7 +87,8 @@ static void sdhci_acpi_intr(void *arg); static int sdhci_acpi_detach(device_t dev); static uint8_t -sdhci_acpi_read_1(device_t dev, struct sdhci_slot *slot, bus_size_t off) +sdhci_acpi_read_1(device_t dev, struct sdhci_slot *slot __unused, + bus_size_t off) { struct sdhci_acpi_softc *sc = device_get_softc(dev); @@ -97,8 +98,8 @@ sdhci_acpi_read_1(device_t dev, struct s } static void -sdhci_acpi_write_1(device_t dev, struct sdhci_slot *slot, bus_size_t off, - uint8_t val) +sdhci_acpi_write_1(device_t dev, struct sdhci_slot *slot __unused, + bus_size_t off, uint8_t val) { struct sdhci_acpi_softc *sc = device_get_softc(dev); @@ -108,7 +109,8 @@ sdhci_acpi_write_1(device_t dev, struct } static uint16_t -sdhci_acpi_read_2(device_t dev, struct sdhci_slot *slot, bus_size_t off) +sdhci_acpi_read_2(device_t dev, struct sdhci_slot *slot __unused, + bus_size_t off) { struct sdhci_acpi_softc *sc = device_get_softc(dev); @@ -118,8 +120,8 @@ sdhci_acpi_read_2(device_t dev, struct s } static void -sdhci_acpi_write_2(device_t dev, struct sdhci_slot *slot, bus_size_t off, - uint16_t val) +sdhci_acpi_write_2(device_t dev, struct sdhci_slot *slot __unused, + bus_size_t off, uint16_t val) { struct sdhci_acpi_softc *sc = device_get_softc(dev); @@ -129,7 +131,8 @@ sdhci_acpi_write_2(device_t dev, struct } static uint32_t -sdhci_acpi_read_4(device_t dev, struct sdhci_slot *slot, bus_size_t off) +sdhci_acpi_read_4(device_t dev, struct sdhci_slot *slot __unused, + bus_size_t off) { struct sdhci_acpi_softc *sc = device_get_softc(dev); @@ -139,8 +142,8 @@ sdhci_acpi_read_4(device_t dev, struct s } static void -sdhci_acpi_write_4(device_t dev, struct sdhci_slot *slot, bus_size_t off, - uint32_t val) +sdhci_acpi_write_4(device_t dev, struct sdhci_slot *slot __unused, + bus_size_t off, uint32_t val) { struct sdhci_acpi_softc *sc = device_get_softc(dev); @@ -150,7 +153,7 @@ sdhci_acpi_write_4(device_t dev, struct } static void -sdhci_acpi_read_multi_4(device_t dev, struct sdhci_slot *slot, +sdhci_acpi_read_multi_4(device_t dev, struct sdhci_slot *slot __unused, bus_size_t off, uint32_t *data, bus_size_t count) { struct sdhci_acpi_softc *sc = device_get_softc(dev); @@ -159,7 +162,7 @@ sdhci_acpi_read_multi_4(device_t dev, st } static void -sdhci_acpi_write_multi_4(device_t dev, struct sdhci_slot *slot, +sdhci_acpi_write_multi_4(device_t dev, struct sdhci_slot *slot __unused, bus_size_t off, uint32_t *data, bus_size_t count) { struct sdhci_acpi_softc *sc = device_get_softc(dev); Modified: head/sys/dev/sdhci/sdhci_if.m ============================================================================== --- head/sys/dev/sdhci/sdhci_if.m Fri Mar 17 22:02:02 2017 (r315465) +++ head/sys/dev/sdhci/sdhci_if.m Fri Mar 17 22:57:37 2017 (r315466) @@ -59,22 +59,13 @@ # #include -#include -#include -#include +#include #include #include -#include - #include -#include #include -CODE { - struct sdhci_slot; -} - INTERFACE sdhci; METHOD uint8_t read_1 { Modified: head/sys/dev/sdhci/sdhci_pci.c ============================================================================== --- head/sys/dev/sdhci/sdhci_pci.c Fri Mar 17 22:02:02 2017 (r315465) +++ head/sys/dev/sdhci/sdhci_pci.c Fri Mar 17 22:57:37 2017 (r315466) @@ -147,7 +147,7 @@ SYSCTL_INT(_hw_sdhci, OID_AUTO, enable_m 0, "Enable MSI interrupts"); static uint8_t -sdhci_pci_read_1(device_t dev, struct sdhci_slot *slot, bus_size_t off) +sdhci_pci_read_1(device_t dev, struct sdhci_slot *slot __unused, bus_size_t off) { struct sdhci_pci_softc *sc = device_get_softc(dev); @@ -157,8 +157,8 @@ sdhci_pci_read_1(device_t dev, struct sd } static void -sdhci_pci_write_1(device_t dev, struct sdhci_slot *slot, bus_size_t off, - uint8_t val) +sdhci_pci_write_1(device_t dev, struct sdhci_slot *slot __unused, + bus_size_t off, uint8_t val) { struct sdhci_pci_softc *sc = device_get_softc(dev); @@ -168,7 +168,7 @@ sdhci_pci_write_1(device_t dev, struct s } static uint16_t -sdhci_pci_read_2(device_t dev, struct sdhci_slot *slot, bus_size_t off) +sdhci_pci_read_2(device_t dev, struct sdhci_slot *slot __unused, bus_size_t off) { struct sdhci_pci_softc *sc = device_get_softc(dev); @@ -178,8 +178,8 @@ sdhci_pci_read_2(device_t dev, struct sd } static void -sdhci_pci_write_2(device_t dev, struct sdhci_slot *slot, bus_size_t off, - uint16_t val) +sdhci_pci_write_2(device_t dev, struct sdhci_slot *slot __unused, + bus_size_t off, uint16_t val) { struct sdhci_pci_softc *sc = device_get_softc(dev); @@ -189,7 +189,7 @@ sdhci_pci_write_2(device_t dev, struct s } static uint32_t -sdhci_pci_read_4(device_t dev, struct sdhci_slot *slot, bus_size_t off) +sdhci_pci_read_4(device_t dev, struct sdhci_slot *slot __unused, bus_size_t off) { struct sdhci_pci_softc *sc = device_get_softc(dev); @@ -199,8 +199,8 @@ sdhci_pci_read_4(device_t dev, struct sd } static void -sdhci_pci_write_4(device_t dev, struct sdhci_slot *slot, bus_size_t off, - uint32_t val) +sdhci_pci_write_4(device_t dev, struct sdhci_slot *slot __unused, + bus_size_t off, uint32_t val) { struct sdhci_pci_softc *sc = device_get_softc(dev); @@ -210,7 +210,7 @@ sdhci_pci_write_4(device_t dev, struct s } static void -sdhci_pci_read_multi_4(device_t dev, struct sdhci_slot *slot, +sdhci_pci_read_multi_4(device_t dev, struct sdhci_slot *slot __unused, bus_size_t off, uint32_t *data, bus_size_t count) { struct sdhci_pci_softc *sc = device_get_softc(dev); @@ -219,7 +219,7 @@ sdhci_pci_read_multi_4(device_t dev, str } static void -sdhci_pci_write_multi_4(device_t dev, struct sdhci_slot *slot, +sdhci_pci_write_multi_4(device_t dev, struct sdhci_slot *slot __unused, bus_size_t off, uint32_t *data, bus_size_t count) { struct sdhci_pci_softc *sc = device_get_softc(dev); From owner-svn-src-head@freebsd.org Fri Mar 17 23:09:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34643D10EBA for ; Fri, 17 Mar 2017 23:09:36 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (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 0E0751E11 for ; Fri, 17 Mar 2017 23:09:35 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: c40f4e5e-0b66-11e7-bfb5-0d159cd3c324 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.ore.mailhop.org (Halon) with ESMTPSA id c40f4e5e-0b66-11e7-bfb5-0d159cd3c324; Fri, 17 Mar 2017 23:09:26 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v2HN9QMF009903; Fri, 17 Mar 2017 17:09:26 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1489792166.40576.192.camel@freebsd.org> Subject: Re: svn commit: r315466 - in head/sys/dev: mmc sdhci From: Ian Lepore To: Marius Strobl , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Fri, 17 Mar 2017 17:09:26 -0600 In-Reply-To: <201703172257.v2HMvbXp078389@repo.freebsd.org> References: <201703172257.v2HMvbXp078389@repo.freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 17 Mar 2017 23:09:36 -0000 On Fri, 2017-03-17 at 22:57 +0000, Marius Strobl wrote: > Author: marius > Date: Fri Mar 17 22:57:37 2017 > New Revision: 315466 > URL: https://svnweb.freebsd.org/changeset/base/315466 > > Log: >   Again, fixes regarding style(4), to comments, includes and unused >   parameters. > > Modified: >   head/sys/dev/mmc/bridge.h >   head/sys/dev/mmc/mmc.c >   head/sys/dev/mmc/mmcbr_if.m >   head/sys/dev/sdhci/sdhci.c >   head/sys/dev/sdhci/sdhci_acpi.c >   head/sys/dev/sdhci/sdhci_if.m >   head/sys/dev/sdhci/sdhci_pci.c > > Modified: head/sys/dev/mmc/bridge.h > ===================================================================== > ========= > --- head/sys/dev/mmc/bridge.h Fri Mar 17 22:02:02 2017 > (r315465) > +++ head/sys/dev/mmc/bridge.h Fri Mar 17 22:57:37 2017 > (r315466) > @@ -111,7 +111,7 @@ enum mmc_bus_timing { >   >  struct mmc_ios { >   uint32_t clock; /* Speed of the clock in Hz to > move data */ > - enum mmc_vdd vdd; /* Voltage to apply to the > power pins/ */ > + enum mmc_vdd vdd; /* Voltage to apply to the > power pins */ >   enum mmc_bus_mode bus_mode; >   enum mmc_chip_select chip_select; >   enum mmc_bus_width bus_width; > > Modified: head/sys/dev/mmc/mmc.c > ===================================================================== > ========= > --- head/sys/dev/mmc/mmc.c Fri Mar 17 22:02:02 2017 (r3 > 15465) > +++ head/sys/dev/mmc/mmc.c Fri Mar 17 22:57:37 2017 (r3 > 15466) > @@ -792,6 +792,7 @@ mmc_get_bits(uint32_t *bits, int bit_len >   const int i = (bit_len / 32) - (start / 32) - 1; >   const int shift = start & 31; >   uint32_t retval = bits[i] >> shift; > + >   if (size + shift > 32) >   retval |= bits[i - 1] << (32 - shift); >   return (retval & ((1llu << size) - 1)); > @@ -1464,7 +1465,7 @@ mmc_rescan_cards(struct mmc_softc *sc) >   return; >   for (i = 0; i < devcount; i++) { >   ivar = device_get_ivars(devlist[i]); > - if (mmc_select_card(sc, ivar->rca)) { > + if (mmc_select_card(sc, ivar->rca) != MMC_ERR_NONE) > { >   if (bootverbose || mmc_debug) >   device_printf(sc->dev, >       "Card at relative address %d > lost.\n", > > Modified: head/sys/dev/mmc/mmcbr_if.m > ===================================================================== > ========= > --- head/sys/dev/mmc/mmcbr_if.m Fri Mar 17 22:02:02 2017 > (r315465) > +++ head/sys/dev/mmc/mmcbr_if.m Fri Mar 17 22:57:37 2017 > (r315466) > @@ -65,8 +65,9 @@ >  INTERFACE mmcbr; >   >  # > -# Called by the mmcbus to setup the IO pins correctly, the voltage > to use > -# for the card, the type of selects, power modes and bus width. > +# Called by the mmcbus to set up the IO pins correctly, the > common/core > +# supply voltage (VDD/VCC) to use for the device, the clock > frequency, the > +# type of SPI chip select, power mode and bus width. >  # >  METHOD int update_ios { >   device_t brdev; > @@ -76,8 +77,8 @@ METHOD int update_ios { >  # >  # Called by the mmcbus or its children to schedule a mmc > request.  These >  # requests are queued.  Time passes.  The bridge then gets > notification > -# of the status of request, who then notifies the requesting device > via > -# the xfer_done mmcbus method. > +# of the status of the request, who then notifies the requesting > device > +# by calling the completion function supplied as part of the > request. >  # >  METHOD int request { >   device_t brdev; > > Modified: head/sys/dev/sdhci/sdhci.c > ===================================================================== > ========= > --- head/sys/dev/sdhci/sdhci.c Fri Mar 17 22:02:02 2017 > (r315465) > +++ head/sys/dev/sdhci/sdhci.c Fri Mar 17 22:57:37 2017 > (r315466) > @@ -309,9 +309,8 @@ sdhci_set_clock(struct sdhci_slot *slot, >   } >   /* Divider 1:1 is 0x00, 2:1 is 0x01, 256:1 is 0x80 > ... */ >   div >>= 1; > - } > - else { > - /* Version 3.0 divisors are multiples of two up to > 1023*2 */ > + } else { > + /* Version 3.0 divisors are multiples of two up to > 1023 * 2 */ >   if (clock >= clk_base) >   div = 0; >   else { > @@ -1349,7 +1348,7 @@ sdhci_data_irq(struct sdhci_slot *slot,  >   if (intmask & SDHCI_INT_DMA_END) { >   data = slot->curcmd->data; >   > - /* Unload DMA buffer... */ > + /* Unload DMA buffer ... */ All this churn in the driver for meaningless style fixes and __unused markup and so on is bad enough, especially considering that you know people are doing out-of-tree work on this and have to deal with all the  merge conflicts this is causing, but changes to comments that actually change correct grammar and punctuation to incorrect, such as this, just serves to turn annoying into infuriating. -- Ian >   left = data->len - slot->offset; >   if (data->flags & MMC_DATA_READ) { >   bus_dmamap_sync(slot->dmatag, slot->dmamap, > > Modified: head/sys/dev/sdhci/sdhci_acpi.c > ===================================================================== > ========= > --- head/sys/dev/sdhci/sdhci_acpi.c Fri Mar 17 22:02:02 2017 > (r315465) > +++ head/sys/dev/sdhci/sdhci_acpi.c Fri Mar 17 22:57:37 2017 > (r315466) > @@ -87,7 +87,8 @@ static void sdhci_acpi_intr(void *arg); >  static int sdhci_acpi_detach(device_t dev); >   >  static uint8_t > -sdhci_acpi_read_1(device_t dev, struct sdhci_slot *slot, bus_size_t > off) > +sdhci_acpi_read_1(device_t dev, struct sdhci_slot *slot __unused, > +    bus_size_t off) >  { >   struct sdhci_acpi_softc *sc = device_get_softc(dev); >   > @@ -97,8 +98,8 @@ sdhci_acpi_read_1(device_t dev, struct s >  } >   >  static void > -sdhci_acpi_write_1(device_t dev, struct sdhci_slot *slot, bus_size_t > off, > -    uint8_t val) > +sdhci_acpi_write_1(device_t dev, struct sdhci_slot *slot __unused, > +    bus_size_t off, uint8_t val) >  { >   struct sdhci_acpi_softc *sc = device_get_softc(dev); >   > @@ -108,7 +109,8 @@ sdhci_acpi_write_1(device_t dev, struct  >  } >   >  static uint16_t > -sdhci_acpi_read_2(device_t dev, struct sdhci_slot *slot, bus_size_t > off) > +sdhci_acpi_read_2(device_t dev, struct sdhci_slot *slot __unused, > +    bus_size_t off) >  { >   struct sdhci_acpi_softc *sc = device_get_softc(dev); >   > @@ -118,8 +120,8 @@ sdhci_acpi_read_2(device_t dev, struct s >  } >   >  static void > -sdhci_acpi_write_2(device_t dev, struct sdhci_slot *slot, bus_size_t > off, > -    uint16_t val) > +sdhci_acpi_write_2(device_t dev, struct sdhci_slot *slot __unused, > +    bus_size_t off, uint16_t val) >  { >   struct sdhci_acpi_softc *sc = device_get_softc(dev); >   > @@ -129,7 +131,8 @@ sdhci_acpi_write_2(device_t dev, struct  >  } >   >  static uint32_t > -sdhci_acpi_read_4(device_t dev, struct sdhci_slot *slot, bus_size_t > off) > +sdhci_acpi_read_4(device_t dev, struct sdhci_slot *slot __unused, > +    bus_size_t off) >  { >   struct sdhci_acpi_softc *sc = device_get_softc(dev); >   > @@ -139,8 +142,8 @@ sdhci_acpi_read_4(device_t dev, struct s >  } >   >  static void > -sdhci_acpi_write_4(device_t dev, struct sdhci_slot *slot, bus_size_t > off, > -    uint32_t val) > +sdhci_acpi_write_4(device_t dev, struct sdhci_slot *slot __unused, > +    bus_size_t off, uint32_t val) >  { >   struct sdhci_acpi_softc *sc = device_get_softc(dev); >   > @@ -150,7 +153,7 @@ sdhci_acpi_write_4(device_t dev, struct  >  } >   >  static void > -sdhci_acpi_read_multi_4(device_t dev, struct sdhci_slot *slot, > +sdhci_acpi_read_multi_4(device_t dev, struct sdhci_slot *slot > __unused, >      bus_size_t off, uint32_t *data, bus_size_t count) >  { >   struct sdhci_acpi_softc *sc = device_get_softc(dev); > @@ -159,7 +162,7 @@ sdhci_acpi_read_multi_4(device_t dev, st >  } >   >  static void > -sdhci_acpi_write_multi_4(device_t dev, struct sdhci_slot *slot, > +sdhci_acpi_write_multi_4(device_t dev, struct sdhci_slot *slot > __unused, >      bus_size_t off, uint32_t *data, bus_size_t count) >  { >   struct sdhci_acpi_softc *sc = device_get_softc(dev); > > Modified: head/sys/dev/sdhci/sdhci_if.m > ===================================================================== > ========= > --- head/sys/dev/sdhci/sdhci_if.m Fri Mar 17 22:02:02 2017 > (r315465) > +++ head/sys/dev/sdhci/sdhci_if.m Fri Mar 17 22:57:37 2017 > (r315466) > @@ -59,22 +59,13 @@ >  # >   >  #include > -#include > -#include > -#include > +#include >  #include >  #include >   > -#include > - >  #include > -#include >  #include >   > -CODE { > - struct sdhci_slot; > -} > - >  INTERFACE sdhci; >   >  METHOD uint8_t read_1 { > > Modified: head/sys/dev/sdhci/sdhci_pci.c > ===================================================================== > ========= > --- head/sys/dev/sdhci/sdhci_pci.c Fri Mar 17 22:02:02 2017 > (r315465) > +++ head/sys/dev/sdhci/sdhci_pci.c Fri Mar 17 22:57:37 2017 > (r315466) > @@ -147,7 +147,7 @@ SYSCTL_INT(_hw_sdhci, OID_AUTO, enable_m >      0, "Enable MSI interrupts"); >   >  static uint8_t > -sdhci_pci_read_1(device_t dev, struct sdhci_slot *slot, bus_size_t > off) > +sdhci_pci_read_1(device_t dev, struct sdhci_slot *slot __unused, > bus_size_t off) >  { >   struct sdhci_pci_softc *sc = device_get_softc(dev); >   > @@ -157,8 +157,8 @@ sdhci_pci_read_1(device_t dev, struct sd >  } >   >  static void > -sdhci_pci_write_1(device_t dev, struct sdhci_slot *slot, bus_size_t > off, > -    uint8_t val) > +sdhci_pci_write_1(device_t dev, struct sdhci_slot *slot __unused, > +    bus_size_t off, uint8_t val) >  { >   struct sdhci_pci_softc *sc = device_get_softc(dev); >   > @@ -168,7 +168,7 @@ sdhci_pci_write_1(device_t dev, struct s >  } >   >  static uint16_t > -sdhci_pci_read_2(device_t dev, struct sdhci_slot *slot, bus_size_t > off) > +sdhci_pci_read_2(device_t dev, struct sdhci_slot *slot __unused, > bus_size_t off) >  { >   struct sdhci_pci_softc *sc = device_get_softc(dev); >   > @@ -178,8 +178,8 @@ sdhci_pci_read_2(device_t dev, struct sd >  } >   >  static void > -sdhci_pci_write_2(device_t dev, struct sdhci_slot *slot, bus_size_t > off, > -    uint16_t val) > +sdhci_pci_write_2(device_t dev, struct sdhci_slot *slot __unused, > +    bus_size_t off, uint16_t val) >  { >   struct sdhci_pci_softc *sc = device_get_softc(dev); >   > @@ -189,7 +189,7 @@ sdhci_pci_write_2(device_t dev, struct s >  } >   >  static uint32_t > -sdhci_pci_read_4(device_t dev, struct sdhci_slot *slot, bus_size_t > off) > +sdhci_pci_read_4(device_t dev, struct sdhci_slot *slot __unused, > bus_size_t off) >  { >   struct sdhci_pci_softc *sc = device_get_softc(dev); >   > @@ -199,8 +199,8 @@ sdhci_pci_read_4(device_t dev, struct sd >  } >   >  static void > -sdhci_pci_write_4(device_t dev, struct sdhci_slot *slot, bus_size_t > off, > -    uint32_t val) > +sdhci_pci_write_4(device_t dev, struct sdhci_slot *slot __unused, > +    bus_size_t off, uint32_t val) >  { >   struct sdhci_pci_softc *sc = device_get_softc(dev); >   > @@ -210,7 +210,7 @@ sdhci_pci_write_4(device_t dev, struct s >  } >   >  static void > -sdhci_pci_read_multi_4(device_t dev, struct sdhci_slot *slot, > +sdhci_pci_read_multi_4(device_t dev, struct sdhci_slot *slot > __unused, >      bus_size_t off, uint32_t *data, bus_size_t count) >  { >   struct sdhci_pci_softc *sc = device_get_softc(dev); > @@ -219,7 +219,7 @@ sdhci_pci_read_multi_4(device_t dev, str >  } >   >  static void > -sdhci_pci_write_multi_4(device_t dev, struct sdhci_slot *slot, > +sdhci_pci_write_multi_4(device_t dev, struct sdhci_slot *slot > __unused, >      bus_size_t off, uint32_t *data, bus_size_t count) >  { >   struct sdhci_pci_softc *sc = device_get_softc(dev); > From owner-svn-src-head@freebsd.org Fri Mar 17 23:45:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4EDCBD1095B; Fri, 17 Mar 2017 23:45:07 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "alchemy.franken.de", Issuer "alchemy.franken.de" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id EFAF012B1; Fri, 17 Mar 2017 23:45:06 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.15.2/8.15.2/ALCHEMY.FRANKEN.DE) with ESMTPS id v2HNj2O5050753 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 18 Mar 2017 00:45:02 +0100 (CET) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.15.2/8.15.2/Submit) id v2HNj2Vh050752; Sat, 18 Mar 2017 00:45:02 +0100 (CET) (envelope-from marius) Date: Sat, 18 Mar 2017 00:45:02 +0100 From: Marius Strobl To: Ian Lepore Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r315466 - in head/sys/dev: mmc sdhci Message-ID: <20170317234502.GA50718@alchemy.franken.de> References: <201703172257.v2HMvbXp078389@repo.freebsd.org> <1489792166.40576.192.camel@freebsd.org> <20170317233947.GJ39477@alchemy.franken.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170317233947.GJ39477@alchemy.franken.de> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 17 Mar 2017 23:45:07 -0000 On Sat, Mar 18, 2017 at 12:39:47AM +0100, Marius Strobl wrote: > On Fri, Mar 17, 2017 at 05:09:26PM -0600, Ian Lepore wrote: > > On Fri, 2017-03-17 at 22:57 +0000, Marius Strobl wrote: > > > Author: marius > > > Date: Fri Mar 17 22:57:37 2017 > > > New Revision: 315466 > > > URL: https://svnweb.freebsd.org/changeset/base/315466 > > > > > > Log: > > >   Again, fixes regarding style(4), to comments, includes and unused > > >   parameters. > > > > > > Modified: > > >   head/sys/dev/mmc/bridge.h > > >   head/sys/dev/mmc/mmc.c > > >   head/sys/dev/mmc/mmcbr_if.m > > >   head/sys/dev/sdhci/sdhci.c > > >   head/sys/dev/sdhci/sdhci_acpi.c > > >   head/sys/dev/sdhci/sdhci_if.m > > >   head/sys/dev/sdhci/sdhci_pci.c > > > > > > Modified: head/sys/dev/mmc/bridge.h > > > ===================================================================== > > > ========= > > > --- head/sys/dev/mmc/bridge.h Fri Mar 17 22:02:02 2017 > > > (r315465) > > > +++ head/sys/dev/mmc/bridge.h Fri Mar 17 22:57:37 2017 > > > (r315466) > > > @@ -111,7 +111,7 @@ enum mmc_bus_timing { > > >   > > >  struct mmc_ios { > > >   uint32_t clock; /* Speed of the clock in Hz to > > > move data */ > > > - enum mmc_vdd vdd; /* Voltage to apply to the > > > power pins/ */ > > > + enum mmc_vdd vdd; /* Voltage to apply to the > > > power pins */ > > >   enum mmc_bus_mode bus_mode; > > >   enum mmc_chip_select chip_select; > > >   enum mmc_bus_width bus_width; > > > > > > Modified: head/sys/dev/mmc/mmc.c > > > ===================================================================== > > > ========= > > > --- head/sys/dev/mmc/mmc.c Fri Mar 17 22:02:02 2017 (r3 > > > 15465) > > > +++ head/sys/dev/mmc/mmc.c Fri Mar 17 22:57:37 2017 (r3 > > > 15466) > > > @@ -792,6 +792,7 @@ mmc_get_bits(uint32_t *bits, int bit_len > > >   const int i = (bit_len / 32) - (start / 32) - 1; > > >   const int shift = start & 31; > > >   uint32_t retval = bits[i] >> shift; > > > + > > >   if (size + shift > 32) > > >   retval |= bits[i - 1] << (32 - shift); > > >   return (retval & ((1llu << size) - 1)); > > > @@ -1464,7 +1465,7 @@ mmc_rescan_cards(struct mmc_softc *sc) > > >   return; > > >   for (i = 0; i < devcount; i++) { > > >   ivar = device_get_ivars(devlist[i]); > > > - if (mmc_select_card(sc, ivar->rca)) { > > > + if (mmc_select_card(sc, ivar->rca) != MMC_ERR_NONE) > > > { > > >   if (bootverbose || mmc_debug) > > >   device_printf(sc->dev, > > >       "Card at relative address %d > > > lost.\n", > > > > > > Modified: head/sys/dev/mmc/mmcbr_if.m > > > ===================================================================== > > > ========= > > > --- head/sys/dev/mmc/mmcbr_if.m Fri Mar 17 22:02:02 2017 > > > (r315465) > > > +++ head/sys/dev/mmc/mmcbr_if.m Fri Mar 17 22:57:37 2017 > > > (r315466) > > > @@ -65,8 +65,9 @@ > > >  INTERFACE mmcbr; > > >   > > >  # > > > -# Called by the mmcbus to setup the IO pins correctly, the voltage > > > to use > > > -# for the card, the type of selects, power modes and bus width. > > > +# Called by the mmcbus to set up the IO pins correctly, the > > > common/core > > > +# supply voltage (VDD/VCC) to use for the device, the clock > > > frequency, the > > > +# type of SPI chip select, power mode and bus width. > > >  # > > >  METHOD int update_ios { > > >   device_t brdev; > > > @@ -76,8 +77,8 @@ METHOD int update_ios { > > >  # > > >  # Called by the mmcbus or its children to schedule a mmc > > > request.  These > > >  # requests are queued.  Time passes.  The bridge then gets > > > notification > > > -# of the status of request, who then notifies the requesting device > > > via > > > -# the xfer_done mmcbus method. > > > +# of the status of the request, who then notifies the requesting > > > device > > > +# by calling the completion function supplied as part of the > > > request. > > >  # > > >  METHOD int request { > > >   device_t brdev; > > > > > > Modified: head/sys/dev/sdhci/sdhci.c > > > ===================================================================== > > > ========= > > > --- head/sys/dev/sdhci/sdhci.c Fri Mar 17 22:02:02 2017 > > > (r315465) > > > +++ head/sys/dev/sdhci/sdhci.c Fri Mar 17 22:57:37 2017 > > > (r315466) > > > @@ -309,9 +309,8 @@ sdhci_set_clock(struct sdhci_slot *slot, > > >   } > > >   /* Divider 1:1 is 0x00, 2:1 is 0x01, 256:1 is 0x80 > > > ... */ > > >   div >>= 1; > > > - } > > > - else { > > > - /* Version 3.0 divisors are multiples of two up to > > > 1023*2 */ > > > + } else { > > > + /* Version 3.0 divisors are multiples of two up to > > > 1023 * 2 */ > > >   if (clock >= clk_base) > > >   div = 0; > > >   else { > > > @@ -1349,7 +1348,7 @@ sdhci_data_irq(struct sdhci_slot *slot,  > > >   if (intmask & SDHCI_INT_DMA_END) { > > >   data = slot->curcmd->data; > > >   > > > - /* Unload DMA buffer... */ > > > + /* Unload DMA buffer ... */ > > > > All this churn in the driver for meaningless style fixes and __unused > > markup and so on is bad enough, especially considering that you know > > people are doing out-of-tree work on this and have to deal with all the > >  merge conflicts this is causing, but changes to comments that actually > > change correct grammar and punctuation to incorrect, such as this, just > > serves to turn annoying into infuriating. > > > > Hrm, could you please tell me were I changed correct grammar into > incorrect one? In the examples you quoted above I can't spot such > a case but introducing incorrect grammar certainly wasn't the intent. > > As for the out-of-tree work, I still haven't been told what's the branch > that actually is used for MMCCAM; the branch imp@ mentioned last time > was deleted shortly after. As I said before, my best guess, therefore, > is mmccam-refactoring-rebased in kibab's tree, but that one is even still > missing functional changes to sdhci(4) you did. Nevertheless, looking Err, sorry, the claim that kibab's mmccam-refactoring-rebased is missing some of your changes is wrong; diff(1)'ed against the wrong thing. Still, the rest holds. > at that branch, as for sdhci(4) mostly new sdhci_cam_*() functions > have been added but hardly any existing code was touched, so there > should be only a few conflicts, if any at all. And as was determined > before, mmc(4) and mmcsd(4) aren't touched at all by the MMCCAM work. > That said, I'm more than willing to help with resolving merge conflicts > I'm causing, if someone tells me the right tree and branch ... Marius From owner-svn-src-head@freebsd.org Fri Mar 17 23:53:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C583ED10B86; Fri, 17 Mar 2017 23:53:47 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "alchemy.franken.de", Issuer "alchemy.franken.de" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 5BD8317EE; Fri, 17 Mar 2017 23:53:47 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.15.2/8.15.2/ALCHEMY.FRANKEN.DE) with ESMTPS id v2HNdlBJ050690 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 18 Mar 2017 00:39:48 +0100 (CET) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.15.2/8.15.2/Submit) id v2HNdld0050689; Sat, 18 Mar 2017 00:39:47 +0100 (CET) (envelope-from marius) Date: Sat, 18 Mar 2017 00:39:47 +0100 From: Marius Strobl To: Ian Lepore Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r315466 - in head/sys/dev: mmc sdhci Message-ID: <20170317233947.GJ39477@alchemy.franken.de> References: <201703172257.v2HMvbXp078389@repo.freebsd.org> <1489792166.40576.192.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1489792166.40576.192.camel@freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 17 Mar 2017 23:53:47 -0000 On Fri, Mar 17, 2017 at 05:09:26PM -0600, Ian Lepore wrote: > On Fri, 2017-03-17 at 22:57 +0000, Marius Strobl wrote: > > Author: marius > > Date: Fri Mar 17 22:57:37 2017 > > New Revision: 315466 > > URL: https://svnweb.freebsd.org/changeset/base/315466 > > > > Log: > >   Again, fixes regarding style(4), to comments, includes and unused > >   parameters. > > > > Modified: > >   head/sys/dev/mmc/bridge.h > >   head/sys/dev/mmc/mmc.c > >   head/sys/dev/mmc/mmcbr_if.m > >   head/sys/dev/sdhci/sdhci.c > >   head/sys/dev/sdhci/sdhci_acpi.c > >   head/sys/dev/sdhci/sdhci_if.m > >   head/sys/dev/sdhci/sdhci_pci.c > > > > Modified: head/sys/dev/mmc/bridge.h > > ===================================================================== > > ========= > > --- head/sys/dev/mmc/bridge.h Fri Mar 17 22:02:02 2017 > > (r315465) > > +++ head/sys/dev/mmc/bridge.h Fri Mar 17 22:57:37 2017 > > (r315466) > > @@ -111,7 +111,7 @@ enum mmc_bus_timing { > >   > >  struct mmc_ios { > >   uint32_t clock; /* Speed of the clock in Hz to > > move data */ > > - enum mmc_vdd vdd; /* Voltage to apply to the > > power pins/ */ > > + enum mmc_vdd vdd; /* Voltage to apply to the > > power pins */ > >   enum mmc_bus_mode bus_mode; > >   enum mmc_chip_select chip_select; > >   enum mmc_bus_width bus_width; > > > > Modified: head/sys/dev/mmc/mmc.c > > ===================================================================== > > ========= > > --- head/sys/dev/mmc/mmc.c Fri Mar 17 22:02:02 2017 (r3 > > 15465) > > +++ head/sys/dev/mmc/mmc.c Fri Mar 17 22:57:37 2017 (r3 > > 15466) > > @@ -792,6 +792,7 @@ mmc_get_bits(uint32_t *bits, int bit_len > >   const int i = (bit_len / 32) - (start / 32) - 1; > >   const int shift = start & 31; > >   uint32_t retval = bits[i] >> shift; > > + > >   if (size + shift > 32) > >   retval |= bits[i - 1] << (32 - shift); > >   return (retval & ((1llu << size) - 1)); > > @@ -1464,7 +1465,7 @@ mmc_rescan_cards(struct mmc_softc *sc) > >   return; > >   for (i = 0; i < devcount; i++) { > >   ivar = device_get_ivars(devlist[i]); > > - if (mmc_select_card(sc, ivar->rca)) { > > + if (mmc_select_card(sc, ivar->rca) != MMC_ERR_NONE) > > { > >   if (bootverbose || mmc_debug) > >   device_printf(sc->dev, > >       "Card at relative address %d > > lost.\n", > > > > Modified: head/sys/dev/mmc/mmcbr_if.m > > ===================================================================== > > ========= > > --- head/sys/dev/mmc/mmcbr_if.m Fri Mar 17 22:02:02 2017 > > (r315465) > > +++ head/sys/dev/mmc/mmcbr_if.m Fri Mar 17 22:57:37 2017 > > (r315466) > > @@ -65,8 +65,9 @@ > >  INTERFACE mmcbr; > >   > >  # > > -# Called by the mmcbus to setup the IO pins correctly, the voltage > > to use > > -# for the card, the type of selects, power modes and bus width. > > +# Called by the mmcbus to set up the IO pins correctly, the > > common/core > > +# supply voltage (VDD/VCC) to use for the device, the clock > > frequency, the > > +# type of SPI chip select, power mode and bus width. > >  # > >  METHOD int update_ios { > >   device_t brdev; > > @@ -76,8 +77,8 @@ METHOD int update_ios { > >  # > >  # Called by the mmcbus or its children to schedule a mmc > > request.  These > >  # requests are queued.  Time passes.  The bridge then gets > > notification > > -# of the status of request, who then notifies the requesting device > > via > > -# the xfer_done mmcbus method. > > +# of the status of the request, who then notifies the requesting > > device > > +# by calling the completion function supplied as part of the > > request. > >  # > >  METHOD int request { > >   device_t brdev; > > > > Modified: head/sys/dev/sdhci/sdhci.c > > ===================================================================== > > ========= > > --- head/sys/dev/sdhci/sdhci.c Fri Mar 17 22:02:02 2017 > > (r315465) > > +++ head/sys/dev/sdhci/sdhci.c Fri Mar 17 22:57:37 2017 > > (r315466) > > @@ -309,9 +309,8 @@ sdhci_set_clock(struct sdhci_slot *slot, > >   } > >   /* Divider 1:1 is 0x00, 2:1 is 0x01, 256:1 is 0x80 > > ... */ > >   div >>= 1; > > - } > > - else { > > - /* Version 3.0 divisors are multiples of two up to > > 1023*2 */ > > + } else { > > + /* Version 3.0 divisors are multiples of two up to > > 1023 * 2 */ > >   if (clock >= clk_base) > >   div = 0; > >   else { > > @@ -1349,7 +1348,7 @@ sdhci_data_irq(struct sdhci_slot *slot,  > >   if (intmask & SDHCI_INT_DMA_END) { > >   data = slot->curcmd->data; > >   > > - /* Unload DMA buffer... */ > > + /* Unload DMA buffer ... */ > > All this churn in the driver for meaningless style fixes and __unused > markup and so on is bad enough, especially considering that you know > people are doing out-of-tree work on this and have to deal with all the >  merge conflicts this is causing, but changes to comments that actually > change correct grammar and punctuation to incorrect, such as this, just > serves to turn annoying into infuriating. > Hrm, could you please tell me were I changed correct grammar into incorrect one? In the examples you quoted above I can't spot such a case but introducing incorrect grammar certainly wasn't the intent. As for the out-of-tree work, I still haven't been told what's the branch that actually is used for MMCCAM; the branch imp@ mentioned last time was deleted shortly after. As I said before, my best guess, therefore, is mmccam-refactoring-rebased in kibab's tree, but that one is even still missing functional changes to sdhci(4) you did. Nevertheless, looking at that branch, as for sdhci(4) mostly new sdhci_cam_*() functions have been added but hardly any existing code was touched, so there should be only a few conflicts, if any at all. And as was determined before, mmc(4) and mmcsd(4) aren't touched at all by the MMCCAM work. That said, I'm more than willing to help with resolving merge conflicts I'm causing, if someone tells me the right tree and branch ... Marius From owner-svn-src-head@freebsd.org Sat Mar 18 00:51:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC67AD10079; Sat, 18 Mar 2017 00:51:40 +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 mx1.freebsd.org (Postfix) with ESMTPS id 7B13E179A; Sat, 18 Mar 2017 00:51:40 +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 v2I0pdsv028485; Sat, 18 Mar 2017 00:51:39 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2I0pdXi028483; Sat, 18 Mar 2017 00:51:39 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201703180051.v2I0pdXi028483@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 18 Mar 2017 00:51:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315467 - head/lib/libc/string X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 18 Mar 2017 00:51:40 -0000 Author: emaste Date: Sat Mar 18 00:51:39 2017 New Revision: 315467 URL: https://svnweb.freebsd.org/changeset/base/315467 Log: libc: Use musl's O(n) memmem and strstr It is O(n) in the length of the haystack (big) string, and has special cases for short needle (little) strings, of one to four bytes, to avoid excessive overhead. There are a small set of nearly trivial cases where the startup overhead of the musl implementation makes it slightly slower -- for example, a 31 byte needle that matches the beginning of the haystack. It's faster for non-trivial cases, and significantly so for inputs that trigger worst- case behaviour of the previous implementation. As an example, in my tests a 16K needle that matches the end of a 64K haystack is nearly 2000x faster with this implementation. Reviewed by: bapt (earlier), ed (earlier) Obtained from: musl (snapshot at commit c718f9fc) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2601 Modified: head/lib/libc/string/memmem.3 head/lib/libc/string/memmem.c head/lib/libc/string/strstr.c Modified: head/lib/libc/string/memmem.3 ============================================================================== --- head/lib/libc/string/memmem.3 Fri Mar 17 22:57:37 2017 (r315466) +++ head/lib/libc/string/memmem.3 Sat Mar 18 00:51:39 2017 (r315467) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 26, 2015 +.Dd March 17, 2017 .Dt MEMMEM 3 .Os .Sh NAME @@ -77,8 +77,11 @@ The .Fn memmem function first appeared in .Fx 6.0 . -.Sh AUTHORS +It was replaced with an optimized O(n) implementation from the musl libc +project in +.Fx 12.0 . .An Pascal Gloor Aq Mt pascal.gloor@spale.com +provided this man page along with the previous implementation. .Sh BUGS This function was broken in Linux libc up to and including version 5.0.9 and in GNU libc prior to version 2.1. Modified: head/lib/libc/string/memmem.c ============================================================================== --- head/lib/libc/string/memmem.c Fri Mar 17 22:57:37 2017 (r315466) +++ head/lib/libc/string/memmem.c Sat Mar 18 00:51:39 2017 (r315467) @@ -1,65 +1,173 @@ /*- - * Copyright (c) 2005 Pascal Gloor + * Copyright (c) 2005-2014 Rich Felker, et al. * - * 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. The name of the author may not be used to endorse or promote - * products derived from this software without specific prior written - * permission. + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: * - * 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. + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - #include __FBSDID("$FreeBSD$"); #include +#include -/* - * Find the first occurrence of the byte string s in byte string l. - */ +static char *twobyte_memmem(const unsigned char *h, size_t k, const unsigned char *n) +{ + uint16_t nw = n[0]<<8 | n[1], hw = h[0]<<8 | h[1]; + for (h++, k--; k; k--, hw = hw<<8 | *++h) + if (hw == nw) return (char *)h-1; + return 0; +} -void * -memmem(const void *l, size_t l_len, const void *s, size_t s_len) +static char *threebyte_memmem(const unsigned char *h, size_t k, const unsigned char *n) { - register char *cur, *last; - const char *cl = (const char *)l; - const char *cs = (const char *)s; - - /* empty "s" matches the beginning of "l" */ - if (s_len == 0) - return (void *)cl; - - /* "s" must be smaller or equal to "l" */ - if (l_len < s_len) - return NULL; - - /* special case where s_len == 1 */ - if (s_len == 1) - return memchr(l, (int)*cs, l_len); - - /* the last position where its possible to find "s" in "l" */ - last = (char *)cl + l_len - s_len; - - for (cur = (char *)cl; cur <= last; cur++) - if (cur[0] == cs[0] && memcmp(cur, cs, s_len) == 0) - return cur; + uint32_t nw = n[0]<<24 | n[1]<<16 | n[2]<<8; + uint32_t hw = h[0]<<24 | h[1]<<16 | h[2]<<8; + for (h+=2, k-=2; k; k--, hw = (hw|*++h)<<8) + if (hw == nw) return (char *)h-2; + return 0; +} + +static char *fourbyte_memmem(const unsigned char *h, size_t k, const unsigned char *n) +{ + uint32_t nw = n[0]<<24 | n[1]<<16 | n[2]<<8 | n[3]; + uint32_t hw = h[0]<<24 | h[1]<<16 | h[2]<<8 | h[3]; + for (h+=3, k-=3; k; k--, hw = hw<<8 | *++h) + if (hw == nw) return (char *)h-3; + return 0; +} + +#define MAX(a,b) ((a)>(b)?(a):(b)) +#define MIN(a,b) ((a)<(b)?(a):(b)) + +#define BITOP(a,b,op) \ + ((a)[(size_t)(b)/(8*sizeof *(a))] op (size_t)1<<((size_t)(b)%(8*sizeof *(a)))) + +static char *twoway_memmem(const unsigned char *h, const unsigned char *z, const unsigned char *n, size_t l) +{ + size_t i, ip, jp, k, p, ms, p0, mem, mem0; + size_t byteset[32 / sizeof(size_t)] = { 0 }; + size_t shift[256]; + + /* Computing length of needle and fill shift table */ + for (i=0; i n[jp+k]) { + jp += k; + k = 1; + p = jp - ip; + } else { + ip = jp++; + k = p = 1; + } + } + ms = ip; + p0 = p; + + /* And with the opposite comparison */ + ip = -1; jp = 0; k = p = 1; + while (jp+k ms+1) ms = ip; + else p = p0; + + /* Periodic needle? */ + if (memcmp(n, n+p, ms+1)) { + mem0 = 0; + p = MAX(ms, l-ms-1) + 1; + } else mem0 = l-p; + mem = 0; + + /* Search loop */ + for (;;) { + /* If remainder of haystack is shorter than needle, done */ + if (z-h < l) return 0; + + /* Check last byte first; advance by shift on mismatch */ + if (BITOP(byteset, h[l-1], &)) { + k = l-shift[h[l-1]]; + if (k) { + if (mem0 && mem && k < p) k = l-p; + h += k; + mem = 0; + continue; + } + } else { + h += l; + mem = 0; + continue; + } + + /* Compare right half */ + for (k=MAX(ms+1,mem); kmem && n[k-1] == h[k-1]; k--); + if (k <= mem) return (char *)h; + h += p; + mem = mem0; + } +} + +void *memmem(const void *h0, size_t k, const void *n0, size_t l) +{ + const unsigned char *h = h0, *n = n0; + + /* Return immediately on empty needle */ + if (!l) return (void *)h; + + /* Return immediately when needle is longer than haystack */ + if (k __FBSDID("$FreeBSD$"); #include +#include -/* - * Find the first occurrence of find in s. - */ -char * -strstr(const char *s, const char *find) +static char *twobyte_strstr(const unsigned char *h, const unsigned char *n) +{ + uint16_t nw = n[0]<<8 | n[1], hw = h[0]<<8 | h[1]; + for (h++; *h && hw != nw; hw = hw<<8 | *++h); + return *h ? (char *)h-1 : 0; +} + +static char *threebyte_strstr(const unsigned char *h, const unsigned char *n) +{ + uint32_t nw = n[0]<<24 | n[1]<<16 | n[2]<<8; + uint32_t hw = h[0]<<24 | h[1]<<16 | h[2]<<8; + for (h+=2; *h && hw != nw; hw = (hw|*++h)<<8); + return *h ? (char *)h-2 : 0; +} + +static char *fourbyte_strstr(const unsigned char *h, const unsigned char *n) { - char c, sc; - size_t len; + uint32_t nw = n[0]<<24 | n[1]<<16 | n[2]<<8 | n[3]; + uint32_t hw = h[0]<<24 | h[1]<<16 | h[2]<<8 | h[3]; + for (h+=3; *h && hw != nw; hw = hw<<8 | *++h); + return *h ? (char *)h-3 : 0; +} + +#define MAX(a,b) ((a)>(b)?(a):(b)) +#define MIN(a,b) ((a)<(b)?(a):(b)) + +#define BITOP(a,b,op) \ + ((a)[(size_t)(b)/(8*sizeof *(a))] op (size_t)1<<((size_t)(b)%(8*sizeof *(a)))) + +static char *twoway_strstr(const unsigned char *h, const unsigned char *n) +{ + const unsigned char *z; + size_t l, ip, jp, k, p, ms, p0, mem, mem0; + size_t byteset[32 / sizeof(size_t)] = { 0 }; + size_t shift[256]; + + /* Computing length of needle and fill shift table */ + for (l=0; n[l] && h[l]; l++) + BITOP(byteset, n[l], |=), shift[n[l]] = l+1; + if (n[l]) return 0; /* hit the end of h */ - if ((c = *find++) != '\0') { - len = strlen(find); - do { - do { - if ((sc = *s++) == '\0') - return (NULL); - } while (sc != c); - } while (strncmp(s, find, len) != 0); - s--; + /* Compute maximal suffix */ + ip = -1; jp = 0; k = p = 1; + while (jp+k n[jp+k]) { + jp += k; + k = 1; + p = jp - ip; + } else { + ip = jp++; + k = p = 1; + } } - return ((char *)s); + ms = ip; + p0 = p; + + /* And with the opposite comparison */ + ip = -1; jp = 0; k = p = 1; + while (jp+k ms+1) ms = ip; + else p = p0; + + /* Periodic needle? */ + if (memcmp(n, n+p, ms+1)) { + mem0 = 0; + p = MAX(ms, l-ms-1) + 1; + } else mem0 = l-p; + mem = 0; + + /* Initialize incremental end-of-haystack pointer */ + z = h; + + /* Search loop */ + for (;;) { + /* Update incremental end-of-haystack pointer */ + if (z-h < l) { + /* Fast estimate for MIN(l,63) */ + size_t grow = l | 63; + const unsigned char *z2 = memchr(z, 0, grow); + if (z2) { + z = z2; + if (z-h < l) return 0; + } else z += grow; + } + + /* Check last byte first; advance by shift on mismatch */ + if (BITOP(byteset, h[l-1], &)) { + k = l-shift[h[l-1]]; + //printf("adv by %zu (on %c) at [%s] (%zu;l=%zu)\n", k, h[l-1], h, shift[h[l-1]], l); + if (k) { + if (mem0 && mem && k < p) k = l-p; + h += k; + mem = 0; + continue; + } + } else { + h += l; + mem = 0; + continue; + } + + /* Compare right half */ + for (k=MAX(ms+1,mem); n[k] && n[k] == h[k]; k++); + if (n[k]) { + h += k-ms; + mem = 0; + continue; + } + /* Compare left half */ + for (k=ms+1; k>mem && n[k-1] == h[k-1]; k--); + if (k <= mem) return (char *)h; + h += p; + mem = mem0; + } +} + +char *strstr(const char *h, const char *n) +{ + /* Return immediately on empty needle */ + if (!n[0]) return (char *)h; + + /* Use faster algorithms for short needles */ + h = strchr(h, *n); + if (!h || !n[1]) return (char *)h; + if (!h[1]) return 0; + if (!n[2]) return twobyte_strstr((void *)h, (void *)n); + if (!h[2]) return 0; + if (!n[3]) return threebyte_strstr((void *)h, (void *)n); + if (!h[3]) return 0; + if (!n[4]) return fourbyte_strstr((void *)h, (void *)n); + + return twoway_strstr((void *)h, (void *)n); } From owner-svn-src-head@freebsd.org Sat Mar 18 00:53:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC7C9D1011B; Sat, 18 Mar 2017 00:53:25 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A0E4819E8; Sat, 18 Mar 2017 00:53:25 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2I0rOhF030730; Sat, 18 Mar 2017 00:53:24 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2I0rOCt030727; Sat, 18 Mar 2017 00:53:24 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201703180053.v2I0rOCt030727@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 18 Mar 2017 00:53:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315468 - head/lib/libc/string X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 18 Mar 2017 00:53:26 -0000 Author: emaste Date: Sat Mar 18 00:53:24 2017 New Revision: 315468 URL: https://svnweb.freebsd.org/changeset/base/315468 Log: libc: add reference to two-way algorithm and bad shift table in memmem/strstr Requested by: ed Modified: head/lib/libc/string/memmem.c head/lib/libc/string/strstr.c Modified: head/lib/libc/string/memmem.c ============================================================================== --- head/lib/libc/string/memmem.c Sat Mar 18 00:51:39 2017 (r315467) +++ head/lib/libc/string/memmem.c Sat Mar 18 00:53:24 2017 (r315468) @@ -58,6 +58,14 @@ static char *fourbyte_memmem(const unsig #define BITOP(a,b,op) \ ((a)[(size_t)(b)/(8*sizeof *(a))] op (size_t)1<<((size_t)(b)%(8*sizeof *(a)))) +/* + * Two Way string search algorithm, with a bad shift table applied to the last + * byte of the window. A bit array marks which entries in the shift table are + * initialized to avoid fully initializing a 1kb/2kb table. + * + * Reference: CROCHEMORE M., PERRIN D., 1991, Two-way string-matching, + * Journal of the ACM 38(3):651-675 + */ static char *twoway_memmem(const unsigned char *h, const unsigned char *z, const unsigned char *n, size_t l) { size_t i, ip, jp, k, p, ms, p0, mem, mem0; Modified: head/lib/libc/string/strstr.c ============================================================================== --- head/lib/libc/string/strstr.c Sat Mar 18 00:51:39 2017 (r315467) +++ head/lib/libc/string/strstr.c Sat Mar 18 00:53:24 2017 (r315468) @@ -55,6 +55,14 @@ static char *fourbyte_strstr(const unsig #define BITOP(a,b,op) \ ((a)[(size_t)(b)/(8*sizeof *(a))] op (size_t)1<<((size_t)(b)%(8*sizeof *(a)))) +/* + * Two Way string search algorithm, with a bad shift table applied to the last + * byte of the window. A bit array marks which entries in the shift table are + * initialized to avoid fully initializing a 1kb/2kb table. + * + * Reference: CROCHEMORE M., PERRIN D., 1991, Two-way string-matching, + * Journal of the ACM 38(3):651-675 + */ static char *twoway_strstr(const unsigned char *h, const unsigned char *n) { const unsigned char *z; From owner-svn-src-head@freebsd.org Sat Mar 18 01:37:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D0F2AD11BC3; Sat, 18 Mar 2017 01:37:21 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E2861A2A; Sat, 18 Mar 2017 01:37:21 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2I1bKuB051372; Sat, 18 Mar 2017 01:37:20 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2I1bK4R051371; Sat, 18 Mar 2017 01:37:20 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201703180137.v2I1bK4R051371@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sat, 18 Mar 2017 01:37:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315469 - head/sys/netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 18 Mar 2017 01:37:21 -0000 Author: kp Date: Sat Mar 18 01:37:20 2017 New Revision: 315469 URL: https://svnweb.freebsd.org/changeset/base/315469 Log: pf: Fix memory leak on vnet shutdown or unload Rules are unlinked in shutdown_pf(), so we must call pf_unload_vnet_purge(), which frees unlinked rules, after that, not before. Reviewed by: eri, bz Differential Revision: https://reviews.freebsd.org/D10040 Modified: head/sys/netpfil/pf/pf_ioctl.c Modified: head/sys/netpfil/pf/pf_ioctl.c ============================================================================== --- head/sys/netpfil/pf/pf_ioctl.c Sat Mar 18 00:53:24 2017 (r315468) +++ head/sys/netpfil/pf/pf_ioctl.c Sat Mar 18 01:37:20 2017 (r315469) @@ -3766,12 +3766,12 @@ pf_unload_vnet(void) return; } - pf_unload_vnet_purge(); - PF_RULES_WLOCK(); shutdown_pf(); PF_RULES_WUNLOCK(); + pf_unload_vnet_purge(); + pf_normalize_cleanup(); PF_RULES_WLOCK(); pfi_cleanup_vnet(); From owner-svn-src-head@freebsd.org Sat Mar 18 07:01:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53EEBD11F96; Sat, 18 Mar 2017 07:01:20 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 218E01534; Sat, 18 Mar 2017 07:01:20 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2I71JSg086313; Sat, 18 Mar 2017 07:01:19 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2I71Jgc086312; Sat, 18 Mar 2017 07:01:19 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201703180701.v2I71Jgc086312@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Sat, 18 Mar 2017 07:01:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315477 - head/sys/ddb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 18 Mar 2017 07:01:20 -0000 Author: bde Date: Sat Mar 18 07:01:18 2017 New Revision: 315477 URL: https://svnweb.freebsd.org/changeset/base/315477 Log: Fix right shifts on arches with db_expr_t larger than u_int (LP64 arches in practice). db_expr_t is a signed type, but right shifts are fudged to evaluate them in an unsigned type, and the unsigned type was broken by hard- coding it as 'unsigned', so casting to it lost the top bits on arches with db_expr_t larger than u_int. The unsigned type with the same size as db_expr_t is not declared; assume that db_addr_t gives it. Fixing this properly is less important than using the correct type for db_expr_t (originally always long for C90, but always intmax_t since C99). Modified: head/sys/ddb/db_expr.c Modified: head/sys/ddb/db_expr.c ============================================================================== --- head/sys/ddb/db_expr.c Sat Mar 18 06:05:54 2017 (r315476) +++ head/sys/ddb/db_expr.c Sat Mar 18 07:01:18 2017 (r315477) @@ -261,7 +261,7 @@ db_shift_expr(db_expr_t *valuep) lhs <<= rhs; else { /* Shift right is unsigned */ - lhs = (unsigned) lhs >> rhs; + lhs = (db_addr_t)lhs >> rhs; } t = db_read_token(); } From owner-svn-src-head@freebsd.org Sat Mar 18 10:34:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B11EBD0F2A0; Sat, 18 Mar 2017 10:34:30 +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 mx1.freebsd.org (Postfix) with ESMTPS id 71E751D6E; Sat, 18 Mar 2017 10:34:30 +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 v2IAYT0r074245; Sat, 18 Mar 2017 10:34:29 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2IAYTU0074243; Sat, 18 Mar 2017 10:34:29 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703181034.v2IAYTU0074243@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 18 Mar 2017 10:34:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315478 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 18 Mar 2017 10:34:30 -0000 Author: mav Date: Sat Mar 18 10:34:29 2017 New Revision: 315478 URL: https://svnweb.freebsd.org/changeset/base/315478 Log: Do some notify acks cleanup. ISPASYNC_TARGET_NOTIFY_ACK makes no sense without argument. MFC after: 2 weeks Modified: head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_target.c Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Sat Mar 18 07:01:18 2017 (r315477) +++ head/sys/dev/isp/isp_freebsd.c Sat Mar 18 10:34:29 2017 (r315478) @@ -2701,7 +2701,7 @@ isp_handle_platform_target_tmf(ispsoftc_ xpt_done((union ccb *)inot); return; bad: - if (notify->nt_need_ack && notify->nt_lreserved) { + if (notify->nt_need_ack) { if (((isphdr_t *)notify->nt_lreserved)->rqs_entry_type == RQSTYPE_ABTS_RCVD) { if (isp_acknak_abts(isp, notify->nt_lreserved, ENOMEM)) { isp_prt(isp, ISP_LOGWARN, "you lose- unable to send an ACKNAK"); @@ -3215,7 +3215,10 @@ isp_abort_inot(ispsoftc_t *isp, union cc /* Search for the INOT among running. */ ntp = isp_find_ntpd(isp, XS_CHANNEL(accb), accb->cin1.tag_id, accb->cin1.seq_id); if (ntp != NULL) { - isp_async(isp, ISPASYNC_TARGET_NOTIFY_ACK, ntp->data); + if (ntp->nt.nt_need_ack) { + isp_async(isp, ISPASYNC_TARGET_NOTIFY_ACK, + ntp->nt.nt_lreserved); + } isp_put_ntpd(isp, XS_CHANNEL(accb), ntp); ccb->ccb_h.status = CAM_REQ_CMP; } else { @@ -4143,12 +4146,8 @@ changed: isp_tna_t *tp = malloc(sizeof (*tp), M_DEVBUF, M_NOWAIT); if (tp) { tp->isp = isp; - if (inot) { - memcpy(tp->data, inot, sizeof (tp->data)); - tp->not = tp->data; - } else { - tp->not = NULL; - } + memcpy(tp->data, inot, sizeof (tp->data)); + tp->not = tp->data; callout_init_mtx(&tp->timer, &isp->isp_lock, 0); callout_reset(&tp->timer, 5, isp_refire_notify_ack, tp); Modified: head/sys/dev/isp/isp_target.c ============================================================================== --- head/sys/dev/isp/isp_target.c Sat Mar 18 07:01:18 2017 (r315477) +++ head/sys/dev/isp/isp_target.c Sat Mar 18 10:34:29 2017 (r315478) @@ -689,9 +689,6 @@ isp_target_async(ispsoftc_t *isp, int bu } default: isp_prt(isp, ISP_LOGERR, "%s: unknown event 0x%x", __func__, event); - if (isp->isp_state == ISP_RUNSTATE) { - isp_async(isp, ISPASYNC_TARGET_NOTIFY_ACK, NULL); - } break; } } @@ -838,7 +835,7 @@ isp_notify_ack(ispsoftc_t *isp, void *ar /* * This is in case a Task Management Function ends up here. */ - if (IS_24XX(isp) && arg != NULL && (((isphdr_t *)arg)->rqs_entry_type == RQSTYPE_ATIO)) { + if (IS_24XX(isp) && ((isphdr_t *)arg)->rqs_entry_type == RQSTYPE_ATIO) { at7_entry_t *aep = arg; return (isp_endcmd(isp, aep, NIL_HANDLE, 0, 0, 0)); } @@ -852,70 +849,68 @@ isp_notify_ack(ispsoftc_t *isp, void *ar ISP_MEMZERO(storage, QENTRY_LEN); if (IS_24XX(isp)) { + in_fcentry_24xx_t *in = arg; na_fcentry_24xx_t *na = (na_fcentry_24xx_t *) storage; + na->na_header.rqs_entry_type = RQSTYPE_NOTIFY_ACK; na->na_header.rqs_entry_count = 1; - if (arg) { - in_fcentry_24xx_t *in = arg; - na->na_nphdl = in->in_nphdl; - na->na_flags = in->in_flags; - na->na_status = in->in_status; - na->na_status_subcode = in->in_status_subcode; - na->na_fwhandle = in->in_fwhandle; - na->na_rxid = in->in_rxid; - na->na_oxid = in->in_oxid; - na->na_vpidx = in->in_vpidx; - if (in->in_status == IN24XX_SRR_RCVD) { - na->na_srr_rxid = in->in_srr_rxid; - na->na_srr_reloff_hi = in->in_srr_reloff_hi; - na->na_srr_reloff_lo = in->in_srr_reloff_lo; - na->na_srr_iu = in->in_srr_iu; - /* - * Whether we're accepting the SRR or rejecting - * it is determined by looking at the in_reserved - * field in the original notify structure. - */ - if (in->in_reserved) { - na->na_srr_flags = 1; - na->na_srr_reject_vunique = 0; - na->na_srr_reject_code = 9; /* unable to perform this command at this time */ - na->na_srr_reject_explanation = 0x2a; /* unable to supply the requested data */ - } + na->na_nphdl = in->in_nphdl; + na->na_flags = in->in_flags; + na->na_status = in->in_status; + na->na_status_subcode = in->in_status_subcode; + na->na_fwhandle = in->in_fwhandle; + na->na_rxid = in->in_rxid; + na->na_oxid = in->in_oxid; + na->na_vpidx = in->in_vpidx; + if (in->in_status == IN24XX_SRR_RCVD) { + na->na_srr_rxid = in->in_srr_rxid; + na->na_srr_reloff_hi = in->in_srr_reloff_hi; + na->na_srr_reloff_lo = in->in_srr_reloff_lo; + na->na_srr_iu = in->in_srr_iu; + /* + * Whether we're accepting the SRR or rejecting + * it is determined by looking at the in_reserved + * field in the original notify structure. + */ + if (in->in_reserved) { + na->na_srr_flags = 1; + na->na_srr_reject_vunique = 0; + /* Unable to perform this command at this time. */ + na->na_srr_reject_code = 9; + /* Unable to supply the requested data. */ + na->na_srr_reject_explanation = 0x2a; } } isp_put_notify_24xx_ack(isp, na, (na_fcentry_24xx_t *)outp); } else { + in_fcentry_t *in = arg; na_fcentry_t *na = (na_fcentry_t *) storage; - int iid = 0; + int iid; - if (arg) { - in_fcentry_t *inp = arg; - ISP_MEMCPY(storage, arg, sizeof (isphdr_t)); - if (ISP_CAP_2KLOGIN(isp)) { - ((na_fcentry_e_t *)na)->na_iid = ((in_fcentry_e_t *)inp)->in_iid; - iid = ((na_fcentry_e_t *)na)->na_iid; - } else { - na->na_iid = inp->in_iid; - iid = na->na_iid; - } - na->na_task_flags = inp->in_task_flags & TASK_FLAGS_RESERVED_MASK; - na->na_seqid = inp->in_seqid; - na->na_status = inp->in_status; - na->na_flags = NAFC_RCOUNT; - if (inp->in_status == IN_RESET) { - na->na_flags = NAFC_RST_CLRD; /* We do not modify resource counts for LIP resets */ - } - if (inp->in_status == IN_MSG_RECEIVED) { - na->na_flags |= NAFC_TVALID; - na->na_response = 0; /* XXX SUCCEEDED XXX */ - } + ISP_MEMCPY(storage, arg, sizeof (isphdr_t)); + if (ISP_CAP_2KLOGIN(isp)) { + iid = ((in_fcentry_e_t *)in)->in_iid; + ((na_fcentry_e_t *)na)->na_iid = iid; } else { + iid = in->in_iid; + na->na_iid = iid; + } + na->na_task_flags = in->in_task_flags & TASK_FLAGS_RESERVED_MASK; + na->na_seqid = in->in_seqid; + na->na_status = in->in_status; + na->na_flags = NAFC_RCOUNT; + /* We do not modify resource counts for LIP resets */ + if (in->in_status == IN_RESET) na->na_flags = NAFC_RST_CLRD; + if (in->in_status == IN_MSG_RECEIVED) { + na->na_flags |= NAFC_TVALID; + na->na_response = 0; /* XXX SUCCEEDED XXX */ } na->na_header.rqs_entry_type = RQSTYPE_NOTIFY_ACK; na->na_header.rqs_entry_count = 1; if (ISP_CAP_2KLOGIN(isp)) { - isp_put_notify_ack_fc_e(isp, (na_fcentry_e_t *) na, (na_fcentry_e_t *)outp); + isp_put_notify_ack_fc_e(isp, (na_fcentry_e_t *)na, + (na_fcentry_e_t *)outp); } else { isp_put_notify_ack_fc(isp, na, (na_fcentry_t *)outp); } @@ -1415,27 +1410,28 @@ isp_handle_24xx_inotify(ispsoftc_t *isp, hichan = chan + 1; } isp_prt(isp, ISP_LOGTDEBUG1, "%s: Immediate Notify Channels %d..%d status=0x%x seqid=0x%x", __func__, lochan, hichan-1, inot_24xx->in_status, inot_24xx->in_rxid); - for (chan = lochan; chan < hichan; chan++) { - if (FCPARAM(isp, chan)->role == ISP_ROLE_NONE) - continue; - switch (inot_24xx->in_status) { - case IN24XX_LIP_RESET: - case IN24XX_LINK_RESET: - case IN24XX_PORT_LOGOUT: - case IN24XX_PORT_CHANGED: - case IN24XX_LINK_FAILED: - case IN24XX_SRR_RCVD: - case IN24XX_ELS_RCVD: - inot_24xx->in_reserved = 0; /* clear this for later usage */ + switch (inot_24xx->in_status) { + case IN24XX_LIP_RESET: + case IN24XX_LINK_RESET: + case IN24XX_PORT_LOGOUT: + case IN24XX_PORT_CHANGED: + case IN24XX_LINK_FAILED: + case IN24XX_SRR_RCVD: + case IN24XX_ELS_RCVD: + for (chan = lochan; chan < hichan; chan++) { + if (FCPARAM(isp, chan)->role == ISP_ROLE_NONE) + continue; + inot_24xx->in_reserved = 0; /* clear this for later usage */ inot_24xx->in_vpidx = chan; isp_async(isp, ISPASYNC_TARGET_ACTION, inot_24xx); - break; - default: - isp_prt(isp, ISP_LOGINFO, "%s: unhandled status (0x%x) for chan %d", __func__, inot_24xx->in_status, chan); - isp_async(isp, ISPASYNC_TARGET_NOTIFY_ACK, inot_24xx); - break; } + inot_24xx->in_vpidx = ochan; + break; + default: + isp_prt(isp, ISP_LOGINFO, "%s: unhandled status (0x%x) for chan %d", + __func__, inot_24xx->in_status, chan); + isp_async(isp, ISPASYNC_TARGET_NOTIFY_ACK, inot_24xx); + break; } - inot_24xx->in_vpidx = ochan; } #endif From owner-svn-src-head@freebsd.org Sat Mar 18 11:13:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 51611D10487; Sat, 18 Mar 2017 11:13:56 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 2BC1711F5; Sat, 18 Mar 2017 11:13:56 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2IBDtdW090794; Sat, 18 Mar 2017 11:13:55 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2IBDs2T090790; Sat, 18 Mar 2017 11:13:54 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201703181113.v2IBDs2T090790@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Sat, 18 Mar 2017 11:13:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315480 - in head/sys: dev/syscons dev/vt kern teken X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 18 Mar 2017 11:13:56 -0000 Author: bde Date: Sat Mar 18 11:13:54 2017 New Revision: 315480 URL: https://svnweb.freebsd.org/changeset/base/315480 Log: Fix bright colors for syscons, and make them work for the first time for vt. Restore syscons' rendering of background (bg) brightness as foreground (fg) blinking and vice versa, and add rendering of blinking as background brightness to vt. Bright/saturated is conflated with light/white in the implementation and in this description. Bright colors were broken in all cases, but appeared to work in the only case shown by "vidcontrol show". A boldness hack was applied only in 1 layering-violation place (for some syscons sequences) where it made some cases seem to work but was undone by clearing bold using ANSI sequences, and more seriously was not undone when setting ANSI/xterm dark colors so left them bright. Move this hack to drivers. The boldness hack is only for fg brightness. Restore/add a similar hack for bg brightness rendered as fg blinking and vice versa. This works even better for vt, since vt changes the default text mode to give the more useful bg brightness instead of fg blinking. The brightness bit in colors was unnecessarily removed by the boldness hack. In other cases, it was lost later by teken_256to8(). Use teken_256to16() to not lose it. teken_256to8() was intended to be used for bg colors to allow finer or bg-specific control for the more difficult reduction to 8; however, since 16 bg colors actually work on VGA except in syscons text mode and the conversion isn't subtle enough to significantly in that mode, teken_256to8() is not used now. There are still bugs, especially in vidcontrol, if bright/blinking background colors are set. Restore XOR logic for bold/bright fg in syscons (don't change OR logic for vt). Remove broken ifdef on FG_UNDERLINE and its wrong or missing bit and restore the correct hard-coded bit. FG_UNDERLINE is only for mono mode which is not really supported. Restore XOR logic for blinking/bright bg in syscons (in vt, add OR logic and render as bright bg). Remove related broken ifdef on BG_BLINKING and its missing bit and restore the correct hard-coded bit. The same bit means blinking or bright bg depending on the mode, and we want to ignore the difference everywhere. Simplify conversions of attributes in syscons. Don't pretend to support bold fonts. Don't support unusual encodings of brightness. It is as good as possible to map 16 VGA colors to 16 xterm-16 colors. E.g., VGA brown -> xterm-16 Olive will be converted back to VGA brown, so we don't need to convert to xterm-256 Brown. Teken cons25 compatibility code already does the same, and duplicates some small tables. This is mostly for the sc -> te direction. The other direction uses teken_256to16() which is too generic. Modified: head/sys/dev/syscons/scterm-teken.c head/sys/dev/vt/vt_core.c head/sys/kern/subr_terminal.c head/sys/teken/teken_subr_compat.h Modified: head/sys/dev/syscons/scterm-teken.c ============================================================================== --- head/sys/dev/syscons/scterm-teken.c Sat Mar 18 10:48:37 2017 (r315479) +++ head/sys/dev/syscons/scterm-teken.c Sat Mar 18 11:13:54 2017 (r315480) @@ -315,88 +315,57 @@ scteken_nop(void) * libteken routines. */ -static const unsigned char fgcolors_normal[TC_NCOLORS] = { - FG_BLACK, FG_RED, FG_GREEN, FG_BROWN, - FG_BLUE, FG_MAGENTA, FG_CYAN, FG_LIGHTGREY, +static const teken_color_t sc_to_te_color[] = { + TC_BLACK, TC_BLUE, TC_GREEN, TC_CYAN, + TC_RED, TC_MAGENTA, TC_BROWN, TC_WHITE, }; -static const unsigned char fgcolors_bold[TC_NCOLORS] = { - FG_DARKGREY, FG_LIGHTRED, FG_LIGHTGREEN, FG_YELLOW, - FG_LIGHTBLUE, FG_LIGHTMAGENTA, FG_LIGHTCYAN, FG_WHITE, -}; - -static const unsigned char bgcolors[TC_NCOLORS] = { - BG_BLACK, BG_RED, BG_GREEN, BG_BROWN, - BG_BLUE, BG_MAGENTA, BG_CYAN, BG_LIGHTGREY, +static const unsigned char te_to_sc_color[] = { + FG_BLACK, FG_RED, FG_GREEN, FG_BROWN, + FG_BLUE, FG_MAGENTA, FG_CYAN, FG_LIGHTGREY, }; static void scteken_sc_to_te_attr(unsigned char color, teken_attr_t *a) { - teken_color_t fg, bg; /* - * XXX: Reverse conversion of syscons to teken attributes. Not - * realiable. Maybe we should turn it into a 1:1 mapping one of - * these days? + * Conversions of attrs are not reversible. Since sc attrs are + * pure colors in the simplest mode (16-color graphics) and the + * API is too deficient to tell us the mode, always convert to + * pure colors. The conversion is essentially the identity except + * for reordering the non-brightness bits in the 2 color numbers. */ - a->ta_format = 0; - a->ta_fgcolor = TC_WHITE; - a->ta_bgcolor = TC_BLACK; - -#ifdef FG_BLINK - if (color & FG_BLINK) { - a->ta_format |= TF_BLINK; - color &= ~FG_BLINK; - } -#endif /* FG_BLINK */ - - for (fg = 0; fg < TC_NCOLORS; fg++) { - for (bg = 0; bg < TC_NCOLORS; bg++) { - if ((fgcolors_normal[fg] | bgcolors[bg]) == color) { - a->ta_fgcolor = fg; - a->ta_bgcolor = bg; - return; - } - - if ((fgcolors_bold[fg] | bgcolors[bg]) == color) { - a->ta_fgcolor = fg; - a->ta_bgcolor = bg; - a->ta_format |= TF_BOLD; - return; - } - } - } + a->ta_fgcolor = sc_to_te_color[color & 7] | (color & 8); + a->ta_bgcolor = sc_to_te_color[(color >> 4) & 7] | ((color >> 4) & 8); } static int scteken_te_to_sc_attr(const teken_attr_t *a) { - int attr = 0; + int attr; teken_color_t fg, bg; if (a->ta_format & TF_REVERSE) { - fg = teken_256to8(a->ta_bgcolor); - bg = teken_256to8(a->ta_fgcolor); + fg = a->ta_bgcolor; + bg = a->ta_fgcolor; } else { - fg = teken_256to8(a->ta_fgcolor); - bg = teken_256to8(a->ta_bgcolor); + fg = a->ta_fgcolor; + bg = a->ta_bgcolor; } - if (a->ta_format & TF_BOLD) - attr |= fgcolors_bold[fg]; - else - attr |= fgcolors_normal[fg]; - attr |= bgcolors[bg]; - -#ifdef FG_UNDERLINE - if (a->ta_format & TF_UNDERLINE) - attr |= FG_UNDERLINE; -#endif /* FG_UNDERLINE */ -#ifdef FG_BLINK + if (fg >= 16) + fg = teken_256to16(fg); + if (bg >= 16) + bg = teken_256to16(bg); + attr = te_to_sc_color[fg & 7] | (fg & 8) | + ((te_to_sc_color[bg & 7] | (bg & 8)) << 4); + + /* XXX: underline mapping for Hercules adapter can be better. */ + if (a->ta_format & (TF_BOLD | TF_UNDERLINE)) + attr ^= 8; if (a->ta_format & TF_BLINK) - attr |= FG_BLINK; -#endif /* FG_BLINK */ + attr ^= 0x80; return (attr); } Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Sat Mar 18 10:48:37 2017 (r315479) +++ head/sys/dev/vt/vt_core.c Sat Mar 18 11:13:54 2017 (r315480) @@ -1075,6 +1075,8 @@ vt_determine_colors(term_char_t c, int c if (TCHAR_FORMAT(c) & TF_BOLD) *fg = TCOLOR_LIGHT(*fg); *bg = TCHAR_BGCOLOR(c); + if (TCHAR_FORMAT(c) & TF_BLINK) + *bg = TCOLOR_LIGHT(*bg); if (TCHAR_FORMAT(c) & TF_REVERSE) invert ^= 1; Modified: head/sys/kern/subr_terminal.c ============================================================================== --- head/sys/kern/subr_terminal.c Sat Mar 18 10:48:37 2017 (r315479) +++ head/sys/kern/subr_terminal.c Sat Mar 18 11:13:54 2017 (r315480) @@ -130,9 +130,25 @@ static const teken_attr_t default_messag .ta_format = TCHAR_FORMAT(TERMINAL_NORM_ATTR) }; +/* Fudge fg brightness as TF_BOLD (shifted). */ +#define TCOLOR_FG_FUDGED(color) __extension__ ({ \ + teken_color_t _c; \ + \ + _c = (color); \ + TCOLOR_FG(_c & 7) | ((_c & 8) << 18); \ +}) + +/* Fudge bg brightness as TF_BLINK (shifted). */ +#define TCOLOR_BG_FUDGED(color) __extension__ ({ \ + teken_color_t _c; \ + \ + _c = (color); \ + TCOLOR_BG(_c & 7) | ((_c & 8) << 20); \ +}) + #define TCHAR_CREATE(c, a) ((c) | TFORMAT((a)->ta_format) | \ - TCOLOR_FG(teken_256to8((a)->ta_fgcolor)) | \ - TCOLOR_BG(teken_256to8((a)->ta_bgcolor))) + TCOLOR_FG_FUDGED(teken_256to16((a)->ta_fgcolor)) | \ + TCOLOR_BG_FUDGED(teken_256to16((a)->ta_bgcolor))) static void terminal_init(struct terminal *tm) Modified: head/sys/teken/teken_subr_compat.h ============================================================================== --- head/sys/teken/teken_subr_compat.h Sat Mar 18 10:48:37 2017 (r315479) +++ head/sys/teken/teken_subr_compat.h Sat Mar 18 11:13:54 2017 (r315480) @@ -40,23 +40,16 @@ static void teken_subr_cons25_set_adapter_background(teken_t *t, unsigned int c) { - t->t_defattr.ta_bgcolor = cons25_colors[c % 8]; - t->t_curattr.ta_bgcolor = cons25_colors[c % 8]; + t->t_defattr.ta_bgcolor = cons25_colors[c % 8] | (c & 8); + t->t_curattr.ta_bgcolor = cons25_colors[c % 8] | (c & 8); } static void teken_subr_cons25_set_adapter_foreground(teken_t *t, unsigned int c) { - t->t_defattr.ta_fgcolor = cons25_colors[c % 8]; - t->t_curattr.ta_fgcolor = cons25_colors[c % 8]; - if (c >= 8) { - t->t_defattr.ta_format |= TF_BOLD; - t->t_curattr.ta_format |= TF_BOLD; - } else { - t->t_defattr.ta_format &= ~TF_BOLD; - t->t_curattr.ta_format &= ~TF_BOLD; - } + t->t_defattr.ta_fgcolor = cons25_colors[c % 8] | (c & 8); + t->t_curattr.ta_fgcolor = cons25_colors[c % 8] | (c & 8); } static const teken_color_t cons25_revcolors[8] = { 0, 4, 2, 6, 1, 5, 3, 7 }; From owner-svn-src-head@freebsd.org Sat Mar 18 13:42:09 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABEF0D10901; Sat, 18 Mar 2017 13:42:09 +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 mx1.freebsd.org (Postfix) with ESMTPS id 840A71558; Sat, 18 Mar 2017 13:42:09 +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 v2IDg854053466; Sat, 18 Mar 2017 13:42:08 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2IDg8nA053463; Sat, 18 Mar 2017 13:42:08 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703181342.v2IDg8nA053463@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 18 Mar 2017 13:42:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315482 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 18 Mar 2017 13:42:09 -0000 Author: mav Date: Sat Mar 18 13:42:08 2017 New Revision: 315482 URL: https://svnweb.freebsd.org/changeset/base/315482 Log: Use isp_target_put_entry() in places where it can be. This unifies the code and removes some duplication. MFC after: 2 weeks Modified: head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_target.c Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Sat Mar 18 12:39:24 2017 (r315481) +++ head/sys/dev/isp/isp_freebsd.c Sat Mar 18 13:42:08 2017 (r315482) @@ -1632,23 +1632,10 @@ isp_refire_notify_ack(void *arg) static void isp_target_putback_atio(union ccb *ccb) { - ispsoftc_t *isp; - struct ccb_scsiio *cso; - void *qe; + ispsoftc_t *isp = XS_ISP(ccb); + struct ccb_scsiio *cso = &ccb->csio; at2_entry_t local, *at = &local; - isp = XS_ISP(ccb); - - qe = isp_getrqentry(isp); - if (qe == NULL) { - xpt_print(ccb->ccb_h.path, - "%s: Request Queue Overflow\n", __func__); - callout_reset(&PISP_PCMD(ccb)->wdog, 10, - isp_refire_putback_atio, ccb); - return; - } - memset(qe, 0, QENTRY_LEN); - cso = &ccb->csio; ISP_MEMZERO(at, sizeof (at2_entry_t)); at->at_header.rqs_entry_type = RQSTYPE_ATIO2; at->at_header.rqs_entry_count = 1; @@ -1660,10 +1647,11 @@ isp_target_putback_atio(union ccb *ccb) at->at_status = CT_OK; at->at_rxid = cso->tag_id; at->at_iid = cso->ccb_h.target_id; - isp_put_atio2(isp, at, qe); - ISP_TDQE(isp, "isp_target_putback_atio", isp->isp_reqidx, qe); - ISP_SYNC_REQUEST(isp); - isp_complete_ctio(ccb); + if (isp_target_put_entry(isp, at)) { + callout_reset(&PISP_PCMD(ccb)->wdog, 10, + isp_refire_putback_atio, ccb); + } else + isp_complete_ctio(ccb); } static void Modified: head/sys/dev/isp/isp_target.c ============================================================================== --- head/sys/dev/isp/isp_target.c Sat Mar 18 12:39:24 2017 (r315481) +++ head/sys/dev/isp/isp_target.c Sat Mar 18 13:42:08 2017 (r315482) @@ -421,22 +421,37 @@ isp_target_put_entry(ispsoftc_t *isp, vo return (-1); } switch (etype) { + case RQSTYPE_NOTIFY_ACK: + if (IS_24XX(isp)) + isp_put_notify_24xx_ack(isp, (na_fcentry_24xx_t *)ap, + (na_fcentry_24xx_t *)outp); + else if (ISP_CAP_2KLOGIN(isp)) + isp_put_notify_ack_fc_e(isp, (na_fcentry_e_t *)ap, + (na_fcentry_e_t *)outp); + else + isp_put_notify_ack_fc(isp, ap, (na_fcentry_t *)outp); + break; case RQSTYPE_ATIO2: - if (ISP_CAP_2KLOGIN(isp)) { - isp_put_atio2e(isp, (at2e_entry_t *) ap, (at2e_entry_t *) outp); - } else { - isp_put_atio2(isp, (at2_entry_t *) ap, (at2_entry_t *) outp); - } + if (ISP_CAP_2KLOGIN(isp)) + isp_put_atio2e(isp, (at2e_entry_t *)ap, + (at2e_entry_t *)outp); + else + isp_put_atio2(isp, (at2_entry_t *)ap, + (at2_entry_t *)outp); break; case RQSTYPE_CTIO2: - if (ISP_CAP_2KLOGIN(isp)) { - isp_put_ctio2e(isp, (ct2e_entry_t *) ap, (ct2e_entry_t *) outp); - } else { - isp_put_ctio2(isp, (ct2_entry_t *) ap, (ct2_entry_t *) outp); - } + if (ISP_CAP_2KLOGIN(isp)) + isp_put_ctio2e(isp, (ct2e_entry_t *)ap, + (ct2e_entry_t *)outp); + else + isp_put_ctio2(isp, (ct2_entry_t *)ap, + (ct2_entry_t *)outp); break; case RQSTYPE_CTIO7: - isp_put_ctio7(isp, (ct7_entry_t *) ap, (ct7_entry_t *) outp); + isp_put_ctio7(isp, (ct7_entry_t *)ap, (ct7_entry_t *)outp); + break; + case RQSTYPE_ABTS_RSP: + isp_put_abts_rsp(isp, (abts_rsp_t *)ap, (abts_rsp_t *)outp); break; default: isp_prt(isp, ISP_LOGERR, "%s: Unknown type 0x%x", __func__, etype); @@ -830,7 +845,6 @@ int isp_notify_ack(ispsoftc_t *isp, void *arg) { char storage[QENTRY_LEN]; - void *outp; /* * This is in case a Task Management Function ends up here. @@ -840,14 +854,7 @@ isp_notify_ack(ispsoftc_t *isp, void *ar return (isp_endcmd(isp, aep, NIL_HANDLE, 0, 0, 0)); } - outp = isp_getrqentry(isp); - if (outp == NULL) { - isp_prt(isp, ISP_LOGWARN, rqo, __func__); - return (1); - } - ISP_MEMZERO(storage, QENTRY_LEN); - if (IS_24XX(isp)) { in_fcentry_24xx_t *in = arg; na_fcentry_24xx_t *na = (na_fcentry_24xx_t *) storage; @@ -881,7 +888,6 @@ isp_notify_ack(ispsoftc_t *isp, void *ar na->na_srr_reject_explanation = 0x2a; } } - isp_put_notify_24xx_ack(isp, na, (na_fcentry_24xx_t *)outp); } else { in_fcentry_t *in = arg; na_fcentry_t *na = (na_fcentry_t *) storage; @@ -908,18 +914,10 @@ isp_notify_ack(ispsoftc_t *isp, void *ar } na->na_header.rqs_entry_type = RQSTYPE_NOTIFY_ACK; na->na_header.rqs_entry_count = 1; - if (ISP_CAP_2KLOGIN(isp)) { - isp_put_notify_ack_fc_e(isp, (na_fcentry_e_t *)na, - (na_fcentry_e_t *)outp); - } else { - isp_put_notify_ack_fc(isp, na, (na_fcentry_t *)outp); - } isp_prt(isp, ISP_LOGTDEBUG0, "notify ack handle %x seqid %x flags %x tflags %x response %x", iid, na->na_seqid, na->na_flags, na->na_task_flags, na->na_response); } - ISP_TDQE(isp, "isp_notify_ack", isp->isp_reqidx, storage); - ISP_SYNC_REQUEST(isp); - return (0); + return (isp_target_put_entry(isp, &storage)); } int @@ -930,7 +928,6 @@ isp_acknak_abts(ispsoftc_t *isp, void *a uint8_t tmpb; abts_t *abts = arg; abts_rsp_t *rsp = (abts_rsp_t *) storage; - void *outp; if (!IS_24XX(isp)) { isp_prt(isp, ISP_LOGERR, "%s: called for non-24XX card", __func__); @@ -942,12 +939,6 @@ isp_acknak_abts(ispsoftc_t *isp, void *a return (0); } - outp = isp_getrqentry(isp); - if (outp == NULL) { - isp_prt(isp, ISP_LOGWARN, rqo, __func__); - return (1); - } - ISP_MEMCPY(rsp, abts, QENTRY_LEN); rsp->abts_rsp_header.rqs_entry_type = RQSTYPE_ABTS_RSP; @@ -990,15 +981,7 @@ isp_acknak_abts(ispsoftc_t *isp, void *a break; } } - - /* - * The caller will have set response values as appropriate - * in the ABTS structure just before calling us. - */ - isp_put_abts_rsp(isp, rsp, (abts_rsp_t *)outp); - ISP_TDQE(isp, "isp_acknak_abts", isp->isp_reqidx, storage); - ISP_SYNC_REQUEST(isp); - return (0); + return (isp_target_put_entry(isp, rsp)); } static void From owner-svn-src-head@freebsd.org Sat Mar 18 15:25:53 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0AF4AD12A52; Sat, 18 Mar 2017 15:25:53 +0000 (UTC) (envelope-from badger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 D96981F39; Sat, 18 Mar 2017 15:25:52 +0000 (UTC) (envelope-from badger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2IFPpk5094755; Sat, 18 Mar 2017 15:25:51 GMT (envelope-from badger@FreeBSD.org) Received: (from badger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2IFPpF0094754; Sat, 18 Mar 2017 15:25:51 GMT (envelope-from badger@FreeBSD.org) Message-Id: <201703181525.v2IFPpF0094754@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: badger set sender to badger@FreeBSD.org using -f From: Eric Badger Date: Sat, 18 Mar 2017 15:25:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315484 - head/tests/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 18 Mar 2017 15:25:53 -0000 Author: badger Date: Sat Mar 18 15:25:51 2017 New Revision: 315484 URL: https://svnweb.freebsd.org/changeset/base/315484 Log: ptrace_test: eliminate assumption about thread scheduling A couple of the ptrace tests make assumptions about which thread in a multithreaded process will run after a halt. This makes the tests less portable across branches, and susceptible to future breakage. Instead, twiddle thread scheduling and priorities to match the tests' expectation. X-MFC with: r313992 Sponsored by: Dell EMC Modified: head/tests/sys/kern/ptrace_test.c Modified: head/tests/sys/kern/ptrace_test.c ============================================================================== --- head/tests/sys/kern/ptrace_test.c Sat Mar 18 13:58:25 2017 (r315483) +++ head/tests/sys/kern/ptrace_test.c Sat Mar 18 15:25:51 2017 (r315484) @@ -33,6 +33,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include #include @@ -40,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -1872,15 +1875,11 @@ ATF_TC_BODY(ptrace__PT_KILL_competing_si cpuset_t setmask; pthread_t t; pthread_barrier_t barrier; + struct sched_param sched_param; ATF_REQUIRE((fpid = fork()) != -1); if (fpid == 0) { - /* - * Bind to one CPU so only one thread at a time will run. This - * test expects that the first thread created (the main thread) - * will be unsuspended first and will block the second thread - * from running. - */ + /* Bind to one CPU so only one thread at a time will run. */ CPU_ZERO(&setmask); CPU_SET(0, &setmask); cpusetid_t setid; @@ -1893,6 +1892,20 @@ ATF_TC_BODY(ptrace__PT_KILL_competing_si CHILD_REQUIRE(pthread_create(&t, NULL, mask_usr1_thread, (void*)&barrier) == 0); + /* + * Give the main thread higher priority. The test always + * assumes that, if both threads are able to run, the main + * thread runs first. + */ + sched_param.sched_priority = + (sched_get_priority_max(SCHED_FIFO) + + sched_get_priority_min(SCHED_FIFO)) / 2; + CHILD_REQUIRE(pthread_setschedparam(pthread_self(), + SCHED_FIFO, &sched_param) == 0); + sched_param.sched_priority -= RQ_PPQ; + CHILD_REQUIRE(pthread_setschedparam(t, SCHED_FIFO, + &sched_param) == 0); + sigset_t sigmask; sigemptyset(&sigmask); sigaddset(&sigmask, SIGUSR2); @@ -1952,23 +1965,19 @@ ATF_TC_WITHOUT_HEAD(ptrace__PT_KILL_comp ATF_TC_BODY(ptrace__PT_KILL_competing_stop, tc) { pid_t fpid, wpid; - int status, i; + int status; cpuset_t setmask; pthread_t t; pthread_barrier_t barrier; lwpid_t main_lwp; struct ptrace_lwpinfo pl; + struct sched_param sched_param; ATF_REQUIRE((fpid = fork()) != -1); if (fpid == 0) { trace_me(); - /* - * Bind to one CPU so only one thread at a time will run. This - * test expects that the first thread created (the main thread) - * will be unsuspended first and will block the second thread - * from running. - */ + /* Bind to one CPU so only one thread at a time will run. */ CPU_ZERO(&setmask); CPU_SET(0, &setmask); cpusetid_t setid; @@ -1981,6 +1990,20 @@ ATF_TC_BODY(ptrace__PT_KILL_competing_st CHILD_REQUIRE(pthread_create(&t, NULL, mask_usr1_thread, (void*)&barrier) == 0); + /* + * Give the main thread higher priority. The test always + * assumes that, if both threads are able to run, the main + * thread runs first. + */ + sched_param.sched_priority = + (sched_get_priority_max(SCHED_FIFO) + + sched_get_priority_min(SCHED_FIFO)) / 2; + CHILD_REQUIRE(pthread_setschedparam(pthread_self(), + SCHED_FIFO, &sched_param) == 0); + sched_param.sched_priority -= RQ_PPQ; + CHILD_REQUIRE(pthread_setschedparam(t, SCHED_FIFO, + &sched_param) == 0); + sigset_t sigmask; sigemptyset(&sigmask); sigaddset(&sigmask, SIGUSR2); @@ -2027,34 +2050,43 @@ ATF_TC_BODY(ptrace__PT_KILL_competing_st ATF_REQUIRE(ptrace(PT_SYSCALL, fpid, (caddr_t)1, 0) == 0); } - /* Let both threads hit their syscall entries. */ - for (i = 0; i < 2; ++i) { - ATF_REQUIRE(ptrace(PT_SYSCALL, fpid, (caddr_t)1, 0) == 0); + /* Proceed, allowing main thread to hit syscall entry for getpid(). */ + ATF_REQUIRE(ptrace(PT_SYSCALL, fpid, (caddr_t)1, 0) == 0); - wpid = waitpid(fpid, &status, 0); - ATF_REQUIRE(wpid == fpid); - ATF_REQUIRE(WIFSTOPPED(status)); - ATF_REQUIRE(WSTOPSIG(status) == SIGTRAP); + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGTRAP); - ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, - sizeof(pl)) != -1); - ATF_REQUIRE(pl.pl_flags & PL_FLAG_SCE); + ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, + sizeof(pl)) != -1); + ATF_REQUIRE(pl.pl_lwpid == main_lwp); + ATF_REQUIRE(pl.pl_flags & PL_FLAG_SCE); + /* Prevent the main thread from hitting its syscall exit for now. */ + ATF_REQUIRE(ptrace(PT_SUSPEND, main_lwp, 0, 0) == 0); - /* - * Prevent the main thread from hitting its syscall exit for - * now. - */ - if (pl.pl_lwpid == main_lwp) - ATF_REQUIRE(ptrace(PT_SUSPEND, main_lwp, 0, 0) == 0); + /* + * Proceed, allowing second thread to hit syscall exit for + * pthread_barrier_wait(). + */ + ATF_REQUIRE(ptrace(PT_SYSCALL, fpid, (caddr_t)1, 0) == 0); - } + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGTRAP); + + ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, + sizeof(pl)) != -1); + ATF_REQUIRE(pl.pl_lwpid != main_lwp); + ATF_REQUIRE(pl.pl_flags & PL_FLAG_SCX); /* Send a signal that only the second thread can handle. */ ATF_REQUIRE(kill(fpid, SIGUSR2) == 0); ATF_REQUIRE(ptrace(PT_SYSCALL, fpid, (caddr_t)1, 0) == 0); - /* The second wait() should report the SIGUSR2. */ + /* The next wait() should report the SIGUSR2. */ wpid = waitpid(fpid, &status, 0); ATF_REQUIRE(wpid == fpid); ATF_REQUIRE(WIFSTOPPED(status)); @@ -2065,10 +2097,11 @@ ATF_TC_BODY(ptrace__PT_KILL_competing_st /* * At this point, the main thread is in the middle of a system call and - * has been resumed. The second thread has taken a signal which will be - * replaced with a SIGKILL. We expect the main thread will get to run - * first. It should notice the kill request and exit accordingly and - * not stop for the system call exit event. + * has been resumed. The second thread has taken a SIGUSR2 which will + * be replaced with a SIGKILL below. The main thread will get to run + * first. It should notice the kill request (even though the signal + * replacement occurred in the other thread) and exit accordingly. It + * should not stop for the system call exit event. */ /* Replace the SIGUSR2 with a kill. */ From owner-svn-src-head@freebsd.org Sat Mar 18 15:42:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52297D12FA4; Sat, 18 Mar 2017 15:42:24 +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 mx1.freebsd.org (Postfix) with ESMTPS id 0C9901C3D; Sat, 18 Mar 2017 15:42:23 +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 v2IFgNUE003261; Sat, 18 Mar 2017 15:42:23 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2IFgMgN003242; Sat, 18 Mar 2017 15:42:22 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703181542.v2IFgMgN003242@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 18 Mar 2017 15:42:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315485 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 18 Mar 2017 15:42:24 -0000 Author: mav Date: Sat Mar 18 15:42:22 2017 New Revision: 315485 URL: https://svnweb.freebsd.org/changeset/base/315485 Log: Remove dead remnants of SPI target. MFC after: 2 weeks Modified: head/sys/dev/isp/isp.c head/sys/dev/isp/isp_library.c head/sys/dev/isp/isp_library.h head/sys/dev/isp/isp_target.c Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Sat Mar 18 15:25:51 2017 (r315484) +++ head/sys/dev/isp/isp.c Sat Mar 18 15:42:22 2017 (r315485) @@ -5989,8 +5989,6 @@ isp_handle_other_response(ispsoftc_t *is return (1); case RQSTYPE_ATIO: case RQSTYPE_CTIO: - case RQSTYPE_ENABLE_LUN: - case RQSTYPE_MODIFY_LUN: case RQSTYPE_NOTIFY: case RQSTYPE_NOTIFY_ACK: case RQSTYPE_CTIO1: Modified: head/sys/dev/isp/isp_library.c ============================================================================== --- head/sys/dev/isp/isp_library.c Sat Mar 18 15:25:51 2017 (r315484) +++ head/sys/dev/isp/isp_library.c Sat Mar 18 15:42:22 2017 (r315485) @@ -3055,78 +3055,6 @@ isp_get_ctio7(ispsoftc_t *isp, ct7_entry } void -isp_put_enable_lun(ispsoftc_t *isp, lun_entry_t *lesrc, lun_entry_t *ledst) -{ - int i; - isp_put_hdr(isp, &lesrc->le_header, &ledst->le_header); - ISP_IOXPUT_32(isp, lesrc->le_reserved, &ledst->le_reserved); - if (ISP_IS_SBUS(isp)) { - ISP_IOXPUT_8(isp, lesrc->le_lun, &ledst->le_rsvd); - ISP_IOXPUT_8(isp, lesrc->le_rsvd, &ledst->le_lun); - ISP_IOXPUT_8(isp, lesrc->le_ops, &ledst->le_tgt); - ISP_IOXPUT_8(isp, lesrc->le_tgt, &ledst->le_ops); - ISP_IOXPUT_8(isp, lesrc->le_status, &ledst->le_reserved2); - ISP_IOXPUT_8(isp, lesrc->le_reserved2, &ledst->le_status); - ISP_IOXPUT_8(isp, lesrc->le_cmd_count, &ledst->le_in_count); - ISP_IOXPUT_8(isp, lesrc->le_in_count, &ledst->le_cmd_count); - ISP_IOXPUT_8(isp, lesrc->le_cdb6len, &ledst->le_cdb7len); - ISP_IOXPUT_8(isp, lesrc->le_cdb7len, &ledst->le_cdb6len); - } else { - ISP_IOXPUT_8(isp, lesrc->le_lun, &ledst->le_lun); - ISP_IOXPUT_8(isp, lesrc->le_rsvd, &ledst->le_rsvd); - ISP_IOXPUT_8(isp, lesrc->le_ops, &ledst->le_ops); - ISP_IOXPUT_8(isp, lesrc->le_tgt, &ledst->le_tgt); - ISP_IOXPUT_8(isp, lesrc->le_status, &ledst->le_status); - ISP_IOXPUT_8(isp, lesrc->le_reserved2, &ledst->le_reserved2); - ISP_IOXPUT_8(isp, lesrc->le_cmd_count, &ledst->le_cmd_count); - ISP_IOXPUT_8(isp, lesrc->le_in_count, &ledst->le_in_count); - ISP_IOXPUT_8(isp, lesrc->le_cdb6len, &ledst->le_cdb6len); - ISP_IOXPUT_8(isp, lesrc->le_cdb7len, &ledst->le_cdb7len); - } - ISP_IOXPUT_32(isp, lesrc->le_flags, &ledst->le_flags); - ISP_IOXPUT_16(isp, lesrc->le_timeout, &ledst->le_timeout); - for (i = 0; i < 20; i++) { - ISP_IOXPUT_8(isp, lesrc->le_reserved3[i], &ledst->le_reserved3[i]); - } -} - -void -isp_get_enable_lun(ispsoftc_t *isp, lun_entry_t *lesrc, lun_entry_t *ledst) -{ - int i; - isp_get_hdr(isp, &lesrc->le_header, &ledst->le_header); - ISP_IOXGET_32(isp, &lesrc->le_reserved, ledst->le_reserved); - if (ISP_IS_SBUS(isp)) { - ISP_IOXGET_8(isp, &lesrc->le_lun, ledst->le_rsvd); - ISP_IOXGET_8(isp, &lesrc->le_rsvd, ledst->le_lun); - ISP_IOXGET_8(isp, &lesrc->le_ops, ledst->le_tgt); - ISP_IOXGET_8(isp, &lesrc->le_tgt, ledst->le_ops); - ISP_IOXGET_8(isp, &lesrc->le_status, ledst->le_reserved2); - ISP_IOXGET_8(isp, &lesrc->le_reserved2, ledst->le_status); - ISP_IOXGET_8(isp, &lesrc->le_cmd_count, ledst->le_in_count); - ISP_IOXGET_8(isp, &lesrc->le_in_count, ledst->le_cmd_count); - ISP_IOXGET_8(isp, &lesrc->le_cdb6len, ledst->le_cdb7len); - ISP_IOXGET_8(isp, &lesrc->le_cdb7len, ledst->le_cdb6len); - } else { - ISP_IOXGET_8(isp, &lesrc->le_lun, ledst->le_lun); - ISP_IOXGET_8(isp, &lesrc->le_rsvd, ledst->le_rsvd); - ISP_IOXGET_8(isp, &lesrc->le_ops, ledst->le_ops); - ISP_IOXGET_8(isp, &lesrc->le_tgt, ledst->le_tgt); - ISP_IOXGET_8(isp, &lesrc->le_status, ledst->le_status); - ISP_IOXGET_8(isp, &lesrc->le_reserved2, ledst->le_reserved2); - ISP_IOXGET_8(isp, &lesrc->le_cmd_count, ledst->le_cmd_count); - ISP_IOXGET_8(isp, &lesrc->le_in_count, ledst->le_in_count); - ISP_IOXGET_8(isp, &lesrc->le_cdb6len, ledst->le_cdb6len); - ISP_IOXGET_8(isp, &lesrc->le_cdb7len, ledst->le_cdb7len); - } - ISP_IOXGET_32(isp, &lesrc->le_flags, ledst->le_flags); - ISP_IOXGET_16(isp, &lesrc->le_timeout, ledst->le_timeout); - for (i = 0; i < 20; i++) { - ISP_IOXGET_8(isp, &lesrc->le_reserved3[i], ledst->le_reserved3[i]); - } -} - -void isp_put_notify_fc(ispsoftc_t *isp, in_fcentry_t *src, in_fcentry_t *dst) { isp_put_hdr(isp, &src->in_header, &dst->in_header); Modified: head/sys/dev/isp/isp_library.h ============================================================================== --- head/sys/dev/isp/isp_library.h Sat Mar 18 15:25:51 2017 (r315484) +++ head/sys/dev/isp/isp_library.h Sat Mar 18 15:42:22 2017 (r315485) @@ -181,8 +181,6 @@ void isp_put_ctio7(ispsoftc_t *, ct7_ent void isp_get_ctio2(ispsoftc_t *, ct2_entry_t *, ct2_entry_t *); void isp_get_ctio2e(ispsoftc_t *, ct2e_entry_t *, ct2e_entry_t *); void isp_get_ctio7(ispsoftc_t *, ct7_entry_t *, ct7_entry_t *); -void isp_put_enable_lun(ispsoftc_t *, lun_entry_t *, lun_entry_t *); -void isp_get_enable_lun(ispsoftc_t *, lun_entry_t *, lun_entry_t *); void isp_put_notify_fc(ispsoftc_t *, in_fcentry_t *, in_fcentry_t *); void isp_put_notify_fc_e(ispsoftc_t *, in_fcentry_e_t *, in_fcentry_e_t *); void isp_put_notify_24xx(ispsoftc_t *, in_fcentry_24xx_t *, in_fcentry_24xx_t *); Modified: head/sys/dev/isp/isp_target.c ============================================================================== --- head/sys/dev/isp/isp_target.c Sat Mar 18 15:25:51 2017 (r315484) +++ head/sys/dev/isp/isp_target.c Sat Mar 18 15:42:22 2017 (r315485) @@ -215,12 +215,6 @@ isp_target_notify(ispsoftc_t *isp, void isp_handle_ctio7(isp, (ct7_entry_t *) local); break; - case RQSTYPE_ENABLE_LUN: - case RQSTYPE_MODIFY_LUN: - isp_get_enable_lun(isp, lunenp, (lun_entry_t *) local); - isp_async(isp, ISPASYNC_TARGET_ACTION, local); - break; - case RQSTYPE_NOTIFY: bus = 0; if (IS_24XX(isp)) { From owner-svn-src-head@freebsd.org Sat Mar 18 16:09:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BFD2AD126F5; Sat, 18 Mar 2017 16:09:31 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 743FF192C; Sat, 18 Mar 2017 16:09:31 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2IG9Up9011799; Sat, 18 Mar 2017 16:09:30 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2IG9UPt011798; Sat, 18 Mar 2017 16:09:30 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201703181609.v2IG9UPt011798@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sat, 18 Mar 2017 16:09:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315487 - head/bin/sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 18 Mar 2017 16:09:31 -0000 Author: jilles Date: Sat Mar 18 16:09:30 2017 New Revision: 315487 URL: https://svnweb.freebsd.org/changeset/base/315487 Log: sh: Remove unused return value of subevalvar_misc(). Modified: head/bin/sh/expand.c Modified: head/bin/sh/expand.c ============================================================================== --- head/bin/sh/expand.c Sat Mar 18 16:07:28 2017 (r315486) +++ head/bin/sh/expand.c Sat Mar 18 16:09:30 2017 (r315487) @@ -97,7 +97,7 @@ static const char *expari(const char *, struct worddest *); static void expbackq(union node *, int, int, struct worddest *); static void subevalvar_trim(const char *, struct nodelist *, int, int, int); -static int subevalvar_misc(const char *, struct nodelist *, const char *, int, +static void subevalvar_misc(const char *, struct nodelist *, const char *, int, int, int); static const char *evalvar(const char *, struct nodelist **restrict, int, struct worddest *); @@ -617,7 +617,7 @@ subevalvar_trim(const char *p, struct no } -static int +static void subevalvar_misc(const char *p, struct nodelist *argbackq, const char *var, int subtype, int startloc, int varflags) { @@ -634,7 +634,7 @@ subevalvar_misc(const char *p, struct no setvar(var, startp, 0); amount = startp - expdest; STADJUST(amount, expdest); - return 1; + return; case VSQUESTION: if (*p != CTLENDVAR) { @@ -643,7 +643,6 @@ subevalvar_misc(const char *p, struct no } error("%.*s: parameter %snot set", (int)(p - var - 1), var, (varflags & VSNUL) ? "null or " : ""); - return 0; default: abort(); @@ -792,12 +791,11 @@ again: /* jump here after setting a vari case VSASSIGN: case VSQUESTION: if (!set) { - if (subevalvar_misc(p, *argbackq, var, subtype, - startloc, varflags)) { - varflags &= ~VSNUL; - goto again; - } - break; + subevalvar_misc(p, *argbackq, var, subtype, + startloc, varflags); + /* assert(subtype == VSASSIGN); */ + varflags &= ~VSNUL; + goto again; } break; From owner-svn-src-head@freebsd.org Sat Mar 18 16:09:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8AC82D1271F; Sat, 18 Mar 2017 16:09:37 +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 mx1.freebsd.org (Postfix) with ESMTPS id 6593B1971; Sat, 18 Mar 2017 16:09:37 +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 v2IG9aar011850; Sat, 18 Mar 2017 16:09:36 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2IG9aFc011847; Sat, 18 Mar 2017 16:09:36 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703181609.v2IG9aFc011847@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 18 Mar 2017 16:09:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315488 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 18 Mar 2017 16:09:37 -0000 Author: mav Date: Sat Mar 18 16:09:36 2017 New Revision: 315488 URL: https://svnweb.freebsd.org/changeset/base/315488 Log: Extend nt_lun to full 8 byte. MFC after: 2 weeks Modified: head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_target.c head/sys/dev/isp/isp_target.h Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Sat Mar 18 16:09:30 2017 (r315487) +++ head/sys/dev/isp/isp_freebsd.c Sat Mar 18 16:09:36 2017 (r315488) @@ -2303,7 +2303,8 @@ isp_handle_platform_notify_fc(ispsoftc_t break; case IN_ABORT_TASK: { - uint16_t nphdl, lun; + lun_id_t lun; + uint16_t nphdl; uint32_t sid; uint64_t wwn; fcportdb_t *lp; @@ -2602,7 +2603,7 @@ isp_handle_platform_target_tmf(ispsoftc_ inot_private_data_t *ntp = NULL; lun_id_t lun; - isp_prt(isp, ISP_LOGTDEBUG0, "%s: code 0x%x sid 0x%x tagval 0x%016llx chan %d lun 0x%x", __func__, notify->nt_ncode, + isp_prt(isp, ISP_LOGTDEBUG0, "%s: code 0x%x sid 0x%x tagval 0x%016llx chan %d lun %jx", __func__, notify->nt_ncode, notify->nt_sid, (unsigned long long) notify->nt_tagval, notify->nt_channel, notify->nt_lun); /* * NB: This assignment is necessary because of tricky type conversion. Modified: head/sys/dev/isp/isp_target.c ============================================================================== --- head/sys/dev/isp/isp_target.c Sat Mar 18 16:09:30 2017 (r315487) +++ head/sys/dev/isp/isp_target.c Sat Mar 18 16:09:36 2017 (r315488) @@ -709,8 +709,8 @@ static void isp_got_msg_fc(ispsoftc_t *isp, in_fcentry_t *inp) { isp_notify_t notify; - static const char f1[] = "%s from N-port handle 0x%x lun %x seq 0x%x"; - static const char f2[] = "unknown %s 0x%x lun %x N-Port handle 0x%x task flags 0x%x seq 0x%x\n"; + static const char f1[] = "%s from N-port handle 0x%x lun %jx seq 0x%x"; + static const char f2[] = "unknown %s 0x%x lun %jx N-Port handle 0x%x task flags 0x%x seq 0x%x\n"; uint16_t seqid, nphdl; ISP_MEMZERO(¬ify, sizeof (isp_notify_t)); @@ -772,8 +772,8 @@ static void isp_got_tmf_24xx(ispsoftc_t *isp, at7_entry_t *aep) { isp_notify_t notify; - static const char f1[] = "%s from PortID 0x%06x lun %x seq 0x%08x"; - static const char f2[] = "unknown Task Flag 0x%x lun %x PortID 0x%x tag 0x%08x"; + static const char f1[] = "%s from PortID 0x%06x lun %jx seq 0x%08x"; + static const char f2[] = "unknown Task Flag 0x%x lun %jx PortID 0x%x tag 0x%08x"; fcportdb_t *lp; uint16_t chan; uint32_t sid, did; @@ -781,7 +781,7 @@ isp_got_tmf_24xx(ispsoftc_t *isp, at7_en ISP_MEMZERO(¬ify, sizeof (isp_notify_t)); notify.nt_hba = isp; notify.nt_wwn = INI_ANY; - notify.nt_lun = (aep->at_cmnd.fcp_cmnd_lun[0] << 8) | (aep->at_cmnd.fcp_cmnd_lun[1]); + notify.nt_lun = CAM_EXTLUN_BYTE_SWIZZLE(be64dec(aep->at_cmnd.fcp_cmnd_lun)); notify.nt_tagval = aep->at_rxid; notify.nt_tagval |= (((uint64_t)(isp->isp_serno++)) << 32); notify.nt_lreserved = aep; Modified: head/sys/dev/isp/isp_target.h ============================================================================== --- head/sys/dev/isp/isp_target.h Sat Mar 18 16:09:30 2017 (r315487) +++ head/sys/dev/isp/isp_target.h Sat Mar 18 16:09:36 2017 (r315488) @@ -64,16 +64,15 @@ typedef struct isp_notify { uint64_t nt_wwn; /* source (wwn) */ uint64_t nt_tgt; /* destination (wwn) */ uint64_t nt_tagval; /* tag value */ + lun_id_t nt_lun; /* logical unit */ uint32_t nt_sid : 24; /* source port id */ uint32_t nt_failed : 1, /* notify operation failed */ nt_need_ack : 1, /* this notify needs an ACK */ nt_did : 24; /* destination port id */ - uint32_t - nt_lun : 16, /* logical unit */ - nt_nphdl : 16; /* n-port handle */ - uint8_t nt_channel; /* channel id */ + uint16_t nt_nphdl; /* n-port handle */ + uint8_t nt_channel; /* channel id */ isp_ncode_t nt_ncode; /* action */ } isp_notify_t; #define MATCH_TMD(tmd, iid, lun, tag) \ From owner-svn-src-head@freebsd.org Sat Mar 18 17:01:12 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0168D120FA; Sat, 18 Mar 2017 17:01:12 +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 mx1.freebsd.org (Postfix) with ESMTPS id B0E631FFA; Sat, 18 Mar 2017 17:01:12 +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 v2IH1Bmv032748; Sat, 18 Mar 2017 17:01:11 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2IH1B4O032746; Sat, 18 Mar 2017 17:01:11 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703181701.v2IH1B4O032746@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 18 Mar 2017 17:01:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315489 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 18 Mar 2017 17:01:13 -0000 Author: mav Date: Sat Mar 18 17:01:11 2017 New Revision: 315489 URL: https://svnweb.freebsd.org/changeset/base/315489 Log: Move RQSTYPE_ABTS_RCVD parsing into generic code. MFC after: 2 weeks Modified: head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_target.c Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Sat Mar 18 16:09:36 2017 (r315488) +++ head/sys/dev/isp/isp_freebsd.c Sat Mar 18 17:01:11 2017 (r315489) @@ -2601,18 +2601,19 @@ isp_handle_platform_target_tmf(ispsoftc_ fcportdb_t *lp; struct ccb_immediate_notify *inot; inot_private_data_t *ntp = NULL; + atio_private_data_t *atp; lun_id_t lun; isp_prt(isp, ISP_LOGTDEBUG0, "%s: code 0x%x sid 0x%x tagval 0x%016llx chan %d lun %jx", __func__, notify->nt_ncode, notify->nt_sid, (unsigned long long) notify->nt_tagval, notify->nt_channel, notify->nt_lun); - /* - * NB: This assignment is necessary because of tricky type conversion. - * XXX: This is tricky and I need to check this. If the lun isn't known - * XXX: for the task management function, it does not of necessity follow - * XXX: that it should go up stream to the wildcard listener. - */ if (notify->nt_lun == LUN_ANY) { - lun = CAM_LUN_WILDCARD; + if (notify->nt_tagval == TAG_ANY) { + lun = CAM_LUN_WILDCARD; + } else { + atp = isp_find_atpd(isp, notify->nt_channel, + notify->nt_tagval & 0xffffffff); + lun = atp ? atp->lun : CAM_LUN_WILDCARD; + } } else { lun = notify->nt_lun; } @@ -4176,55 +4177,6 @@ changed: case RQSTYPE_CTIO: isp_handle_platform_ctio(isp, hp); break; - case RQSTYPE_ABTS_RCVD: - { - abts_t *abts = (abts_t *)hp; - isp_notify_t notify, *nt = ¬ify; - atio_private_data_t *atp; - fcportdb_t *lp; - uint16_t chan; - uint32_t sid, did; - - did = (abts->abts_did_hi << 16) | abts->abts_did_lo; - sid = (abts->abts_sid_hi << 16) | abts->abts_sid_lo; - ISP_MEMZERO(nt, sizeof (isp_notify_t)); - - nt->nt_hba = isp; - nt->nt_did = did; - nt->nt_nphdl = abts->abts_nphdl; - nt->nt_sid = sid; - isp_find_chan_by_did(isp, did, &chan); - if (chan == ISP_NOCHAN) { - nt->nt_tgt = TGT_ANY; - } else { - nt->nt_tgt = FCPARAM(isp, chan)->isp_wwpn; - if (isp_find_pdb_by_handle(isp, chan, abts->abts_nphdl, &lp)) { - nt->nt_wwn = lp->port_wwn; - } else { - nt->nt_wwn = INI_ANY; - } - } - /* - * Try hard to find the lun for this command. - */ - atp = isp_find_atpd(isp, chan, abts->abts_rxid_task); - nt->nt_lun = atp ? atp->lun : LUN_ANY; - nt->nt_need_ack = 1; - nt->nt_tagval = abts->abts_rxid_task; - nt->nt_tagval |= (((uint64_t) abts->abts_rxid_abts) << 32); - if (abts->abts_rxid_task == ISP24XX_NO_TASK) { - isp_prt(isp, ISP_LOGTINFO, "[0x%x] ABTS from N-Port handle 0x%x Port 0x%06x has no task id (rx_id 0x%04x ox_id 0x%04x)", - abts->abts_rxid_abts, abts->abts_nphdl, sid, abts->abts_rx_id, abts->abts_ox_id); - } else { - isp_prt(isp, ISP_LOGTINFO, "[0x%x] ABTS from N-Port handle 0x%x Port 0x%06x for task 0x%x (rx_id 0x%04x ox_id 0x%04x)", - abts->abts_rxid_abts, abts->abts_nphdl, sid, abts->abts_rxid_task, abts->abts_rx_id, abts->abts_ox_id); - } - nt->nt_channel = chan; - nt->nt_ncode = NT_ABORT_TASK; - nt->nt_lreserved = hp; - isp_handle_platform_target_tmf(isp, nt); - break; - } } break; } Modified: head/sys/dev/isp/isp_target.c ============================================================================== --- head/sys/dev/isp/isp_target.c Sat Mar 18 16:09:36 2017 (r315488) +++ head/sys/dev/isp/isp_target.c Sat Mar 18 17:01:11 2017 (r315489) @@ -58,6 +58,7 @@ static const char rqo[] = "%s: Request Q static void isp_got_msg_fc(ispsoftc_t *, in_fcentry_t *); static void isp_got_tmf_24xx(ispsoftc_t *, at7_entry_t *); +static void isp_handle_abts(ispsoftc_t *, abts_t *); static void isp_handle_atio2(ispsoftc_t *, at2_entry_t *); static void isp_handle_ctio2(ispsoftc_t *, ct2_entry_t *); static void isp_handle_ctio7(ispsoftc_t *, ct7_entry_t *); @@ -361,7 +362,7 @@ isp_target_notify(ispsoftc_t *isp, void case RQSTYPE_ABTS_RCVD: isp_get_abts(isp, abts, (abts_t *)local); - isp_async(isp, ISPASYNC_TARGET_ACTION, &local); + isp_handle_abts(isp, (abts_t *)local); break; case RQSTYPE_ABTS_RSP: isp_get_abts_rsp(isp, abts_rsp, (abts_rsp_t *)local); @@ -979,6 +980,47 @@ isp_acknak_abts(ispsoftc_t *isp, void *a } static void +isp_handle_abts(ispsoftc_t *isp, abts_t *abts) +{ + isp_notify_t notify, *nt = ¬ify; + fcportdb_t *lp; + uint16_t chan; + uint32_t sid, did; + + did = (abts->abts_did_hi << 16) | abts->abts_did_lo; + sid = (abts->abts_sid_hi << 16) | abts->abts_sid_lo; + ISP_MEMZERO(nt, sizeof (isp_notify_t)); + + nt->nt_hba = isp; + nt->nt_did = did; + nt->nt_nphdl = abts->abts_nphdl; + nt->nt_sid = sid; + isp_find_chan_by_did(isp, did, &chan); + if (chan == ISP_NOCHAN) { + nt->nt_tgt = TGT_ANY; + } else { + nt->nt_tgt = FCPARAM(isp, chan)->isp_wwpn; + if (isp_find_pdb_by_handle(isp, chan, abts->abts_nphdl, &lp)) { + nt->nt_wwn = lp->port_wwn; + } else { + nt->nt_wwn = INI_ANY; + } + } + nt->nt_lun = LUN_ANY; + nt->nt_need_ack = 1; + nt->nt_tagval = abts->abts_rxid_task; + nt->nt_tagval |= (((uint64_t) abts->abts_rxid_abts) << 32); + isp_prt(isp, ISP_LOGTINFO, "[0x%x] ABTS from N-Port handle 0x%x" + " Port 0x%06x for task 0x%x (rx_id 0x%04x ox_id 0x%04x)", + abts->abts_rxid_abts, abts->abts_nphdl, sid, abts->abts_rxid_task, + abts->abts_rx_id, abts->abts_ox_id); + nt->nt_channel = chan; + nt->nt_ncode = NT_ABORT_TASK; + nt->nt_lreserved = abts; + isp_async(isp, ISPASYNC_TARGET_NOTIFY, ¬ify); +} + +static void isp_handle_atio2(ispsoftc_t *isp, at2_entry_t *aep) { int lun, iid; From owner-svn-src-head@freebsd.org Sat Mar 18 17:50:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21893D12F35; Sat, 18 Mar 2017 17:50: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 mx1.freebsd.org (Postfix) with ESMTPS id F06CA1475; Sat, 18 Mar 2017 17:50: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 v2IHooxA054130; Sat, 18 Mar 2017 17:50:50 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2IHooAb054129; Sat, 18 Mar 2017 17:50:50 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201703181750.v2IHooAb054129@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 18 Mar 2017 17:50:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315490 - head/sys/arm/freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 18 Mar 2017 17:50:51 -0000 Author: ian Date: Sat Mar 18 17:50:49 2017 New Revision: 315490 URL: https://svnweb.freebsd.org/changeset/base/315490 Log: Make the imx5 clocks driver work with vendor-supplied dts (which does not supply the addresses for the DPLL register blocks) by hard-coding the addresses in the driver source code. Yes, this is just as bad an idea as it sounds, but we have no choice. In the early days of using fdt data, when we were making up our own data for each board, we defined 4 sets of memory mapped registers in the data. The vendor-supplied data only provides the address of the CCM register block, but not the 3 DPLL blocks. The linux driver has the DPLL physical addresses (which differ by SOC type) hard-coded in the driver, and we have no choice but to do the same thing if we want to run with the vendor- supplied fdt data. So now we use bus_space_map() to make the DPLL blocks accessible, choosing the set of fixed addresses to map based on the soc id. Modified: head/sys/arm/freescale/imx/imx51_ccm.c Modified: head/sys/arm/freescale/imx/imx51_ccm.c ============================================================================== --- head/sys/arm/freescale/imx/imx51_ccm.c Sat Mar 18 17:01:11 2017 (r315489) +++ head/sys/arm/freescale/imx/imx51_ccm.c Sat Mar 18 17:50:49 2017 (r315490) @@ -77,6 +77,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -95,10 +96,34 @@ __FBSDID("$FreeBSD$"); #define IMX51_CKIL_FREQ 32768 #endif +/* + * The fdt data does not provide reg properties describing the DPLL register + * blocks we need to access, presumably because the needed addresses are + * hard-coded within the linux driver. That leaves us with no choice but to do + * the same thing, if we want to run with vendor-supplied fdt data. So here we + * have tables of the physical addresses we need for each soc, and we'll use + * bus_space_map() at attach() time to get access to them. + */ +static uint32_t imx51_dpll_addrs[IMX51_N_DPLLS] = { + 0x83f80000, /* DPLL1 */ + 0x83f84000, /* DPLL2 */ + 0x83f88000, /* DPLL3 */ +}; + +static uint32_t imx53_dpll_addrs[IMX51_N_DPLLS] = { + 0x63f80000, /* DPLL1 */ + 0x63f84000, /* DPLL2 */ + 0x63f88000, /* DPLL3 */ +}; + +#define DPLL_REGS_SZ (16 * 1024) + struct imxccm_softc { device_t sc_dev; - struct resource *res[7]; + struct resource *ccmregs; u_int64_t pll_freq[IMX51_N_DPLLS]; + bus_space_tag_t pllbst; + bus_space_handle_t pllbsh[IMX51_N_DPLLS]; }; struct imxccm_softc *ccm_softc = NULL; @@ -126,15 +151,26 @@ static devclass_t imxccm_devclass; EARLY_DRIVER_MODULE(imxccm, simplebus, imxccm_driver, imxccm_devclass, 0, 0, BUS_PASS_CPU); -static struct resource_spec imxccm_spec[] = { - { SYS_RES_MEMORY, 0, RF_ACTIVE }, /* Global registers */ - { SYS_RES_MEMORY, 1, RF_ACTIVE }, /* DPLLIP1 */ - { SYS_RES_MEMORY, 2, RF_ACTIVE }, /* DPLLIP2 */ - { SYS_RES_MEMORY, 3, RF_ACTIVE }, /* DPLLIP3 */ - { SYS_RES_IRQ, 0, RF_ACTIVE }, /* 71 */ - { SYS_RES_IRQ, 1, RF_ACTIVE }, /* 72 */ - { -1, 0 } -}; +static inline uint32_t +pll_read_4(struct imxccm_softc *sc, int pll, int reg) +{ + + return (bus_space_read_4(sc->pllbst, sc->pllbsh[pll - 1], reg)); +} + +static inline uint32_t +ccm_read_4(struct imxccm_softc *sc, int reg) +{ + + return (bus_read_4(sc->ccmregs, reg)); +} + +static inline void +ccm_write_4(struct imxccm_softc *sc, int reg, uint32_t val) +{ + + bus_write_4(sc->ccmregs, reg, val); +} static int imxccm_match(device_t dev) @@ -155,13 +191,40 @@ static int imxccm_attach(device_t dev) { struct imxccm_softc *sc; + int idx; + u_int soc; + uint32_t *pll_addrs; sc = device_get_softc(dev); sc->sc_dev = dev; - if (bus_alloc_resources(dev, imxccm_spec, sc->res)) { + switch ((soc = imx_soc_type())) { + case IMXSOC_51: + pll_addrs = imx51_dpll_addrs; + break; + case IMXSOC_53: + pll_addrs = imx53_dpll_addrs; + break; + default: + device_printf(dev, "No support for SoC type 0x%08x\n", soc); + goto noclocks; + } + + idx = 0; + sc->ccmregs = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &idx, + RF_ACTIVE); + if (sc->ccmregs == NULL) { device_printf(dev, "could not allocate resources\n"); - return (ENXIO); + goto noclocks; + } + + sc->pllbst = fdtbus_bs_tag; + for (idx = 0; idx < IMX51_N_DPLLS; ++idx) { + if (bus_space_map(sc->pllbst, pll_addrs[idx], DPLL_REGS_SZ, 0, + &sc->pllbsh[idx]) != 0) { + device_printf(dev, "Cannot map DPLL registers\n"); + goto noclocks; + } } ccm_softc = sc; @@ -186,6 +249,10 @@ imxccm_attach(device_t dev) return (0); + +noclocks: + + panic("Cannot continue without clock support"); } u_int @@ -210,13 +277,13 @@ imx51_get_clock(enum imx51_clock clk) case IMX51CLK_PLL3: return ccm_softc->pll_freq[clk-IMX51CLK_PLL1]; case IMX51CLK_PLL1SW: - ccsr = bus_read_4(ccm_softc->res[0], CCMC_CCSR); + ccsr = ccm_read_4(ccm_softc, CCMC_CCSR); if ((ccsr & CCSR_PLL1_SW_CLK_SEL) == 0) return ccm_softc->pll_freq[1-1]; /* step clock */ /* FALLTHROUGH */ case IMX51CLK_PLL1STEP: - ccsr = bus_read_4(ccm_softc->res[0], CCMC_CCSR); + ccsr = ccm_read_4(ccm_softc, CCMC_CCSR); switch ((ccsr & CCSR_STEP_SEL_MASK) >> CCSR_STEP_SEL_SHIFT) { case 0: return imx51_get_clock(IMX51CLK_LP_APM); @@ -233,34 +300,34 @@ imx51_get_clock(enum imx51_clock clk) } /*NOTREACHED*/ case IMX51CLK_PLL2SW: - ccsr = bus_read_4(ccm_softc->res[0], CCMC_CCSR); + ccsr = ccm_read_4(ccm_softc, CCMC_CCSR); if ((ccsr & CCSR_PLL2_SW_CLK_SEL) == 0) return imx51_get_clock(IMX51CLK_PLL2); return 0; /* XXX PLL2 bypass clk */ case IMX51CLK_PLL3SW: - ccsr = bus_read_4(ccm_softc->res[0], CCMC_CCSR); + ccsr = ccm_read_4(ccm_softc, CCMC_CCSR); if ((ccsr & CCSR_PLL3_SW_CLK_SEL) == 0) return imx51_get_clock(IMX51CLK_PLL3); return 0; /* XXX PLL3 bypass clk */ case IMX51CLK_LP_APM: - ccsr = bus_read_4(ccm_softc->res[0], CCMC_CCSR); + ccsr = ccm_read_4(ccm_softc, CCMC_CCSR); return (ccsr & CCSR_LP_APM) ? imx51_get_clock(IMX51CLK_FPM) : IMX51_OSC_FREQ; case IMX51CLK_ARM_ROOT: freq = imx51_get_clock(IMX51CLK_PLL1SW); - cacrr = bus_read_4(ccm_softc->res[0], CCMC_CACRR); + cacrr = ccm_read_4(ccm_softc, CCMC_CACRR); return freq / (cacrr + 1); /* ... */ case IMX51CLK_MAIN_BUS_CLK_SRC: - cbcdr = bus_read_4(ccm_softc->res[0], CCMC_CBCDR); + cbcdr = ccm_read_4(ccm_softc, CCMC_CBCDR); if ((cbcdr & CBCDR_PERIPH_CLK_SEL) == 0) freq = imx51_get_clock(IMX51CLK_PLL2SW); else { freq = 0; - cbcmr = bus_read_4(ccm_softc->res[0], CCMC_CBCMR); + cbcmr = ccm_read_4(ccm_softc, CCMC_CBCMR); switch ((cbcmr & CBCMR_PERIPH_APM_SEL_MASK) >> CBCMR_PERIPH_APM_SEL_SHIFT) { case 0: @@ -280,29 +347,29 @@ imx51_get_clock(enum imx51_clock clk) return freq; case IMX51CLK_MAIN_BUS_CLK: freq = imx51_get_clock(IMX51CLK_MAIN_BUS_CLK_SRC); - cdcr = bus_read_4(ccm_softc->res[0], CCMC_CDCR); + cdcr = ccm_read_4(ccm_softc, CCMC_CDCR); return freq / (1 + ((cdcr & CDCR_PERIPH_CLK_DVFS_PODF_MASK) >> CDCR_PERIPH_CLK_DVFS_PODF_SHIFT)); case IMX51CLK_AHB_CLK_ROOT: freq = imx51_get_clock(IMX51CLK_MAIN_BUS_CLK); - cbcdr = bus_read_4(ccm_softc->res[0], CCMC_CBCDR); + cbcdr = ccm_read_4(ccm_softc, CCMC_CBCDR); return freq / (1 + ((cbcdr & CBCDR_AHB_PODF_MASK) >> CBCDR_AHB_PODF_SHIFT)); case IMX51CLK_IPG_CLK_ROOT: freq = imx51_get_clock(IMX51CLK_AHB_CLK_ROOT); - cbcdr = bus_read_4(ccm_softc->res[0], CCMC_CBCDR); + cbcdr = ccm_read_4(ccm_softc, CCMC_CBCDR); return freq / (1 + ((cbcdr & CBCDR_IPG_PODF_MASK) >> CBCDR_IPG_PODF_SHIFT)); case IMX51CLK_PERCLK_ROOT: - cbcmr = bus_read_4(ccm_softc->res[0], CCMC_CBCMR); + cbcmr = ccm_read_4(ccm_softc, CCMC_CBCMR); if (cbcmr & CBCMR_PERCLK_IPG_SEL) return imx51_get_clock(IMX51CLK_IPG_CLK_ROOT); if (cbcmr & CBCMR_PERCLK_LP_APM_SEL) freq = imx51_get_clock(IMX51CLK_LP_APM); else freq = imx51_get_clock(IMX51CLK_MAIN_BUS_CLK_SRC); - cbcdr = bus_read_4(ccm_softc->res[0], CCMC_CBCDR); + cbcdr = ccm_read_4(ccm_softc, CCMC_CBCDR); #ifdef IMXCCMDEBUG printf("cbcmr=%x cbcdr=%x\n", cbcmr, cbcdr); @@ -316,8 +383,8 @@ imx51_get_clock(enum imx51_clock clk) CBCDR_PERCLK_PODF_SHIFT); return freq; case IMX51CLK_UART_CLK_ROOT: - cscdr1 = bus_read_4(ccm_softc->res[0], CCMC_CSCDR1); - cscmr1 = bus_read_4(ccm_softc->res[0], CCMC_CSCMR1); + cscdr1 = ccm_read_4(ccm_softc, CCMC_CSCDR1); + cscmr1 = ccm_read_4(ccm_softc, CCMC_CSCMR1); #ifdef IMXCCMDEBUG printf("cscdr1=%x cscmr1=%x\n", cscdr1, cscmr1); @@ -344,7 +411,7 @@ imx51_get_clock(enum imx51_clock clk) CSCDR1_UART_CLK_PODF_SHIFT)); case IMX51CLK_IPU_HSP_CLK_ROOT: freq = 0; - cbcmr = bus_read_4(ccm_softc->res[0], CCMC_CBCMR); + cbcmr = ccm_read_4(ccm_softc, CCMC_CBCMR); switch ((cbcmr & CBCMR_IPU_HSP_CLK_SEL_MASK) >> CBCMR_IPU_HSP_CLK_SEL_SHIFT) { case 0: @@ -387,16 +454,16 @@ imx51_get_pll_freq(u_int pll_no) KASSERT(1 <= pll_no && pll_no <= IMX51_N_DPLLS, ("Wrong PLL id")); - dp_ctrl = bus_read_4(ccm_softc->res[pll_no], DPLL_DP_CTL); + dp_ctrl = pll_read_4(ccm_softc, pll_no, DPLL_DP_CTL); if (dp_ctrl & DP_CTL_HFSM) { - dp_op = bus_read_4(ccm_softc->res[pll_no], DPLL_DP_HFS_OP); - dp_mfd = bus_read_4(ccm_softc->res[pll_no], DPLL_DP_HFS_MFD); - dp_mfn = bus_read_4(ccm_softc->res[pll_no], DPLL_DP_HFS_MFN); + dp_op = pll_read_4(ccm_softc, pll_no, DPLL_DP_HFS_OP); + dp_mfd = pll_read_4(ccm_softc, pll_no, DPLL_DP_HFS_MFD); + dp_mfn = pll_read_4(ccm_softc, pll_no, DPLL_DP_HFS_MFN); } else { - dp_op = bus_read_4(ccm_softc->res[pll_no], DPLL_DP_OP); - dp_mfd = bus_read_4(ccm_softc->res[pll_no], DPLL_DP_MFD); - dp_mfn = bus_read_4(ccm_softc->res[pll_no], DPLL_DP_MFN); + dp_op = pll_read_4(ccm_softc, pll_no, DPLL_DP_OP); + dp_mfd = pll_read_4(ccm_softc, pll_no, DPLL_DP_MFD); + dp_mfn = pll_read_4(ccm_softc, pll_no, DPLL_DP_MFN); } pdf = dp_op & DP_OP_PDF_MASK; @@ -415,7 +482,7 @@ imx51_get_pll_freq(u_int pll_no) ref = 24000000; /* IMX51_OSC_FREQ */ break; case DP_CTL_REF_CLK_SEL_FPM: - ccr = bus_read_4(ccm_softc->res[0], CCMC_CCR); + ccr = ccm_read_4(ccm_softc, CCMC_CCR); if (ccr & CCR_FPM_MULT) /* TODO: get from FDT "fsl,imx-ckil" */ ref = 32768 * 1024; @@ -460,10 +527,10 @@ imx51_clk_gating(int clk_src, int mode) group = CCMR_CCGR_MODULE(clk_src); field = clk_src % CCMR_CCGR_NSOURCE; - reg = bus_read_4(ccm_softc->res[0], CCMC_CCGR(group)); + reg = ccm_read_4(ccm_softc, CCMC_CCGR(group)); reg &= ~(0x03 << field * 2); reg |= (mode << field * 2); - bus_write_4(ccm_softc->res[0], CCMC_CCGR(group), reg); + ccm_write_4(ccm_softc, CCMC_CCGR(group), reg); } int @@ -471,7 +538,7 @@ imx51_get_clk_gating(int clk_src) { uint32_t reg; - reg = bus_read_4(ccm_softc->res[0], + reg = ccm_read_4(ccm_softc, CCMC_CCGR(CCMR_CCGR_MODULE(clk_src))); return ((reg >> (clk_src % CCMR_CCGR_NSOURCE) * 2) & 0x03); } @@ -489,20 +556,20 @@ imx_ccm_usb_enable(device_t dev) * Select PLL2 as the source for the USB clock. * The default is PLL3, but U-boot changes it to PLL2. */ - regval = bus_read_4(ccm_softc->res[0], CCMC_CSCMR1); + regval = ccm_read_4(ccm_softc, CCMC_CSCMR1); regval &= ~CSCMR1_USBOH3_CLK_SEL_MASK; regval |= 1 << CSCMR1_USBOH3_CLK_SEL_SHIFT; - bus_write_4(ccm_softc->res[0], CCMC_CSCMR1, regval); + ccm_write_4(ccm_softc, CCMC_CSCMR1, regval); /* * Set the USB clock pre-divider to div-by-5, post-divider to div-by-2. */ - regval = bus_read_4(ccm_softc->res[0], CCMC_CSCDR1); + regval = ccm_read_4(ccm_softc, CCMC_CSCDR1); regval &= ~CSCDR1_USBOH3_CLK_PODF_MASK; regval &= ~CSCDR1_USBOH3_CLK_PRED_MASK; regval |= 4 << CSCDR1_USBOH3_CLK_PRED_SHIFT; regval |= 1 << CSCDR1_USBOH3_CLK_PODF_SHIFT; - bus_write_4(ccm_softc->res[0], CCMC_CSCDR1, regval); + ccm_write_4(ccm_softc, CCMC_CSCDR1, regval); /* * The same two clocks gates are used on imx51 and imx53. @@ -522,9 +589,9 @@ imx_ccm_usbphy_enable(device_t dev) * strange, but we'll go with it until more is known. */ if (imx_soc_type() == IMXSOC_53) { - regval = bus_read_4(ccm_softc->res[0], CCMC_CSCMR1); + regval = ccm_read_4(ccm_softc, CCMC_CSCMR1); regval |= 1 << CSCMR1_USBPHY_CLK_SEL_SHIFT; - bus_write_4(ccm_softc->res[0], CCMC_CSCMR1, regval); + ccm_write_4(ccm_softc, CCMC_CSCMR1, regval); } /* From owner-svn-src-head@freebsd.org Sat Mar 18 18:10:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5FA6D126D5; Sat, 18 Mar 2017 18:10:03 +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 mx1.freebsd.org (Postfix) with ESMTPS id 9B32412C6; Sat, 18 Mar 2017 18:10:03 +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 v2IIA2FW062433; Sat, 18 Mar 2017 18:10:02 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2IIA2ph062431; Sat, 18 Mar 2017 18:10:02 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201703181810.v2IIA2ph062431@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 18 Mar 2017 18:10:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315496 - head/usr.bin/truss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 18 Mar 2017 18:10:04 -0000 Author: jhb Date: Sat Mar 18 18:10:02 2017 New Revision: 315496 URL: https://svnweb.freebsd.org/changeset/base/315496 Log: Decode the arguments passed to cap_fcntls_get() and cap_fcntls_limit(). Modified: head/usr.bin/truss/syscall.h head/usr.bin/truss/syscalls.c Modified: head/usr.bin/truss/syscall.h ============================================================================== --- head/usr.bin/truss/syscall.h Sat Mar 18 18:05:39 2017 (r315495) +++ head/usr.bin/truss/syscall.h Sat Mar 18 18:10:02 2017 (r315496) @@ -45,6 +45,7 @@ enum Argtype { None = 1, Hex, Octal, Int Pathconf, Rforkflags, ExitStatus, Waitoptions, Idtype, Procctl, LinuxSockArgs, Umtxop, Atfd, Atflags, Timespec2, Accessmode, Long, Sysarch, ExecArgs, ExecEnv, PipeFds, QuadHex, Utrace, IntArray, Pipe2, + CapFcntlRights, CloudABIAdvice, CloudABIClockID, ClouduABIFDSFlags, CloudABIFDStat, CloudABIFileStat, CloudABIFileType, Modified: head/usr.bin/truss/syscalls.c ============================================================================== --- head/usr.bin/truss/syscalls.c Sat Mar 18 18:05:39 2017 (r315495) +++ head/usr.bin/truss/syscalls.c Sat Mar 18 18:10:02 2017 (r315496) @@ -92,6 +92,10 @@ static struct syscall decoded_syscalls[] { Int, 3 } } }, { .name = "break", .ret_type = 1, .nargs = 1, .args = { { Ptr, 0 } } }, + { .name = "cap_fcntls_get", .ret_type = 1, .nargs = 2, + .args = { { Int, 0 }, { CapFcntlRights | OUT, 1 } } }, + { .name = "cap_fcntls_limit", .ret_type = 1, .nargs = 2, + .args = { { Int, 0 }, { CapFcntlRights, 1 } } }, { .name = "chdir", .ret_type = 1, .nargs = 1, .args = { { Name, 0 } } }, { .name = "chflags", .ret_type = 1, .nargs = 2, @@ -791,6 +795,18 @@ print_mask_arg(bool (*decoder)(FILE *, i fprintf(fp, "|0x%x", rem); } +static void +print_mask_arg32(bool (*decoder)(FILE *, uint32_t, uint32_t *), FILE *fp, + uint32_t value) +{ + uint32_t rem; + + if (!decoder(fp, value, &rem)) + fprintf(fp, "0x%x", rem); + else if (rem != 0) + fprintf(fp, "|0x%x", rem); +} + #ifndef __LP64__ /* * Add argument padding to subsequent system calls afater a Quad @@ -1832,6 +1848,20 @@ print_arg(struct syscall_args *sc, unsig case Pipe2: print_mask_arg(sysdecode_pipe2_flags, fp, args[sc->offset]); break; + case CapFcntlRights: { + uint32_t rights; + + if (sc->type & OUT) { + if (get_struct(pid, (void *)args[sc->offset], &rights, + sizeof(rights)) == -1) { + fprintf(fp, "0x%lx", args[sc->offset]); + break; + } + } else + rights = args[sc->offset]; + print_mask_arg32(sysdecode_cap_fcntlrights, fp, rights); + break; + } case CloudABIAdvice: fputs(xlookup(cloudabi_advice, args[sc->offset]), fp); From owner-svn-src-head@freebsd.org Sat Mar 18 18:12:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0DC4D12B99; Sat, 18 Mar 2017 18:12:10 +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 mx1.freebsd.org (Postfix) with ESMTPS id 574AD17AC; Sat, 18 Mar 2017 18:12:10 +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 v2IIC9XP063449; Sat, 18 Mar 2017 18:12:09 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2IIC9jj063447; Sat, 18 Mar 2017 18:12:09 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201703181812.v2IIC9jj063447@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 18 Mar 2017 18:12:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315497 - head/usr.bin/truss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 18 Mar 2017 18:12:10 -0000 Author: jhb Date: Sat Mar 18 18:12:09 2017 New Revision: 315497 URL: https://svnweb.freebsd.org/changeset/base/315497 Log: Decode arguments passed to posix_fadvise(). Modified: head/usr.bin/truss/syscall.h head/usr.bin/truss/syscalls.c Modified: head/usr.bin/truss/syscall.h ============================================================================== --- head/usr.bin/truss/syscall.h Sat Mar 18 18:10:02 2017 (r315496) +++ head/usr.bin/truss/syscall.h Sat Mar 18 18:12:09 2017 (r315497) @@ -45,7 +45,7 @@ enum Argtype { None = 1, Hex, Octal, Int Pathconf, Rforkflags, ExitStatus, Waitoptions, Idtype, Procctl, LinuxSockArgs, Umtxop, Atfd, Atflags, Timespec2, Accessmode, Long, Sysarch, ExecArgs, ExecEnv, PipeFds, QuadHex, Utrace, IntArray, Pipe2, - CapFcntlRights, + CapFcntlRights, Fadvice, CloudABIAdvice, CloudABIClockID, ClouduABIFDSFlags, CloudABIFDStat, CloudABIFileStat, CloudABIFileType, Modified: head/usr.bin/truss/syscalls.c ============================================================================== --- head/usr.bin/truss/syscalls.c Sat Mar 18 18:10:02 2017 (r315496) +++ head/usr.bin/truss/syscalls.c Sat Mar 18 18:12:09 2017 (r315497) @@ -243,6 +243,9 @@ static struct syscall decoded_syscalls[] .args = { { Ptr, 0 }, { Pipe2, 1 } } }, { .name = "poll", .ret_type = 1, .nargs = 3, .args = { { Pollfd, 0 }, { Int, 1 }, { Int, 2 } } }, + { .name = "posix_fadvise", .ret_type = 1, .nargs = 4, + .args = { { Int, 0 }, { QuadHex, 1 }, { QuadHex, 2 }, + { Fadvice, 3 } } }, { .name = "posix_openpt", .ret_type = 1, .nargs = 1, .args = { { Open, 0 } } }, { .name = "procctl", .ret_type = 1, .nargs = 4, @@ -1862,6 +1865,9 @@ print_arg(struct syscall_args *sc, unsig print_mask_arg32(sysdecode_cap_fcntlrights, fp, rights); break; } + case Fadvice: + print_integer_arg(sysdecode_fadvice, fp, args[sc->offset]); + break; case CloudABIAdvice: fputs(xlookup(cloudabi_advice, args[sc->offset]), fp); From owner-svn-src-head@freebsd.org Sat Mar 18 18:14:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 008FED12D9C; Sat, 18 Mar 2017 18:14: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 mx1.freebsd.org (Postfix) with ESMTPS id C42871B61; Sat, 18 Mar 2017 18:14:18 +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 v2IIEH6x066429; Sat, 18 Mar 2017 18:14:17 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2IIEHxx066428; Sat, 18 Mar 2017 18:14:17 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201703181814.v2IIEHxx066428@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sat, 18 Mar 2017 18:14:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315498 - head/sys/compat/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 18 Mar 2017 18:14:19 -0000 Author: dchagin Date: Sat Mar 18 18:14:17 2017 New Revision: 315498 URL: https://svnweb.freebsd.org/changeset/base/315498 Log: Check for negative nanoseconds. Linux do that in timespec_valid(). Reported by: vangyzen@ MFC after: 1 week Modified: head/sys/compat/linux/linux_time.c Modified: head/sys/compat/linux/linux_time.c ============================================================================== --- head/sys/compat/linux/linux_time.c Sat Mar 18 18:12:09 2017 (r315497) +++ head/sys/compat/linux/linux_time.c Sat Mar 18 18:14:17 2017 (r315498) @@ -142,7 +142,7 @@ linux_to_native_timespec(struct timespec LIN_SDT_PROBE2(time, linux_to_native_timespec, entry, ntp, ltp); - if (ltp->tv_sec < 0 || ltp->tv_nsec > (l_long)999999999L) { + if (ltp->tv_sec < 0 || (l_ulong)ltp->tv_nsec > 999999999L) { LIN_SDT_PROBE1(time, linux_to_native_timespec, return, EINVAL); return (EINVAL); } From owner-svn-src-head@freebsd.org Sat Mar 18 18:19:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 014C6D12E55; Sat, 18 Mar 2017 18:19:32 +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 mx1.freebsd.org (Postfix) with ESMTPS id B51B21D17; Sat, 18 Mar 2017 18:19:32 +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 v2IIJVNr066680; Sat, 18 Mar 2017 18:19:31 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2IIJVM1066679; Sat, 18 Mar 2017 18:19:31 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201703181819.v2IIJVM1066679@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sat, 18 Mar 2017 18:19:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315499 - head/sys/compat/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 18 Mar 2017 18:19:33 -0000 Author: dchagin Date: Sat Mar 18 18:19:31 2017 New Revision: 315499 URL: https://svnweb.freebsd.org/changeset/base/315499 Log: Remove superflous break statment. 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 Sat Mar 18 18:14:17 2017 (r315498) +++ head/sys/compat/linux/linux_socket.c Sat Mar 18 18:19:31 2017 (r315499) @@ -1547,7 +1547,6 @@ linux_setsockopt(struct thread *td, stru return (kern_setsockopt(td, args->s, bsd_args.level, name, &tv, UIO_SYSSPACE, sizeof(tv))); /* NOTREACHED */ - break; default: break; } @@ -1619,7 +1618,6 @@ linux_getsockopt(struct thread *td, stru return (copyout(&linux_tv, PTRIN(args->optval), sizeof(linux_tv))); /* NOTREACHED */ - break; case LOCAL_PEERCRED: if (args->optlen != sizeof(lxu)) return (EINVAL); @@ -1636,7 +1634,6 @@ linux_getsockopt(struct thread *td, stru lxu.gid = xu.cr_gid; return (copyout(&lxu, PTRIN(args->optval), sizeof(lxu))); /* NOTREACHED */ - break; case SO_ERROR: len = sizeof(newval); error = kern_getsockopt(td, args->s, bsd_args.level, From owner-svn-src-head@freebsd.org Sat Mar 18 18:21:42 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9C30D12FF6; Sat, 18 Mar 2017 18:21:42 +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 mx1.freebsd.org (Postfix) with ESMTPS id 73AF5105D; Sat, 18 Mar 2017 18:21:42 +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 v2IILfJD069568; Sat, 18 Mar 2017 18:21:41 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2IILfXJ069566; Sat, 18 Mar 2017 18:21:41 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201703181821.v2IILfXJ069566@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 18 Mar 2017 18:21:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315500 - head/usr.bin/truss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 18 Mar 2017 18:21:42 -0000 Author: jhb Date: Sat Mar 18 18:21:41 2017 New Revision: 315500 URL: https://svnweb.freebsd.org/changeset/base/315500 Log: Decode file flags passed to *chflags*(). While here, decode arguments passed to fchflags() and chflagsat(). Modified: head/usr.bin/truss/syscall.h head/usr.bin/truss/syscalls.c Modified: head/usr.bin/truss/syscall.h ============================================================================== --- head/usr.bin/truss/syscall.h Sat Mar 18 18:19:31 2017 (r315499) +++ head/usr.bin/truss/syscall.h Sat Mar 18 18:21:41 2017 (r315500) @@ -45,7 +45,7 @@ enum Argtype { None = 1, Hex, Octal, Int Pathconf, Rforkflags, ExitStatus, Waitoptions, Idtype, Procctl, LinuxSockArgs, Umtxop, Atfd, Atflags, Timespec2, Accessmode, Long, Sysarch, ExecArgs, ExecEnv, PipeFds, QuadHex, Utrace, IntArray, Pipe2, - CapFcntlRights, Fadvice, + CapFcntlRights, Fadvice, FileFlags, CloudABIAdvice, CloudABIClockID, ClouduABIFDSFlags, CloudABIFDStat, CloudABIFileStat, CloudABIFileType, Modified: head/usr.bin/truss/syscalls.c ============================================================================== --- head/usr.bin/truss/syscalls.c Sat Mar 18 18:19:31 2017 (r315499) +++ head/usr.bin/truss/syscalls.c Sat Mar 18 18:21:41 2017 (r315500) @@ -99,7 +99,10 @@ static struct syscall decoded_syscalls[] { .name = "chdir", .ret_type = 1, .nargs = 1, .args = { { Name, 0 } } }, { .name = "chflags", .ret_type = 1, .nargs = 2, - .args = { { Name | IN, 0 }, { Hex, 1 } } }, + .args = { { Name | IN, 0 }, { FileFlags, 1 } } }, + { .name = "chflagsat", .ret_type = 1, .nargs = 4, + .args = { { Atfd, 0 }, { Name | IN, 1 }, { FileFlags, 2 }, + { Atflags, 3 } } }, { .name = "chmod", .ret_type = 1, .nargs = 2, .args = { { Name, 0 }, { Octal, 1 } } }, { .name = "chown", .ret_type = 1, .nargs = 3, @@ -125,6 +128,8 @@ static struct syscall decoded_syscalls[] { .name = "faccessat", .ret_type = 1, .nargs = 4, .args = { { Atfd, 0 }, { Name | IN, 1 }, { Accessmode, 2 }, { Atflags, 3 } } }, + { .name = "fchflags", .ret_type = 1, .nargs = 2, + .args = { { Int, 0 }, { FileFlags, 1 } } }, { .name = "fchmod", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { Octal, 1 } } }, { .name = "fchmodat", .ret_type = 1, .nargs = 4, @@ -189,7 +194,7 @@ static struct syscall decoded_syscalls[] { .name = "kse_release", .ret_type = 0, .nargs = 1, .args = { { Timespec, 0 } } }, { .name = "lchflags", .ret_type = 1, .nargs = 2, - .args = { { Name | IN, 0 }, { Hex, 1 } } }, + .args = { { Name | IN, 0 }, { FileFlags, 1 } } }, { .name = "lchmod", .ret_type = 1, .nargs = 2, .args = { { Name, 0 }, { Octal, 1 } } }, { .name = "lchown", .ret_type = 1, .nargs = 3, @@ -1868,6 +1873,15 @@ print_arg(struct syscall_args *sc, unsig case Fadvice: print_integer_arg(sysdecode_fadvice, fp, args[sc->offset]); break; + case FileFlags: { + fflags_t rem; + + if (!sysdecode_fileflags(fp, args[sc->offset], &rem)) + fprintf(fp, "0x%x", rem); + else if (rem != 0) + fprintf(fp, "|0x%x", rem); + break; + } case CloudABIAdvice: fputs(xlookup(cloudabi_advice, args[sc->offset]), fp); From owner-svn-src-head@freebsd.org Sat Mar 18 18:23:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2476D12073; Sat, 18 Mar 2017 18:23:31 +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 mx1.freebsd.org (Postfix) with ESMTPS id 82878125E; Sat, 18 Mar 2017 18:23:31 +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 v2IINUQs070535; Sat, 18 Mar 2017 18:23:30 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2IINU7d070531; Sat, 18 Mar 2017 18:23:30 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201703181823.v2IINU7d070531@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sat, 18 Mar 2017 18:23:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315501 - in head/sys: amd64/linux amd64/linux32 compat/linux i386/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 18 Mar 2017 18:23:31 -0000 Author: dchagin Date: Sat Mar 18 18:23:30 2017 New Revision: 315501 URL: https://svnweb.freebsd.org/changeset/base/315501 Log: To reduce code duplication move socket defines to the MI path. MFC after: 1 week Modified: head/sys/amd64/linux/linux.h head/sys/amd64/linux32/linux.h head/sys/compat/linux/linux_socket.h head/sys/i386/linux/linux.h Modified: head/sys/amd64/linux/linux.h ============================================================================== --- head/sys/amd64/linux/linux.h Sat Mar 18 18:21:41 2017 (r315500) +++ head/sys/amd64/linux/linux.h Sat Mar 18 18:23:30 2017 (r315501) @@ -383,50 +383,6 @@ union l_semun { l_uintptr_t __pad; }; -/* - * Socket defines - */ - -#define LINUX_SOL_SOCKET 1 -#define LINUX_SOL_IP 0 -#define LINUX_SOL_IPX 256 -#define LINUX_SOL_AX25 257 -#define LINUX_SOL_TCP 6 -#define LINUX_SOL_UDP 17 - -#define LINUX_SO_DEBUG 1 -#define LINUX_SO_REUSEADDR 2 -#define LINUX_SO_TYPE 3 -#define LINUX_SO_ERROR 4 -#define LINUX_SO_DONTROUTE 5 -#define LINUX_SO_BROADCAST 6 -#define LINUX_SO_SNDBUF 7 -#define LINUX_SO_RCVBUF 8 -#define LINUX_SO_KEEPALIVE 9 -#define LINUX_SO_OOBINLINE 10 -#define LINUX_SO_NO_CHECK 11 -#define LINUX_SO_PRIORITY 12 -#define LINUX_SO_LINGER 13 -#define LINUX_SO_PASSCRED 16 -#define LINUX_SO_PEERCRED 17 -#define LINUX_SO_RCVLOWAT 18 -#define LINUX_SO_SNDLOWAT 19 -#define LINUX_SO_RCVTIMEO 20 -#define LINUX_SO_SNDTIMEO 21 -#define LINUX_SO_TIMESTAMP 29 -#define LINUX_SO_ACCEPTCONN 30 - -#define LINUX_IP_TOS 1 -#define LINUX_IP_TTL 2 -#define LINUX_IP_HDRINCL 3 -#define LINUX_IP_OPTIONS 4 - -#define LINUX_IP_MULTICAST_IF 32 -#define LINUX_IP_MULTICAST_TTL 33 -#define LINUX_IP_MULTICAST_LOOP 34 -#define LINUX_IP_ADD_MEMBERSHIP 35 -#define LINUX_IP_DROP_MEMBERSHIP 36 - struct l_sockaddr { l_ushort sa_family; char sa_data[14]; Modified: head/sys/amd64/linux32/linux.h ============================================================================== --- head/sys/amd64/linux32/linux.h Sat Mar 18 18:21:41 2017 (r315500) +++ head/sys/amd64/linux32/linux.h Sat Mar 18 18:23:30 2017 (r315501) @@ -474,37 +474,6 @@ union l_semun { l_uintptr_t __pad; } __packed; -/* - * Socket defines - */ -#define LINUX_SOL_SOCKET 1 -#define LINUX_SOL_IP 0 -#define LINUX_SOL_IPX 256 -#define LINUX_SOL_AX25 257 -#define LINUX_SOL_TCP 6 -#define LINUX_SOL_UDP 17 - -#define LINUX_SO_DEBUG 1 -#define LINUX_SO_REUSEADDR 2 -#define LINUX_SO_TYPE 3 -#define LINUX_SO_ERROR 4 -#define LINUX_SO_DONTROUTE 5 -#define LINUX_SO_BROADCAST 6 -#define LINUX_SO_SNDBUF 7 -#define LINUX_SO_RCVBUF 8 -#define LINUX_SO_KEEPALIVE 9 -#define LINUX_SO_OOBINLINE 10 -#define LINUX_SO_NO_CHECK 11 -#define LINUX_SO_PRIORITY 12 -#define LINUX_SO_LINGER 13 -#define LINUX_SO_PEERCRED 17 -#define LINUX_SO_RCVLOWAT 18 -#define LINUX_SO_SNDLOWAT 19 -#define LINUX_SO_RCVTIMEO 20 -#define LINUX_SO_SNDTIMEO 21 -#define LINUX_SO_TIMESTAMP 29 -#define LINUX_SO_ACCEPTCONN 30 - struct l_sockaddr { l_ushort sa_family; char sa_data[14]; Modified: head/sys/compat/linux/linux_socket.h ============================================================================== --- head/sys/compat/linux/linux_socket.h Sat Mar 18 18:21:41 2017 (r315500) +++ head/sys/compat/linux/linux_socket.h Sat Mar 18 18:23:30 2017 (r315501) @@ -172,6 +172,39 @@ int linux_accept(struct thread *td, stru #define LINUX_SENDMMSG 20 #endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */ +/* Socket defines */ +#define LINUX_SOL_SOCKET 1 +#define LINUX_SOL_IP 0 +#define LINUX_SOL_TCP 6 +#define LINUX_SOL_UDP 17 +#define LINUX_SOL_IPV6 41 +#define LINUX_SOL_IPX 256 +#define LINUX_SOL_AX25 257 + +#define LINUX_SO_DEBUG 1 +#define LINUX_SO_REUSEADDR 2 +#define LINUX_SO_TYPE 3 +#define LINUX_SO_ERROR 4 +#define LINUX_SO_DONTROUTE 5 +#define LINUX_SO_BROADCAST 6 +#define LINUX_SO_SNDBUF 7 +#define LINUX_SO_RCVBUF 8 +#define LINUX_SO_KEEPALIVE 9 +#define LINUX_SO_OOBINLINE 10 +#define LINUX_SO_NO_CHECK 11 +#define LINUX_SO_PRIORITY 12 +#define LINUX_SO_LINGER 13 +#ifndef LINUX_SO_PASSCRED /* powerpc differs */ +#define LINUX_SO_PASSCRED 16 +#define LINUX_SO_PEERCRED 17 +#define LINUX_SO_RCVLOWAT 18 +#define LINUX_SO_SNDLOWAT 19 +#define LINUX_SO_RCVTIMEO 20 +#define LINUX_SO_SNDTIMEO 21 +#endif +#define LINUX_SO_TIMESTAMP 29 +#define LINUX_SO_ACCEPTCONN 30 + /* Socket options */ #define LINUX_IP_TOS 1 #define LINUX_IP_TTL 2 Modified: head/sys/i386/linux/linux.h ============================================================================== --- head/sys/i386/linux/linux.h Sat Mar 18 18:21:41 2017 (r315500) +++ head/sys/i386/linux/linux.h Sat Mar 18 18:23:30 2017 (r315501) @@ -453,37 +453,6 @@ union l_semun { void *__pad; }; -/* - * Socket defines - */ -#define LINUX_SOL_SOCKET 1 -#define LINUX_SOL_IP 0 -#define LINUX_SOL_IPX 256 -#define LINUX_SOL_AX25 257 -#define LINUX_SOL_TCP 6 -#define LINUX_SOL_UDP 17 - -#define LINUX_SO_DEBUG 1 -#define LINUX_SO_REUSEADDR 2 -#define LINUX_SO_TYPE 3 -#define LINUX_SO_ERROR 4 -#define LINUX_SO_DONTROUTE 5 -#define LINUX_SO_BROADCAST 6 -#define LINUX_SO_SNDBUF 7 -#define LINUX_SO_RCVBUF 8 -#define LINUX_SO_KEEPALIVE 9 -#define LINUX_SO_OOBINLINE 10 -#define LINUX_SO_NO_CHECK 11 -#define LINUX_SO_PRIORITY 12 -#define LINUX_SO_LINGER 13 -#define LINUX_SO_PEERCRED 17 -#define LINUX_SO_RCVLOWAT 18 -#define LINUX_SO_SNDLOWAT 19 -#define LINUX_SO_RCVTIMEO 20 -#define LINUX_SO_SNDTIMEO 21 -#define LINUX_SO_TIMESTAMP 29 -#define LINUX_SO_ACCEPTCONN 30 - struct l_sockaddr { l_ushort sa_family; char sa_data[14]; From owner-svn-src-head@freebsd.org Sat Mar 18 18:26:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CCE2DD121BB; Sat, 18 Mar 2017 18:26:57 +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 mx1.freebsd.org (Postfix) with ESMTPS id 9A09F162F; Sat, 18 Mar 2017 18:26:57 +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 v2IIQu2h070952; Sat, 18 Mar 2017 18:26:56 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2IIQuKB070950; Sat, 18 Mar 2017 18:26:56 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201703181826.v2IIQuKB070950@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 18 Mar 2017 18:26:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315502 - head/usr.bin/truss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 18 Mar 2017 18:26:57 -0000 Author: jhb Date: Sat Mar 18 18:26:56 2017 New Revision: 315502 URL: https://svnweb.freebsd.org/changeset/base/315502 Log: Decode flock() operation. Modified: head/usr.bin/truss/syscall.h head/usr.bin/truss/syscalls.c Modified: head/usr.bin/truss/syscall.h ============================================================================== --- head/usr.bin/truss/syscall.h Sat Mar 18 18:23:30 2017 (r315501) +++ head/usr.bin/truss/syscall.h Sat Mar 18 18:26:56 2017 (r315502) @@ -45,7 +45,7 @@ enum Argtype { None = 1, Hex, Octal, Int Pathconf, Rforkflags, ExitStatus, Waitoptions, Idtype, Procctl, LinuxSockArgs, Umtxop, Atfd, Atflags, Timespec2, Accessmode, Long, Sysarch, ExecArgs, ExecEnv, PipeFds, QuadHex, Utrace, IntArray, Pipe2, - CapFcntlRights, Fadvice, FileFlags, + CapFcntlRights, Fadvice, FileFlags, Flockop, CloudABIAdvice, CloudABIClockID, ClouduABIFDSFlags, CloudABIFDStat, CloudABIFileStat, CloudABIFileType, Modified: head/usr.bin/truss/syscalls.c ============================================================================== --- head/usr.bin/truss/syscalls.c Sat Mar 18 18:23:30 2017 (r315501) +++ head/usr.bin/truss/syscalls.c Sat Mar 18 18:26:56 2017 (r315502) @@ -141,6 +141,8 @@ static struct syscall decoded_syscalls[] { Atflags, 4 } } }, { .name = "fcntl", .ret_type = 1, .nargs = 3, .args = { { Int, 0 }, { Fcntl, 1 }, { Fcntlflag, 2 } } }, + { .name = "flock", .ret_type = 1, .nargs = 2, + .args = { { Int, 0 }, { Flockop, 1 } } }, { .name = "fstat", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { Stat | OUT, 1 } } }, { .name = "fstatat", .ret_type = 1, .nargs = 4, @@ -1882,6 +1884,9 @@ print_arg(struct syscall_args *sc, unsig fprintf(fp, "|0x%x", rem); break; } + case Flockop: + print_mask_arg(sysdecode_flock_operation, fp, args[sc->offset]); + break; case CloudABIAdvice: fputs(xlookup(cloudabi_advice, args[sc->offset]), fp); From owner-svn-src-head@freebsd.org Sat Mar 18 18:31:05 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2391D1224F; Sat, 18 Mar 2017 18:31:05 +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 mx1.freebsd.org (Postfix) with ESMTPS id 928A11822; Sat, 18 Mar 2017 18:31:05 +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 v2IIV4Ri071160; Sat, 18 Mar 2017 18:31:04 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2IIV43X071159; Sat, 18 Mar 2017 18:31:04 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201703181831.v2IIV43X071159@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sat, 18 Mar 2017 18:31:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315503 - head/sys/compat/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 18 Mar 2017 18:31:05 -0000 Author: dchagin Date: Sat Mar 18 18:31:04 2017 New Revision: 315503 URL: https://svnweb.freebsd.org/changeset/base/315503 Log: As noted by Roel Bouwman Linux allows a large buffer size than the struct ucred size. Fix this. PR: 102956 Reported by: Roel Bouwman 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 Sat Mar 18 18:26:56 2017 (r315502) +++ head/sys/compat/linux/linux_socket.c Sat Mar 18 18:31:04 2017 (r315503) @@ -1619,7 +1619,7 @@ linux_getsockopt(struct thread *td, stru sizeof(linux_tv))); /* NOTREACHED */ case LOCAL_PEERCRED: - if (args->optlen != sizeof(lxu)) + if (args->optlen < sizeof(lxu)) return (EINVAL); xulen = sizeof(xu); error = kern_getsockopt(td, args->s, bsd_args.level, From owner-svn-src-head@freebsd.org Sat Mar 18 18:31:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37EE8D123FF; Sat, 18 Mar 2017 18:31:47 +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 mx1.freebsd.org (Postfix) with ESMTPS id E29701B2B; Sat, 18 Mar 2017 18:31:46 +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 v2IIVk5p071906; Sat, 18 Mar 2017 18:31:46 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2IIVjRF071903; Sat, 18 Mar 2017 18:31:45 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201703181831.v2IIVjRF071903@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 18 Mar 2017 18:31:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315504 - head/usr.bin/truss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 18 Mar 2017 18:31:47 -0000 Author: jhb Date: Sat Mar 18 18:31:45 2017 New Revision: 315504 URL: https://svnweb.freebsd.org/changeset/base/315504 Log: Decode arguments passed to getfsstat(). Note that this does not yet decode the statfs structures returned by getfsstat(). Modified: head/usr.bin/truss/syscall.h head/usr.bin/truss/syscalls.c Modified: head/usr.bin/truss/syscall.h ============================================================================== --- head/usr.bin/truss/syscall.h Sat Mar 18 18:31:04 2017 (r315503) +++ head/usr.bin/truss/syscall.h Sat Mar 18 18:31:45 2017 (r315504) @@ -45,7 +45,7 @@ enum Argtype { None = 1, Hex, Octal, Int Pathconf, Rforkflags, ExitStatus, Waitoptions, Idtype, Procctl, LinuxSockArgs, Umtxop, Atfd, Atflags, Timespec2, Accessmode, Long, Sysarch, ExecArgs, ExecEnv, PipeFds, QuadHex, Utrace, IntArray, Pipe2, - CapFcntlRights, Fadvice, FileFlags, Flockop, + CapFcntlRights, Fadvice, FileFlags, Flockop, Getfsstatmode, CloudABIAdvice, CloudABIClockID, ClouduABIFDSFlags, CloudABIFDStat, CloudABIFileStat, CloudABIFileType, Modified: head/usr.bin/truss/syscalls.c ============================================================================== --- head/usr.bin/truss/syscalls.c Sat Mar 18 18:31:04 2017 (r315503) +++ head/usr.bin/truss/syscalls.c Sat Mar 18 18:31:45 2017 (r315504) @@ -158,6 +158,8 @@ static struct syscall decoded_syscalls[] .args = { { Int, 0 }, { Timeval2 | IN, 1 } } }, { .name = "futimesat", .ret_type = 1, .nargs = 3, .args = { { Atfd, 0 }, { Name | IN, 1 }, { Timeval2 | IN, 2 } } }, + { .name = "getfsstat", .ret_type = 1, .nargs = 3, + .args = { { Ptr, 0 }, { Long, 1 }, { Getfsstatmode, 2 } } }, { .name = "getitimer", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { Itimerval | OUT, 2 } } }, { .name = "getpeername", .ret_type = 1, .nargs = 3, @@ -1887,6 +1889,10 @@ print_arg(struct syscall_args *sc, unsig case Flockop: print_mask_arg(sysdecode_flock_operation, fp, args[sc->offset]); break; + case Getfsstatmode: + print_integer_arg(sysdecode_getfsstat_mode, fp, + args[sc->offset]); + break; case CloudABIAdvice: fputs(xlookup(cloudabi_advice, args[sc->offset]), fp); From owner-svn-src-head@freebsd.org Sat Mar 18 18:34:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF60CD1256C; Sat, 18 Mar 2017 18:34:30 +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 mx1.freebsd.org (Postfix) with ESMTPS id AA15B103A; Sat, 18 Mar 2017 18:34:30 +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 v2IIYTIi075409; Sat, 18 Mar 2017 18:34:29 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2IIYTal075402; Sat, 18 Mar 2017 18:34:29 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201703181834.v2IIYTal075402@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sat, 18 Mar 2017 18:34:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315505 - in head/sys: amd64/linux amd64/linux32 compat/linux i386/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 18 Mar 2017 18:34:30 -0000 Author: dchagin Date: Sat Mar 18 18:34:29 2017 New Revision: 315505 URL: https://svnweb.freebsd.org/changeset/base/315505 Log: Implement getrandom() syscall. Note. GRND_RANDOM option is not supported for now. MFC after: 1 month Modified: head/sys/amd64/linux/linux_dummy.c head/sys/amd64/linux32/linux32_dummy.c head/sys/compat/linux/linux_misc.c head/sys/compat/linux/linux_misc.h head/sys/i386/linux/linux_dummy.c Modified: head/sys/amd64/linux/linux_dummy.c ============================================================================== --- head/sys/amd64/linux/linux_dummy.c Sat Mar 18 18:31:45 2017 (r315504) +++ head/sys/amd64/linux/linux_dummy.c Sat Mar 18 18:34:29 2017 (r315505) @@ -135,7 +135,6 @@ DUMMY(sched_getattr); DUMMY(renameat2); /* linux 3.15: */ DUMMY(seccomp); -DUMMY(getrandom); DUMMY(memfd_create); DUMMY(kexec_file_load); /* linux 3.18: */ Modified: head/sys/amd64/linux32/linux32_dummy.c ============================================================================== --- head/sys/amd64/linux32/linux32_dummy.c Sat Mar 18 18:31:45 2017 (r315504) +++ head/sys/amd64/linux32/linux32_dummy.c Sat Mar 18 18:34:29 2017 (r315505) @@ -144,7 +144,6 @@ DUMMY(sched_getattr); DUMMY(renameat2); /* linux 3.15: */ DUMMY(seccomp); -DUMMY(getrandom); DUMMY(memfd_create); /* linux 3.18: */ DUMMY(bpf); Modified: head/sys/compat/linux/linux_misc.c ============================================================================== --- head/sys/compat/linux/linux_misc.c Sat Mar 18 18:31:45 2017 (r315504) +++ head/sys/compat/linux/linux_misc.c Sat Mar 18 18:34:29 2017 (r315505) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -65,6 +66,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -2508,3 +2510,27 @@ linux_to_bsd_waitopts(int options, int * if (options & __WCLONE) *bsdopts |= WLINUXCLONE; } + +int +linux_getrandom(struct thread *td, struct linux_getrandom_args *args) +{ + struct uio uio; + struct iovec iov; + + if (args->flags & ~(LINUX_GRND_NONBLOCK|LINUX_GRND_RANDOM)) + return (EINVAL); + if (args->count > INT_MAX) + args->count = INT_MAX; + + iov.iov_base = args->buf; + iov.iov_len = args->count; + + uio.uio_iov = &iov; + uio.uio_iovcnt = 1; + uio.uio_resid = iov.iov_len; + uio.uio_segflg = UIO_USERSPACE; + uio.uio_rw = UIO_READ; + uio.uio_td = td; + + return (read_random_uio(&uio, args->flags & LINUX_GRND_NONBLOCK)); +} Modified: head/sys/compat/linux/linux_misc.h ============================================================================== --- head/sys/compat/linux/linux_misc.h Sat Mar 18 18:31:45 2017 (r315504) +++ head/sys/compat/linux/linux_misc.h Sat Mar 18 18:34:29 2017 (r315505) @@ -145,6 +145,10 @@ extern int stclohz; #define LINUX_RLIM_INFINITY (~0UL) +/* Linux getrandom flags */ +#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); void linux_to_bsd_waitopts(int options, int *bsdopts); Modified: head/sys/i386/linux/linux_dummy.c ============================================================================== --- head/sys/i386/linux/linux_dummy.c Sat Mar 18 18:31:45 2017 (r315504) +++ head/sys/i386/linux/linux_dummy.c Sat Mar 18 18:34:29 2017 (r315505) @@ -140,7 +140,6 @@ DUMMY(sched_getattr); DUMMY(renameat2); /* linux 3.15: */ DUMMY(seccomp); -DUMMY(getrandom); DUMMY(memfd_create); /* linux 3.18: */ DUMMY(bpf); From owner-svn-src-head@freebsd.org Sat Mar 18 18:38:14 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5BD3ED12614; Sat, 18 Mar 2017 18:38:14 +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 mx1.freebsd.org (Postfix) with ESMTPS id 0EF1011EC; Sat, 18 Mar 2017 18:38:13 +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 v2IIcD0C075587; Sat, 18 Mar 2017 18:38:13 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2IIcDGQ075586; Sat, 18 Mar 2017 18:38:13 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201703181838.v2IIcDGQ075586@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sat, 18 Mar 2017 18:38:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315506 - head/sys/compat/linsysfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 18 Mar 2017 18:38:14 -0000 Author: dchagin Date: Sat Mar 18 18:38:12 2017 New Revision: 315506 URL: https://svnweb.freebsd.org/changeset/base/315506 Log: Glibc get_nprocs() and get_nprocs_conf() uses the sysfs cpu infrastructure to get number of processors. Implement /sys/devices/system/cpu/. MFC after: 1 month Modified: head/sys/compat/linsysfs/linsysfs.c Modified: head/sys/compat/linsysfs/linsysfs.c ============================================================================== --- head/sys/compat/linsysfs/linsysfs.c Sat Mar 18 18:34:29 2017 (r315505) +++ head/sys/compat/linsysfs/linsysfs.c Sat Mar 18 18:38:12 2017 (r315506) @@ -221,13 +221,62 @@ linsysfs_run_bus(device_t dev, struct pf } /* + * Filler function for sys/devices/system/cpu/online + */ +static int +linsysfs_cpuonline(PFS_FILL_ARGS) +{ + + sbuf_printf(sb, "%d-%d\n", CPU_FIRST(), mp_maxid); + return (0); +} + +/* + * Filler function for sys/devices/system/cpu/cpuX/online + */ +static int +linsysfs_cpuxonline(PFS_FILL_ARGS) +{ + + sbuf_printf(sb, "1\n"); + return (0); +} + +static void +linsysfs_listcpus(struct pfs_node *dir) +{ + struct pfs_node *cpu; + char *name; + int i, count, len; + + len = 1; + count = mp_maxcpus; + while (count > 10) { + count /= 10; + len++; + } + len += sizeof("cpu"); + name = malloc(len, M_TEMP, M_WAITOK); + + for (i = 0; i < mp_ncpus; ++i) { + /* /sys/devices/system/cpu/cpuX */ + sprintf(name, "cpu%d", i); + cpu = pfs_create_dir(dir, name, NULL, NULL, NULL, 0); + + pfs_create_file(cpu, "online", &linsysfs_cpuxonline, + NULL, NULL, NULL, PFS_RD); + } + free(name, M_TEMP); +} + +/* * Constructor */ static int linsysfs_init(PFS_INIT_ARGS) { struct pfs_node *root; - struct pfs_node *dir; + struct pfs_node *dir, *sys, *cpu; struct pfs_node *pci; struct pfs_node *scsi; devclass_t devclass; @@ -241,10 +290,10 @@ linsysfs_init(PFS_INIT_ARGS) scsi = pfs_create_dir(root, "class", NULL, NULL, NULL, 0); scsi = pfs_create_dir(scsi, "scsi_host", NULL, NULL, NULL, 0); - /* /sys/device */ + /* /sys/devices */ dir = pfs_create_dir(root, "devices", NULL, NULL, NULL, 0); - /* /sys/device/pci0000:00 */ + /* /sys/devices/pci0000:00 */ pci = pfs_create_dir(dir, "pci0000:00", NULL, NULL, NULL, 0); devclass = devclass_find("root"); @@ -254,6 +303,18 @@ linsysfs_init(PFS_INIT_ARGS) dev = devclass_get_device(devclass, 0); linsysfs_run_bus(dev, pci, scsi, "/pci0000:00", "0000"); + + /* /sys/devices/system */ + sys = pfs_create_dir(dir, "system", NULL, NULL, NULL, 0); + + /* /sys/devices/system/cpu */ + cpu = pfs_create_dir(sys, "cpu", NULL, NULL, NULL, 0); + + pfs_create_file(cpu, "online", &linsysfs_cpuonline, + NULL, NULL, NULL, PFS_RD); + + linsysfs_listcpus(cpu); + return (0); } From owner-svn-src-head@freebsd.org Sat Mar 18 19:27:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63505D124DA; Sat, 18 Mar 2017 19:27:18 +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 mx1.freebsd.org (Postfix) with ESMTPS id 240481A0B; Sat, 18 Mar 2017 19:27:18 +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 v2IJRHOq096020; Sat, 18 Mar 2017 19:27:17 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2IJRHfB096018; Sat, 18 Mar 2017 19:27:17 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703181927.v2IJRHfB096018@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 18 Mar 2017 19:27:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315507 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 18 Mar 2017 19:27:18 -0000 Author: mav Date: Sat Mar 18 19:27:16 2017 New Revision: 315507 URL: https://svnweb.freebsd.org/changeset/base/315507 Log: Reorganize RQSTYPE_NOTIFY handling for chips <= 23xx. There were two copies of the code: one in generic code was half-broken, and another in platform code was never called. Leave only one in generic code and working. MFC after: 2 weeks Modified: head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_target.c Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Sat Mar 18 18:38:12 2017 (r315506) +++ head/sys/dev/isp/isp_freebsd.c Sat Mar 18 19:27:16 2017 (r315507) @@ -788,7 +788,6 @@ static void isp_target_start_ctio(ispsof static void isp_handle_platform_atio2(ispsoftc_t *, at2_entry_t *); static void isp_handle_platform_atio7(ispsoftc_t *, at7_entry_t *); static void isp_handle_platform_ctio(ispsoftc_t *, void *); -static void isp_handle_platform_notify_fc(ispsoftc_t *, in_fcentry_t *); static void isp_handle_platform_notify_24xx(ispsoftc_t *, in_fcentry_24xx_t *); static int isp_handle_platform_target_notify_ack(ispsoftc_t *, isp_notify_t *, uint32_t rsp); static void isp_handle_platform_target_tmf(ispsoftc_t *, isp_notify_t *); @@ -2283,80 +2282,6 @@ isp_handle_platform_ctio(ispsoftc_t *isp } static void -isp_handle_platform_notify_fc(ispsoftc_t *isp, in_fcentry_t *inp) -{ - int needack = 1; - switch (inp->in_status) { - case IN_PORT_LOGOUT: - /* - * XXX: Need to delete this initiator's WWN from the database - * XXX: Need to send this LOGOUT upstream - */ - isp_prt(isp, ISP_LOGWARN, "port logout of S_ID 0x%x", inp->in_iid); - break; - case IN_PORT_CHANGED: - isp_prt(isp, ISP_LOGWARN, "port changed for S_ID 0x%x", inp->in_iid); - break; - case IN_GLOBAL_LOGO: - isp_del_all_wwn_entries(isp, 0); - isp_prt(isp, ISP_LOGINFO, "all ports logged out"); - break; - case IN_ABORT_TASK: - { - lun_id_t lun; - uint16_t nphdl; - uint32_t sid; - uint64_t wwn; - fcportdb_t *lp; - isp_notify_t tmp, *nt = &tmp; - - if (ISP_CAP_SCCFW(isp)) { - lun = inp->in_scclun; - } else { - lun = inp->in_lun; - } - if (ISP_CAP_2KLOGIN(isp)) { - nphdl = ((in_fcentry_e_t *)inp)->in_iid; - } else { - nphdl = inp->in_iid; - } - if (isp_find_pdb_by_handle(isp, 0, nphdl, &lp)) { - wwn = lp->port_wwn; - sid = lp->portid; - } else { - wwn = INI_ANY; - sid = PORT_ANY; - } - isp_prt(isp, ISP_LOGTDEBUG0, "ABORT TASK RX_ID %x WWN 0x%016llx", - inp->in_seqid, (unsigned long long) wwn); - - ISP_MEMZERO(nt, sizeof (isp_notify_t)); - nt->nt_hba = isp; - nt->nt_tgt = FCPARAM(isp, 0)->isp_wwpn; - nt->nt_wwn = wwn; - nt->nt_nphdl = nphdl; - nt->nt_sid = sid; - nt->nt_did = PORT_ANY; - nt->nt_lun = lun; - nt->nt_tagval = inp->in_seqid; - nt->nt_tagval |= (((uint64_t)(isp->isp_serno++)) << 32); - nt->nt_need_ack = 1; - nt->nt_channel = 0; - nt->nt_ncode = NT_ABORT_TASK; - nt->nt_lreserved = inp; - isp_handle_platform_target_tmf(isp, nt); - needack = 0; - break; - } - default: - break; - } - if (needack) { - isp_async(isp, ISPASYNC_TARGET_NOTIFY_ACK, inp); - } -} - -static void isp_handle_platform_notify_24xx(ispsoftc_t *isp, in_fcentry_24xx_t *inot) { uint16_t nphdl; @@ -4159,11 +4084,7 @@ changed: isp_prt(isp, ISP_LOGWARN, "%s: unhandled target action 0x%x", __func__, hp->rqs_entry_type); break; case RQSTYPE_NOTIFY: - if (IS_24XX(isp)) { - isp_handle_platform_notify_24xx(isp, (in_fcentry_24xx_t *) hp); - } else { - isp_handle_platform_notify_fc(isp, (in_fcentry_t *) hp); - } + isp_handle_platform_notify_24xx(isp, (in_fcentry_24xx_t *) hp); break; case RQSTYPE_ATIO: isp_handle_platform_atio7(isp, (at7_entry_t *) hp); Modified: head/sys/dev/isp/isp_target.c ============================================================================== --- head/sys/dev/isp/isp_target.c Sat Mar 18 18:38:12 2017 (r315506) +++ head/sys/dev/isp/isp_target.c Sat Mar 18 19:27:16 2017 (r315507) @@ -62,7 +62,8 @@ static void isp_handle_abts(ispsoftc_t * static void isp_handle_atio2(ispsoftc_t *, at2_entry_t *); static void isp_handle_ctio2(ispsoftc_t *, ct2_entry_t *); static void isp_handle_ctio7(ispsoftc_t *, ct7_entry_t *); -static void isp_handle_24xx_inotify(ispsoftc_t *, in_fcentry_24xx_t *); +static void isp_handle_notify(ispsoftc_t *, in_fcentry_t *); +static void isp_handle_notify_24xx(ispsoftc_t *, in_fcentry_24xx_t *); /* * The Qlogic driver gets an interrupt to look at response queue entries. @@ -113,8 +114,6 @@ static void isp_handle_24xx_inotify(isps int isp_target_notify(ispsoftc_t *isp, void *vptr, uint32_t *optrp) { - uint16_t status; - uint32_t seqid; union { at2_entry_t *at2iop; at2e_entry_t *at2eiop; @@ -153,9 +152,7 @@ isp_target_notify(ispsoftc_t *isp, void #define hdrp unp.hp } unp; uint8_t local[QENTRY_LEN]; - uint16_t iid; int bus, type, len, level, rval = 1; - isp_notify_t notify; type = isp_get_response_type(isp, (isphdr_t *)vptr); unp.vp = vptr; @@ -221,113 +218,14 @@ isp_target_notify(ispsoftc_t *isp, void if (IS_24XX(isp)) { isp_get_notify_24xx(isp, inot_24xx, (in_fcentry_24xx_t *)local); inot_24xx = (in_fcentry_24xx_t *) local; - isp_handle_24xx_inotify(isp, inot_24xx); - break; - } else { - if (ISP_CAP_2KLOGIN(isp)) { - in_fcentry_e_t *ecp = (in_fcentry_e_t *)local; - isp_get_notify_fc_e(isp, inote_fcp, ecp); - iid = ecp->in_iid; - status = ecp->in_status; - seqid = ecp->in_seqid; - } else { - in_fcentry_t *fcp = (in_fcentry_t *)local; - isp_get_notify_fc(isp, inot_fcp, fcp); - iid = fcp->in_iid; - status = fcp->in_status; - seqid = fcp->in_seqid; - } - } - - isp_prt(isp, ISP_LOGTDEBUG0, "Immediate Notify On Bus %d, status=0x%x seqid=0x%x", bus, status, seqid); - - switch (status) { - case IN_MSG_RECEIVED: - case IN_IDE_RECEIVED: - isp_got_msg_fc(isp, (in_fcentry_t *)local); - break; - case IN_RSRC_UNAVAIL: - isp_prt(isp, ISP_LOGINFO, "Firmware out of ATIOs"); - isp_async(isp, ISPASYNC_TARGET_NOTIFY_ACK, local); - break; - - case IN_RESET: - ISP_MEMZERO(¬ify, sizeof (isp_notify_t)); - notify.nt_hba = isp; - notify.nt_wwn = INI_ANY; - notify.nt_tgt = TGT_ANY; - notify.nt_nphdl = iid; - notify.nt_sid = PORT_ANY; - notify.nt_did = PORT_ANY; - notify.nt_lun = LUN_ANY; - notify.nt_tagval = TAG_ANY; - notify.nt_tagval |= (((uint64_t)(isp->isp_serno++)) << 32); - notify.nt_ncode = NT_BUS_RESET; - notify.nt_need_ack = 1; - notify.nt_lreserved = local; - isp_async(isp, ISPASYNC_TARGET_NOTIFY, ¬ify); - break; - - case IN_PORT_LOGOUT: - ISP_MEMZERO(¬ify, sizeof (isp_notify_t)); - notify.nt_hba = isp; - notify.nt_wwn = INI_ANY; - notify.nt_nphdl = iid; - notify.nt_sid = PORT_ANY; - notify.nt_did = PORT_ANY; - notify.nt_ncode = NT_LOGOUT; - notify.nt_need_ack = 1; - notify.nt_lreserved = local; - isp_async(isp, ISPASYNC_TARGET_NOTIFY, ¬ify); - break; - - case IN_ABORT_TASK: - ISP_MEMZERO(¬ify, sizeof (isp_notify_t)); - notify.nt_hba = isp; - notify.nt_wwn = INI_ANY; - notify.nt_nphdl = iid; - notify.nt_sid = PORT_ANY; - notify.nt_did = PORT_ANY; - notify.nt_ncode = NT_ABORT_TASK; - notify.nt_need_ack = 1; - notify.nt_lreserved = local; - isp_async(isp, ISPASYNC_TARGET_NOTIFY, ¬ify); - break; - - case IN_GLOBAL_LOGO: - isp_prt(isp, ISP_LOGTINFO, "%s: all ports logged out", __func__); - ISP_MEMZERO(¬ify, sizeof (isp_notify_t)); - notify.nt_hba = isp; - notify.nt_wwn = INI_ANY; - notify.nt_nphdl = NIL_HANDLE; - notify.nt_sid = PORT_ANY; - notify.nt_did = PORT_ANY; - notify.nt_ncode = NT_GLOBAL_LOGOUT; - notify.nt_need_ack = 1; - notify.nt_lreserved = local; - isp_async(isp, ISPASYNC_TARGET_NOTIFY, ¬ify); - break; - - case IN_PORT_CHANGED: - isp_prt(isp, ISP_LOGTINFO, "%s: port changed", __func__); - ISP_MEMZERO(¬ify, sizeof (isp_notify_t)); - notify.nt_hba = isp; - notify.nt_wwn = INI_ANY; - notify.nt_nphdl = NIL_HANDLE; - notify.nt_sid = PORT_ANY; - notify.nt_did = PORT_ANY; - notify.nt_ncode = NT_CHANGED; - notify.nt_need_ack = 1; - notify.nt_lreserved = local; - isp_async(isp, ISPASYNC_TARGET_NOTIFY, ¬ify); - break; - - default: - ISP_SNPRINTF(local, sizeof local, "%s: unknown status to RQSTYPE_NOTIFY (0x%x)", __func__, status); - isp_print_bytes(isp, local, QENTRY_LEN, vptr); - isp_async(isp, ISPASYNC_TARGET_NOTIFY_ACK, local); + isp_handle_notify_24xx(isp, inot_24xx); break; } + if (ISP_CAP_2KLOGIN(isp)) + isp_get_notify_fc_e(isp, inote_fcp, (in_fcentry_e_t *)local); + else + isp_get_notify_fc(isp, inot_fcp, (in_fcentry_t *)local); + isp_handle_notify(isp, (in_fcentry_t *)local); break; case RQSTYPE_NOTIFY_ACK: @@ -1405,7 +1303,84 @@ isp_handle_ctio7(ispsoftc_t *isp, ct7_en } static void -isp_handle_24xx_inotify(ispsoftc_t *isp, in_fcentry_24xx_t *inot_24xx) +isp_handle_notify(ispsoftc_t *isp, in_fcentry_t *inp) +{ + fcportdb_t *lp; + uint64_t wwn; + uint32_t sid; + uint16_t nphdl, status; + isp_notify_t notify; + + status = inp->in_status; + isp_prt(isp, ISP_LOGTDEBUG0, "Immediate Notify, status=0x%x seqid=0x%x", + status, inp->in_seqid); + switch (status) { + case IN_MSG_RECEIVED: + case IN_IDE_RECEIVED: + isp_got_msg_fc(isp, inp); + return; + case IN_RSRC_UNAVAIL: + isp_prt(isp, ISP_LOGINFO, "Firmware out of ATIOs"); + isp_async(isp, ISPASYNC_TARGET_NOTIFY_ACK, inp); + return; + } + + if (ISP_CAP_2KLOGIN(isp)) + nphdl = ((in_fcentry_e_t *)inp)->in_iid; + else + nphdl = inp->in_iid; + if (isp_find_pdb_by_handle(isp, 0, nphdl, &lp)) { + wwn = lp->port_wwn; + sid = lp->portid; + } else { + wwn = INI_ANY; + sid = PORT_ANY; + } + + ISP_MEMZERO(¬ify, sizeof (isp_notify_t)); + notify.nt_hba = isp; + notify.nt_wwn = wwn; + notify.nt_tgt = FCPARAM(isp, 0)->isp_wwpn; + notify.nt_nphdl = nphdl; + notify.nt_sid = sid; + notify.nt_did = PORT_ANY; + if (ISP_CAP_SCCFW(isp)) + notify.nt_lun = inp->in_scclun; + else + notify.nt_lun = inp->in_lun; + notify.nt_tagval = inp->in_seqid; + notify.nt_tagval |= (((uint64_t)(isp->isp_serno++)) << 32); + notify.nt_need_ack = 1; + notify.nt_channel = 0; + notify.nt_lreserved = inp; + + switch (status) { + case IN_RESET: + notify.nt_ncode = NT_BUS_RESET; + break; + case IN_PORT_LOGOUT: + notify.nt_ncode = NT_LOGOUT; + break; + case IN_ABORT_TASK: + notify.nt_ncode = NT_ABORT_TASK; + break; + case IN_GLOBAL_LOGO: + notify.nt_ncode = NT_GLOBAL_LOGOUT; + break; + case IN_PORT_CHANGED: + notify.nt_ncode = NT_CHANGED; + break; + default: + isp_prt(isp, ISP_LOGINFO, "%s: unhandled status (0x%x)", + __func__, status); + isp_async(isp, ISPASYNC_TARGET_NOTIFY_ACK, inp); + return; + } + isp_async(isp, ISPASYNC_TARGET_NOTIFY, ¬ify); +} + +static void +isp_handle_notify_24xx(ispsoftc_t *isp, in_fcentry_24xx_t *inot_24xx) { uint8_t ochan, chan, lochan, hichan; From owner-svn-src-head@freebsd.org Sat Mar 18 19:55:00 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41671D12C8E; Sat, 18 Mar 2017 19:55:00 +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 mx1.freebsd.org (Postfix) with ESMTPS id 06CFC1774; Sat, 18 Mar 2017 19:54:59 +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 v2IJsxHM008098; Sat, 18 Mar 2017 19:54:59 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2IJsxAt008097; Sat, 18 Mar 2017 19:54:59 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201703181954.v2IJsxAt008097@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 18 Mar 2017 19:54:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315508 - head/sys/arm/freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 18 Mar 2017 19:55:00 -0000 Author: ian Date: Sat Mar 18 19:54:58 2017 New Revision: 315508 URL: https://svnweb.freebsd.org/changeset/base/315508 Log: Remove hardcoded bootverbose=1; imx53 systems boot using loader(8) and users can set verbose if they want to. Modified: head/sys/arm/freescale/imx/imx53_machdep.c Modified: head/sys/arm/freescale/imx/imx53_machdep.c ============================================================================== --- head/sys/arm/freescale/imx/imx53_machdep.c Sat Mar 18 19:27:16 2017 (r315507) +++ head/sys/arm/freescale/imx/imx53_machdep.c Sat Mar 18 19:54:58 2017 (r315508) @@ -53,10 +53,6 @@ static int imx53_attach(platform_t plat) { - /* XXX - Get rid of this stuff soon. */ - boothowto |= RB_VERBOSE|RB_MULTIPLE; - bootverbose = 1; - return (0); } From owner-svn-src-head@freebsd.org Sat Mar 18 19:59:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 912DED12D28; Sat, 18 Mar 2017 19:59:22 +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 mx1.freebsd.org (Postfix) with ESMTPS id 46ECF1936; Sat, 18 Mar 2017 19:59:22 +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 v2IJxLxe008312; Sat, 18 Mar 2017 19:59:21 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2IJxLxE008310; Sat, 18 Mar 2017 19:59:21 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201703181959.v2IJxLxE008310@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 18 Mar 2017 19:59:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315509 - head/usr.bin/truss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 18 Mar 2017 19:59:22 -0000 Author: jhb Date: Sat Mar 18 19:59:21 2017 New Revision: 315509 URL: https://svnweb.freebsd.org/changeset/base/315509 Log: Decode arguments passed to kldsym() and kldunloadf(). This does not currently decode the kld_sym_lookup structure passed to kldsym(). Modified: head/usr.bin/truss/syscall.h head/usr.bin/truss/syscalls.c Modified: head/usr.bin/truss/syscall.h ============================================================================== --- head/usr.bin/truss/syscall.h Sat Mar 18 19:54:58 2017 (r315508) +++ head/usr.bin/truss/syscall.h Sat Mar 18 19:59:21 2017 (r315509) @@ -45,7 +45,8 @@ enum Argtype { None = 1, Hex, Octal, Int Pathconf, Rforkflags, ExitStatus, Waitoptions, Idtype, Procctl, LinuxSockArgs, Umtxop, Atfd, Atflags, Timespec2, Accessmode, Long, Sysarch, ExecArgs, ExecEnv, PipeFds, QuadHex, Utrace, IntArray, Pipe2, - CapFcntlRights, Fadvice, FileFlags, Flockop, Getfsstatmode, + CapFcntlRights, Fadvice, FileFlags, Flockop, Getfsstatmode, Kldsymcmd, + Kldunloadflags, CloudABIAdvice, CloudABIClockID, ClouduABIFDSFlags, CloudABIFDStat, CloudABIFileStat, CloudABIFileType, Modified: head/usr.bin/truss/syscalls.c ============================================================================== --- head/usr.bin/truss/syscalls.c Sat Mar 18 19:54:58 2017 (r315508) +++ head/usr.bin/truss/syscalls.c Sat Mar 18 19:59:21 2017 (r315509) @@ -193,8 +193,12 @@ static struct syscall decoded_syscalls[] .args = { { Int, 0 } } }, { .name = "kldstat", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { Ptr, 1 } } }, + { .name = "kldsym", .ret_type = 1, .nargs = 3, + .args = { { Int, 0 }, { Kldsymcmd, 1 }, { Ptr, 2 } } }, { .name = "kldunload", .ret_type = 1, .nargs = 1, .args = { { Int, 0 } } }, + { .name = "kldunloadf", .ret_type = 1, .nargs = 2, + .args = { { Int, 0 }, { Kldunloadflags, 1 } } }, { .name = "kse_release", .ret_type = 0, .nargs = 1, .args = { { Timespec, 0 } } }, { .name = "lchflags", .ret_type = 1, .nargs = 2, @@ -1893,6 +1897,13 @@ print_arg(struct syscall_args *sc, unsig print_integer_arg(sysdecode_getfsstat_mode, fp, args[sc->offset]); break; + case Kldsymcmd: + print_integer_arg(sysdecode_kldsym_cmd, fp, args[sc->offset]); + break; + case Kldunloadflags: + print_integer_arg(sysdecode_kldunload_flags, fp, + args[sc->offset]); + break; case CloudABIAdvice: fputs(xlookup(cloudabi_advice, args[sc->offset]), fp); From owner-svn-src-head@freebsd.org Sat Mar 18 20:16:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32B70D12115; Sat, 18 Mar 2017 20:16:25 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7BC210DD; Sat, 18 Mar 2017 20:16:24 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2IKGODf016113; Sat, 18 Mar 2017 20:16:24 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2IKGNt3016110; Sat, 18 Mar 2017 20:16:23 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201703182016.v2IKGNt3016110@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Sat, 18 Mar 2017 20:16:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315510 - in head/sys: compat/freebsd32 compat/linux kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 18 Mar 2017 20:16:25 -0000 Author: vangyzen Date: Sat Mar 18 20:16:23 2017 New Revision: 315510 URL: https://svnweb.freebsd.org/changeset/base/315510 Log: nanosleep: plug a kernel memory disclosure nanosleep() updates rmtp on EINVAL. In that case, kern_nanosleep() has not updated rmt, so sys_nanosleep() updates the user-space rmtp by copying garbage from its stack frame. This is not only a kernel memory disclosure, it's also not POSIX-compliant. Fix it to update rmtp only on EINTR. Reviewed by: jilles (via D10020), dchagin MFC after: 3 days Security: possibly Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D10044 Modified: head/sys/compat/freebsd32/freebsd32_misc.c head/sys/compat/linux/linux_time.c head/sys/kern/kern_time.c Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Sat Mar 18 19:59:21 2017 (r315509) +++ head/sys/compat/freebsd32/freebsd32_misc.c Sat Mar 18 20:16:23 2017 (r315510) @@ -2241,7 +2241,7 @@ freebsd32_nanosleep(struct thread *td, s !useracc((caddr_t)uap->rmtp, sizeof(rmt), VM_PROT_WRITE)) return (EFAULT); error = kern_nanosleep(td, &rqt, &rmt); - if (error && uap->rmtp) { + if (error == EINTR && uap->rmtp) { int error2; CP(rmt, rmt32, tv_sec); Modified: head/sys/compat/linux/linux_time.c ============================================================================== --- head/sys/compat/linux/linux_time.c Sat Mar 18 19:59:21 2017 (r315509) +++ head/sys/compat/linux/linux_time.c Sat Mar 18 20:16:23 2017 (r315510) @@ -519,7 +519,7 @@ linux_nanosleep(struct thread *td, struc return (error); } error = kern_nanosleep(td, &rqts, rmtp); - if (args->rmtp != NULL) { + if (error == EINTR && args->rmtp != NULL) { error2 = native_to_linux_timespec(&lrmts, rmtp); if (error2 != 0) return (error2); @@ -583,7 +583,7 @@ linux_clock_nanosleep(struct thread *td, return (error); } error = kern_nanosleep(td, &rqts, rmtp); - if (args->rmtp != NULL) { + if (error == EINTR && args->rmtp != NULL) { /* XXX. Not for TIMER_ABSTIME */ error2 = native_to_linux_timespec(&lrmts, rmtp); if (error2 != 0) Modified: head/sys/kern/kern_time.c ============================================================================== --- head/sys/kern/kern_time.c Sat Mar 18 19:59:21 2017 (r315509) +++ head/sys/kern/kern_time.c Sat Mar 18 20:16:23 2017 (r315510) @@ -548,7 +548,7 @@ sys_nanosleep(struct thread *td, struct !useracc((caddr_t)uap->rmtp, sizeof(rmt), VM_PROT_WRITE)) return (EFAULT); error = kern_nanosleep(td, &rqt, &rmt); - if (error && uap->rmtp) { + if (error == EINTR && uap->rmtp) { int error2; error2 = copyout(&rmt, uap->rmtp, sizeof(rmt)); From owner-svn-src-head@freebsd.org Sat Mar 18 20:41:09 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0EAA2D12AAE; Sat, 18 Mar 2017 20:41:09 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 C23001E4D; Sat, 18 Mar 2017 20:41:08 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2IKf75O024471; Sat, 18 Mar 2017 20:41:07 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2IKf72J024470; Sat, 18 Mar 2017 20:41:07 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201703182041.v2IKf72J024470@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sat, 18 Mar 2017 20:41:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315511 - head/bin/sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 18 Mar 2017 20:41:09 -0000 Author: jilles Date: Sat Mar 18 20:41:07 2017 New Revision: 315511 URL: https://svnweb.freebsd.org/changeset/base/315511 Log: sh: Remove unused function declaration for arith_lex_reset(). Reported by: Robert Elz Modified: head/bin/sh/arith.h Modified: head/bin/sh/arith.h ============================================================================== --- head/bin/sh/arith.h Sat Mar 18 20:16:23 2017 (r315510) +++ head/bin/sh/arith.h Sat Mar 18 20:41:07 2017 (r315511) @@ -35,4 +35,3 @@ #define DIGITS(var) (3 + (2 + CHAR_BIT * sizeof((var))) / 3) arith_t arith(const char *); -void arith_lex_reset(void); From owner-svn-src-head@freebsd.org Sat Mar 18 23:00:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 160FDD12476; Sat, 18 Mar 2017 23:00:15 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 C108C1245; Sat, 18 Mar 2017 23:00:14 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2IN0DDM081620; Sat, 18 Mar 2017 23:00:13 GMT (envelope-from truckman@FreeBSD.org) Received: (from truckman@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2IN0DKa081619; Sat, 18 Mar 2017 23:00:13 GMT (envelope-from truckman@FreeBSD.org) Message-Id: <201703182300.v2IN0DKa081619@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: truckman set sender to truckman@FreeBSD.org using -f From: Don Lewis Date: Sat, 18 Mar 2017 23:00:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315516 - head/sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 18 Mar 2017 23:00:15 -0000 Author: truckman Date: Sat Mar 18 23:00:13 2017 New Revision: 315516 URL: https://svnweb.freebsd.org/changeset/base/315516 Log: Change several constants used by the PIE algorithm from unsigned to signed. - PIE_MAX_PROB is compared to variable of int64_t and the type promotion rules can cause the value of that variable to be treated as unsigned. If the value is actually negative, then the result of the comparsion is incorrect, causing the algorithm to perform poorly in some situations. Changing the constant to be signed cause the comparision to work correctly. - PIE_SCALE is also compared to signed values. Fortunately they are also compared to zero and negative values are discarded so this is more of a cosmetic fix. - PIE_DQ_THRESHOLD is only compared to unsigned values, but it is small enough that the automatic promotion to unsigned is harmless. Submitted by: Rasool Al-Saadi MFC after: 1 week Modified: head/sys/netpfil/ipfw/dn_aqm_pie.h Modified: head/sys/netpfil/ipfw/dn_aqm_pie.h ============================================================================== --- head/sys/netpfil/ipfw/dn_aqm_pie.h Sat Mar 18 22:19:23 2017 (r315515) +++ head/sys/netpfil/ipfw/dn_aqm_pie.h Sat Mar 18 23:00:13 2017 (r315516) @@ -37,16 +37,16 @@ #define DN_AQM_PIE 2 #define PIE_DQ_THRESHOLD_BITS 14 /* 2^14 =16KB */ -#define PIE_DQ_THRESHOLD (1UL << PIE_DQ_THRESHOLD_BITS) +#define PIE_DQ_THRESHOLD (1L << PIE_DQ_THRESHOLD_BITS) #define MEAN_PKTSIZE 800 /* 31-bits because random() generates range from 0->(2**31)-1 */ #define PIE_PROB_BITS 31 -#define PIE_MAX_PROB ((1ULL< Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A3B5D12114; Sat, 18 Mar 2017 23:37:01 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 57676170A; Sat, 18 Mar 2017 23:37:01 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2INb0E8097866; Sat, 18 Mar 2017 23:37:00 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2INb0lv097864; Sat, 18 Mar 2017 23:37:00 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201703182337.v2INb0lv097864@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sat, 18 Mar 2017 23:37:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315518 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: 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, 18 Mar 2017 23:37:01 -0000 Author: alc Date: Sat Mar 18 23:37:00 2017 New Revision: 315518 URL: https://svnweb.freebsd.org/changeset/base/315518 Log: Avoid unnecessary calls to vm_map_protect() in elf_load_section(). Typically, when elf_load_section() unconditionally passed VM_PROT_ALL to elf_map_insert(), it was needlessly enabling execute access on the mapping, and it would later have to call vm_map_protect() to correct the mapping's access rights. Now, instead, elf_load_section() always passes its parameter "prot" to elf_map_insert(). So, elf_load_section() must only call vm_map_protect() if it needs to remove the write access that was temporarily granted to perform a copyout(). Reviewed by: kib MFC after: 1 week Modified: head/sys/kern/imgact_elf.c Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Sat Mar 18 23:24:52 2017 (r315517) +++ head/sys/kern/imgact_elf.c Sat Mar 18 23:37:00 2017 (r315518) @@ -582,7 +582,7 @@ __elfN(load_section)(struct image_params /* This had damn well better be true! */ if (map_len != 0) { rv = __elfN(map_insert)(imgp, map, NULL, 0, map_addr, - map_addr + map_len, VM_PROT_ALL, 0); + map_addr + map_len, prot, 0); if (rv != KERN_SUCCESS) return (EINVAL); } @@ -603,10 +603,12 @@ __elfN(load_section)(struct image_params } /* - * set it to the specified protection. + * Remove write access to the page if it was only granted by map_insert + * to allow copyout. */ - vm_map_protect(map, trunc_page(map_addr), round_page(map_addr + - map_len), prot, FALSE); + if ((prot & VM_PROT_WRITE) == 0) + vm_map_protect(map, trunc_page(map_addr), round_page(map_addr + + map_len), prot, FALSE); return (0); }