git: fb3ce5331ce3 - stable/13 - release: fix VMSIZE following 1ca8842f3ad9

2021-04-29 Thread Glen Barber
The branch stable/13 has been updated by gjb:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=fb3ce5331ce3219eb525630e8cc290b6c3b7654b

commit fb3ce5331ce3219eb525630e8cc290b6c3b7654b
Author: Glen Barber 
AuthorDate: 2021-03-04 13:39:43 +
Commit: Glen Barber 
CommitDate: 2021-04-29 15:52:42 +

release: fix VMSIZE following 1ca8842f3ad9

truncate(1) is not case-sensitive with regard to setting the size
of a file.  makefs(8), however, does not honor upper-case values.
Update release-specific files and the release(7) manual page to
reflect this.

Submitted by:   ehem_freebsd_m5p.com (original)
Differential Review:https://reviews.freebsd.org/D28979
Sponsored by:   Rubicon Communications, LLC ("Netgate")

(cherry picked from commit fa04db476201c4cad5f6a5f67da8f2ef1e1cdad3)
---
 release/Makefile.vm | 4 ++--
 release/release.conf.sample | 4 ++--
 release/tools/basic-ci.conf | 2 +-
 release/tools/ec2.conf  | 2 +-
 release/tools/gce.conf  | 2 +-
 release/tools/vagrant.conf  | 2 +-
 share/man/man7/release.7| 6 +++---
 7 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/release/Makefile.vm b/release/Makefile.vm
index d201e11e19b2..39a8186ba675 100644
--- a/release/Makefile.vm
+++ b/release/Makefile.vm
@@ -7,8 +7,8 @@
 
 VMTARGETS= vm-image
 VMFORMATS?=vhd vmdk qcow2 raw
-VMSIZE?=   4096M
-SWAPSIZE?= 1G
+VMSIZE?=   4096m
+SWAPSIZE?= 1g
 VMBASE?=   vm
 
 VHD_DESC=  Azure, VirtualPC, Hyper-V, Xen disk image
diff --git a/release/release.conf.sample b/release/release.conf.sample
index 3a77a6bf1fac..a70a8bb3bd80 100644
--- a/release/release.conf.sample
+++ b/release/release.conf.sample
@@ -106,8 +106,8 @@ PORTBRANCH="main"
 
 ## If WITH_VMIMAGES is set to a non-empty value, this is the size of the
 ## virtual machine disk filesystem.  Valid size values are described in
-## the truncate(1) manual page.
-#VMSIZE="20G"
+## the makefs(8) manual page.
+#VMSIZE="20g"
 
 ## If WITH_VMIMAGES is set to a non-empty value, this is a list of disk
 ## image formats to create.  Valid values are listed in the mkimg(1)
diff --git a/release/tools/basic-ci.conf b/release/tools/basic-ci.conf
index 19bb2454f78d..9dc05c57d0f4 100644
--- a/release/tools/basic-ci.conf
+++ b/release/tools/basic-ci.conf
@@ -4,7 +4,7 @@
 #
 
 # Should be enough for base image, image can be resized in needed
-export VMSIZE=5G
+export VMSIZE=5g
 
 # Set to a list of third-party software to enable in rc.conf(5).
 export VM_RC_LIST="sshd growfs"
diff --git a/release/tools/ec2.conf b/release/tools/ec2.conf
index e726ccadc048..bfda9052421f 100644
--- a/release/tools/ec2.conf
+++ b/release/tools/ec2.conf
@@ -24,7 +24,7 @@ export VM_RC_LIST="ec2_configinit ec2_fetchkey ec2_loghostkey 
firstboot_freebsd_
 # Note that if this is set to G, we will end up with an  GB disk
 # image since VMSIZE is the size of the UFS partition, not the disk which
 # it resides within.
-export VMSIZE=5000M
+export VMSIZE=5000m
 
 # No swap space; the ec2_ephemeralswap rc.d script will allocate swap
 # space on EC2 ephemeral disks.  (If they exist -- the T2 low-cost instances
diff --git a/release/tools/gce.conf b/release/tools/gce.conf
index f156a5bb93eb..113784a7643e 100644
--- a/release/tools/gce.conf
+++ b/release/tools/gce.conf
@@ -4,7 +4,7 @@
 #
 
 # The default of 3GB is too small for GCE, so override the size here.
-export VMSIZE=20G
+export VMSIZE=20g
 
 # Set to a list of packages to install.
 export VM_EXTRA_PACKAGES="firstboot-freebsd-update firstboot-pkgs \
diff --git a/release/tools/vagrant.conf b/release/tools/vagrant.conf
index c683cf7a07d2..05e7052d46c4 100644
--- a/release/tools/vagrant.conf
+++ b/release/tools/vagrant.conf
@@ -4,7 +4,7 @@
 #
 
 # The default of 3GB is too small for Vagrant, so override the size here.
-export VMSIZE=8G
+export VMSIZE=8g
 
 # Packages to install into the image we're creating.  This is a deliberately
 # minimalist set, providing only the packages necessary to bootstrap.
diff --git a/share/man/man7/release.7 b/share/man/man7/release.7
index 02ee2dfc0e5e..0dbbe67f0258 100644
--- a/share/man/man7/release.7
+++ b/share/man/man7/release.7
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 1, 2020
+.Dd March 4, 2021
 .Dt RELEASE 7
 .Os
 .Sh NAME
@@ -383,9 +383,9 @@ The default value is
 .It Va VMSIZE
 Set to change the size of the virtual machine disk capacity.
 The default value is
-.Va 20G .
+.Va 20g .
 See
-.Xr truncate 1
+.Xr makefs 8
 for valid values.
 .Pp
 Virtual machine disk images are, by default, created as sparse images.
___
dev-commits-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"


Re: git: a0358e3d5184 - main - Synch index of contrib/bc with what is in workdir after cloning.

2021-04-29 Thread Konstantin Belousov
On Thu, Apr 29, 2021 at 05:21:22PM +0200, Michael Gmelin wrote:
> 
> 
> On Thu, 29 Apr 2021 07:55:58 -0700
> Cy Schubert  wrote:
> 
> > In message <20210429162959.16662...@bsd64.grem.de>, Michael Gmelin
> > writes:
> > > 
> > >
> > >
> > > On Thu, 29 Apr 2021 06:53:18 -0700
> > > Cy Schubert  wrote:
> > >  
> > > > In message <202104291234.13tcyk5k092...@gitrepo.freebsd.org>,
> > > > Michael Gmelin wr
> > > > ites:  
> > > > > The branch main has been updated by grembo (ports committer):
> > > > >
> > > > > URL:
> > > > > https://cgit.FreeBSD.org/src/commit/?id=a0358e3d5184950b4316f105eb292cba
> > > > > fdea208b
> > > > >
> > > > > commit a0358e3d5184950b4316f105eb292cbafdea208b
> > > > > Author: Michael Gmelin 
> > > > > AuthorDate: 2021-04-29 12:29:04 +
> > > > > Commit: Michael Gmelin 
> > > > > CommitDate: 2021-04-29 12:33:56 +
> > > > >
> > > > > Synch index of contrib/bc with what is in workdir after
> > > > > cloning. 
> > > > > From a workdir perspective this should be a no-op.
> > > > > See also:
> > > > > 
> > > > > https://lists.freebsd.org/pipermail/freebsd-current/2021-April/079569
> > > > >  
> > > .htm  
> > > > > l
> > > > > ---
> > > > >  contrib/bc/bc.vcxproj  | 554
> > > > > --- --
> > > > >  contrib/bc/bc.vcxproj.filters  | 362
> > > > > +-- contrib/bc/bcl.vcxproj |
> > > > > 320  contrib/bc/bcl.vcxproj.filters |
> > > > > 190 +++--- 4 files changed, 713 insertions(+), 713
> > > > > deletions(-) 
> > > > 
> > > > Whatever was done here I cannot rebase from main to my local
> > > > branches. The files remain modified. The only recourse so far was
> > > > to delete the local branch and start over. I've done this to one
> > > > inconsequential branch so far but hopefully someone can suggest a
> > > > solution.  
> > >
> > > Can you show an example of how this fails for you (especially the
> > > error messages)?  
> > 
> > slippy$ git pull -r --all
> > Fetching freebsd
> > remote: Enumerating objects: 9, done.
> > remote: Counting objects: 100% (9/9), done.
> > remote: Compressing objects: 100% (9/9), done.
> > remote: Total 9 (delta 3), reused 0 (delta 0), pack-reused 0
> > Unpacking objects: 100% (9/9), 12.42 KiB | 111.00 KiB/s, done.
> > From https://git.freebsd.org/src
> >59b3b210a69e..d87ee7b97fe8  stable/13  -> freebsd/stable/13
> > Already up to date.
> > slippy$ git co komquats
> > Switched to branch 'komquats'
> > slippy$ git st
> > On branch komquats
> > Changes not staged for commit:
> >   (use "git add ..." to update what will be committed)
> >   (use "git restore ..." to discard changes in working
> > directory) modified:   contrib/bc/bc.vcxproj
> > modified:   contrib/bc/bc.vcxproj.filters
> > modified:   contrib/bc/bcl.vcxproj
> > modified:   contrib/bc/bcl.vcxproj.filters
> > 
> > Untracked files:
> >   (use "git add ..." to include in what will be committed)
> > sys/i386/conf/IPFILTER
> > usr.sbin/ufdformat/
> > 
> > no changes added to commit (use "git add" and/or "git commit -a")
> > slippy$ git rebase main
> > error: cannot rebase: You have unstaged changes.
> > error: Please commit or stash them.
> > slippy$ git stash push -m foobar
> > Saved working directory and index state On komquats: foobar
> > slippy$ git rebase main
> > error: cannot rebase: You have unstaged changes.
> > error: Please commit or stash them.
> > slippy$ git st
> > On branch komquats
> > Changes not staged for commit:
> >   (use "git add ..." to update what will be committed)
> >   (use "git restore ..." to discard changes in working
> > directory) modified:   contrib/bc/bc.vcxproj
> > modified:   contrib/bc/bc.vcxproj.filters
> > modified:   contrib/bc/bcl.vcxproj
> > modified:   contrib/bc/bcl.vcxproj.filters
> > 
> > Untracked files:
> >   (use "git add ..." to include in what will be committed)
> > sys/i386/conf/IPFILTER
> > usr.sbin/ufdformat/
> > 
> > no changes added to commit (use "git add" and/or "git commit -a")
> > slippy$ git stash push -m foobar
> > Saved working directory and index state On komquats: foobar
> > slippy$ git st
> > On branch komquats
> > Changes not staged for commit:
> >   (use "git add ..." to update what will be committed)
> >   (use "git restore ..." to discard changes in working
> > directory) modified:   contrib/bc/bc.vcxproj
> > modified:   contrib/bc/bc.vcxproj.filters
> > modified:   contrib/bc/bcl.vcxproj
> > modified:   contrib/bc/bcl.vcxproj.filters
> > 
> > Untracked files:
> >   (use "git add ..." to include in what will be committed)
> > sys/i386/conf/IPFILTER
> > usr.sbin/ufdformat/
> > 
> > no changes added to commit (use "git add" and/or "git commit -a")
> > slippy$ 
> > 
> > rm the files, switch branch to main, rebase again, remove the branch,
> > and start over was the only solution.
> > 
> > So far this affected only one branch. My other branches ar

git: 420d30f5bdbf - main - kasan.9: A couple of fixups

2021-04-29 Thread Mark Johnston
The branch main has been updated by markj:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=420d30f5bdbfc20d83b3c9a7d5b4e90446b922fa

commit 420d30f5bdbfc20d83b3c9a7d5b4e90446b922fa
Author: Mark Johnston 
AuthorDate: 2021-04-29 16:26:03 +
Commit: Mark Johnston 
CommitDate: 2021-04-29 16:26:37 +

kasan.9: A couple of fixups

- Mention GENERIC-KASAN.
- Note that the runtime was ported from NetBSD.

Sponsored by:   The FreeBSD Foundation
---
 share/man/man9/kasan.9 | 22 --
 1 file changed, 16 insertions(+), 6 deletions(-)

diff --git a/share/man/man9/kasan.9 b/share/man/man9/kasan.9
index ecc068209913..d675a78f1e29 100644
--- a/share/man/man9/kasan.9
+++ b/share/man/man9/kasan.9
@@ -27,15 +27,22 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 13, 2021
+.Dd April 29, 2021
 .Dt KASAN 9
 .Os
 .Sh NAME
-.Nm kasan
-.Nd kernel address sanitizer
+.Nm KASAN
+.Nd Kernel Address SANitizer
 .Sh SYNOPSIS
-To compile KASAN into the kernel, place the following line in your kernel
-configuration file:
+The
+.Pa GENERIC-KASAN
+kernel configuration can be used to compile a KASAN-enabled kernel using
+.Pa GENERIC
+as a base configuration.
+Alternately, to compile
+.Nm
+into the kernel, place the following line in your
+kernel configuration file:
 .Bd -ragged -offset indent
 .Cd "options KASAN"
 .Ed
@@ -142,13 +149,16 @@ are equal,
 .Fa code
 should be 0.
 .Sh SEE ALSO
+.Xr build 7 ,
 .Xr malloc 9 ,
 .Xr memguard 9 ,
 .Xr redzone 9 ,
 .Xr uma 9
 .Sh HISTORY
 .Nm
-first appeared in
+was ported from
+.Nx
+and first appeared in
 .Fx 14.0 .
 .Sh BUGS
 Accesses to kernel memory outside of the kernel map are ignored by the
___
dev-commits-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"


Re: git: a0358e3d5184 - main - Synch index of contrib/bc with what is in workdir after cloning.

2021-04-29 Thread Cy Schubert
In message <20210429172122.17516...@bsd64.grem.de>, Michael Gmelin writes:
> 
>
>
> On Thu, 29 Apr 2021 07:55:58 -0700
> Cy Schubert  wrote:
>
> > In message <20210429162959.16662...@bsd64.grem.de>, Michael Gmelin
> > writes:
> > > 
> > >
> > >
> > > On Thu, 29 Apr 2021 06:53:18 -0700
> > > Cy Schubert  wrote:
> > >  
> > > > In message <202104291234.13tcyk5k092...@gitrepo.freebsd.org>,
> > > > Michael Gmelin wr
> > > > ites:  
> > > > > The branch main has been updated by grembo (ports committer):
> > > > >
> > > > > URL:
> > > > > https://cgit.FreeBSD.org/src/commit/?id=a0358e3d5184950b4316f105eb292
> cba
> > > > > fdea208b
> > > > >
> > > > > commit a0358e3d5184950b4316f105eb292cbafdea208b
> > > > > Author: Michael Gmelin 
> > > > > AuthorDate: 2021-04-29 12:29:04 +
> > > > > Commit: Michael Gmelin 
> > > > > CommitDate: 2021-04-29 12:33:56 +
> > > > >
> > > > > Synch index of contrib/bc with what is in workdir after
> > > > > cloning. 
> > > > > From a workdir perspective this should be a no-op.
> > > > > See also:
> > > > > https://lists.freebsd.org/pipermail/freebsd-current/2021-April/07
> 9569
> > > > >  
> > > .htm  
> > > > > l
> > > > > ---
> > > > >  contrib/bc/bc.vcxproj  | 554
> > > > > --- --
> > > > >  contrib/bc/bc.vcxproj.filters  | 362
> > > > > +-- contrib/bc/bcl.vcxproj |
> > > > > 320  contrib/bc/bcl.vcxproj.filters |
> > > > > 190 +++--- 4 files changed, 713 insertions(+), 713
> > > > > deletions(-) 
> > > > 
> > > > Whatever was done here I cannot rebase from main to my local
> > > > branches. The files remain modified. The only recourse so far was
> > > > to delete the local branch and start over. I've done this to one
> > > > inconsequential branch so far but hopefully someone can suggest a
> > > > solution.  
> > >
> > > Can you show an example of how this fails for you (especially the
> > > error messages)?  
> > 
> > slippy$ git pull -r --all
> > Fetching freebsd
> > remote: Enumerating objects: 9, done.
> > remote: Counting objects: 100% (9/9), done.
> > remote: Compressing objects: 100% (9/9), done.
> > remote: Total 9 (delta 3), reused 0 (delta 0), pack-reused 0
> > Unpacking objects: 100% (9/9), 12.42 KiB | 111.00 KiB/s, done.
> > From https://git.freebsd.org/src
> >59b3b210a69e..d87ee7b97fe8  stable/13  -> freebsd/stable/13
> > Already up to date.
> > slippy$ git co komquats
> > Switched to branch 'komquats'
> > slippy$ git st
> > On branch komquats
> > Changes not staged for commit:
> >   (use "git add ..." to update what will be committed)
> >   (use "git restore ..." to discard changes in working
> > directory) modified:   contrib/bc/bc.vcxproj
> > modified:   contrib/bc/bc.vcxproj.filters
> > modified:   contrib/bc/bcl.vcxproj
> > modified:   contrib/bc/bcl.vcxproj.filters
> > 
> > Untracked files:
> >   (use "git add ..." to include in what will be committed)
> > sys/i386/conf/IPFILTER
> > usr.sbin/ufdformat/
> > 
> > no changes added to commit (use "git add" and/or "git commit -a")
> > slippy$ git rebase main
> > error: cannot rebase: You have unstaged changes.
> > error: Please commit or stash them.
> > slippy$ git stash push -m foobar
> > Saved working directory and index state On komquats: foobar
> > slippy$ git rebase main
> > error: cannot rebase: You have unstaged changes.
> > error: Please commit or stash them.
> > slippy$ git st
> > On branch komquats
> > Changes not staged for commit:
> >   (use "git add ..." to update what will be committed)
> >   (use "git restore ..." to discard changes in working
> > directory) modified:   contrib/bc/bc.vcxproj
> > modified:   contrib/bc/bc.vcxproj.filters
> > modified:   contrib/bc/bcl.vcxproj
> > modified:   contrib/bc/bcl.vcxproj.filters
> > 
> > Untracked files:
> >   (use "git add ..." to include in what will be committed)
> > sys/i386/conf/IPFILTER
> > usr.sbin/ufdformat/
> > 
> > no changes added to commit (use "git add" and/or "git commit -a")
> > slippy$ git stash push -m foobar
> > Saved working directory and index state On komquats: foobar
> > slippy$ git st
> > On branch komquats
> > Changes not staged for commit:
> >   (use "git add ..." to update what will be committed)
> >   (use "git restore ..." to discard changes in working
> > directory) modified:   contrib/bc/bc.vcxproj
> > modified:   contrib/bc/bc.vcxproj.filters
> > modified:   contrib/bc/bcl.vcxproj
> > modified:   contrib/bc/bcl.vcxproj.filters
> > 
> > Untracked files:
> >   (use "git add ..." to include in what will be committed)
> > sys/i386/conf/IPFILTER
> > usr.sbin/ufdformat/
> > 
> > no changes added to commit (use "git add" and/or "git commit -a")
> > slippy$ 
> > 
> > rm the files, switch branch to main, rebase again, remove the branch,
> > and start over was the only solution.
> > 
> > So far this affected only one branch. My other branc

Re: git: a0358e3d5184 - main - Synch index of contrib/bc with what is in workdir after cloning.

2021-04-29 Thread Michael Gmelin



On Thu, 29 Apr 2021 19:22:22 +0300
Konstantin Belousov  wrote:

> On Thu, Apr 29, 2021 at 05:21:22PM +0200, Michael Gmelin wrote:
> > 
> > 
> ...
> 
> So I have the same, on the very living branch I rebased yesterday.
> Today I cannot:
> 
> solo% git status
> ~/work/DEV/src On branch pt_coredump
> Changes not staged for commit:
>   (use "git add ..." to update what will be committed)
>   (use "git restore ..." to discard changes in working
> directory) modified:   contrib/bc/bc.vcxproj
> modified:   contrib/bc/bc.vcxproj.filters
> modified:   contrib/bc/bcl.vcxproj
> modified:   contrib/bc/bcl.vcxproj.filters
> 
> Untracked files:
>   (use "git add ..." to include in what will be committed)
> sys/amd64/compile/
> 
> no changes added to commit (use "git add" and/or "git commit -a")
> solo% git checkout .
> ~/work/DEV/src Updated 4 paths from the index
> solo% git status
> ~/work/DEV/src On branch pt_coredump
> Changes not staged for commit:
>   (use "git add ..." to update what will be committed)
>   (use "git restore ..." to discard changes in working
> directory) modified:   contrib/bc/bc.vcxproj
> modified:   contrib/bc/bc.vcxproj.filters
> modified:   contrib/bc/bcl.vcxproj
> modified:   contrib/bc/bcl.vcxproj.filters
> 
> Untracked files:
>   (use "git add ..." to include in what will be committed)
> sys/amd64/compile/
> 
> no changes added to commit (use "git add" and/or "git commit -a")
> 
> Whatever brokeness in repo we had before, it did not prevented other
> people to work with it.  Now I cannot even rebase.

It would have in the future, as the problem is caused by switching
between branches. The moment any of those files changes, we would see
the same problem re-appear. Anytime re-indexing happens you would see
the problem re-appear. Sooner or later somebody would then commit those
files as part of another commit by accident and we are in the same
situation again.

> 
> Requiring all developers to add some attributes to all clones just
> moves the brokeness into wrong direction.

I'm happy to see a better solution applied, I don't know if there is
any that won't break rebasing for commits that happened (and that
doesn't involve going back to the offending commit and changing
history/hashes).

Even just removing the files from contrib/bc would cause these issues
when switching between branches/rebasing at this point. Essentially,
anything that involves commits since 8ea9013512 is somehow affected.
IMHO the shorter we keep this period, the better, but again, if you
have a better idea, do whatever is necessary.

-m

-- 
Michael Gmelin
___
dev-commits-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"


Re: git: a0358e3d5184 - main - Synch index of contrib/bc with what is in workdir after cloning.

2021-04-29 Thread Stefan Esser
Am 29.04.21 um 18:22 schrieb Konstantin Belousov:
> On Thu, Apr 29, 2021 at 05:21:22PM +0200, Michael Gmelin wrote:
>>
>> On Thu, 29 Apr 2021 07:55:58 -0700
>> Cy Schubert  wrote:
>>
>>> In message <20210429162959.16662...@bsd64.grem.de>, Michael Gmelin
>>> writes:

 On Thu, 29 Apr 2021 06:53:18 -0700
 Cy Schubert  wrote:
  
> git restore the files, git rm the files, rm the files, git stash
> push, all don't remove them from the branch following rebase. And
> subsequent rebase to main will fail. main is ok though.
>
> What is it that you did to sync the index?  

 Like in the mail thread linked in the git comment, theoretically a
 noop:

   git clone https://g...@repo.freebsd.org/src.git
   cd src
   touch contrib/bc/*vcx*
   git commit -a
   git push

 It's a problem caused by .gitattributes being checked in after the
 *vcx* files were checked in (again, see the email thread and "man
 1 gitattributes").

 If it was for me, I would remove the .gitattributes eol specs, they
 shouldn't be necessary for our purposes.  

Sorry, this was my fault. IIRC I had added the files to the
commit with "add *" and thus missed .gitattributes, and I did
not know about the effect the delayed commit of that missing
file would cause.

Maybe the best solution is to revert all the commits and then
start over with a single commit that includes .gitattributes.

The Windows specific files are not relevant for FreeBSD, but I'd
rather perform the vendor import and cherry-pick without too many
changes to the upstream version.

>>> It's probably growing pains.
>>>
>>> It appears only one branch, probably not surprisingly my most used
>>> branch, was the only one affected.

I had planned to MFC to stable/13 and 12 this weekend, but will
wait for the issue to be settled in the main branch, now.

Regards, STefan



OpenPGP_signature
Description: OpenPGP digital signature


Re: git: a0358e3d5184 - main - Synch index of contrib/bc with what is in workdir after cloning.

2021-04-29 Thread Cy Schubert
In message <20210429172122.17516...@bsd64.grem.de>, Michael Gmelin writes:
> 
>
>
> On Thu, 29 Apr 2021 07:55:58 -0700
> Cy Schubert  wrote:
>
> > In message <20210429162959.16662...@bsd64.grem.de>, Michael Gmelin
> > writes:
> > > 
> > >
> > >
> > > On Thu, 29 Apr 2021 06:53:18 -0700
> > > Cy Schubert  wrote:
> > >  
> > > > In message <202104291234.13tcyk5k092...@gitrepo.freebsd.org>,
> > > > Michael Gmelin wr
> > > > ites:  
> > > > > The branch main has been updated by grembo (ports committer):
> > > > >
> > > > > URL:
> > > > > https://cgit.FreeBSD.org/src/commit/?id=a0358e3d5184950b4316f105eb292
> cba
> > > > > fdea208b
> > > > >
> > > > > commit a0358e3d5184950b4316f105eb292cbafdea208b
> > > > > Author: Michael Gmelin 
> > > > > AuthorDate: 2021-04-29 12:29:04 +
> > > > > Commit: Michael Gmelin 
> > > > > CommitDate: 2021-04-29 12:33:56 +
> > > > >
> > > > > Synch index of contrib/bc with what is in workdir after
> > > > > cloning. 
> > > > > From a workdir perspective this should be a no-op.
> > > > > See also:
> > > > > https://lists.freebsd.org/pipermail/freebsd-current/2021-April/07
> 9569
> > > > >  
> > > .htm  
> > > > > l
> > > > > ---
> > > > >  contrib/bc/bc.vcxproj  | 554
> > > > > --- --
> > > > >  contrib/bc/bc.vcxproj.filters  | 362
> > > > > +-- contrib/bc/bcl.vcxproj |
> > > > > 320  contrib/bc/bcl.vcxproj.filters |
> > > > > 190 +++--- 4 files changed, 713 insertions(+), 713
> > > > > deletions(-) 
> > > > 
> > > > Whatever was done here I cannot rebase from main to my local
> > > > branches. The files remain modified. The only recourse so far was
> > > > to delete the local branch and start over. I've done this to one
> > > > inconsequential branch so far but hopefully someone can suggest a
> > > > solution.  
> > >
> > > Can you show an example of how this fails for you (especially the
> > > error messages)?  
> > 
> > slippy$ git pull -r --all
> > Fetching freebsd
> > remote: Enumerating objects: 9, done.
> > remote: Counting objects: 100% (9/9), done.
> > remote: Compressing objects: 100% (9/9), done.
> > remote: Total 9 (delta 3), reused 0 (delta 0), pack-reused 0
> > Unpacking objects: 100% (9/9), 12.42 KiB | 111.00 KiB/s, done.
> > From https://git.freebsd.org/src
> >59b3b210a69e..d87ee7b97fe8  stable/13  -> freebsd/stable/13
> > Already up to date.
> > slippy$ git co komquats
> > Switched to branch 'komquats'
> > slippy$ git st
> > On branch komquats
> > Changes not staged for commit:
> >   (use "git add ..." to update what will be committed)
> >   (use "git restore ..." to discard changes in working
> > directory) modified:   contrib/bc/bc.vcxproj
> > modified:   contrib/bc/bc.vcxproj.filters
> > modified:   contrib/bc/bcl.vcxproj
> > modified:   contrib/bc/bcl.vcxproj.filters
> > 
> > Untracked files:
> >   (use "git add ..." to include in what will be committed)
> > sys/i386/conf/IPFILTER
> > usr.sbin/ufdformat/
> > 
> > no changes added to commit (use "git add" and/or "git commit -a")
> > slippy$ git rebase main
> > error: cannot rebase: You have unstaged changes.
> > error: Please commit or stash them.
> > slippy$ git stash push -m foobar
> > Saved working directory and index state On komquats: foobar
> > slippy$ git rebase main
> > error: cannot rebase: You have unstaged changes.
> > error: Please commit or stash them.
> > slippy$ git st
> > On branch komquats
> > Changes not staged for commit:
> >   (use "git add ..." to update what will be committed)
> >   (use "git restore ..." to discard changes in working
> > directory) modified:   contrib/bc/bc.vcxproj
> > modified:   contrib/bc/bc.vcxproj.filters
> > modified:   contrib/bc/bcl.vcxproj
> > modified:   contrib/bc/bcl.vcxproj.filters
> > 
> > Untracked files:
> >   (use "git add ..." to include in what will be committed)
> > sys/i386/conf/IPFILTER
> > usr.sbin/ufdformat/
> > 
> > no changes added to commit (use "git add" and/or "git commit -a")
> > slippy$ git stash push -m foobar
> > Saved working directory and index state On komquats: foobar
> > slippy$ git st
> > On branch komquats
> > Changes not staged for commit:
> >   (use "git add ..." to update what will be committed)
> >   (use "git restore ..." to discard changes in working
> > directory) modified:   contrib/bc/bc.vcxproj
> > modified:   contrib/bc/bc.vcxproj.filters
> > modified:   contrib/bc/bcl.vcxproj
> > modified:   contrib/bc/bcl.vcxproj.filters
> > 
> > Untracked files:
> >   (use "git add ..." to include in what will be committed)
> > sys/i386/conf/IPFILTER
> > usr.sbin/ufdformat/
> > 
> > no changes added to commit (use "git add" and/or "git commit -a")
> > slippy$ 
> > 
> > rm the files, switch branch to main, rebase again, remove the branch,
> > and start over was the only solution.
> > 
> > So far this affected only one branch. My other branc

Re: git: a0358e3d5184 - main - Synch index of contrib/bc with what is in workdir after cloning.

2021-04-29 Thread Michael Gmelin



On Thu, 29 Apr 2021 10:30:24 -0700
Cy Schubert  wrote:

> Going back in time through each daily snapshot, my April 26 0230U
> snapshot first exhibited the problem.

Yes, like I wrote, the problem was introduced in 8ea9013512 (which was
on April 26th).

If you take your snapshot from - let's say - April 27th, you can also
easily demonstrate the problem by doing:

  cp -a /usr/src /usr/srccopy
  cd /usr/src/srccopy
  git status

Or by doing:

  cd /usr/src
  rm .git/index
  git reset
  git status

or by doing:

  cd /usr/src
  touch contrib/bc/*vcx*
  git status

> 
> My remediation efforts are below:
> 
>> ...
> slippy$ 
> 
> 
> There is no way to move forward except to rm (not git rm but UNIX rm)
> the files. Checkout another branch and blow away the affected branch.
> With the files physically deleted with rm(1) I could switch branches
> and blow away the affected branch. Without this extreme I can't even
> switch branches.

AFAIK there are two options forward:

1. Simply add the files that are shown as changed on your local branch
   (that's all my commit did, "git commit -a").
2. Temporarily do:
   echo "contrib/bc/bc*.vcx* -text" >>.git/info/attributes

> 
> Lucky for me this branch was a placeholder maintaining a record of
> what was installed on my laptop vs main, so it's easy to blow away
> and recreate. But for people with committed changes to a branch this
> would be a huge problem.

The two things above should work.

> 
> My other branches which I rebase much less frequently were unaffected.
> 
> 

AFAIK this only affects branches which happen to contain changes
since 8ea9013512.

If not, I'm afraid some breaking repo-surgery would be required, going
back before 8ea9013512 (just doing a revert patch won't accomplish
anything different).

-m

-- 
Michael Gmelin
___
dev-commits-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"


Re: git: a0358e3d5184 - main - Synch index of contrib/bc with what is in workdir after cloning.

2021-04-29 Thread Cy Schubert
In message <20210429200740.5e8bf...@bsd64.grem.de>, Michael Gmelin writes:
> 
>
> On Thu, 29 Apr 2021 10:30:24 -0700
> Cy Schubert  wrote:
>
> > Going back in time through each daily snapshot, my April 26 0230U
> > snapshot first exhibited the problem.
>
> Yes, like I wrote, the problem was introduced in 8ea9013512 (which was
> on April 26th).
>
> If you take your snapshot from - let's say - April 27th, you can also
> easily demonstrate the problem by doing:
>
>   cp -a /usr/src /usr/srccopy
>   cd /usr/src/srccopy
>   git status

No luck with this.

>
> Or by doing:
>
>   cd /usr/src
>   rm .git/index
>   git reset
>   git status

No luck with this either:

slippy$ pwd
/x/test/29
slippy$ rm .git/index 
slippy$ git reset
Unstaged changes after reset:
M   contrib/bc/bc.vcxproj
M   contrib/bc/bc.vcxproj.filters
M   contrib/bc/bcl.vcxproj
M   contrib/bc/bcl.vcxproj.filters
M   etc/mtree/BSD.var.dist
M   sys/dev/bge/if_bge.c
M   sys/dev/bge/if_bgereg.h
M   sys/geom/geom.h
M   sys/geom/geom_int.h
M   sys/geom/geom_kern.c
M   sys/geom/geom_subr.c

It took 404.90 seconds to enumerate unstaged changes after reset.  You can
use '--quiet' to avoid this.  Set the config setting reset.quiet to true
to make this the default.
slippy$ git st
Refresh index: 100% (86556/86556), done.
On branch komquats
Changes not staged for commit:
  (use "git add ..." to update what will be committed)
  (use "git restore ..." to discard changes in working directory)
modified:   contrib/bc/bc.vcxproj
modified:   contrib/bc/bc.vcxproj.filters
modified:   contrib/bc/bcl.vcxproj
modified:   contrib/bc/bcl.vcxproj.filters
modified:   etc/mtree/BSD.var.dist
modified:   sys/dev/bge/if_bge.c
modified:   sys/dev/bge/if_bgereg.h
modified:   sys/geom/geom.h
modified:   sys/geom/geom_int.h
modified:   sys/geom/geom_kern.c
modified:   sys/geom/geom_subr.c

Untracked files:
  (use "git add ..." to include in what will be committed)
sys/i386/conf/IPFILTER
usr.sbin/ufdformat/

no changes added to commit (use "git add" and/or "git commit -a")
slippy$ git stash push -m foobar
Saved working directory and index state On komquats: foobar
slippy$ git st
On branch komquats
Changes not staged for commit:
  (use "git add ..." to update what will be committed)
  (use "git restore ..." to discard changes in working directory)
modified:   contrib/bc/bc.vcxproj
modified:   contrib/bc/bc.vcxproj.filters
modified:   contrib/bc/bcl.vcxproj
modified:   contrib/bc/bcl.vcxproj.filters

Untracked files:
  (use "git add ..." to include in what will be committed)
sys/i386/conf/IPFILTER
usr.sbin/ufdformat/

no changes added to commit (use "git add" and/or "git commit -a")
slippy$ 


>
> or by doing:
>
>   cd /usr/src
>   touch contrib/bc/*vcx*
>   git status

Same slippy$ touch contrib/bc/*vcx*
You have new mail.  

slippy$ git st
On branch komquats
Changes not staged for commit:
  (use "git add ..." to update what will be committed)
  (use "git restore ..." to discard changes in working directory)
modified:   contrib/bc/bc.vcxproj
modified:   contrib/bc/bc.vcxproj.filters
modified:   contrib/bc/bcl.vcxproj
modified:   contrib/bc/bcl.vcxproj.filters

Untracked files:
  (use "git add ..." to include in what will be committed)
sys/i386/conf/IPFILTER
usr.sbin/ufdformat/

no changes added to commit (use "git add" and/or "git commit -a")
slippy$ 

Next I tried committing the following to the branch:

slippy$ git br
* komquats
  main
slippy$ git ci contrib/bc/bc.vcxproj contrib/bc/bc.vcxproj.filters 
contrib/bc/bcl.vcxproj contrib/bc/bcl.vcxproj.filters
hint: Waiting for your editor to close the file... 
Foobar.
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch komquats
# Changes to be committed:
#   modified:   contrib/bc/bc.vcxproj
#   modified:   contrib/bc/bc.vcxproj.filters
#   modified:   contrib/bc/bcl.vcxproj
#   modified:   contrib/bc/bcl.vcxproj.filters
#
# Untracked files:
#   sys/i386/conf/IPFILTER
#   usr.sbin/ufdformat/
#
~
~
~
~
~
~
~
~
/x/test/29/.git/COMMIT_EDITMSG: 15 lines, 425 characters
[komquats 1155c1951d3c] Foobar.
 4 files changed, 713 insertions(+), 713 deletions(-)
slippy$ git co main
Switched to branch 'main'
Your branch is up to date with 'freebsd/main'.
slippy$ git co komquats
error: Your local changes to the following files would be overwritten by 
checkout:
contrib/bc/bc.vcxproj
contrib/bc/bc.vcxproj.filters
contrib/bc/bcl.vcxproj
contrib/bc/bcl.vcxproj.filters
Please commit your changes or stash them before you switch branches.
Aborting
slippy$ git st
On branch main
Your branch i

Re: git: a0358e3d5184 - main - Synch index of contrib/bc with what is in workdir after cloning.

2021-04-29 Thread Michael Gmelin



On Thu, 29 Apr 2021 13:20:06 -0700
Cy Schubert  wrote:

> In message <20210429200740.5e8bf...@bsd64.grem.de>, Michael Gmelin
> writes:
> ...
> > also easily demonstrate the problem by doing:
> >
> >   cp -a /usr/src /usr/srccopy
> >   cd /usr/src/srccopy
> >   git status  
> 
> No luck with this.
> 
> >
> > Or by doing:
> >
> >   cd /usr/src
> >   rm .git/index
> >   git reset
> >   git status  
> 
> No luck with this either:
> 
> > ...
> >
> > or by doing:
> >
> >   cd /usr/src
> >   touch contrib/bc/*vcx*
> >   git status  
> 
> Same slippy$ touch contrib/bc/*vcx*
> You have new mail.

You might have misread my email. The point of these various tests
was to demonstrate how the problem came into the tree and why I
committed the changed files today. Hence "demonstrate the problem", not
"demonstrate the solution to the problem".

> Next I tried committing the following to the branch:
> 
> slippy$ git br
> * komquats
>   main
> slippy$ git ci contrib/bc/bc.vcxproj contrib/bc/bc.vcxproj.filters 
> contrib/bc/bcl.vcxproj contrib/bc/bcl.vcxproj.filters
> ...
> Switched to branch 'main'
> Your branch is up to date with 'freebsd/main'.
> ...
> slippy$ git co komquats
> error: Your local changes to the following files would be overwritten
> by checkout:
>   contrib/bc/bc.vcxproj
>   contrib/bc/bc.vcxproj.filters
>   contrib/bc/bcl.vcxproj
>   contrib/bc/bcl.vcxproj.filters
> Please commit your changes or stash them before you switch branches.
> Aborting

If this was on "main" from today (a0358e3d51849 or later), this
shouldn't happen (just tested it myself). If it was main from your ZFS
snapshot from a few days ago, then I would expect to see this result.

> ...
> >
> > 1. Simply add the files that are shown as changed on your local
> > branch (that's all my commit did, "git commit -a").
> > 2. Temporarily do:
> >echo "contrib/bc/bc*.vcx* -text" >>.git/info/attributes  
> 
> Neither of those worked for me. Again this is purely academic now but 
> looking to understand this should it happen again, with committed
> work.

I tested 2. again locally and it works for me.

> 
> I've saved the entire zfs filesystem tree in a zfs-send stream for
> more experimentation later. Hopefully my notes above are of some
> value to someone.
> 

Any chance you could share that ZFS stream with me? I would like to
reproduce your results.

Best
Michael

-- 
Michael Gmelin
___
dev-commits-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"


git: 5a45802b3c8c - stable/13 - nfsv4 client: do the BindConnectionToSession as required

2021-04-29 Thread Rick Macklem
The branch stable/13 has been updated by rmacklem:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=5a45802b3c8c3962649f47b01453c819dd137da1

commit 5a45802b3c8c3962649f47b01453c819dd137da1
Author: Rick Macklem 
AuthorDate: 2021-04-11 21:34:57 +
Commit: Rick Macklem 
CommitDate: 2021-04-30 00:43:50 +

nfsv4 client: do the BindConnectionToSession as required

During a recent testing event, it was reported that the NFSv4.1/4.2
server erroneously bound the back channel to a new TCP connection.
RFC5661 specifies that the fore channel is implicitly bound to a
new TCP connection when an RPC with Sequence (almost any of them)
is done on it.  For the back channel to be bound to the new TCP
connection, an explicit BindConnectionToSession must be done as
the first RPC on the new connection.

Since new TCP connections are created by the "reconnect" layer
(sys/rpc/clnt_rc.c) of the krpc, this patch adds an optional
upcall done by the krpc whenever a new connection is created.
The patch also adds the specific upcall function that does a
BindConnectionToSession and configures the krpc to call it
when required.

This is necessary for correct interoperability with NFSv4.1/NFSv4.2
servers when the nfscbd daemon is running.

If doing NFSv4.1/NFSv4.2 mounts without this patch, it is
recommended that the nfscbd daemon not be running and that
the "pnfs" mount option not be specified.

PR: 254840

(cherry picked from commit 7763814fc9c27a98fefcbf582d7a936ea43af23a)
---
 sys/fs/nfs/nfs_commonsubs.c |  5 ++-
 sys/fs/nfs/nfs_var.h|  1 +
 sys/fs/nfs/nfscl.h  |  5 +++
 sys/fs/nfs/nfsport.h|  9 +++--
 sys/fs/nfs/nfsproto.h   |  5 ++-
 sys/fs/nfsclient/nfs_clrpcops.c | 90 +
 sys/rpc/clnt.h  |  6 +++
 sys/rpc/clnt_rc.c   | 15 +++
 sys/rpc/krpc.h  |  3 ++
 9 files changed, 133 insertions(+), 6 deletions(-)

diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c
index 43bb396d9cfd..4afa4c2d9ab4 100644
--- a/sys/fs/nfs/nfs_commonsubs.c
+++ b/sys/fs/nfs/nfs_commonsubs.c
@@ -218,7 +218,7 @@ static struct nfsrv_lughash *nfsgroupnamehash;
 static int nfs_bigreply[NFSV42_NPROCS] = { 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0,
 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
-1, 0, 0, 1 };
+1, 0, 0, 1, 0 };
 
 /* local functions */
 static int nfsrv_skipace(struct nfsrv_descript *nd, int *acesizep);
@@ -301,6 +301,7 @@ static struct {
{ NFSV4OP_SETXATTR, 2, "Setxattr", 8, },
{ NFSV4OP_REMOVEXATTR, 2, "Rmxattr", 7, },
{ NFSV4OP_LISTXATTRS, 2, "Listxattr", 9, },
+   { NFSV4OP_BINDCONNTOSESS, 1, "BindConSess", 11, },
 };
 
 /*
@@ -309,7 +310,7 @@ static struct {
 static int nfs_bigrequest[NFSV42_NPROCS] = {
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-   0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0
+   0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0
 };
 
 /*
diff --git a/sys/fs/nfs/nfs_var.h b/sys/fs/nfs/nfs_var.h
index aba5c5124e72..0297b52015f8 100644
--- a/sys/fs/nfs/nfs_var.h
+++ b/sys/fs/nfs/nfs_var.h
@@ -561,6 +561,7 @@ int nfsrpc_listextattr(vnode_t, uint64_t *, struct uio *, 
size_t *, bool *,
 struct nfsvattr *, int *, struct ucred *, NFSPROC_T *);
 int nfsrpc_rmextattr(vnode_t, const char *, struct nfsvattr *, int *,
 struct ucred *, NFSPROC_T *);
+void nfsrpc_bindconnsess(CLIENT *, void *, struct ucred *);
 
 /* nfs_clstate.c */
 int nfscl_open(vnode_t, u_int8_t *, int, u_int32_t, int,
diff --git a/sys/fs/nfs/nfscl.h b/sys/fs/nfs/nfscl.h
index 52da0af6fa51..3d7afaf68432 100644
--- a/sys/fs/nfs/nfscl.h
+++ b/sys/fs/nfs/nfscl.h
@@ -81,4 +81,9 @@ struct nfsv4node {
printf(__VA_ARGS__);\
} while (0)
 
+struct nfscl_reconarg {
+   int minorvers;
+   uint8_t sessionid[NFSX_V4SESSIONID];
+};
+
 #endif /* _NFS_NFSCL_H */
diff --git a/sys/fs/nfs/nfsport.h b/sys/fs/nfs/nfsport.h
index 255c9a47ebdf..6777dc72f6a3 100644
--- a/sys/fs/nfs/nfsport.h
+++ b/sys/fs/nfs/nfsport.h
@@ -412,10 +412,13 @@
 #defineNFSPROC_RMEXTATTR   63
 #defineNFSPROC_LISTEXTATTR 64
 
+/* BindConnectionToSession, done by the krpc for a new connection. */
+#defineNFSPROC_BINDCONNTOSESS  65
+
 /*
  * Must be defined as one higher than the last NFSv4.2 Proc# above.
  */
-#defineNFSV42_NPROCS   65
+#defineNFSV42_NPROCS   66
 
 #endif /* NFS_V3NPROCS */
 
@@ -444,7 +447,7 @@ struct nfsstatsv1 {
uint64_treadlink_bios;
uint64_tbiocache_readdirs;
uint64_t 

git: d60c6dc8f69b - stable/13 - param.h: bump __FreeBSD_version for commit 5a45802b3c8c

2021-04-29 Thread Rick Macklem
The branch stable/13 has been updated by rmacklem:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=d60c6dc8f69b1264c7af5e2479ea94f000fd2c6d

commit d60c6dc8f69b1264c7af5e2479ea94f000fd2c6d
Author: Rick Macklem 
AuthorDate: 2021-04-30 01:29:25 +
Commit: Rick Macklem 
CommitDate: 2021-04-30 01:29:25 +

param.h: bump __FreeBSD_version for commit 5a45802b3c8c

Commit 5a45802b3c8c changed the internal KAPI between the krpc
and NFS.  As such, the krpc, nfscommon and nfscl modules must
all be rebuilt from sources.
---
 sys/sys/param.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/sys/param.h b/sys/sys/param.h
index e547452e5af1..c93eccc143dd 100644
--- a/sys/sys/param.h
+++ b/sys/sys/param.h
@@ -60,7 +60,7 @@
  * in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 1300502  /* Master, propagated to newvers */
+#define __FreeBSD_version 1300503  /* Master, propagated to newvers */
 
 /*
  * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
___
dev-commits-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"


git: 00a7499bcba1 - stable/13 - Add an UPDATING entry for commit 5a45802b3c8c

2021-04-29 Thread Rick Macklem
The branch stable/13 has been updated by rmacklem:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=00a7499bcba17c974275e8208b4227b73cbcbebe

commit 00a7499bcba17c974275e8208b4227b73cbcbebe
Author: Rick Macklem 
AuthorDate: 2021-04-30 01:40:04 +
Commit: Rick Macklem 
CommitDate: 2021-04-30 01:40:04 +

Add an UPDATING entry for commit 5a45802b3c8c
---
 UPDATING | 8 
 1 file changed, 8 insertions(+)

diff --git a/UPDATING b/UPDATING
index c42fe6639b12..b966ed678efd 100644
--- a/UPDATING
+++ b/UPDATING
@@ -11,6 +11,14 @@ handbook:
 Items affecting the ports and packages system can be found in
 /usr/ports/UPDATING.  Please read that file before running portupgrade.
 
+20210429:
+   Commit 5a45802b3c8c changed the internal KAPI between
+   the krpc and NFS.  As such, the krpc, nfscommon and
+   nfscl modules must all be rebuilt from sources.
+   Without this patch, NFSv4.1/4.2 mounts should not
+   be done with the nfscbd(8) daemon running, to avoid
+   needing a working back channel for server->client RPCs.
+
 20210202:
Various LinuxKPI functionality was added which conflicts with DRM.
Please update your drm-kmod port to after the __FreeBSD_verison 1300139
___
dev-commits-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"


git: 3d851bd03698 - stable/13 - Always use inp fib in the inp_lookup_mcast_ifp().

2021-04-29 Thread Alexander V. Chernikov
The branch stable/13 has been updated by melifaro:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=3d851bd036986cab15650fff33185a0fb42d634f

commit 3d851bd036986cab15650fff33185a0fb42d634f
Author: Alexander V. Chernikov 
AuthorDate: 2021-04-05 19:58:57 +
Commit: Alexander V. Chernikov 
CommitDate: 2021-04-29 08:47:31 +

Always use inp fib in the inp_lookup_mcast_ifp().

inp_lookup_mcast_ifp() is static and is only used in the inp_join_group().
The latter function is also static, and is only used in the 
inp_setmoptions(),
 which relies on inp being non-NULL.

As a result, in the current code, inp_lookup_mcast_ifp() is always called
 with non-NULL inp. Eliminate unused RT_DEFAULT_FIB condition and always
 use inp fib instead.

Differential Revision:  https://reviews.freebsd.org/D29594
Reviewed by:kp
MFC after:  2 weeks

(cherry picked from commit c3a456defaf28df8d6f47704d606248f6c22146c)
---
 sys/netinet/in_mcast.c | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/sys/netinet/in_mcast.c b/sys/netinet/in_mcast.c
index 6d390a0b263c..46658688bbc2 100644
--- a/sys/netinet/in_mcast.c
+++ b/sys/netinet/in_mcast.c
@@ -1894,8 +1894,7 @@ inp_getmoptions(struct inpcb *inp, struct sockopt *sopt)
  * specific physical links in the networking stack, or which need
  * to join link-scope groups before IPv4 addresses are configured.
  *
- * If inp is non-NULL, use this socket's current FIB number for any
- * required FIB lookup.
+ * Use this socket's current FIB number for any required FIB lookup.
  * If ina is INADDR_ANY, look up the group address in the unicast FIB,
  * and use its ifp; usually, this points to the default next-hop.
  *
@@ -1916,8 +1915,8 @@ inp_lookup_mcast_ifp(const struct inpcb *inp,
struct rm_priotracker in_ifa_tracker;
struct ifnet *ifp;
struct nhop_object *nh;
-   uint32_t fibnum;
 
+   KASSERT(inp != NULL, ("%s: inp must not be NULL", __func__));
KASSERT(gsin->sin_family == AF_INET, ("%s: not AF_INET", __func__));
KASSERT(IN_MULTICAST(ntohl(gsin->sin_addr.s_addr)),
("%s: not multicast", __func__));
@@ -1930,8 +1929,7 @@ inp_lookup_mcast_ifp(const struct inpcb *inp,
if_ref(ifp);
IN_IFADDR_RUNLOCK(&in_ifa_tracker);
} else {
-   fibnum = inp ? inp->inp_inc.inc_fibnum : RT_DEFAULT_FIB;
-   nh = fib4_lookup(fibnum, gsin->sin_addr, 0, NHR_NONE, 0);
+   nh = fib4_lookup(inp->inp_inc.inc_fibnum, gsin->sin_addr, 0, 
NHR_NONE, 0);
if (nh != NULL) {
ifp = nh->nh_ifp;
if_ref(ifp);
___
dev-commits-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"


git: b77bee7642ae - stable/13 - Appease -Wsign-compare in radix.c

2021-04-29 Thread Alexander V. Chernikov
The branch stable/13 has been updated by melifaro:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=b77bee7642aec3fb52b13893f5f8b21f5d93ef12

commit b77bee7642aec3fb52b13893f5f8b21f5d93ef12
Author: Alexander V. Chernikov 
AuthorDate: 2021-04-10 13:48:25 +
Commit: Alexander V. Chernikov 
CommitDate: 2021-04-29 08:47:31 +

Appease -Wsign-compare in radix.c

Differential Revision:  https://reviews.freebsd.org/D29661
Submitted by:   zec
MFC after   2 weeks

(cherry picked from commit 63dceebe68569c3a7ebd07d0a6123264da625149)
---
 sys/net/radix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/net/radix.c b/sys/net/radix.c
index 1f58318e52ae..931bf6db871b 100644
--- a/sys/net/radix.c
+++ b/sys/net/radix.c
@@ -428,7 +428,7 @@ rn_insert(void *v_arg, struct radix_head *head, int 
*dupentry,
int head_off = top->rn_offset, vlen = LEN(v);
struct radix_node *t = rn_search(v_arg, top);
caddr_t cp = v + head_off;
-   int b;
+   unsigned b;
struct radix_node *p, *tt, *x;
/*
 * Find first bit at which v and t->rn_key differ
___
dev-commits-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"


git: c1ce6196d289 - stable/13 - Allow to specify debugnet fib in sysctl/tunable.

2021-04-29 Thread Alexander V. Chernikov
The branch stable/13 has been updated by melifaro:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=c1ce6196d289d6ca2a46f600d28da129b7cecaae

commit c1ce6196d289d6ca2a46f600d28da129b7cecaae
Author: Alexander V. Chernikov 
AuthorDate: 2021-04-05 19:48:07 +
Commit: Alexander V. Chernikov 
CommitDate: 2021-04-29 08:47:31 +

Allow to specify debugnet fib in sysctl/tunable.

Differential Revision:  https://reviews.freebsd.org/D29593
Reviewed by:donner
MFC after:  2 weeks

(cherry picked from commit caf2f62765f9087a6e0002b1c47c3c6f65a8ae0b)
---
 sys/net/debugnet.c | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/sys/net/debugnet.c b/sys/net/debugnet.c
index 3930a87d46dc..bb59ff33a93f 100644
--- a/sys/net/debugnet.c
+++ b/sys/net/debugnet.c
@@ -91,6 +91,10 @@ int debugnet_nretries = 10;
 SYSCTL_INT(_net_debugnet, OID_AUTO, nretries, CTLFLAG_RWTUN,
 &debugnet_nretries, 0,
 "Number of retransmit attempts before giving up");
+int debugnet_fib = RT_DEFAULT_FIB;
+SYSCTL_INT(_net_debugnet, OID_AUTO, fib, CTLFLAG_RWTUN,
+&debugnet_fib, 0,
+"Fib to use when sending dump");
 
 static bool g_debugnet_pcb_inuse;
 static struct debugnet_pcb g_dnet_pcb;
@@ -658,7 +662,7 @@ debugnet_connect(const struct debugnet_conn_params *dcp,
};
 
CURVNET_SET(vnet0);
-   nh = fib4_lookup_debugnet(RT_DEFAULT_FIB, dest_sin.sin_addr, 0,
+   nh = fib4_lookup_debugnet(debugnet_fib, dest_sin.sin_addr, 0,
NHR_NONE);
CURVNET_RESTORE();
 
___
dev-commits-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"


git: c971873acef4 - stable/13 - Implement better rebuild-delay fib algo policy.

2021-04-29 Thread Alexander V. Chernikov
The branch stable/13 has been updated by melifaro:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=c971873acef46eedec786387b1d9c22b002b6634

commit c971873acef46eedec786387b1d9c22b002b6634
Author: Alexander V. Chernikov 
AuthorDate: 2021-04-09 20:25:47 +
Commit: Alexander V. Chernikov 
CommitDate: 2021-04-29 08:47:31 +

Implement better rebuild-delay fib algo policy.

The intent is to better handle time intervals with large amount of RIB
updates (e.g. BGP peer going up or down), while still keeping low sync
delay for the rest scenarios.

The implementation is the following: updates are bucketed into the
buckets of size 50ms. If the number of updates within a current bucket
 exceeds the threshold of 500 routes/sec (e.g. 10 updates per bucket
interval), the update is delayed for another 50ms. This can be repeated
 until the maximum update delay (1 sec) is reached.

All 3 variables are runtime tunables:

* net.route.algo.fib_max_sync_delay_ms: 1000
* net.route.algo.bucket_change_threshold_rate: 500
* net.route.algo.bucket_time_ms: 50

Differential Review:https://reviews.freebsd.org/D29588
MFC after:  2 weeks

(cherry picked from commit ee2cf2b3609ee179f39080e0ebe8bf79dcb13461)
---
 sys/net/route/fib_algo.c | 289 +--
 1 file changed, 228 insertions(+), 61 deletions(-)

diff --git a/sys/net/route/fib_algo.c b/sys/net/route/fib_algo.c
index c93d76c2379b..03c21af4df97 100644
--- a/sys/net/route/fib_algo.c
+++ b/sys/net/route/fib_algo.c
@@ -105,10 +105,26 @@ SYSCTL_DECL(_net_route);
 SYSCTL_NODE(_net_route, OID_AUTO, algo, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
 "Fib algorithm lookups");
 
-VNET_DEFINE(int, fib_sync_limit) = 100;
-#defineV_fib_sync_limitVNET(fib_sync_limit)
-SYSCTL_INT(_net_route_algo, OID_AUTO, fib_sync_limit, CTLFLAG_RW | 
CTLFLAG_VNET,
-&VNET_NAME(fib_sync_limit), 0, "Guarantee synchronous fib till route 
limit");
+/* Algorithm sync policy */
+
+/* Time interval to bucket updates */
+VNET_DEFINE(unsigned int, bucket_time_ms) = 50;
+#defineV_bucket_time_msVNET(bucket_time_ms)
+SYSCTL_UINT(_net_route_algo, OID_AUTO, bucket_time_ms, CTLFLAG_RW | 
CTLFLAG_VNET,
+&VNET_NAME(bucket_time_ms), 0, "Time interval to calculate update rate");
+
+/* Minimum update rate to delay sync */
+VNET_DEFINE(unsigned int, bucket_change_threshold_rate) = 500;
+#defineV_bucket_change_threshold_rate  
VNET(bucket_change_threshold_rate)
+SYSCTL_UINT(_net_route_algo, OID_AUTO, bucket_change_threshold_rate, 
CTLFLAG_RW | CTLFLAG_VNET,
+&VNET_NAME(bucket_change_threshold_rate), 0, "Minimum update rate to delay 
sync");
+
+/* Max allowed delay to sync */
+VNET_DEFINE(unsigned int, fib_max_sync_delay_ms) = 1000;
+#defineV_fib_max_sync_delay_ms VNET(fib_max_sync_delay_ms)
+SYSCTL_UINT(_net_route_algo, OID_AUTO, fib_max_sync_delay_ms, CTLFLAG_RW | 
CTLFLAG_VNET,
+&VNET_NAME(fib_max_sync_delay_ms), 0, "Maximum time to delay sync (ms)");
+
 
 #ifdef INET6
 VNET_DEFINE_STATIC(bool, algo_fixed_inet6) = false;
@@ -131,6 +147,19 @@ struct nhop_ref_table {
int32_t refcnt[0];
 };
 
+enum fib_callout_action {
+   FDA_NONE,   /* No callout scheduled */
+   FDA_REBUILD,/* Asks to rebuild algo instance */
+   FDA_EVAL,   /* Asks to evaluate if the current algo is still be 
best */
+};
+
+struct fib_sync_status {
+   struct timeval  diverge_time;   /* ts when diverged */
+   uint32_tnum_changes;/* number of changes since sync 
*/
+   uint32_tbucket_changes; /* num changes within the 
current bucket */
+   uint64_tbucket_id;  /* 50ms bucket # */
+};
+
 /*
  * Data structure for the fib lookup instance tied to the particular rib.
  */
@@ -141,12 +170,12 @@ struct fib_data {
uint32_tfd_dead:1;  /* Scheduled for deletion */
uint32_tfd_linked:1;/* true if linked */
uint32_tfd_need_rebuild:1;  /* true if rebuild 
scheduled */
-   uint32_tfd_force_eval:1;/* true if rebuild scheduled */
uint8_t fd_family;  /* family */
uint32_tfd_fibnum;  /* fibnum */
uint32_tfd_failed_rebuilds; /* stat: failed 
rebuilds */
uint32_tfd_gen; /* instance gen# */
struct callout  fd_callout; /* rebuild callout */
+   enum fib_callout_action fd_callout_action;  /* Callout action to 
take */
void*fd_algo_data;  /* algorithm data */
struct nhop_object  **nh_idx;   /* nhop idx->ptr array */
struct nhop_ref_table   *nh_ref_table;  /* array with # of nhop 
references */
@@ -156,12 +185,14 @@ struct fib_data {
struct vnet

git: a07e7856e4cd - stable/13 - fib algo: do not reallocate datapath index for datapath ptr update.

2021-04-29 Thread Alexander V. Chernikov
The branch stable/13 has been updated by melifaro:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=a07e7856e4cd50b7fdae61b6dc6a4babe0cf1ed3

commit a07e7856e4cd50b7fdae61b6dc6a4babe0cf1ed3
Author: Alexander V. Chernikov 
AuthorDate: 2021-04-18 15:03:58 +
Commit: Alexander V. Chernikov 
CommitDate: 2021-04-29 08:47:31 +

fib algo: do not reallocate datapath index for datapath ptr update.

Fib algo uses a per-family array indexed by the fibnum to store
 lookup function pointers and per-fib data.

Each algorithm rebuild currently requires re-allocating this array
 to support atomic change of two pointers.

As in reality most of the changes actually involve changing only
 data pointer, add a shortcut performing in-flight pointer update.

MFC after:  2 weeks

(cherry picked from commit 0abb6ff590842114c74e5d52e1af65605bd9d960)
---
 sys/net/route/fib_algo.c | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/sys/net/route/fib_algo.c b/sys/net/route/fib_algo.c
index 03c21af4df97..a00dfe338ab5 100644
--- a/sys/net/route/fib_algo.c
+++ b/sys/net/route/fib_algo.c
@@ -1438,6 +1438,17 @@ replace_rtables_family(struct fib_dp **pdp, struct 
fib_data *fd, struct fib_dp *
FIB_MOD_LOCK();
old_fdh = get_fib_dp_header(*pdp);
 
+   if (old_fdh->fdh_idx[fd->fd_fibnum].f == dp->f) {
+   /*
+* Function is the same, data pointer needs update.
+* Perform in-line replace without reallocation.
+*/
+   old_fdh->fdh_idx[fd->fd_fibnum].arg = dp->arg;
+   FD_PRINTF(LOG_DEBUG, fd, "FDH %p inline update", old_fdh);
+   FIB_MOD_UNLOCK();
+   return (true);
+   }
+
new_fdh = alloc_fib_dp_array(old_fdh->fdh_num_tables, false);
FD_PRINTF(LOG_DEBUG, fd, "OLD FDH: %p NEW FDH: %p", old_fdh, new_fdh);
if (new_fdh == NULL) {
___
dev-commits-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"


git: 6fa0160556e3 - stable/13 - Add batched update support for the fib algo.

2021-04-29 Thread Alexander V. Chernikov
The branch stable/13 has been updated by melifaro:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=6fa0160556e3c266a8d54f8cbd666d9e9e4b9401

commit 6fa0160556e3c266a8d54f8cbd666d9e9e4b9401
Author: Alexander V. Chernikov 
AuthorDate: 2021-04-09 21:30:10 +
Commit: Alexander V. Chernikov 
CommitDate: 2021-04-29 08:47:32 +

Add batched update support for the fib algo.

Initial fib algo implementation was build on a very simple set of
 principles w.r.t updates:

1) algorithm is ether able to apply the change synchronously (DIR24-8)
 or requires full rebuild (bsearch, lradix).
2) framework falls back to rebuild on every error (memory allocation,
 nhg limit, other internal algo errors, etc).

This changes brings the new "intermediate" concept - batched updates.
Algotirhm can indicate that the particular update has to be handled in
 batched fashion (FLM_BATCH).
The framework will write this update and other updates to the temporary
 buffer instead of pushing them to the algo callback.
Depending on the update rate, the framework will batch 50..1024 ms of 
updates
 and submit them to a different algo callback.

This functionality is handy for the slow-to-rebuild algorithms like DXR.

Differential Revision:  https://reviews.freebsd.org/D29588
Reviewed by:zec
MFC after:  2 weeks

(cherry picked from commit 6b8ef0d428c93c970c1951a52c72f9e99c9e4279)
---
 sys/net/route/fib_algo.c | 135 +--
 sys/net/route/fib_algo.h |  25 -
 2 files changed, 154 insertions(+), 6 deletions(-)

diff --git a/sys/net/route/fib_algo.c b/sys/net/route/fib_algo.c
index 7b3eed9a71c2..171fa2cfb2dd 100644
--- a/sys/net/route/fib_algo.c
+++ b/sys/net/route/fib_algo.c
@@ -151,6 +151,7 @@ enum fib_callout_action {
FDA_NONE,   /* No callout scheduled */
FDA_REBUILD,/* Asks to rebuild algo instance */
FDA_EVAL,   /* Asks to evaluate if the current algo is still be 
best */
+   FDA_BATCH,  /* Asks to submit batch of updates to the algo */
 };
 
 struct fib_sync_status {
@@ -158,6 +159,7 @@ struct fib_sync_status {
uint32_tnum_changes;/* number of changes since sync 
*/
uint32_tbucket_changes; /* num changes within the 
current bucket */
uint64_tbucket_id;  /* 50ms bucket # */
+   struct fib_change_queue fd_change_queue;/* list of scheduled entries */
 };
 
 /*
@@ -170,6 +172,7 @@ struct fib_data {
uint32_tfd_dead:1;  /* Scheduled for deletion */
uint32_tfd_linked:1;/* true if linked */
uint32_tfd_need_rebuild:1;  /* true if rebuild 
scheduled */
+   uint32_tfd_batch:1; /* true if batched notification 
scheduled */
uint8_t fd_family;  /* family */
uint32_tfd_fibnum;  /* fibnum */
uint32_tfd_failed_rebuilds; /* stat: failed 
rebuilds */
@@ -384,6 +387,8 @@ print_op_result(enum flm_op_result result)
return "success";
case FLM_REBUILD:
return "rebuild";
+   case FLM_BATCH:
+   return "batch";
case FLM_ERROR:
return "error";
}
@@ -509,6 +514,8 @@ schedule_fd_rebuild(struct fib_data *fd, const char *reason)
 
if (!fd->fd_need_rebuild) {
fd->fd_need_rebuild = true;
+   /* Stop batch updates */
+   fd->fd_batch = false;
 
/*
 * Potentially re-schedules pending callout
@@ -569,7 +576,7 @@ mark_diverge_time(struct fib_data *fd)
  *   the update gets delayed, up to maximum delay threshold.
  */
 static void
-update_rebuild_delay(struct fib_data *fd)
+update_rebuild_delay(struct fib_data *fd, enum fib_callout_action action)
 {
uint32_t bucket_id, new_delay = 0;
struct timeval tv;
@@ -617,7 +624,7 @@ update_rebuild_delay(struct fib_data *fd)
add_tv_diff_ms(&new_tv, new_delay);
 
int32_t delay_ms = get_tv_diff_ms(&tv, &new_tv);
-   schedule_callout(fd, FDA_REBUILD, delay_ms);
+   schedule_callout(fd, action, delay_ms);
}
 }
 
@@ -627,8 +634,9 @@ update_algo_state(struct fib_data *fd)
 
RIB_WLOCK_ASSERT(fd->fd_rh);
 
-   if (fd->fd_need_rebuild) {
-   update_rebuild_delay(fd);
+   if (fd->fd_batch || fd->fd_need_rebuild) {
+   enum fib_callout_action action = fd->fd_need_rebuild ? 
FDA_REBUILD : FDA_BATCH;
+   update_rebuild_delay(fd, action);
return;
}
 
@@ -665,6 +673,77 @@ need_immediate_sync(struct fib_data *fd, struct 
rib_cmd_info *rc)
return (false);
 }
 
+static bool
+apply_rtable_changes(struct fib_data *fd)
+{
+   enum flm_op_result result;
+  

git: 553c1513a8a5 - stable/13 - Fix build with gcc

2021-04-29 Thread Alexander V. Chernikov
The branch stable/13 has been updated by melifaro:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=553c1513a8a5b0deca8d1b97611d6859b806f281

commit 553c1513a8a5b0deca8d1b97611d6859b806f281
Author: Stefan Eßer 
AuthorDate: 2021-04-25 08:15:17 +
Commit: Alexander V. Chernikov 
CommitDate: 2021-04-29 08:47:31 +

Fix build with gcc

Correctly declare function without arguments as f(void) instead of f().

(cherry picked from commit 6409e594272f66ce3896706ac705bbd465ce233e)
---
 sys/net/route/fib_algo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/net/route/fib_algo.c b/sys/net/route/fib_algo.c
index a00dfe338ab5..7b3eed9a71c2 100644
--- a/sys/net/route/fib_algo.c
+++ b/sys/net/route/fib_algo.c
@@ -364,7 +364,7 @@ fib_error_clear_flm(struct fib_lookup_module *flm)
  * Clears all errors in current VNET.
  */
 static void
-fib_error_clear()
+fib_error_clear(void)
 {
struct fib_error *fe, *fe_tmp;
 
___
dev-commits-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"


git: 59b3b210a69e - stable/13 - [fib algo] always commit static routes synchronously.

2021-04-29 Thread Alexander V. Chernikov
The branch stable/13 has been updated by melifaro:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=59b3b210a69e5eda9e36aac740c2a8da0bf39409

commit 59b3b210a69e5eda9e36aac740c2a8da0bf39409
Author: Alexander V. Chernikov 
AuthorDate: 2021-04-27 08:23:29 +
Commit: Alexander V. Chernikov 
CommitDate: 2021-04-29 08:47:32 +

[fib algo] always commit static routes synchronously.

Modular fib lookup framework features logic that allows
 route update batching for the algorithms that cannot easily
 apply the routing change without rebuilding. As a result,
 dataplane lookups may return old data until the the sync
 takes place. With the default sync timeout of 50ms, it is
 possible that new binary like ping(8) executed exactly after
 route(8) will still use the old fib data.

To address some aspects of the problem, framework executes
 all rtable changes without RTF_GATEWAY synchronously.

To fix the aforementioned problem, this diff extends sync
 execution for all RTF_STATIC routes (e.g. ones maintained by
 route(8).
This fixes a bunch of tests in the networking space.

Reported by:ci, arichardson
MFC after:  2 weeks

(cherry picked from commit 439d087d0b55574db81f4a2799a411c1236d95e3)
---
 sys/net/route/fib_algo.c | 16 
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/sys/net/route/fib_algo.c b/sys/net/route/fib_algo.c
index 5dff2690454d..9fdc80001986 100644
--- a/sys/net/route/fib_algo.c
+++ b/sys/net/route/fib_algo.c
@@ -667,13 +667,21 @@ need_immediate_sync(struct fib_data *fd, struct 
rib_cmd_info *rc)
switch (rc->rc_cmd) {
case RTM_ADD:
nh = rc->rc_nh_new;
-   if (!NH_IS_NHGRP(nh) && (!(nh->nh_flags & NHF_GATEWAY)))
-   return (true);
+   if (!NH_IS_NHGRP(nh)) {
+   if (!(nh->nh_flags & NHF_GATEWAY))
+   return (true);
+   if (nhop_get_rtflags(nh) & RTF_STATIC)
+   return (true);
+   }
break;
case RTM_DELETE:
nh = rc->rc_nh_old;
-   if (!NH_IS_NHGRP(nh) && (!(nh->nh_flags & NHF_GATEWAY)))
-   return (true);
+   if (!NH_IS_NHGRP(nh)) {
+   if (!(nh->nh_flags & NHF_GATEWAY))
+   return (true);
+   if (nhop_get_rtflags(nh) & RTF_STATIC)
+   return (true);
+   }
break;
}
 
___
dev-commits-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"


git: 1899138d5ad5 - stable/13 - Fix rib generation count for fib algo.

2021-04-29 Thread Alexander V. Chernikov
The branch stable/13 has been updated by melifaro:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=1899138d5ad54a878435b503df8953afe8ab451d

commit 1899138d5ad54a878435b503df8953afe8ab451d
Author: Alexander V. Chernikov 
AuthorDate: 2021-04-17 18:58:12 +
Commit: Alexander V. Chernikov 
CommitDate: 2021-04-29 08:47:32 +

Fix rib generation count for fib algo.

Currently, PCB caching mechanism relies on the rib generation
 counter (rnh_gen) to invalidate cached nhops/LLE entries.

With certain fib algorithms, it is now possible that the
 datapath lookup state applies RIB changes with some delay.
In that scenario, PCB cache will invalidate on the RIB change,
 but the new lookup may result in the same nexthop being returned.
When fib algo finally gets in sync with the RIB changes, PCB cache
 will not receive any notification and will end up caching the stale data.

To fix this, introduce additional counter, rnh_gen_rib, which is used
 only when FIB_ALGO is enabled.
This counter is incremented by the control plane. Each time when fib algo
 synchronises with the RIB, it updates rnh_gen to the current rnh_gen_rib 
value.

Differential Revision: https://reviews.freebsd.org/D29812
Reviewed by:donner
MFC after:  2 weeks

(cherry picked from commit 33cb3cb2e3212705b10e7885b37f70a3c2987c9e)
---
 sys/net/route/fib_algo.c  | 13 -
 sys/net/route/route_ctl.c |  6 +++---
 sys/net/route/route_var.h | 15 ++-
 3 files changed, 29 insertions(+), 5 deletions(-)

diff --git a/sys/net/route/fib_algo.c b/sys/net/route/fib_algo.c
index 171fa2cfb2dd..43db482d73da 100644
--- a/sys/net/route/fib_algo.c
+++ b/sys/net/route/fib_algo.c
@@ -527,6 +527,13 @@ schedule_fd_rebuild(struct fib_data *fd, const char 
*reason)
}
 }
 
+static void
+sync_rib_gen(struct fib_data *fd)
+{
+   FD_PRINTF(LOG_DEBUG, fd, "Sync gen %u -> %u", fd->fd_rh->rnh_gen, 
fd->fd_rh->rnh_gen_rib);
+   fd->fd_rh->rnh_gen = fd->fd_rh->rnh_gen_rib;
+}
+
 static int64_t
 get_tv_diff_ms(const struct timeval *old_tv, const struct timeval *new_tv)
 {
@@ -682,6 +689,7 @@ apply_rtable_changes(struct fib_data *fd)
result = fd->fd_flm->flm_change_rib_items_cb(fd->fd_rh, q, 
fd->fd_algo_data);
 
if (result == FLM_SUCCESS) {
+   sync_rib_gen(fd);
for (int i = 0; i < q->count; i++)
if (q->entries[i].nh_old)
fib_unref_nhop(fd, q->entries[i].nh_old);
@@ -813,6 +821,7 @@ handle_rtable_change_cb(struct rib_head *rnh, struct 
rib_cmd_info *rc,
 
switch (result) {
case FLM_SUCCESS:
+   sync_rib_gen(fd);
/* Unref old nexthop on success */
if (rc->rc_nh_old != NULL)
fib_unref_nhop(fd, rc->rc_nh_old);
@@ -1238,7 +1247,9 @@ setup_fd_instance(struct fib_lookup_module *flm, struct 
rib_head *rh,
result = try_setup_fd_instance(flm, rh, prev_fd, &new_fd);
 
if ((result == FLM_SUCCESS) && attach) {
-   if (!fib_set_datapath_ptr(new_fd, &new_fd->fd_dp))
+   if (fib_set_datapath_ptr(new_fd, &new_fd->fd_dp))
+   sync_rib_gen(new_fd);
+   else
result = FLM_REBUILD;
}
 
diff --git a/sys/net/route/route_ctl.c b/sys/net/route/route_ctl.c
index af3853041ac6..2ec25c94299d 100644
--- a/sys/net/route/route_ctl.c
+++ b/sys/net/route/route_ctl.c
@@ -811,7 +811,7 @@ rt_unlinkrte(struct rib_head *rnh, struct rt_addrinfo 
*info, struct rib_cmd_info
rt->rte_flags &= ~RTF_UP;
 
/* Finalize notification */
-   rnh->rnh_gen++;
+   rib_bump_gen(rnh);
rnh->rnh_prefixes--;
 
rc->rc_cmd = RTM_DELETE;
@@ -1073,7 +1073,7 @@ add_route_nhop(struct rib_head *rnh, struct rtentry *rt,
tmproutes_update(rnh, rt);
 
/* Finalize notification */
-   rnh->rnh_gen++;
+   rib_bump_gen(rnh);
rnh->rnh_prefixes++;
 
rc->rc_cmd = RTM_ADD;
@@ -1129,7 +1129,7 @@ change_route_nhop(struct rib_head *rnh, struct rtentry 
*rt,
}
 
/* Finalize notification */
-   rnh->rnh_gen++;
+   rib_bump_gen(rnh);
if (rnd->rnd_nhop == NULL)
rnh->rnh_prefixes--;
 
diff --git a/sys/net/route/route_var.h b/sys/net/route/route_var.h
index 427c286a5090..f12931476fd3 100644
--- a/sys/net/route/route_var.h
+++ b/sys/net/route/route_var.h
@@ -60,7 +60,7 @@ struct rib_head {
rn_walktree_t   *rnh_walktree;  /* traverse tree */
rn_walktree_from_t  *rnh_walktree_from; /* traverse tree below a */
rnh_preadd_entry_f_t*rnh_preadd;/* hook to alter record prior 
to insertion */
-   rt_gen_trnh_gen;/* generation counter */
+   

git: 2c0d16218efa - stable/13 - Fix NOINET[6], !VIMAGE builds after FIB_ALGO addition to GENERIC

2021-04-29 Thread Alexander V. Chernikov
The branch stable/13 has been updated by melifaro:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=2c0d16218efa5db40b8e3f0a0326fb0438faa4a1

commit 2c0d16218efa5db40b8e3f0a0326fb0438faa4a1
Author: Alexander V. Chernikov 
AuthorDate: 2021-04-21 04:52:38 +
Commit: Alexander V. Chernikov 
CommitDate: 2021-04-29 08:47:32 +

Fix NOINET[6],!VIMAGE builds after FIB_ALGO addition to GENERIC

Reported by:jbeich
PR: 255390

(cherry picked from commit 7d222ce3c10bdc23c8dc92d6b13e376ede5840d5)
---
 sys/net/route/fib_algo.c | 16 ++--
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/sys/net/route/fib_algo.c b/sys/net/route/fib_algo.c
index 83fff1ec43e0..5dff2690454d 100644
--- a/sys/net/route/fib_algo.c
+++ b/sys/net/route/fib_algo.c
@@ -108,19 +108,19 @@ SYSCTL_NODE(_net_route, OID_AUTO, algo, CTLFLAG_RW | 
CTLFLAG_MPSAFE, 0,
 /* Algorithm sync policy */
 
 /* Time interval to bucket updates */
-VNET_DEFINE(unsigned int, bucket_time_ms) = 50;
-#defineV_bucket_time_msVNET(bucket_time_ms)
+VNET_DEFINE_STATIC(unsigned int, update_bucket_time_ms) = 50;
+#defineV_update_bucket_time_ms VNET(update_bucket_time_ms)
 SYSCTL_UINT(_net_route_algo, OID_AUTO, bucket_time_ms, CTLFLAG_RW | 
CTLFLAG_VNET,
-&VNET_NAME(bucket_time_ms), 0, "Time interval to calculate update rate");
+&VNET_NAME(update_bucket_time_ms), 0, "Time interval to calculate update 
rate");
 
 /* Minimum update rate to delay sync */
-VNET_DEFINE(unsigned int, bucket_change_threshold_rate) = 500;
+VNET_DEFINE_STATIC(unsigned int, bucket_change_threshold_rate) = 500;
 #defineV_bucket_change_threshold_rate  
VNET(bucket_change_threshold_rate)
 SYSCTL_UINT(_net_route_algo, OID_AUTO, bucket_change_threshold_rate, 
CTLFLAG_RW | CTLFLAG_VNET,
 &VNET_NAME(bucket_change_threshold_rate), 0, "Minimum update rate to delay 
sync");
 
 /* Max allowed delay to sync */
-VNET_DEFINE(unsigned int, fib_max_sync_delay_ms) = 1000;
+VNET_DEFINE_STATIC(unsigned int, fib_max_sync_delay_ms) = 1000;
 #defineV_fib_max_sync_delay_ms VNET(fib_max_sync_delay_ms)
 SYSCTL_UINT(_net_route_algo, OID_AUTO, fib_max_sync_delay_ms, CTLFLAG_RW | 
CTLFLAG_VNET,
 &VNET_NAME(fib_max_sync_delay_ms), 0, "Maximum time to delay sync (ms)");
@@ -589,7 +589,7 @@ update_rebuild_delay(struct fib_data *fd, enum 
fib_callout_action action)
struct timeval tv;
 
/* Fetch all variables at once to ensure consistent reads */
-   uint32_t bucket_time_ms = V_bucket_time_ms;
+   uint32_t bucket_time_ms = V_update_bucket_time_ms;
uint32_t threshold_rate = V_bucket_change_threshold_rate;
uint32_t max_delay_ms = V_fib_max_sync_delay_ms;
 
@@ -1618,10 +1618,14 @@ static struct fib_dp **
 get_family_dp_ptr(int family)
 {
switch (family) {
+#ifdef INET
case AF_INET:
return (&V_inet_dp);
+#endif
+#ifdef INET6
case AF_INET6:
return (&V_inet6_dp);
+#endif
}
return (NULL);
 }
___
dev-commits-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"


git: a423e945c70b - stable/13 - Fix NOINET[6] build after enabling FIB_ALGO in GENERIC.

2021-04-29 Thread Alexander V. Chernikov
The branch stable/13 has been updated by melifaro:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=a423e945c70b55d449d155997ec3d8d0e2cb6716

commit a423e945c70b55d449d155997ec3d8d0e2cb6716
Author: Alexander V. Chernikov 
AuthorDate: 2021-04-21 01:45:49 +
Commit: Alexander V. Chernikov 
CommitDate: 2021-04-29 08:47:32 +

Fix NOINET[6] build after enabling FIB_ALGO in GENERIC.

Submitted by:   jbeich
PR: 255389

(cherry picked from commit 67372fb3e06ebaccfe7c093aa78009d161fa58e6)
---
 sys/net/route/fib_algo.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/sys/net/route/fib_algo.c b/sys/net/route/fib_algo.c
index 43db482d73da..83fff1ec43e0 100644
--- a/sys/net/route/fib_algo.c
+++ b/sys/net/route/fib_algo.c
@@ -706,12 +706,16 @@ fill_change_entry(struct fib_data *fd, struct 
fib_change_entry *ce, struct rib_c
int plen = 0;
 
switch (fd->fd_family) {
+#ifdef INET
case AF_INET:
rt_get_inet_prefix_plen(rc->rc_rt, &ce->addr4, &plen, 
&ce->scopeid);
break;
+#endif
+#ifdef INET6
case AF_INET6:
rt_get_inet6_prefix_plen(rc->rc_rt, &ce->addr6, &plen, 
&ce->scopeid);
break;
+#endif
}
 
ce->plen = plen;
___
dev-commits-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"


git: a0358e3d5184 - main - Synch index of contrib/bc with what is in workdir after cloning.

2021-04-29 Thread Michael Gmelin
The branch main has been updated by grembo (ports committer):

URL: 
https://cgit.FreeBSD.org/src/commit/?id=a0358e3d5184950b4316f105eb292cbafdea208b

commit a0358e3d5184950b4316f105eb292cbafdea208b
Author: Michael Gmelin 
AuthorDate: 2021-04-29 12:29:04 +
Commit: Michael Gmelin 
CommitDate: 2021-04-29 12:33:56 +

Synch index of contrib/bc with what is in workdir after cloning.

From a workdir perspective this should be a no-op.
See also:
https://lists.freebsd.org/pipermail/freebsd-current/2021-April/079569.html
---
 contrib/bc/bc.vcxproj  | 554 -
 contrib/bc/bc.vcxproj.filters  | 362 +--
 contrib/bc/bcl.vcxproj | 320 
 contrib/bc/bcl.vcxproj.filters | 190 +++---
 4 files changed, 713 insertions(+), 713 deletions(-)

diff --git a/contrib/bc/bc.vcxproj b/contrib/bc/bc.vcxproj
index ba0a7f6f1dd6..2dbbd558618f 100644
--- a/contrib/bc/bc.vcxproj
+++ b/contrib/bc/bc.vcxproj
@@ -1,278 +1,278 @@
-
-http://schemas.microsoft.com/developer/msbuild/2003";>
-  
-
-  Debug
-  Win32
-
-
-  Release
-  Win32
-
-
-  Debug
-  x64
-
-
-  Release
-  x64
-
-  
-  
-16.0
-{D5086CFE-052C-4742-B005-E05DB983BBA2}
-Win32Proj
-  
-  
-  
-Application
-true
-v142
-  
-  
-Application
-false
-v142
-  
-  
-Application
-true
-v142
-  
-  
-Application
-false
-v142
-  
-  
-  
-  
-  
-  
-  
-
-  
-  
-
-  
-  
-
-  
-  
-
-  
-  
-
-  Building strgen
-  CL /Fo:$(Configuration)\$(ProjectName)\ 
/Fe:$(Configuration)\$(ProjectName)\strgen.exe gen\strgen.c
-  gen\strgen.c
-  $(Configuration)\$(ProjectName)\strgen.exe
-
-
-  Generating $(Configuration)\$(ProjectName)/lib.c
-  START $(Configuration)\$(ProjectName)/strgen gen\lib.bc 
$(Configuration)\$(ProjectName)/lib.c bc_lib bc_lib_name BC_ENABLED 1
-  $(Configuration)\$(ProjectName)\strgen.exe;gen\lib.bc
-  $(Configuration)\$(ProjectName)\lib.c
-
-
-  Generating $(Configuration)\$(ProjectName)/lib2.c
-  START $(Configuration)\$(ProjectName)/strgen gen\lib2.bc 
$(Configuration)\$(ProjectName)/lib2.c bc_lib2 bc_lib2_name BC_ENABLED 
1
-  $(Configuration)\$(ProjectName)\strgen.exe;gen\lib2.bc
-  $(Configuration)\$(ProjectName)\lib2.c
-
-
-  Generating $(Configuration)\$(ProjectName)/bc_help.c
-  START $(Configuration)\$(ProjectName)/strgen gen\bc_help.txt 
$(Configuration)\$(ProjectName)\bc_help.c bc_help "" BC_ENABLED
-  
$(Configuration)\$(ProjectName)\strgen.exe;gen\bc_help.txt
-  $(Configuration)\$(ProjectName)\bc_help.c
-
-
-  Generating $(Configuration)\$(ProjectName)/dc_help.c
-  START $(Configuration)\$(ProjectName)/strgen gen\dc_help.txt 
$(Configuration)\$(ProjectName)\dc_help.c dc_help "" DC_ENABLED
-  
$(Configuration)\$(ProjectName)\strgen.exe;gen\dc_help.txt
-  $(Configuration)\$(ProjectName)\dc_help.c
-
-  
-  
-ClCompile
-  
-  
-  
-true
-$(SolutionDir)\$(Configuration)\$(ProjectName)\
-$(SolutionDir)\$(Configuration)\$(ProjectName)\
-  
-  
-false
-$(SolutionDir)\$(Configuration)\$(ProjectName)\
-$(SolutionDir)\$(Configuration)\$(ProjectName)\
-  
-  
-true
-$(SolutionDir)\$(Configuration)\$(ProjectName)\
-$(SolutionDir)\$(Configuration)\$(ProjectName)\
-  
-  
-false
-$(SolutionDir)\$(Configuration)\$(ProjectName)\
-$(SolutionDir)\$(Configuration)\$(ProjectName)\
-  
-  
-
-  
WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions);BC_ENABLED=1;DC_ENABLED=1;BC_ENABLE_EXTRA_MATH=1;BC_ENABLE_HISTORY=0;BC_ENABLE_NLS=0;BC_ENABLE_PROMPT=1;BC_DEBUG_CODE=0;BC_ENABLE_LIBRARY=0;EXECSUFFIX=.exe;BUILD_TYPE=HN
-  
$(SolutionDir)\include;%(AdditionalIncludeDirectories)
-  MultiThreadedDebugDLL
-  Level3
-  ProgramDatabase
-  Disabled
-  false
-  /W3 %(AdditionalOptions)
-
-
-  MachineX86
-  true
-  Console
-  
kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;bcrypt.lib;ucrt.lib;%(AdditionalDependencies)
-
-
-  copy /b "$(SolutionDir)\$(Configuration)\$(ProjectName)\bc.exe" 
"$(SolutionDir)\$(Configuration)\$(ProjectName)\dc.exe"
-
-
-  Copying bc to dc...
-
-  
-  
-
-  
WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions);BC_ENABLED=1;DC_ENABLED=1;BC_ENABLE_EXTRA_MATH=1;BC_ENABLE_HISTORY=0;BC_ENABLE_NLS=0;BC_ENABLE_PROMPT=1;BC_DEBUG_CODE=0;BC_ENABLE_LIBRARY=0;EXECSUFFIX=.exe;BUILD_TYPE=HN
-  
$(SolutionDir)\include;%(AdditionalIncludeDirectories)
-  MultiThreadedDLL
-  Level3
-  ProgramDatabase
-  MaxSpeed
-  false
-  /W3 %(AdditionalOptions)
-
-
-  MachineX86
-  false
-  Console
-  
kernel32.lib;user32.lib;

git: ac099daf6742 - main - arm: add a release conf for distribution files

2021-04-29 Thread Mitchell Horne
The branch main has been updated by mhorne:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=ac099daf6742ead81ea7ea86351a8ef4e783041b

commit ac099daf6742ead81ea7ea86351a8ef4e783041b
Author: Mitchell Horne 
AuthorDate: 2021-04-29 13:10:08 +
Commit: Mitchell Horne 
CommitDate: 2021-04-29 13:10:08 +

arm: add a release conf for distribution files

We do not currently generate armv7 distribution sets, because we don't
build any installer images. However, having such sets available can be
useful for quickly installing a base system, particularly in the case
of creating an armv7 poudriere jail on arm64.

Add a configuration file for the generation of these distribution sets.

Reviewed by:manu, imp, gjb
MFC after:  3 weeks
Relnotes:   yes
Differential Revision:  https://reviews.freebsd.org/D29923
---
 release/arm/armv7.conf | 8 
 1 file changed, 8 insertions(+)

diff --git a/release/arm/armv7.conf b/release/arm/armv7.conf
new file mode 100644
index ..174e41615b63
--- /dev/null
+++ b/release/arm/armv7.conf
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+# Configuration file for release/release.sh to build arm/armv7 distribution
+# images (not system-on-chip (SoC) images).
+
+TARGET="arm"
+TARGET_ARCH="armv7"
+KERNEL="GENERIC"
___
dev-commits-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"


git: eaabed8ac449 - main - pf: Trivial typo fix

2021-04-29 Thread Kristof Provost
The branch main has been updated by kp:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=eaabed8ac449dbd9a7f4f567e9378bda4636221e

commit eaabed8ac449dbd9a7f4f567e9378bda4636221e
Author: Kristof Provost 
AuthorDate: 2021-04-29 08:34:00 +
Commit: Kristof Provost 
CommitDate: 2021-04-29 13:25:07 +

pf: Trivial typo fix

PV -> PF

MFC after:  1 week
Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 sys/netpfil/pf/pf_nv.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sys/netpfil/pf/pf_nv.c b/sys/netpfil/pf/pf_nv.c
index d88c0b14e435..8a2082d3e0bb 100644
--- a/sys/netpfil/pf/pf_nv.c
+++ b/sys/netpfil/pf/pf_nv.c
@@ -35,7 +35,7 @@ __FBSDID("$FreeBSD$");
 
 #include 
 
-#definePV_NV_IMPL_UINT(fnname, type, max)  
\
+#definePF_NV_IMPL_UINT(fnname, type, max)  
\
int 
\
pf_nv ## fnname(const nvlist_t *nvl, const char *name, type *val)   
\
{   
\
@@ -101,9 +101,9 @@ pf_nvbinary(const nvlist_t *nvl, const char *name, void 
*data,
return (0);
 }
 
-PV_NV_IMPL_UINT(uint8, uint8_t, UINT8_MAX)
-PV_NV_IMPL_UINT(uint16, uint16_t, UINT16_MAX);
-PV_NV_IMPL_UINT(uint32, uint32_t, UINT32_MAX)
+PF_NV_IMPL_UINT(uint8, uint8_t, UINT8_MAX);
+PF_NV_IMPL_UINT(uint16, uint16_t, UINT16_MAX);
+PF_NV_IMPL_UINT(uint32, uint32_t, UINT32_MAX);
 
 int
 pf_nvint(const nvlist_t *nvl, const char *name, int *val)
___
dev-commits-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"


git: 112e30301846 - stable/13 - pmcstat: set initial counter value to zero

2021-04-29 Thread Mitchell Horne
The branch stable/13 has been updated by mhorne:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=112e30301846d8fede4679a3f95e18820d721bbd

commit 112e30301846d8fede4679a3f95e18820d721bbd
Author: Mitchell Horne 
AuthorDate: 2021-04-21 20:28:12 +
Commit: Mitchell Horne 
CommitDate: 2021-04-29 13:19:20 +

pmcstat: set initial counter value to zero

For an infrequent event, pmcstat may report (u_long)-1 for CPUs where
the counter was never incremented. Just set this to zero, instead.

ev->ev_count is passed as the 'count' argument to pmc_allocate(3), but
this wasn't always the case.

Reviewed by:gnn
MFC after:  1 week
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D29887

(cherry picked from commit edcf9e59c356525632dd2546d72916aeca609a2b)
---
 usr.sbin/pmcstat/pmcstat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usr.sbin/pmcstat/pmcstat.c b/usr.sbin/pmcstat/pmcstat.c
index 688a98843652..b7f6c5e0f63e 100644
--- a/usr.sbin/pmcstat/pmcstat.c
+++ b/usr.sbin/pmcstat/pmcstat.c
@@ -675,7 +675,7 @@ main(int argc, char **argv)
if (option == 'S' || option == 'P')
ev->ev_count = current_sampling_count ? 
current_sampling_count : pmc_pmu_sample_rate_get(ev->ev_spec);
else
-   ev->ev_count = -1;
+   ev->ev_count = 0;
 
if (option == 'S' || option == 's')
ev->ev_cpu = CPU_FFS(&cpumask) - 1;
___
dev-commits-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"


git: e0ae2b39aa3e - stable/13 - pmc_allocate(3): document the count argument

2021-04-29 Thread Mitchell Horne
The branch stable/13 has been updated by mhorne:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=e0ae2b39aa3e51b0e3f7b9661192cba8f06e7b10

commit e0ae2b39aa3e51b0e3f7b9661192cba8f06e7b10
Author: Mitchell Horne 
AuthorDate: 2021-04-21 20:27:49 +
Commit: Mitchell Horne 
CommitDate: 2021-04-29 13:13:57 +

pmc_allocate(3): document the count argument

This was added in b2ca2e50b9aa, and serves to provide an initial value
to the PMC, eliminating the need for a second syscall via pmc_set(3).

Reviewed by:gnn, 0mp (manpages)
MFC after:  1 week
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D29885

(cherry picked from commit 50f6c139970084adeefec98c658645c34b72209e)
---
 lib/libpmc/pmc_allocate.3 | 17 -
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/lib/libpmc/pmc_allocate.3 b/lib/libpmc/pmc_allocate.3
index 291ca8ac0113..515b427cf7bc 100644
--- a/lib/libpmc/pmc_allocate.3
+++ b/lib/libpmc/pmc_allocate.3
@@ -23,7 +23,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 22, 2008
+.Dd April 21, 2021
 .Dt PMC_ALLOCATE 3
 .Os
 .Sh NAME
@@ -41,6 +41,7 @@
 .Fa "uint32_t flags"
 .Fa "int cpu"
 .Fa "pmc_id_t *pmcid"
+.Fa "uint64_t count"
 .Fc
 .Ft int
 .Fn pmc_release "pmc_id_t pmc"
@@ -111,6 +112,20 @@ Process scope PMC allocations should specify the constant
 .Dv PMC_CPU_ANY
 for this argument.
 .Pp
+The
+.Fa count
+argument behaves identically to the
+.Xr pmc_set 3
+function's
+.Fa value
+argument.
+For counting PMCs,
+.Fa count
+specifies the initial value of the allocated PMC.
+For sampling PMCs,
+.Fa count
+specifies the reload count.
+.Pp
 Function
 .Fn pmc_release
 releases the PMC denoted by argument
___
dev-commits-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"


git: d87ee7b97fe8 - stable/13 - pmcstat: fix the usage message for -t

2021-04-29 Thread Mitchell Horne
The branch stable/13 has been updated by mhorne:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=d87ee7b97fe8177f7374e7e8c053f0614c1ddbf0

commit d87ee7b97fe8177f7374e7e8c053f0614c1ddbf0
Author: Mitchell Horne 
AuthorDate: 2021-04-21 20:44:52 +
Commit: Mitchell Horne 
CommitDate: 2021-04-29 13:21:19 +

pmcstat: fix the usage message for -t

A slight mix-up of the flags means this case isn't triggered when it
should be. Now, `pmcstat -s event -t 1234` will print the correct
error message.

MFC after:  1 week
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit c4473add1d3d588d8747cab86796d2f2d4c8847c)
---
 usr.sbin/pmcstat/pmcstat.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/usr.sbin/pmcstat/pmcstat.c b/usr.sbin/pmcstat/pmcstat.c
index b7f6c5e0f63e..997005cec269 100644
--- a/usr.sbin/pmcstat/pmcstat.c
+++ b/usr.sbin/pmcstat/pmcstat.c
@@ -898,7 +898,8 @@ main(int argc, char **argv)
pmcstat_show_usage();
 
/* check for -t pid without a process PMC spec */
-   if ((args.pa_required & FLAG_HAS_TARGET) &&
+   if ((args.pa_flags & FLAG_HAS_TARGET) &&
+   (args.pa_required & FLAG_HAS_PROCESS_PMCS) &&
(args.pa_flags & FLAG_HAS_PROCESS_PMCS) == 0)
errx(EX_USAGE,
 "ERROR: option -t requires a process mode PMC to be specified."
___
dev-commits-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"


Re: git: a0358e3d5184 - main - Synch index of contrib/bc with what is in workdir after cloning.

2021-04-29 Thread Cy Schubert
In message <202104291234.13tcyk5k092...@gitrepo.freebsd.org>, Michael 
Gmelin wr
ites:
> The branch main has been updated by grembo (ports committer):
>
> URL: https://cgit.FreeBSD.org/src/commit/?id=a0358e3d5184950b4316f105eb292cba
> fdea208b
>
> commit a0358e3d5184950b4316f105eb292cbafdea208b
> Author: Michael Gmelin 
> AuthorDate: 2021-04-29 12:29:04 +
> Commit: Michael Gmelin 
> CommitDate: 2021-04-29 12:33:56 +
>
> Synch index of contrib/bc with what is in workdir after cloning.
> 
> From a workdir perspective this should be a no-op.
> See also:
> https://lists.freebsd.org/pipermail/freebsd-current/2021-April/079569.htm
> l
> ---
>  contrib/bc/bc.vcxproj  | 554 ---
> --
>  contrib/bc/bc.vcxproj.filters  | 362 +--
>  contrib/bc/bcl.vcxproj | 320 
>  contrib/bc/bcl.vcxproj.filters | 190 +++---
>  4 files changed, 713 insertions(+), 713 deletions(-)
>

Whatever was done here I cannot rebase from main to my local branches. The 
files remain modified. The only recourse so far was to delete the local 
branch and start over. I've done this to one inconsequential branch so far 
but hopefully someone can suggest a solution.

git restore the files, git rm the files, rm the files, git stash push, all 
don't remove them from the branch following rebase. And subsequent rebase 
to main will fail. main is ok though.

What is it that you did to sync the index?


-- 
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.


___
dev-commits-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"


git: 8e435de92c78 - main - src.libnames.mk: Remove redundant am-utils library definition

2021-04-29 Thread Cy Schubert
The branch main has been updated by cy:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=8e435de92c78fc5cd137c05fb8db238e4b6480f0

commit 8e435de92c78fc5cd137c05fb8db238e4b6480f0
Author: Cy Schubert 
AuthorDate: 2021-04-22 06:17:08 +
Commit: Cy Schubert 
CommitDate: 2021-04-29 14:07:29 +

src.libnames.mk: Remove redundant am-utils library definition

r358821 (13f7dbe822d5f447c6137dc0d4ff838fb7050dbe) retired amd(8).
This commit cleans up an artifact left in src.libnames.mk.

Reviewed by:imp
Differential Revision:  https://reviews.freebsd.org/D29914
---
 share/mk/src.libnames.mk | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk
index 259a65a7afd4..75eafa374245 100644
--- a/share/mk/src.libnames.mk
+++ b/share/mk/src.libnames.mk
@@ -578,9 +578,6 @@ LIBFIFOLOG?=
${LIBFIFOLOGDIR}/libfifolog${PIE_SUFFIX}.a
 LIBBSNMPTOOLSDIR=  ${_LIB_OBJTOP}/usr.sbin/bsnmpd/tools/libbsnmptools
 LIBBSNMPTOOLS?=${LIBBSNMPTOOLSDIR}/libbsnmptools${PIE_SUFFIX}.a
 
-LIBAMUDIR= ${_LIB_OBJTOP}/usr.sbin/amd/libamu
-LIBAMU?=   ${LIBAMUDIR}/libamu${PIE_SUFFIX}.a
-
 LIBBE?=${LIBBEDIR}/libbe${PIE_SUFFIX}.a
 
 LIBPMCSTATDIR= ${_LIB_OBJTOP}/lib/libpmcstat
___
dev-commits-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"


Re: git: a0358e3d5184 - main - Synch index of contrib/bc with what is in workdir after cloning.

2021-04-29 Thread Jessica Clarke
On 29 Apr 2021, at 14:53, Cy Schubert  wrote:
> 
> In message <202104291234.13tcyk5k092...@gitrepo.freebsd.org>, Michael 
> Gmelin wr
> ites:
>> The branch main has been updated by grembo (ports committer):
>> 
>> URL: https://cgit.FreeBSD.org/src/commit/?id=a0358e3d5184950b4316f105eb292cba
>> fdea208b
>> 
>> commit a0358e3d5184950b4316f105eb292cbafdea208b
>> Author: Michael Gmelin 
>> AuthorDate: 2021-04-29 12:29:04 +
>> Commit: Michael Gmelin 
>> CommitDate: 2021-04-29 12:33:56 +
>> 
>>Synch index of contrib/bc with what is in workdir after cloning.
>> 
>>From a workdir perspective this should be a no-op.
>>See also:
>>https://lists.freebsd.org/pipermail/freebsd-current/2021-April/079569.htm
>> l
>> ---
>> contrib/bc/bc.vcxproj  | 554 ---
>> --
>> contrib/bc/bc.vcxproj.filters  | 362 +--
>> contrib/bc/bcl.vcxproj | 320 
>> contrib/bc/bcl.vcxproj.filters | 190 +++---
>> 4 files changed, 713 insertions(+), 713 deletions(-)
>> 
> 
> Whatever was done here I cannot rebase from main to my local branches. The 
> files remain modified. The only recourse so far was to delete the local 
> branch and start over. I've done this to one inconsequential branch so far 
> but hopefully someone can suggest a solution.
> 
> git restore the files, git rm the files, rm the files, git stash push, all 
> don't remove them from the branch following rebase. And subsequent rebase 
> to main will fail. main is ok though.
> 
> What is it that you did to sync the index?

Given it’s a vcxproj, is this a CRLF vs LF issue?

Also, why do we even have these files? Can we not just delete them from the
repo? Big blogs of Visual Studio-generated XML are entirely useless.

Jess

___
dev-commits-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"


git: b0ad62ff6fd1 - stable/13 - Add some regression tests for O_PATH and AT_EMPTY_PATH

2021-04-29 Thread Mark Johnston
The branch stable/13 has been updated by markj:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=b0ad62ff6fd17a061011cd8af8e39793cb93de5f

commit b0ad62ff6fd17a061011cd8af8e39793cb93de5f
Author: Mark Johnston 
AuthorDate: 2021-04-15 13:40:57 +
Commit: Mark Johnston 
CommitDate: 2021-04-29 14:22:43 +

Add some regression tests for O_PATH and AT_EMPTY_PATH

Reviewed by:kib
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D29719

(cherry picked from commit 3a248c84419d4f7d6617d30744ab56d0b456fe03)
---
 tests/sys/file/Makefile|   1 +
 tests/sys/file/path_test.c | 778 +
 2 files changed, 779 insertions(+)

diff --git a/tests/sys/file/Makefile b/tests/sys/file/Makefile
index ed2d2c4fbe2e..46a6a9544c62 100644
--- a/tests/sys/file/Makefile
+++ b/tests/sys/file/Makefile
@@ -4,6 +4,7 @@ TESTSDIR=   ${TESTSBASE}/sys/file
 
 BINDIR=${TESTSDIR}
 
+ATF_TESTS_C+=  path_test
 TAP_TESTS_C+=  closefrom_test
 TAP_TESTS_C+=  dup_test
 TAP_TESTS_C+=  fcntlflags_test
diff --git a/tests/sys/file/path_test.c b/tests/sys/file/path_test.c
new file mode 100644
index ..a8354f88b091
--- /dev/null
+++ b/tests/sys/file/path_test.c
@@ -0,0 +1,778 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
+ * Copyright (c) 2021 The FreeBSD Foundation
+ *
+ * This software was developed by Mark Johnston under sponsorship from
+ * the FreeBSD Foundation.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in
+ *the documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Basic regression tests for handling of O_PATH descriptors.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#defineFMT_ERR(s)  s ": %s", strerror(errno)
+
+#defineCHECKED_CLOSE(fd)   \
+   ATF_REQUIRE_MSG(close(fd) == 0, FMT_ERR("close"))
+
+/* Create a temporary regular file containing some data. */
+static void
+mktfile(char path[PATH_MAX], const char *template)
+{
+   char buf[BUFSIZ];
+   int fd;
+
+   snprintf(path, PATH_MAX, "%s", template);
+   fd = mkstemp(path);
+   ATF_REQUIRE_MSG(fd >= 0, FMT_ERR("mkstemp"));
+   memset(buf, 0, sizeof(buf));
+   ATF_REQUIRE_MSG(write(fd, buf, sizeof(buf)) == sizeof(buf),
+   FMT_ERR("write"));
+   CHECKED_CLOSE(fd);
+}
+
+/* Make a temporary directory. */
+static void
+mktdir(char path[PATH_MAX], const char *template)
+{
+   snprintf(path, PATH_MAX, "%s", template);
+   ATF_REQUIRE_MSG(mkdtemp(path) == path, FMT_ERR("mkdtemp"));
+}
+
+/* Wait for a child process to exit with status 0. */
+static void
+waitchild(pid_t child, int exstatus)
+{
+   int error, status;
+
+   error = waitpid(child, &status, 0);
+   ATF_REQUIRE_MSG(error != -1, FMT_ERR("waitpid"));
+   ATF_REQUIRE_MSG(WIFEXITED(status), "child exited abnormally, status %d",
+   status);
+   ATF_REQUIRE_MSG(WEXITSTATUS(status) == exstatus,
+   "child exit status is %d, expected %d",
+   WEXITSTATUS(status), exstatus);
+}
+
+ATF_TC_WITHOUT_HEAD(path_access);
+ATF_TC_BODY(path_access, tc)
+{
+   char path[PATH_MAX];
+   struct stat sb;
+   struct timespec ts[2];
+   struct timeval tv[2];
+   int pathfd;
+
+   mktfile(path, "path_access.XX");
+
+   pathfd = open(path, O_PATH);
+   ATF_REQUIRE_MSG(pathfd >= 0, FMT_ERR("open"));
+
+   ATF_REQUIRE_ERRNO(EBADF, fchmod(pathfd, 0666) == -1);
+   ATF_REQUIRE_ERRNO(EBADF, fchown(pathfd, getuid(), getgid()) == -1);
+   ATF_REQUIRE_

Re: git: a0358e3d5184 - main - Synch index of contrib/bc with what is in workdir after cloning.

2021-04-29 Thread Michael Gmelin



On Thu, 29 Apr 2021 06:53:18 -0700
Cy Schubert  wrote:

> In message <202104291234.13tcyk5k092...@gitrepo.freebsd.org>, Michael 
> Gmelin wr
> ites:
> > The branch main has been updated by grembo (ports committer):
> >
> > URL:
> > https://cgit.FreeBSD.org/src/commit/?id=a0358e3d5184950b4316f105eb292cba
> > fdea208b
> >
> > commit a0358e3d5184950b4316f105eb292cbafdea208b
> > Author: Michael Gmelin 
> > AuthorDate: 2021-04-29 12:29:04 +
> > Commit: Michael Gmelin 
> > CommitDate: 2021-04-29 12:33:56 +
> >
> > Synch index of contrib/bc with what is in workdir after cloning.
> > 
> > From a workdir perspective this should be a no-op.
> > See also:
> > 
> > https://lists.freebsd.org/pipermail/freebsd-current/2021-April/079569.htm
> > l
> > ---
> >  contrib/bc/bc.vcxproj  | 554
> > --- --
> >  contrib/bc/bc.vcxproj.filters  | 362 +--
> >  contrib/bc/bcl.vcxproj | 320 
> >  contrib/bc/bcl.vcxproj.filters | 190 +++---
> >  4 files changed, 713 insertions(+), 713 deletions(-)
> >  
> 
> Whatever was done here I cannot rebase from main to my local
> branches. The files remain modified. The only recourse so far was to
> delete the local branch and start over. I've done this to one
> inconsequential branch so far but hopefully someone can suggest a
> solution.

Can you show an example of how this fails for you (especially the error
messages)?

> 
> git restore the files, git rm the files, rm the files, git stash
> push, all don't remove them from the branch following rebase. And
> subsequent rebase to main will fail. main is ok though.
> 
> What is it that you did to sync the index?

Like in the mail thread linked in the git comment, theoretically a noop:

  git clone https://g...@repo.freebsd.org/src.git
  cd src
  touch contrib/bc/*vcx*
  git commit -a
  git push

It's a problem caused by .gitattributes being checked in after the
*vcx* files were checked in (again, see the email thread and "man
1 gitattributes").

If it was for me, I would remove the .gitattributes eol specs, they
shouldn't be necessary for our purposes.

Best,
Michael

-- 
Michael Gmelin
___
dev-commits-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"


Re: git: a0358e3d5184 - main - Synch index of contrib/bc with what is in workdir after cloning.

2021-04-29 Thread Cy Schubert
In message <20210429162959.16662...@bsd64.grem.de>, Michael Gmelin writes:
> 
>
>
> On Thu, 29 Apr 2021 06:53:18 -0700
> Cy Schubert  wrote:
>
> > In message <202104291234.13tcyk5k092...@gitrepo.freebsd.org>, Michael 
> > Gmelin wr
> > ites:
> > > The branch main has been updated by grembo (ports committer):
> > >
> > > URL:
> > > https://cgit.FreeBSD.org/src/commit/?id=a0358e3d5184950b4316f105eb292cba
> > > fdea208b
> > >
> > > commit a0358e3d5184950b4316f105eb292cbafdea208b
> > > Author: Michael Gmelin 
> > > AuthorDate: 2021-04-29 12:29:04 +
> > > Commit: Michael Gmelin 
> > > CommitDate: 2021-04-29 12:33:56 +
> > >
> > > Synch index of contrib/bc with what is in workdir after cloning.
> > > 
> > > From a workdir perspective this should be a no-op.
> > > See also:
> > > https://lists.freebsd.org/pipermail/freebsd-current/2021-April/079569
> .htm
> > > l
> > > ---
> > >  contrib/bc/bc.vcxproj  | 554
> > > --- --
> > >  contrib/bc/bc.vcxproj.filters  | 362 +--
> > >  contrib/bc/bcl.vcxproj | 320 
> > >  contrib/bc/bcl.vcxproj.filters | 190 +++---
> > >  4 files changed, 713 insertions(+), 713 deletions(-)
> > >  
> > 
> > Whatever was done here I cannot rebase from main to my local
> > branches. The files remain modified. The only recourse so far was to
> > delete the local branch and start over. I've done this to one
> > inconsequential branch so far but hopefully someone can suggest a
> > solution.
>
> Can you show an example of how this fails for you (especially the error
> messages)?

slippy$ git pull -r --all
Fetching freebsd
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 9 (delta 3), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (9/9), 12.42 KiB | 111.00 KiB/s, done.
>From https://git.freebsd.org/src
   59b3b210a69e..d87ee7b97fe8  stable/13  -> freebsd/stable/13
Already up to date.
slippy$ git co komquats
Switched to branch 'komquats'
slippy$ git st
On branch komquats
Changes not staged for commit:
  (use "git add ..." to update what will be committed)
  (use "git restore ..." to discard changes in working directory)
modified:   contrib/bc/bc.vcxproj
modified:   contrib/bc/bc.vcxproj.filters
modified:   contrib/bc/bcl.vcxproj
modified:   contrib/bc/bcl.vcxproj.filters

Untracked files:
  (use "git add ..." to include in what will be committed)
sys/i386/conf/IPFILTER
usr.sbin/ufdformat/

no changes added to commit (use "git add" and/or "git commit -a")
slippy$ git rebase main
error: cannot rebase: You have unstaged changes.
error: Please commit or stash them.
slippy$ git stash push -m foobar
Saved working directory and index state On komquats: foobar
slippy$ git rebase main
error: cannot rebase: You have unstaged changes.
error: Please commit or stash them.
slippy$ git st
On branch komquats
Changes not staged for commit:
  (use "git add ..." to update what will be committed)
  (use "git restore ..." to discard changes in working directory)
modified:   contrib/bc/bc.vcxproj
modified:   contrib/bc/bc.vcxproj.filters
modified:   contrib/bc/bcl.vcxproj
modified:   contrib/bc/bcl.vcxproj.filters

Untracked files:
  (use "git add ..." to include in what will be committed)
sys/i386/conf/IPFILTER
usr.sbin/ufdformat/

no changes added to commit (use "git add" and/or "git commit -a")
slippy$ git stash push -m foobar
Saved working directory and index state On komquats: foobar
slippy$ git st
On branch komquats
Changes not staged for commit:
  (use "git add ..." to update what will be committed)
  (use "git restore ..." to discard changes in working directory)
modified:   contrib/bc/bc.vcxproj
modified:   contrib/bc/bc.vcxproj.filters
modified:   contrib/bc/bcl.vcxproj
modified:   contrib/bc/bcl.vcxproj.filters

Untracked files:
  (use "git add ..." to include in what will be committed)
sys/i386/conf/IPFILTER
usr.sbin/ufdformat/

no changes added to commit (use "git add" and/or "git commit -a")
slippy$ 

rm the files, switch branch to main, rebase again, remove the branch, and 
start over was the only solution.

So far this affected only one branch. My other branches are so far 
unaffected.

As no other branch is affected it appears this was local to this one 
branch. The branch is (was) approximately four months old. Recreating it, 
which wasn't difficult, resolved the issue.

This is the first time I've had any git problems of this nature here at 
FreeBSD. I've (we've) had many at $JOB because of git-lfs, causing similar 
looking issues. But that's a whole different kettle of fish. (I'm the only 
one at $JOB who uses git on a UNIX-like system while everyone else uses 
Visual Studio.)

>
> > 
> > git restore the files, git 

Re: git: e86bddea9fe6 - main - pf: Split pf_rule into kernel and user space versions

2021-04-29 Thread Shawn Webb
On Tue, Jan 05, 2021 at 10:37:54PM +, Kristof Provost wrote:
> The branch main has been updated by kp:
> 
> URL: 
> https://cgit.FreeBSD.org/src/commit/?id=e86bddea9fe62d5093a1942cf21950b3c5ca62e5
> 
> commit e86bddea9fe62d5093a1942cf21950b3c5ca62e5
> Author: Kristof Provost 
> AuthorDate: 2020-12-05 13:32:54 +
> Commit: Kristof Provost 
> CommitDate: 2021-01-05 22:35:36 +
> 
> pf: Split pf_rule into kernel and user space versions
> 
> No functional change intended.
> 
> MFC after:  2 weeks
> Sponsored by:   Orange Business Services
> Differential Revision:  https://reviews.freebsd.org/D27758

Key Kristof,

This commit breaks the security/expiretable port. Specifically, the
guarding of the pf_state struct, which expiretable uses directly.

Thanks,

-- 
Shawn Webb
Cofounder / Security Engineer
HardenedBSD

https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc


signature.asc
Description: PGP signature


Re: git: e86bddea9fe6 - main - pf: Split pf_rule into kernel and user space versions

2021-04-29 Thread Kristof Provost

On 29 Apr 2021, at 17:14, Shawn Webb wrote:

On Tue, Jan 05, 2021 at 10:37:54PM +, Kristof Provost wrote:

The branch main has been updated by kp:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=e86bddea9fe62d5093a1942cf21950b3c5ca62e5


commit e86bddea9fe62d5093a1942cf21950b3c5ca62e5
Author: Kristof Provost 
AuthorDate: 2020-12-05 13:32:54 +
Commit: Kristof Provost 
CommitDate: 2021-01-05 22:35:36 +

pf: Split pf_rule into kernel and user space versions

No functional change intended.

MFC after:  2 weeks
Sponsored by:   Orange Business Services
Differential Revision:  https://reviews.freebsd.org/D27758


Key Kristof,

This commit breaks the security/expiretable port. Specifically, the
guarding of the pf_state struct, which expiretable uses directly.

Yeah, it’s come up before: 
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253547


Tl;dr: The expiretable port used a struct it should not have been using. 
That part of the code never[*] worked, but it’s not actually used 
anyway. Renato has a patch to fix the port by simply deleting the 
offending code.


Best regards,
Kristof

[*] Not in recent memory anyway. At least since 2012. That’s when the 
pf code was moved around in the tree and I’ve not dug further to see 
when this started to be wrong.

___
dev-commits-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"


Re: git: a0358e3d5184 - main - Synch index of contrib/bc with what is in workdir after cloning.

2021-04-29 Thread Michael Gmelin



On Thu, 29 Apr 2021 07:55:58 -0700
Cy Schubert  wrote:

> In message <20210429162959.16662...@bsd64.grem.de>, Michael Gmelin
> writes:
> > 
> >
> >
> > On Thu, 29 Apr 2021 06:53:18 -0700
> > Cy Schubert  wrote:
> >  
> > > In message <202104291234.13tcyk5k092...@gitrepo.freebsd.org>,
> > > Michael Gmelin wr
> > > ites:  
> > > > The branch main has been updated by grembo (ports committer):
> > > >
> > > > URL:
> > > > https://cgit.FreeBSD.org/src/commit/?id=a0358e3d5184950b4316f105eb292cba
> > > > fdea208b
> > > >
> > > > commit a0358e3d5184950b4316f105eb292cbafdea208b
> > > > Author: Michael Gmelin 
> > > > AuthorDate: 2021-04-29 12:29:04 +
> > > > Commit: Michael Gmelin 
> > > > CommitDate: 2021-04-29 12:33:56 +
> > > >
> > > > Synch index of contrib/bc with what is in workdir after
> > > > cloning. 
> > > > From a workdir perspective this should be a no-op.
> > > > See also:
> > > > 
> > > > https://lists.freebsd.org/pipermail/freebsd-current/2021-April/079569
> > > >  
> > .htm  
> > > > l
> > > > ---
> > > >  contrib/bc/bc.vcxproj  | 554
> > > > --- --
> > > >  contrib/bc/bc.vcxproj.filters  | 362
> > > > +-- contrib/bc/bcl.vcxproj |
> > > > 320  contrib/bc/bcl.vcxproj.filters |
> > > > 190 +++--- 4 files changed, 713 insertions(+), 713
> > > > deletions(-) 
> > > 
> > > Whatever was done here I cannot rebase from main to my local
> > > branches. The files remain modified. The only recourse so far was
> > > to delete the local branch and start over. I've done this to one
> > > inconsequential branch so far but hopefully someone can suggest a
> > > solution.  
> >
> > Can you show an example of how this fails for you (especially the
> > error messages)?  
> 
> slippy$ git pull -r --all
> Fetching freebsd
> remote: Enumerating objects: 9, done.
> remote: Counting objects: 100% (9/9), done.
> remote: Compressing objects: 100% (9/9), done.
> remote: Total 9 (delta 3), reused 0 (delta 0), pack-reused 0
> Unpacking objects: 100% (9/9), 12.42 KiB | 111.00 KiB/s, done.
> From https://git.freebsd.org/src
>59b3b210a69e..d87ee7b97fe8  stable/13  -> freebsd/stable/13
> Already up to date.
> slippy$ git co komquats
> Switched to branch 'komquats'
> slippy$ git st
> On branch komquats
> Changes not staged for commit:
>   (use "git add ..." to update what will be committed)
>   (use "git restore ..." to discard changes in working
> directory) modified:   contrib/bc/bc.vcxproj
>   modified:   contrib/bc/bc.vcxproj.filters
>   modified:   contrib/bc/bcl.vcxproj
>   modified:   contrib/bc/bcl.vcxproj.filters
> 
> Untracked files:
>   (use "git add ..." to include in what will be committed)
>   sys/i386/conf/IPFILTER
>   usr.sbin/ufdformat/
> 
> no changes added to commit (use "git add" and/or "git commit -a")
> slippy$ git rebase main
> error: cannot rebase: You have unstaged changes.
> error: Please commit or stash them.
> slippy$ git stash push -m foobar
> Saved working directory and index state On komquats: foobar
> slippy$ git rebase main
> error: cannot rebase: You have unstaged changes.
> error: Please commit or stash them.
> slippy$ git st
> On branch komquats
> Changes not staged for commit:
>   (use "git add ..." to update what will be committed)
>   (use "git restore ..." to discard changes in working
> directory) modified:   contrib/bc/bc.vcxproj
>   modified:   contrib/bc/bc.vcxproj.filters
>   modified:   contrib/bc/bcl.vcxproj
>   modified:   contrib/bc/bcl.vcxproj.filters
> 
> Untracked files:
>   (use "git add ..." to include in what will be committed)
>   sys/i386/conf/IPFILTER
>   usr.sbin/ufdformat/
> 
> no changes added to commit (use "git add" and/or "git commit -a")
> slippy$ git stash push -m foobar
> Saved working directory and index state On komquats: foobar
> slippy$ git st
> On branch komquats
> Changes not staged for commit:
>   (use "git add ..." to update what will be committed)
>   (use "git restore ..." to discard changes in working
> directory) modified:   contrib/bc/bc.vcxproj
>   modified:   contrib/bc/bc.vcxproj.filters
>   modified:   contrib/bc/bcl.vcxproj
>   modified:   contrib/bc/bcl.vcxproj.filters
> 
> Untracked files:
>   (use "git add ..." to include in what will be committed)
>   sys/i386/conf/IPFILTER
>   usr.sbin/ufdformat/
> 
> no changes added to commit (use "git add" and/or "git commit -a")
> slippy$ 
> 
> rm the files, switch branch to main, rebase again, remove the branch,
> and start over was the only solution.
> 
> So far this affected only one branch. My other branches are so far 
> unaffected.
> 
> As no other branch is affected it appears this was local to this one 
> branch. The branch is (was) approximately four months old. Recreating
> it, which wasn't difficult, resolved the issue.
> 
> This is the first time I've had any git problems of this nature here

git: ee8b757a949a - main - ipmi: support getting address from EFI

2021-04-29 Thread Eric van Gyzen
The branch main has been updated by vangyzen:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=ee8b757a949a9575c7355ea01f0475e0c526b9e5

commit ee8b757a949a9575c7355ea01f0475e0c526b9e5
Author: Yinlong Lu 
AuthorDate: 2021-04-29 10:04:36 +
Commit: Eric van Gyzen 
CommitDate: 2021-04-29 10:20:58 +

ipmi: support getting address from EFI

The original implementation only supports getting the address from legacy
BIOS (by searching for the SMBIOS_SIG pattern in a fixed address space).

Try to get the SMBIOS table from EFI through efirt (EFI Runtime Services)
firstly.  Continue to search in the legacy BIOS if a NULL address is
returned from EFI.

By this way the ipmi function supports both legacy BIOS and UEFI systems.

Reviewed by:dab, vangyzen
MFC after:  1 week
Sponsored by:   Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D30007
---
 sys/dev/ipmi/ipmi_isa.c|  4 
 sys/dev/ipmi/ipmi_pci.c|  4 
 sys/dev/ipmi/ipmi_smbios.c | 19 ---
 sys/dev/ipmi/ipmi_smbus.c  |  4 
 4 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/sys/dev/ipmi/ipmi_isa.c b/sys/dev/ipmi/ipmi_isa.c
index cdff305b07ec..1123f2849905 100644
--- a/sys/dev/ipmi/ipmi_isa.c
+++ b/sys/dev/ipmi/ipmi_isa.c
@@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -286,3 +287,6 @@ static driver_t ipmi_isa_driver = {
 };
 
 DRIVER_MODULE(ipmi_isa, isa, ipmi_isa_driver, ipmi_devclass, 0, 0);
+#ifdef ARCH_MAY_USE_EFI
+MODULE_DEPEND(ipmi_isa, efirt, 1, 1, 1);
+#endif
diff --git a/sys/dev/ipmi/ipmi_pci.c b/sys/dev/ipmi/ipmi_pci.c
index d4598f9db873..13ac4f4b5ede 100644
--- a/sys/dev/ipmi/ipmi_pci.c
+++ b/sys/dev/ipmi/ipmi_pci.c
@@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -292,3 +293,6 @@ static driver_t ipmi2_pci_driver = {
 };
 
 DRIVER_MODULE(ipmi2_pci, pci, ipmi2_pci_driver, ipmi_devclass, 0, 0);
+#ifdef ARCH_MAY_USE_EFI
+MODULE_DEPEND(ipmi2_pci, efirt, 1, 1, 1);
+#endif
diff --git a/sys/dev/ipmi/ipmi_smbios.c b/sys/dev/ipmi/ipmi_smbios.c
index a1b953365d7c..e26b6f2956ad 100644
--- a/sys/dev/ipmi/ipmi_smbios.c
+++ b/sys/dev/ipmi/ipmi_smbios.c
@@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -150,15 +151,27 @@ smbios_ipmi_info(struct smbios_structure_header *h, void 
*arg)
 static void
 ipmi_smbios_probe(struct ipmi_get_info *info)
 {
+#ifdef ARCH_MAY_USE_EFI
+   struct uuid efi_smbios;
+   void *addr_efi;
+#endif
struct smbios_eps *header;
void *table;
u_int32_t addr;
 
+   addr = 0;
bzero(info, sizeof(struct ipmi_get_info));
 
-   /* Find the SMBIOS table header. */
-   addr = bios_sigsearch(SMBIOS_START, SMBIOS_SIG, SMBIOS_LEN,
- SMBIOS_STEP, SMBIOS_OFF);
+#ifdef ARCH_MAY_USE_EFI
+   efi_smbios = (struct uuid)EFI_TABLE_SMBIOS;
+   if (!efi_get_table(&efi_smbios, &addr_efi))
+   addr = (vm_paddr_t)addr_efi;
+#endif
+
+   if (addr == 0)
+   /* Find the SMBIOS table header. */
+   addr = bios_sigsearch(SMBIOS_START, SMBIOS_SIG, SMBIOS_LEN,
+   SMBIOS_STEP, SMBIOS_OFF);
if (addr == 0)
return;
 
diff --git a/sys/dev/ipmi/ipmi_smbus.c b/sys/dev/ipmi/ipmi_smbus.c
index 212248f0217e..652e0ea6e665 100644
--- a/sys/dev/ipmi/ipmi_smbus.c
+++ b/sys/dev/ipmi/ipmi_smbus.c
@@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -131,3 +132,6 @@ static driver_t ipmi_smbus_driver = {
 
 DRIVER_MODULE(ipmi_smbus, smbus, ipmi_smbus_driver, ipmi_devclass, 0, 0);
 MODULE_DEPEND(ipmi_smbus, smbus, SMBUS_MINVER, SMBUS_PREFVER, SMBUS_MAXVER);
+#ifdef ARCH_MAY_USE_EFI
+MODULE_DEPEND(ipmi_smbus, efirt, 1, 1, 1);
+#endif
___
dev-commits-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"


git: 5950b9cdbba2 - stable/13 - release.sh: Skip installing textproc/docproj when NODOC is set

2021-04-29 Thread Glen Barber
The branch stable/13 has been updated by gjb:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=5950b9cdbba29ebd1b33be9e52cd9d26d732481b

commit 5950b9cdbba29ebd1b33be9e52cd9d26d732481b
Author: Glen Barber 
AuthorDate: 2021-02-03 00:04:11 +
Commit: Glen Barber 
CommitDate: 2021-04-29 15:24:03 +

release.sh: Skip installing textproc/docproj when NODOC is set

PR: 253192
Submitted by:   Yasuhiro Kimura
Sponsored by:   Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 805e2876ec20f89e45f0f9f4164f31b6711ff0ea)
---
 release/release.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/release/release.sh b/release/release.sh
index 8294eaef6f00..58f946b9bba1 100755
--- a/release/release.sh
+++ b/release/release.sh
@@ -326,7 +326,7 @@ extra_chroot_setup() {
pkg clean -y
fi
fi
-   if [ -d ${CHROOTDIR}/usr/ports ]; then
+   if [ -z "${NODOC}" ] && [ -d ${CHROOTDIR}/usr/ports ]; then
# Trick the ports 'run-autotools-fixup' target to do the right
# thing.
_OSVERSION=$(chroot ${CHROOTDIR} /usr/bin/uname -U)
___
dev-commits-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"


Invitation to Project Monitoring and Evaluation with Data Management and Analysis Workshop

2021-04-29 Thread Jackson From FDC-K Africa


___
dev-commits-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"


git: 20e3b9d8bd77 - main - kasan: Use vm_offset_t for the first parameter to kasan_shadow_map()

2021-04-29 Thread Mark Johnston
The branch main has been updated by markj:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=20e3b9d8bd778445bb80b2be28d2fdedf7bae37e

commit 20e3b9d8bd778445bb80b2be28d2fdedf7bae37e
Author: Mark Johnston 
AuthorDate: 2021-04-29 15:39:02 +
Commit: Mark Johnston 
CommitDate: 2021-04-29 15:39:02 +

kasan: Use vm_offset_t for the first parameter to kasan_shadow_map()

No functional change intended.

Sponsored by:   The FreeBSD Foundation
---
 sys/amd64/amd64/pmap.c |  2 +-
 sys/kern/subr_asan.c   | 10 +-
 sys/sys/asan.h |  2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index 77c486c0d00a..66617bffa8df 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -4890,7 +4890,7 @@ pmap_growkernel(vm_offset_t addr)
if (addr - 1 >= vm_map_max(kernel_map))
addr = vm_map_max(kernel_map);
if (kernel_vm_end < addr)
-   kasan_shadow_map((void *)kernel_vm_end, addr - kernel_vm_end);
+   kasan_shadow_map(kernel_vm_end, addr - kernel_vm_end);
while (kernel_vm_end < addr) {
pdpe = pmap_pdpe(kernel_pmap, kernel_vm_end);
if ((*pdpe & X86_PG_V) == 0) {
diff --git a/sys/kern/subr_asan.c b/sys/kern/subr_asan.c
index d0478899e8c7..b812f7bca465 100644
--- a/sys/kern/subr_asan.c
+++ b/sys/kern/subr_asan.c
@@ -97,18 +97,18 @@ static bool kasan_enabled __read_mostly = false;
 /* -- 
*/
 
 void
-kasan_shadow_map(void *addr, size_t size)
+kasan_shadow_map(vm_offset_t addr, size_t size)
 {
size_t sz, npages, i;
vm_offset_t sva, eva;
 
-   KASSERT((vm_offset_t)addr % KASAN_SHADOW_SCALE == 0,
-   ("%s: invalid address %p", __func__, addr));
+   KASSERT(addr % KASAN_SHADOW_SCALE == 0,
+   ("%s: invalid address %#lx", __func__, addr));
 
sz = roundup(size, KASAN_SHADOW_SCALE) / KASAN_SHADOW_SCALE;
 
-   sva = kasan_md_addr_to_shad((vm_offset_t)addr);
-   eva = kasan_md_addr_to_shad((vm_offset_t)addr) + sz;
+   sva = kasan_md_addr_to_shad(addr);
+   eva = kasan_md_addr_to_shad(addr) + sz;
 
sva = rounddown(sva, PAGE_SIZE);
eva = roundup(eva, PAGE_SIZE);
diff --git a/sys/sys/asan.h b/sys/sys/asan.h
index c8620c72..caa6643bda68 100644
--- a/sys/sys/asan.h
+++ b/sys/sys/asan.h
@@ -56,7 +56,7 @@
 #defineKASAN_EXEC_ARGS_FREED   0xFF
 
 void kasan_init(void);
-void kasan_shadow_map(void *, size_t);
+void kasan_shadow_map(vm_offset_t, size_t);
 
 void kasan_mark(const void *, size_t, size_t, uint8_t);
 #else /* KASAN */
___
dev-commits-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"


git: 0490d82acef8 - stable/13 - release: sync 'git count' logic with newvers.sh

2021-04-29 Thread Glen Barber
The branch stable/13 has been updated by gjb:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=0490d82acef865eef70d3214f695c93b4cf3aef2

commit 0490d82acef865eef70d3214f695c93b4cf3aef2
Author: Glen Barber 
AuthorDate: 2021-03-17 14:57:32 +
Commit: Glen Barber 
CommitDate: 2021-04-29 15:44:46 +

release: sync 'git count' logic with newvers.sh

Sync determining the git count with newvers.sh by adding the
--first-parent argument.  This ensures uname(1) reflects the
file name for snapshots.

Reported by:Mark Millard
Sponsored by:   Rubicon Communications, LLC ("Netgate")

(cherry picked from commit e5c6913a8d23ebe49c9e8f95c5236c7a0d8dbac5)
---
 release/Makefile.inc1 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/release/Makefile.inc1 b/release/Makefile.inc1
index 64f7c6e049a4..da7226dfa890 100644
--- a/release/Makefile.inc1
+++ b/release/Makefile.inc1
@@ -22,7 +22,7 @@ GITREV!=  ${GIT_CMD} -C ${.CURDIR} rev-parse --verify 
--short HEAD 2>/dev/null ||
 . export GITREV
 . endif
 . if !defined(GITCOUNT) || empty(GITCOUNT)
-GITCOUNT!= ${GIT_CMD} -C ${.CURDIR} rev-list --count HEAD 2>/dev/null || 
true
+GITCOUNT!= ${GIT_CMD} -C ${.CURDIR} rev-list --first-parent --count HEAD 
2>/dev/null || true
 . export GITCOUNT
 . endif
 .else
___
dev-commits-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"


git: 5a3548f2e28a - stable/13 - release: do not set __MAKE_CONF and SRCCONF for the chroot build

2021-04-29 Thread Glen Barber
The branch stable/13 has been updated by gjb:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=5a3548f2e28a7240138ea714e31ae9089f8a80be

commit 5a3548f2e28a7240138ea714e31ae9089f8a80be
Author: Glen Barber 
AuthorDate: 2021-03-16 16:01:48 +
Commit: Glen Barber 
CommitDate: 2021-04-29 15:45:46 +

release: do not set __MAKE_CONF and SRCCONF for the chroot build

PR: 254319
Submitted by:   truckman
Sponsored by:   Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 0af8a2db34cff008d4f48f357da48b7379b18893)
---
 release/release.sh | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/release/release.sh b/release/release.sh
index 58f946b9bba1..0c38f2ed45b1 100755
--- a/release/release.sh
+++ b/release/release.sh
@@ -188,6 +188,7 @@ env_check() {
# this file, unless overridden by release.conf.  In most cases, these
# will not need to be changed.
CONF_FILES="__MAKE_CONF=${MAKE_CONF} SRCCONF=${SRC_CONF}"
+   NOCONF_FILES="__MAKE_CONF=/dev/null SRCCONF=/dev/null"
if [ -n "${TARGET}" ] && [ -n "${TARGET_ARCH}" ]; then
ARCH_FLAGS="TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH}"
else
@@ -211,9 +212,9 @@ env_check() {
 
CHROOT_MAKEENV="${CHROOT_MAKEENV} \
MAKEOBJDIRPREFIX=${CHROOTDIR}/tmp/obj"
-   CHROOT_WMAKEFLAGS="${MAKE_FLAGS} ${WORLD_FLAGS} ${CONF_FILES}"
-   CHROOT_IMAKEFLAGS="${WORLD_FLAGS} ${CONF_FILES}"
-   CHROOT_DMAKEFLAGS="${WORLD_FLAGS} ${CONF_FILES}"
+   CHROOT_WMAKEFLAGS="${MAKE_FLAGS} ${WORLD_FLAGS} ${NOCONF_FILES}"
+   CHROOT_IMAKEFLAGS="${WORLD_FLAGS} ${NOCONF_FILES}"
+   CHROOT_DMAKEFLAGS="${WORLD_FLAGS} ${NOCONF_FILES}"
RELEASE_WMAKEFLAGS="${MAKE_FLAGS} ${WORLD_FLAGS} ${ARCH_FLAGS} \
${CONF_FILES}"
RELEASE_KMAKEFLAGS="${MAKE_FLAGS} ${KERNEL_FLAGS} \
___
dev-commits-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"


git: aa4eb2089751 - stable/13 - pass UNAME_r to fix building 14.x ports on 13.x

2021-04-29 Thread Glen Barber
The branch stable/13 has been updated by gjb:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=aa4eb2089751cd0039d114a0fd016d2d7fddc5e9

commit aa4eb2089751cd0039d114a0fd016d2d7fddc5e9
Author: Glen Barber 
AuthorDate: 2021-02-18 23:52:39 +
Commit: Glen Barber 
CommitDate: 2021-04-29 15:55:46 +

pass UNAME_r to fix building 14.x ports on 13.x

Sponsored by:   Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 80ab50e1de19ca125f05a13937c796d48c4edd4a)
---
 release/Makefile.vm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/release/Makefile.vm b/release/Makefile.vm
index 39a8186ba675..67e849369596 100644
--- a/release/Makefile.vm
+++ b/release/Makefile.vm
@@ -54,7 +54,7 @@ emulator-portinstall:
 .if ( ${TARGET_ARCH} != "i386" ) || ( ${MACHINE_ARCH} != "amd64" )
 .if !exists(/usr/local/bin/qemu-${TARGET_ARCH}-static)
 .if exists(${PORTSDIR}/emulators/qemu-user-static/Makefile)
-   env - PATH=$$PATH make -C ${PORTSDIR}/emulators/qemu-user-static 
BATCH=1 all install clean
+   env - UNAME_r="${REVISION}-${BRANCH}" PATH=$$PATH make -C 
${PORTSDIR}/emulators/qemu-user-static BATCH=1 all install clean
 .else
 .if !exists(/usr/local/sbin/pkg-static)
env ASSUME_ALWAYS_YES=yes pkg bootstrap -y
___
dev-commits-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"