svn commit: r286839 - in head: . share/man/man4 sys/conf sys/dev/random sys/modules sys/modules/random_fortuna sys/modules/random_other sys/modules/random_yarrow sys/sys

2015-08-17 Thread Mark Murray
Author: markm
Date: Mon Aug 17 07:36:12 2015
New Revision: 286839
URL: https://svnweb.freebsd.org/changeset/base/286839

Log:
  Add DEV_RANDOM pseudo-option and use it to "include out" random(4)
  if desired.
  
  Retire randomdev_none.c and introduce random_infra.c for resident
  infrastructure. Completely stub out random(4) calls in the "without
  DEV_RANDOM" case.
  
  Add RANDOM_LOADABLE option to allow loadable Yarrow/Fortuna/LocallyWritten
  algorithm.  Add a skeleton "other" algorithm framework for folks
  to add their own processing code. NIST, anyone?
  
  Retire the RANDOM_DUMMY option.
  
  Build modules for Yarrow, Fortuna and "other".
  
  Use atomics for the live entropy rate-tracking.
  
  Convert ints to bools for the 'seeded' logic.
  
  Move _write() function from the algorithm-specific areas to randomdev.c
  
  Get rid of reseed() function - it is unused.
  
  Tidy up the opt_*.h includes.
  
  Update documentation for random(4) modules.
  
  Fix test program (reviewers, please leave this).
  
  Differential Revision:https://reviews.freebsd.org/D3354
  Reviewed by:  wblock,delphij,jmg,bjk
  Approved by:  so (/dev/random blanket)

Added:
  head/sys/dev/random/other_algorithm.c   (contents, props changed)
  head/sys/dev/random/other_algorithm.h   (contents, props changed)
  head/sys/dev/random/random_infra.c   (contents, props changed)
  head/sys/modules/random_fortuna/
  head/sys/modules/random_fortuna/Makefile   (contents, props changed)
  head/sys/modules/random_other/
  head/sys/modules/random_other/Makefile   (contents, props changed)
  head/sys/modules/random_yarrow/
  head/sys/modules/random_yarrow/Makefile   (contents, props changed)
Deleted:
  head/sys/dev/random/randomdev_none.c
Modified:
  head/UPDATING
  head/share/man/man4/random.4
  head/sys/conf/NOTES
  head/sys/conf/files
  head/sys/conf/options
  head/sys/dev/random/fortuna.c
  head/sys/dev/random/random_harvestq.c
  head/sys/dev/random/random_harvestq.h
  head/sys/dev/random/randomdev.c
  head/sys/dev/random/randomdev.h
  head/sys/dev/random/unit_test.c
  head/sys/dev/random/yarrow.c
  head/sys/modules/Makefile
  head/sys/sys/random.h

Modified: head/UPDATING
==
--- head/UPDATING   Mon Aug 17 05:59:36 2015(r286838)
+++ head/UPDATING   Mon Aug 17 07:36:12 2015(r286839)
@@ -31,6 +31,21 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11
disable the most expensive debugging functionality run
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
 
+20150817:
+   Kernel-loadable modules for the random(4) device are back. To use
+   them, the kernel must have
+
+   device  random
+   options RANDOM_LOADABLE
+
+   kldload(8) can then be used to load random_fortuna.ko
+   or random_yarrow.ko. Please note that due to the indirect
+   function calls that the loadable modules need to provide,
+   the build-in variants will be slightly more efficient.
+
+   The random(4) kernel option RANDOM_DUMMY has been retired due to
+   unpopularity. It was not all that useful anyway.
+
 20150813:
The WITHOUT_ELFTOOLCHAIN_TOOLS src.conf(5) knob has been retired.
Control over building the ELF Tool Chain tools is now provided by

Modified: head/share/man/man4/random.4
==
--- head/share/man/man4/random.4Mon Aug 17 05:59:36 2015
(r286838)
+++ head/share/man/man4/random.4Mon Aug 17 07:36:12 2015
(r286839)
@@ -23,7 +23,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 30, 2015
+.Dd August 17, 2015
 .Dt RANDOM 4
 .Os
 .Sh NAME
@@ -31,6 +31,7 @@
 .Nd the entropy device
 .Sh SYNOPSIS
 .Cd "device random"
+.Cd "options RANDOM_LOADABLE"
 .Sh DESCRIPTION
 The
 .Nm
@@ -133,15 +134,49 @@ The
 .Va kern.random.harvest.mask_bin
 and
 .Va kern.random.harvest.mask_symbolic
-sysctl
-can be used confirm
-that your choices are correct.
+sysctls
+can be used to confirm
+that the choices are correct.
 Note that disabled items
 in the latter item
 are listed in square brackets.
 See
 .Xr random_harvest 9
 for more on the harvesting of entropy.
+.Pp
+When
+.Cd "options RANDOM_LOADABLE"
+is used,
+the
+.Pa /dev/random
+device is not created
+until an "algorithm module"
+is loaded.
+Two of these modules
+are built by default,
+.Em random_fortuna
+and
+.Em random_yarrow .
+The
+.Em random_yarrow
+module is deprecated,
+and will be removed in
+.Fx 12.
+Use of the Yarrow algorithm
+is not encouraged,
+but while still present
+in the kernel source,
+it can be selected with the
+.Cd "options RANDOM_YARROW"
+kernel option.
+Note that these loadable modules
+are slightly less efficient
+than their compiled-in equivalents.
+This is because some functions
+must be

svn commit: r286840 - head/usr.sbin/wlandebug

2015-08-17 Thread Gleb Smirnoff
Author: glebius
Date: Mon Aug 17 09:18:54 2015
New Revision: 286840
URL: https://svnweb.freebsd.org/changeset/base/286840

Log:
  Belatedly fix documentation on which interface to use as argument.

Modified:
  head/usr.sbin/wlandebug/wlandebug.8

Modified: head/usr.sbin/wlandebug/wlandebug.8
==
--- head/usr.sbin/wlandebug/wlandebug.8 Mon Aug 17 07:36:12 2015
(r286839)
+++ head/usr.sbin/wlandebug/wlandebug.8 Mon Aug 17 09:18:54 2015
(r286840)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd July 17, 2009
+.Dd August 17, 2015
 .Dt WLANDEBUG 8
 .Os
 .Sh NAME
@@ -45,7 +45,7 @@ Running
 .Nm
 without any options will display the current messages
 enabled for the specified network interface
-(by default, ``ath0').
+(by default, ``wlan0').
 The default debugging level for new interfaces can be set
 by specifying the
 .Fl d
@@ -148,7 +148,7 @@ trace transmit rate control operation.
 .Sh EXAMPLES
 The following might be used to debug basic station mode operation:
 .Pp
-.Dl "wlandebug -i ral0 scan+auth+assoc"
+.Dl "wlandebug -i wlan1 scan+auth+assoc"
 .Pp
 it enables debug messages while scanning, authenticating to
 an access point, and associating to an access point.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r286787 - head/sys/x86/x86

2015-08-17 Thread Roger Pau Monné
El 16/08/15 a les 11.50, Konstantin Belousov ha escrit:
> On Sun, Aug 16, 2015 at 12:03:58PM +0300, Konstantin Belousov wrote:
>> On Sun, Aug 16, 2015 at 10:16:53AM +0200, Roger Pau Monn?? wrote:
>>> pmap_map_io_transient contains some of this logic, but it uses
>>> vmem_alloc (with M_WAITOK) instead of a pcpu pageframe, which defeats
>>> part of the purpose of this change and cannot be used as-is.
>>
>> This logic can be repeated, but it is probably too much for the purpose.
>> It would be enough to have single frame (we cannot reuse CMAP1),
>> protected by a spin mutex.  I do not see much sense in providing
>> optimized per-cpu frames for this case.
> 
> Like this.  I only compiled the patch.

Thanks, yes, this looks right. Since this is only used for the bounce
buffer code I don't think it's necessary to have a per-cpu frame. If the
usage of this function is expanded I might look into adding a per-cpu frame.

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


Re: svn commit: r286840 - head/usr.sbin/wlandebug

2015-08-17 Thread Baptiste Daroussin
On Mon, Aug 17, 2015 at 09:18:54AM +, Gleb Smirnoff wrote:
> Author: glebius
> Date: Mon Aug 17 09:18:54 2015
> New Revision: 286840
> URL: https://svnweb.freebsd.org/changeset/base/286840
> 
> Log:
>   Belatedly fix documentation on which interface to use as argument.
> 
> Modified:
>   head/usr.sbin/wlandebug/wlandebug.8
> 
> Modified: head/usr.sbin/wlandebug/wlandebug.8
> ==
> --- head/usr.sbin/wlandebug/wlandebug.8   Mon Aug 17 07:36:12 2015
> (r286839)
> +++ head/usr.sbin/wlandebug/wlandebug.8   Mon Aug 17 09:18:54 2015
> (r286840)
> @@ -24,7 +24,7 @@
>  .\"
>  .\" $FreeBSD$
>  .\"
> -.Dd July 17, 2009
> +.Dd August 17, 2015
>  .Dt WLANDEBUG 8
>  .Os
>  .Sh NAME
> @@ -45,7 +45,7 @@ Running
>  .Nm
>  without any options will display the current messages
>  enabled for the specified network interface
> -(by default, ``ath0').
> +(by default, ``wlan0').
>  The default debugging level for new interfaces can be set
>  by specifying the
>  .Fl d
> @@ -148,7 +148,7 @@ trace transmit rate control operation.
>  .Sh EXAMPLES
>  The following might be used to debug basic station mode operation:
>  .Pp
> -.Dl "wlandebug -i ral0 scan+auth+assoc"
> +.Dl "wlandebug -i wlan1 scan+auth+assoc"

You meant wlan0 ? (even if wlan1 is valid you probably meant wlan0 :))

Best regards,
Bapt


pgpMUYjqAphZy.pgp
Description: PGP signature


svn commit: r286842 - in head: . share/mk

2015-08-17 Thread Ed Maste
Author: emaste
Date: Mon Aug 17 10:48:55 2015
New Revision: 286842
URL: https://svnweb.freebsd.org/changeset/base/286842

Log:
  Separate ELFTOOLCHAIN_BOOTSTRAP from BINUTILS_BOOTSTRAP
  
  For most cases they are equivalent, but BINUTILS_BOOTSTRAP is a
  BROKEN_OPTION on arm64 as the in-tree GNU binutils do not support it,
  so we need a separate internal flag for ELF Tool Chain.
  
  Reviewed by:  andrew, brooks
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D3381

Modified:
  head/Makefile.inc1
  head/share/mk/src.opts.mk

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Mon Aug 17 10:03:23 2015(r286841)
+++ head/Makefile.inc1  Mon Aug 17 10:48:55 2015(r286842)
@@ -1493,6 +1493,8 @@ _btxld=   usr.sbin/btxld
 .if ${XAS:M/*} == ""
 .if ${MK_BINUTILS_BOOTSTRAP} != "no"
 _binutils= gnu/usr.bin/binutils
+.endif
+.if ${MK_ELFTOOLCHAIN_BOOTSTRAP} != "no"
 _elftctools=   lib/libelftc \
usr.bin/elfcopy \
usr.bin/nm \
@@ -1502,7 +1504,7 @@ _elftctools=  lib/libelftc \
 # cross-build on a FreeBSD 10 host:
 _elftctools+=  usr.bin/addr2line
 .endif
-.elif ${TARGET_ARCH} != ${MACHINE_ARCH} && ${MK_BINUTILS_BOOTSTRAP} != "no"
+.elif ${TARGET_ARCH} != ${MACHINE_ARCH} && ${MK_ELFTOOLCHAIN_BOOTSTRAP} != "no"
 # If cross-building with an external binutils we still need to build strip for
 # the target (for at least crunchide).
 _elftctools=   lib/libelftc \

Modified: head/share/mk/src.opts.mk
==
--- head/share/mk/src.opts.mk   Mon Aug 17 10:03:23 2015(r286841)
+++ head/share/mk/src.opts.mk   Mon Aug 17 10:48:55 2015(r286842)
@@ -80,6 +80,7 @@ __DEFAULT_YES_OPTIONS = \
 DYNAMICROOT \
 ED_CRYPTO \
 EE \
+ELFTOOLCHAIN_BOOTSTRAP \
 EXAMPLES \
 FDT \
 FILE \
@@ -328,6 +329,7 @@ MK_GROFF:=  no
 .if ${MK_CROSS_COMPILER} == "no"
 MK_BINUTILS_BOOTSTRAP:= no
 MK_CLANG_BOOTSTRAP:= no
+MK_ELFTOOLCHAIN_BOOTSTRAP:= no
 MK_GCC_BOOTSTRAP:= no
 .endif
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r286840 - head/usr.sbin/wlandebug

2015-08-17 Thread Gleb Smirnoff
On Mon, Aug 17, 2015 at 12:47:06PM +0200, Baptiste Daroussin wrote:
B> > @@ -24,7 +24,7 @@
B> >  .\"
B> >  .\" $FreeBSD$
B> >  .\"
B> > -.Dd July 17, 2009
B> > +.Dd August 17, 2015
B> >  .Dt WLANDEBUG 8
B> >  .Os
B> >  .Sh NAME
B> > @@ -45,7 +45,7 @@ Running
B> >  .Nm
B> >  without any options will display the current messages
B> >  enabled for the specified network interface
B> > -(by default, ``ath0').
B> > +(by default, ``wlan0').
B> >  The default debugging level for new interfaces can be set
B> >  by specifying the
B> >  .Fl d
B> > @@ -148,7 +148,7 @@ trace transmit rate control operation.
B> >  .Sh EXAMPLES
B> >  The following might be used to debug basic station mode operation:
B> >  .Pp
B> > -.Dl "wlandebug -i ral0 scan+auth+assoc"
B> > +.Dl "wlandebug -i wlan1 scan+auth+assoc"
B> 
B> You meant wlan0 ? (even if wlan1 is valid you probably meant wlan0 :))

No, it intentonally is wlan1. The utility has "wlan0" hardcoded, so -i
is used to specify something different from wlan0.

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


svn commit: r286844 - head/sys/compat/cloudabi

2015-08-17 Thread Ed Schouten
Author: ed
Date: Mon Aug 17 13:07:12 2015
New Revision: 286844
URL: https://svnweb.freebsd.org/changeset/base/286844

Log:
  Don't forget to invoke pre_execve() and post_execve().
  
  CloudABI's proc_exec() was implemented before r282708 introduced
  pre_execve() and post_execve(). Sync up by adding these missing calls.

Modified:
  head/sys/compat/cloudabi/cloudabi_proc.c

Modified: head/sys/compat/cloudabi/cloudabi_proc.c
==
--- head/sys/compat/cloudabi/cloudabi_proc.cMon Aug 17 12:51:46 2015
(r286843)
+++ head/sys/compat/cloudabi/cloudabi_proc.cMon Aug 17 13:07:12 2015
(r286844)
@@ -46,14 +46,19 @@ cloudabi_sys_proc_exec(struct thread *td
 struct cloudabi_sys_proc_exec_args *uap)
 {
struct image_args args;
+   struct vmspace *oldvmspace;
int error;
 
+   error = pre_execve(td, &oldvmspace);
+   if (error != 0)
+   return (error);
error = exec_copyin_data_fds(td, &args, uap->data, uap->datalen,
uap->fds, uap->fdslen);
if (error == 0) {
args.fd = uap->fd;
error = kern_execve(td, &args, NULL);
}
+   post_execve(td, error, oldvmspace);
return (error);
 }
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r286845 - head/sys/dev/gpio

2015-08-17 Thread Luiz Otavio O Souza
Author: loos
Date: Mon Aug 17 16:51:37 2015
New Revision: 286845
URL: https://svnweb.freebsd.org/changeset/base/286845

Log:
  Fix a few bugs when gpiobus is detaching:
  
   - Detach the gpiobus and the gpioc devices from the GPIO controller.
  
   - Fix the leak of gpiobus IRQ rman(9) region descriptor.
  
   - Fix the leak of child ivars and IRQ resource list.
  
  While here return NULL (instead of 0) for a device_t that fails to allocate
  the ivar memory.
  
  Tested with gpiobus built as a module.
  
  Sponsored by: Rubicon Communications (Netgate)

Modified:
  head/sys/dev/gpio/gpiobus.c

Modified: head/sys/dev/gpio/gpiobus.c
==
--- head/sys/dev/gpio/gpiobus.c Mon Aug 17 13:07:12 2015(r286844)
+++ head/sys/dev/gpio/gpiobus.c Mon Aug 17 16:51:37 2015(r286845)
@@ -155,12 +155,16 @@ gpiobus_attach_bus(device_t dev)
 int
 gpiobus_detach_bus(device_t dev)
 {
+   int err;
 
 #ifdef FDT
ofw_gpiobus_unregister_provider(dev);
 #endif
+   err = bus_generic_detach(dev);
+   if (err != 0)
+   return (err);
 
-   return (bus_generic_detach(dev));
+   return (device_delete_children(dev));
 }
 
 int
@@ -338,11 +342,14 @@ gpiobus_detach(device_t dev)
if ((err = device_get_children(dev, &devlist, &ndevs)) != 0)
return (err);
for (i = 0; i < ndevs; i++) {
-   device_delete_child(dev, devlist[i]);
devi = GPIOBUS_IVAR(devlist[i]);
gpiobus_free_ivars(devi);
+   resource_list_free(&devi->rl);
+   free(devi, M_DEVBUF);
+   device_delete_child(dev, devlist[i]);
}
free(devlist, M_TEMP);
+   rman_fini(&sc->sc_intr_rman);
if (sc->sc_pins) {
for (i = 0; i < sc->sc_npins; i++) {
if (sc->sc_pins[i].name != NULL)
@@ -442,7 +449,7 @@ gpiobus_add_child(device_t dev, u_int or
devi = malloc(sizeof(struct gpiobus_ivar), M_DEVBUF, M_NOWAIT | M_ZERO);
if (devi == NULL) {
device_delete_child(dev, child);
-   return (0);
+   return (NULL);
}
resource_list_init(&devi->rl);
device_set_ivars(child, devi);
@@ -461,8 +468,11 @@ gpiobus_hinted_child(device_t bus, const
child = BUS_ADD_CHILD(bus, 0, dname, dunit);
devi = GPIOBUS_IVAR(child);
resource_int_value(dname, dunit, "pins", &pins);
-   if (gpiobus_parse_pins(sc, child, pins))
+   if (gpiobus_parse_pins(sc, child, pins)) {
+   resource_list_free(&devi->rl);
+   free(devi, M_DEVBUF);
device_delete_child(bus, child);
+   }
if (resource_int_value(dname, dunit, "irq", &irq) == 0) {
if (bus_set_resource(child, SYS_RES_IRQ, 0, irq, 1) != 0)
device_printf(bus,
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r286846 - head/sys/modules/gpio/gpiobus

2015-08-17 Thread Luiz Otavio O Souza
Author: loos
Date: Mon Aug 17 17:01:26 2015
New Revision: 286846
URL: https://svnweb.freebsd.org/changeset/base/286846

Log:
  Fix the build of gpiobus as a module.
  
  Add the missing newbus interfaces and gpioc, which is part of basic gpiobus
  framework.
  
  Sponsored by: Rubicon Communications (Netgate)

Modified:
  head/sys/modules/gpio/gpiobus/Makefile

Modified: head/sys/modules/gpio/gpiobus/Makefile
==
--- head/sys/modules/gpio/gpiobus/Makefile  Mon Aug 17 16:51:37 2015
(r286845)
+++ head/sys/modules/gpio/gpiobus/Makefile  Mon Aug 17 17:01:26 2015
(r286846)
@@ -32,8 +32,9 @@
 .PATH: ${.CURDIR}/../../../dev/gpio/
 
 KMOD=  gpiobus
-SRCS=  gpiobus.c
-SRCS+= device_if.h bus_if.h gpio_if.h gpiobus_if.h opt_platform.h
+SRCS=  gpiobus.c gpioc.c
+SRCS+= gpio_if.c gpio_if.h gpiobus_if.c gpiobus_if.h
+SRCS+= device_if.h bus_if.h opt_platform.h
 
 CFLAGS+=  -I. -I${.CURDIR}/../../../dev/gpio/
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r286847 - head/sys/dev/gpio

2015-08-17 Thread Luiz Otavio O Souza
Author: loos
Date: Mon Aug 17 17:09:57 2015
New Revision: 286847
URL: https://svnweb.freebsd.org/changeset/base/286847

Log:
  gpioled(4) depends on gpiobus.
  
  This fixes the loading of gpioled as a module.
  
  Sponsored by: Rubicon Communications (Netgate)

Modified:
  head/sys/dev/gpio/gpioled.c

Modified: head/sys/dev/gpio/gpioled.c
==
--- head/sys/dev/gpio/gpioled.c Mon Aug 17 17:01:26 2015(r286846)
+++ head/sys/dev/gpio/gpioled.c Mon Aug 17 17:09:57 2015(r286847)
@@ -255,3 +255,4 @@ static driver_t gpioled_driver = {
 };
 
 DRIVER_MODULE(gpioled, gpiobus, gpioled_driver, gpioled_devclass, 0, 0);
+MODULE_DEPEND(gpioled, gpiobus, 1, 1, 1);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r286848 - head/usr.bin/truss

2015-08-17 Thread John Baldwin
Author: jhb
Date: Mon Aug 17 17:52:28 2015
New Revision: 286848
URL: https://svnweb.freebsd.org/changeset/base/286848

Log:
  - Decode the arguments for several signal-related system calls: sigpending,
sigqueue, sigreturn, sigsuspend, sigtimedwait, sigwait, sigwaitinfo, and
thr_kill.
  - Print signal sets as a structure (with {}'s) and in particular use this to
differentiate empty sets from a NULL pointer.
  - Decode arguments for some other system calls: issetugid, pipe2, sysarch
(operations are only decoded for amd64 and i386), and thr_self.

Modified:
  head/usr.bin/truss/syscall.h
  head/usr.bin/truss/syscalls.c

Modified: head/usr.bin/truss/syscall.h
==
--- head/usr.bin/truss/syscall.hMon Aug 17 17:09:57 2015
(r286847)
+++ head/usr.bin/truss/syscall.hMon Aug 17 17:52:28 2015
(r286848)
@@ -41,7 +41,8 @@ enum Argtype { None = 1, Hex, Octal, Int
Sigset, Sigprocmask, Kevent, Sockdomain, Socktype, Open,
Fcntlflag, Rusage, BinString, Shutdown, Resource, Rlimit, Timeval2,
Pathconf, Rforkflags, ExitStatus, Waitoptions, Idtype, Procctl,
-   LinuxSockArgs, Umtxop, Atfd, Atflags, Timespec2, Accessmode };
+   LinuxSockArgs, Umtxop, Atfd, Atflags, Timespec2, Accessmode, Long,
+   Sysarch };
 
 #defineARG_MASK0xff
 #defineOUT 0x100

Modified: head/usr.bin/truss/syscalls.c
==
--- head/usr.bin/truss/syscalls.c   Mon Aug 17 17:09:57 2015
(r286847)
+++ head/usr.bin/truss/syscalls.c   Mon Aug 17 17:52:28 2015
(r286848)
@@ -56,6 +56,7 @@ static const char rcsid[] =
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -113,6 +114,7 @@ static struct syscall syscalls[] = {
{ .name = "getsid", .ret_type = 1, .nargs = 1,
  .args = { { Int, 0 } } },
{ .name = "getuid", .ret_type = 1, .nargs = 0 },
+   { .name = "issetugid", .ret_type = 1, .nargs = 0 },
{ .name = "readlink", .ret_type = 1, .nargs = 3,
  .args = { { Name, 0 }, { Readlinkres | OUT, 1 }, { Int, 2 } } },
{ .name = "readlinkat", .ret_type = 1, .nargs = 4,
@@ -280,8 +282,22 @@ static struct syscall syscalls[] = {
{ .name = "kevent", .ret_type = 0, .nargs = 6,
  .args = { { Int, 0 }, { Kevent, 1 }, { Int, 2 }, { Kevent | OUT, 3 },
{ Int, 4 }, { Timespec, 5 } } },
+   { .name = "sigpending", .ret_type = 0, .nargs = 1,
+ .args = { { Sigset | OUT, 0 } } },
{ .name = "sigprocmask", .ret_type = 0, .nargs = 3,
  .args = { { Sigprocmask, 0 }, { Sigset, 1 }, { Sigset | OUT, 2 } } },
+   { .name = "sigqueue", .ret_type = 0, .nargs = 3,
+ .args = { { Int, 0 }, { Signal, 1 }, { LongHex, 2 } } },
+   { .name = "sigreturn", .ret_type = 0, .nargs = 1,
+ .args = { { Ptr, 0 } } },
+   { .name = "sigsuspend", .ret_type = 0, .nargs = 1,
+ .args = { { Sigset | IN, 0 } } },
+   { .name = "sigtimedwait", .ret_type = 1, .nargs = 3,
+ .args = { { Sigset | IN, 0 }, { Ptr, 1 }, { Timespec | IN, 2 } } },
+   { .name = "sigwait", .ret_type = 1, .nargs = 2,
+ .args = { { Sigset | IN, 0 }, { Ptr, 1 } } },
+   { .name = "sigwaitinfo", .ret_type = 1, .nargs = 2,
+ .args = { { Sigset | IN, 0 }, { Ptr, 1 } } },
{ .name = "unmount", .ret_type = 1, .nargs = 2,
  .args = { { Name, 0 }, { Int, 1 } } },
{ .name = "socket", .ret_type = 1, .nargs = 3,
@@ -317,6 +333,8 @@ static struct syscall syscalls[] = {
  .args = { { Name | IN, 0 }, { Pathconf, 1 } } },
{ .name = "pipe", .ret_type = 1, .nargs = 1,
  .args = { { Ptr, 0 } } },
+   { .name = "pipe2", .ret_type = 1, .nargs = 2,
+ .args = { { Ptr, 0 }, { Open, 1 } } },
{ .name = "truncate", .ret_type = 1, .nargs = 3,
  .args = { { Name | IN, 0 }, { Int | IN, 1 }, { Quad | IN, 2 } } },
{ .name = "ftruncate", .ret_type = 1, .nargs = 3,
@@ -345,9 +363,15 @@ static struct syscall syscalls[] = {
{ Waitoptions, 3 }, { Rusage | OUT, 4 }, { Ptr, 5 } } },
{ .name = "procctl", .ret_type = 1, .nargs = 4,
  .args = { { Idtype, 0 }, { Int, 1 }, { Procctl, 2 }, { Ptr, 3 } } },
+   { .name = "sysarch", .ret_type = 1, .nargs = 2,
+ .args = { { Sysarch, 0 }, { Ptr, 1 } } },
{ .name = "_umtx_op", .ret_type = 1, .nargs = 5,
  .args = { { Ptr, 0 }, { Umtxop, 1 }, { LongHex, 2 }, { Ptr, 3 },
{ Ptr, 4 } } },
+   { .name = "thr_kill", .ret_type = 0, .nargs = 2,
+ .args = { { Long, 0 }, { Signal, 1 } } },
+   { .name = "thr_self", .ret_type = 0, .nargs = 1,
+ .args = { { Ptr, 0 } } },
{ .name = 0 },
 };
 
@@ -511,6 +535,16 @@ static struct xlat access_modes[] = {
X(R_OK) X(W_OK) X(X_OK) XEND
 

svn commit: r286849 - head/usr.bin/truss

2015-08-17 Thread John Baldwin
Author: jhb
Date: Mon Aug 17 17:57:01 2015
New Revision: 286849
URL: https://svnweb.freebsd.org/changeset/base/286849

Log:
  Decode the optional SOCK_NONBLOCK and SOCK_CLOEXEC flags passed in a
  socket type.

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

Modified: head/usr.bin/truss/syscalls.c
==
--- head/usr.bin/truss/syscalls.c   Mon Aug 17 17:52:28 2015
(r286848)
+++ head/usr.bin/truss/syscalls.c   Mon Aug 17 17:57:01 2015
(r286849)
@@ -1228,9 +1228,22 @@ print_arg(struct syscall_args *sc, unsig
case Sockdomain:
tmp = strdup(xlookup(sockdomain_arg, args[sc->offset]));
break;
-   case Socktype:
-   tmp = strdup(xlookup(socktype_arg, args[sc->offset]));
+   case Socktype: {
+   FILE *fp;
+   size_t len;
+   int type, flags;
+
+   flags = args[sc->offset] & (SOCK_CLOEXEC | SOCK_NONBLOCK);
+   type = args[sc->offset] & ~flags;
+   fp = open_memstream(&tmp, &len);
+   fputs(xlookup(socktype_arg, type), fp);
+   if (flags & SOCK_CLOEXEC)
+   fprintf(fp, "|SOCK_CLOEXEC");
+   if (flags & SOCK_NONBLOCK)
+   fprintf(fp, "|SOCK_NONBLOCK");
+   fclose(fp);
break;
+   }
case Shutdown:
tmp = strdup(xlookup(shutdown_arg, args[sc->offset]));
break;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r286851 - head/sys/arm/arm

2015-08-17 Thread Jason A. Harmening
Author: jah
Date: Mon Aug 17 18:28:40 2015
New Revision: 286851
URL: https://svnweb.freebsd.org/changeset/base/286851

Log:
  Some cleanups to make the style of pmap_quick_enter_page() and 
pmap_quick_remove_page() in arm/pmap-v6-new.c more consistent with the rest of 
the file.
  
  Submitted by: Svatopluk Kraus 
  Approved by:  kib (mentor)

Modified:
  head/sys/arm/arm/pmap-v6-new.c

Modified: head/sys/arm/arm/pmap-v6-new.c
==
--- head/sys/arm/arm/pmap-v6-new.c  Mon Aug 17 18:21:18 2015
(r286850)
+++ head/sys/arm/arm/pmap-v6-new.c  Mon Aug 17 18:28:40 2015
(r286851)
@@ -1166,10 +1166,9 @@ pmap_init_qpages(void)
pc = pcpu_find(i);
pc->pc_qmap_addr = kva_alloc(PAGE_SIZE);
if (pc->pc_qmap_addr == 0)
-   panic("pmap_init_qpages: unable to allocate KVA");
+   panic("%s: unable to allocate KVA", __func__);
}
 }
-
 SYSINIT(qpages_init, SI_SUB_CPU, SI_ORDER_ANY, pmap_init_qpages, NULL);
 
 /*
@@ -5728,18 +5727,17 @@ pmap_copy_pages(vm_page_t ma[], vm_offse
 vm_offset_t
 pmap_quick_enter_page(vm_page_t m)
 {
-   pt2_entry_t *pte;
-   vm_offset_t qmap_addr; 
+   pt2_entry_t *pte2p;
+   vm_offset_t qmap_addr;
 
critical_enter();
-
qmap_addr = PCPU_GET(qmap_addr);
-   pte = pt2map_entry(qmap_addr);
+   pte2p = pt2map_entry(qmap_addr);
 
-   KASSERT(*pte == 0, ("pmap_quick_enter_page: PTE busy"));
+   KASSERT(pte2_load(pte2p) == 0, ("%s: PTE2 busy", __func__));
 
-   pte2_store(pte, PTE2_KERN_NG(VM_PAGE_TO_PHYS(m),
-   PTE2_AP_KRW, pmap_page_get_memattr(m)));
+   pte2_store(pte2p, PTE2_KERN_NG(VM_PAGE_TO_PHYS(m), PTE2_AP_KRW,
+   pmap_page_get_memattr(m)));
tlb_flush_local(qmap_addr);
 
return (qmap_addr);
@@ -5748,16 +5746,16 @@ pmap_quick_enter_page(vm_page_t m)
 void
 pmap_quick_remove_page(vm_offset_t addr)
 {
-   pt2_entry_t *pte;
+   pt2_entry_t *pte2p;
vm_offset_t qmap_addr;
 
qmap_addr = PCPU_GET(qmap_addr);
-   pte = pt2map_entry(qmap_addr);
+   pte2p = pt2map_entry(qmap_addr);
 
-   KASSERT(addr == qmap_addr, ("pmap_quick_remove_page: invalid address"));
-   KASSERT(*pte != 0, ("pmap_quick_remove_page: PTE not in use"));
+   KASSERT(addr == qmap_addr, ("%s: invalid address", __func__));
+   KASSERT(pte2_load(pte2p) != 0, ("%s: PTE2 not in use", __func__));
 
-   pte2_clear(pte);
+   pte2_clear(pte2p);
critical_exit();
 }
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r286855 - head/sys/amd64/amd64

2015-08-17 Thread Konstantin Belousov
Author: kib
Date: Mon Aug 17 18:42:45 2015
New Revision: 286855
URL: https://svnweb.freebsd.org/changeset/base/286855

Log:
  XEN/amd64 may initiate i/o over the pages not mapped by the direct
  map.  Handle busdma bouncing and ata PIO accesses by using global
  frame used by the current CPU locally for the duration of
  pmap_quick_enter/remove_page().  A spin mutex protects the concurent
  frame use and prevents thread migration.
  
  Noted by: royger
  Reviewed by:  alc, jah, royger (previous version)
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/amd64/amd64/pmap.c

Modified: head/sys/amd64/amd64/pmap.c
==
--- head/sys/amd64/amd64/pmap.c Mon Aug 17 18:36:16 2015(r286854)
+++ head/sys/amd64/amd64/pmap.c Mon Aug 17 18:42:45 2015(r286855)
@@ -390,6 +390,8 @@ static struct md_page *pv_table;
  */
 pt_entry_t *CMAP1 = 0;
 caddr_t CADDR1 = 0;
+static vm_offset_t qframe = 0;
+static struct mtx qframe_mtx;
 
 static int pmap_flags = PMAP_PDE_SUPERPAGE;/* flags for x86 pmaps */
 
@@ -1031,7 +1033,7 @@ pmap_init(void)
struct pmap_preinit_mapping *ppim;
vm_page_t mpte;
vm_size_t s;
-   int i, pv_npg;
+   int error, i, pv_npg;
 
/*
 * Initialize the vm page array entries for the kernel pmap's
@@ -1112,6 +1114,12 @@ pmap_init(void)
printf("PPIM %u: PA=%#lx, VA=%#lx, size=%#lx, mode=%#x\n", i,
ppim->pa, ppim->va, ppim->sz, ppim->mode);
}
+
+   mtx_init(&qframe_mtx, "qfrmlk", NULL, MTX_SPIN);
+   error = vmem_alloc(kernel_arena, PAGE_SIZE, M_BESTFIT | M_WAITOK,
+   (vmem_addr_t *)&qframe);
+   if (error != 0)
+   panic("qframe allocation failed");
 }
 
 static SYSCTL_NODE(_vm_pmap, OID_AUTO, pde, CTLFLAG_RD, 0,
@@ -7019,13 +7027,27 @@ pmap_unmap_io_transient(vm_page_t page[]
 vm_offset_t
 pmap_quick_enter_page(vm_page_t m)
 {
+   vm_paddr_t paddr;
 
-   return (PHYS_TO_DMAP(VM_PAGE_TO_PHYS(m)));
+   paddr = VM_PAGE_TO_PHYS(m);
+   if (paddr < dmaplimit)
+   return (PHYS_TO_DMAP(paddr));
+   mtx_lock_spin(&qframe_mtx);
+   KASSERT(*vtopte(qframe) == 0, ("qframe busy"));
+   pte_store(vtopte(qframe), paddr | X86_PG_RW | X86_PG_V | X86_PG_A |
+   X86_PG_M | pmap_cache_bits(kernel_pmap, m->md.pat_mode, 0));
+   return (qframe);
 }
 
 void
 pmap_quick_remove_page(vm_offset_t addr)
 {
+
+   if (addr != qframe)
+   return;
+   pte_store(vtopte(qframe), 0);
+   invlpg(qframe);
+   mtx_unlock_spin(&qframe_mtx);
 }
 
 #include "opt_ddb.h"
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r286857 - head/usr.bin/truss

2015-08-17 Thread John Baldwin
Author: jhb
Date: Mon Aug 17 18:47:39 2015
New Revision: 286857
URL: https://svnweb.freebsd.org/changeset/base/286857

Log:
  Tidy the linux_socketcall decoding:
  - Don't exit if get_struct() fails, instead print the raw pointer value to
match all other argument decoding cases.
  - Use an xlat table instead of a home-rolled switch for the operation name.
  - Display the nested socketcall args structure as a structure instead of as
two inline arguments.

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

Modified: head/usr.bin/truss/syscalls.c
==
--- head/usr.bin/truss/syscalls.c   Mon Aug 17 18:43:39 2015
(r286856)
+++ head/usr.bin/truss/syscalls.c   Mon Aug 17 18:47:39 2015
(r286857)
@@ -545,6 +545,16 @@ static struct xlat sysarch_ops[] = {
 #endif
XEND
 };
+
+static struct xlat linux_socketcall_ops[] = {
+   X(LINUX_SOCKET) X(LINUX_BIND) X(LINUX_CONNECT) X(LINUX_LISTEN)
+   X(LINUX_ACCEPT) X(LINUX_GETSOCKNAME) X(LINUX_GETPEERNAME)
+   X(LINUX_SOCKETPAIR) X(LINUX_SEND) X(LINUX_RECV) X(LINUX_SENDTO)
+   X(LINUX_RECVFROM) X(LINUX_SHUTDOWN) X(LINUX_SETSOCKOPT)
+   X(LINUX_GETSOCKOPT) X(LINUX_SENDMSG) X(LINUX_RECVMSG)
+   XEND
+};
+
 #undef X
 #undef XEND
 
@@ -962,71 +972,12 @@ print_arg(struct syscall_args *sc, unsig
{
struct linux_socketcall_args largs;
if (get_struct(pid, (void *)args[sc->offset], (void *)&largs,
-   sizeof(largs)) == -1) {
-   err(1, "get_struct %p", (void *)args[sc->offset]);
-   }
-   const char *what;
-   char buf[30];
-
-   switch (largs.what) {
-   case LINUX_SOCKET:
-   what = "LINUX_SOCKET";
-   break;
-   case LINUX_BIND:
-   what = "LINUX_BIND";
-   break;
-   case LINUX_CONNECT:
-   what = "LINUX_CONNECT";
-   break;
-   case LINUX_LISTEN:
-   what = "LINUX_LISTEN";
-   break;
-   case LINUX_ACCEPT:
-   what = "LINUX_ACCEPT";
-   break;
-   case LINUX_GETSOCKNAME:
-   what = "LINUX_GETSOCKNAME";
-   break;
-   case LINUX_GETPEERNAME:
-   what = "LINUX_GETPEERNAME";
-   break;
-   case LINUX_SOCKETPAIR:
-   what = "LINUX_SOCKETPAIR";
-   break;
-   case LINUX_SEND:   
-   what = "LINUX_SEND";
-   break;
-   case LINUX_RECV: 
-   what = "LINUX_RECV";
-   break;
-   case LINUX_SENDTO:
-   what = "LINUX_SENDTO";
-   break;
-   case LINUX_RECVFROM:
-   what = "LINUX_RECVFROM";
-   break;
-   case LINUX_SHUTDOWN:
-   what = "LINUX_SHUTDOWN";
-   break;
-   case LINUX_SETSOCKOPT:
-   what = "LINUX_SETSOCKOPT";
-   break;
-   case LINUX_GETSOCKOPT:
-   what = "LINUX_GETSOCKOPT";
-   break;
-   case LINUX_SENDMSG:
-   what = "LINUX_SENDMSG";
-   break;
-   case LINUX_RECVMSG:
-   what = "LINUX_RECVMSG";
-   break;
-   default:
-   sprintf(buf, "%d", largs.what);
-   what = buf;
-   break;
-   }
-   asprintf(&tmp, "(0x%lx)%s, 0x%lx", args[sc->offset], what,
-   (long unsigned int)largs.args);
+   sizeof(largs)) != -1)
+   asprintf(&tmp, "{ %s, 0x%lx }",
+   lookup(linux_socketcall_ops, largs.what, 10),
+   (long unsigned int)largs.args);
+   else
+   asprintf(&tmp, "0x%lx", args[sc->offset]);
break;
}
case Pollfd: {
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r286860 - head/usr.bin/truss

2015-08-17 Thread John Baldwin
Author: jhb
Date: Mon Aug 17 19:08:48 2015
New Revision: 286860
URL: https://svnweb.freebsd.org/changeset/base/286860

Log:
  Use an xlat table and xlookup() instead of a home-rolled version for the
  sigprocmask operation type.

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

Modified: head/usr.bin/truss/syscalls.c
==
--- head/usr.bin/truss/syscalls.c   Mon Aug 17 19:06:14 2015
(r286859)
+++ head/usr.bin/truss/syscalls.c   Mon Aug 17 19:08:48 2015
(r286860)
@@ -555,6 +555,11 @@ static struct xlat linux_socketcall_ops[
XEND
 };
 
+static struct xlat sigprocmask_ops[] = {
+   X(SIG_BLOCK) X(SIG_UNBLOCK) X(SIG_SETMASK)
+   XEND
+};
+
 #undef X
 #undef XEND
 
@@ -1096,15 +1101,7 @@ print_arg(struct syscall_args *sc, unsig
break;
}
case Sigprocmask: {
-   switch (args[sc->offset]) {
-#defineS(a)case a: tmp = strdup(#a); break;
-   S(SIG_BLOCK);
-   S(SIG_UNBLOCK);
-   S(SIG_SETMASK);
-#undef S
-   }
-   if (tmp == NULL)
-   asprintf(&tmp, "0x%lx", args[sc->offset]);
+   tmp = strdup(xlookup(sigprocmask_ops, args[sc->offset]));
break;
}
case Fcntlflag: {
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r286862 - head/sys/netpfil/pf

2015-08-17 Thread Luiz Otavio O Souza
Author: loos
Date: Mon Aug 17 23:03:54 2015
New Revision: 286862
URL: https://svnweb.freebsd.org/changeset/base/286862

Log:
  Fix the copy of addresses passed from userland in table replace command.
  
  The size2 is the maximum userland buffer size (used when the addresses are
  copied back to userland).
  
  Obtained from:pfSense
  MFC after:3 days
  Sponsored by: Rubicon Communications (Netgate)

Modified:
  head/sys/netpfil/pf/pf_ioctl.c

Modified: head/sys/netpfil/pf/pf_ioctl.c
==
--- head/sys/netpfil/pf/pf_ioctl.c  Mon Aug 17 21:07:21 2015
(r286861)
+++ head/sys/netpfil/pf/pf_ioctl.c  Mon Aug 17 23:03:54 2015
(r286862)
@@ -2724,8 +2724,7 @@ DIOCCHANGEADDR_error:
error = ENODEV;
break;
}
-   totlen = (io->pfrio_size + io->pfrio_size2) *
-   sizeof(struct pfr_addr);
+   totlen = io->pfrio_size * sizeof(struct pfr_addr);
pfras = malloc(totlen, M_TEMP, M_WAITOK);
error = copyin(io->pfrio_buffer, pfras, totlen);
if (error) {
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r286863 - in head/lib: libc/tests/sys libproc/tests libutil/tests

2015-08-17 Thread Ed Maste
Author: emaste
Date: Mon Aug 17 23:19:36 2015
New Revision: 286863
URL: https://svnweb.freebsd.org/changeset/base/286863

Log:
  On arm64 disable three tests that hang or panic
  
  Each issue has a PR open to track. This workaround allows us to run the
  tests to investigate the failures and avoid any new regressions.
  
  PR:   202304, 202305, 202307
  Reviewed by:  ngie
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D3378

Modified:
  head/lib/libc/tests/sys/Makefile
  head/lib/libproc/tests/proc_test.c
  head/lib/libutil/tests/Makefile

Modified: head/lib/libc/tests/sys/Makefile
==
--- head/lib/libc/tests/sys/MakefileMon Aug 17 23:03:54 2015
(r286862)
+++ head/lib/libc/tests/sys/MakefileMon Aug 17 23:19:36 2015
(r286863)
@@ -25,7 +25,10 @@ NETBSD_ATF_TESTS_C+= kevent_test
 NETBSD_ATF_TESTS_C+=   kill_test
 NETBSD_ATF_TESTS_C+=   link_test
 NETBSD_ATF_TESTS_C+=   listen_test
+# On arm64 triggers panic ARM64TODO: pmap_mincore (PR202307).
+.if ${MACHINE_CPUARCH} != "aarch64"
 NETBSD_ATF_TESTS_C+=   mincore_test
+.endif
 NETBSD_ATF_TESTS_C+=   mkdir_test
 NETBSD_ATF_TESTS_C+=   mkfifo_test
 NETBSD_ATF_TESTS_C+=   mknod_test

Modified: head/lib/libproc/tests/proc_test.c
==
--- head/lib/libproc/tests/proc_test.c  Mon Aug 17 23:03:54 2015
(r286862)
+++ head/lib/libproc/tests/proc_test.c  Mon Aug 17 23:19:36 2015
(r286863)
@@ -40,7 +40,9 @@ __FBSDID("$FreeBSD$");
 #include 
 
 static const char *aout_object = "a.out";
+#if !defined(__aarch64__)
 static const char *ldelf_object = "ld-elf.so.1";
+#endif
 static const char *target_prog_file = "target_prog";
 
 /*
@@ -75,6 +77,7 @@ start_prog(const struct atf_tc *tc, bool
return (phdl);
 }
 
+#if !defined(__aarch64__)
 static void
 set_bkpt(struct proc_handle *phdl, uintptr_t addr, u_long *saved)
 {
@@ -151,6 +154,7 @@ verify_bkpt(struct proc_handle *phdl, GE
ATF_REQUIRE_EQ_MSG(strcmp(mapname, mapbname), 0,
"expected map name '%s' doesn't match '%s'", mapname, mapbname);
 }
+#endif
 
 ATF_TC(map_alias_obj2map);
 ATF_TC_HEAD(map_alias_obj2map, tc)
@@ -255,6 +259,7 @@ ATF_TC_BODY(map_alias_name2sym, tc)
proc_free(phdl);
 }
 
+#if !defined(__aarch64__)
 ATF_TC(symbol_lookup);
 ATF_TC_HEAD(symbol_lookup, tc)
 {
@@ -331,6 +336,7 @@ ATF_TC_BODY(symbol_lookup_fail, tc)
 
proc_free(phdl);
 }
+#endif
 
 ATF_TC(signal_forward);
 ATF_TC_HEAD(signal_forward, tc)
@@ -379,8 +385,11 @@ ATF_TP_ADD_TCS(tp)
ATF_TP_ADD_TC(tp, map_alias_obj2map);
ATF_TP_ADD_TC(tp, map_alias_name2map);
ATF_TP_ADD_TC(tp, map_alias_name2sym);
+/* On arm64 triggers panic ARM64TODO: pmap_sync_icache (PR202305). */
+#if !defined(__aarch64__)
ATF_TP_ADD_TC(tp, symbol_lookup);
ATF_TP_ADD_TC(tp, symbol_lookup_fail);
+#endif
ATF_TP_ADD_TC(tp, signal_forward);
 
return (atf_no_error());

Modified: head/lib/libutil/tests/Makefile
==
--- head/lib/libutil/tests/Makefile Mon Aug 17 23:03:54 2015
(r286862)
+++ head/lib/libutil/tests/Makefile Mon Aug 17 23:19:36 2015
(r286863)
@@ -5,7 +5,9 @@ TESTSDIR=   ${TESTSBASE}/lib/libutil
 TAP_TESTS_C+=  flopen_test
 TAP_TESTS_C+=  grp_test
 TAP_TESTS_C+=  humanize_number_test
+.if ${MACHINE_CPUARCH} != "aarch64" # PR202304: pidfile_test hangs on arm64
 TAP_TESTS_C+=  pidfile_test
+.endif
 TAP_TESTS_C+=  trimdomain_test
 TAP_TESTS_C+=  trimdomain-nodomain_test
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r286864 - head/sys/dev/iwn

2015-08-17 Thread Adrian Chadd
Author: adrian
Date: Mon Aug 17 23:35:31 2015
New Revision: 286864
URL: https://svnweb.freebsd.org/changeset/base/286864

Log:
  Migrate ifp->if_softc -> ic->ic_softc.
  
  Tested:
  
  * Lenovo T400 (Intel 5300)
  * make universe

Modified:
  head/sys/dev/iwn/if_iwn.c

Modified: head/sys/dev/iwn/if_iwn.c
==
--- head/sys/dev/iwn/if_iwn.c   Mon Aug 17 23:19:36 2015(r286863)
+++ head/sys/dev/iwn/if_iwn.c   Mon Aug 17 23:35:31 2015(r286864)
@@ -4922,7 +4922,7 @@ iwn_raw_xmit(struct ieee80211_node *ni, 
 {
struct ieee80211com *ic = ni->ni_ic;
struct ifnet *ifp = ic->ic_ifp;
-   struct iwn_softc *sc = ifp->if_softc;
+   struct iwn_softc *sc = ic->ic_softc;
int error = 0;
 
DPRINTF(sc, IWN_DEBUG_XMIT | IWN_DEBUG_TRACE, "->%s begin\n", __func__);
@@ -5057,8 +5057,8 @@ iwn_watchdog(void *arg)
 static int
 iwn_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
 {
-   struct iwn_softc *sc = ifp->if_softc;
struct ieee80211com *ic = ifp->if_l2com;
+   struct iwn_softc *sc = ic->ic_softc;
struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps);
struct ifreq *ifr = (struct ifreq *) data;
int error = 0, startall = 0, stop = 0;
@@ -8872,8 +8872,7 @@ iwn_stop(struct iwn_softc *sc)
 static void
 iwn_scan_start(struct ieee80211com *ic)
 {
-   struct ifnet *ifp = ic->ic_ifp;
-   struct iwn_softc *sc = ifp->if_softc;
+   struct iwn_softc *sc = ic->ic_softc;
 
IWN_LOCK(sc);
/* make the link LED blink while we're scanning */
@@ -8887,8 +8886,7 @@ iwn_scan_start(struct ieee80211com *ic)
 static void
 iwn_scan_end(struct ieee80211com *ic)
 {
-   struct ifnet *ifp = ic->ic_ifp;
-   struct iwn_softc *sc = ifp->if_softc;
+   struct iwn_softc *sc = ic->ic_softc;
struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps);
 
IWN_LOCK(sc);
@@ -8906,8 +8904,7 @@ static void
 iwn_set_channel(struct ieee80211com *ic)
 {
const struct ieee80211_channel *c = ic->ic_curchan;
-   struct ifnet *ifp = ic->ic_ifp;
-   struct iwn_softc *sc = ifp->if_softc;
+   struct iwn_softc *sc = ic->ic_softc;
int error;
 
DPRINTF(sc, IWN_DEBUG_TRACE, "->Doing %s\n", __func__);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r286865 - in head/sys/dev: bwi bwn ipw iwm wi wpi

2015-08-17 Thread Adrian Chadd
Author: adrian
Date: Mon Aug 17 23:44:38 2015
New Revision: 286865
URL: https://svnweb.freebsd.org/changeset/base/286865

Log:
  Convert more ifp->if_softc -> ic->ic_softc.
  
  These should be a big no-op.
  
  Tested:
  
  * make universe

Modified:
  head/sys/dev/bwi/if_bwi.c
  head/sys/dev/bwn/if_bwn.c
  head/sys/dev/ipw/if_ipw.c
  head/sys/dev/iwm/if_iwm.c
  head/sys/dev/wi/if_wi.c
  head/sys/dev/wpi/if_wpi.c

Modified: head/sys/dev/bwi/if_bwi.c
==
--- head/sys/dev/bwi/if_bwi.c   Mon Aug 17 23:35:31 2015(r286864)
+++ head/sys/dev/bwi/if_bwi.c   Mon Aug 17 23:44:38 2015(r286865)
@@ -1444,7 +1444,7 @@ bwi_raw_xmit(struct ieee80211_node *ni, 
 {
struct ieee80211com *ic = ni->ni_ic;
struct ifnet *ifp = ic->ic_ifp;
-   struct bwi_softc *sc = ifp->if_softc;
+   struct bwi_softc *sc = ic->ic_softc;
/* XXX wme? */
struct bwi_txbuf_data *tbd = &sc->sc_tx_bdata[BWI_TX_DATA_RING];
int idx, error;
@@ -1728,7 +1728,7 @@ bwi_intr(void *xsc)
 static void
 bwi_scan_start(struct ieee80211com *ic)
 {
-   struct bwi_softc *sc = ic->ic_ifp->if_softc;
+   struct bwi_softc *sc = ic->ic_softc;
 
BWI_LOCK(sc);
/* Enable MAC beacon promiscuity */
@@ -1739,7 +1739,7 @@ bwi_scan_start(struct ieee80211com *ic)
 static void
 bwi_set_channel(struct ieee80211com *ic)
 {
-   struct bwi_softc *sc = ic->ic_ifp->if_softc;
+   struct bwi_softc *sc = ic->ic_softc;
struct ieee80211_channel *c = ic->ic_curchan;
struct bwi_mac *mac;
 
@@ -1765,7 +1765,7 @@ bwi_set_channel(struct ieee80211com *ic)
 static void
 bwi_scan_end(struct ieee80211com *ic)
 {
-   struct bwi_softc *sc = ic->ic_ifp->if_softc;
+   struct bwi_softc *sc = ic->ic_softc;
 
BWI_LOCK(sc);
CSR_CLRBITS_4(sc, BWI_MAC_STATUS, BWI_MAC_STATUS_PASS_BCN);
@@ -1776,10 +1776,9 @@ static int
 bwi_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg)
 {
struct bwi_vap *bvp = BWI_VAP(vap);
-   struct ieee80211com *ic= vap->iv_ic;
-   struct ifnet *ifp = ic->ic_ifp;
+   struct ieee80211com *ic = vap->iv_ic;
enum ieee80211_state ostate = vap->iv_state;
-   struct bwi_softc *sc = ifp->if_softc;
+   struct bwi_softc *sc = ic->ic_softc;
struct bwi_mac *mac;
int error;
 

Modified: head/sys/dev/bwn/if_bwn.c
==
--- head/sys/dev/bwn/if_bwn.c   Mon Aug 17 23:35:31 2015(r286864)
+++ head/sys/dev/bwn/if_bwn.c   Mon Aug 17 23:44:38 2015(r286865)
@@ -2736,7 +2736,7 @@ bwn_raw_xmit(struct ieee80211_node *ni, 
 {
struct ieee80211com *ic = ni->ni_ic;
struct ifnet *ifp = ic->ic_ifp;
-   struct bwn_softc *sc = ifp->if_softc;
+   struct bwn_softc *sc = ic->ic_softc;
struct bwn_mac *mac = sc->sc_curmac;
 
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 ||
@@ -2817,7 +2817,7 @@ bwn_update_promisc(struct ieee80211com *
 static int
 bwn_wme_update(struct ieee80211com *ic)
 {
-   struct bwn_softc *sc = ic->ic_ifp->if_softc;
+   struct bwn_softc *sc = ic->ic_softc;
struct bwn_mac *mac = sc->sc_curmac;
struct wmeParams *wmep;
int i;
@@ -2839,8 +2839,7 @@ bwn_wme_update(struct ieee80211com *ic)
 static void
 bwn_scan_start(struct ieee80211com *ic)
 {
-   struct ifnet *ifp = ic->ic_ifp;
-   struct bwn_softc *sc = ifp->if_softc;
+   struct bwn_softc *sc = ic->ic_softc;
struct bwn_mac *mac;
 
BWN_LOCK(sc);
@@ -2857,8 +2856,7 @@ bwn_scan_start(struct ieee80211com *ic)
 static void
 bwn_scan_end(struct ieee80211com *ic)
 {
-   struct ifnet *ifp = ic->ic_ifp;
-   struct bwn_softc *sc = ifp->if_softc;
+   struct bwn_softc *sc = ic->ic_softc;
struct bwn_mac *mac;
 
BWN_LOCK(sc);
@@ -2874,8 +2872,7 @@ bwn_scan_end(struct ieee80211com *ic)
 static void
 bwn_set_channel(struct ieee80211com *ic)
 {
-   struct ifnet *ifp = ic->ic_ifp;
-   struct bwn_softc *sc = ifp->if_softc;
+   struct bwn_softc *sc = ic->ic_softc;
struct bwn_mac *mac = sc->sc_curmac;
struct bwn_phy *phy = &mac->mac_phy;
int chan, error;
@@ -2933,8 +2930,7 @@ bwn_vap_create(struct ieee80211com *ic, 
 const uint8_t bssid[IEEE80211_ADDR_LEN],
 const uint8_t mac0[IEEE80211_ADDR_LEN])
 {
-   struct ifnet *ifp = ic->ic_ifp;
-   struct bwn_softc *sc = ifp->if_softc;
+   struct bwn_softc *sc = ic->ic_softc;
struct ieee80211vap *vap;
struct bwn_vap *bvp;
uint8_t mac[IEEE80211_ADDR_LEN];
@@ -8331,7 +8327,7 @@ bwn_newstate(struct ieee80211vap *vap, e
struct ieee80211com *ic= vap->iv_ic;
struct ifnet *ifp = ic->ic_ifp;
enum ieee80211_state ostate = vap->iv_state;
-   struct bwn_softc *sc = ifp->if_softc;
+   struct bwn_softc *sc = ic->ic_softc;
struct bwn_mac 

svn commit: r286866 - in head: contrib/jemalloc contrib/jemalloc/doc contrib/jemalloc/include/jemalloc contrib/jemalloc/include/jemalloc/internal contrib/jemalloc/src include lib/libc/gen lib/libc/...

2015-08-17 Thread Jason Evans
Author: jasone
Date: Tue Aug 18 00:21:25 2015
New Revision: 286866
URL: https://svnweb.freebsd.org/changeset/base/286866

Log:
  Update jemalloc to version 4.0.0.

Added:
  head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_decls.h   
(contents, props changed)
  head/contrib/jemalloc/include/jemalloc/internal/pages.h   (contents, props 
changed)
  head/contrib/jemalloc/include/jemalloc/internal/valgrind.h   (contents, props 
changed)
  head/contrib/jemalloc/include/jemalloc/jemalloc_typedefs.h   (contents, props 
changed)
  head/contrib/jemalloc/src/pages.c   (contents, props changed)
Modified:
  head/contrib/jemalloc/COPYING
  head/contrib/jemalloc/ChangeLog
  head/contrib/jemalloc/FREEBSD-Xlist
  head/contrib/jemalloc/FREEBSD-diffs
  head/contrib/jemalloc/FREEBSD-upgrade
  head/contrib/jemalloc/VERSION
  head/contrib/jemalloc/doc/jemalloc.3
  head/contrib/jemalloc/include/jemalloc/internal/arena.h
  head/contrib/jemalloc/include/jemalloc/internal/atomic.h
  head/contrib/jemalloc/include/jemalloc/internal/base.h
  head/contrib/jemalloc/include/jemalloc/internal/bitmap.h
  head/contrib/jemalloc/include/jemalloc/internal/chunk.h
  head/contrib/jemalloc/include/jemalloc/internal/chunk_dss.h
  head/contrib/jemalloc/include/jemalloc/internal/chunk_mmap.h
  head/contrib/jemalloc/include/jemalloc/internal/ckh.h
  head/contrib/jemalloc/include/jemalloc/internal/ctl.h
  head/contrib/jemalloc/include/jemalloc/internal/extent.h
  head/contrib/jemalloc/include/jemalloc/internal/hash.h
  head/contrib/jemalloc/include/jemalloc/internal/huge.h
  head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal.h
  head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h
  head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_macros.h
  head/contrib/jemalloc/include/jemalloc/internal/mutex.h
  head/contrib/jemalloc/include/jemalloc/internal/private_namespace.h
  head/contrib/jemalloc/include/jemalloc/internal/prng.h
  head/contrib/jemalloc/include/jemalloc/internal/prof.h
  head/contrib/jemalloc/include/jemalloc/internal/public_namespace.h
  head/contrib/jemalloc/include/jemalloc/internal/ql.h
  head/contrib/jemalloc/include/jemalloc/internal/qr.h
  head/contrib/jemalloc/include/jemalloc/internal/quarantine.h
  head/contrib/jemalloc/include/jemalloc/internal/rb.h
  head/contrib/jemalloc/include/jemalloc/internal/rtree.h
  head/contrib/jemalloc/include/jemalloc/internal/size_classes.h
  head/contrib/jemalloc/include/jemalloc/internal/stats.h
  head/contrib/jemalloc/include/jemalloc/internal/tcache.h
  head/contrib/jemalloc/include/jemalloc/internal/tsd.h
  head/contrib/jemalloc/include/jemalloc/internal/util.h
  head/contrib/jemalloc/include/jemalloc/jemalloc.h
  head/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h
  head/contrib/jemalloc/src/arena.c
  head/contrib/jemalloc/src/base.c
  head/contrib/jemalloc/src/bitmap.c
  head/contrib/jemalloc/src/chunk.c
  head/contrib/jemalloc/src/chunk_dss.c
  head/contrib/jemalloc/src/chunk_mmap.c
  head/contrib/jemalloc/src/ckh.c
  head/contrib/jemalloc/src/ctl.c
  head/contrib/jemalloc/src/extent.c
  head/contrib/jemalloc/src/huge.c
  head/contrib/jemalloc/src/jemalloc.c
  head/contrib/jemalloc/src/mutex.c
  head/contrib/jemalloc/src/prof.c
  head/contrib/jemalloc/src/quarantine.c
  head/contrib/jemalloc/src/rtree.c
  head/contrib/jemalloc/src/stats.c
  head/contrib/jemalloc/src/tcache.c
  head/contrib/jemalloc/src/tsd.c
  head/contrib/jemalloc/src/util.c
  head/include/malloc_np.h
  head/lib/libc/gen/tls.c
  head/lib/libc/stdlib/jemalloc/Makefile.inc

Modified: head/contrib/jemalloc/COPYING
==
--- head/contrib/jemalloc/COPYING   Mon Aug 17 23:44:38 2015
(r286865)
+++ head/contrib/jemalloc/COPYING   Tue Aug 18 00:21:25 2015
(r286866)
@@ -1,10 +1,10 @@
 Unless otherwise specified, files in the jemalloc source distribution are
 subject to the following license:
 

-Copyright (C) 2002-2014 Jason Evans .
+Copyright (C) 2002-2015 Jason Evans .
 All rights reserved.
 Copyright (C) 2007-2012 Mozilla Foundation.  All rights reserved.
-Copyright (C) 2009-2014 Facebook, Inc.  All rights reserved.
+Copyright (C) 2009-2015 Facebook, Inc.  All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:

Modified: head/contrib/jemalloc/ChangeLog
==
--- head/contrib/jemalloc/ChangeLog Mon Aug 17 23:44:38 2015
(r286865)
+++ head/contrib/jemalloc/ChangeLog Tue Aug 18 00:21:25 2015
(r286866)
@@ -1,10 +1,166 @@
 Following are change highlights associated with official releases.  Important
-bug fixes are all mentioned, but internal enhancements are omitted here for
-brevity (ev

svn commit: r286867 - in head/sys/dev/vt: . hw/fb

2015-08-17 Thread Marcel Moolenaar
Author: marcel
Date: Tue Aug 18 00:47:02 2015
New Revision: 286867
URL: https://svnweb.freebsd.org/changeset/base/286867

Log:
  Support frame buffers that are larger than the default screen
  size as defined by VT_FB_DEFAULT_WIDTH and VT_FB_DEFAULT_HEIGHT
  (at this time 2048x1200). The default is really a max. We cap
  the height and width to those defaults and position the screen
  in the center of the frame buffer.
  
  Ideally we use a bigger font to utility the entire real estate
  that is the frame buffer, but that's seen as an improvement over
  making it work first.
  
  PR:   193745

Modified:
  head/sys/dev/vt/hw/fb/vt_fb.c
  head/sys/dev/vt/vt.h

Modified: head/sys/dev/vt/hw/fb/vt_fb.c
==
--- head/sys/dev/vt/hw/fb/vt_fb.c   Tue Aug 18 00:21:25 2015
(r286866)
+++ head/sys/dev/vt/hw/fb/vt_fb.c   Tue Aug 18 00:47:02 2015
(r286867)
@@ -294,6 +294,7 @@ vt_fb_bitblt_bitmap(struct vt_device *vd
if (mask != NULL && (mask[byte] & bit) == 0)
continue;
o = (y + yi) * info->fb_stride + (x + xi) * bpp;
+   o += vd->vd_transpose;
cc = pattern[byte] & bit ? fgc : bgc;
 
switch(bpp) {
@@ -411,11 +412,16 @@ int
 vt_fb_init(struct vt_device *vd)
 {
struct fb_info *info;
+   u_int margin;
int err;
 
info = vd->vd_softc;
-   vd->vd_height = info->fb_height;
-   vd->vd_width = info->fb_width;
+   vd->vd_height = MIN(VT_FB_DEFAULT_HEIGHT, info->fb_height);
+   margin = (info->fb_height - vd->vd_height) >> 1;
+   vd->vd_transpose = margin * info->fb_stride;
+   vd->vd_width = MIN(VT_FB_DEFAULT_WIDTH, info->fb_width);
+   margin = (info->fb_width - vd->vd_width) >> 1;
+   vd->vd_transpose += margin * (info->fb_bpp / NBBY);
vd->vd_video_dev = info->fb_video_dev;
 
if (info->fb_size == 0)

Modified: head/sys/dev/vt/vt.h
==
--- head/sys/dev/vt/vt.hTue Aug 18 00:21:25 2015(r286866)
+++ head/sys/dev/vt/vt.hTue Aug 18 00:47:02 2015(r286867)
@@ -140,6 +140,7 @@ struct vt_device {
uint32_t vd_mstate; /* (?) Mouse state. */
vt_axis_tvd_width;  /* (?) Screen width. */
vt_axis_tvd_height; /* (?) Screen height. */
+   size_t   vd_transpose;  /* (?) Screen offset in FB */
struct mtx   vd_lock;   /* Per-device lock. */
struct cvvd_winswitch;  /* (d) Window switch notify. */
struct callout   vd_timer;  /* (d) Display timer. */
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r286866 - in head: contrib/jemalloc contrib/jemalloc/doc contrib/jemalloc/include/jemalloc contrib/jemalloc/include/jemalloc/internal contrib/jemalloc/src include lib/libc/gen lib/libc

2015-08-17 Thread NGie Cooper
On Mon, Aug 17, 2015 at 5:21 PM, Jason Evans  wrote:
> Author: jasone
> Date: Tue Aug 18 00:21:25 2015
> New Revision: 286866
> URL: https://svnweb.freebsd.org/changeset/base/286866
>
> Log:
>   Update jemalloc to version 4.0.0.

Relnotes: yes!

Also, is there a summary of the changes that can be provided here, or
should the reader get this information from the ChangeLog?

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


svn commit: r286868 - head/sys/amd64/amd64

2015-08-17 Thread Marcel Moolenaar
Author: marcel
Date: Tue Aug 18 01:53:41 2015
New Revision: 286868
URL: https://svnweb.freebsd.org/changeset/base/286868

Log:
  Add 24 more page table pages we allocate on boot-up. 16MB slop
  is a little tight in and by itself, but severily insufficient
  when one needs to map a large frame buffer as part of console
  initialization. 64MB slop should be enough for a while. As an
  example: a 15" MacBook Pro with retina display needs ~28MB of
  KVA for the frame buffer.
  
  PR:   193745

Modified:
  head/sys/amd64/amd64/pmap.c

Modified: head/sys/amd64/amd64/pmap.c
==
--- head/sys/amd64/amd64/pmap.c Tue Aug 18 00:47:02 2015(r286867)
+++ head/sys/amd64/amd64/pmap.c Tue Aug 18 01:53:41 2015(r286868)
@@ -699,8 +699,14 @@ nkpt_init(vm_paddr_t addr)
 * pmap_growkernel() will need to allocate page table pages to map
 * the entire 512GB of KVA space which is an unnecessary tax on
 * physical memory.
+*
+* Secondly, device memory mapped as part of setting up the low-
+* level console(s) is taken from KVA, starting at virtual_avail.
+* This is because cninit() is called after pmap_bootstrap() but
+* before vm_init() and pmap_init(). 20MB for a frame buffer is
+* not uncommon.
 */
-   pt_pages += 8;  /* 16MB additional slop for kernel modules */
+   pt_pages += 32; /* 64MB additional slop. */
 #endif
nkpt = pt_pages;
 }
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r286866 - in head: contrib/jemalloc contrib/jemalloc/doc contrib/jemalloc/include/jemalloc contrib/jemalloc/include/jemalloc/internal contrib/jemalloc/src include lib/libc/gen lib/libc

2015-08-17 Thread Jan Beich
Jason Evans  writes:

> Author: jasone
> Date: Tue Aug 18 00:21:25 2015
> New Revision: 286866
> URL: https://svnweb.freebsd.org/changeset/base/286866
>
> Log:
>   Update jemalloc to version 4.0.0.

Can you bump __FreeBSD_version for non-standard API changes? Some ports
like www/firefox may want to take advantage of it without complicating
configure scripts.

> +  - Add sdallocx(), which implements sized deallocation.  The primary
> +optimization over dallocx() is the removal of a metadata read, which 
> often
> +suffers an L1 cache miss.
[...]
>+  - Remove the *allocm() API, which is superseded by the *allocx() API.

Symbol.map and manpages haven't been updated.

  $ nm -D /lib/libc.so.7 | fgrep sdalloc

Index: lib/libc/stdlib/jemalloc/Makefile.inc
===
--- lib/libc/stdlib/jemalloc/Makefile.inc   (revision 285602)
+++ lib/libc/stdlib/jemalloc/Makefile.inc   (working copy)
@@ -39,12 +39,8 @@ MLINKS+= \
jemalloc.3 xallocx.3 \
jemalloc.3 sallocx.3 \
jemalloc.3 dallocx.3 \
+   jemalloc.3 sdallocx.3 \
jemalloc.3 nallocx.3 \
-   jemalloc.3 allocm.3 \
-   jemalloc.3 rallocm.3 \
-   jemalloc.3 sallocm.3 \
-   jemalloc.3 dallocm.3 \
-   jemalloc.3 nallocm.3 \
jemalloc.3 malloc.conf.5
 
 .if defined(MALLOC_PRODUCTION)
Index: lib/libc/stdlib/jemalloc/Symbol.map
===
--- lib/libc/stdlib/jemalloc/Symbol.map (revision 285602)
+++ lib/libc/stdlib/jemalloc/Symbol.map (working copy)
@@ -51,6 +51,11 @@ FBSD_1.3 {
__nallocm;
 };
 
+FBSD_1.4 {
+   sdallocx;
+   __sdallocx;
+};
+
 FBSDprivate_1.0 {
_malloc_thread_cleanup;
_malloc_prefork;


signature.asc
Description: PGP signature


svn commit: r286869 - head/sys/netinet

2015-08-17 Thread Alexander V. Chernikov
Author: melifaro
Date: Tue Aug 18 06:16:19 2015
New Revision: 286869
URL: https://svnweb.freebsd.org/changeset/base/286869

Log:
  Fix panic when handling non-inet arp message introduced in r286825.
  
  Submitted by: delphij

Modified:
  head/sys/netinet/if_ether.c

Modified: head/sys/netinet/if_ether.c
==
--- head/sys/netinet/if_ether.c Tue Aug 18 01:53:41 2015(r286868)
+++ head/sys/netinet/if_ether.c Tue Aug 18 06:16:19 2015(r286869)
@@ -749,7 +749,6 @@ match:
}
 
if (ifp->if_addrlen != ah->ar_hln) {
-   LLE_WUNLOCK(la);
ARP_LOG(LOG_WARNING, "from %*D: addr len: new %d, "
"i/f %d (ignored)\n", ifp->if_addrlen,
(u_char *) ar_sha(ah), ":", ah->ar_hln,
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r286870 - in head/contrib/jemalloc: . include/jemalloc/internal

2015-08-17 Thread Jason Evans
Author: jasone
Date: Tue Aug 18 06:28:37 2015
New Revision: 286870
URL: https://svnweb.freebsd.org/changeset/base/286870

Log:
  Add jemalloc support for 8 KiB, 16 KiB, and 64 KiB pages.

Modified:
  head/contrib/jemalloc/FREEBSD-upgrade
  head/contrib/jemalloc/include/jemalloc/internal/size_classes.h

Modified: head/contrib/jemalloc/FREEBSD-upgrade
==
--- head/contrib/jemalloc/FREEBSD-upgrade   Tue Aug 18 06:16:19 2015
(r286869)
+++ head/contrib/jemalloc/FREEBSD-upgrade   Tue Aug 18 06:28:37 2015
(r286870)
@@ -74,7 +74,7 @@ do_extract() {
 # Generate various files.
 ./autogen.sh --enable-cc-silence --enable-dss --enable-xmalloc \
   --enable-utrace --with-xslroot=/usr/local/share/xsl/docbook \
-  --with-private-namespace=__
+  --with-private-namespace=__ --with-lg-page-sizes=12,13,14,16
 gmake dist
   )
 }

Modified: head/contrib/jemalloc/include/jemalloc/internal/size_classes.h
==
--- head/contrib/jemalloc/include/jemalloc/internal/size_classes.h  Tue Aug 
18 06:16:19 2015(r286869)
+++ head/contrib/jemalloc/include/jemalloc/internal/size_classes.h  Tue Aug 
18 06:28:37 2015(r286870)
@@ -182,305 +182,313 @@
 #defineLG_LARGE_MINCLASS   14
 #endif
 
-#if (LG_SIZEOF_PTR == 2 && LG_TINY_MIN == 3 && LG_QUANTUM == 4 && LG_PAGE == 
12)
+#if (LG_SIZEOF_PTR == 2 && LG_TINY_MIN == 3 && LG_QUANTUM == 3 && LG_PAGE == 
13)
 #defineSIZE_CLASSES \
   /* index, lg_grp, lg_delta, ndelta, bin, lg_delta_lookup */ \
 SC(  0,  3,3,  0, yes,  3) \
-   \
 SC(  1,  3,3,  1, yes,  3) \
-SC(  2,  4,4,  1, yes,  4) \
-SC(  3,  4,4,  2, yes,  4) \
-SC(  4,  4,4,  3, yes,  4) \
+SC(  2,  3,3,  2, yes,  3) \
+SC(  3,  3,3,  3, yes,  3) \
\
-SC(  5,  6,4,  1, yes,  4) \
-SC(  6,  6,4,  2, yes,  4) \
-SC(  7,  6,4,  3, yes,  4) \
-SC(  8,  6,4,  4, yes,  4) \
+SC(  4,  5,3,  1, yes,  3) \
+SC(  5,  5,3,  2, yes,  3) \
+SC(  6,  5,3,  3, yes,  3) \
+SC(  7,  5,3,  4, yes,  3) \
\
-SC(  9,  7,5,  1, yes,  5) \
-SC( 10,  7,5,  2, yes,  5) \
-SC( 11,  7,5,  3, yes,  5) \
-SC( 12,  7,5,  4, yes,  5) \
+SC(  8,  6,4,  1, yes,  4) \
+SC(  9,  6,4,  2, yes,  4) \
+SC( 10,  6,4,  3, yes,  4) \
+SC( 11,  6,4,  4, yes,  4) \
\
-SC( 13,  8,6,  1, yes,  6) \
-SC( 14,  8,6,  2, yes,  6) \
-SC( 15,  8,6,  3, yes,  6) \
-SC( 16,  8,6,  4, yes,  6) \
+SC( 12,  7,5,  1, yes,  5) \
+SC( 13,  7,5,  2, yes,  5) \
+SC( 14,  7,5,  3, yes,  5) \
+SC( 15,  7,5,  4, yes,  5) \
\
-SC( 17,  9,7,  1, yes,  7) \
-SC( 18,  9,7,  2, yes,  7) \
-SC( 19,  9,7,  3, yes,  7) \
-SC( 20,  9,7,  4, yes,  7) \
+SC( 16,  8,6,  1, yes,  6) \
+SC( 17,  8,6,  2, yes,  6) \
+SC( 18,  8,6,  3, yes,  6) \
+SC( 19,  8,6,  4, yes,  6) \
\
-SC( 21, 10,8,  1, yes,  8) \
-SC( 22, 10,8,  2, yes,  8) \
-SC( 23, 10,8,  3, yes,  8) \
-SC( 24, 10,8,  4, yes,  8) \
+SC( 20,  9,7,  1, yes,  7) \
+SC( 21,  9,7,  2, yes,  7) \
+SC( 22,  9,7,  3, yes,  7) \
+SC( 23,  9,7,  4, yes,  7) \
\
-SC( 25, 11,9,  1, yes,  9) \
-SC( 26, 11,9,  2, yes,  9) \
-SC( 27, 11,9,  3, yes,  9) \
-SC( 28, 11,9,  4, yes,  9) \
+SC( 24, 10,8,  1, yes,  8) \
+SC( 25, 10,8,  2, yes,  8) \
+SC( 26, 10,8,  3, yes,  8) \
+SC( 27, 10,8,  4, yes,  8) \
\
-SC( 29, 12,   10,  1, yes, no) \
-SC( 30, 12,   10,  2, yes, no) \
-SC( 31, 12,   10,  3, yes, no) \
-SC( 32, 12,   10,