Re: svn commit: r288966 - head/share/mk

2015-10-06 Thread Garrett Cooper

> On Oct 6, 2015, at 17:46, Bryan Drewery  wrote:

...

> I think we can use DPSRCS as well for this.

If it's something that needs to build before depend, yes.
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: r288975 - head/sys/dev/otus

2015-10-06 Thread Kevin Lo
Author: kevlo
Date: Wed Oct  7 03:33:25 2015
New Revision: 288975
URL: https://svnweb.freebsd.org/changeset/base/288975

Log:
  Declare odata as a pointer type instead of a pointer to pointer.
  
  Reviewed by:  adrian

Modified:
  head/sys/dev/otus/if_otusreg.h

Modified: head/sys/dev/otus/if_otusreg.h
==
--- head/sys/dev/otus/if_otusreg.h  Wed Oct  7 02:13:02 2015
(r288974)
+++ head/sys/dev/otus/if_otusreg.h  Wed Oct  7 03:33:25 2015
(r288975)
@@ -874,7 +874,7 @@ struct otus_softc;
 struct otus_tx_cmd {
uint8_t *buf;
uint16_tbuflen;
-   void *  *odata;
+   void*odata;
uint16_todatalen;
uint16_ttoken;
STAILQ_ENTRY(otus_tx_cmd)   next_cmd;
___
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: r288950 - head/usr.bin/truss

2015-10-06 Thread John Baldwin
Author: jhb
Date: Tue Oct  6 19:31:07 2015
New Revision: 288950
URL: https://svnweb.freebsd.org/changeset/base/288950

Log:
  Group the decoded system calls by ABI and sort the calls within each ABI.
  
  Reviewed by:  bdrewery
  Glanced at by:kib
  Differential Revision:https://reviews.freebsd.org/D3823

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

Modified: head/usr.bin/truss/syscalls.c
==
--- head/usr.bin/truss/syscalls.c   Tue Oct  6 19:29:05 2015
(r288949)
+++ head/usr.bin/truss/syscalls.c   Tue Oct  6 19:31:07 2015
(r288950)
@@ -90,191 +90,208 @@ __FBSDID("$FreeBSD$");
  * This should probably be in its own file, sorted alphabetically.
  */
 static struct syscall decoded_syscalls[] = {
-   { .name = "fcntl", .ret_type = 1, .nargs = 3,
- .args = { { Int, 0 }, { Fcntl, 1 }, { Fcntlflag, 2 } } },
-   { .name = "rfork", .ret_type = 1, .nargs = 1,
- .args = { { Rforkflags, 0 } } },
-   { .name = "linux_readlink", .ret_type = 1, .nargs = 3,
- .args = { { Name, 0 }, { Name | OUT, 1 }, { Int, 2 } } },
-   { .name = "linux_socketcall", .ret_type = 1, .nargs = 2,
- .args = { { Int, 0 }, { LinuxSockArgs, 1 } } },
-   { .name = "getpgid", .ret_type = 1, .nargs = 1,
- .args = { { Int, 0 } } },
-   { .name = "getsid", .ret_type = 1, .nargs = 1,
- .args = { { Int, 0 } } },
-   { .name = "readlink", .ret_type = 1, .nargs = 3,
- .args = { { Name, 0 }, { Readlinkres | OUT, 1 }, { Int, 2 } } },
-   { .name = "readlinkat", .ret_type = 1, .nargs = 4,
- .args = { { Atfd, 0 }, { Name, 1 }, { Readlinkres | OUT, 2 },
+   /* Native ABI */
+   { .name = "__getcwd", .ret_type = 1, .nargs = 2,
+ .args = { { Name | OUT, 0 }, { Int, 1 } } },
+   { .name = "_umtx_op", .ret_type = 1, .nargs = 5,
+ .args = { { Ptr, 0 }, { Umtxop, 1 }, { LongHex, 2 }, { Ptr, 3 },
+   { Ptr, 4 } } },
+   { .name = "accept", .ret_type = 1, .nargs = 3,
+ .args = { { Int, 0 }, { Sockaddr | OUT, 1 }, { Ptr | OUT, 2 } } },
+   { .name = "access", .ret_type = 1, .nargs = 2,
+ .args = { { Name | IN, 0 }, { Accessmode, 1 } } },
+   { .name = "bind", .ret_type = 1, .nargs = 3,
+ .args = { { Int, 0 }, { Sockaddr | IN, 1 }, { Int, 2 } } },
+   { .name = "bindat", .ret_type = 1, .nargs = 4,
+ .args = { { Atfd, 0 }, { Int, 1 }, { Sockaddr | IN, 2 },
{ Int, 3 } } },
-   { .name = "lseek", .ret_type = 2, .nargs = 3,
- .args = { { Int, 0 }, { QuadHex, 1 + QUAD_ALIGN },
-   { Whence, 1 + QUAD_SLOTS + QUAD_ALIGN } } },
-   { .name = "linux_lseek", .ret_type = 2, .nargs = 3,
- .args = { { Int, 0 }, { Int, 1 }, { Whence, 2 } } },
-   { .name = "mmap", .ret_type = 1, .nargs = 6,
- .args = { { Ptr, 0 }, { Int, 1 }, { Mprot, 2 }, { Mmapflags, 3 },
-   { Int, 4 }, { QuadHex, 5 + QUAD_ALIGN } } },
-   { .name = "linux_mkdir", .ret_type = 1, .nargs = 2,
- .args = { { Name | IN, 0 }, { Int, 1 } } },
-   { .name = "mprotect", .ret_type = 1, .nargs = 3,
- .args = { { Ptr, 0 }, { Int, 1 }, { Mprot, 2 } } },
-   { .name = "open", .ret_type = 1, .nargs = 3,
- .args = { { Name | IN, 0 }, { Open, 1 }, { Octal, 2 } } },
-   { .name = "openat", .ret_type = 1, .nargs = 4,
- .args = { { Atfd, 0 }, { Name | IN, 1 }, { Open, 2 },
-   { Octal, 3 } } },
-   { .name = "mkdir", .ret_type = 1, .nargs = 2,
- .args = { { Name, 0 }, { Octal, 1 } } },
-   { .name = "mkdirat", .ret_type = 1, .nargs = 3,
- .args = { { Atfd, 0 }, { Name, 1 }, { Octal, 2 } } },
-   { .name = "linux_open", .ret_type = 1, .nargs = 3,
- .args = { { Name, 0 }, { Hex, 1 }, { Octal, 2 } } },
-   { .name = "close", .ret_type = 1, .nargs = 1,
- .args = { { Int, 0 } } },
-   { .name = "link", .ret_type = 1, .nargs = 2,
- .args = { { Name, 0 }, { Name, 1 } } },
-   { .name = "linkat", .ret_type = 1, .nargs = 5,
- .args = { { Atfd, 0 }, { Name, 1 }, { Atfd, 2 }, { Name, 3 },
-   { Atflags, 4 } } },
-   { .name = "unlink", .ret_type = 1, .nargs = 1,
- .args = { { Name, 0 } } },
-   { .name = "unlinkat", .ret_type = 1, .nargs = 3,
- .args = { { Atfd, 0 }, { Name, 1 }, { Atflags, 2 } } },
+   { .name = "break", .ret_type = 1, .nargs = 1,
+ .args = { { Ptr, 0 } } },
{ .name = "chdir", .ret_type = 1, .nargs = 1,
  .args = { { Name, 0 } } },
-   { .name = "chroot", .ret_type = 1, .nargs = 1,
- .args = { { Name, 0 } } },
-   { .name = "mkfifo", .ret_type = 1, .nargs = 2,
- .args = { { Name, 0 }, { Octal, 1 } } },
-   { .name = "mkfifoat", .ret_type = 1, .nargs = 3,
- .args = { { Atfd, 0 }, { Name, 1 }, { Octal, 2 } } },

Re: svn commit: r288911 - head/share/mk

2015-10-06 Thread Bryan Drewery
On 10/6/2015 11:02 AM, Bryan Drewery wrote:
> On 10/5/2015 9:18 PM, Warner Losh wrote:
>> Author: imp
>> Date: Tue Oct  6 04:18:48 2015
>> New Revision: 288911
>> URL: https://svnweb.freebsd.org/changeset/base/288911
>>
>> Log:
>>   Previous versions of bsd.own.mk included bsd.compiler.mk
>>   only when _WITHOUT_SRCCONF wasn't defined. Restore this
>>   behavior because bsd.ports.mk depends on this in subtle
>>   ways. The compat include of bsd.compiler.mk should
>>   be removed in 12 anyway.
>>   
>>   PR:203540
>>
> 
> Perhaps the wrong place to discuss this, but I will anyhow as I don't
> think it will change.
> 
> The sys.mk change to include src.conf breaks building ports in a sub-dir
> of src. Meaning, /usr/src/ports/.  

I forgot to mention, this is actually a problem for ALL nested builds,
not just ports. We also build other things using the upstream Makefile
which is wanting to pull in .../share/mk now as well.

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r288948 - head/release/doc/en_US.ISO8859-1/relnotes

2015-10-06 Thread Glen Barber
Author: gjb
Date: Tue Oct  6 19:07:10 2015
New Revision: 288948
URL: https://svnweb.freebsd.org/changeset/base/288948

Log:
  Update the last check revision marker.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/release/doc/en_US.ISO8859-1/relnotes/article.xml

Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml
==
--- head/release/doc/en_US.ISO8859-1/relnotes/article.xml   Tue Oct  6 
19:06:34 2015(r288947)
+++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml   Tue Oct  6 
19:07:10 2015(r288948)
@@ -22,7 +22,7 @@
 
 $FreeBSD$
 
-
+
 
 
   2015
___
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: r288937 - head/release/doc/en_US.ISO8859-1/relnotes

2015-10-06 Thread Glen Barber
Author: gjb
Date: Tue Oct  6 17:42:31 2015
New Revision: 288937
URL: https://svnweb.freebsd.org/changeset/base/288937

Log:
  Document r288669, stack protector "strong" level.
  
  Help from:pfg
  Sponsored by: The FreeBSD Foundation

Modified:
  head/release/doc/en_US.ISO8859-1/relnotes/article.xml

Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml
==
--- head/release/doc/en_US.ISO8859-1/relnotes/article.xml   Tue Oct  6 
17:42:30 2015(r288936)
+++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml   Tue Oct  6 
17:42:31 2015(r288937)
@@ -796,6 +796,13 @@
evaluated when building the emulators/linux-c6 and related
ports.
+
+  The stack protector has been upgraded to
+   the "strong" level, elevating the protection against buffer
+   overflows.  While this significantly improves the security of
+   the system, extensive testing was done to ensure there are no
+   measurable side effects in performance or
+   functionality.
 
   
 
___
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: r288936 - head/release/doc/en_US.ISO8859-1/relnotes

2015-10-06 Thread Glen Barber
Author: gjb
Date: Tue Oct  6 17:42:30 2015
New Revision: 288936
URL: https://svnweb.freebsd.org/changeset/base/288936

Log:
  Document r288654, lagg(4) fec removal.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/release/doc/en_US.ISO8859-1/relnotes/article.xml

Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml
==
--- head/release/doc/en_US.ISO8859-1/relnotes/article.xml   Tue Oct  6 
17:27:22 2015(r288935)
+++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml   Tue Oct  6 
17:42:30 2015(r288936)
@@ -1251,6 +1251,10 @@
   The  driver has been updated
to support the Skylake I219 chipset.
+
+  The  driver has been updated
+   to remove support for the fec
+   protocol.
 
   
 
___
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: r288911 - head/share/mk

2015-10-06 Thread Bryan Drewery
On 10/5/2015 9:18 PM, Warner Losh wrote:
> Author: imp
> Date: Tue Oct  6 04:18:48 2015
> New Revision: 288911
> URL: https://svnweb.freebsd.org/changeset/base/288911
> 
> Log:
>   Previous versions of bsd.own.mk included bsd.compiler.mk
>   only when _WITHOUT_SRCCONF wasn't defined. Restore this
>   behavior because bsd.ports.mk depends on this in subtle
>   ways. The compat include of bsd.compiler.mk should
>   be removed in 12 anyway.
>   
>   PR: 203540
> 

Perhaps the wrong place to discuss this, but I will anyhow as I don't
think it will change.

The sys.mk change to include src.conf breaks building ports in a sub-dir
of src. Meaning, /usr/src/ports/.  The MAKESYSPATH with '.../share/mk'
finds /usr/src/share/mk and runs off with all of the src.*.mk stuff long
before the port Makefile includes bsd.port.mk, from
/usr/src/share/mk/bsd.port.mk, which has a _WITHOUT_SRCCONF= guard set
on it to avoid bsd.own.mk from including src.conf.  But because sys.mk
is already included long before this, src.conf is already included and
anything handled in sys.mk has no real way to respect _WITHOUT_SRCCONF
unless it is in the environment.

[Note that the actual inclusion of src.conf no longer has a
_WITHOUT_SRCCONF= check, but that is trivial to fix]

Why would anyone build ports in a sub-dir of src? It's convenient for a
vendor building their own product that needs their own ports tree.  Some
decisions can't easily be changed; if the root of the source code
checkout is already src/, there is no simple way to avoid the problem.

With the META_MODE changes, sjg introduced this /etc/src-env.conf file
that is included from sys.mk early, that can be used for overriding
things like MAKEOBJDIRPREFIX, enabling META_MODE (it needs to be set
extremely early for AUTO_OBJ support, among other things).

As far as I can tell, the sys.mk change to include src.conf early was
done out of convenience.  Meaning, we could remove that and just add
back a .include  or similar at the top of all src Makefiles.

I would really like to find a solution to this as it is a looming
problem for my work's build approaching in a few months. I figured out a
hack we can use locally, to set _WITHOUT_SRCCONF=, when the current
directory has "ports/" in it. That works for us, but not for other
vendors who don't realize this is coming.  Perhaps the scope of people
doing this is not large.

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r288949 - in head: sys/kern sys/sys tests/sys/kern

2015-10-06 Thread John Baldwin
Author: jhb
Date: Tue Oct  6 19:29:05 2015
New Revision: 288949
URL: https://svnweb.freebsd.org/changeset/base/288949

Log:
  Fix various edge cases related to system call tracing.
  - Always set td_dbg_sc_* when P_TRACED is set on system call entry
even if the debugger is not tracing system call entries.  This
ensures the fields are valid when reporting other stops that
occur at system call boundaries such as for PT_FOLLOW_FORKS or
when only tracing system call exits.
  - Set TDB_SCX when reporting the stop for a new child process in
fork_return().  This causes the event to be reported as a system
call exit.
  - Report a system call exit event in fork_return() for new threads in
a traced process.
  - Copy td_dbg_sc_* to new threads instead of zeroing.  This ensures
that td_dbg_sc_code in particular will report the system call that
created the new thread or process when it reports a system call
exit event in fork_return().
  - Add new ptrace tests to verify that new child processes and threads
report system call exit events with a valid pl_syscall_code via
PT_LWPINFO.
  
  Reviewed by:  kib
  Differential Revision:https://reviews.freebsd.org/D3822

Modified:
  head/sys/kern/kern_fork.c
  head/sys/kern/subr_syscall.c
  head/sys/sys/proc.h
  head/tests/sys/kern/Makefile
  head/tests/sys/kern/ptrace_test.c

Modified: head/sys/kern/kern_fork.c
==
--- head/sys/kern/kern_fork.c   Tue Oct  6 19:07:10 2015(r288948)
+++ head/sys/kern/kern_fork.c   Tue Oct  6 19:29:05 2015(r288949)
@@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1031,8 +1032,8 @@ fork_return(struct thread *td, struct tr
 {
struct proc *p, *dbg;
 
+   p = td->td_proc;
if (td->td_dbgflags & TDB_STOPATFORK) {
-   p = td->td_proc;
sx_xlock(_lock);
PROC_LOCK(p);
if ((p->p_pptr->p_flag & (P_TRACED | P_FOLLOWFORK)) ==
@@ -1049,9 +1050,9 @@ fork_return(struct thread *td, struct tr
p->p_pid, p->p_oppid);
proc_reparent(p, dbg);
sx_xunlock(_lock);
-   td->td_dbgflags |= TDB_CHILD;
+   td->td_dbgflags |= TDB_CHILD | TDB_SCX;
ptracestop(td, SIGSTOP);
-   td->td_dbgflags &= ~TDB_CHILD;
+   td->td_dbgflags &= ~(TDB_CHILD | TDB_SCX);
} else {
/*
 * ... otherwise clear the request.
@@ -1061,6 +1062,18 @@ fork_return(struct thread *td, struct tr
cv_broadcast(>p_dbgwait);
}
PROC_UNLOCK(p);
+   } else if (p->p_flag & P_TRACED) {
+   /*
+* This is the start of a new thread in a traced
+* process.  Report a system call exit event.
+*/
+   PROC_LOCK(p);
+   td->td_dbgflags |= TDB_SCX;
+   _STOPEVENT(p, S_SCX, td->td_dbg_sc_code);
+   if ((p->p_stops & S_PT_SCX) != 0)
+   ptracestop(td, SIGTRAP);
+   td->td_dbgflags &= ~TDB_SCX;
+   PROC_UNLOCK(p);
}
 
userret(td, frame);

Modified: head/sys/kern/subr_syscall.c
==
--- head/sys/kern/subr_syscall.cTue Oct  6 19:07:10 2015
(r288948)
+++ head/sys/kern/subr_syscall.cTue Oct  6 19:29:05 2015
(r288949)
@@ -83,11 +83,12 @@ syscallenter(struct thread *td, struct s
if (error == 0) {
 
STOPEVENT(p, S_SCE, sa->narg);
-   if (p->p_flag & P_TRACED && p->p_stops & S_PT_SCE) {
+   if (p->p_flag & P_TRACED) {
PROC_LOCK(p);
td->td_dbg_sc_code = sa->code;
td->td_dbg_sc_narg = sa->narg;
-   ptracestop((td), SIGTRAP);
+   if (p->p_stops & S_PT_SCE)
+   ptracestop((td), SIGTRAP);
PROC_UNLOCK(p);
}
if (td->td_dbgflags & TDB_USERWR) {

Modified: head/sys/sys/proc.h
==
--- head/sys/sys/proc.h Tue Oct  6 19:07:10 2015(r288948)
+++ head/sys/sys/proc.h Tue Oct  6 19:29:05 2015(r288949)
@@ -283,8 +283,6 @@ struct thread {
int td_no_sleeping; /* (k) Sleeping disabled count. */
int td_dom_rr_idx;  /* (k) RR Numa domain selection. */
void*td_su; /* (k) FFS SU private */
-   u_int   td_dbg_sc_code; /* (c) Syscall code to debugger. */
-   u_int   td_dbg_sc_narg; /* (c) 

svn commit: r288913 - in head: lib/libxo usr.bin/xo

2015-10-06 Thread Garrett Cooper
Author: ngie
Date: Tue Oct  6 07:28:54 2015
New Revision: 288913
URL: https://svnweb.freebsd.org/changeset/base/288913

Log:
  Use LIBXOSRC instead of LIBXO when defining the path to contrib/libxo
  
  The latter is already defined in bsd.libnames.mk, so avoid the conflict
  in case someone copy-pastes make variables
  
  While here, switch path to the top of the source tree with SRCTOP

Modified:
  head/lib/libxo/Makefile
  head/usr.bin/xo/Makefile

Modified: head/lib/libxo/Makefile
==
--- head/lib/libxo/Makefile Tue Oct  6 05:49:00 2015(r288912)
+++ head/lib/libxo/Makefile Tue Oct  6 07:28:54 2015(r288913)
@@ -1,8 +1,8 @@
 # $FreeBSD$
 
-LIBXO= ${.CURDIR:H:H}/contrib/libxo
+LIBXOSRC=  ${SRCTOP}/contrib/libxo
 
-.PATH: ${LIBXO}/libxo
+.PATH: ${LIBXOSRC}/libxo
 
 LIB=   xo
 SHLIB_MAJOR=0
@@ -11,7 +11,7 @@ SHLIBDIR?=  /lib
 
 SRCS=  libxo.c xo_encoder.c xo_syslog.c
 
-CFLAGS+=-I${LIBXO}/libxo
+CFLAGS+=-I${LIBXOSRC}/libxo
 CFLAGS+=-DXO_ENCODERDIR=\"/usr/lib/libxo/encoder\"
 
 INCS=  xo.h xo_encoder.h

Modified: head/usr.bin/xo/Makefile
==
--- head/usr.bin/xo/MakefileTue Oct  6 05:49:00 2015(r288912)
+++ head/usr.bin/xo/MakefileTue Oct  6 07:28:54 2015(r288913)
@@ -1,14 +1,14 @@
 # $FreeBSD$
 
-LIBXO= ${.CURDIR:H:H}/contrib/libxo
+LIBXOSRC=  ${SRCTOP}/contrib/libxo
 
-.PATH: ${LIBXO}/xo
+.PATH: ${LIBXOSRC}/xo
 
 PROG=  xo
 MAN=   xo.1
 
 # XXX For xoversion.h
-CFLAGS+=-I${LIBXO}/libxo
+CFLAGS+=-I${LIBXOSRC}/libxo
 
 LIBADD=xo util
 
___
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: r288911 - head/share/mk

2015-10-06 Thread Simon J. Gerraty
Bryan Drewery  wrote:
> Why would anyone build ports in a sub-dir of src? It's convenient for a
> vendor building their own product that needs their own ports tree.  Some
> decisions can't easily be changed; if the root of the source code
> checkout is already src/, there is no simple way to avoid the problem.

But wouldn't that imply that /usr/src/share/mk is the right set of
makefiles to use for /usr/src/ports/

What would you consider the right sys.mk etc would be in such a case?

___
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: r288653 - in head/sys/dev/drm2: . i915

2015-10-06 Thread Jean-Sébastien Pédron
On 04.10.2015 11:46, Konstantin Belousov wrote:
> On Sun, Oct 04, 2015 at 07:45:37AM +, Adrian Chadd wrote:
>>   * Add missing case statement (gen == 3) in intel_gpu_reset().
> This seems to be wrong.  The i915 and G33 chipsets do not have registers
> declared in the 8xx chipset documentation.  More, i915 and G33 have different
> reset procedures.
> 
> The absence of '3' case was copied from the corresponding Linux kernel.
> Was this change tested, or is there a reference to upstream where the
> handling was added in this manner ?

You're right, even in Linux 3.8, the switch does not have a case for
generation 3.

>>   * Replace M_WAITOK with M_NOWAIT when the return value of malloc is 
>> checked (may be incorrect).
> This is also incorrect.  At least the modesetting pathes are executed in
> the syscall context, and sleeping is allowed; the modesetting locks were
> selected to make sleeping possible.  Using nowait causes random syscalls
> failure where the requests would succeed otherwise.

My reasoning was that M_WAITOK could make the display hang/unresponsive
while the memory is under pressure. The caller should be responsible for
handling the error instead.

In Linux, *alloc() calls may fail so application should already be
responsible for that.

-- 
Jean-Sébastien Pédron



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r288911 - head/share/mk

2015-10-06 Thread Warner Losh

> On Oct 6, 2015, at 12:02 PM, Bryan Drewery  wrote:
> 
> On 10/5/2015 9:18 PM, Warner Losh wrote:
>> Author: imp
>> Date: Tue Oct  6 04:18:48 2015
>> New Revision: 288911
>> URL: https://svnweb.freebsd.org/changeset/base/288911
>> 
>> Log:
>>  Previous versions of bsd.own.mk included bsd.compiler.mk
>>  only when _WITHOUT_SRCCONF wasn't defined. Restore this
>>  behavior because bsd.ports.mk depends on this in subtle
>>  ways. The compat include of bsd.compiler.mk should
>>  be removed in 12 anyway.
>> 
>>  PR: 203540
>> 
> 
> Perhaps the wrong place to discuss this, but I will anyhow as I don't
> think it will change.
> 
> The sys.mk change to include src.conf breaks building ports in a sub-dir
> of src. Meaning, /usr/src/ports/.  The MAKESYSPATH with '.../share/mk'
> finds /usr/src/share/mk and runs off with all of the src.*.mk stuff long
> before the port Makefile includes bsd.port.mk, from
> /usr/src/share/mk/bsd.port.mk, which has a _WITHOUT_SRCCONF= guard set
> on it to avoid bsd.own.mk from including src.conf.  But because sys.mk
> is already included long before this, src.conf is already included and
> anything handled in sys.mk has no real way to respect _WITHOUT_SRCCONF
> unless it is in the environment

Yuck!

But the real problem here is MAKESYSPATH of …/share/mk. That was  a
hack until we had something like SRCTOP that we could use for finding
the right stuff and for individual builds. So if we can solve that part of the
problem, we can get rid of the default …/share/mk definition. It wasn’t
anticipated to be something forever, just something for the moment.

> [Note that the actual inclusion of src.conf no longer has a
> _WITHOUT_SRCCONF= check, but that is trivial to fix]

That likely got lost in the shuffle. Agreed, it’s easier to add back in.

> Why would anyone build ports in a sub-dir of src? It's convenient for a
> vendor building their own product that needs their own ports tree.  Some
> decisions can't easily be changed; if the root of the source code
> checkout is already src/, there is no simple way to avoid the problem.

We do it too… It’s evil, but there you go.

> With the META_MODE changes, sjg introduced this /etc/src-env.conf file
> that is included from sys.mk early, that can be used for overriding
> things like MAKEOBJDIRPREFIX, enabling META_MODE (it needs to be set
> extremely early for AUTO_OBJ support, among other things).
> 
> As far as I can tell, the sys.mk change to include src.conf early was
> done out of convenience.  Meaning, we could remove that and just add
> back a .include  or similar at the top of all src Makefiles.

All src makefiles? Yea, I’d rather hoped to avoid that, though it is easily
scripted. I’d thought of this solution at the time I did the MAKESYSPATH
hack, and rejected it as being too unwieldy. And having that at the top
of all the files would still require MAKESYSPATH need to be …/share/mk
to work out. I was rather hoping we could find some good way around
doing that.

> I would really like to find a solution to this as it is a looming
> problem for my work's build approaching in a few months. I figured out a
> hack we can use locally, to set _WITHOUT_SRCCONF=, when the current
> directory has "ports/" in it. That works for us, but not for other
> vendors who don't realize this is coming.  Perhaps the scope of people
> doing this is not large.

One trivial solution would be to only do ports sub-builds with
_WITHOUT_SRCCONF defined. But like all good kludges, I imagine
there’d be logistical issues with that.

Warner


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r288653 - in head/sys/dev/drm2: . i915

2015-10-06 Thread Jean-Sébastien Pédron
On 06.10.2015 22:20, Adrian Chadd wrote:
> ok, so what should we rip out? That '3' case?

Yes.

Regarding M_WAITOK vs. M_NOWAIT, if we decide to restore M_WAITOK, the
error check must be retained so the diff with Linux remains small.

-- 
Jean-Sébastien Pédron



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r288653 - in head/sys/dev/drm2: . i915

2015-10-06 Thread Adrian Chadd
ok, so what should we rip out? That '3' case?


-a


On 6 October 2015 at 13:19, Jean-Sébastien Pédron  wrote:
> On 04.10.2015 11:46, Konstantin Belousov wrote:
>> On Sun, Oct 04, 2015 at 07:45:37AM +, Adrian Chadd wrote:
>>>   * Add missing case statement (gen == 3) in intel_gpu_reset().
>> This seems to be wrong.  The i915 and G33 chipsets do not have registers
>> declared in the 8xx chipset documentation.  More, i915 and G33 have different
>> reset procedures.
>>
>> The absence of '3' case was copied from the corresponding Linux kernel.
>> Was this change tested, or is there a reference to upstream where the
>> handling was added in this manner ?
>
> You're right, even in Linux 3.8, the switch does not have a case for
> generation 3.
>
>>>   * Replace M_WAITOK with M_NOWAIT when the return value of malloc is 
>>> checked (may be incorrect).
>> This is also incorrect.  At least the modesetting pathes are executed in
>> the syscall context, and sleeping is allowed; the modesetting locks were
>> selected to make sleeping possible.  Using nowait causes random syscalls
>> failure where the requests would succeed otherwise.
>
> My reasoning was that M_WAITOK could make the display hang/unresponsive
> while the memory is under pressure. The caller should be responsible for
> handling the error instead.
>
> In Linux, *alloc() calls may fail so application should already be
> responsible for that.
>
> --
> Jean-Sébastien Pédron
>
___
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: r288911 - head/share/mk

2015-10-06 Thread Bryan Drewery
On 10/6/2015 12:50 PM, Simon J. Gerraty wrote:
> Bryan Drewery  wrote:
>> Why would anyone build ports in a sub-dir of src? It's convenient for a
>> vendor building their own product that needs their own ports tree.  Some
>> decisions can't easily be changed; if the root of the source code
>> checkout is already src/, there is no simple way to avoid the problem.
> 
> But wouldn't that imply that /usr/src/share/mk is the right set of
> makefiles to use for /usr/src/ports/
> 
> What would you consider the right sys.mk etc would be in such a case?
> 

For our case we want the checked in src/share/mk to be used rather than
the older /usr/share/mk as it is easier to support. If there's a problem
we fix in our local.sys.env.mk or bsd.port.mk for instance, it will be
used by updating the checkout.  This was something we backported,
without the src.conf inclusion in sys.mk, and were running with fine.

Excluding src.conf is enough to satisfy our needs as it prevents a lot
of extra environment, variables, and target overrides we have added into
our src.conf to avoid touching FreeBSD files where possible. The biggest
problem I hit so far was some LOCAL_LIBRARIES we added in that needed
their own __L targets in our src.conf, which bleed into non-src builds
now and cause obscure errors.  Modifying CFLAGS is another that we have
a separate src.conf and ports_make.conf value for, with a shared make.conf.

The changes made by including src.*.mk have not been a problem for us so
far. There's really not much hidden from /usr/share/mk except some
src-only option handling and library lists. It's possible the inclusion
of the meta mode "src".*.mk files could cause problems for us, but I
haven't investigated it yet.

My biggest problem here is that lack of _WITHOUT_SRCCONF support in
bsd.port.mk.  The nested build of a non-src build in src/ is easily
handled by a -m argument, or using gmake as the upstream was expecting
it to be anyhow. In the case we've hit this we have a BSD Makefile that
calls the upstream build, so we can control what make arguments and
other environment are done from there.  However, a user going into
src/ports and typing 'make' will get the src.conf pulled in with other
surprises.

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r288947 - head/release/doc/en_US.ISO8859-1/relnotes

2015-10-06 Thread Glen Barber
On Tue, Oct 06, 2015 at 03:49:19PM -0400, Ed Maste wrote:
> On 6 October 2015 at 15:06, Glen Barber  wrote:
> > Author: gjb
> > Date: Tue Oct  6 19:06:34 2015
> > New Revision: 288947
> > URL: https://svnweb.freebsd.org/changeset/base/288947
> >
> > Log:
> >   Document r288943, clang, llvm, etc. updated to upstream 3.7.0.
> 
> I think we ought to list all of the individual components.  In the
> past often Clang and LLVM were the only parts updated, and LLDB,
> compiler-rt etc were updated on their own schedules.  Importing them
> together represents a new approach and I think we should mention that
> explicitly.
> 

Makes sense.  I'll update this.

Thanks.

Glen



signature.asc
Description: PGP signature


svn commit: r288951 - head/lib/clang

2015-10-06 Thread Dimitry Andric
Author: dim
Date: Tue Oct  6 19:49:53 2015
New Revision: 288951
URL: https://svnweb.freebsd.org/changeset/base/288951

Log:
  For llvm/clang libraries, skip including tablegen-produced .d files when
  the target is "make depend".  This works around errors during
  incremental make depend of some clang libraries, for example "don't know
  how to make contrib/llvm/include/llvm/IR/IntrinsicsR600.td".
  
  Reported by:  emaste

Modified:
  head/lib/clang/clang.build.mk

Modified: head/lib/clang/clang.build.mk
==
--- head/lib/clang/clang.build.mk   Tue Oct  6 19:31:07 2015
(r288950)
+++ head/lib/clang/clang.build.mk   Tue Oct  6 19:49:53 2015
(r288951)
@@ -247,9 +247,11 @@ Checkers.inc.h: ${CLANG_SRCS}/lib/Static
-I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \
${CLANG_SRCS}/lib/StaticAnalyzer/Checkers/Checkers.td
 
-.for dep in ${TGHDRS:C/$/.inc.d/}
-. sinclude "${dep}"
-.endfor
+.if !make(depend)
+. for dep in ${TGHDRS:C/$/.inc.d/}
+.  sinclude "${dep}"
+. endfor
+.endif
 
 SRCS+= ${TGHDRS:C/$/.inc.h/}
 DPSRCS+=   ${TGHDRS:C/$/.inc.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"


Re: svn commit: r288947 - head/release/doc/en_US.ISO8859-1/relnotes

2015-10-06 Thread Ed Maste
On 6 October 2015 at 15:06, Glen Barber  wrote:
> Author: gjb
> Date: Tue Oct  6 19:06:34 2015
> New Revision: 288947
> URL: https://svnweb.freebsd.org/changeset/base/288947
>
> Log:
>   Document r288943, clang, llvm, etc. updated to upstream 3.7.0.

I think we ought to list all of the individual components.  In the
past often Clang and LLVM were the only parts updated, and LLDB,
compiler-rt etc were updated on their own schedules.  Importing them
together represents a new approach and I think we should mention that
explicitly.
___
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: r288952 - head/sys/dev/drm2/i915

2015-10-06 Thread Adrian Chadd
Author: adrian
Date: Tue Oct  6 20:58:45 2015
New Revision: 288952
URL: https://svnweb.freebsd.org/changeset/base/288952

Log:
  Remove gen3 check introduced in r286653.
  
  kib spotted this and noticed it's not correct.
  
  Submitted by: kib
  Reviewed by:  dumbbell

Modified:
  head/sys/dev/drm2/i915/i915_drv.c

Modified: head/sys/dev/drm2/i915/i915_drv.c
==
--- head/sys/dev/drm2/i915/i915_drv.c   Tue Oct  6 19:49:53 2015
(r288951)
+++ head/sys/dev/drm2/i915/i915_drv.c   Tue Oct  6 20:58:45 2015
(r288952)
@@ -894,7 +894,6 @@ int intel_gpu_reset(struct drm_device *d
case 4:
ret = i965_do_reset(dev);
break;
-   case 3:
case 2:
ret = i8xx_do_reset(dev);
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: r288957 - in head: lib/libc/sys usr.bin/kdump usr.bin/truss

2015-10-06 Thread Bryan Drewery
Author: bdrewery
Date: Tue Oct  6 21:58:38 2015
New Revision: 288957
URL: https://svnweb.freebsd.org/changeset/base/288957

Log:
  truss: Add support for utrace(2).
  
  This uses the kdump(1) utrace support code directly until a common library
  is created.
  
  This allows malloc(3) tracing with MALLOC_CONF=utrace:true and rtld tracing
  with LD_UTRACE=1.  Unknown utrace(2) data is just printed as hex.
  
  PR:   43819 [inspired by]
  Reviewed by:  jhb
  MFC after:2 weeks
  Relnotes: yes
  Differential Revision:https://reviews.freebsd.org/D3819

Added:
  head/usr.bin/kdump/utrace.c   (contents, props changed)
Modified:
  head/lib/libc/sys/utrace.2
  head/usr.bin/kdump/Makefile
  head/usr.bin/kdump/kdump.c
  head/usr.bin/truss/Makefile
  head/usr.bin/truss/syscall.h
  head/usr.bin/truss/syscalls.c
  head/usr.bin/truss/truss.1

Modified: head/lib/libc/sys/utrace.2
==
--- head/lib/libc/sys/utrace.2  Tue Oct  6 21:44:48 2015(r288956)
+++ head/lib/libc/sys/utrace.2  Tue Oct  6 21:58:38 2015(r288957)
@@ -28,7 +28,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd November 1, 2014
+.Dd October 5, 2015
 .Dt UTRACE 2
 .Os
 .Sh NAME
@@ -70,7 +70,8 @@ support
 .Sh SEE ALSO
 .Xr kdump 1 ,
 .Xr ktrace 1 ,
-.Xr ktrace 2
+.Xr ktrace 2 ,
+.Xr truss 1
 .Sh HISTORY
 The
 .Fn utrace

Modified: head/usr.bin/kdump/Makefile
==
--- head/usr.bin/kdump/Makefile Tue Oct  6 21:44:48 2015(r288956)
+++ head/usr.bin/kdump/Makefile Tue Oct  6 21:58:38 2015(r288957)
@@ -6,7 +6,7 @@
 .PATH: ${.CURDIR}/../ktrace
 
 PROG=  kdump
-SRCS=  kdump_subr.c kdump.c ioctl.c subr.c
+SRCS=  kdump_subr.c kdump.c ioctl.c subr.c utrace.c
 DPSRCS=kdump_subr.h
 CFLAGS+=   -I${.CURDIR}/../ktrace -I${.CURDIR} -I${.CURDIR}/../.. -I.
 

Modified: head/usr.bin/kdump/kdump.c
==
--- head/usr.bin/kdump/kdump.c  Tue Oct  6 21:44:48 2015(r288956)
+++ head/usr.bin/kdump/kdump.c  Tue Oct  6 21:58:38 2015(r288957)
@@ -67,7 +67,6 @@ extern int errno;
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -117,6 +116,7 @@ void ktrfaultend(struct ktr_faultend *);
 void limitfd(int fd);
 void usage(void);
 void ioctlname(unsigned long, int);
+int kdump_print_utrace(FILE *, void *, size_t, int);
 
 #defineTIMESTAMP_NONE  0x0
 #defineTIMESTAMP_ABSOLUTE  0x1
@@ -1536,151 +1536,13 @@ ktrcsw(struct ktr_csw *cs)
cs->user ? "user" : "kernel", cs->wmesg);
 }
 
-#defineUTRACE_DLOPEN_START 1
-#defineUTRACE_DLOPEN_STOP  2
-#defineUTRACE_DLCLOSE_START3
-#defineUTRACE_DLCLOSE_STOP 4
-#defineUTRACE_LOAD_OBJECT  5
-#defineUTRACE_UNLOAD_OBJECT6
-#defineUTRACE_ADD_RUNDEP   7
-#defineUTRACE_PRELOAD_FINISHED 8
-#defineUTRACE_INIT_CALL9
-#defineUTRACE_FINI_CALL10
-#defineUTRACE_DLSYM_START  11
-#defineUTRACE_DLSYM_STOP   12
-
-struct utrace_rtld {
-   char sig[4];/* 'RTLD' */
-   int event;
-   void *handle;
-   void *mapbase;
-   size_t mapsize;
-   int refcnt;
-   char name[MAXPATHLEN];
-};
-
-void
-ktruser_rtld(int len, void *p)
-{
-   struct utrace_rtld *ut = p;
-   unsigned char *cp;
-   void *parent;
-   int mode;
-
-   switch (ut->event) {
-   case UTRACE_DLOPEN_START:
-   mode = ut->refcnt;
-   printf("dlopen(%s, ", ut->name);
-   switch (mode & RTLD_MODEMASK) {
-   case RTLD_NOW:
-   printf("RTLD_NOW");
-   break;
-   case RTLD_LAZY:
-   printf("RTLD_LAZY");
-   break;
-   default:
-   printf("%#x", mode & RTLD_MODEMASK);
-   }
-   if (mode & RTLD_GLOBAL)
-   printf(" | RTLD_GLOBAL");
-   if (mode & RTLD_TRACE)
-   printf(" | RTLD_TRACE");
-   if (mode & ~(RTLD_MODEMASK | RTLD_GLOBAL | RTLD_TRACE))
-   printf(" | %#x", mode &
-   ~(RTLD_MODEMASK | RTLD_GLOBAL | RTLD_TRACE));
-   printf(")\n");
-   break;
-   case UTRACE_DLOPEN_STOP:
-   printf("%p = dlopen(%s) ref %d\n", ut->handle, ut->name,
-   ut->refcnt);
-   break;
-   case UTRACE_DLCLOSE_START:
-   printf("dlclose(%p) (%s, %d)\n", ut->handle, ut->name,
-   ut->refcnt);
-   break;
-   case UTRACE_DLCLOSE_STOP:

Re: svn commit: r288911 - head/share/mk

2015-10-06 Thread Simon J. Gerraty
Warner Losh  wrote:
> > The sys.mk change to include src.conf breaks building ports in a sub-dir
> > of src. Meaning, /usr/src/ports/.  The MAKESYSPATH with '.../share/mk'
> > finds /usr/src/share/mk and runs off with all of the src.*.mk stuff long
> > before the port Makefile includes bsd.port.mk, from
> > /usr/src/share/mk/bsd.port.mk, which has a _WITHOUT_SRCCONF= guard set
> > on it to avoid bsd.own.mk from including src.conf.  But because sys.mk
> > is already included long before this, src.conf is already included and
> > anything handled in sys.mk has no real way to respect _WITHOUT_SRCCONF
> > unless it is in the environment
> 
> Yuck!
> 
> But the real problem here is MAKESYSPATH of …/share/mk. That was  a
> hack until we had something like SRCTOP that we could use for finding
> the right stuff and for individual builds. So if we can solve that
> part of th

but you only get SRCTOP as a consequence of finding the right
sys.mk et al.  Which presumes you have MAKESYSPATH set correctly.
Ie. you find the right src.sys.env.mk and it can set SRCTOP based on
knowing its own location.

A bit of chicken & egg...
___
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: r288954 - head/sys/sys

2015-10-06 Thread John Baldwin
Author: jhb
Date: Tue Oct  6 21:36:45 2015
New Revision: 288954
URL: https://svnweb.freebsd.org/changeset/base/288954

Log:
  Move td_oncpu and td_lastcpu out of the "zero'd on fork" section of
  struct thread since they are always explicitly initialized during fork
  and thread creation after r286256.
  
  Suggested by: kib

Modified:
  head/sys/sys/proc.h

Modified: head/sys/sys/proc.h
==
--- head/sys/sys/proc.h Tue Oct  6 21:28:54 2015(r288953)
+++ head/sys/sys/proc.h Tue Oct  6 21:36:45 2015(r288954)
@@ -235,8 +235,6 @@ struct thread {
int td_sqqueue; /* (t) Sleepqueue queue blocked on. */
void*td_wchan;  /* (t) Sleep address. */
const char  *td_wmesg;  /* (t) Reason for sleep. */
-   int td_lastcpu; /* (t) Last cpu we were on. */
-   int td_oncpu;   /* (t) Which cpu we are on. */
volatile u_char td_owepreempt;  /* (k*) Preempt on last critical_exit */
u_char  td_tsqueue; /* (t) Turnstile queue blocked on. */
short   td_locks;   /* (k) Debug: count of non-spin locks */
@@ -335,6 +333,8 @@ struct thread {
struct vm_page  **td_ma;/* (k) uio pages held */
int td_ma_cnt;  /* (k) size of *td_ma */
void*td_emuldata;   /* Emulator state data */
+   int td_lastcpu; /* (t) Last cpu we were on. */
+   int td_oncpu;   /* (t) Which cpu we are on. */
 };
 
 struct mtx *thread_lock_block(struct thread *);
___
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: r288911 - head/share/mk

2015-10-06 Thread Simon J. Gerraty
Bryan Drewery  wrote:
> > But wouldn't that imply that /usr/src/share/mk is the right set of
> > makefiles to use for /usr/src/ports/
> > 
> > What would you consider the right sys.mk etc would be in such a case?
> > 
> 
> For our case we want the checked in src/share/mk to be used rather than

Are you refering to a src/share/mk which is sibling to src/ports/* or
something else?

Because with  MAKESYSPATH=.../share/mk src/share/mk/sys.mk is what you
should find.

> the older /usr/share/mk as it is easier to support. If there's a problem
> we fix in our local.sys.env.mk or bsd.port.mk for instance, it will be
> used by updating the checkout.  This was something we backported,
> without the src.conf inclusion in sys.mk, and were running with fine.

I might be confused...

It might help to differentiate the question of finding the right sys.mk
which IMO is critical to a happy outcome, from what to do with src.* if
present.

Normally anything under $SRCTOP should be subject to src.* - by
definition.

But there's no reason you cannot make exceptions - by (as I think you
already mentioned) adding a check for $SRCTOP/ports in local*sys*mk
to suppress src.conf at least.

___
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: r288907 - head/bin/ls/tests

2015-10-06 Thread John Baldwin
On Tuesday, October 06, 2015 01:00:12 AM Garrett Cooper wrote:
> Author: ngie
> Date: Tue Oct  6 01:00:12 2015
> New Revision: 288907
> URL: https://svnweb.freebsd.org/changeset/base/288907
> 
> Log:
>   Call sync consistently using atf_check
>   
>   Remove superfluous sync's

You should not need to call sync() to see the results of earlier namespace
changes (file create, rename, delete, etc.), even for NFS when looking on the
same client that made the namespace change.

Are you doing this to force mtime updates?  You should not need sync() for
that on UFS (ufs_getattr() forces any pending lazy timestamp updates).  You
would for NFS (not sure about ZFS).

Whatever the reason for the syncs, I think it warrants a comment.

-- 
John Baldwin
___
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: r288911 - head/share/mk

2015-10-06 Thread Bryan Drewery
On 10/6/2015 2:17 PM, Simon J. Gerraty wrote:
> Bryan Drewery  wrote:
>>> But wouldn't that imply that /usr/src/share/mk is the right set of
>>> makefiles to use for /usr/src/ports/
>>>
>>> What would you consider the right sys.mk etc would be in such a case?
>>>
>>
>> For our case we want the checked in src/share/mk to be used rather than
> 
> Are you refering to a src/share/mk which is sibling to src/ports/* or
> something else?
> 
> Because with  MAKESYSPATH=.../share/mk src/share/mk/sys.mk is what you
> should find.

Right. That's what I'm referring to and what I prefer.


> 
>> the older /usr/share/mk as it is easier to support. If there's a problem
>> we fix in our local.sys.env.mk or bsd.port.mk for instance, it will be
>> used by updating the checkout.  This was something we backported,
>> without the src.conf inclusion in sys.mk, and were running with fine.
> 
> I might be confused...

If we update our checked in share/mk/custom.sys.env.mk file, we want all
builds to get it before having to install it to /usr/share/mk. We for a
period were using a script to wrap make to setup the environment before
we realized sys.mk was already capable of doing this. Being able to bind
a build to a specific environment is important, vs using the environment
installed from the last build or a foreign /usr/share/mk (FreeBSD's files).

> 
> It might help to differentiate the question of finding the right sys.mk
> which IMO is critical to a happy outcome, from what to do with src.* if
> present.
> 
> Normally anything under $SRCTOP should be subject to src.* - by
> definition.
> 
> But there's no reason you cannot make exceptions - by (as I think you
> already mentioned) adding a check for $SRCTOP/ports in local*sys*mk
> to suppress src.conf at least.
> 

Yes that has been my local fix for now.

Perhaps my fix should get checked in so no one else is surprised by
src.conf, and all of the tweaks its options set, coming in. It feels
really dirty though.

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r288917 - in head/sys: amd64/amd64 amd64/include dev/xen/blkfront i386/i386 i386/include xen xen/interface xen/interface/arch-arm/hvm xen/interface/arch-x86 xen/interface/arch-x86/hvm

2015-10-06 Thread John Baldwin
On Tuesday, October 06, 2015 11:29:45 AM Roger Pau Monné wrote:
> Author: royger
> Date: Tue Oct  6 11:29:44 2015
> New Revision: 288917
> URL: https://svnweb.freebsd.org/changeset/base/288917
> 
> Log:
>   Update Xen headers from 4.2 to 4.6
>   
>   Pull the latest headers for Xen which allow us to add support for ARM and
>   use new features in FreeBSD.

Should we be importing these into vendor-sys as vendor sources?

-- 
John Baldwin
___
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: r288911 - head/share/mk

2015-10-06 Thread Warner Losh
On Tue, Oct 6, 2015 at 3:05 PM, Simon J. Gerraty  wrote:

> Warner Losh  wrote:
> > > The sys.mk change to include src.conf breaks building ports in a
> sub-dir
> > > of src. Meaning, /usr/src/ports/.  The MAKESYSPATH with '.../share/mk'
> > > finds /usr/src/share/mk and runs off with all of the src.*.mk stuff
> long
> > > before the port Makefile includes bsd.port.mk, from
> > > /usr/src/share/mk/bsd.port.mk, which has a _WITHOUT_SRCCONF= guard set
> > > on it to avoid bsd.own.mk from including src.conf.  But because sys.mk
> > > is already included long before this, src.conf is already included and
> > > anything handled in sys.mk has no real way to respect _WITHOUT_SRCCONF
> > > unless it is in the environment
> >
> > Yuck!
> >
> > But the real problem here is MAKESYSPATH of …/share/mk. That was  a
> > hack until we had something like SRCTOP that we could use for finding
> > the right stuff and for individual builds. So if we can solve that
> > part of th
>
> but you only get SRCTOP as a consequence of finding the right
> sys.mk et al.  Which presumes you have MAKESYSPATH set correctly.
> Ie. you find the right src.sys.env.mk and it can set SRCTOP based on
> knowing its own location.
>
> A bit of chicken & egg...
>

That's why I haven't fixed it. I haven't puzzled out a how to cut the
Gordian
Knot yet.

Warner
___
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: r288915 - head/usr.sbin/rpcbind

2015-10-06 Thread Hiroki Sato
Author: hrs
Date: Tue Oct  6 08:43:48 2015
New Revision: 288915
URL: https://svnweb.freebsd.org/changeset/base/288915

Log:
  Reallocate a maxlen-long buffer only when the current maxlen is
  shorter than the required length.  Note that it rarely happens
  because maxlen is almost always 128 which covers struct sockaddr_storage.

Modified:
  head/usr.sbin/rpcbind/rpcb_svc_com.c

Modified: head/usr.sbin/rpcbind/rpcb_svc_com.c
==
--- head/usr.sbin/rpcbind/rpcb_svc_com.cTue Oct  6 07:46:19 2015
(r288914)
+++ head/usr.sbin/rpcbind/rpcb_svc_com.cTue Oct  6 08:43:48 2015
(r288915)
@@ -1051,17 +1051,19 @@ netbufcmp(struct netbuf *n1, struct netb
 static bool_t
 netbuf_copybuf(struct netbuf *dst, const struct netbuf *src)
 {
+   assert(src->len <= src->maxlen);
 
-   if (dst->len != src->len || dst->buf == NULL) {
+   if (dst->maxlen < src->len || dst->buf == NULL) {
if (dst->buf != NULL)
free(dst->buf);
-   if ((dst->buf = malloc(src->len)) == NULL)
+   if ((dst->buf = calloc(1, src->maxlen)) == NULL)
return (FALSE);
-
-   dst->maxlen = dst->len = src->len;
+   dst->maxlen = src->maxlen;
}
 
+   dst->len = src->len;
memcpy(dst->buf, src->buf, src->len);
+
return (TRUE);
 }
 
___
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: r288914 - head/sys/netinet

2015-10-06 Thread Hiren Panchasara
Author: hiren
Date: Tue Oct  6 07:46:19 2015
New Revision: 288914
URL: https://svnweb.freebsd.org/changeset/base/288914

Log:
  Add a comment specifying how we implement rfc3042.
  
  Differential Revision:D3746
  MFC after:1 week
  Sponsored by: Limelight Networks

Modified:
  head/sys/netinet/tcp_input.c

Modified: head/sys/netinet/tcp_input.c
==
--- head/sys/netinet/tcp_input.cTue Oct  6 07:28:54 2015
(r288913)
+++ head/sys/netinet/tcp_input.cTue Oct  6 07:46:19 2015
(r288914)
@@ -2536,6 +2536,16 @@ tcp_do_segment(struct mbuf *m, struct tc
tp->snd_nxt = onxt;
goto drop;
} else if (V_tcp_do_rfc3042) {
+   /*
+* Process first and second duplicate
+* ACKs. Each indicates a segment
+* leaving the network, creating room
+* for more. Make sure we can send a
+* packet on reception of each duplicate
+* ACK by increasing snd_cwnd by one
+* segment. Restore the original
+* snd_cwnd after packet transmission.
+*/
cc_ack_received(tp, th, CC_DUPACK);
u_long oldcwnd = tp->snd_cwnd;
tcp_seq oldsndmax = tp->snd_max;
___
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: r288944 - in head: lib/libprocstat lib/libutil share/man/man5 sys/kern sys/sys

2015-10-06 Thread Conrad E. Meyer
Author: cem
Date: Tue Oct  6 18:07:00 2015
New Revision: 288944
URL: https://svnweb.freebsd.org/changeset/base/288944

Log:
  Fix core corruption caused by race in note_procstat_vmmap
  
  This fix is spiritually similar to r287442 and was discovered thanks to
  the KASSERT added in that revision.
  
  NT_PROCSTAT_VMMAP output length, when packing kinfo structs, is tied to
  the length of filenames corresponding to vnodes in the process' vm map
  via vn_fullpath.  As vnodes may move during coredump, this is racy.
  
  We do not remove the race, only prevent it from causing coredump
  corruption.
  
  - Add a sysctl, kern.coredump_pack_vmmapinfo, to allow users to disable
kinfo packing for PROCSTAT_VMMAP notes.  This avoids VMMAP corruption
and truncation, even if names change, at the cost of up to PATH_MAX
bytes per mapped object.  The new sysctl is documented in core.5.
  
  - Fix note_procstat_vmmap to self-limit in the second pass.  This
addresses corruption, at the cost of sometimes producing a truncated
result.
  
  - Fix PROCSTAT_VMMAP consumers libutil (and libprocstat, via copy-paste)
to grok the new zero padding.
  
  Reported by:  pho (https://people.freebsd.org/~pho/stress/log/datamove4-2.txt)
  Relnotes: yes
  Sponsored by: EMC / Isilon Storage Division
  Differential Revision:https://reviews.freebsd.org/D3824

Modified:
  head/lib/libprocstat/libprocstat.c
  head/lib/libutil/kinfo_getvmmap.c
  head/share/man/man5/core.5
  head/sys/kern/imgact_elf.c
  head/sys/kern/kern_exec.c
  head/sys/kern/kern_proc.c
  head/sys/sys/exec.h
  head/sys/sys/user.h

Modified: head/lib/libprocstat/libprocstat.c
==
--- head/lib/libprocstat/libprocstat.c  Tue Oct  6 17:53:29 2015
(r288943)
+++ head/lib/libprocstat/libprocstat.c  Tue Oct  6 18:07:00 2015
(r288944)
@@ -1867,6 +1867,8 @@ kinfo_getvmmap_core(struct procstat_core
eb = buf + len;
while (bp < eb) {
kv = (struct kinfo_vmentry *)(uintptr_t)bp;
+   if (kv->kve_structsize == 0)
+   break;
bp += kv->kve_structsize;
cnt++;
}
@@ -1882,6 +1884,8 @@ kinfo_getvmmap_core(struct procstat_core
/* Pass 2: unpack */
while (bp < eb) {
kv = (struct kinfo_vmentry *)(uintptr_t)bp;
+   if (kv->kve_structsize == 0)
+   break;
/* Copy/expand into pre-zeroed buffer */
memcpy(kp, kv, kv->kve_structsize);
/* Advance to next packed record */

Modified: head/lib/libutil/kinfo_getvmmap.c
==
--- head/lib/libutil/kinfo_getvmmap.c   Tue Oct  6 17:53:29 2015
(r288943)
+++ head/lib/libutil/kinfo_getvmmap.c   Tue Oct  6 18:07:00 2015
(r288944)
@@ -44,6 +44,8 @@ kinfo_getvmmap(pid_t pid, int *cntp)
eb = buf + len;
while (bp < eb) {
kv = (struct kinfo_vmentry *)(uintptr_t)bp;
+   if (kv->kve_structsize == 0)
+   break;
bp += kv->kve_structsize;
cnt++;
}
@@ -59,6 +61,8 @@ kinfo_getvmmap(pid_t pid, int *cntp)
/* Pass 2: unpack */
while (bp < eb) {
kv = (struct kinfo_vmentry *)(uintptr_t)bp;
+   if (kv->kve_structsize == 0)
+   break;
/* Copy/expand into pre-zeroed buffer */
memcpy(kp, kv, kv->kve_structsize);
/* Advance to next packed record */

Modified: head/share/man/man5/core.5
==
--- head/share/man/man5/core.5  Tue Oct  6 17:53:29 2015(r288943)
+++ head/share/man/man5/core.5  Tue Oct  6 18:07:00 2015(r288944)
@@ -28,7 +28,7 @@
 .\" @(#)core.5 8.3 (Berkeley) 12/11/93
 .\" $FreeBSD$
 .\"
-.Dd September 2, 2015
+.Dd October 5, 2015
 .Dt CORE 5
 .Os
 .Sh NAME
@@ -130,6 +130,19 @@ All file descriptor information can be p
 This potentially wastes up to PATH_MAX bytes per open fd.
 Packing is disabled with
 .Dl sysctl kern.coredump_pack_fileinfo=0 .
+.Pp
+Similarly, corefiles are written with vmmap information as an ELF note, which
+contains file paths.
+By default, they are packed to only use as much space as
+needed.
+By the same mechanism as for the open files note, these paths can also
+change at any time and result in a truncated note.
+.Pp
+All vmmap information can be preserved by disabling packing.
+Like the file information, this potentially wastes up to PATH_MAX bytes per
+mapped object.
+Packing is disabled with
+.Dl sysctl kern.coredump_pack_vmmapinfo=0 .
 .Sh EXAMPLES
 In order to store all core images in per-user private areas under
 .Pa /var/coredumps ,

Modified: head/sys/kern/imgact_elf.c

svn commit: r288947 - head/release/doc/en_US.ISO8859-1/relnotes

2015-10-06 Thread Glen Barber
Author: gjb
Date: Tue Oct  6 19:06:34 2015
New Revision: 288947
URL: https://svnweb.freebsd.org/changeset/base/288947

Log:
  Document r288943, clang, llvm, etc. updated to upstream 3.7.0.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/release/doc/en_US.ISO8859-1/relnotes/article.xml

Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml
==
--- head/release/doc/en_US.ISO8859-1/relnotes/article.xml   Tue Oct  6 
18:51:41 2015(r288946)
+++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml   Tue Oct  6 
19:06:34 2015(r288947)
@@ -457,26 +457,15 @@
 
   Contributed Software
 
-   has been updated to
-   upstream snapshot version r196259.
-
has been updated to
version 20140101.
 
-  libc++ has
-   been updated to version 3.4.
-
   OpenSSH has
been updated to 6.5p1.
 
   mdocml has
been updated to version 1.12.3.
 
-  LLVM and
-   Clang have been updated to
-   version 3.4.
-
   The binutils
suite of utilities has been updated to include upstream
patches that add new relocations for 
@@ -595,6 +584,10 @@
 
   The  utility has been updated
to the OpenBSD 5.8 version.
+
+  LLVM and
+   Clang have been updated to
+   version 3.7.0.
 
 
 
___
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: r288972 - head/release/doc/en_US.ISO8859-1/relnotes

2015-10-06 Thread Glen Barber
Author: gjb
Date: Wed Oct  7 02:12:43 2015
New Revision: 288972
URL: https://svnweb.freebsd.org/changeset/base/288972

Log:
  Remove entry for r287469, Skylake/i219 support is not yet complete.
  
  Reported by:  Adam McDougall
  Sponsored by: The FreeBSD Foundation

Modified:
  head/release/doc/en_US.ISO8859-1/relnotes/article.xml

Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml
==
--- head/release/doc/en_US.ISO8859-1/relnotes/article.xml   Wed Oct  7 
02:12:42 2015(r288971)
+++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml   Wed Oct  7 
02:12:43 2015(r288972)
@@ -1260,10 +1260,6 @@
scrub fragment reassemble filtering rule,
without necessary intervention.
 
-  The  driver has been updated
-   to support the Skylake I219 chipset.
-
   The  driver has been updated
to remove support for the fec
protocol.
___
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: r288971 - head/release/doc/en_US.ISO8859-1/relnotes

2015-10-06 Thread Glen Barber
Author: gjb
Date: Wed Oct  7 02:12:42 2015
New Revision: 288971
URL: https://svnweb.freebsd.org/changeset/base/288971

Log:
  Split the r288943 entry into different entries, since the entire
  clang/llvm/lldb/etc may not always be in sync with upstream.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/release/doc/en_US.ISO8859-1/relnotes/article.xml

Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml
==
--- head/release/doc/en_US.ISO8859-1/relnotes/article.xml   Wed Oct  7 
01:25:47 2015(r288970)
+++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml   Wed Oct  7 
02:12:42 2015(r288971)
@@ -585,9 +585,21 @@
   The  utility has been updated
to the OpenBSD 5.8 version.
 
-  LLVM and
-   Clang have been updated to
-   version 3.7.0.
+  Clang has
+   been updated to version 3.7.0.
+
+  LLVM has
+   been updated to version 3.7.0.
+
+  LLDB has
+   been updated to version 3.7.0.
+
+  libc++ has
+   been updated to version 3.7.0.
+
+  The
+   compiler_rt utility has been
+   updated to version 3.7.0.
 
 
 
___
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: r288973 - head/release/doc/en_US.ISO8859-1/relnotes

2015-10-06 Thread Glen Barber
Author: gjb
Date: Wed Oct  7 02:12:44 2015
New Revision: 288973
URL: https://svnweb.freebsd.org/changeset/base/288973

Log:
  Refine the r286591 entry based on feedback from jilles@.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/release/doc/en_US.ISO8859-1/relnotes/article.xml

Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml
==
--- head/release/doc/en_US.ISO8859-1/relnotes/article.xml   Wed Oct  7 
02:12:43 2015(r288972)
+++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml   Wed Oct  7 
02:12:44 2015(r288973)
@@ -1054,8 +1054,9 @@
CPU model information.
 
   The  driver has been
-   updated to allow tuning packets per second captured during
-   runtime.
+   updated to allow tuning pulses per second captured in the
+   CTS line during runtime, whereas previously only the DCD line
+   could be used without rebuilding the kernel.
 
   
 
___
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: r288964 - head/share/mk

2015-10-06 Thread Simon J. Gerraty
Author: sjg
Date: Wed Oct  7 00:24:27 2015
New Revision: 288964
URL: https://svnweb.freebsd.org/changeset/base/288964

Log:
  In jobs mode we can use .ORDER to force stage_links to run after other
  stage_* targets.
  In non-jobs mode we can achieve the same result by simply introducing
  the targets in the correct order.
  Thus in bsd*.mk we simply add targets to STAGE_TARGETS which we
  realize in meta.stage.mk
  
  Reviewed by: bdrewery

Modified:
  head/share/mk/bsd.incs.mk
  head/share/mk/bsd.man.mk
  head/share/mk/bsd.nls.mk
  head/share/mk/bsd.sys.mk
  head/share/mk/meta.stage.mk

Modified: head/share/mk/bsd.incs.mk
==
--- head/share/mk/bsd.incs.mk   Tue Oct  6 23:42:58 2015(r288963)
+++ head/share/mk/bsd.incs.mk   Wed Oct  7 00:24:27 2015(r288964)
@@ -91,9 +91,9 @@ realinstall: installincludes
 
 .if ${MK_STAGING} != "no" && !defined(_SKIP_BUILD)
 .if !defined(NO_STAGE_INCLUDES)
-staging: stage_includes
+STAGE_TARGETS+= stage_includes
 .if !empty(INCSLINKS)
-staging: stage_symlinks
+STAGE_TARGETS+= stage_symlinks
 STAGE_SYMLINKS.INCS= ${INCSLINKS}
 .endif
 .endif

Modified: head/share/mk/bsd.man.mk
==
--- head/share/mk/bsd.man.mkTue Oct  6 23:42:58 2015(r288963)
+++ head/share/mk/bsd.man.mkWed Oct  7 00:24:27 2015(r288964)
@@ -128,7 +128,7 @@ ZEXT=   ${MCOMPRESS_EXT}
 
 .if defined(MAN) && !empty(MAN)
 .if ${MK_STAGING_MAN} == "yes"
-staging: stage_files
+STAGE_TARGETS+= stage_files
 _mansets:= ${MAN:E:O:u:M*[1-9]:@s@man$s@}
 STAGE_SETS+= ${_mansets}
 .for _page in ${MAN}
@@ -137,7 +137,7 @@ STAGE_DIR.man${_page:T:E}?= ${STAGE_OBJT
 .endfor
 .if !empty(MLINKS)
 STAGE_SETS+= mlinks
-staging: stage_links
+STAGE_TARGETS+= stage_links
 STAGE_LINKS.mlinks:= ${MLINKS:@f@${f:S,^,${MANDIR}${f:E}${MANSUBDIR}/,}@}
 stage_links.mlinks: ${_mansets:@s@stage_files.$s@}
 .endif

Modified: head/share/mk/bsd.nls.mk
==
--- head/share/mk/bsd.nls.mkTue Oct  6 23:42:58 2015(r288963)
+++ head/share/mk/bsd.nls.mkWed Oct  7 00:24:27 2015(r288964)
@@ -63,7 +63,7 @@ NLSDIR?=  ${SHAREDIR}/nls
 #
 .if ${MK_STAGING_PROG} == "yes"
 .if !defined(_SKIP_BUILD)
-staging:   stage_symlinks
+STAGE_TARGETS+= stage_symlinks
 .endif
 STAGE_SYMLINKS.NLS= ${NLSSYMLINKS}
 STAGE_SYMLINKS_DIR.NLS= ${STAGE_OBJTOP}

Modified: head/share/mk/bsd.sys.mk
==
--- head/share/mk/bsd.sys.mkTue Oct  6 23:42:58 2015(r288963)
+++ head/share/mk/bsd.sys.mkWed Oct  7 00:24:27 2015(r288964)
@@ -205,7 +205,7 @@ stage_as.prog: ${PROG}
 .else
 STAGE_SETS+= prog
 stage_files.prog: ${PROG}
-staging: stage_files
+STAGE_TARGETS+= stage_files
 .endif
 .endif
 .endif
@@ -251,18 +251,18 @@ beforebuild: stage_includes
 
 .for t in stage_libs stage_files stage_as
 .if target($t)
-staging: $t
+STAGE_TARGETS+= $t
 .endif
 .endfor
 
 .if !empty(STAGE_AS_SETS)
-staging: stage_as
+STAGE_TARGETS+= stage_as
 .endif
 
 .if !empty(_LIBS) || ${MK_STAGING_PROG} != "no"
 
 .if !empty(LINKS)
-staging: stage_links
+STAGE_TARGETS+= stage_links
 .if ${MAKE_VERSION} < 20131001
 stage_links.links: ${_LIBS} ${PROG}
 .endif
@@ -271,7 +271,7 @@ STAGE_LINKS.links= ${LINKS}
 .endif
 
 .if !empty(SYMLINKS)
-staging: stage_symlinks
+STAGE_TARGETS+= stage_symlinks
 STAGE_SETS+= links
 STAGE_SYMLINKS.links= ${SYMLINKS}
 .endif

Modified: head/share/mk/meta.stage.mk
==
--- head/share/mk/meta.stage.mk Tue Oct  6 23:42:58 2015(r288963)
+++ head/share/mk/meta.stage.mk Wed Oct  7 00:24:27 2015(r288964)
@@ -24,6 +24,8 @@ _dirdep = ${RELDIR}.${MACHINE}
 _dirdep = ${RELDIR}
 .endif
 
+CLEANFILES+= .dirdep
+
 # this allows us to trace dependencies back to their src dir
 .dirdep:
@echo '${_dirdep}' > $@
@@ -134,7 +136,7 @@ _STAGE_AS_BASENAME_USE:.USE ${.T
 
 .if !empty(STAGE_INCSDIR)
 STAGE_TARGETS += stage_incs
-STAGE_INCS ?= ${.ALLSRC:N.dirdep}
+STAGE_INCS ?= ${.ALLSRC:N.dirdep:Nstage_*}
 
 stage_includes: stage_incs
 stage_incs:.dirdep
@@ -145,7 +147,7 @@ stage_incs: .dirdep
 .if !empty(STAGE_LIBDIR)
 STAGE_TARGETS += stage_libs
 
-STAGE_LIBS ?= ${.ALLSRC:N.dirdep}
+STAGE_LIBS ?= ${.ALLSRC:N.dirdep:Nstage_*}
 
 stage_libs:.dirdep
@${STAGE_FILE_SCRIPT}; StageFiles ${STAGE_LIBDIR:${STAGE_DIR_FILTER}} 
${STAGE_LIBS}
@@ -177,8 +179,8 @@ CLEANFILES += ${STAGE_SETS:@s@stage*$s@}
 
 # some makefiles need to populate multiple directories
 .for s in ${STAGE_SETS:O:u}
-STAGE_FILES.$s ?= ${.ALLSRC:N.dirdep}
-STAGE_SYMLINKS.$s ?= ${.ALLSRC:N.dirdep}
+STAGE_FILES.$s ?= ${.ALLSRC:N.dirdep:Nstage_*}
+STAGE_SYMLINKS.$s ?= ${.ALLSRC:N.dirdep:Nstage_*}
 STAGE_LINKS_DIR.$s ?= ${STAGE_OBJTOP}
 

svn commit: r288965 - head/share/mk

2015-10-06 Thread Simon J. Gerraty
Author: sjg
Date: Wed Oct  7 00:28:24 2015
New Revision: 288965
URL: https://svnweb.freebsd.org/changeset/base/288965

Log:
  Do not assume host toolchain supports sysroot

Modified:
  head/share/mk/local.init.mk

Modified: head/share/mk/local.init.mk
==
--- head/share/mk/local.init.mk Wed Oct  7 00:24:27 2015(r288964)
+++ head/share/mk/local.init.mk Wed Oct  7 00:28:24 2015(r288965)
@@ -9,11 +9,12 @@
 .endif
 .endif
 
-.if ${MK_SYSROOT} == "yes" && !empty(SYSROOT)
+.if ${MK_SYSROOT} == "yes" && !empty(SYSROOT) && ${MACHINE} != "host"
 CFLAGS_LAST+= --sysroot=${SYSROOT}
 CXXFLAGS_LAST+= --sysroot=${SYSROOT}
 LDADD+= --sysroot=${SYSROOT}
 .elif ${MK_STAGING} == "yes"
+CFLAGS+= -nostdinc
 CFLAGS+= -I${STAGE_INCLUDEDIR}
 LDADD+= -L${STAGE_LIBDIR}
 .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"


svn commit: r288966 - head/share/mk

2015-10-06 Thread Simon J. Gerraty
Author: sjg
Date: Wed Oct  7 00:32:33 2015
New Revision: 288966
URL: https://svnweb.freebsd.org/changeset/base/288966

Log:
  To help bootstrap new local depends,
  if SRCS contains *.h for which there are targets,
  make buildfiles depend on them - so they get generated early.

Modified:
  head/share/mk/local.autodep.mk

Modified: head/share/mk/local.autodep.mk
==
--- head/share/mk/local.autodep.mk  Wed Oct  7 00:28:24 2015
(r288965)
+++ head/share/mk/local.autodep.mk  Wed Oct  7 00:32:33 2015
(r288966)
@@ -14,6 +14,12 @@ LDFLAGS+= ${LDFLAGS_LAST}
 
 CLEANFILES+= .depend
 
+.for h in ${SRCS:M*.h}
+.if target($h)
+buildfiles: $h
+.endif
+.endfor
+
 # handy for debugging
 .SUFFIXES:  .S .c .cc .cpp .cpp-out
 
___
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: r288968 - in head: gnu/usr.bin/binutils/ld usr.bin/truss

2015-10-06 Thread Simon J. Gerraty
Author: sjg
Date: Wed Oct  7 00:43:05 2015
New Revision: 288968
URL: https://svnweb.freebsd.org/changeset/base/288968

Log:
  Updated depends

Modified:
  head/gnu/usr.bin/binutils/ld/Makefile.depend.host
  head/usr.bin/truss/Makefile.depend.amd64

Modified: head/gnu/usr.bin/binutils/ld/Makefile.depend.host
==
--- head/gnu/usr.bin/binutils/ld/Makefile.depend.host   Wed Oct  7 00:33:44 
2015(r288967)
+++ head/gnu/usr.bin/binutils/ld/Makefile.depend.host   Wed Oct  7 00:43:05 
2015(r288968)
@@ -4,6 +4,7 @@
 DIRDEPS = \
gnu/usr.bin/binutils/libbfd \
gnu/usr.bin/binutils/libiberty \
+   usr.bin/yacc \
 
 
 .include 

Modified: head/usr.bin/truss/Makefile.depend.amd64
==
--- head/usr.bin/truss/Makefile.depend.amd64Wed Oct  7 00:33:44 2015
(r288967)
+++ head/usr.bin/truss/Makefile.depend.amd64Wed Oct  7 00:43:05 2015
(r288968)
@@ -17,6 +17,8 @@ DIRDEPS = \
 
 .if ${DEP_RELDIR} == ${_DEP_RELDIR}
 # local dependencies - needed for -jN in clean tree
+amd64-cloudabi64.o: cloudabi64_syscalls.h
+amd64-cloudabi64.po: cloudabi64_syscalls.h
 amd64-fbsd.o: syscalls.h
 amd64-fbsd.po: syscalls.h
 amd64-fbsd32.o: freebsd32_syscalls.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"


Re: svn commit: r288966 - head/share/mk

2015-10-06 Thread Bryan Drewery
On 10/6/2015 5:32 PM, Simon J. Gerraty wrote:
> Author: sjg
> Date: Wed Oct  7 00:32:33 2015
> New Revision: 288966
> URL: https://svnweb.freebsd.org/changeset/base/288966
> 
> Log:
>   To help bootstrap new local depends,
>   if SRCS contains *.h for which there are targets,
>   make buildfiles depend on them - so they get generated early.
> 
> Modified:
>   head/share/mk/local.autodep.mk
> 
> Modified: head/share/mk/local.autodep.mk
> ==
> --- head/share/mk/local.autodep.mkWed Oct  7 00:28:24 2015
> (r288965)
> +++ head/share/mk/local.autodep.mkWed Oct  7 00:32:33 2015
> (r288966)
> @@ -14,6 +14,12 @@ LDFLAGS+= ${LDFLAGS_LAST}
>  
>  CLEANFILES+= .depend
>  
> +.for h in ${SRCS:M*.h}

I think we can use DPSRCS as well for this.

> +.if target($h)
> +buildfiles: $h
> +.endif
> +.endfor
> +
>  # handy for debugging
>  .SUFFIXES:  .S .c .cc .cpp .cpp-out
>  
> 


-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r288970 - head/usr.bin/fortune/strfile

2015-10-06 Thread Xin LI
Author: delphij
Date: Wed Oct  7 01:25:47 2015
New Revision: 288970
URL: https://svnweb.freebsd.org/changeset/base/288970

Log:
  Remove support of ancient (pre-8.0R, 800041) FreeBSD releases.
  
  MFC after:2 weeks

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

Modified: head/usr.bin/fortune/strfile/strfile.c
==
--- head/usr.bin/fortune/strfile/strfile.c  Wed Oct  7 00:50:26 2015
(r288969)
+++ head/usr.bin/fortune/strfile/strfile.c  Wed Oct  7 01:25:47 2015
(r288970)
@@ -438,10 +438,6 @@ randomize(void)
off_t tmp;
off_t *sp;
 
-#if __FreeBSD_version < 800041
-   srandomdev();
-#endif
-
Tbl.str_flags |= STR_RANDOM;
cnt = Tbl.str_numstr;
 
@@ -450,11 +446,7 @@ randomize(void)
 */
 
for (sp = Seekpts; cnt > 0; cnt--, sp++) {
-#if __FreeBSD_version < 800041
-   i = random() % cnt;
-#else
i = arc4random_uniform(cnt);
-#endif
tmp = sp[0];
sp[0] = sp[i];
sp[i] = tmp;
___
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: r288916 - head/sys/kern

2015-10-06 Thread Gleb Smirnoff
Author: glebius
Date: Tue Oct  6 09:43:49 2015
New Revision: 288916
URL: https://svnweb.freebsd.org/changeset/base/288916

Log:
  Remove debugging variable from r143761.

Modified:
  head/sys/kern/uipc_mbuf.c

Modified: head/sys/kern/uipc_mbuf.c
==
--- head/sys/kern/uipc_mbuf.c   Tue Oct  6 08:43:48 2015(r288915)
+++ head/sys/kern/uipc_mbuf.c   Tue Oct  6 09:43:49 2015(r288916)
@@ -1034,8 +1034,6 @@ bad:
  * the amount of empty space before the data in the new mbuf to be specified
  * (in the event that the caller expects to prepend later).
  */
-int MSFail;
-
 struct mbuf *
 m_copyup(struct mbuf *n, int len, int dstoff)
 {
@@ -1072,7 +1070,6 @@ m_copyup(struct mbuf *n, int len, int ds
return (m);
  bad:
m_freem(n);
-   MSFail++;
return (NULL);
 }
 
___
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: r288911 - head/share/mk

2015-10-06 Thread Simon J. Gerraty
Bryan Drewery  wrote:
> > Are you refering to a src/share/mk which is sibling to src/ports/* or
> > something else?
> > 
> > Because with  MAKESYSPATH=.../share/mk src/share/mk/sys.mk is what you
> > should find.
> 
> Right. That's what I'm referring to and what I prefer.

Ok good. 

> If we update our checked in share/mk/custom.sys.env.mk file, we want all
> builds to get it before having to install it to /usr/share/mk. We for a
> period were using a script to wrap make to setup the environment before
> we realized sys.mk was already capable of doing this. Being able to bind
> a build to a specific environment is important, vs using the environment
> installed from the last build or a foreign /usr/share/mk (FreeBSD's files).

Sure, we use a wrapper script as it keeps life simple.

> > But there's no reason you cannot make exceptions - by (as I think you
> > already mentioned) adding a check for $SRCTOP/ports in local*sys*mk
> > to suppress src.conf at least.
> > 
> 
> Yes that has been my local fix for now.

Ok - FWIW I don't see any particular problem with that.
 
> Perhaps my fix should get checked in so no one else is surprised by
> src.conf, and all of the tweaks its options set, coming in.

Not sure I'd go that far.
You could perhaps add a comment to src.conf for anyone who's frustrated?
___
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: r288657 - head/sys/netinet6

2015-10-06 Thread Rui Paulo
On Sun, 2015-10-04 at 08:21 +, Alexander V. Chernikov wrote:
> Author: melifaro
> Date: Sun Oct  4 08:21:15 2015
> New Revision: 288657
> URL: https://svnweb.freebsd.org/changeset/base/288657
> 
> Log:
>   Add __noinline attribute to several functions to ease dtrace
> instrumentation
> 

What instrumentation?  Is there a DTrace script in userland that uses
these functions?  If not, this should not have been committed as you
just made the code slower.  This is one of those changes that should be
kept in your own repository.

-- 
Rui Paulo

___
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: r288959 - head/usr.sbin/iscsid

2015-10-06 Thread Xin LI
Author: delphij
Date: Tue Oct  6 22:45:23 2015
New Revision: 288959
URL: https://svnweb.freebsd.org/changeset/base/288959

Log:
  Remove a few unused headers.
  
  MFC after:2 weeks

Modified:
  head/usr.sbin/iscsid/discovery.c
  head/usr.sbin/iscsid/pdu.c

Modified: head/usr.sbin/iscsid/discovery.c
==
--- head/usr.sbin/iscsid/discovery.cTue Oct  6 22:28:28 2015
(r288958)
+++ head/usr.sbin/iscsid/discovery.cTue Oct  6 22:45:23 2015
(r288959)
@@ -33,10 +33,7 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
-#include 
 #include 
-#include 
-#include 
 #include 
 #include 
 

Modified: head/usr.sbin/iscsid/pdu.c
==
--- head/usr.sbin/iscsid/pdu.c  Tue Oct  6 22:28:28 2015(r288958)
+++ head/usr.sbin/iscsid/pdu.c  Tue Oct  6 22:45:23 2015(r288959)
@@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 
___
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: r288960 - head/usr.sbin/watch

2015-10-06 Thread Xin LI
Author: delphij
Date: Tue Oct  6 22:49:25 2015
New Revision: 288960
URL: https://svnweb.freebsd.org/changeset/base/288960

Log:
  Use strlcpy() when the string is expected to be nul-terminated.
  
  MFC after:2 weeks

Modified:
  head/usr.sbin/watch/watch.c

Modified: head/usr.sbin/watch/watch.c
==
--- head/usr.sbin/watch/watch.c Tue Oct  6 22:45:23 2015(r288959)
+++ head/usr.sbin/watch/watch.c Tue Oct  6 22:49:25 2015(r288960)
@@ -247,7 +247,7 @@ set_dev(const char *name)
if ((sb.st_mode & S_IFMT) != S_IFCHR)
fatal(EX_DATAERR, "must be a character device");
 
-   strncpy(dev_name, buf, DEV_NAME_LEN);
+   strlcpy(dev_name, buf, sizeof(dev_name));
 
attach_snp();
 }
@@ -340,7 +340,7 @@ main(int ac, char *av[])
else
fatal(EX_DATAERR, "no device name given");
} else
-   strncpy(dev_name, *av, DEV_NAME_LEN);
+   strlcpy(dev_name, *av, sizeof(dev_name));
 
set_dev(dev_name);
 
___
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: r288961 - head/tests/sys/kern

2015-10-06 Thread Bryan Drewery
Author: bdrewery
Date: Tue Oct  6 22:54:04 2015
New Revision: 288961
URL: https://svnweb.freebsd.org/changeset/base/288961

Log:
  Fix build with older GCC which, doesn't like 'main' being a variable name.

Modified:
  head/tests/sys/kern/ptrace_test.c

Modified: head/tests/sys/kern/ptrace_test.c
==
--- head/tests/sys/kern/ptrace_test.c   Tue Oct  6 22:49:25 2015
(r288960)
+++ head/tests/sys/kern/ptrace_test.c   Tue Oct  6 22:54:04 2015
(r288961)
@@ -1103,7 +1103,7 @@ ATF_TC_BODY(ptrace__new_child_pl_syscall
 {
struct ptrace_lwpinfo pl;
pid_t fpid, wpid;
-   lwpid_t main;
+   lwpid_t mainpid;
int status;
 
ATF_REQUIRE((fpid = fork()) != -1);
@@ -1126,7 +1126,7 @@ ATF_TC_BODY(ptrace__new_child_pl_syscall
 
ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t),
sizeof(pl)) != -1);
-   main = pl.pl_lwpid;
+   mainpid = pl.pl_lwpid;
 
/*
 * Continue the child ignoring the SIGSTOP and tracing all
@@ -1151,7 +1151,7 @@ ATF_TC_BODY(ptrace__new_child_pl_syscall
sizeof(pl)) != -1);
ATF_REQUIRE((pl.pl_flags & PL_FLAG_SCX) != 0);
ATF_REQUIRE(pl.pl_syscall_code != 0);
-   if (pl.pl_lwpid != main)
+   if (pl.pl_lwpid != mainpid)
/* New thread seen. */
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: r288962 - head/tests/sys/kern

2015-10-06 Thread John Baldwin
Author: jhb
Date: Tue Oct  6 22:59:00 2015
New Revision: 288962
URL: https://svnweb.freebsd.org/changeset/base/288962

Log:
  Tweak: use 'mainlwp' instead of 'mainpid' since this is a thread (LWP)
  identifier, not a pid.

Modified:
  head/tests/sys/kern/ptrace_test.c

Modified: head/tests/sys/kern/ptrace_test.c
==
--- head/tests/sys/kern/ptrace_test.c   Tue Oct  6 22:54:04 2015
(r288961)
+++ head/tests/sys/kern/ptrace_test.c   Tue Oct  6 22:59:00 2015
(r288962)
@@ -1103,7 +1103,7 @@ ATF_TC_BODY(ptrace__new_child_pl_syscall
 {
struct ptrace_lwpinfo pl;
pid_t fpid, wpid;
-   lwpid_t mainpid;
+   lwpid_t mainlwp;
int status;
 
ATF_REQUIRE((fpid = fork()) != -1);
@@ -1126,7 +1126,7 @@ ATF_TC_BODY(ptrace__new_child_pl_syscall
 
ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t),
sizeof(pl)) != -1);
-   mainpid = pl.pl_lwpid;
+   mainlwp = pl.pl_lwpid;
 
/*
 * Continue the child ignoring the SIGSTOP and tracing all
@@ -1151,7 +1151,7 @@ ATF_TC_BODY(ptrace__new_child_pl_syscall
sizeof(pl)) != -1);
ATF_REQUIRE((pl.pl_flags & PL_FLAG_SCX) != 0);
ATF_REQUIRE(pl.pl_syscall_code != 0);
-   if (pl.pl_lwpid != mainpid)
+   if (pl.pl_lwpid != mainlwp)
/* New thread seen. */
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: r288963 - in head: sbin/rtsol usr.sbin/rtadvd usr.sbin/rtsold

2015-10-06 Thread Xin LI
Author: delphij
Date: Tue Oct  6 23:42:58 2015
New Revision: 288963
URL: https://svnweb.freebsd.org/changeset/base/288963

Log:
  Now that we own the code, use arc4random(3) unconditionally
  and remove the corresponding HAVE_ARC4RANDOM conditions.
  
  MFC after:2 weeks

Modified:
  head/sbin/rtsol/Makefile
  head/usr.sbin/rtadvd/Makefile
  head/usr.sbin/rtadvd/rtadvd.c
  head/usr.sbin/rtsold/Makefile
  head/usr.sbin/rtsold/rtsold.c

Modified: head/sbin/rtsol/Makefile
==
--- head/sbin/rtsol/MakefileTue Oct  6 22:59:00 2015(r288962)
+++ head/sbin/rtsol/MakefileTue Oct  6 23:42:58 2015(r288963)
@@ -21,6 +21,6 @@ SRCS= rtsold.c rtsol.c if.c probe.c dump
 MAN=
 
 WARNS?=3
-CFLAGS+= -DHAVE_ARC4RANDOM -DSMALL
+CFLAGS+= -DSMALL
 
 .include 

Modified: head/usr.sbin/rtadvd/Makefile
==
--- head/usr.sbin/rtadvd/Makefile   Tue Oct  6 22:59:00 2015
(r288962)
+++ head/usr.sbin/rtadvd/Makefile   Tue Oct  6 23:42:58 2015
(r288963)
@@ -21,8 +21,6 @@ SRCS= rtadvd.c rrenum.c advcap.c if.c co
 
 LIBADD=util
 
-CFLAGS+= -DHAVE_ARC4RANDOM
-
 WARNS?=1
 
 .include 

Modified: head/usr.sbin/rtadvd/rtadvd.c
==
--- head/usr.sbin/rtadvd/rtadvd.c   Tue Oct  6 22:59:00 2015
(r288962)
+++ head/usr.sbin/rtadvd/rtadvd.c   Tue Oct  6 23:42:58 2015
(r288963)
@@ -241,14 +241,6 @@ main(int argc, char *argv[])
/* timer initialization */
rtadvd_timer_init();
 
-#ifndef HAVE_ARC4RANDOM
-   /* random value initialization */
-#ifdef __FreeBSD__
-   srandomdev();
-#else
-   srandom((unsigned long)time(NULL));
-#endif
-#endif
pfh = pidfile_open(pidfilename, 0600, );
if (pfh == NULL) {
if (errno == EEXIST)
@@ -1015,11 +1007,7 @@ set_short_delay(struct ifinfo *ifi)
 * delay and send the advertisement at the
 * already-scheduled time. RFC 4861 6.2.6
 */
-#ifdef HAVE_ARC4RANDOM
delay = arc4random_uniform(MAX_RA_DELAY_TIME);
-#else
-   delay = random() % MAX_RA_DELAY_TIME;
-#endif
interval.tv_sec = 0;
interval.tv_nsec = delay * 1000;
rest = rtadvd_timer_rest(ifi->ifi_ra_timer);
@@ -1893,13 +1881,8 @@ ra_timer_update(void *arg, struct timesp
 * MaxRtrAdvInterval (RFC4861 6.2.4).
 */
interval = rai->rai_mininterval;
-#ifdef HAVE_ARC4RANDOM
interval += arc4random_uniform(rai->rai_maxinterval -
rai->rai_mininterval);
-#else
-   interval += random() % (rai->rai_maxinterval -
-   rai->rai_mininterval);
-#endif
break;
case IFI_STATE_TRANSITIVE:
/*

Modified: head/usr.sbin/rtsold/Makefile
==
--- head/usr.sbin/rtsold/Makefile   Tue Oct  6 22:59:00 2015
(r288962)
+++ head/usr.sbin/rtsold/Makefile   Tue Oct  6 23:42:58 2015
(r288963)
@@ -20,6 +20,5 @@ MLINKS=   rtsold.8 rtsol.8
 SRCS=  rtsold.c rtsol.c if.c probe.c dump.c rtsock.c
 
 WARNS?=3
-CFLAGS+= -DHAVE_ARC4RANDOM
 
 .include 

Modified: head/usr.sbin/rtsold/rtsold.c
==
--- head/usr.sbin/rtsold/rtsold.c   Tue Oct  6 22:59:00 2015
(r288962)
+++ head/usr.sbin/rtsold/rtsold.c   Tue Oct  6 23:42:58 2015
(r288963)
@@ -214,10 +214,6 @@ main(int argc, char **argv)
errx(1, "pid filename (%s) must be an absolute path",
pidfilename);
}
-#ifndef HAVE_ARC4RANDOM
-   /* random value initialization */
-   srandom((u_long)time(NULL));
-#endif
 
 #if (__FreeBSD_version < 90)
if (Fflag) {
@@ -725,11 +721,7 @@ rtsol_timer_update(struct ifinfo *ifi)
ifi->timer = tm_max;/* stop timer(valid?) */
break;
case IFS_DELAY:
-#ifndef HAVE_ARC4RANDOM
-   interval = random() % (MAX_RTR_SOLICITATION_DELAY * MILLION);
-#else
interval = arc4random_uniform(MAX_RTR_SOLICITATION_DELAY * 
MILLION);
-#endif
ifi->timer.tv_sec = interval / MILLION;
ifi->timer.tv_nsec = (interval % MILLION) * 1000;
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: r288917 - in head/sys: amd64/amd64 amd64/include dev/xen/blkfront i386/i386 i386/include xen xen/interface xen/interface/arch-arm/hvm xen/interface/arch-x86 xen/interface/arch-x86/hvm x...

2015-10-06 Thread Roger Pau Monné
Author: royger
Date: Tue Oct  6 11:29:44 2015
New Revision: 288917
URL: https://svnweb.freebsd.org/changeset/base/288917

Log:
  Update Xen headers from 4.2 to 4.6
  
  Pull the latest headers for Xen which allow us to add support for ARM and
  use new features in FreeBSD.
  
  This is a verbatim copy of the xen/include/public so every headers which
  don't exits anymore in the Xen repositories have been dropped.
  
  Note the interface version hasn't been bumped, it will be done in a
  follow-up. Although, it requires fix in the code to get it compiled:
  
   - sys/xen/xen_intr.h: evtchn_port_t is already defined in the headers so
 drop it.
  
   - {amd64,i386}/include/intr_machdep.h: NR_EVENT_CHANNELS now depends on
 xen/interface/event_channel.h, so include it.
  
   - {amd64,i386}/{amd64,i386}/support.S: It's not neccessary to include
 machine/intr_machdep.h. This is also fixing build compilation with the
 new headers.
  
   - dev/xen/blkfront/blkfront.c: The typedef for blkif_request_segmenthas
 been dropped. So directly use struct blkif_request_segment
  
  Finally, modify xen/interface/xen-compat.h to throw a preprocessing error if
  __XEN_INTERFACE_VERSION__ is not set. This is allow us to catch any file
  where xen/xen-os.h is not correctly included.
  
  Submitted by: Julien Grall 
  Reviewed by:  royger
  Differential Revision:https://reviews.freebsd.org/D3805
  Sponsored by: Citrix Systems R

Added:
  head/sys/xen/interface/arch-x86/pmu.h   (contents, props changed)
  head/sys/xen/interface/errno.h   (contents, props changed)
  head/sys/xen/interface/gcov.h   (contents, props changed)
  head/sys/xen/interface/hvm/hvm_xs_strings.h   (contents, props changed)
  head/sys/xen/interface/hvm/pvdrivers.h   (contents, props changed)
  head/sys/xen/interface/pmu.h   (contents, props changed)
  head/sys/xen/interface/vm_event.h   (contents, props changed)
Deleted:
  head/sys/xen/interface/acm.h
  head/sys/xen/interface/acm_ops.h
  head/sys/xen/interface/arch-powerpc.h
  head/sys/xen/interface/elfstructs.h
  head/sys/xen/interface/foreign/
  head/sys/xen/interface/libelf.h
  head/sys/xen/interface/mem_event.h
Modified:
  head/sys/amd64/amd64/support.S
  head/sys/amd64/include/intr_machdep.h
  head/sys/dev/xen/blkfront/blkfront.c
  head/sys/i386/i386/support.s
  head/sys/i386/include/intr_machdep.h
  head/sys/xen/interface/arch-arm.h
  head/sys/xen/interface/arch-arm/hvm/save.h
  head/sys/xen/interface/arch-x86/cpuid.h
  head/sys/xen/interface/arch-x86/hvm/save.h
  head/sys/xen/interface/arch-x86/xen-mca.h
  head/sys/xen/interface/arch-x86/xen-x86_32.h
  head/sys/xen/interface/arch-x86/xen-x86_64.h
  head/sys/xen/interface/arch-x86/xen.h
  head/sys/xen/interface/callback.h
  head/sys/xen/interface/dom0_ops.h
  head/sys/xen/interface/domctl.h
  head/sys/xen/interface/elfnote.h
  head/sys/xen/interface/event_channel.h
  head/sys/xen/interface/features.h
  head/sys/xen/interface/grant_table.h
  head/sys/xen/interface/hvm/e820.h
  head/sys/xen/interface/hvm/hvm_info_table.h
  head/sys/xen/interface/hvm/hvm_op.h
  head/sys/xen/interface/hvm/ioreq.h
  head/sys/xen/interface/hvm/params.h
  head/sys/xen/interface/hvm/save.h
  head/sys/xen/interface/io/blkif.h
  head/sys/xen/interface/io/console.h
  head/sys/xen/interface/io/fbif.h
  head/sys/xen/interface/io/kbdif.h
  head/sys/xen/interface/io/libxenvchan.h
  head/sys/xen/interface/io/netif.h
  head/sys/xen/interface/io/pciif.h
  head/sys/xen/interface/io/protocols.h
  head/sys/xen/interface/io/ring.h
  head/sys/xen/interface/io/tpmif.h
  head/sys/xen/interface/io/usbif.h
  head/sys/xen/interface/io/vscsiif.h
  head/sys/xen/interface/io/xenbus.h
  head/sys/xen/interface/io/xs_wire.h
  head/sys/xen/interface/kexec.h
  head/sys/xen/interface/memory.h
  head/sys/xen/interface/nmi.h
  head/sys/xen/interface/physdev.h
  head/sys/xen/interface/platform.h
  head/sys/xen/interface/sched.h
  head/sys/xen/interface/sysctl.h
  head/sys/xen/interface/tmem.h
  head/sys/xen/interface/trace.h
  head/sys/xen/interface/vcpu.h
  head/sys/xen/interface/version.h
  head/sys/xen/interface/xen-compat.h
  head/sys/xen/interface/xen.h
  head/sys/xen/interface/xenoprof.h
  head/sys/xen/interface/xsm/flask_op.h
  head/sys/xen/xen_intr.h

Modified: head/sys/amd64/amd64/support.S
==
--- head/sys/amd64/amd64/support.S  Tue Oct  6 09:43:49 2015
(r288916)
+++ head/sys/amd64/amd64/support.S  Tue Oct  6 11:29:44 2015
(r288917)
@@ -33,7 +33,6 @@
 #include "opt_ddb.h"
 
 #include 
-#include 
 #include 
 
 #include "assym.s"

Modified: head/sys/amd64/include/intr_machdep.h
==
--- head/sys/amd64/include/intr_machdep.h   Tue Oct  6 09:43:49 2015
(r288916)
+++ head/sys/amd64/include/intr_machdep.h   Tue Oct  6 11:29:44 2015

svn commit: r288929 - in head: etc/mtree lib/libxo lib/libxo/tests usr.bin/xo usr.bin/xo/tests

2015-10-06 Thread Garrett Cooper
Author: ngie
Date: Tue Oct  6 16:58:47 2015
New Revision: 288929
URL: https://svnweb.freebsd.org/changeset/base/288929

Log:
  Integrate the tests from libxo into the FreeBSD test suite
  
  The functional_test.sh harness for each test subdir was inspired
  by the version in bin/sh/tests/functional_test.sh
  
  Some gymnastics were required to deal with implicit rules for
  .c / .o -> .out as the suffix transformation rules were
  incorrectly trying to create the test outputs from some of the
  source files
  
  Sponsored by: EMC / Isilon Storage Division

Added:
  head/lib/libxo/tests/
  head/lib/libxo/tests/Makefile   (contents, props changed)
  head/lib/libxo/tests/functional_test.sh
 - copied, changed from r288904, head/bin/sh/tests/functional_test.sh
  head/usr.bin/xo/tests/
  head/usr.bin/xo/tests/Makefile   (contents, props changed)
  head/usr.bin/xo/tests/functional_test.sh
 - copied, changed from r288904, head/bin/sh/tests/functional_test.sh
Modified:
  head/etc/mtree/BSD.tests.dist
  head/lib/libxo/Makefile
  head/usr.bin/xo/Makefile

Modified: head/etc/mtree/BSD.tests.dist
==
--- head/etc/mtree/BSD.tests.dist   Tue Oct  6 16:35:50 2015
(r288928)
+++ head/etc/mtree/BSD.tests.dist   Tue Oct  6 16:58:47 2015
(r288929)
@@ -310,6 +310,8 @@
 ..
 libutil
 ..
+libxo
+..
 msun
 ..
 ..
@@ -568,6 +570,8 @@
 ..
 xargs
 ..
+xo
+..
 yacc
 yacc
 ..

Modified: head/lib/libxo/Makefile
==
--- head/lib/libxo/Makefile Tue Oct  6 16:35:50 2015(r288928)
+++ head/lib/libxo/Makefile Tue Oct  6 16:58:47 2015(r288929)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include 
+
 LIBXOSRC=  ${SRCTOP}/contrib/libxo
 
 .PATH: ${LIBXOSRC}/libxo
@@ -102,4 +104,8 @@ MLINKS= xo_attr.3 xo_attr_h.3 \
xo_syslog.3 xo_set_logmask.3 \
xo_syslog.3 xo_vsyslog.3
 
+.if ${MK_TESTS} != "no"
+SUBDIR+=   tests
+.endif
+
 .include 

Added: head/lib/libxo/tests/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/libxo/tests/Makefile   Tue Oct  6 16:58:47 2015
(r288929)
@@ -0,0 +1,253 @@
+# $FreeBSD$
+
+.include 
+
+LIBXOSRC=  ${SRCTOP}/contrib/libxo
+
+# Override the default suffix transformation rules for .c/.o -> .out
+.SUFFIXES:
+.SUFFIXES: .c .err .o .out .sh
+
+.PATH:
+.PATH.c: ${LIBXOSRC}/libxo ${LIBXOSRC}/tests/core
+.PATH.err: ${LIBXOSRC}/tests/core/saved
+.PATH.out: ${LIBXOSRC}/tests/core/saved
+
+.c.out .o.out:
+
+TESTSDIR=  ${TESTSBASE}/lib/libxo
+
+ATF_TESTS_SH+= functional_test
+
+BINDIR=${TESTSDIR}
+
+FILES+= test_01.E.err
+FILES+= test_01.E.out
+FILES+= test_01.H.err
+FILES+= test_01.H.out
+FILES+= test_01.HIPx.err
+FILES+= test_01.HIPx.out
+FILES+= test_01.HP.err
+FILES+= test_01.HP.out
+FILES+= test_01.J.err
+FILES+= test_01.J.out
+FILES+= test_01.JP.err
+FILES+= test_01.JP.out
+FILES+= test_01.T.err
+FILES+= test_01.T.out
+FILES+= test_01.X.err
+FILES+= test_01.X.out
+FILES+= test_01.XP.err
+FILES+= test_01.XP.out
+FILES+= test_01.err
+FILES+= test_01.out
+FILES+= test_02.E.err
+FILES+= test_02.E.out
+FILES+= test_02.H.err
+FILES+= test_02.H.out
+FILES+= test_02.HIPx.err
+FILES+= test_02.HIPx.out
+FILES+= test_02.HP.err
+FILES+= test_02.HP.out
+FILES+= test_02.J.err
+FILES+= test_02.J.out
+FILES+= test_02.JP.err
+FILES+= test_02.JP.out
+FILES+= test_02.T.err
+FILES+= test_02.T.out
+FILES+= test_02.X.err
+FILES+= test_02.X.out
+FILES+= test_02.XP.err
+FILES+= test_02.XP.out
+FILES+= test_02.err
+FILES+= test_02.out
+FILES+= test_03.E.err
+FILES+= test_03.E.out
+FILES+= test_03.H.err
+FILES+= test_03.H.out
+FILES+= test_03.HIPx.err
+FILES+= test_03.HIPx.out
+FILES+= test_03.HP.err
+FILES+= test_03.HP.out
+FILES+= test_03.J.err
+FILES+= test_03.J.out
+FILES+= test_03.JP.err
+FILES+= test_03.JP.out
+FILES+= test_03.T.err
+FILES+= test_03.T.out
+FILES+= test_03.X.err
+FILES+= test_03.X.out
+FILES+= test_03.XP.err
+FILES+= test_03.XP.out
+FILES+= test_03.err
+FILES+= test_03.out
+FILES+= test_04.E.err
+FILES+= test_04.E.out
+FILES+= test_04.H.err
+FILES+= test_04.H.out
+FILES+= test_04.HIPx.err
+FILES+= test_04.HIPx.out
+FILES+= test_04.HP.err
+FILES+= test_04.HP.out
+FILES+= test_04.J.err
+FILES+= test_04.J.out
+FILES+= test_04.JP.err
+FILES+= test_04.JP.out
+FILES+= test_04.T.err
+FILES+= test_04.T.out
+FILES+= test_04.X.err
+FILES+= test_04.X.out
+FILES+= test_04.XP.err
+FILES+= test_04.XP.out
+FILES+= test_05.E.err
+FILES+= test_05.E.out
+FILES+= test_05.H.err
+FILES+= test_05.H.out
+FILES+= test_05.HIPx.err
+FILES+= test_05.HIPx.out
+FILES+= test_05.HP.err
+FILES+= test_05.HP.out
+FILES+= test_05.J.err
+FILES+= test_05.J.out
+FILES+= 

svn commit: r288933 - head/lib/libxo/tests

2015-10-06 Thread Garrett Cooper
Author: ngie
Date: Tue Oct  6 17:18:15 2015
New Revision: 288933
URL: https://svnweb.freebsd.org/changeset/base/288933

Log:
  Remove a comment from an earlier iteration of trying to figure out how the
  test encoder testcases worked

Modified:
  head/lib/libxo/tests/Makefile

Modified: head/lib/libxo/tests/Makefile
==
--- head/lib/libxo/tests/Makefile   Tue Oct  6 17:15:07 2015
(r288932)
+++ head/lib/libxo/tests/Makefile   Tue Oct  6 17:18:15 2015
(r288933)
@@ -228,9 +228,6 @@ FILES+= test_11.X.out
 FILES+= test_11.XP.err
 FILES+= test_11.XP.out
 
-# XXX: the `E` format testcases don't appear to match the expected format.
-#FILES:=   ${FILES:N*.E.*}
-
 PROGS+= test_01
 PROGS+= test_02
 PROGS+= test_03
___
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: r288934 - head/lib/libxo/tests/encoder

2015-10-06 Thread Garrett Cooper
Author: ngie
Date: Tue Oct  6 17:22:54 2015
New Revision: 288934
URL: https://svnweb.freebsd.org/changeset/base/288934

Log:
  Add directory for test encoder missed by accident in r288929
  
  Sponsored by: EMC / Isilon Storage Division

Added:
  head/lib/libxo/tests/encoder/
  head/lib/libxo/tests/encoder/Makefile   (contents, props changed)

Added: head/lib/libxo/tests/encoder/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/libxo/tests/encoder/Makefile   Tue Oct  6 17:22:54 2015
(r288934)
@@ -0,0 +1,20 @@
+# $FreeBSD$
+
+LIBXOSRC=  ${SRCTOP}/contrib/libxo
+
+.PATH: ${LIBXOSRC}/encoder/test
+
+SHLIB_NAME=libenc_test.so
+
+LIBDIR=${TESTSBASE}/lib/libxo
+
+SYMLINKS+= ${LIBDIR}/${SHLIB_NAME} /usr/lib/libxo/encoder/test.enc
+
+SRCS=  enc_test.c
+
+CFLAGS+=   -I${LIBXOSRC}/libxo
+
+DPADD+=${LIBXO}
+LDADD+=-lxo
+
+.include 
___
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"