From owner-svn-src-head@freebsd.org Sun Sep 20 02:27:22 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 658E83F745D; Sun, 20 Sep 2020 02:27:22 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-ot1-f52.google.com (mail-ot1-f52.google.com [209.85.210.52]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BvBL129jyz3bJY; Sun, 20 Sep 2020 02:27:21 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-ot1-f52.google.com with SMTP id 95so1912782ota.13; Sat, 19 Sep 2020 19:27:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Envy6Z/q0Srmbm4/nCERcMjCqtYMRLusfSsfF05bIFA=; b=qJ3Yiqc5j9WMYtIoXdLvYQM8v64FQfgety7CblDBuKWUc1lUKXq9nJiVZ93EjUvFB1 88rIVNkeCcF4U3GWw0LKpNCtaCRAckBx7YwZ2p5yz2aYKZOiAZU+q1tEC+zkINHLfn9/ C9G8LxYsiZhYHe179bYEoXzYe3YgBbNzNELzZGTZrhgWBhJh8yM9T8c4vQm7eAOannj/ ZTi2am1bHsCescnmt4MpIYfOfQ74qBiiVFYx8nYO6U9Dlt6WN1LgZFa+Phrvb60ogCiY 35UTu+EpG9CoQgNfCb0aHp8Lb5EZmKCyU+TxMOCIYAD8n+zmAXXYVCjozbwiZpf4P8Ss db3w== X-Gm-Message-State: AOAM533Ddm5kRxD2RvWvFx2pbStvwKPw+NkcyiLh+9OqBCYPL7U9rDbJ oiP2/0U8dD+BdDXrs9UXPC3mv5FC1uSQf5d6jYI= X-Google-Smtp-Source: ABdhPJyeFld5p+XpymY8PwYEl8vwjGWtJVbJseHJe+DWh01/Yn9ig/YddseZmBxQefmhQYqz+3qPuUHbjCWGZ5jOhmo= X-Received: by 2002:a05:6830:1e30:: with SMTP id t16mr28311799otr.18.1600568839777; Sat, 19 Sep 2020 19:27:19 -0700 (PDT) MIME-Version: 1.0 References: <202009112049.08BKnavL032212@repo.freebsd.org> <20200911214327.GY94807@kib.kiev.ua> <20200919233232.GC94807@kib.kiev.ua> In-Reply-To: <20200919233232.GC94807@kib.kiev.ua> From: Alan Somers Date: Sat, 19 Sep 2020 20:27:08 -0600 Message-ID: Subject: Re: svn commit: r365643 - head/bin/cp To: Konstantin Belousov Cc: Rick Macklem , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" X-Rspamd-Queue-Id: 4BvBL129jyz3bJY X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.210.52 as permitted sender) smtp.mailfrom=asomers@gmail.com X-Spamd-Result: default: False [-2.19 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FREEFALL_USER(0.00)[asomers]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; RCVD_TLS_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[freebsd.org]; ARC_NA(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[209.85.210.52:from]; RCPT_COUNT_FIVE(0.00)[5]; NEURAL_HAM_LONG(-0.94)[-0.943]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.39)[-0.390]; RCVD_IN_DNSWL_NONE(0.00)[209.85.210.52:from]; NEURAL_HAM_MEDIUM(-0.86)[-0.856]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 20 Sep 2020 02:27:22 -0000 On Sat, Sep 19, 2020 at 5:32 PM Konstantin Belousov wrote: > On Sat, Sep 19, 2020 at 11:18:56PM +0000, Rick Macklem wrote: > > Alan Somers wrote: > > >On Fri, Sep 11, 2020 at 3:52 PM Rick Macklem > wrote: > > >Konstantin Belousov wrote: > > >>On Fri, Sep 11, 2020 at 08:49:36PM +0000, Alan Somers wrote: > > >>> Author: asomers > > >>> Date: Fri Sep 11 20:49:36 2020 > > >>> New Revision: 365643 > > >>> URL: https://svnweb.freebsd.org/changeset/base/365643 > > >>> > > >>> Log: > > >>> cp: fall back to read/write if copy_file_range fails > > >>> > > >>> Even though copy_file_range has a file-system agnostic version, it > still > > >>> fails on devfs (perhaps because the file descriptor is > non-seekable?) In > > >>> that case, fallback to old-fashioned read/write. Fixes > > >>> "cp /dev/null /tmp/null" > > >> > > >>Devices are seekable. > > >> > > >>The reason for EINVAL is that vn_copy_file_range() checks that both in > and out > > >>vnodes are VREG. For devfs, they are VCHR. > > > > > >I coded the syscall to the Linux man page, which states that EINVAL is > returned > > >if either fd does not refer to a regular file. > > >Having said that, I do not recall testing the VCHR case under Linux. > (ie. It might > > >actually work and the man page turns out to be incorrect?) > > > > > >I will test this case under Linux when I get home next week, rick > > I'll admit I haven't tested this in Linux to see if they do return > EINVAL. > > > > >Since there's no standard, I think it's fine for us to support devfs if > possible. > > 1 - I think this is a good question for a mailing list like > freebsd-current@. > > 2 - I see Linux as the de-facto standard these days and consider POSIX no > > longer relevant, but that's just mho. > > 3 - For NFSv4.2, the Copy operation will fail for non-regular files, so > if you > > do this, you will need to handle the fall-back to using the > generic code. > > (Should be doable, but you need to be aware of this case.) > > > > Having said the above, it is up to the "collective" and not me and, as > such, > > I suggest #1, to see whether others think doing a non-Linux compatible > > version makes sense for FreeBSD? > > I believe that allowing devfs nodes for vn_copy_file() is not very good > idea. For /dev/null driver returns EOF, but think about real devices or > even better, /dev/zero that never EOF its output. > > Is vn_copy_file() interruptible ? I think not. So if insane range is > specified, we have unstoppable copier that fills the disk (at best). > I can think of good use cases for copy_file_range on a device: 1) Network block devices. I don't know if the iSCSI, NBD, or Ceph RBD protocols currently support server-side copies, but it's reasonable that they might. If they ever do, FreeBSD would need copy_file_range to take advantage. 2) CUSE. I think Linux's CUSE already supports copy_file_range, since a CUSE device on Linux is basically just a single-file FUSE file system. We might add support to our CUSE driver someday. 3) zvols. This is the use case that matters the most to me. I have a large amount of data stored in plain files that I would like to convert to zvols. dd should be able to do that using copy_file_range. In my opinion, the utility of those cases outweighs the risk of a long-running interruptible syscall. And in any case, it is documented that copy_file_range may return EINTR. -Alan From owner-svn-src-head@freebsd.org Sun Sep 20 05:28:31 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F1E3B3FCAC3; Sun, 20 Sep 2020 05:28:31 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BvGM36B32z44tr; Sun, 20 Sep 2020 05:28:31 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B3D1117F70; Sun, 20 Sep 2020 05:28:31 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08K5SV1N002325; Sun, 20 Sep 2020 05:28:31 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08K5SVTd002323; Sun, 20 Sep 2020 05:28:31 GMT (envelope-from se@FreeBSD.org) Message-Id: <202009200528.08K5SVTd002323@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: =?UTF-8?Q?Stefan_E=c3=9fer?= Date: Sun, 20 Sep 2020 05:28:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365921 - in head/lib/msun: ld128 ld80 X-SVN-Group: head X-SVN-Commit-Author: se X-SVN-Commit-Paths: in head/lib/msun: ld128 ld80 X-SVN-Commit-Revision: 365921 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 20 Sep 2020 05:28:32 -0000 Author: se Date: Sun Sep 20 05:28:31 2020 New Revision: 365921 URL: https://svnweb.freebsd.org/changeset/base/365921 Log: Apply fix for ld80 and ld128 submitted by Steve Kargl: - Micro-optimization: use sincosl(x) instead of a call to cosl(x) and a call to sinl(x). Argument reduction is done once not twice. - Use a long double constant instead of an invalid double constant. - Spell scale2 correctly He could not test ld128, so that patch is untested. Submitted by: sgk at troutmask.apl.washington.edu (Steve Kargl) Modified: head/lib/msun/ld128/k_expl.h head/lib/msun/ld80/k_expl.h Modified: head/lib/msun/ld128/k_expl.h ============================================================================== --- head/lib/msun/ld128/k_expl.h Sun Sep 20 05:23:16 2020 (r365920) +++ head/lib/msun/ld128/k_expl.h Sun Sep 20 05:28:31 2020 (r365921) @@ -300,7 +300,7 @@ hexpl(long double x) static inline long double complex __ldexp_cexpl(long double complex z, int expt) { - long double exp_x, hi, lo; + long double c, exp_x, hi, lo, s; long double x, y, scale1, scale2; int half_expt, k; @@ -308,16 +308,17 @@ __ldexp_cexpl(long double complex z, int expt) y = cimagl(z); __k_expl(x, &hi, &lo, &k); - exp_x = (lo + hi) * 0x1p16382; + exp_x = (lo + hi) * 0x1p16382L; expt += k - 16382; scale1 = 1; half_expt = expt / 2; SET_LDBL_EXPSIGN(scale1, BIAS + half_expt); scale2 = 1; - SET_LDBL_EXPSIGN(scale1, BIAS + expt - half_expt); + SET_LDBL_EXPSIGN(scale2, BIAS + expt - half_expt); - return (CMPLXL(cos(y) * exp_x * scale1 * scale2, - sinl(y) * exp_x * scale1 * scale2)); + sincosl(y, &s, &c); + return (CMPLXL(c * exp_x * scale1 * scale2, + s * exp_x * scale1 * scale2)); } #endif /* _COMPLEX_H */ Modified: head/lib/msun/ld80/k_expl.h ============================================================================== --- head/lib/msun/ld80/k_expl.h Sun Sep 20 05:23:16 2020 (r365920) +++ head/lib/msun/ld80/k_expl.h Sun Sep 20 05:28:31 2020 (r365921) @@ -277,7 +277,7 @@ hexpl(long double x) static inline long double complex __ldexp_cexpl(long double complex z, int expt) { - long double exp_x, hi, lo; + long double c, exp_x, hi, lo, s; long double x, y, scale1, scale2; int half_expt, k; @@ -285,16 +285,17 @@ __ldexp_cexpl(long double complex z, int expt) y = cimagl(z); __k_expl(x, &hi, &lo, &k); - exp_x = (lo + hi) * 0x1p16382; + exp_x = (lo + hi) * 0x1p16382L; expt += k - 16382; scale1 = 1; half_expt = expt / 2; SET_LDBL_EXPSIGN(scale1, BIAS + half_expt); scale2 = 1; - SET_LDBL_EXPSIGN(scale1, BIAS + expt - half_expt); + SET_LDBL_EXPSIGN(scale2, BIAS + expt - half_expt); - return (CMPLXL(cos(y) * exp_x * scale1 * scale2, - sinl(y) * exp_x * scale1 * scale2)); + sincosl(y, &s, &c); + return (CMPLXL(c * exp_x * scale1 * scale2, + s * exp_x * scale1 * scale2)); } #endif /* _COMPLEX_H */ From owner-svn-src-head@freebsd.org Sun Sep 20 05:32:54 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 16AD23FCCFF; Sun, 20 Sep 2020 05:32:54 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BvGS56yQqz44wZ; Sun, 20 Sep 2020 05:32:53 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D1E8F185D4; Sun, 20 Sep 2020 05:32:53 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08K5WrTK007930; Sun, 20 Sep 2020 05:32:53 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08K5WrUZ007928; Sun, 20 Sep 2020 05:32:53 GMT (envelope-from se@FreeBSD.org) Message-Id: <202009200532.08K5WrUZ007928@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: =?UTF-8?Q?Stefan_E=c3=9fer?= Date: Sun, 20 Sep 2020 05:32:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365922 - head/lib/msun/src X-SVN-Group: head X-SVN-Commit-Author: se X-SVN-Commit-Paths: head/lib/msun/src X-SVN-Commit-Revision: 365922 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 20 Sep 2020 05:32:54 -0000 Author: se Date: Sun Sep 20 05:32:53 2020 New Revision: 365922 URL: https://svnweb.freebsd.org/changeset/base/365922 Log: Apply an opimization for the kernels used by cexp(x) and cexpf(x) submitted by Steve Kargl: - Use sincos[f] instead of a call to cos[f] and a call to sin[f]. - While here, alphabetize declaration. Submitted by: sgk at troutmask.apl.washington.edu (Steve Kargl) Modified: head/lib/msun/src/k_exp.c head/lib/msun/src/k_expf.c Modified: head/lib/msun/src/k_exp.c ============================================================================== --- head/lib/msun/src/k_exp.c Sun Sep 20 05:28:31 2020 (r365921) +++ head/lib/msun/src/k_exp.c Sun Sep 20 05:32:53 2020 (r365922) @@ -88,7 +88,7 @@ __ldexp_exp(double x, int expt) double complex __ldexp_cexp(double complex z, int expt) { - double x, y, exp_x, scale1, scale2; + double c, exp_x, s, scale1, scale2, x, y; int ex_expt, half_expt; x = creal(z); @@ -105,6 +105,7 @@ __ldexp_cexp(double complex z, int expt) half_expt = expt - half_expt; INSERT_WORDS(scale2, (0x3ff + half_expt) << 20, 0); - return (CMPLX(cos(y) * exp_x * scale1 * scale2, - sin(y) * exp_x * scale1 * scale2)); + sincos(y, &s, &c); + return (CMPLX(c * exp_x * scale1 * scale2, + s * exp_x * scale1 * scale2)); } Modified: head/lib/msun/src/k_expf.c ============================================================================== --- head/lib/msun/src/k_expf.c Sun Sep 20 05:28:31 2020 (r365921) +++ head/lib/msun/src/k_expf.c Sun Sep 20 05:32:53 2020 (r365922) @@ -71,7 +71,7 @@ __ldexp_expf(float x, int expt) float complex __ldexp_cexpf(float complex z, int expt) { - float x, y, exp_x, scale1, scale2; + float c, exp_x, s, scale1, scale2, x, y; int ex_expt, half_expt; x = crealf(z); @@ -84,6 +84,7 @@ __ldexp_cexpf(float complex z, int expt) half_expt = expt - half_expt; SET_FLOAT_WORD(scale2, (0x7f + half_expt) << 23); - return (CMPLXF(cosf(y) * exp_x * scale1 * scale2, - sinf(y) * exp_x * scale1 * scale2)); + sincosf(y, &s, &c); + return (CMPLXF(c * exp_x * scale1 * scale2, + s * exp_x * scale1 * scale2)); } From owner-svn-src-head@freebsd.org Sun Sep 20 12:31:49 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 538603DF549; Sun, 20 Sep 2020 12:31:49 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BvRlT1Zsvz4SjV; Sun, 20 Sep 2020 12:31:49 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 19CCE1D1BB; Sun, 20 Sep 2020 12:31:49 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08KCVmFf062453; Sun, 20 Sep 2020 12:31:48 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08KCVmi3062451; Sun, 20 Sep 2020 12:31:48 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202009201231.08KCVmi3062451@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sun, 20 Sep 2020 12:31:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365925 - head/sys/net/route X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: head/sys/net/route X-SVN-Commit-Revision: 365925 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 20 Sep 2020 12:31:49 -0000 Author: melifaro Date: Sun Sep 20 12:31:48 2020 New Revision: 365925 URL: https://svnweb.freebsd.org/changeset/base/365925 Log: Fix gw updates / flag updates during route changes. * Zero gw_sdl if switching to interface route - the assumption that underlying storage is zeroed is incorrect with route changes. * Apply proper flag mask to rte. Reported by: vangyzen Modified: head/sys/net/route/nhop_ctl.c head/sys/net/route/route_ctl.c Modified: head/sys/net/route/nhop_ctl.c ============================================================================== --- head/sys/net/route/nhop_ctl.c Sun Sep 20 09:47:28 2020 (r365924) +++ head/sys/net/route/nhop_ctl.c Sun Sep 20 12:31:48 2020 (r365925) @@ -205,6 +205,7 @@ static void fill_sdl_from_ifp(struct sockaddr_dl_short *sdl, const struct ifnet *ifp) { + bzero(sdl, sizeof(struct sockaddr_dl_short)); sdl->sdl_family = AF_LINK; sdl->sdl_len = sizeof(struct sockaddr_dl_short); sdl->sdl_index = ifp->if_index; @@ -217,6 +218,8 @@ set_nhop_gw_from_info(struct nhop_object *nh, struct r struct sockaddr *gw; gw = info->rti_info[RTAX_GATEWAY]; + KASSERT(gw != NULL, ("gw is NULL")); + if (info->rti_flags & RTF_GATEWAY) { if (gw->sa_len > sizeof(struct sockaddr_in6)) { DPRINTF("nhop SA size too big: AF %d len %u", @@ -318,6 +321,9 @@ nhop_create_from_info(struct rib_head *rnh, struct rt_ int error; NET_EPOCH_ASSERT(); + + if (info->rti_info[RTAX_GATEWAY] == NULL) + return (EINVAL); nh_priv = alloc_nhop_structure(); Modified: head/sys/net/route/route_ctl.c ============================================================================== --- head/sys/net/route/route_ctl.c Sun Sep 20 09:47:28 2020 (r365924) +++ head/sys/net/route/route_ctl.c Sun Sep 20 12:31:48 2020 (r365925) @@ -397,7 +397,7 @@ create_rtentry(struct rib_head *rnh, struct rt_addrinf nhop_free(nh); return (ENOBUFS); } - rt->rte_flags = RTF_UP | flags; + rt->rte_flags = (RTF_UP | flags) & RTE_RT_FLAG_MASK; rt->rt_nhop = nh; /* Fill in dst */ From owner-svn-src-head@freebsd.org Sun Sep 20 15:11:54 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 630983E4E13; Sun, 20 Sep 2020 15:11:54 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BvWJB25KBz4fqf; Sun, 20 Sep 2020 15:11:54 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 142071EEE9; Sun, 20 Sep 2020 15:11:54 +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 08KFBr5A060642; Sun, 20 Sep 2020 15:11:53 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08KFBrCk059680; Sun, 20 Sep 2020 15:11:53 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <202009201511.08KFBrCk059680@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Sun, 20 Sep 2020 15:11:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365926 - in head/sys: arm/include mips/include powerpc/include riscv/include x86/include X-SVN-Group: head X-SVN-Commit-Author: mmel X-SVN-Commit-Paths: in head/sys: arm/include mips/include powerpc/include riscv/include x86/include X-SVN-Commit-Revision: 365926 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 20 Sep 2020 15:11:54 -0000 Author: mmel Date: Sun Sep 20 15:11:52 2020 New Revision: 365926 URL: https://svnweb.freebsd.org/changeset/base/365926 Log: Add missing assignment forgotten in r365899 Noticed by: mav MFC after: 1 month MFC with: r365899 Modified: head/sys/arm/include/bus.h head/sys/mips/include/bus.h head/sys/powerpc/include/bus.h head/sys/riscv/include/bus.h head/sys/x86/include/bus.h Modified: head/sys/arm/include/bus.h ============================================================================== --- head/sys/arm/include/bus.h Sun Sep 20 12:31:48 2020 (r365925) +++ head/sys/arm/include/bus.h Sun Sep 20 15:11:52 2020 (r365926) @@ -754,6 +754,7 @@ void generic_bs_unimplemented(void); { \ type tmp; \ tmp = bus_space_read_##width(tag, hnd, offset); \ + *value = (type)tmp; \ return (0); \ } BUS_PEEK_FUNC(1, uint8_t) Modified: head/sys/mips/include/bus.h ============================================================================== --- head/sys/mips/include/bus.h Sun Sep 20 12:31:48 2020 (r365925) +++ head/sys/mips/include/bus.h Sun Sep 20 15:11:52 2020 (r365926) @@ -696,6 +696,7 @@ void __bs_c(f,_bs_c_8) (void *t, bus_space_handle_t bs { \ type tmp; \ tmp = bus_space_read_##width(tag, hnd, offset); \ + *value = (type)tmp; \ return (0); \ } BUS_PEEK_FUNC(1, uint8_t) Modified: head/sys/powerpc/include/bus.h ============================================================================== --- head/sys/powerpc/include/bus.h Sun Sep 20 12:31:48 2020 (r365925) +++ head/sys/powerpc/include/bus.h Sun Sep 20 15:11:52 2020 (r365926) @@ -469,6 +469,7 @@ extern struct bus_space bs_le_tag; { \ type tmp; \ tmp = bus_space_read_##width(tag, hnd, offset); \ + *value = (type)tmp; \ return (0); \ } BUS_PEEK_FUNC(1, uint8_t) Modified: head/sys/riscv/include/bus.h ============================================================================== --- head/sys/riscv/include/bus.h Sun Sep 20 12:31:48 2020 (r365925) +++ head/sys/riscv/include/bus.h Sun Sep 20 15:11:52 2020 (r365926) @@ -458,6 +458,7 @@ struct bus_space { { \ type tmp; \ tmp = bus_space_read_##width(tag, hnd, offset); \ + *value = (type)tmp; \ return (0); \ } BUS_PEEK_FUNC(1, uint8_t) Modified: head/sys/x86/include/bus.h ============================================================================== --- head/sys/x86/include/bus.h Sun Sep 20 12:31:48 2020 (r365925) +++ head/sys/x86/include/bus.h Sun Sep 20 15:11:52 2020 (r365926) @@ -1096,6 +1096,7 @@ bus_space_barrier(bus_space_tag_t tag __unused, bus_sp { \ type tmp; \ tmp = bus_space_read_##width(tag, hnd, offset); \ + *value = (type)tmp; \ return (0); \ } BUS_PEEK_FUNC(1, uint8_t) From owner-svn-src-head@freebsd.org Sun Sep 20 15:21:34 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6ED823E4F50; Sun, 20 Sep 2020 15:21:34 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-TO1-obe.outbound.protection.outlook.com (mail-eopbgr670043.outbound.protection.outlook.com [40.107.67.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "GlobalSign Organization Validation CA - SHA256 - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BvWWL0c9wz3RQR; Sun, 20 Sep 2020 15:21:33 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lm2uFckpQ+x4JIuHFa/TTKZbANxSBv2zkxACK/ven0PI8r4mmEPtzr5q9zGPIQxLYepOy6o1pCTTatfXDEehqB5igLM0ZnRpdD+fj1dJfZh4t2KQ3bHGJeNfldvNKJzqBCcShnXCon4a0mq9mAkpPlKS4IiLeEZkTHWk6HregBZgI26k+TmypjvDBoMOSc2TOeFD2ou5jYjQgQylfLXv5ZNNFTGf9r3L486Um+3V0E14peDEqNZAD0Z2FFjVsuIU/syJDeAnd7AHinnIS+zgy8IYqsTw3wiTmW/OBxhZT7UbTrNwObCZcd5kkNdmlQGRscVsr0Tr2zZF0laSMfWfJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CRN+hO1S1wvsxcv+w504VCPhAJcNLyIgpZhktRqu5Sc=; b=a/8j7m6V9gbvKJB0kKR1OUjKYi1PcTAwtOsoMim0jwwCqP6KDkXagTt46STFMR3zNxCyC+TRnqwY6WzWK6ul/7cBHJdZxVERIIlLlOaSZ3/r8lde1Fc21nuEUZQL5XxO+/YHXyFCN6KINWW+yucaVgRQyI3ebdyDvgUy5Ayt7f78bs4v3T+MH2PDRKDC0Hm28fu8QMgHOkICiF9i7B3j3yRh+OYrwLSqoCIaZFThMTBvlF9xzgiBGKDmn7akwbXzRM3WNN24bO5Lnxp8u3yzHyRIw3tgw1cVFSbNXV8iP4DND7nhtz0ou7hRBzqS9GRn/Qrm2lAlY7P0lyAhbaXOZA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=uoguelph.ca; dmarc=pass action=none header.from=uoguelph.ca; dkim=pass header.d=uoguelph.ca; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uoguelph.ca; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CRN+hO1S1wvsxcv+w504VCPhAJcNLyIgpZhktRqu5Sc=; b=fMGh9XILrJQwuitkUnXc90GXZVAdQ1Bh1gBw1PvQdkyGkR3yqG4vmtpXbB212Q7ZaX89FQPyp5NH0COfX0KE+4PnMqcTct95P4uQ5m8Zt0TcSaRvTsRxa+O/jDhb4wfJqqUeRgByJeCj4d6vbkx1Gyu2jOM8l4SCAOnUEoHwgRZFry5wYuTNbxWBMtXAp/Fw4Pl/WkF+oZUVByrEMNJ+HqmIIkxYE0uCuZSnxjUS2Md9KqTjJlJSHJRyl/Ae4V16ZmZkU9BZ2vJEjww8ITvXAYYsfyYtdleTS6bA5aq4XsFt9vVLPRqbihM6Rhgj3QznO/PVUYwtjnyLJ2yc2+WDVA== Received: from YTBPR01MB3966.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:24::27) by YT1PR01MB2938.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:e::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.11; Sun, 20 Sep 2020 15:21:31 +0000 Received: from YTBPR01MB3966.CANPRD01.PROD.OUTLOOK.COM ([fe80::687f:d85a:a0a3:bd20]) by YTBPR01MB3966.CANPRD01.PROD.OUTLOOK.COM ([fe80::687f:d85a:a0a3:bd20%6]) with mapi id 15.20.3391.014; Sun, 20 Sep 2020 15:21:31 +0000 From: Rick Macklem To: Alan Somers , Konstantin Belousov CC: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r365643 - head/bin/cp Thread-Topic: svn commit: r365643 - head/bin/cp Thread-Index: AQHWiH0X8pBOJ1Dd2EKX5zw9++b1Talj+C+AgAABEqiADFMkAIAAVZ6LgAAHTQCAADDIAIAA08v2 Date: Sun, 20 Sep 2020 15:21:31 +0000 Message-ID: References: <202009112049.08BKnavL032212@repo.freebsd.org> <20200911214327.GY94807@kib.kiev.ua> <20200919233232.GC94807@kib.kiev.ua>, In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 6467992b-dbea-44e6-362d-08d85d78da66 x-ms-traffictypediagnostic: YT1PR01MB2938: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: hoVebZ4bo+gAVWepmmZlInq0scR6NATAMgZkAH0JYGJ0lppDWJKBT5tD/JslIiYIL+4EEhvGByE0YkJD0hLOzfT2DRPJHglKHsI/1pcB4DfewVp3AAo1OyzC+VQyYm5ED1NpFEzjwfrFpwIz5YvxINZ7kXRxDy6P9MYLozfte0/mORR51UpveudmxwFlFFXTmeQt18YpE+sv0f4C4dNzIW6y3zj3+cMJc/hYnCLLKgzQmO4IsQjrizKO6S/S+ucdGyuCoXpZoxFhCTwoDhPEjylP4jWA3pfJz0zGD+WfIw+L2wTWVmVwkJ4R3OGUfelle4/LlanfoL0ff6ZHzErDxuUYNkRXxXhatCrCLnAtmofQCLnJuJV06aGD9eY0gLZwfqfW8BZowzmxW9wM+Evyzg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:YTBPR01MB3966.CANPRD01.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(136003)(396003)(39850400004)(346002)(376002)(366004)(478600001)(786003)(9686003)(83380400001)(8936002)(2906002)(6506007)(316002)(186003)(33656002)(8676002)(110136005)(54906003)(66946007)(86362001)(5660300002)(76116006)(4326008)(55016002)(7696005)(66556008)(91956017)(64756008)(66476007)(71200400001)(52536014)(66446008)(966005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: g+RAm9LmhBVTuBKVrjIhjjaMunN3f7VAaAO+JQHDTglCzv12EPqa7ROqTKJB7Uc4hVtZ9MWZpZI5v590tgQnKdm65RN9jx28TOnCY/eGlgIC7RnBs/FZFRUtLkuybxxWOLs7jEeU2VvbtFJ6k7Osv54a4y2SJv9+j65XA3xWmmcsbNnKCQGE0LtvyX+j/bvqXGm08LKN99X2m/caYZXWVxw/+PF9Vf7KNxirzBQ3A97fadFOCHqRiQ1Yzx9bIki46XdYe7XZWuYk2RdahHk9ixAxzP8G4xWym6O19WTYgC35aXAZKywPwwPwwYLSqExM8QiBMSnfAGTnbTxjrM1Kc4MOjW1NP/TXrdNxqf+pwu81M5kD+A3bk0S7zc9pPP/oNZoQBUPHuh/xavPtKqoSBgjJRF++3Sei1uulXs4PuaFOppWAdoknjO0nMHFNwIGQj0mmG59xoKYzVBviFT+kW6loqAtEcSbdds50/BPKw/PTX3Zgi6E4FI73U+nEqVxz4XPhpPzv0DfWGp0qroQSWKq7Fkw55KiDN2bx//0V/FKnqWeOtoBXtNgj+LdMFoGTmWKbfvH1OtjtPg89xL5zpydXnnaY6nJmlirPejqvJz+Dp/x+PvGm8uvf9s4rZ0qdHgVbj7DPcpA4uxvLspETUTVwZlPPKm0u340G99OTvnceSSV0F4FMJgBaJiGDosxMTEl/odQHcwCDPVVv3vL5uQ== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: YTBPR01MB3966.CANPRD01.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 6467992b-dbea-44e6-362d-08d85d78da66 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Sep 2020 15:21:31.3885 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: MOU+uvKRkIx5OVIvlBCM6ed3Pb+xUestJoQiX7LP17vIyg/QzaeBooWjRcj/cwIP8NOl14AYFW63DjHjwEaV8A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: YT1PR01MB2938 X-Rspamd-Queue-Id: 4BvWWL0c9wz3RQR X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:8075, ipnet:40.104.0.0/14, country:US]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 20 Sep 2020 15:21:34 -0000 Alan Somers wrote:=0A= >On Sat, Sep 19, 2020 at 5:32 PM Konstantin Belousov > wrote:=0A= >On Sat, Sep 19, 2020 at 11:18:56PM +0000, Rick Macklem wrote:=0A= >> Alan Somers wrote:=0A= >> >On Fri, Sep 11, 2020 at 3:52 PM Rick Macklem >> wrote:=0A= >> >Konstantin Belousov wrote:=0A= >> >>On Fri, Sep 11, 2020 at 08:49:36PM +0000, Alan Somers wrote:=0A= >> >>> Author: asomers=0A= >> >>> Date: Fri Sep 11 20:49:36 2020=0A= >> >>> New Revision: 365643=0A= >> >>> URL: https://svnweb.freebsd.org/changeset/base/365643=0A= >> >>>=0A= >> >>> Log:=0A= >> >>> cp: fall back to read/write if copy_file_range fails=0A= >> >>>=0A= >> >>> Even though copy_file_range has a file-system agnostic version, it= still=0A= >> >>> fails on devfs (perhaps because the file descriptor is non-seekabl= e?) In=0A= >> >>> that case, fallback to old-fashioned read/write. Fixes=0A= >> >>> "cp /dev/null /tmp/null"=0A= >> >>=0A= >> >>Devices are seekable.=0A= >> >>=0A= >> >>The reason for EINVAL is that vn_copy_file_range() checks that both in= and out=0A= >> >>vnodes are VREG. For devfs, they are VCHR.=0A= >> >=0A= >> >I coded the syscall to the Linux man page, which states that EINVAL is = returned=0A= >> >if either fd does not refer to a regular file.=0A= >> >Having said that, I do not recall testing the VCHR case under Linux. (i= e. It might=0A= >> >actually work and the man page turns out to be incorrect?)=0A= >> >=0A= >> >I will test this case under Linux when I get home next week, rick=0A= >> I'll admit I haven't tested this in Linux to see if they do return EINVA= L.=0A= >>=0A= >> >Since there's no standard, I think it's fine for us to support devfs if= possible.=0A= >> 1 - I think this is a good question for a mailing list like freebsd-curr= ent@.=0A= >> 2 - I see Linux as the de-facto standard these days and consider POSIX n= o=0A= >> longer relevant, but that's just mho.=0A= >> 3 - For NFSv4.2, the Copy operation will fail for non-regular files, so = if you=0A= >> do this, you will need to handle the fall-back to using the generi= c code.=0A= >> (Should be doable, but you need to be aware of this case.)=0A= >>=0A= >> Having said the above, it is up to the "collective" and not me and, as s= uch,=0A= >> I suggest #1, to see whether others think doing a non-Linux compatible= =0A= >> version makes sense for FreeBSD?=0A= >=0A= >I believe that allowing devfs nodes for vn_copy_file() is not very good=0A= >idea. For /dev/null driver returns EOF, but think about real devices or= =0A= >even better, /dev/zero that never EOF its output.=0A= >=0A= >Is vn_copy_file() interruptible ? I think not. So if insane range is=0A= >specified, we have unstoppable copier that fills the disk (at best).=0A= I think this is a serious problem, but the code could clip the "len" argume= nt=0A= at K Mbytes for non-VREG files to avoid it (and document that FreeBSD=0A= specific behaviour in the man page).=0A= =0A= >I can think of good use cases for copy_file_range on a device:=0A= >=0A= >1) Network block devices. I don't know if the iSCSI, NBD, or Ceph RBD pro= tocols >currently support server-side copies, but it's reasonable that they= might. If they >ever do, FreeBSD would need copy_file_range to take advan= tage.=0A= >2) CUSE. I think Linux's CUSE already supports copy_file_range, since a C= USE >device on Linux is basically just a single-file FUSE file system. We = might add >support to our CUSE driver someday.=0A= >3) zvols. This is the use case that matters the most to me. I have a lar= ge amount >of data stored in plain files that I would like to convert to zv= ols. dd should be able >to do that using copy_file_range.=0A= >=0A= >In my opinion, the utility of those cases outweighs the risk of a long-run= ning >interruptible syscall. And in any case, it is documented that copy_f= ile_range may >return EINTR.=0A= I believe that the only case where EINTR would be returned is for NFS mount= s=0A= with the "intr" option.=0A= The generic code uses vn_rdwr()->VOP_READ()/VOP_WRITE() and I think the=0A= behaviour w.r.t. signal handling is the same as read(2)/write(2).=0A= =0A= Is reducing the number of syscalls really going to speed up the above cases= ?=0A= (I did copy_file_range(2) because the copy could be done locally on the NFS= v4.2=0A= server. I didn't intend the generic code to be used over read(2)/write(2) = to=0A= improve performance.)=0A= --> I'd suggest you try benchmarking a pre-patched vs current "cp" to copy= =0A= regular files (not a NFSv4.2 mount) and see if there really is a sign= ificant=0A= benefit.=0A= =0A= I'll admit I would prefer a Linux-compatible syscall and think this should= =0A= be asked on an open mailing list instead of here.=0A= =0A= rick=0A= =0A= -Alan=0A= =0A= From owner-svn-src-head@freebsd.org Sun Sep 20 16:11:38 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CED553E6867; Sun, 20 Sep 2020 16:11:38 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BvXd653wJz3VBx; Sun, 20 Sep 2020 16:11:38 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 910E01F6DA; Sun, 20 Sep 2020 16:11:38 +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 08KGBcAM000498; Sun, 20 Sep 2020 16:11:38 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08KGBc2j000497; Sun, 20 Sep 2020 16:11:38 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202009201611.08KGBc2j000497@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sun, 20 Sep 2020 16:11:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365927 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 365927 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 20 Sep 2020 16:11:38 -0000 Author: manu Date: Sun Sep 20 16:11:38 2020 New Revision: 365927 URL: https://svnweb.freebsd.org/changeset/base/365927 Log: arm: allwinner: aw_nmi: Fix wrong logic when we disable the nmi MFC after: 1 week Modified: head/sys/arm/allwinner/aw_nmi.c Modified: head/sys/arm/allwinner/aw_nmi.c ============================================================================== --- head/sys/arm/allwinner/aw_nmi.c Sun Sep 20 15:11:52 2020 (r365926) +++ head/sys/arm/allwinner/aw_nmi.c Sun Sep 20 16:11:38 2020 (r365927) @@ -129,7 +129,7 @@ aw_nmi_intr(void *arg) } if (intr_isrc_dispatch(&sc->intr.isrc, curthread->td_intr_frame) != 0) { - SC_NMI_WRITE(sc, sc->cfg->enable_reg, !NMI_IRQ_ENABLE); + SC_NMI_WRITE(sc, sc->cfg->enable_reg, ~NMI_IRQ_ENABLE); device_printf(sc->dev, "Stray interrupt, NMI disabled\n"); } @@ -153,7 +153,7 @@ aw_nmi_disable_intr(device_t dev, struct intr_irqsrc * sc = device_get_softc(dev); - SC_NMI_WRITE(sc, sc->cfg->enable_reg, !NMI_IRQ_ENABLE); + SC_NMI_WRITE(sc, sc->cfg->enable_reg, ~NMI_IRQ_ENABLE); } static int @@ -296,7 +296,7 @@ aw_nmi_teardown_intr(device_t dev, struct intr_irqsrc sc->intr.pol = INTR_POLARITY_CONFORM; sc->intr.tri = INTR_TRIGGER_CONFORM; - SC_NMI_WRITE(sc, sc->cfg->enable_reg, !NMI_IRQ_ENABLE); + SC_NMI_WRITE(sc, sc->cfg->enable_reg, ~NMI_IRQ_ENABLE); } return (0); @@ -367,7 +367,7 @@ aw_nmi_attach(device_t dev) } /* Disable and clear interrupts */ - SC_NMI_WRITE(sc, sc->cfg->enable_reg, !NMI_IRQ_ENABLE); + SC_NMI_WRITE(sc, sc->cfg->enable_reg, ~NMI_IRQ_ENABLE); SC_NMI_WRITE(sc, sc->cfg->pending_reg, NMI_IRQ_ACK); xref = OF_xref_from_node(ofw_bus_get_node(dev)); From owner-svn-src-head@freebsd.org Sun Sep 20 17:28:24 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D03133E8174; Sun, 20 Sep 2020 17:28:24 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BvZKh5CPcz3Z8f; Sun, 20 Sep 2020 17:28: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9589620378; Sun, 20 Sep 2020 17:28: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 08KHSOr8045344; Sun, 20 Sep 2020 17:28:24 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08KHSOUC045343; Sun, 20 Sep 2020 17:28:24 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <202009201728.08KHSOUC045343@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Sun, 20 Sep 2020 17:28:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365929 - head/sys/arm64/conf X-SVN-Group: head X-SVN-Commit-Author: mmel X-SVN-Commit-Paths: head/sys/arm64/conf X-SVN-Commit-Revision: 365929 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 20 Sep 2020 17:28:24 -0000 Author: mmel Date: Sun Sep 20 17:28:24 2020 New Revision: 365929 URL: https://svnweb.freebsd.org/changeset/base/365929 Log: Adjust DMA alignment for USB stack. It should be at least as large as the maximum value of caheline size for currently known CPUs. MFC after: 2 weeks Modified: head/sys/arm64/conf/GENERIC Modified: head/sys/arm64/conf/GENERIC ============================================================================== --- head/sys/arm64/conf/GENERIC Sun Sep 20 16:49:48 2020 (r365928) +++ head/sys/arm64/conf/GENERIC Sun Sep 20 17:28:24 2020 (r365929) @@ -218,6 +218,7 @@ device uart_snps device pl011 # USB support +options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. device aw_usbphy # Allwinner USB PHY device rk_usb2phy # Rockchip USB2PHY device rk_typec_phy # Rockchip TypeC PHY From owner-svn-src-head@freebsd.org Sun Sep 20 21:32:54 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1805B3F26E1; Sun, 20 Sep 2020 21:32:54 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bvgln6vnzz4Z9Z; Sun, 20 Sep 2020 21:32:53 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D094123ACE; Sun, 20 Sep 2020 21:32:53 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08KLWrGZ029652; Sun, 20 Sep 2020 21:32:53 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08KLWqcm029647; Sun, 20 Sep 2020 21:32:52 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202009202132.08KLWqcm029647@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sun, 20 Sep 2020 21:32:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365930 - in head/sys: net/route netinet netinet6 X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: in head/sys: net/route netinet netinet6 X-SVN-Commit-Revision: 365930 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 20 Sep 2020 21:32:54 -0000 Author: melifaro Date: Sun Sep 20 21:32:52 2020 New Revision: 365930 URL: https://svnweb.freebsd.org/changeset/base/365930 Log: Remove unused nhop_ref_any() function. Remove "opt_mpath.h" header where not needed. No functional changes. Modified: head/sys/net/route/nhop_ctl.c head/sys/net/route/nhop_utils.c head/sys/net/route/route_var.h head/sys/netinet/in_proto.c head/sys/netinet6/in6_proto.c head/sys/netinet6/in6_src.c Modified: head/sys/net/route/nhop_ctl.c ============================================================================== --- head/sys/net/route/nhop_ctl.c Sun Sep 20 17:28:24 2020 (r365929) +++ head/sys/net/route/nhop_ctl.c Sun Sep 20 21:32:52 2020 (r365930) @@ -691,13 +691,6 @@ nhop_free(struct nhop_object *nh) &nh_priv->nh_epoch_ctx); } -int -nhop_ref_any(struct nhop_object *nh) -{ - - return (nhop_try_ref_object(nh)); -} - void nhop_free_any(struct nhop_object *nh) { Modified: head/sys/net/route/nhop_utils.c ============================================================================== --- head/sys/net/route/nhop_utils.c Sun Sep 20 17:28:24 2020 (r365929) +++ head/sys/net/route/nhop_utils.c Sun Sep 20 21:32:52 2020 (r365930) @@ -29,7 +29,6 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" #include "opt_route.h" -#include "opt_mpath.h" #include #include Modified: head/sys/net/route/route_var.h ============================================================================== --- head/sys/net/route/route_var.h Sun Sep 20 17:28:24 2020 (r365929) +++ head/sys/net/route/route_var.h Sun Sep 20 21:32:52 2020 (r365930) @@ -244,7 +244,6 @@ int nhops_init_rib(struct rib_head *rh); void nhops_destroy_rib(struct rib_head *rh); void nhop_ref_object(struct nhop_object *nh); int nhop_try_ref_object(struct nhop_object *nh); -int nhop_ref_any(struct nhop_object *nh); void nhop_free_any(struct nhop_object *nh); void nhop_set_type(struct nhop_object *nh, enum nhop_type nh_type); Modified: head/sys/netinet/in_proto.c ============================================================================== --- head/sys/netinet/in_proto.c Sun Sep 20 17:28:24 2020 (r365929) +++ head/sys/netinet/in_proto.c Sun Sep 20 21:32:52 2020 (r365930) @@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" #include "opt_inet6.h" #include "opt_sctp.h" -#include "opt_mpath.h" #include #include Modified: head/sys/netinet6/in6_proto.c ============================================================================== --- head/sys/netinet6/in6_proto.c Sun Sep 20 17:28:24 2020 (r365929) +++ head/sys/netinet6/in6_proto.c Sun Sep 20 21:32:52 2020 (r365930) @@ -70,7 +70,6 @@ __FBSDID("$FreeBSD$"); #include "opt_ipsec.h" #include "opt_ipstealth.h" #include "opt_sctp.h" -#include "opt_mpath.h" #include "opt_route.h" #include Modified: head/sys/netinet6/in6_src.c ============================================================================== --- head/sys/netinet6/in6_src.c Sun Sep 20 17:28:24 2020 (r365929) +++ head/sys/netinet6/in6_src.c Sun Sep 20 21:32:52 2020 (r365930) @@ -67,8 +67,6 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" #include "opt_inet6.h" -#include "opt_mpath.h" - #include #include #include From owner-svn-src-head@freebsd.org Sun Sep 20 22:16:25 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6F2B03F3BAB; Sun, 20 Sep 2020 22:16:25 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bvhk12LJpz4ccT; Sun, 20 Sep 2020 22:16:25 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 164172442E; Sun, 20 Sep 2020 22:16: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 08KMGOCX054424; Sun, 20 Sep 2020 22:16:24 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08KMGOSr054423; Sun, 20 Sep 2020 22:16:24 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202009202216.08KMGOSr054423@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 20 Sep 2020 22:16:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365931 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 365931 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 20 Sep 2020 22:16:25 -0000 Author: kib Date: Sun Sep 20 22:16:24 2020 New Revision: 365931 URL: https://svnweb.freebsd.org/changeset/base/365931 Log: amd64 pmap: handle cases where pml4 page table page is not allocated. Possible in LA57 pmap config. Noted by: alc Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D26492 Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Sun Sep 20 21:32:52 2020 (r365930) +++ head/sys/amd64/amd64/pmap.c Sun Sep 20 22:16:24 2020 (r365931) @@ -6219,7 +6219,7 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t PMAP_LOCK(pmap); for (; sva < eva; sva = va_next) { pml4e = pmap_pml4e(pmap, sva); - if ((*pml4e & PG_V) == 0) { + if (pml4e == NULL || (*pml4e & PG_V) == 0) { va_next = (sva + NBPML4) & ~PML4MASK; if (va_next < sva) va_next = eva; @@ -6502,7 +6502,7 @@ restart: if (!pmap_pkru_same(pmap, va, va + NBPDP)) return (KERN_PROTECTION_FAILURE); pml4e = pmap_pml4e(pmap, va); - if ((*pml4e & PG_V) == 0) { + if (pml4e == NULL || (*pml4e & PG_V) == 0) { mp = _pmap_allocpte(pmap, pmap_pml4e_pindex(va), NULL, va); if (mp == NULL) { @@ -7363,7 +7363,7 @@ pmap_unwire(pmap_t pmap, vm_offset_t sva, vm_offset_t PMAP_LOCK(pmap); for (; sva < eva; sva = va_next) { pml4e = pmap_pml4e(pmap, sva); - if ((*pml4e & PG_V) == 0) { + if (pml4e == NULL || (*pml4e & PG_V) == 0) { va_next = (sva + NBPML4) & ~PML4MASK; if (va_next < sva) va_next = eva; @@ -7488,7 +7488,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_ ("pmap_copy: invalid to pmap_copy page tables")); pml4e = pmap_pml4e(src_pmap, addr); - if ((*pml4e & PG_V) == 0) { + if (pml4e == NULL || (*pml4e & PG_V) == 0) { va_next = (addr + NBPML4) & ~PML4MASK; if (va_next < addr) va_next = end_addr; @@ -8571,7 +8571,7 @@ pmap_advise(pmap_t pmap, vm_offset_t sva, vm_offset_t PMAP_LOCK(pmap); for (; sva < eva; sva = va_next) { pml4e = pmap_pml4e(pmap, sva); - if ((*pml4e & PG_V) == 0) { + if (pml4e == NULL || (*pml4e & PG_V) == 0) { va_next = (sva + NBPML4) & ~PML4MASK; if (va_next < sva) va_next = eva; @@ -9795,6 +9795,8 @@ pmap_get_mapping(pmap_t pmap, vm_offset_t va, uint64_t PMAP_LOCK(pmap); pml4 = pmap_pml4e(pmap, va); + if (pml4 == NULL) + goto done; ptr[idx++] = *pml4; if ((*pml4 & PG_V) == 0) goto done; @@ -10893,7 +10895,7 @@ pmap_pkru_update_range(pmap_t pmap, vm_offset_t sva, v for (changed = false, va = sva; va < eva; va = va_next) { pml4e = pmap_pml4e(pmap, va); - if ((*pml4e & X86_PG_V) == 0) { + if (pml4e == NULL || (*pml4e & X86_PG_V) == 0) { va_next = (va + NBPML4) & ~PML4MASK; if (va_next < va) va_next = eva; From owner-svn-src-head@freebsd.org Sun Sep 20 23:20:19 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 768FD3F53AB; Sun, 20 Sep 2020 23:20:19 +0000 (UTC) (envelope-from jrtc27@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bvk7l2LvGz4gj8; Sun, 20 Sep 2020 23:20:19 +0000 (UTC) (envelope-from jrtc27@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1BFD124E50; Sun, 20 Sep 2020 23:20:19 +0000 (UTC) (envelope-from jrtc27@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08KNKIPD091735; Sun, 20 Sep 2020 23:20:18 GMT (envelope-from jrtc27@FreeBSD.org) Received: (from jrtc27@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08KNKIDE091734; Sun, 20 Sep 2020 23:20:18 GMT (envelope-from jrtc27@FreeBSD.org) Message-Id: <202009202320.08KNKIDE091734@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jrtc27 set sender to jrtc27@FreeBSD.org using -f From: Jessica Clarke Date: Sun, 20 Sep 2020 23:20:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365932 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: jrtc27 X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 365932 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 20 Sep 2020 23:20:19 -0000 Author: jrtc27 Date: Sun Sep 20 23:20:18 2020 New Revision: 365932 URL: https://svnweb.freebsd.org/changeset/base/365932 Log: atomic_common.h: Fix the volatile qualifier placement in atomic_load_ptr This was broken in r357940 which introduced the __typeof use. We need the volatile qualifier to be on the pointee not the pointer otherwise it does nothing. This was found by mhorne in D26498, noticing there was a problem (a spin loop condition was hoisted for RISC-V boot code) but not the root cause of it. Reported by: mhorne Reviewed by: mhorne, mjg Approved by: mhorne, mjg Differential Revision: https://reviews.freebsd.org/D26500 Modified: head/sys/sys/atomic_common.h Modified: head/sys/sys/atomic_common.h ============================================================================== --- head/sys/sys/atomic_common.h Sun Sep 20 22:16:24 2020 (r365931) +++ head/sys/sys/atomic_common.h Sun Sep 20 23:20:18 2020 (r365932) @@ -41,7 +41,7 @@ #define atomic_load_short(p) (*(volatile u_short *)(p)) #define atomic_load_int(p) (*(volatile u_int *)(p)) #define atomic_load_long(p) (*(volatile u_long *)(p)) -#define atomic_load_ptr(p) (*(volatile __typeof(p))(p)) +#define atomic_load_ptr(p) (*(volatile __typeof(*p) *)(p)) #define atomic_load_8(p) (*(volatile uint8_t *)(p)) #define atomic_load_16(p) (*(volatile uint16_t *)(p)) #define atomic_load_32(p) (*(volatile uint32_t *)(p)) From owner-svn-src-head@freebsd.org Mon Sep 21 09:01:15 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9DAB83EB883; Mon, 21 Sep 2020 09:01:15 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bvz233ymJz3yVh; Mon, 21 Sep 2020 09:01: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6AA2DBC46; Mon, 21 Sep 2020 09:01: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 08L91Fw0049575; Mon, 21 Sep 2020 09:01:15 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08L91AVe049551; Mon, 21 Sep 2020 09:01:10 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <202009210901.08L91AVe049551@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Mon, 21 Sep 2020 09:01:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365938 - in head: . cddl/lib cddl/lib/libzfsbootenv cddl/lib/libzpool lib/libbe libexec/rc libexec/rc/rc.d rescue/rescue sbin/bectl sbin/reboot sbin/zfsbootcfg share/man/man5 share/mk ... X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: in head: . cddl/lib cddl/lib/libzfsbootenv cddl/lib/libzpool lib/libbe libexec/rc libexec/rc/rc.d rescue/rescue sbin/bectl sbin/reboot sbin/zfsbootcfg share/man/man5 share/mk stand stand/common stand/... X-SVN-Commit-Revision: 365938 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 21 Sep 2020 09:01:15 -0000 Author: tsoome Date: Mon Sep 21 09:01:10 2020 New Revision: 365938 URL: https://svnweb.freebsd.org/changeset/base/365938 Log: loader: zfs should support bootonce an nextboot bootonce feature is temporary, one time boot, activated by "bectl activate -t BE", "bectl activate -T BE" will reset the bootonce flag. By default, the bootonce setting is reset on attempt to boot and the next boot will use previously active BE. By setting zfs_bootonce_activate="YES" in rc.conf, the bootonce BE will be set permanently active. bootonce dataset name is recorded in boot pool labels, bootenv area. in case of nextboot, the nextboot_enable boolean variable is recorded in freebsd:nvstore nvlist, also stored in boot pool label bootenv area. On boot, the loader will process /boot/nextboot.conf if nextboot_enable is "YES", and will set nextboot_enable to "NO", preventing /boot/nextboot.conf processing on next boot. bootonce and nextboot features are usable in both UEFI and BIOS boot. To use bootonce/nextboot features, the boot loader needs to be updated on disk; if loader.efi is stored on ESP, then ESP needs to be updated and for BIOS boot, stage2 (zfsboot or gptzfsboot) needs to be updated (gpart or other tools). At this time, only lua loader is updated. Sponsored by: Netflix, Klara Inc. Differential Revision: https://reviews.freebsd.org/D25512 Added: head/cddl/lib/libzfsbootenv/ head/cddl/lib/libzfsbootenv/Makefile (contents, props changed) head/stand/common/nvstore.c (contents, props changed) Replaced: head/sys/contrib/openzfs/lib/libzfsbootenv/.gitignore head/sys/contrib/openzfs/lib/libzfsbootenv/Makefile.am Modified: head/Makefile.inc1 head/cddl/lib/Makefile head/cddl/lib/libzpool/Makefile head/lib/libbe/Makefile head/lib/libbe/be.c head/lib/libbe/be.h head/lib/libbe/be_impl.h head/lib/libbe/be_info.c head/lib/libbe/libbe.3 head/libexec/rc/rc.conf head/libexec/rc/rc.d/zfsbe head/rescue/rescue/Makefile head/sbin/bectl/Makefile head/sbin/bectl/bectl.8 head/sbin/bectl/bectl.c head/sbin/bectl/bectl_list.c head/sbin/reboot/nextboot.8 head/sbin/reboot/nextboot.sh head/sbin/zfsbootcfg/Makefile head/sbin/zfsbootcfg/zfsbootcfg.8 head/sbin/zfsbootcfg/zfsbootcfg.c head/share/man/man5/rc.conf.5 head/share/mk/bsd.libnames.mk head/share/mk/src.libnames.mk head/stand/common/bootstrap.h head/stand/defaults/loader.conf head/stand/efi/boot1/Makefile head/stand/efi/boot1/zfs_module.c head/stand/efi/loader/Makefile head/stand/efi/loader/main.c head/stand/forth/support.4th head/stand/i386/gptzfsboot/Makefile head/stand/i386/loader/Makefile head/stand/i386/loader/main.c head/stand/i386/zfsboot/Makefile head/stand/i386/zfsboot/zfsboot.c head/stand/libsa/zfs/Makefile.inc head/stand/libsa/zfs/libzfs.h head/stand/libsa/zfs/nvlist.c head/stand/libsa/zfs/zfs.c head/stand/libsa/zfs/zfsimpl.c head/stand/loader.mk head/stand/lua/config.lua head/stand/userboot/test/test.c head/stand/userboot/userboot.h head/stand/userboot/userboot/Makefile head/stand/userboot/userboot/main.c head/stand/userboot/userboot/userboot_disk.c head/sys/cddl/boot/zfs/zfsimpl.h head/tools/tools/zfsboottest/zfsboottest.c Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Mon Sep 21 08:16:42 2020 (r365937) +++ head/Makefile.inc1 Mon Sep 21 09:01:10 2020 (r365938) @@ -2835,7 +2835,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1} \ ${_cddl_lib_libtpool} \ ${_cddl_lib_libzfs_core} ${_cddl_lib_libzfs} \ ${_cddl_lib_libzutil} \ - ${_cddl_lib_libctf} \ + ${_cddl_lib_libctf} ${_cddl_lib_libzfsbootenv} \ lib/libufs \ lib/libutil lib/libpjdlog ${_lib_libypclnt} lib/libz lib/msun \ ${_secure_lib_libcrypto} ${_secure_lib_libssl} \ @@ -2915,6 +2915,7 @@ _cddl_lib_libtpool= cddl/lib/libtpool _cddl_lib_libzutil= cddl/lib/libzutil _cddl_lib_libzfs_core= cddl/lib/libzfs_core _cddl_lib_libzfs= cddl/lib/libzfs +_cddl_lib_libzfsbootenv= cddl/lib/libzfsbootenv cddl/lib/libtpool__L: cddl/lib/libspl__L @@ -2928,7 +2929,8 @@ cddl/lib/libzfs__L: cddl/lib/libuutil__L cddl/lib/liba cddl/lib/libzfs__L: cddl/lib/libnvpair__L cddl/lib/libzutil__L cddl/lib/libzfs__L: secure/lib/libcrypto__L -lib/libbe__L: cddl/lib/libzfs__L +cddl/lib/libzfsbootenv__L: cddl/lib/libzfs__L +lib/libbe__L: cddl/lib/libzfs__L cddl/lib/libzfsbootenv__L .endif _cddl_lib_libctf= cddl/lib/libctf _cddl_lib= cddl/lib Modified: head/cddl/lib/Makefile ============================================================================== --- head/cddl/lib/Makefile Mon Sep 21 08:16:42 2020 (r365937) +++ head/cddl/lib/Makefile Mon Sep 21 09:01:10 2020 (r365938) @@ -15,6 +15,7 @@ SUBDIR= drti \ libuutil \ ${_libzfs_core} \ ${_libzfs} \ + ${_libzfsbootenv} \ ${_libzpool} \ ${_libzutil} @@ -26,6 +27,7 @@ _libicp= libicp _libicp_rescue= libicp_rescue _libzfs= libzfs _libzutil= libzutil +_libzfsbootenv= libzfsbootenv .if ${MK_LIBTHR} != "no" _libzpool= libzpool _libtpool= libtpool @@ -40,6 +42,7 @@ SUBDIR_DEPEND_libzfs_core= libnvpair SUBDIR_DEPEND_libzfs= libavl libnvpair libumem libuutil libzfs_core libzutil SUBDIR_DEPEND_libzpool= libavl libnvpair libumem libicp SUBDIR_DEPEND_libzutil= libavl libtpool +SUBDIR_DEPEND_libzfsbootenv= libzfs libnvpair SUBDIR_PARALLEL= Added: head/cddl/lib/libzfsbootenv/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/lib/libzfsbootenv/Makefile Mon Sep 21 09:01:10 2020 (r365938) @@ -0,0 +1,33 @@ +# $FreeBSD$ + +.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzfsbootenv +.PATH: ${SRCTOP}/sys/contrib/openzfs/include + +PACKAGE= runtime +LIB= zfsbootenv +SHLIB_MAJOR= 1 + +LIBADD= zfs +LIBADD+= nvpair + +INCS= libzfsbootenv.h +USER_C= \ + lzbe_device.c \ + lzbe_util.c \ + lzbe_pair.c + +SRCS= $(USER_C) + +CSTD= c99 +CFLAGS+= -DIN_BASE +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include +CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -DHAVE_ISSETUGID +CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/zfs + +.include Modified: head/cddl/lib/libzpool/Makefile ============================================================================== --- head/cddl/lib/libzpool/Makefile Mon Sep 21 08:16:42 2020 (r365937) +++ head/cddl/lib/libzpool/Makefile Mon Sep 21 09:01:10 2020 (r365938) @@ -228,6 +228,7 @@ CFLAGS+= \ -I${ZFSTOP}/lib/libspl/include \ -I${ZFSTOP}/lib/libspl/include/os/freebsd \ -I${SRCTOP}/sys \ + -I${ZFSTOP}/include/os/freebsd/zfs \ -I${SRCTOP}/cddl/compat/opensolaris/include \ -I${ZFSTOP}/module/icp/include \ -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h \ Modified: head/lib/libbe/Makefile ============================================================================== --- head/lib/libbe/Makefile Mon Sep 21 08:16:42 2020 (r365937) +++ head/lib/libbe/Makefile Mon Sep 21 09:01:10 2020 (r365938) @@ -13,7 +13,9 @@ INCS= be.h MAN= libbe.3 LIBADD+= zfs -LIBADD+= nvpair spl +LIBADD+= nvpair +LIBADD+= spl +LIBADD+= zfsbootenv CFLAGS+= -DIN_BASE -DHAVE_RPC_TYPES CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include Modified: head/lib/libbe/be.c ============================================================================== --- head/lib/libbe/be.c Mon Sep 21 08:16:42 2020 (r365937) +++ head/lib/libbe/be.c Mon Sep 21 09:01:10 2020 (r365938) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "be.h" #include "be_impl.h" @@ -1221,43 +1222,20 @@ be_add_child(libbe_handle_t *lbh, const char *child_pa } #endif /* SOON */ -static int -be_set_nextboot(libbe_handle_t *lbh, nvlist_t *config, uint64_t pool_guid, - const char *zfsdev) -{ - nvlist_t **child; - uint64_t vdev_guid; - int c, children; - - if (nvlist_lookup_nvlist_array(config, ZPOOL_CONFIG_CHILDREN, &child, - &children) == 0) { - for (c = 0; c < children; ++c) - if (be_set_nextboot(lbh, child[c], pool_guid, zfsdev) != 0) - return (1); - return (0); - } - - if (nvlist_lookup_uint64(config, ZPOOL_CONFIG_GUID, - &vdev_guid) != 0) { - return (1); - } - - if (zpool_nextboot(lbh->lzh, pool_guid, vdev_guid, zfsdev) != 0) { - perror("ZFS_IOC_NEXTBOOT failed"); - return (1); - } - - return (0); -} - /* - * Deactivate old BE dataset; currently just sets canmount=noauto + * Deactivate old BE dataset; currently just sets canmount=noauto or + * resets boot once configuration. */ -static int -be_deactivate(libbe_handle_t *lbh, const char *ds) +int +be_deactivate(libbe_handle_t *lbh, const char *ds, bool temporary) { zfs_handle_t *zfs; + if (temporary) { + return (lzbe_set_boot_device( + zpool_get_name(lbh->active_phandle), lzbe_add, NULL)); + } + if ((zfs = zfs_open(lbh->lzh, ds, ZFS_TYPE_DATASET)) == NULL) return (1); if (zfs_prop_set(zfs, "canmount", "noauto") != 0) @@ -1270,10 +1248,8 @@ int be_activate(libbe_handle_t *lbh, const char *bootenv, bool temporary) { char be_path[BE_MAXPATHLEN]; - char buf[BE_MAXPATHLEN]; - nvlist_t *config, *dsprops, *vdevs; + nvlist_t *dsprops; char *origin; - uint64_t pool_guid; zfs_handle_t *zhp; int err; @@ -1284,27 +1260,10 @@ be_activate(libbe_handle_t *lbh, const char *bootenv, return (set_error(lbh, err)); if (temporary) { - config = zpool_get_config(lbh->active_phandle, NULL); - if (config == NULL) - /* config should be fetchable... */ - return (set_error(lbh, BE_ERR_UNKNOWN)); - - if (nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID, - &pool_guid) != 0) - /* Similarly, it shouldn't be possible */ - return (set_error(lbh, BE_ERR_UNKNOWN)); - - /* Expected format according to zfsbootcfg(8) man */ - snprintf(buf, sizeof(buf), "zfs:%s:", be_path); - - /* We have no config tree */ - if (nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, - &vdevs) != 0) - return (set_error(lbh, BE_ERR_NOPOOL)); - - return (be_set_nextboot(lbh, vdevs, pool_guid, buf)); + return (lzbe_set_boot_device( + zpool_get_name(lbh->active_phandle), lzbe_add, be_path)); } else { - if (be_deactivate(lbh, lbh->bootfs) != 0) + if (be_deactivate(lbh, lbh->bootfs, false) != 0) return (-1); /* Obtain bootenv zpool */ Modified: head/lib/libbe/be.h ============================================================================== --- head/lib/libbe/be.h Mon Sep 21 08:16:42 2020 (r365937) +++ head/lib/libbe/be.h Mon Sep 21 09:01:10 2020 (r365938) @@ -81,6 +81,7 @@ int be_prop_list_alloc(nvlist_t **be_list); void be_prop_list_free(nvlist_t *be_list); int be_activate(libbe_handle_t *, const char *, bool); +int be_deactivate(libbe_handle_t *, const char *, bool); bool be_is_auto_snapshot_name(libbe_handle_t *, const char *); Modified: head/lib/libbe/be_impl.h ============================================================================== --- head/lib/libbe/be_impl.h Mon Sep 21 08:16:42 2020 (r365937) +++ head/lib/libbe/be_impl.h Mon Sep 21 09:01:10 2020 (r365938) @@ -63,6 +63,7 @@ typedef struct prop_data { nvlist_t *list; libbe_handle_t *lbh; bool single_object; /* list will contain props directly */ + char *bootonce; } prop_data_t; int prop_list_builder_cb(zfs_handle_t *, void *); Modified: head/lib/libbe/be_info.c ============================================================================== --- head/lib/libbe/be_info.c Mon Sep 21 08:16:42 2020 (r365937) +++ head/lib/libbe/be_info.c Mon Sep 21 09:01:10 2020 (r365938) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include "be.h" #include "be_impl.h" @@ -108,6 +109,7 @@ be_get_bootenv_props(libbe_handle_t *lbh, nvlist_t *ds data.lbh = lbh; data.list = dsnvl; data.single_object = false; + data.bootonce = NULL; return (be_proplist_update(&data)); } @@ -121,6 +123,7 @@ be_get_dataset_props(libbe_handle_t *lbh, const char * data.lbh = lbh; data.list = props; data.single_object = true; + data.bootonce = NULL; if ((snap_hdl = zfs_open(lbh->lzh, name, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_SNAPSHOT)) == NULL) return (BE_ERR_ZFSOPEN); @@ -140,6 +143,7 @@ be_get_dataset_snapshots(libbe_handle_t *lbh, const ch data.lbh = lbh; data.list = props; data.single_object = false; + data.bootonce = NULL; if ((ds_hdl = zfs_open(lbh->lzh, name, ZFS_TYPE_FILESYSTEM)) == NULL) return (BE_ERR_ZFSOPEN); @@ -179,6 +183,10 @@ prop_list_builder_cb(zfs_handle_t *zfs_hdl, void *data dataset = zfs_get_name(zfs_hdl); nvlist_add_string(props, "dataset", dataset); + if (data->bootonce != NULL && + strcmp(dataset, data->bootonce) == 0) + nvlist_add_boolean_value(props, "bootonce", true); + name = strrchr(dataset, '/') + 1; nvlist_add_string(props, "name", name); @@ -245,6 +253,9 @@ be_proplist_update(prop_data_t *data) if ((root_hdl = zfs_open(data->lbh->lzh, data->lbh->root, ZFS_TYPE_FILESYSTEM)) == NULL) return (BE_ERR_ZFSOPEN); + + (void) lzbe_get_boot_device(zpool_get_name(data->lbh->active_phandle), + &data->bootonce); /* XXX TODO: some error checking here */ zfs_iter_filesystems(root_hdl, prop_list_builder_cb, data); Modified: head/lib/libbe/libbe.3 ============================================================================== --- head/lib/libbe/libbe.3 Mon Sep 21 08:16:42 2020 (r365937) +++ head/lib/libbe/libbe.3 Mon Sep 21 09:01:10 2020 (r365938) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 16, 2019 +.Dd July 22, 2020 .Dt LIBBE 3 .Os .Sh NAME @@ -78,7 +78,11 @@ .Pp .Ft int .Fn be_activate "libbe_handle_t *hdl" "const char *be_name" "bool temporary" +.Pp .Ft int +.Fn be_deactivate "libbe_handle_t *hdl" "const char *be_name" "bool temporary" +.Pp +.Ft int .Fn be_destroy "libbe_handle_t *hdl" "const char *be_name" "int options" .Pp .Ft void @@ -270,8 +274,24 @@ If the .Fa temporary flag is set, then it will be active for the next boot only, as done by .Xr zfsbootcfg 8 . -Next boot functionality is currently only available when booting in x86 BIOS -mode. +.Pp +The +.Fn be_deactivate +function deactivates a boot environment. +If the +.Fa temporary +flag is set, then it will cause removal of boot once configuration, set by +.Fn be_activate +function or by +.Xr zfsbootcfg 8 . +If the +.Fa temporary +flag is not set, +.Fn be_deactivate +function will set zfs +.Dv canmount +property to +.Dv noauto . .Pp The .Fn be_destroy Modified: head/libexec/rc/rc.conf ============================================================================== --- head/libexec/rc/rc.conf Mon Sep 21 08:16:42 2020 (r365937) +++ head/libexec/rc/rc.conf Mon Sep 21 09:01:10 2020 (r365938) @@ -64,6 +64,7 @@ rc_conf_files="/etc/rc.conf /etc/rc.conf.local" # ZFS support zfs_enable="NO" # Set to YES to automatically mount ZFS file systems +zfs_bootonce_activate="NO" # Set YES to make successful bootonce BE permanent # ZFSD support zfsd_enable="NO" # Set to YES to automatically start the ZFS fault Modified: head/libexec/rc/rc.d/zfsbe ============================================================================== --- head/libexec/rc/rc.d/zfsbe Mon Sep 21 08:16:42 2020 (r365937) +++ head/libexec/rc/rc.d/zfsbe Mon Sep 21 09:01:10 2020 (r365938) @@ -48,6 +48,21 @@ mount_subordinate() done } +activate_bootonce() +{ + local _dev + local _bootonce + local _be + + _dev=$1 + _be=${_dev##*/} + + _bootonce="`kenv -q zfs-bootonce`" + if [ "$_bootonce" = "zfs:${_dev}:" ] ; then + bectl activate $_be + fi +} + be_start() { if [ `$SYSCTL_N security.jail.jailed` -eq 1 ]; then @@ -57,6 +72,9 @@ be_start() [ $_mp = "/" ] || continue if [ $_type = "zfs" ] ; then mount_subordinate $_dev + if checkyesno zfs_bootonce_activate; then + activate_bootonce $_dev + fi fi break done Modified: head/rescue/rescue/Makefile ============================================================================== --- head/rescue/rescue/Makefile Mon Sep 21 08:16:42 2020 (r365937) +++ head/rescue/rescue/Makefile Mon Sep 21 09:01:10 2020 (r365938) @@ -129,7 +129,7 @@ CRUNCH_PROGS_usr.sbin+= zdb CRUNCH_LIBS+= -l80211 -lalias -lcam -lncursesw -ldevstat -lipsec -llzma .if ${MK_ZFS} != "no" CRUNCH_LIBS+= -lavl -lzpool -lzfs_core -lzfs -lnvpair -lpthread -luutil -lumem -CRUNCH_LIBS+= -lbe -lzutil -ltpool -lspl -licp_rescue +CRUNCH_LIBS+= -lbe -lzfsbootenv -lzutil -ltpool -lspl -licp_rescue .else # liblzma needs pthread CRUNCH_LIBS+= -lpthread Modified: head/sbin/bectl/Makefile ============================================================================== --- head/sbin/bectl/Makefile Mon Sep 21 08:16:42 2020 (r365937) +++ head/sbin/bectl/Makefile Mon Sep 21 09:01:10 2020 (r365938) @@ -12,6 +12,7 @@ LIBADD+= be \ nvpair \ spl \ util \ + zfsbootenv CFLAGS+= -DIN_BASE CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include Modified: head/sbin/bectl/bectl.8 ============================================================================== --- head/sbin/bectl/bectl.8 Mon Sep 21 08:16:42 2020 (r365937) +++ head/sbin/bectl/bectl.8 Mon Sep 21 09:01:10 2020 (r365938) @@ -17,7 +17,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 17, 2020 +.Dd August 25, 2020 .Dt BECTL 8 .Os .Sh NAME @@ -26,7 +26,7 @@ .Sh SYNOPSIS .Nm .Cm activate -.Op Fl t +.Op Fl t | Fl T .Ar beName .Nm .Cm check @@ -95,7 +95,7 @@ The following commands are supported by .Bl -tag -width activate .It Xo .Cm activate -.Op Fl t +.Op Fl t | Fl T .Ar beName .Xc Activate the given @@ -104,6 +104,13 @@ as the default boot filesystem. If the .Fl t flag is given, this takes effect only for the next boot. +Flag +.Fl T +removes temporary boot once configuration. +Without temporary configuration, the next boot will use zfs dataset specified +in boot pool +.Ar bootfs +property. .It Xo .Cm check .Xc @@ -260,8 +267,10 @@ field indicates whether the boot environment is active .Pq Em \&N ; active on reboot .Pq Em \&R ; -or both -.Pq Em \&NR . +is used on next boot once +.Pq Em \&T ; +or combination of +.Pq Em \&NRT . .Pp .Bl -tag -width indent .It Fl a Modified: head/sbin/bectl/bectl.c ============================================================================== --- head/sbin/bectl/bectl.c Mon Sep 21 08:16:42 2020 (r365937) +++ head/sbin/bectl/bectl.c Mon Sep 21 09:01:10 2020 (r365938) @@ -74,6 +74,7 @@ usage(bool explicit) "\tbectl add (path)*\n" #endif "\tbectl activate [-t] beName\n" + "\tbectl activate [-T]\n" "\tbectl check\n" "\tbectl create [-r] [-e {nonActiveBe | beName@snapshot}] beName\n" "\tbectl create [-r] beName@snapshot\n" @@ -141,14 +142,22 @@ static int bectl_cmd_activate(int argc, char *argv[]) { int err, opt; - bool temp; + bool temp, reset; temp = false; - while ((opt = getopt(argc, argv, "t")) != -1) { + reset = false; + while ((opt = getopt(argc, argv, "tT")) != -1) { switch (opt) { case 't': + if (reset) + return (usage(false)); temp = true; break; + case 'T': + if (temp) + return (usage(false)); + reset = true; + break; default: fprintf(stderr, "bectl activate: unknown option '-%c'\n", optopt); @@ -159,11 +168,18 @@ bectl_cmd_activate(int argc, char *argv[]) argc -= optind; argv += optind; - if (argc != 1) { + if (argc != 1 && (!reset || argc != 0)) { fprintf(stderr, "bectl activate: wrong number of arguments\n"); return (usage(false)); } + if (reset) { + if ((err = be_deactivate(be, NULL, reset)) == 0) + printf("Temporary activation removed\n"); + else + printf("Failed to remove temporary activation\n"); + return (err); + } /* activate logic goes here */ if ((err = be_activate(be, argv[0], temp)) != 0) Modified: head/sbin/bectl/bectl_list.c ============================================================================== --- head/sbin/bectl/bectl_list.c Mon Sep 21 08:16:42 2020 (r365937) +++ head/sbin/bectl/bectl_list.c Mon Sep 21 09:01:10 2020 (r365938) @@ -182,7 +182,7 @@ print_info(const char *name, nvlist_t *dsprops, struct const char *oname; char *dsname, *propstr; int active_colsz; - boolean_t active_now, active_reboot; + boolean_t active_now, active_reboot, bootonce; dsname = NULL; originprops = NULL; @@ -228,6 +228,11 @@ print_info(const char *name, nvlist_t *dsprops, struct if (nvlist_lookup_boolean_value(dsprops, "nextboot", &active_reboot) == 0 && active_reboot) { printf("R"); + active_colsz--; + } + if (nvlist_lookup_boolean_value(dsprops, "bootonce", + &bootonce) == 0 && bootonce) { + printf("T"); active_colsz--; } if (active_colsz == pc->active_colsz_def) { Modified: head/sbin/reboot/nextboot.8 ============================================================================== --- head/sbin/reboot/nextboot.8 Mon Sep 21 08:16:42 2020 (r365937) +++ head/sbin/reboot/nextboot.8 Mon Sep 21 09:01:10 2020 (r365938) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 9, 2016 +.Dd September 19, 2020 .Dt NEXTBOOT 8 .Os .Sh NAME @@ -136,8 +136,3 @@ It is also my first attempt to write in Forth. Finally, it does some evil things like writing to the file system before it has been checked. If it scrambles your file system, do not blame me. -.Pp -.Xr loader 8 -is only able to read ZFS, not write to it. -.Pa nextboot.conf -will NOT be reset in case of a kernel boot failure. Modified: head/sbin/reboot/nextboot.sh ============================================================================== --- head/sbin/reboot/nextboot.sh Mon Sep 21 08:16:42 2020 (r365937) +++ head/sbin/reboot/nextboot.sh Mon Sep 21 09:01:10 2020 (r365938) @@ -33,6 +33,7 @@ delete="NO" kenv= force="NO" nextboot_file="/boot/nextboot.conf" +zfs= add_kenv() { @@ -106,26 +107,26 @@ if [ -n "${kernel}" -a ${force} = "NO" -a ! -d /boot/$ exit 1 fi -df -Tn "/boot/" 2>/dev/null | while read _fs _type _other ; do +zfs=$(df -Tn "/boot/" 2>/dev/null | while read _fs _type _other ; do [ "zfs" = "${_type}" ] || continue - cat 1>&2 <<-EOF - WARNING: loader(8) has only R/O support for ZFS - nextboot.conf will NOT be reset in case of kernel boot failure - EOF -done + echo "${_fs%/ROOT/*}" +done) set -e nextboot_tmp=$(mktemp $(dirname ${nextboot_file})/nextboot.XXXXXX) -if [ ${append} = "YES" -a -f ${nextboot_file} ]; then - cp -f ${nextboot_file} ${nextboot_tmp} -fi - +if [ -n ${zfs} ]; then + zfsbootcfg -z ${zfs} -n freebsd:nvstore -k nextboot_enable -v YES + cat >> ${nextboot_tmp} << EOF +$kenv +EOF +else cat >> ${nextboot_tmp} << EOF nextboot_enable="YES" $kenv EOF +fi fsync ${nextboot_tmp} Modified: head/sbin/zfsbootcfg/Makefile ============================================================================== --- head/sbin/zfsbootcfg/Makefile Mon Sep 21 08:16:42 2020 (r365937) +++ head/sbin/zfsbootcfg/Makefile Mon Sep 21 09:01:10 2020 (r365938) @@ -2,14 +2,9 @@ # $FreeBSD$ PROG= zfsbootcfg -WARNS?= 2 MAN= zfsbootcfg.8 -LIBADD+=zfs -LIBADD+=nvpair -LIBADD+=umem -LIBADD+=uutil -LIBADD+=geom +LIBADD+=zfsbootenv CFLAGS+= -DIN_BASE CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include Modified: head/sbin/zfsbootcfg/zfsbootcfg.8 ============================================================================== --- head/sbin/zfsbootcfg/zfsbootcfg.8 Mon Sep 21 08:16:42 2020 (r365937) +++ head/sbin/zfsbootcfg/zfsbootcfg.8 Mon Sep 21 09:01:10 2020 (r365938) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 24, 2017 +.Dd July 22, 2020 .Dt ZFSBOOTCFG 8 .Os .Sh NAME @@ -33,39 +33,88 @@ .Sh SYNOPSIS .Nm .Ao Ar options Ac +.Nm +.Op Fl n Ar name +.Op Fl k Ar key +.Op Fl p +.Op Fl t Ar type +.Op Fl v Ar value +.Op Fl z Ar pool +.Nm .Sh DESCRIPTION .Nm is used to set .Xr boot.config 5 Ns -style options to be used by -.Xr zfsboot 8 -or +.Xr zfsboot 8 , .Xr gptzfsboot 8 +or +.Xr loader 8 the next time the machine is booted. Once .Xr zfsboot 8 or .Xr gptzfsboot 8 +or +.Xr loader 8 reads the information, it is deleted. If booting fails, the machine automatically reverts to the previous boot configuration. -The information is stored in a special reserved area of a ZFS pool. -.Xr zfsboot 8 -or -.Xr gptzfsboot 8 -read the boot option information from the first disk found in the first -ZFS pool found. +The information is stored in a special boot environment area of a ZFS pool. +.Pp +If used without arguments, +.Nm +will output the current boot configuration, if set. +.Pp +The following options are supported by +.Nm : +.Bl -tag -width indent +.It Fl k Ar key +Define key for +.Ao key , value Ac +pair. +.It Fl n Ar name +Update nvlist +.Ar name . +.It Fl p +Print all information stored in ZFS pool bootenv area. +.It Fl t Ar type +Set type of +.Ar value +used in +.Ao key , value Ac +pair. +Currently supported types are: +.Bl -tag -width indent -compact +.It Ar DATA_TYPE_BYTE +.It Ar DATA_TYPE_INT8 +.It Ar DATA_TYPE_UINT8 +.It Ar DATA_TYPE_INT16 +.It Ar DATA_TYPE_UINT16 +.It Ar DATA_TYPE_INT32 +.It Ar DATA_TYPE_UINT32 +.It Ar DATA_TYPE_INT64 +.It Ar DATA_TYPE_UINT64 +.It Ar DATA_TYPE_BOOLEAN_VALUE +.It Ar DATA_TYPE_STRING +.El +.Pp +If not specified, the default is +.Ar DATA_TYPE_STRING . +.It Fl v Ar value +Define value for +.Ao key , value Ac +pair. +.It Fl z Ar pool +Operate on +.Ar pool . +.El .Sh ENVIRONMENT -.Bl -tag -width vfs.zfs.boot.primary_pool -compact -.It Ev vfs.zfs.boot.primary_pool +.Bl -tag -width vfs.root.mountfrom -compact +.It Ev vfs.root.mountfrom The .Xr kenv 1 variable that identifies a pool for which the options are written. -.It Ev vfs.zfs.boot.primary_vdev -The -.Xr kenv 1 -variable that identifies a disk within the pool where the options -are written. .El .Sh EXAMPLES Try to boot to a new @@ -81,7 +130,9 @@ To clear the boot options: .Dl "zfsbootcfg """" .Sh SEE ALSO .Xr boot.config 5 , +.Xr bectl 8 , .Xr gptzfsboot 8 , +.Xr loader 8 , .Xr zfsboot 8 .Sh HISTORY .Nm @@ -90,23 +141,3 @@ appeared in .Sh AUTHORS This manual page was written by .An Andriy Gapon Aq Mt avg@FreeBSD.org . -.Sh CAVEATS -At the moment, -.Nm -uses the -.Ev vfs.zfs.boot.primary_pool -and -.Ev vfs.zfs.boot.primary_vdev -.Xr kenv 1 -variables to determine a ZFS pool and a disk in it where the options -are to be stored. -The variables are set by the ZFS boot chain, so there is an assumption -that the same boot disk is going to be used for the next reboot. -There is no -.Nm -option to specify a different pool or a different disk. -.Pp -.Nm -should be extended to install new -.Xr zfsboot 8 -blocks in a ZFS pool. Modified: head/sbin/zfsbootcfg/zfsbootcfg.c ============================================================================== --- head/sbin/zfsbootcfg/zfsbootcfg.c Mon Sep 21 08:16:42 2020 (r365937) +++ head/sbin/zfsbootcfg/zfsbootcfg.c Mon Sep 21 09:01:10 2020 (r365938) @@ -32,115 +32,257 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include +#include -#include +#include -/* Keep in sync with zfsboot.c. */ -#define MAX_COMMAND_LEN 512 +#ifndef ZFS_MAXNAMELEN +#define ZFS_MAXNAMELEN 256 +#endif -int -install_bootonce(libzfs_handle_t *hdl, uint64_t pool_guid, nvlist_t *nv, - const char * const data) +static int +add_pair(const char *name, const char *nvlist, const char *key, + const char *type, const char *value) { - nvlist_t **child; - uint_t children = 0; - uint64_t guid; + void *data, *nv; + size_t size; int rv; + char *end; - (void) nvlist_lookup_nvlist_array(nv, ZPOOL_CONFIG_CHILDREN, &child, - &children); + rv = lzbe_nvlist_get(name, nvlist, &nv); + if (rv != 0) + return (rv); - for (int c = 0; c < children; c++) { - rv = install_bootonce(hdl, pool_guid, child[c], data); - } + data = NULL; + rv = EINVAL; + if (strcmp(type, "DATA_TYPE_STRING") == 0) { + data = __DECONST(void *, value); + size = strlen(data) + 1; + rv = lzbe_add_pair(nv, key, type, data, size); + } else if (strcmp(type, "DATA_TYPE_UINT64") == 0) { + uint64_t v; - if (children > 0) - return (rv); + v = strtoull(value, &end, 0); + if (errno != 0 || *end != '\0') + goto done; + size = sizeof (v); + rv = lzbe_add_pair(nv, key, type, &v, size); + } else if (strcmp(type, "DATA_TYPE_INT64") == 0) { + int64_t v; - if (nvlist_lookup_uint64(nv, ZPOOL_CONFIG_GUID, &guid) != 0) { - perror("can't get vdev guid"); - return (1); + v = strtoll(value, &end, 0); + if (errno != 0 || *end != '\0') + goto done; + size = sizeof (v); + rv = lzbe_add_pair(nv, key, type, &v, size); + } else if (strcmp(type, "DATA_TYPE_UINT32") == 0) { + uint32_t v; + + v = strtoul(value, &end, 0); + if (errno != 0 || *end != '\0') + goto done; + size = sizeof (v); + rv = lzbe_add_pair(nv, key, type, &v, size); + } else if (strcmp(type, "DATA_TYPE_INT32") == 0) { + int32_t v; + + v = strtol(value, &end, 0); + if (errno != 0 || *end != '\0') + goto done; + size = sizeof (v); + rv = lzbe_add_pair(nv, key, type, &v, size); + } else if (strcmp(type, "DATA_TYPE_UINT16") == 0) { + uint16_t v; + + v = strtoul(value, &end, 0); + if (errno != 0 || *end != '\0') + goto done; + size = sizeof (v); + rv = lzbe_add_pair(nv, key, type, &v, size); + } else if (strcmp(type, "DATA_TYPE_INT16") == 0) { + int16_t v; + + v = strtol(value, &end, 0); + if (errno != 0 || *end != '\0') + goto done; + size = sizeof (v); + rv = lzbe_add_pair(nv, key, type, &v, size); + } else if (strcmp(type, "DATA_TYPE_UINT8") == 0) { + uint8_t v; + + v = strtoul(value, &end, 0); + if (errno != 0 || *end != '\0') + goto done; + size = sizeof (v); + rv = lzbe_add_pair(nv, key, type, &v, size); + } else if (strcmp(type, "DATA_TYPE_INT8") == 0) { + int8_t v; + + v = strtol(value, &end, 0); + if (errno != 0 || *end != '\0') + goto done; + size = sizeof (v); + rv = lzbe_add_pair(nv, key, type, &v, size); + } else if (strcmp(type, "DATA_TYPE_BYTE") == 0) { + uint8_t v; + + v = strtoul(value, &end, 0); + if (errno != 0 || *end != '\0') + goto done; + size = sizeof (v); + rv = lzbe_add_pair(nv, key, type, &v, size); + } else if (strcmp(type, "DATA_TYPE_BOOLEAN_VALUE") == 0) { + int32_t v; + + v = strtol(value, &end, 0); + if (errno != 0 || *end != '\0') { + if (strcasecmp(value, "YES") == 0) + v = 1; + else if (strcasecmp(value, "NO") == 0) + v = 0; + if (strcasecmp(value, "true") == 0) + v = 1; + else if (strcasecmp(value, "false") == 0) + v = 0; + else goto done; + } + size = sizeof (v); + rv = lzbe_add_pair(nv, key, type, &v, size); } - if (zpool_nextboot(hdl, pool_guid, guid, data) != 0) { - perror("ZFS_IOC_NEXTBOOT failed"); - return (1); - } - return (0); + + if (rv == 0) + rv = lzbe_nvlist_set(name, nvlist, nv); + +done: + lzbe_nvlist_free(nv); + return (rv); } -int main(int argc, const char * const *argv) +static int +delete_pair(const char *name, const char *nvlist, const char *key) { - char buf[32], *name; - libzfs_handle_t *hdl; - zpool_handle_t *zphdl; - uint64_t pool_guid; - nvlist_t *nv, *config; + void *nv; int rv; - int len; - if (argc != 2) { - fprintf(stderr, "usage: zfsbootcfg \n"); - return (1); + rv = lzbe_nvlist_get(name, nvlist, &nv); + if (rv == 0) { + rv = lzbe_remove_pair(nv, key); } + if (rv == 0) + rv = lzbe_nvlist_set(name, nvlist, nv); - len = strlen(argv[1]); - if (len >= MAX_COMMAND_LEN) { - fprintf(stderr, "options string is too long\n"); - return (1); - } + lzbe_nvlist_free(nv); + return (rv); +} - if (kenv(KENV_GET, "vfs.root.mountfrom", buf, sizeof(buf)) <= 0) { - perror("can't get vfs.root.mountfrom"); - return (1); +/* + * Usage: zfsbootcfg [-z pool] [-d key] [-k key -t type -v value] [-p] + * zfsbootcfg [-z pool] -n nvlist [-d key] [-k key -t type -v value] [-p] + * + * if nvlist is set, we will update nvlist in bootenv. + * if nvlist is not set, we update pairs in bootenv. + */ +int +main(int argc, char * const *argv) +{ + char buf[ZFS_MAXNAMELEN], *name; + const char *key, *value, *type, *nvlist; + int rv; + bool print, delete; + + nvlist = NULL; + name = NULL; + key = NULL; + type = NULL; + value = NULL; + print = delete = false; + while ((rv = getopt(argc, argv, "d:k:n:pt:v:z:")) != -1) { + switch (rv) { + case 'd': + delete = true; + key = optarg; + break; + case 'k': *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Mon Sep 21 09:03:33 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7D3673EBA00; Mon, 21 Sep 2020 09:03:33 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bvz4j2jVpz3ysx; Mon, 21 Sep 2020 09:03:33 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 40DE6BED3; Mon, 21 Sep 2020 09:03:33 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08L93XPh055180; Mon, 21 Sep 2020 09:03:33 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08L93X7J055179; Mon, 21 Sep 2020 09:03:33 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202009210903.08L93X7J055179@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Mon, 21 Sep 2020 09:03:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365939 - head X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 365939 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 21 Sep 2020 09:03:33 -0000 Author: arichardson Date: Mon Sep 21 09:03:32 2020 New Revision: 365939 URL: https://svnweb.freebsd.org/changeset/base/365939 Log: Prefer bootstrapped tools when running certctl.sh Otherwise we get lots of warnings when building on Linux/macOS during installworld: Scanning /local/scratch/alr48/cheri/output/freebsd-x86/usr/share/certs/blacklisted for certificates... install: invalid option -- 'U' Try 'install --help' for more information. install: invalid option -- 'U' .... Reviewed By: kevans Differential Revision: https://reviews.freebsd.org/D26481 Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Mon Sep 21 09:01:10 2020 (r365938) +++ head/Makefile.inc1 Mon Sep 21 09:03:32 2020 (r365939) @@ -1451,7 +1451,7 @@ distributeworld installworld stageworld: _installcheck .endif # make(distributeworld) .if !make(packageworld) && ${MK_CAROOT} != "no" @if which openssl>/dev/null; then \ - DESTDIR=${CERTCTLDESTDIR} \ + DESTDIR=${CERTCTLDESTDIR} PATH=${TMPPATH}:${PATH} \ sh ${SRCTOP}/usr.sbin/certctl/certctl.sh ${CERTCTLFLAGS} rehash \ else \ echo "No openssl on the host, not rehashing certificates target -- /etc/ssl may not be populated."; \ From owner-svn-src-head@freebsd.org Mon Sep 21 09:03:40 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C45173EB89E; Mon, 21 Sep 2020 09:03:40 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bvz4q3vPrz3ytF; Mon, 21 Sep 2020 09:03:38 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2258DBA6B; Mon, 21 Sep 2020 09:03:38 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08L93b67055236; Mon, 21 Sep 2020 09:03:37 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08L93bqt055235; Mon, 21 Sep 2020 09:03:37 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202009210903.08L93bqt055235@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Mon, 21 Sep 2020 09:03:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365940 - head/usr.bin/grep X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/usr.bin/grep X-SVN-Commit-Revision: 365940 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 21 Sep 2020 09:03:44 -0000 Author: arichardson Date: Mon Sep 21 09:03:37 2020 New Revision: 365940 URL: https://svnweb.freebsd.org/changeset/base/365940 Log: Fix -Wpointer-sign warnings in usr.bin/grep Reviewed By: kevans Differential Revision: https://reviews.freebsd.org/D26479 Modified: head/usr.bin/grep/file.c Modified: head/usr.bin/grep/file.c ============================================================================== --- head/usr.bin/grep/file.c Mon Sep 21 09:03:32 2020 (r365939) +++ head/usr.bin/grep/file.c Mon Sep 21 09:03:37 2020 (r365940) @@ -55,12 +55,12 @@ __FBSDID("$FreeBSD$"); #define MAXBUFSIZ (32 * 1024) #define LNBUFBUMP 80 -static unsigned char *buffer; -static unsigned char *bufpos; +static char *buffer; +static char *bufpos; static size_t bufrem; static size_t fsiz; -static unsigned char *lnbuf; +static char *lnbuf; static size_t lnbuflen; static inline int @@ -97,7 +97,7 @@ grep_lnbufgrow(size_t newlen) char * grep_fgetln(struct file *f, struct parsec *pc) { - unsigned char *p; + char *p; char *ret; size_t len; size_t off; From owner-svn-src-head@freebsd.org Mon Sep 21 09:03:45 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 66E263EBA89; Mon, 21 Sep 2020 09:03:45 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bvz4x1cYrz403J; Mon, 21 Sep 2020 09:03:45 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 01F2ABED4; Mon, 21 Sep 2020 09:03:43 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08L93gYm055289; Mon, 21 Sep 2020 09:03:42 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08L93gUn055288; Mon, 21 Sep 2020 09:03:42 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202009210903.08L93gUn055288@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Mon, 21 Sep 2020 09:03:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365941 - head/contrib/nvi/common X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/contrib/nvi/common X-SVN-Commit-Revision: 365941 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 21 Sep 2020 09:03:45 -0000 Author: arichardson Date: Mon Sep 21 09:03:42 2020 New Revision: 365941 URL: https://svnweb.freebsd.org/changeset/base/365941 Log: Fix vi build on Linux/macOS This absolute include causes a build failure on Linux for me: .../cheri/freebsd/contrib/nvi/cl/../common/common.h:10:10: fatal error: '/usr/include/db.h' file not found This change patches the file to use #include instead until a solution has been found upstream. See also https://github.com/lichray/nvi2/issues/69 Reviewed By: bapt Differential Revision: https://reviews.freebsd.org/D26480 Modified: head/contrib/nvi/common/common.h Modified: head/contrib/nvi/common/common.h ============================================================================== --- head/contrib/nvi/common/common.h Mon Sep 21 09:03:37 2020 (r365940) +++ head/contrib/nvi/common/common.h Mon Sep 21 09:03:42 2020 (r365941) @@ -7,7 +7,7 @@ * See the LICENSE file for redistribution information. */ -#include "/usr/include/db.h" /* Only include db1. */ +#include /* Only include db1. */ #include /* May refer to the bundled regex. */ /* From owner-svn-src-head@freebsd.org Mon Sep 21 10:02:11 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A9AD63ECB3F; Mon, 21 Sep 2020 10:02:11 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bw0NM446kz43cK; Mon, 21 Sep 2020 10:02:11 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 704C2C674; Mon, 21 Sep 2020 10:02:11 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08LA2B41093306; Mon, 21 Sep 2020 10:02:11 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08LA2BpX093305; Mon, 21 Sep 2020 10:02:11 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202009211002.08LA2BpX093305@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 21 Sep 2020 10:02:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365943 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 365943 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 21 Sep 2020 10:02:11 -0000 Author: avg Date: Mon Sep 21 10:02:11 2020 New Revision: 365943 URL: https://svnweb.freebsd.org/changeset/base/365943 Log: aw_usbphy: add support for device mode operation OTG mode is not supported still. It's easy to do it as a one-off detection, but the proper support requires continuous monitoring and communicating the current state to the USB layer. Also, fix phy0_route setting for H3. Remove duplicate register definitions. Tested on Orange Pi PC Plus with dr_mode="peripheral" using hw.usb.template=3 umodem_load="YES" Reviewed by: manu MFC after: 5 weeks Differential Revision: https://reviews.freebsd.org/D26348 Modified: head/sys/arm/allwinner/aw_usbphy.c Modified: head/sys/arm/allwinner/aw_usbphy.c ============================================================================== --- head/sys/arm/allwinner/aw_usbphy.c Mon Sep 21 09:50:57 2020 (r365942) +++ head/sys/arm/allwinner/aw_usbphy.c Mon Sep 21 10:02:11 2020 (r365943) @@ -102,7 +102,7 @@ static const struct aw_usbphy_conf h3_usbphy_conf = { .num_phys = 4, .phy_type = AWUSBPHY_TYPE_H3, .pmu_unk1 = true, - .phy0_route = false, + .phy0_route = true, }; static const struct aw_usbphy_conf a64_usbphy_conf = { @@ -175,8 +175,10 @@ DEFINE_CLASS_1(awusbphy_phynode, awusbphy_phynode_clas #define FORCE_ID (0x3 << 14) #define FORCE_ID_SHIFT 14 #define FORCE_ID_LOW 2 +#define FORCE_ID_HIGH 3 #define FORCE_VBUS_VALID (0x3 << 12) #define FORCE_VBUS_VALID_SHIFT 12 +#define FORCE_VBUS_VALID_LOW 2 #define FORCE_VBUS_VALID_HIGH 3 #define VBUS_CHANGE_DET (1 << 6) #define ID_CHANGE_DET (1 << 5) @@ -190,18 +192,6 @@ DEFINE_CLASS_1(awusbphy_phynode, awusbphy_phynode_clas #define PMU_ULPI_BYPASS (1 << 0) #define PMU_UNK_H3 0x10 #define PMU_UNK_H3_CLR 0x2 -#define PHY_CSR 0x00 -#define ID_PULLUP_EN (1 << 17) -#define DPDM_PULLUP_EN (1 << 16) -#define FORCE_ID (0x3 << 14) -#define FORCE_ID_SHIFT 14 -#define FORCE_ID_LOW 2 -#define FORCE_VBUS_VALID (0x3 << 12) -#define FORCE_VBUS_VALID_SHIFT 12 -#define FORCE_VBUS_VALID_HIGH 3 -#define VBUS_CHANGE_DET (1 << 6) -#define ID_CHANGE_DET (1 << 5) -#define DPDM_CHANGE_DET (1 << 4) static void awusbphy_configure(device_t dev, int phyno) @@ -335,7 +325,12 @@ awusbphy_vbus_detect(device_t dev, int *val) return (0); } - *val = 0; + /* TODO check vbus_power-supply. */ + + /* + * If there is no way to detect, assume present. + */ + *val = 1; return (0); } @@ -369,10 +364,11 @@ awusbphy_phy_enable(struct phynode *phynode, bool enab if (error) goto out; - if (vbus_det == 1) { + /* TODO check vbus_power-supply as well. */ + if (sc->vbus_det_valid && vbus_det == 1) { if (bootverbose) - device_printf(dev, "External VBUS detected, not enabling the regulator\n"); - + device_printf(dev, "External VBUS detected, " + "not enabling the regulator\n"); return (0); } } @@ -426,36 +422,40 @@ awusbphy_set_mode(struct phynode *phynode, int mode) return (0); } + if (sc->mode == mode) + return (0); + if (mode == PHY_USB_MODE_OTG) /* TODO */ + return (EOPNOTSUPP); + + error = awusbphy_vbus_detect(dev, &vbus_det); + if (error != 0) + return (error); + + val = bus_read_4(sc->phy_ctrl, PHY_CSR); + val &= ~(VBUS_CHANGE_DET | ID_CHANGE_DET | DPDM_CHANGE_DET); + val |= (ID_PULLUP_EN | DPDM_PULLUP_EN); + val &= ~FORCE_VBUS_VALID; + val |= (vbus_det ? FORCE_VBUS_VALID_HIGH : FORCE_VBUS_VALID_LOW) << + FORCE_VBUS_VALID_SHIFT; + val &= ~FORCE_ID; + switch (mode) { case PHY_USB_MODE_HOST: - val = bus_read_4(sc->phy_ctrl, PHY_CSR); - val &= ~(VBUS_CHANGE_DET | ID_CHANGE_DET | DPDM_CHANGE_DET); - val |= (ID_PULLUP_EN | DPDM_PULLUP_EN); - val &= ~FORCE_ID; val |= (FORCE_ID_LOW << FORCE_ID_SHIFT); - val &= ~FORCE_VBUS_VALID; - val |= (FORCE_VBUS_VALID_HIGH << FORCE_VBUS_VALID_SHIFT); - bus_write_4(sc->phy_ctrl, PHY_CSR, val); - if (sc->phy_conf->phy0_route == true) { - error = awusbphy_vbus_detect(dev, &vbus_det); - if (error) - goto out; - if (vbus_det == 0) - CLR4(sc->phy_ctrl, OTG_PHY_CFG, - OTG_PHY_ROUTE_OTG); - else - SET4(sc->phy_ctrl, OTG_PHY_CFG, - OTG_PHY_ROUTE_OTG); - } + if (sc->phy_conf->phy0_route) + CLR4(sc->phy_ctrl, OTG_PHY_CFG, OTG_PHY_ROUTE_OTG); break; - case PHY_USB_MODE_OTG: - /* TODO */ + case PHY_USB_MODE_DEVICE: + val |= (FORCE_ID_HIGH << FORCE_ID_SHIFT); + if (sc->phy_conf->phy0_route) + SET4(sc->phy_ctrl, OTG_PHY_CFG, OTG_PHY_ROUTE_OTG); break; + default: + return (EINVAL); } + bus_write_4(sc->phy_ctrl, PHY_CSR, val); sc->mode = mode; - -out: return (0); } From owner-svn-src-head@freebsd.org Mon Sep 21 15:24:46 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0D9363F40CB; Mon, 21 Sep 2020 15:24:46 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bw7XY6TK3z4Nnd; Mon, 21 Sep 2020 15:24:45 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BD3F11033A; Mon, 21 Sep 2020 15:24:45 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08LFOjnb091113; Mon, 21 Sep 2020 15:24:45 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08LFOiCh091108; Mon, 21 Sep 2020 15:24:44 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202009211524.08LFOiCh091108@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Mon, 21 Sep 2020 15:24:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365945 - in head: share/man/man9 sys/kern sys/sys X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: in head: share/man/man9 sys/kern sys/sys X-SVN-Commit-Revision: 365945 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 21 Sep 2020 15:24:46 -0000 Author: mhorne Date: Mon Sep 21 15:24:44 2020 New Revision: 365945 URL: https://svnweb.freebsd.org/changeset/base/365945 Log: Add getenv(9) boolean parsing functions This adds the getenv_bool() function, to parse a boolean value from a kernel environment variable or tunable. This works for traditional boolean values like "0" and "1", and also "true" and "false" (case-insensitive). These semantics do not yet apply to sysctls declared using SYSCTL_BOOL with CTLFLAG_TUN (they still only parse 1 and 0). Also added are two wrapper functions, getenv_is_true() and getenv_is_false(). These are slightly simpler for callers wishing to perform a single check of a configuration variable. Reviewed by: jhb (slightly earlier version) Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D26270 Modified: head/share/man/man9/Makefile head/share/man/man9/getenv.9 head/sys/kern/kern_environment.c head/sys/sys/kernel.h head/sys/sys/systm.h Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Mon Sep 21 12:37:41 2020 (r365944) +++ head/share/man/man9/Makefile Mon Sep 21 15:24:44 2020 (r365945) @@ -1092,6 +1092,9 @@ MLINKS+=getenv.9 freeenv.9 \ getenv.9 getenv_quad.9 \ getenv.9 getenv_uint.9 \ getenv.9 getenv_ulong.9 \ + getenv.9 getenv_bool.9 \ + getenv.9 getenv_is_true.9 \ + getenv.9 getenv_is_false.9 \ getenv.9 kern_getenv.9 \ getenv.9 kern_setenv.9 \ getenv.9 kern_unsetenv.9 \ Modified: head/share/man/man9/getenv.9 ============================================================================== --- head/share/man/man9/getenv.9 Mon Sep 21 12:37:41 2020 (r365944) +++ head/share/man/man9/getenv.9 Mon Sep 21 15:24:44 2020 (r365945) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 1, 2017 +.Dd September 21, 2020 .Dt GETENV 9 .Os .Sh NAME @@ -39,6 +39,9 @@ .Nm getenv_quad , .Nm getenv_uint , .Nm getenv_ulong , +.Nm getenv_bool , +.Nm getenv_is_true , +.Nm getenv_is_false , .Nm kern_setenv , .Nm testenv , .Nm kern_unsetenv @@ -63,6 +66,12 @@ .Ft int .Fn getenv_ulong "const char *name" "unsigned long *data" .Ft int +.Fn getenv_bool "const char *name" "bool *data" +.Ft bool +.Fn getenv_is_true "const char *name" +.Ft bool +.Fn getenv_is_false "const char *name" +.Ft int .Fn kern_setenv "const char *name" "const char *value" .Ft int .Fn testenv "const char *name" @@ -194,6 +203,28 @@ up to characters of its value are copied to the buffer pointed to by .Fa data followed by a null character and a non-zero value is returned. +.Pp +The +.Fn getenv_bool +function interprets the value of the kernel environment variable +.Fa name +as a boolean value by performing a case-insensitive comparison against the +strings "1", +"0", +"true", +and "false". +If the environment variable exists and has a valid boolean value, then that +value will be copied to the variable pointed to by +.Fa data . +If the environment variable exists but is not a boolean value, then a warning +will be printed to the kernel message buffer. +The +.Fn getenv_is_true +and +.Fn getenv_is_false +functions are wrappers around +.Fn getenv_bool +that simplify testing for a desired boolean value. .Sh RETURN VALUES The .Fn kern_getenv @@ -211,12 +242,25 @@ The .Fn testenv function returns zero if the specified environment variable does not exist and a non-zero value if it does exist. +.Pp The .Fn getenv_int , .Fn getenv_long , .Fn getenv_string , .Fn getenv_quad , .Fn getenv_uint , +.Fn getenv_ulong , and -.Fn getenv_ulong +.Fn getenv_bool functions return a non-zero value on success and zero on failure. +.Pp +The +.Fn getenv_is_true +and +.Fn getenv_is_false +functions return +.Dv true +if the specified environment variable exists and its value matches the desired +boolean condition, and +.Dv false +otherwise. Modified: head/sys/kern/kern_environment.c ============================================================================== --- head/sys/kern/kern_environment.c Mon Sep 21 12:37:41 2020 (r365944) +++ head/sys/kern/kern_environment.c Mon Sep 21 15:24:44 2020 (r365945) @@ -942,6 +942,65 @@ error: } /* + * Return a boolean value from an environment variable. This can be in + * numerical or string form, i.e. "1" or "true". + */ +int +getenv_bool(const char *name, bool *data) +{ + char *val; + int ret = 0; + + if (name == NULL) + return (0); + + val = kern_getenv(name); + if (val == NULL) + return (0); + + if ((strcmp(val, "1") == 0) || (strcasecmp(val, "true") == 0)) { + *data = true; + ret = 1; + } else if ((strcmp(val, "0") == 0) || (strcasecmp(val, "false") == 0)) { + *data = false; + ret = 1; + } else { + /* Spit out a warning for malformed boolean variables. */ + printf("Environment variable %s has non-boolean value \"%s\"\n", + name, val); + } + freeenv(val); + + return (ret); +} + +/* + * Wrapper around getenv_bool to easily check for true. + */ +bool +getenv_is_true(const char *name) +{ + bool val; + + if (getenv_bool(name, &val) != 0) + return (val); + return (false); +} + +/* + * Wrapper around getenv_bool to easily check for false. + */ +bool +getenv_is_false(const char *name) +{ + bool val; + + if (getenv_bool(name, &val) != 0) + return (!val); + return (false); +} + +/* * Find the next entry after the one which (cp) falls within, return a * pointer to its start or NULL if there are no more. */ @@ -1005,6 +1064,14 @@ tunable_quad_init(void *data) struct tunable_quad *d = (struct tunable_quad *)data; TUNABLE_QUAD_FETCH(d->path, d->var); +} + +void +tunable_bool_init(void *data) +{ + struct tunable_bool *d = (struct tunable_bool *)data; + + TUNABLE_BOOL_FETCH(d->path, d->var); } void Modified: head/sys/sys/kernel.h ============================================================================== --- head/sys/sys/kernel.h Mon Sep 21 12:37:41 2020 (r365944) +++ head/sys/sys/kernel.h Mon Sep 21 15:24:44 2020 (r365945) @@ -421,6 +421,25 @@ struct tunable_quad { #define TUNABLE_QUAD_FETCH(path, var) getenv_quad((path), (var)) +/* + * bool + */ +extern void tunable_bool_init(void *); +struct tunable_bool { + const char *path; + bool *var; +}; +#define TUNABLE_BOOL(path, var) \ + static struct tunable_bool __CONCAT(__tunable_bool_, __LINE__) = { \ + (path), \ + (var), \ + }; \ + SYSINIT(__CONCAT(__Tunable_init_, __LINE__), \ + SI_SUB_TUNABLES, SI_ORDER_MIDDLE, tunable_bool_init, \ + &__CONCAT(__tunable_bool_, __LINE__)) + +#define TUNABLE_BOOL_FETCH(path, var) getenv_bool((path), (var)) + extern void tunable_str_init(void *); struct tunable_str { const char *path; Modified: head/sys/sys/systm.h ============================================================================== --- head/sys/sys/systm.h Mon Sep 21 12:37:41 2020 (r365944) +++ head/sys/sys/systm.h Mon Sep 21 15:24:44 2020 (r365945) @@ -461,6 +461,9 @@ int getenv_string(const char *name, char *data, int si int getenv_int64(const char *name, int64_t *data); int getenv_uint64(const char *name, uint64_t *data); int getenv_quad(const char *name, quad_t *data); +int getenv_bool(const char *name, bool *data); +bool getenv_is_true(const char *name); +bool getenv_is_false(const char *name); int kern_setenv(const char *name, const char *value); int kern_unsetenv(const char *name); int testenv(const char *name); From owner-svn-src-head@freebsd.org Mon Sep 21 15:41:48 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 628C73F42EE; Mon, 21 Sep 2020 15:41:48 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bw7wD21Psz4P71; Mon, 21 Sep 2020 15:41:48 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2A10D10279; Mon, 21 Sep 2020 15:41:48 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08LFfmrM002069; Mon, 21 Sep 2020 15:41:48 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08LFflrK002068; Mon, 21 Sep 2020 15:41:47 GMT (envelope-from dab@FreeBSD.org) Message-Id: <202009211541.08LFflrK002068@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Mon, 21 Sep 2020 15:41:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365946 - head/sys/dev/nvme X-SVN-Group: head X-SVN-Commit-Author: dab X-SVN-Commit-Paths: head/sys/dev/nvme X-SVN-Commit-Revision: 365946 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 21 Sep 2020 15:41:48 -0000 Author: dab Date: Mon Sep 21 15:41:47 2020 New Revision: 365946 URL: https://svnweb.freebsd.org/changeset/base/365946 Log: Add an ioctl to get an NVMe device's maximum transfer size Reviewed by: imp, chuck Obtained from: Dell EMC Isilon MFC after: 1 week Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D26390 Modified: head/sys/dev/nvme/nvme.h head/sys/dev/nvme/nvme_ctrlr.c Modified: head/sys/dev/nvme/nvme.h ============================================================================== --- head/sys/dev/nvme/nvme.h Mon Sep 21 15:24:44 2020 (r365945) +++ head/sys/dev/nvme/nvme.h Mon Sep 21 15:41:47 2020 (r365946) @@ -41,6 +41,7 @@ #define NVME_PASSTHROUGH_CMD _IOWR('n', 0, struct nvme_pt_command) #define NVME_RESET_CONTROLLER _IO('n', 1) #define NVME_GET_NSID _IOR('n', 2, struct nvme_get_nsid) +#define NVME_GET_MAX_XFER_SIZE _IOR('n', 3, uint64_t) #define NVME_IO_TEST _IOWR('n', 100, struct nvme_io_test) #define NVME_BIO_TEST _IOWR('n', 101, struct nvme_io_test) Modified: head/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- head/sys/dev/nvme/nvme_ctrlr.c Mon Sep 21 15:24:44 2020 (r365945) +++ head/sys/dev/nvme/nvme_ctrlr.c Mon Sep 21 15:41:47 2020 (r365946) @@ -1345,6 +1345,9 @@ nvme_ctrlr_ioctl(struct cdev *cdev, u_long cmd, caddr_ gnsid->nsid = 0; break; } + case NVME_GET_MAX_XFER_SIZE: + *(uint64_t *)arg = ctrlr->max_xfer_size; + break; default: return (ENOTTY); } From owner-svn-src-head@freebsd.org Mon Sep 21 15:44:24 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 752993F4867; Mon, 21 Sep 2020 15:44:24 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bw7zD2VKFz4Q7J; Mon, 21 Sep 2020 15:44:24 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3A081106C9; Mon, 21 Sep 2020 15:44:24 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08LFiOAu004040; Mon, 21 Sep 2020 15:44:24 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08LFiOEp004039; Mon, 21 Sep 2020 15:44:24 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202009211544.08LFiOEp004039@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Mon, 21 Sep 2020 15:44:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365947 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 365947 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 21 Sep 2020 15:44:24 -0000 Author: mhorne Date: Mon Sep 21 15:44:23 2020 New Revision: 365947 URL: https://svnweb.freebsd.org/changeset/base/365947 Log: Use getenv_is_true() in init_static_kenv() A small example of how these functions can be used to simplify checks of this nature. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D26271 Modified: head/sys/kern/kern_environment.c Modified: head/sys/kern/kern_environment.c ============================================================================== --- head/sys/kern/kern_environment.c Mon Sep 21 15:41:47 2020 (r365946) +++ head/sys/kern/kern_environment.c Mon Sep 21 15:44:23 2020 (r365947) @@ -253,7 +253,6 @@ done: void init_static_kenv(char *buf, size_t len) { - char *eval; KASSERT(!dynamic_kenv, ("kenv: dynamic_kenv already initialized")); /* @@ -301,20 +300,17 @@ init_static_kenv(char *buf, size_t len) * if the static environment has disabled the loader environment. */ kern_envp = static_env; - eval = kern_getenv("loader_env.disabled"); - if (eval == NULL || strcmp(eval, "1") != 0) { + if (!getenv_is_true("loader_env.disabled")) { md_envp = buf; md_env_len = len; md_env_pos = 0; - eval = kern_getenv("static_env.disabled"); - if (eval != NULL && strcmp(eval, "1") == 0) { + if (getenv_is_true("static_env.disabled")) { kern_envp[0] = '\0'; kern_envp[1] = '\0'; } } - eval = kern_getenv("static_hints.disabled"); - if (eval != NULL && strcmp(eval, "1") == 0) { + if (getenv_is_true("static_hints.disabled")) { static_hints[0] = '\0'; static_hints[1] = '\0'; } From owner-svn-src-head@freebsd.org Mon Sep 21 15:45:50 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 64D3D3F4B24; Mon, 21 Sep 2020 15:45:50 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bw80t1ybzz4QMM; Mon, 21 Sep 2020 15:45:50 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 27B7310A93; Mon, 21 Sep 2020 15:45:50 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08LFjoHC004156; Mon, 21 Sep 2020 15:45:50 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08LFjnXg004155; Mon, 21 Sep 2020 15:45:49 GMT (envelope-from dab@FreeBSD.org) Message-Id: <202009211545.08LFjnXg004155@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Mon, 21 Sep 2020 15:45:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365948 - head/sbin/nvmecontrol X-SVN-Group: head X-SVN-Commit-Author: dab X-SVN-Commit-Paths: head/sbin/nvmecontrol X-SVN-Commit-Revision: 365948 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 21 Sep 2020 15:45:50 -0000 Author: dab Date: Mon Sep 21 15:45:49 2020 New Revision: 365948 URL: https://svnweb.freebsd.org/changeset/base/365948 Log: Honor the FWUG value of some drives in nvmecontrol nvmecontrol tries to upload firmware in chunks as large as it thinks the device permits. It fails to take into account the FWUG value used by some drives to advertise the size and alignment limits for firmware chunks. - Use the firwmare update granularity value from the - If the granularity is not reported or not restricted, fall back to the previously existing logic that calculates the max transfer size based on MDTS. - Add firmware update granularity to the identify-controller output. Reviewed by: imp (previous version), chuck Obtained from: Dell EMC Isilon MFC after: 1 week Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D26390 Modified: head/sbin/nvmecontrol/firmware.c head/sbin/nvmecontrol/identify_ext.c Modified: head/sbin/nvmecontrol/firmware.c ============================================================================== --- head/sbin/nvmecontrol/firmware.c Mon Sep 21 15:44:23 2020 (r365947) +++ head/sbin/nvmecontrol/firmware.c Mon Sep 21 15:45:49 2020 (r365948) @@ -155,21 +155,29 @@ read_image_file(const char *path, void **buf, int32_t } static void -update_firmware(int fd, uint8_t *payload, int32_t payload_size) +update_firmware(int fd, uint8_t *payload, int32_t payload_size, uint8_t fwug) { struct nvme_pt_command pt; + uint64_t max_xfer_size; int32_t off, resid, size; void *chunk; off = 0; resid = payload_size; - if ((chunk = aligned_alloc(PAGE_SIZE, NVME_MAX_XFER_SIZE)) == NULL) - errx(1, "unable to malloc %d bytes", NVME_MAX_XFER_SIZE); + if (fwug != 0 && fwug != 0xFF) + max_xfer_size = ((uint64_t)fwug << 12); + else if (ioctl(fd, NVME_GET_MAX_XFER_SIZE, &max_xfer_size) < 0) + err(1, "query max transfer size failed"); + if (max_xfer_size > NVME_MAX_XFER_SIZE) + max_xfer_size = NVME_MAX_XFER_SIZE; + if ((chunk = aligned_alloc(PAGE_SIZE, max_xfer_size)) == NULL) + errx(1, "unable to malloc %zd bytes", (size_t)max_xfer_size); + while (resid > 0) { - size = (resid >= NVME_MAX_XFER_SIZE) ? - NVME_MAX_XFER_SIZE : resid; + size = (resid >= (int32_t)max_xfer_size) ? + max_xfer_size : resid; memcpy(chunk, payload + off, size); memset(&pt, 0, sizeof(pt)); @@ -333,7 +341,7 @@ firmware(const struct cmd *f, int argc, char *argv[]) } if (opt.fw_img != NULL) { - update_firmware(fd, buf, size); + update_firmware(fd, buf, size, cdata.fwug); if (opt.activate) activate_action = NVME_AA_REPLACE_ACTIVATE; else Modified: head/sbin/nvmecontrol/identify_ext.c ============================================================================== --- head/sbin/nvmecontrol/identify_ext.c Mon Sep 21 15:44:23 2020 (r365947) +++ head/sbin/nvmecontrol/identify_ext.c Mon Sep 21 15:45:49 2020 (r365948) @@ -56,6 +56,7 @@ nvme_print_controller(struct nvme_controller_data *cda uint8_t ns_smart; uint8_t sqes_max, sqes_min; uint8_t cqes_max, cqes_min; + uint8_t fwug; oncs = cdata->oncs; compare = (oncs >> NVME_CTRLR_DATA_ONCS_COMPARE_SHIFT) & @@ -79,6 +80,7 @@ nvme_print_controller(struct nvme_controller_data *cda NVME_CTRLR_DATA_FRMW_NUM_SLOTS_MASK; fw_slot1_ro = (cdata->frmw >> NVME_CTRLR_DATA_FRMW_SLOT1_RO_SHIFT) & NVME_CTRLR_DATA_FRMW_SLOT1_RO_MASK; + fwug = cdata->fwug; ns_smart = (cdata->lpa >> NVME_CTRLR_DATA_LPA_NS_SMART_SHIFT) & NVME_CTRLR_DATA_LPA_NS_SMART_MASK; @@ -192,6 +194,13 @@ nvme_print_controller(struct nvme_controller_data *cda uint128_to_str(to128(cdata->untncap.unvmcap), cbuf, sizeof(cbuf))); } + printf("Firmware Update Granularity: %02x ", fwug); + if (fwug == 0) + printf("(Not Reported)\n"); + else if (fwug == 0xFF) + printf("(No Granularity)\n"); + else + printf("(%d bytes)\n", ((uint32_t)fwug << 12)); printf("Host Buffer Preferred Size: %llu bytes\n", (long long unsigned)cdata->hmpre * 4096); printf("Host Buffer Minimum Size: %llu bytes\n", From owner-svn-src-head@freebsd.org Mon Sep 21 15:48:58 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 77DB53F48F7; Mon, 21 Sep 2020 15:48:58 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bw84V2d5hz4QPH; Mon, 21 Sep 2020 15:48:58 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3914C10A15; Mon, 21 Sep 2020 15:48:58 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08LFmwwh004372; Mon, 21 Sep 2020 15:48:58 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08LFmwLe004371; Mon, 21 Sep 2020 15:48:58 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202009211548.08LFmwLe004371@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Mon, 21 Sep 2020 15:48:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365949 - head/tools/build X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/tools/build X-SVN-Commit-Revision: 365949 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 21 Sep 2020 15:48:58 -0000 Author: arichardson Date: Mon Sep 21 15:48:57 2020 New Revision: 365949 URL: https://svnweb.freebsd.org/changeset/base/365949 Log: Add a tools/build/make.py script that bootstraps bmake and then runs the build This makes it possible to compile on non-FreeBSD systems since make will usually be GNU make there. Even if they include bmake, it will often either be a broken version or too old to build FreeBSD. This should be the last commit needed to compile FreeBSD on Linux+macOS. After over two years, I've finally managed to upstream all our local CheriBSD changes to allow building on Linux (and as a result of being reviewed by more people they are slightly less ugly than they were before). It should now be possible to run the following to build on Linux+macOS if you have LLVM/Clang 10 or newer installed: MAKEOBJDIRPREFIX=/somewhere ./tools/build/make.py TARGET=amd64 TARGET_ARCH=amd64 buildworld I have only tested macOS 15, Ubuntu 18.04 and openSUSE Leap, but other Linux distributions might also work (as long as they ship a recent GLibc and compiler). Reviewed By: emaste (should be fine to commit to tools/) Differential Revision: https://reviews.freebsd.org/D16767 Added: head/tools/build/make.py (contents, props changed) Added: head/tools/build/make.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/make.py Mon Sep 21 15:48:57 2020 (r365949) @@ -0,0 +1,241 @@ +#!/usr/bin/env python3 +# PYTHON_ARGCOMPLETE_OKAY +# - +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright (c) 2018 Alex Richardson +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +# This script makes it easier to build on non-FreeBSD systems by bootstrapping +# bmake and inferring required compiler variables. +# +# On FreeBSD you can use it the same way as just calling make: +# `MAKEOBJDIRPREFIX=~/obj ./tools/build/make.py buildworld -DWITH_FOO` +# +# On Linux and MacOS you will either need to set XCC/XCXX/XLD/XCPP or pass +# --cross-bindir to specify the path to the cross-compiler bindir: +# `MAKEOBJDIRPREFIX=~/obj ./tools/build/make.py +# --cross-bindir=/path/to/cross/compiler buildworld -DWITH_FOO TARGET=foo +# TARGET_ARCH=bar` +import argparse +import os +import shlex +import shutil +import subprocess +import sys +from pathlib import Path + + +def run(cmd, **kwargs): + cmd = list(map(str, cmd)) # convert all Path objects to str + debug("Running", cmd) + subprocess.check_call(cmd, **kwargs) + + +def bootstrap_bmake(source_root, objdir_prefix): + bmake_source_dir = source_root / "contrib/bmake" + bmake_build_dir = objdir_prefix / "bmake-build" + bmake_install_dir = objdir_prefix / "bmake-install" + bmake_binary = bmake_install_dir / "bin/bmake" + + if (bmake_install_dir / "bin/bmake").exists(): + return bmake_binary + print("Bootstrapping bmake...") + # TODO: check if the host system bmake is new enough and use that instead + if not bmake_build_dir.exists(): + os.makedirs(str(bmake_build_dir)) + env = os.environ.copy() + global new_env_vars + env.update(new_env_vars) + + if sys.platform.startswith("linux"): + # Work around the deleted file bmake/missing/sys/cdefs.h + # TODO: bmake should keep the compat sys/cdefs.h + env["CFLAGS"] = "-I{src}/tools/build/cross-build/include/common " \ + "-I{src}/tools/build/cross-build/include/linux " \ + "-D_GNU_SOURCE=1".format(src=source_root) + configure_args = [ + "--with-default-sys-path=" + str(bmake_install_dir / "share/mk"), + "--with-machine=amd64", # TODO? "--with-machine-arch=amd64", + "--without-filemon", "--prefix=" + str(bmake_install_dir)] + run(["sh", bmake_source_dir / "boot-strap"] + configure_args, + cwd=str(bmake_build_dir), env=env) + + run(["sh", bmake_source_dir / "boot-strap", "op=install"] + configure_args, + cwd=str(bmake_build_dir)) + print("Finished bootstrapping bmake...") + return bmake_binary + + +def debug(*args, **kwargs): + global parsed_args + if parsed_args.debug: + print(*args, **kwargs) + + +def is_make_var_set(var): + return any( + x.startswith(var + "=") or x == ("-D" + var) for x in sys.argv[1:]) + + +def check_required_make_env_var(varname, binary_name, bindir): + global new_env_vars + if os.getenv(varname): + return + if not bindir: + sys.exit("Could not infer value for $" + varname + ". Either set $" + + varname + " or pass --cross-bindir=/cross/compiler/dir/bin") + # try to infer the path to the tool + guess = os.path.join(bindir, binary_name) + if not os.path.isfile(guess): + sys.exit("Could not infer value for $" + varname + ": " + guess + + " does not exist") + new_env_vars[varname] = guess + debug("Inferred", varname, "as", guess) + + +def default_cross_toolchain(): + # default to homebrew-installed clang on MacOS if available + if sys.platform.startswith("darwin"): + if shutil.which("brew"): + llvm_dir = subprocess.getoutput("brew --prefix llvm") + if llvm_dir and Path(llvm_dir, "bin").exists(): + return str(Path(llvm_dir, "bin")) + return None + + +if __name__ == "__main__": + parser = argparse.ArgumentParser( + formatter_class=argparse.ArgumentDefaultsHelpFormatter) + parser.add_argument("--host-bindir", + help="Directory to look for cc/c++/cpp/ld to build " + "host (" + sys.platform + ") binaries", + default="/usr/bin") + parser.add_argument("--cross-bindir", default=default_cross_toolchain(), + help="Directory to look for cc/c++/cpp/ld to build " + "target binaries (only needed if XCC/XCPP/XLD " + "are not set)") + parser.add_argument("--cross-compiler-type", choices=("clang", "gcc"), + default="clang", + help="Compiler type to find in --cross-bindir (only " + "needed if XCC/XCPP/XLD are not set)" + "Note: using CC is currently highly experimental") + parser.add_argument("--host-compiler-type", choices=("cc", "clang", "gcc"), + default="cc", + help="Compiler type to find in --host-bindir (only " + "needed if CC/CPP/CXX are not set). ") + parser.add_argument("--debug", action="store_true", + help="Print information on inferred env vars") + parser.add_argument("--clean", action="store_true", + help="Do a clean rebuild instead of building with " + "-DNO_CLEAN") + parser.add_argument("--no-clean", action="store_false", dest="clean", + help="Do a clean rebuild instead of building with " + "-DNO_CLEAN") + try: + import argcomplete # bash completion: + + argcomplete.autocomplete(parser) + except ImportError: + pass + parsed_args, bmake_args = parser.parse_known_args() + + MAKEOBJDIRPREFIX = os.getenv("MAKEOBJDIRPREFIX") + if not MAKEOBJDIRPREFIX: + sys.exit("MAKEOBJDIRPREFIX is not set, cannot continue!") + if not Path(MAKEOBJDIRPREFIX).is_dir(): + sys.exit( + "Chosen MAKEOBJDIRPREFIX=" + MAKEOBJDIRPREFIX + " doesn't exit!") + objdir_prefix = Path(MAKEOBJDIRPREFIX).absolute() + source_root = Path(__file__).absolute().parent.parent.parent + + new_env_vars = {} + if not sys.platform.startswith("freebsd"): + if not is_make_var_set("TARGET") or not is_make_var_set("TARGET_ARCH"): + if "universe" not in sys.argv and "tinderbox" not in sys.argv: + sys.exit("TARGET= and TARGET_ARCH= must be set explicitly " + "when building on non-FreeBSD") + # infer values for CC/CXX/CPP + + if sys.platform.startswith( + "linux") and parsed_args.host_compiler_type == "cc": + # FIXME: bsd.compiler.mk doesn't handle the output of GCC if it + # is /usr/bin/cc on Ubuntu since it doesn't contain the GCC string. + parsed_args.host_compiler_type = "gcc" + + if parsed_args.host_compiler_type == "gcc": + default_cc, default_cxx, default_cpp = ("gcc", "g++", "cpp") + elif parsed_args.host_compiler_type == "clang": + default_cc, default_cxx, default_cpp = ( + "clang", "clang++", "clang-cpp") + else: + default_cc, default_cxx, default_cpp = ("cc", "c++", "cpp") + + check_required_make_env_var("CC", default_cc, parsed_args.host_bindir) + check_required_make_env_var("CXX", default_cxx, + parsed_args.host_bindir) + check_required_make_env_var("CPP", default_cpp, + parsed_args.host_bindir) + # Using the default value for LD is fine (but not for XLD!) + + use_cross_gcc = parsed_args.cross_compiler_type == "gcc" + # On non-FreeBSD we need to explicitly pass XCC/XLD/X_COMPILER_TYPE + check_required_make_env_var("XCC", "gcc" if use_cross_gcc else "clang", + parsed_args.cross_bindir) + check_required_make_env_var("XCXX", + "g++" if use_cross_gcc else "clang++", + parsed_args.cross_bindir) + check_required_make_env_var("XCPP", + "cpp" if use_cross_gcc else "clang-cpp", + parsed_args.cross_bindir) + check_required_make_env_var("XLD", "ld" if use_cross_gcc else "ld.lld", + parsed_args.cross_bindir) + + bmake_binary = bootstrap_bmake(source_root, objdir_prefix) + # at -j1 cleandir+obj is unbearably slow. AUTO_OBJ helps a lot + debug("Adding -DWITH_AUTO_OBJ") + bmake_args.append("-DWITH_AUTO_OBJ") + if parsed_args.clean is False: + bmake_args.append("-DWITHOUT_CLEAN") + if (parsed_args.clean is None and not is_make_var_set("NO_CLEAN") + and not is_make_var_set("WITHOUT_CLEAN")): + # Avoid accidentally deleting all of the build tree and wasting lots of + # time cleaning directories instead of just doing a rm -rf ${.OBJDIR} + want_clean = input("You did not set -DNO_CLEAN/--clean/--no-clean." + " Did you really mean to do a clean build? y/[N] ") + if not want_clean.lower().startswith("y"): + bmake_args.append("-DNO_CLEAN") + + env_cmd_str = " ".join( + shlex.quote(k + "=" + v) for k, v in new_env_vars.items()) + make_cmd_str = " ".join( + shlex.quote(s) for s in [str(bmake_binary)] + bmake_args) + debug("Running `env ", env_cmd_str, " ", make_cmd_str, "`", sep="") + os.environ.update(new_env_vars) + if parsed_args.debug: + input("Press enter to continue...") + os.chdir(str(source_root)) + os.execv(str(bmake_binary), [str(bmake_binary)] + bmake_args) From owner-svn-src-head@freebsd.org Mon Sep 21 15:49:03 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A46D03F4D9A; Mon, 21 Sep 2020 15:49:03 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bw84b0mgtz4Qf8; Mon, 21 Sep 2020 15:49:03 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EE97E10A95; Mon, 21 Sep 2020 15:49:02 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08LFn2kd004429; Mon, 21 Sep 2020 15:49:02 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08LFn2nv004428; Mon, 21 Sep 2020 15:49:02 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202009211549.08LFn2nv004428@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Mon, 21 Sep 2020 15:49:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365950 - head/tools/build X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/tools/build X-SVN-Commit-Revision: 365950 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 21 Sep 2020 15:49:04 -0000 Author: arichardson Date: Mon Sep 21 15:49:02 2020 New Revision: 365950 URL: https://svnweb.freebsd.org/changeset/base/365950 Log: When building on Ubuntu bootstrap bmake with bash as the default shell The Ubuntu /bin/sh (dash) removes all environment variables that contain characters outside the [a-zA-Z0-9_] range and this breaks the bmake tests that run as part of bootstrapping bmake. This can be reverted when the bmake tests have been updated. Modified: head/tools/build/make.py Modified: head/tools/build/make.py ============================================================================== --- head/tools/build/make.py Mon Sep 21 15:48:57 2020 (r365949) +++ head/tools/build/make.py Mon Sep 21 15:49:02 2020 (r365950) @@ -81,6 +81,14 @@ def bootstrap_bmake(source_root, objdir_prefix): "--with-default-sys-path=" + str(bmake_install_dir / "share/mk"), "--with-machine=amd64", # TODO? "--with-machine-arch=amd64", "--without-filemon", "--prefix=" + str(bmake_install_dir)] + + if Path("/bin/sh").resolve().name == "dash": + # Note: we have to avoid using dash as the default shell since it + # filters out variables containing characters such as '-' and that + # breaks the bmake bootstrap tests. + # TODO: remove this when the bootstrap tests have been fixed. + configure_args.append("--with-defshell=/bin/bash") + run(["sh", bmake_source_dir / "boot-strap"] + configure_args, cwd=str(bmake_build_dir), env=env) From owner-svn-src-head@freebsd.org Mon Sep 21 15:53:42 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 741C83F4F85; Mon, 21 Sep 2020 15:53:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bw89y2S26z4RFL; Mon, 21 Sep 2020 15:53:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 376FC106EA; Mon, 21 Sep 2020 15:53:42 +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 08LFrgXs010546; Mon, 21 Sep 2020 15:53:42 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08LFrgwL010545; Mon, 21 Sep 2020 15:53:42 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202009211553.08LFrgwL010545@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 21 Sep 2020 15:53:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365951 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 365951 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 21 Sep 2020 15:53:42 -0000 Author: kib Date: Mon Sep 21 15:53:41 2020 New Revision: 365951 URL: https://svnweb.freebsd.org/changeset/base/365951 Log: amd64 pmap: only calculate page table page when needed. Noted by: alc Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D26499 Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Mon Sep 21 15:49:02 2020 (r365950) +++ head/sys/amd64/amd64/pmap.c Mon Sep 21 15:53:41 2020 (r365951) @@ -6525,12 +6525,13 @@ restart: origpte = *pdpe; MPASS(origpte == 0); } else { - mp = PHYS_TO_VM_PAGE(*pml4e & PG_FRAME); pdpe = pmap_pdpe(pmap, va); KASSERT(pdpe != NULL, ("va %#lx lost pdpe", va)); origpte = *pdpe; - if ((origpte & PG_V) == 0) + if ((origpte & PG_V) == 0) { + mp = PHYS_TO_VM_PAGE(*pml4e & PG_FRAME); mp->ref_count++; + } } KASSERT((origpte & PG_V) == 0 || ((origpte & PG_PS) != 0 && (origpte & PG_FRAME) == (pten & PG_FRAME)), @@ -6563,10 +6564,11 @@ restart: } else { pdpe = pmap_pdpe(pmap, va); MPASS(pdpe != NULL && (*pdpe & PG_V) != 0); - mp = PHYS_TO_VM_PAGE(*pdpe & PG_FRAME); origpte = *pde; - if ((origpte & PG_V) == 0) + if ((origpte & PG_V) == 0) { + mp = PHYS_TO_VM_PAGE(*pdpe & PG_FRAME); mp->ref_count++; + } } KASSERT((origpte & PG_V) == 0 || ((origpte & PG_PS) != 0 && (origpte & PG_FRAME) == (pten & PG_FRAME)), From owner-svn-src-head@freebsd.org Mon Sep 21 16:43:39 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7884C3F5CDC; Mon, 21 Sep 2020 16:43:39 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bw9Hb2ZjKz4TS1; Mon, 21 Sep 2020 16:43:39 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3BD1511565; Mon, 21 Sep 2020 16:43:39 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08LGhd9p041094; Mon, 21 Sep 2020 16:43:39 GMT (envelope-from phk@FreeBSD.org) Received: (from phk@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08LGhdrC041093; Mon, 21 Sep 2020 16:43:39 GMT (envelope-from phk@FreeBSD.org) Message-Id: <202009211643.08LGhdrC041093@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: phk set sender to phk@FreeBSD.org using -f From: Poul-Henning Kamp Date: Mon, 21 Sep 2020 16:43:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365952 - head/contrib/libexecinfo X-SVN-Group: head X-SVN-Commit-Author: phk X-SVN-Commit-Paths: head/contrib/libexecinfo X-SVN-Commit-Revision: 365952 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 21 Sep 2020 16:43:39 -0000 Author: phk Date: Mon Sep 21 16:43:38 2020 New Revision: 365952 URL: https://svnweb.freebsd.org/changeset/base/365952 Log: Pull in fix from upstream NetBSD rev. 1.5: If Unwind_Backtrace is broken, ctx.n will still contain ~0, and we will return that which poor behavior for the user, so return 0 instead. We could document ~0 to be an error, but that would deviate from the Linux behavior which is not desirable. Noted by Poul-Henning Kamp PR: 209842 Modified: head/contrib/libexecinfo/unwind.c Modified: head/contrib/libexecinfo/unwind.c ============================================================================== --- head/contrib/libexecinfo/unwind.c Mon Sep 21 15:53:41 2020 (r365951) +++ head/contrib/libexecinfo/unwind.c Mon Sep 21 16:43:38 2020 (r365952) @@ -67,7 +67,9 @@ backtrace(void **arr, size_t len) ctx.n = (size_t)~0; _Unwind_Backtrace(tracer, &ctx); - if (ctx.n != (size_t)~0 && ctx.n > 0) + if (ctx.n == (size_t)~0) + ctx.n = 0; + else if (ctx.n > 0) ctx.arr[--ctx.n] = NULL; /* Skip frame below __start */ return ctx.n; From owner-svn-src-head@freebsd.org Mon Sep 21 17:06:37 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 93F3C3F6896; Mon, 21 Sep 2020 17:06:37 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bw9p53Tkwz4W1T; Mon, 21 Sep 2020 17:06:37 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 58D711181E; Mon, 21 Sep 2020 17:06:37 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08LH6b4F054373; Mon, 21 Sep 2020 17:06:37 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08LH6bS7054372; Mon, 21 Sep 2020 17:06:37 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202009211706.08LH6bS7054372@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 21 Sep 2020 17:06:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365954 - head/usr.bin/xargs X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.bin/xargs X-SVN-Commit-Revision: 365954 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 21 Sep 2020 17:06:37 -0000 Author: kevans Date: Mon Sep 21 17:06:36 2020 New Revision: 365954 URL: https://svnweb.freebsd.org/changeset/base/365954 Log: xargs: add some long options for GNU compatibility These are low-effort to add, so let's just do it. Reported by: "LukeShu" on Hacker News (-r / --no-run-if-empty) MFC after: 1 week Modified: head/usr.bin/xargs/xargs.1 head/usr.bin/xargs/xargs.c Modified: head/usr.bin/xargs/xargs.1 ============================================================================== --- head/usr.bin/xargs/xargs.1 Mon Sep 21 16:59:12 2020 (r365953) +++ head/usr.bin/xargs/xargs.1 Mon Sep 21 17:06:36 2020 (r365954) @@ -33,7 +33,7 @@ .\" $FreeBSD$ .\" $xMach: xargs.1,v 1.2 2002/02/23 05:23:37 tim Exp $ .\" -.Dd June 11, 2020 +.Dd September 21, 2020 .Dt XARGS 1 .Os .Sh NAME @@ -84,7 +84,7 @@ Any single character, including newlines, may be escap .Pp The options are as follows: .Bl -tag -width indent -.It Fl 0 +.It Fl 0 , Fl -null Change .Nm to expect NUL @@ -175,7 +175,7 @@ If EOF is reached and fewer lines have been read than then .Ar utility will be called with the available lines. -.It Fl n Ar number +.It Fl n Ar number , Fl -max-args= Ns Ar number Set the maximum number of arguments taken from standard input for each invocation of .Ar utility . @@ -201,7 +201,7 @@ in the child process before executing the command. This is useful if you want .Nm to run an interactive application. -.It Fl P Ar maxprocs +.It Fl P Ar maxprocs , Fl -max-procs= Ns Ar maxprocs Parallel mode: run at most .Ar maxprocs invocations of @@ -212,7 +212,7 @@ If is set to 0, .Nm will run as many processes as possible. -.It Fl p +.It Fl p , Fl -interactive Echo each command to be executed and ask the user whether it should be executed. An affirmative response, @@ -221,7 +221,7 @@ in the POSIX locale, causes the command to be executed, any other response causes it to be skipped. No commands are executed if the process is not attached to a terminal. -.It Fl r +.It Fl r , Fl -no-run-if-empty Compatibility with GNU .Nm . The GNU version of @@ -263,7 +263,7 @@ can use for replacements. The default for .Ar replsize is 255. -.It Fl s Ar size +.It Fl s Ar size , Fl -max-chars= Ns Ar size Set the maximum number of bytes for the command line length provided to .Ar utility . The sum of the length of the utility name, the arguments passed to @@ -277,10 +277,10 @@ The current default value for is .Dv ARG_MAX - 4096. -.It Fl t +.It Fl t , Fl -verbose Echo the command to be executed to standard error immediately before it is executed. -.It Fl x +.It Fl x , Fl -exit Force .Nm to terminate immediately if a command line containing Modified: head/usr.bin/xargs/xargs.c ============================================================================== --- head/usr.bin/xargs/xargs.c Mon Sep 21 16:59:12 2020 (r365953) +++ head/usr.bin/xargs/xargs.c Mon Sep 21 17:06:36 2020 (r365954) @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -98,6 +99,22 @@ static volatile int childerr; extern char **environ; +static const char *optstr = "+0E:I:J:L:n:oP:pR:S:s:rtx"; + +static const struct option long_options[] = +{ + {"exit", no_argument, NULL, 'x'}, + {"interactive", no_argument, NULL, 'p'}, + {"max-args", required_argument, NULL, 'n'}, + {"max-chars", required_argument, NULL, 's'}, + {"max-procs", required_argument, NULL, 'P'}, + {"no-run-if-empty", no_argument, NULL, 'r'}, + {"null", no_argument, NULL, '0'}, + {"verbose", no_argument, NULL, 't'}, + + {NULL, no_argument, NULL, 0}, +}; + int main(int argc, char *argv[]) { @@ -137,7 +154,7 @@ main(int argc, char *argv[]) nline -= strlen(*ep++) + 1 + sizeof(*ep); } maxprocs = 1; - while ((ch = getopt(argc, argv, "0E:I:J:L:n:oP:pR:S:s:rtx")) != -1) + while ((ch = getopt_long(argc, argv, optstr, long_options, NULL)) != -1) switch (ch) { case 'E': eofstr = optarg; From owner-svn-src-head@freebsd.org Mon Sep 21 17:28:42 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 05DE63F7297; Mon, 21 Sep 2020 17:28:42 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwBHY6Ld4z4Xkc; Mon, 21 Sep 2020 17:28:41 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BD44C11BC1; Mon, 21 Sep 2020 17:28:41 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08LHSfBU067090; Mon, 21 Sep 2020 17:28:41 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08LHSfV9067089; Mon, 21 Sep 2020 17:28:41 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202009211728.08LHSfV9067089@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Mon, 21 Sep 2020 17:28:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365955 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 365955 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 21 Sep 2020 17:28:42 -0000 Author: mhorne Date: Mon Sep 21 17:28:41 2020 New Revision: 365955 URL: https://svnweb.freebsd.org/changeset/base/365955 Log: Hide tunable definitions behind _KERNEL Some userspace code include sys/kernel.h. Namely, some OpenZFS tests do this, and it was causing breakage after r365945 due to a lack of bool typedef. Userspace should not need the TUNABLE_** stuff, so hide it behind an #ifdef _KERNEL. Sorry for the breakage. Reported by: andrew, Michael Butler, Jenkins Discussed with: kevans, allanjude Modified: head/sys/sys/kernel.h Modified: head/sys/sys/kernel.h ============================================================================== --- head/sys/sys/kernel.h Mon Sep 21 17:06:36 2020 (r365954) +++ head/sys/sys/kernel.h Mon Sep 21 17:28:41 2020 (r365955) @@ -297,6 +297,8 @@ sysinit_tslog_shim(const void * data) void sysinit_add(struct sysinit **set, struct sysinit **set_end); +#ifdef _KERNEL + /* * Infrastructure for tunable 'constants'. Value may be specified at compile * time or kernel load time. Rules relating tunables together can be placed @@ -458,6 +460,8 @@ struct tunable_str { #define TUNABLE_STR_FETCH(path, var, size) \ getenv_string((path), (var), (size)) + +#endif /* _KERNEL */ typedef void (*ich_func_t)(void *_arg); From owner-svn-src-head@freebsd.org Mon Sep 21 17:48:29 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C5D263F766B; Mon, 21 Sep 2020 17:48:29 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwBkP2sp8z4YdW; Mon, 21 Sep 2020 17:48:29 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 35A6E12117; Mon, 21 Sep 2020 17:48:29 +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 08LHmSP4080003; Mon, 21 Sep 2020 17:48:28 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08LHmSsi080000; Mon, 21 Sep 2020 17:48:28 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <202009211748.08LHmSsi080000@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 21 Sep 2020 17:48:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365956 - head/tools/regression/fsx X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/tools/regression/fsx X-SVN-Commit-Revision: 365956 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 21 Sep 2020 17:48:31 -0000 Author: asomers Date: Mon Sep 21 17:48:28 2020 New Revision: 365956 URL: https://svnweb.freebsd.org/changeset/base/365956 Log: fsx: fix build with WARNS=6 * signed/unsigned comparisons * use standard warn(3) * Suppress warnings about local vars and funcs not declared static * const-correctness * declaration shadows a variable in the global scope Reviewed by: kevans MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D26516 Modified: head/tools/regression/fsx/Makefile head/tools/regression/fsx/fsx.c Modified: head/tools/regression/fsx/Makefile ============================================================================== --- head/tools/regression/fsx/Makefile Mon Sep 21 17:28:41 2020 (r365955) +++ head/tools/regression/fsx/Makefile Mon Sep 21 17:48:28 2020 (r365956) @@ -4,4 +4,9 @@ PROG= fsx MAN= +NO_WMISSING_VARIABLE_DECLARATIONS= + .include + +# Don't require static declarations. It's line noise in a single-file program. +CWARNFLAGS+= -Wno-strict-prototypes -Wno-missing-prototypes Modified: head/tools/regression/fsx/fsx.c ============================================================================== --- head/tools/regression/fsx/fsx.c Mon Sep 21 17:28:41 2020 (r365955) +++ head/tools/regression/fsx/fsx.c Mon Sep 21 17:48:28 2020 (r365956) @@ -112,7 +112,7 @@ int closeprob = 0; /* -c flag */ int invlprob = 0; /* -i flag */ int debug = 0; /* -d flag */ unsigned long debugstart = 0; /* -D flag */ -unsigned long maxfilelen = 256 * 1024; /* -l flag */ +off_t maxfilelen = 256 * 1024; /* -l flag */ int sizechecks = 1; /* -n flag disables them */ int maxoplen = 64 * 1024; /* -o flag */ int quiet = 0; /* -q flag */ @@ -138,33 +138,8 @@ int invl = 0; void -vwarnc(code, fmt, ap) - int code; - const char *fmt; - va_list ap; +prt(const char *fmt, ...) { - fprintf(stderr, "fsx: "); - if (fmt != NULL) { - vfprintf(stderr, fmt, ap); - fprintf(stderr, ": "); - } - fprintf(stderr, "%s\n", strerror(code)); -} - - -void -warn(const char * fmt, ...) -{ - va_list ap; - va_start(ap, fmt); - vwarnc(errno, fmt, ap); - va_end(ap); -} - - -void -prt(char *fmt, ...) -{ va_list args; va_start(args, fmt); @@ -179,7 +154,7 @@ prt(char *fmt, ...) } void -prterr(char *prefix) +prterr(const char *prefix) { prt("%s%s%s\n", prefix, prefix ? ": " : "", strerror(errno)); } @@ -317,12 +292,12 @@ logdump(void) void -save_buffer(char *buffer, off_t bufferlength, int fd) +save_buffer(char *buffer, off_t bufferlength, int savefd) { off_t ret; ssize_t byteswritten; - if (fd <= 0 || bufferlength == 0) + if (savefd <= 0 || bufferlength == 0) return; if (bufferlength > SSIZE_MAX) { @@ -330,7 +305,7 @@ save_buffer(char *buffer, off_t bufferlength, int fd) exit(67); } if (lite) { - off_t size_by_seek = lseek(fd, (off_t)0, SEEK_END); + off_t size_by_seek = lseek(savefd, (off_t)0, SEEK_END); if (size_by_seek == (off_t)-1) prterr("save_buffer: lseek eof"); else if (bufferlength > size_by_seek) { @@ -340,11 +315,11 @@ save_buffer(char *buffer, off_t bufferlength, int fd) } } - ret = lseek(fd, (off_t)0, SEEK_SET); + ret = lseek(savefd, (off_t)0, SEEK_SET); if (ret == (off_t)-1) prterr("save_buffer: lseek 0"); - byteswritten = write(fd, buffer, (size_t)bufferlength); + byteswritten = write(savefd, buffer, (size_t)bufferlength); if (byteswritten != bufferlength) { if (byteswritten == -1) prterr("save_buffer write"); @@ -458,10 +433,10 @@ check_trunc_hack(void) void -doread(unsigned offset, unsigned size) +doread(off_t offset, off_t size) { off_t ret; - unsigned iret; + ssize_t iret; offset -= offset % readbdy; if (size == 0) { @@ -509,7 +484,7 @@ doread(unsigned offset, unsigned size) void -check_eofpage(char *s, unsigned offset, char *p, int size) +check_eofpage(const char *s, unsigned offset, char *p, int size) { uintptr_t last_page, should_be_zero; @@ -592,7 +567,7 @@ domapread(unsigned offset, unsigned size) void -gendata(char *original_buf, char *good_buf, unsigned offset, unsigned size) +gendata(unsigned offset, unsigned size) { while (size--) { good_buf[offset] = testcalls % 256; @@ -607,7 +582,7 @@ void dowrite(unsigned offset, unsigned size) { off_t ret; - unsigned iret; + ssize_t iret; offset -= offset % writebdy; if (size == 0) { @@ -619,7 +594,7 @@ dowrite(unsigned offset, unsigned size) log4(OP_WRITE, offset, size, file_size); - gendata(original_buf, good_buf, offset, size); + gendata(offset, size); if (file_size < offset + size) { if (file_size < offset) memset(good_buf + file_size, '\0', offset - file_size); @@ -677,7 +652,7 @@ domapwrite(unsigned offset, unsigned size) log4(OP_MAPWRITE, offset, size, 0); - gendata(original_buf, good_buf, offset, size); + gendata(offset, size); if (file_size < offset + size) { if (file_size < offset) memset(good_buf + file_size, '\0', offset - file_size); @@ -842,8 +817,8 @@ doinvl(void) void test(void) { - unsigned long offset; - unsigned long size = maxoplen; + off_t offset; + off_t size = maxoplen; unsigned long rv = random(); unsigned long op = rv % (3 + !lite + mapped_writes); @@ -858,9 +833,9 @@ test(void) testcalls++; if (closeprob) - closeopen = (rv >> 3) < (1 << 28) / closeprob; + closeopen = (rv >> 3) < (1ul << 28) / closeprob; if (invlprob) - invl = (rv >> 3) < (1 << 28) / invlprob; + invl = (rv >> 3) < (1ul << 28) / invlprob; if (debugstart > 0 && testcalls >= debugstart) debug = 1; From owner-svn-src-head@freebsd.org Mon Sep 21 17:59:46 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3346D3F7F14; Mon, 21 Sep 2020 17:59:46 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwBzQ0fC4z4Zwr; Mon, 21 Sep 2020 17:59:46 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EE94912135; Mon, 21 Sep 2020 17:59:45 +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 08LHxjh7086682; Mon, 21 Sep 2020 17:59:45 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08LHxje3086680; Mon, 21 Sep 2020 17:59:45 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <202009211759.08LHxje3086680@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 21 Sep 2020 17:59:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365957 - in head: sbin/rcorder usr.sbin/crunch/crunchgen X-SVN-Group: head X-SVN-Commit-Author: adrian X-SVN-Commit-Paths: in head: sbin/rcorder usr.sbin/crunch/crunchgen X-SVN-Commit-Revision: 365957 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 21 Sep 2020 17:59:46 -0000 Author: adrian Date: Mon Sep 21 17:59:45 2020 New Revision: 365957 URL: https://svnweb.freebsd.org/changeset/base/365957 Log: [rcorder] [crunch] Fix C function declarations to include void This fixes a compile issue under gcc6 which complains about legacy style C function declarations. Differential Revision: https://reviews.freebsd.org/D26504 Modified: head/sbin/rcorder/rcorder.c head/usr.sbin/crunch/crunchgen/crunched_main.c Modified: head/sbin/rcorder/rcorder.c ============================================================================== --- head/sbin/rcorder/rcorder.c Mon Sep 21 17:48:28 2020 (r365956) +++ head/sbin/rcorder/rcorder.c Mon Sep 21 17:59:45 2020 (r365957) @@ -990,7 +990,7 @@ do_file(filenode *fnode, strnodelist *stack_ptr) } static void -generate_graphviz_header() +generate_graphviz_header(void) { if (do_graphviz != true) @@ -1003,7 +1003,7 @@ generate_graphviz_header() } static void -generate_graphviz_footer() +generate_graphviz_footer(void) { if (do_graphviz == true) @@ -1011,7 +1011,7 @@ generate_graphviz_footer() } static void -generate_graphviz_providers() +generate_graphviz_providers(void) { Hash_Entry *entry; Hash_Search psearch; Modified: head/usr.sbin/crunch/crunchgen/crunched_main.c ============================================================================== --- head/usr.sbin/crunch/crunchgen/crunched_main.c Mon Sep 21 17:48:28 2020 (r365956) +++ head/usr.sbin/crunch/crunchgen/crunched_main.c Mon Sep 21 17:59:45 2020 (r365957) @@ -183,7 +183,7 @@ crunched_main(int argc, char **argv, char **envp) } static void -crunched_usage() +crunched_usage(void) { int columns, len; struct stub *ep; From owner-svn-src-head@freebsd.org Mon Sep 21 18:17:01 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BE45B3F8460; Mon, 21 Sep 2020 18:17:01 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwCMK4Zvvz4c2S; Mon, 21 Sep 2020 18:17:01 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 80845120D6; Mon, 21 Sep 2020 18:17:01 +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 08LIH1Lh099370; Mon, 21 Sep 2020 18:17:01 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08LIH1SE099369; Mon, 21 Sep 2020 18:17:01 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202009211817.08LIH1SE099369@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 21 Sep 2020 18:17:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365958 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 365958 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 21 Sep 2020 18:17:01 -0000 Author: hselasky Date: Mon Sep 21 18:17:01 2020 New Revision: 365958 URL: https://svnweb.freebsd.org/changeset/base/365958 Log: Add example to ng_bpf(4) showing how ng_bpf(4) can be used to prevent spoofing. Differential Revision: https://reviews.freebsd.org/D26488 MFC after: 1 week Reviewed by: pi, bcr (manpages) Submitted by: lutz_donnerhacke.de (Lutz Donnerhacke) Sponsored by: Mellanox Technologies // NVIDIA Networking Modified: head/share/man/man4/ng_bpf.4 Modified: head/share/man/man4/ng_bpf.4 ============================================================================== --- head/share/man/man4/ng_bpf.4 Mon Sep 21 17:59:45 2020 (r365957) +++ head/share/man/man4/ng_bpf.4 Mon Sep 21 18:17:01 2020 (r365958) @@ -35,7 +35,7 @@ .\" $FreeBSD$ .\" $Whistle: ng_bpf.8,v 1.2 1999/12/03 01:57:12 archie Exp $ .\" -.Dd April 29, 2020 +.Dd September 20, 2020 .Dt NG_BPF 4 .Os .Sh NAME @@ -113,21 +113,18 @@ program or else .Er EINVAL is returned. .It Dv NGM_BPF_GET_PROGRAM Pq Ic getprogram -This command takes an -.Tn ASCII +This command takes an ASCII string argument, the hook name, and returns the corresponding .Dv "struct ng_bpf_hookprog" as shown above. .It Dv NGM_BPF_GET_STATS Pq Ic getstats -This command takes an -.Tn ASCII +This command takes an ASCII string argument, the hook name, and returns the statistics associated with the hook as a .Dv "struct ng_bpf_hookstat" . .It Dv NGM_BPF_CLR_STATS Pq Ic clrstats -This command takes an -.Tn ASCII +This command takes an ASCII string argument, the hook name, and clears the statistics associated with the hook. .It Dv NGM_BPF_GETCLR_STATS Pq Ic getclrstats @@ -142,9 +139,8 @@ control message, or when all hooks have been disconnec .Sh EXAMPLES It is possible to configure a node from the command line, using .Xr tcpdump 1 -to generate raw BPF instructions which are then fed into an -.Xr awk 1 -script to create the ASCII form of a +to generate raw BPF instructions which are then transformed +into the ASCII form of a .Dv NGM_BPF_SET_PROGRAM control message, as demonstrated here: .Bd -literal -offset 4n @@ -169,6 +165,51 @@ ngctl msg ${NODEPATH} setprogram { thisHook=\\"${INHOO ifMatch=\\"${MATCHHOOK}\\" \\ ifNotMatch=\\"${NOTMATCHHOOK}\\" \\ ${BPFPROG} } +.Ed +.Pp +Based on the previous example, it is possible to prevent a jail (or a VM) +from spoofing by allowing only traffic that has the expected ethernet and +IP addresses: +.Bd -literal -offset 4n +#!/bin/sh + +NODEPATH="my_node:" +JAIL_MAC="0a:00:de:ad:be:ef" +JAIL_IP="128.66.1.42" +JAIL_HOOK="jail" +HOST_HOOK="host" +DEBUG_HOOK="nomatch" + +bpf_prog() { + local PATTERN=$1 + + tcpdump -s 8192 -p -ddd ${PATTERN} | ( + read len + echo -n "bpf_prog_len=$len " + echo -n "bpf_prog=[" + while read code jt jf k ; do + echo -n " { code=$code jt=$jt jf=$jf k=$k }" + done + echo " ]" + ) +} + +# Prevent jail from spoofing (filter packets coming from jail) +ngctl msg ${NODEPATH} setprogram { \\ + thisHook=\\"${JAIL_HOOK}\\" \\ + ifMatch=\\"${HOST_HOOK}\\" \\ + ifNotMatch=\\"${DEBUG_HOOK}\\" \\ + $(bpf_prog "ether src ${JAIL_MAC} && src ${JAIL_IP}") \\ +} + +# Prevent jail from receiving spoofed packets (filter packets +# coming from host) +ngctl msg ${NODEPATH} setprogram { \\ + thisHook=\\"${HOST_HOOK}\\" \\ + ifMatch=\\"${JAIL_HOOK}\\" \\ + ifNotMatch=\\"${DEBUG_HOOK}\\" \\ + $(bpf_prog "ether dst ${JAIL_MAC} && dst ${JAIL_IP}") \\ +} .Ed .Sh SEE ALSO .Xr bpf 4 , From owner-svn-src-head@freebsd.org Mon Sep 21 18:32:57 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E49F13F8D61; Mon, 21 Sep 2020 18:32:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwCjj5lmJz4dYX; Mon, 21 Sep 2020 18:32:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AA06E129D6; Mon, 21 Sep 2020 18:32:57 +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 08LIWviw011818; Mon, 21 Sep 2020 18:32:57 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08LIWvMs011816; Mon, 21 Sep 2020 18:32:57 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202009211832.08LIWvMs011816@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 21 Sep 2020 18:32:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365966 - in head/sys/dev/usb: . serial X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/dev/usb: . serial X-SVN-Commit-Revision: 365966 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 21 Sep 2020 18:32:58 -0000 Author: hselasky Date: Mon Sep 21 18:32:57 2020 New Revision: 365966 URL: https://svnweb.freebsd.org/changeset/base/365966 Log: Add support for Winbond USB CDC modem device found in Tenma power supply. PR: 249384 MFC after: 1 week Submitted by: darius@dons.net.au Sponsored by: Mellanox Technologies // NVIDIA Networking Modified: head/sys/dev/usb/serial/umodem.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/umodem.c ============================================================================== --- head/sys/dev/usb/serial/umodem.c Mon Sep 21 18:28:23 2020 (r365965) +++ head/sys/dev/usb/serial/umodem.c Mon Sep 21 18:32:57 2020 (r365966) @@ -150,6 +150,8 @@ static const STRUCT_USB_HOST_ID umodem_host_devs[] = { {USB_VPI(USB_VENDOR_KYOCERA, USB_PRODUCT_KYOCERA_AHK3001V, 1)}, {USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC5720, 1)}, {USB_VPI(USB_VENDOR_CURITEL, USB_PRODUCT_CURITEL_PC5740, 1)}, + /* Winbond */ + {USB_VENDOR(USB_VENDOR_WINBOND), USB_PRODUCT(USB_PRODUCT_WINBOND_CDC)}, }; /* Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Mon Sep 21 18:28:23 2020 (r365965) +++ head/sys/dev/usb/usbdevs Mon Sep 21 18:32:57 2020 (r365966) @@ -4851,6 +4851,7 @@ product WIENERPLEINBAUS MPOD 0x0012 MPOD PSU product WIENERPLEINBAUS CML 0x0015 CML Data Logger /* Windbond Electronics */ +product WINBOND CDC 0x5011 CDC serial device product WINBOND UH104 0x5518 4-port USB Hub /* WinMaxGroup products */ From owner-svn-src-head@freebsd.org Mon Sep 21 18:34:14 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5ADDD3F8E16; Mon, 21 Sep 2020 18:34:14 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwClB1kqDz4drS; Mon, 21 Sep 2020 18:34:14 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1ED16129D7; Mon, 21 Sep 2020 18:34:14 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08LIYDOc011969; Mon, 21 Sep 2020 18:34:13 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08LIYD0U011968; Mon, 21 Sep 2020 18:34:13 GMT (envelope-from dab@FreeBSD.org) Message-Id: <202009211834.08LIYD0U011968@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Mon, 21 Sep 2020 18:34:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365967 - head/sbin/nvmecontrol X-SVN-Group: head X-SVN-Commit-Author: dab X-SVN-Commit-Paths: head/sbin/nvmecontrol X-SVN-Commit-Revision: 365967 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 21 Sep 2020 18:34:14 -0000 Author: dab Date: Mon Sep 21 18:34:13 2020 New Revision: 365967 URL: https://svnweb.freebsd.org/changeset/base/365967 Log: Whitespace fix after r365948 MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/sbin/nvmecontrol/firmware.c Modified: head/sbin/nvmecontrol/firmware.c ============================================================================== --- head/sbin/nvmecontrol/firmware.c Mon Sep 21 18:32:57 2020 (r365966) +++ head/sbin/nvmecontrol/firmware.c Mon Sep 21 18:34:13 2020 (r365967) @@ -168,9 +168,9 @@ update_firmware(int fd, uint8_t *payload, int32_t payl if (fwug != 0 && fwug != 0xFF) max_xfer_size = ((uint64_t)fwug << 12); else if (ioctl(fd, NVME_GET_MAX_XFER_SIZE, &max_xfer_size) < 0) - err(1, "query max transfer size failed"); - if (max_xfer_size > NVME_MAX_XFER_SIZE) - max_xfer_size = NVME_MAX_XFER_SIZE; + err(1, "query max transfer size failed"); + if (max_xfer_size > NVME_MAX_XFER_SIZE) + max_xfer_size = NVME_MAX_XFER_SIZE; if ((chunk = aligned_alloc(PAGE_SIZE, max_xfer_size)) == NULL) errx(1, "unable to malloc %zd bytes", (size_t)max_xfer_size); From owner-svn-src-head@freebsd.org Mon Sep 21 19:03:08 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 945653F96B9; Mon, 21 Sep 2020 19:03:08 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwDNX3T28z3S68; Mon, 21 Sep 2020 19:03:08 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 438501306C; Mon, 21 Sep 2020 19:03:08 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08LJ38A7030706; Mon, 21 Sep 2020 19:03:08 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08LJ37g8030704; Mon, 21 Sep 2020 19:03:07 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202009211903.08LJ37g8030704@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Mon, 21 Sep 2020 19:03:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365968 - head/contrib/one-true-awk X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/contrib/one-true-awk X-SVN-Commit-Revision: 365968 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 21 Sep 2020 19:03:08 -0000 Author: arichardson Date: Mon Sep 21 19:03:07 2020 New Revision: 365968 URL: https://svnweb.freebsd.org/changeset/base/365968 Log: awk: Fix subobject out-of-bounds access When matching a regex with ^, it would attempt to access gototab[NSTATES][NCHARS+2], and therefore access the state for the \002 character instead. This change is required to run awk under CHERI (with sub-object bounds) and when running with UBSan instrumentation. This was committed upstream as https://github.com/onetrueawk/awk/commit/cbf924342b63a095a4c6842280c3085b1b63ae45 Found by: CHERI (with subobject bounds enabled) Obtained from: CheriBSD Reviewed By: imp Differential Revision: https://reviews.freebsd.org/D26509 Modified: head/contrib/one-true-awk/awk.h head/contrib/one-true-awk/b.c Modified: head/contrib/one-true-awk/awk.h ============================================================================== --- head/contrib/one-true-awk/awk.h Mon Sep 21 18:34:13 2020 (r365967) +++ head/contrib/one-true-awk/awk.h Mon Sep 21 19:03:07 2020 (r365968) @@ -218,6 +218,8 @@ extern int pairstack[], paircnt; #define NCHARS (256+3) /* 256 handles 8-bit chars; 128 does 7-bit */ /* watch out in match(), etc. */ #define NSTATES 32 +#define HAT (NCHARS+2) /* matches ^ in regular expr */ + /* NCHARS is 2**n */ typedef struct rrow { long ltype; /* long avoids pointer warnings on 64-bit */ @@ -230,7 +232,7 @@ typedef struct rrow { } rrow; typedef struct fa { - uschar gototab[NSTATES][NCHARS]; + uschar gototab[NSTATES][HAT + 1]; uschar out[NSTATES]; uschar *restr; int *posns[NSTATES]; Modified: head/contrib/one-true-awk/b.c ============================================================================== --- head/contrib/one-true-awk/b.c Mon Sep 21 18:34:13 2020 (r365967) +++ head/contrib/one-true-awk/b.c Mon Sep 21 19:03:07 2020 (r365968) @@ -37,8 +37,6 @@ __FBSDID("$FreeBSD$"); #include "awk.h" #include "ytab.h" -#define HAT (NCHARS+2) /* matches ^ in regular expr */ - /* NCHARS is 2**n */ #define MAXLIN 22 #define type(v) (v)->nobj /* badly overloaded here */ From owner-svn-src-head@freebsd.org Mon Sep 21 19:03:14 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A13863F97B1; Mon, 21 Sep 2020 19:03:14 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwDNd3dWCz3S6q; Mon, 21 Sep 2020 19:03:13 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 25D7012DC6; Mon, 21 Sep 2020 19:03:13 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08LJ3Cp1030760; Mon, 21 Sep 2020 19:03:12 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08LJ3CIa030759; Mon, 21 Sep 2020 19:03:12 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202009211903.08LJ3CIa030759@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Mon, 21 Sep 2020 19:03:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365969 - head/contrib/one-true-awk X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/contrib/one-true-awk X-SVN-Commit-Revision: 365969 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 21 Sep 2020 19:03:17 -0000 Author: arichardson Date: Mon Sep 21 19:03:12 2020 New Revision: 365969 URL: https://svnweb.freebsd.org/changeset/base/365969 Log: Fix another UBSan error in awk This applies my upstreamed fix: https://github.com/onetrueawk/awk/commit/ad9bd2f40a89ec9533b92254b86a756cf4f40fd4 Found By: UBSan Modified: head/contrib/one-true-awk/lex.c Modified: head/contrib/one-true-awk/lex.c ============================================================================== --- head/contrib/one-true-awk/lex.c Mon Sep 21 19:03:07 2020 (r365968) +++ head/contrib/one-true-awk/lex.c Mon Sep 21 19:03:12 2020 (r365969) @@ -467,9 +467,8 @@ int word(char *w) int c, n; n = binsearch(w, keywords, sizeof(keywords)/sizeof(keywords[0])); -/* BUG: this ought to be inside the if; in theory could fault (daniel barrett) */ - kp = keywords + n; if (n != -1) { /* found in table */ + kp = keywords + n; yylval.i = kp->sub; switch (kp->type) { /* special handling */ case BLTIN: From owner-svn-src-head@freebsd.org Mon Sep 21 19:03:20 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 832503F9653; Mon, 21 Sep 2020 19:03:20 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwDNl67yxz3SDY; Mon, 21 Sep 2020 19:03:18 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D34BA12C48; Mon, 21 Sep 2020 19:03:17 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08LJ3HfU030814; Mon, 21 Sep 2020 19:03:17 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08LJ3Hv9030813; Mon, 21 Sep 2020 19:03:17 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202009211903.08LJ3Hv9030813@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Mon, 21 Sep 2020 19:03:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365970 - head/usr.bin/mkcsmapper X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/usr.bin/mkcsmapper X-SVN-Commit-Revision: 365970 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 21 Sep 2020 19:03:20 -0000 Author: arichardson Date: Mon Sep 21 19:03:17 2020 New Revision: 365970 URL: https://svnweb.freebsd.org/changeset/base/365970 Log: mkcsmapper: Fix UBSan signed shift error usr.bin/mkcsmapper/yacc.y:466:18: runtime error: left shift of 1 by 31 places cannot be represented in type 'int' Modified: head/usr.bin/mkcsmapper/yacc.y Modified: head/usr.bin/mkcsmapper/yacc.y ============================================================================== --- head/usr.bin/mkcsmapper/yacc.y Mon Sep 21 19:03:12 2020 (r365969) +++ head/usr.bin/mkcsmapper/yacc.y Mon Sep 21 19:03:17 2020 (r365970) @@ -463,7 +463,7 @@ set_src_zone(u_int32_t val) default: goto bad; } - rowcol_mask = 1 << (rowcol_bits - 1); + rowcol_mask = 1u << (rowcol_bits - 1); rowcol_mask |= rowcol_mask - 1; for (i = 0; i < rowcol_len; ++i) { p = &rowcol[i]; From owner-svn-src-head@freebsd.org Mon Sep 21 19:35:13 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 945E53FA501; Mon, 21 Sep 2020 19:35:13 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwF5W6PMPz3TrR; Mon, 21 Sep 2020 19:35:11 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1kKRaX-000MLb-OL; Mon, 21 Sep 2020 22:35:01 +0300 Date: Mon, 21 Sep 2020 22:35:01 +0300 From: Slawa Olhovchenkov To: Ryan Moeller Cc: Andriy Gapon , Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r365249 - head Message-ID: <20200921193501.GD2033@zxy.spb.ru> References: <202009021428.082EStuD062827@repo.freebsd.org> <9c0dfb3c-7dcf-b973-b2b5-95cf56dd4322@FreeBSD.org> <780dd0e7-c521-e83a-7d57-aa0e99d64b75@FreeBSD.org> <72524bda-bc15-cc19-2a7f-21a56e7d6ba5@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <72524bda-bc15-cc19-2a7f-21a56e7d6ba5@FreeBSD.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-Rspamd-Queue-Id: 4BwF5W6PMPz3TrR X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of slw@zxy.spb.ru has no SPF policy when checking 195.70.199.98) smtp.mailfrom=slw@zxy.spb.ru X-Spamd-Result: default: False [0.11 / 15.00]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.56)[-0.555]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[zxy.spb.ru]; AUTH_NA(1.00)[]; RCPT_COUNT_FIVE(0.00)[6]; NEURAL_HAM_MEDIUM(-0.29)[-0.288]; NEURAL_SPAM_SHORT(0.05)[0.049]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:5495, ipnet:195.70.192.0/19, country:RU]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 21 Sep 2020 19:35:13 -0000 On Wed, Sep 02, 2020 at 11:53:57AM -0400, Ryan Moeller wrote: > > On 9/2/20 11:43 AM, Andriy Gapon wrote: > > On 02/09/2020 18:23, Ryan Moeller wrote: > >> On 9/2/20 10:28 AM, Warner Losh wrote: > >>> Author: imp > >>> Date: Wed Sepš 2 14:28:54 2020 > >>> New Revision: 365249 > >>> URL: https://svnweb.freebsd.org/changeset/base/365249 > >>> > >>> Log: > >>> šš Add note about needing to manually import the zfs pools or update > >>> šš /etc/rc.d due to the cache file moving to /etc. > >>> > >>> Modified: > >>> šš head/UPDATING > >>> > >>> Modified: head/UPDATING > >>> ============================================================================== > >>> --- head/UPDATINGššš Wed Sepš 2 12:57:34 2020ššš (r365248) > >>> +++ head/UPDATINGššš Wed Sepš 2 14:28:54 2020ššš (r365249) > >>> @@ -36,6 +36,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: > >>> ššššš scenarios have been tested and fixed, but rebuilding kernels without > >>> ššššš rebuilding world may fail. > >>> š +ššš The ZFS cache file has moved from /boot to /etc to match the OpenZFS > >>> +ššš upstream default. This means your zpool won't auto import until you > >>> +ššš upgrade your /etc/rc.d files or you import them manually. > >>> + > >>> š 20200824: > >>> ššššš The resume code now notifies devd with the 'kernel' system > >>> ššššš rather than the old 'kern' subsystem to be consistent with > >> Thanks, enough people seemed to be getting tripped up by this. > > I think that this is a very useful note. > > > > But I do not see a direct connection between the change of zpool.cache location > > and the new ZFS's not automatically importing zpool.cache pools on boot. > > > > True, the real reason is that the kernel module in OpenZFS does not > autoimport pools. > Instead we explicitly "zpool import -a" in one of the ZFS rc scripts. Is posible to restore old behavior? From owner-svn-src-head@freebsd.org Mon Sep 21 19:50:40 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AC4333FA92E; Mon, 21 Sep 2020 19:50:40 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwFRN40K5z3W6B; Mon, 21 Sep 2020 19:50:40 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6AC201369E; Mon, 21 Sep 2020 19:50:40 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08LJoefw056571; Mon, 21 Sep 2020 19:50:40 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08LJoejJ056570; Mon, 21 Sep 2020 19:50:40 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202009211950.08LJoejJ056570@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 21 Sep 2020 19:50:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365972 - head/tools/bsdbox X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/tools/bsdbox X-SVN-Commit-Revision: 365972 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 21 Sep 2020 19:50:40 -0000 Author: kevans Date: Mon Sep 21 19:50:39 2020 New Revision: 365972 URL: https://svnweb.freebsd.org/changeset/base/365972 Log: bsdbox: fix build after recent libifconfig changes libifconfig now generates file(s) into its .OBJDIR that are essential to the build. Make sure we -I that in, like we already do in the ^/rescue build. Modified: head/tools/bsdbox/Makefile Modified: head/tools/bsdbox/Makefile ============================================================================== --- head/tools/bsdbox/Makefile Mon Sep 21 19:25:41 2020 (r365971) +++ head/tools/bsdbox/Makefile Mon Sep 21 19:50:39 2020 (r365972) @@ -74,6 +74,7 @@ CRUNCH_LIBS+= -l80211 -lalias -lcam -lcursesw -ldevsta # Don't forget this - ifconfig, etc -adrian CRUNCH_LIBS+= ${LDADD_ifconfig} CRUNCH_LIBS+= -lgeom -lbsdxml -ljail -lkiconv -lmd -lsbuf -lufs +CRUNCH_BUILDOPTS+= CRUNCH_CFLAGS+=-I${OBJTOP}/lib/libifconfig ################################################################## # Programs from stock /usr/bin From owner-svn-src-head@freebsd.org Mon Sep 21 20:02:34 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3639D3FAD2D; Mon, 21 Sep 2020 20:02:34 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwFj43yGxz3X5Y; Mon, 21 Sep 2020 20:02:31 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B68FE13A9F; Mon, 21 Sep 2020 20:02:28 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08LK2Sif069939; Mon, 21 Sep 2020 20:02:28 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08LK2Rv3069836; Mon, 21 Sep 2020 20:02:27 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202009212002.08LK2Rv3069836@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Mon, 21 Sep 2020 20:02:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365973 - in head/sys: net net/route netinet netinet6 X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: in head/sys: net net/route netinet netinet6 X-SVN-Commit-Revision: 365973 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 21 Sep 2020 20:02:34 -0000 Author: melifaro Date: Mon Sep 21 20:02:26 2020 New Revision: 365973 URL: https://svnweb.freebsd.org/changeset/base/365973 Log: Rework part of routing code to reduce difference to D26449. * Split rt_setmetrics into get_info_weight() and rt_set_expire_info(), as these two can be applied at different entities and at different times. * Start filling route weight in route change notifications * Pass flowid to UDP/raw IP route lookups * Rework nd6_subscription_cb() and sysctl_dumpentry() to prepare for the fact that rtentry can contain multiple nexthops. Differential Revision: https://reviews.freebsd.org/D26497 Modified: head/sys/net/route.c head/sys/net/route.h head/sys/net/route/route_ctl.c head/sys/net/route/route_var.h head/sys/net/rtsock.c head/sys/netinet/ip_output.c head/sys/netinet6/nd6.c Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Mon Sep 21 19:50:39 2020 (r365972) +++ head/sys/net/route.c Mon Sep 21 20:02:26 2020 (r365973) @@ -849,18 +849,6 @@ rt_mpath_unlink(struct rib_head *rnh, struct rt_addrin #endif void -rt_setmetrics(const struct rt_addrinfo *info, struct rtentry *rt) -{ - - if (info->rti_mflags & RTV_WEIGHT) - rt->rt_weight = info->rti_rmx->rmx_weight; - /* Kernel -> userland timebase conversion. */ - if (info->rti_mflags & RTV_EXPIRE) - rt->rt_expire = info->rti_rmx->rmx_expire ? - info->rti_rmx->rmx_expire - time_second + time_uptime : 0; -} - -void rt_maskedcopy(struct sockaddr *src, struct sockaddr *dst, struct sockaddr *netmask) { u_char *cp1 = (u_char *)src; Modified: head/sys/net/route.h ============================================================================== --- head/sys/net/route.h Mon Sep 21 19:50:39 2020 (r365972) +++ head/sys/net/route.h Mon Sep 21 20:02:26 2020 (r365973) @@ -104,6 +104,10 @@ struct rt_metrics { /* lle state is exported in rmx_state rt_metrics field */ #define rmx_state rmx_weight +/* default route weight */ +#define RT_DEFAULT_WEIGHT 1 +#define RT_MAX_WEIGHT 16777215 /* 3 bytes */ + /* * Keep a generation count of routing table, incremented on route addition, * so we can invalidate caches. This is accessed without a lock, as precision Modified: head/sys/net/route/route_ctl.c ============================================================================== --- head/sys/net/route/route_ctl.c Mon Sep 21 19:50:39 2020 (r365972) +++ head/sys/net/route/route_ctl.c Mon Sep 21 20:02:26 2020 (r365973) @@ -175,6 +175,32 @@ get_rnh(uint32_t fibnum, const struct rt_addrinfo *inf return (rnh); } +static int +get_info_weight(const struct rt_addrinfo *info, uint32_t default_weight) +{ + uint32_t weight; + + if (info->rti_mflags & RTV_WEIGHT) + weight = info->rti_rmx->rmx_weight; + else + weight = default_weight; + /* Keep upper 1 byte for adm distance purposes */ + if (weight > RT_MAX_WEIGHT) + weight = RT_MAX_WEIGHT; + + return (weight); +} + +static void +rt_set_expire_info(struct rtentry *rt, const struct rt_addrinfo *info) +{ + + /* Kernel -> userland timebase conversion. */ + if (info->rti_mflags & RTV_EXPIRE) + rt->rt_expire = info->rti_rmx->rmx_expire ? + info->rti_rmx->rmx_expire - time_second + time_uptime : 0; +} + /* * Check if specified @gw matches gw data in the nexthop @nh. * @@ -423,10 +449,9 @@ create_rtentry(struct rib_head *rnh, struct rt_addrinf * examine the ifa and ifa->ifa_ifp if it so desires. */ ifa = info->rti_ifa; - rt->rt_weight = 1; + rt->rt_weight = get_info_weight(info, RT_DEFAULT_WEIGHT); + rt_set_expire_info(rt, info); - rt_setmetrics(info, rt); - *prt = rt; return (0); } @@ -815,7 +840,7 @@ change_route_nhop(struct rib_head *rnh, struct rtentry if (rnd->rnd_nhop != NULL) { /* Changing expiration & nexthop & weight to a new one */ - rt_setmetrics(info, rt); + rt_set_expire_info(rt, info); rt->rt_nhop = rnd->rnd_nhop; rt->rt_weight = rnd->rnd_weight; if (rt->rt_expire > 0) Modified: head/sys/net/route/route_var.h ============================================================================== --- head/sys/net/route/route_var.h Mon Sep 21 19:50:39 2020 (r365972) +++ head/sys/net/route/route_var.h Mon Sep 21 20:02:26 2020 (r365973) @@ -115,7 +115,6 @@ _Static_assert(__offsetof(struct route, ro_dst) == __o struct rib_head *rt_tables_get_rnh(uint32_t table, sa_family_t family); void rt_mpath_init_rnh(struct rib_head *rnh); int rt_getifa_fib(struct rt_addrinfo *info, u_int fibnum); -void rt_setmetrics(const struct rt_addrinfo *info, struct rtentry *rt); #ifdef RADIX_MPATH struct radix_node *rt_mpath_unlink(struct rib_head *rnh, struct rt_addrinfo *info, struct rtentry *rto, int *perror); Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Mon Sep 21 19:50:39 2020 (r365972) +++ head/sys/net/rtsock.c Mon Sep 21 20:02:26 2020 (r365973) @@ -175,6 +175,8 @@ static int rtsock_msg_buffer(int type, struct rt_addri static int rt_xaddrs(caddr_t cp, caddr_t cplim, struct rt_addrinfo *rtinfo); static int sysctl_dumpentry(struct radix_node *rn, void *vw); +static int sysctl_dumpnhop(struct rtentry *rt, struct nhop_object *nh, + uint32_t weight, struct walkarg *w); static int sysctl_iflist(int af, struct walkarg *w); static int sysctl_ifmalist(int af, struct walkarg *w); static int route_output(struct mbuf *m, struct socket *so, ...); @@ -740,6 +742,7 @@ handle_rtm_get(struct rt_addrinfo *info, u_int fibnum, } } rc->rc_nh_new = rc->rc_rt->rt_nhop; + rc->rc_nh_weight = rc->rc_rt->rt_weight; RIB_RUNLOCK(rnh); return (0); @@ -1696,9 +1699,7 @@ sysctl_dumpentry(struct radix_node *rn, void *vw) struct walkarg *w = vw; struct rtentry *rt = (struct rtentry *)rn; struct nhop_object *nh; - int error = 0, size; - struct rt_addrinfo info; - struct sockaddr_storage ss; + int error = 0; NET_EPOCH_ASSERT(); @@ -1707,6 +1708,20 @@ sysctl_dumpentry(struct radix_node *rn, void *vw) if (!can_export_rte(w->w_req->td->td_ucred, rt)) return (0); nh = rt->rt_nhop; + error = sysctl_dumpnhop(rt, nh, rt->rt_weight, w); + + return (0); +} + + +static int +sysctl_dumpnhop(struct rtentry *rt, struct nhop_object *nh, uint32_t weight, + struct walkarg *w) +{ + struct rt_addrinfo info; + int error = 0, size; + struct sockaddr_storage ss; + bzero((caddr_t)&info, sizeof(info)); info.rti_info[RTAX_DST] = rt_key(rt); info.rti_info[RTAX_GATEWAY] = &nh->gw_sa; Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Mon Sep 21 19:50:39 2020 (r365972) +++ head/sys/netinet/ip_output.c Mon Sep 21 20:02:26 2020 (r365973) @@ -512,7 +512,8 @@ again: } else { struct nhop_object *nh; - nh = fib4_lookup(M_GETFIB(m), ip->ip_dst, 0, NHR_NONE, 0); + nh = fib4_lookup(M_GETFIB(m), ip->ip_dst, 0, NHR_NONE, + m->m_pkthdr.flowid); if (nh == NULL) { #if defined(IPSEC) || defined(IPSEC_SUPPORT) /* Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Mon Sep 21 19:50:39 2020 (r365972) +++ head/sys/netinet6/nd6.c Mon Sep 21 20:02:26 2020 (r365973) @@ -1570,23 +1570,28 @@ nd6_free_redirect(const struct llentry *ln) /* * Updates status of the default router route. */ -void -nd6_subscription_cb(struct rib_head *rnh, struct rib_cmd_info *rc, void *arg) +static void +check_release_defrouter(struct rib_cmd_info *rc, void *_cbdata) { struct nd_defrouter *dr; struct nhop_object *nh; - if (rc->rc_cmd == RTM_DELETE) { - nh = rc->rc_nh_old; + nh = rc->rc_nh_old; - if (nh->nh_flags & NHF_DEFAULT) { - dr = defrouter_lookup(&nh->gw6_sa.sin6_addr, nh->nh_ifp); - if (dr != NULL) { - dr->installed = 0; - defrouter_rele(dr); - } + if ((nh != NULL) && (nh->nh_flags & NHF_DEFAULT)) { + dr = defrouter_lookup(&nh->gw6_sa.sin6_addr, nh->nh_ifp); + if (dr != NULL) { + dr->installed = 0; + defrouter_rele(dr); } } +} + +void +nd6_subscription_cb(struct rib_head *rnh, struct rib_cmd_info *rc, void *arg) +{ + + check_release_defrouter(rc, NULL); } int From owner-svn-src-head@freebsd.org Mon Sep 21 21:40:58 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CD2B53FD911 for ; Mon, 21 Sep 2020 21:40:58 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwHtf2njjz3xQP for ; Mon, 21 Sep 2020 21:40:58 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.16.1/8.16.1) with ESMTPS id 08LLepSL028529 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 21 Sep 2020 14:40:51 -0700 (PDT) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.16.1/8.16.1/Submit) id 08LLemor028528; Mon, 21 Sep 2020 14:40:48 -0700 (PDT) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Mon, 21 Sep 2020 14:40:48 -0700 From: Gleb Smirnoff To: Mateusz Guzik Cc: Andrew Gallatin , Alexey Dokuchaev , Michael Tuexen , Pedro Giffuni , Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r365071 - in head/sys: net net/altq net/route net80211 netgraph netgraph/atm netgraph/atm/ccatm netgraph/atm/sscfu netgraph/atm/sscop netgraph/atm/uni netgraph/bluetooth/common netgraph... Message-ID: <20200921214048.GZ1269@FreeBSD.org> References: <202009012119.081LJERb018106@repo.freebsd.org> <95844C00-D10A-456D-AD29-DF572043074F@fh-muenster.de> <20200902020507.GA38274@FreeBSD.org> <20200902180626.GA88595@FreeBSD.org> <6124a908-25a5-e023-16da-7963ba229b7f@FreeBSD.org> <08636D5E-AA07-4AE7-B5AC-656B08CF564B@fh-muenster.de> <20200903024226.GA54078@FreeBSD.org> <60ea593f-8258-e30d-b897-f162168b44d3@cs.duke.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <60ea593f-8258-e30d-b897-f162168b44d3@cs.duke.edu> X-Rspamd-Queue-Id: 4BwHtf2njjz3xQP X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; ASN(0.00)[asn:27348, ipnet:162.251.186.0/24, country:US]; local_wl_from(0.00)[freebsd.org] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 21 Sep 2020 21:40:58 -0000 Mateusz, On Fri, Sep 04, 2020 at 02:15:04PM -0400, Andrew Gallatin wrote: A> I do the upstream sync between the Netflix tree and A> FreeBSD-current about every 3 weeks (unless glebius beats A> me to the punch and does it first :). I anticipate that A> this blank line sweep will cause lots of conflicts for us. A> I understand this is progress, and I don't object, and I'm A> not asking for a revert, but please understand that cleanups A> like this do have hidden costs. I expect that other commercial A> entities who contribute to FreeBSD will have the same issue, A> and I also anticipate it will cause problems with MFCs sorry for chiming in late, but I'm about to bump at this change. An advice for future sweeps like that. Include the script you used for the sweep into the commit message. Then, mergers, like me, will run same script on their tree before doing a merge and there will be no conflict. Example commit: https://svnweb.freebsd.org/base?view=revision&revision=360579 -- Gleb Smirnoff From owner-svn-src-head@freebsd.org Mon Sep 21 22:18:10 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 38C073FEB2F; Mon, 21 Sep 2020 22:18:10 +0000 (UTC) (envelope-from scottph@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwJjZ0mChz40xH; Mon, 21 Sep 2020 22:18:10 +0000 (UTC) (envelope-from scottph@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F19EB14FF4; Mon, 21 Sep 2020 22:18:09 +0000 (UTC) (envelope-from scottph@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08LMI9YV052812; Mon, 21 Sep 2020 22:18:09 GMT (envelope-from scottph@FreeBSD.org) Received: (from scottph@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08LMI9eG052810; Mon, 21 Sep 2020 22:18:09 GMT (envelope-from scottph@FreeBSD.org) Message-Id: <202009212218.08LMI9eG052810@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottph set sender to scottph@FreeBSD.org using -f From: D Scott Phillips Date: Mon, 21 Sep 2020 22:18:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365974 - head/sys/contrib/vchiq/interface/vchiq_arm X-SVN-Group: head X-SVN-Commit-Author: scottph X-SVN-Commit-Paths: head/sys/contrib/vchiq/interface/vchiq_arm X-SVN-Commit-Revision: 365974 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 21 Sep 2020 22:18:10 -0000 Author: scottph Date: Mon Sep 21 22:18:09 2020 New Revision: 365974 URL: https://svnweb.freebsd.org/changeset/base/365974 Log: vchi: rename bitset macros to avoid collision with bitset(9) An upcoming change to include bitset(9) macros from vm_page.h causes a macro name collision with vchi's custom bitset macros. This change was performed mechanically by: sed -i .orig s/BITSET/VCHI_BITSET/g $(grep -rl BITSET sys/contrib/vchiq) Reviewed by: andrew Approved by: scottl (implicit) MFC after: 1 week Sponsored by: Ampere Computing, Inc. Differential Revision: https://reviews.freebsd.org/D26177 Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.c head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.h Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.c ============================================================================== --- head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.c Mon Sep 21 20:02:26 2020 (r365973) +++ head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.c Mon Sep 21 22:18:09 2020 (r365974) @@ -619,7 +619,7 @@ static void process_free_queue(VCHIQ_STATE_T *state) { VCHIQ_SHARED_STATE_T *local = state->local; - BITSET_T service_found[BITSET_SIZE(VCHIQ_MAX_SERVICES)]; + VCHI_BITSET_T service_found[VCHI_BITSET_SIZE(VCHIQ_MAX_SERVICES)]; int slot_queue_available; /* Find slots which have been freed by the other side, and return them @@ -646,7 +646,7 @@ process_free_queue(VCHIQ_STATE_T *state) /* Initialise the bitmask for services which have used this ** slot */ - BITSET_ZERO(service_found); + VCHI_BITSET_ZERO(service_found); pos = 0; @@ -686,9 +686,9 @@ process_free_queue(VCHIQ_STATE_T *state) header->size); WARN(1, "invalid message use count\n"); } - if (!BITSET_IS_SET(service_found, port)) { + if (!VCHI_BITSET_IS_SET(service_found, port)) { /* Set the found bit for this service */ - BITSET_SET(service_found, port); + VCHI_BITSET_SET(service_found, port); spin_lock("a_spinlock); count = service_quota->slot_use_count; @@ -1276,7 +1276,7 @@ poll_services(VCHIQ_STATE_T *state) { int group, i; - for (group = 0; group < BITSET_SIZE(state->unused_service); group++) { + for (group = 0; group < VCHI_BITSET_SIZE(state->unused_service); group++) { uint32_t flags; flags = atomic_xchg(&state->poll_services[group], 0); for (i = 0; flags; i++) { Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.h ============================================================================== --- head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.h Mon Sep 21 20:02:26 2020 (r365973) +++ head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.h Mon Sep 21 22:18:09 2020 (r365974) @@ -141,17 +141,17 @@ vchiq_static_assert((unsigned int)VCHIQ_PORT_MAX < #define VCHIQ_BULK_ACTUAL_ABORTED -1 -typedef uint32_t BITSET_T; +typedef uint32_t VCHI_BITSET_T; -vchiq_static_assert((sizeof(BITSET_T) * 8) == 32); +vchiq_static_assert((sizeof(VCHI_BITSET_T) * 8) == 32); -#define BITSET_SIZE(b) ((b + 31) >> 5) -#define BITSET_WORD(b) (b >> 5) -#define BITSET_BIT(b) (1 << (b & 31)) -#define BITSET_ZERO(bs) memset(bs, 0, sizeof(bs)) -#define BITSET_IS_SET(bs, b) (bs[BITSET_WORD(b)] & BITSET_BIT(b)) -#define BITSET_SET(bs, b) (bs[BITSET_WORD(b)] |= BITSET_BIT(b)) -#define BITSET_CLR(bs, b) (bs[BITSET_WORD(b)] &= ~BITSET_BIT(b)) +#define VCHI_BITSET_SIZE(b) ((b + 31) >> 5) +#define VCHI_BITSET_WORD(b) (b >> 5) +#define VCHI_BITSET_BIT(b) (1 << (b & 31)) +#define VCHI_BITSET_ZERO(bs) memset(bs, 0, sizeof(bs)) +#define VCHI_BITSET_IS_SET(bs, b) (bs[VCHI_BITSET_WORD(b)] & VCHI_BITSET_BIT(b)) +#define VCHI_BITSET_SET(bs, b) (bs[VCHI_BITSET_WORD(b)] |= VCHI_BITSET_BIT(b)) +#define VCHI_BITSET_CLR(bs, b) (bs[VCHI_BITSET_WORD(b)] &= ~VCHI_BITSET_BIT(b)) #if VCHIQ_ENABLE_STATS #define VCHIQ_STATS_INC(state, stat) (state->stats. stat++) @@ -478,7 +478,7 @@ struct vchiq_state_struct { unsigned short data_quota; /* An array of bit sets indicating which services must be polled. */ - atomic_t poll_services[BITSET_SIZE(VCHIQ_MAX_SERVICES)]; + atomic_t poll_services[VCHI_BITSET_SIZE(VCHIQ_MAX_SERVICES)]; /* The number of the first unused service */ int unused_service; From owner-svn-src-head@freebsd.org Mon Sep 21 22:19:13 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D3D0E3FECAF; Mon, 21 Sep 2020 22:19:13 +0000 (UTC) (envelope-from scottph@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwJkn5NhNz4188; Mon, 21 Sep 2020 22:19:13 +0000 (UTC) (envelope-from scottph@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9D7F8151D8; Mon, 21 Sep 2020 22:19:13 +0000 (UTC) (envelope-from scottph@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08LMJDU8052907; Mon, 21 Sep 2020 22:19:13 GMT (envelope-from scottph@FreeBSD.org) Received: (from scottph@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08LMJCm5052904; Mon, 21 Sep 2020 22:19:12 GMT (envelope-from scottph@FreeBSD.org) Message-Id: <202009212219.08LMJCm5052904@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottph set sender to scottph@FreeBSD.org using -f From: D Scott Phillips Date: Mon, 21 Sep 2020 22:19:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365975 - in head: share/man/man9 sys/sys X-SVN-Group: head X-SVN-Commit-Author: scottph X-SVN-Commit-Paths: in head: share/man/man9 sys/sys X-SVN-Commit-Revision: 365975 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 21 Sep 2020 22:19:13 -0000 Author: scottph Date: Mon Sep 21 22:19:12 2020 New Revision: 365975 URL: https://svnweb.freebsd.org/changeset/base/365975 Log: bitset: expand bit index type to `long` An upcoming patch to use the bitset macros for tracking vm page dump information could conceivably need more than INT_MAX bits. Expand the bit type to long so that the extra range is available on 64-bit platforms where it would most likely be needed. CPUSET_COUNT and DOMAINSET_COUNT are also modified to remain of type `int`. Reviewed by: kib, markj Approved by: scottl (implicit) MFC after: 1 week Sponsored by: Ampere Computing, Inc. Differential Revision: https://reviews.freebsd.org/D26190 Modified: head/share/man/man9/bitset.9 head/sys/sys/bitset.h head/sys/sys/cpuset.h head/sys/sys/domainset.h Modified: head/share/man/man9/bitset.9 ============================================================================== --- head/share/man/man9/bitset.9 Mon Sep 21 22:18:09 2020 (r365974) +++ head/share/man/man9/bitset.9 Mon Sep 21 22:19:12 2020 (r365975) @@ -84,13 +84,13 @@ .Fn BIT_EMPTY "const SETSIZE" "struct STRUCTNAME *bitset" .Ft bool .Fn BIT_ISFULLSET "const SETSIZE" "struct STRUCTNAME *bitset" -.Ft int +.Ft long .Fn BIT_FFS "const SETSIZE" "struct STRUCTNAME *bitset" -.Ft int -.Fn BIT_FFS_AT "const SETSIZE" "struct STRUCTNAME *bitset" "int start" -.Ft int +.Ft long +.Fn BIT_FFS_AT "const SETSIZE" "struct STRUCTNAME *bitset" "long start" +.Ft long .Fn BIT_FLS "const SETSIZE" "struct STRUCTNAME *bitset" -.Ft int +.Ft long .Fn BIT_COUNT "const SETSIZE" "struct STRUCTNAME *bitset" .\" .Ft bool Modified: head/sys/sys/bitset.h ============================================================================== --- head/sys/sys/bitset.h Mon Sep 21 22:18:09 2020 (r365974) +++ head/sys/sys/bitset.h Mon Sep 21 22:19:12 2020 (r365975) @@ -213,8 +213,7 @@ */ #define BIT_FFS_AT(_s, p, start) __extension__ ({ \ __size_t __i; \ - long __mask; \ - int __bit; \ + long __bit, __mask; \ \ __mask = ~0UL << ((start) % _BITSET_BITS); \ __bit = 0; \ @@ -235,7 +234,7 @@ #define BIT_FLS(_s, p) __extension__ ({ \ __size_t __i; \ - int __bit; \ + long __bit; \ \ __bit = 0; \ for (__i = __bitset_words((_s)); __i > 0; __i--) { \ @@ -250,7 +249,7 @@ #define BIT_COUNT(_s, p) __extension__ ({ \ __size_t __i; \ - int __count; \ + long __count; \ \ __count = 0; \ for (__i = 0; __i < __bitset_words((_s)); __i++) \ Modified: head/sys/sys/cpuset.h ============================================================================== --- head/sys/sys/cpuset.h Mon Sep 21 22:18:09 2020 (r365974) +++ head/sys/sys/cpuset.h Mon Sep 21 22:19:12 2020 (r365975) @@ -65,7 +65,7 @@ #define CPU_OR_ATOMIC(d, s) BIT_OR_ATOMIC(CPU_SETSIZE, d, s) #define CPU_COPY_STORE_REL(f, t) BIT_COPY_STORE_REL(CPU_SETSIZE, f, t) #define CPU_FFS(p) BIT_FFS(CPU_SETSIZE, p) -#define CPU_COUNT(p) BIT_COUNT(CPU_SETSIZE, p) +#define CPU_COUNT(p) ((int)BIT_COUNT(CPU_SETSIZE, p)) #define CPUSET_FSET BITSET_FSET(_NCPUWORDS) #define CPUSET_T_INITIALIZER BITSET_T_INITIALIZER Modified: head/sys/sys/domainset.h ============================================================================== --- head/sys/sys/domainset.h Mon Sep 21 22:18:09 2020 (r365974) +++ head/sys/sys/domainset.h Mon Sep 21 22:19:12 2020 (r365975) @@ -68,7 +68,7 @@ BIT_COPY_STORE_REL(DOMAINSET_SETSIZE, f, t) #define DOMAINSET_FFS(p) BIT_FFS(DOMAINSET_SETSIZE, p) #define DOMAINSET_FLS(p) BIT_FLS(DOMAINSET_SETSIZE, p) -#define DOMAINSET_COUNT(p) BIT_COUNT(DOMAINSET_SETSIZE, p) +#define DOMAINSET_COUNT(p) ((int)BIT_COUNT(DOMAINSET_SETSIZE, p)) #define DOMAINSET_FSET BITSET_FSET(_NDOMAINSETWORDS) #define DOMAINSET_T_INITIALIZER BITSET_T_INITIALIZER From owner-svn-src-head@freebsd.org Mon Sep 21 22:19:25 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 989A23FED06; Mon, 21 Sep 2020 22:19:25 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwJl05zKdz41S3; Mon, 21 Sep 2020 22:19:24 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 326321550F; Mon, 21 Sep 2020 22:19:22 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08LMJM4h052954; Mon, 21 Sep 2020 22:19:22 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08LMJMuw052953; Mon, 21 Sep 2020 22:19:22 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202009212219.08LMJMuw052953@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 21 Sep 2020 22:19:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365976 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 365976 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 21 Sep 2020 22:19:25 -0000 Author: markj Date: Mon Sep 21 22:19:21 2020 New Revision: 365976 URL: https://svnweb.freebsd.org/changeset/base/365976 Log: Weaken assertions in pmap_l1_to_l2() and pmap_l2_to_l3(). pmap_update_entry() will temporarily clear the valid bit of page table entries in order to satisfy the arm64 pmap's break-before-make constraint. pmap_kextract() may operate concurrently on kernel page table pages, introducing windows where the assertions added in r365879 may fail incorrectly since they implicitly assert that the valid bit is set. Modify the assertions to handle this. Reviewed by: andrew, mmel (previous version) Reviewed by: alc, kib Reported by: mmel, scottph MFC with: r365879 Modified: head/sys/arm64/arm64/pmap.c Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Mon Sep 21 22:19:12 2020 (r365975) +++ head/sys/arm64/arm64/pmap.c Mon Sep 21 22:19:21 2020 (r365976) @@ -438,8 +438,15 @@ pmap_l1_to_l2(pd_entry_t *l1p, vm_offset_t va) pd_entry_t l1, *l2p; l1 = pmap_load(l1p); - KASSERT((l1 & ATTR_DESCR_MASK) == L1_TABLE, - ("%s: L1 entry %#lx is a leaf", __func__, l1)); + + /* + * The valid bit may be clear if pmap_update_entry() is concurrently + * modifying the entry, so for KVA only the entry type may be checked. + */ + KASSERT(va >= VM_MAX_USER_ADDRESS || (l1 & ATTR_DESCR_VALID) != 0, + ("%s: L1 entry %#lx for %#lx is invalid", __func__, l1, va)); + KASSERT((l1 & ATTR_DESCR_TYPE_MASK) == ATTR_DESCR_TYPE_TABLE, + ("%s: L1 entry %#lx for %#lx is a leaf", __func__, l1, va)); l2p = (pd_entry_t *)PHYS_TO_DMAP(l1 & ~ATTR_MASK); return (&l2p[pmap_l2_index(va)]); } @@ -463,8 +470,15 @@ pmap_l2_to_l3(pd_entry_t *l2p, vm_offset_t va) pt_entry_t *l3p; l2 = pmap_load(l2p); - KASSERT((l2 & ATTR_DESCR_MASK) == L2_TABLE, - ("%s: L2 entry %#lx is a leaf", __func__, l2)); + + /* + * The valid bit may be clear if pmap_update_entry() is concurrently + * modifying the entry, so for KVA only the entry type may be checked. + */ + KASSERT(va >= VM_MAX_USER_ADDRESS || (l2 & ATTR_DESCR_VALID) != 0, + ("%s: L2 entry %#lx for %#lx is invalid", __func__, l2, va)); + KASSERT((l2 & ATTR_DESCR_TYPE_MASK) == ATTR_DESCR_TYPE_TABLE, + ("%s: L2 entry %#lx for %#lx is a leaf", __func__, l2, va)); l3p = (pt_entry_t *)PHYS_TO_DMAP(l2 & ~ATTR_MASK); return (&l3p[pmap_l3_index(va)]); } From owner-svn-src-head@freebsd.org Mon Sep 21 22:20:43 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C79C53FEA6D; Mon, 21 Sep 2020 22:20:42 +0000 (UTC) (envelope-from scottph@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwJmV1QNSz41bs; Mon, 21 Sep 2020 22:20:42 +0000 (UTC) (envelope-from scottph@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D3E8D151E0; Mon, 21 Sep 2020 22:20:41 +0000 (UTC) (envelope-from scottph@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08LMKfhK053269; Mon, 21 Sep 2020 22:20:41 GMT (envelope-from scottph@FreeBSD.org) Received: (from scottph@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08LMKbLL053246; Mon, 21 Sep 2020 22:20:37 GMT (envelope-from scottph@FreeBSD.org) Message-Id: <202009212220.08LMKbLL053246@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottph set sender to scottph@FreeBSD.org using -f From: D Scott Phillips Date: Mon, 21 Sep 2020 22:20:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365977 - in head: . sys/amd64/amd64 sys/amd64/include sys/arm/arm sys/arm/include sys/arm64/arm64 sys/arm64/include sys/i386/i386 sys/i386/include sys/mips/include sys/mips/mips sys/po... X-SVN-Group: head X-SVN-Commit-Author: scottph X-SVN-Commit-Paths: in head: . sys/amd64/amd64 sys/amd64/include sys/arm/arm sys/arm/include sys/arm64/arm64 sys/arm64/include sys/i386/i386 sys/i386/include sys/mips/include sys/mips/mips sys/powerpc/include sys/powerpc... X-SVN-Commit-Revision: 365977 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 21 Sep 2020 22:20:46 -0000 Author: scottph Date: Mon Sep 21 22:20:37 2020 New Revision: 365977 URL: https://svnweb.freebsd.org/changeset/base/365977 Log: Move vm_page_dump bitset array definition to MI code These definitions were repeated by all architectures, with small variations. Consolidate the common definitons in machine independent code and use bitset(9) macros for manipulation. Many opportunities for deduplication remain in the machine dependent minidump logic. The only intended functional change is increasing the bit index type to vm_pindex_t, allowing the indexing of pages with address of 8 TiB and greater. Reviewed by: kib, markj Approved by: scottl (implicit) MFC after: 1 week Sponsored by: Ampere Computing, Inc. Differential Revision: https://reviews.freebsd.org/D26129 Modified: head/.clang-format head/sys/amd64/amd64/minidump_machdep.c head/sys/amd64/include/md_var.h head/sys/amd64/include/vmparam.h head/sys/arm/arm/minidump_machdep.c head/sys/arm/include/md_var.h head/sys/arm/include/vmparam.h head/sys/arm64/arm64/minidump_machdep.c head/sys/arm64/include/md_var.h head/sys/arm64/include/vmparam.h head/sys/i386/i386/minidump_machdep.c head/sys/i386/i386/minidump_machdep_base.c head/sys/i386/include/md_var.h head/sys/i386/include/vmparam.h head/sys/mips/include/md_var.h head/sys/mips/include/vmparam.h head/sys/mips/mips/minidump_machdep.c head/sys/powerpc/include/md_var.h head/sys/powerpc/include/vmparam.h head/sys/powerpc/powerpc/minidump_machdep.c head/sys/riscv/include/md_var.h head/sys/riscv/include/vmparam.h head/sys/riscv/riscv/minidump_machdep.c head/sys/vm/vm_page.c head/sys/vm/vm_page.h head/sys/x86/include/x86_var.h Modified: head/.clang-format ============================================================================== --- head/.clang-format Mon Sep 21 22:19:21 2020 (r365976) +++ head/.clang-format Mon Sep 21 22:20:37 2020 (r365977) @@ -76,6 +76,7 @@ ForEachMacros: - TAILQ_FOREACH_REVERSE_SAFE - TAILQ_FOREACH_SAFE - VM_MAP_ENTRY_FOREACH + - VM_PAGE_DUMP_FOREACH IndentCaseLabels: false IndentPPDirectives: None Language: Cpp Modified: head/sys/amd64/amd64/minidump_machdep.c ============================================================================== --- head/sys/amd64/amd64/minidump_machdep.c Mon Sep 21 22:19:21 2020 (r365976) +++ head/sys/amd64/amd64/minidump_machdep.c Mon Sep 21 22:20:37 2020 (r365977) @@ -54,9 +54,6 @@ __FBSDID("$FreeBSD$"); CTASSERT(sizeof(struct kerneldumpheader) == 512); -uint64_t *vm_page_dump; -int vm_page_dump_size; - static struct kerneldumpheader kdh; /* Handle chunked writes. */ @@ -64,7 +61,6 @@ static size_t fragsz; static void *dump_va; static size_t counter, progress, dumpsize, wdog_next; -CTASSERT(sizeof(*vm_page_dump) == 8); static int dump_retry_count = 5; SYSCTL_INT(_machdep, OID_AUTO, dump_retry_count, CTLFLAG_RWTUN, &dump_retry_count, 0, "Number of times dump has to retry before bailing out"); @@ -223,9 +219,8 @@ minidumpsys(struct dumperinfo *di) uint32_t pmapsize; vm_offset_t va; int error; - uint64_t bits; uint64_t *pml4, *pdp, *pd, *pt, pa; - int i, ii, j, k, n, bit; + int i, ii, j, k, n; int retry_count; struct minidumphdr mdhdr; @@ -304,19 +299,13 @@ minidumpsys(struct dumperinfo *di) /* Calculate dump size. */ dumpsize = pmapsize; dumpsize += round_page(msgbufp->msg_size); - dumpsize += round_page(vm_page_dump_size); - for (i = 0; i < vm_page_dump_size / sizeof(*vm_page_dump); i++) { - bits = vm_page_dump[i]; - while (bits) { - bit = bsfq(bits); - pa = (((uint64_t)i * sizeof(*vm_page_dump) * NBBY) + bit) * PAGE_SIZE; - /* Clear out undumpable pages now if needed */ - if (is_dumpable(pa)) { - dumpsize += PAGE_SIZE; - } else { - dump_drop_page(pa); - } - bits &= ~(1ul << bit); + dumpsize += round_page(BITSET_SIZE(vm_page_dump_pages)); + VM_PAGE_DUMP_FOREACH(pa) { + /* Clear out undumpable pages now if needed */ + if (is_dumpable(pa)) { + dumpsize += PAGE_SIZE; + } else { + dump_drop_page(pa); } } dumpsize += PAGE_SIZE; @@ -328,7 +317,7 @@ minidumpsys(struct dumperinfo *di) strcpy(mdhdr.magic, MINIDUMP_MAGIC); mdhdr.version = MINIDUMP_VERSION; mdhdr.msgbufsize = msgbufp->msg_size; - mdhdr.bitmapsize = vm_page_dump_size; + mdhdr.bitmapsize = round_page(BITSET_SIZE(vm_page_dump_pages)); mdhdr.pmapsize = pmapsize; mdhdr.kernbase = VM_MIN_KERNEL_ADDRESS; mdhdr.dmapbase = DMAP_MIN_ADDRESS; @@ -357,7 +346,8 @@ minidumpsys(struct dumperinfo *di) goto fail; /* Dump bitmap */ - error = blk_write(di, (char *)vm_page_dump, 0, round_page(vm_page_dump_size)); + error = blk_write(di, (char *)vm_page_dump, 0, + round_page(BITSET_SIZE(vm_page_dump_pages))); if (error) goto fail; @@ -409,16 +399,10 @@ minidumpsys(struct dumperinfo *di) } /* Dump memory chunks */ - for (i = 0; i < vm_page_dump_size / sizeof(*vm_page_dump); i++) { - bits = vm_page_dump[i]; - while (bits) { - bit = bsfq(bits); - pa = (((uint64_t)i * sizeof(*vm_page_dump) * NBBY) + bit) * PAGE_SIZE; - error = blk_write(di, 0, pa, PAGE_SIZE); - if (error) - goto fail; - bits &= ~(1ul << bit); - } + VM_PAGE_DUMP_FOREACH(pa) { + error = blk_write(di, 0, pa, PAGE_SIZE); + if (error) + goto fail; } error = blk_flush(di); @@ -453,26 +437,4 @@ minidumpsys(struct dumperinfo *di) } else printf("** DUMP FAILED (ERROR %d) **\n", error); return (error); -} - -void -dump_add_page(vm_paddr_t pa) -{ - int idx, bit; - - pa >>= PAGE_SHIFT; - idx = pa >> 6; /* 2^6 = 64 */ - bit = pa & 63; - atomic_set_long(&vm_page_dump[idx], 1ul << bit); -} - -void -dump_drop_page(vm_paddr_t pa) -{ - int idx, bit; - - pa >>= PAGE_SHIFT; - idx = pa >> 6; /* 2^6 = 64 */ - bit = pa & 63; - atomic_clear_long(&vm_page_dump[idx], 1ul << bit); } Modified: head/sys/amd64/include/md_var.h ============================================================================== --- head/sys/amd64/include/md_var.h Mon Sep 21 22:19:21 2020 (r365976) +++ head/sys/amd64/include/md_var.h Mon Sep 21 22:20:37 2020 (r365977) @@ -36,7 +36,6 @@ #include -extern uint64_t *vm_page_dump; extern int hw_lower_amd64_sharedpage; extern int hw_ibrs_disable; extern int hw_ssb_disable; Modified: head/sys/amd64/include/vmparam.h ============================================================================== --- head/sys/amd64/include/vmparam.h Mon Sep 21 22:19:21 2020 (r365976) +++ head/sys/amd64/include/vmparam.h Mon Sep 21 22:20:37 2020 (r365977) @@ -253,4 +253,9 @@ */ #define VM_BATCHQUEUE_SIZE 31 +/* + * Need a page dump array for minidump. + */ +#define MINIDUMP_PAGE_TRACKING 1 + #endif /* _MACHINE_VMPARAM_H_ */ Modified: head/sys/arm/arm/minidump_machdep.c ============================================================================== --- head/sys/arm/arm/minidump_machdep.c Mon Sep 21 22:19:21 2020 (r365976) +++ head/sys/arm/arm/minidump_machdep.c Mon Sep 21 22:20:37 2020 (r365977) @@ -57,9 +57,6 @@ __FBSDID("$FreeBSD$"); CTASSERT(sizeof(struct kerneldumpheader) == 512); -uint32_t *vm_page_dump; -int vm_page_dump_size; - static struct kerneldumpheader kdh; /* Handle chunked writes. */ @@ -67,8 +64,6 @@ static size_t fragsz; static void *dump_va; static uint64_t counter, progress; -CTASSERT(sizeof(*vm_page_dump) == 4); - static int is_dumpable(vm_paddr_t pa) { @@ -182,10 +177,9 @@ minidumpsys(struct dumperinfo *di) struct minidumphdr mdhdr; uint64_t dumpsize; uint32_t ptesize; - uint32_t bits; uint32_t pa, prev_pa = 0, count = 0; vm_offset_t va; - int i, bit, error; + int error; char *addr; /* @@ -212,20 +206,13 @@ minidumpsys(struct dumperinfo *di) /* Calculate dump size. */ dumpsize = ptesize; dumpsize += round_page(msgbufp->msg_size); - dumpsize += round_page(vm_page_dump_size); - for (i = 0; i < vm_page_dump_size / sizeof(*vm_page_dump); i++) { - bits = vm_page_dump[i]; - while (bits) { - bit = ffs(bits) - 1; - pa = (((uint64_t)i * sizeof(*vm_page_dump) * NBBY) + - bit) * PAGE_SIZE; - /* Clear out undumpable pages now if needed */ - if (is_dumpable(pa)) - dumpsize += PAGE_SIZE; - else - dump_drop_page(pa); - bits &= ~(1ul << bit); - } + dumpsize += round_page(BITSET_SIZE(vm_page_dump_pages)); + VM_PAGE_DUMP_FOREACH(pa) { + /* Clear out undumpable pages now if needed */ + if (is_dumpable(pa)) + dumpsize += PAGE_SIZE; + else + dump_drop_page(pa); } dumpsize += PAGE_SIZE; @@ -236,7 +223,7 @@ minidumpsys(struct dumperinfo *di) strcpy(mdhdr.magic, MINIDUMP_MAGIC); mdhdr.version = MINIDUMP_VERSION; mdhdr.msgbufsize = msgbufp->msg_size; - mdhdr.bitmapsize = vm_page_dump_size; + mdhdr.bitmapsize = round_page(BITSET_SIZE(vm_page_dump_pages)); mdhdr.ptesize = ptesize; mdhdr.kernbase = KERNBASE; mdhdr.arch = __ARM_ARCH; @@ -270,7 +257,7 @@ minidumpsys(struct dumperinfo *di) /* Dump bitmap */ error = blk_write(di, (char *)vm_page_dump, 0, - round_page(vm_page_dump_size)); + round_page(BITSET_SIZE(vm_page_dump_pages))); if (error) goto fail; @@ -293,28 +280,21 @@ minidumpsys(struct dumperinfo *di) } /* Dump memory chunks */ - for (i = 0; i < vm_page_dump_size / sizeof(*vm_page_dump); i++) { - bits = vm_page_dump[i]; - while (bits) { - bit = ffs(bits) - 1; - pa = (((uint64_t)i * sizeof(*vm_page_dump) * NBBY) + - bit) * PAGE_SIZE; - if (!count) { - prev_pa = pa; + VM_PAGE_DUMP_FOREACH(pa) { + if (!count) { + prev_pa = pa; + count++; + } else { + if (pa == (prev_pa + count * PAGE_SIZE)) count++; - } else { - if (pa == (prev_pa + count * PAGE_SIZE)) - count++; - else { - error = blk_write(di, NULL, prev_pa, - count * PAGE_SIZE); - if (error) - goto fail; - count = 1; - prev_pa = pa; - } + else { + error = blk_write(di, NULL, prev_pa, + count * PAGE_SIZE); + if (error) + goto fail; + count = 1; + prev_pa = pa; } - bits &= ~(1ul << bit); } } if (count) { @@ -348,26 +328,4 @@ fail: } else printf("\n** DUMP FAILED (ERROR %d) **\n", error); return (error); -} - -void -dump_add_page(vm_paddr_t pa) -{ - int idx, bit; - - pa >>= PAGE_SHIFT; - idx = pa >> 5; /* 2^5 = 32 */ - bit = pa & 31; - atomic_set_int(&vm_page_dump[idx], 1ul << bit); -} - -void -dump_drop_page(vm_paddr_t pa) -{ - int idx, bit; - - pa >>= PAGE_SHIFT; - idx = pa >> 5; /* 2^5 = 32 */ - bit = pa & 31; - atomic_clear_int(&vm_page_dump[idx], 1ul << bit); } Modified: head/sys/arm/include/md_var.h ============================================================================== --- head/sys/arm/include/md_var.h Mon Sep 21 22:19:21 2020 (r365976) +++ head/sys/arm/include/md_var.h Mon Sep 21 22:20:37 2020 (r365977) @@ -38,8 +38,6 @@ extern long Maxmem; extern char sigcode[]; extern int szsigcode; -extern uint32_t *vm_page_dump; -extern int vm_page_dump_size; extern u_long elf_hwcap; extern u_long elf_hwcap2; extern vm_paddr_t arm_physmem_kernaddr; @@ -72,8 +70,6 @@ extern enum cpu_class cpu_class; struct dumperinfo; extern int busdma_swi_pending; void busdma_swi(void); -void dump_add_page(vm_paddr_t); -void dump_drop_page(vm_paddr_t); int minidumpsys(struct dumperinfo *); extern uint32_t initial_fpscr; Modified: head/sys/arm/include/vmparam.h ============================================================================== --- head/sys/arm/include/vmparam.h Mon Sep 21 22:19:21 2020 (r365976) +++ head/sys/arm/include/vmparam.h Mon Sep 21 22:20:37 2020 (r365977) @@ -193,4 +193,9 @@ extern vm_offset_t vm_max_kernel_address; #define DEVMAP_MAX_VADDR ARM_VECTORS_HIGH +/* + * Need a page dump array for minidump. + */ +#define MINIDUMP_PAGE_TRACKING 1 + #endif /* _MACHINE_VMPARAM_H_ */ Modified: head/sys/arm64/arm64/minidump_machdep.c ============================================================================== --- head/sys/arm64/arm64/minidump_machdep.c Mon Sep 21 22:19:21 2020 (r365976) +++ head/sys/arm64/arm64/minidump_machdep.c Mon Sep 21 22:20:37 2020 (r365977) @@ -56,9 +56,6 @@ __FBSDID("$FreeBSD$"); CTASSERT(sizeof(struct kerneldumpheader) == 512); -uint64_t *vm_page_dump; -int vm_page_dump_size; - static struct kerneldumpheader kdh; /* Handle chunked writes. */ @@ -68,8 +65,6 @@ static size_t counter, progress, dumpsize; static uint64_t tmpbuffer[Ln_ENTRIES]; -CTASSERT(sizeof(*vm_page_dump) == 8); - static int is_dumpable(vm_paddr_t pa) { @@ -213,9 +208,8 @@ minidumpsys(struct dumperinfo *di) pt_entry_t *l3; vm_offset_t va; vm_paddr_t pa; - uint64_t bits; uint32_t pmapsize; - int bit, error, i, j, retry_count; + int error, i, j, retry_count; retry_count = 0; retry: @@ -255,20 +249,12 @@ minidumpsys(struct dumperinfo *di) /* Calculate dump size. */ dumpsize = pmapsize; dumpsize += round_page(msgbufp->msg_size); - dumpsize += round_page(vm_page_dump_size); - for (i = 0; i < vm_page_dump_size / sizeof(*vm_page_dump); i++) { - bits = vm_page_dump[i]; - while (bits) { - bit = ffsl(bits) - 1; - pa = (((uint64_t)i * sizeof(*vm_page_dump) * NBBY) + - bit) * PAGE_SIZE; - /* Clear out undumpable pages now if needed */ - if (is_dumpable(pa)) - dumpsize += PAGE_SIZE; - else - dump_drop_page(pa); - bits &= ~(1ul << bit); - } + dumpsize += round_page(BITSET_SIZE(vm_page_dump_pages)); + VM_PAGE_DUMP_FOREACH(pa) { + if (is_dumpable(pa)) + dumpsize += PAGE_SIZE; + else + dump_drop_page(pa); } dumpsize += PAGE_SIZE; @@ -279,7 +265,7 @@ minidumpsys(struct dumperinfo *di) strcpy(mdhdr.magic, MINIDUMP_MAGIC); mdhdr.version = MINIDUMP_VERSION; mdhdr.msgbufsize = msgbufp->msg_size; - mdhdr.bitmapsize = vm_page_dump_size; + mdhdr.bitmapsize = round_page(BITSET_SIZE(vm_page_dump_pages)); mdhdr.pmapsize = pmapsize; mdhdr.kernbase = VM_MIN_KERNEL_ADDRESS; mdhdr.dmapphys = DMAP_MIN_PHYSADDR; @@ -311,7 +297,7 @@ minidumpsys(struct dumperinfo *di) /* Dump bitmap */ error = blk_write(di, (char *)vm_page_dump, 0, - round_page(vm_page_dump_size)); + round_page(BITSET_SIZE(vm_page_dump_pages))); if (error) goto fail; @@ -378,17 +364,10 @@ minidumpsys(struct dumperinfo *di) } /* Dump memory chunks */ - for (i = 0; i < vm_page_dump_size / sizeof(*vm_page_dump); i++) { - bits = vm_page_dump[i]; - while (bits) { - bit = ffsl(bits) - 1; - pa = (((uint64_t)i * sizeof(*vm_page_dump) * NBBY) + - bit) * PAGE_SIZE; - error = blk_write(di, 0, pa, PAGE_SIZE); - if (error) - goto fail; - bits &= ~(1ul << bit); - } + VM_PAGE_DUMP_FOREACH(pa) { + error = blk_write(di, 0, pa, PAGE_SIZE); + if (error) + goto fail; } error = blk_flush(di); @@ -423,26 +402,4 @@ fail: } else printf("** DUMP FAILED (ERROR %d) **\n", error); return (error); -} - -void -dump_add_page(vm_paddr_t pa) -{ - int idx, bit; - - pa >>= PAGE_SHIFT; - idx = pa >> 6; /* 2^6 = 64 */ - bit = pa & 63; - atomic_set_long(&vm_page_dump[idx], 1ul << bit); -} - -void -dump_drop_page(vm_paddr_t pa) -{ - int idx, bit; - - pa >>= PAGE_SHIFT; - idx = pa >> 6; /* 2^6 = 64 */ - bit = pa & 63; - atomic_clear_long(&vm_page_dump[idx], 1ul << bit); } Modified: head/sys/arm64/include/md_var.h ============================================================================== --- head/sys/arm64/include/md_var.h Mon Sep 21 22:19:21 2020 (r365976) +++ head/sys/arm64/include/md_var.h Mon Sep 21 22:20:37 2020 (r365977) @@ -36,8 +36,6 @@ extern long Maxmem; extern char sigcode[]; extern int szsigcode; -extern uint64_t *vm_page_dump; -extern int vm_page_dump_size; extern u_long elf_hwcap; extern u_long elf_hwcap2; @@ -45,8 +43,6 @@ struct dumperinfo; extern int busdma_swi_pending; void busdma_swi(void); -void dump_add_page(vm_paddr_t); -void dump_drop_page(vm_paddr_t); int minidumpsys(struct dumperinfo *); void generic_bs_fault(void) __asm(__STRING(generic_bs_fault)); void generic_bs_peek_1(void) __asm(__STRING(generic_bs_peek_1)); Modified: head/sys/arm64/include/vmparam.h ============================================================================== --- head/sys/arm64/include/vmparam.h Mon Sep 21 22:19:21 2020 (r365976) +++ head/sys/arm64/include/vmparam.h Mon Sep 21 22:20:37 2020 (r365977) @@ -243,4 +243,9 @@ extern vm_offset_t init_pt_va; #define DEVMAP_MAX_VADDR VM_MAX_KERNEL_ADDRESS +/* + * Need a page dump array for minidump. + */ +#define MINIDUMP_PAGE_TRACKING 1 + #endif /* !_MACHINE_VMPARAM_H_ */ Modified: head/sys/i386/i386/minidump_machdep.c ============================================================================== --- head/sys/i386/i386/minidump_machdep.c Mon Sep 21 22:19:21 2020 (r365976) +++ head/sys/i386/i386/minidump_machdep.c Mon Sep 21 22:20:37 2020 (r365977) @@ -49,33 +49,6 @@ __FBSDID("$FreeBSD$"); CTASSERT(sizeof(struct kerneldumpheader) == 512); -uint32_t *vm_page_dump; -int vm_page_dump_size; - -CTASSERT(sizeof(*vm_page_dump) == 4); - -void -dump_add_page(vm_paddr_t pa) -{ - int idx, bit; - - pa >>= PAGE_SHIFT; - idx = pa >> 5; /* 2^5 = 32 */ - bit = pa & 31; - atomic_set_int(&vm_page_dump[idx], 1ul << bit); -} - -void -dump_drop_page(vm_paddr_t pa) -{ - int idx, bit; - - pa >>= PAGE_SHIFT; - idx = pa >> 5; /* 2^5 = 32 */ - bit = pa & 31; - atomic_clear_int(&vm_page_dump[idx], 1ul << bit); -} - int minidumpsys(struct dumperinfo *di) { Modified: head/sys/i386/i386/minidump_machdep_base.c ============================================================================== --- head/sys/i386/i386/minidump_machdep_base.c Mon Sep 21 22:19:21 2020 (r365976) +++ head/sys/i386/i386/minidump_machdep_base.c Mon Sep 21 22:20:37 2020 (r365977) @@ -62,8 +62,6 @@ static size_t fragsz; static void *dump_va; static uint64_t counter, progress; -CTASSERT(sizeof(*vm_page_dump) == 4); - static int is_dumpable(vm_paddr_t pa) { @@ -181,11 +179,10 @@ minidumpsys(struct dumperinfo *di) uint32_t ptesize; vm_offset_t va; int error; - uint32_t bits; uint64_t pa; pd_entry_t *pd; pt_entry_t *pt; - int i, j, k, bit; + int j, k; struct minidumphdr mdhdr; counter = 0; @@ -227,19 +224,13 @@ minidumpsys(struct dumperinfo *di) /* Calculate dump size. */ dumpsize = ptesize; dumpsize += round_page(msgbufp->msg_size); - dumpsize += round_page(vm_page_dump_size); - for (i = 0; i < vm_page_dump_size / sizeof(*vm_page_dump); i++) { - bits = vm_page_dump[i]; - while (bits) { - bit = bsfl(bits); - pa = (((uint64_t)i * sizeof(*vm_page_dump) * NBBY) + bit) * PAGE_SIZE; - /* Clear out undumpable pages now if needed */ - if (is_dumpable(pa)) { - dumpsize += PAGE_SIZE; - } else { - dump_drop_page(pa); - } - bits &= ~(1ul << bit); + dumpsize += round_page(BITSET_SIZE(vm_page_dump_pages)); + VM_PAGE_DUMP_FOREACH(pa) { + /* Clear out undumpable pages now if needed */ + if (is_dumpable(pa)) { + dumpsize += PAGE_SIZE; + } else { + dump_drop_page(pa); } } dumpsize += PAGE_SIZE; @@ -251,7 +242,7 @@ minidumpsys(struct dumperinfo *di) strcpy(mdhdr.magic, MINIDUMP_MAGIC); mdhdr.version = MINIDUMP_VERSION; mdhdr.msgbufsize = msgbufp->msg_size; - mdhdr.bitmapsize = vm_page_dump_size; + mdhdr.bitmapsize = round_page(BITSET_SIZE(vm_page_dump_pages)); mdhdr.ptesize = ptesize; mdhdr.kernbase = KERNBASE; mdhdr.paemode = pae_mode; @@ -279,7 +270,8 @@ minidumpsys(struct dumperinfo *di) goto fail; /* Dump bitmap */ - error = blk_write(di, (char *)vm_page_dump, 0, round_page(vm_page_dump_size)); + error = blk_write(di, (char *)vm_page_dump, 0, + round_page(BITSET_SIZE(vm_page_dump_pages))); if (error) goto fail; @@ -321,16 +313,10 @@ minidumpsys(struct dumperinfo *di) } /* Dump memory chunks */ - for (i = 0; i < vm_page_dump_size / sizeof(*vm_page_dump); i++) { - bits = vm_page_dump[i]; - while (bits) { - bit = bsfl(bits); - pa = (((uint64_t)i * sizeof(*vm_page_dump) * NBBY) + bit) * PAGE_SIZE; - error = blk_write(di, 0, pa, PAGE_SIZE); - if (error) - goto fail; - bits &= ~(1ul << bit); - } + VM_PAGE_DUMP_FOREACH(pa) { + error = blk_write(di, 0, pa, PAGE_SIZE); + if (error) + goto fail; } error = blk_flush(di); Modified: head/sys/i386/include/md_var.h ============================================================================== --- head/sys/i386/include/md_var.h Mon Sep 21 22:19:21 2020 (r365976) +++ head/sys/i386/include/md_var.h Mon Sep 21 22:20:37 2020 (r365977) @@ -47,7 +47,6 @@ extern int szfreebsd4_sigcode; extern int szosigcode; extern int sz_lcall_tramp; #endif -extern uint32_t *vm_page_dump; extern vm_offset_t proc0kstack; extern uintptr_t setidt_disp; Modified: head/sys/i386/include/vmparam.h ============================================================================== --- head/sys/i386/include/vmparam.h Mon Sep 21 22:19:21 2020 (r365976) +++ head/sys/i386/include/vmparam.h Mon Sep 21 22:20:37 2020 (r365977) @@ -240,4 +240,9 @@ #define PHYS_TO_DMAP(x) ({ panic("No direct map exists"); 0; }) #define DMAP_TO_PHYS(x) ({ panic("No direct map exists"); 0; }) +/* + * Need a page dump array for minidump. + */ +#define MINIDUMP_PAGE_TRACKING 1 + #endif /* _MACHINE_VMPARAM_H_ */ Modified: head/sys/mips/include/md_var.h ============================================================================== --- head/sys/mips/include/md_var.h Mon Sep 21 22:19:21 2020 (r365976) +++ head/sys/mips/include/md_var.h Mon Sep 21 22:20:37 2020 (r365977) @@ -50,8 +50,6 @@ extern int szsigcode; extern char sigcode32[]; extern int szsigcode32; #endif -extern uint32_t *vm_page_dump; -extern int vm_page_dump_size; extern vm_offset_t kstack0; extern vm_offset_t kernel_kseg0_end; @@ -84,8 +82,6 @@ extern int busdma_swi_pending; void busdma_swi(void); struct dumperinfo; -void dump_add_page(vm_paddr_t); -void dump_drop_page(vm_paddr_t); int minidumpsys(struct dumperinfo *); #endif /* !_MACHINE_MD_VAR_H_ */ Modified: head/sys/mips/include/vmparam.h ============================================================================== --- head/sys/mips/include/vmparam.h Mon Sep 21 22:19:21 2020 (r365976) +++ head/sys/mips/include/vmparam.h Mon Sep 21 22:20:37 2020 (r365977) @@ -197,4 +197,9 @@ #define PHYS_TO_DMAP(x) MIPS_PHYS_TO_DIRECT(x) #define DMAP_TO_PHYS(x) MIPS_DIRECT_TO_PHYS(x) +/* + * Need a page dump array for minidump. + */ +#define MINIDUMP_PAGE_TRACKING 1 + #endif /* !_MACHINE_VMPARAM_H_ */ Modified: head/sys/mips/mips/minidump_machdep.c ============================================================================== --- head/sys/mips/mips/minidump_machdep.c Mon Sep 21 22:19:21 2020 (r365976) +++ head/sys/mips/mips/minidump_machdep.c Mon Sep 21 22:20:37 2020 (r365977) @@ -54,9 +54,6 @@ __FBSDID("$FreeBSD$"); CTASSERT(sizeof(struct kerneldumpheader) == 512); -uint32_t *vm_page_dump; -int vm_page_dump_size; - static struct kerneldumpheader kdh; /* Handle chunked writes. */ @@ -66,8 +63,6 @@ static char tmpbuffer[PAGE_SIZE]; extern pd_entry_t *kernel_segmap; -CTASSERT(sizeof(*vm_page_dump) == 4); - static int is_dumpable(vm_paddr_t pa) { @@ -83,28 +78,6 @@ is_dumpable(vm_paddr_t pa) return (0); } -void -dump_add_page(vm_paddr_t pa) -{ - int idx, bit; - - pa >>= PAGE_SHIFT; - idx = pa >> 5; /* 2^5 = 32 */ - bit = pa & 31; - atomic_set_int(&vm_page_dump[idx], 1ul << bit); -} - -void -dump_drop_page(vm_paddr_t pa) -{ - int idx, bit; - - pa >>= PAGE_SHIFT; - idx = pa >> 5; /* 2^5 = 32 */ - bit = pa & 31; - atomic_clear_int(&vm_page_dump[idx], 1ul << bit); -} - static struct { int min_per; int max_per; @@ -192,13 +165,12 @@ minidumpsys(struct dumperinfo *di) { struct minidumphdr mdhdr; uint32_t ptesize; - uint32_t bits; vm_paddr_t pa; vm_offset_t prev_pte = 0; uint32_t count = 0; vm_offset_t va; pt_entry_t *pte; - int i, bit, error; + int i, error; void *dump_va; /* Flush cache */ @@ -233,20 +205,13 @@ minidumpsys(struct dumperinfo *di) /* Calculate dump size. */ dumpsize = ptesize; dumpsize += round_page(msgbufp->msg_size); - dumpsize += round_page(vm_page_dump_size); - for (i = 0; i < vm_page_dump_size / sizeof(*vm_page_dump); i++) { - bits = vm_page_dump[i]; - while (bits) { - bit = ffs(bits) - 1; - pa = (((uint64_t)i * sizeof(*vm_page_dump) * NBBY) + - bit) * PAGE_SIZE; - /* Clear out undumpable pages now if needed */ - if (is_dumpable(pa)) - dumpsize += PAGE_SIZE; - else - dump_drop_page(pa); - bits &= ~(1ul << bit); - } + dumpsize += round_page(BITSET_SIZE(vm_page_dump_pages)); + VM_PAGE_DUMP_FOREACH(pa) { + /* Clear out undumpable pages now if needed */ + if (is_dumpable(pa)) + dumpsize += PAGE_SIZE; + else + dump_drop_page(pa); } dumpsize += PAGE_SIZE; @@ -257,7 +222,7 @@ minidumpsys(struct dumperinfo *di) strcpy(mdhdr.magic, MINIDUMP_MAGIC); mdhdr.version = MINIDUMP_VERSION; mdhdr.msgbufsize = msgbufp->msg_size; - mdhdr.bitmapsize = vm_page_dump_size; + mdhdr.bitmapsize = round_page(BITSET_SIZE(vm_page_dump_pages)); mdhdr.ptesize = ptesize; mdhdr.kernbase = VM_MIN_KERNEL_ADDRESS; @@ -286,7 +251,7 @@ minidumpsys(struct dumperinfo *di) /* Dump bitmap */ error = write_buffer(di, (char *)vm_page_dump, - round_page(vm_page_dump_size)); + round_page(BITSET_SIZE(vm_page_dump_pages))); if (error) goto fail; @@ -320,19 +285,12 @@ minidumpsys(struct dumperinfo *di) } /* Dump memory chunks page by page*/ - for (i = 0; i < vm_page_dump_size / sizeof(*vm_page_dump); i++) { - bits = vm_page_dump[i]; - while (bits) { - bit = ffs(bits) - 1; - pa = (((uint64_t)i * sizeof(*vm_page_dump) * NBBY) + - bit) * PAGE_SIZE; - dump_va = pmap_kenter_temporary(pa, 0); - error = write_buffer(di, dump_va, PAGE_SIZE); - if (error) - goto fail; - pmap_kenter_temporary_free(pa); - bits &= ~(1ul << bit); - } + VM_PAGE_DUMP_FOREACH(pa) { + dump_va = pmap_kenter_temporary(pa, 0); + error = write_buffer(di, dump_va, PAGE_SIZE); + if (error) + goto fail; + pmap_kenter_temporary_free(pa); } error = dump_finish(di, &kdh); Modified: head/sys/powerpc/include/md_var.h ============================================================================== --- head/sys/powerpc/include/md_var.h Mon Sep 21 22:19:21 2020 (r365976) +++ head/sys/powerpc/include/md_var.h Mon Sep 21 22:20:37 2020 (r365977) @@ -42,14 +42,9 @@ extern int szsigcode32; extern char sigcode64[], sigcode64_elfv2[]; extern int szsigcode64, szsigcode64_elfv2; -extern uint64_t *vm_page_dump; -extern int vm_page_dump_size; - struct dumperinfo; int minidumpsys(struct dumperinfo *); int is_dumpable(vm_paddr_t); -void dump_add_page(vm_paddr_t); -void dump_drop_page(vm_paddr_t); #endif extern long Maxmem; Modified: head/sys/powerpc/include/vmparam.h ============================================================================== --- head/sys/powerpc/include/vmparam.h Mon Sep 21 22:19:21 2020 (r365976) +++ head/sys/powerpc/include/vmparam.h Mon Sep 21 22:20:37 2020 (r365977) @@ -307,6 +307,18 @@ struct pmap_physseg { #define PMAP_HAS_PAGE_ARRAY 1 #endif +#if defined(__powerpc64__) +/* + * Need a page dump array for minidump. + */ +#define MINIDUMP_PAGE_TRACKING 1 +#else +/* + * No minidump with 32-bit powerpc. + */ +#define MINIDUMP_PAGE_TRACKING 0 +#endif + #define PMAP_HAS_DMAP (hw_direct_map) #define PHYS_TO_DMAP(x) ({ \ KASSERT(hw_direct_map, ("Direct map not provided by PMAP")); \ Modified: head/sys/powerpc/powerpc/minidump_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/minidump_machdep.c Mon Sep 21 22:19:21 2020 (r365976) +++ head/sys/powerpc/powerpc/minidump_machdep.c Mon Sep 21 22:20:37 2020 (r365977) @@ -45,16 +45,6 @@ #include #include -/* - * bit to physical address - * - * bm - bitmap - * i - bitmap entry index - * bit - bit number - */ -#define BTOP(bm, i, bit) \ - (((uint64_t)(i) * sizeof(*(bm)) * NBBY + (bit)) * PAGE_SIZE) - /* Debugging stuff */ #define MINIDUMP_DEBUG 0 #if MINIDUMP_DEBUG @@ -70,9 +60,6 @@ static void dump_total(const char *id, size_t sz); extern vm_offset_t __startkernel, __endkernel; -int vm_page_dump_size; -uint64_t *vm_page_dump; - static int dump_retry_count = 5; SYSCTL_INT(_machdep, OID_AUTO, dump_retry_count, CTLFLAG_RWTUN, &dump_retry_count, 0, @@ -103,28 +90,6 @@ static size_t counter, dumpsize, progress; /* Handle chunked writes. */ static size_t fragsz; -void -dump_add_page(vm_paddr_t pa) -{ - int idx, bit; - - pa >>= PAGE_SHIFT; - idx = pa >> 6; /* 2^6 = 64 */ - bit = pa & 63; - atomic_set_long(&vm_page_dump[idx], 1ul << bit); -} - -void -dump_drop_page(vm_paddr_t pa) -{ - int idx, bit; - - pa >>= PAGE_SHIFT; - idx = pa >> 6; /* 2^6 = 64 */ - bit = pa & 63; - atomic_clear_long(&vm_page_dump[idx], 1ul << bit); -} - int is_dumpable(vm_paddr_t pa) { @@ -280,9 +245,8 @@ int minidumpsys(struct dumperinfo *di) { vm_paddr_t pa; - int bit, error, i, retry_count; + int error, i, retry_count; uint32_t pmapsize; - uint64_t bits; struct minidumphdr mdhdr; retry_count = 0; @@ -306,24 +270,14 @@ retry: /* Calculate dump size */ dumpsize = PAGE_SIZE; /* header */ dumpsize += round_page(msgbufp->msg_size); - dumpsize += round_page(vm_page_dump_size); + dumpsize += round_page(BITSET_SIZE(vm_page_dump_pages)); dumpsize += pmapsize; - for (i = 0; i < vm_page_dump_size / sizeof(*vm_page_dump); i++) { - bits = vm_page_dump[i]; - /* TODO optimize with bit manipulation instructions */ - if (bits == 0) - continue; - for (bit = 0; bit < 64; bit++) { - if ((bits & (1ul<msg_size; - mdhdr.bitmapsize = vm_page_dump_size; + mdhdr.bitmapsize = round_page(BITSET_SIZE(vm_page_dump_pages)); mdhdr.pmapsize = pmapsize; mdhdr.kernbase = VM_MIN_KERNEL_ADDRESS; mdhdr.kernend = VM_MAX_SAFE_KERNEL_ADDRESS; @@ -368,10 +322,10 @@ retry: /* Dump bitmap */ error = blk_write(di, (char *)vm_page_dump, 0, - round_page(vm_page_dump_size)); + round_page(BITSET_SIZE(vm_page_dump_pages))); if (error) goto fail; - dump_total("bitmap", round_page(vm_page_dump_size)); + dump_total("bitmap", round_page(BITSET_SIZE(vm_page_dump_pages))); /* Dump kernel page directory pages */ error = dump_pmap(di); @@ -380,20 +334,10 @@ retry: dump_total("pmap", pmapsize); /* Dump memory chunks */ - for (i = 0; i < vm_page_dump_size / sizeof(*vm_page_dump); i++) { - bits = vm_page_dump[i]; - /* TODO optimize with bit manipulation instructions */ - if (bits == 0) - continue; - for (bit = 0; bit < 64; bit++) { - if ((bits & (1ul< Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E1BA53FF00F; Mon, 21 Sep 2020 22:22:04 +0000 (UTC) (envelope-from scottph@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwJp4602Kz41sg; Mon, 21 Sep 2020 22:22:04 +0000 (UTC) (envelope-from scottph@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B044915706; Mon, 21 Sep 2020 22:22:04 +0000 (UTC) (envelope-from scottph@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08LMM4U3057832; Mon, 21 Sep 2020 22:22:04 GMT (envelope-from scottph@FreeBSD.org) Received: (from scottph@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08LMLxME057776; Mon, 21 Sep 2020 22:21:59 GMT (envelope-from scottph@FreeBSD.org) Message-Id: <202009212221.08LMLxME057776@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottph set sender to scottph@FreeBSD.org using -f From: D Scott Phillips Date: Mon, 21 Sep 2020 22:21:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365978 - in head: lib/libkvm sys/amd64/amd64 sys/amd64/include sys/arm/arm sys/arm/include sys/arm64/arm64 sys/arm64/include sys/i386/i386 sys/i386/include sys/mips/include sys/mips/mi... X-SVN-Group: head X-SVN-Commit-Author: scottph X-SVN-Commit-Paths: in head: lib/libkvm sys/amd64/amd64 sys/amd64/include sys/arm/arm sys/arm/include sys/arm64/arm64 sys/arm64/include sys/i386/i386 sys/i386/include sys/mips/include sys/mips/mips sys/powerpc/include sy... X-SVN-Commit-Revision: 365978 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 21 Sep 2020 22:22:04 -0000 Author: scottph Date: Mon Sep 21 22:21:59 2020 New Revision: 365978 URL: https://svnweb.freebsd.org/changeset/base/365978 Log: Sparsify the vm_page_dump bitmap On Ampere Altra systems, the sparse population of RAM within the physical address space causes the vm_page_dump bitmap to be much larger than necessary, increasing the size from ~8 Mib to > 2 Gib (and overflowing `int` for the size). Changing the page dump bitmap also changes the minidump file format, so changes are also necessary in libkvm. Reviewed by: jhb Approved by: scottl (implicit) MFC after: 1 week Sponsored by: Ampere Computing, Inc. Differential Revision: https://reviews.freebsd.org/D26131 Modified: head/lib/libkvm/kvm_minidump_aarch64.c head/lib/libkvm/kvm_minidump_amd64.c head/lib/libkvm/kvm_minidump_arm.c head/lib/libkvm/kvm_minidump_i386.c head/lib/libkvm/kvm_minidump_mips.c head/lib/libkvm/kvm_minidump_powerpc64.c head/lib/libkvm/kvm_minidump_riscv.c head/lib/libkvm/kvm_private.c head/lib/libkvm/kvm_private.h head/sys/amd64/amd64/minidump_machdep.c head/sys/amd64/include/minidump.h head/sys/arm/arm/minidump_machdep.c head/sys/arm/include/minidump.h head/sys/arm64/arm64/minidump_machdep.c head/sys/arm64/include/minidump.h head/sys/i386/i386/minidump_machdep_base.c head/sys/i386/include/minidump.h head/sys/mips/include/minidump.h head/sys/mips/mips/minidump_machdep.c head/sys/powerpc/include/minidump.h head/sys/powerpc/powerpc/minidump_machdep.c head/sys/riscv/include/minidump.h head/sys/riscv/riscv/minidump_machdep.c head/sys/vm/vm_page.c head/sys/vm/vm_page.h head/sys/vm/vm_phys.h Modified: head/lib/libkvm/kvm_minidump_aarch64.c ============================================================================== --- head/lib/libkvm/kvm_minidump_aarch64.c Mon Sep 21 22:20:37 2020 (r365977) +++ head/lib/libkvm/kvm_minidump_aarch64.c Mon Sep 21 22:21:59 2020 (r365978) @@ -82,7 +82,7 @@ static int _aarch64_minidump_initvtop(kvm_t *kd) { struct vmstate *vmst; - off_t off, sparse_off; + off_t off, dump_avail_off, sparse_off; vmst = _kvm_malloc(kd, sizeof(*vmst)); if (vmst == NULL) { @@ -102,7 +102,7 @@ _aarch64_minidump_initvtop(kvm_t *kd) } vmst->hdr.version = le32toh(vmst->hdr.version); - if (vmst->hdr.version != MINIDUMP_VERSION) { + if (vmst->hdr.version != MINIDUMP_VERSION && vmst->hdr.version != 1) { _kvm_err(kd, kd->program, "wrong minidump version. " "Expected %d got %d", MINIDUMP_VERSION, vmst->hdr.version); return (-1); @@ -114,15 +114,21 @@ _aarch64_minidump_initvtop(kvm_t *kd) vmst->hdr.dmapphys = le64toh(vmst->hdr.dmapphys); vmst->hdr.dmapbase = le64toh(vmst->hdr.dmapbase); vmst->hdr.dmapend = le64toh(vmst->hdr.dmapend); + vmst->hdr.dumpavailsize = vmst->hdr.version == MINIDUMP_VERSION ? + le32toh(vmst->hdr.dumpavailsize) : 0; /* Skip header and msgbuf */ - off = AARCH64_PAGE_SIZE + aarch64_round_page(vmst->hdr.msgbufsize); + dump_avail_off = AARCH64_PAGE_SIZE + aarch64_round_page(vmst->hdr.msgbufsize); + /* Skip dump_avail */ + off = dump_avail_off + aarch64_round_page(vmst->hdr.dumpavailsize); + /* build physical address lookup table for sparse pages */ sparse_off = off + aarch64_round_page(vmst->hdr.bitmapsize) + aarch64_round_page(vmst->hdr.pmapsize); - if (_kvm_pt_init(kd, vmst->hdr.bitmapsize, off, sparse_off, - AARCH64_PAGE_SIZE, sizeof(uint64_t)) == -1) { + if (_kvm_pt_init(kd, vmst->hdr.dumpavailsize, dump_avail_off, + vmst->hdr.bitmapsize, off, sparse_off, AARCH64_PAGE_SIZE, + sizeof(uint64_t)) == -1) { return (-1); } off += aarch64_round_page(vmst->hdr.bitmapsize); @@ -257,7 +263,9 @@ _aarch64_minidump_walk_pages(kvm_t *kd, kvm_walk_pages } while (_kvm_bitmap_next(&bm, &bmindex)) { - pa = bmindex * AARCH64_PAGE_SIZE; + pa = _kvm_bit_id_pa(kd, bmindex, AARCH64_PAGE_SIZE); + if (pa == _KVM_PA_INVALID) + break; dva = vm->hdr.dmapbase + pa; if (vm->hdr.dmapend < (dva + AARCH64_PAGE_SIZE)) break; Modified: head/lib/libkvm/kvm_minidump_amd64.c ============================================================================== --- head/lib/libkvm/kvm_minidump_amd64.c Mon Sep 21 22:20:37 2020 (r365977) +++ head/lib/libkvm/kvm_minidump_amd64.c Mon Sep 21 22:21:59 2020 (r365978) @@ -123,7 +123,7 @@ static int _amd64_minidump_initvtop(kvm_t *kd) { struct vmstate *vmst; - off_t off, sparse_off; + off_t off, dump_avail_off, sparse_off; vmst = _kvm_malloc(kd, sizeof(*vmst)); if (vmst == NULL) { @@ -143,10 +143,10 @@ _amd64_minidump_initvtop(kvm_t *kd) /* * NB: amd64 minidump header is binary compatible between version 1 - * and version 2; this may not be the case for the future versions. + * and version 2; version 3 adds the dumpavailsize field */ vmst->hdr.version = le32toh(vmst->hdr.version); - if (vmst->hdr.version != MINIDUMP_VERSION && vmst->hdr.version != 1) { + if (vmst->hdr.version > MINIDUMP_VERSION || vmst->hdr.version < 1) { _kvm_err(kd, kd->program, "wrong minidump version. expected %d got %d", MINIDUMP_VERSION, vmst->hdr.version); return (-1); @@ -157,14 +157,20 @@ _amd64_minidump_initvtop(kvm_t *kd) vmst->hdr.kernbase = le64toh(vmst->hdr.kernbase); vmst->hdr.dmapbase = le64toh(vmst->hdr.dmapbase); vmst->hdr.dmapend = le64toh(vmst->hdr.dmapend); + vmst->hdr.dumpavailsize = vmst->hdr.version == MINIDUMP_VERSION ? + le32toh(vmst->hdr.dumpavailsize) : 0; /* Skip header and msgbuf */ - off = AMD64_PAGE_SIZE + amd64_round_page(vmst->hdr.msgbufsize); + dump_avail_off = AMD64_PAGE_SIZE + amd64_round_page(vmst->hdr.msgbufsize); + /* Skip dump_avail */ + off = dump_avail_off + amd64_round_page(vmst->hdr.dumpavailsize); + sparse_off = off + amd64_round_page(vmst->hdr.bitmapsize) + amd64_round_page(vmst->hdr.pmapsize); - if (_kvm_pt_init(kd, vmst->hdr.bitmapsize, off, sparse_off, - AMD64_PAGE_SIZE, sizeof(uint64_t)) == -1) { + if (_kvm_pt_init(kd, vmst->hdr.dumpavailsize, dump_avail_off, + vmst->hdr.bitmapsize, off, sparse_off, AMD64_PAGE_SIZE, + sizeof(uint64_t)) == -1) { return (-1); } off += amd64_round_page(vmst->hdr.bitmapsize); @@ -372,7 +378,7 @@ _amd64_minidump_walk_pages(kvm_t *kd, kvm_walk_pages_c pa = (pde & AMD64_PG_PS_FRAME) + ((va & AMD64_PDRMASK) ^ VA_OFF(vm, va)); dva = vm->hdr.dmapbase + pa; - _kvm_bitmap_set(&bm, pa, AMD64_PAGE_SIZE); + _kvm_bitmap_set(&bm, _kvm_pa_bit_id(kd, pa, AMD64_PAGE_SIZE)); if (!_kvm_visit_cb(kd, cb, arg, pa, va, dva, _amd64_entry_to_prot(pde), AMD64_NBPDR, pgsz)) { goto out; @@ -392,7 +398,8 @@ _amd64_minidump_walk_pages(kvm_t *kd, kvm_walk_pages_c pa = pte & AMD64_PG_FRAME; dva = vm->hdr.dmapbase + pa; if ((pte & AMD64_PG_V) != 0) { - _kvm_bitmap_set(&bm, pa, AMD64_PAGE_SIZE); + _kvm_bitmap_set(&bm, + _kvm_pa_bit_id(kd, pa, AMD64_PAGE_SIZE)); if (!_kvm_visit_cb(kd, cb, arg, pa, va, dva, _amd64_entry_to_prot(pte), pgsz, 0)) { goto out; @@ -403,7 +410,9 @@ _amd64_minidump_walk_pages(kvm_t *kd, kvm_walk_pages_c } while (_kvm_bitmap_next(&bm, &bmindex)) { - pa = bmindex * AMD64_PAGE_SIZE; + pa = _kvm_bit_id_pa(kd, bmindex, AMD64_PAGE_SIZE); + if (pa == _KVM_PA_INVALID) + break; dva = vm->hdr.dmapbase + pa; if (vm->hdr.dmapend < (dva + pgsz)) break; Modified: head/lib/libkvm/kvm_minidump_arm.c ============================================================================== --- head/lib/libkvm/kvm_minidump_arm.c Mon Sep 21 22:20:37 2020 (r365977) +++ head/lib/libkvm/kvm_minidump_arm.c Mon Sep 21 22:21:59 2020 (r365978) @@ -86,7 +86,7 @@ static int _arm_minidump_initvtop(kvm_t *kd) { struct vmstate *vmst; - off_t off, sparse_off; + off_t off, dump_avail_off, sparse_off; vmst = _kvm_malloc(kd, sizeof(*vmst)); if (vmst == NULL) { @@ -108,7 +108,7 @@ _arm_minidump_initvtop(kvm_t *kd) return (-1); } vmst->hdr.version = _kvm32toh(kd, vmst->hdr.version); - if (vmst->hdr.version != MINIDUMP_VERSION) { + if (vmst->hdr.version != MINIDUMP_VERSION && vmst->hdr.version != 1) { _kvm_err(kd, kd->program, "wrong minidump version. " "Expected %d got %d", MINIDUMP_VERSION, vmst->hdr.version); return (-1); @@ -123,14 +123,20 @@ _arm_minidump_initvtop(kvm_t *kd) /* This is a safe default as 1K pages are not used. */ vmst->hdr.mmuformat = MINIDUMP_MMU_FORMAT_V6; } + vmst->hdr.dumpavailsize = vmst->hdr.version == MINIDUMP_VERSION ? + _kvm32toh(kd, vmst->hdr.dumpavailsize) : 0; /* Skip header and msgbuf */ - off = ARM_PAGE_SIZE + arm_round_page(vmst->hdr.msgbufsize); + dump_avail_off = ARM_PAGE_SIZE + arm_round_page(vmst->hdr.msgbufsize); + /* Skip dump_avail */ + off = dump_avail_off + arm_round_page(vmst->hdr.dumpavailsize); + sparse_off = off + arm_round_page(vmst->hdr.bitmapsize) + arm_round_page(vmst->hdr.ptesize); - if (_kvm_pt_init(kd, vmst->hdr.bitmapsize, off, sparse_off, - ARM_PAGE_SIZE, sizeof(uint32_t)) == -1) { + if (_kvm_pt_init(kd, vmst->hdr.dumpavailsize, dump_avail_off, + vmst->hdr.bitmapsize, off, sparse_off, ARM_PAGE_SIZE, + sizeof(uint32_t)) == -1) { return (-1); } off += arm_round_page(vmst->hdr.bitmapsize); Modified: head/lib/libkvm/kvm_minidump_i386.c ============================================================================== --- head/lib/libkvm/kvm_minidump_i386.c Mon Sep 21 22:20:37 2020 (r365977) +++ head/lib/libkvm/kvm_minidump_i386.c Mon Sep 21 22:21:59 2020 (r365978) @@ -91,7 +91,7 @@ static int _i386_minidump_initvtop(kvm_t *kd) { struct vmstate *vmst; - off_t off, sparse_off; + off_t off, dump_avail_off, sparse_off; vmst = _kvm_malloc(kd, sizeof(*vmst)); if (vmst == NULL) { @@ -109,7 +109,7 @@ _i386_minidump_initvtop(kvm_t *kd) return (-1); } vmst->hdr.version = le32toh(vmst->hdr.version); - if (vmst->hdr.version != MINIDUMP_VERSION) { + if (vmst->hdr.version != MINIDUMP_VERSION && vmst->hdr.version != 1) { _kvm_err(kd, kd->program, "wrong minidump version. expected %d got %d", MINIDUMP_VERSION, vmst->hdr.version); return (-1); @@ -119,14 +119,20 @@ _i386_minidump_initvtop(kvm_t *kd) vmst->hdr.ptesize = le32toh(vmst->hdr.ptesize); vmst->hdr.kernbase = le32toh(vmst->hdr.kernbase); vmst->hdr.paemode = le32toh(vmst->hdr.paemode); + vmst->hdr.dumpavailsize = vmst->hdr.version == MINIDUMP_VERSION ? + le32toh(vmst->hdr.dumpavailsize) : 0; /* Skip header and msgbuf */ - off = I386_PAGE_SIZE + i386_round_page(vmst->hdr.msgbufsize); + dump_avail_off = I386_PAGE_SIZE + i386_round_page(vmst->hdr.msgbufsize); + /* Skip dump_avail */ + off = dump_avail_off + i386_round_page(vmst->hdr.dumpavailsize); + sparse_off = off + i386_round_page(vmst->hdr.bitmapsize) + i386_round_page(vmst->hdr.ptesize); - if (_kvm_pt_init(kd, vmst->hdr.bitmapsize, off, sparse_off, - I386_PAGE_SIZE, sizeof(uint32_t)) == -1) { + if (_kvm_pt_init(kd, vmst->hdr.dumpavailsize, dump_avail_off, + vmst->hdr.bitmapsize, off, sparse_off, I386_PAGE_SIZE, + sizeof(uint32_t)) == -1) { return (-1); } off += i386_round_page(vmst->hdr.bitmapsize); Modified: head/lib/libkvm/kvm_minidump_mips.c ============================================================================== --- head/lib/libkvm/kvm_minidump_mips.c Mon Sep 21 22:20:37 2020 (r365977) +++ head/lib/libkvm/kvm_minidump_mips.c Mon Sep 21 22:21:59 2020 (r365978) @@ -85,7 +85,7 @@ static int _mips_minidump_initvtop(kvm_t *kd) { struct vmstate *vmst; - off_t off, sparse_off; + off_t off, dump_avail_off, sparse_off; vmst = _kvm_malloc(kd, sizeof(*vmst)); if (vmst == NULL) { @@ -113,7 +113,7 @@ _mips_minidump_initvtop(kvm_t *kd) return (-1); } vmst->hdr.version = _kvm32toh(kd, vmst->hdr.version); - if (vmst->hdr.version != MINIDUMP_VERSION) { + if (vmst->hdr.version != MINIDUMP_VERSION && vmst->hdr.version != 1) { _kvm_err(kd, kd->program, "wrong minidump version. " "Expected %d got %d", MINIDUMP_VERSION, vmst->hdr.version); return (-1); @@ -124,14 +124,20 @@ _mips_minidump_initvtop(kvm_t *kd) vmst->hdr.kernbase = _kvm64toh(kd, vmst->hdr.kernbase); vmst->hdr.dmapbase = _kvm64toh(kd, vmst->hdr.dmapbase); vmst->hdr.dmapend = _kvm64toh(kd, vmst->hdr.dmapend); + vmst->hdr.dumpavailsize = vmst->hdr.version == MINIDUMP_VERSION ? + _kvm32toh(kd, vmst->hdr.dumpavailsize) : 0; /* Skip header and msgbuf */ - off = MIPS_PAGE_SIZE + mips_round_page(vmst->hdr.msgbufsize); + dump_avail_off = MIPS_PAGE_SIZE + mips_round_page(vmst->hdr.msgbufsize); + /* Skip dump_avail */ + off = dump_avail_off + mips_round_page(vmst->hdr.dumpavailsize); + sparse_off = off + mips_round_page(vmst->hdr.bitmapsize) + mips_round_page(vmst->hdr.ptesize); - if (_kvm_pt_init(kd, vmst->hdr.bitmapsize, off, sparse_off, - MIPS_PAGE_SIZE, sizeof(uint32_t)) == -1) { + if (_kvm_pt_init(kd, vmst->hdr.dumpavailsize, dump_avail_off, + vmst->hdr.bitmapsize, off, sparse_off, MIPS_PAGE_SIZE, + sizeof(uint32_t)) == -1) { return (-1); } off += mips_round_page(vmst->hdr.bitmapsize); Modified: head/lib/libkvm/kvm_minidump_powerpc64.c ============================================================================== --- head/lib/libkvm/kvm_minidump_powerpc64.c Mon Sep 21 22:20:37 2020 (r365977) +++ head/lib/libkvm/kvm_minidump_powerpc64.c Mon Sep 21 22:21:59 2020 (r365978) @@ -68,7 +68,7 @@ _powerpc64_minidump_initvtop(kvm_t *kd) { struct vmstate *vmst; struct minidumphdr *hdr; - off_t bitmap_off, pmap_off, sparse_off; + off_t dump_avail_off, bitmap_off, pmap_off, sparse_off; const char *mmu_name; /* Alloc VM */ @@ -92,7 +92,7 @@ _powerpc64_minidump_initvtop(kvm_t *kd) } /* Check version */ hdr->version = be32toh(hdr->version); - if (hdr->version != MINIDUMP_VERSION) { + if (hdr->version != MINIDUMP_VERSION && hdr->version != 1) { _kvm_err(kd, kd->program, "wrong minidump version. " "Expected %d got %d", MINIDUMP_VERSION, hdr->version); goto failed; @@ -108,6 +108,8 @@ _powerpc64_minidump_initvtop(kvm_t *kd) hdr->hw_direct_map = be32toh(hdr->hw_direct_map); hdr->startkernel = be64toh(hdr->startkernel); hdr->endkernel = be64toh(hdr->endkernel); + hdr->dumpavailsize = hdr->version == MINIDUMP_VERSION ? + be32toh(hdr->dumpavailsize) : 0; vmst->kimg_start = PPC64_KERNBASE; vmst->kimg_end = PPC64_KERNBASE + hdr->endkernel - hdr->startkernel; @@ -140,7 +142,8 @@ _powerpc64_minidump_initvtop(kvm_t *kd) goto failed; /* Get dump parts' offsets */ - bitmap_off = PPC64_PAGE_SIZE + ppc64_round_page(hdr->msgbufsize); + dump_avail_off = PPC64_PAGE_SIZE + ppc64_round_page(hdr->msgbufsize); + bitmap_off = dump_avail_off + ppc64_round_page(hdr->dumpavailsize); pmap_off = bitmap_off + ppc64_round_page(hdr->bitmapsize); sparse_off = pmap_off + ppc64_round_page(hdr->pmapsize); @@ -151,8 +154,9 @@ _powerpc64_minidump_initvtop(kvm_t *kd) (uintmax_t)pmap_off, (uintmax_t)sparse_off); /* build physical address lookup table for sparse pages */ - if (_kvm_pt_init(kd, hdr->bitmapsize, bitmap_off, sparse_off, - PPC64_PAGE_SIZE, sizeof(uint64_t)) == -1) + if (_kvm_pt_init(kd, hdr->dumpavailsize, dump_avail_off, + hdr->bitmapsize, bitmap_off, sparse_off, PPC64_PAGE_SIZE, + sizeof(uint64_t)) == -1) goto failed; if (_kvm_pmap_init(kd, hdr->pmapsize, pmap_off) == -1) Modified: head/lib/libkvm/kvm_minidump_riscv.c ============================================================================== --- head/lib/libkvm/kvm_minidump_riscv.c Mon Sep 21 22:20:37 2020 (r365977) +++ head/lib/libkvm/kvm_minidump_riscv.c Mon Sep 21 22:21:59 2020 (r365978) @@ -83,7 +83,7 @@ static int _riscv_minidump_initvtop(kvm_t *kd) { struct vmstate *vmst; - off_t off, sparse_off; + off_t off, dump_avail_off, sparse_off; vmst = _kvm_malloc(kd, sizeof(*vmst)); if (vmst == NULL) { @@ -103,7 +103,7 @@ _riscv_minidump_initvtop(kvm_t *kd) } vmst->hdr.version = le32toh(vmst->hdr.version); - if (vmst->hdr.version != MINIDUMP_VERSION) { + if (vmst->hdr.version != MINIDUMP_VERSION && vmst->hdr.version != 1) { _kvm_err(kd, kd->program, "wrong minidump version. " "Expected %d got %d", MINIDUMP_VERSION, vmst->hdr.version); return (-1); @@ -115,15 +115,21 @@ _riscv_minidump_initvtop(kvm_t *kd) vmst->hdr.dmapphys = le64toh(vmst->hdr.dmapphys); vmst->hdr.dmapbase = le64toh(vmst->hdr.dmapbase); vmst->hdr.dmapend = le64toh(vmst->hdr.dmapend); + vmst->hdr.dumpavailsize = vmst->hdr.version == MINIDUMP_VERSION ? + le32toh(vmst->hdr.dumpavailsize) : 0; /* Skip header and msgbuf */ - off = RISCV_PAGE_SIZE + riscv_round_page(vmst->hdr.msgbufsize); + dump_avail_off = RISCV_PAGE_SIZE + riscv_round_page(vmst->hdr.msgbufsize); + /* Skip dump_avail */ + off = dump_avail_off + riscv_round_page(vmst->hdr.dumpavailsize); + /* build physical address lookup table for sparse pages */ sparse_off = off + riscv_round_page(vmst->hdr.bitmapsize) + riscv_round_page(vmst->hdr.pmapsize); - if (_kvm_pt_init(kd, vmst->hdr.bitmapsize, off, sparse_off, - RISCV_PAGE_SIZE, sizeof(uint64_t)) == -1) { + if (_kvm_pt_init(kd, vmst->hdr.dumpavailsize, dump_avail_off, + vmst->hdr.bitmapsize, off, sparse_off, RISCV_PAGE_SIZE, + sizeof(uint64_t)) == -1) { return (-1); } off += riscv_round_page(vmst->hdr.bitmapsize); @@ -258,7 +264,9 @@ _riscv_minidump_walk_pages(kvm_t *kd, kvm_walk_pages_c } while (_kvm_bitmap_next(&bm, &bmindex)) { - pa = bmindex * RISCV_PAGE_SIZE; + pa = _kvm_bit_id_pa(kd, bmindex, RISCV_PAGE_SIZE); + if (pa == _KVM_PA_INVALID) + break; dva = vm->hdr.dmapbase + pa; if (vm->hdr.dmapend < (dva + RISCV_PAGE_SIZE)) break; Modified: head/lib/libkvm/kvm_private.c ============================================================================== --- head/lib/libkvm/kvm_private.c Mon Sep 21 22:20:37 2020 (r365977) +++ head/lib/libkvm/kvm_private.c Mon Sep 21 22:21:59 2020 (r365978) @@ -290,8 +290,9 @@ _kvm_map_get(kvm_t *kd, u_long pa, unsigned int page_s } int -_kvm_pt_init(kvm_t *kd, size_t map_len, off_t map_off, off_t sparse_off, - int page_size, int word_size) +_kvm_pt_init(kvm_t *kd, size_t dump_avail_size, off_t dump_avail_off, + size_t map_len, off_t map_off, off_t sparse_off, int page_size, + int word_size) { uint64_t *addr; uint32_t *popcount_bin; @@ -299,6 +300,27 @@ _kvm_pt_init(kvm_t *kd, size_t map_len, off_t map_off, uint64_t pc_bins, res; ssize_t rd; + kd->dump_avail_size = dump_avail_size; + if (dump_avail_size > 0) { + kd->dump_avail = mmap(NULL, kd->dump_avail_size, PROT_READ, + MAP_PRIVATE, kd->pmfd, dump_avail_off); + } else { + /* + * Older version minidumps don't provide dump_avail[], + * so the bitmap is fully populated from 0 to + * last_pa. Create an implied dump_avail that + * expresses this. + */ + kd->dump_avail = calloc(4, word_size); + if (word_size == sizeof(uint32_t)) { + ((uint32_t *)kd->dump_avail)[1] = _kvm32toh(kd, + map_len * 8 * page_size); + } else { + kd->dump_avail[1] = _kvm64toh(kd, + map_len * 8 * page_size); + } + } + /* * Map the bitmap specified by the arguments. */ @@ -394,6 +416,55 @@ _kvm_pmap_init(kvm_t *kd, uint32_t pmap_size, off_t pm return (0); } +static inline uint64_t +dump_avail_n(kvm_t *kd, long i) +{ + uint32_t *d32; + + if (kd->pt_word_size == sizeof(uint32_t)) { + d32 = (uint32_t *)kd->dump_avail; + return (_kvm32toh(kd, d32[i])); + } else + return (_kvm64toh(kd, kd->dump_avail[i])); +} + +uint64_t +_kvm_pa_bit_id(kvm_t *kd, uint64_t pa, unsigned int page_size) +{ + uint64_t adj; + long i; + + adj = 0; + for (i = 0; dump_avail_n(kd, i + 1) != 0; i += 2) { + if (pa >= dump_avail_n(kd, i + 1)) { + adj += howmany(dump_avail_n(kd, i + 1), page_size) - + dump_avail_n(kd, i) / page_size; + } else { + return (pa / page_size - + dump_avail_n(kd, i) / page_size + adj); + } + } + return (_KVM_BIT_ID_INVALID); +} + +uint64_t +_kvm_bit_id_pa(kvm_t *kd, uint64_t bit_id, unsigned int page_size) +{ + uint64_t sz; + long i; + + for (i = 0; dump_avail_n(kd, i + 1) != 0; i += 2) { + sz = howmany(dump_avail_n(kd, i + 1), page_size) - + dump_avail_n(kd, i) / page_size; + if (bit_id < sz) { + return (rounddown2(dump_avail_n(kd, i), page_size) + + bit_id * page_size); + } + bit_id -= sz; + } + return (_KVM_PA_INVALID); +} + /* * Find the offset for the given physical page address; returns -1 otherwise. * @@ -412,7 +483,7 @@ off_t _kvm_pt_find(kvm_t *kd, uint64_t pa, unsigned int page_size) { uint64_t *bitmap = kd->pt_map; - uint64_t pte_bit_id = pa / page_size; + uint64_t pte_bit_id = _kvm_pa_bit_id(kd, pa, page_size); uint64_t pte_u64 = pte_bit_id / BITS_IN(*bitmap); uint64_t popcount_id = pte_bit_id / POPCOUNT_BITS; uint64_t pte_mask = 1ULL << (pte_bit_id % BITS_IN(*bitmap)); @@ -420,7 +491,8 @@ _kvm_pt_find(kvm_t *kd, uint64_t pa, unsigned int page uint32_t count; /* Check whether the page address requested is in the dump. */ - if (pte_bit_id >= (kd->pt_map_size * NBBY) || + if (pte_bit_id == _KVM_BIT_ID_INVALID || + pte_bit_id >= (kd->pt_map_size * NBBY) || (bitmap[pte_u64] & pte_mask) == 0) return (-1); @@ -714,12 +786,12 @@ _kvm_bitmap_init(struct kvm_bitmap *bm, u_long bitmaps } void -_kvm_bitmap_set(struct kvm_bitmap *bm, u_long pa, unsigned int page_size) +_kvm_bitmap_set(struct kvm_bitmap *bm, u_long bm_index) { - u_long bm_index = pa / page_size; uint8_t *byte = &bm->map[bm_index / 8]; - *byte |= (1UL << (bm_index % 8)); + if (bm_index / 8 < bm->size) + *byte |= (1UL << (bm_index % 8)); } int Modified: head/lib/libkvm/kvm_private.h ============================================================================== --- head/lib/libkvm/kvm_private.h Mon Sep 21 22:20:37 2020 (r365977) +++ head/lib/libkvm/kvm_private.h Mon Sep 21 22:21:59 2020 (r365978) @@ -106,6 +106,8 @@ struct __kvm { /* Page table lookup structures. */ uint64_t *pt_map; size_t pt_map_size; + uint64_t *dump_avail; /* actually word sized */ + size_t dump_avail_size; off_t pt_sparse_off; uint64_t pt_sparse_size; uint32_t *pt_popcounts; @@ -152,8 +154,13 @@ _kvm64toh(kvm_t *kd, uint64_t val) return (be64toh(val)); } +uint64_t _kvm_pa_bit_id(kvm_t *kd, uint64_t pa, unsigned int page_size); +uint64_t _kvm_bit_id_pa(kvm_t *kd, uint64_t bit_id, unsigned int page_size); +#define _KVM_PA_INVALID ULONG_MAX +#define _KVM_BIT_ID_INVALID ULONG_MAX + int _kvm_bitmap_init(struct kvm_bitmap *, u_long, u_long *); -void _kvm_bitmap_set(struct kvm_bitmap *, u_long, unsigned int); +void _kvm_bitmap_set(struct kvm_bitmap *, u_long); int _kvm_bitmap_next(struct kvm_bitmap *, u_long *); void _kvm_bitmap_deinit(struct kvm_bitmap *); @@ -173,7 +180,7 @@ kvaddr_t _kvm_dpcpu_validaddr(kvm_t *, kvaddr_t); int _kvm_probe_elf_kernel(kvm_t *, int, int); int _kvm_is_minidump(kvm_t *); int _kvm_read_core_phdrs(kvm_t *, size_t *, GElf_Phdr **); -int _kvm_pt_init(kvm_t *, size_t, off_t, off_t, int, int); +int _kvm_pt_init(kvm_t *, size_t, off_t, size_t, off_t, off_t, int, int); off_t _kvm_pt_find(kvm_t *, uint64_t, unsigned int); int _kvm_visit_cb(kvm_t *, kvm_walk_pages_cb_t *, void *, u_long, u_long, u_long, vm_prot_t, size_t, unsigned int); Modified: head/sys/amd64/amd64/minidump_machdep.c ============================================================================== --- head/sys/amd64/amd64/minidump_machdep.c Mon Sep 21 22:20:37 2020 (r365977) +++ head/sys/amd64/amd64/minidump_machdep.c Mon Sep 21 22:21:59 2020 (r365978) @@ -299,6 +299,7 @@ minidumpsys(struct dumperinfo *di) /* Calculate dump size. */ dumpsize = pmapsize; dumpsize += round_page(msgbufp->msg_size); + dumpsize += round_page(sizeof(dump_avail)); dumpsize += round_page(BITSET_SIZE(vm_page_dump_pages)); VM_PAGE_DUMP_FOREACH(pa) { /* Clear out undumpable pages now if needed */ @@ -322,6 +323,7 @@ minidumpsys(struct dumperinfo *di) mdhdr.kernbase = VM_MIN_KERNEL_ADDRESS; mdhdr.dmapbase = DMAP_MIN_ADDRESS; mdhdr.dmapend = DMAP_MAX_ADDRESS; + mdhdr.dumpavailsize = round_page(sizeof(dump_avail)); dump_init_header(di, &kdh, KERNELDUMPMAGIC, KERNELDUMP_AMD64_VERSION, dumpsize); @@ -342,6 +344,15 @@ minidumpsys(struct dumperinfo *di) /* Dump msgbuf up front */ error = blk_write(di, (char *)msgbufp->msg_ptr, 0, round_page(msgbufp->msg_size)); + if (error) + goto fail; + + /* Dump dump_avail */ + _Static_assert(sizeof(dump_avail) <= sizeof(fakepd), + "Large dump_avail not handled"); + bzero(&fakepd, sizeof(fakepd)); + memcpy(fakepd, dump_avail, sizeof(dump_avail)); + error = blk_write(di, (char *)fakepd, 0, PAGE_SIZE); if (error) goto fail; Modified: head/sys/amd64/include/minidump.h ============================================================================== --- head/sys/amd64/include/minidump.h Mon Sep 21 22:20:37 2020 (r365977) +++ head/sys/amd64/include/minidump.h Mon Sep 21 22:21:59 2020 (r365978) @@ -32,7 +32,7 @@ #define _MACHINE_MINIDUMP_H_ 1 #define MINIDUMP_MAGIC "minidump FreeBSD/amd64" -#define MINIDUMP_VERSION 2 +#define MINIDUMP_VERSION 3 struct minidumphdr { char magic[24]; @@ -43,6 +43,7 @@ struct minidumphdr { uint64_t kernbase; uint64_t dmapbase; uint64_t dmapend; + uint32_t dumpavailsize; }; #endif /* _MACHINE_MINIDUMP_H_ */ Modified: head/sys/arm/arm/minidump_machdep.c ============================================================================== --- head/sys/arm/arm/minidump_machdep.c Mon Sep 21 22:20:37 2020 (r365977) +++ head/sys/arm/arm/minidump_machdep.c Mon Sep 21 22:21:59 2020 (r365978) @@ -206,6 +206,7 @@ minidumpsys(struct dumperinfo *di) /* Calculate dump size. */ dumpsize = ptesize; dumpsize += round_page(msgbufp->msg_size); + dumpsize += round_page(sizeof(dump_avail)); dumpsize += round_page(BITSET_SIZE(vm_page_dump_pages)); VM_PAGE_DUMP_FOREACH(pa) { /* Clear out undumpable pages now if needed */ @@ -232,6 +233,7 @@ minidumpsys(struct dumperinfo *di) #else mdhdr.mmuformat = MINIDUMP_MMU_FORMAT_V4; #endif + mdhdr.dumpavailsize = round_page(sizeof(dump_avail)); dump_init_header(di, &kdh, KERNELDUMPMAGIC, KERNELDUMP_ARM_VERSION, dumpsize); @@ -252,6 +254,15 @@ minidumpsys(struct dumperinfo *di) /* Dump msgbuf up front */ error = blk_write(di, (char *)msgbufp->msg_ptr, 0, round_page(msgbufp->msg_size)); + if (error) + goto fail; + + /* Dump dump_avail */ + _Static_assert(sizeof(dump_avail) <= sizeof(dumpbuf), + "Large dump_avail not handled"); + bzero(dumpbuf, sizeof(dumpbuf)); + memcpy(dumpbuf, dump_avail, sizeof(dump_avail)); + error = blk_write(di, dumpbuf, 0, PAGE_SIZE); if (error) goto fail; Modified: head/sys/arm/include/minidump.h ============================================================================== --- head/sys/arm/include/minidump.h Mon Sep 21 22:20:37 2020 (r365977) +++ head/sys/arm/include/minidump.h Mon Sep 21 22:21:59 2020 (r365978) @@ -33,7 +33,7 @@ #define _MACHINE_MINIDUMP_H_ #define MINIDUMP_MAGIC "minidump FreeBSD/arm" -#define MINIDUMP_VERSION 1 +#define MINIDUMP_VERSION 2 /* * The first page of vmcore is dedicated to the following header. @@ -51,6 +51,7 @@ struct minidumphdr { uint32_t kernbase; uint32_t arch; uint32_t mmuformat; + uint32_t dumpavailsize; }; #define MINIDUMP_MMU_FORMAT_UNKNOWN 0 Modified: head/sys/arm64/arm64/minidump_machdep.c ============================================================================== --- head/sys/arm64/arm64/minidump_machdep.c Mon Sep 21 22:20:37 2020 (r365977) +++ head/sys/arm64/arm64/minidump_machdep.c Mon Sep 21 22:21:59 2020 (r365978) @@ -249,6 +249,7 @@ minidumpsys(struct dumperinfo *di) /* Calculate dump size. */ dumpsize = pmapsize; dumpsize += round_page(msgbufp->msg_size); + dumpsize += round_page(sizeof(dump_avail)); dumpsize += round_page(BITSET_SIZE(vm_page_dump_pages)); VM_PAGE_DUMP_FOREACH(pa) { if (is_dumpable(pa)) @@ -271,6 +272,7 @@ minidumpsys(struct dumperinfo *di) mdhdr.dmapphys = DMAP_MIN_PHYSADDR; mdhdr.dmapbase = DMAP_MIN_ADDRESS; mdhdr.dmapend = DMAP_MAX_ADDRESS; + mdhdr.dumpavailsize = round_page(sizeof(dump_avail)); dump_init_header(di, &kdh, KERNELDUMPMAGIC, KERNELDUMP_AARCH64_VERSION, dumpsize); @@ -292,6 +294,15 @@ minidumpsys(struct dumperinfo *di) /* Dump msgbuf up front */ error = blk_write(di, (char *)msgbufp->msg_ptr, 0, round_page(msgbufp->msg_size)); + if (error) + goto fail; + + /* Dump dump_avail */ + _Static_assert(sizeof(dump_avail) <= sizeof(tmpbuffer), + "Large dump_avail not handled"); + bzero(tmpbuffer, sizeof(tmpbuffer)); + memcpy(tmpbuffer, dump_avail, sizeof(dump_avail)); + error = blk_write(di, (char *)&tmpbuffer, 0, PAGE_SIZE); if (error) goto fail; Modified: head/sys/arm64/include/minidump.h ============================================================================== --- head/sys/arm64/include/minidump.h Mon Sep 21 22:20:37 2020 (r365977) +++ head/sys/arm64/include/minidump.h Mon Sep 21 22:21:59 2020 (r365978) @@ -31,7 +31,7 @@ #define _MACHINE_MINIDUMP_H_ 1 #define MINIDUMP_MAGIC "minidump FreeBSD/arm64" -#define MINIDUMP_VERSION 1 +#define MINIDUMP_VERSION 2 struct minidumphdr { char magic[24]; @@ -43,6 +43,7 @@ struct minidumphdr { uint64_t dmapphys; uint64_t dmapbase; uint64_t dmapend; + uint32_t dumpavailsize; }; #endif /* _MACHINE_MINIDUMP_H_ */ Modified: head/sys/i386/i386/minidump_machdep_base.c ============================================================================== --- head/sys/i386/i386/minidump_machdep_base.c Mon Sep 21 22:20:37 2020 (r365977) +++ head/sys/i386/i386/minidump_machdep_base.c Mon Sep 21 22:21:59 2020 (r365978) @@ -224,6 +224,7 @@ minidumpsys(struct dumperinfo *di) /* Calculate dump size. */ dumpsize = ptesize; dumpsize += round_page(msgbufp->msg_size); + dumpsize += round_page(sizeof(dump_avail)); dumpsize += round_page(BITSET_SIZE(vm_page_dump_pages)); VM_PAGE_DUMP_FOREACH(pa) { /* Clear out undumpable pages now if needed */ @@ -246,6 +247,7 @@ minidumpsys(struct dumperinfo *di) mdhdr.ptesize = ptesize; mdhdr.kernbase = KERNBASE; mdhdr.paemode = pae_mode; + mdhdr.dumpavailsize = round_page(sizeof(dump_avail)); dump_init_header(di, &kdh, KERNELDUMPMAGIC, KERNELDUMP_I386_VERSION, dumpsize); @@ -266,6 +268,15 @@ minidumpsys(struct dumperinfo *di) /* Dump msgbuf up front */ error = blk_write(di, (char *)msgbufp->msg_ptr, 0, round_page(msgbufp->msg_size)); + if (error) + goto fail; + + /* Dump dump_avail */ + _Static_assert(sizeof(dump_avail) <= sizeof(fakept), + "Large dump_avail not handled"); + bzero(fakept, sizeof(fakept)); + memcpy(fakept, dump_avail, sizeof(dump_avail)); + error = blk_write(di, (char *)&fakept, 0, PAGE_SIZE); if (error) goto fail; Modified: head/sys/i386/include/minidump.h ============================================================================== --- head/sys/i386/include/minidump.h Mon Sep 21 22:20:37 2020 (r365977) +++ head/sys/i386/include/minidump.h Mon Sep 21 22:21:59 2020 (r365978) @@ -32,7 +32,7 @@ #define _MACHINE_MINIDUMP_H_ 1 #define MINIDUMP_MAGIC "minidump FreeBSD/i386" -#define MINIDUMP_VERSION 1 +#define MINIDUMP_VERSION 2 struct minidumphdr { char magic[24]; @@ -42,6 +42,7 @@ struct minidumphdr { uint32_t ptesize; uint32_t kernbase; uint32_t paemode; + uint32_t dumpavailsize; }; #endif /* _MACHINE_MINIDUMP_H_ */ Modified: head/sys/mips/include/minidump.h ============================================================================== --- head/sys/mips/include/minidump.h Mon Sep 21 22:20:37 2020 (r365977) +++ head/sys/mips/include/minidump.h Mon Sep 21 22:21:59 2020 (r365978) @@ -32,7 +32,7 @@ #define _MACHINE_MINIDUMP_H_ 1 #define MINIDUMP_MAGIC "minidump FreeBSD/mips" -#define MINIDUMP_VERSION 1 +#define MINIDUMP_VERSION 2 struct minidumphdr { char magic[24]; @@ -43,6 +43,7 @@ struct minidumphdr { uint64_t kernbase; uint64_t dmapbase; uint64_t dmapend; + uint32_t dumpavailsize; }; #endif /* _MACHINE_MINIDUMP_H_ */ Modified: head/sys/mips/mips/minidump_machdep.c ============================================================================== --- head/sys/mips/mips/minidump_machdep.c Mon Sep 21 22:20:37 2020 (r365977) +++ head/sys/mips/mips/minidump_machdep.c Mon Sep 21 22:21:59 2020 (r365978) @@ -205,6 +205,7 @@ minidumpsys(struct dumperinfo *di) /* Calculate dump size. */ dumpsize = ptesize; dumpsize += round_page(msgbufp->msg_size); + dumpsize += round_page(sizeof(dump_avail)); dumpsize += round_page(BITSET_SIZE(vm_page_dump_pages)); VM_PAGE_DUMP_FOREACH(pa) { /* Clear out undumpable pages now if needed */ @@ -225,6 +226,7 @@ minidumpsys(struct dumperinfo *di) mdhdr.bitmapsize = round_page(BITSET_SIZE(vm_page_dump_pages)); mdhdr.ptesize = ptesize; mdhdr.kernbase = VM_MIN_KERNEL_ADDRESS; + mdhdr.dumpavailsize = round_page(sizeof(dump_avail)); dump_init_header(di, &kdh, KERNELDUMPMAGIC, KERNELDUMP_MIPS_VERSION, dumpsize); @@ -246,6 +248,15 @@ minidumpsys(struct dumperinfo *di) /* Dump msgbuf up front */ error = write_buffer(di, (char *)msgbufp->msg_ptr, round_page(msgbufp->msg_size)); + if (error) + goto fail; + + /* Dump dump_avail */ + _Static_assert(sizeof(dump_avail) <= sizeof(tmpbuffer), + "Large dump_avail not handled"); + bzero(tmpbuffer, sizeof(tmpbuffer)); + memcpy(tmpbuffer, dump_avail, sizeof(dump_avail)); + error = write_buffer(di, tmpbuffer, PAGE_SIZE); if (error) goto fail; Modified: head/sys/powerpc/include/minidump.h ============================================================================== --- head/sys/powerpc/include/minidump.h Mon Sep 21 22:20:37 2020 (r365977) +++ head/sys/powerpc/include/minidump.h Mon Sep 21 22:21:59 2020 (r365978) @@ -31,7 +31,7 @@ #define _MACHINE_MINIDUMP_H_ 1 #define MINIDUMP_MAGIC "minidump FreeBSD/powerpc64" -#define MINIDUMP_VERSION 1 +#define MINIDUMP_VERSION 2 struct minidumphdr { char magic[32]; @@ -47,6 +47,7 @@ struct minidumphdr { int hw_direct_map; uint64_t startkernel; uint64_t endkernel; + uint32_t dumpavailsize; }; #endif /* _MACHINE_MINIDUMP_H_ */ Modified: head/sys/powerpc/powerpc/minidump_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/minidump_machdep.c Mon Sep 21 22:20:37 2020 (r365977) +++ head/sys/powerpc/powerpc/minidump_machdep.c Mon Sep 21 22:21:59 2020 (r365978) @@ -270,6 +270,7 @@ retry: /* Calculate dump size */ dumpsize = PAGE_SIZE; /* header */ dumpsize += round_page(msgbufp->msg_size); + dumpsize += round_page(sizeof(dump_avail)); dumpsize += round_page(BITSET_SIZE(vm_page_dump_pages)); dumpsize += pmapsize; VM_PAGE_DUMP_FOREACH(pa) { @@ -296,6 +297,7 @@ retry: mdhdr.hw_direct_map = hw_direct_map; mdhdr.startkernel = __startkernel; mdhdr.endkernel = __endkernel; + mdhdr.dumpavailsize = round_page(sizeof(dump_avail)); dump_init_header(di, &kdh, KERNELDUMPMAGIC, KERNELDUMP_POWERPC_VERSION, dumpsize); @@ -319,6 +321,16 @@ retry: error = blk_write(di, (char *)msgbufp->msg_ptr, 0, round_page(msgbufp->msg_size)); dump_total("msgbuf", round_page(msgbufp->msg_size)); + + /* Dump dump_avail */ + _Static_assert(sizeof(dump_avail) <= sizeof(pgbuf), + "Large dump_avail not handled"); + bzero(pgbuf, sizeof(mdhdr)); + memcpy(pgbuf, dump_avail, sizeof(dump_avail)); + error = blk_write(di, pgbuf, 0, PAGE_SIZE); + if (error) + goto fail; + dump_total("dump_avail", round_page(sizeof(dump_avail))); /* Dump bitmap */ error = blk_write(di, (char *)vm_page_dump, 0, Modified: head/sys/riscv/include/minidump.h ============================================================================== --- head/sys/riscv/include/minidump.h Mon Sep 21 22:20:37 2020 (r365977) +++ head/sys/riscv/include/minidump.h Mon Sep 21 22:21:59 2020 (r365978) @@ -31,7 +31,7 @@ #define _MACHINE_MINIDUMP_H_ 1 #define MINIDUMP_MAGIC "minidump FreeBSD/riscv" -#define MINIDUMP_VERSION 1 +#define MINIDUMP_VERSION 2 struct minidumphdr { char magic[24]; @@ -43,6 +43,7 @@ struct minidumphdr { uint64_t dmapphys; uint64_t dmapbase; uint64_t dmapend; + uint32_t dumpavailsize; }; #endif /* _MACHINE_MINIDUMP_H_ */ Modified: head/sys/riscv/riscv/minidump_machdep.c ============================================================================== --- head/sys/riscv/riscv/minidump_machdep.c Mon Sep 21 22:20:37 2020 (r365977) +++ head/sys/riscv/riscv/minidump_machdep.c Mon Sep 21 22:21:59 2020 (r365978) @@ -257,6 +257,7 @@ retry: /* Calculate dump size */ dumpsize = pmapsize; dumpsize += round_page(msgbufp->msg_size); + dumpsize += round_page(sizeof(dump_avail)); dumpsize += round_page(BITSET_SIZE(vm_page_dump_pages)); VM_PAGE_DUMP_FOREACH(pa) { /* Clear out undumpable pages now if needed */ @@ -280,6 +281,7 @@ retry: mdhdr.dmapphys = DMAP_MIN_PHYSADDR; mdhdr.dmapbase = DMAP_MIN_ADDRESS; mdhdr.dmapend = DMAP_MAX_ADDRESS; + mdhdr.dumpavailsize = round_page(sizeof(dump_avail)); dump_init_header(di, &kdh, KERNELDUMPMAGIC, KERNELDUMP_RISCV_VERSION, dumpsize); @@ -301,6 +303,15 @@ retry: /* Dump msgbuf up front */ error = blk_write(di, (char *)msgbufp->msg_ptr, 0, round_page(msgbufp->msg_size)); + if (error) + goto fail; + + /* Dump dump_avail */ + _Static_assert(sizeof(dump_avail) <= sizeof(tmpbuffer), + "Large dump_avail not handled"); + bzero(tmpbuffer, sizeof(tmpbuffer)); + memcpy(tmpbuffer, dump_avail, sizeof(dump_avail)); + error = blk_write(di, (char *)&tmpbuffer, 0, PAGE_SIZE); if (error) goto fail; Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Mon Sep 21 22:20:37 2020 (r365977) +++ head/sys/vm/vm_page.c Mon Sep 21 22:21:59 2020 (r365978) @@ -607,10 +607,13 @@ vm_page_startup(vm_offset_t vaddr) * included should the sf_buf code decide to use them. */ last_pa = 0; - for (i = 0; dump_avail[i + 1] != 0; i += 2) + vm_page_dump_pages = 0; + for (i = 0; dump_avail[i + 1] != 0; i += 2) { + vm_page_dump_pages += howmany(dump_avail[i + 1], PAGE_SIZE) - + dump_avail[i] / PAGE_SIZE; if (dump_avail[i + 1] > last_pa) last_pa = dump_avail[i + 1]; - vm_page_dump_pages = last_pa / PAGE_SIZE; + } vm_page_dump_size = round_page(BITSET_SIZE(vm_page_dump_pages)); new_end -= vm_page_dump_size; vm_page_dump = (void *)(uintptr_t)pmap_map(&vaddr, new_end, Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Mon Sep 21 22:20:37 2020 (r365977) +++ head/sys/vm/vm_page.h Mon Sep 21 22:21:59 2020 (r365978) @@ -589,22 +589,65 @@ malloc2vm_flags(int malloc_flags) extern struct bitset *vm_page_dump; extern long vm_page_dump_pages; +extern vm_paddr_t dump_avail[]; static inline void dump_add_page(vm_paddr_t pa) { - BIT_SET_ATOMIC(vm_page_dump_pages, pa >> PAGE_SHIFT, vm_page_dump); + vm_pindex_t adj; + int i; + + adj = 0; + for (i = 0; dump_avail[i + 1] != 0; i += 2) { + if (pa >= dump_avail[i] && pa < dump_avail[i + 1]) { + BIT_SET_ATOMIC(vm_page_dump_pages, + (pa >> PAGE_SHIFT) - (dump_avail[i] >> PAGE_SHIFT) + + adj, vm_page_dump); + return; + } + adj += howmany(dump_avail[i + 1], PAGE_SIZE) - + dump_avail[i] / PAGE_SIZE; + } } static inline void dump_drop_page(vm_paddr_t pa) { - BIT_CLR_ATOMIC(vm_page_dump_pages, pa >> PAGE_SHIFT, vm_page_dump); + vm_pindex_t adj; + int i; + + adj = 0; + for (i = 0; dump_avail[i + 1] != 0; i += 2) { + if (pa >= dump_avail[i] && pa < dump_avail[i + 1]) { + BIT_CLR_ATOMIC(vm_page_dump_pages, + (pa >> PAGE_SHIFT) - (dump_avail[i] >> PAGE_SHIFT) + + adj, vm_page_dump); + return; + } + adj += howmany(dump_avail[i + 1], PAGE_SIZE) - + dump_avail[i] / PAGE_SIZE; + } } +static inline vm_paddr_t +vm_page_dump_index_to_pa(int bit) +{ + int i, tot; + + for (i = 0; dump_avail[i + 1] != 0; i += 2) { + tot = howmany(dump_avail[i + 1], PAGE_SIZE) - + dump_avail[i] / PAGE_SIZE; + if (bit < tot) + return ((vm_paddr_t)bit * PAGE_SIZE + + dump_avail[i] & ~PAGE_MASK); + bit -= tot; + } + return ((vm_paddr_t)NULL); +} + #define VM_PAGE_DUMP_FOREACH(pa) \ for (vm_pindex_t __b = BIT_FFS(vm_page_dump_pages, vm_page_dump); \ - (pa) = (__b - 1) * PAGE_SIZE, __b != 0; \ + (pa) = vm_page_dump_index_to_pa(__b - 1), __b != 0; \ __b = BIT_FFS_AT(vm_page_dump_pages, vm_page_dump, __b)) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Mon Sep 21 22:22:54 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 03BEE3FF19E; Mon, 21 Sep 2020 22:22:54 +0000 (UTC) (envelope-from scottph@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwJq16M7tz42B0; Mon, 21 Sep 2020 22:22:53 +0000 (UTC) (envelope-from scottph@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BBCD5156E8; Mon, 21 Sep 2020 22:22:53 +0000 (UTC) (envelope-from scottph@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08LMMrt2059917; Mon, 21 Sep 2020 22:22:53 GMT (envelope-from scottph@FreeBSD.org) Received: (from scottph@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08LMMrL3059915; Mon, 21 Sep 2020 22:22:53 GMT (envelope-from scottph@FreeBSD.org) Message-Id: <202009212222.08LMMrL3059915@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottph set sender to scottph@FreeBSD.org using -f From: D Scott Phillips Date: Mon, 21 Sep 2020 22:22:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365980 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: scottph X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 365980 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 21 Sep 2020 22:22:54 -0000 Author: scottph Date: Mon Sep 21 22:22:53 2020 New Revision: 365980 URL: https://svnweb.freebsd.org/changeset/base/365980 Log: vm_reserv: Sparsify the vm_reserv_array when VM_PHYSSEG_SPARSE On an Ampere Altra system, the physical memory is populated sparsely within the physical address space, with only about 0.4% of physical addresses backed by RAM in the range [0, last_pa]. This is causing the vm_reserv_array to be over-sized by a few orders of magnitude, wasting roughly 5 GiB on a system with 256 GiB of RAM. The sparse allocation of vm_reserv_array is controlled by defining VM_PHYSSEG_SPARSE, with the dense allocation still remaining for platforms with VM_PHYSSEG_DENSE. Reviewed by: markj, alc, kib Approved by: scottl (implicit) MFC after: 1 week Sponsored by: Ampere Computing, Inc. Differential Revision: https://reviews.freebsd.org/D26130 Modified: head/sys/vm/vm_phys.h head/sys/vm/vm_reserv.c Modified: head/sys/vm/vm_phys.h ============================================================================== --- head/sys/vm/vm_phys.h Mon Sep 21 22:22:06 2020 (r365979) +++ head/sys/vm/vm_phys.h Mon Sep 21 22:22:53 2020 (r365980) @@ -69,6 +69,9 @@ struct vm_phys_seg { vm_paddr_t start; vm_paddr_t end; vm_page_t first_page; +#if VM_NRESERVLEVEL > 0 + vm_reserv_t first_reserv; +#endif int domain; struct vm_freelist (*free_queues)[VM_NFREEPOOL][VM_NFREEORDER_MAX]; }; Modified: head/sys/vm/vm_reserv.c ============================================================================== --- head/sys/vm/vm_reserv.c Mon Sep 21 22:22:06 2020 (r365979) +++ head/sys/vm/vm_reserv.c Mon Sep 21 22:22:53 2020 (r365980) @@ -333,11 +333,17 @@ sysctl_vm_reserv_fullpop(SYSCTL_HANDLER_ARGS) for (segind = 0; segind < vm_phys_nsegs; segind++) { seg = &vm_phys_segs[segind]; paddr = roundup2(seg->start, VM_LEVEL_0_SIZE); +#ifdef VM_PHYSSEG_SPARSE + rv = seg->first_reserv + (paddr >> VM_LEVEL_0_SHIFT) - + (seg->start >> VM_LEVEL_0_SHIFT); +#else + rv = &vm_reserv_array[paddr >> VM_LEVEL_0_SHIFT]; +#endif while (paddr + VM_LEVEL_0_SIZE > paddr && paddr + VM_LEVEL_0_SIZE <= seg->end) { - rv = &vm_reserv_array[paddr >> VM_LEVEL_0_SHIFT]; fullpop += rv->popcnt == VM_LEVEL_0_NPAGES; paddr += VM_LEVEL_0_SIZE; + rv++; } } return (sysctl_handle_int(oidp, &fullpop, 0, req)); @@ -496,8 +502,15 @@ vm_reserv_depopulate(vm_reserv_t rv, int index) static __inline vm_reserv_t vm_reserv_from_page(vm_page_t m) { +#ifdef VM_PHYSSEG_SPARSE + struct vm_phys_seg *seg; + seg = &vm_phys_segs[m->segind]; + return (seg->first_reserv + (VM_PAGE_TO_PHYS(m) >> VM_LEVEL_0_SHIFT) - + (seg->start >> VM_LEVEL_0_SHIFT)); +#else return (&vm_reserv_array[VM_PAGE_TO_PHYS(m) >> VM_LEVEL_0_SHIFT]); +#endif } /* @@ -1054,22 +1067,38 @@ vm_reserv_init(void) struct vm_phys_seg *seg; struct vm_reserv *rv; struct vm_reserv_domain *rvd; +#ifdef VM_PHYSSEG_SPARSE + vm_pindex_t used; +#endif int i, j, segind; /* * Initialize the reservation array. Specifically, initialize the * "pages" field for every element that has an underlying superpage. */ +#ifdef VM_PHYSSEG_SPARSE + used = 0; +#endif for (segind = 0; segind < vm_phys_nsegs; segind++) { seg = &vm_phys_segs[segind]; +#ifdef VM_PHYSSEG_SPARSE + seg->first_reserv = &vm_reserv_array[used]; + used += howmany(seg->end, VM_LEVEL_0_SIZE) - + seg->start / VM_LEVEL_0_SIZE; +#else + seg->first_reserv = + &vm_reserv_array[seg->start >> VM_LEVEL_0_SHIFT]; +#endif paddr = roundup2(seg->start, VM_LEVEL_0_SIZE); + rv = seg->first_reserv + (paddr >> VM_LEVEL_0_SHIFT) - + (seg->start >> VM_LEVEL_0_SHIFT); while (paddr + VM_LEVEL_0_SIZE > paddr && paddr + VM_LEVEL_0_SIZE <= seg->end) { - rv = &vm_reserv_array[paddr >> VM_LEVEL_0_SHIFT]; rv->pages = PHYS_TO_VM_PAGE(paddr); rv->domain = seg->domain; mtx_init(&rv->lock, "vm reserv", NULL, MTX_DEF); paddr += VM_LEVEL_0_SIZE; + rv++; } } for (i = 0; i < MAXMEMDOM; i++) { @@ -1400,30 +1429,40 @@ vm_reserv_size(int level) vm_paddr_t vm_reserv_startup(vm_offset_t *vaddr, vm_paddr_t end) { - vm_paddr_t new_end, high_water; + vm_paddr_t new_end; + vm_pindex_t count; size_t size; int i; - high_water = phys_avail[1]; + count = 0; for (i = 0; i < vm_phys_nsegs; i++) { - if (vm_phys_segs[i].end > high_water) - high_water = vm_phys_segs[i].end; +#ifdef VM_PHYSSEG_SPARSE + count += howmany(vm_phys_segs[i].end, VM_LEVEL_0_SIZE) - + vm_phys_segs[i].start / VM_LEVEL_0_SIZE; +#else + count = MAX(count, + howmany(vm_phys_segs[i].end, VM_LEVEL_0_SIZE)); +#endif } - /* Skip the first chunk. It is already accounted for. */ - for (i = 2; phys_avail[i + 1] != 0; i += 2) { - if (phys_avail[i + 1] > high_water) - high_water = phys_avail[i + 1]; + for (i = 0; phys_avail[i + 1] != 0; i += 2) { +#ifdef VM_PHYSSEG_SPARSE + count += howmany(phys_avail[i + 1], VM_LEVEL_0_SIZE) - + phys_avail[i] / VM_LEVEL_0_SIZE; +#else + count = MAX(count, + howmany(phys_avail[i + 1], VM_LEVEL_0_SIZE)); +#endif } /* - * Calculate the size (in bytes) of the reservation array. Round up - * from "high_water" because every small page is mapped to an element - * in the reservation array based on its physical address. Thus, the - * number of elements in the reservation array can be greater than the - * number of superpages. + * Calculate the size (in bytes) of the reservation array. Rounding up + * for partial superpages at boundaries, as every small page is mapped + * to an element in the reservation array based on its physical address. + * Thus, the number of elements in the reservation array can be greater + * than the number of superpages. */ - size = howmany(high_water, VM_LEVEL_0_SIZE) * sizeof(struct vm_reserv); + size = count * sizeof(struct vm_reserv); /* * Allocate and map the physical memory for the reservation array. The From owner-svn-src-head@freebsd.org Mon Sep 21 22:23:58 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D33763FED64; Mon, 21 Sep 2020 22:23:58 +0000 (UTC) (envelope-from scottph@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwJrG5Fbvz42b3; Mon, 21 Sep 2020 22:23:58 +0000 (UTC) (envelope-from scottph@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 97691152D1; Mon, 21 Sep 2020 22:23:58 +0000 (UTC) (envelope-from scottph@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08LMNwFU060005; Mon, 21 Sep 2020 22:23:58 GMT (envelope-from scottph@FreeBSD.org) Received: (from scottph@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08LMNwYY060004; Mon, 21 Sep 2020 22:23:58 GMT (envelope-from scottph@FreeBSD.org) Message-Id: <202009212223.08LMNwYY060004@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottph set sender to scottph@FreeBSD.org using -f From: D Scott Phillips Date: Mon, 21 Sep 2020 22:23:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365981 - in head/sys: arm64/arm64 vm X-SVN-Group: head X-SVN-Commit-Author: scottph X-SVN-Commit-Paths: in head/sys: arm64/arm64 vm X-SVN-Commit-Revision: 365981 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 21 Sep 2020 22:23:58 -0000 Author: scottph Date: Mon Sep 21 22:23:57 2020 New Revision: 365981 URL: https://svnweb.freebsd.org/changeset/base/365981 Log: arm64/pmap: Sparsify pv_table Reviewed by: markj, kib Approved by: scottl (implicit) MFC after: 1 week Sponsored by: Ampere Computing, Inc. Differential Revision: https://reviews.freebsd.org/D26132 Modified: head/sys/arm64/arm64/pmap.c head/sys/vm/vm_phys.h Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Mon Sep 21 22:22:53 2020 (r365980) +++ head/sys/arm64/arm64/pmap.c Mon Sep 21 22:23:57 2020 (r365981) @@ -178,8 +178,32 @@ __FBSDID("$FreeBSD$"); #endif #define pmap_l2_pindex(v) ((v) >> L2_SHIFT) -#define pa_to_pvh(pa) (&pv_table[pmap_l2_pindex(pa)]) +static struct md_page * +pa_to_pvh(vm_paddr_t pa) +{ + struct vm_phys_seg *seg; + int segind; + + for (segind = 0; segind < vm_phys_nsegs; segind++) { + seg = &vm_phys_segs[segind]; + if (pa >= seg->start && pa < seg->end) + return ((struct md_page *)seg->md_first + + pmap_l2_pindex(pa) - pmap_l2_pindex(seg->start)); + } + panic("pa 0x%jx not within vm_phys_segs", (uintmax_t)pa); +} + +static struct md_page * +page_to_pvh(vm_page_t m) +{ + struct vm_phys_seg *seg; + + seg = &vm_phys_segs[m->segind]; + return ((struct md_page *)seg->md_first + + pmap_l2_pindex(VM_PAGE_TO_PHYS(m)) - pmap_l2_pindex(seg->start)); +} + #define NPV_LIST_LOCKS MAXCPU #define PHYS_TO_PV_LIST_LOCK(pa) \ @@ -1049,6 +1073,8 @@ pmap_init_asids(struct asid_set *set, int bits) void pmap_init(void) { + struct vm_phys_seg *seg, *next_seg; + struct md_page *pvh; vm_size_t s; uint64_t mmfr1; int i, pv_npg, vmid_bits; @@ -1093,7 +1119,12 @@ pmap_init(void) /* * Calculate the size of the pv head table for superpages. */ - pv_npg = howmany(vm_phys_segs[vm_phys_nsegs - 1].end, L2_SIZE); + pv_npg = 0; + for (i = 0; i < vm_phys_nsegs; i++) { + seg = &vm_phys_segs[i]; + pv_npg += pmap_l2_pindex(roundup2(seg->end, L2_SIZE)) - + pmap_l2_pindex(seg->start); + } /* * Allocate memory for the pv head table for superpages. @@ -1105,6 +1136,31 @@ pmap_init(void) TAILQ_INIT(&pv_table[i].pv_list); TAILQ_INIT(&pv_dummy.pv_list); + /* + * Set pointers from vm_phys_segs to pv_table. + */ + for (i = 0, pvh = pv_table; i < vm_phys_nsegs; i++) { + seg = &vm_phys_segs[i]; + seg->md_first = pvh; + pvh += pmap_l2_pindex(roundup2(seg->end, L2_SIZE)) - + pmap_l2_pindex(seg->start); + + /* + * If there is a following segment, and the final + * superpage of this segment and the initial superpage + * of the next segment are the same then adjust the + * pv_table entry for that next segment down by one so + * that the pv_table entries will be shared. + */ + if (i + 1 < vm_phys_nsegs) { + next_seg = &vm_phys_segs[i + 1]; + if (pmap_l2_pindex(roundup2(seg->end, L2_SIZE)) - 1 == + pmap_l2_pindex(next_seg->start)) { + pvh--; + } + } + } + vm_initialized = 1; } @@ -2247,7 +2303,7 @@ reclaim_pv_chunk(pmap_t locked_pmap, struct rwlock **l m->md.pv_gen++; if (TAILQ_EMPTY(&m->md.pv_list) && (m->flags & PG_FICTITIOUS) == 0) { - pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); + pvh = page_to_pvh(m); if (TAILQ_EMPTY(&pvh->pv_list)) { vm_page_aflag_clear(m, PGA_WRITEABLE); @@ -2788,7 +2844,7 @@ pmap_remove_l3(pmap_t pmap, pt_entry_t *l3, vm_offset_ pmap_pvh_free(&m->md, pmap, va); if (TAILQ_EMPTY(&m->md.pv_list) && (m->flags & PG_FICTITIOUS) == 0) { - pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); + pvh = page_to_pvh(m); if (TAILQ_EMPTY(&pvh->pv_list)) vm_page_aflag_clear(m, PGA_WRITEABLE); } @@ -2858,7 +2914,7 @@ pmap_remove_l3_range(pmap_t pmap, pd_entry_t l2e, vm_o pmap_pvh_free(&m->md, pmap, sva); if (TAILQ_EMPTY(&m->md.pv_list) && (m->flags & PG_FICTITIOUS) == 0) { - pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); + pvh = page_to_pvh(m); if (TAILQ_EMPTY(&pvh->pv_list)) vm_page_aflag_clear(m, PGA_WRITEABLE); } @@ -2997,8 +3053,7 @@ pmap_remove_all(vm_page_t m) ("pmap_remove_all: page %p is not managed", m)); SLIST_INIT(&free); lock = VM_PAGE_TO_PV_LIST_LOCK(m); - pvh = (m->flags & PG_FICTITIOUS) != 0 ? &pv_dummy : - pa_to_pvh(VM_PAGE_TO_PHYS(m)); + pvh = (m->flags & PG_FICTITIOUS) != 0 ? &pv_dummy : page_to_pvh(m); retry: rw_wlock(lock); while ((pv = TAILQ_FIRST(&pvh->pv_list)) != NULL) { @@ -4480,7 +4535,7 @@ pmap_page_exists_quick(pmap_t pmap, vm_page_t m) break; } if (!rv && loops < 16 && (m->flags & PG_FICTITIOUS) == 0) { - pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); + pvh = page_to_pvh(m); TAILQ_FOREACH(pv, &pvh->pv_list, pv_next) { if (PV_PMAP(pv) == pmap) { rv = TRUE; @@ -4535,7 +4590,7 @@ restart: PMAP_UNLOCK(pmap); } if ((m->flags & PG_FICTITIOUS) == 0) { - pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); + pvh = page_to_pvh(m); TAILQ_FOREACH(pv, &pvh->pv_list, pv_next) { pmap = PV_PMAP(pv); if (!PMAP_TRYLOCK(pmap)) { @@ -4577,7 +4632,7 @@ pmap_page_is_mapped(vm_page_t m) rw_rlock(lock); rv = !TAILQ_EMPTY(&m->md.pv_list) || ((m->flags & PG_FICTITIOUS) == 0 && - !TAILQ_EMPTY(&pa_to_pvh(VM_PAGE_TO_PHYS(m))->pv_list)); + !TAILQ_EMPTY(&page_to_pvh(m)->pv_list)); rw_runlock(lock); return (rv); } @@ -4740,8 +4795,7 @@ pmap_remove_pages(pmap_t pmap) if ((m->a.flags & PGA_WRITEABLE) != 0 && TAILQ_EMPTY(&m->md.pv_list) && (m->flags & PG_FICTITIOUS) == 0) { - pvh = pa_to_pvh( - VM_PAGE_TO_PHYS(m)); + pvh = page_to_pvh(m); if (TAILQ_EMPTY(&pvh->pv_list)) vm_page_aflag_clear(m, PGA_WRITEABLE); @@ -4818,7 +4872,7 @@ restart: goto out; } if ((m->flags & PG_FICTITIOUS) == 0) { - pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); + pvh = page_to_pvh(m); TAILQ_FOREACH(pv, &pvh->pv_list, pv_next) { pmap = PV_PMAP(pv); PMAP_ASSERT_STAGE1(pmap); @@ -4938,8 +4992,7 @@ pmap_remove_write(vm_page_t m) if (!pmap_page_is_write_mapped(m)) return; lock = VM_PAGE_TO_PV_LIST_LOCK(m); - pvh = (m->flags & PG_FICTITIOUS) != 0 ? &pv_dummy : - pa_to_pvh(VM_PAGE_TO_PHYS(m)); + pvh = (m->flags & PG_FICTITIOUS) != 0 ? &pv_dummy : page_to_pvh(m); retry_pv_loop: rw_wlock(lock); TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_next, next_pv) { @@ -5035,7 +5088,7 @@ pmap_ts_referenced(vm_page_t m) cleared = 0; pa = VM_PAGE_TO_PHYS(m); lock = PHYS_TO_PV_LIST_LOCK(pa); - pvh = (m->flags & PG_FICTITIOUS) != 0 ? &pv_dummy : pa_to_pvh(pa); + pvh = (m->flags & PG_FICTITIOUS) != 0 ? &pv_dummy : page_to_pvh(m); rw_wlock(lock); retry: not_cleared = 0; @@ -5312,8 +5365,7 @@ pmap_clear_modify(vm_page_t m) if (!pmap_page_is_write_mapped(m)) return; - pvh = (m->flags & PG_FICTITIOUS) != 0 ? &pv_dummy : - pa_to_pvh(VM_PAGE_TO_PHYS(m)); + pvh = (m->flags & PG_FICTITIOUS) != 0 ? &pv_dummy : page_to_pvh(m); lock = VM_PAGE_TO_PV_LIST_LOCK(m); rw_wlock(lock); restart: Modified: head/sys/vm/vm_phys.h ============================================================================== --- head/sys/vm/vm_phys.h Mon Sep 21 22:22:53 2020 (r365980) +++ head/sys/vm/vm_phys.h Mon Sep 21 22:23:57 2020 (r365981) @@ -72,6 +72,7 @@ struct vm_phys_seg { #if VM_NRESERVLEVEL > 0 vm_reserv_t first_reserv; #endif + void *md_first; int domain; struct vm_freelist (*free_queues)[VM_NFREEPOOL][VM_NFREEORDER_MAX]; }; From owner-svn-src-head@freebsd.org Mon Sep 21 22:24:47 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 168533FF1CB; Mon, 21 Sep 2020 22:24:47 +0000 (UTC) (envelope-from scottph@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwJsB6v6Zz42kw; Mon, 21 Sep 2020 22:24:46 +0000 (UTC) (envelope-from scottph@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CFCFE15540; Mon, 21 Sep 2020 22:24:46 +0000 (UTC) (envelope-from scottph@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08LMOkgo060086; Mon, 21 Sep 2020 22:24:46 GMT (envelope-from scottph@FreeBSD.org) Received: (from scottph@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08LMOkmO060085; Mon, 21 Sep 2020 22:24:46 GMT (envelope-from scottph@FreeBSD.org) Message-Id: <202009212224.08LMOkmO060085@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottph set sender to scottph@FreeBSD.org using -f From: D Scott Phillips Date: Mon, 21 Sep 2020 22:24:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365982 - head/stand/common X-SVN-Group: head X-SVN-Commit-Author: scottph X-SVN-Commit-Paths: head/stand/common X-SVN-Commit-Revision: 365982 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 21 Sep 2020 22:24:47 -0000 Author: scottph Date: Mon Sep 21 22:24:46 2020 New Revision: 365982 URL: https://svnweb.freebsd.org/changeset/base/365982 Log: stand/reloc_elf: Handle relative relocations for arm{,64} and riscv Extend the powerpc relative relocation handling from r240782 to a handful of other architectures. This is needed to properly read dependency information from kernel modules. Reviewed by: jhb Approved by: scottl (implicit) MFC after: 1 week Sponsored by: Ampere Computing, Inc. Differential Revision: https://reviews.freebsd.org/D26365 Modified: head/stand/common/reloc_elf.c Modified: head/stand/common/reloc_elf.c ============================================================================== --- head/stand/common/reloc_elf.c Mon Sep 21 22:23:57 2020 (r365981) +++ head/stand/common/reloc_elf.c Mon Sep 21 22:24:46 2020 (r365982) @@ -175,7 +175,8 @@ __elfN(reloc)(struct elf_file *ef, symaddr_fn *symaddr } return (0); -#elif defined(__powerpc__) +#elif defined(__aarch64__) || defined(__arm__) || defined(__powerpc__) || \ + defined(__riscv) Elf_Size w; const Elf_Rela *rela; @@ -185,7 +186,15 @@ __elfN(reloc)(struct elf_file *ef, symaddr_fn *symaddr if (relbase + rela->r_offset >= dataaddr && relbase + rela->r_offset < dataaddr + len) { switch (ELF_R_TYPE(rela->r_info)) { +#if defined(__aarch64__) + case R_AARCH64_RELATIVE: +#elif defined(__arm__) + case R_ARM_RELATIVE: +#elif defined(__powerpc__) case R_PPC_RELATIVE: +#elif defined(__riscv) + case R_RISCV_RELATIVE: +#endif w = relbase + rela->r_addend; bcopy(&w, (u_char *)data + (relbase + rela->r_offset - dataaddr), sizeof(w)); From owner-svn-src-head@freebsd.org Mon Sep 21 22:55:52 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1688E4211CB; Mon, 21 Sep 2020 22:55:52 +0000 (UTC) (envelope-from grog@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwKY36yDVz45KS; Mon, 21 Sep 2020 22:55:51 +0000 (UTC) (envelope-from grog@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D3352159EF; Mon, 21 Sep 2020 22:55:51 +0000 (UTC) (envelope-from grog@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08LMtpKH078238; Mon, 21 Sep 2020 22:55:51 GMT (envelope-from grog@FreeBSD.org) Received: (from grog@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08LMtpSp078237; Mon, 21 Sep 2020 22:55:51 GMT (envelope-from grog@FreeBSD.org) Message-Id: <202009212255.08LMtpSp078237@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: grog set sender to grog@FreeBSD.org using -f From: Greg Lehey Date: Mon, 21 Sep 2020 22:55:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365984 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: grog X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 365984 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 21 Sep 2020 22:55:52 -0000 Author: grog Date: Mon Sep 21 22:55:51 2020 New Revision: 365984 URL: https://svnweb.freebsd.org/changeset/base/365984 Log: Remove claim that Allied Forces created "West Germany" in 1953. I can find no historic substantiation for such a claim. The Federal Republic of Germany was created by Germans on 23 May 1949, as also noted in this file. Modified: head/usr.bin/calendar/calendars/calendar.history Modified: head/usr.bin/calendar/calendars/calendar.history ============================================================================== --- head/usr.bin/calendar/calendars/calendar.history Mon Sep 21 22:52:57 2020 (r365983) +++ head/usr.bin/calendar/calendars/calendar.history Mon Sep 21 22:55:51 2020 (r365984) @@ -521,7 +521,6 @@ 09/20 Magellan leaves Spain on the first Round the World passage, 1519 09/20 The Roxy Theater opens in Hollywood, 1973 09/21 J. R. R. Tolkien's The Hobbit is published, 1937 -09/22 Allied forces form the independent nation West Germany, 1953 09/22 US President Lincoln issues the Emancipation Proclamation, 1862 09/22 Special prosecutor Leon Jeworski subpoenas US President Nixon, 1974 09/22 The first Soviet atomic bomb explodes, 1949 From owner-svn-src-head@freebsd.org Mon Sep 21 23:16:06 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7B483421B5C; Mon, 21 Sep 2020 23:16:06 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwL0P6Sbbz46Sk; Mon, 21 Sep 2020 23:16:04 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id KV2Qk4WReTWWpKV2RkHpwN; Mon, 21 Sep 2020 17:16:03 -0600 X-Authority-Analysis: v=2.4 cv=EcV2/NqC c=1 sm=1 tr=0 ts=5f693433 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=reM5J-MqmosA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=niGufq4alXv6dHjLlJQA:9 a=RW3pZpf0S_jW5Zy5:21 a=tMULqBHVb0Kj_e6j:21 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id 76D65E1; Mon, 21 Sep 2020 16:16:01 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 08LNG1Dq005499; Mon, 21 Sep 2020 16:16:01 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202009212316.08LNG1Dq005499@slippy.cwsent.com> X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Greg Lehey cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r365984 - head/usr.bin/calendar/calendars In-reply-to: <202009212255.08LMtpSp078237@repo.freebsd.org> References: <202009212255.08LMtpSp078237@repo.freebsd.org> Comments: In-reply-to Greg Lehey message dated "Mon, 21 Sep 2020 22:55:51 -0000." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 21 Sep 2020 16:16:01 -0700 X-CMAE-Envelope: MS4xfD7BNR0eW8MupnXQJLjSTISlC/f6pjBjIgsDjH2NBlbwST3RSlf6D5XgyxJ+b40BNXbBUruq6chzjIlrmZKUUVVr47umfXSwPOl78K+4hTL+bFSpmOj6 pceOoEATsnt0o8ee/dD2lXhyc6gzRWpqTRB47jRm3EiVGrcK5neqPqbmGC94xK4gVaio6rK/nm075qcHM19vYL6g0/Yt6g/VAQBZdn4RuyqcPDZ/Uijx7EIP 7H/cLag1UYD9EITYEHk0aIwlMD3jLqntUugi1a3STFnYHEysTgLUbIQ8YQ0LlULcR1opM71JxUD14sZfCPGrUw== X-Rspamd-Queue-Id: 4BwL0P6Sbbz46Sk X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 21 Sep 2020 23:16:06 -0000 In message <202009212255.08LMtpSp078237@repo.freebsd.org>, Greg Lehey writes: > Author: grog > Date: Mon Sep 21 22:55:51 2020 > New Revision: 365984 > URL: https://svnweb.freebsd.org/changeset/base/365984 > > Log: > Remove claim that Allied Forces created "West Germany" in 1953. I can > find no historic substantiation for such a claim. The Federal > Republic of Germany was created by Germans on 23 May 1949, as also > noted in this file. > > Modified: > head/usr.bin/calendar/calendars/calendar.history > > Modified: head/usr.bin/calendar/calendars/calendar.history > ============================================================================= > = > --- head/usr.bin/calendar/calendars/calendar.history Mon Sep 21 22:52:57 202 > 0 (r365983) > +++ head/usr.bin/calendar/calendars/calendar.history Mon Sep 21 22:55:51 202 > 0 (r365984) > @@ -521,7 +521,6 @@ > 09/20 Magellan leaves Spain on the first Round the World passage, 151 > 9 > 09/20 The Roxy Theater opens in Hollywood, 1973 > 09/21 J. R. R. Tolkien's The Hobbit is published, 1937 > -09/22 Allied forces form the independent nation West Germany, 1953 > 09/22 US President Lincoln issues the Emancipation Proclamation, 1862 > 09/22 Special prosecutor Leon Jeworski subpoenas US President Nixon, > 1974 > 09/22 The first Soviet atomic bomb explodes, 1949 > Does this file still need to be in FreeBSD? It may have been a novelty back in the day but IMO calendar.history has nothing to do with BSD, computers or anything else of interest to FreeBSD. At the very least this file should be moved to ports or better yet, removed entirely. I simply don't see the point of it being in the tree and distributed with an O/S, any O/S. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Tue Sep 22 00:23:18 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4BF6E42317D; Tue, 22 Sep 2020 00:23:18 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwMTy1MX1z4C9V; Tue, 22 Sep 2020 00:23:18 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from [192.168.1.10] (c-98-207-126-143.hsd1.ca.comcast.net [98.207.126.143]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id 83E7E15037; Tue, 22 Sep 2020 00:23:17 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/16.41.20091302 Date: Mon, 21 Sep 2020 17:23:12 -0700 Subject: Re: svn commit: r365846 - head From: Ravi Pokala To: Ed Maste , , , Message-ID: Thread-Topic: svn commit: r365846 - head References: <202009171847.08HIlNXa015641@repo.freebsd.org> In-Reply-To: <202009171847.08HIlNXa015641@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.33 Precedence: list List-Id: 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, 22 Sep 2020 00:23:18 -0000 -----Original Message----- From: on behalf of Ed Maste Date: 2020-09-17, Thursday at 11:47 To: , , Subject: svn commit: r365846 - head Author: emaste Date: Thu Sep 17 18:47:23 2020 New Revision: 365846 URL: https://svnweb.freebsd.org/changeset/base/365846 Log: Cirrus-CI: build as an unprivileged user The Cirrus-CI-provided working tree is owned by root. Leave that as is for simplicity but build as an unprivileged user; this tests building with an unmodifiable source tree as a side effect. Hi Ed, We're still generating the LINT kernconfs into the src tree though, right? Moving that to allow for universe/tinderboxing a r/o src tree seems like an obvious idea. The fact that we don't already do that implies that there's a non-obvious complication with that idea; does anyone know why that is? Thanks, Ravi (rpokala@) Continue running the smoke test as root for now, as it failed when run as an unprivileged user - pkg reported "Fail to chmod /usr/bin/.pkgtemp.lpq.dUHpEqPGJ9pq:Operation not permitted" Sponsored by: The FreeBSD Foundation Modified: head/.cirrus.yml Modified: head/.cirrus.yml ============================================================================== --- head/.cirrus.yml Thu Sep 17 18:24:51 2020 (r365845) +++ head/.cirrus.yml Thu Sep 17 18:47:23 2020 (r365846) @@ -12,9 +12,13 @@ task: timeout_in: 120m install_script: - pkg install -y qemu-devel uefi-edk2-qemu-x86_64 + setup_user_script: + - pw useradd user + - mkdir -p /usr/obj/$(pwd -P) + - chown user:user /usr/obj/$(pwd -P) script: - - make -j$(sysctl -n hw.ncpu) WITHOUT_TOOLCHAIN=yes buildworld buildkernel + - su user -c "make -j$(sysctl -n hw.ncpu) WITHOUT_TOOLCHAIN=yes buildworld buildkernel" package_script: - - make WITHOUT_TOOLCHAIN=yes PKG_FORMAT=tar packages + - su user -c "make WITHOUT_TOOLCHAIN=yes PKG_FORMAT=tar packages" test_script: - sh tools/boot/ci-qemu-test.sh From owner-svn-src-head@freebsd.org Tue Sep 22 03:06:40 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9984B3DA45C; Tue, 22 Sep 2020 03:06:39 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwR6P6s2Yz4QS0; Tue, 22 Sep 2020 03:06:37 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2DA3318C46; Tue, 22 Sep 2020 03:06:37 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08M36a9w034739; Tue, 22 Sep 2020 03:06:36 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08M36ax1034738; Tue, 22 Sep 2020 03:06:36 GMT (envelope-from np@FreeBSD.org) Message-Id: <202009220306.08M36ax1034738@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 22 Sep 2020 03:06:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365991 - head/sys/dev/cxgbe X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/sys/dev/cxgbe X-SVN-Commit-Revision: 365991 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 03:06:40 -0000 Author: np Date: Tue Sep 22 03:06:36 2020 New Revision: 365991 URL: https://svnweb.freebsd.org/changeset/base/365991 Log: cxgbe(4): add counters for mbuf pullups and defrags. MFC after: 3 days Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Tue Sep 22 02:22:37 2020 (r365990) +++ head/sys/dev/cxgbe/t4_sge.c Tue Sep 22 03:06:36 2020 (r365991) @@ -204,6 +204,15 @@ static int lro_mbufs = 0; SYSCTL_INT(_hw_cxgbe, OID_AUTO, lro_mbufs, CTLFLAG_RDTUN, &lro_mbufs, 0, "Enable presorting of LRO frames"); +static counter_u64_t pullups; +SYSCTL_COUNTER_U64(_hw_cxgbe, OID_AUTO, pullups, CTLFLAG_RD, &pullups, + "Number of mbuf pullups performed"); + +static counter_u64_t defrags; +SYSCTL_COUNTER_U64(_hw_cxgbe, OID_AUTO, defrags, CTLFLAG_RD, &defrags, + "Number of mbuf defrags performed"); + + static int service_iq(struct sge_iq *, int); static int service_iq_fl(struct sge_iq *, int); static struct mbuf *get_fl_payload(struct adapter *, struct sge_fl *, uint32_t); @@ -535,8 +544,12 @@ t4_sge_modload(void) extfree_refs = counter_u64_alloc(M_WAITOK); extfree_rels = counter_u64_alloc(M_WAITOK); + pullups = counter_u64_alloc(M_WAITOK); + defrags = counter_u64_alloc(M_WAITOK); counter_u64_zero(extfree_refs); counter_u64_zero(extfree_rels); + counter_u64_zero(pullups); + counter_u64_zero(defrags); t4_init_shared_cpl_handlers(); t4_register_cpl_handler(CPL_FW4_MSG, handle_fw_msg); @@ -556,6 +569,8 @@ t4_sge_modunload(void) counter_u64_free(extfree_refs); counter_u64_free(extfree_rels); + counter_u64_free(pullups); + counter_u64_free(defrags); } uint64_t @@ -2714,16 +2729,22 @@ restart: } #endif if (nsegs > max_nsegs_allowed(m0)) { - if (defragged++ > 0 || (m = m_defrag(m0, M_NOWAIT)) == NULL) { + if (defragged++ > 0) { rc = EFBIG; goto fail; } + counter_u64_add(defrags, 1); + if ((m = m_defrag(m0, M_NOWAIT)) == NULL) { + rc = ENOMEM; + goto fail; + } *mp = m0 = m; /* update caller's copy after defrag */ goto restart; } if (__predict_false(nsegs > 2 && m0->m_pkthdr.len <= MHLEN && !(cflags & MC_NOMAP))) { + counter_u64_add(pullups, 1); m0 = m_pullup(m0, m0->m_pkthdr.len); if (m0 == NULL) { /* Should have left well enough alone. */ From owner-svn-src-head@freebsd.org Tue Sep 22 03:06:32 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 297633DA60B; Tue, 22 Sep 2020 03:06:32 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-oi1-f174.google.com (mail-oi1-f174.google.com [209.85.167.174]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwR6F438Hz4QRF; Tue, 22 Sep 2020 03:06:29 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-oi1-f174.google.com with SMTP id z26so19420504oih.12; Mon, 21 Sep 2020 20:06:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=kUg2zz0dc0iGhTE5U8K/+vQsgGE+oAHY7mr7pzzv0yg=; b=DrqFuOxA153tyMjtlmj5wVD9Qj7FOtPTh66eG9LtpNqzQf8UOvBYNfQyCdHN5+FmER fvnY5N56O7ZkanVGJd2KrXx/50QiAcx9vqEqcTWJKyMeN6q7qhJ4zNODS5MLj1V4XdtL 9AS/hWNNhxJ0h293c1w9LAHAcXQYZBC6gLLYQsySOfYjmErLLbzKS+JJuus6BMtXJ4Xv myqIXaFIouHwlCzbOx4h5n1JMoCPEaWoKmnUTx/0BDPlU7Y+YK0+Y2T6TSpmPe2JQGeM WtNw0oJYsqRFKKXPoo4VUMkwStys2K33aIoUbbULfvWGXtUX7ECnPjCnLK2C+Vb14MOX bCAA== X-Gm-Message-State: AOAM533DRAY8h63F5eX8/fKqST8FWKYBaaPfJd4szYpw0udR05TV2SFd NiWgtywI0Xoik++skZZrfyqmtpAz+n0= X-Google-Smtp-Source: ABdhPJy6oNhIdSTWQ7i77KgDXeTnkJ7xQax7BgRn/Zfe+Szme8Ge6qJnfHFkb6LFi9KXMYZVDq8jkg== X-Received: by 2002:aca:ef89:: with SMTP id n131mr1402266oih.22.1600743987331; Mon, 21 Sep 2020 20:06:27 -0700 (PDT) Received: from mail-ot1-f43.google.com (mail-ot1-f43.google.com. [209.85.210.43]) by smtp.gmail.com with ESMTPSA id c7sm6525570ots.20.2020.09.21.20.06.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Sep 2020 20:06:27 -0700 (PDT) Received: by mail-ot1-f43.google.com with SMTP id q21so14323360ota.8; Mon, 21 Sep 2020 20:06:27 -0700 (PDT) X-Received: by 2002:a9d:5550:: with SMTP id h16mr1588774oti.157.1600743986831; Mon, 21 Sep 2020 20:06:26 -0700 (PDT) MIME-Version: 1.0 References: <202009212255.08LMtpSp078237@repo.freebsd.org> <202009212316.08LNG1Dq005499@slippy.cwsent.com> In-Reply-To: <202009212316.08LNG1Dq005499@slippy.cwsent.com> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Mon, 21 Sep 2020 20:06:15 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r365984 - head/usr.bin/calendar/calendars To: Cy Schubert Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4BwR6F438Hz4QRF X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of csecem@gmail.com designates 209.85.167.174 as permitted sender) smtp.mailfrom=csecem@gmail.com X-Spamd-Result: default: False [-1.57 / 15.00]; HAS_REPLYTO(0.00)[cem@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; REPLYTO_ADDR_EQ_FROM(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; TO_DN_ALL(0.00)[]; FORGED_SENDER(0.30)[cem@freebsd.org,csecem@gmail.com]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; TAGGED_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[cem@freebsd.org,csecem@gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_SPAM_SHORT(0.46)[0.457]; NEURAL_HAM_LONG(-1.03)[-1.031]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.167.174:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.167.174:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 03:06:32 -0000 Big ol plus one from me. On Mon, Sep 21, 2020 at 4:16 PM Cy Schubert wrote: > > In message <202009212255.08LMtpSp078237@repo.freebsd.org>, Greg Lehey > writes: > > Author: grog > > Date: Mon Sep 21 22:55:51 2020 > > New Revision: 365984 > > URL: https://svnweb.freebsd.org/changeset/base/365984 > > > > Log: > > Remove claim that Allied Forces created "West Germany" in 1953. I can > > find no historic substantiation for such a claim. The Federal > > Republic of Germany was created by Germans on 23 May 1949, as also > > noted in this file. > > > > Modified: > > head/usr.bin/calendar/calendars/calendar.history > > > > Modified: head/usr.bin/calendar/calendars/calendar.history > > ============================================================================= > > = > > --- head/usr.bin/calendar/calendars/calendar.history Mon Sep 21 22:52:57 202 > > 0 (r365983) > > +++ head/usr.bin/calendar/calendars/calendar.history Mon Sep 21 22:55:51 202 > > 0 (r365984) > > @@ -521,7 +521,6 @@ > > 09/20 Magellan leaves Spain on the first Round the World passage, 151 > > 9 > > 09/20 The Roxy Theater opens in Hollywood, 1973 > > 09/21 J. R. R. Tolkien's The Hobbit is published, 1937 > > -09/22 Allied forces form the independent nation West Germany, 1953 > > 09/22 US President Lincoln issues the Emancipation Proclamation, 1862 > > 09/22 Special prosecutor Leon Jeworski subpoenas US President Nixon, > > 1974 > > 09/22 The first Soviet atomic bomb explodes, 1949 > > > > Does this file still need to be in FreeBSD? It may have been a novelty back > in the day but IMO calendar.history has nothing to do with BSD, computers > or anything else of interest to FreeBSD. At the very least this file should > be moved to ports or better yet, removed entirely. I simply don't see the > point of it being in the tree and distributed with an O/S, any O/S. > > > -- > Cheers, > Cy Schubert > FreeBSD UNIX: Web: https://FreeBSD.org > NTP: Web: https://nwtime.org > > The need of the many outweighs the greed of the few. > > From owner-svn-src-head@freebsd.org Tue Sep 22 03:57:48 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CEDB33DC345; Tue, 22 Sep 2020 03:57:48 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwSFS58gGz4T7j; Tue, 22 Sep 2020 03:57:48 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9459519539; Tue, 22 Sep 2020 03:57:48 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08M3vmtF065495; Tue, 22 Sep 2020 03:57:48 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08M3vmCV065494; Tue, 22 Sep 2020 03:57:48 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <202009220357.08M3vmCV065494@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Tue, 22 Sep 2020 03:57:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365992 - head/sbin/growfs X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/sbin/growfs X-SVN-Commit-Revision: 365992 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 03:57:48 -0000 Author: mckusick Date: Tue Sep 22 03:57:48 2020 New Revision: 365992 URL: https://svnweb.freebsd.org/changeset/base/365992 Log: Add missing cylinder group check-hash updates when doing large expansions of filesystems. Reported by: Colin Percival (cperciva@) Tested by: Colin Percival (cperciva@) MFC after: 3 days Sponsored by: Netflix Modified: head/sbin/growfs/growfs.c Modified: head/sbin/growfs/growfs.c ============================================================================== --- head/sbin/growfs/growfs.c Tue Sep 22 03:06:36 2020 (r365991) +++ head/sbin/growfs/growfs.c Tue Sep 22 03:57:48 2020 (r365992) @@ -590,6 +590,7 @@ updjcg(int cylno, time_t modtime, int fsi, int fso, un if (sblock.fs_magic == FS_UFS1_MAGIC) acg.cg_old_ncyl = sblock.fs_old_cpg; + cgckhash(&acg); wtfs(fsbtodb(&sblock, cgtod(&sblock, cylno)), (size_t)sblock.fs_cgsize, (void *)&acg, fso, Nflag); DBG_PRINT0("jcg written\n"); @@ -965,6 +966,7 @@ updcsloc(time_t modtime, int fsi, int fso, unsigned in * Now write the former cylinder group containing the cylinder * summary back to disk. */ + cgckhash(&acg); wtfs(fsbtodb(&sblock, cgtod(&sblock, ocscg)), (size_t)sblock.fs_cgsize, (void *)&acg, fso, Nflag); DBG_PRINT0("oscg written\n"); @@ -1057,6 +1059,7 @@ updcsloc(time_t modtime, int fsi, int fso, unsigned in * Write the new cylinder group containing the cylinder summary * back to disk. */ + cgckhash(&acg); wtfs(fsbtodb(&sblock, cgtod(&sblock, ncscg)), (size_t)sblock.fs_cgsize, (void *)&acg, fso, Nflag); DBG_PRINT0("nscg written\n"); From owner-svn-src-head@freebsd.org Tue Sep 22 04:16:42 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 706B13DC95F; Tue, 22 Sep 2020 04:16:42 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwSgG2Jhvz4TsV; Tue, 22 Sep 2020 04:16:42 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1852519AA1; Tue, 22 Sep 2020 04:16:42 +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 08M4Gfbn077767; Tue, 22 Sep 2020 04:16:41 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08M4GfuV077763; Tue, 22 Sep 2020 04:16:41 GMT (envelope-from np@FreeBSD.org) Message-Id: <202009220416.08M4GfuV077763@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 22 Sep 2020 04:16:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365993 - in head: share/man/man4 sys/dev/cxgbe X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: in head: share/man/man4 sys/dev/cxgbe X-SVN-Commit-Revision: 365993 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 04:16:42 -0000 Author: np Date: Tue Sep 22 04:16:40 2020 New Revision: 365993 URL: https://svnweb.freebsd.org/changeset/base/365993 Log: cxgbe(4): let the PF driver use VM work requests for transmit. This allows the PF interfaces to communicate with the VF interfaces over the internal switch in the ASIC. Fix the GL limits for VM work requests while here. MFC after: 3 days Sponsored by: Chelsio Communications Modified: head/share/man/man4/cxgbe.4 head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/t4_sge.c Modified: head/share/man/man4/cxgbe.4 ============================================================================== --- head/share/man/man4/cxgbe.4 Tue Sep 22 03:57:48 2020 (r365992) +++ head/share/man/man4/cxgbe.4 Tue Sep 22 04:16:40 2020 (r365993) @@ -351,6 +351,17 @@ This tunable is for specialized applications only and normal operation. The capabilities for which hardware resources have been reserved are listed in dev..X.*caps sysctls. +.It Va hw.cxgbe.tx_vm_wr +Setting this to 1 instructs the driver to use VM work requests to transmit data. +This lets PF interfaces transmit frames to VF interfaces over the internal +switch in the ASIC. +Note that the +.Xr cxgbev 4 +VF driver always uses VM work requests and is not affected by this tunable. +The default value is 0 and should be changed only if PF and VF interfaces need +to communicate with each other. +Different interfaces can be assigned different values using the +dev..X.tx_vm_wr sysctl when the interface is administratively down. .El .Sh SUPPORT For general information and support, Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Tue Sep 22 03:57:48 2020 (r365992) +++ head/sys/dev/cxgbe/adapter.h Tue Sep 22 04:16:40 2020 (r365993) @@ -118,6 +118,8 @@ enum { SGE_MAX_WR_NDESC = SGE_MAX_WR_LEN / EQ_ESIZE, /* max WR size in desc */ TX_SGL_SEGS = 39, TX_SGL_SEGS_TSO = 38, + TX_SGL_SEGS_VM = 38, + TX_SGL_SEGS_VM_TSO = 37, TX_SGL_SEGS_EO_TSO = 30, /* XXX: lower for IPv6. */ TX_SGL_SEGS_VXLAN_TSO = 37, TX_WR_FLITS = SGE_MAX_WR_LEN / 8 @@ -173,6 +175,7 @@ enum { DOOMED = (1 << 0), VI_INIT_DONE = (1 << 1), VI_SYSCTL_CTX = (1 << 2), + TX_USES_VM_WR = (1 << 3), /* adapter debug_flags */ DF_DUMP_MBOX = (1 << 0), /* Log all mbox cmd/rpl. */ @@ -1267,7 +1270,7 @@ void t4_intr_evt(void *); void t4_wrq_tx_locked(struct adapter *, struct sge_wrq *, struct wrqe *); void t4_update_fl_bufsize(struct ifnet *); struct mbuf *alloc_wr_mbuf(int, int); -int parse_pkt(struct adapter *, struct mbuf **); +int parse_pkt(struct mbuf **, bool); void *start_wrq_wr(struct sge_wrq *, int, struct wrq_cookie *); void commit_wrq_wr(struct sge_wrq *, void *, struct wrq_cookie *); int tnl_cong(struct port_info *, int); Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Tue Sep 22 03:57:48 2020 (r365992) +++ head/sys/dev/cxgbe/t4_main.c Tue Sep 22 04:16:40 2020 (r365993) @@ -591,6 +591,10 @@ static int t4_panic_on_fatal_err = 0; SYSCTL_INT(_hw_cxgbe, OID_AUTO, panic_on_fatal_err, CTLFLAG_RDTUN, &t4_panic_on_fatal_err, 0, "panic on fatal errors"); +static int t4_tx_vm_wr = 0; +SYSCTL_INT(_hw_cxgbe, OID_AUTO, tx_vm_wr, CTLFLAG_RWTUN, &t4_tx_vm_wr, 0, + "Use VM work requests to transmit packets."); + #ifdef TCP_OFFLOAD /* * TOE tunables. @@ -695,6 +699,7 @@ static int sysctl_bitfield_8b(SYSCTL_HANDLER_ARGS); static int sysctl_bitfield_16b(SYSCTL_HANDLER_ARGS); static int sysctl_btphy(SYSCTL_HANDLER_ARGS); static int sysctl_noflowq(SYSCTL_HANDLER_ARGS); +static int sysctl_tx_vm_wr(SYSCTL_HANDLER_ARGS); static int sysctl_holdoff_tmr_idx(SYSCTL_HANDLER_ARGS); static int sysctl_holdoff_pktc_idx(SYSCTL_HANDLER_ARGS); static int sysctl_qsize_rxq(SYSCTL_HANDLER_ARGS); @@ -1723,6 +1728,8 @@ cxgbe_vi_attach(device_t dev, struct vi_info *vi) vi->xact_addr_filt = -1; callout_init(&vi->tick, 1); + if (sc->flags & IS_VF || t4_tx_vm_wr != 0) + vi->flags |= TX_USES_VM_WR; /* Allocate an ifnet and set it up */ ifp = if_alloc_dev(IFT_ETHER, dev); @@ -1775,7 +1782,10 @@ cxgbe_vi_attach(device_t dev, struct vi_info *vi) #endif ifp->if_hw_tsomax = IP_MAXPACKET; - ifp->if_hw_tsomaxsegcount = TX_SGL_SEGS_TSO; + if (vi->flags & TX_USES_VM_WR) + ifp->if_hw_tsomaxsegcount = TX_SGL_SEGS_VM_TSO; + else + ifp->if_hw_tsomaxsegcount = TX_SGL_SEGS_TSO; #ifdef RATELIMIT if (is_ethoffload(sc) && vi->nofldtxq != 0) ifp->if_hw_tsomaxsegcount = TX_SGL_SEGS_EO_TSO; @@ -2174,7 +2184,7 @@ cxgbe_transmit(struct ifnet *ifp, struct mbuf *m) { struct vi_info *vi = ifp->if_softc; struct port_info *pi = vi->pi; - struct adapter *sc = pi->adapter; + struct adapter *sc; struct sge_txq *txq; #ifdef RATELIMIT struct cxgbe_snd_tag *cst; @@ -2194,7 +2204,7 @@ cxgbe_transmit(struct ifnet *ifp, struct mbuf *m) return (ENETDOWN); } - rc = parse_pkt(sc, &m); + rc = parse_pkt(&m, vi->flags & TX_USES_VM_WR); if (__predict_false(rc != 0)) { MPASS(m == NULL); /* was freed already */ atomic_add_int(&pi->tx_parse_error, 1); /* rare, atomic is ok */ @@ -2209,6 +2219,7 @@ cxgbe_transmit(struct ifnet *ifp, struct mbuf *m) #endif /* Select a txq. */ + sc = vi->adapter; txq = &sc->sge.txq[vi->first_txq]; if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) txq += ((m->m_pkthdr.flowid % (vi->ntxq - vi->rsrv_noflowq)) + @@ -6818,6 +6829,16 @@ vi_sysctls(struct vi_info *vi) "Reserve queue 0 for non-flowid packets"); } + if (vi->adapter->flags & IS_VF) { + MPASS(vi->flags & TX_USES_VM_WR); + SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "tx_vm_wr", CTLFLAG_RD, + NULL, 1, "use VM work requests for transmit"); + } else { + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "tx_vm_wr", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, vi, 0, + sysctl_tx_vm_wr, "I", "use VM work requestes for transmit"); + } + #ifdef TCP_OFFLOAD if (vi->nofldrxq != 0) { SYSCTL_ADD_INT(ctx, children, OID_AUTO, "nofldrxq", CTLFLAG_RD, @@ -7245,6 +7266,63 @@ sysctl_noflowq(SYSCTL_HANDLER_ARGS) else vi->rsrv_noflowq = 0; + return (rc); +} + +static int +sysctl_tx_vm_wr(SYSCTL_HANDLER_ARGS) +{ + struct vi_info *vi = arg1; + struct adapter *sc = vi->adapter; + int rc, val, i; + + MPASS(!(sc->flags & IS_VF)); + + val = vi->flags & TX_USES_VM_WR ? 1 : 0; + rc = sysctl_handle_int(oidp, &val, 0, req); + if (rc != 0 || req->newptr == NULL) + return (rc); + + if (val != 0 && val != 1) + return (EINVAL); + + rc = begin_synchronized_op(sc, vi, HOLD_LOCK | SLEEP_OK | INTR_OK, + "t4txvm"); + if (rc) + return (rc); + if (vi->ifp->if_drv_flags & IFF_DRV_RUNNING) { + /* + * We don't want parse_pkt to run with one setting (VF or PF) + * and then eth_tx to see a different setting but still use + * stale information calculated by parse_pkt. + */ + rc = EBUSY; + } else { + struct port_info *pi = vi->pi; + struct sge_txq *txq; + uint32_t ctrl0; + uint8_t npkt = sc->params.max_pkts_per_eth_tx_pkts_wr; + + if (val) { + vi->flags |= TX_USES_VM_WR; + vi->ifp->if_hw_tsomaxsegcount = TX_SGL_SEGS_VM_TSO; + ctrl0 = htobe32(V_TXPKT_OPCODE(CPL_TX_PKT_XT) | + V_TXPKT_INTF(pi->tx_chan)); + if (!(sc->flags & IS_VF)) + npkt--; + } else { + vi->flags &= ~TX_USES_VM_WR; + vi->ifp->if_hw_tsomaxsegcount = TX_SGL_SEGS_TSO; + ctrl0 = htobe32(V_TXPKT_OPCODE(CPL_TX_PKT_XT) | + V_TXPKT_INTF(pi->tx_chan) | V_TXPKT_PF(sc->pf) | + V_TXPKT_VF(vi->vin) | V_TXPKT_VF_VLD(vi->vfvld)); + } + for_each_txq(vi, i, txq) { + txq->cpl_ctrl0 = ctrl0; + txq->txp.max_npkt = npkt; + } + } + end_synchronized_op(sc, LOCK_HELD); return (rc); } Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Tue Sep 22 03:57:48 2020 (r365992) +++ head/sys/dev/cxgbe/t4_sge.c Tue Sep 22 04:16:40 2020 (r365993) @@ -278,7 +278,7 @@ static void add_fl_to_sfl(struct adapter *, struct sge static inline void get_pkt_gl(struct mbuf *, struct sglist *); static inline u_int txpkt_len16(u_int, const u_int); static inline u_int txpkt_vm_len16(u_int, const u_int); -static inline void calculate_mbuf_len16(struct adapter *, struct mbuf *); +static inline void calculate_mbuf_len16(struct mbuf *, bool); static inline u_int txpkts0_len16(u_int); static inline u_int txpkts1_len16(void); static u_int write_raw_wr(struct sge_txq *, void *, struct mbuf *, u_int); @@ -2323,6 +2323,8 @@ set_mbuf_len16(struct mbuf *m, uint8_t len16) { M_ASSERTPKTHDR(m); + if (!(mbuf_cflags(m) & MC_TLS)) + MPASS(len16 > 0 && len16 <= SGE_MAX_WR_LEN / 16); m->m_pkthdr.PH_loc.eight[0] = len16; } @@ -2657,9 +2659,15 @@ count_mbuf_nsegs(struct mbuf *m, int skip, uint8_t *cf * The maximum number of segments that can fit in a WR. */ static int -max_nsegs_allowed(struct mbuf *m) +max_nsegs_allowed(struct mbuf *m, bool vm_wr) { + if (vm_wr) { + if (needs_tso(m)) + return (TX_SGL_SEGS_VM_TSO); + return (TX_SGL_SEGS_VM); + } + if (needs_tso(m)) { if (needs_vxlan_tso(m)) return (TX_SGL_SEGS_VXLAN_TSO); @@ -2676,7 +2684,7 @@ max_nsegs_allowed(struct mbuf *m) * b) it may get defragged up if the gather list is too long for the hardware. */ int -parse_pkt(struct adapter *sc, struct mbuf **mp) +parse_pkt(struct mbuf **mp, bool vm_wr) { struct mbuf *m0 = *mp, *m; int rc, nsegs, defragged = 0, offset; @@ -2728,7 +2736,7 @@ restart: return (0); } #endif - if (nsegs > max_nsegs_allowed(m0)) { + if (nsegs > max_nsegs_allowed(m0, vm_wr)) { if (defragged++ > 0) { rc = EFBIG; goto fail; @@ -2756,7 +2764,7 @@ restart: } set_mbuf_nsegs(m0, nsegs); set_mbuf_cflags(m0, cflags); - calculate_mbuf_len16(sc, m0); + calculate_mbuf_len16(m0, vm_wr); #ifdef RATELIMIT /* @@ -3168,7 +3176,7 @@ eth_tx(struct mp_ring *r, u_int cidx, u_int pidx, bool if (txp->npkt > 0 || remaining > 1 || txp->score > 3 || atomic_load_int(&txq->eq.equiq) != 0) { - if (sc->flags & IS_VF) + if (vi->flags & TX_USES_VM_WR) rc = add_to_txpkts_vf(sc, txq, m0, avail, &snd); else rc = add_to_txpkts_pf(sc, txq, m0, avail, &snd); @@ -3184,14 +3192,14 @@ eth_tx(struct mp_ring *r, u_int cidx, u_int pidx, bool if (txp->score++ >= 10) txp->score = 10; MPASS(avail >= tx_len16_to_desc(txp->len16)); - if (sc->flags & IS_VF) + if (vi->flags & TX_USES_VM_WR) n = write_txpkts_vm_wr(sc, txq); else n = write_txpkts_wr(sc, txq); } else { MPASS(avail >= tx_len16_to_desc(mbuf_len16(txp->mb[0]))); - if (sc->flags & IS_VF) + if (vi->flags & TX_USES_VM_WR) n = write_txpkt_vm_wr(sc, txq, txp->mb[0]); else @@ -3241,7 +3249,7 @@ eth_tx(struct mp_ring *r, u_int cidx, u_int pidx, bool #endif } else { ETHER_BPF_MTAP(ifp, m0); - if (sc->flags & IS_VF) + if (vi->flags & TX_USES_VM_WR) n = write_txpkt_vm_wr(sc, txq, m0); else n = write_txpkt_wr(sc, txq, m0, avail); @@ -3285,14 +3293,14 @@ send_txpkts: ETHER_BPF_MTAP(ifp, txp->mb[i]); if (txp->npkt > 1) { MPASS(avail >= tx_len16_to_desc(txp->len16)); - if (sc->flags & IS_VF) + if (vi->flags & TX_USES_VM_WR) n = write_txpkts_vm_wr(sc, txq); else n = write_txpkts_wr(sc, txq); } else { MPASS(avail >= tx_len16_to_desc(mbuf_len16(txp->mb[0]))); - if (sc->flags & IS_VF) + if (vi->flags & TX_USES_VM_WR) n = write_txpkt_vm_wr(sc, txq, txp->mb[0]); else n = write_txpkt_wr(sc, txq, txp->mb[0], avail); @@ -4431,7 +4439,7 @@ alloc_txq(struct vi_info *vi, struct sge_txq *txq, int TASK_INIT(&txq->tx_reclaim_task, 0, tx_reclaim, eq); txq->ifp = vi->ifp; txq->gl = sglist_alloc(TX_SGL_SEGS, M_WAITOK); - if (sc->flags & IS_VF) + if (vi->flags & TX_USES_VM_WR) txq->cpl_ctrl0 = htobe32(V_TXPKT_OPCODE(CPL_TX_PKT_XT) | V_TXPKT_INTF(pi->tx_chan)); else @@ -4447,6 +4455,8 @@ alloc_txq(struct vi_info *vi, struct sge_txq *txq, int MPASS(nitems(txp->mb) >= sc->params.max_pkts_per_eth_tx_pkts_wr); txq->txp.max_npkt = min(nitems(txp->mb), sc->params.max_pkts_per_eth_tx_pkts_wr); + if (vi->flags & TX_USES_VM_WR && !(sc->flags & IS_VF)) + txq->txp.max_npkt--; snprintf(name, sizeof(name), "%d", idx); oid = SYSCTL_ADD_NODE(&vi->ctx, children, OID_AUTO, name, @@ -4796,9 +4806,11 @@ get_pkt_gl(struct mbuf *m, struct sglist *gl) KASSERT(gl->sg_nseg == mbuf_nsegs(m), ("%s: nsegs changed for mbuf %p from %d to %d", __func__, m, mbuf_nsegs(m), gl->sg_nseg)); - KASSERT(gl->sg_nseg > 0 && gl->sg_nseg <= max_nsegs_allowed(m), +#if 0 /* vm_wr not readily available here. */ + KASSERT(gl->sg_nseg > 0 && gl->sg_nseg <= max_nsegs_allowed(m, vm_wr), ("%s: %d segments, should have been 1 <= nsegs <= %d", __func__, - gl->sg_nseg, max_nsegs_allowed(m))); + gl->sg_nseg, max_nsegs_allowed(m, vm_wr))); +#endif } /* @@ -4839,12 +4851,12 @@ txpkt_vm_len16(u_int nsegs, const u_int extra) } static inline void -calculate_mbuf_len16(struct adapter *sc, struct mbuf *m) +calculate_mbuf_len16(struct mbuf *m, bool vm_wr) { const int lso = sizeof(struct cpl_tx_pkt_lso_core); const int tnl_lso = sizeof(struct cpl_tx_tnl_lso); - if (sc->flags & IS_VF) { + if (vm_wr) { if (needs_tso(m)) set_mbuf_len16(m, txpkt_vm_len16(mbuf_nsegs(m), lso)); else @@ -5347,8 +5359,6 @@ add_to_txpkts_vf(struct adapter *sc, struct sge_txq *t int avail, bool *send) { struct txpkts *txp = &txq->txp; - - MPASS(sc->flags & IS_VF); /* Cannot have TSO and coalesce at the same time. */ if (cannot_use_txpkts(m)) { From owner-svn-src-head@freebsd.org Tue Sep 22 05:18:07 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DD0CD3DDA3F; Tue, 22 Sep 2020 05:18:07 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwV275bMDz4Wrs; Tue, 22 Sep 2020 05:18:07 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from [192.168.1.10] (unknown [IPv6:2601:641:300:6e9f:f855:39a8:132b:4210]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id EB24C1799C; Tue, 22 Sep 2020 05:18:06 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/16.41.20091302 Date: Mon, 21 Sep 2020 22:18:03 -0700 Subject: Re: svn commit: r365899 - in head: share/man/man9 sys/arm/include sys/arm64/arm64 sys/arm64/include sys/kern sys/mips/include sys/powerpc/include sys/riscv/include sys/sys sys/tools sys/x86/include From: Ravi Pokala To: Michal Meloun , , , Message-ID: <4D257266-3703-4513-9301-33E03F9FF9BE@panasas.com> Thread-Topic: svn commit: r365899 - in head: share/man/man9 sys/arm/include sys/arm64/arm64 sys/arm64/include sys/kern sys/mips/include sys/powerpc/include sys/riscv/include sys/sys sys/tools sys/x86/include References: <202009191106.08JB6fE9010167@repo.freebsd.org> In-Reply-To: <202009191106.08JB6fE9010167@repo.freebsd.org> 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.33 Precedence: list List-Id: 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, 22 Sep 2020 05:18:07 -0000 This breaks amd64.GENERIC-KCSAN: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ${SRCTOP}/sys/kern/subr_csan.c:895:1: error: implicit declaration of functi= on 'bus_space_peek_8' is invalid in C99 [-Werror,-Wimplicit-function-declara= tion] CSAN_BUS_PEEK_FUNC(8, uint64_t) ^ ${SRCTOP}/sys/kern/subr_csan.c:888:11: note: expanded from macro 'CSAN_BUS_= PEEK_FUNC' return (bus_space_peek_##width(tag, hnd, offset, value)); \ ^ :56:1: note: expanded from here bus_space_peek_8 ^ ${SRCTOP}/sys/kern/subr_csan.c:909:1: error: implicit declaration of functi= on 'bus_space_poke_8' is invalid in C99 [-Werror,-Wimplicit-function-declara= tion] CSAN_BUS_POKE_FUNC(8, uint64_t) ^ ${SRCTOP}/sys/kern/subr_csan.c:902:11: note: expanded from macro 'CSAN_BUS_= POKE_FUNC' return (bus_space_poke_##width(tag, hnd, offset, value)); \ ^ :64:1: note: expanded from here bus_space_poke_8 ^ 2 errors generated. --- subr_csan.o --- *** [subr_csan.o] Error code 1 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Thanks, Ravi (rpokala@) =EF=BB=BF-----Original Message----- From: on behalf of Michal Meloun Date: 2020-09-19, Saturday at 04:06 To: , , Subject: svn commit: r365899 - in head: share/man/man9 sys/arm/include sys/= arm64/arm64 sys/arm64/include sys/kern sys/mips/include sys/powerpc/include = sys/riscv/include sys/sys sys/tools sys/x86/include Author: mmel Date: Sat Sep 19 11:06:41 2020 New Revision: 365899 URL: https://svnweb.freebsd.org/changeset/base/365899 Log: Add NetBSD compatible bus_space_peek_N() and bus_space_poke_N() funct= ions. One problem with the bus_space_read_N() and bus_space_write_N() famil= y of functions is that they provide no protection against exceptions which= can occur when no physical hardware or device responds to the read or wri= te cycles. In such a situation, the system typically would panic due to = a kernel-mode bus error. The bus_space_peek_N() and bus_space_poke_N() = family of functions provide a mechanism to handle these exceptions gracefull= y without the risk of crashing the system. Typical example is access to PCI(e) configuration space in bus enumer= ation function on badly implemented PCI(e) root complexes (RK3399 or Neover= se N1 N1SDP and/or access to PCI(e) register when device is in deep slee= p state. This commit adds a real implementation for arm64 only. The remaining architectures have bus_space_peek()/bus_space_poke() emulated by usin= g bus_space_read()/bus_space_write() (without exception handling). MFC after: 1 month Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D25371 Modified: head/share/man/man9/bus_space.9 head/sys/arm/include/bus.h head/sys/arm64/arm64/bus_machdep.c head/sys/arm64/arm64/bus_space_asm.S head/sys/arm64/arm64/trap.c head/sys/arm64/include/bus.h head/sys/arm64/include/md_var.h head/sys/kern/subr_csan.c head/sys/mips/include/bus.h head/sys/powerpc/include/bus.h head/sys/riscv/include/bus.h head/sys/sys/_cscan_bus.h head/sys/sys/bus.h head/sys/tools/bus_macro.sh head/sys/x86/include/bus.h Modified: head/share/man/man9/bus_space.9 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D --- head/share/man/man9/bus_space.9 Sat Sep 19 02:15:56 2020 (r365898) +++ head/share/man/man9/bus_space.9 Sat Sep 19 11:06:41 2020 (r365899) @@ -52,7 +52,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 15, 2017 +.Dd July 7, 2020 .Dt BUS_SPACE 9 .Os .Sh NAME @@ -68,6 +68,14 @@ .Nm bus_space_copy_region_stream_8 , .Nm bus_space_free , .Nm bus_space_map , +.Nm bus_space_peek_1 , +.Nm bus_space_peek_2 , +.Nm bus_space_peek_4 , +.Nm bus_space_peek_8 , +.Nm bus_space_poke_1 , +.Nm bus_space_poke_2 , +.Nm bus_space_poke_4 , +.Nm bus_space_poke_8 , .Nm bus_space_read_1 , .Nm bus_space_read_2 , .Nm bus_space_read_4 , @@ -161,6 +169,46 @@ .Fo bus_space_free .Fa "bus_space_tag_t space" "bus_space_handle_t handle" "bus_size_t si= ze" .Fc +.Ft int +.Fo bus_space_peek_1 +.Fa "bus_space_tag_t space" "bus_space_handle_t handle" "bus_size_t of= fset" +.Fa "uint8_t *datap" +.Fc +.Ft int +.Fo bus_space_peek_2 +.Fa "bus_space_tag_t space" "bus_space_handle_t handle" "bus_size_t of= fset" +.Fa "uint8_t *datap" +.Fc +.Ft int +.Fo bus_space_peek_4 +.Fa "bus_space_tag_t space" "bus_space_handle_t handle" "bus_size_t of= fset" +.Fa "uint8_t *datap" +.Fc +.Ft int +.Fo bus_space_peek_8 +.Fa "bus_space_tag_t space" "bus_space_handle_t handle" "bus_size_t of= fset" +.Fa "uint8_t *datap" +.Fc +.Ft int +.Fo bus_space_poke_1 +.Fa "bus_space_tag_t space" "bus_space_handle_t handle" "bus_size_t of= fset" +.Fa "uint8_t *datap" +.Fc +.Ft int +.Fo bus_space_poke_2 +.Fa "bus_space_tag_t space" "bus_space_handle_t handle" "bus_size_t of= fset" +.Fa "uint8_t *datap" +.Fc +.Ft int +.Fo bus_space_poke_4 +.Fa "bus_space_tag_t space" "bus_space_handle_t handle" "bus_size_t of= fset" +.Fa "uint8_t *datap" +.Fc +.Ft int +.Fo bus_space_poke_8 +.Fa "bus_space_tag_t space" "bus_space_handle_t handle" "bus_size_t of= fset" +.Fa "uint8_t *datap" +.Fc .Ft uint8_t .Fo bus_space_read_1 .Fa "bus_space_tag_t space" "bus_space_handle_t handle" "bus_size_t of= fset" @@ -1124,6 +1172,105 @@ If they would fail (e.g.\& because of an argument error), that indicates a software bug which should cause a panic. In that case, they will never return. +.Sh PROBING BUS SPACE FOR HARDWARE WHICH MAY NOT RESPOND +One problem with the +.Fn bus_space_read_N +and +.Fn bus_space_write_N +family of functions is that they provide no protection against +exceptions which can occur when no physical hardware or +device responds to the read or write cycles. +In such a situation, the system typically would panic due to a kernel-= mode +bus error. +The +.Fn bus_space_peek_N +and +.Fn bus_space_poke_N +family of functions provide a mechanism to handle these exceptions +gracefully without the risk of crashing the system. +.Pp +As with +.Fn bus_space_read_N +and +.Fn bus_space_write_N , +the peek and poke functions provide the ability to read and +write 1, 2, 4, and 8 byte data items on busses which support those +access sizes. +All of the constraints specified in the descriptions of the +.Fn bus_space_read_N +and +.Fn bus_space_write_N +functions also apply to +.Fn bus_space_peek_N +and +.Fn bus_space_poke_N . +.Pp +In addition, explicit calls to the +.Fn bus_space_barrier +function are not required as the implementation will ensure all +pending operations complete before the peek or poke operation starts. +The implementation will also ensure that the peek or poke operations +complete before returning. +.Pp +The return value indicates the outcome of the peek or poke operation. +A return value of zero implies that a hardware device is +responding to the operation at the specified offset in the bus space. +A non-zero return value indicates that the kernel intercepted a +hardware exception (e.g., bus error) when the peek or poke operation +was attempted. +Note that some busses are incapable of generating exceptions when +non-existent hardware is accessed. +In such cases, these functions will always return zero and the value o= f +the data read by +.Fn bus_space_peek_N +will be unspecified. +.Pp +Finally, it should be noted that at this time the +.Fn bus_space_peek_N +and +.Fn bus_space_poke_N +functions are not re-entrant and should not, therefore, be used +from within an interrupt service routine. +This constraint may be removed at some point in the future. +.Pp +.Bl -ohang -compact +.It Fn bus_space_peek_1 "space" "handle" "offset" "datap" +.It Fn bus_space_peek_2 "space" "handle" "offset" "datap" +.It Fn bus_space_peek_4 "space" "handle" "offset" "datap" +.It Fn bus_space_peek_8 "space" "handle" "offset" "datap" +.Pp +The +.Fn bus_space_peek_N +family of functions cautiously read a 1, 2, 4, or 8 byte data item fro= m +the offset specified by +.Fa offset +in the region specified by +.Fa handle +of the bus space specified by +.Fa space . +The data item read is stored in the location pointed to by +.Fa datap . +It is permissible for +.Fa datap +to be NULL, in which case the data item will be discarded after being = read. +.Pp +.It Fn bus_space_poke_1 "space" "handle" "offset" "value" +.It Fn bus_space_poke_2 "space" "handle" "offset" "value" +.It Fn bus_space_poke_4 "space" "handle" "offset" "value" +.It Fn bus_space_poke_8 "space" "handle" "offset" "value" +.Pp +The +.Fn bus_space_poke_N +family of functions cautiously write a 1, 2, 4, or 8 byte data item +specified by +.Fa value +to the offset specified by +.Fa offset +in the region specified by +.Fa handle +of the bus space specified by +.Fa space . +.El .Sh BARRIERS In order to allow high-performance buffering implementations to avoid = bus activity on every operation, read and write ordering should be specifi= ed Modified: head/sys/arm/include/bus.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/arm/include/bus.h Sat Sep 19 02:15:56 2020 (r365898) +++ head/sys/arm/include/bus.h Sat Sep 19 11:06:41 2020 (r365899) @@ -747,6 +747,33 @@ void generic_bs_unimplemented(void); #define BUS_SPACE_UNRESTRICTED (~0) +#define BUS_PEEK_FUNC(width, type) \ + static inline int \ + bus_space_peek_##width(bus_space_tag_t tag, \ + bus_space_handle_t hnd, bus_size_t offset, type *value) \ + { \ + type tmp; \ + tmp =3D bus_space_read_##width(tag, hnd, offset); \ + return (0); \ + } +BUS_PEEK_FUNC(1, uint8_t) +BUS_PEEK_FUNC(2, uint16_t) +BUS_PEEK_FUNC(4, uint32_t) +BUS_PEEK_FUNC(8, uint64_t) + +#define BUS_POKE_FUNC(width, type) \ + static inline int \ + bus_space_poke_##width(bus_space_tag_t tag, \ + bus_space_handle_t hnd, bus_size_t offset, type value) \ + { \ + bus_space_write_##width(tag, hnd, offset, value); \ + return (0); \ + } +BUS_POKE_FUNC(1, uint8_t) +BUS_POKE_FUNC(2, uint16_t) +BUS_POKE_FUNC(4, uint32_t) +BUS_POKE_FUNC(8, uint64_t) + #include /* Modified: head/sys/arm64/arm64/bus_machdep.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D --- head/sys/arm64/arm64/bus_machdep.c Sat Sep 19 02:15:56 2020 (r36589= 8) +++ head/sys/arm64/arm64/bus_machdep.c Sat Sep 19 11:06:41 2020 (r36589= 9) @@ -83,6 +83,16 @@ void generic_bs_wr_4(void *, bus_space_handle_t, bus= _s void generic_bs_wr_8(void *, bus_space_handle_t, bus_size_t, const uin= t64_t *, bus_size_t); +int generic_bs_peek_1(void *, bus_space_handle_t, bus_size_t , uint8_= t *); +int generic_bs_peek_2(void *, bus_space_handle_t, bus_size_t , uint16= _t *); +int generic_bs_peek_4(void *, bus_space_handle_t, bus_size_t , uint32= _t *); +int generic_bs_peek_8(void *, bus_space_handle_t, bus_size_t , uint64= _t *); + +int generic_bs_poke_1(void *, bus_space_handle_t, bus_size_t, uint8_t= ); +int generic_bs_poke_2(void *, bus_space_handle_t, bus_size_t, uint16_= t); +int generic_bs_poke_4(void *, bus_space_handle_t, bus_size_t, uint32_= t); +int generic_bs_poke_8(void *, bus_space_handle_t, bus_size_t, uint64_= t); + static int generic_bs_map(void *t, bus_addr_t bpa, bus_size_t size, int flags, bus_space_handle_t *bshp) @@ -223,6 +233,18 @@ struct bus_space memmap_bus =3D { .bs_wr_2_s =3D NULL, .bs_wr_4_s =3D NULL, .bs_wr_8_s =3D NULL, + + /* peek */ + .bs_peek_1 =3D generic_bs_peek_1, + .bs_peek_2 =3D generic_bs_peek_2, + .bs_peek_4 =3D generic_bs_peek_4, + .bs_peek_8 =3D generic_bs_peek_8, + + /* poke */ + .bs_poke_1 =3D generic_bs_poke_1, + .bs_poke_2 =3D generic_bs_poke_2, + .bs_poke_4 =3D generic_bs_poke_4, + .bs_poke_8 =3D generic_bs_poke_8, }; #ifdef FDT Modified: head/sys/arm64/arm64/bus_space_asm.S =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D --- head/sys/arm64/arm64/bus_space_asm.S Sat Sep 19 02:15:56 2020 (r365= 898) +++ head/sys/arm64/arm64/bus_space_asm.S Sat Sep 19 11:06:41 2020 (r365= 899) @@ -26,7 +26,6 @@ */ #include - __FBSDID("$FreeBSD$"); ENTRY(generic_bs_r_1) @@ -397,3 +396,84 @@ ENTRY(generic_bs_wr_8) 2: ret END(generic_bs_wr_8) + +ENTRY(generic_bs_fault) + mov x0, #-1 + ret +END(bus_fault) + +ENTRY(generic_bs_peek_1) + .globl generic_bs_peek_1f +generic_bs_peek_1f: + ldrb w0, [x1, x2] /* Checked instruction */ + dsb sy + strb w0,[x3] + mov x0, #0 + ret +END(generic_bs_peek_1) + +ENTRY(generic_bs_peek_2) + .globl generic_bs_peek_2f +generic_bs_peek_2f: + ldrh w0, [x1, x2] /* Checked instruction */ + dsb sy + strh w0,[x3] + mov x0, #0 + ret +END(generic_bs_peek_2) + +ENTRY(generic_bs_peek_4) + .globl generic_bs_peek_4f +generic_bs_peek_4f: + ldr w0, [x1, x2] /* Checked instruction */ + dsb sy + str w0,[x3] + mov x0, #0 + ret +END(generic_bs_peek_4) + +ENTRY(generic_bs_peek_8) + .globl generic_bs_peek_8f +generic_bs_peek_8f: + ldr x0, [x1, x2] /* Checked instruction */ + dsb sy + str x0,[x3] + mov x0, #0 + ret +END(generic_bs_peek_8) + +ENTRY(generic_bs_poke_1) + .globl generic_bs_poke_1f +generic_bs_poke_1f: + strb w3, [x1, x2] /* Checked instruction */ + dsb sy + mov x0, #0 + ret +END(generic_bs_poke_1) + +ENTRY(generic_bs_poke_2) + .globl generic_bs_poke_2f +generic_bs_poke_2f: + strh w3, [x1, x2] /* Checked instruction */ + dsb sy + mov x0, #0 + ret +END(generic_bs_poke_2) + +ENTRY(generic_bs_poke_4) + .globl generic_bs_poke_4f +generic_bs_poke_4f: + str w3, [x1, x2] /* Checked instruction */ + dsb sy + mov x0, #0 + ret +END(generic_bs_poke_4) + +ENTRY(generic_bs_poke_8) + .globl generic_bs_poke_8f +generic_bs_poke_8f: + str x3, [x1, x2] /* Checked instruction */ + dsb sy + mov x0, #0 + ret +END(generic_bs_poke_8) Modified: head/sys/arm64/arm64/trap.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D --- head/sys/arm64/arm64/trap.c Sat Sep 19 02:15:56 2020 (r365898) +++ head/sys/arm64/arm64/trap.c Sat Sep 19 11:06:41 2020 (r365899) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -88,6 +89,7 @@ typedef void (abort_handler)(struct thread *, struct = t static abort_handler align_abort; static abort_handler data_abort; +static abort_handler external_abort; static abort_handler *abort_handlers[] =3D { [ISS_DATA_DFSC_TF_L0] =3D data_abort, @@ -101,6 +103,7 @@ static abort_handler *abort_handlers[] =3D { [ISS_DATA_DFSC_PF_L2] =3D data_abort, [ISS_DATA_DFSC_PF_L3] =3D data_abort, [ISS_DATA_DFSC_ALIGN] =3D align_abort, + [ISS_DATA_DFSC_EXT] =3D external_abort, }; static __inline void @@ -154,6 +157,28 @@ cpu_fetch_syscall_args(struct thread *td) #include "../../kern/subr_syscall.c" +/* + * Test for fault generated by given access instruction in + * bus_peek_ or bus_poke_ bus function. + */ +extern uint32_t generic_bs_peek_1f, generic_bs_peek_2f; +extern uint32_t generic_bs_peek_4f, generic_bs_peek_8f; +extern uint32_t generic_bs_poke_1f, generic_bs_poke_2f; +extern uint32_t generic_bs_poke_4f, generic_bs_poke_8f; + +static bool +test_bs_fault(void *addr) +{ + return (addr =3D=3D &generic_bs_peek_1f || + addr =3D=3D &generic_bs_peek_2f || + addr =3D=3D &generic_bs_peek_4f || + addr =3D=3D &generic_bs_peek_8f || + addr =3D=3D &generic_bs_poke_1f || + addr =3D=3D &generic_bs_poke_2f || + addr =3D=3D &generic_bs_poke_4f || + addr =3D=3D &generic_bs_poke_8f); +} + static void svc_handler(struct thread *td, struct trapframe *frame) { @@ -182,6 +207,26 @@ align_abort(struct thread *td, struct trapframe *f= rame call_trapsignal(td, SIGBUS, BUS_ADRALN, (void *)frame->tf_elr, ESR_ELx_EXCEPTION(frame->tf_esr)); userret(td, frame); +} + + +static void +external_abort(struct thread *td, struct trapframe *frame, uint64_t es= r, + uint64_t far, int lower) +{ + + /* + * Try to handle synchronous external aborts caused by + * bus_space_peek() and/or bus_space_poke() functions. + */ + if (!lower && test_bs_fault((void *)frame->tf_elr)) { + frame->tf_elr =3D (uint64_t)generic_bs_fault; + return; + } + + print_registers(frame); + printf(" far: %16lx\n", far); + panic("Unhandled EL%d external data abort", lower ? 0: 1); } static void Modified: head/sys/arm64/include/bus.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/arm64/include/bus.h Sat Sep 19 02:15:56 2020 (r365898) +++ head/sys/arm64/include/bus.h Sat Sep 19 11:06:41 2020 (r365899) @@ -259,6 +259,24 @@ struct bus_space { bus_size_t, const u_int32_t *, bus_size_t); void (*bs_wr_8_s) (void *, bus_space_handle_t, bus_size_t, const u_int64_t *, bus_size_t); + /* peek */ + int (*bs_peek_1)(void *, bus_space_handle_t, + bus_size_t , uint8_t *); + int (*bs_peek_2)(void *, bus_space_handle_t, + bus_size_t , uint16_t *); + int (*bs_peek_4)(void *, bus_space_handle_t, + bus_size_t , uint32_t *); + int (*bs_peek_8)(void *, bus_space_handle_t, + bus_size_t , uint64_t *); + /* poke */ + int (*bs_poke_1)(void *, bus_space_handle_t, + bus_size_t, uint8_t); + int (*bs_poke_2)(void *, bus_space_handle_t, + bus_size_t, uint16_t); + int (*bs_poke_4)(void *, bus_space_handle_t, + bus_size_t, uint32_t); + int (*bs_poke_8)(void *, bus_space_handle_t, + bus_size_t, uint64_t); }; /* @@ -283,6 +301,10 @@ struct bus_space { (*(t)->__bs_opname_s(r,sz))((t)->bs_cookie, h, o) #define __bs_ws_s(sz, t, h, o, v) \ (*(t)->__bs_opname_s(w,sz))((t)->bs_cookie, h, o, v) +#define __bs_peek(sz, t, h, o, vp) \ + (*(t)->__bs_opname(peek, sz))((t)->bs_cookie, h, o, vp) +#define __bs_poke(sz, t, h, o, v) \ + (*(t)->__bs_opname(poke, sz))((t)->bs_cookie, h, o, v) #define __bs_nonsingle_s(type, sz, t, h, o, a, c) \ (*(t)->__bs_opname_s(type,sz))((t)->bs_cookie, h, o, a, c) @@ -456,6 +478,22 @@ struct bus_space { __bs_copy(4, t, h1, o1, h2, o2, c) #define bus_space_copy_region_8(t, h1, o1, h2, o2, c) \ __bs_copy(8, t, h1, o1, h2, o2, c) + +/* + * Poke (checked write) operations. + */ +#define bus_space_poke_1(t, h, o, v) __bs_poke(1, (t), (h), (o), (v)) +#define bus_space_poke_2(t, h, o, v) __bs_poke(2, (t), (h), (o), (v)) +#define bus_space_poke_4(t, h, o, v) __bs_poke(4, (t), (h), (o), (v)) +#define bus_space_poke_8(t, h, o, v) __bs_poke(8, (t), (h), (o), (v)) + +/* + * Peek (checked read) operations. + */ +#define bus_space_peek_1(t, h, o, vp) __bs_peek(1, (t), (h), (o), (vp)= ) +#define bus_space_peek_2(t, h, o, vp) __bs_peek(2, (t), (h), (o), (vp)= ) +#define bus_space_peek_4(t, h, o, vp) __bs_peek(4, (t), (h), (o), (vp)= ) +#define bus_space_peek_8(t, h, o, vp) __bs_peek(8, (t), (h), (o), (vp)= ) #endif Modified: head/sys/arm64/include/md_var.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/arm64/include/md_var.h Sat Sep 19 02:15:56 2020 (r365898) +++ head/sys/arm64/include/md_var.h Sat Sep 19 11:06:41 2020 (r365899) @@ -48,5 +48,14 @@ void busdma_swi(void); void dump_add_page(vm_paddr_t); void dump_drop_page(vm_paddr_t); int minidumpsys(struct dumperinfo *); +void generic_bs_fault(void) __asm(__STRING(generic_bs_fault)); +void generic_bs_peek_1(void) __asm(__STRING(generic_bs_peek_1)); +void generic_bs_peek_2(void) __asm(__STRING(generic_bs_peek_2)); +void generic_bs_peek_4(void) __asm(__STRING(generic_bs_peek_4)); +void generic_bs_peek_8(void) __asm(__STRING(generic_bs_peek_8)); +void generic_bs_poke_1(void) __asm(__STRING(generic_bs_poke_1)); +void generic_bs_poke_2(void) __asm(__STRING(generic_bs_poke_2)); +void generic_bs_poke_4(void) __asm(__STRING(generic_bs_poke_4)); +void generic_bs_poke_8(void) __asm(__STRING(generic_bs_poke_8)); #endif /* !_MACHINE_MD_VAR_H_ */ Modified: head/sys/kern/subr_csan.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/kern/subr_csan.c Sat Sep 19 02:15:56 2020 (r365898) +++ head/sys/kern/subr_csan.c Sat Sep 19 11:06:41 2020 (r365899) @@ -878,3 +878,33 @@ CSAN_BUS_SET_FUNC(multi_stream, 8, uint64_t) CSAN_BUS_SET_FUNC(region_stream, 8, uint64_t) #endif #endif + +#define CSAN_BUS_PEEK_FUNC(width, type) \ + int kcsan_bus_space_peek_##width(bus_space_tag_t tag, \ + bus_space_handle_t hnd, bus_size_t offset, type *value) \ + { \ + kcsan_access((uintptr_t)value, sizeof(type), true, false, \ + __RET_ADDR); \ + return (bus_space_peek_##width(tag, hnd, offset, value)); \ + } + +CSAN_BUS_PEEK_FUNC(1, uint8_t) +CSAN_BUS_PEEK_FUNC(2, uint16_t) +CSAN_BUS_PEEK_FUNC(4, uint32_t) +#if !defined(__i386__) +CSAN_BUS_PEEK_FUNC(8, uint64_t) +#endif + +#define CSAN_BUS_POKE_FUNC(width, type) \ + int kcsan_bus_space_poke_##width(bus_space_tag_t tag, \ + bus_space_handle_t hnd, bus_size_t offset, type value) \ + { \ + return (bus_space_poke_##width(tag, hnd, offset, value)); \ + } + +CSAN_BUS_POKE_FUNC(1, uint8_t) +CSAN_BUS_POKE_FUNC(2, uint16_t) +CSAN_BUS_POKE_FUNC(4, uint32_t) +#if !defined(__i386__) +CSAN_BUS_POKE_FUNC(8, uint64_t) +#endif Modified: head/sys/mips/include/bus.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/mips/include/bus.h Sat Sep 19 02:15:56 2020 (r365898) +++ head/sys/mips/include/bus.h Sat Sep 19 11:06:41 2020 (r365899) @@ -689,6 +689,33 @@ void __bs_c(f,_bs_c_8) (void *t, bus_space_handle_= t bs bs_c_4_proto(f); \ bs_c_8_proto(f); +#define BUS_PEEK_FUNC(width, type) \ + static inline int \ + bus_space_peek_##width(bus_space_tag_t tag, \ + bus_space_handle_t hnd, bus_size_t offset, type *value) \ + { \ + type tmp; \ + tmp =3D bus_space_read_##width(tag, hnd, offset); \ + return (0); \ + } +BUS_PEEK_FUNC(1, uint8_t) +BUS_PEEK_FUNC(2, uint16_t) +BUS_PEEK_FUNC(4, uint32_t) +BUS_PEEK_FUNC(8, uint64_t) + +#define BUS_POKE_FUNC(width, type) \ + static inline int \ + bus_space_poke_##width(bus_space_tag_t tag, \ + bus_space_handle_t hnd, bus_size_t offset, type value) \ + { \ + bus_space_write_##width(tag, hnd, offset, value); \ + return (0); \ + } +BUS_POKE_FUNC(1, uint8_t) +BUS_POKE_FUNC(2, uint16_t) +BUS_POKE_FUNC(4, uint32_t) +BUS_POKE_FUNC(8, uint64_t) + #define BUS_SPACE_ALIGNED_POINTER(p, t) ALIGNED_POINTER(p, t) #define BUS_SPACE_MAXADDR_24BIT 0xFFFFFF Modified: head/sys/powerpc/include/bus.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/powerpc/include/bus.h Sat Sep 19 02:15:56 2020 (r365898) +++ head/sys/powerpc/include/bus.h Sat Sep 19 11:06:41 2020 (r365899) @@ -462,6 +462,33 @@ extern struct bus_space bs_le_tag; __bs_copy(s_8, t, h1, o1, h2, o2, c) #endif +#define BUS_PEEK_FUNC(width, type) \ + static inline int \ + bus_space_peek_##width(bus_space_tag_t tag, \ + bus_space_handle_t hnd, bus_size_t offset, type *value) \ + { \ + type tmp; \ + tmp =3D bus_space_read_##width(tag, hnd, offset); \ + return (0); \ + } +BUS_PEEK_FUNC(1, uint8_t) +BUS_PEEK_FUNC(2, uint16_t) +BUS_PEEK_FUNC(4, uint32_t) +BUS_PEEK_FUNC(8, uint64_t) + +#define BUS_POKE_FUNC(width, type) \ + static inline int \ + bus_space_poke_##width(bus_space_tag_t tag, \ + bus_space_handle_t hnd, bus_size_t offset, type value) \ + { \ + bus_space_write_##width(tag, hnd, offset, value); \ + return (0); \ + } +BUS_POKE_FUNC(1, uint8_t) +BUS_POKE_FUNC(2, uint16_t) +BUS_POKE_FUNC(4, uint32_t) +BUS_POKE_FUNC(8, uint64_t) + #include #endif /* _MACHINE_BUS_H_ */ Modified: head/sys/riscv/include/bus.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/riscv/include/bus.h Sat Sep 19 02:15:56 2020 (r365898) +++ head/sys/riscv/include/bus.h Sat Sep 19 11:06:41 2020 (r365899) @@ -451,6 +451,33 @@ struct bus_space { #define bus_space_copy_region_8(t, h1, o1, h2, o2, c) \ __bs_copy(8, t, h1, o1, h2, o2, c) +#define BUS_PEEK_FUNC(width, type) \ + static inline int \ + bus_space_peek_##width(bus_space_tag_t tag, \ + bus_space_handle_t hnd, bus_size_t offset, type *value) \ + { \ + type tmp; \ + tmp =3D bus_space_read_##width(tag, hnd, offset); \ + return (0); \ + } +BUS_PEEK_FUNC(1, uint8_t) +BUS_PEEK_FUNC(2, uint16_t) +BUS_PEEK_FUNC(4, uint32_t) +BUS_PEEK_FUNC(8, uint64_t) + +#define BUS_POKE_FUNC(width, type) \ + static inline int \ + bus_space_poke_##width(bus_space_tag_t tag, \ + bus_space_handle_t hnd, bus_size_t offset, type value) \ + { \ + bus_space_write_##width(tag, hnd, offset, value); \ + return (0); \ + } +BUS_POKE_FUNC(1, uint8_t) +BUS_POKE_FUNC(2, uint16_t) +BUS_POKE_FUNC(4, uint32_t) +BUS_POKE_FUNC(8, uint64_t) + #include #endif /* _MACHINE_BUS_H_ */ Modified: head/sys/sys/_cscan_bus.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/_cscan_bus.h Sat Sep 19 02:15:56 2020 (r365898) +++ head/sys/sys/_cscan_bus.h Sat Sep 19 11:06:41 2020 (r365899) @@ -77,11 +77,21 @@ bus_space_handle_t, bus_size_t, bus_space_handle_t, \ bus_size_t, bus_size_t); +#define KCSAN_BS_PEEK(width, type) \ + int kcsan_bus_space_peek_##width(bus_space_tag_t, \ + bus_space_handle_t, bus_size_t, type *); + +#define KCSAN_BS_POKE(width, type) \ + int kcsan_bus_space_poke_##width(bus_space_tag_t, \ + bus_space_handle_t, bus_size_t, type); + #define KCSAN_BS(width, type) \ KCSAN_BS_READ(width, type); \ KCSAN_BS_WRITE(width, type); \ KCSAN_BS_SET(width, type); \ - KCSAN_BS_COPY(width, type) + KCSAN_BS_COPY(width, type) \ + KCSAN_BS_PEEK(width, type); \ + KCSAN_BS_POKE(width, type); KCSAN_BS(1, uint8_t); KCSAN_BS(2, uint16_t); @@ -127,6 +137,8 @@ void kcsan_bus_space_barrier(bus_space_tag_t, bus_s= pac #define bus_space_set_region_stream_1 kcsan_bus_space_set_region_strea= m_1 #define bus_space_copy_multi_1 kcsan_bus_space_copy_multi_1 #define bus_space_copy_multi_stream_1 kcsan_bus_space_copy_multi_strea= m_1 +#define bus_space_poke_1 kcsan_bus_space_poke_1 +#define bus_space_peek_1 kcsan_bus_space_peek_1 #define bus_space_read_2 kcsan_bus_space_read_2 #define bus_space_read_stream_2 kcsan_bus_space_read_stream_2 @@ -146,6 +158,8 @@ void kcsan_bus_space_barrier(bus_space_tag_t, bus_s= pac #define bus_space_set_region_stream_2 kcsan_bus_space_set_region_strea= m_2 #define bus_space_copy_multi_2 kcsan_bus_space_copy_multi_2 #define bus_space_copy_multi_stream_2 kcsan_bus_space_copy_multi_strea= m_2 +#define bus_space_poke_2 kcsan_bus_space_poke_2 +#define bus_space_peek_2 kcsan_bus_space_peek_2 #define bus_space_read_4 kcsan_bus_space_read_4 #define bus_space_read_stream_4 kcsan_bus_space_read_stream_4 @@ -165,6 +179,8 @@ void kcsan_bus_space_barrier(bus_space_tag_t, bus_s= pac #define bus_space_set_region_stream_4 kcsan_bus_space_set_region_strea= m_4 #define bus_space_copy_multi_4 kcsan_bus_space_copy_multi_4 #define bus_space_copy_multi_stream_4 kcsan_bus_space_copy_multi_strea= m_4 +#define bus_space_poke_4 kcsan_bus_space_poke_4 +#define bus_space_peek_4 kcsan_bus_space_peek_4 #define bus_space_read_8 kcsan_bus_space_read_8 #define bus_space_read_stream_8 kcsan_bus_space_read_stream_8 @@ -184,6 +200,9 @@ void kcsan_bus_space_barrier(bus_space_tag_t, bus_s= pac #define bus_space_set_region_stream_8 kcsan_bus_space_set_region_strea= m_8 #define bus_space_copy_multi_8 kcsan_bus_space_copy_multi_8 #define bus_space_copy_multi_stream_8 kcsan_bus_space_copy_multi_strea= m_8 +#define bus_space_poke_8 kcsan_bus_space_poke_8 +#define bus_space_peek_8 kcsan_bus_space_peek_8 + #endif /* !KCSAN_RUNTIME */ Modified: head/sys/sys/bus.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/bus.h Sat Sep 19 02:15:56 2020 (r365898) +++ head/sys/sys/bus.h Sat Sep 19 11:06:41 2020 (r365899) @@ -827,6 +827,10 @@ static __inline void varp ## _set_ ## var(device_t= dev #define bus_barrier(r, o, l, f) \ bus_space_barrier((r)->r_bustag, (r)->r_bushandle, (o), (l), (f)) +#define bus_poke_1(r, o, v) \ + bus_space_poke_1((r)->r_bustag, (r)->r_bushandle, (o), (v)) +#define bus_peek_1(r, o, vp) \ + bus_space_peek_1((r)->r_bustag, (r)->r_bushandle, (o), (vp)) #define bus_read_1(r, o) \ bus_space_read_1((r)->r_bustag, (r)->r_bushandle, (o)) #define bus_read_multi_1(r, o, d, c) \ @@ -859,6 +863,10 @@ static __inline void varp ## _set_ ## var(device_t= dev bus_space_write_multi_stream_1((r)->r_bustag, (r)->r_bushandle, (o), = (d), (c)) #define bus_write_region_stream_1(r, o, d, c) \ bus_space_write_region_stream_1((r)->r_bustag, (r)->r_bushandle, (o),= (d), (c)) +#define bus_poke_2(r, o, v) \ + bus_space_poke_2((r)->r_bustag, (r)->r_bushandle, (o), (v)) +#define bus_peek_2(r, o, vp) \ + bus_space_peek_2((r)->r_bustag, (r)->r_bushandle, (o), (vp)) #define bus_read_2(r, o) \ bus_space_read_2((r)->r_bustag, (r)->r_bushandle, (o)) #define bus_read_multi_2(r, o, d, c) \ @@ -891,6 +899,10 @@ static __inline void varp ## _set_ ## var(device_t= dev bus_space_write_multi_stream_2((r)->r_bustag, (r)->r_bushandle, (o), = (d), (c)) #define bus_write_region_stream_2(r, o, d, c) \ bus_space_write_region_stream_2((r)->r_bustag, (r)->r_bushandle, (o),= (d), (c)) +#define bus_poke_4(r, o, v) \ + bus_space_poke_4((r)->r_bustag, (r)->r_bushandle, (o), (v)) +#define bus_peek_4(r, o, vp) \ + bus_space_peek_4((r)->r_bustag, (r)->r_bushandle, (o), (vp)) #define bus_read_4(r, o) \ bus_space_read_4((r)->r_bustag, (r)->r_bushandle, (o)) #define bus_read_multi_4(r, o, d, c) \ @@ -923,6 +935,10 @@ static __inline void varp ## _set_ ## var(device_t= dev bus_space_write_multi_stream_4((r)->r_bustag, (r)->r_bushandle, (o), = (d), (c)) #define bus_write_region_stream_4(r, o, d, c) \ bus_space_write_region_stream_4((r)->r_bustag, (r)->r_bushandle, (o),= (d), (c)) +#define bus_poke_8(r, o, v) \ + bus_space_poke_8((r)->r_bustag, (r)->r_bushandle, (o), (v)) +#define bus_peek_8(r, o, vp) \ + bus_space_peek_8((r)->r_bustag, (r)->r_bushandle, (o), (vp)) #define bus_read_8(r, o) \ bus_space_read_8((r)->r_bustag, (r)->r_bushandle, (o)) #define bus_read_multi_8(r, o, d, c) \ Modified: head/sys/tools/bus_macro.sh =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/tools/bus_macro.sh Sat Sep 19 02:15:56 2020 (r365898) +++ head/sys/tools/bus_macro.sh Sat Sep 19 11:06:41 2020 (r365899) @@ -55,7 +55,8 @@ for w in 1 2 4 8 do # macro copy_region_$w so dh do c # macro copy_region_stream_$w ? - # macro peek_$w + macro poke_$w o v + macro peek_$w o vp for s in "" stream_ do macro read_$s$w o Modified: head/sys/x86/include/bus.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/x86/include/bus.h Sat Sep 19 02:15:56 2020 (r365898) +++ head/sys/x86/include/bus.h Sat Sep 19 11:06:41 2020 (r365899) @@ -1089,6 +1089,31 @@ bus_space_barrier(bus_space_tag_t tag __unused, = bus_sp #define bus_space_copy_region_stream_4(t, h1, o1, h2, o2, c) \ bus_space_copy_region_4((t), (h1), (o1), (h2), (o2), (c)) +#define BUS_PEEK_FUNC(width, type) \ + static inline int \ + bus_space_peek_##width(bus_space_tag_t tag, \ + bus_space_handle_t hnd, bus_size_t offset, type *value) \ + { \ + type tmp; \ + tmp =3D bus_space_read_##width(tag, hnd, offset); \ + return (0); \ + } +BUS_PEEK_FUNC(1, uint8_t) +BUS_PEEK_FUNC(2, uint16_t) +BUS_PEEK_FUNC(4, uint32_t) + +#define BUS_POKE_FUNC(width, type) \ + static inline int \ + bus_space_poke_##width(bus_space_tag_t tag, \ + bus_space_handle_t hnd, bus_size_t offset, type value) \ + { \ + bus_space_write_##width(tag, hnd, offset, value); \ + return (0); \ + } +BUS_POKE_FUNC(1, uint8_t) +BUS_POKE_FUNC(2, uint16_t) +BUS_POKE_FUNC(4, uint32_t) + #endif /* KCSAN && !KCSAN_RUNTIME */ #endif /* _X86_BUS_H_ */ From owner-svn-src-head@freebsd.org Tue Sep 22 13:00:03 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 114193E8C81; Tue, 22 Sep 2020 13:00:03 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwhH66f9Gz3ysT; Tue, 22 Sep 2020 13:00:02 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C7EEC1FD03; Tue, 22 Sep 2020 13:00:02 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08MD029s097365; Tue, 22 Sep 2020 13:00:02 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08MD02wf097364; Tue, 22 Sep 2020 13:00:02 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202009221300.08MD02wf097364@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Tue, 22 Sep 2020 13:00:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365995 - head/sys/riscv/conf X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: head/sys/riscv/conf X-SVN-Commit-Revision: 365995 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 13:00:03 -0000 Author: mhorne Date: Tue Sep 22 13:00:02 2020 New Revision: 365995 URL: https://svnweb.freebsd.org/changeset/base/365995 Log: RISC-V: build SiFive drivers and DTB in GENERIC In the spirit of the GENERIC config, we should include the drivers required to run on most supported platforms. Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D26501 Modified: head/sys/riscv/conf/GENERIC Modified: head/sys/riscv/conf/GENERIC ============================================================================== --- head/sys/riscv/conf/GENERIC Tue Sep 22 12:14:46 2020 (r365994) +++ head/sys/riscv/conf/GENERIC Tue Sep 22 13:00:02 2020 (r365995) @@ -163,4 +163,10 @@ device firmware # firmware assist module # Note that 'bpf' is required for DHCP. device bpf # Berkeley packet filter +# Flattened Device Tree options FDT +makeoptions MODULES_EXTRA+="dtb/sifive" + +# SiFive device drivers +device fu540spi +include "../sifive/std.sifive" From owner-svn-src-head@freebsd.org Tue Sep 22 14:02:17 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1FEDB3EA321; Tue, 22 Sep 2020 14:02:17 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: from sdaoden.eu (sdaoden.eu [217.144.132.164]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bwjfw5bFNz43cW; Tue, 22 Sep 2020 14:02:16 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: by sdaoden.eu (Postfix, from userid 1000) id A20D516057; Tue, 22 Sep 2020 16:02:14 +0200 (CEST) Date: Tue, 22 Sep 2020 16:02:14 +0200 From: Steffen Nurpmeso To: Greg Lehey Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r365984 - head/usr.bin/calendar/calendars Message-ID: <20200922140214.0vHBB%steffen@sdaoden.eu> In-Reply-To: <202009212255.08LMtpSp078237@repo.freebsd.org> References: <202009212255.08LMtpSp078237@repo.freebsd.org> Mail-Followup-To: Greg Lehey , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org User-Agent: s-nail v14.9.19 OpenPGP: id=EE19E1C1F2F7054F8D3954D8308964B51883A0DD; url=https://ftp.sdaoden.eu/steffen.asc; preference=signencrypt BlahBlahBlah: Any stupid boy can crush a beetle. But all the professors in the world can make no bugs. X-Rspamd-Queue-Id: 4Bwjfw5bFNz43cW X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:15987, ipnet:217.144.128.0/20, country:DE]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 14:02:17 -0000 Greg Lehey wrote in <202009212255.08LMtpSp078237@repo.freebsd.org>: |Author: grog |Date: Mon Sep 21 22:55:51 2020 |New Revision: 365984 |URL: https://svnweb.freebsd.org/changeset/base/365984 | |Log: | Remove claim that Allied Forces created "West Germany" in 1953. I can | find no historic substantiation for such a claim. The Federal | Republic of Germany was created by Germans on 23 May 1949, as also | noted in this file. I could imagine it was Konrad Adenauer (chancellor at that time) refusing (let aside western war winners) the Sowjet offer to reunite Germany shall Germany henceforth exist as a "neutral state" in the same sense as Switzerland claims to be neutral. He refused, instead forward looking to rearm the German army. That is, turning Germany to a part of the Western Alliance explicitly and willingly. Or was that in 1949? Hm. --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt) From owner-svn-src-head@freebsd.org Tue Sep 22 14:03:51 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 86B283EA050; Tue, 22 Sep 2020 14:03:51 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: from sdaoden.eu (sdaoden.eu [217.144.132.164]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bwjhl2xpsz441L; Tue, 22 Sep 2020 14:03:51 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: by sdaoden.eu (Postfix, from userid 1000) id 3E14716057; Tue, 22 Sep 2020 16:03:50 +0200 (CEST) Date: Tue, 22 Sep 2020 16:03:49 +0200 From: Steffen Nurpmeso To: Greg Lehey Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r365984 - head/usr.bin/calendar/calendars Message-ID: <20200922140349.YEPtM%steffen@sdaoden.eu> In-Reply-To: <202009212255.08LMtpSp078237@repo.freebsd.org> References: <202009212255.08LMtpSp078237@repo.freebsd.org> Mail-Followup-To: Greg Lehey , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org User-Agent: s-nail v14.9.19 OpenPGP: id=EE19E1C1F2F7054F8D3954D8308964B51883A0DD; url=https://ftp.sdaoden.eu/steffen.asc; preference=signencrypt BlahBlahBlah: Any stupid boy can crush a beetle. But all the professors in the world can make no bugs. X-Rspamd-Queue-Id: 4Bwjhl2xpsz441L X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15987, ipnet:217.144.128.0/20, country:DE] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 14:03:51 -0000 Greg Lehey wrote in <202009212255.08LMtpSp078237@repo.freebsd.org>: |Author: grog |Date: Mon Sep 21 22:55:51 2020 |New Revision: 365984 ... | head/usr.bin/calendar/calendars/calendar.history By the way, on DragonFly there was a rewrite of the calendar(1) program, it seems to have improved! --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt) From owner-svn-src-head@freebsd.org Tue Sep 22 15:08:11 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7A7373EBBFD for ; Tue, 22 Sep 2020 15:08:11 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2k.ore.mailhop.org (outbound2k.ore.mailhop.org [54.148.219.64]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bwl6z0PjZz47Tw for ; Tue, 22 Sep 2020 15:08:10 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1600787289; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=cadPb/2LJ243zjd0OxuJdkqhjej4sQ54TYzsxW6gbaA1leFws4EF6zjqsXSeNIOqT5pUkbQWsKE67 Sds4DbzOjFaDI3zgvhDuMRqpZhBqJtnk86BoaaDF4PCOYc4OSI6nouOvTpnKps7CuU65FRIPxvG8QJ Fy64Qu4F4IIkC89FFMsz8g/0AT2qMIj676+zzmWgCbOsROH8JW510ICvOVtE+5FjGnYdPH2eCSmanr p/wUOXv1yzbbYvG7hx9SwT6rlhlvB2PcMdifJ8+xjU+kxUyK7TXCoqatMD/tcNyDjf6NboWWsUPUx1 Ji3Oia4qMtT9N/LTQml5dvCI/ex1k1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=ERSqDfI5Lj/KtHRyFDDK40ctW3vcJaAJ+fRXLBkar3k=; b=vG6sKT0oZh4E2EEy19QirJjrWK1YxGb35ZAydzpqSwpi624O2EKgR/jupfEMZeyZoNYeazCKJszli SXW+gl8v7EgqUfnzUSsp/ps2n9Ec6HVxeytPZyeTRRaVQ8EUAIKfQ5E7CgJH8C6RGBn0qdJGVpTGej 0pL1aSnotM4CsE6pJzX2U2Iu8N9dXlPD2SRd0o+v6ltRJGEPzUkfOuAc6A++5Mj1iMM+9+fS4DaPzA CQjde0xrSyQ/IIzbynpwEygYjJ58XzvcSgjEQCfwdQSresnZV2qqngJYH24J2MYHpRSClWQnlCzaIn 4oW1RMYFs73D5BFCUXKKfuCgghrp25w== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=ERSqDfI5Lj/KtHRyFDDK40ctW3vcJaAJ+fRXLBkar3k=; b=JyWzWfYgk+Ss0ZwNfzMnd1zDXyRYRbzW2OV+QKfpbJJI6CUyNf5N0UWPOrweNU70MoDW84e/G8n9z sI/TijC2KOkBkMFgc/+AA3/UBPJDYzK7d5B5SsxOQvCulw41905vctJ8Kk8y03TS4cLkJZnIOCfLLI ZC7CK/yWDot0G8wVRaipQJ84s0MMvnCcgB/hD4D8uPcWXfbkiLvqR1x7zCut8D9vyUGQ6YRuCgbW+9 oAPkQQOYvNz4KeIGKZRd0VPGo2ghRQ/HIi4wxK8MA2CjSEQeGql+u5moRoQITXVYbzGNoawFAAWr1+ mRg1Wim06TGapkURt2jWmgxZdi16CeA== X-MHO-RoutePath: aGlwcGll X-MHO-User: 6aaa911e-fce5-11ea-9e11-df46ed8f892f X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (c-67-177-211-60.hsd1.co.comcast.net [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id 6aaa911e-fce5-11ea-9e11-df46ed8f892f; Tue, 22 Sep 2020 15:08:08 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 08MF85jx025309; Tue, 22 Sep 2020 09:08:05 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: Subject: Re: svn commit: r365984 - head/usr.bin/calendar/calendars From: Ian Lepore To: Steffen Nurpmeso , Greg Lehey Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Tue, 22 Sep 2020 09:08:05 -0600 In-Reply-To: <20200922140214.0vHBB%steffen@sdaoden.eu> References: <202009212255.08LMtpSp078237@repo.freebsd.org> <20200922140214.0vHBB%steffen@sdaoden.eu> Content-Type: text/plain; charset="ASCII" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Bwl6z0PjZz47Tw X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; ASN(0.00)[asn:16509, ipnet:54.148.0.0/15, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 15:08:11 -0000 On Tue, 2020-09-22 at 16:02 +0200, Steffen Nurpmeso wrote: > Greg Lehey wrote in > <202009212255.08LMtpSp078237@repo.freebsd.org>: > |Author: grog > |Date: Mon Sep 21 22:55:51 2020 > |New Revision: 365984 > |URL: https://svnweb.freebsd.org/changeset/base/365984 > | > |Log: > | Remove claim that Allied Forces created "West Germany" in > 1953. I can > | find no historic substantiation for such a claim. The Federal > | Republic of Germany was created by Germans on 23 May 1949, as > also > | noted in this file. > > I could imagine it was Konrad Adenauer (chancellor at that time) > refusing (let aside western war winners) the Sowjet offer to > reunite Germany shall Germany henceforth exist as a "neutral > state" in the same sense as Switzerland claims to be neutral. > He refused, instead forward looking to rearm the German army. > That is, turning Germany to a part of the Western Alliance > explicitly and willingly. Or was that in 1949? Hm. > > And this is why I agree with Cy and Conrad that we should not be trying to be wikipedia lite. -- Ian From owner-svn-src-head@freebsd.org Tue Sep 22 15:54:06 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1B5C53ED138; Tue, 22 Sep 2020 15:54:06 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bwm7x6ysQz4D3Q; Tue, 22 Sep 2020 15:54:05 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D380F21E88; Tue, 22 Sep 2020 15:54:05 +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 08MFs5qa009274; Tue, 22 Sep 2020 15:54:05 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08MFs5qH009273; Tue, 22 Sep 2020 15:54:05 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202009221554.08MFs5qH009273@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 22 Sep 2020 15:54:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366002 - head/libexec/tftpd X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/libexec/tftpd X-SVN-Commit-Revision: 366002 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 15:54:06 -0000 Author: markj Date: Tue Sep 22 15:54:05 2020 New Revision: 366002 URL: https://svnweb.freebsd.org/changeset/base/366002 Log: tftpd: Check for errors from chdir() MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/libexec/tftpd/tftpd.c Modified: head/libexec/tftpd/tftpd.c ============================================================================== --- head/libexec/tftpd/tftpd.c Tue Sep 22 15:01:34 2020 (r366001) +++ head/libexec/tftpd/tftpd.c Tue Sep 22 15:54:05 2020 (r366002) @@ -373,7 +373,10 @@ main(int argc, char *argv[]) chroot_dir, strerror(errno)); exit(1); } - chdir("/"); + if (chdir("/") != 0) { + tftp_log(LOG_ERR, "chdir: %s", strerror(errno)); + exit(1); + } if (setgroups(1, &nobody->pw_gid) != 0) { tftp_log(LOG_ERR, "setgroups failed"); exit(1); From owner-svn-src-head@freebsd.org Tue Sep 22 15:54:19 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 334A23ED594; Tue, 22 Sep 2020 15:54:19 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bwm8C0gcfz4DHS; Tue, 22 Sep 2020 15:54:19 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EFD54218F4; Tue, 22 Sep 2020 15:54:18 +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 08MFsIIg009325; Tue, 22 Sep 2020 15:54:18 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08MFsIOT009324; Tue, 22 Sep 2020 15:54:18 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202009221554.08MFsIOT009324@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 22 Sep 2020 15:54:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366003 - head/libexec/ftpd X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/libexec/ftpd X-SVN-Commit-Revision: 366003 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 15:54:19 -0000 Author: markj Date: Tue Sep 22 15:54:18 2020 New Revision: 366003 URL: https://svnweb.freebsd.org/changeset/base/366003 Log: ftpd: Add missing braces around a statfd check This was harmless but looked incorrect. No functional change intended. MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/libexec/ftpd/ftpd.c Modified: head/libexec/ftpd/ftpd.c ============================================================================== --- head/libexec/ftpd/ftpd.c Tue Sep 22 15:54:05 2020 (r366002) +++ head/libexec/ftpd/ftpd.c Tue Sep 22 15:54:18 2020 (r366003) @@ -1530,7 +1530,7 @@ skip: setusercontext(lc, pw, 0, LOGIN_SETRESOURCES); #endif - if (guest && stats && statfd < 0) + if (guest && stats && statfd < 0) { #ifdef VIRTUAL_HOSTING statfd = open(thishost->statfile, O_WRONLY|O_APPEND); #else @@ -1538,6 +1538,7 @@ skip: #endif if (statfd < 0) stats = 0; + } /* * For a chrooted local user, From owner-svn-src-head@freebsd.org Tue Sep 22 15:56:21 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3A7D03EDD0F; Tue, 22 Sep 2020 15:56:21 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: from sdaoden.eu (sdaoden.eu [217.144.132.164]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwmBX1WRpz4DvT; Tue, 22 Sep 2020 15:56:20 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: by sdaoden.eu (Postfix, from userid 1000) id 4D30E16057; Tue, 22 Sep 2020 17:56:18 +0200 (CEST) Date: Tue, 22 Sep 2020 17:56:17 +0200 From: Steffen Nurpmeso To: Ian Lepore Cc: Greg Lehey , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r365984 - head/usr.bin/calendar/calendars Message-ID: <20200922155617.JUjMI%steffen@sdaoden.eu> In-Reply-To: References: <202009212255.08LMtpSp078237@repo.freebsd.org> <20200922140214.0vHBB%steffen@sdaoden.eu> Mail-Followup-To: Ian Lepore , Greg Lehey , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org User-Agent: s-nail v14.9.19 OpenPGP: id=EE19E1C1F2F7054F8D3954D8308964B51883A0DD; url=https://ftp.sdaoden.eu/steffen.asc; preference=signencrypt BlahBlahBlah: Any stupid boy can crush a beetle. But all the professors in the world can make no bugs. X-Rspamd-Queue-Id: 4BwmBX1WRpz4DvT X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of steffen@sdaoden.eu designates 217.144.132.164 as permitted sender) smtp.mailfrom=steffen@sdaoden.eu X-Spamd-Result: default: False [-1.60 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.02)[-1.017]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+a]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[sdaoden.eu]; NEURAL_HAM_LONG(-1.05)[-1.051]; RCPT_COUNT_FIVE(0.00)[5]; NEURAL_HAM_SHORT(-0.23)[-0.229]; MID_CONTAINS_FROM(1.00)[]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15987, ipnet:217.144.128.0/20, country:DE]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 15:56:21 -0000 Ian Lepore wrote in : |On Tue, 2020-09-22 at 16:02 +0200, Steffen Nurpmeso wrote: |> Greg Lehey wrote in |> <202009212255.08LMtpSp078237@repo.freebsd.org>: |>|Author: grog |>|Date: Mon Sep 21 22:55:51 2020 |>|New Revision: 365984 |>|URL: https://svnweb.freebsd.org/changeset/base/365984 |>| |>|Log: |>| Remove claim that Allied Forces created "West Germany" in |> 1953. I can |>| find no historic substantiation for such a claim. The Federal |>| Republic of Germany was created by Germans on 23 May 1949, as |> also |>| noted in this file. |> |> I could imagine it was Konrad Adenauer (chancellor at that time) |> refusing (let aside western war winners) the Sowjet offer to |> reunite Germany shall Germany henceforth exist as a "neutral |> state" in the same sense as Switzerland claims to be neutral. |> He refused, instead forward looking to rearm the German army. |> That is, turning Germany to a part of the Western Alliance |> explicitly and willingly. Or was that in 1949? Hm. | |And this is why I agree with Cy and Conrad that we should not be trying |to be wikipedia lite. Not finding anything at all that is to say then? On Wikipedia there is lobbyism and even war in big style for sure, you can very often see this. In fact, _this_ calendar entry is so fine because it mentions something that is not talked about in Germany, the last time i have heard it in the public was about twenty years ago, wait, it was in fact 2003 during the German public law TV show "Greatest Germans", and once the brave man said it ("sometimes the truth has to be told") it came out how that audience was mounted, because a loud LIE!!!!! could be heard. And yes, Konrad Adenauer was voted the greatest german of all time, a wise and comprehensible decision, outperforming those dwarfs like Goethe, Schiller, Beethoven, Einstein, Bach, and our wonderful emperor even. I do not understand! The calendar program came into BSD in 1981 and originally only looked for per user calendar files. I am using this program ever since i started using FreeBSD, now also on Linux. Other than that i cannot help it, you know. But it is great that just recently someone pimped the codebase in order to make it work with other calendar formats also, i think. (I cloned that specific repository in addition the second i read the announcement. Have not tried it yet though. But will keep it.) --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt) From owner-svn-src-head@freebsd.org Tue Sep 22 16:02:33 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C0B833EDE4D for ; Tue, 22 Sep 2020 16:02:33 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2k.ore.mailhop.org (outbound2k.ore.mailhop.org [54.148.219.64]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwmKj3fpQz4FLq for ; Tue, 22 Sep 2020 16:02:33 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1600790552; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=aRCs0IbRGuVJIHF8XKsKxFCYG6oGMQOmeozJNfENcC1SIw+6Pzo4Xj0OFSJ5wPJclwQZQIoRGACi7 CVIAbrc54lYV2AOi+Y46KL41VGmUBC6xxXOBbx93SVMHY1SnkNBHfl16p3DZ6iIysqKQIf6m9kyE8v mh+neVE3uqznmoIKqk9QlyScKqTKaYOpOrct0bszPPkxJyjTetYWhP9bmqqo4r1FPKHew5fN72eD2d /HiezCHsfrpsBaiR5pS0B8owTm4QdLnK+ansp9Ke5ZX+FjelOC8R3y2I1ZxfpgK089yMrX8anBNIo0 juvisbuIRzQfzo8ty7xXNhjlCae8OOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=t6G4DexJ6Zjlpz4mfD5Kc47Ek5L0gcqtkl6SO7P3U5Y=; b=QfMpeZpEUtfF0sg5rZLTwyc63MQv2a68riA1VYPenlERvR/N7SMmFQIcUcodoUe8O5/VILZfx0MEt Lr7H11CB4eFAJP2tTw7uIQT3W+E7XhwZMOSF692TUqIGJIStv+dmYhYMIhagtvFzMts09BDjydSCa+ ttGTG33a3hzo3nhmjgKmo7w+eBiFEkIdJDAf5chWBT9+YJggiaHCo32ID2domqmVI5ItpGzOG5Hoaf 1ulCjFyIZU5nrDabk6IsvbzGudkQxnN25jN0Zyn1n1XqZIMDVEDnN36izKrlnf/xiENinMc5nqPzcO eu4XqF5JGGviWU/zEufPHoY6dADREZw== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=t6G4DexJ6Zjlpz4mfD5Kc47Ek5L0gcqtkl6SO7P3U5Y=; b=nqW5oJ/oNKkGLCZNjx2D+YPJsxLdZtwlzC+cvwHMupGY+gSG+fNNbWQh6jr14VnuiumRFpJM3zmPc UJW7ekAJew4GUfVxv8jy9V52/ZXb3zdDQ1XEbCc0z+gikiz7uY2XpFIhAqIKtjK0UrWaJTcI0B0rjI d45tk9ka6CRVxLGTU9w6SUDc4eflJcSjiDdfL/kuqbatEuB2DHip0KDgwvZodauC8yvSVQLrPsWNuX ypb3B1gFoZigaram27QG05DwE13D4Pb7wQn6u4Z5xLkMDbF1R6t/54GvRXLan1aF9OeByF0vNwBCB4 gKfj8MiUrHY0UWk8r5G5MF0BlE3LKQg== X-MHO-RoutePath: aGlwcGll X-MHO-User: 0404aaad-fced-11ea-9e11-df46ed8f892f X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (c-67-177-211-60.hsd1.co.comcast.net [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id 0404aaad-fced-11ea-9e11-df46ed8f892f; Tue, 22 Sep 2020 16:02:30 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 08MG2T72025513; Tue, 22 Sep 2020 10:02:29 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <65448d226d8cf4318c1db49af993a14e54034dab.camel@freebsd.org> Subject: Re: svn commit: r365984 - head/usr.bin/calendar/calendars From: Ian Lepore To: Steffen Nurpmeso Cc: Greg Lehey , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Tue, 22 Sep 2020 10:02:28 -0600 In-Reply-To: <20200922155617.JUjMI%steffen@sdaoden.eu> References: <202009212255.08LMtpSp078237@repo.freebsd.org> <20200922140214.0vHBB%steffen@sdaoden.eu> <20200922155617.JUjMI%steffen@sdaoden.eu> Content-Type: text/plain; charset="ASCII" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4BwmKj3fpQz4FLq X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; ASN(0.00)[asn:16509, ipnet:54.148.0.0/15, country:US]; local_wl_from(0.00)[freebsd.org] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 16:02:33 -0000 On Tue, 2020-09-22 at 17:56 +0200, Steffen Nurpmeso wrote: > Ian Lepore wrote in > : > |On Tue, 2020-09-22 at 16:02 +0200, Steffen Nurpmeso wrote: > |> Greg Lehey wrote in > |> <202009212255.08LMtpSp078237@repo.freebsd.org>: > |>|Author: grog > |>|Date: Mon Sep 21 22:55:51 2020 > |>|New Revision: 365984 > |>|URL: https://svnweb.freebsd.org/changeset/base/365984 > |>| > |>|Log: > |>| Remove claim that Allied Forces created "West Germany" in > |> 1953. I can > |>| find no historic substantiation for such a claim. The Federal > |>| Republic of Germany was created by Germans on 23 May 1949, as > |> also > |>| noted in this file. > |> > |> I could imagine it was Konrad Adenauer (chancellor at that time) > |> refusing (let aside western war winners) the Sowjet offer to > |> reunite Germany shall Germany henceforth exist as a "neutral > |> state" in the same sense as Switzerland claims to be neutral. > |> He refused, instead forward looking to rearm the German army. > |> That is, turning Germany to a part of the Western Alliance > |> explicitly and willingly. Or was that in 1949? Hm. > | > |And this is why I agree with Cy and Conrad that we should not be > trying > |to be wikipedia lite. > > Not finding anything at all that is to say then? > On Wikipedia there is lobbyism and even war in big style for sure, > you can very often see this. > In fact, _this_ calendar entry is so fine because it mentions > something that is not talked about in Germany, the last time > i have heard it in the public was about twenty years ago, wait, it > was in fact 2003 during the German public law TV show "Greatest > Germans", and once the brave man said it ("sometimes the truth has > to be told") it came out how that audience was mounted, because > a loud LIE!!!!! could be heard. And yes, Konrad Adenauer was > voted the greatest german of all time, a wise and comprehensible > decision, outperforming those dwarfs like Goethe, Schiller, > Beethoven, Einstein, Bach, and our wonderful emperor even. I do > not understand! > > The calendar program came into BSD in 1981 and originally only > looked for per user calendar files. > I am using this program ever since i started using FreeBSD, now > also on Linux. Other than that i cannot help it, you know. > But it is great that just recently someone pimped the codebase in > order to make it work with other calendar formats also, i think. > (I cloned that specific repository in addition the second i read > the announcement. Have not tried it yet though. But will keep > it.) > And now you're arguing about the factual correctness of your comment in reply to my comment which wasn't about the facts at all. Thank you for proving my point most elequently about why we should not be purveyors of trivia or general knowledge. -- Ian From owner-svn-src-head@freebsd.org Tue Sep 22 16:12:06 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E11F33EE401; Tue, 22 Sep 2020 16:12:06 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: from sdaoden.eu (sdaoden.eu [217.144.132.164]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwmXj2Dncz4Fbr; Tue, 22 Sep 2020 16:12:05 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: by sdaoden.eu (Postfix, from userid 1000) id 2B1D516057; Tue, 22 Sep 2020 18:12:04 +0200 (CEST) Date: Tue, 22 Sep 2020 18:12:04 +0200 From: Steffen Nurpmeso To: Ian Lepore Cc: Greg Lehey , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r365984 - head/usr.bin/calendar/calendars Message-ID: <20200922161204.D1O8e%steffen@sdaoden.eu> In-Reply-To: <65448d226d8cf4318c1db49af993a14e54034dab.camel@freebsd.org> References: <202009212255.08LMtpSp078237@repo.freebsd.org> <20200922140214.0vHBB%steffen@sdaoden.eu> <20200922155617.JUjMI%steffen@sdaoden.eu> <65448d226d8cf4318c1db49af993a14e54034dab.camel@freebsd.org> Mail-Followup-To: Ian Lepore , Greg Lehey , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org User-Agent: s-nail v14.9.19 OpenPGP: id=EE19E1C1F2F7054F8D3954D8308964B51883A0DD; url=https://ftp.sdaoden.eu/steffen.asc; preference=signencrypt BlahBlahBlah: Any stupid boy can crush a beetle. But all the professors in the world can make no bugs. X-Rspamd-Queue-Id: 4BwmXj2Dncz4Fbr X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of steffen@sdaoden.eu designates 217.144.132.164 as permitted sender) smtp.mailfrom=steffen@sdaoden.eu X-Spamd-Result: default: False [-1.61 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.01)[-1.015]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[sdaoden.eu]; NEURAL_HAM_LONG(-1.05)[-1.048]; RCPT_COUNT_FIVE(0.00)[5]; NEURAL_HAM_SHORT(-0.25)[-0.247]; MID_CONTAINS_FROM(1.00)[]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15987, ipnet:217.144.128.0/20, country:DE]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 16:12:07 -0000 Ian Lepore wrote in <65448d226d8cf4318c1db49af993a14e54034dab.camel@freebsd.org>: |And now you're arguing about the factual correctness of your comment in |reply to my comment which wasn't about the facts at all. | |Thank you for proving my point most elequently about why we should not |be purveyors of trivia or general knowledge. Not true. I even gave the suggestion to return to the original calendar approach. Furthermore everything should be taken with a grain of salt like i think Warner Losh would say it, even if it comes from the FreeBSD community. --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt) From owner-svn-src-head@freebsd.org Tue Sep 22 16:18:10 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 74C723EE5B2; Tue, 22 Sep 2020 16:18:10 +0000 (UTC) (envelope-from xtouqh@hotmail.com) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2068.outbound.protection.outlook.com [40.92.89.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "GlobalSign Organization Validation CA - SHA256 - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bwmgj3CDnz4Fn5; Tue, 22 Sep 2020 16:18:09 +0000 (UTC) (envelope-from xtouqh@hotmail.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cto1K92SIuyDFj0zhDr1rAijssZRnDLKVuERRTTN/We/VjDhO+OrVtm3dJLhJyxAKRwSgW7rKoUDWas71idrsXJYitGNgIiwZ7vgOEcwpMTZnWEZUHD6y1t7IKua2v33nmj4pMoPbJcPctkBSqVlN14ePp5ajH60KBafHJSGpaVbQDwP8VIAPGR7fYPqUbBHaCJusfSjj72WuMfKZJYSrCQV3JgMVpk0c/Ry9v1x8AGLjjgLxfa5VIM1JPNkGYh3aLO8HouJ6wr0OpPJ8lV1ZPNaOm4ZyrLdSjfIpZsTPg0RonS89Sc+inZAsozNN8qxwufbCxI+JfzYaUBMNXV/Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Z9faVe2jrrV7yc02bXP2Hco+bp2v1idcWIieI6E/wbQ=; b=T/1XCWRDOnywc3o9hZ1WnbZVu35XjBAheU1kvPL4QI16evWFcRl3LQgcLf20YeDkG1sZN/xCDqmWkNxupXu8BxIJ2YRdLAlVqfscoydMTrW1aVo2v844UV01OH+u/ZjsHYD0/p2LhDudhx2CmXusGHlcsOrW0hBVP0lBSI9Mog/rX4jyxng/t7qDg6y+7UcATytKP93nhloiUQr9HHBJJqIPlKUo4VJpZiEMIUCFvzX7EbvqLDYqCKOzZ4Cc4JQCbaQSwJMSg1LWQNhDGU8qhbDTtZg3mHNbMXjuFoNRsBG3UWv5qUuyHjrdcsSNVvnPCJJGp/Si+1DE+oSamnmxVA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Z9faVe2jrrV7yc02bXP2Hco+bp2v1idcWIieI6E/wbQ=; b=ejhhNaVBaZ3rs2VXOmfKLitRWmbhZtbHF96ay4uqiWIOhMRJlO3MqpR2TvXHfB5/bucwybf4/RBkDyY788nudDf9hAcUqV6ealgUu6Y0Fm3DiyWQ5SamSIBIIUgrdflBNlF8w1NTYb6faLN2C+mb7COyunZfSsf01sKl133MygfPMvAwuhWvXybgrwySsNVRTU0eEyM5Z9JMZJ8n7WzaNPaLPeBtXbCfFeXBcbZ37/rGDlUyEix+/lJ4AGSGJC4Rj8wKfNYDYHzkDAvo/baW4zgzgzQaP33TIB0MbD7/Hb6q9x/lIansoRyzDEg93emWTaL3jvunFzvK7FIvRf+R/w== Received: from AM6EUR05FT037.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc11::4c) by AM6EUR05HT086.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc11::110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.15; Tue, 22 Sep 2020 16:02:34 +0000 Received: from AM0PR06MB3986.eurprd06.prod.outlook.com (2a01:111:e400:fc11::4b) by AM6EUR05FT037.mail.protection.outlook.com (2a01:111:e400:fc11::440) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.15 via Frontend Transport; Tue, 22 Sep 2020 16:02:34 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:D882CC4D97DEC2274CCDCAB28B761EDB0BE55960DDC029361585CEFC2DCB558B; UpperCasedChecksum:F1842C42FCC92084EC8CD2158283723EDB56FA20328909905AB11887D535AFA2; SizeAsReceived:8937; Count:48 Received: from AM0PR06MB3986.eurprd06.prod.outlook.com ([fe80::9dd1:2866:7eae:1ccf]) by AM0PR06MB3986.eurprd06.prod.outlook.com ([fe80::9dd1:2866:7eae:1ccf%7]) with mapi id 15.20.3391.027; Tue, 22 Sep 2020 16:02:34 +0000 Subject: Re: svn commit: r365984 - head/usr.bin/calendar/calendars To: Ian Lepore , Greg Lehey , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202009212255.08LMtpSp078237@repo.freebsd.org> <20200922140214.0vHBB%steffen@sdaoden.eu> <20200922155617.JUjMI%steffen@sdaoden.eu> From: xtouqh@hotmail.com Message-ID: Date: Tue, 22 Sep 2020 19:02:33 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.2.2 In-Reply-To: <20200922155617.JUjMI%steffen@sdaoden.eu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: AM0PR04CA0070.eurprd04.prod.outlook.com (2603:10a6:208:1::47) To AM0PR06MB3986.eurprd06.prod.outlook.com (2603:10a6:208:b6::28) X-Microsoft-Original-Message-ID: <826f4dfd-c024-207d-e8b4-c0c8e83bc259@hotmail.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.1.6] (91.240.124.157) by AM0PR04CA0070.eurprd04.prod.outlook.com (2603:10a6:208:1::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.13 via Frontend Transport; Tue, 22 Sep 2020 16:02:33 +0000 X-Microsoft-Original-Message-ID: <826f4dfd-c024-207d-e8b4-c0c8e83bc259@hotmail.com> X-TMN: [jl5wBDZx3I4L9FT+t/OX83w5PRNT97yv] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 7c4b23c5-032a-4c6f-e208-08d85f10eb17 X-MS-TrafficTypeDiagnostic: AM6EUR05HT086: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 27fONYBCcZHKS1w/M3rubO+LqJ/nQ0VX8xnGtMfV8chIDEhOhkZXwFen+rBTsY7u2xGJX1EAj9tjW5s3sU+CkT7VCeQR+7rzahAFZ+J3UvuqHDeEhhdzAf+dt+SlFEo9hXTyROJckSIk9Vd3M6fHeiT+3NSgcqV+r5y5uuS12o48uifM11ElFojhEygtiNPucX6C8b2d9BFk8BSujPG9ixh9Sc3AlrxBPWPLmyRRw4Ht7ASnl+z3GZdP5fJ2qZUX X-MS-Exchange-AntiSpam-MessageData: cCzLpZ2mz62P42+MQwkAgyTdn8NQyjrJJBSIv5daJc2y/4V8L9R8DrpIUvvHzyRNMc152VKheRFdhoV/yYJ+SVapiw94kVt312HqUh6TsG+QVjUYQjhewqQaOyaFmxfxweVlKSrMP5vpjDJ6a9X2vg== X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7c4b23c5-032a-4c6f-e208-08d85f10eb17 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Sep 2020 16:02:34.7588 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: AM6EUR05FT037.eop-eur05.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6EUR05HT086 X-Rspamd-Queue-Id: 4Bwmgj3CDnz4Fn5 X-Spamd-Bar: ++++++ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=hotmail.com header.s=selector1 header.b=ejhhNaVB; dmarc=pass (policy=none) header.from=hotmail.com; spf=pass (mx1.freebsd.org: domain of xtouqh@hotmail.com designates 40.92.89.68 as permitted sender) smtp.mailfrom=xtouqh@hotmail.com X-Spamd-Result: default: False [6.46 / 15.00]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[hotmail.com]; R_SPF_ALLOW(0.00)[+ip4:40.92.0.0/15]; RCPT_COUNT_FIVE(0.00)[5]; DKIM_TRACE(0.00)[hotmail.com:+]; DMARC_POLICY_ALLOW(0.00)[hotmail.com,none]; NEURAL_HAM_SHORT(-0.04)[-0.039]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[hotmail.com]; ASN(0.00)[asn:8075, ipnet:40.80.0.0/12, country:US]; FORGED_MUA_THUNDERBIRD_MSGID_UNKNOWN(2.50)[]; ARC_ALLOW(0.00)[microsoft.com:s=arcselector9901:i=1]; DWL_DNSWL_NONE(0.00)[hotmail.com:dkim]; RECEIVED_SPAMHAUS_XBL(5.00)[91.240.124.157:received]; R_DKIM_ALLOW(0.00)[hotmail.com:s=selector1]; RCVD_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.57)[-0.567]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_MEDIUM(-0.43)[-0.430]; BAD_REP_POLICIES(0.10)[]; FROM_NO_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[40.92.89.68:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[40.92.89.68:from]; GREYLIST(0.00)[pass,body]; MAILMAN_DEST(0.00)[svn-src-head,svn-src-all] X-Spam: Yes X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 16:18:10 -0000 Steffen Nurpmeso wrote: > Ian Lepore wrote in > : > |On Tue, 2020-09-22 at 16:02 +0200, Steffen Nurpmeso wrote: > |> Greg Lehey wrote in > |> <202009212255.08LMtpSp078237@repo.freebsd.org>: > |>|Author: grog > |>|Date: Mon Sep 21 22:55:51 2020 > |>|New Revision: 365984 > |>|URL: https://svnweb.freebsd.org/changeset/base/365984 > |>| > |>|Log: > |>| Remove claim that Allied Forces created "West Germany" in > |> 1953. I can > |>| find no historic substantiation for such a claim. The Federal > |>| Republic of Germany was created by Germans on 23 May 1949, as > |> also > |>| noted in this file. > |> > |> I could imagine it was Konrad Adenauer (chancellor at that time) > |> refusing (let aside western war winners) the Sowjet offer to > |> reunite Germany shall Germany henceforth exist as a "neutral > |> state" in the same sense as Switzerland claims to be neutral. > |> He refused, instead forward looking to rearm the German army. > |> That is, turning Germany to a part of the Western Alliance > |> explicitly and willingly. Or was that in 1949? Hm. > | > |And this is why I agree with Cy and Conrad that we should not be trying > |to be wikipedia lite. [offtopic trimmed] Yet again, that's exactly why this needs to go, political stuff has no place in the OS source. From owner-svn-src-head@freebsd.org Tue Sep 22 16:18:36 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BFC563EE4C1; Tue, 22 Sep 2020 16:18:36 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwmhD3lBhz4Ft3; Tue, 22 Sep 2020 16:18:36 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5F33321EB7; Tue, 22 Sep 2020 16:18:36 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08MGIaHg021576; Tue, 22 Sep 2020 16:18:36 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08MGIW4j021556; Tue, 22 Sep 2020 16:18:32 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <202009221618.08MGIW4j021556@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Tue, 22 Sep 2020 16:18:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366004 - in head: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/aes crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio crypto/openssl/crypto/bn crypt... X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in head: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/aes crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio crypto/openssl/crypto/bn crypto/openssl/crypto/cmac cry... X-SVN-Commit-Revision: 366004 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 16:18:36 -0000 Author: jkim Date: Tue Sep 22 16:18:31 2020 New Revision: 366004 URL: https://svnweb.freebsd.org/changeset/base/366004 Log: Merge OpenSSL 1.1.1h. Deleted: head/crypto/openssl/crypto/ec/asm/ecp_nistz256-avx2.pl Modified: head/crypto/openssl/CHANGES head/crypto/openssl/Configure head/crypto/openssl/NEWS head/crypto/openssl/NOTES.PERL head/crypto/openssl/README head/crypto/openssl/apps/genpkey.c head/crypto/openssl/apps/rsa8192.pem head/crypto/openssl/apps/s_client.c head/crypto/openssl/apps/x509.c head/crypto/openssl/appveyor.yml head/crypto/openssl/crypto/aes/aes_core.c head/crypto/openssl/crypto/aes/aes_ige.c head/crypto/openssl/crypto/asn1/d2i_pr.c head/crypto/openssl/crypto/asn1/x_algor.c head/crypto/openssl/crypto/bio/b_print.c head/crypto/openssl/crypto/bio/bss_acpt.c head/crypto/openssl/crypto/bio/bss_conn.c head/crypto/openssl/crypto/bn/bn_gcd.c head/crypto/openssl/crypto/bn/bn_lib.c head/crypto/openssl/crypto/bn/bn_mpi.c head/crypto/openssl/crypto/cmac/cmac.c head/crypto/openssl/crypto/cms/cms_lib.c head/crypto/openssl/crypto/cms/cms_sd.c head/crypto/openssl/crypto/conf/conf_def.c head/crypto/openssl/crypto/ec/asm/ecp_nistz256-armv4.pl head/crypto/openssl/crypto/ec/ec_ameth.c head/crypto/openssl/crypto/ec/ec_asn1.c head/crypto/openssl/crypto/ec/ec_err.c head/crypto/openssl/crypto/ec/ec_key.c head/crypto/openssl/crypto/ec/ec_lib.c head/crypto/openssl/crypto/ec/ec_local.h head/crypto/openssl/crypto/ec/ecp_nistp224.c head/crypto/openssl/crypto/ec/ecp_nistp521.c head/crypto/openssl/crypto/ec/ecp_nistz256.c head/crypto/openssl/crypto/engine/eng_lib.c head/crypto/openssl/crypto/err/openssl.txt head/crypto/openssl/crypto/evp/e_aes.c head/crypto/openssl/crypto/evp/encode.c head/crypto/openssl/crypto/mem_sec.c head/crypto/openssl/crypto/modes/cbc128.c head/crypto/openssl/crypto/modes/ccm128.c head/crypto/openssl/crypto/modes/cfb128.c head/crypto/openssl/crypto/modes/ctr128.c head/crypto/openssl/crypto/modes/gcm128.c head/crypto/openssl/crypto/modes/modes_local.h head/crypto/openssl/crypto/modes/ofb128.c head/crypto/openssl/crypto/modes/xts128.c head/crypto/openssl/crypto/o_str.c head/crypto/openssl/crypto/o_time.c head/crypto/openssl/crypto/pem/pem_err.c head/crypto/openssl/crypto/pem/pem_lib.c head/crypto/openssl/crypto/pem/pem_pkey.c head/crypto/openssl/crypto/pem/pvkfmt.c head/crypto/openssl/crypto/rand/drbg_ctr.c head/crypto/openssl/crypto/rand/drbg_lib.c head/crypto/openssl/crypto/rand/rand_lib.c head/crypto/openssl/crypto/rand/rand_local.h head/crypto/openssl/crypto/rand/rand_unix.c head/crypto/openssl/crypto/rand/randfile.c head/crypto/openssl/crypto/rsa/rsa_ameth.c head/crypto/openssl/crypto/store/loader_file.c head/crypto/openssl/crypto/store/store_lib.c head/crypto/openssl/crypto/ts/ts_rsp_sign.c head/crypto/openssl/crypto/ui/ui_openssl.c head/crypto/openssl/crypto/whrlpool/wp_block.c head/crypto/openssl/crypto/x509/x509_err.c head/crypto/openssl/crypto/x509/x509_local.h head/crypto/openssl/crypto/x509/x509_req.c head/crypto/openssl/crypto/x509/x509_txt.c head/crypto/openssl/crypto/x509/x509_vfy.c head/crypto/openssl/crypto/x509/x_pubkey.c head/crypto/openssl/crypto/x509v3/pcy_data.c head/crypto/openssl/crypto/x509v3/v3_alt.c head/crypto/openssl/crypto/x509v3/v3_purp.c head/crypto/openssl/doc/man1/CA.pl.pod head/crypto/openssl/doc/man1/ca.pod head/crypto/openssl/doc/man1/dgst.pod head/crypto/openssl/doc/man1/enc.pod head/crypto/openssl/doc/man1/ocsp.pod head/crypto/openssl/doc/man1/pkcs12.pod head/crypto/openssl/doc/man1/pkcs8.pod head/crypto/openssl/doc/man1/pkeyutl.pod head/crypto/openssl/doc/man1/s_client.pod head/crypto/openssl/doc/man1/s_server.pod head/crypto/openssl/doc/man1/s_time.pod head/crypto/openssl/doc/man1/sess_id.pod head/crypto/openssl/doc/man1/ts.pod head/crypto/openssl/doc/man1/tsget.pod head/crypto/openssl/doc/man1/verify.pod head/crypto/openssl/doc/man1/x509.pod head/crypto/openssl/doc/man3/ASN1_INTEGER_get_int64.pod head/crypto/openssl/doc/man3/ASN1_STRING_length.pod head/crypto/openssl/doc/man3/ASN1_TIME_set.pod head/crypto/openssl/doc/man3/ASN1_TYPE_get.pod head/crypto/openssl/doc/man3/ASYNC_WAIT_CTX_new.pod head/crypto/openssl/doc/man3/ASYNC_start_job.pod head/crypto/openssl/doc/man3/BF_encrypt.pod head/crypto/openssl/doc/man3/BIO_ADDR.pod head/crypto/openssl/doc/man3/BIO_ADDRINFO.pod head/crypto/openssl/doc/man3/BIO_connect.pod head/crypto/openssl/doc/man3/BIO_ctrl.pod head/crypto/openssl/doc/man3/BIO_get_data.pod head/crypto/openssl/doc/man3/BIO_parse_hostserv.pod head/crypto/openssl/doc/man3/BIO_read.pod head/crypto/openssl/doc/man3/BIO_s_accept.pod head/crypto/openssl/doc/man3/BIO_s_bio.pod head/crypto/openssl/doc/man3/BIO_s_connect.pod head/crypto/openssl/doc/man3/BIO_s_file.pod head/crypto/openssl/doc/man3/BIO_set_callback.pod head/crypto/openssl/doc/man3/BN_add.pod head/crypto/openssl/doc/man3/BN_bn2bin.pod head/crypto/openssl/doc/man3/BN_generate_prime.pod head/crypto/openssl/doc/man3/BN_mod_mul_montgomery.pod head/crypto/openssl/doc/man3/BN_set_bit.pod head/crypto/openssl/doc/man3/CMS_verify.pod head/crypto/openssl/doc/man3/CRYPTO_THREAD_run_once.pod head/crypto/openssl/doc/man3/CRYPTO_memcmp.pod head/crypto/openssl/doc/man3/DES_random_key.pod head/crypto/openssl/doc/man3/DH_get0_pqg.pod head/crypto/openssl/doc/man3/DH_set_method.pod head/crypto/openssl/doc/man3/DSA_set_method.pod head/crypto/openssl/doc/man3/DTLSv1_listen.pod head/crypto/openssl/doc/man3/ECDSA_SIG_new.pod head/crypto/openssl/doc/man3/EC_GROUP_new.pod head/crypto/openssl/doc/man3/EC_KEY_new.pod head/crypto/openssl/doc/man3/EC_POINT_new.pod head/crypto/openssl/doc/man3/ENGINE_add.pod head/crypto/openssl/doc/man3/ERR_get_error.pod head/crypto/openssl/doc/man3/ERR_print_errors.pod head/crypto/openssl/doc/man3/ERR_put_error.pod head/crypto/openssl/doc/man3/EVP_DigestInit.pod head/crypto/openssl/doc/man3/EVP_DigestSignInit.pod head/crypto/openssl/doc/man3/EVP_DigestVerifyInit.pod head/crypto/openssl/doc/man3/EVP_EncodeInit.pod head/crypto/openssl/doc/man3/EVP_EncryptInit.pod head/crypto/openssl/doc/man3/EVP_OpenInit.pod head/crypto/openssl/doc/man3/EVP_PKEY_CTX_ctrl.pod head/crypto/openssl/doc/man3/EVP_PKEY_CTX_new.pod head/crypto/openssl/doc/man3/EVP_PKEY_keygen.pod head/crypto/openssl/doc/man3/EVP_PKEY_new.pod head/crypto/openssl/doc/man3/EVP_SealInit.pod head/crypto/openssl/doc/man3/EVP_SignInit.pod head/crypto/openssl/doc/man3/EVP_VerifyInit.pod head/crypto/openssl/doc/man3/HMAC.pod head/crypto/openssl/doc/man3/OCSP_cert_to_id.pod head/crypto/openssl/doc/man3/OCSP_request_add1_nonce.pod head/crypto/openssl/doc/man3/OCSP_resp_find_status.pod head/crypto/openssl/doc/man3/OCSP_sendreq_new.pod head/crypto/openssl/doc/man3/OPENSSL_LH_COMPFUNC.pod head/crypto/openssl/doc/man3/OPENSSL_config.pod head/crypto/openssl/doc/man3/OPENSSL_ia32cap.pod head/crypto/openssl/doc/man3/OPENSSL_init_crypto.pod head/crypto/openssl/doc/man3/OPENSSL_init_ssl.pod head/crypto/openssl/doc/man3/OSSL_STORE_open.pod head/crypto/openssl/doc/man3/PEM_read_bio_PrivateKey.pod head/crypto/openssl/doc/man3/PKCS7_verify.pod head/crypto/openssl/doc/man3/RAND_DRBG_new.pod head/crypto/openssl/doc/man3/RAND_DRBG_set_callbacks.pod head/crypto/openssl/doc/man3/RAND_add.pod head/crypto/openssl/doc/man3/RAND_load_file.pod head/crypto/openssl/doc/man3/RSA_blinding_on.pod head/crypto/openssl/doc/man3/RSA_private_encrypt.pod head/crypto/openssl/doc/man3/RSA_set_method.pod head/crypto/openssl/doc/man3/SHA256_Init.pod head/crypto/openssl/doc/man3/SSL_CONF_cmd.pod head/crypto/openssl/doc/man3/SSL_CTX_dane_enable.pod head/crypto/openssl/doc/man3/SSL_CTX_set_alpn_select_cb.pod head/crypto/openssl/doc/man3/SSL_CTX_set_generate_session_id.pod head/crypto/openssl/doc/man3/SSL_CTX_set_info_callback.pod head/crypto/openssl/doc/man3/SSL_CTX_set_max_cert_list.pod head/crypto/openssl/doc/man3/SSL_CTX_set_mode.pod head/crypto/openssl/doc/man3/SSL_CTX_set_options.pod head/crypto/openssl/doc/man3/SSL_CTX_set_psk_client_callback.pod head/crypto/openssl/doc/man3/SSL_CTX_set_read_ahead.pod head/crypto/openssl/doc/man3/SSL_CTX_set_security_level.pod head/crypto/openssl/doc/man3/SSL_CTX_set_session_cache_mode.pod head/crypto/openssl/doc/man3/SSL_CTX_set_session_id_context.pod head/crypto/openssl/doc/man3/SSL_CTX_set_session_ticket_cb.pod head/crypto/openssl/doc/man3/SSL_CTX_set_split_send_fragment.pod head/crypto/openssl/doc/man3/SSL_CTX_set_tlsext_servername_callback.pod head/crypto/openssl/doc/man3/SSL_CTX_set_tlsext_ticket_key_cb.pod head/crypto/openssl/doc/man3/SSL_CTX_use_psk_identity_hint.pod head/crypto/openssl/doc/man3/SSL_accept.pod head/crypto/openssl/doc/man3/SSL_alloc_buffers.pod head/crypto/openssl/doc/man3/SSL_connect.pod head/crypto/openssl/doc/man3/SSL_do_handshake.pod head/crypto/openssl/doc/man3/SSL_get_all_async_fds.pod head/crypto/openssl/doc/man3/SSL_get_error.pod head/crypto/openssl/doc/man3/SSL_new.pod head/crypto/openssl/doc/man3/SSL_pending.pod head/crypto/openssl/doc/man3/SSL_read.pod head/crypto/openssl/doc/man3/SSL_read_early_data.pod head/crypto/openssl/doc/man3/SSL_set1_host.pod head/crypto/openssl/doc/man3/SSL_set_bio.pod head/crypto/openssl/doc/man3/SSL_set_fd.pod head/crypto/openssl/doc/man3/SSL_set_shutdown.pod head/crypto/openssl/doc/man3/SSL_shutdown.pod head/crypto/openssl/doc/man3/SSL_state_string.pod head/crypto/openssl/doc/man3/SSL_want.pod head/crypto/openssl/doc/man3/SSL_write.pod head/crypto/openssl/doc/man3/UI_UTIL_read_pw.pod head/crypto/openssl/doc/man3/UI_create_method.pod head/crypto/openssl/doc/man3/UI_new.pod head/crypto/openssl/doc/man3/X509V3_get_d2i.pod head/crypto/openssl/doc/man3/X509_ALGOR_dup.pod head/crypto/openssl/doc/man3/X509_LOOKUP_hash_dir.pod head/crypto/openssl/doc/man3/X509_LOOKUP_meth_new.pod head/crypto/openssl/doc/man3/X509_STORE_CTX_get_error.pod head/crypto/openssl/doc/man3/X509_STORE_CTX_new.pod head/crypto/openssl/doc/man3/X509_STORE_CTX_set_verify_cb.pod head/crypto/openssl/doc/man3/X509_STORE_set_verify_cb_func.pod head/crypto/openssl/doc/man3/X509_VERIFY_PARAM_set_flags.pod head/crypto/openssl/doc/man3/X509_check_ca.pod head/crypto/openssl/doc/man3/X509_check_host.pod head/crypto/openssl/doc/man3/X509_check_issued.pod head/crypto/openssl/doc/man3/X509_check_purpose.pod head/crypto/openssl/doc/man3/X509_get0_signature.pod head/crypto/openssl/doc/man3/X509v3_get_ext_by_NID.pod head/crypto/openssl/doc/man3/d2i_DHparams.pod head/crypto/openssl/doc/man3/d2i_X509.pod head/crypto/openssl/doc/man5/config.pod head/crypto/openssl/doc/man5/x509v3_config.pod head/crypto/openssl/doc/man7/SM2.pod head/crypto/openssl/doc/man7/evp.pod head/crypto/openssl/doc/man7/ossl_store.pod head/crypto/openssl/e_os.h head/crypto/openssl/include/openssl/bn.h head/crypto/openssl/include/openssl/e_os2.h head/crypto/openssl/include/openssl/ec.h head/crypto/openssl/include/openssl/ecerr.h head/crypto/openssl/include/openssl/opensslconf.h.in head/crypto/openssl/include/openssl/opensslv.h head/crypto/openssl/include/openssl/pemerr.h head/crypto/openssl/include/openssl/ssl.h head/crypto/openssl/include/openssl/ssl3.h head/crypto/openssl/include/openssl/x509.h head/crypto/openssl/include/openssl/x509_vfy.h head/crypto/openssl/include/openssl/x509err.h head/crypto/openssl/ssl/bio_ssl.c head/crypto/openssl/ssl/record/ssl3_buffer.c head/crypto/openssl/ssl/ssl_conf.c head/crypto/openssl/ssl/ssl_lib.c head/crypto/openssl/ssl/ssl_rsa.c head/crypto/openssl/ssl/statem/extensions.c head/crypto/openssl/ssl/statem/extensions_srvr.c head/crypto/openssl/ssl/statem/statem_lib.c head/crypto/openssl/ssl/t1_lib.c head/crypto/openssl/ssl/t1_trce.c head/crypto/openssl/ssl/tls13_enc.c head/secure/lib/libcrypto/Makefile.inc head/secure/lib/libcrypto/arm/ecp_nistz256-armv4.S head/secure/lib/libcrypto/man/man3/ADMISSIONS.3 head/secure/lib/libcrypto/man/man3/ASN1_INTEGER_get_int64.3 head/secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 head/secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 head/secure/lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 head/secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 head/secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 head/secure/lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 head/secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 head/secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 head/secure/lib/libcrypto/man/man3/ASN1_generate_nconf.3 head/secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 head/secure/lib/libcrypto/man/man3/ASYNC_start_job.3 head/secure/lib/libcrypto/man/man3/BF_encrypt.3 head/secure/lib/libcrypto/man/man3/BIO_ADDR.3 head/secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3 head/secure/lib/libcrypto/man/man3/BIO_connect.3 head/secure/lib/libcrypto/man/man3/BIO_ctrl.3 head/secure/lib/libcrypto/man/man3/BIO_f_base64.3 head/secure/lib/libcrypto/man/man3/BIO_f_buffer.3 head/secure/lib/libcrypto/man/man3/BIO_f_cipher.3 head/secure/lib/libcrypto/man/man3/BIO_f_md.3 head/secure/lib/libcrypto/man/man3/BIO_f_null.3 head/secure/lib/libcrypto/man/man3/BIO_f_ssl.3 head/secure/lib/libcrypto/man/man3/BIO_find_type.3 head/secure/lib/libcrypto/man/man3/BIO_get_data.3 head/secure/lib/libcrypto/man/man3/BIO_get_ex_new_index.3 head/secure/lib/libcrypto/man/man3/BIO_meth_new.3 head/secure/lib/libcrypto/man/man3/BIO_new.3 head/secure/lib/libcrypto/man/man3/BIO_new_CMS.3 head/secure/lib/libcrypto/man/man3/BIO_parse_hostserv.3 head/secure/lib/libcrypto/man/man3/BIO_printf.3 head/secure/lib/libcrypto/man/man3/BIO_push.3 head/secure/lib/libcrypto/man/man3/BIO_read.3 head/secure/lib/libcrypto/man/man3/BIO_s_accept.3 head/secure/lib/libcrypto/man/man3/BIO_s_bio.3 head/secure/lib/libcrypto/man/man3/BIO_s_connect.3 head/secure/lib/libcrypto/man/man3/BIO_s_fd.3 head/secure/lib/libcrypto/man/man3/BIO_s_file.3 head/secure/lib/libcrypto/man/man3/BIO_s_mem.3 head/secure/lib/libcrypto/man/man3/BIO_s_null.3 head/secure/lib/libcrypto/man/man3/BIO_s_socket.3 head/secure/lib/libcrypto/man/man3/BIO_set_callback.3 head/secure/lib/libcrypto/man/man3/BIO_should_retry.3 head/secure/lib/libcrypto/man/man3/BN_BLINDING_new.3 head/secure/lib/libcrypto/man/man3/BN_CTX_new.3 head/secure/lib/libcrypto/man/man3/BN_CTX_start.3 head/secure/lib/libcrypto/man/man3/BN_add.3 head/secure/lib/libcrypto/man/man3/BN_add_word.3 head/secure/lib/libcrypto/man/man3/BN_bn2bin.3 head/secure/lib/libcrypto/man/man3/BN_cmp.3 head/secure/lib/libcrypto/man/man3/BN_copy.3 head/secure/lib/libcrypto/man/man3/BN_generate_prime.3 head/secure/lib/libcrypto/man/man3/BN_mod_inverse.3 head/secure/lib/libcrypto/man/man3/BN_mod_mul_montgomery.3 head/secure/lib/libcrypto/man/man3/BN_mod_mul_reciprocal.3 head/secure/lib/libcrypto/man/man3/BN_new.3 head/secure/lib/libcrypto/man/man3/BN_num_bytes.3 head/secure/lib/libcrypto/man/man3/BN_rand.3 head/secure/lib/libcrypto/man/man3/BN_security_bits.3 head/secure/lib/libcrypto/man/man3/BN_set_bit.3 head/secure/lib/libcrypto/man/man3/BN_swap.3 head/secure/lib/libcrypto/man/man3/BN_zero.3 head/secure/lib/libcrypto/man/man3/BUF_MEM_new.3 head/secure/lib/libcrypto/man/man3/CMS_add0_cert.3 head/secure/lib/libcrypto/man/man3/CMS_add1_recipient_cert.3 head/secure/lib/libcrypto/man/man3/CMS_add1_signer.3 head/secure/lib/libcrypto/man/man3/CMS_compress.3 head/secure/lib/libcrypto/man/man3/CMS_decrypt.3 head/secure/lib/libcrypto/man/man3/CMS_encrypt.3 head/secure/lib/libcrypto/man/man3/CMS_final.3 head/secure/lib/libcrypto/man/man3/CMS_get0_RecipientInfos.3 head/secure/lib/libcrypto/man/man3/CMS_get0_SignerInfos.3 head/secure/lib/libcrypto/man/man3/CMS_get0_type.3 head/secure/lib/libcrypto/man/man3/CMS_get1_ReceiptRequest.3 head/secure/lib/libcrypto/man/man3/CMS_sign.3 head/secure/lib/libcrypto/man/man3/CMS_sign_receipt.3 head/secure/lib/libcrypto/man/man3/CMS_uncompress.3 head/secure/lib/libcrypto/man/man3/CMS_verify.3 head/secure/lib/libcrypto/man/man3/CMS_verify_receipt.3 head/secure/lib/libcrypto/man/man3/CONF_modules_free.3 head/secure/lib/libcrypto/man/man3/CONF_modules_load_file.3 head/secure/lib/libcrypto/man/man3/CRYPTO_THREAD_run_once.3 head/secure/lib/libcrypto/man/man3/CRYPTO_get_ex_new_index.3 head/secure/lib/libcrypto/man/man3/CRYPTO_memcmp.3 head/secure/lib/libcrypto/man/man3/CTLOG_STORE_get0_log_by_id.3 head/secure/lib/libcrypto/man/man3/CTLOG_STORE_new.3 head/secure/lib/libcrypto/man/man3/CTLOG_new.3 head/secure/lib/libcrypto/man/man3/CT_POLICY_EVAL_CTX_new.3 head/secure/lib/libcrypto/man/man3/DEFINE_STACK_OF.3 head/secure/lib/libcrypto/man/man3/DES_random_key.3 head/secure/lib/libcrypto/man/man3/DH_generate_key.3 head/secure/lib/libcrypto/man/man3/DH_generate_parameters.3 head/secure/lib/libcrypto/man/man3/DH_get0_pqg.3 head/secure/lib/libcrypto/man/man3/DH_get_1024_160.3 head/secure/lib/libcrypto/man/man3/DH_meth_new.3 head/secure/lib/libcrypto/man/man3/DH_new.3 head/secure/lib/libcrypto/man/man3/DH_new_by_nid.3 head/secure/lib/libcrypto/man/man3/DH_set_method.3 head/secure/lib/libcrypto/man/man3/DH_size.3 head/secure/lib/libcrypto/man/man3/DSA_SIG_new.3 head/secure/lib/libcrypto/man/man3/DSA_do_sign.3 head/secure/lib/libcrypto/man/man3/DSA_dup_DH.3 head/secure/lib/libcrypto/man/man3/DSA_generate_key.3 head/secure/lib/libcrypto/man/man3/DSA_generate_parameters.3 head/secure/lib/libcrypto/man/man3/DSA_get0_pqg.3 head/secure/lib/libcrypto/man/man3/DSA_meth_new.3 head/secure/lib/libcrypto/man/man3/DSA_new.3 head/secure/lib/libcrypto/man/man3/DSA_set_method.3 head/secure/lib/libcrypto/man/man3/DSA_sign.3 head/secure/lib/libcrypto/man/man3/DSA_size.3 head/secure/lib/libcrypto/man/man3/DTLS_get_data_mtu.3 head/secure/lib/libcrypto/man/man3/DTLS_set_timer_cb.3 head/secure/lib/libcrypto/man/man3/DTLSv1_listen.3 head/secure/lib/libcrypto/man/man3/ECDSA_SIG_new.3 head/secure/lib/libcrypto/man/man3/ECPKParameters_print.3 head/secure/lib/libcrypto/man/man3/EC_GFp_simple_method.3 head/secure/lib/libcrypto/man/man3/EC_GROUP_copy.3 head/secure/lib/libcrypto/man/man3/EC_GROUP_new.3 head/secure/lib/libcrypto/man/man3/EC_KEY_get_enc_flags.3 head/secure/lib/libcrypto/man/man3/EC_KEY_new.3 head/secure/lib/libcrypto/man/man3/EC_POINT_add.3 head/secure/lib/libcrypto/man/man3/EC_POINT_new.3 head/secure/lib/libcrypto/man/man3/ENGINE_add.3 head/secure/lib/libcrypto/man/man3/ERR_GET_LIB.3 head/secure/lib/libcrypto/man/man3/ERR_clear_error.3 head/secure/lib/libcrypto/man/man3/ERR_error_string.3 head/secure/lib/libcrypto/man/man3/ERR_get_error.3 head/secure/lib/libcrypto/man/man3/ERR_load_crypto_strings.3 head/secure/lib/libcrypto/man/man3/ERR_load_strings.3 head/secure/lib/libcrypto/man/man3/ERR_print_errors.3 head/secure/lib/libcrypto/man/man3/ERR_put_error.3 head/secure/lib/libcrypto/man/man3/ERR_remove_state.3 head/secure/lib/libcrypto/man/man3/ERR_set_mark.3 head/secure/lib/libcrypto/man/man3/EVP_BytesToKey.3 head/secure/lib/libcrypto/man/man3/EVP_CIPHER_CTX_get_cipher_data.3 head/secure/lib/libcrypto/man/man3/EVP_CIPHER_meth_new.3 head/secure/lib/libcrypto/man/man3/EVP_DigestInit.3 head/secure/lib/libcrypto/man/man3/EVP_DigestSignInit.3 head/secure/lib/libcrypto/man/man3/EVP_DigestVerifyInit.3 head/secure/lib/libcrypto/man/man3/EVP_EncodeInit.3 head/secure/lib/libcrypto/man/man3/EVP_EncryptInit.3 head/secure/lib/libcrypto/man/man3/EVP_MD_meth_new.3 head/secure/lib/libcrypto/man/man3/EVP_OpenInit.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_ASN1_METHOD.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_ctrl.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_new.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_set1_pbe_pass.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_set_hkdf_md.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_set_rsa_pss_keygen_md.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_set_scrypt_N.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_set_tls1_prf_md.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_asn1_get_count.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_cmp.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_decrypt.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_derive.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_encrypt.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_get_default_digest_nid.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_keygen.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_meth_get_count.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_meth_new.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_new.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_print_private.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_set1_RSA.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_sign.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_size.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_verify.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_verify_recover.3 head/secure/lib/libcrypto/man/man3/EVP_SealInit.3 head/secure/lib/libcrypto/man/man3/EVP_SignInit.3 head/secure/lib/libcrypto/man/man3/EVP_VerifyInit.3 head/secure/lib/libcrypto/man/man3/EVP_aes.3 head/secure/lib/libcrypto/man/man3/EVP_aria.3 head/secure/lib/libcrypto/man/man3/EVP_bf_cbc.3 head/secure/lib/libcrypto/man/man3/EVP_blake2b512.3 head/secure/lib/libcrypto/man/man3/EVP_camellia.3 head/secure/lib/libcrypto/man/man3/EVP_cast5_cbc.3 head/secure/lib/libcrypto/man/man3/EVP_chacha20.3 head/secure/lib/libcrypto/man/man3/EVP_des.3 head/secure/lib/libcrypto/man/man3/EVP_desx_cbc.3 head/secure/lib/libcrypto/man/man3/EVP_idea_cbc.3 head/secure/lib/libcrypto/man/man3/EVP_md2.3 head/secure/lib/libcrypto/man/man3/EVP_md4.3 head/secure/lib/libcrypto/man/man3/EVP_md5.3 head/secure/lib/libcrypto/man/man3/EVP_mdc2.3 head/secure/lib/libcrypto/man/man3/EVP_rc2_cbc.3 head/secure/lib/libcrypto/man/man3/EVP_rc4.3 head/secure/lib/libcrypto/man/man3/EVP_rc5_32_12_16_cbc.3 head/secure/lib/libcrypto/man/man3/EVP_ripemd160.3 head/secure/lib/libcrypto/man/man3/EVP_seed_cbc.3 head/secure/lib/libcrypto/man/man3/EVP_sha1.3 head/secure/lib/libcrypto/man/man3/EVP_sha224.3 head/secure/lib/libcrypto/man/man3/EVP_sha3_224.3 head/secure/lib/libcrypto/man/man3/EVP_sm3.3 head/secure/lib/libcrypto/man/man3/EVP_sm4_cbc.3 head/secure/lib/libcrypto/man/man3/EVP_whirlpool.3 head/secure/lib/libcrypto/man/man3/HMAC.3 head/secure/lib/libcrypto/man/man3/MD5.3 head/secure/lib/libcrypto/man/man3/MDC2_Init.3 head/secure/lib/libcrypto/man/man3/Makefile head/secure/lib/libcrypto/man/man3/OBJ_nid2obj.3 head/secure/lib/libcrypto/man/man3/OCSP_REQUEST_new.3 head/secure/lib/libcrypto/man/man3/OCSP_cert_to_id.3 head/secure/lib/libcrypto/man/man3/OCSP_request_add1_nonce.3 head/secure/lib/libcrypto/man/man3/OCSP_resp_find_status.3 head/secure/lib/libcrypto/man/man3/OCSP_response_status.3 head/secure/lib/libcrypto/man/man3/OCSP_sendreq_new.3 head/secure/lib/libcrypto/man/man3/OPENSSL_Applink.3 head/secure/lib/libcrypto/man/man3/OPENSSL_LH_COMPFUNC.3 head/secure/lib/libcrypto/man/man3/OPENSSL_LH_stats.3 head/secure/lib/libcrypto/man/man3/OPENSSL_VERSION_NUMBER.3 head/secure/lib/libcrypto/man/man3/OPENSSL_config.3 head/secure/lib/libcrypto/man/man3/OPENSSL_fork_prepare.3 head/secure/lib/libcrypto/man/man3/OPENSSL_ia32cap.3 head/secure/lib/libcrypto/man/man3/OPENSSL_init_crypto.3 head/secure/lib/libcrypto/man/man3/OPENSSL_init_ssl.3 head/secure/lib/libcrypto/man/man3/OPENSSL_instrument_bus.3 head/secure/lib/libcrypto/man/man3/OPENSSL_load_builtin_modules.3 head/secure/lib/libcrypto/man/man3/OPENSSL_malloc.3 head/secure/lib/libcrypto/man/man3/OPENSSL_secure_malloc.3 head/secure/lib/libcrypto/man/man3/OSSL_STORE_INFO.3 head/secure/lib/libcrypto/man/man3/OSSL_STORE_LOADER.3 head/secure/lib/libcrypto/man/man3/OSSL_STORE_SEARCH.3 head/secure/lib/libcrypto/man/man3/OSSL_STORE_expect.3 head/secure/lib/libcrypto/man/man3/OSSL_STORE_open.3 head/secure/lib/libcrypto/man/man3/OpenSSL_add_all_algorithms.3 head/secure/lib/libcrypto/man/man3/PEM_bytes_read_bio.3 head/secure/lib/libcrypto/man/man3/PEM_read.3 head/secure/lib/libcrypto/man/man3/PEM_read_CMS.3 head/secure/lib/libcrypto/man/man3/PEM_read_bio_PrivateKey.3 head/secure/lib/libcrypto/man/man3/PEM_read_bio_ex.3 head/secure/lib/libcrypto/man/man3/PEM_write_bio_CMS_stream.3 head/secure/lib/libcrypto/man/man3/PEM_write_bio_PKCS7_stream.3 head/secure/lib/libcrypto/man/man3/PKCS12_create.3 head/secure/lib/libcrypto/man/man3/PKCS12_newpass.3 head/secure/lib/libcrypto/man/man3/PKCS12_parse.3 head/secure/lib/libcrypto/man/man3/PKCS5_PBKDF2_HMAC.3 head/secure/lib/libcrypto/man/man3/PKCS7_decrypt.3 head/secure/lib/libcrypto/man/man3/PKCS7_encrypt.3 head/secure/lib/libcrypto/man/man3/PKCS7_sign.3 head/secure/lib/libcrypto/man/man3/PKCS7_sign_add_signer.3 head/secure/lib/libcrypto/man/man3/PKCS7_verify.3 head/secure/lib/libcrypto/man/man3/RAND_DRBG_generate.3 head/secure/lib/libcrypto/man/man3/RAND_DRBG_get0_master.3 head/secure/lib/libcrypto/man/man3/RAND_DRBG_new.3 head/secure/lib/libcrypto/man/man3/RAND_DRBG_reseed.3 head/secure/lib/libcrypto/man/man3/RAND_DRBG_set_callbacks.3 head/secure/lib/libcrypto/man/man3/RAND_DRBG_set_ex_data.3 head/secure/lib/libcrypto/man/man3/RAND_add.3 head/secure/lib/libcrypto/man/man3/RAND_bytes.3 head/secure/lib/libcrypto/man/man3/RAND_cleanup.3 head/secure/lib/libcrypto/man/man3/RAND_egd.3 head/secure/lib/libcrypto/man/man3/RAND_load_file.3 head/secure/lib/libcrypto/man/man3/RAND_set_rand_method.3 head/secure/lib/libcrypto/man/man3/RC4_set_key.3 head/secure/lib/libcrypto/man/man3/RIPEMD160_Init.3 head/secure/lib/libcrypto/man/man3/RSA_blinding_on.3 head/secure/lib/libcrypto/man/man3/RSA_check_key.3 head/secure/lib/libcrypto/man/man3/RSA_generate_key.3 head/secure/lib/libcrypto/man/man3/RSA_get0_key.3 head/secure/lib/libcrypto/man/man3/RSA_meth_new.3 head/secure/lib/libcrypto/man/man3/RSA_new.3 head/secure/lib/libcrypto/man/man3/RSA_padding_add_PKCS1_type_1.3 head/secure/lib/libcrypto/man/man3/RSA_print.3 head/secure/lib/libcrypto/man/man3/RSA_private_encrypt.3 head/secure/lib/libcrypto/man/man3/RSA_public_encrypt.3 head/secure/lib/libcrypto/man/man3/RSA_set_method.3 head/secure/lib/libcrypto/man/man3/RSA_sign.3 head/secure/lib/libcrypto/man/man3/RSA_sign_ASN1_OCTET_STRING.3 head/secure/lib/libcrypto/man/man3/RSA_size.3 head/secure/lib/libcrypto/man/man3/SCT_new.3 head/secure/lib/libcrypto/man/man3/SCT_print.3 head/secure/lib/libcrypto/man/man3/SCT_validate.3 head/secure/lib/libcrypto/man/man3/SHA256_Init.3 head/secure/lib/libcrypto/man/man3/SMIME_read_CMS.3 head/secure/lib/libcrypto/man/man3/SMIME_read_PKCS7.3 head/secure/lib/libcrypto/man/man3/SMIME_write_CMS.3 head/secure/lib/libcrypto/man/man3/SMIME_write_PKCS7.3 head/secure/lib/libcrypto/man/man3/SSL_CIPHER_get_name.3 head/secure/lib/libcrypto/man/man3/SSL_COMP_add_compression_method.3 head/secure/lib/libcrypto/man/man3/SSL_CONF_CTX_new.3 head/secure/lib/libcrypto/man/man3/SSL_CONF_CTX_set1_prefix.3 head/secure/lib/libcrypto/man/man3/SSL_CONF_CTX_set_flags.3 head/secure/lib/libcrypto/man/man3/SSL_CONF_CTX_set_ssl_ctx.3 head/secure/lib/libcrypto/man/man3/SSL_CONF_cmd.3 head/secure/lib/libcrypto/man/man3/SSL_CONF_cmd_argv.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_add1_chain_cert.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_add_extra_chain_cert.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_add_session.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_config.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_ctrl.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_dane_enable.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_flush_sessions.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_free.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_get0_param.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_get_verify_mode.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_has_client_custom_ext.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_load_verify_locations.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_new.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_sess_number.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_sess_set_cache_size.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_sess_set_get_cb.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_sessions.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set0_CA_list.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set1_curves.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set1_sigalgs.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set1_verify_cert_store.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_alpn_select_cb.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_cert_cb.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_cert_store.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_cert_verify_callback.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_cipher_list.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_client_cert_cb.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_client_hello_cb.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_ct_validation_callback.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_ctlog_list_file.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_default_passwd_cb.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_ex_data.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_generate_session_id.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_info_callback.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_keylog_callback.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_max_cert_list.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_min_proto_version.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_mode.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_msg_callback.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_num_tickets.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_options.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_psk_client_callback.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_quiet_shutdown.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_read_ahead.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_record_padding_callback.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_security_level.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_session_cache_mode.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_session_id_context.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_session_ticket_cb.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_split_send_fragment.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_ssl_version.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_stateless_cookie_generate_cb.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_timeout.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_tlsext_servername_callback.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_tlsext_status_cb.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_tlsext_ticket_key_cb.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_tlsext_use_srtp.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_tmp_dh_callback.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_verify.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_use_certificate.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_use_psk_identity_hint.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_use_serverinfo.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_free.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_get0_cipher.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_get0_hostname.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_get0_id_context.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_get0_peer.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_get_compress_id.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_get_ex_data.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_get_protocol_version.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_get_time.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_has_ticket.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_is_resumable.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_print.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_set1_id.3 head/secure/lib/libcrypto/man/man3/SSL_accept.3 head/secure/lib/libcrypto/man/man3/SSL_alert_type_string.3 head/secure/lib/libcrypto/man/man3/SSL_alloc_buffers.3 head/secure/lib/libcrypto/man/man3/SSL_check_chain.3 head/secure/lib/libcrypto/man/man3/SSL_clear.3 head/secure/lib/libcrypto/man/man3/SSL_connect.3 head/secure/lib/libcrypto/man/man3/SSL_do_handshake.3 head/secure/lib/libcrypto/man/man3/SSL_export_keying_material.3 head/secure/lib/libcrypto/man/man3/SSL_extension_supported.3 head/secure/lib/libcrypto/man/man3/SSL_free.3 head/secure/lib/libcrypto/man/man3/SSL_get0_peer_scts.3 head/secure/lib/libcrypto/man/man3/SSL_get_SSL_CTX.3 head/secure/lib/libcrypto/man/man3/SSL_get_all_async_fds.3 head/secure/lib/libcrypto/man/man3/SSL_get_ciphers.3 head/secure/lib/libcrypto/man/man3/SSL_get_client_random.3 head/secure/lib/libcrypto/man/man3/SSL_get_current_cipher.3 head/secure/lib/libcrypto/man/man3/SSL_get_default_timeout.3 head/secure/lib/libcrypto/man/man3/SSL_get_error.3 head/secure/lib/libcrypto/man/man3/SSL_get_extms_support.3 head/secure/lib/libcrypto/man/man3/SSL_get_fd.3 head/secure/lib/libcrypto/man/man3/SSL_get_peer_cert_chain.3 head/secure/lib/libcrypto/man/man3/SSL_get_peer_certificate.3 head/secure/lib/libcrypto/man/man3/SSL_get_peer_signature_nid.3 head/secure/lib/libcrypto/man/man3/SSL_get_peer_tmp_key.3 head/secure/lib/libcrypto/man/man3/SSL_get_psk_identity.3 head/secure/lib/libcrypto/man/man3/SSL_get_rbio.3 head/secure/lib/libcrypto/man/man3/SSL_get_session.3 head/secure/lib/libcrypto/man/man3/SSL_get_shared_sigalgs.3 head/secure/lib/libcrypto/man/man3/SSL_get_verify_result.3 head/secure/lib/libcrypto/man/man3/SSL_get_version.3 head/secure/lib/libcrypto/man/man3/SSL_in_init.3 head/secure/lib/libcrypto/man/man3/SSL_key_update.3 head/secure/lib/libcrypto/man/man3/SSL_library_init.3 head/secure/lib/libcrypto/man/man3/SSL_load_client_CA_file.3 head/secure/lib/libcrypto/man/man3/SSL_new.3 head/secure/lib/libcrypto/man/man3/SSL_pending.3 head/secure/lib/libcrypto/man/man3/SSL_read.3 head/secure/lib/libcrypto/man/man3/SSL_read_early_data.3 head/secure/lib/libcrypto/man/man3/SSL_rstate_string.3 head/secure/lib/libcrypto/man/man3/SSL_session_reused.3 head/secure/lib/libcrypto/man/man3/SSL_set1_host.3 head/secure/lib/libcrypto/man/man3/SSL_set_bio.3 head/secure/lib/libcrypto/man/man3/SSL_set_connect_state.3 head/secure/lib/libcrypto/man/man3/SSL_set_fd.3 head/secure/lib/libcrypto/man/man3/SSL_set_session.3 head/secure/lib/libcrypto/man/man3/SSL_set_shutdown.3 head/secure/lib/libcrypto/man/man3/SSL_set_verify_result.3 head/secure/lib/libcrypto/man/man3/SSL_shutdown.3 head/secure/lib/libcrypto/man/man3/SSL_state_string.3 head/secure/lib/libcrypto/man/man3/SSL_want.3 head/secure/lib/libcrypto/man/man3/SSL_write.3 head/secure/lib/libcrypto/man/man3/UI_STRING.3 head/secure/lib/libcrypto/man/man3/UI_UTIL_read_pw.3 head/secure/lib/libcrypto/man/man3/UI_create_method.3 head/secure/lib/libcrypto/man/man3/UI_new.3 head/secure/lib/libcrypto/man/man3/X509V3_get_d2i.3 head/secure/lib/libcrypto/man/man3/X509_ALGOR_dup.3 head/secure/lib/libcrypto/man/man3/X509_CRL_get0_by_serial.3 head/secure/lib/libcrypto/man/man3/X509_EXTENSION_set_object.3 head/secure/lib/libcrypto/man/man3/X509_LOOKUP.3 head/secure/lib/libcrypto/man/man3/X509_LOOKUP_hash_dir.3 head/secure/lib/libcrypto/man/man3/X509_LOOKUP_meth_new.3 head/secure/lib/libcrypto/man/man3/X509_NAME_ENTRY_get_object.3 head/secure/lib/libcrypto/man/man3/X509_NAME_add_entry_by_txt.3 head/secure/lib/libcrypto/man/man3/X509_NAME_get0_der.3 head/secure/lib/libcrypto/man/man3/X509_NAME_get_index_by_NID.3 head/secure/lib/libcrypto/man/man3/X509_NAME_print_ex.3 head/secure/lib/libcrypto/man/man3/X509_PUBKEY_new.3 head/secure/lib/libcrypto/man/man3/X509_SIG_get0.3 head/secure/lib/libcrypto/man/man3/X509_STORE_CTX_get_error.3 head/secure/lib/libcrypto/man/man3/X509_STORE_CTX_new.3 head/secure/lib/libcrypto/man/man3/X509_STORE_CTX_set_verify_cb.3 head/secure/lib/libcrypto/man/man3/X509_STORE_add_cert.3 head/secure/lib/libcrypto/man/man3/X509_STORE_get0_param.3 head/secure/lib/libcrypto/man/man3/X509_STORE_new.3 head/secure/lib/libcrypto/man/man3/X509_STORE_set_verify_cb_func.3 head/secure/lib/libcrypto/man/man3/X509_VERIFY_PARAM_set_flags.3 head/secure/lib/libcrypto/man/man3/X509_check_ca.3 head/secure/lib/libcrypto/man/man3/X509_check_host.3 head/secure/lib/libcrypto/man/man3/X509_check_issued.3 head/secure/lib/libcrypto/man/man3/X509_check_private_key.3 head/secure/lib/libcrypto/man/man3/X509_check_purpose.3 head/secure/lib/libcrypto/man/man3/X509_cmp.3 head/secure/lib/libcrypto/man/man3/X509_cmp_time.3 head/secure/lib/libcrypto/man/man3/X509_digest.3 head/secure/lib/libcrypto/man/man3/X509_dup.3 head/secure/lib/libcrypto/man/man3/X509_get0_notBefore.3 head/secure/lib/libcrypto/man/man3/X509_get0_signature.3 head/secure/lib/libcrypto/man/man3/X509_get0_uids.3 head/secure/lib/libcrypto/man/man3/X509_get_extension_flags.3 head/secure/lib/libcrypto/man/man3/X509_get_pubkey.3 head/secure/lib/libcrypto/man/man3/X509_get_serialNumber.3 head/secure/lib/libcrypto/man/man3/X509_get_subject_name.3 head/secure/lib/libcrypto/man/man3/X509_get_version.3 head/secure/lib/libcrypto/man/man3/X509_new.3 head/secure/lib/libcrypto/man/man3/X509_sign.3 head/secure/lib/libcrypto/man/man3/X509_verify_cert.3 head/secure/lib/libcrypto/man/man3/X509v3_get_ext_by_NID.3 head/secure/lib/libcrypto/man/man3/d2i_DHparams.3 head/secure/lib/libcrypto/man/man3/d2i_PKCS8PrivateKey_bio.3 head/secure/lib/libcrypto/man/man3/d2i_PrivateKey.3 head/secure/lib/libcrypto/man/man3/d2i_SSL_SESSION.3 head/secure/lib/libcrypto/man/man3/d2i_X509.3 head/secure/lib/libcrypto/man/man3/i2d_CMS_bio_stream.3 head/secure/lib/libcrypto/man/man3/i2d_PKCS7_bio_stream.3 head/secure/lib/libcrypto/man/man3/i2d_re_X509_tbs.3 head/secure/lib/libcrypto/man/man3/o2i_SCT_LIST.3 head/secure/lib/libcrypto/man/man5/x509v3_config.5 head/secure/lib/libcrypto/man/man7/Ed25519.7 head/secure/lib/libcrypto/man/man7/RAND.7 head/secure/lib/libcrypto/man/man7/RAND_DRBG.7 head/secure/lib/libcrypto/man/man7/RSA-PSS.7 head/secure/lib/libcrypto/man/man7/SM2.7 head/secure/lib/libcrypto/man/man7/X25519.7 head/secure/lib/libcrypto/man/man7/bio.7 head/secure/lib/libcrypto/man/man7/ct.7 head/secure/lib/libcrypto/man/man7/des_modes.7 head/secure/lib/libcrypto/man/man7/evp.7 head/secure/lib/libcrypto/man/man7/ossl_store-file.7 head/secure/lib/libcrypto/man/man7/ossl_store.7 head/secure/lib/libcrypto/man/man7/passphrase-encoding.7 head/secure/lib/libcrypto/man/man7/proxy-certificates.7 head/secure/lib/libcrypto/man/man7/scrypt.7 head/secure/lib/libcrypto/man/man7/ssl.7 head/secure/lib/libcrypto/man/man7/x509.7 head/secure/usr.bin/openssl/man/CA.pl.1 head/secure/usr.bin/openssl/man/asn1parse.1 head/secure/usr.bin/openssl/man/ca.1 head/secure/usr.bin/openssl/man/ciphers.1 head/secure/usr.bin/openssl/man/cms.1 head/secure/usr.bin/openssl/man/crl.1 head/secure/usr.bin/openssl/man/crl2pkcs7.1 head/secure/usr.bin/openssl/man/dgst.1 head/secure/usr.bin/openssl/man/dhparam.1 head/secure/usr.bin/openssl/man/dsa.1 head/secure/usr.bin/openssl/man/dsaparam.1 head/secure/usr.bin/openssl/man/ec.1 head/secure/usr.bin/openssl/man/ecparam.1 head/secure/usr.bin/openssl/man/enc.1 head/secure/usr.bin/openssl/man/engine.1 head/secure/usr.bin/openssl/man/errstr.1 head/secure/usr.bin/openssl/man/gendsa.1 head/secure/usr.bin/openssl/man/genpkey.1 head/secure/usr.bin/openssl/man/genrsa.1 head/secure/usr.bin/openssl/man/list.1 head/secure/usr.bin/openssl/man/nseq.1 head/secure/usr.bin/openssl/man/ocsp.1 head/secure/usr.bin/openssl/man/openssl.1 head/secure/usr.bin/openssl/man/passwd.1 head/secure/usr.bin/openssl/man/pkcs12.1 head/secure/usr.bin/openssl/man/pkcs7.1 head/secure/usr.bin/openssl/man/pkcs8.1 head/secure/usr.bin/openssl/man/pkey.1 head/secure/usr.bin/openssl/man/pkeyparam.1 head/secure/usr.bin/openssl/man/pkeyutl.1 head/secure/usr.bin/openssl/man/prime.1 head/secure/usr.bin/openssl/man/rand.1 head/secure/usr.bin/openssl/man/req.1 head/secure/usr.bin/openssl/man/rsa.1 head/secure/usr.bin/openssl/man/rsautl.1 head/secure/usr.bin/openssl/man/s_client.1 head/secure/usr.bin/openssl/man/s_server.1 head/secure/usr.bin/openssl/man/s_time.1 head/secure/usr.bin/openssl/man/sess_id.1 head/secure/usr.bin/openssl/man/smime.1 head/secure/usr.bin/openssl/man/speed.1 head/secure/usr.bin/openssl/man/spkac.1 head/secure/usr.bin/openssl/man/srp.1 head/secure/usr.bin/openssl/man/storeutl.1 head/secure/usr.bin/openssl/man/ts.1 head/secure/usr.bin/openssl/man/tsget.1 head/secure/usr.bin/openssl/man/verify.1 head/secure/usr.bin/openssl/man/version.1 head/secure/usr.bin/openssl/man/x509.1 Directory Properties: head/crypto/openssl/ (props changed) Modified: head/crypto/openssl/CHANGES ============================================================================== --- head/crypto/openssl/CHANGES Tue Sep 22 15:54:18 2020 (r366003) +++ head/crypto/openssl/CHANGES Tue Sep 22 16:18:31 2020 (r366004) @@ -7,6 +7,33 @@ https://github.com/openssl/openssl/commits/ and pick the appropriate release branch. + Changes between 1.1.1g and 1.1.1h [22 Sep 2020] + + *) Certificates with explicit curve parameters are now disallowed in + verification chains if the X509_V_FLAG_X509_STRICT flag is used. + [Tomas Mraz] + + *) The 'MinProtocol' and 'MaxProtocol' configuration commands now silently + ignore TLS protocol version bounds when configuring DTLS-based contexts, and + conversely, silently ignore DTLS protocol version bounds when configuring + TLS-based contexts. The commands can be repeated to set bounds of both + types. The same applies with the corresponding "min_protocol" and + "max_protocol" command-line switches, in case some application uses both TLS + and DTLS. + + SSL_CTX instances that are created for a fixed protocol version (e.g. + TLSv1_server_method()) also silently ignore version bounds. Previously + attempts to apply bounds to these protocol versions would result in an + error. Now only the "version-flexible" SSL_CTX instances are subject to + limits in configuration files in command-line options. + [Viktor Dukhovni] + + *) Handshake now fails if Extended Master Secret extension is dropped + on renegotiation. + [Tomas Mraz] + + *) The Oracle Developer Studio compiler will start reporting deprecated APIs + Changes between 1.1.1f and 1.1.1g [21 Apr 2020] *) Fixed segmentation fault in SSL_check_chain() Modified: head/crypto/openssl/Configure ============================================================================== --- head/crypto/openssl/Configure Tue Sep 22 15:54:18 2020 (r366003) +++ head/crypto/openssl/Configure Tue Sep 22 16:18:31 2020 (r366004) @@ -217,12 +217,22 @@ sub resolve_config; # Unified build supports separate build dir my $srcdir = catdir(absolutedir(dirname($0))); # catdir ensures local syntax my $blddir = catdir(absolutedir(".")); # catdir ensures local syntax + +# File::Spec::Unix doesn't detect case insensitivity, so we make sure to +# check if the source and build directory are really the same, and make +# them so. This avoids all kinds of confusion later on. +# We must check @File::Spec::ISA rather than using File::Spec->isa() to +# know if File::Spec ended up loading File::Spec::Unix. +$srcdir = $blddir + if (grep(/::Unix$/, @File::Spec::ISA) + && samedir($srcdir, $blddir)); + my $dofile = abs2rel(catfile($srcdir, "util/dofile.pl")); my $local_config_envname = 'OPENSSL_LOCAL_CONFIG_DIR'; -$config{sourcedir} = abs2rel($srcdir); -$config{builddir} = abs2rel($blddir); +$config{sourcedir} = abs2rel($srcdir, $blddir); +$config{builddir} = abs2rel($blddir, $blddir); # Collect reconfiguration information if needed my @argvcopy=@ARGV; @@ -1049,6 +1059,9 @@ if (scalar(@seed_sources) == 0) { print "Using os-specific seed configuration\n"; push @seed_sources, 'os'; } +if (scalar(grep { $_ eq 'egd' } @seed_sources) > 0) { + delete $disabled{'egd'}; +} if (scalar(grep { $_ eq 'none' } @seed_sources) > 0) { die "Cannot seed with none and anything else" if scalar(@seed_sources) > 1; warn <<_____ if scalar(@seed_sources) == 1; @@ -3422,6 +3435,27 @@ sub absolutedir { use Cwd qw/realpath/; return realpath($dir); +} + +# Check if all paths are one and the same, using stat. They must both exist +# We need this for the cases when File::Spec doesn't detect case insensitivity +# (File::Spec::Unix assumes case sensitivity) +sub samedir { + die "samedir expects two arguments\n" unless scalar @_ == 2; + + my @stat0 = stat($_[0]); # First argument + my @stat1 = stat($_[1]); # Second argument + + die "Couldn't stat $_[0]" unless @stat0; + die "Couldn't stat $_[1]" unless @stat1; + + # Compare device number + return 0 unless ($stat0[0] == $stat1[0]); + # Compare "inode". The perl manual recommends comparing as + # string rather than as number. + return 0 unless ($stat0[1] eq $stat1[1]); + + return 1; # All the same } sub quotify { Modified: head/crypto/openssl/NEWS ============================================================================== --- head/crypto/openssl/NEWS Tue Sep 22 15:54:18 2020 (r366003) +++ head/crypto/openssl/NEWS Tue Sep 22 16:18:31 2020 (r366004) @@ -5,6 +5,14 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.1.1g and OpenSSL 1.1.1h [22 Sep 2020] + + o Disallow explicit curve parameters in verifications chains when + X509_V_FLAG_X509_STRICT is used + o Enable 'MinProtocol' and 'MaxProtocol' to configure both TLS and DTLS + contexts + o Oracle Developer Studio will start reporting deprecation warnings + Major changes between OpenSSL 1.1.1f and OpenSSL 1.1.1g [21 Apr 2020] o Fixed segmentation fault in SSL_check_chain() (CVE-2020-1967) Modified: head/crypto/openssl/NOTES.PERL ============================================================================== --- head/crypto/openssl/NOTES.PERL Tue Sep 22 15:54:18 2020 (r366003) +++ head/crypto/openssl/NOTES.PERL Tue Sep 22 16:18:31 2020 (r366004) @@ -109,7 +109,7 @@ $ cpan -f -i Text::Template - Note: on VMS, you must quote any argument that contains upper case + Note: on VMS, you must quote any argument that contains uppercase characters, so the lines above would be: $ cpan -i "Text::Template" Modified: head/crypto/openssl/README ============================================================================== --- head/crypto/openssl/README Tue Sep 22 15:54:18 2020 (r366003) +++ head/crypto/openssl/README Tue Sep 22 16:18:31 2020 (r366004) @@ -1,5 +1,5 @@ - OpenSSL 1.1.1g 21 Apr 2020 + OpenSSL 1.1.1h 22 Sep 2020 Copyright (c) 1998-2020 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: head/crypto/openssl/apps/genpkey.c ============================================================================== --- head/crypto/openssl/apps/genpkey.c Tue Sep 22 15:54:18 2020 (r366003) +++ head/crypto/openssl/apps/genpkey.c Tue Sep 22 16:18:31 2020 (r366004) @@ -1,5 +1,5 @@ /* - * Copyright 2006-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2006-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -177,9 +177,12 @@ int genpkey_main(int argc, char **argv) goto end; } + ret = 0; + if (rv <= 0) { BIO_puts(bio_err, "Error writing key\n"); ERR_print_errors(bio_err); + ret = 1; } if (text) { @@ -191,10 +194,9 @@ int genpkey_main(int argc, char **argv) if (rv <= 0) { BIO_puts(bio_err, "Error printing key\n"); ERR_print_errors(bio_err); + ret = 1; } } - - ret = 0; end: EVP_PKEY_free(pkey); Modified: head/crypto/openssl/apps/rsa8192.pem ============================================================================== --- head/crypto/openssl/apps/rsa8192.pem Tue Sep 22 15:54:18 2020 (r366003) +++ head/crypto/openssl/apps/rsa8192.pem Tue Sep 22 16:18:31 2020 (r366004) @@ -1,5 +1,4 @@ -----BEGIN RSA PRIVATE KEY----- - MIISKAIBAAKCBAEAiQ2f1X6Bte1DKD0OoCBKEikzPW+5w3oXk3WwnE97Wxzy6wJZ ebbZC3CZKKBnJeBMrysPf+lK+9+fP6Vm8bp1wvbcSIA59BDrX6irFSuM/bdnkbuF MFlDjt+uVrxwoyqfPi2IPot1HQg3l5mdyBqcTWvbOnU2L9HZxJfPUCjfzdTMPrMY @@ -62,7 +61,7 @@ JH1/Qx7C/mTAMRsN5SkOthnGq0djCNWfPv/3JV0H67Uf5krFlnwLeb yO7iBUNJzv6Qh22malLp4P8gzACkD7DGlSTnoB5cLwcjmDGg+i9WrUBbOiVTeQfZ kOj1o+Tz35ndpq/DDUVlqliB9krcxva+QHeJPH53EGI+YVg1nD+s/vUDZ3mQMGX9 DQou2L8uU6RnWNv/BihGcL8QvS4Ty6QyPOUPpD3zc70JQAEcQk9BxQNaELgJX0IN -22cYn22tYvElew9G41OpDqzBRcfbdJmKXQ2HcroShutYJQRGUpAXHk24fy6JVkIU +2cYUn22tYvElew9G41OpDqzBRcfbdJmKXQ2HcroShutYJQRGUpAXHk24fy6JVkIU ojF5U6cwextMja1ZIIZgh9eugIRUeIE7319nQNDzuXWjRCcoBLA25P7wnpHWDRpz D9ovXCIvdja74lL5psqobV6L5+fbLPkSgXoImKR0LQKCAgAIC9Jk8kxumCyIVGCP PeM5Uby9M3GMuKrfYsn0Y5e97+kSJF1dpojTodBgR2KQar6eVrvXt+8uZCcIjfx8 @@ -98,4 +97,3 @@ TwEgE67iOb2iIoUpon/NyP4LesMzvdpsu2JFlfz13PmmQ34mFI7tWv rMlMLtKfp2w8HlMZpsUlToNCx6CI+tJrohzcs3BAVAbjFAXRKWGijB1rxwyDdHPv I+/wJTNaRNPQ1M0SwtEL/zJd21y3KSPn4eL+GP3efhlDSjtlDvZqkdAUsU8= -----END RSA PRIVATE KEY----- - Modified: head/crypto/openssl/apps/s_client.c ============================================================================== --- head/crypto/openssl/apps/s_client.c Tue Sep 22 15:54:18 2020 (r366003) +++ head/crypto/openssl/apps/s_client.c Tue Sep 22 16:18:31 2020 (r366004) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * Copyright 2005 Nokia. All rights reserved. * * Licensed under the OpenSSL license (the "License"). You may not use @@ -1283,22 +1283,42 @@ int s_client_main(int argc, char **argv) case OPT_SSL3: min_version = SSL3_VERSION; max_version = SSL3_VERSION; + socket_type = SOCK_STREAM; +#ifndef OPENSSL_NO_DTLS + isdtls = 0; +#endif break; case OPT_TLS1_3: min_version = TLS1_3_VERSION; max_version = TLS1_3_VERSION; + socket_type = SOCK_STREAM; +#ifndef OPENSSL_NO_DTLS + isdtls = 0; +#endif break; case OPT_TLS1_2: min_version = TLS1_2_VERSION; max_version = TLS1_2_VERSION; + socket_type = SOCK_STREAM; +#ifndef OPENSSL_NO_DTLS + isdtls = 0; +#endif break; case OPT_TLS1_1: min_version = TLS1_1_VERSION; max_version = TLS1_1_VERSION; + socket_type = SOCK_STREAM; +#ifndef OPENSSL_NO_DTLS + isdtls = 0; +#endif break; case OPT_TLS1: min_version = TLS1_VERSION; max_version = TLS1_VERSION; + socket_type = SOCK_STREAM; +#ifndef OPENSSL_NO_DTLS + isdtls = 0; +#endif break; case OPT_DTLS: #ifndef OPENSSL_NO_DTLS Modified: head/crypto/openssl/apps/x509.c ============================================================================== --- head/crypto/openssl/apps/x509.c Tue Sep 22 15:54:18 2020 (r366003) +++ head/crypto/openssl/apps/x509.c Tue Sep 22 16:18:31 2020 (r366004) @@ -140,9 +140,9 @@ const OPTIONS x509_options[] = { {"", OPT_MD, '-', "Any supported digest"}, #ifndef OPENSSL_NO_MD5 {"subject_hash_old", OPT_SUBJECT_HASH_OLD, '-', - "Print old-style (MD5) issuer hash value"}, - {"issuer_hash_old", OPT_ISSUER_HASH_OLD, '-', "Print old-style (MD5) subject hash value"}, + {"issuer_hash_old", OPT_ISSUER_HASH_OLD, '-', + "Print old-style (MD5) issuer hash value"}, #endif #ifndef OPENSSL_NO_ENGINE {"engine", OPT_ENGINE, 's', "Use engine, possibly a hardware device"}, Modified: head/crypto/openssl/appveyor.yml ============================================================================== --- head/crypto/openssl/appveyor.yml Tue Sep 22 15:54:18 2020 (r366003) +++ head/crypto/openssl/appveyor.yml Tue Sep 22 16:18:31 2020 (r366004) @@ -46,7 +46,8 @@ before_build: - cd .. - ps: >- if (-not $env:APPVEYOR_PULL_REQUEST_NUMBER` - -or (&git log -2 | Select-String "\[extended tests\]") ) { + -or (&git log -1 $env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT | + Select-String "\[extended tests\]") ) { $env:EXTENDED_TESTS="yes" } Modified: head/crypto/openssl/crypto/aes/aes_core.c ============================================================================== --- head/crypto/openssl/crypto/aes/aes_core.c Tue Sep 22 15:54:18 2020 (r366003) +++ head/crypto/openssl/crypto/aes/aes_core.c Tue Sep 22 16:18:31 2020 (r366004) @@ -673,357 +673,6 @@ void AES_decrypt(const unsigned char *in, unsigned cha InvCipher(in, out, rk, key->rounds); } - -# ifndef OPENSSL_SMALL_FOOTPRINT -void AES_ctr32_encrypt(const unsigned char *in, unsigned char *out, - size_t blocks, const AES_KEY *key, - const unsigned char *ivec); - -static void RawToBits(const u8 raw[64], u64 bits[8]) -{ - int i, j; - u64 in, out; - - memset(bits, 0, 64); - for (i = 0; i < 8; i++) { - in = 0; - for (j = 0; j < 8; j++) - in |= ((u64)raw[i * 8 + j]) << (8 * j); - out = in & 0xF0F0F0F00F0F0F0FuLL; - out |= (in & 0x0F0F0F0F00000000uLL) >> 28; - out |= (in & 0x00000000F0F0F0F0uLL) << 28; - in = out & 0xCCCC3333CCCC3333uLL; - in |= (out & 0x3333000033330000uLL) >> 14; - in |= (out & 0x0000CCCC0000CCCCuLL) << 14; - out = in & 0xAA55AA55AA55AA55uLL; - out |= (in & 0x5500550055005500uLL) >> 7; - out |= (in & 0x00AA00AA00AA00AAuLL) << 7; - for (j = 0; j < 8; j++) { - bits[j] |= (out & 0xFFuLL) << (8 * i); - out = out >> 8; - } - } -} - -static void BitsToRaw(const u64 bits[8], u8 raw[64]) -{ - int i, j; - u64 in, out; - - for (i = 0; i < 8; i++) { - in = 0; - for (j = 0; j < 8; j++) - in |= ((bits[j] >> (8 * i)) & 0xFFuLL) << (8 * j); - out = in & 0xF0F0F0F00F0F0F0FuLL; - out |= (in & 0x0F0F0F0F00000000uLL) >> 28; - out |= (in & 0x00000000F0F0F0F0uLL) << 28; - in = out & 0xCCCC3333CCCC3333uLL; - in |= (out & 0x3333000033330000uLL) >> 14; - in |= (out & 0x0000CCCC0000CCCCuLL) << 14; - out = in & 0xAA55AA55AA55AA55uLL; - out |= (in & 0x5500550055005500uLL) >> 7; - out |= (in & 0x00AA00AA00AA00AAuLL) << 7; - for (j = 0; j < 8; j++) { - raw[i * 8 + j] = (u8)out; - out = out >> 8; - } - } -} - -static void BitsXtime(u64 state[8]) -{ - u64 b; - - b = state[7]; - state[7] = state[6]; - state[6] = state[5]; - state[5] = state[4]; - state[4] = state[3] ^ b; - state[3] = state[2] ^ b; - state[2] = state[1]; - state[1] = state[0] ^ b; - state[0] = b; -} - -/* - * This S-box implementation follows a circuit described in - * Boyar and Peralta: "A new combinational logic minimization - * technique with applications to cryptology." - * https://eprint.iacr.org/2009/191.pdf - * - * The math is similar to above, in that it uses - * a tower field of GF(2^2^2^2) but with a different - * basis representation, that is better suited to - * logic designs. - */ -static void BitsSub(u64 state[8]) -{ - u64 x0, x1, x2, x3, x4, x5, x6, x7; - u64 y1, y2, y3, y4, y5, y6, y7, y8, y9, y10, y11; - u64 y12, y13, y14, y15, y16, y17, y18, y19, y20, y21; - u64 t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11; - u64 t12, t13, t14, t15, t16, t17, t18, t19, t20, t21; - u64 t22, t23, t24, t25, t26, t27, t28, t29, t30, t31; - u64 t32, t33, t34, t35, t36, t37, t38, t39, t40, t41; - u64 t42, t43, t44, t45, t46, t47, t48, t49, t50, t51; - u64 t52, t53, t54, t55, t56, t57, t58, t59, t60, t61; - u64 t62, t63, t64, t65, t66, t67; - u64 z0, z1, z2, z3, z4, z5, z6, z7, z8, z9, z10, z11; - u64 z12, z13, z14, z15, z16, z17; - u64 s0, s1, s2, s3, s4, s5, s6, s7; - - x7 = state[0]; - x6 = state[1]; - x5 = state[2]; - x4 = state[3]; - x3 = state[4]; - x2 = state[5]; - x1 = state[6]; - x0 = state[7]; - y14 = x3 ^ x5; - y13 = x0 ^ x6; - y9 = x0 ^ x3; - y8 = x0 ^ x5; - t0 = x1 ^ x2; - y1 = t0 ^ x7; - y4 = y1 ^ x3; - y12 = y13 ^ y14; - y2 = y1 ^ x0; - y5 = y1 ^ x6; - y3 = y5 ^ y8; - t1 = x4 ^ y12; - y15 = t1 ^ x5; - y20 = t1 ^ x1; - y6 = y15 ^ x7; - y10 = y15 ^ t0; - y11 = y20 ^ y9; - y7 = x7 ^ y11; - y17 = y10 ^ y11; - y19 = y10 ^ y8; - y16 = t0 ^ y11; - y21 = y13 ^ y16; - y18 = x0 ^ y16; - t2 = y12 & y15; - t3 = y3 & y6; - t4 = t3 ^ t2; - t5 = y4 & x7; - t6 = t5 ^ t2; - t7 = y13 & y16; - t8 = y5 & y1; - t9 = t8 ^ t7; - t10 = y2 & y7; - t11 = t10 ^ t7; - t12 = y9 & y11; - t13 = y14 & y17; - t14 = t13 ^ t12; - t15 = y8 & y10; - t16 = t15 ^ t12; - t17 = t4 ^ t14; - t18 = t6 ^ t16; - t19 = t9 ^ t14; - t20 = t11 ^ t16; - t21 = t17 ^ y20; - t22 = t18 ^ y19; - t23 = t19 ^ y21; - t24 = t20 ^ y18; - t25 = t21 ^ t22; - t26 = t21 & t23; - t27 = t24 ^ t26; - t28 = t25 & t27; - t29 = t28 ^ t22; - t30 = t23 ^ t24; - t31 = t22 ^ t26; - t32 = t31 & t30; - t33 = t32 ^ t24; - t34 = t23 ^ t33; - t35 = t27 ^ t33; - t36 = t24 & t35; - t37 = t36 ^ t34; - t38 = t27 ^ t36; - t39 = t29 & t38; - t40 = t25 ^ t39; - t41 = t40 ^ t37; - t42 = t29 ^ t33; - t43 = t29 ^ t40; - t44 = t33 ^ t37; - t45 = t42 ^ t41; - z0 = t44 & y15; - z1 = t37 & y6; - z2 = t33 & x7; - z3 = t43 & y16; - z4 = t40 & y1; - z5 = t29 & y7; - z6 = t42 & y11; - z7 = t45 & y17; - z8 = t41 & y10; - z9 = t44 & y12; - z10 = t37 & y3; - z11 = t33 & y4; - z12 = t43 & y13; - z13 = t40 & y5; - z14 = t29 & y2; - z15 = t42 & y9; - z16 = t45 & y14; - z17 = t41 & y8; - t46 = z15 ^ z16; - t47 = z10 ^ z11; - t48 = z5 ^ z13; - t49 = z9 ^ z10; - t50 = z2 ^ z12; - t51 = z2 ^ z5; - t52 = z7 ^ z8; - t53 = z0 ^ z3; - t54 = z6 ^ z7; - t55 = z16 ^ z17; - t56 = z12 ^ t48; - t57 = t50 ^ t53; - t58 = z4 ^ t46; - t59 = z3 ^ t54; - t60 = t46 ^ t57; - t61 = z14 ^ t57; - t62 = t52 ^ t58; - t63 = t49 ^ t58; - t64 = z4 ^ t59; - t65 = t61 ^ t62; - t66 = z1 ^ t63; - s0 = t59 ^ t63; - s6 = ~(t56 ^ t62); - s7 = ~(t48 ^ t60); - t67 = t64 ^ t65; - s3 = t53 ^ t66; - s4 = t51 ^ t66; - s5 = t47 ^ t65; - s1 = ~(t64 ^ s3); - s2 = ~(t55 ^ t67); - state[0] = s7; - state[1] = s6; - state[2] = s5; - state[3] = s4; - state[4] = s3; - state[5] = s2; - state[6] = s1; - state[7] = s0; -} - -static void BitsShiftRows(u64 state[8]) -{ - u64 s, s0; - int i; - - for (i = 0; i < 8; i++) { - s = state[i]; - s0 = s & 0x1111111111111111uLL; - s0 |= ((s & 0x2220222022202220uLL) >> 4) | ((s & 0x0002000200020002uLL) << 12); - s0 |= ((s & 0x4400440044004400uLL) >> 8) | ((s & 0x0044004400440044uLL) << 8); - s0 |= ((s & 0x8000800080008000uLL) >> 12) | ((s & 0x0888088808880888uLL) << 4); - state[i] = s0; - } -} - -static void BitsMixColumns(u64 state[8]) -{ - u64 s1, s; - u64 s0[8]; - int i; - - for (i = 0; i < 8; i++) { - s1 = state[i]; - s = s1; - s ^= ((s & 0xCCCCCCCCCCCCCCCCuLL) >> 2) | ((s & 0x3333333333333333uLL) << 2); - s ^= ((s & 0xAAAAAAAAAAAAAAAAuLL) >> 1) | ((s & 0x5555555555555555uLL) << 1); - s ^= s1; - s0[i] = s; - } - BitsXtime(state); - for (i = 0; i < 8; i++) { - s1 = state[i]; - s = s0[i]; - s ^= s1; - s ^= ((s1 & 0xEEEEEEEEEEEEEEEEuLL) >> 1) | ((s1 & 0x1111111111111111uLL) << 3); - state[i] = s; - } -} - -static void BitsAddRoundKey(u64 state[8], const u64 key[8]) -{ - int i; - - for (i = 0; i < 8; i++) - state[i] ^= key[i]; -} - -void AES_ctr32_encrypt(const unsigned char *in, unsigned char *out, - size_t blocks, const AES_KEY *key, - const unsigned char *ivec) -{ - struct { - u8 cipher[64]; - u64 state[8]; - u64 rd_key[AES_MAXNR + 1][8]; - } *bs; - u32 ctr32; - int i; - - ctr32 = GETU32(ivec + 12); - if (blocks >= 4 - && (bs = OPENSSL_malloc(sizeof(*bs)))) { - for (i = 0; i < key->rounds + 1; i++) { - memcpy(bs->cipher + 0, &key->rd_key[4 * i], 16); - memcpy(bs->cipher + 16, bs->cipher, 16); - memcpy(bs->cipher + 32, bs->cipher, 32); - RawToBits(bs->cipher, bs->rd_key[i]); - } - while (blocks) { - memcpy(bs->cipher, ivec, 12); - PUTU32(bs->cipher + 12, ctr32); - ctr32++; - memcpy(bs->cipher + 16, ivec, 12); - PUTU32(bs->cipher + 28, ctr32); - ctr32++; - memcpy(bs->cipher + 32, ivec, 12); - PUTU32(bs->cipher + 44, ctr32); - ctr32++; - memcpy(bs->cipher + 48, ivec, 12); - PUTU32(bs->cipher + 60, ctr32); - ctr32++; - RawToBits(bs->cipher, bs->state); - BitsAddRoundKey(bs->state, bs->rd_key[0]); - for (i = 1; i < key->rounds; i++) { - BitsSub(bs->state); - BitsShiftRows(bs->state); - BitsMixColumns(bs->state); - BitsAddRoundKey(bs->state, bs->rd_key[i]); - } - BitsSub(bs->state); - BitsShiftRows(bs->state); - BitsAddRoundKey(bs->state, bs->rd_key[key->rounds]); - BitsToRaw(bs->state, bs->cipher); - for (i = 0; i < 64 && blocks; i++) { - out[i] = in[i] ^ bs->cipher[i]; - if ((i & 15) == 15) - blocks--; - } - in += i; - out += i; - } - OPENSSL_clear_free(bs, sizeof(*bs)); - } else { - unsigned char cipher[16]; - - while (blocks) { - memcpy(cipher, ivec, 12); - PUTU32(cipher + 12, ctr32); - AES_encrypt(cipher, cipher, key); - for (i = 0; i < 16; i++) - out[i] = in[i] ^ cipher[i]; - in += 16; - out += 16; - ctr32++; - blocks--; - } - } -} -# endif #elif !defined(AES_ASM) /*- Te0[x] = S [x].[02, 01, 01, 03]; Modified: head/crypto/openssl/crypto/aes/aes_ige.c ============================================================================== --- head/crypto/openssl/crypto/aes/aes_ige.c Tue Sep 22 15:54:18 2020 (r366003) +++ head/crypto/openssl/crypto/aes/aes_ige.c Tue Sep 22 16:18:31 2020 (r366004) @@ -1,5 +1,5 @@ /* - * Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2006-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -12,16 +12,20 @@ #include #include "aes_local.h" -#define N_WORDS (AES_BLOCK_SIZE / sizeof(unsigned long)) -typedef struct { - unsigned long data[N_WORDS]; -} aes_block_t; - /* XXX: probably some better way to do this */ #if defined(__i386__) || defined(__x86_64__) # define UNALIGNED_MEMOPS_ARE_FAST 1 #else # define UNALIGNED_MEMOPS_ARE_FAST 0 +#endif + +#define N_WORDS (AES_BLOCK_SIZE / sizeof(unsigned long)) +typedef struct { + unsigned long data[N_WORDS]; +#if defined(__GNUC__) && UNALIGNED_MEMOPS_ARE_FAST +} aes_block_t __attribute((__aligned__(1))); +#else +} aes_block_t; #endif #if UNALIGNED_MEMOPS_ARE_FAST Modified: head/crypto/openssl/crypto/asn1/d2i_pr.c ============================================================================== --- head/crypto/openssl/crypto/asn1/d2i_pr.c Tue Sep 22 15:54:18 2020 (r366003) +++ head/crypto/openssl/crypto/asn1/d2i_pr.c Tue Sep 22 16:18:31 2020 (r366004) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -56,6 +56,8 @@ EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, const goto err; EVP_PKEY_free(ret); ret = tmp; + if (EVP_PKEY_type(type) != EVP_PKEY_base_id(ret)) + goto err; } else { ASN1err(ASN1_F_D2I_PRIVATEKEY, ERR_R_ASN1_LIB); goto err; Modified: head/crypto/openssl/crypto/asn1/x_algor.c ============================================================================== --- head/crypto/openssl/crypto/asn1/x_algor.c Tue Sep 22 15:54:18 2020 (r366003) +++ head/crypto/openssl/crypto/asn1/x_algor.c Tue Sep 22 16:18:31 2020 (r366004) @@ -1,5 +1,5 @@ /* - * Copyright 1998-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1998-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -91,4 +91,36 @@ int X509_ALGOR_cmp(const X509_ALGOR *a, const X509_ALG if (!a->parameter && !b->parameter) return 0; return ASN1_TYPE_cmp(a->parameter, b->parameter); +} + +int X509_ALGOR_copy(X509_ALGOR *dest, const X509_ALGOR *src) +{ + if (src == NULL || dest == NULL) + return 0; + + if (dest->algorithm) + ASN1_OBJECT_free(dest->algorithm); + dest->algorithm = NULL; + + if (dest->parameter) + ASN1_TYPE_free(dest->parameter); + dest->parameter = NULL; + + if (src->algorithm) + if ((dest->algorithm = OBJ_dup(src->algorithm)) == NULL) + return 0; + + if (src->parameter) { + dest->parameter = ASN1_TYPE_new(); + if (dest->parameter == NULL) + return 0; + + /* Assuming this is also correct for a BOOL. + * set does copy as a side effect. + */ + if (ASN1_TYPE_set1(dest->parameter, + src->parameter->type, src->parameter->value.ptr) == 0) + return 0; + } + return 1; } Modified: head/crypto/openssl/crypto/bio/b_print.c ============================================================================== --- head/crypto/openssl/crypto/bio/b_print.c Tue Sep 22 15:54:18 2020 (r366003) +++ head/crypto/openssl/crypto/bio/b_print.c Tue Sep 22 16:18:31 2020 (r366004) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -635,7 +635,11 @@ fmtfp(char **sbuffer, fvalue = tmpvalue; } ufvalue = abs_val(fvalue); - if (ufvalue > ULONG_MAX) { + /* + * By subtracting 65535 (2^16-1) we cancel the low order 15 bits + * of ULONG_MAX to avoid using imprecise floating point values. + */ + if (ufvalue >= (double)(ULONG_MAX - 65535) + 65536.0) { /* Number too big */ return 0; } Modified: head/crypto/openssl/crypto/bio/bss_acpt.c ============================================================================== --- head/crypto/openssl/crypto/bio/bss_acpt.c Tue Sep 22 15:54:18 2020 (r366003) +++ head/crypto/openssl/crypto/bio/bss_acpt.c Tue Sep 22 16:18:31 2020 (r366004) @@ -434,8 +434,10 @@ static long acpt_ctrl(BIO *b, int cmd, long num, void b->init = 1; } else if (num == 1) { OPENSSL_free(data->param_serv); - data->param_serv = BUF_strdup(ptr); - b->init = 1; + if ((data->param_serv = OPENSSL_strdup(ptr)) == NULL) + ret = 0; + else + b->init = 1; } else if (num == 2) { data->bind_mode |= BIO_SOCK_NONBLOCK; } else if (num == 3) { Modified: head/crypto/openssl/crypto/bio/bss_conn.c ============================================================================== --- head/crypto/openssl/crypto/bio/bss_conn.c Tue Sep 22 15:54:18 2020 (r366003) +++ head/crypto/openssl/crypto/bio/bss_conn.c Tue Sep 22 16:18:31 2020 (r366004) @@ -186,8 +186,17 @@ static int conn_state(BIO *b, BIO_CONNECT *c) case BIO_CONN_S_BLOCKED_CONNECT: i = BIO_sock_error(b->num); - if (i) { + if (i != 0) { BIO_clear_retry_flags(b); + if ((c->addr_iter = BIO_ADDRINFO_next(c->addr_iter)) != NULL) { + /* + * if there are more addresses to try, do that first + */ + BIO_closesocket(b->num); + c->state = BIO_CONN_S_CREATE_SOCKET; + ERR_clear_error(); + break; + } SYSerr(SYS_F_CONNECT, i); ERR_add_error_data(4, "hostname=", c->param_hostname, @@ -407,12 +416,13 @@ static long conn_ctrl(BIO *b, int cmd, long num, void case BIO_C_SET_CONNECT: if (ptr != NULL) { b->init = 1; - if (num == 0) { + if (num == 0) { /* BIO_set_conn_hostname */ char *hold_service = data->param_service; /* We affect the hostname regardless. However, the input * string might contain a host:service spec, so we must * parse it, which might or might not affect the service */ + OPENSSL_free(data->param_hostname); data->param_hostname = NULL; ret = BIO_parse_hostserv(ptr, @@ -421,19 +431,29 @@ static long conn_ctrl(BIO *b, int cmd, long num, void BIO_PARSE_PRIO_HOST); if (hold_service != data->param_service) OPENSSL_free(hold_service); - } else if (num == 1) { + } else if (num == 1) { /* BIO_set_conn_port */ OPENSSL_free(data->param_service); - data->param_service = BUF_strdup(ptr); - } else if (num == 2) { + if ((data->param_service = OPENSSL_strdup(ptr)) == NULL) + ret = 0; + } else if (num == 2) { /* BIO_set_conn_address */ const BIO_ADDR *addr = (const BIO_ADDR *)ptr; + char *host = BIO_ADDR_hostname_string(addr, 1); + char *service = BIO_ADDR_service_string(addr, 1); + + ret = host != NULL && service != NULL; if (ret) { - data->param_hostname = BIO_ADDR_hostname_string(addr, 1); - data->param_service = BIO_ADDR_service_string(addr, 1); + OPENSSL_free(data->param_hostname); + data->param_hostname = host; + OPENSSL_free(data->param_service); + data->param_service = service; BIO_ADDRINFO_free(data->addr_first); data->addr_first = NULL; data->addr_iter = NULL; + } else { + OPENSSL_free(host); + OPENSSL_free(service); } - } else if (num == 3) { + } else if (num == 3) { /* BIO_set_conn_ip_family */ data->connect_family = *(int *)ptr; } else { ret = 0; Modified: head/crypto/openssl/crypto/bn/bn_gcd.c ============================================================================== --- head/crypto/openssl/crypto/bn/bn_gcd.c Tue Sep 22 15:54:18 2020 (r366003) +++ head/crypto/openssl/crypto/bn/bn_gcd.c Tue Sep 22 16:18:31 2020 (r366004) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -10,22 +10,189 @@ #include "internal/cryptlib.h" #include "bn_local.h" -/* solves ax == 1 (mod n) */ -static BIGNUM *BN_mod_inverse_no_branch(BIGNUM *in, - const BIGNUM *a, const BIGNUM *n, - BN_CTX *ctx); - -BIGNUM *BN_mod_inverse(BIGNUM *in, - const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx) +/* + * bn_mod_inverse_no_branch is a special version of BN_mod_inverse. It does + * not contain branches that may leak sensitive information. + * + * This is a static function, we ensure all callers in this file pass valid + * arguments: all passed pointers here are non-NULL. + */ +static ossl_inline +BIGNUM *bn_mod_inverse_no_branch(BIGNUM *in, + const BIGNUM *a, const BIGNUM *n, + BN_CTX *ctx, int *pnoinv) { - BIGNUM *rv; - int noinv; - rv = int_bn_mod_inverse(in, a, n, ctx, &noinv); - if (noinv) - BNerr(BN_F_BN_MOD_INVERSE, BN_R_NO_INVERSE); - return rv; + BIGNUM *A, *B, *X, *Y, *M, *D, *T, *R = NULL; + BIGNUM *ret = NULL; + int sign; + + bn_check_top(a); + bn_check_top(n); + + BN_CTX_start(ctx); + A = BN_CTX_get(ctx); + B = BN_CTX_get(ctx); + X = BN_CTX_get(ctx); + D = BN_CTX_get(ctx); + M = BN_CTX_get(ctx); + Y = BN_CTX_get(ctx); + T = BN_CTX_get(ctx); + if (T == NULL) + goto err; + + if (in == NULL) + R = BN_new(); + else + R = in; + if (R == NULL) + goto err; + + BN_one(X); + BN_zero(Y); + if (BN_copy(B, a) == NULL) + goto err; + if (BN_copy(A, n) == NULL) + goto err; + A->neg = 0; + + if (B->neg || (BN_ucmp(B, A) >= 0)) { + /* + * Turn BN_FLG_CONSTTIME flag on, so that when BN_div is invoked, + * BN_div_no_branch will be called eventually. + */ + { + BIGNUM local_B; + bn_init(&local_B); + BN_with_flags(&local_B, B, BN_FLG_CONSTTIME); + if (!BN_nnmod(B, &local_B, A, ctx)) + goto err; + /* Ensure local_B goes out of scope before any further use of B */ + } + } + sign = -1; + /*- + * From B = a mod |n|, A = |n| it follows that + * + * 0 <= B < A, + * -sign*X*a == B (mod |n|), + * sign*Y*a == A (mod |n|). + */ + + while (!BN_is_zero(B)) { + BIGNUM *tmp; + + /*- + * 0 < B < A, + * (*) -sign*X*a == B (mod |n|), + * sign*Y*a == A (mod |n|) + */ + + /* + * Turn BN_FLG_CONSTTIME flag on, so that when BN_div is invoked, + * BN_div_no_branch will be called eventually. + */ + { + BIGNUM local_A; + bn_init(&local_A); + BN_with_flags(&local_A, A, BN_FLG_CONSTTIME); + + /* (D, M) := (A/B, A%B) ... */ + if (!BN_div(D, M, &local_A, B, ctx)) + goto err; + /* Ensure local_A goes out of scope before any further use of A */ + } + + /*- + * Now + * A = D*B + M; + * thus we have + * (**) sign*Y*a == D*B + M (mod |n|). + */ + + tmp = A; /* keep the BIGNUM object, the value does not + * matter */ + + /* (A, B) := (B, A mod B) ... */ + A = B; + B = M; + /* ... so we have 0 <= B < A again */ + + /*- + * Since the former M is now B and the former B is now A, + * (**) translates into + * sign*Y*a == D*A + B (mod |n|), + * i.e. + * sign*Y*a - D*A == B (mod |n|). + * Similarly, (*) translates into + * -sign*X*a == A (mod |n|). + * + * Thus, + * sign*Y*a + D*sign*X*a == B (mod |n|), + * i.e. + * sign*(Y + D*X)*a == B (mod |n|). + * + * So if we set (X, Y, sign) := (Y + D*X, X, -sign), we arrive back at + * -sign*X*a == B (mod |n|), + * sign*Y*a == A (mod |n|). + * Note that X and Y stay non-negative all the time. + */ + + if (!BN_mul(tmp, D, X, ctx)) + goto err; + if (!BN_add(tmp, tmp, Y)) + goto err; + + M = Y; /* keep the BIGNUM object, the value does not + * matter */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Tue Sep 22 16:50:17 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6B60F3EF65B; Tue, 22 Sep 2020 16:50:17 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-il1-f169.google.com (mail-il1-f169.google.com [209.85.166.169]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwnNm2jSJz4J3b; Tue, 22 Sep 2020 16:50:16 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-il1-f169.google.com with SMTP id l16so4516096ilt.13; Tue, 22 Sep 2020 09:50:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7KeFUcMJ/m+tsCQc8rxE0ntAh+t+iV/pIoQbrC0DxpM=; b=WftKSCFK+JmwrY/XeIXPH+AOZm3JW/TUL/CaL82uYxvwT39uiCzDQ7BvgVtqWkcfVa FcstuyfUgNYQDHt7AkKVOUHy9OzkDE5yrflIGV2uut14pJSPOzYn+1Y8plXMBh4oVvKN DVaQB+ypxOqDskx0vw5WJ7EchRdcjCjTJrpiewLgZjD4C8RB5G1ovY1Hu9oUuAj4rwFG t9b5X8KrIapWH8wRvMU8vE7+HSXu0wamIPl46BoiNhCpR/9dEDxvfgXBxGj+vwhO/1o4 eKdZBCArX7pK1i/wtwx9MZIAD91A6hEouUyp7IYpo4Uq+2elYaQwCmYHcne9ft8wyWJY 3hGA== X-Gm-Message-State: AOAM530X/ZJDsXOg4zMha7IF4sKZBxrb7D7vQCElemVrkn2RweyZLXTM 1CxhqhD887YWUoJb/zPGub4auaMdWt4Q2IwXLJE6OLFEhRA= X-Google-Smtp-Source: ABdhPJzPhw48s2ixcwx7ple+fS/WPC4/ixk73x7zisDzGp5HAWCzujQVgVCSJ9m/B3HohLd3rKmHiwJqx90W1Sw7aWM= X-Received: by 2002:a92:4055:: with SMTP id n82mr4824083ila.182.1600793414953; Tue, 22 Sep 2020 09:50:14 -0700 (PDT) MIME-Version: 1.0 References: <202007301445.06UEj5uj062013@repo.freebsd.org> In-Reply-To: <202007301445.06UEj5uj062013@repo.freebsd.org> From: Ed Maste Date: Tue, 22 Sep 2020 12:50:03 -0400 Message-ID: Subject: Re: svn commit: r363700 - in head/sys: arm/ti arm/ti/am335x arm/ti/clk arm/ti/cpsw arm/ti/omap4 arm/ti/usb dev/uart modules To: Michal Meloun Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4BwnNm2jSJz4J3b X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.166.169 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com X-Spamd-Result: default: False [-1.58 / 15.00]; RCVD_TLS_ALL(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FREEFALL_USER(0.00)[carpeddiem]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; ARC_NA(0.00)[]; NEURAL_SPAM_SHORT(0.33)[0.335]; NEURAL_HAM_LONG(-1.02)[-1.024]; NEURAL_HAM_MEDIUM(-0.89)[-0.890]; TO_DN_ALL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.166.169:from]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.166.169:from]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 16:50:17 -0000 On Thu, 30 Jul 2020 at 10:45, Michal Meloun wrote: > > Author: mmel > Date: Thu Jul 30 14:45:05 2020 > New Revision: 363700 > URL: https://svnweb.freebsd.org/changeset/base/363700 > > Log: > Move Ti AM335x to dev/extres/clk framework. It looks like BeagleBone Black is indeed broken after this commit https://ci.freebsd.org/hwlab/job/FreeBSD-device-head-beaglebone-test/6131/ https://ci.freebsd.org/hwlab/job/FreeBSD-device-head-beaglebone-test/6131/artifact/device_tests/beaglebone.boot.log ... ti_clkctrl0: mem 0x14-0x14f on ti_omap4_cm0 ti_clkctrl1: mem 0x4-0xd7 on ti_omap4_cm1 ti_clkctrl2: mem 0x4-0x7 on ti_omap4_cm2 panic: Duplicated clock registration: clk@4_0 ... From owner-svn-src-head@freebsd.org Tue Sep 22 17:05:01 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D5FC33EFF12; Tue, 22 Sep 2020 17:05:01 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bwnjn5M3tz4KGS; Tue, 22 Sep 2020 17:05: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9AB9C223EF; Tue, 22 Sep 2020 17:05: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 08MH51Bx053006; Tue, 22 Sep 2020 17:05:01 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08MH516t053005; Tue, 22 Sep 2020 17:05:01 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202009221705.08MH516t053005@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 22 Sep 2020 17:05:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366005 - head/sys/fs/udf X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/fs/udf X-SVN-Commit-Revision: 366005 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 17:05:01 -0000 Author: markj Date: Tue Sep 22 17:05:01 2020 New Revision: 366005 URL: https://svnweb.freebsd.org/changeset/base/366005 Log: udf: Validate the full file entry length Otherwise a corrupted file entry containing invalid extended attribute lengths or allocation descriptor lengths can trigger an overflow when the file entry is loaded. admbug: 965 PR: 248613 Reported by: C Turt MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/sys/fs/udf/udf_vfsops.c Modified: head/sys/fs/udf/udf_vfsops.c ============================================================================== --- head/sys/fs/udf/udf_vfsops.c Tue Sep 22 16:18:31 2020 (r366004) +++ head/sys/fs/udf/udf_vfsops.c Tue Sep 22 17:05:01 2020 (r366005) @@ -589,6 +589,7 @@ udf_vget(struct mount *mp, ino_t ino, int flags, struc struct vnode *vp; struct udf_node *unode; struct file_entry *fe; + uint32_t lea, lad; int error, sector, size; error = vfs_hash_get(mp, ino, flags, curthread, vpp, NULL, NULL); @@ -644,31 +645,37 @@ udf_vget(struct mount *mp, ino_t ino, int flags, struc devvp = udfmp->im_devvp; if ((error = RDSECTOR(devvp, sector, udfmp->bsize, &bp)) != 0) { printf("Cannot read sector %d\n", sector); - vgone(vp); - vput(vp); - brelse(bp); - *vpp = NULL; - return (error); + goto error; } + /* + * File entry length validation. + */ fe = (struct file_entry *)bp->b_data; if (udf_checktag(&fe->tag, TAGID_FENTRY)) { printf("Invalid file entry!\n"); - vgone(vp); - vput(vp); - brelse(bp); - *vpp = NULL; - return (ENOMEM); + error = ENOMEM; + goto error; } - size = UDF_FENTRY_SIZE + le32toh(fe->l_ea) + le32toh(fe->l_ad); + lea = le32toh(fe->l_ea); + lad = le32toh(fe->l_ad); + if (lea > udfmp->bsize || lad > udfmp->bsize) { + printf("Invalid EA and AD lengths %u, %u\n", lea, lad); + error = EIO; + goto error; + } + size = UDF_FENTRY_SIZE + lea + lad; + if (size > udfmp->bsize) { + printf("Invalid file entry size %u\n", size); + error = EIO; + goto error; + } + unode->fentry = malloc(size, M_UDFFENTRY, M_NOWAIT | M_ZERO); if (unode->fentry == NULL) { printf("Cannot allocate file entry block\n"); - vgone(vp); - vput(vp); - brelse(bp); - *vpp = NULL; - return (ENOMEM); + error = ENOMEM; + goto error; } bcopy(bp->b_data, unode->fentry, size); @@ -713,6 +720,13 @@ udf_vget(struct mount *mp, ino_t ino, int flags, struc *vpp = vp; return (0); + +error: + vgone(vp); + vput(vp); + brelse(bp); + *vpp = NULL; + return (error); } static int From owner-svn-src-head@freebsd.org Tue Sep 22 18:01:52 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5200D3F19A3; Tue, 22 Sep 2020 18:01:52 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwpzM3Gtbz4P0D; Tue, 22 Sep 2020 18:01:51 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lj1-f169.google.com with SMTP id n25so14943740ljj.4; Tue, 22 Sep 2020 11:01:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=UEtylLrve/JNmaFBuYI/NFqbb/XzvhZ29twA1nq4WhM=; b=P+rcgz1yiG+q/tfzSjr3PvdV7jz8AmECe56/QKDYvXksGoLNb7rsaMmAF7jXQY4EIx 0DIzQv1xYnvytMjXGRUDll6MHoDb9MfJoCuCWLHFj6sF3ApvCPDJVQVKN/Nsv+qyCwkF qomsnEbNaYLsnQtTUFtGLxYybAFJVtcWnXk6nk+6QwCBnNugPU9bM+Wz136jcaDWkfhB wdoR53QrTYld1U6dhwOBznrQsmqG/tCJlJkzfXaO4jdwnnV75IrWJMo5BiNwqPalfBnD vRCPBD0miss0abHlGs3VSxqCZdXw+5f75CuoeiCCI+gz/57n0quS07UpqRS31ji34TWX H/7w== X-Gm-Message-State: AOAM531j1HxdG8z9YLxv/Wi5FvabaxREJDUWCQ62ezktfgDQDPjpRDfX RLxq5LPBw9+rBn6l5Qyf4chGRpVpOw8= X-Google-Smtp-Source: ABdhPJyVxFcsVpwWwp9MIKwpF/DJE94T3TaUpMJtCgFOqMjw4Z8s+dTF9ulpMTfghiUnLseEp67Kdw== X-Received: by 2002:a2e:9018:: with SMTP id h24mr1808647ljg.163.1600797708981; Tue, 22 Sep 2020 11:01:48 -0700 (PDT) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id q24sm4037185ljm.60.2020.09.22.11.01.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Sep 2020 11:01:48 -0700 (PDT) Subject: Re: svn commit: r365984 - head/usr.bin/calendar/calendars To: cem@freebsd.org, Cy Schubert Cc: src-committers , svn-src-all , svn-src-head References: <202009212255.08LMtpSp078237@repo.freebsd.org> <202009212316.08LNG1Dq005499@slippy.cwsent.com> From: Andriy Gapon Openpgp: preference=signencrypt Autocrypt: addr=avg@FreeBSD.org; prefer-encrypt=mutual; keydata= mDMEX1iFDhYJKwYBBAHaRw8BAQdAiu8JG/oLFkVkOAJqJc7Dx5KI/Q6C3SBI20EQm+DXnAu0 HkFuZHJpeSBHYXBvbiA8YXZnQEZyZWVCU0Qub3JnPoiWBBMWCAA+FiEEyCHHZM09l0OE3Ir/ 1A1+Gq8+L1EFAl9YhQ4CGwMFCQeEzgAFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQ1A1+ Gq8+L1Fc0wD/ZjmhHfbCJywZU3aOxXIPjcz73FYEGMvqMCCLAWyLbSABALFL+1ZNrjV3BGjq 889cOYFuboA/Yn3eWezS+tfqYBsGuDgEX1iFDhIKKwYBBAGXVQEFAQEHQL6B20Xi600TrkpG P9fWjl7JtHNxqrHKhX6Kg7kgb4ILAwEIB4h+BBgWCAAmFiEEyCHHZM09l0OE3Ir/1A1+Gq8+ L1EFAl9YhQ4CGwwFCQeEzgAACgkQ1A1+Gq8+L1F3cgEAktp4h+IJUJxL1vn6zMOt//znni/J TanKfQuA8wGXcGkBAKpZJhqMkg+pKk7MGvJhgJ6nCpTZ+rMK6vZVZLUWc3QF Message-ID: Date: Tue, 22 Sep 2020 21:01:46 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Firefox/60.0 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4BwpzM3Gtbz4P0D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of agapon@gmail.com designates 209.85.208.169 as permitted sender) smtp.mailfrom=agapon@gmail.com X-Spamd-Result: default: False [-2.61 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[FreeBSD.org]; NEURAL_HAM_LONG(-1.04)[-1.039]; RCPT_COUNT_FIVE(0.00)[5]; NEURAL_HAM_MEDIUM(-1.00)[-1.002]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.57)[-0.567]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.169:from]; RECEIVED_SPAMHAUS_PBL(0.00)[93.72.151.96:received]; FORGED_SENDER(0.30)[avg@FreeBSD.org,agapon@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.169:from]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; MIME_TRACE(0.00)[0:+]; FROM_NEQ_ENVFROM(0.00)[avg@FreeBSD.org,agapon@gmail.com]; MAILMAN_DEST(0.00)[svn-src-head,svn-src-all] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 18:01:52 -0000 On 22/09/2020 06:06, Conrad Meyer wrote: > Big ol plus one from me. > > On Mon, Sep 21, 2020 at 4:16 PM Cy Schubert wrote: >> >> In message <202009212255.08LMtpSp078237@repo.freebsd.org>, Greg Lehey >> writes: >>> Author: grog >>> Date: Mon Sep 21 22:55:51 2020 >>> New Revision: 365984 >>> URL: https://svnweb.freebsd.org/changeset/base/365984 >>> >>> Log: >>> Remove claim that Allied Forces created "West Germany" in 1953. I can >>> find no historic substantiation for such a claim. The Federal >>> Republic of Germany was created by Germans on 23 May 1949, as also >>> noted in this file. >>> >>> Modified: >>> head/usr.bin/calendar/calendars/calendar.history >>> >>> Modified: head/usr.bin/calendar/calendars/calendar.history >>> ============================================================================= >>> = >>> --- head/usr.bin/calendar/calendars/calendar.history Mon Sep 21 22:52:57 202 >>> 0 (r365983) >>> +++ head/usr.bin/calendar/calendars/calendar.history Mon Sep 21 22:55:51 202 >>> 0 (r365984) >>> @@ -521,7 +521,6 @@ >>> 09/20 Magellan leaves Spain on the first Round the World passage, 151 >>> 9 >>> 09/20 The Roxy Theater opens in Hollywood, 1973 >>> 09/21 J. R. R. Tolkien's The Hobbit is published, 1937 >>> -09/22 Allied forces form the independent nation West Germany, 1953 >>> 09/22 US President Lincoln issues the Emancipation Proclamation, 1862 >>> 09/22 Special prosecutor Leon Jeworski subpoenas US President Nixon, >>> 1974 >>> 09/22 The first Soviet atomic bomb explodes, 1949 >>> >> >> Does this file still need to be in FreeBSD? It may have been a novelty back >> in the day but IMO calendar.history has nothing to do with BSD, computers >> or anything else of interest to FreeBSD. At the very least this file should >> be moved to ports or better yet, removed entirely. I simply don't see the >> point of it being in the tree and distributed with an O/S, any O/S. I think that the only reason for this file's existence in the source tree is for Greg's staving off the commit bit reaper. No offense meant. P.S. And occasional flame wars, it seems. -- Andriy Gapon From owner-svn-src-head@freebsd.org Tue Sep 22 18:41:08 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 24AB03F2AC5; Tue, 22 Sep 2020 18:41:08 +0000 (UTC) (envelope-from gnikl@justmail.de) Received: from mout2.freenet.de (mout2.freenet.de [IPv6:2001:748:100:40::2:4]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (Client CN "*.freenet.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bwqrf5KnFz4RnM; Tue, 22 Sep 2020 18:41:06 +0000 (UTC) (envelope-from gnikl@justmail.de) Received: from [195.4.92.165] (helo=mjail2.freenet.de) by mout2.freenet.de with esmtpa (ID gnikl@justmail.de) (port 25) (Exim 4.92 #3) id 1kKnDr-0000nc-Fx; Tue, 22 Sep 2020 20:41:03 +0200 Received: from localhost ([::1]:47402 helo=mjail2.freenet.de) by mjail2.freenet.de with esmtpa (ID gnikl@justmail.de) (Exim 4.92 #3) id 1kKnDq-0006IO-HZ; Tue, 22 Sep 2020 20:41:02 +0200 Received: from sub0.freenet.de ([195.4.92.119]:36070) by mjail2.freenet.de with esmtpa (ID gnikl@justmail.de) (Exim 4.92 #3) id 1kKnB9-00056m-9C; Tue, 22 Sep 2020 20:38:15 +0200 Received: from p5dc3f1da.dip0.t-ipconnect.de ([93.195.241.218]:49323 helo=localhost) by sub0.freenet.de with esmtpsa (ID gnikl@justmail.de) (TLSv1.2:ECDHE-RSA-CHACHA20-POLY1305:256) (port 465) (Exim 4.92 #3) id 1kKnB9-0006J6-5i; Tue, 22 Sep 2020 20:38:15 +0200 Date: Tue, 22 Sep 2020 20:38:11 +0200 From: Gunther Nikl To: Brandon Bergren Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r365724 - in head/stand: ficl ficl/powerpc powerpc/ofw Message-ID: <20200922203811.00001097@justmail.de> In-Reply-To: <202009141548.08EFmUxm030455@repo.freebsd.org> References: <202009141548.08EFmUxm030455@repo.freebsd.org> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Originated-At: 93.195.241.218!49323 X-Rspamd-Queue-Id: 4Bwqrf5KnFz4RnM X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of gnikl@justmail.de has no SPF policy when checking 2001:748:100:40::2:4) smtp.mailfrom=gnikl@justmail.de X-Spamd-Result: default: False [-1.46 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[justmail.de]; AUTH_NA(1.00)[]; NEURAL_HAM_LONG(-0.96)[-0.963]; RECEIVED_SPAMHAUS_PBL(0.00)[93.195.241.218:received]; NEURAL_HAM_MEDIUM(-0.97)[-0.971]; NEURAL_HAM_SHORT(-0.33)[-0.325]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:5430, ipnet:2001:748::/32, country:DE]; RCVD_TLS_LAST(0.00)[]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head]; RCVD_IN_DNSWL_LOW(-0.10)[2001:748:100:40::2:4:from] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 18:41:08 -0000 Brandon Bergren wrote: > Author: bdragon > Date: Mon Sep 14 15:48:30 2020 > New Revision: 365724 > URL: https://svnweb.freebsd.org/changeset/base/365724 > > [snip] > > Modified: head/stand/ficl/ficl.h > ============================================================================== > --- head/stand/ficl/ficl.h Mon Sep 14 15:20:37 2020 > (r365723) +++ head/stand/ficl/ficl.h Mon Sep 14 15:48:30 > 2020 (r365724) @@ -249,7 +249,7 @@ typedef struct > ficl_system_info FICL_SYSTEM_INFO; ** complement of false... that > unifies logical and bitwise operations ** nicely. > */ > -#define FICL_TRUE ((unsigned long)~(0L)) > +#define FICL_TRUE ((FICL_UNS)~(0LL)) This looks strange. The define should be written as (~(FICL_UNS)0). The size suffix is superfluous if the value is casted anyway. > #define FICL_FALSE (0) > #define FICL_BOOL(x) ((x) ? FICL_TRUE : FICL_FALSE) > > Regards, Gunther From owner-svn-src-head@freebsd.org Tue Sep 22 18:57:06 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3A7AE3F2B5F; Tue, 22 Sep 2020 18:57:06 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwrC60trhz4SJb; Tue, 22 Sep 2020 18:57:06 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com [66.111.4.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bdragon/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id F07CD1DB9F; Tue, 22 Sep 2020 18:57:05 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id CD59427C0054; Tue, 22 Sep 2020 14:57:05 -0400 (EDT) Received: from imap1 ([10.202.2.51]) by compute4.internal (MEProxy); Tue, 22 Sep 2020 14:57:05 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudeggddufeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdluddtmdenucfjughrpefofgggkfgjfhffhffvufgtsehttdertder reejnecuhfhrohhmpedfuehrrghnughonhcuuegvrhhgrhgvnhdfuceosggurhgrghhonh eshfhrvggvuefuffdrohhrgheqnecuggftrfgrthhtvghrnhepjefhfedtuddtleegkeeg tdegjeekffdvjedttdehgffgveeugffgfeelvdeghffgnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepsggurhgrghhonhdomhgvshhmthhprghu thhhphgvrhhsohhnrghlihhthidquddtgedvfeehkeeigedqudekuddtkeehuddqsggurh grghhonheppefhrhgvvgeuufffrdhorhhgsehimhgrphdrtggt X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 58288C200A5; Tue, 22 Sep 2020 14:57:05 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.0-355-g3ece53b-fm-20200922.004-g3ece53b9 Mime-Version: 1.0 Message-Id: <58c6ce20-1ace-4c1d-b523-46000955681d@www.fastmail.com> In-Reply-To: <20200922203811.00001097@justmail.de> References: <202009141548.08EFmUxm030455@repo.freebsd.org> <20200922203811.00001097@justmail.de> Date: Tue, 22 Sep 2020 13:56:45 -0500 From: "Brandon Bergren" To: "Gunther Nikl" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: =?UTF-8?Q?Re:_svn_commit:_r365724_-_in_head/stand:_ficl_ficl/powerpc_pow?= =?UTF-8?Q?erpc/ofw?= Content-Type: text/plain X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 18:57:06 -0000 Yeah, I will be changing it, that exact fix is in my local tree and I will commit it after the next round of tests. > This looks strange. The define should be written as (~(FICL_UNS)0). > The size suffix is superfluous if the value is casted anyway. -- Brandon Bergren bdragon@FreeBSD.org From owner-svn-src-head@freebsd.org Tue Sep 22 19:18:44 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 60FB43F35CE; Tue, 22 Sep 2020 19:18:44 +0000 (UTC) (envelope-from gbe@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bwrh41xCDz4TgD; Tue, 22 Sep 2020 19:18:44 +0000 (UTC) (envelope-from gbe@freebsd.org) Received: from localhost (p4fd3acce.dip0.t-ipconnect.de [79.211.172.206]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gbe) by smtp.freebsd.org (Postfix) with ESMTPSA id C3B7D1E1EC; Tue, 22 Sep 2020 19:18:43 +0000 (UTC) (envelope-from gbe@freebsd.org) Date: Tue, 22 Sep 2020 21:18:43 +0200 From: Gordon Bergling To: Andriy Gapon Cc: cem@freebsd.org, Cy Schubert , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r365984 - head/usr.bin/calendar/calendars Message-ID: <20200922191843.GA62498@lion.0xfce3.net> References: <202009212255.08LMtpSp078237@repo.freebsd.org> <202009212316.08LNG1Dq005499@slippy.cwsent.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: X-Operating-System: FreeBSD 12.2-STABLE amd64 X-Host-Uptime: 9:09PM up 5 days, 10:25, 3 users, load averages: 0.13, 0.18, 0.16 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 19:18:44 -0000 On Tue, Sep 22, 2020 at 09:01:46PM +0300, Andriy Gapon wrote: > On 22/09/2020 06:06, Conrad Meyer wrote: > > Big ol plus one from me. > > > > On Mon, Sep 21, 2020 at 4:16 PM Cy Schubert wrote: > >> > >> In message <202009212255.08LMtpSp078237@repo.freebsd.org>, Greg Lehey > >> writes: > >>> Author: grog > >>> Date: Mon Sep 21 22:55:51 2020 > >>> New Revision: 365984 > >>> URL: https://svnweb.freebsd.org/changeset/base/365984 > >>> > >>> Log: > >>> Remove claim that Allied Forces created "West Germany" in 1953. I can > >>> find no historic substantiation for such a claim. The Federal > >>> Republic of Germany was created by Germans on 23 May 1949, as also > >>> noted in this file. > >>> > >>> Modified: > >>> head/usr.bin/calendar/calendars/calendar.history > >>> > >>> Modified: head/usr.bin/calendar/calendars/calendar.history > >>> ============================================================================= > >>> = > >>> --- head/usr.bin/calendar/calendars/calendar.history Mon Sep 21 22:52:57 202 > >>> 0 (r365983) > >>> +++ head/usr.bin/calendar/calendars/calendar.history Mon Sep 21 22:55:51 202 > >>> 0 (r365984) > >>> @@ -521,7 +521,6 @@ > >>> 09/20 Magellan leaves Spain on the first Round the World passage, 151 > >>> 9 > >>> 09/20 The Roxy Theater opens in Hollywood, 1973 > >>> 09/21 J. R. R. Tolkien's The Hobbit is published, 1937 > >>> -09/22 Allied forces form the independent nation West Germany, 1953 > >>> 09/22 US President Lincoln issues the Emancipation Proclamation, 1862 > >>> 09/22 Special prosecutor Leon Jeworski subpoenas US President Nixon, > >>> 1974 > >>> 09/22 The first Soviet atomic bomb explodes, 1949 > >>> > >> > >> Does this file still need to be in FreeBSD? It may have been a novelty back > >> in the day but IMO calendar.history has nothing to do with BSD, computers > >> or anything else of interest to FreeBSD. At the very least this file should > >> be moved to ports or better yet, removed entirely. I simply don't see the > >> point of it being in the tree and distributed with an O/S, any O/S. > > I think that the only reason for this file's existence in the source tree is for > Greg's staving off the commit bit reaper. > No offense meant. > > P.S. > And occasional flame wars, it seems. We already had a similar discussion in march 2020 after r358561 [1]. In the short, the calendar utility has it's historic place, even it's just more a kind of tradition, like adding yourself as a FreeBSD committer to calendar.freebsd. [1] https://lists.freebsd.org/pipermail/svn-src-all/2020-March/thread.html -- Gordon From owner-svn-src-head@freebsd.org Tue Sep 22 19:24:27 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F0FA43F3ABB for ; Tue, 22 Sep 2020 19:24:27 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-qt1-x843.google.com (mail-qt1-x843.google.com [IPv6:2607:f8b0:4864:20::843]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bwrpg2hnlz4VCv for ; Tue, 22 Sep 2020 19:24:27 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-qt1-x843.google.com with SMTP id n18so16594248qtw.0 for ; Tue, 22 Sep 2020 12:24:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=H/Sxy8DhLZVw9/NgTbSxaL0FbmjFuOhWxgVYQVSmNvw=; b=HAek60Ns0EyonsWClhThYN7c3hZgusRB76Aa6L8BP6QCR34QkNLAt9XAH2zKLFD9iK 1bJOziu4ovc//Ws3DLlSov9mz01518JoWxKs42dhRdREdBx4az8YdUTkf/QJE+wPEsY4 YCGxU0UoTTlanzMvMMu2psluZr/CtjCUdhUhoIuqggVskF1gQq21TY52gGaC/pTLCYjV 7RrOS2PPe5RI+y1utt578sLbtCZaaSVij/AOpkF9cuXSXzouzPaP7jPNB9zRlKK+72Kq N7fsPyOBi72xvxGAjuTGu19SetPL7ofQuV2I/Ir4gimU3NQkUUTOOY/8RCSo0PYIgI3G qxcQ== 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; bh=H/Sxy8DhLZVw9/NgTbSxaL0FbmjFuOhWxgVYQVSmNvw=; b=lBO27avWuVY3lWsjOnPgaJayRv817ZqbKGwt2zMxJF+ZNmGmoyIkujeyaDIkoHG9WB okl08Bwk105ZKAvnbowZ+zOWXvhYHc8DR85Stom2ZHt/Wl48R9AFiL6Hn7856inkQcr/ C0GCT979t+n/xYj8XjJ20jopVgQIYU4knTDO/8B1hsIlVc0BQVF1PhWCEXrXIEdDZDv/ 0be9na86hpHI6qG431HjMC98CKRRLiEk5F5JkAr7mbk5nKRoYqYJxflvwcGrOigVUW1+ 5x10lu6AbKaCAtdB5Ne2JF/Wyn2K6RflU62TjDGmOvckaNddpwppqkuvNBU2+hso1okF 9t8Q== X-Gm-Message-State: AOAM532OOZAzEFkmW2vlk1gwuLFTzpLL2Aq1E9cL6U5cSHUPT19Ugaw7 Z2Xu3e2PprW0DE0nqIb65A6zpQ== X-Google-Smtp-Source: ABdhPJzY41ipM+4IkTymoYiGQF7Urvu7wRxeDSxIzw4c/7HaJ4UnaSJVNI/Oc3ofrNDyws5txcMw/w== X-Received: by 2002:ac8:f57:: with SMTP id l23mr6392423qtk.166.1600802666326; Tue, 22 Sep 2020 12:24:26 -0700 (PDT) Received: from mutt-hbsd (75-148-2-186-WashingtonDC.hfc.comcastbusiness.net. [75.148.2.186]) by smtp.gmail.com with ESMTPSA id 196sm11825293qkm.49.2020.09.22.12.24.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Sep 2020 12:24:25 -0700 (PDT) Date: Tue, 22 Sep 2020 15:24:24 -0400 From: Shawn Webb To: Gordon Bergling Cc: Andriy Gapon , cem@freebsd.org, Cy Schubert , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r365984 - head/usr.bin/calendar/calendars Message-ID: <20200922192424.mnzunuwnjtwfwilh@mutt-hbsd> X-Operating-System: FreeBSD mutt-hbsd 13.0-CURRENT-HBSD FreeBSD 13.0-CURRENT-HBSD X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0xFF2E67A277F8E1FA References: <202009212255.08LMtpSp078237@repo.freebsd.org> <202009212316.08LNG1Dq005499@slippy.cwsent.com> <20200922191843.GA62498@lion.0xfce3.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ftu52o6ib5uewj7t" Content-Disposition: inline In-Reply-To: <20200922191843.GA62498@lion.0xfce3.net> X-Rspamd-Queue-Id: 4Bwrpg2hnlz4VCv X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=hardenedbsd.org header.s=google header.b=HAek60Ns; dmarc=none; spf=pass (mx1.freebsd.org: domain of shawn.webb@hardenedbsd.org designates 2607:f8b0:4864:20::843 as permitted sender) smtp.mailfrom=shawn.webb@hardenedbsd.org X-Spamd-Result: default: False [-5.15 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[hardenedbsd.org:s=google]; NEURAL_HAM_MEDIUM(-0.96)[-0.955]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; NEURAL_HAM_LONG(-1.05)[-1.046]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[hardenedbsd.org]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[hardenedbsd.org:+]; NEURAL_HAM_SHORT(-1.05)[-1.050]; RCPT_COUNT_SEVEN(0.00)[7]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::843:from]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; MID_RHS_NOT_FQDN(0.50)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[svn-src-head] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 19:24:28 -0000 --ftu52o6ib5uewj7t Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 22, 2020 at 09:18:43PM +0200, Gordon Bergling wrote: > On Tue, Sep 22, 2020 at 09:01:46PM +0300, Andriy Gapon wrote: > > On 22/09/2020 06:06, Conrad Meyer wrote: > > > Big ol plus one from me. > > >=20 > > > On Mon, Sep 21, 2020 at 4:16 PM Cy Schubert wrote: > > >> > > >> In message <202009212255.08LMtpSp078237@repo.freebsd.org>, Greg Lehey > > >> writes: > > >>> Author: grog > > >>> Date: Mon Sep 21 22:55:51 2020 > > >>> New Revision: 365984 > > >>> URL: https://svnweb.freebsd.org/changeset/base/365984 > > >>> > > >>> Log: > > >>> Remove claim that Allied Forces created "West Germany" in 1953. = I can > > >>> find no historic substantiation for such a claim. The Federal > > >>> Republic of Germany was created by Germans on 23 May 1949, as also > > >>> noted in this file. > > >>> > > >>> Modified: > > >>> head/usr.bin/calendar/calendars/calendar.history > > >>> > > >>> Modified: head/usr.bin/calendar/calendars/calendar.history > > >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=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/calendar/calendars/calendar.history Mon Sep 21 22= :52:57 202 > > >>> 0 (r365983) > > >>> +++ head/usr.bin/calendar/calendars/calendar.history Mon Sep 21 22= :55:51 202 > > >>> 0 (r365984) > > >>> @@ -521,7 +521,6 @@ > > >>> 09/20 Magellan leaves Spain on the first Round the World pa= ssage, 151 > > >>> 9 > > >>> 09/20 The Roxy Theater opens in Hollywood, 1973 > > >>> 09/21 J. R. R. Tolkien's The Hobbit is published, 1937 > > >>> -09/22 Allied forces form the independent nation West German= y, 1953 > > >>> 09/22 US President Lincoln issues the Emancipation Proclama= tion, 1862 > > >>> 09/22 Special prosecutor Leon Jeworski subpoenas US Preside= nt Nixon, > > >>> 1974 > > >>> 09/22 The first Soviet atomic bomb explodes, 1949 > > >>> > > >> > > >> Does this file still need to be in FreeBSD? It may have been a novel= ty back > > >> in the day but IMO calendar.history has nothing to do with BSD, comp= uters > > >> or anything else of interest to FreeBSD. At the very least this file= should > > >> be moved to ports or better yet, removed entirely. I simply don't se= e the > > >> point of it being in the tree and distributed with an O/S, any O/S. > >=20 > > I think that the only reason for this file's existence in the source tr= ee is for > > Greg's staving off the commit bit reaper. > > No offense meant. > >=20 > > P.S. > > And occasional flame wars, it seems. >=20 > We already had a similar discussion in march 2020 after r358561 [1]. >=20 > In the short, the calendar utility has it's historic place, even it's > just more a kind of tradition, like adding yourself as a FreeBSD committer > to calendar.freebsd. >=20 > [1] https://lists.freebsd.org/pipermail/svn-src-all/2020-March/thread.html Would it make sense to prune calendar entries to only BSD-related entries? Thanks, --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD GPG Key ID: 0xFF2E67A277F8E1FA GPG Key Fingerprint: D206 BB45 15E0 9C49 0CF9 3633 C85B 0AF8 AB23 0FB2 https://git-01.md.hardenedbsd.org/HardenedBSD/pubkeys/src/branch/master/Sha= wn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc --ftu52o6ib5uewj7t Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAl9qT2UACgkQ/y5nonf4 4fovPw//fhSjgtckfbT583WtnsxS5mp1CVg/Lh5+Q5wBAuJdtRScnQ/HzoLQl6xC GFFAKHUCUn5wvmZTt4CSwFOzQ7T9fWTCXc9GiwZGYr/l51tfmAHrpe0D0t8wVOim qzCtCbq++cMsj1ZD1nV1v0wldNmogUNz/u40phx/Z9Fv7f/3HG2x9YugNOBYY/wL TZcEbckm/qoktLwqn7IvEZgvnaFAoST3a3dOJWpmUJ64JD3jrmaTME0DF3n6uX+n u4RR3TvQ1g7MoL1ObJnIU069S9SyInYoNz8sPEJvUfEAB+VxeFRJ0T4lrFH86EJC cbpPyef+xRs9YqmdEapIu8OTn66AJhTUgAYYLCpm6EViX8+kGU57APpciUZ27YvP 9963oxLXFYheSygkP9lJp5vPiJXRV71Ch57vNjhgvhJc210nX6ti4VgEGzgJl0aB 2WpYseD47fy81SiG9DacbAgiMcNffisJXw86Z7HVjQ0shfvZ0MArLFxiYzFsa0yl MZyDNvLcUGBCJr/nRDfmnS3IQqsbDMPLPjaYqGVnxtvaTsnT+wEYMjI/OOlFPXKy MHfFH6bcIoHWBgZ+5CLmyz5LZZ+Tvc0E65pnYnZERxNeap8G8UJPSVmhZttTO1yv VVBgfwsDNg8oLRJULHPus9/8wk78Wwe0Pm2fsHH7LnhXodq7CX8= =jArt -----END PGP SIGNATURE----- --ftu52o6ib5uewj7t-- From owner-svn-src-head@freebsd.org Tue Sep 22 19:43:30 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 20B353F43EE; Tue, 22 Sep 2020 19:43:30 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwsDc6fTRz4WkP; Tue, 22 Sep 2020 19:43:28 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id KoCDk67KULWW5KoCEk29CX; Tue, 22 Sep 2020 13:43:27 -0600 X-Authority-Analysis: v=2.4 cv=Z5JSoFdA c=1 sm=1 tr=0 ts=5f6a53df a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=reM5J-MqmosA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=eHFqvGqa7PpgtEkSzdkA:9 a=CO921fODQjiKJrVO:21 a=zY2JNnN1ym4x0HSQ:21 a=CjuIK1q_8ugA:10 a=A_hQjd7XtxkA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id CC2402CF; Tue, 22 Sep 2020 12:43:23 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 08MJhNb3006228; Tue, 22 Sep 2020 12:43:23 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202009221943.08MJhNb3006228@slippy.cwsent.com> X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Shawn Webb cc: Gordon Bergling , Andriy Gapon , cem@freebsd.org, Cy Schubert , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r365984 - head/usr.bin/calendar/calendars In-reply-to: <20200922192424.mnzunuwnjtwfwilh@mutt-hbsd> References: <202009212255.08LMtpSp078237@repo.freebsd.org> <202009212316.08LNG1Dq005499@slippy.cwsent.com> <20200922191843.GA62498@lion.0xfce3.net> <20200922192424.mnzunuwnjtwfwilh@mutt-hbsd> Comments: In-reply-to Shawn Webb message dated "Tue, 22 Sep 2020 15:24:24 -0400." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 22 Sep 2020 12:43:23 -0700 X-CMAE-Envelope: MS4xfH+26BDPuPAVy5ky4Ro9wq3m64se/rBOzg1Ma02vTnxVCmiHkOEMPPOmMYJWgOZBYlGYMvjEZzGSlwnjoEzV9KNvJ8TfSb1nxlHhvxC61Xv0ehlIFr4L ktzsdVK7+TEr/EUZFRKTGeiPJKGdswgKeIYQcgbBG9YmQNkVeI/zPm5yBRrdG+7i179WfHDHSJnZ1imS/xcxYQ4QzoBdu1MnD9AZ+Fxxu+1KYqRmS3gLBMjD 2qD+IVrWLOYNeUnMqLieeH+SoJULvOwc1hkLzFimmznUr5GkhIf0qQkXEIKbOFc56fOmQ8rJVe6v4soZ60zY+MLnIiyI+7VoyrFvnLiY/xFOUfxpTSVXW+zj OJS7AV4XjEr4pIV4/yFh/KbAWMgyYmOoqgVnhaSiDMYFrynzNOs= X-Rspamd-Queue-Id: 4BwsDc6fTRz4WkP X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 64.59.136.139) smtp.mailfrom=cy.schubert@cschubert.com X-Spamd-Result: default: False [-0.85 / 15.00]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-0.65)[-0.649]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[cschubert.com: no valid DMARC record]; ARC_NA(0.00)[]; AUTH_NA(1.00)[]; NEURAL_HAM_MEDIUM(-0.88)[-0.875]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.62)[-0.622]; RCPT_COUNT_SEVEN(0.00)[8]; RECEIVED_SPAMHAUS_PBL(0.00)[70.67.125.17:received]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; RCVD_TLS_LAST(0.00)[]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head]; RCVD_IN_DNSWL_LOW(-0.10)[64.59.136.139:from] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 19:43:30 -0000 In message <20200922192424.mnzunuwnjtwfwilh@mutt-hbsd>, Shawn Webb writes: > > --ftu52o6ib5uewj7t > Content-Type: text/plain; charset=us-ascii > Content-Disposition: inline > Content-Transfer-Encoding: quoted-printable > > On Tue, Sep 22, 2020 at 09:18:43PM +0200, Gordon Bergling wrote: > > On Tue, Sep 22, 2020 at 09:01:46PM +0300, Andriy Gapon wrote: > > > On 22/09/2020 06:06, Conrad Meyer wrote: > > > > Big ol plus one from me. > > > >=20 > > > > On Mon, Sep 21, 2020 at 4:16 PM Cy Schubert m> wrote: > > > >> > > > >> In message <202009212255.08LMtpSp078237@repo.freebsd.org>, Greg Lehey > > > >> writes: > > > >>> Author: grog > > > >>> Date: Mon Sep 21 22:55:51 2020 > > > >>> New Revision: 365984 > > > >>> URL: https://svnweb.freebsd.org/changeset/base/365984 > > > >>> > > > >>> Log: > > > >>> Remove claim that Allied Forces created "West Germany" in 1953. = > I can > > > >>> find no historic substantiation for such a claim. The Federal > > > >>> Republic of Germany was created by Germans on 23 May 1949, as also > > > >>> noted in this file. > > > >>> > > > >>> Modified: > > > >>> head/usr.bin/calendar/calendars/calendar.history > > > >>> > > > >>> Modified: head/usr.bin/calendar/calendars/calendar.history > > > >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=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/calendar/calendars/calendar.history Mon Sep 21 22= > :52:57 202 > > > >>> 0 (r365983) > > > >>> +++ head/usr.bin/calendar/calendars/calendar.history Mon Sep 21 22= > :55:51 202 > > > >>> 0 (r365984) > > > >>> @@ -521,7 +521,6 @@ > > > >>> 09/20 Magellan leaves Spain on the first Round the World pa= > ssage, 151 > > > >>> 9 > > > >>> 09/20 The Roxy Theater opens in Hollywood, 1973 > > > >>> 09/21 J. R. R. Tolkien's The Hobbit is published, 1937 > > > >>> -09/22 Allied forces form the independent nation West German= > y, 1953 > > > >>> 09/22 US President Lincoln issues the Emancipation Proclama= > tion, 1862 > > > >>> 09/22 Special prosecutor Leon Jeworski subpoenas US Preside= > nt Nixon, > > > >>> 1974 > > > >>> 09/22 The first Soviet atomic bomb explodes, 1949 > > > >>> > > > >> > > > >> Does this file still need to be in FreeBSD? It may have been a novel= > ty back > > > >> in the day but IMO calendar.history has nothing to do with BSD, comp= > uters > > > >> or anything else of interest to FreeBSD. At the very least this file= > should > > > >> be moved to ports or better yet, removed entirely. I simply don't se= > e the > > > >> point of it being in the tree and distributed with an O/S, any O/S. > > >=20 > > > I think that the only reason for this file's existence in the source tr= > ee is for > > > Greg's staving off the commit bit reaper. > > > No offense meant. > > >=20 > > > P.S. > > > And occasional flame wars, it seems. > >=20 > > We already had a similar discussion in march 2020 after r358561 [1]. > >=20 > > In the short, the calendar utility has it's historic place, even it's > > just more a kind of tradition, like adding yourself as a FreeBSD committer > > to calendar.freebsd. > >=20 > > [1] https://lists.freebsd.org/pipermail/svn-src-all/2020-March/thread.html > > Would it make sense to prune calendar entries to only BSD-related > entries? +1 -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Tue Sep 22 20:20:44 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6E14E3F5658; Tue, 22 Sep 2020 20:20:44 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bwt3c2KvDz4Yyc; Tue, 22 Sep 2020 20:20:44 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3470B24CD6; Tue, 22 Sep 2020 20:20:44 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08MKKiRu072308; Tue, 22 Sep 2020 20:20:44 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08MKKh2K072307; Tue, 22 Sep 2020 20:20:43 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <202009222020.08MKKh2K072307@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Tue, 22 Sep 2020 20:20:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366011 - head/lib/libnetmap X-SVN-Group: head X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: head/lib/libnetmap X-SVN-Commit-Revision: 366011 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 20:20:44 -0000 Author: vmaffione Date: Tue Sep 22 20:20:43 2020 New Revision: 366011 URL: https://svnweb.freebsd.org/changeset/base/366011 Log: libnetmap: fix cast from uint64_t to void* We use uintptr_t as an intermediate cast to avoid compiler warnings on 32 bit architectures. Reported by: adrian MFC after: 3 days Modified: head/lib/libnetmap/libnetmap.h head/lib/libnetmap/nmport.c Modified: head/lib/libnetmap/libnetmap.h ============================================================================== --- head/lib/libnetmap/libnetmap.h Tue Sep 22 20:04:57 2020 (r366010) +++ head/lib/libnetmap/libnetmap.h Tue Sep 22 20:20:43 2020 (r366011) @@ -554,9 +554,9 @@ struct nmreq_option *nmreq_find_option(struct nmreq_he void nmreq_free_options(struct nmreq_header *); const char* nmreq_option_name(uint32_t); #define nmreq_foreach_option(h_, o_) \ - for ((o_) = (struct nmreq_option *)((h_)->nr_options);\ + for ((o_) = (struct nmreq_option *)((uintptr_t)((h_)->nr_options));\ (o_) != NULL;\ - (o_) = (struct nmreq_option *)((o_)->nro_next)) + (o_) = (struct nmreq_option *)((uintptr_t)((o_)->nro_next))) /* nmctx manipulation */ Modified: head/lib/libnetmap/nmport.c ============================================================================== --- head/lib/libnetmap/nmport.c Tue Sep 22 20:04:57 2020 (r366010) +++ head/lib/libnetmap/nmport.c Tue Sep 22 20:20:43 2020 (r366011) @@ -614,7 +614,7 @@ nmport_mmap(struct nmport_d *d) } memset(m, 0, sizeof(*m)); if (d->extmem != NULL) { - m->mem = (void *)d->extmem->nro_usrptr; + m->mem = (void *)((uintptr_t)d->extmem->nro_usrptr); m->size = d->extmem->nro_info.nr_memsize; m->is_extmem = 1; } else { From owner-svn-src-head@freebsd.org Tue Sep 22 20:40:43 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DFD7F3F6356; Tue, 22 Sep 2020 20:40:43 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwtVf6NxFz4bYY; Tue, 22 Sep 2020 20:40:42 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 3FE705C01EE; Tue, 22 Sep 2020 16:40:41 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 22 Sep 2020 16:40:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsco.org; h= content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=fm1; bh=i jBxJ75PFIU8Fpht56MZ2vUGW/fBn76qizH6DZFQsT0=; b=nQbq+XGvjygeNcaKs qqz7AAz5L7L3G5U6zsHVSbv+pIbeVR/yLSA9WWxAzIYR9IjcD6ApHHspbD/XNuAk T5v6vBk0h7KZomhRDF9SFbQoxcpl67wJcpt0S7T+hU+bgpREo404rTgW165JgPPb 7LEdqhPEu1BI2dG3PF+c+Oi5FujGA2fBUrSIMvS4/yhzrGn4FtF04PjfabiSnErC /LIX41FgymdzL9sHZSq31MOYG4u2Zdb7sn6sKgzDDDHfJ7lTli2+ejBerBYe2wVw ahbTY+shMxLNs9qXmM63nnSogakao5XWhqUSMxJOKGFc66JmbWngsI/uw2um3JDl 9fcog== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=ijBxJ75PFIU8Fpht56MZ2vUGW/fBn76qizH6DZFQs T0=; b=dRnRYCxn2DzJn1I0h25A/Jmh8ncDrTQYgfvyuNUh++vuNdxHSmP0lB4wU t9JJvRXTYp17PXlHgN+hDQSsAnCWFumWNHBJldlDWea4/l28o3j8XncO/d/Fl6mf xhL0lXWJIR4drWHmuG15uwP5fmC0STPdGIKd8wjMUiHbmeGyWftRlWVSEVNC4lz5 QrLtTc4n94egFxn36Q4chqJbMIOdJG3cVlmPw+sO1vKtPEfP2pXz20DLySA53zSt EEOg9A00eDewwUY+UyLK1Tgxf8GPmZ/Egpnw7IFibfghIkBdueuuK7L0yE6Qh7vu X5Qo69U7tYWyUjO4XYNWDS3NT/lhw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudeggdduheduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurheptggguffhjgffgffkfhfvofesthhqmhdthhdtjeenucfhrhhomhepufgtohht thcunfhonhhguceoshgtohhtthhlsehsrghmshgtohdrohhrgheqnecuggftrfgrthhtvg hrnhepudduveekheehiedukeekleelvedufeevfeetudfgtdffteffleehheffueffgfeh necuffhomhgrihhnpehfrhgvvggsshgurdhorhhgnecukfhppeekrdegiedrkeelrddvud efnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepshgt ohhtthhlsehsrghmshgtohdrohhrgh X-ME-Proxy: Received: from [192.168.0.109] (unknown [8.46.89.213]) by mail.messagingengine.com (Postfix) with ESMTPA id 649543280064; Tue, 22 Sep 2020 16:40:40 -0400 (EDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.1\)) Subject: Re: svn commit: r365984 - head/usr.bin/calendar/calendars From: Scott Long In-Reply-To: <202009221943.08MJhNb3006228@slippy.cwsent.com> Date: Tue, 22 Sep 2020 14:40:39 -0600 Cc: Shawn Webb , Gordon Bergling , Andriy Gapon , "Conrad E. Meyer" , src-committers , svn-src-all , svn-src-head Content-Transfer-Encoding: quoted-printable Message-Id: <2B9405A4-8483-4D8E-8668-CC58095E42BE@samsco.org> References: <202009212255.08LMtpSp078237@repo.freebsd.org> <202009212316.08LNG1Dq005499@slippy.cwsent.com> <20200922191843.GA62498@lion.0xfce3.net> <20200922192424.mnzunuwnjtwfwilh@mutt-hbsd> <202009221943.08MJhNb3006228@slippy.cwsent.com> To: Cy Schubert X-Mailer: Apple Mail (2.3608.120.23.2.1) X-Rspamd-Queue-Id: 4BwtVf6NxFz4bYY X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=samsco.org header.s=fm1 header.b=nQbq+XGv; dkim=pass header.d=messagingengine.com header.s=fm3 header.b=dRnRYCxn; dmarc=none; spf=pass (mx1.freebsd.org: domain of scottl@samsco.org designates 66.111.4.29 as permitted sender) smtp.mailfrom=scottl@samsco.org X-Spamd-Result: default: False [-3.26 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[samsco.org:s=fm1,messagingengine.com:s=fm3]; FREEFALL_USER(0.00)[scottl]; FROM_HAS_DN(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[66.111.4.29:from]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:66.111.4.29]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[samsco.org]; NEURAL_HAM_LONG(-1.03)[-1.028]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[samsco.org:+,messagingengine.com:+]; NEURAL_HAM_SHORT(-1.10)[-1.098]; RCPT_COUNT_SEVEN(0.00)[8]; NEURAL_HAM_MEDIUM(-1.03)[-1.030]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:11403, ipnet:66.111.4.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head]; RCVD_IN_DNSWL_LOW(-0.10)[66.111.4.29:from] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 20:40:43 -0000 >>>>>>=20 >>>>>> Does this file still need to be in FreeBSD? It may have been a = novel=3D >> ty back >>>>>> in the day but IMO calendar.history has nothing to do with BSD, = comp=3D >> uters >>>>>> or anything else of interest to FreeBSD. At the very least this = file=3D >> should >>>>>> be moved to ports or better yet, removed entirely. I simply don't = se=3D >> e the >>>>>> point of it being in the tree and distributed with an O/S, any = O/S. >>>> =3D20 >>>> I think that the only reason for this file's existence in the = source tr=3D >> ee is for >>>> Greg's staving off the commit bit reaper. >>>> No offense meant. >>>> =3D20 >>>> P.S. >>>> And occasional flame wars, it seems. >>> =3D20 >>> We already had a similar discussion in march 2020 after r358561 [1]. >>> =3D20 >>> In the short, the calendar utility has it's historic place, even = it's >>> just more a kind of tradition, like adding yourself as a FreeBSD = committer >>> to calendar.freebsd. >>> =3D20 >>> [1] = https://lists.freebsd.org/pipermail/svn-src-all/2020-March/thread.html >>=20 >> Would it make sense to prune calendar entries to only BSD-related >> entries? >=20 > +1 >=20 >=20 Responding to the most recent message here, but there are a couple of = things that warrant a response. First, proposals for technical action, like = re-arranging or removing the calendar module, should happen on arch@, not here. = Please formulate a proposal and move the discuss to that forum. Second, there=E2=80=99s a vibe in parts of this thread that are = passive-aggressively disrespectful to Greg. I encourage those who might feel some personal frustration towards Greg to talk to him directly. The Core team can = help with that communication if needed. Otherwise, it=E2=80=99s not not = appropriate and not welcome on the mailing lists. If you don=E2=80=99t feel it=E2=80=99s = important enough to resolve in a professional manner, then please keep it to yourself. Thanks, Scott From owner-svn-src-head@freebsd.org Tue Sep 22 20:48:29 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1C8483F688D; Tue, 22 Sep 2020 20:48:29 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bwtgd00gMz4c1g; Tue, 22 Sep 2020 20:48:29 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f171.google.com (mail-qk1-f171.google.com [209.85.222.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id D2C1C1E4F8; Tue, 22 Sep 2020 20:48:28 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f171.google.com with SMTP id q63so20568221qkf.3; Tue, 22 Sep 2020 13:48:28 -0700 (PDT) X-Gm-Message-State: AOAM532csQJgimL4nOXcxM5AYJLkpXpUFn06CAmTaBigmP/vElk5tGSR lEsWwduJIuA1nPdzYQiJ5p1QMsKtT8u4BuhVKDE= X-Google-Smtp-Source: ABdhPJwGIFfeOX0aiAX1kKuF9sUPZhk0H5CEwuAxXLMgseqvWA0hZ4CsO1A7uVMvuBa+2IkqSgUrbCpTuUV9831iPtw= X-Received: by 2002:a05:620a:4fb:: with SMTP id b27mr7088707qkh.120.1600807708492; Tue, 22 Sep 2020 13:48:28 -0700 (PDT) MIME-Version: 1.0 References: <202009112049.08BKnavL032212@repo.freebsd.org> In-Reply-To: <202009112049.08BKnavL032212@repo.freebsd.org> From: Kyle Evans Date: Tue, 22 Sep 2020 15:48:15 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r365643 - head/bin/cp To: Alan Somers Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 20:48:29 -0000 On Fri, Sep 11, 2020 at 3:49 PM Alan Somers wrote: > > Author: asomers > Date: Fri Sep 11 20:49:36 2020 > New Revision: 365643 > URL: https://svnweb.freebsd.org/changeset/base/365643 > > Log: > cp: fall back to read/write if copy_file_range fails > > Even though copy_file_range has a file-system agnostic version, it still > fails on devfs (perhaps because the file descriptor is non-seekable?) In > that case, fallback to old-fashioned read/write. Fixes > "cp /dev/null /tmp/null" > Hi, Any objection to adding a quick UPDATING entry for this? I'm seeing occasional reports of this breakage as recent as today on IRC from folks that were a little bit thrown off by this because it throws up fairly far into the build and looks like a stand build regression instead of a cp regression. Thanks, Kyle Evans From owner-svn-src-head@freebsd.org Tue Sep 22 20:51:35 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7E41E3F67B5; Tue, 22 Sep 2020 20:51:35 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwtlC1Jvjz4cPJ; Tue, 22 Sep 2020 20:51:34 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lf1-f43.google.com with SMTP id y2so19537764lfy.10; Tue, 22 Sep 2020 13:51:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wm8duuaB5Z5dXiBKkELAdzP+AGeKpdvIgulOlePA7xU=; b=joSmXyQ0qPgrjo/5JKu3q9CtonA0m4sH9nXFKF4maasHnkLdprSDmynp0jEz9OZbkK LgzZD05QArERdYKRZtZrsu5yVnTQXe4ABAwkCHUVgkACKzsl4omh0gU7ErLg1Xmxeylf zejSwcfBm5+cSVZAhaYE6Mvmk+giiTgPxLY2UwrjzPfUDePfKQEcU9x8dXBZOGf8r/5t ShZcrd22t5rMFt7rv0n8XKB6eajqKgXrZqcihWvXr82zukIykna3MYi8HVg50CGT5ga5 o2XUTT4T4Qwj0mtnWWdiEuiQ6NbQ1DYtuu1MxmH/3+FaIuAcSNzM5ZYdmVdll1lcXbI7 66qA== X-Gm-Message-State: AOAM5301HLgTjlC95s54UuWEXHoxihYxxfaVVSbWVc/do4lrXCGFBNGS ccpMbvxoFCTmMSvxMln1yze8/GvBdZBZxQ6NiYmFpOBO X-Google-Smtp-Source: ABdhPJzLA2DtRnw+4BOy3+7h7Uoi8M/46FFodetwNOV1zUWnCxGOodZJ/ldD4XQMTex93zSClp3hifIlTC3WP4Mb3lg= X-Received: by 2002:a19:8906:: with SMTP id l6mr2573519lfd.136.1600807892764; Tue, 22 Sep 2020 13:51:32 -0700 (PDT) MIME-Version: 1.0 References: <202009112049.08BKnavL032212@repo.freebsd.org> In-Reply-To: From: Alan Somers Date: Tue, 22 Sep 2020 14:51:20 -0600 Message-ID: Subject: Re: svn commit: r365643 - head/bin/cp To: Kyle Evans Cc: src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4BwtlC1Jvjz4cPJ X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 20:51:35 -0000 On Tue, Sep 22, 2020 at 2:48 PM Kyle Evans wrote: > On Fri, Sep 11, 2020 at 3:49 PM Alan Somers wrote: > > > > Author: asomers > > Date: Fri Sep 11 20:49:36 2020 > > New Revision: 365643 > > URL: https://svnweb.freebsd.org/changeset/base/365643 > > > > Log: > > cp: fall back to read/write if copy_file_range fails > > > > Even though copy_file_range has a file-system agnostic version, it > still > > fails on devfs (perhaps because the file descriptor is non-seekable?) > In > > that case, fallback to old-fashioned read/write. Fixes > > "cp /dev/null /tmp/null" > > > > Hi, > > Any objection to adding a quick UPDATING entry for this? I'm seeing > occasional reports of this breakage as recent as today on IRC from > folks that were a little bit thrown off by this because it throws up > fairly far into the build and looks like a stand build regression > instead of a cp regression. > > Thanks, > > Kyle Evans > No objection. Can you suggest the proper wording? From owner-svn-src-head@freebsd.org Tue Sep 22 20:54:27 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EBF7C3F6B65; Tue, 22 Sep 2020 20:54:27 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwtpW2dXwz4cQg; Tue, 22 Sep 2020 20:54:27 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm1-x32f.google.com with SMTP id k18so4738682wmj.5; Tue, 22 Sep 2020 13:54: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=QWBYGmJZxBqDgB5A9kxRwXgyKh9nLy0O8eD5XcVCE5w=; b=WfHDsPf1rD/ugu+yCC4V2IqEPYlgaGmNMnrc5MbyAvFAZCjXN86StR4a/c6cVMMMR/ gqk0Qm8LqUMHErP27WaZZTkjWxZzugWzP9d9dFA69xxbjFsKl9f1nIcD8/JFapsV9g1O qLX87rvU8V/w0DAtE4UjAe8ZHOjBtUJBjLSVv3dWHWsgLwRe2TyrHyLXsMbELirUUjZV floHP7fs8jl6jIyWnKTmxtUXFpXwc8vAOi4Nd+t9ky5D4ICliywGd3lO053kX58k6Yxv 77jpkPip3WW8X6Xs0OWiD3j05Spc/3RGHY+iRwZOy+RxJVCKsuNjOR/WOxfqx/bqRuxU 43hw== 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=QWBYGmJZxBqDgB5A9kxRwXgyKh9nLy0O8eD5XcVCE5w=; b=VSTwsE9RMXyBdA7ytWYoxH6x3uMwexz1wr1TYXfo511s7fVjB+xb8fJu7VfRwmi9TV 5Eb9DukD7c9A1LEpzNq/2Pug1rXGGciPeOdXl4XA/DuDhQCyCPMlT1DY4Gr3qE9Kx/x5 iITto4L3/j12JWOdGgCKdS5CsrGXY3VK7ss6hUs9hZ/vPctSSJv+ccsO3vhncI3DE6iF IyI1Be9AkCntv/ug+xEmXdmNucT7jk+pM6LpzRjHYtOpsQZOwNOWqa1owFcpOiijQxxM 99FWRbHxcNTuiizayCwBo+aIZm/Rbf23SYIU/G1FroPJ8AqfBMJ8DOtC0dACKTqE3sVi iFAg== X-Gm-Message-State: AOAM530sdqKNtbhp5gGWRJwpXuAAYM7/oW7rVtSAk9l2bevH9tB03adr IJKp+HTTIdI1hhhubhOY8t5gypS7v9kxgiu/axmSMKhCpzI= X-Google-Smtp-Source: ABdhPJz2o4Sd414/ozI+DsV2v1wSDcQs2Zn73FomNbS/hbqVGLquapTBBDcdD2+hF/KcSZ2vD3U+w9f0qYaoH+Y+eqI= X-Received: by 2002:a1c:2441:: with SMTP id k62mr2884755wmk.178.1600808064116; Tue, 22 Sep 2020 13:54:24 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:6000:187:0:0:0:0 with HTTP; Tue, 22 Sep 2020 13:54:23 -0700 (PDT) In-Reply-To: References: <202009112049.08BKnavL032212@repo.freebsd.org> From: Mateusz Guzik Date: Tue, 22 Sep 2020 22:54:23 +0200 Message-ID: Subject: Re: svn commit: r365643 - head/bin/cp To: Alan Somers Cc: Kyle Evans , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4BwtpW2dXwz4cQg X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 20:54:28 -0000 Can we instead add a workaround to the build tree? Where is cp /dev/null coming from anyway? Perhaps this can be patched to touch the target file. On 9/22/20, Alan Somers wrote: > On Tue, Sep 22, 2020 at 2:48 PM Kyle Evans wrote: > >> On Fri, Sep 11, 2020 at 3:49 PM Alan Somers wrote: >> > >> > Author: asomers >> > Date: Fri Sep 11 20:49:36 2020 >> > New Revision: 365643 >> > URL: https://svnweb.freebsd.org/changeset/base/365643 >> > >> > Log: >> > cp: fall back to read/write if copy_file_range fails >> > >> > Even though copy_file_range has a file-system agnostic version, it >> still >> > fails on devfs (perhaps because the file descriptor is non-seekable?) >> In >> > that case, fallback to old-fashioned read/write. Fixes >> > "cp /dev/null /tmp/null" >> > >> >> Hi, >> >> Any objection to adding a quick UPDATING entry for this? I'm seeing >> occasional reports of this breakage as recent as today on IRC from >> folks that were a little bit thrown off by this because it throws up >> fairly far into the build and looks like a stand build regression >> instead of a cp regression. >> >> Thanks, >> >> Kyle Evans >> > > No objection. Can you suggest the proper wording? > _______________________________________________ > 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" > -- Mateusz Guzik From owner-svn-src-head@freebsd.org Tue Sep 22 20:56:24 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1A1B83F6C05; Tue, 22 Sep 2020 20:56:24 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bwtrl71p8z4cZ0; Tue, 22 Sep 2020 20:56:23 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f181.google.com (mail-qk1-f181.google.com [209.85.222.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id CFAB51EEFF; Tue, 22 Sep 2020 20:56:23 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f181.google.com with SMTP id w16so20624690qkj.7; Tue, 22 Sep 2020 13:56:23 -0700 (PDT) X-Gm-Message-State: AOAM530Ru+CWmQ8S/FoiwdTGsC4lUk2AA1TcOD64wAo+jBVjgxEP4Aw8 B5MnRU6XgfrC3DX9Y7W6z78WoBV2Pqzaro6SZuM= X-Google-Smtp-Source: ABdhPJwsWsqkf7baK2pEwgTPAtrAW9Chb5yOgklUOCGaFlmcGhyofO1SHqyKyjBjEHJmFjRQGiP72UIXorJjjATEnTw= X-Received: by 2002:a05:620a:4fb:: with SMTP id b27mr7121328qkh.120.1600808183383; Tue, 22 Sep 2020 13:56:23 -0700 (PDT) MIME-Version: 1.0 References: <202009112049.08BKnavL032212@repo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Tue, 22 Sep 2020 15:56:10 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r365643 - head/bin/cp To: Mateusz Guzik Cc: Alan Somers , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 20:56:24 -0000 On Tue, Sep 22, 2020 at 3:54 PM Mateusz Guzik wrote: > On 9/22/20, Alan Somers wrote: > > On Tue, Sep 22, 2020 at 2:48 PM Kyle Evans wrote: > > > >> On Fri, Sep 11, 2020 at 3:49 PM Alan Somers wrote: > >> > > >> > Author: asomers > >> > Date: Fri Sep 11 20:49:36 2020 > >> > New Revision: 365643 > >> > URL: https://svnweb.freebsd.org/changeset/base/365643 > >> > > >> > Log: > >> > cp: fall back to read/write if copy_file_range fails > >> > > >> > Even though copy_file_range has a file-system agnostic version, it > >> still > >> > fails on devfs (perhaps because the file descriptor is non-seekable?) > >> In > >> > that case, fallback to old-fashioned read/write. Fixes > >> > "cp /dev/null /tmp/null" > >> > > >> > >> Hi, > >> > >> Any objection to adding a quick UPDATING entry for this? I'm seeing > >> occasional reports of this breakage as recent as today on IRC from > >> folks that were a little bit thrown off by this because it throws up > >> fairly far into the build and looks like a stand build regression > >> instead of a cp regression. > >> > >> Thanks, > >> > >> Kyle Evans > >> > > > > No objection. Can you suggest the proper wording? > > Can we instead add a workaround to the build tree? > > Where is cp /dev/null coming from anyway? Perhaps this can be patched > to touch the target file. > I'll look into why stand's doing it this way, but the workaround is a bit heavy-handed than an advisory to effectively do the same; you'd have to pick what ends up being a huge range of revisions based on __FreeBSD_version to decide on bootstrapping a cp that gets used instead. From owner-svn-src-head@freebsd.org Tue Sep 22 20:58:10 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9E1A63F687B; Tue, 22 Sep 2020 20:58:10 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bwttn3S4Yz4cp3; Tue, 22 Sep 2020 20:58:09 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lj1-f177.google.com with SMTP id v23so15357605ljd.1; Tue, 22 Sep 2020 13:58:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xXfwgqyGssYX/b2CRh+NwCOG0+Z+0X2hU/aPgChW8Hw=; b=JTV0ZsfYz8BRhacJv/CuLtbJwFJpIscT6VMfQKXNuo4OEXRFfiBv3eqwjv1QC6r5Ru c2fQPaI3FwcC69X/sNqLUg6EuctGOuhcn/hP181psRNeik4rL5e5RA6A5hK+fdUoLPGw Qywv4Ad3DVZQFhjim882TGymzPT+y89pFslbyqRW4NA5WEB4QuWkLfE6u1chD0ch91Qy xi/E7hl4oKj2wKFg6Uz2t0ywcr05cDkXSIfDDrpqJQ4oASlrloXbgJbxBSQkwZMxkG5u 8bTq0r4aurDgqADCqF6bC7f0n99ibk+0iD7aDYMK10OikPf5ukovOjYMdh3oNE6Ib6d+ WRCQ== X-Gm-Message-State: AOAM5338T6LMjz+r+jDUZNAzJbPb7++d1p7PR4qX3HPP3vIjg+NeK2sQ fDfyNefw2AJALEazROCCw/Y84i+z/6bES7aFO+QGQwRrbqg= X-Google-Smtp-Source: ABdhPJxz+S1ihqfcJTHzFzfafntBjPUYCdMw0b3vMV39HUYxcdsK+gi3Pi9nSt+OqCZuNbkmb+KwYvqgV10vBMy+6mQ= X-Received: by 2002:a2e:9b99:: with SMTP id z25mr2298693lji.403.1600808287710; Tue, 22 Sep 2020 13:58:07 -0700 (PDT) MIME-Version: 1.0 References: <202009112049.08BKnavL032212@repo.freebsd.org> In-Reply-To: From: Alan Somers Date: Tue, 22 Sep 2020 14:57:56 -0600 Message-ID: Subject: Re: svn commit: r365643 - head/bin/cp To: Mateusz Guzik Cc: Kyle Evans , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4Bwttn3S4Yz4cp3 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.208.177 as permitted sender) smtp.mailfrom=asomers@gmail.com X-Spamd-Result: default: False [-1.82 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FREEFALL_USER(0.00)[asomers]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; NEURAL_HAM_LONG(-1.02)[-1.019]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.79)[-0.793]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.01)[-0.011]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.177:from]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.177:from]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 20:58:10 -0000 Looks like two places in stand. Is there any reason why Mateusz's suggestion wouldn't work? > rg -g Makefile 'cp.*/dev/null' stand/libsa/Makefile 125: [ -f xlocale/$$i ] || cp /dev/null xlocale/$$i; \ stand/i386/zfsboot/Makefile 82: cp /dev/null ${.TARGET} On Tue, Sep 22, 2020 at 2:54 PM Mateusz Guzik wrote: > Can we instead add a workaround to the build tree? > > Where is cp /dev/null coming from anyway? Perhaps this can be patched > to touch the target file. > > On 9/22/20, Alan Somers wrote: > > On Tue, Sep 22, 2020 at 2:48 PM Kyle Evans wrote: > > > >> On Fri, Sep 11, 2020 at 3:49 PM Alan Somers > wrote: > >> > > >> > Author: asomers > >> > Date: Fri Sep 11 20:49:36 2020 > >> > New Revision: 365643 > >> > URL: https://svnweb.freebsd.org/changeset/base/365643 > >> > > >> > Log: > >> > cp: fall back to read/write if copy_file_range fails > >> > > >> > Even though copy_file_range has a file-system agnostic version, it > >> still > >> > fails on devfs (perhaps because the file descriptor is > non-seekable?) > >> In > >> > that case, fallback to old-fashioned read/write. Fixes > >> > "cp /dev/null /tmp/null" > >> > > >> > >> Hi, > >> > >> Any objection to adding a quick UPDATING entry for this? I'm seeing > >> occasional reports of this breakage as recent as today on IRC from > >> folks that were a little bit thrown off by this because it throws up > >> fairly far into the build and looks like a stand build regression > >> instead of a cp regression. > >> > >> Thanks, > >> > >> Kyle Evans > >> > > > > No objection. Can you suggest the proper wording? > > _______________________________________________ > > 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" > > > > > -- > Mateusz Guzik > From owner-svn-src-head@freebsd.org Tue Sep 22 20:59:00 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BA2193F6E0C; Tue, 22 Sep 2020 20:59:00 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bwtvm4RV9z4d0p; Tue, 22 Sep 2020 20:59:00 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f174.google.com (mail-qk1-f174.google.com [209.85.222.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 7568F1EA60; Tue, 22 Sep 2020 20:59:00 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f174.google.com with SMTP id q5so20651878qkc.2; Tue, 22 Sep 2020 13:59:00 -0700 (PDT) X-Gm-Message-State: AOAM530J9zlZSKgndd3/egN7fRBNKg3EvXdrzOdXWsCEFZ7reSK7yiKj f89s4g7oWOW60S8ZOcJxwjD1j0TCd6p0nQjv5Ss= X-Google-Smtp-Source: ABdhPJyfK2NRZC+X3B0FJnwyQRrTyV1a7y3+Yfb1wfXcSsFL3e/qTpGUmZLCne7fVM27e1kwg0InQgqgoiPlH3inz4k= X-Received: by 2002:a37:a189:: with SMTP id k131mr6603008qke.34.1600808340075; Tue, 22 Sep 2020 13:59:00 -0700 (PDT) MIME-Version: 1.0 References: <202009112049.08BKnavL032212@repo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Tue, 22 Sep 2020 15:58:48 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r365643 - head/bin/cp To: Alan Somers Cc: Mateusz Guzik , Kyle Evans , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 20:59:00 -0000 Perhaps: diff --git a/stand/i386/zfsboot/Makefile b/stand/i386/zfsboot/Makefile index ff315abc0ef..7e362b43a39 100644 --- a/stand/i386/zfsboot/Makefile +++ b/stand/i386/zfsboot/Makefile @@ -81,7 +81,7 @@ zfsboot.ld: zfsboot.ldr zfsboot.bin ${BTXKERN} -o ${.TARGET} -P 1 zfsboot.bin zfsboot.ldr: - cp /dev/null ${.TARGET} + :> ${.TARGET} zfsboot.bin: zfsboot.out ${OBJCOPY} -S -O binary zfsboot.out ${.TARGET} diff --git a/stand/libsa/Makefile b/stand/libsa/Makefile index effece9e01b..63cd46a9c54 100644 --- a/stand/libsa/Makefile +++ b/stand/libsa/Makefile @@ -122,7 +122,7 @@ beforedepend: ln -sf ${SRCTOP}/include/arpa/inet.h arpa/inet.h; \ ln -sf ${SRCTOP}/include/arpa/tftp.h arpa/tftp.h; \ for i in _time.h _strings.h _string.h; do \ - [ -f xlocale/$$i ] || cp /dev/null xlocale/$$i; \ + [ -f xlocale/$$i ] || :> xlocale/$$i; \ done; \ for i in ${STAND_H_INC}; do \ ln -sf ${SASRC}/stand.h $$i; \ On Tue, Sep 22, 2020 at 3:58 PM Alan Somers wrote: > > Looks like two places in stand. Is there any reason why Mateusz's suggestion wouldn't work? > > > rg -g Makefile 'cp.*/dev/null' > stand/libsa/Makefile > 125: [ -f xlocale/$$i ] || cp /dev/null xlocale/$$i; \ > > stand/i386/zfsboot/Makefile > 82: cp /dev/null ${.TARGET} > > On Tue, Sep 22, 2020 at 2:54 PM Mateusz Guzik wrote: >> >> Can we instead add a workaround to the build tree? >> >> Where is cp /dev/null coming from anyway? Perhaps this can be patched >> to touch the target file. >> >> On 9/22/20, Alan Somers wrote: >> > On Tue, Sep 22, 2020 at 2:48 PM Kyle Evans wrote: >> > >> >> On Fri, Sep 11, 2020 at 3:49 PM Alan Somers wrote: >> >> > >> >> > Author: asomers >> >> > Date: Fri Sep 11 20:49:36 2020 >> >> > New Revision: 365643 >> >> > URL: https://svnweb.freebsd.org/changeset/base/365643 >> >> > >> >> > Log: >> >> > cp: fall back to read/write if copy_file_range fails >> >> > >> >> > Even though copy_file_range has a file-system agnostic version, it >> >> still >> >> > fails on devfs (perhaps because the file descriptor is non-seekable?) >> >> In >> >> > that case, fallback to old-fashioned read/write. Fixes >> >> > "cp /dev/null /tmp/null" >> >> > >> >> >> >> Hi, >> >> >> >> Any objection to adding a quick UPDATING entry for this? I'm seeing >> >> occasional reports of this breakage as recent as today on IRC from >> >> folks that were a little bit thrown off by this because it throws up >> >> fairly far into the build and looks like a stand build regression >> >> instead of a cp regression. >> >> >> >> Thanks, >> >> >> >> Kyle Evans >> >> >> > >> > No objection. Can you suggest the proper wording? >> > _______________________________________________ >> > 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" >> > >> >> >> -- >> Mateusz Guzik From owner-svn-src-head@freebsd.org Tue Sep 22 21:02:05 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8D5043F708C; Tue, 22 Sep 2020 21:02:05 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwtzK1tyWz4d6c; Tue, 22 Sep 2020 21:02:05 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lf1-f54.google.com with SMTP id u8so19607660lff.1; Tue, 22 Sep 2020 14:02:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=S3S3uuNSvJ5vICDiQesD3Z+0oYF2YgYf8sBm7aDEYYs=; b=WuyFyTRU9c55CYXrMb1MRJXAsaWNQDTuBQ33tqQXLWlsBpncmijE6IW6mWChQKhAXZ 2HHeU6LVbJt9Mj7qaynxCDcP77Z83Prewrwp/n+PQqGOFQl7TDNi6Q8Ut4j+tPeuNKLF ygH6g/srBFzTr7EyJdl8YasnvHPE8GIKIHjT2vxdCCOvRiS83hscFDXzf2o98Bp4QWH7 p9Twust1bmDwQFfViJLHdMMH2JUmts6lSANSq451Mdlbu85YfLY7aCpzZrRlugjcr7Pt h7+4zqzp1REahNRLfximeZXSNfuNjsCTveDeu3G5eSFUR7bNMXFPobfR8seKGDGK1Zz2 89kg== X-Gm-Message-State: AOAM531zDoXslLEYHDHkXjOznHLNaSWkXZFQgEZnhCQlD6jqILmgggCU YxLJIWFQk3QlYIuYqsyECazTFHb1Wpaakgot6ByqvamE X-Google-Smtp-Source: ABdhPJzZUc9LzbpK+GcJtKCaCA+T/nRjlWN4fxLi+w12t0Mw7hBnJbzQwozcFkPcr1/686ZY6PpSy/qHmXRAP/I4RVo= X-Received: by 2002:a19:c46:: with SMTP id 67mr2159696lfm.60.1600808523209; Tue, 22 Sep 2020 14:02:03 -0700 (PDT) MIME-Version: 1.0 References: <202009112049.08BKnavL032212@repo.freebsd.org> In-Reply-To: From: Alan Somers Date: Tue, 22 Sep 2020 15:01:51 -0600 Message-ID: Subject: Re: svn commit: r365643 - head/bin/cp To: Kyle Evans Cc: Mateusz Guzik , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4BwtzK1tyWz4d6c X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 21:02:05 -0000 LGTM. On Tue, Sep 22, 2020 at 2:59 PM Kyle Evans wrote: > Perhaps: > > diff --git a/stand/i386/zfsboot/Makefile b/stand/i386/zfsboot/Makefile > index ff315abc0ef..7e362b43a39 100644 > --- a/stand/i386/zfsboot/Makefile > +++ b/stand/i386/zfsboot/Makefile > @@ -81,7 +81,7 @@ zfsboot.ld: zfsboot.ldr zfsboot.bin ${BTXKERN} > -o ${.TARGET} -P 1 zfsboot.bin > > zfsboot.ldr: > - cp /dev/null ${.TARGET} > + :> ${.TARGET} > > zfsboot.bin: zfsboot.out > ${OBJCOPY} -S -O binary zfsboot.out ${.TARGET} > diff --git a/stand/libsa/Makefile b/stand/libsa/Makefile > index effece9e01b..63cd46a9c54 100644 > --- a/stand/libsa/Makefile > +++ b/stand/libsa/Makefile > @@ -122,7 +122,7 @@ beforedepend: > ln -sf ${SRCTOP}/include/arpa/inet.h arpa/inet.h; \ > ln -sf ${SRCTOP}/include/arpa/tftp.h arpa/tftp.h; \ > for i in _time.h _strings.h _string.h; do \ > - [ -f xlocale/$$i ] || cp /dev/null xlocale/$$i; \ > + [ -f xlocale/$$i ] || :> xlocale/$$i; \ > done; \ > for i in ${STAND_H_INC}; do \ > ln -sf ${SASRC}/stand.h $$i; \ > > > On Tue, Sep 22, 2020 at 3:58 PM Alan Somers wrote: > > > > Looks like two places in stand. Is there any reason why Mateusz's > suggestion wouldn't work? > > > > > rg -g Makefile 'cp.*/dev/null' > > stand/libsa/Makefile > > 125: [ -f xlocale/$$i ] || cp /dev/null xlocale/$$i; \ > > > > stand/i386/zfsboot/Makefile > > 82: cp /dev/null ${.TARGET} > > > > On Tue, Sep 22, 2020 at 2:54 PM Mateusz Guzik wrote: > >> > >> Can we instead add a workaround to the build tree? > >> > >> Where is cp /dev/null coming from anyway? Perhaps this can be patched > >> to touch the target file. > >> > >> On 9/22/20, Alan Somers wrote: > >> > On Tue, Sep 22, 2020 at 2:48 PM Kyle Evans > wrote: > >> > > >> >> On Fri, Sep 11, 2020 at 3:49 PM Alan Somers > wrote: > >> >> > > >> >> > Author: asomers > >> >> > Date: Fri Sep 11 20:49:36 2020 > >> >> > New Revision: 365643 > >> >> > URL: https://svnweb.freebsd.org/changeset/base/365643 > >> >> > > >> >> > Log: > >> >> > cp: fall back to read/write if copy_file_range fails > >> >> > > >> >> > Even though copy_file_range has a file-system agnostic version, > it > >> >> still > >> >> > fails on devfs (perhaps because the file descriptor is > non-seekable?) > >> >> In > >> >> > that case, fallback to old-fashioned read/write. Fixes > >> >> > "cp /dev/null /tmp/null" > >> >> > > >> >> > >> >> Hi, > >> >> > >> >> Any objection to adding a quick UPDATING entry for this? I'm seeing > >> >> occasional reports of this breakage as recent as today on IRC from > >> >> folks that were a little bit thrown off by this because it throws up > >> >> fairly far into the build and looks like a stand build regression > >> >> instead of a cp regression. > >> >> > >> >> Thanks, > >> >> > >> >> Kyle Evans > >> >> > >> > > >> > No objection. Can you suggest the proper wording? > >> > _______________________________________________ > >> > 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 > " > >> > > >> > >> > >> -- > >> Mateusz Guzik > From owner-svn-src-head@freebsd.org Tue Sep 22 21:04:14 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A05353F7023; Tue, 22 Sep 2020 21:04:14 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bwv1p1V6hz4dP0; Tue, 22 Sep 2020 21:04:13 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.16.1/8.16.1) with ESMTPS id 08ML4C6P034740 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 22 Sep 2020 14:04:12 -0700 (PDT) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.16.1/8.16.1/Submit) id 08ML4CGZ034739; Tue, 22 Sep 2020 14:04:12 -0700 (PDT) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Tue, 22 Sep 2020 14:04:12 -0700 From: Gleb Smirnoff To: Kyle Evans Cc: src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r360037 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <20200922210412.GC1269@FreeBSD.org> References: <202004170605.03H658mu067039@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4Bwv1p1V6hz4dP0 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; ASN(0.00)[asn:27348, ipnet:162.251.186.0/24, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 21:04:14 -0000 Kyle, On Thu, Sep 03, 2020 at 12:49:41PM -0500, Kyle Evans wrote: K> > Author: glebius K> > Date: Fri Apr 17 06:05:08 2020 K> > New Revision: 360037 K> > URL: https://svnweb.freebsd.org/changeset/base/360037 K> > K> > Log: K> > Make ZFS depend on xdr.ko only. It doesn't need kernel RPC. K> > K> > Differential Revision: https://reviews.freebsd.org/D24408 K> > K> K> Would you object to me MFC'ing this series to stable/12? It's pretty K> useful for building a good MINIMAL config with zfs support, and would K> probably allow us to drop a __FreeBSD_version split of dependencies in K> the short-to-mid term from OpenZFS if we don't need to pretend that K> OpenZFS will build on 11. None of it looked too invasive for stable K> from a cursory glance. My apologies for the delay. Of course, these changes can be easily MFCed. Go forward for it. -- Gleb Smirnoff From owner-svn-src-head@freebsd.org Tue Sep 22 21:13:31 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 151B43F743F; Tue, 22 Sep 2020 21:13:31 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwvDV6mCGz4f1J; Tue, 22 Sep 2020 21:13:30 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CB493259A5; Tue, 22 Sep 2020 21:13:30 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08MLDUiV009601; Tue, 22 Sep 2020 21:13:30 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08MLDQs6009580; Tue, 22 Sep 2020 21:13:26 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <202009222113.08MLDQs6009580@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Tue, 22 Sep 2020 21:13:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366012 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: brueffer X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 366012 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 21:13:31 -0000 Author: brueffer Date: Tue Sep 22 21:13:26 2020 New Revision: 366012 URL: https://svnweb.freebsd.org/changeset/base/366012 Log: Fix a bunch of mdoc issues found by mandoc -Tlint. Modified: head/share/man/man4/cc_newreno.4 head/share/man/man4/ddb.4 head/share/man/man4/ena.4 head/share/man/man4/fdc.4 head/share/man/man4/gpioiic.4 head/share/man/man4/iicmux.4 head/share/man/man4/itwd.4 head/share/man/man4/linux.4 head/share/man/man4/mem.4 head/share/man/man4/nda.4 head/share/man/man4/ng_patch.4 head/share/man/man4/psm.4 head/share/man/man4/rum.4 head/share/man/man4/smb.4 head/share/man/man4/umass.4 head/share/man/man4/vale.4 head/share/man/man4/vmd.4 head/share/man/man4/wbwd.4 Modified: head/share/man/man4/cc_newreno.4 ============================================================================== --- head/share/man/man4/cc_newreno.4 Tue Sep 22 20:20:43 2020 (r366011) +++ head/share/man/man4/cc_newreno.4 Tue Sep 22 21:13:26 2020 (r366012) @@ -47,13 +47,13 @@ The module supports a number of socket options under TCP_CCALGOOPT (refer to .Xr tcp 4 and -.Xr moc_cc 9 for details) +.Xr mod_cc 9 for details) which can be set with .Xr setsockopt 2 and tested with .Xr getsockopt 2 . -The +The .Nm socket options use this structure defined in : Modified: head/share/man/man4/ddb.4 ============================================================================== --- head/share/man/man4/ddb.4 Tue Sep 22 20:20:43 2020 (r366011) +++ head/share/man/man4/ddb.4 Tue Sep 22 21:13:26 2020 (r366012) @@ -532,9 +532,7 @@ if the argument is a decimal number, or address .Ar addr , otherwise. .El -.Pp .Ss SPECIALIZED HELPER COMMANDS -.Pp .Bl -tag -width indent -compact .It Xo .Ic findstack Modified: head/share/man/man4/ena.4 ============================================================================== --- head/share/man/man4/ena.4 Tue Sep 22 20:20:43 2020 (r366011) +++ head/share/man/man4/ena.4 Tue Sep 22 21:13:26 2020 (r366012) @@ -263,6 +263,7 @@ Packet with unsupported number of segments was queued device. .br Packet will be dropped. +.El .Sh SUPPORT If an issue is identified with the released source code with a supported adapter, please email the specific information related to the issue to @@ -276,4 +277,4 @@ and The .Nm driver was written by -.An Semihalf. +.An Semihalf . Modified: head/share/man/man4/fdc.4 ============================================================================== --- head/share/man/man4/fdc.4 Tue Sep 22 20:20:43 2020 (r366011) +++ head/share/man/man4/fdc.4 Tue Sep 22 21:13:26 2020 (r366012) @@ -322,14 +322,14 @@ The PC Card attachment of this driver is scheduled for floppy disk device nodes .El .Sh SEE ALSO -.Xr fdformat 1 , .Xr fdread 1 , .Xr fdwrite 1 , .Xr ioctl 2 , .Xr open 2 , .Xr read 2 , .Xr write 2 , -.Xr fdcontrol 8 +.Xr fdcontrol 8 , +.Xr fdformat 8 .Sh AUTHORS .An -nosplit This man page was initially written by Modified: head/share/man/man4/gpioiic.4 ============================================================================== --- head/share/man/man4/gpioiic.4 Tue Sep 22 20:20:43 2020 (r366011) +++ head/share/man/man4/gpioiic.4 Tue Sep 22 21:13:26 2020 (r366012) @@ -61,7 +61,6 @@ The pins are never driven to the logical value of '1'. They are driven to '0' or switched to input mode (Hi-Z/tri-state), and an external pullup resistor pulls the line to the 1 state unless some other device on the bus is driving it to 0. -.Pp .Sh HINTS CONFIGURATION On a .Xr device.hints 5 Modified: head/share/man/man4/iicmux.4 ============================================================================== --- head/share/man/man4/iicmux.4 Tue Sep 22 20:20:43 2020 (r366011) +++ head/share/man/man4/iicmux.4 Tue Sep 22 21:13:26 2020 (r366012) @@ -140,7 +140,7 @@ When configured via hints, the driver automatically ad instance for every downstream bus supported by the chip. There is currently no way to indicate used versus unused downstream buses. .Sh SEE ALSO -.Xr iicbus 4 , +.Xr iicbus 4 .Sh HISTORY The .Nm Modified: head/share/man/man4/itwd.4 ============================================================================== --- head/share/man/man4/itwd.4 Tue Sep 22 20:20:43 2020 (r366011) +++ head/share/man/man4/itwd.4 Tue Sep 22 21:13:26 2020 (r366012) @@ -63,7 +63,7 @@ IT8728F IT8771F .El .Sh SEE ALSO -.Xr superio 4 +.Xr superio 4 , .Xr watchdog 4 , .Xr device.hints 5 , .Xr watchdog 8 , Modified: head/share/man/man4/linux.4 ============================================================================== --- head/share/man/man4/linux.4 Tue Sep 22 20:20:43 2020 (r366011) +++ head/share/man/man4/linux.4 Tue Sep 22 21:13:26 2020 (r366012) @@ -125,6 +125,7 @@ From a user perspective, this makes .Va SIGINFO work for Linux executables. Defaults to 0. +.El .Sh FILES .Bl -tag -width /compat/linux/dev/shm -compact .It Pa /compat/linux Modified: head/share/man/man4/mem.4 ============================================================================== --- head/share/man/man4/mem.4 Tue Sep 22 20:20:43 2020 (r366011) +++ head/share/man/man4/mem.4 Tue Sep 22 21:13:26 2020 (r366012) @@ -198,6 +198,7 @@ should be set to to update an existing or establish a new range, or to .Dv MEMRANGE_SET_REMOVE to remove a range. +.El .Sh RETURN VALUES .Bl -tag -width Er .It Bq Er EOPNOTSUPP Modified: head/share/man/man4/nda.4 ============================================================================== --- head/share/man/man4/nda.4 Tue Sep 22 20:20:43 2020 (r366011) +++ head/share/man/man4/nda.4 Tue Sep 22 21:13:26 2020 (r366012) @@ -68,7 +68,7 @@ aliases will be created for all devices, including partitions and other .Xr geom 4 providers that take their names from the disk's name. -.Xr nvd +.Xr nvd 4 devices will not, however, be reported in the .Va kern.disks .Xr sysctl 8 . Modified: head/share/man/man4/ng_patch.4 ============================================================================== --- head/share/man/man4/ng_patch.4 Tue Sep 22 20:20:43 2020 (r366011) +++ head/share/man/man4/ng_patch.4 Tue Sep 22 21:13:26 2020 (r366012) @@ -55,7 +55,8 @@ corresponding to the very first byte of packet headers .Va length bytes beginning from .Va offset -as a single integer in network byte order. An additional offset can be optionally +as a single integer in network byte order. +An additional offset can be optionally requested at configuration time to account for packet type. .Sh HOOKS This node type has two hooks: @@ -88,7 +89,7 @@ hook (to help calculate relative offset). Currently, s If you want to work on the link layer header you must use no additional offset by specifying .Cm DLT_RAW . If -.Cm EN10MB +.Cm EN10MB is specified, then the optional additional offset will take into account the Ethernet header and a QinQ header if present. .It Dv NGM_PATCH_GETDLT Pq Ic getdlt This control message returns the data link type of the Modified: head/share/man/man4/psm.4 ============================================================================== --- head/share/man/man4/psm.4 Tue Sep 22 20:20:43 2020 (r366011) +++ head/share/man/man4/psm.4 Tue Sep 22 21:13:26 2020 (r366012) @@ -344,7 +344,7 @@ Similarly, extended support for IBM/Lenovo TrackPoint can be enabled by setting .Va hw.psm.trackpoint_support or -.Va hw.psm.elantech_support, +.Va hw.psm.elantech_support , respectively, to .Em 1 at boot-time. Modified: head/share/man/man4/rum.4 ============================================================================== --- head/share/man/man4/rum.4 Tue Sep 22 20:20:43 2020 (r366011) +++ head/share/man/man4/rum.4 Tue Sep 22 21:13:26 2020 (r366012) @@ -168,7 +168,7 @@ This should not happen. .Xr wlan_xauth 4 , .Xr hostapd 8 , .Xr ifconfig 8 , -.Xr wpa_supplicant 8 . +.Xr wpa_supplicant 8 .Rs .%T "Ralink Technology" .%U http://www.ralinktech.com/ Modified: head/share/man/man4/smb.4 ============================================================================== --- head/share/man/man4/smb.4 Tue Sep 22 20:20:43 2020 (r366011) +++ head/share/man/man4/smb.4 Tue Sep 22 21:13:26 2020 (r366012) @@ -158,7 +158,7 @@ first sends the byte from to the device, then reads a count of data bytes that the device is going to provide and then reads that many bytes. The count is returned in -.Fa rcount. +.Fa rcount . The data is returned in the buffer pointed to by .Fa rbuf . .El Modified: head/share/man/man4/umass.4 ============================================================================== --- head/share/man/man4/umass.4 Tue Sep 22 20:20:43 2020 (r366011) +++ head/share/man/man4/umass.4 Tue Sep 22 21:13:26 2020 (r366012) @@ -84,7 +84,6 @@ device pass Add the .Nm driver to the kernel. -.Pp .Bd -literal -offset indent camcontrol rescan 0:0:0 camcontrol rescan 0:0:1 Modified: head/share/man/man4/vale.4 ============================================================================== --- head/share/man/man4/vale.4 Tue Sep 22 20:20:43 2020 (r366011) +++ head/share/man/man4/vale.4 Tue Sep 22 21:13:26 2020 (r366012) @@ -84,7 +84,6 @@ See for a list of sysctl variables that affect .Nm bridges. -.El .Sh EXAMPLES Create one switch, with a traffic generator connected to one port, and a netmap-enabled tcpdump instance on another port: Modified: head/share/man/man4/vmd.4 ============================================================================== --- head/share/man/man4/vmd.4 Tue Sep 22 20:20:43 2020 (r366011) +++ head/share/man/man4/vmd.4 Tue Sep 22 21:13:26 2020 (r366012) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Octber 9, 2019 +.Dd October 9, 2019 .Dt VMD 4 .Os .Sh NAME @@ -46,7 +46,6 @@ line in .Bd -literal -offset indent vmd_load="YES" .Ed -.Pp .Sh DESCRIPTION This driver attaches to Intel VMD devices as a new PCI domain and then triggers a probe of PCI devices. Modified: head/share/man/man4/wbwd.4 ============================================================================== --- head/share/man/man4/wbwd.4 Tue Sep 22 20:20:43 2020 (r366011) +++ head/share/man/man4/wbwd.4 Tue Sep 22 21:13:26 2020 (r366012) @@ -127,7 +127,7 @@ The driver also provides further sysctl options that are hidden by default. See the source code for more information. .Sh SEE ALSO -.Xr superio 4 +.Xr superio 4 , .Xr watchdog 4 , .Xr device.hints 5 , .Xr watchdog 8 , From owner-svn-src-head@freebsd.org Tue Sep 22 21:27:00 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6C8993F796B; Tue, 22 Sep 2020 21:27:00 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwvX42Gn5z4g2h; Tue, 22 Sep 2020 21:27:00 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qt1-f173.google.com (mail-qt1-f173.google.com [209.85.160.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 29FD61E5CA; Tue, 22 Sep 2020 21:27:00 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f173.google.com with SMTP id c18so16896830qtw.5; Tue, 22 Sep 2020 14:27:00 -0700 (PDT) X-Gm-Message-State: AOAM530SL/62gP2kxC1y4CzBht0WKwISh7ag04M6Pt/ejGSEecjsLEU0 Qfl6FBvcFdLYiIGYt26aoRpRytBbsxW6gsl3HZg= X-Google-Smtp-Source: ABdhPJwfDMEVQnSvrsP4xRE0k7buv5lBwe2JSG1O4XscoruqIrp0BrFKtCsG8lLlqkUxcwHhRN1thBoW70l7nbx8ow8= X-Received: by 2002:ac8:3f3d:: with SMTP id c58mr6906726qtk.53.1600810019714; Tue, 22 Sep 2020 14:26:59 -0700 (PDT) MIME-Version: 1.0 References: <202009112049.08BKnavL032212@repo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Tue, 22 Sep 2020 16:26:47 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r365643 - head/bin/cp To: Alan Somers Cc: Mateusz Guzik , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 21:27:00 -0000 I'm running a build at the suggestion of mjg to confirm there aren't any others hiding that can be converted, and I will commit after I've verified that this is it. On Tue, Sep 22, 2020 at 4:02 PM Alan Somers wrote: > > LGTM. > > On Tue, Sep 22, 2020 at 2:59 PM Kyle Evans wrote: >> >> Perhaps: >> >> diff --git a/stand/i386/zfsboot/Makefile b/stand/i386/zfsboot/Makefile >> index ff315abc0ef..7e362b43a39 100644 >> --- a/stand/i386/zfsboot/Makefile >> +++ b/stand/i386/zfsboot/Makefile >> @@ -81,7 +81,7 @@ zfsboot.ld: zfsboot.ldr zfsboot.bin ${BTXKERN} >> -o ${.TARGET} -P 1 zfsboot.bin >> >> zfsboot.ldr: >> - cp /dev/null ${.TARGET} >> + :> ${.TARGET} >> >> zfsboot.bin: zfsboot.out >> ${OBJCOPY} -S -O binary zfsboot.out ${.TARGET} >> diff --git a/stand/libsa/Makefile b/stand/libsa/Makefile >> index effece9e01b..63cd46a9c54 100644 >> --- a/stand/libsa/Makefile >> +++ b/stand/libsa/Makefile >> @@ -122,7 +122,7 @@ beforedepend: >> ln -sf ${SRCTOP}/include/arpa/inet.h arpa/inet.h; \ >> ln -sf ${SRCTOP}/include/arpa/tftp.h arpa/tftp.h; \ >> for i in _time.h _strings.h _string.h; do \ >> - [ -f xlocale/$$i ] || cp /dev/null xlocale/$$i; \ >> + [ -f xlocale/$$i ] || :> xlocale/$$i; \ >> done; \ >> for i in ${STAND_H_INC}; do \ >> ln -sf ${SASRC}/stand.h $$i; \ >> >> >> On Tue, Sep 22, 2020 at 3:58 PM Alan Somers wrote: >> > >> > Looks like two places in stand. Is there any reason why Mateusz's suggestion wouldn't work? >> > >> > > rg -g Makefile 'cp.*/dev/null' >> > stand/libsa/Makefile >> > 125: [ -f xlocale/$$i ] || cp /dev/null xlocale/$$i; \ >> > >> > stand/i386/zfsboot/Makefile >> > 82: cp /dev/null ${.TARGET} >> > >> > On Tue, Sep 22, 2020 at 2:54 PM Mateusz Guzik wrote: >> >> >> >> Can we instead add a workaround to the build tree? >> >> >> >> Where is cp /dev/null coming from anyway? Perhaps this can be patched >> >> to touch the target file. >> >> >> >> On 9/22/20, Alan Somers wrote: >> >> > On Tue, Sep 22, 2020 at 2:48 PM Kyle Evans wrote: >> >> > >> >> >> On Fri, Sep 11, 2020 at 3:49 PM Alan Somers wrote: >> >> >> > >> >> >> > Author: asomers >> >> >> > Date: Fri Sep 11 20:49:36 2020 >> >> >> > New Revision: 365643 >> >> >> > URL: https://svnweb.freebsd.org/changeset/base/365643 >> >> >> > >> >> >> > Log: >> >> >> > cp: fall back to read/write if copy_file_range fails >> >> >> > >> >> >> > Even though copy_file_range has a file-system agnostic version, it >> >> >> still >> >> >> > fails on devfs (perhaps because the file descriptor is non-seekable?) >> >> >> In >> >> >> > that case, fallback to old-fashioned read/write. Fixes >> >> >> > "cp /dev/null /tmp/null" >> >> >> > >> >> >> >> >> >> Hi, >> >> >> >> >> >> Any objection to adding a quick UPDATING entry for this? I'm seeing >> >> >> occasional reports of this breakage as recent as today on IRC from >> >> >> folks that were a little bit thrown off by this because it throws up >> >> >> fairly far into the build and looks like a stand build regression >> >> >> instead of a cp regression. >> >> >> >> >> >> Thanks, >> >> >> >> >> >> Kyle Evans >> >> >> >> >> > >> >> > No objection. Can you suggest the proper wording? >> >> > _______________________________________________ >> >> > 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" >> >> > >> >> >> >> >> >> -- >> >> Mateusz Guzik From owner-svn-src-head@freebsd.org Tue Sep 22 21:31:44 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 740173F7EDE; Tue, 22 Sep 2020 21:31:44 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oi1-f174.google.com (mail-oi1-f174.google.com [209.85.167.174]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwvdX0yDLz3RNs; Tue, 22 Sep 2020 21:31:44 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-oi1-f174.google.com with SMTP id n2so22672078oij.1; Tue, 22 Sep 2020 14:31:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dxE+iGUwDm9ToM1XH/+86QVhbiPGS5QxuSkJpUl9GG8=; b=d8n+jMNNvLvF4sRZJT/6/CXbOmvLeMIm0Nim4v/H9NyuwAoS8YZeHLaEMoQpXEFEwm x8bw/4+kAgXjoFwll/5uSKo6tO2G2JxevwIeL8dNvcFohZN1iUOAM9I5kq6UGgP1S22L 4JOD5gYFoSRaEhjdkKc/lWl64a3tCrbAojLPwkrJHO/hk34xV3EQ4r79XS++QGN0G9Bc Ymusn9dKjk5HwuDy/UYbnrpUznqsnld43/0E2a/EQjiz50HGk3x+BlGfAaafZS/w67KF Iwy8K5ip7tWZagN0KxMVeQ0xKhShU3w5vEIdp7b5rEdl2BulP+HItHVffDCAdiku6xpJ 4tLA== X-Gm-Message-State: AOAM53318Y7bu8UsZAIAc3EZfKg7b212k/6+iL1kmyY3hO0z1/kgqbyJ MOipUQgEw+Kh/pAGZyzTfJPwm9dK6tZhv1SopAFfJGhq X-Google-Smtp-Source: ABdhPJzRdSvdMSbHDG6fq6L+RBTkmbxP2gS1xHGq4bpqoSTJvP9i9shYcnXbG9DvJLl4y7mlS5PfvCoR4OGgIXiG820= X-Received: by 2002:a05:6808:555:: with SMTP id i21mr3697496oig.55.1600810302919; Tue, 22 Sep 2020 14:31:42 -0700 (PDT) MIME-Version: 1.0 References: <202009112049.08BKnavL032212@repo.freebsd.org> In-Reply-To: From: Alan Somers Date: Tue, 22 Sep 2020 15:31:31 -0600 Message-ID: Subject: Re: svn commit: r365643 - head/bin/cp To: Kyle Evans Cc: Mateusz Guzik , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4BwvdX0yDLz3RNs X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 21:31:44 -0000 +1. On Tue, Sep 22, 2020 at 3:27 PM Kyle Evans wrote: > I'm running a build at the suggestion of mjg to confirm there aren't > any others hiding that can be converted, and I will commit after I've > verified that this is it. > > On Tue, Sep 22, 2020 at 4:02 PM Alan Somers wrote: > > > > LGTM. > > > > On Tue, Sep 22, 2020 at 2:59 PM Kyle Evans wrote: > >> > >> Perhaps: > >> > >> diff --git a/stand/i386/zfsboot/Makefile b/stand/i386/zfsboot/Makefile > >> index ff315abc0ef..7e362b43a39 100644 > >> --- a/stand/i386/zfsboot/Makefile > >> +++ b/stand/i386/zfsboot/Makefile > >> @@ -81,7 +81,7 @@ zfsboot.ld: zfsboot.ldr zfsboot.bin ${BTXKERN} > >> -o ${.TARGET} -P 1 zfsboot.bin > >> > >> zfsboot.ldr: > >> - cp /dev/null ${.TARGET} > >> + :> ${.TARGET} > >> > >> zfsboot.bin: zfsboot.out > >> ${OBJCOPY} -S -O binary zfsboot.out ${.TARGET} > >> diff --git a/stand/libsa/Makefile b/stand/libsa/Makefile > >> index effece9e01b..63cd46a9c54 100644 > >> --- a/stand/libsa/Makefile > >> +++ b/stand/libsa/Makefile > >> @@ -122,7 +122,7 @@ beforedepend: > >> ln -sf ${SRCTOP}/include/arpa/inet.h arpa/inet.h; \ > >> ln -sf ${SRCTOP}/include/arpa/tftp.h arpa/tftp.h; \ > >> for i in _time.h _strings.h _string.h; do \ > >> - [ -f xlocale/$$i ] || cp /dev/null xlocale/$$i; \ > >> + [ -f xlocale/$$i ] || :> xlocale/$$i; \ > >> done; \ > >> for i in ${STAND_H_INC}; do \ > >> ln -sf ${SASRC}/stand.h $$i; \ > >> > >> > >> On Tue, Sep 22, 2020 at 3:58 PM Alan Somers > wrote: > >> > > >> > Looks like two places in stand. Is there any reason why Mateusz's > suggestion wouldn't work? > >> > > >> > > rg -g Makefile 'cp.*/dev/null' > >> > stand/libsa/Makefile > >> > 125: [ -f xlocale/$$i ] || cp /dev/null xlocale/$$i; \ > >> > > >> > stand/i386/zfsboot/Makefile > >> > 82: cp /dev/null ${.TARGET} > >> > > >> > On Tue, Sep 22, 2020 at 2:54 PM Mateusz Guzik > wrote: > >> >> > >> >> Can we instead add a workaround to the build tree? > >> >> > >> >> Where is cp /dev/null coming from anyway? Perhaps this can be patched > >> >> to touch the target file. > >> >> > >> >> On 9/22/20, Alan Somers wrote: > >> >> > On Tue, Sep 22, 2020 at 2:48 PM Kyle Evans > wrote: > >> >> > > >> >> >> On Fri, Sep 11, 2020 at 3:49 PM Alan Somers > wrote: > >> >> >> > > >> >> >> > Author: asomers > >> >> >> > Date: Fri Sep 11 20:49:36 2020 > >> >> >> > New Revision: 365643 > >> >> >> > URL: https://svnweb.freebsd.org/changeset/base/365643 > >> >> >> > > >> >> >> > Log: > >> >> >> > cp: fall back to read/write if copy_file_range fails > >> >> >> > > >> >> >> > Even though copy_file_range has a file-system agnostic > version, it > >> >> >> still > >> >> >> > fails on devfs (perhaps because the file descriptor is > non-seekable?) > >> >> >> In > >> >> >> > that case, fallback to old-fashioned read/write. Fixes > >> >> >> > "cp /dev/null /tmp/null" > >> >> >> > > >> >> >> > >> >> >> Hi, > >> >> >> > >> >> >> Any objection to adding a quick UPDATING entry for this? I'm > seeing > >> >> >> occasional reports of this breakage as recent as today on IRC from > >> >> >> folks that were a little bit thrown off by this because it throws > up > >> >> >> fairly far into the build and looks like a stand build regression > >> >> >> instead of a cp regression. > >> >> >> > >> >> >> Thanks, > >> >> >> > >> >> >> Kyle Evans > >> >> >> > >> >> > > >> >> > No objection. Can you suggest the proper wording? > >> >> > _______________________________________________ > >> >> > 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" > >> >> > > >> >> > >> >> > >> >> -- > >> >> Mateusz Guzik > From owner-svn-src-head@freebsd.org Tue Sep 22 21:40:25 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E184D3E00CD for ; Tue, 22 Sep 2020 21:40:25 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwvqX5hBKz3SCd for ; Tue, 22 Sep 2020 21:40:24 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-lf1-x129.google.com with SMTP id b22so19659345lfs.13 for ; Tue, 22 Sep 2020 14:40:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wplx7mOV8skWN9Q4rkxaEdhI1qqZEsQinUksW6XZv3Y=; b=E3uejyZ8YLf7VQVI6FphdOOAqqcCCLomy228s3HuKh9smXpcN5mPfktg8aD0Kc8lkf LDsZO+HeRooHAcGsGVvboCGxiGTBi80Yq7lCbCXRfHsPuYrjO252MqEDIvvHkxk+66Oy yPE5xRvpoxdGkUSGk/wfF8ba4xhwqmZkXURPoNM1Hn0KizioOJOW4r2ENJaRivzSVJm1 8Kzh1onWqAmJVqcDYgjMaSuCEhwQ2zMjjhLOnLoP0D0UqgXaQ1bcDFO+ap9oDSke8rfp rHqV4D1x7a+rUHYJBStkz8rg97v+50TBrcjEpRWNFnqh6cD6VPjlKiSAYb+5h2vgwB+V TdcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wplx7mOV8skWN9Q4rkxaEdhI1qqZEsQinUksW6XZv3Y=; b=pofDkRLg+0cZyLOkI+hV33CtS7iv2Cr8+7Su1szaG4iZbwy7bGRsjMIiEXUWFrnrrF HYrlB3ECOyR6jBX3tUJebenVQT2xbJCaibCGzYd/HzbZInbQDlef+RzisBwdjCDskBmz WPF9gDjwqiVYYPlLIHEaT8BNnBbYkLvX/1YoQglUxA+P/XUasG/0kSZ1sXMvKDmdvXtd AXsh4lUeE1+gev0M9Pz4vC/d0qckqh/x7UNkxjwZQTXSvNSpr4PSNBcb995FcpHCk33B mpzlxKBy9boZazC1r/8bA6nuQ3XxO7eI6T00+p7ITr/AgWvRBNVN76jvqVCvchFpg8Zr TPBA== X-Gm-Message-State: AOAM532MRLyT2TrSeMncX9Kp9GN3p1H2WbSQmkLBR4xEp9gxFH79WUm5 wdsan871xkzakFKoYQIZqnMaGlFkPe8ds/HSdOTWkA== X-Google-Smtp-Source: ABdhPJwjfqiykgyQMB53CTbJoEXhAUv6CUZv3YiB2i31zCDl+L/m1OIOgC1bbPImrHcKexC87EFK3LnIJRnKxx3nbf8= X-Received: by 2002:a19:754:: with SMTP id 81mr2187595lfh.272.1600810822633; Tue, 22 Sep 2020 14:40:22 -0700 (PDT) MIME-Version: 1.0 References: <202009112049.08BKnavL032212@repo.freebsd.org> In-Reply-To: From: Warner Losh Date: Tue, 22 Sep 2020 15:40:11 -0600 Message-ID: Subject: Re: svn commit: r365643 - head/bin/cp To: Alan Somers Cc: Kyle Evans , Mateusz Guzik , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4BwvqX5hBKz3SCd X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=E3uejyZ8; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2a00:1450:4864:20::129) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-1.58 / 15.00]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[svn-src-head]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_MEDIUM(-0.91)[-0.909]; NEURAL_HAM_LONG(-0.98)[-0.976]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::129:from]; NEURAL_SPAM_SHORT(0.31)[0.307]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_TWO(0.00)[2]; FREEMAIL_CC(0.00)[freebsd.org,gmail.com]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 21:40:25 -0000 So why do we need a workaround at all? cp /dev/null has been fixed, and that's way more important to get right. I don't want to paper-over issues with this at all, though if we use the host's (now broken) cp, I suppose that might be OK in the short term. If that's the case, then maybe this is OK. Otherwise, I'd strongly prefer we fix cp. Warner On Tue, Sep 22, 2020 at 3:31 PM Alan Somers wrote: > +1. > > On Tue, Sep 22, 2020 at 3:27 PM Kyle Evans wrote: > >> I'm running a build at the suggestion of mjg to confirm there aren't >> any others hiding that can be converted, and I will commit after I've >> verified that this is it. >> >> On Tue, Sep 22, 2020 at 4:02 PM Alan Somers wrote: >> > >> > LGTM. >> > >> > On Tue, Sep 22, 2020 at 2:59 PM Kyle Evans wrote: >> >> >> >> Perhaps: >> >> >> >> diff --git a/stand/i386/zfsboot/Makefile b/stand/i386/zfsboot/Makefile >> >> index ff315abc0ef..7e362b43a39 100644 >> >> --- a/stand/i386/zfsboot/Makefile >> >> +++ b/stand/i386/zfsboot/Makefile >> >> @@ -81,7 +81,7 @@ zfsboot.ld: zfsboot.ldr zfsboot.bin ${BTXKERN} >> >> -o ${.TARGET} -P 1 zfsboot.bin >> >> >> >> zfsboot.ldr: >> >> - cp /dev/null ${.TARGET} >> >> + :> ${.TARGET} >> >> >> >> zfsboot.bin: zfsboot.out >> >> ${OBJCOPY} -S -O binary zfsboot.out ${.TARGET} >> >> diff --git a/stand/libsa/Makefile b/stand/libsa/Makefile >> >> index effece9e01b..63cd46a9c54 100644 >> >> --- a/stand/libsa/Makefile >> >> +++ b/stand/libsa/Makefile >> >> @@ -122,7 +122,7 @@ beforedepend: >> >> ln -sf ${SRCTOP}/include/arpa/inet.h arpa/inet.h; \ >> >> ln -sf ${SRCTOP}/include/arpa/tftp.h arpa/tftp.h; \ >> >> for i in _time.h _strings.h _string.h; do \ >> >> - [ -f xlocale/$$i ] || cp /dev/null xlocale/$$i; \ >> >> + [ -f xlocale/$$i ] || :> xlocale/$$i; \ >> >> done; \ >> >> for i in ${STAND_H_INC}; do \ >> >> ln -sf ${SASRC}/stand.h $$i; \ >> >> >> >> >> >> On Tue, Sep 22, 2020 at 3:58 PM Alan Somers >> wrote: >> >> > >> >> > Looks like two places in stand. Is there any reason why Mateusz's >> suggestion wouldn't work? >> >> > >> >> > > rg -g Makefile 'cp.*/dev/null' >> >> > stand/libsa/Makefile >> >> > 125: [ -f xlocale/$$i ] || cp /dev/null xlocale/$$i; \ >> >> > >> >> > stand/i386/zfsboot/Makefile >> >> > 82: cp /dev/null ${.TARGET} >> >> > >> >> > On Tue, Sep 22, 2020 at 2:54 PM Mateusz Guzik >> wrote: >> >> >> >> >> >> Can we instead add a workaround to the build tree? >> >> >> >> >> >> Where is cp /dev/null coming from anyway? Perhaps this can be >> patched >> >> >> to touch the target file. >> >> >> >> >> >> On 9/22/20, Alan Somers wrote: >> >> >> > On Tue, Sep 22, 2020 at 2:48 PM Kyle Evans >> wrote: >> >> >> > >> >> >> >> On Fri, Sep 11, 2020 at 3:49 PM Alan Somers >> wrote: >> >> >> >> > >> >> >> >> > Author: asomers >> >> >> >> > Date: Fri Sep 11 20:49:36 2020 >> >> >> >> > New Revision: 365643 >> >> >> >> > URL: https://svnweb.freebsd.org/changeset/base/365643 >> >> >> >> > >> >> >> >> > Log: >> >> >> >> > cp: fall back to read/write if copy_file_range fails >> >> >> >> > >> >> >> >> > Even though copy_file_range has a file-system agnostic >> version, it >> >> >> >> still >> >> >> >> > fails on devfs (perhaps because the file descriptor is >> non-seekable?) >> >> >> >> In >> >> >> >> > that case, fallback to old-fashioned read/write. Fixes >> >> >> >> > "cp /dev/null /tmp/null" >> >> >> >> > >> >> >> >> >> >> >> >> Hi, >> >> >> >> >> >> >> >> Any objection to adding a quick UPDATING entry for this? I'm >> seeing >> >> >> >> occasional reports of this breakage as recent as today on IRC >> from >> >> >> >> folks that were a little bit thrown off by this because it >> throws up >> >> >> >> fairly far into the build and looks like a stand build regression >> >> >> >> instead of a cp regression. >> >> >> >> >> >> >> >> Thanks, >> >> >> >> >> >> >> >> Kyle Evans >> >> >> >> >> >> >> > >> >> >> > No objection. Can you suggest the proper wording? >> >> >> > _______________________________________________ >> >> >> > 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" >> >> >> > >> >> >> >> >> >> >> >> >> -- >> >> >> Mateusz Guzik >> > From owner-svn-src-head@freebsd.org Tue Sep 22 21:42:16 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 04FB93E0240; Tue, 22 Sep 2020 21:42:16 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bwvsg6QFvz3SZ3; Tue, 22 Sep 2020 21:42:15 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f172.google.com (mail-qk1-f172.google.com [209.85.222.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id BB89D1EDF4; Tue, 22 Sep 2020 21:42:15 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f172.google.com with SMTP id w16so20767439qkj.7; Tue, 22 Sep 2020 14:42:15 -0700 (PDT) X-Gm-Message-State: AOAM5306xyZpj9PqpFLbiB4B2Job16RPHNIp6SgubPzr4cV8pGmZqq/3 wcjvRVHET7/6fJqQ2azoVsBBAb6j50JROF1xTb8= X-Google-Smtp-Source: ABdhPJwai0mcdVZ66aEtnZjY5AyU7MmT8kQkkRtY1VKmNOwYpiVwwFpHgh3Ctq8Uj9FRhRLYTkfA4bVdbBJ6jRwh2mg= X-Received: by 2002:a05:620a:4fb:: with SMTP id b27mr7321424qkh.120.1600810935355; Tue, 22 Sep 2020 14:42:15 -0700 (PDT) MIME-Version: 1.0 References: <202009112049.08BKnavL032212@repo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Tue, 22 Sep 2020 16:42:03 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r365643 - head/bin/cp To: Warner Losh Cc: Alan Somers , Kyle Evans , Mateusz Guzik , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 21:42:16 -0000 cp is already fixed, people are still feeling the fallout of being within those revisions and needing to bootstrap their own cp. We can reduce the number of components these invocations rely on trivially to shell built-in mechanics, why not do so? On Tue, Sep 22, 2020 at 4:40 PM Warner Losh wrote: > > So why do we need a workaround at all? cp /dev/null has been fixed, and that's way more important to get right. > > I don't want to paper-over issues with this at all, though if we use the host's (now broken) cp, I suppose that might be OK in the short term. If that's the case, then maybe this is OK. > > Otherwise, I'd strongly prefer we fix cp. > > Warner > > On Tue, Sep 22, 2020 at 3:31 PM Alan Somers wrote: >> >> +1. >> >> On Tue, Sep 22, 2020 at 3:27 PM Kyle Evans wrote: >>> >>> I'm running a build at the suggestion of mjg to confirm there aren't >>> any others hiding that can be converted, and I will commit after I've >>> verified that this is it. >>> >>> On Tue, Sep 22, 2020 at 4:02 PM Alan Somers wrote: >>> > >>> > LGTM. >>> > >>> > On Tue, Sep 22, 2020 at 2:59 PM Kyle Evans wrote: >>> >> >>> >> Perhaps: >>> >> >>> >> diff --git a/stand/i386/zfsboot/Makefile b/stand/i386/zfsboot/Makefile >>> >> index ff315abc0ef..7e362b43a39 100644 >>> >> --- a/stand/i386/zfsboot/Makefile >>> >> +++ b/stand/i386/zfsboot/Makefile >>> >> @@ -81,7 +81,7 @@ zfsboot.ld: zfsboot.ldr zfsboot.bin ${BTXKERN} >>> >> -o ${.TARGET} -P 1 zfsboot.bin >>> >> >>> >> zfsboot.ldr: >>> >> - cp /dev/null ${.TARGET} >>> >> + :> ${.TARGET} >>> >> >>> >> zfsboot.bin: zfsboot.out >>> >> ${OBJCOPY} -S -O binary zfsboot.out ${.TARGET} >>> >> diff --git a/stand/libsa/Makefile b/stand/libsa/Makefile >>> >> index effece9e01b..63cd46a9c54 100644 >>> >> --- a/stand/libsa/Makefile >>> >> +++ b/stand/libsa/Makefile >>> >> @@ -122,7 +122,7 @@ beforedepend: >>> >> ln -sf ${SRCTOP}/include/arpa/inet.h arpa/inet.h; \ >>> >> ln -sf ${SRCTOP}/include/arpa/tftp.h arpa/tftp.h; \ >>> >> for i in _time.h _strings.h _string.h; do \ >>> >> - [ -f xlocale/$$i ] || cp /dev/null xlocale/$$i; \ >>> >> + [ -f xlocale/$$i ] || :> xlocale/$$i; \ >>> >> done; \ >>> >> for i in ${STAND_H_INC}; do \ >>> >> ln -sf ${SASRC}/stand.h $$i; \ >>> >> >>> >> >>> >> On Tue, Sep 22, 2020 at 3:58 PM Alan Somers wrote: >>> >> > >>> >> > Looks like two places in stand. Is there any reason why Mateusz's suggestion wouldn't work? >>> >> > >>> >> > > rg -g Makefile 'cp.*/dev/null' >>> >> > stand/libsa/Makefile >>> >> > 125: [ -f xlocale/$$i ] || cp /dev/null xlocale/$$i; \ >>> >> > >>> >> > stand/i386/zfsboot/Makefile >>> >> > 82: cp /dev/null ${.TARGET} >>> >> > >>> >> > On Tue, Sep 22, 2020 at 2:54 PM Mateusz Guzik wrote: >>> >> >> >>> >> >> Can we instead add a workaround to the build tree? >>> >> >> >>> >> >> Where is cp /dev/null coming from anyway? Perhaps this can be patched >>> >> >> to touch the target file. >>> >> >> >>> >> >> On 9/22/20, Alan Somers wrote: >>> >> >> > On Tue, Sep 22, 2020 at 2:48 PM Kyle Evans wrote: >>> >> >> > >>> >> >> >> On Fri, Sep 11, 2020 at 3:49 PM Alan Somers wrote: >>> >> >> >> > >>> >> >> >> > Author: asomers >>> >> >> >> > Date: Fri Sep 11 20:49:36 2020 >>> >> >> >> > New Revision: 365643 >>> >> >> >> > URL: https://svnweb.freebsd.org/changeset/base/365643 >>> >> >> >> > >>> >> >> >> > Log: >>> >> >> >> > cp: fall back to read/write if copy_file_range fails >>> >> >> >> > >>> >> >> >> > Even though copy_file_range has a file-system agnostic version, it >>> >> >> >> still >>> >> >> >> > fails on devfs (perhaps because the file descriptor is non-seekable?) >>> >> >> >> In >>> >> >> >> > that case, fallback to old-fashioned read/write. Fixes >>> >> >> >> > "cp /dev/null /tmp/null" >>> >> >> >> > >>> >> >> >> >>> >> >> >> Hi, >>> >> >> >> >>> >> >> >> Any objection to adding a quick UPDATING entry for this? I'm seeing >>> >> >> >> occasional reports of this breakage as recent as today on IRC from >>> >> >> >> folks that were a little bit thrown off by this because it throws up >>> >> >> >> fairly far into the build and looks like a stand build regression >>> >> >> >> instead of a cp regression. >>> >> >> >> >>> >> >> >> Thanks, >>> >> >> >> >>> >> >> >> Kyle Evans >>> >> >> >> >>> >> >> > >>> >> >> > No objection. Can you suggest the proper wording? >>> >> >> > _______________________________________________ >>> >> >> > 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" >>> >> >> > >>> >> >> >>> >> >> >>> >> >> -- >>> >> >> Mateusz Guzik From owner-svn-src-head@freebsd.org Tue Sep 22 21:45:05 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 654873E06DF for ; Tue, 22 Sep 2020 21:45:05 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bwvww2KJyz3TBc for ; Tue, 22 Sep 2020 21:45:04 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-lj1-x230.google.com with SMTP id k25so15396758ljg.9 for ; Tue, 22 Sep 2020 14:45:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Rj6fn3PsdHXNMyLoIKfhT9XCm47vsiHiZaxHZq7idz0=; b=n/xsnp2/ftcqbC3L/OeWic8ywF6gydf8xaWKdWys8zMLOWJCav3zsAEhthb2SCLbJj d3K5FOYYNy/aMj3aJxCI2Ib1992zhXlaCVnhYxvOPwxvRU1cNEfUQwRoB3lgF9dhzGNd waqTHCbVyrZbexmpjOLj7MJ36wXmD1xSz6p2Cjerm8xRPU+4VvK/ZI4OaBrx0jIgWfov OLJLegqmmuqgGJ5ealfXoJF7IMfDnhVLyr7Zwbf53MBlZL3S/Sf9mD7iG9zM4U14WOXX Cd7BAxWkbgwHjQcv44y6APf7j/dQuPKSvP2oTG0pCCKEIQOchQNThROiQ9qSaXqKT7kQ 405Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Rj6fn3PsdHXNMyLoIKfhT9XCm47vsiHiZaxHZq7idz0=; b=fr7v1r6DKROcekCoHi/wAPB2EFTH/zRhL4xr+18JEosn+8+Fmn+b3RrwSAtpdTbN+e V9M+2AmSoUlG109n0wP10XR0sQLluH7SDlWI0/tUBHvULTe6ymm+ADkDFcVSjHHEHpGS d5pD8+s195slHXFiNjX6lbhgRU8KulJ1hoSusJtseChIRIuY5g3LzaKlrVCHo1xAnw+N REbTBmbfY/9UDd7evcKCaTVruW8erH3a3bgDuXI5zfbs9N1N7OR07iv5R210nRftweVx 6Rt3h9L7lunY0IZmmittHLAxfWBkKlaWyg5LVAcScQ6IfG2l/JDlamU4btukubbdj4k+ M+Gw== X-Gm-Message-State: AOAM533JCEXwpWUdgS3dHKlSsAW2mhXnDum9u5JqXDlkyhVy/YmX+66J lkUy7S2gOhoL2ew9Nb34IDhKjSHSX2RaSRhRNHjg/A== X-Google-Smtp-Source: ABdhPJwbDcWh2Gk5YIH7xGB/EtaL51/dTzWYeeY1KI+EwUTc8C/Uh23h/yCVN0o/10034FB28AJsAZchkH4EbTkSLwU= X-Received: by 2002:a05:651c:134a:: with SMTP id j10mr2329398ljb.337.1600811102354; Tue, 22 Sep 2020 14:45:02 -0700 (PDT) MIME-Version: 1.0 References: <202009112049.08BKnavL032212@repo.freebsd.org> In-Reply-To: From: Warner Losh Date: Tue, 22 Sep 2020 15:44:51 -0600 Message-ID: Subject: Re: svn commit: r365643 - head/bin/cp To: Kyle Evans Cc: Alan Somers , Mateusz Guzik , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4Bwvww2KJyz3TBc X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=n/xsnp2/; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2a00:1450:4864:20::230) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-1.58 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-0.91)[-0.909]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; NEURAL_HAM_LONG(-0.98)[-0.976]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::230:from]; NEURAL_SPAM_SHORT(0.31)[0.307]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; MAILMAN_DEST(0.00)[svn-src-head]; FREEMAIL_CC(0.00)[freebsd.org,gmail.com] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 21:45:05 -0000 On Tue, Sep 22, 2020 at 3:42 PM Kyle Evans wrote: > cp is already fixed, people are still feeling the fallout of being > within those revisions and needing to bootstrap their own cp. We can > reduce the number of components these invocations rely on trivially to > shell built-in mechanics, why not do so? > Fair point. I just bristle at putting workarounds in for valid /bin/sh syntax because we opposed for a few days. so long as it's an unconditional clearing of the file to be zero length, I'm OK with that. Warner > On Tue, Sep 22, 2020 at 4:40 PM Warner Losh wrote: > > > > So why do we need a workaround at all? cp /dev/null has been fixed, and > that's way more important to get right. > > > > I don't want to paper-over issues with this at all, though if we use the > host's (now broken) cp, I suppose that might be OK in the short term. If > that's the case, then maybe this is OK. > > > > Otherwise, I'd strongly prefer we fix cp. > > > > Warner > > > > On Tue, Sep 22, 2020 at 3:31 PM Alan Somers wrote: > >> > >> +1. > >> > >> On Tue, Sep 22, 2020 at 3:27 PM Kyle Evans wrote: > >>> > >>> I'm running a build at the suggestion of mjg to confirm there aren't > >>> any others hiding that can be converted, and I will commit after I've > >>> verified that this is it. > >>> > >>> On Tue, Sep 22, 2020 at 4:02 PM Alan Somers > wrote: > >>> > > >>> > LGTM. > >>> > > >>> > On Tue, Sep 22, 2020 at 2:59 PM Kyle Evans > wrote: > >>> >> > >>> >> Perhaps: > >>> >> > >>> >> diff --git a/stand/i386/zfsboot/Makefile > b/stand/i386/zfsboot/Makefile > >>> >> index ff315abc0ef..7e362b43a39 100644 > >>> >> --- a/stand/i386/zfsboot/Makefile > >>> >> +++ b/stand/i386/zfsboot/Makefile > >>> >> @@ -81,7 +81,7 @@ zfsboot.ld: zfsboot.ldr zfsboot.bin ${BTXKERN} > >>> >> -o ${.TARGET} -P 1 zfsboot.bin > >>> >> > >>> >> zfsboot.ldr: > >>> >> - cp /dev/null ${.TARGET} > >>> >> + :> ${.TARGET} > >>> >> > >>> >> zfsboot.bin: zfsboot.out > >>> >> ${OBJCOPY} -S -O binary zfsboot.out ${.TARGET} > >>> >> diff --git a/stand/libsa/Makefile b/stand/libsa/Makefile > >>> >> index effece9e01b..63cd46a9c54 100644 > >>> >> --- a/stand/libsa/Makefile > >>> >> +++ b/stand/libsa/Makefile > >>> >> @@ -122,7 +122,7 @@ beforedepend: > >>> >> ln -sf ${SRCTOP}/include/arpa/inet.h arpa/inet.h; \ > >>> >> ln -sf ${SRCTOP}/include/arpa/tftp.h arpa/tftp.h; \ > >>> >> for i in _time.h _strings.h _string.h; do \ > >>> >> - [ -f xlocale/$$i ] || cp /dev/null xlocale/$$i; \ > >>> >> + [ -f xlocale/$$i ] || :> xlocale/$$i; \ > >>> >> done; \ > >>> >> for i in ${STAND_H_INC}; do \ > >>> >> ln -sf ${SASRC}/stand.h $$i; \ > >>> >> > >>> >> > >>> >> On Tue, Sep 22, 2020 at 3:58 PM Alan Somers > wrote: > >>> >> > > >>> >> > Looks like two places in stand. Is there any reason why > Mateusz's suggestion wouldn't work? > >>> >> > > >>> >> > > rg -g Makefile 'cp.*/dev/null' > >>> >> > stand/libsa/Makefile > >>> >> > 125: [ -f xlocale/$$i ] || cp /dev/null xlocale/$$i; \ > >>> >> > > >>> >> > stand/i386/zfsboot/Makefile > >>> >> > 82: cp /dev/null ${.TARGET} > >>> >> > > >>> >> > On Tue, Sep 22, 2020 at 2:54 PM Mateusz Guzik > wrote: > >>> >> >> > >>> >> >> Can we instead add a workaround to the build tree? > >>> >> >> > >>> >> >> Where is cp /dev/null coming from anyway? Perhaps this can be > patched > >>> >> >> to touch the target file. > >>> >> >> > >>> >> >> On 9/22/20, Alan Somers wrote: > >>> >> >> > On Tue, Sep 22, 2020 at 2:48 PM Kyle Evans > wrote: > >>> >> >> > > >>> >> >> >> On Fri, Sep 11, 2020 at 3:49 PM Alan Somers < > asomers@freebsd.org> wrote: > >>> >> >> >> > > >>> >> >> >> > Author: asomers > >>> >> >> >> > Date: Fri Sep 11 20:49:36 2020 > >>> >> >> >> > New Revision: 365643 > >>> >> >> >> > URL: https://svnweb.freebsd.org/changeset/base/365643 > >>> >> >> >> > > >>> >> >> >> > Log: > >>> >> >> >> > cp: fall back to read/write if copy_file_range fails > >>> >> >> >> > > >>> >> >> >> > Even though copy_file_range has a file-system agnostic > version, it > >>> >> >> >> still > >>> >> >> >> > fails on devfs (perhaps because the file descriptor is > non-seekable?) > >>> >> >> >> In > >>> >> >> >> > that case, fallback to old-fashioned read/write. Fixes > >>> >> >> >> > "cp /dev/null /tmp/null" > >>> >> >> >> > > >>> >> >> >> > >>> >> >> >> Hi, > >>> >> >> >> > >>> >> >> >> Any objection to adding a quick UPDATING entry for this? I'm > seeing > >>> >> >> >> occasional reports of this breakage as recent as today on IRC > from > >>> >> >> >> folks that were a little bit thrown off by this because it > throws up > >>> >> >> >> fairly far into the build and looks like a stand build > regression > >>> >> >> >> instead of a cp regression. > >>> >> >> >> > >>> >> >> >> Thanks, > >>> >> >> >> > >>> >> >> >> Kyle Evans > >>> >> >> >> > >>> >> >> > > >>> >> >> > No objection. Can you suggest the proper wording? > >>> >> >> > _______________________________________________ > >>> >> >> > 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" > >>> >> >> > > >>> >> >> > >>> >> >> > >>> >> >> -- > >>> >> >> Mateusz Guzik > From owner-svn-src-head@freebsd.org Tue Sep 22 21:48:24 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9C88B3E0B28; Tue, 22 Sep 2020 21:48:24 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oi1-f175.google.com (mail-oi1-f175.google.com [209.85.167.175]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bww0l3nfSz3TPj; Tue, 22 Sep 2020 21:48:23 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-oi1-f175.google.com with SMTP id n2so22716054oij.1; Tue, 22 Sep 2020 14:48:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KZpAvbPycvgZE1cd/dTQnaBbN6I4Wf1Nd1IvLnRgK3g=; b=BRZFXBv1vys3CbuHwHYbPxs4ATsQwjR3MYcOagsY6vi6onkVUZA3v7Rqmv7GE4JbsZ 8BJmG5to0p5sQNda+Zfq8f/aUv96pFiI5grY5SVDBIYCrUf6kXM95typ6ifE4jDOgVGU VEgNp+ryn2FsLulJZO/HcKF9Yd+d8zEPrTfAVCXF4kMIj5sz0GQazCA99YxI7rggN7kp Xw1bGxeliSyV7YSEPRrvubVGimLDuCA98Cctux6IDvx0KWkyR96TL4Aw46/rYHfCjvTa 33IVNhoh8bCxr/HG22q/Wz/XpkaTj2JbABpOMzKSdEjxmcTySajNIrv76zia30E3t46i wSdQ== X-Gm-Message-State: AOAM531gv0PFNt+UpkIACNtfOL/TJwf7ut8ATZN6WSY5Y5fW3K4IpA7o YKVue/50opdw/fx3HU+jj450Sa9vxsLpa/IHlZ4UkkjG X-Google-Smtp-Source: ABdhPJx8ULzUjuwwDj/rlGqR5q4z8+JKkn7+EO6zggOIPEL3FUFraxnY8iga5FV2/PaNNi81Uybg0/cm2tvlDieB+9U= X-Received: by 2002:a05:6808:555:: with SMTP id i21mr3726777oig.55.1600811302414; Tue, 22 Sep 2020 14:48:22 -0700 (PDT) MIME-Version: 1.0 References: <202009112049.08BKnavL032212@repo.freebsd.org> In-Reply-To: From: Alan Somers Date: Tue, 22 Sep 2020 15:48:11 -0600 Message-ID: Subject: Re: svn commit: r365643 - head/bin/cp To: Warner Losh Cc: Kyle Evans , Mateusz Guzik , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4Bww0l3nfSz3TPj X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.167.175 as permitted sender) smtp.mailfrom=asomers@gmail.com X-Spamd-Result: default: False [-1.33 / 15.00]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ARC_NA(0.00)[]; FREEMAIL_CC(0.00)[freebsd.org,gmail.com]; FREEFALL_USER(0.00)[asomers]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; RCVD_TLS_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-0.98)[-0.983]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.167.175:from]; NEURAL_SPAM_SHORT(0.59)[0.589]; NEURAL_HAM_MEDIUM(-0.93)[-0.934]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.167.175:from]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 21:48:24 -0000 It doesn't feel like a workaround to me. I think Kyle's version is clearer than the original. On Tue, Sep 22, 2020 at 3:45 PM Warner Losh wrote: > > > On Tue, Sep 22, 2020 at 3:42 PM Kyle Evans wrote: > >> cp is already fixed, people are still feeling the fallout of being >> within those revisions and needing to bootstrap their own cp. We can >> reduce the number of components these invocations rely on trivially to >> shell built-in mechanics, why not do so? >> > > Fair point. I just bristle at putting workarounds in for valid /bin/sh > syntax because we opposed for a few days. so long as it's an unconditional > clearing of the file to be zero length, I'm OK with that. > > Warner > > >> On Tue, Sep 22, 2020 at 4:40 PM Warner Losh wrote: >> > >> > So why do we need a workaround at all? cp /dev/null has been fixed, and >> that's way more important to get right. >> > >> > I don't want to paper-over issues with this at all, though if we use >> the host's (now broken) cp, I suppose that might be OK in the short term. >> If that's the case, then maybe this is OK. >> > >> > Otherwise, I'd strongly prefer we fix cp. >> > >> > Warner >> > >> > On Tue, Sep 22, 2020 at 3:31 PM Alan Somers >> wrote: >> >> >> >> +1. >> >> >> >> On Tue, Sep 22, 2020 at 3:27 PM Kyle Evans wrote: >> >>> >> >>> I'm running a build at the suggestion of mjg to confirm there aren't >> >>> any others hiding that can be converted, and I will commit after I've >> >>> verified that this is it. >> >>> >> >>> On Tue, Sep 22, 2020 at 4:02 PM Alan Somers >> wrote: >> >>> > >> >>> > LGTM. >> >>> > >> >>> > On Tue, Sep 22, 2020 at 2:59 PM Kyle Evans >> wrote: >> >>> >> >> >>> >> Perhaps: >> >>> >> >> >>> >> diff --git a/stand/i386/zfsboot/Makefile >> b/stand/i386/zfsboot/Makefile >> >>> >> index ff315abc0ef..7e362b43a39 100644 >> >>> >> --- a/stand/i386/zfsboot/Makefile >> >>> >> +++ b/stand/i386/zfsboot/Makefile >> >>> >> @@ -81,7 +81,7 @@ zfsboot.ld: zfsboot.ldr zfsboot.bin ${BTXKERN} >> >>> >> -o ${.TARGET} -P 1 zfsboot.bin >> >>> >> >> >>> >> zfsboot.ldr: >> >>> >> - cp /dev/null ${.TARGET} >> >>> >> + :> ${.TARGET} >> >>> >> >> >>> >> zfsboot.bin: zfsboot.out >> >>> >> ${OBJCOPY} -S -O binary zfsboot.out ${.TARGET} >> >>> >> diff --git a/stand/libsa/Makefile b/stand/libsa/Makefile >> >>> >> index effece9e01b..63cd46a9c54 100644 >> >>> >> --- a/stand/libsa/Makefile >> >>> >> +++ b/stand/libsa/Makefile >> >>> >> @@ -122,7 +122,7 @@ beforedepend: >> >>> >> ln -sf ${SRCTOP}/include/arpa/inet.h arpa/inet.h; \ >> >>> >> ln -sf ${SRCTOP}/include/arpa/tftp.h arpa/tftp.h; \ >> >>> >> for i in _time.h _strings.h _string.h; do \ >> >>> >> - [ -f xlocale/$$i ] || cp /dev/null xlocale/$$i; \ >> >>> >> + [ -f xlocale/$$i ] || :> xlocale/$$i; \ >> >>> >> done; \ >> >>> >> for i in ${STAND_H_INC}; do \ >> >>> >> ln -sf ${SASRC}/stand.h $$i; \ >> >>> >> >> >>> >> >> >>> >> On Tue, Sep 22, 2020 at 3:58 PM Alan Somers >> wrote: >> >>> >> > >> >>> >> > Looks like two places in stand. Is there any reason why >> Mateusz's suggestion wouldn't work? >> >>> >> > >> >>> >> > > rg -g Makefile 'cp.*/dev/null' >> >>> >> > stand/libsa/Makefile >> >>> >> > 125: [ -f xlocale/$$i ] || cp /dev/null xlocale/$$i; \ >> >>> >> > >> >>> >> > stand/i386/zfsboot/Makefile >> >>> >> > 82: cp /dev/null ${.TARGET} >> >>> >> > >> >>> >> > On Tue, Sep 22, 2020 at 2:54 PM Mateusz Guzik >> wrote: >> >>> >> >> >> >>> >> >> Can we instead add a workaround to the build tree? >> >>> >> >> >> >>> >> >> Where is cp /dev/null coming from anyway? Perhaps this can be >> patched >> >>> >> >> to touch the target file. >> >>> >> >> >> >>> >> >> On 9/22/20, Alan Somers wrote: >> >>> >> >> > On Tue, Sep 22, 2020 at 2:48 PM Kyle Evans < >> kevans@freebsd.org> wrote: >> >>> >> >> > >> >>> >> >> >> On Fri, Sep 11, 2020 at 3:49 PM Alan Somers < >> asomers@freebsd.org> wrote: >> >>> >> >> >> > >> >>> >> >> >> > Author: asomers >> >>> >> >> >> > Date: Fri Sep 11 20:49:36 2020 >> >>> >> >> >> > New Revision: 365643 >> >>> >> >> >> > URL: https://svnweb.freebsd.org/changeset/base/365643 >> >>> >> >> >> > >> >>> >> >> >> > Log: >> >>> >> >> >> > cp: fall back to read/write if copy_file_range fails >> >>> >> >> >> > >> >>> >> >> >> > Even though copy_file_range has a file-system agnostic >> version, it >> >>> >> >> >> still >> >>> >> >> >> > fails on devfs (perhaps because the file descriptor is >> non-seekable?) >> >>> >> >> >> In >> >>> >> >> >> > that case, fallback to old-fashioned read/write. Fixes >> >>> >> >> >> > "cp /dev/null /tmp/null" >> >>> >> >> >> > >> >>> >> >> >> >> >>> >> >> >> Hi, >> >>> >> >> >> >> >>> >> >> >> Any objection to adding a quick UPDATING entry for this? I'm >> seeing >> >>> >> >> >> occasional reports of this breakage as recent as today on >> IRC from >> >>> >> >> >> folks that were a little bit thrown off by this because it >> throws up >> >>> >> >> >> fairly far into the build and looks like a stand build >> regression >> >>> >> >> >> instead of a cp regression. >> >>> >> >> >> >> >>> >> >> >> Thanks, >> >>> >> >> >> >> >>> >> >> >> Kyle Evans >> >>> >> >> >> >> >>> >> >> > >> >>> >> >> > No objection. Can you suggest the proper wording? >> >>> >> >> > _______________________________________________ >> >>> >> >> > 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" >> >>> >> >> > >> >>> >> >> >> >>> >> >> >> >>> >> >> -- >> >>> >> >> Mateusz Guzik >> > From owner-svn-src-head@freebsd.org Tue Sep 22 21:50:43 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 012B63E0DA0 for ; Tue, 22 Sep 2020 21:50:42 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bww3Q22qdz3TQV for ; Tue, 22 Sep 2020 21:50:42 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-lj1-x231.google.com with SMTP id v23so15453648ljd.1 for ; Tue, 22 Sep 2020 14:50:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XOwBsK4LJIB/Noe1hwndd/rUz3qsAYh1KJM2Ku11QfQ=; b=egCh3mi6iodLQDhDX6Y/20456jqBXtnJlqdEk3O/BemZTgImhbRNOSLChsyfRRGju5 a9AbfDuU9hNskvFXQGeuftqaMFz56oc+UIb+Q9R4DXtgIjibiOO4UkU1aNKpRtlUj86N aBsCrz6pJhMIE8jGFI0XxYcSiuWrewD7HQqTot/V3N5RQ3aGAOmbOdZ7iRn3vQpGFzFF CzBZDaOe02d4reciO/q4stPfKdXKNLM9XOu6XkbV2k0sKV8ec5wdXhNYk2pwY1xLkmWK 4+jiQ1ysfJm85omREE+BTRVMA4zM2YwDGKXD8L2uCadVSKChxxbeKT7077m40cTHYMTH 1wQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XOwBsK4LJIB/Noe1hwndd/rUz3qsAYh1KJM2Ku11QfQ=; b=dWVxJTC3SVx0zyHHYdRpByi+uIZ85lrFbZS6NOB/TEi3m/fRtdoU6zX97yzb2E7HTz qu6/HC1oKe0p4eTs0rlo2oy4Navcpd75rTYRJg1gRAwPUAzEZ+z/FNVJ20VEyh3gHbVv ZR++wKT5t/7o9byQ4oEojEL9EK4TZK6a2kGKahGb62pEFAuGopUrOINf4aEzg7pibxov snOSPMQcRrx6c7ndoauZHDGhhw155Xntwd8nx62+Wb2T6IR5tTzoYCyljQrWAn4Ea8ao heRIPObbaq+jP6jxFv1+SJnuA5u5qeCvecb+TZslNwQrIWlxl3enNme5gq6CdL07AX2D RSTA== X-Gm-Message-State: AOAM5301BdlCrwy1QBcieEBWOSTE98OxK1b7H9NmGdfJnMMHOw38au3c 4cZaiWEiAmeuYmu8X6Qyf80eoyLRmSR8wLICVW867w== X-Google-Smtp-Source: ABdhPJxOeuWwIupNg1o9RUyN14YBsepnCsEF6hsKDEGslTDN9XzKdoQPlgqJWyfRUAG0dbii3DEkhNGqL4E6c/ljV6I= X-Received: by 2002:a2e:8898:: with SMTP id k24mr1987672lji.74.1600811440384; Tue, 22 Sep 2020 14:50:40 -0700 (PDT) MIME-Version: 1.0 References: <202009112049.08BKnavL032212@repo.freebsd.org> In-Reply-To: From: Warner Losh Date: Tue, 22 Sep 2020 15:50:29 -0600 Message-ID: Subject: Re: svn commit: r365643 - head/bin/cp To: Alan Somers Cc: Kyle Evans , Mateusz Guzik , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4Bww3Q22qdz3TQV X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=egCh3mi6; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2a00:1450:4864:20::231) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-1.57 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-0.91)[-0.908]; FROM_HAS_DN(0.00)[]; FREEMAIL_CC(0.00)[freebsd.org,gmail.com]; NEURAL_HAM_LONG(-0.98)[-0.975]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::231:from]; NEURAL_SPAM_SHORT(0.31)[0.311]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; MAILMAN_DEST(0.00)[svn-src-head] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 21:50:43 -0000 I think it's a great leap sideways, but I've done cp /dev/null foo to clear it out for 35 years now... It's why it feels like a workaround. Though it is a legit optimization, no matter the feelings. As for clearer, I'm less sure since then I have to remember what the : operator does. Warner On Tue, Sep 22, 2020 at 3:48 PM Alan Somers wrote: > It doesn't feel like a workaround to me. I think Kyle's version is > clearer than the original. > > On Tue, Sep 22, 2020 at 3:45 PM Warner Losh wrote: > >> >> >> On Tue, Sep 22, 2020 at 3:42 PM Kyle Evans wrote: >> >>> cp is already fixed, people are still feeling the fallout of being >>> within those revisions and needing to bootstrap their own cp. We can >>> reduce the number of components these invocations rely on trivially to >>> shell built-in mechanics, why not do so? >>> >> >> Fair point. I just bristle at putting workarounds in for valid /bin/sh >> syntax because we opposed for a few days. so long as it's an unconditional >> clearing of the file to be zero length, I'm OK with that. >> >> Warner >> >> >>> On Tue, Sep 22, 2020 at 4:40 PM Warner Losh wrote: >>> > >>> > So why do we need a workaround at all? cp /dev/null has been fixed, >>> and that's way more important to get right. >>> > >>> > I don't want to paper-over issues with this at all, though if we use >>> the host's (now broken) cp, I suppose that might be OK in the short term. >>> If that's the case, then maybe this is OK. >>> > >>> > Otherwise, I'd strongly prefer we fix cp. >>> > >>> > Warner >>> > >>> > On Tue, Sep 22, 2020 at 3:31 PM Alan Somers >>> wrote: >>> >> >>> >> +1. >>> >> >>> >> On Tue, Sep 22, 2020 at 3:27 PM Kyle Evans >>> wrote: >>> >>> >>> >>> I'm running a build at the suggestion of mjg to confirm there aren't >>> >>> any others hiding that can be converted, and I will commit after I've >>> >>> verified that this is it. >>> >>> >>> >>> On Tue, Sep 22, 2020 at 4:02 PM Alan Somers >>> wrote: >>> >>> > >>> >>> > LGTM. >>> >>> > >>> >>> > On Tue, Sep 22, 2020 at 2:59 PM Kyle Evans >>> wrote: >>> >>> >> >>> >>> >> Perhaps: >>> >>> >> >>> >>> >> diff --git a/stand/i386/zfsboot/Makefile >>> b/stand/i386/zfsboot/Makefile >>> >>> >> index ff315abc0ef..7e362b43a39 100644 >>> >>> >> --- a/stand/i386/zfsboot/Makefile >>> >>> >> +++ b/stand/i386/zfsboot/Makefile >>> >>> >> @@ -81,7 +81,7 @@ zfsboot.ld: zfsboot.ldr zfsboot.bin ${BTXKERN} >>> >>> >> -o ${.TARGET} -P 1 zfsboot.bin >>> >>> >> >>> >>> >> zfsboot.ldr: >>> >>> >> - cp /dev/null ${.TARGET} >>> >>> >> + :> ${.TARGET} >>> >>> >> >>> >>> >> zfsboot.bin: zfsboot.out >>> >>> >> ${OBJCOPY} -S -O binary zfsboot.out ${.TARGET} >>> >>> >> diff --git a/stand/libsa/Makefile b/stand/libsa/Makefile >>> >>> >> index effece9e01b..63cd46a9c54 100644 >>> >>> >> --- a/stand/libsa/Makefile >>> >>> >> +++ b/stand/libsa/Makefile >>> >>> >> @@ -122,7 +122,7 @@ beforedepend: >>> >>> >> ln -sf ${SRCTOP}/include/arpa/inet.h arpa/inet.h; \ >>> >>> >> ln -sf ${SRCTOP}/include/arpa/tftp.h arpa/tftp.h; \ >>> >>> >> for i in _time.h _strings.h _string.h; do \ >>> >>> >> - [ -f xlocale/$$i ] || cp /dev/null xlocale/$$i; \ >>> >>> >> + [ -f xlocale/$$i ] || :> xlocale/$$i; \ >>> >>> >> done; \ >>> >>> >> for i in ${STAND_H_INC}; do \ >>> >>> >> ln -sf ${SASRC}/stand.h $$i; \ >>> >>> >> >>> >>> >> >>> >>> >> On Tue, Sep 22, 2020 at 3:58 PM Alan Somers >>> wrote: >>> >>> >> > >>> >>> >> > Looks like two places in stand. Is there any reason why >>> Mateusz's suggestion wouldn't work? >>> >>> >> > >>> >>> >> > > rg -g Makefile 'cp.*/dev/null' >>> >>> >> > stand/libsa/Makefile >>> >>> >> > 125: [ -f xlocale/$$i ] || cp /dev/null xlocale/$$i; \ >>> >>> >> > >>> >>> >> > stand/i386/zfsboot/Makefile >>> >>> >> > 82: cp /dev/null ${.TARGET} >>> >>> >> > >>> >>> >> > On Tue, Sep 22, 2020 at 2:54 PM Mateusz Guzik < >>> mjguzik@gmail.com> wrote: >>> >>> >> >> >>> >>> >> >> Can we instead add a workaround to the build tree? >>> >>> >> >> >>> >>> >> >> Where is cp /dev/null coming from anyway? Perhaps this can be >>> patched >>> >>> >> >> to touch the target file. >>> >>> >> >> >>> >>> >> >> On 9/22/20, Alan Somers wrote: >>> >>> >> >> > On Tue, Sep 22, 2020 at 2:48 PM Kyle Evans < >>> kevans@freebsd.org> wrote: >>> >>> >> >> > >>> >>> >> >> >> On Fri, Sep 11, 2020 at 3:49 PM Alan Somers < >>> asomers@freebsd.org> wrote: >>> >>> >> >> >> > >>> >>> >> >> >> > Author: asomers >>> >>> >> >> >> > Date: Fri Sep 11 20:49:36 2020 >>> >>> >> >> >> > New Revision: 365643 >>> >>> >> >> >> > URL: https://svnweb.freebsd.org/changeset/base/365643 >>> >>> >> >> >> > >>> >>> >> >> >> > Log: >>> >>> >> >> >> > cp: fall back to read/write if copy_file_range fails >>> >>> >> >> >> > >>> >>> >> >> >> > Even though copy_file_range has a file-system agnostic >>> version, it >>> >>> >> >> >> still >>> >>> >> >> >> > fails on devfs (perhaps because the file descriptor is >>> non-seekable?) >>> >>> >> >> >> In >>> >>> >> >> >> > that case, fallback to old-fashioned read/write. Fixes >>> >>> >> >> >> > "cp /dev/null /tmp/null" >>> >>> >> >> >> > >>> >>> >> >> >> >>> >>> >> >> >> Hi, >>> >>> >> >> >> >>> >>> >> >> >> Any objection to adding a quick UPDATING entry for this? >>> I'm seeing >>> >>> >> >> >> occasional reports of this breakage as recent as today on >>> IRC from >>> >>> >> >> >> folks that were a little bit thrown off by this because it >>> throws up >>> >>> >> >> >> fairly far into the build and looks like a stand build >>> regression >>> >>> >> >> >> instead of a cp regression. >>> >>> >> >> >> >>> >>> >> >> >> Thanks, >>> >>> >> >> >> >>> >>> >> >> >> Kyle Evans >>> >>> >> >> >> >>> >>> >> >> > >>> >>> >> >> > No objection. Can you suggest the proper wording? >>> >>> >> >> > _______________________________________________ >>> >>> >> >> > 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" >>> >>> >> >> > >>> >>> >> >> >>> >>> >> >> >>> >>> >> >> -- >>> >>> >> >> Mateusz Guzik >>> >> From owner-svn-src-head@freebsd.org Tue Sep 22 21:53:28 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 02F4F3E1190 for ; Tue, 22 Sep 2020 21:53:28 +0000 (UTC) (envelope-from tsoome@me.com) Received: from pv50p00im-zteg10011501.me.com (pv50p00im-zteg10011501.me.com [17.58.6.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bww6b0tPvz3V6h for ; Tue, 22 Sep 2020 21:53:26 +0000 (UTC) (envelope-from tsoome@me.com) Received: from nazgul.lan (148-52-235-80.sta.estpak.ee [80.235.52.148]) by pv50p00im-zteg10011501.me.com (Postfix) with ESMTPSA id 8DA41B0056D; Tue, 22 Sep 2020 21:53:21 +0000 (UTC) From: Toomas Soome Message-Id: <84F5E4BD-8492-4297-97D6-88E0CE9E9546@me.com> Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.1\)) Subject: Re: svn commit: r365643 - head/bin/cp Date: Wed, 23 Sep 2020 00:53:19 +0300 In-Reply-To: Cc: Alan Somers , Kyle Evans , Mateusz Guzik , src-committers , svn-src-all , svn-src-head To: Warner Losh References: <202009112049.08BKnavL032212@repo.freebsd.org> X-Mailer: Apple Mail (2.3608.120.23.2.1) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-09-22_21:2020-09-21, 2020-09-22 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-2006250000 definitions=main-2009220168 X-Rspamd-Queue-Id: 4Bww6b0tPvz3V6h X-Spamd-Bar: / X-Spamd-Result: default: False [-0.92 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[17.58.6.42:from]; FREEMAIL_FROM(0.00)[me.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:17.58.0.0/16]; URI_COUNT_ODD(1.00)[3]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[me.com:+]; DMARC_POLICY_ALLOW(-0.50)[me.com,quarantine]; RCPT_COUNT_SEVEN(0.00)[7]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[me.com]; ASN(0.00)[asn:714, ipnet:17.58.0.0/20, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[me.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.97)[-0.974]; R_DKIM_ALLOW(-0.20)[me.com:s=1a1hai]; FREEFALL_USER(0.00)[tsoome]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.60)[0.596]; NEURAL_HAM_LONG(-1.04)[-1.038]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RECEIVED_SPAMHAUS_PBL(0.00)[80.235.52.148:received]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[17.58.6.42:from]; FREEMAIL_CC(0.00)[freebsd.org,gmail.com]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[svn-src-head]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 21:53:28 -0000 > On 23. Sep 2020, at 00:50, Warner Losh wrote: >=20 > I think it's a great leap sideways, but I've done cp /dev/null foo to = clear it out for 35 years now... It's why it feels like a workaround. >=20 > Though it is a legit optimization, no matter the feelings. As for = clearer, I'm less sure since then I have to remember what the : operator = does. >=20 > Warner you can always use /bin/true instead (unless its gnu;) or just echo. rgds, toomas >=20 > On Tue, Sep 22, 2020 at 3:48 PM Alan Somers > wrote: > It doesn't feel like a workaround to me. I think Kyle's version is = clearer than the original. >=20 > On Tue, Sep 22, 2020 at 3:45 PM Warner Losh > wrote: >=20 >=20 > On Tue, Sep 22, 2020 at 3:42 PM Kyle Evans > wrote: > cp is already fixed, people are still feeling the fallout of being > within those revisions and needing to bootstrap their own cp. We can > reduce the number of components these invocations rely on trivially to > shell built-in mechanics, why not do so? >=20 > Fair point. I just bristle at putting workarounds in for valid /bin/sh = syntax because we opposed for a few days. so long as it's an = unconditional clearing of the file to be zero length, I'm OK with that. >=20 > Warner > =20 > On Tue, Sep 22, 2020 at 4:40 PM Warner Losh > wrote: > > > > So why do we need a workaround at all? cp /dev/null has been fixed, = and that's way more important to get right. > > > > I don't want to paper-over issues with this at all, though if we use = the host's (now broken) cp, I suppose that might be OK in the short = term. If that's the case, then maybe this is OK. > > > > Otherwise, I'd strongly prefer we fix cp. > > > > Warner > > > > On Tue, Sep 22, 2020 at 3:31 PM Alan Somers > wrote: > >> > >> +1. > >> > >> On Tue, Sep 22, 2020 at 3:27 PM Kyle Evans > wrote: > >>> > >>> I'm running a build at the suggestion of mjg to confirm there = aren't > >>> any others hiding that can be converted, and I will commit after = I've > >>> verified that this is it. > >>> > >>> On Tue, Sep 22, 2020 at 4:02 PM Alan Somers > wrote: > >>> > > >>> > LGTM. > >>> > > >>> > On Tue, Sep 22, 2020 at 2:59 PM Kyle Evans > wrote: > >>> >> > >>> >> Perhaps: > >>> >> > >>> >> diff --git a/stand/i386/zfsboot/Makefile = b/stand/i386/zfsboot/Makefile > >>> >> index ff315abc0ef..7e362b43a39 100644 > >>> >> --- a/stand/i386/zfsboot/Makefile > >>> >> +++ b/stand/i386/zfsboot/Makefile > >>> >> @@ -81,7 +81,7 @@ zfsboot.ld: zfsboot.ldr zfsboot.bin = ${BTXKERN} > >>> >> -o ${.TARGET} -P 1 zfsboot.bin > >>> >> > >>> >> zfsboot.ldr: > >>> >> - cp /dev/null ${.TARGET} > >>> >> + :> ${.TARGET} > >>> >> > >>> >> zfsboot.bin: zfsboot.out > >>> >> ${OBJCOPY} -S -O binary zfsboot.out ${.TARGET} > >>> >> diff --git a/stand/libsa/Makefile b/stand/libsa/Makefile > >>> >> index effece9e01b..63cd46a9c54 100644 > >>> >> --- a/stand/libsa/Makefile > >>> >> +++ b/stand/libsa/Makefile > >>> >> @@ -122,7 +122,7 @@ beforedepend: > >>> >> ln -sf ${SRCTOP}/include/arpa/inet.h arpa/inet.h; \ > >>> >> ln -sf ${SRCTOP}/include/arpa/tftp.h arpa/tftp.h; \ > >>> >> for i in _time.h _strings.h _string.h; do \ > >>> >> - [ -f xlocale/$$i ] || cp /dev/null xlocale/$$i; = \ > >>> >> + [ -f xlocale/$$i ] || :> xlocale/$$i; \ > >>> >> done; \ > >>> >> for i in ${STAND_H_INC}; do \ > >>> >> ln -sf ${SASRC}/stand.h $$i; \ > >>> >> > >>> >> > >>> >> On Tue, Sep 22, 2020 at 3:58 PM Alan Somers = > wrote: > >>> >> > > >>> >> > Looks like two places in stand. Is there any reason why = Mateusz's suggestion wouldn't work? > >>> >> > > >>> >> > > rg -g Makefile 'cp.*/dev/null' > >>> >> > stand/libsa/Makefile > >>> >> > 125: [ -f xlocale/$$i ] || cp /dev/null xlocale/$$i; \ > >>> >> > > >>> >> > stand/i386/zfsboot/Makefile > >>> >> > 82: cp /dev/null ${.TARGET} > >>> >> > > >>> >> > On Tue, Sep 22, 2020 at 2:54 PM Mateusz Guzik = > wrote: > >>> >> >> > >>> >> >> Can we instead add a workaround to the build tree? > >>> >> >> > >>> >> >> Where is cp /dev/null coming from anyway? Perhaps this can = be patched > >>> >> >> to touch the target file. > >>> >> >> > >>> >> >> On 9/22/20, Alan Somers > wrote: > >>> >> >> > On Tue, Sep 22, 2020 at 2:48 PM Kyle Evans = > wrote: > >>> >> >> > > >>> >> >> >> On Fri, Sep 11, 2020 at 3:49 PM Alan Somers = > wrote: > >>> >> >> >> > > >>> >> >> >> > Author: asomers > >>> >> >> >> > Date: Fri Sep 11 20:49:36 2020 > >>> >> >> >> > New Revision: 365643 > >>> >> >> >> > URL: https://svnweb.freebsd.org/changeset/base/365643 = > >>> >> >> >> > > >>> >> >> >> > Log: > >>> >> >> >> > cp: fall back to read/write if copy_file_range fails > >>> >> >> >> > > >>> >> >> >> > Even though copy_file_range has a file-system = agnostic version, it > >>> >> >> >> still > >>> >> >> >> > fails on devfs (perhaps because the file descriptor = is non-seekable?) > >>> >> >> >> In > >>> >> >> >> > that case, fallback to old-fashioned read/write. = Fixes > >>> >> >> >> > "cp /dev/null /tmp/null" > >>> >> >> >> > > >>> >> >> >> > >>> >> >> >> Hi, > >>> >> >> >> > >>> >> >> >> Any objection to adding a quick UPDATING entry for this? = I'm seeing > >>> >> >> >> occasional reports of this breakage as recent as today on = IRC from > >>> >> >> >> folks that were a little bit thrown off by this because = it throws up > >>> >> >> >> fairly far into the build and looks like a stand build = regression > >>> >> >> >> instead of a cp regression. > >>> >> >> >> > >>> >> >> >> Thanks, > >>> >> >> >> > >>> >> >> >> Kyle Evans > >>> >> >> >> > >>> >> >> > > >>> >> >> > No objection. Can you suggest the proper wording? > >>> >> >> > _______________________________________________ > >>> >> >> > 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 = " > >>> >> >> > > >>> >> >> > >>> >> >> > >>> >> >> -- > >>> >> >> Mateusz Guzik > From owner-svn-src-head@freebsd.org Tue Sep 22 21:53:46 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8E1A73E1161 for ; Tue, 22 Sep 2020 21:53:46 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2k.ore.mailhop.org (outbound2k.ore.mailhop.org [54.148.219.64]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bww6y1kG5z3VJp for ; Tue, 22 Sep 2020 21:53:46 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1600811624; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=MCncu9yCFTYXNfVgW0qH2LQY7A9VHgAOJjSoTVpFH2XsO8I+oLXN5gVCFcWMMJVVVYofI68totVde zWDPIkQbSv3b/vE+6E/WOSRg5muVoQCkDg5okJe7W/ivs92fvCf/VqdBNYTAyj0iTvclcgc4R7vQ/t CtcW6jlj0e5tPmFq9j5pAdAcxsiGi0XJEiA9/x8QxgsOB/4rsn/S93TwV7Zexblkj16a0GajtIA1lW gkJgq1Exshm5MwnAq7eJG3e226S8VU98f+4nb/8wUe+fMkaIpAq+HqGF9jqSWFYvFhM+gOxudAnyZu hdH9RNuvigXoX1u2k30kKsoaMd6AWAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=f/g8/hT/jSZ4k1rH26V8GMx2DkwTI5GSfhZlBQDheP0=; b=Kl8HzdwBzQaFVDgeVAT4v2oUl48mua2In2LhbgutfJjeANpBYfq1LZ3LPlkVgrt1qCGPjMB3nGSfD a5awx2nGnjtzmJR4/5Z4vI2/kJZBJ9pJ9em2cB6YUC0WFvlV2rP550oWQSyc2aWLlG64uwJWeDcREJ /TSzhq1/E0xLtPmq4kWBPYH1tB0SP5GHzLmCyG59j4CJEnplW1ZJnEjKi9o4Vs3oKYrozJ7Yanp0Ww TzPQBxnd6P0xbWapsqIZkuYNi/7ozGHc2ZS54U6tLs5PqsJI7YpTOWhTCY8UEZP/oATEuknS6GzpmY Nq+diI931BbXf5wUAQTM4aX/R2+2ZYg== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=f/g8/hT/jSZ4k1rH26V8GMx2DkwTI5GSfhZlBQDheP0=; b=fpH04z7DEk+Cltc4ZzcZ39WmZDs9QRzm01WNCu+AVpF5zJmTj1P1Ai5UXh/hWWRO+HaI0Oxmi8HRl mcwI68537P14qB1aQTKqOdivB2oQlzW97gd+RQMERN9UqnBLiVksr3Dwe4ZODCOMTfJhoHPwoSQSEP m1nb7ph8lOjiQzHakGqCvQKIiHveWPLmB1Ze+aJJfXNS1pLKmWaabZ+GjezcDN7LLpa0TbrB9ceBQv 30VHEbPBV6vz3q4w57aOf1FXRqg3olSFgBTpQVC6wDiAYVfu6cQJWMo01pAdHifIWwC0c1kHrSz1Ji 8hqup1q8S7X0iq+l4KfWDhhqW2IOlkg== X-MHO-RoutePath: aGlwcGll X-MHO-User: 13973109-fd1e-11ea-9e11-df46ed8f892f X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (c-67-177-211-60.hsd1.co.comcast.net [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id 13973109-fd1e-11ea-9e11-df46ed8f892f; Tue, 22 Sep 2020 21:53:42 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 08MLreqp026646; Tue, 22 Sep 2020 15:53:40 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: Subject: Re: svn commit: r365643 - head/bin/cp From: Ian Lepore To: Warner Losh , Alan Somers Cc: Kyle Evans , Mateusz Guzik , src-committers , svn-src-all , svn-src-head Date: Tue, 22 Sep 2020 15:53:40 -0600 In-Reply-To: References: <202009112049.08BKnavL032212@repo.freebsd.org> Content-Type: text/plain; charset="ASCII" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Bww6y1kG5z3VJp X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; ASN(0.00)[asn:16509, ipnet:54.148.0.0/15, country:US]; local_wl_from(0.00)[freebsd.org] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 21:53:46 -0000 On Tue, 2020-09-22 at 15:50 -0600, Warner Losh wrote: > I think it's a great leap sideways, but I've done cp /dev/null foo to > clear > it out for 35 years now... It's why it feels like a workaround. > > Though it is a legit optimization, no matter the feelings. As for > clearer, > I'm less sure since then I have to remember what the : operator does. > > Warner > For me, :> is idiomatic (but ugly). On the other hand, the cp /dev/null had a nice dogfooding aspect to it... when we broke cp by accident, its use in the build system was the first alarm to go off. --Ian > On Tue, Sep 22, 2020 at 3:48 PM Alan Somers > wrote: > > > It doesn't feel like a workaround to me. I think Kyle's version is > > clearer than the original. > > > > On Tue, Sep 22, 2020 at 3:45 PM Warner Losh wrote: > > > > > > > > > > > On Tue, Sep 22, 2020 at 3:42 PM Kyle Evans > > > wrote: > > > > > > > cp is already fixed, people are still feeling the fallout of > > > > being > > > > within those revisions and needing to bootstrap their own cp. > > > > We can > > > > reduce the number of components these invocations rely on > > > > trivially to > > > > shell built-in mechanics, why not do so? > > > > > > > > > > Fair point. I just bristle at putting workarounds in for valid > > > /bin/sh > > > syntax because we opposed for a few days. so long as it's an > > > unconditional > > > clearing of the file to be zero length, I'm OK with that. > > > > > > Warner > > > > > > > > > > On Tue, Sep 22, 2020 at 4:40 PM Warner Losh > > > > wrote: > > > > > > > > > > So why do we need a workaround at all? cp /dev/null has been > > > > > fixed, > > > > > > > > and that's way more important to get right. > > > > > > > > > > I don't want to paper-over issues with this at all, though if > > > > > we use > > > > > > > > the host's (now broken) cp, I suppose that might be OK in the > > > > short term. > > > > If that's the case, then maybe this is OK. > > > > > > > > > > Otherwise, I'd strongly prefer we fix cp. > > > > > > > > > > Warner > > > > > > > > > > On Tue, Sep 22, 2020 at 3:31 PM Alan Somers < > > > > > asomers@freebsd.org> > > > > > > > > wrote: > > > > > > > > > > > > +1. > > > > > > > > > > > > On Tue, Sep 22, 2020 at 3:27 PM Kyle Evans < > > > > > > kevans@freebsd.org> > > > > > > > > wrote: > > > > > > > > > > > > > > I'm running a build at the suggestion of mjg to confirm > > > > > > > there aren't > > > > > > > any others hiding that can be converted, and I will > > > > > > > commit after I've > > > > > > > verified that this is it. > > > > > > > > > > > > > > On Tue, Sep 22, 2020 at 4:02 PM Alan Somers < > > > > > > > asomers@freebsd.org> > > > > > > > > wrote: > > > > > > > > > > > > > > > > LGTM. > > > > > > > > > > > > > > > > On Tue, Sep 22, 2020 at 2:59 PM Kyle Evans < > > > > > > > > kevans@freebsd.org> > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > Perhaps: > > > > > > > > > > > > > > > > > > diff --git a/stand/i386/zfsboot/Makefile > > > > > > > > b/stand/i386/zfsboot/Makefile > > > > > > > > > index ff315abc0ef..7e362b43a39 100644 > > > > > > > > > --- a/stand/i386/zfsboot/Makefile > > > > > > > > > +++ b/stand/i386/zfsboot/Makefile > > > > > > > > > @@ -81,7 +81,7 @@ zfsboot.ld: zfsboot.ldr zfsboot.bin > > > > > > > > > ${BTXKERN} > > > > > > > > > -o ${.TARGET} -P 1 zfsboot.bin > > > > > > > > > > > > > > > > > > zfsboot.ldr: > > > > > > > > > - cp /dev/null ${.TARGET} > > > > > > > > > + :> ${.TARGET} > > > > > > > > > > > > > > > > > > zfsboot.bin: zfsboot.out > > > > > > > > > ${OBJCOPY} -S -O binary zfsboot.out > > > > > > > > > ${.TARGET} > > > > > > > > > diff --git a/stand/libsa/Makefile > > > > > > > > > b/stand/libsa/Makefile > > > > > > > > > index effece9e01b..63cd46a9c54 100644 > > > > > > > > > --- a/stand/libsa/Makefile > > > > > > > > > +++ b/stand/libsa/Makefile > > > > > > > > > @@ -122,7 +122,7 @@ beforedepend: > > > > > > > > > ln -sf ${SRCTOP}/include/arpa/inet.h > > > > > > > > > arpa/inet.h; \ > > > > > > > > > ln -sf ${SRCTOP}/include/arpa/t > > > > > > > > > ftp.h arpa/tftp.h; \ > > > > > > > > > for i in _time.h _strings.h _string.h; do \ > > > > > > > > > - [ -f xlocale/$$i ] || cp /dev/null > > > > > > > > > xlocale/$$i; \ > > > > > > > > > + [ -f xlocale/$$i ] || :> xlocale/$$i; > > > > > > > > > \ > > > > > > > > > done; \ > > > > > > > > > for i in ${STAND_H_INC}; do \ > > > > > > > > > ln -sf ${SASRC}/stand.h $$i; \ > > > > > > > > > > > > > > > > > > > > > > > > > > > On Tue, Sep 22, 2020 at 3:58 PM Alan Somers < > > > > > > > > > asomers@freebsd.org> > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > Looks like two places in stand. Is there any > > > > > > > > > > reason why > > > > > > > > Mateusz's suggestion wouldn't work? > > > > > > > > > > > > > > > > > > > > > rg -g Makefile 'cp.*/dev/null' > > > > > > > > > > > > > > > > > > > > stand/libsa/Makefile > > > > > > > > > > 125: [ -f xlocale/$$i ] || cp /dev/null > > > > > > > > > > xlocale/$$i; \ > > > > > > > > > > > > > > > > > > > > stand/i386/zfsboot/Makefile > > > > > > > > > > 82: cp /dev/null ${.TARGET} > > > > > > > > > > > > > > > > > > > > On Tue, Sep 22, 2020 at 2:54 PM Mateusz Guzik < > > > > > > > > mjguzik@gmail.com> wrote: > > > > > > > > > > > > > > > > > > > > > > Can we instead add a workaround to the build > > > > > > > > > > > tree? > > > > > > > > > > > > > > > > > > > > > > Where is cp /dev/null coming from anyway? Perhaps > > > > > > > > > > > this can be > > > > > > > > patched > > > > > > > > > > > to touch the target file. > > > > > > > > > > > > > > > > > > > > > > On 9/22/20, Alan Somers > > > > > > > > > > > wrote: > > > > > > > > > > > > On Tue, Sep 22, 2020 at 2:48 PM Kyle Evans < > > > > > > > > kevans@freebsd.org> wrote: > > > > > > > > > > > > > > > > > > > > > > > > > On Fri, Sep 11, 2020 at 3:49 PM Alan Somers < > > > > > > > > asomers@freebsd.org> wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > Author: asomers > > > > > > > > > > > > > > Date: Fri Sep 11 20:49:36 2020 > > > > > > > > > > > > > > New Revision: 365643 > > > > > > > > > > > > > > URL: > > > > > > > > > > > > > > https://svnweb.freebsd.org/changeset/base/365643 > > > > > > > > > > > > > > > > > > > > > > > > > > > > Log: > > > > > > > > > > > > > > cp: fall back to read/write if > > > > > > > > > > > > > > copy_file_range fails > > > > > > > > > > > > > > > > > > > > > > > > > > > > Even though copy_file_range has a file- > > > > > > > > > > > > > > system agnostic > > > > > > > > version, it > > > > > > > > > > > > > still > > > > > > > > > > > > > > fails on devfs (perhaps because the file > > > > > > > > > > > > > > descriptor is > > > > > > > > non-seekable?) > > > > > > > > > > > > > In > > > > > > > > > > > > > > that case, fallback to old-fashioned > > > > > > > > > > > > > > read/write. Fixes > > > > > > > > > > > > > > "cp /dev/null /tmp/null" > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > > > > > > > > > > > > > > Any objection to adding a quick UPDATING > > > > > > > > > > > > > entry for this? > > > > > > > > I'm seeing > > > > > > > > > > > > > occasional reports of this breakage as recent > > > > > > > > > > > > > as today on > > > > > > > > IRC from > > > > > > > > > > > > > folks that were a little bit thrown off by > > > > > > > > > > > > > this because it > > > > > > > > throws up > > > > > > > > > > > > > fairly far into the build and looks like a > > > > > > > > > > > > > stand build > > > > > > > > regression > > > > > > > > > > > > > instead of a cp regression. > > > > > > > > > > > > > > > > > > > > > > > > > > Thanks, > > > > > > > > > > > > > > > > > > > > > > > > > > Kyle Evans > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > No objection. Can you suggest the proper > > > > > > > > > > > > wording? > > > > > > > > > > > > _______________________________________________ > > > > > > > > > > > > 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" > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > > > > Mateusz Guzik From owner-svn-src-head@freebsd.org Tue Sep 22 21:54:30 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B76513E0E43; Tue, 22 Sep 2020 21:54:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bww7p4V3rz3VJ1; Tue, 22 Sep 2020 21:54:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7D8252613D; Tue, 22 Sep 2020 21:54:30 +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 08MLsUNM035152; Tue, 22 Sep 2020 21:54:30 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08MLsU5m035151; Tue, 22 Sep 2020 21:54:30 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202009222154.08MLsU5m035151@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 22 Sep 2020 21:54:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366015 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 366015 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 21:54:30 -0000 Author: kib Date: Tue Sep 22 21:54:30 2020 New Revision: 366015 URL: https://svnweb.freebsd.org/changeset/base/366015 Log: Improve comment above nameicap_check_dotdot(). Explain why tracker is needed at all. Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D25886 Modified: head/sys/kern/vfs_lookup.c Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Tue Sep 22 21:43:43 2020 (r366014) +++ head/sys/kern/vfs_lookup.c Tue Sep 22 21:54:30 2020 (r366015) @@ -215,7 +215,11 @@ nameicap_cleanup(struct nameidata *ndp, bool clean_lat /* * For dotdot lookups in capability mode, only allow the component * lookup to succeed if the resulting directory was already traversed - * during the operation. Also fail dotdot lookups for non-local + * during the operation. This catches situations where already + * traversed directory is moved to different parent, and then we walk + * over it with dotdots. + * + * Also allow to force failure of dotdot lookups for non-local * filesystems, where external agents might assist local lookups to * escape the compartment. */ From owner-svn-src-head@freebsd.org Tue Sep 22 21:55:29 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A18263E1221; Tue, 22 Sep 2020 21:55:29 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bww8x3skTz3VNt; Tue, 22 Sep 2020 21:55:29 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f179.google.com (mail-qk1-f179.google.com [209.85.222.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 647771EDF6; Tue, 22 Sep 2020 21:55:29 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f179.google.com with SMTP id d20so20823628qka.5; Tue, 22 Sep 2020 14:55:29 -0700 (PDT) X-Gm-Message-State: AOAM533RPadwtiv0H2pHMy2+uhaSyiu2DyxzP1amt9hyPIMk5dvgrS+f 8OXdT4/I9lNSfYRHbZqHtq/yvXqwNQPG2yvyiBM= X-Google-Smtp-Source: ABdhPJwMW0OLaIwpdQEb8dQRX2uAD1alTjEgNGd/B+w5Vn9xonq4ESNeqKDaVwDT2LEGBb2yl0htwW7V1TxxyKfedzs= X-Received: by 2002:a37:43ca:: with SMTP id q193mr7056210qka.493.1600811728863; Tue, 22 Sep 2020 14:55:28 -0700 (PDT) MIME-Version: 1.0 References: <202009112049.08BKnavL032212@repo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Tue, 22 Sep 2020 16:55:16 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r365643 - head/bin/cp To: Ian Lepore Cc: Warner Losh , Alan Somers , Mateusz Guzik , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 21:55:29 -0000 On Tue, Sep 22, 2020 at 4:53 PM Ian Lepore wrote: > > On Tue, 2020-09-22 at 15:50 -0600, Warner Losh wrote: > > I think it's a great leap sideways, but I've done cp /dev/null foo to > > clear > > it out for 35 years now... It's why it feels like a workaround. > > > > Though it is a legit optimization, no matter the feelings. As for > > clearer, > > I'm less sure since then I have to remember what the : operator does. > > > > Warner > > > > For me, :> is idiomatic (but ugly). > > On the other hand, the cp /dev/null had a nice dogfooding aspect to > it... when we broke cp by accident, its use in the build system was the > first alarm to go off. > > --Ian > To be honest, this is a case that really should be covered by regression tests somewhere. > > On Tue, Sep 22, 2020 at 3:48 PM Alan Somers > > wrote: > > > > > It doesn't feel like a workaround to me. I think Kyle's version is > > > clearer than the original. > > > > > > On Tue, Sep 22, 2020 at 3:45 PM Warner Losh wrote: > > > > > > > > > > > > > > > On Tue, Sep 22, 2020 at 3:42 PM Kyle Evans > > > > wrote: > > > > > > > > > cp is already fixed, people are still feeling the fallout of > > > > > being > > > > > within those revisions and needing to bootstrap their own cp. > > > > > We can > > > > > reduce the number of components these invocations rely on > > > > > trivially to > > > > > shell built-in mechanics, why not do so? > > > > > > > > > > > > > Fair point. I just bristle at putting workarounds in for valid > > > > /bin/sh > > > > syntax because we opposed for a few days. so long as it's an > > > > unconditional > > > > clearing of the file to be zero length, I'm OK with that. > > > > > > > > Warner > > > > > > > > > > > > > On Tue, Sep 22, 2020 at 4:40 PM Warner Losh > > > > > wrote: > > > > > > > > > > > > So why do we need a workaround at all? cp /dev/null has been > > > > > > fixed, > > > > > > > > > > and that's way more important to get right. > > > > > > > > > > > > I don't want to paper-over issues with this at all, though if > > > > > > we use > > > > > > > > > > the host's (now broken) cp, I suppose that might be OK in the > > > > > short term. > > > > > If that's the case, then maybe this is OK. > > > > > > > > > > > > Otherwise, I'd strongly prefer we fix cp. > > > > > > > > > > > > Warner > > > > > > > > > > > > On Tue, Sep 22, 2020 at 3:31 PM Alan Somers < > > > > > > asomers@freebsd.org> > > > > > > > > > > wrote: > > > > > > > > > > > > > > +1. > > > > > > > > > > > > > > On Tue, Sep 22, 2020 at 3:27 PM Kyle Evans < > > > > > > > kevans@freebsd.org> > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > I'm running a build at the suggestion of mjg to confirm > > > > > > > > there aren't > > > > > > > > any others hiding that can be converted, and I will > > > > > > > > commit after I've > > > > > > > > verified that this is it. > > > > > > > > > > > > > > > > On Tue, Sep 22, 2020 at 4:02 PM Alan Somers < > > > > > > > > asomers@freebsd.org> > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > LGTM. > > > > > > > > > > > > > > > > > > On Tue, Sep 22, 2020 at 2:59 PM Kyle Evans < > > > > > > > > > kevans@freebsd.org> > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > Perhaps: > > > > > > > > > > > > > > > > > > > > diff --git a/stand/i386/zfsboot/Makefile > > > > > > > > > > b/stand/i386/zfsboot/Makefile > > > > > > > > > > index ff315abc0ef..7e362b43a39 100644 > > > > > > > > > > --- a/stand/i386/zfsboot/Makefile > > > > > > > > > > +++ b/stand/i386/zfsboot/Makefile > > > > > > > > > > @@ -81,7 +81,7 @@ zfsboot.ld: zfsboot.ldr zfsboot.bin > > > > > > > > > > ${BTXKERN} > > > > > > > > > > -o ${.TARGET} -P 1 zfsboot.bin > > > > > > > > > > > > > > > > > > > > zfsboot.ldr: > > > > > > > > > > - cp /dev/null ${.TARGET} > > > > > > > > > > + :> ${.TARGET} > > > > > > > > > > > > > > > > > > > > zfsboot.bin: zfsboot.out > > > > > > > > > > ${OBJCOPY} -S -O binary zfsboot.out > > > > > > > > > > ${.TARGET} > > > > > > > > > > diff --git a/stand/libsa/Makefile > > > > > > > > > > b/stand/libsa/Makefile > > > > > > > > > > index effece9e01b..63cd46a9c54 100644 > > > > > > > > > > --- a/stand/libsa/Makefile > > > > > > > > > > +++ b/stand/libsa/Makefile > > > > > > > > > > @@ -122,7 +122,7 @@ beforedepend: > > > > > > > > > > ln -sf ${SRCTOP}/include/arpa/inet.h > > > > > > > > > > arpa/inet.h; \ > > > > > > > > > > ln -sf ${SRCTOP}/include/arpa/t > > > > > > > > > > ftp.h arpa/tftp.h; \ > > > > > > > > > > for i in _time.h _strings.h _string.h; do \ > > > > > > > > > > - [ -f xlocale/$$i ] || cp /dev/null > > > > > > > > > > xlocale/$$i; \ > > > > > > > > > > + [ -f xlocale/$$i ] || :> xlocale/$$i; > > > > > > > > > > \ > > > > > > > > > > done; \ > > > > > > > > > > for i in ${STAND_H_INC}; do \ > > > > > > > > > > ln -sf ${SASRC}/stand.h $$i; \ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Tue, Sep 22, 2020 at 3:58 PM Alan Somers < > > > > > > > > > > asomers@freebsd.org> > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > Looks like two places in stand. Is there any > > > > > > > > > > > reason why > > > > > > > > > > Mateusz's suggestion wouldn't work? > > > > > > > > > > > > > > > > > > > > > > > rg -g Makefile 'cp.*/dev/null' > > > > > > > > > > > > > > > > > > > > > > stand/libsa/Makefile > > > > > > > > > > > 125: [ -f xlocale/$$i ] || cp /dev/null > > > > > > > > > > > xlocale/$$i; \ > > > > > > > > > > > > > > > > > > > > > > stand/i386/zfsboot/Makefile > > > > > > > > > > > 82: cp /dev/null ${.TARGET} > > > > > > > > > > > > > > > > > > > > > > On Tue, Sep 22, 2020 at 2:54 PM Mateusz Guzik < > > > > > > > > > > mjguzik@gmail.com> wrote: > > > > > > > > > > > > > > > > > > > > > > > > Can we instead add a workaround to the build > > > > > > > > > > > > tree? > > > > > > > > > > > > > > > > > > > > > > > > Where is cp /dev/null coming from anyway? Perhaps > > > > > > > > > > > > this can be > > > > > > > > > > patched > > > > > > > > > > > > to touch the target file. > > > > > > > > > > > > > > > > > > > > > > > > On 9/22/20, Alan Somers > > > > > > > > > > > > wrote: > > > > > > > > > > > > > On Tue, Sep 22, 2020 at 2:48 PM Kyle Evans < > > > > > > > > > > kevans@freebsd.org> wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > On Fri, Sep 11, 2020 at 3:49 PM Alan Somers < > > > > > > > > > > asomers@freebsd.org> wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Author: asomers > > > > > > > > > > > > > > > Date: Fri Sep 11 20:49:36 2020 > > > > > > > > > > > > > > > New Revision: 365643 > > > > > > > > > > > > > > > URL: > > > > > > > > > > > > > > > https://svnweb.freebsd.org/changeset/base/365643 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Log: > > > > > > > > > > > > > > > cp: fall back to read/write if > > > > > > > > > > > > > > > copy_file_range fails > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Even though copy_file_range has a file- > > > > > > > > > > > > > > > system agnostic > > > > > > > > > > version, it > > > > > > > > > > > > > > still > > > > > > > > > > > > > > > fails on devfs (perhaps because the file > > > > > > > > > > > > > > > descriptor is > > > > > > > > > > non-seekable?) > > > > > > > > > > > > > > In > > > > > > > > > > > > > > > that case, fallback to old-fashioned > > > > > > > > > > > > > > > read/write. Fixes > > > > > > > > > > > > > > > "cp /dev/null /tmp/null" > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > > > > > > > > > > > > > > > > Any objection to adding a quick UPDATING > > > > > > > > > > > > > > entry for this? > > > > > > > > > > I'm seeing > > > > > > > > > > > > > > occasional reports of this breakage as recent > > > > > > > > > > > > > > as today on > > > > > > > > > > IRC from > > > > > > > > > > > > > > folks that were a little bit thrown off by > > > > > > > > > > > > > > this because it > > > > > > > > > > throws up > > > > > > > > > > > > > > fairly far into the build and looks like a > > > > > > > > > > > > > > stand build > > > > > > > > > > regression > > > > > > > > > > > > > > instead of a cp regression. > > > > > > > > > > > > > > > > > > > > > > > > > > > > Thanks, > > > > > > > > > > > > > > > > > > > > > > > > > > > > Kyle Evans > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > No objection. Can you suggest the proper > > > > > > > > > > > > > wording? > > > > > > > > > > > > > _______________________________________________ > > > > > > > > > > > > > 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" > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > > > > > Mateusz Guzik > From owner-svn-src-head@freebsd.org Tue Sep 22 21:59:19 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2AE143E13B4; Tue, 22 Sep 2020 21:59:19 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwwFM0MSgz3VbS; Tue, 22 Sep 2020 21:59:19 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E47BB25FDC; Tue, 22 Sep 2020 21:59:18 +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 08MLxINL035574; Tue, 22 Sep 2020 21:59:18 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08MLxIPM035573; Tue, 22 Sep 2020 21:59:18 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202009222159.08MLxIPM035573@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 22 Sep 2020 21:59:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366016 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 366016 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 21:59:19 -0000 Author: kib Date: Tue Sep 22 21:59:18 2020 New Revision: 366016 URL: https://svnweb.freebsd.org/changeset/base/366016 Log: lookup: Track last lookup component if it is directory. This makes open("/a/../a", O_BENEATH) with cwd == "/a" work. Reviewed by: markj Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D25886 Modified: head/sys/kern/vfs_lookup.c Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Tue Sep 22 21:54:30 2020 (r366015) +++ head/sys/kern/vfs_lookup.c Tue Sep 22 21:59:18 2020 (r366016) @@ -1248,6 +1248,8 @@ success: goto bad2; } } + if (ndp->ni_vp != NULL && ndp->ni_vp->v_type == VDIR) + nameicap_tracker_add(ndp, ndp->ni_vp); return (0); bad2: From owner-svn-src-head@freebsd.org Tue Sep 22 22:02:10 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ECC5F3E1692 for ; Tue, 22 Sep 2020 22:02:10 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwwJd4PMgz3Vyg for ; Tue, 22 Sep 2020 22:02:09 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-lf1-x144.google.com with SMTP id w11so19758208lfn.2 for ; Tue, 22 Sep 2020 15:02:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=AgXugTZS9/kCC60ZcqOXC/mJufzYm5WE0B36eTIyvLQ=; b=ql3UWQ0wYPRdug1d4iiqQgAIRJJ3d3ecYny+KFWhVRbSAIhQJclQVDkex+uCE/nJJ0 DX3ajRB60Fa7YQpNvJ1ln/sHyJ3OaOG143Psrhu5ANa3FthIpEVvK2gh2vkZxzKeFj3B FAaGxj5HPUnnQtt2Djgfa3/m9WQBl8qyJknQBDA/gGbZEFRdW2pwQzbSLlIombCsOJ7O QjHuuMexnIplAdbkmyHd8FqVF1RcMVI8LLtf3cYVgRRwpYwWaD9xQQNjKDB80o48lOYC cOe8Tn2c8gmBZuh9i6bDLWUMPI4GwRCZn0SzDGuAGeX4vMxzvx/DuDTM+d721pEDJTmk sNQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=AgXugTZS9/kCC60ZcqOXC/mJufzYm5WE0B36eTIyvLQ=; b=He8LN4RfR6hrXbZMJ89dUrN2anuEB8zdxg2ehHGZtiX6lQOl/48yd/Mwdq9NqeGsU0 AYf7YgL0+3CES2Mcw1AOnhWJL2QjoZBwU6EG9/JYYgrbcqczkbfimpYaw0OFEm8blv66 mABHiXoShSzwFnCkdAinejqEPThlQLYEePsg18kOBibvNPACh+SnIn+EWzVd8XQLBalz ZaRBcQNVzoOM+RyQntZaiimxhi5bW1a33JI0BQcO/NLuXXOd+8kMuqmiSojOzk75L80I SgXAvnQKU/zcVCiBvhPdLfIbatmlnPaAqGeSgiXycvb0Bt3mHSaJdFBxVLrVENtoAZd2 aMzg== X-Gm-Message-State: AOAM531tmYbDprSee/HenkO6QOZ5A6gQ1st3ZONZkNQMdM/Y87ydfLjq mtlnb6N3XuJRPqeG5GFVDVwdGuWteyC7huDapfYgdw== X-Google-Smtp-Source: ABdhPJwd8bwtchbJAyOANBjRxjDtTpfUJTw6rCiLPCuvrM5mPkbuxW18r7Kwjf0ZKM0Wf3eL4cQSbt/qiVjUwwHishw= X-Received: by 2002:ac2:4891:: with SMTP id x17mr2216860lfc.28.1600812127553; Tue, 22 Sep 2020 15:02:07 -0700 (PDT) MIME-Version: 1.0 References: <202009112049.08BKnavL032212@repo.freebsd.org> In-Reply-To: From: Warner Losh Date: Tue, 22 Sep 2020 16:01:56 -0600 Message-ID: Subject: Re: svn commit: r365643 - head/bin/cp To: Kyle Evans Cc: Ian Lepore , Alan Somers , Mateusz Guzik , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4BwwJd4PMgz3Vyg X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=ql3UWQ0w; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2a00:1450:4864:20::144) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-1.50 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-0.87)[-0.872]; FROM_HAS_DN(0.00)[]; FREEMAIL_CC(0.00)[freebsd.org,gmail.com]; NEURAL_HAM_LONG(-0.94)[-0.942]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; NEURAL_SPAM_SHORT(0.31)[0.311]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCPT_COUNT_SEVEN(0.00)[7]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::144:from]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; MAILMAN_DEST(0.00)[svn-src-head] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 22:02:11 -0000 On Tue, Sep 22, 2020 at 3:55 PM Kyle Evans wrote: > On Tue, Sep 22, 2020 at 4:53 PM Ian Lepore wrote: > > > > On Tue, 2020-09-22 at 15:50 -0600, Warner Losh wrote: > > > I think it's a great leap sideways, but I've done cp /dev/null foo to > > > clear > > > it out for 35 years now... It's why it feels like a workaround. > > > > > > Though it is a legit optimization, no matter the feelings. As for > > > clearer, > > > I'm less sure since then I have to remember what the : operator does. > > > > > > Warner > > > > > > > For me, :> is idiomatic (but ugly). > > > > On the other hand, the cp /dev/null had a nice dogfooding aspect to > > it... when we broke cp by accident, its use in the build system was the > > first alarm to go off. > > > > --Ian > > > > To be honest, this is a case that really should be covered by > regression tests somewhere. > It should (but isn't yet). Ian is right for old-school FreeBSD thinking. In that thinking the build system should use an eclectic mix of tools to act as a fire-wall against accidental breakage. Complete, effective, test suites give much better coverage... if they are run... So until we run tests frequently, with loud regression squawking that's as effective as build breakage, I tend to fall in the 'all of the above' camp until that's in place... :) Warner P.S. though not, if I suppose, if it means that we're slowing down the regression coverage uptake... > > On Tue, Sep 22, 2020 at 3:48 PM Alan Somers > > > wrote: > > > > > > > It doesn't feel like a workaround to me. I think Kyle's version is > > > > clearer than the original. > > > > > > > > On Tue, Sep 22, 2020 at 3:45 PM Warner Losh wrote: > > > > > > > > > > > > > > > > > > > On Tue, Sep 22, 2020 at 3:42 PM Kyle Evans > > > > > wrote: > > > > > > > > > > > cp is already fixed, people are still feeling the fallout of > > > > > > being > > > > > > within those revisions and needing to bootstrap their own cp. > > > > > > We can > > > > > > reduce the number of components these invocations rely on > > > > > > trivially to > > > > > > shell built-in mechanics, why not do so? > > > > > > > > > > > > > > > > Fair point. I just bristle at putting workarounds in for valid > > > > > /bin/sh > > > > > syntax because we opposed for a few days. so long as it's an > > > > > unconditional > > > > > clearing of the file to be zero length, I'm OK with that. > > > > > > > > > > Warner > > > > > > > > > > > > > > > > On Tue, Sep 22, 2020 at 4:40 PM Warner Losh > > > > > > wrote: > > > > > > > > > > > > > > So why do we need a workaround at all? cp /dev/null has been > > > > > > > fixed, > > > > > > > > > > > > and that's way more important to get right. > > > > > > > > > > > > > > I don't want to paper-over issues with this at all, though if > > > > > > > we use > > > > > > > > > > > > the host's (now broken) cp, I suppose that might be OK in the > > > > > > short term. > > > > > > If that's the case, then maybe this is OK. > > > > > > > > > > > > > > Otherwise, I'd strongly prefer we fix cp. > > > > > > > > > > > > > > Warner > > > > > > > > > > > > > > On Tue, Sep 22, 2020 at 3:31 PM Alan Somers < > > > > > > > asomers@freebsd.org> > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > +1. > > > > > > > > > > > > > > > > On Tue, Sep 22, 2020 at 3:27 PM Kyle Evans < > > > > > > > > kevans@freebsd.org> > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > I'm running a build at the suggestion of mjg to confirm > > > > > > > > > there aren't > > > > > > > > > any others hiding that can be converted, and I will > > > > > > > > > commit after I've > > > > > > > > > verified that this is it. > > > > > > > > > > > > > > > > > > On Tue, Sep 22, 2020 at 4:02 PM Alan Somers < > > > > > > > > > asomers@freebsd.org> > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > LGTM. > > > > > > > > > > > > > > > > > > > > On Tue, Sep 22, 2020 at 2:59 PM Kyle Evans < > > > > > > > > > > kevans@freebsd.org> > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > Perhaps: > > > > > > > > > > > > > > > > > > > > > > diff --git a/stand/i386/zfsboot/Makefile > > > > > > > > > > > > b/stand/i386/zfsboot/Makefile > > > > > > > > > > > index ff315abc0ef..7e362b43a39 100644 > > > > > > > > > > > --- a/stand/i386/zfsboot/Makefile > > > > > > > > > > > +++ b/stand/i386/zfsboot/Makefile > > > > > > > > > > > @@ -81,7 +81,7 @@ zfsboot.ld: zfsboot.ldr zfsboot.bin > > > > > > > > > > > ${BTXKERN} > > > > > > > > > > > -o ${.TARGET} -P 1 zfsboot.bin > > > > > > > > > > > > > > > > > > > > > > zfsboot.ldr: > > > > > > > > > > > - cp /dev/null ${.TARGET} > > > > > > > > > > > + :> ${.TARGET} > > > > > > > > > > > > > > > > > > > > > > zfsboot.bin: zfsboot.out > > > > > > > > > > > ${OBJCOPY} -S -O binary zfsboot.out > > > > > > > > > > > ${.TARGET} > > > > > > > > > > > diff --git a/stand/libsa/Makefile > > > > > > > > > > > b/stand/libsa/Makefile > > > > > > > > > > > index effece9e01b..63cd46a9c54 100644 > > > > > > > > > > > --- a/stand/libsa/Makefile > > > > > > > > > > > +++ b/stand/libsa/Makefile > > > > > > > > > > > @@ -122,7 +122,7 @@ beforedepend: > > > > > > > > > > > ln -sf ${SRCTOP}/include/arpa/inet.h > > > > > > > > > > > arpa/inet.h; \ > > > > > > > > > > > ln -sf ${SRCTOP}/include/arpa/t > > > > > > > > > > > ftp.h arpa/tftp.h; \ > > > > > > > > > > > for i in _time.h _strings.h _string.h; do \ > > > > > > > > > > > - [ -f xlocale/$$i ] || cp /dev/null > > > > > > > > > > > xlocale/$$i; \ > > > > > > > > > > > + [ -f xlocale/$$i ] || :> xlocale/$$i; > > > > > > > > > > > \ > > > > > > > > > > > done; \ > > > > > > > > > > > for i in ${STAND_H_INC}; do \ > > > > > > > > > > > ln -sf ${SASRC}/stand.h $$i; \ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Tue, Sep 22, 2020 at 3:58 PM Alan Somers < > > > > > > > > > > > asomers@freebsd.org> > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > Looks like two places in stand. Is there any > > > > > > > > > > > > reason why > > > > > > > > > > > > Mateusz's suggestion wouldn't work? > > > > > > > > > > > > > > > > > > > > > > > > > rg -g Makefile 'cp.*/dev/null' > > > > > > > > > > > > > > > > > > > > > > > > stand/libsa/Makefile > > > > > > > > > > > > 125: [ -f xlocale/$$i ] || cp /dev/null > > > > > > > > > > > > xlocale/$$i; \ > > > > > > > > > > > > > > > > > > > > > > > > stand/i386/zfsboot/Makefile > > > > > > > > > > > > 82: cp /dev/null ${.TARGET} > > > > > > > > > > > > > > > > > > > > > > > > On Tue, Sep 22, 2020 at 2:54 PM Mateusz Guzik < > > > > > > > > > > > > mjguzik@gmail.com> wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > Can we instead add a workaround to the build > > > > > > > > > > > > > tree? > > > > > > > > > > > > > > > > > > > > > > > > > > Where is cp /dev/null coming from anyway? Perhaps > > > > > > > > > > > > > this can be > > > > > > > > > > > > patched > > > > > > > > > > > > > to touch the target file. > > > > > > > > > > > > > > > > > > > > > > > > > > On 9/22/20, Alan Somers > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > On Tue, Sep 22, 2020 at 2:48 PM Kyle Evans < > > > > > > > > > > > > kevans@freebsd.org> wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Fri, Sep 11, 2020 at 3:49 PM Alan Somers < > > > > > > > > > > > > asomers@freebsd.org> wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Author: asomers > > > > > > > > > > > > > > > > Date: Fri Sep 11 20:49:36 2020 > > > > > > > > > > > > > > > > New Revision: 365643 > > > > > > > > > > > > > > > > URL: > > > > > > > > > > > > > > > > > https://svnweb.freebsd.org/changeset/base/365643 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Log: > > > > > > > > > > > > > > > > cp: fall back to read/write if > > > > > > > > > > > > > > > > copy_file_range fails > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Even though copy_file_range has a file- > > > > > > > > > > > > > > > > system agnostic > > > > > > > > > > > > version, it > > > > > > > > > > > > > > > still > > > > > > > > > > > > > > > > fails on devfs (perhaps because the file > > > > > > > > > > > > > > > > descriptor is > > > > > > > > > > > > non-seekable?) > > > > > > > > > > > > > > > In > > > > > > > > > > > > > > > > that case, fallback to old-fashioned > > > > > > > > > > > > > > > > read/write. Fixes > > > > > > > > > > > > > > > > "cp /dev/null /tmp/null" > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Any objection to adding a quick UPDATING > > > > > > > > > > > > > > > entry for this? > > > > > > > > > > > > I'm seeing > > > > > > > > > > > > > > > occasional reports of this breakage as recent > > > > > > > > > > > > > > > as today on > > > > > > > > > > > > IRC from > > > > > > > > > > > > > > > folks that were a little bit thrown off by > > > > > > > > > > > > > > > this because it > > > > > > > > > > > > throws up > > > > > > > > > > > > > > > fairly far into the build and looks like a > > > > > > > > > > > > > > > stand build > > > > > > > > > > > > regression > > > > > > > > > > > > > > > instead of a cp regression. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Thanks, > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Kyle Evans > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > No objection. Can you suggest the proper > > > > > > > > > > > > > > wording? > > > > > > > > > > > > > > _______________________________________________ > > > > > > > > > > > > > > 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" > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > > > > > > Mateusz Guzik > > > From owner-svn-src-head@freebsd.org Tue Sep 22 22:06:22 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2AFE23E14EF; Tue, 22 Sep 2020 22:06:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwwPV0Gldz3WRs; Tue, 22 Sep 2020 22:06:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C29E92606A; Tue, 22 Sep 2020 22:06:21 +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 08MM6LmC041335; Tue, 22 Sep 2020 22:06:21 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08MM6L2b041333; Tue, 22 Sep 2020 22:06:21 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202009222206.08MM6L2b041333@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 22 Sep 2020 22:06:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366017 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 366017 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 22:06:22 -0000 Author: kib Date: Tue Sep 22 22:06:20 2020 New Revision: 366017 URL: https://svnweb.freebsd.org/changeset/base/366017 Log: Add NIRES_STRICTREL. Stop abusing internal namei flag NI_LCF_STRICTRELATIVE as indicator of cap-restricted lookup. Add designated returned flag NIRES_STRICTREL to inform kern_openat() that lookup was restricted. Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D25886 Modified: head/sys/kern/vfs_lookup.c head/sys/kern/vfs_syscalls.c head/sys/sys/namei.h Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Tue Sep 22 21:59:18 2020 (r366016) +++ head/sys/kern/vfs_lookup.c Tue Sep 22 22:06:20 2020 (r366017) @@ -322,6 +322,7 @@ namei_setup(struct nameidata *ndp, struct vnode **dpp, */ if (IN_CAPABILITY_MODE(td) && (cnp->cn_flags & NOCAPCHECK) == 0) { ndp->ni_lcf |= NI_LCF_STRICTRELATIVE; + ndp->ni_resflags |= NIRES_STRICTREL; if (ndp->ni_dirfd == AT_FDCWD) { #ifdef KTRACE if (KTRPOINT(td, KTR_CAPFAIL)) @@ -400,6 +401,7 @@ namei_setup(struct nameidata *ndp, struct vnode **dpp, ndp->ni_filecaps.fc_fcntls != CAP_FCNTL_ALL || ndp->ni_filecaps.fc_nioctls != -1) { ndp->ni_lcf |= NI_LCF_STRICTRELATIVE; + ndp->ni_resflags |= NIRES_STRICTREL; } #endif } Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Tue Sep 22 21:59:18 2020 (r366016) +++ head/sys/kern/vfs_syscalls.c Tue Sep 22 22:06:20 2020 (r366017) @@ -1136,7 +1136,7 @@ kern_openat(struct thread *td, int fd, const char *pat * understand exactly what would happen, and we don't think * that it ever should. */ - if ((nd.ni_lcf & NI_LCF_STRICTRELATIVE) == 0 && + if ((nd.ni_resflags & NIRES_STRICTREL) == 0 && (error == ENODEV || error == ENXIO) && td->td_dupfd >= 0) { error = dupfdopen(td, fdp, td->td_dupfd, flags, error, @@ -1180,7 +1180,7 @@ success: struct filecaps *fcaps; #ifdef CAPABILITIES - if ((nd.ni_lcf & NI_LCF_STRICTRELATIVE) != 0) + if ((nd.ni_resflags & NIRES_STRICTREL) != 0) fcaps = &nd.ni_filecaps; else #endif Modified: head/sys/sys/namei.h ============================================================================== --- head/sys/sys/namei.h Tue Sep 22 21:59:18 2020 (r366016) +++ head/sys/sys/namei.h Tue Sep 22 22:06:20 2020 (r366017) @@ -183,6 +183,7 @@ int cache_fplookup(struct nameidata *ndp, enum cache_f * Namei results flags */ #define NIRES_ABS 0x00000001 /* Path was absolute */ +#define NIRES_STRICTREL 0x00000002 /* Restricted lookup result */ /* * Flags in ni_lcf, valid for the duration of the namei call. From owner-svn-src-head@freebsd.org Tue Sep 22 22:22:30 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6F74E3E1F2F; Tue, 22 Sep 2020 22:22:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bwwm62PrVz3WvV; Tue, 22 Sep 2020 22:22:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 36F7B2652E; Tue, 22 Sep 2020 22:22:30 +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 08MMMU20053495; Tue, 22 Sep 2020 22:22:30 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08MMMUrq053494; Tue, 22 Sep 2020 22:22:30 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202009222222.08MMMUrq053494@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 22 Sep 2020 22:22:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366018 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 366018 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 22:22:30 -0000 Author: kib Date: Tue Sep 22 22:22:29 2020 New Revision: 366018 URL: https://svnweb.freebsd.org/changeset/base/366018 Log: Add at2cnpflags() the helper to convert AT_ flags for *at() syscalls to namei flags. Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D25886 Modified: head/sys/kern/vfs_syscalls.c Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Tue Sep 22 22:06:20 2020 (r366017) +++ head/sys/kern/vfs_syscalls.c Tue Sep 22 22:22:29 2020 (r366018) @@ -112,6 +112,28 @@ static int kern_readlink_vp(struct vnode *vp, char *bu static int kern_linkat_vp(struct thread *td, struct vnode *vp, int fd, const char *path, enum uio_seg segflag); +static uint64_t +at2cnpflags(u_int at_flags, u_int mask) +{ + u_int64_t res; + + MPASS((at_flags & (AT_SYMLINK_FOLLOW | AT_SYMLINK_NOFOLLOW)) != + (AT_SYMLINK_FOLLOW | AT_SYMLINK_NOFOLLOW)); + + res = 0; + at_flags &= mask; + if ((at_flags & AT_BENEATH) != 0) + res |= BENEATH; + if ((at_flags & AT_SYMLINK_FOLLOW) != 0) + res |= FOLLOW; + /* NOFOLLOW is pseudo flag */ + if ((mask & AT_SYMLINK_NOFOLLOW) != 0) { + res |= (at_flags & AT_SYMLINK_NOFOLLOW) != 0 ? NOFOLLOW : + FOLLOW; + } + return (res); +} + int kern_sync(struct thread *td) { @@ -1485,8 +1507,7 @@ sys_linkat(struct thread *td, struct linkat_args *uap) return (EINVAL); return (kern_linkat(td, uap->fd1, uap->fd2, uap->path1, uap->path2, - UIO_USERSPACE, ((flag & AT_SYMLINK_FOLLOW) != 0 ? FOLLOW : - NOFOLLOW) | ((flag & AT_BENEATH) != 0 ? BENEATH : 0))); + UIO_USERSPACE, at2cnpflags(flag, AT_SYMLINK_FOLLOW | AT_BENEATH))); } int hardlink_check_uid = 0; @@ -1851,7 +1872,7 @@ kern_funlinkat(struct thread *td, int dfd, const char restart: bwillwrite(); NDINIT_ATRIGHTS(&nd, DELETE, LOCKPARENT | LOCKLEAF | AUDITVNODE1 | - ((flag & AT_BENEATH) != 0 ? BENEATH : 0), + at2cnpflags(flag, AT_BENEATH), pathseg, path, dfd, &cap_unlinkat_rights, td); if ((error = namei(&nd)) != 0) { if (error == EINVAL) @@ -2075,7 +2096,7 @@ kern_accessat(struct thread *td, int fd, const char *p usecred = cred; AUDIT_ARG_VALUE(amode); NDINIT_ATRIGHTS(&nd, LOOKUP, FOLLOW | LOCKSHARED | LOCKLEAF | - AUDITVNODE1 | ((flag & AT_BENEATH) != 0 ? BENEATH : 0), + AUDITVNODE1 | at2cnpflags(flag, AT_BENEATH), pathseg, path, fd, &cap_fstat_rights, td); if ((error = namei(&nd)) != 0) goto out; @@ -2369,10 +2390,9 @@ kern_statat(struct thread *td, int flag, int fd, const if ((flag & ~(AT_SYMLINK_NOFOLLOW | AT_BENEATH)) != 0) return (EINVAL); - NDINIT_ATRIGHTS(&nd, LOOKUP, ((flag & AT_SYMLINK_NOFOLLOW) != 0 ? - NOFOLLOW : FOLLOW) | ((flag & AT_BENEATH) != 0 ? BENEATH : 0) | - LOCKSHARED | LOCKLEAF | AUDITVNODE1, pathseg, path, fd, - &cap_fstat_rights, td); + NDINIT_ATRIGHTS(&nd, LOOKUP, at2cnpflags(flag, AT_BENEATH | + AT_SYMLINK_NOFOLLOW) | LOCKSHARED | LOCKLEAF | + AUDITVNODE1, pathseg, path, fd, &cap_fstat_rights, td); if ((error = namei(&nd)) != 0) return (error); @@ -2719,12 +2739,11 @@ kern_chflagsat(struct thread *td, int fd, const char * enum uio_seg pathseg, u_long flags, int atflag) { struct nameidata nd; - int error, follow; + int error; AUDIT_ARG_FFLAGS(flags); - follow = (atflag & AT_SYMLINK_NOFOLLOW) ? NOFOLLOW : FOLLOW; - follow |= (atflag & AT_BENEATH) != 0 ? BENEATH : 0; - NDINIT_ATRIGHTS(&nd, LOOKUP, follow | AUDITVNODE1, pathseg, path, fd, + NDINIT_ATRIGHTS(&nd, LOOKUP, at2cnpflags(atflag, AT_SYMLINK_NOFOLLOW | + AT_BENEATH) | AUDITVNODE1, pathseg, path, fd, &cap_fchflags_rights, td); if ((error = namei(&nd)) != 0) return (error); @@ -2848,12 +2867,11 @@ kern_fchmodat(struct thread *td, int fd, const char *p enum uio_seg pathseg, mode_t mode, int flag) { struct nameidata nd; - int error, follow; + int error; AUDIT_ARG_MODE(mode); - follow = (flag & AT_SYMLINK_NOFOLLOW) != 0 ? NOFOLLOW : FOLLOW; - follow |= (flag & AT_BENEATH) != 0 ? BENEATH : 0; - NDINIT_ATRIGHTS(&nd, LOOKUP, follow | AUDITVNODE1, pathseg, path, fd, + NDINIT_ATRIGHTS(&nd, LOOKUP, at2cnpflags(flag, AT_SYMLINK_NOFOLLOW | + AT_BENEATH) | AUDITVNODE1, pathseg, path, fd, &cap_fchmod_rights, td); if ((error = namei(&nd)) != 0) return (error); @@ -2960,12 +2978,11 @@ kern_fchownat(struct thread *td, int fd, const char *p enum uio_seg pathseg, int uid, int gid, int flag) { struct nameidata nd; - int error, follow; + int error; AUDIT_ARG_OWNER(uid, gid); - follow = (flag & AT_SYMLINK_NOFOLLOW) ? NOFOLLOW : FOLLOW; - follow |= (flag & AT_BENEATH) != 0 ? BENEATH : 0; - NDINIT_ATRIGHTS(&nd, LOOKUP, follow | AUDITVNODE1, pathseg, path, fd, + NDINIT_ATRIGHTS(&nd, LOOKUP, at2cnpflags(flag, AT_SYMLINK_NOFOLLOW | + AT_BENEATH) | AUDITVNODE1, pathseg, path, fd, &cap_fchown_rights, td); if ((error = namei(&nd)) != 0) @@ -3322,8 +3339,8 @@ kern_utimensat(struct thread *td, int fd, const char * if ((error = getutimens(tptr, tptrseg, ts, &flags)) != 0) return (error); - NDINIT_ATRIGHTS(&nd, LOOKUP, ((flag & AT_SYMLINK_NOFOLLOW) ? NOFOLLOW : - FOLLOW) | ((flag & AT_BENEATH) != 0 ? BENEATH : 0) | AUDITVNODE1, + NDINIT_ATRIGHTS(&nd, LOOKUP, at2cnpflags(flag, AT_SYMLINK_NOFOLLOW | + AT_BENEATH) | AUDITVNODE1, pathseg, path, fd, &cap_futimes_rights, td); if ((error = namei(&nd)) != 0) return (error); @@ -3818,7 +3835,7 @@ kern_frmdirat(struct thread *td, int dfd, const char * restart: bwillwrite(); NDINIT_ATRIGHTS(&nd, DELETE, LOCKPARENT | LOCKLEAF | AUDITVNODE1 | - ((flag & AT_BENEATH) != 0 ? BENEATH : 0), + at2cnpflags(flag, AT_BENEATH), pathseg, path, dfd, &cap_unlinkat_rights, td); if ((error = namei(&nd)) != 0) goto fdout; @@ -4321,9 +4338,9 @@ kern_getfhat(struct thread *td, int flags, int fd, con error = priv_check(td, PRIV_VFS_GETFH); if (error != 0) return (error); - NDINIT_AT(&nd, LOOKUP, ((flags & AT_SYMLINK_NOFOLLOW) != 0 ? NOFOLLOW : - FOLLOW) | ((flags & AT_BENEATH) != 0 ? BENEATH : 0) | LOCKLEAF | - AUDITVNODE1, pathseg, path, fd, td); + NDINIT_AT(&nd, LOOKUP, at2cnpflags(flags, AT_SYMLINK_NOFOLLOW | + AT_BENEATH) | LOCKLEAF | AUDITVNODE1, + pathseg, path, fd, td); error = namei(&nd); if (error != 0) return (error); From owner-svn-src-head@freebsd.org Tue Sep 22 22:23:59 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C34543E2018; Tue, 22 Sep 2020 22:23:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bwwnq4h4Rz3X22; Tue, 22 Sep 2020 22:23:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 69F1326854; Tue, 22 Sep 2020 22:23:59 +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 08MMNxX8053598; Tue, 22 Sep 2020 22:23:59 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08MMNxwh053597; Tue, 22 Sep 2020 22:23:59 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202009222223.08MMNxwh053597@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 22 Sep 2020 22:23:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366019 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 366019 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 22:23:59 -0000 Author: kib Date: Tue Sep 22 22:23:58 2020 New Revision: 366019 URL: https://svnweb.freebsd.org/changeset/base/366019 Log: Add open2nameif() the helper to calculate namei flags both for open(2) and creat(2). Suggested and reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D25886 Modified: head/sys/kern/vfs_vnops.c Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Tue Sep 22 22:22:29 2020 (r366018) +++ head/sys/kern/vfs_vnops.c Tue Sep 22 22:23:58 2020 (r366019) @@ -192,6 +192,21 @@ vn_open(struct nameidata *ndp, int *flagp, int cmode, return (vn_open_cred(ndp, flagp, cmode, 0, td->td_ucred, fp)); } +static uint64_t +open2nameif(int fmode, u_int vn_open_flags) +{ + uint64_t res; + + res = ISOPEN | LOCKLEAF; + if ((fmode & O_BENEATH) != 0) + res |= BENEATH; + if ((vn_open_flags & VN_OPEN_NOAUDIT) == 0) + res |= AUDITVNODE1; + if ((vn_open_flags & VN_OPEN_NOCAPCHECK) != 0) + res |= NOCAPCHECK; + return (res); +} + /* * Common code for vnode open operations via a name lookup. * Lookup the vnode and invoke VOP_CREATE if needed. @@ -218,19 +233,14 @@ restart: return (EINVAL); else if ((fmode & (O_CREAT | O_DIRECTORY)) == O_CREAT) { ndp->ni_cnd.cn_nameiop = CREATE; + ndp->ni_cnd.cn_flags = open2nameif(fmode, vn_open_flags); /* * Set NOCACHE to avoid flushing the cache when * rolling in many files at once. */ - ndp->ni_cnd.cn_flags = ISOPEN | LOCKPARENT | LOCKLEAF | NOCACHE; + ndp->ni_cnd.cn_flags |= LOCKPARENT | NOCACHE; if ((fmode & O_EXCL) == 0 && (fmode & O_NOFOLLOW) == 0) ndp->ni_cnd.cn_flags |= FOLLOW; - if ((fmode & O_BENEATH) != 0) - ndp->ni_cnd.cn_flags |= BENEATH; - if (!(vn_open_flags & VN_OPEN_NOAUDIT)) - ndp->ni_cnd.cn_flags |= AUDITVNODE1; - if (vn_open_flags & VN_OPEN_NOCAPCHECK) - ndp->ni_cnd.cn_flags |= NOCAPCHECK; if ((vn_open_flags & VN_OPEN_INVFS) == 0) bwillwrite(); if ((error = namei(ndp)) != 0) @@ -285,16 +295,11 @@ restart: } } else { ndp->ni_cnd.cn_nameiop = LOOKUP; - ndp->ni_cnd.cn_flags = ISOPEN | - ((fmode & O_NOFOLLOW) ? NOFOLLOW : FOLLOW) | LOCKLEAF; - if (!(fmode & FWRITE)) + ndp->ni_cnd.cn_flags = open2nameif(fmode, vn_open_flags); + ndp->ni_cnd.cn_flags |= (fmode & O_NOFOLLOW) != 0 ? NOFOLLOW : + FOLLOW; + if ((fmode & FWRITE) == 0) ndp->ni_cnd.cn_flags |= LOCKSHARED; - if ((fmode & O_BENEATH) != 0) - ndp->ni_cnd.cn_flags |= BENEATH; - if (!(vn_open_flags & VN_OPEN_NOAUDIT)) - ndp->ni_cnd.cn_flags |= AUDITVNODE1; - if (vn_open_flags & VN_OPEN_NOCAPCHECK) - ndp->ni_cnd.cn_flags |= NOCAPCHECK; if ((error = namei(ndp)) != 0) return (error); vp = ndp->ni_vp; From owner-svn-src-head@freebsd.org Tue Sep 22 22:36:03 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 78E3F3E2414; Tue, 22 Sep 2020 22:36:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bwx3l2bxGz3XQ8; Tue, 22 Sep 2020 22:36: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3DF6526940; Tue, 22 Sep 2020 22:36: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 08MMa3x4059850; Tue, 22 Sep 2020 22:36:03 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08MMa3qQ059849; Tue, 22 Sep 2020 22:36:03 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202009222236.08MMa3qQ059849@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 22 Sep 2020 22:36:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366020 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 366020 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 22:36:03 -0000 Author: kib Date: Tue Sep 22 22:36:02 2020 New Revision: 366020 URL: https://svnweb.freebsd.org/changeset/base/366020 Log: Only clear latch for BENEATH when we walk out of the startdir, not unconditionally on any dotdot component. Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D25886 Modified: head/sys/kern/vfs_lookup.c Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Tue Sep 22 22:23:58 2020 (r366019) +++ head/sys/kern/vfs_lookup.c Tue Sep 22 22:36:02 2020 (r366020) @@ -238,13 +238,14 @@ nameicap_check_dotdot(struct nameidata *ndp, struct vn return (ENOTCAPABLE); TAILQ_FOREACH_REVERSE(nt, &ndp->ni_cap_tracker, nameicap_tracker_head, nm_link) { + if ((ndp->ni_lcf & NI_LCF_LATCH) != 0 && + ndp->ni_beneath_latch == nt->dp) { + ndp->ni_lcf &= ~NI_LCF_BENEATH_LATCHED; + nameicap_cleanup(ndp, false); + return (0); + } if (dp == nt->dp) return (0); - } - if ((ndp->ni_lcf & NI_LCF_BENEATH_ABS) != 0) { - ndp->ni_lcf &= ~NI_LCF_BENEATH_LATCHED; - nameicap_cleanup(ndp, false); - return (0); } return (ENOTCAPABLE); } From owner-svn-src-head@freebsd.org Tue Sep 22 22:43:33 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7AC913E2751; Tue, 22 Sep 2020 22:43:33 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwxDP2hqrz3Y0Y; Tue, 22 Sep 2020 22:43:33 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3FC9126998; Tue, 22 Sep 2020 22:43:33 +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 08MMhXbt065717; Tue, 22 Sep 2020 22:43:33 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08MMhXFT065716; Tue, 22 Sep 2020 22:43:33 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202009222243.08MMhXFT065716@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 22 Sep 2020 22:43:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366021 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 366021 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 22:43:33 -0000 Author: kib Date: Tue Sep 22 22:43:32 2020 New Revision: 366021 URL: https://svnweb.freebsd.org/changeset/base/366021 Log: Change O_BENEATH to handle relative paths same as absolute. Do not care if path walks out of the topping directory if it returns back. Requested and reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D25886 Modified: head/sys/kern/vfs_lookup.c Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Tue Sep 22 22:36:02 2020 (r366020) +++ head/sys/kern/vfs_lookup.c Tue Sep 22 22:43:32 2020 (r366021) @@ -178,11 +178,13 @@ static void nameicap_tracker_add(struct nameidata *ndp, struct vnode *dp) { struct nameicap_tracker *nt; + struct componentname *cnp; if ((ndp->ni_lcf & NI_LCF_CAP_DOTDOT) == 0 || dp->v_type != VDIR) return; - if ((ndp->ni_lcf & (NI_LCF_BENEATH_ABS | NI_LCF_BENEATH_LATCHED)) == - NI_LCF_BENEATH_ABS) { + cnp = &ndp->ni_cnd; + if ((cnp->cn_flags & BENEATH) != 0 && + (ndp->ni_lcf & NI_LCF_BENEATH_LATCHED) == 0) { MPASS((ndp->ni_lcf & NI_LCF_LATCH) != 0); if (dp != ndp->ni_beneath_latch) return; @@ -593,8 +595,8 @@ namei(struct nameidata *ndp) namei_cleanup_cnp(cnp); } else cnp->cn_flags |= HASBUF; - if ((ndp->ni_lcf & (NI_LCF_BENEATH_ABS | - NI_LCF_BENEATH_LATCHED)) == NI_LCF_BENEATH_ABS) { + if ((ndp->ni_lcf & (NI_LCF_LATCH | + NI_LCF_BENEATH_LATCHED)) == NI_LCF_LATCH) { NDFREE(ndp, 0); error = ENOTCAPABLE; } From owner-svn-src-head@freebsd.org Tue Sep 22 22:48:13 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B47DB3E2775; Tue, 22 Sep 2020 22:48:13 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwxKn4K6Zz3YSN; Tue, 22 Sep 2020 22:48:13 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7771F26B13; Tue, 22 Sep 2020 22:48:13 +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 08MMmDR9066005; Tue, 22 Sep 2020 22:48:13 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08MMmCie066000; Tue, 22 Sep 2020 22:48:12 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202009222248.08MMmCie066000@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 22 Sep 2020 22:48:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366022 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 366022 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 22:48:13 -0000 Author: kib Date: Tue Sep 22 22:48:12 2020 New Revision: 366022 URL: https://svnweb.freebsd.org/changeset/base/366022 Log: Add O_RESOLVE_BENEATH and AT_RESOLVE_BENEATH to mimic Linux' RESOLVE_BENEATH. It is like O_BENEATH, but disables to walk out of the subtree rooted in the starting directory. O_BENEATH does not care if path walks out if it returned. Requested by: Dan Gohman PR: 248335 Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D25886 Modified: head/sys/kern/vfs_lookup.c head/sys/kern/vfs_syscalls.c head/sys/kern/vfs_vnops.c head/sys/sys/fcntl.h head/sys/sys/namei.h Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Tue Sep 22 22:43:32 2020 (r366021) +++ head/sys/kern/vfs_lookup.c Tue Sep 22 22:48:12 2020 (r366022) @@ -428,6 +428,16 @@ namei_setup(struct nameidata *ndp, struct vnode **dpp, if (error == 0) ndp->ni_lcf |= NI_LCF_LATCH; } + if (error == 0 && (cnp->cn_flags & RBENEATH) != 0) { + if (cnp->cn_pnbuf[0] == '/' || + (ndp->ni_lcf & NI_LCF_BENEATH_ABS) != 0) { + error = EINVAL; + } else if ((ndp->ni_lcf & NI_LCF_STRICTRELATIVE) == 0) { + ndp->ni_lcf |= NI_LCF_STRICTRELATIVE | + NI_LCF_CAP_DOTDOT; + } + } + /* * If we are auditing the kernel pathname, save the user pathname. */ Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Tue Sep 22 22:43:32 2020 (r366021) +++ head/sys/kern/vfs_syscalls.c Tue Sep 22 22:48:12 2020 (r366022) @@ -124,6 +124,8 @@ at2cnpflags(u_int at_flags, u_int mask) at_flags &= mask; if ((at_flags & AT_BENEATH) != 0) res |= BENEATH; + if ((at_flags & AT_RESOLVE_BENEATH) != 0) + res |= RBENEATH; if ((at_flags & AT_SYMLINK_FOLLOW) != 0) res |= FOLLOW; /* NOFOLLOW is pseudo flag */ @@ -1503,11 +1505,13 @@ sys_linkat(struct thread *td, struct linkat_args *uap) int flag; flag = uap->flag; - if ((flag & ~(AT_SYMLINK_FOLLOW | AT_BENEATH)) != 0) + if ((flag & ~(AT_SYMLINK_FOLLOW | AT_BENEATH | + AT_RESOLVE_BENEATH)) != 0) return (EINVAL); return (kern_linkat(td, uap->fd1, uap->fd2, uap->path1, uap->path2, - UIO_USERSPACE, at2cnpflags(flag, AT_SYMLINK_FOLLOW | AT_BENEATH))); + UIO_USERSPACE, at2cnpflags(flag, AT_SYMLINK_FOLLOW | AT_BENEATH | + AT_RESOLVE_BENEATH))); } int hardlink_check_uid = 0; @@ -1872,7 +1876,7 @@ kern_funlinkat(struct thread *td, int dfd, const char restart: bwillwrite(); NDINIT_ATRIGHTS(&nd, DELETE, LOCKPARENT | LOCKLEAF | AUDITVNODE1 | - at2cnpflags(flag, AT_BENEATH), + at2cnpflags(flag, AT_BENEATH | AT_RESOLVE_BENEATH), pathseg, path, dfd, &cap_unlinkat_rights, td); if ((error = namei(&nd)) != 0) { if (error == EINVAL) @@ -2075,7 +2079,7 @@ kern_accessat(struct thread *td, int fd, const char *p struct nameidata nd; int error; - if ((flag & ~(AT_EACCESS | AT_BENEATH)) != 0) + if ((flag & ~(AT_EACCESS | AT_BENEATH | AT_RESOLVE_BENEATH)) != 0) return (EINVAL); if (amode != F_OK && (amode & ~(R_OK | W_OK | X_OK)) != 0) return (EINVAL); @@ -2096,7 +2100,7 @@ kern_accessat(struct thread *td, int fd, const char *p usecred = cred; AUDIT_ARG_VALUE(amode); NDINIT_ATRIGHTS(&nd, LOOKUP, FOLLOW | LOCKSHARED | LOCKLEAF | - AUDITVNODE1 | at2cnpflags(flag, AT_BENEATH), + AUDITVNODE1 | at2cnpflags(flag, AT_BENEATH | AT_RESOLVE_BENEATH), pathseg, path, fd, &cap_fstat_rights, td); if ((error = namei(&nd)) != 0) goto out; @@ -2387,11 +2391,12 @@ kern_statat(struct thread *td, int flag, int fd, const struct nameidata nd; int error; - if ((flag & ~(AT_SYMLINK_NOFOLLOW | AT_BENEATH)) != 0) + if ((flag & ~(AT_SYMLINK_NOFOLLOW | AT_BENEATH | + AT_RESOLVE_BENEATH)) != 0) return (EINVAL); NDINIT_ATRIGHTS(&nd, LOOKUP, at2cnpflags(flag, AT_BENEATH | - AT_SYMLINK_NOFOLLOW) | LOCKSHARED | LOCKLEAF | + AT_RESOLVE_BENEATH | AT_SYMLINK_NOFOLLOW) | LOCKSHARED | LOCKLEAF | AUDITVNODE1, pathseg, path, fd, &cap_fstat_rights, td); if ((error = namei(&nd)) != 0) @@ -2710,7 +2715,8 @@ int sys_chflagsat(struct thread *td, struct chflagsat_args *uap) { - if ((uap->atflag & ~(AT_SYMLINK_NOFOLLOW | AT_BENEATH)) != 0) + if ((uap->atflag & ~(AT_SYMLINK_NOFOLLOW | AT_BENEATH | + AT_RESOLVE_BENEATH)) != 0) return (EINVAL); return (kern_chflagsat(td, uap->fd, uap->path, UIO_USERSPACE, @@ -2743,7 +2749,7 @@ kern_chflagsat(struct thread *td, int fd, const char * AUDIT_ARG_FFLAGS(flags); NDINIT_ATRIGHTS(&nd, LOOKUP, at2cnpflags(atflag, AT_SYMLINK_NOFOLLOW | - AT_BENEATH) | AUDITVNODE1, pathseg, path, fd, + AT_BENEATH | AT_RESOLVE_BENEATH) | AUDITVNODE1, pathseg, path, fd, &cap_fchflags_rights, td); if ((error = namei(&nd)) != 0) return (error); @@ -2838,7 +2844,8 @@ int sys_fchmodat(struct thread *td, struct fchmodat_args *uap) { - if ((uap->flag & ~(AT_SYMLINK_NOFOLLOW | AT_BENEATH)) != 0) + if ((uap->flag & ~(AT_SYMLINK_NOFOLLOW | AT_BENEATH | + AT_RESOLVE_BENEATH)) != 0) return (EINVAL); return (kern_fchmodat(td, uap->fd, uap->path, UIO_USERSPACE, @@ -2871,7 +2878,7 @@ kern_fchmodat(struct thread *td, int fd, const char *p AUDIT_ARG_MODE(mode); NDINIT_ATRIGHTS(&nd, LOOKUP, at2cnpflags(flag, AT_SYMLINK_NOFOLLOW | - AT_BENEATH) | AUDITVNODE1, pathseg, path, fd, + AT_BENEATH | AT_RESOLVE_BENEATH) | AUDITVNODE1, pathseg, path, fd, &cap_fchmod_rights, td); if ((error = namei(&nd)) != 0) return (error); @@ -2966,7 +2973,8 @@ int sys_fchownat(struct thread *td, struct fchownat_args *uap) { - if ((uap->flag & ~(AT_SYMLINK_NOFOLLOW | AT_BENEATH)) != 0) + if ((uap->flag & ~(AT_SYMLINK_NOFOLLOW | AT_BENEATH | + AT_RESOLVE_BENEATH)) != 0) return (EINVAL); return (kern_fchownat(td, uap->fd, uap->path, UIO_USERSPACE, uap->uid, @@ -2982,7 +2990,7 @@ kern_fchownat(struct thread *td, int fd, const char *p AUDIT_ARG_OWNER(uid, gid); NDINIT_ATRIGHTS(&nd, LOOKUP, at2cnpflags(flag, AT_SYMLINK_NOFOLLOW | - AT_BENEATH) | AUDITVNODE1, pathseg, path, fd, + AT_BENEATH | AT_RESOLVE_BENEATH) | AUDITVNODE1, pathseg, path, fd, &cap_fchown_rights, td); if ((error = namei(&nd)) != 0) @@ -3334,13 +3342,14 @@ kern_utimensat(struct thread *td, int fd, const char * struct timespec ts[2]; int error, flags; - if ((flag & ~(AT_SYMLINK_NOFOLLOW | AT_BENEATH)) != 0) + if ((flag & ~(AT_SYMLINK_NOFOLLOW | AT_BENEATH | + AT_RESOLVE_BENEATH)) != 0) return (EINVAL); if ((error = getutimens(tptr, tptrseg, ts, &flags)) != 0) return (error); NDINIT_ATRIGHTS(&nd, LOOKUP, at2cnpflags(flag, AT_SYMLINK_NOFOLLOW | - AT_BENEATH) | AUDITVNODE1, + AT_BENEATH | AT_RESOLVE_BENEATH) | AUDITVNODE1, pathseg, path, fd, &cap_futimes_rights, td); if ((error = namei(&nd)) != 0) return (error); @@ -3835,7 +3844,7 @@ kern_frmdirat(struct thread *td, int dfd, const char * restart: bwillwrite(); NDINIT_ATRIGHTS(&nd, DELETE, LOCKPARENT | LOCKLEAF | AUDITVNODE1 | - at2cnpflags(flag, AT_BENEATH), + at2cnpflags(flag, AT_BENEATH | AT_RESOLVE_BENEATH), pathseg, path, dfd, &cap_unlinkat_rights, td); if ((error = namei(&nd)) != 0) goto fdout; @@ -4320,7 +4329,8 @@ int sys_getfhat(struct thread *td, struct getfhat_args *uap) { - if ((uap->flags & ~(AT_SYMLINK_NOFOLLOW | AT_BENEATH)) != 0) + if ((uap->flags & ~(AT_SYMLINK_NOFOLLOW | AT_BENEATH | + AT_RESOLVE_BENEATH)) != 0) return (EINVAL); return (kern_getfhat(td, uap->flags, uap->fd, uap->path, UIO_USERSPACE, uap->fhp)); @@ -4339,7 +4349,7 @@ kern_getfhat(struct thread *td, int flags, int fd, con if (error != 0) return (error); NDINIT_AT(&nd, LOOKUP, at2cnpflags(flags, AT_SYMLINK_NOFOLLOW | - AT_BENEATH) | LOCKLEAF | AUDITVNODE1, + AT_BENEATH | AT_RESOLVE_BENEATH) | LOCKLEAF | AUDITVNODE1, pathseg, path, fd, td); error = namei(&nd); if (error != 0) Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Tue Sep 22 22:43:32 2020 (r366021) +++ head/sys/kern/vfs_vnops.c Tue Sep 22 22:48:12 2020 (r366022) @@ -200,6 +200,8 @@ open2nameif(int fmode, u_int vn_open_flags) res = ISOPEN | LOCKLEAF; if ((fmode & O_BENEATH) != 0) res |= BENEATH; + if ((fmode & O_RESOLVE_BENEATH) != 0) + res |= RBENEATH; if ((vn_open_flags & VN_OPEN_NOAUDIT) == 0) res |= AUDITVNODE1; if ((vn_open_flags & VN_OPEN_NOCAPCHECK) != 0) Modified: head/sys/sys/fcntl.h ============================================================================== --- head/sys/sys/fcntl.h Tue Sep 22 22:43:32 2020 (r366021) +++ head/sys/sys/fcntl.h Tue Sep 22 22:48:12 2020 (r366022) @@ -136,6 +136,9 @@ typedef __pid_t pid_t; #if __BSD_VISIBLE #define O_VERIFY 0x00200000 /* open only after verification */ #define O_BENEATH 0x00400000 /* Fail if not under cwd */ +#define O_RESOLVE_BENEATH 0x00800000 /* As O_BENEATH, but do not allow + resolve to walk out of cwd even to + return back */ #endif /* @@ -215,6 +218,9 @@ typedef __pid_t pid_t; #define AT_SYMLINK_FOLLOW 0x0400 /* Follow symbolic link */ #define AT_REMOVEDIR 0x0800 /* Remove directory instead of file */ #define AT_BENEATH 0x1000 /* Fail if not under dirfd */ +#define AT_RESOLVE_BENEATH 0x2000 /* As AT_BENEATH, but do not allow + resolve to walk out of dirfd even + to return back */ #endif /* Modified: head/sys/sys/namei.h ============================================================================== --- head/sys/sys/namei.h Tue Sep 22 22:43:32 2020 (r366021) +++ head/sys/sys/namei.h Tue Sep 22 22:48:12 2020 (r366022) @@ -133,7 +133,8 @@ int cache_fplookup(struct nameidata *ndp, enum cache_f #define BENEATH 0x0080 /* No escape from the start dir */ #define LOCKSHARED 0x0100 /* Shared lock leaf */ #define NOFOLLOW 0x0000 /* do not follow symbolic links (pseudo) */ -#define MODMASK 0x01fc /* mask of operational modifiers */ +#define RBENEATH 0x100000000ULL /* No escape, even tmp, from start dir */ +#define MODMASK 0xf000001fcULL /* mask of operational modifiers */ /* * Namei parameter descriptors. * From owner-svn-src-head@freebsd.org Tue Sep 22 22:54:57 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 102C53E30A6; Tue, 22 Sep 2020 22:54:57 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwxTX6kYQz3Z0c; Tue, 22 Sep 2020 22:54:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CA97A268D5; Tue, 22 Sep 2020 22:54:56 +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 08MMsupc071985; Tue, 22 Sep 2020 22:54:56 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08MMssjj071973; Tue, 22 Sep 2020 22:54:54 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202009222254.08MMssjj071973@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 22 Sep 2020 22:54:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366023 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 366023 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 22:54:57 -0000 Author: kib Date: Tue Sep 22 22:54:54 2020 New Revision: 366023 URL: https://svnweb.freebsd.org/changeset/base/366023 Log: Document {O,AT}_RESOLVE_BENEATH and new O_BENEATH behavior for relative paths. PR: 248335 Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D25886 Modified: head/lib/libc/sys/access.2 head/lib/libc/sys/chflags.2 head/lib/libc/sys/chmod.2 head/lib/libc/sys/chown.2 head/lib/libc/sys/fhlink.2 head/lib/libc/sys/getfh.2 head/lib/libc/sys/link.2 head/lib/libc/sys/open.2 head/lib/libc/sys/stat.2 head/lib/libc/sys/unlink.2 head/lib/libc/sys/utimensat.2 Modified: head/lib/libc/sys/access.2 ============================================================================== --- head/lib/libc/sys/access.2 Tue Sep 22 22:48:12 2020 (r366022) +++ head/lib/libc/sys/access.2 Tue Sep 22 22:54:54 2020 (r366023) @@ -28,7 +28,7 @@ .\" @(#)access.2 8.2 (Berkeley) 4/1/94 .\" $FreeBSD$ .\" -.Dd March 30, 2020 +.Dd September 23, 2020 .Dt ACCESS 2 .Os .Sh NAME @@ -124,6 +124,13 @@ IDs instead of the real user and group ID as required Only operate on files and directories below the topping directory. See the description of the .Dv O_BENEATH +flag in the +.Xr open 2 +manual page. +.It Dv AT_RESOLVE_BENEATH +Only walks paths below the topping directory. +See the description of the +.Dv O_RESOLVE_BENEATH flag in the .Xr open 2 manual page. Modified: head/lib/libc/sys/chflags.2 ============================================================================== --- head/lib/libc/sys/chflags.2 Tue Sep 22 22:48:12 2020 (r366022) +++ head/lib/libc/sys/chflags.2 Tue Sep 22 22:54:54 2020 (r366023) @@ -28,7 +28,7 @@ .\" @(#)chflags.2 8.3 (Berkeley) 5/2/95 .\" $FreeBSD$ .\" -.Dd March 30, 2020 +.Dd September 23, 2020 .Dt CHFLAGS 2 .Os .Sh NAME @@ -99,6 +99,13 @@ Only allow to change flags for a file which is beneath the topping directory. See the description of the .Dv O_BENEATH +flag in the +.Xr open 2 +manual page. +.It Dv AT_RESOLVE_BENEATH +Only walks paths below the topping directory. +See the description of the +.Dv O_RESOLVE_BENEATH flag in the .Xr open 2 manual page. Modified: head/lib/libc/sys/chmod.2 ============================================================================== --- head/lib/libc/sys/chmod.2 Tue Sep 22 22:48:12 2020 (r366022) +++ head/lib/libc/sys/chmod.2 Tue Sep 22 22:54:54 2020 (r366023) @@ -28,7 +28,7 @@ .\" @(#)chmod.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd March 30, 2020 +.Dd September 23, 2020 .Dt CHMOD 2 .Os .Sh NAME @@ -106,6 +106,13 @@ Only allow to change permissions of a file which is be the topping directory. See the description of the .Dv O_BENEATH +flag in the +.Xr open 2 +manual page. +.It Dv AT_RESOLVE_BENEATH +Only walks paths below the topping directory. +See the description of the +.Dv O_RESOLVE_BENEATH flag in the .Xr open 2 manual page. Modified: head/lib/libc/sys/chown.2 ============================================================================== --- head/lib/libc/sys/chown.2 Tue Sep 22 22:48:12 2020 (r366022) +++ head/lib/libc/sys/chown.2 Tue Sep 22 22:54:54 2020 (r366023) @@ -28,7 +28,7 @@ .\" @(#)chown.2 8.4 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd March 30, 2020 +.Dd September 23, 2020 .Dt CHOWN 2 .Os .Sh NAME @@ -123,6 +123,13 @@ Only allow to change ownership of a file which is bene the topping directory. See the description of the .Dv O_BENEATH +flag in the +.Xr open 2 +manual page. +.It Dv AT_RESOLVE_BENEATH +Only walks paths below the topping directory. +See the description of the +.Dv O_RESOLVE_BENEATH flag in the .Xr open 2 manual page. Modified: head/lib/libc/sys/fhlink.2 ============================================================================== --- head/lib/libc/sys/fhlink.2 Tue Sep 22 22:48:12 2020 (r366022) +++ head/lib/libc/sys/fhlink.2 Tue Sep 22 22:54:54 2020 (r366023) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 30, 2020 +.Dd September 23, 2020 .Dt FHLINK 2 .Os .Sh NAME @@ -110,6 +110,13 @@ created. Only allow to link to a file which is beneath of the topping directory. See the description of the .Dv O_BENEATH +flag in the +.Xr open 2 +manual page. +.It Dv AT_RESOLVE_BENEATH +Only walks paths below the topping directory. +See the description of the +.Dv O_RESOLVE_BENEATH flag in the .Xr open 2 manual page. Modified: head/lib/libc/sys/getfh.2 ============================================================================== --- head/lib/libc/sys/getfh.2 Tue Sep 22 22:48:12 2020 (r366022) +++ head/lib/libc/sys/getfh.2 Tue Sep 22 22:54:54 2020 (r366023) @@ -29,7 +29,7 @@ .\" @(#)getfh.2 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd March 30, 2020 +.Dd September 23, 2020 .Dt GETFH 2 .Os .Sh NAME @@ -109,6 +109,13 @@ names a symbolic link, the status of the symbolic link Only stat files and directories below the topping directory. See the description of the .Dv O_BENEATH +flag in the +.Xr open 2 +manual page. +.It Dv AT_RESOLVE_BENEATH +Only walks paths below the topping directory. +See the description of the +.Dv O_RESOLVE_BENEATH flag in the .Xr open 2 manual page. Modified: head/lib/libc/sys/link.2 ============================================================================== --- head/lib/libc/sys/link.2 Tue Sep 22 22:48:12 2020 (r366022) +++ head/lib/libc/sys/link.2 Tue Sep 22 22:54:54 2020 (r366023) @@ -28,7 +28,7 @@ .\" @(#)link.2 8.3 (Berkeley) 1/12/94 .\" $FreeBSD$ .\" -.Dd March 30, 2020 +.Dd September 23, 2020 .Dt LINK 2 .Os .Sh NAME @@ -119,6 +119,13 @@ created. Only allow to link to a file which is beneath of the topping directory. See the description of the .Dv O_BENEATH +flag in the +.Xr open 2 +manual page. +.It Dv AT_RESOLVE_BENEATH +Only walks paths below the topping directory. +See the description of the +.Dv O_RESOLVE_BENEATH flag in the .Xr open 2 manual page. Modified: head/lib/libc/sys/open.2 ============================================================================== --- head/lib/libc/sys/open.2 Tue Sep 22 22:48:12 2020 (r366022) +++ head/lib/libc/sys/open.2 Tue Sep 22 22:54:54 2020 (r366023) @@ -28,7 +28,7 @@ .\" @(#)open.2 8.2 (Berkeley) 11/16/93 .\" $FreeBSD$ .\" -.Dd March 30, 2020 +.Dd September 23, 2020 .Dt OPEN 2 .Os .Sh NAME @@ -117,6 +117,12 @@ is specified with an absolute a directory passed by the .Fa fd argument is used as the topping point for the resolution. +When +.Dv O_BENEATH +is specified with a relative path, the +.Fa fd +argument is used both as the starting point, and as the topping point +for the resolution. See the definition of the .Dv O_BENEATH flag below. @@ -183,7 +189,8 @@ O_TTY_INIT ignored O_DIRECTORY error if file is not a directory O_CLOEXEC set FD_CLOEXEC upon open O_VERIFY verify the contents of the file -O_BENEATH require path to be strictly relative to topping directory +O_BENEATH require resolved path to be strictly relative to topping directory +O_RESOLVE_BENEATH require walked path to be strictly relative to topping directory .Ed .Pp Opening a file with @@ -311,8 +318,8 @@ been verified before operating on them. .Dv O_BENEATH returns .Er ENOTCAPABLE -if the specified relative path, after resolving all symlinks and ".." -references, does not reside in the directory hierarchy of +if the specified path, after resolving all symlinks and ".." +references, does not end up with tail residing in the directory hierarchy of children beneath the topping directory. Topping directory is the process current directory if relative .Fa path @@ -322,11 +329,20 @@ and the directory referenced by the .Fa fd argument when using .Fn openat . -If the specified path is absolute, .Dv O_BENEATH allows arbitrary prefix that ends up at the topping directory, after which all further resolved components must be under it. .Pp +.Dv O_RESOLVE_BENEATH +returns +.Er ENOTCAPABLE +if any intermediate component of the specified relative path does not +reside in the directory hierarchy beneath the topping directory. +Comparing to +.Dv O_BENEATH, +absolute paths or even the temporal escape from beneath of the topping +directory is not allowed. +.Pp When .Fa fd is opened with @@ -540,6 +556,12 @@ and .Dv O_EXEC or .Dv O_SEARCH . +.It Bq Er EINVAL +The +.Dv O_RESOLVE_BENEATH +flag is specified and +.Dv path +is absolute. .It Bq Er EBADF The .Fa path @@ -582,6 +604,12 @@ does not have its tail fully contained under the toppi or the relative .Fa path escapes it. +.It Bq Er ENOTCAPABLE +The +.Dv O_RESOLVE_BENEATH +flag was provided, and the relative +.Fa path +escapes topping directory. .El .Sh SEE ALSO .Xr chmod 2 , Modified: head/lib/libc/sys/stat.2 ============================================================================== --- head/lib/libc/sys/stat.2 Tue Sep 22 22:48:12 2020 (r366022) +++ head/lib/libc/sys/stat.2 Tue Sep 22 22:54:54 2020 (r366023) @@ -28,7 +28,7 @@ .\" @(#)stat.2 8.4 (Berkeley) 5/1/95 .\" $FreeBSD$ .\" -.Dd March 30, 2020 +.Dd September 23, 2020 .Dt STAT 2 .Os .Sh NAME @@ -117,6 +117,13 @@ names a symbolic link, the status of the symbolic link Only stat files and directories below the topping directory. See the description of the .Dv O_BENEATH +flag in the +.Xr open 2 +manual page. +.It Dv AT_RESOLVE_BENEATH +Only walks paths below the topping directory. +See the description of the +.Dv O_RESOLVE_BENEATH flag in the .Xr open 2 manual page. Modified: head/lib/libc/sys/unlink.2 ============================================================================== --- head/lib/libc/sys/unlink.2 Tue Sep 22 22:48:12 2020 (r366022) +++ head/lib/libc/sys/unlink.2 Tue Sep 22 22:54:54 2020 (r366023) @@ -28,7 +28,7 @@ .\" @(#)unlink.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd March 30, 2020 +.Dd September 23, 2020 .Dt UNLINK 2 .Os .Sh NAME @@ -97,6 +97,13 @@ Only unlink files and directories which are beneath of directory. See the description of the .Dv O_BENEATH +flag in the +.Xr open 2 +manual page. +.It Dv AT_RESOLVE_BENEATH +Only walks paths below the topping directory. +See the description of the +.Dv O_RESOLVE_BENEATH flag in the .Xr open 2 manual page. Modified: head/lib/libc/sys/utimensat.2 ============================================================================== --- head/lib/libc/sys/utimensat.2 Tue Sep 22 22:48:12 2020 (r366022) +++ head/lib/libc/sys/utimensat.2 Tue Sep 22 22:54:54 2020 (r366023) @@ -31,7 +31,7 @@ .\" @(#)utimes.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd March 30, 2020 +.Dd September 23, 2020 .Dt UTIMENSAT 2 .Os .Sh NAME @@ -151,6 +151,13 @@ Only allow to change the times of a file which is bene the topping directory. See the description of the .Dv O_BENEATH +flag in the +.Xr open 2 +manual page. +.It Dv AT_RESOLVE_BENEATH +Only walks paths below the topping directory. +See the description of the +.Dv O_RESOLVE_BENEATH flag in the .Xr open 2 manual page. From owner-svn-src-head@freebsd.org Tue Sep 22 23:01:45 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 32D843E3817; Tue, 22 Sep 2020 23:01:45 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwxdP0dTxz3Zfp; Tue, 22 Sep 2020 23:01:45 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ED264268E8; Tue, 22 Sep 2020 23:01:44 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08MN1iFN075869; Tue, 22 Sep 2020 23:01:44 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08MN1ikb075868; Tue, 22 Sep 2020 23:01:44 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202009222301.08MN1ikb075868@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 22 Sep 2020 23:01:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366024 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 366024 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 23:01:45 -0000 Author: imp Date: Tue Sep 22 23:01:44 2020 New Revision: 366024 URL: https://svnweb.freebsd.org/changeset/base/366024 Log: Add a devctl_process_running man page. Reviewed by: bcr Differential Revision: https://reviews.freebsd.org/D26520 Added: head/share/man/man9/devctl_process_running.9 (contents, props changed) Modified: head/share/man/man9/Makefile Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Tue Sep 22 22:54:54 2020 (r366023) +++ head/share/man/man9/Makefile Tue Sep 22 23:01:44 2020 (r366024) @@ -121,6 +121,7 @@ MAN= accept_filter.9 \ DEVICE_SHUTDOWN.9 \ DEV_MODULE.9 \ dev_refthread.9 \ + devctl_process_running.9 \ devstat.9 \ devtoname.9 \ disk.9 \ Added: head/share/man/man9/devctl_process_running.9 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man9/devctl_process_running.9 Tue Sep 22 23:01:44 2020 (r366024) @@ -0,0 +1,60 @@ +.\" +.\" Copyright (c) 2020 M Warner Losh +.\" +.\" This program is free software. +.\" +.\" 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 DEVELOPERS ``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 DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd September 22, 2020 +.Dt DEVCTL_PROCESS_RUNNING 9 +.Os +.Sh NAME +.Nm devctl_process_running +.Nd Returns true when devctl has a consumer process running +.Sh SYNOPSIS +.In sys/devctl.h +.Ft bool +.Fn devctl_process_running "void" +.Sh DESCRIPTION +The +.Nm +call returns +.Vt true +when a process has the devctl device open for +reading, and +.Vt false +otherwise. +One can assume from this that the default +.Xr devd 8 +or similar is running when +.Vt true +is returned. +Some subsystems will send a message and allow userland to do something +before proceeding with a default action if there's a timeout. +This call allows those subsystems to do the default action right away +when no process is running. +.Sh SEE ALSO +.Xr devd 8 +.Sh AUTHORS +This manual page was written by +.An M. Warner Losh From owner-svn-src-head@freebsd.org Tue Sep 22 23:01:57 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 14D9F3E3713; Tue, 22 Sep 2020 23:01:57 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwxdZ5zFcz3Zwd; Tue, 22 Sep 2020 23:01:53 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AE2A626D54; Tue, 22 Sep 2020 23:01:53 +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 08MN1r9B076779; Tue, 22 Sep 2020 23:01:53 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08MN1rkh076778; Tue, 22 Sep 2020 23:01:53 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202009222301.08MN1rkh076778@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 22 Sep 2020 23:01:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366025 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 366025 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 23:01:57 -0000 Author: imp Date: Tue Sep 22 23:01:53 2020 New Revision: 366025 URL: https://svnweb.freebsd.org/changeset/base/366025 Log: Document devctl_safe_quote_sb This routine centralizes the knowledge needed for properly quoting 'value' in all key="value" items that appear in devctl messages. Reviewed by: bcr Differential Revision: https://reviews.freebsd.org/D26520 Added: head/share/man/man9/devctl_safe_quote_sb.9 (contents, props changed) Modified: head/share/man/man9/Makefile Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Tue Sep 22 23:01:44 2020 (r366024) +++ head/share/man/man9/Makefile Tue Sep 22 23:01:53 2020 (r366025) @@ -122,6 +122,8 @@ MAN= accept_filter.9 \ DEV_MODULE.9 \ dev_refthread.9 \ devctl_process_running.9 \ + devctl_safe_quote_sb.9 \ + devctl_ devstat.9 \ devtoname.9 \ disk.9 \ Added: head/share/man/man9/devctl_safe_quote_sb.9 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man9/devctl_safe_quote_sb.9 Tue Sep 22 23:01:53 2020 (r366025) @@ -0,0 +1,57 @@ +.\" +.\" Copyright (c) 2020 M Warner Losh +.\" +.\" This program is free software. +.\" +.\" 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 DEVELOPERS ``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 DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd September 22, 2020 +.Dt DEVCTL_SAFE_QUOTE_SB 9 +.Os +.Sh NAME +.Nm devctl_safe_quote_sb +.Nd Insert a string, properly quoted, into a sbuf +.Sh SYNOPSIS +.In sys/devctl.h +.In sys/sbuf.h +.Ft void +.Fn devctl_safe_quote_sb "struct sbuf *sb" "const char *src" +.Sh DESCRIPTION +Copy the string from +.Vn src +into +.Vn sb . +All backslash characters are doubled. +All double quote characters +.Sq " +are also preceded by a backslash. +All other characters are copied without modification. +The +.Xr devctl 4 +protocol requires quoted string to be quoted thus. +This routine centralizes this knowledge. +.Sh SEE ALSO +.Xr devd 8 +.Sh AUTHORS +This manual page was written by +.An M. Warner Losh From owner-svn-src-head@freebsd.org Tue Sep 22 23:01:58 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 414273E3714; Tue, 22 Sep 2020 23:01:58 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bwxdf0kDcz3b2p; Tue, 22 Sep 2020 23:01:58 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E1B0126D57; Tue, 22 Sep 2020 23:01:57 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08MN1v7I076833; Tue, 22 Sep 2020 23:01:57 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08MN1vnH076832; Tue, 22 Sep 2020 23:01:57 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202009222301.08MN1vnH076832@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 22 Sep 2020 23:01:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366026 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 366026 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 23:01:58 -0000 Author: imp Date: Tue Sep 22 23:01:57 2020 New Revision: 366026 URL: https://svnweb.freebsd.org/changeset/base/366026 Log: Document quoting requirements for the devctl protocol Belatedly document the quoting requirements for the devctl protocol. I thought they'd been previously documented. Also, while I'm here, make igor happy. Reviewed by: bcr Differential Revision: https://reviews.freebsd.org/D26520 Modified: head/share/man/man4/devctl.4 Modified: head/share/man/man4/devctl.4 ============================================================================== --- head/share/man/man4/devctl.4 Tue Sep 22 23:01:53 2020 (r366025) +++ head/share/man/man4/devctl.4 Tue Sep 22 23:01:57 2020 (r366026) @@ -23,12 +23,16 @@ .\" .\" $FreeBSD$ .\" -.Dd March 26, 2014 +.Dd September 21, 2020 .Dt DEVCTL 4 .Os .Sh NAME .Nm devctl .Nd "device event reporting and device control interface" +.Sh SYNOPSIS +The +.Nm +driver is automatically included in the kernel. .Sh DESCRIPTION The .Nm @@ -124,5 +128,17 @@ driver. The attach message driver has already claimed this device. One cannot use the detach messages to flush data to the device. The device is already gone. +.Pp +All values passed back are of the form +.Sq key=value +or +.Sq key="value" . +When the latter, the string +.Dq value +must have any internal backslashes doubled. +It must also have any internal double quote characters +.Sq " +preceded by a backslash. +All other characters should be passed through. .Sh SEE ALSO .Xr devd 8 From owner-svn-src-head@freebsd.org Tue Sep 22 23:02:05 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7BABA3E35F9; Tue, 22 Sep 2020 23:02:05 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bwxdl4Z3Kz3b0l; Tue, 22 Sep 2020 23:02:02 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6D32726E25; Tue, 22 Sep 2020 23:02:02 +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 08MN22hA076892; Tue, 22 Sep 2020 23:02:02 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08MN22H3076890; Tue, 22 Sep 2020 23:02:02 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202009222302.08MN22H3076890@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 22 Sep 2020 23:02:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366027 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 366027 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 23:02:05 -0000 Author: imp Date: Tue Sep 22 23:02:01 2020 New Revision: 366027 URL: https://svnweb.freebsd.org/changeset/base/366027 Log: Add devctl_notify(9) man page Document the calls to send messages to userland via devctl. devctl_notify will create a message for the specified system, subsystem and type, optionally adding additional information. Reviewed by: bcr Differential Revision: https://reviews.freebsd.org/D26520 Added: head/share/man/man9/devctl_notify.9 (contents, props changed) Modified: head/share/man/man9/Makefile Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Tue Sep 22 23:01:57 2020 (r366026) +++ head/share/man/man9/Makefile Tue Sep 22 23:02:01 2020 (r366027) @@ -121,6 +121,7 @@ MAN= accept_filter.9 \ DEVICE_SHUTDOWN.9 \ DEV_MODULE.9 \ dev_refthread.9 \ + devctl_notify.9 \ devctl_process_running.9 \ devctl_safe_quote_sb.9 \ devctl_ Added: head/share/man/man9/devctl_notify.9 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man9/devctl_notify.9 Tue Sep 22 23:02:01 2020 (r366027) @@ -0,0 +1,78 @@ +.\" +.\" Copyright (c) 2020 M Warner Losh +.\" +.\" This program is free software. +.\" +.\" 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 DEVELOPERS ``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 DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd September 22, 2020 +.Dt DEVCTL_NOTIFY 9 +.Os +.Sh NAME +.Nm devctl_notify +.Nd Send a message, via devctl, to userland +.Sh SYNOPSIS +.In sys/devctl.h +.Ft void +.Fn devctl_notify "const char *system" "const char *subsystem" "const char *type" "const char *data" +.Sh DESCRIPTION +Send a notification to user land via +.Xr devctl 4 . +See +.Xr devctl 4 +for the format of these messages. +.Pp +The +.Nm +function creates a string using the following template: +.Bd -literal +snprintf(buffer, sizeof(buffer), "!system=%s subsystem=%s type=%s", + system, subsystem, type); +.Ed +.Pp +The +.Va system , +.Va subsystem , +and +.Va type +pointers cannot be NULL. +.Pp +The +.Va data +argument may be NULL (for no additions) or a message formatted +properly for +.Xr devctl 4 . +A space will be added to the above template and this argument copied +verbatim to form the message passed to userland. +Senders should balance between only passing data that userland can not +discover itself and sending all the data userland will want to use to +decide what to do with the message. +.Pp +The current total message length limit is just under 1kb. +Senders should try to remain well below this limit. +.Sh SEE ALSO +.Xr devctl 4 , +.Xr devd 8 +.Sh AUTHORS +This manual page was written by +.An M. Warner Losh From owner-svn-src-head@freebsd.org Tue Sep 22 23:17:32 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BA8C63E3B77; Tue, 22 Sep 2020 23:17:32 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bwxzc4W7jz3bWj; Tue, 22 Sep 2020 23:17:32 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 79B461FA4E; Tue, 22 Sep 2020 23:17:32 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f178.google.com with SMTP id o5so20953582qke.12; Tue, 22 Sep 2020 16:17:32 -0700 (PDT) X-Gm-Message-State: AOAM532Jb3rdEBalTWqQeEc2ULCYh93UdZZFyL7Sayb4qoi7/p38tN1r 9J+P60JRgcHt9NFqyRjCpb3buCvPSGjOweUgMVw= X-Google-Smtp-Source: ABdhPJzbBlEf2812x7C9uWGvjaOMA1K810u3nfXWAaScuWwWkelqxdaSTSNC7/f/JSOktmNWpS7qM3qWtjK8p1Ervwo= X-Received: by 2002:a05:620a:4fb:: with SMTP id b27mr7721037qkh.120.1600816652148; Tue, 22 Sep 2020 16:17:32 -0700 (PDT) MIME-Version: 1.0 References: <202009112049.08BKnavL032212@repo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Tue, 22 Sep 2020 18:17:20 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r365643 - head/bin/cp To: Warner Losh Cc: Ian Lepore , Alan Somers , Mateusz Guzik , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 23:17:32 -0000 On Tue, Sep 22, 2020, 17:02 Warner Losh wrote: > > > On Tue, Sep 22, 2020 at 3:55 PM Kyle Evans wrote: > >> On Tue, Sep 22, 2020 at 4:53 PM Ian Lepore wrote: >> > >> > On Tue, 2020-09-22 at 15:50 -0600, Warner Losh wrote: >> > > I think it's a great leap sideways, but I've done cp /dev/null foo to >> > > clear >> > > it out for 35 years now... It's why it feels like a workaround. >> > > >> > > Though it is a legit optimization, no matter the feelings. As for >> > > clearer, >> > > I'm less sure since then I have to remember what the : operator does. >> > > >> > > Warner >> > > >> > >> > For me, :> is idiomatic (but ugly). >> > >> > On the other hand, the cp /dev/null had a nice dogfooding aspect to >> > it... when we broke cp by accident, its use in the build system was the >> > first alarm to go off. >> > >> > --Ian >> > >> >> To be honest, this is a case that really should be covered by >> regression tests somewhere. >> > > It should (but isn't yet). > > Ian is right for old-school FreeBSD thinking. In that thinking the build > system should use an eclectic mix of tools to act as a fire-wall against > accidental breakage. > > Complete, effective, test suites give much better coverage... if they are > run... > > So until we run tests frequently, with loud regression squawking that's as > effective as build breakage, I tend to fall in the 'all of the above' camp > until that's in place... :) > > Warner > > P.S. though not, if I suppose, if it means that we're slowing down the > regression coverage uptake... > -- The test build was fine, please confirm if I can commit it or if someone else would like to write the UPDATING notice or start bootstrapping cp on systems that were affected. I'm not comfortable with not taking any path at all here, but this is a lot of friction for a small mechanical change to ease the pain. Thanks, Kyle Evans > From owner-svn-src-head@freebsd.org Tue Sep 22 23:27:10 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 884273E42C8; Tue, 22 Sep 2020 23:27:10 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwyBk373Mz3c1Y; Tue, 22 Sep 2020 23:27:10 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4E9EA27142; Tue, 22 Sep 2020 23:27:10 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08MNRA3S091268; Tue, 22 Sep 2020 23:27:10 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08MNRAfL091267; Tue, 22 Sep 2020 23:27:10 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202009222327.08MNRAfL091267@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Tue, 22 Sep 2020 23:27:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366029 - head/stand/ficl X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: head/stand/ficl X-SVN-Commit-Revision: 366029 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 23:27:10 -0000 Author: bdragon Date: Tue Sep 22 23:27:09 2020 New Revision: 366029 URL: https://svnweb.freebsd.org/changeset/base/366029 Log: Tweak ficl definition from r365724 I had overthought how to do the FICL_TRUE change. We do not need to explicitly specify how big the 0 is before the cast to the correct size. The same change was suggested by both imp@ and Gunther Nikl independently. Tested on powerpc. Reported by: imp, Gunther Nikl Modified: head/stand/ficl/ficl.h Modified: head/stand/ficl/ficl.h ============================================================================== --- head/stand/ficl/ficl.h Tue Sep 22 23:13:29 2020 (r366028) +++ head/stand/ficl/ficl.h Tue Sep 22 23:27:09 2020 (r366029) @@ -249,7 +249,7 @@ typedef struct ficl_system_info FICL_SYSTEM_INFO; ** complement of false... that unifies logical and bitwise operations ** nicely. */ -#define FICL_TRUE ((FICL_UNS)~(0LL)) +#define FICL_TRUE (~(FICL_UNS)0) #define FICL_FALSE (0) #define FICL_BOOL(x) ((x) ? FICL_TRUE : FICL_FALSE) From owner-svn-src-head@freebsd.org Tue Sep 22 23:28:07 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3D0F03E4497; Tue, 22 Sep 2020 23:28:07 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwyCq0vBGz3cT5; Tue, 22 Sep 2020 23:28:07 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0225227145; Tue, 22 Sep 2020 23:28:07 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08MNS6SG091360; Tue, 22 Sep 2020 23:28:06 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08MNS6AL091359; Tue, 22 Sep 2020 23:28:06 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202009222328.08MNS6AL091359@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 22 Sep 2020 23:28:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366030 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 366030 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 23:28:07 -0000 Author: kib Date: Tue Sep 22 23:28:06 2020 New Revision: 366030 URL: https://svnweb.freebsd.org/changeset/base/366030 Log: amd64 pmap: More unification for psind = 1 vs 2 in pmap_enter_largepage(). Move pkru check wait for page alloc wire accounting update asserting allowed updates for valid mappings out of psind conditions. Also add assert that psind references supported page size. Remove not true comment. Avoid uneccessary page table walks from top level. Reviewed by: alc, markj (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D26513 Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Tue Sep 22 23:27:09 2020 (r366029) +++ head/sys/amd64/amd64/pmap.c Tue Sep 22 23:28:06 2020 (r366030) @@ -6479,7 +6479,7 @@ pmap_enter_largepage(pmap_t pmap, vm_offset_t va, pt_e pt_entry_t origpte, *pml4e, *pdpe, *pde, pten, PG_V; PMAP_LOCK_ASSERT(pmap, MA_OWNED); - KASSERT(psind > 0 && psind < MAXPAGESIZES, + KASSERT(psind > 0 && psind < MAXPAGESIZES && pagesizes[psind] != 0, ("psind %d unexpected", psind)); KASSERT(((newpte & PG_FRAME) & (pagesizes[psind] - 1)) == 0, ("unaligned phys address %#lx newpte %#lx psind %d", @@ -6494,38 +6494,25 @@ pmap_enter_largepage(pmap_t pmap, vm_offset_t va, pt_e PG_V = pmap_valid_bit(pmap); restart: + if (!pmap_pkru_same(pmap, va, va + pagesizes[psind])) + return (KERN_PROTECTION_FAILURE); pten = newpte; if (va < VM_MAXUSER_ADDRESS && pmap->pm_type == PT_X86) pten |= pmap_pkru_get(pmap, va); if (psind == 2) { /* 1G */ - if (!pmap_pkru_same(pmap, va, va + NBPDP)) - return (KERN_PROTECTION_FAILURE); pml4e = pmap_pml4e(pmap, va); if (pml4e == NULL || (*pml4e & PG_V) == 0) { mp = _pmap_allocpte(pmap, pmap_pml4e_pindex(va), NULL, va); - if (mp == NULL) { - if ((flags & PMAP_ENTER_NOSLEEP) != 0) - return (KERN_RESOURCE_SHORTAGE); - PMAP_UNLOCK(pmap); - vm_wait(NULL); - PMAP_LOCK(pmap); - - /* - * Restart at least to recalcuate the pkru - * key. Our caller must keep the map locked - * so no paging structure can be validated - * under us. - */ - goto restart; - } - pdpe = pmap_pdpe(pmap, va); - KASSERT(pdpe != NULL, ("va %#lx lost pdpe", va)); + if (mp == NULL) + goto allocf; + pdpe = (pdp_entry_t *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(mp)); + pdpe = &pdpe[pmap_pdpe_index(va)]; origpte = *pdpe; MPASS(origpte == 0); } else { - pdpe = pmap_pdpe(pmap, va); + pdpe = pmap_pml4e_to_pdpe(pml4e, va); KASSERT(pdpe != NULL, ("va %#lx lost pdpe", va)); origpte = *pdpe; if ((origpte & PG_V) == 0) { @@ -6533,57 +6520,49 @@ restart: mp->ref_count++; } } - KASSERT((origpte & PG_V) == 0 || ((origpte & PG_PS) != 0 && - (origpte & PG_FRAME) == (pten & PG_FRAME)), - ("va %#lx changing 1G phys page pdpe %#lx pten %#lx", - va, origpte, pten)); - if ((pten & PG_W) != 0 && (origpte & PG_W) == 0) - pmap->pm_stats.wired_count += NBPDP / PAGE_SIZE; - else if ((pten & PG_W) == 0 && (origpte & PG_W) != 0) - pmap->pm_stats.wired_count -= NBPDP / PAGE_SIZE; *pdpe = pten; } else /* (psind == 1) */ { /* 2M */ - if (!pmap_pkru_same(pmap, va, va + NBPDR)) - return (KERN_PROTECTION_FAILURE); pde = pmap_pde(pmap, va); if (pde == NULL) { mp = _pmap_allocpte(pmap, pmap_pdpe_pindex(va), NULL, va); - if (mp == NULL) { - if ((flags & PMAP_ENTER_NOSLEEP) != 0) - return (KERN_RESOURCE_SHORTAGE); - PMAP_UNLOCK(pmap); - vm_wait(NULL); - PMAP_LOCK(pmap); - goto restart; - } + if (mp == NULL) + goto allocf; pde = (pd_entry_t *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(mp)); pde = &pde[pmap_pde_index(va)]; origpte = *pde; MPASS(origpte == 0); } else { - pdpe = pmap_pdpe(pmap, va); - MPASS(pdpe != NULL && (*pdpe & PG_V) != 0); origpte = *pde; if ((origpte & PG_V) == 0) { + pdpe = pmap_pdpe(pmap, va); + MPASS(pdpe != NULL && (*pdpe & PG_V) != 0); mp = PHYS_TO_VM_PAGE(*pdpe & PG_FRAME); mp->ref_count++; } } - KASSERT((origpte & PG_V) == 0 || ((origpte & PG_PS) != 0 && - (origpte & PG_FRAME) == (pten & PG_FRAME)), - ("va %#lx changing 2M phys page pde %#lx pten %#lx", - va, origpte, pten)); - if ((pten & PG_W) != 0 && (origpte & PG_W) == 0) - pmap->pm_stats.wired_count += NBPDR / PAGE_SIZE; - else if ((pten & PG_W) == 0 && (origpte & PG_W) != 0) - pmap->pm_stats.wired_count -= NBPDR / PAGE_SIZE; *pde = pten; } + KASSERT((origpte & PG_V) == 0 || ((origpte & PG_PS) != 0 && + (origpte & PG_PS_FRAME) == (pten & PG_PS_FRAME)), + ("va %#lx changing %s phys page origpte %#lx pten %#lx", + va, psind == 2 ? "1G" : "2M", origpte, pten)); + if ((pten & PG_W) != 0 && (origpte & PG_W) == 0) + pmap->pm_stats.wired_count += pagesizes[psind] / PAGE_SIZE; + else if ((pten & PG_W) == 0 && (origpte & PG_W) != 0) + pmap->pm_stats.wired_count -= pagesizes[psind] / PAGE_SIZE; if ((origpte & PG_V) == 0) pmap_resident_count_inc(pmap, pagesizes[psind] / PAGE_SIZE); return (KERN_SUCCESS); + +allocf: + if ((flags & PMAP_ENTER_NOSLEEP) != 0) + return (KERN_RESOURCE_SHORTAGE); + PMAP_UNLOCK(pmap); + vm_wait(NULL); + PMAP_LOCK(pmap); + goto restart; } /* From owner-svn-src-head@freebsd.org Tue Sep 22 23:39:15 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0927A3E4809; Tue, 22 Sep 2020 23:39:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwySf6Wt6z3d3j; Tue, 22 Sep 2020 23:39:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BF6B1272D0; Tue, 22 Sep 2020 23:39: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 08MNdE1W097569; Tue, 22 Sep 2020 23:39:14 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08MNdEJt097568; Tue, 22 Sep 2020 23:39:14 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202009222339.08MNdEJt097568@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 22 Sep 2020 23:39:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366031 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 366031 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 23:39:15 -0000 Author: kib Date: Tue Sep 22 23:39:14 2020 New Revision: 366031 URL: https://svnweb.freebsd.org/changeset/base/366031 Log: Remove stray line Modified: head/share/man/man9/Makefile Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Tue Sep 22 23:28:06 2020 (r366030) +++ head/share/man/man9/Makefile Tue Sep 22 23:39:14 2020 (r366031) @@ -124,7 +124,6 @@ MAN= accept_filter.9 \ devctl_notify.9 \ devctl_process_running.9 \ devctl_safe_quote_sb.9 \ - devctl_ devstat.9 \ devtoname.9 \ disk.9 \ From owner-svn-src-head@freebsd.org Tue Sep 22 23:49:33 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7A18F3E4AEE; Tue, 22 Sep 2020 23:49:33 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwyhY33ctz3d8L; Tue, 22 Sep 2020 23:49:33 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4C1B1274C6; Tue, 22 Sep 2020 23:49:33 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08MNnXDw003897; Tue, 22 Sep 2020 23:49:33 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08MNnUQj003883; Tue, 22 Sep 2020 23:49:30 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202009222349.08MNnUQj003883@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Tue, 22 Sep 2020 23:49:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366032 - in head: . share/mk stand sys/conf sys/modules sys/powerpc/include X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: in head: . share/mk stand sys/conf sys/modules sys/powerpc/include X-SVN-Commit-Revision: 366032 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 23:49:33 -0000 Author: bdragon Date: Tue Sep 22 23:49:30 2020 New Revision: 366032 URL: https://svnweb.freebsd.org/changeset/base/366032 Log: [PowerPC64LE] Set up powerpc.powerpc64le architecture This is the initial set up for PowerPC64LE. The current plan is for this arch to remain experimental for FreeBSD 13. This started as a weekend learning project for me and kinda snowballed from there. (More to follow momentarily.) Reviewed by: imp (earlier version), emaste Sponsored by: Tag1 Consulting, Inc. Differential Revision: https://reviews.freebsd.org/D26399 Added: head/sys/conf/ldscript.powerpc64le (contents, props changed) Modified: head/Makefile head/Makefile.inc1 head/share/mk/bsd.cpu.mk head/share/mk/bsd.endian.mk head/share/mk/local.meta.sys.mk head/share/mk/src.opts.mk head/share/mk/sys.mk head/stand/defs.mk head/sys/conf/files.powerpc head/sys/conf/kern.mk head/sys/conf/options.powerpc head/sys/modules/Makefile head/sys/powerpc/include/param.h Modified: head/Makefile ============================================================================== --- head/Makefile Tue Sep 22 23:39:14 2020 (r366031) +++ head/Makefile Tue Sep 22 23:49:30 2020 (r366032) @@ -500,7 +500,7 @@ worlds: .PHONY EXTRA_ARCHES_mips= mipsel mipshf mipselhf mips64el mips64hf mips64elhf EXTRA_ARCHES_mips+= mipsn32 # powerpcspe excluded from main list until clang fixed -EXTRA_ARCHES_powerpc= powerpcspe +EXTRA_ARCHES_powerpc= powerpcspe powerpc64le .endif TARGETS?=amd64 arm arm64 i386 mips powerpc riscv _UNIVERSE_TARGETS= ${TARGETS} Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Sep 22 23:39:14 2020 (r366031) +++ head/Makefile.inc1 Tue Sep 22 23:49:30 2020 (r366032) @@ -152,6 +152,7 @@ KNOWN_ARCHES?= aarch64/arm64 \ mips64hf/mips \ powerpc \ powerpc64/powerpc \ + powerpc64le/powerpc \ powerpcspe/powerpc \ riscv64/riscv \ riscv64sf/riscv Modified: head/share/mk/bsd.cpu.mk ============================================================================== --- head/share/mk/bsd.cpu.mk Tue Sep 22 23:39:14 2020 (r366031) +++ head/share/mk/bsd.cpu.mk Tue Sep 22 23:49:30 2020 (r366032) @@ -128,7 +128,7 @@ _CPUCFLAGS = -Wa,-me500 -msoft-float . else _CPUCFLAGS = -mcpu=${CPUTYPE} -mno-powerpc64 . endif -. elif ${MACHINE_ARCH} == "powerpc64" +. elif ${MACHINE_ARCH:Mpowerpc64*} != "" _CPUCFLAGS = -mcpu=${CPUTYPE} . elif ${MACHINE_CPUARCH} == "mips" # mips[1234], mips32, mips64, and all later releases need to have mips Modified: head/share/mk/bsd.endian.mk ============================================================================== --- head/share/mk/bsd.endian.mk Tue Sep 22 23:39:14 2020 (r366031) +++ head/share/mk/bsd.endian.mk Tue Sep 22 23:49:30 2020 (r366032) @@ -4,6 +4,7 @@ ${MACHINE_ARCH} == "amd64" || \ ${MACHINE_ARCH} == "i386" || \ (${MACHINE} == "arm" && ${MACHINE_ARCH:Marm*eb*} == "") || \ + ${MACHINE_ARCH} == "powerpc64le" || \ ${MACHINE_CPUARCH} == "riscv" || \ ${MACHINE_ARCH:Mmips*el*} != "" TARGET_ENDIANNESS= 1234 Modified: head/share/mk/local.meta.sys.mk ============================================================================== --- head/share/mk/local.meta.sys.mk Tue Sep 22 23:39:14 2020 (r366031) +++ head/share/mk/local.meta.sys.mk Tue Sep 22 23:49:30 2020 (r366032) @@ -17,7 +17,7 @@ MK_INSTALL_AS_USER= yes TARGET_ARCHES_arm?= arm armv6 armv7 TARGET_ARCHES_arm64?= aarch64 TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32 mipsn32el -TARGET_ARCHES_powerpc?= powerpc powerpc64 powerpcspe +TARGET_ARCHES_powerpc?= powerpc powerpc64 powerpc64le powerpcspe TARGET_ARCHES_riscv?= riscv64 riscv64sf # some corner cases Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Tue Sep 22 23:39:14 2020 (r366031) +++ head/share/mk/src.opts.mk Tue Sep 22 23:49:30 2020 (r366032) @@ -354,14 +354,14 @@ BROKEN_OPTIONS+=MLX5TOOL BROKEN_OPTIONS+=HYPERV .endif -# NVME is only aarch64, x86 and powerpc64 +# NVME is only aarch64, x86 and powerpc64* .if ${__T} != "aarch64" && ${__T} != "amd64" && ${__T} != "i386" && \ - ${__T} != "powerpc64" + ${__T:Mpowerpc64*} == "" BROKEN_OPTIONS+=NVME .endif .if ${__T} == "aarch64" || ${__T} == "amd64" || ${__T} == "i386" || \ - ${__T} == "powerpc64" + ${__T:Mpowerpc64*} != "" __DEFAULT_YES_OPTIONS+=OPENMP .else __DEFAULT_NO_OPTIONS+=OPENMP Modified: head/share/mk/sys.mk ============================================================================== --- head/share/mk/sys.mk Tue Sep 22 23:39:14 2020 (r366031) +++ head/share/mk/sys.mk Tue Sep 22 23:49:30 2020 (r366032) @@ -13,7 +13,7 @@ unix ?= We run FreeBSD, not UNIX. # and/or endian. This is called MACHINE_CPU in NetBSD, but that's used # for something different in FreeBSD. # -__TO_CPUARCH=C/mips(n32|64)?(el)?(hf)?/mips/:C/arm(v[67])?(eb)?/arm/:C/powerpc(64|spe)/powerpc/:C/riscv64(sf)?/riscv/ +__TO_CPUARCH=C/mips(n32|64)?(el)?(hf)?/mips/:C/arm(v[67])?(eb)?/arm/:C/powerpc(64|64le|spe)/powerpc/:C/riscv64(sf)?/riscv/ MACHINE_CPUARCH=${MACHINE_ARCH:${__TO_CPUARCH}} .endif Modified: head/stand/defs.mk ============================================================================== --- head/stand/defs.mk Tue Sep 22 23:39:14 2020 (r366031) +++ head/stand/defs.mk Tue Sep 22 23:49:30 2020 (r366032) @@ -105,10 +105,10 @@ CFLAGS+= -DLOADER_DISK_SUPPORT # Machine specific flags for all builds here -# All PowerPC builds are 32 bit. We have no 64-bit loaders on powerpc -# or powerpc64. -.if ${MACHINE_ARCH} == "powerpc64" -CFLAGS+= -m32 -mcpu=powerpc +# Ensure PowerPC64 and PowerPC64LE boot loaders are compiled as 32 bit +# and in big endian. +.if ${MACHINE_ARCH:Mpowerpc64*} != "" +CFLAGS+= -m32 -mcpu=powerpc -mbig-endian .endif # For amd64, there's a bit of mixed bag. Some of the tree (i386, lib*32) is Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Tue Sep 22 23:39:14 2020 (r366031) +++ head/sys/conf/files.powerpc Tue Sep 22 23:49:30 2020 (r366032) @@ -93,7 +93,7 @@ dev/ofw/ofw_standard.c optional aim powerpc dev/ofw/ofw_subr.c standard dev/powermac_nvram/powermac_nvram.c optional powermac_nvram powermac dev/quicc/quicc_bfe_fdt.c optional quicc mpc85xx -dev/random/darn.c optional powerpc64 !random_loadable +dev/random/darn.c optional powerpc64 !random_loadable | powerpc64le !random_loadable dev/scc/scc_bfe_macio.c optional scc powermac dev/sdhci/fsl_sdhci.c optional mpc85xx sdhci dev/sec/sec.c optional sec mpc85xx @@ -136,10 +136,10 @@ powerpc/aim/locore.S optional aim no-obj powerpc/aim/aim_machdep.c optional aim powerpc/aim/mmu_oea.c optional aim powerpc powerpc/aim/mmu_oea64.c optional aim -powerpc/aim/mmu_radix.c optional aim powerpc64 +powerpc/aim/mmu_radix.c optional aim powerpc64 | aim powerpc64le powerpc/aim/moea64_native.c optional aim powerpc/aim/mp_cpudep.c optional aim -powerpc/aim/slb.c optional aim powerpc64 +powerpc/aim/slb.c optional aim powerpc64 | aim powerpc64le powerpc/amigaone/platform_amigaone.c optional amigaone powerpc/amigaone/cpld_a1222.c optional powerpc amigaone | powerpcspe amigaone powerpc/amigaone/cpld_x5000.c optional powerpc amigaone | powerpc64 amigaone @@ -153,7 +153,7 @@ powerpc/booke/spe.c optional powerpcspe powerpc/cpufreq/dfs.c optional cpufreq powerpc/cpufreq/mpc85xx_jog.c optional cpufreq mpc85xx powerpc/cpufreq/pcr.c optional cpufreq aim -powerpc/cpufreq/pmcr.c optional cpufreq aim powerpc64 +powerpc/cpufreq/pmcr.c optional cpufreq aim powerpc64 | cpufreq aim powerpc64le powerpc/cpufreq/pmufreq.c optional cpufreq aim pmu powerpc/fpu/fpu_add.c optional fpu_emu | powerpcspe powerpc/fpu/fpu_compare.c optional fpu_emu | powerpcspe @@ -192,10 +192,10 @@ powerpc/ofw/ofw_pcib_pci.c optional pci powerpc/ofw/ofw_real.c optional aim powerpc/ofw/ofw_syscons.c optional sc aim powerpc/ofw/ofwcall32.S optional aim powerpc -powerpc/ofw/ofwcall64.S optional aim powerpc64 +powerpc/ofw/ofwcall64.S optional aim powerpc64 | aim powerpc64le powerpc/ofw/openpic_ofw.c standard powerpc/ofw/rtas.c optional aim -powerpc/ofw/ofw_initrd.c optional md_root_mem powerpc64 +powerpc/ofw/ofw_initrd.c optional md_root_mem powerpc64 | md_root_mem powerpc64le powerpc/powermac/ata_kauai.c optional powermac ata | powermac atamacio powerpc/powermac/ata_macio.c optional powermac ata | powermac atamacio powerpc/powermac/ata_dbdma.c optional powermac ata | powermac atamacio @@ -236,21 +236,21 @@ powerpc/powernv/platform_powernv.c optional powernv powerpc/powernv/powernv_centaur.c optional powernv powerpc/powernv/powernv_xscom.c optional powernv powerpc/powernv/xive.c optional powernv -powerpc/powerpc/altivec.c optional powerpc | powerpc64 +powerpc/powerpc/altivec.c optional !powerpcspe powerpc/powerpc/autoconf.c standard powerpc/powerpc/bus_machdep.c standard powerpc/powerpc/busdma_machdep.c standard powerpc/powerpc/clock.c standard powerpc/powerpc/copyinout.c optional aim powerpc/powerpc/cpu.c standard -powerpc/powerpc/cpu_subr64.S optional powerpc64 +powerpc/powerpc/cpu_subr64.S optional powerpc64 | powerpc64le powerpc/powerpc/db_disasm.c optional ddb powerpc/powerpc/db_hwwatch.c optional ddb powerpc/powerpc/db_interface.c optional ddb powerpc/powerpc/db_trace.c optional ddb powerpc/powerpc/dump_machdep.c standard powerpc/powerpc/elf32_machdep.c optional powerpc | powerpcspe | compat_freebsd32 -powerpc/powerpc/elf64_machdep.c optional powerpc64 +powerpc/powerpc/elf64_machdep.c optional powerpc64 | powerpc64le powerpc/powerpc/exec_machdep.c standard powerpc/powerpc/fpu.c standard powerpc/powerpc/gdb_machdep.c optional gdb @@ -260,7 +260,7 @@ powerpc/powerpc/intr_machdep.c standard powerpc/powerpc/iommu_if.m standard powerpc/powerpc/machdep.c standard powerpc/powerpc/mem.c optional mem -powerpc/powerpc/minidump_machdep.c optional powerpc64 +powerpc/powerpc/minidump_machdep.c optional powerpc64 | powerpc64le powerpc/powerpc/mp_machdep.c optional smp powerpc/powerpc/nexus.c standard powerpc/powerpc/openpic.c standard @@ -272,11 +272,11 @@ powerpc/powerpc/ptrace_machdep.c standard powerpc/powerpc/sc_machdep.c optional sc powerpc/powerpc/setjmp.S standard powerpc/powerpc/sigcode32.S optional powerpc | powerpcspe | compat_freebsd32 -powerpc/powerpc/sigcode64.S optional powerpc64 +powerpc/powerpc/sigcode64.S optional powerpc64 | powerpc64le powerpc/powerpc/swtch32.S optional powerpc | powerpcspe -powerpc/powerpc/swtch64.S optional powerpc64 +powerpc/powerpc/swtch64.S optional powerpc64 | powerpc64le powerpc/powerpc/stack_machdep.c optional ddb | stack -powerpc/powerpc/support.S optional powerpc64 | booke +powerpc/powerpc/support.S optional powerpc64 | powerpc64le | booke powerpc/powerpc/syncicache.c standard powerpc/powerpc/sys_machdep.c standard powerpc/powerpc/trap.c standard @@ -294,19 +294,19 @@ powerpc/ps3/ps3disk.c optional ps3 powerpc/ps3/ps3pic.c optional ps3 powerpc/ps3/ps3_syscons.c optional ps3 vt powerpc/ps3/ps3-hvcall.S optional ps3 -powerpc/pseries/phyp-hvcall.S optional pseries powerpc64 -powerpc/pseries/mmu_phyp.c optional pseries powerpc64 -powerpc/pseries/phyp_console.c optional pseries powerpc64 uart -powerpc/pseries/phyp_dbg.c optional pseries powerpc64 gdb +powerpc/pseries/phyp-hvcall.S optional pseries powerpc64 | pseries powerpc64le +powerpc/pseries/mmu_phyp.c optional pseries powerpc64 | pseries powerpc64le +powerpc/pseries/phyp_console.c optional pseries powerpc64 uart | pseries powerpc64le uart +powerpc/pseries/phyp_dbg.c optional pseries powerpc64 gdb | pseries powerpc64le gdb powerpc/pseries/phyp_llan.c optional llan -powerpc/pseries/phyp_vscsi.c optional pseries powerpc64 scbus +powerpc/pseries/phyp_vscsi.c optional pseries powerpc64 scbus | pseries powerpc64le scbus powerpc/pseries/platform_chrp.c optional pseries -powerpc/pseries/plpar_iommu.c optional pseries powerpc64 -powerpc/pseries/plpar_pcibus.c optional pseries powerpc64 pci +powerpc/pseries/plpar_iommu.c optional pseries powerpc64 | pseries powerpc64le +powerpc/pseries/plpar_pcibus.c optional pseries powerpc64 pci | pseries powerpc64le pci powerpc/pseries/rtas_dev.c optional pseries powerpc/pseries/rtas_pci.c optional pseries pci -powerpc/pseries/vdevice.c optional pseries powerpc64 -powerpc/pseries/xics.c optional pseries powerpc64 +powerpc/pseries/vdevice.c optional pseries powerpc64 | pseries powerpc64le +powerpc/pseries/xics.c optional pseries powerpc64 | pseries powerpc64le powerpc/psim/iobus.c optional psim powerpc/psim/ata_iobus.c optional ata psim powerpc/psim/openpic_iobus.c optional psim Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Tue Sep 22 23:39:14 2020 (r366031) +++ head/sys/conf/kern.mk Tue Sep 22 23:49:30 2020 (r366032) @@ -185,7 +185,7 @@ CFLAGS.gcc+= -mno-spe # Use dot symbols (or, better, the V2 ELF ABI) on powerpc64 to make # DDB happy. ELFv2, if available, has some other efficiency benefits. # -.if ${MACHINE_ARCH} == "powerpc64" +.if ${MACHINE_ARCH:Mpowerpc64*} != "" CFLAGS+= -mabi=elfv2 .endif @@ -307,6 +307,7 @@ LD_EMULATION_mipsn32el= elf32btsmipn32_fbsd # I don' LD_EMULATION_powerpc= elf32ppc_fbsd LD_EMULATION_powerpcspe= elf32ppc_fbsd LD_EMULATION_powerpc64= elf64ppc_fbsd +LD_EMULATION_powerpc64le= elf64lppc_fbsd LD_EMULATION_riscv64= elf64lriscv LD_EMULATION_riscv64sf= elf64lriscv LD_EMULATION=${LD_EMULATION_${MACHINE_ARCH}} Added: head/sys/conf/ldscript.powerpc64le ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/conf/ldscript.powerpc64le Tue Sep 22 23:49:30 2020 (r366032) @@ -0,0 +1,180 @@ +/* $FreeBSD$ */ + +OUTPUT_FORMAT("elf64-powerpcle-freebsd", "elf64-powerpcle-freebsd", + "elf64-powerpcle-freebsd") +OUTPUT_ARCH(powerpc:common64) +ENTRY(__start) +SEARCH_DIR(/usr/lib); +PROVIDE (__stack = 0); +PHDRS +{ + text PT_LOAD ; + dynamic PT_DYNAMIC ; +} +SECTIONS +{ + + /* Low-address wrapper for bootloaders (kexec/kboot) that can't parse ELF */ + . = kernbase - 0x100; + .kboot : { *(.text.kboot) } :text + + /* Read-only sections, merged into text segment: */ + . = kernbase; + PROVIDE (begin = .); + + .text : + { + *(.glink) + *(.text) + *(.stub) + /* .gnu.warning sections are handled specially by elf32.em. */ + *(.gnu.warning) + *(.gnu.linkonce.t*) + } =0 + _etext = .; + PROVIDE (etext = .); + + /* Do not emit PT_INTERP section, which confuses some loaders (kexec-lite) */ + /DISCARD/ : { *(.interp) } + + /* Also delete notes */ + /DISCARD/ : { *(.note.*) } + + .hash : { *(.hash) } + .dynsym : { *(.dynsym) } + .dynstr : { *(.dynstr) } + .gnu.version : { *(.gnu.version) } + .gnu.version_d : { *(.gnu.version_d) } + .gnu.version_r : { *(.gnu.version_r) } + .note.gnu.build-id : { + PROVIDE (__build_id_start = .); + *(.note.gnu.build-id) + PROVIDE (__build_id_end = .); + } + .rela.text : + { *(.rela.text) *(.rela.gnu.linkonce.t*) } + .rela.data : + { *(.rela.data) *(.rela.gnu.linkonce.d*) } + .rela.rodata : + { *(.rela.rodata) *(.rela.gnu.linkonce.r*) } + .rela.got : { *(.rela.got) } + .rela.got1 : { *(.rela.got1) } + .rela.got2 : { *(.rela.got2) } + .rela.ctors : { *(.rela.ctors) } + .rela.dtors : { *(.rela.dtors) } + .rela.init : { *(.rela.init) } + .rela.fini : { *(.rela.fini) } + .rela.bss : { *(.rela.bss) } + .rela.plt : { *(.rela.plt) } + .rela.sdata : { *(.rela.sdata) } + .rela.sbss : { *(.rela.sbss) } + .rela.sdata2 : { *(.rela.sdata2) } + .rela.sbss2 : { *(.rela.sbss2) } + + .init : { *(.init) } =0 + .fini : { *(.fini) } =0 + .rodata : { *(.rodata) *(.gnu.linkonce.r*) } + .rodata1 : { *(.rodata1) } + .sdata2 : { *(.sdata2) } + .sbss2 : { *(.sbss2) } + /* Adjust the address for the data segment to the next page up. */ + . = ALIGN(4096); + .data.read_frequently : + { + *(SORT_BY_ALIGNMENT(.data.read_frequently)) + } + .data.read_mostly : + { + *(.data.read_mostly) + } + . = ALIGN(128); + .data.exclusive_cache_line : + { + *(.data.exclusive_cache_line) + } + . = ALIGN(128); + .data : + { + *(.data) + *(.gnu.linkonce.d*) + } + .data1 : { *(.data1) } + .toc1 : ALIGN(8) { *(.toc1) } + .opd : ALIGN(8) { KEEP (*(.opd)) } + .branch_lt : ALIGN(8) { *(.branch_lt) } + . = ALIGN(4096); + .got : ALIGN(8) { __tocbase = .; *(.got) } + .toc : ALIGN(8) { *(.toc) } + + .dynamic : { *(.dynamic) } :text :dynamic + /* Put .ctors and .dtors next to the .got2 section, so that the pointers + get relocated with -mrelocatable. Also put in the .fixup pointers. + The current compiler no longer needs this, but keep it around for 2.7.2 */ + PROVIDE (_GOT2_START_ = .); + .got2 : { *(.got2) } + PROVIDE (__CTOR_LIST__ = .); + .ctors : { *(.ctors) } + PROVIDE (__CTOR_END__ = .); + PROVIDE (__DTOR_LIST__ = .); + .dtors : { *(.dtors) } + PROVIDE (__DTOR_END__ = .); + PROVIDE (_FIXUP_START_ = .); + .fixup : { *(.fixup) } + PROVIDE (_FIXUP_END_ = .); + PROVIDE (_GOT2_END_ = .); + /* We want the small data sections together, so single-instruction offsets + can access them all, and initialized data all before uninitialized, so + we can shorten the on-disk segment size. */ + .sdata : { *(.sdata) } + _edata = .; + PROVIDE (edata = .); + .sbss : + { + PROVIDE (__sbss_start = .); + *(.sbss) + *(.scommon) + *(.dynsbss) + PROVIDE (__sbss_end = .); + } + .plt : { *(.plt) } + .iplt : { *(.iplt) } + .bss : + { + PROVIDE (__bss_start = .); + *(.dynbss) + *(.bss) + *(COMMON) + } + _end = . ; + PROVIDE (end = .); + /* Stabs debugging sections. */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + /* DWARF debug sections. + Symbols in the DWARF debugging sections are relative to the beginning + of the section so we begin them at 0. */ + /* DWARF 1 */ + .debug 0 : { *(.debug) } + .line 0 : { *(.line) } + /* GNU DWARF 1 extensions */ + .debug_srcinfo 0 : { *(.debug_srcinfo) } + .debug_sfnames 0 : { *(.debug_sfnames) } + /* DWARF 1.1 and DWARF 2 */ + .debug_aranges 0 : { *(.debug_aranges) } + .debug_pubnames 0 : { *(.debug_pubnames) } + /* DWARF 2 */ + .debug_info 0 : { *(.debug_info) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_line 0 : { *(.debug_line) } + .debug_frame 0 : { *(.debug_frame) } + .debug_str 0 : { *(.debug_str) } + .debug_loc 0 : { *(.debug_loc) } + .debug_macinfo 0 : { *(.debug_macinfo) } + /* SGI/MIPS DWARF 2 extensions */ + .debug_weaknames 0 : { *(.debug_weaknames) } + .debug_funcnames 0 : { *(.debug_funcnames) } + .debug_typenames 0 : { *(.debug_typenames) } + .debug_varnames 0 : { *(.debug_varnames) } + /* These must appear regardless of . */ +} + Modified: head/sys/conf/options.powerpc ============================================================================== --- head/sys/conf/options.powerpc Tue Sep 22 23:39:14 2020 (r366031) +++ head/sys/conf/options.powerpc Tue Sep 22 23:49:30 2020 (r366032) @@ -8,6 +8,7 @@ CELL POWERPC POWERPC64 +POWERPC64LE POWERPCSPE FPU_EMU Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Tue Sep 22 23:39:14 2020 (r366031) +++ head/sys/modules/Makefile Tue Sep 22 23:49:30 2020 (r366032) @@ -779,7 +779,7 @@ _wi= wi _virtio= virtio .endif -.if ${MACHINE_ARCH} == "powerpc64" +.if ${MACHINE_ARCH:Mpowerpc64*} != "" _ipmi= ipmi _ixl= ixl _nvram= opal_nvram Modified: head/sys/powerpc/include/param.h ============================================================================== --- head/sys/powerpc/include/param.h Tue Sep 22 23:39:14 2020 (r366031) +++ head/sys/powerpc/include/param.h Tue Sep 22 23:49:30 2020 (r366032) @@ -57,7 +57,11 @@ #endif #ifndef MACHINE_ARCH #ifdef __powerpc64__ +#if defined(__LITTLE_ENDIAN__) +#define MACHINE_ARCH "powerpc64le" +#else #define MACHINE_ARCH "powerpc64" +#endif #else #ifdef __SPE__ #define MACHINE_ARCH "powerpcspe" From owner-svn-src-head@freebsd.org Tue Sep 22 23:55:35 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E804A3E497E; Tue, 22 Sep 2020 23:55:35 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwyqW5vgYz3dqq; Tue, 22 Sep 2020 23:55:35 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A993D277A6; Tue, 22 Sep 2020 23:55:35 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08MNtZ6W009952; Tue, 22 Sep 2020 23:55:35 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08MNtYOt009947; Tue, 22 Sep 2020 23:55:34 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202009222355.08MNtYOt009947@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Tue, 22 Sep 2020 23:55:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366033 - in head/sys/powerpc: aim ofw pseries X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: in head/sys/powerpc: aim ofw pseries X-SVN-Commit-Revision: 366033 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 23:55:36 -0000 Author: bdragon Date: Tue Sep 22 23:55:34 2020 New Revision: 366033 URL: https://svnweb.freebsd.org/changeset/base/366033 Log: [PowerPC64LE] LE bringup work: locore / machdep / platform This is the initial LE changes required in the machdep code to get as far as platform attachment on qemu pseries. Sponsored by: Tag1 Consulting, Inc. Modified: head/sys/powerpc/aim/aim_machdep.c head/sys/powerpc/aim/locore64.S head/sys/powerpc/ofw/ofw_machdep.c head/sys/powerpc/ofw/ofwcall64.S head/sys/powerpc/pseries/platform_chrp.c Modified: head/sys/powerpc/aim/aim_machdep.c ============================================================================== --- head/sys/powerpc/aim/aim_machdep.c Tue Sep 22 23:49:30 2020 (r366032) +++ head/sys/powerpc/aim/aim_machdep.c Tue Sep 22 23:55:34 2020 (r366033) @@ -61,6 +61,7 @@ __FBSDID("$FreeBSD$"); #include "opt_kstack_pages.h" #include "opt_platform.h" +#include #include #include #include @@ -257,6 +258,11 @@ aim_cpu_init(vm_offset_t toc) psl_kernset |= PSL_SF; if (mfmsr() & PSL_HV) psl_kernset |= PSL_HV; + +#if BYTE_ORDER == LITTLE_ENDIAN + psl_kernset |= PSL_LE; +#endif + #endif psl_userset = psl_kernset | PSL_PR; #ifdef __powerpc64__ Modified: head/sys/powerpc/aim/locore64.S ============================================================================== --- head/sys/powerpc/aim/locore64.S Tue Sep 22 23:49:30 2020 (r366032) +++ head/sys/powerpc/aim/locore64.S Tue Sep 22 23:55:34 2020 (r366033) @@ -133,7 +133,11 @@ btext: * r7: Magic cookie (0xfb5d104d) to indicate that r6 has loader metadata */ .text -ASENTRY_NOPROF(__start) +_NAKED_ENTRY(__start) + +#ifdef __LITTLE_ENDIAN__ + RETURN_TO_NATIVE_ENDIAN +#endif /* Set 64-bit mode if not yet set before branching to C */ mfmsr %r20 li %r21,1 Modified: head/sys/powerpc/ofw/ofw_machdep.c ============================================================================== --- head/sys/powerpc/ofw/ofw_machdep.c Tue Sep 22 23:49:30 2020 (r366032) +++ head/sys/powerpc/ofw/ofw_machdep.c Tue Sep 22 23:55:34 2020 (r366033) @@ -572,6 +572,10 @@ OF_initial_setup(void *fdt_ptr, void *junk, int (*open ofmsr[0] = mfmsr(); #ifdef __powerpc64__ ofmsr[0] &= ~PSL_SF; + #ifdef __LITTLE_ENDIAN__ + /* Assume OFW is BE. */ + ofmsr[0] &= ~PSL_LE; + #endif #else __asm __volatile("mfsprg0 %0" : "=&r"(ofmsr[1])); #endif @@ -645,7 +649,7 @@ OF_bootstrap() * of its auto-remapping function once the kernel is loaded. * This is a dirty hack, but what we have. */ -#ifdef _LITTLE_ENDIAN +#ifdef __LITTLE_ENDIAN__ fdt_bt = &bs_le_tag; #else fdt_bt = &bs_be_tag; Modified: head/sys/powerpc/ofw/ofwcall64.S ============================================================================== --- head/sys/powerpc/ofw/ofwcall64.S Tue Sep 22 23:49:30 2020 (r366032) +++ head/sys/powerpc/ofw/ofwcall64.S Tue Sep 22 23:55:34 2020 (r366033) @@ -113,6 +113,7 @@ ASENTRY_NOPROF(ofwcall) /* * Set the MSR to the OF value. This has the side effect of disabling * exceptions, which is important for the next few steps. + * This does NOT, however, cause us to switch endianness. */ addis %r5,%r2,TOC_REF(ofmsr)@ha @@ -138,9 +139,28 @@ ASENTRY_NOPROF(ofwcall) stw %r5,4(%r1) stw %r5,0(%r1) +#ifdef __LITTLE_ENDIAN__ + /* Atomic context switch w/ endian change */ + mtmsrd %r5, 1 /* Clear PSL_EE|PSL_RI */ + addis %r5,%r2,TOC_REF(ofmsr)@ha + ld %r5,TOC_REF(ofmsr)@l(%r5) + ld %r5,0(%r5) + mtsrr0 %r4 + mtsrr1 %r5 + LOAD_LR_NIA +1: + mflr %r5 + addi %r5, %r5, (2f-1b) + mtlr %r5 + li %r5, 0 + rfid +2: + RETURN_TO_NATIVE_ENDIAN +#else /* Finally, branch to OF */ mtctr %r4 bctrl +#endif /* Reload stack pointer, MSR, and reference PC from the OFW stack */ ld %r7,32(%r1) Modified: head/sys/powerpc/pseries/platform_chrp.c ============================================================================== --- head/sys/powerpc/pseries/platform_chrp.c Tue Sep 22 23:49:30 2020 (r366032) +++ head/sys/powerpc/pseries/platform_chrp.c Tue Sep 22 23:55:34 2020 (r366033) @@ -30,6 +30,7 @@ #include __FBSDID("$FreeBSD$"); +#include #include #include #include @@ -414,7 +415,7 @@ chrp_cpuref_init(void) /* /chosen/cpu */ if (OF_getproplen(chosen, "cpu") == sizeof(ihandle_t)) { OF_getprop(chosen, "cpu", &ibsp, sizeof(ibsp)); - pbsp = OF_instance_to_package(ibsp); + pbsp = OF_instance_to_package(be32toh(ibsp)); if (pbsp != -1) get_cpu_reg(pbsp, &bsp_reg); } From owner-svn-src-head@freebsd.org Tue Sep 22 23:59:03 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 12DD43E48F1; Tue, 22 Sep 2020 23:59:03 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwyvW036Vz3dxk; Tue, 22 Sep 2020 23:59:03 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BBC742776B; Tue, 22 Sep 2020 23:59:02 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08MNx26l010173; Tue, 22 Sep 2020 23:59:02 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08MNx2wq010172; Tue, 22 Sep 2020 23:59:02 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202009222359.08MNx2wq010172@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Tue, 22 Sep 2020 23:59:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366034 - head/sys/powerpc/ofw X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: head/sys/powerpc/ofw X-SVN-Commit-Revision: 366034 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 22 Sep 2020 23:59:03 -0000 Author: bdragon Date: Tue Sep 22 23:59:02 2020 New Revision: 366034 URL: https://svnweb.freebsd.org/changeset/base/366034 Log: [PowerPC64LE] Fix endian dependence of ofw_real.c. Since OFW always runs in big endian in practice, we need to convert several bits back and forth. This is necessary to communicate with SLOF on LE pseries. Sponsored by: Tag1 Consulting, Inc. Modified: head/sys/powerpc/ofw/ofw_real.c Modified: head/sys/powerpc/ofw/ofw_real.c ============================================================================== --- head/sys/powerpc/ofw/ofw_real.c Tue Sep 22 23:55:34 2020 (r366033) +++ head/sys/powerpc/ofw/ofw_real.c Tue Sep 22 23:59:02 2020 (r366034) @@ -60,6 +60,7 @@ #include __FBSDID("$FreeBSD$"); +#include #include #include #include @@ -168,6 +169,9 @@ static caddr_t of_bounce_virt; static off_t of_bounce_offset; static size_t of_bounce_size; +#define IN(x) htobe32(x) +#define OUT(x) be32toh(x) + /* * To be able to use OFW console on PPC, that requires real mode OFW, * the mutex that guards the mapping/unmapping of virtual to physical @@ -406,13 +410,13 @@ ofw_real_test(ofw_t ofw, const char *name) cell_t missing; } args; - args.name = (cell_t)(uintptr_t)"test"; - args.nargs = 1; - args.nreturns = 1; + args.name = IN((cell_t)(uintptr_t)"test"); + args.nargs = IN(1); + args.nreturns = IN(1); ofw_real_start(); - args.service = ofw_real_map(name, strlen(name) + 1); + args.service = IN(ofw_real_map(name, strlen(name) + 1)); argsptr = ofw_real_map(&args, sizeof(args)); if (args.service == 0 || openfirmware((void *)argsptr) == -1) { ofw_real_stop(); @@ -420,7 +424,7 @@ ofw_real_test(ofw_t ofw, const char *name) } ofw_real_unmap(argsptr, &args, sizeof(args)); ofw_real_stop(); - return (args.missing); + return (OUT(args.missing)); } /* @@ -440,11 +444,11 @@ ofw_real_peer(ofw_t ofw, phandle_t node) cell_t next; } args; - args.name = (cell_t)(uintptr_t)"peer"; - args.nargs = 1; - args.nreturns = 1; + args.name = IN((cell_t)(uintptr_t)"peer"); + args.nargs = IN(1); + args.nreturns = IN(1); - args.node = node; + args.node = IN(node); ofw_real_start(); argsptr = ofw_real_map(&args, sizeof(args)); if (openfirmware((void *)argsptr) == -1) { @@ -453,7 +457,7 @@ ofw_real_peer(ofw_t ofw, phandle_t node) } ofw_real_unmap(argsptr, &args, sizeof(args)); ofw_real_stop(); - return (args.next); + return (OUT(args.next)); } /* Return the first child of this node or 0. */ @@ -469,11 +473,11 @@ ofw_real_child(ofw_t ofw, phandle_t node) cell_t child; } args; - args.name = (cell_t)(uintptr_t)"child"; - args.nargs = 1; - args.nreturns = 1; + args.name = IN((cell_t)(uintptr_t)"child"); + args.nargs = IN(1); + args.nreturns = IN(1); - args.node = node; + args.node = IN(node); ofw_real_start(); argsptr = ofw_real_map(&args, sizeof(args)); if (openfirmware((void *)argsptr) == -1) { @@ -482,7 +486,7 @@ ofw_real_child(ofw_t ofw, phandle_t node) } ofw_real_unmap(argsptr, &args, sizeof(args)); ofw_real_stop(); - return (args.child); + return (OUT(args.child)); } /* Return the parent of this node or 0. */ @@ -498,11 +502,11 @@ ofw_real_parent(ofw_t ofw, phandle_t node) cell_t parent; } args; - args.name = (cell_t)(uintptr_t)"parent"; - args.nargs = 1; - args.nreturns = 1; + args.name = IN((cell_t)(uintptr_t)"parent"); + args.nargs = IN(1); + args.nreturns = IN(1); - args.node = node; + args.node = IN(node); ofw_real_start(); argsptr = ofw_real_map(&args, sizeof(args)); if (openfirmware((void *)argsptr) == -1) { @@ -511,7 +515,7 @@ ofw_real_parent(ofw_t ofw, phandle_t node) } ofw_real_unmap(argsptr, &args, sizeof(args)); ofw_real_stop(); - return (args.parent); + return (OUT(args.parent)); } /* Return the package handle that corresponds to an instance handle. */ @@ -527,11 +531,11 @@ ofw_real_instance_to_package(ofw_t ofw, ihandle_t inst cell_t package; } args; - args.name = (cell_t)(uintptr_t)"instance-to-package"; - args.nargs = 1; - args.nreturns = 1; + args.name = IN((cell_t)(uintptr_t)"instance-to-package"); + args.nargs = IN(1); + args.nreturns = IN(1); - args.instance = instance; + args.instance = IN(instance); ofw_real_start(); argsptr = ofw_real_map(&args, sizeof(args)); if (openfirmware((void *)argsptr) == -1) { @@ -540,7 +544,7 @@ ofw_real_instance_to_package(ofw_t ofw, ihandle_t inst } ofw_real_unmap(argsptr, &args, sizeof(args)); ofw_real_stop(); - return (args.package); + return (OUT(args.package)); } /* Get the length of a property of a package. */ @@ -557,14 +561,14 @@ ofw_real_getproplen(ofw_t ofw, phandle_t package, cons int32_t proplen; } args; - args.name = (cell_t)(uintptr_t)"getproplen"; - args.nargs = 2; - args.nreturns = 1; + args.name = IN((cell_t)(uintptr_t)"getproplen"); + args.nargs = IN(2); + args.nreturns = IN(1); ofw_real_start(); - args.package = package; - args.propname = ofw_real_map(propname, strlen(propname) + 1); + args.package = IN(package); + args.propname = IN(ofw_real_map(propname, strlen(propname) + 1)); argsptr = ofw_real_map(&args, sizeof(args)); if (args.propname == 0 || openfirmware((void *)argsptr) == -1) { ofw_real_stop(); @@ -572,7 +576,7 @@ ofw_real_getproplen(ofw_t ofw, phandle_t package, cons } ofw_real_unmap(argsptr, &args, sizeof(args)); ofw_real_stop(); - return (args.proplen); + return ((ssize_t)(int32_t)OUT(args.proplen)); } /* Get the value of a property of a package. */ @@ -592,16 +596,16 @@ ofw_real_getprop(ofw_t ofw, phandle_t package, const c int32_t size; } args; - args.name = (cell_t)(uintptr_t)"getprop"; - args.nargs = 4; - args.nreturns = 1; + args.name = IN((cell_t)(uintptr_t)"getprop"); + args.nargs = IN(4); + args.nreturns = IN(1); ofw_real_start(); - args.package = package; - args.propname = ofw_real_map(propname, strlen(propname) + 1); - args.buf = ofw_real_map(buf, buflen); - args.buflen = buflen; + args.package = IN(package); + args.propname = IN(ofw_real_map(propname, strlen(propname) + 1)); + args.buf = IN(ofw_real_map(buf, buflen)); + args.buflen = IN(buflen); argsptr = ofw_real_map(&args, sizeof(args)); if (args.propname == 0 || args.buf == 0 || openfirmware((void *)argsptr) == -1) { @@ -609,10 +613,10 @@ ofw_real_getprop(ofw_t ofw, phandle_t package, const c return (-1); } ofw_real_unmap(argsptr, &args, sizeof(args)); - ofw_real_unmap(args.buf, buf, buflen); + ofw_real_unmap(OUT(args.buf), buf, buflen); ofw_real_stop(); - return (args.size); + return ((ssize_t)(int32_t)OUT(args.size)); } /* Get the next property of a package. */ @@ -631,25 +635,25 @@ ofw_real_nextprop(ofw_t ofw, phandle_t package, const cell_t flag; } args; - args.name = (cell_t)(uintptr_t)"nextprop"; - args.nargs = 3; - args.nreturns = 1; + args.name = IN((cell_t)(uintptr_t)"nextprop"); + args.nargs = IN(3); + args.nreturns = IN(1); ofw_real_start(); - args.package = package; - args.previous = ofw_real_map(previous, (previous != NULL) ? (strlen(previous) + 1) : 0); - args.buf = ofw_real_map(buf, size); + args.package = IN(package); + args.previous = IN(ofw_real_map(previous, (previous != NULL) ? (strlen(previous) + 1) : 0)); + args.buf = IN(ofw_real_map(buf, size)); argsptr = ofw_real_map(&args, sizeof(args)); if (args.buf == 0 || openfirmware((void *)argsptr) == -1) { ofw_real_stop(); return (-1); } ofw_real_unmap(argsptr, &args, sizeof(args)); - ofw_real_unmap(args.buf, buf, size); + ofw_real_unmap(OUT(args.buf), buf, size); ofw_real_stop(); - return (args.flag); + return (OUT(args.flag)); } /* Set the value of a property of a package. */ @@ -670,16 +674,16 @@ ofw_real_setprop(ofw_t ofw, phandle_t package, const c cell_t size; } args; - args.name = (cell_t)(uintptr_t)"setprop"; - args.nargs = 4; - args.nreturns = 1; + args.name = IN((cell_t)(uintptr_t)"setprop"); + args.nargs = IN(4); + args.nreturns = IN(1); ofw_real_start(); - args.package = package; - args.propname = ofw_real_map(propname, strlen(propname) + 1); - args.buf = ofw_real_map(buf, len); - args.len = len; + args.package = IN(package); + args.propname = IN(ofw_real_map(propname, strlen(propname) + 1)); + args.buf = IN(ofw_real_map(buf, len)); + args.len = IN(len); argsptr = ofw_real_map(&args, sizeof(args)); if (args.propname == 0 || args.buf == 0 || openfirmware((void *)argsptr) == -1) { @@ -688,7 +692,7 @@ ofw_real_setprop(ofw_t ofw, phandle_t package, const c } ofw_real_unmap(argsptr, &args, sizeof(args)); ofw_real_stop(); - return (args.size); + return (OUT(args.size)); } /* Convert a device specifier to a fully qualified pathname. */ @@ -706,15 +710,15 @@ ofw_real_canon(ofw_t ofw, const char *device, char *bu int32_t size; } args; - args.name = (cell_t)(uintptr_t)"canon"; - args.nargs = 3; - args.nreturns = 1; + args.name = IN((cell_t)(uintptr_t)"canon"); + args.nargs = IN(3); + args.nreturns = IN(1); ofw_real_start(); - args.device = ofw_real_map(device, strlen(device) + 1); - args.buf = ofw_real_map(buf, len); - args.len = len; + args.device = IN(ofw_real_map(device, strlen(device) + 1)); + args.buf = IN(ofw_real_map(buf, len)); + args.len = IN(len); argsptr = ofw_real_map(&args, sizeof(args)); if (args.device == 0 || args.buf == 0 || openfirmware((void *)argsptr) == -1) { @@ -722,10 +726,10 @@ ofw_real_canon(ofw_t ofw, const char *device, char *bu return (-1); } ofw_real_unmap(argsptr, &args, sizeof(args)); - ofw_real_unmap(args.buf, buf, len); + ofw_real_unmap(OUT(args.buf), buf, len); ofw_real_stop(); - return (args.size); + return ((ssize_t)(int32_t)OUT(args.size)); } /* Return a package handle for the specified device. */ @@ -741,13 +745,13 @@ ofw_real_finddevice(ofw_t ofw, const char *device) cell_t package; } args; - args.name = (cell_t)(uintptr_t)"finddevice"; - args.nargs = 1; - args.nreturns = 1; + args.name = IN((cell_t)(uintptr_t)"finddevice"); + args.nargs = IN(1); + args.nreturns = IN(1); ofw_real_start(); - args.device = ofw_real_map(device, strlen(device) + 1); + args.device = IN(ofw_real_map(device, strlen(device) + 1)); argsptr = ofw_real_map(&args, sizeof(args)); if (args.device == 0 || openfirmware((void *)argsptr) == -1) { @@ -756,7 +760,7 @@ ofw_real_finddevice(ofw_t ofw, const char *device) } ofw_real_unmap(argsptr, &args, sizeof(args)); ofw_real_stop(); - return (args.package); + return (OUT(args.package)); } /* Return the fully qualified pathname corresponding to an instance. */ @@ -774,15 +778,15 @@ ofw_real_instance_to_path(ofw_t ofw, ihandle_t instanc int32_t size; } args; - args.name = (cell_t)(uintptr_t)"instance-to-path"; - args.nargs = 3; - args.nreturns = 1; + args.name = IN((cell_t)(uintptr_t)"instance-to-path"); + args.nargs = IN(3); + args.nreturns = IN(1); ofw_real_start(); - args.instance = instance; - args.buf = ofw_real_map(buf, len); - args.len = len; + args.instance = IN(instance); + args.buf = IN(ofw_real_map(buf, len)); + args.len = IN(len); argsptr = ofw_real_map(&args, sizeof(args)); if (args.buf == 0 || openfirmware((void *)argsptr) == -1) { @@ -790,10 +794,10 @@ ofw_real_instance_to_path(ofw_t ofw, ihandle_t instanc return (-1); } ofw_real_unmap(argsptr, &args, sizeof(args)); - ofw_real_unmap(args.buf, buf, len); + ofw_real_unmap(OUT(args.buf), buf, len); ofw_real_stop(); - return (args.size); + return ((ssize_t)(int32_t)OUT(args.size)); } /* Return the fully qualified pathname corresponding to a package. */ @@ -811,15 +815,15 @@ ofw_real_package_to_path(ofw_t ofw, phandle_t package, int32_t size; } args; - args.name = (cell_t)(uintptr_t)"package-to-path"; - args.nargs = 3; - args.nreturns = 1; + args.name = IN((cell_t)(uintptr_t)"package-to-path"); + args.nargs = IN(3); + args.nreturns = IN(1); ofw_real_start(); - args.package = package; - args.buf = ofw_real_map(buf, len); - args.len = len; + args.package = IN(package); + args.buf = IN(ofw_real_map(buf, len)); + args.len = IN(len); argsptr = ofw_real_map(&args, sizeof(args)); if (args.buf == 0 || openfirmware((void *)argsptr) == -1) { @@ -827,10 +831,10 @@ ofw_real_package_to_path(ofw_t ofw, phandle_t package, return (-1); } ofw_real_unmap(argsptr, &args, sizeof(args)); - ofw_real_unmap(args.buf, buf, len); + ofw_real_unmap(OUT(args.buf), buf, len); ofw_real_stop(); - return (args.size); + return ((ssize_t)(int32_t)OUT(args.size)); } /* Call the method in the scope of a given instance. */ @@ -850,22 +854,22 @@ ofw_real_call_method(ofw_t ofw, ihandle_t instance, co cell_t *ap, *cp; int n; - args.name = (cell_t)(uintptr_t)"call-method"; - args.nargs = 2; - args.nreturns = 1; + args.name = IN((cell_t)(uintptr_t)"call-method"); + args.nargs = IN(2); + args.nreturns = IN(1); if (nargs > 6) return (-1); ofw_real_start(); - args.nargs = nargs + 2; - args.nreturns = nreturns + 1; - args.method = ofw_real_map(method, strlen(method) + 1); - args.instance = instance; + args.nargs = IN(nargs + 2); + args.nreturns = IN(nreturns + 1); + args.method = IN(ofw_real_map(method, strlen(method) + 1)); + args.instance = IN(instance); ap = args_and_returns; for (cp = args.args_n_results + (n = nargs); --n >= 0;) - *--cp = *(ap++); + *--cp = IN(*(ap++)); argsptr = ofw_real_map(&args, sizeof(args)); if (args.method == 0 || openfirmware((void *)argsptr) == -1) { @@ -874,10 +878,10 @@ ofw_real_call_method(ofw_t ofw, ihandle_t instance, co } ofw_real_unmap(argsptr, &args, sizeof(args)); ofw_real_stop(); - if (args.args_n_results[nargs]) - return (args.args_n_results[nargs]); - for (cp = args.args_n_results + nargs + (n = args.nreturns); --n > 0;) - *(ap++) = *--cp; + if (OUT(args.args_n_results[nargs])) + return (OUT(args.args_n_results[nargs])); + for (cp = args.args_n_results + nargs + (n = OUT(args.nreturns)); --n > 0;) + *(ap++) = OUT(*--cp); return (0); } @@ -894,12 +898,12 @@ ofw_real_interpret(ofw_t ofw, const char *cmd, int nre cell_t status; int i = 0, j = 0; - args.name = (cell_t)(uintptr_t)"interpret"; - args.nargs = 1; + args.name = IN((cell_t)(uintptr_t)"interpret"); + args.nargs = IN(1); ofw_real_start(); - args.nreturns = ++nreturns; - args.slot[i++] = ofw_real_map(cmd, strlen(cmd) + 1); + args.nreturns = IN(++nreturns); + args.slot[i++] = IN(ofw_real_map(cmd, strlen(cmd) + 1)); argsptr = ofw_real_map(&args, sizeof(args)); if (openfirmware((void *)argsptr) == -1) { ofw_real_stop(); @@ -907,9 +911,9 @@ ofw_real_interpret(ofw_t ofw, const char *cmd, int nre } ofw_real_unmap(argsptr, &args, sizeof(args)); ofw_real_stop(); - status = args.slot[i++]; + status = OUT(args.slot[i++]); while (i < 1 + nreturns) - returns[j++] = args.slot[i++]; + returns[j++] = OUT(args.slot[i++]); return (status); } @@ -930,13 +934,13 @@ ofw_real_open(ofw_t ofw, const char *device) cell_t instance; } args; - args.name = (cell_t)(uintptr_t)"open"; - args.nargs = 1; - args.nreturns = 1; + args.name = IN((cell_t)(uintptr_t)"open"); + args.nargs = IN(1); + args.nreturns = IN(1); ofw_real_start(); - args.device = ofw_real_map(device, strlen(device) + 1); + args.device = IN(ofw_real_map(device, strlen(device) + 1)); argsptr = ofw_real_map(&args, sizeof(args)); if (args.device == 0 || openfirmware((void *)argsptr) == -1 || args.instance == 0) { @@ -945,7 +949,7 @@ ofw_real_open(ofw_t ofw, const char *device) } ofw_real_unmap(argsptr, &args, sizeof(args)); ofw_real_stop(); - return (args.instance); + return (OUT(args.instance)); } /* Close an instance. */ @@ -960,10 +964,10 @@ ofw_real_close(ofw_t ofw, ihandle_t instance) cell_t instance; } args; - args.name = (cell_t)(uintptr_t)"close"; - args.nargs = 1; - args.nreturns = 0; - args.instance = instance; + args.name = IN((cell_t)(uintptr_t)"close"); + args.nargs = IN(1); + args.nreturns = IN(0); + args.instance = IN(instance); ofw_real_start(); argsptr = ofw_real_map(&args, sizeof(args)); openfirmware((void *)argsptr); @@ -985,25 +989,25 @@ ofw_real_read(ofw_t ofw, ihandle_t instance, void *add int32_t actual; } args; - args.name = (cell_t)(uintptr_t)"read"; - args.nargs = 3; - args.nreturns = 1; + args.name = IN((cell_t)(uintptr_t)"read"); + args.nargs = IN(3); + args.nreturns = IN(1); ofw_real_start(); - args.instance = instance; - args.addr = ofw_real_map(addr, len); - args.len = len; + args.instance = IN(instance); + args.addr = IN(ofw_real_map(addr, len)); + args.len = IN(len); argsptr = ofw_real_map(&args, sizeof(args)); if (args.addr == 0 || openfirmware((void *)argsptr) == -1) { ofw_real_stop(); return (-1); } ofw_real_unmap(argsptr, &args, sizeof(args)); - ofw_real_unmap(args.addr, addr, len); + ofw_real_unmap(OUT(args.addr), addr, len); ofw_real_stop(); - return (args.actual); + return ((ssize_t)(int32_t)OUT(args.actual)); } /* Write to an instance. */ @@ -1021,15 +1025,15 @@ ofw_real_write(ofw_t ofw, ihandle_t instance, const vo int32_t actual; } args; - args.name = (cell_t)(uintptr_t)"write"; - args.nargs = 3; - args.nreturns = 1; + args.name = IN((cell_t)(uintptr_t)"write"); + args.nargs = IN(3); + args.nreturns = IN(1); ofw_real_start(); - args.instance = instance; - args.addr = ofw_real_map(addr, len); - args.len = len; + args.instance = IN(instance); + args.addr = IN(ofw_real_map(addr, len)); + args.len = IN(len); argsptr = ofw_real_map(&args, sizeof(args)); if (args.addr == 0 || openfirmware((void *)argsptr) == -1) { ofw_real_stop(); @@ -1037,7 +1041,7 @@ ofw_real_write(ofw_t ofw, ihandle_t instance, const vo } ofw_real_unmap(argsptr, &args, sizeof(args)); ofw_real_stop(); - return (args.actual); + return ((ssize_t)(int32_t)OUT(args.actual)); } /* Seek to a position. */ @@ -1055,13 +1059,13 @@ ofw_real_seek(ofw_t ofw, ihandle_t instance, u_int64_t cell_t status; } args; - args.name = (cell_t)(uintptr_t)"seek"; - args.nargs = 3; - args.nreturns = 1; + args.name = IN((cell_t)(uintptr_t)"seek"); + args.nargs = IN(3); + args.nreturns = IN(1); - args.instance = instance; - args.poshi = pos >> 32; - args.poslo = pos; + args.instance = IN(instance); + args.poshi = IN(pos >> 32); + args.poslo = IN(pos); ofw_real_start(); argsptr = ofw_real_map(&args, sizeof(args)); if (openfirmware((void *)argsptr) == -1) { @@ -1070,7 +1074,7 @@ ofw_real_seek(ofw_t ofw, ihandle_t instance, u_int64_t } ofw_real_unmap(argsptr, &args, sizeof(args)); ofw_real_stop(); - return (args.status); + return (OUT(args.status)); } /* @@ -1092,13 +1096,13 @@ ofw_real_claim(ofw_t ofw, void *virt, size_t size, u_i cell_t baseaddr; } args; - args.name = (cell_t)(uintptr_t)"claim"; - args.nargs = 3; - args.nreturns = 1; + args.name = IN((cell_t)(uintptr_t)"claim"); + args.nargs = IN(3); + args.nreturns = IN(1); - args.virt = (cell_t)(uintptr_t)virt; - args.size = size; - args.align = align; + args.virt = IN((cell_t)(uintptr_t)virt); + args.size = IN(size); + args.align = IN(align); ofw_real_start(); argsptr = ofw_real_map(&args, sizeof(args)); if (openfirmware((void *)argsptr) == -1) { @@ -1107,7 +1111,7 @@ ofw_real_claim(ofw_t ofw, void *virt, size_t size, u_i } ofw_real_unmap(argsptr, &args, sizeof(args)); ofw_real_stop(); - return ((void *)(uintptr_t)args.baseaddr); + return ((void *)(uintptr_t)(OUT(args.baseaddr))); } /* Release an area of memory. */ @@ -1123,12 +1127,12 @@ ofw_real_release(ofw_t ofw, void *virt, size_t size) cell_t size; } args; - args.name = (cell_t)(uintptr_t)"release"; - args.nargs = 2; - args.nreturns = 0; + args.name = IN((cell_t)(uintptr_t)"release"); + args.nargs = IN(2); + args.nreturns = IN(0); - args.virt = (cell_t)(uintptr_t)virt; - args.size = size; + args.virt = IN((cell_t)(uintptr_t)virt); + args.size = IN(size); ofw_real_start(); argsptr = ofw_real_map(&args, sizeof(args)); openfirmware((void *)argsptr); @@ -1150,9 +1154,9 @@ ofw_real_enter(ofw_t ofw) cell_t nreturns; } args; - args.name = (cell_t)(uintptr_t)"enter"; - args.nargs = 0; - args.nreturns = 0; + args.name = IN((cell_t)(uintptr_t)"enter"); + args.nargs = IN(0); + args.nreturns = IN(0); ofw_real_start(); argsptr = ofw_real_map(&args, sizeof(args)); @@ -1172,9 +1176,9 @@ ofw_real_exit(ofw_t ofw) cell_t nreturns; } args; - args.name = (cell_t)(uintptr_t)"exit"; - args.nargs = 0; - args.nreturns = 0; + args.name = IN((cell_t)(uintptr_t)"exit"); + args.nargs = IN(0); + args.nreturns = IN(0); ofw_real_start(); argsptr = ofw_real_map(&args, sizeof(args)); From owner-svn-src-head@freebsd.org Wed Sep 23 00:03:36 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 529CF3E4FD2; Wed, 23 Sep 2020 00:03:36 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bwz0m1NpFz3fTj; Wed, 23 Sep 2020 00:03:36 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1380827C08; Wed, 23 Sep 2020 00:03:36 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08N03ZPX016059; Wed, 23 Sep 2020 00:03:35 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08N03ZH7016057; Wed, 23 Sep 2020 00:03:35 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202009230003.08N03ZH7016057@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Wed, 23 Sep 2020 00:03:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366035 - head/sys/powerpc/pseries X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: head/sys/powerpc/pseries X-SVN-Commit-Revision: 366035 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 00:03:36 -0000 Author: bdragon Date: Wed Sep 23 00:03:35 2020 New Revision: 366035 URL: https://svnweb.freebsd.org/changeset/base/366035 Log: [PowerPC64LE] Tell the hypervisor to switch interrupts to LE at CHRP attach. Since we will need to be able to take traps relatively early in the process, ensure that the hypervisor changes our ILE for us as soon as we are ready. Sponsored by: Tag1 Consulting, Inc. Modified: head/sys/powerpc/pseries/phyp-hvcall.h head/sys/powerpc/pseries/platform_chrp.c Modified: head/sys/powerpc/pseries/phyp-hvcall.h ============================================================================== --- head/sys/powerpc/pseries/phyp-hvcall.h Tue Sep 22 23:59:02 2020 (r366034) +++ head/sys/powerpc/pseries/phyp-hvcall.h Wed Sep 23 00:03:35 2020 (r366035) @@ -170,6 +170,13 @@ #define H_PP1 (1UL<<(63-62)) #define H_PP2 (1UL<<(63-63)) +/* H_SET_MODE resource identifiers from 14.5.4.3.5. */ +#define H_SET_MODE_RSRC_CIABR 0x1 /* All versions */ +#define H_SET_MODE_RSRC_DAWR0 0x2 /* All versions */ +#define H_SET_MODE_RSRC_INTR_TRANS_MODE 0x3 /* All versions */ +#define H_SET_MODE_RSRC_ILE 0x4 /* PAPR 2.8 / ISA 2.07 */ +#define H_SET_MODE_RSRC_DAWR1 0x5 /* ISA 3.1 Future support */ + /* pSeries hypervisor opcodes. */ #define H_REMOVE 0x04 #define H_ENTER 0x08 Modified: head/sys/powerpc/pseries/platform_chrp.c ============================================================================== --- head/sys/powerpc/pseries/platform_chrp.c Tue Sep 22 23:59:02 2020 (r366034) +++ head/sys/powerpc/pseries/platform_chrp.c Wed Sep 23 00:03:35 2020 (r366035) @@ -136,6 +136,9 @@ chrp_attach(platform_t plat) int quiesce; #ifdef __powerpc64__ int i; +#if BYTE_ORDER == LITTLE_ENDIAN + int result; +#endif /* XXX: check for /rtas/ibm,hypertas-functions? */ if (!(mfmsr() & PSL_HV)) { @@ -171,6 +174,24 @@ chrp_attach(platform_t plat) /* Set up hypervisor CPU stuff */ chrp_smp_ap_init(plat); + +#if BYTE_ORDER == LITTLE_ENDIAN + /* + * Ask the hypervisor to update the LPAR ILE bit. + * + * This involves all processors reentering the hypervisor + * so the change appears simultaneously in all processors. + * This can take a long time. + */ + for(;;) { + result = phyp_hcall(H_SET_MODE, 1UL, + H_SET_MODE_RSRC_ILE, 0, 0); + if (result == H_SUCCESS) + break; + DELAY(1000); + } +#endif + } #endif chrp_cpuref_init(); From owner-svn-src-head@freebsd.org Wed Sep 23 00:06:48 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EB1243E57DF; Wed, 23 Sep 2020 00:06:48 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bwz4S5j20z3fT5; Wed, 23 Sep 2020 00:06:48 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A550727B1F; Wed, 23 Sep 2020 00:06:48 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08N06mxh016263; Wed, 23 Sep 2020 00:06:48 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08N06mFx016261; Wed, 23 Sep 2020 00:06:48 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202009230006.08N06mFx016261@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Wed, 23 Sep 2020 00:06:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366036 - in head/sys/powerpc: powernv pseries X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: in head/sys/powerpc: powernv pseries X-SVN-Commit-Revision: 366036 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 00:06:49 -0000 Author: bdragon Date: Wed Sep 23 00:06:48 2020 New Revision: 366036 URL: https://svnweb.freebsd.org/changeset/base/366036 Log: [PowerPC64LE] Fix endianness issues in phyp and opal consoles. This applies to both pseries and powernv, which were tested at different points during the patchset development. Sponsored by: Tag1 Consulting, Inc. Modified: head/sys/powerpc/powernv/opal_console.c head/sys/powerpc/pseries/phyp_console.c Modified: head/sys/powerpc/powernv/opal_console.c ============================================================================== --- head/sys/powerpc/powernv/opal_console.c Wed Sep 23 00:03:35 2020 (r366035) +++ head/sys/powerpc/powernv/opal_console.c Wed Sep 23 00:06:48 2020 (r366036) @@ -25,6 +25,7 @@ #include __FBSDID("$FreeBSD$"); +#include #include #include #include @@ -323,7 +324,7 @@ uart_opal_get(struct uart_opal_softc *sc, void *buffer int hdr = 0; if (sc->protocol == OPAL_RAW) { - uint64_t len = bufsize; + uint64_t len = htobe64(bufsize); uint64_t olen = (uint64_t)&len; uint64_t obuf = (uint64_t)buffer; @@ -336,7 +337,7 @@ uart_opal_get(struct uart_opal_softc *sc, void *buffer if (err != OPAL_SUCCESS) return (-1); - bufsize = len; + bufsize = be64toh(len); } else { uart_lock(&sc->sc_mtx); if (sc->inbuflen == 0) { @@ -347,6 +348,7 @@ uart_opal_get(struct uart_opal_softc *sc, void *buffer return (-1); } hdr = 1; + sc->inbuflen = be64toh(sc->inbuflen); } if (sc->inbuflen == 0) { @@ -391,7 +393,9 @@ uart_opal_put(struct uart_opal_softc *sc, void *buffer len = bufsize; uart_opal_real_map_outbuffer(&obuf, &olen); + *(uint64_t*)olen = htobe64(*(uint64_t*)olen); err = opal_call(OPAL_CONSOLE_WRITE, sc->vtermid, olen, obuf); + *(uint64_t*)olen = be64toh(*(uint64_t*)olen); uart_opal_real_unmap_outbuffer(&len); } else { uart_lock(&sc->sc_mtx); @@ -406,7 +410,9 @@ uart_opal_put(struct uart_opal_softc *sc, void *buffer len = 4 + bufsize; uart_opal_real_map_outbuffer(&obuf, &olen); + *(uint64_t*)olen = htobe64(*(uint64_t*)olen); err = opal_call(OPAL_CONSOLE_WRITE, sc->vtermid, olen, obuf); + *(uint64_t*)olen = be64toh(*(uint64_t*)olen); uart_opal_real_unmap_outbuffer(&len); uart_unlock(&sc->sc_mtx); Modified: head/sys/powerpc/pseries/phyp_console.c ============================================================================== --- head/sys/powerpc/pseries/phyp_console.c Wed Sep 23 00:03:35 2020 (r366035) +++ head/sys/powerpc/pseries/phyp_console.c Wed Sep 23 00:06:48 2020 (r366036) @@ -27,6 +27,7 @@ #include __FBSDID("$FreeBSD$"); +#include #include #include #include @@ -306,6 +307,11 @@ uart_phyp_get(struct uart_phyp_softc *sc, void *buffer return (0); } +#if BYTE_ORDER == LITTLE_ENDIAN + sc->phyp_inbuf.u64[0] = be64toh(sc->phyp_inbuf.u64[0]); + sc->phyp_inbuf.u64[1] = be64toh(sc->phyp_inbuf.u64[1]); +#endif + if ((sc->protocol == HVTERMPROT) && (hdr == 1)) { sc->inbuflen = sc->inbuflen - 4; /* The VTERM protocol has a 4 byte header, skip it here. */ @@ -380,8 +386,8 @@ uart_phyp_put(struct uart_phyp_softc *sc, void *buffer } do { - err = phyp_hcall(H_PUT_TERM_CHAR, sc->vtermid, len, cbuf.u64[0], - cbuf.u64[1]); + err = phyp_hcall(H_PUT_TERM_CHAR, sc->vtermid, len, htobe64(cbuf.u64[0]), + htobe64(cbuf.u64[1])); DELAY(100); } while (err == H_BUSY); From owner-svn-src-head@freebsd.org Wed Sep 23 00:09:30 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AB9E23E5858; Wed, 23 Sep 2020 00:09:30 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bwz7Z3sDgz3fjL; Wed, 23 Sep 2020 00:09:30 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 692F72784A; Wed, 23 Sep 2020 00:09:30 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08N09Uae016449; Wed, 23 Sep 2020 00:09:30 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08N09ThC016444; Wed, 23 Sep 2020 00:09:29 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202009230009.08N09ThC016444@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Wed, 23 Sep 2020 00:09:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366037 - in head/sys: conf powerpc/conf powerpc/ofw powerpc/powernv X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: in head/sys: conf powerpc/conf powerpc/ofw powerpc/powernv X-SVN-Commit-Revision: 366037 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 00:09:30 -0000 Author: bdragon Date: Wed Sep 23 00:09:29 2020 New Revision: 366037 URL: https://svnweb.freebsd.org/changeset/base/366037 Log: [PowerPC64LE] Work around qemu TCG bug in mtmsrd emulation. The TCG implementation of mtmsrd in qemu blindly copies the entire register to the MSR, instead of the specific bit positions listed in the ISA. This means that qemu will prematurely switch endian out from under the running code instead of waiting for the rfid, causing an immediate trap as it attempts to interpret the next instruction in the wrong endianness. To work around this, ensure PSL_LE is still set before doing the mtmsrd. In the future, we may wish to just turn off translation and unconditionally use rfid to switch to the ofmsr instead of quasi-switching to the ofmsr. Add a new platform option so this can be disabled. (And so that we can conditonalize additional QEMU-specific hacks in the platform code.) Sponsored by: Tag1 Consulting, Inc. Modified: head/sys/conf/options.powerpc head/sys/powerpc/conf/GENERIC64 head/sys/powerpc/conf/NOTES head/sys/powerpc/ofw/ofwcall64.S head/sys/powerpc/powernv/opalcall.S Modified: head/sys/conf/options.powerpc ============================================================================== --- head/sys/conf/options.powerpc Wed Sep 23 00:06:48 2020 (r366036) +++ head/sys/conf/options.powerpc Wed Sep 23 00:09:29 2020 (r366037) @@ -29,6 +29,7 @@ MAMBO POWERNV opt_platform.h PSERIES PSIM +QEMU opt_platform.h SC_OFWFB opt_ofwfb.h Modified: head/sys/powerpc/conf/GENERIC64 ============================================================================== --- head/sys/powerpc/conf/GENERIC64 Wed Sep 23 00:06:48 2020 (r366036) +++ head/sys/powerpc/conf/GENERIC64 Wed Sep 23 00:09:29 2020 (r366037) @@ -30,6 +30,7 @@ makeoptions WITH_CTF=1 options POWERMAC #NewWorld Apple PowerMacs options PS3 #Sony Playstation 3 options MAMBO #IBM Mambo Full System Simulator +options QEMU #QEMU processor emulator options PSERIES #PAPR-compliant systems (e.g. IBM p) options POWERNV #Non-virtualized OpenPOWER systems Modified: head/sys/powerpc/conf/NOTES ============================================================================== --- head/sys/powerpc/conf/NOTES Wed Sep 23 00:06:48 2020 (r366036) +++ head/sys/powerpc/conf/NOTES Wed Sep 23 00:09:29 2020 (r366037) @@ -44,6 +44,7 @@ options POWERMAC #NewWorld Apple PowerMacs #options PS3 #Sony Playstation 3 options PSIM #GDB PSIM ppc simulator options MAMBO #IBM Mambo Full System Simulator +options QEMU #QEMU processor emulator # The cpufreq(4) driver provides support for CPU frequency control device cpufreq Modified: head/sys/powerpc/ofw/ofwcall64.S ============================================================================== --- head/sys/powerpc/ofw/ofwcall64.S Wed Sep 23 00:06:48 2020 (r366036) +++ head/sys/powerpc/ofw/ofwcall64.S Wed Sep 23 00:09:29 2020 (r366037) @@ -32,6 +32,8 @@ #include #include +#include "opt_platform.h" + #define OFWSTKSZ 4096 /* 4K Open Firmware stack */ /* @@ -119,6 +121,10 @@ ASENTRY_NOPROF(ofwcall) addis %r5,%r2,TOC_REF(ofmsr)@ha ld %r5,TOC_REF(ofmsr)@l(%r5) ld %r5,0(%r5) +#if defined(__LITTLE_ENDIAN__) && defined(QEMU) + /* QEMU hack: qemu does not emulate mtmsrd correctly! */ + ori %r5,%r5,1 /* Leave PSR_LE set */ +#endif mtmsrd %r5 isync @@ -270,6 +276,10 @@ ASENTRY_NOPROF(rtascall) addis %r7,%r2,TOC_REF(rtasmsr)@ha ld %r7,TOC_REF(rtasmsr)@l(%r7) ld %r7,0(%r7) +#ifdef __LITTLE_ENDIAN__ + /* QEMU hack: qemu does not emulate mtmsrd correctly! */ + ori %r7,%r7,1 /* Leave PSR_LE set */ +#endif mtmsrd %r7 isync Modified: head/sys/powerpc/powernv/opalcall.S ============================================================================== --- head/sys/powerpc/powernv/opalcall.S Wed Sep 23 00:06:48 2020 (r366036) +++ head/sys/powerpc/powernv/opalcall.S Wed Sep 23 00:09:29 2020 (r366037) @@ -27,6 +27,8 @@ #include +#include "opt_platform.h" + GLOBAL(opal_entrypoint) .llong 0 GLOBAL(opal_data) @@ -70,8 +72,17 @@ ASENTRY(opal_call) ld %r2,TOC_REF(opal_data)@l(%r2) ld %r2,0(%r2) + +#if defined(__LITTLE_ENDIAN__) && defined(QEMU) + /* QEMU hack: qemu does not emulate mtmsrd correctly! */ + ori %r3,%r3,1 /* Leave PSR_LE set */ +#endif mtmsrd %r3 isync +#if defined(__LITTLE_ENDIAN__) && defined(QEMU) + /* Clean up from qemu hack */ + xori %r3,%r3,1 +#endif /* Shift registers over */ mr %r3,%r4 From owner-svn-src-head@freebsd.org Wed Sep 23 00:13:59 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6033B3E5BF2; Wed, 23 Sep 2020 00:13:59 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwzDl1t2cz3g6C; Wed, 23 Sep 2020 00:13:59 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2510827C29; Wed, 23 Sep 2020 00:13:59 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08N0DxNU022387; Wed, 23 Sep 2020 00:13:59 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08N0DxWk022386; Wed, 23 Sep 2020 00:13:59 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202009230013.08N0DxWk022386@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Wed, 23 Sep 2020 00:13:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366038 - head/sys/powerpc/pseries X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: head/sys/powerpc/pseries X-SVN-Commit-Revision: 366038 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 00:13:59 -0000 Author: bdragon Date: Wed Sep 23 00:13:58 2020 New Revision: 366038 URL: https://svnweb.freebsd.org/changeset/base/366038 Log: [PowerPC64LE] Fix endianness issues in phyp_vscsi. Unlike virtio, which in legacy mode is guest endian, the hypervisor vscsi interface operates in big endian, so we must convert back and forth in several places. These changes are enough to attach a rootdisk. Sponsored by: Tag1 Consulting, Inc. Modified: head/sys/powerpc/pseries/phyp_vscsi.c Modified: head/sys/powerpc/pseries/phyp_vscsi.c ============================================================================== --- head/sys/powerpc/pseries/phyp_vscsi.c Wed Sep 23 00:09:29 2020 (r366037) +++ head/sys/powerpc/pseries/phyp_vscsi.c Wed Sep 23 00:13:58 2020 (r366038) @@ -506,7 +506,8 @@ vscsi_srp_login(struct vscsi_softc *sc) TAILQ_INSERT_TAIL(&sc->active_xferq, xp, queue); /* Set up command */ - xp->srp_iu_size = crq.iu_length = 64; + xp->srp_iu_size = 64; + crq.iu_length = htobe16(xp->srp_iu_size); err = vmem_alloc(xp->sc->srp_iu_arena, xp->srp_iu_size, M_BESTFIT | M_NOWAIT, &xp->srp_iu_offset); if (err) @@ -524,11 +525,12 @@ vscsi_srp_login(struct vscsi_softc *sc) /* Create CRQ entry */ crq.valid = 0x80; crq.format = 0x01; - crq.iu_data = xp->sc->srp_iu_phys + xp->srp_iu_offset; + crq.iu_data = htobe64(xp->sc->srp_iu_phys + xp->srp_iu_offset); bus_dmamap_sync(sc->crq_tag, sc->crq_map, BUS_DMASYNC_PREWRITE); - err = phyp_hcall(H_SEND_CRQ, xp->sc->unit, ((uint64_t *)(&crq))[0], - ((uint64_t *)(&crq))[1]); + err = phyp_hcall(H_SEND_CRQ, xp->sc->unit, + be64toh(((uint64_t *)(&crq))[0]), + be64toh(((uint64_t *)(&crq))[1])); if (err != 0) panic("CRQ send failure (%d)", err); } @@ -550,7 +552,8 @@ vscsi_task_management(struct vscsi_softc *sc, union cc TAILQ_REMOVE(&sc->free_xferq, xp, queue); TAILQ_INSERT_TAIL(&sc->active_xferq, xp, queue); - xp->srp_iu_size = crq.iu_length = sizeof(*cmd); + xp->srp_iu_size = sizeof(*cmd); + crq.iu_length = htobe16(xp->srp_iu_size); err = vmem_alloc(xp->sc->srp_iu_arena, xp->srp_iu_size, M_BESTFIT | M_NOWAIT, &xp->srp_iu_offset); if (err) @@ -577,10 +580,11 @@ vscsi_task_management(struct vscsi_softc *sc, union cc /* Create CRQ entry */ crq.valid = 0x80; crq.format = 0x01; - crq.iu_data = xp->sc->srp_iu_phys + xp->srp_iu_offset; + crq.iu_data = htobe64(xp->sc->srp_iu_phys + xp->srp_iu_offset); - err = phyp_hcall(H_SEND_CRQ, xp->sc->unit, ((uint64_t *)(&crq))[0], - ((uint64_t *)(&crq))[1]); + err = phyp_hcall(H_SEND_CRQ, xp->sc->unit, + be64toh(((uint64_t *)(&crq))[0]), + be64toh(((uint64_t *)(&crq))[1])); if (err != 0) panic("CRQ send failure (%d)", err); } @@ -605,9 +609,9 @@ vscsi_scsi_command(void *xxp, bus_dma_segment_t *segs, ccb->csio.cdb_io.cdb_ptr : ccb->csio.cdb_io.cdb_bytes; /* Command format from Table 20, page 37 of SRP spec */ - crq.iu_length = 48 + ((nsegs > 1) ? 20 : 16) + + xp->srp_iu_size = 48 + ((nsegs > 1) ? 20 : 16) + ((ccb->csio.cdb_len > 16) ? (ccb->csio.cdb_len - 16) : 0); - xp->srp_iu_size = crq.iu_length; + crq.iu_length = htobe16(xp->srp_iu_size); if (nsegs > 1) xp->srp_iu_size += nsegs*16; xp->srp_iu_size = roundup(xp->srp_iu_size, 16); @@ -644,19 +648,20 @@ vscsi_scsi_command(void *xxp, bus_dma_segment_t *segs, desc_start = ((ccb->csio.cdb_len > 16) ? ccb->csio.cdb_len - 16 : 0); - chunk_addr = xp->sc->srp_iu_phys + xp->srp_iu_offset + 20 + - desc_start + sizeof(*cmd); - chunk_size = 16*nsegs; + chunk_addr = htobe64(xp->sc->srp_iu_phys + xp->srp_iu_offset + 20 + + desc_start + sizeof(*cmd)); + chunk_size = htobe32(16*nsegs); memcpy(&cmd->data_payload[desc_start], &chunk_addr, 8); memcpy(&cmd->data_payload[desc_start+12], &chunk_size, 4); chunk_size = 0; for (i = 0; i < nsegs; i++) chunk_size += segs[i].ds_len; + chunk_size = htobe32(chunk_size); memcpy(&cmd->data_payload[desc_start+16], &chunk_size, 4); desc_start += 20; for (i = 0; i < nsegs; i++) { - chunk_addr = segs[i].ds_addr; - chunk_size = segs[i].ds_len; + chunk_addr = htobe64(segs[i].ds_addr); + chunk_size = htobe32(segs[i].ds_len); memcpy(&cmd->data_payload[desc_start + 16*i], &chunk_addr, 8); @@ -685,8 +690,8 @@ vscsi_scsi_command(void *xxp, bus_dma_segment_t *segs, * 4 byte length */ - chunk_addr = segs[0].ds_addr; - chunk_size = segs[0].ds_len; + chunk_addr = htobe64(segs[0].ds_addr); + chunk_size = htobe32(segs[0].ds_len); desc_start = ((ccb->csio.cdb_len > 16) ? ccb->csio.cdb_len - 16 : 0); @@ -703,10 +708,11 @@ vscsi_scsi_command(void *xxp, bus_dma_segment_t *segs, /* Create CRQ entry */ crq.valid = 0x80; crq.format = 0x01; - crq.iu_data = xp->sc->srp_iu_phys + xp->srp_iu_offset; + crq.iu_data = htobe64(xp->sc->srp_iu_phys + xp->srp_iu_offset); - err = phyp_hcall(H_SEND_CRQ, xp->sc->unit, ((uint64_t *)(&crq))[0], - ((uint64_t *)(&crq))[1]); + err = phyp_hcall(H_SEND_CRQ, xp->sc->unit, + be64toh(((uint64_t *)(&crq))[0]), + be64toh(((uint64_t *)(&crq))[1])); if (err != 0) panic("CRQ send failure (%d)", err); } @@ -768,8 +774,9 @@ vscsi_setup_bus(struct vscsi_softc *sc) sc->n_crqs*sizeof(sc->crq_queue[0])); KASSERT(error == 0, ("CRQ registration success")); - error = phyp_hcall(H_SEND_CRQ, sc->unit, ((uint64_t *)(&crq))[0], - ((uint64_t *)(&crq))[1]); + error = phyp_hcall(H_SEND_CRQ, sc->unit, + be64toh(((uint64_t *)(&crq))[0]), + be64toh(((uint64_t *)(&crq))[1])); if (error != 0) panic("CRQ setup failure (%d)", error); @@ -777,15 +784,15 @@ vscsi_setup_bus(struct vscsi_softc *sc) vscsi_check_response_queue(sc); /* Send MAD adapter info */ - mad_adapter_info.type = MAD_ADAPTER_INFO_REQUEST; + mad_adapter_info.type = htobe32(MAD_ADAPTER_INFO_REQUEST); mad_adapter_info.status = 0; - mad_adapter_info.length = sizeof(mad_adapter_info.payload); + mad_adapter_info.length = htobe16(sizeof(mad_adapter_info.payload)); strcpy(mad_adapter_info.payload.srp_version, "16.a"); strcpy(mad_adapter_info.payload.partition_name, "UNKNOWN"); mad_adapter_info.payload.partition_number = -1; - mad_adapter_info.payload.mad_version = 1; - mad_adapter_info.payload.os_type = 2; /* Claim we are Linux */ + mad_adapter_info.payload.mad_version = htobe32(1); + mad_adapter_info.payload.os_type = htobe32(2); /* Claim we are Linux */ mad_adapter_info.payload.port_max_txu[0] = 0; /* If this fails, we get the defaults above */ OF_getprop(OF_finddevice("/"), "ibm,partition-name", @@ -799,19 +806,21 @@ vscsi_setup_bus(struct vscsi_softc *sc) xp->ccb = NULL; TAILQ_REMOVE(&sc->free_xferq, xp, queue); TAILQ_INSERT_TAIL(&sc->active_xferq, xp, queue); - xp->srp_iu_size = crq.iu_length = sizeof(mad_adapter_info); + xp->srp_iu_size = sizeof(mad_adapter_info); + crq.iu_length = htobe16(xp->srp_iu_size); vmem_alloc(xp->sc->srp_iu_arena, xp->srp_iu_size, M_BESTFIT | M_NOWAIT, &xp->srp_iu_offset); - mad_adapter_info.buffer = xp->sc->srp_iu_phys + xp->srp_iu_offset + 24; + mad_adapter_info.buffer = htobe64(xp->sc->srp_iu_phys + xp->srp_iu_offset + 24); mad_adapter_info.tag = (uint64_t)xp; memcpy((uint8_t *)xp->sc->srp_iu_queue + (uintptr_t)xp->srp_iu_offset, &mad_adapter_info, sizeof(mad_adapter_info)); crq.valid = 0x80; crq.format = 0x02; - crq.iu_data = xp->sc->srp_iu_phys + xp->srp_iu_offset; + crq.iu_data = htobe64(xp->sc->srp_iu_phys + xp->srp_iu_offset); bus_dmamap_sync(sc->crq_tag, sc->crq_map, BUS_DMASYNC_PREWRITE); - phyp_hcall(H_SEND_CRQ, xp->sc->unit, ((uint64_t *)(&crq))[0], - ((uint64_t *)(&crq))[1]); + phyp_hcall(H_SEND_CRQ, xp->sc->unit, + be64toh(((uint64_t *)(&crq))[0]), + be64toh(((uint64_t *)(&crq))[1])); while (TAILQ_EMPTY(&sc->free_xferq)) vscsi_check_response_queue(sc); From owner-svn-src-head@freebsd.org Wed Sep 23 00:21:52 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7C9523E5F69; Wed, 23 Sep 2020 00:21:52 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwzPr2mjCz3gYP; Wed, 23 Sep 2020 00:21:52 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4279227C3F; Wed, 23 Sep 2020 00:21:52 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08N0LqfK024870; Wed, 23 Sep 2020 00:21:52 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08N0LpJx024862; Wed, 23 Sep 2020 00:21:51 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202009230021.08N0LpJx024862@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Wed, 23 Sep 2020 00:21:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366039 - in head: lib/csu lib/libc lib/libc/powerpc64/string libexec/rtld-elf libexec/rtld-elf/rtld-libc X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: in head: lib/csu lib/libc lib/libc/powerpc64/string libexec/rtld-elf libexec/rtld-elf/rtld-libc X-SVN-Commit-Revision: 366039 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 00:21:52 -0000 Author: bdragon Date: Wed Sep 23 00:21:51 2020 New Revision: 366039 URL: https://svnweb.freebsd.org/changeset/base/366039 Log: [PowerPC64LE] Use a shared LIBC_ARCH for powerpc64le. Given that we have converted to ELFv2 for BE already, endianness is the only difference between the two ARCHs. As such, there is no need to differentiate LIBC_ARCH between the two. Combining them like this lets us avoid needing to have two copies of several bits for no good reason. Sponsored by: Tag1 Consulting, Inc. Modified: head/lib/csu/Makefile head/lib/libc/Makefile head/lib/libc/powerpc64/string/Makefile.inc head/libexec/rtld-elf/Makefile head/libexec/rtld-elf/rtld-libc/Makefile.inc Modified: head/lib/csu/Makefile ============================================================================== --- head/lib/csu/Makefile Wed Sep 23 00:13:58 2020 (r366038) +++ head/lib/csu/Makefile Wed Sep 23 00:21:51 2020 (r366039) @@ -2,8 +2,8 @@ .include -.if exists(${.CURDIR}/${MACHINE_ARCH}) -SUBDIR+= ${MACHINE_ARCH} +.if exists(${.CURDIR}/${MACHINE_ARCH:S/powerpc64le/powerpc64/}) +SUBDIR+= ${MACHINE_ARCH:S/powerpc64le/powerpc64/} .else SUBDIR+= ${MACHINE_CPUARCH} .endif Modified: head/lib/libc/Makefile ============================================================================== --- head/lib/libc/Makefile Wed Sep 23 00:13:58 2020 (r366038) +++ head/lib/libc/Makefile Wed Sep 23 00:21:51 2020 (r366039) @@ -15,8 +15,8 @@ LIBC_SRCTOP?= ${.CURDIR} # named MACHINE_CPUARCH, but some ABIs are different enough to require # their own libc, so allow a directory named MACHINE_ARCH to override this. -.if exists(${LIBC_SRCTOP}/${MACHINE_ARCH}) -LIBC_ARCH=${MACHINE_ARCH} +.if exists(${LIBC_SRCTOP}/${MACHINE_ARCH:S/powerpc64le/powerpc64/}) +LIBC_ARCH=${MACHINE_ARCH:S/powerpc64le/powerpc64/} .else LIBC_ARCH=${MACHINE_CPUARCH} .endif Modified: head/lib/libc/powerpc64/string/Makefile.inc ============================================================================== --- head/lib/libc/powerpc64/string/Makefile.inc Wed Sep 23 00:13:58 2020 (r366038) +++ head/lib/libc/powerpc64/string/Makefile.inc Wed Sep 23 00:21:51 2020 (r366039) @@ -10,9 +10,14 @@ MDSRCS+= \ memmove.S \ memmove_vsx.S \ memmove_resolver.c \ - strcpy_arch_2_05.S \ - strcpy.c \ - strcpy_resolver.c \ strncpy_arch_2_05.S \ strncpy.c \ strncpy_resolver.c + +# XXX Port strcpy to LE. +.if ${MACHINE_ARCH} == "powerpc64" +MDSRCS+= \ + strcpy_arch_2_05.S \ + strcpy.c \ + strcpy_resolver.c +.endif Modified: head/libexec/rtld-elf/Makefile ============================================================================== --- head/libexec/rtld-elf/Makefile Wed Sep 23 00:13:58 2020 (r366038) +++ head/libexec/rtld-elf/Makefile Wed Sep 23 00:21:51 2020 (r366039) @@ -32,8 +32,8 @@ MAN?= rtld.1 ACFLAGS+= -DLOCORE CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD -ffreestanding CFLAGS+= -I${SRCTOP}/lib/csu/common -.if exists(${RTLD_ELF_DIR}/${MACHINE_ARCH}) -RTLD_ARCH= ${MACHINE_ARCH} +.if exists(${RTLD_ELF_DIR}/${MACHINE_ARCH:S/powerpc64le/powerpc64/}) +RTLD_ARCH= ${MACHINE_ARCH:S/powerpc64le/powerpc64/} .else RTLD_ARCH= ${MACHINE_CPUARCH} .endif Modified: head/libexec/rtld-elf/rtld-libc/Makefile.inc ============================================================================== --- head/libexec/rtld-elf/rtld-libc/Makefile.inc Wed Sep 23 00:13:58 2020 (r366038) +++ head/libexec/rtld-elf/rtld-libc/Makefile.inc Wed Sep 23 00:21:51 2020 (r366039) @@ -5,8 +5,8 @@ .include LIBC_SRCTOP=${SRCTOP}/lib/libc -.if exists(${LIBC_SRCTOP}/${MACHINE_ARCH}) -LIBC_ARCH=${MACHINE_ARCH} +.if exists(${LIBC_SRCTOP}/${MACHINE_ARCH:S/powerpc64le/powerpc64/}) +LIBC_ARCH=${MACHINE_ARCH:S/powerpc64le/powerpc64/} .else LIBC_ARCH=${MACHINE_CPUARCH} .endif From owner-svn-src-head@freebsd.org Wed Sep 23 00:28:48 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 23A8B3E657D; Wed, 23 Sep 2020 00:28:48 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwzYr070Jz3yDP; Wed, 23 Sep 2020 00:28:48 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DB65127EDE; Wed, 23 Sep 2020 00:28:47 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08N0SlRQ029141; Wed, 23 Sep 2020 00:28:47 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08N0SlS1029140; Wed, 23 Sep 2020 00:28:47 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202009230028.08N0SlS1029140@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Wed, 23 Sep 2020 00:28:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366040 - head/sys/powerpc/powernv X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: head/sys/powerpc/powernv X-SVN-Commit-Revision: 366040 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 00:28:48 -0000 Author: bdragon Date: Wed Sep 23 00:28:47 2020 New Revision: 366040 URL: https://svnweb.freebsd.org/changeset/base/366040 Log: [PowerPC64LE] LE opal_call() implementation OPAL runs in big endian, so we need to rfid into it to switch endian atomically when branching to it, and we need to do the RETURN_TO_NATIVE_ENDIAN dance when it returns to us. Sponsored by: Tag1 Consulting, Inc. Modified: head/sys/powerpc/powernv/opal.c head/sys/powerpc/powernv/opalcall.S Modified: head/sys/powerpc/powernv/opal.c ============================================================================== --- head/sys/powerpc/powernv/opal.c Wed Sep 23 00:21:51 2020 (r366039) +++ head/sys/powerpc/powernv/opal.c Wed Sep 23 00:28:47 2020 (r366040) @@ -57,7 +57,7 @@ opal_check(void) OF_getencprop(opal, "opal-entry-address", val, sizeof(val)); opal_entrypoint = ((uint64_t)val[0] << 32) | val[1]; - opal_msr = mfmsr() & ~(PSL_EE | PSL_IR | PSL_DR | PSL_SE); + opal_msr = mfmsr() & ~(PSL_EE | PSL_IR | PSL_DR | PSL_SE | PSL_LE); opal_initialized = 1; Modified: head/sys/powerpc/powernv/opalcall.S ============================================================================== --- head/sys/powerpc/powernv/opalcall.S Wed Sep 23 00:21:51 2020 (r366039) +++ head/sys/powerpc/powernv/opalcall.S Wed Sep 23 00:28:47 2020 (r366040) @@ -84,6 +84,10 @@ ASENTRY(opal_call) xori %r3,%r3,1 #endif +#ifdef __LITTLE_ENDIAN__ + mtsrr1 %r3 +#endif + /* Shift registers over */ mr %r3,%r4 mr %r4,%r5 @@ -93,8 +97,23 @@ ASENTRY(opal_call) mr %r8,%r9 mr %r9,%r10 +#ifdef __LITTLE_ENDIAN__ + /* We need to rfid to switch endian. */ + mfctr %r11 + mtsrr0 %r11 + LOAD_LR_NIA +1: + mflr %r11 + addi %r11, %r11, (2f-1b) + mtlr %r11 /* Call OPAL */ + rfid +2: + RETURN_TO_NATIVE_ENDIAN +#else + /* Call OPAL */ bctrl +#endif /* Restore MSR */ mtmsrd %r31 From owner-svn-src-head@freebsd.org Wed Sep 23 00:32:52 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D59453E6C43; Wed, 23 Sep 2020 00:32:52 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwzfX3YySz3yyS; Wed, 23 Sep 2020 00:32:51 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C5D2827C78; Wed, 23 Sep 2020 00:32:50 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08N0WoMU035239; Wed, 23 Sep 2020 00:32:50 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08N0Wok6035237; Wed, 23 Sep 2020 00:32:50 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202009230032.08N0Wok6035237@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Wed, 23 Sep 2020 00:32:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366041 - in head/sys/powerpc: include powernv X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: in head/sys/powerpc: include powernv X-SVN-Commit-Revision: 366041 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 00:32:53 -0000 Author: bdragon Date: Wed Sep 23 00:32:50 2020 New Revision: 366041 URL: https://svnweb.freebsd.org/changeset/base/366041 Log: [PowerPC64LE] powernv ILE setup code. When running without a hypervisor, we need to set the ILE bit in the LPCR ourselves. For the boot processor, handle it in powernv_attach() like we do for other LPCR bits. No change for the APs, as they will use the lpcr global to set up their own LPCR when they do their own cpudep_ap_early_bootstrap() and pick up this automatically. Sponsored by: Tag1 Consulting, Inc. Modified: head/sys/powerpc/include/spr.h head/sys/powerpc/powernv/platform_powernv.c Modified: head/sys/powerpc/include/spr.h ============================================================================== --- head/sys/powerpc/include/spr.h Wed Sep 23 00:28:47 2020 (r366040) +++ head/sys/powerpc/include/spr.h Wed Sep 23 00:32:50 2020 (r366041) @@ -292,6 +292,7 @@ #define SPR_LPCR 0x13e /* .6. Logical Partitioning Control */ #define LPCR_LPES 0x008 /* Bit 60 */ #define LPCR_HVICE 0x002 /* Hypervisor Virtualization Interrupt (Arch 3.0) */ +#define LPCR_ILE (1ULL << 25) /* Interrupt Little-Endian (ISA 2.07) */ #define LPCR_UPRT (1ULL << 22) /* Use Process Table (ISA 3) */ #define LPCR_HR (1ULL << 20) /* Host Radix mode */ #define LPCR_PECE_DRBL (1ULL << 16) /* Directed Privileged Doorbell */ Modified: head/sys/powerpc/powernv/platform_powernv.c ============================================================================== --- head/sys/powerpc/powernv/platform_powernv.c Wed Sep 23 00:28:47 2020 (r366040) +++ head/sys/powerpc/powernv/platform_powernv.c Wed Sep 23 00:32:50 2020 (r366041) @@ -174,6 +174,10 @@ powernv_attach(platform_t plat) if (cpu_features2 & PPC_FEATURE2_ARCH_3_00) lpcr |= LPCR_HVICE; +#if BYTE_ORDER == LITTLE_ENDIAN + lpcr |= LPCR_ILE; +#endif + mtspr(SPR_LPCR, lpcr); isync(); From owner-svn-src-head@freebsd.org Wed Sep 23 00:55:14 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 82BE43E6CE8 for ; Wed, 23 Sep 2020 00:55:14 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72c.google.com (mail-qk1-x72c.google.com [IPv6:2607:f8b0:4864:20::72c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bx08K3ySDz40mg for ; Wed, 23 Sep 2020 00:55:13 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72c.google.com with SMTP id w16so21237819qkj.7 for ; Tue, 22 Sep 2020 17:55:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hLyYZKfCUBg5Bpb8nKcEfs5pi+Y7kkeQ//4RfSk2c1Q=; b=LRL6owNjyWHbT57WG9FHOgvNLgqefYLsgXy0Aj7y0rF9D6T6WQNC8IqO82g9ywNsPK 0I+VGZONVBuqxUDeIPHbdji4I3R5UbeNjYAYnmu9xW41h+KbYnr0tazDdKw0rF0m1j58 JqvFuX5WJRsf3co8+J0JR8LqINe9Lx++H3ZYpSgZtBdH1AgrfHHj18HnwozNQkKD8J2P 2IGb2JdBWpQsq8E6WBh+MSm8h4b96NNsfh0t0MMA3ikOwNOki6HDHPIMRsrgpTco6dVl A/TcAKI5eoXlC6alUZkyeqzEETOw6ZCa/pwAVF0Y1wys4FHYSNr3cpS/vhjKQfMHgKC1 8GyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hLyYZKfCUBg5Bpb8nKcEfs5pi+Y7kkeQ//4RfSk2c1Q=; b=jeo2mpA1R0BASUwoAuaL2+aZhXzQ4Y23sNfC0+YEjVepjnfqPBsIzkbk2MwS6SjODa q/IBAzDV5x1Qa0dQNqP7YD/4xQvmRDhF0othTWH8ZFiNTRyQtR8WrODp/jwsKhO1nm9X gHoE0Vc+7CLSa6tHk6yQdRJZpQwQL+HTL1fi+Khbv/ends0FLF+52Nfcq+2I4lP1B0uz HN7MysoRxQ/hDoCOPHO6Sq6SIH3oiTsXd7BnZPjJ31LTG6zRSUQ8Q/ZUC0vJQ4IimuWj HbY1z/ViLG9KfjLfsQxsZetXVAKzApCGVV0/+61s2hc+wuyNH5TuNQ1owCWWTViv5txp zlZw== X-Gm-Message-State: AOAM532hoCTgHcep2Zixf05b8UYk9xJoGEFbV4YO2FOUN5S5tNVGf7+g 4SIE0EOOTQ5pKsTTyzTDlVa205vis0td2WMvDkUcPw== X-Google-Smtp-Source: ABdhPJynGvTnSXARrxMr7phAylsZvc58ROmNwvj57lq2g+hLGZ7UAtCRuit7/pJnCMeA7tsPBu2kRlqvQ/kgN/r2yio= X-Received: by 2002:a05:620a:2006:: with SMTP id c6mr7167310qka.240.1600822512422; Tue, 22 Sep 2020 17:55:12 -0700 (PDT) MIME-Version: 1.0 References: <202009112049.08BKnavL032212@repo.freebsd.org> In-Reply-To: From: Warner Losh Date: Tue, 22 Sep 2020 18:55:01 -0600 Message-ID: Subject: Re: svn commit: r365643 - head/bin/cp To: Kyle Evans Cc: Ian Lepore , Alan Somers , Mateusz Guzik , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4Bx08K3ySDz40mg X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=LRL6owNj; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::72c) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-1.65 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-0.88)[-0.879]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; NEURAL_HAM_LONG(-0.95)[-0.949]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; NEURAL_SPAM_SHORT(0.18)[0.177]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCPT_COUNT_SEVEN(0.00)[7]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::72c:from]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; MAILMAN_DEST(0.00)[svn-src-head]; FREEMAIL_CC(0.00)[freebsd.org,gmail.com] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 00:55:14 -0000 On Tue, Sep 22, 2020 at 5:17 PM Kyle Evans wrote: > On Tue, Sep 22, 2020, 17:02 Warner Losh wrote: > >> >> >> On Tue, Sep 22, 2020 at 3:55 PM Kyle Evans wrote: >> >>> On Tue, Sep 22, 2020 at 4:53 PM Ian Lepore wrote: >>> > >>> > On Tue, 2020-09-22 at 15:50 -0600, Warner Losh wrote: >>> > > I think it's a great leap sideways, but I've done cp /dev/null foo to >>> > > clear >>> > > it out for 35 years now... It's why it feels like a workaround. >>> > > >>> > > Though it is a legit optimization, no matter the feelings. As for >>> > > clearer, >>> > > I'm less sure since then I have to remember what the : operator does. >>> > > >>> > > Warner >>> > > >>> > >>> > For me, :> is idiomatic (but ugly). >>> > >>> > On the other hand, the cp /dev/null had a nice dogfooding aspect to >>> > it... when we broke cp by accident, its use in the build system was the >>> > first alarm to go off. >>> > >>> > --Ian >>> > >>> >>> To be honest, this is a case that really should be covered by >>> regression tests somewhere. >>> >> >> It should (but isn't yet). >> >> Ian is right for old-school FreeBSD thinking. In that thinking the build >> system should use an eclectic mix of tools to act as a fire-wall against >> accidental breakage. >> >> Complete, effective, test suites give much better coverage... if they are >> run... >> >> So until we run tests frequently, with loud regression squawking that's >> as effective as build breakage, I tend to fall in the 'all of the above' >> camp until that's in place... :) >> >> Warner >> >> P.S. though not, if I suppose, if it means that we're slowing down the >> regression coverage uptake... >> > > -- > > The test build was fine, please confirm if I can commit it or if someone > else would like to write the UPDATING notice or start bootstrapping cp on > systems that were affected. I'm not comfortable with not taking any path at > all here, but this is a lot of friction for a small mechanical change to > ease the pain. > Sorry if I wasn't clear: I'm not objecting to the quick mechanical change so much as complaining that I wish we had better test coverage. Don't let that stop you from doing what's right (or I can if you'd like). Warner From owner-svn-src-head@freebsd.org Wed Sep 23 01:04:26 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CAA853E7140; Wed, 23 Sep 2020 01:04:26 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bx0Ly4xSxz410J; Wed, 23 Sep 2020 01:04:26 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8CEB28852; Wed, 23 Sep 2020 01:04:26 +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 08N14QuK053740; Wed, 23 Sep 2020 01:04:26 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08N14QIe053739; Wed, 23 Sep 2020 01:04:26 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202009230104.08N14QIe053739@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 23 Sep 2020 01:04:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366042 - in head/stand: i386/zfsboot libsa X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/stand: i386/zfsboot libsa X-SVN-Commit-Revision: 366042 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 01:04:26 -0000 Author: imp Date: Wed Sep 23 01:04:25 2020 New Revision: 366042 URL: https://svnweb.freebsd.org/changeset/base/366042 Log: Work around cp breakage in current from last week There was a small window cp was broken. Work around this by using :> instead of cp /dev/null. Ideally, we'd keep the cp /dev/null in the build as a regression test, but doing so breaks people that upgraded during the cp breakage and this is simpler than bootstrapping a working cp since there's no good __FreeBSD_version sign posts for that. Suggested by: lots of people Too stubborn for his own good: imp Modified: head/stand/i386/zfsboot/Makefile head/stand/libsa/Makefile Modified: head/stand/i386/zfsboot/Makefile ============================================================================== --- head/stand/i386/zfsboot/Makefile Wed Sep 23 00:32:50 2020 (r366041) +++ head/stand/i386/zfsboot/Makefile Wed Sep 23 01:04:25 2020 (r366042) @@ -81,7 +81,7 @@ zfsboot.ld: zfsboot.ldr zfsboot.bin ${BTXKERN} -o ${.TARGET} -P 1 zfsboot.bin zfsboot.ldr: - cp /dev/null ${.TARGET} + :> ${.TARGET} zfsboot.bin: zfsboot.out ${OBJCOPY} -S -O binary zfsboot.out ${.TARGET} Modified: head/stand/libsa/Makefile ============================================================================== --- head/stand/libsa/Makefile Wed Sep 23 00:32:50 2020 (r366041) +++ head/stand/libsa/Makefile Wed Sep 23 01:04:25 2020 (r366042) @@ -122,7 +122,7 @@ beforedepend: ln -sf ${SRCTOP}/include/arpa/inet.h arpa/inet.h; \ ln -sf ${SRCTOP}/include/arpa/tftp.h arpa/tftp.h; \ for i in _time.h _strings.h _string.h; do \ - [ -f xlocale/$$i ] || cp /dev/null xlocale/$$i; \ + [ -f xlocale/$$i ] || :> xlocale/$$i; \ done; \ for i in ${STAND_H_INC}; do \ ln -sf ${SASRC}/stand.h $$i; \ From owner-svn-src-head@freebsd.org Wed Sep 23 01:07:56 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 97D3E3E74AD; Wed, 23 Sep 2020 01:07:56 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bx0R03WzBz41SH; Wed, 23 Sep 2020 01:07:56 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5C66B85C6; Wed, 23 Sep 2020 01:07:56 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08N17uu3053943; Wed, 23 Sep 2020 01:07:56 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08N17uT3053942; Wed, 23 Sep 2020 01:07:56 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202009230107.08N17uT3053942@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Wed, 23 Sep 2020 01:07:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366043 - head/sys/powerpc/conf X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: head/sys/powerpc/conf X-SVN-Commit-Revision: 366043 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 01:07:56 -0000 Author: bdragon Date: Wed Sep 23 01:07:55 2020 New Revision: 366043 URL: https://svnweb.freebsd.org/changeset/base/366043 Log: [PowerPC64LE] Initial GENERIC64LE kernel config. This is slightly stripped down from GENERIC64, as PowerMac G5 machines are incapable of running in LE mode (so we can skip the Mac drivers.) While technically POWER6 and POWER7 have the hardware capability of running in LE mode, they have a tendency to trap excessively when a load/store is misaligned. (an extremely common occurrence in LE code, and one of the main reasons I consider BE to be superior, as it turns potential security issues into immediately obvious mangled numbers.) Additionally, there was no mechanism to control what endian interrupts are delivered in, so supporting LE operation on POWER6 and POWER7 involves some really dirty tricks in the interrupt vectors that I would rather avoid. IBM drew the line in the sand at POWER8 some time around 2013, embracing full support for LE in the platform, and making a push across the board for LE code to target POWER8 as a minimum requirement. As such, usage of LE kernels on POWER6 and POWER7 is practically nil, despite it being technically possible to do. The so-called "TRUELE" feature bit which is the baseline requirement for needed for PowerPC64LE was introduced in POWER8. Sponsored by: Tag1 Consulting, Inc. Added: head/sys/powerpc/conf/GENERIC64LE (contents, props changed) Added: head/sys/powerpc/conf/GENERIC64LE ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/conf/GENERIC64LE Wed Sep 23 01:07:55 2020 (r366043) @@ -0,0 +1,253 @@ +# +# GENERIC -- Generic kernel configuration file for FreeBSD/powerpc +# +# For more information on this file, please read the handbook section on +# Kernel Configuration Files: +# +# https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (https://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ + +cpu AIM +ident GENERIC + +machine powerpc powerpc64le + +makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +makeoptions WITH_CTF=1 + +# Platform support +options MAMBO #IBM Mambo Full System Simulator +options QEMU #QEMU processor emulator +options PSERIES #PAPR-compliant systems (e.g. IBM p) +options POWERNV #Non-virtualized OpenPOWER systems + +options FDT #Flattened Device Tree +options SCHED_ULE #ULE scheduler +options NUMA #Non-Uniform Memory Architecture support +options PREEMPTION #Enable kernel thread preemption +options VIMAGE # Subsystem virtualization, e.g. VNET +options INET #InterNETworking +options INET6 #IPv6 communications protocols +options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 +options TCP_OFFLOAD # TCP offload +options TCP_BLACKBOX # Enhanced TCP event logging +options TCP_HHOOK # hhook(9) framework for TCP +options TCP_RFC7413 # TCP Fast Open +options SCTP_SUPPORT # Allow kldload of SCTP +options FFS #Berkeley Fast Filesystem +options SOFTUPDATES #Enable FFS soft updates support +options UFS_ACL #Support for access control lists +options UFS_DIRHASH #Improve performance on big directories +options UFS_GJOURNAL #Enable gjournal-based UFS journaling +options QUOTA #Enable disk quotas for UFS +options MD_ROOT #MD is a potential root device +options MD_ROOT_MEM #Enable use of initrd as MD root +options NFSCL #Network Filesystem Client +options NFSD #Network Filesystem Server +options NFSLOCKD #Network Lock Manager +options NFS_ROOT #NFS usable as root device +options MSDOSFS #MSDOS Filesystem +options CD9660 #ISO 9660 Filesystem +options PROCFS #Process filesystem (requires PSEUDOFS) +options PSEUDOFS #Pseudo-filesystem framework +options TMPFS #Efficient memory filesystem +options GEOM_PART_APM #Apple Partition Maps. +options GEOM_PART_GPT #GUID Partition Tables. +options GEOM_LABEL #Provides labelization +options COMPAT_FREEBSD32 #Compatible with FreeBSD/powerpc binaries +options COMPAT_FREEBSD5 #Compatible with FreeBSD5 +options COMPAT_FREEBSD6 #Compatible with FreeBSD6 +options COMPAT_FREEBSD7 #Compatible with FreeBSD7 +options COMPAT_FREEBSD9 # Compatible with FreeBSD9 +options COMPAT_FREEBSD10 # Compatible with FreeBSD10 +options COMPAT_FREEBSD11 # Compatible with FreeBSD11 +options COMPAT_FREEBSD12 # Compatible with FreeBSD12 +options SCSI_DELAY=5000 #Delay (in ms) before probing SCSI +options KTRACE #ktrace(1) syscall trace support +options STACK #stack(9) support +options SYSVSHM #SYSV-style shared memory +options SYSVMSG #SYSV-style message queues +options SYSVSEM #SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions +options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. +options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) +options AUDIT # Security event auditing +options CAPABILITY_MODE # Capsicum capability mode +options CAPABILITIES # Capsicum capabilities +options MAC # TrustedBSD MAC Framework +options KDTRACE_HOOKS # Kernel DTrace hooks +options DDB_CTF # Kernel ELF linker loads CTF data +options INCLUDE_CONFIG_FILE # Include this file in kernel +options RACCT # Resource accounting framework +options RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default +options RCTL # Resource limits + +# Debugging support. Always need this: +options KDB # Enable kernel debugger support. +options KDB_TRACE # Print a stack trace for a panic. +# For full debugger support use (turn off in stable branch): +options DDB #Support DDB +#options DEADLKRES #Enable the deadlock resolver +options INVARIANTS #Enable calls of extra sanity checking +options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +options WITNESS #Enable checks to detect deadlocks and cycles +options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed +options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones +options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default + +# Kernel dump features. +options EKCD # Support for encrypted kernel dumps +options GZIO # gzip-compressed kernel and user dumps +options ZSTDIO # zstd-compressed kernel and user dumps +options DEBUGNET # debugnet networking +options NETDUMP # netdump(4) client support + +# Make an SMP-capable kernel by default +options SMP # Symmetric MultiProcessor Kernel + +# CPU frequency control +device cpufreq + +# Standard busses +device pci +options PCI_HP # PCI-Express native HotPlug +device agp + +# ATA controllers +device ahci # AHCI-compatible SATA controllers +device ata # Legacy ATA/SATA controllers +device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA +device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA + +# NVM Express (NVMe) support +device nvme # base NVMe driver +options NVME_USE_NVD=0 # prefer the cam(4) based nda(4) driver +device nvd # expose NVMe namespaces as disks, depends on nvme + +# SCSI Controllers +device aacraid # Adaptec by PMC RAID +device ahc # AHA2940 and onboard AIC7xxx devices +options AHC_ALLOW_MEMIO # Attempt to use memory mapped I/O +device isp # Qlogic family +device ispfw # Firmware module for Qlogic host adapters +device mpt # LSI-Logic MPT-Fusion +device mps # LSI-Logic MPT-Fusion 2 +device sym # NCR/Symbios/LSI Logic 53C8XX/53C1010/53C1510D + +# ATA/SCSI peripherals +device scbus # SCSI bus (required for ATA/SCSI) +device ch # SCSI media changers +device da # Direct Access (disks) +device sa # Sequential Access (tape etc) +device cd # CD +device pass # Passthrough device (direct ATA/SCSI access) +device ses # Enclosure Service (SES and SAF-TE) + +# vt is the default console driver, resembling an SCO console +device vt # Core console driver +device kbdmux + +# Serial (COM) ports +device scc +device uart +device uart_z8530 + +device iflib + +# Ethernet hardware +device em # Intel PRO/1000 Gigabit Ethernet Family +device ix # Intel PRO/10GbE PCIE PF Ethernet Family +device ixl # Intel 700 Series Physical Function +device ixv # Intel PRO/10GbE PCIE VF Ethernet Family +device llan # IBM pSeries Virtual Ethernet +device cxgbe # Chelsio 10/25G NIC + +# PCI Ethernet NICs that use the common MII bus controller code. +device miibus # MII bus support +device bge # Broadcom BCM570xx Gigabit Ethernet +device gem # Sun GEM/Sun ERI/Apple GMAC +device dc # DEC/Intel 21143 and various workalikes +device fxp # Intel EtherExpress PRO/100B (82557, 82558) +device re # RealTek 8139C+/8169/8169S/8110S +device rl # RealTek 8129/8139 + +# Pseudo devices. +device crypto # core crypto support +device loop # Network loopback +device ether # Ethernet support +device vlan # 802.1Q VLAN support +device tuntap # Packet tunnel. +device md # Memory "disks" +device ofwd # Open Firmware disks +device gif # IPv6 and IPv4 tunneling +device firmware # firmware assist module + +# The `bpf' device enables the Berkeley Packet Filter. +# Be aware of the administrative consequences of enabling this! +# Note that 'bpf' is required for DHCP. +device bpf #Berkeley packet filter + +# USB support +options USB_DEBUG # enable debug msgs +device uhci # UHCI PCI->USB interface +device ohci # OHCI PCI->USB interface +device ehci # EHCI PCI->USB interface +device xhci # XHCI PCI->USB interface +device usb # USB Bus (required) +device uhid # "Human Interface Devices" +device ukbd # Keyboard +options KBD_INSTALL_CDEV # install a CDEV entry in /dev +device umass # Disks/Mass storage - Requires scbus and da0 +device ums # Mouse +# USB Ethernet +device aue # ADMtek USB Ethernet +device axe # ASIX Electronics USB Ethernet +device cdce # Generic USB over Ethernet +device cue # CATC USB Ethernet +device kue # Kawasaki LSI USB Ethernet + +# Wireless NIC cards +options IEEE80211_SUPPORT_MESH + +# FireWire support +device firewire # FireWire bus code +device sbp # SCSI over FireWire (Requires scbus and da) +device fwe # Ethernet over FireWire (non-standard!) + +# Misc +device iicbus # I2C bus code +device iic +device opalflash # PowerNV embedded flash memory + +# Sound support +device sound # Generic sound driver (required) +device snd_hda # Intel High Definition Audio +device snd_uaudio # USB Audio + +# Netmap provides direct access to TX/RX rings on supported NICs +device netmap # netmap(4) support + +# evdev interface +options EVDEV_SUPPORT # evdev support in legacy drivers +device evdev # input event device support +device uinput # install /dev/uinput cdev + +# VirtIO support +device virtio # Generic VirtIO bus (required) +device virtio_pci # VirtIO PCI device +device vtnet # VirtIO Ethernet device +device virtio_blk # VirtIO Block device +device virtio_scsi # VirtIO SCSI device +device virtio_balloon # VirtIO Memory Balloon device + From owner-svn-src-head@freebsd.org Wed Sep 23 01:13:30 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1FED23E7760; Wed, 23 Sep 2020 01:13:30 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bx0YQ05Wdz41nq; Wed, 23 Sep 2020 01:13:30 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DA2B08751; Wed, 23 Sep 2020 01:13:29 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08N1DTje060057; Wed, 23 Sep 2020 01:13:29 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08N1DTLu060056; Wed, 23 Sep 2020 01:13:29 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202009230113.08N1DTLu060056@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Wed, 23 Sep 2020 01:13:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366044 - head/release/powerpc X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: head/release/powerpc X-SVN-Commit-Revision: 366044 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 01:13:30 -0000 Author: bdragon Date: Wed Sep 23 01:13:29 2020 New Revision: 366044 URL: https://svnweb.freebsd.org/changeset/base/366044 Log: [PowerPC64LE] Add release building script for powerpc64le. This was originally part of the initial commit, but after discussion in D26399, I split it out into its own commit after the kernel config file. Sponsored by: Tag1 Consulting, Inc. Added: head/release/powerpc/powerpc64le.conf (contents, props changed) Added: head/release/powerpc/powerpc64le.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/powerpc/powerpc64le.conf Wed Sep 23 01:13:29 2020 (r366044) @@ -0,0 +1,10 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# Configuration file for release/release.sh to build powerpc/powerpc64le. + +TARGET="powerpc" +TARGET_ARCH="powerpc64le" +KERNEL="GENERIC64LE" From owner-svn-src-head@freebsd.org Wed Sep 23 01:29:34 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A1BF03E8179; Wed, 23 Sep 2020 01:29:34 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bx0vy3s9sz42fG; Wed, 23 Sep 2020 01:29:34 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 679E18AB1; Wed, 23 Sep 2020 01:29:34 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08N1TYlC066719; Wed, 23 Sep 2020 01:29:34 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08N1TYgW066718; Wed, 23 Sep 2020 01:29:34 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202009230129.08N1TYgW066718@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Wed, 23 Sep 2020 01:29:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366045 - head/sys/powerpc/aim X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: head/sys/powerpc/aim X-SVN-Commit-Revision: 366045 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 01:29:34 -0000 Author: bdragon Date: Wed Sep 23 01:29:33 2020 New Revision: 366045 URL: https://svnweb.freebsd.org/changeset/base/366045 Log: [PowerPC64LE] Fix endian conversion bugs in moea64. For a body of code that had its endian conversion bits written blind without the ability to test, moea64 was VERY close to being correct. There were only four instances where the existing code was getting it wrong. Sponsored by: Tag1 Consulting, Inc. Modified: head/sys/powerpc/aim/moea64_native.c Modified: head/sys/powerpc/aim/moea64_native.c ============================================================================== --- head/sys/powerpc/aim/moea64_native.c Wed Sep 23 01:13:29 2020 (r366044) +++ head/sys/powerpc/aim/moea64_native.c Wed Sep 23 01:29:33 2020 (r366045) @@ -341,7 +341,7 @@ moea64_pte_unset_native(struct pvo_entry *pvo) pvo_ptevpn = moea64_pte_vpn_from_pvo_vpn(pvo); rw_rlock(&moea64_eviction_lock); - if ((be64toh(pt->pte_hi & LPTE_AVPN_MASK)) != pvo_ptevpn) { + if ((be64toh(pt->pte_hi) & LPTE_AVPN_MASK) != pvo_ptevpn) { /* Evicted */ STAT_MOEA64(moea64_pte_overflow--); rw_runlock(&moea64_eviction_lock); @@ -354,7 +354,7 @@ moea64_pte_unset_native(struct pvo_entry *pvo) */ isync(); critical_enter(); - pt->pte_hi = be64toh((pt->pte_hi & ~LPTE_VALID) | LPTE_LOCKED); + pt->pte_hi = htobe64((be64toh(pt->pte_hi) & ~LPTE_VALID) | LPTE_LOCKED); PTESYNC(); TLBIE(pvo->pvo_vpn); ptelo = be64toh(pt->pte_lo); @@ -378,7 +378,7 @@ moea64_pte_replace_inval_native(struct pvo_entry *pvo, moea64_pte_from_pvo(pvo, &properpt); rw_rlock(&moea64_eviction_lock); - if ((be64toh(pt->pte_hi & LPTE_AVPN_MASK)) != + if ((be64toh(pt->pte_hi) & LPTE_AVPN_MASK) != (properpt.pte_hi & LPTE_AVPN_MASK)) { /* Evicted */ STAT_MOEA64(moea64_pte_overflow--); @@ -392,7 +392,7 @@ moea64_pte_replace_inval_native(struct pvo_entry *pvo, */ isync(); critical_enter(); - pt->pte_hi = be64toh((pt->pte_hi & ~LPTE_VALID) | LPTE_LOCKED); + pt->pte_hi = htobe64((be64toh(pt->pte_hi) & ~LPTE_VALID) | LPTE_LOCKED); PTESYNC(); TLBIE(pvo->pvo_vpn); ptelo = be64toh(pt->pte_lo); From owner-svn-src-head@freebsd.org Wed Sep 23 01:33:55 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4B4DC3E827C; Wed, 23 Sep 2020 01:33:55 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bx10z1JQhz439x; Wed, 23 Sep 2020 01:33:55 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EA1848BF4; Wed, 23 Sep 2020 01:33:54 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08N1XsMm072572; Wed, 23 Sep 2020 01:33:54 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08N1Xs0O072571; Wed, 23 Sep 2020 01:33:54 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202009230133.08N1Xs0O072571@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Wed, 23 Sep 2020 01:33:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366046 - head/sys/powerpc/aim X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: head/sys/powerpc/aim X-SVN-Commit-Revision: 366046 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 01:33:55 -0000 Author: bdragon Date: Wed Sep 23 01:33:54 2020 New Revision: 366046 URL: https://svnweb.freebsd.org/changeset/base/366046 Log: [PowerPC64LE] Implement endian-independent dword atomic PTE lock. It's much easier to implement this in an endian-independent way when we don't also have to worry about masking half of the dword off. Given that this code ran on a machine that ran a poudriere bulk with no kernel oddities, I am relatively certain it is correctly implemented. ;) This should be a minor performance boost on BE as well. Sponsored by: Tag1 Consulting, Inc. Modified: head/sys/powerpc/aim/moea64_native.c Modified: head/sys/powerpc/aim/moea64_native.c ============================================================================== --- head/sys/powerpc/aim/moea64_native.c Wed Sep 23 01:29:33 2020 (r366045) +++ head/sys/powerpc/aim/moea64_native.c Wed Sep 23 01:33:54 2020 (r366046) @@ -633,15 +633,46 @@ static int atomic_pte_lock(volatile struct lpte *pte, uint64_t bitmask, uint64_t *oldhi) { int ret; +#ifdef __powerpc64__ + uint64_t temp; +#else uint32_t oldhihalf; +#endif /* * Note: in principle, if just the locked bit were set here, we * could avoid needing the eviction lock. However, eviction occurs * so rarely that it isn't worth bothering about in practice. */ - +#ifdef __powerpc64__ + /* + * Note: Success of this sequence has the side effect of invalidating + * the PTE, as we are setting it to LPTE_LOCKED and discarding the + * other bits, including LPTE_V. + */ __asm __volatile ( + "1:\tldarx %1, 0, %3\n\t" /* load old value */ + "and. %0,%1,%4\n\t" /* check if any bits set */ + "bne 2f\n\t" /* exit if any set */ + "stdcx. %5, 0, %3\n\t" /* attempt to store */ + "bne- 1b\n\t" /* spin if failed */ + "li %0, 1\n\t" /* success - retval = 1 */ + "b 3f\n\t" /* we've succeeded */ + "2:\n\t" + "stdcx. %1, 0, %3\n\t" /* clear reservation (74xx) */ + "li %0, 0\n\t" /* failure - retval = 0 */ + "3:\n\t" + : "=&r" (ret), "=&r"(temp), "=m" (pte->pte_hi) + : "r" ((volatile char *)&pte->pte_hi), + "r" (htobe64(bitmask)), "r" (htobe64(LPTE_LOCKED)), + "m" (pte->pte_hi) + : "cr0", "cr1", "cr2", "memory"); + *oldhi = be64toh(temp); +#else + /* + * This code is used on bridge mode only. + */ + __asm __volatile ( "1:\tlwarx %1, 0, %3\n\t" /* load old value */ "and. %0,%1,%4\n\t" /* check if any bits set */ "bne 2f\n\t" /* exit if any set */ @@ -660,6 +691,7 @@ atomic_pte_lock(volatile struct lpte *pte, uint64_t bi : "cr0", "cr1", "cr2", "memory"); *oldhi = (pte->pte_hi & 0xffffffff00000000ULL) | oldhihalf; +#endif return (ret); } From owner-svn-src-head@freebsd.org Wed Sep 23 01:37:01 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DBFDA3E8442; Wed, 23 Sep 2020 01:37:01 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bx14Y5T7lz43NK; Wed, 23 Sep 2020 01:37:01 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9EC128DFC; Wed, 23 Sep 2020 01:37:01 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08N1b1sD072763; Wed, 23 Sep 2020 01:37:01 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08N1b1dE072762; Wed, 23 Sep 2020 01:37:01 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202009230137.08N1b1dE072762@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Wed, 23 Sep 2020 01:37:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366047 - head/sys/powerpc/powernv X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: head/sys/powerpc/powernv X-SVN-Commit-Revision: 366047 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 01:37:01 -0000 Author: bdragon Date: Wed Sep 23 01:37:01 2020 New Revision: 366047 URL: https://svnweb.freebsd.org/changeset/base/366047 Log: [PowerPC64LE] Endian fixes for opal_pci.c. Since OPAL runs in big endian, any data being passed back and forth via memory instead of registers needs to be byteswapped. From my notes during development: "A good way to find candidates is to look for vtophys() in opal_call() parameters. The memory being passed will be written into in BE." Sponsored by: Tag1 Consulting, Inc. Modified: head/sys/powerpc/powernv/opal_pci.c Modified: head/sys/powerpc/powernv/opal_pci.c ============================================================================== --- head/sys/powerpc/powernv/opal_pci.c Wed Sep 23 01:33:54 2020 (r366046) +++ head/sys/powerpc/powernv/opal_pci.c Wed Sep 23 01:37:01 2020 (r366047) @@ -524,11 +524,12 @@ opalpci_read_config(device_t dev, u_int bus, u_int slo case 2: error = opal_call(OPAL_PCI_CONFIG_READ_HALF_WORD, sc->phb_id, config_addr, reg, vtophys(&half)); - word = half; + word = be16toh(half); break; case 4: error = opal_call(OPAL_PCI_CONFIG_READ_WORD, sc->phb_id, config_addr, reg, vtophys(&word)); + word = be32toh(word); break; default: error = OPAL_SUCCESS; @@ -547,6 +548,7 @@ opalpci_read_config(device_t dev, u_int bus, u_int slo opal_call(OPAL_PCI_EEH_FREEZE_STATUS, sc->phb_id, OPAL_PCI_DEFAULT_PE, vtophys(&eeh_state), vtophys(&err_type), NULL); + err_type = be16toh(err_type); /* XXX unused */ if (eeh_state != OPAL_EEH_STOPPED_NOT_FROZEN) opal_call(OPAL_PCI_EEH_FREEZE_CLEAR, sc->phb_id, OPAL_PCI_DEFAULT_PE, From owner-svn-src-head@freebsd.org Wed Sep 23 01:41:52 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 82CC63E856B; Wed, 23 Sep 2020 01:41:52 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bx1B82rqMz43TY; Wed, 23 Sep 2020 01:41:52 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 469AA8C57; Wed, 23 Sep 2020 01:41:52 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08N1fq0O078369; Wed, 23 Sep 2020 01:41:52 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08N1fq99078368; Wed, 23 Sep 2020 01:41:52 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202009230141.08N1fq99078368@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Wed, 23 Sep 2020 01:41:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366048 - head/sys/powerpc/powernv X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: head/sys/powerpc/powernv X-SVN-Commit-Revision: 366048 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 01:41:52 -0000 Author: bdragon Date: Wed Sep 23 01:41:51 2020 New Revision: 366048 URL: https://svnweb.freebsd.org/changeset/base/366048 Log: [PowerPC64LE] Endian fix for opal_dev.c. Not much to say here, another missing be64toh() in memory that was written from OPAL. Sponsored by: Tag1 Consulting, Inc. Modified: head/sys/powerpc/powernv/opal_dev.c Modified: head/sys/powerpc/powernv/opal_dev.c ============================================================================== --- head/sys/powerpc/powernv/opal_dev.c Wed Sep 23 01:37:01 2020 (r366047) +++ head/sys/powerpc/powernv/opal_dev.c Wed Sep 23 01:41:51 2020 (r366048) @@ -135,7 +135,7 @@ opal_heartbeat(void) events = 0; /* Turn the OPAL state crank */ opal_call(OPAL_POLL_EVENTS, vtophys(&events)); - if (events & OPAL_EVENT_MSG_PENDING) + if (be64toh(events) & OPAL_EVENT_MSG_PENDING) opal_handle_messages(); tsleep(opal_hb_proc, 0, "opal", MSEC_2_TICKS(opal_heartbeat_ms)); From owner-svn-src-head@freebsd.org Wed Sep 23 01:49:37 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DF20B3E8AFF; Wed, 23 Sep 2020 01:49:37 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bx1M55Tt5z44Cg; Wed, 23 Sep 2020 01:49:37 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9FB0E9004; Wed, 23 Sep 2020 01:49:37 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08N1nbb5078879; Wed, 23 Sep 2020 01:49:37 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08N1nbXP078877; Wed, 23 Sep 2020 01:49:37 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202009230149.08N1nbXP078877@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Wed, 23 Sep 2020 01:49:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366049 - head/sys/powerpc/powernv X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: head/sys/powerpc/powernv X-SVN-Commit-Revision: 366049 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 01:49:37 -0000 Author: bdragon Date: Wed Sep 23 01:49:37 2020 New Revision: 366049 URL: https://svnweb.freebsd.org/changeset/base/366049 Log: [PowerPC64LE] Get XIVE up and running. More endian conversion. * Install TCEs correctly (i.e. in big endian) * Convert to big endian and back when setting up queue pages and IRQs. Sponsored by: Tag1 Consulting, Inc. Modified: head/sys/powerpc/powernv/opal_pci.c head/sys/powerpc/powernv/xive.c Modified: head/sys/powerpc/powernv/opal_pci.c ============================================================================== --- head/sys/powerpc/powernv/opal_pci.c Wed Sep 23 01:41:51 2020 (r366048) +++ head/sys/powerpc/powernv/opal_pci.c Wed Sep 23 01:49:37 2020 (r366049) @@ -385,7 +385,7 @@ opalpci_attach(device_t dev) (uintmax_t)sc->phb_id); for (i = 0; i < entries; i++) - sc->tce[i] = (i * tce_size) | OPAL_PCI_TCE_R | OPAL_PCI_TCE_W; + sc->tce[i] = htobe64((i * tce_size) | OPAL_PCI_TCE_R | OPAL_PCI_TCE_W); /* Map TCE for every PE. It seems necessary for Power8 */ for (i = 0; i < npe; i++) { Modified: head/sys/powerpc/powernv/xive.c ============================================================================== --- head/sys/powerpc/powernv/xive.c Wed Sep 23 01:41:51 2020 (r366048) +++ head/sys/powerpc/powernv/xive.c Wed Sep 23 01:49:37 2020 (r366049) @@ -377,6 +377,9 @@ xive_attach(device_t dev) opal_call(OPAL_XIVE_GET_VP_INFO, xive_cpud->vp, NULL, vtophys(&xive_cpud->cam), NULL, vtophys(&xive_cpud->chip)); + xive_cpud->cam = be64toh(xive_cpud->cam); + xive_cpud->chip = be64toh(xive_cpud->chip); + /* Allocate the queue page and populate the queue state data. */ xive_cpud->queue.q_page = contigmalloc(PAGE_SIZE, M_XIVE, M_ZERO | M_WAITOK, 0, BUS_SPACE_MAXADDR, PAGE_SIZE, 0); @@ -707,6 +710,12 @@ xive_init_irq(struct xive_irq *irqd, u_int irq) vtophys(&trig_phys), vtophys(&esb_shift), vtophys(&irqd->chip)); + irqd->flags = be64toh(irqd->flags); + eoi_phys = be64toh(eoi_phys); + trig_phys = be64toh(trig_phys); + esb_shift = be32toh(esb_shift); + irqd->chip = be32toh(irqd->chip); + irqd->girq = irq; irqd->esb_size = 1 << esb_shift; irqd->eoi_page = (vm_offset_t)pmap_mapdev(eoi_phys, irqd->esb_size); @@ -721,6 +730,10 @@ xive_init_irq(struct xive_irq *irqd, u_int irq) opal_call(OPAL_XIVE_GET_IRQ_CONFIG, irq, vtophys(&irqd->vp), vtophys(&irqd->prio), vtophys(&irqd->lirq)); + + irqd->vp = be64toh(irqd->vp); + irqd->prio = be64toh(irqd->prio); + irqd->lirq = be32toh(irqd->lirq); } /* Allocate an IRQ struct before populating it. */ From owner-svn-src-head@freebsd.org Wed Sep 23 01:51:01 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E68363E8DAF; Wed, 23 Sep 2020 01:51:01 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bx1Nj5rtvz44Kh; Wed, 23 Sep 2020 01:51:01 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AC5378D2C; Wed, 23 Sep 2020 01:51:01 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08N1p1Wq081652; Wed, 23 Sep 2020 01:51:01 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08N1p1P9081651; Wed, 23 Sep 2020 01:51:01 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202009230151.08N1p1P9081651@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Wed, 23 Sep 2020 01:51:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366051 - head/sys/powerpc/powernv X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: head/sys/powerpc/powernv X-SVN-Commit-Revision: 366051 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 01:51:02 -0000 Author: bdragon Date: Wed Sep 23 01:51:01 2020 New Revision: 366051 URL: https://svnweb.freebsd.org/changeset/base/366051 Log: [PowerPC64LE] Endian fix for opal_hmi.c Another boring one. We need to endian swap before checking flags. Sponsored by: Tag1 Consulting, Inc. Modified: head/sys/powerpc/powernv/opal_hmi.c Modified: head/sys/powerpc/powernv/opal_hmi.c ============================================================================== --- head/sys/powerpc/powernv/opal_hmi.c Wed Sep 23 01:49:50 2020 (r366050) +++ head/sys/powerpc/powernv/opal_hmi.c Wed Sep 23 01:51:01 2020 (r366051) @@ -94,7 +94,7 @@ opal_hmi_handler2(struct trapframe *frame) *flags = 0; err = opal_call(OPAL_HANDLE_HMI2, DMAP_TO_PHYS((vm_offset_t)flags)); - if (*flags & OPAL_HMI_FLAGS_TOD_TB_FAIL) + if (be64toh(*flags) & OPAL_HMI_FLAGS_TOD_TB_FAIL) panic("TOD/TB recovery failure"); if (err == OPAL_SUCCESS) From owner-svn-src-head@freebsd.org Wed Sep 23 01:56:27 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 79D5D3E90F7; Wed, 23 Sep 2020 01:56:27 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bx1Vz1gXGz44tX; Wed, 23 Sep 2020 01:56:27 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BC9839206; Wed, 23 Sep 2020 01:56:26 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08N1uQiN085235; Wed, 23 Sep 2020 01:56:26 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08N1uQeb085234; Wed, 23 Sep 2020 01:56:26 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202009230156.08N1uQeb085234@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Wed, 23 Sep 2020 01:56:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366053 - in head/sys/powerpc: aim include X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: in head/sys/powerpc: aim include X-SVN-Commit-Revision: 366053 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 01:56:28 -0000 Author: bdragon Date: Wed Sep 23 01:56:26 2020 New Revision: 366053 URL: https://svnweb.freebsd.org/changeset/base/366053 Log: [PowerPC64LE] Fix AP spinup on powernv. OPAL unconditionally enters secondary CPUs with only HV and SF set. I tried writing a secondary entry point instead, but OPAL rejected it and I am unsure why, so I resorted to making the system reset interrupt endian-flexible. This means we take a slight performance hit on wakeup on LE, but it is a good stopgap until we can figure out a reliable way to make OPAL enter where we want it to. It probably makes sense to have it around anyway, because I can imagine scenarios where the cpu resets itself to BE and does a software reset. Sponsored by: Tag1 Consulting, Inc. Modified: head/sys/powerpc/aim/trap_subr64.S head/sys/powerpc/include/asm.h Modified: head/sys/powerpc/aim/trap_subr64.S ============================================================================== --- head/sys/powerpc/aim/trap_subr64.S Wed Sep 23 01:56:21 2020 (r366052) +++ head/sys/powerpc/aim/trap_subr64.S Wed Sep 23 01:56:26 2020 (r366053) @@ -319,6 +319,19 @@ dtrace_invop_calltrap_addr: .globl CNAME(cpu_wakeup_handler) .p2align 3 CNAME(rstcode): +#ifdef __LITTLE_ENDIAN__ + /* + * XXX This shouldn't be necessary. + * + * According to the ISA documentation, LE should be set from HILE + * or the LPCR ILE bit automatically. However, the entry into this + * vector from OPAL_START_CPU does not honor this correctly. + * + * We should be able to define an alternate entry for opal's + * start_kernel_secondary asm code to branch to. + */ + RETURN_TO_NATIVE_ENDIAN +#endif /* * Check if this is software reset or * processor is waking up from power saving mode Modified: head/sys/powerpc/include/asm.h ============================================================================== --- head/sys/powerpc/include/asm.h Wed Sep 23 01:56:21 2020 (r366052) +++ head/sys/powerpc/include/asm.h Wed Sep 23 01:56:26 2020 (r366053) @@ -213,6 +213,9 @@ name: \ * wrong endian. * * This sequence is NMI-reentrant. + * + * Do not change the length of this sequence without looking at the users, + * this is used in size-constrained places like the reset vector! */ #define RETURN_TO_NATIVE_ENDIAN \ tdi 0, %r0, 0x48; /* Endian swapped: b . + 8 */\ From owner-svn-src-head@freebsd.org Wed Sep 23 02:05:44 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F0FC63E9584; Wed, 23 Sep 2020 02:05:44 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bx1jh66TPz45Mh; Wed, 23 Sep 2020 02:05:44 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B36C3922B; Wed, 23 Sep 2020 02:05:44 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08N25iYL091418; Wed, 23 Sep 2020 02:05:44 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08N25iaD091417; Wed, 23 Sep 2020 02:05:44 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202009230205.08N25iaD091417@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Wed, 23 Sep 2020 02:05:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366054 - in head/lib/libc: powerpc/softfloat powerpc64 X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: in head/lib/libc: powerpc/softfloat powerpc64 X-SVN-Commit-Revision: 366054 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 02:05:45 -0000 Author: bdragon Date: Wed Sep 23 02:05:44 2020 New Revision: 366054 URL: https://svnweb.freebsd.org/changeset/base/366054 Log: [PowerPC64LE] Fix gdtoa configurations on LE. gdtoa wins the award for "most outdated endianness naming convention" with its IEEE_8087 vs IEEE_MC68k defines. I had a good chuckle. Update softfloat and arith.h to adjust to BE or LE automatically based on the low level preprocessor defines. Fixes printf/scanf on PowerPC64LE, although there is still a problem lurking regarding Signalling NaNs... Sponsored by: Tag1 Consulting, Inc. Modified: head/lib/libc/powerpc/softfloat/powerpc-gcc.h head/lib/libc/powerpc64/arith.h Modified: head/lib/libc/powerpc/softfloat/powerpc-gcc.h ============================================================================== --- head/lib/libc/powerpc/softfloat/powerpc-gcc.h Wed Sep 23 01:56:26 2020 (r366053) +++ head/lib/libc/powerpc/softfloat/powerpc-gcc.h Wed Sep 23 02:05:44 2020 (r366054) @@ -6,7 +6,11 @@ One of the macros `BIGENDIAN' or `LITTLEENDIAN' must be defined. ------------------------------------------------------------------------------- */ +#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +#define LITTLEENDIAN +#else #define BIGENDIAN +#endif /* ------------------------------------------------------------------------------- Modified: head/lib/libc/powerpc64/arith.h ============================================================================== --- head/lib/libc/powerpc64/arith.h Wed Sep 23 01:56:26 2020 (r366053) +++ head/lib/libc/powerpc64/arith.h Wed Sep 23 02:05:44 2020 (r366054) @@ -11,8 +11,13 @@ * architecture. See contrib/gdtoa/gdtoaimp.h for details. */ +#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +#define IEEE_8087 +#define Arith_Kind_ASL 1 +#else #define IEEE_MC68k #define Arith_Kind_ASL 2 +#endif #define Long int #define Intcast (int)(long) #define Double_Align From owner-svn-src-head@freebsd.org Wed Sep 23 02:11:25 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 663B03E9545; Wed, 23 Sep 2020 02:11:25 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bx1rF20dkz45WF; Wed, 23 Sep 2020 02:11:25 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 291E39239; Wed, 23 Sep 2020 02:11:25 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08N2BPvf091787; Wed, 23 Sep 2020 02:11:25 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08N2BOxI091785; Wed, 23 Sep 2020 02:11:24 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202009230211.08N2BOxI091785@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Wed, 23 Sep 2020 02:11:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366055 - head/lib/libkvm X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: head/lib/libkvm X-SVN-Commit-Revision: 366055 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 02:11:25 -0000 Author: bdragon Date: Wed Sep 23 02:11:24 2020 New Revision: 366055 URL: https://svnweb.freebsd.org/changeset/base/366055 Log: [PowerPC64LE] libkvm powerpc64le support. * Add missing _kvm16toh() function. * Teach libkvm about powerpc64le. Sponsored by: Tag1 Consulting, Inc. Modified: head/lib/libkvm/kvm_powerpc64.c head/lib/libkvm/kvm_private.h Modified: head/lib/libkvm/kvm_powerpc64.c ============================================================================== --- head/lib/libkvm/kvm_powerpc64.c Wed Sep 23 02:05:44 2020 (r366054) +++ head/lib/libkvm/kvm_powerpc64.c Wed Sep 23 02:11:24 2020 (r366055) @@ -53,22 +53,23 @@ struct vmstate { }; static int -valid_elf_header(Elf64_Ehdr *eh) +valid_elf_header(kvm_t *kd, Elf64_Ehdr *eh) { if (!IS_ELF(*eh)) return (0); if (eh->e_ident[EI_CLASS] != ELFCLASS64) return (0); - if (eh->e_ident[EI_DATA] != ELFDATA2MSB) + if (eh->e_ident[EI_DATA] != ELFDATA2MSB && + eh->e_ident[EI_DATA] != ELFDATA2LSB) return (0); if (eh->e_ident[EI_VERSION] != EV_CURRENT) return (0); if (eh->e_ident[EI_OSABI] != ELFOSABI_STANDALONE) return (0); - if (be16toh(eh->e_type) != ET_CORE) + if (_kvm16toh(kd, eh->e_type) != ET_CORE) return (0); - if (be16toh(eh->e_machine) != EM_PPC64) + if (_kvm16toh(kd, eh->e_machine) != EM_PPC64) return (0); /* Can't think of anything else to check... */ return (1); @@ -80,7 +81,8 @@ dump_header_size(struct kerneldumpheader *dh) if (strcmp(dh->magic, KERNELDUMPMAGIC) != 0) return (0); - if (strcmp(dh->architecture, "powerpc64") != 0) + if (strcmp(dh->architecture, "powerpc64") != 0 && + strcmp(dh->architecture, "powerpc64le") != 0) return (0); /* That should do it... */ return (sizeof(*dh)); @@ -107,7 +109,7 @@ powerpc_maphdrs(kvm_t *kd) } vm->dmphdrsz = 0; vm->eh = vm->map; - if (!valid_elf_header(vm->eh)) { + if (!valid_elf_header(kd, vm->eh)) { /* * Hmmm, no ELF header. Maybe we still have a dump header. * This is normal when the core file wasn't created by @@ -118,11 +120,11 @@ powerpc_maphdrs(kvm_t *kd) if (vm->dmphdrsz == 0) goto inval; vm->eh = (void *)((uintptr_t)vm->map + vm->dmphdrsz); - if (!valid_elf_header(vm->eh)) + if (!valid_elf_header(kd, vm->eh)) goto inval; } - mapsz = be16toh(vm->eh->e_phentsize) * be16toh(vm->eh->e_phnum) + - be64toh(vm->eh->e_phoff); + mapsz = _kvm16toh(kd, vm->eh->e_phentsize) * + _kvm16toh(kd, vm->eh->e_phnum) + _kvm64toh(kd, vm->eh->e_phoff); munmap(vm->map, vm->mapsz); /* Map all headers. */ @@ -134,7 +136,7 @@ powerpc_maphdrs(kvm_t *kd) } vm->eh = (void *)((uintptr_t)vm->map + vm->dmphdrsz); vm->ph = (void *)((uintptr_t)vm->eh + - (uintptr_t)be64toh(vm->eh->e_phoff)); + (uintptr_t)_kvm64toh(kd, vm->eh->e_phoff)); return (0); inval: @@ -155,19 +157,21 @@ powerpc64_va2off(kvm_t *kd, kvaddr_t va, off_t *ofs) int nph; ph = vm->ph; - nph = be16toh(vm->eh->e_phnum); - while (nph && (va < be64toh(ph->p_vaddr) || - va >= be64toh(ph->p_vaddr) + be64toh(ph->p_memsz))) { + nph = _kvm16toh(kd, vm->eh->e_phnum); + while (nph && (va < _kvm64toh(kd, ph->p_vaddr) || + va >= _kvm64toh(kd, ph->p_vaddr) + _kvm64toh(kd, ph->p_memsz))) { nph--; - ph = (void *)((uintptr_t)ph + be16toh(vm->eh->e_phentsize)); + ph = (void *)((uintptr_t)ph + + _kvm16toh(kd, vm->eh->e_phentsize)); } if (nph == 0) return (0); /* Segment found. Return file offset and range. */ - *ofs = vm->dmphdrsz + be64toh(ph->p_offset) + - (va - be64toh(ph->p_vaddr)); - return (be64toh(ph->p_memsz) - (va - be64toh(ph->p_vaddr))); + *ofs = vm->dmphdrsz + _kvm64toh(kd, ph->p_offset) + + (va - _kvm64toh(kd, ph->p_vaddr)); + return (_kvm64toh(kd, ph->p_memsz) - + (va - _kvm64toh(kd, ph->p_vaddr))); } static void @@ -190,6 +194,14 @@ _powerpc64_probe(kvm_t *kd) } static int +_powerpc64le_probe(kvm_t *kd) +{ + + return (_kvm_probe_elf_kernel(kd, ELFCLASS64, EM_PPC64) && + kd->nlehdr.e_ident[EI_DATA] == ELFDATA2LSB); +} + +static int _powerpc64_initvtop(kvm_t *kd) { @@ -209,7 +221,7 @@ _powerpc64_kvatop(kvm_t *kd, kvaddr_t va, off_t *ofs) struct vmstate *vm; vm = kd->vmst; - if (be64toh(vm->ph->p_paddr) == 0xffffffffffffffff) + if (_kvm64toh(kd, vm->ph->p_paddr) == 0xffffffffffffffff) return ((int)powerpc64_va2off(kd, va, ofs)); _kvm_err(kd, kd->program, "Raw corefile not supported"); @@ -220,13 +232,24 @@ static int _powerpc64_native(kvm_t *kd __unused) { -#ifdef __powerpc64__ +#if defined(__powerpc64__) && BYTE_ORDER == BIG_ENDIAN return (1); #else return (0); #endif } +static int +_powerpc64le_native(kvm_t *kd __unused) +{ + +#if defined(__powerpc64__) && BYTE_ORDER == LITTLE_ENDIAN + return (1); +#else + return (0); +#endif +} + static struct kvm_arch kvm_powerpc64 = { .ka_probe = _powerpc64_probe, .ka_initvtop = _powerpc64_initvtop, @@ -235,4 +258,13 @@ static struct kvm_arch kvm_powerpc64 = { .ka_native = _powerpc64_native, }; +static struct kvm_arch kvm_powerpc64le = { + .ka_probe = _powerpc64le_probe, + .ka_initvtop = _powerpc64_initvtop, + .ka_freevtop = _powerpc64_freevtop, + .ka_kvatop = _powerpc64_kvatop, + .ka_native = _powerpc64le_native, +}; + KVM_ARCH(kvm_powerpc64); +KVM_ARCH(kvm_powerpc64le); Modified: head/lib/libkvm/kvm_private.h ============================================================================== --- head/lib/libkvm/kvm_private.h Wed Sep 23 02:05:44 2020 (r366054) +++ head/lib/libkvm/kvm_private.h Wed Sep 23 02:11:24 2020 (r366055) @@ -134,6 +134,16 @@ struct kvm_bitmap { /* * Functions used internally by kvm, but across kvm modules. */ +static inline uint16_t +_kvm16toh(kvm_t *kd, uint16_t val) +{ + + if (kd->nlehdr.e_ident[EI_DATA] == ELFDATA2LSB) + return (le16toh(val)); + else + return (be16toh(val)); +} + static inline uint32_t _kvm32toh(kvm_t *kd, uint32_t val) { From owner-svn-src-head@freebsd.org Wed Sep 23 02:17:45 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3EA8A3E9A14; Wed, 23 Sep 2020 02:17:45 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bx1zY0w8vz45v4; Wed, 23 Sep 2020 02:17:45 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 02B498FDD; Wed, 23 Sep 2020 02:17:45 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08N2HiIC097559; Wed, 23 Sep 2020 02:17:44 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08N2HiDi097558; Wed, 23 Sep 2020 02:17:44 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202009230217.08N2HiDi097558@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Wed, 23 Sep 2020 02:17:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366056 - head/lib/libsqlite3 X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: head/lib/libsqlite3 X-SVN-Commit-Revision: 366056 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 02:17:45 -0000 Author: bdragon Date: Wed Sep 23 02:17:44 2020 New Revision: 366056 URL: https://svnweb.freebsd.org/changeset/base/366056 Log: [PowerPC64LE] Pass our byte order to the sqlite3 build. Due to the sqlite3 endian detection code preferring to check platform defines instead of checking endian defines, it is necessary to manually set the endianness on PowerPC64LE. Unlike other bi-endian platforms, PowerPC64LE relies entirely on the generic endianness macros like __BYTE_ORDER__ and has no platform-specific define to denote little endian. Add -DSQLITE_BYTEORDER=1234 to the CFLAGS when building libsqlite3 on powerpc64le. Fixes runtime operation of sqlite on PowerPC64LE. Sponsored by: Tag1 Consulting, Inc. Modified: head/lib/libsqlite3/Makefile Modified: head/lib/libsqlite3/Makefile ============================================================================== --- head/lib/libsqlite3/Makefile Wed Sep 23 02:11:24 2020 (r366055) +++ head/lib/libsqlite3/Makefile Wed Sep 23 02:17:44 2020 (r366056) @@ -35,4 +35,8 @@ CFLAGS+= -I${SQLITE} \ -D_REENTRANT=1 \ -DSQLITE_THREADSAFE=1 +.if ${MACHINE_ARCH} == "powerpc64le" +CFLAGS+= -DSQLITE_BYTEORDER=1234 +.endif + .include From owner-svn-src-head@freebsd.org Wed Sep 23 02:28:20 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7CD173E9E6F; Wed, 23 Sep 2020 02:28:20 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bx2Cm2jSPz46lv; Wed, 23 Sep 2020 02:28:20 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4026192D4; Wed, 23 Sep 2020 02:28:20 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08N2SKdo003794; Wed, 23 Sep 2020 02:28:20 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08N2SKDR003793; Wed, 23 Sep 2020 02:28:20 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202009230228.08N2SKDR003793@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Wed, 23 Sep 2020 02:28:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366057 - head/sys/powerpc/powerpc X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: head/sys/powerpc/powerpc X-SVN-Commit-Revision: 366057 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 02:28:20 -0000 Author: bdragon Date: Wed Sep 23 02:28:19 2020 New Revision: 366057 URL: https://svnweb.freebsd.org/changeset/base/366057 Log: [PowerPC64LE] Fix sleeping on POWER8. Due to enter_idle_powerx fabricating a MSR from scratch, it is necessary for it to care about the endianness, so we don't accidentally switch endian the first time we idle a thread. Took about five seconds to spot after seeing an unmangled backtrace. The hard bit was needing to temporarily set up a mutex to sort out the logjam that happens when every thread simultaneously wakes up in the wrong endian due to the panic IPI and panics, leaving what I can best describe as "alphabet soup" on the console. Luckily, I already had a patch sitting around to do that. This brings POWER8 up to equivilence with POWER9 on PPC64LE. Sponsored by: Tag1 Consulting, Inc. Modified: head/sys/powerpc/powerpc/cpu_subr64.S Modified: head/sys/powerpc/powerpc/cpu_subr64.S ============================================================================== --- head/sys/powerpc/powerpc/cpu_subr64.S Wed Sep 23 02:17:44 2020 (r366056) +++ head/sys/powerpc/powerpc/cpu_subr64.S Wed Sep 23 02:28:19 2020 (r366057) @@ -71,7 +71,11 @@ ENTRY(enter_idle_powerx) /* Set MSR */ li %r3,0 +#ifdef __LITTLE_ENDIAN__ + ori %r3,%r3,(PSL_ME | PSL_RI | PSL_LE) +#else ori %r3,%r3,(PSL_ME | PSL_RI) +#endif li %r8,0x9 /* PSL_SF and PSL_HV */ insrdi %r3,%r8,4,0 mtsrr1 %r3 From owner-svn-src-head@freebsd.org Wed Sep 23 02:30:25 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3E68C3E9FE7; Wed, 23 Sep 2020 02:30:25 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bx2G90qrwz46q4; Wed, 23 Sep 2020 02:30:25 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from [IPv6:2800:484:5381:a440:f6:e144:b425:3786] (unknown [IPv6:2800:484:5381:a440:f6:e144:b425:3786]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: pfg) by smtp.freebsd.org (Postfix) with ESMTPSA id 829482170C; Wed, 23 Sep 2020 02:30:24 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Subject: Re: svn commit: r366032 - in head: . share/mk stand sys/conf sys/modules sys/powerpc/include To: Brandon Bergren , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202009222349.08MNnUQj003883@repo.freebsd.org> From: Pedro Giffuni Organization: FreeBSD Message-ID: <43a11768-51e5-a3a7-3f52-29dcfb7c6bd8@FreeBSD.org> Date: Tue, 22 Sep 2020 21:30:23 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <202009222349.08MNnUQj003883@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 02:30:25 -0000 On 22/09/2020 18:49, Brandon Bergren wrote: > Author: bdragon > Date: Tue Sep 22 23:49:30 2020 > New Revision: 366032 > URL: https://svnweb.freebsd.org/changeset/base/366032 > > Log: > [PowerPC64LE] Set up powerpc.powerpc64le architecture > > This is the initial set up for PowerPC64LE. > > The current plan is for this arch to remain experimental for FreeBSD 13. > > This started as a weekend learning project for me and kinda snowballed from > there. > > (More to follow momentarily.) Very nice "learning" project ... Huge thanks for taking time on this and having fun in the process ! Pedro. From owner-svn-src-head@freebsd.org Wed Sep 23 02:37:27 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DDCBA3EA1EE; Wed, 23 Sep 2020 02:37:27 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bx2QH5VDYz472r; Wed, 23 Sep 2020 02:37:27 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9FEF79736; Wed, 23 Sep 2020 02:37:27 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08N2bRXu009880; Wed, 23 Sep 2020 02:37:27 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08N2bRRj009879; Wed, 23 Sep 2020 02:37:27 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202009230237.08N2bRRj009879@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Wed, 23 Sep 2020 02:37:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366058 - head/usr.sbin/ntp X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: head/usr.sbin/ntp X-SVN-Commit-Revision: 366058 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 02:37:27 -0000 Author: bdragon Date: Wed Sep 23 02:37:27 2020 New Revision: 366058 URL: https://svnweb.freebsd.org/changeset/base/366058 Log: [PowerPC] Fix multiple ntp configuration issues * powerpc time_t is 64 bit, not 32 bit. * Add definition for powerpc64le. With this, powerpc64le ntpd and ntpdate operate correctly instead of corrupting the clock and exiting. Tested on powerpc64, powerpc64le, and powerpc. No feedback from cy@. I am a bit confused as to how SIZEOF_TIME_T being wrong ever worked on powerpc, it being big endian and all. Sponsored by: Tag1 Consulting, Inc. Differential Revision: https://reviews.freebsd.org/D26379 Modified: head/usr.sbin/ntp/config.h Modified: head/usr.sbin/ntp/config.h ============================================================================== --- head/usr.sbin/ntp/config.h Wed Sep 23 02:28:19 2020 (r366057) +++ head/usr.sbin/ntp/config.h Wed Sep 23 02:37:27 2020 (r366058) @@ -1548,7 +1548,7 @@ #define SIZEOF_SIGNED_CHAR 1 /* The size of `time_t', as computed by sizeof. */ -#if defined(__i386__) || defined(__powerpc__) +#if defined(__i386__) #define SIZEOF_TIME_T 4 #else #define SIZEOF_TIME_T 8 @@ -1580,6 +1580,8 @@ /* canonical system (cpu-vendor-os) of where we should run */ #if defined(__amd64__) #define STR_SYSTEM "amd64-undermydesk-freebsd" +#elif defined(__powerpc64__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +#define STR_SYSTEM "powerpc64le-undermydesk-freebsd" #elif defined(__powerpc64__) #define STR_SYSTEM "powerpc64-undermydesk-freebsd" #elif defined(__powerpc__) @@ -1660,8 +1662,8 @@ typedef unsigned int uintptr_t; /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined(__ARMEB__) || defined(__MIPSEB__) || defined(__powerpc__) || \ - defined(__powerpc64__) +#if defined(__ARMEB__) || defined(__MIPSEB__) || \ + (defined(__powerpc__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) #define WORDS_BIGENDIAN 1 #endif From owner-svn-src-head@freebsd.org Wed Sep 23 02:59:28 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0D1BC3EA639; Wed, 23 Sep 2020 02:59:28 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oi1-f181.google.com (mail-oi1-f181.google.com [209.85.167.181]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bx2vg0YjVz483W; Wed, 23 Sep 2020 02:59:26 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-oi1-f181.google.com with SMTP id 185so23404764oie.11; Tue, 22 Sep 2020 19:59:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hyt8XJoZKfgydRSz1yV9/iDsnDRB3aCzZoD8PFlCKpk=; b=rXHCkKnOqH5hmLpWGXdae9ffbNRBJwc508L+tgd2oN/ghKvqYo2kog/pxPNjkDh/Ve ilXXqz4/hF8cNV3zaY2j4w+/NisW4bXDl+ra8zSzTntXlw916tGPMPoM/lqyxmtOY7CZ DOCGIwwslvVsuyTeaHS0hXw4sEzMb4SQCvHfYmnptrHKf4OOvrR048ZWGbIgo64mhEUP Aj/GFaD2WQoKb2iZT6H+1DWC5NYKA7JJGpbqAXpAmn6Gf4ZX154b5VS6NEhnEZaf6gYn +Dobpt60Dj2Z6eTrGtPTaRJdPD6dRYRUdYlzSpxUXiW4P/+UWeHbBrFyGuxNuNLCQ4fT 71yA== X-Gm-Message-State: AOAM533F9wAdxA/7TroLRjNUaUKtYMZdWqumU0EcLRixlvpg3sN6wkns ewhda4LsyZPmEBc8zd4sDRyEl1f9G96Q5RvZClDvOUFO X-Google-Smtp-Source: ABdhPJyNzmckeM11rwx3Y1JP0rk95hVRK35iFNMZGkfATQf3X1iFCEcIyHYpcmLDyAcss7GV9zEq7h1482HyhizPQA4= X-Received: by 2002:aca:4b03:: with SMTP id y3mr4664919oia.57.1600829965674; Tue, 22 Sep 2020 19:59:25 -0700 (PDT) MIME-Version: 1.0 References: <202009112049.08BKnavL032212@repo.freebsd.org> In-Reply-To: From: Alan Somers Date: Tue, 22 Sep 2020 20:59:14 -0600 Message-ID: Subject: Re: svn commit: r365643 - head/bin/cp To: Warner Losh Cc: Kyle Evans , Ian Lepore , Mateusz Guzik , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4Bx2vg0YjVz483W X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.167.181 as permitted sender) smtp.mailfrom=asomers@gmail.com X-Spamd-Result: default: False [-1.65 / 15.00]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head]; FREEMAIL_CC(0.00)[freebsd.org,gmail.com]; FREEFALL_USER(0.00)[asomers]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; NEURAL_HAM_LONG(-0.96)[-0.965]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[freebsd.org]; ARC_NA(0.00)[]; NEURAL_SPAM_SHORT(0.22)[0.217]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; RCPT_COUNT_SEVEN(0.00)[7]; RCVD_IN_DNSWL_NONE(0.00)[209.85.167.181:from]; NEURAL_HAM_MEDIUM(-0.90)[-0.900]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.167.181:from]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 02:59:28 -0000 Go ahead and commit. Consider it reviewed by me. And if I understand correctly, this commit means there's no need for a special updating procedure, right? On Tue, Sep 22, 2020 at 6:55 PM Warner Losh wrote: > > > On Tue, Sep 22, 2020 at 5:17 PM Kyle Evans wrote: > >> On Tue, Sep 22, 2020, 17:02 Warner Losh wrote: >> >>> >>> >>> On Tue, Sep 22, 2020 at 3:55 PM Kyle Evans wrote: >>> >>>> On Tue, Sep 22, 2020 at 4:53 PM Ian Lepore wrote: >>>> > >>>> > On Tue, 2020-09-22 at 15:50 -0600, Warner Losh wrote: >>>> > > I think it's a great leap sideways, but I've done cp /dev/null foo >>>> to >>>> > > clear >>>> > > it out for 35 years now... It's why it feels like a workaround. >>>> > > >>>> > > Though it is a legit optimization, no matter the feelings. As for >>>> > > clearer, >>>> > > I'm less sure since then I have to remember what the : operator >>>> does. >>>> > > >>>> > > Warner >>>> > > >>>> > >>>> > For me, :> is idiomatic (but ugly). >>>> > >>>> > On the other hand, the cp /dev/null had a nice dogfooding aspect to >>>> > it... when we broke cp by accident, its use in the build system was >>>> the >>>> > first alarm to go off. >>>> > >>>> > --Ian >>>> > >>>> >>>> To be honest, this is a case that really should be covered by >>>> regression tests somewhere. >>>> >>> >>> It should (but isn't yet). >>> >>> Ian is right for old-school FreeBSD thinking. In that thinking the build >>> system should use an eclectic mix of tools to act as a fire-wall against >>> accidental breakage. >>> >>> Complete, effective, test suites give much better coverage... if they >>> are run... >>> >>> So until we run tests frequently, with loud regression squawking that's >>> as effective as build breakage, I tend to fall in the 'all of the above' >>> camp until that's in place... :) >>> >>> Warner >>> >>> P.S. though not, if I suppose, if it means that we're slowing down the >>> regression coverage uptake... >>> >> >> -- >> >> The test build was fine, please confirm if I can commit it or if someone >> else would like to write the UPDATING notice or start bootstrapping cp on >> systems that were affected. I'm not comfortable with not taking any path at >> all here, but this is a lot of friction for a small mechanical change to >> ease the pain. >> > > Sorry if I wasn't clear: I'm not objecting to the quick mechanical change > so much as complaining that I wish we had better test coverage. Don't let > that stop you from doing what's right (or I can if you'd like). > > Warner > From owner-svn-src-head@freebsd.org Wed Sep 23 03:01:15 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DCC0F3EAB66; Wed, 23 Sep 2020 03:01:15 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bx2xl4xSyz49YZ; Wed, 23 Sep 2020 03:01:15 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8E3EB9DBD; Wed, 23 Sep 2020 03:01:15 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08N31FeA024247; Wed, 23 Sep 2020 03:01:15 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08N31E8U024241; Wed, 23 Sep 2020 03:01:14 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202009230301.08N31E8U024241@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 23 Sep 2020 03:01:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366059 - in head: bin/cp bin/cp/tests etc/mtree X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head: bin/cp bin/cp/tests etc/mtree X-SVN-Commit-Revision: 366059 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 03:01:15 -0000 Author: kevans Date: Wed Sep 23 03:01:14 2020 New Revision: 366059 URL: https://svnweb.freebsd.org/changeset/base/366059 Log: cp: add some basic tests There are some tests available in the NetBSD test suite, but we don't currently pass all of those; further investigation will go into that. For now, just add a basic test as well as a test that copies from /dev/null to a file. The /dev/null test confirms that the file gets created if it's empty, then that it truncates the file if it's non-empty. This matches some usage that was previously employed in the build and was replaced in r366042 by a simpler shell construct. I will also plan on coming back to expand these in due time. MFC after: 1 week Added: head/bin/cp/tests/ head/bin/cp/tests/Makefile (contents, props changed) head/bin/cp/tests/cp_test.sh (contents, props changed) Modified: head/bin/cp/Makefile head/etc/mtree/BSD.tests.dist Modified: head/bin/cp/Makefile ============================================================================== --- head/bin/cp/Makefile Wed Sep 23 02:37:27 2020 (r366058) +++ head/bin/cp/Makefile Wed Sep 23 03:01:14 2020 (r366059) @@ -1,9 +1,14 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 # $FreeBSD$ +.include + PACKAGE=runtime PROG= cp SRCS= cp.c utils.c CFLAGS+= -DVM_AND_BUFFER_CACHE_SYNCHRONIZED -D_ACL_PRIVATE + +HAS_TESTS= +SUBDIR.${MK_TESTS}= tests .include Added: head/bin/cp/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/cp/tests/Makefile Wed Sep 23 03:01:14 2020 (r366059) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +PACKAGE= tests + +ATF_TESTS_SH= cp_test + +.include Added: head/bin/cp/tests/cp_test.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/cp/tests/cp_test.sh Wed Sep 23 03:01:14 2020 (r366059) @@ -0,0 +1,63 @@ +# +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright (c) 2020 Kyle Evans +# +# 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$ + +check_size() +{ + file=$1 + sz=$2 +20atf_check -o inline:"$sz\n" stat -f '%z' $file +} + +atf_test_case basic +basic_body() +{ + echo "foo" > bar + + atf_check cp bar baz + check_size baz 4 +} + +atf_test_case chrdev +chrdev_body() +{ + echo "foo" > bar + + check_size bar 4 + atf_check cp /dev/null trunc + check_size trunc 0 + atf_check cp bar trunc + check_size trunc 4 + atf_check cp /dev/null trunc + check_size trunc 0 +} + +atf_init_test_cases() +{ + atf_add_test_case basic + atf_add_test_case chrdev +} Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Wed Sep 23 02:37:27 2020 (r366058) +++ head/etc/mtree/BSD.tests.dist Wed Sep 23 03:01:14 2020 (r366059) @@ -12,6 +12,8 @@ .. chmod .. + cp + .. date .. dd From owner-svn-src-head@freebsd.org Wed Sep 23 03:01:52 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F18C13EAD0B; Wed, 23 Sep 2020 03:01:52 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bx2yS5wWzz49Y6; Wed, 23 Sep 2020 03:01:52 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f179.google.com (mail-qk1-f179.google.com [209.85.222.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id A458521848; Wed, 23 Sep 2020 03:01:52 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f179.google.com with SMTP id q5so21520963qkc.2; Tue, 22 Sep 2020 20:01:52 -0700 (PDT) X-Gm-Message-State: AOAM533pHxlRpjArI8U9EKg7ddvjs6amq4OFvNJ9T42cFKorH+X75dRz Qvl09s5y0q4sUmC7fyIo3SbmLojljg1tgATBHtc= X-Google-Smtp-Source: ABdhPJx5nPlvL8Ubuy1maw2fhyDWJVdKvgNgMmb1L6fIH3K5pByKYrPdFMqrxMykqPUcp3WjrUp1l4D4Mtv3jh1aiq8= X-Received: by 2002:a37:a189:: with SMTP id k131mr7804891qke.34.1600830112263; Tue, 22 Sep 2020 20:01:52 -0700 (PDT) MIME-Version: 1.0 References: <202009112049.08BKnavL032212@repo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Tue, 22 Sep 2020 22:01:40 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r365643 - head/bin/cp To: Alan Somers Cc: Warner Losh , Kyle Evans , Ian Lepore , Mateusz Guzik , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 03:01:53 -0000 Correct- we're good now. Thanks! On Tue, Sep 22, 2020 at 9:59 PM Alan Somers wrote: > > Go ahead and commit. Consider it reviewed by me. And if I understand co= rrectly, this commit means there's no need for a special updating procedure= , right? > > On Tue, Sep 22, 2020 at 6:55 PM Warner Losh wrote: >> >> >> >> On Tue, Sep 22, 2020 at 5:17 PM Kyle Evans wrote: >>> >>> On Tue, Sep 22, 2020, 17:02 Warner Losh wrote: >>>> >>>> >>>> >>>> On Tue, Sep 22, 2020 at 3:55 PM Kyle Evans wrote: >>>>> >>>>> On Tue, Sep 22, 2020 at 4:53 PM Ian Lepore wrote: >>>>> > >>>>> > On Tue, 2020-09-22 at 15:50 -0600, Warner Losh wrote: >>>>> > > I think it's a great leap sideways, but I've done cp /dev/null fo= o to >>>>> > > clear >>>>> > > it out for 35 years now... It's why it feels like a workaround. >>>>> > > >>>>> > > Though it is a legit optimization, no matter the feelings. As for >>>>> > > clearer, >>>>> > > I'm less sure since then I have to remember what the : operator d= oes. >>>>> > > >>>>> > > Warner >>>>> > > >>>>> > >>>>> > For me, :> is idiomatic (but ugly). >>>>> > >>>>> > On the other hand, the cp /dev/null had a nice dogfooding aspect to >>>>> > it... when we broke cp by accident, its use in the build system was= the >>>>> > first alarm to go off. >>>>> > >>>>> > --Ian >>>>> > >>>>> >>>>> To be honest, this is a case that really should be covered by >>>>> regression tests somewhere. >>>> >>>> >>>> It should (but isn't yet). >>>> >>>> Ian is right for old-school FreeBSD thinking. In that thinking the bui= ld system should use an eclectic mix of tools to act as a fire-wall against= accidental breakage. >>>> >>>> Complete, effective, test suites give much better coverage... if they = are run... >>>> >>>> So until we run tests frequently, with loud regression squawking that'= s as effective as build breakage, I tend to fall in the 'all of the above' = camp until that's in place... :) >>>> >>>> Warner >>>> >>>> P.S. though not, if I suppose, if it means that we're slowing down the= regression coverage uptake... >>> >>> >>> -- >>> >>> The test build was fine, please confirm if I can commit it or if someon= e else would like to write the UPDATING notice or start bootstrapping cp on= systems that were affected. I'm not comfortable with not taking any path a= t all here, but this is a lot of friction for a small mechanical change to = ease the pain. >> >> >> Sorry if I wasn't clear: I'm not objecting to the quick mechanical chang= e so much as complaining that I wish we had better test coverage. Don't let= that stop you from doing what's right (or I can if you'd like). >> >> Warner From owner-svn-src-head@freebsd.org Wed Sep 23 03:02:36 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 51C693EAD4A for ; Wed, 23 Sep 2020 03:02:36 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qv1-xf32.google.com (mail-qv1-xf32.google.com [IPv6:2607:f8b0:4864:20::f32]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bx2zH21Q4z49xw for ; Wed, 23 Sep 2020 03:02:35 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qv1-xf32.google.com with SMTP id cr8so10662176qvb.10 for ; Tue, 22 Sep 2020 20:02:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9E7qrpJUtIxmBvLDwAj5V1HBAxzr0O6z9ge/5zIMBMM=; b=kNBQRbPh/ZfiXgdmQfCvXVX7UTzYr59REl3YjSNpibGdzh2KqziBguvl6RoR5Gm5/v 3946XI5zQQdfoRhV71Hg2ucl9i38FegGAJ8YDpJGrfc/E4JGgwIUokBBixIzmf1SgO2S pQ2D4or/BXr4e/DO8FTFffwA55ToIiFV89kg+cPH/HrHpDjEmAs217BTVn+aTRQmgp7r lDP9RfYp7iEtEX7ZaePNZGuPWx3u1T98DhdijRejM0wLhVYpgW9LRaQtpeJNz1YRzR/g 3zC20KJsAHc33OIFXy0NOOOj658TjW2uShVesHOMhC0VkGpnJJb5/0adsauDzEoyDiHN VqAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9E7qrpJUtIxmBvLDwAj5V1HBAxzr0O6z9ge/5zIMBMM=; b=VtprAW25YplQrQF1wO/mz5VQHgmTUfJva9O3xMxieY0WkFYrKY68I3NmIfD4EUs6C+ vlzbRLdTaRmfNutMc/Co8/rQmgnsKUQ3vc7jnOlFKItJsUJBCigxedJhKPEdNU64iiHs XfNGU4JhFchevnTZzk6pKMjUGu8e8NTRe7QxYEv/Lqy9BUON6owxaHMWHMgu2IkF6l91 rvRvydODSHoV2LutEglh6UiZx4K66wZomgT9E90U6AF0C+t8xUFPGhNjQb/K8S79Qzt5 aH/hggXQfmqJNXKDcs2BSjCBfUnUw2c6hd1Fx92pLTaOIXBlSeSvxqlqdAlfa8YVZpdd nqSg== X-Gm-Message-State: AOAM533L8IBLMZc0rniy6t716FwbULUrY2QMNwl1XkamNuZHQsfaua6w Kp3s+mcKOmyV9P8oMwzYGTeLknkVhwG9sWfFm6pIwA== X-Google-Smtp-Source: ABdhPJyCst+BlsVjTTiyPmbJrq1v5P/ucNENuszo3tQ8DMAMh2CxKS+p2/7o6U05cXo3dtcdNA48YQ7ZdkCEGdhMhU4= X-Received: by 2002:ad4:47cc:: with SMTP id p12mr9019402qvw.26.1600830153984; Tue, 22 Sep 2020 20:02:33 -0700 (PDT) MIME-Version: 1.0 References: <202009112049.08BKnavL032212@repo.freebsd.org> In-Reply-To: From: Warner Losh Date: Tue, 22 Sep 2020 21:02:22 -0600 Message-ID: Subject: Re: svn commit: r365643 - head/bin/cp To: Alan Somers Cc: Kyle Evans , Ian Lepore , Mateusz Guzik , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4Bx2zH21Q4z49xw X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=kNBQRbPh; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::f32) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-1.75 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-0.88)[-0.877]; FROM_HAS_DN(0.00)[]; FREEMAIL_CC(0.00)[freebsd.org,gmail.com]; NEURAL_HAM_LONG(-0.95)[-0.947]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; NEURAL_SPAM_SHORT(0.07)[0.071]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCPT_COUNT_SEVEN(0.00)[7]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::f32:from]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; MAILMAN_DEST(0.00)[svn-src-head] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 03:02:36 -0000 I already committed... There's no need for a special upgrade process... Warner On Tue, Sep 22, 2020 at 8:59 PM Alan Somers wrote: > Go ahead and commit. Consider it reviewed by me. And if I understand > correctly, this commit means there's no need for a special updating > procedure, right? > > On Tue, Sep 22, 2020 at 6:55 PM Warner Losh wrote: > >> >> >> On Tue, Sep 22, 2020 at 5:17 PM Kyle Evans wrote: >> >>> On Tue, Sep 22, 2020, 17:02 Warner Losh wrote: >>> >>>> >>>> >>>> On Tue, Sep 22, 2020 at 3:55 PM Kyle Evans wrote: >>>> >>>>> On Tue, Sep 22, 2020 at 4:53 PM Ian Lepore wrote: >>>>> > >>>>> > On Tue, 2020-09-22 at 15:50 -0600, Warner Losh wrote: >>>>> > > I think it's a great leap sideways, but I've done cp /dev/null foo >>>>> to >>>>> > > clear >>>>> > > it out for 35 years now... It's why it feels like a workaround. >>>>> > > >>>>> > > Though it is a legit optimization, no matter the feelings. As for >>>>> > > clearer, >>>>> > > I'm less sure since then I have to remember what the : operator >>>>> does. >>>>> > > >>>>> > > Warner >>>>> > > >>>>> > >>>>> > For me, :> is idiomatic (but ugly). >>>>> > >>>>> > On the other hand, the cp /dev/null had a nice dogfooding aspect to >>>>> > it... when we broke cp by accident, its use in the build system was >>>>> the >>>>> > first alarm to go off. >>>>> > >>>>> > --Ian >>>>> > >>>>> >>>>> To be honest, this is a case that really should be covered by >>>>> regression tests somewhere. >>>>> >>>> >>>> It should (but isn't yet). >>>> >>>> Ian is right for old-school FreeBSD thinking. In that thinking the >>>> build system should use an eclectic mix of tools to act as a fire-wall >>>> against accidental breakage. >>>> >>>> Complete, effective, test suites give much better coverage... if they >>>> are run... >>>> >>>> So until we run tests frequently, with loud regression squawking that's >>>> as effective as build breakage, I tend to fall in the 'all of the above' >>>> camp until that's in place... :) >>>> >>>> Warner >>>> >>>> P.S. though not, if I suppose, if it means that we're slowing down the >>>> regression coverage uptake... >>>> >>> >>> -- >>> >>> The test build was fine, please confirm if I can commit it or if someone >>> else would like to write the UPDATING notice or start bootstrapping cp on >>> systems that were affected. I'm not comfortable with not taking any path at >>> all here, but this is a lot of friction for a small mechanical change to >>> ease the pain. >>> >> >> Sorry if I wasn't clear: I'm not objecting to the quick mechanical change >> so much as complaining that I wish we had better test coverage. Don't let >> that stop you from doing what's right (or I can if you'd like). >> >> Warner >> > From owner-svn-src-head@freebsd.org Wed Sep 23 03:02:48 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7A1353EAD51; Wed, 23 Sep 2020 03:02:48 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bx2zW40HBz49yH; Wed, 23 Sep 2020 03:02:46 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 595499F47; Wed, 23 Sep 2020 03:02:46 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08N32kkA029461; Wed, 23 Sep 2020 03:02:46 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08N32k0j029460; Wed, 23 Sep 2020 03:02:46 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202009230302.08N32k0j029460@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 23 Sep 2020 03:02:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366060 - head/bin/cp/tests X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/bin/cp/tests X-SVN-Commit-Revision: 366060 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 03:02:48 -0000 Author: kevans Date: Wed Sep 23 03:02:45 2020 New Revision: 366060 URL: https://svnweb.freebsd.org/changeset/base/366060 Log: cp: tests: fix weird 20 insertion This slipped in at the last moment. =( Modified: head/bin/cp/tests/cp_test.sh Modified: head/bin/cp/tests/cp_test.sh ============================================================================== --- head/bin/cp/tests/cp_test.sh Wed Sep 23 03:01:14 2020 (r366059) +++ head/bin/cp/tests/cp_test.sh Wed Sep 23 03:02:45 2020 (r366060) @@ -30,7 +30,8 @@ check_size() { file=$1 sz=$2 -20atf_check -o inline:"$sz\n" stat -f '%z' $file + + atf_check -o inline:"$sz\n" stat -f '%z' $file } atf_test_case basic From owner-svn-src-head@freebsd.org Wed Sep 23 03:12:58 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C03043EB1FC; Wed, 23 Sep 2020 03:12:58 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bx3CG4m0mz4CLx; Wed, 23 Sep 2020 03:12:58 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 86A9B9E48; Wed, 23 Sep 2020 03:12:58 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08N3CwUq035380; Wed, 23 Sep 2020 03:12:58 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08N3CwUm035379; Wed, 23 Sep 2020 03:12:58 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202009230312.08N3CwUm035379@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Wed, 23 Sep 2020 03:12:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366061 - head/share/man/man7 X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: head/share/man/man7 X-SVN-Commit-Revision: 366061 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 03:12:58 -0000 Author: bdragon Date: Wed Sep 23 03:12:58 2020 New Revision: 366061 URL: https://svnweb.freebsd.org/changeset/base/366061 Log: arch(7): PowerPC64LE architecture definition Document the new powerpc64le arch's initial specifications. Certain things are subject to change while this is experimental. The most likely change is that long double may switch to quad, dependent on POWER8 emulation assistance for __float128 being set up in the compiler (as POWER8 does not have IEEE-compatible 128-bit hardware float, unlike POWER9.) Sponsored by: Tag1 Consulting, Inc. Modified: head/share/man/man7/arch.7 Modified: head/share/man/man7/arch.7 ============================================================================== --- head/share/man/man7/arch.7 Wed Sep 23 03:02:45 2020 (r366060) +++ head/share/man/man7/arch.7 Wed Sep 23 03:12:58 2020 (r366061) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 23, 2020 +.Dd September 22, 2020 .Dt ARCH 7 .Os .Sh NAME @@ -110,6 +110,7 @@ architectures, the final release. .It powerpc Ta 6.0 .It powerpcspe Ta 12.0 .It powerpc64 Ta 6.0 +.It powerpc64le Ta 13.0 .It riscv64 Ta 12.0 .It riscv64sf Ta 12.0 .It sparc64 Ta 5.0 Ta 12.x @@ -206,6 +207,7 @@ Machine-dependent type sizes: .It powerpc Ta 4 Ta 8 Ta 8 .It powerpcspe Ta 4 Ta 8 Ta 8 .It powerpc64 Ta 8 Ta 8 Ta 8 +.It powerpc64le Ta 8 Ta 8 Ta 8 .It riscv64 Ta 8 Ta 16 Ta 8 .It riscv64sf Ta 8 Ta 16 Ta 8 .El @@ -232,6 +234,7 @@ is 8 bytes on all supported architectures except i386. .It powerpc Ta big Ta unsigned .It powerpcspe Ta big Ta unsigned .It powerpc64 Ta big Ta unsigned +.It powerpc64le Ta little Ta unsigned .It riscv64 Ta little Ta signed .It riscv64sf Ta little Ta signed .El @@ -255,6 +258,7 @@ is 8 bytes on all supported architectures except i386. .It powerpc Ta 4K .It powerpcspe Ta 4K .It powerpc64 Ta 4K +.It powerpc64le Ta 4K .It riscv64 Ta 4K, 2M, 1G .It riscv64sf Ta 4K, 2M, 1G .El @@ -278,6 +282,7 @@ is 8 bytes on all supported architectures except i386. .It powerpc Ta hard Ta hard, double precision .It powerpcspe Ta hard Ta hard, double precision .It powerpc64 Ta hard Ta hard, double precision +.It powerpc64le Ta hard Ta hard, double precision .It riscv64 Ta hard Ta hard, quad precision .It riscv64sf Ta soft Ta soft, quad precision .El @@ -311,7 +316,7 @@ or similar things like boot sequences. .It arm Ta arm Ta armv6, armv7 .It i386 Ta i386 Ta i386 .It mips Ta mips Ta mips, mipsel, mips64, mips64el, mipshf, mipselhf, mips64elhf, mipsn32 -.It powerpc Ta powerpc Ta powerpc, powerpcspe, powerpc64 +.It powerpc Ta powerpc Ta powerpc, powerpcspe, powerpc64, powerpc64le .It riscv Ta riscv Ta riscv64, riscv64sf .El .Ss Predefined Macros @@ -356,6 +361,7 @@ Architecture-specific macros: .It powerpc Ta Dv __powerpc__ .It powerpcspe Ta Dv __powerpc__ , Dv __SPE__ .It powerpc64 Ta Dv __powerpc__ , Dv __powerpc64__ +.It powerpc64le Ta Dv __powerpc__ , Dv __powerpc64__ .It riscv64 Ta Dv __riscv , Dv __riscv_xlen == 64 .It riscv64sf Ta Dv __riscv , Dv __riscv_xlen == 64 , Dv __riscv_float_abi_soft .El From owner-svn-src-head@freebsd.org Wed Sep 23 03:19:20 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B8ADE3EB4BD; Wed, 23 Sep 2020 03:19:20 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bx3Lc4XD4z4Cmx; Wed, 23 Sep 2020 03:19:20 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7F9CEA191; Wed, 23 Sep 2020 03:19:20 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08N3JKsp035706; Wed, 23 Sep 2020 03:19:20 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08N3JKi3035705; Wed, 23 Sep 2020 03:19:20 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202009230319.08N3JKi3035705@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Wed, 23 Sep 2020 03:19:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366062 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 366062 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 03:19:20 -0000 Author: bdragon Date: Wed Sep 23 03:19:20 2020 New Revision: 366062 URL: https://svnweb.freebsd.org/changeset/base/366062 Log: __FreeBSD_version bump for introduction of the powerpc64le arch. Although this is technically not a breaking change, I believe it is best to have a fresh version to use to define where the starting point was here. Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Wed Sep 23 03:12:58 2020 (r366061) +++ head/sys/sys/param.h Wed Sep 23 03:19:20 2020 (r366062) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1300115 /* Master, propagated to newvers */ +#define __FreeBSD_version 1300116 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-head@freebsd.org Wed Sep 23 04:09:03 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A81DD3EC9D4; Wed, 23 Sep 2020 04:09:03 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bx4Rz401yz4G3V; Wed, 23 Sep 2020 04:09:03 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5242CAB86; Wed, 23 Sep 2020 04:09:03 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08N4934i066525; Wed, 23 Sep 2020 04:09:03 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08N493LH066524; Wed, 23 Sep 2020 04:09:03 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202009230409.08N493LH066524@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Wed, 23 Sep 2020 04:09:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366063 - head/sys/powerpc/ofw X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: head/sys/powerpc/ofw X-SVN-Commit-Revision: 366063 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 04:09:03 -0000 Author: bdragon Date: Wed Sep 23 04:09:02 2020 New Revision: 366063 URL: https://svnweb.freebsd.org/changeset/base/366063 Log: [PowerPC64LE] Fix RTAS LE calls in pseries. Similar to OPAL calls, switch to big endian to do calls to RTAS. (Missed this one when I was doing the bulk commit of PowerPC64LE support.) Sponsored by: Tag1 Consulting, Inc. Modified: head/sys/powerpc/ofw/ofwcall64.S head/sys/powerpc/ofw/rtas.c Modified: head/sys/powerpc/ofw/ofwcall64.S ============================================================================== --- head/sys/powerpc/ofw/ofwcall64.S Wed Sep 23 03:19:20 2020 (r366062) +++ head/sys/powerpc/ofw/ofwcall64.S Wed Sep 23 04:09:02 2020 (r366063) @@ -296,9 +296,29 @@ ASENTRY_NOPROF(rtascall) std %r6,16(%r1) /* Save MSR */ std %r9,24(%r1) /* Save reference PC for high 32 bits */ +#ifdef __LITTLE_ENDIAN__ + /* Atomic context switch w/ endian change */ + li %r7, 0 + mtmsrd %r7, 1 /* Clear PSL_EE|PSL_RI */ + addis %r7,%r2,TOC_REF(rtasmsr)@ha + ld %r7,TOC_REF(rtasmsr)@l(%r7) + ld %r7,0(%r7) + mtsrr0 %r5 + mtsrr1 %r7 + LOAD_LR_NIA +1: + mflr %r5 + addi %r5, %r5, (2f-1b) + mtlr %r5 + li %r5, 0 + rfid +2: + RETURN_TO_NATIVE_ENDIAN +#else /* Finally, branch to RTAS */ mtctr %r5 bctrl +#endif /* * Reload stack pointer, MSR, reg PC from the reg save area in r1. We Modified: head/sys/powerpc/ofw/rtas.c ============================================================================== --- head/sys/powerpc/ofw/rtas.c Wed Sep 23 03:19:20 2020 (r366062) +++ head/sys/powerpc/ofw/rtas.c Wed Sep 23 04:09:02 2020 (r366063) @@ -29,6 +29,7 @@ #include __FBSDID("$FreeBSD$"); +#include #include #include #include @@ -90,7 +91,7 @@ rtas_setup(void *junk) /* RTAS must be called with everything turned off in MSR */ rtasmsr = mfmsr(); - rtasmsr &= ~(PSL_IR | PSL_DR | PSL_EE | PSL_SE); + rtasmsr &= ~(PSL_IR | PSL_DR | PSL_EE | PSL_SE | PSL_LE); #ifdef __powerpc64__ rtasmsr &= ~PSL_SF; #endif @@ -215,17 +216,17 @@ rtas_call_method(cell_t token, int nargs, int nreturns if (!rtas_exists() || nargs + nreturns > 12) return (-1); - args.token = token; + args.token = htobe32(token); va_start(ap, nreturns); mtx_lock_spin(&rtas_mtx); rtas_bounce_offset = 0; - args.nargs = nargs; - args.nreturns = nreturns; + args.nargs = htobe32(nargs); + args.nreturns = htobe32(nreturns); for (n = 0; n < nargs; n++) - args.args_n_results[n] = va_arg(ap, cell_t); + args.args_n_results[n] = htobe32(va_arg(ap, cell_t)); argsptr = rtas_real_map(&args, sizeof(args)); @@ -250,7 +251,7 @@ rtas_call_method(cell_t token, int nargs, int nreturns return (result); for (n = nargs; n < nargs + nreturns; n++) - *va_arg(ap, cell_t *) = args.args_n_results[n]; + *va_arg(ap, cell_t *) = be32toh(args.args_n_results[n]); return (result); } From owner-svn-src-head@freebsd.org Wed Sep 23 05:02:27 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1B0013EDDAE; Wed, 23 Sep 2020 05:02:27 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bx5dZ0Lcbz4JSw; Wed, 23 Sep 2020 05:02:25 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lf1-f45.google.com with SMTP id b22so20533375lfs.13; Tue, 22 Sep 2020 22:02:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=/DOQJheruaKNZg6l5UJoXaveU3CRKaQ2BdYkJa3Zc+o=; b=EQyHg+c7dpjNWaRYFt2X+trEz0lTyJHvkhAa01S8mYnqhrYjv6Wv0xOenGFE+9sMLT vAjbuO0nDZd54dsR3T/wdJQeMM7AtSZQOJCDzoGPSuTj4RZ9RKn3fNgPd8xyR3jfyTAp wRD9EMrUDb3zUZ73VTTn5AekQMYAH2vR5ZhOZGj3jTvg6G98WvH8zrVO17nP8YIwydcZ zQH56STDlDoAg6AI5sCHGKybbIvL7+qqO8VySUQYFRHHu4MpZNWMqwL3khvrVoI4CKzj 13w6+XY+sxhpD5CYj5utONaKnxAtOTcBdtpbNlLvBu32JeZTlL4343a9GvxF7kpua3oU oIvA== X-Gm-Message-State: AOAM530zR1pYOzfLQPj1R7+/Nl48S0KuXAN+pAAZUahb7zWkLTFvcfjH 9CE6zvDRHtai+pPh+/23KUH0UljAu9I= X-Google-Smtp-Source: ABdhPJwif3nMXfrHGOhib+FzFCtFdkopcpnkcItJi+pCW8VKHsih8Df3uV/arMisJoWCgxYn60Qiew== X-Received: by 2002:a19:38c:: with SMTP id 134mr2598594lfd.564.1600837344118; Tue, 22 Sep 2020 22:02:24 -0700 (PDT) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id q14sm3306095lfd.82.2020.09.22.22.02.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Sep 2020 22:02:23 -0700 (PDT) Subject: Re: svn commit: r365984 - head/usr.bin/calendar/calendars To: Scott Long Cc: src-committers , svn-src-all , svn-src-head References: <202009212255.08LMtpSp078237@repo.freebsd.org> <202009212316.08LNG1Dq005499@slippy.cwsent.com> <20200922191843.GA62498@lion.0xfce3.net> <20200922192424.mnzunuwnjtwfwilh@mutt-hbsd> <202009221943.08MJhNb3006228@slippy.cwsent.com> <2B9405A4-8483-4D8E-8668-CC58095E42BE@samsco.org> From: Andriy Gapon Openpgp: preference=signencrypt Autocrypt: addr=avg@FreeBSD.org; prefer-encrypt=mutual; keydata= mDMEX1iFDhYJKwYBBAHaRw8BAQdAiu8JG/oLFkVkOAJqJc7Dx5KI/Q6C3SBI20EQm+DXnAu0 HkFuZHJpeSBHYXBvbiA8YXZnQEZyZWVCU0Qub3JnPoiWBBMWCAA+FiEEyCHHZM09l0OE3Ir/ 1A1+Gq8+L1EFAl9YhQ4CGwMFCQeEzgAFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQ1A1+ Gq8+L1Fc0wD/ZjmhHfbCJywZU3aOxXIPjcz73FYEGMvqMCCLAWyLbSABALFL+1ZNrjV3BGjq 889cOYFuboA/Yn3eWezS+tfqYBsGuDgEX1iFDhIKKwYBBAGXVQEFAQEHQL6B20Xi600TrkpG P9fWjl7JtHNxqrHKhX6Kg7kgb4ILAwEIB4h+BBgWCAAmFiEEyCHHZM09l0OE3Ir/1A1+Gq8+ L1EFAl9YhQ4CGwwFCQeEzgAACgkQ1A1+Gq8+L1F3cgEAktp4h+IJUJxL1vn6zMOt//znni/J TanKfQuA8wGXcGkBAKpZJhqMkg+pKk7MGvJhgJ6nCpTZ+rMK6vZVZLUWc3QF Message-ID: <4fa71c24-0431-2eb1-bf74-74e678c6bbf2@FreeBSD.org> Date: Wed, 23 Sep 2020 08:02:22 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Firefox/60.0 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <2B9405A4-8483-4D8E-8668-CC58095E42BE@samsco.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4Bx5dZ0Lcbz4JSw X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of agapon@gmail.com designates 209.85.167.45 as permitted sender) smtp.mailfrom=agapon@gmail.com X-Spamd-Result: default: False [-2.44 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[FreeBSD.org]; NEURAL_HAM_LONG(-1.02)[-1.022]; NEURAL_HAM_MEDIUM(-0.99)[-0.993]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.42)[-0.424]; RCVD_IN_DNSWL_NONE(0.00)[209.85.167.45:from]; RECEIVED_SPAMHAUS_PBL(0.00)[93.72.151.96:received]; FORGED_SENDER(0.30)[avg@FreeBSD.org,agapon@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.167.45:from]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; MIME_TRACE(0.00)[0:+]; FROM_NEQ_ENVFROM(0.00)[avg@FreeBSD.org,agapon@gmail.com]; MAILMAN_DEST(0.00)[svn-src-head,svn-src-all] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 05:02:27 -0000 On 22/09/2020 23:40, Scott Long wrote: > Second, there’s a vibe in parts of this thread that are passive-aggressively > disrespectful to Greg. I encourage those who might feel some personal > frustration towards Greg to talk to him directly. The Core team can help with > that communication if needed. Otherwise, it’s not not appropriate and not > welcome on the mailing lists. If you don’t feel it’s important enough to > resolve in a professional manner, then please keep it to yourself. That was me. I apologized to Greg directly. And I want to do the same in public. It was inappropriate. I apologize. -- Andriy Gapon From owner-svn-src-head@freebsd.org Wed Sep 23 06:52:23 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A498D3F0884; Wed, 23 Sep 2020 06:52:23 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bx84R3yz3z4Nhh; Wed, 23 Sep 2020 06:52:23 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6BA48C91A; Wed, 23 Sep 2020 06:52:23 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08N6qNh3070063; Wed, 23 Sep 2020 06:52:23 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08N6qNsa070062; Wed, 23 Sep 2020 06:52:23 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <202009230652.08N6qNsa070062@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 23 Sep 2020 06:52:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366064 - head/sbin/fsck_msdosfs X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/sbin/fsck_msdosfs X-SVN-Commit-Revision: 366064 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 06:52:23 -0000 Author: delphij Date: Wed Sep 23 06:52:22 2020 New Revision: 366064 URL: https://svnweb.freebsd.org/changeset/base/366064 Log: sbin/fsck_msdosfs: Fix an integer overflow on 32-bit platforms. The purpose of checksize() is to verify that the referenced cluster chain size matches the recorded file size (up to 2^32 - 1) in the directory entry. We follow the cluster chain, then multiple the cluster count by bytes per cluster to get the physical size, then check it against the recorded size. When a file is close to 4 GiB (between 4GiB - cluster size and 4GiB, both non-inclusive), the product of cluster count and bytes per cluster would be exactly 4 GiB. On 32-bit systems, because size_t is 32-bit, this would wrap back to 0, which will cause the file be truncated to 0. Fix this by using 64-bit physicalSize instead. This fix is inspired by an Android change request at https://android-review.googlesource.com/c/platform/external/fsck_msdos/+/1428461 PR: 249533 Reviewed by: kevlo MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D26524 Modified: head/sbin/fsck_msdosfs/dir.c Modified: head/sbin/fsck_msdosfs/dir.c ============================================================================== --- head/sbin/fsck_msdosfs/dir.c Wed Sep 23 04:09:02 2020 (r366063) +++ head/sbin/fsck_msdosfs/dir.c Wed Sep 23 06:52:22 2020 (r366064) @@ -388,7 +388,8 @@ static int checksize(struct fat_descriptor *fat, u_char *p, struct dosDirEntry *dir) { int ret = FSOK; - size_t physicalSize; + size_t chainsize; + u_int64_t physicalSize; struct bootblock *boot; boot = fat_get_boot(fat); @@ -401,9 +402,9 @@ checksize(struct fat_descriptor *fat, u_char *p, struc } else { if (!fat_is_valid_cl(fat, dir->head)) return FSERROR; - ret = checkchain(fat, dir->head, &physicalSize); + ret = checkchain(fat, dir->head, &chainsize); /* - * Upon return, physicalSize would hold the chain length + * Upon return, chainsize would hold the chain length * that checkchain() was able to validate, but if the user * refused the proposed repair, it would be unsafe to * proceed with directory entry fix, so bail out in that @@ -412,7 +413,13 @@ checksize(struct fat_descriptor *fat, u_char *p, struc if (ret == FSERROR) { return (FSERROR); } - physicalSize *= boot->ClusterSize; + /* + * The maximum file size on FAT32 is 4GiB - 1, which + * will occupy a cluster chain of exactly 4GiB in + * size. On 32-bit platforms, since size_t is 32-bit, + * it would wrap back to 0. + */ + physicalSize = (u_int64_t)chainsize * boot->ClusterSize; } if (physicalSize < dir->size) { pwarn("size of %s is %u, should at most be %zu\n", From owner-svn-src-head@freebsd.org Wed Sep 23 07:27:13 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 628403F0CEC; Wed, 23 Sep 2020 07:27:13 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bx8rd21Fnz4QVj; Wed, 23 Sep 2020 07:27:13 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 287BCCFE4; Wed, 23 Sep 2020 07:27:13 +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 08N7RDNv088550; Wed, 23 Sep 2020 07:27:13 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08N7RDC8088549; Wed, 23 Sep 2020 07:27:13 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <202009230727.08N7RDC8088549@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 23 Sep 2020 07:27:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366065 - head/sbin/fsck_msdosfs X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/sbin/fsck_msdosfs X-SVN-Commit-Revision: 366065 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 07:27:13 -0000 Author: delphij Date: Wed Sep 23 07:27:12 2020 New Revision: 366065 URL: https://svnweb.freebsd.org/changeset/base/366065 Log: Fix build. Pointy hat to: delphij MFC after: 3 days Modified: head/sbin/fsck_msdosfs/dir.c Modified: head/sbin/fsck_msdosfs/dir.c ============================================================================== --- head/sbin/fsck_msdosfs/dir.c Wed Sep 23 06:52:22 2020 (r366064) +++ head/sbin/fsck_msdosfs/dir.c Wed Sep 23 07:27:12 2020 (r366065) @@ -422,7 +422,7 @@ checksize(struct fat_descriptor *fat, u_char *p, struc physicalSize = (u_int64_t)chainsize * boot->ClusterSize; } if (physicalSize < dir->size) { - pwarn("size of %s is %u, should at most be %zu\n", + pwarn("size of %s is %u, should at most be %" PRIu64 "\n", fullpath(dir), dir->size, physicalSize); if (ask(1, "Truncate")) { dir->size = physicalSize; From owner-svn-src-head@freebsd.org Wed Sep 23 08:22:15 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5B7F93F2A54; Wed, 23 Sep 2020 08:22:15 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxB471pvrz4TLt; Wed, 23 Sep 2020 08:22: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 22C2DDC05; Wed, 23 Sep 2020 08:22: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 08N8MFdY025665; Wed, 23 Sep 2020 08:22:15 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08N8MEac025664; Wed, 23 Sep 2020 08:22:14 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <202009230822.08N8MEac025664@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Wed, 23 Sep 2020 08:22:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366066 - in head/stand: efi/libefi libsa/zfs X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: in head/stand: efi/libefi libsa/zfs X-SVN-Commit-Revision: 366066 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 08:22:15 -0000 Author: tsoome Date: Wed Sep 23 08:22:14 2020 New Revision: 366066 URL: https://svnweb.freebsd.org/changeset/base/366066 Log: loader: zfs_probe_dev should pick first matching zfs pool During devswitch probe, we pick boot pool based on boot disk, if the boot disk happens to have multiple pools in freebsd-zfs partitions, the current code does pick last pool from boot disk as boot pool. While there is no way at that stage to test, the more logical approach would be to pick first matching pool. This patch is assuming we do pass pool guid pointer with guid value 0, this will help us to determine, if the guid value is already set or not. The general suggestion would be not to share disk between different pools. Reported by: Alexander Leidinger Modified: head/stand/efi/libefi/efizfs.c head/stand/libsa/zfs/zfs.c Modified: head/stand/efi/libefi/efizfs.c ============================================================================== --- head/stand/efi/libefi/efizfs.c Wed Sep 23 07:27:12 2020 (r366065) +++ head/stand/efi/libefi/efizfs.c Wed Sep 23 08:22:14 2020 (r366066) @@ -99,7 +99,7 @@ efi_zfs_probe(void) pdinfo_list_t *hdi; pdinfo_t *hd, *pd = NULL; char devname[SPECNAMELEN + 1]; - uint64_t guid; + uint64_t guid; hdi = efiblk_get_pdinfo_list(&efipart_hddev); STAILQ_INIT(&zfsinfo); @@ -114,6 +114,7 @@ efi_zfs_probe(void) STAILQ_FOREACH(pd, &hd->pd_part, pd_link) { snprintf(devname, sizeof(devname), "%s%dp%d:", efipart_hddev.dv_name, hd->pd_unit, pd->pd_unit); + guid = 0; if (zfs_probe_dev(devname, &guid) == 0) { insert_zfs(pd->pd_handle, guid); if (pd->pd_handle == boot_img->DeviceHandle) Modified: head/stand/libsa/zfs/zfs.c ============================================================================== --- head/stand/libsa/zfs/zfs.c Wed Sep 23 07:27:12 2020 (r366065) +++ head/stand/libsa/zfs/zfs.c Wed Sep 23 08:22:14 2020 (r366066) @@ -651,7 +651,8 @@ zfs_probe(int fd, uint64_t *pool_guid) spa = NULL; ret = vdev_probe(vdev_read, vdev_write, (void *)(uintptr_t)fd, &spa); if (ret == 0 && pool_guid != NULL) - *pool_guid = spa->spa_guid; + if (*pool_guid == 0) + *pool_guid = spa->spa_guid; return (ret); } From owner-svn-src-head@freebsd.org Wed Sep 23 10:42:42 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 62E663F5515; Wed, 23 Sep 2020 10:42:42 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxFBB1ptBz4bBs; Wed, 23 Sep 2020 10:42:42 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 219FBF249; Wed, 23 Sep 2020 10:42:42 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08NAgfcF011892; Wed, 23 Sep 2020 10:42:41 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08NAgfT1011891; Wed, 23 Sep 2020 10:42:41 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202009231042.08NAgfT1011891@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 23 Sep 2020 10:42:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366069 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 366069 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 10:42:42 -0000 Author: mjg Date: Wed Sep 23 10:42:41 2020 New Revision: 366069 URL: https://svnweb.freebsd.org/changeset/base/366069 Log: cache: clean up atomic ops on numneg and numcache - use subtract instead of adding -1 - drop the useless _rel fence Note this should be converted to a scalable scheme. Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Wed Sep 23 09:59:06 2020 (r366068) +++ head/sys/kern/vfs_cache.c Wed Sep 23 10:42:41 2020 (r366069) @@ -841,7 +841,7 @@ cache_negative_insert(struct namecache *ncp) mtx_lock(&neglist->nl_lock); TAILQ_INSERT_TAIL(&neglist->nl_list, ncp, nc_dst); mtx_unlock(&neglist->nl_lock); - atomic_add_rel_long(&numneg, 1); + atomic_add_long(&numneg, 1); } static void @@ -887,7 +887,7 @@ cache_negative_remove(struct namecache *ncp) mtx_unlock(&neglist->nl_lock); if (hot_locked) mtx_unlock(&ncneg_hot.nl_lock); - atomic_subtract_rel_long(&numneg, 1); + atomic_subtract_long(&numneg, 1); } static void @@ -1030,7 +1030,7 @@ cache_zap_locked(struct namecache *ncp) counter_u64_add(numcachehv, -1); } } - atomic_subtract_rel_long(&numcache, 1); + atomic_subtract_long(&numcache, 1); } static void @@ -1959,7 +1959,7 @@ cache_enter_time(struct vnode *dvp, struct vnode *vp, */ lnumcache = atomic_fetchadd_long(&numcache, 1) + 1; if (__predict_false(lnumcache >= ncsize)) { - atomic_add_long(&numcache, -1); + atomic_subtract_long(&numcache, 1); counter_u64_add(numdrops, 1); return; } @@ -2125,7 +2125,7 @@ cache_enter_time(struct vnode *dvp, struct vnode *vp, return; out_unlock_free: cache_enter_unlock(&cel); - atomic_add_long(&numcache, -1); + atomic_subtract_long(&numcache, 1); cache_free(ncp); return; } From owner-svn-src-head@freebsd.org Wed Sep 23 10:44:16 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A8B7D3F52BD; Wed, 23 Sep 2020 10:44:16 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:13b:39f::9f:25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxFD02JX0z4bX2; Wed, 23 Sep 2020 10:44:15 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 5C10F8D4A157; Wed, 23 Sep 2020 10:44:08 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id D1B26E7082A; Wed, 23 Sep 2020 10:44:07 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id vdjJ6SQ0DZ8m; Wed, 23 Sep 2020 10:44:06 +0000 (UTC) Received: from [169.254.164.49] (unknown [IPv6:fde9:577b:c1a9:4902:a05e:d4ec:2ae8:2040]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id DB107E707B2; Wed, 23 Sep 2020 10:44:06 +0000 (UTC) From: "Bjoern A. Zeeb" To: "Warner Losh" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r366042 - in head/stand: i386/zfsboot libsa Date: Wed, 23 Sep 2020 10:44:06 +0000 X-Mailer: MailMate (2.0BETAr6151) Message-ID: <96B1694E-889E-4D04-8AB9-B689F6093FB8@lists.zabbadoz.net> In-Reply-To: <202009230104.08N14QIe053739@repo.freebsd.org> References: <202009230104.08N14QIe053739@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain X-Rspamd-Queue-Id: 4BxFD02JX0z4bX2 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 10:44:16 -0000 On 23 Sep 2020, at 1:04, Warner Losh wrote: > Ideally, we'd keep the cp /dev/null in the > build as a regression test, Well or at least write a test case so that at least CI catches it. /bz From owner-svn-src-head@freebsd.org Wed Sep 23 10:44:49 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D3C623F5724; Wed, 23 Sep 2020 10:44:49 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxFDd5LvMz4bgl; Wed, 23 Sep 2020 10:44:49 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9B0D2F593; Wed, 23 Sep 2020 10:44:49 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08NAinWq012049; Wed, 23 Sep 2020 10:44:49 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08NAin7w012048; Wed, 23 Sep 2020 10:44:49 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202009231044.08NAin7w012048@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 23 Sep 2020 10:44:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366070 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 366070 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 10:44:49 -0000 Author: mjg Date: Wed Sep 23 10:44:49 2020 New Revision: 366070 URL: https://svnweb.freebsd.org/changeset/base/366070 Log: cache: reimplement purgevfs to iterate vnodes instead of the entire hash The entire cache scan was a leftover from the old implementation. It is incredibly wasteful in presence of several mount points and does not win much even for single ones. Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Wed Sep 23 10:42:41 2020 (r366069) +++ head/sys/kern/vfs_cache.c Wed Sep 23 10:44:49 2020 (r366070) @@ -491,20 +491,6 @@ static int vn_fullpath_dir(struct vnode *vp, struct vn static MALLOC_DEFINE(M_VFSCACHE, "vfscache", "VFS name cache entries"); -static int cache_yield; -SYSCTL_INT(_vfs_cache, OID_AUTO, yield, CTLFLAG_RD, &cache_yield, 0, - "Number of times cache called yield"); - -static void __noinline -cache_maybe_yield(void) -{ - - if (should_yield()) { - cache_yield++; - kern_yield(PRI_USER); - } -} - static inline void cache_assert_vlp_locked(struct mtx *vlp) { @@ -1212,51 +1198,6 @@ cache_zap_locked_bucket(struct namecache *ncp, struct return (cache_zap_unlocked_bucket(ncp, cnp, dvp, dvlp, vlp, hash, blp)); } -static int -cache_zap_locked_bucket_kl(struct namecache *ncp, struct mtx *blp, - struct mtx **vlpp1, struct mtx **vlpp2) -{ - struct mtx *dvlp, *vlp; - - cache_assert_bucket_locked(ncp); - - dvlp = VP2VNODELOCK(ncp->nc_dvp); - vlp = NULL; - if (!(ncp->nc_flag & NCF_NEGATIVE)) - vlp = VP2VNODELOCK(ncp->nc_vp); - cache_sort_vnodes(&dvlp, &vlp); - - if (*vlpp1 == dvlp && *vlpp2 == vlp) { - cache_zap_locked(ncp); - cache_unlock_vnodes(dvlp, vlp); - *vlpp1 = NULL; - *vlpp2 = NULL; - return (0); - } - - if (*vlpp1 != NULL) - mtx_unlock(*vlpp1); - if (*vlpp2 != NULL) - mtx_unlock(*vlpp2); - *vlpp1 = NULL; - *vlpp2 = NULL; - - if (cache_trylock_vnodes(dvlp, vlp) == 0) { - cache_zap_locked(ncp); - cache_unlock_vnodes(dvlp, vlp); - return (0); - } - - mtx_unlock(blp); - *vlpp1 = dvlp; - *vlpp2 = vlp; - if (*vlpp1 != NULL) - mtx_lock(*vlpp1); - mtx_lock(*vlpp2); - mtx_lock(blp); - return (EAGAIN); -} - static __noinline int cache_remove_cnp(struct vnode *dvp, struct componentname *cnp) { @@ -2316,14 +2257,26 @@ retry: } } +/* + * Opportunistic check to see if there is anything to do. + */ +static bool +cache_has_entries(struct vnode *vp) +{ + + if (LIST_EMPTY(&vp->v_cache_src) && TAILQ_EMPTY(&vp->v_cache_dst) && + vp->v_cache_dd == NULL) + return (false); + return (true); +} + void cache_purge(struct vnode *vp) { struct mtx *vlp; SDT_PROBE1(vfs, namecache, purge, done, vp); - if (LIST_EMPTY(&vp->v_cache_src) && TAILQ_EMPTY(&vp->v_cache_dst) && - vp->v_cache_dd == NULL) + if (!cache_has_entries(vp)) return; vlp = VP2VNODELOCK(vp); mtx_lock(vlp); @@ -2418,49 +2371,25 @@ cache_rename(struct vnode *fdvp, struct vnode *fvp, st void cache_purgevfs(struct mount *mp, bool force) { - TAILQ_HEAD(, namecache) ncps; - struct mtx *vlp1, *vlp2; - struct mtx *blp; - struct nchashhead *bucket; - struct namecache *ncp, *nnp; - u_long i, j, n_nchash; - int error; + struct vnode *vp, *mvp; - /* Scan hash tables for applicable entries */ SDT_PROBE1(vfs, namecache, purgevfs, done, mp); if (!force && mp->mnt_nvnodelistsize <= ncpurgeminvnodes) return; - TAILQ_INIT(&ncps); - n_nchash = nchash + 1; - vlp1 = vlp2 = NULL; - for (i = 0; i < numbucketlocks; i++) { - blp = (struct mtx *)&bucketlocks[i]; - mtx_lock(blp); - for (j = i; j < n_nchash; j += numbucketlocks) { -retry: - bucket = &nchashtbl[j]; - CK_SLIST_FOREACH_SAFE(ncp, bucket, nc_hash, nnp) { - cache_assert_bucket_locked(ncp); - if (ncp->nc_dvp->v_mount != mp) - continue; - error = cache_zap_locked_bucket_kl(ncp, blp, - &vlp1, &vlp2); - if (error != 0) - goto retry; - TAILQ_INSERT_HEAD(&ncps, ncp, nc_dst); - } - } - mtx_unlock(blp); - if (vlp1 == NULL && vlp2 == NULL) - cache_maybe_yield(); - } - if (vlp1 != NULL) - mtx_unlock(vlp1); - if (vlp2 != NULL) - mtx_unlock(vlp2); - TAILQ_FOREACH_SAFE(ncp, &ncps, nc_dst, nnp) { - cache_free(ncp); + /* + * Somewhat wasteful iteration over all vnodes. Would be better to + * support filtering and avoid the interlock to begin with. + */ + MNT_VNODE_FOREACH_ALL(vp, mp, mvp) { + if (!cache_has_entries(vp)) { + VI_UNLOCK(vp); + continue; + } + vholdl(vp); + VI_UNLOCK(vp); + cache_purge(vp); + vdrop(vp); } } From owner-svn-src-head@freebsd.org Wed Sep 23 10:46:08 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CCC953F578A; Wed, 23 Sep 2020 10:46:08 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxFG84z8Cz4bxV; Wed, 23 Sep 2020 10:46:08 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8DE03F2B6; Wed, 23 Sep 2020 10:46:08 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08NAk8BV012162; Wed, 23 Sep 2020 10:46:08 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08NAk7oW012157; Wed, 23 Sep 2020 10:46:07 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202009231046.08NAk7oW012157@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 23 Sep 2020 10:46:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366071 - in head/sys: contrib/openzfs/module/os/freebsd/zfs kern sys X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: contrib/openzfs/module/os/freebsd/zfs kern sys X-SVN-Commit-Revision: 366071 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 10:46:08 -0000 Author: mjg Date: Wed Sep 23 10:46:07 2020 New Revision: 366071 URL: https://svnweb.freebsd.org/changeset/base/366071 Log: cache: drop the force flag from purgevfs The optional scan is wasteful, thus it is removed altogether from unmount. Callers which always want it anyway remain unaffected. Modified: head/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c head/sys/kern/vfs_cache.c head/sys/kern/vfs_mount.c head/sys/kern/vfs_mountroot.c head/sys/sys/vnode.h Modified: head/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c ============================================================================== --- head/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c Wed Sep 23 10:44:49 2020 (r366070) +++ head/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c Wed Sep 23 10:46:07 2020 (r366071) @@ -1532,7 +1532,7 @@ zfsvfs_teardown(zfsvfs_t *zfsvfs, boolean_t unmounting * 'z_parent' is self referential for non-snapshots. */ #ifdef FREEBSD_NAMECACHE - cache_purgevfs(zfsvfs->z_parent->z_vfs, true); + cache_purgevfs(zfsvfs->z_parent->z_vfs); #endif } Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Wed Sep 23 10:44:49 2020 (r366070) +++ head/sys/kern/vfs_cache.c Wed Sep 23 10:46:07 2020 (r366071) @@ -295,9 +295,6 @@ static u_long __exclusive_cache_line numcache;/* numbe u_int ncsizefactor = 2; SYSCTL_UINT(_vfs, OID_AUTO, ncsizefactor, CTLFLAG_RW, &ncsizefactor, 0, "Size factor for namecache"); -static u_int __read_mostly ncpurgeminvnodes; -SYSCTL_UINT(_vfs, OID_AUTO, ncpurgeminvnodes, CTLFLAG_RW, &ncpurgeminvnodes, 0, - "Number of vnodes below which purgevfs ignores the request"); static u_int __read_mostly ncsize; /* the size as computed on creation or resizing */ struct nchstats nchstats; /* cache effectiveness statistics */ @@ -2142,7 +2139,6 @@ nchinit(void *dummy __unused) M_WAITOK | M_ZERO); for (i = 0; i < numvnodelocks; i++) mtx_init(&vnodelocks[i], "ncvn", NULL, MTX_DUPOK | MTX_RECURSE); - ncpurgeminvnodes = numbucketlocks * 2; neglists = malloc(sizeof(*neglists) * numneglists, M_VFSCACHE, M_WAITOK | M_ZERO); @@ -2369,14 +2365,11 @@ cache_rename(struct vnode *fdvp, struct vnode *fvp, st * Flush all entries referencing a particular filesystem. */ void -cache_purgevfs(struct mount *mp, bool force) +cache_purgevfs(struct mount *mp) { struct vnode *vp, *mvp; SDT_PROBE1(vfs, namecache, purgevfs, done, mp); - if (!force && mp->mnt_nvnodelistsize <= ncpurgeminvnodes) - return; - /* * Somewhat wasteful iteration over all vnodes. Would be better to * support filtering and avoid the interlock to begin with. Modified: head/sys/kern/vfs_mount.c ============================================================================== --- head/sys/kern/vfs_mount.c Wed Sep 23 10:44:49 2020 (r366070) +++ head/sys/kern/vfs_mount.c Wed Sep 23 10:46:07 2020 (r366071) @@ -1808,7 +1808,6 @@ dounmount(struct mount *mp, int flags, struct thread * mp->mnt_flag &= ~MNT_ASYNC; mp->mnt_kern_flag &= ~MNTK_ASYNC; MNT_IUNLOCK(mp); - cache_purgevfs(mp, false); /* remove cache entries for this file sys */ vfs_deallocate_syncvnode(mp); error = VFS_UNMOUNT(mp, flags); vn_finished_write(mp); Modified: head/sys/kern/vfs_mountroot.c ============================================================================== --- head/sys/kern/vfs_mountroot.c Wed Sep 23 10:44:49 2020 (r366070) +++ head/sys/kern/vfs_mountroot.c Wed Sep 23 10:46:07 2020 (r366071) @@ -326,9 +326,9 @@ vfs_mountroot_shuffle(struct thread *td, struct mount TAILQ_INSERT_TAIL(&mountlist, mpdevfs, mnt_list); mtx_unlock(&mountlist_mtx); - cache_purgevfs(mporoot, true); + cache_purgevfs(mporoot); if (mporoot != mpdevfs) - cache_purgevfs(mpdevfs, true); + cache_purgevfs(mpdevfs); if (VFS_ROOT(mporoot, LK_EXCLUSIVE, &vporoot)) panic("vfs_mountroot_shuffle: Cannot find root vnode"); @@ -344,7 +344,7 @@ vfs_mountroot_shuffle(struct thread *td, struct mount /* Set up the new rootvnode, and purge the cache */ mpnroot->mnt_vnodecovered = NULL; set_rootvnode(); - cache_purgevfs(rootvnode->v_mount, true); + cache_purgevfs(rootvnode->v_mount); if (mporoot != mpdevfs) { /* Remount old root under /.mount or /mnt */ Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Wed Sep 23 10:44:49 2020 (r366070) +++ head/sys/sys/vnode.h Wed Sep 23 10:46:07 2020 (r366071) @@ -643,7 +643,7 @@ void cache_purge_vgone(struct vnode *vp); void cache_purge_negative(struct vnode *vp); void cache_rename(struct vnode *fdvp, struct vnode *fvp, struct vnode *tdvp, struct vnode *tvp, struct componentname *fcnp, struct componentname *tcnp); -void cache_purgevfs(struct mount *mp, bool force); +void cache_purgevfs(struct mount *mp); int change_dir(struct vnode *vp, struct thread *td); void cvtstat(struct stat *st, struct ostat *ost); void freebsd11_cvtnstat(struct stat *sb, struct nstat *nsb); From owner-svn-src-head@freebsd.org Wed Sep 23 11:02:24 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 366D13F57E6; Wed, 23 Sep 2020 11:02:24 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxFcw0Ng3z4ckm; Wed, 23 Sep 2020 11:02:24 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E5160F74A; Wed, 23 Sep 2020 11:02:23 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08NB2NJg023915; Wed, 23 Sep 2020 11:02:23 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08NB2NIX023914; Wed, 23 Sep 2020 11:02:23 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202009231102.08NB2NIX023914@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 23 Sep 2020 11:02:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366072 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 366072 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 11:02:24 -0000 Author: mjg Date: Wed Sep 23 11:02:23 2020 New Revision: 366072 URL: https://svnweb.freebsd.org/changeset/base/366072 Log: Bump __FreeBSD_version after cache_purgevfs change Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Wed Sep 23 10:46:07 2020 (r366071) +++ head/sys/sys/param.h Wed Sep 23 11:02:23 2020 (r366072) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1300116 /* Master, propagated to newvers */ +#define __FreeBSD_version 1300117 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-head@freebsd.org Wed Sep 23 11:11:02 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 77A743F5A68 for ; Wed, 23 Sep 2020 11:11:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72d.google.com (mail-qk1-x72d.google.com [IPv6:2607:f8b0:4864:20::72d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxFpr3dpFz4cs5 for ; Wed, 23 Sep 2020 11:11:00 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72d.google.com with SMTP id c2so2717866qkf.10 for ; Wed, 23 Sep 2020 04:11:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7+/izIE9gDAIIkL4OpPJkXArYSqkwFF3T9qTM8+ekJ0=; b=fOCsCPmlJHWM680dTgqoX3pvbZqvPYUp2ESXl/0sNsSOBOhp5m4k0jZYk50wPmdVJM Phkt0CxTEZ8HIMCb1uaGOYyHiPuTSbqh+QPSKQSrGOrhwfdEq8VjitbwVHX12VMTH32e ROfFJYD/xSRoj0wLMI7+aeRzo5VfO9lBjgpOZ2pJ3VFhDtl1qO6e6YlCaEg+ehWGRG4g /OlpAXwE0FoJhm4SEjUrPQPPTVHPXArqvd3OgKfljFWYU2gr/2f4vuynmvn6g/GsSB1F VzljvWIRYUt0yGM77SXVCHbITXLP9IZKGXtOf7VtNKs/r0eUwHDENFGigl1qtN7AKOK2 GYjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7+/izIE9gDAIIkL4OpPJkXArYSqkwFF3T9qTM8+ekJ0=; b=Ris4km+hN8nrEdnpjpzM19hBFzId2Crek41IJoKYS6m/VkXnF5YSsC0OoVf2bF9gev aBO7PbIMi1vliLV+V0kSza+TkkJGjmi+rMqfpfsQqTg9yix3sjjmGkWfUqfSQpLa3mS5 sMSzJun+OaOt12P9ivwCTL6p0+2w13D0Bmy6QB3GrKq/ZcJrAyHMeY9i3LnssQB86oO9 0wga6ppxUM95Y5FJ+9VQ5NZHVPsMwlg5DjG7ZK8wZFZkeYUppcKKvxiIfLYvBI6c46xc TiDE2NYT9VHsIAtlQtUwu1uoYTatYCn69OB1g83kDYzNaWzqlCf74xZmTfyPc8nH8MVO wgIQ== X-Gm-Message-State: AOAM532iqsQo17MseehmfJznB0coTxWK/cLfeYiWco2r5HgaFnkXGVzd pOFiWqAKZp/bLRJ4jLwN1y+y2O7I7ZVsxlmMH6Uegg== X-Google-Smtp-Source: ABdhPJxSOqQp1KhnsVQstSLp5q2XlvFRSVGMpzQidSjtRvGhMKOZ77zuwNeJ84Vn9xm6oie8bqzSrIcjmC7f1AVuNdA= X-Received: by 2002:a05:620a:1583:: with SMTP id d3mr9282390qkk.495.1600859458529; Wed, 23 Sep 2020 04:10:58 -0700 (PDT) MIME-Version: 1.0 References: <202009230104.08N14QIe053739@repo.freebsd.org> <96B1694E-889E-4D04-8AB9-B689F6093FB8@lists.zabbadoz.net> In-Reply-To: <96B1694E-889E-4D04-8AB9-B689F6093FB8@lists.zabbadoz.net> From: Warner Losh Date: Wed, 23 Sep 2020 05:10:46 -0600 Message-ID: Subject: Re: svn commit: r366042 - in head/stand: i386/zfsboot libsa To: "Bjoern A. Zeeb" Cc: Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 4BxFpr3dpFz4cs5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=fOCsCPml; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::72d) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.55 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-1.00)[-0.997]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-0.99)[-0.986]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.57)[-0.570]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::72d:from]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; MAILMAN_DEST(0.00)[svn-src-head]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 11:11:02 -0000 On Wed, Sep 23, 2020, 4:44 AM Bjoern A. Zeeb wrote: > On 23 Sep 2020, at 1:04, Warner Losh wrote: > > > Ideally, we'd keep the cp /dev/null in the > > build as a regression test, > > Well or at least write a test case so that at least CI catches it. > Kyle did that. Warner > /bz > From owner-svn-src-head@freebsd.org Wed Sep 23 11:20:32 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CA4F23F5E2B for ; Wed, 23 Sep 2020 11:20:32 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxG1q5vWhz4d9P for ; Wed, 23 Sep 2020 11:20:31 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wm1-f52.google.com with SMTP id d4so6744524wmd.5 for ; Wed, 23 Sep 2020 04:20:31 -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:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=nwka92TuOFH3XC4P7jMKFojfhRL1eF/B2FfAHR9bY+s=; b=CLvA6Ithnx+a4XrEDR+kcGSGbb/I4XDDl1FYn1xMp2c3vXnc1sMTm2lgeVa5MbJYyk kgBjXi1jNP2hwuht3XB8zExCG4I67ee/rt3W6/mfX1Ww2hM1QtxPS0/Vja+ILKQk5xRD wK8qGxQqp4aKbpnRRUuq3utz/xtstkpJhHOHzxWiPte0XOhY0Tj2QKPB6MonLozhczpr 1ZkdfCLanrkJuC9guerm32vizqtIMn7CdMtMaqyrqPncevTQyAcCzFKmqYlTHuch1GUV jHXs/QhrPzRme3zZh8u0qr5ZfdOy9wViPMxgUji5qRui/ID24TXlvs0dZkuCJ1GXvCyK vD6A== X-Gm-Message-State: AOAM531qvzTvlQwIy14aKZMCbubqCbBFFPInIh4rEoXlWsvRx+lOKovO GBCMfTgii/PGpT7MUBxEPOR3mA== X-Google-Smtp-Source: ABdhPJwiHPX8Q0i7O5MrgQqx5ZIPGsDYEzw/nY2cjaOXLdTRSL2ew3ePwkv6rN4PdRYZ8XMYyEkfsw== X-Received: by 2002:a7b:cde8:: with SMTP id p8mr5961799wmj.106.1600860029971; Wed, 23 Sep 2020 04:20:29 -0700 (PDT) Received: from [192.168.149.251] (trinity-students-nat.trin.cam.ac.uk. [131.111.193.104]) by smtp.gmail.com with ESMTPSA id 11sm7905301wmi.14.2020.09.23.04.20.29 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Sep 2020 04:20:29 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.1\)) Subject: Re: svn commit: r366064 - head/sbin/fsck_msdosfs From: Jessica Clarke In-Reply-To: <202009230652.08N6qNsa070062@repo.freebsd.org> Date: Wed, 23 Sep 2020 12:20:28 +0100 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: <6FE32F41-C178-49DE-820B-07B37B748B0E@freebsd.org> References: <202009230652.08N6qNsa070062@repo.freebsd.org> To: Xin LI X-Mailer: Apple Mail (2.3608.120.23.2.1) X-Rspamd-Queue-Id: 4BxG1q5vWhz4d9P X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of jrtc27@jrtc27.com designates 209.85.128.52 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com X-Spamd-Result: default: False [-2.20 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; MV_CASE(0.50)[]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM_SHORT(-0.64)[-0.640]; FORGED_SENDER(0.30)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; MID_RHS_MATCH_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.04)[-1.039]; FREEFALL_USER(0.00)[jrtc27]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.02)[-1.017]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.128.52:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.128.52:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[svn-src-head] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 11:20:32 -0000 On 23 Sep 2020, at 07:52, Xin LI wrote: > > --- head/sbin/fsck_msdosfs/dir.c Wed Sep 23 04:09:02 2020 (r366063) > +++ head/sbin/fsck_msdosfs/dir.c Wed Sep 23 06:52:22 2020 (r366064) > @@ -388,7 +388,8 @@ static int > checksize(struct fat_descriptor *fat, u_char *p, struct dosDirEntry *dir) > { > int ret = FSOK; > - size_t physicalSize; > + size_t chainsize; > + u_int64_t physicalSize; Is there a reason for using the non-standard u_int64_t rather than uint64_t? Jess From owner-svn-src-head@freebsd.org Wed Sep 23 12:54:38 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5BDF23F8A66; Wed, 23 Sep 2020 12:54:38 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxJ6Q1nJfz4nSb; Wed, 23 Sep 2020 12:54:38 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 216BB10C23; Wed, 23 Sep 2020 12:54:38 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08NCsbFn097013; Wed, 23 Sep 2020 12:54:37 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08NCsbvl097012; Wed, 23 Sep 2020 12:54:37 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202009231254.08NCsbvl097012@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Wed, 23 Sep 2020 12:54:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366074 - in head/.github: . workflows X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: in head/.github: . workflows X-SVN-Commit-Revision: 366074 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 12:54:38 -0000 Author: arichardson Date: Wed Sep 23 12:54:37 2020 New Revision: 366074 URL: https://svnweb.freebsd.org/changeset/base/366074 Log: Add github CI for testing cross-building from Linux and macOS This builds the kernel-toolchain target and an amd64 GENERIC kernel on Ubuntu 18.04, 20.04 and the latest macOS to ensure that new changes don't regress building on non-FreeBSD hosts. Reviewed By: emaste, lwhsu Differential Revision: https://reviews.freebsd.org/D26512 Added: head/.github/ head/.github/workflows/ head/.github/workflows/cross-bootstrap-tools.yml (contents, props changed) Added: head/.github/workflows/cross-bootstrap-tools.yml ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/.github/workflows/cross-bootstrap-tools.yml Wed Sep 23 12:54:37 2020 (r366074) @@ -0,0 +1,35 @@ +name: Cross-build CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + name: ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-18.04, ubuntu-20.04, macOS-latest] + + steps: + - uses: actions/checkout@v2 + - name: install LLVM+libarchive (Ubuntu) + run: | + wget -O /tmp/llvm.sh https://apt.llvm.org/llvm.sh + chmod +x /tmp/llvm.sh + sudo /tmp/llvm.sh 11 + sudo apt install -y libarchive-dev + echo "::set-env name=EXTRA_MAKE_ARGS::--cross-bindir=/usr/lib/llvm-11/bin" + if: ${{ startsWith(matrix.os, 'ubuntu') }} + - name: install LLVM+libarchive (macOS) + run: brew install llvm coreutils libarchive xz + if: ${{ startsWith(matrix.os, 'macOS') }} + - name: create build dir + run: rm -rf ../build && mkdir -p ../build + - name: make kernel-toolchain + run: env MAKEOBJDIRPREFIX=`realpath ../build` ./tools/build/make.py $EXTRA_MAKE_ARGS TARGET=amd64 TARGET_ARCH=amd64 kernel-toolchain -s -j$(nproc) + - name: make buildkernel + run: env MAKEOBJDIRPREFIX=`realpath ../build` ./tools/build/make.py $EXTRA_MAKE_ARGS TARGET=amd64 TARGET_ARCH=amd64 KERNCONF=GENERIC NO_MODULES=yes buildkernel -s -j$(nproc) From owner-svn-src-head@freebsd.org Wed Sep 23 12:54:44 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F1E843F8F9B; Wed, 23 Sep 2020 12:54:43 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxJ6W21P5z4nL2; Wed, 23 Sep 2020 12:54:43 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1BB6910A3A; Wed, 23 Sep 2020 12:54:43 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08NCsgfh097070; Wed, 23 Sep 2020 12:54:42 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08NCsgWI097069; Wed, 23 Sep 2020 12:54:42 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202009231254.08NCsgWI097069@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Wed, 23 Sep 2020 12:54:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366075 - head/contrib/byacc X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/contrib/byacc X-SVN-Commit-Revision: 366075 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 12:54:44 -0000 Author: arichardson Date: Wed Sep 23 12:54:42 2020 New Revision: 366075 URL: https://svnweb.freebsd.org/changeset/base/366075 Log: byacc: fix UBSan signed shift range error I've submitted this patch upstream, so apply this to contrib/ until a new version containing this change has been released. Reviewed By: jkim Differential Revision: https://reviews.freebsd.org/D26505 Modified: head/contrib/byacc/closure.c head/contrib/byacc/warshall.c Modified: head/contrib/byacc/closure.c ============================================================================== --- head/contrib/byacc/closure.c Wed Sep 23 12:54:37 2020 (r366074) +++ head/contrib/byacc/closure.c Wed Sep 23 12:54:42 2020 (r366075) @@ -87,7 +87,7 @@ set_first_derives(void) k = 0; } - if (cword & (unsigned)(1 << k)) + if (cword & (1u << k)) { rp = derives[j]; while ((rule = *rp++) >= 0) @@ -151,7 +151,7 @@ closure(Value_t *nucleus, int n) { for (i = 0; i < BITS_PER_WORD; ++i) { - if (word & (unsigned)(1 << i)) + if (word & (1u << i)) { itemno = rrhs[ruleno + i]; while (csp < csend && *csp < itemno) Modified: head/contrib/byacc/warshall.c ============================================================================== --- head/contrib/byacc/warshall.c Wed Sep 23 12:54:37 2020 (r366074) +++ head/contrib/byacc/warshall.c Wed Sep 23 12:54:42 2020 (r366075) @@ -28,7 +28,7 @@ transitive_closure(unsigned *R, int n) while (rowj < relend) { - if (*ccol & (unsigned)(1 << i)) + if (*ccol & (1u << i)) { rp = rowi; rend = rowj + rowsize; @@ -70,7 +70,7 @@ reflexive_transitive_closure(unsigned *R, int n) rp = R; while (rp < relend) { - *rp |= (unsigned)(1 << i); + *rp |= (1u << i); if (++i >= BITS_PER_WORD) { i = 0; From owner-svn-src-head@freebsd.org Wed Sep 23 13:21:07 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D57D53F9409; Wed, 23 Sep 2020 13:21:07 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxJhz5KPhz4pPn; Wed, 23 Sep 2020 13:21:07 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qt1-f177.google.com (mail-qt1-f177.google.com [209.85.160.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 9AFCA26509; Wed, 23 Sep 2020 13:21:07 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f177.google.com with SMTP id e7so18541863qtj.11; Wed, 23 Sep 2020 06:21:07 -0700 (PDT) X-Gm-Message-State: AOAM533K9pwMnPHo4jkb33OIxeUPMtbsJ7fRcjZVfmH+E42KTPdAyIiA hShLxPhkUB4ASwzQrryz2df+IWYd09+fc1FNnJU= X-Google-Smtp-Source: ABdhPJymm6/9NekP0WaWHHQw6G4U4fQgHaxrmb3dY85+EEAslZ6/JRDXJn39RHIoQjQ/IufJAko22t3qLf9CVa/A8w8= X-Received: by 2002:ac8:3f3d:: with SMTP id c58mr10054639qtk.53.1600867267109; Wed, 23 Sep 2020 06:21:07 -0700 (PDT) MIME-Version: 1.0 References: <202009171847.08HIlNXa015641@repo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Wed, 23 Sep 2020 08:20:54 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r365846 - head To: Ravi Pokala Cc: Ed Maste , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 13:21:07 -0000 On Mon, Sep 21, 2020 at 7:23 PM Ravi Pokala wrote: > > -----Original Message----- > From: on behalf of Ed Maste > Date: 2020-09-17, Thursday at 11:47 > To: , , > Subject: svn commit: r365846 - head > > Author: emaste > Date: Thu Sep 17 18:47:23 2020 > New Revision: 365846 > URL: https://svnweb.freebsd.org/changeset/base/365846 > > Log: > Cirrus-CI: build as an unprivileged user > > The Cirrus-CI-provided working tree is owned by root. Leave that a= s is > for simplicity but build as an unprivileged user; this tests buildi= ng > with an unmodifiable source tree as a side effect. > > Hi Ed, > > We're still generating the LINT kernconfs into the src tree though, right= ? Moving that to allow for universe/tinderboxing a r/o src tree seems like = an obvious idea. The fact that we don't already do that implies that there'= s a non-obvious complication with that idea; does anyone know why that is? > > Thanks, > > Ravi (rpokala@) So, the main limiting factor here is config(8) logistics. You've got two questions to sort out: 1. Where in .OBJDIR do you put LINT? 2. How do you tell config(8) to find that LINT? I think both of these are actually pretty easy to solve. For the former, sys/conf/makeLINT.mk would need to be directed to put them in ${OBJTOP}/${.CURDIR} instead of ${.CURDIR} so that it ends up in ${OBJTOP}/sys/${MACHINE}/conf -- this is kind of unusual since nothing else will get stored there, but ultimately not a big deal. There's an inline patch that gets us probably the most of the way, but universe would still need a little bit of love. I don't think that part would suck much either, and it probably would clean things up a little bit too- for MAKE_LINT_KERNELS you wouldn't need to bother searching the in-tree confdir. Thanks, Kyle Evans (as an aside, I re-read Ed's commit message after this and realized I had asked something almost verbatim as the commit message explained it... sorry) root@viper:/usr/src# git diff Makefile.inc1 sys/conf/makeLINT.mk diff --git a/Makefile.inc1 b/Makefile.inc1 index de4970efeef..2a095f2f903 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1591,9 +1591,11 @@ KERNCONF?=3D GENERIC INSTKERNNAME?=3D kernel KERNSRCDIR?=3D ${.CURDIR}/sys -KRNLCONFDIR=3D ${KERNSRCDIR}/${TARGET}/conf +KRNLRELCONFDIR=3D ${TARGET}/conf +KRNLCONFDIR=3D ${KERNSRCDIR}/${KRNLRELCONFDIR} KRNLOBJDIR=3D ${OBJTOP}${KERNSRCDIR:C,^${.CURDIR},,} KERNCONFDIR?=3D ${KRNLCONFDIR} +KERNCONFOBJDIR?=3D ${OBJTOP}/sys/${KRNLRELCONFDIR} BUILDKERNELS=3D INSTALLKERNEL=3D @@ -1602,8 +1604,14 @@ INSTALLKERNEL=3D BUILDKERNELS+=3D dummy .endif .for _kernel in ${KERNCONF} -.if !defined(_MKSHOWCONFIG) && exists(${KERNCONFDIR}/${_kernel}) +.if !defined(_MKSHOWCONFIG) && \ + (exists(${KERNCONFDIR}/${_kernel}) || exists(${KERNCONFOBJDIR}/${_kern= el})) BUILDKERNELS+=3D ${_kernel} +.if exists(${KERNCONFDIR}/${_kernel}) +KERNCONFDIR_${TARGET}_${_kernel}=3D${KERNCONFDIR} +.else +KERNCONFDIR_${TARGET}_${_kernel}=3D${KERNCONFOBJDIR} +.endif .if empty(INSTALLKERNEL) && !defined(NO_INSTALLKERNEL) INSTALLKERNEL=3D ${_kernel} .endif @@ -1661,7 +1669,7 @@ buildkernel: .MAKE .PHONY PATH=3D${TMPPATH} \ config ${CONFIGARGS} -d ${KRNLOBJDIR}/${_kernel} \ -I '${KERNCONFDIR}' -I '${KRNLCONFDIR}' \ - '${KERNCONFDIR}/${_kernel}' + '${KERNCONFDIR_${TARGET}_${_kernel}}/${_kernel}' .endif .if ${MK_CLEAN} =3D=3D "yes" && !defined(NO_KERNELCLEAN) @echo diff --git a/sys/conf/makeLINT.mk b/sys/conf/makeLINT.mk index b2fc256621b..edaea99750a 100644 --- a/sys/conf/makeLINT.mk +++ b/sys/conf/makeLINT.mk @@ -1,8 +1,5 @@ # $FreeBSD$ -# The LINT files need to end up in the kernel source directory. -.OBJDIR: ${.CURDIR} - all: @echo "make LINT only" From owner-svn-src-head@freebsd.org Wed Sep 23 14:30:18 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 317FA3FB410 for ; Wed, 23 Sep 2020 14:30:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxLDn2sP6z4tKp for ; Wed, 23 Sep 2020 14:30:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x842.google.com with SMTP id c18so7120qtw.5 for ; Wed, 23 Sep 2020 07:30:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=k9MxJtNnpqmW6X3FLUfTCe4yCFzpkNQHyfm79CWwVB0=; b=Oa+ISq16Q01ZdwiWVwzRCg9pWSoeJMXcllbf2TM6OeHgko2SU3f/6xNAfkuJdBLxr/ 6IYkWjWi9Bcnhiw1KoFqeGFIE+9aM3kW3JA91tz4jUhsxR/u66HUlevBti/XVNhTvT5B 58jMwjm35N/dwz0SwoT3ZF9m5JTek6R3E5ur0GXqeH/UxXrCrehnfsCXxVAQHhZy+Dqy NJNh6t01PRUyk8jzRmk/ZnKiYjW/2vd/Jut0tMzaQBVW4sX9Djmv7dx9FshZyLKuAsuX dq3DCJdxqZ6OXIEGetsTN8UXojxuOdpj71ne5Y5G92e2PQj/fR1hR87KEu5hey6pyaNU r6gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=k9MxJtNnpqmW6X3FLUfTCe4yCFzpkNQHyfm79CWwVB0=; b=odu74cazQw0oS4ONIcRg9olsDaC+TVPx2Z4gMRy7o+tWNjUYF34l1ecKV13LeB5Ldm p+4OKbN1VqBQreR4jpoTpfrnbx99n46zphxizoLJttMgFVrMnP4GT8NgaFMetJqgwPg8 3FPzfxQ49sdleBJmcFrP7OJwiA7F1pkCUnMhtUX1Srhc66HFVCiLdx2zV7kBW+cLYkmx AAVME2OZKei2YiaNuAYKdGcosVWEJGkNtCYh1Ducx0xQHpLnSavHRX6upXFUmHb+RRE1 EXLNE3KMSew0/EqPTXj9IfMAlfq4SYA3MPVDYNI4e0ZtCVOTkxVNizQkzii7VBAGrjaE otkg== X-Gm-Message-State: AOAM533ZJvMbG/NaKsK0BMaJJ69Ze9EAUvL9769mKmyj2/h7FoyY+Oz2 pcjRQtMaJHDehtXe/Muti9HO00UoJ7XmOl3a1JeBrw== X-Google-Smtp-Source: ABdhPJz2Q0HtFi6PT0EdoN82/+mzIhnEFc0H0DZG7WU3hO3SgCK8hsicxMHhOMLXYHybuhneUk8LubidhD8ERuF2RDE= X-Received: by 2002:ac8:4cd0:: with SMTP id l16mr252506qtv.175.1600871416131; Wed, 23 Sep 2020 07:30:16 -0700 (PDT) MIME-Version: 1.0 References: <202009171847.08HIlNXa015641@repo.freebsd.org> In-Reply-To: From: Warner Losh Date: Wed, 23 Sep 2020 08:30:03 -0600 Message-ID: Subject: Re: svn commit: r365846 - head To: Kyle Evans Cc: Ravi Pokala , Ed Maste , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4BxLDn2sP6z4tKp X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=Oa+ISq16; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::842) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.06 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-0.99)[-0.987]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.97)[-0.974]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.10)[-0.099]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::842:from]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; MAILMAN_DEST(0.00)[svn-src-head]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 14:30:18 -0000 Won't this break non LINT builds? Maybe we should fix the crazy way we generate lint? On Wed, Sep 23, 2020, 7:21 AM Kyle Evans wrote: > On Mon, Sep 21, 2020 at 7:23 PM Ravi Pokala wrote: > > > > -----Original Message----- > > From: on behalf of Ed Maste > > > Date: 2020-09-17, Thursday at 11:47 > > To: , , < > svn-src-head@freebsd.org> > > Subject: svn commit: r365846 - head > > > > Author: emaste > > Date: Thu Sep 17 18:47:23 2020 > > New Revision: 365846 > > URL: https://svnweb.freebsd.org/changeset/base/365846 > > > > Log: > > Cirrus-CI: build as an unprivileged user > > > > The Cirrus-CI-provided working tree is owned by root. Leave that > as is > > for simplicity but build as an unprivileged user; this tests > building > > with an unmodifiable source tree as a side effect. > > > > Hi Ed, > > > > We're still generating the LINT kernconfs into the src tree though, > right? Moving that to allow for universe/tinderboxing a r/o src tree seems > like an obvious idea. The fact that we don't already do that implies that > there's a non-obvious complication with that idea; does anyone know why > that is? > > > > Thanks, > > > > Ravi (rpokala@) > > So, the main limiting factor here is config(8) logistics. You've got > two questions to sort out: > > 1. Where in .OBJDIR do you put LINT? > 2. How do you tell config(8) to find that LINT? > > I think both of these are actually pretty easy to solve. For the > former, sys/conf/makeLINT.mk would need to be directed to put them in > ${OBJTOP}/${.CURDIR} instead of ${.CURDIR} so that it ends up in > ${OBJTOP}/sys/${MACHINE}/conf -- this is kind of unusual since nothing > else will get stored there, but ultimately not a big deal. There's an > inline patch that gets us probably the most of the way, but universe > would still need a little bit of love. I don't think that part would > suck much either, and it probably would clean things up a little bit > too- for MAKE_LINT_KERNELS you wouldn't need to bother searching the > in-tree confdir. > > Thanks, > > Kyle Evans > > (as an aside, I re-read Ed's commit message after this and realized I > had asked something almost verbatim as the commit message explained > it... sorry) > > root@viper:/usr/src# git diff Makefile.inc1 sys/conf/makeLINT.mk > diff --git a/Makefile.inc1 b/Makefile.inc1 > index de4970efeef..2a095f2f903 100644 > --- a/Makefile.inc1 > +++ b/Makefile.inc1 > @@ -1591,9 +1591,11 @@ KERNCONF?= GENERIC > INSTKERNNAME?= kernel > > KERNSRCDIR?= ${.CURDIR}/sys > -KRNLCONFDIR= ${KERNSRCDIR}/${TARGET}/conf > +KRNLRELCONFDIR= ${TARGET}/conf > +KRNLCONFDIR= ${KERNSRCDIR}/${KRNLRELCONFDIR} > KRNLOBJDIR= ${OBJTOP}${KERNSRCDIR:C,^${.CURDIR},,} > KERNCONFDIR?= ${KRNLCONFDIR} > +KERNCONFOBJDIR?= ${OBJTOP}/sys/${KRNLRELCONFDIR} > > BUILDKERNELS= > INSTALLKERNEL= > @@ -1602,8 +1604,14 @@ INSTALLKERNEL= > BUILDKERNELS+= dummy > .endif > .for _kernel in ${KERNCONF} > -.if !defined(_MKSHOWCONFIG) && exists(${KERNCONFDIR}/${_kernel}) > +.if !defined(_MKSHOWCONFIG) && \ > + (exists(${KERNCONFDIR}/${_kernel}) || > exists(${KERNCONFOBJDIR}/${_kernel})) > BUILDKERNELS+= ${_kernel} > +.if exists(${KERNCONFDIR}/${_kernel}) > +KERNCONFDIR_${TARGET}_${_kernel}=${KERNCONFDIR} > +.else > +KERNCONFDIR_${TARGET}_${_kernel}=${KERNCONFOBJDIR} > +.endif > .if empty(INSTALLKERNEL) && !defined(NO_INSTALLKERNEL) > INSTALLKERNEL= ${_kernel} > .endif > @@ -1661,7 +1669,7 @@ buildkernel: .MAKE .PHONY > PATH=${TMPPATH} \ > config ${CONFIGARGS} -d ${KRNLOBJDIR}/${_kernel} \ > -I '${KERNCONFDIR}' -I '${KRNLCONFDIR}' \ > - '${KERNCONFDIR}/${_kernel}' > + '${KERNCONFDIR_${TARGET}_${_kernel}}/${_kernel}' > .endif > .if ${MK_CLEAN} == "yes" && !defined(NO_KERNELCLEAN) > @echo > diff --git a/sys/conf/makeLINT.mk b/sys/conf/makeLINT.mk > index b2fc256621b..edaea99750a 100644 > --- a/sys/conf/makeLINT.mk > +++ b/sys/conf/makeLINT.mk > @@ -1,8 +1,5 @@ > # $FreeBSD$ > > -# The LINT files need to end up in the kernel source directory. > -.OBJDIR: ${.CURDIR} > - > all: > @echo "make LINT only" > From owner-svn-src-head@freebsd.org Wed Sep 23 14:46:22 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CF37B3FBF08 for ; Wed, 23 Sep 2020 14:46:22 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2k.ore.mailhop.org (outbound2k.ore.mailhop.org [54.148.219.64]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxLbL2CH4z3RW0 for ; Wed, 23 Sep 2020 14:46:22 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1600872380; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=t/apIO1iT9lIviRabRdwAz/o3Ip5NpwJzcrOwbBopFLV/c78lbuoSPq2wQ0bV1pGtVc5tqF2CDxkX YBMUxwCzSiGTezAJN6VzHSBwhpwN9+KIs1UU41eAKDetkwdZXeTazRYcOpO0W7O9EoJEoGQc03tSUw xRPqLe90xpdl4REkHoCqfAP7NT6DDLuaeItyBDMhPXbOJXxxtnBPbaK/6CVTQtE1N2lpz0flL/k2vf DC4J80geJjjzaHNeQwb4nJspjnCbIxVBKUIDKD6NmEd7eacWKAiv3EQ5v6C6Hjr34W57/falR6JY6c 0Si+KZtlBzf6PXafXD/knVqEFLxCIug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=600esQt6bh0NDui9WMqLTaOOLP6a+Y0N+lbGIzlHNmM=; b=sH+/b3OVnWv3VUzVQk+oy/1tYBl6gm/3q60o0iY/Sd/s96A9vzNaoc2TVZNcJ6E8CaEO9wSC/DeoV L1NtvxS0nsGAZMMu9oaJg8Wn+w67qPIfLSHl+/qRqpS0rsnZFtvAjrJxVVxbJwmXFZuopHSH/ZvFYG 8qeJQ06fVmR3LJ/77B++G3WJE6Dmr9b10n+wOC44hyAFdQQAQIGhTMdi5FF/7b5mFD5NUnzkTvukku lrlmb98GbOI+DgOXJRpv61F7uK0YhRfQV72YjG53IkHKtZVRlJPrjXP2CetoFnwBeuFz/+jd75EHwA tA9Tmr6VQubeOk/icDNRiqpfdAuhXfg== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=600esQt6bh0NDui9WMqLTaOOLP6a+Y0N+lbGIzlHNmM=; b=AOAo43VgrPfqyavhXLlAidDc6gf0hETqzW/vtI89YSX33DpMViQoJjphyJ4q1PVRFEUgRaYJ7W5ct 0CQz3NGHfyCIjIj2JoGD+/G55Gu5MYWj2deTjfNboKYlMgndN5Q/TGPy2589+hFKUVzl4n9GQOV2po E5OATt7ux3juYIovzIBENN88jvMJ0mpgQ4fngJRB9VmQyGPFOxxcyGPRO3c0V+bMp8Gz9a8FqYxo6h RJUhLYzVoQjOq+NbU+FTx/UFT3QPx2r+THqErIz0EJdHYjYKwJcCpQ7wYd8JvAJubM0LISTZjQPkK5 du4wAWmoSrkAkJ/UGvd2oTLYtB4PkRA== X-MHO-RoutePath: aGlwcGll X-MHO-User: 88f7c4ae-fdab-11ea-9e11-df46ed8f892f X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (c-67-177-211-60.hsd1.co.comcast.net [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id 88f7c4ae-fdab-11ea-9e11-df46ed8f892f; Wed, 23 Sep 2020 14:46:18 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 08NEkGYt029699; Wed, 23 Sep 2020 08:46:16 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: Subject: Re: svn commit: r366042 - in head/stand: i386/zfsboot libsa From: Ian Lepore To: "Bjoern A. Zeeb" , Warner Losh Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Wed, 23 Sep 2020 08:46:16 -0600 In-Reply-To: <96B1694E-889E-4D04-8AB9-B689F6093FB8@lists.zabbadoz.net> References: <202009230104.08N14QIe053739@repo.freebsd.org> <96B1694E-889E-4D04-8AB9-B689F6093FB8@lists.zabbadoz.net> Content-Type: text/plain; charset="ASCII" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4BxLbL2CH4z3RW0 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; ASN(0.00)[asn:16509, ipnet:54.148.0.0/15, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 14:46:22 -0000 On Wed, 2020-09-23 at 10:44 +0000, Bjoern A. Zeeb wrote: > On 23 Sep 2020, at 1:04, Warner Losh wrote: > > > Ideally, we'd keep the cp /dev/null in the > > build as a regression test, > > Well or at least write a test case so that at least CI catches it. > > /bz It might make sense to separately test /dev/null as the source and the destination with cp. -- Ian From owner-svn-src-head@freebsd.org Wed Sep 23 14:52:44 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3A6D33FBF64; Wed, 23 Sep 2020 14:52:44 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxLkh0nD1z3SPD; Wed, 23 Sep 2020 14:52:44 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F317412157; Wed, 23 Sep 2020 14:52:43 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08NEqhO1072268; Wed, 23 Sep 2020 14:52:43 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08NEqhdn072267; Wed, 23 Sep 2020 14:52:43 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202009231452.08NEqhdn072267@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 23 Sep 2020 14:52:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366077 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 366077 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 14:52:44 -0000 Author: emaste Date: Wed Sep 23 14:52:43 2020 New Revision: 366077 URL: https://svnweb.freebsd.org/changeset/base/366077 Log: remove reference to obsolete arm NOTES files We left these in the clean rule to avoid having stale files remain in working trees, but enough time has now passed that it's no longer relevant. Discussed with: imp Modified: head/sys/conf/makeLINT.mk Modified: head/sys/conf/makeLINT.mk ============================================================================== --- head/sys/conf/makeLINT.mk Wed Sep 23 14:36:38 2020 (r366076) +++ head/sys/conf/makeLINT.mk Wed Sep 23 14:52:43 2020 (r366077) @@ -11,12 +11,6 @@ clean: .if ${TARGET} == "amd64" || ${TARGET} == "i386" rm -f LINT-NOINET LINT-NOINET6 LINT-NOIP .endif -.if ${TARGET} == "arm" - # LINT-V5 removed 2019-11-26. The clean rule is left here temporarily - # to avoid having stale copies left behind. LINT-V7 left the tree on - # 2020-02-02. - rm -f LINT-V5 LINT-V7 -.endif .if ${TARGET} == "powerpc" rm -f LINT64 .endif From owner-svn-src-head@freebsd.org Wed Sep 23 15:04:54 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 357213FC8CD; Wed, 23 Sep 2020 15:04:54 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxM0k0Fzdz3TGr; Wed, 23 Sep 2020 15:04:54 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f175.google.com (mail-qk1-f175.google.com [209.85.222.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id DC2BF26DDB; Wed, 23 Sep 2020 15:04:53 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f175.google.com with SMTP id q5so23122269qkc.2; Wed, 23 Sep 2020 08:04:53 -0700 (PDT) X-Gm-Message-State: AOAM531JyPoVbsw9ZRoXyC3pLxqW0YYA8X/UiXKeXG5YlnetWHpizN84 /IRh3xCP2FMxyiQYwPpFDioqBfuJdo6Cn921caE= X-Google-Smtp-Source: ABdhPJw0wzGWOft9FrFtbM4eskbb+/AYgsgUdSxtOmfVfmD8LsCPZTQWZwmZfjs0h/E9Srn+w6SaDWfIpoTs7KqhyKI= X-Received: by 2002:a37:43ca:: with SMTP id q193mr249523qka.493.1600873493545; Wed, 23 Sep 2020 08:04:53 -0700 (PDT) MIME-Version: 1.0 References: <202009171847.08HIlNXa015641@repo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Wed, 23 Sep 2020 10:04:41 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r365846 - head To: Warner Losh Cc: Ravi Pokala , Ed Maste , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 15:04:54 -0000 On Wed, Sep 23, 2020 at 9:30 AM Warner Losh wrote: > On Wed, Sep 23, 2020, 7:21 AM Kyle Evans wrote: >> >> On Mon, Sep 21, 2020 at 7:23 PM Ravi Pokala wrote: >> > >> > -----Original Message----- >> > From: on behalf of Ed Maste >> > Date: 2020-09-17, Thursday at 11:47 >> > To: , , >> > Subject: svn commit: r365846 - head >> > >> > Author: emaste >> > Date: Thu Sep 17 18:47:23 2020 >> > New Revision: 365846 >> > URL: https://svnweb.freebsd.org/changeset/base/365846 >> > >> > Log: >> > Cirrus-CI: build as an unprivileged user >> > >> > The Cirrus-CI-provided working tree is owned by root. Leave tha= t as is >> > for simplicity but build as an unprivileged user; this tests bui= lding >> > with an unmodifiable source tree as a side effect. >> > >> > Hi Ed, >> > >> > We're still generating the LINT kernconfs into the src tree though, ri= ght? Moving that to allow for universe/tinderboxing a r/o src tree seems li= ke an obvious idea. The fact that we don't already do that implies that the= re's a non-obvious complication with that idea; does anyone know why that i= s? >> > >> > Thanks, >> > >> > Ravi (rpokala@) >> >> So, the main limiting factor here is config(8) logistics. You've got >> two questions to sort out: >> >> 1. Where in .OBJDIR do you put LINT? >> 2. How do you tell config(8) to find that LINT? >> >> I think both of these are actually pretty easy to solve. For the >> former, sys/conf/makeLINT.mk would need to be directed to put them in >> ${OBJTOP}/${.CURDIR} instead of ${.CURDIR} so that it ends up in >> ${OBJTOP}/sys/${MACHINE}/conf -- this is kind of unusual since nothing >> else will get stored there, but ultimately not a big deal. There's an >> inline patch that gets us probably the most of the way, but universe >> would still need a little bit of love. I don't think that part would >> suck much either, and it probably would clean things up a little bit >> too- for MAKE_LINT_KERNELS you wouldn't need to bother searching the >> in-tree confdir. >> >> Thanks, >> >> Kyle Evans >> >> (as an aside, I re-read Ed's commit message after this and realized I >> had asked something almost verbatim as the commit message explained >> it... sorry) >> >> [... patch omitted ...] > > Won't this break non LINT builds? Maybe we should fix the crazy way we ge= nerate lint? > We've discussed this out-of-band a little bit, but to bring it back to the list: there really isn't a reason to keep generating these LINT files, config(8) supports include these days, so we think we can just make individual LINTs include the global and per-arch NOTES and do whatever nodevice/nooptions it needs to do. To address the first question; this particular patch just taught buildkernel to look in two different places for any KERNCONF and recorded where it found the KERNCONF so that LINT/non-LINT both worked in any combination (GENERIC LINT, LINT, or just GENERIC). It's subpar compared to discontinue generation of these files, especially when you look at comments in makeLINT like: # cat is available, not sure if cp is? This is one less place to care about what's available in the build environment, especially when it's ultimately something trivial like `cat NOTES OTHERNOTES` and a series of echo. Thanks, Kyle Evans From owner-svn-src-head@freebsd.org Wed Sep 23 16:44:39 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 046123FEB34; Wed, 23 Sep 2020 16:44:39 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxPCp22T9z3Zm3; Wed, 23 Sep 2020 16:44:38 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 08NGiTLT082922 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 23 Sep 2020 19:44:32 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 08NGiTLT082922 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 08NGiTO7082921; Wed, 23 Sep 2020 19:44:29 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 23 Sep 2020 19:44:29 +0300 From: Konstantin Belousov To: Mateusz Guzik Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r366071 - in head/sys: contrib/openzfs/module/os/freebsd/zfs kern sys Message-ID: <20200923164429.GI2570@kib.kiev.ua> References: <202009231046.08NAk7oW012157@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202009231046.08NAk7oW012157@repo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 4BxPCp22T9z3Zm3 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 16:44:39 -0000 On Wed, Sep 23, 2020 at 10:46:07AM +0000, Mateusz Guzik wrote: > Author: mjg > Date: Wed Sep 23 10:46:07 2020 > New Revision: 366071 > URL: https://svnweb.freebsd.org/changeset/base/366071 > > Log: > cache: drop the force flag from purgevfs > > The optional scan is wasteful, thus it is removed altogether from unmount. > > Callers which always want it anyway remain unaffected. > > Modified: > head/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c > head/sys/kern/vfs_cache.c > head/sys/kern/vfs_mount.c > head/sys/kern/vfs_mountroot.c > head/sys/sys/vnode.h > > Modified: head/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c > ============================================================================== > --- head/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c Wed Sep 23 10:44:49 2020 (r366070) > +++ head/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c Wed Sep 23 10:46:07 2020 (r366071) > @@ -1532,7 +1532,7 @@ zfsvfs_teardown(zfsvfs_t *zfsvfs, boolean_t unmounting > * 'z_parent' is self referential for non-snapshots. > */ > #ifdef FREEBSD_NAMECACHE > - cache_purgevfs(zfsvfs->z_parent->z_vfs, true); > + cache_purgevfs(zfsvfs->z_parent->z_vfs); > #endif > } > > > Modified: head/sys/kern/vfs_cache.c > ============================================================================== > --- head/sys/kern/vfs_cache.c Wed Sep 23 10:44:49 2020 (r366070) > +++ head/sys/kern/vfs_cache.c Wed Sep 23 10:46:07 2020 (r366071) > @@ -295,9 +295,6 @@ static u_long __exclusive_cache_line numcache;/* numbe > u_int ncsizefactor = 2; > SYSCTL_UINT(_vfs, OID_AUTO, ncsizefactor, CTLFLAG_RW, &ncsizefactor, 0, > "Size factor for namecache"); > -static u_int __read_mostly ncpurgeminvnodes; > -SYSCTL_UINT(_vfs, OID_AUTO, ncpurgeminvnodes, CTLFLAG_RW, &ncpurgeminvnodes, 0, > - "Number of vnodes below which purgevfs ignores the request"); > static u_int __read_mostly ncsize; /* the size as computed on creation or resizing */ > > struct nchstats nchstats; /* cache effectiveness statistics */ > @@ -2142,7 +2139,6 @@ nchinit(void *dummy __unused) > M_WAITOK | M_ZERO); > for (i = 0; i < numvnodelocks; i++) > mtx_init(&vnodelocks[i], "ncvn", NULL, MTX_DUPOK | MTX_RECURSE); > - ncpurgeminvnodes = numbucketlocks * 2; > > neglists = malloc(sizeof(*neglists) * numneglists, M_VFSCACHE, > M_WAITOK | M_ZERO); > @@ -2369,14 +2365,11 @@ cache_rename(struct vnode *fdvp, struct vnode *fvp, st > * Flush all entries referencing a particular filesystem. > */ > void > -cache_purgevfs(struct mount *mp, bool force) > +cache_purgevfs(struct mount *mp) > { > struct vnode *vp, *mvp; > > SDT_PROBE1(vfs, namecache, purgevfs, done, mp); > - if (!force && mp->mnt_nvnodelistsize <= ncpurgeminvnodes) > - return; > - > /* > * Somewhat wasteful iteration over all vnodes. Would be better to > * support filtering and avoid the interlock to begin with. > > Modified: head/sys/kern/vfs_mount.c > ============================================================================== > --- head/sys/kern/vfs_mount.c Wed Sep 23 10:44:49 2020 (r366070) > +++ head/sys/kern/vfs_mount.c Wed Sep 23 10:46:07 2020 (r366071) > @@ -1808,7 +1808,6 @@ dounmount(struct mount *mp, int flags, struct thread * > mp->mnt_flag &= ~MNT_ASYNC; > mp->mnt_kern_flag &= ~MNTK_ASYNC; > MNT_IUNLOCK(mp); > - cache_purgevfs(mp, false); /* remove cache entries for this file sys */ > vfs_deallocate_syncvnode(mp); > error = VFS_UNMOUNT(mp, flags); Is there any checker for debugging kernels, that no cache entries are left after unmount ? > vn_finished_write(mp); From owner-svn-src-head@freebsd.org Wed Sep 23 16:56:54 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B2C0D3FF027; Wed, 23 Sep 2020 16:56:54 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxPTx3BkJz3c3B; Wed, 23 Sep 2020 16:56:53 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 08NGujEQ042901; Wed, 23 Sep 2020 09:56:45 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 08NGujEs042900; Wed, 23 Sep 2020 09:56:45 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202009231656.08NGujEs042900@gndrsh.dnsmgr.net> Subject: Re: svn commit: r365643 - head/bin/cp In-Reply-To: To: Kyle Evans Date: Wed, 23 Sep 2020 09:56:45 -0700 (PDT) CC: Warner Losh , Alan Somers , Mateusz Guzik , src-committers , svn-src-all , svn-src-head Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4BxPTx3BkJz3c3B X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@gndrsh.dnsmgr.net has no SPF policy when checking 69.59.192.140) smtp.mailfrom=freebsd@gndrsh.dnsmgr.net X-Spamd-Result: default: False [1.62 / 15.00]; HAS_REPLYTO(0.00)[rgrimes@freebsd.org]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.12)[0.121]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; DMARC_NA(0.00)[dnsmgr.net]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.44)[0.442]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_SPAM_LONG(0.15)[0.153]; RCPT_COUNT_SEVEN(0.00)[7]; RCVD_TLS_LAST(0.00)[]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head]; FREEMAIL_CC(0.00)[bsdimp.com,freebsd.org,gmail.com] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 16:56:54 -0000 > cp is already fixed, people are still feeling the fallout of being > within those revisions and needing to bootstrap their own cp. We can > reduce the number of components these invocations rely on trivially to > shell built-in mechanics, why not do so? I would even go further, I would like to see the dependency on /dev/null removed from the build, and the boot process. >From the build because it means I would no longer have to mount /dev in my chroots, and from the boot because I hate to say it, but we often scribble in /dev before devfs is mounted and if you look at root file systems mounted on other systems you well often find a /dev/null FILE that got created during the boot process from a >/dev/null before devfs was mounted. > > On Tue, Sep 22, 2020 at 4:40 PM Warner Losh wrote: > > > > So why do we need a workaround at all? cp /dev/null has been fixed, and that's way more important to get right. > > > > I don't want to paper-over issues with this at all, though if we use the host's (now broken) cp, I suppose that might be OK in the short term. If that's the case, then maybe this is OK. > > > > Otherwise, I'd strongly prefer we fix cp. > > > > Warner > > > > On Tue, Sep 22, 2020 at 3:31 PM Alan Somers wrote: > >> > >> +1. > >> > >> On Tue, Sep 22, 2020 at 3:27 PM Kyle Evans wrote: > >>> > >>> I'm running a build at the suggestion of mjg to confirm there aren't > >>> any others hiding that can be converted, and I will commit after I've > >>> verified that this is it. > >>> > >>> On Tue, Sep 22, 2020 at 4:02 PM Alan Somers wrote: > >>> > > >>> > LGTM. > >>> > > >>> > On Tue, Sep 22, 2020 at 2:59 PM Kyle Evans wrote: > >>> >> > >>> >> Perhaps: > >>> >> > >>> >> diff --git a/stand/i386/zfsboot/Makefile b/stand/i386/zfsboot/Makefile > >>> >> index ff315abc0ef..7e362b43a39 100644 > >>> >> --- a/stand/i386/zfsboot/Makefile > >>> >> +++ b/stand/i386/zfsboot/Makefile > >>> >> @@ -81,7 +81,7 @@ zfsboot.ld: zfsboot.ldr zfsboot.bin ${BTXKERN} > >>> >> -o ${.TARGET} -P 1 zfsboot.bin > >>> >> > >>> >> zfsboot.ldr: > >>> >> - cp /dev/null ${.TARGET} > >>> >> + :> ${.TARGET} > >>> >> > >>> >> zfsboot.bin: zfsboot.out > >>> >> ${OBJCOPY} -S -O binary zfsboot.out ${.TARGET} > >>> >> diff --git a/stand/libsa/Makefile b/stand/libsa/Makefile > >>> >> index effece9e01b..63cd46a9c54 100644 > >>> >> --- a/stand/libsa/Makefile > >>> >> +++ b/stand/libsa/Makefile > >>> >> @@ -122,7 +122,7 @@ beforedepend: > >>> >> ln -sf ${SRCTOP}/include/arpa/inet.h arpa/inet.h; \ > >>> >> ln -sf ${SRCTOP}/include/arpa/tftp.h arpa/tftp.h; \ > >>> >> for i in _time.h _strings.h _string.h; do \ > >>> >> - [ -f xlocale/$$i ] || cp /dev/null xlocale/$$i; \ > >>> >> + [ -f xlocale/$$i ] || :> xlocale/$$i; \ > >>> >> done; \ > >>> >> for i in ${STAND_H_INC}; do \ > >>> >> ln -sf ${SASRC}/stand.h $$i; \ > >>> >> > >>> >> > >>> >> On Tue, Sep 22, 2020 at 3:58 PM Alan Somers wrote: > >>> >> > > >>> >> > Looks like two places in stand. Is there any reason why Mateusz's suggestion wouldn't work? > >>> >> > > >>> >> > > rg -g Makefile 'cp.*/dev/null' > >>> >> > stand/libsa/Makefile > >>> >> > 125: [ -f xlocale/$$i ] || cp /dev/null xlocale/$$i; \ > >>> >> > > >>> >> > stand/i386/zfsboot/Makefile > >>> >> > 82: cp /dev/null ${.TARGET} > >>> >> > > >>> >> > On Tue, Sep 22, 2020 at 2:54 PM Mateusz Guzik wrote: > >>> >> >> > >>> >> >> Can we instead add a workaround to the build tree? > >>> >> >> > >>> >> >> Where is cp /dev/null coming from anyway? Perhaps this can be patched > >>> >> >> to touch the target file. > >>> >> >> > >>> >> >> On 9/22/20, Alan Somers wrote: > >>> >> >> > On Tue, Sep 22, 2020 at 2:48 PM Kyle Evans wrote: > >>> >> >> > > >>> >> >> >> On Fri, Sep 11, 2020 at 3:49 PM Alan Somers wrote: > >>> >> >> >> > > >>> >> >> >> > Author: asomers > >>> >> >> >> > Date: Fri Sep 11 20:49:36 2020 > >>> >> >> >> > New Revision: 365643 > >>> >> >> >> > URL: https://svnweb.freebsd.org/changeset/base/365643 > >>> >> >> >> > > >>> >> >> >> > Log: > >>> >> >> >> > cp: fall back to read/write if copy_file_range fails > >>> >> >> >> > > >>> >> >> >> > Even though copy_file_range has a file-system agnostic version, it > >>> >> >> >> still > >>> >> >> >> > fails on devfs (perhaps because the file descriptor is non-seekable?) > >>> >> >> >> In > >>> >> >> >> > that case, fallback to old-fashioned read/write. Fixes > >>> >> >> >> > "cp /dev/null /tmp/null" > >>> >> >> >> > > >>> >> >> >> > >>> >> >> >> Hi, > >>> >> >> >> > >>> >> >> >> Any objection to adding a quick UPDATING entry for this? I'm seeing > >>> >> >> >> occasional reports of this breakage as recent as today on IRC from > >>> >> >> >> folks that were a little bit thrown off by this because it throws up > >>> >> >> >> fairly far into the build and looks like a stand build regression > >>> >> >> >> instead of a cp regression. > >>> >> >> >> > >>> >> >> >> Thanks, > >>> >> >> >> > >>> >> >> >> Kyle Evans > >>> >> >> >> > >>> >> >> > > >>> >> >> > No objection. Can you suggest the proper wording? > >>> >> >> > _______________________________________________ > >>> >> >> > 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" > >>> >> >> > > >>> >> >> > >>> >> >> > >>> >> >> -- > >>> >> >> Mateusz Guzik > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Wed Sep 23 16:57:10 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 216D13FEF39; Wed, 23 Sep 2020 16:57:10 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxPVF26vCz3c1f; Wed, 23 Sep 2020 16:57:09 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm1-x32b.google.com with SMTP id w2so757827wmi.1; Wed, 23 Sep 2020 09:57:09 -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=G4SnFdv+sxIPHPyCFWF4H/HuneYMYs5iG0isrOk0TDQ=; b=ETiTC+plkn+SU8x5hyblc6d5HqgJXi7dA6xugIXm0JHNBeGwP7+LDLeAS23+FmHbRk +F9EMYEKNJdP3S75sRtMBTlzobPAI+P+AAjLoW6q6++ivbEqMWX6R8mTtS/1l8i++2xk P1PTQyd1DAUI4aPNO8Heii49DghgHuOYYkuY8vyu80not9SJ9EoN8ohp+ow7oU3wwKCR SSSBeiJOdlNn6i+5/UNbDRqHYHvzvK2HMcWZgpG4gLj+vuZtv6JSw3xMB/R5NqFLxpFS A7shFmWZWy/J4pcYldmyjZEF0Dy7Z8/04iFivC6iaAXeK7siPxz63F/aZUoqNKe5Z9Hs NZaw== 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=G4SnFdv+sxIPHPyCFWF4H/HuneYMYs5iG0isrOk0TDQ=; b=rgIXM2pFGXz7zRtunIthWzN3j1Ck+ft02NnKDIg/4I4fJ3QKSWgypQljKadjUmHv8K DJRQreB+JKxH6uiKYE6Enb9DNK20SyjFJr2ppCPbAnT3BPCmzA/eboM1CCZ+pR0xmSOl pYeI75LlnWM5o532lGt6u9zO/bVtb6AT4kyKhqSm6hIGyCKzvsaqlByOeQQY4ewBgcsP MmO2hSxoAHzYeASyEXPDLO+0YNz39CtrDNyHxXuzfESMIn9c+i0B3do23GO6GQrvkG4b TL9ljdzFNRc7/s+Ax0zasxdC+UHwpoL3FF4UbcgxdTDV4gqGcBu4ssbx2V+TFR0i2FGk DLLQ== X-Gm-Message-State: AOAM532BNnmeYL8bs4PfBV1W+wFEz8SbNlMLqVI4UNKQhKcZhhoMrjp7 cjqDvzoG9EIM5mot9Adt8VRPHS1CTd5LGAbpFbQ= X-Google-Smtp-Source: ABdhPJx3bSmhdW47uB0Xjbl/PrbN8UM1vZwLf74E4A9UavRDEvN4M3RNLCyfMg8yH8oaY/+eTsb8ka1pGHzf65Ls3ts= X-Received: by 2002:a7b:ce0d:: with SMTP id m13mr493844wmc.83.1600880227689; Wed, 23 Sep 2020 09:57:07 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:6000:187:0:0:0:0 with HTTP; Wed, 23 Sep 2020 09:57:06 -0700 (PDT) In-Reply-To: <20200923164429.GI2570@kib.kiev.ua> References: <202009231046.08NAk7oW012157@repo.freebsd.org> <20200923164429.GI2570@kib.kiev.ua> From: Mateusz Guzik Date: Wed, 23 Sep 2020 18:57:06 +0200 Message-ID: Subject: Re: svn commit: r366071 - in head/sys: contrib/openzfs/module/os/freebsd/zfs kern sys To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4BxPVF26vCz3c1f X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=ETiTC+pl; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of mjguzik@gmail.com designates 2a00:1450:4864:20::32b as permitted sender) smtp.mailfrom=mjguzik@gmail.com X-Spamd-Result: default: False [-3.48 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.04)[-1.036]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_LONG(-1.03)[-1.027]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::32b:from]; NEURAL_HAM_SHORT(-0.42)[-0.417]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 16:57:10 -0000 On 9/23/20, Konstantin Belousov wrote: > On Wed, Sep 23, 2020 at 10:46:07AM +0000, Mateusz Guzik wrote: >> Author: mjg >> Date: Wed Sep 23 10:46:07 2020 >> New Revision: 366071 >> URL: https://svnweb.freebsd.org/changeset/base/366071 >> >> Log: >> cache: drop the force flag from purgevfs >> >> The optional scan is wasteful, thus it is removed altogether from >> unmount. >> >> Callers which always want it anyway remain unaffected. >> > Is there any checker for debugging kernels, that no cache entries are > left after unmount ? > It is provided indirectly. It is asserted no vnodes are associated with the mount point by the end of unmount, dooming purges entries from the namecache and it is an invariant that doomed vnodes don't gain new entries. -- Mateusz Guzik From owner-svn-src-head@freebsd.org Wed Sep 23 17:04:28 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5F47E3FF60B; Wed, 23 Sep 2020 17:04:28 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxPfh1sTdz3cdp; Wed, 23 Sep 2020 17:04:28 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 23F4A13F16; Wed, 23 Sep 2020 17:04:28 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08NH4RaR054148; Wed, 23 Sep 2020 17:04:27 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08NH4R5E054147; Wed, 23 Sep 2020 17:04:27 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202009231704.08NH4R5E054147@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Wed, 23 Sep 2020 17:04:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366078 - head/sbin/reboot X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sbin/reboot X-SVN-Commit-Revision: 366078 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 17:04:28 -0000 Author: cem Date: Wed Sep 23 17:04:27 2020 New Revision: 366078 URL: https://svnweb.freebsd.org/changeset/base/366078 Log: nextboot(8): Fix behavior on non-ZFS /boot systems Fix unquoted test for an empty value, which broke nextboot(8) on non-ZFS /boot systems after r365938. Discussed with: allanjude, tsoome X-MFC-With: r365938 Modified: head/sbin/reboot/nextboot.sh Modified: head/sbin/reboot/nextboot.sh ============================================================================== --- head/sbin/reboot/nextboot.sh Wed Sep 23 14:52:43 2020 (r366077) +++ head/sbin/reboot/nextboot.sh Wed Sep 23 17:04:27 2020 (r366078) @@ -116,7 +116,7 @@ set -e nextboot_tmp=$(mktemp $(dirname ${nextboot_file})/nextboot.XXXXXX) -if [ -n ${zfs} ]; then +if [ -n "${zfs}" ]; then zfsbootcfg -z ${zfs} -n freebsd:nvstore -k nextboot_enable -v YES cat >> ${nextboot_tmp} << EOF $kenv From owner-svn-src-head@freebsd.org Wed Sep 23 17:24:04 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BA4B63FF773 for ; Wed, 23 Sep 2020 17:24:04 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxQ5J191Xz3fR5 for ; Wed, 23 Sep 2020 17:24:03 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x743.google.com with SMTP id c2so424820qkf.10 for ; Wed, 23 Sep 2020 10:24:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UPabJJuKD9GRQanq1ky0iZoB5DN1Vc+HSm4+07QWeds=; b=IYOgZAED+/XdwAsA4JW0BtDzp9qX4+uSgOM5Z4KNbIwvSTPrlEqiFlDT+Yloc0BEpt jV9sFmDDbAwHd+umpUfjDdUHTvpbEVkqPZ6dIBF1qasHsTGBPShdj7XRi0Ec+H8cFYAy omuRLl/dS+/ux9xMaMtrkgp0X5/S9C7qyGiK1N6bmgZSMvrWz4kGYi1gcGnf8Xsv107T jEXE3c+Jm/09vn/ZaVQvcLoN85DLGrAtOvqPSS16f52+HdcjFalfBNVwE22hgOlDdj4t wj6yVAKX+UvU7cW8tuQurwDpV9MuDAaVVIL1iLIY0TaPAqV3S2s+7ZfaeLOwTL8pebkK RPKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UPabJJuKD9GRQanq1ky0iZoB5DN1Vc+HSm4+07QWeds=; b=V1NwhSp4qLGCuZbfp86P/pn/8M/QO38TAXeJKrYyFFkeqPCzKLAVOfM88qTplqkbt3 L+ON1jHmAb/k0B+ahJmVbp7ifL92KNbTWMhkybz+E1rOh47FrqZuoMEtJa7Meyx7ookV j9oISW5Iw5EMWU0dvl/KfAlL59/dJk/MtbdEhhQVp48mN9LpByAGmjC2THaX4DUaJs+p hssohbEHjKJasacdI0aJQ1ghUuC0tApnNeiMn3SOfPDMUkfpKpd043GWN6OsY5vzwGDA ex47nE97nhGl7GFKo3tqaU2Z/qXCfJKoyx8pOq7KR+B+szos/BwLE/lerS86EO9a2Dev 3Zvg== X-Gm-Message-State: AOAM5315w4BKKT24HMdMhxLRGh6inVDIavNyOLwpu50oLV37Fm2EBonr I5SUsceqU2ZrRMmVUY5GJML93bhDWsMUyI4LjYIUYw== X-Google-Smtp-Source: ABdhPJw+aTYgLZI+mPuPnZtDDWD4vIz4WuACEYNa/UrybmrCduhLzqsqlkVR49aDleBRSUSjO9AMe1nU7435RsdKdG0= X-Received: by 2002:a05:620a:1583:: with SMTP id d3mr856442qkk.495.1600881843024; Wed, 23 Sep 2020 10:24:03 -0700 (PDT) MIME-Version: 1.0 References: <202009231656.08NGujEs042900@gndrsh.dnsmgr.net> In-Reply-To: <202009231656.08NGujEs042900@gndrsh.dnsmgr.net> From: Warner Losh Date: Wed, 23 Sep 2020 11:23:51 -0600 Message-ID: Subject: Re: svn commit: r365643 - head/bin/cp To: "Rodney W. Grimes" Cc: Kyle Evans , Alan Somers , Mateusz Guzik , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4BxQ5J191Xz3fR5 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=IYOgZAED; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::743) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-1.72 / 15.00]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[svn-src-head]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_MEDIUM(-0.86)[-0.858]; NEURAL_HAM_LONG(-0.94)[-0.943]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; NEURAL_SPAM_SHORT(0.08)[0.082]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCPT_COUNT_SEVEN(0.00)[7]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::743:from]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_TWO(0.00)[2]; FREEMAIL_CC(0.00)[freebsd.org,gmail.com]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 17:24:04 -0000 On Wed, Sep 23, 2020, 10:56 AM Rodney W. Grimes wrote: > > cp is already fixed, people are still feeling the fallout of being > > within those revisions and needing to bootstrap their own cp. We can > > reduce the number of components these invocations rely on trivially to > > shell built-in mechanics, why not do so? > > I would even go further, I would like to see the dependency on > /dev/null removed from the build, and the boot process. > A worthy goal, but one I'm afraid is out of our reach. A quick grep shows just over 200 instances of /dev/null in the Makefile and mk file (800 if you don't filter Makefile.in and Makefile.am). Maybe a third of those are due to tests and other false positives. It would be quite the effort to eliminate them all. And /dev/tty and /dev/zero likely will be troublesome too, as they are used by running programs. and how would you throw away output you know is bad / bogus without /dev/null? >From the build because it means I would no longer have to > mount /dev in my chroots, and from the boot because I > hate to say it, but we often scribble in /dev before > devfs is mounted and if you look at root file systems > mounted on other systems you well often find a /dev/null > FILE that got created during the boot process from a >/dev/null > before devfs was mounted. > But for this issue, we're not mounting devfs early enough. We should fix that. Removing /dev/null from the boot process likely is never going to happen because we use it all over the place to discard output... There's ~200 instances of it in the boot rc scripts, so getting rid of it there would also be quite the effort, with the same question. Warner > > > On Tue, Sep 22, 2020 at 4:40 PM Warner Losh wrote: > > > > > > So why do we need a workaround at all? cp /dev/null has been fixed, > and that's way more important to get right. > > > > > > I don't want to paper-over issues with this at all, though if we use > the host's (now broken) cp, I suppose that might be OK in the short term. > If that's the case, then maybe this is OK. > > > > > > Otherwise, I'd strongly prefer we fix cp. > > > > > > Warner > > > > > > On Tue, Sep 22, 2020 at 3:31 PM Alan Somers > wrote: > > >> > > >> +1. > > >> > > >> On Tue, Sep 22, 2020 at 3:27 PM Kyle Evans > wrote: > > >>> > > >>> I'm running a build at the suggestion of mjg to confirm there aren't > > >>> any others hiding that can be converted, and I will commit after I've > > >>> verified that this is it. > > >>> > > >>> On Tue, Sep 22, 2020 at 4:02 PM Alan Somers > wrote: > > >>> > > > >>> > LGTM. > > >>> > > > >>> > On Tue, Sep 22, 2020 at 2:59 PM Kyle Evans > wrote: > > >>> >> > > >>> >> Perhaps: > > >>> >> > > >>> >> diff --git a/stand/i386/zfsboot/Makefile > b/stand/i386/zfsboot/Makefile > > >>> >> index ff315abc0ef..7e362b43a39 100644 > > >>> >> --- a/stand/i386/zfsboot/Makefile > > >>> >> +++ b/stand/i386/zfsboot/Makefile > > >>> >> @@ -81,7 +81,7 @@ zfsboot.ld: zfsboot.ldr zfsboot.bin ${BTXKERN} > > >>> >> -o ${.TARGET} -P 1 zfsboot.bin > > >>> >> > > >>> >> zfsboot.ldr: > > >>> >> - cp /dev/null ${.TARGET} > > >>> >> + :> ${.TARGET} > > >>> >> > > >>> >> zfsboot.bin: zfsboot.out > > >>> >> ${OBJCOPY} -S -O binary zfsboot.out ${.TARGET} > > >>> >> diff --git a/stand/libsa/Makefile b/stand/libsa/Makefile > > >>> >> index effece9e01b..63cd46a9c54 100644 > > >>> >> --- a/stand/libsa/Makefile > > >>> >> +++ b/stand/libsa/Makefile > > >>> >> @@ -122,7 +122,7 @@ beforedepend: > > >>> >> ln -sf ${SRCTOP}/include/arpa/inet.h arpa/inet.h; \ > > >>> >> ln -sf ${SRCTOP}/include/arpa/tftp.h arpa/tftp.h; \ > > >>> >> for i in _time.h _strings.h _string.h; do \ > > >>> >> - [ -f xlocale/$$i ] || cp /dev/null xlocale/$$i; \ > > >>> >> + [ -f xlocale/$$i ] || :> xlocale/$$i; \ > > >>> >> done; \ > > >>> >> for i in ${STAND_H_INC}; do \ > > >>> >> ln -sf ${SASRC}/stand.h $$i; \ > > >>> >> > > >>> >> > > >>> >> On Tue, Sep 22, 2020 at 3:58 PM Alan Somers > wrote: > > >>> >> > > > >>> >> > Looks like two places in stand. Is there any reason why > Mateusz's suggestion wouldn't work? > > >>> >> > > > >>> >> > > rg -g Makefile 'cp.*/dev/null' > > >>> >> > stand/libsa/Makefile > > >>> >> > 125: [ -f xlocale/$$i ] || cp /dev/null xlocale/$$i; \ > > >>> >> > > > >>> >> > stand/i386/zfsboot/Makefile > > >>> >> > 82: cp /dev/null ${.TARGET} > > >>> >> > > > >>> >> > On Tue, Sep 22, 2020 at 2:54 PM Mateusz Guzik < > mjguzik@gmail.com> wrote: > > >>> >> >> > > >>> >> >> Can we instead add a workaround to the build tree? > > >>> >> >> > > >>> >> >> Where is cp /dev/null coming from anyway? Perhaps this can be > patched > > >>> >> >> to touch the target file. > > >>> >> >> > > >>> >> >> On 9/22/20, Alan Somers wrote: > > >>> >> >> > On Tue, Sep 22, 2020 at 2:48 PM Kyle Evans < > kevans@freebsd.org> wrote: > > >>> >> >> > > > >>> >> >> >> On Fri, Sep 11, 2020 at 3:49 PM Alan Somers < > asomers@freebsd.org> wrote: > > >>> >> >> >> > > > >>> >> >> >> > Author: asomers > > >>> >> >> >> > Date: Fri Sep 11 20:49:36 2020 > > >>> >> >> >> > New Revision: 365643 > > >>> >> >> >> > URL: https://svnweb.freebsd.org/changeset/base/365643 > > >>> >> >> >> > > > >>> >> >> >> > Log: > > >>> >> >> >> > cp: fall back to read/write if copy_file_range fails > > >>> >> >> >> > > > >>> >> >> >> > Even though copy_file_range has a file-system agnostic > version, it > > >>> >> >> >> still > > >>> >> >> >> > fails on devfs (perhaps because the file descriptor is > non-seekable?) > > >>> >> >> >> In > > >>> >> >> >> > that case, fallback to old-fashioned read/write. Fixes > > >>> >> >> >> > "cp /dev/null /tmp/null" > > >>> >> >> >> > > > >>> >> >> >> > > >>> >> >> >> Hi, > > >>> >> >> >> > > >>> >> >> >> Any objection to adding a quick UPDATING entry for this? > I'm seeing > > >>> >> >> >> occasional reports of this breakage as recent as today on > IRC from > > >>> >> >> >> folks that were a little bit thrown off by this because it > throws up > > >>> >> >> >> fairly far into the build and looks like a stand build > regression > > >>> >> >> >> instead of a cp regression. > > >>> >> >> >> > > >>> >> >> >> Thanks, > > >>> >> >> >> > > >>> >> >> >> Kyle Evans > > >>> >> >> >> > > >>> >> >> > > > >>> >> >> > No objection. Can you suggest the proper wording? > > >>> >> >> > _______________________________________________ > > >>> >> >> > 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" > > >>> >> >> > > > >>> >> >> > > >>> >> >> > > >>> >> >> -- > > >>> >> >> Mateusz Guzik > > > > -- > Rod Grimes > rgrimes@freebsd.org > From owner-svn-src-head@freebsd.org Wed Sep 23 17:53:57 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 91FE142169F; Wed, 23 Sep 2020 17:53:57 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxQln2PPGz3yVd; Wed, 23 Sep 2020 17:53:56 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 08NHrtp5043126; Wed, 23 Sep 2020 10:53:55 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 08NHrtuI043125; Wed, 23 Sep 2020 10:53:55 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202009231753.08NHrtuI043125@gndrsh.dnsmgr.net> Subject: Re: svn commit: r366025 - head/share/man/man9 In-Reply-To: <202009222301.08MN1rkh076778@repo.freebsd.org> To: Warner Losh Date: Wed, 23 Sep 2020 10:53:55 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4BxQln2PPGz3yVd X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 17:53:57 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: imp > Date: Tue Sep 22 23:01:53 2020 > New Revision: 366025 > URL: https://svnweb.freebsd.org/changeset/base/366025 > > Log: > Document devctl_safe_quote_sb > > This routine centralizes the knowledge needed for properly quoting > 'value' in all key="value" items that appear in devctl messages. > > Reviewed by: bcr > Differential Revision: https://reviews.freebsd.org/D26520 > > Added: > head/share/man/man9/devctl_safe_quote_sb.9 (contents, props changed) > Modified: > head/share/man/man9/Makefile > > Modified: head/share/man/man9/Makefile > ============================================================================== > --- head/share/man/man9/Makefile Tue Sep 22 23:01:44 2020 (r366024) > +++ head/share/man/man9/Makefile Tue Sep 22 23:01:53 2020 (r366025) > @@ -122,6 +122,8 @@ MAN= accept_filter.9 \ > DEV_MODULE.9 \ > dev_refthread.9 \ > devctl_process_running.9 \ > + devctl_safe_quote_sb.9 \ > + devctl_ > devstat.9 \ > devtoname.9 \ > disk.9 \ > > Added: head/share/man/man9/devctl_safe_quote_sb.9 > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/share/man/man9/devctl_safe_quote_sb.9 Tue Sep 22 23:01:53 2020 (r366025) > @@ -0,0 +1,57 @@ > +.\" > +.\" Copyright (c) 2020 M Warner Losh > +.\" > +.\" This program is free software. Where is this line suddenly coming from? > +.\" > +.\" 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 DEVELOPERS ``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 DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, > +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT > +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, > +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY > +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT > +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF > +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > +.\" > +.\" $FreeBSD$ > +.\" > +.Dd September 22, 2020 > +.Dt DEVCTL_SAFE_QUOTE_SB 9 > +.Os > +.Sh NAME > +.Nm devctl_safe_quote_sb > +.Nd Insert a string, properly quoted, into a sbuf > +.Sh SYNOPSIS > +.In sys/devctl.h > +.In sys/sbuf.h > +.Ft void > +.Fn devctl_safe_quote_sb "struct sbuf *sb" "const char *src" > +.Sh DESCRIPTION > +Copy the string from > +.Vn src > +into > +.Vn sb . > +All backslash characters are doubled. > +All double quote characters > +.Sq " > +are also preceded by a backslash. > +All other characters are copied without modification. > +The > +.Xr devctl 4 > +protocol requires quoted string to be quoted thus. > +This routine centralizes this knowledge. > +.Sh SEE ALSO > +.Xr devd 8 > +.Sh AUTHORS > +This manual page was written by > +.An M. Warner Losh > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Wed Sep 23 18:03:09 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4FE9B421D37; Wed, 23 Sep 2020 18:03:09 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxQyP1GwYz40jl; Wed, 23 Sep 2020 18:03:09 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0F0AF148B0; Wed, 23 Sep 2020 18:03:09 +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 08NI38Ob091988; Wed, 23 Sep 2020 18:03:08 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08NI371w091981; Wed, 23 Sep 2020 18:03:07 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202009231803.08NI371w091981@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 23 Sep 2020 18:03:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366085 - in head/sys: compat/cloudabi compat/freebsd32 compat/linux kern sys X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: compat/cloudabi compat/freebsd32 compat/linux kern sys X-SVN-Commit-Revision: 366085 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 18:03:09 -0000 Author: kib Date: Wed Sep 23 18:03:07 2020 New Revision: 366085 URL: https://svnweb.freebsd.org/changeset/base/366085 Log: Do not leak oldvmspace if image activation failed and current address space is already destroyed, so kern_execve() terminates the process. While there, clean up some internals of post_execve() inlined in init_main. Reported by: Peter Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D26525 Modified: head/sys/compat/cloudabi/cloudabi_proc.c head/sys/compat/freebsd32/freebsd32_misc.c head/sys/compat/linux/linux_emul.c head/sys/kern/init_main.c head/sys/kern/kern_exec.c head/sys/sys/imgact.h head/sys/sys/syscallsubr.h Modified: head/sys/compat/cloudabi/cloudabi_proc.c ============================================================================== --- head/sys/compat/cloudabi/cloudabi_proc.c Wed Sep 23 17:42:19 2020 (r366084) +++ head/sys/compat/cloudabi/cloudabi_proc.c Wed Sep 23 18:03:07 2020 (r366085) @@ -57,7 +57,7 @@ cloudabi_sys_proc_exec(struct thread *td, uap->fds, uap->fds_len); if (error == 0) { args.fd = uap->fd; - error = kern_execve(td, &args, NULL); + error = kern_execve(td, &args, NULL, oldvmspace); } post_execve(td, error, oldvmspace); return (error); Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Wed Sep 23 17:42:19 2020 (r366084) +++ head/sys/compat/freebsd32/freebsd32_misc.c Wed Sep 23 18:03:07 2020 (r366085) @@ -440,7 +440,7 @@ freebsd32_execve(struct thread *td, struct freebsd32_e error = freebsd32_exec_copyin_args(&eargs, uap->fname, UIO_USERSPACE, uap->argv, uap->envv); if (error == 0) - error = kern_execve(td, &eargs, NULL); + error = kern_execve(td, &eargs, NULL, oldvmspace); post_execve(td, error, oldvmspace); return (error); } @@ -459,7 +459,7 @@ freebsd32_fexecve(struct thread *td, struct freebsd32_ uap->argv, uap->envv); if (error == 0) { eargs.fd = uap->fd; - error = kern_execve(td, &eargs, NULL); + error = kern_execve(td, &eargs, NULL, oldvmspace); } post_execve(td, error, oldvmspace); return (error); Modified: head/sys/compat/linux/linux_emul.c ============================================================================== --- head/sys/compat/linux/linux_emul.c Wed Sep 23 17:42:19 2020 (r366084) +++ head/sys/compat/linux/linux_emul.c Wed Sep 23 18:03:07 2020 (r366085) @@ -256,7 +256,7 @@ linux_common_execve(struct thread *td, struct image_ar if (error != 0) return (error); - error = kern_execve(td, eargs, NULL); + error = kern_execve(td, eargs, NULL, oldvmspace); post_execve(td, error, oldvmspace); if (error != EJUSTRETURN) return (error); Modified: head/sys/kern/init_main.c ============================================================================== --- head/sys/kern/init_main.c Wed Sep 23 17:42:19 2020 (r366084) +++ head/sys/kern/init_main.c Wed Sep 23 18:03:07 2020 (r366085) @@ -752,16 +752,11 @@ start_init(void *dummy) KASSERT((td->td_pflags & TDP_EXECVMSPC) == 0, ("nested execve")); oldvmspace = td->td_proc->p_vmspace; - error = kern_execve(td, &args, NULL); + error = kern_execve(td, &args, NULL, oldvmspace); KASSERT(error != 0, ("kern_execve returned success, not EJUSTRETURN")); if (error == EJUSTRETURN) { - if ((td->td_pflags & TDP_EXECVMSPC) != 0) { - KASSERT(p->p_vmspace != oldvmspace, - ("oldvmspace still used")); - vmspace_free(oldvmspace); - td->td_pflags &= ~TDP_EXECVMSPC; - } + exec_cleanup(td, oldvmspace); free(free_init_path, M_TEMP); TSEXIT(); return; Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Wed Sep 23 17:42:19 2020 (r366084) +++ head/sys/kern/kern_exec.c Wed Sep 23 18:03:07 2020 (r366085) @@ -118,7 +118,7 @@ static int sysctl_kern_ps_strings(SYSCTL_HANDLER_ARGS) static int sysctl_kern_usrstack(SYSCTL_HANDLER_ARGS); static int sysctl_kern_stackprot(SYSCTL_HANDLER_ARGS); static int do_execve(struct thread *td, struct image_args *args, - struct mac *mac_p); + struct mac *mac_p, struct vmspace *oldvmspace); /* XXX This should be vm_size_t. */ SYSCTL_PROC(_kern, KERN_PS_STRINGS, ps_strings, CTLTYPE_ULONG|CTLFLAG_RD| @@ -223,7 +223,7 @@ sys_execve(struct thread *td, struct execve_args *uap) error = exec_copyin_args(&args, uap->fname, UIO_USERSPACE, uap->argv, uap->envv); if (error == 0) - error = kern_execve(td, &args, NULL); + error = kern_execve(td, &args, NULL, oldvmspace); post_execve(td, error, oldvmspace); return (error); } @@ -249,7 +249,7 @@ sys_fexecve(struct thread *td, struct fexecve_args *ua uap->argv, uap->envv); if (error == 0) { args.fd = uap->fd; - error = kern_execve(td, &args, NULL); + error = kern_execve(td, &args, NULL, oldvmspace); } post_execve(td, error, oldvmspace); return (error); @@ -278,7 +278,7 @@ sys___mac_execve(struct thread *td, struct __mac_execv error = exec_copyin_args(&args, uap->fname, UIO_USERSPACE, uap->argv, uap->envv); if (error == 0) - error = kern_execve(td, &args, uap->mac_p); + error = kern_execve(td, &args, uap->mac_p, oldvmspace); post_execve(td, error, oldvmspace); return (error); #else @@ -326,30 +326,26 @@ post_execve(struct thread *td, int error, struct vmspa thread_single_end(p, SINGLE_BOUNDARY); PROC_UNLOCK(p); } - if ((td->td_pflags & TDP_EXECVMSPC) != 0) { - KASSERT(p->p_vmspace != oldvmspace, - ("oldvmspace still used")); - vmspace_free(oldvmspace); - td->td_pflags &= ~TDP_EXECVMSPC; - } + exec_cleanup(td, oldvmspace); } /* - * XXX: kern_execve has the astonishing property of not always returning to + * kern_execve() has the astonishing property of not always returning to * the caller. If sufficiently bad things happen during the call to * do_execve(), it can end up calling exit1(); as a result, callers must * avoid doing anything which they might need to undo (e.g., allocating * memory). */ int -kern_execve(struct thread *td, struct image_args *args, struct mac *mac_p) +kern_execve(struct thread *td, struct image_args *args, struct mac *mac_p, + struct vmspace *oldvmspace) { AUDIT_ARG_ARGV(args->begin_argv, args->argc, exec_args_get_begin_envv(args) - args->begin_argv); AUDIT_ARG_ENVV(exec_args_get_begin_envv(args), args->envc, args->endp - exec_args_get_begin_envv(args)); - return (do_execve(td, args, mac_p)); + return (do_execve(td, args, mac_p, oldvmspace)); } /* @@ -357,7 +353,8 @@ kern_execve(struct thread *td, struct image_args *args * userspace pointers from the passed thread. */ static int -do_execve(struct thread *td, struct image_args *args, struct mac *mac_p) +do_execve(struct thread *td, struct image_args *args, struct mac *mac_p, + struct vmspace *oldvmspace) { struct proc *p = td->td_proc; struct nameidata nd; @@ -949,6 +946,7 @@ exec_fail: if (error && imgp->vmspace_destroyed) { /* sorry, no more process anymore. exit gracefully */ + exec_cleanup(td, oldvmspace); exit1(td, 0, SIGABRT); /* NOT REACHED */ } @@ -965,6 +963,20 @@ exec_fail: * registers unmodified when returning EJUSTRETURN. */ return (error == 0 ? EJUSTRETURN : error); +} + +void +exec_cleanup(struct thread *td, struct vmspace *oldvmspace) +{ + struct proc *p; + + p = td->td_proc; + if ((td->td_pflags & TDP_EXECVMSPC) != 0) { + KASSERT(p->p_vmspace != oldvmspace, + ("oldvmspace still used")); + vmspace_free(oldvmspace); + td->td_pflags &= ~TDP_EXECVMSPC; + } } int Modified: head/sys/sys/imgact.h ============================================================================== --- head/sys/sys/imgact.h Wed Sep 23 17:42:19 2020 (r366084) +++ head/sys/sys/imgact.h Wed Sep 23 18:03:07 2020 (r366085) @@ -112,6 +112,7 @@ int exec_args_adjust_args(struct image_args *args, siz ssize_t extend); char *exec_args_get_begin_envv(struct image_args *args); int exec_check_permissions(struct image_params *); +void exec_cleanup(struct thread *td, struct vmspace *); int exec_copyout_strings(struct image_params *, uintptr_t *); void exec_free_args(struct image_args *); int exec_new_vmspace(struct image_params *, struct sysentvec *); Modified: head/sys/sys/syscallsubr.h ============================================================================== --- head/sys/sys/syscallsubr.h Wed Sep 23 17:42:19 2020 (r366084) +++ head/sys/sys/syscallsubr.h Wed Sep 23 18:03:07 2020 (r366085) @@ -63,6 +63,7 @@ struct stat; struct thr_param; struct uio; struct vm_map; +struct vmspace; typedef int (*mmap_check_fp_fn)(struct file *, int, int, int); @@ -129,7 +130,7 @@ int kern_cpuset_setid(struct thread *td, cpuwhich_t wh id_t id, cpusetid_t setid); int kern_dup(struct thread *td, u_int mode, int flags, int old, int new); int kern_execve(struct thread *td, struct image_args *args, - struct mac *mac_p); + struct mac *mac_p, struct vmspace *oldvmspace); int kern_fchmodat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, mode_t mode, int flag); int kern_fchownat(struct thread *td, int fd, const char *path, From owner-svn-src-head@freebsd.org Wed Sep 23 18:27:48 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AAA6C42281C; Wed, 23 Sep 2020 18:27:48 +0000 (UTC) (envelope-from xtouqh@hotmail.com) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04olkn080a.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0d::80a]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "GlobalSign Organization Validation CA - SHA256 - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxRVp2kb3z42dM; Wed, 23 Sep 2020 18:27:46 +0000 (UTC) (envelope-from xtouqh@hotmail.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BtK1FeGtDDNo0eEHmIxzmcLwRd4Yp3PGifEAQ50MAqTvw23zSgrfJwKQXHY3lB2KOdo9YgtFOvaH+FRJ7bkAWZPg5VaXc94WE9FzelSCtVOwgCuUc3TNPWOTVhA4lEhhO83orcRvNfT6LWfTrdXVhemwHpok3u0BUuGx7wWdr70P+Q2sw8gcP76DfoNkYKkvwaPLIT6TCwbQH2stoi8yzYEF/DGy1kLW9OoRMMpvwrP6YxvPcqowgGyunZACbNfGXMOBA5miPjIQwZBImd5gwR1JBmdKRWtjHbh1DNbarjMM9e0EtRBA6DzvSP3qrKIB7WDN6RQFLFPF53MLo7oxCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=l5xqiXOg7cc5mFhzxsNsNvcds7EpA4mVq6ECDsugQHY=; b=SbUeL7+wTAhG48XAvG8HKxtrWWg9kW6zkt6Bab6e76H+nGZ+JYniIfhEJsWfUm7d3JpSeD5Al+WylAeE8Y4OFqywkG1DC/9//IzimsLYSsa+MWlsrAO45pAPW/aKlmUcdW+oNyebZJVnaZqAL9SIAypUV1bFz0FN/t35Nb90Fh6cmoDiaZdRgx59C/TuVjs6QLzIBoeSbR7rwBvUNbxAI1ZGxZGS3VDQl5V/j+25QcAi7qzW9dvl4RaEpt/Ojpzezs5ZNj6pJ96lZYszk5slQhHv3Ey/KGAaYne1P/S1GD7SlO84mBlDT78sqSKgpxNTB/LheGu9IY+MhIlU22SyFQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=l5xqiXOg7cc5mFhzxsNsNvcds7EpA4mVq6ECDsugQHY=; b=PU3cP484rZAlHTZYwa7Q9U0jJD3XwXnSKX2Suc3g+CMlvAzHHnaKLpDjpm7kBjwBUvyLJEOIuSlyzdzwPxGbQdQ9EKE07AE8slR+JFN8H8mvgveUpaNumBrl79L0sxFUdQImJ22A/cwRCehO5pdC5S8gENO4k3bsR1I07wjDsJZRb9rMYg1aW4FFrylEqetjbFZHxfcyUBYmKPro7dwx3jQ2mIB1GNJQNBsO11jonXgAV3p8u1fJDuX9W80FX842aE0c022lx6G13qs7jhhFw7o61RGmci7rM3bn5QXbrpF6/bu0PmqBmAL2EoYL090sAjvJCl+CWSgHnOuVfj6jHg== Received: from HE1EUR04FT031.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0d::50) by HE1EUR04HT080.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0d::72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.15; Wed, 23 Sep 2020 18:12:05 +0000 Received: from AM0PR06MB3986.eurprd06.prod.outlook.com (2a01:111:e400:7e0d::44) by HE1EUR04FT031.mail.protection.outlook.com (2a01:111:e400:7e0d::290) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3412.21 via Frontend Transport; Wed, 23 Sep 2020 18:12:05 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:4A29456AE8D4FAFED33885BD5353A0F8EAF4E148902069941C89E747CEE9BE72; UpperCasedChecksum:0EFBBCE35F65B80D4818F5E9ABE696B92FF3A1AE28633D1C710BFB38AA785416; SizeAsReceived:8751; Count:48 Received: from AM0PR06MB3986.eurprd06.prod.outlook.com ([fe80::9dd1:2866:7eae:1ccf]) by AM0PR06MB3986.eurprd06.prod.outlook.com ([fe80::9dd1:2866:7eae:1ccf%7]) with mapi id 15.20.3391.027; Wed, 23 Sep 2020 18:12:05 +0000 Subject: Re: svn commit: r366025 - head/share/man/man9 To: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202009222301.08MN1rkh076778@repo.freebsd.org> From: xtouqh@hotmail.com Message-ID: Date: Wed, 23 Sep 2020 21:12:04 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.2.2 In-Reply-To: <202009222301.08MN1rkh076778@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: AM0PR06CA0144.eurprd06.prod.outlook.com (2603:10a6:208:ab::49) To AM0PR06MB3986.eurprd06.prod.outlook.com (2603:10a6:208:b6::28) X-Microsoft-Original-Message-ID: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.1.6] (91.240.124.157) by AM0PR06CA0144.eurprd06.prod.outlook.com (2603:10a6:208:ab::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.14 via Frontend Transport; Wed, 23 Sep 2020 18:12:04 +0000 X-Microsoft-Original-Message-ID: X-TMN: [ZOh56D35yboGU1FRudpc2F4K6jj8Bkyw] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 16f7d7ca-49bb-4f26-3550-08d85fec2d28 X-MS-TrafficTypeDiagnostic: HE1EUR04HT080: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dX2LpRf4IbseReD0Woec0FirOdZ5HB5qluxXbKZuH+FApQJ/tbeLbsAjoyK97nGu9eAX1kPSLMwnA6cj3kL1Nkck37C60JECmjDdgnLEW95G2UtdGwRR1jeteK3GHNRAYRs1YZ8Q7GvnwShpHoZ1thjRDLuhUsoA8Z1rfwQKLkQfxnZN/r+Mg2gn6esI4DCJ0Err/UHQ4oDgLg8l34CTaY95ARMhDe14sctMjfCtfQbqTuaiekPfQnpxMH63q82/ X-MS-Exchange-AntiSpam-MessageData: Kumvn6gP9KV16Xxzmsrwzoo93rAwcWMehqWIrktV8XSJBAgFxUVfAQLmtXIMypZqYF0IEprWt+EHyAX1oPEcW74qYh4HWuqXM68Z4a0jgL5LEc54qiFARioiSAQj+4wWvF4aSAocNzK5Cft1/zsJiw== X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-Network-Message-Id: 16f7d7ca-49bb-4f26-3550-08d85fec2d28 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2020 18:12:04.9494 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: HE1EUR04FT031.eop-eur04.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR04HT080 X-Rspamd-Queue-Id: 4BxRVp2kb3z42dM X-Spamd-Bar: +++++++++ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=hotmail.com header.s=selector1 header.b=PU3cP484; dmarc=pass (policy=none) header.from=hotmail.com; spf=pass (mx1.freebsd.org: domain of xtouqh@hotmail.com designates 2a01:111:f400:fe0d::80a as permitted sender) smtp.mailfrom=xtouqh@hotmail.com X-Spamd-Result: default: False [9.30 / 15.00]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[hotmail.com]; R_SPF_ALLOW(0.00)[+ip6:2a01:111:f400::/48]; DKIM_TRACE(0.00)[hotmail.com:+]; DMARC_POLICY_ALLOW(0.00)[hotmail.com,none]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[hotmail.com]; ASN(0.00)[asn:8075, ipnet:2a01:111:f000::/36, country:US]; FORGED_MUA_THUNDERBIRD_MSGID_UNKNOWN(2.50)[]; ARC_ALLOW(0.00)[microsoft.com:s=arcselector9901:i=1]; DWL_DNSWL_NONE(0.00)[hotmail.com:dkim]; RECEIVED_SPAMHAUS_XBL(5.00)[91.240.124.157:received]; R_DKIM_ALLOW(0.00)[hotmail.com:s=selector1]; RCVD_COUNT_FIVE(0.00)[5]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.09)[-0.095]; MIME_GOOD(-0.10)[text/plain]; NEURAL_SPAM_SHORT(1.40)[1.399]; NEURAL_SPAM_MEDIUM(0.50)[0.496]; BAD_REP_POLICIES(0.10)[]; FROM_NO_DN(0.00)[]; GREYLIST(0.00)[pass,body]; MAILMAN_DEST(0.00)[svn-src-head,svn-src-all] X-Spam: Yes X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 18:27:48 -0000 Warner Losh wrote: > Author: imp > Date: Tue Sep 22 23:01:53 2020 > New Revision: 366025 > URL: https://svnweb.freebsd.org/changeset/base/366025 > > Log: > Document devctl_safe_quote_sb > > This routine centralizes the knowledge needed for properly quoting > 'value' in all key="value" items that appear in devctl messages. > > Reviewed by: bcr > Differential Revision: https://reviews.freebsd.org/D26520 > > Added: > head/share/man/man9/devctl_safe_quote_sb.9 (contents, props changed) > Modified: > head/share/man/man9/Makefile > > Modified: head/share/man/man9/Makefile > ============================================================================== > --- head/share/man/man9/Makefile Tue Sep 22 23:01:44 2020 (r366024) > +++ head/share/man/man9/Makefile Tue Sep 22 23:01:53 2020 (r366025) > @@ -122,6 +122,8 @@ MAN= accept_filter.9 \ > DEV_MODULE.9 \ > dev_refthread.9 \ > devctl_process_running.9 \ > + devctl_safe_quote_sb.9 \ > + devctl_ > devstat.9 \ > devtoname.9 \ > disk.9 \ > > Added: head/share/man/man9/devctl_safe_quote_sb.9 > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/share/man/man9/devctl_safe_quote_sb.9 Tue Sep 22 23:01:53 2020 (r366025) > @@ -0,0 +1,57 @@ > +.\" > +.\" Copyright (c) 2020 M Warner Losh > +.\" > +.\" This program is free software. > +.\" > +.\" 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 DEVELOPERS ``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 DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, > +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT > +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, > +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY > +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT > +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF > +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > +.\" > +.\" $FreeBSD$ > +.\" > +.Dd September 22, 2020 > +.Dt DEVCTL_SAFE_QUOTE_SB 9 > +.Os > +.Sh NAME > +.Nm devctl_safe_quote_sb > +.Nd Insert a string, properly quoted, into a sbuf > +.Sh SYNOPSIS > +.In sys/devctl.h > +.In sys/sbuf.h > +.Ft void > +.Fn devctl_safe_quote_sb "struct sbuf *sb" "const char *src" > +.Sh DESCRIPTION > +Copy the string from > +.Vn src .Va > +into > +.Vn sb . .Va > +All backslash characters are doubled. > +All double quote characters > +.Sq " .Sq \&" > +are also preceded by a backslash. > +All other characters are copied without modification. > +The > +.Xr devctl 4 > +protocol requires quoted string to be quoted thus. > +This routine centralizes this knowledge. > +.Sh SEE ALSO > +.Xr devd 8 > +.Sh AUTHORS > +This manual page was written by > +.An M. Warner Losh From owner-svn-src-head@freebsd.org Wed Sep 23 18:54:15 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 657E1423549; Wed, 23 Sep 2020 18:54:15 +0000 (UTC) (envelope-from nick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxS5M1wdzz47Vm; Wed, 23 Sep 2020 18:54:15 +0000 (UTC) (envelope-from nick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1D637152D9; Wed, 23 Sep 2020 18:54:15 +0000 (UTC) (envelope-from nick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08NIsEEb028973; Wed, 23 Sep 2020 18:54:14 GMT (envelope-from nick@FreeBSD.org) Received: (from nick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08NIsEXA028972; Wed, 23 Sep 2020 18:54:14 GMT (envelope-from nick@FreeBSD.org) Message-Id: <202009231854.08NIsEXA028972@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nick set sender to nick@FreeBSD.org using -f From: "Nick O'Brien" Date: Wed, 23 Sep 2020 18:54:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366086 - head/sys/riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: nick X-SVN-Commit-Paths: head/sys/riscv/riscv X-SVN-Commit-Revision: 366086 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 18:54:15 -0000 Author: nick Date: Wed Sep 23 18:54:14 2020 New Revision: 366086 URL: https://svnweb.freebsd.org/changeset/base/366086 Log: riscv: Trap cleanup - use nitems() No functional changes, just cleanup. Reviewed by: kp Approved by: kp (mentor) Sponsored by: Axiado Modified: head/sys/riscv/riscv/trap.c Modified: head/sys/riscv/riscv/trap.c ============================================================================== --- head/sys/riscv/riscv/trap.c Wed Sep 23 18:03:07 2020 (r366085) +++ head/sys/riscv/riscv/trap.c Wed Sep 23 18:54:14 2020 (r366086) @@ -136,15 +136,15 @@ dump_regs(struct trapframe *frame) int n; int i; - n = (sizeof(frame->tf_t) / sizeof(frame->tf_t[0])); + n = nitems(frame->tf_t); for (i = 0; i < n; i++) printf("t[%d] == 0x%016lx\n", i, frame->tf_t[i]); - n = (sizeof(frame->tf_s) / sizeof(frame->tf_s[0])); + n = nitems(frame->tf_s); for (i = 0; i < n; i++) printf("s[%d] == 0x%016lx\n", i, frame->tf_s[i]); - n = (sizeof(frame->tf_a) / sizeof(frame->tf_a[0])); + n = nitems(frame->tf_a); for (i = 0; i < n; i++) printf("a[%d] == 0x%016lx\n", i, frame->tf_a[i]); From owner-svn-src-head@freebsd.org Wed Sep 23 18:56:20 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D86B942381F; Wed, 23 Sep 2020 18:56:20 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxS7l6vVfz47cg; Wed, 23 Sep 2020 18:56:19 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: by mail-ej1-f48.google.com with SMTP id q13so1048324ejo.9; Wed, 23 Sep 2020 11:56:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=50S5Joqwhe/Lg4BqCp2K9D7+IADJA1+Sdk90kXKlgMU=; b=Rw9DhexEt/g2DQwantRbWB1zk+htrgHAeZVRnQpnIJ/aLZYwFEPjuJL6szR9VLB2H6 imMauwY3kYfNmKKxhwzIbU33nDE0ai23S81hzISqO3ZueunDvBgG8zX7bpqliFVI3dO/ W2TQ6YXgh+a84X2f2Zy8ftMPMVSJMZ259V2nE+P0cHutK4ne03oBLSAmAiWotjs/yz8o 6z7MfnecPEMNkHJGyvBncdGSwVwQO11yc9pvud7LjEifTpZMQXfgvnN6enFEVupYKVmU +uslL4D+4rMbre7nrubi1NtLH/4NFxY5GRZONAvf8McDYkqqoLz/eNdz1OyQSSqKD//K adSg== X-Gm-Message-State: AOAM530CYbB2QDFnKv/r01OrDJhNkCNAAHb3q8pxaSWL16jz4SxnFNkT wf1EtyTcVqYXlwWg9QmI4S1yrhxGPmplFQ== X-Google-Smtp-Source: ABdhPJxoKzP3x0GUct6kxEFGG0sGC4Q34VH2hNgO5ymZuklyFYwTF/L9W9057ilVUq4QW2/BmDAGQQ== X-Received: by 2002:a17:906:1157:: with SMTP id i23mr1111855eja.440.1600887377452; Wed, 23 Sep 2020 11:56:17 -0700 (PDT) Received: from ?IPv6:2a02:8109:98c0:1bc0:5e5f:67ff:fef4:ffd8? ([2a02:8109:98c0:1bc0:5e5f:67ff:fef4:ffd8]) by smtp.gmail.com with ESMTPSA id bv8sm601010ejb.3.2020.09.23.11.56.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Sep 2020 11:56:16 -0700 (PDT) Subject: Re: svn commit: r365643 - head/bin/cp To: Warner Losh , "Rodney W. Grimes" Cc: Kyle Evans , Alan Somers , Mateusz Guzik , src-committers , svn-src-all , svn-src-head References: <202009231656.08NGujEs042900@gndrsh.dnsmgr.net> From: Mateusz Piotrowski <0mp@FreeBSD.org> Message-ID: <2a7aea44-7522-7238-7d73-70c1c9d549c5@FreeBSD.org> Date: Wed, 23 Sep 2020 20:56:01 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Rspamd-Queue-Id: 4BxS7l6vVfz47cg X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mpp302@gmail.com designates 209.85.218.48 as permitted sender) smtp.mailfrom=mpp302@gmail.com X-Spamd-Result: default: False [-1.65 / 15.00]; RCVD_TLS_ALL(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[FreeBSD.org]; ARC_NA(0.00)[]; NEURAL_SPAM_SHORT(0.28)[0.276]; NEURAL_HAM_LONG(-1.01)[-1.011]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; RCPT_COUNT_SEVEN(0.00)[8]; RCVD_IN_DNSWL_NONE(0.00)[209.85.218.48:from]; NEURAL_HAM_MEDIUM(-0.92)[-0.919]; FORGED_SENDER(0.30)[0mp@FreeBSD.org,mpp302@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.218.48:from]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[0mp@FreeBSD.org,mpp302@gmail.com]; MAILMAN_DEST(0.00)[svn-src-head,svn-src-all]; FREEMAIL_CC(0.00)[freebsd.org,gmail.com] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 18:56:20 -0000 On 9/23/20 7:23 PM, Warner Losh wrote: > On Wed, Sep 23, 2020, 10:56 AM Rodney W. Grimes > wrote: > >>> cp is already fixed, people are still feeling the fallout of being >>> within those revisions and needing to bootstrap their own cp. We can >>> reduce the number of components these invocations rely on trivially to >>> shell built-in mechanics, why not do so? >> I would even go further, I would like to see the dependency on >> /dev/null removed from the build, and the boot process. >> > A worthy goal, but one I'm afraid is out of our reach. A quick grep shows > just over 200 instances of /dev/null in the Makefile and mk file (800 if > you don't filter Makefile.in and Makefile.am). Maybe a third of those are > due to tests and other false positives. It would be quite the effort to > eliminate them all. And /dev/tty and /dev/zero likely will be troublesome > too, as they are used by running programs. > > and how would you throw away output you know is bad / bogus without > /dev/null? I wonder if we could do it (at least in some cases) by closing descriptors with 1<&- and/or 2<&-. > From the build because it means I would no longer have to >> mount /dev in my chroots, and from the boot because I >> hate to say it, but we often scribble in /dev before >> devfs is mounted and if you look at root file systems >> mounted on other systems you well often find a /dev/null >> FILE that got created during the boot process from a >/dev/null >> before devfs was mounted. >> > But for this issue, we're not mounting devfs early enough. We should fix > that. Removing /dev/null from the boot process likely is never going to > happen because we use it all over the place to discard output... There's > ~200 instances of it in the boot rc scripts, so getting rid of it there > would also be quite the effort, with the same question. From owner-svn-src-head@freebsd.org Wed Sep 23 19:15:23 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7491142394B; Wed, 23 Sep 2020 19:15:23 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxSYl2RdLz4Bns; Wed, 23 Sep 2020 19:15: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 375F115833; Wed, 23 Sep 2020 19:15: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 08NJFN82041989; Wed, 23 Sep 2020 19:15:23 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08NJFMAZ041986; Wed, 23 Sep 2020 19:15:22 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <202009231915.08NJFMAZ041986@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Wed, 23 Sep 2020 19:15:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366087 - in head/stand: efi/loader i386/loader i386/zfsboot X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: in head/stand: efi/loader i386/loader i386/zfsboot X-SVN-Commit-Revision: 366087 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 19:15:23 -0000 Author: tsoome Date: Wed Sep 23 19:15:22 2020 New Revision: 366087 URL: https://svnweb.freebsd.org/changeset/base/366087 Log: loader: fix non-zfs build We can not include zfs headers while building without zfs. Reported by: Oscar Holmlund Modified: head/stand/efi/loader/main.c head/stand/i386/loader/main.c head/stand/i386/zfsboot/zfsboot.c Modified: head/stand/efi/loader/main.c ============================================================================== --- head/stand/efi/loader/main.c Wed Sep 23 18:54:14 2020 (r366086) +++ head/stand/efi/loader/main.c Wed Sep 23 19:15:22 2020 (r366087) @@ -36,7 +36,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifdef EFI_ZFS_BOOT #include +#endif #include #include #include Modified: head/stand/i386/loader/main.c ============================================================================== --- head/stand/i386/loader/main.c Wed Sep 23 18:54:14 2020 (r366086) +++ head/stand/i386/loader/main.c Wed Sep 23 19:15:22 2020 (r366087) @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include "bootstrap.h" @@ -50,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include "btxv86.h" #ifdef LOADER_ZFS_SUPPORT +#include #include "libzfs.h" #endif Modified: head/stand/i386/zfsboot/zfsboot.c ============================================================================== --- head/stand/i386/zfsboot/zfsboot.c Wed Sep 23 18:54:14 2020 (r366086) +++ head/stand/i386/zfsboot/zfsboot.c Wed Sep 23 19:15:22 2020 (r366087) @@ -26,7 +26,9 @@ __FBSDID("$FreeBSD$"); #endif #include #include +#ifdef LOADER_ZFS_SUPPORT #include +#endif #include #include From owner-svn-src-head@freebsd.org Wed Sep 23 19:18:55 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4B9F5423E8B; Wed, 23 Sep 2020 19:18:55 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxSdq1cTtz4CVF; Wed, 23 Sep 2020 19:18:55 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 009B615378; Wed, 23 Sep 2020 19:18:55 +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 08NJIsWs042623; Wed, 23 Sep 2020 19:18:54 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08NJIsgj042617; Wed, 23 Sep 2020 19:18:54 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202009231918.08NJIsgj042617@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 23 Sep 2020 19:18:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366088 - in head/sys: amd64/conf conf i386/conf x86/conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys: amd64/conf conf i386/conf x86/conf X-SVN-Commit-Revision: 366088 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 19:18:55 -0000 Author: imp Date: Wed Sep 23 19:18:53 2020 New Revision: 366088 URL: https://svnweb.freebsd.org/changeset/base/366088 Log: Use envvar rather than nonstandard hint. lines The NOTES files have a bunch of hint lines that are removed when generating LINT. However, we can achieve the same effect by prepending each of the lines with 'envvar' so the NOTES files become standard config(8) files. No functional changes as the sed script to generate the LINT files filters these either way. Suggested by: kevans Modified: head/sys/amd64/conf/NOTES head/sys/conf/NOTES head/sys/i386/conf/NOTES head/sys/x86/conf/NOTES Modified: head/sys/amd64/conf/NOTES ============================================================================== --- head/sys/amd64/conf/NOTES Wed Sep 23 19:15:22 2020 (r366087) +++ head/sys/amd64/conf/NOTES Wed Sep 23 19:18:53 2020 (r366088) @@ -125,8 +125,8 @@ device nvram # Access to rtc cmos via /dev/nvram # MISCELLANEOUS DEVICES AND OPTIONS device speaker #Play IBM BASIC-style noises out your speaker -hint.speaker.0.at="isa" -hint.speaker.0.port="0x61" +envvar hint.speaker.0.at="isa" +envvar hint.speaker.0.port="0x61" ##################################################################### @@ -199,8 +199,8 @@ options X86BIOS # PS/2 mouse device psm -hint.psm.0.at="atkbdc" -hint.psm.0.irq="12" +envvar hint.psm.0.at="atkbdc" +envvar hint.psm.0.irq="12" # Options for psm: options PSM_HOOKRESUME #hook the system resume event, useful @@ -209,13 +209,13 @@ options PSM_RESETAFTERSUSPEND #reset the device at th # The keyboard controller; it controls the keyboard and the PS/2 mouse. device atkbdc -hint.atkbdc.0.at="isa" -hint.atkbdc.0.port="0x060" +envvar hint.atkbdc.0.at="isa" +envvar hint.atkbdc.0.port="0x060" # The AT keyboard device atkbd -hint.atkbd.0.at="atkbdc" -hint.atkbd.0.irq="1" +envvar hint.atkbd.0.at="atkbdc" +envvar hint.atkbd.0.irq="1" # Options for atkbd: options ATKBD_DFLT_KEYMAP # specify the built-in keymap @@ -230,7 +230,7 @@ makeoptions ATKBD_DFLT_KEYMAP=fr.dvorak # Video card driver for VGA adapters. device vga -hint.vga.0.at="isa" +envvar hint.vga.0.at="isa" # Options for vga: # Try the following option if the mouse pointer is not drawn correctly @@ -523,8 +523,8 @@ device xenpci # Xen HVM Hypervisor services driver device ipmi device pbio -hint.pbio.0.at="isa" -hint.pbio.0.port="0x360" +envvar hint.pbio.0.at="isa" +envvar hint.pbio.0.port="0x360" device smbios device vpd device asmc Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Wed Sep 23 19:15:22 2020 (r366087) +++ head/sys/conf/NOTES Wed Sep 23 19:18:53 2020 (r366088) @@ -6,8 +6,8 @@ # 'makeoptions', 'hints', etc. go into the kernel configuration that you # run config(8) with. # -# Lines that begin with 'hint.' are NOT for config(8), they go into your -# hints file. See /boot/device.hints and/or the 'hints' config(8) directive. +# Lines that begin with 'envvar hint.' should go into your hints file. +# See /boot/device.hints and/or the 'hints' config(8) directive. # # Please use ``make LINT'' to create an old-style LINT file if you want to # do kernel test-builds. @@ -1292,22 +1292,22 @@ options FFCLOCK # The syntax for wiring down devices is: -hint.scbus.0.at="ahc0" -hint.scbus.1.at="ahc1" -hint.scbus.1.bus="0" -hint.scbus.3.at="ahc2" -hint.scbus.3.bus="0" -hint.scbus.2.at="ahc2" -hint.scbus.2.bus="1" -hint.da.0.at="scbus0" -hint.da.0.target="0" -hint.da.0.unit="0" -hint.da.1.at="scbus3" -hint.da.1.target="1" -hint.da.2.at="scbus2" -hint.da.2.target="3" -hint.sa.1.at="scbus1" -hint.sa.1.target="6" +envvar hint.scbus.0.at="ahc0" +envvar hint.scbus.1.at="ahc1" +envvar hint.scbus.1.bus="0" +envvar hint.scbus.3.at="ahc2" +envvar hint.scbus.3.bus="0" +envvar hint.scbus.2.at="ahc2" +envvar hint.scbus.2.bus="1" +envvar hint.da.0.at="scbus0" +envvar hint.da.0.target="0" +envvar hint.da.0.unit="0" +envvar hint.da.1.at="scbus3" +envvar hint.da.1.target="1" +envvar hint.da.2.at="scbus2" +envvar hint.da.2.target="3" +envvar hint.sa.1.at="scbus1" +envvar hint.sa.1.target="6" # "units" (SCSI logical unit number) that are not specified are # treated as if specified as LUN 0. @@ -1536,21 +1536,21 @@ device ahd device esp device iscsi_initiator device isp -hint.isp.0.disable="1" -hint.isp.0.role="3" -hint.isp.0.prefer_iomap="1" -hint.isp.0.prefer_memmap="1" -hint.isp.0.fwload_disable="1" -hint.isp.0.ignore_nvram="1" -hint.isp.0.fullduplex="1" -hint.isp.0.topology="lport" -hint.isp.0.topology="nport" -hint.isp.0.topology="lport-only" -hint.isp.0.topology="nport-only" +envvar hint.isp.0.disable="1" +envvar hint.isp.0.role="3" +envvar hint.isp.0.prefer_iomap="1" +envvar hint.isp.0.prefer_memmap="1" +envvar hint.isp.0.fwload_disable="1" +envvar hint.isp.0.ignore_nvram="1" +envvar hint.isp.0.fullduplex="1" +envvar hint.isp.0.topology="lport" +envvar hint.isp.0.topology="nport" +envvar hint.isp.0.topology="lport-only" +envvar hint.isp.0.topology="nport-only" # we can't get u_int64_t types, nor can we get strings if it's got # a leading 0x, hence this silly dodge. -hint.isp.0.portwnn="w50000000aaaa0000" -hint.isp.0.nodewnn="w50000000aaaa0001" +envvar hint.isp.0.portwnn="w50000000aaaa0000" +envvar hint.isp.0.nodewnn="w50000000aaaa0001" device ispfw device mpr # LSI-Logic MPT-Fusion 3 device mps # LSI-Logic MPT-Fusion 2 @@ -1715,12 +1715,12 @@ device ata # # For older non-PCI, non-PnPBIOS systems, these are the hints lines to add: -hint.ata.0.at="isa" -hint.ata.0.port="0x1f0" -hint.ata.0.irq="14" -hint.ata.1.at="isa" -hint.ata.1.port="0x170" -hint.ata.1.irq="15" +envvar hint.ata.0.at="isa" +envvar hint.ata.0.port="0x1f0" +envvar hint.ata.0.irq="14" +envvar hint.ata.1.at="isa" +envvar hint.ata.1.port="0x170" +envvar hint.ata.1.irq="15" # # uart: newbusified driver for serial interfaces. It consolidates the sio(4), @@ -1736,16 +1736,16 @@ options UART_POLL_FREQ # Set polling rate, used when # The following hint should only be used for pure ISA devices. It is not # needed otherwise. Use of hints is strongly discouraged. -hint.uart.0.at="isa" +envvar hint.uart.0.at="isa" # The following 3 hints are used when the UART is a system device (i.e., a # console or debug port), but only on platforms that don't have any other # means to pass the information to the kernel. The unit number of the hint # is only used to bundle the hints together. There is no relation to the # unit number of the probed UART. -hint.uart.0.port="0x3f8" -hint.uart.0.flags="0x10" -hint.uart.0.baud="115200" +envvar hint.uart.0.port="0x3f8" +envvar hint.uart.0.flags="0x10" +envvar hint.uart.0.baud="115200" # `flags' for serial drivers that support consoles like sio(4) and uart(4): # 0x10 enable console support for this unit. Other console flags @@ -1954,7 +1954,7 @@ device cas # Sun Cassini/Cassini+ and NS DP83065 Sat device dc # DEC/Intel 21143 and various workalikes device et # Agere ET1310 10/100/Gigabit Ethernet device fxp # Intel EtherExpress PRO/100B (82557, 82558) -hint.fxp.0.prefer_iomap="0" +envvar hint.fxp.0.prefer_iomap="0" device gem # Apple GMAC/Sun ERI/Sun GEM device hme # Sun HME (Happy Meal Ethernet) device jme # JMicron JMC250 Gigabit/JMC260 Fast Ethernet @@ -2138,20 +2138,20 @@ device snd_via82c686 device snd_vibes # For non-PnP sound cards: -hint.pcm.0.at="isa" -hint.pcm.0.irq="10" -hint.pcm.0.drq="1" -hint.pcm.0.flags="0x0" -hint.sbc.0.at="isa" -hint.sbc.0.port="0x220" -hint.sbc.0.irq="5" -hint.sbc.0.drq="1" -hint.sbc.0.flags="0x15" -hint.gusc.0.at="isa" -hint.gusc.0.port="0x220" -hint.gusc.0.irq="5" -hint.gusc.0.drq="1" -hint.gusc.0.flags="0x13" +envvar hint.pcm.0.at="isa" +envvar hint.pcm.0.irq="10" +envvar hint.pcm.0.drq="1" +envvar hint.pcm.0.flags="0x0" +envvar hint.sbc.0.at="isa" +envvar hint.sbc.0.port="0x220" +envvar hint.sbc.0.irq="5" +envvar hint.sbc.0.drq="1" +envvar hint.sbc.0.flags="0x15" +envvar hint.gusc.0.at="isa" +envvar hint.gusc.0.port="0x220" +envvar hint.gusc.0.irq="5" +envvar hint.gusc.0.drq="1" +envvar hint.gusc.0.flags="0x13" # # Following options are intended for debugging/testing purposes: @@ -2333,8 +2333,8 @@ options PCFCLOCK_VERBOSE # Verbose pcfclock d options PCFCLOCK_MAX_RETRIES=5 # Maximum read tries (default 10) device ppc -hint.ppc.0.at="isa" -hint.ppc.0.irq="7" +envvar hint.ppc.0.at="isa" +envvar hint.ppc.0.irq="7" device ppbus device lpt device plip Modified: head/sys/i386/conf/NOTES ============================================================================== --- head/sys/i386/conf/NOTES Wed Sep 23 19:15:22 2020 (r366087) +++ head/sys/i386/conf/NOTES Wed Sep 23 19:18:53 2020 (r366088) @@ -273,8 +273,8 @@ device nvram # Access to rtc cmos via /dev/nvram # MISCELLANEOUS DEVICES AND OPTIONS device speaker #Play IBM BASIC-style noises out your speaker -hint.speaker.0.at="isa" -hint.speaker.0.port="0x61" +envvar hint.speaker.0.at="isa" +envvar hint.speaker.0.port="0x61" device apm_saver # Requires APM @@ -342,8 +342,8 @@ options X86BIOS # # Hints for the non-optional Numeric Processing eXtension driver. -hint.npx.0.flags="0x0" -hint.npx.0.irq="13" +envvar hint.npx.0.flags="0x0" +envvar hint.npx.0.irq="13" # # `flags' for npx0: @@ -369,8 +369,8 @@ hint.npx.0.irq="13" # PS/2 mouse device psm -hint.psm.0.at="atkbdc" -hint.psm.0.irq="12" +envvar hint.psm.0.at="atkbdc" +envvar hint.psm.0.irq="12" # Options for psm: options PSM_HOOKRESUME #hook the system resume event, useful @@ -379,13 +379,13 @@ options PSM_RESETAFTERSUSPEND #reset the device at th # The keyboard controller; it controls the keyboard and the PS/2 mouse. device atkbdc -hint.atkbdc.0.at="isa" -hint.atkbdc.0.port="0x060" +envvar hint.atkbdc.0.at="isa" +envvar hint.atkbdc.0.port="0x060" # The AT keyboard device atkbd -hint.atkbd.0.at="atkbdc" -hint.atkbd.0.irq="1" +envvar hint.atkbd.0.at="atkbdc" +envvar hint.atkbd.0.irq="1" # Options for atkbd: options ATKBD_DFLT_KEYMAP # specify the built-in keymap @@ -400,7 +400,7 @@ makeoptions ATKBD_DFLT_KEYMAP=fr.dvorak # Video card driver for VGA adapters. device vga -hint.vga.0.at="isa" +envvar hint.vga.0.at="isa" # Options for vga: # Try the following option if the mouse pointer is not drawn correctly @@ -521,34 +521,34 @@ device cpufreq device bxe # Broadcom NetXtreme II BCM5771X/BCM578XX 10GbE device ce device cp -hint.cs.0.at="isa" -hint.cs.0.port="0x300" +envvar hint.cs.0.at="isa" +envvar hint.cs.0.port="0x300" #options NETGRAPH_CRONYX # Enable NETGRAPH support for Cronyx adapter(s) options ED_3C503 options ED_HPP options ED_SIC -hint.ed.0.at="isa" -hint.ed.0.port="0x280" -hint.ed.0.irq="5" -hint.ed.0.maddr="0xd8000" +envvar hint.ed.0.at="isa" +envvar hint.ed.0.port="0x280" +envvar hint.ed.0.irq="5" +envvar hint.ed.0.maddr="0xd8000" device ipw # Intel 2100 wireless NICs. device iwi # Intel 2200BG/2225BG/2915ABG wireless NICs. device iwn # Intel 4965/1000/5000/6000 wireless NICs. # Hint for the i386-only ISA front-end of le(4). -hint.le.0.at="isa" -hint.le.0.port="0x280" -hint.le.0.irq="10" -hint.le.0.drq="0" +envvar hint.le.0.at="isa" +envvar hint.le.0.port="0x280" +envvar hint.le.0.irq="10" +envvar hint.le.0.drq="0" device mthca # Mellanox HCA InfiniBand device mlx4 # Shared code module between IB and Ethernet device mlx4ib # Mellanox ConnectX HCA InfiniBand device mlx4en # Mellanox ConnectX HCA Ethernet device nfe # nVidia nForce MCP on-board Ethernet device sbni -hint.sbni.0.at="isa" -hint.sbni.0.port="0x210" -hint.sbni.0.irq="0xefdead" -hint.sbni.0.flags="0" +envvar hint.sbni.0.at="isa" +envvar hint.sbni.0.port="0x210" +envvar hint.sbni.0.irq="0xefdead" +envvar hint.sbni.0.flags="0" device vmx # VMware VMXNET3 Ethernet device wpi # Intel 3945ABG wireless NICs. @@ -762,14 +762,14 @@ device hyperv # HyperV drivers # of the Vaio extra features are controlled by this device. device apm -hint.apm.0.flags="0x20" +envvar hint.apm.0.flags="0x20" device ipmi device smapi device smbios device vpd device pbio -hint.pbio.0.at="isa" -hint.pbio.0.port="0x360" +envvar hint.pbio.0.at="isa" +envvar hint.pbio.0.port="0x360" device asmc device tpm device padlock_rng # VIA Padlock RNG @@ -797,9 +797,9 @@ options POWERFAIL_NMI # make it beep instead of panic # pcf Philips PCF8584 ISA-bus controller # device pcf -hint.pcf.0.at="isa" -hint.pcf.0.port="0x320" -hint.pcf.0.irq="5" +envvar hint.pcf.0.at="isa" +envvar hint.pcf.0.port="0x320" +envvar hint.pcf.0.irq="5" # # Hardware watchdog timers: Modified: head/sys/x86/conf/NOTES ============================================================================== --- head/sys/x86/conf/NOTES Wed Sep 23 19:15:22 2020 (r366087) +++ head/sys/x86/conf/NOTES Wed Sep 23 19:18:53 2020 (r366088) @@ -18,7 +18,7 @@ options COMPAT_43 # The syscons console driver (SCO color console compatible). device sc -hint.sc.0.at="isa" +envvar hint.sc.0.at="isa" options MAXCONS=16 # number of virtual consoles options SC_ALT_MOUSE_IMAGE # simplified mouse cursor in text mode options SC_DFLT_FONT # compile font in @@ -83,10 +83,10 @@ device warp_saver # the Y-E DATA External FDD (PC Card) # device fdc -hint.fdc.0.at="isa" -hint.fdc.0.port="0x3F0" -hint.fdc.0.irq="6" -hint.fdc.0.drq="2" +envvar hint.fdc.0.at="isa" +envvar hint.fdc.0.port="0x3F0" +envvar hint.fdc.0.irq="6" +envvar hint.fdc.0.drq="2" # # FDC_DEBUG enables floppy debugging. Since the debug output is huge, you # gotta turn it actually on by setting the variable fd_debug with DDB, @@ -99,7 +99,7 @@ options FDC_DEBUG #hint.fdc.0.flags="1" # Specify floppy devices -hint.fd.0.at="fdc0" -hint.fd.0.drive="0" -hint.fd.1.at="fdc0" -hint.fd.1.drive="1" +envvar hint.fd.0.at="fdc0" +envvar hint.fd.0.drive="0" +envvar hint.fd.1.at="fdc0" +envvar hint.fd.1.drive="1" From owner-svn-src-head@freebsd.org Wed Sep 23 19:33:48 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3CF9D424463; Wed, 23 Sep 2020 19:33:48 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxSz00r8sz4FJN; Wed, 23 Sep 2020 19:33:48 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 004C4156D1; Wed, 23 Sep 2020 19:33:48 +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 08NJXlsH055215; Wed, 23 Sep 2020 19:33:47 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08NJXlEg055213; Wed, 23 Sep 2020 19:33:47 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202009231933.08NJXlEg055213@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 23 Sep 2020 19:33:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366089 - in head/sys/arm64: arm64 include X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/sys/arm64: arm64 include X-SVN-Commit-Revision: 366089 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 19:33:48 -0000 Author: markj Date: Wed Sep 23 19:33:47 2020 New Revision: 366089 URL: https://svnweb.freebsd.org/changeset/base/366089 Log: Add largepage support to the arm64 pmap. Reviewed by: alc, kib Sponsored by: Juniper Networks, Inc., Klara, Inc. Differential Revision: https://reviews.freebsd.org/D26466 Modified: head/sys/arm64/arm64/pmap.c head/sys/arm64/include/param.h Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Wed Sep 23 19:18:53 2020 (r366088) +++ head/sys/arm64/arm64/pmap.c Wed Sep 23 19:33:47 2020 (r366089) @@ -177,6 +177,8 @@ __FBSDID("$FreeBSD$"); #define PV_STAT(x) do { } while (0) #endif +#define pmap_l0_pindex(v) (NUL2E + NUL1E + ((v) >> L0_SHIFT)) +#define pmap_l1_pindex(v) (NUL2E + ((v) >> L1_SHIFT)) #define pmap_l2_pindex(v) ((v) >> L2_SHIFT) static struct md_page * @@ -1087,6 +1089,9 @@ pmap_init(void) KASSERT(MAXPAGESIZES > 1 && pagesizes[1] == 0, ("pmap_init: can't assign to pagesizes[1]")); pagesizes[1] = L2_SIZE; + KASSERT(MAXPAGESIZES > 2 && pagesizes[2] == 0, + ("pmap_init: can't assign to pagesizes[2]")); + pagesizes[2] = L1_SIZE; } /* @@ -1337,7 +1342,7 @@ pmap_extract_and_hold(pmap_t pmap, vm_offset_t va, vm_ use = true; if (use) { - switch(lvl) { + switch (lvl) { case 1: off = va & L1_OFFSET; break; @@ -1349,7 +1354,7 @@ pmap_extract_and_hold(pmap_t pmap, vm_offset_t va, vm_ off = 0; } m = PHYS_TO_VM_PAGE((tpte & ~ATTR_MASK) | off); - if (!vm_page_wire_mapped(m)) + if (m != NULL && !vm_page_wire_mapped(m)) m = NULL; } } @@ -2968,12 +2973,24 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t continue; } + va_next = (sva + L1_SIZE) & ~L1_OFFSET; + if (va_next < sva) + va_next = eva; l1 = pmap_l0_to_l1(l0, sva); - if (pmap_load(l1) == 0) { - va_next = (sva + L1_SIZE) & ~L1_OFFSET; - if (va_next < sva) - va_next = eva; + if (pmap_load(l1) == 0) continue; + if ((pmap_load(l1) & ATTR_DESCR_MASK) == L1_BLOCK) { + KASSERT(va_next <= eva, + ("partial update of non-transparent 1G page " + "l1 %#lx sva %#lx eva %#lx va_next %#lx", + pmap_load(l1), sva, eva, va_next)); + MPASS(pmap != kernel_pmap); + MPASS((pmap_load(l1) & ATTR_SW_MANAGED) == 0); + pmap_clear(l1); + pmap_invalidate_page(pmap, sva); + pmap_resident_count_dec(pmap, L1_SIZE / PAGE_SIZE); + pmap_unuse_pt(pmap, sva, pmap_load(l0), &free); + continue; } /* @@ -3217,12 +3234,23 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t continue; } + va_next = (sva + L1_SIZE) & ~L1_OFFSET; + if (va_next < sva) + va_next = eva; l1 = pmap_l0_to_l1(l0, sva); - if (pmap_load(l1) == 0) { - va_next = (sva + L1_SIZE) & ~L1_OFFSET; - if (va_next < sva) - va_next = eva; + if (pmap_load(l1) == 0) continue; + if ((pmap_load(l1) & ATTR_DESCR_MASK) == L1_BLOCK) { + KASSERT(va_next <= eva, + ("partial update of non-transparent 1G page " + "l1 %#lx sva %#lx eva %#lx va_next %#lx", + pmap_load(l1), sva, eva, va_next)); + MPASS((pmap_load(l1) & ATTR_SW_MANAGED) == 0); + if ((pmap_load(l1) & mask) != nbits) { + pmap_store(l1, (pmap_load(l1) & ~mask) | nbits); + pmap_invalidate_page(pmap, sva); + } + continue; } va_next = (sva + L2_SIZE) & ~L2_OFFSET; @@ -3485,6 +3513,96 @@ setl3: } #endif /* VM_NRESERVLEVEL > 0 */ +static int +pmap_enter_largepage(pmap_t pmap, vm_offset_t va, pt_entry_t newpte, int flags, + int psind) +{ + pd_entry_t *l0p, *l1p, *l2p, origpte; + vm_page_t mp; + + PMAP_LOCK_ASSERT(pmap, MA_OWNED); + KASSERT(psind > 0 && psind < MAXPAGESIZES, + ("psind %d unexpected", psind)); + KASSERT(((newpte & ~ATTR_MASK) & (pagesizes[psind] - 1)) == 0, + ("unaligned phys address %#lx newpte %#lx psind %d", + (newpte & ~ATTR_MASK), newpte, psind)); + +restart: + if (psind == 2) { + l0p = pmap_l0(pmap, va); + if ((pmap_load(l0p) & ATTR_DESCR_VALID) == 0) { + mp = _pmap_alloc_l3(pmap, pmap_l0_pindex(va), NULL); + if (mp == NULL) { + if ((flags & PMAP_ENTER_NOSLEEP) != 0) + return (KERN_RESOURCE_SHORTAGE); + PMAP_UNLOCK(pmap); + vm_wait(NULL); + PMAP_LOCK(pmap); + goto restart; + } + l1p = pmap_l0_to_l1(l0p, va); + KASSERT(l1p != NULL, ("va %#lx lost l1 entry", va)); + origpte = pmap_load(l1p); + } else { + l1p = pmap_l0_to_l1(l0p, va); + KASSERT(l1p != NULL, ("va %#lx lost l1 entry", va)); + origpte = pmap_load(l1p); + if ((origpte & ATTR_DESCR_VALID) == 0) { + mp = PHYS_TO_VM_PAGE(pmap_load(l0p) & + ~ATTR_MASK); + mp->ref_count++; + } + } + KASSERT((origpte & ATTR_DESCR_VALID) == 0 || + ((origpte & ATTR_DESCR_MASK) == L1_BLOCK && + (origpte & ~ATTR_MASK) == (newpte & ~ATTR_MASK)), + ("va %#lx changing 1G phys page l1 %#lx newpte %#lx", + va, origpte, newpte)); + pmap_store(l1p, newpte); + } else /* (psind == 1) */ { + l2p = pmap_l2(pmap, va); + if (l2p == NULL) { + mp = _pmap_alloc_l3(pmap, pmap_l1_pindex(va), NULL); + if (mp == NULL) { + if ((flags & PMAP_ENTER_NOSLEEP) != 0) + return (KERN_RESOURCE_SHORTAGE); + PMAP_UNLOCK(pmap); + vm_wait(NULL); + PMAP_LOCK(pmap); + goto restart; + } + l2p = (pd_entry_t *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(mp)); + l2p = &l2p[pmap_l2_index(va)]; + origpte = pmap_load(l2p); + } else { + l1p = pmap_l1(pmap, va); + origpte = pmap_load(l2p); + if ((origpte & ATTR_DESCR_VALID) == 0) { + mp = PHYS_TO_VM_PAGE(pmap_load(l1p) & + ~ATTR_MASK); + mp->ref_count++; + } + } + KASSERT((origpte & ATTR_DESCR_VALID) == 0 || + ((origpte & ATTR_DESCR_MASK) == L2_BLOCK && + (origpte & ~ATTR_MASK) == (newpte & ~ATTR_MASK)), + ("va %#lx changing 2M phys page l2 %#lx newpte %#lx", + va, origpte, newpte)); + pmap_store(l2p, newpte); + } + dsb(ishst); + + if ((origpte & ATTR_DESCR_VALID) == 0) + pmap_resident_count_inc(pmap, pagesizes[psind] / PAGE_SIZE); + if ((newpte & ATTR_SW_WIRED) != 0 && (origpte & ATTR_SW_WIRED) == 0) + pmap->pm_stats.wired_count += pagesizes[psind] / PAGE_SIZE; + else if ((newpte & ATTR_SW_WIRED) == 0 && + (origpte & ATTR_SW_WIRED) != 0) + pmap->pm_stats.wired_count -= pagesizes[psind] / PAGE_SIZE; + + return (KERN_SUCCESS); +} + /* * Insert the given physical page (p) at * the specified virtual address (v) in the @@ -3560,6 +3678,17 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, v lock = NULL; PMAP_LOCK(pmap); + if ((flags & PMAP_ENTER_LARGEPAGE) != 0) { + KASSERT((m->oflags & VPO_UNMANAGED) != 0, + ("managed largepage va %#lx flags %#x", va, flags)); + new_l3 &= ~L3_PAGE; + if (psind == 2) + new_l3 |= L1_BLOCK; + else /* (psind == 1) */ + new_l3 |= L2_BLOCK; + rv = pmap_enter_largepage(pmap, va, new_l3, flags, psind); + goto out; + } if (psind == 1) { /* Assert the required virtual and physical alignment. */ KASSERT((va & L2_OFFSET) == 0, ("pmap_enter: va unaligned")); @@ -4209,11 +4338,23 @@ pmap_unwire(pmap_t pmap, vm_offset_t sva, vm_offset_t } l1 = pmap_l0_to_l1(l0, sva); - if (pmap_load(l1) == 0) { - va_next = (sva + L1_SIZE) & ~L1_OFFSET; - if (va_next < sva) - va_next = eva; + va_next = (sva + L1_SIZE) & ~L1_OFFSET; + if (va_next < sva) + va_next = eva; + if (pmap_load(l1) == 0) continue; + + if ((pmap_load(l1) & ATTR_DESCR_MASK) == L1_BLOCK) { + KASSERT(va_next <= eva, + ("partial update of non-transparent 1G page " + "l1 %#lx sva %#lx eva %#lx va_next %#lx", + pmap_load(l1), sva, eva, va_next)); + MPASS(pmap != kernel_pmap); + MPASS((pmap_load(l1) & (ATTR_SW_MANAGED | + ATTR_SW_WIRED)) == ATTR_SW_WIRED); + pmap_clear_bits(l1, ATTR_SW_WIRED); + pmap->pm_stats.wired_count -= L1_SIZE / PAGE_SIZE; + continue; } va_next = (sva + L2_SIZE) & ~L2_OFFSET; @@ -4284,7 +4425,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_ pd_entry_t *l0, *l1, *l2, srcptepaddr; pt_entry_t *dst_pte, mask, nbits, ptetemp, *src_pte; vm_offset_t addr, end_addr, va_next; - vm_page_t dst_l2pg, dstmpte, srcmpte; + vm_page_t dst_m, dstmpte, srcmpte; PMAP_ASSERT_STAGE1(dst_pmap); PMAP_ASSERT_STAGE1(src_pmap); @@ -4308,13 +4449,40 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_ va_next = end_addr; continue; } + + va_next = (addr + L1_SIZE) & ~L1_OFFSET; + if (va_next < addr) + va_next = end_addr; l1 = pmap_l0_to_l1(l0, addr); - if (pmap_load(l1) == 0) { - va_next = (addr + L1_SIZE) & ~L1_OFFSET; - if (va_next < addr) - va_next = end_addr; + if (pmap_load(l1) == 0) continue; + if ((pmap_load(l1) & ATTR_DESCR_MASK) == L1_BLOCK) { + KASSERT(va_next <= end_addr, + ("partial update of non-transparent 1G page " + "l1 %#lx addr %#lx end_addr %#lx va_next %#lx", + pmap_load(l1), addr, end_addr, va_next)); + srcptepaddr = pmap_load(l1); + l1 = pmap_l1(dst_pmap, addr); + if (l1 == NULL) { + if (_pmap_alloc_l3(dst_pmap, + pmap_l0_pindex(addr), NULL) == NULL) + break; + l1 = pmap_l1(dst_pmap, addr); + } else { + l0 = pmap_l0(dst_pmap, addr); + dst_m = PHYS_TO_VM_PAGE(pmap_load(l0) & + ~ATTR_MASK); + dst_m->ref_count++; + } + KASSERT(pmap_load(l1) == 0, + ("1G mapping present in dst pmap " + "l1 %#lx addr %#lx end_addr %#lx va_next %#lx", + pmap_load(l1), addr, end_addr, va_next)); + pmap_store(l1, srcptepaddr & ~ATTR_SW_WIRED); + pmap_resident_count_inc(dst_pmap, L1_SIZE / PAGE_SIZE); + continue; } + va_next = (addr + L2_SIZE) & ~L2_OFFSET; if (va_next < addr) va_next = end_addr; @@ -4326,7 +4494,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_ if ((addr & L2_OFFSET) != 0 || addr + L2_SIZE > end_addr) continue; - l2 = pmap_alloc_l2(dst_pmap, addr, &dst_l2pg, NULL); + l2 = pmap_alloc_l2(dst_pmap, addr, &dst_m, NULL); if (l2 == NULL) break; if (pmap_load(l2) == 0 && @@ -4342,7 +4510,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_ PAGE_SIZE); atomic_add_long(&pmap_l2_mappings, 1); } else - pmap_abort_ptp(dst_pmap, addr, dst_l2pg); + pmap_abort_ptp(dst_pmap, addr, dst_m); continue; } KASSERT((srcptepaddr & ATTR_DESCR_MASK) == L2_TABLE, @@ -5247,13 +5415,21 @@ pmap_advise(pmap_t pmap, vm_offset_t sva, vm_offset_t va_next = eva; continue; } + + va_next = (sva + L1_SIZE) & ~L1_OFFSET; + if (va_next < sva) + va_next = eva; l1 = pmap_l0_to_l1(l0, sva); - if (pmap_load(l1) == 0) { - va_next = (sva + L1_SIZE) & ~L1_OFFSET; - if (va_next < sva) - va_next = eva; + if (pmap_load(l1) == 0) continue; + if ((pmap_load(l1) & ATTR_DESCR_MASK) == L1_BLOCK) { + KASSERT(va_next <= eva, + ("partial update of non-transparent 1G page " + "l1 %#lx sva %#lx eva %#lx va_next %#lx", + pmap_load(l1), sva, eva, va_next)); + continue; } + va_next = (sva + L2_SIZE) & ~L2_OFFSET; if (va_next < sva) va_next = eva; Modified: head/sys/arm64/include/param.h ============================================================================== --- head/sys/arm64/include/param.h Wed Sep 23 19:18:53 2020 (r366088) +++ head/sys/arm64/include/param.h Wed Sep 23 19:33:47 2020 (r366089) @@ -95,7 +95,7 @@ #define PAGE_SIZE_64K (1 << PAGE_SHIFT_64K) #define PAGE_MASK_64K (PAGE_SIZE_64K - 1) -#define MAXPAGESIZES 2 /* maximum number of supported page sizes */ +#define MAXPAGESIZES 3 /* maximum number of supported page sizes */ #ifndef KSTACK_PAGES #define KSTACK_PAGES 4 /* pages of kernel stack (with pcb) */ From owner-svn-src-head@freebsd.org Wed Sep 23 19:34:24 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0273042489E; Wed, 23 Sep 2020 19:34:24 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxSzg6C51z4F3M; Wed, 23 Sep 2020 19:34:23 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9EB3615D00; Wed, 23 Sep 2020 19:34:23 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08NJYNl6055293; Wed, 23 Sep 2020 19:34:23 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08NJYLTT055281; Wed, 23 Sep 2020 19:34:21 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202009231934.08NJYLTT055281@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 23 Sep 2020 19:34:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366090 - in head/sys: amd64/include arm/include arm64/include i386/include kern mips/include powerpc/include riscv/include vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/sys: amd64/include arm/include arm64/include i386/include kern mips/include powerpc/include riscv/include vm X-SVN-Commit-Revision: 366090 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 19:34:24 -0000 Author: markj Date: Wed Sep 23 19:34:21 2020 New Revision: 366090 URL: https://svnweb.freebsd.org/changeset/base/366090 Log: Add a vmparam.h constant indicating pmap support for large pages. Enable SHM_LARGEPAGE support on arm64. Reviewed by: alc, kib Sponsored by: Juniper Networks, Inc., Klara, Inc. Differential Revision: https://reviews.freebsd.org/D26467 Modified: head/sys/amd64/include/vmparam.h head/sys/arm/include/vmparam.h head/sys/arm64/include/vmparam.h head/sys/i386/include/vmparam.h head/sys/kern/uipc_shm.c head/sys/mips/include/vmparam.h head/sys/powerpc/include/vmparam.h head/sys/riscv/include/vmparam.h head/sys/vm/vm_fault.c Modified: head/sys/amd64/include/vmparam.h ============================================================================== --- head/sys/amd64/include/vmparam.h Wed Sep 23 19:33:47 2020 (r366089) +++ head/sys/amd64/include/vmparam.h Wed Sep 23 19:34:21 2020 (r366090) @@ -254,6 +254,11 @@ #define VM_BATCHQUEUE_SIZE 31 /* + * The pmap can create non-transparent large page mappings. + */ +#define PMAP_HAS_LARGEPAGES 1 + +/* * Need a page dump array for minidump. */ #define MINIDUMP_PAGE_TRACKING 1 Modified: head/sys/arm/include/vmparam.h ============================================================================== --- head/sys/arm/include/vmparam.h Wed Sep 23 19:33:47 2020 (r366089) +++ head/sys/arm/include/vmparam.h Wed Sep 23 19:34:21 2020 (r366090) @@ -194,6 +194,11 @@ extern vm_offset_t vm_max_kernel_address; #define DEVMAP_MAX_VADDR ARM_VECTORS_HIGH /* + * No non-transparent large page support in the pmap. + */ +#define PMAP_HAS_LARGEPAGES 0 + +/* * Need a page dump array for minidump. */ #define MINIDUMP_PAGE_TRACKING 1 Modified: head/sys/arm64/include/vmparam.h ============================================================================== --- head/sys/arm64/include/vmparam.h Wed Sep 23 19:33:47 2020 (r366089) +++ head/sys/arm64/include/vmparam.h Wed Sep 23 19:34:21 2020 (r366090) @@ -244,6 +244,11 @@ extern vm_offset_t init_pt_va; #define DEVMAP_MAX_VADDR VM_MAX_KERNEL_ADDRESS /* + * The pmap can create non-transparent large page mappings. + */ +#define PMAP_HAS_LARGEPAGES 1 + +/* * Need a page dump array for minidump. */ #define MINIDUMP_PAGE_TRACKING 1 Modified: head/sys/i386/include/vmparam.h ============================================================================== --- head/sys/i386/include/vmparam.h Wed Sep 23 19:33:47 2020 (r366089) +++ head/sys/i386/include/vmparam.h Wed Sep 23 19:34:21 2020 (r366090) @@ -241,6 +241,11 @@ #define DMAP_TO_PHYS(x) ({ panic("No direct map exists"); 0; }) /* + * No non-transparent large page support in the pmap. + */ +#define PMAP_HAS_LARGEPAGES 0 + +/* * Need a page dump array for minidump. */ #define MINIDUMP_PAGE_TRACKING 1 Modified: head/sys/kern/uipc_shm.c ============================================================================== --- head/sys/kern/uipc_shm.c Wed Sep 23 19:33:47 2020 (r366089) +++ head/sys/kern/uipc_shm.c Wed Sep 23 19:34:21 2020 (r366090) @@ -1067,10 +1067,8 @@ kern_shm_open2(struct thread *td, const char *userpath return (EINVAL); largepage = (shmflags & SHM_LARGEPAGE) != 0; -#if !defined(__amd64__) - if (largepage) + if (largepage && !PMAP_HAS_LARGEPAGES) return (ENOTTY); -#endif /* * Currently only F_SEAL_SEAL may be set when creating or opening shmfd. Modified: head/sys/mips/include/vmparam.h ============================================================================== --- head/sys/mips/include/vmparam.h Wed Sep 23 19:33:47 2020 (r366089) +++ head/sys/mips/include/vmparam.h Wed Sep 23 19:34:21 2020 (r366090) @@ -198,6 +198,11 @@ #define DMAP_TO_PHYS(x) MIPS_DIRECT_TO_PHYS(x) /* + * No non-transparent large page support in the pmap. + */ +#define PMAP_HAS_LARGEPAGES 0 + +/* * Need a page dump array for minidump. */ #define MINIDUMP_PAGE_TRACKING 1 Modified: head/sys/powerpc/include/vmparam.h ============================================================================== --- head/sys/powerpc/include/vmparam.h Wed Sep 23 19:33:47 2020 (r366089) +++ head/sys/powerpc/include/vmparam.h Wed Sep 23 19:34:21 2020 (r366090) @@ -327,4 +327,9 @@ struct pmap_physseg { KASSERT(hw_direct_map, ("Direct map not provided by PMAP")); \ (x) &~ DMAP_BASE_ADDRESS; }) +/* + * No non-transparent large page support in the pmap. + */ +#define PMAP_HAS_LARGEPAGES 0 + #endif /* _MACHINE_VMPARAM_H_ */ Modified: head/sys/riscv/include/vmparam.h ============================================================================== --- head/sys/riscv/include/vmparam.h Wed Sep 23 19:33:47 2020 (r366089) +++ head/sys/riscv/include/vmparam.h Wed Sep 23 19:34:21 2020 (r366090) @@ -237,6 +237,11 @@ extern vm_offset_t init_pt_va; #define DEVMAP_MAX_VADDR VM_MAX_KERNEL_ADDRESS /* + * No non-transparent large page support in the pmap. + */ +#define PMAP_HAS_LARGEPAGES 0 + +/* * Need a page dump array for minidump. */ #define MINIDUMP_PAGE_TRACKING 1 Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Wed Sep 23 19:33:47 2020 (r366089) +++ head/sys/vm/vm_fault.c Wed Sep 23 19:34:21 2020 (r366090) @@ -487,6 +487,8 @@ vm_fault_populate(struct faultstate *fs) * populate only busies the first page in superpage run. */ if (bdry_idx != 0) { + KASSERT(PMAP_HAS_LARGEPAGES, + ("missing pmap support for large pages")); m = vm_page_lookup(fs->first_object, pager_first); vm_fault_populate_check_page(m); VM_OBJECT_WUNLOCK(fs->first_object); From owner-svn-src-head@freebsd.org Wed Sep 23 19:36:08 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 59877424C0A; Wed, 23 Sep 2020 19:36:08 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxT1h1ms4z4FhX; Wed, 23 Sep 2020 19:36:08 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 206E5158F5; Wed, 23 Sep 2020 19:36:08 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08NJa8iD055506; Wed, 23 Sep 2020 19:36:08 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08NJa7Zx055505; Wed, 23 Sep 2020 19:36:07 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202009231936.08NJa7Zx055505@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 23 Sep 2020 19:36:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366091 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 366091 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 19:36:08 -0000 Author: markj Date: Wed Sep 23 19:36:07 2020 New Revision: 366091 URL: https://svnweb.freebsd.org/changeset/base/366091 Log: Flag vm_reserv and vm_phys sysctls as MPSAFE. Nothing in these subsystems relies on Giant. MFC after: 1 week Modified: head/sys/vm/vm_phys.c head/sys/vm/vm_reserv.c Modified: head/sys/vm/vm_phys.c ============================================================================== --- head/sys/vm/vm_phys.c Wed Sep 23 19:34:21 2020 (r366090) +++ head/sys/vm/vm_phys.c Wed Sep 23 19:36:07 2020 (r366091) @@ -151,20 +151,20 @@ CTASSERT(VM_LOWMEM_BOUNDARY < VM_DMA32_BOUNDARY); static int sysctl_vm_phys_free(SYSCTL_HANDLER_ARGS); SYSCTL_OID(_vm, OID_AUTO, phys_free, - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, NULL, 0, + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, 0, sysctl_vm_phys_free, "A", "Phys Free Info"); static int sysctl_vm_phys_segs(SYSCTL_HANDLER_ARGS); SYSCTL_OID(_vm, OID_AUTO, phys_segs, - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, NULL, 0, + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, 0, sysctl_vm_phys_segs, "A", "Phys Seg Info"); #ifdef NUMA static int sysctl_vm_phys_locality(SYSCTL_HANDLER_ARGS); SYSCTL_OID(_vm, OID_AUTO, phys_locality, - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, NULL, 0, + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, 0, sysctl_vm_phys_locality, "A", "Phys Locality Info"); #endif Modified: head/sys/vm/vm_reserv.c ============================================================================== --- head/sys/vm/vm_reserv.c Wed Sep 23 19:34:21 2020 (r366090) +++ head/sys/vm/vm_reserv.c Wed Sep 23 19:36:07 2020 (r366091) @@ -280,7 +280,7 @@ SYSCTL_PROC(_vm_reserv, OID_AUTO, fullpop, CTLTYPE_INT static int sysctl_vm_reserv_partpopq(SYSCTL_HANDLER_ARGS); SYSCTL_OID(_vm_reserv, OID_AUTO, partpopq, - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, NULL, 0, + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, 0, sysctl_vm_reserv_partpopq, "A", "Partially populated reservation queues"); From owner-svn-src-head@freebsd.org Wed Sep 23 19:55:01 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 41212425223; Wed, 23 Sep 2020 19:55:01 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxTRT0zB4z4HGQ; Wed, 23 Sep 2020 19:55:01 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 054A6159FA; Wed, 23 Sep 2020 19:55:01 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08NJt0uc068022; Wed, 23 Sep 2020 19:55:00 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08NJt0Zl068018; Wed, 23 Sep 2020 19:55:00 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202009231955.08NJt0Zl068018@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 23 Sep 2020 19:55:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366093 - in head: . tests/sys/kern tests/sys/posixshm X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head: . tests/sys/kern tests/sys/posixshm X-SVN-Commit-Revision: 366093 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 19:55:01 -0000 Author: kevans Date: Wed Sep 23 19:54:59 2020 New Revision: 366093 URL: https://svnweb.freebsd.org/changeset/base/366093 Log: tests: move the memfd tests over to sys/posixshm memfd_create is implemented on top of posixshm, so this is a logically correct place for them to be. Moreover, this reduces the number of places to look to run tests when working in this part of the tree. Discussed with: kib (to some extent, a while ago) Added: head/tests/sys/posixshm/memfd_test.c - copied unchanged from r366092, head/tests/sys/kern/memfd_test.c Deleted: head/tests/sys/kern/memfd_test.c Modified: head/ObsoleteFiles.inc head/tests/sys/kern/Makefile head/tests/sys/posixshm/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Wed Sep 23 19:40:03 2020 (r366092) +++ head/ObsoleteFiles.inc Wed Sep 23 19:54:59 2020 (r366093) @@ -36,6 +36,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20200923: memfd_test moved to /usr/tests/sys/posixshm +OLD_FILES+=usr/tests/sys/kern/memfd_test + # 20200910: remove vm_map_create(9) to sync with the code OLD_FILES+=usr/share/man/man9/vm_map_create.9.gz Modified: head/tests/sys/kern/Makefile ============================================================================== --- head/tests/sys/kern/Makefile Wed Sep 23 19:40:03 2020 (r366092) +++ head/tests/sys/kern/Makefile Wed Sep 23 19:54:59 2020 (r366093) @@ -11,7 +11,6 @@ TESTSDIR= ${TESTSBASE}/sys/kern ATF_TESTS_C+= kern_copyin ATF_TESTS_C+= kern_descrip_test ATF_TESTS_C+= kill_zombie -ATF_TESTS_C+= memfd_test ATF_TESTS_C+= ptrace_test TEST_METADATA.ptrace_test+= timeout="15" ATF_TESTS_C+= reaper Modified: head/tests/sys/posixshm/Makefile ============================================================================== --- head/tests/sys/posixshm/Makefile Wed Sep 23 19:40:03 2020 (r366092) +++ head/tests/sys/posixshm/Makefile Wed Sep 23 19:54:59 2020 (r366093) @@ -4,6 +4,7 @@ PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/posixshm +ATF_TESTS_C+= memfd_test ATF_TESTS_C+= posixshm_test .include Copied: head/tests/sys/posixshm/memfd_test.c (from r366092, head/tests/sys/kern/memfd_test.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/posixshm/memfd_test.c Wed Sep 23 19:54:59 2020 (r366093, copy of r366092, head/tests/sys/kern/memfd_test.c) @@ -0,0 +1,295 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Kyle Evans + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include +#include +#include + +ATF_TC_WITHOUT_HEAD(basic); +ATF_TC_BODY(basic, tc) +{ + struct stat sb; + int fd; + char buf[8]; + + ATF_REQUIRE((fd = memfd_create("...", 0)) != -1); + + /* write(2) should grow us out automatically. */ + ATF_REQUIRE(write(fd, buf, sizeof(buf)) == sizeof(buf)); + ATF_REQUIRE(fstat(fd, &sb) == 0); + ATF_REQUIRE(sb.st_size == sizeof(buf)); + + /* ftruncate(2) must succeed without seals */ + ATF_REQUIRE(ftruncate(fd, 2 * (sizeof(buf) - 1)) == 0); + + /* write(2) again must not be limited by ftruncate(2) size. */ + ATF_REQUIRE(write(fd, buf, sizeof(buf)) == sizeof(buf)); + + /* Sanity check. */ + ATF_REQUIRE(fstat(fd, &sb) == 0); + ATF_REQUIRE(sb.st_size == 2 * sizeof(buf)); + + close(fd); +} + +ATF_TC_WITHOUT_HEAD(cloexec); +ATF_TC_BODY(cloexec, tc) +{ + int fd_nocl, fd_cl; + + ATF_REQUIRE((fd_nocl = memfd_create("...", 0)) != -1); + ATF_REQUIRE((fd_cl = memfd_create("...", MFD_CLOEXEC)) != -1); + + ATF_REQUIRE((fcntl(fd_nocl, F_GETFD) & FD_CLOEXEC) == 0); + ATF_REQUIRE((fcntl(fd_cl, F_GETFD) & FD_CLOEXEC) != 0); + + close(fd_nocl); + close(fd_cl); +} + +ATF_TC_WITHOUT_HEAD(disallowed_sealing); +ATF_TC_BODY(disallowed_sealing, tc) +{ + int fd; + + ATF_REQUIRE((fd = memfd_create("...", 0)) != -1); + ATF_REQUIRE(fcntl(fd, F_GET_SEALS) == F_SEAL_SEAL); + ATF_REQUIRE(fcntl(fd, F_ADD_SEALS, F_SEAL_WRITE) == -1); + ATF_REQUIRE(errno == EPERM); + + close(fd); +} + +#define BUF_SIZE 1024 + +ATF_TC_WITHOUT_HEAD(write_seal); +ATF_TC_BODY(write_seal, tc) +{ + int fd; + char *addr, buf[BUF_SIZE]; + + ATF_REQUIRE((fd = memfd_create("...", MFD_ALLOW_SEALING)) != -1); + ATF_REQUIRE(ftruncate(fd, BUF_SIZE) == 0); + + /* Write once, then we'll seal it and try again */ + ATF_REQUIRE(write(fd, buf, BUF_SIZE) == BUF_SIZE); + ATF_REQUIRE(lseek(fd, 0, SEEK_SET) == 0); + + addr = mmap(0, BUF_SIZE, (PROT_READ | PROT_WRITE), MAP_PRIVATE, fd, 0); + ATF_REQUIRE(addr != MAP_FAILED); + ATF_REQUIRE(munmap(addr, BUF_SIZE) == 0); + + ATF_REQUIRE(fcntl(fd, F_ADD_SEALS, F_SEAL_WRITE) == 0); + + ATF_REQUIRE(write(fd, buf, BUF_SIZE) == -1); + ATF_REQUIRE(errno == EPERM); + + ATF_REQUIRE(mmap(0, BUF_SIZE, (PROT_READ | PROT_WRITE), MAP_SHARED, + fd, 0) == MAP_FAILED); + ATF_REQUIRE(errno == EACCES); + + close(fd); +} + +ATF_TC_WITHOUT_HEAD(mmap_write_seal); +ATF_TC_BODY(mmap_write_seal, tc) +{ + int fd; + char *addr, *paddr, *raddr; + + ATF_REQUIRE((fd = memfd_create("...", MFD_ALLOW_SEALING)) != -1); + ATF_REQUIRE(ftruncate(fd, BUF_SIZE) == 0); + + /* Map it, both shared and privately */ + addr = mmap(0, BUF_SIZE, (PROT_READ | PROT_WRITE), MAP_SHARED, fd, 0); + ATF_REQUIRE(addr != MAP_FAILED); + paddr = mmap(0, BUF_SIZE, (PROT_READ | PROT_WRITE), MAP_PRIVATE, fd, 0); + ATF_REQUIRE(paddr != MAP_FAILED); + raddr = mmap(0, BUF_SIZE, PROT_READ, MAP_SHARED, fd, 0); + ATF_REQUIRE(raddr != MAP_FAILED); + + /* Now try to seal it before unmapping */ + ATF_REQUIRE(fcntl(fd, F_ADD_SEALS, F_SEAL_WRITE) == -1); + ATF_REQUIRE(errno == EBUSY); + + ATF_REQUIRE(munmap(addr, BUF_SIZE) == 0); + + /* + * This should fail, because raddr still exists and it was spawned from + * a r/w fd. + */ + ATF_REQUIRE(fcntl(fd, F_ADD_SEALS, F_SEAL_WRITE) == -1); + ATF_REQUIRE(errno == EBUSY); + + ATF_REQUIRE(munmap(raddr, BUF_SIZE) == 0); + /* This one should succeed; only the private mapping remains. */ + ATF_REQUIRE(fcntl(fd, F_ADD_SEALS, F_SEAL_WRITE) == 0); + + ATF_REQUIRE(munmap(paddr, BUF_SIZE) == 0); + ATF_REQUIRE(mmap(0, BUF_SIZE, (PROT_READ | PROT_WRITE), MAP_SHARED, + fd, 0) == MAP_FAILED); + ATF_REQUIRE(errno == EACCES); + + /* Make sure we can still map privately r/w or shared r/o. */ + paddr = mmap(0, BUF_SIZE, (PROT_READ | PROT_WRITE), MAP_PRIVATE, fd, 0); + ATF_REQUIRE(paddr != MAP_FAILED); + raddr = mmap(0, BUF_SIZE, PROT_READ, MAP_SHARED, fd, 0); + ATF_REQUIRE(raddr != MAP_FAILED); + ATF_REQUIRE(munmap(raddr, BUF_SIZE) == 0); + ATF_REQUIRE(munmap(paddr, BUF_SIZE) == 0); + + close(fd); +} + +static int +memfd_truncate_test(int initial_size, int dest_size, int seals) +{ + int err, fd; + + ATF_REQUIRE((fd = memfd_create("...", MFD_ALLOW_SEALING)) != -1); + ATF_REQUIRE(ftruncate(fd, initial_size) == 0); + + ATF_REQUIRE(fcntl(fd, F_ADD_SEALS, seals) == 0); + + err = ftruncate(fd, dest_size); + if (err != 0) + err = errno; + close(fd); + return (err); +} + +ATF_TC_WITHOUT_HEAD(truncate_seals); +ATF_TC_BODY(truncate_seals, tc) +{ + + ATF_REQUIRE(memfd_truncate_test(4, 8, F_SEAL_GROW) == EPERM); + ATF_REQUIRE(memfd_truncate_test(8, 4, F_SEAL_SHRINK) == EPERM); + ATF_REQUIRE(memfd_truncate_test(8, 4, F_SEAL_GROW) == 0); + ATF_REQUIRE(memfd_truncate_test(4, 8, F_SEAL_SHRINK) == 0); + + ATF_REQUIRE(memfd_truncate_test(4, 8, F_SEAL_GROW | F_SEAL_SHRINK) == + EPERM); + ATF_REQUIRE(memfd_truncate_test(8, 4, F_SEAL_GROW | F_SEAL_SHRINK) == + EPERM); + ATF_REQUIRE(memfd_truncate_test(4, 4, F_SEAL_GROW | F_SEAL_SHRINK) == + 0); +} + +ATF_TC_WITHOUT_HEAD(get_seals); +ATF_TC_BODY(get_seals, tc) +{ + int fd; + int seals; + + ATF_REQUIRE((fd = memfd_create("...", MFD_ALLOW_SEALING)) != -1); + ATF_REQUIRE(fcntl(fd, F_GET_SEALS) == 0); + + ATF_REQUIRE(fcntl(fd, F_ADD_SEALS, F_SEAL_WRITE | F_SEAL_GROW) == 0); + seals = fcntl(fd, F_GET_SEALS); + ATF_REQUIRE(seals == (F_SEAL_WRITE | F_SEAL_GROW)); + + close(fd); +} + +ATF_TC_WITHOUT_HEAD(dup_seals); +ATF_TC_BODY(dup_seals, tc) +{ + char buf[8]; + int fd, fdx; + int seals; + + ATF_REQUIRE((fd = memfd_create("...", MFD_ALLOW_SEALING)) != -1); + ATF_REQUIRE((fdx = dup(fd)) != -1); + ATF_REQUIRE(fcntl(fd, F_GET_SEALS) == 0); + + ATF_REQUIRE(fcntl(fd, F_ADD_SEALS, F_SEAL_WRITE | F_SEAL_GROW) == 0); + seals = fcntl(fd, F_GET_SEALS); + ATF_REQUIRE(seals == (F_SEAL_WRITE | F_SEAL_GROW)); + + seals = fcntl(fdx, F_GET_SEALS); + ATF_REQUIRE(seals == (F_SEAL_WRITE | F_SEAL_GROW)); + + /* Make sure the seal's actually being applied at the inode level */ + ATF_REQUIRE(write(fdx, buf, sizeof(buf)) == -1); + ATF_REQUIRE(errno == EPERM); + + ATF_REQUIRE(mmap(0, BUF_SIZE, (PROT_READ | PROT_WRITE), MAP_SHARED, + fdx, 0) == MAP_FAILED); + ATF_REQUIRE(errno == EACCES); + + close(fd); + close(fdx); +} + +ATF_TC_WITHOUT_HEAD(immutable_seals); +ATF_TC_BODY(immutable_seals, tc) +{ + int fd; + + ATF_REQUIRE((fd = memfd_create("...", MFD_ALLOW_SEALING)) != -1); + + ATF_REQUIRE(fcntl(fd, F_ADD_SEALS, F_SEAL_SEAL) == 0); + ATF_REQUIRE(fcntl(fd, F_ADD_SEALS, F_SEAL_GROW) == -1); + ATF_REQUIRE_MSG(errno == EPERM, + "Added unique grow seal after restricting seals"); + + close(fd); + + /* + * Also check that adding a seal that already exists really doesn't + * do anything once we're sealed. + */ + ATF_REQUIRE((fd = memfd_create("...", MFD_ALLOW_SEALING)) != -1); + + ATF_REQUIRE(fcntl(fd, F_ADD_SEALS, F_SEAL_GROW | F_SEAL_SEAL) == 0); + ATF_REQUIRE(fcntl(fd, F_ADD_SEALS, F_SEAL_GROW) == -1); + ATF_REQUIRE_MSG(errno == EPERM, + "Added duplicate grow seal after restricting seals"); + close(fd); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, basic); + ATF_TP_ADD_TC(tp, cloexec); + ATF_TP_ADD_TC(tp, disallowed_sealing); + ATF_TP_ADD_TC(tp, write_seal); + ATF_TP_ADD_TC(tp, mmap_write_seal); + ATF_TP_ADD_TC(tp, truncate_seals); + ATF_TP_ADD_TC(tp, get_seals); + ATF_TP_ADD_TC(tp, dup_seals); + ATF_TP_ADD_TC(tp, immutable_seals); + return (atf_no_error()); +} From owner-svn-src-head@freebsd.org Wed Sep 23 20:15:11 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0ABE7425920; Wed, 23 Sep 2020 20:15:11 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: from mail-qk1-f171.google.com (mail-qk1-f171.google.com [209.85.222.171]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxTtk57jlz4J8P; Wed, 23 Sep 2020 20:15:10 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: by mail-qk1-f171.google.com with SMTP id g72so1026786qke.8; Wed, 23 Sep 2020 13:15:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=pnlsKriHkoJjTL9XxgeKSDwqDYw5KVD1dHQe4NGYCFQ=; b=kLcRZmp3uj2FDlfYxPcoroZIV72dmVeMGsMZctXkM7rXoMCTz0Fs5zNkUXeriGpNNU qBnlEP3Tu0mCE7gOkr10NfT9GwiRERh8oe8uECbvMFMRfD35eE6WbA9zniVXMZLY+sYb SScMU4on3jL1K/Wn5cjyezv7YeofR2TMqNq1TfyP3wyKFuAen9FG1bFBs5HzZW5HNgVS 37hZZDLovDWbXcVtdNFxL8Baei3Xy3ylrcMCA3DKIfiU7opi2Vo32RcQQKAjrrP/1mKk MBkOb0EG6as6pTBSoQ8GYL3aaz3gnOxS3ThOFzn3+1HkIkj0NNuaSkoNqf2KSJxgjNds +2gQ== X-Gm-Message-State: AOAM533XoXZvbo0Pgg0bgj2k4hp3sSQdrkC/Sw8Pxzm7fBhkrV0ESMwu 6G+69je/o29714dAsIXS0BgO0jtcPJk= X-Google-Smtp-Source: ABdhPJx25ZYoKyoNilw/ek2412BsN9bCQXQqapNGQo0IKgUwyxlj3woNF4OHKJC2KwIJg5scBwGxCw== X-Received: by 2002:a37:506:: with SMTP id 6mr1676022qkf.390.1600892109527; Wed, 23 Sep 2020 13:15:09 -0700 (PDT) Received: from mail-qt1-f171.google.com (mail-qt1-f171.google.com. [209.85.160.171]) by smtp.gmail.com with ESMTPSA id f33sm611894qtb.45.2020.09.23.13.15.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Sep 2020 13:15:09 -0700 (PDT) Received: by mail-qt1-f171.google.com with SMTP id p65so1060995qtd.2; Wed, 23 Sep 2020 13:15:09 -0700 (PDT) X-Received: by 2002:ac8:709:: with SMTP id g9mr1859644qth.310.1600892109100; Wed, 23 Sep 2020 13:15:09 -0700 (PDT) MIME-Version: 1.0 References: <202009231918.08NJIsgj042617@repo.freebsd.org> In-Reply-To: <202009231918.08NJIsgj042617@repo.freebsd.org> From: Kyle Evans Date: Wed, 23 Sep 2020 15:14:55 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r366088 - in head/sys: amd64/conf conf i386/conf x86/conf To: Warner Losh Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4BxTtk57jlz4J8P X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 20:15:11 -0000 On Wed, Sep 23, 2020 at 2:19 PM Warner Losh wrote: > > Author: imp > Date: Wed Sep 23 19:18:53 2020 > New Revision: 366088 > URL: https://svnweb.freebsd.org/changeset/base/366088 > > Log: > Use envvar rather than nonstandard hint. lines > > The NOTES files have a bunch of hint lines that are removed when > generating LINT. However, we can achieve the same effect by prepending > each of the lines with 'envvar' so the NOTES files become standard > config(8) files. No functional changes as the sed script to generate > the LINT files filters these either way. > > Suggested by: kevans > I've got a follow-up proposal that I'll pitch at some point: let's drop static hints and just stuff it all into the static env. I fixed that stuff a while ago so that dumping them into the static env will no longer disable the loader kenv by default, and I can't imagine many scenarios where the difference will be important -- I suspect static kenv is rarely used as it is. THanks, Kyle Evans From owner-svn-src-head@freebsd.org Wed Sep 23 22:49:28 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8110A3E0D52; Wed, 23 Sep 2020 22:49:28 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxYJm2tRlz4TSb; Wed, 23 Sep 2020 22:49:28 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4663817F30; Wed, 23 Sep 2020 22:49:28 +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 08NMnSa3073781; Wed, 23 Sep 2020 22:49:28 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08NMnRQ3073778; Wed, 23 Sep 2020 22:49:27 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202009232249.08NMnRQ3073778@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 23 Sep 2020 22:49:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366096 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 366096 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 22:49:28 -0000 Author: imp Date: Wed Sep 23 22:49:27 2020 New Revision: 366096 URL: https://svnweb.freebsd.org/changeset/base/366096 Log: Remove stray lines I snagged the license boiler plate. Fix that. also, it's spelled .Va not .Vn. Plus " quoting issues. Noticed by: rgrimes, xtouqh at hotmail dot com Modified: head/share/man/man9/devctl_notify.9 head/share/man/man9/devctl_process_running.9 head/share/man/man9/devctl_safe_quote_sb.9 Modified: head/share/man/man9/devctl_notify.9 ============================================================================== --- head/share/man/man9/devctl_notify.9 Wed Sep 23 22:36:38 2020 (r366095) +++ head/share/man/man9/devctl_notify.9 Wed Sep 23 22:49:27 2020 (r366096) @@ -1,8 +1,6 @@ .\" .\" Copyright (c) 2020 M Warner Losh .\" -.\" This program is free software. -.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: Modified: head/share/man/man9/devctl_process_running.9 ============================================================================== --- head/share/man/man9/devctl_process_running.9 Wed Sep 23 22:36:38 2020 (r366095) +++ head/share/man/man9/devctl_process_running.9 Wed Sep 23 22:49:27 2020 (r366096) @@ -1,8 +1,6 @@ .\" .\" Copyright (c) 2020 M Warner Losh .\" -.\" This program is free software. -.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: Modified: head/share/man/man9/devctl_safe_quote_sb.9 ============================================================================== --- head/share/man/man9/devctl_safe_quote_sb.9 Wed Sep 23 22:36:38 2020 (r366095) +++ head/share/man/man9/devctl_safe_quote_sb.9 Wed Sep 23 22:49:27 2020 (r366096) @@ -1,8 +1,6 @@ .\" .\" Copyright (c) 2020 M Warner Losh .\" -.\" This program is free software. -.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: @@ -38,12 +36,12 @@ .Fn devctl_safe_quote_sb "struct sbuf *sb" "const char *src" .Sh DESCRIPTION Copy the string from -.Vn src +.Va src into -.Vn sb . +.Va sb . All backslash characters are doubled. All double quote characters -.Sq " +.Sq \&" are also preceded by a backslash. All other characters are copied without modification. The From owner-svn-src-head@freebsd.org Wed Sep 23 22:49:44 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 640963E0F25; Wed, 23 Sep 2020 22:49:44 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxYK349tMz4TcH; Wed, 23 Sep 2020 22:49:43 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 08NMnYwb069513 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 24 Sep 2020 01:49:37 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 08NMnYwb069513 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 08NMnXbv069512; Thu, 24 Sep 2020 01:49:33 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 24 Sep 2020 01:49:33 +0300 From: Konstantin Belousov To: Warner Losh Cc: "Rodney W. Grimes" , Kyle Evans , Alan Somers , Mateusz Guzik , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r365643 - head/bin/cp Message-ID: <20200923224933.GL2570@kib.kiev.ua> References: <202009231656.08NGujEs042900@gndrsh.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 4BxYK349tMz4TcH X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com X-Spamd-Result: default: False [1.36 / 15.00]; ARC_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all:c]; NEURAL_SPAM_MEDIUM(0.63)[0.629]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.03)[-0.032]; NEURAL_SPAM_LONG(0.76)[0.761]; RCPT_COUNT_SEVEN(0.00)[8]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; FREEMAIL_CC(0.00)[freebsd.org,gmail.com]; MAILMAN_DEST(0.00)[svn-src-head,svn-src-all]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 22:49:44 -0000 On Wed, Sep 23, 2020 at 11:23:51AM -0600, Warner Losh wrote: > On Wed, Sep 23, 2020, 10:56 AM Rodney W. Grimes > wrote: > > > > cp is already fixed, people are still feeling the fallout of being > > > within those revisions and needing to bootstrap their own cp. We can > > > reduce the number of components these invocations rely on trivially to > > > shell built-in mechanics, why not do so? > > > > I would even go further, I would like to see the dependency on > > /dev/null removed from the build, and the boot process. > > > > A worthy goal, but one I'm afraid is out of our reach. A quick grep shows > just over 200 instances of /dev/null in the Makefile and mk file (800 if > you don't filter Makefile.in and Makefile.am). Maybe a third of those are > due to tests and other false positives. It would be quite the effort to > eliminate them all. And /dev/tty and /dev/zero likely will be troublesome > too, as they are used by running programs. > > and how would you throw away output you know is bad / bogus without > /dev/null? > > >From the build because it means I would no longer have to > > mount /dev in my chroots, and from the boot because I > > hate to say it, but we often scribble in /dev before > > devfs is mounted and if you look at root file systems > > mounted on other systems you well often find a /dev/null > > FILE that got created during the boot process from a >/dev/null > > before devfs was mounted. > > > > But for this issue, we're not mounting devfs early enough. We should fix > that. Removing /dev/null from the boot process likely is never going to > happen because we use it all over the place to discard output... There's > ~200 instances of it in the boot rc scripts, so getting rid of it there > would also be quite the effort, with the same question. I would like to see some evidence for this actually occuring. We mount devfs instance before root (yes), to get the device nodes available, so we can specify device name for root mount from loader. After mounting root we do a rearrangement to move devfs to /dev, which is somewhat tricky due to e.g. namecache. I do not see how could anything in userspace even touch the underlying directory on rootfs of the /dev devfs mount. OTOH, it is a usual problem with /tmp getting dirty, and the garbage hidden with tmpfs/md UFS mount over /tmp. From owner-svn-src-head@freebsd.org Wed Sep 23 23:10:52 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7F64B3E194F for ; Wed, 23 Sep 2020 23:10:52 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxYnR30Dvz4VtW for ; Wed, 23 Sep 2020 23:10:51 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x830.google.com with SMTP id b2so1384916qtp.8 for ; Wed, 23 Sep 2020 16:10:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=t8ixlpVvn4Um/MOsSbsSmTOXsMWdlVLVckS/61tQEPk=; b=c0Wbld77/WDlPdbKin8ZuzVvopIzJFGeAU4L+z4apoD6ZgwyCbGZR9YZ+s9a96pH6F FmkhOmibGD2VhfkxQX95BKGkHsIK3c3520UuMsh50X9sulpa21cPCzIoLlhihUp4DHC0 mdp+PJbKk7sqx20KWw123HG6NpXPJLKxeQHmQ0hPEdkVsjZ2Dm4NkqPaLOcqIPvCdbZr ApgXg3OgPrh3/k/mgsDHHe0Y82iQXnO0XMvv9b9yzll+Kv/Fb0CSKKWUzgsEcbFXbac5 txvDiiqRBMQVGAWQzxNa4GT6XD2MAf8zbDhWq/88G7T4l6/1d/6VS3ERDrr/uVvgUHAD wlZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=t8ixlpVvn4Um/MOsSbsSmTOXsMWdlVLVckS/61tQEPk=; b=idAJuWEQeCD2nfPVfzgIOz5plsJpqfsXlbvc8TrxXPcVMgNF7ymoXOGk43ZW0BrLTA fgwSSw/rvMyLc/FK6/4/IgyuFnSJiuLEQ0OwBUYWZtA68+uFp+ifMDZShtaR/eWKdKoQ iRAGQpKLL6WMJp+ubXc92SwkiSUOUL98SYxpiB1HRRhni/KtZUN7+yQvzJTTVnLcMghb ETM+8ZAnjiT8GvJ4UjM/QCWStbtWBWvSJRBJay+TPxx/paXWTIjL6AflkV4CemI5DnVC BD0vebSgx/OjO/1WNTxa2XmPCm68HME/SSvOetxk3u0pREf+Nk2la7+LkFRUHoTIxfTr g1sQ== X-Gm-Message-State: AOAM532spTQ+KIO1Bf4hCCLYfQcBBGiVUOVfsfqw8cX2KAkno9Bf7tKm jKNH2dB/9aZgrnI1oKtL3u8xXqjqY7OHj0Ty1zRD0Q== X-Google-Smtp-Source: ABdhPJymD4p0by66v/TH4977I3j78LFUznGCOA/qSL2BPvkQoOwPwNbjsq1a4FXK6PsAY07DA9lJmaas4Z6PHzDe+Ro= X-Received: by 2002:ac8:7388:: with SMTP id t8mr2586902qtp.187.1600902650313; Wed, 23 Sep 2020 16:10:50 -0700 (PDT) MIME-Version: 1.0 References: <202009222301.08MN1rkh076778@repo.freebsd.org> <202009231753.08NHrtuI043125@gndrsh.dnsmgr.net> In-Reply-To: <202009231753.08NHrtuI043125@gndrsh.dnsmgr.net> From: Warner Losh Date: Wed, 23 Sep 2020 17:10:39 -0600 Message-ID: Subject: Re: svn commit: r366025 - head/share/man/man9 To: "Rodney W. Grimes" Cc: Warner Losh , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4BxYnR30Dvz4VtW X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=c0Wbld77; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::830) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.50 / 15.00]; ARC_NA(0.00)[]; MAILMAN_DEST(0.00)[svn-src-head]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-1.00)[-0.996]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.98)[-0.976]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.53)[-0.531]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::830:from]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_TLS_ALL(0.00)[]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 23:10:52 -0000 On Wed, Sep 23, 2020 at 11:53 AM Rodney W. Grimes wrote: > [ Charset UTF-8 unsupported, converting... ] > > Author: imp > > Date: Tue Sep 22 23:01:53 2020 > > New Revision: 366025 > > URL: https://svnweb.freebsd.org/changeset/base/366025 > > > > Log: > > Document devctl_safe_quote_sb > > > > This routine centralizes the knowledge needed for properly quoting > > 'value' in all key="value" items that appear in devctl messages. > > > > Reviewed by: bcr > > Differential Revision: https://reviews.freebsd.org/D26520 > > > > Added: > > head/share/man/man9/devctl_safe_quote_sb.9 (contents, props changed) > > Modified: > > head/share/man/man9/Makefile > > > > Modified: head/share/man/man9/Makefile > > > ============================================================================== > > --- head/share/man/man9/Makefile Tue Sep 22 23:01:44 2020 > (r366024) > > +++ head/share/man/man9/Makefile Tue Sep 22 23:01:53 2020 > (r366025) > > @@ -122,6 +122,8 @@ MAN= accept_filter.9 \ > > DEV_MODULE.9 \ > > dev_refthread.9 \ > > devctl_process_running.9 \ > > + devctl_safe_quote_sb.9 \ > > + devctl_ > > devstat.9 \ > > devtoname.9 \ > > disk.9 \ > > > > Added: head/share/man/man9/devctl_safe_quote_sb.9 > > > ============================================================================== > > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > > +++ head/share/man/man9/devctl_safe_quote_sb.9 Tue Sep 22 > 23:01:53 2020 (r366025) > > @@ -0,0 +1,57 @@ > > +.\" > > +.\" Copyright (c) 2020 M Warner Losh > > +.\" > > +.\" This program is free software. > > Where is this line suddenly coming from? > I copied them from another makefile. I've removed it. It's bogus. Warner > > +.\" > > +.\" 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 DEVELOPERS ``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 DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, > > +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES > (INCLUDING, BUT > > +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS > OF USE, > > +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON > ANY > > +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT > > +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE > USE OF > > +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > > +.\" > > +.\" $FreeBSD$ > > +.\" > > +.Dd September 22, 2020 > > +.Dt DEVCTL_SAFE_QUOTE_SB 9 > > +.Os > > +.Sh NAME > > +.Nm devctl_safe_quote_sb > > +.Nd Insert a string, properly quoted, into a sbuf > > +.Sh SYNOPSIS > > +.In sys/devctl.h > > +.In sys/sbuf.h > > +.Ft void > > +.Fn devctl_safe_quote_sb "struct sbuf *sb" "const char *src" > > +.Sh DESCRIPTION > > +Copy the string from > > +.Vn src > > +into > > +.Vn sb . > > +All backslash characters are doubled. > > +All double quote characters > > +.Sq " > > +are also preceded by a backslash. > > +All other characters are copied without modification. > > +The > > +.Xr devctl 4 > > +protocol requires quoted string to be quoted thus. > > +This routine centralizes this knowledge. > > +.Sh SEE ALSO > > +.Xr devd 8 > > +.Sh AUTHORS > > +This manual page was written by > > +.An M. Warner Losh > > > > -- > Rod Grimes > rgrimes@freebsd.org > From owner-svn-src-head@freebsd.org Wed Sep 23 23:11:12 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 78E413E19D9 for ; Wed, 23 Sep 2020 23:11:12 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qv1-xf2e.google.com (mail-qv1-xf2e.google.com [IPv6:2607:f8b0:4864:20::f2e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxYnq4rRPz4W35 for ; Wed, 23 Sep 2020 23:11:11 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qv1-xf2e.google.com with SMTP id p15so894427qvk.5 for ; Wed, 23 Sep 2020 16:11:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HVdx5C0mgKFzHQjhScv9yaOag5JUbZ+Di0r1F1Brvho=; b=NdvhbG80oI1jiqBxUTWTJxFz1aKp//baPWE7ROdGlfLEt8epgGne5x3t0MQ7mZjCws quTGYzIOhuKuh552pgmFJpIUrHkTKlom43JdijlfexfZ3XF4Qnd7x+6zd+I67uW+TFYv ozq8lIy4tmk4jQ7SlpQOveYArP3J8C/hEnklpkHJbAxCWtOnYPNHaFq02Eg1R+h/Kt8d fD04swFBQH5GYQqliLw2Dj7qQ4U3ZaHK+6vo5tPd3urrAr5NFfLkrZSzGGWmOwFdhHP2 CCul8fxs3kqOP0RBs9yxLzPzCZd57ZBPBMB0AwEE7j8xi8uOi0bCX8V4vynUGJTZok9P k7cA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HVdx5C0mgKFzHQjhScv9yaOag5JUbZ+Di0r1F1Brvho=; b=FepNLTQPbPvf9NmU1I2RRAzXDOyqg1+2g83vCfR0DqJQcTbJ3fgpPsWogsGc9Wb/9w 9mXMxGy1IfKHIifkuehgEZf2X4ts6YPjiM1a9Tn3Qpj+GGLHRXukzseZVimQZilScKxq YZGp4CojjeL2NmcFBrQTCUhh4addrMlFgGS4AH4W3iSwwVW9al9CdodPFNsFNsGH8NZN EI06jRzgljsziV+TmqVEyT9AovWKI8dW/SvzKIeYwNl7qXgHT+hTBXoLuWzWm4KKgVgU CmQQ78kFgAWy6lxIT5iwyUyG3IpqgV8IXgQGs66/gZkX9wodnya3PxYJglQdgnqPQXUd mSEA== X-Gm-Message-State: AOAM533inkcQHRCt2Wd3mbyGX6AIuAk1totgdz1THtj4tfrBoGiS3HFS Dm/zFo5KeMVNMiEhFvZ8A66E6F63D4dOWV5X0t8YVg== X-Google-Smtp-Source: ABdhPJzaVUwX0+ndnxjXjZYHvdyAUmCUdWsmru3kLHjK42lhiJ2JCoKURYTJ0Bydxbh5sAYtcwGQKqKC57GY3V+Lg4Q= X-Received: by 2002:ad4:4a6b:: with SMTP id cn11mr2528103qvb.53.1600902670611; Wed, 23 Sep 2020 16:11:10 -0700 (PDT) MIME-Version: 1.0 References: <202009222301.08MN1rkh076778@repo.freebsd.org> In-Reply-To: From: Warner Losh Date: Wed, 23 Sep 2020 17:10:59 -0600 Message-ID: Subject: Re: svn commit: r366025 - head/share/man/man9 To: xtouqh@hotmail.com Cc: Warner Losh , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4BxYnq4rRPz4W35 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=NdvhbG80; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::f2e) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.36 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-0.95)[-0.952]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-0.92)[-0.920]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.49)[-0.487]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::f2e:from]; R_SPF_NA(0.00)[no SPF record]; FREEMAIL_TO(0.00)[hotmail.com]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; MAILMAN_DEST(0.00)[svn-src-head]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 23 Sep 2020 23:11:12 -0000 On Wed, Sep 23, 2020 at 12:27 PM wrote: > Warner Losh wrote: > > Author: imp > > Date: Tue Sep 22 23:01:53 2020 > > New Revision: 366025 > > URL: https://svnweb.freebsd.org/changeset/base/366025 > > > > Log: > > Document devctl_safe_quote_sb > > > > This routine centralizes the knowledge needed for properly quoting > > 'value' in all key="value" items that appear in devctl messages. > > > > Reviewed by: bcr > > Differential Revision: https://reviews.freebsd.org/D26520 > > > > Added: > > head/share/man/man9/devctl_safe_quote_sb.9 (contents, props changed) > > Modified: > > head/share/man/man9/Makefile > > > > Modified: head/share/man/man9/Makefile > > > ============================================================================== > > --- head/share/man/man9/Makefile Tue Sep 22 23:01:44 2020 > (r366024) > > +++ head/share/man/man9/Makefile Tue Sep 22 23:01:53 2020 > (r366025) > > @@ -122,6 +122,8 @@ MAN= accept_filter.9 \ > > DEV_MODULE.9 \ > > dev_refthread.9 \ > > devctl_process_running.9 \ > > + devctl_safe_quote_sb.9 \ > > + devctl_ > > devstat.9 \ > > devtoname.9 \ > > disk.9 \ > > > > Added: head/share/man/man9/devctl_safe_quote_sb.9 > > > ============================================================================== > > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > > +++ head/share/man/man9/devctl_safe_quote_sb.9 Tue Sep 22 > 23:01:53 2020 (r366025) > > @@ -0,0 +1,57 @@ > > +.\" > > +.\" Copyright (c) 2020 M Warner Losh > > +.\" > > +.\" This program is free software. > > +.\" > > +.\" 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 DEVELOPERS ``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 DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, > > +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES > (INCLUDING, BUT > > +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS > OF USE, > > +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON > ANY > > +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT > > +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE > USE OF > > +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > > +.\" > > +.\" $FreeBSD$ > > +.\" > > +.Dd September 22, 2020 > > +.Dt DEVCTL_SAFE_QUOTE_SB 9 > > +.Os > > +.Sh NAME > > +.Nm devctl_safe_quote_sb > > +.Nd Insert a string, properly quoted, into a sbuf > > +.Sh SYNOPSIS > > +.In sys/devctl.h > > +.In sys/sbuf.h > > +.Ft void > > +.Fn devctl_safe_quote_sb "struct sbuf *sb" "const char *src" > > +.Sh DESCRIPTION > > +Copy the string from > > +.Vn src > > .Va > > > +into > > +.Vn sb . > > .Va > > > +All backslash characters are doubled. > > +All double quote characters > > +.Sq " > > .Sq \&" > fixed. thanks! Warner > > +are also preceded by a backslash. > > +All other characters are copied without modification. > > +The > > +.Xr devctl 4 > > +protocol requires quoted string to be quoted thus. > > +This routine centralizes this knowledge. > > +.Sh SEE ALSO > > +.Xr devd 8 > > +.Sh AUTHORS > > +This manual page was written by > > +.An M. Warner Losh > From owner-svn-src-head@freebsd.org Thu Sep 24 02:44:59 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B50E73EA52B; Thu, 24 Sep 2020 02:44:59 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxfXW4KsWz3XDK; Thu, 24 Sep 2020 02:44:59 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 787221B099; Thu, 24 Sep 2020 02:44:59 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08O2ixsA023406; Thu, 24 Sep 2020 02:44:59 GMT (envelope-from sobomax@FreeBSD.org) Received: (from sobomax@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08O2ixw5023405; Thu, 24 Sep 2020 02:44:59 GMT (envelope-from sobomax@FreeBSD.org) Message-Id: <202009240244.08O2ixw5023405@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sobomax set sender to sobomax@FreeBSD.org using -f From: Maxim Sobolev Date: Thu, 24 Sep 2020 02:44:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366098 - head/usr.sbin/daemon X-SVN-Group: head X-SVN-Commit-Author: sobomax X-SVN-Commit-Paths: head/usr.sbin/daemon X-SVN-Commit-Revision: 366098 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 24 Sep 2020 02:44:59 -0000 Author: sobomax Date: Thu Sep 24 02:44:58 2020 New Revision: 366098 URL: https://svnweb.freebsd.org/changeset/base/366098 Log: dd a new option (-H) to daemon(8) to catch SIGHUP and re-open output_file file when received. The default system log rotation mechanism (newsyslog(8)) requires ability to send signal to a daemon in order to properly complete rotation of the logs in an "atomic" manner without having to making a copy and truncating original file. Unfortunately our built-in mechanism to convert "dumb" programs into daemons has no way to handle this rotation properly. This change adds this ability, to be enabled by supplying -H option in addition to the -o option. Reviewed by: markj, rpokala (manpages) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D26526 Modified: head/usr.sbin/daemon/daemon.8 head/usr.sbin/daemon/daemon.c Modified: head/usr.sbin/daemon/daemon.8 ============================================================================== --- head/usr.sbin/daemon/daemon.8 Wed Sep 23 23:56:49 2020 (r366097) +++ head/usr.sbin/daemon/daemon.8 Thu Sep 24 02:44:58 2020 (r366098) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 2, 2019 +.Dd September 22, 2020 .Dt DAEMON 8 .Os .Sh NAME @@ -34,7 +34,7 @@ .Nd run detached from the controlling terminal .Sh SYNOPSIS .Nm -.Op Fl cfrS +.Op Fl cfHrS .Op Fl p Ar child_pidfile .Op Fl P Ar supervisor_pidfile .Op Fl t Ar title @@ -68,6 +68,14 @@ or syslog output, the standard file descriptors are fi .Pa /dev/null , then stdout and/or stderr is redirected to a file or to syslog as specified by the other options. +.It Fl H +Close +.Pa output_file +and re-open it when signal SIGHUP is received, for interoperability with +.Xr newsyslog 1 +and similar log rotation / archival mechanisms. If +.Fa o +is not specified, this flag is ignored. .It Fl S Enable syslog output. This is implicitly applied if other syslog parameters are provided. @@ -77,6 +85,12 @@ tag, respectively. Append output from the daemonized process to .Pa output_file . If the file does not exist, it is created with permissions 0600. +When this option is used together with options +.Fl c and +.Fl H +the absolute path needs to be provided to ensure +.Nm +can re-open the file after a SIGHUP. .It Fl m Ar output_mask Redirect output from the child process stdout (1), stderr (2), or both (3). This value specifies what is sent to syslog and the log file. Modified: head/usr.sbin/daemon/daemon.c ============================================================================== --- head/usr.sbin/daemon/daemon.c Wed Sep 23 23:56:49 2020 (r366097) +++ head/usr.sbin/daemon/daemon.c Thu Sep 24 02:44:58 2020 (r366098) @@ -61,11 +61,15 @@ struct log_params { int logpri; int noclose; int outfd; + const char *outfn; }; static void restrict_process(const char *); static void handle_term(int); static void handle_chld(int); +static void handle_hup(int); +static int open_log(const char *); +static void reopen_log(struct log_params *); static int listen_child(int, struct log_params *); static int get_log_mapping(const char *, const CODE *); static void open_pid_files(const char *, const char *, struct pidfh **, @@ -74,7 +78,8 @@ static void do_output(const unsigned char *, size_t, s static void daemon_sleep(time_t, long); static void usage(void); -static volatile sig_atomic_t terminate = 0, child_gone = 0, pid = 0; +static volatile sig_atomic_t terminate = 0, child_gone = 0, pid = 0, + do_log_reopen = 0; int main(int argc, char *argv[]) @@ -84,7 +89,7 @@ main(int argc, char *argv[]) sigset_t mask_susp, mask_orig, mask_read, mask_term; struct log_params logpar; int pfd[2] = { -1, -1 }, outfd = -1; - int stdmask, logpri, logfac; + int stdmask, logpri, logfac, log_reopen; struct pidfh *ppfh, *pfh; char *p; @@ -97,9 +102,10 @@ main(int argc, char *argv[]) logtag = "daemon"; restart = 0; dosyslog = 0; + log_reopen = 0; outfn = NULL; title = NULL; - while ((ch = getopt(argc, argv, "cfSp:P:ru:o:s:l:t:l:m:R:T:")) != -1) { + while ((ch = getopt(argc, argv, "cfHSp:P:ru:o:s:l:t:l:m:R:T:")) != -1) { switch (ch) { case 'c': nochdir = 0; @@ -107,6 +113,9 @@ main(int argc, char *argv[]) case 'f': noclose = 0; break; + case 'H': + log_reopen = 1; + break; case 'l': logfac = get_log_mapping(optarg, facilitynames); if (logfac == -1) @@ -168,7 +177,7 @@ main(int argc, char *argv[]) title = argv[0]; if (outfn) { - outfd = open(outfn, O_CREAT | O_WRONLY | O_APPEND | O_CLOEXEC, 0600); + outfd = open_log(outfn); if (outfd == -1) err(7, "open"); } @@ -201,7 +210,7 @@ main(int argc, char *argv[]) */ pid = -1; if (pidfile || ppidfile || restart || outfd != -1 || dosyslog) { - struct sigaction act_term, act_chld; + struct sigaction act_term, act_chld, act_hup; /* Avoid PID racing with SIGCHLD and SIGTERM. */ memset(&act_term, 0, sizeof(act_term)); @@ -214,6 +223,10 @@ main(int argc, char *argv[]) sigemptyset(&act_chld.sa_mask); sigaddset(&act_chld.sa_mask, SIGTERM); + memset(&act_hup, 0, sizeof(act_hup)); + act_hup.sa_handler = handle_hup; + sigemptyset(&act_hup.sa_mask); + /* Block these when avoiding racing before sigsuspend(). */ sigemptyset(&mask_susp); sigaddset(&mask_susp, SIGTERM); @@ -251,6 +264,12 @@ main(int argc, char *argv[]) logpar.dosyslog = dosyslog; logpar.logpri = logpri; logpar.noclose = noclose; + logpar.outfn = outfn; + if (log_reopen && outfd >= 0 && + sigaction(SIGHUP, &act_hup, NULL) == -1) { + warn("sigaction"); + goto exit; + } restart: if (pipe(pfd)) err(1, "pipe"); @@ -465,6 +484,8 @@ listen_child(int fd, struct log_params *logpar) assert(logpar); assert(bytes_read < LBUF_SIZE - 1); + if (do_log_reopen) + reopen_log(logpar); rv = read(fd, buf + bytes_read, LBUF_SIZE - bytes_read - 1); if (rv > 0) { unsigned char *cp; @@ -543,9 +564,9 @@ handle_term(int signo) } static void -handle_chld(int signo) +handle_chld(int signo __unused) { - (void)signo; + for (;;) { int rv = waitpid(-1, NULL, WNOHANG); if (pid == rv) { @@ -559,10 +580,36 @@ handle_chld(int signo) } static void +handle_hup(int signo __unused) +{ + + do_log_reopen = 1; +} + +static int +open_log(const char *outfn) +{ + + return open(outfn, O_CREAT | O_WRONLY | O_APPEND | O_CLOEXEC, 0600); +} + +static void +reopen_log(struct log_params *lpp) +{ + int outfd; + + do_log_reopen = 0; + outfd = open_log(lpp->outfn); + if (lpp->outfd >= 0) + close(lpp->outfd); + lpp->outfd = outfd; +} + +static void usage(void) { (void)fprintf(stderr, - "usage: daemon [-cfrS] [-p child_pidfile] [-P supervisor_pidfile]\n" + "usage: daemon [-cfHrS] [-p child_pidfile] [-P supervisor_pidfile]\n" " [-u user] [-o output_file] [-t title]\n" " [-l syslog_facility] [-s syslog_priority]\n" " [-T syslog_tag] [-m output_mask] [-R restart_delay_secs]\n" From owner-svn-src-head@freebsd.org Thu Sep 24 03:38:33 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 79ACF3EB387; Thu, 24 Sep 2020 03:38:33 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxgkK2gD7z3ZTr; Thu, 24 Sep 2020 03:38:33 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 249B91B556; Thu, 24 Sep 2020 03:38:33 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08O3cXIb055831; Thu, 24 Sep 2020 03:38:33 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08O3cXCZ055830; Thu, 24 Sep 2020 03:38:33 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202009240338.08O3cXCZ055830@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 24 Sep 2020 03:38:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366099 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 366099 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 24 Sep 2020 03:38:33 -0000 Author: mjg Date: Thu Sep 24 03:38:32 2020 New Revision: 366099 URL: https://svnweb.freebsd.org/changeset/base/366099 Log: cache: eliminate cache_zap_locked_vnode It is only ever called for negative entries and for those it is just a wrapper around cache_zap_negative_locked_vnode_kl which always succeeds. This also fixes a bug where cache_lookup_fallback should have been calling cache_zap_locked_bucket instead. Note that in order to trigger the bug NOCACHE must not be set, which currently only happens when creating a new coredump (and then the coredump-to-be has to have a negative entry). Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Thu Sep 24 02:44:58 2020 (r366098) +++ head/sys/kern/vfs_cache.c Thu Sep 24 03:38:32 2020 (r366099) @@ -1089,52 +1089,6 @@ out_relock: return (false); } -static int __noinline -cache_zap_locked_vnode(struct namecache *ncp, struct vnode *vp) -{ - struct mtx *pvlp, *vlp1, *vlp2, *to_unlock; - struct mtx *blp; - int error = 0; - - MPASS(vp == ncp->nc_dvp || vp == ncp->nc_vp); - cache_assert_vnode_locked(vp); - - pvlp = VP2VNODELOCK(vp); - if (ncp->nc_flag & NCF_NEGATIVE) { - cache_zap_negative_locked_vnode_kl(ncp, vp); - goto out; - } - - blp = NCP2BUCKETLOCK(ncp); - vlp1 = VP2VNODELOCK(ncp->nc_dvp); - vlp2 = VP2VNODELOCK(ncp->nc_vp); - cache_sort_vnodes(&vlp1, &vlp2); - if (vlp1 == pvlp) { - mtx_lock(vlp2); - to_unlock = vlp2; - } else { - if (!mtx_trylock(vlp1)) { - /* - * TODO: Very wasteful but rare. - */ - mtx_unlock(pvlp); - mtx_lock(vlp1); - mtx_lock(vlp2); - mtx_unlock(vlp2); - mtx_unlock(vlp1); - return (EAGAIN); - } - to_unlock = vlp1; - } - mtx_lock(blp); - cache_zap_locked(ncp); - mtx_unlock(blp); - mtx_unlock(to_unlock); -out: - mtx_unlock(pvlp); - return (error); -} - /* * If trylocking failed we can get here. We know enough to take all needed locks * in the right order and re-lookup the entry. @@ -1373,11 +1327,8 @@ negative_success: if (__predict_false(cnp->cn_nameiop == CREATE)) { if (cnp->cn_flags & ISLASTCN) { counter_u64_add(numnegzaps, 1); - error = cache_zap_locked_vnode(ncp, dvp); - if (__predict_false(error != 0)) { - zap_and_exit_bucket_fail2++; - goto retry; - } + cache_zap_negative_locked_vnode_kl(ncp, dvp); + mtx_unlock(dvlp); cache_free(ncp); return (0); } @@ -1484,7 +1435,7 @@ negative_success: if (__predict_false(cnp->cn_nameiop == CREATE)) { if (cnp->cn_flags & ISLASTCN) { counter_u64_add(numnegzaps, 1); - error = cache_zap_locked_vnode(ncp, dvp); + error = cache_zap_locked_bucket(ncp, cnp, hash, blp); if (__predict_false(error != 0)) { zap_and_exit_bucket_fail2++; goto retry; From owner-svn-src-head@freebsd.org Thu Sep 24 06:12:58 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EB00B3ED93C; Thu, 24 Sep 2020 06:12:58 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bxl8V606Jz3yTJ; Thu, 24 Sep 2020 06:12:58 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B231B1D565; Thu, 24 Sep 2020 06:12:58 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08O6Cw4o053545; Thu, 24 Sep 2020 06:12:58 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08O6CwsD053543; Thu, 24 Sep 2020 06:12:58 GMT (envelope-from se@FreeBSD.org) Message-Id: <202009240612.08O6CwsD053543@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: =?UTF-8?Q?Stefan_E=c3=9fer?= Date: Thu, 24 Sep 2020 06:12:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366100 - in head: share/man/man5 tools/build/options X-SVN-Group: head X-SVN-Commit-Author: se X-SVN-Commit-Paths: in head: share/man/man5 tools/build/options X-SVN-Commit-Revision: 366100 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 24 Sep 2020 06:12:59 -0000 Author: se Date: Thu Sep 24 06:12:57 2020 New Revision: 366100 URL: https://svnweb.freebsd.org/changeset/base/366100 Log: Slightly modify wording to better match nearby entries. MFC after: 3 days Modified: head/share/man/man5/src.conf.5 head/tools/build/options/WITHOUT_GH_BC head/tools/build/options/WITH_GH_BC Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Thu Sep 24 03:38:32 2020 (r366099) +++ head/share/man/man5/src.conf.5 Thu Sep 24 06:12:57 2020 (r366100) @@ -669,10 +669,10 @@ Set to build This is a default setting on amd64/amd64, arm/armv6, arm/armv7, i386/i386, mips/mips, mips/mips64, powerpc/powerpc and powerpc/powerpc64. .It Va WITHOUT_GH_BC -Do not install the enhanced -.Xr bc +Set to not build and install the enhanced +.Xr bc 1 and -.Xr dc +.Xr dc 1 programs instead of the traditional FreeBSD versions. .It Va WITHOUT_GNU_DIFF Set to not build GNU Modified: head/tools/build/options/WITHOUT_GH_BC ============================================================================== --- head/tools/build/options/WITHOUT_GH_BC Thu Sep 24 03:38:32 2020 (r366099) +++ head/tools/build/options/WITHOUT_GH_BC Thu Sep 24 06:12:57 2020 (r366100) @@ -1,6 +1,6 @@ .\" $FreeBSD$ -Do not install the enhanced -.Xr bc +Set to not build and install the enhanced +.Xr bc 1 and -.Xr dc +.Xr dc 1 programs instead of the traditional FreeBSD versions. Modified: head/tools/build/options/WITH_GH_BC ============================================================================== --- head/tools/build/options/WITH_GH_BC Thu Sep 24 03:38:32 2020 (r366099) +++ head/tools/build/options/WITH_GH_BC Thu Sep 24 06:12:57 2020 (r366100) @@ -1,6 +1,6 @@ .\" $FreeBSD$ -Install the enhanced -.Xr bc +Set this option to install the enhanced +.Xr bc 1 and -.Xr dc +.Xr dc 1 programs instead of the traditional FreeBSD versions. From owner-svn-src-head@freebsd.org Thu Sep 24 06:40:36 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5E3BC3EE2E2; Thu, 24 Sep 2020 06:40:36 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxlmN1vP2z40TB; Thu, 24 Sep 2020 06:40:36 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2514C1DC92; Thu, 24 Sep 2020 06:40:36 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08O6eaWX066257; Thu, 24 Sep 2020 06:40:36 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08O6ea8L066256; Thu, 24 Sep 2020 06:40:36 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202009240640.08O6ea8L066256@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 24 Sep 2020 06:40:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366101 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 366101 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 24 Sep 2020 06:40:36 -0000 Author: imp Date: Thu Sep 24 06:40:35 2020 New Revision: 366101 URL: https://svnweb.freebsd.org/changeset/base/366101 Log: Create a standalone version of sys/malloc.h The ZSTD support for the boot loader will need to include files that use the kernel's malloc interface. Create a standalone stub version that's functional enough to allow this to work. There's some limitations in this interface, and it's not quite a perfect match. Specifically, M_WAITOK allocations can fail because there's nothing that can be done we no memory is available. Modified: head/sys/sys/malloc.h Modified: head/sys/sys/malloc.h ============================================================================== --- head/sys/sys/malloc.h Thu Sep 24 06:12:57 2020 (r366100) +++ head/sys/sys/malloc.h Thu Sep 24 06:40:35 2020 (r366101) @@ -37,6 +37,7 @@ #ifndef _SYS_MALLOC_H_ #define _SYS_MALLOC_H_ +#ifndef _STANDALONE #include #ifdef _KERNEL #include @@ -267,4 +268,34 @@ WOULD_OVERFLOW(size_t nmemb, size_t size) #undef MUL_NO_OVERFLOW #endif /* _KERNEL */ +#else +/* + * The native stand malloc / free interface we're mapping to + */ +extern void Free(void *p, const char *file, int line); +extern void *Malloc(size_t bytes, const char *file, int line); + +/* + * Minimal standalone malloc implementation / environment. None of the + * flags mean anything and there's no need declare malloc types. + * Define the simple alloc / free routines in terms of Malloc and + * Free. None of the kernel features that this stuff disables are needed. + * + * XXX we are setting ourselves up for a potential crash if we can't allocate + * memory for a M_WAITOK call. + */ +#define M_WAITOK 0 +#define M_ZERO 0 +#define M_NOWAIT 0 +#define MALLOC_DECLARE(x) + +#define kmem_zalloc(size, flags) Malloc((size), __FILE__, __LINE__) +#define kmem_free(p, size) Free(p, __FILE__, __LINE__) + +/* + * ZFS mem.h define that's the OpenZFS porting layer way of saying + * M_WAITOK. Given the above, it will also be a nop. + */ +#define KM_SLEEP M_WAITOK +#endif /* _STANDALONE */ #endif /* !_SYS_MALLOC_H_ */ From owner-svn-src-head@freebsd.org Thu Sep 24 06:41:03 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A170D3EE4BD; Thu, 24 Sep 2020 06:41:03 +0000 (UTC) (envelope-from se@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bxlmv3tfVz40Rf; Thu, 24 Sep 2020 06:41:03 +0000 (UTC) (envelope-from se@freebsd.org) Received: from Stefans-MBP-WLAN.fritz.box (p200300cd5f30c8003c8f9e409704137a.dip0.t-ipconnect.de [IPv6:2003:cd:5f30:c800:3c8f:9e40:9704:137a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: se/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4BC352E26A; Thu, 24 Sep 2020 06:41:02 +0000 (UTC) (envelope-from se@freebsd.org) To: Warner Losh , "Rodney W. Grimes" Cc: Kyle Evans , Alan Somers , Mateusz Guzik , src-committers , svn-src-all , svn-src-head References: <202009231656.08NGujEs042900@gndrsh.dnsmgr.net> From: Stefan Esser Subject: Re: svn commit: r365643 - head/bin/cp Message-ID: Date: Thu, 24 Sep 2020 08:40:58 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.2.2 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="CfUNVJoL9lAqJn99TPi79rit2BDtCwtBr" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 24 Sep 2020 06:41:03 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --CfUNVJoL9lAqJn99TPi79rit2BDtCwtBr Content-Type: multipart/mixed; boundary="etly9rzGRsbsJWSnW0A58ATBnW8E5Hmx6"; protected-headers="v1" From: Stefan Esser To: Warner Losh , "Rodney W. Grimes" Cc: Kyle Evans , Alan Somers , Mateusz Guzik , src-committers , svn-src-all , svn-src-head Message-ID: Subject: Re: svn commit: r365643 - head/bin/cp References: <202009231656.08NGujEs042900@gndrsh.dnsmgr.net> In-Reply-To: --etly9rzGRsbsJWSnW0A58ATBnW8E5Hmx6 Content-Type: multipart/mixed; boundary="------------320640D24E5E91BD42BC2AA9" Content-Language: en-US This is a multi-part message in MIME format. --------------320640D24E5E91BD42BC2AA9 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Am 23.09.20 um 19:23 schrieb Warner Losh> But for this issue, we're not=20 mounting devfs early enough.=C2=A0 We should > fix that. Removing /dev/null from the boot process likely is never goin= g=20 > to happen because we use it all over the place to discard output...=20 > There's ~200 instances of it in the boot rc scripts, so getting rid of = > it there would also be quite the effort, with the same question. Removal of /dev/null from rc.d scripts should be quite simple, since most cases could just use ">-" (close file descriptor) instead. Other usage could be substituted with ":>" followed by chown. I'd be willing to generate patches for review, if there is any chance such a change might be accepted into -CURRENT. I could not find any use of /dev/zero, but e.g. rc.d/syscons uses ${kbddev} (i.e. /dev/ttyv0) and rc.d/zvol performs swapon on /dev/zvol/${name}, rc.d/random uses /dev/random and so on. But those further references to /dev nodes will in general be NOPs if /dev is not available (some test for existence of the node they rely on, other just fail trying to access them, but without negative effect on going multi-user). Regards, STefan --------------320640D24E5E91BD42BC2AA9-- --etly9rzGRsbsJWSnW0A58ATBnW8E5Hmx6-- --CfUNVJoL9lAqJn99TPi79rit2BDtCwtBr Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsB5BAABCAAjFiEEo3HqZZwL7MgrcVMTR+u171r99UQFAl9sP3oFAwAAAAAACgkQR+u171r99UQH Ewf/RUQjA+049gKu9/g1VbBO8V9j14/MuNVu5wA8fWcWFMJJN9s2XBnCGTlWajvnqF0qnG/b4GkO TZwIjsQxEFCi9CYUg/ghd9dsdk99DWnlUKfB73YgcqIpDXK1bI9pYt+LJBi6lLgMkzZYFY38u3T8 pUCQXPipacJ+Z5Fzw8JDosSJic81wNtPFqLpwQ6tsmePYhPhStGhAmObdP8zjvtp1qcMQNyJ9Wol E1N+NZDKLtaHLqcJMLBkMOFfpRytBC9rP+VKz5CGF7jWU3f6s4CmpuGLiLcfkmjkFod8WXxk1FVg pPAQGD3AhK6Y0LjJW1fTZFDuiSwicvau5RjxpoQRFg== =btfS -----END PGP SIGNATURE----- --CfUNVJoL9lAqJn99TPi79rit2BDtCwtBr-- From owner-svn-src-head@freebsd.org Thu Sep 24 06:54:43 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5B5563EEA65 for ; Thu, 24 Sep 2020 06:54:43 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72c.google.com (mail-qk1-x72c.google.com [IPv6:2607:f8b0:4864:20::72c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bxm4f4yZzz41Lt for ; Thu, 24 Sep 2020 06:54:42 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72c.google.com with SMTP id 16so2365261qkf.4 for ; Wed, 23 Sep 2020 23:54:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=azBV/P25KOx4sju/Z/2vJrAm1P+RYAjzGxapNzFvvnI=; b=ydd43xKTrDN5UU2v2Coq6MvX9pLYT165l+0ix0iK1x6A/LZrVjxzGW/l7Yo6T7oBwI XTVOVKOjrm+YhqDiQGhhvif6ZuMRWupXiZVGerfz1Ns3BzcgxA9GicJButzG8c6zNfVz sq07JcvF+UMJC/Ta8JNVUmTWYbflx8cZLUZkE+VaPZUuhmweiFsQJ5xcHstZhhxGLTp4 za4j+z65Syithwk7Il+zG7sHBxwlYVGvUE8sRvjFsA/MCqKpZlCPbmiIE5YG84VA5g8q /eH2I2hz5h+HnCdt79eoW4/EpDNRIqf3f9HSQmWknICYzg8JNfj3CyDv7pLZ5OZlq6N/ a1Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=azBV/P25KOx4sju/Z/2vJrAm1P+RYAjzGxapNzFvvnI=; b=i1+xJ28m85R6D0QsPRzdnXR8cikrWmcP0tcIlfAS93gpcDIrx/E2+IDMeiE0be0JON GH8L47FF1oAbvVZExXuUdqnWUV3RjYHqKCF7XAG0eXyfS9bHXMuscw6q35u+5x5tyJer xGW3s2RmyjZRUSAg/ldIsjuIyZv+VhrKqAi7rQvG8GXf6DbTtQ3MW+JcaMkrNaJCPbPr IZpX2fZlJTDHuCgD+7LdB+lCntil0e/uT5AsMXEhIk0XeQG6cjZSmvhYCRpL/+fQEplU zRS1XbSBBnLVODUlIIk/PPHl/SgG9ZOAxlp+c6Y4JRATCH1V244ZxoqaGuUrTl9YwZDS yINQ== X-Gm-Message-State: AOAM532CTbR1RQzf6cSxJVOOGX1xnweaQtcwAa1AAdgBNuCbk9uw8qK4 lo6gJ3mXmXCo+Cnph0JRJipGjA7BeNi2VYobue+b3A== X-Google-Smtp-Source: ABdhPJyCmMHi925sCnERJNW1V+v4n6ZSqYt8RwJLpikE0j+6ey2UOf6Mo8AR34zqXlE0CeQC65orGe2fVjfpZfZw5q0= X-Received: by 2002:ae9:ee06:: with SMTP id i6mr3460893qkg.380.1600930481721; Wed, 23 Sep 2020 23:54:41 -0700 (PDT) MIME-Version: 1.0 References: <202009231656.08NGujEs042900@gndrsh.dnsmgr.net> In-Reply-To: From: Warner Losh Date: Thu, 24 Sep 2020 00:54:30 -0600 Message-ID: Subject: Re: svn commit: r365643 - head/bin/cp To: Stefan Esser Cc: "Rodney W. Grimes" , Kyle Evans , Alan Somers , Mateusz Guzik , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4Bxm4f4yZzz41Lt X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=ydd43xKT; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::72c) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.21 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-0.95)[-0.949]; FROM_HAS_DN(0.00)[]; FREEMAIL_CC(0.00)[freebsd.org,gmail.com]; NEURAL_HAM_LONG(-0.96)[-0.960]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.30)[-0.299]; RCPT_COUNT_SEVEN(0.00)[8]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::72c:from]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; MAILMAN_DEST(0.00)[svn-src-head] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 24 Sep 2020 06:54:43 -0000 On Thu, Sep 24, 2020 at 12:41 AM Stefan Esser wrote: > Am 23.09.20 um 19:23 schrieb Warner Losh> But for this issue, we're not > mounting devfs early enough. We should > > fix that. Removing /dev/null from the boot process likely is never going > > to happen because we use it all over the place to discard output... > > There's ~200 instances of it in the boot rc scripts, so getting rid of > > it there would also be quite the effort, with the same question. > > Removal of /dev/null from rc.d scripts should be quite simple, > since most cases could just use ">-" (close file descriptor) > instead. Other usage could be substituted with ":>" followed > by chown. > So closing fd1 and fd2 doesn't cause them to be available for these programs to get as an fd on open, causing other issues? But >- isn't documented in sh(1) as doing the close thing. On a whim I did the following: $ echo fred >- $ ls -last ./- 4 -rw-r--r-- 1 imp imp 5 Sep 24 00:50 ./- $ cat ./- fred $ which suggests maybe you now have a lot of files named - instead... > I'd be willing to generate patches for review, if there is any > chance such a change might be accepted into -CURRENT. > > I could not find any use of /dev/zero, Yea, I'd thought we used it in libc, but I can't find any evidence of that with grep now that I've gone looking for it. For get that specific one :) > but e.g. rc.d/syscons > uses ${kbddev} (i.e. /dev/ttyv0) and rc.d/zvol performs swapon > on /dev/zvol/${name}, rc.d/random uses /dev/random and so on. > So those interactions should be disaled by rc variables... Or we should be failing the operation... > But those further references to /dev nodes will in general be > NOPs if /dev is not available (some test for existence of the > node they rely on, other just fail trying to access them, but > without negative effect on going multi-user). > Yea, that's more minor, but if /dev/ isn't there, they likely should fail, or shouldn't proceed... But in a way that allows the rest of the rc scripts to continue... Warner From owner-svn-src-head@freebsd.org Thu Sep 24 07:03:26 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DBA183EED41; Thu, 24 Sep 2020 07:03:26 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxmGk5PzZz41Qt; Thu, 24 Sep 2020 07:03:26 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9DF7C1E11F; Thu, 24 Sep 2020 07:03:26 +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 08O73QQw084041; Thu, 24 Sep 2020 07:03:26 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08O73Q0b084040; Thu, 24 Sep 2020 07:03:26 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202009240703.08O73Q0b084040@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 24 Sep 2020 07:03:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366102 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 366102 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 24 Sep 2020 07:03:26 -0000 Author: andrew Date: Thu Sep 24 07:03:26 2020 New Revision: 366102 URL: https://svnweb.freebsd.org/changeset/base/366102 Log: Add bounce helpers to the arm64 busdma Add helper functions to the arm64 busdma for common cases of checking if we may need to bounce, and if we must bounce for a given address. These will be expanded later as we handle cache-misaligned memory. Reported by: mmel Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D26493 Modified: head/sys/arm64/arm64/busdma_bounce.c Modified: head/sys/arm64/arm64/busdma_bounce.c ============================================================================== --- head/sys/arm64/arm64/busdma_bounce.c Thu Sep 24 06:40:35 2020 (r366101) +++ head/sys/arm64/arm64/busdma_bounce.c Thu Sep 24 07:03:26 2020 (r366102) @@ -162,6 +162,27 @@ static void _bus_dmamap_count_phys(bus_dma_tag_t dmat, static int _bus_dmamap_reserve_pages(bus_dma_tag_t dmat, bus_dmamap_t map, int flags); +static bool +might_bounce(bus_dma_tag_t dmat) +{ + + if ((dmat->bounce_flags & BF_COULD_BOUNCE) != 0) + return (true); + + return (false); +} + +static bool +must_bounce(bus_dma_tag_t dmat, bus_addr_t paddr) +{ + + if ((dmat->bounce_flags & BF_COULD_BOUNCE) != 0 && + bus_dma_run_filter(&dmat->common, paddr)) + return (true); + + return (false); +} + /* * Allocate a device specific dma_tag. */ @@ -278,7 +299,7 @@ static bool bounce_bus_dma_id_mapped(bus_dma_tag_t dmat, vm_paddr_t buf, bus_size_t buflen) { - if ((dmat->bounce_flags & BF_COULD_BOUNCE) == 0) + if (!might_bounce(dmat)) return (true); return (!_bus_dmamap_pagesneeded(dmat, buf, buflen, NULL)); } @@ -566,7 +587,7 @@ _bus_dmamap_pagesneeded(bus_dma_tag_t dmat, vm_paddr_t curaddr = buf; while (buflen != 0) { sgsize = MIN(buflen, dmat->common.maxsegsz); - if (bus_dma_run_filter(&dmat->common, curaddr)) { + if (must_bounce(dmat, curaddr)) { sgsize = MIN(sgsize, PAGE_SIZE - (curaddr & PAGE_MASK)); if (pagesneeded == NULL) @@ -587,7 +608,7 @@ _bus_dmamap_count_phys(bus_dma_tag_t dmat, bus_dmamap_ bus_size_t buflen, int flags) { - if ((map->flags & DMAMAP_COULD_BOUNCE) != 0 && map->pagesneeded == 0) { + if (map->pagesneeded == 0) { _bus_dmamap_pagesneeded(dmat, buf, buflen, &map->pagesneeded); CTR1(KTR_BUSDMA, "pagesneeded= %d\n", map->pagesneeded); } @@ -602,7 +623,7 @@ _bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap bus_addr_t paddr; bus_size_t sg_len; - if ((map->flags & DMAMAP_COULD_BOUNCE) != 0 && map->pagesneeded == 0) { + if (map->pagesneeded == 0) { CTR4(KTR_BUSDMA, "lowaddr= %d Maxmem= %d, boundary= %d, " "alignment= %d", dmat->common.lowaddr, ptoa((vm_paddr_t)Maxmem), @@ -622,7 +643,7 @@ _bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap paddr = pmap_kextract(vaddr); else paddr = pmap_extract(pmap, vaddr); - if (bus_dma_run_filter(&dmat->common, paddr) != 0) { + if (must_bounce(dmat, paddr)) { sg_len = roundup2(sg_len, dmat->common.alignment); map->pagesneeded++; @@ -720,7 +741,7 @@ bounce_bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dm if (segs == NULL) segs = dmat->segments; - if ((dmat->bounce_flags & BF_COULD_BOUNCE) != 0) { + if (might_bounce(dmat)) { _bus_dmamap_count_phys(dmat, map, buf, buflen, flags); if (map->pagesneeded != 0) { error = _bus_dmamap_reserve_pages(dmat, map, flags); @@ -735,9 +756,7 @@ bounce_bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dm while (buflen > 0) { curaddr = buf; sgsize = MIN(buflen, dmat->common.maxsegsz); - if (((dmat->bounce_flags & BF_COULD_BOUNCE) != 0) && - map->pagesneeded != 0 && - bus_dma_run_filter(&dmat->common, curaddr)) { + if (map->pagesneeded != 0 && must_bounce(dmat, curaddr)) { sgsize = MIN(sgsize, PAGE_SIZE - (curaddr & PAGE_MASK)); curaddr = add_bounce_page(dmat, map, 0, curaddr, sgsize); @@ -791,7 +810,7 @@ bounce_bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_ if (segs == NULL) segs = dmat->segments; - if ((dmat->bounce_flags & BF_COULD_BOUNCE) != 0) { + if (might_bounce(dmat)) { _bus_dmamap_count_pages(dmat, map, pmap, buf, buflen, flags); if (map->pagesneeded != 0) { error = _bus_dmamap_reserve_pages(dmat, map, flags); @@ -822,9 +841,7 @@ bounce_bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_ */ max_sgsize = MIN(buflen, dmat->common.maxsegsz); sgsize = PAGE_SIZE - (curaddr & PAGE_MASK); - if (((dmat->bounce_flags & BF_COULD_BOUNCE) != 0) && - map->pagesneeded != 0 && - bus_dma_run_filter(&dmat->common, curaddr)) { + if (map->pagesneeded != 0 && must_bounce(dmat, curaddr)) { sgsize = roundup2(sgsize, dmat->common.alignment); sgsize = MIN(sgsize, max_sgsize); curaddr = add_bounce_page(dmat, map, kvaddr, curaddr, From owner-svn-src-head@freebsd.org Thu Sep 24 07:07:54 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EE24D3EEEE7; Thu, 24 Sep 2020 07:07:54 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxmMt62F5z4282; Thu, 24 Sep 2020 07:07:54 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 992041E18C; Thu, 24 Sep 2020 07:07:54 +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 08O77sRE084303; Thu, 24 Sep 2020 07:07:54 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08O77shJ084302; Thu, 24 Sep 2020 07:07:54 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202009240707.08O77shJ084302@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 24 Sep 2020 07:07:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366103 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 366103 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 24 Sep 2020 07:07:55 -0000 Author: andrew Date: Thu Sep 24 07:07:54 2020 New Revision: 366103 URL: https://svnweb.freebsd.org/changeset/base/366103 Log: Add a coherent flag on the arm64 dma map struct Use it to decide if we can skip cache management. While here remove the DMAMAP_COULD_BOUNCE flag as it's unneeded. Reviewed by: mmel Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D26494 Modified: head/sys/arm64/arm64/busdma_bounce.c Modified: head/sys/arm64/arm64/busdma_bounce.c ============================================================================== --- head/sys/arm64/arm64/busdma_bounce.c Thu Sep 24 07:03:26 2020 (r366102) +++ head/sys/arm64/arm64/busdma_bounce.c Thu Sep 24 07:07:54 2020 (r366103) @@ -135,7 +135,7 @@ struct bus_dmamap { void *callback_arg; STAILQ_ENTRY(bus_dmamap) links; u_int flags; -#define DMAMAP_COULD_BOUNCE (1 << 0) +#define DMAMAP_COHERENT (1 << 0) #define DMAMAP_FROM_DMAMEM (1 << 1) int sync_count; struct sync_list slist[]; @@ -367,8 +367,6 @@ bounce_bus_dmamap_create(bus_dma_tag_t dmat, int flags } bz = dmat->bounce_zone; - (*mapp)->flags = DMAMAP_COULD_BOUNCE; - /* * Attempt to add pages to our pool on a per-instance * basis up to a sane limit. @@ -396,10 +394,13 @@ bounce_bus_dmamap_create(bus_dma_tag_t dmat, int flags } bz->map_count++; } - if (error == 0) + if (error == 0) { dmat->map_count++; - else + if ((dmat->bounce_flags & BF_COHERENT) != 0) + (*mapp)->flags |= DMAMAP_COHERENT; + } else { free(*mapp, M_DEVBUF); + } CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d", __func__, dmat, dmat->common.flags, error); return (error); @@ -421,11 +422,8 @@ bounce_bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmam CTR3(KTR_BUSDMA, "%s: tag %p error %d", __func__, dmat, EBUSY); return (EBUSY); } - if (dmat->bounce_zone) { - KASSERT((map->flags & DMAMAP_COULD_BOUNCE) != 0, - ("%s: Bounce zone when cannot bounce", __func__)); + if (dmat->bounce_zone) dmat->bounce_zone->map_count--; - } free(map, M_DEVBUF); dmat->map_count--; CTR2(KTR_BUSDMA, "%s: tag %p error 0", __func__, dmat); @@ -490,9 +488,18 @@ bounce_bus_dmamem_alloc(bus_dma_tag_t dmat, void** vad __func__, dmat, dmat->common.flags, ENOMEM); return (ENOMEM); } - (*mapp)->flags = DMAMAP_FROM_DMAMEM; /* + * Mark the map as coherent if we used uncacheable memory or the + * tag was already marked as coherent. + */ + if (attr == VM_MEMATTR_UNCACHEABLE || + (dmat->bounce_flags & BF_COHERENT) != 0) + (*mapp)->flags |= DMAMAP_COHERENT; + + (*mapp)->flags |= DMAMAP_FROM_DMAMEM; + + /* * Allocate the buffer from the malloc(9) allocator if... * - It's small enough to fit into a single power of two sized bucket. * - The alignment is less than or equal to the maximum size @@ -760,7 +767,7 @@ bounce_bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dm sgsize = MIN(sgsize, PAGE_SIZE - (curaddr & PAGE_MASK)); curaddr = add_bounce_page(dmat, map, 0, curaddr, sgsize); - } else if ((dmat->bounce_flags & BF_COHERENT) == 0) { + } else if ((map->flags & DMAMAP_COHERENT) == 0) { if (map->sync_count > 0) sl_end = sl->paddr + sl->datacount; @@ -846,7 +853,7 @@ bounce_bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_ sgsize = MIN(sgsize, max_sgsize); curaddr = add_bounce_page(dmat, map, kvaddr, curaddr, sgsize); - } else if ((dmat->bounce_flags & BF_COHERENT) == 0) { + } else if ((map->flags & DMAMAP_COHERENT) == 0) { sgsize = MIN(sgsize, max_sgsize); if (map->sync_count > 0) { sl_pend = sl->paddr + sl->datacount; @@ -896,8 +903,6 @@ bounce_bus_dmamap_waitok(bus_dma_tag_t dmat, bus_dmama struct memdesc *mem, bus_dmamap_callback_t *callback, void *callback_arg) { - if ((map->flags & DMAMAP_COULD_BOUNCE) == 0) - return; map->mem = *mem; map->dmat = dmat; map->callback = callback; @@ -1042,7 +1047,7 @@ bounce_bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_ (void *)bpage->vaddr, bpage->datacount); if (tempvaddr != 0) pmap_quick_remove_page(tempvaddr); - if ((dmat->bounce_flags & BF_COHERENT) == 0) + if ((map->flags & DMAMAP_COHERENT) == 0) cpu_dcache_wb_range(bpage->vaddr, bpage->datacount); bpage = STAILQ_NEXT(bpage, links); @@ -1050,7 +1055,7 @@ bounce_bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_ dmat->bounce_zone->total_bounced++; } else if ((op & BUS_DMASYNC_PREREAD) != 0) { while (bpage != NULL) { - if ((dmat->bounce_flags & BF_COHERENT) == 0) + if ((map->flags & DMAMAP_COHERENT) == 0) cpu_dcache_wbinv_range(bpage->vaddr, bpage->datacount); bpage = STAILQ_NEXT(bpage, links); @@ -1059,7 +1064,7 @@ bounce_bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_ if ((op & BUS_DMASYNC_POSTREAD) != 0) { while (bpage != NULL) { - if ((dmat->bounce_flags & BF_COHERENT) == 0) + if ((map->flags & DMAMAP_COHERENT) == 0) cpu_dcache_inv_range(bpage->vaddr, bpage->datacount); tempvaddr = 0; @@ -1264,8 +1269,6 @@ add_bounce_page(bus_dma_tag_t dmat, bus_dmamap_t map, struct bounce_page *bpage; KASSERT(dmat->bounce_zone != NULL, ("no bounce zone in dma tag")); - KASSERT((map->flags & DMAMAP_COULD_BOUNCE) != 0, - ("add_bounce_page: bad map %p", map)); bz = dmat->bounce_zone; if (map->pagesneeded == 0) From owner-svn-src-head@freebsd.org Thu Sep 24 07:10:35 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5DCF43EF280; Thu, 24 Sep 2020 07:10:35 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxmQz1ql3z42H7; Thu, 24 Sep 2020 07:10:35 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 22B071E359; Thu, 24 Sep 2020 07:10:35 +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 08O7AZOK084499; Thu, 24 Sep 2020 07:10:35 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08O7AZYt084498; Thu, 24 Sep 2020 07:10:35 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202009240710.08O7AZYt084498@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 24 Sep 2020 07:10:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366104 - head/sys/modules/mrsas X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/modules/mrsas X-SVN-Commit-Revision: 366104 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 24 Sep 2020 07:10:35 -0000 Author: imp Date: Thu Sep 24 07:10:34 2020 New Revision: 366104 URL: https://svnweb.freebsd.org/changeset/base/366104 Log: Don't define _STANDALONE when building kernel modules. _STANDALONE is only for the bootloader, not kernel modules. Remove it from the build. This was harmless before, but sys/malloc.h now does different things for the standalone environment, triggering the issue. Modified: head/sys/modules/mrsas/Makefile Modified: head/sys/modules/mrsas/Makefile ============================================================================== --- head/sys/modules/mrsas/Makefile Thu Sep 24 07:07:54 2020 (r366103) +++ head/sys/modules/mrsas/Makefile Thu Sep 24 07:10:34 2020 (r366104) @@ -17,7 +17,7 @@ CFLAGS+= -fgnu89-inline TARGET_ARCH = ${MACHINE_ARCH} .if ${TARGET_ARCH} == "amd64" -CFLAGS+= -DCOMPAT_FREEBSD32 -D_STANDALONE +CFLAGS+= -DCOMPAT_FREEBSD32 .endif clean_cscope: From owner-svn-src-head@freebsd.org Thu Sep 24 07:13:14 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 649883EF1B1; Thu, 24 Sep 2020 07:13:14 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxmV224Drz42Gc; Thu, 24 Sep 2020 07:13:14 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 104101E22C; Thu, 24 Sep 2020 07:13:14 +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 08O7DD2L090224; Thu, 24 Sep 2020 07:13:13 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08O7DD3V090223; Thu, 24 Sep 2020 07:13:13 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202009240713.08O7DD3V090223@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 24 Sep 2020 07:13:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366105 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 366105 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 24 Sep 2020 07:13:14 -0000 Author: andrew Date: Thu Sep 24 07:13:13 2020 New Revision: 366105 URL: https://svnweb.freebsd.org/changeset/base/366105 Log: Ensure we always align and size arm64 busdma allocations to a cacheline This will ensure nothing modifies the cacheline while DMA is in progress so we won't need to bounce the data. Reviewed by: mmel Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D26495 Modified: head/sys/arm64/arm64/busdma_bounce.c Modified: head/sys/arm64/arm64/busdma_bounce.c ============================================================================== --- head/sys/arm64/arm64/busdma_bounce.c Thu Sep 24 07:10:34 2020 (r366104) +++ head/sys/arm64/arm64/busdma_bounce.c Thu Sep 24 07:13:13 2020 (r366105) @@ -72,6 +72,8 @@ struct bounce_zone; struct bus_dma_tag { struct bus_dma_tag_common common; + size_t alloc_size; + size_t alloc_alignment; int map_count; int bounce_flags; bus_dma_segment_t *segments; @@ -208,8 +210,22 @@ bounce_bus_dma_tag_create(bus_dma_tag_t parent, bus_si newtag->map_count = 0; newtag->segments = NULL; - if ((flags & BUS_DMA_COHERENT) != 0) + if ((flags & BUS_DMA_COHERENT) != 0) { newtag->bounce_flags |= BF_COHERENT; + newtag->alloc_alignment = newtag->common.alignment; + newtag->alloc_size = newtag->common.maxsize; + } else { + /* + * Ensure the buffer is aligned to a cacheline when allocating + * a non-coherent buffer. This is so we don't have any data + * that another CPU may be accessing around DMA buffer + * causing the cache to become dirty. + */ + newtag->alloc_alignment = MAX(newtag->common.alignment, + dcache_line_size); + newtag->alloc_size = roundup2(newtag->common.maxsize, + dcache_line_size); + } if (parent != NULL) { if ((newtag->common.filter != NULL || @@ -520,23 +536,23 @@ bounce_bus_dmamem_alloc(bus_dma_tag_t dmat, void** vad * * In the meantime warn the user if malloc gets it wrong. */ - if ((dmat->common.maxsize <= PAGE_SIZE) && - (dmat->common.alignment <= dmat->common.maxsize) && + if ((dmat->alloc_size <= PAGE_SIZE) && + (dmat->alloc_alignment <= dmat->alloc_size) && dmat->common.lowaddr >= ptoa((vm_paddr_t)Maxmem) && attr == VM_MEMATTR_DEFAULT) { - *vaddr = malloc(dmat->common.maxsize, M_DEVBUF, mflags); + *vaddr = malloc(dmat->alloc_size, M_DEVBUF, mflags); } else if (dmat->common.nsegments >= - howmany(dmat->common.maxsize, MIN(dmat->common.maxsegsz, PAGE_SIZE)) && - dmat->common.alignment <= PAGE_SIZE && + howmany(dmat->alloc_size, MIN(dmat->common.maxsegsz, PAGE_SIZE)) && + dmat->alloc_alignment <= PAGE_SIZE && (dmat->common.boundary % PAGE_SIZE) == 0) { /* Page-based multi-segment allocations allowed */ - *vaddr = (void *)kmem_alloc_attr(dmat->common.maxsize, mflags, + *vaddr = (void *)kmem_alloc_attr(dmat->alloc_size, mflags, 0ul, dmat->common.lowaddr, attr); dmat->bounce_flags |= BF_KMEM_ALLOC; } else { - *vaddr = (void *)kmem_alloc_contig(dmat->common.maxsize, mflags, - 0ul, dmat->common.lowaddr, dmat->common.alignment != 0 ? - dmat->common.alignment : 1ul, dmat->common.boundary, attr); + *vaddr = (void *)kmem_alloc_contig(dmat->alloc_size, mflags, + 0ul, dmat->common.lowaddr, dmat->alloc_alignment != 0 ? + dmat->alloc_alignment : 1ul, dmat->common.boundary, attr); dmat->bounce_flags |= BF_KMEM_ALLOC; } if (*vaddr == NULL) { @@ -544,7 +560,7 @@ bounce_bus_dmamem_alloc(bus_dma_tag_t dmat, void** vad __func__, dmat, dmat->common.flags, ENOMEM); free(*mapp, M_DEVBUF); return (ENOMEM); - } else if (vtophys(*vaddr) & (dmat->common.alignment - 1)) { + } else if (vtophys(*vaddr) & (dmat->alloc_alignment - 1)) { printf("bus_dmamem_alloc failed to align memory properly.\n"); } dmat->map_count++; @@ -571,7 +587,7 @@ bounce_bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr if ((dmat->bounce_flags & BF_KMEM_ALLOC) == 0) free(vaddr, M_DEVBUF); else - kmem_free((vm_offset_t)vaddr, dmat->common.maxsize); + kmem_free((vm_offset_t)vaddr, dmat->alloc_size); free(map, M_DEVBUF); dmat->map_count--; CTR3(KTR_BUSDMA, "%s: tag %p flags 0x%x", __func__, dmat, From owner-svn-src-head@freebsd.org Thu Sep 24 07:17:06 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 43C433EF3B5; Thu, 24 Sep 2020 07:17:06 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxmZV134vz42qC; Thu, 24 Sep 2020 07:17:06 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0316F1E36F; Thu, 24 Sep 2020 07:17:06 +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 08O7H5a2090720; Thu, 24 Sep 2020 07:17:05 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08O7H55G090719; Thu, 24 Sep 2020 07:17:05 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202009240717.08O7H55G090719@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 24 Sep 2020 07:17:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366106 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 366106 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 24 Sep 2020 07:17:06 -0000 Author: andrew Date: Thu Sep 24 07:17:05 2020 New Revision: 366106 URL: https://svnweb.freebsd.org/changeset/base/366106 Log: Bounce in more cases in the arm64 busdma We need to use a bounce buffer when the memory we are operating on is not aligned to a cacheline, and not aligned to the maps alignment. The former is to stop other threads from dirtying the cacheline while we are performing DMA operations with it. The latter is to check memory passed in by a driver is correctly aligned for the device. Reviewed by: mmel Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D26496 Modified: head/sys/arm64/arm64/busdma_bounce.c Modified: head/sys/arm64/arm64/busdma_bounce.c ============================================================================== --- head/sys/arm64/arm64/busdma_bounce.c Thu Sep 24 07:13:13 2020 (r366105) +++ head/sys/arm64/arm64/busdma_bounce.c Thu Sep 24 07:17:05 2020 (r366106) @@ -139,6 +139,7 @@ struct bus_dmamap { u_int flags; #define DMAMAP_COHERENT (1 << 0) #define DMAMAP_FROM_DMAMEM (1 << 1) +#define DMAMAP_MBUF (1 << 2) int sync_count; struct sync_list slist[]; }; @@ -155,8 +156,8 @@ static bus_addr_t add_bounce_page(bus_dma_tag_t dmat, vm_offset_t vaddr, bus_addr_t addr, bus_size_t size); static void free_bounce_page(bus_dma_tag_t dmat, struct bounce_page *bpage); int run_filter(bus_dma_tag_t dmat, bus_addr_t paddr); -static bool _bus_dmamap_pagesneeded(bus_dma_tag_t dmat, vm_paddr_t buf, - bus_size_t buflen, int *pagesneeded); +static bool _bus_dmamap_pagesneeded(bus_dma_tag_t dmat, bus_dmamap_t map, + vm_paddr_t buf, bus_size_t buflen, int *pagesneeded); static void _bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap_t map, pmap_t pmap, void *buf, bus_size_t buflen, int flags); static void _bus_dmamap_count_phys(bus_dma_tag_t dmat, bus_dmamap_t map, @@ -164,20 +165,70 @@ static void _bus_dmamap_count_phys(bus_dma_tag_t dmat, static int _bus_dmamap_reserve_pages(bus_dma_tag_t dmat, bus_dmamap_t map, int flags); +/* + * Return true if the DMA should bounce because the start or end does not fall + * on a cacheline boundary (which would require a partial cacheline flush). + * COHERENT memory doesn't trigger cacheline flushes. Memory allocated by + * bus_dmamem_alloc() is always aligned to cacheline boundaries, and there's a + * strict rule that such memory cannot be accessed by the CPU while DMA is in + * progress (or by multiple DMA engines at once), so that it's always safe to do + * full cacheline flushes even if that affects memory outside the range of a + * given DMA operation that doesn't involve the full allocated buffer. If we're + * mapping an mbuf, that follows the same rules as a buffer we allocated. + */ static bool -might_bounce(bus_dma_tag_t dmat) +cacheline_bounce(bus_dma_tag_t dmat, bus_dmamap_t map, bus_addr_t paddr, + bus_size_t size) { +#define DMAMAP_CACHELINE_FLAGS \ + (DMAMAP_FROM_DMAMEM | DMAMAP_COHERENT | DMAMAP_MBUF) + if ((dmat->bounce_flags & BF_COHERENT) != 0) + return (false); + if (map != NULL && (map->flags & DMAMAP_CACHELINE_FLAGS) != 0) + return (false); + return (((paddr | size) & (dcache_line_size - 1)) != 0); +#undef DMAMAP_CACHELINE_FLAGS +} + +/* + * Return true if the given address does not fall on the alignment boundary. + */ +static bool +alignment_bounce(bus_dma_tag_t dmat, bus_addr_t addr) +{ + + return ((addr & (dmat->common.alignment - 1)) != 0); +} + +static bool +might_bounce(bus_dma_tag_t dmat, bus_dmamap_t map, bus_addr_t paddr, + bus_size_t size) +{ + if ((dmat->bounce_flags & BF_COULD_BOUNCE) != 0) return (true); + if (cacheline_bounce(dmat, map, paddr, size)) + return (true); + + if (alignment_bounce(dmat, paddr)) + return (true); + return (false); } static bool -must_bounce(bus_dma_tag_t dmat, bus_addr_t paddr) +must_bounce(bus_dma_tag_t dmat, bus_dmamap_t map, bus_addr_t paddr, + bus_size_t size) { + if (cacheline_bounce(dmat, map, paddr, size)) + return (true); + + if (alignment_bounce(dmat, paddr)) + return (true); + if ((dmat->bounce_flags & BF_COULD_BOUNCE) != 0 && bus_dma_run_filter(&dmat->common, paddr)) return (true); @@ -240,8 +291,7 @@ bounce_bus_dma_tag_create(bus_dma_tag_t parent, bus_si newtag->common.alignment > 1) newtag->bounce_flags |= BF_COULD_BOUNCE; - if (((newtag->bounce_flags & BF_COULD_BOUNCE) != 0) && - (flags & BUS_DMA_ALLOCNOW) != 0) { + if ((flags & BUS_DMA_ALLOCNOW) != 0) { struct bounce_zone *bz; /* Must bounce */ @@ -315,9 +365,9 @@ static bool bounce_bus_dma_id_mapped(bus_dma_tag_t dmat, vm_paddr_t buf, bus_size_t buflen) { - if (!might_bounce(dmat)) + if (!might_bounce(dmat, NULL, buf, buflen)) return (true); - return (!_bus_dmamap_pagesneeded(dmat, buf, buflen, NULL)); + return (!_bus_dmamap_pagesneeded(dmat, NULL, buf, buflen, NULL)); } static bus_dmamap_t @@ -373,43 +423,39 @@ bounce_bus_dmamap_create(bus_dma_tag_t dmat, int flags * exclusion region, a data alignment that is stricter than 1, and/or * an active address boundary. */ - if (dmat->bounce_flags & BF_COULD_BOUNCE) { - /* Must bounce */ - if (dmat->bounce_zone == NULL) { - if ((error = alloc_bounce_zone(dmat)) != 0) { - free(*mapp, M_DEVBUF); - return (error); - } + if (dmat->bounce_zone == NULL) { + if ((error = alloc_bounce_zone(dmat)) != 0) { + free(*mapp, M_DEVBUF); + return (error); } - bz = dmat->bounce_zone; + } + bz = dmat->bounce_zone; - /* - * Attempt to add pages to our pool on a per-instance - * basis up to a sane limit. - */ - if (dmat->common.alignment > 1) - maxpages = MAX_BPAGES; - else - maxpages = MIN(MAX_BPAGES, Maxmem - - atop(dmat->common.lowaddr)); - if ((dmat->bounce_flags & BF_MIN_ALLOC_COMP) == 0 || - (bz->map_count > 0 && bz->total_bpages < maxpages)) { - pages = MAX(atop(dmat->common.maxsize), 1); - pages = MIN(maxpages - bz->total_bpages, pages); - pages = MAX(pages, 1); - if (alloc_bounce_pages(dmat, pages) < pages) - error = ENOMEM; - if ((dmat->bounce_flags & BF_MIN_ALLOC_COMP) - == 0) { - if (error == 0) { - dmat->bounce_flags |= - BF_MIN_ALLOC_COMP; - } - } else - error = 0; - } - bz->map_count++; + /* + * Attempt to add pages to our pool on a per-instance + * basis up to a sane limit. + */ + if (dmat->common.alignment > 1) + maxpages = MAX_BPAGES; + else + maxpages = MIN(MAX_BPAGES, Maxmem - + atop(dmat->common.lowaddr)); + if ((dmat->bounce_flags & BF_MIN_ALLOC_COMP) == 0 || + (bz->map_count > 0 && bz->total_bpages < maxpages)) { + pages = MAX(atop(dmat->common.maxsize), 1); + pages = MIN(maxpages - bz->total_bpages, pages); + pages = MAX(pages, 1); + if (alloc_bounce_pages(dmat, pages) < pages) + error = ENOMEM; + if ((dmat->bounce_flags & BF_MIN_ALLOC_COMP) == 0) { + if (error == 0) { + dmat->bounce_flags |= BF_MIN_ALLOC_COMP; + } + } else + error = 0; } + bz->map_count++; + if (error == 0) { dmat->map_count++; if ((dmat->bounce_flags & BF_COHERENT) != 0) @@ -595,8 +641,8 @@ bounce_bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr } static bool -_bus_dmamap_pagesneeded(bus_dma_tag_t dmat, vm_paddr_t buf, bus_size_t buflen, - int *pagesneeded) +_bus_dmamap_pagesneeded(bus_dma_tag_t dmat, bus_dmamap_t map, vm_paddr_t buf, + bus_size_t buflen, int *pagesneeded) { bus_addr_t curaddr; bus_size_t sgsize; @@ -610,7 +656,7 @@ _bus_dmamap_pagesneeded(bus_dma_tag_t dmat, vm_paddr_t curaddr = buf; while (buflen != 0) { sgsize = MIN(buflen, dmat->common.maxsegsz); - if (must_bounce(dmat, curaddr)) { + if (must_bounce(dmat, map, curaddr, sgsize)) { sgsize = MIN(sgsize, PAGE_SIZE - (curaddr & PAGE_MASK)); if (pagesneeded == NULL) @@ -632,7 +678,8 @@ _bus_dmamap_count_phys(bus_dma_tag_t dmat, bus_dmamap_ { if (map->pagesneeded == 0) { - _bus_dmamap_pagesneeded(dmat, buf, buflen, &map->pagesneeded); + _bus_dmamap_pagesneeded(dmat, map, buf, buflen, + &map->pagesneeded); CTR1(KTR_BUSDMA, "pagesneeded= %d\n", map->pagesneeded); } } @@ -666,7 +713,9 @@ _bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap paddr = pmap_kextract(vaddr); else paddr = pmap_extract(pmap, vaddr); - if (must_bounce(dmat, paddr)) { + if (must_bounce(dmat, map, paddr, + min(vendaddr - vaddr, (PAGE_SIZE - ((vm_offset_t)vaddr & + PAGE_MASK)))) != 0) { sg_len = roundup2(sg_len, dmat->common.alignment); map->pagesneeded++; @@ -764,7 +813,7 @@ bounce_bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dm if (segs == NULL) segs = dmat->segments; - if (might_bounce(dmat)) { + if (might_bounce(dmat, map, (bus_addr_t)buf, buflen)) { _bus_dmamap_count_phys(dmat, map, buf, buflen, flags); if (map->pagesneeded != 0) { error = _bus_dmamap_reserve_pages(dmat, map, flags); @@ -779,7 +828,8 @@ bounce_bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dm while (buflen > 0) { curaddr = buf; sgsize = MIN(buflen, dmat->common.maxsegsz); - if (map->pagesneeded != 0 && must_bounce(dmat, curaddr)) { + if (map->pagesneeded != 0 && + must_bounce(dmat, map, curaddr, sgsize)) { sgsize = MIN(sgsize, PAGE_SIZE - (curaddr & PAGE_MASK)); curaddr = add_bounce_page(dmat, map, 0, curaddr, sgsize); @@ -833,7 +883,10 @@ bounce_bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_ if (segs == NULL) segs = dmat->segments; - if (might_bounce(dmat)) { + if (flags & BUS_DMA_LOAD_MBUF) + map->flags |= DMAMAP_MBUF; + + if (might_bounce(dmat, map, (bus_addr_t)buf, buflen)) { _bus_dmamap_count_pages(dmat, map, pmap, buf, buflen, flags); if (map->pagesneeded != 0) { error = _bus_dmamap_reserve_pages(dmat, map, flags); @@ -864,7 +917,8 @@ bounce_bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_ */ max_sgsize = MIN(buflen, dmat->common.maxsegsz); sgsize = PAGE_SIZE - (curaddr & PAGE_MASK); - if (map->pagesneeded != 0 && must_bounce(dmat, curaddr)) { + if (map->pagesneeded != 0 && + must_bounce(dmat, map, curaddr, sgsize)) { sgsize = roundup2(sgsize, dmat->common.alignment); sgsize = MIN(sgsize, max_sgsize); curaddr = add_bounce_page(dmat, map, kvaddr, curaddr, @@ -949,6 +1003,7 @@ bounce_bus_dmamap_unload(bus_dma_tag_t dmat, bus_dmama } map->sync_count = 0; + map->flags &= ~DMAMAP_MBUF; } static void From owner-svn-src-head@freebsd.org Thu Sep 24 08:05:48 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DA0993F0330; Thu, 24 Sep 2020 08:05:48 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: from mail-ed1-f68.google.com (mail-ed1-f68.google.com [209.85.208.68]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bxnfg69tWz44WV; Thu, 24 Sep 2020 08:05:47 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: by mail-ed1-f68.google.com with SMTP id k14so2472459edo.1; Thu, 24 Sep 2020 01:05:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=5kLXmMpBqjDJNvFomUYw7gRUMZqo2eObs+Fl8Z1Z6QM=; b=MPYEzR21OP93iTwh2bhHqDKLF3+trDMcR5z119GNpPmsXO/QZfXfF5k9kXmI34Pvcd BjsAp2Ma8WM3NfGnLv46bSRKBfPx8igCaUlWQD7IIvHFDJEVia8VwklmLhW50Hsb4P/T OeR52LGy/jGkdkQEWtJNfdOamsq3omGrIxLMHrzkBenXkCLQUEwwmANGudWGpYkPJ3IV 0KmTsrKjcnkM3yuVpSeHKVYk1kuI5cfjN6jarqEjTpZcaZfbkbyua7UWYgDSJkGWzOyS dbwVsCSTh6t4AxE63GEhiO3McevYBdZJjXgRVSjhXDNvSwjCxLH7zuppddB9PhU3ukxw RhBw== X-Gm-Message-State: AOAM531KEVwJfQ5MNpxVjDh30pZFk2SmJI2ER2Y3HflHqt1yHwOaiRoR WIzigcUL6u2oz2izY5jXhX/CUhE2VgkJ8Q== X-Google-Smtp-Source: ABdhPJyGtNw3X68YpzlLBcFk4wTsiMtMZvG4z+UhRE1dOdsOI8znkxDvl+K1a6baMDLWSvSnLlk/SA== X-Received: by 2002:a05:6402:d09:: with SMTP id eb9mr3257291edb.219.1600934745653; Thu, 24 Sep 2020 01:05:45 -0700 (PDT) Received: from ?IPv6:2a02:8109:98c0:1bc0:5e5f:67ff:fef4:ffd8? ([2a02:8109:98c0:1bc0:5e5f:67ff:fef4:ffd8]) by smtp.gmail.com with ESMTPSA id jr9sm1757073ejb.87.2020.09.24.01.05.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 24 Sep 2020 01:05:44 -0700 (PDT) Subject: Re: svn commit: r366098 - head/usr.sbin/daemon To: Maxim Sobolev , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202009240244.08O2ixw5023405@repo.freebsd.org> From: Mateusz Piotrowski <0mp@FreeBSD.org> Message-ID: <4ff940ab-502b-b144-6486-48c889bc3d0d@FreeBSD.org> Date: Thu, 24 Sep 2020 10:05:43 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.3.0 MIME-Version: 1.0 In-Reply-To: <202009240244.08O2ixw5023405@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Rspamd-Queue-Id: 4Bxnfg69tWz44WV X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mpp302@gmail.com designates 209.85.208.68 as permitted sender) smtp.mailfrom=mpp302@gmail.com X-Spamd-Result: default: False [-2.56 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[FreeBSD.org]; NEURAL_HAM_LONG(-1.01)[-1.011]; TO_DN_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM_MEDIUM(-0.85)[-0.853]; NEURAL_HAM_SHORT(-0.70)[-0.700]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.68:from]; FORGED_SENDER(0.30)[0mp@FreeBSD.org,mpp302@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.68:from]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; MIME_TRACE(0.00)[0:+]; FROM_NEQ_ENVFROM(0.00)[0mp@FreeBSD.org,mpp302@gmail.com]; MAILMAN_DEST(0.00)[svn-src-head,svn-src-all] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 24 Sep 2020 08:05:48 -0000 Hi, On 9/24/20 4:44 AM, Maxim Sobolev wrote: > Author: sobomax > Date: Thu Sep 24 02:44:58 2020 > New Revision: 366098 > URL: https://svnweb.freebsd.org/changeset/base/366098 > > Log: > dd a new option (-H) to daemon(8) to catch SIGHUP and re-open output_file file when > received. ... > Modified: head/usr.sbin/daemon/daemon.8 > ============================================================================== > --- head/usr.sbin/daemon/daemon.8 Wed Sep 23 23:56:49 2020 (r366097) > +++ head/usr.sbin/daemon/daemon.8 Thu Sep 24 02:44:58 2020 (r366098) ... > @@ -68,6 +68,14 @@ or syslog output, the standard file descriptors are fi > .Pa /dev/null , > then stdout and/or stderr is redirected to a file or to syslog as > specified by the other options. > +.It Fl H > +Close > +.Pa output_file > +and re-open it when signal SIGHUP is received, for interoperability with > +.Xr newsyslog 1 > +and similar log rotation / archival mechanisms. If > +.Fa o Fa should be Fl Cheers, Mateusz From owner-svn-src-head@freebsd.org Thu Sep 24 08:08:51 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E3FFE3F0718; Thu, 24 Sep 2020 08:08:51 +0000 (UTC) (envelope-from se@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxnkC5kzFz455H; Thu, 24 Sep 2020 08:08:51 +0000 (UTC) (envelope-from se@freebsd.org) Received: from Stefans-MBP-WLAN.fritz.box (p200300cd5f30c8003c8f9e409704137a.dip0.t-ipconnect.de [IPv6:2003:cd:5f30:c800:3c8f:9e40:9704:137a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: se/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 831042E9F1; Thu, 24 Sep 2020 08:08:50 +0000 (UTC) (envelope-from se@freebsd.org) To: Warner Losh Cc: "Rodney W. Grimes" , Kyle Evans , Alan Somers , Mateusz Guzik , src-committers , svn-src-all , svn-src-head References: <202009231656.08NGujEs042900@gndrsh.dnsmgr.net> From: Stefan Esser Subject: Re: svn commit: r365643 - head/bin/cp Message-ID: <545173d1-a6e1-333a-11c1-a791bbeadd76@freebsd.org> Date: Thu, 24 Sep 2020 10:08:48 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.2.2 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="BsZ2IiQxZPtrxLFJWLaISIeVd90EgEaBf" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 24 Sep 2020 08:08:52 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --BsZ2IiQxZPtrxLFJWLaISIeVd90EgEaBf Content-Type: multipart/mixed; boundary="8gTPxExLgn8jrNl2Nh6PyVEjbC4ReCbTJ"; protected-headers="v1" From: Stefan Esser To: Warner Losh Cc: "Rodney W. Grimes" , Kyle Evans , Alan Somers , Mateusz Guzik , src-committers , svn-src-all , svn-src-head Message-ID: <545173d1-a6e1-333a-11c1-a791bbeadd76@freebsd.org> Subject: Re: svn commit: r365643 - head/bin/cp References: <202009231656.08NGujEs042900@gndrsh.dnsmgr.net> In-Reply-To: --8gTPxExLgn8jrNl2Nh6PyVEjbC4ReCbTJ Content-Type: multipart/mixed; boundary="------------F586FD52C2AD12104A5C5B53" Content-Language: en-US This is a multi-part message in MIME format. --------------F586FD52C2AD12104A5C5B53 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Am 24.09.20 um 08:54 schrieb Warner Losh: >=20 >=20 > On Thu, Sep 24, 2020 at 12:41 AM Stefan Esser > wrote: >=20 > Am 23.09.20 um 19:23 schrieb Warner Losh> But for this issue, we're= not > mounting devfs early enough.=C2=A0 We should > > fix that. Removing /dev/null from the boot process likely is > never going > > to happen because we use it all over the place to discard output= =2E.. > > There's ~200 instances of it in the boot rc scripts, so getting > rid of > > it there would also be quite the effort, with the same question.= >=20 > Removal of /dev/null from rc.d scripts should be quite simple, > since most cases could just use ">-" (close file descriptor) > instead. Other usage could be substituted with ":>" followed > by chown. >=20 >=20 > So closing fd1 and fd2 doesn't cause them to be available for these=20 > programs to get as an fd on open, causing other issues? >=20 > But >- isn't documented in sh(1) as doing the close thing. On a whim I = > did the following: > $ echo fred >- > $ ls -last ./- > 4 -rw-r--r-- =C2=A01 imp =C2=A0imp =C2=A05 Sep 24 00:50 ./- > $ cat ./- > fred > $ > which suggests maybe you now have a lot of files named - instead... Yes, sorry, please ignore what I wrote - I was thinking of ">&-" of course, but that is not gracefully accepted by many commands (they are aborted when trying to write to the closed file descriptor). I had thought about piping into a command that ignores STDIN, first, e.g. "| :", but that generates a SIGPIPE when trying to flush the FILE buffer (i.e. after 4 KB, which might be sufficient for most cases, but it is not a general solution). A program that reads from STDIN and generates no output could be used, though, e.g. "| sed d". But this would cause lots of extra forked processes and increase the start-up time and is not acceptable. > but e.g. rc.d/syscons > uses ${kbddev} (i.e. /dev/ttyv0) and rc.d/zvol performs swapon > on /dev/zvol/${name}, rc.d/random uses /dev/random and so on. >=20 > So those interactions should be disaled by rc variables...=C2=A0 Or we = should=20 > be failing the operation... Going multi-user should not be stopped by any of the rc scripts failing due to lack of /dev. But since most developers will only test with /dev available, there is a risk that changes to rc files will not gracefully handle a missing /dev. > But those further references to /dev nodes will in general be > NOPs if /dev is not available (some test for existence of the > node they rely on, other just fail trying to access them, but > without negative effect on going multi-user). >=20 >=20 > Yea, that's more minor, but if /dev/ isn't there, they likely should=20 > fail, or shouldn't proceed... But in a way that allows the rest of the = > rc scripts to continue... Since the issue of no devfs mounted it not typical, tests will be required to prevent regressions. If a failure in such a case stops the multi-user start-up, then it will most likely be in situations where there is no good way to provide diagnostics (e.g. no console that works for user land programs, no known writable file system locations, ...). Regards, STefan --------------F586FD52C2AD12104A5C5B53-- --8gTPxExLgn8jrNl2Nh6PyVEjbC4ReCbTJ-- --BsZ2IiQxZPtrxLFJWLaISIeVd90EgEaBf Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsB5BAABCAAjFiEEo3HqZZwL7MgrcVMTR+u171r99UQFAl9sVBAFAwAAAAAACgkQR+u171r99URn KQgAnxgH0BuFlfh3iXOnuWhFGLpAk8fwQ6rU3sxp1hzgeFsUvoOuHtQKZlNIYuwP8Gox3Zuhok7R bFDq2Qe7Dy1ZI9yvfnvi05DwBvHVeXL+kjcNkOF6eMuQ11UwVeswXFq5ioOfE3c9d0OclBbFhcex Dwl2AQGuj6AnAaBP666XsDUst5to5T9vjUr9kPBnEmQv5ltb/vEcL2/7nvNQI+PZc2QDevH2ywto rfnJoW0Tmg2d9+xTxGBCJt7LymtLvTj0VQyoT4nPVCLwQsRzdnzQc5j6Yf+DW7dt9FPQfO6IKkSE NY/5LyUCvffPYPdkAcXcEXzJMefEcwRB1DPuPkLFCQ== =emwY -----END PGP SIGNATURE----- --BsZ2IiQxZPtrxLFJWLaISIeVd90EgEaBf-- From owner-svn-src-head@freebsd.org Thu Sep 24 08:40:33 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 739BC3F0D9A; Thu, 24 Sep 2020 08:40:33 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxpQn2P0Tz46GC; Thu, 24 Sep 2020 08:40:33 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 35B3E1F396; Thu, 24 Sep 2020 08:40:33 +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 08O8eX7Q040220; Thu, 24 Sep 2020 08:40:33 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08O8eXtk040219; Thu, 24 Sep 2020 08:40:33 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <202009240840.08O8eXtk040219@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Thu, 24 Sep 2020 08:40:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366107 - head/sys/x86/include X-SVN-Group: head X-SVN-Commit-Author: mmel X-SVN-Commit-Paths: head/sys/x86/include X-SVN-Commit-Revision: 366107 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 24 Sep 2020 08:40:33 -0000 Author: mmel Date: Thu Sep 24 08:40:32 2020 New Revision: 366107 URL: https://svnweb.freebsd.org/changeset/base/366107 Log: Add missing declarations of 64-bit variants of bus_peek/bus_poke on amd64. It fixes GENERIC-KCSAN build. Reported by: rpokala MFC after: 1 month MFC with: r365899 Modified: head/sys/x86/include/bus.h Modified: head/sys/x86/include/bus.h ============================================================================== --- head/sys/x86/include/bus.h Thu Sep 24 07:17:05 2020 (r366106) +++ head/sys/x86/include/bus.h Thu Sep 24 08:40:32 2020 (r366107) @@ -1102,6 +1102,9 @@ bus_space_barrier(bus_space_tag_t tag __unused, bus_sp BUS_PEEK_FUNC(1, uint8_t) BUS_PEEK_FUNC(2, uint16_t) BUS_PEEK_FUNC(4, uint32_t) +#ifdef __amd64__ +BUS_PEEK_FUNC(8, uint64_t) +#endif #define BUS_POKE_FUNC(width, type) \ static inline int \ @@ -1114,6 +1117,9 @@ BUS_PEEK_FUNC(4, uint32_t) BUS_POKE_FUNC(1, uint8_t) BUS_POKE_FUNC(2, uint16_t) BUS_POKE_FUNC(4, uint32_t) +#ifdef __amd64__ +BUS_POKE_FUNC(8, uint64_t) +#endif #endif /* KCSAN && !KCSAN_RUNTIME */ From owner-svn-src-head@freebsd.org Thu Sep 24 08:51:25 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 00B363F0C76; Thu, 24 Sep 2020 08:51:25 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxpgJ48Srz470V; Thu, 24 Sep 2020 08:51:24 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 242911F255; Thu, 24 Sep 2020 08:51:24 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08O8pOwe047988; Thu, 24 Sep 2020 08:51:24 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08O8pOXq047987; Thu, 24 Sep 2020 08:51:24 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202009240851.08O8pOXq047987@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Thu, 24 Sep 2020 08:51:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366108 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 366108 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 24 Sep 2020 08:51:25 -0000 Author: lwhsu Date: Thu Sep 24 08:51:23 2020 New Revision: 366108 URL: https://svnweb.freebsd.org/changeset/base/366108 Log: Regen after r365903 Sponsored by: The FreeBSD Foundation Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Thu Sep 24 08:40:32 2020 (r366107) +++ head/share/man/man5/src.conf.5 Thu Sep 24 08:51:23 2020 (r366108) @@ -987,8 +987,8 @@ Enable building with support for verification based on certificates obtained from UEFI. .Pp .It Va WITH_LOADER_FIREWIRE -Enable firewire support in /boot/loader on x86. This option is a nop -on all other platforms. +Enable firewire support in /boot/loader on x86. +This option is a nop on all other platforms. .It Va WITHOUT_LOADER_GELI Disable inclusion of GELI crypto support in the boot chain binaries. .Pp @@ -1033,7 +1033,6 @@ arm/armv6, arm/armv7, mips/mips, mips/mips64, powerpc/ Set to build with extra verbose debugging in the loader. May explode already nearly too large loader over the limit. Use with care. - .It Va WITH_LOADER_VERIEXEC Enable building .Xr loader 8 @@ -1270,7 +1269,6 @@ This is a default setting on arm/armv6, arm/armv7, mips/mips, mips/mips64, powerpc/powerpc, riscv/riscv64 and riscv/riscv64sf. .It Va WITH_NVME Set to build nvme related tools and kernel modules. - .Pp This is a default setting on amd64/amd64, arm64/aarch64, i386/i386 and powerpc/powerpc64. From owner-svn-src-head@freebsd.org Thu Sep 24 09:03:33 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DAFFB3F1800; Thu, 24 Sep 2020 09:03:33 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxpxJ6h6Rz49BT; Thu, 24 Sep 2020 09:03:32 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: by mail-wr1-x443.google.com with SMTP id z1so2942037wrt.3; Thu, 24 Sep 2020 02:03:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:reply-to:subject:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Nf5kL0mERAHa0GP0mWJ54erOiEyuJEHHwOHQGpeCFZA=; b=GrsrDYvyFCAWIalyJdTubbPhTYoo+uKo9yiYwm5MILYimvNeMveBOjZBVWIgQ5gPoF zEsfkGvv6q6rlH6nwTk4kXExS6DRXoWRRflG4MjRn10tBGi+b4+umgMv7U8JaQlf19BP kFV9rM5s8mve0UBbhpmK794GG+6QehAYmh4LmhyFeLw1QD5UDstV1pzau1aSvdRxtN9Z 7Vi2Ctljz8rZJ/FHlzJF3hiPadu2o/t//bnR97fZVb0RsO2Ho9WzdwBW+urtY/GRSAY0 NCqdo5q8DwyPxj/Nt33WLQ9OU8UU0UzCtHJwabXEOHjVBO9M5kVHGkFk3terJILUahRQ hfJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:reply-to:subject:to:references :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=Nf5kL0mERAHa0GP0mWJ54erOiEyuJEHHwOHQGpeCFZA=; b=axTisyuuF5L9yGAayS25T2RrZfqgRzo52EFOZ4RddbR6fr0zgBGvc6qLVUCsYJ4UpE OrPnsobzFGJDaAhvy3sTaiHFK6ytIW2LXNpXDqQAfGjzg5wzXov3uuw717z5Zalh5vO8 qcZul1eJGonILugbcMFQTLwQjNju4CYNGRun8w8NuLUgHWN0xW0/Z/K+QQNcnqEgtmXQ oao74RqAOMtBKfOnA/hKKfyUjiwESQj4MbFHwYqmhSi+AojT0NL0xnK7bLuXIK/4YvDm 6Q80jAO3dlE0pPByEWfsnRAhbP8S4OAecP4Y7WBxSitHZt/j8SQ8F4u6/zl5MOJ80Yj9 6Y0A== X-Gm-Message-State: AOAM532lJcADpaLpPUFCnX3gIt4BDlsdP47azPSpyzSrK8Ghsy47Chcv VLr/Cd36N3ct9Wo5PAcZjkXqEvupE0E= X-Google-Smtp-Source: ABdhPJwU12opGVZeN/UBlCPuwZgP5/OnxbXEbzlRf/3LstSsHAeNhZFvUdsHc+AvC0Gnu8SX9WzDJw== X-Received: by 2002:a5d:69c9:: with SMTP id s9mr3919016wrw.348.1600938210442; Thu, 24 Sep 2020 02:03:30 -0700 (PDT) Received: from [88.208.79.100] (halouny.humusoft.cz. [88.208.79.100]) by smtp.gmail.com with ESMTPSA id u186sm2630330wmu.34.2020.09.24.02.03.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 24 Sep 2020 02:03:29 -0700 (PDT) Sender: Michal Meloun From: Michal Meloun X-Google-Original-From: Michal Meloun Reply-To: mmel@freebsd.org Subject: Re: svn commit: r365899 - in head: share/man/man9 sys/arm/include sys/arm64/arm64 sys/arm64/include sys/kern sys/mips/include sys/powerpc/include sys/riscv/include sys/sys sys/tools sys/x86/include To: Ravi Pokala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202009191106.08JB6fE9010167@repo.freebsd.org> <4D257266-3703-4513-9301-33E03F9FF9BE@panasas.com> Message-ID: <302b7d21-8712-ad5e-a46d-1b38e4b14194@freebsd.org> Date: Thu, 24 Sep 2020 11:03:31 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.2.2 MIME-Version: 1.0 In-Reply-To: <4D257266-3703-4513-9301-33E03F9FF9BE@panasas.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4BxpxJ6h6Rz49BT X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=GrsrDYvy; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of melounmichal@gmail.com designates 2a00:1450:4864:20::443 as permitted sender) smtp.mailfrom=melounmichal@gmail.com X-Spamd-Result: default: False [-2.11 / 15.00]; HAS_REPLYTO(0.00)[mmel@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-0.15)[-0.152]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.93)[-0.927]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.03)[-1.028]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; MID_RHS_MATCH_TO(1.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::443:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[svn-src-head,svn-src-all] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 24 Sep 2020 09:03:33 -0000 On 22.09.2020 7:18, Ravi Pokala wrote: > This breaks amd64.GENERIC-KCSAN: I’m sorry, seems that I forgotten to run GENERIC-KCSAN build additionally to universe build also for the final version of this change. Thanks for report and sorry for troubles. Fixed in r366107. Michal > ================================================================ > ${SRCTOP}/sys/kern/subr_csan.c:895:1: error: implicit declaration of function 'bus_space_peek_8' is invalid in C99 [-Werror,-Wimplicit-function-declaration] > CSAN_BUS_PEEK_FUNC(8, uint64_t) > ^ > ${SRCTOP}/sys/kern/subr_csan.c:888:11: note: expanded from macro 'CSAN_BUS_PEEK_FUNC' > return (bus_space_peek_##width(tag, hnd, offset, value)); \ > ^ > :56:1: note: expanded from here > bus_space_peek_8 > ^ > ${SRCTOP}/sys/kern/subr_csan.c:909:1: error: implicit declaration of function 'bus_space_poke_8' is invalid in C99 [-Werror,-Wimplicit-function-declaration] > CSAN_BUS_POKE_FUNC(8, uint64_t) > ^ > ${SRCTOP}/sys/kern/subr_csan.c:902:11: note: expanded from macro 'CSAN_BUS_POKE_FUNC' > return (bus_space_poke_##width(tag, hnd, offset, value)); \ > ^ > :64:1: note: expanded from here > bus_space_poke_8 > ^ > 2 errors generated. > --- subr_csan.o --- > *** [subr_csan.o] Error code 1 > ================================================================ > > Thanks, > > Ravi (rpokala@) > > -----Original Message----- > From: on behalf of Michal Meloun > Date: 2020-09-19, Saturday at 04:06 > To: , , > Subject: svn commit: r365899 - in head: share/man/man9 sys/arm/include sys/arm64/arm64 sys/arm64/include sys/kern sys/mips/include sys/powerpc/include sys/riscv/include sys/sys sys/tools sys/x86/include > > Author: mmel > Date: Sat Sep 19 11:06:41 2020 > New Revision: 365899 > URL: https://svnweb.freebsd.org/changeset/base/365899 > > Log: > Add NetBSD compatible bus_space_peek_N() and bus_space_poke_N() functions. > One problem with the bus_space_read_N() and bus_space_write_N() family of > functions is that they provide no protection against exceptions which can > occur when no physical hardware or device responds to the read or write > cycles. In such a situation, the system typically would panic due to a > kernel-mode bus error. The bus_space_peek_N() and bus_space_poke_N() family > of functions provide a mechanism to handle these exceptions gracefully > without the risk of crashing the system. > > Typical example is access to PCI(e) configuration space in bus enumeration > function on badly implemented PCI(e) root complexes (RK3399 or Neoverse > N1 N1SDP and/or access to PCI(e) register when device is in deep sleep state. > > This commit adds a real implementation for arm64 only. The remaining > architectures have bus_space_peek()/bus_space_poke() emulated by using > bus_space_read()/bus_space_write() (without exception handling). > > MFC after: 1 month > Reviewed by: kib > Differential Revision: https://reviews.freebsd.org/D25371 > > Modified: > head/share/man/man9/bus_space.9 > head/sys/arm/include/bus.h > head/sys/arm64/arm64/bus_machdep.c > head/sys/arm64/arm64/bus_space_asm.S > head/sys/arm64/arm64/trap.c > head/sys/arm64/include/bus.h > head/sys/arm64/include/md_var.h > head/sys/kern/subr_csan.c > head/sys/mips/include/bus.h > head/sys/powerpc/include/bus.h > head/sys/riscv/include/bus.h > head/sys/sys/_cscan_bus.h > head/sys/sys/bus.h > head/sys/tools/bus_macro.sh > head/sys/x86/include/bus.h > > Modified: head/share/man/man9/bus_space.9 > ============================================================================== > --- head/share/man/man9/bus_space.9 Sat Sep 19 02:15:56 2020 (r365898) > +++ head/share/man/man9/bus_space.9 Sat Sep 19 11:06:41 2020 (r365899) > @@ -52,7 +52,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd January 15, 2017 > +.Dd July 7, 2020 > .Dt BUS_SPACE 9 > .Os > .Sh NAME > @@ -68,6 +68,14 @@ > .Nm bus_space_copy_region_stream_8 , > .Nm bus_space_free , > .Nm bus_space_map , > +.Nm bus_space_peek_1 , > +.Nm bus_space_peek_2 , > +.Nm bus_space_peek_4 , > +.Nm bus_space_peek_8 , > +.Nm bus_space_poke_1 , > +.Nm bus_space_poke_2 , > +.Nm bus_space_poke_4 , > +.Nm bus_space_poke_8 , > .Nm bus_space_read_1 , > .Nm bus_space_read_2 , > .Nm bus_space_read_4 , > @@ -161,6 +169,46 @@ > .Fo bus_space_free > .Fa "bus_space_tag_t space" "bus_space_handle_t handle" "bus_size_t size" > .Fc > +.Ft int > +.Fo bus_space_peek_1 > +.Fa "bus_space_tag_t space" "bus_space_handle_t handle" "bus_size_t offset" > +.Fa "uint8_t *datap" > +.Fc > +.Ft int > +.Fo bus_space_peek_2 > +.Fa "bus_space_tag_t space" "bus_space_handle_t handle" "bus_size_t offset" > +.Fa "uint8_t *datap" > +.Fc > +.Ft int > +.Fo bus_space_peek_4 > +.Fa "bus_space_tag_t space" "bus_space_handle_t handle" "bus_size_t offset" > +.Fa "uint8_t *datap" > +.Fc > +.Ft int > +.Fo bus_space_peek_8 > +.Fa "bus_space_tag_t space" "bus_space_handle_t handle" "bus_size_t offset" > +.Fa "uint8_t *datap" > +.Fc > +.Ft int > +.Fo bus_space_poke_1 > +.Fa "bus_space_tag_t space" "bus_space_handle_t handle" "bus_size_t offset" > +.Fa "uint8_t *datap" > +.Fc > +.Ft int > +.Fo bus_space_poke_2 > +.Fa "bus_space_tag_t space" "bus_space_handle_t handle" "bus_size_t offset" > +.Fa "uint8_t *datap" > +.Fc > +.Ft int > +.Fo bus_space_poke_4 > +.Fa "bus_space_tag_t space" "bus_space_handle_t handle" "bus_size_t offset" > +.Fa "uint8_t *datap" > +.Fc > +.Ft int > +.Fo bus_space_poke_8 > +.Fa "bus_space_tag_t space" "bus_space_handle_t handle" "bus_size_t offset" > +.Fa "uint8_t *datap" > +.Fc > .Ft uint8_t > .Fo bus_space_read_1 > .Fa "bus_space_tag_t space" "bus_space_handle_t handle" "bus_size_t offset" > @@ -1124,6 +1172,105 @@ If they would fail (e.g.\& because of an > argument error), that indicates a software bug which should cause a > panic. > In that case, they will never return. > +.Sh PROBING BUS SPACE FOR HARDWARE WHICH MAY NOT RESPOND > +One problem with the > +.Fn bus_space_read_N > +and > +.Fn bus_space_write_N > +family of functions is that they provide no protection against > +exceptions which can occur when no physical hardware or > +device responds to the read or write cycles. > +In such a situation, the system typically would panic due to a kernel-mode > +bus error. > +The > +.Fn bus_space_peek_N > +and > +.Fn bus_space_poke_N > +family of functions provide a mechanism to handle these exceptions > +gracefully without the risk of crashing the system. > +.Pp > +As with > +.Fn bus_space_read_N > +and > +.Fn bus_space_write_N , > +the peek and poke functions provide the ability to read and > +write 1, 2, 4, and 8 byte data items on busses which support those > +access sizes. > +All of the constraints specified in the descriptions of the > +.Fn bus_space_read_N > +and > +.Fn bus_space_write_N > +functions also apply to > +.Fn bus_space_peek_N > +and > +.Fn bus_space_poke_N . > +.Pp > +In addition, explicit calls to the > +.Fn bus_space_barrier > +function are not required as the implementation will ensure all > +pending operations complete before the peek or poke operation starts. > +The implementation will also ensure that the peek or poke operations > +complete before returning. > +.Pp > +The return value indicates the outcome of the peek or poke operation. > +A return value of zero implies that a hardware device is > +responding to the operation at the specified offset in the bus space. > +A non-zero return value indicates that the kernel intercepted a > +hardware exception (e.g., bus error) when the peek or poke operation > +was attempted. > +Note that some busses are incapable of generating exceptions when > +non-existent hardware is accessed. > +In such cases, these functions will always return zero and the value of > +the data read by > +.Fn bus_space_peek_N > +will be unspecified. > +.Pp > +Finally, it should be noted that at this time the > +.Fn bus_space_peek_N > +and > +.Fn bus_space_poke_N > +functions are not re-entrant and should not, therefore, be used > +from within an interrupt service routine. > +This constraint may be removed at some point in the future. > +.Pp > +.Bl -ohang -compact > +.It Fn bus_space_peek_1 "space" "handle" "offset" "datap" > +.It Fn bus_space_peek_2 "space" "handle" "offset" "datap" > +.It Fn bus_space_peek_4 "space" "handle" "offset" "datap" > +.It Fn bus_space_peek_8 "space" "handle" "offset" "datap" > +.Pp > +The > +.Fn bus_space_peek_N > +family of functions cautiously read a 1, 2, 4, or 8 byte data item from > +the offset specified by > +.Fa offset > +in the region specified by > +.Fa handle > +of the bus space specified by > +.Fa space . > +The data item read is stored in the location pointed to by > +.Fa datap . > +It is permissible for > +.Fa datap > +to be NULL, in which case the data item will be discarded after being read. > +.Pp > +.It Fn bus_space_poke_1 "space" "handle" "offset" "value" > +.It Fn bus_space_poke_2 "space" "handle" "offset" "value" > +.It Fn bus_space_poke_4 "space" "handle" "offset" "value" > +.It Fn bus_space_poke_8 "space" "handle" "offset" "value" > +.Pp > +The > +.Fn bus_space_poke_N > +family of functions cautiously write a 1, 2, 4, or 8 byte data item > +specified by > +.Fa value > +to the offset specified by > +.Fa offset > +in the region specified by > +.Fa handle > +of the bus space specified by > +.Fa space . > +.El > .Sh BARRIERS > In order to allow high-performance buffering implementations to avoid bus > activity on every operation, read and write ordering should be specified > > Modified: head/sys/arm/include/bus.h > ============================================================================== > --- head/sys/arm/include/bus.h Sat Sep 19 02:15:56 2020 (r365898) > +++ head/sys/arm/include/bus.h Sat Sep 19 11:06:41 2020 (r365899) > @@ -747,6 +747,33 @@ void generic_bs_unimplemented(void); > > #define BUS_SPACE_UNRESTRICTED (~0) > > +#define BUS_PEEK_FUNC(width, type) \ > + static inline int \ > + bus_space_peek_##width(bus_space_tag_t tag, \ > + bus_space_handle_t hnd, bus_size_t offset, type *value) \ > + { \ > + type tmp; \ > + tmp = bus_space_read_##width(tag, hnd, offset); \ > + return (0); \ > + } > +BUS_PEEK_FUNC(1, uint8_t) > +BUS_PEEK_FUNC(2, uint16_t) > +BUS_PEEK_FUNC(4, uint32_t) > +BUS_PEEK_FUNC(8, uint64_t) > + > +#define BUS_POKE_FUNC(width, type) \ > + static inline int \ > + bus_space_poke_##width(bus_space_tag_t tag, \ > + bus_space_handle_t hnd, bus_size_t offset, type value) \ > + { \ > + bus_space_write_##width(tag, hnd, offset, value); \ > + return (0); \ > + } > +BUS_POKE_FUNC(1, uint8_t) > +BUS_POKE_FUNC(2, uint16_t) > +BUS_POKE_FUNC(4, uint32_t) > +BUS_POKE_FUNC(8, uint64_t) > + > #include > > /* > > Modified: head/sys/arm64/arm64/bus_machdep.c > ============================================================================== > --- head/sys/arm64/arm64/bus_machdep.c Sat Sep 19 02:15:56 2020 (r365898) > +++ head/sys/arm64/arm64/bus_machdep.c Sat Sep 19 11:06:41 2020 (r365899) > @@ -83,6 +83,16 @@ void generic_bs_wr_4(void *, bus_space_handle_t, bus_s > void generic_bs_wr_8(void *, bus_space_handle_t, bus_size_t, const uint64_t *, > bus_size_t); > > +int generic_bs_peek_1(void *, bus_space_handle_t, bus_size_t , uint8_t *); > +int generic_bs_peek_2(void *, bus_space_handle_t, bus_size_t , uint16_t *); > +int generic_bs_peek_4(void *, bus_space_handle_t, bus_size_t , uint32_t *); > +int generic_bs_peek_8(void *, bus_space_handle_t, bus_size_t , uint64_t *); > + > +int generic_bs_poke_1(void *, bus_space_handle_t, bus_size_t, uint8_t); > +int generic_bs_poke_2(void *, bus_space_handle_t, bus_size_t, uint16_t); > +int generic_bs_poke_4(void *, bus_space_handle_t, bus_size_t, uint32_t); > +int generic_bs_poke_8(void *, bus_space_handle_t, bus_size_t, uint64_t); > + > static int > generic_bs_map(void *t, bus_addr_t bpa, bus_size_t size, int flags, > bus_space_handle_t *bshp) > @@ -223,6 +233,18 @@ struct bus_space memmap_bus = { > .bs_wr_2_s = NULL, > .bs_wr_4_s = NULL, > .bs_wr_8_s = NULL, > + > + /* peek */ > + .bs_peek_1 = generic_bs_peek_1, > + .bs_peek_2 = generic_bs_peek_2, > + .bs_peek_4 = generic_bs_peek_4, > + .bs_peek_8 = generic_bs_peek_8, > + > + /* poke */ > + .bs_poke_1 = generic_bs_poke_1, > + .bs_poke_2 = generic_bs_poke_2, > + .bs_poke_4 = generic_bs_poke_4, > + .bs_poke_8 = generic_bs_poke_8, > }; > > #ifdef FDT > > Modified: head/sys/arm64/arm64/bus_space_asm.S > ============================================================================== > --- head/sys/arm64/arm64/bus_space_asm.S Sat Sep 19 02:15:56 2020 (r365898) > +++ head/sys/arm64/arm64/bus_space_asm.S Sat Sep 19 11:06:41 2020 (r365899) > @@ -26,7 +26,6 @@ > */ > > #include > - > __FBSDID("$FreeBSD$"); > > ENTRY(generic_bs_r_1) > @@ -397,3 +396,84 @@ ENTRY(generic_bs_wr_8) > > 2: ret > END(generic_bs_wr_8) > + > +ENTRY(generic_bs_fault) > + mov x0, #-1 > + ret > +END(bus_fault) > + > +ENTRY(generic_bs_peek_1) > + .globl generic_bs_peek_1f > +generic_bs_peek_1f: > + ldrb w0, [x1, x2] /* Checked instruction */ > + dsb sy > + strb w0,[x3] > + mov x0, #0 > + ret > +END(generic_bs_peek_1) > + > +ENTRY(generic_bs_peek_2) > + .globl generic_bs_peek_2f > +generic_bs_peek_2f: > + ldrh w0, [x1, x2] /* Checked instruction */ > + dsb sy > + strh w0,[x3] > + mov x0, #0 > + ret > +END(generic_bs_peek_2) > + > +ENTRY(generic_bs_peek_4) > + .globl generic_bs_peek_4f > +generic_bs_peek_4f: > + ldr w0, [x1, x2] /* Checked instruction */ > + dsb sy > + str w0,[x3] > + mov x0, #0 > + ret > +END(generic_bs_peek_4) > + > +ENTRY(generic_bs_peek_8) > + .globl generic_bs_peek_8f > +generic_bs_peek_8f: > + ldr x0, [x1, x2] /* Checked instruction */ > + dsb sy > + str x0,[x3] > + mov x0, #0 > + ret > +END(generic_bs_peek_8) > + > +ENTRY(generic_bs_poke_1) > + .globl generic_bs_poke_1f > +generic_bs_poke_1f: > + strb w3, [x1, x2] /* Checked instruction */ > + dsb sy > + mov x0, #0 > + ret > +END(generic_bs_poke_1) > + > +ENTRY(generic_bs_poke_2) > + .globl generic_bs_poke_2f > +generic_bs_poke_2f: > + strh w3, [x1, x2] /* Checked instruction */ > + dsb sy > + mov x0, #0 > + ret > +END(generic_bs_poke_2) > + > +ENTRY(generic_bs_poke_4) > + .globl generic_bs_poke_4f > +generic_bs_poke_4f: > + str w3, [x1, x2] /* Checked instruction */ > + dsb sy > + mov x0, #0 > + ret > +END(generic_bs_poke_4) > + > +ENTRY(generic_bs_poke_8) > + .globl generic_bs_poke_8f > +generic_bs_poke_8f: > + str x3, [x1, x2] /* Checked instruction */ > + dsb sy > + mov x0, #0 > + ret > +END(generic_bs_poke_8) > > Modified: head/sys/arm64/arm64/trap.c > ============================================================================== > --- head/sys/arm64/arm64/trap.c Sat Sep 19 02:15:56 2020 (r365898) > +++ head/sys/arm64/arm64/trap.c Sat Sep 19 11:06:41 2020 (r365899) > @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); > #include > > #include > +#include > #include > #include > #include > @@ -88,6 +89,7 @@ typedef void (abort_handler)(struct thread *, struct t > > static abort_handler align_abort; > static abort_handler data_abort; > +static abort_handler external_abort; > > static abort_handler *abort_handlers[] = { > [ISS_DATA_DFSC_TF_L0] = data_abort, > @@ -101,6 +103,7 @@ static abort_handler *abort_handlers[] = { > [ISS_DATA_DFSC_PF_L2] = data_abort, > [ISS_DATA_DFSC_PF_L3] = data_abort, > [ISS_DATA_DFSC_ALIGN] = align_abort, > + [ISS_DATA_DFSC_EXT] = external_abort, > }; > > static __inline void > @@ -154,6 +157,28 @@ cpu_fetch_syscall_args(struct thread *td) > > #include "../../kern/subr_syscall.c" > > +/* > + * Test for fault generated by given access instruction in > + * bus_peek_ or bus_poke_ bus function. > + */ > +extern uint32_t generic_bs_peek_1f, generic_bs_peek_2f; > +extern uint32_t generic_bs_peek_4f, generic_bs_peek_8f; > +extern uint32_t generic_bs_poke_1f, generic_bs_poke_2f; > +extern uint32_t generic_bs_poke_4f, generic_bs_poke_8f; > + > +static bool > +test_bs_fault(void *addr) > +{ > + return (addr == &generic_bs_peek_1f || > + addr == &generic_bs_peek_2f || > + addr == &generic_bs_peek_4f || > + addr == &generic_bs_peek_8f || > + addr == &generic_bs_poke_1f || > + addr == &generic_bs_poke_2f || > + addr == &generic_bs_poke_4f || > + addr == &generic_bs_poke_8f); > +} > + > static void > svc_handler(struct thread *td, struct trapframe *frame) > { > @@ -182,6 +207,26 @@ align_abort(struct thread *td, struct trapframe *frame > call_trapsignal(td, SIGBUS, BUS_ADRALN, (void *)frame->tf_elr, > ESR_ELx_EXCEPTION(frame->tf_esr)); > userret(td, frame); > +} > + > + > +static void > +external_abort(struct thread *td, struct trapframe *frame, uint64_t esr, > + uint64_t far, int lower) > +{ > + > + /* > + * Try to handle synchronous external aborts caused by > + * bus_space_peek() and/or bus_space_poke() functions. > + */ > + if (!lower && test_bs_fault((void *)frame->tf_elr)) { > + frame->tf_elr = (uint64_t)generic_bs_fault; > + return; > + } > + > + print_registers(frame); > + printf(" far: %16lx\n", far); > + panic("Unhandled EL%d external data abort", lower ? 0: 1); > } > > static void > > Modified: head/sys/arm64/include/bus.h > ============================================================================== > --- head/sys/arm64/include/bus.h Sat Sep 19 02:15:56 2020 (r365898) > +++ head/sys/arm64/include/bus.h Sat Sep 19 11:06:41 2020 (r365899) > @@ -259,6 +259,24 @@ struct bus_space { > bus_size_t, const u_int32_t *, bus_size_t); > void (*bs_wr_8_s) (void *, bus_space_handle_t, > bus_size_t, const u_int64_t *, bus_size_t); > + /* peek */ > + int (*bs_peek_1)(void *, bus_space_handle_t, > + bus_size_t , uint8_t *); > + int (*bs_peek_2)(void *, bus_space_handle_t, > + bus_size_t , uint16_t *); > + int (*bs_peek_4)(void *, bus_space_handle_t, > + bus_size_t , uint32_t *); > + int (*bs_peek_8)(void *, bus_space_handle_t, > + bus_size_t , uint64_t *); > + /* poke */ > + int (*bs_poke_1)(void *, bus_space_handle_t, > + bus_size_t, uint8_t); > + int (*bs_poke_2)(void *, bus_space_handle_t, > + bus_size_t, uint16_t); > + int (*bs_poke_4)(void *, bus_space_handle_t, > + bus_size_t, uint32_t); > + int (*bs_poke_8)(void *, bus_space_handle_t, > + bus_size_t, uint64_t); > }; > > /* > @@ -283,6 +301,10 @@ struct bus_space { > (*(t)->__bs_opname_s(r,sz))((t)->bs_cookie, h, o) > #define __bs_ws_s(sz, t, h, o, v) \ > (*(t)->__bs_opname_s(w,sz))((t)->bs_cookie, h, o, v) > +#define __bs_peek(sz, t, h, o, vp) \ > + (*(t)->__bs_opname(peek, sz))((t)->bs_cookie, h, o, vp) > +#define __bs_poke(sz, t, h, o, v) \ > + (*(t)->__bs_opname(poke, sz))((t)->bs_cookie, h, o, v) > #define __bs_nonsingle_s(type, sz, t, h, o, a, c) \ > (*(t)->__bs_opname_s(type,sz))((t)->bs_cookie, h, o, a, c) > > @@ -456,6 +478,22 @@ struct bus_space { > __bs_copy(4, t, h1, o1, h2, o2, c) > #define bus_space_copy_region_8(t, h1, o1, h2, o2, c) \ > __bs_copy(8, t, h1, o1, h2, o2, c) > + > +/* > + * Poke (checked write) operations. > + */ > +#define bus_space_poke_1(t, h, o, v) __bs_poke(1, (t), (h), (o), (v)) > +#define bus_space_poke_2(t, h, o, v) __bs_poke(2, (t), (h), (o), (v)) > +#define bus_space_poke_4(t, h, o, v) __bs_poke(4, (t), (h), (o), (v)) > +#define bus_space_poke_8(t, h, o, v) __bs_poke(8, (t), (h), (o), (v)) > + > +/* > + * Peek (checked read) operations. > + */ > +#define bus_space_peek_1(t, h, o, vp) __bs_peek(1, (t), (h), (o), (vp)) > +#define bus_space_peek_2(t, h, o, vp) __bs_peek(2, (t), (h), (o), (vp)) > +#define bus_space_peek_4(t, h, o, vp) __bs_peek(4, (t), (h), (o), (vp)) > +#define bus_space_peek_8(t, h, o, vp) __bs_peek(8, (t), (h), (o), (vp)) > > #endif > > > Modified: head/sys/arm64/include/md_var.h > ============================================================================== > --- head/sys/arm64/include/md_var.h Sat Sep 19 02:15:56 2020 (r365898) > +++ head/sys/arm64/include/md_var.h Sat Sep 19 11:06:41 2020 (r365899) > @@ -48,5 +48,14 @@ void busdma_swi(void); > void dump_add_page(vm_paddr_t); > void dump_drop_page(vm_paddr_t); > int minidumpsys(struct dumperinfo *); > +void generic_bs_fault(void) __asm(__STRING(generic_bs_fault)); > +void generic_bs_peek_1(void) __asm(__STRING(generic_bs_peek_1)); > +void generic_bs_peek_2(void) __asm(__STRING(generic_bs_peek_2)); > +void generic_bs_peek_4(void) __asm(__STRING(generic_bs_peek_4)); > +void generic_bs_peek_8(void) __asm(__STRING(generic_bs_peek_8)); > +void generic_bs_poke_1(void) __asm(__STRING(generic_bs_poke_1)); > +void generic_bs_poke_2(void) __asm(__STRING(generic_bs_poke_2)); > +void generic_bs_poke_4(void) __asm(__STRING(generic_bs_poke_4)); > +void generic_bs_poke_8(void) __asm(__STRING(generic_bs_poke_8)); > > #endif /* !_MACHINE_MD_VAR_H_ */ > > Modified: head/sys/kern/subr_csan.c > ============================================================================== > --- head/sys/kern/subr_csan.c Sat Sep 19 02:15:56 2020 (r365898) > +++ head/sys/kern/subr_csan.c Sat Sep 19 11:06:41 2020 (r365899) > @@ -878,3 +878,33 @@ CSAN_BUS_SET_FUNC(multi_stream, 8, uint64_t) > CSAN_BUS_SET_FUNC(region_stream, 8, uint64_t) > #endif > #endif > + > +#define CSAN_BUS_PEEK_FUNC(width, type) \ > + int kcsan_bus_space_peek_##width(bus_space_tag_t tag, \ > + bus_space_handle_t hnd, bus_size_t offset, type *value) \ > + { \ > + kcsan_access((uintptr_t)value, sizeof(type), true, false, \ > + __RET_ADDR); \ > + return (bus_space_peek_##width(tag, hnd, offset, value)); \ > + } > + > +CSAN_BUS_PEEK_FUNC(1, uint8_t) > +CSAN_BUS_PEEK_FUNC(2, uint16_t) > +CSAN_BUS_PEEK_FUNC(4, uint32_t) > +#if !defined(__i386__) > +CSAN_BUS_PEEK_FUNC(8, uint64_t) > +#endif > + > +#define CSAN_BUS_POKE_FUNC(width, type) \ > + int kcsan_bus_space_poke_##width(bus_space_tag_t tag, \ > + bus_space_handle_t hnd, bus_size_t offset, type value) \ > + { \ > + return (bus_space_poke_##width(tag, hnd, offset, value)); \ > + } > + > +CSAN_BUS_POKE_FUNC(1, uint8_t) > +CSAN_BUS_POKE_FUNC(2, uint16_t) > +CSAN_BUS_POKE_FUNC(4, uint32_t) > +#if !defined(__i386__) > +CSAN_BUS_POKE_FUNC(8, uint64_t) > +#endif > > Modified: head/sys/mips/include/bus.h > ============================================================================== > --- head/sys/mips/include/bus.h Sat Sep 19 02:15:56 2020 (r365898) > +++ head/sys/mips/include/bus.h Sat Sep 19 11:06:41 2020 (r365899) > @@ -689,6 +689,33 @@ void __bs_c(f,_bs_c_8) (void *t, bus_space_handle_t bs > bs_c_4_proto(f); \ > bs_c_8_proto(f); > > +#define BUS_PEEK_FUNC(width, type) \ > + static inline int \ > + bus_space_peek_##width(bus_space_tag_t tag, \ > + bus_space_handle_t hnd, bus_size_t offset, type *value) \ > + { \ > + type tmp; \ > + tmp = bus_space_read_##width(tag, hnd, offset); \ > + return (0); \ > + } > +BUS_PEEK_FUNC(1, uint8_t) > +BUS_PEEK_FUNC(2, uint16_t) > +BUS_PEEK_FUNC(4, uint32_t) > +BUS_PEEK_FUNC(8, uint64_t) > + > +#define BUS_POKE_FUNC(width, type) \ > + static inline int \ > + bus_space_poke_##width(bus_space_tag_t tag, \ > + bus_space_handle_t hnd, bus_size_t offset, type value) \ > + { \ > + bus_space_write_##width(tag, hnd, offset, value); \ > + return (0); \ > + } > +BUS_POKE_FUNC(1, uint8_t) > +BUS_POKE_FUNC(2, uint16_t) > +BUS_POKE_FUNC(4, uint32_t) > +BUS_POKE_FUNC(8, uint64_t) > + > #define BUS_SPACE_ALIGNED_POINTER(p, t) ALIGNED_POINTER(p, t) > > #define BUS_SPACE_MAXADDR_24BIT 0xFFFFFF > > Modified: head/sys/powerpc/include/bus.h > ============================================================================== > --- head/sys/powerpc/include/bus.h Sat Sep 19 02:15:56 2020 (r365898) > +++ head/sys/powerpc/include/bus.h Sat Sep 19 11:06:41 2020 (r365899) > @@ -462,6 +462,33 @@ extern struct bus_space bs_le_tag; > __bs_copy(s_8, t, h1, o1, h2, o2, c) > #endif > > +#define BUS_PEEK_FUNC(width, type) \ > + static inline int \ > + bus_space_peek_##width(bus_space_tag_t tag, \ > + bus_space_handle_t hnd, bus_size_t offset, type *value) \ > + { \ > + type tmp; \ > + tmp = bus_space_read_##width(tag, hnd, offset); \ > + return (0); \ > + } > +BUS_PEEK_FUNC(1, uint8_t) > +BUS_PEEK_FUNC(2, uint16_t) > +BUS_PEEK_FUNC(4, uint32_t) > +BUS_PEEK_FUNC(8, uint64_t) > + > +#define BUS_POKE_FUNC(width, type) \ > + static inline int \ > + bus_space_poke_##width(bus_space_tag_t tag, \ > + bus_space_handle_t hnd, bus_size_t offset, type value) \ > + { \ > + bus_space_write_##width(tag, hnd, offset, value); \ > + return (0); \ > + } > +BUS_POKE_FUNC(1, uint8_t) > +BUS_POKE_FUNC(2, uint16_t) > +BUS_POKE_FUNC(4, uint32_t) > +BUS_POKE_FUNC(8, uint64_t) > + > #include > > #endif /* _MACHINE_BUS_H_ */ > > Modified: head/sys/riscv/include/bus.h > ============================================================================== > --- head/sys/riscv/include/bus.h Sat Sep 19 02:15:56 2020 (r365898) > +++ head/sys/riscv/include/bus.h Sat Sep 19 11:06:41 2020 (r365899) > @@ -451,6 +451,33 @@ struct bus_space { > #define bus_space_copy_region_8(t, h1, o1, h2, o2, c) \ > __bs_copy(8, t, h1, o1, h2, o2, c) > > +#define BUS_PEEK_FUNC(width, type) \ > + static inline int \ > + bus_space_peek_##width(bus_space_tag_t tag, \ > + bus_space_handle_t hnd, bus_size_t offset, type *value) \ > + { \ > + type tmp; \ > + tmp = bus_space_read_##width(tag, hnd, offset); \ > + return (0); \ > + } > +BUS_PEEK_FUNC(1, uint8_t) > +BUS_PEEK_FUNC(2, uint16_t) > +BUS_PEEK_FUNC(4, uint32_t) > +BUS_PEEK_FUNC(8, uint64_t) > + > +#define BUS_POKE_FUNC(width, type) \ > + static inline int \ > + bus_space_poke_##width(bus_space_tag_t tag, \ > + bus_space_handle_t hnd, bus_size_t offset, type value) \ > + { \ > + bus_space_write_##width(tag, hnd, offset, value); \ > + return (0); \ > + } > +BUS_POKE_FUNC(1, uint8_t) > +BUS_POKE_FUNC(2, uint16_t) > +BUS_POKE_FUNC(4, uint32_t) > +BUS_POKE_FUNC(8, uint64_t) > + > #include > > #endif /* _MACHINE_BUS_H_ */ > > Modified: head/sys/sys/_cscan_bus.h > ============================================================================== > --- head/sys/sys/_cscan_bus.h Sat Sep 19 02:15:56 2020 (r365898) > +++ head/sys/sys/_cscan_bus.h Sat Sep 19 11:06:41 2020 (r365899) > @@ -77,11 +77,21 @@ > bus_space_handle_t, bus_size_t, bus_space_handle_t, \ > bus_size_t, bus_size_t); > > +#define KCSAN_BS_PEEK(width, type) \ > + int kcsan_bus_space_peek_##width(bus_space_tag_t, \ > + bus_space_handle_t, bus_size_t, type *); > + > +#define KCSAN_BS_POKE(width, type) \ > + int kcsan_bus_space_poke_##width(bus_space_tag_t, \ > + bus_space_handle_t, bus_size_t, type); > + > #define KCSAN_BS(width, type) \ > KCSAN_BS_READ(width, type); \ > KCSAN_BS_WRITE(width, type); \ > KCSAN_BS_SET(width, type); \ > - KCSAN_BS_COPY(width, type) > + KCSAN_BS_COPY(width, type) \ > + KCSAN_BS_PEEK(width, type); \ > + KCSAN_BS_POKE(width, type); > > KCSAN_BS(1, uint8_t); > KCSAN_BS(2, uint16_t); > @@ -127,6 +137,8 @@ void kcsan_bus_space_barrier(bus_space_tag_t, bus_spac > #define bus_space_set_region_stream_1 kcsan_bus_space_set_region_stream_1 > #define bus_space_copy_multi_1 kcsan_bus_space_copy_multi_1 > #define bus_space_copy_multi_stream_1 kcsan_bus_space_copy_multi_stream_1 > +#define bus_space_poke_1 kcsan_bus_space_poke_1 > +#define bus_space_peek_1 kcsan_bus_space_peek_1 > > #define bus_space_read_2 kcsan_bus_space_read_2 > #define bus_space_read_stream_2 kcsan_bus_space_read_stream_2 > @@ -146,6 +158,8 @@ void kcsan_bus_space_barrier(bus_space_tag_t, bus_spac > #define bus_space_set_region_stream_2 kcsan_bus_space_set_region_stream_2 > #define bus_space_copy_multi_2 kcsan_bus_space_copy_multi_2 > #define bus_space_copy_multi_stream_2 kcsan_bus_space_copy_multi_stream_2 > +#define bus_space_poke_2 kcsan_bus_space_poke_2 > +#define bus_space_peek_2 kcsan_bus_space_peek_2 > > #define bus_space_read_4 kcsan_bus_space_read_4 > #define bus_space_read_stream_4 kcsan_bus_space_read_stream_4 > @@ -165,6 +179,8 @@ void kcsan_bus_space_barrier(bus_space_tag_t, bus_spac > #define bus_space_set_region_stream_4 kcsan_bus_space_set_region_stream_4 > #define bus_space_copy_multi_4 kcsan_bus_space_copy_multi_4 > #define bus_space_copy_multi_stream_4 kcsan_bus_space_copy_multi_stream_4 > +#define bus_space_poke_4 kcsan_bus_space_poke_4 > +#define bus_space_peek_4 kcsan_bus_space_peek_4 > > #define bus_space_read_8 kcsan_bus_space_read_8 > #define bus_space_read_stream_8 kcsan_bus_space_read_stream_8 > @@ -184,6 +200,9 @@ void kcsan_bus_space_barrier(bus_space_tag_t, bus_spac > #define bus_space_set_region_stream_8 kcsan_bus_space_set_region_stream_8 > #define bus_space_copy_multi_8 kcsan_bus_space_copy_multi_8 > #define bus_space_copy_multi_stream_8 kcsan_bus_space_copy_multi_stream_8 > +#define bus_space_poke_8 kcsan_bus_space_poke_8 > +#define bus_space_peek_8 kcsan_bus_space_peek_8 > + > > #endif /* !KCSAN_RUNTIME */ > > > Modified: head/sys/sys/bus.h > ============================================================================== > --- head/sys/sys/bus.h Sat Sep 19 02:15:56 2020 (r365898) > +++ head/sys/sys/bus.h Sat Sep 19 11:06:41 2020 (r365899) > @@ -827,6 +827,10 @@ static __inline void varp ## _set_ ## var(device_t dev > > #define bus_barrier(r, o, l, f) \ > bus_space_barrier((r)->r_bustag, (r)->r_bushandle, (o), (l), (f)) > +#define bus_poke_1(r, o, v) \ > + bus_space_poke_1((r)->r_bustag, (r)->r_bushandle, (o), (v)) > +#define bus_peek_1(r, o, vp) \ > + bus_space_peek_1((r)->r_bustag, (r)->r_bushandle, (o), (vp)) > #define bus_read_1(r, o) \ > bus_space_read_1((r)->r_bustag, (r)->r_bushandle, (o)) > #define bus_read_multi_1(r, o, d, c) \ > @@ -859,6 +863,10 @@ static __inline void varp ## _set_ ## var(device_t dev > bus_space_write_multi_stream_1((r)->r_bustag, (r)->r_bushandle, (o), (d), (c)) > #define bus_write_region_stream_1(r, o, d, c) \ > bus_space_write_region_stream_1((r)->r_bustag, (r)->r_bushandle, (o), (d), (c)) > +#define bus_poke_2(r, o, v) \ > + bus_space_poke_2((r)->r_bustag, (r)->r_bushandle, (o), (v)) > +#define bus_peek_2(r, o, vp) \ > + bus_space_peek_2((r)->r_bustag, (r)->r_bushandle, (o), (vp)) > #define bus_read_2(r, o) \ > bus_space_read_2((r)->r_bustag, (r)->r_bushandle, (o)) > #define bus_read_multi_2(r, o, d, c) \ > @@ -891,6 +899,10 @@ static __inline void varp ## _set_ ## var(device_t dev > bus_space_write_multi_stream_2((r)->r_bustag, (r)->r_bushandle, (o), (d), (c)) > #define bus_write_region_stream_2(r, o, d, c) \ > bus_space_write_region_stream_2((r)->r_bustag, (r)->r_bushandle, (o), (d), (c)) > +#define bus_poke_4(r, o, v) \ > + bus_space_poke_4((r)->r_bustag, (r)->r_bushandle, (o), (v)) > +#define bus_peek_4(r, o, vp) \ > + bus_space_peek_4((r)->r_bustag, (r)->r_bushandle, (o), (vp)) > #define bus_read_4(r, o) \ > bus_space_read_4((r)->r_bustag, (r)->r_bushandle, (o)) > #define bus_read_multi_4(r, o, d, c) \ > @@ -923,6 +935,10 @@ static __inline void varp ## _set_ ## var(device_t dev > bus_space_write_multi_stream_4((r)->r_bustag, (r)->r_bushandle, (o), (d), (c)) > #define bus_write_region_stream_4(r, o, d, c) \ > bus_space_write_region_stream_4((r)->r_bustag, (r)->r_bushandle, (o), (d), (c)) > +#define bus_poke_8(r, o, v) \ > + bus_space_poke_8((r)->r_bustag, (r)->r_bushandle, (o), (v)) > +#define bus_peek_8(r, o, vp) \ > + bus_space_peek_8((r)->r_bustag, (r)->r_bushandle, (o), (vp)) > #define bus_read_8(r, o) \ > bus_space_read_8((r)->r_bustag, (r)->r_bushandle, (o)) > #define bus_read_multi_8(r, o, d, c) \ > > Modified: head/sys/tools/bus_macro.sh > ============================================================================== > --- head/sys/tools/bus_macro.sh Sat Sep 19 02:15:56 2020 (r365898) > +++ head/sys/tools/bus_macro.sh Sat Sep 19 11:06:41 2020 (r365899) > @@ -55,7 +55,8 @@ for w in 1 2 4 8 > do > # macro copy_region_$w so dh do c > # macro copy_region_stream_$w ? > - # macro peek_$w > + macro poke_$w o v > + macro peek_$w o vp > for s in "" stream_ > do > macro read_$s$w o > > Modified: head/sys/x86/include/bus.h > ============================================================================== > --- head/sys/x86/include/bus.h Sat Sep 19 02:15:56 2020 (r365898) > +++ head/sys/x86/include/bus.h Sat Sep 19 11:06:41 2020 (r365899) > @@ -1089,6 +1089,31 @@ bus_space_barrier(bus_space_tag_t tag __unused, bus_sp > #define bus_space_copy_region_stream_4(t, h1, o1, h2, o2, c) \ > bus_space_copy_region_4((t), (h1), (o1), (h2), (o2), (c)) > > +#define BUS_PEEK_FUNC(width, type) \ > + static inline int \ > + bus_space_peek_##width(bus_space_tag_t tag, \ > + bus_space_handle_t hnd, bus_size_t offset, type *value) \ > + { \ > + type tmp; \ > + tmp = bus_space_read_##width(tag, hnd, offset); \ > + return (0); \ > + } > +BUS_PEEK_FUNC(1, uint8_t) > +BUS_PEEK_FUNC(2, uint16_t) > +BUS_PEEK_FUNC(4, uint32_t) > + > +#define BUS_POKE_FUNC(width, type) \ > + static inline int \ > + bus_space_poke_##width(bus_space_tag_t tag, \ > + bus_space_handle_t hnd, bus_size_t offset, type value) \ > + { \ > + bus_space_write_##width(tag, hnd, offset, value); \ > + return (0); \ > + } > +BUS_POKE_FUNC(1, uint8_t) > +BUS_POKE_FUNC(2, uint16_t) > +BUS_POKE_FUNC(4, uint32_t) > + > #endif /* KCSAN && !KCSAN_RUNTIME */ > > #endif /* _X86_BUS_H_ */ > > From owner-svn-src-head@freebsd.org Thu Sep 24 09:06:05 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C24F73F164B; Thu, 24 Sep 2020 09:06:05 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bxq0F4vdyz49WQ; Thu, 24 Sep 2020 09:06:05 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 724671F69F; Thu, 24 Sep 2020 09:06:05 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08O965Ui059866; Thu, 24 Sep 2020 09:06:05 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08O965TO059865; Thu, 24 Sep 2020 09:06:05 GMT (envelope-from se@FreeBSD.org) Message-Id: <202009240906.08O965TO059865@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: =?UTF-8?Q?Stefan_E=c3=9fer?= Date: Thu, 24 Sep 2020 09:06:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366109 - in head/share/syscons: fonts keymaps X-SVN-Group: head X-SVN-Commit-Author: se X-SVN-Commit-Paths: in head/share/syscons: fonts keymaps X-SVN-Commit-Revision: 366109 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 24 Sep 2020 09:06:05 -0000 Author: se Date: Thu Sep 24 09:06:04 2020 New Revision: 366109 URL: https://svnweb.freebsd.org/changeset/base/366109 Log: Add danish translations provided by GitHub user scootergriesen These translations did already exist in the index files for "vt". Obtained from: https://github.com/scootergrisen/freebsd/ Modified: head/share/syscons/fonts/INDEX.fonts head/share/syscons/keymaps/INDEX.keymaps Modified: head/share/syscons/fonts/INDEX.fonts ============================================================================== --- head/share/syscons/fonts/INDEX.fonts Thu Sep 24 08:51:23 2020 (r366108) +++ head/share/syscons/fonts/INDEX.fonts Thu Sep 24 09:06:04 2020 (r366109) @@ -49,6 +49,7 @@ # Language support: MENU, FONT # MENU:en:Choose your keyboard font +MENU:da:Vælg din skrifttype for tastaturet MENU:de:Wählen Sie Ihre Schrift MENU:fr:Choisissez votre fonte écran MENU:pl:Wybierz czcionkê ekranow± @@ -71,109 +72,128 @@ FONT:hy:armscii8-8x16.fnt armscii8-8x16.fnt:hy:ARMSCII-8 Îá¹³íáñÙ³Ý ³ÕáõëÛ³Ï, 8x16 armscii8-8x16.fnt:ru:ëÏÄÉÒÏ×ËÁ ARMSCII-8, 8x16 armscii8-8x16.fnt:en:ARMSCII-8 Character set, 8x16 +armscii8-8x16.fnt:da:ARMSCII-8-tegnsæt, 8x16 armscii8-8x16.fnt:de:ARMSCII-8 Zeichensatz, 8x16 armscii8-8x14.fnt:hy:ARMSCII-8 Îá¹³íáñÙ³Ý ³ÕáõëÛ³Ï, 8x14 armscii8-8x14.fnt:ru:ëÏÄÉÒÏ×ËÁ ARMSCII-8, 8x14 armscii8-8x14.fnt:en:ARMSCII-8 Character set, 8x14 +armscii8-8x14.fnt:da:ARMSCII-8-tegnsæt, 8x14 armscii8-8x14.fnt:de:ARMSCII-8 Zeichensatz, 8x14 armscii8-8x8.fnt:hy:ARMSCII-8 Îá¹³íáñÙ³Ý ³ÕáõëÛ³Ï, 8x8 armscii8-8x8.fnt:ru:ëÏÄÉÒÏ×ËÁ ARMSCII-8, 8x8 armscii8-8x8.fnt:en:ARMSCII-8 Character set, 8x8 +armscii8-8x8.fnt:da:ARMSCII-8-tegnsæt, 8x8 armscii8-8x8.fnt:de:ARMSCII-8 Zeichensatz, 8x8 cp437-8x14.fnt:en:Codepage 437 English, 8x14 +cp437-8x14.fnt:da:Codepage 437 engelsk, 8x14 cp437-8x14.fnt:de:Codeseite 437 Englisch, 8x14 cp437-8x14.fnt:fr:Code page 437 Anglais, 8x14 cp437-8x14.fnt:es:Página de códigos 437 inglés, 8x14 cp437-8x14.fnt:uk:ûÒÉÆÔ 437 ÁÎÇ̦ÊÓØËÉÊ, 8x14 cp437-8x16.fnt:en:Codepage 437 English, 8x16 +cp437-8x16.fnt:da:Codepage 437 engelsk, 8x16 cp437-8x16.fnt:de:Codeseite 437 Englisch, 8x16 cp437-8x16.fnt:fr:Code page 437 Anglais, 8x16 cp437-8x16.fnt:es:Página de códigos 437 inglés, 8x16 cp437-8x16.fnt:uk:ûÒÉÆÔ 437 ÁÎÇ̦ÊÓØËÉÊ, 8x16 cp437-thin-8x16.fnt:en:Codepage 437 English, 8x16 (thin) +cp437-thin-8x16.fnt:da:Codepage 437 engelsk, 8x16 (smal) cp437-thin-8x16.fnt:de:Codeseite 437 Englisch, 8x16 (dünn) cp437-thin-8x16.fnt:fr:Code page 437 Anglais, 8x16 (dünn) cp437-thin-8x16.fnt:es:Página de códigos 437 inglés, 8x16 (fina) cp437-thin-8x16.fnt:uk:ûÒÉÆÔ 437 ÁÎÇ̦ÊÓØËÉÊ, 8x16 (ÔÏÎËÉÊ) cp437-8x8.fnt:en:Codepage 437 English, 8x8 +cp437-8x8.fnt:da:Codepage 437 engelsk, 8x8 cp437-8x8.fnt:de:Codeseite 437 Englisch, 8x8 cp437-8x8.fnt:fr:Code page 437 Anglais, 8x8 cp437-8x8.fnt:es:Página de códigos 437 inglés, 8x8 cp437-8x8.fnt:uk:ûÒÉÆÔ 437 ÁÎÇ̦ÊÓØËÉÊ, 8x8 cp437-thin-8x8.fnt:en:Codepage 437 English, 8x8 (thin) +cp437-thin-8x8.fnt:da:Codepage 437 engelsk, 8x8 (smal) cp437-thin-8x8.fnt:de:Codeseite 437 Englisch, 8x8 (dünn) cp437-thin-8x8.fnt:fr:Code page 437 Anglais, 8x8 (dünn) cp437-thin-8x8.fnt:es:Página de códigos 437 inglés, 8x8 (fina) cp437-thin-8x8.fnt:uk:ûÒÉÆÔ 437 ÁÎÇ̦ÊÓØËÉÊ, 8x8 (ÔÏÎËÉÊ) cp850-8x14.fnt:en:Codepage 850 Multilingual Latin I, 8x14 +cp850-8x14.fnt:da:Codepage 850 flersproget latinsk I, 8x14 cp850-8x14.fnt:de:Codeseite 850 Mehrsprachig (Lateinisch I), 8x14 cp850-8x14.fnt:fr:Latin multilingual I, 8x14 cp850-8x14.fnt:es:Página de códigos 850 multilingüe, 8x14 cp850-8x14.fnt:uk:ûÒÉÆÔ 850 ÌÁÔÉÎÉÃÑ I, 8x14 cp850-8x16.fnt:en:Codepage 850 Multilingual Latin I, 8x16 +cp850-8x16.fnt:da:Codepage 850 flersproget latinsk I, 8x16 cp850-8x16.fnt:de:Codeseite 850 Mehrsprachig (Lateinisch I), 8x16 cp850-8x16.fnt:fr:Latin multilingual I, 8x16 cp850-8x16.fnt:es:Página de códigos 850 multilingüe, 8x16 cp850-8x16.fnt:uk:ûÒÉÆÔ 850 ÌÁÔÉÎÉÃÑ I, 8x16 cp850-thin-8x16.fnt:en:Codepage 850 Multilingual Latin I, 8x16 (thin) +cp850-thin-8x16.fnt:da:Codepage 850 flersproget latinsk I, 8x16 (smal) cp850-thin-8x16.fnt:de:Codeseite 850 Mehrsprachig (Lateinisch I), 8x16 (dünn) cp850-thin-8x16.fnt:fr:Latin multilingual I, 8x16 (fine) cp850-thin-8x16.fnt:es:Página de códigos 850 multilingüe, 8x16 (fina) cp850-thin-8x16.fnt:uk:ûÒÉÆÔ 850 ÌÁÔÉÎÉÃÑ I, 8x16 (ÔÏÎËÉÊ) cp850-8x8.fnt:en:Codepage 850 Multilingual Latin I, 8x8 +cp850-8x8.fnt:da:Codepage 850 flersproget latinsk I, 8x8 cp850-8x8.fnt:de:Codeseite 850 Mehrsprachig (Lateinisch I), 8x8 cp850-8x8.fnt:fr:Latin multilingual I, 8x8 cp850-8x8.fnt:es:Página de códigos 850 multilingüe, 8x8 cp850-8x8.fnt:uk:ûÒÉÆÔ 850 ÌÁÔÉÎÉÃÑ I, 8x8 cp850-thin-8x8.fnt:en:Codepage 850 Multilingual Latin I, 8x8 (thin) +cp850-thin-8x8.fnt:da:Codepage 850 flersproget latinsk I, 8x8 (smal) cp850-thin-8x8.fnt:de:Codeseite 850 Mehrsprachig (Lateinisch I), 8x8 (dünn) cp850-thin-8x8.fnt:fr:Latin multilingual I, 8x8 (fine) cp850-thin-8x8.fnt:es:Página de códigos 850 multilingüe, 8x8 (fina) cp850-thin-8x8.fnt:uk:ûÒÉÆÔ 850 ÌÁÔÉÎÉÃÑ I, 8x8 (ÔÏÎËÉÊ) cp865-8x14.fnt:en:Codepage 865 Norwegian, 8x14 +cp865-8x14.fnt:da:Codepage 865 norsk, 8x14 cp865-8x14.fnt:de:Codeseite 865 Norwegen, 8x14 cp865-8x14.fnt:fr:Code page 865 Norvégien, 8x14 cp865-8x14.fnt:es:Página de códigos 865 noruego, 8x14 cp865-8x14.fnt:uk:ûÒÉÆÔ 865 ÎÏÒ×ÅÚØËÉÊ, 8x14 cp865-8x16.fnt:en:Codepage 865 Norwegian, 8x16 +cp865-8x16.fnt:da:Codepage 865 norsk, 8x16 cp865-8x16.fnt:de:Codeseite 865 Norwegen, 8x16 cp865-8x16.fnt:fr:Code page 865 Norvégien, 8x16 cp865-8x16.fnt:es:Página de códigos 865 noruego, 8x16 cp865-8x16.fnt:uk:ûÒÉÆÔ 865 ÎÏÒ×ÅÚØËÉÊ, 8x16 cp865-thin-8x16.fnt:en:Codepage 865 Norwegian, 8x16 (thin) +cp865-thin-8x16.fnt:da:Codepage 865 norsk, 8x16 (smal) cp865-thin-8x16.fnt:de:Codeseite 865 Norwegen, 8x16 (dünn) cp865-thin-8x16.fnt:fr:Code page 865 Norvégien, 8x16 (fine) cp865-thin-8x16.fnt:es:Página de códigos 865 noruego, 8x16 (fina) cp865-thin-8x16.fnt:uk:ûÒÉÆÔ 865 ÎÏÒ×ÅÚØËÉÊ, 8x16 (ÔÏÎËÉÊ) cp865-8x8.fnt:en:Codepage 885 Norwegian, 8x8 +cp865-8x8.fnt:da:Codepage 885 norsk, 8x8 cp865-8x8.fnt:de:Codeseite 865 Norwegen, 8x8 cp865-8x8.fnt:fr:Code page 865 Norvégien, 8x8 cp865-8x8.fnt:es:Página de códigos 865 noruego, 8x8 cp865-8x8.fnt:uk:ûÒÉÆÔ 865 ÎÏÒ×ÅÚØËÉÊ, 8x8 cp865-thin-8x8.fnt:en:Codepage 885 Norwegian, 8x8 (thin) +cp865-thin-8x8.fnt:da:Codepage 885 norsk, 8x8 (smal) cp865-thin-8x8.fnt:de:Codeseite 885 Norwegen, 8x8 (thin) cp865-thin-8x8.fnt:fr:Code page 885 Norvégien, 8x8 (fine) cp865-thin-8x8.fnt:es:Página de códigos 865 noruego, 8x8 (fina) cp865-thin-8x8.fnt:uk:ûÒÉÆÔ 885 ÎÏÒ×ÅÚØËÉÊ, 8x8 (ÔÏÎËÉÊ) cp866-8x8.fnt:en:Codepage 866 Russian, 8x8 +cp866-8x8.fnt:da:Codepage 866 russisk, 8x8 cp866-8x8.fnt:de:Codeseite 866 Russisch, 8x8 cp866-8x8.fnt:ru:ûÒÉÆÔ cp866 ÒÕÓÓËÉÊ, 8x8 cp866-8x8.fnt:fr:Code page 866 Russe, 8x8 @@ -181,6 +201,7 @@ cp866-8x8.fnt:es:Página de códigos 866 ruso, 8x8 cp866-8x8.fnt:uk:ûÒÉÆÔ cp866 ÒÏÓ¦ÊÓØËÉÊ, 8x8 cp866-8x14.fnt:en:Codepage 866 Russian, 8x14 +cp866-8x14.fnt:da:Codepage 866 russisk, 8x14 cp866-8x14.fnt:de:Codeseite 866 Russisch, 8x14 cp866-8x14.fnt:ru:ûÒÉÆÔ cp866 ÒÕÓÓËÉÊ, 8x14 cp866-8x14.fnt:fr:Code page 866 Russe, 8x14 @@ -188,6 +209,7 @@ cp866-8x14.fnt:es:Página de códigos 866 ruso, 8x14 cp866-8x14.fnt:uk:ûÒÉÆÔ cp866 ÒÏÓ¦ÊÓØËÉÊ, 8x14 cp866-8x16.fnt:en:Codepage 866 Russian, 8x16 +cp866-8x16.fnt:da:Codepage 866 russisk, 8x16 cp866-8x16.fnt:de:Codeseite 866 Russisch, 8x16 cp866-8x16.fnt:ru:ûÒÉÆÔ cp866 ÒÕÓÓËÉÊ, 8x16 cp866-8x16.fnt:fr:Code page 866 Russe, 8x16 @@ -195,6 +217,7 @@ cp866-8x16.fnt:es:Página de códigos 866 ruso, 8x16 cp866-8x16.fnt:uk:ûÒÉÆÔ cp866 ÒÏÓ¦ÊÓØËÉÊ, 8x16 cp866b-8x16.fnt:en:Codepage 866 (b) Russian, 8x16 +cp866b-8x16.fnt:da:Codepage 866 (b) russisk, 8x16 cp866b-8x16.fnt:de:Codeseite 866 (b) Russisch, 8x16 cp866b-8x16.fnt:ru:ûÒÉÆÔ cp866 (b) ÒÕÓÓËÉÊ, 8x16 cp866b-8x16.fnt:fr:Code page 866 (b) Russe, 8x16 @@ -202,6 +225,7 @@ cp866b-8x16.fnt:es:Página de códigos 866 (b) ruso, 8x1 cp866b-8x16.fnt:uk:ûÒÉÆÔ cp866 (b) ÒÏÓ¦ÊÓØËÉÊ, 8x16 cp866c-8x16.fnt:en:Codepage 866 (c) Russian, 8x16 +cp866c-8x16.fnt:da:Codepage 866 (c) russisk, 8x16 cp866c-8x16.fnt:de:Codeseite 866 (c) Russisch, 8x16 cp866c-8x16.fnt:ru:ûÒÉÆÔ cp866 (c) ÒÕÓÓËÉÊ, 8x16 cp866c-8x16.fnt:fr:Code page 866 (c) Russe, 8x16 @@ -209,156 +233,194 @@ cp866c-8x16.fnt:es:Página de códigos 866 (c) ruso, 8x1 cp866c-8x16.fnt:uk:ûÒÉÆÔ cp866 (c) ÒÏÓ¦ÊÓØËÉÊ, 8x16 cp1251-8x8.fnt:en:Codepage 1251 Cyrillic, 8x8 +cp1251-8x8.fnt:da:Codepage 1251 kyrillisk, 8x8 cp1251-8x8.fnt:ru:ûÒÉÆÔ cp1251 ËÉÒÉÌÌÉÃÁ, 8x8 cp1251-8x8.fnt:uk:ûÒÉÆÔ cp1251-ËÉÒÉÌÉÃÑ, 8x8 cp1251-8x14.fnt:en:Codepage 1251 Cyrillic, 8x14 +cp1251-8x14.fnt:da:Codepage 1251 kyrillisk, 8x14 cp1251-8x14.fnt:ru:ûÒÉÆÔ cp1251 ËÉÒÉÌÌÉÃÁ, 8x14 cp1251-8x14.fnt:uk:ûÒÉÆÔ cp1251-ËÉÒÉÌÉÃÑ, 8x14 cp1251-8x16.fnt:en:Codepage 1251 Cyrillic, 8x16 +cp1251-8x16.fnt:da:Codepage 1251 kyrillisk, 8x16 cp1251-8x16.fnt:ru:ûÒÉÆÔ cp1251 ËÉÒÉÌÌÉÃÁ, 8x16 cp1251-8x16.fnt:uk:ûÒÉÆÔ cp1251-ËÉÒÉÌÉÃÑ, 8x16 swiss-1131-8x16.fnt:en:Codepage 1131 Belarusian, 8x16 (swiss) +swiss-1131-8x16.fnt:da:Codepage 1131 hviderussisk, 8x16 (swiss) swiss-1251-8x16.fnt:en:Codepage 1251 Cyrillic, 8x16 (swiss) +swiss-1251-8x16.fnt:da:Codepage 1251 kyrillisk, 8x16 (swiss) haik8-8x16.fnt:hy:гۻñ»Ý haik8 ¥û·ï³·áñÍ»É armscii8 í»ñ³Ïṩ Ñ»ï¤ haik8-8x16.fnt:ru:áÒÍÑÎÓËÁÑ haik8 (ÔÏÌØËÏ ÄÌÑ ÐÅÒÅËÏÄÉÒÏ×ËÉ Ó armscii8) haik8-8x16.fnt:en:haik8 codepage (use only with armscii8 screenmap) +haik8-8x16.fnt:da:haik8 codepage (brug kun med armscii8-screenmap) haik8-8x16.fnt:de:haik8 Zeichensatz (nur mit armscii8 umwandler verwenden) haik8-8x14.fnt:hy:гۻñ»Ý haik8 ¥û·ï³·áñÍ»É armscii8 í»ñ³Ïṩ Ñ»ï¤ haik8-8x14.fnt:ru:áÒÍÑÎÓËÁÑ haik8 (ÔÏÌØËÏ ÄÌÑ ÐÅÒÅËÏÄÉÒÏ×ËÉ Ó armscii8) haik8-8x14.fnt:en:haik8 codepage (use only with armscii8 screenmap) +haik8-8x14.fnt:da:haik8 codepage (brug kun med armscii8-screenmap) haik8-8x14.fnt:de:haik8 Zeichensatz (nur mit armscii8 umwandler verwenden) haik8-8x8.fnt:hy:гۻñ»Ý haik8 ¥û·ï³·áñÍ»É armscii8 í»ñ³Ïṩ Ñ»ï¤ haik8-8x8.fnt:ru:áÒÍÑÎÓËÁÑ haik8 (ÔÏÌØËÏ ÄÌÑ ÐÅÒÅËÏÄÉÒÏ×ËÉ Ó armscii8) haik8-8x8.fnt:en:haik8 codepage (use only with armscii8 screenmap) +haik8-8x8.fnt:da:haik8 codepage (brug kun med armscii8-screenmap) haik8-8x8.fnt:de:haik8 Zeichensatz (nur mit armscii8 umwandler verwenden) iso-8x16.fnt:en:ISO-8859-1 West European, 8x16 +iso-8x16.fnt:da:ISO-8859-1 vesteuropæisk, 8x16 iso-8x16.fnt:de:ISO-8859-1 Westeuropa, 8x16 iso-8x16.fnt:fr:ISO-8859-1 Est européen, 8x16 iso-8x16.fnt:es:ISO-8859-1 europeo occidental, 8x16 iso-8x16.fnt:uk:ISO-8859-1 úÁȦÄÎÁ ´×ÒÏÐÁ, 8x16 iso-8x14.fnt:en:ISO-8859-1 West European, 8x14 +iso-8x14.fnt:da:ISO-8859-1 vesteuropæisk, 8x14 iso-8x14.fnt:de:ISO-8859-1 Westeuropa, 8x14 iso-8x14.fnt:fr:ISO-8859-1 Est européen, 8x14 iso-8x14.fnt:es:ISO-8859-1 europeo occidental, 8x14 iso-8x14.fnt:uk:ISO-8859-1 úÁȦÄÎÁ ´×ÒÏÐÁ, 8x14 iso-8x8.fnt:en:ISO-8859-1 West European, 8x8 +iso-8x8.fnt:da:ISO-8859-1 vesteuropæisk, 8x8 iso-8x8.fnt:de:ISO-8859-1 Westeuropa, 8x8 iso-8x8.fnt:fr:ISO-8859-1 Est européen, 8x8 iso-8x8.fnt:es:ISO-8859-1 europeo occidental, 8x8 iso-8x8.fnt:uk:ISO-8859-1 úÁȦÄÎÁ ´×ÒÏÐÁ, 8x8 iso-thin-8x16.fnt:en:ISO-8859-1 West European, 8x16 (thin) +iso-thin-8x16.fnt:da:ISO-8859-1 vesteuropæisk, 8x16 (smal) iso-thin-8x16.fnt:de:ISO-8859-1 Westeuropa, 8x16 (dünn) iso-thin-8x16.fnt:fr:ISO-8859-1 Est européen, 8x16 (fine) iso-thin-8x16.fnt:es:ISO-8859-1 europeo occidental, 8x16 (fina) iso-thin-8x16.fnt:uk:ISO-8859-1 úÁȦÄÎÁ ´×ÒÏÐÁ, 8x16 (ÔÏÎËÉÊ) iso02-8x16.fnt:en:ISO-8859-2 Central European, 8x16 +iso02-8x16.fnt:da:ISO-8859-2 centraleuropæisk, 8x16 iso02-8x16.fnt:de:ISO-8859-2 Mitteleuropa, 8x16 iso02-8x16.fnt:es:ISO-8859-2 centroeuropeo, 8x16 iso02-8x16.fnt:uk:ISO-8859-2 ãÅÎÔÒÁÌØÎÁ ´×ÒÏÐÁ, 8x16 iso02-8x14.fnt:en:ISO-8859-2 Central European, 8x14 +iso02-8x14.fnt:da:ISO-8859-2 centraleuropæisk, 8x14 iso02-8x14.fnt:de:ISO-8859-2 Mitteleuropa, 8x14 iso02-8x14.fnt:es:ISO-8859-2 centroeuropeo, 8x14 iso02-8x14.fnt:uk:ISO-8859-2 ãÅÎÔÒÁÌØÎÁ ´×ÒÏÐÁ, 8x14 iso02-8x8.fnt:en:ISO-8859-2 Central European, 8x8 +iso02-8x8.fnt:da:ISO-8859-2 centraleuropæisk, 8x8 iso02-8x8.fnt:de:ISO-8859-2 Mitteleuropa, 8x8 iso02-8x8.fnt:es:ISO-8859-2 centroeuropeo, 8x8 iso02-8x8.fnt:uk:ISO-8859-2 ãÅÎÔÒÁÌØÎÁ ´×ÒÏÐÁ, 8x8 iso04-8x16.fnt:en:ISO-8859-4 Baltic, 8x16 +iso04-8x16.fnt:da:ISO-8859-4 baltisk, 8x16 iso04-8x16.fnt:es:ISO-8859-4 báltico, 8x16 iso04-wide-8x16.fnt:en:ISO-8859-4 Baltic wide, 8x16 +iso04-wide-8x16.fnt:da:ISO-8859-4 baltisk bred, 8x16 iso04-wide-8x16.fnt:es:ISO-8859-4 báltico, 8x16 (ancha) iso04-8x14.fnt:en:ISO-8859-4 Baltic, 8x14 +iso04-8x14.fnt:da:ISO-8859-4 baltisk, 8x14 iso04-8x14.fnt:es:ISO-8859-4 báltico, 8x14 iso04-8x8.fnt:en:ISO-8859-4 Baltic, 8x8 +iso04-8x8.fnt:da:ISO-8859-4 baltisk, 8x8 iso04-8x8.fnt:es:ISO-8859-4 báltico, 8x8 iso05-8x8.fnt:en:ISO-8859-5 Cyrillic, 8x8 +iso05-8x8.fnt:da:ISO-8859-5 kyrillisk, 8x8 iso05-8x8.fnt:ru:ISO-8859-5 ËÉÒÉÌÌÉÃÁ, 8x8 iso05-8x8.fnt:uk:ISO-8859-5 ËÉÒÉÌÉÃÑ, 8x8 iso05-8x14.fnt:en:ISO-8859-5 Cyrillic, 8x14 +iso05-8x14.fnt:da:ISO-8859-5 kyrillisk, 8x14 iso05-8x14.fnt:ru:ISO-8859-5 ËÉÒÉÌÌÉÃÁ, 8x14 iso05-8x14.fnt:uk:ISO-8859-5 ËÉÒÉÌÉÃÑ, 8x14 iso05-8x16.fnt:en:ISO-8859-5 Cyrillic, 8x16 +iso05-8x16.fnt:da:ISO-8859-5 kyrillisk, 8x16 iso05-8x16.fnt:ru:ISO-8859-5 ËÉÒÉÌÌÉÃÁ, 8x16 iso05-8x16.fnt:uk:ISO-8859-5 ËÉÒÉÌÉÃÑ, 8x16 iso07-8x16.fnt:en:ISO-8859-7 Greek, 8x16 +iso07-8x16.fnt:da:ISO-8859-7 græsk, 8x16 iso07-8x16.fnt:el:ISO-8859-7 ÅëëçíéêÞ, 8x16 iso07-8x14.fnt:en:ISO-8859-7 Greek, 8x14 +iso07-8x14.fnt:da:ISO-8859-7 græsk, 8x14 iso07-8x14.fnt:el:ISO-8859-7 ÅëëçíéêÞ, 8x14 iso07-8x8.fnt:en:ISO-8859-7 Greek, 8x8 +iso07-8x8.fnt:da:ISO-8859-7 græsk, 8x8 iso07-8x8.fnt:el:ISO-8859-7 ÅëëçíéêÞ, 8x8 iso08-8x16.fnt:en:ISO-8859-8 Hebrew, 8x16 +iso08-8x16.fnt:da:ISO-8859-8 hebraisk, 8x16 iso08-8x16.fnt:iw:ISO-8859-8 8x16 ,úéøáò iso08-8x14.fnt:en:ISO-8859-8 Hebrew, 8x14 +iso08-8x14.fnt:da:ISO-8859-8 hebraisk, 8x14 iso08-8x14.fnt:iw:ISO-8859-8 8x14 ,úéøáò iso08-8x8.fnt:en:ISO-8859-8 Hebrew, 8x8 +iso08-8x8.fnt:da:ISO-8859-8 hebraisk, 8x8 iso08-8x8.fnt:iw:ISO-8859-8 8x8 ,úéøáò iso09-8x16.fnt:en:ISO-8859-9 Turkish, 8x16 +iso09-8x16.fnt:da:ISO-8859-9 tyrkisk, 8x16 iso09-8x16.fnt:uk:ISO-8859-9 ÔÕÒÅÃØËÉÊ, 8x16 iso04-vga9-8x16.fnt:en:ISO-8859-4 Baltic (VGA 9bit mapped), 8x16 +iso04-vga9-8x16.fnt:da:ISO-8859-4 baltisk (VGA 9 bit-kortlagt), 8x16 iso04-vga9-8x16.fnt:es:ISO-8859-4 báltico, 8x16 (VGA 9 bits) iso04-vga9-wide-8x16.fnt:en:ISO-8859-4 Baltic wide (VGA 9bit mapped), 8x16 +iso04-vga9-wide-8x16.fnt:da:ISO-8859-4 baltisk bred (VGA 9 bit-kortlagt), 8x16 iso04-vga9-wide-8x16.fnt:es:ISO-8859-4 báltico, 8x16 (VGA 9 bits, ancha) iso04-vga9-8x14.fnt:en:ISO-8859-4 Baltic (VGA 9bit mapped), 8x14 +iso04-vga9-8x14.fnt:da:ISO-8859-4 baltisk (VGA 9 bit-kortlagt), 8x14 iso04-vga9-8x14.fnt:es:ISO-8859-4 báltico, 8x14 (VGA 9 bits) iso04-vga9-8x8.fnt:en:ISO-8859-4 Baltic (VGA 9bit mapped), 8x8 +iso04-vga9-8x8.fnt:da:ISO-8859-4 baltisk (VGA 9 bit-kortlagt), 8x8 iso04-vga9-8x8.fnt:es:ISO-8859-4 báltico, 8x8 (VGA 9 bits) iso15-8x16.fnt:en:ISO-8859-15 West European, 8x16 +iso15-8x16.fnt:da:ISO-8859-15 vesteuropæisk, 8x16 iso15-8x16.fnt:de:ISO-8859-15 Westeuropa, 8x16 iso15-8x16.fnt:fr:ISO-8859-15 Est européen, 8x16 iso15-8x16.fnt:es:ISO-8859-15 europeo occidental, 8x16 iso15-8x16.fnt:uk:ISO-8859-15 úÁȦÄÎÁ ´×ÒÏÐÁ, 8x16 iso15-8x14.fnt:en:ISO-8859-15 West European, 8x14 +iso15-8x14.fnt:da:ISO-8859-15 vesteuropæisk, 8x14 iso15-8x14.fnt:de:ISO-8859-15 Westeuropa, 8x14 iso15-8x14.fnt:fr:ISO-8859-15 Est européen, 8x14 iso15-8x14.fnt:es:ISO-8859-15 europeo occidental, 8x14 iso15-8x14.fnt:uk:ISO-8859-15 úÁȦÄÎÁ ´×ÒÏÐÁ, 8x14 iso15-8x8.fnt:en:ISO-8859-15 West European, 8x8 +iso15-8x8.fnt:da:ISO-8859-15 vesteuropæisk, 8x8 iso15-8x8.fnt:de:ISO-8859-15 Westeuropa, 8x8 iso15-8x8.fnt:fr:ISO-8859-15 Est européen, 8x8 iso15-8x8.fnt:es:ISO-8859-15 europeo occidental, 8x8 iso15-8x8.fnt:uk:ISO-8859-15 úÁȦÄÎÁ ´×ÒÏÐÁ, 8x8 iso15-thin-8x16.fnt:en:ISO-8859-15 West European, 8x16 (thin) +iso15-thin-8x16.fnt:da:ISO-8859-15 vesteuropæisk, 8x16 (smal) iso15-thin-8x16.fnt:de:ISO-8859-15 Westeuropa, 8x16 (dünn) iso15-thin-8x16.fnt:fr:ISO-8859-15 Est européen, 8x16 (fine) iso15-thin-8x16.fnt:es:ISO-8859-15 europeo occidental, 8x16 (fina) iso15-thin-8x16.fnt:uk:ISO-8859-15 úÁȦÄÎÁ ´×ÒÏÐÁ, 8x16 (ÔÏÎËÉÊ) koi8-r-8x14.fnt:en:Russian koi8-r, 8x14 +koi8-r-8x14.fnt:da:Russisk koi8-r, 8x14 koi8-r-8x14.fnt:de:Russisch koi8-r, 8x14 koi8-r-8x14.fnt:ru:òÕÓÓËÉÊ ÛÒÉÆÔ koi8-r, 8x14 koi8-r-8x14.fnt:fr:Russe koi8-r, 8x14 @@ -367,6 +429,7 @@ koi8-r-8x14.fnt:uk:ûÒÉÆÔ koi8-r ÒÏÓ¦ÊÓØËÉÊ, 8x14 koi8-r-8x14.fnt:hy:èáõë»ñ»Ý koi8-r Ïá¹³íáñáõÙ, 8x14 koi8-r-8x16.fnt:en:Russian koi8-r, 8x16 +koi8-r-8x16.fnt:da:Russisk koi8-r, 8x16 koi8-r-8x16.fnt:de:Russisch koi8-r, 8x16 koi8-r-8x16.fnt:ru:òÕÓÓËÉÊ ÛÒÉÆÔ koi8-r, 8x16 koi8-r-8x16.fnt:fr:Russe koi8-r, 8x16 @@ -375,6 +438,7 @@ koi8-r-8x16.fnt:uk:ûÒÉÆÔ koi8-r ÒÏÓ¦ÊÓØËÉÊ, 8x16 koi8-r-8x16.fnt:hy:èáõë»ñ»Ý koi8-r Ïá¹³íáñáõÙ, 8x16 koi8-r-8x8.fnt:en:Russian koi8-r, 8x8 +koi8-r-8x8.fnt:da:Russisk koi8-r, 8x8 koi8-r-8x8.fnt:de:Russisch koi8-r, 8x8 koi8-r-8x8.fnt:ru:òÕÓÓËÉÊ ÛÒÉÆÔ koi8-r, 8x8 koi8-r-8x8.fnt:fr:Russe koi8-r, 8x8 @@ -383,6 +447,7 @@ koi8-r-8x8.fnt:uk:ûÒÉÆÔ koi8-r ÒÏÓ¦ÊÓØËÉÊ, 8x8 koi8-r-8x8.fnt:hy:èáõë»ñ»Ý koi8-r Ïá¹³íáñáõÙ, 8x8 koi8-rb-8x16.fnt:en:Russian koi8-r (b), 8x16 +koi8-rb-8x16.fnt:da:Russisk koi8-r (b), 8x16 koi8-rb-8x16.fnt:de:Russisch koi8-r (b), 8x16 koi8-rb-8x16.fnt:ru:òÕÓÓËÉÊ ÛÒÉÆÔ koi8-r (b), 8x16 koi8-rb-8x16.fnt:fr:Russe koi8-r (b), 8x16 @@ -391,6 +456,7 @@ koi8-rb-8x16.fnt:uk:ûÒÉÆÔ koi8-r (b) ÒÏÓ¦ÊÓØËÉÊ, 8x16 koi8-rb-8x16.fnt:hy:èáõë»ñ»Ý koi8-r (b) Ïá¹³íáñáõÙ, 8x16 koi8-rc-8x16.fnt:en:Russian koi8-r (c), 8x16 +koi8-rc-8x16.fnt:da:Russisk koi8-r (c), 8x16 koi8-rc-8x16.fnt:de:Russisch koi8-r (c), 8x16 koi8-rc-8x16.fnt:ru:òÕÓÓËÉÊ ÛÒÉÆÔ koi8-r (c), 8x16 koi8-rc-8x16.fnt:fr:Russe koi8-r (c), 8x16 @@ -399,21 +465,27 @@ koi8-rc-8x16.fnt:uk:ûÒÉÆÔ koi8-r (c) ÒÏÓ¦ÊÓØËÉÊ, 8x16 koi8-rc-8x16.fnt:hy:èáõë»ñ»Ý koi8-r (c) Ïá¹³íáñáõÙ, 8x16 cp866u-8x16.fnt:en:Ukrainian font cp866u, 8x16 +cp866u-8x16.fnt:da:Ukrainsk skrifttype cp866u, 8x16 cp866u-8x16.fnt:uk:ûÒÉÆÔ cp866u ÕËÒÁ§ÎÓØËÉÊ, 8x16 cp866u-8x14.fnt:en:Ukrainian font cp866u, 8x14 +cp866u-8x14.fnt:da:Ukrainsk skrifttype cp866u, 8x14 cp866u-8x14.fnt:uk:ûÒÉÆÔ cp866u ÕËÒÁ§ÎÓØËÉÊ, 8x14 cp866u-8x8.fnt:en:Ukrainian font cp866u, 8x8 +cp866u-8x8.fnt:da:Ukrainsk skrifttype cp866u, 8x8 cp866u-8x8.fnt:uk:ûÒÉÆÔ cp866u ÕËÒÁ§ÎÓØËÉÊ, 8x8 koi8-u-8x16.fnt:en:Ukrainian font koi8-u, 8x16 +koi8-u-8x16.fnt:da:Ukrainsk skrifttype koi8-u, 8x16 koi8-u-8x16.fnt:uk:ûÒÉÆÔ koi8-u ÕËÒÁ§ÎÓØËÉÊ, 8x16 koi8-u-8x14.fnt:en:Ukrainian font koi8-u, 8x14 +koi8-u-8x14.fnt:da:Ukrainsk skrifttype koi8-u, 8x14 koi8-u-8x14.fnt:uk:ûÒÉÆÔ koi8-u ÕËÒÁ§ÎÓØËÉÊ, 8x14 koi8-u-8x8.fnt:en:Ukrainian font koi8-u, 8x8 +koi8-u-8x8.fnt:da:Ukrainsk skrifttype koi8-u, 8x8 koi8-u-8x8.fnt:uk:ûÒÉÆÔ koi8-u ÕËÒÁ§ÎÓØËÉÊ, 8x8 # (fset 'langnew Modified: head/share/syscons/keymaps/INDEX.keymaps ============================================================================== --- head/share/syscons/keymaps/INDEX.keymaps Thu Sep 24 08:51:23 2020 (r366108) +++ head/share/syscons/keymaps/INDEX.keymaps Thu Sep 24 09:06:04 2020 (r366109) @@ -21,9 +21,10 @@ # Language support: MENU, FONT # MENU:en:Choose your keyboard language -MENU:da,no,sv:Vælg dit keyboard layout +MENU:da:Vælg dit tastaturlayout MENU:de:Wählen Sie Ihre Tastaturbelegung MENU:fr:Choisissez la nationalité de votre clavier +MENU:no,sv:Vælg dit keyboard layout MENU:pl:Wybierz uk³ad klawiatury MENU:pt:Escolha o layout do teclado MENU:es:Seleccione el idioma de su teclado @@ -42,63 +43,77 @@ FONT:el:iso07-8x16.fnt FONT:hy:haik8-8x16.fnt # be.iso.kbd:en:Belgian ISO-8859-1 +be.iso.kbd:da:Belgisk ISO-8859-1 be.iso.kbd:de:Belgisch ISO-8859-1 be.iso.kbd:fr:Belge ISO-8859-1 be.iso.kbd:pt,es:Belga ISO-8859-1 be.iso.acc.kbd:en:Belgian ISO-8859-1 (accent keys) +be.iso.acc.kbd:da:Belgisk ISO-8859-1 (accenttaster) be.iso.acc.kbd:de:Belgisch ISO-8859-1 (mit Akzenten) be.iso.acc.kbd:fr:Belge ISO-8859-1 (avec accents) be.iso.acc.kbd:pt:Belga ISO-8859-1 (com acentos) be.iso.acc.kbd:es:Belga ISO-8859-1 (con acentos) bg.bds.ctrlcaps.kbd:en:Bulgarian (BDS) +bg.bds.ctrlcaps.kbd:da:Bulgarsk (BDS) bg.bds.ctrlcaps.kbd:de:Bulgarisch (BDS) bg.phonetic.ctrlcaps.kbd:en:Bulgarian (Phonetic) +bg.phonetic.ctrlcaps.kbd:da:Bulgarsk (fonetisk) bg.phonetic.ctrlcaps.kbd:de:Bulgarisch (phonetisch) br275.iso.kbd:en:Brazilian 275 ISO-8859-1 +br275.iso.kbd:da:Brasiliansk 275 ISO-8859-1 br275.iso.kbd:de:Brasilianisch 275 ISO-8859-1 br275.iso.kbd:fr:Brésilien 275 ISO-8859-1 br275.iso.kbd:pt:Brasileiro 275 ISO-8859-1 br275.iso.kbd:es:Brasileño 275 ISO-8859-1 br275.iso.acc.kbd:en:Brazilian 275 ISO-8859-1 (accent keys) +br275.iso.acc.kbd:da:Brasiliansk 275 ISO-8859-1 (accenttaster) br275.iso.acc.kbd:de:Brasilianisch 275 ISO-8859-1 (mit Akzenten) br275.iso.acc.kbd:fr:Brésilien 275 ISO-8859-1 (avec accents) br275.iso.acc.kbd:pt:Brasileiro 275 ISO-8859-1 (com acentos) br275.iso.acc.kbd:es:Brasileño 275 ISO-8859-1 (con acentos) br275.cp850.kbd:en:Brazilian 275 Codepage 850 +br275.cp850.kbd:da:Brasiliansk 275 Codepage 850 br275.cp850.kbd:de:Brasilianisch 275 Codeseite 850 br275.cp850.kbd:fr:Brésilien 275 Code page 850 br275.cp850.kbd:pt:Brasileiro 275 Codepage 850 br275.cp850.kbd:es:Brasileño 275 Codepage 850 by.cp1131.kbd:en:Belarusian Codepage 1131 +by.cp1131.kbd:da:Hviderussisk Codepage 1131 by.cp1131.kbd:de:Weißrussisch Code page 1131 by.cp1131.kbd:fr:Biélorusse Code page 1131 by.cp1251.kbd:de:Weißrussisch Codepage 1251 by.cp1251.kbd:en:Belarusian Codepage 1251 +by.cp1251.kbd:da:Hviderussisk Codepage 1251 by.cp1251.kbd:fr:Biélorusse Code page 1251 by.iso5.kbd:en:Belarusian ISO-8859-5 +by.iso5.kbd:da:Hviderussisk ISO-8859-5 by.iso5.kbd:de:Weißrussisch ISO-8859-5 by.iso5.kbd:fr:Biélorusse ISO-8859-5 ce.iso2.kbd:en:Central European ISO-8859-2 +ce.iso2.kbd:da:Centraleuropæisk ISO-8859-2 ce.iso2.kbd:de:Zentral Europäisch ISO-8859-2 ce.iso2.kbd:fr:Centre européen ISO-8859-2 ce.iso2.kbd:es:Centroeuropeo ISO-8859-2 colemak-dh.iso15.acc.kbd:en:Colemak Mod-DH ergonomic alternative colemak.iso15.acc.kbd:en:Colemak ergonomic alternative +colemak.iso15.acc.kbd:da:Colemak ergonomisk alternativ cs.latin2.qwertz.kbd:en:Czech ISO-8859-2 (QWERTZ, accent keys) +cs.latin2.qwertz.kbd:da:Tjekkisk ISO-8859-2 (QWERTZ, accenttaster) cs.latin2.qwertz.kbd:de:Tschechisch ISO-8859-2 (QWERTZ, mit Akzenten) cs.latin2.qwertz.kbd:fr:Tchèque ISO-8859-2 (QWERTZ, avec accents) cs.latin2.qwertz.kbd:es:Checo ISO-8859-2 (QWERTZ, con acentos) cz.iso2.kbd:en:Czech ISO-8859-2 +cz.iso2.kbd:da:Tjekkisk ISO-8859-2 cz.iso2.kbd:de:Tschechisch ISO-8859-2 cz.iso2.kbd:fr:Tchèque ISO-8859-2 cz.iso2.kbd:es:Checo ISO-8859-2 @@ -111,62 +126,71 @@ danish.iso.kbd:pt:Dinamarquês ISO-8859-1 danish.iso.kbd:es:Danés ISO-8859-1 danish.iso.acc.kbd:en:Danish ISO-8859-1 (accent keys) -danish.iso.acc.kbd:da:Dansk ISO-8859-1 (accent taster) +danish.iso.acc.kbd:da:Dansk ISO-8859-1 (accenttaster) danish.iso.acc.kbd:de:Dänisch ISO-8859-1 (mit Akzenten) danish.iso.acc.kbd:fr:Danois ISO-8859-1 (avec accents) danish.iso.acc.kbd:pt:Dinamarquês ISO-8859-1 (com acentos) danish.iso.acc.kbd:es:Danés ISO-8859-1 (con acentos) danish.cp865.kbd:en:Danish Codepage 865 -danish.cp865.kbd:da:Dansk Code page 865 +danish.cp865.kbd:da:Dansk Codepage 865 danish.cp865.kbd:de:Dänisch Codeseite 865 danish.cp865.kbd:fr:Danois Code page 865 danish.cp865.kbd:pt:Dinamarquês Codepage 865 danish.cp865.kbd:es:Danés Codepage 865 danish.iso.macbook.kbd:en:Danish ISO-8859-1 (macbook) -danish.iso.macbook.kbd:da:Dansk ISO-8859-1 (macbook) +danish.iso.macbook.kbd:da:Dansk ISO-8859-1 (MacBook) danish.iso.macbook.kbd:de:Dänisch ISO-8859-1 (Macbook) danish.iso.macbook.kbd:fr:Danois ISO-8859-1 (macbook) danish.iso.macbook.kbd:pt:Dinamarquês ISO-8859-1 (macbook) danish.iso.macbook.kbd:es:Danés ISO-8859-1 (macbook) dutch.iso.acc.kbd:en:Dutch ISO keymap (accent keys) +dutch.iso.acc.kbd:da:Nederlandsk ISO-tastekortlægning (accenttaster) dutch.iso.acc.kbd:de:Holländisch (mit Akzenten) eee_nordic.kbd:en:Nordic layout on Asus eeePC +eee_nordic.kbd:da:Nordisk layout på Asus eeePC eee_nordic.kbd:fr:Norvégien phonétique sur Asus eeePC el.iso07.kbd:en:Greek ISO-8859-7 (104 keys) +el.iso07.kbd:da:Græsk ISO-8859-7 (104-taster) el.iso07.kbd:fr:Grec ISO-8859-7 (104 touches) el.iso07.kbd:el:Åëëçíéêü ISO-8859-7 (104 ðëÞêôñùí) estonian.iso.kbd:en:Estonian ISO-8859-1 +estonian.iso.kbd:da:Estisk ISO-8859-1 estonian.iso.kbd:de:Estnisch ISO-8859-1 estonian.iso.kbd:fr:Estonien ISO-8859-1 estonian.iso.kbd:es:Estonio ISO-8859-1 estonian.iso15.kbd:en:Estonian ISO-8859-15 +estonian.iso15.kbd:da:Estisk ISO-8859-15 estonian.iso15.kbd:de:Estnisch ISO-8859-15 estonian.iso15.kbd:fr:Estonien ISO-8859-15 estonian.iso15.kbd:es:Estonio ISO-8859-15 estonian.cp850.kbd:en:Estonian Codepage 850 +estonian.cp850.kbd:da:Estisk Codepage 850 estonian.cp850.kbd:de:Estnisch Codeseite 850 estonian.cp850.kbd:fr:Estonien Code page 850 estonian.cp850.kbd:es:Estonio Codepage 850 finnish.iso.kbd:en:Finnish ISO-8859-1 +finnish.iso.kbd:da:Finsk ISO-8859-1 finnish.iso.kbd:de:Finnisch ISO-8859-1 finnish.iso.kbd:fr:Finlandais ISO-8859-1 finnish.iso.kbd:es:Finlandés ISO-8859-1 finnish.cp850.kbd:en:Finnish Codepage 850 +finnish.cp850.kbd:da:Finsk Codepage 850 finnish.cp850.kbd:de:Finnisch Codeseite 850 finnish.cp850.kbd:fr:Finlandais Code page 850 finnish.cp850.kbd:es:Finlandés Codepage 850 fr.iso.kbd:en:French ISO-8859-1 +fr.iso.kbd:da:Fransk ISO-8859-1 fr.iso.kbd:de:Französisch ISO-8859-1 fr.iso.kbd:fr:Français ISO-8859-1 fr.iso.kbd:pt:Francês ISO-8859-1 @@ -174,6 +198,7 @@ fr.iso.kbd:es:Francés ISO-8859-1 fr.iso.kbd:uk:æÒÁÎÃÕÚØËÁ ISO-8859-1 fr.iso.acc.kbd:en:French ISO-8859-1 (accent keys) +fr.iso.acc.kbd:da:Fransk ISO-8859-1 (accenttaster) fr.iso.acc.kbd:de:Französisch ISO-8859-1 (mit Akzenten) fr.iso.acc.kbd:fr:Français ISO-8859-1 (avec accents) fr.iso.acc.kbd:pt:Francês ISO-8859-1 (com acentos) @@ -181,12 +206,14 @@ fr.iso.acc.kbd:es:Francés ISO-8859-1 (con acentos) fr.iso.acc.kbd:uk:æÒÁÎÃÕÚØËÁ ISO-8859-1 (accent keys) fr.macbook.acc.kbd:en:French Macbook/Macbook Pro ISO-8859-15 (accent keys) +fr.macbook.acc.kbd:da:Fransk MacBook/MacBook Pro ISO-8859-15 (accenttaster) fr.macbook.acc.kbd:de:Französisch Macbook/Macbook Pro ISO-8859-15 (mit Aksenten) fr.macbook.acc.kbd:fr:Français Macbook/Macbook Pro ISO-8859-15 (accent keys) fr.macbook.acc.kbd:pt:Francês Macbook/Macbook Pro ISO-8859-15 (com acentos) fr.macbook.acc.kbd:es:Francés Macbook/Macbook Pro ISO-8859-15 (con acentos) fr.dvorak.kbd:en:French Dvorak-like +fr.dvorak.kbd:da:Fransk Dvorak-lignende fr.dvorak.kbd:de:Französisch Dvorak fr.dvorak.kbd:fr:Français Dvorak fr.dvorak.kbd:pt:Francês Dvorak @@ -194,6 +221,7 @@ fr.dvorak.kbd:es:Francés Dvorak fr.dvorak.kbd:uk:French Dvorak-like fr.dvorak.acc.kbd:en:French Dvorak-like (accent keys) +fr.dvorak.acc.kbd:da:Fransk Dvorak-lignende (accenttaster) fr.dvorak.acc.kbd:de:Französisch Dvorak (mit Akzenten) fr.dvorak.acc.kbd:fr:Français Dvorak (accent keys) fr.dvorak.acc.kbd:pt:Francês Dvorak (com acentos) @@ -201,12 +229,14 @@ fr.dvorak.acc.kbd:es:Francés Dvorak (con acentos) fr.dvorak.acc.kbd:uk:French Dvorak-like (accent keys) fr_CA.iso.acc.kbd:en:French Canadian ISO-8859-1 (accent keys) +fr_CA.iso.acc.kbd:da:Franskcanadisk ISO-8859-1 (accenttaster) fr_CA.iso.acc.kbd:de:Französisch Kanada ISO-8859-1 (mit Akzenten) fr_CA.iso.acc.kbd:fr:Français Canadien ISO-8859-1 (avec accents) fr_CA.iso.acc.kbd:es:Francocanadiense ISO-8859-1 (con acentos) fr_CA.iso.acc.kbd:uk:æÒÁÎÃÕÚØËÏ-ËÁÎÁÄÓØËÁ ISO-8859-1 (accent keys) german.iso.kbd:en:German ISO-8859-15 +german.iso.kbd:da:Tysk ISO-8859-15 german.iso.kbd:de:Deutsch ISO-8859-15 german.iso.kbd:fr:Allemand ISO-8859-15 german.iso.kbd:pt:Alemão ISO-8859-15 @@ -214,6 +244,7 @@ german.iso.kbd:es:Alemán ISO-8859-15 german.iso.kbd:uk:î¦ÍÅÃØËÁ ISO-8859-15 german.iso.acc.kbd:en:German ISO-8859-15 (accent keys) +german.iso.acc.kbd:da:Tysk ISO-8859-15 (accenttaster) german.iso.acc.kbd:de:Deutsch ISO-8859-15 (mit Akzenten) german.iso.acc.kbd:fr:Allemand ISO-8859-15 (avec accents) german.iso.acc.kbd:pt:Alemão ISO-8859-15 (com acentos) @@ -221,6 +252,7 @@ german.iso.acc.kbd:es:Alemán ISO-8859-15 (con acentos) german.iso.acc.kbd:uk:î¦ÍÅÃØËÁ ISO-8859-15 (accent keys) german.cp850.kbd:en:German Codepage 850 +german.cp850.kbd:da:Tysk Codepage 850 german.cp850.kbd:de:Deutsch Codeseite 850 german.cp850.kbd:fr:Allemand Code page 850 german.cp850.kbd:pt:Alemão Codepage 850 @@ -228,31 +260,37 @@ german.cp850.kbd:es:Alemán Codepage 850 german.cp850.kbd:uk:î¦ÍÅÃØËÁ CP-850 gr.elot.acc.kbd:en:Greek ISO-8859-7 ELOT +gr.elot.acc.kbd:da:Græsk ISO-8859-7 ELOT gr.elot.acc.kbd:de:Grieschisch ISO-8859-7 ELOT gr.elot.acc.kbd:fr:Grec ISO-8859-7 ELOT gr.elot.acc.kbd:el:Åëëçíéêü ISO-8859-7 ÅËÏÔ gr.us101.acc.kbd:en:Greek ISO-8859-7 (101 keys) +gr.us101.acc.kbd:da:Græsk ISO-8859-7 (101-taster) gr.us101.acc.kbd:de:Grieschisch ISO-8859-7 (101 Tasten) gr.us101.acc.kbd:fr:Grec ISO-8859-7 (101 touches) gr.us101.acc.kbd:el:Åëëçíéêü ISO-8859-7 (101 ðëÞêôñùí) iw.iso8.kbd:en:Hebrew ISO-8859-8 +iw.iso8.kbd:da:Hebraisk ISO-8859-8 iw.iso8.kbd:de:Hebräisch ISO-8859-8 iw.iso8.kbd:fr:Hébreu ISO-8859-8 iw.iso8.kbd:he:ISO-8859-8 úéøáò hr.iso.kbd:en:Croatian ISO-8859-2 +hr.iso.kbd:da:Kroatisk ISO-8859-2 hr.iso.kbd:de:Kroatisch ISO-8859-2 hr.iso.kbd:fr:Croate ISO-8859-2 hr.iso.kbd:es:Croata ISO-8859-2 hu.iso2.101keys.kbd:en:Hungarian 101 ISO-8859-2 +hu.iso2.101keys.kbd:da:Ungarsk 101 ISO-8859-2 hu.iso2.101keys.kbd:de:Ungarisch 101 ISO-8859-2 hu.iso2.101keys.kbd:fr:Hongrois 101 ISO-8859-2 hu.iso2.101keys.kbd:es:Húngaro 101 ISO-8859-2 hu.iso2.102keys.kbd:en:Hungarian 102 ISO-8859-2 +hu.iso2.102keys.kbd:da:Ungarsk 102 ISO-8859-2 hu.iso2.102keys.kbd:de:Ungarisch 102 ISO-8859-2 hu.iso2.102keys.kbd:fr:Hongrois 102 ISO-8859-2 hu.iso2.102keys.kbd:es:Húngaro 102 ISO-8859-2 @@ -260,28 +298,33 @@ hu.iso2.102keys.kbd:es:Húngaro 102 ISO-8859-2 hy.armscii-8.kbd:hy:гۻñ»Ý ÑÝãÛáõݳÛÇÝ ¥Phonetic¤ ¹³ë³íáñáõÃÛáõÝ hy.armscii-8.kbd:ru:áÒÍÑÎÓËÁÑ ÆÏÎÅÔÉÞÅÓËÁÑ ÒÁÓËÌÁÄËÁ hy.armscii-8.kbd:en:Armenian phonetic layout +hy.armscii-8.kbd:da:Armensk fonetisk layout hy.armscii-8.kbd:fr:Arménien phonétique hy.armscii-8.kbd:de:Armenische phonetische Tastenbelegung icelandic.iso.kbd:en:Icelandic ISO-8859-1 +icelandic.iso.kbd:da:Islandsk ISO-8859-1 icelandic.iso.kbd:de:Isländisch ISO-8859-1 icelandic.iso.kbd:fr:Islandais ISO-8859-1 icelandic.iso.kbd:pt:Islandês ISO-8859-1 icelandic.iso.kbd:es:Islandés ISO-8859-1 icelandic.iso.acc.kbd:en:Icelandic ISO-8859-1 (accent keys) +icelandic.iso.acc.kbd:da:Islandsk ISO-8859-1 (accenttaster) icelandic.iso.acc.kbd:de:Isländisch ISO-8859-1 (mit Akzenten) icelandic.iso.acc.kbd:fr:Islandais ISO-8859-1 (avec accents) icelandic.iso.acc.kbd:pt:Islandês ISO-8859-1 (com acentos) icelandic.iso.acc.kbd:es:Islandés ISO-8859-1 (con acentos) it.iso.kbd:en:Italian ISO-8859-1 +it.iso.kbd:da:Italiensk ISO-8859-1 it.iso.kbd:de:Italienisch ISO-8859-1 it.iso.kbd:fr:Italien ISO-8859-1 it.iso.kbd:pt,es:Italiano ISO-8859-1 it.iso.kbd:uk:¶ÔÁ̦ÊÓØËÁ ISO-8859-1 jp.106.kbd:en:Japanese 106 +jp.106.kbd:da:Japansk 106 jp.106.kbd:de:Japanisch 106 jp.106.kbd:fr:Japonais 106 jp.106.kbd:pt:Japonês 106 @@ -289,6 +332,7 @@ jp.106.kbd:es:Japonés 106 jp.106.kbd:uk:ñÐÏÎÓØËÁ 106 jp.106x.kbd:en:Japanese 106x +jp.106x.kbd:da:Japansk 106x jp.106x.kbd:de:Japanisch 106x jp.106x.kbd:fr:Japonais 106x jp.106x.kbd:pt:Japonês 106x @@ -296,28 +340,34 @@ jp.106x.kbd:es:Japonés 106x jp.106x.kbd:uk:ñÐÏÎÓØËÁ 106x kk.pt154.kst.kbd:en:Kazakh PT154 codepage +kk.pt154.kst.kbd:da:Kasakhisk PT154 codepage kk.pt154.kst.kbd:de:Kasachisch PT154 codepage kk.pt154.kst.kbd:fr:Kazakh PT154 code page kk.pt154.io.kbd:en:Kazakh PT154 codepage (with IO) +kk.pt154.io.kbd:da:Kazakh PT154 codepage (with IO) kk.pt154.io.kbd:de:Kasachisch PT154 codepage (mit IO) kk.pt154.io.kbd:fr:Kazakh PT154 code page (avec IO) latinamerican.kbd:en:Latin American +latinamerican.kbd:da:Latinamerikansk latinamerican.kbd:de:Latein Amerikanisch latinamerican.kbd:fr:Amérique latine latinamerican.kbd:pt,es:América Latina latinamerican.iso.acc.kbd:en:Latin American (accent keys) +latinamerican.iso.acc.kbd:da:Latinamerikansk (accenttaster) latinamerican.iso.acc.kbd:de:Latein Amerikanisch (mit Akzenten) latinamerican.iso.acc.kbd:fr:Amérique latine (avec accents) latinamerican.iso.acc.kbd:pt,es:América Latina (com acentos) lt.iso4.kbd:en:Lithuanian ISO-8859-4 +lt.iso4.kbd:da:Litauisk ISO-8859-4 lt.iso4.kbd:de:Litauisch ISO-8859-4 lt.iso4.kbd:fr:Lithuanien ISO-8859-4 lt.iso4.kbd:es:Lituano ISO-8859-4 norwegian.iso.kbd:en:Norwegian ISO-8859-1 +norwegian.iso.kbd:da:Norsk ISO-8859-1 norwegian.iso.kbd:no:Norsk ISO-8859-1 norwegian.iso.kbd:de:Norwegisch ISO-8859-1 norwegian.iso.kbd:fr:Norvégien ISO-8859-1 @@ -325,6 +375,7 @@ norwegian.iso.kbd:pt:Norueguês ISO-8859-1 norwegian.iso.kbd:es:Noruego ISO-8859-1 norwegian.dvorak.kbd:en:Norwegian dvorak +norwegian.dvorak.kbd:da:Norsk dvorak norwegian.dvorak.kbd:no:Norsk dvorak norwegian.dvorak.kbd:de:Norwegisch dvorak norwegian.dvorak.kbd:fr:Norvégien dvorak @@ -332,6 +383,7 @@ norwegian.dvorak.kbd:pt:Norueguês dvorak norwegian.dvorak.kbd:es:Noruego Idvorak pl_PL.ISO8859-2.kbd:en:Polish ISO-8859-2 (programmer's) +pl_PL.ISO8859-2.kbd:da:Polsk ISO-8859-2 (programmør) pl_PL.ISO8859-2.kbd:de:Polnisch ISO-8859-2 (für Programmierer) pl_PL.ISO8859-2.kbd:fr:Polonais ISO-8859-2 (pour programmeurs) pl_PL.ISO8859-2.kbd:pl:Polska ISO-8859-2 (programisty) @@ -339,6 +391,7 @@ pl_PL.ISO8859-2.kbd:pt:Polonês ISO-8859-2 (para progra pl_PL.ISO8859-2.kbd:es:Polaco ISO-8859-2 (para programadores) pl_PL.dvorak.kbd:en:Polish Dvorak +pl_PL.dvorak.kbd:da:Polsk Dvorak pl_PL.dvorak.kbd:de:Polnisch Dvorak pl_PL.dvorak.kbd:fr:Polonais Dvorak pl_PL.dvorak.kbd:pl:Polska Dvorak @@ -346,18 +399,21 @@ pl_PL.dvorak.kbd:pt:Polonês Dvorak pl_PL.dvorak.kbd:es:Polaco Dvorak pt.iso.kbd:en:Portuguese ISO-8859-1 +pt.iso.kbd:da:Portugisisk ISO-8859-1 pt.iso.kbd:de:Portugisisch ISO-8859-1 pt.iso.kbd:fr:Portugais ISO-8859-1 pt.iso.kbd:pt:Português ISO-8859-1 pt.iso.kbd:es:Portugués ISO-8859-1 pt.iso.acc.kbd:en:Portuguese ISO-8859-1 (accent keys) +pt.iso.acc.kbd:da:Portugisisk ISO-8859-1 (accenttaster) pt.iso.acc.kbd:de:Portugisisch ISO-8859-1 (mit Akzenten) pt.iso.acc.kbd:fr:Portugais ISO-8859-1 (avec accents) pt.iso.acc.kbd:pt:Português ISO-8859-1 (com acentos) pt.iso.acc.kbd:es:Portugués ISO-8859-1 (con acentos) ru.cp866.kbd:en:Russian Codepage 866 (alternative) +ru.cp866.kbd:da:Russisk Codepage 866 (alternative) ru.cp866.kbd:de:Russisch Codeseite 866 (alternativ) ru.cp866.kbd:ru:òÕÓÓËÉÊ Codepage 866 (alternative) ru.cp866.kbd:fr:Russe Code page 866 (alternative) @@ -366,6 +422,7 @@ ru.cp866.kbd:es:Ruso Codepage 866 (alternativo) ru.cp866.kbd:uk:òÏÓ¦ÊÓØËÁ CP-866 (ÁÌØÔÅÒÎÁÔÉ×ÎÁ) ru.iso5.kbd:en:Russian ISO-8859-5 +ru.iso5.kbd:da:Russisk ISO-8859-5 ru.iso5.kbd:de:Russisch ISO-8859-5 ru.iso5.kbd:fr:Russe ISO-8859-5 ru.iso5.kbd:ru:òÕÓÓËÉÊ ISO-8859-5 @@ -374,6 +431,7 @@ ru.iso5.kbd:es:Ruso ISO-8859-5 ru.iso5.kbd:uk:òÏÓ¦ÊÓØËÉÊ ISO-8859-5 ru.koi8-r.kbd:en:Russian koi8-r +ru.koi8-r.kbd:da:Russisk koi8-r ru.koi8-r.kbd:de:Russisch koi8-r ru.koi8-r.kbd:ru:òÕÓÓËÉÊ koi8-r ru.koi8-r.kbd:fr:Russe koi8-r @@ -382,6 +440,7 @@ ru.koi8-r.kbd:es:Ruso koi8-r ru.koi8-r.kbd:uk:òÏÓ¦ÊÓØËÁ koi8-r ru.koi8-r.shift.kbd:en:Russian koi8-r (shift) +ru.koi8-r.shift.kbd:da:Russisk koi8-r (shift) ru.koi8-r.shift.kbd:de:Russisch koi8-r (shift) ru.koi8-r.shift.kbd:ru:òÕÓÓËÉÊ koi8-r (shift) ru.koi8-r.shift.kbd:fr:Russe koi8-r (shift) @@ -390,6 +449,7 @@ ru.koi8-r.shift.kbd:es:Ruso koi8-r (shift) ru.koi8-r.shift.kbd:uk:òÏÓ¦ÊÓØËÁ koi8-r (shift) ru.koi8-r.win.kbd:en:Russian koi8-r (winkeys) +ru.koi8-r.win.kbd:da:Russisk koi8-r (win-taster) ru.koi8-r.win.kbd:de:Russisch koi8-r (winkeys) ru.koi8-r.win.kbd:ru:òÕÓÓËÉÊ koi8-r (winkeys) ru.koi8-r.win.kbd:fr:Russe koi8-r (winkeys) @@ -398,198 +458,233 @@ ru.koi8-r.win.kbd:es:Ruso koi8-r (winkeys) ru.koi8-r.win.kbd:uk:òÏÓ¦ÊÓØËÁ koi8-r (winkeys) spanish.dvorak.kbd:en:Spanish Dvorak +spanish.dvorak.kbd:da:Spansk Dvorak spanish.dvorak.kbd:de:Spanisch Dvorak spanish.dvorak.kbd:fr:Espagnol Dvorak spanish.dvorak.kbd:pt:Espanhol Dvorak spanish.dvorak.kbd:es:Español Dvorak spanish.iso.kbd:en:Spanish ISO-8859-1 +spanish.iso.kbd:da:Spansk ISO-8859-1 spanish.iso.kbd:de:Spanisch ISO-8859-1 spanish.iso.kbd:fr:Espagnol ISO-8859-1 spanish.iso.kbd:pt:Espanhol ISO-8859-1 spanish.iso.kbd:es:Español ISO-8859-1 spanish.iso.acc.kbd:en:Spanish ISO-8859-1 (accent keys) +spanish.iso.acc.kbd:da:Spansk ISO-8859-1 (accenttaster) spanish.iso.acc.kbd:de:Spanisch ISO-8859-1 (accent keys) spanish.iso.acc.kbd:fr:Espagnol ISO-8859-1 (avec accents) spanish.iso.acc.kbd:pt:Espanhol ISO-8859-1 (com acentos) spanish.iso.acc.kbd:es:Español ISO-8859-1 (con acentos) spanish.iso15.acc.kbd:en:Spanish ISO-8859-15 (accent keys) +spanish.iso15.acc.kbd:da:Spansk ISO-8859-15 (accenttaster) spanish.iso15.acc.kbd:de:Spanisch ISO-8859-15 (accent keys) spanish.iso15.acc.kbd:fr:Espagnol ISO-8859-15 (avec accents) spanish.iso15.acc.kbd:pt:Espanhol ISO-8859-15 (com acentos) spanish.iso15.acc.kbd:es:Español ISO-8859-15 (con acentos) si.iso.kbd:en:Slovenian ISO-8859-2 +si.iso.kbd:da:Slovensk ISO-8859-2 si.iso.kbd:de:Slovenisch ISO-8859-2 si.iso.kbd:fr:Slovène ISO-8859-2 si.iso.kbd:pt:Eslovênio ISO-8859-2 si.iso.kbd:es:Esloveno ISO-8859-2 sk.iso2.kbd:en:Slovak ISO-8859-2 +sk.iso2.kbd:da:Slovakisk ISO-8859-2 sk.iso2.kbd:de:Slovakisch ISO-8859-2 sk.iso2.kbd:fr:Slovène ISO-8859-2 sk.iso2.kbd:es:Eslovaco ISO-8859-2 swedish.iso.kbd:en:Swedish ISO-8859-1 +swedish.iso.kbd:da:Svensk ISO-8859-1 swedish.iso.kbd:de:Schwedisch ISO-8859-1 swedish.iso.kbd:fr:Suédois ISO-8859-1 swedish.iso.kbd:pt,es:Sueco ISO-8859-1 swedish.cp850.kbd:en:Swedish Codepage 850 +swedish.cp850.kbd:da:Svensk Codepage 850 swedish.cp850.kbd:de:Schwedisch Codeseite 850 swedish.cp850.kbd:fr:Suédois Code page 850 swedish.cp850.kbd:pt,es:Sueco Codepage 850 swissfrench.iso.kbd:en:Swiss-French ISO-8859-1 +swissfrench.iso.kbd:da:Schweizerfransk ISO-8859-1 swissfrench.iso.kbd:de:Schweiz-Französisch ISO-8859-1 swissfrench.iso.kbd:fr:Suisse-Français ISO-8859-1 swissfrench.iso.kbd:es:Francosuizo ISO-8859-1 swissfrench.iso.acc.kbd:en:Swiss-French ISO-8859-1 (accent keys) +swissfrench.iso.acc.kbd:da:Schweizerfransk ISO-8859-1 (accenttaster) swissfrench.iso.acc.kbd:de:Schweiz-Französisch ISO-8859-1 (mit Akzenten) swissfrench.iso.acc.kbd:fr:Suisse-Français ISO-8859-1 (avec accents) swissfrench.iso.acc.kbd:es:Francosuizo ISO-8859-1 (con acentos) swissfrench.cp850.kbd:en:Swiss-French Codepage 850 +swissfrench.cp850.kbd:da:Schweizerfransk Codepage 850 swissfrench.cp850.kbd:de:Schweiz-Französisch Codeseite 850 swissfrench.cp850.kbd:fr:Suisse-Français Code Page 850 swissfrench.cp850.kbd:es:Francosuizo Codepage 850 swissgerman.iso.kbd:en:Swiss-German ISO-8859-1 +swissgerman.iso.kbd:da:Schweizertysk ISO-8859-1 swissgerman.iso.kbd:de:Schweiz-Deutsch ISO-8859-1 swissgerman.iso.kbd:fr:Suisse-Allemand ISO-8859-1 swissgerman.iso.kbd:pt:Suiço-Alemão ISO-8859-1 swissgerman.iso.kbd:es:Germanosuizo ISO-8859-1 swissgerman.iso.acc.kbd:en:Swiss-German ISO-8859-1 (accent keys) +swissgerman.iso.acc.kbd:da:Schweizertysk ISO-8859-1 (accenttaster) swissgerman.iso.acc.kbd:de:Schweiz-Deutsch ISO-8859-1 (mit Akzenten) swissgerman.iso.acc.kbd:fr:Suisse-Allemand ISO-8859-1 (avec accents) swissgerman.iso.acc.kbd:pt:Suiço-Alemão ISO-8859-1 (com acentos) swissgerman.iso.acc.kbd:es:Germanosuizo ISO-8859-1 (con acentos) swissgerman.cp850.kbd:en:Swiss-German Codepage 850 +swissgerman.cp850.kbd:da:Schweizertysk Codepage 850 swissgerman.cp850.kbd:de:Schweiz-Deutsch Codeseite 850 swissgerman.cp850.kbd:fr:Suisse-Allemand Code Page 850 swissgerman.cp850.kbd:pt:Suiço-Alemão Codepage 850 swissgerman.cp850.kbd:es:Germanosuizo Codepage 850 swissgerman.macbook.acc.kbd:en:Swiss-German Macbook/Macbook Pro (accent keys) +swissgerman.macbook.acc.kbd:da:Schweizertysk MacBook/MacBook Pro (accenttaster) swissgerman.macbook.acc.kbd:de:Schweiz-Deutsch Macbook/Macbook Pro (mit Akzenten) swissgerman.macbook.acc.kbd:fr:Suisse-Allemand Macbook/Macbook Pro (avec accents) swissgerman.macbook.acc.kbd:pt:Suiço-Alemão Macbook/Macbook Pro (com acentos) swissgerman.macbook.acc.kbd:es:Germanosuizo Macbook/Macbook Pro (con acentos) tr.iso9.q.kbd:en:Turkish ISO-8859-9 +tr.iso9.q.kbd:da:Tyrkisk ISO-8859-9 tr.iso9.q.kbd:de:Türkisch ISO-8859-9 tr.iso9.q.kbd:fr:Turc ISO-8859-9 tr.iso9.q.kbd:uk:ôÕÒÅÃØËÁ ISO-8859-9 uk.iso.kbd:en:United Kingdom ISO-8859-1 +uk.iso.kbd:da:Storbritannien ISO-8859-1 uk.iso.kbd:de:Vereinigtes Königreich ISO-8859-1 uk.iso.kbd:fr:Royaume Uni ISO-8859-1 uk.iso.kbd:pt:Reino Unido ISO-8859-1 uk.iso.kbd:es:Británico ISO-8859-1 uk.iso-ctrl.kbd:en:United Kingdom ISO-8859-1 (Caps Lock acts as Left Ctrl) +uk.iso-ctrl.kbd:da:Storbritannien ISO-8859-1 (Caps Lock fungerer som venstre Ctrl) uk.iso-ctrl.kbd:de:Vereinigtes Königreich ISO-8859-1 (Caps Lock als linke Strg) #uk.iso-ctrl.kbd:fr:Royaume Uni ISO-8859-1 (caps lock acts as Left Ctrl) #uk.iso-ctrl.kbd:pt:Reino Unido ISO-8859-1 (caps lock acts as Left Ctrl) #uk.iso-ctrl.kbd:es:Británico ISO-8859-1 (caps lock acts as Left Ctrl) uk.cp850.kbd:en:United Kingdom Codepage 850 +uk.cp850.kbd:da:Storbritannien Codepage 850 uk.cp850.kbd:de:Vereinigtes Königreich Codeseite 850 uk.cp850.kbd:fr:Royaume Uni Code page 850 uk.cp850.kbd:pt:Reino Unido Codepage 850 uk.cp850.kbd:es:Británico Codepage 850 uk.cp850-ctrl.kbd:en:United Kingdom Codepage 850 (Caps Lock acts as Left Ctrl) +uk.cp850-ctrl.kbd:da:Storbritannien Codepage 850 (Caps Lock fungerer som venstre Ctrl) uk.cp850.kbd:de:Vereinigtes Königreich ISO-8859-1 (Caps Lock als linke Strg) #uk.cp850.kbd:fr:Royaume Uni ISO-8859-1 (caps lock acts as Left Ctrl) #uk.cp850.kbd:pt:Reino Unido ISO-8859-1 (caps lock acts as Left Ctrl) #uk.cp850.kbd:es:Británico ISO-8859-1 (caps lock acts as Left Ctrl) uk.dvorak.kbd:en:United Kingdom Dvorak +uk.dvorak.kbd:da:Storbritannien Dvorak uk.dvorak.kbd:de:Vereinigtes Königreich Dvorak uk.dvorak.kbd:fr:Royaume Uni Dvorak uk.dvorak.kbd:pt:Reino Unido Dvorak uk.dvorak.kbd:es:Británico Dvorak us.iso.kbd:en:United States of America ISO-8859-1 +us.iso.kbd:da:USA ISO-8859-1 us.iso.kbd:de:US-amerikanisch ISO-8859-1 us.iso.kbd:fr:États Unis d'Amérique ISO-8859-1 us.iso.kbd:pt:Estados Unidos da América ISO-8859-1 us.iso.kbd:es:Estadounidense ISO-8859-1 us.iso.acc.kbd:en:United States of America ISO-8859-1 (accent keys) +us.iso.acc.kbd:da:USA ISO-8859-1 (accenttaster) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Thu Sep 24 10:40:50 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5469B3F38A2; Thu, 24 Sep 2020 10:40:50 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bxs5Z1MRVz4HDn; Thu, 24 Sep 2020 10:40:50 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1315320A56; Thu, 24 Sep 2020 10:40:50 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08OAen4n016869; Thu, 24 Sep 2020 10:40:49 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08OAenSj016868; Thu, 24 Sep 2020 10:40:49 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202009241040.08OAenSj016868@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 24 Sep 2020 10:40:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366110 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 366110 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 24 Sep 2020 10:40:50 -0000 Author: andrew Date: Thu Sep 24 10:40:49 2020 New Revision: 366110 URL: https://svnweb.freebsd.org/changeset/base/366110 Log: Ensure arm64 DMA alignment is passed from parents to children This ensures the alignment check will take these alignments into account. Sponsored by: Innovate UK Modified: head/sys/arm64/arm64/busdma_machdep.c Modified: head/sys/arm64/arm64/busdma_machdep.c ============================================================================== --- head/sys/arm64/arm64/busdma_machdep.c Thu Sep 24 09:06:04 2020 (r366109) +++ head/sys/arm64/arm64/busdma_machdep.c Thu Sep 24 10:40:49 2020 (r366110) @@ -167,6 +167,7 @@ common_bus_dma_tag_create(struct bus_dma_tag_common *p common->impl = parent->impl; common->lowaddr = MIN(parent->lowaddr, common->lowaddr); common->highaddr = MAX(parent->highaddr, common->highaddr); + common->alignment = MAX(parent->alignment, common->alignment); if (common->boundary == 0) common->boundary = parent->boundary; else if (parent->boundary != 0) { From owner-svn-src-head@freebsd.org Thu Sep 24 10:42:29 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 16EE23F3773; Thu, 24 Sep 2020 10:42:29 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bxs7S6BdSz4HGL; Thu, 24 Sep 2020 10:42:28 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B9422206BC; Thu, 24 Sep 2020 10:42:28 +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 08OAgSB0021653; Thu, 24 Sep 2020 10:42:28 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08OAgSjF021652; Thu, 24 Sep 2020 10:42:28 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202009241042.08OAgSjF021652@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 24 Sep 2020 10:42:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366111 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 366111 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 24 Sep 2020 10:42:29 -0000 Author: andrew Date: Thu Sep 24 10:42:28 2020 New Revision: 366111 URL: https://svnweb.freebsd.org/changeset/base/366111 Log: Clean up the arm64 bus_dma_run_filter - We can exit the loop as soon as the filter check passes. - The alignment check has already passed so there is no need to also run it here. Sponsored by: Innovate UK Modified: head/sys/arm64/arm64/busdma_machdep.c Modified: head/sys/arm64/arm64/busdma_machdep.c ============================================================================== --- head/sys/arm64/arm64/busdma_machdep.c Thu Sep 24 10:40:49 2020 (r366110) +++ head/sys/arm64/arm64/busdma_machdep.c Thu Sep 24 10:42:28 2020 (r366111) @@ -99,19 +99,17 @@ bus_dma_dflt_lock(void *arg, bus_dma_lock_op_t op) int bus_dma_run_filter(struct bus_dma_tag_common *tc, bus_addr_t paddr) { - int retval; - retval = 0; - do { - if (((paddr > tc->lowaddr && paddr <= tc->highaddr) || - ((paddr & (tc->alignment - 1)) != 0)) && + while (tc != NULL) { + if ((paddr > tc->lowaddr && paddr <= tc->highaddr) && (tc->filter == NULL || (*tc->filter)(tc->filterarg, paddr) != 0)) - retval = 1; + return (1); tc = tc->parent; - } while (retval == 0 && tc != NULL); - return (retval); + } + + return (0); } int From owner-svn-src-head@freebsd.org Thu Sep 24 10:57:43 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A5FE63F3A6B; Thu, 24 Sep 2020 10:57:43 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxsT34Gw7z4HW9; Thu, 24 Sep 2020 10:57:43 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 75D8020B5B; Thu, 24 Sep 2020 10:57:43 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08OAvhiw028102; Thu, 24 Sep 2020 10:57:43 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08OAveLa028086; Thu, 24 Sep 2020 10:57:40 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202009241057.08OAveLa028086@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Thu, 24 Sep 2020 10:57:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366112 - in head/sys: dev/ath dev/bwn dev/iwn dev/malo dev/mwl net80211 X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: in head/sys: dev/ath dev/bwn dev/iwn dev/malo dev/mwl net80211 X-SVN-Commit-Revision: 366112 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 24 Sep 2020 10:57:43 -0000 Author: bz Date: Thu Sep 24 10:57:39 2020 New Revision: 366112 URL: https://svnweb.freebsd.org/changeset/base/366112 Log: Provide MS() and SM() macros for 80211 and wireless drivers. We have (two versions) of MS() and SM() macros which we use throughout the wireless code. Change all but three places (ath_hal, rtwn, and rsu) to the newly provided _IEEE80211_MASKSHIFT() and _IEEE80211_SHIFTMASK() macros. Also change one internal case using both _S and _M instead of just _S away from _M (one of the reasons rtwn and rsu were not changed). This was done semi-mechanically. No functional changes intended. Requested by: gnn (D26091) Reviewed by: adrian (pre line wrap) MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC (d/b/a "Netgate") Differential Revision: https://reviews.freebsd.org/D26539 Modified: head/sys/dev/ath/if_ath_tx.c head/sys/dev/ath/if_ath_tx_ht.c head/sys/dev/bwn/if_bwn.c head/sys/dev/iwn/if_iwn.c head/sys/dev/malo/if_malo.c head/sys/dev/mwl/if_mwl.c head/sys/net80211/ieee80211_freebsd.c head/sys/net80211/ieee80211_ht.c head/sys/net80211/ieee80211_ioctl.c head/sys/net80211/ieee80211_output.c head/sys/net80211/ieee80211_regdomain.c head/sys/net80211/ieee80211_sta.c head/sys/net80211/ieee80211_superg.c head/sys/net80211/ieee80211_var.h head/sys/net80211/ieee80211_vht.c Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Thu Sep 24 10:42:28 2020 (r366111) +++ head/sys/dev/ath/if_ath_tx.c Thu Sep 24 10:57:39 2020 (r366112) @@ -2598,7 +2598,6 @@ ieee80211_is_action(struct ieee80211_frame *wh) return 1; } -#define MS(_v, _f) (((_v) & _f) >> _f##_S) /* * Return an alternate TID for ADDBA request frames. * @@ -2637,11 +2636,10 @@ ath_tx_action_frame_override_queue(struct ath_softc *s /* Extract TID, return it */ baparamset = le16toh(ia->rq_baparamset); - *tid = (int) MS(baparamset, IEEE80211_BAPS_TID); + *tid = (int) _IEEE80211_MASKSHIFT(baparamset, IEEE80211_BAPS_TID); return 1; } -#undef MS /* Per-node software queue operations */ Modified: head/sys/dev/ath/if_ath_tx_ht.c ============================================================================== --- head/sys/dev/ath/if_ath_tx_ht.c Thu Sep 24 10:42:28 2020 (r366111) +++ head/sys/dev/ath/if_ath_tx_ht.c Thu Sep 24 10:57:39 2020 (r366112) @@ -406,7 +406,6 @@ static int ath_compute_num_delims(struct ath_softc *sc, struct ath_buf *first_bf, uint16_t pktlen, int is_first) { -#define MS(_v, _f) (((_v) & _f) >> _f##_S) const HAL_RATE_TABLE *rt = sc->sc_currates; struct ieee80211_node *ni = first_bf->bf_node; struct ieee80211vap *vap = ni->ni_vap; @@ -421,7 +420,8 @@ ath_compute_num_delims(struct ath_softc *sc, struct at /* * Get the advertised density from the node. */ - peer_mpdudensity = MS(ni->ni_htparam, IEEE80211_HTCAP_MPDUDENSITY); + peer_mpdudensity = + _IEEE80211_MASKSHIFT(ni->ni_htparam, IEEE80211_HTCAP_MPDUDENSITY); /* * vap->iv_ampdu_density is a net80211 value, rather than the actual @@ -528,7 +528,6 @@ ath_compute_num_delims(struct ath_softc *sc, struct at __func__, pktlen, minlen, rix, rc, width, half_gi, ndelim); return ndelim; -#undef MS } /* @@ -568,7 +567,6 @@ ath_get_aggr_limit(struct ath_softc *sc, struct ieee80 { struct ieee80211vap *vap = ni->ni_vap; -#define MS(_v, _f) (((_v) & _f) >> _f##_S) int amin = ATH_AGGR_MAXSIZE; int i; @@ -583,8 +581,8 @@ ath_get_aggr_limit(struct ath_softc *sc, struct ieee80 * Check the HTCAP field for the maximum size the node has * negotiated. If it's smaller than what we have, cap it there. */ - amin = MIN(amin, ath_rx_ampdu_to_byte(MS(ni->ni_htparam, - IEEE80211_HTCAP_MAXRXAMPDU))); + amin = MIN(amin, ath_rx_ampdu_to_byte( + _IEEE80211_MASKSHIFT(ni->ni_htparam, IEEE80211_HTCAP_MAXRXAMPDU))); for (i = 0; i < ATH_RC_NUM; i++) { if (bf->bf_state.bfs_rc[i].tries == 0) @@ -598,11 +596,10 @@ ath_get_aggr_limit(struct ath_softc *sc, struct ieee80 __func__, sc->sc_aggr_limit, vap->iv_ampdu_limit, - MS(ni->ni_htparam, IEEE80211_HTCAP_MAXRXAMPDU), + _IEEE80211_MASKSHIFT(ni->ni_htparam, IEEE80211_HTCAP_MAXRXAMPDU), amin); return amin; -#undef MS } /* Modified: head/sys/dev/bwn/if_bwn.c ============================================================================== --- head/sys/dev/bwn/if_bwn.c Thu Sep 24 10:42:28 2020 (r366111) +++ head/sys/dev/bwn/if_bwn.c Thu Sep 24 10:57:39 2020 (r366112) @@ -2122,7 +2122,6 @@ bwn_stop(struct bwn_softc *sc) static void bwn_wme_clear(struct bwn_softc *sc) { -#define MS(_v, _f) (((_v) & _f) >> _f##_S) struct wmeParams *p; unsigned int i; @@ -2137,29 +2136,37 @@ bwn_wme_clear(struct bwn_softc *sc) p->wmep_txopLimit = 0; p->wmep_aifsn = 2; /* XXX FIXME: log2(cwmin) */ - p->wmep_logcwmin = MS(0x0001, WME_PARAM_LOGCWMIN); - p->wmep_logcwmax = MS(0x0001, WME_PARAM_LOGCWMAX); + p->wmep_logcwmin = + _IEEE80211_MASKSHIFT(0x0001, WME_PARAM_LOGCWMIN); + p->wmep_logcwmax = + _IEEE80211_MASKSHIFT(0x0001, WME_PARAM_LOGCWMAX); break; case BWN_WME_VIDEO: p->wmep_txopLimit = 0; p->wmep_aifsn = 2; /* XXX FIXME: log2(cwmin) */ - p->wmep_logcwmin = MS(0x0001, WME_PARAM_LOGCWMIN); - p->wmep_logcwmax = MS(0x0001, WME_PARAM_LOGCWMAX); + p->wmep_logcwmin = + _IEEE80211_MASKSHIFT(0x0001, WME_PARAM_LOGCWMIN); + p->wmep_logcwmax = + _IEEE80211_MASKSHIFT(0x0001, WME_PARAM_LOGCWMAX); break; case BWN_WME_BESTEFFORT: p->wmep_txopLimit = 0; p->wmep_aifsn = 3; /* XXX FIXME: log2(cwmin) */ - p->wmep_logcwmin = MS(0x0001, WME_PARAM_LOGCWMIN); - p->wmep_logcwmax = MS(0x03ff, WME_PARAM_LOGCWMAX); + p->wmep_logcwmin = + _IEEE80211_MASKSHIFT(0x0001, WME_PARAM_LOGCWMIN); + p->wmep_logcwmax = + _IEEE80211_MASKSHIFT(0x03ff, WME_PARAM_LOGCWMAX); break; case BWN_WME_BACKGROUND: p->wmep_txopLimit = 0; p->wmep_aifsn = 7; /* XXX FIXME: log2(cwmin) */ - p->wmep_logcwmin = MS(0x0001, WME_PARAM_LOGCWMIN); - p->wmep_logcwmax = MS(0x03ff, WME_PARAM_LOGCWMAX); + p->wmep_logcwmin = + _IEEE80211_MASKSHIFT(0x0001, WME_PARAM_LOGCWMIN); + p->wmep_logcwmax = + _IEEE80211_MASKSHIFT(0x03ff, WME_PARAM_LOGCWMAX); break; default: KASSERT(0 == 1, ("%s:%d: fail", __func__, __LINE__)); @@ -4612,14 +4619,13 @@ static void bwn_wme_loadparams(struct bwn_mac *mac, const struct wmeParams *p, uint16_t shm_offset) { -#define SM(_v, _f) (((_v) << _f##_S) & _f) struct bwn_softc *sc = mac->mac_sc; uint16_t params[BWN_NR_WMEPARAMS]; int slot, tmp; unsigned int i; slot = BWN_READ_2(mac, BWN_RNG) & - SM(p->wmep_logcwmin, WME_PARAM_LOGCWMIN); + _IEEE80211_SHIFTMASK(p->wmep_logcwmin, WME_PARAM_LOGCWMIN); memset(¶ms, 0, sizeof(params)); @@ -4628,9 +4634,12 @@ bwn_wme_loadparams(struct bwn_mac *mac, p->wmep_logcwmin, p->wmep_logcwmax, p->wmep_aifsn); params[BWN_WMEPARAM_TXOP] = p->wmep_txopLimit * 32; - params[BWN_WMEPARAM_CWMIN] = SM(p->wmep_logcwmin, WME_PARAM_LOGCWMIN); - params[BWN_WMEPARAM_CWMAX] = SM(p->wmep_logcwmax, WME_PARAM_LOGCWMAX); - params[BWN_WMEPARAM_CWCUR] = SM(p->wmep_logcwmin, WME_PARAM_LOGCWMIN); + params[BWN_WMEPARAM_CWMIN] = + _IEEE80211_SHIFTMASK(p->wmep_logcwmin, WME_PARAM_LOGCWMIN); + params[BWN_WMEPARAM_CWMAX] = + _IEEE80211_SHIFTMASK(p->wmep_logcwmax, WME_PARAM_LOGCWMAX); + params[BWN_WMEPARAM_CWCUR] = + _IEEE80211_SHIFTMASK(p->wmep_logcwmin, WME_PARAM_LOGCWMIN); params[BWN_WMEPARAM_AIFS] = p->wmep_aifsn; params[BWN_WMEPARAM_BSLOTS] = slot; params[BWN_WMEPARAM_REGGAP] = slot + p->wmep_aifsn; Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Thu Sep 24 10:42:28 2020 (r366111) +++ head/sys/dev/iwn/if_iwn.c Thu Sep 24 10:57:39 2020 (r366112) @@ -7442,7 +7442,6 @@ static int iwn_ampdu_rx_start(struct ieee80211_node *ni, struct ieee80211_rx_ampdu *rap, int baparamset, int batimeout, int baseqctl) { -#define MS(_v, _f) (((_v) & _f) >> _f##_S) struct iwn_softc *sc = ni->ni_ic->ic_softc; struct iwn_ops *ops = &sc->ops; struct iwn_node *wn = (void *)ni; @@ -7453,8 +7452,8 @@ iwn_ampdu_rx_start(struct ieee80211_node *ni, struct i DPRINTF(sc, IWN_DEBUG_TRACE, "->Doing %s\n", __func__); - tid = MS(le16toh(baparamset), IEEE80211_BAPS_TID); - ssn = MS(le16toh(baseqctl), IEEE80211_BASEQ_START); + tid = _IEEE80211_MASKSHIFT(le16toh(baparamset), IEEE80211_BAPS_TID); + ssn = _IEEE80211_MASKSHIFT(le16toh(baseqctl), IEEE80211_BASEQ_START); if (wn->id == IWN_ID_UNDEFINED) return (ENOENT); @@ -7471,7 +7470,6 @@ iwn_ampdu_rx_start(struct ieee80211_node *ni, struct i if (error != 0) return error; return sc->sc_ampdu_rx_start(ni, rap, baparamset, batimeout, baseqctl); -#undef MS } /* Modified: head/sys/dev/malo/if_malo.c ============================================================================== --- head/sys/dev/malo/if_malo.c Thu Sep 24 10:42:28 2020 (r366111) +++ head/sys/dev/malo/if_malo.c Thu Sep 24 10:57:39 2020 (r366112) @@ -918,10 +918,6 @@ malo_fix2rate(int fix_rate) return (fix_rate < nitems(rates) ? rates[fix_rate] : 0); } -/* idiomatic shorthands: MS = mask+shift, SM = shift+mask */ -#define MS(v,x) (((v) & x) >> x##_S) -#define SM(v,x) (((v) << x##_S) & x) - /* * Process completed xmit descriptors from the specified queue. */ @@ -962,7 +958,8 @@ malo_tx_processq(struct malo_softc *sc, struct malo_tx status = le32toh(ds->status); if (status & MALO_TXD_STATUS_OK) { uint16_t format = le16toh(ds->format); - uint8_t txant = MS(format, MALO_TXD_ANTENNA); + uint8_t txant =_IEEE80211_MASKSHIFT( + format, MALO_TXD_ANTENNA); sc->malo_stats.mst_ant_tx[txant]++; if (status & MALO_TXD_STATUS_OK_RETRY) Modified: head/sys/dev/mwl/if_mwl.c ============================================================================== --- head/sys/dev/mwl/if_mwl.c Thu Sep 24 10:42:28 2020 (r366111) +++ head/sys/dev/mwl/if_mwl.c Thu Sep 24 10:57:39 2020 (r366112) @@ -83,10 +83,6 @@ __FBSDID("$FreeBSD$"); #include #include -/* idiomatic shorthands: MS = mask+shift, SM = shift+mask */ -#define MS(v,x) (((v) & x) >> x##_S) -#define SM(v,x) (((v) << x##_S) & x) - static struct ieee80211vap *mwl_vap_create(struct ieee80211com *, const char [IFNAMSIZ], int, enum ieee80211_opmode, int, const uint8_t [IEEE80211_ADDR_LEN], @@ -1231,8 +1227,8 @@ mwl_reset_vap(struct ieee80211vap *vap, int state) vap->iv_opmode == IEEE80211_M_MBSS || vap->iv_opmode == IEEE80211_M_IBSS)) { mwl_setapmode(vap, vap->iv_bss->ni_chan); - mwl_hal_setnprotmode(hvap, - MS(ic->ic_curhtprotmode, IEEE80211_HTINFO_OPMODE)); + mwl_hal_setnprotmode(hvap, _IEEE80211_MASKSHIFT( + ic->ic_curhtprotmode, IEEE80211_HTINFO_OPMODE)); return mwl_beacon_setup(vap); } return 0; @@ -1863,8 +1859,8 @@ mwl_beacon_update(struct ieee80211vap *vap, int item) mwl_updateslot(ic); break; case IEEE80211_BEACON_HTINFO: - mwl_hal_setnprotmode(hvap, - MS(ic->ic_curhtprotmode, IEEE80211_HTINFO_OPMODE)); + mwl_hal_setnprotmode(hvap, _IEEE80211_MASKSHIFT( + ic->ic_curhtprotmode, IEEE80211_HTINFO_OPMODE)); break; case IEEE80211_BEACON_CAPS: case IEEE80211_BEACON_WME: @@ -3045,13 +3041,13 @@ mwl_calcformat(uint8_t rate, const struct ieee80211_no { uint16_t fmt; - fmt = SM(3, EAGLE_TXD_ANTENNA) + fmt = _IEEE80211_SHIFTMASK(3, EAGLE_TXD_ANTENNA) | (IEEE80211_IS_CHAN_HT40D(ni->ni_chan) ? EAGLE_TXD_EXTCHAN_LO : EAGLE_TXD_EXTCHAN_HI); if (rate & IEEE80211_RATE_MCS) { /* HT MCS */ fmt |= EAGLE_TXD_FORMAT_HT /* NB: 0x80 implicitly stripped from ucastrate */ - | SM(rate, EAGLE_TXD_RATE); + | _IEEE80211_SHIFTMASK(rate, EAGLE_TXD_RATE); /* XXX short/long GI may be wrong; re-check */ if (IEEE80211_IS_CHAN_HT40(ni->ni_chan)) { fmt |= EAGLE_TXD_CHW_40 @@ -3064,7 +3060,8 @@ mwl_calcformat(uint8_t rate, const struct ieee80211_no } } else { /* legacy rate */ fmt |= EAGLE_TXD_FORMAT_LEGACY - | SM(mwl_cvtlegacyrate(rate), EAGLE_TXD_RATE) + | _IEEE80211_SHIFTMASK(mwl_cvtlegacyrate(rate), + EAGLE_TXD_RATE) | EAGLE_TXD_CHW_20 /* XXX iv_flags & IEEE80211_F_SHPREAMBLE? */ | (ni->ni_capinfo & IEEE80211_CAPINFO_SHORT_PREAMBLE ? @@ -3365,7 +3362,8 @@ mwl_tx_processq(struct mwl_softc *sc, struct mwl_txq * status = le32toh(ds->Status); if (status & EAGLE_TXD_STATUS_OK) { uint16_t Format = le16toh(ds->Format); - uint8_t txant = MS(Format, EAGLE_TXD_ANTENNA); + uint8_t txant = _IEEE80211_MASKSHIFT(Format, + EAGLE_TXD_ANTENNA); sc->sc_stats.mst_ant_tx[txant]++; if (status & EAGLE_TXD_STATUS_OK_RETRY) @@ -3374,7 +3372,8 @@ mwl_tx_processq(struct mwl_softc *sc, struct mwl_txq * sc->sc_stats.mst_tx_mretries++; if (txq->qnum >= MWL_WME_AC_VO) ic->ic_wme.wme_hipri_traffic++; - ni->ni_txrate = MS(Format, EAGLE_TXD_RATE); + ni->ni_txrate = _IEEE80211_MASKSHIFT(Format, + EAGLE_TXD_RATE); if ((Format & EAGLE_TXD_FORMAT_HT) == 0) { ni->ni_txrate = mwl_cvtlegacyrix( ni->ni_txrate); @@ -3557,7 +3556,8 @@ mwl_recv_action(struct ieee80211_node *ni, const struc mwl_hal_setmimops(sc->sc_mh, ni->ni_macaddr, mps->am_control & IEEE80211_A_HT_MIMOPWRSAVE_ENA, - MS(mps->am_control, IEEE80211_A_HT_MIMOPWRSAVE_MODE)); + _IEEE80211_MASKSHIFT(mps->am_control, + IEEE80211_A_HT_MIMOPWRSAVE_MODE)); return 0; } else return sc->sc_recv_action(ni, wh, frm, efrm); @@ -3660,7 +3660,7 @@ mwl_addba_response(struct ieee80211_node *ni, struct i * we know resources are available because we * pre-allocated one before forming the request. */ - bufsiz = MS(baparamset, IEEE80211_BAPS_BUFSIZ); + bufsiz = _IEEE80211_MASKSHIFT(baparamset, IEEE80211_BAPS_BUFSIZ); if (bufsiz == 0) bufsiz = IEEE80211_AGGR_BAWMAX; error = mwl_hal_bastream_create(MWL_VAP(vap)->mv_hvap, Modified: head/sys/net80211/ieee80211_freebsd.c ============================================================================== --- head/sys/net80211/ieee80211_freebsd.c Thu Sep 24 10:42:28 2020 (r366111) +++ head/sys/net80211/ieee80211_freebsd.c Thu Sep 24 10:57:39 2020 (r366112) @@ -319,7 +319,6 @@ ieee80211_sysctl_vdetach(struct ieee80211vap *vap) } } -#define MS(_v, _f) (((_v) & _f##_M) >> _f##_S) int ieee80211_com_vincref(struct ieee80211vap *vap) { @@ -332,7 +331,8 @@ ieee80211_com_vincref(struct ieee80211vap *vap) return (ENETDOWN); } - if (MS(ostate, IEEE80211_COM_REF) == IEEE80211_COM_REF_MAX) { + if (_IEEE80211_MASKSHIFT(ostate, IEEE80211_COM_REF) == + IEEE80211_COM_REF_MAX) { atomic_subtract_32(&vap->iv_com_state, IEEE80211_COM_REF_ADD); return (EOVERFLOW); } @@ -347,7 +347,7 @@ ieee80211_com_vdecref(struct ieee80211vap *vap) ostate = atomic_fetchadd_32(&vap->iv_com_state, -IEEE80211_COM_REF_ADD); - KASSERT(MS(ostate, IEEE80211_COM_REF) != 0, + KASSERT(_IEEE80211_MASKSHIFT(ostate, IEEE80211_COM_REF) != 0, ("com reference counter underflow")); (void) ostate; @@ -360,10 +360,10 @@ ieee80211_com_vdetach(struct ieee80211vap *vap) sleep_time = msecs_to_ticks(250); atomic_set_32(&vap->iv_com_state, IEEE80211_COM_DETACHED); - while (MS(atomic_load_32(&vap->iv_com_state), IEEE80211_COM_REF) != 0) + while (_IEEE80211_MASKSHIFT(atomic_load_32(&vap->iv_com_state), + IEEE80211_COM_REF) != 0) pause("comref", sleep_time); } -#undef MS int ieee80211_node_dectestref(struct ieee80211_node *ni) Modified: head/sys/net80211/ieee80211_ht.c ============================================================================== --- head/sys/net80211/ieee80211_ht.c Thu Sep 24 10:42:28 2020 (r366111) +++ head/sys/net80211/ieee80211_ht.c Thu Sep 24 10:57:39 2020 (r366112) @@ -54,10 +54,6 @@ __FBSDID("$FreeBSD$"); #include #include -/* define here, used throughout file */ -#define MS(_v, _f) (((_v) & _f) >> _f##_S) -#define SM(_v, _f) (((_v) << _f##_S) & _f) - const struct ieee80211_mcs_rates ieee80211_htrates[IEEE80211_HTRATE_MAXSIZE] = { { 13, 14, 27, 30 }, /* MCS 0 */ { 26, 29, 54, 60 }, /* MCS 1 */ @@ -703,7 +699,7 @@ ampdu_rx_start(struct ieee80211_node *ni, struct ieee8 int baparamset, int batimeout, int baseqctl) { struct ieee80211vap *vap = ni->ni_vap; - int bufsiz = MS(baparamset, IEEE80211_BAPS_BUFSIZ); + int bufsiz = _IEEE80211_MASKSHIFT(baparamset, IEEE80211_BAPS_BUFSIZ); if (rap->rxa_flags & IEEE80211_AGGR_RUNNING) { /* @@ -715,12 +711,12 @@ ampdu_rx_start(struct ieee80211_node *ni, struct ieee8 ieee80211_ampdu_rx_init_rap(ni, rap); rap->rxa_wnd = (bufsiz == 0) ? IEEE80211_AGGR_BAWMAX : min(bufsiz, IEEE80211_AGGR_BAWMAX); - rap->rxa_start = MS(baseqctl, IEEE80211_BASEQ_START); + rap->rxa_start = _IEEE80211_MASKSHIFT(baseqctl, IEEE80211_BASEQ_START); rap->rxa_flags |= IEEE80211_AGGR_RUNNING | IEEE80211_AGGR_XCHGPEND; /* XXX this should be a configuration flag */ if ((vap->iv_htcaps & IEEE80211_HTC_RX_AMSDU_AMPDU) && - (MS(baparamset, IEEE80211_BAPS_AMSDU))) + (_IEEE80211_MASKSHIFT(baparamset, IEEE80211_BAPS_AMSDU))) rap->rxa_flags |= IEEE80211_AGGR_AMSDU; else rap->rxa_flags &= ~IEEE80211_AGGR_AMSDU; @@ -1247,7 +1243,7 @@ ieee80211_recv_bar(struct ieee80211_node *ni, struct m } wh = mtod(m0, struct ieee80211_frame_bar *); /* XXX check basic BAR */ - tid = MS(le16toh(wh->i_ctl), IEEE80211_BAR_TID); + tid = _IEEE80211_MASKSHIFT(le16toh(wh->i_ctl), IEEE80211_BAR_TID); rap = &ni->ni_rx_ampdu[tid]; if ((rap->rxa_flags & IEEE80211_AGGR_XCHGPEND) == 0) { /* @@ -1627,7 +1623,7 @@ void ieee80211_htprot_update(struct ieee80211vap *vap, int protmode) { struct ieee80211com *ic = vap->iv_ic; -#define OPMODE(x) SM(x, IEEE80211_HTINFO_OPMODE) +#define OPMODE(x) _IEEE80211_SHIFTMASK(x, IEEE80211_HTINFO_OPMODE) IEEE80211_LOCK(ic); /* track non-HT station presence */ @@ -1699,11 +1695,12 @@ htinfo_parse(struct ieee80211_node *ni, uint16_t w; ni->ni_htctlchan = htinfo->hi_ctrlchannel; - ni->ni_ht2ndchan = SM(htinfo->hi_byte1, IEEE80211_HTINFO_2NDCHAN); + ni->ni_ht2ndchan = _IEEE80211_SHIFTMASK(htinfo->hi_byte1, + IEEE80211_HTINFO_2NDCHAN); w = le16dec(&htinfo->hi_byte2); - ni->ni_htopmode = SM(w, IEEE80211_HTINFO_OPMODE); + ni->ni_htopmode = _IEEE80211_SHIFTMASK(w, IEEE80211_HTINFO_OPMODE); w = le16dec(&htinfo->hi_byte45); - ni->ni_htstbc = SM(w, IEEE80211_HTINFO_BASIC_STBCMCS); + ni->ni_htstbc = _IEEE80211_SHIFTMASK(w, IEEE80211_HTINFO_BASIC_STBCMCS); } /* @@ -1942,7 +1939,7 @@ ieee80211_vht_get_vhtflags(struct ieee80211_node *ni, if (ni->ni_flags & IEEE80211_NODE_VHT && vap->iv_flags_vht & IEEE80211_FVHT_VHT) { if ((ni->ni_vht_chanwidth == IEEE80211_VHT_CHANWIDTH_160MHZ) && /* XXX 2 means "160MHz and 80+80MHz", 1 means "160MHz" */ - (MS(vap->iv_vhtcaps, + (_IEEE80211_MASKSHIFT(vap->iv_vhtcaps, IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) >= 1) && (vap->iv_flags_vht & IEEE80211_FVHT_USEVHT160)) { vhtflags = IEEE80211_CHAN_VHT160; @@ -1954,7 +1951,7 @@ ieee80211_vht_get_vhtflags(struct ieee80211_node *ni, } } else if ((ni->ni_vht_chanwidth == IEEE80211_VHT_CHANWIDTH_80P80MHZ) && /* XXX 2 means "160MHz and 80+80MHz" */ - (MS(vap->iv_vhtcaps, + (_IEEE80211_MASKSHIFT(vap->iv_vhtcaps, IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) == 2) && (vap->iv_flags_vht & IEEE80211_FVHT_USEVHT80P80)) { vhtflags = IEEE80211_CHAN_VHT80P80; @@ -2287,7 +2284,7 @@ ieee80211_addba_request(struct ieee80211_node *ni, /* XXX locking */ tap->txa_token = dialogtoken; tap->txa_flags |= IEEE80211_AGGR_IMMEDIATE; - bufsiz = MS(baparamset, IEEE80211_BAPS_BUFSIZ); + bufsiz = _IEEE80211_MASKSHIFT(baparamset, IEEE80211_BAPS_BUFSIZ); tap->txa_wnd = (bufsiz == 0) ? IEEE80211_AGGR_BAWMAX : min(bufsiz, IEEE80211_AGGR_BAWMAX); addba_start_timeout(tap); @@ -2359,17 +2356,17 @@ ieee80211_addba_response(struct ieee80211_node *ni, /* XXX locking */ addba_stop_timeout(tap); if (status == IEEE80211_STATUS_SUCCESS) { - bufsiz = MS(baparamset, IEEE80211_BAPS_BUFSIZ); + bufsiz = _IEEE80211_MASKSHIFT(baparamset, IEEE80211_BAPS_BUFSIZ); /* XXX override our request? */ tap->txa_wnd = (bufsiz == 0) ? IEEE80211_AGGR_BAWMAX : min(bufsiz, IEEE80211_AGGR_BAWMAX); - tid = MS(baparamset, IEEE80211_BAPS_TID); + tid = _IEEE80211_MASKSHIFT(baparamset, IEEE80211_BAPS_TID); tap->txa_flags |= IEEE80211_AGGR_RUNNING; tap->txa_attempts = 0; /* TODO: this should be a vap flag */ if ((vap->iv_htcaps & IEEE80211_HTC_TX_AMSDU_AMPDU) && (ni->ni_flags & IEEE80211_NODE_AMSDU_TX) && - (MS(baparamset, IEEE80211_BAPS_AMSDU))) + (_IEEE80211_MASKSHIFT(baparamset, IEEE80211_BAPS_AMSDU))) tap->txa_flags |= IEEE80211_AGGR_AMSDU; else tap->txa_flags &= ~IEEE80211_AGGR_AMSDU; @@ -2420,17 +2417,17 @@ ht_recv_action_ba_addba_request(struct ieee80211_node batimeout = le16dec(frm+5); baseqctl = le16dec(frm+7); - tid = MS(baparamset, IEEE80211_BAPS_TID); + tid = _IEEE80211_MASKSHIFT(baparamset, IEEE80211_BAPS_TID); IEEE80211_NOTE(vap, IEEE80211_MSG_ACTION | IEEE80211_MSG_11N, ni, "recv ADDBA request: dialogtoken %u baparamset 0x%x " "(tid %d bufsiz %d) batimeout %d baseqctl %d:%d amsdu %d", dialogtoken, baparamset, - tid, MS(baparamset, IEEE80211_BAPS_BUFSIZ), + tid, _IEEE80211_MASKSHIFT(baparamset, IEEE80211_BAPS_BUFSIZ), batimeout, - MS(baseqctl, IEEE80211_BASEQ_START), - MS(baseqctl, IEEE80211_BASEQ_FRAG), - MS(baparamset, IEEE80211_BAPS_AMSDU)); + _IEEE80211_MASKSHIFT(baseqctl, IEEE80211_BASEQ_START), + _IEEE80211_MASKSHIFT(baseqctl, IEEE80211_BASEQ_FRAG), + _IEEE80211_MASKSHIFT(baparamset, IEEE80211_BAPS_AMSDU)); rap = &ni->ni_rx_ampdu[tid]; @@ -2459,8 +2456,8 @@ ht_recv_action_ba_addba_request(struct ieee80211_node } /* XXX honor rap flags? */ args[2] = IEEE80211_BAPS_POLICY_IMMEDIATE - | SM(tid, IEEE80211_BAPS_TID) - | SM(rap->rxa_wnd, IEEE80211_BAPS_BUFSIZ) + | _IEEE80211_SHIFTMASK(tid, IEEE80211_BAPS_TID) + | _IEEE80211_SHIFTMASK(rap->rxa_wnd, IEEE80211_BAPS_BUFSIZ) ; /* @@ -2495,10 +2492,10 @@ ht_recv_action_ba_addba_response(struct ieee80211_node dialogtoken = frm[2]; code = le16dec(frm+3); baparamset = le16dec(frm+5); - tid = MS(baparamset, IEEE80211_BAPS_TID); - bufsiz = MS(baparamset, IEEE80211_BAPS_BUFSIZ); - policy = MS(baparamset, IEEE80211_BAPS_POLICY); - amsdu = !! MS(baparamset, IEEE80211_BAPS_AMSDU); + tid = _IEEE80211_MASKSHIFT(baparamset, IEEE80211_BAPS_TID); + bufsiz = _IEEE80211_MASKSHIFT(baparamset, IEEE80211_BAPS_BUFSIZ); + policy = _IEEE80211_MASKSHIFT(baparamset, IEEE80211_BAPS_POLICY); + amsdu = !! _IEEE80211_MASKSHIFT(baparamset, IEEE80211_BAPS_AMSDU); batimeout = le16dec(frm+7); tap = &ni->ni_tx_ampdu[tid]; @@ -2572,12 +2569,12 @@ ht_recv_action_ba_delba(struct ieee80211_node *ni, baparamset = le16dec(frm+2); code = le16dec(frm+4); - tid = MS(baparamset, IEEE80211_DELBAPS_TID); + tid = _IEEE80211_MASKSHIFT(baparamset, IEEE80211_DELBAPS_TID); IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_ACTION | IEEE80211_MSG_11N, ni, "recv DELBA: baparamset 0x%x (tid %d initiator %d) " "code %d", baparamset, tid, - MS(baparamset, IEEE80211_DELBAPS_INIT), code); + _IEEE80211_MASKSHIFT(baparamset, IEEE80211_DELBAPS_INIT), code); if ((baparamset & IEEE80211_DELBAPS_INIT) == 0) { tap = &ni->ni_tx_ampdu[tid]; @@ -2706,8 +2703,9 @@ ieee80211_ampdu_request(struct ieee80211_node *ni, args[0] = dialogtoken; args[1] = 0; /* NB: status code not used */ args[2] = IEEE80211_BAPS_POLICY_IMMEDIATE - | SM(tid, IEEE80211_BAPS_TID) - | SM(IEEE80211_AGGR_BAWMAX, IEEE80211_BAPS_BUFSIZ) + | _IEEE80211_SHIFTMASK(tid, IEEE80211_BAPS_TID) + | _IEEE80211_SHIFTMASK(IEEE80211_AGGR_BAWMAX, + IEEE80211_BAPS_BUFSIZ) ; /* XXX TODO: this should be a flag, not iv_htcaps */ @@ -2731,8 +2729,8 @@ ieee80211_ampdu_request(struct ieee80211_node *ni, } tokens = dialogtoken; /* allocate token */ /* NB: after calling ic_addba_request so driver can set txa_start */ - args[4] = SM(tap->txa_start, IEEE80211_BASEQ_START) - | SM(0, IEEE80211_BASEQ_FRAG) + args[4] = _IEEE80211_SHIFTMASK(tap->txa_start, IEEE80211_BASEQ_START) + | _IEEE80211_SHIFTMASK(0, IEEE80211_BASEQ_FRAG) ; return ic->ic_send_action(ni, IEEE80211_ACTION_CAT_BA, IEEE80211_ACTION_BA_ADDBA_REQUEST, args); @@ -2951,9 +2949,9 @@ ieee80211_send_bar(struct ieee80211_node *ni, barctl = (tap->txa_flags & IEEE80211_AGGR_IMMEDIATE ? 0 : IEEE80211_BAR_NOACK) | IEEE80211_BAR_COMP - | SM(tid, IEEE80211_BAR_TID) + | _IEEE80211_SHIFTMASK(tid, IEEE80211_BAR_TID) ; - barseqctl = SM(seq, IEEE80211_BAR_SEQ_START); + barseqctl = _IEEE80211_SHIFTMASK(seq, IEEE80211_BAR_SEQ_START); /* NB: known to have proper alignment */ bar->i_ctl = htole16(barctl); bar->i_seq = htole16(barseqctl); @@ -3047,9 +3045,10 @@ ht_send_action_ba_addba(struct ieee80211_node *ni, "send ADDBA %s: dialogtoken %d status %d " "baparamset 0x%x (tid %d amsdu %d) batimeout 0x%x baseqctl 0x%x", (action == IEEE80211_ACTION_BA_ADDBA_REQUEST) ? - "request" : "response", - args[0], args[1], args[2], MS(args[2], IEEE80211_BAPS_TID), - MS(args[2], IEEE80211_BAPS_AMSDU), args[3], args[4]); + "request" : "response", args[0], args[1], args[2], + _IEEE80211_MASKSHIFT(args[2], IEEE80211_BAPS_TID), + _IEEE80211_MASKSHIFT(args[2], IEEE80211_BAPS_AMSDU), + args[3], args[4]); IEEE80211_DPRINTF(vap, IEEE80211_MSG_NODE, "ieee80211_ref_node (%s:%u) %p<%s> refcnt %d\n", __func__, __LINE__, @@ -3092,7 +3091,7 @@ ht_send_action_ba_delba(struct ieee80211_node *ni, uint16_t baparamset; uint8_t *frm; - baparamset = SM(args[0], IEEE80211_DELBAPS_TID) + baparamset = _IEEE80211_SHIFTMASK(args[0], IEEE80211_DELBAPS_TID) | args[1] ; IEEE80211_NOTE(vap, IEEE80211_MSG_ACTION | IEEE80211_MSG_11N, ni, @@ -3244,8 +3243,10 @@ ieee80211_add_htcap_body(uint8_t *frm, struct ieee8021 caps &= ~IEEE80211_HTCAP_CHWIDTH40; /* Start by using the advertised settings */ - rxmax = MS(ni->ni_htparam, IEEE80211_HTCAP_MAXRXAMPDU); - density = MS(ni->ni_htparam, IEEE80211_HTCAP_MPDUDENSITY); + rxmax = _IEEE80211_MASKSHIFT(ni->ni_htparam, + IEEE80211_HTCAP_MAXRXAMPDU); + density = _IEEE80211_MASKSHIFT(ni->ni_htparam, + IEEE80211_HTCAP_MPDUDENSITY); IEEE80211_DPRINTF(vap, IEEE80211_MSG_11N, "%s: advertised rxmax=%d, density=%d, vap rxmax=%d, density=%d\n", @@ -3308,8 +3309,8 @@ ieee80211_add_htcap_body(uint8_t *frm, struct ieee8021 ADDSHORT(frm, caps); /* HT parameters */ - *frm = SM(rxmax, IEEE80211_HTCAP_MAXRXAMPDU) - | SM(density, IEEE80211_HTCAP_MPDUDENSITY) + *frm = _IEEE80211_SHIFTMASK(rxmax, IEEE80211_HTCAP_MAXRXAMPDU) + | _IEEE80211_SHIFTMASK(density, IEEE80211_HTCAP_MPDUDENSITY) ; frm++; @@ -3397,8 +3398,8 @@ ieee80211_add_htcap_body_ch(uint8_t *frm, struct ieee8 ADDSHORT(frm, caps); /* HT parameters */ - *frm = SM(rxmax, IEEE80211_HTCAP_MAXRXAMPDU) - | SM(density, IEEE80211_HTCAP_MPDUDENSITY) + *frm = _IEEE80211_SHIFTMASK(rxmax, IEEE80211_HTCAP_MAXRXAMPDU) + | _IEEE80211_SHIFTMASK(density, IEEE80211_HTCAP_MPDUDENSITY) ; frm++; Modified: head/sys/net80211/ieee80211_ioctl.c ============================================================================== --- head/sys/net80211/ieee80211_ioctl.c Thu Sep 24 10:42:28 2020 (r366111) +++ head/sys/net80211/ieee80211_ioctl.c Thu Sep 24 10:57:39 2020 (r366112) @@ -777,7 +777,6 @@ static int ieee80211_ioctl_get80211(struct ieee80211vap *vap, u_long cmd, struct ieee80211req *ireq) { -#define MS(_v, _f) (((_v) & _f) >> _f##_S) struct ieee80211com *ic = vap->iv_ic; u_int kid, len; uint8_t tmpkey[IEEE80211_KEYBUF_SIZE]; @@ -1035,7 +1034,7 @@ ieee80211_ioctl_get80211(struct ieee80211vap *vap, u_l * XXX TODO: this isn't completely correct, as we've * negotiated the higher of the two. */ - ireq->i_val = MS(vap->iv_bss->ni_htparam, + ireq->i_val = _IEEE80211_MASKSHIFT( vap->iv_bss->ni_htparam, IEEE80211_HTCAP_MAXRXAMPDU); else ireq->i_val = vap->iv_ampdu_limit; @@ -1048,7 +1047,7 @@ ieee80211_ioctl_get80211(struct ieee80211vap *vap, u_l * XXX TODO: this isn't completely correct, as we've * negotiated the higher of the two. */ - ireq->i_val = MS(vap->iv_bss->ni_htparam, + ireq->i_val = _IEEE80211_MASKSHIFT(vap->iv_bss->ni_htparam, IEEE80211_HTCAP_MPDUDENSITY); else ireq->i_val = vap->iv_ampdu_density; @@ -1167,7 +1166,6 @@ ieee80211_ioctl_get80211(struct ieee80211vap *vap, u_l break; } return error; -#undef MS } static int Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Thu Sep 24 10:42:28 2020 (r366111) +++ head/sys/net80211/ieee80211_output.c Thu Sep 24 10:57:39 2020 (r366112) @@ -2215,7 +2215,6 @@ static uint8_t * ieee80211_add_wme_param(uint8_t *frm, struct ieee80211_wme_state *wme, int uapsd_enable) { -#define SM(_v, _f) (((_v) << _f##_S) & _f) #define ADDSHORT(frm, v) do { \ le16enc(frm, v); \ frm += 2; \ @@ -2242,17 +2241,18 @@ ieee80211_add_wme_param(uint8_t *frm, struct ieee80211 for (i = 0; i < WME_NUM_AC; i++) { const struct wmeParams *ac = &wme->wme_bssChanParams.cap_wmeParams[i]; - *frm++ = SM(i, WME_PARAM_ACI) - | SM(ac->wmep_acm, WME_PARAM_ACM) - | SM(ac->wmep_aifsn, WME_PARAM_AIFSN) + *frm++ = _IEEE80211_SHIFTMASK(i, WME_PARAM_ACI) + | _IEEE80211_SHIFTMASK(ac->wmep_acm, WME_PARAM_ACM) + | _IEEE80211_SHIFTMASK(ac->wmep_aifsn, WME_PARAM_AIFSN) ; - *frm++ = SM(ac->wmep_logcwmax, WME_PARAM_LOGCWMAX) - | SM(ac->wmep_logcwmin, WME_PARAM_LOGCWMIN) + *frm++ = _IEEE80211_SHIFTMASK(ac->wmep_logcwmax, + WME_PARAM_LOGCWMAX) + | _IEEE80211_SHIFTMASK(ac->wmep_logcwmin, + WME_PARAM_LOGCWMIN) ; ADDSHORT(frm, ac->wmep_txopLimit); } return frm; -#undef SM #undef ADDSHORT } #undef WME_OUI_BYTES Modified: head/sys/net80211/ieee80211_regdomain.c ============================================================================== --- head/sys/net80211/ieee80211_regdomain.c Thu Sep 24 10:42:28 2020 (r366111) +++ head/sys/net80211/ieee80211_regdomain.c Thu Sep 24 10:57:39 2020 (r366112) @@ -151,12 +151,12 @@ ieee80211_init_channels(struct ieee80211com *ic, if (isset(bands, IEEE80211_MODE_VHT_5GHZ)) { cbw_flags |= NET80211_CBW_FLAG_HT40; /* Make sure this is set; or assert? */ cbw_flags |= NET80211_CBW_FLAG_VHT80; -#define MS(_v, _f) (((_v) & _f) >> _f##_S) - if (MS(ic->ic_vhtcaps, IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) >= 1) + if (_IEEE80211_MASKSHIFT(ic->ic_vhtcaps, + IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) >= 1) cbw_flags |= NET80211_CBW_FLAG_VHT160; - if (MS(ic->ic_vhtcaps, IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) == 2) + if (_IEEE80211_MASKSHIFT(ic->ic_vhtcaps, + IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) == 2) cbw_flags |= NET80211_CBW_FLAG_VHT80P80; -#undef MS ieee80211_add_channel_list_5ghz(chans, IEEE80211_CHAN_MAX, nchans, def_chan_5ghz_band1, nitems(def_chan_5ghz_band1), bands, cbw_flags); Modified: head/sys/net80211/ieee80211_sta.c ============================================================================== --- head/sys/net80211/ieee80211_sta.c Thu Sep 24 10:42:28 2020 (r366111) +++ head/sys/net80211/ieee80211_sta.c Thu Sep 24 10:57:39 2020 (r366112) @@ -1161,7 +1161,6 @@ int ieee80211_parse_wmeparams(struct ieee80211vap *vap, uint8_t *frm, const struct ieee80211_frame *wh, uint8_t *qosinfo) { -#define MS(_v, _f) (((_v) & _f) >> _f##_S) struct ieee80211_wme_state *wme = &vap->iv_ic->ic_wme; u_int len = frm[1], qosinfo_count; int i; @@ -1185,10 +1184,13 @@ ieee80211_parse_wmeparams(struct ieee80211vap *vap, ui struct wmeParams *wmep = &wme->wme_wmeChanParams.cap_wmeParams[i]; /* NB: ACI not used */ - wmep->wmep_acm = MS(frm[0], WME_PARAM_ACM); - wmep->wmep_aifsn = MS(frm[0], WME_PARAM_AIFSN); - wmep->wmep_logcwmin = MS(frm[1], WME_PARAM_LOGCWMIN); - wmep->wmep_logcwmax = MS(frm[1], WME_PARAM_LOGCWMAX); + wmep->wmep_acm = _IEEE80211_MASKSHIFT(frm[0], WME_PARAM_ACM); + wmep->wmep_aifsn = + _IEEE80211_MASKSHIFT(frm[0], WME_PARAM_AIFSN); + wmep->wmep_logcwmin = + _IEEE80211_MASKSHIFT(frm[1], WME_PARAM_LOGCWMIN); + wmep->wmep_logcwmax = + _IEEE80211_MASKSHIFT(frm[1], WME_PARAM_LOGCWMAX); wmep->wmep_txopLimit = le16dec(frm+2); IEEE80211_DPRINTF(vap, IEEE80211_MSG_WME, "%s: WME: %d: acm=%d aifsn=%d logcwmin=%d logcwmax=%d txopLimit=%d\n", @@ -1203,7 +1205,6 @@ ieee80211_parse_wmeparams(struct ieee80211vap *vap, ui } wme->wme_wmeChanParams.cap_info = qosinfo_count; return 1; -#undef MS } /* Modified: head/sys/net80211/ieee80211_superg.c ============================================================================== --- head/sys/net80211/ieee80211_superg.c Thu Sep 24 10:42:28 2020 (r366111) +++ head/sys/net80211/ieee80211_superg.c Thu Sep 24 10:57:39 2020 (r366112) @@ -273,7 +273,6 @@ struct mbuf * ieee80211_ff_decap(struct ieee80211_node *ni, struct mbuf *m) { #define FF_LLC_SIZE (sizeof(struct ether_header) + sizeof(struct llc)) -#define MS(x,f) (((x) & f) >> f##_S) struct ieee80211vap *vap = ni->ni_vap; struct llc *llc; uint32_t ath; @@ -302,7 +301,7 @@ ieee80211_ff_decap(struct ieee80211_node *ni, struct m return m; m_adj(m, FF_LLC_SIZE); m_copydata(m, 0, sizeof(uint32_t), (caddr_t) &ath); - if (MS(ath, ATH_FF_PROTO) != ATH_FF_PROTO_L2TUNNEL) { + if (_IEEE80211_MASKSHIFT(ath, ATH_FF_PROTO) != ATH_FF_PROTO_L2TUNNEL) { IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_ANY, ni->ni_macaddr, "fast-frame", "unsupport tunnel protocol, header 0x%x", ath); @@ -351,7 +350,6 @@ ieee80211_ff_decap(struct ieee80211_node *ni, struct m } /* XXX verify framelen against mbuf contents */ return n; /* 2nd delivered by caller */ -#undef MS #undef FF_LLC_SIZE } Modified: head/sys/net80211/ieee80211_var.h ============================================================================== --- head/sys/net80211/ieee80211_var.h Thu Sep 24 10:42:28 2020 (r366111) +++ head/sys/net80211/ieee80211_var.h Thu Sep 24 10:57:39 2020 (r366112) @@ -735,9 +735,9 @@ MALLOC_DECLARE(M_80211_VAP); #define IEEE80211_COM_DETACHED 0x00000001 /* ieee80211_ifdetach called */ #define IEEE80211_COM_REF_ADD 0x00000002 /* add / remove reference */ -#define IEEE80211_COM_REF_M 0xfffffffe /* reference counter bits */ +#define IEEE80211_COM_REF 0xfffffffe /* reference counter bits */ #define IEEE80211_COM_REF_S 1 -#define IEEE80211_COM_REF_MAX (IEEE80211_COM_REF_M >> IEEE80211_COM_REF_S) +#define IEEE80211_COM_REF_MAX (IEEE80211_COM_REF >> IEEE80211_COM_REF_S) int ic_printf(struct ieee80211com *, const char *, ...) __printflike(2, 3); void ieee80211_ifattach(struct ieee80211com *); @@ -1012,6 +1012,10 @@ ieee80211_get_node_txpower(struct ieee80211_node *ni) "\13WME\14ACL\15WPA\16RADKEYS\17RADDUMP\20RADIUS\21DOT1XSM\22HWMP" \ "\23POWER\24STATE\25OUTPUT\26SCAN\27AUTH\30ASSOC\31NODE\32ELEMID" \ "\33XRATE\34INPUT\35CRYPTO\36DUPMPKTS\37DEBUG\04011N" + +/* Helper macros unified. */ +#define _IEEE80211_MASKSHIFT(_v, _f) (((_v) & _f) >> _f##_S) +#define _IEEE80211_SHIFTMASK(_v, _f) (((_v) << _f##_S) & _f) #ifdef IEEE80211_DEBUG #define ieee80211_msg(_vap, _m) ((_vap)->iv_debug & (_m)) Modified: head/sys/net80211/ieee80211_vht.c ============================================================================== --- head/sys/net80211/ieee80211_vht.c Thu Sep 24 10:42:28 2020 (r366111) +++ head/sys/net80211/ieee80211_vht.c Thu Sep 24 10:57:39 2020 (r366112) @@ -53,10 +53,6 @@ __FBSDID("$FreeBSD$"); #include #include -/* define here, used throughout file */ -#define MS(_v, _f) (((_v) & _f) >> _f##_S) -#define SM(_v, _f) (((_v) << _f##_S) & _f) - #define ADDSHORT(frm, v) do { \ frm[0] = (v) & 0xff; \ frm[1] = (v) >> 8; \ @@ -207,9 +203,11 @@ ieee80211_vht_announce(struct ieee80211com *ic) /* Channel width */ ic_printf(ic, "[VHT] Channel Widths: 20MHz, 40MHz, 80MHz"); - if (MS(ic->ic_vhtcaps, IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) >= 1) + if (_IEEE80211_MASKSHIFT(ic->ic_vhtcaps, + IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) >= 1) printf(" 160MHz"); - if (MS(ic->ic_vhtcaps, IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) == 2) + if (_IEEE80211_MASKSHIFT(ic->ic_vhtcaps, + IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) == 2) printf(" 80+80MHz"); printf("\n"); @@ -376,18 +374,20 @@ ieee80211_vht_get_vhtcap_ie(struct ieee80211_node *ni, */ /* Limit MPDU size to the smaller of the two */ - val2 = val1 = MS(vap->iv_vhtcaps, IEEE80211_VHTCAP_MAX_MPDU_MASK); + val2 = val1 = _IEEE80211_MASKSHIFT(vap->iv_vhtcaps, + IEEE80211_VHTCAP_MAX_MPDU_MASK); if (opmode == 1) { - val2 = MS(ni->ni_vhtcap, IEEE80211_VHTCAP_MAX_MPDU_MASK); + val2 = _IEEE80211_MASKSHIFT(ni->ni_vhtcap, + IEEE80211_VHTCAP_MAX_MPDU_MASK); } val = MIN(val1, val2); - new_vhtcap |= SM(val, IEEE80211_VHTCAP_MAX_MPDU_MASK); + new_vhtcap |= _IEEE80211_SHIFTMASK(val, IEEE80211_VHTCAP_MAX_MPDU_MASK); /* Limit supp channel config */ - val2 = val1 = MS(vap->iv_vhtcaps, + val2 = val1 = _IEEE80211_MASKSHIFT(vap->iv_vhtcaps, IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK); if (opmode == 1) { - val2 = MS(ni->ni_vhtcap, + val2 = _IEEE80211_MASKSHIFT(ni->ni_vhtcap, IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK); } if ((val2 == 2) && @@ -397,31 +397,38 @@ ieee80211_vht_get_vhtcap_ie(struct ieee80211_node *ni, ((vap->iv_flags_vht & IEEE80211_FVHT_USEVHT160) == 0)) val2 = 0; val = MIN(val1, val2); - new_vhtcap |= SM(val, IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK); + new_vhtcap |= _IEEE80211_SHIFTMASK(val, + IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK); /* RX LDPC */ - val2 = val1 = MS(vap->iv_vhtcaps, IEEE80211_VHTCAP_RXLDPC); + val2 = val1 = _IEEE80211_MASKSHIFT(vap->iv_vhtcaps, + IEEE80211_VHTCAP_RXLDPC); if (opmode == 1) { - val2 = MS(ni->ni_vhtcap, IEEE80211_VHTCAP_RXLDPC); + val2 = _IEEE80211_MASKSHIFT(ni->ni_vhtcap, + IEEE80211_VHTCAP_RXLDPC); } val = MIN(val1, val2); - new_vhtcap |= SM(val, IEEE80211_VHTCAP_RXLDPC); + new_vhtcap |= _IEEE80211_SHIFTMASK(val, IEEE80211_VHTCAP_RXLDPC); /* Short-GI 80 */ - val2 = val1 = MS(vap->iv_vhtcaps, IEEE80211_VHTCAP_SHORT_GI_80); + val2 = val1 = _IEEE80211_MASKSHIFT(vap->iv_vhtcaps, + IEEE80211_VHTCAP_SHORT_GI_80); if (opmode == 1) { - val2 = MS(ni->ni_vhtcap, IEEE80211_VHTCAP_SHORT_GI_80); + val2 = _IEEE80211_MASKSHIFT(ni->ni_vhtcap, + IEEE80211_VHTCAP_SHORT_GI_80); } val = MIN(val1, val2); - new_vhtcap |= SM(val, IEEE80211_VHTCAP_SHORT_GI_80); + new_vhtcap |= _IEEE80211_SHIFTMASK(val, IEEE80211_VHTCAP_SHORT_GI_80); /* Short-GI 160 */ - val2 = val1 = MS(vap->iv_vhtcaps, IEEE80211_VHTCAP_SHORT_GI_160); + val2 = val1 = _IEEE80211_MASKSHIFT(vap->iv_vhtcaps, + IEEE80211_VHTCAP_SHORT_GI_160); if (opmode == 1) { - val2 = MS(ni->ni_vhtcap, IEEE80211_VHTCAP_SHORT_GI_160); + val2 = _IEEE80211_MASKSHIFT(ni->ni_vhtcap, + IEEE80211_VHTCAP_SHORT_GI_160); } val = MIN(val1, val2); - new_vhtcap |= SM(val, IEEE80211_VHTCAP_SHORT_GI_160); + new_vhtcap |= _IEEE80211_SHIFTMASK(val, IEEE80211_VHTCAP_SHORT_GI_160); /* * STBC is slightly more complicated. @@ -439,28 +446,32 @@ ieee80211_vht_get_vhtcap_ie(struct ieee80211_node *ni, */ /* TX STBC */ - val2 = val1 = MS(vap->iv_vhtcaps, IEEE80211_VHTCAP_TXSTBC); + val2 = val1 = _IEEE80211_MASKSHIFT(vap->iv_vhtcaps, + IEEE80211_VHTCAP_TXSTBC); if (opmode == 1) { /* STA mode - enable it only if node RXSTBC is non-zero */ - val2 = !! MS(ni->ni_vhtcap, IEEE80211_VHTCAP_RXSTBC_MASK); + val2 = !! _IEEE80211_MASKSHIFT(ni->ni_vhtcap, + IEEE80211_VHTCAP_RXSTBC_MASK); } val = MIN(val1, val2); /* XXX For now, use the 11n config flag */ if ((vap->iv_flags_ht & IEEE80211_FHT_STBC_TX) == 0) val = 0; - new_vhtcap |= SM(val, IEEE80211_VHTCAP_TXSTBC); + new_vhtcap |= _IEEE80211_SHIFTMASK(val, IEEE80211_VHTCAP_TXSTBC); /* RX STBC1..4 */ - val2 = val1 = MS(vap->iv_vhtcaps, IEEE80211_VHTCAP_RXSTBC_MASK); + val2 = val1 = _IEEE80211_MASKSHIFT(vap->iv_vhtcaps, + IEEE80211_VHTCAP_RXSTBC_MASK); if (opmode == 1) { /* STA mode - enable it only if node TXSTBC is non-zero */ - val2 = MS(ni->ni_vhtcap, IEEE80211_VHTCAP_TXSTBC); + val2 = _IEEE80211_MASKSHIFT(ni->ni_vhtcap, + IEEE80211_VHTCAP_TXSTBC); } val = MIN(val1, val2); /* XXX For now, use the 11n config flag */ if ((vap->iv_flags_ht & IEEE80211_FHT_STBC_RX) == 0) val = 0; - new_vhtcap |= SM(val, IEEE80211_VHTCAP_RXSTBC_MASK); + new_vhtcap |= _IEEE80211_SHIFTMASK(val, IEEE80211_VHTCAP_RXSTBC_MASK); /* * Finally - if RXSTBC is 0, then don't enable TXSTBC. @@ -480,115 +491,129 @@ ieee80211_vht_get_vhtcap_ie(struct ieee80211_node *ni, */ /* SU Beamformer capable */ - val2 = val1 = MS(vap->iv_vhtcaps, + val2 = val1 = _IEEE80211_MASKSHIFT(vap->iv_vhtcaps, IEEE80211_VHTCAP_SU_BEAMFORMER_CAPABLE); if (opmode == 1) { - val2 = MS(ni->ni_vhtcap, + val2 = _IEEE80211_MASKSHIFT(ni->ni_vhtcap, IEEE80211_VHTCAP_SU_BEAMFORMER_CAPABLE); } val = MIN(val1, val2); - new_vhtcap |= SM(val, IEEE80211_VHTCAP_SU_BEAMFORMER_CAPABLE); + new_vhtcap |= _IEEE80211_SHIFTMASK(val, + IEEE80211_VHTCAP_SU_BEAMFORMER_CAPABLE); /* SU Beamformee capable */ - val2 = val1 = MS(vap->iv_vhtcaps, + val2 = val1 = _IEEE80211_MASKSHIFT(vap->iv_vhtcaps, IEEE80211_VHTCAP_SU_BEAMFORMEE_CAPABLE); if (opmode == 1) { - val2 = MS(ni->ni_vhtcap, + val2 = _IEEE80211_MASKSHIFT(ni->ni_vhtcap, IEEE80211_VHTCAP_SU_BEAMFORMEE_CAPABLE); } val = MIN(val1, val2); - new_vhtcap |= SM(val, IEEE80211_VHTCAP_SU_BEAMFORMEE_CAPABLE); + new_vhtcap |= _IEEE80211_SHIFTMASK(val, + IEEE80211_VHTCAP_SU_BEAMFORMEE_CAPABLE); /* Beamformee STS capability - only if SU beamformee capable */ - val2 = val1 = MS(vap->iv_vhtcaps, IEEE80211_VHTCAP_BEAMFORMEE_STS_MASK); + val2 = val1 = _IEEE80211_MASKSHIFT(vap->iv_vhtcaps, + IEEE80211_VHTCAP_BEAMFORMEE_STS_MASK); if (opmode == 1) { - val2 = MS(ni->ni_vhtcap, IEEE80211_VHTCAP_BEAMFORMEE_STS_MASK); + val2 = _IEEE80211_MASKSHIFT(ni->ni_vhtcap, + IEEE80211_VHTCAP_BEAMFORMEE_STS_MASK); } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Thu Sep 24 12:14:26 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 24FDA3F5FD5; Thu, 24 Sep 2020 12:14:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bxv9Y64j5z4MZf; Thu, 24 Sep 2020 12:14:25 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AFC54219D0; Thu, 24 Sep 2020 12:14: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 08OCEP59076689; Thu, 24 Sep 2020 12:14:25 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08OCEPMA076688; Thu, 24 Sep 2020 12:14:25 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202009241214.08OCEPMA076688@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 24 Sep 2020 12:14:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366113 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 366113 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 24 Sep 2020 12:14:26 -0000 Author: kib Date: Thu Sep 24 12:14:25 2020 New Revision: 366113 URL: https://svnweb.freebsd.org/changeset/base/366113 Log: Remove pointless local variable. Reported by: alc Sponsored by: The FreeBSD Foundation MFC after: 6 days Modified: head/sys/kern/kern_exec.c Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Thu Sep 24 10:57:39 2020 (r366112) +++ head/sys/kern/kern_exec.c Thu Sep 24 12:14:25 2020 (r366113) @@ -968,11 +968,8 @@ exec_fail: void exec_cleanup(struct thread *td, struct vmspace *oldvmspace) { - struct proc *p; - - p = td->td_proc; if ((td->td_pflags & TDP_EXECVMSPC) != 0) { - KASSERT(p->p_vmspace != oldvmspace, + KASSERT(td->td_proc->p_vmspace != oldvmspace, ("oldvmspace still used")); vmspace_free(oldvmspace); td->td_pflags &= ~TDP_EXECVMSPC; From owner-svn-src-head@freebsd.org Thu Sep 24 12:19:15 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 291093F61C0; Thu, 24 Sep 2020 12:19:15 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxvH70JBMz4N0s; Thu, 24 Sep 2020 12:19:15 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qv1-f51.google.com (mail-qv1-f51.google.com [209.85.219.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id D9E602FC76; Thu, 24 Sep 2020 12:19:14 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qv1-f51.google.com with SMTP id q10so1762975qvs.1; Thu, 24 Sep 2020 05:19:14 -0700 (PDT) X-Gm-Message-State: AOAM530YlVn0Pa1VU7LjAw7WBP9HOEwTF0zzftFifnZxHI3fByJ+gDtq MkBJ8/hgYx0RIDfDSbGYGHJEwmwiVEWWDJS2gPo= X-Google-Smtp-Source: ABdhPJwb8dsVUHS3KtII3nPBX4iXp4wHvwtn5k5Yhxc89OhNdL/pxrmgKdbELKPWSekGsB/zyvmQxufUoJ4kVXn6QlI= X-Received: by 2002:ad4:5146:: with SMTP id g6mr4938425qvq.22.1600949954414; Thu, 24 Sep 2020 05:19:14 -0700 (PDT) MIME-Version: 1.0 References: <202009231656.08NGujEs042900@gndrsh.dnsmgr.net> <545173d1-a6e1-333a-11c1-a791bbeadd76@freebsd.org> In-Reply-To: <545173d1-a6e1-333a-11c1-a791bbeadd76@freebsd.org> From: Kyle Evans Date: Thu, 24 Sep 2020 07:19:03 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r365643 - head/bin/cp To: Stefan Esser Cc: Warner Losh , "Rodney W. Grimes" , Alan Somers , Mateusz Guzik , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 24 Sep 2020 12:19:15 -0000 On Thu, Sep 24, 2020 at 3:08 AM Stefan Esser wrote: > > Am 24.09.20 um 08:54 schrieb Warner Losh: > > > > > > On Thu, Sep 24, 2020 at 12:41 AM Stefan Esser > > wrote: > > > > Am 23.09.20 um 19:23 schrieb Warner Losh> But for this issue, we're not > > mounting devfs early enough. We should > > > fix that. Removing /dev/null from the boot process likely is > > never going > > > to happen because we use it all over the place to discard output... > > > There's ~200 instances of it in the boot rc scripts, so getting > > rid of > > > it there would also be quite the effort, with the same question. > > > > Removal of /dev/null from rc.d scripts should be quite simple, > > since most cases could just use ">-" (close file descriptor) > > instead. Other usage could be substituted with ":>" followed > > by chown. > > > > > > So closing fd1 and fd2 doesn't cause them to be available for these > > programs to get as an fd on open, causing other issues? > > > > But >- isn't documented in sh(1) as doing the close thing. On a whim I > > did the following: > > $ echo fred >- > > $ ls -last ./- > > 4 -rw-r--r-- 1 imp imp 5 Sep 24 00:50 ./- > > $ cat ./- > > fred > > $ > > which suggests maybe you now have a lot of files named - instead... > > Yes, sorry, please ignore what I wrote - I was thinking of ">&-" of > course, but that is not gracefully accepted by many commands (they > are aborted when trying to write to the closed file descriptor). > > I had thought about piping into a command that ignores STDIN, first, > e.g. "| :", but that generates a SIGPIPE when trying to flush the > FILE buffer (i.e. after 4 KB, which might be sufficient for most > cases, but it is not a general solution). > > A program that reads from STDIN and generates no output could be used, > though, e.g. "| sed d". > > But this would cause lots of extra forked processes and increase the > start-up time and is not acceptable. > > > but e.g. rc.d/syscons > > uses ${kbddev} (i.e. /dev/ttyv0) and rc.d/zvol performs swapon > > on /dev/zvol/${name}, rc.d/random uses /dev/random and so on. > > > > So those interactions should be disaled by rc variables... Or we should > > be failing the operation... > > Going multi-user should not be stopped by any of the rc scripts > failing due to lack of /dev. But since most developers will only > test with /dev available, there is a risk that changes to rc files > will not gracefully handle a missing /dev. > I was under the impression from previous reading and kib's response that this is a complete non-issue, there's no way you can go multi-user without a mounted /dev and we go to somewhat great lengths to make sure we're good. I agree with the previous goal of ripping the /dev dependency out of the build, but this is also much, much easier said than done. From owner-svn-src-head@freebsd.org Thu Sep 24 12:26:08 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A6B643F6612; Thu, 24 Sep 2020 12:26:08 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxvR441QVz4NJS; Thu, 24 Sep 2020 12:26:08 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6A20021BA4; Thu, 24 Sep 2020 12:26:08 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08OCQ8Yw082874; Thu, 24 Sep 2020 12:26:08 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08OCQ6L0082865; Thu, 24 Sep 2020 12:26:06 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202009241226.08OCQ6L0082865@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 24 Sep 2020 12:26:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366114 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 366114 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 24 Sep 2020 12:26:08 -0000 Author: tuexen Date: Thu Sep 24 12:26:06 2020 New Revision: 366114 URL: https://svnweb.freebsd.org/changeset/base/366114 Log: Whitespace changes. MFC after: 3 days Modified: head/sys/netinet/sctp_cc_functions.c head/sys/netinet/sctp_header.h head/sys/netinet/sctp_indata.c head/sys/netinet/sctp_lock_bsd.h head/sys/netinet/sctp_output.c head/sys/netinet/sctp_output.h head/sys/netinet/sctp_pcb.c head/sys/netinet/sctp_usrreq.c Modified: head/sys/netinet/sctp_cc_functions.c ============================================================================== --- head/sys/netinet/sctp_cc_functions.c Thu Sep 24 12:14:25 2020 (r366113) +++ head/sys/netinet/sctp_cc_functions.c Thu Sep 24 12:26:06 2020 (r366114) @@ -1313,8 +1313,7 @@ sctp_cwnd_update_rtcc_after_ecn_echo(struct sctp_tcb * sctp_cwnd_update_after_ecn_echo_common(stcb, net, in_window, num_pkt_lost, 1); } -static -void +static void sctp_cwnd_update_rtcc_tsn_acknowledged(struct sctp_nets *net, struct sctp_tmit_chunk *tp1) { @@ -1431,7 +1430,6 @@ sctp_set_rtcc_initial_cc_param(struct sctp_tcb *stcb, net->cc_mod.rtcc.use_dccc_ecn = SCTP_BASE_SYSCTL(sctp_use_dccc_ecn); net->cc_mod.rtcc.step_cnt = 0; net->cc_mod.rtcc.last_step_state = 0; - } static int @@ -2041,7 +2039,7 @@ htcp_cong_avoid(struct sctp_tcb *stcb, struct sctp_net { /*- * How to handle these functions? - * if (!tcp_is_cwnd_limited(sk, in_flight)) RRS - good question. + * if (!tcp_is_cwnd_limited(sk, in_flight)) RRS - good question. * return; */ if (net->cwnd <= net->ssthresh) { Modified: head/sys/netinet/sctp_header.h ============================================================================== --- head/sys/netinet/sctp_header.h Thu Sep 24 12:14:25 2020 (r366113) +++ head/sys/netinet/sctp_header.h Thu Sep 24 12:26:06 2020 (r366114) @@ -530,41 +530,41 @@ struct sctp_auth_chunk { #ifndef SCTP_MAX_OVERHEAD #ifdef INET6 #define SCTP_MAX_OVERHEAD (sizeof(struct sctp_data_chunk) + \ - sizeof(struct sctphdr) + \ - sizeof(struct sctp_ecne_chunk) + \ - sizeof(struct sctp_sack_chunk) + \ - sizeof(struct ip6_hdr)) + sizeof(struct sctphdr) + \ + sizeof(struct sctp_ecne_chunk) + \ + sizeof(struct sctp_sack_chunk) + \ + sizeof(struct ip6_hdr)) #define SCTP_MED_OVERHEAD (sizeof(struct sctp_data_chunk) + \ - sizeof(struct sctphdr) + \ - sizeof(struct ip6_hdr)) + sizeof(struct sctphdr) + \ + sizeof(struct ip6_hdr)) #define SCTP_MIN_OVERHEAD (sizeof(struct ip6_hdr) + \ - sizeof(struct sctphdr)) + sizeof(struct sctphdr)) #else #define SCTP_MAX_OVERHEAD (sizeof(struct sctp_data_chunk) + \ - sizeof(struct sctphdr) + \ - sizeof(struct sctp_ecne_chunk) + \ - sizeof(struct sctp_sack_chunk) + \ - sizeof(struct ip)) + sizeof(struct sctphdr) + \ + sizeof(struct sctp_ecne_chunk) + \ + sizeof(struct sctp_sack_chunk) + \ + sizeof(struct ip)) #define SCTP_MED_OVERHEAD (sizeof(struct sctp_data_chunk) + \ - sizeof(struct sctphdr) + \ - sizeof(struct ip)) + sizeof(struct sctphdr) + \ + sizeof(struct ip)) #define SCTP_MIN_OVERHEAD (sizeof(struct ip) + \ - sizeof(struct sctphdr)) + sizeof(struct sctphdr)) #endif /* INET6 */ #endif /* !SCTP_MAX_OVERHEAD */ #define SCTP_MED_V4_OVERHEAD (sizeof(struct sctp_data_chunk) + \ - sizeof(struct sctphdr) + \ - sizeof(struct ip)) + sizeof(struct sctphdr) + \ + sizeof(struct ip)) #define SCTP_MIN_V4_OVERHEAD (sizeof(struct ip) + \ - sizeof(struct sctphdr)) + sizeof(struct sctphdr)) #undef SCTP_PACKED #endif /* !__sctp_header_h__ */ Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Thu Sep 24 12:14:25 2020 (r366113) +++ head/sys/netinet/sctp_indata.c Thu Sep 24 12:26:06 2020 (r366114) @@ -2532,7 +2532,6 @@ sctp_slide_mapping_arrays(struct sctp_tcb *stcb) * we will be able to slide it forward. Really I * don't think this should happen :-0 */ - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MAP_LOGGING_ENABLE) { sctp_log_map((uint32_t)distance, (uint32_t)slide_from, (uint32_t)asoc->mapping_array_size, @@ -2616,8 +2615,7 @@ sctp_sack_check(struct sctp_tcb *stcb, int was_a_gap) (stcb->asoc.numduptsns) || /* we have dup's */ (is_a_gap) || /* is still a gap */ (stcb->asoc.delayed_ack == 0) || /* Delayed sack disabled */ - (stcb->asoc.data_pkts_seen >= stcb->asoc.sack_freq) /* hit limit of pkts */ - ) { + (stcb->asoc.data_pkts_seen >= stcb->asoc.sack_freq)) { /* hit limit of pkts */ if ((stcb->asoc.sctp_cmt_on_off > 0) && (SCTP_BASE_SYSCTL(sctp_cmt_use_dac)) && (stcb->asoc.send_sack == 0) && @@ -2626,14 +2624,13 @@ sctp_sack_check(struct sctp_tcb *stcb, int was_a_gap) (!SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer))) { /* * CMT DAC algorithm: With CMT, delay acks - * even in the face of - * - * reordering. Therefore, if acks that do - * not have to be sent because of the above - * reasons, will be delayed. That is, acks - * that would have been sent due to gap - * reports will be delayed with DAC. Start - * the delayed ack timer. + * even in the face of reordering. + * Therefore, if acks that do not have to be + * sent because of the above reasons, will + * be delayed. That is, acks that would have + * been sent due to gap reports will be + * delayed with DAC. Start the delayed ack + * timer. */ sctp_timer_start(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, NULL); @@ -3689,9 +3686,7 @@ sctp_strike_gap_ack_chunks(struct sctp_tcb *stcb, stru tp1->whoTo->find_pseudo_cumack = 1; tp1->whoTo->find_rtx_pseudo_cumack = 1; } - } else { /* CMT is OFF */ - #ifdef SCTP_FR_TO_ALTERNATE /* Can we find an alternate? */ alt = sctp_find_alternate_net(stcb, tp1->whoTo, 0); @@ -4097,7 +4092,6 @@ sctp_express_handle_sack(struct sctp_tcb *stcb, uint32 tp1->whoTo->new_pseudo_cumack = 1; tp1->whoTo->find_pseudo_cumack = 1; tp1->whoTo->find_rtx_pseudo_cumack = 1; - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_LOGGING_ENABLE) { /* sa_ignore NO_NULL_CHK */ sctp_log_cwnd(stcb, tp1->whoTo, tp1->rec.data.tsn, SCTP_CWND_LOG_FROM_SACK); @@ -4696,7 +4690,6 @@ hopeless_peer: tp1->whoTo->new_pseudo_cumack = 1; tp1->whoTo->find_pseudo_cumack = 1; tp1->whoTo->find_rtx_pseudo_cumack = 1; - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_SACK_LOGGING_ENABLE) { sctp_log_sack(asoc->last_acked_seq, cum_ack, Modified: head/sys/netinet/sctp_lock_bsd.h ============================================================================== --- head/sys/netinet/sctp_lock_bsd.h Thu Sep 24 12:14:25 2020 (r366113) +++ head/sys/netinet/sctp_lock_bsd.h Thu Sep 24 12:26:06 2020 (r366114) @@ -156,7 +156,7 @@ __FBSDID("$FreeBSD$"); rw_wunlock(&SCTP_BASE_INFO(ipi_addr_mtx)); \ } \ rw_destroy(&SCTP_BASE_INFO(ipi_addr_mtx)); \ -} while (0) +} while (0) #define SCTP_IPI_ADDR_RLOCK() do { \ rw_rlock(&SCTP_BASE_INFO(ipi_addr_mtx)); \ Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Thu Sep 24 12:14:25 2020 (r366113) +++ head/sys/netinet/sctp_output.c Thu Sep 24 12:26:06 2020 (r366114) @@ -9813,7 +9813,6 @@ one_chunk_around: */ atomic_add_int(&((asoc)->total_output_queue_size), data_list[i]->book_size); data_list[i]->book_size *= 2; - } else { if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LOG_RWND_ENABLE) { sctp_log_rwnd(SCTP_DECREASE_PEER_RWND, Modified: head/sys/netinet/sctp_output.h ============================================================================== --- head/sys/netinet/sctp_output.h Thu Sep 24 12:14:25 2020 (r366113) +++ head/sys/netinet/sctp_output.h Thu Sep 24 12:26:06 2020 (r366114) @@ -66,11 +66,10 @@ sctp_source_address_selection(struct sctp_inpcb *inp, sctp_route_t *ro, struct sctp_nets *net, int non_asoc_addr_ok, uint32_t vrf_id); -int - sctp_v6src_match_nexthop(struct sockaddr_in6 *src6, sctp_route_t *ro); -int - sctp_v4src_match_nexthop(struct sctp_ifa *sifa, sctp_route_t *ro); +int sctp_v6src_match_nexthop(struct sockaddr_in6 *src6, sctp_route_t *ro); +int sctp_v4src_match_nexthop(struct sctp_ifa *sifa, sctp_route_t *ro); + void sctp_send_initiate(struct sctp_inpcb *, struct sctp_tcb *, int); void @@ -129,8 +128,8 @@ void sctp_fix_ecn_echo(struct sctp_association *); void sctp_move_chunks_from_net(struct sctp_tcb *stcb, struct sctp_nets *net); #define SCTP_DATA_CHUNK_OVERHEAD(stcb) ((stcb)->asoc.idata_supported ? \ - sizeof(struct sctp_idata_chunk) : \ - sizeof(struct sctp_data_chunk)) + sizeof(struct sctp_idata_chunk) : \ + sizeof(struct sctp_data_chunk)) int sctp_output(struct sctp_inpcb *, struct mbuf *, struct sockaddr *, Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Thu Sep 24 12:14:25 2020 (r366113) +++ head/sys/netinet/sctp_pcb.c Thu Sep 24 12:26:06 2020 (r366114) @@ -3588,7 +3588,6 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, #ifdef SCTP_LOG_CLOSING sctp_log_closing(inp, NULL, 5); #endif - if ((inp->sctp_asocidhash) != NULL) { SCTP_HASH_FREE(inp->sctp_asocidhash, inp->hashasocidmark); inp->sctp_asocidhash = NULL; @@ -3623,7 +3622,6 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, (void)sctp_m_free(ip_pcb->inp_options); ip_pcb->inp_options = 0; } - #ifdef INET6 if (ip_pcb->inp_vflag & INP_IPV6) { ip6_freepcbopts(ip_pcb->in6p_outputopts); @@ -5728,7 +5726,6 @@ sctp_pcb_init(void) SCTP_BASE_INFO(sctp_tcpephash) = SCTP_HASH_INIT(SCTP_BASE_SYSCTL(sctp_hashtblsize), &SCTP_BASE_INFO(hashtcpmark)); SCTP_BASE_INFO(hashtblsize) = SCTP_BASE_SYSCTL(sctp_hashtblsize); - SCTP_BASE_INFO(sctp_vrfhash) = SCTP_HASH_INIT(SCTP_SIZE_OF_VRF_HASH, &SCTP_BASE_INFO(hashvrfmark)); Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Thu Sep 24 12:14:25 2020 (r366113) +++ head/sys/netinet/sctp_usrreq.c Thu Sep 24 12:26:06 2020 (r366114) @@ -2620,7 +2620,6 @@ flags_out: */ sstat->sstat_penddata = (stcb->asoc.cnt_on_reasm_queue + stcb->asoc.cnt_on_all_streams); - sstat->sstat_instrms = stcb->asoc.streamincnt; sstat->sstat_outstrms = stcb->asoc.streamoutcnt; sstat->sstat_fragmentation_point = sctp_get_frag_point(stcb, &stcb->asoc); From owner-svn-src-head@freebsd.org Thu Sep 24 14:42:22 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D44F63F9547; Thu, 24 Sep 2020 14:42:22 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxySG5JDZz4WcQ; Thu, 24 Sep 2020 14:42:22 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 99375233F5; Thu, 24 Sep 2020 14:42:22 +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 08OEgMue066636; Thu, 24 Sep 2020 14:42:22 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08OEgMQG066635; Thu, 24 Sep 2020 14:42:22 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202009241442.08OEgMQG066635@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 24 Sep 2020 14:42:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366115 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 366115 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 24 Sep 2020 14:42:22 -0000 Author: emaste Date: Thu Sep 24 14:42:22 2020 New Revision: 366115 URL: https://svnweb.freebsd.org/changeset/base/366115 Log: mgb.4: add note about experimental status Also remove HISTORY section until it is connected to the build. Modified: head/share/man/man4/mgb.4 Modified: head/share/man/man4/mgb.4 ============================================================================== --- head/share/man/man4/mgb.4 Thu Sep 24 12:26:06 2020 (r366114) +++ head/share/man/man4/mgb.4 Thu Sep 24 14:42:22 2020 (r366115) @@ -38,6 +38,10 @@ if_mgb_load="YES" .Sh DESCRIPTION The .Nm +driver is experimental, and is not yet connected to the build. +.Pp +The +.Nm device driver provides support for PCIe Gigabit Ethernet adapters based on Microchip's LAN7430 and LAN7431. .Pp @@ -79,8 +83,3 @@ RSS .El .Pp LAN7431 support is completely untested. -.Sh HISTORY -The -.Nm -device driver first appeared in -.Fx 13.0 . From owner-svn-src-head@freebsd.org Thu Sep 24 15:38:02 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A4AAF3FA459; Thu, 24 Sep 2020 15:38:02 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxzhV3rhtz4ZHn; Thu, 24 Sep 2020 15:38:02 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6767C240D5; Thu, 24 Sep 2020 15:38:02 +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 08OFc2gO000664; Thu, 24 Sep 2020 15:38:02 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08OFc24O000663; Thu, 24 Sep 2020 15:38:02 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <202009241538.08OFc24O000663@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 24 Sep 2020 15:38:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366118 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 366118 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 24 Sep 2020 15:38:02 -0000 Author: asomers Date: Thu Sep 24 15:38:01 2020 New Revision: 366118 URL: https://svnweb.freebsd.org/changeset/base/366118 Log: Fix some signed/unsigned comparison warnings in NFS Reviewed by: rmacklem MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D26533 Modified: head/sys/kern/subr_acl_nfs4.c Modified: head/sys/kern/subr_acl_nfs4.c ============================================================================== --- head/sys/kern/subr_acl_nfs4.c Thu Sep 24 15:34:47 2020 (r366117) +++ head/sys/kern/subr_acl_nfs4.c Thu Sep 24 15:38:01 2020 (r366118) @@ -342,9 +342,9 @@ _acl_append(struct acl *aclp, acl_tag_t tag, acl_perm_ } static struct acl_entry * -_acl_duplicate_entry(struct acl *aclp, int entry_index) +_acl_duplicate_entry(struct acl *aclp, unsigned entry_index) { - int i; + unsigned i; KASSERT(aclp->acl_cnt + 1 <= ACL_MAX_ENTRIES, ("aclp->acl_cnt + 1 <= ACL_MAX_ENTRIES")); @@ -361,7 +361,8 @@ static void acl_nfs4_sync_acl_from_mode_draft(struct acl *aclp, mode_t mode, int file_owner_id) { - int i, meets, must_append; + int meets, must_append; + unsigned i; struct acl_entry *entry, *copy, *previous, *a1, *a2, *a3, *a4, *a5, *a6; mode_t amode; From owner-svn-src-head@freebsd.org Thu Sep 24 16:11:53 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C29053FB5F4; Thu, 24 Sep 2020 16:11:53 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4By0RY4r50z4c7r; Thu, 24 Sep 2020 16:11:53 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8A578244CB; Thu, 24 Sep 2020 16:11:53 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08OGBrMc024496; Thu, 24 Sep 2020 16:11:53 GMT (envelope-from fernape@FreeBSD.org) Received: (from fernape@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08OGBrG4024495; Thu, 24 Sep 2020 16:11:53 GMT (envelope-from fernape@FreeBSD.org) Message-Id: <202009241611.08OGBrG4024495@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fernape set sender to fernape@FreeBSD.org using -f From: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= Date: Thu, 24 Sep 2020 16:11:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366119 - head/usr.bin/which X-SVN-Group: head X-SVN-Commit-Author: fernape X-SVN-Commit-Paths: head/usr.bin/which X-SVN-Commit-Revision: 366119 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 24 Sep 2020 16:11:53 -0000 Author: fernape (ports committer) Date: Thu Sep 24 16:11:53 2020 New Revision: 366119 URL: https://svnweb.freebsd.org/changeset/base/366119 Log: which(1): Add EXAMPLES section to manpage Add EXAMPLES section showing the use of -a and -s flags and how which(1) treates duplicates. Approved by: manpages (gbe@) Differential Revision: https://reviews.freebsd.org/D26182 Modified: head/usr.bin/which/which.1 Modified: head/usr.bin/which/which.1 ============================================================================== --- head/usr.bin/which/which.1 Thu Sep 24 15:38:01 2020 (r366118) +++ head/usr.bin/which/which.1 Thu Sep 24 16:11:53 2020 (r366119) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 13, 2006 +.Dd September 24, 2020 .Dt WHICH 1 .Os .Sh NAME @@ -62,6 +62,48 @@ command which is similar or identical to this utility. Consult the .Xr builtin 1 manual page. +.Sh EXAMPLES +Locate the +.Xr ls 1 +and +.Xr cp 1 +commands: +.Bd -literal -offset indent +$ /usr/bin/which ls cp +/bin/ls +/bin/cp +.Ed +.Pp +Same as above with a specific +.Va PATH +and showing all occurrences: +.Bd -literal -offset indent +$ PATH=/bin:/rescue /usr/bin/which -a ls cp +/bin/ls +/rescue/ls +/bin/cp +/rescue/cp +.Ed +.Pp +.Nm which +will show duplicates if the same executable is find more than once: +.Bd -literal -offset indent +$ PATH=/bin:/bin /usr/bin/which -a ls +/bin/ls +/bin/ls +.Ed +.Pp +Do not show output. +Just exit with an appropriate return code: +.Bd -literal -offset indent +$ /usr/bin/which -s ls cp +$ echo $? +0 + +$ /usr/bin/which -s fakecommand +$ echo $? +1 +.Ed .Sh SEE ALSO .Xr builtin 1 , .Xr csh 1 , From owner-svn-src-head@freebsd.org Thu Sep 24 16:27:54 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 04F863FD9BD; Thu, 24 Sep 2020 16:27:54 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4By0p16Rplz3T18; Thu, 24 Sep 2020 16:27:53 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C1F882495D; Thu, 24 Sep 2020 16:27:53 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08OGRr34031859; Thu, 24 Sep 2020 16:27:53 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08OGRrJ8031858; Thu, 24 Sep 2020 16:27:53 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <202009241627.08OGRrJ8031858@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 24 Sep 2020 16:27:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366121 - in head: sys/fs/fuse tests/sys/fs/fusefs X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in head: sys/fs/fuse tests/sys/fs/fusefs X-SVN-Commit-Revision: 366121 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 24 Sep 2020 16:27:54 -0000 Author: asomers Date: Thu Sep 24 16:27:53 2020 New Revision: 366121 URL: https://svnweb.freebsd.org/changeset/base/366121 Log: fusefs: fix mmap'd writes in direct_io mode If a FUSE server returns FOPEN_DIRECT_IO in response to FUSE_OPEN, that instructs the kernel to bypass the page cache for that file. This feature is also known by libfuse's name: "direct_io". However, when accessing a file via mmap, there is no possible way to bypass the cache completely. This change fixes a deadlock that would happen when an mmap'd write tried to invalidate a portion of the cache, wrongly assuming that a write couldn't possibly come from cache if direct_io were set. Arguably, we could instead disable mmap for files with FOPEN_DIRECT_IO set. But allowing it is less likely to cause user complaints, and is more in keeping with the spirit of open(2), where O_DIRECT instructs the kernel to "reduce", not "eliminate" cache effects. PR: 247276 Reported by: trapexit@spawn.link Reviewed by: cem MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D26485 Modified: head/sys/fs/fuse/fuse_io.c head/tests/sys/fs/fusefs/write.cc Modified: head/sys/fs/fuse/fuse_io.c ============================================================================== --- head/sys/fs/fuse/fuse_io.c Thu Sep 24 16:21:30 2020 (r366120) +++ head/sys/fs/fuse/fuse_io.c Thu Sep 24 16:27:53 2020 (r366121) @@ -291,6 +291,7 @@ fuse_io_dispatch(struct vnode *vp, struct uio *uio, in fuse_vnode_update(vp, FN_MTIMECHANGE | FN_CTIMECHANGE); if (directio) { off_t start, end, filesize; + bool pages = (ioflag & IO_VMIO) != 0; SDT_PROBE2(fusefs, , io, trace, 1, "direct write of vnode"); @@ -301,15 +302,14 @@ fuse_io_dispatch(struct vnode *vp, struct uio *uio, in start = uio->uio_offset; end = start + uio->uio_resid; - KASSERT((ioflag & (IO_VMIO | IO_DIRECT)) != - (IO_VMIO | IO_DIRECT), - ("IO_DIRECT used for a cache flush?")); - /* Invalidate the write cache when writing directly */ - err = fuse_inval_buf_range(vp, filesize, start, end); - if (err) - return (err); + if (!pages) { + err = fuse_inval_buf_range(vp, filesize, start, + end); + if (err) + return (err); + } err = fuse_write_directbackend(vp, uio, cred, fufh, - filesize, ioflag, false); + filesize, ioflag, pages); } else { SDT_PROBE2(fusefs, , io, trace, 1, "buffered write of vnode"); Modified: head/tests/sys/fs/fusefs/write.cc ============================================================================== --- head/tests/sys/fs/fusefs/write.cc Thu Sep 24 16:21:30 2020 (r366120) +++ head/tests/sys/fs/fusefs/write.cc Thu Sep 24 16:27:53 2020 (r366121) @@ -923,6 +923,76 @@ TEST_F(WriteBack, o_direct) leak(fd); } +TEST_F(WriteBack, direct_io) +{ + const char FULLPATH[] = "mountpoint/some_file.txt"; + const char RELPATH[] = "some_file.txt"; + const char *CONTENTS = "abcdefgh"; + uint64_t ino = 42; + int fd; + ssize_t bufsize = strlen(CONTENTS); + uint8_t readbuf[bufsize]; + + expect_lookup(RELPATH, ino, 0); + expect_open(ino, FOPEN_DIRECT_IO, 1); + FuseTest::expect_write(ino, 0, bufsize, bufsize, 0, FUSE_WRITE_CACHE, + CONTENTS); + expect_read(ino, 0, bufsize, bufsize, CONTENTS); + + fd = open(FULLPATH, O_RDWR); + EXPECT_LE(0, fd) << strerror(errno); + + ASSERT_EQ(bufsize, write(fd, CONTENTS, bufsize)) << strerror(errno); + /* A subsequent read must query the daemon because cache is empty */ + ASSERT_EQ(0, lseek(fd, 0, SEEK_SET)) << strerror(errno); + ASSERT_EQ(0, fcntl(fd, F_SETFL, 0)) << strerror(errno); + ASSERT_EQ(bufsize, read(fd, readbuf, bufsize)) << strerror(errno); + leak(fd); +} + +/* + * mmap should still be possible even if the server used direct_io. Mmap will + * still use the cache, though. + * + * Regression test for bug 247276 + * https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=247276 + */ +TEST_F(WriteBack, mmap_direct_io) +{ + const char FULLPATH[] = "mountpoint/some_file.txt"; + const char RELPATH[] = "some_file.txt"; + const char *CONTENTS = "abcdefgh"; + uint64_t ino = 42; + int fd; + size_t len; + ssize_t bufsize = strlen(CONTENTS); + void *p, *zeros; + + len = getpagesize(); + zeros = calloc(1, len); + ASSERT_NE(nullptr, zeros); + + expect_lookup(RELPATH, ino, len); + expect_open(ino, FOPEN_DIRECT_IO, 1); + expect_read(ino, 0, len, len, zeros); + expect_flush(ino, 1, ReturnErrno(0)); + FuseTest::expect_write(ino, 0, len, len, FUSE_WRITE_CACHE, 0, zeros); + expect_release(ino, ReturnErrno(0)); + + fd = open(FULLPATH, O_RDWR); + EXPECT_LE(0, fd) << strerror(errno); + + p = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); + ASSERT_NE(MAP_FAILED, p) << strerror(errno); + + memmove((uint8_t*)p, CONTENTS, bufsize); + + ASSERT_EQ(0, munmap(p, len)) << strerror(errno); + close(fd); // Write mmap'd data on close + + free(zeros); +} + /* * When mounted with -o async, the writeback cache mode should delay writes */ From owner-svn-src-head@freebsd.org Thu Sep 24 16:32:11 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 69F483FE0E3; Thu, 24 Sep 2020 16:32:11 +0000 (UTC) (envelope-from xtouqh@mm.st) Received: from new3-smtp.messagingengine.com (new3-smtp.messagingengine.com [66.111.4.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4By0tz0gDxz3VTn; Thu, 24 Sep 2020 16:32:10 +0000 (UTC) (envelope-from xtouqh@mm.st) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id 7B5C2580409; Thu, 24 Sep 2020 12:32:10 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 24 Sep 2020 12:32:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mm.st; h=subject :to:references:from:message-id:date:mime-version:in-reply-to :content-type:content-transfer-encoding; s=fm1; bh=g9piUEXgkka8F ZPw7c0y/Mn8aAUhuZ0c4wyR5QZ1Uq0=; b=LNUN0E3ScRt60tPxxjrqKyBL1VcxM 9NYbKc6kIF9iK2KJRUqz7MRkLv3N5odnXUwnImSdaMaOsx1ZxHlPe8nq3xjLSdGE tUnreLMQAE+BQ8AWb1gmsVPSdVwP4ay7aq++3nO0W5wCdC0fV402aisKsHZF0r1v nKSh7BdQqG9rl4YBR7JSb9VfHWjF0xgc4Lq/glDz1OfcEETaXmZgwHR/2RmOoC5W RiGVXUNLgiFXBCCeimbc3mGf7aEOMHMHmHpeCUerx5N672MLBJN1mEd8PCCa14iJ B6H/5se+qeiEPs9tJ4pNTSqC16w8nttZUkz1QNfi3MFvG7I33pA359sWg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=g9piUEXgkka8FZPw7c0y/Mn8aAUhuZ0c4wyR5QZ1U q0=; b=MEJpSa/yYnvtVFGnVOSXp8mBwieGOOkhdMkQ4kYZTyFGlq/D3neH7SJ0p bX4ZkPwj6TciH9nzyxEYGcDMRfr9qv5VTOgGc/zCBR92NHLx+/h1iCpdCjr+4sF4 frHiMNR/8sPmBr3DoKb+x7Y9nKlzw1HDtv02Ryf0ivJZ3rJ/bqEHpmOIhm1zAclw YTcjywwr4Y5udE3YJwnJKdpJsz17r8kiUSgJhhSFHA0vUH7HLaOB4y3lJsTYcI3E 9dgRfAVedbyAbLK6GmKdiUHo1BqUn5MmYwe8LWGN+0t47PPP9G9JOE59qUlb7j0V FEtGGZ2fTZg5Hd3zCioyYNy4WCWyw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudekgddutdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtke ertddtfeejnecuhfhrohhmpeigthhouhhqhhesmhhmrdhsthenucggtffrrghtthgvrhhn peefgeegjeeiiedvgfeifeffffduudeiveehudfggeehtdefgeevhefftdfftdejjeenuc ffohhmrghinhepfhhrvggvsghsugdrohhrghenucfkphepledurddvgedtrdduvdegrddu heejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepgi htohhuqhhhsehmmhdrshht X-ME-Proxy: Received: from mercury.lan (unknown [91.240.124.157]) by mail.messagingengine.com (Postfix) with ESMTPA id 6C2B9328005A; Thu, 24 Sep 2020 12:32:09 -0400 (EDT) Subject: Re: svn commit: r366119 - head/usr.bin/which To: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202009241611.08OGBrG4024495@repo.freebsd.org> From: xtouqh@mm.st Message-ID: <7ed37edf-b448-2b48-b90f-7b3f7554a17a@mm.st> Date: Thu, 24 Sep 2020 19:32:07 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.3.0 MIME-Version: 1.0 In-Reply-To: <202009241611.08OGBrG4024495@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4By0tz0gDxz3VTn X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:11403, ipnet:66.111.4.0/24, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 24 Sep 2020 16:32:11 -0000 Fernando Apesteguía wrote: > Author: fernape (ports committer) > Date: Thu Sep 24 16:11:53 2020 > New Revision: 366119 > URL: https://svnweb.freebsd.org/changeset/base/366119 > > Log: > which(1): Add EXAMPLES section to manpage > > Add EXAMPLES section showing the use of -a and -s flags and how which(1) > treates duplicates. > > Approved by: manpages (gbe@) > Differential Revision: https://reviews.freebsd.org/D26182 > > Modified: > head/usr.bin/which/which.1 > > Modified: head/usr.bin/which/which.1 > ============================================================================== > --- head/usr.bin/which/which.1 Thu Sep 24 15:38:01 2020 (r366118) > +++ head/usr.bin/which/which.1 Thu Sep 24 16:11:53 2020 (r366119) > @@ -29,7 +29,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd December 13, 2006 > +.Dd September 24, 2020 > .Dt WHICH 1 > .Os > .Sh NAME > @@ -62,6 +62,48 @@ command which is similar or identical to this utility. > Consult the > .Xr builtin 1 > manual page. > +.Sh EXAMPLES > +Locate the > +.Xr ls 1 > +and > +.Xr cp 1 > +commands: > +.Bd -literal -offset indent > +$ /usr/bin/which ls cp > +/bin/ls > +/bin/cp > +.Ed > +.Pp > +Same as above with a specific > +.Va PATH .Ev ? > +and showing all occurrences: > +.Bd -literal -offset indent > +$ PATH=/bin:/rescue /usr/bin/which -a ls cp > +/bin/ls > +/rescue/ls > +/bin/cp > +/rescue/cp > +.Ed > +.Pp > +.Nm which > +will show duplicates if the same executable is find more than once: found? > +.Bd -literal -offset indent > +$ PATH=/bin:/bin /usr/bin/which -a ls > +/bin/ls > +/bin/ls > +.Ed > +.Pp > +Do not show output. > +Just exit with an appropriate return code: > +.Bd -literal -offset indent > +$ /usr/bin/which -s ls cp > +$ echo $? > +0 > + > +$ /usr/bin/which -s fakecommand > +$ echo $? > +1 > +.Ed > .Sh SEE ALSO > .Xr builtin 1 , > .Xr csh 1 , From owner-svn-src-head@freebsd.org Thu Sep 24 16:42:18 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 38EBE4219FF; Thu, 24 Sep 2020 16:42:18 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4By16f0nXZz3bbF; Thu, 24 Sep 2020 16:42:18 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F3BA3252E7; Thu, 24 Sep 2020 16:42:17 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08OGgHY6043346; Thu, 24 Sep 2020 16:42:17 GMT (envelope-from fernape@FreeBSD.org) Received: (from fernape@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08OGgHBJ043336; Thu, 24 Sep 2020 16:42:17 GMT (envelope-from fernape@FreeBSD.org) Message-Id: <202009241642.08OGgHBJ043336@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fernape set sender to fernape@FreeBSD.org using -f From: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= Date: Thu, 24 Sep 2020 16:42:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366122 - head/usr.bin/which X-SVN-Group: head X-SVN-Commit-Author: fernape X-SVN-Commit-Paths: head/usr.bin/which X-SVN-Commit-Revision: 366122 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 24 Sep 2020 16:42:18 -0000 Author: fernape (ports committer) Date: Thu Sep 24 16:42:17 2020 New Revision: 366122 URL: https://svnweb.freebsd.org/changeset/base/366122 Log: Fix typo and environment variable macro Follow up for r366119 Reported by: xtouqh@mm.st Differential Revision: https://reviews.freebsd.org/D26182 Modified: head/usr.bin/which/which.1 Modified: head/usr.bin/which/which.1 ============================================================================== --- head/usr.bin/which/which.1 Thu Sep 24 16:27:53 2020 (r366121) +++ head/usr.bin/which/which.1 Thu Sep 24 16:42:17 2020 (r366122) @@ -75,7 +75,7 @@ $ /usr/bin/which ls cp .Ed .Pp Same as above with a specific -.Va PATH +.Ev PATH and showing all occurrences: .Bd -literal -offset indent $ PATH=/bin:/rescue /usr/bin/which -a ls cp @@ -86,7 +86,7 @@ $ PATH=/bin:/rescue /usr/bin/which -a ls cp .Ed .Pp .Nm which -will show duplicates if the same executable is find more than once: +will show duplicates if the same executable is found more than once: .Bd -literal -offset indent $ PATH=/bin:/bin /usr/bin/which -a ls /bin/ls From owner-svn-src-head@freebsd.org Thu Sep 24 16:43:13 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0FDC2421F24; Thu, 24 Sep 2020 16:43:13 +0000 (UTC) (envelope-from fernando.apesteguia@gmail.com) Received: from mail-ua1-f46.google.com (mail-ua1-f46.google.com [209.85.222.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4By17h1p71z3bw4; Thu, 24 Sep 2020 16:43:12 +0000 (UTC) (envelope-from fernando.apesteguia@gmail.com) Received: by mail-ua1-f46.google.com with SMTP id h15so1212873uab.3; Thu, 24 Sep 2020 09:43:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=GglN9YQQfs0qAX6gsrlps5mM+aT9OiOPoiKlspC8boM=; b=MUXf5C2tWNslG+6tanbSer79PbRPLuyC1ZqHdjpSgcjfVlmbyPIVgW8aTU/vuqigRI BsyhDi3gedPyK4m59YDhb/DhYNYGn1qmIWS7fpC9M7eJsLuJK+3PM9S58OcwCJiGgC3Q etxWbk72ngltuHwhn36Dk4oi04gjuZX4h5XxYYHIU6Pb5ozESoXDRtUM9qrLOJGm6Ywh Uo6STQ5E2uqYgJmJ4AQd24Vk7snword0VkyxCLVTJUHfoFnyvuyCvk7ex9kGSbgLPPag MWINkMGHBMiS7Q04PV3YX/CReUHV7KrkcP/jV89Bxf/UiNGRLIqcZOf0uXNPhb20hTz7 RHUQ== X-Gm-Message-State: AOAM531CzwtUzRzW8RdfliRzKtsi0tEutxT5zqE/FvPOaOwLBuRnUHK+ Su+WC6Q9GpIiH+bMXAm2PCwwL0gCo9nhgw== X-Google-Smtp-Source: ABdhPJy1X+//h/fYk+hSXR/HTTWgH53K4wwtzLjeOZHiAWfNLOle8nO2M1sK3voMr5VR98suS1Ne+g== X-Received: by 2002:ab0:4425:: with SMTP id m34mr767464uam.19.1600965790092; Thu, 24 Sep 2020 09:43:10 -0700 (PDT) Received: from mail-vs1-f52.google.com (mail-vs1-f52.google.com. [209.85.217.52]) by smtp.gmail.com with ESMTPSA id e144sm428731vsc.0.2020.09.24.09.43.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 24 Sep 2020 09:43:09 -0700 (PDT) Received: by mail-vs1-f52.google.com with SMTP id 7so2509238vsp.6; Thu, 24 Sep 2020 09:43:09 -0700 (PDT) X-Received: by 2002:a67:18c5:: with SMTP id 188mr5052468vsy.30.1600965789348; Thu, 24 Sep 2020 09:43:09 -0700 (PDT) MIME-Version: 1.0 References: <202009241611.08OGBrG4024495@repo.freebsd.org> <7ed37edf-b448-2b48-b90f-7b3f7554a17a@mm.st> In-Reply-To: <7ed37edf-b448-2b48-b90f-7b3f7554a17a@mm.st> From: =?UTF-8?Q?Fernando_Apestegu=C3=ADa?= Date: Thu, 24 Sep 2020 19:41:33 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r366119 - head/usr.bin/which To: xtouqh@mm.st 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-Rspamd-Queue-Id: 4By17h1p71z3bw4 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of fernandoapesteguia@gmail.com designates 209.85.222.46 as permitted sender) smtp.mailfrom=fernandoapesteguia@gmail.com X-Spamd-Result: default: False [-1.72 / 15.00]; MIME_TRACE(0.00)[0:+]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; NEURAL_HAM_LONG(-0.99)[-0.992]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; ARC_NA(0.00)[]; DMARC_NA(0.00)[freebsd.org]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.28)[0.283]; RCVD_IN_DNSWL_NONE(0.00)[209.85.222.46:from]; NEURAL_HAM_MEDIUM(-1.01)[-1.006]; FREEMAIL_TO(0.00)[mm.st]; FORGED_SENDER(0.30)[fernape@freebsd.org,fernandoapesteguia@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.222.46:from]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[fernape@freebsd.org,fernandoapesteguia@gmail.com]; TAGGED_FROM(0.00)[]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 24 Sep 2020 16:43:13 -0000 On Thu, Sep 24, 2020 at 6:32 PM wrote: > > Fernando Apestegu=C3=ADa wrote: > > Author: fernape (ports committer) > > Date: Thu Sep 24 16:11:53 2020 > > New Revision: 366119 > > URL: https://svnweb.freebsd.org/changeset/base/366119 > > > > Log: > > which(1): Add EXAMPLES section to manpage > > > > Add EXAMPLES section showing the use of -a and -s flags and how whic= h(1) > > treates duplicates. > > > > Approved by: manpages (gbe@) > > Differential Revision: https://reviews.freebsd.org/D26182 > > > > Modified: > > head/usr.bin/which/which.1 > > > > Modified: head/usr.bin/which/which.1 > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/usr.bin/which/which.1 Thu Sep 24 15:38:01 2020 (= r366118) > > +++ head/usr.bin/which/which.1 Thu Sep 24 16:11:53 2020 (= r366119) > > @@ -29,7 +29,7 @@ > > .\" > > .\" $FreeBSD$ > > .\" > > -.Dd December 13, 2006 > > +.Dd September 24, 2020 > > .Dt WHICH 1 > > .Os > > .Sh NAME > > @@ -62,6 +62,48 @@ command which is similar or identical to this utilit= y. > > Consult the > > .Xr builtin 1 > > manual page. > > +.Sh EXAMPLES > > +Locate the > > +.Xr ls 1 > > +and > > +.Xr cp 1 > > +commands: > > +.Bd -literal -offset indent > > +$ /usr/bin/which ls cp > > +/bin/ls > > +/bin/cp > > +.Ed > > +.Pp > > +Same as above with a specific > > +.Va PATH > > .Ev ? > > > +and showing all occurrences: > > +.Bd -literal -offset indent > > +$ PATH=3D/bin:/rescue /usr/bin/which -a ls cp > > +/bin/ls > > +/rescue/ls > > +/bin/cp > > +/rescue/cp > > +.Ed > > +.Pp > > +.Nm which > > +will show duplicates if the same executable is find more than once: > > found? Sorry for that. Fixed in r366122. Thanks! > > > +.Bd -literal -offset indent > > +$ PATH=3D/bin:/bin /usr/bin/which -a ls > > +/bin/ls > > +/bin/ls > > +.Ed > > +.Pp > > +Do not show output. > > +Just exit with an appropriate return code: > > +.Bd -literal -offset indent > > +$ /usr/bin/which -s ls cp > > +$ echo $? > > +0 > > + > > +$ /usr/bin/which -s fakecommand > > +$ echo $? > > +1 > > +.Ed > > .Sh SEE ALSO > > .Xr builtin 1 , > > .Xr csh 1 , > > From owner-svn-src-head@freebsd.org Thu Sep 24 16:50:14 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C31AD422203; Thu, 24 Sep 2020 16:50:14 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4By1Hp4ng3z3c5K; Thu, 24 Sep 2020 16:50:14 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8904A24EFB; Thu, 24 Sep 2020 16:50:14 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08OGoETv044826; Thu, 24 Sep 2020 16:50:14 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08OGoEhB044825; Thu, 24 Sep 2020 16:50:14 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202009241650.08OGoEhB044825@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Thu, 24 Sep 2020 16:50:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366123 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 366123 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 24 Sep 2020 16:50:14 -0000 Author: gbe (doc committer) Date: Thu Sep 24 16:50:14 2020 New Revision: 366123 URL: https://svnweb.freebsd.org/changeset/base/366123 Log: crypto_buffer(9): Add a HISTORY and a AUTHORS section Reviewed by: jhb Approved by: jhb Differential Revision: https://reviews.freebsd.org/D26487 Modified: head/share/man/man9/crypto_buffer.9 Modified: head/share/man/man9/crypto_buffer.9 ============================================================================== --- head/share/man/man9/crypto_buffer.9 Thu Sep 24 16:42:17 2020 (r366122) +++ head/share/man/man9/crypto_buffer.9 Thu Sep 24 16:50:14 2020 (r366123) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 12, 2020 +.Dd September 24, 2020 .Dt CRYPTO_BUFFER 9 .Os .Sh NAME @@ -325,3 +325,13 @@ returns true if the request uses a separate output buf .Xr crypto_session 9 , .Xr mbuf 9 , .Xr uio 9 +.Sh HISTORY +The +.Nm +functions first appeared in +.Fx 13 . +.Sh AUTHORS +The +.Nm +functions and this manual page were written by +.An John Baldwin Aq Mt jhb@FreeBSD.org . From owner-svn-src-head@freebsd.org Thu Sep 24 19:12:03 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DCFD742594A; Thu, 24 Sep 2020 19:12:03 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4By4RR5dzLz43SV; Thu, 24 Sep 2020 19:12:03 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A5DFD26F25; Thu, 24 Sep 2020 19:12:03 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08OJC3Dr035851; Thu, 24 Sep 2020 19:12:03 GMT (envelope-from sobomax@FreeBSD.org) Received: (from sobomax@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08OJC3uB035850; Thu, 24 Sep 2020 19:12:03 GMT (envelope-from sobomax@FreeBSD.org) Message-Id: <202009241912.08OJC3uB035850@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sobomax set sender to sobomax@FreeBSD.org using -f From: Maxim Sobolev Date: Thu, 24 Sep 2020 19:12:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366126 - head/usr.sbin/daemon X-SVN-Group: head X-SVN-Commit-Author: sobomax X-SVN-Commit-Paths: head/usr.sbin/daemon X-SVN-Commit-Revision: 366126 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 24 Sep 2020 19:12:03 -0000 Author: sobomax Date: Thu Sep 24 19:12:03 2020 New Revision: 366126 URL: https://svnweb.freebsd.org/changeset/base/366126 Log: Fix a typo in the 366098. Reported by: 0mp MFC after: 2 weeks (along with 366098) Modified: head/usr.sbin/daemon/daemon.8 Modified: head/usr.sbin/daemon/daemon.8 ============================================================================== --- head/usr.sbin/daemon/daemon.8 Thu Sep 24 18:36:31 2020 (r366125) +++ head/usr.sbin/daemon/daemon.8 Thu Sep 24 19:12:03 2020 (r366126) @@ -74,7 +74,7 @@ Close and re-open it when signal SIGHUP is received, for interoperability with .Xr newsyslog 1 and similar log rotation / archival mechanisms. If -.Fa o +.Fl o is not specified, this flag is ignored. .It Fl S Enable syslog output. From owner-svn-src-head@freebsd.org Thu Sep 24 19:33:48 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CAD06425AFA; Thu, 24 Sep 2020 19:33:48 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4By4wX51Fqz44VG; Thu, 24 Sep 2020 19:33:48 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 90D3B273CC; Thu, 24 Sep 2020 19:33:48 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08OJXm7A050484; Thu, 24 Sep 2020 19:33:48 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08OJXmGn050483; Thu, 24 Sep 2020 19:33:48 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202009241933.08OJXmGn050483@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Thu, 24 Sep 2020 19:33:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366127 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 366127 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 24 Sep 2020 19:33:48 -0000 Author: gbe (doc committer) Date: Thu Sep 24 19:33:48 2020 New Revision: 366127 URL: https://svnweb.freebsd.org/changeset/base/366127 Log: Add a manual page for TCP BBR Reviewed by: bcr Approved by: bcr Differential Revision: https://reviews.freebsd.org/D24915 Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Thu Sep 24 19:12:03 2020 (r366126) +++ head/share/man/man4/Makefile Thu Sep 24 19:33:48 2020 (r366127) @@ -524,6 +524,7 @@ MAN= aac.4 \ tap.4 \ targ.4 \ tcp.4 \ + tcp_bbr.4 \ tdfx.4 \ terasic_mtl.4 \ termios.4 \ From owner-svn-src-head@freebsd.org Thu Sep 24 19:35:35 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8104D426099; Thu, 24 Sep 2020 19:35:35 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4By4yb2sszz44wD; Thu, 24 Sep 2020 19:35:35 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 466F0271F4; Thu, 24 Sep 2020 19:35:35 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08OJZZMP050743; Thu, 24 Sep 2020 19:35:35 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08OJZZGs050742; Thu, 24 Sep 2020 19:35:35 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202009241935.08OJZZGs050742@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Thu, 24 Sep 2020 19:35:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366128 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 366128 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 24 Sep 2020 19:35:35 -0000 Author: gbe (doc committer) Date: Thu Sep 24 19:35:34 2020 New Revision: 366128 URL: https://svnweb.freebsd.org/changeset/base/366128 Log: Add missing file (tcp_bbr.4) from r366127 Reviewed by: bcr Approved by: bcr Differential Revision: https://reviews.freebsd.org/D24915 Added: head/share/man/man4/tcp_bbr.4 (contents, props changed) Added: head/share/man/man4/tcp_bbr.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/tcp_bbr.4 Thu Sep 24 19:35:34 2020 (r366128) @@ -0,0 +1,168 @@ +.\" +.\" Copyright (c) 2020, Gordon Bergling +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR +.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd September 24, 2020 +.Dt TCP_BBR 4 +.Os +.Sh NAME +.Nm tcp_bbr +.Nd TCP Bottleneck Bandwidth and Round-Trip Time Algorithm +.Sh SYNOPSIS +To use this TCP stack you have to place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "options TCPHPTS" +.Ed +.Pp +To load the driver as a module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +tcp_bbr_load="YES" +.Ed +.Pp +To enable the TCP stack you must place the following line in the +.Xr sysctl.conf 5 : +.Bd -literal -offset indent +net.inet.tcp.functions_default=bbr +.Ed +.Sh DESCRIPTION +Bottleneck bandwidth and round-trip time (BBR) is a congestion control algorithm which +seeks high throughput with a small queue by probing BW and RTT. +It is a round-up redesign of congestion control, which is not loss-based, delay-based, +ECN-based or AIMD-based. +.Pp +The core design of BBR is about creating a model graph of the network path by +estimating the maximum BW and minimum RTT on each ACK. +.Sh MIB Variables +The algorithm exposes the following scopes in the +.Va net.inet.tcp.bbr +branch of the +.Xr sysctl 3 +MIB: +.Bl -tag -width ".Va exp_backoff_scale" +.It Va cwnd +Cwnd controls, for example "target cwnd rtt measurment" and "BBR initial window". +.It Va measure +Measurement controls. +.It Va pacing +Connection pacing controls. +.It Va policer +Policer controls, for example "false detection threshold" and "loss threshold". +.It Va probertt +Probe RTT controls. +.It Va startup +Startup controls. +.It Va states +State controls. +.It Va timeout +Time out controls. +.El +.Pp +Besides the variables within the above scopes the following +variables are also exposed in the +.Va net.inet.tcp.bbr +branch: +.Bl -tag -width ".Va exp_backoff_scale" +.It Va clrlost +Clear lost counters. +.It Va software_pacing +Total number of software paced flows. +.It Va hdwr_pacing +Total number of hardware paced flows. +.It Va enob_no_hdwr_pacing +Total number of enobufs for non-hardware paced flows. +.It Va enob_hdwr_pacing +Total number of enobufs for hardware paced flows. +.It Va rtt_tlp_thresh +What divisor for TLP rtt/retran will be added (1=rtt, 2=1/2 rtt etc). +.It Va reorder_fade +Does reorder detection fade, if so how many ms (0 means never). +.It Va reorder_thresh +What factor for rack will be added when seeing reordering (shift right). +.It Va bb_verbose +Should BBR black box logging be verbose. +.It Va sblklimit +When do we start ignoring small sack blocks. +.It Va resend_use_tso +Can resends use TSO? +.It Va data_after_close +Do we hold off sending a RST until all pending data is ack'd. +.It Va kill_paceout +When we hit this many errors in a row, kill the session? +.It Va error_paceout +When we hit an error what is the min to pace out in usec's? +.It Va cheat_rxt +Do we burst 1ms between sends on retransmissions (like rack)? +.It Va minrto +Minimum RTO in ms. +.El +.Sh SEE ALSO +.Xr cc_chd 4 , +.Xr cc_cubic 4 , +.Xr cc_hd 4 , +.Xr cc_htcp 4 , +.Xr cc_newreno 4 , +.Xr cc_vegas 4 , +.Xr h_ertt 4 , +.Xr mod_cc 4 , +.Xr tcp 4 , +.Xr mod_cc 9 +.Rs +.%A "Neal Cardwell" +.%A "Yuchung Cheng" +.%A "Stephen Gunn" +.%A "Soheil Hassas Yeganeh" +.%A "Van Jacobson" +.%T "BBR: Congestion-Based Congestion Control" +.%J "ACM Queue, Vol. 14" +.%D "September / October 2016" +.Re +.Rs +.%A "Dominik Scholz" +.%A "Benedikt Jaeger" +.%A "Lukas Schwaighofer" +.%A "Daniel Raumer" +.%A "Fabien Geyer" +.%A "Georg Carle" +.%T "Towards a Deeper Understanding of TCP BBR Congestion Control" +.%J "IFIP Networking 2018" +.%D "May 2018" +.%U "http://www.net.in.tum.de/fileadmin/bibtex/publications/papers/IFIP-Networking-2018-TCP-BBR.pdf" +.Re +.Sh HISTORY +The +.Nm +congestion control module first appeared in +.Fx 13.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +congestion control module was written by +.An Randall Stewart Aq Mt rrs@FreeBSD.org +and sponsored by Netflix, Inc. +This manual page was written by +.An Gordon Bergling Aq Mt gbe@FreeBSD.org . From owner-svn-src-head@freebsd.org Thu Sep 24 19:59:29 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C116542676A; Thu, 24 Sep 2020 19:59:29 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4By5V94lZxz46WB; Thu, 24 Sep 2020 19:59:29 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 836A427449; Thu, 24 Sep 2020 19:59:29 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08OJxTkB062876; Thu, 24 Sep 2020 19:59:29 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08OJxTmV062875; Thu, 24 Sep 2020 19:59:29 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202009241959.08OJxTmV062875@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Thu, 24 Sep 2020 19:59:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366129 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 366129 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 24 Sep 2020 19:59:29 -0000 Author: gbe (doc committer) Date: Thu Sep 24 19:59:29 2020 New Revision: 366129 URL: https://svnweb.freebsd.org/changeset/base/366129 Log: tcp(4): Add a reference for tcp_bbr(4) man page Modified: head/share/man/man4/tcp.4 Modified: head/share/man/man4/tcp.4 ============================================================================== --- head/share/man/man4/tcp.4 Thu Sep 24 19:35:34 2020 (r366128) +++ head/share/man/man4/tcp.4 Thu Sep 24 19:59:29 2020 (r366129) @@ -773,6 +773,7 @@ when trying to use a TCP function block that is not av .Xr mod_cc 4 , .Xr siftr 4 , .Xr syncache 4 , +.Xr tcp_bbr 4 , .Xr setkey 8 , .Xr tcp_functions 9 .Rs From owner-svn-src-head@freebsd.org Thu Sep 24 21:39:10 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 10CAC3E1460; Thu, 24 Sep 2020 21:39:10 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4By7j96mMXz4Gt3; Thu, 24 Sep 2020 21:39:09 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C83E688CE; Thu, 24 Sep 2020 21:39:09 +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 08OLd9Do026458; Thu, 24 Sep 2020 21:39:09 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08OLd9Nt026457; Thu, 24 Sep 2020 21:39:09 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <202009242139.08OLd9Nt026457@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 24 Sep 2020 21:39:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366131 - head/lib/libc/tests/sys X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/lib/libc/tests/sys X-SVN-Commit-Revision: 366131 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 24 Sep 2020 21:39:10 -0000 Author: asomers Date: Thu Sep 24 21:39:09 2020 New Revision: 366131 URL: https://svnweb.freebsd.org/changeset/base/366131 Log: lib/libc/tests/sys: raise WARNS to 6 MFC after: 2 weeks Modified: head/lib/libc/tests/sys/Makefile Modified: head/lib/libc/tests/sys/Makefile ============================================================================== --- head/lib/libc/tests/sys/Makefile Thu Sep 24 20:01:31 2020 (r366130) +++ head/lib/libc/tests/sys/Makefile Thu Sep 24 21:39:09 2020 (r366131) @@ -78,12 +78,6 @@ LIBADD.timer_create_test+= rt SRCS.mlock_test+= mlock_helper.c SRCS.setrlimit_test+= mlock_helper.c -.if ${COMPILER_TYPE} == "gcc" -WARNS?= 3 -.else -WARNS?= 4 -.endif - FILESGROUPS+= truncate_test_FILES truncate_test_FILES= truncate_test.root_owned From owner-svn-src-head@freebsd.org Thu Sep 24 21:42:45 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CE63C3E1713; Thu, 24 Sep 2020 21:42:45 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4By7nK59J4z4HHq; Thu, 24 Sep 2020 21:42:45 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 95C2C88E3; Thu, 24 Sep 2020 21:42:45 +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 08OLgjTL032156; Thu, 24 Sep 2020 21:42:45 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08OLgjNm032155; Thu, 24 Sep 2020 21:42:45 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <202009242142.08OLgjNm032155@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 24 Sep 2020 21:42:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366132 - head/lib/libc/tests/iconv X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/lib/libc/tests/iconv X-SVN-Commit-Revision: 366132 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 24 Sep 2020 21:42:45 -0000 Author: asomers Date: Thu Sep 24 21:42:44 2020 New Revision: 366132 URL: https://svnweb.freebsd.org/changeset/base/366132 Log: lib/libc/tests/iconv: raise WARNS to 6 MFC after: 2 weeks Modified: head/lib/libc/tests/iconv/Makefile head/lib/libc/tests/iconv/iconvctl_test.c Modified: head/lib/libc/tests/iconv/Makefile ============================================================================== --- head/lib/libc/tests/iconv/Makefile Thu Sep 24 21:39:09 2020 (r366131) +++ head/lib/libc/tests/iconv/Makefile Thu Sep 24 21:42:44 2020 (r366132) @@ -3,6 +3,5 @@ TESTSDIR= ${TESTSBASE}/lib/libc/iconv ATF_TESTS_C+= iconvctl_test -WARNS?= 2 .include Modified: head/lib/libc/tests/iconv/iconvctl_test.c ============================================================================== --- head/lib/libc/tests/iconv/iconvctl_test.c Thu Sep 24 21:39:09 2020 (r366131) +++ head/lib/libc/tests/iconv/iconvctl_test.c Thu Sep 24 21:42:44 2020 (r366132) @@ -30,7 +30,7 @@ __FBSDID("$FreeBSD$"); #include -void +static void test_trivialp(const char *src, const char *dst, int expected) { iconv_t ic; From owner-svn-src-head@freebsd.org Thu Sep 24 23:50:38 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8EBA03E498E; Thu, 24 Sep 2020 23:50:38 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-il1-f195.google.com (mail-il1-f195.google.com [209.85.166.195]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ByBcs46Jsz4Pys; Thu, 24 Sep 2020 23:50:37 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-il1-f195.google.com with SMTP id l16so634621ilt.13; Thu, 24 Sep 2020 16:50:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MdgvKLETuU3rdpPCIhG/vjRnASpdxZdWtNpTtdMSR3s=; b=uZUiz0Ww51aCCTitD1yxRiL8O2/Kdrjb0SJaH81Zkqqp4Jq5/UbfCiQIwGshTAKkmB Qbzd7cIr9lnQh6gvM0uuPQc+NJ1UfZntaDpULMblklgC6nqm1R0t9bGom1TlI3GdVFOh h8oq+d36E5QeaxMbZcwSzR2KiaAf58WR9oGCqkWjdFZKg7ViuGxYL78+A4h3tm8IOdGG AYyiLd3KZRO6L6oWCHjapiTeL6OqydRVTn5kfoEEQbHXrZS4ve0406Y5RBQjyimV0Q3P N/xeRHG3alVvMqnnBL4n7qvWIFlQsbGfrKNSjzYiGcMzXn5jL4Wb0xtAnWSkxbhLzNgW QnaQ== X-Gm-Message-State: AOAM532X/AGc42Uno6W4U/AePG5vsssFrMc33Wu6QVDVQCyMwv3bBiAN 2DSanfMRm8Ku5kA6jLHYyj8HUhT18/E5pq7C3c43OykrTBw= X-Google-Smtp-Source: ABdhPJyXffBoqIWFsN6bCEDtJUsfCWfeMkV6lDWRMwFzLf0GscioMCKt57qk+ds6VOfeLkJ8dSXmbHTNCbvpimgGHME= X-Received: by 2002:a05:6e02:8a2:: with SMTP id a2mr974453ilt.98.1600991435810; Thu, 24 Sep 2020 16:50:35 -0700 (PDT) MIME-Version: 1.0 References: <202007301445.06UEj5uj062013@repo.freebsd.org> In-Reply-To: From: Ed Maste Date: Thu, 24 Sep 2020 19:50:23 -0400 Message-ID: Subject: Re: svn commit: r363700 - in head/sys: arm/ti arm/ti/am335x arm/ti/clk arm/ti/cpsw arm/ti/omap4 arm/ti/usb dev/uart modules To: Michal Meloun Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4ByBcs46Jsz4Pys X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.166.195 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com X-Spamd-Result: default: False [-2.36 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FREEFALL_USER(0.00)[carpeddiem]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-0.98)[-0.976]; NEURAL_HAM_MEDIUM(-0.95)[-0.947]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.43)[-0.435]; RCVD_IN_DNSWL_NONE(0.00)[209.85.166.195:from]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.166.195:from]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; MIME_TRACE(0.00)[0:+]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 24 Sep 2020 23:50:38 -0000 On Tue, 22 Sep 2020 at 12:50, Ed Maste wrote: > > On Thu, 30 Jul 2020 at 10:45, Michal Meloun wrote: > > > > Author: mmel > > Date: Thu Jul 30 14:45:05 2020 > > New Revision: 363700 > > URL: https://svnweb.freebsd.org/changeset/base/363700 > > > > Log: > > Move Ti AM335x to dev/extres/clk framework. > > It looks like BeagleBone Black is indeed broken after this commit > https://ci.freebsd.org/hwlab/job/FreeBSD-device-head-beaglebone-test/6131/ > https://ci.freebsd.org/hwlab/job/FreeBSD-device-head-beaglebone-test/6131/artifact/device_tests/beaglebone.boot.log It seems this was because we weren't using an up-to-date dtb - at various times during my investigation of the CI setup we were using either uboot's built-in dtb or were tftp fetching an old copy of am335x-boneblack.dtb. With bootcmd including "run findfdt" and making sure there are no old copies in the tftproot directory the CI environment is booting again. From owner-svn-src-head@freebsd.org Fri Sep 25 04:16:29 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CA9203E996D; Fri, 25 Sep 2020 04:16:29 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ByJWd50cXz4brX; Fri, 25 Sep 2020 04:16:29 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8F4A9D548; Fri, 25 Sep 2020 04:16:29 +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 08P4GTN4073362; Fri, 25 Sep 2020 04:16:29 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08P4GT3p073360; Fri, 25 Sep 2020 04:16:29 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202009250416.08P4GT3p073360@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Fri, 25 Sep 2020 04:16:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366136 - in head/sys/dev: amdsmn amdtemp X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head/sys/dev: amdsmn amdtemp X-SVN-Commit-Revision: 366136 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 25 Sep 2020 04:16:29 -0000 Author: cem Date: Fri Sep 25 04:16:28 2020 New Revision: 366136 URL: https://svnweb.freebsd.org/changeset/base/366136 Log: amdtemp(4), amdsmn(4): Attach to Ryzen 4000 APU (Zen 2, "Renoir") PR: 249864 Reported by: Florian Millet Tested by: Florian Millet Modified: head/sys/dev/amdsmn/amdsmn.c head/sys/dev/amdtemp/amdtemp.c Modified: head/sys/dev/amdsmn/amdsmn.c ============================================================================== --- head/sys/dev/amdsmn/amdsmn.c Fri Sep 25 01:16:01 2020 (r366135) +++ head/sys/dev/amdsmn/amdsmn.c Fri Sep 25 04:16:28 2020 (r366136) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2017-2019 Conrad Meyer + * Copyright (c) 2017-2020 Conrad Meyer * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -60,6 +60,7 @@ __FBSDID("$FreeBSD$"); #define PCI_DEVICE_ID_AMD_17H_ROOT 0x1450 #define PCI_DEVICE_ID_AMD_17H_M10H_ROOT 0x15d0 #define PCI_DEVICE_ID_AMD_17H_M30H_ROOT 0x1480 /* Also M70H. */ +#define PCI_DEVICE_ID_AMD_17H_M60H_ROOT 0x1630 struct pciid; struct amdsmn_softc { @@ -94,6 +95,12 @@ static const struct pciid { { .amdsmn_vendorid = CPU_VENDOR_AMD, .amdsmn_deviceid = PCI_DEVICE_ID_AMD_17H_M30H_ROOT, + .amdsmn_addr_reg = F17H_SMN_ADDR_REG, + .amdsmn_data_reg = F17H_SMN_DATA_REG, + }, + { + .amdsmn_vendorid = CPU_VENDOR_AMD, + .amdsmn_deviceid = PCI_DEVICE_ID_AMD_17H_M60H_ROOT, .amdsmn_addr_reg = F17H_SMN_ADDR_REG, .amdsmn_data_reg = F17H_SMN_DATA_REG, }, Modified: head/sys/dev/amdtemp/amdtemp.c ============================================================================== --- head/sys/dev/amdtemp/amdtemp.c Fri Sep 25 01:16:01 2020 (r366135) +++ head/sys/dev/amdtemp/amdtemp.c Fri Sep 25 04:16:28 2020 (r366136) @@ -107,6 +107,7 @@ struct amdtemp_softc { #define DEVICEID_AMD_HOSTB17H_ROOT 0x1450 #define DEVICEID_AMD_HOSTB17H_M10H_ROOT 0x15d0 #define DEVICEID_AMD_HOSTB17H_M30H_ROOT 0x1480 /* Also M70h. */ +#define DEVICEID_AMD_HOSTB17H_M60H_ROOT 0x1630 static const struct amdtemp_product { uint16_t amdtemp_vendorid; @@ -130,6 +131,7 @@ static const struct amdtemp_product { { VENDORID_AMD, DEVICEID_AMD_HOSTB17H_ROOT, false }, { VENDORID_AMD, DEVICEID_AMD_HOSTB17H_M10H_ROOT, false }, { VENDORID_AMD, DEVICEID_AMD_HOSTB17H_M30H_ROOT, false }, + { VENDORID_AMD, DEVICEID_AMD_HOSTB17H_M60H_ROOT, false }, }; /* From owner-svn-src-head@freebsd.org Fri Sep 25 07:39:15 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3E7AA3EDC1F; Fri, 25 Sep 2020 07:39:15 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ByP1b0zKZz4lt9; Fri, 25 Sep 2020 07:39:15 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 00207F56F; Fri, 25 Sep 2020 07:39:14 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08P7dEIx096663; Fri, 25 Sep 2020 07:39:14 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08P7dEO9096662; Fri, 25 Sep 2020 07:39:14 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202009250739.08P7dEO9096662@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 25 Sep 2020 07:39:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366137 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 366137 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 25 Sep 2020 07:39:15 -0000 Author: avg Date: Fri Sep 25 07:39:14 2020 New Revision: 366137 URL: https://svnweb.freebsd.org/changeset/base/366137 Log: aw_pwm: trivially add H3 support MFC after: 2 weeks Modified: head/sys/arm/allwinner/aw_pwm.c Modified: head/sys/arm/allwinner/aw_pwm.c ============================================================================== --- head/sys/arm/allwinner/aw_pwm.c Fri Sep 25 04:16:28 2020 (r366136) +++ head/sys/arm/allwinner/aw_pwm.c Fri Sep 25 07:39:14 2020 (r366137) @@ -70,6 +70,7 @@ __FBSDID("$FreeBSD$"); static struct ofw_compat_data compat_data[] = { { "allwinner,sun5i-a13-pwm", 1 }, + { "allwinner,sun8i-h3-pwm", 1 }, { NULL, 0 } }; From owner-svn-src-head@freebsd.org Fri Sep 25 07:39:42 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 82E173EDC2A; Fri, 25 Sep 2020 07:39:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ByP262cwRz4lyw; Fri, 25 Sep 2020 07:39:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3DF81F570; Fri, 25 Sep 2020 07:39:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08P7dgMf096725; Fri, 25 Sep 2020 07:39:42 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08P7dgqO096724; Fri, 25 Sep 2020 07:39:42 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202009250739.08P7dgqO096724@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 25 Sep 2020 07:39:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366138 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 366138 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 25 Sep 2020 07:39:42 -0000 Author: avg Date: Fri Sep 25 07:39:41 2020 New Revision: 366138 URL: https://svnweb.freebsd.org/changeset/base/366138 Log: aw_pwm: remove the busy bit check The bit seems to always be set on my hardware, H3. However, programming the hardware seems to work just fine. MFC after: 3 weeks Modified: head/sys/arm/allwinner/aw_pwm.c Modified: head/sys/arm/allwinner/aw_pwm.c ============================================================================== --- head/sys/arm/allwinner/aw_pwm.c Fri Sep 25 07:39:14 2020 (r366137) +++ head/sys/arm/allwinner/aw_pwm.c Fri Sep 25 07:39:41 2020 (r366138) @@ -286,10 +286,6 @@ aw_pwm_channel_config(device_t dev, u_int channel, u_i } reg = AW_PWM_READ(sc, AW_PWM_CTRL); - if (reg & AW_PWM_CTRL_PERIOD_BUSY) { - device_printf(sc->dev, "pwm busy\n"); - return (EBUSY); - } /* Write the prescalar */ reg &= ~AW_PWM_CTRL_PRESCALE_MASK; From owner-svn-src-head@freebsd.org Fri Sep 25 07:40:03 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 291D03EDD22; Fri, 25 Sep 2020 07:40:03 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ByP2W0Nqxz4m7y; Fri, 25 Sep 2020 07:40:03 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E62AEF7DD; Fri, 25 Sep 2020 07:40:02 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08P7e2Yq096823; Fri, 25 Sep 2020 07:40:02 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08P7e2oL096822; Fri, 25 Sep 2020 07:40:02 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202009250740.08P7e2oL096822@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 25 Sep 2020 07:40:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366139 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 366139 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 25 Sep 2020 07:40:03 -0000 Author: avg Date: Fri Sep 25 07:40:02 2020 New Revision: 366139 URL: https://svnweb.freebsd.org/changeset/base/366139 Log: aw_pwm: fix selection of the prescaler Prescaling divides the frequency, not multiplies it. MFC after: 2 weeks Modified: head/sys/arm/allwinner/aw_pwm.c Modified: head/sys/arm/allwinner/aw_pwm.c ============================================================================== --- head/sys/arm/allwinner/aw_pwm.c Fri Sep 25 07:39:41 2020 (r366138) +++ head/sys/arm/allwinner/aw_pwm.c Fri Sep 25 07:40:02 2020 (r366139) @@ -274,7 +274,7 @@ aw_pwm_channel_config(device_t dev, u_int channel, u_i for (i = 0; i < nitems(aw_pwm_clk_prescaler); i++) { if (aw_pwm_clk_prescaler[i] == 0) continue; - div = (AW_PWM_MAX_FREQ * aw_pwm_clk_prescaler[i]) / period_freq; + div = AW_PWM_MAX_FREQ / aw_pwm_clk_prescaler[i] / period_freq; if ((div - 1) < AW_PWM_PERIOD_TOTAL_MASK ) { prescaler = i; clk_rate = AW_PWM_MAX_FREQ / aw_pwm_clk_prescaler[i]; From owner-svn-src-head@freebsd.org Fri Sep 25 07:40:27 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 40CBA3EDE91; Fri, 25 Sep 2020 07:40:27 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ByP2z04GQz4m6W; Fri, 25 Sep 2020 07:40:26 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C75C5FB8B; Fri, 25 Sep 2020 07:40:26 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08P7eQR5096882; Fri, 25 Sep 2020 07:40:26 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08P7eQoB096881; Fri, 25 Sep 2020 07:40:26 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202009250740.08P7eQoB096881@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 25 Sep 2020 07:40:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366140 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 366140 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 25 Sep 2020 07:40:27 -0000 Author: avg Date: Fri Sep 25 07:40:26 2020 New Revision: 366140 URL: https://svnweb.freebsd.org/changeset/base/366140 Log: aw_pwm: fix programming of the period The programmed value is biased by one: 0 means 1 cycle, 1 means 2 cycles, etc. MFC after: 3 weeks Modified: head/sys/arm/allwinner/aw_pwm.c Modified: head/sys/arm/allwinner/aw_pwm.c ============================================================================== --- head/sys/arm/allwinner/aw_pwm.c Fri Sep 25 07:40:02 2020 (r366139) +++ head/sys/arm/allwinner/aw_pwm.c Fri Sep 25 07:40:26 2020 (r366140) @@ -293,7 +293,7 @@ aw_pwm_channel_config(device_t dev, u_int channel, u_i AW_PWM_WRITE(sc, AW_PWM_CTRL, reg); /* Write the total/active cycles */ - reg = ((clk_rate / period_freq) << AW_PWM_PERIOD_TOTAL_SHIFT) | + reg = ((clk_rate / period_freq - 1) << AW_PWM_PERIOD_TOTAL_SHIFT) | ((clk_rate / duty_freq) << AW_PWM_PERIOD_ACTIVE_SHIFT); AW_PWM_WRITE(sc, AW_PWM_PERIOD, reg); From owner-svn-src-head@freebsd.org Fri Sep 25 07:40:57 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3292F3EDC5F; Fri, 25 Sep 2020 07:40:57 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ByP3Y0fhbz4mJB; Fri, 25 Sep 2020 07:40:57 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EF18CF94D; Fri, 25 Sep 2020 07:40:56 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08P7euve097624; Fri, 25 Sep 2020 07:40:56 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08P7euZE097623; Fri, 25 Sep 2020 07:40:56 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202009250740.08P7euZE097623@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 25 Sep 2020 07:40:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366141 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 366141 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 25 Sep 2020 07:40:57 -0000 Author: avg Date: Fri Sep 25 07:40:56 2020 New Revision: 366141 URL: https://svnweb.freebsd.org/changeset/base/366141 Log: aw_pwm: ensure sane configuration, just in case Make sure that the hardware is configured to cycle mode and that the bypass is disabled. MFC after: 2 weeks Modified: head/sys/arm/allwinner/aw_pwm.c Modified: head/sys/arm/allwinner/aw_pwm.c ============================================================================== --- head/sys/arm/allwinner/aw_pwm.c Fri Sep 25 07:40:26 2020 (r366140) +++ head/sys/arm/allwinner/aw_pwm.c Fri Sep 25 07:40:56 2020 (r366141) @@ -290,6 +290,13 @@ aw_pwm_channel_config(device_t dev, u_int channel, u_i /* Write the prescalar */ reg &= ~AW_PWM_CTRL_PRESCALE_MASK; reg |= prescaler; + + reg &= ~AW_PWM_CTRL_MODE_MASK; + reg |= AW_PWM_CTRL_CYCLE_MODE; + + reg &= ~AW_PWM_CTRL_PULSE_START; + reg &= ~AW_PWM_CTRL_CLK_BYPASS; + AW_PWM_WRITE(sc, AW_PWM_CTRL, reg); /* Write the total/active cycles */ From owner-svn-src-head@freebsd.org Fri Sep 25 07:41:52 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4AF673EDEE7; Fri, 25 Sep 2020 07:41:52 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ByP4c1J0gz4mYF; Fri, 25 Sep 2020 07:41:52 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 014AFFC8F; Fri, 25 Sep 2020 07:41:52 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08P7fpUB001726; Fri, 25 Sep 2020 07:41:51 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08P7fpUb001725; Fri, 25 Sep 2020 07:41:51 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202009250741.08P7fpUb001725@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 25 Sep 2020 07:41:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366142 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 366142 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 25 Sep 2020 07:41:52 -0000 Author: avg Date: Fri Sep 25 07:41:51 2020 New Revision: 366142 URL: https://svnweb.freebsd.org/changeset/base/366142 Log: aw_pwm: add a check and some comments related to long periods The hardware supports periods as long as 196 seconds[*] when using the maximal prescaling of 72000 and maximum cycle count of 2^16. But the code becomes incorrect when the period length approaches 1 second. That's because of things like NS_PER_SEC / period. [*] At the same time I must note that the KPI provides for maximum period of about 4 seconds (2^32 nanoseconds). MFC after: 2 weeks Modified: head/sys/arm/allwinner/aw_pwm.c Modified: head/sys/arm/allwinner/aw_pwm.c ============================================================================== --- head/sys/arm/allwinner/aw_pwm.c Fri Sep 25 07:40:56 2020 (r366141) +++ head/sys/arm/allwinner/aw_pwm.c Fri Sep 25 07:41:51 2020 (r366142) @@ -259,6 +259,20 @@ aw_pwm_channel_config(device_t dev, u_int channel, u_i period_freq = NS_PER_SEC / period; if (period_freq > AW_PWM_MAX_FREQ) return (EINVAL); + + /* + * FIXME. The hardware is capable of sub-Hz frequencies, that is, + * periods longer than a second. But the current code cannot deal + * with those properly. + */ + if (period_freq == 0) + return (EINVAL); + + /* + * FIXME. There is a great loss of precision when the period and the + * duty are near 1 second. In some cases period_freq and duty_freq can + * be equal even if the period and the duty are significantly different. + */ duty_freq = NS_PER_SEC / duty; if (duty_freq < period_freq) { device_printf(sc->dev, "duty < period\n"); From owner-svn-src-head@freebsd.org Fri Sep 25 07:48:00 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D6C393EE133; Fri, 25 Sep 2020 07:48:00 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ByPCg2G7Pz4mfM; Fri, 25 Sep 2020 07:47:59 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lj1-f176.google.com with SMTP id u4so1627701ljd.10; Fri, 25 Sep 2020 00:47:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=R5TWtGvwh8fJ0FkAOExl8oWsztrqtEVzqQfU5oWYe0g=; b=de/T1QfqMtiVtaJf+PvyCpgkp5HXmtBJVtytziDdf365w+fNnYbHw2vkCA31TcAHdI l0gvPMISJJdMmczZOy1LRGHprtkqYSJukxAK6E+HhkapoqX9i1A9AaVwnlehowYVe+nN i1jsOGVr88CYoeR7I72HgQZLYv/ldIrUNKqD5/NjEJnI66NqZOlT4EU40yyKB+3WWmKk qbNda+OAoT0jCQK8NC7nigSemTrgLAwFdQuuB1/L/uI+G+47Q2biG3DCOtwBYejOyqtH 0KHEPrxYO/nLvKQlNNs/fWhqopmyTXzp4QIkusj7q4PFfpou6H7huIGyB3xTDMXcVAg8 rivQ== X-Gm-Message-State: AOAM5328+hqLTCzUp2q5Hj3H1PZ0Lp8KerhA6CJ8BL0jWnf+TuZa4DJt dMxNd9EcTDPywYcZcJP+yDWduSszNDw= X-Google-Smtp-Source: ABdhPJxQngAHig4OFrTCj9R/vXh4+YDhD3cOjm7KVqGJg0txEfTe4pz+7zF+GfDxYaQ0XS2RKQPmOQ== X-Received: by 2002:a2e:85d9:: with SMTP id h25mr852726ljj.279.1601020077054; Fri, 25 Sep 2020 00:47:57 -0700 (PDT) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id s10sm1719267ljj.21.2020.09.25.00.47.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 25 Sep 2020 00:47:56 -0700 (PDT) Subject: Re: svn commit: r366142 - head/sys/arm/allwinner To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202009250741.08P7fpUb001725@repo.freebsd.org> From: Andriy Gapon Openpgp: preference=signencrypt Autocrypt: addr=avg@FreeBSD.org; prefer-encrypt=mutual; keydata= mDMEX1iFDhYJKwYBBAHaRw8BAQdAiu8JG/oLFkVkOAJqJc7Dx5KI/Q6C3SBI20EQm+DXnAu0 HkFuZHJpeSBHYXBvbiA8YXZnQEZyZWVCU0Qub3JnPoiWBBMWCAA+FiEEyCHHZM09l0OE3Ir/ 1A1+Gq8+L1EFAl9YhQ4CGwMFCQeEzgAFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQ1A1+ Gq8+L1Fc0wD/ZjmhHfbCJywZU3aOxXIPjcz73FYEGMvqMCCLAWyLbSABALFL+1ZNrjV3BGjq 889cOYFuboA/Yn3eWezS+tfqYBsGuDgEX1iFDhIKKwYBBAGXVQEFAQEHQL6B20Xi600TrkpG P9fWjl7JtHNxqrHKhX6Kg7kgb4ILAwEIB4h+BBgWCAAmFiEEyCHHZM09l0OE3Ir/1A1+Gq8+ L1EFAl9YhQ4CGwwFCQeEzgAACgkQ1A1+Gq8+L1F3cgEAktp4h+IJUJxL1vn6zMOt//znni/J TanKfQuA8wGXcGkBAKpZJhqMkg+pKk7MGvJhgJ6nCpTZ+rMK6vZVZLUWc3QF Message-ID: Date: Fri, 25 Sep 2020 10:47:54 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Firefox/60.0 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <202009250741.08P7fpUb001725@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4ByPCg2G7Pz4mfM X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of agapon@gmail.com designates 209.85.208.176 as permitted sender) smtp.mailfrom=agapon@gmail.com X-Spamd-Result: default: False [-1.26 / 15.00]; RCVD_TLS_ALL(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; ARC_NA(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; NEURAL_HAM_LONG(-0.95)[-0.954]; RCVD_COUNT_THREE(0.00)[3]; DMARC_NA(0.00)[FreeBSD.org]; NEURAL_SPAM_SHORT(0.52)[0.518]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.176:from]; NEURAL_HAM_MEDIUM(-0.82)[-0.822]; FORGED_SENDER(0.30)[avg@FreeBSD.org,agapon@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.176:from]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[avg@FreeBSD.org,agapon@gmail.com]; MAILMAN_DEST(0.00)[svn-src-head,svn-src-all]; RECEIVED_SPAMHAUS_PBL(0.00)[93.72.151.96:received] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 25 Sep 2020 07:48:00 -0000 On 25/09/2020 10:41, Andriy Gapon wrote: > [*] At the same time I must note that the KPI provides for maximum > period of about 4 seconds (2^32 nanoseconds). Also, the KPI does not provide a way to invert active level of which some controllers are capable. -- Andriy Gapon From owner-svn-src-head@freebsd.org Fri Sep 25 07:54:39 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 00AA63EE685; Fri, 25 Sep 2020 07:54:39 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ByPML62Pgz4nPb; Fri, 25 Sep 2020 07:54:38 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B3C27FB65; Fri, 25 Sep 2020 07:54:38 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08P7scke008746; Fri, 25 Sep 2020 07:54:38 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08P7scC4008745; Fri, 25 Sep 2020 07:54:38 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202009250754.08P7scC4008745@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 25 Sep 2020 07:54:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366143 - head/usr.sbin/pwm X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/usr.sbin/pwm X-SVN-Commit-Revision: 366143 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 25 Sep 2020 07:54:39 -0000 Author: avg Date: Fri Sep 25 07:54:38 2020 New Revision: 366143 URL: https://svnweb.freebsd.org/changeset/base/366143 Log: pwm(8): do not exit with failure after successfully reading configuration MFC after: 1 week Modified: head/usr.sbin/pwm/pwm.c Modified: head/usr.sbin/pwm/pwm.c ============================================================================== --- head/usr.sbin/pwm/pwm.c Fri Sep 25 07:41:51 2020 (r366142) +++ head/usr.sbin/pwm/pwm.c Fri Sep 25 07:54:38 2020 (r366143) @@ -176,7 +176,6 @@ main(int argc, char *argv[]) state.period, state.duty, state.enable); - goto fail; } else { if (action & PWM_ENABLE) state.enable = true; From owner-svn-src-head@freebsd.org Fri Sep 25 07:55:09 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8F1B93EE782; Fri, 25 Sep 2020 07:55:09 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ByPMx3H6tz4nVn; Fri, 25 Sep 2020 07:55:09 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 54C45FF22; Fri, 25 Sep 2020 07:55:09 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08P7t9SV008849; Fri, 25 Sep 2020 07:55:09 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08P7t9c0008848; Fri, 25 Sep 2020 07:55:09 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202009250755.08P7t9c0008848@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 25 Sep 2020 07:55:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366144 - head/usr.sbin/pwm X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/usr.sbin/pwm X-SVN-Commit-Revision: 366144 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 25 Sep 2020 07:55:09 -0000 Author: avg Date: Fri Sep 25 07:55:08 2020 New Revision: 366144 URL: https://svnweb.freebsd.org/changeset/base/366144 Log: pwm(8): fix potential duty overflow, use unsigneds for period and duty For a long period value and the duty specified as a percentage, there could be an overflow. Using unsigned integers aligns the code with struct pwm_state and allows to safely use periods up to 4 seconds where supported by drivers. MFC after: 2 weeks Modified: head/usr.sbin/pwm/pwm.c Modified: head/usr.sbin/pwm/pwm.c ============================================================================== --- head/usr.sbin/pwm/pwm.c Fri Sep 25 07:54:38 2020 (r366143) +++ head/usr.sbin/pwm/pwm.c Fri Sep 25 07:55:08 2020 (r366144) @@ -75,7 +75,7 @@ main(int argc, char *argv[]) { struct pwm_state state; int fd; - int period, duty; + u_int period, duty; int action, ch; cap_rights_t right_ioctl; const unsigned long pwm_ioctls[] = {PWMGETSTATE, PWMSETSTATE}; @@ -108,16 +108,16 @@ main(int argc, char *argv[]) if (action & PWM_SHOW_CONFIG) usage(); action |= PWM_PERIOD; - period = strtol(optarg, NULL, 10); + period = strtoul(optarg, NULL, 10); break; case 'd': if (action & PWM_SHOW_CONFIG) usage(); action |= PWM_DUTY; - duty = strtol(optarg, &percent, 10); + duty = strtoul(optarg, &percent, 10); if (*percent == '%') { - if (duty < 0 || duty > 100) { - fprintf(stderr, + if (duty > 100) { + fprintf(stderr, "Invalid duty percentage\n"); usage(); } @@ -185,11 +185,11 @@ main(int argc, char *argv[]) state.period = period; if (action & PWM_DUTY) { if (*percent != '\0') - state.duty = state.period * duty / 100; + state.duty = (uint64_t)state.period * duty / 100; else state.duty = duty; } - + if (ioctl(fd, PWMSETSTATE, &state) == -1) { fprintf(stderr, "Cannot configure the pwm controller\n"); From owner-svn-src-head@freebsd.org Fri Sep 25 09:34:01 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2182D3F0E95; Fri, 25 Sep 2020 09:34:01 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ByRZ105zkz4v1Y; Fri, 25 Sep 2020 09:34:01 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DC49710E59; Fri, 25 Sep 2020 09:34:00 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08P9Y0N4071925; Fri, 25 Sep 2020 09:34:00 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08P9Y0b9071924; Fri, 25 Sep 2020 09:34:00 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202009250934.08P9Y0b9071924@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 25 Sep 2020 09:34:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366145 - head/sys/tools X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/tools X-SVN-Commit-Revision: 366145 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 25 Sep 2020 09:34:01 -0000 Author: trasz Date: Fri Sep 25 09:34:00 2020 New Revision: 366145 URL: https://svnweb.freebsd.org/changeset/base/366145 Log: Make makesyscalls.lua initialize 'struct sysent' entries using c99 designated initializers. This makes it easier to modify 'struct sysent' layout. Reviewed by: kevans Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D26530 Modified: head/sys/tools/makesyscalls.lua Modified: head/sys/tools/makesyscalls.lua ============================================================================== --- head/sys/tools/makesyscalls.lua Fri Sep 25 07:55:08 2020 (r366144) +++ head/sys/tools/makesyscalls.lua Fri Sep 25 09:34:00 2020 (r366145) @@ -740,12 +740,14 @@ local function handle_noncompat(sysnum, thr_flag, flag config['syscallprefix'], funcalias, auditev)) end - write_line("sysent", string.format("\t{ %s, (sy_call_t *)", argssize)) + write_line("sysent", + string.format("\t{ .sy_narg = %s, .sy_call = (sy_call_t *)", argssize)) local column = 8 + 2 + #argssize + 15 if flags & known_flags["NOSTD"] ~= 0 then write_line("sysent", string.format( - "lkmressys, AUE_NULL, NULL, 0, 0, %s, SY_THR_ABSENT },", + "lkmressys, .sy_auevent = AUE_NULL, " .. + ".sy_flags = %s, .sy_thrcnt = SY_THR_ABSENT },", sysflags)) column = column + #"lkmressys" + #"AUE_NULL" + 3 else @@ -754,12 +756,12 @@ local function handle_noncompat(sysnum, thr_flag, flag funcname:find("^linux") or funcname:find("^cloudabi") then write_line("sysent", string.format( - "%s, %s, NULL, 0, 0, %s, %s },", + "%s, .sy_auevent = %s, .sy_flags = %s, .sy_thrcnt = %s },", funcname, auditev, sysflags, thr_flag)) column = column + #funcname + #auditev + #sysflags + 3 else write_line("sysent", string.format( - "sys_%s, %s, NULL, 0, 0, %s, %s },", + "sys_%s, .sy_auevent = %s, .sy_flags = %s, .sy_thrcnt = %s },", funcname, auditev, sysflags, thr_flag)) column = column + #funcname + #auditev + #sysflags + 7 end @@ -781,7 +783,8 @@ end local function handle_obsol(sysnum, funcname, comment) write_line("sysent", - "\t{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT },") + "\t{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, " .. + ".sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT },") align_sysent_comment(34) write_line("sysent", string.format("/* %d = obsolete %s */\n", @@ -849,13 +852,15 @@ local function handle_compat(sysnum, thr_flag, flags, if flags & known_flags['NOSTD'] ~= 0 then write_line("sysent", string.format( - "\t{ %s, (sy_call_t *)%s, %s, NULL, 0, 0, 0, SY_THR_ABSENT },", + "\t{ .sy_narg = %s, .sy_call = (sy_call_t *)%s, " .. + ".sy_auevent = %s, .sy_flags = 0, " .. + ".sy_thrcnt = SY_THR_ABSENT },", "0", "lkmressys", "AUE_NULL")) align_sysent_comment(8 + 2 + #"0" + 15 + #"lkmressys" + #"AUE_NULL" + 3) else write_line("sysent", string.format( - "\t{ %s(%s,%s), %s, NULL, 0, 0, %s, %s },", + "\t{ %s(%s,%s), .sy_auevent = %s, .sy_flags = %s, .sy_thrcnt = %s },", wrap, argssize, funcname, auditev, sysflags, thr_flag)) align_sysent_comment(8 + 9 + #argssize + 1 + #funcname + #auditev + #sysflags + 4) @@ -889,7 +894,9 @@ local function handle_unimpl(sysnum, sysstart, sysend, sysnum = sysstart while sysnum <= sysend do write_line("sysent", string.format( - "\t{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT },\t\t\t/* %d = %s */\n", + "\t{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, " .. + ".sy_auevent = AUE_NULL, .sy_flags = 0, " .. + ".sy_thrcnt = SY_THR_ABSENT },\t\t\t/* %d = %s */\n", sysnum, comment)) write_line("sysnames", string.format( "\t\"#%d\",\t\t\t/* %d = %s */\n", @@ -1302,9 +1309,9 @@ for _, v in pairs(compat_options) do write_line("sysinc", string.format([[ #ifdef %s -#define %s(n, name) n, (sy_call_t *)__CONCAT(%s,name) +#define %s(n, name) .sy_narg = n, .sy_call = (sy_call_t *)__CONCAT(%s,name) #else -#define %s(n, name) 0, (sy_call_t *)nosys +#define %s(n, name) .sy_narg = 0, .sy_call = (sy_call_t *)nosys #endif ]], v["definition"], v["flag"]:lower(), v["prefix"], v["flag"]:lower())) end From owner-svn-src-head@freebsd.org Fri Sep 25 09:56:51 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 73E4B3F1046; Fri, 25 Sep 2020 09:56:51 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ByS4M26fKz4vpL; Fri, 25 Sep 2020 09:56:51 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2C9E81141E; Fri, 25 Sep 2020 09:56:51 +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 08P9up3E084217; Fri, 25 Sep 2020 09:56:51 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08P9uoU0084215; Fri, 25 Sep 2020 09:56:50 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <202009250956.08P9uoU0084215@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Fri, 25 Sep 2020 09:56:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366146 - head/sys/dev/fdt X-SVN-Group: head X-SVN-Commit-Author: mmel X-SVN-Commit-Paths: head/sys/dev/fdt X-SVN-Commit-Revision: 366146 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 25 Sep 2020 09:56:51 -0000 Author: mmel Date: Fri Sep 25 09:56:50 2020 New Revision: 366146 URL: https://svnweb.freebsd.org/changeset/base/366146 Log: Make simplebus friendlier for subclassing. MFC after: 1 week Modified: head/sys/dev/fdt/simplebus.c head/sys/dev/fdt/simplebus.h Modified: head/sys/dev/fdt/simplebus.c ============================================================================== --- head/sys/dev/fdt/simplebus.c Fri Sep 25 09:34:00 2020 (r366145) +++ head/sys/dev/fdt/simplebus.c Fri Sep 25 09:56:50 2020 (r366146) @@ -67,7 +67,7 @@ static device_method_t simplebus_methods[] = { /* Device interface */ DEVMETHOD(device_probe, simplebus_probe), DEVMETHOD(device_attach, simplebus_attach), - DEVMETHOD(device_detach, bus_generic_detach), + DEVMETHOD(device_detach, simplebus_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), DEVMETHOD(device_suspend, bus_generic_suspend), DEVMETHOD(device_resume, bus_generic_resume), @@ -134,7 +134,7 @@ simplebus_probe(device_t dev) } int -simplebus_attach(device_t dev) +simplebus_attach_impl(device_t dev) { struct simplebus_softc *sc; phandle_t node; @@ -154,7 +154,32 @@ simplebus_attach(device_t dev) for (node = OF_child(sc->node); node > 0; node = OF_peer(node)) simplebus_add_device(dev, node, 0, NULL, -1, NULL); + + return (0); +} + +int +simplebus_attach(device_t dev) +{ + int rv; + + rv = simplebus_attach_impl(dev); + if (rv != 0) + return (rv); + return (bus_generic_attach(dev)); +} + +int +simplebus_detach(device_t dev) +{ + struct simplebus_softc *sc; + + sc = device_get_softc(dev); + if (sc->ranges != NULL) + free(sc->ranges, M_DEVBUF); + + return (bus_generic_detach(dev)); } void Modified: head/sys/dev/fdt/simplebus.h ============================================================================== --- head/sys/dev/fdt/simplebus.h Fri Sep 25 09:34:00 2020 (r366145) +++ head/sys/dev/fdt/simplebus.h Fri Sep 25 09:56:50 2020 (r366146) @@ -67,5 +67,7 @@ int simplebus_fill_ranges(phandle_t node, struct simplebus_softc *sc); int simplebus_attach(device_t dev); +int simplebus_attach_impl(device_t dev); +int simplebus_detach(device_t dev); #endif /* _FDT_SIMPLEBUS_H */ From owner-svn-src-head@freebsd.org Fri Sep 25 10:05:40 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3F9A33F1A0B; Fri, 25 Sep 2020 10:05:40 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BySGX0zH6z3RdK; Fri, 25 Sep 2020 10:05:40 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DD35E116A6; Fri, 25 Sep 2020 10:05:39 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08PA5dk7090361; Fri, 25 Sep 2020 10:05:39 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08PA5drf090357; Fri, 25 Sep 2020 10:05:39 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202009251005.08PA5drf090357@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 25 Sep 2020 10:05:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366147 - in head/sys: amd64/linux amd64/linux32 arm/linux arm64/linux compat/cloudabi32 compat/cloudabi64 compat/freebsd32 i386/linux kern sys X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in head/sys: amd64/linux amd64/linux32 arm/linux arm64/linux compat/cloudabi32 compat/cloudabi64 compat/freebsd32 i386/linux kern sys X-SVN-Commit-Revision: 366147 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 25 Sep 2020 10:05:40 -0000 Author: trasz Date: Fri Sep 25 10:05:38 2020 New Revision: 366147 URL: https://svnweb.freebsd.org/changeset/base/366147 Log: Regen after r366145. Sponsored by: DARPA Modified: head/sys/amd64/linux/linux_proto.h head/sys/amd64/linux/linux_sysent.c head/sys/amd64/linux32/linux32_proto.h head/sys/amd64/linux32/linux32_sysent.c head/sys/arm/linux/linux_proto.h head/sys/arm/linux/linux_sysent.c head/sys/arm64/linux/linux_proto.h head/sys/arm64/linux/linux_sysent.c head/sys/compat/cloudabi32/cloudabi32_proto.h head/sys/compat/cloudabi32/cloudabi32_sysent.c head/sys/compat/cloudabi64/cloudabi64_proto.h head/sys/compat/cloudabi64/cloudabi64_sysent.c head/sys/compat/freebsd32/freebsd32_proto.h head/sys/compat/freebsd32/freebsd32_sysent.c head/sys/i386/linux/linux_proto.h head/sys/i386/linux/linux_sysent.c head/sys/kern/init_sysent.c head/sys/sys/sysproto.h Modified: head/sys/amd64/linux/linux_proto.h ============================================================================== --- head/sys/amd64/linux/linux_proto.h Fri Sep 25 09:56:50 2020 (r366146) +++ head/sys/amd64/linux/linux_proto.h Fri Sep 25 10:05:38 2020 (r366147) @@ -1615,35 +1615,41 @@ int linux_io_uring_register(struct thread *, struct li #endif /* COMPAT_43 */ + #ifdef COMPAT_FREEBSD4 #define nosys linux_nosys #endif /* COMPAT_FREEBSD4 */ + #ifdef COMPAT_FREEBSD6 #define nosys linux_nosys #endif /* COMPAT_FREEBSD6 */ + #ifdef COMPAT_FREEBSD7 #define nosys linux_nosys #endif /* COMPAT_FREEBSD7 */ + #ifdef COMPAT_FREEBSD10 #define nosys linux_nosys #endif /* COMPAT_FREEBSD10 */ + #ifdef COMPAT_FREEBSD11 #define nosys linux_nosys #endif /* COMPAT_FREEBSD11 */ + #ifdef COMPAT_FREEBSD12 Modified: head/sys/amd64/linux/linux_sysent.c ============================================================================== --- head/sys/amd64/linux/linux_sysent.c Fri Sep 25 09:56:50 2020 (r366146) +++ head/sys/amd64/linux/linux_sysent.c Fri Sep 25 10:05:38 2020 (r366147) @@ -17,433 +17,433 @@ /* The casts are bogus but will do for now. */ struct sysent linux_sysent[] = { #define nosys linux_nosys - { AS(read_args), (sy_call_t *)sys_read, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 0 = read */ - { AS(write_args), (sy_call_t *)sys_write, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 1 = write */ - { AS(linux_open_args), (sy_call_t *)linux_open, AUE_OPEN_RWTC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 2 = linux_open */ - { AS(close_args), (sy_call_t *)sys_close, AUE_CLOSE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 3 = close */ - { AS(linux_newstat_args), (sy_call_t *)linux_newstat, AUE_STAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 4 = linux_newstat */ - { AS(linux_newfstat_args), (sy_call_t *)linux_newfstat, AUE_FSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 5 = linux_newfstat */ - { AS(linux_newlstat_args), (sy_call_t *)linux_newlstat, AUE_LSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 6 = linux_newlstat */ - { AS(poll_args), (sy_call_t *)sys_poll, AUE_POLL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 7 = poll */ - { AS(linux_lseek_args), (sy_call_t *)linux_lseek, AUE_LSEEK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 8 = linux_lseek */ - { AS(linux_mmap2_args), (sy_call_t *)linux_mmap2, AUE_MMAP, NULL, 0, 0, 0, SY_THR_STATIC }, /* 9 = linux_mmap2 */ - { AS(linux_mprotect_args), (sy_call_t *)linux_mprotect, AUE_MPROTECT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 10 = linux_mprotect */ - { AS(munmap_args), (sy_call_t *)sys_munmap, AUE_MUNMAP, NULL, 0, 0, 0, SY_THR_STATIC }, /* 11 = munmap */ - { AS(linux_brk_args), (sy_call_t *)linux_brk, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 12 = linux_brk */ - { AS(linux_rt_sigaction_args), (sy_call_t *)linux_rt_sigaction, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 13 = linux_rt_sigaction */ - { AS(linux_rt_sigprocmask_args), (sy_call_t *)linux_rt_sigprocmask, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 14 = linux_rt_sigprocmask */ - { AS(linux_rt_sigreturn_args), (sy_call_t *)linux_rt_sigreturn, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 15 = linux_rt_sigreturn */ - { AS(linux_ioctl_args), (sy_call_t *)linux_ioctl, AUE_IOCTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 16 = linux_ioctl */ - { AS(linux_pread_args), (sy_call_t *)linux_pread, AUE_PREAD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 17 = linux_pread */ - { AS(linux_pwrite_args), (sy_call_t *)linux_pwrite, AUE_PWRITE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 18 = linux_pwrite */ - { AS(readv_args), (sy_call_t *)sys_readv, AUE_READV, NULL, 0, 0, 0, SY_THR_STATIC }, /* 19 = readv */ - { AS(writev_args), (sy_call_t *)sys_writev, AUE_WRITEV, NULL, 0, 0, 0, SY_THR_STATIC }, /* 20 = writev */ - { AS(linux_access_args), (sy_call_t *)linux_access, AUE_ACCESS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 21 = linux_access */ - { AS(linux_pipe_args), (sy_call_t *)linux_pipe, AUE_PIPE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 22 = linux_pipe */ - { AS(linux_select_args), (sy_call_t *)linux_select, AUE_SELECT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 23 = linux_select */ - { 0, (sy_call_t *)sys_sched_yield, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 24 = sched_yield */ - { AS(linux_mremap_args), (sy_call_t *)linux_mremap, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 25 = linux_mremap */ - { AS(linux_msync_args), (sy_call_t *)linux_msync, AUE_MSYNC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 26 = linux_msync */ - { AS(linux_mincore_args), (sy_call_t *)linux_mincore, AUE_MINCORE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 27 = linux_mincore */ - { AS(linux_madvise_args), (sy_call_t *)linux_madvise, AUE_MADVISE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 28 = linux_madvise */ - { AS(linux_shmget_args), (sy_call_t *)linux_shmget, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 29 = linux_shmget */ - { AS(linux_shmat_args), (sy_call_t *)linux_shmat, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 30 = linux_shmat */ - { AS(linux_shmctl_args), (sy_call_t *)linux_shmctl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 31 = linux_shmctl */ - { AS(dup_args), (sy_call_t *)sys_dup, AUE_DUP, NULL, 0, 0, 0, SY_THR_STATIC }, /* 32 = dup */ - { AS(dup2_args), (sy_call_t *)sys_dup2, AUE_DUP2, NULL, 0, 0, 0, SY_THR_STATIC }, /* 33 = dup2 */ - { 0, (sy_call_t *)linux_pause, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 34 = linux_pause */ - { AS(linux_nanosleep_args), (sy_call_t *)linux_nanosleep, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 35 = linux_nanosleep */ - { AS(linux_getitimer_args), (sy_call_t *)linux_getitimer, AUE_GETITIMER, NULL, 0, 0, 0, SY_THR_STATIC }, /* 36 = linux_getitimer */ - { AS(linux_alarm_args), (sy_call_t *)linux_alarm, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 37 = linux_alarm */ - { AS(linux_setitimer_args), (sy_call_t *)linux_setitimer, AUE_SETITIMER, NULL, 0, 0, 0, SY_THR_STATIC }, /* 38 = linux_setitimer */ - { 0, (sy_call_t *)linux_getpid, AUE_GETPID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 39 = linux_getpid */ - { AS(linux_sendfile_args), (sy_call_t *)linux_sendfile, AUE_SENDFILE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 40 = linux_sendfile */ - { AS(linux_socket_args), (sy_call_t *)linux_socket, AUE_SOCKET, NULL, 0, 0, 0, SY_THR_STATIC }, /* 41 = linux_socket */ - { AS(linux_connect_args), (sy_call_t *)linux_connect, AUE_CONNECT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 42 = linux_connect */ - { AS(linux_accept_args), (sy_call_t *)linux_accept, AUE_ACCEPT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 43 = linux_accept */ - { AS(linux_sendto_args), (sy_call_t *)linux_sendto, AUE_SENDTO, NULL, 0, 0, 0, SY_THR_STATIC }, /* 44 = linux_sendto */ - { AS(linux_recvfrom_args), (sy_call_t *)linux_recvfrom, AUE_RECVFROM, NULL, 0, 0, 0, SY_THR_STATIC }, /* 45 = linux_recvfrom */ - { AS(linux_sendmsg_args), (sy_call_t *)linux_sendmsg, AUE_SENDMSG, NULL, 0, 0, 0, SY_THR_STATIC }, /* 46 = linux_sendmsg */ - { AS(linux_recvmsg_args), (sy_call_t *)linux_recvmsg, AUE_RECVMSG, NULL, 0, 0, 0, SY_THR_STATIC }, /* 47 = linux_recvmsg */ - { AS(linux_shutdown_args), (sy_call_t *)linux_shutdown, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 48 = linux_shutdown */ - { AS(linux_bind_args), (sy_call_t *)linux_bind, AUE_BIND, NULL, 0, 0, 0, SY_THR_STATIC }, /* 49 = linux_bind */ - { AS(linux_listen_args), (sy_call_t *)linux_listen, AUE_LISTEN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 50 = linux_listen */ - { AS(linux_getsockname_args), (sy_call_t *)linux_getsockname, AUE_GETSOCKNAME, NULL, 0, 0, 0, SY_THR_STATIC }, /* 51 = linux_getsockname */ - { AS(linux_getpeername_args), (sy_call_t *)linux_getpeername, AUE_GETPEERNAME, NULL, 0, 0, 0, SY_THR_STATIC }, /* 52 = linux_getpeername */ - { AS(linux_socketpair_args), (sy_call_t *)linux_socketpair, AUE_SOCKETPAIR, NULL, 0, 0, 0, SY_THR_STATIC }, /* 53 = linux_socketpair */ - { AS(linux_setsockopt_args), (sy_call_t *)linux_setsockopt, AUE_SETSOCKOPT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 54 = linux_setsockopt */ - { AS(linux_getsockopt_args), (sy_call_t *)linux_getsockopt, AUE_GETSOCKOPT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 55 = linux_getsockopt */ - { AS(linux_clone_args), (sy_call_t *)linux_clone, AUE_RFORK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 56 = linux_clone */ - { 0, (sy_call_t *)linux_fork, AUE_FORK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 57 = linux_fork */ - { 0, (sy_call_t *)linux_vfork, AUE_VFORK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 58 = linux_vfork */ - { AS(linux_execve_args), (sy_call_t *)linux_execve, AUE_EXECVE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 59 = linux_execve */ - { AS(linux_exit_args), (sy_call_t *)linux_exit, AUE_EXIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 60 = linux_exit */ - { AS(linux_wait4_args), (sy_call_t *)linux_wait4, AUE_WAIT4, NULL, 0, 0, 0, SY_THR_STATIC }, /* 61 = linux_wait4 */ - { AS(linux_kill_args), (sy_call_t *)linux_kill, AUE_KILL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 62 = linux_kill */ - { AS(linux_newuname_args), (sy_call_t *)linux_newuname, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 63 = linux_newuname */ - { AS(linux_semget_args), (sy_call_t *)linux_semget, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 64 = linux_semget */ - { AS(linux_semop_args), (sy_call_t *)linux_semop, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 65 = linux_semop */ - { AS(linux_semctl_args), (sy_call_t *)linux_semctl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 66 = linux_semctl */ - { AS(linux_shmdt_args), (sy_call_t *)linux_shmdt, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 67 = linux_shmdt */ - { AS(linux_msgget_args), (sy_call_t *)linux_msgget, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 68 = linux_msgget */ - { AS(linux_msgsnd_args), (sy_call_t *)linux_msgsnd, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 69 = linux_msgsnd */ - { AS(linux_msgrcv_args), (sy_call_t *)linux_msgrcv, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 70 = linux_msgrcv */ - { AS(linux_msgctl_args), (sy_call_t *)linux_msgctl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 71 = linux_msgctl */ - { AS(linux_fcntl_args), (sy_call_t *)linux_fcntl, AUE_FCNTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 72 = linux_fcntl */ - { AS(flock_args), (sy_call_t *)sys_flock, AUE_FLOCK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 73 = flock */ - { AS(fsync_args), (sy_call_t *)sys_fsync, AUE_FSYNC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 74 = fsync */ - { AS(linux_fdatasync_args), (sy_call_t *)linux_fdatasync, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 75 = linux_fdatasync */ - { AS(linux_truncate_args), (sy_call_t *)linux_truncate, AUE_TRUNCATE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 76 = linux_truncate */ - { AS(linux_ftruncate_args), (sy_call_t *)linux_ftruncate, AUE_FTRUNCATE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 77 = linux_ftruncate */ - { AS(linux_getdents_args), (sy_call_t *)linux_getdents, AUE_GETDIRENTRIES, NULL, 0, 0, 0, SY_THR_STATIC }, /* 78 = linux_getdents */ - { AS(linux_getcwd_args), (sy_call_t *)linux_getcwd, AUE_GETCWD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 79 = linux_getcwd */ - { AS(linux_chdir_args), (sy_call_t *)linux_chdir, AUE_CHDIR, NULL, 0, 0, 0, SY_THR_STATIC }, /* 80 = linux_chdir */ - { AS(fchdir_args), (sy_call_t *)sys_fchdir, AUE_FCHDIR, NULL, 0, 0, 0, SY_THR_STATIC }, /* 81 = fchdir */ - { AS(linux_rename_args), (sy_call_t *)linux_rename, AUE_RENAME, NULL, 0, 0, 0, SY_THR_STATIC }, /* 82 = linux_rename */ - { AS(linux_mkdir_args), (sy_call_t *)linux_mkdir, AUE_MKDIR, NULL, 0, 0, 0, SY_THR_STATIC }, /* 83 = linux_mkdir */ - { AS(linux_rmdir_args), (sy_call_t *)linux_rmdir, AUE_RMDIR, NULL, 0, 0, 0, SY_THR_STATIC }, /* 84 = linux_rmdir */ - { AS(linux_creat_args), (sy_call_t *)linux_creat, AUE_CREAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 85 = linux_creat */ - { AS(linux_link_args), (sy_call_t *)linux_link, AUE_LINK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 86 = linux_link */ - { AS(linux_unlink_args), (sy_call_t *)linux_unlink, AUE_UNLINK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 87 = linux_unlink */ - { AS(linux_symlink_args), (sy_call_t *)linux_symlink, AUE_SYMLINK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 88 = linux_symlink */ - { AS(linux_readlink_args), (sy_call_t *)linux_readlink, AUE_READLINK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 89 = linux_readlink */ - { AS(linux_chmod_args), (sy_call_t *)linux_chmod, AUE_CHMOD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 90 = linux_chmod */ - { AS(fchmod_args), (sy_call_t *)sys_fchmod, AUE_FCHMOD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 91 = fchmod */ - { AS(linux_chown_args), (sy_call_t *)linux_chown, AUE_LCHOWN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 92 = linux_chown */ - { AS(fchown_args), (sy_call_t *)sys_fchown, AUE_FCHOWN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 93 = fchown */ - { AS(linux_lchown_args), (sy_call_t *)linux_lchown, AUE_LCHOWN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 94 = linux_lchown */ - { AS(umask_args), (sy_call_t *)sys_umask, AUE_UMASK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 95 = umask */ - { AS(gettimeofday_args), (sy_call_t *)sys_gettimeofday, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 96 = gettimeofday */ - { AS(linux_getrlimit_args), (sy_call_t *)linux_getrlimit, AUE_GETRLIMIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 97 = linux_getrlimit */ - { AS(getrusage_args), (sy_call_t *)sys_getrusage, AUE_GETRUSAGE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 98 = getrusage */ - { AS(linux_sysinfo_args), (sy_call_t *)linux_sysinfo, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 99 = linux_sysinfo */ - { AS(linux_times_args), (sy_call_t *)linux_times, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 100 = linux_times */ - { AS(linux_ptrace_args), (sy_call_t *)linux_ptrace, AUE_PTRACE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 101 = linux_ptrace */ - { 0, (sy_call_t *)linux_getuid, AUE_GETUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 102 = linux_getuid */ - { AS(linux_syslog_args), (sy_call_t *)linux_syslog, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 103 = linux_syslog */ - { 0, (sy_call_t *)linux_getgid, AUE_GETGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 104 = linux_getgid */ - { AS(setuid_args), (sy_call_t *)sys_setuid, AUE_SETUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 105 = setuid */ - { AS(setgid_args), (sy_call_t *)sys_setgid, AUE_SETGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 106 = setgid */ - { 0, (sy_call_t *)sys_geteuid, AUE_GETEUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 107 = geteuid */ - { 0, (sy_call_t *)sys_getegid, AUE_GETEGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 108 = getegid */ - { AS(setpgid_args), (sy_call_t *)sys_setpgid, AUE_SETPGRP, NULL, 0, 0, 0, SY_THR_STATIC }, /* 109 = setpgid */ - { 0, (sy_call_t *)linux_getppid, AUE_GETPPID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 110 = linux_getppid */ - { 0, (sy_call_t *)sys_getpgrp, AUE_GETPGRP, NULL, 0, 0, 0, SY_THR_STATIC }, /* 111 = getpgrp */ - { 0, (sy_call_t *)sys_setsid, AUE_SETSID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 112 = setsid */ - { AS(setreuid_args), (sy_call_t *)sys_setreuid, AUE_SETREUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 113 = setreuid */ - { AS(setregid_args), (sy_call_t *)sys_setregid, AUE_SETREGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 114 = setregid */ - { AS(linux_getgroups_args), (sy_call_t *)linux_getgroups, AUE_GETGROUPS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 115 = linux_getgroups */ - { AS(linux_setgroups_args), (sy_call_t *)linux_setgroups, AUE_SETGROUPS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 116 = linux_setgroups */ - { AS(setresuid_args), (sy_call_t *)sys_setresuid, AUE_SETRESUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 117 = setresuid */ - { AS(getresuid_args), (sy_call_t *)sys_getresuid, AUE_GETRESUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 118 = getresuid */ - { AS(setresgid_args), (sy_call_t *)sys_setresgid, AUE_SETRESGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 119 = setresgid */ - { AS(getresgid_args), (sy_call_t *)sys_getresgid, AUE_GETRESGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 120 = getresgid */ - { AS(getpgid_args), (sy_call_t *)sys_getpgid, AUE_GETPGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 121 = getpgid */ - { AS(linux_setfsuid_args), (sy_call_t *)linux_setfsuid, AUE_SETFSUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 122 = linux_setfsuid */ - { AS(linux_setfsgid_args), (sy_call_t *)linux_setfsgid, AUE_SETFSGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 123 = linux_setfsgid */ - { AS(linux_getsid_args), (sy_call_t *)linux_getsid, AUE_GETSID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 124 = linux_getsid */ - { AS(linux_capget_args), (sy_call_t *)linux_capget, AUE_CAPGET, NULL, 0, 0, 0, SY_THR_STATIC }, /* 125 = linux_capget */ - { AS(linux_capset_args), (sy_call_t *)linux_capset, AUE_CAPSET, NULL, 0, 0, 0, SY_THR_STATIC }, /* 126 = linux_capset */ - { AS(linux_rt_sigpending_args), (sy_call_t *)linux_rt_sigpending, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 127 = linux_rt_sigpending */ - { AS(linux_rt_sigtimedwait_args), (sy_call_t *)linux_rt_sigtimedwait, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 128 = linux_rt_sigtimedwait */ - { AS(linux_rt_sigqueueinfo_args), (sy_call_t *)linux_rt_sigqueueinfo, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 129 = linux_rt_sigqueueinfo */ - { AS(linux_rt_sigsuspend_args), (sy_call_t *)linux_rt_sigsuspend, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 130 = linux_rt_sigsuspend */ - { AS(linux_sigaltstack_args), (sy_call_t *)linux_sigaltstack, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 131 = linux_sigaltstack */ - { AS(linux_utime_args), (sy_call_t *)linux_utime, AUE_UTIME, NULL, 0, 0, 0, SY_THR_STATIC }, /* 132 = linux_utime */ - { AS(linux_mknod_args), (sy_call_t *)linux_mknod, AUE_MKNOD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 133 = linux_mknod */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 134 = uselib */ - { AS(linux_personality_args), (sy_call_t *)linux_personality, AUE_PERSONALITY, NULL, 0, 0, 0, SY_THR_STATIC }, /* 135 = linux_personality */ - { AS(linux_ustat_args), (sy_call_t *)linux_ustat, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 136 = linux_ustat */ - { AS(linux_statfs_args), (sy_call_t *)linux_statfs, AUE_STATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 137 = linux_statfs */ - { AS(linux_fstatfs_args), (sy_call_t *)linux_fstatfs, AUE_FSTATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 138 = linux_fstatfs */ - { AS(linux_sysfs_args), (sy_call_t *)linux_sysfs, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 139 = linux_sysfs */ - { AS(linux_getpriority_args), (sy_call_t *)linux_getpriority, AUE_GETPRIORITY, NULL, 0, 0, 0, SY_THR_STATIC }, /* 140 = linux_getpriority */ - { AS(setpriority_args), (sy_call_t *)sys_setpriority, AUE_SETPRIORITY, NULL, 0, 0, 0, SY_THR_STATIC }, /* 141 = setpriority */ - { AS(linux_sched_setparam_args), (sy_call_t *)linux_sched_setparam, AUE_SCHED_SETPARAM, NULL, 0, 0, 0, SY_THR_STATIC }, /* 142 = linux_sched_setparam */ - { AS(linux_sched_getparam_args), (sy_call_t *)linux_sched_getparam, AUE_SCHED_GETPARAM, NULL, 0, 0, 0, SY_THR_STATIC }, /* 143 = linux_sched_getparam */ - { AS(linux_sched_setscheduler_args), (sy_call_t *)linux_sched_setscheduler, AUE_SCHED_SETSCHEDULER, NULL, 0, 0, 0, SY_THR_STATIC }, /* 144 = linux_sched_setscheduler */ - { AS(linux_sched_getscheduler_args), (sy_call_t *)linux_sched_getscheduler, AUE_SCHED_GETSCHEDULER, NULL, 0, 0, 0, SY_THR_STATIC }, /* 145 = linux_sched_getscheduler */ - { AS(linux_sched_get_priority_max_args), (sy_call_t *)linux_sched_get_priority_max, AUE_SCHED_GET_PRIORITY_MAX, NULL, 0, 0, 0, SY_THR_STATIC }, /* 146 = linux_sched_get_priority_max */ - { AS(linux_sched_get_priority_min_args), (sy_call_t *)linux_sched_get_priority_min, AUE_SCHED_GET_PRIORITY_MIN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 147 = linux_sched_get_priority_min */ - { AS(linux_sched_rr_get_interval_args), (sy_call_t *)linux_sched_rr_get_interval, AUE_SCHED_RR_GET_INTERVAL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 148 = linux_sched_rr_get_interval */ - { AS(mlock_args), (sy_call_t *)sys_mlock, AUE_MLOCK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 149 = mlock */ - { AS(munlock_args), (sy_call_t *)sys_munlock, AUE_MUNLOCK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 150 = munlock */ - { AS(mlockall_args), (sy_call_t *)sys_mlockall, AUE_MLOCKALL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 151 = mlockall */ - { 0, (sy_call_t *)sys_munlockall, AUE_MUNLOCKALL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 152 = munlockall */ - { 0, (sy_call_t *)linux_vhangup, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 153 = linux_vhangup */ - { 0, (sy_call_t *)linux_modify_ldt, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 154 = linux_modify_ldt */ - { 0, (sy_call_t *)linux_pivot_root, AUE_PIVOT_ROOT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 155 = linux_pivot_root */ - { AS(linux_sysctl_args), (sy_call_t *)linux_sysctl, AUE_SYSCTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 156 = linux_sysctl */ - { AS(linux_prctl_args), (sy_call_t *)linux_prctl, AUE_PRCTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 157 = linux_prctl */ - { AS(linux_arch_prctl_args), (sy_call_t *)linux_arch_prctl, AUE_PRCTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 158 = linux_arch_prctl */ - { 0, (sy_call_t *)linux_adjtimex, AUE_ADJTIME, NULL, 0, 0, 0, SY_THR_STATIC }, /* 159 = linux_adjtimex */ - { AS(linux_setrlimit_args), (sy_call_t *)linux_setrlimit, AUE_SETRLIMIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 160 = linux_setrlimit */ - { AS(chroot_args), (sy_call_t *)sys_chroot, AUE_CHROOT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 161 = chroot */ - { 0, (sy_call_t *)sys_sync, AUE_SYNC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 162 = sync */ - { AS(acct_args), (sy_call_t *)sys_acct, AUE_ACCT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 163 = acct */ - { AS(settimeofday_args), (sy_call_t *)sys_settimeofday, AUE_SETTIMEOFDAY, NULL, 0, 0, 0, SY_THR_STATIC }, /* 164 = settimeofday */ - { AS(linux_mount_args), (sy_call_t *)linux_mount, AUE_MOUNT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 165 = linux_mount */ - { AS(linux_umount_args), (sy_call_t *)linux_umount, AUE_UMOUNT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 166 = linux_umount */ - { AS(swapon_args), (sy_call_t *)sys_swapon, AUE_SWAPON, NULL, 0, 0, 0, SY_THR_STATIC }, /* 167 = swapon */ - { 0, (sy_call_t *)linux_swapoff, AUE_SWAPOFF, NULL, 0, 0, 0, SY_THR_STATIC }, /* 168 = linux_swapoff */ - { AS(linux_reboot_args), (sy_call_t *)linux_reboot, AUE_REBOOT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 169 = linux_reboot */ - { AS(linux_sethostname_args), (sy_call_t *)linux_sethostname, AUE_SYSCTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 170 = linux_sethostname */ - { AS(linux_setdomainname_args), (sy_call_t *)linux_setdomainname, AUE_SYSCTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 171 = linux_setdomainname */ - { AS(linux_iopl_args), (sy_call_t *)linux_iopl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 172 = linux_iopl */ - { 0, (sy_call_t *)linux_ioperm, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 173 = linux_ioperm */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 174 = create_module */ - { 0, (sy_call_t *)linux_init_module, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 175 = linux_init_module */ - { 0, (sy_call_t *)linux_delete_module, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 176 = linux_delete_module */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 177 = get_kernel_syms */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 178 = query_module */ - { 0, (sy_call_t *)linux_quotactl, AUE_QUOTACTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 179 = linux_quotactl */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 180 = nfsservctl */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 181 = getpmsg */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 182 = putpmsg */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 183 = afs_syscall */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 184 = tuxcall */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 185 = security */ - { 0, (sy_call_t *)linux_gettid, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 186 = linux_gettid */ - { 0, (sy_call_t *)linux_readahead, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 187 = linux_readahead */ - { AS(linux_setxattr_args), (sy_call_t *)linux_setxattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 188 = linux_setxattr */ - { AS(linux_lsetxattr_args), (sy_call_t *)linux_lsetxattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 189 = linux_lsetxattr */ - { AS(linux_fsetxattr_args), (sy_call_t *)linux_fsetxattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 190 = linux_fsetxattr */ - { AS(linux_getxattr_args), (sy_call_t *)linux_getxattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 191 = linux_getxattr */ - { AS(linux_lgetxattr_args), (sy_call_t *)linux_lgetxattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 192 = linux_lgetxattr */ - { AS(linux_fgetxattr_args), (sy_call_t *)linux_fgetxattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 193 = linux_fgetxattr */ - { AS(linux_listxattr_args), (sy_call_t *)linux_listxattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 194 = linux_listxattr */ - { AS(linux_llistxattr_args), (sy_call_t *)linux_llistxattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 195 = linux_llistxattr */ - { AS(linux_flistxattr_args), (sy_call_t *)linux_flistxattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 196 = linux_flistxattr */ - { AS(linux_removexattr_args), (sy_call_t *)linux_removexattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 197 = linux_removexattr */ - { AS(linux_lremovexattr_args), (sy_call_t *)linux_lremovexattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 198 = linux_lremovexattr */ - { AS(linux_fremovexattr_args), (sy_call_t *)linux_fremovexattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 199 = linux_fremovexattr */ - { AS(linux_tkill_args), (sy_call_t *)linux_tkill, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 200 = linux_tkill */ - { AS(linux_time_args), (sy_call_t *)linux_time, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 201 = linux_time */ - { AS(linux_sys_futex_args), (sy_call_t *)linux_sys_futex, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 202 = linux_sys_futex */ - { AS(linux_sched_setaffinity_args), (sy_call_t *)linux_sched_setaffinity, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 203 = linux_sched_setaffinity */ - { AS(linux_sched_getaffinity_args), (sy_call_t *)linux_sched_getaffinity, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 204 = linux_sched_getaffinity */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 205 = set_thread_area */ - { 0, (sy_call_t *)linux_io_setup, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 206 = linux_io_setup */ - { 0, (sy_call_t *)linux_io_destroy, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 207 = linux_io_destroy */ - { 0, (sy_call_t *)linux_io_getevents, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 208 = linux_io_getevents */ - { 0, (sy_call_t *)linux_io_submit, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 209 = linux_io_submit */ - { 0, (sy_call_t *)linux_io_cancel, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 210 = linux_io_cancel */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 211 = get_thread_area */ - { 0, (sy_call_t *)linux_lookup_dcookie, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 212 = linux_lookup_dcookie */ - { AS(linux_epoll_create_args), (sy_call_t *)linux_epoll_create, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 213 = linux_epoll_create */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 214 = epoll_ctl_old */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 215 = epoll_wait_old */ - { 0, (sy_call_t *)linux_remap_file_pages, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 216 = linux_remap_file_pages */ - { AS(linux_getdents64_args), (sy_call_t *)linux_getdents64, AUE_GETDIRENTRIES, NULL, 0, 0, 0, SY_THR_STATIC }, /* 217 = linux_getdents64 */ - { AS(linux_set_tid_address_args), (sy_call_t *)linux_set_tid_address, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 218 = linux_set_tid_address */ - { 0, (sy_call_t *)linux_restart_syscall, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 219 = linux_restart_syscall */ - { 0, (sy_call_t *)linux_semtimedop, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 220 = linux_semtimedop */ - { AS(linux_fadvise64_args), (sy_call_t *)linux_fadvise64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 221 = linux_fadvise64 */ - { AS(linux_timer_create_args), (sy_call_t *)linux_timer_create, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 222 = linux_timer_create */ - { AS(linux_timer_settime_args), (sy_call_t *)linux_timer_settime, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 223 = linux_timer_settime */ - { AS(linux_timer_gettime_args), (sy_call_t *)linux_timer_gettime, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 224 = linux_timer_gettime */ - { AS(linux_timer_getoverrun_args), (sy_call_t *)linux_timer_getoverrun, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 225 = linux_timer_getoverrun */ - { AS(linux_timer_delete_args), (sy_call_t *)linux_timer_delete, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 226 = linux_timer_delete */ - { AS(linux_clock_settime_args), (sy_call_t *)linux_clock_settime, AUE_CLOCK_SETTIME, NULL, 0, 0, 0, SY_THR_STATIC }, /* 227 = linux_clock_settime */ - { AS(linux_clock_gettime_args), (sy_call_t *)linux_clock_gettime, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 228 = linux_clock_gettime */ - { AS(linux_clock_getres_args), (sy_call_t *)linux_clock_getres, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 229 = linux_clock_getres */ - { AS(linux_clock_nanosleep_args), (sy_call_t *)linux_clock_nanosleep, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 230 = linux_clock_nanosleep */ - { AS(linux_exit_group_args), (sy_call_t *)linux_exit_group, AUE_EXIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 231 = linux_exit_group */ - { AS(linux_epoll_wait_args), (sy_call_t *)linux_epoll_wait, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 232 = linux_epoll_wait */ - { AS(linux_epoll_ctl_args), (sy_call_t *)linux_epoll_ctl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 233 = linux_epoll_ctl */ - { AS(linux_tgkill_args), (sy_call_t *)linux_tgkill, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 234 = linux_tgkill */ - { AS(linux_utimes_args), (sy_call_t *)linux_utimes, AUE_UTIMES, NULL, 0, 0, 0, SY_THR_STATIC }, /* 235 = linux_utimes */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 236 = vserver */ - { 0, (sy_call_t *)linux_mbind, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 237 = linux_mbind */ - { 0, (sy_call_t *)linux_set_mempolicy, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 238 = linux_set_mempolicy */ - { 0, (sy_call_t *)linux_get_mempolicy, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 239 = linux_get_mempolicy */ - { AS(linux_mq_open_args), (sy_call_t *)linux_mq_open, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 240 = linux_mq_open */ - { AS(linux_mq_unlink_args), (sy_call_t *)linux_mq_unlink, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 241 = linux_mq_unlink */ - { AS(linux_mq_timedsend_args), (sy_call_t *)linux_mq_timedsend, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 242 = linux_mq_timedsend */ - { AS(linux_mq_timedreceive_args), (sy_call_t *)linux_mq_timedreceive, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 243 = linux_mq_timedreceive */ - { AS(linux_mq_notify_args), (sy_call_t *)linux_mq_notify, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 244 = linux_mq_notify */ - { AS(linux_mq_getsetattr_args), (sy_call_t *)linux_mq_getsetattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 245 = linux_mq_getsetattr */ - { 0, (sy_call_t *)linux_kexec_load, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 246 = linux_kexec_load */ - { AS(linux_waitid_args), (sy_call_t *)linux_waitid, AUE_WAIT6, NULL, 0, 0, 0, SY_THR_STATIC }, /* 247 = linux_waitid */ - { 0, (sy_call_t *)linux_add_key, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 248 = linux_add_key */ - { 0, (sy_call_t *)linux_request_key, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 249 = linux_request_key */ - { 0, (sy_call_t *)linux_keyctl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 250 = linux_keyctl */ - { 0, (sy_call_t *)linux_ioprio_set, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 251 = linux_ioprio_set */ - { 0, (sy_call_t *)linux_ioprio_get, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 252 = linux_ioprio_get */ - { 0, (sy_call_t *)linux_inotify_init, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 253 = linux_inotify_init */ - { 0, (sy_call_t *)linux_inotify_add_watch, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 254 = linux_inotify_add_watch */ - { 0, (sy_call_t *)linux_inotify_rm_watch, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 255 = linux_inotify_rm_watch */ - { 0, (sy_call_t *)linux_migrate_pages, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 256 = linux_migrate_pages */ - { AS(linux_openat_args), (sy_call_t *)linux_openat, AUE_OPEN_RWTC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 257 = linux_openat */ - { AS(linux_mkdirat_args), (sy_call_t *)linux_mkdirat, AUE_MKDIRAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 258 = linux_mkdirat */ - { AS(linux_mknodat_args), (sy_call_t *)linux_mknodat, AUE_MKNODAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 259 = linux_mknodat */ - { AS(linux_fchownat_args), (sy_call_t *)linux_fchownat, AUE_FCHOWNAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 260 = linux_fchownat */ - { AS(linux_futimesat_args), (sy_call_t *)linux_futimesat, AUE_FUTIMESAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 261 = linux_futimesat */ - { AS(linux_newfstatat_args), (sy_call_t *)linux_newfstatat, AUE_FSTATAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 262 = linux_newfstatat */ - { AS(linux_unlinkat_args), (sy_call_t *)linux_unlinkat, AUE_UNLINKAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 263 = linux_unlinkat */ - { AS(linux_renameat_args), (sy_call_t *)linux_renameat, AUE_RENAMEAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 264 = linux_renameat */ - { AS(linux_linkat_args), (sy_call_t *)linux_linkat, AUE_LINKAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 265 = linux_linkat */ - { AS(linux_symlinkat_args), (sy_call_t *)linux_symlinkat, AUE_SYMLINKAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 266 = linux_symlinkat */ - { AS(linux_readlinkat_args), (sy_call_t *)linux_readlinkat, AUE_READLINKAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 267 = linux_readlinkat */ - { AS(linux_fchmodat_args), (sy_call_t *)linux_fchmodat, AUE_FCHMODAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 268 = linux_fchmodat */ - { AS(linux_faccessat_args), (sy_call_t *)linux_faccessat, AUE_FACCESSAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 269 = linux_faccessat */ - { AS(linux_pselect6_args), (sy_call_t *)linux_pselect6, AUE_SELECT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 270 = linux_pselect6 */ - { AS(linux_ppoll_args), (sy_call_t *)linux_ppoll, AUE_POLL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 271 = linux_ppoll */ - { 0, (sy_call_t *)linux_unshare, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 272 = linux_unshare */ - { AS(linux_set_robust_list_args), (sy_call_t *)linux_set_robust_list, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 273 = linux_set_robust_list */ - { AS(linux_get_robust_list_args), (sy_call_t *)linux_get_robust_list, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 274 = linux_get_robust_list */ - { AS(linux_splice_args), (sy_call_t *)linux_splice, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 275 = linux_splice */ - { 0, (sy_call_t *)linux_tee, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 276 = linux_tee */ - { AS(linux_sync_file_range_args), (sy_call_t *)linux_sync_file_range, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 277 = linux_sync_file_range */ - { 0, (sy_call_t *)linux_vmsplice, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 278 = linux_vmsplice */ - { 0, (sy_call_t *)linux_move_pages, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 279 = linux_move_pages */ - { AS(linux_utimensat_args), (sy_call_t *)linux_utimensat, AUE_FUTIMESAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 280 = linux_utimensat */ - { AS(linux_epoll_pwait_args), (sy_call_t *)linux_epoll_pwait, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 281 = linux_epoll_pwait */ - { 0, (sy_call_t *)linux_signalfd, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 282 = linux_signalfd */ - { AS(linux_timerfd_create_args), (sy_call_t *)linux_timerfd_create, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 283 = linux_timerfd_create */ - { AS(linux_eventfd_args), (sy_call_t *)linux_eventfd, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 284 = linux_eventfd */ - { AS(linux_fallocate_args), (sy_call_t *)linux_fallocate, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 285 = linux_fallocate */ - { AS(linux_timerfd_settime_args), (sy_call_t *)linux_timerfd_settime, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 286 = linux_timerfd_settime */ - { AS(linux_timerfd_gettime_args), (sy_call_t *)linux_timerfd_gettime, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 287 = linux_timerfd_gettime */ - { AS(linux_accept4_args), (sy_call_t *)linux_accept4, AUE_ACCEPT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 288 = linux_accept4 */ - { 0, (sy_call_t *)linux_signalfd4, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 289 = linux_signalfd4 */ - { AS(linux_eventfd2_args), (sy_call_t *)linux_eventfd2, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 290 = linux_eventfd2 */ - { AS(linux_epoll_create1_args), (sy_call_t *)linux_epoll_create1, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 291 = linux_epoll_create1 */ - { AS(linux_dup3_args), (sy_call_t *)linux_dup3, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 292 = linux_dup3 */ - { AS(linux_pipe2_args), (sy_call_t *)linux_pipe2, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 293 = linux_pipe2 */ - { AS(linux_inotify_init1_args), (sy_call_t *)linux_inotify_init1, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 294 = linux_inotify_init1 */ - { AS(linux_preadv_args), (sy_call_t *)linux_preadv, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 295 = linux_preadv */ - { AS(linux_pwritev_args), (sy_call_t *)linux_pwritev, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 296 = linux_pwritev */ - { AS(linux_rt_tgsigqueueinfo_args), (sy_call_t *)linux_rt_tgsigqueueinfo, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 297 = linux_rt_tgsigqueueinfo */ - { 0, (sy_call_t *)linux_perf_event_open, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 298 = linux_perf_event_open */ - { AS(linux_recvmmsg_args), (sy_call_t *)linux_recvmmsg, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 299 = linux_recvmmsg */ - { 0, (sy_call_t *)linux_fanotify_init, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 300 = linux_fanotify_init */ - { 0, (sy_call_t *)linux_fanotify_mark, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 301 = linux_fanotify_mark */ - { AS(linux_prlimit64_args), (sy_call_t *)linux_prlimit64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 302 = linux_prlimit64 */ - { 0, (sy_call_t *)linux_name_to_handle_at, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 303 = linux_name_to_handle_at */ - { 0, (sy_call_t *)linux_open_by_handle_at, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 304 = linux_open_by_handle_at */ - { 0, (sy_call_t *)linux_clock_adjtime, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 305 = linux_clock_adjtime */ - { AS(linux_syncfs_args), (sy_call_t *)linux_syncfs, AUE_SYNC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 306 = linux_syncfs */ - { AS(linux_sendmmsg_args), (sy_call_t *)linux_sendmmsg, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 307 = linux_sendmmsg */ - { AS(linux_setns_args), (sy_call_t *)linux_setns, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 308 = linux_setns */ - { AS(linux_getcpu_args), (sy_call_t *)linux_getcpu, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 309 = linux_getcpu */ - { AS(linux_process_vm_readv_args), (sy_call_t *)linux_process_vm_readv, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 310 = linux_process_vm_readv */ - { AS(linux_process_vm_writev_args), (sy_call_t *)linux_process_vm_writev, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 311 = linux_process_vm_writev */ - { AS(linux_kcmp_args), (sy_call_t *)linux_kcmp, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 312 = linux_kcmp */ - { AS(linux_finit_module_args), (sy_call_t *)linux_finit_module, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 313 = linux_finit_module */ - { AS(linux_sched_setattr_args), (sy_call_t *)linux_sched_setattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 314 = linux_sched_setattr */ - { AS(linux_sched_getattr_args), (sy_call_t *)linux_sched_getattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 315 = linux_sched_getattr */ - { AS(linux_renameat2_args), (sy_call_t *)linux_renameat2, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 316 = linux_renameat2 */ - { AS(linux_seccomp_args), (sy_call_t *)linux_seccomp, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 317 = linux_seccomp */ - { AS(linux_getrandom_args), (sy_call_t *)linux_getrandom, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 318 = linux_getrandom */ - { AS(linux_memfd_create_args), (sy_call_t *)linux_memfd_create, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 319 = linux_memfd_create */ - { AS(linux_kexec_file_load_args), (sy_call_t *)linux_kexec_file_load, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 320 = linux_kexec_file_load */ - { AS(linux_bpf_args), (sy_call_t *)linux_bpf, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 321 = linux_bpf */ - { AS(linux_execveat_args), (sy_call_t *)linux_execveat, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 322 = linux_execveat */ - { AS(linux_userfaultfd_args), (sy_call_t *)linux_userfaultfd, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 323 = linux_userfaultfd */ - { AS(linux_membarrier_args), (sy_call_t *)linux_membarrier, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 324 = linux_membarrier */ - { AS(linux_mlock2_args), (sy_call_t *)linux_mlock2, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 325 = linux_mlock2 */ - { AS(linux_copy_file_range_args), (sy_call_t *)linux_copy_file_range, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 326 = linux_copy_file_range */ - { AS(linux_preadv2_args), (sy_call_t *)linux_preadv2, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 327 = linux_preadv2 */ - { AS(linux_pwritev2_args), (sy_call_t *)linux_pwritev2, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 328 = linux_pwritev2 */ - { AS(linux_pkey_mprotect_args), (sy_call_t *)linux_pkey_mprotect, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 329 = linux_pkey_mprotect */ - { AS(linux_pkey_alloc_args), (sy_call_t *)linux_pkey_alloc, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 330 = linux_pkey_alloc */ - { AS(linux_pkey_free_args), (sy_call_t *)linux_pkey_free, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 331 = linux_pkey_free */ - { AS(linux_statx_args), (sy_call_t *)linux_statx, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 332 = linux_statx */ - { 0, (sy_call_t *)linux_io_pgetevents, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 333 = linux_io_pgetevents */ - { 0, (sy_call_t *)linux_rseq, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 334 = linux_rseq */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 335 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 336 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 337 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 338 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 339 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 340 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 341 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 342 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 343 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 344 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 345 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 346 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 347 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 348 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 349 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 350 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 351 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 352 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 353 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 354 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 355 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 356 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 357 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 358 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 359 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 360 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 361 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 362 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 363 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 364 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 365 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 366 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 367 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 368 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 369 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 370 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 371 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 372 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 373 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 374 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 375 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 376 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 377 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 378 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 379 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 380 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 381 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 382 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 383 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 384 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 385 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 386 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 387 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 388 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 389 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 390 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 391 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 392 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 393 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 394 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 395 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 396 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 397 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 398 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 399 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 400 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 401 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 402 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 403 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 404 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 405 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 406 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 407 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 408 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 409 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 410 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 411 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 412 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 413 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 414 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 415 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 416 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 417 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 418 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 419 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 420 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 421 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 422 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 423 = nosys */ - { AS(linux_pidfd_send_signal_args), (sy_call_t *)linux_pidfd_send_signal, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 424 = linux_pidfd_send_signal */ - { 0, (sy_call_t *)linux_io_uring_setup, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 425 = linux_io_uring_setup */ - { 0, (sy_call_t *)linux_io_uring_enter, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 426 = linux_io_uring_enter */ - { 0, (sy_call_t *)linux_io_uring_register, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 427 = linux_io_uring_register */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 428 = nosys */ + { .sy_narg = AS(read_args), .sy_call = (sy_call_t *)sys_read, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 0 = read */ + { .sy_narg = AS(write_args), .sy_call = (sy_call_t *)sys_write, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 1 = write */ + { .sy_narg = AS(linux_open_args), .sy_call = (sy_call_t *)linux_open, .sy_auevent = AUE_OPEN_RWTC, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 2 = linux_open */ + { .sy_narg = AS(close_args), .sy_call = (sy_call_t *)sys_close, .sy_auevent = AUE_CLOSE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 3 = close */ + { .sy_narg = AS(linux_newstat_args), .sy_call = (sy_call_t *)linux_newstat, .sy_auevent = AUE_STAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 4 = linux_newstat */ + { .sy_narg = AS(linux_newfstat_args), .sy_call = (sy_call_t *)linux_newfstat, .sy_auevent = AUE_FSTAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 5 = linux_newfstat */ + { .sy_narg = AS(linux_newlstat_args), .sy_call = (sy_call_t *)linux_newlstat, .sy_auevent = AUE_LSTAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 6 = linux_newlstat */ + { .sy_narg = AS(poll_args), .sy_call = (sy_call_t *)sys_poll, .sy_auevent = AUE_POLL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 7 = poll */ + { .sy_narg = AS(linux_lseek_args), .sy_call = (sy_call_t *)linux_lseek, .sy_auevent = AUE_LSEEK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 8 = linux_lseek */ + { .sy_narg = AS(linux_mmap2_args), .sy_call = (sy_call_t *)linux_mmap2, .sy_auevent = AUE_MMAP, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 9 = linux_mmap2 */ + { .sy_narg = AS(linux_mprotect_args), .sy_call = (sy_call_t *)linux_mprotect, .sy_auevent = AUE_MPROTECT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 10 = linux_mprotect */ + { .sy_narg = AS(munmap_args), .sy_call = (sy_call_t *)sys_munmap, .sy_auevent = AUE_MUNMAP, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 11 = munmap */ + { .sy_narg = AS(linux_brk_args), .sy_call = (sy_call_t *)linux_brk, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 12 = linux_brk */ + { .sy_narg = AS(linux_rt_sigaction_args), .sy_call = (sy_call_t *)linux_rt_sigaction, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 13 = linux_rt_sigaction */ + { .sy_narg = AS(linux_rt_sigprocmask_args), .sy_call = (sy_call_t *)linux_rt_sigprocmask, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 14 = linux_rt_sigprocmask */ + { .sy_narg = AS(linux_rt_sigreturn_args), .sy_call = (sy_call_t *)linux_rt_sigreturn, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 15 = linux_rt_sigreturn */ + { .sy_narg = AS(linux_ioctl_args), .sy_call = (sy_call_t *)linux_ioctl, .sy_auevent = AUE_IOCTL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 16 = linux_ioctl */ + { .sy_narg = AS(linux_pread_args), .sy_call = (sy_call_t *)linux_pread, .sy_auevent = AUE_PREAD, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 17 = linux_pread */ + { .sy_narg = AS(linux_pwrite_args), .sy_call = (sy_call_t *)linux_pwrite, .sy_auevent = AUE_PWRITE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 18 = linux_pwrite */ + { .sy_narg = AS(readv_args), .sy_call = (sy_call_t *)sys_readv, .sy_auevent = AUE_READV, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 19 = readv */ + { .sy_narg = AS(writev_args), .sy_call = (sy_call_t *)sys_writev, .sy_auevent = AUE_WRITEV, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 20 = writev */ + { .sy_narg = AS(linux_access_args), .sy_call = (sy_call_t *)linux_access, .sy_auevent = AUE_ACCESS, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 21 = linux_access */ + { .sy_narg = AS(linux_pipe_args), .sy_call = (sy_call_t *)linux_pipe, .sy_auevent = AUE_PIPE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 22 = linux_pipe */ + { .sy_narg = AS(linux_select_args), .sy_call = (sy_call_t *)linux_select, .sy_auevent = AUE_SELECT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 23 = linux_select */ + { .sy_narg = 0, .sy_call = (sy_call_t *)sys_sched_yield, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 24 = sched_yield */ + { .sy_narg = AS(linux_mremap_args), .sy_call = (sy_call_t *)linux_mremap, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 25 = linux_mremap */ + { .sy_narg = AS(linux_msync_args), .sy_call = (sy_call_t *)linux_msync, .sy_auevent = AUE_MSYNC, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 26 = linux_msync */ + { .sy_narg = AS(linux_mincore_args), .sy_call = (sy_call_t *)linux_mincore, .sy_auevent = AUE_MINCORE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 27 = linux_mincore */ + { .sy_narg = AS(linux_madvise_args), .sy_call = (sy_call_t *)linux_madvise, .sy_auevent = AUE_MADVISE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 28 = linux_madvise */ + { .sy_narg = AS(linux_shmget_args), .sy_call = (sy_call_t *)linux_shmget, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 29 = linux_shmget */ + { .sy_narg = AS(linux_shmat_args), .sy_call = (sy_call_t *)linux_shmat, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 30 = linux_shmat */ + { .sy_narg = AS(linux_shmctl_args), .sy_call = (sy_call_t *)linux_shmctl, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 31 = linux_shmctl */ + { .sy_narg = AS(dup_args), .sy_call = (sy_call_t *)sys_dup, .sy_auevent = AUE_DUP, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 32 = dup */ + { .sy_narg = AS(dup2_args), .sy_call = (sy_call_t *)sys_dup2, .sy_auevent = AUE_DUP2, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 33 = dup2 */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_pause, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 34 = linux_pause */ + { .sy_narg = AS(linux_nanosleep_args), .sy_call = (sy_call_t *)linux_nanosleep, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 35 = linux_nanosleep */ + { .sy_narg = AS(linux_getitimer_args), .sy_call = (sy_call_t *)linux_getitimer, .sy_auevent = AUE_GETITIMER, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 36 = linux_getitimer */ + { .sy_narg = AS(linux_alarm_args), .sy_call = (sy_call_t *)linux_alarm, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 37 = linux_alarm */ + { .sy_narg = AS(linux_setitimer_args), .sy_call = (sy_call_t *)linux_setitimer, .sy_auevent = AUE_SETITIMER, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 38 = linux_setitimer */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_getpid, .sy_auevent = AUE_GETPID, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 39 = linux_getpid */ + { .sy_narg = AS(linux_sendfile_args), .sy_call = (sy_call_t *)linux_sendfile, .sy_auevent = AUE_SENDFILE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 40 = linux_sendfile */ + { .sy_narg = AS(linux_socket_args), .sy_call = (sy_call_t *)linux_socket, .sy_auevent = AUE_SOCKET, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 41 = linux_socket */ + { .sy_narg = AS(linux_connect_args), .sy_call = (sy_call_t *)linux_connect, .sy_auevent = AUE_CONNECT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 42 = linux_connect */ + { .sy_narg = AS(linux_accept_args), .sy_call = (sy_call_t *)linux_accept, .sy_auevent = AUE_ACCEPT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 43 = linux_accept */ + { .sy_narg = AS(linux_sendto_args), .sy_call = (sy_call_t *)linux_sendto, .sy_auevent = AUE_SENDTO, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 44 = linux_sendto */ + { .sy_narg = AS(linux_recvfrom_args), .sy_call = (sy_call_t *)linux_recvfrom, .sy_auevent = AUE_RECVFROM, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 45 = linux_recvfrom */ + { .sy_narg = AS(linux_sendmsg_args), .sy_call = (sy_call_t *)linux_sendmsg, .sy_auevent = AUE_SENDMSG, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 46 = linux_sendmsg */ + { .sy_narg = AS(linux_recvmsg_args), .sy_call = (sy_call_t *)linux_recvmsg, .sy_auevent = AUE_RECVMSG, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 47 = linux_recvmsg */ + { .sy_narg = AS(linux_shutdown_args), .sy_call = (sy_call_t *)linux_shutdown, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 48 = linux_shutdown */ + { .sy_narg = AS(linux_bind_args), .sy_call = (sy_call_t *)linux_bind, .sy_auevent = AUE_BIND, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 49 = linux_bind */ + { .sy_narg = AS(linux_listen_args), .sy_call = (sy_call_t *)linux_listen, .sy_auevent = AUE_LISTEN, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 50 = linux_listen */ + { .sy_narg = AS(linux_getsockname_args), .sy_call = (sy_call_t *)linux_getsockname, .sy_auevent = AUE_GETSOCKNAME, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 51 = linux_getsockname */ + { .sy_narg = AS(linux_getpeername_args), .sy_call = (sy_call_t *)linux_getpeername, .sy_auevent = AUE_GETPEERNAME, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 52 = linux_getpeername */ + { .sy_narg = AS(linux_socketpair_args), .sy_call = (sy_call_t *)linux_socketpair, .sy_auevent = AUE_SOCKETPAIR, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 53 = linux_socketpair */ + { .sy_narg = AS(linux_setsockopt_args), .sy_call = (sy_call_t *)linux_setsockopt, .sy_auevent = AUE_SETSOCKOPT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 54 = linux_setsockopt */ + { .sy_narg = AS(linux_getsockopt_args), .sy_call = (sy_call_t *)linux_getsockopt, .sy_auevent = AUE_GETSOCKOPT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 55 = linux_getsockopt */ + { .sy_narg = AS(linux_clone_args), .sy_call = (sy_call_t *)linux_clone, .sy_auevent = AUE_RFORK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 56 = linux_clone */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_fork, .sy_auevent = AUE_FORK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 57 = linux_fork */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_vfork, .sy_auevent = AUE_VFORK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 58 = linux_vfork */ + { .sy_narg = AS(linux_execve_args), .sy_call = (sy_call_t *)linux_execve, .sy_auevent = AUE_EXECVE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 59 = linux_execve */ + { .sy_narg = AS(linux_exit_args), .sy_call = (sy_call_t *)linux_exit, .sy_auevent = AUE_EXIT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 60 = linux_exit */ + { .sy_narg = AS(linux_wait4_args), .sy_call = (sy_call_t *)linux_wait4, .sy_auevent = AUE_WAIT4, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 61 = linux_wait4 */ + { .sy_narg = AS(linux_kill_args), .sy_call = (sy_call_t *)linux_kill, .sy_auevent = AUE_KILL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 62 = linux_kill */ + { .sy_narg = AS(linux_newuname_args), .sy_call = (sy_call_t *)linux_newuname, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 63 = linux_newuname */ + { .sy_narg = AS(linux_semget_args), .sy_call = (sy_call_t *)linux_semget, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 64 = linux_semget */ + { .sy_narg = AS(linux_semop_args), .sy_call = (sy_call_t *)linux_semop, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 65 = linux_semop */ + { .sy_narg = AS(linux_semctl_args), .sy_call = (sy_call_t *)linux_semctl, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 66 = linux_semctl */ + { .sy_narg = AS(linux_shmdt_args), .sy_call = (sy_call_t *)linux_shmdt, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 67 = linux_shmdt */ + { .sy_narg = AS(linux_msgget_args), .sy_call = (sy_call_t *)linux_msgget, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 68 = linux_msgget */ + { .sy_narg = AS(linux_msgsnd_args), .sy_call = (sy_call_t *)linux_msgsnd, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 69 = linux_msgsnd */ + { .sy_narg = AS(linux_msgrcv_args), .sy_call = (sy_call_t *)linux_msgrcv, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 70 = linux_msgrcv */ + { .sy_narg = AS(linux_msgctl_args), .sy_call = (sy_call_t *)linux_msgctl, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 71 = linux_msgctl */ + { .sy_narg = AS(linux_fcntl_args), .sy_call = (sy_call_t *)linux_fcntl, .sy_auevent = AUE_FCNTL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 72 = linux_fcntl */ + { .sy_narg = AS(flock_args), .sy_call = (sy_call_t *)sys_flock, .sy_auevent = AUE_FLOCK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 73 = flock */ + { .sy_narg = AS(fsync_args), .sy_call = (sy_call_t *)sys_fsync, .sy_auevent = AUE_FSYNC, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 74 = fsync */ + { .sy_narg = AS(linux_fdatasync_args), .sy_call = (sy_call_t *)linux_fdatasync, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 75 = linux_fdatasync */ + { .sy_narg = AS(linux_truncate_args), .sy_call = (sy_call_t *)linux_truncate, .sy_auevent = AUE_TRUNCATE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 76 = linux_truncate */ + { .sy_narg = AS(linux_ftruncate_args), .sy_call = (sy_call_t *)linux_ftruncate, .sy_auevent = AUE_FTRUNCATE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 77 = linux_ftruncate */ + { .sy_narg = AS(linux_getdents_args), .sy_call = (sy_call_t *)linux_getdents, .sy_auevent = AUE_GETDIRENTRIES, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 78 = linux_getdents */ + { .sy_narg = AS(linux_getcwd_args), .sy_call = (sy_call_t *)linux_getcwd, .sy_auevent = AUE_GETCWD, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 79 = linux_getcwd */ + { .sy_narg = AS(linux_chdir_args), .sy_call = (sy_call_t *)linux_chdir, .sy_auevent = AUE_CHDIR, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 80 = linux_chdir */ + { .sy_narg = AS(fchdir_args), .sy_call = (sy_call_t *)sys_fchdir, .sy_auevent = AUE_FCHDIR, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 81 = fchdir */ + { .sy_narg = AS(linux_rename_args), .sy_call = (sy_call_t *)linux_rename, .sy_auevent = AUE_RENAME, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 82 = linux_rename */ + { .sy_narg = AS(linux_mkdir_args), .sy_call = (sy_call_t *)linux_mkdir, .sy_auevent = AUE_MKDIR, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 83 = linux_mkdir */ + { .sy_narg = AS(linux_rmdir_args), .sy_call = (sy_call_t *)linux_rmdir, .sy_auevent = AUE_RMDIR, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 84 = linux_rmdir */ + { .sy_narg = AS(linux_creat_args), .sy_call = (sy_call_t *)linux_creat, .sy_auevent = AUE_CREAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 85 = linux_creat */ + { .sy_narg = AS(linux_link_args), .sy_call = (sy_call_t *)linux_link, .sy_auevent = AUE_LINK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 86 = linux_link */ + { .sy_narg = AS(linux_unlink_args), .sy_call = (sy_call_t *)linux_unlink, .sy_auevent = AUE_UNLINK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 87 = linux_unlink */ + { .sy_narg = AS(linux_symlink_args), .sy_call = (sy_call_t *)linux_symlink, .sy_auevent = AUE_SYMLINK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 88 = linux_symlink */ + { .sy_narg = AS(linux_readlink_args), .sy_call = (sy_call_t *)linux_readlink, .sy_auevent = AUE_READLINK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 89 = linux_readlink */ + { .sy_narg = AS(linux_chmod_args), .sy_call = (sy_call_t *)linux_chmod, .sy_auevent = AUE_CHMOD, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 90 = linux_chmod */ + { .sy_narg = AS(fchmod_args), .sy_call = (sy_call_t *)sys_fchmod, .sy_auevent = AUE_FCHMOD, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 91 = fchmod */ + { .sy_narg = AS(linux_chown_args), .sy_call = (sy_call_t *)linux_chown, .sy_auevent = AUE_LCHOWN, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 92 = linux_chown */ + { .sy_narg = AS(fchown_args), .sy_call = (sy_call_t *)sys_fchown, .sy_auevent = AUE_FCHOWN, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 93 = fchown */ + { .sy_narg = AS(linux_lchown_args), .sy_call = (sy_call_t *)linux_lchown, .sy_auevent = AUE_LCHOWN, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 94 = linux_lchown */ + { .sy_narg = AS(umask_args), .sy_call = (sy_call_t *)sys_umask, .sy_auevent = AUE_UMASK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 95 = umask */ + { .sy_narg = AS(gettimeofday_args), .sy_call = (sy_call_t *)sys_gettimeofday, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 96 = gettimeofday */ + { .sy_narg = AS(linux_getrlimit_args), .sy_call = (sy_call_t *)linux_getrlimit, .sy_auevent = AUE_GETRLIMIT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 97 = linux_getrlimit */ + { .sy_narg = AS(getrusage_args), .sy_call = (sy_call_t *)sys_getrusage, .sy_auevent = AUE_GETRUSAGE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 98 = getrusage */ + { .sy_narg = AS(linux_sysinfo_args), .sy_call = (sy_call_t *)linux_sysinfo, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 99 = linux_sysinfo */ + { .sy_narg = AS(linux_times_args), .sy_call = (sy_call_t *)linux_times, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 100 = linux_times */ + { .sy_narg = AS(linux_ptrace_args), .sy_call = (sy_call_t *)linux_ptrace, .sy_auevent = AUE_PTRACE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 101 = linux_ptrace */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_getuid, .sy_auevent = AUE_GETUID, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 102 = linux_getuid */ + { .sy_narg = AS(linux_syslog_args), .sy_call = (sy_call_t *)linux_syslog, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 103 = linux_syslog */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_getgid, .sy_auevent = AUE_GETGID, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 104 = linux_getgid */ + { .sy_narg = AS(setuid_args), .sy_call = (sy_call_t *)sys_setuid, .sy_auevent = AUE_SETUID, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 105 = setuid */ + { .sy_narg = AS(setgid_args), .sy_call = (sy_call_t *)sys_setgid, .sy_auevent = AUE_SETGID, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 106 = setgid */ + { .sy_narg = 0, .sy_call = (sy_call_t *)sys_geteuid, .sy_auevent = AUE_GETEUID, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 107 = geteuid */ + { .sy_narg = 0, .sy_call = (sy_call_t *)sys_getegid, .sy_auevent = AUE_GETEGID, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 108 = getegid */ + { .sy_narg = AS(setpgid_args), .sy_call = (sy_call_t *)sys_setpgid, .sy_auevent = AUE_SETPGRP, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 109 = setpgid */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_getppid, .sy_auevent = AUE_GETPPID, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 110 = linux_getppid */ + { .sy_narg = 0, .sy_call = (sy_call_t *)sys_getpgrp, .sy_auevent = AUE_GETPGRP, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 111 = getpgrp */ + { .sy_narg = 0, .sy_call = (sy_call_t *)sys_setsid, .sy_auevent = AUE_SETSID, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 112 = setsid */ + { .sy_narg = AS(setreuid_args), .sy_call = (sy_call_t *)sys_setreuid, .sy_auevent = AUE_SETREUID, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 113 = setreuid */ + { .sy_narg = AS(setregid_args), .sy_call = (sy_call_t *)sys_setregid, .sy_auevent = AUE_SETREGID, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 114 = setregid */ + { .sy_narg = AS(linux_getgroups_args), .sy_call = (sy_call_t *)linux_getgroups, .sy_auevent = AUE_GETGROUPS, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 115 = linux_getgroups */ + { .sy_narg = AS(linux_setgroups_args), .sy_call = (sy_call_t *)linux_setgroups, .sy_auevent = AUE_SETGROUPS, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 116 = linux_setgroups */ + { .sy_narg = AS(setresuid_args), .sy_call = (sy_call_t *)sys_setresuid, .sy_auevent = AUE_SETRESUID, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 117 = setresuid */ + { .sy_narg = AS(getresuid_args), .sy_call = (sy_call_t *)sys_getresuid, .sy_auevent = AUE_GETRESUID, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 118 = getresuid */ + { .sy_narg = AS(setresgid_args), .sy_call = (sy_call_t *)sys_setresgid, .sy_auevent = AUE_SETRESGID, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 119 = setresgid */ + { .sy_narg = AS(getresgid_args), .sy_call = (sy_call_t *)sys_getresgid, .sy_auevent = AUE_GETRESGID, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 120 = getresgid */ + { .sy_narg = AS(getpgid_args), .sy_call = (sy_call_t *)sys_getpgid, .sy_auevent = AUE_GETPGID, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 121 = getpgid */ + { .sy_narg = AS(linux_setfsuid_args), .sy_call = (sy_call_t *)linux_setfsuid, .sy_auevent = AUE_SETFSUID, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 122 = linux_setfsuid */ + { .sy_narg = AS(linux_setfsgid_args), .sy_call = (sy_call_t *)linux_setfsgid, .sy_auevent = AUE_SETFSGID, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 123 = linux_setfsgid */ + { .sy_narg = AS(linux_getsid_args), .sy_call = (sy_call_t *)linux_getsid, .sy_auevent = AUE_GETSID, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 124 = linux_getsid */ + { .sy_narg = AS(linux_capget_args), .sy_call = (sy_call_t *)linux_capget, .sy_auevent = AUE_CAPGET, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 125 = linux_capget */ + { .sy_narg = AS(linux_capset_args), .sy_call = (sy_call_t *)linux_capset, .sy_auevent = AUE_CAPSET, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 126 = linux_capset */ + { .sy_narg = AS(linux_rt_sigpending_args), .sy_call = (sy_call_t *)linux_rt_sigpending, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 127 = linux_rt_sigpending */ + { .sy_narg = AS(linux_rt_sigtimedwait_args), .sy_call = (sy_call_t *)linux_rt_sigtimedwait, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 128 = linux_rt_sigtimedwait */ + { .sy_narg = AS(linux_rt_sigqueueinfo_args), .sy_call = (sy_call_t *)linux_rt_sigqueueinfo, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 129 = linux_rt_sigqueueinfo */ + { .sy_narg = AS(linux_rt_sigsuspend_args), .sy_call = (sy_call_t *)linux_rt_sigsuspend, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 130 = linux_rt_sigsuspend */ + { .sy_narg = AS(linux_sigaltstack_args), .sy_call = (sy_call_t *)linux_sigaltstack, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 131 = linux_sigaltstack */ + { .sy_narg = AS(linux_utime_args), .sy_call = (sy_call_t *)linux_utime, .sy_auevent = AUE_UTIME, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 132 = linux_utime */ + { .sy_narg = AS(linux_mknod_args), .sy_call = (sy_call_t *)linux_mknod, .sy_auevent = AUE_MKNOD, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 133 = linux_mknod */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 134 = uselib */ + { .sy_narg = AS(linux_personality_args), .sy_call = (sy_call_t *)linux_personality, .sy_auevent = AUE_PERSONALITY, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 135 = linux_personality */ + { .sy_narg = AS(linux_ustat_args), .sy_call = (sy_call_t *)linux_ustat, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 136 = linux_ustat */ + { .sy_narg = AS(linux_statfs_args), .sy_call = (sy_call_t *)linux_statfs, .sy_auevent = AUE_STATFS, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 137 = linux_statfs */ + { .sy_narg = AS(linux_fstatfs_args), .sy_call = (sy_call_t *)linux_fstatfs, .sy_auevent = AUE_FSTATFS, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 138 = linux_fstatfs */ + { .sy_narg = AS(linux_sysfs_args), .sy_call = (sy_call_t *)linux_sysfs, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 139 = linux_sysfs */ + { .sy_narg = AS(linux_getpriority_args), .sy_call = (sy_call_t *)linux_getpriority, .sy_auevent = AUE_GETPRIORITY, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 140 = linux_getpriority */ + { .sy_narg = AS(setpriority_args), .sy_call = (sy_call_t *)sys_setpriority, .sy_auevent = AUE_SETPRIORITY, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 141 = setpriority */ + { .sy_narg = AS(linux_sched_setparam_args), .sy_call = (sy_call_t *)linux_sched_setparam, .sy_auevent = AUE_SCHED_SETPARAM, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 142 = linux_sched_setparam */ + { .sy_narg = AS(linux_sched_getparam_args), .sy_call = (sy_call_t *)linux_sched_getparam, .sy_auevent = AUE_SCHED_GETPARAM, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 143 = linux_sched_getparam */ + { .sy_narg = AS(linux_sched_setscheduler_args), .sy_call = (sy_call_t *)linux_sched_setscheduler, .sy_auevent = AUE_SCHED_SETSCHEDULER, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 144 = linux_sched_setscheduler */ + { .sy_narg = AS(linux_sched_getscheduler_args), .sy_call = (sy_call_t *)linux_sched_getscheduler, .sy_auevent = AUE_SCHED_GETSCHEDULER, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 145 = linux_sched_getscheduler */ + { .sy_narg = AS(linux_sched_get_priority_max_args), .sy_call = (sy_call_t *)linux_sched_get_priority_max, .sy_auevent = AUE_SCHED_GET_PRIORITY_MAX, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 146 = linux_sched_get_priority_max */ + { .sy_narg = AS(linux_sched_get_priority_min_args), .sy_call = (sy_call_t *)linux_sched_get_priority_min, .sy_auevent = AUE_SCHED_GET_PRIORITY_MIN, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 147 = linux_sched_get_priority_min */ + { .sy_narg = AS(linux_sched_rr_get_interval_args), .sy_call = (sy_call_t *)linux_sched_rr_get_interval, .sy_auevent = AUE_SCHED_RR_GET_INTERVAL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 148 = linux_sched_rr_get_interval */ + { .sy_narg = AS(mlock_args), .sy_call = (sy_call_t *)sys_mlock, .sy_auevent = AUE_MLOCK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 149 = mlock */ + { .sy_narg = AS(munlock_args), .sy_call = (sy_call_t *)sys_munlock, .sy_auevent = AUE_MUNLOCK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 150 = munlock */ + { .sy_narg = AS(mlockall_args), .sy_call = (sy_call_t *)sys_mlockall, .sy_auevent = AUE_MLOCKALL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 151 = mlockall */ + { .sy_narg = 0, .sy_call = (sy_call_t *)sys_munlockall, .sy_auevent = AUE_MUNLOCKALL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 152 = munlockall */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_vhangup, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 153 = linux_vhangup */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_modify_ldt, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 154 = linux_modify_ldt */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_pivot_root, .sy_auevent = AUE_PIVOT_ROOT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 155 = linux_pivot_root */ + { .sy_narg = AS(linux_sysctl_args), .sy_call = (sy_call_t *)linux_sysctl, .sy_auevent = AUE_SYSCTL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 156 = linux_sysctl */ + { .sy_narg = AS(linux_prctl_args), .sy_call = (sy_call_t *)linux_prctl, .sy_auevent = AUE_PRCTL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 157 = linux_prctl */ + { .sy_narg = AS(linux_arch_prctl_args), .sy_call = (sy_call_t *)linux_arch_prctl, .sy_auevent = AUE_PRCTL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 158 = linux_arch_prctl */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_adjtimex, .sy_auevent = AUE_ADJTIME, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 159 = linux_adjtimex */ + { .sy_narg = AS(linux_setrlimit_args), .sy_call = (sy_call_t *)linux_setrlimit, .sy_auevent = AUE_SETRLIMIT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 160 = linux_setrlimit */ + { .sy_narg = AS(chroot_args), .sy_call = (sy_call_t *)sys_chroot, .sy_auevent = AUE_CHROOT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 161 = chroot */ + { .sy_narg = 0, .sy_call = (sy_call_t *)sys_sync, .sy_auevent = AUE_SYNC, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 162 = sync */ + { .sy_narg = AS(acct_args), .sy_call = (sy_call_t *)sys_acct, .sy_auevent = AUE_ACCT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 163 = acct */ + { .sy_narg = AS(settimeofday_args), .sy_call = (sy_call_t *)sys_settimeofday, .sy_auevent = AUE_SETTIMEOFDAY, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 164 = settimeofday */ + { .sy_narg = AS(linux_mount_args), .sy_call = (sy_call_t *)linux_mount, .sy_auevent = AUE_MOUNT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 165 = linux_mount */ + { .sy_narg = AS(linux_umount_args), .sy_call = (sy_call_t *)linux_umount, .sy_auevent = AUE_UMOUNT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 166 = linux_umount */ + { .sy_narg = AS(swapon_args), .sy_call = (sy_call_t *)sys_swapon, .sy_auevent = AUE_SWAPON, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 167 = swapon */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_swapoff, .sy_auevent = AUE_SWAPOFF, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 168 = linux_swapoff */ + { .sy_narg = AS(linux_reboot_args), .sy_call = (sy_call_t *)linux_reboot, .sy_auevent = AUE_REBOOT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 169 = linux_reboot */ + { .sy_narg = AS(linux_sethostname_args), .sy_call = (sy_call_t *)linux_sethostname, .sy_auevent = AUE_SYSCTL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 170 = linux_sethostname */ + { .sy_narg = AS(linux_setdomainname_args), .sy_call = (sy_call_t *)linux_setdomainname, .sy_auevent = AUE_SYSCTL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 171 = linux_setdomainname */ + { .sy_narg = AS(linux_iopl_args), .sy_call = (sy_call_t *)linux_iopl, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 172 = linux_iopl */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_ioperm, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 173 = linux_ioperm */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 174 = create_module */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_init_module, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 175 = linux_init_module */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_delete_module, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 176 = linux_delete_module */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 177 = get_kernel_syms */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 178 = query_module */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_quotactl, .sy_auevent = AUE_QUOTACTL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 179 = linux_quotactl */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 180 = nfsservctl */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 181 = getpmsg */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 182 = putpmsg */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 183 = afs_syscall */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 184 = tuxcall */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 185 = security */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_gettid, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 186 = linux_gettid */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_readahead, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 187 = linux_readahead */ + { .sy_narg = AS(linux_setxattr_args), .sy_call = (sy_call_t *)linux_setxattr, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 188 = linux_setxattr */ + { .sy_narg = AS(linux_lsetxattr_args), .sy_call = (sy_call_t *)linux_lsetxattr, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 189 = linux_lsetxattr */ + { .sy_narg = AS(linux_fsetxattr_args), .sy_call = (sy_call_t *)linux_fsetxattr, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 190 = linux_fsetxattr */ + { .sy_narg = AS(linux_getxattr_args), .sy_call = (sy_call_t *)linux_getxattr, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 191 = linux_getxattr */ + { .sy_narg = AS(linux_lgetxattr_args), .sy_call = (sy_call_t *)linux_lgetxattr, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 192 = linux_lgetxattr */ + { .sy_narg = AS(linux_fgetxattr_args), .sy_call = (sy_call_t *)linux_fgetxattr, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 193 = linux_fgetxattr */ + { .sy_narg = AS(linux_listxattr_args), .sy_call = (sy_call_t *)linux_listxattr, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 194 = linux_listxattr */ + { .sy_narg = AS(linux_llistxattr_args), .sy_call = (sy_call_t *)linux_llistxattr, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 195 = linux_llistxattr */ + { .sy_narg = AS(linux_flistxattr_args), .sy_call = (sy_call_t *)linux_flistxattr, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 196 = linux_flistxattr */ + { .sy_narg = AS(linux_removexattr_args), .sy_call = (sy_call_t *)linux_removexattr, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 197 = linux_removexattr */ + { .sy_narg = AS(linux_lremovexattr_args), .sy_call = (sy_call_t *)linux_lremovexattr, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 198 = linux_lremovexattr */ + { .sy_narg = AS(linux_fremovexattr_args), .sy_call = (sy_call_t *)linux_fremovexattr, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 199 = linux_fremovexattr */ + { .sy_narg = AS(linux_tkill_args), .sy_call = (sy_call_t *)linux_tkill, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 200 = linux_tkill */ + { .sy_narg = AS(linux_time_args), .sy_call = (sy_call_t *)linux_time, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 201 = linux_time */ + { .sy_narg = AS(linux_sys_futex_args), .sy_call = (sy_call_t *)linux_sys_futex, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 202 = linux_sys_futex */ + { .sy_narg = AS(linux_sched_setaffinity_args), .sy_call = (sy_call_t *)linux_sched_setaffinity, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 203 = linux_sched_setaffinity */ + { .sy_narg = AS(linux_sched_getaffinity_args), .sy_call = (sy_call_t *)linux_sched_getaffinity, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 204 = linux_sched_getaffinity */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 205 = set_thread_area */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_io_setup, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 206 = linux_io_setup */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_io_destroy, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 207 = linux_io_destroy */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_io_getevents, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 208 = linux_io_getevents */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_io_submit, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 209 = linux_io_submit */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_io_cancel, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 210 = linux_io_cancel */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 211 = get_thread_area */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_lookup_dcookie, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 212 = linux_lookup_dcookie */ + { .sy_narg = AS(linux_epoll_create_args), .sy_call = (sy_call_t *)linux_epoll_create, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 213 = linux_epoll_create */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 214 = epoll_ctl_old */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 215 = epoll_wait_old */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_remap_file_pages, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 216 = linux_remap_file_pages */ + { .sy_narg = AS(linux_getdents64_args), .sy_call = (sy_call_t *)linux_getdents64, .sy_auevent = AUE_GETDIRENTRIES, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 217 = linux_getdents64 */ + { .sy_narg = AS(linux_set_tid_address_args), .sy_call = (sy_call_t *)linux_set_tid_address, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 218 = linux_set_tid_address */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_restart_syscall, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 219 = linux_restart_syscall */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_semtimedop, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 220 = linux_semtimedop */ + { .sy_narg = AS(linux_fadvise64_args), .sy_call = (sy_call_t *)linux_fadvise64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 221 = linux_fadvise64 */ + { .sy_narg = AS(linux_timer_create_args), .sy_call = (sy_call_t *)linux_timer_create, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 222 = linux_timer_create */ + { .sy_narg = AS(linux_timer_settime_args), .sy_call = (sy_call_t *)linux_timer_settime, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 223 = linux_timer_settime */ + { .sy_narg = AS(linux_timer_gettime_args), .sy_call = (sy_call_t *)linux_timer_gettime, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 224 = linux_timer_gettime */ + { .sy_narg = AS(linux_timer_getoverrun_args), .sy_call = (sy_call_t *)linux_timer_getoverrun, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 225 = linux_timer_getoverrun */ + { .sy_narg = AS(linux_timer_delete_args), .sy_call = (sy_call_t *)linux_timer_delete, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 226 = linux_timer_delete */ + { .sy_narg = AS(linux_clock_settime_args), .sy_call = (sy_call_t *)linux_clock_settime, .sy_auevent = AUE_CLOCK_SETTIME, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 227 = linux_clock_settime */ + { .sy_narg = AS(linux_clock_gettime_args), .sy_call = (sy_call_t *)linux_clock_gettime, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 228 = linux_clock_gettime */ + { .sy_narg = AS(linux_clock_getres_args), .sy_call = (sy_call_t *)linux_clock_getres, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 229 = linux_clock_getres */ + { .sy_narg = AS(linux_clock_nanosleep_args), .sy_call = (sy_call_t *)linux_clock_nanosleep, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 230 = linux_clock_nanosleep */ + { .sy_narg = AS(linux_exit_group_args), .sy_call = (sy_call_t *)linux_exit_group, .sy_auevent = AUE_EXIT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 231 = linux_exit_group */ + { .sy_narg = AS(linux_epoll_wait_args), .sy_call = (sy_call_t *)linux_epoll_wait, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 232 = linux_epoll_wait */ + { .sy_narg = AS(linux_epoll_ctl_args), .sy_call = (sy_call_t *)linux_epoll_ctl, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 233 = linux_epoll_ctl */ + { .sy_narg = AS(linux_tgkill_args), .sy_call = (sy_call_t *)linux_tgkill, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 234 = linux_tgkill */ + { .sy_narg = AS(linux_utimes_args), .sy_call = (sy_call_t *)linux_utimes, .sy_auevent = AUE_UTIMES, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 235 = linux_utimes */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 236 = vserver */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_mbind, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 237 = linux_mbind */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_set_mempolicy, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 238 = linux_set_mempolicy */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_get_mempolicy, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 239 = linux_get_mempolicy */ + { .sy_narg = AS(linux_mq_open_args), .sy_call = (sy_call_t *)linux_mq_open, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 240 = linux_mq_open */ + { .sy_narg = AS(linux_mq_unlink_args), .sy_call = (sy_call_t *)linux_mq_unlink, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 241 = linux_mq_unlink */ + { .sy_narg = AS(linux_mq_timedsend_args), .sy_call = (sy_call_t *)linux_mq_timedsend, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 242 = linux_mq_timedsend */ + { .sy_narg = AS(linux_mq_timedreceive_args), .sy_call = (sy_call_t *)linux_mq_timedreceive, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 243 = linux_mq_timedreceive */ + { .sy_narg = AS(linux_mq_notify_args), .sy_call = (sy_call_t *)linux_mq_notify, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 244 = linux_mq_notify */ + { .sy_narg = AS(linux_mq_getsetattr_args), .sy_call = (sy_call_t *)linux_mq_getsetattr, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 245 = linux_mq_getsetattr */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_kexec_load, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 246 = linux_kexec_load */ + { .sy_narg = AS(linux_waitid_args), .sy_call = (sy_call_t *)linux_waitid, .sy_auevent = AUE_WAIT6, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 247 = linux_waitid */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_add_key, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 248 = linux_add_key */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_request_key, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 249 = linux_request_key */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_keyctl, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 250 = linux_keyctl */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_ioprio_set, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 251 = linux_ioprio_set */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_ioprio_get, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 252 = linux_ioprio_get */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_inotify_init, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 253 = linux_inotify_init */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_inotify_add_watch, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 254 = linux_inotify_add_watch */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_inotify_rm_watch, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 255 = linux_inotify_rm_watch */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_migrate_pages, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 256 = linux_migrate_pages */ + { .sy_narg = AS(linux_openat_args), .sy_call = (sy_call_t *)linux_openat, .sy_auevent = AUE_OPEN_RWTC, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 257 = linux_openat */ + { .sy_narg = AS(linux_mkdirat_args), .sy_call = (sy_call_t *)linux_mkdirat, .sy_auevent = AUE_MKDIRAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 258 = linux_mkdirat */ + { .sy_narg = AS(linux_mknodat_args), .sy_call = (sy_call_t *)linux_mknodat, .sy_auevent = AUE_MKNODAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 259 = linux_mknodat */ + { .sy_narg = AS(linux_fchownat_args), .sy_call = (sy_call_t *)linux_fchownat, .sy_auevent = AUE_FCHOWNAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 260 = linux_fchownat */ + { .sy_narg = AS(linux_futimesat_args), .sy_call = (sy_call_t *)linux_futimesat, .sy_auevent = AUE_FUTIMESAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 261 = linux_futimesat */ + { .sy_narg = AS(linux_newfstatat_args), .sy_call = (sy_call_t *)linux_newfstatat, .sy_auevent = AUE_FSTATAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 262 = linux_newfstatat */ + { .sy_narg = AS(linux_unlinkat_args), .sy_call = (sy_call_t *)linux_unlinkat, .sy_auevent = AUE_UNLINKAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 263 = linux_unlinkat */ + { .sy_narg = AS(linux_renameat_args), .sy_call = (sy_call_t *)linux_renameat, .sy_auevent = AUE_RENAMEAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 264 = linux_renameat */ + { .sy_narg = AS(linux_linkat_args), .sy_call = (sy_call_t *)linux_linkat, .sy_auevent = AUE_LINKAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 265 = linux_linkat */ + { .sy_narg = AS(linux_symlinkat_args), .sy_call = (sy_call_t *)linux_symlinkat, .sy_auevent = AUE_SYMLINKAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 266 = linux_symlinkat */ + { .sy_narg = AS(linux_readlinkat_args), .sy_call = (sy_call_t *)linux_readlinkat, .sy_auevent = AUE_READLINKAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 267 = linux_readlinkat */ + { .sy_narg = AS(linux_fchmodat_args), .sy_call = (sy_call_t *)linux_fchmodat, .sy_auevent = AUE_FCHMODAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 268 = linux_fchmodat */ + { .sy_narg = AS(linux_faccessat_args), .sy_call = (sy_call_t *)linux_faccessat, .sy_auevent = AUE_FACCESSAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 269 = linux_faccessat */ + { .sy_narg = AS(linux_pselect6_args), .sy_call = (sy_call_t *)linux_pselect6, .sy_auevent = AUE_SELECT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 270 = linux_pselect6 */ + { .sy_narg = AS(linux_ppoll_args), .sy_call = (sy_call_t *)linux_ppoll, .sy_auevent = AUE_POLL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 271 = linux_ppoll */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_unshare, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 272 = linux_unshare */ + { .sy_narg = AS(linux_set_robust_list_args), .sy_call = (sy_call_t *)linux_set_robust_list, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 273 = linux_set_robust_list */ + { .sy_narg = AS(linux_get_robust_list_args), .sy_call = (sy_call_t *)linux_get_robust_list, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 274 = linux_get_robust_list */ + { .sy_narg = AS(linux_splice_args), .sy_call = (sy_call_t *)linux_splice, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 275 = linux_splice */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_tee, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 276 = linux_tee */ + { .sy_narg = AS(linux_sync_file_range_args), .sy_call = (sy_call_t *)linux_sync_file_range, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 277 = linux_sync_file_range */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_vmsplice, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 278 = linux_vmsplice */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_move_pages, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 279 = linux_move_pages */ + { .sy_narg = AS(linux_utimensat_args), .sy_call = (sy_call_t *)linux_utimensat, .sy_auevent = AUE_FUTIMESAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 280 = linux_utimensat */ + { .sy_narg = AS(linux_epoll_pwait_args), .sy_call = (sy_call_t *)linux_epoll_pwait, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 281 = linux_epoll_pwait */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_signalfd, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 282 = linux_signalfd */ + { .sy_narg = AS(linux_timerfd_create_args), .sy_call = (sy_call_t *)linux_timerfd_create, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 283 = linux_timerfd_create */ + { .sy_narg = AS(linux_eventfd_args), .sy_call = (sy_call_t *)linux_eventfd, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 284 = linux_eventfd */ + { .sy_narg = AS(linux_fallocate_args), .sy_call = (sy_call_t *)linux_fallocate, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 285 = linux_fallocate */ + { .sy_narg = AS(linux_timerfd_settime_args), .sy_call = (sy_call_t *)linux_timerfd_settime, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 286 = linux_timerfd_settime */ + { .sy_narg = AS(linux_timerfd_gettime_args), .sy_call = (sy_call_t *)linux_timerfd_gettime, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 287 = linux_timerfd_gettime */ + { .sy_narg = AS(linux_accept4_args), .sy_call = (sy_call_t *)linux_accept4, .sy_auevent = AUE_ACCEPT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 288 = linux_accept4 */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_signalfd4, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 289 = linux_signalfd4 */ + { .sy_narg = AS(linux_eventfd2_args), .sy_call = (sy_call_t *)linux_eventfd2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 290 = linux_eventfd2 */ + { .sy_narg = AS(linux_epoll_create1_args), .sy_call = (sy_call_t *)linux_epoll_create1, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 291 = linux_epoll_create1 */ + { .sy_narg = AS(linux_dup3_args), .sy_call = (sy_call_t *)linux_dup3, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 292 = linux_dup3 */ + { .sy_narg = AS(linux_pipe2_args), .sy_call = (sy_call_t *)linux_pipe2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 293 = linux_pipe2 */ + { .sy_narg = AS(linux_inotify_init1_args), .sy_call = (sy_call_t *)linux_inotify_init1, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 294 = linux_inotify_init1 */ + { .sy_narg = AS(linux_preadv_args), .sy_call = (sy_call_t *)linux_preadv, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 295 = linux_preadv */ + { .sy_narg = AS(linux_pwritev_args), .sy_call = (sy_call_t *)linux_pwritev, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 296 = linux_pwritev */ + { .sy_narg = AS(linux_rt_tgsigqueueinfo_args), .sy_call = (sy_call_t *)linux_rt_tgsigqueueinfo, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 297 = linux_rt_tgsigqueueinfo */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_perf_event_open, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 298 = linux_perf_event_open */ + { .sy_narg = AS(linux_recvmmsg_args), .sy_call = (sy_call_t *)linux_recvmmsg, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 299 = linux_recvmmsg */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_fanotify_init, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 300 = linux_fanotify_init */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_fanotify_mark, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 301 = linux_fanotify_mark */ + { .sy_narg = AS(linux_prlimit64_args), .sy_call = (sy_call_t *)linux_prlimit64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 302 = linux_prlimit64 */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_name_to_handle_at, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 303 = linux_name_to_handle_at */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_open_by_handle_at, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 304 = linux_open_by_handle_at */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_clock_adjtime, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 305 = linux_clock_adjtime */ + { .sy_narg = AS(linux_syncfs_args), .sy_call = (sy_call_t *)linux_syncfs, .sy_auevent = AUE_SYNC, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 306 = linux_syncfs */ + { .sy_narg = AS(linux_sendmmsg_args), .sy_call = (sy_call_t *)linux_sendmmsg, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 307 = linux_sendmmsg */ + { .sy_narg = AS(linux_setns_args), .sy_call = (sy_call_t *)linux_setns, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 308 = linux_setns */ + { .sy_narg = AS(linux_getcpu_args), .sy_call = (sy_call_t *)linux_getcpu, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 309 = linux_getcpu */ + { .sy_narg = AS(linux_process_vm_readv_args), .sy_call = (sy_call_t *)linux_process_vm_readv, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 310 = linux_process_vm_readv */ + { .sy_narg = AS(linux_process_vm_writev_args), .sy_call = (sy_call_t *)linux_process_vm_writev, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 311 = linux_process_vm_writev */ + { .sy_narg = AS(linux_kcmp_args), .sy_call = (sy_call_t *)linux_kcmp, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 312 = linux_kcmp */ + { .sy_narg = AS(linux_finit_module_args), .sy_call = (sy_call_t *)linux_finit_module, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 313 = linux_finit_module */ + { .sy_narg = AS(linux_sched_setattr_args), .sy_call = (sy_call_t *)linux_sched_setattr, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 314 = linux_sched_setattr */ + { .sy_narg = AS(linux_sched_getattr_args), .sy_call = (sy_call_t *)linux_sched_getattr, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 315 = linux_sched_getattr */ + { .sy_narg = AS(linux_renameat2_args), .sy_call = (sy_call_t *)linux_renameat2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 316 = linux_renameat2 */ + { .sy_narg = AS(linux_seccomp_args), .sy_call = (sy_call_t *)linux_seccomp, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 317 = linux_seccomp */ + { .sy_narg = AS(linux_getrandom_args), .sy_call = (sy_call_t *)linux_getrandom, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 318 = linux_getrandom */ + { .sy_narg = AS(linux_memfd_create_args), .sy_call = (sy_call_t *)linux_memfd_create, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 319 = linux_memfd_create */ + { .sy_narg = AS(linux_kexec_file_load_args), .sy_call = (sy_call_t *)linux_kexec_file_load, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 320 = linux_kexec_file_load */ + { .sy_narg = AS(linux_bpf_args), .sy_call = (sy_call_t *)linux_bpf, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 321 = linux_bpf */ + { .sy_narg = AS(linux_execveat_args), .sy_call = (sy_call_t *)linux_execveat, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 322 = linux_execveat */ + { .sy_narg = AS(linux_userfaultfd_args), .sy_call = (sy_call_t *)linux_userfaultfd, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 323 = linux_userfaultfd */ + { .sy_narg = AS(linux_membarrier_args), .sy_call = (sy_call_t *)linux_membarrier, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 324 = linux_membarrier */ + { .sy_narg = AS(linux_mlock2_args), .sy_call = (sy_call_t *)linux_mlock2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 325 = linux_mlock2 */ + { .sy_narg = AS(linux_copy_file_range_args), .sy_call = (sy_call_t *)linux_copy_file_range, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 326 = linux_copy_file_range */ + { .sy_narg = AS(linux_preadv2_args), .sy_call = (sy_call_t *)linux_preadv2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 327 = linux_preadv2 */ + { .sy_narg = AS(linux_pwritev2_args), .sy_call = (sy_call_t *)linux_pwritev2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 328 = linux_pwritev2 */ + { .sy_narg = AS(linux_pkey_mprotect_args), .sy_call = (sy_call_t *)linux_pkey_mprotect, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 329 = linux_pkey_mprotect */ + { .sy_narg = AS(linux_pkey_alloc_args), .sy_call = (sy_call_t *)linux_pkey_alloc, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 330 = linux_pkey_alloc */ + { .sy_narg = AS(linux_pkey_free_args), .sy_call = (sy_call_t *)linux_pkey_free, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 331 = linux_pkey_free */ + { .sy_narg = AS(linux_statx_args), .sy_call = (sy_call_t *)linux_statx, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 332 = linux_statx */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_io_pgetevents, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 333 = linux_io_pgetevents */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_rseq, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 334 = linux_rseq */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 335 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 336 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 337 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 338 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 339 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 340 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 341 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 342 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 343 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 344 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 345 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 346 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 347 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 348 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 349 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 350 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 351 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 352 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 353 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 354 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 355 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 356 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 357 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 358 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 359 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 360 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 361 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 362 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 363 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 364 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 365 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 366 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 367 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 368 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 369 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 370 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 371 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 372 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 373 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 374 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 375 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 376 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 377 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 378 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 379 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 380 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 381 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 382 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 383 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 384 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 385 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 386 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 387 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 388 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 389 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 390 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 391 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 392 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 393 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 394 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 395 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 396 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 397 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 398 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 399 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 400 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 401 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 402 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 403 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 404 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 405 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 406 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 407 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 408 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 409 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 410 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 411 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 412 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 413 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 414 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 415 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 416 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 417 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 418 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 419 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 420 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 421 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 422 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 423 = nosys */ + { .sy_narg = AS(linux_pidfd_send_signal_args), .sy_call = (sy_call_t *)linux_pidfd_send_signal, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 424 = linux_pidfd_send_signal */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_io_uring_setup, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 425 = linux_io_uring_setup */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_io_uring_enter, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 426 = linux_io_uring_enter */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_io_uring_register, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 427 = linux_io_uring_register */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 428 = nosys */ }; Modified: head/sys/amd64/linux32/linux32_proto.h ============================================================================== --- head/sys/amd64/linux32/linux32_proto.h Fri Sep 25 09:56:50 2020 (r366146) +++ head/sys/amd64/linux32/linux32_proto.h Fri Sep 25 10:05:38 2020 (r366147) @@ -1942,35 +1942,41 @@ int linux_io_uring_register(struct thread *, struct li #endif /* COMPAT_43 */ + #ifdef COMPAT_FREEBSD4 #define nosys linux_nosys #endif /* COMPAT_FREEBSD4 */ + #ifdef COMPAT_FREEBSD6 #define nosys linux_nosys #endif /* COMPAT_FREEBSD6 */ + #ifdef COMPAT_FREEBSD7 #define nosys linux_nosys #endif /* COMPAT_FREEBSD7 */ + #ifdef COMPAT_FREEBSD10 #define nosys linux_nosys #endif /* COMPAT_FREEBSD10 */ + #ifdef COMPAT_FREEBSD11 #define nosys linux_nosys #endif /* COMPAT_FREEBSD11 */ + #ifdef COMPAT_FREEBSD12 Modified: head/sys/amd64/linux32/linux32_sysent.c ============================================================================== --- head/sys/amd64/linux32/linux32_sysent.c Fri Sep 25 09:56:50 2020 (r366146) +++ head/sys/amd64/linux32/linux32_sysent.c Fri Sep 25 10:05:38 2020 (r366147) @@ -17,433 +17,433 @@ /* The casts are bogus but will do for now. */ struct sysent linux32_sysent[] = { #define nosys linux_nosys - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 0 = setup */ - { AS(linux_exit_args), (sy_call_t *)linux_exit, AUE_EXIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 1 = linux_exit */ - { 0, (sy_call_t *)linux_fork, AUE_FORK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 2 = linux_fork */ - { AS(read_args), (sy_call_t *)sys_read, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 3 = read */ - { AS(write_args), (sy_call_t *)sys_write, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 4 = write */ - { AS(linux_open_args), (sy_call_t *)linux_open, AUE_OPEN_RWTC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 5 = linux_open */ - { AS(close_args), (sy_call_t *)sys_close, AUE_CLOSE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 6 = close */ - { AS(linux_waitpid_args), (sy_call_t *)linux_waitpid, AUE_WAIT4, NULL, 0, 0, 0, SY_THR_STATIC }, /* 7 = linux_waitpid */ - { AS(linux_creat_args), (sy_call_t *)linux_creat, AUE_CREAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 8 = linux_creat */ - { AS(linux_link_args), (sy_call_t *)linux_link, AUE_LINK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 9 = linux_link */ - { AS(linux_unlink_args), (sy_call_t *)linux_unlink, AUE_UNLINK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 10 = linux_unlink */ - { AS(linux_execve_args), (sy_call_t *)linux_execve, AUE_EXECVE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 11 = linux_execve */ - { AS(linux_chdir_args), (sy_call_t *)linux_chdir, AUE_CHDIR, NULL, 0, 0, 0, SY_THR_STATIC }, /* 12 = linux_chdir */ - { AS(linux_time_args), (sy_call_t *)linux_time, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 13 = linux_time */ - { AS(linux_mknod_args), (sy_call_t *)linux_mknod, AUE_MKNOD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 14 = linux_mknod */ - { AS(linux_chmod_args), (sy_call_t *)linux_chmod, AUE_CHMOD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 15 = linux_chmod */ - { AS(linux_lchown16_args), (sy_call_t *)linux_lchown16, AUE_LCHOWN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 16 = linux_lchown16 */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 17 = break */ - { AS(linux_stat_args), (sy_call_t *)linux_stat, AUE_STAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 18 = linux_stat */ - { AS(linux_lseek_args), (sy_call_t *)linux_lseek, AUE_LSEEK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 19 = linux_lseek */ - { 0, (sy_call_t *)linux_getpid, AUE_GETPID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 20 = linux_getpid */ - { AS(linux_mount_args), (sy_call_t *)linux_mount, AUE_MOUNT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 21 = linux_mount */ - { AS(linux_oldumount_args), (sy_call_t *)linux_oldumount, AUE_UMOUNT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 22 = linux_oldumount */ - { AS(linux_setuid16_args), (sy_call_t *)linux_setuid16, AUE_SETUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 23 = linux_setuid16 */ - { 0, (sy_call_t *)linux_getuid16, AUE_GETUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 24 = linux_getuid16 */ - { 0, (sy_call_t *)linux_stime, AUE_SETTIMEOFDAY, NULL, 0, 0, 0, SY_THR_STATIC }, /* 25 = linux_stime */ - { AS(linux_ptrace_args), (sy_call_t *)linux_ptrace, AUE_PTRACE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 26 = linux_ptrace */ - { AS(linux_alarm_args), (sy_call_t *)linux_alarm, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 27 = linux_alarm */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 28 = fstat */ - { 0, (sy_call_t *)linux_pause, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 29 = linux_pause */ - { AS(linux_utime_args), (sy_call_t *)linux_utime, AUE_UTIME, NULL, 0, 0, 0, SY_THR_STATIC }, /* 30 = linux_utime */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 31 = stty */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 32 = gtty */ - { AS(linux_access_args), (sy_call_t *)linux_access, AUE_ACCESS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 33 = linux_access */ - { AS(linux_nice_args), (sy_call_t *)linux_nice, AUE_NICE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 34 = linux_nice */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 35 = ftime */ - { 0, (sy_call_t *)sys_sync, AUE_SYNC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 36 = sync */ - { AS(linux_kill_args), (sy_call_t *)linux_kill, AUE_KILL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 37 = linux_kill */ - { AS(linux_rename_args), (sy_call_t *)linux_rename, AUE_RENAME, NULL, 0, 0, 0, SY_THR_STATIC }, /* 38 = linux_rename */ - { AS(linux_mkdir_args), (sy_call_t *)linux_mkdir, AUE_MKDIR, NULL, 0, 0, 0, SY_THR_STATIC }, /* 39 = linux_mkdir */ - { AS(linux_rmdir_args), (sy_call_t *)linux_rmdir, AUE_RMDIR, NULL, 0, 0, 0, SY_THR_STATIC }, /* 40 = linux_rmdir */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Fri Sep 25 10:20:13 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 97D2F3F187A; Fri, 25 Sep 2020 10:20:13 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BySbK3QlBz3SnK; Fri, 25 Sep 2020 10:20:13 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 559CA1187B; Fri, 25 Sep 2020 10:20:13 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08PAKDAM096701; Fri, 25 Sep 2020 10:20:13 GMT (envelope-from fernape@FreeBSD.org) Received: (from fernape@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08PAKDuT096700; Fri, 25 Sep 2020 10:20:13 GMT (envelope-from fernape@FreeBSD.org) Message-Id: <202009251020.08PAKDuT096700@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fernape set sender to fernape@FreeBSD.org using -f From: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= Date: Fri, 25 Sep 2020 10:20:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366148 - head/contrib/nvi/man X-SVN-Group: head X-SVN-Commit-Author: fernape X-SVN-Commit-Paths: head/contrib/nvi/man X-SVN-Commit-Revision: 366148 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 25 Sep 2020 10:20:13 -0000 Author: fernape (ports committer) Date: Fri Sep 25 10:20:12 2020 New Revision: 366148 URL: https://svnweb.freebsd.org/changeset/base/366148 Log: vi(1): Add URL to the vi/ex reference manual in the man page Reported in PR 241985 The manual page references the "vi/ex reference manual" but there is no information about where to find that document. Add a reference to the manual in the SEE ALSO section since the Project hosts a copy of it[1]. Change sent upstream[2] If D26158 gets reviewed and committed, we could close that PR. [1] https://docs.freebsd.org/44doc/usd/13.viref/paper.pdf). [2] https://github.com/lichray/nvi2/pull/85 Submitted by: freebsd@tim.thechases.com Approved by: manpages (gbe@) Differential Revision: https://reviews.freebsd.org/D26163 Modified: head/contrib/nvi/man/vi.1 Modified: head/contrib/nvi/man/vi.1 ============================================================================== --- head/contrib/nvi/man/vi.1 Fri Sep 25 10:05:38 2020 (r366147) +++ head/contrib/nvi/man/vi.1 Fri Sep 25 10:20:12 2020 (r366148) @@ -12,7 +12,7 @@ .\" that you would have purchased it, or if any company wishes to .\" redistribute it, contributions to the authors would be appreciated. .\" -.Dd November 2, 2013 +.Dd September 25, 2020 .Dt VI 1 .Os .Sh NAME @@ -2743,6 +2743,10 @@ and \*(Gt0 if an error occurs. .Xr ctags 1 , .Xr iconv 1 , .Xr re_format 7 +.Rs +.%T vi/ex reference manual +.%U https://docs.freebsd.org/44doc/usd/13.viref/paper.pdf +.Re .Sh STANDARDS .Nm nex Ns / Ns Nm nvi is close to From owner-svn-src-head@freebsd.org Fri Sep 25 10:23:15 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3FE553F1E1B; Fri, 25 Sep 2020 10:23:15 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BySfq0vLBz3Smn; Fri, 25 Sep 2020 10:23:15 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 01E4D11773; Fri, 25 Sep 2020 10:23:15 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08PANE7V002643; Fri, 25 Sep 2020 10:23:14 GMT (envelope-from rscheff@FreeBSD.org) Received: (from rscheff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08PANE0t002642; Fri, 25 Sep 2020 10:23:14 GMT (envelope-from rscheff@FreeBSD.org) Message-Id: <202009251023.08PANE0t002642@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rscheff set sender to rscheff@FreeBSD.org using -f From: Richard Scheffenegger Date: Fri, 25 Sep 2020 10:23:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366149 - head/sys/netinet/cc X-SVN-Group: head X-SVN-Commit-Author: rscheff X-SVN-Commit-Paths: head/sys/netinet/cc X-SVN-Commit-Revision: 366149 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 25 Sep 2020 10:23:15 -0000 Author: rscheff Date: Fri Sep 25 10:23:14 2020 New Revision: 366149 URL: https://svnweb.freebsd.org/changeset/base/366149 Log: TCP newreno: improve after_idle ssthresh Adjust ssthresh in after_idle to the maximum of the prior ssthresh, or 3/4 of the prior cwnd. See RFC2861 section 2 for an in depth explanation for the rationale around this. As newreno is the default "fall-through" reaction, most tcp variants will benefit from this. Reviewed by: tuexen MFC after: 2 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D22438 Modified: head/sys/netinet/cc/cc_newreno.c Modified: head/sys/netinet/cc/cc_newreno.c ============================================================================== --- head/sys/netinet/cc/cc_newreno.c Fri Sep 25 10:20:12 2020 (r366148) +++ head/sys/netinet/cc/cc_newreno.c Fri Sep 25 10:23:14 2020 (r366149) @@ -213,8 +213,15 @@ newreno_after_idle(struct cc_var *ccv) * wirespeed, overloading router and switch buffers along the way. * * See RFC5681 Section 4.1. "Restarting Idle Connections". + * + * In addition, per RFC2861 Section 2, the ssthresh is set to the + * maximum of the former ssthresh or 3/4 of the old cwnd, to + * not exit slow-start prematurely. */ rw = tcp_compute_initwnd(tcp_maxseg(ccv->ccvc.tcp)); + + CCV(ccv, snd_ssthresh) = max(CCV(ccv, snd_ssthresh), + CCV(ccv, snd_cwnd)-(CCV(ccv, snd_cwnd)>>2)); CCV(ccv, snd_cwnd) = min(rw, CCV(ccv, snd_cwnd)); } From owner-svn-src-head@freebsd.org Fri Sep 25 10:38:20 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 206A43F1CE7; Fri, 25 Sep 2020 10:38:20 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ByT0C72bTz3TMx; Fri, 25 Sep 2020 10:38:19 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D5A3711AD9; Fri, 25 Sep 2020 10:38:19 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08PAcJiG008991; Fri, 25 Sep 2020 10:38:19 GMT (envelope-from rscheff@FreeBSD.org) Received: (from rscheff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08PAcJ23008989; Fri, 25 Sep 2020 10:38:19 GMT (envelope-from rscheff@FreeBSD.org) Message-Id: <202009251038.08PAcJ23008989@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rscheff set sender to rscheff@FreeBSD.org using -f From: Richard Scheffenegger Date: Fri, 25 Sep 2020 10:38:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366150 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: rscheff X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 366150 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 25 Sep 2020 10:38:20 -0000 Author: rscheff Date: Fri Sep 25 10:38:19 2020 New Revision: 366150 URL: https://svnweb.freebsd.org/changeset/base/366150 Log: TCP: send full initial window when timestamps are in use The fastpath in tcp_output tries to send out full segments, and avoid sending partial segments by comparing against the static t_maxseg variable. That value does not consider tcp options like timestamps, while the initial window calculation is using the correct dynamic tcp_maxseg() function. Due to this interaction, the last, full size segment is considered too short and not sent out immediately. Reviewed by: tuexen MFC after: 2 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D26478 Modified: head/sys/netinet/tcp.h head/sys/netinet/tcp_output.c head/sys/netinet/tcp_subr.c Modified: head/sys/netinet/tcp.h ============================================================================== --- head/sys/netinet/tcp.h Fri Sep 25 10:23:14 2020 (r366149) +++ head/sys/netinet/tcp.h Fri Sep 25 10:38:19 2020 (r366150) @@ -80,6 +80,8 @@ struct tcphdr { u_short th_urp; /* urgent pointer */ }; +#define PADTCPOLEN(len) ((((len) / 4) + !!((len) % 4)) * 4) + #define TCPOPT_EOL 0 #define TCPOLEN_EOL 1 #define TCPOPT_PAD 0 /* padding after EOL */ Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Fri Sep 25 10:23:14 2020 (r366149) +++ head/sys/netinet/tcp_output.c Fri Sep 25 10:38:19 2020 (r366150) @@ -591,6 +591,20 @@ after_sack_rexmit: if (len >= tp->t_maxseg) goto send; /* + * As the TCP header options are now + * considered when setting up the initial + * window, we would not send the last segment + * if we skip considering the option length here. + * Note: this may not work when tcp headers change + * very dynamically in the future. + */ + if ((((tp->t_flags & TF_SIGNATURE) ? + PADTCPOLEN(TCPOLEN_SIGNATURE) : 0) + + ((tp->t_flags & TF_RCVD_TSTMP) ? + PADTCPOLEN(TCPOLEN_TIMESTAMP) : 0) + + len) >= tp->t_maxseg) + goto send; + /* * NOTE! on localhost connections an 'ack' from the remote * end may occur synchronously with the output and cause * us to flush a buffer queued with moretocome. XXX Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Fri Sep 25 10:23:14 2020 (r366149) +++ head/sys/netinet/tcp_subr.c Fri Sep 25 10:38:19 2020 (r366150) @@ -3013,7 +3013,6 @@ tcp_maxseg(const struct tcpcb *tp) * but this is harmless, since result of tcp_maxseg() is used * only in cwnd and ssthresh estimations. */ -#define PAD(len) ((((len) / 4) + !!((len) % 4)) * 4) if (TCPS_HAVEESTABLISHED(tp->t_state)) { if (tp->t_flags & TF_RCVD_TSTMP) optlen = TCPOLEN_TSTAMP_APPA; @@ -3021,26 +3020,26 @@ tcp_maxseg(const struct tcpcb *tp) optlen = 0; #if defined(IPSEC_SUPPORT) || defined(TCP_SIGNATURE) if (tp->t_flags & TF_SIGNATURE) - optlen += PAD(TCPOLEN_SIGNATURE); + optlen += PADTCPOLEN(TCPOLEN_SIGNATURE); #endif if ((tp->t_flags & TF_SACK_PERMIT) && tp->rcv_numsacks > 0) { optlen += TCPOLEN_SACKHDR; optlen += tp->rcv_numsacks * TCPOLEN_SACK; - optlen = PAD(optlen); + optlen = PADTCPOLEN(optlen); } } else { if (tp->t_flags & TF_REQ_TSTMP) optlen = TCPOLEN_TSTAMP_APPA; else - optlen = PAD(TCPOLEN_MAXSEG); + optlen = PADTCPOLEN(TCPOLEN_MAXSEG); if (tp->t_flags & TF_REQ_SCALE) - optlen += PAD(TCPOLEN_WINDOW); + optlen += PADTCPOLEN(TCPOLEN_WINDOW); #if defined(IPSEC_SUPPORT) || defined(TCP_SIGNATURE) if (tp->t_flags & TF_SIGNATURE) - optlen += PAD(TCPOLEN_SIGNATURE); + optlen += PADTCPOLEN(TCPOLEN_SIGNATURE); #endif if (tp->t_flags & TF_SACK_PERMIT) - optlen += PAD(TCPOLEN_SACK_PERMITTED); + optlen += PADTCPOLEN(TCPOLEN_SACK_PERMITTED); } #undef PAD optlen = min(optlen, TCP_MAXOLEN); From owner-svn-src-head@freebsd.org Fri Sep 25 13:52:32 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5DF103F7E64; Fri, 25 Sep 2020 13:52:32 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ByYJJ1vW2z401Z; Fri, 25 Sep 2020 13:52:32 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 24691144B2; Fri, 25 Sep 2020 13:52:32 +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 08PDqW2P034255; Fri, 25 Sep 2020 13:52:32 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08PDqVcw034251; Fri, 25 Sep 2020 13:52:31 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <202009251352.08PDqVcw034251@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Fri, 25 Sep 2020 13:52:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366156 - in head/sys/dev: extres/syscon fdt X-SVN-Group: head X-SVN-Commit-Author: mmel X-SVN-Commit-Paths: in head/sys/dev: extres/syscon fdt X-SVN-Commit-Revision: 366156 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 25 Sep 2020 13:52:32 -0000 Author: mmel Date: Fri Sep 25 13:52:31 2020 New Revision: 366156 URL: https://svnweb.freebsd.org/changeset/base/366156 Log: Correctly handle nodes compatible with "syscon", "simple-bus". Syscon can also have child nodes that share a registration file with it. To do this correctly, follow these steps: - subclass syscon from simplebus and expose it if the node is also "simple-bus" compatible. - block simplebus probe for this compatible string, so it's priority (bus pass) doesn't colide with syscon driver. While I'm in, also block "syscon", "simple-mfd" for the same reason. MFC after: 4 weeks Modified: head/sys/dev/extres/syscon/syscon_generic.c head/sys/dev/extres/syscon/syscon_generic.h head/sys/dev/fdt/simplebus.c Modified: head/sys/dev/extres/syscon/syscon_generic.c ============================================================================== --- head/sys/dev/extres/syscon/syscon_generic.c Fri Sep 25 13:28:57 2020 (r366155) +++ head/sys/dev/extres/syscon/syscon_generic.c Fri Sep 25 13:52:31 2020 (r366156) @@ -60,7 +60,7 @@ static int syscon_generic_write_4(struct syscon *sysco uint32_t val); static int syscon_generic_modify_4(struct syscon *syscon, bus_size_t offset, uint32_t clear_bits, uint32_t set_bits); - +static int syscon_generic_detach(device_t dev); /* * Generic syscon driver (FDT) */ @@ -152,7 +152,7 @@ static int syscon_generic_attach(device_t dev) { struct syscon_generic_softc *sc; - int rid; + int rid, rv; sc = device_get_softc(dev); sc->dev = dev; @@ -170,9 +170,20 @@ syscon_generic_attach(device_t dev) ofw_bus_get_node(dev)); if (sc->syscon == NULL) { device_printf(dev, "Failed to create/register syscon\n"); + syscon_generic_detach(dev); return (ENXIO); } - return (0); + if (ofw_bus_is_compatible(dev, "simple-bus")) { + rv = simplebus_attach_impl(sc->dev); + if (rv != 0) { + device_printf(dev, "Failed to create simplebus\n"); + syscon_generic_detach(dev); + return (ENXIO); + } + sc->simplebus_attached = true; + } + + return (bus_generic_attach(dev)); } static int @@ -185,7 +196,8 @@ syscon_generic_detach(device_t dev) syscon_unregister(sc->syscon); free(sc->syscon, M_SYSCON); } - + if (sc->simplebus_attached) + simplebus_detach(dev); SYSCON_LOCK_DESTROY(sc); if (sc->mem_res != NULL) @@ -202,8 +214,8 @@ static device_method_t syscon_generic_dmethods[] = { DEVMETHOD_END }; -DEFINE_CLASS_0(syscon_generic, syscon_generic_driver, syscon_generic_dmethods, - sizeof(struct syscon_generic_softc)); +DEFINE_CLASS_1(syscon_generic_dev, syscon_generic_driver, syscon_generic_dmethods, + sizeof(struct syscon_generic_softc), simplebus_driver); static devclass_t syscon_generic_devclass; EARLY_DRIVER_MODULE(syscon_generic, simplebus, syscon_generic_driver, Modified: head/sys/dev/extres/syscon/syscon_generic.h ============================================================================== --- head/sys/dev/extres/syscon/syscon_generic.h Fri Sep 25 13:28:57 2020 (r366155) +++ head/sys/dev/extres/syscon/syscon_generic.h Fri Sep 25 13:52:31 2020 (r366156) @@ -29,11 +29,15 @@ #ifndef DEV_SYSCON_GENERIC_H #define DEV_SYSCON_GENERIC_H +#include + struct syscon_generic_softc { + struct simplebus_softc simplebus; device_t dev; struct syscon *syscon; struct resource *mem_res; struct mtx mtx; + bool simplebus_attached; }; DECLARE_CLASS(syscon_generic_driver); Modified: head/sys/dev/fdt/simplebus.c ============================================================================== --- head/sys/dev/fdt/simplebus.c Fri Sep 25 13:28:57 2020 (r366155) +++ head/sys/dev/fdt/simplebus.c Fri Sep 25 13:52:31 2020 (r366156) @@ -116,6 +116,16 @@ simplebus_probe(device_t dev) if (!ofw_bus_status_okay(dev)) return (ENXIO); + /* + * XXX We should attach only to pure' compatible = "simple-bus"', + * without any other compatible string. + * For now, filter only know cases: + * "syscon", "simple-bus"; is handled by fdt/syscon driver + * "simple-mfd", "simple-bus"; is handled by fdt/simple-mfd driver + */ + if (ofw_bus_is_compatible(dev, "syscon") || + ofw_bus_is_compatible(dev, "simple-mfd")) + return (ENXIO); /* * FDT data puts a "simple-bus" compatible string on many things that From owner-svn-src-head@freebsd.org Fri Sep 25 16:02:14 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 279C23FBEED; Fri, 25 Sep 2020 16:02:14 +0000 (UTC) (envelope-from olivier@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Byc9y0C0Fz48Wj; Fri, 25 Sep 2020 16:02:14 +0000 (UTC) (envelope-from olivier@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DF977159E3; Fri, 25 Sep 2020 16:02:13 +0000 (UTC) (envelope-from olivier@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08PG2DJe013791; Fri, 25 Sep 2020 16:02:13 GMT (envelope-from olivier@FreeBSD.org) Received: (from olivier@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08PG2DvC013790; Fri, 25 Sep 2020 16:02:13 GMT (envelope-from olivier@FreeBSD.org) Message-Id: <202009251602.08PG2DvC013790@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: olivier set sender to olivier@FreeBSD.org using -f From: Olivier Cochard Date: Fri, 25 Sep 2020 16:02:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366159 - head/tests/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: olivier X-SVN-Commit-Paths: head/tests/sys/netinet X-SVN-Commit-Revision: 366159 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 25 Sep 2020 16:02:14 -0000 Author: olivier (ports committer) Date: Fri Sep 25 16:02:13 2020 New Revision: 366159 URL: https://svnweb.freebsd.org/changeset/base/366159 Log: Enable SO_LINGER to the so_reuseport_lb_test regression tests, preventing many sockets in TIME_WAIT state at the end of the test. PR: 249885 Reviewed by: markj Approved by: markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D26549 Modified: head/tests/sys/netinet/so_reuseport_lb_test.c Modified: head/tests/sys/netinet/so_reuseport_lb_test.c ============================================================================== --- head/tests/sys/netinet/so_reuseport_lb_test.c Fri Sep 25 13:59:50 2020 (r366158) +++ head/tests/sys/netinet/so_reuseport_lb_test.c Fri Sep 25 16:02:13 2020 (r366159) @@ -54,6 +54,7 @@ lb_simple_accept_loop(int domain, const struct sockadd size_t i; int *acceptcnt; int csd, error, excnt, sd; + const struct linger lopt = { 1, 0 }; /* * We expect each listening socket to accept roughly nconns/nsds @@ -71,6 +72,10 @@ lb_simple_accept_loop(int domain, const struct sockadd error = connect(sd, addr, addr->sa_len); ATF_REQUIRE_MSG(error == 0, "connect() failed: %s", + strerror(errno)); + + error = setsockopt(sd, SOL_SOCKET, SO_LINGER, &lopt, sizeof(lopt)); + ATF_REQUIRE_MSG(error == 0, "Setting linger failed: %s", strerror(errno)); /* From owner-svn-src-head@freebsd.org Fri Sep 25 16:44:02 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C999C3FC9C7; Fri, 25 Sep 2020 16:44:02 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Byd6B4yGtz4DGq; Fri, 25 Sep 2020 16:44:02 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8DC7616475; Fri, 25 Sep 2020 16:44:02 +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 08PGi29t041382; Fri, 25 Sep 2020 16:44:02 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08PGi2Qg041379; Fri, 25 Sep 2020 16:44:02 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <202009251644.08PGi2Qg041379@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Fri, 25 Sep 2020 16:44:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366161 - head/sys/dev/extres/syscon X-SVN-Group: head X-SVN-Commit-Author: mmel X-SVN-Commit-Paths: head/sys/dev/extres/syscon X-SVN-Commit-Revision: 366161 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 25 Sep 2020 16:44:02 -0000 Author: mmel Date: Fri Sep 25 16:44:01 2020 New Revision: 366161 URL: https://svnweb.freebsd.org/changeset/base/366161 Log: Refine locking inside of syscon driver. In some cases, the syscon driver may be used by consumer requiring better control about locking (ie. it may be used as registe file provider for clock driver which needs locked access to multiple registers). Add fine locking protocol methods together with bunch of helper functions in syscon driver and implement this functionality in syscon_generic driver. MFC after: 4 weeks Modified: head/sys/dev/extres/syscon/syscon.c head/sys/dev/extres/syscon/syscon_generic.c head/sys/dev/extres/syscon/syscon_if.m Modified: head/sys/dev/extres/syscon/syscon.c ============================================================================== --- head/sys/dev/extres/syscon/syscon.c Fri Sep 25 16:34:42 2020 (r366160) +++ head/sys/dev/extres/syscon/syscon.c Fri Sep 25 16:44:01 2020 (r366161) @@ -67,7 +67,13 @@ typedef TAILQ_HEAD(syscon_list, syscon) syscon_list_t; */ static int syscon_method_init(struct syscon *syscon); static int syscon_method_uninit(struct syscon *syscon); +static uint32_t syscon_method_read_4(struct syscon *syscon, bus_size_t offset); +static int syscon_method_write_4(struct syscon *syscon, bus_size_t offset, + uint32_t val); +static int syscon_method_modify_4(struct syscon *syscon, bus_size_t offset, + uint32_t clear_bits, uint32_t set_bits); + MALLOC_DEFINE(M_SYSCON, "syscon", "Syscon driver"); static syscon_list_t syscon_list = TAILQ_HEAD_INITIALIZER(syscon_list); @@ -80,6 +86,9 @@ SX_SYSINIT(syscon_topology, &syscon_topo_lock, "Syscon static syscon_method_t syscon_methods[] = { SYSCONMETHOD(syscon_init, syscon_method_init), SYSCONMETHOD(syscon_uninit, syscon_method_uninit), + SYSCONMETHOD(syscon_read_4, syscon_method_read_4), + SYSCONMETHOD(syscon_write_4, syscon_method_write_4), + SYSCONMETHOD(syscon_modify_4, syscon_method_modify_4), SYSCONMETHOD_END }; @@ -115,6 +124,39 @@ syscon_get_softc(struct syscon *syscon) return (syscon->softc); }; +static uint32_t +syscon_method_read_4(struct syscon *syscon, bus_size_t offset) +{ + uint32_t val; + + SYSCON_DEVICE_LOCK(syscon->pdev); + val = SYSCON_UNLOCKED_READ_4(syscon, offset); + SYSCON_DEVICE_UNLOCK(syscon->pdev); + return(val); +} + +static int +syscon_method_write_4(struct syscon *syscon, bus_size_t offset, uint32_t val) +{ + int rv; + + SYSCON_DEVICE_LOCK(syscon->pdev); + rv = SYSCON_UNLOCKED_WRITE_4(syscon, offset, val); + SYSCON_DEVICE_UNLOCK(syscon->pdev); + return(rv); +} + +static int +syscon_method_modify_4(struct syscon *syscon, bus_size_t offset, + uint32_t clear_bits, uint32_t set_bits) +{ + int rv; + + SYSCON_DEVICE_LOCK(syscon->pdev); + rv = SYSCON_UNLOCKED_MODIFY_4(syscon, offset, clear_bits, set_bits); + SYSCON_DEVICE_UNLOCK(syscon->pdev); + return(rv); +} /* * Create and initialize syscon object, but do not register it. */ @@ -254,14 +296,3 @@ syscon_get_by_ofw_property(device_t cdev, phandle_t cn return (0); } #endif - -int -syscon_get_handle_default(device_t dev, struct syscon **syscon) -{ - device_t parent; - - parent = device_get_parent(dev); - if (parent == NULL) - return (ENODEV); - return (SYSCON_GET_HANDLE(parent, syscon)); -} Modified: head/sys/dev/extres/syscon/syscon_generic.c ============================================================================== --- head/sys/dev/extres/syscon/syscon_generic.c Fri Sep 25 16:34:42 2020 (r366160) +++ head/sys/dev/extres/syscon/syscon_generic.c Fri Sep 25 16:44:01 2020 (r366161) @@ -55,11 +55,12 @@ __FBSDID("$FreeBSD$"); MALLOC_DECLARE(M_SYSCON); -static uint32_t syscon_generic_read_4(struct syscon *syscon, bus_size_t offset); -static int syscon_generic_write_4(struct syscon *syscon, bus_size_t offset, - uint32_t val); -static int syscon_generic_modify_4(struct syscon *syscon, bus_size_t offset, - uint32_t clear_bits, uint32_t set_bits); +static uint32_t syscon_generic_unlocked_read_4(struct syscon *syscon, + bus_size_t offset); +static int syscon_generic_unlocked_write_4(struct syscon *syscon, + bus_size_t offset, uint32_t val); +static int syscon_generic_unlocked_modify_4(struct syscon *syscon, + bus_size_t offset, uint32_t clear_bits, uint32_t set_bits); static int syscon_generic_detach(device_t dev); /* * Generic syscon driver (FDT) @@ -78,9 +79,9 @@ static struct ofw_compat_data compat_data[] = { #define SYSCON_ASSERT_UNLOCKED(_sc) mtx_assert(&(_sc)->mtx, MA_NOTOWNED); static syscon_method_t syscon_generic_methods[] = { - SYSCONMETHOD(syscon_read_4, syscon_generic_read_4), - SYSCONMETHOD(syscon_write_4, syscon_generic_write_4), - SYSCONMETHOD(syscon_modify_4, syscon_generic_modify_4), + SYSCONMETHOD(syscon_unlocked_read_4, syscon_generic_unlocked_read_4), + SYSCONMETHOD(syscon_unlocked_write_4, syscon_generic_unlocked_write_4), + SYSCONMETHOD(syscon_unlocked_modify_4, syscon_generic_unlocked_modify_4), SYSCONMETHOD_END }; @@ -88,50 +89,62 @@ DEFINE_CLASS_1(syscon_generic, syscon_generic_class, s 0, syscon_class); static uint32_t -syscon_generic_read_4(struct syscon *syscon, bus_size_t offset) +syscon_generic_unlocked_read_4(struct syscon *syscon, bus_size_t offset) { struct syscon_generic_softc *sc; uint32_t val; sc = device_get_softc(syscon->pdev); - - SYSCON_LOCK(sc); + SYSCON_ASSERT_UNLOCKED(sc); val = bus_read_4(sc->mem_res, offset); - SYSCON_UNLOCK(sc); return (val); } static int -syscon_generic_write_4(struct syscon *syscon, bus_size_t offset, uint32_t val) +syscon_generic_unlocked_write_4(struct syscon *syscon, bus_size_t offset, uint32_t val) { struct syscon_generic_softc *sc; sc = device_get_softc(syscon->pdev); - - SYSCON_LOCK(sc); + SYSCON_ASSERT_UNLOCKED(sc); bus_write_4(sc->mem_res, offset, val); - SYSCON_UNLOCK(sc); return (0); } static int -syscon_generic_modify_4(struct syscon *syscon, bus_size_t offset, +syscon_generic_unlocked_modify_4(struct syscon *syscon, bus_size_t offset, uint32_t clear_bits, uint32_t set_bits) { struct syscon_generic_softc *sc; uint32_t val; sc = device_get_softc(syscon->pdev); - - SYSCON_LOCK(sc); + SYSCON_ASSERT_UNLOCKED(sc); val = bus_read_4(sc->mem_res, offset); val &= ~clear_bits; val |= set_bits; bus_write_4(sc->mem_res, offset, val); - SYSCON_UNLOCK(sc); return (0); } +static void +syscon_generic_lock(device_t dev) +{ + struct syscon_generic_softc *sc; + + sc = device_get_softc(dev); + SYSCON_LOCK(sc); +} + +static void +syscon_generic_unlock(device_t dev) +{ + struct syscon_generic_softc *sc; + + sc = device_get_softc(dev); + SYSCON_UNLOCK(sc); +} + static int syscon_generic_probe(device_t dev) { @@ -210,6 +223,9 @@ static device_method_t syscon_generic_dmethods[] = { DEVMETHOD(device_probe, syscon_generic_probe), DEVMETHOD(device_attach, syscon_generic_attach), DEVMETHOD(device_detach, syscon_generic_detach), + + DEVMETHOD(syscon_device_lock, syscon_generic_lock), + DEVMETHOD(syscon_device_unlock, syscon_generic_unlock), DEVMETHOD_END }; Modified: head/sys/dev/extres/syscon/syscon_if.m ============================================================================== --- head/sys/dev/extres/syscon/syscon_if.m Fri Sep 25 16:34:42 2020 (r366160) +++ head/sys/dev/extres/syscon/syscon_if.m Fri Sep 25 16:44:01 2020 (r366161) @@ -35,6 +35,36 @@ HEADER { int syscon_get_handle_default(device_t dev, struct syscon **syscon); } +CODE { + #include + #include + + int + syscon_get_handle_default(device_t dev, struct syscon **syscon) + { + device_t parent; + + parent = device_get_parent(dev); + if (parent == NULL) + return (ENODEV); + return (SYSCON_GET_HANDLE(parent, syscon)); + } + + static void + syscon_device_lock_default(device_t dev) + { + + panic("syscon_device_lock is not implemented"); + }; + + static void + syscon_device_unlock_default(device_t dev) + { + + panic("syscon_device_unlock is not implemented"); + }; +} + METHOD int init { struct syscon *syscon; }; @@ -63,6 +93,38 @@ METHOD int modify_4 { uint32_t clear_bits; uint32_t set_bits; }; + +/** + * Unlocked verion of access function + */ +METHOD uint32_t unlocked_read_4 { + struct syscon *syscon; + bus_size_t offset; +}; + +METHOD int unlocked_write_4 { + struct syscon *syscon; + bus_size_t offset; + uint32_t val; +}; + +METHOD int unlocked_modify_4 { + struct syscon *syscon; + bus_size_t offset; + uint32_t clear_bits; + uint32_t set_bits; +}; + +/** +* Locking for exclusive access to underlying device +*/ +METHOD void device_lock { + device_t dev; +} DEFAULT syscon_device_lock_default; + +METHOD void device_unlock { + device_t dev; +} DEFAULT syscon_device_unlock_default; /** * Get syscon handle from parent driver From owner-svn-src-head@freebsd.org Fri Sep 25 17:13:47 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 09A873FD4F1; Fri, 25 Sep 2020 17:13:47 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BydmV4tYVz4GDg; Fri, 25 Sep 2020 17:13:46 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8AC6C16572; Fri, 25 Sep 2020 17:13:46 +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 08PHDkUL059796; Fri, 25 Sep 2020 17:13:46 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08PHDkog059795; Fri, 25 Sep 2020 17:13:46 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <202009251713.08PHDkog059795@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 25 Sep 2020 17:13:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366162 - in head/sys/mips: include mips X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: in head/sys/mips: include mips X-SVN-Commit-Revision: 366162 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 25 Sep 2020 17:13:47 -0000 Author: jhibbits Date: Fri Sep 25 17:13:45 2020 New Revision: 366162 URL: https://svnweb.freebsd.org/changeset/base/366162 Log: Fix compat32 on mips64 Summary: Two bugs: * Elf32_Auxinfo is broken, using pointers in the union, which are 64-bits not 32. * freebsd32_sysarch() doesn't update the 'user local' register when handling MIPS_SET_TLS, leading to a NULL pointer dereference in the 32-bit application. Reviewed by: #mips, brooks MFC after: 1 week Sponsored by: Juniper Networks, Inc Differential Revision: https://reviews.freebsd.org/D26556 Modified: head/sys/mips/include/elf.h head/sys/mips/mips/freebsd32_machdep.c Modified: head/sys/mips/include/elf.h ============================================================================== --- head/sys/mips/include/elf.h Fri Sep 25 16:44:01 2020 (r366161) +++ head/sys/mips/include/elf.h Fri Sep 25 17:13:45 2020 (r366162) @@ -105,8 +105,6 @@ typedef struct { /* Auxiliary vector entry on initial int a_type; /* Entry type. */ union { int a_val; /* Integer value. */ - void *a_ptr; /* Address. */ - void (*a_fcn)(void); /* Function pointer (not used). */ } a_un; } Elf32_Auxinfo; Modified: head/sys/mips/mips/freebsd32_machdep.c ============================================================================== --- head/sys/mips/mips/freebsd32_machdep.c Fri Sep 25 16:44:01 2020 (r366161) +++ head/sys/mips/mips/freebsd32_machdep.c Fri Sep 25 17:13:45 2020 (r366162) @@ -58,6 +58,7 @@ #include #include +#include #include #include #include @@ -455,6 +456,17 @@ freebsd32_sysarch(struct thread *td, struct freebsd32_ switch (uap->op) { case MIPS_SET_TLS: td->td_md.md_tls = (void *)(intptr_t)uap->parms; + + /* + * If there is an user local register implementation (ULRI) + * update it as well. Add the TLS and TCB offsets so the + * value in this register is adjusted like in the case of the + * rdhwr trap() instruction handler. + */ + if (cpuinfo.userlocal_reg == true) { + mips_wr_userlocal((unsigned long)(uap->parms + + td->td_md.md_tls_tcb_offset)); + } return (0); case MIPS_GET_TLS: tlsbase = (int32_t)(intptr_t)td->td_md.md_tls; From owner-svn-src-head@freebsd.org Fri Sep 25 17:36:16 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2C66E3FDE42; Fri, 25 Sep 2020 17:36:16 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ByfGQ60DYz4HMX; Fri, 25 Sep 2020 17:36:14 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 08PHa5ka051531; Fri, 25 Sep 2020 10:36:05 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 08PHa5nS051530; Fri, 25 Sep 2020 10:36:05 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202009251736.08PHa5nS051530@gndrsh.dnsmgr.net> Subject: Re: svn commit: r365643 - head/bin/cp In-Reply-To: <20200923224933.GL2570@kib.kiev.ua> To: Konstantin Belousov Date: Fri, 25 Sep 2020 10:36:05 -0700 (PDT) CC: Warner Losh , "Rodney W. Grimes" , Kyle Evans , Alan Somers , Mateusz Guzik , src-committers , svn-src-all , svn-src-head Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4ByfGQ60DYz4HMX X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@gndrsh.dnsmgr.net has no SPF policy when checking 69.59.192.140) smtp.mailfrom=freebsd@gndrsh.dnsmgr.net X-Spamd-Result: default: False [1.04 / 15.00]; HAS_REPLYTO(0.00)[rgrimes@freebsd.org]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_NA(0.00)[no SPF record]; NEURAL_SPAM_SHORT(0.08)[0.079]; NEURAL_HAM_LONG(-0.26)[-0.258]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; DMARC_NA(0.00)[dnsmgr.net]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.32)[0.322]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; RCPT_COUNT_SEVEN(0.00)[9]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; FREEMAIL_CC(0.00)[bsdimp.com,freebsd.org,gmail.com]; MAILMAN_DEST(0.00)[svn-src-head,svn-src-all]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 25 Sep 2020 17:36:16 -0000 > On Wed, Sep 23, 2020 at 11:23:51AM -0600, Warner Losh wrote: > > On Wed, Sep 23, 2020, 10:56 AM Rodney W. Grimes > > wrote: > > > > > > cp is already fixed, people are still feeling the fallout of being > > > > within those revisions and needing to bootstrap their own cp. We can > > > > reduce the number of components these invocations rely on trivially to > > > > shell built-in mechanics, why not do so? > > > > > > I would even go further, I would like to see the dependency on > > > /dev/null removed from the build, and the boot process. > > > > > > > A worthy goal, but one I'm afraid is out of our reach. A quick grep shows > > just over 200 instances of /dev/null in the Makefile and mk file (800 if > > you don't filter Makefile.in and Makefile.am). Maybe a third of those are > > due to tests and other false positives. It would be quite the effort to > > eliminate them all. And /dev/tty and /dev/zero likely will be troublesome > > too, as they are used by running programs. > > > > and how would you throw away output you know is bad / bogus without > > /dev/null? > > > > >From the build because it means I would no longer have to > > > mount /dev in my chroots, and from the boot because I > > > hate to say it, but we often scribble in /dev before > > > devfs is mounted and if you look at root file systems > > > mounted on other systems you well often find a /dev/null > > > FILE that got created during the boot process from a >/dev/null > > > before devfs was mounted. > > > > > > > But for this issue, we're not mounting devfs early enough. We should fix > > that. Removing /dev/null from the boot process likely is never going to > > happen because we use it all over the place to discard output... There's > > ~200 instances of it in the boot rc scripts, so getting rid of it there > > would also be quite the effort, with the same question. > I would like to see some evidence for this actually occuring. > > We mount devfs instance before root (yes), to get the device nodes > available, so we can specify device name for root mount from loader. > After mounting root we do a rearrangement to move devfs to /dev, which > is somewhat tricky due to e.g. namecache. > > I do not see how could anything in userspace even touch the underlying > directory on rootfs of the /dev devfs mount. > > OTOH, it is a usual problem with /tmp getting dirty, and the garbage > hidden with tmpfs/md UFS mount over /tmp. I consistantly find a /dev/null FILE on most systems when I take a volume out of one machine and mount it as a non-boot volume. I believe you can also see these in the underlying file system on UFS with dump, or with zfs send. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Fri Sep 25 17:42:03 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E9DC83FDFE6; Fri, 25 Sep 2020 17:42:03 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ByfP70NbMz4J9f; Fri, 25 Sep 2020 17:42:02 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 08PHg03t051550; Fri, 25 Sep 2020 10:42:00 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 08PHg0nD051549; Fri, 25 Sep 2020 10:42:00 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202009251742.08PHg0nD051549@gndrsh.dnsmgr.net> Subject: Re: svn commit: r365643 - head/bin/cp In-Reply-To: To: Warner Losh Date: Fri, 25 Sep 2020 10:42:00 -0700 (PDT) CC: Stefan Esser , "Rodney W. Grimes" , Kyle Evans , Alan Somers , Mateusz Guzik , src-committers , svn-src-all , svn-src-head Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4ByfP70NbMz4J9f X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@gndrsh.dnsmgr.net has no SPF policy when checking 69.59.192.140) smtp.mailfrom=freebsd@gndrsh.dnsmgr.net X-Spamd-Result: default: False [-0.05 / 15.00]; HAS_REPLYTO(0.00)[rgrimes@freebsd.org]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_MEDIUM(-0.22)[-0.219]; NEURAL_HAM_LONG(-0.72)[-0.717]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; DMARC_NA(0.00)[dnsmgr.net]; AUTH_NA(1.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.01)[-0.010]; RCPT_COUNT_SEVEN(0.00)[9]; RCVD_TLS_LAST(0.00)[]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; MAILMAN_DEST(0.00)[svn-src-head,svn-src-all]; FREEMAIL_CC(0.00)[freebsd.org,gmail.com] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 25 Sep 2020 17:42:04 -0000 > On Thu, Sep 24, 2020 at 12:41 AM Stefan Esser wrote: > > > Am 23.09.20 um 19:23 schrieb Warner Losh> But for this issue, we're not > > mounting devfs early enough. We should > > > fix that. Removing /dev/null from the boot process likely is never going > > > to happen because we use it all over the place to discard output... > > > There's ~200 instances of it in the boot rc scripts, so getting rid of > > > it there would also be quite the effort, with the same question. > > > > Removal of /dev/null from rc.d scripts should be quite simple, > > since most cases could just use ">-" (close file descriptor) > > instead. Other usage could be substituted with ":>" followed > > by chown. > > > > So closing fd1 and fd2 doesn't cause them to be available for these > programs to get as an fd on open, causing other issues? > > But >- isn't documented in sh(1) as doing the close thing. On a whim I did > the following: > $ echo fred >- > $ ls -last ./- > 4 -rw-r--r-- 1 imp imp 5 Sep 24 00:50 ./- > $ cat ./- > fred > $ > which suggests maybe you now have a lot of files named - instead... > > > > I'd be willing to generate patches for review, if there is any > > chance such a change might be accepted into -CURRENT. > > > > I could not find any use of /dev/zero, > > > Yea, I'd thought we used it in libc, but I can't find any evidence of that > with grep now that I've gone looking for it. For get that specific one :) > > > > but e.g. rc.d/syscons > > uses ${kbddev} (i.e. /dev/ttyv0) and rc.d/zvol performs swapon > > on /dev/zvol/${name}, rc.d/random uses /dev/random and so on. > > > > So those interactions should be disaled by rc variables... Or we should be > failing the operation... I believe there are several cases in the rc scripts of failure to fail, and I have experinced at least one that left a firewall wide open that I would of just rather had it fail and drop to single user. I have repeatedly heard the argument, "but you want it to continue so you can get into it" NO, not if that failure leads to a security risk. Most modern systems have out of band management so the story of "but you cant get to the system if it stops" no longer holds water with me. I have worked around these locally. > > > But those further references to /dev nodes will in general be > > NOPs if /dev is not available (some test for existence of the > > node they rely on, other just fail trying to access them, but > > without negative effect on going multi-user). > > > > Yea, that's more minor, but if /dev/ isn't there, they likely should fail, > or shouldn't proceed... But in a way that allows the rest of the rc scripts > to continue... This notion that "must boot at all cost" leads to security risks. > Warner -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Fri Sep 25 17:47:46 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7C3B83FE7E1; Fri, 25 Sep 2020 17:47:46 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ByfWj4j1Kz4Jxj; Fri, 25 Sep 2020 17:47:45 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 08PHlgA2051587; Fri, 25 Sep 2020 10:47:42 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 08PHlgSe051586; Fri, 25 Sep 2020 10:47:42 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202009251747.08PHlgSe051586@gndrsh.dnsmgr.net> Subject: Re: svn commit: r365643 - head/bin/cp In-Reply-To: <545173d1-a6e1-333a-11c1-a791bbeadd76@freebsd.org> To: Stefan Esser Date: Fri, 25 Sep 2020 10:47:42 -0700 (PDT) CC: Warner Losh , "Rodney W. Grimes" , Kyle Evans , Alan Somers , Mateusz Guzik , src-committers , svn-src-all , svn-src-head Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4ByfWj4j1Kz4Jxj X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@gndrsh.dnsmgr.net has no SPF policy when checking 69.59.192.140) smtp.mailfrom=freebsd@gndrsh.dnsmgr.net X-Spamd-Result: default: False [0.57 / 15.00]; HAS_REPLYTO(0.00)[rgrimes@freebsd.org]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_MEDIUM(-0.22)[-0.219]; NEURAL_HAM_LONG(-0.10)[-0.100]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; DMARC_NA(0.00)[dnsmgr.net]; AUTH_NA(1.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.01)[-0.011]; RCPT_COUNT_SEVEN(0.00)[9]; RCVD_TLS_LAST(0.00)[]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; MAILMAN_DEST(0.00)[svn-src-head,svn-src-all]; FREEMAIL_CC(0.00)[bsdimp.com,freebsd.org,gmail.com] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 25 Sep 2020 17:47:46 -0000 > Am 24.09.20 um 08:54 schrieb Warner Losh: > > > > > > On Thu, Sep 24, 2020 at 12:41 AM Stefan Esser > > wrote: > > > > Am 23.09.20 um 19:23 schrieb Warner Losh> But for this issue, we're not > > mounting devfs early enough.? We should > > > fix that. Removing /dev/null from the boot process likely is > > never going > > > to happen because we use it all over the place to discard output... > > > There's ~200 instances of it in the boot rc scripts, so getting > > rid of > > > it there would also be quite the effort, with the same question. > > > > Removal of /dev/null from rc.d scripts should be quite simple, > > since most cases could just use ">-" (close file descriptor) > > instead. Other usage could be substituted with ":>" followed > > by chown. > > > > > > So closing fd1 and fd2 doesn't cause them to be available for these > > programs to get as an fd on open, causing other issues? > > > > But >- isn't documented in sh(1) as doing the close thing. On a whim I > > did the following: > > $ echo fred >- > > $ ls -last ./- > > 4 -rw-r--r-- ?1 imp ?imp ?5 Sep 24 00:50 ./- > > $ cat ./- > > fred > > $ > > which suggests maybe you now have a lot of files named - instead... > > Yes, sorry, please ignore what I wrote - I was thinking of ">&-" of > course, but that is not gracefully accepted by many commands (they > are aborted when trying to write to the closed file descriptor). > > I had thought about piping into a command that ignores STDIN, first, > e.g. "| :", but that generates a SIGPIPE when trying to flush the > FILE buffer (i.e. after 4 KB, which might be sufficient for most > cases, but it is not a general solution). > > A program that reads from STDIN and generates no output could be used, > though, e.g. "| sed d". > > But this would cause lots of extra forked processes and increase the > start-up time and is not acceptable. Most of these can be "fixed" by fixing the programs that fail to be old school friendly. Ie produce no output when things are done as they are asked to be done, as these "noisy" programs are not pipe friendly. #1 being sysctl insisting to output what it did, simple fix, add a -Q to it. > > > but e.g. rc.d/syscons > > uses ${kbddev} (i.e. /dev/ttyv0) and rc.d/zvol performs swapon > > on /dev/zvol/${name}, rc.d/random uses /dev/random and so on. > > > > So those interactions should be disaled by rc variables...? Or we should > > be failing the operation... > > Going multi-user should not be stopped by any of the rc scripts > failing due to lack of /dev. But since most developers will only > test with /dev available, there is a risk that changes to rc files > will not gracefully handle a missing /dev. I would argue that a missing /dev is a fatal mutliuser boot situation for security reasons, and the boot should be stopped dead in its tracks at the earliest detection. > > > But those further references to /dev nodes will in general be > > NOPs if /dev is not available (some test for existence of the > > node they rely on, other just fail trying to access them, but > > without negative effect on going multi-user). > > > > > > Yea, that's more minor, but if /dev/ isn't there, they likely should > > fail, or shouldn't proceed... But in a way that allows the rest of the > > rc scripts to continue... > > Since the issue of no devfs mounted it not typical, tests will be > required to prevent regressions. If a failure in such a case stops > the multi-user start-up, then it will most likely be in situations > where there is no good way to provide diagnostics (e.g. no console > that works for user land programs, no known writable file system > locations, ...). > > Regards, STefan [ Attachment, skipping... ] -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Fri Sep 25 17:55:38 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7E9D43FE976; Fri, 25 Sep 2020 17:55:38 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Byfhn5jYTz4KQB; Fri, 25 Sep 2020 17:55:37 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 08PHtZ97051624; Fri, 25 Sep 2020 10:55:35 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 08PHtZOs051623; Fri, 25 Sep 2020 10:55:35 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202009251755.08PHtZOs051623@gndrsh.dnsmgr.net> Subject: Re: svn commit: r365643 - head/bin/cp In-Reply-To: To: Kyle Evans Date: Fri, 25 Sep 2020 10:55:35 -0700 (PDT) CC: Stefan Esser , Warner Losh , "Rodney W. Grimes" , Alan Somers , Mateusz Guzik , src-committers , svn-src-all , svn-src-head Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4Byfhn5jYTz4KQB X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@gndrsh.dnsmgr.net has no SPF policy when checking 69.59.192.140) smtp.mailfrom=freebsd@gndrsh.dnsmgr.net X-Spamd-Result: default: False [0.57 / 15.00]; HAS_REPLYTO(0.00)[rgrimes@freebsd.org]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_MEDIUM(-0.22)[-0.219]; NEURAL_HAM_LONG(-0.10)[-0.100]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; DMARC_NA(0.00)[dnsmgr.net]; AUTH_NA(1.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.01)[-0.011]; RCPT_COUNT_SEVEN(0.00)[9]; RCVD_TLS_LAST(0.00)[]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; FREEMAIL_CC(0.00)[freebsd.org,bsdimp.com,gmail.com]; MAILMAN_DEST(0.00)[svn-src-head,svn-src-all]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 25 Sep 2020 17:55:38 -0000 > On Thu, Sep 24, 2020 at 3:08 AM Stefan Esser wrote: > > > > Am 24.09.20 um 08:54 schrieb Warner Losh: > > > > > > > > > On Thu, Sep 24, 2020 at 12:41 AM Stefan Esser > > > wrote: > > > > > > Am 23.09.20 um 19:23 schrieb Warner Losh> But for this issue, we're not > > > mounting devfs early enough. We should > > > > fix that. Removing /dev/null from the boot process likely is > > > never going > > > > to happen because we use it all over the place to discard output... > > > > There's ~200 instances of it in the boot rc scripts, so getting > > > rid of > > > > it there would also be quite the effort, with the same question. > > > > > > Removal of /dev/null from rc.d scripts should be quite simple, > > > since most cases could just use ">-" (close file descriptor) > > > instead. Other usage could be substituted with ":>" followed > > > by chown. > > > > > > > > > So closing fd1 and fd2 doesn't cause them to be available for these > > > programs to get as an fd on open, causing other issues? > > > > > > But >- isn't documented in sh(1) as doing the close thing. On a whim I > > > did the following: > > > $ echo fred >- > > > $ ls -last ./- > > > 4 -rw-r--r-- 1 imp imp 5 Sep 24 00:50 ./- > > > $ cat ./- > > > fred > > > $ > > > which suggests maybe you now have a lot of files named - instead... > > > > Yes, sorry, please ignore what I wrote - I was thinking of ">&-" of > > course, but that is not gracefully accepted by many commands (they > > are aborted when trying to write to the closed file descriptor). > > > > I had thought about piping into a command that ignores STDIN, first, > > e.g. "| :", but that generates a SIGPIPE when trying to flush the > > FILE buffer (i.e. after 4 KB, which might be sufficient for most > > cases, but it is not a general solution). > > > > A program that reads from STDIN and generates no output could be used, > > though, e.g. "| sed d". > > > > But this would cause lots of extra forked processes and increase the > > start-up time and is not acceptable. > > > > > but e.g. rc.d/syscons > > > uses ${kbddev} (i.e. /dev/ttyv0) and rc.d/zvol performs swapon > > > on /dev/zvol/${name}, rc.d/random uses /dev/random and so on. > > > > > > So those interactions should be disaled by rc variables... Or we should > > > be failing the operation... > > > > Going multi-user should not be stopped by any of the rc scripts > > failing due to lack of /dev. But since most developers will only > > test with /dev available, there is a risk that changes to rc files > > will not gracefully handle a missing /dev. > > > > I was under the impression from previous reading and kib's response > that this is a complete non-issue, there's no way you can go > multi-user without a mounted /dev and we go to somewhat great lengths > to make sure we're good. Though kib can assert that, it does not change the fact that I frequently find /dev/null FILES on unmounted root file systems. But lets not mix the 2 separate things of boot time /dev dependency and build time /dev dependency. > > I agree with the previous goal of ripping the /dev dependency out of > the build, but this is also much, much easier said than done. > So we agree that it might be a good idea to reduce /dev dependency in the build process. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Fri Sep 25 18:12:33 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0BB443FF8B2 for ; Fri, 25 Sep 2020 18:12:33 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound5a.ore.mailhop.org (outbound5a.ore.mailhop.org [44.233.67.66]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Byg4J4Cqrz4LsC for ; Fri, 25 Sep 2020 18:12:32 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1601057545; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=fQMHsG9dbjTcD6Ao2aS3Gtufnzb28yGdrKwA8M/Keq+S8I6i+2+n24BSFgT9n+GxOdGA0xTBoWAPX RBBjcPR5ZTAsd8jd7bMA0RQt9ZWSr/Rmn1zC3I33wgPMdzif0LCrcHQ+iGJczy2bBAlKNyI7lEv4Ms rBX5VHEbhfsL23RNL8JqN2j5ydeVSRZs5lpgiJZHC1Zrl68Rg3pehjhvqp5IaFOG79RjN6ZAmTTJX6 P0fTssxFoMW+GwOf/V+eM3a+953ltdQpLcJwzmHvH1guudS5xSVcb028xs85G9jZQh592Pkp8azsMA tFLYarf9crgzsVLTaU24s3/FJaZN25Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=0O3/+KPh49dGnHLutC3pxPvBpY6WTG6FVVKASo7LslY=; b=bRY4sCuUY8h3Bqw476MGtvVihydkHaDZKbWzo3Ugf+6iA17Z7+poQtJBQQD/OijczDASsdDzxv6jA hznu9Je4dZ+rFUQbtjeeZUz7lxbqkxqAKMWb4EFh91ib21pT0lOZ0h8SGfMr4dUcYGOnCfbFmCO1TM BMbOZLXWgg0rIFdOSTf/88URkcjSve/60JJYzUeifjuP2ZXQOlN+5BqnOcaoPW2kBFgmsRwGmD6GXZ FczMXAxJzUA4Qq1PEZbyNwH8kF9op+fC1U5xULu+h8bvMv1eCYNtDZjICwVquuJlFk+SVuLOGJ4DlU mU/c86pJb02METy1ktWjeNwDDETRpsQ== ARC-Authentication-Results: i=1; outbound3.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=0O3/+KPh49dGnHLutC3pxPvBpY6WTG6FVVKASo7LslY=; b=CCPmCW6FtBGsxSYj2AQJeDi7bpsEY2W/3dKHYlAdvifluAkosQ6TddTDR+NHXIttq/A21VakEUGvv 50OIsnaXr3oF1gsh80XVVnrbqYLFODHwMfcN5jilnbl05AlovQIxXhmTgrDEniOrK8nTr3VopdvLDT 50DqmGE9esYBf88MPwYigjqhMLHJ1Q2iAHwDEj50dYqdMoN5/z5t1RM6iO2w05LBDjnAWEtjAKlTeO vvWts607rc9aoxjyra6oZgxHWDqMbVUE+gjv8tk1sFwAG/NURwbeQ9XVdSXr5cr4boWXRKC7+JZ2+f 4UDrKU8ei8XbkARHIOVzPBDcQIvXlyg== X-MHO-RoutePath: aGlwcGll X-MHO-User: a8ea602b-ff5a-11ea-8b38-614106969e8d X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (c-67-177-211-60.hsd1.co.comcast.net [67.177.211.60]) by outbound3.ore.mailhop.org (Halon) with ESMTPSA id a8ea602b-ff5a-11ea-8b38-614106969e8d; Fri, 25 Sep 2020 18:12:24 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 08PICNYj038899; Fri, 25 Sep 2020 12:12:23 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: Subject: Re: svn commit: r365643 - head/bin/cp From: Ian Lepore To: rgrimes@freebsd.org Cc: src-committers , svn-src-all , svn-src-head Date: Fri, 25 Sep 2020 12:12:23 -0600 In-Reply-To: <202009251755.08PHtZOs051623@gndrsh.dnsmgr.net> References: <202009251755.08PHtZOs051623@gndrsh.dnsmgr.net> Content-Type: text/plain; charset="ASCII" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Byg4J4Cqrz4LsC X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; ASN(0.00)[asn:16509, ipnet:44.224.0.0/11, country:US]; local_wl_from(0.00)[freebsd.org] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 25 Sep 2020 18:12:33 -0000 On Fri, 2020-09-25 at 10:55 -0700, Rodney W. Grimes wrote: > > I was under the impression from previous reading and kib's response > > that this is a complete non-issue, there's no way you can go > > multi-user without a mounted /dev and we go to somewhat great > > lengths to make sure we're good. > > Though kib can assert that, it does not change the fact that I > frequently find /dev/null FILES on unmounted root file systems. > > But lets not mix the 2 separate things of boot time /dev dependency > and build time /dev dependency. If you look in sys/kern/vfs_mountroot.c you can see that the code to mount /dev is invoked unconditionally as the first step of mounting root, and that all the calls it makes to get devfs mounted have their results checked with KASSERTs. That's pretty strong evidence that devfs is mounted before rc scripts run. That creates a situation where you are making an extraordinary claim, so you need to provide extraordinary evidence to support it. A sequence of actions that allows others to recreate the situation would do the trick. (A question that occurs to me: could it be that the files you've seen got created at shutdown after devfs was unmounted, rather than at startup? I don't know enough about the shutdown sequence to know whether that's possible.) -- Ian From owner-svn-src-head@freebsd.org Fri Sep 25 18:20:42 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 020013FFB2D; Fri, 25 Sep 2020 18:20:42 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BygFj60qnz4MCY; Fri, 25 Sep 2020 18:20:41 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B29BF1715A; Fri, 25 Sep 2020 18:20:41 +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 08PIKfqq098511; Fri, 25 Sep 2020 18:20:41 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08PIKf7o098510; Fri, 25 Sep 2020 18:20:41 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202009251820.08PIKf7o098510@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 25 Sep 2020 18:20:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366164 - head/usr.sbin/efivar X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/efivar X-SVN-Commit-Revision: 366164 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 25 Sep 2020 18:20:42 -0000 Author: imp Date: Fri Sep 25 18:20:41 2020 New Revision: 366164 URL: https://svnweb.freebsd.org/changeset/base/366164 Log: Tweak output of the loader variable When the DEVICE_PATH is <= 4 that means it's effectively empty. I have a laptop that has a BIOS that likes to generate these: 8be4df61-93ca-11d2-aa0d-00e098032b8c-Boot2001 0000: 01 00 00 00 04 00 45 00 46 00 49 00 20 00 55 00 0010: 53 00 42 00 20 00 44 00 65 00 76 00 69 00 63 00 0020: 65 00 00 00 7f ff 04 00 52 43 which now decodes as 8be4df61-93ca-11d2-aa0d-00e098032b8c-Boot2001 * EFI USB Device Empty path Option: 0000: 52 43 which matches my hand-decode. Add an extra newline after Option: to make it look nice. I suspect that these entries really should be VenHw entries instead, but my ability to change that is NIL, so cope with them as best we can. efibootmgr(8)'s output is fine and doesn't need adjusting. Modified: head/usr.sbin/efivar/efiutil.c Modified: head/usr.sbin/efivar/efiutil.c ============================================================================== --- head/usr.sbin/efivar/efiutil.c Fri Sep 25 17:14:35 2020 (r366163) +++ head/usr.sbin/efivar/efiutil.c Fri Sep 25 18:20:41 2020 (r366164) @@ -160,23 +160,27 @@ efi_print_load_option(uint8_t *data, size_t datalen, i // We got to here, everything is good printf("%c ", attr & LOAD_OPTION_ACTIVE ? '*' : ' '); ucs2_to_utf8(descr, &str); - printf("%s", str); + printf("%s\n", str); free(str); - while (dp < edp && SIZE(dp, edp) > sizeof(efidp_header)) { - efidp_format_device_path(buf, sizeof(buf), dp, SIZE(dp, edp)); - rv = efivar_device_path_to_unix_path(dp, &dev, &relpath, &abspath); - dp = (efidp)((char *)dp + efidp_size(dp)); - printf(" %s\n", buf); - if (rv == 0) { - printf(" %*s:%s\n", len + (int)strlen(dev), dev, relpath); - free(dev); - free(relpath); - free(abspath); + if (fplen <= 4) { + printf("Empty path\n"); + } else { + while (dp < edp && SIZE(dp, edp) > sizeof(efidp_header)) { + efidp_format_device_path(buf, sizeof(buf), dp, SIZE(dp, edp)); + rv = efivar_device_path_to_unix_path(dp, &dev, &relpath, &abspath); + dp = (efidp)((char *)dp + efidp_size(dp)); + printf(" %s\n", buf); + if (rv == 0) { + printf(" %*s:%s\n", len + (int)strlen(dev), dev, relpath); + free(dev); + free(relpath); + free(abspath); + } } } if (optlen == 0) return; - printf("Options: "); + printf("Option:\n"); if (Aflag) asciidump(opt, optlen); else if (bflag) From owner-svn-src-head@freebsd.org Fri Sep 25 18:20:47 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 718893FFBAB; Fri, 25 Sep 2020 18:20:47 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BygFp5sqNz4M3t; Fri, 25 Sep 2020 18:20:46 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 554E216F62; Fri, 25 Sep 2020 18:20:46 +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 08PIKkcU098565; Fri, 25 Sep 2020 18:20:46 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08PIKkOf098564; Fri, 25 Sep 2020 18:20:46 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202009251820.08PIKkOf098564@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 25 Sep 2020 18:20:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366165 - head/usr.sbin/efivar X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/efivar X-SVN-Commit-Revision: 366165 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 25 Sep 2020 18:20:48 -0000 Author: imp Date: Fri Sep 25 18:20:45 2020 New Revision: 366165 URL: https://svnweb.freebsd.org/changeset/base/366165 Log: Comment out bogus command line entry Linux implements -d to mean --print-decimal. We don't implement that and use -d for --device-path. Note that. Modified: head/usr.sbin/efivar/efivar.c Modified: head/usr.sbin/efivar/efivar.c ============================================================================== --- head/usr.sbin/efivar/efivar.c Fri Sep 25 18:20:41 2020 (r366164) +++ head/usr.sbin/efivar/efivar.c Fri Sep 25 18:20:45 2020 (r366165) @@ -59,7 +59,7 @@ static struct option longopts[] = { { "name", required_argument, NULL, 'n' }, { "no-name", no_argument, NULL, 'N' }, { "print", no_argument, NULL, 'p' }, - { "print-decimal", no_argument, NULL, 'd' }, +// { "print-decimal", no_argument, NULL, 'd' }, /* unimplemnted clash with linux version */ { "raw-guid", no_argument, NULL, 'R' }, { "utf8", no_argument, NULL, 'u' }, { "write", no_argument, NULL, 'w' }, From owner-svn-src-head@freebsd.org Fri Sep 25 18:55:50 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D1AC23E0B0B; Fri, 25 Sep 2020 18:55:50 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Byh2G59qTz4PHP; Fri, 25 Sep 2020 18:55:50 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9433017B98; Fri, 25 Sep 2020 18:55:50 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08PItovD022313; Fri, 25 Sep 2020 18:55:50 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08PItop2022312; Fri, 25 Sep 2020 18:55:50 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202009251855.08PItop2022312@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 25 Sep 2020 18:55:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366167 - head/sys/netgraph X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/netgraph X-SVN-Commit-Revision: 366167 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 25 Sep 2020 18:55:50 -0000 Author: markj Date: Fri Sep 25 18:55:50 2020 New Revision: 366167 URL: https://svnweb.freebsd.org/changeset/base/366167 Log: ng_l2tp: Fix callout synchronization in the rexmit timeout handler A received control packet may cause the transmit queue to be flushed, in which case ng_l2tp_seq_recv_nr() cancels the transmit timeout handler. The handler checks to see if it was cancelled before doing anything, but did so before acquiring the node lock, so a small race window could cause ng_l2tp_seq_rack_timeout() to attempt to flush an empty queue, ultimately causing a null pointer dereference. PR: 241133 Reviewed by: bz, glebius, Lutz Donnerhacke MFC after: 3 days Sponsored by: Rubicon Communications, LLC (Netgate) Differential Revision: https://reviews.freebsd.org/D26548 Modified: head/sys/netgraph/ng_l2tp.c Modified: head/sys/netgraph/ng_l2tp.c ============================================================================== --- head/sys/netgraph/ng_l2tp.c Fri Sep 25 18:21:50 2020 (r366166) +++ head/sys/netgraph/ng_l2tp.c Fri Sep 25 18:55:50 2020 (r366167) @@ -1453,15 +1453,17 @@ ng_l2tp_seq_rack_timeout(node_p node, hook_p hook, voi struct mbuf *m; u_int delay; - /* Make sure callout is still active before doing anything */ - if (callout_pending(&seq->rack_timer) || - (!callout_active(&seq->rack_timer))) - return; - /* Sanity check */ L2TP_SEQ_CHECK(seq); mtx_lock(&seq->mtx); + /* Make sure callout is still active before doing anything */ + if (callout_pending(&seq->rack_timer) || + !callout_active(&seq->rack_timer)) { + mtx_unlock(&seq->mtx); + return; + } + priv->stats.xmitRetransmits++; /* Have we reached the retransmit limit? If so, notify owner. */ From owner-svn-src-head@freebsd.org Fri Sep 25 19:02:50 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 848293E0D5C; Fri, 25 Sep 2020 19:02:50 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ByhBL31Y6z4Pxr; Fri, 25 Sep 2020 19:02:50 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4B35417E1E; Fri, 25 Sep 2020 19:02:50 +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 08PJ2oxU029118; Fri, 25 Sep 2020 19:02:50 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08PJ2oBE029117; Fri, 25 Sep 2020 19:02:50 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202009251902.08PJ2oBE029117@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 25 Sep 2020 19:02:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366168 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 366168 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 25 Sep 2020 19:02:50 -0000 Author: imp Date: Fri Sep 25 19:02:49 2020 New Revision: 366168 URL: https://svnweb.freebsd.org/changeset/base/366168 Log: Dont let kernel and standalone both be defined at the same time _KERNEL and _STANDALONE are different things. They cannot both be true at the same time. If things that are normally visible only to _KERNEL are needed for the _STANDALONE environment, you need to also make them visible to _STANDALONE. Often times, this will be just a subset of the required things for _KERNEL (eg global variables are but one example). sys/cdefs.h is included by pretty much everything in both the loader and the kernel, so is the ideal choke point. Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Fri Sep 25 18:55:50 2020 (r366167) +++ head/sys/sys/cdefs.h Fri Sep 25 19:02:49 2020 (r366168) @@ -38,6 +38,10 @@ #ifndef _SYS_CDEFS_H_ #define _SYS_CDEFS_H_ +#if defined(_KERNEL) && defined(_STANDALONE) +#error "_KERNEL and _STANDALONE are mutually exclusive" +#endif + /* * Testing against Clang-specific extensions. */ From owner-svn-src-head@freebsd.org Fri Sep 25 19:04:04 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 543033E0F84; Fri, 25 Sep 2020 19:04:04 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ByhCm1Y01z4QWG; Fri, 25 Sep 2020 19:04:04 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 185BB17DA2; Fri, 25 Sep 2020 19:04:04 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08PJ432H029219; Fri, 25 Sep 2020 19:04:03 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08PJ431b029218; Fri, 25 Sep 2020 19:04:03 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <202009251904.08PJ431b029218@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 25 Sep 2020 19:04:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366169 - head/sys/mips/include X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/mips/include X-SVN-Commit-Revision: 366169 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 25 Sep 2020 19:04:04 -0000 Author: jhibbits Date: Fri Sep 25 19:04:03 2020 New Revision: 366169 URL: https://svnweb.freebsd.org/changeset/base/366169 Log: mips: Fix compat32 library builds from r366162 Re-add the a_ptr and a_fcn fields to Elf32_Auxinfo. MFC after: 1 week Sponsored by: Juniper Networks, Inc. Modified: head/sys/mips/include/elf.h Modified: head/sys/mips/include/elf.h ============================================================================== --- head/sys/mips/include/elf.h Fri Sep 25 19:02:49 2020 (r366168) +++ head/sys/mips/include/elf.h Fri Sep 25 19:04:03 2020 (r366169) @@ -105,6 +105,10 @@ typedef struct { /* Auxiliary vector entry on initial int a_type; /* Entry type. */ union { int a_val; /* Integer value. */ +#ifndef __mips_n64 + void *a_ptr; /* Address. */ + void (*a_fcn)(void); /* Function pointer (not used). */ +#endif } a_un; } Elf32_Auxinfo; From owner-svn-src-head@freebsd.org Fri Sep 25 19:48:17 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 645063E292E; Fri, 25 Sep 2020 19:48:17 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ByjBm4Pr8z4VDZ; Fri, 25 Sep 2020 19:48:16 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-wm1-x32f.google.com with SMTP id e11so78153wme.0; Fri, 25 Sep 2020 12:48:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:content-transfer-encoding:from:mime-version:subject:date :message-id:references:cc:in-reply-to:to; bh=cTWWa1UoaQVRKm33Rua9R46vKDf64OLQCyn8+nxFoFM=; b=pJppF8SdeB0+D+MDXXaex2rom4TExhRaEIn4ZvFhOouX6Q+QWqWhApMc5174NLHohZ JU4r/XQTcN/RzA+gAsTaqbP8gHsw7zs7TaBmZXbz83aWZXOjmFxx7Ohk7KjzVqApx4rb 3jbEMk4uHYYxXJbaru2F1WgiFFdxrnkpYtRLIIitj8k7JUzbolDgUhjgqrbVdWgN6Zy3 6xxej5WPfepfYk9QN0NRDLph9D/aiedBKc78OjMtUwu0/Fu51JB2xY6jeGV6YXItwD68 oXBpUnqRPPRa7fA/MqDkft2hsqATdsKSny7vqb41xtlaPMqZOd50aE/Nj5D/Zb6cSI16 65Ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:content-transfer-encoding:from :mime-version:subject:date:message-id:references:cc:in-reply-to:to; bh=cTWWa1UoaQVRKm33Rua9R46vKDf64OLQCyn8+nxFoFM=; b=belUte8arZ8m8xCwjk2IHgmDC/Z5/zI9+mv8mFyLYGndgrXdVXS7k0CYYsHLD6qzGy dyqGQNWoUqdgWa/k5qLI3CIGqiKTX0DU2dSczHEE4sftRFc36zbTQvrGaHxnfRAaeX0Y 1gb3kCDP79KWkGrQCwvNDRiS6TLuIPXX2q8mA8fviXjNGk16yWUrzWGI6c7CQb2GMvJZ z6sWTYBdY4BmYI7ORz+J3W2LPK3JRT8nltczfkIuqnyJrZt22XQQn9SOWIAwJtwk37Wi Z7EcA2aE3SFEwtOb4TnT3Z48O1LSHL1yGLaLPfi6gNQ1ylOFEtLiMDJHO+BUkGJaPGRp VuwQ== X-Gm-Message-State: AOAM533+XO+ndXoCthmRbkMLJebVjgX2vOCJHrgi2MD6Zsw9GA++7THT 7vhO2uOrLPtLoITgJwg0ixZiRadk3CvwVw== X-Google-Smtp-Source: ABdhPJzQaxhtPq1sIr4p8uGlutdhVL9fTEV81q1q/73TjvNWVVI7Xf8vthaN0JHtEai36pPm4DvR8A== X-Received: by 2002:a7b:ce8d:: with SMTP id q13mr153566wmj.119.1601063294583; Fri, 25 Sep 2020 12:48:14 -0700 (PDT) Received: from localhost.localdomain (cpc149474-cmbg20-2-0-cust954.5-4.cable.virginm.net. [82.4.199.187]) by smtp.gmail.com with ESMTPSA id g14sm3880231wrv.25.2020.09.25.12.48.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 25 Sep 2020 12:48:13 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: =?utf-8?Q?Edward_Tomasz_Napiera=C5=82a?= Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r365643 - head/bin/cp Date: Fri, 25 Sep 2020 20:48:08 +0100 Message-Id: <7CEB4168-005D-4C1B-9988-662BA1883EC0@freebsd.org> References: Cc: rgrimes@freebsd.org, src-committers , svn-src-all , svn-src-head In-Reply-To: To: Ian Lepore X-Mailer: iPhone Mail (18A373) X-Rspamd-Queue-Id: 4ByjBm4Pr8z4VDZ X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=pJppF8Sd; dmarc=none; spf=pass (mx1.freebsd.org: domain of etnapierala@gmail.com designates 2a00:1450:4864:20::32f as permitted sender) smtp.mailfrom=etnapierala@gmail.com X-Spamd-Result: default: False [-2.24 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; MV_CASE(0.50)[]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; NEURAL_HAM_SHORT(-0.66)[-0.661]; FORGED_SENDER(0.30)[trasz@freebsd.org,etnapierala@gmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[82.4.199.187:received]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[trasz@freebsd.org,etnapierala@gmail.com]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.93)[-0.934]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.94)[-0.942]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::32f:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 25 Sep 2020 19:48:17 -0000 > On 25 Sep 2020, at 19:12, Ian Lepore wrote: [..] > (A question that occurs to me: could it be that the files you've seen > got created at shutdown after devfs was unmounted, rather than at > startup? I don't know enough about the shutdown sequence to know > whether that's possible.) Thing is, if you unmount /dev, you are revoking all the device nodes, including your ttys and disk device nodes. You wouldn= =E2=80=99t be able to properly shutdown afterwards. From owner-svn-src-head@freebsd.org Fri Sep 25 20:27:37 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 98CFA3E37DF; Fri, 25 Sep 2020 20:27:37 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Byk493T1Xz4Xgm; Fri, 25 Sep 2020 20:27:37 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5A8E31901E; Fri, 25 Sep 2020 20:27:37 +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 08PKRb2a079301; Fri, 25 Sep 2020 20:27:37 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08PKRbUY079300; Fri, 25 Sep 2020 20:27:37 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <202009252027.08PKRbUY079300@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 25 Sep 2020 20:27:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366171 - head/sys/mips/mips X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/mips/mips X-SVN-Commit-Revision: 366171 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 25 Sep 2020 20:27:37 -0000 Author: jhibbits Date: Fri Sep 25 20:27:36 2020 New Revision: 366171 URL: https://svnweb.freebsd.org/changeset/base/366171 Log: Fix mips64 build Original patch was against FreeBSD 12, and a test compile wasn't run against head. md_tls_tcb_offset field was moved from mdthread to mdproc in the meantime. MFC after: 1 week Sponsored by: Juniper Networks, Inc. Modified: head/sys/mips/mips/freebsd32_machdep.c Modified: head/sys/mips/mips/freebsd32_machdep.c ============================================================================== --- head/sys/mips/mips/freebsd32_machdep.c Fri Sep 25 19:11:21 2020 (r366170) +++ head/sys/mips/mips/freebsd32_machdep.c Fri Sep 25 20:27:36 2020 (r366171) @@ -465,7 +465,7 @@ freebsd32_sysarch(struct thread *td, struct freebsd32_ */ if (cpuinfo.userlocal_reg == true) { mips_wr_userlocal((unsigned long)(uap->parms + - td->td_md.md_tls_tcb_offset)); + td->td_proc->p_md.md_tls_tcb_offset)); } return (0); case MIPS_GET_TLS: From owner-svn-src-head@freebsd.org Fri Sep 25 20:51:08 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3920C3E4AA5; Fri, 25 Sep 2020 20:51:08 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BykbJ0qFzz4ZJY; Fri, 25 Sep 2020 20:51:08 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 00DD01929D; Fri, 25 Sep 2020 20:51:08 +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 08PKp7So092925; Fri, 25 Sep 2020 20:51:07 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08PKp7ji092924; Fri, 25 Sep 2020 20:51:07 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202009252051.08PKp7ji092924@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 25 Sep 2020 20:51:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366173 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 366173 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 25 Sep 2020 20:51:08 -0000 Author: imp Date: Fri Sep 25 20:51:07 2020 New Revision: 366173 URL: https://svnweb.freebsd.org/changeset/base/366173 Log: Adjustments to includes for openzfs in _STANDALONE Allow the necessary parts of systm.h to be visible in the _STANDALONE environnment. Limit the reset to only being visible for _KERNEL builds. Map KASSERT, etc to printf on failure in the bootloader until we have more confidence things won't break and leave systems unbootable. Eventually, this should map to a full panic in the bootloader, but that also needs some enhancement to be more useful. Reviewed by: tsoome, jhb Differential Revision: https://reviews.freebsd.org/D26543 Modified: head/sys/sys/systm.h Modified: head/sys/sys/systm.h ============================================================================== --- head/sys/sys/systm.h Fri Sep 25 20:39:20 2020 (r366172) +++ head/sys/sys/systm.h Fri Sep 25 20:51:07 2020 (r366173) @@ -49,6 +49,7 @@ __NULLABILITY_PRAGMA_PUSH +#ifdef _KERNEL extern int cold; /* nonzero if we are doing a cold boot */ extern int suspend_blocked; /* block suspend due to pending shutdown */ extern int rebooting; /* kern_reboot() has been called. */ @@ -83,28 +84,7 @@ enum VM_GUEST { VM_GUEST_NO = 0, VM_GUEST_VM, VM_GUEST VM_GUEST_VMWARE, VM_GUEST_KVM, VM_GUEST_BHYVE, VM_GUEST_VBOX, VM_GUEST_PARALLELS, VM_LAST }; -/* - * These functions need to be declared before the KASSERT macro is invoked in - * !KASSERT_PANIC_OPTIONAL builds, so their declarations are sort of out of - * place compared to other function definitions in this header. On the other - * hand, this header is a bit disorganized anyway. - */ -void panic(const char *, ...) __dead2 __printflike(1, 2); -void vpanic(const char *, __va_list) __dead2 __printflike(1, 0); - -#if defined(WITNESS) || defined(INVARIANT_SUPPORT) -#ifdef KASSERT_PANIC_OPTIONAL -void kassert_panic(const char *fmt, ...) __printflike(1, 2); -#else -#define kassert_panic panic -#endif -#endif - #ifdef INVARIANTS /* The option is always available */ -#define KASSERT(exp,msg) do { \ - if (__predict_false(!(exp))) \ - kassert_panic msg; \ -} while (0) #define VNASSERT(exp, vp, msg) do { \ if (__predict_false(!(exp))) { \ vn_printf(vp, "VNASSERT failed: %s not true at %s:%d (%s)\n",\ @@ -121,9 +101,6 @@ void kassert_panic(const char *fmt, ...) __printflike panic("executing segment marked as unreachable at %s:%d (%s)\n", \ __FILE__, __LINE__, __func__) #else -#define KASSERT(exp,msg) do { \ -} while (0) - #define VNASSERT(exp, vp, msg) do { \ } while (0) #define VNPASS(exp, vp) do { \ @@ -134,14 +111,49 @@ void kassert_panic(const char *fmt, ...) __printflike #ifndef CTASSERT /* Allow lint to override */ #define CTASSERT(x) _Static_assert(x, "compile-time assertion failed") #endif +#endif /* KERNEL */ -#if defined(_KERNEL) -#include /* MAXCPU */ -#include /* curthread */ -#include -#endif +/* + * These functions need to be declared before the KASSERT macro is invoked in + * !KASSERT_PANIC_OPTIONAL builds, so their declarations are sort of out of + * place compared to other function definitions in this header. On the other + * hand, this header is a bit disorganized anyway. + */ +void panic(const char *, ...) __dead2 __printflike(1, 2); +void vpanic(const char *, __va_list) __dead2 __printflike(1, 0); + +#if defined(_STANDALONE) /* + * Until we have more experience with KASSERTS that are called + * from the boot loader, they are off. The bootloader does this + * a little differently than the kernel (we just call printf atm). + * we avoid most of the common functions in the boot loader, so + * declare printf() here too. + */ +int printf(const char *, ...) __printflike(1, 2); +# define kassert_panic printf +#else /* !_STANDALONE */ +# if defined(WITNESS) || defined(INVARIANT_SUPPORT) +# ifdef KASSERT_PANIC_OPTIONAL +void kassert_panic(const char *fmt, ...) __printflike(1, 2); +# else +# define kassert_panic panic +# endif /* KASSERT_PANIC_OPTIONAL */ +# endif /* defined(WITNESS) || defined(INVARIANT_SUPPORT) */ +#endif /* _STANDALONE */ + +#if defined(INVARIANTS) || defined(_STANDALONE) +#define KASSERT(exp,msg) do { \ + if (__predict_false(!(exp))) \ + kassert_panic msg; \ +} while (0) +#else /* !INVARIANTS && !_STANDALONE */ +#define KASSERT(exp,msg) do { \ +} while (0) +#endif /* INVARIANTS || _STANDALONE */ + +/* * Helpful macros for quickly coming up with assertions with informative * panic messages. */ @@ -152,6 +164,18 @@ void kassert_panic(const char *fmt, ...) __printflike KASSERT((ex), ("Assertion %s failed at %s:%d", what, file, line)) /* + * Align variables. + */ +#define __read_mostly __section(".data.read_mostly") +#define __read_frequently __section(".data.read_frequently") +#define __exclusive_cache_line __aligned(CACHE_LINE_SIZE) \ + __section(".data.exclusive_cache_line") +#ifdef _KERNEL +#include /* MAXCPU */ +#include /* curthread */ +#include + +/* * Assert that a pointer can be loaded from memory atomically. * * This assertion enforces stronger alignment than necessary. For example, @@ -181,13 +205,6 @@ void kassert_panic(const char *fmt, ...) __printflike #define SCHEDULER_STOPPED() SCHEDULER_STOPPED_TD(curthread) /* - * Align variables. - */ -#define __read_mostly __section(".data.read_mostly") -#define __read_frequently __section(".data.read_frequently") -#define __exclusive_cache_line __aligned(CACHE_LINE_SIZE) \ - __section(".data.exclusive_cache_line") -/* * XXX the hints declarations are even more misplaced than most declarations * in this file, since they are needed in one file (per arch) and only used * in two files. @@ -626,6 +643,7 @@ void _gone_in_dev(struct device *dev, int major, const #endif #define gone_in(major, msg) __gone_ok(major, msg) _gone_in(major, msg) #define gone_in_dev(dev, major, msg) __gone_ok(major, msg) _gone_in_dev(dev, major, msg) +#endif /* _KERNEL */ __NULLABILITY_PRAGMA_POP From owner-svn-src-head@freebsd.org Fri Sep 25 21:19:57 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 322E43E54C8; Fri, 25 Sep 2020 21:19:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BylDY0Yj1z4bv9; Fri, 25 Sep 2020 21:19: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EAAD8194EC; Fri, 25 Sep 2020 21:19:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08PLJujU010573; Fri, 25 Sep 2020 21:19:56 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08PLJujm010572; Fri, 25 Sep 2020 21:19:56 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202009252119.08PLJujm010572@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 25 Sep 2020 21:19:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366175 - head/sys/cam/scsi X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/cam/scsi X-SVN-Commit-Revision: 366175 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 25 Sep 2020 21:19:57 -0000 Author: jhb Date: Fri Sep 25 21:19:56 2020 New Revision: 366175 URL: https://svnweb.freebsd.org/changeset/base/366175 Log: Revert most of r360179. I had failed to notice that sgsendccb() was using cam_periph_mapmem() and thus was not passing down user pointers directly to drivers. In practice this broke requests submitted from userland. PR: 249395 Reported by: Trenton Schulz Reviewed by: scottl MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D26550 Modified: head/sys/cam/scsi/scsi_sg.c Modified: head/sys/cam/scsi/scsi_sg.c ============================================================================== --- head/sys/cam/scsi/scsi_sg.c Fri Sep 25 21:18:43 2020 (r366174) +++ head/sys/cam/scsi/scsi_sg.c Fri Sep 25 21:19:56 2020 (r366175) @@ -507,7 +507,6 @@ sgioctl(struct cdev *dev, u_long cmd, caddr_t arg, int struct cam_periph *periph; struct sg_softc *softc; struct sg_io_hdr *req; - void *data_ptr; int dir, error; periph = (struct cam_periph *)dev->si_drv1; @@ -552,20 +551,12 @@ sgioctl(struct cdev *dev, u_long cmd, caddr_t arg, int break; } - if (req->dxfer_len > MAXPHYS) { - error = EINVAL; - break; - } - - data_ptr = malloc(req->dxfer_len, M_DEVBUF, M_WAITOK); - ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL); csio = &ccb->csio; error = copyin(req->cmdp, &csio->cdb_io.cdb_bytes, req->cmd_len); if (error) { - free(data_ptr, M_DEVBUF); xpt_release_ccb(ccb); break; } @@ -586,21 +577,12 @@ sgioctl(struct cdev *dev, u_long cmd, caddr_t arg, int break; } - if (dir == CAM_DIR_IN || dir == CAM_DIR_BOTH) { - error = copyin(req->dxferp, data_ptr, req->dxfer_len); - if (error) { - free(data_ptr, M_DEVBUF); - xpt_release_ccb(ccb); - break; - } - } - cam_fill_csio(csio, /*retries*/1, /*cbfcnp*/NULL, dir|CAM_DEV_QFRZDIS, MSG_SIMPLE_Q_TAG, - data_ptr, + req->dxferp, req->dxfer_len, req->mx_sb_len, req->cmd_len, @@ -610,7 +592,6 @@ sgioctl(struct cdev *dev, u_long cmd, caddr_t arg, int if (error) { req->host_status = DID_ERROR; req->driver_status = DRIVER_INVALID; - free(data_ptr, M_DEVBUF); xpt_release_ccb(ccb); break; } @@ -629,10 +610,6 @@ sgioctl(struct cdev *dev, u_long cmd, caddr_t arg, int req->sb_len_wr); } - if ((dir == CAM_DIR_OUT || dir == CAM_DIR_BOTH) && error == 0) - error = copyout(data_ptr, req->dxferp, req->dxfer_len); - - free(data_ptr, M_DEVBUF); xpt_release_ccb(ccb); break; From owner-svn-src-head@freebsd.org Fri Sep 25 21:47:33 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7DD253E65AF for ; Fri, 25 Sep 2020 21:47:33 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2k.ore.mailhop.org (outbound2k.ore.mailhop.org [54.148.219.64]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BylrP0GCQz4dTR for ; Fri, 25 Sep 2020 21:47:32 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1601070451; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=kwBbxN5L5BrIBc76agzJILeKXeKWGVjXNJSe7hOU8uEcZy5qGSsb9/JCmweYEWfIosgIXbhuOcN2+ eAlXJ9V8I2z0BBxy4yF/PTSo1j1PHoXRimJ8a7KNxZXHKqNO2nJ3iuzYt5BMNeccI4zwHLPGKdOn5q AKfEweV3vbIxZu/kKNNfJK7rvVcB2uNrH20kH1egE15KAeJFUKxu4p3vpZ6AawwCsNTe3eB4/hwgBU wirvsO41OiCoBKK0luVWjhAE6mwa4AvfrT74NHpatGk5cBPcKL9AJaA4to+n4IzzbvQCQ1uMwvHENo kHEow/mEmbdUD49bpG9VR/NXUA6NpwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=vgOX1v5VTUIKUNfmhcl1BCBkzxcNT2wh0x9Lp9S0Mf8=; b=Z19qX+4cZLRioqaE7Ly8f3mjWlwvFMFpspUtDShllPJcAmA5cYn7fZ2+LWZTNhBLZHpotUKfoAN18 Z73qwrb7xEh5xEQDoss9E5+FhQ3U8+fSSyRIFd9acGE0L//ZvNSHmbhEhIlkVa9zhAEy6Xt4chEV8q 3jvsK2SpwW0rgIkc7YVwyyBVFJOgZliiwPY6r0C6Y6DUHdxniHpdYeGQg9bmZNA0sVi6OJ0mm5WNnT x45PknjZXySNgmsLTHp51iP45Ug1P6pSmanlmUTjsoe0DaS5kV5cvPlkjlrQN1Pam2fvJTq/ZBXxDY MAkaJheTsgBcUi3hhgLGa+uxlHZL1MQ== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=vgOX1v5VTUIKUNfmhcl1BCBkzxcNT2wh0x9Lp9S0Mf8=; b=Hm09uS6wTwcB1iZzw8FjyH/yD1mZCg/lGl/4uph/1NQn+ozBw2EF+MJRZXAOBnxIMGUgODxA9LA8L pR9EKR/GAMzBAirz0OnrNoqQhRb4bJnMe0Jp9eh5AWw0gZtNbt1C3Qews0/+1ZKLuCNFiUQREubH8B ZsS0/IW4ev5e5OLDjBD/SKm+rlG0MLyolqY2d31QxJ3NOrKHyZjQwa3fDhVjaCOHo9soroa6Mh0OjX ipBAxdBwnxXiGvfwYYAVIWDG0NyhHQ1f8ezj4iY+s45zAtI96Cu3BQyUo54dTHPhuoiXJGKO9BzkEO Yks3eT2pguONRLdayfJ97XPhTzjK3oA== X-MHO-RoutePath: aGlwcGll X-MHO-User: b57c6409-ff78-11ea-9e11-df46ed8f892f X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (c-67-177-211-60.hsd1.co.comcast.net [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id b57c6409-ff78-11ea-9e11-df46ed8f892f; Fri, 25 Sep 2020 21:47:30 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 08PLlTiX039489; Fri, 25 Sep 2020 15:47:29 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <4e8b729665b9af8092c36bbf77f4de208d781fbb.camel@freebsd.org> Subject: Re: svn commit: r365643 - head/bin/cp From: Ian Lepore To: Edward Tomasz =?iso-8859-2?Q?Napiera=B3a?= Cc: rgrimes@freebsd.org, src-committers , svn-src-all , svn-src-head Date: Fri, 25 Sep 2020 15:47:29 -0600 In-Reply-To: <7CEB4168-005D-4C1B-9988-662BA1883EC0@freebsd.org> References: <7CEB4168-005D-4C1B-9988-662BA1883EC0@freebsd.org> Content-Type: text/plain; charset="iso-8859-13" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4BylrP0GCQz4dTR X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; ASN(0.00)[asn:16509, ipnet:54.148.0.0/15, country:US]; local_wl_from(0.00)[freebsd.org] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 25 Sep 2020 21:47:33 -0000 On Fri, 2020-09-25 at 20:48 +0100, Edward Tomasz Napieraùa wrote: > > On 25 Sep 2020, at 19:12, Ian Lepore wrote: > > [..] > > > (A question that occurs to me: could it be that the files you've > > seen > > got created at shutdown after devfs was unmounted, rather than at > > startup? I don't know enough about the shutdown sequence to know > > whether that's possible.) > > Thing is, if you unmount /dev, you are revoking > all the device nodes, including your ttys and disk device nodes. You > wouldnÿt be able to properly shutdown afterwards. > > I was thinking more of something in the shutdown rc scripts or an errant daemon process unmounting /dev. But it sounds like that's not possible while disks are still mounted. -- Ian From owner-svn-src-head@freebsd.org Fri Sep 25 22:20:43 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 67FC43E6A61; Fri, 25 Sep 2020 22:20:43 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BymZg0K73z4fb2; Fri, 25 Sep 2020 22:20:42 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm1-x342.google.com with SMTP id e11so291085wme.0; Fri, 25 Sep 2020 15:20:42 -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:content-transfer-encoding; bh=dJLXclyySzlKoGwpEA5XwkNoBtaRgx/CwnR2Pau91ao=; b=DdoYs0OU6yVImV2XKxaLaVnswXxNfhH2yWX71Qo1TV8yjfjWc6WZxsj0CXEypfcqKc a1Jqu/3nrGv3iT7Edp8haEUXDPIVnjP1inwp20vxe5sTsaDpFGWzOIlHwrZOhqEvGg3U iwZIDpM04Daqwm8Nu1YAdtRlhjx6IvpgHFzJMa6ETl38tOYfgOI47roA84433WruFMlm tYZCYdWiNkcUsPotTSH5Hh/GLOT/0ZkcuhUCZWAylbgZH7f3H9mD6CHcsVGjfFUQ1/E8 Q9vPZKEXmMtENOIYtB/wFC5H6RepH4zA/c/QRbEEsJgLT+czHKamMgqz+FxNjjP1lbt9 I5gg== 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:content-transfer-encoding; bh=dJLXclyySzlKoGwpEA5XwkNoBtaRgx/CwnR2Pau91ao=; b=Zbmy5Onm1lQfsOpMv90lfypZJUkvBFGATnbsTQUSmR6e+Irn8P4qBEok+e1/qXkUnj +u3fQUjHP0/ghGpD+wQo9KzXlPS7b5gSc2X3j0PEkfDYjEPWDIQ5ZK/60YB9qdeZLhQ2 rzTuG0A1C1xVYT/rQkPuwau0fgGjncjJlegSRopioW56BJCYbsIn2E+oJ7TprxZh6UBO iWEP1tLkSRRB7wfmpERQ+W3VQJlyx4KDUMgBbcOeOCdNBwgjg1iSO13OOo5kC60CVaW6 mEAN4bJTQQBnq4WEYoHmnajkj71dN3v9i6u93CLghnPYoWIL6KwxpMU71FA+A81lHq/H Pgzg== X-Gm-Message-State: AOAM533KFzXSYOU/YtlEnHsZBoGE5EE65X1H23yLCuEWunoQnegtWYmj z7vRpm3cLcjIQKYRCaYJbAoQ72qAcSB999Tj2ytGnpNMNYk= X-Google-Smtp-Source: ABdhPJzF1kXkGLaMtFQisrN+cNXqNyv4/TkvE2Gi1BkW7RcIFwxmZk+b4DfFg+aagcbrLYVwFJ0Wzcu01fpK3rpUPR0= X-Received: by 2002:a1c:2905:: with SMTP id p5mr656305wmp.187.1601072440959; Fri, 25 Sep 2020 15:20:40 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:6000:187:0:0:0:0 with HTTP; Fri, 25 Sep 2020 15:20:39 -0700 (PDT) In-Reply-To: <4e8b729665b9af8092c36bbf77f4de208d781fbb.camel@freebsd.org> References: <7CEB4168-005D-4C1B-9988-662BA1883EC0@freebsd.org> <4e8b729665b9af8092c36bbf77f4de208d781fbb.camel@freebsd.org> From: Mateusz Guzik Date: Sat, 26 Sep 2020 00:20:39 +0200 Message-ID: Subject: Re: svn commit: r365643 - head/bin/cp To: Ian Lepore Cc: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= , rgrimes@freebsd.org, src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4BymZg0K73z4fb2 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 25 Sep 2020 22:20:43 -0000 Perhaps this is a leftover from the installer (or some version of it anyway), i.e. this might have been happening in the past but likely does not now. fwiw I just exported / over nfs in a vm, /dev is empty On 9/25/20, Ian Lepore wrote: > On Fri, 2020-09-25 at 20:48 +0100, Edward Tomasz Napiera=C5=82a wrote: >> > On 25 Sep 2020, at 19:12, Ian Lepore wrote: >> >> [..] >> >> > (A question that occurs to me: could it be that the files you've >> > seen >> > got created at shutdown after devfs was unmounted, rather than at >> > startup? I don't know enough about the shutdown sequence to know >> > whether that's possible.) >> >> Thing is, if you unmount /dev, you are revoking >> all the device nodes, including your ttys and disk device nodes. You >> wouldn=E2=80=99t be able to properly shutdown afterwards. >> >> > > I was thinking more of something in the shutdown rc scripts or an > errant daemon process unmounting /dev. But it sounds like that's not > possible while disks are still mounted. > > -- Ian > > --=20 Mateusz Guzik From owner-svn-src-head@freebsd.org Fri Sep 25 23:02:02 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 649AA3E7719; Fri, 25 Sep 2020 23:02:02 +0000 (UTC) (envelope-from arichardson.kde@gmail.com) Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BynVL0hrPz3Sgm; Fri, 25 Sep 2020 23:02:01 +0000 (UTC) (envelope-from arichardson.kde@gmail.com) Received: by mail-ed1-f46.google.com with SMTP id ay8so4132784edb.8; Fri, 25 Sep 2020 16:02:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8N7fhfSTq0xtvSzupEEY3wcPdUUDTfuEr+UtJt+al4w=; b=ZjYAT2Mr/jcQst+yaRNH2HX58VZzXAmBi6qSySALuapwhQBYigzjOvr5b/PWAFsSUA H3lQhiqgCk7FQsiwr6Fb5K6jdSgYJtbmqD6bRdGMH4uurzIUaBKQbmc7U5BSaIitQAfI 472uSa7mxW5dMHeKQixispflsafwKg9BjcKoxiLEw25K2s2GemFmSwRgrznhkrOJyI/R AaqQ8IibCuDpeSDF2m5k1fsXpS8DeuxecOWMSKE8g2WiNVjpiLsrJ9rTPr2EoR3fGVua liRJ1JqGcxP4lrF5hwitPnf83SKl+EcyTD+anv9rMbjieUTJlLGVdBUpx9PqFSz7R6mK 6FwA== X-Gm-Message-State: AOAM531ct1yvOGZSAuPYvyBByj+xHyr+j9Aegjg/t+kNjm7Ksp9Cyjoh 5OMLZgpKkv3k2rfoAGsGqqI2KPjndHV1eg== X-Google-Smtp-Source: ABdhPJwzb2VocfYWSlQUIJyJCOjLNnuq6h+k/lqwk1Yy0mrW69pzvi4wgYO+xGxzOk5wB3c2zoxpOA== X-Received: by 2002:a50:fc91:: with SMTP id f17mr3995631edq.319.1601074920555; Fri, 25 Sep 2020 16:02:00 -0700 (PDT) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com. [209.85.221.42]) by smtp.gmail.com with ESMTPSA id b5sm2834000edq.69.2020.09.25.16.02.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 25 Sep 2020 16:02:00 -0700 (PDT) Received: by mail-wr1-f42.google.com with SMTP id e16so5680723wrm.2; Fri, 25 Sep 2020 16:02:00 -0700 (PDT) X-Received: by 2002:a5d:6886:: with SMTP id h6mr6983279wru.374.1601074919985; Fri, 25 Sep 2020 16:01:59 -0700 (PDT) MIME-Version: 1.0 References: <202009251904.08PJ431b029218@repo.freebsd.org> In-Reply-To: <202009251904.08PJ431b029218@repo.freebsd.org> From: Alexander Richardson Date: Sat, 26 Sep 2020 00:01:48 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r366169 - head/sys/mips/include To: Justin Hibbits Cc: src-committers , svn-src-all , svn-src-head@freebsd.org X-Rspamd-Queue-Id: 4BynVL0hrPz3Sgm X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 25 Sep 2020 23:02:02 -0000 On Fri, 25 Sep 2020, 20:04 Justin Hibbits, wrote: > Author: jhibbits > Date: Fri Sep 25 19:04:03 2020 > New Revision: 366169 > URL: https://svnweb.freebsd.org/changeset/base/366169 > > Log: > mips: Fix compat32 library builds from r366162 > > Re-add the a_ptr and a_fcn fields to Elf32_Auxinfo. > > MFC after: 1 week > Sponsored by: Juniper Networks, Inc. > > Modified: > head/sys/mips/include/elf.h > > Modified: head/sys/mips/include/elf.h > > ============================================================================== > --- head/sys/mips/include/elf.h Fri Sep 25 19:02:49 2020 (r366168) > +++ head/sys/mips/include/elf.h Fri Sep 25 19:04:03 2020 (r366169) > @@ -105,6 +105,10 @@ typedef struct { /* Auxiliary vector entry on > initial > int a_type; /* Entry type. */ > union { > int a_val; /* Integer value. */ > +#ifndef __mips_n64 > + void *a_ptr; /* Address. */ > + void (*a_fcn)(void); /* Function pointer (not used). */ > +#endif > } a_un; > } Elf32_Auxinfo; Not sure what the current minimal compiler versions are, but maybe this should be #if __SIZEOF_POINTER__ == 4 instead of checking the ABI? This would break CHERI-MIPS kernels since we don't define __mips_n64 for the pure-capability ABI (128-bit pointers). However, we don't really do compat 32 right now so it probably doesn't matter much. Alex From owner-svn-src-head@freebsd.org Fri Sep 25 23:05:39 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 342C43E795E for ; Fri, 25 Sep 2020 23:05:39 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BynZV2Y7cz3TLX for ; Fri, 25 Sep 2020 23:05:38 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wr1-f65.google.com with SMTP id j2so5644583wrx.7 for ; Fri, 25 Sep 2020 16:05:38 -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:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=qCDekzWHAYPKQIhj99K3J/gSHc/DgquZNKuYOleYhHM=; b=CZUH3S39INHxuJP8kpoWeAwgSwRqLKIt6gYxy/hfGEB/ihRiA8aSLAAzu9IDloHRgn jtMIx1AWUgpixbBL8veTUrj8iIbKC3B6rP5k7w3BvotZIm/LxLv/BCR5ASDcAnw+OCD8 16oynlsWBt/9BLFjRa5EWQLCQ9w8rMN/UQfZtVW7cKxzeXmPvaKgkqZqrevVgSMMMS5C wVELRENMPxwhtq1TE5ij81FxgMfYb28sXVFYg04w02Xfhd13iIMlgBm7oLYSwwhs7dOD fFJ+EhRBcZVVH0/+OB4lOhdxgpCHSw5Jgf2PMwlAhZbazaBuLxUD10AO08bivULT1cdk BoTw== X-Gm-Message-State: AOAM532YQMG8ObZH2MWaRhL9rlxwRq5Hne2WY7WgsNTkXN4ECh2opvU+ /VHd8zSto5DM7i4LkpIN4r3sTg== X-Google-Smtp-Source: ABdhPJzITN3oM/HwWqPtnzr4j5kOsM0nd7I3WT0a1MK+9zOPtUCfgugfd2J1BIWHJKvDafYm3EAgZA== X-Received: by 2002:a5d:4247:: with SMTP id s7mr6628492wrr.167.1601075137013; Fri, 25 Sep 2020 16:05:37 -0700 (PDT) Received: from [192.168.149.251] (trinity-students-nat.trin.cam.ac.uk. [131.111.193.104]) by smtp.gmail.com with ESMTPSA id q4sm4321678wru.65.2020.09.25.16.05.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Sep 2020 16:05:35 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.1\)) Subject: Re: svn commit: r366169 - head/sys/mips/include From: Jessica Clarke In-Reply-To: Date: Sat, 26 Sep 2020 00:05:33 +0100 Cc: Justin Hibbits , src-committers , svn-src-all , svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <202009251904.08PJ431b029218@repo.freebsd.org> To: Alexander Richardson X-Mailer: Apple Mail (2.3608.120.23.2.1) X-Rspamd-Queue-Id: 4BynZV2Y7cz3TLX X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of jrtc27@jrtc27.com designates 209.85.221.65 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com X-Spamd-Result: default: False [-2.11 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM_SHORT(-0.66)[-0.657]; FORGED_SENDER(0.30)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; MID_RHS_MATCH_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.97)[-0.973]; FREEFALL_USER(0.00)[jrtc27]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.98)[-0.984]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.221.65:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.221.65:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[svn-src-head] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 25 Sep 2020 23:05:39 -0000 On 26 Sep 2020, at 00:01, Alexander Richardson = wrote: >=20 >=20 > On Fri, 25 Sep 2020, 20:04 Justin Hibbits, = wrote: > Author: jhibbits > Date: Fri Sep 25 19:04:03 2020 > New Revision: 366169 > URL: https://svnweb.freebsd.org/changeset/base/366169 >=20 > Log: > mips: Fix compat32 library builds from r366162 >=20 > Re-add the a_ptr and a_fcn fields to Elf32_Auxinfo. >=20 > MFC after: 1 week > Sponsored by: Juniper Networks, Inc. >=20 > Modified: > head/sys/mips/include/elf.h >=20 > Modified: head/sys/mips/include/elf.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/mips/include/elf.h Fri Sep 25 19:02:49 2020 = (r366168) > +++ head/sys/mips/include/elf.h Fri Sep 25 19:04:03 2020 = (r366169) > @@ -105,6 +105,10 @@ typedef struct { /* Auxiliary vector entry on = initial=20 > int a_type; /* Entry type. */ > union { > int a_val; /* Integer value. */ > +#ifndef __mips_n64 > + void *a_ptr; /* Address. */ > + void (*a_fcn)(void); /* Function pointer (not = used). */ > +#endif > } a_un; > } Elf32_Auxinfo; >=20 > Not sure what the current minimal compiler versions are, but maybe = this should be #if __SIZEOF_POINTER__ =3D=3D 4 instead of checking the = ABI? This would break CHERI-MIPS kernels since we don't define = __mips_n64 for the pure-capability ABI (128-bit pointers). However, we = don't really do compat 32 right now so it probably doesn't matter much. Or why not just #if defined(__mips_o32) || defined(__mips_n32)? Jess From owner-svn-src-head@freebsd.org Sat Sep 26 04:06:17 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 397F93F2C52; Sat, 26 Sep 2020 04:06:17 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BywFP0pxZz43Nw; Sat, 26 Sep 2020 04:06:17 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F340C1E675; Sat, 26 Sep 2020 04:06:16 +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 08Q46Gln064941; Sat, 26 Sep 2020 04:06:16 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08Q46GHr064940; Sat, 26 Sep 2020 04:06:16 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202009260406.08Q46GHr064940@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 26 Sep 2020 04:06:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366181 - head X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 366181 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 26 Sep 2020 04:06:17 -0000 Author: imp Date: Sat Sep 26 04:06:16 2020 New Revision: 366181 URL: https://svnweb.freebsd.org/changeset/base/366181 Log: fix typo imorted -> imported. Noticed by: Maigurs Stalidzans Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Sat Sep 26 02:50:28 2020 (r366180) +++ head/UPDATING Sat Sep 26 04:06:16 2020 (r366181) @@ -89,7 +89,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: successful or not) and run installworld once more. 20200627: - A new implementation of bc and dc has been imorted in r362681. This + A new implementation of bc and dc has been imported in r362681. This implementation corrects non-conformant behavior of the previous bc and adds GNU bc compatible options. It offers a number of extensions, is much faster on large values, and has support for message catalogs From owner-svn-src-head@freebsd.org Sat Sep 26 04:12:22 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7F99A3F33CF for ; Sat, 26 Sep 2020 04:12:22 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com [IPv6:2607:f8b0:4864:20::72f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BywNP3L71z43hh for ; Sat, 26 Sep 2020 04:12:21 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72f.google.com with SMTP id s131so660262qke.0 for ; Fri, 25 Sep 2020 21:12:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Gmifkqft2+knsQ87NgCSjYBXZilALfXR3KUrMI+/07k=; b=FhTg1rG3MCghHHkOHt8sGYsxMmaIhno3T2LVCNlJ5jMXDyndGf9Qjc/ByqM3qTOMBF F7vRD+0gMHQ5rsoDs132HhmFmHg4g1LMkvyxPehrIRcHNc4ylNhunpBNNlql97uYUqzI V9VOUTFu38vF3yXIT21AN6PH2FqB7uR+ra9NrKEqNjCUXoYamSL4QpVTudmgYFStloLM yZbERq3hoEdMFyzwylcMgUhu60jEvqyzcWkZzg3i6NHBt27nlLt3rmuD7isHpooOs65P iPz+DkXc1FYQQGVfVrRbosXYTjyJnE+wKxB51B9uRm/nath7rK3hTAuFXbYzKZZ3v4Ru yTpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Gmifkqft2+knsQ87NgCSjYBXZilALfXR3KUrMI+/07k=; b=Pn/3phjR5g6CHm7S4dly72Z7zs4kSGpfFsUbmsoud8M+a6Z7jXM4l4J7lfH2ETDTF1 tIQnX9l1n9TTpaUjwPjT2LzCI0Qbz4UqOZHL7WT6ONe/BK5bnyqQLh6zEmHzB3v2IfKU m/X5i7AgTYyKYnVpTlEziBxpyXLR4+fzi52Ooj4KasIFIWd4VtWHUwAlEu2Kc90mkbsK gLCQvw3A4N5YshCZkITVr6XMby4iMisHCOeN5XLCPNAJ7BwSVsyEm1bLybRCFYd+JOM4 NgcYVGVhiJbEG/4NjiX56KEGErJocxEr/m5zZeYsSbU3boGs9dAYRLdMCuFhu7mgbFv5 2c7w== X-Gm-Message-State: AOAM532y8XGtwxEb8icOPM7iehHQRX9qm4xqJ5b7/PomyYf83whEPb3a McaxmTQbrVVqDJu6hACN3IYHO49KDzRQCEXCx6JvVA== X-Google-Smtp-Source: ABdhPJwDBxPfqEheSd9LtG/nIQrDTX0RKRlRctf98h8N0Gb80/Db/SydjCWeP91TK7MhZCmy8LPNJDWIN13zBgMRl5M= X-Received: by 2002:a37:638d:: with SMTP id x135mr3223797qkb.60.1601093540372; Fri, 25 Sep 2020 21:12:20 -0700 (PDT) MIME-Version: 1.0 References: <202009251904.08PJ431b029218@repo.freebsd.org> In-Reply-To: From: Warner Losh Date: Fri, 25 Sep 2020 22:12:09 -0600 Message-ID: Subject: Re: svn commit: r366169 - head/sys/mips/include To: Jessica Clarke Cc: Alexander Richardson , Justin Hibbits , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4BywNP3L71z43hh X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=FhTg1rG3; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::72f) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-1.79 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-0.96)[-0.958]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.08)[0.079]; NEURAL_HAM_LONG(-0.91)[-0.910]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::72f:from]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; MAILMAN_DEST(0.00)[svn-src-head]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 26 Sep 2020 04:12:22 -0000 On Fri, Sep 25, 2020 at 5:05 PM Jessica Clarke wrote: > On 26 Sep 2020, at 00:01, Alexander Richardson > wrote: > > > > > > On Fri, 25 Sep 2020, 20:04 Justin Hibbits, wrote: > > Author: jhibbits > > Date: Fri Sep 25 19:04:03 2020 > > New Revision: 366169 > > URL: https://svnweb.freebsd.org/changeset/base/366169 > > > > Log: > > mips: Fix compat32 library builds from r366162 > > > > Re-add the a_ptr and a_fcn fields to Elf32_Auxinfo. > > > > MFC after: 1 week > > Sponsored by: Juniper Networks, Inc. > > > > Modified: > > head/sys/mips/include/elf.h > > > > Modified: head/sys/mips/include/elf.h > > > ============================================================================== > > --- head/sys/mips/include/elf.h Fri Sep 25 19:02:49 2020 (r366168) > > +++ head/sys/mips/include/elf.h Fri Sep 25 19:04:03 2020 (r366169) > > @@ -105,6 +105,10 @@ typedef struct { /* Auxiliary vector entry on > initial > > int a_type; /* Entry type. */ > > union { > > int a_val; /* Integer value. */ > > +#ifndef __mips_n64 > > + void *a_ptr; /* Address. */ > > + void (*a_fcn)(void); /* Function pointer (not used). > */ > > +#endif > > } a_un; > > } Elf32_Auxinfo; > > > > Not sure what the current minimal compiler versions are, but maybe this > should be #if __SIZEOF_POINTER__ == 4 instead of checking the ABI? This > would break CHERI-MIPS kernels since we don't define __mips_n64 for the > pure-capability ABI (128-bit pointers). However, we don't really do compat > 32 right now so it probably doesn't matter much. > > Or why not just #if defined(__mips_o32) || defined(__mips_n32)? I think we use that in other places for just this issue.... Warner From owner-svn-src-head@freebsd.org Sat Sep 26 16:27:10 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B85A1423338; Sat, 26 Sep 2020 16:27:10 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BzDhG4H8gz3XFN; Sat, 26 Sep 2020 16:27:10 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7258226DEF; Sat, 26 Sep 2020 16:27:10 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08QGRAQY032608; Sat, 26 Sep 2020 16:27:10 GMT (envelope-from zeising@FreeBSD.org) Received: (from zeising@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08QGRAHq032606; Sat, 26 Sep 2020 16:27:10 GMT (envelope-from zeising@FreeBSD.org) Message-Id: <202009261627.08QGRAHq032606@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zeising set sender to zeising@FreeBSD.org using -f From: Niclas Zeising Date: Sat, 26 Sep 2020 16:27:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366186 - in head/usr.sbin: bsdconfig/share/media bsdinstall/scripts X-SVN-Group: head X-SVN-Commit-Author: zeising X-SVN-Commit-Paths: in head/usr.sbin: bsdconfig/share/media bsdinstall/scripts X-SVN-Commit-Revision: 366186 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 26 Sep 2020 16:27:10 -0000 Author: zeising (doc,ports committer) Date: Sat Sep 26 16:27:09 2020 New Revision: 366186 URL: https://svnweb.freebsd.org/changeset/base/366186 Log: bsdconfig, bsdinstall: Prune dead mirrors Prune dead mirrors from the list of mirrors in bsdconfig and bsdinstall. All these return NXDOMAIN when trying to resolve them. Reviewed by: emaste Approved by: emaste MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D26535 Modified: head/usr.sbin/bsdconfig/share/media/ftp.subr head/usr.sbin/bsdinstall/scripts/mirrorselect Modified: head/usr.sbin/bsdconfig/share/media/ftp.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/ftp.subr Sat Sep 26 14:44:58 2020 (r366185) +++ head/usr.sbin/bsdconfig/share/media/ftp.subr Sat Sep 26 16:27:09 2020 (r366186) @@ -82,7 +82,6 @@ f_dialog_menu_media_ftp() ' IPv6 $msg_japan' 'ftp2.jp.freebsd.org' ' IPv6 $msg_sweden' 'ftp4.se.freebsd.org' ' IPv6 $msg_usa' 'ftp4.us.freebsd.org' - ' IPv6 $msg_turkey' 'ftp2.tr.freebsd.org' '$msg_primary' 'ftp1.freebsd.org' ' $msg_primary #2' 'ftp2.freebsd.org' ' $msg_primary #3' 'ftp3.freebsd.org' @@ -95,7 +94,6 @@ f_dialog_menu_media_ftp() ' $msg_primary #12' 'ftp12.freebsd.org' ' $msg_primary #13' 'ftp13.freebsd.org' ' $msg_primary #14' 'ftp14.freebsd.org' - '$msg_armenia' 'ftp1.am.freebsd.org' '$msg_australia' 'ftp.au.freebsd.org' ' $msg_australia #2' 'ftp2.au.freebsd.org' ' $msg_australia #3' 'ftp3.au.freebsd.org' @@ -103,11 +101,9 @@ f_dialog_menu_media_ftp() '$msg_brazil' 'ftp2.br.freebsd.org' ' $msg_brazil #3' 'ftp3.br.freebsd.org' ' $msg_brazil #4' 'ftp4.br.freebsd.org' - '$msg_canada' 'ftp.ca.freebsd.org' '$msg_china' 'ftp.cn.freebsd.org' '$msg_czech_republic' 'ftp.cz.freebsd.org' '$msg_denmark' 'ftp.dk.freebsd.org' - '$msg_estonia' 'ftp.ee.freebsd.org' '$msg_finland' 'ftp.fi.freebsd.org' '$msg_france' 'ftp.fr.freebsd.org' ' $msg_france #3' 'ftp3.fr.freebsd.org' @@ -120,13 +116,11 @@ f_dialog_menu_media_ftp() ' $msg_germany #2' 'ftp2.de.freebsd.org' ' $msg_germany #4' 'ftp4.de.freebsd.org' ' $msg_germany #5' 'ftp5.de.freebsd.org' - ' $msg_germany #6' 'ftp6.de.freebsd.org' ' $msg_germany #7' 'ftp7.de.freebsd.org' ' $msg_germany #8' 'ftp8.de.freebsd.org' '$msg_greece' 'ftp.gr.freebsd.org' ' $msg_greece #2' 'ftp2.gr.freebsd.org' '$msg_ireland' 'ftp3.ie.freebsd.org' - '$msg_israel' 'ftp.il.freebsd.org' '$msg_japan' 'ftp.jp.freebsd.org' ' $msg_japan #2' 'ftp2.jp.freebsd.org' ' $msg_japan #3' 'ftp3.jp.freebsd.org' @@ -139,16 +133,13 @@ f_dialog_menu_media_ftp() '$msg_korea' 'ftp.kr.freebsd.org' ' $msg_korea #2' 'ftp2.kr.freebsd.org' '$msg_latvia' 'ftp.lv.freebsd.org' - '$msg_lithuania' 'ftp.lt.freebsd.org' '$msg_netherlands' 'ftp.nl.freebsd.org' ' $msg_netherlands #2' 'ftp2.nl.freebsd.org' '$msg_new_zealand' 'ftp.nz.freebsd.org' '$msg_norway' 'ftp.no.freebsd.org' '$msg_poland' 'ftp.pl.freebsd.org' - ' $msg_poland #2' 'ftp2.pl.freebsd.org' '$msg_russia' 'ftp.ru.freebsd.org' ' $msg_russia #2' 'ftp2.ru.freebsd.org' - ' $msg_russia #4' 'ftp4.ru.freebsd.org' ' $msg_russia #5' 'ftp5.ru.freebsd.org' ' $msg_russia #6' 'ftp6.ru.freebsd.org' '$msg_slovak_republic' 'ftp.sk.freebsd.org' @@ -157,13 +148,9 @@ f_dialog_menu_media_ftp() '$msg_south_africa' 'ftp.za.freebsd.org' ' $msg_south_africa #2' 'ftp2.za.freebsd.org' ' $msg_south_africa #4' 'ftp4.za.freebsd.org' - '$msg_spain' 'ftp.es.freebsd.org' - ' $msg_spain #3' 'ftp3.es.freebsd.org' '$msg_sweden' 'ftp.se.freebsd.org' ' $msg_sweden #2' 'ftp2.se.freebsd.org' - ' $msg_sweden #3' 'ftp3.se.freebsd.org' ' $msg_sweden #4' 'ftp4.se.freebsd.org' - ' $msg_sweden #6' 'ftp6.se.freebsd.org' '$msg_switzerland' 'ftp.ch.freebsd.org' '$msg_taiwan' 'ftp.tw.freebsd.org' ' $msg_taiwan #2' 'ftp2.tw.freebsd.org' Modified: head/usr.sbin/bsdinstall/scripts/mirrorselect ============================================================================== --- head/usr.sbin/bsdinstall/scripts/mirrorselect Sat Sep 26 14:44:58 2020 (r366185) +++ head/usr.sbin/bsdinstall/scripts/mirrorselect Sat Sep 26 16:27:09 2020 (r366186) @@ -44,7 +44,6 @@ MIRROR=`dialog --backtitle "FreeBSD Installer" \ ftp://ftp2.jp.freebsd.org "IPv6 Japan"\ ftp://ftp4.se.freebsd.org "IPv6 Sweden"\ ftp://ftp4.us.freebsd.org "IPv6 USA"\ - ftp://ftp2.tr.freebsd.org "IPv6 Turkey"\ ftp://ftp1.freebsd.org "Primary"\ ftp://ftp2.freebsd.org "Primary #2"\ ftp://ftp3.freebsd.org "Primary #3"\ @@ -57,7 +56,6 @@ MIRROR=`dialog --backtitle "FreeBSD Installer" \ ftp://ftp12.freebsd.org "Primary #12"\ ftp://ftp13.freebsd.org "Primary #13"\ ftp://ftp14.freebsd.org "Primary #14"\ - ftp://ftp1.am.freebsd.org "Armenia"\ ftp://ftp.au.freebsd.org "Australia"\ ftp://ftp2.au.freebsd.org "Australia #2"\ ftp://ftp3.au.freebsd.org "Australia #3"\ @@ -65,11 +63,9 @@ MIRROR=`dialog --backtitle "FreeBSD Installer" \ ftp://ftp2.br.freebsd.org "Brazil #2"\ ftp://ftp3.br.freebsd.org "Brazil #3"\ ftp://ftp4.br.freebsd.org "Brazil #4"\ - ftp://ftp.ca.freebsd.org "Canada"\ ftp://ftp.cn.freebsd.org "China"\ ftp://ftp.cz.freebsd.org "Czech Republic"\ ftp://ftp.dk.freebsd.org "Denmark"\ - ftp://ftp.ee.freebsd.org "Estonia"\ ftp://ftp.fi.freebsd.org "Finland"\ ftp://ftp.fr.freebsd.org "France"\ ftp://ftp3.fr.freebsd.org "France #3"\ @@ -82,13 +78,11 @@ MIRROR=`dialog --backtitle "FreeBSD Installer" \ ftp://ftp2.de.freebsd.org "Germany #2"\ ftp://ftp4.de.freebsd.org "Germany #4"\ ftp://ftp5.de.freebsd.org "Germany #5"\ - ftp://ftp6.de.freebsd.org "Germany #6"\ ftp://ftp7.de.freebsd.org "Germany #7"\ ftp://ftp8.de.freebsd.org "Germany #8"\ ftp://ftp.gr.freebsd.org "Greece"\ ftp://ftp2.gr.freebsd.org "Greece #2"\ ftp://ftp3.ie.freebsd.org "Ireland #3"\ - ftp://ftp.il.freebsd.org "Israel"\ ftp://ftp.jp.freebsd.org "Japan"\ ftp://ftp2.jp.freebsd.org "Japan #2"\ ftp://ftp3.jp.freebsd.org "Japan #3"\ @@ -101,16 +95,13 @@ MIRROR=`dialog --backtitle "FreeBSD Installer" \ ftp://ftp.kr.freebsd.org "Korea"\ ftp://ftp2.kr.freebsd.org "Korea #2"\ ftp://ftp.lv.freebsd.org "Latvia"\ - ftp://ftp.lt.freebsd.org "Lithuania"\ ftp://ftp.nl.freebsd.org "Netherlands"\ ftp://ftp2.nl.freebsd.org "Netherlands #2"\ ftp://ftp.nz.freebsd.org "New Zealand"\ ftp://ftp.no.freebsd.org "Norway"\ ftp://ftp.pl.freebsd.org "Poland"\ - ftp://ftp2.pl.freebsd.org "Poland #2"\ ftp://ftp.ru.freebsd.org "Russia"\ ftp://ftp2.ru.freebsd.org "Russia #2"\ - ftp://ftp4.ru.freebsd.org "Russia #4"\ ftp://ftp5.ru.freebsd.org "Russia #5"\ ftp://ftp6.ru.freebsd.org "Russia #6"\ ftp://ftp.sk.freebsd.org "Slovak Republic"\ @@ -119,13 +110,8 @@ MIRROR=`dialog --backtitle "FreeBSD Installer" \ ftp://ftp.za.freebsd.org "South Africa"\ ftp://ftp2.za.freebsd.org "South Africa #2"\ ftp://ftp4.za.freebsd.org "South Africa #4"\ - ftp://ftp.es.freebsd.org "Spain"\ - ftp://ftp3.es.freebsd.org "Spain #3"\ ftp://ftp.se.freebsd.org "Sweden"\ - ftp://ftp2.se.freebsd.org "Sweden #2"\ - ftp://ftp3.se.freebsd.org "Sweden #3"\ ftp://ftp4.se.freebsd.org "Sweden #4"\ - ftp://ftp6.se.freebsd.org "Sweden #6"\ ftp://ftp.ch.freebsd.org "Switzerland"\ ftp://ftp.tw.freebsd.org "Taiwan"\ ftp://ftp2.tw.freebsd.org "Taiwan #2"\ From owner-svn-src-head@freebsd.org Sat Sep 26 17:02:14 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2C979423F61; Sat, 26 Sep 2020 17:02:14 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BzFSj3sdPz3ZSJ; Sat, 26 Sep 2020 17:02:13 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 08QH2AsT055655; Sat, 26 Sep 2020 10:02:10 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 08QH2AQ1055654; Sat, 26 Sep 2020 10:02:10 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202009261702.08QH2AQ1055654@gndrsh.dnsmgr.net> Subject: Re: svn commit: r365643 - head/bin/cp In-Reply-To: To: Ian Lepore Date: Sat, 26 Sep 2020 10:02:10 -0700 (PDT) CC: rgrimes@freebsd.org, src-committers , svn-src-all , svn-src-head Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4BzFSj3sdPz3ZSJ X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 26 Sep 2020 17:02:14 -0000 > On Fri, 2020-09-25 at 10:55 -0700, Rodney W. Grimes wrote: > > > I was under the impression from previous reading and kib's response > > > that this is a complete non-issue, there's no way you can go > > > multi-user without a mounted /dev and we go to somewhat great > > > lengths to make sure we're good. > > > > Though kib can assert that, it does not change the fact that I > > frequently find /dev/null FILES on unmounted root file systems. > > > > But lets not mix the 2 separate things of boot time /dev dependency > > and build time /dev dependency. > > If you look in sys/kern/vfs_mountroot.c you can see that the code to > mount /dev is invoked unconditionally as the first step of mounting > root, and that all the calls it makes to get devfs mounted have their > results checked with KASSERTs. > > That's pretty strong evidence that devfs is mounted before rc scripts > run. That creates a situation where you are making an extraordinary > claim, so you need to provide extraordinary evidence to support it. A > sequence of actions that allows others to recreate the situation would > do the trick. I have provided ways one can look for this file in other messages of the threads. A dump of a UFS root can show it up, and iirc you can find it in a zfs send of a boot dataset. > > (A question that occurs to me: could it be that the files you've seen > got created at shutdown after devfs was unmounted, rather than at > startup? I don't know enough about the shutdown sequence to know > whether that's possible.) Its not "the files" it is "a file, /dev/null". And yes, it could be very possible that it is during shutdown. Sadly the files is usually of 0 length so leave little clue as to what is creating them. > -- Ian -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sat Sep 26 18:13:04 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2FFD0425466; Sat, 26 Sep 2020 18:13:04 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BzH2R6P1Mz3dGb; Sat, 26 Sep 2020 18:13:03 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 08QICuG1055858; Sat, 26 Sep 2020 11:12:56 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 08QICtK7055857; Sat, 26 Sep 2020 11:12:55 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202009261812.08QICtK7055857@gndrsh.dnsmgr.net> Subject: Re: svn commit: r366186 - in head/usr.sbin: bsdconfig/share/media bsdinstall/scripts In-Reply-To: <202009261627.08QGRAHq032606@repo.freebsd.org> To: Niclas Zeising Date: Sat, 26 Sep 2020 11:12:55 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4BzH2R6P1Mz3dGb X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 26 Sep 2020 18:13:04 -0000 > Author: zeising (doc,ports committer) > Date: Sat Sep 26 16:27:09 2020 > New Revision: 366186 > URL: https://svnweb.freebsd.org/changeset/base/366186 > > Log: > bsdconfig, bsdinstall: Prune dead mirrors > > Prune dead mirrors from the list of mirrors in bsdconfig and bsdinstall. > All these return NXDOMAIN when trying to resolve them. This seems like the wrong place to fix it, as this does nothing for all the "shipped" releases that contain the old values. Shouldnt these all just be CNAMED in dns to a nearest replacement resource? > Reviewed by: emaste > Approved by: emaste > MFC after: 3 days > Differential Revision: https://reviews.freebsd.org/D26535 > > Modified: > head/usr.sbin/bsdconfig/share/media/ftp.subr > head/usr.sbin/bsdinstall/scripts/mirrorselect > > Modified: head/usr.sbin/bsdconfig/share/media/ftp.subr > ============================================================================== > --- head/usr.sbin/bsdconfig/share/media/ftp.subr Sat Sep 26 14:44:58 2020 (r366185) > +++ head/usr.sbin/bsdconfig/share/media/ftp.subr Sat Sep 26 16:27:09 2020 (r366186) > @@ -82,7 +82,6 @@ f_dialog_menu_media_ftp() > ' IPv6 $msg_japan' 'ftp2.jp.freebsd.org' > ' IPv6 $msg_sweden' 'ftp4.se.freebsd.org' > ' IPv6 $msg_usa' 'ftp4.us.freebsd.org' > - ' IPv6 $msg_turkey' 'ftp2.tr.freebsd.org' > '$msg_primary' 'ftp1.freebsd.org' > ' $msg_primary #2' 'ftp2.freebsd.org' > ' $msg_primary #3' 'ftp3.freebsd.org' > @@ -95,7 +94,6 @@ f_dialog_menu_media_ftp() > ' $msg_primary #12' 'ftp12.freebsd.org' > ' $msg_primary #13' 'ftp13.freebsd.org' > ' $msg_primary #14' 'ftp14.freebsd.org' > - '$msg_armenia' 'ftp1.am.freebsd.org' > '$msg_australia' 'ftp.au.freebsd.org' > ' $msg_australia #2' 'ftp2.au.freebsd.org' > ' $msg_australia #3' 'ftp3.au.freebsd.org' > @@ -103,11 +101,9 @@ f_dialog_menu_media_ftp() > '$msg_brazil' 'ftp2.br.freebsd.org' > ' $msg_brazil #3' 'ftp3.br.freebsd.org' > ' $msg_brazil #4' 'ftp4.br.freebsd.org' > - '$msg_canada' 'ftp.ca.freebsd.org' > '$msg_china' 'ftp.cn.freebsd.org' > '$msg_czech_republic' 'ftp.cz.freebsd.org' > '$msg_denmark' 'ftp.dk.freebsd.org' > - '$msg_estonia' 'ftp.ee.freebsd.org' > '$msg_finland' 'ftp.fi.freebsd.org' > '$msg_france' 'ftp.fr.freebsd.org' > ' $msg_france #3' 'ftp3.fr.freebsd.org' > @@ -120,13 +116,11 @@ f_dialog_menu_media_ftp() > ' $msg_germany #2' 'ftp2.de.freebsd.org' > ' $msg_germany #4' 'ftp4.de.freebsd.org' > ' $msg_germany #5' 'ftp5.de.freebsd.org' > - ' $msg_germany #6' 'ftp6.de.freebsd.org' > ' $msg_germany #7' 'ftp7.de.freebsd.org' > ' $msg_germany #8' 'ftp8.de.freebsd.org' > '$msg_greece' 'ftp.gr.freebsd.org' > ' $msg_greece #2' 'ftp2.gr.freebsd.org' > '$msg_ireland' 'ftp3.ie.freebsd.org' > - '$msg_israel' 'ftp.il.freebsd.org' > '$msg_japan' 'ftp.jp.freebsd.org' > ' $msg_japan #2' 'ftp2.jp.freebsd.org' > ' $msg_japan #3' 'ftp3.jp.freebsd.org' > @@ -139,16 +133,13 @@ f_dialog_menu_media_ftp() > '$msg_korea' 'ftp.kr.freebsd.org' > ' $msg_korea #2' 'ftp2.kr.freebsd.org' > '$msg_latvia' 'ftp.lv.freebsd.org' > - '$msg_lithuania' 'ftp.lt.freebsd.org' > '$msg_netherlands' 'ftp.nl.freebsd.org' > ' $msg_netherlands #2' 'ftp2.nl.freebsd.org' > '$msg_new_zealand' 'ftp.nz.freebsd.org' > '$msg_norway' 'ftp.no.freebsd.org' > '$msg_poland' 'ftp.pl.freebsd.org' > - ' $msg_poland #2' 'ftp2.pl.freebsd.org' > '$msg_russia' 'ftp.ru.freebsd.org' > ' $msg_russia #2' 'ftp2.ru.freebsd.org' > - ' $msg_russia #4' 'ftp4.ru.freebsd.org' > ' $msg_russia #5' 'ftp5.ru.freebsd.org' > ' $msg_russia #6' 'ftp6.ru.freebsd.org' > '$msg_slovak_republic' 'ftp.sk.freebsd.org' > @@ -157,13 +148,9 @@ f_dialog_menu_media_ftp() > '$msg_south_africa' 'ftp.za.freebsd.org' > ' $msg_south_africa #2' 'ftp2.za.freebsd.org' > ' $msg_south_africa #4' 'ftp4.za.freebsd.org' > - '$msg_spain' 'ftp.es.freebsd.org' > - ' $msg_spain #3' 'ftp3.es.freebsd.org' > '$msg_sweden' 'ftp.se.freebsd.org' > ' $msg_sweden #2' 'ftp2.se.freebsd.org' > - ' $msg_sweden #3' 'ftp3.se.freebsd.org' > ' $msg_sweden #4' 'ftp4.se.freebsd.org' > - ' $msg_sweden #6' 'ftp6.se.freebsd.org' > '$msg_switzerland' 'ftp.ch.freebsd.org' > '$msg_taiwan' 'ftp.tw.freebsd.org' > ' $msg_taiwan #2' 'ftp2.tw.freebsd.org' > > Modified: head/usr.sbin/bsdinstall/scripts/mirrorselect > ============================================================================== > --- head/usr.sbin/bsdinstall/scripts/mirrorselect Sat Sep 26 14:44:58 2020 (r366185) > +++ head/usr.sbin/bsdinstall/scripts/mirrorselect Sat Sep 26 16:27:09 2020 (r366186) > @@ -44,7 +44,6 @@ MIRROR=`dialog --backtitle "FreeBSD Installer" \ > ftp://ftp2.jp.freebsd.org "IPv6 Japan"\ > ftp://ftp4.se.freebsd.org "IPv6 Sweden"\ > ftp://ftp4.us.freebsd.org "IPv6 USA"\ > - ftp://ftp2.tr.freebsd.org "IPv6 Turkey"\ > ftp://ftp1.freebsd.org "Primary"\ > ftp://ftp2.freebsd.org "Primary #2"\ > ftp://ftp3.freebsd.org "Primary #3"\ > @@ -57,7 +56,6 @@ MIRROR=`dialog --backtitle "FreeBSD Installer" \ > ftp://ftp12.freebsd.org "Primary #12"\ > ftp://ftp13.freebsd.org "Primary #13"\ > ftp://ftp14.freebsd.org "Primary #14"\ > - ftp://ftp1.am.freebsd.org "Armenia"\ > ftp://ftp.au.freebsd.org "Australia"\ > ftp://ftp2.au.freebsd.org "Australia #2"\ > ftp://ftp3.au.freebsd.org "Australia #3"\ > @@ -65,11 +63,9 @@ MIRROR=`dialog --backtitle "FreeBSD Installer" \ > ftp://ftp2.br.freebsd.org "Brazil #2"\ > ftp://ftp3.br.freebsd.org "Brazil #3"\ > ftp://ftp4.br.freebsd.org "Brazil #4"\ > - ftp://ftp.ca.freebsd.org "Canada"\ > ftp://ftp.cn.freebsd.org "China"\ > ftp://ftp.cz.freebsd.org "Czech Republic"\ > ftp://ftp.dk.freebsd.org "Denmark"\ > - ftp://ftp.ee.freebsd.org "Estonia"\ > ftp://ftp.fi.freebsd.org "Finland"\ > ftp://ftp.fr.freebsd.org "France"\ > ftp://ftp3.fr.freebsd.org "France #3"\ > @@ -82,13 +78,11 @@ MIRROR=`dialog --backtitle "FreeBSD Installer" \ > ftp://ftp2.de.freebsd.org "Germany #2"\ > ftp://ftp4.de.freebsd.org "Germany #4"\ > ftp://ftp5.de.freebsd.org "Germany #5"\ > - ftp://ftp6.de.freebsd.org "Germany #6"\ > ftp://ftp7.de.freebsd.org "Germany #7"\ > ftp://ftp8.de.freebsd.org "Germany #8"\ > ftp://ftp.gr.freebsd.org "Greece"\ > ftp://ftp2.gr.freebsd.org "Greece #2"\ > ftp://ftp3.ie.freebsd.org "Ireland #3"\ > - ftp://ftp.il.freebsd.org "Israel"\ > ftp://ftp.jp.freebsd.org "Japan"\ > ftp://ftp2.jp.freebsd.org "Japan #2"\ > ftp://ftp3.jp.freebsd.org "Japan #3"\ > @@ -101,16 +95,13 @@ MIRROR=`dialog --backtitle "FreeBSD Installer" \ > ftp://ftp.kr.freebsd.org "Korea"\ > ftp://ftp2.kr.freebsd.org "Korea #2"\ > ftp://ftp.lv.freebsd.org "Latvia"\ > - ftp://ftp.lt.freebsd.org "Lithuania"\ > ftp://ftp.nl.freebsd.org "Netherlands"\ > ftp://ftp2.nl.freebsd.org "Netherlands #2"\ > ftp://ftp.nz.freebsd.org "New Zealand"\ > ftp://ftp.no.freebsd.org "Norway"\ > ftp://ftp.pl.freebsd.org "Poland"\ > - ftp://ftp2.pl.freebsd.org "Poland #2"\ > ftp://ftp.ru.freebsd.org "Russia"\ > ftp://ftp2.ru.freebsd.org "Russia #2"\ > - ftp://ftp4.ru.freebsd.org "Russia #4"\ > ftp://ftp5.ru.freebsd.org "Russia #5"\ > ftp://ftp6.ru.freebsd.org "Russia #6"\ > ftp://ftp.sk.freebsd.org "Slovak Republic"\ > @@ -119,13 +110,8 @@ MIRROR=`dialog --backtitle "FreeBSD Installer" \ > ftp://ftp.za.freebsd.org "South Africa"\ > ftp://ftp2.za.freebsd.org "South Africa #2"\ > ftp://ftp4.za.freebsd.org "South Africa #4"\ > - ftp://ftp.es.freebsd.org "Spain"\ > - ftp://ftp3.es.freebsd.org "Spain #3"\ > ftp://ftp.se.freebsd.org "Sweden"\ > - ftp://ftp2.se.freebsd.org "Sweden #2"\ > - ftp://ftp3.se.freebsd.org "Sweden #3"\ > ftp://ftp4.se.freebsd.org "Sweden #4"\ > - ftp://ftp6.se.freebsd.org "Sweden #6"\ > ftp://ftp.ch.freebsd.org "Switzerland"\ > ftp://ftp.tw.freebsd.org "Taiwan"\ > ftp://ftp2.tw.freebsd.org "Taiwan #2"\ > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sat Sep 26 18:22:40 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1808642537B; Sat, 26 Sep 2020 18:22:40 +0000 (UTC) (envelope-from zeising@freebsd.org) Received: from mail.daemonic.se (mail.daemonic.se [176.58.89.161]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BzHFW4ktbz3dZ8; Sat, 26 Sep 2020 18:22:39 +0000 (UTC) (envelope-from zeising@freebsd.org) Received: from cid.daemonic.se (localhost [IPv6:::1]) by mail.daemonic.se (Postfix) with ESMTP id 4BzHFT5ncpz3nDX; Sat, 26 Sep 2020 18:22:37 +0000 (UTC) X-Virus-Scanned: amavisd-new at daemonic.se Received: from mail.daemonic.se ([127.0.0.1]) (using TLS with cipher ECDHE-RSA-AES128-GCM-SHA256) by cid.daemonic.se (mailscanner.daemonic.se [127.0.0.1]) (amavisd-new, port 10587) with ESMTPS id FtfUQFiieaq4; Sat, 26 Sep 2020 18:22:37 +0000 (UTC) Received: from vivi.daemonic.se (vivi.daemonic.se [IPv6:2001:470:dca9:1200::4]) by mail.daemonic.se (Postfix) with ESMTPSA id 4BzHFT0NhVz3mQw; Sat, 26 Sep 2020 18:22:36 +0000 (UTC) Subject: Re: svn commit: r366186 - in head/usr.sbin: bsdconfig/share/media bsdinstall/scripts To: rgrimes@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202009261812.08QICtK7055857@gndrsh.dnsmgr.net> From: Niclas Zeising Message-ID: <732d6dbb-2d2a-adbf-b587-b6f000b1047e@freebsd.org> Date: Sat, 26 Sep 2020 20:22:36 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <202009261812.08QICtK7055857@gndrsh.dnsmgr.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4BzHFW4ktbz3dZ8 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:36236, ipnet:176.58.89.0/24, country:US]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 26 Sep 2020 18:22:40 -0000 On 2020-09-26 20:12, Rodney W. Grimes wrote: >> Author: zeising (doc,ports committer) >> Date: Sat Sep 26 16:27:09 2020 >> New Revision: 366186 >> URL: https://svnweb.freebsd.org/changeset/base/366186 >> >> Log: >> bsdconfig, bsdinstall: Prune dead mirrors >> >> Prune dead mirrors from the list of mirrors in bsdconfig and bsdinstall. >> All these return NXDOMAIN when trying to resolve them. > > This seems like the wrong place to fix it, as this does > nothing for all the "shipped" releases that contain the > old values. Shouldnt these all just be CNAMED in dns > to a nearest replacement resource? > > Considering that we don't actually have control of the subdomans (CC.freebsd.org) ourselves, that is trickier than it might sound. I do not oppose that change, but I'm not doing the work to chase all the subdomain DNS admins down to try to fix it. This change cleans out some old mirrors for the 12.2 release, so that people installing 12.2 (and later stuff) won't have the installer complain when they accidentally pick a nonexistent mirror. I believe that the proper way to fix this is to just use the FreeBSD CDN even for these downloads (basically, go straight to download.freebsd.org, or at least have that as the preferred option), but I haven't gotten around to that. Regards -- Niclas Zeising From owner-svn-src-head@freebsd.org Sat Sep 26 18:28:20 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B0F8442582A; Sat, 26 Sep 2020 18:28:20 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BzHN42X7wz3fCG; Sat, 26 Sep 2020 18:28:19 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 08QISIB6055942; Sat, 26 Sep 2020 11:28:18 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 08QISIww055941; Sat, 26 Sep 2020 11:28:18 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202009261828.08QISIww055941@gndrsh.dnsmgr.net> Subject: Re: svn commit: r366186 - in head/usr.sbin: bsdconfig/share/media bsdinstall/scripts In-Reply-To: <732d6dbb-2d2a-adbf-b587-b6f000b1047e@freebsd.org> To: Niclas Zeising Date: Sat, 26 Sep 2020 11:28:18 -0700 (PDT) CC: rgrimes@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4BzHN42X7wz3fCG X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 26 Sep 2020 18:28:20 -0000 > On 2020-09-26 20:12, Rodney W. Grimes wrote: > >> Author: zeising (doc,ports committer) > >> Date: Sat Sep 26 16:27:09 2020 > >> New Revision: 366186 > >> URL: https://svnweb.freebsd.org/changeset/base/366186 > >> > >> Log: > >> bsdconfig, bsdinstall: Prune dead mirrors > >> > >> Prune dead mirrors from the list of mirrors in bsdconfig and bsdinstall. > >> All these return NXDOMAIN when trying to resolve them. > > > > This seems like the wrong place to fix it, as this does > > nothing for all the "shipped" releases that contain the > > old values. Shouldnt these all just be CNAMED in dns > > to a nearest replacement resource? > > > > > > Considering that we don't actually have control of the subdomans > (CC.freebsd.org) ourselves, that is trickier than it might sound. How can freebsd.org NOT have ultimate control over deligations? If things have become "lame" in a deligated zone the deligation can and should be pulled and replaced with local data. This is cc.freebsd.org, not freebsd.org.cc! > I do not oppose that change, but I'm not doing the work to chase all the > subdomain DNS admins down to try to fix it. Nor should you, this should be a clusteradm/domain administration person that should already working to keep the projects DNS data up to date and reliable. > This change cleans out some old mirrors for the 12.2 release, so that > people installing 12.2 (and later stuff) won't have the installer > complain when they accidentally pick a nonexistent mirror. > I believe that the proper way to fix this is to just use the FreeBSD CDN > even for these downloads (basically, go straight to > download.freebsd.org, or at least have that as the preferred option), > but I haven't gotten around to that. > Regards > -- > Niclas Zeising > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sat Sep 26 18:54:18 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B9BEC425BE7; Sat, 26 Sep 2020 18:54:18 +0000 (UTC) (envelope-from zeising@freebsd.org) Received: from mail.daemonic.se (mail.daemonic.se [IPv6:2607:f740:d:20::25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BzHy22XGTz3gcl; Sat, 26 Sep 2020 18:54:18 +0000 (UTC) (envelope-from zeising@freebsd.org) Received: from cid.daemonic.se (localhost [IPv6:::1]) by mail.daemonic.se (Postfix) with ESMTP id 4BzHxz1tTbz3nDX; Sat, 26 Sep 2020 18:54:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at daemonic.se Received: from mail.daemonic.se ([IPv6:::1]) (using TLS with cipher ECDHE-RSA-AES128-GCM-SHA256) by cid.daemonic.se (mailscanner.daemonic.se [IPv6:::1]) (amavisd-new, port 10587) with ESMTPS id pYbHDNHdkFAT; Sat, 26 Sep 2020 18:54:14 +0000 (UTC) Received: from vivi.daemonic.se (vivi.daemonic.se [IPv6:2001:470:dca9:1200::4]) by mail.daemonic.se (Postfix) with ESMTPSA id 4BzHxx6b3nz3mQw; Sat, 26 Sep 2020 18:54:13 +0000 (UTC) Subject: Re: svn commit: r366186 - in head/usr.sbin: bsdconfig/share/media bsdinstall/scripts To: rgrimes@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202009261828.08QISIww055941@gndrsh.dnsmgr.net> From: Niclas Zeising Message-ID: Date: Sat, 26 Sep 2020 20:54:13 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <202009261828.08QISIww055941@gndrsh.dnsmgr.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4BzHy22XGTz3gcl X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36236, ipnet:2607:f740:d::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 26 Sep 2020 18:54:18 -0000 On 2020-09-26 20:28, Rodney W. Grimes wrote: >> On 2020-09-26 20:12, Rodney W. Grimes wrote: >>>> Author: zeising (doc,ports committer) >>>> Date: Sat Sep 26 16:27:09 2020 >>>> New Revision: 366186 >>>> URL: https://svnweb.freebsd.org/changeset/base/366186 >>>> >>>> Log: >>>> bsdconfig, bsdinstall: Prune dead mirrors >>>> >>>> Prune dead mirrors from the list of mirrors in bsdconfig and bsdinstall. >>>> All these return NXDOMAIN when trying to resolve them. >>> >>> This seems like the wrong place to fix it, as this does >>> nothing for all the "shipped" releases that contain the >>> old values. Shouldnt these all just be CNAMED in dns >>> to a nearest replacement resource? >>> >>> >> >> Considering that we don't actually have control of the subdomans >> (CC.freebsd.org) ourselves, that is trickier than it might sound. > > How can freebsd.org NOT have ultimate control over deligations? > If things have become "lame" in a deligated zone the deligation > can and should be pulled and replaced with local data. > > This is cc.freebsd.org, not freebsd.org.cc! I am the wrong person to answer that question. In this case, things have not become lame. For instance, the names ervers for se.freebsd.org work fine, but ftp3.se and ftp6.se records are removed. Same for ru.freebsd.org and ftp4.ru. I'm merely pointing out that changing ftp.CC.freebsd.org usually requires contacting the person(s) maintaining the CC.freebsd.org zone, which is usually not the project. Regards -- Niclas Zeising From owner-svn-src-head@freebsd.org Sat Sep 26 18:54:54 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4623142618A for ; Sat, 26 Sep 2020 18:54:54 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BzHyj2vWgz3gbd for ; Sat, 26 Sep 2020 18:54:53 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x82c.google.com with SMTP id n10so5150568qtv.3 for ; Sat, 26 Sep 2020 11:54:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1WQD1dMqcvLe8+ErshELEq83g5E+OHJ8h/Qk2C8H5Gw=; b=gLPYZqvBvvsDW28hLqbXFOTzLApj68lv49mbp+KUI8E2PduT+/N6Zb4lVCH/MJbh02 dwG9aXiZ0TrPWHzShtW6bnhjTVg4R9s9SSR5XpC5ysUHKSO0in8ssFrfQdzDm0fEPH2j Lmn1u5mIh3gM/zDdx2yLvTqERs1OEIlqhcTS80H4Xs9wBXoW9r0XT4MEKmbEzAZgNorf +fpX46pRmXUg9uCqsqOzNNkAYfcyq5KCiNVo5t5thIp4/0m04M02+dZ/sJkNQA55cblp Xm+rn5PCwwSDTzsOazyDqTc8a/ZHoo5nmnolayyYkF4IKCduHpPS/aRk19cj1sfD9p2F bTgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1WQD1dMqcvLe8+ErshELEq83g5E+OHJ8h/Qk2C8H5Gw=; b=WCtPaGi/vHQ4wIf0dS++FK6GeFlyXP7n8EBiQ7jDqdwSzWFIl6wqxrokPNA8ERI0m5 /9bnF4SM5DsbO+XTgvY7Y7zKzhrfiJd1+4nSoSktDTp+vQGUly6lDDXEPRFTZW7e91WO Rd74VZs57BDW5VP/BvagH4PhPG8E/sbKtchASYRdU8KqPeMQ4CkmI4QUFG63w9I88QPF wh6WjdbSpLLnOYYMLG6emtBOZ/Go9SrPl2IWkMtxN7cxdghFERqCrD7w08CDLr3wieuo Yo+vV75M5SFgaXQN0I+5F8tI8jP9FYvgzhhjkxGIwZ9IC43YV064WoI7UqvvROM0oDya hG5w== X-Gm-Message-State: AOAM530sbYTxSZOcM0d/weAeGCJox3v2ZXgdt9UUVy04OqH2MirP0Y4G F5Uu+StJHmUdoVGxdR+YQJMqq9JO257UDP4DTYIVBf3EAAyXFA== X-Google-Smtp-Source: ABdhPJwcj6X2ueOCRYDqTSpsJucuSZkVnyg4N8tythS7AlGkuJXoq/8cOgp3dcQZvUB6R+isZ+2iPxSIRtk7iDQ3ht0= X-Received: by 2002:ac8:3261:: with SMTP id y30mr5721674qta.242.1601146492172; Sat, 26 Sep 2020 11:54:52 -0700 (PDT) MIME-Version: 1.0 References: <202009261702.08QH2AQ1055654@gndrsh.dnsmgr.net> In-Reply-To: <202009261702.08QH2AQ1055654@gndrsh.dnsmgr.net> From: Warner Losh Date: Sat, 26 Sep 2020 12:54:41 -0600 Message-ID: Subject: Re: svn commit: r365643 - head/bin/cp To: "Rodney W. Grimes" Cc: Ian Lepore , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4BzHyj2vWgz3gbd X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=gLPYZqvB; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::82c) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.29 / 15.00]; ARC_NA(0.00)[]; MAILMAN_DEST(0.00)[svn-src-head]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-0.99)[-0.991]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.92)[-0.921]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.38)[-0.379]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::82c:from]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_TLS_ALL(0.00)[]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 26 Sep 2020 18:54:54 -0000 On Sat, Sep 26, 2020 at 11:02 AM Rodney W. Grimes wrote: > > > On Fri, 2020-09-25 at 10:55 -0700, Rodney W. Grimes wrote: > > > > I was under the impression from previous reading and kib's response > > > > that this is a complete non-issue, there's no way you can go > > > > multi-user without a mounted /dev and we go to somewhat great > > > > lengths to make sure we're good. > > > > > > Though kib can assert that, it does not change the fact that I > > > frequently find /dev/null FILES on unmounted root file systems. > > > > > > But lets not mix the 2 separate things of boot time /dev dependency > > > and build time /dev dependency. > > > > If you look in sys/kern/vfs_mountroot.c you can see that the code to > > mount /dev is invoked unconditionally as the first step of mounting > > root, and that all the calls it makes to get devfs mounted have their > > results checked with KASSERTs. > > > > That's pretty strong evidence that devfs is mounted before rc scripts > > run. That creates a situation where you are making an extraordinary > > claim, so you need to provide extraordinary evidence to support it. A > > sequence of actions that allows others to recreate the situation would > > do the trick. > > I have provided ways one can look for this file in > other messages of the threads. A dump of a UFS root > can show it up, and iirc you can find it in a > zfs send of a boot dataset. > You've not provided a step-by-step way to recreate the issue leading to the /dev/null file, however. Absent that, it's going to be really hard to fix it. > (A question that occurs to me: could it be that the files you've seen > > got created at shutdown after devfs was unmounted, rather than at > > startup? I don't know enough about the shutdown sequence to know > > whether that's possible.) > > Its not "the files" it is "a file, /dev/null". And yes, it could > be very possible that it is during shutdown. Sadly the files is > usually of 0 length so leave little clue as to what is creating them. > And there's the rub: how did this file come to exist? I'm certain it isn't booting or shutting down the system based on when devfs is mounted (before init) and unmounted (it's not done by the shutdown scripts). Now, it's always possible there's a hole in my understanding of the sequence of events. But given the examination of code, it's crazy to think this could be created by anything but some weird bug. That's why a step-by-step from scratch guide is needed. Im happy to look into it, but I need a bit more to go on. Warner From owner-svn-src-head@freebsd.org Sat Sep 26 18:58:43 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 898BA426384; Sat, 26 Sep 2020 18:58:43 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-ot1-x32a.google.com (mail-ot1-x32a.google.com [IPv6:2607:f8b0:4864:20::32a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BzJ365Lm2z3gr5; Sat, 26 Sep 2020 18:58:42 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: by mail-ot1-x32a.google.com with SMTP id q21so5595703ota.8; Sat, 26 Sep 2020 11:58:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QDZbLshpe9GIYTRFk5EgkkUDvnWXoQ35ASeH5scuy70=; b=DYB4G7YWs0E2NP6EjM/Jdf2g7exYzAa3znh73CY1iBLuHxGRz5ShxMip2NP3BtVOOv YmryvbnlF5wyA6++hWQSS8dxxCzdFW+hDpp9TTJp3zL51aiiFuRwz5PQJ2XgalwPb72M FDIFzUu3brzuZzXg2agrK5Aw3NrIubA+oY0rLVaHqkPLVwKlvooFyYnvgdzHO3lOLax3 vQSNHt5JUvp04e/0ZDGniQU9oUELvVzMIgdLF7c/vz2v02gv3PJLuycvQvULeRyBIDYm f68qJ9QvydyCwziPruDELRc4gjHWZC1ls1rNr5edcjVUzECucLmOphP7/28/JdTGkowZ v6GA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QDZbLshpe9GIYTRFk5EgkkUDvnWXoQ35ASeH5scuy70=; b=SSxtDR5yIfQc8PvaYWLWiGweJf8oScLv6UKgtTjDGpNbdQD47ymExtBYbJoyRDqfv7 RjG51zAKcE4ICvLCfzproJJKPeEpsk2POFNJ3S7QtG+rWP98RYhYA78uXHPmDaR6+WMZ HlPIWFylP6FJrPkDzJ68uKU4Va+D1sqwpTDiawLxjpnoqNgHoxHXPKcnjEz3lN+WSwKE vKFun9ObwK/OL8My4J8XewZBUrBK0sCweDHp8xxXtDyCaxQgtdzTPSDCUz9z52N7Lu1f JoVq+RJf0BdZNH194Kh6KGbf0rBo+1apkEuxyIE6j93XLU4a6fIozyAtJ6Ev75o/BJhy nE+A== X-Gm-Message-State: AOAM530pEN1N9ljMQndblLf6E0SFCme25kjsVZj3h9Er0epkO/FzRHOO Z5fWEReGR//0uzyQaHrsyBqPvgLPATcTamJG/OOVY+XL8KM= X-Google-Smtp-Source: ABdhPJwn9I/JXPkjAOl9zfU+JPzsewOQbmKAKJ299LCZVZWgt2wEmJ1fwjihkjUK2Pm0pI6gllv/h2S6Ev5sAMlrnbE= X-Received: by 2002:a9d:3407:: with SMTP id v7mr4088257otb.117.1601146721385; Sat, 26 Sep 2020 11:58:41 -0700 (PDT) MIME-Version: 1.0 References: <202009261702.08QH2AQ1055654@gndrsh.dnsmgr.net> In-Reply-To: From: Benjamin Kaduk Date: Sat, 26 Sep 2020 11:58:30 -0700 Message-ID: Subject: Re: svn commit: r365643 - head/bin/cp To: Warner Losh Cc: "Rodney W. Grimes" , Ian Lepore , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4BzJ365Lm2z3gr5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=DYB4G7YW; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of bjkfbsd@gmail.com designates 2607:f8b0:4864:20::32a as permitted sender) smtp.mailfrom=bjkfbsd@gmail.com X-Spamd-Result: default: False [-2.91 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.00)[-1.003]; FROM_HAS_DN(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; NEURAL_SPAM_SHORT(0.11)[0.106]; NEURAL_HAM_LONG(-1.02)[-1.016]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::32a:from]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 26 Sep 2020 18:58:43 -0000 On Sat, Sep 26, 2020 at 11:55 AM Warner Losh wrote: > And there's the rub: how did this file come to exist? I'm certain it isn't > booting or shutting down the system based on when devfs is mounted (before > init) and unmounted (it's not done by the shutdown scripts). Now, it's > always possible there's a hole in my understanding of the sequence of > events. But given the examination of code, it's crazy to think this could > be created by anything but some weird bug. That's why a step-by-step from > scratch guide is needed. Im happy to look into it, but I need a bit more to > go on. > > I don't think it's terribly complicated; either set up a multi-boot system or pull the physical drive with / from one machine, and mount it while booted into a different environment. Then, chroot into it and do ... just about anything. If you didn't mount devfs before chrooting, then you get a file /dev/null (and some really confused errors from, e.g., buildworld!). -Ben From owner-svn-src-head@freebsd.org Sat Sep 26 19:14:28 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7E5744264E3; Sat, 26 Sep 2020 19:14:28 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BzJPJ0Gbpz3yCj; Sat, 26 Sep 2020 19:14:27 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 08QJEEFr018497 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 26 Sep 2020 22:14:17 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 08QJEEFr018497 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 08QJEElD018496; Sat, 26 Sep 2020 22:14:14 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 26 Sep 2020 22:14:14 +0300 From: Konstantin Belousov To: rgrimes@freebsd.org Cc: Ian Lepore , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r365643 - head/bin/cp Message-ID: <20200926191414.GA2643@kib.kiev.ua> References: <202009261702.08QH2AQ1055654@gndrsh.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202009261702.08QH2AQ1055654@gndrsh.dnsmgr.net> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 4BzJPJ0Gbpz3yCj X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 26 Sep 2020 19:14:28 -0000 On Sat, Sep 26, 2020 at 10:02:10AM -0700, Rodney W. Grimes wrote: > > > On Fri, 2020-09-25 at 10:55 -0700, Rodney W. Grimes wrote: > > > > I was under the impression from previous reading and kib's response > > > > that this is a complete non-issue, there's no way you can go > > > > multi-user without a mounted /dev and we go to somewhat great > > > > lengths to make sure we're good. > > > > > > Though kib can assert that, it does not change the fact that I > > > frequently find /dev/null FILES on unmounted root file systems. > > > > > > But lets not mix the 2 separate things of boot time /dev dependency > > > and build time /dev dependency. > > > > If you look in sys/kern/vfs_mountroot.c you can see that the code to > > mount /dev is invoked unconditionally as the first step of mounting > > root, and that all the calls it makes to get devfs mounted have their > > results checked with KASSERTs. > > > > That's pretty strong evidence that devfs is mounted before rc scripts > > run. That creates a situation where you are making an extraordinary > > claim, so you need to provide extraordinary evidence to support it. A > > sequence of actions that allows others to recreate the situation would > > do the trick. > > I have provided ways one can look for this file in > other messages of the threads. A dump of a UFS root > can show it up, and iirc you can find it in a > zfs send of a boot dataset. > > > > > (A question that occurs to me: could it be that the files you've seen > > got created at shutdown after devfs was unmounted, rather than at > > startup? I don't know enough about the shutdown sequence to know > > whether that's possible.) > > Its not "the files" it is "a file, /dev/null". And yes, it could > be very possible that it is during shutdown. Sadly the files is > usually of 0 length so leave little clue as to what is creating them. Out of curiosity I checked it on 3 of my machines, oldest of them was installed in 2014 and had numerous issues with boot and shutdown meantime. Roots are on UFS, and everywhere I see solo% sudo dump -0 -f - / | (cd /tmp && restore -i -f -) ~ DUMP: WARNING: should use -L when dumping live read-write filesystems! DUMP: Date of this level 0 dump: Sat Sep 26 22:07:39 2020 DUMP: Date of last level 0 dump: the epoch DUMP: Dumping /dev/nda0p2 (/) to standard output DUMP: mapping (Pass I) [regular files] DUMP: mapping (Pass II) [directories] DUMP: estimated 785484 tape blocks. DUMP: dumping (Pass III) [directories] DUMP: dumping (Pass IV) [regular files] restore > cd /dev restore > ls ./dev: restore > quit DUMP: Broken pipe DUMP: The ENTIRE dump is aborted. So for me the question how do you get your /dev/null on root is open. From owner-svn-src-head@freebsd.org Sat Sep 26 19:22:30 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DEB21426AC5 for ; Sat, 26 Sep 2020 19:22:30 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x82e.google.com (mail-qt1-x82e.google.com [IPv6:2607:f8b0:4864:20::82e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BzJZY6zjNz3yr1 for ; Sat, 26 Sep 2020 19:22:29 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x82e.google.com with SMTP id y11so5154739qtn.9 for ; Sat, 26 Sep 2020 12:22:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7lCaOLt5kkAIVsJhqY2uGEKFrSOPFSv+ZTvYYH4ZfIU=; b=mbAY1YLcJcZ+rOORNxhlAq/a6NC7mgTsgbQyyBzZjwoGSRv9ZYLlUQLggtOpekWWOW MsDUdobPqeNNy30SM7qx5xibLRcAsi1UoW09KRhwdENj5Z/rpcaFVG39veq4cDfysmlS XZPZh0LknOAuDBkdsa7BZgZdmyjAaIlXWZs47yhErkDv+nnkAzTnpcRQveSa2X6aMirM C7LHvZc94bAXvzi70weFDkMymUTiFwPMrvDk6Ldt41RAfw+1+iyxlwQarAXCTJi8Q2fj 6mjqPgwU1Tv6bUnwQtiQwVBXQwLmpKV9IGlIguiM34eKgVVriKlqX0FMH4F4blIcpRYd rLpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7lCaOLt5kkAIVsJhqY2uGEKFrSOPFSv+ZTvYYH4ZfIU=; b=qf2Ytijr14a7qwyi4MaPflAiTVV/Y/RrjLnbmb8XbojjminuTtoFcWwpLdo+s2dR0u 8bWQZog/l3P+jFZ6MEiOwLo5Mn/sdaPgUq2odYrxF4BrZjWd+kwmY29lYZ6vvZszwxkJ bvV5645LG1Z0yrRcPoe6gZBmpvG4Zl4uHR3bxbDJhjrkFigAqF5pLgSm2PrTSQ/NX5po pt+AV4d1mXpD6GRHuY8qGbn4GaDKokaUv85ujW58q9OBQz6wsTyM9C3iB+4gi2uko/Mo 4Gxo55DSwZpgXHeRb2NymJJVzLj1bf7AAIojV/NSAnrzqYlYgyB7tNMJ4T+YWlHdY+Lm IDHQ== X-Gm-Message-State: AOAM531kM3AegBQ9MK9yaW23oLC+hCT6+u7zdV0Mi3OqK2ebpv+VAeRa hkeyFdiUO3PCn2stDmNxb1pivzXls3YaPKBX4HF0fg== X-Google-Smtp-Source: ABdhPJzeVG1pp4BBiguZxyP/BlJG48CM7LWHasDF6cF6R9JcslLTPugZI5KwUSdz/bQXeTefhd+A859f7W2huF0wwgk= X-Received: by 2002:ac8:4cd0:: with SMTP id l16mr5611476qtv.175.1601148148849; Sat, 26 Sep 2020 12:22:28 -0700 (PDT) MIME-Version: 1.0 References: <202009261828.08QISIww055941@gndrsh.dnsmgr.net> In-Reply-To: From: Warner Losh Date: Sat, 26 Sep 2020 13:22:17 -0600 Message-ID: Subject: Re: svn commit: r366186 - in head/usr.sbin: bsdconfig/share/media bsdinstall/scripts To: Niclas Zeising Cc: "Rodney W. Grimes" , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4BzJZY6zjNz3yr1 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=mbAY1YLc; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::82e) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-1.11 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-0.97)[-0.971]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.78)[-0.776]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[5]; URI_COUNT_ODD(1.00)[21]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.37)[-0.366]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::82e:from]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; MAILMAN_DEST(0.00)[svn-src-head] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 26 Sep 2020 19:22:30 -0000 On Sat, Sep 26, 2020 at 12:54 PM Niclas Zeising wrote: > On 2020-09-26 20:28, Rodney W. Grimes wrote: > >> On 2020-09-26 20:12, Rodney W. Grimes wrote: > >>>> Author: zeising (doc,ports committer) > >>>> Date: Sat Sep 26 16:27:09 2020 > >>>> New Revision: 366186 > >>>> URL: https://svnweb.freebsd.org/changeset/base/366186 > >>>> > >>>> Log: > >>>> bsdconfig, bsdinstall: Prune dead mirrors > >>>> > >>>> Prune dead mirrors from the list of mirrors in bsdconfig and > bsdinstall. > >>>> All these return NXDOMAIN when trying to resolve them. > >>> > >>> This seems like the wrong place to fix it, as this does > >>> nothing for all the "shipped" releases that contain the > >>> old values. Shouldnt these all just be CNAMED in dns > >>> to a nearest replacement resource? > >>> > >>> > >> > >> Considering that we don't actually have control of the subdomans > >> (CC.freebsd.org) ourselves, that is trickier than it might sound. > > > > How can freebsd.org NOT have ultimate control over deligations? > > If things have become "lame" in a deligated zone the deligation > > can and should be pulled and replaced with local data. > > > > This is cc.freebsd.org, not freebsd.org.cc! > > I am the wrong person to answer that question. > > In this case, things have not become lame. For instance, the names > ervers for se.freebsd.org work fine, but ftp3.se and ftp6.se records are > removed. Same for ru.freebsd.org and ftp4.ru. > I'm merely pointing out that changing ftp.CC.freebsd.org usually > requires contacting the person(s) maintaining the CC.freebsd.org zone, > which is usually not the project. > It's usually people associated with the project in some way, but who might not be as responsive as cluster admin. These domains have been delegated, so we have to get the delegated admin to make the changes, which can take a bit of time to chase down and doesn't lend itself to easy / automated coping with this situation. Warner From owner-svn-src-head@freebsd.org Sat Sep 26 19:35:02 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6E0294270AA for ; Sat, 26 Sep 2020 19:35:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qv1-xf34.google.com (mail-qv1-xf34.google.com [IPv6:2607:f8b0:4864:20::f34]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BzJs15NPyz40JX for ; Sat, 26 Sep 2020 19:35:01 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qv1-xf34.google.com with SMTP id cy2so3333267qvb.0 for ; Sat, 26 Sep 2020 12:35:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=l7KvjvXECNc7nKOV/otTP5co+bAwHJwaU4Hbs1b+NmI=; b=lxFk/TdHkQHmyn4QaLmfDbyNpr7gRdPCaZ3wUzlqaJldAv0wMfRNxP2L9k7hd4qDEG 9Xt8i7yzOfiTIedrWL4wo4WqyX2T5/u1ay97wxvSvnL12m53qGmwlll3bJiP5kWX9kvL lPKfHpqtK4aE8RniYieTCZ54vrPF2leQoCudaeCNuavuVJ74mQjhfEzKIuzQG469psAJ s2ImB8bSS+0KcTDBbmGaHiNlYCYRnjZkMwYmLmJPLg6+2DkigoUfo6anEdwlvkMfA8p9 nfe5ZYCTWAxvXTU9o9g47NmadQCEcMgcthiAG1OzFsELVdmrRLvDB0Mh9T/WPDmlIygf qFWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=l7KvjvXECNc7nKOV/otTP5co+bAwHJwaU4Hbs1b+NmI=; b=ViUrJbDKITlTylpwRp/oQBRLtqNPo75ULil0hrEebYlZ2PbLqUD7qPKOT9irU9ngZe wnFK+pcTyYLRHdY1Wy9gAkXW9KtbyzphHwWszZ/pnCHQqtNvPpKPfzOyOaJEd+6Wlpet dWl1Zg/Ggmfiur32ISiykb69bm/B7A3rZW06vZPJi1k1qqjoDc+FhizOcOMzDNWTn3iG PH8JyQzIgi4i7tGMJ6YfRQ56uwPK78xjkxsizXfVPCU7uPkwgLW/OiP0r9ri/RLgRHYH 4Dj3ck8e0pU0zcol1ZGPMfv0sCYRMNHXgDbn+fChSD9iwMXjvSAJ+MhxtvfhFgTIuN6/ RhQw== X-Gm-Message-State: AOAM531el+MBqJmawrifKdbNsM9Ix0PQ35V6YYBKMvvNs1gKl1eFe6Oq bLcD6XyHeX2ahbr/HyKSms8em7INlhtuo9zDafC9Gg== X-Google-Smtp-Source: ABdhPJxlLQwWxy62GBKbcLmyCNBbIYTKpyZkVHS1r7mBLjiEsgxrkNpqLs6GXG1KsaHJrbGoBI/nmXSUEMTdMdCKs4I= X-Received: by 2002:a0c:a162:: with SMTP id d89mr5041064qva.28.1601148900755; Sat, 26 Sep 2020 12:35:00 -0700 (PDT) MIME-Version: 1.0 References: <202009261702.08QH2AQ1055654@gndrsh.dnsmgr.net> In-Reply-To: From: Warner Losh Date: Sat, 26 Sep 2020 13:34:49 -0600 Message-ID: Subject: Re: svn commit: r365643 - head/bin/cp To: Benjamin Kaduk Cc: "Rodney W. Grimes" , Ian Lepore , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4BzJs15NPyz40JX X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=lxFk/TdH; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::f34) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.10 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-0.94)[-0.942]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.76)[-0.756]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.40)[-0.403]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::f34:from]; R_SPF_NA(0.00)[no SPF record]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; MAILMAN_DEST(0.00)[svn-src-head]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 26 Sep 2020 19:35:02 -0000 On Sat, Sep 26, 2020 at 12:58 PM Benjamin Kaduk wrote: > On Sat, Sep 26, 2020 at 11:55 AM Warner Losh wrote: > >> And there's the rub: how did this file come to exist? I'm certain it isn't >> booting or shutting down the system based on when devfs is mounted (before >> init) and unmounted (it's not done by the shutdown scripts). Now, it's >> always possible there's a hole in my understanding of the sequence of >> events. But given the examination of code, it's crazy to think this could >> be created by anything but some weird bug. That's why a step-by-step from >> scratch guide is needed. Im happy to look into it, but I need a bit more >> to >> go on. >> >> > I don't think it's terribly complicated; either set up a multi-boot system > or > pull the physical drive with / from one machine, and mount it while booted > into a different environment. Then, chroot into it and do ... just about > anything. > If you didn't mount devfs before chrooting, then you get a file /dev/null > (and some > really confused errors from, e.g., buildworld!). > I think there's two different things that are being talked about here. Let's not confuse the two. The first is making the build system not depend on /dev/null. You'll find that's hard to do if you and try to do it since /dev/null is used about 200 times in the current build system in about a dozen different ways. Some are easy, most are a bit tricky since you can't just close stdout/stderr because then any files opened by the program will get those FDs and printf/fprint(stderr, will collide. This dependency won't be fixed any time soon, though I could add a seatbelt to buildworld/buildkernel that ensures that /dev/null is a character device. The second is a report that /dev/null is created all the time through normal means before devfs can be mounted. However, several people have looked and found no evidence on their system. This means there's something special / unique to Rod's setup that's generating them (assuming it isn't a simple chroot without devfs). What that is, and how they come to be, hasn't been explained in enough detail to reproduce. That's what people are asking Rod about: how do we get there? How did it happen? Once we know those answers, we can fix it. Warner From owner-svn-src-head@freebsd.org Sat Sep 26 19:50:14 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B6310427417; Sat, 26 Sep 2020 19:50:14 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-oi1-x241.google.com (mail-oi1-x241.google.com [IPv6:2607:f8b0:4864:20::241]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BzKBZ1FMvz41Vn; Sat, 26 Sep 2020 19:50:13 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: by mail-oi1-x241.google.com with SMTP id i17so6717472oig.10; Sat, 26 Sep 2020 12:50:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jl3MBACx5GWXS1PYPvyRxneAi0ZoY+ltDy9NNo+YVTo=; b=X920Ii1pPwyAbIsFP0fLEE22i2Ym3uMdm+fMdjIbWd4xyWUhaul6v7WO/BMxiZ5WA0 wi1sQjw78GoAHoUjr5haF70/IoE+5BJWQT8l1Ulb86bR+4nuPBfdSLdF70UQqiZ04CXr EWCB2KEC/NgmmDC8lSLUUIMokjVG6cYaPDyvF+01vFuum3XnX35O2GUwAPBaFog/igX2 JdkKX6luDDVDt1+Nxdp9ARfaAH9Yz8NaqLWQQ9hp6ItnIHKcWD9JqtZ0/JEKD0cYCoW1 7Vj5BdGLv6SaL078MTbJOSMgffQPSMmtgKN2FQbX63d6/V2+ENAeOYaorPPsm2tuHR++ fIYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jl3MBACx5GWXS1PYPvyRxneAi0ZoY+ltDy9NNo+YVTo=; b=F21mHO6drKl8fHFY9sx+ETfddeFfSP1YYD6x7JZniXZrLnGS2kWBC6LnI7ZX7bJT7f f/+f0XvGC2hg9m5fYF+Zu/qRpLRDtvwOvyYwuesNkd8c80Yk9/LKsr0TUTSzS7egGgtR rQhza65I6JR7+4q6YfauiJIngELm1Sov0xWysntdNF5dnFLxUtwNoTDtQ8o68w/UGnEy crwB3Pd13jTyvSMCvBzO4YidA6xP4rjaS9d1eRqHaIHLnFA+8ZGsC5J+l3rgXOQ2YpE0 BH33a3jWSnITDGxiUs9IOPYb9asZW7Y58JU9c1MDzGe2N5DD66n2NnXeU0xzLlh24SkR gtNg== X-Gm-Message-State: AOAM532BUEOn/hQ76hFnbMAunnpPwW8CfbZIjGObvRMJHHsMgtCbc9V+ MN205VhJCWf2ZLcYiBtfZrjcqQim01yCVGiN/Npoerp+kvQ= X-Google-Smtp-Source: ABdhPJy71ubemaFXrVZRTJsYgHIN4xa1v/uTUfcPPo0ywW13QdM2QOgEsxX9pNZCk1kVnEO0dWTajGVCRbWsSrlY7wU= X-Received: by 2002:aca:220e:: with SMTP id b14mr1889075oic.97.1601149812251; Sat, 26 Sep 2020 12:50:12 -0700 (PDT) MIME-Version: 1.0 References: <202009261702.08QH2AQ1055654@gndrsh.dnsmgr.net> In-Reply-To: From: Benjamin Kaduk Date: Sat, 26 Sep 2020 12:50:01 -0700 Message-ID: Subject: Re: svn commit: r365643 - head/bin/cp To: Warner Losh Cc: "Rodney W. Grimes" , Ian Lepore , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4BzKBZ1FMvz41Vn X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=X920Ii1p; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of bjkfbsd@gmail.com designates 2607:f8b0:4864:20::241 as permitted sender) smtp.mailfrom=bjkfbsd@gmail.com X-Spamd-Result: default: False [-2.93 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.003]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; NEURAL_SPAM_SHORT(0.09)[0.086]; NEURAL_HAM_LONG(-1.02)[-1.016]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::241:from]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 26 Sep 2020 19:50:14 -0000 On Sat, Sep 26, 2020 at 12:35 PM Warner Losh wrote: > > > On Sat, Sep 26, 2020 at 12:58 PM Benjamin Kaduk wrote: > >> On Sat, Sep 26, 2020 at 11:55 AM Warner Losh wrote: >> >>> And there's the rub: how did this file come to exist? I'm certain it >>> isn't >>> booting or shutting down the system based on when devfs is mounted >>> (before >>> init) and unmounted (it's not done by the shutdown scripts). Now, it's >>> always possible there's a hole in my understanding of the sequence of >>> events. But given the examination of code, it's crazy to think this could >>> be created by anything but some weird bug. That's why a step-by-step from >>> scratch guide is needed. Im happy to look into it, but I need a bit more >>> to >>> go on. >>> >>> >> I don't think it's terribly complicated; either set up a multi-boot >> system or >> pull the physical drive with / from one machine, and mount it while booted >> into a different environment. Then, chroot into it and do ... just about >> anything. >> If you didn't mount devfs before chrooting, then you get a file /dev/null >> (and some >> really confused errors from, e.g., buildworld!). >> > > I think there's two different things that are being talked about here. > Let's not confuse the two. > > I agree there are two different things going on here. My apologies for using buildworld as an example of "something that writes to /dev/null" when any other example would have done just as well. > The first is making the build system not depend on /dev/null. You'll find > that's hard to do if you and try to do it since /dev/null is used about 200 > times in the current build system in about a dozen different ways. Some are > easy, most are a bit tricky since you can't just close stdout/stderr > because then any files opened by the program will get those FDs and > printf/fprint(stderr, will collide. This dependency won't be fixed any > time soon, though I could add a seatbelt to buildworld/buildkernel that > ensures that /dev/null is a character device. > > The second is a report that /dev/null is created all the time through > normal means before devfs can be mounted. However, several people have > looked and found no evidence on their system. This means there's something > special / unique to Rod's setup that's generating them (assuming it isn't a > simple chroot without devfs). What that is, and how they come to be, hasn't > been explained in enough detail to reproduce. That's what people are asking > Rod about: how do we get there? How did it happen? Once we know those > answers, we can fix it. > > I was reading the thread differently than that. In particular, I saw observations that some people had a file /dev/null on their root filesystem, and speculation that it appeared during early boot or shutdown. In particular, I did not see specific reports that it was created during early shutdown, just speculation. Such speculation has since been thoroughly debunked, but the observations of a /dev/null file remain. It is easy to get such a /dev/null file on your root filesystem, you just have to arrange for that filesystem to not actually *be* the root filesystem when the file is created. So ... "nothing to see here"? -Ben From owner-svn-src-head@freebsd.org Sat Sep 26 20:01:15 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AD7CF4279CD for ; Sat, 26 Sep 2020 20:01:15 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BzKRG5JW7z42Zx for ; Sat, 26 Sep 2020 20:01:14 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x731.google.com with SMTP id g72so6549568qke.8 for ; Sat, 26 Sep 2020 13:01:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EN3Kti6OFXbaZoQGWmy58mWfxYl0SeXOr0nwO4hKfqU=; b=cw1J73UjWE+czdPCFQj+VH4xTnaDxduUmJjXHJ5EcXE7vb61CAMRQnlS81jDWEnE1t U4km8h+pC/HRbR7bhfmC0cgTSGtmSJa/UHwEWSMB7ajNSl6ThKOQeHi67HtqvdJhGXhh 3Nn+aQeUtHRFg+wKtbqwIp0lfCXO91uGoJYeeoPN8Z15k71okSAUflEz4I1+kaxoqdkZ 1av80lXT6HZ/ub8V8/KPrwndVVPA/QAXPcbCxBSNyOr7cjl3Sa/WUPtHK829CIZLV9Lf X6AqtcqLgu1kkvrMcAu+s6aQBYJldFRv+nD5I4rqKN9cdxoe6lMXYERwFOgcz9PZBE8Z tCpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EN3Kti6OFXbaZoQGWmy58mWfxYl0SeXOr0nwO4hKfqU=; b=hvid2x0d8y8J3BB7j0AFS5P3Rf2vcNNKDTRR4y174H/8SdUIZKJlfFf9fZa4+/OaqN thqYRsXsGk1sygdapRpjDLNOvfxD/iyTL2kDQAe4Grqux0e0aGZL3QsBZtUQBICITejv anBUFoSRsAPHCISYVS2oCHkZm4z1yAo5Mgu2qkKjDNU5/s8EtfJwJfkHFtbgOZ53rKKc 3LjI0ZWUg9zh/jvcXPWTtI+91rIQy970ictsrV0LvB4cb/idESADtbwO6Ci+0JWykuKD 9fdMf2WpnnCrwHVRdq5BXxPRd5HFdeYbmEZ525OfrE0mPYgVMXvoMhwD6AqHuYfuCDpA ou9A== X-Gm-Message-State: AOAM532GpugvoZxtRJKW/7FG0aYpRubETC+LVG8/j6wmNg45tsuTB2bl yMJe0ZkHw3i61JCeTzMixkZW9aFa0CibXkps0wKeGQ== X-Google-Smtp-Source: ABdhPJzza/ZDQ5AR2uzNE7uXlsWY/woC7hS0A0mrWcZycgzo3/88S65EgAndzMNFzOu3uJ6xKlshrNCb2fkzXWz80Gk= X-Received: by 2002:a05:620a:1583:: with SMTP id d3mr5643178qkk.495.1601150473810; Sat, 26 Sep 2020 13:01:13 -0700 (PDT) MIME-Version: 1.0 References: <202009261702.08QH2AQ1055654@gndrsh.dnsmgr.net> In-Reply-To: From: Warner Losh Date: Sat, 26 Sep 2020 14:01:01 -0600 Message-ID: Subject: Re: svn commit: r365643 - head/bin/cp To: Benjamin Kaduk Cc: "Rodney W. Grimes" , Ian Lepore , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4BzKRG5JW7z42Zx X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=cw1J73Uj; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::731) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.11 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-0.94)[-0.942]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.76)[-0.759]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.41)[-0.409]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::731:from]; R_SPF_NA(0.00)[no SPF record]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; MAILMAN_DEST(0.00)[svn-src-head] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 26 Sep 2020 20:01:15 -0000 On Sat, Sep 26, 2020, 1:50 PM Benjamin Kaduk wrote: > On Sat, Sep 26, 2020 at 12:35 PM Warner Losh wrote: > >> >> >> On Sat, Sep 26, 2020 at 12:58 PM Benjamin Kaduk >> wrote: >> >>> On Sat, Sep 26, 2020 at 11:55 AM Warner Losh wrote: >>> >>>> And there's the rub: how did this file come to exist? I'm certain it >>>> isn't >>>> booting or shutting down the system based on when devfs is mounted >>>> (before >>>> init) and unmounted (it's not done by the shutdown scripts). Now, it's >>>> always possible there's a hole in my understanding of the sequence of >>>> events. But given the examination of code, it's crazy to think this >>>> could >>>> be created by anything but some weird bug. That's why a step-by-step >>>> from >>>> scratch guide is needed. Im happy to look into it, but I need a bit >>>> more to >>>> go on. >>>> >>>> >>> I don't think it's terribly complicated; either set up a multi-boot >>> system or >>> pull the physical drive with / from one machine, and mount it while >>> booted >>> into a different environment. Then, chroot into it and do ... just >>> about anything. >>> If you didn't mount devfs before chrooting, then you get a file >>> /dev/null (and some >>> really confused errors from, e.g., buildworld!). >>> >> >> I think there's two different things that are being talked about here. >> Let's not confuse the two. >> >> > I agree there are two different things going on here. My apologies for > using buildworld as an example of "something that writes to /dev/null" when > any other example would have done just as well. > > >> The first is making the build system not depend on /dev/null. You'll find >> that's hard to do if you and try to do it since /dev/null is used about 200 >> times in the current build system in about a dozen different ways. Some are >> easy, most are a bit tricky since you can't just close stdout/stderr >> because then any files opened by the program will get those FDs and >> printf/fprint(stderr, will collide. This dependency won't be fixed any >> time soon, though I could add a seatbelt to buildworld/buildkernel that >> ensures that /dev/null is a character device. >> >> The second is a report that /dev/null is created all the time through >> normal means before devfs can be mounted. However, several people have >> looked and found no evidence on their system. This means there's something >> special / unique to Rod's setup that's generating them (assuming it isn't a >> simple chroot without devfs). What that is, and how they come to be, hasn't >> been explained in enough detail to reproduce. That's what people are asking >> Rod about: how do we get there? How did it happen? Once we know those >> answers, we can fix it. >> >> > I was reading the thread differently than that. In particular, I saw > observations that some people had a file /dev/null on their root > filesystem, and speculation that it appeared during early boot or > shutdown. In particular, I did not see specific reports that it was > created during early shutdown, just speculation. Such speculation has > since been thoroughly debunked, but the observations of a /dev/null file > remain. It is easy to get such a /dev/null file on your root filesystem, > you just have to arrange for that filesystem to not actually *be* the root > filesystem when the file is created. So ... "nothing to see here"? > Yes. The file is presented, but no scenario has been given to create it. So, if there is a common way to get this file, that would be good to know.. Even if the answer is something like bsdinstall has a bug, or something like that... Warner -Ben > From owner-svn-src-head@freebsd.org Sat Sep 26 21:47:12 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5421C3E1C10; Sat, 26 Sep 2020 21:47:12 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BzMnX17Xzz470q; Sat, 26 Sep 2020 21:47:12 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0A44C2A5C1; Sat, 26 Sep 2020 21:47:12 +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 08QLlBXG032047; Sat, 26 Sep 2020 21:47:11 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08QLlBMV032046; Sat, 26 Sep 2020 21:47:11 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <202009262147.08QLlBMV032046@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 26 Sep 2020 21:47:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366188 - head/sys/mips/include X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/mips/include X-SVN-Commit-Revision: 366188 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 26 Sep 2020 21:47:12 -0000 Author: jhibbits Date: Sat Sep 26 21:47:11 2020 New Revision: 366188 URL: https://svnweb.freebsd.org/changeset/base/366188 Log: Check for the only 32-bit MIPS ABIs we support, rather than !n64 There may be additional 64-bit ABIs supported, so use a positive check rather than a negative check. Suggested by: imp MFC after: 1 week Sponsored by: Juniper Networks, Inc Modified: head/sys/mips/include/elf.h Modified: head/sys/mips/include/elf.h ============================================================================== --- head/sys/mips/include/elf.h Sat Sep 26 21:45:33 2020 (r366187) +++ head/sys/mips/include/elf.h Sat Sep 26 21:47:11 2020 (r366188) @@ -105,7 +105,7 @@ typedef struct { /* Auxiliary vector entry on initial int a_type; /* Entry type. */ union { int a_val; /* Integer value. */ -#ifndef __mips_n64 +#if defined(__mips_o32) || defined(__mips_n32) void *a_ptr; /* Address. */ void (*a_fcn)(void); /* Function pointer (not used). */ #endif From owner-svn-src-head@freebsd.org Sat Sep 26 22:11:19 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1D8033E20F4; Sat, 26 Sep 2020 22:11:19 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BzNKL1qfNz47pk; Sat, 26 Sep 2020 22:11:17 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id A3F202CE; Sat, 26 Sep 2020 18:11:15 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Sat, 26 Sep 2020 18:11:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsco.org; h= content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=fm1; bh=K swngZldpD8VsZqOEa/MUCAal6hM59w53sibZ2qsbAQ=; b=Eust5sPylxV9/9qI7 mujn1nkQgrbRbADjcu68AEuHXbeM3C1EUBtHgL5lgbbqi5whJ2/xsat/zRC8BcDh 6MusfY7aatetfxUMaDDcRRRmdIyT8OlOnN6sgw/YyKzkYPGscO/4zTxRRx1FJ/yC KF2DcWWTDF6T6ZPrcYQpUGKAHL2nS/swyva1DDbxIi66hWq53FctoSToiwTzCxjv +zdyQxIrFuAFlt4+prCWx6sCbFPSNIzNkL8Vt5bCBTOhtg/8GK2xHyvHvVN6hlz/ +qpYrGXD0Flq1fVwreD4+NKeXu81IatsuqbkPwAmleeBO5BI/gOvhvm6HxlXT3d/ EIIHw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=KswngZldpD8VsZqOEa/MUCAal6hM59w53sibZ2qsb AQ=; b=UsqLK0A3WACC6u7yUov2kglkjl8pr5W/RLZCZi3l1eUqOH7uICj1VaAHv hsxkNVd3BozcZe6wS06c43cZBSeEq4jHlcTIRxN0yBK3tkw8lvIPYXytg3Rq34vm 8BW/EmAEKEBvZ8uB45U30PBjfrMG3OWYSqnx9Yfk9QAViXFZRD9w+fiZzoSGhTYU WhsCywfWrAnZTv85RVqTPAO+GvJ/PiHYGBGTpcM4gks1ziNh3l7/qvvFvSlCkgHd 0MdI5k2wZH9W0mVqQWRwo7I0Ypq5e1OANhN4lF5DPItDoVCEUdaGS80C4KMgEU6I 2k2qe40Yc1UQ4UAnK41OAlxzRfglw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvdefgddtudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpegtggfuhfgjfffgkfhfvffosehtqhhmtdhhtdejnecuhfhrohhmpefutghothht ucfnohhnghcuoehstghothhtlhesshgrmhhstghordhorhhgqeenucggtffrrghtthgvrh hnpefgiedtjeefvdetffegfeegjeehhfehveeuheekuedtgeelffejfeetieejtdfhveen ucffohhmrghinhepfhhrvggvsghsugdrohhrghdpfhhtphegrdhruhenucfkphepudejge drudelkedrudejvddrvddvfeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhep mhgrihhlfhhrohhmpehstghothhtlhesshgrmhhstghordhorhhg X-ME-Proxy: Received: from [172.20.10.8] (223.sub-174-198-172.myvzw.com [174.198.172.223]) by mail.messagingengine.com (Postfix) with ESMTPA id DD4C2328005A; Sat, 26 Sep 2020 18:11:13 -0400 (EDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.1\)) Subject: Re: svn commit: r366186 - in head/usr.sbin: bsdconfig/share/media bsdinstall/scripts From: Scott Long In-Reply-To: Date: Sat, 26 Sep 2020 16:11:11 -0600 Cc: Niclas Zeising , "Rodney W. Grimes" , src-committers , svn-src-all , svn-src-head Content-Transfer-Encoding: quoted-printable Message-Id: <608E7E08-D8CB-460A-B632-77BB08A2F61D@samsco.org> References: <202009261828.08QISIww055941@gndrsh.dnsmgr.net> To: Warner Losh X-Mailer: Apple Mail (2.3608.120.23.2.1) X-Rspamd-Queue-Id: 4BzNKL1qfNz47pk X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=samsco.org header.s=fm1 header.b=Eust5sPy; dkim=pass header.d=messagingengine.com header.s=fm3 header.b=UsqLK0A3; dmarc=none; spf=pass (mx1.freebsd.org: domain of scottl@samsco.org designates 64.147.123.25 as permitted sender) smtp.mailfrom=scottl@samsco.org X-Spamd-Result: default: False [-3.40 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[64.147.123.25:from]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:64.147.123.25]; RCPT_COUNT_FIVE(0.00)[6]; RCVD_COUNT_THREE(0.00)[4]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[samsco.org:+,messagingengine.com:+]; NEURAL_HAM_SHORT(-1.31)[-1.311]; RECEIVED_SPAMHAUS_PBL(0.00)[174.198.172.223:received]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:11403, ipnet:64.147.123.0/24, country:US]; RCVD_TLS_LAST(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[64.147.123.25:from]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.992]; R_DKIM_ALLOW(-0.20)[samsco.org:s=fm1,messagingengine.com:s=fm3]; FREEFALL_USER(0.00)[scottl]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[samsco.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 26 Sep 2020 22:11:19 -0000 > On Sep 26, 2020, at 1:22 PM, Warner Losh wrote: >=20 >=20 >=20 > I am the wrong person to answer that question. >=20 > In this case, things have not become lame. For instance, the names=20 > ervers for se.freebsd.org work fine, but ftp3.se and ftp6.se records = are=20 > removed. Same for ru.freebsd.org and ftp4.ru. > I'm merely pointing out that changing ftp.CC.freebsd.org usually=20 > requires contacting the person(s) maintaining the CC.freebsd.org zone,=20= > which is usually not the project. >=20 > It's usually people associated with the project in some way, but who = might not be as responsive as cluster admin. These domains have been = delegated, so we have to get the delegated admin to make the changes, = which can take a bit of time to chase down and doesn't lend itself to = easy / automated coping with this situation. >=20 Just a spitball idea here, but maybe we should consider not embedding = these lists of mirror URLs into the binaries. It seems pretty = straight-forward that the list evolves over time, and that evolution is = not tightly coupled with the updating of the binaries. It sounds like = the pkg and freebsd-update infrastructure use DNS TXT and/or SRV records = to point to the metadata needed to construct a mirror URL list = dynamically. Maybe something similar can be done for bsdconfig? If = it=E2=80=99s not a crazy idea, is there anyone who would be interested = in helping me write a proposal over at arch@? Thanks, Scott From owner-svn-src-head@freebsd.org Sat Sep 26 23:05:39 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 62E2C3E371F; Sat, 26 Sep 2020 23:05:39 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BzPX31RQJz4CnY; Sat, 26 Sep 2020 23:05:39 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0E31A2B66F; Sat, 26 Sep 2020 23:05:39 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08QN5cYC080668; Sat, 26 Sep 2020 23:05:38 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08QN5cj4080667; Sat, 26 Sep 2020 23:05:38 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202009262305.08QN5cj4080667@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sat, 26 Sep 2020 23:05:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366189 - head/sys/fs/nfsserver X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head/sys/fs/nfsserver X-SVN-Commit-Revision: 366189 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 26 Sep 2020 23:05:39 -0000 Author: rmacklem Date: Sat Sep 26 23:05:38 2020 New Revision: 366189 URL: https://svnweb.freebsd.org/changeset/base/366189 Log: Bjorn reported a problem where the Linux NFSv4.1 client is using an open_to_lock_owner4 when that lock_owner4 has already been created by a previous open_to_lock_owner4. This caused the NFS server to reply NFSERR_INVAL. For NFSv4.0, this is an error, although the updated NFSv4.0 RFC7530 notes that the correct error reply is NFSERR_BADSEQID (RFC3530 did not specify what error to return). For NFSv4.1, it is not obvious whether or not this is allowed by RFC5661, but the NFSv4.1 server can handle this case without error. This patch changes the NFSv4.1 (and NFSv4.2) server to handle multiple uses of the same lock_owner in open_to_lock_owner so that it now correctly interoperates with the Linux NFS client. It also changes the error returned for NFSv4.0 to be NFSERR_BADSEQID. Thanks go to Bjorn for diagnosing this and testing the patch. He also provided a program that I could use to reproduce the problem. Tested by: bj@cebitec.uni-bielefeld.de (Bjorn Fischer) PR: 249567 Reported by: bj@cebitec.uni-bielefeld.de (Bjorn Fischer) MFC after: 3 days Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdstate.c Sat Sep 26 21:47:11 2020 (r366188) +++ head/sys/fs/nfsserver/nfs_nfsdstate.c Sat Sep 26 23:05:38 2020 (r366189) @@ -1870,14 +1870,20 @@ tryagain: } if (!error) nfsrv_getowner(&stp->ls_open, new_stp, &lckstp); - if (lckstp) + if (lckstp) { /* - * I believe this should be an error, but it - * isn't obvious what NFSERR_xxx would be - * appropriate, so I'll use NFSERR_INVAL for now. + * For NFSv4.1 and NFSv4.2 allow an + * open_to_lock_owner when the lock_owner already + * exists. Just clear NFSLCK_OPENTOLOCK so that + * a new lock_owner will not be created. + * RFC7530 states that the error for NFSv4.0 + * is NFS4ERR_BAD_SEQID. */ - error = NFSERR_INVAL; - else + if ((nd->nd_flag & ND_NFSV41) != 0) + new_stp->ls_flags &= ~NFSLCK_OPENTOLOCK; + else + error = NFSERR_BADSEQID; + } else lckstp = new_stp; } else if (new_stp->ls_flags&(NFSLCK_LOCK|NFSLCK_UNLOCK)) { /* From owner-svn-src-head@freebsd.org Sat Sep 26 23:20:57 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B18E23E3B85; Sat, 26 Sep 2020 23:20:57 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BzPsh02Sgz4D8Q; Sat, 26 Sep 2020 23:20:55 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 08QNKrjs056872; Sat, 26 Sep 2020 16:20:53 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 08QNKr09056871; Sat, 26 Sep 2020 16:20:53 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202009262320.08QNKr09056871@gndrsh.dnsmgr.net> Subject: Re: svn commit: r365643 - head/bin/cp In-Reply-To: To: Warner Losh Date: Sat, 26 Sep 2020 16:20:53 -0700 (PDT) CC: Benjamin Kaduk , "Rodney W. Grimes" , Ian Lepore , src-committers , svn-src-all , svn-src-head Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4BzPsh02Sgz4D8Q X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@gndrsh.dnsmgr.net has no SPF policy when checking 69.59.192.140) smtp.mailfrom=freebsd@gndrsh.dnsmgr.net X-Spamd-Result: default: False [0.57 / 15.00]; HAS_REPLYTO(0.00)[rgrimes@freebsd.org]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_MEDIUM(-0.23)[-0.234]; NEURAL_HAM_LONG(-0.07)[-0.072]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; DMARC_NA(0.00)[dnsmgr.net]; AUTH_NA(1.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.02)[-0.019]; RCPT_COUNT_SEVEN(0.00)[7]; RCVD_TLS_LAST(0.00)[]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head]; FREEMAIL_CC(0.00)[gmail.com,freebsd.org] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 26 Sep 2020 23:20:57 -0000 > On Sat, Sep 26, 2020 at 12:58 PM Benjamin Kaduk wrote: > > > On Sat, Sep 26, 2020 at 11:55 AM Warner Losh wrote: > > > >> And there's the rub: how did this file come to exist? I'm certain it isn't > >> booting or shutting down the system based on when devfs is mounted (before > >> init) and unmounted (it's not done by the shutdown scripts). Now, it's > >> always possible there's a hole in my understanding of the sequence of > >> events. But given the examination of code, it's crazy to think this could > >> be created by anything but some weird bug. That's why a step-by-step from > >> scratch guide is needed. Im happy to look into it, but I need a bit more > >> to > >> go on. Some others have run dumps, nfs exports, so far I see 4 file system report, I see these infrequently, so I would not consider these 4 file systems to be a very large data set. > >> > >> > > I don't think it's terribly complicated; either set up a multi-boot system > > or > > pull the physical drive with / from one machine, and mount it while booted > > into a different environment. Then, chroot into it and do ... just about > > anything. > > If you didn't mount devfs before chrooting, then you get a file /dev/null > > (and some > > really confused errors from, e.g., buildworld!). This is not the situation that I am reporting. > > I think there's two different things that are being talked about here. > Let's not confuse the two. > > The first is making the build system not depend on /dev/null. You'll find > that's hard to do if you and try to do it since /dev/null is used about 200 > times in the current build system in about a dozen different ways. Some are > easy, most are a bit tricky since you can't just close stdout/stderr > because then any files opened by the program will get those FDs and > printf/fprint(stderr, will collide. This dependency won't be fixed any > time soon, though I could add a seatbelt to buildworld/buildkernel that > ensures that /dev/null is a character device. > > The second is a report that /dev/null is created all the time through Correction, I never stated "all the time". I stated I have seen this on SOME analysis of disk pulled from running systems. Let me add to that these driver are only ever mounted Readonly, as what is going on is a forensics state post mortem of the system. These are not jails, some may be VM images, but even in the VM cases these are raw disk images that are never mounted read/write. It is possible that a cdrom or nfs boot was done during the life time of the node(s) with a chroot into a root file system mounted some place else. > normal means before devfs can be mounted. However, several people have > looked and found no evidence on their system. This means there's something > special / unique to Rod's setup that's generating them (assuming it isn't a > simple chroot without devfs). What that is, and how they come to be, hasn't > been explained in enough detail to reproduce. That's what people are asking > Rod about: how do we get there? How did it happen? Once we know those > answers, we can fix it. Problem is these are being found in after the fact analysis, so "getting there" is going to be hard. I'll try to collect better data such as inode contents and dates and see if I can correlate that to system install time, or some time during the systems life time. Given what kib, and ian have said I am starting to suspect that this may be occuring during the install process, the dates on the null inode and a find of the oldest inode on the disk should correlate that next time I see one of these. If I could easily reroduce it we would not be having this conversation, it would of been fixed. > Warner -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sat Sep 26 23:24:48 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 916EF3E3F3D; Sat, 26 Sep 2020 23:24:48 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BzPy74KbDz4Dbj; Sat, 26 Sep 2020 23:24:47 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 08QNOj8K056907; Sat, 26 Sep 2020 16:24:45 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 08QNOjbQ056906; Sat, 26 Sep 2020 16:24:45 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202009262324.08QNOjbQ056906@gndrsh.dnsmgr.net> Subject: Re: svn commit: r366186 - in head/usr.sbin: bsdconfig/share/media bsdinstall/scripts In-Reply-To: <608E7E08-D8CB-460A-B632-77BB08A2F61D@samsco.org> To: Scott Long Date: Sat, 26 Sep 2020 16:24:45 -0700 (PDT) CC: Warner Losh , Niclas Zeising , "Rodney W. Grimes" , src-committers , svn-src-all , svn-src-head Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4BzPy74KbDz4Dbj X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@gndrsh.dnsmgr.net has no SPF policy when checking 69.59.192.140) smtp.mailfrom=freebsd@gndrsh.dnsmgr.net X-Spamd-Result: default: False [0.65 / 15.00]; HAS_REPLYTO(0.00)[rgrimes@freebsd.org]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_MEDIUM(-0.05)[-0.048]; NEURAL_HAM_LONG(-0.20)[-0.200]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; DMARC_NA(0.00)[dnsmgr.net]; AUTH_NA(1.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.00)[-0.004]; RCPT_COUNT_SEVEN(0.00)[7]; RCVD_TLS_LAST(0.00)[]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: 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, 26 Sep 2020 23:24:48 -0000 > > > On Sep 26, 2020, at 1:22 PM, Warner Losh wrote: > > > > > > > > I am the wrong person to answer that question. > > > > In this case, things have not become lame. For instance, the names > > ervers for se.freebsd.org work fine, but ftp3.se and ftp6.se records are > > removed. Same for ru.freebsd.org and ftp4.ru. > > I'm merely pointing out that changing ftp.CC.freebsd.org usually > > requires contacting the person(s) maintaining the CC.freebsd.org zone, > > which is usually not the project. > > > > It's usually people associated with the project in some way, but who might not be as responsive as cluster admin. These domains have been delegated, so we have to get the delegated admin to make the changes, which can take a bit of time to chase down and doesn't lend itself to easy / automated coping with this situation. > > > > Just a spitball idea here, but maybe we should consider not embedding these lists of mirror URLs into the binaries. It seems pretty straight-forward that the list evolves over time, and that evolution is not tightly coupled with the updating of the binaries. It sounds like the pkg and freebsd-update infrastructure use DNS TXT and/or SRV records to point to the metadata needed to construct a mirror URL list dynamically. Maybe something similar can be done for bsdconfig? If it?s not a crazy idea, is there anyone who would be interested in helping me write a proposal over at arch@? 100% behind that idea! Especially since it seems the project has lost (some) control over its DNS space, which IMHO, is still an issue, if the people whom DNS zones have been deligated to are not responsive that should also be fixed. > Thanks, > Scott -- Rod Grimes rgrimes@freebsd.org