svn commit: r340392 - head/sys/kern

2018-11-12 Thread Kyle Evans
Author: kevans
Date: Tue Nov 13 04:34:30 2018
New Revision: 340392
URL: https://svnweb.freebsd.org/changeset/base/340392

Log:
  Add dynamic_kenv assertion to init_static_kenv
  
  Both to formally document the requirement that this not be called after the
  dynamic kenv is setup, and to perhaps help static analyzers figure out
  what's going on. While calling init_static_kenv this late isn't fatal, there
  are some caveats that the caller should be aware of:
  
  - Late calls are effectively a no-op, as far as default FreeBSD is
  concerned, as everything will switch to searching the dynamic kenv once it's
  available.
  
  - Each of the kern_getenv calls will leak memory, as it's assumed that
  these are searching static environment and allocations will not be made.
  
  As such, this usage is not sensible and should be detected.

Modified:
  head/sys/kern/kern_environment.c

Modified: head/sys/kern/kern_environment.c
==
--- head/sys/kern/kern_environment.cTue Nov 13 01:30:31 2018
(r340391)
+++ head/sys/kern/kern_environment.cTue Nov 13 04:34:30 2018
(r340392)
@@ -249,6 +249,7 @@ init_static_kenv(char *buf, size_t len)
 {
char *eval;
 
+   KASSERT(!dynamic_kenv, ("kenv: dynamic_kenv already initialized"));
/*
 * Give the static environment a chance to disable the loader(8)
 * environment first.  This is done with loader_env.disabled=1.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r340387 - in head/sys: amd64/conf i386/conf

2018-11-12 Thread Warner Losh
On Mon, Nov 12, 2018, 3:12 PM Rodney W. Grimes <
free...@pdx.rh.cn85.dnsmgr.net wrote:

> > Author: zeising (doc,ports committer)
> > Date: Mon Nov 12 21:01:28 2018
> > New Revision: 340387
> > URL: https://svnweb.freebsd.org/changeset/base/340387
> >
> > Log:
> >   Add evdev support to amd64 and i386 kernels
> >
> >   Include evdev support and drivers in the amd64 and i386 GENERIC and
> MINIMAL
> >   kernels.  Evdev is used by X and wayland to handle input devices, and
> this
> >   change, together with upcomming changes in ports will make us handle
> input
> >   devices better in graphical UIs.
>
> Well these "upcomming" changes in ports effect aarch64 and powerpc
> who are also consumers of X?
>

Likely. Though there is little experience with them, so we don't know if it
is even safe to turn them on there yet. This has taken 6 months to get
stable on x86 due to its fragile console locking protocol. Similar time has
not been invested elsewhere, so until that happens, we should keep them off
by default. Otherwise we run the risk of destabilizing these platforms,
even for people who don't use X. As tier 2 platforms, this has been how
we've traditionally approached risk. Even though aarch64 is approaching
tier1 status overall, in graphics it is still lagging.

Warner


>   Reviewed by:wulf, bapt, imp
> >   Approved by:imp
> >   Differential Revision:  https://reviews.freebsd.org/D17912
> >
> > Modified:
> >   head/sys/amd64/conf/GENERIC
> >   head/sys/amd64/conf/MINIMAL
> >   head/sys/i386/conf/GENERIC
> >   head/sys/i386/conf/MINIMAL
> >
> > Modified: head/sys/amd64/conf/GENERIC
> >
> ==
> > --- head/sys/amd64/conf/GENERIC   Mon Nov 12 20:44:22 2018
> (r340386)
> > +++ head/sys/amd64/conf/GENERIC   Mon Nov 12 21:01:28 2018
> (r340387)
> > @@ -372,3 +372,8 @@ devicevmx # VMware
> VMXNET3 Ethernet
> >
> >  # Netmap provides direct access to TX/RX rings on supported NICs
> >  device   netmap  # netmap(4) support
> > +
> > +# evdev interface
> > +options  EVDEV_SUPPORT   # evdev support in legacy drivers
> > +device   evdev   # input event device
> support
> > +device   uinput  # install /dev/uinput cdev
> >
> > Modified: head/sys/amd64/conf/MINIMAL
> >
> ==
> > --- head/sys/amd64/conf/MINIMAL   Mon Nov 12 20:44:22 2018
> (r340386)
> > +++ head/sys/amd64/conf/MINIMAL   Mon Nov 12 21:01:28 2018
> (r340387)
> > @@ -147,3 +147,8 @@ devicebpf # Berkeley
> packet filter
> >  # NOTE: XENHVM depends on xenpci.  They must be added or removed
> together.
> >  options  XENHVM  # Xen HVM kernel infrastructure
> >  device   xenpci  # Xen HVM Hypervisor
> services driver
> > +
> > +# evdev interface
> > +options  EVDEV_SUPPORT   # evdev support in legacy drivers
> > +device   evdev   # input event device
> support
> > +device   uinput  # install /dev/uinput cdev
> >
> > Modified: head/sys/i386/conf/GENERIC
> >
> ==
> > --- head/sys/i386/conf/GENERICMon Nov 12 20:44:22 2018
> (r340386)
> > +++ head/sys/i386/conf/GENERICMon Nov 12 21:01:28 2018
> (r340387)
> > @@ -366,3 +366,8 @@ devicexenpci  # Xen HVM
> Hypervisor services driver
> >
> >  # VMware support
> >  device   vmx # VMware VMXNET3 Ethernet
> > +
> > +# evdev interface
> > +options  EVDEV_SUPPORT   # evdev support in legacy drivers
> > +device   evdev   # input event device
> support
> > +device   uinput  # install /dev/uinput cdev
> >
> > Modified: head/sys/i386/conf/MINIMAL
> >
> ==
> > --- head/sys/i386/conf/MINIMALMon Nov 12 20:44:22 2018
> (r340386)
> > +++ head/sys/i386/conf/MINIMALMon Nov 12 21:01:28 2018
> (r340387)
> > @@ -148,3 +148,8 @@ devicebpf # Berkeley
> packet filter
> >  # NOTE: XENHVM depends on xenpci.  They must be added or removed
> together.
> >  options  XENHVM  # Xen HVM kernel infrastructure
> >  device   xenpci  # Xen HVM Hypervisor
> services driver
> > +
> > +# evdev interface
> > +options  EVDEV_SUPPORT   # evdev support in legacy drivers
> > +device   evdev   # input event device
> support
> > +device   uinput  # install /dev/uinput cdev
> >
> >
>
> --
> Rod Grimes
> rgri...@freebsd.org
>
>

Re: svn commit: r340387 - in head/sys: amd64/conf i386/conf

2018-11-12 Thread Warner Losh
On Mon, Nov 12, 2018 at 5:30 PM Rodney W. Grimes <
free...@pdx.rh.cn85.dnsmgr.net> wrote:

> > On Mon, Nov 12, 2018, 3:12 PM Rodney W. Grimes <
> > free...@pdx.rh.cn85.dnsmgr.net wrote:
> >
> > > > Author: zeising (doc,ports committer)
> > > > Date: Mon Nov 12 21:01:28 2018
> > > > New Revision: 340387
> > > > URL: https://svnweb.freebsd.org/changeset/base/340387
> > > >
> > > > Log:
> > > >   Add evdev support to amd64 and i386 kernels
> > > >
> > > >   Include evdev support and drivers in the amd64 and i386 GENERIC and
> > > MINIMAL
> > > >   kernels.  Evdev is used by X and wayland to handle input devices,
> and
> > > this
> > > >   change, together with upcomming changes in ports will make us
> handle
> > > input
> > > >   devices better in graphical UIs.
> > >
> > > Well these "upcomming" changes in ports effect aarch64 and powerpc
> > > who are also consumers of X?
> > >
> >
> > Likely. Though there is little experience with them, so we don't know if
> it
> > is even safe to turn them on there yet. This has taken 6 months to get
> > stable on x86 due to its fragile console locking protocol. Similar time
> has
> > not been invested elsewhere, so until that happens, we should keep them
> off
> > by default. Otherwise we run the risk of destabilizing these platforms,
> > even for people who don't use X. As tier 2 platforms, this has been how
> > we've traditionally approached risk. Even though aarch64 is approaching
> > tier1 status overall, in graphics it is still lagging.
>
> From some place aarch64 is already a tier1 platform, specifically
> it is listed as such in the pkg.freebsd.org package download page.
>

Graphics on aarch64 is tier 2, and will remain tier 2 for the foreseeable
future. Tier 1 support requires that we leverage other people's drivers,
and we can't easily do that w/o a good linux compat layer. The structure of
FreeBSD and Linux are just enough different that doing so is somewhat
tricky and labor intensive. This is especially true for the acceleration
features. Basic framebuffer support isn't terribly hard, but to get good 2d
and 3d acceleration, we'll likely need to run upstream vendor's code (which
in many cases is available only as a binary blob + linux glue).


> My real concern here is that it sounded like changes to what are
> in the ports/packages are going to be made in such a way that you
> are required to have evdev to use them.  If this suddently becomes
> mandatory to be able to use X we need to ensure that this code
> (evdev) does infact work on aarch64 and others before such changes are
> put in place.  My reading here is that this code is only avaliable
> as static compile into the kernel, aka no moduleto load, making this
> a non-trivial road block to rpi3, etc users.
>

This is just for touchscreen support on x86, which requires evdev to work
well. Whatever works today won't change. However, without a lot of testing,
I'm hesitant to blindly enable it on aarch64. Once that changes, we can
turn it on, but until then it would be unwise. And evdev can be turned off
on a per-platform basis in the packages / ports tree should the need arise.
I don't think this is going to be an issue.

Warner


> > Warner
> >
> >
> > >   Reviewed by:wulf, bapt, imp
> > > >   Approved by:imp
> > > >   Differential Revision:  https://reviews.freebsd.org/D17912
> > > >
> > > > Modified:
> > > >   head/sys/amd64/conf/GENERIC
> > > >   head/sys/amd64/conf/MINIMAL
> > > >   head/sys/i386/conf/GENERIC
> > > >   head/sys/i386/conf/MINIMAL
> > > >
> > > > Modified: head/sys/amd64/conf/GENERIC
> > > >
> > >
> ==
> > > > --- head/sys/amd64/conf/GENERIC   Mon Nov 12 20:44:22 2018
> > > (r340386)
> > > > +++ head/sys/amd64/conf/GENERIC   Mon Nov 12 21:01:28 2018
> > > (r340387)
> > > > @@ -372,3 +372,8 @@ devicevmx #
> VMware
> > > VMXNET3 Ethernet
> > > >
> > > >  # Netmap provides direct access to TX/RX rings on supported NICs
> > > >  device   netmap  # netmap(4) support
> > > > +
> > > > +# evdev interface
> > > > +options  EVDEV_SUPPORT   # evdev support in legacy
> drivers
> > > > +device   evdev   # input event device
> > > support
> > > > +device   uinput  # install /dev/uinput
> cdev
> > > >
> > > > Modified: head/sys/amd64/conf/MINIMAL
> > > >
> > >
> ==
> > > > --- head/sys/amd64/conf/MINIMAL   Mon Nov 12 20:44:22 2018
> > > (r340386)
> > > > +++ head/sys/amd64/conf/MINIMAL   Mon Nov 12 21:01:28 2018
> > > (r340387)
> > > > @@ -147,3 +147,8 @@ devicebpf #
> Berkeley
> > > packet filter
> > > >  # NOTE: XENHVM depends on xenpci.  They must be added or removed
> > > together.
> > > >  options  XENHVM  # Xen HVM kernel 

Re: svn commit: r340387 - in head/sys: amd64/conf i386/conf

2018-11-12 Thread Rodney W. Grimes
> On Mon, Nov 12, 2018, 3:12 PM Rodney W. Grimes <
> free...@pdx.rh.cn85.dnsmgr.net wrote:
> 
> > > Author: zeising (doc,ports committer)
> > > Date: Mon Nov 12 21:01:28 2018
> > > New Revision: 340387
> > > URL: https://svnweb.freebsd.org/changeset/base/340387
> > >
> > > Log:
> > >   Add evdev support to amd64 and i386 kernels
> > >
> > >   Include evdev support and drivers in the amd64 and i386 GENERIC and
> > MINIMAL
> > >   kernels.  Evdev is used by X and wayland to handle input devices, and
> > this
> > >   change, together with upcomming changes in ports will make us handle
> > input
> > >   devices better in graphical UIs.
> >
> > Well these "upcomming" changes in ports effect aarch64 and powerpc
> > who are also consumers of X?
> >
> 
> Likely. Though there is little experience with them, so we don't know if it
> is even safe to turn them on there yet. This has taken 6 months to get
> stable on x86 due to its fragile console locking protocol. Similar time has
> not been invested elsewhere, so until that happens, we should keep them off
> by default. Otherwise we run the risk of destabilizing these platforms,
> even for people who don't use X. As tier 2 platforms, this has been how
> we've traditionally approached risk. Even though aarch64 is approaching
> tier1 status overall, in graphics it is still lagging.

>From some place aarch64 is already a tier1 platform, specifically
it is listed as such in the pkg.freebsd.org package download page.

My real concern here is that it sounded like changes to what are
in the ports/packages are going to be made in such a way that you
are required to have evdev to use them.  If this suddently becomes
mandatory to be able to use X we need to ensure that this code
(evdev) does infact work on aarch64 and others before such changes are
put in place.  My reading here is that this code is only avaliable
as static compile into the kernel, aka no moduleto load, making this
a non-trivial road block to rpi3, etc users.

> Warner
> 
> 
> >   Reviewed by:wulf, bapt, imp
> > >   Approved by:imp
> > >   Differential Revision:  https://reviews.freebsd.org/D17912
> > >
> > > Modified:
> > >   head/sys/amd64/conf/GENERIC
> > >   head/sys/amd64/conf/MINIMAL
> > >   head/sys/i386/conf/GENERIC
> > >   head/sys/i386/conf/MINIMAL
> > >
> > > Modified: head/sys/amd64/conf/GENERIC
> > >
> > ==
> > > --- head/sys/amd64/conf/GENERIC   Mon Nov 12 20:44:22 2018
> > (r340386)
> > > +++ head/sys/amd64/conf/GENERIC   Mon Nov 12 21:01:28 2018
> > (r340387)
> > > @@ -372,3 +372,8 @@ devicevmx # VMware
> > VMXNET3 Ethernet
> > >
> > >  # Netmap provides direct access to TX/RX rings on supported NICs
> > >  device   netmap  # netmap(4) support
> > > +
> > > +# evdev interface
> > > +options  EVDEV_SUPPORT   # evdev support in legacy drivers
> > > +device   evdev   # input event device
> > support
> > > +device   uinput  # install /dev/uinput cdev
> > >
> > > Modified: head/sys/amd64/conf/MINIMAL
> > >
> > ==
> > > --- head/sys/amd64/conf/MINIMAL   Mon Nov 12 20:44:22 2018
> > (r340386)
> > > +++ head/sys/amd64/conf/MINIMAL   Mon Nov 12 21:01:28 2018
> > (r340387)
> > > @@ -147,3 +147,8 @@ devicebpf # Berkeley
> > packet filter
> > >  # NOTE: XENHVM depends on xenpci.  They must be added or removed
> > together.
> > >  options  XENHVM  # Xen HVM kernel infrastructure
> > >  device   xenpci  # Xen HVM Hypervisor
> > services driver
> > > +
> > > +# evdev interface
> > > +options  EVDEV_SUPPORT   # evdev support in legacy drivers
> > > +device   evdev   # input event device
> > support
> > > +device   uinput  # install /dev/uinput cdev
> > >
> > > Modified: head/sys/i386/conf/GENERIC
> > >
> > ==
> > > --- head/sys/i386/conf/GENERICMon Nov 12 20:44:22 2018
> > (r340386)
> > > +++ head/sys/i386/conf/GENERICMon Nov 12 21:01:28 2018
> > (r340387)
> > > @@ -366,3 +366,8 @@ devicexenpci  # Xen HVM
> > Hypervisor services driver
> > >
> > >  # VMware support
> > >  device   vmx # VMware VMXNET3 Ethernet
> > > +
> > > +# evdev interface
> > > +options  EVDEV_SUPPORT   # evdev support in legacy drivers
> > > +device   evdev   # input event device
> > support
> > > +device   uinput  # install /dev/uinput cdev
> > >
> > > Modified: head/sys/i386/conf/MINIMAL
> > >
> > 

svn commit: r340391 - head/contrib/elftoolchain/strings

2018-11-12 Thread Ed Maste
Author: emaste
Date: Tue Nov 13 01:30:31 2018
New Revision: 340391
URL: https://svnweb.freebsd.org/changeset/base/340391

Log:
  Revert r340385, strings capability mode
  
  This needs to be reworked for bootstrapping.

Modified:
  head/contrib/elftoolchain/strings/strings.c

Modified: head/contrib/elftoolchain/strings/strings.c
==
--- head/contrib/elftoolchain/strings/strings.c Mon Nov 12 22:18:11 2018
(r340390)
+++ head/contrib/elftoolchain/strings/strings.c Tue Nov 13 01:30:31 2018
(r340391)
@@ -27,7 +27,6 @@
 #include 
 #include 
 
-#include 
 #include 
 #include 
 #include 
@@ -189,12 +188,9 @@ main(int argc, char **argv)
 
if (!min_len)
min_len = 4;
-   if (!*argv) {
-   if (caph_limit_stdio() < 0 || caph_enter() < 0)
-   err(1, "unable to enter capability mode");
-   return (find_strings("{standard input}", 0, 0));
-   }
-   while (*argv) {
+   if (!*argv)
+   rc = find_strings("{standard input}", 0, 0);
+   else while (*argv) {
if (handle_file(*argv) != 0)
rc = 1;
argv++;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r340387 - in head/sys: amd64/conf i386/conf

2018-11-12 Thread Kevin Bowling
ppc64 will be the next arch after amd64 to get modern graphics
(https://github.com/POWER9BSD/freebsd/commits/projects/lkpi) but we
like the tier-2 status for now and will replay changes from amd64
GENERIC once I'm able to test.

FWIW evdev is the standard with libinput for X11 under Linux.  It's
useful for modern trackpads and has no downsides for traditional
keyboards and mice under X11.  It's also a requisite for Wayland.  So
I am happy to see this change, thanks Niclas!.

Regards,
Kevin
On Mon, Nov 12, 2018 at 5:50 PM Warner Losh  wrote:
>
> On Mon, Nov 12, 2018 at 5:30 PM Rodney W. Grimes <
> free...@pdx.rh.cn85.dnsmgr.net> wrote:
>
> > > On Mon, Nov 12, 2018, 3:12 PM Rodney W. Grimes <
> > > free...@pdx.rh.cn85.dnsmgr.net wrote:
> > >
> > > > > Author: zeising (doc,ports committer)
> > > > > Date: Mon Nov 12 21:01:28 2018
> > > > > New Revision: 340387
> > > > > URL: https://svnweb.freebsd.org/changeset/base/340387
> > > > >
> > > > > Log:
> > > > >   Add evdev support to amd64 and i386 kernels
> > > > >
> > > > >   Include evdev support and drivers in the amd64 and i386 GENERIC and
> > > > MINIMAL
> > > > >   kernels.  Evdev is used by X and wayland to handle input devices,
> > and
> > > > this
> > > > >   change, together with upcomming changes in ports will make us
> > handle
> > > > input
> > > > >   devices better in graphical UIs.
> > > >
> > > > Well these "upcomming" changes in ports effect aarch64 and powerpc
> > > > who are also consumers of X?
> > > >
> > >
> > > Likely. Though there is little experience with them, so we don't know if
> > it
> > > is even safe to turn them on there yet. This has taken 6 months to get
> > > stable on x86 due to its fragile console locking protocol. Similar time
> > has
> > > not been invested elsewhere, so until that happens, we should keep them
> > off
> > > by default. Otherwise we run the risk of destabilizing these platforms,
> > > even for people who don't use X. As tier 2 platforms, this has been how
> > > we've traditionally approached risk. Even though aarch64 is approaching
> > > tier1 status overall, in graphics it is still lagging.
> >
> > From some place aarch64 is already a tier1 platform, specifically
> > it is listed as such in the pkg.freebsd.org package download page.
> >
>
> Graphics on aarch64 is tier 2, and will remain tier 2 for the foreseeable
> future. Tier 1 support requires that we leverage other people's drivers,
> and we can't easily do that w/o a good linux compat layer. The structure of
> FreeBSD and Linux are just enough different that doing so is somewhat
> tricky and labor intensive. This is especially true for the acceleration
> features. Basic framebuffer support isn't terribly hard, but to get good 2d
> and 3d acceleration, we'll likely need to run upstream vendor's code (which
> in many cases is available only as a binary blob + linux glue).
>
>
> > My real concern here is that it sounded like changes to what are
> > in the ports/packages are going to be made in such a way that you
> > are required to have evdev to use them.  If this suddently becomes
> > mandatory to be able to use X we need to ensure that this code
> > (evdev) does infact work on aarch64 and others before such changes are
> > put in place.  My reading here is that this code is only avaliable
> > as static compile into the kernel, aka no moduleto load, making this
> > a non-trivial road block to rpi3, etc users.
> >
>
> This is just for touchscreen support on x86, which requires evdev to work
> well. Whatever works today won't change. However, without a lot of testing,
> I'm hesitant to blindly enable it on aarch64. Once that changes, we can
> turn it on, but until then it would be unwise. And evdev can be turned off
> on a per-platform basis in the packages / ports tree should the need arise.
> I don't think this is going to be an issue.
>
> Warner
>
>
> > > Warner
> > >
> > >
> > > >   Reviewed by:wulf, bapt, imp
> > > > >   Approved by:imp
> > > > >   Differential Revision:  https://reviews.freebsd.org/D17912
> > > > >
> > > > > Modified:
> > > > >   head/sys/amd64/conf/GENERIC
> > > > >   head/sys/amd64/conf/MINIMAL
> > > > >   head/sys/i386/conf/GENERIC
> > > > >   head/sys/i386/conf/MINIMAL
> > > > >
> > > > > Modified: head/sys/amd64/conf/GENERIC
> > > > >
> > > >
> > ==
> > > > > --- head/sys/amd64/conf/GENERIC   Mon Nov 12 20:44:22 2018
> > > > (r340386)
> > > > > +++ head/sys/amd64/conf/GENERIC   Mon Nov 12 21:01:28 2018
> > > > (r340387)
> > > > > @@ -372,3 +372,8 @@ devicevmx #
> > VMware
> > > > VMXNET3 Ethernet
> > > > >
> > > > >  # Netmap provides direct access to TX/RX rings on supported NICs
> > > > >  device   netmap  # netmap(4) support
> > > > > +
> > > > > +# evdev interface
> > > > > +options  EVDEV_SUPPORT   # evdev support in legacy
> > drivers
> > > > > 

What has happened to your gdeepak.com ?

2018-11-12 Thread Jose Quagliri
Hello *gdeepak.com * Team,


*Get your website on Google’s Front Page search:*


I would like to disclose some facts about your website. I hope you won’t
mind spending only 2-3 minutes to have a look at the following lines:


*We found some major issues with your website:*


*1.  *Your website seems to be attracting traffic, but this traffic is
almost stagnant and limited, which affects potential sales as you move
forward.
*2.  *Your website doesn't feature in Google's first search page for some
of the major keywords in your niche, which affects visibility.
*3.*  Your website has been diagnosed with coding issues, which affects
ranking.
*4.*  Your back links profile is not efficient enough to help your search
engine visibility.
*5.*  Your website is currently not being properly promoted online, which
is affecting your marketing strategy and goals.

*6.*  Your presence in social media platform (*Face book, Twitter, etc*.)
is minimal. This is depriving you of a huge market of prospective referral
clients.


We excel in running promotional online marketing campaign for websites. We
have a host of ethical services and techniques, which you can utilize to
improve your website's performance. We could send you more details
regarding your present website status; we would be glad to share *“PRE
SEO   REPORT” or “WEBSITE ANALYSIS REPORT for FREE”.*


Let me know your thought and if possible give me the best time to make
further discussion.

Best Regards,
*Jose Quagliri *| Senior Sales Advisor
*---*
*PS 1*: If you are *interested* then I will *send more details* on our *“SEO
ROPOSAL”* *and* “*FREE WEBSITE ANALYSIS REPORT”.*

*PS 2*: I found your site using Google search and after having a look over
your website I recommend you to implement future technologies such as *HTML
5 and Responsive Design* to make your site more accessible in mobile phone,
tablets, desktop etc.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r340387 - in head/sys: amd64/conf i386/conf

2018-11-12 Thread Niclas Zeising

On 11/13/18 7:10 AM, Kevin Bowling wrote:

ppc64 will be the next arch after amd64 to get modern graphics
(https://github.com/POWER9BSD/freebsd/commits/projects/lkpi) but we
like the tier-2 status for now and will replay changes from amd64
GENERIC once I'm able to test.

FWIW evdev is the standard with libinput for X11 under Linux.  It's
useful for modern trackpads and has no downsides for traditional
keyboards and mice under X11.  It's also a requisite for Wayland.  So
I am happy to see this change, thanks Niclas!.



This is great!
Let me and the rest of the graphics team know if we can help in any way.
I have no problem enabling evdev support in ppc64 (or any other arches) 
if it's tested at least a little.
The only reason I only enabled it for i386 and amd64 is that those are 
the platforms I have available myself.

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


Re: svn commit: r340387 - in head/sys: amd64/conf i386/conf

2018-11-12 Thread Niclas Zeising

On 11/13/18 1:49 AM, Warner Losh wrote:

On Mon, Nov 12, 2018 at 5:30 PM Rodney W. Grimes <
free...@pdx.rh.cn85.dnsmgr.net> wrote:


On Mon, Nov 12, 2018, 3:12 PM Rodney W. Grimes <
free...@pdx.rh.cn85.dnsmgr.net wrote:


Author: zeising (doc,ports committer)
Date: Mon Nov 12 21:01:28 2018
New Revision: 340387
URL: https://svnweb.freebsd.org/changeset/base/340387

Log:
   Add evdev support to amd64 and i386 kernels

   Include evdev support and drivers in the amd64 and i386 GENERIC and

MINIMAL

   kernels.  Evdev is used by X and wayland to handle input devices,

and

this

   change, together with upcomming changes in ports will make us

handle

input

   devices better in graphical UIs.


Well these "upcomming" changes in ports effect aarch64 and powerpc
who are also consumers of X?



Likely. Though there is little experience with them, so we don't know if

it

is even safe to turn them on there yet. This has taken 6 months to get
stable on x86 due to its fragile console locking protocol. Similar time

has

not been invested elsewhere, so until that happens, we should keep them

off

by default. Otherwise we run the risk of destabilizing these platforms,
even for people who don't use X. As tier 2 platforms, this has been how
we've traditionally approached risk. Even though aarch64 is approaching
tier1 status overall, in graphics it is still lagging.


 From some place aarch64 is already a tier1 platform, specifically
it is listed as such in the pkg.freebsd.org package download page.



Graphics on aarch64 is tier 2, and will remain tier 2 for the foreseeable
future. Tier 1 support requires that we leverage other people's drivers,
and we can't easily do that w/o a good linux compat layer. The structure of
FreeBSD and Linux are just enough different that doing so is somewhat
tricky and labor intensive. This is especially true for the acceleration
features. Basic framebuffer support isn't terribly hard, but to get good 2d
and 3d acceleration, we'll likely need to run upstream vendor's code (which
in many cases is available only as a binary blob + linux glue).



My real concern here is that it sounded like changes to what are
in the ports/packages are going to be made in such a way that you
are required to have evdev to use them.  If this suddently becomes
mandatory to be able to use X we need to ensure that this code
(evdev) does infact work on aarch64 and others before such changes are
put in place.  My reading here is that this code is only avaliable
as static compile into the kernel, aka no moduleto load, making this
a non-trivial road block to rpi3, etc users.



This is just for touchscreen support on x86, which requires evdev to work
well. Whatever works today won't change. However, without a lot of testing,
I'm hesitant to blindly enable it on aarch64. Once that changes, we can
turn it on, but until then it would be unwise. And evdev can be turned off
on a per-platform basis in the packages / ports tree should the need arise.
I don't think this is going to be an issue.



Hi!
This change makes it easier, and in some case possible, to use certain 
input devices, such as touchscreens, input tablets and so on. It will 
make it easier to use things like two finger scrolling or horizontal 
scrolling on touchpads, for instance.
Using evdev and libinput (from ports) is a prerequisite for Wayland, and 
useful for X, however, for X the old input drivers are not going away, 
and can still be used on architectures without evdev.
The input stack (for graphical environments) in FreeBSD is lagging 
behind Linux, and this is a first step to get it at least a little bit 
closer in terms of support.


With regards to other architectures, I only have access to amd64 and to 
some extent i386, and only enabled the drivers there.  I have no problem 
with enabling this on further architectures if I get help testing, or 
hardware to test on.


As stated, this won't cause regressions on these platforms, the old 
input device drivers (xf86-input-*) won't go anywhere in a hurry, if 
ever, and is still available for use.


I hope this clears things up a little.
Regards
--
Niclas Zeising
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r340326 - head

2018-11-12 Thread Rodney W. Grimes
> I absolutely approve of Ben's excellent addition to UPDATING, a text document.
At no point did I raise ANY objectection to the content
of his change, stop trying to make that the issue.

> Your demands for additional scrutiny and time-wasting around code
> review are ridiculous and disproportionate, and certainly a poor
> reward for Ben's straightforward and unimpeachable effort to improve
> our UPDATING documentation.

My demands are reasonable, as I stated them, your ignoring them
and casting focus on my non dmeands however is pointless.

> 
> Ben, thank you for submitting and committing the UPDATING change and
> please try to ignore Rod's hyper-criticism.

What you are totally ignoring is that Ben infact TAGGED me into
the review process, causing me to process yet another email only
to go look at the review to find it had been closed by a commit
in < 4 hours total elapsed time.

That is BULLSHIT and I am calling it BULLSHIT.  And though Ben
is the poor victom of example here, he is not the only guilty
party, and though this is a trivial change, it is not the change
that I am ranting about, but the fact that the process is
broken.

IF YOUR GOING TO TAG SOMEONE INTO A REVIEW YOU MUST GIVE THEM
TIME TO RESPOND BEFORE YOU COMMIT, otherwise your just wasting
there time.  

Do NOT tag me into a review if your going to commit it before
I can possibly be expected to respond.  I well rant on anyone
who does that.

CLEAR NOW?

> Conrad
> 
> 
> On Sat, Nov 10, 2018 at 5:07 PM Rodney W. Grimes
>  wrote:
> >
> > [ Charset UTF-8 unsupported, converting... ]
> > > On Sun, 11 Nov 2018 at 2:43 am, Rodney W. Grimes <
> > > free...@pdx.rh.cn85.dnsmgr.net> wrote:
> > >
> > > > If your going to bother with a differential, and invite people to
> > > > it you should give them at least 24 hours, and preferably 72 hours
> > > > to respond to the new review.  Reviews that last < 4 hours are not
> > > > code reviews.
> > > >
> > > > --
> > > > Rod Grimes
> > > > rgri...@freebsd.org
> > > >
> > > Hi Rod,
> > >
> > > Sorry. The main reason I submitted the code review is because I do not 
> > > have
> > > my src commit bit, so needed to seek approval to commit.
> >
> > All the more reason for it to wait until the people you *invited* to
> > the review to have a chance to respond.
> >
> > I do not believe an "accept" in a review is an "approve to commit
> > beyond your normal scope".
> >
> > Was cem aware that he was "approving a non src committer to commit
> > this change to the src tree" as your review has no mention that you
> > are seeking src bit approval to commit there.
> >
> > >
> > > I felt the need to commit the UPDATING entry was time sensitive, given the
> > > change it was notifying users of had already been committed.
> > >
> > > Regards,
> > > Ben
> > > --
> >
> > --
> > Rod Grimes 
> > rgri...@freebsd.org
> >
> 
> 

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


svn commit: r340360 - in head: sbin/ipfw sys/netinet6 sys/netpfil/ipfw/nptv6

2018-11-12 Thread Andrey V. Elsukov
Author: ae
Date: Mon Nov 12 11:20:59 2018
New Revision: 340360
URL: https://svnweb.freebsd.org/changeset/base/340360

Log:
  Add ability to use dynamic external prefix in ipfw_nptv6 module.
  
  Now an interface name can be specified for nptv6 instance instead of
  ext_prefix. The module will track if_addr_ext events and when suitable
  IPv6 address will be added to specified interface, it will be configured
  as external prefix. When address disappears instance becomes unusable,
  i.e. it doesn't match any packets.
  
  Reviewed by:  0mp (manpages)
  Tested by:Dries Michiels 
  MFC after:1 month
  Differential Revision:https://reviews.freebsd.org/D17765

Modified:
  head/sbin/ipfw/ipfw.8
  head/sbin/ipfw/ipfw2.h
  head/sbin/ipfw/nptv6.c
  head/sys/netinet6/ip_fw_nptv6.h
  head/sys/netpfil/ipfw/nptv6/nptv6.c
  head/sys/netpfil/ipfw/nptv6/nptv6.h

Modified: head/sbin/ipfw/ipfw.8
==
--- head/sbin/ipfw/ipfw.8   Mon Nov 12 07:14:34 2018(r340359)
+++ head/sbin/ipfw/ipfw.8   Mon Nov 12 11:20:59 2018(r340360)
@@ -1,7 +1,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd October 21, 2018
+.Dd November 12, 2018
 .Dt IPFW 8
 .Os
 .Sh NAME
@@ -3495,6 +3495,15 @@ NPTv6 module translates source address when it matches
 .It Cm ext_prefix Ar ipv6_prefix
 IPv6 prefix used in external network.
 NPTv6 module translates destination address when it matches this prefix.
+.It Cm ext_if Ar nic
+The NPTv6 module will use first global IPv6 address from interface
+.Ar nic
+as external prefix.
+It can be useful when IPv6 prefix of external network is dynamically obtained.
+.Cm ext_prefix
+and
+.Cm ext_if
+options are mutually exclusive.
 .It Cm prefixlen Ar length
 The length of specified IPv6 prefixes. It must be in range from 8 to 64.
 .El

Modified: head/sbin/ipfw/ipfw2.h
==
--- head/sbin/ipfw/ipfw2.h  Mon Nov 12 07:14:34 2018(r340359)
+++ head/sbin/ipfw/ipfw2.h  Mon Nov 12 11:20:59 2018(r340360)
@@ -294,6 +294,7 @@ enum tokens {
TOK_INTPREFIX,
TOK_EXTPREFIX,
TOK_PREFIXLEN,
+   TOK_EXTIF,
 
TOK_TCPSETMSS,
 

Modified: head/sbin/ipfw/nptv6.c
==
--- head/sbin/ipfw/nptv6.c  Mon Nov 12 07:14:34 2018(r340359)
+++ head/sbin/ipfw/nptv6.c  Mon Nov 12 11:20:59 2018(r340360)
@@ -152,6 +152,7 @@ static struct _s_x nptv6newcmds[] = {
   { "int_prefix",  TOK_INTPREFIX },
   { "ext_prefix",  TOK_EXTPREFIX },
   { "prefixlen",   TOK_PREFIXLEN },
+  { "ext_if",  TOK_EXTIF },
   { NULL, 0 }
 };
 
@@ -214,6 +215,9 @@ nptv6_create(const char *name, uint8_t set, int ac, ch
ac--; av++;
break;
case TOK_EXTPREFIX:
+   if (flags & NPTV6_HAS_EXTPREFIX)
+   errx(EX_USAGE,
+   "Only one ext_prefix or ext_if allowed");
NEED1("IPv6 prefix required");
nptv6_parse_prefix(*av, >external, );
flags |= NPTV6_HAS_EXTPREFIX;
@@ -221,6 +225,18 @@ nptv6_create(const char *name, uint8_t set, int ac, ch
goto check_prefix;
ac--; av++;
break;
+   case TOK_EXTIF:
+   if (flags & NPTV6_HAS_EXTPREFIX)
+   errx(EX_USAGE,
+   "Only one ext_prefix or ext_if allowed");
+   NEED1("Interface name required");
+   if (strlen(*av) >= sizeof(cfg->if_name))
+   errx(EX_USAGE, "Invalid interface name");
+   flags |= NPTV6_HAS_EXTPREFIX;
+   cfg->flags |= NPTV6_DYNAMIC_PREFIX;
+   strncpy(cfg->if_name, *av, sizeof(cfg->if_name));
+   ac--; av++;
+   break;
case TOK_PREFIXLEN:
NEED1("IPv6 prefix length required");
plen = strtol(*av, , 10);
@@ -245,13 +261,14 @@ check_prefix:
if ((flags & NPTV6_HAS_INTPREFIX) != NPTV6_HAS_INTPREFIX)
errx(EX_USAGE, "int_prefix required");
if ((flags & NPTV6_HAS_EXTPREFIX) != NPTV6_HAS_EXTPREFIX)
-   errx(EX_USAGE, "ext_prefix required");
+   errx(EX_USAGE, "ext_prefix or ext_if required");
if ((flags & NPTV6_HAS_PREFIXLEN) != NPTV6_HAS_PREFIXLEN)
errx(EX_USAGE, "prefixlen required");
 
n2mask(, cfg->plen);
APPLY_MASK(>internal, );
-   APPLY_MASK(>external, );
+   if ((cfg->flags & NPTV6_DYNAMIC_PREFIX) == 0)
+   APPLY_MASK(>external, );
 
olh->count = 1;

Re: svn commit: r340097 - in head/sys: kern sys

2018-11-12 Thread Hans Petter Selasky

On 11/3/18 4:43 AM, Matt Macy wrote:

Author: mmacy
Date: Sat Nov  3 03:43:32 2018
New Revision: 340097
URL: https://svnweb.freebsd.org/changeset/base/340097

Log:
   Convert epoch to read / write records per cpu
   
   In discussing D17503 "Run epoch calls sooner and more reliably" with

   sbahra@ we came to the conclusion that epoch is currently misusing the
   ck_epoch API. It isn't safe to do a "write side" operation (ck_epoch_call
   or ck_epoch_poll) in the middle of a "read side" section. Since, by 
definition,
   it's possible to be preempted during the middle of an EPOCH_PREEMPT
   epoch the GC task might call ck_epoch_poll or another thread might call
   ck_epoch_call on the same section. The right solution is ultimately to change
   the way that ck_epoch works for this use case. However, as a stopgap for
   12 we agreed to simply have separate records for each use case.
   
   Tested by: pho@
   
   MFC after:	3 days


^^^ not yet MFC'ed - any reason why not?
--HPS
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r340361 - head/usr.bin/systat

2018-11-12 Thread Michael Tuexen
Author: tuexen
Date: Mon Nov 12 13:26:13 2018
New Revision: 340361
URL: https://svnweb.freebsd.org/changeset/base/340361

Log:
  Fix printing of 64-bit counters on 32-bit ppc platforms.
  
  Several statistic counters are uint64_t values and are printed by systat
  using %lu. This results in displaying wrong numbers. Use PRIu64 instead.
  While there, print variables of size_t using %zd.
  
  MFC after:i   3 days
  Differential Revision:https://reviews.freebsd.org/D17838

Modified:
  head/usr.bin/systat/fetch.c
  head/usr.bin/systat/icmp6.c
  head/usr.bin/systat/ip.c
  head/usr.bin/systat/ip6.c
  head/usr.bin/systat/tcp.c
  head/usr.bin/systat/zarc.c

Modified: head/usr.bin/systat/fetch.c
==
--- head/usr.bin/systat/fetch.c Mon Nov 12 11:20:59 2018(r340360)
+++ head/usr.bin/systat/fetch.c Mon Nov 12 13:26:13 2018(r340361)
@@ -68,9 +68,8 @@ void getsysctl(const char *name, void *ptr, size_t len
strerror(errno));
}
if (nlen != len) {
-   error("sysctl(%s...) expected %lu, got %lu", name,
-   (unsigned long)len, (unsigned long)nlen);
-}
+   error("sysctl(%s...) expected %zu, got %zu", name, len, nlen);
+   }
 }
 
 /*

Modified: head/usr.bin/systat/icmp6.c
==
--- head/usr.bin/systat/icmp6.c Mon Nov 12 11:20:59 2018(r340360)
+++ head/usr.bin/systat/icmp6.c Mon Nov 12 13:26:13 2018(r340361)
@@ -50,6 +50,7 @@ static char sccsid[] = "@(#)mbufs.c   8.1 (Berkeley) 6/6
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -173,7 +174,7 @@ void
 showicmp6(void)
 {
struct icmp6stat stats;
-   u_long totalin, totalout;
+   uint64_t totalin, totalout;
int i;
 
memset(, 0, sizeof stats);
@@ -184,11 +185,11 @@ showicmp6(void)
}
totalin += stats.icp6s_badcode + stats.icp6s_badlen +
stats.icp6s_checksum + stats.icp6s_tooshort;
-   mvwprintw(wnd, 1, 0, "%9lu", totalin);
-   mvwprintw(wnd, 1, 35, "%9lu", totalout);
+   mvwprintw(wnd, 1, 0, "%9"PRIu64, totalin);
+   mvwprintw(wnd, 1, 35, "%9"PRIu64, totalout);
 
 #define DO(stat, row, col) \
-   mvwprintw(wnd, row, col, "%9lu", stats.stat)
+   mvwprintw(wnd, row, col, "%9"PRIu64, stats.stat)
 
DO(icp6s_badcode, 2, 0);
DO(icp6s_badlen, 3, 0);

Modified: head/usr.bin/systat/ip.c
==
--- head/usr.bin/systat/ip.cMon Nov 12 11:20:59 2018(r340360)
+++ head/usr.bin/systat/ip.cMon Nov 12 13:26:13 2018(r340361)
@@ -53,6 +53,7 @@ static const char sccsid[] = "@(#)mbufs.c 8.1 (Berkele
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -203,16 +204,16 @@ void
 showip(void)
 {
struct stat stats;
-   u_long totalout;
+   uint64_t totalout;
 
domode();
totalout = stats.i.ips_forward + stats.i.ips_localout;
 
 #define DO(stat, row, col) \
-   mvwprintw(wnd, row, col, "%9lu", stats.stat)
+   mvwprintw(wnd, row, col, "%9"PRIu64, stats.stat)
 
DO(i.ips_total, 1, 0);
-   mvwprintw(wnd, 1, 35, "%9lu", totalout);
+   mvwprintw(wnd, 1, 35, "%9"PRIu64, totalout);
DO(i.ips_badsum, 2, 0);
DO(i.ips_localout, 2, 35);
DO(i.ips_tooshort, 3, 0);

Modified: head/usr.bin/systat/ip6.c
==
--- head/usr.bin/systat/ip6.c   Mon Nov 12 11:20:59 2018(r340360)
+++ head/usr.bin/systat/ip6.c   Mon Nov 12 13:26:13 2018(r340361)
@@ -52,6 +52,7 @@ static const char sccsid[] = "@(#)mbufs.c 8.1 (Berkele
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -190,16 +191,16 @@ void
 showip6(void)
 {
struct ip6stat stats;
-   u_long totalout;
+   uint64_t totalout;
 
domode();
totalout = stats.ip6s_forward + stats.ip6s_localout;
 
 #define DO(stat, row, col) \
-   mvwprintw(wnd, row, col, "%9lu", stats.stat)
+   mvwprintw(wnd, row, col, "%9"PRIu64, stats.stat)
 
DO(ip6s_total, 1, 0);
-   mvwprintw(wnd, 1, 35, "%9lu", totalout);
+   mvwprintw(wnd, 1, 35, "%9"PRIu64, totalout);
DO(ip6s_tooshort, 2, 0);
DO(ip6s_localout, 2, 35);
DO(ip6s_toosmall, 3, 0);

Modified: head/usr.bin/systat/tcp.c
==
--- head/usr.bin/systat/tcp.c   Mon Nov 12 11:20:59 2018(r340360)
+++ head/usr.bin/systat/tcp.c   Mon Nov 12 13:26:13 2018(r340361)
@@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -237,7 +238,7 @@ showtcp(void)
domode();
 
 #define DO(stat, row, col) \
-   mvwprintw(wnd, row, col, "%12lu", 

Re: svn commit: r340326 - head

2018-11-12 Thread Ben Woods
On Mon, 12 Nov 2018 at 22:19, Rodney W. Grimes <
free...@pdx.rh.cn85.dnsmgr.net> wrote:

> Do NOT tag me into a review if your going to commit it before
> I can possibly be expected to respond.  I well rant on anyone
> who does that.
>
> CLEAR NOW?
>

Understood.

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


svn commit: r340364 - head/sys/kern

2018-11-12 Thread Konstantin Belousov
Author: kib
Date: Mon Nov 12 15:59:32 2018
New Revision: 340364
URL: https://svnweb.freebsd.org/changeset/base/340364

Log:
  Allow set ether/vlan PCP operation from the VNET jails.
  
  The vlan interfaces can be created from vnet jails, it seems, so it
  sounds logical to allow pcp configuration as well.
  
  Reviewed by:  bz, hselasky (previous version)
  Sponsored by: Mellanox Technologies
  MFC after:1 week
  Differential revision:https://reviews.freebsd.org/D1

Modified:
  head/sys/kern/kern_jail.c

Modified: head/sys/kern/kern_jail.c
==
--- head/sys/kern/kern_jail.c   Mon Nov 12 15:52:45 2018(r340363)
+++ head/sys/kern/kern_jail.c   Mon Nov 12 15:59:32 2018(r340364)
@@ -3062,6 +3062,7 @@ prison_priv_check(struct ucred *cred, int priv)
case PRIV_NET_SETIFMETRIC:
case PRIV_NET_SETIFPHYS:
case PRIV_NET_SETIFMAC:
+   case PRIV_NET_SETLANPCP:
case PRIV_NET_ADDMULTI:
case PRIV_NET_DELMULTI:
case PRIV_NET_HWIOCTL:
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r340365 - stable/12/sys/net

2018-11-12 Thread Stephen Hurd
Author: shurd
Date: Mon Nov 12 16:08:14 2018
New Revision: 340365
URL: https://svnweb.freebsd.org/changeset/base/340365

Log:
  MFC r340236:
  
  Fix rxcsum issue introduced in r338838
  
  r338838 attempted to fix issues with rxcsum and rxcsum6.
  However, the rxcsum bits were set as though if_setcapenablebit() was
  being called, not if_togglecapenable() which is in use. As a result,
  it was not possible to disable rxcsum when rxcsum6 was supported.
  
  PR:   233004
  Reported by:  lev
  Reviewed by:  lev
  Approved by:  re (kib)
  Sponsored by: Limelight Networks
  Differential Revision:https://reviews.freebsd.org/D17881

Modified:
  stable/12/sys/net/iflib.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/net/iflib.c
==
--- stable/12/sys/net/iflib.c   Mon Nov 12 15:59:32 2018(r340364)
+++ stable/12/sys/net/iflib.c   Mon Nov 12 16:08:14 2018(r340365)
@@ -4256,18 +4256,13 @@ iflib_if_ioctl(if_t ifp, u_long command, caddr_t data)
setmask |= (mask & IFCAP_WOL);
 
/*
-* If we're disabling any RX csum, disable all the ones
-* the driver supports.  This assumes all supported are
-* enabled.
-* 
-* Otherwise, if they've changed, enable all of them.
+* If any RX csum has changed, change all the ones that
+* are supported by the driver.
 */
-   if ((setmask & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) <
-   (oldmask & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)))
-   setmask &= ~(IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6);
-   else if ((setmask & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) !=
-   (oldmask & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)))
-   setmask |= (mask & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6));
+   if (setmask & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) {
+   setmask |= ctx->ifc_softc_ctx.isc_capabilities &
+   (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6);
+   }
 
/*
 * want to ensure that traffic has stopped before we change any 
of the flags
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r333283 - in head: etc/mtree include share/man/man4 sys/conf sys/net sys/netinet/netdump

2018-11-12 Thread Bjoern A. Zeeb

On 6 May 2018, at 0:38, Mark Johnston wrote:


Author: markj
Date: Sun May  6 00:38:29 2018
New Revision: 333283
URL: https://svnweb.freebsd.org/changeset/base/333283

Log:
  Import the netdump client code.


So this is an IPv4-only feature;  what would be needed to add IPv6 
support to netdump?  I don’t like (a) new features going into the tree 
w/ only IPv4 support and (b) I noticed I can’t use it where I might 
need it..


Can we fix this?

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


Re: svn commit: r333283 - in head: etc/mtree include share/man/man4 sys/conf sys/net sys/netinet/netdump

2018-11-12 Thread Rodney W. Grimes
> On 6 May 2018, at 0:38, Mark Johnston wrote:
> 
> > Author: markj
> > Date: Sun May  6 00:38:29 2018
> > New Revision: 333283
> > URL: https://svnweb.freebsd.org/changeset/base/333283
> >
> > Log:
> >   Import the netdump client code.
> 
> So this is an IPv4-only feature;  what would be needed to add IPv6 
> support to netdump?  I don?t like (a) new features going into the tree 
> w/ only IPv4 support and (b) I noticed I can?t use it where I might 
> need it..
> 
> Can we fix this?

Yes please +1


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


svn commit: r340362 - in stable/12/sys: conf tools/fdt

2018-11-12 Thread Kyle Evans
Author: kevans
Date: Mon Nov 12 15:18:09 2018
New Revision: 340362
URL: https://svnweb.freebsd.org/changeset/base/340362

Log:
  MFC r340297: Use ${ECHO} in dtb/dtbo build, pass in from dtb.mk for -s
  
  Approved by:  re (kib)

Modified:
  stable/12/sys/conf/dtb.mk
  stable/12/sys/tools/fdt/make_dtb.sh
  stable/12/sys/tools/fdt/make_dtbo.sh
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/conf/dtb.mk
==
--- stable/12/sys/conf/dtb.mk   Mon Nov 12 13:26:13 2018(r340361)
+++ stable/12/sys/conf/dtb.mk   Mon Nov 12 15:18:09 2018(r340362)
@@ -58,8 +58,8 @@ all: ${DTB} ${DTBO}
 .export DTC
 .for _dts in ${DTS}
 ${_dts:R:S/$/.dtb/}:   ${_dts} ${OP_META}
-   @echo Generating ${.TARGET} from ${_dts}
-   @${SYSDIR}/tools/fdt/make_dtb.sh ${SYSDIR} ${_dts} ${.OBJDIR}
+   @${ECHO} Generating ${.TARGET} from ${_dts}
+   @env ECHO=${ECHO} ${SYSDIR}/tools/fdt/make_dtb.sh ${SYSDIR} ${_dts} 
${.OBJDIR}
 CLEANFILES+=${_dts:R:S/$/.dtb/}
 .endfor
 .endif
@@ -68,8 +68,8 @@ CLEANFILES+=${_dts:R:S/$/.dtb/}
 .export DTC
 .for _dtso in ${DTSO}
 ${_dtso:R:S/$/.dtbo/}: ${_dtso} ${OP_META}
-   @echo Generating ${.TARGET} from ${_dtso}
-   @${SYSDIR}/tools/fdt/make_dtbo.sh ${SYSDIR} overlays/${_dtso} ${.OBJDIR}
+   @${ECHO} Generating ${.TARGET} from ${_dtso}
+   @env ECHO=${ECHO} ${SYSDIR}/tools/fdt/make_dtbo.sh ${SYSDIR} 
overlays/${_dtso} ${.OBJDIR}
 CLEANFILES+=${_dtso:R:S/$/.dtbo/}
 .endfor
 .endif

Modified: stable/12/sys/tools/fdt/make_dtb.sh
==
--- stable/12/sys/tools/fdt/make_dtb.sh Mon Nov 12 13:26:13 2018
(r340361)
+++ stable/12/sys/tools/fdt/make_dtb.sh Mon Nov 12 15:18:09 2018
(r340362)
@@ -17,10 +17,11 @@ if [ -z "${MACHINE}" ]; then
 fi
 
 : ${DTC:=dtc}
+: ${ECHO:=echo}
 
 for d in ${dts}; do
 dtb=${dtb_path}/`basename $d .dts`.dtb
-echo "converting $d -> $dtb"
+${ECHO} "converting $d -> $dtb"
 cpp -P -x assembler-with-cpp -I $S/gnu/dts/include -I $S/dts/${MACHINE} -I 
$S/gnu/dts/${MACHINE} -I $S/gnu/dts/ -include $d /dev/null | 
${DTC} -@ -O dtb -o $dtb -b 0 -p 1024 -i $S/dts/${MACHINE} -i 
$S/gnu/dts/${MACHINE} -i $S/gnu/dts/
 done

Modified: stable/12/sys/tools/fdt/make_dtbo.sh
==
--- stable/12/sys/tools/fdt/make_dtbo.shMon Nov 12 13:26:13 2018
(r340361)
+++ stable/12/sys/tools/fdt/make_dtbo.shMon Nov 12 15:18:09 2018
(r340362)
@@ -17,10 +17,11 @@ if [ -z "${MACHINE}" ]; then
 fi
 
 : ${DTC:=dtc}
+: ${ECHO:=echo}
 
 for d in ${dtso}; do
 dtb=${dtbo_path}/`basename $d .dtso`.dtbo
-echo "converting $d -> $dtb"
+${ECHO} "converting $d -> $dtb"
 cpp -P -x assembler-with-cpp -I $S/gnu/dts/include -I $S/dts/${MACHINE} -I 
$S/gnu/dts/${MACHINE} -include $d /dev/null | 
${DTC} -@ -O dtb -o $dtb -i $S/dts/${MACHINE} -i $S/gnu/dts/${MACHINE}
 done
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r340363 - in head: . contrib/tcpdump contrib/traceroute lib/libcasper/services/cap_dns lib/libcasper/services/cap_dns/tests sbin/ping

2018-11-12 Thread Mariusz Zaborski
Author: oshogbo
Date: Mon Nov 12 15:52:45 2018
New Revision: 340363
URL: https://svnweb.freebsd.org/changeset/base/340363

Log:
  libcasper: ange the name of limits in cap_dns so the intentions are obvious.
  
  Reported by:  pjd
  MFC after:3 weeks

Modified:
  head/ObsoleteFiles.inc
  head/contrib/tcpdump/tcpdump.c
  head/contrib/traceroute/traceroute.c
  head/lib/libcasper/services/cap_dns/Makefile
  head/lib/libcasper/services/cap_dns/cap_dns.3
  head/lib/libcasper/services/cap_dns/cap_dns.c
  head/lib/libcasper/services/cap_dns/tests/dns_test.c
  head/sbin/ping/ping.c

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Mon Nov 12 15:18:09 2018(r340362)
+++ head/ObsoleteFiles.inc  Mon Nov 12 15:52:45 2018(r340363)
@@ -38,6 +38,9 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20181112: Cleanup old libcap_dns.
+OLD_LIBS+=lib/casper/libcap_dns.so.1
+OLD_LIBS+=usr/lib32/libcap_dns.so.1
 # 20181030: malloc_domain(9) KPI change
 OLD_FILES+=share/man/man9/malloc_domain.9.gz
 # 20181026: joy(4) removal

Modified: head/contrib/tcpdump/tcpdump.c
==
--- head/contrib/tcpdump/tcpdump.c  Mon Nov 12 15:18:09 2018
(r340362)
+++ head/contrib/tcpdump/tcpdump.c  Mon Nov 12 15:52:45 2018
(r340363)
@@ -741,7 +741,7 @@ capdns_setup(void)
if (capdnsloc == NULL)
error("unable to open system.dns service");
/* Limit system.dns to reverse DNS lookups. */
-   types[0] = "ADDR";
+   types[0] = "ADDR2NAME";
if (cap_dns_type_limit(capdnsloc, types, 1) < 0)
error("unable to limit access to system.dns service");
families[0] = AF_INET;

Modified: head/contrib/traceroute/traceroute.c
==
--- head/contrib/traceroute/traceroute.cMon Nov 12 15:18:09 2018
(r340362)
+++ head/contrib/traceroute/traceroute.cMon Nov 12 15:52:45 2018
(r340363)
@@ -523,7 +523,7 @@ main(int argc, char **argv)
int sump = 0;
int sockerrno;
 #ifdef WITH_CASPER
-   const char *types[] = { "NAME", "ADDR" };
+   const char *types[] = { "NAME2ADDR", "ADDR2NAME" };
int families[1];
cap_channel_t *casper;
 #endif

Modified: head/lib/libcasper/services/cap_dns/Makefile
==
--- head/lib/libcasper/services/cap_dns/MakefileMon Nov 12 15:18:09 
2018(r340362)
+++ head/lib/libcasper/services/cap_dns/MakefileMon Nov 12 15:52:45 
2018(r340363)
@@ -6,7 +6,7 @@ SHLIBDIR?=  /lib/casper
 
 PACKAGE=libcasper
 
-SHLIB_MAJOR=   1
+SHLIB_MAJOR=   2
 INCSDIR?=  ${INCLUDEDIR}/casper
 
 .if ${MK_CASPER} != "no"

Modified: head/lib/libcasper/services/cap_dns/cap_dns.3
==
--- head/lib/libcasper/services/cap_dns/cap_dns.3   Mon Nov 12 15:18:09 
2018(r340362)
+++ head/lib/libcasper/services/cap_dns/cap_dns.3   Mon Nov 12 15:52:45 
2018(r340363)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd November 4, 2018
+.Dd November 12, 2018
 .Dt CAP_DNS 3
 .Os
 .Sh NAME
@@ -92,9 +92,9 @@ function limits the functions allowed in the service.
 The
 .Fa types
 variable can be set to
-.Dv ADDR
+.Dv ADDR2NAME
 or
-.Dv NAME .
+.Dv NAME2ADDR .
 See the
 .Sx LIMITS
 section for more details.
@@ -129,9 +129,9 @@ for that function can contain the following values and
 The
 .Va type
 can have two values:
-.Dv ADDR
+.Dv ADDR2NAME
 or
-.Dv NAME .
+.Dv NAME2ADDR .
 The
 .Dv ADDR
 means that reverse DNS lookups are allowed with

Modified: head/lib/libcasper/services/cap_dns/cap_dns.c
==
--- head/lib/libcasper/services/cap_dns/cap_dns.c   Mon Nov 12 15:18:09 
2018(r340362)
+++ head/lib/libcasper/services/cap_dns/cap_dns.c   Mon Nov 12 15:52:45 
2018(r340363)
@@ -474,7 +474,7 @@ dns_gethostbyname(const nvlist_t *limits, const nvlist
struct hostent *hp;
int family;
 
-   if (!dns_allowed_type(limits, "NAME"))
+   if (!dns_allowed_type(limits, "NAME2ADDR"))
return (NO_RECOVERY);
 
family = (int)nvlist_get_number(nvlin, "family");
@@ -498,7 +498,7 @@ dns_gethostbyaddr(const nvlist_t *limits, const nvlist
size_t addrsize;
int family;
 
-   if (!dns_allowed_type(limits, "ADDR"))
+   if (!dns_allowed_type(limits, "ADDR2NAME"))
return (NO_RECOVERY);
 
family = (int)nvlist_get_number(nvlin, "family");
@@ 

svn commit: r340379 - stable/12/sys/compat/freebsd32

2018-11-12 Thread Brooks Davis
Author: brooks
Date: Mon Nov 12 18:23:51 2018
New Revision: 340379
URL: https://svnweb.freebsd.org/changeset/base/340379

Log:
  Regen after r340377: MFC r340272, r340274, r340294
  
  r340272: Make __sysctl follow the freebsd32_foo convention.
  r340274: Make freebsd32_umtx_op follow the freebsd32_foo convention.
  r340294: Fix a number of bugs in freebsd32's capabilities.conf.
  
  Approved by:  re (gjb, implicit)
  Sponsored by: DARPA, AFRL
  Differential Revision:https://reviews.freebsd.org/D17925

Modified:
  stable/12/sys/compat/freebsd32/freebsd32_proto.h
  stable/12/sys/compat/freebsd32/freebsd32_syscall.h
  stable/12/sys/compat/freebsd32/freebsd32_syscalls.c
  stable/12/sys/compat/freebsd32/freebsd32_sysent.c
  stable/12/sys/compat/freebsd32/freebsd32_systrace_args.c

Modified: stable/12/sys/compat/freebsd32/freebsd32_proto.h
==
--- stable/12/sys/compat/freebsd32/freebsd32_proto.hMon Nov 12 18:21:17 
2018(r340378)
+++ stable/12/sys/compat/freebsd32/freebsd32_proto.hMon Nov 12 18:23:51 
2018(r340379)
@@ -162,7 +162,7 @@ struct freebsd32_shmsys_args {
char a3_l_[PADL_(uint32_t)]; uint32_t a3; char a3_r_[PADR_(uint32_t)];
char a4_l_[PADL_(uint32_t)]; uint32_t a4; char a4_r_[PADR_(uint32_t)];
 };
-struct freebsd32_sysctl_args {
+struct freebsd32___sysctl_args {
char name_l_[PADL_(int *)]; int * name; char name_r_[PADR_(int *)];
char namelen_l_[PADL_(u_int)]; u_int namelen; char 
namelen_r_[PADR_(u_int)];
char old_l_[PADL_(void *)]; void * old; char old_r_[PADR_(void *)];
@@ -350,7 +350,7 @@ struct freebsd32_ksem_timedwait_args {
 struct freebsd32_thr_suspend_args {
char timeout_l_[PADL_(const struct timespec32 *)]; const struct 
timespec32 * timeout; char timeout_r_[PADR_(const struct timespec32 *)];
 };
-struct freebsd32_umtx_op_args {
+struct freebsd32__umtx_op_args {
char obj_l_[PADL_(void *)]; void * obj; char obj_r_[PADR_(void *)];
char op_l_[PADL_(int)]; int op; char op_r_[PADR_(int)];
char val_l_[PADL_(u_long)]; u_long val; char val_r_[PADR_(u_long)];
@@ -736,7 +736,7 @@ int freebsd32_sysarch(struct thread *, struct freebsd3
 intfreebsd32_semsys(struct thread *, struct freebsd32_semsys_args *);
 intfreebsd32_msgsys(struct thread *, struct freebsd32_msgsys_args *);
 intfreebsd32_shmsys(struct thread *, struct freebsd32_shmsys_args *);
-intfreebsd32_sysctl(struct thread *, struct freebsd32_sysctl_args *);
+intfreebsd32___sysctl(struct thread *, struct freebsd32___sysctl_args *);
 intfreebsd32_futimes(struct thread *, struct freebsd32_futimes_args *);
 intfreebsd32_msgsnd(struct thread *, struct freebsd32_msgsnd_args *);
 intfreebsd32_msgrcv(struct thread *, struct freebsd32_msgrcv_args *);
@@ -776,7 +776,7 @@ int freebsd32_setcontext(struct thread *, struct freeb
 intfreebsd32_swapcontext(struct thread *, struct 
freebsd32_swapcontext_args *);
 intfreebsd32_ksem_timedwait(struct thread *, struct 
freebsd32_ksem_timedwait_args *);
 intfreebsd32_thr_suspend(struct thread *, struct 
freebsd32_thr_suspend_args *);
-intfreebsd32_umtx_op(struct thread *, struct freebsd32_umtx_op_args *);
+intfreebsd32__umtx_op(struct thread *, struct freebsd32__umtx_op_args *);
 intfreebsd32_thr_new(struct thread *, struct freebsd32_thr_new_args *);
 intfreebsd32_sigqueue(struct thread *, struct freebsd32_sigqueue_args *);
 intfreebsd32_kmq_open(struct thread *, struct freebsd32_kmq_open_args *);
@@ -1282,7 +1282,7 @@ int   freebsd11_freebsd32_mknodat(struct thread *, 
struc
 #defineFREEBSD32_SYS_AUE_freebsd6_freebsd32_lseek  AUE_LSEEK
 #defineFREEBSD32_SYS_AUE_freebsd6_freebsd32_truncate   AUE_TRUNCATE
 #defineFREEBSD32_SYS_AUE_freebsd6_freebsd32_ftruncate  AUE_FTRUNCATE
-#defineFREEBSD32_SYS_AUE_freebsd32_sysctl  AUE_SYSCTL
+#defineFREEBSD32_SYS_AUE_freebsd32___sysctlAUE_SYSCTL
 #defineFREEBSD32_SYS_AUE_freebsd32_futimes AUE_FUTIMES
 #defineFREEBSD32_SYS_AUE_freebsd7_freebsd32_semctl AUE_SEMCTL
 #defineFREEBSD32_SYS_AUE_freebsd7_freebsd32_msgctl AUE_MSGCTL
@@ -1335,7 +1335,7 @@ int   freebsd11_freebsd32_mknodat(struct thread *, 
struc
 #defineFREEBSD32_SYS_AUE_freebsd32_swapcontext AUE_NULL
 #defineFREEBSD32_SYS_AUE_freebsd32_ksem_timedwait  AUE_SEMWAIT
 #defineFREEBSD32_SYS_AUE_freebsd32_thr_suspend AUE_NULL
-#defineFREEBSD32_SYS_AUE_freebsd32_umtx_op AUE_NULL
+#defineFREEBSD32_SYS_AUE_freebsd32__umtx_opAUE_NULL
 #defineFREEBSD32_SYS_AUE_freebsd32_thr_new AUE_THR_NEW
 #defineFREEBSD32_SYS_AUE_freebsd32_sigqueueAUE_NULL
 #defineFREEBSD32_SYS_AUE_freebsd32_kmq_openAUE_MQ_OPEN

Modified: stable/12/sys/compat/freebsd32/freebsd32_syscall.h

svn commit: r340380 - head/usr.bin/wc

2018-11-12 Thread Mariusz Zaborski
Author: oshogbo
Date: Mon Nov 12 18:34:55 2018
New Revision: 340380
URL: https://svnweb.freebsd.org/changeset/base/340380

Log:
  s/caph_enter_with_casper/caph_enter_casper/
  
  Reported by:  npn

Modified:
  head/usr.bin/wc/wc.c

Modified: head/usr.bin/wc/wc.c
==
--- head/usr.bin/wc/wc.cMon Nov 12 18:23:51 2018(r340379)
+++ head/usr.bin/wc/wc.cMon Nov 12 18:34:55 2018(r340380)
@@ -146,7 +146,7 @@ main(int argc, char *argv[])
exit(1);
}
 
-   if (caph_enter_with_casper() < 0) {
+   if (caph_enter_capser() < 0) {
xo_warn("Unable to enter capability mode");
fileargs_free(fa);
exit(1);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r340381 - head/lib/libcasper/services/cap_fileargs

2018-11-12 Thread Mariusz Zaborski
Author: oshogbo
Date: Mon Nov 12 18:37:31 2018
New Revision: 340381
URL: https://svnweb.freebsd.org/changeset/base/340381

Log:
  Fix typo in the comparison.
  This fix build with gcc.
  
  Reported by:  jenkins

Modified:
  head/lib/libcasper/services/cap_fileargs/cap_fileargs.c

Modified: head/lib/libcasper/services/cap_fileargs/cap_fileargs.c
==
--- head/lib/libcasper/services/cap_fileargs/cap_fileargs.c Mon Nov 12 
18:34:55 2018(r340380)
+++ head/lib/libcasper/services/cap_fileargs/cap_fileargs.c Mon Nov 12 
18:37:31 2018(r340381)
@@ -176,7 +176,7 @@ fileargs_init(int argc, char *argv[], int flags, mode_
 {
nvlist_t *limits;
 
-   if (argv <= 0 || argv == NULL) {
+   if (argc <= 0 || argv == NULL) {
return (fileargs_create(NULL, 0));
}
 
@@ -194,7 +194,7 @@ fileargs_cinit(cap_channel_t *cas, int argc, char *arg
 {
nvlist_t *limits;
 
-   if (argv <= 0 || argv == NULL) {
+   if (argc <= 0 || argv == NULL) {
return (fileargs_create(NULL, 0));
}
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r340382 - head/usr.bin/wc

2018-11-12 Thread Mariusz Zaborski
Author: oshogbo
Date: Mon Nov 12 18:43:51 2018
New Revision: 340382
URL: https://svnweb.freebsd.org/changeset/base/340382

Log:
  s/caph_enter_capser/caph_enter_casper/g
  
  Reported by:  npn

Modified:
  head/usr.bin/wc/wc.c

Modified: head/usr.bin/wc/wc.c
==
--- head/usr.bin/wc/wc.cMon Nov 12 18:37:31 2018(r340381)
+++ head/usr.bin/wc/wc.cMon Nov 12 18:43:51 2018(r340382)
@@ -146,7 +146,7 @@ main(int argc, char *argv[])
exit(1);
}
 
-   if (caph_enter_capser() < 0) {
+   if (caph_enter_casper() < 0) {
xo_warn("Unable to enter capability mode");
fileargs_free(fa);
exit(1);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r340383 - head/lib/libc

2018-11-12 Thread Konstantin Belousov
Author: kib
Date: Mon Nov 12 19:12:14 2018
New Revision: 340383
URL: https://svnweb.freebsd.org/changeset/base/340383

Log:
  Create namespace for the symbols added during 13-CURRENT cycle.
  
  Sponsored by: The FreeBSD Foundation
  MFC after:1 week

Modified:
  head/lib/libc/Versions.def

Modified: head/lib/libc/Versions.def
==
--- head/lib/libc/Versions.def  Mon Nov 12 18:43:51 2018(r340382)
+++ head/lib/libc/Versions.def  Mon Nov 12 19:12:14 2018(r340383)
@@ -31,6 +31,9 @@ FBSD_1.4 {
 FBSD_1.5 {
 } FBSD_1.4;
 
+# This version was first added to 13.0-current.
+FBSD_1.6 {
+} FBSD_1.5;
 
 # This is our private namespace.  Any global interfaces that are
 # strictly for use only by other FreeBSD applications and libraries
@@ -39,4 +42,4 @@ FBSD_1.5 {
 #
 # Please do NOT increment the version of this namespace.
 FBSDprivate_1.0 {
-} FBSD_1.5;
+} FBSD_1.6;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r340384 - in head/sys: amd64/amd64 x86/include x86/x86

2018-11-12 Thread Konstantin Belousov
Author: kib
Date: Mon Nov 12 19:17:26 2018
New Revision: 340384
URL: https://svnweb.freebsd.org/changeset/base/340384

Log:
  Apply fix to un-cripple max cpu id on BSP earlier.
  
  We need to know actual value for the standard extended features before
  ifuncs are resolved.
  
  Reported and tested by:   madpilot
  Sponsored by: The FreeBSD Foundation
  MFC after:1 week

Modified:
  head/sys/amd64/amd64/machdep.c
  head/sys/x86/include/x86_var.h
  head/sys/x86/x86/identcpu.c

Modified: head/sys/amd64/amd64/machdep.c
==
--- head/sys/amd64/amd64/machdep.c  Mon Nov 12 19:12:14 2018
(r340383)
+++ head/sys/amd64/amd64/machdep.c  Mon Nov 12 19:17:26 2018
(r340384)
@@ -1581,6 +1581,7 @@ hammer_time(u_int64_t modulep, u_int64_t physfree)
 
identify_cpu1();
identify_hypervisor();
+   identify_cpu_fixup_bsp();
identify_cpu2();
initializecpucache();
 

Modified: head/sys/x86/include/x86_var.h
==
--- head/sys/x86/include/x86_var.h  Mon Nov 12 19:12:14 2018
(r340383)
+++ head/sys/x86/include/x86_var.h  Mon Nov 12 19:17:26 2018
(r340384)
@@ -129,6 +129,7 @@ voiddump_drop_page(vm_paddr_t);
 void   finishidentcpu(void);
 void   identify_cpu1(void);
 void   identify_cpu2(void);
+void   identify_cpu_fixup_bsp(void);
 void   identify_hypervisor(void);
 void   initializecpu(void);
 void   initializecpucache(void);

Modified: head/sys/x86/x86/identcpu.c
==
--- head/sys/x86/x86/identcpu.c Mon Nov 12 19:12:14 2018(r340383)
+++ head/sys/x86/x86/identcpu.c Mon Nov 12 19:17:26 2018(r340384)
@@ -1467,6 +1467,19 @@ identify_cpu2(void)
}
 }
 
+void
+identify_cpu_fixup_bsp(void)
+{
+   u_int regs[4];
+
+   cpu_vendor_id = find_cpu_vendor_id();
+
+   if (fix_cpuid()) {
+   do_cpuid(0, regs);
+   cpu_high = regs[0];
+   }
+}
+
 /*
  * Final stage of CPU identification.
  */
@@ -1478,12 +1491,7 @@ finishidentcpu(void)
u_char ccr3;
 #endif
 
-   cpu_vendor_id = find_cpu_vendor_id();
-
-   if (fix_cpuid()) {
-   do_cpuid(0, regs);
-   cpu_high = regs[0];
-   }
+   identify_cpu_fixup_bsp();
 
if (cpu_high >= 5 && (cpu_feature2 & CPUID2_MON) != 0) {
do_cpuid(5, regs);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r340378 - in stable/12/sys: compat/freebsd32 kern

2018-11-12 Thread Brooks Davis
Author: brooks
Date: Mon Nov 12 18:21:17 2018
New Revision: 340378
URL: https://svnweb.freebsd.org/changeset/base/340378

Log:
  MFC r340272, r340274, r340294
  
  r340272:
  Make __sysctl follow the freebsd32_foo convention.
  
  Sponsored by: DARPA, AFRL
  
  r340274:
  Make freebsd32_umtx_op follow the freebsd32_foo convention.
  
  Sponsored by: DARPA, AFRL
  
  r340294:
  Fix a number of bugs in freebsd32's capabilities.conf.
  
  Bugs range from failure to update after changing syscall implementaion
  names to using the wrong name.  Somewhat confusingly, the name in
  capabilities.conf is exactly the string that appears in syscalls.master,
  not the name with a COMPAT* prefix which is the actual function name.
  
  Found while making a change to use the default capabilities.conf.
  
  Fixes:r335177, r336980, r340272, r340274, others
  Reviewed by:  kib, emaste
  Approved by:  re (gjb)
  Sponsored by: DARPA, AFRL
  Differential Revision:https://reviews.freebsd.org/D17925

Modified:
  stable/12/sys/compat/freebsd32/capabilities.conf
  stable/12/sys/compat/freebsd32/freebsd32_misc.c
  stable/12/sys/compat/freebsd32/syscalls.master
  stable/12/sys/kern/kern_umtx.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/compat/freebsd32/capabilities.conf
==
--- stable/12/sys/compat/freebsd32/capabilities.confMon Nov 12 18:01:36 
2018(r340377)
+++ stable/12/sys/compat/freebsd32/capabilities.confMon Nov 12 18:21:17 
2018(r340378)
@@ -47,14 +47,14 @@ __mac_get_fd
 __mac_get_proc
 __mac_set_fd
 __mac_set_proc
-freebsd32_sysctl
-freebsd32_umtx_op
+freebsd32___sysctl
+freebsd32__umtx_op
 abort2
 accept
 accept4
 aio_cancel
 freebsd32_aio_error
-aio_fsync
+freebsd32_aio_fsync
 freebsd32_aio_read
 freebsd32_aio_return
 freebsd32_aio_suspend
@@ -94,17 +94,18 @@ freebsd32_fexecve
 flock
 fork
 fpathconf
-freebsd11_freebsd32_fstat
-freebsd11_freebsd32_fstatat
-freebsd11_freebsd32_getdirentries
-freebsd11_freebsd32_fstatfs
-freebsd11_freebsd32_mknodat
-freebsd6_freebsd32_ftruncate
-freebsd6_freebsd32_lseek
-freebsd6_freebsd32_mmap
-freebsd6_freebsd32_pread
-freebsd6_freebsd32_pwrite
 freebsd32_fstat
+freebsd32_fstatat
+freebsd32_getdirentries
+freebsd32_fstatfs
+freebsd32_mknodat
+freebsd32_ftruncate
+freebsd32_lseek
+freebsd32_mmap
+mmap
+freebsd32_pread
+freebsd32_pwrite
+freebsd32_fstat
 fstatfs
 fsync
 ftruncate
@@ -115,7 +116,7 @@ getaudit
 getaudit_addr
 getauid
 freebsd32_getcontext
-getdents
+freebsd32_getdents
 freebsd32_getdirentries
 getdirentries
 getdomainname
@@ -178,7 +179,7 @@ freebsd32_nanosleep
 ntp_gettime
 freebsd6_freebsd32_aio_read
 freebsd6_freebsd32_aio_write
-obreak
+break
 freebsd6_freebsd32_lio_listio
 chflagsat
 faccessat
@@ -222,7 +223,7 @@ sched_get_priority_max
 sched_get_priority_min
 sched_getparam
 sched_getscheduler
-sched_rr_get_interval
+freebsd32_sched_rr_get_interval
 sched_setparam
 sched_setscheduler
 sched_yield
@@ -259,11 +260,15 @@ freebsd32_sigaction
 freebsd32_sigaltstack
 freebsd32_sigblock
 freebsd32_sigpending
+sigpending
+freebsd32_sigprocmask
 sigprocmask
+freebsd32_sigqueue
 sigqueue
 freebsd32_sigreturn
 freebsd32_sigsetmask
-ofreebsd32_sigstack
+freebsd32_sigstack
+freebsd32_sigsuspend
 sigsuspend
 freebsd32_sigtimedwait
 freebsd32_sigvec

Modified: stable/12/sys/compat/freebsd32/freebsd32_misc.c
==
--- stable/12/sys/compat/freebsd32/freebsd32_misc.c Mon Nov 12 18:01:36 
2018(r340377)
+++ stable/12/sys/compat/freebsd32/freebsd32_misc.c Mon Nov 12 18:21:17 
2018(r340378)
@@ -2260,7 +2260,7 @@ freebsd11_freebsd32_fhstat(struct thread *td,
 #endif
 
 int
-freebsd32_sysctl(struct thread *td, struct freebsd32_sysctl_args *uap)
+freebsd32___sysctl(struct thread *td, struct freebsd32___sysctl_args *uap)
 {
int error, name[CTL_MAXNAME];
size_t j, oldlen;

Modified: stable/12/sys/compat/freebsd32/syscalls.master
==
--- stable/12/sys/compat/freebsd32/syscalls.master  Mon Nov 12 18:01:36 
2018(r340377)
+++ stable/12/sys/compat/freebsd32/syscalls.master  Mon Nov 12 18:21:17 
2018(r340378)
@@ -377,7 +377,7 @@
uint32_t length2); }
 201AUE_FTRUNCATE   COMPAT6 { int freebsd32_ftruncate(int fd, int pad, \
uint32_t length1, uint32_t length2); }
-202AUE_SYSCTL  STD { int freebsd32_sysctl(int *name, \
+202AUE_SYSCTL  STD { int freebsd32___sysctl(int *name, \
u_int namelen, void *old, \
uint32_t *oldlenp, void *new, \
uint32_t newlen); }
@@ -809,7 +809,7 @@
struct auditinfo_addr *auditinfo_addr, \

svn commit: r340372 - head/sys/conf

2018-11-12 Thread Kyle Evans
Author: kevans
Date: Mon Nov 12 17:10:44 2018
New Revision: 340372
URL: https://svnweb.freebsd.org/changeset/base/340372

Log:
  dtb.mk: Fix passing of ECHO to make_dtb{,o}.sh

Modified:
  head/sys/conf/dtb.mk

Modified: head/sys/conf/dtb.mk
==
--- head/sys/conf/dtb.mkMon Nov 12 16:55:20 2018(r340371)
+++ head/sys/conf/dtb.mkMon Nov 12 17:10:44 2018(r340372)
@@ -55,21 +55,21 @@ DTBO=${DTSO:R:S/$/.dtbo/}
 all: ${DTB} ${DTBO}
 
 .if defined(DTS)
-.export DTC
+.export DTC ECHO
 .for _dts in ${DTS}
 ${_dts:R:S/$/.dtb/}:   ${_dts} ${OP_META}
@${ECHO} Generating ${.TARGET} from ${_dts}
-   @env ECHO=${ECHO} ${SYSDIR}/tools/fdt/make_dtb.sh ${SYSDIR} ${_dts} 
${.OBJDIR}
+   @${SYSDIR}/tools/fdt/make_dtb.sh ${SYSDIR} ${_dts} ${.OBJDIR}
 CLEANFILES+=${_dts:R:S/$/.dtb/}
 .endfor
 .endif
 
 .if defined(DTSO)
-.export DTC
+.export DTC ECHO
 .for _dtso in ${DTSO}
 ${_dtso:R:S/$/.dtbo/}: ${_dtso} ${OP_META}
@${ECHO} Generating ${.TARGET} from ${_dtso}
-   @env ECHO=${ECHO} ${SYSDIR}/tools/fdt/make_dtbo.sh ${SYSDIR} 
overlays/${_dtso} ${.OBJDIR}
+   @${SYSDIR}/tools/fdt/make_dtbo.sh ${SYSDIR} overlays/${_dtso} ${.OBJDIR}
 CLEANFILES+=${_dtso:R:S/$/.dtbo/}
 .endfor
 .endif
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r340097 - in head/sys: kern sys

2018-11-12 Thread Andrew Gallatin

On 11/2/18 11:43 PM, Matt Macy wrote:

Author: mmacy
Date: Sat Nov  3 03:43:32 2018
New Revision: 340097
URL: 
https://urldefense.proofpoint.com/v2/url?u=https-3A__svnweb.freebsd.org_changeset_base_340097=DwIDaQ=imBPVzF25OnBgGmVOlcsiEgHoG1i6YHLR0Sj_gZ4adc=Ed-falealxPeqc22ehgAUCLh8zlZbibZLSMWJeZro4A=C46M75X_gZcJY3aXGYy_P4DQJhD-uEFU00BP6AzHPik=JvPbkoXDB3zzo2IjmopaQxJ3kRcIwzosrpY4elq80LQ=

Log:
   Convert epoch to read / write records per cpu
   
   In discussing D17503 "Run epoch calls sooner and more reliably" with

   sbahra@ we came to the conclusion that epoch is currently misusing the
   ck_epoch API. It isn't safe to do a "write side" operation (ck_epoch_call
   or ck_epoch_poll) in the middle of a "read side" section. Since, by 
definition,
   it's possible to be preempted during the middle of an EPOCH_PREEMPT
   epoch the GC task might call ck_epoch_poll or another thread might call
   ck_epoch_call on the same section. The right solution is ultimately to change
   the way that ck_epoch works for this use case. However, as a stopgap for
   12 we agreed to simply have separate records for each use case.
   
   Tested by: pho@
   
   MFC after:	3 days



Hi Matt,

Can you elaborate why this is needed?

I seem to recall that Samy Al Bahra made some upstream changes to CK 
that modified the CK API to legitimize our use of the API, and these 
were brought into FreeBSD in r339375. Were these insufficient?


Also, it would be great if you could get review on epoch changes. Epoch 
is totally awesome, and I'm thrilled that you brought it in.  However, 
it is very tricky, and it seems like changes here could benefit from review.


Thanks,

Drew



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


svn commit: r340375 - head/sys/dev/cxgbe

2018-11-12 Thread Julien Charbon
Author: jch
Date: Mon Nov 12 17:57:12 2018
New Revision: 340375
URL: https://svnweb.freebsd.org/changeset/base/340375

Log:
  cxgbe/netmap: Fix cxgbe netmap when interface is DOWN
  
  A kernel panic can occur if the cxgbe interface is DOWN
  when activating netmap. This patch prevents the driver
  from freeing up cxgbe netmap resources when they have not
  been allocated.
  
  Submitted by: Nicolas Witkowski 
  Reviewed by:  np
  MFC after:1 week
  Sponsored by: Verisign, Inc.
  Differential Revision:https://reviews.freebsd.org/D17802

Modified:
  head/sys/dev/cxgbe/t4_netmap.c

Modified: head/sys/dev/cxgbe/t4_netmap.c
==
--- head/sys/dev/cxgbe/t4_netmap.c  Mon Nov 12 17:47:51 2018
(r340374)
+++ head/sys/dev/cxgbe/t4_netmap.c  Mon Nov 12 17:57:12 2018
(r340375)
@@ -492,6 +492,9 @@ cxgbe_netmap_off(struct adapter *sc, struct vi_info *v
 
ASSERT_SYNCHRONIZED_OP(sc);
 
+   if (!nm_netmap_on(na))
+   return (0);
+
if ((vi->flags & VI_INIT_DONE) == 0)
return (0);
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r340377 - head/usr.bin/wc

2018-11-12 Thread Mariusz Zaborski
Author: oshogbo
Date: Mon Nov 12 18:01:36 2018
New Revision: 340377
URL: https://svnweb.freebsd.org/changeset/base/340377

Log:
  wc: We should sandbox wc only if Capers is available.

Modified:
  head/usr.bin/wc/wc.c

Modified: head/usr.bin/wc/wc.c
==
--- head/usr.bin/wc/wc.cMon Nov 12 17:59:15 2018(r340376)
+++ head/usr.bin/wc/wc.cMon Nov 12 18:01:36 2018(r340377)
@@ -146,7 +146,7 @@ main(int argc, char *argv[])
exit(1);
}
 
-   if (caph_enter() < 0) {
+   if (caph_enter_with_casper() < 0) {
xo_warn("Unable to enter capability mode");
fileargs_free(fa);
exit(1);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r340370 - head/usr.bin/head

2018-11-12 Thread Mariusz Zaborski
Author: oshogbo
Date: Mon Nov 12 16:44:26 2018
New Revision: 340370
URL: https://svnweb.freebsd.org/changeset/base/340370

Log:
  head: fix style nits
  
  No functional change intended.
  
  Reviewed by:  emaste
  MFC after:3 weeks
  Differential Revision:https://reviews.freebsd.org/D14498

Modified:
  head/usr.bin/head/head.c

Modified: head/usr.bin/head/head.c
==
--- head/usr.bin/head/head.cMon Nov 12 16:43:53 2018(r340369)
+++ head/usr.bin/head/head.cMon Nov 12 16:44:26 2018(r340370)
@@ -75,14 +75,17 @@ static const struct option long_opts[] =
 int
 main(int argc, char *argv[])
 {
-   int ch;
FILE *fp;
-   int first, linecnt = -1, eval = 0;
-   off_t bytecnt = -1;
char *ep;
+   off_t bytecnt;
+   int ch, first, linecnt, eval;
 
+   linecnt = -1;
+   eval = 0;
+   bytecnt = -1;
+
obsolete(argv);
-   while ((ch = getopt_long(argc, argv, "+n:c:", long_opts, NULL)) != -1)
+   while ((ch = getopt_long(argc, argv, "+n:c:", long_opts, NULL)) != -1) {
switch(ch) {
case 'c':
bytecnt = strtoimax(optarg, , 10);
@@ -97,16 +100,18 @@ main(int argc, char *argv[])
case '?':
default:
usage();
+   /* NOTREACHED */
}
+   }
argc -= optind;
argv += optind;
 
if (linecnt != -1 && bytecnt != -1)
errx(1, "can't combine line and byte counts");
-   if (linecnt == -1 )
+   if (linecnt == -1)
linecnt = 10;
-   if (*argv) {
-   for (first = 1; *argv; ++argv) {
+   if (*argv != NULL) {
+   for (first = 1; *argv != NULL; ++argv) {
if ((fp = fopen(*argv, "r")) == NULL) {
warn("%s", *argv);
eval = 1;
@@ -137,7 +142,7 @@ head(FILE *fp, int cnt)
char *cp;
size_t error, readlen;
 
-   while (cnt && (cp = fgetln(fp, )) != NULL) {
+   while (cnt != 0 && (cp = fgetln(fp, )) != NULL) {
error = fwrite(cp, sizeof(char), readlen, stdout);
if (error != readlen)
err(1, "stdout");
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r340369 - stable/11/share/man/man4

2018-11-12 Thread Bjoern A. Zeeb
Author: bz
Date: Mon Nov 12 16:43:53 2018
New Revision: 340369
URL: https://svnweb.freebsd.org/changeset/base/340369

Log:
  MFC r340251:
  
Update rum(4) and run(4) man pages to reflect that newer versions
of TP-LINK TL-WN321G are run(4) and not rum(4) anymore.
  
Reported by:J (tech-lists zyxst.net)

Modified:
  stable/11/share/man/man4/rum.4
  stable/11/share/man/man4/run.4
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/share/man/man4/rum.4
==
--- stable/11/share/man/man4/rum.4  Mon Nov 12 16:41:41 2018
(r340368)
+++ stable/11/share/man/man4/rum.4  Mon Nov 12 16:43:53 2018
(r340369)
@@ -16,7 +16,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 9, 2016
+.Dd November 8, 2018
 .Dt RUM 4
 .Os
 .Sh NAME
@@ -123,7 +123,7 @@ including:
 .It "Sitecom WL-113 ver 2" Ta USB
 .It "Sitecom WL-172" Ta USB
 .It "Sweex LW053" Ta USB
-.It "TP-LINK TL-WN321G" Ta USB
+.It "TP-LINK TL-WN321G v1/v2/v3" Ta USB
 .El
 .Sh EXAMPLES
 Join an existing BSS network (i.e., connect to an access point):

Modified: stable/11/share/man/man4/run.4
==
--- stable/11/share/man/man4/run.4  Mon Nov 12 16:41:41 2018
(r340368)
+++ stable/11/share/man/man4/run.4  Mon Nov 12 16:43:53 2018
(r340369)
@@ -16,7 +16,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 19, 2015
+.Dd November 8, 2018
 .Dt RUN 4
 .Os
 .Sh NAME
@@ -175,6 +175,7 @@ driver supports the following wireless adapters:
 .It Sweex LW303
 .It Sweex LW313
 .It TP-LINK TL-WDN3200
+.It TP-LINK TL-WN321G v4
 .It TP-LINK TL-WN727N v3
 .It Unex DNUR-81
 .It Unex DNUR-82
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r340156 - in head: . sys/sys

2018-11-12 Thread Ed Maste
On Mon, 5 Nov 2018 at 16:53, Antoine Brodin  wrote:
>
> On Mon, Nov 5, 2018 at 8:26 PM Ed Maste  wrote:
> >
> > Author: emaste
> > Date: Mon Nov  5 19:25:57 2018
> > New Revision: 340156
> > URL: https://svnweb.freebsd.org/changeset/base/340156
> >
> > Log:
> >   Remove backwards-compatibility sys/capability.h
>
> Hi,
>
> Please revert,  after this change, most ports converted to capsicum
> are no longer sandboxed (including pkg, tcpdump).

Change was reverted in r340166 and affected ports are tracked as
dependencies of PR 228878.

PR 233007 - ports-mgmt/pkg
Change to use capsicum.h was committed quite some time ago but is not
yet in a pkg release.
PR 233026 - sysutils/procenv
Discussion ongoing, upstream issue
https://github.com/jamesodhunt/procenv/issues/6
PR 233092 - lang/go
Upstream pull request https://github.com/golang/go/pull/28742, likely
use REINPLACE_CMD to patch the port (and the next two) until the
change makes its way through.
PR 233090 - dns/dnscrypt-proxy2
embedded file from go
PR 233091 - devel/gitlab-shell
embedded file from go
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r340366 - stable/12/sys/dev/e1000

2018-11-12 Thread Stephen Hurd
Author: shurd
Date: Mon Nov 12 16:28:07 2018
New Revision: 340366
URL: https://svnweb.freebsd.org/changeset/base/340366

Log:
  MFC r340310:
  
  Fix first-packet completion
  
  The first packet after the ring is initialized was never
  completed as isc_txd_credits_update() would not include it in the
  count of completed packets. This caused netmap to never complete
  a batch. See PR 233022 for more details.
  
  PR:   233022
  Reported by:  lev
  Reviewed by:  lev
  Approved by:  re (kib)
  Sponsored by: Limelight Networks
  Differential Revision:https://reviews.freebsd.org/D17931

Modified:
  stable/12/sys/dev/e1000/em_txrx.c
  stable/12/sys/dev/e1000/igb_txrx.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/e1000/em_txrx.c
==
--- stable/12/sys/dev/e1000/em_txrx.c   Mon Nov 12 16:08:14 2018
(r340365)
+++ stable/12/sys/dev/e1000/em_txrx.c   Mon Nov 12 16:28:07 2018
(r340366)
@@ -458,7 +458,13 @@ em_isc_txd_credits_update(void *arg, uint16_t txqid, b
ntxd = scctx->isc_ntxd[0];
do {
delta = (int32_t)cur - (int32_t)prev;
+   /*
+* XXX This appears to be a hack for first-packet.
+* A correct fix would prevent prev == cur in the first place.
+*/
MPASS(prev == 0 || delta != 0);
+   if (prev == 0 && cur == 0)
+   delta += 1;
if (delta < 0)
delta += ntxd;
DPRINTF(iflib_get_dev(adapter->ctx),

Modified: stable/12/sys/dev/e1000/igb_txrx.c
==
--- stable/12/sys/dev/e1000/igb_txrx.c  Mon Nov 12 16:08:14 2018
(r340365)
+++ stable/12/sys/dev/e1000/igb_txrx.c  Mon Nov 12 16:28:07 2018
(r340366)
@@ -333,7 +333,13 @@ igb_isc_txd_credits_update(void *arg, uint16_t txqid, 
ntxd = scctx->isc_ntxd[0];
do {
delta = (int32_t)cur - (int32_t)prev;
+   /*
+* XXX This appears to be a hack for first-packet.
+* A correct fix would prevent prev == cur in the first place.
+*/
MPASS(prev == 0 || delta != 0);
+   if (prev == 0 && cur == 0)
+   delta += 1;
if (delta < 0)
delta += ntxd;
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r340367 - stable/12/share/man/man4

2018-11-12 Thread Bjoern A. Zeeb
Author: bz
Date: Mon Nov 12 16:37:23 2018
New Revision: 340367
URL: https://svnweb.freebsd.org/changeset/base/340367

Log:
  MFC r340251:
  
Update rum(4) and run(4) man pages to reflect that newer versions
of TP-LINK TL-WN321G are run(4) and not rum(4) anymore.
  
Reported by:J (tech-lists zyxst.net)
  Approved by:  re (kib)

Modified:
  stable/12/share/man/man4/rum.4
  stable/12/share/man/man4/run.4
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/share/man/man4/rum.4
==
--- stable/12/share/man/man4/rum.4  Mon Nov 12 16:28:07 2018
(r340366)
+++ stable/12/share/man/man4/rum.4  Mon Nov 12 16:37:23 2018
(r340367)
@@ -16,7 +16,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 9, 2016
+.Dd November 8, 2018
 .Dt RUM 4
 .Os
 .Sh NAME
@@ -123,7 +123,7 @@ including:
 .It "Sitecom WL-113 ver 2" Ta USB
 .It "Sitecom WL-172" Ta USB
 .It "Sweex LW053" Ta USB
-.It "TP-LINK TL-WN321G" Ta USB
+.It "TP-LINK TL-WN321G v1/v2/v3" Ta USB
 .El
 .Sh EXAMPLES
 Join an existing BSS network (i.e., connect to an access point):

Modified: stable/12/share/man/man4/run.4
==
--- stable/12/share/man/man4/run.4  Mon Nov 12 16:28:07 2018
(r340366)
+++ stable/12/share/man/man4/run.4  Mon Nov 12 16:37:23 2018
(r340367)
@@ -16,7 +16,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd July 10, 2018
+.Dd November 8, 2018
 .Dt RUN 4
 .Os
 .Sh NAME
@@ -176,6 +176,7 @@ driver supports the following wireless adapters:
 .It Sweex LW303
 .It Sweex LW313
 .It TP-LINK TL-WDN3200
+.It TP-LINK TL-WN321G v4
 .It TP-LINK TL-WN727N v3
 .It Unex DNUR-81
 .It Unex DNUR-82
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r340294 - head/sys/compat/freebsd32

2018-11-12 Thread Brooks Davis
On Sat, Nov 10, 2018 at 12:18:13AM -0800, Eitan Adler wrote:
> On Fri, 9 Nov 2018 at 10:19, Brooks Davis  wrote:
> >
> > On Fri, Nov 09, 2018 at 06:03:01PM +, Brooks Davis wrote:
> > > Author: brooks
> > > Date: Fri Nov  9 18:03:01 2018
> > > New Revision: 340294
> > > URL: https://svnweb.freebsd.org/changeset/base/340294
> > >
> > > Log:
> > >   Fix a number of bugs in freebsd32's capabilities.conf.
> > >
> > >   Bugs range from failure to update after changing syscall implementaion
> > >   names to using the wrong name.  Somewhat confusingly, the name in
> > >   capabilities.conf is exactly the string that appears in syscalls.master,
> > >   not the name with a COMPAT* prefix which is the actual function name.
> > >
> > >   Found while making a change to use the default capabilities.conf.
> 
> Is there any automated way to detect this in the future? Can we add
> some test that detect non-existent syscalls or the like?

https://reviews.freebsd.org/D17932 fixes most of this.  It wouldn't be
too hard to keep track of which syscalls were emitted and check that
against the set from capabilities.conf.  I'll keep that in mind.

-- Brooks


signature.asc
Description: PGP signature


svn commit: r340371 - head

2018-11-12 Thread Brooks Davis
Author: brooks
Date: Mon Nov 12 16:55:20 2018
New Revision: 340371
URL: https://svnweb.freebsd.org/changeset/base/340371

Log:
  Use ...-freebsd13.0 in -target strings.
  
  Reported by:  Mark Millard

Modified:
  head/Makefile.libcompat

Modified: head/Makefile.libcompat
==
--- head/Makefile.libcompat Mon Nov 12 16:44:26 2018(r340370)
+++ head/Makefile.libcompat Mon Nov 12 16:55:20 2018(r340371)
@@ -17,7 +17,7 @@ LIB32CPUFLAGS=-march=${TARGET_CPUTYPE}
 .if ${WANT_COMPILER_TYPE} == gcc || \
 (defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == gcc)
 .else
-LIB32CPUFLAGS+=-target x86_64-unknown-freebsd12.0
+LIB32CPUFLAGS+=-target x86_64-unknown-freebsd13.0
 .endif
 LIB32CPUFLAGS+=-m32
 LIB32WMAKEENV= MACHINE=i386 MACHINE_ARCH=i386 \
@@ -49,9 +49,9 @@ LIB32CPUFLAGS=-march=${TARGET_CPUTYPE}
 .endif
 .else
 .if ${TARGET_ARCH:Mmips64el*} != ""
-LIB32CPUFLAGS=  -target mipsel-unknown-freebsd12.0
+LIB32CPUFLAGS=  -target mipsel-unknown-freebsd13.0
 .else
-LIB32CPUFLAGS=  -target mips-unknown-freebsd12.0
+LIB32CPUFLAGS=  -target mips-unknown-freebsd13.0
 .endif
 .endif
 LIB32CPUFLAGS+= -mabi=32
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r340388 - in stable/12/sys: compat/freebsd32 kern

2018-11-12 Thread Brooks Davis
Author: brooks
Date: Mon Nov 12 21:51:36 2018
New Revision: 340388
URL: https://svnweb.freebsd.org/changeset/base/340388

Log:
  MFC r340302:
  
  Fix freebsd32 mknod(at).
  
  As dev_t is now a 64-bit integer, it requires special handling as a
  system call argument.  64-bit arguments are split between two 64-bit
  integers due to the way arguments are promoted to allow reuse of most
  system call implementations.  They must be reassembled before use.
  Further, 64-bit arguments at an odd offset (counting from zero) are
  padded and slid to the next slot on powerpc and mips.  Fix the
  non-COMPAT11 system call by adding a freebsd32_mknodat() and
  appropriately padded declerations.
  
  The COMPAT11 system calls are fully compatible with the 64-bit
  implementations so remove the freebsd32_ versions.
  
  Use uint32_t consistently as the type of the old dev_t.  This matches
  the old definition.
  
  Reviewed by:  kib
  Approved by:  re (gjb)
  Sponsored by: DARPA, AFRL
  Differential Revision:https://reviews.freebsd.org/D17928

Modified:
  stable/12/sys/compat/freebsd32/freebsd32_misc.c
  stable/12/sys/compat/freebsd32/syscalls.master
  stable/12/sys/kern/syscalls.master
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/compat/freebsd32/freebsd32_misc.c
==
--- stable/12/sys/compat/freebsd32/freebsd32_misc.c Mon Nov 12 21:01:28 
2018(r340387)
+++ stable/12/sys/compat/freebsd32/freebsd32_misc.c Mon Nov 12 21:51:36 
2018(r340388)
@@ -463,25 +463,14 @@ freebsd32_fexecve(struct thread *td, struct freebsd32_
return (error);
 }
 
-#if defined(COMPAT_FREEBSD11)
-int
-freebsd11_freebsd32_mknod(struct thread *td,
-struct freebsd11_freebsd32_mknod_args *uap)
-{
 
-   return (kern_mknodat(td, AT_FDCWD, uap->path, UIO_USERSPACE, uap->mode,
-   uap->dev));
-}
-
 int
-freebsd11_freebsd32_mknodat(struct thread *td,
-struct freebsd11_freebsd32_mknodat_args *uap)
+freebsd32_mknodat(struct thread *td, struct freebsd32_mknodat_args *uap)
 {
 
-   return (kern_mknodat(td, uap->fd, uap->path, UIO_USERSPACE, uap->mode,
-   uap->dev));
+   return (kern_mknodat(td, uap->fd, uap->path, UIO_USERSPACE,
+   uap->mode, PAIR32TO64(dev_t, uap->dev)));
 }
-#endif /* COMPAT_FREEBSD11 */
 
 int
 freebsd32_mprotect(struct thread *td, struct freebsd32_mprotect_args *uap)

Modified: stable/12/sys/compat/freebsd32/syscalls.master
==
--- stable/12/sys/compat/freebsd32/syscalls.master  Mon Nov 12 21:01:28 
2018(r340387)
+++ stable/12/sys/compat/freebsd32/syscalls.master  Mon Nov 12 21:51:36 
2018(r340388)
@@ -83,8 +83,8 @@
 11 AUE_NULLOBSOL   execv
 12 AUE_CHDIR   NOPROTO { int chdir(char *path); }
 13 AUE_FCHDIR  NOPROTO { int fchdir(int fd); }
-14 AUE_MKNOD   COMPAT11 { int freebsd32_mknod(char *path, \
-   int mode, int dev); }
+14 AUE_MKNOD   COMPAT11|NOPROTO { int mknod(char *path, \
+   int mode, uint32_t dev); }
 15 AUE_CHMOD   NOPROTO { int chmod(char *path, int mode); }
 16 AUE_CHOWN   NOPROTO { int chown(char *path, int uid, int gid); }
 17 AUE_NULLNOPROTO { caddr_t break(char *nsize); }
@@ -943,7 +943,7 @@
mode_t mode); }
 497AUE_MKFIFOATNOPROTO { int mkfifoat(int fd, char *path, \
mode_t mode); }
-498AUE_MKNODAT COMPAT11 { int freebsd32_mknodat(int fd, char *path, \
+498AUE_MKNODAT COMPAT11|NOPROTO { int mknodat(int fd, char *path, \
mode_t mode, uint32_t dev); }
 499AUE_OPENAT_RWTC NOPROTO { int openat(int fd, char *path, int flag, \
mode_t mode); }
@@ -1095,8 +1095,15 @@
long bufsize, int mode); }
 558AUE_FHSTATFSNOPROTO { int fhstatfs(const struct fhandle *u_fhp, \
struct statfs32 *buf); }
-559AUE_MKNODAT NOPROTO { int mknodat(int fd, char *path, mode_t mode, \
-   dev_t dev); }
+#ifdef PAD64_REQUIRED
+559AUE_MKNODAT STD { int freebsd32_mknodat(int fd, \
+   char *path, mode_t mode, \
+   int pad, uint32_t dev1, uint32_t dev2); }
+#else
+559AUE_MKNODAT STD { int freebsd32_mknodat(int fd, \
+   char *path, mode_t mode, \
+   uint32_t dev1, uint32_t dev2); }
+#endif
 560AUE_KEVENT  STD { int freebsd32_kevent(int fd, \
const struct kevent32 *changelist, \
int nchanges, \

Modified: 

svn commit: r340389 - in stable/12/sys: compat/freebsd32 sys

2018-11-12 Thread Brooks Davis
Author: brooks
Date: Mon Nov 12 21:53:47 2018
New Revision: 340389
URL: https://svnweb.freebsd.org/changeset/base/340389

Log:
  Regen after r340388: MFC r340302: Fix freebsd32 mknod(at).
  
  Approved by:  re (gjb, implicit)
  Sponsored by: DARPA, AFRL
  Differential Revision:https://reviews.freebsd.org/D17928

Modified:
  stable/12/sys/compat/freebsd32/freebsd32_proto.h
  stable/12/sys/compat/freebsd32/freebsd32_syscall.h
  stable/12/sys/compat/freebsd32/freebsd32_syscalls.c
  stable/12/sys/compat/freebsd32/freebsd32_sysent.c
  stable/12/sys/compat/freebsd32/freebsd32_systrace_args.c
  stable/12/sys/sys/sysproto.h

Modified: stable/12/sys/compat/freebsd32/freebsd32_proto.h
==
--- stable/12/sys/compat/freebsd32/freebsd32_proto.hMon Nov 12 21:51:36 
2018(r340388)
+++ stable/12/sys/compat/freebsd32/freebsd32_proto.hMon Nov 12 21:53:47 
2018(r340389)
@@ -684,6 +684,24 @@ struct freebsd32_fhstat_args {
char u_fhp_l_[PADL_(const struct fhandle *)]; const struct fhandle * 
u_fhp; char u_fhp_r_[PADR_(const struct fhandle *)];
char sb_l_[PADL_(struct stat32 *)]; struct stat32 * sb; char 
sb_r_[PADR_(struct stat32 *)];
 };
+#ifdef PAD64_REQUIRED
+struct freebsd32_mknodat_args {
+   char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
+   char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
+   char mode_l_[PADL_(mode_t)]; mode_t mode; char mode_r_[PADR_(mode_t)];
+   char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
+   char dev1_l_[PADL_(uint32_t)]; uint32_t dev1; char 
dev1_r_[PADR_(uint32_t)];
+   char dev2_l_[PADL_(uint32_t)]; uint32_t dev2; char 
dev2_r_[PADR_(uint32_t)];
+};
+#else
+struct freebsd32_mknodat_args {
+   char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
+   char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
+   char mode_l_[PADL_(mode_t)]; mode_t mode; char mode_r_[PADR_(mode_t)];
+   char dev1_l_[PADL_(uint32_t)]; uint32_t dev1; char 
dev1_r_[PADR_(uint32_t)];
+   char dev2_l_[PADL_(uint32_t)]; uint32_t dev2; char 
dev2_r_[PADR_(uint32_t)];
+};
+#endif
 struct freebsd32_kevent_args {
char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
char changelist_l_[PADL_(const struct kevent32 *)]; const struct 
kevent32 * changelist; char changelist_r_[PADR_(const struct kevent32 *)];
@@ -839,6 +857,11 @@ intfreebsd32_utimensat(struct thread *, struct 
freebs
 intfreebsd32_fstat(struct thread *, struct freebsd32_fstat_args *);
 intfreebsd32_fstatat(struct thread *, struct freebsd32_fstatat_args *);
 intfreebsd32_fhstat(struct thread *, struct freebsd32_fhstat_args *);
+#ifdef PAD64_REQUIRED
+intfreebsd32_mknodat(struct thread *, struct freebsd32_mknodat_args *);
+#else
+intfreebsd32_mknodat(struct thread *, struct freebsd32_mknodat_args *);
+#endif
 intfreebsd32_kevent(struct thread *, struct freebsd32_kevent_args *);
 intfreebsd32_cpuset_getdomain(struct thread *, struct 
freebsd32_cpuset_getdomain_args *);
 intfreebsd32_cpuset_setdomain(struct thread *, struct 
freebsd32_cpuset_setdomain_args *);
@@ -916,6 +939,9 @@ struct ofreebsd32_getdirentries_args {
 #ifdef PAD64_REQUIRED
 #else
 #endif
+#ifdef PAD64_REQUIRED
+#else
+#endif
 intofreebsd32_lseek(struct thread *, struct ofreebsd32_lseek_args *);
 intofreebsd32_stat(struct thread *, struct ofreebsd32_stat_args *);
 intofreebsd32_lstat(struct thread *, struct ofreebsd32_lstat_args *);
@@ -987,6 +1013,9 @@ struct freebsd4_freebsd32_sigreturn_args {
 #ifdef PAD64_REQUIRED
 #else
 #endif
+#ifdef PAD64_REQUIRED
+#else
+#endif
 intfreebsd4_freebsd32_getfsstat(struct thread *, struct 
freebsd4_freebsd32_getfsstat_args *);
 intfreebsd4_freebsd32_statfs(struct thread *, struct 
freebsd4_freebsd32_statfs_args *);
 intfreebsd4_freebsd32_fstatfs(struct thread *, struct 
freebsd4_freebsd32_fstatfs_args *);
@@ -1072,6 +1101,9 @@ struct freebsd6_freebsd32_lio_listio_args {
 #ifdef PAD64_REQUIRED
 #else
 #endif
+#ifdef PAD64_REQUIRED
+#else
+#endif
 intfreebsd6_freebsd32_pread(struct thread *, struct 
freebsd6_freebsd32_pread_args *);
 intfreebsd6_freebsd32_pwrite(struct thread *, struct 
freebsd6_freebsd32_pwrite_args *);
 intfreebsd6_freebsd32_mmap(struct thread *, struct 
freebsd6_freebsd32_mmap_args *);
@@ -1118,6 +1150,9 @@ struct freebsd7_freebsd32_shmctl_args {
 #ifdef PAD64_REQUIRED
 #else
 #endif
+#ifdef PAD64_REQUIRED
+#else
+#endif
 intfreebsd7_freebsd32_semctl(struct thread *, struct 
freebsd7_freebsd32_semctl_args *);
 intfreebsd7_freebsd32_msgctl(struct thread *, struct 
freebsd7_freebsd32_msgctl_args *);
 intfreebsd7_freebsd32_shmctl(struct thread *, struct 
freebsd7_freebsd32_shmctl_args *);
@@ -1142,6 +1177,9 @@ int   freebsd7_freebsd32_shmctl(struct thread *, 
struct 
 #ifdef PAD64_REQUIRED
 #else
 #endif
+#ifdef 

Re: svn commit: r340387 - in head/sys: amd64/conf i386/conf

2018-11-12 Thread Rodney W. Grimes
> Author: zeising (doc,ports committer)
> Date: Mon Nov 12 21:01:28 2018
> New Revision: 340387
> URL: https://svnweb.freebsd.org/changeset/base/340387
> 
> Log:
>   Add evdev support to amd64 and i386 kernels
>   
>   Include evdev support and drivers in the amd64 and i386 GENERIC and MINIMAL
>   kernels.  Evdev is used by X and wayland to handle input devices, and this
>   change, together with upcomming changes in ports will make us handle input
>   devices better in graphical UIs.

Well these "upcomming" changes in ports effect aarch64 and powerpc
who are also consumers of X?

>   Reviewed by:wulf, bapt, imp
>   Approved by:imp
>   Differential Revision:  https://reviews.freebsd.org/D17912
> 
> Modified:
>   head/sys/amd64/conf/GENERIC
>   head/sys/amd64/conf/MINIMAL
>   head/sys/i386/conf/GENERIC
>   head/sys/i386/conf/MINIMAL
> 
> Modified: head/sys/amd64/conf/GENERIC
> ==
> --- head/sys/amd64/conf/GENERIC   Mon Nov 12 20:44:22 2018
> (r340386)
> +++ head/sys/amd64/conf/GENERIC   Mon Nov 12 21:01:28 2018
> (r340387)
> @@ -372,3 +372,8 @@ devicevmx # VMware 
> VMXNET3 Ethernet
>  
>  # Netmap provides direct access to TX/RX rings on supported NICs
>  device   netmap  # netmap(4) support
> +
> +# evdev interface
> +options  EVDEV_SUPPORT   # evdev support in legacy drivers
> +device   evdev   # input event device support
> +device   uinput  # install /dev/uinput cdev
> 
> Modified: head/sys/amd64/conf/MINIMAL
> ==
> --- head/sys/amd64/conf/MINIMAL   Mon Nov 12 20:44:22 2018
> (r340386)
> +++ head/sys/amd64/conf/MINIMAL   Mon Nov 12 21:01:28 2018
> (r340387)
> @@ -147,3 +147,8 @@ devicebpf # Berkeley 
> packet filter
>  # NOTE: XENHVM depends on xenpci.  They must be added or removed together.
>  options  XENHVM  # Xen HVM kernel infrastructure
>  device   xenpci  # Xen HVM Hypervisor services 
> driver
> +
> +# evdev interface
> +options  EVDEV_SUPPORT   # evdev support in legacy drivers
> +device   evdev   # input event device support
> +device   uinput  # install /dev/uinput cdev
> 
> Modified: head/sys/i386/conf/GENERIC
> ==
> --- head/sys/i386/conf/GENERICMon Nov 12 20:44:22 2018
> (r340386)
> +++ head/sys/i386/conf/GENERICMon Nov 12 21:01:28 2018
> (r340387)
> @@ -366,3 +366,8 @@ devicexenpci  # Xen HVM 
> Hypervisor services driver
>  
>  # VMware support
>  device   vmx # VMware VMXNET3 Ethernet
> +
> +# evdev interface
> +options  EVDEV_SUPPORT   # evdev support in legacy drivers
> +device   evdev   # input event device support
> +device   uinput  # install /dev/uinput cdev
> 
> Modified: head/sys/i386/conf/MINIMAL
> ==
> --- head/sys/i386/conf/MINIMALMon Nov 12 20:44:22 2018
> (r340386)
> +++ head/sys/i386/conf/MINIMALMon Nov 12 21:01:28 2018
> (r340387)
> @@ -148,3 +148,8 @@ devicebpf # Berkeley 
> packet filter
>  # NOTE: XENHVM depends on xenpci.  They must be added or removed together.
>  options  XENHVM  # Xen HVM kernel infrastructure
>  device   xenpci  # Xen HVM Hypervisor services 
> driver
> +
> +# evdev interface
> +options  EVDEV_SUPPORT   # evdev support in legacy drivers
> +device   evdev   # input event device support
> +device   uinput  # install /dev/uinput cdev
> 
> 

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


svn commit: r340390 - in head/sys/dts: . arm arm/overlays arm64 arm64/overlays mips powerpc

2018-11-12 Thread Kyle Evans
Author: kevans
Date: Mon Nov 12 22:18:11 2018
New Revision: 340390
URL: https://svnweb.freebsd.org/changeset/base/340390

Log:
  Fix test-dts{,o} targets
  
  There were two main problems here:
  
  1.) sys/dts/Makefile.inc is not included from various */overlays directories
  by default, only ../Makefile.inc
  2.) When shelling out for DTS/DTSO, cwd != .CURDIR, so enumeration always
  failed
  
  These changes allow make test-dts and make test-dtso to function in their
  respective directories.
  
  Reviewed by:  manu
  MFC after:3 days
  Differential Revision:https://reviews.freebsd.org/D17961

Added:
  head/sys/dts/arm/Makefile.inc   (contents, props changed)
  head/sys/dts/arm64/Makefile.inc   (contents, props changed)
Modified:
  head/sys/dts/Makefile.inc
  head/sys/dts/arm/Makefile
  head/sys/dts/arm/overlays/Makefile
  head/sys/dts/arm64/Makefile
  head/sys/dts/arm64/overlays/Makefile
  head/sys/dts/mips/Makefile
  head/sys/dts/powerpc/Makefile

Modified: head/sys/dts/Makefile.inc
==
--- head/sys/dts/Makefile.inc   Mon Nov 12 21:53:47 2018(r340389)
+++ head/sys/dts/Makefile.inc   Mon Nov 12 22:18:11 2018(r340390)
@@ -5,9 +5,9 @@ SYSDIR?=${SRCTOP}/sys
 test-dts:
 .for dts in ${DTS}
@env MACHINE=`basename ${.CURDIR}` ${SYSDIR}/tools/fdt/make_dtb.sh 
${SYSDIR} ${dts} /tmp
+.endfor
 
 test-dtso:
 .for dtso in ${DTSO}
@env MACHINE=`basename ${.CURDIR}` ${SYSDIR}/tools/fdt/make_dtbo.sh 
${SYSDIR} ${dtso} /tmp
-
 .endfor

Modified: head/sys/dts/arm/Makefile
==
--- head/sys/dts/arm/Makefile   Mon Nov 12 21:53:47 2018(r340389)
+++ head/sys/dts/arm/Makefile   Mon Nov 12 22:18:11 2018(r340390)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
-DTS!=ls *.dts
+DTS!=ls ${.CURDIR}/*.dts
 
 all: test-dts
 

Added: head/sys/dts/arm/Makefile.inc
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/dts/arm/Makefile.inc   Mon Nov 12 22:18:11 2018
(r340390)
@@ -0,0 +1,3 @@
+# $FreeBSD$
+
+.include "../Makefile.inc"

Modified: head/sys/dts/arm/overlays/Makefile
==
--- head/sys/dts/arm/overlays/Makefile  Mon Nov 12 21:53:47 2018
(r340389)
+++ head/sys/dts/arm/overlays/Makefile  Mon Nov 12 22:18:11 2018
(r340390)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
-DTSO!=ls *.dtso
+DTSO!=ls ${.CURDIR}/*.dtso
 
 all: test-dtso
 

Modified: head/sys/dts/arm64/Makefile
==
--- head/sys/dts/arm64/Makefile Mon Nov 12 21:53:47 2018(r340389)
+++ head/sys/dts/arm64/Makefile Mon Nov 12 22:18:11 2018(r340390)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
-DTS!=ls *.dts
+DTS!=ls ${.CURDIR}/*.dts
 
 all: test-dts
 

Added: head/sys/dts/arm64/Makefile.inc
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/dts/arm64/Makefile.inc Mon Nov 12 22:18:11 2018
(r340390)
@@ -0,0 +1,3 @@
+# $FreeBSD$
+
+.include "../Makefile.inc"

Modified: head/sys/dts/arm64/overlays/Makefile
==
--- head/sys/dts/arm64/overlays/MakefileMon Nov 12 21:53:47 2018
(r340389)
+++ head/sys/dts/arm64/overlays/MakefileMon Nov 12 22:18:11 2018
(r340390)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
-DTSO!=ls *.dtso
+DTSO!=ls ${.CURDIR}/*.dtso
 
 all: test-dtso
 

Modified: head/sys/dts/mips/Makefile
==
--- head/sys/dts/mips/Makefile  Mon Nov 12 21:53:47 2018(r340389)
+++ head/sys/dts/mips/Makefile  Mon Nov 12 22:18:11 2018(r340390)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
-DTS!=ls *.dts
+DTS!=ls ${.CURDIR}/*.dts
 
 all: test-dts
 

Modified: head/sys/dts/powerpc/Makefile
==
--- head/sys/dts/powerpc/Makefile   Mon Nov 12 21:53:47 2018
(r340389)
+++ head/sys/dts/powerpc/Makefile   Mon Nov 12 22:18:11 2018
(r340390)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
-DTS!=ls *.dts
+DTS!=ls ${.CURDIR}/*.dts
 
 all: test-dts
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r340385 - head/contrib/elftoolchain/strings

2018-11-12 Thread Ed Maste
Author: emaste
Date: Mon Nov 12 20:38:43 2018
New Revision: 340385
URL: https://svnweb.freebsd.org/changeset/base/340385

Log:
  strings: enter capability mode when operating on stdin
  
  Reviewed by:  oshogbo
  MFC after:1 month
  Sponsored by: The FreeBSD Foundation

Modified:
  head/contrib/elftoolchain/strings/strings.c

Modified: head/contrib/elftoolchain/strings/strings.c
==
--- head/contrib/elftoolchain/strings/strings.c Mon Nov 12 19:17:26 2018
(r340384)
+++ head/contrib/elftoolchain/strings/strings.c Mon Nov 12 20:38:43 2018
(r340385)
@@ -27,6 +27,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -188,9 +189,12 @@ main(int argc, char **argv)
 
if (!min_len)
min_len = 4;
-   if (!*argv)
-   rc = find_strings("{standard input}", 0, 0);
-   else while (*argv) {
+   if (!*argv) {
+   if (caph_limit_stdio() < 0 || caph_enter() < 0)
+   err(1, "unable to enter capability mode");
+   return (find_strings("{standard input}", 0, 0));
+   }
+   while (*argv) {
if (handle_file(*argv) != 0)
rc = 1;
argv++;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r340386 - in head: lib share/mk targets/pseudo/userland/lib

2018-11-12 Thread Ed Maste
Author: emaste
Date: Mon Nov 12 20:44:22 2018
New Revision: 340386
URL: https://svnweb.freebsd.org/changeset/base/340386

Log:
  retire LINKER_FEATURES filter flag
  
  And build libdl unconditionally.  All supported FreeBSD linkers accept
  -F / --filter so there is no need to test for support.
  
  Discussed with:   kib
  Sponsored by: The FreeBSD Foundation

Modified:
  head/lib/Makefile
  head/share/mk/bsd.linker.mk
  head/targets/pseudo/userland/lib/Makefile.depend

Modified: head/lib/Makefile
==
--- head/lib/Makefile   Mon Nov 12 20:38:43 2018(r340385)
+++ head/lib/Makefile   Mon Nov 12 20:44:22 2018(r340386)
@@ -42,7 +42,7 @@ SUBDIR=   ${SUBDIR_BOOTSTRAP} \
libdevctl \
libdevinfo \
libdevstat \
-   ${_libdl} \
+   libdl \
libdwarf \
libedit \
libelftc \
@@ -191,10 +191,6 @@ SUBDIR.${MK_BHYVE}+=   libvmmapi
 .if ${MACHINE_CPUARCH} != "sparc64"
 _libproc=  libproc
 _librtld_db=   librtld_db
-.endif
-
-.if defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mfilter}
-_libdl=libdl
 .endif
 
 SUBDIR.${MK_OPENSSL}+= libmp

Modified: head/share/mk/bsd.linker.mk
==
--- head/share/mk/bsd.linker.mk Mon Nov 12 20:38:43 2018(r340385)
+++ head/share/mk/bsd.linker.mk Mon Nov 12 20:44:22 2018(r340386)
@@ -86,9 +86,6 @@ ${X_}LINKER_FEATURES=
 ${X_}LINKER_FEATURES+= build-id
 ${X_}LINKER_FEATURES+= ifunc
 .endif
-.if ${${X_}LINKER_TYPE} != "lld" || ${${X_}LINKER_VERSION} >= 5
-${X_}LINKER_FEATURES+= filter
-.endif
 .if ${${X_}LINKER_TYPE} == "lld" && ${${X_}LINKER_VERSION} >= 6
 ${X_}LINKER_FEATURES+= retpoline
 .endif

Modified: head/targets/pseudo/userland/lib/Makefile.depend
==
--- head/targets/pseudo/userland/lib/Makefile.dependMon Nov 12 20:38:43 
2018(r340385)
+++ head/targets/pseudo/userland/lib/Makefile.dependMon Nov 12 20:44:22 
2018(r340386)
@@ -60,6 +60,7 @@ DIRDEPS = \
lib/libdevdctl \
lib/libdevinfo \
lib/libdevstat \
+   lib/libdl \
lib/libdwarf \
lib/libedit/edit/readline \
lib/libelf \
@@ -212,10 +213,6 @@ DIRDEPS+= \
 .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" || \
 ${MACHINE_CPUARCH} == "powerpc"
 DIRDEPS+= stand/libsa32
-.endif
-
-.if defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mfilter}
-DIRDEPS+= lib/libdl
 .endif
 
 .if ${MK_NAND} != "no"
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r340387 - in head/sys: amd64/conf i386/conf

2018-11-12 Thread Niclas Zeising
Author: zeising (doc,ports committer)
Date: Mon Nov 12 21:01:28 2018
New Revision: 340387
URL: https://svnweb.freebsd.org/changeset/base/340387

Log:
  Add evdev support to amd64 and i386 kernels
  
  Include evdev support and drivers in the amd64 and i386 GENERIC and MINIMAL
  kernels.  Evdev is used by X and wayland to handle input devices, and this
  change, together with upcomming changes in ports will make us handle input
  devices better in graphical UIs.
  
  Reviewed by:  wulf, bapt, imp
  Approved by:  imp
  Differential Revision:https://reviews.freebsd.org/D17912

Modified:
  head/sys/amd64/conf/GENERIC
  head/sys/amd64/conf/MINIMAL
  head/sys/i386/conf/GENERIC
  head/sys/i386/conf/MINIMAL

Modified: head/sys/amd64/conf/GENERIC
==
--- head/sys/amd64/conf/GENERIC Mon Nov 12 20:44:22 2018(r340386)
+++ head/sys/amd64/conf/GENERIC Mon Nov 12 21:01:28 2018(r340387)
@@ -372,3 +372,8 @@ device  vmx # VMware 
VMXNET3 Ethernet
 
 # Netmap provides direct access to TX/RX rings on supported NICs
 device netmap  # netmap(4) support
+
+# evdev interface
+optionsEVDEV_SUPPORT   # evdev support in legacy drivers
+device evdev   # input event device support
+device uinput  # install /dev/uinput cdev

Modified: head/sys/amd64/conf/MINIMAL
==
--- head/sys/amd64/conf/MINIMAL Mon Nov 12 20:44:22 2018(r340386)
+++ head/sys/amd64/conf/MINIMAL Mon Nov 12 21:01:28 2018(r340387)
@@ -147,3 +147,8 @@ device  bpf # Berkeley 
packet filter
 # NOTE: XENHVM depends on xenpci.  They must be added or removed together.
 optionsXENHVM  # Xen HVM kernel infrastructure
 device xenpci  # Xen HVM Hypervisor services driver
+
+# evdev interface
+optionsEVDEV_SUPPORT   # evdev support in legacy drivers
+device evdev   # input event device support
+device uinput  # install /dev/uinput cdev

Modified: head/sys/i386/conf/GENERIC
==
--- head/sys/i386/conf/GENERIC  Mon Nov 12 20:44:22 2018(r340386)
+++ head/sys/i386/conf/GENERIC  Mon Nov 12 21:01:28 2018(r340387)
@@ -366,3 +366,8 @@ device  xenpci  # Xen HVM 
Hypervisor services driver
 
 # VMware support
 device vmx # VMware VMXNET3 Ethernet
+
+# evdev interface
+optionsEVDEV_SUPPORT   # evdev support in legacy drivers
+device evdev   # input event device support
+device uinput  # install /dev/uinput cdev

Modified: head/sys/i386/conf/MINIMAL
==
--- head/sys/i386/conf/MINIMAL  Mon Nov 12 20:44:22 2018(r340386)
+++ head/sys/i386/conf/MINIMAL  Mon Nov 12 21:01:28 2018(r340387)
@@ -148,3 +148,8 @@ device  bpf # Berkeley 
packet filter
 # NOTE: XENHVM depends on xenpci.  They must be added or removed together.
 optionsXENHVM  # Xen HVM kernel infrastructure
 device xenpci  # Xen HVM Hypervisor services driver
+
+# evdev interface
+optionsEVDEV_SUPPORT   # evdev support in legacy drivers
+device evdev   # input event device support
+device uinput  # install /dev/uinput cdev
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r333283 - in head: etc/mtree include share/man/man4 sys/conf sys/net sys/netinet/netdump

2018-11-12 Thread Mark Johnston
On Mon, Nov 12, 2018 at 03:10:54PM +, Bjoern A. Zeeb wrote:
> On 6 May 2018, at 0:38, Mark Johnston wrote:
> 
> > Author: markj
> > Date: Sun May  6 00:38:29 2018
> > New Revision: 333283
> > URL: https://svnweb.freebsd.org/changeset/base/333283
> >
> > Log:
> >   Import the netdump client code.
> 
> So this is an IPv4-only feature;  what would be needed to add IPv6 
> support to netdump?  I don’t like (a) new features going into the tree 
> w/ only IPv4 support and (b) I noticed I can’t use it where I might 
> need it..

One would at least need to:
- ensure that dumpon(8) can pass IPv6 configuration parameters to the
  kernel,
- add code to add IPv6 headers to outbound packets,
- add code to process inbound IPv6 packets,
- use ND to resolve the gateway.

> Can we fix this?

Sure.  I can't promise I will get to it in the near future, but I'm
happy to review patches.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r340373 - in head: lib/libcasper/services lib/libcasper/services/cap_fileargs share/mk

2018-11-12 Thread Mariusz Zaborski
Author: oshogbo
Date: Mon Nov 12 17:40:47 2018
New Revision: 340373
URL: https://svnweb.freebsd.org/changeset/base/340373

Log:
  libcasper: introduce cap_fileargs service
  
  cap_fileargs is a Casper service which helps to sandbox applications that need
  access to the filesystem namespace. The main purpose of the service is to make
  easy to capsicumize applications that works on multiple files passed in argv.
  
  We have a couple example of using it but we still treat this service as an
  experimental one.
  
  Reviewed by:  emsate (previous version), jonathan (partially)
  Discussed with:   many
  Differential Revision:https://reviews.freebsd.org/D14407

Added:
  head/lib/libcasper/services/cap_fileargs/
  head/lib/libcasper/services/cap_fileargs/Makefile   (contents, props changed)
  head/lib/libcasper/services/cap_fileargs/cap_fileargs.3   (contents, props 
changed)
  head/lib/libcasper/services/cap_fileargs/cap_fileargs.c   (contents, props 
changed)
  head/lib/libcasper/services/cap_fileargs/cap_fileargs.h   (contents, props 
changed)
Modified:
  head/lib/libcasper/services/Makefile
  head/share/mk/src.libnames.mk

Modified: head/lib/libcasper/services/Makefile
==
--- head/lib/libcasper/services/MakefileMon Nov 12 17:10:44 2018
(r340372)
+++ head/lib/libcasper/services/MakefileMon Nov 12 17:40:47 2018
(r340373)
@@ -3,6 +3,7 @@
 .include 
 
 SUBDIR=cap_dns
+SUBDIR+=   cap_fileargs
 SUBDIR+=   cap_grp
 SUBDIR+=   cap_pwd
 SUBDIR+=   cap_random

Added: head/lib/libcasper/services/cap_fileargs/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/libcasper/services/cap_fileargs/Makefile   Mon Nov 12 17:40:47 
2018(r340373)
@@ -0,0 +1,35 @@
+# $FreeBSD$
+
+SHLIBDIR?= /lib/casper
+
+.include 
+
+PACKAGE=libcasper
+
+SHLIB_MAJOR=   1
+INCSDIR?=  ${INCLUDEDIR}/casper
+
+.if ${MK_CASPER} != "no"
+SHLIB= cap_fileargs
+
+SRCS=  cap_fileargs.c
+.endif
+
+INCS=  cap_fileargs.h
+
+LIBADD=nv
+
+CFLAGS+=-I${.CURDIR}
+
+MAN+=  cap_fileargs.3
+
+MLINKS+=cap_fileargs.3 libcap_fileargs.3
+MLINKS+=cap_fileargs.3 fileargs_cinit.3
+MLINKS+=cap_fileargs.3 fileargs_cinitnv.3
+MLINKS+=cap_fileargs.3 fileargs_fopen.3
+MLINKS+=cap_fileargs.3 fileargs_free.3
+MLINKS+=cap_fileargs.3 fileargs_init.3
+MLINKS+=cap_fileargs.3 fileargs_initnv.3
+MLINKS+=cap_fileargs.3 fileargs_open.3
+
+.include 

Added: head/lib/libcasper/services/cap_fileargs/cap_fileargs.3
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/libcasper/services/cap_fileargs/cap_fileargs.3 Mon Nov 12 
17:40:47 2018(r340373)
@@ -0,0 +1,241 @@
+.\" Copyright (c) 2018 Mariusz Zaborski 
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"notice, this list of conditions and the following disclaimer in the
+.\"documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS 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 AUTHORS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 12, 2018
+.Dt CAP_FILEARGS 3
+.Os
+.Sh NAME
+.Nm fileargs_cinit ,
+.Nm fileargs_cinitnv ,
+.Nm fileargs_init ,
+.Nm fileargs_initnv ,
+.Nm fileargs_free ,
+.Nm fileargs_open ,
+.Nm fileargs_fopen
+.Nd "library for handling files in capability mode"
+.Sh LIBRARY
+.Lb libcap_fileargs
+.Sh SYNOPSIS
+.In sys/nv.h
+.In libcasper.h
+.In casper/cap_fileargs.h
+.Ft "fileargs_t *"
+.Fn fileargs_init "int argc" "char *argv[]" "int flags" "mode_t mode" 
"cap_rights_t *rightsp"
+.Ft "fileargs_t *"
+.Fn fileargs_cinit "cap_channel_t *cas" "int argc" "char *argv[]" "int flags" 
"mode_t mode" "cap_rights_t *rightsp"
+.Ft 

svn commit: r340374 - head/usr.bin/wc

2018-11-12 Thread Mariusz Zaborski
Author: oshogbo
Date: Mon Nov 12 17:47:51 2018
New Revision: 340374
URL: https://svnweb.freebsd.org/changeset/base/340374

Log:
  wc: sandbox wc using capsicum
  
  Reviewed by:  AllanJude, emaste
  Differential Revision:https://reviews.freebsd.org/D14409

Modified:
  head/usr.bin/wc/Makefile
  head/usr.bin/wc/wc.c

Modified: head/usr.bin/wc/Makefile
==
--- head/usr.bin/wc/MakefileMon Nov 12 17:40:47 2018(r340373)
+++ head/usr.bin/wc/MakefileMon Nov 12 17:47:51 2018(r340374)
@@ -1,7 +1,15 @@
 #  @(#)Makefile8.1 (Berkeley) 6/6/93
 # $FreeBSD$
 
+.include 
+
 PROG=  wc
 LIBADD=xo
+
+.if ${MK_CASPER} != "no"
+LIBADD+=casper
+LIBADD+=cap_fileargs
+CFLAGS+=-DWITH_CASPER
+.endif
 
 .include 

Modified: head/usr.bin/wc/wc.c
==
--- head/usr.bin/wc/wc.cMon Nov 12 17:40:47 2018(r340373)
+++ head/usr.bin/wc/wc.cMon Nov 12 17:47:51 2018(r340374)
@@ -44,9 +44,11 @@ static char sccsid[] = "@(#)wc.c 8.1 (Berkeley) 6/6/93
 #include 
 __FBSDID("$FreeBSD$");
 
+#include 
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -61,6 +63,10 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#include 
+#include 
+
+static fileargs_t *fa;
 static uintmax_t tlinect, twordct, tcharct, tlongline;
 static int doline, doword, dochar, domulti, dolongline;
 static volatile sig_atomic_t siginfo;
@@ -90,6 +96,7 @@ int
 main(int argc, char *argv[])
 {
int ch, errors, total;
+   cap_rights_t rights;
 
(void) setlocale(LC_CTYPE, "");
 
@@ -125,6 +132,26 @@ main(int argc, char *argv[])
 
(void)signal(SIGINFO, siginfo_handler);
 
+   fa = fileargs_init(argc, argv, O_RDONLY, 0,
+   cap_rights_init(, CAP_READ, CAP_FSTAT));
+   if (fa == NULL) {
+   xo_warn("Unable to init casper");
+   exit(1);
+   }
+
+   caph_cache_catpages();
+   if (caph_limit_stdio() < 0) {
+   xo_warn("Unable to limit stdio");
+   fileargs_free(fa);
+   exit(1);
+   }
+
+   if (caph_enter() < 0) {
+   xo_warn("Unable to enter capability mode");
+   fileargs_free(fa);
+   exit(1);
+   }
+
/* Wc's flags are on by default. */
if (doline + doword + dochar + domulti + dolongline == 0)
doline = doword = dochar = 1;
@@ -158,6 +185,7 @@ main(int argc, char *argv[])
xo_close_container("total");
}
 
+   fileargs_free(fa);
xo_close_container("wc");
xo_finish();
exit(errors == 0 ? 0 : 1);
@@ -206,7 +234,7 @@ cnt(const char *file)
linect = wordct = charct = llct = tmpll = 0;
if (file == NULL)
fd = STDIN_FILENO;
-   else if ((fd = open(file, O_RDONLY, 0)) < 0) {
+   else if ((fd = fileargs_open(fa, file)) < 0) {
xo_warn("%s: open", file);
return (1);
}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r340376 - head/usr.bin/head

2018-11-12 Thread Mariusz Zaborski
Author: oshogbo
Date: Mon Nov 12 17:59:15 2018
New Revision: 340376
URL: https://svnweb.freebsd.org/changeset/base/340376

Log:
  head: sandbox using capsicum
  
  Reviewed by:  emaste
  Differential Revision:https://reviews.freebsd.org/D14409

Modified:
  head/usr.bin/head/Makefile
  head/usr.bin/head/head.c

Modified: head/usr.bin/head/Makefile
==
--- head/usr.bin/head/Makefile  Mon Nov 12 17:57:12 2018(r340375)
+++ head/usr.bin/head/Makefile  Mon Nov 12 17:59:15 2018(r340376)
@@ -8,4 +8,10 @@ PROG=  head
 HAS_TESTS=
 SUBDIR.${MK_TESTS}+= tests
 
+.if ${MK_CASPER} != "no" && !defined(RESCUE)
+LIBADD+=casper
+LIBADD+=cap_fileargs
+CFLAGS+=-DWITH_CASPER
+.endif
+
 .include 

Modified: head/usr.bin/head/head.c
==
--- head/usr.bin/head/head.cMon Nov 12 17:57:12 2018(r340375)
+++ head/usr.bin/head/head.cMon Nov 12 17:59:15 2018(r340376)
@@ -43,10 +43,13 @@ static char sccsid[] = "@(#)head.c  8.2 (Berkeley) 5/4/
 #include 
 __FBSDID("$FreeBSD$");
 
+#include 
 #include 
 
+#include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -54,6 +57,9 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#include 
+#include 
+
 /*
  * head - give the first few lines of a stream or of each of a set of files
  *
@@ -79,6 +85,8 @@ main(int argc, char *argv[])
char *ep;
off_t bytecnt;
int ch, first, linecnt, eval;
+   fileargs_t *fa;
+   cap_rights_t rights;
 
linecnt = -1;
eval = 0;
@@ -106,13 +114,22 @@ main(int argc, char *argv[])
argc -= optind;
argv += optind;
 
+   fa = fileargs_init(argc, argv, O_RDONLY, 0,
+   cap_rights_init(, CAP_READ, CAP_FSTAT, CAP_FCNTL));
+   if (fa == NULL)
+   errx(1, "unable to init casper");
+
+   caph_cache_catpages();
+   if (caph_limit_stdio() < 0 || caph_enter_casper() < 0)
+   err(1, "unable to enter capability mode");
+
if (linecnt != -1 && bytecnt != -1)
errx(1, "can't combine line and byte counts");
if (linecnt == -1)
linecnt = 10;
if (*argv != NULL) {
for (first = 1; *argv != NULL; ++argv) {
-   if ((fp = fopen(*argv, "r")) == NULL) {
+   if ((fp = fileargs_fopen(fa, *argv, "r")) == NULL) {
warn("%s", *argv);
eval = 1;
continue;
@@ -133,6 +150,7 @@ main(int argc, char *argv[])
else
head_bytes(stdin, bytecnt);
 
+   fileargs_free(fa);
exit(eval);
 }
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r340326 - head

2018-11-12 Thread Mark Linimon
On Mon, Nov 12, 2018 at 06:00:19AM -0800, Rodney W. Grimes wrote:
> it is not the change that I am ranting about, but the fact that the
> process is broken.

If the "process" must be followed absolutely, then FreeBSD has already
failed.  This was a text file, advisory to users only; no executable
code.

Ben clearly made a mistake in including you in the review list.  This
does not excuse your shouting.

You need to take some time away from the keyboard.  Your response is
disproportionate and demotivating.

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