Re: svn commit: r313037 - in head/sys: amd64/include kern mips/include net powerpc/include sparc64/include

2017-02-03 Thread Jason Harmening
It's hard to argue with that:)  I've backed it out until we can figure out
what's going on.
Sorry for the breakage.

On Fri, Feb 3, 2017 at 9:54 PM, Kurt Lidl  wrote:

> Having just spent a couple of hours bisecting what broke the kernel on
> my mips64 machine, I can definitively state it was this commit.
>
> With this commit in place, the kernel hangs early in the
> autoconfiguration:
>
> gcc version 4.2.1 20070831 patched [FreeBSD]
> Preloaded elf kernel "kernel" at 0x80aa96a0.
> real memory  = 523239424 (510976K bytes)
> Physical memory chunk(s):
> 0x00bf3000 - 0x080d5fff, 122564608 bytes (29923 pages)
> 0x08101000 - 0x0ff00fff, 132120576 bytes (32256 pages)
> 0x41000 - 0x41f196fff, 253325312 bytes (61847 pages)
> avail memory = 504360960 (480MB)
> Create COP2 context zone
> AP #1 started!
> FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
>  hangs here 
>
> -Kurt
>
> On 2/4/17 12:29 AM, Jason Harmening wrote:
>
>> Hi,
>>
>> I'm a bit confused as to how this change breaks MIPS.  The new function,
>> get_pcpu() is intended to be used only to access the per-cpu data
>> pointer locally.  It returns pcpup, which is the per-cpu pointer wired
>> into the local TLB to translate to the local CPU's physical data region,
>> correct?
>>
>> This is the same value used by the per-CPU accessors such as PCPU_ADD
>> and PCPU_GET.  The MI portions of this change only use get_pcpu() to
>> access  the local CPU's data, e.g. under a critical section in the
>> rmlock.  It is not intended to be used for iterating all CPUs.
>>
>> If I've missed something and MIPS is truly broken by this, then I'll
>> gladly revert, but (maybe because it's late) I'm not seeing where this
>> goes wrong on MIPS.
>>
>> Thanks,
>> Jason
>>
>> On Fri, Feb 3, 2017 at 8:12 PM, Alexander Kabaev > > wrote:
>>
>> On Wed, 1 Feb 2017 03:32:49 + (UTC)
>> "Jason A. Harmening"  wrote:
>>
>> > Author: jah
>> > Date: Wed Feb  1 03:32:49 2017
>> > New Revision: 313037
>> > URL: https://svnweb.freebsd.org/changeset/base/313037
>> 
>> >
>> > Log:
>> >   Implement get_pcpu() for the remaining architectures and use it to
>> >   replace pcpu_find(curcpu) in MI code.
>> >
>> > Modified:
>> >   head/sys/amd64/include/pcpu.h
>> >   head/sys/kern/kern_rmlock.c
>> >   head/sys/mips/include/pcpu.h
>> >   head/sys/net/netisr.c
>> >   head/sys/powerpc/include/cpufunc.h
>> >   head/sys/powerpc/include/pcpu.h
>> >   head/sys/sparc64/include/pcpu.h
>> >
>>
>> Hi,
>>
>> this change was not reviewed nor testing was thought for all
>> architectures it touches. The change happens to break MIPS quite
>> thoroughly, since MIPS is using different pointers when accessing PCPU
>> area locally and when doing iterations using cpu_to_cpuid array. I
>> therefore officially am requesting this change to be reverted until
>> reasonable solution is found to unbreak architectures that use wired
>> TLBs to access local per-CPU data.
>>
>> --
>> Alexander Kabaev
>>
>>
>>
>
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313193 - in head/sys: amd64/include kern mips/include net powerpc/include sparc64/include

2017-02-03 Thread Jason A. Harmening
Author: jah
Date: Sat Feb  4 06:24:49 2017
New Revision: 313193
URL: https://svnweb.freebsd.org/changeset/base/313193

Log:
  Revert r313037
  
  The switch to get_pcpu() in MI code seems to cause hangs on MIPS.
  Back out until we can get a better idea of what's happening there.
  
  Reported by:  kan, lidl

Modified:
  head/sys/amd64/include/pcpu.h
  head/sys/kern/kern_rmlock.c
  head/sys/mips/include/pcpu.h
  head/sys/net/netisr.c
  head/sys/powerpc/include/cpufunc.h
  head/sys/powerpc/include/pcpu.h
  head/sys/sparc64/include/pcpu.h

Modified: head/sys/amd64/include/pcpu.h
==
--- head/sys/amd64/include/pcpu.h   Sat Feb  4 06:12:48 2017
(r313192)
+++ head/sys/amd64/include/pcpu.h   Sat Feb  4 06:24:49 2017
(r313193)
@@ -78,7 +78,6 @@
 
 extern struct pcpu *pcpup;
 
-#defineget_pcpu()  (pcpup)
 #definePCPU_GET(member)(pcpup->pc_ ## member)
 #definePCPU_ADD(member, val)   (pcpup->pc_ ## member += (val))
 #definePCPU_INC(member)PCPU_ADD(member, 1)
@@ -204,15 +203,6 @@ extern struct pcpu *pcpup;
}   \
 }
 
-#defineget_pcpu() __extension__ ({ 
\
-   struct pcpu *__pc;  \
-   \
-   __asm __volatile("movq %%gs:%1,%0"  \
-   : "=r" (__pc)   \
-   : "m" (*(struct pcpu *)(__pcpu_offset(pc_prvspace;  \
-   __pc;   \
-})
-
 #definePCPU_GET(member)__PCPU_GET(pc_ ## member)
 #definePCPU_ADD(member, val)   __PCPU_ADD(pc_ ## member, val)
 #definePCPU_INC(member)__PCPU_INC(pc_ ## member)

Modified: head/sys/kern/kern_rmlock.c
==
--- head/sys/kern/kern_rmlock.c Sat Feb  4 06:12:48 2017(r313192)
+++ head/sys/kern/kern_rmlock.c Sat Feb  4 06:24:49 2017(r313193)
@@ -156,7 +156,7 @@ unlock_rm(struct lock_object *lock)
 */
critical_enter();
td = curthread;
-   pc = get_pcpu();
+   pc = pcpu_find(curcpu);
for (queue = pc->pc_rm_queue.rmq_next;
queue != &pc->pc_rm_queue; queue = queue->rmq_next) {
tracker = (struct rm_priotracker *)queue;
@@ -258,7 +258,7 @@ rm_cleanIPI(void *arg)
struct rmlock *rm = arg;
struct rm_priotracker *tracker;
struct rm_queue *queue;
-   pc = get_pcpu();
+   pc = pcpu_find(curcpu);
 
for (queue = pc->pc_rm_queue.rmq_next; queue != &pc->pc_rm_queue;
queue = queue->rmq_next) {
@@ -355,7 +355,7 @@ _rm_rlock_hard(struct rmlock *rm, struct
struct pcpu *pc;
 
critical_enter();
-   pc = get_pcpu();
+   pc = pcpu_find(curcpu);
 
/* Check if we just need to do a proper critical_exit. */
if (!CPU_ISSET(pc->pc_cpuid, &rm->rm_writecpus)) {
@@ -416,7 +416,7 @@ _rm_rlock_hard(struct rmlock *rm, struct
}
 
critical_enter();
-   pc = get_pcpu();
+   pc = pcpu_find(curcpu);
CPU_CLR(pc->pc_cpuid, &rm->rm_writecpus);
rm_tracker_add(pc, tracker);
sched_pin();
@@ -641,7 +641,7 @@ _rm_rlock_debug(struct rmlock *rm, struc
 #ifdef INVARIANTS
if (!(rm->lock_object.lo_flags & LO_RECURSABLE) && !trylock) {
critical_enter();
-   KASSERT(rm_trackers_present(get_pcpu(), rm,
+   KASSERT(rm_trackers_present(pcpu_find(curcpu), rm,
curthread) == 0,
("rm_rlock: recursed on non-recursive rmlock %s @ %s:%d\n",
rm->lock_object.lo_name, file, line));
@@ -771,7 +771,7 @@ _rm_assert(const struct rmlock *rm, int 
}
 
critical_enter();
-   count = rm_trackers_present(get_pcpu(), rm, curthread);
+   count = rm_trackers_present(pcpu_find(curcpu), rm, curthread);
critical_exit();
 
if (count == 0)
@@ -797,7 +797,7 @@ _rm_assert(const struct rmlock *rm, int 
rm->lock_object.lo_name, file, line);
 
critical_enter();
-   count = rm_trackers_present(get_pcpu(), rm, curthread);
+   count = rm_trackers_present(pcpu_find(curcpu), rm, curthread);
critical_exit();
 
if (count != 0)

Modified: head/sys/mips/include/pcpu.h
==
--- head/sys/mips/include/pcpu.hSat Feb  4 06:12:48 2017
(r313192)
+++ head/sys/mips/include/pcpu.hSat Feb  4 0

svn commit: r313192 - in head/sbin: hastctl hastd

2017-02-03 Thread Allan Jude
Author: allanjude
Date: Sat Feb  4 06:12:48 2017
New Revision: 313192
URL: https://svnweb.freebsd.org/changeset/base/313192

Log:
  Switch hastctl and hastd to libmd instead of openssl for sha256
  
  Reviewed by:  bapt, brnrd, pjd
  Approved by:  pjd (maintainer)
  Sponsored by: ScaleEngine Inc., FOSDEM DevSummit
  Differential Revision:https://reviews.freebsd.org/D9423

Modified:
  head/sbin/hastctl/Makefile
  head/sbin/hastd/Makefile
  head/sbin/hastd/hast_checksum.c
  head/sbin/hastd/hast_proto.c

Modified: head/sbin/hastctl/Makefile
==
--- head/sbin/hastctl/Makefile  Sat Feb  4 05:53:00 2017(r313191)
+++ head/sbin/hastctl/Makefile  Sat Feb  4 06:12:48 2017(r313192)
@@ -33,11 +33,7 @@ CFLAGS+=-DINET6
 CFLAGS+=-DYY_NO_UNPUT
 CFLAGS+=-DYY_NO_INPUT
 
-LIBADD=util
-.if ${MK_OPENSSL} != "no"
-LIBADD+=   crypto
-CFLAGS+=-DHAVE_CRYPTO
-.endif
+LIBADD=md util
 
 YFLAGS+=-v
 

Modified: head/sbin/hastd/Makefile
==
--- head/sbin/hastd/MakefileSat Feb  4 05:53:00 2017(r313191)
+++ head/sbin/hastd/MakefileSat Feb  4 06:12:48 2017(r313192)
@@ -31,11 +31,7 @@ CFLAGS+=-DINET
 CFLAGS+=-DINET6
 .endif
 
-LIBADD=geom pthread util
-.if ${MK_OPENSSL} != "no"
-LIBADD+=   crypto
-CFLAGS+=-DHAVE_CRYPTO
-.endif
+LIBADD=geom md pthread util
 
 YFLAGS+=-v
 

Modified: head/sbin/hastd/hast_checksum.c
==
--- head/sbin/hastd/hast_checksum.c Sat Feb  4 05:53:00 2017
(r313191)
+++ head/sbin/hastd/hast_checksum.c Sat Feb  4 06:12:48 2017
(r313192)
@@ -31,22 +31,15 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#ifdef HAVE_CRYPTO
-#include 
-#endif
-
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include "hast_checksum.h"
 
-#ifdef HAVE_CRYPTO
 #defineMAX_HASH_SIZE   SHA256_DIGEST_LENGTH
-#else
-#defineMAX_HASH_SIZE   4
-#endif
 
 static void
 hast_crc32_checksum(const unsigned char *data, size_t size,
@@ -60,7 +53,6 @@ hast_crc32_checksum(const unsigned char 
*hsizep = sizeof(crc);
 }
 
-#ifdef HAVE_CRYPTO
 static void
 hast_sha256_checksum(const unsigned char *data, size_t size,
 unsigned char *hash, size_t *hsizep)
@@ -72,7 +64,6 @@ hast_sha256_checksum(const unsigned char
SHA256_Final(hash, &ctx);
*hsizep = SHA256_DIGEST_LENGTH;
 }
-#endif /* HAVE_CRYPTO */
 
 const char *
 checksum_name(int num)
@@ -102,11 +93,9 @@ checksum_send(const struct hast_resource
case HAST_CHECKSUM_CRC32:
hast_crc32_checksum(*datap, *sizep, hash, &hsize);
break;
-#ifdef HAVE_CRYPTO
case HAST_CHECKSUM_SHA256:
hast_sha256_checksum(*datap, *sizep, hash, &hsize);
break;
-#endif
default:
PJDLOG_ABORT("Invalid checksum: %d.", res->hr_checksum);
}
@@ -138,10 +127,8 @@ checksum_recv(const struct hast_resource
}
if (strcmp(algo, "crc32") == 0)
hast_crc32_checksum(*datap, *sizep, chash, &chsize);
-#ifdef HAVE_CRYPTO
else if (strcmp(algo, "sha256") == 0)
hast_sha256_checksum(*datap, *sizep, chash, &chsize);
-#endif
else {
pjdlog_error("Unknown checksum algorithm '%s'.", algo);
return (-1);/* Unknown checksum algorithm. */

Modified: head/sbin/hastd/hast_proto.c
==
--- head/sbin/hastd/hast_proto.cSat Feb  4 05:53:00 2017
(r313191)
+++ head/sbin/hastd/hast_proto.cSat Feb  4 06:12:48 2017
(r313192)
@@ -42,9 +42,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#ifdef HAVE_CRYPTO
 #include "hast_checksum.h"
-#endif
 #include "hast_compression.h"
 #include "hast_proto.h"
 
@@ -68,9 +66,7 @@ struct hast_pipe_stage {
 
 static struct hast_pipe_stage pipeline[] = {
{ "compression", compression_send, compression_recv },
-#ifdef HAVE_CRYPTO
{ "checksum", checksum_send, checksum_recv }
-#endif
 };
 
 /*
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r313037 - in head/sys: amd64/include kern mips/include net powerpc/include sparc64/include

2017-02-03 Thread Kurt Lidl

Having just spent a couple of hours bisecting what broke the kernel on
my mips64 machine, I can definitively state it was this commit.

With this commit in place, the kernel hangs early in the
autoconfiguration:

gcc version 4.2.1 20070831 patched [FreeBSD]
Preloaded elf kernel "kernel" at 0x80aa96a0.
real memory  = 523239424 (510976K bytes)
Physical memory chunk(s):
0x00bf3000 - 0x080d5fff, 122564608 bytes (29923 pages)
0x08101000 - 0x0ff00fff, 132120576 bytes (32256 pages)
0x41000 - 0x41f196fff, 253325312 bytes (61847 pages)
avail memory = 504360960 (480MB)
Create COP2 context zone
AP #1 started!
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
 hangs here 

-Kurt

On 2/4/17 12:29 AM, Jason Harmening wrote:

Hi,

I'm a bit confused as to how this change breaks MIPS.  The new function,
get_pcpu() is intended to be used only to access the per-cpu data
pointer locally.  It returns pcpup, which is the per-cpu pointer wired
into the local TLB to translate to the local CPU's physical data region,
correct?

This is the same value used by the per-CPU accessors such as PCPU_ADD
and PCPU_GET.  The MI portions of this change only use get_pcpu() to
access  the local CPU's data, e.g. under a critical section in the
rmlock.  It is not intended to be used for iterating all CPUs.

If I've missed something and MIPS is truly broken by this, then I'll
gladly revert, but (maybe because it's late) I'm not seeing where this
goes wrong on MIPS.

Thanks,
Jason

On Fri, Feb 3, 2017 at 8:12 PM, Alexander Kabaev mailto:kab...@gmail.com>> wrote:

On Wed, 1 Feb 2017 03:32:49 + (UTC)
"Jason A. Harmening"  wrote:

> Author: jah
> Date: Wed Feb  1 03:32:49 2017
> New Revision: 313037
> URL: https://svnweb.freebsd.org/changeset/base/313037

>
> Log:
>   Implement get_pcpu() for the remaining architectures and use it to
>   replace pcpu_find(curcpu) in MI code.
>
> Modified:
>   head/sys/amd64/include/pcpu.h
>   head/sys/kern/kern_rmlock.c
>   head/sys/mips/include/pcpu.h
>   head/sys/net/netisr.c
>   head/sys/powerpc/include/cpufunc.h
>   head/sys/powerpc/include/pcpu.h
>   head/sys/sparc64/include/pcpu.h
>

Hi,

this change was not reviewed nor testing was thought for all
architectures it touches. The change happens to break MIPS quite
thoroughly, since MIPS is using different pointers when accessing PCPU
area locally and when doing iterations using cpu_to_cpuid array. I
therefore officially am requesting this change to be reverted until
reasonable solution is found to unbreak architectures that use wired
TLBs to access local per-CPU data.

--
Alexander Kabaev




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


svn commit: r313190 - head/sbin/nvmecontrol

2017-02-03 Thread Warner Losh
Author: imp
Date: Sat Feb  4 05:52:53 2017
New Revision: 313190
URL: https://svnweb.freebsd.org/changeset/base/313190

Log:
  Move the usage and command name lookup into functions.

Modified:
  head/sbin/nvmecontrol/nvmecontrol.c
  head/sbin/nvmecontrol/nvmecontrol.h

Modified: head/sbin/nvmecontrol/nvmecontrol.c
==
--- head/sbin/nvmecontrol/nvmecontrol.c Sat Feb  4 05:52:51 2017
(r313189)
+++ head/sbin/nvmecontrol/nvmecontrol.c Sat Feb  4 05:52:53 2017
(r313190)
@@ -45,13 +45,8 @@ __FBSDID("$FreeBSD$");
 
 #include "nvmecontrol.h"
 
-typedef void (*nvme_fn_t)(int argc, char *argv[]);
 
-static struct nvme_function {
-   const char  *name;
-   nvme_fn_t   fn;
-   const char  *usage;
-} funcs[] = {
+static struct nvme_function funcs[] = {
{"devlist", devlist,DEVLIST_USAGE},
{"identify",identify,   IDENTIFY_USAGE},
{"perftest",perftest,   PERFTEST_USAGE},
@@ -62,12 +57,10 @@ static struct nvme_function {
{NULL,  NULL,   NULL},
 };
 
-static void
-usage(void)
+void
+gen_usage(struct nvme_function *f)
 {
-   struct nvme_function *f;
 
-   f = funcs;
fprintf(stderr, "usage:\n");
while (f->name != NULL) {
fprintf(stderr, "%s", f->usage);
@@ -76,6 +69,21 @@ usage(void)
exit(1);
 }
 
+void
+dispatch(int argc, char *argv[], struct nvme_function *tbl)
+{
+   struct nvme_function *f = tbl;
+
+   while (f->name != NULL) {
+   if (strcmp(argv[1], f->name) == 0)
+   f->fn(argc-1, &argv[1]);
+   f++;
+   }
+
+   fprintf(stderr, "Unknown command: %s\n", argv[1]);
+   gen_usage(tbl);
+}
+
 static void
 print_bytes(void *data, uint32_t length)
 {
@@ -217,19 +225,11 @@ parse_ns_str(const char *ns_str, char *c
 int
 main(int argc, char *argv[])
 {
-   struct nvme_function *f;
 
if (argc < 2)
-   usage();
-
-   f = funcs;
-   while (f->name != NULL) {
-   if (strcmp(argv[1], f->name) == 0)
-   f->fn(argc-1, &argv[1]);
-   f++;
-   }
+   gen_usage(funcs);
 
-   usage();
+   dispatch(argc, argv, funcs);
 
return (0);
 }

Modified: head/sbin/nvmecontrol/nvmecontrol.h
==
--- head/sbin/nvmecontrol/nvmecontrol.h Sat Feb  4 05:52:51 2017
(r313189)
+++ head/sbin/nvmecontrol/nvmecontrol.h Sat Feb  4 05:52:53 2017
(r313190)
@@ -31,6 +31,14 @@
 
 #include 
 
+typedef void (*nvme_fn_t)(int argc, char *argv[]);
+
+struct nvme_function {
+   const char  *name;
+   nvme_fn_t   fn;
+   const char  *usage;
+};
+
 #define NVME_CTRLR_PREFIX  "nvme"
 #define NVME_NS_PREFIX "ns"
 
@@ -73,6 +81,8 @@ void read_namespace_data(int fd, int nsi
 void print_hex(void *data, uint32_t length);
 void read_logpage(int fd, uint8_t log_page, int nsid, void *payload,
 uint32_t payload_size);
+void gen_usage(struct nvme_function *);
+void dispatch(int argc, char *argv[], struct nvme_function *f);
 
 #endif
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313191 - head/sbin/nvmecontrol

2017-02-03 Thread Warner Losh
Author: imp
Date: Sat Feb  4 05:53:00 2017
New Revision: 313191
URL: https://svnweb.freebsd.org/changeset/base/313191

Log:
  Implement 5 wdc-specific nvme control options for their HGST drives:
wdc cap-diagCapture diagnostic data from drive
wdc drive-log   Capture drive history data from drive
wdc get-crash-dump  Retrieve firmware crash dump from drive

Added:
  head/sbin/nvmecontrol/wdc.c   (contents, props changed)
Modified:
  head/sbin/nvmecontrol/Makefile
  head/sbin/nvmecontrol/nvmecontrol.8
  head/sbin/nvmecontrol/nvmecontrol.c
  head/sbin/nvmecontrol/nvmecontrol.h

Modified: head/sbin/nvmecontrol/Makefile
==
--- head/sbin/nvmecontrol/Makefile  Sat Feb  4 05:52:53 2017
(r313190)
+++ head/sbin/nvmecontrol/Makefile  Sat Feb  4 05:53:00 2017
(r313191)
@@ -3,7 +3,7 @@
 PACKAGE=runtime
 PROG=  nvmecontrol
 SRCS=  nvmecontrol.c devlist.c firmware.c identify.c logpage.c \
-   perftest.c reset.c nvme_util.c power.c
+   perftest.c reset.c nvme_util.c power.c wdc.c
 MAN=   nvmecontrol.8
 
 .PATH: ${.CURDIR}/../../sys/dev/nvme

Modified: head/sbin/nvmecontrol/nvmecontrol.8
==
--- head/sbin/nvmecontrol/nvmecontrol.8 Sat Feb  4 05:52:53 2017
(r313190)
+++ head/sbin/nvmecontrol/nvmecontrol.8 Sat Feb  4 05:53:00 2017
(r313191)
@@ -75,6 +75,24 @@
 .Op Fl l
 .Op Fl p power_state
 .Op fl w workload_hint
+.Nm
+.Ic wdc cap-diag
+.Op Fl o path_template
+.Aq device id
+.Nm
+.Ic wdc drive-log
+.Op Fl o path_template
+.Aq device id
+.Nm
+.Ic wdc get-crash-dump
+.Op Fl o path_template
+.Aq device id
+.\" .Nm
+.\" .Ic wdc purge
+.\" .Aq device id
+.\" .Nm
+.\" .Ic wdc purge-monitor
+.\" .Aq device id
 .Sh DESCRIPTION
 NVM Express (NVMe) is a storage protocol standard, for SSDs and other
 high-speed storage devices over PCI Express.

Modified: head/sbin/nvmecontrol/nvmecontrol.c
==
--- head/sbin/nvmecontrol/nvmecontrol.c Sat Feb  4 05:52:53 2017
(r313190)
+++ head/sbin/nvmecontrol/nvmecontrol.c Sat Feb  4 05:53:00 2017
(r313191)
@@ -54,6 +54,7 @@ static struct nvme_function funcs[] = {
{"logpage", logpage,LOGPAGE_USAGE},
{"firmware",firmware,   FIRMWARE_USAGE},
{"power",   power,  POWER_USAGE},
+   {"wdc", wdc,WDC_USAGE},
{NULL,  NULL,   NULL},
 };
 

Modified: head/sbin/nvmecontrol/nvmecontrol.h
==
--- head/sbin/nvmecontrol/nvmecontrol.h Sat Feb  4 05:52:53 2017
(r313190)
+++ head/sbin/nvmecontrol/nvmecontrol.h Sat Feb  4 05:53:00 2017
(r313191)
@@ -66,6 +66,9 @@ struct nvme_function {
 #define POWER_USAGE   \
 "   nvmecontrol power [-l] [-p new-state [-w workload-hint]] \n"
 
+#define WDC_USAGE \
+"   nvmecontrol wdc 
(cap-diag|drive-log|get-crash-dump|purge|purge-montior)\n"
+
 void devlist(int argc, char *argv[]);
 void identify(int argc, char *argv[]);
 void perftest(int argc, char *argv[]);
@@ -73,6 +76,7 @@ void reset(int argc, char *argv[]);
 void logpage(int argc, char *argv[]);
 void firmware(int argc, char *argv[]);
 void power(int argc, char *argv[]);
+void wdc(int argc, char *argv[]);
 
 int open_dev(const char *str, int *fd, int show_error, int exit_on_error);
 void parse_ns_str(const char *ns_str, char *ctrlr_str, int *nsid);

Added: head/sbin/nvmecontrol/wdc.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sbin/nvmecontrol/wdc.c Sat Feb  4 05:53:00 2017(r313191)
@@ -0,0 +1,341 @@
+/*-
+ * Copyright (c) 2017 Netflix, 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:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES

svn commit: r313188 - head/sbin/nvmecontrol

2017-02-03 Thread Warner Losh
Author: imp
Date: Sat Feb  4 05:52:50 2017
New Revision: 313188
URL: https://svnweb.freebsd.org/changeset/base/313188

Log:
  Put the arguments to aligned_alloc in the right order.

Modified:
  head/sbin/nvmecontrol/firmware.c

Modified: head/sbin/nvmecontrol/firmware.c
==
--- head/sbin/nvmecontrol/firmware.cSat Feb  4 05:52:14 2017
(r313187)
+++ head/sbin/nvmecontrol/firmware.cSat Feb  4 05:52:50 2017
(r313188)
@@ -114,7 +114,7 @@ update_firmware(int fd, uint8_t *payload
off = 0;
resid = payload_size;
 
-   if ((chunk = aligned_alloc(NVME_MAX_XFER_SIZE, PAGE_SIZE)) == NULL)
+   if ((chunk = aligned_alloc(PAGE_SIZE, NVME_MAX_XFER_SIZE)) == NULL)
errx(1, "unable to malloc %d bytes", NVME_MAX_XFER_SIZE);
 
while (resid > 0) {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313189 - head/tools/tools/nanobsd/embedded

2017-02-03 Thread Warner Losh
Author: imp
Date: Sat Feb  4 05:52:51 2017
New Revision: 313189
URL: https://svnweb.freebsd.org/changeset/base/313189

Log:
  Back off using CPUTYPE for the moment. There's still some issues with
  that.

Modified:
  head/tools/tools/nanobsd/embedded/rpi2.cfg

Modified: head/tools/tools/nanobsd/embedded/rpi2.cfg
==
--- head/tools/tools/nanobsd/embedded/rpi2.cfg  Sat Feb  4 05:52:50 2017
(r313188)
+++ head/tools/tools/nanobsd/embedded/rpi2.cfg  Sat Feb  4 05:52:51 2017
(r313189)
@@ -31,6 +31,5 @@ NANO_KERNEL=RPI2
 NANO_DRIVE=mmcsd0
 NANO_NAME=rpi2
 NANO_BOOT_PKG=u-boot-rpi2
-NANO_CPUTYPE=cortex-a7
 
 . common   # Pull in common definitions, keep last
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r313037 - in head/sys: amd64/include kern mips/include net powerpc/include sparc64/include

2017-02-03 Thread Jason Harmening
Hi,

I'm a bit confused as to how this change breaks MIPS.  The new function,
get_pcpu() is intended to be used only to access the per-cpu data pointer
locally.  It returns pcpup, which is the per-cpu pointer wired into the
local TLB to translate to the local CPU's physical data region, correct?

This is the same value used by the per-CPU accessors such as PCPU_ADD and
PCPU_GET.  The MI portions of this change only use get_pcpu() to access
 the local CPU's data, e.g. under a critical section in the rmlock.  It is
not intended to be used for iterating all CPUs.

If I've missed something and MIPS is truly broken by this, then I'll gladly
revert, but (maybe because it's late) I'm not seeing where this goes wrong
on MIPS.

Thanks,
Jason

On Fri, Feb 3, 2017 at 8:12 PM, Alexander Kabaev  wrote:

> On Wed, 1 Feb 2017 03:32:49 + (UTC)
> "Jason A. Harmening"  wrote:
>
> > Author: jah
> > Date: Wed Feb  1 03:32:49 2017
> > New Revision: 313037
> > URL: https://svnweb.freebsd.org/changeset/base/313037
> >
> > Log:
> >   Implement get_pcpu() for the remaining architectures and use it to
> >   replace pcpu_find(curcpu) in MI code.
> >
> > Modified:
> >   head/sys/amd64/include/pcpu.h
> >   head/sys/kern/kern_rmlock.c
> >   head/sys/mips/include/pcpu.h
> >   head/sys/net/netisr.c
> >   head/sys/powerpc/include/cpufunc.h
> >   head/sys/powerpc/include/pcpu.h
> >   head/sys/sparc64/include/pcpu.h
> >
>
> Hi,
>
> this change was not reviewed nor testing was thought for all
> architectures it touches. The change happens to break MIPS quite
> thoroughly, since MIPS is using different pointers when accessing PCPU
> area locally and when doing iterations using cpu_to_cpuid array. I
> therefore officially am requesting this change to be reverted until
> reasonable solution is found to unbreak architectures that use wired
> TLBs to access local per-CPU data.
>
> --
> Alexander Kabaev
>
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313186 - head/sys/vm

2017-02-03 Thread Alan Cox
Author: alc
Date: Sat Feb  4 05:23:10 2017
New Revision: 313186
URL: https://svnweb.freebsd.org/changeset/base/313186

Log:
  Over the years, the code and comments in vm_page_startup() have diverged in
  one respect.  When determining how many page structures to allocate,
  contrary to what the comments say, the code does not account for the
  overhead of a page structure per page of physical memory.  This revision
  changes the code to match the comments.
  
  Reviewed by:  kib, markj
  MFC after:6 weeks
  Differential Revision:https://reviews.freebsd.org/D9081

Modified:
  head/sys/vm/vm_page.c

Modified: head/sys/vm/vm_page.c
==
--- head/sys/vm/vm_page.c   Sat Feb  4 05:09:47 2017(r313185)
+++ head/sys/vm/vm_page.c   Sat Feb  4 05:23:10 2017(r313186)
@@ -421,17 +421,16 @@ vm_page_domain_init(struct vm_domain *vm
 /*
  * vm_page_startup:
  *
- * Initializes the resident memory module.
- *
- * Allocates memory for the page cells, and
- * for the object/offset-to-page hash table headers.
- * Each page cell is initialized and placed on the free list.
+ * Initializes the resident memory module.  Allocates physical memory for
+ * bootstrapping UMA and some data structures that are used to manage
+ * physical pages.  Initializes these structures, and populates the free
+ * page queues.
  */
 vm_offset_t
 vm_page_startup(vm_offset_t vaddr)
 {
vm_offset_t mapped;
-   vm_paddr_t page_range;
+   vm_paddr_t high_avail, low_avail, page_range, size;
vm_paddr_t new_end;
int i;
vm_paddr_t pa;
@@ -439,7 +438,6 @@ vm_page_startup(vm_offset_t vaddr)
char *list, *listend;
vm_paddr_t end;
vm_paddr_t biggestsize;
-   vm_paddr_t low_water, high_water;
int biggestone;
int pages_per_zone;
 
@@ -451,27 +449,12 @@ vm_page_startup(vm_offset_t vaddr)
phys_avail[i] = round_page(phys_avail[i]);
phys_avail[i + 1] = trunc_page(phys_avail[i + 1]);
}
-
-   low_water = phys_avail[0];
-   high_water = phys_avail[1];
-
-   for (i = 0; i < vm_phys_nsegs; i++) {
-   if (vm_phys_segs[i].start < low_water)
-   low_water = vm_phys_segs[i].start;
-   if (vm_phys_segs[i].end > high_water)
-   high_water = vm_phys_segs[i].end;
-   }
for (i = 0; phys_avail[i + 1]; i += 2) {
-   vm_paddr_t size = phys_avail[i + 1] - phys_avail[i];
-
+   size = phys_avail[i + 1] - phys_avail[i];
if (size > biggestsize) {
biggestone = i;
biggestsize = size;
}
-   if (phys_avail[i] < low_water)
-   low_water = phys_avail[i];
-   if (phys_avail[i + 1] > high_water)
-   high_water = phys_avail[i + 1];
}
 
end = phys_avail[biggestone+1];
@@ -486,7 +469,7 @@ vm_page_startup(vm_offset_t vaddr)
vm_page_domain_init(&vm_dom[i]);
 
/*
-* Almost all of the pages needed for boot strapping UMA are used
+* Almost all of the pages needed for bootstrapping UMA are used
 * for zone structures, so if the number of CPUs results in those
 * structures taking more than one page each, we set aside more pages
 * in proportion to the zone structure size.
@@ -537,6 +520,16 @@ vm_page_startup(vm_offset_t vaddr)
new_end + vm_page_dump_size, VM_PROT_READ | VM_PROT_WRITE);
bzero((void *)vm_page_dump, vm_page_dump_size);
 #endif
+#if defined(__aarch64__) || defined(__amd64__) || defined(__mips__)
+   /*
+* Include the UMA bootstrap pages and vm_page_dump in a crash dump.
+* When pmap_map() uses the direct map, they are not automatically 
+* included.
+*/
+   for (pa = new_end; pa < end; pa += PAGE_SIZE)
+   dump_add_page(pa);
+#endif
+   phys_avail[biggestone + 1] = new_end;
 #ifdef __amd64__
/*
 * Request that the physical pages underlying the message buffer be
@@ -552,20 +545,48 @@ vm_page_startup(vm_offset_t vaddr)
 #endif
/*
 * Compute the number of pages of memory that will be available for
-* use (taking into account the overhead of a page structure per
-* page).
+* use, taking into account the overhead of a page structure per page.
+* In other words, solve
+*  "available physical memory" - round_page(page_range *
+*  sizeof(struct vm_page)) = page_range * PAGE_SIZE 
+* for page_range.  
 */
-   first_page = low_water / PAGE_SIZE;
-#ifdef VM_PHYSSEG_SPARSE
-   page_range = 0;
+   low_avail = phys_avail[0];
+   high_avail = phys_avail[1];
for (i = 0; i < vm_phys_nsegs; i++) {
-   p

svn commit: r313185 - head/sys/geom/part

2017-02-03 Thread Andrey V. Elsukov
Author: ae
Date: Sat Feb  4 05:09:47 2017
New Revision: 313185
URL: https://svnweb.freebsd.org/changeset/base/313185

Log:
  Check that primary GPT header is valid before wiping partitioning.
  
  This allows safely destroy corrupted GPT when primary header was
  rewritten by some data, that do not want to destroy.
  
  MFC after:1 week

Modified:
  head/sys/geom/part/g_part_gpt.c

Modified: head/sys/geom/part/g_part_gpt.c
==
--- head/sys/geom/part/g_part_gpt.c Sat Feb  4 02:15:49 2017
(r313184)
+++ head/sys/geom/part/g_part_gpt.c Sat Feb  4 05:09:47 2017
(r313185)
@@ -687,10 +687,11 @@ g_part_gpt_destroy(struct g_part_table *
table->hdr = NULL;
 
/*
-* Wipe the first 2 sectors to clear the partitioning. Wipe the last
-* sector only if it has valid secondary header.
+* Wipe the first 2 sectors and last one to clear the partitioning.
+* Wipe sectors only if they have valid metadata.
 */
-   basetable->gpt_smhead |= 3;
+   if (table->state[GPT_ELT_PRIHDR] == GPT_STATE_OK)
+   basetable->gpt_smhead |= 3;
if (table->state[GPT_ELT_SECHDR] == GPT_STATE_OK &&
table->lba[GPT_ELT_SECHDR] == pp->mediasize / pp->sectorsize - 1)
basetable->gpt_smtail |= 1;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r313037 - in head/sys: amd64/include kern mips/include net powerpc/include sparc64/include

2017-02-03 Thread Alexander Kabaev
On Wed, 1 Feb 2017 03:32:49 + (UTC)
"Jason A. Harmening"  wrote:

> Author: jah
> Date: Wed Feb  1 03:32:49 2017
> New Revision: 313037
> URL: https://svnweb.freebsd.org/changeset/base/313037
> 
> Log:
>   Implement get_pcpu() for the remaining architectures and use it to
>   replace pcpu_find(curcpu) in MI code.
> 
> Modified:
>   head/sys/amd64/include/pcpu.h
>   head/sys/kern/kern_rmlock.c
>   head/sys/mips/include/pcpu.h
>   head/sys/net/netisr.c
>   head/sys/powerpc/include/cpufunc.h
>   head/sys/powerpc/include/pcpu.h
>   head/sys/sparc64/include/pcpu.h
> 

Hi,

this change was not reviewed nor testing was thought for all
architectures it touches. The change happens to break MIPS quite
thoroughly, since MIPS is using different pointers when accessing PCPU
area locally and when doing iterations using cpu_to_cpuid array. I
therefore officially am requesting this change to be reverted until
reasonable solution is found to unbreak architectures that use wired
TLBs to access local per-CPU data.

-- 
Alexander Kabaev


pgpfUhLU9V2ah.pgp
Description: Цифровая подпись OpenPGP


svn commit: r313184 - head

2017-02-03 Thread Bryan Drewery
Author: bdrewery
Date: Sat Feb  4 02:15:49 2017
New Revision: 313184
URL: https://svnweb.freebsd.org/changeset/base/313184

Log:
  Remove LOCAL_LIB_DIRS warning added in r275839.
  
  The case for which this was added, r274807, causes this warning to
  always show.  LOCAL_DIRS=foo LOCAL_LIB_DIRS=foo/lib.  The only case in
  which r274807 is a problem is if foo/Makefile does not contain
  SUBDIR+=lib, which is a normal convention.  LOCAL_LIB_DIRS is a special
  hack only to get a library into the _generic_libs list for the
  'make libraries' bootstrapping phase.  The old behavior changed in
  r274807 was only in head during the 10.0 cycle, so the warning was
  only ever needed until release anyhow.
  
  Reported by:  ngie
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Sat Feb  4 01:24:21 2017(r313183)
+++ head/Makefile.inc1  Sat Feb  4 02:15:49 2017(r313184)
@@ -247,8 +247,6 @@ _REDUNDANT_LIB_DIRS+=${LOCAL_LIB_DIR
 .for _DIR in ${LOCAL_LIB_DIRS}
 .if empty(_REDUNDANT_LIB_DIRS:M${_DIR}) && exists(${.CURDIR}/${_DIR}/Makefile)
 SUBDIR+=   ${_DIR}
-.else
-.warning ${_DIR} not added to SUBDIR list.  See UPDATING 20141121.
 .endif
 .endfor
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313183 - stable/11/sys/boot/arm/uboot

2017-02-03 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Sat Feb  4 01:24:21 2017
New Revision: 313183
URL: https://svnweb.freebsd.org/changeset/base/313183

Log:
  MFC r310124 (by andrew):
  
  Add -fPIC to the ubldr build. Without this the self relocation code will
  try to use an absolute address in a switch statement, jumping to an invalid
  memory location.
  
  Sponsored by: ABT Systems Ltd
  
  PR:   216504

Modified:
  stable/11/sys/boot/arm/uboot/Makefile
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/boot/arm/uboot/Makefile
==
--- stable/11/sys/boot/arm/uboot/Makefile   Sat Feb  4 01:21:48 2017
(r313182)
+++ stable/11/sys/boot/arm/uboot/Makefile   Sat Feb  4 01:24:21 2017
(r313183)
@@ -109,6 +109,8 @@ CFLAGS+=-I${.OBJDIR}/../../uboot/lib
 # where to get libstand from
 CFLAGS+=   -I${.CURDIR}/../../../../lib/libstand/
 
+CFLAGS+=   -fPIC
+
 # clang doesn't understand %D as a specifier to printf
 NO_WERROR.clang=
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313182 - head

2017-02-03 Thread Ngie Cooper
Author: ngie
Date: Sat Feb  4 01:21:48 2017
New Revision: 313182
URL: https://svnweb.freebsd.org/changeset/base/313182

Log:
  Fix typo in variable name (_REDUNDENT_LIB_DIRS -> _REDUNDANT_LIB_DIRS)
  
  MFC after:3 days
  Sponsored by: Dell EMC Isilon

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Sat Feb  4 00:37:25 2017(r313181)
+++ head/Makefile.inc1  Sat Feb  4 01:21:48 2017(r313182)
@@ -242,10 +242,10 @@ SUBDIR+=  ${_DIR}
 # of a LOCAL_DIRS directory.  This allows LOCAL_DIRS=foo and
 # LOCAL_LIB_DIRS=foo/lib to behave as expected.
 .for _DIR in ${LOCAL_DIRS:M*/} ${LOCAL_DIRS:N*/:S|$|/|}
-_REDUNDENT_LIB_DIRS+=${LOCAL_LIB_DIRS:M${_DIR}*}
+_REDUNDANT_LIB_DIRS+=${LOCAL_LIB_DIRS:M${_DIR}*}
 .endfor
 .for _DIR in ${LOCAL_LIB_DIRS}
-.if empty(_REDUNDENT_LIB_DIRS:M${_DIR}) && exists(${.CURDIR}/${_DIR}/Makefile)
+.if empty(_REDUNDANT_LIB_DIRS:M${_DIR}) && exists(${.CURDIR}/${_DIR}/Makefile)
 SUBDIR+=   ${_DIR}
 .else
 .warning ${_DIR} not added to SUBDIR list.  See UPDATING 20141121.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313181 - head/lib/libc/gen

2017-02-03 Thread Eric van Gyzen
Author: vangyzen
Date: Sat Feb  4 00:37:25 2017
New Revision: 313181
URL: https://svnweb.freebsd.org/changeset/base/313181

Log:
  Fix grammar in getpeereid(3)

Modified:
  head/lib/libc/gen/getpeereid.3

Modified: head/lib/libc/gen/getpeereid.3
==
--- head/lib/libc/gen/getpeereid.3  Sat Feb  4 00:34:00 2017
(r313180)
+++ head/lib/libc/gen/getpeereid.3  Sat Feb  4 00:37:25 2017
(r313181)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd July 15, 2001
+.Dd February 3, 2017
 .Dt GETPEEREID 3
 .Os
 .Sh NAME
@@ -57,8 +57,8 @@ on which either
 .Xr connect 2
 or
 .Xr listen 2
-have been called.
-The effective used ID is placed in
+has been called.
+The effective user ID is placed in
 .Fa euid ,
 and the effective group ID in
 .Fa egid .
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313180 - head/sys/dev/pci

2017-02-03 Thread Eric van Gyzen
Author: vangyzen
Date: Sat Feb  4 00:34:00 2017
New Revision: 313180
URL: https://svnweb.freebsd.org/changeset/base/313180

Log:
  PCIe HotPlug: remove tests for DL active link capability
  
  As of r313097, the HotPlug code requires the link to support
  reporting of the data-link status.  Remove tests for this capability
  from code that can now assume its presence.
  
  Suggested by: jhb
  Reviewed by:  jhb
  MFC after:3 days
  Sponsored by: Dell EMC
  Differential Revision:https://reviews.freebsd.org/D9431

Modified:
  head/sys/dev/pci/pci_pci.c
  head/sys/dev/pci/pcib_private.h

Modified: head/sys/dev/pci/pci_pci.c
==
--- head/sys/dev/pci/pci_pci.c  Fri Feb  3 23:48:56 2017(r313179)
+++ head/sys/dev/pci/pci_pci.c  Sat Feb  4 00:34:00 2017(r313180)
@@ -918,6 +918,7 @@ static void
 pcib_probe_hotplug(struct pcib_softc *sc)
 {
device_t dev;
+   uint32_t link_cap;
uint16_t link_sta, slot_sta;
 
if (!pci_enable_pcie_hp)
@@ -930,12 +931,12 @@ pcib_probe_hotplug(struct pcib_softc *sc
if (!(pcie_read_config(dev, PCIER_FLAGS, 2) & PCIEM_FLAGS_SLOT))
return;
 
-   sc->pcie_link_cap = pcie_read_config(dev, PCIER_LINK_CAP, 4);
sc->pcie_slot_cap = pcie_read_config(dev, PCIER_SLOT_CAP, 4);
 
if ((sc->pcie_slot_cap & PCIEM_SLOT_CAP_HPC) == 0)
return;
-   if ((sc->pcie_link_cap & PCIEM_LINK_CAP_DL_ACTIVE) == 0)
+   link_cap = pcie_read_config(dev, PCIER_LINK_CAP, 4);
+   if ((link_cap & PCIEM_LINK_CAP_DL_ACTIVE) == 0)
return;
 
/*
@@ -947,8 +948,7 @@ pcib_probe_hotplug(struct pcib_softc *sc
 * If there is an open MRL but the Data Link Layer is active,
 * the MRL is not real.
 */
-   if ((sc->pcie_slot_cap & PCIEM_SLOT_CAP_MRLSP) != 0 &&
-   (sc->pcie_link_cap & PCIEM_LINK_CAP_DL_ACTIVE) != 0) {
+   if ((sc->pcie_slot_cap & PCIEM_SLOT_CAP_MRLSP) != 0) {
link_sta = pcie_read_config(dev, PCIER_LINK_STA, 2);
slot_sta = pcie_read_config(dev, PCIER_SLOT_STA, 2);
if ((slot_sta & PCIEM_SLOT_STA_MRLSS) != 0 &&
@@ -1061,10 +1061,8 @@ pcib_hotplug_present(struct pcib_softc *
return (0);
 
/* Require the Data Link Layer to be active. */
-   if (sc->pcie_link_cap & PCIEM_LINK_CAP_DL_ACTIVE) {
-   if (!(sc->pcie_link_sta & PCIEM_LINK_STA_DL_ACTIVE))
-   return (0);
-   }
+   if (!(sc->pcie_link_sta & PCIEM_LINK_STA_DL_ACTIVE))
+   return (0);
 
return (-1);
 }
@@ -1121,20 +1119,18 @@ pcib_pcie_hotplug_update(struct pcib_sof
 * changed on this interrupt.  Stop any scheduled timer if
 * the Data Link Layer is active.
 */
-   if (sc->pcie_link_cap & PCIEM_LINK_CAP_DL_ACTIVE) {
-   if (card_inserted &&
-   !(sc->pcie_link_sta & PCIEM_LINK_STA_DL_ACTIVE) &&
-   sc->pcie_slot_sta &
-   (PCIEM_SLOT_STA_MRLSC | PCIEM_SLOT_STA_PDC)) {
-   if (cold)
-   device_printf(sc->dev,
-   "Data Link Layer inactive\n");
-   else
-   callout_reset(&sc->pcie_dll_timer, hz,
-   pcib_pcie_dll_timeout, sc);
-   } else if (sc->pcie_link_sta & PCIEM_LINK_STA_DL_ACTIVE)
-   callout_stop(&sc->pcie_dll_timer);
-   }
+   if (card_inserted &&
+   !(sc->pcie_link_sta & PCIEM_LINK_STA_DL_ACTIVE) &&
+   sc->pcie_slot_sta &
+   (PCIEM_SLOT_STA_MRLSC | PCIEM_SLOT_STA_PDC)) {
+   if (cold)
+   device_printf(sc->dev,
+   "Data Link Layer inactive\n");
+   else
+   callout_reset(&sc->pcie_dll_timer, hz,
+   pcib_pcie_dll_timeout, sc);
+   } else if (sc->pcie_link_sta & PCIEM_LINK_STA_DL_ACTIVE)
+   callout_stop(&sc->pcie_dll_timer);
 
pcib_pcie_hotplug_command(sc, val, mask);
 
@@ -1384,7 +1380,7 @@ pcib_setup_hotplug(struct pcib_softc *sc
mask = PCIEM_SLOT_CTL_DLLSCE | PCIEM_SLOT_CTL_HPIE |
PCIEM_SLOT_CTL_CCIE | PCIEM_SLOT_CTL_PDCE | PCIEM_SLOT_CTL_MRLSCE |
PCIEM_SLOT_CTL_PFDE | PCIEM_SLOT_CTL_ABPE;
-   val = PCIEM_SLOT_CTL_PDCE | PCIEM_SLOT_CTL_HPIE;
+   val = PCIEM_SLOT_CTL_DLLSCE | PCIEM_SLOT_CTL_HPIE | PCIEM_SLOT_CTL_PDCE;
if (sc->pcie_slot_cap & PCIEM_SLOT_CAP_APB)
val |= PCIEM_SLOT_CTL_ABPE;
if (sc->pcie_slot_cap & PCIEM_SLOT_CAP_PCP)
@@ -1393,8 +1389,6 @@ pcib_setup_hotplug(struct pcib_softc *sc
val |= PCIEM_SLOT_CTL_MRLSCE;
if (!(sc->pcie_slot_cap & PCIEM_SLOT_CAP_NCCS))
val |= PCIEM_SLOT_CTL_CCIE;
-   if (sc->p

svn commit: r313179 - stable/11/sys/dev/cxgbe/tom

2017-02-03 Thread John Baldwin
Author: jhb
Date: Fri Feb  3 23:48:56 2017
New Revision: 313179
URL: https://svnweb.freebsd.org/changeset/base/313179

Log:
  MFC 312904: Don't drop a reference to the TOE PCB in undo_offload_socket().
  
  undo_offload_socket() is only called by t4_connect() during a connection
  setup failure, but t4_connect() still owns the TOE PCB and frees ita
  after undo_offload_socket() returns.  Release a reference in
  undo_offload_socket() resulted in a double-free which panicked when
  t4_connect() performed the second free.  The reference release was
  added to undo_offload_socket() incorrectly in r299210.
  
  Sponsored by: Chelsio Communications

Modified:
  stable/11/sys/dev/cxgbe/tom/t4_tom.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/cxgbe/tom/t4_tom.c
==
--- stable/11/sys/dev/cxgbe/tom/t4_tom.cFri Feb  3 23:33:06 2017
(r313178)
+++ stable/11/sys/dev/cxgbe/tom/t4_tom.cFri Feb  3 23:48:56 2017
(r313179)
@@ -273,8 +273,6 @@ undo_offload_socket(struct socket *so)
mtx_lock(&td->toep_list_lock);
TAILQ_REMOVE(&td->toep_list, toep, link);
mtx_unlock(&td->toep_list_lock);
-
-   free_toepcb(toep);
 }
 
 static void
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313178 - in stable: 10/sys/dev/cxgbe/tom 11/sys/dev/cxgbe/tom

2017-02-03 Thread John Baldwin
Author: jhb
Date: Fri Feb  3 23:33:06 2017
New Revision: 313178
URL: https://svnweb.freebsd.org/changeset/base/313178

Log:
  MFC 312906:
  Unregister CPL handlers for TOE-related messages when unloading TOM.
  
  Sponsored by: Chelsio Communications

Modified:
  stable/11/sys/dev/cxgbe/tom/t4_connect.c
  stable/11/sys/dev/cxgbe/tom/t4_cpl_io.c
  stable/11/sys/dev/cxgbe/tom/t4_listen.c
  stable/11/sys/dev/cxgbe/tom/t4_tom.c
  stable/11/sys/dev/cxgbe/tom/t4_tom.h
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/sys/dev/cxgbe/tom/t4_connect.c
  stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c
  stable/10/sys/dev/cxgbe/tom/t4_listen.c
  stable/10/sys/dev/cxgbe/tom/t4_tom.c
  stable/10/sys/dev/cxgbe/tom/t4_tom.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/11/sys/dev/cxgbe/tom/t4_connect.c
==
--- stable/11/sys/dev/cxgbe/tom/t4_connect.cFri Feb  3 22:40:13 2017
(r313177)
+++ stable/11/sys/dev/cxgbe/tom/t4_connect.cFri Feb  3 23:33:06 2017
(r313178)
@@ -275,6 +275,14 @@ t4_init_connect_cpl_handlers(void)
t4_register_cpl_handler(CPL_ACT_OPEN_RPL, do_act_open_rpl);
 }
 
+void
+t4_uninit_connect_cpl_handlers(void)
+{
+
+   t4_register_cpl_handler(CPL_ACT_ESTABLISH, NULL);
+   t4_register_cpl_handler(CPL_ACT_OPEN_RPL, NULL);
+}
+
 #define DONT_OFFLOAD_ACTIVE_OPEN(x)do { \
reason = __LINE__; \
rc = (x); \

Modified: stable/11/sys/dev/cxgbe/tom/t4_cpl_io.c
==
--- stable/11/sys/dev/cxgbe/tom/t4_cpl_io.c Fri Feb  3 22:40:13 2017
(r313177)
+++ stable/11/sys/dev/cxgbe/tom/t4_cpl_io.c Fri Feb  3 23:33:06 2017
(r313178)
@@ -1848,12 +1848,12 @@ void
 t4_uninit_cpl_io_handlers(void)
 {
 
-   t4_register_cpl_handler(CPL_PEER_CLOSE, do_peer_close);
-   t4_register_cpl_handler(CPL_CLOSE_CON_RPL, do_close_con_rpl);
-   t4_register_cpl_handler(CPL_ABORT_REQ_RSS, do_abort_req);
-   t4_register_cpl_handler(CPL_ABORT_RPL_RSS, do_abort_rpl);
-   t4_register_cpl_handler(CPL_RX_DATA, do_rx_data);
-   t4_register_cpl_handler(CPL_FW4_ACK, do_fw4_ack);
+   t4_register_cpl_handler(CPL_PEER_CLOSE, NULL);
+   t4_register_cpl_handler(CPL_CLOSE_CON_RPL, NULL);
+   t4_register_cpl_handler(CPL_ABORT_REQ_RSS, NULL);
+   t4_register_cpl_handler(CPL_ABORT_RPL_RSS, NULL);
+   t4_register_cpl_handler(CPL_RX_DATA, NULL);
+   t4_register_cpl_handler(CPL_FW4_ACK, NULL);
 }
 
 /*

Modified: stable/11/sys/dev/cxgbe/tom/t4_listen.c
==
--- stable/11/sys/dev/cxgbe/tom/t4_listen.c Fri Feb  3 22:40:13 2017
(r313177)
+++ stable/11/sys/dev/cxgbe/tom/t4_listen.c Fri Feb  3 23:33:06 2017
(r313178)
@@ -1622,4 +1622,14 @@ t4_init_listen_cpl_handlers(void)
t4_register_cpl_handler(CPL_PASS_ACCEPT_REQ, do_pass_accept_req);
t4_register_cpl_handler(CPL_PASS_ESTABLISH, do_pass_establish);
 }
+
+void
+t4_uninit_listen_cpl_handlers(void)
+{
+
+   t4_register_cpl_handler(CPL_PASS_OPEN_RPL, NULL);
+   t4_register_cpl_handler(CPL_CLOSE_LISTSRV_RPL, NULL);
+   t4_register_cpl_handler(CPL_PASS_ACCEPT_REQ, NULL);
+   t4_register_cpl_handler(CPL_PASS_ESTABLISH, NULL);
+}
 #endif

Modified: stable/11/sys/dev/cxgbe/tom/t4_tom.c
==
--- stable/11/sys/dev/cxgbe/tom/t4_tom.cFri Feb  3 22:40:13 2017
(r313177)
+++ stable/11/sys/dev/cxgbe/tom/t4_tom.cFri Feb  3 23:33:06 2017
(r313178)
@@ -1229,6 +1229,10 @@ t4_tom_mod_unload(void)
 
t4_ddp_mod_unload();
 
+   t4_uninit_connect_cpl_handlers();
+   t4_uninit_listen_cpl_handlers();
+   t4_uninit_cpl_io_handlers();
+
return (0);
 }
 #endif /* TCP_OFFLOAD */

Modified: stable/11/sys/dev/cxgbe/tom/t4_tom.h
==
--- stable/11/sys/dev/cxgbe/tom/t4_tom.hFri Feb  3 22:40:13 2017
(r313177)
+++ stable/11/sys/dev/cxgbe/tom/t4_tom.hFri Feb  3 23:33:06 2017
(r313178)
@@ -326,12 +326,14 @@ void release_lip(struct tom_data *, stru
 
 /* t4_connect.c */
 void t4_init_connect_cpl_handlers(void);
+void t4_uninit_connect_cpl_handlers(void);
 int t4_connect(struct toedev *, struct socket *, struct rtentry *,
 struct sockaddr *);
 void act_open_failure_cleanup(struct adapter *, u_int, u_int);
 
 /* t4_listen.c */
 void t4_init_listen_cpl_handlers(void);
+void t4_uninit_listen_cpl_handlers(void);
 int t4_listen_start(struct toedev *, struct tcpcb *);
 int t4_listen_stop(struct toedev *, struct tcpcb *);
 void t4_syncache_added(struct toedev *, void *);
___
svn-src-all@freebsd.org mai

svn commit: r313178 - in stable: 10/sys/dev/cxgbe/tom 11/sys/dev/cxgbe/tom

2017-02-03 Thread John Baldwin
Author: jhb
Date: Fri Feb  3 23:33:06 2017
New Revision: 313178
URL: https://svnweb.freebsd.org/changeset/base/313178

Log:
  MFC 312906:
  Unregister CPL handlers for TOE-related messages when unloading TOM.
  
  Sponsored by: Chelsio Communications

Modified:
  stable/10/sys/dev/cxgbe/tom/t4_connect.c
  stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c
  stable/10/sys/dev/cxgbe/tom/t4_listen.c
  stable/10/sys/dev/cxgbe/tom/t4_tom.c
  stable/10/sys/dev/cxgbe/tom/t4_tom.h
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/sys/dev/cxgbe/tom/t4_connect.c
  stable/11/sys/dev/cxgbe/tom/t4_cpl_io.c
  stable/11/sys/dev/cxgbe/tom/t4_listen.c
  stable/11/sys/dev/cxgbe/tom/t4_tom.c
  stable/11/sys/dev/cxgbe/tom/t4_tom.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/10/sys/dev/cxgbe/tom/t4_connect.c
==
--- stable/10/sys/dev/cxgbe/tom/t4_connect.cFri Feb  3 22:40:13 2017
(r313177)
+++ stable/10/sys/dev/cxgbe/tom/t4_connect.cFri Feb  3 23:33:06 2017
(r313178)
@@ -275,6 +275,14 @@ t4_init_connect_cpl_handlers(void)
t4_register_cpl_handler(CPL_ACT_OPEN_RPL, do_act_open_rpl);
 }
 
+void
+t4_uninit_connect_cpl_handlers(void)
+{
+
+   t4_register_cpl_handler(CPL_ACT_ESTABLISH, NULL);
+   t4_register_cpl_handler(CPL_ACT_OPEN_RPL, NULL);
+}
+
 #define DONT_OFFLOAD_ACTIVE_OPEN(x)do { \
reason = __LINE__; \
rc = (x); \

Modified: stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c
==
--- stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Fri Feb  3 22:40:13 2017
(r313177)
+++ stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Fri Feb  3 23:33:06 2017
(r313178)
@@ -1798,11 +1798,11 @@ void
 t4_uninit_cpl_io_handlers(void)
 {
 
-   t4_register_cpl_handler(CPL_PEER_CLOSE, do_peer_close);
-   t4_register_cpl_handler(CPL_CLOSE_CON_RPL, do_close_con_rpl);
-   t4_register_cpl_handler(CPL_ABORT_REQ_RSS, do_abort_req);
-   t4_register_cpl_handler(CPL_ABORT_RPL_RSS, do_abort_rpl);
-   t4_register_cpl_handler(CPL_RX_DATA, do_rx_data);
-   t4_register_cpl_handler(CPL_FW4_ACK, do_fw4_ack);
+   t4_register_cpl_handler(CPL_PEER_CLOSE, NULL);
+   t4_register_cpl_handler(CPL_CLOSE_CON_RPL, NULL);
+   t4_register_cpl_handler(CPL_ABORT_REQ_RSS, NULL);
+   t4_register_cpl_handler(CPL_ABORT_RPL_RSS, NULL);
+   t4_register_cpl_handler(CPL_RX_DATA, NULL);
+   t4_register_cpl_handler(CPL_FW4_ACK, NULL);
 }
 #endif

Modified: stable/10/sys/dev/cxgbe/tom/t4_listen.c
==
--- stable/10/sys/dev/cxgbe/tom/t4_listen.c Fri Feb  3 22:40:13 2017
(r313177)
+++ stable/10/sys/dev/cxgbe/tom/t4_listen.c Fri Feb  3 23:33:06 2017
(r313178)
@@ -1677,4 +1677,14 @@ t4_init_listen_cpl_handlers(void)
t4_register_cpl_handler(CPL_PASS_ACCEPT_REQ, do_pass_accept_req);
t4_register_cpl_handler(CPL_PASS_ESTABLISH, do_pass_establish);
 }
+
+void
+t4_uninit_listen_cpl_handlers(void)
+{
+
+   t4_register_cpl_handler(CPL_PASS_OPEN_RPL, NULL);
+   t4_register_cpl_handler(CPL_CLOSE_LISTSRV_RPL, NULL);
+   t4_register_cpl_handler(CPL_PASS_ACCEPT_REQ, NULL);
+   t4_register_cpl_handler(CPL_PASS_ESTABLISH, NULL);
+}
 #endif

Modified: stable/10/sys/dev/cxgbe/tom/t4_tom.c
==
--- stable/10/sys/dev/cxgbe/tom/t4_tom.cFri Feb  3 22:40:13 2017
(r313177)
+++ stable/10/sys/dev/cxgbe/tom/t4_tom.cFri Feb  3 23:33:06 2017
(r313178)
@@ -1225,6 +1225,10 @@ t4_tom_mod_unload(void)
 
t4_ddp_mod_unload();
 
+   t4_uninit_connect_cpl_handlers();
+   t4_uninit_listen_cpl_handlers();
+   t4_uninit_cpl_io_handlers();
+
return (0);
 }
 #endif /* TCP_OFFLOAD */

Modified: stable/10/sys/dev/cxgbe/tom/t4_tom.h
==
--- stable/10/sys/dev/cxgbe/tom/t4_tom.hFri Feb  3 22:40:13 2017
(r313177)
+++ stable/10/sys/dev/cxgbe/tom/t4_tom.hFri Feb  3 23:33:06 2017
(r313178)
@@ -298,12 +298,14 @@ void release_lip(struct tom_data *, stru
 
 /* t4_connect.c */
 void t4_init_connect_cpl_handlers(void);
+void t4_uninit_connect_cpl_handlers(void);
 int t4_connect(struct toedev *, struct socket *, struct rtentry *,
 struct sockaddr *);
 void act_open_failure_cleanup(struct adapter *, u_int, u_int);
 
 /* t4_listen.c */
 void t4_init_listen_cpl_handlers(void);
+void t4_uninit_listen_cpl_handlers(void);
 int t4_listen_start(struct toedev *, struct tcpcb *);
 int t4_listen_stop(struct toedev *, struct tcpcb *);
 void t4_syncache_added(struct toedev *, void *);
___
svn-src-all@freebsd.org m

Re: svn commit: r313177 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace

2017-02-03 Thread Konstantin Belousov
On Fri, Feb 03, 2017 at 10:40:13PM +, George V. Neville-Neil wrote:
> +
> +#ifndef _DTRACE_XOROSHIRO128_PLUS_H
> +#define _DTRACE_XOROSHIRO128_PLUS_H
> +#endif
This protective define is useless unless #endif is placed properly.

> +
> +#include 
> +
> +extern void dtrace_xoroshiro128_plus_jump(uint64_t * const, uint64_t * 
> const);
extern keywords there are useless as well.

> +extern uint64_t dtrace_xoroshiro128_plus_next(uint64_t * const);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313177 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace

2017-02-03 Thread George V. Neville-Neil
Author: gnn
Date: Fri Feb  3 22:40:13 2017
New Revision: 313177
URL: https://svnweb.freebsd.org/changeset/base/313177

Log:
  Files which implement the new random number system code for DTrace
  
  Submitted by: Graeme Jenkinson
  MFC after:2 weeks
  Sponsored by: DARPA, AFRL

Added:
  
head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace_xoroshiro128_plus.c  
 (contents, props changed)
  
head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace_xoroshiro128_plus.h  
 (contents, props changed)

Added: 
head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace_xoroshiro128_plus.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ 
head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace_xoroshiro128_plus.c  
Fri Feb  3 22:40:13 2017(r313177)
@@ -0,0 +1,89 @@
+/*-
+ * Copyright (c) 2016 (Graeme Jenkinson)
+ * All rights reserved.
+ *
+ * This software was developed by BAE Systems, the University of Cambridge
+ * Computer Laboratory, and Memorial University under DARPA/AFRL contract
+ * FA8650-15-C-7558 ("CADETS"), as part of the DARPA Transparent Computing
+ * (TC) research program.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+
+#include 
+
+#include "dtrace_xoroshiro128_plus.h"
+
+static __inline uint64_t
+rotl(const uint64_t x, int k)
+{
+   return (x << k) | (x >> (64 - k));
+}
+
+/*
+ * This is the jump function for the generator. It is equivalent to 2^64 calls
+ * to next(); it can be used to generate 2^64 non-overlapping subsequences for
+ * parallel computations.
+ */
+void
+dtrace_xoroshiro128_plus_jump(uint64_t * const state,
+   uint64_t * const jump_state)
+{
+   static const uint64_t JUMP[] = { 0xbeac0467eba5facb,
+   0xd86b048b86aa9922 };
+
+   uint64_t s0 = 0;
+   uint64_t s1 = 0;
+   int i = 0;
+   int b = 0;
+   for (i = 0; i < sizeof JUMP / sizeof *JUMP; i++) {
+   for (b = 0; b < 64; b++) {
+   if (JUMP[i] & 1ULL << b) {
+   s0 ^= state[0];
+   s1 ^= state[1];
+   }
+   dtrace_xoroshiro128_plus_next(state);
+   }
+   }
+   jump_state[0] = s0;
+   jump_state[1] = s1;
+}
+
+/*
+ * xoroshiro128+ - XOR/rotate/shift/rotate
+ * xorshift.di.unimi.it
+ */
+uint64_t
+dtrace_xoroshiro128_plus_next(uint64_t * const state)
+{
+   const uint64_t s0 = state[0];
+   uint64_t s1 = state[1];
+   uint64_t result;
+   result = s0 + s1;
+
+   s1 ^= s0;
+   state[0] = rotl(s0, 55) ^ s1 ^ (s1 << 14);
+   state[1] = rotl(s1, 36);
+
+   return result;
+}

Added: 
head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace_xoroshiro128_plus.h
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ 
head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace_xoroshiro128_plus.h  
Fri Feb  3 22:40:13 2017(r313177)
@@ -0,0 +1,40 @@
+/*-
+ * Copyright (c) 2016 (Graeme Jenkinson)
+ * All rights reserved.
+ *
+ * This software was developed by BAE Systems, the University of Cambridge
+ * Computer Laboratory, and Memorial University under DARPA/AFRL contract
+ * FA8650-15-C-7558 ("CADETS"), as part of the DARPA Transparent Computing
+ * (TC) research program.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of condition

Re: svn commit: r313169 - head/tools/build/options

2017-02-03 Thread Ngie Cooper (yaneurabeya)

> On Feb 3, 2017, at 14:39, Bryan Drewery  wrote:
> 
> On 2/3/2017 11:09 AM, Warren Block wrote:
>> Modified: head/tools/build/options/makeman
>> ==
>> --- head/tools/build/options/makeman Fri Feb  3 17:02:57 2017
>> (r313168)
>> +++ head/tools/build/options/makeman Fri Feb  3 19:09:46 2017
>> (r313169)
>> @@ -8,7 +8,7 @@ export LC_ALL=C
>> ident='$FreeBSD$'
>> 
>> t=$(mktemp -d -t makeman)
>> -trap 'test -d $t && rm -rf $t' exit
>> +# trap 'test -d $t && rm -rf $t' exit
> 
> Woops, you committed a debug change.

wblock fixed it in r313173.
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r313169 - head/tools/build/options

2017-02-03 Thread Bryan Drewery
On 2/3/2017 2:39 PM, Bryan Drewery wrote:
> On 2/3/2017 11:09 AM, Warren Block wrote:
>> Modified: head/tools/build/options/makeman
>> ==
>> --- head/tools/build/options/makeman Fri Feb  3 17:02:57 2017
>> (r313168)
>> +++ head/tools/build/options/makeman Fri Feb  3 19:09:46 2017
>> (r313169)
>> @@ -8,7 +8,7 @@ export LC_ALL=C
>>  ident='$FreeBSD$'
>>  
>>  t=$(mktemp -d -t makeman)
>> -trap 'test -d $t && rm -rf $t' exit
>> +# trap 'test -d $t && rm -rf $t' exit
> 
> Woops, you committed a debug change.
> 

Nm, already fixed.

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r313169 - head/tools/build/options

2017-02-03 Thread Bryan Drewery
On 2/3/2017 11:09 AM, Warren Block wrote:
> Modified: head/tools/build/options/makeman
> ==
> --- head/tools/build/options/makeman  Fri Feb  3 17:02:57 2017
> (r313168)
> +++ head/tools/build/options/makeman  Fri Feb  3 19:09:46 2017
> (r313169)
> @@ -8,7 +8,7 @@ export LC_ALL=C
>  ident='$FreeBSD$'
>  
>  t=$(mktemp -d -t makeman)
> -trap 'test -d $t && rm -rf $t' exit
> +# trap 'test -d $t && rm -rf $t' exit

Woops, you committed a debug change.

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r313176 - in head/sys: cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/sys modules/dtrace/dtrace modules/dtrace/fasttrap modules/dtrace/systrace

2017-02-03 Thread George V. Neville-Neil
Author: gnn
Date: Fri Feb  3 22:26:19 2017
New Revision: 313176
URL: https://svnweb.freebsd.org/changeset/base/313176

Log:
  Replace the implementation of DTrace's RAND subroutine for generating
  low-quality random numbers with a modern implementation (xoroshiro128+)
  that is capable of generating better quality randomness without compromising 
performance.
  
  Submitted by: Graeme Jenkinson
  Reviewed by:  markj
  MFC after:2 weeks
  Sponsored by: DARPA, AFRL
  Differential Revision:https://reviews.freebsd.org/D9051

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
  head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h
  head/sys/modules/dtrace/dtrace/Makefile
  head/sys/modules/dtrace/fasttrap/Makefile
  head/sys/modules/dtrace/systrace/Makefile

Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.cFri Feb 
 3 21:37:27 2017(r313175)
+++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.cFri Feb 
 3 22:26:19 2017(r313176)
@@ -124,6 +124,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -136,6 +137,8 @@
 #include "dtrace_debug.c"
 #endif
 
+#include "dtrace_xoroshiro128_plus.h"
+
 /*
  * DTrace Tunable Variables
  *
@@ -298,7 +301,6 @@ static kmutex_t dtrace_meta_lock;   /* me
 #define vuprintf   vprintf
 #define ttoproc(_a)((_a)->td_proc)
 #define crgetzoneid(_a)0
-#defineNCPUMAXCPU
 #define SNOCD  0
 #define CPU_ON_INTR(_a)0
 
@@ -4236,7 +4238,8 @@ dtrace_dif_subr(uint_t subr, uint_t rd, 
 
switch (subr) {
case DIF_SUBR_RAND:
-   regs[rd] = (dtrace_gethrtime() * 2416 + 374441) % 1771875;
+   regs[rd] = dtrace_xoroshiro128_plus_next(
+   state->dts_rstate[curcpu]);
break;
 
 #ifdef illumos
@@ -14495,6 +14498,7 @@ dtrace_state_create(struct cdev *dev, st
dtrace_state_t *state;
dtrace_optval_t *opt;
int bufsize = NCPU * sizeof (dtrace_buffer_t), i;
+   int cpu_it;
 
ASSERT(MUTEX_HELD(&dtrace_lock));
ASSERT(MUTEX_HELD(&cpu_lock));
@@ -14550,6 +14554,21 @@ dtrace_state_create(struct cdev *dev, st
state->dts_buffer = kmem_zalloc(bufsize, KM_SLEEP);
state->dts_aggbuffer = kmem_zalloc(bufsize, KM_SLEEP);
 
+   /*
+ * Allocate and initialise the per-process per-CPU random state.
+* SI_SUB_RANDOM < SI_SUB_DTRACE_ANON therefore entropy device is
+ * assumed to be seeded at this point (if from Fortuna seed file).
+*/
+   (void) read_random(&state->dts_rstate[0], 2 * sizeof(uint64_t));
+   for (cpu_it = 1; cpu_it < NCPU; cpu_it++) {
+   /*
+* Each CPU is assigned a 2^64 period, non-overlapping
+* subsequence.
+*/
+   dtrace_xoroshiro128_plus_jump(state->dts_rstate[cpu_it-1],
+   state->dts_rstate[cpu_it]); 
+   }
+
 #ifdef illumos
state->dts_cleaner = CYCLIC_NONE;
state->dts_deadman = CYCLIC_NONE;

Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h
==
--- head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h  Fri Feb 
 3 21:37:27 2017(r313175)
+++ head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h  Fri Feb 
 3 22:26:19 2017(r313176)
@@ -50,6 +50,7 @@ extern "C" {
  */
 
 #include 
+
 #ifndef illumos
 #ifdef __sparcv9
 typedef uint32_t   pc_t;
@@ -65,6 +66,10 @@ typedef  u_long  greg_t;
 #defineDTRACE_MAXPROPLEN   128
 #defineDTRACE_DYNVAR_CHUNKSIZE 256
 
+#ifdef __FreeBSD__
+#defineNCPUMAXCPU
+#endif /* __FreeBSD__ */
+
 struct dtrace_probe;
 struct dtrace_ecb;
 struct dtrace_predicate;
@@ -1169,6 +1174,7 @@ struct dtrace_state {
dtrace_cred_t dts_cred; /* credentials */
size_t dts_nretained;   /* number of retained enabs */
int dts_getf;   /* number of getf() calls */
+   uint64_t dts_rstate[NCPU][2];   /* per-CPU random state */
 };
 
 struct dtrace_provider {

Modified: head/sys/modules/dtrace/dtrace/Makefile
==
--- head/sys/modules/dtrace/dtrace/Makefile Fri Feb  3 21:37:27 2017
(r313175)
+++ head/sys/modules/dtrace/dtrace/Makefile Fri Feb  3 22:26:19 2017
(r313176)
@@ -12,6 +12,7 @@ ARCHDIR=  ${MACHINE_CPUARCH}
 
 KMOD=  dtrace
 SRCS=  dtrace.c \
+   dtrace_xoroshiro128_plus.c \
dtrace_asm.S \
dtrace_subr.c

Re: svn commit: r313169 - head/tools/build/options

2017-02-03 Thread Warren Block

On Fri, 3 Feb 2017, Ngie Cooper (yaneurabeya) wrote:




On Feb 3, 2017, at 11:09, Warren Block  wrote:

Author: wblock (doc committer)
Date: Fri Feb  3 19:09:46 2017
New Revision: 313169
URL: https://svnweb.freebsd.org/changeset/base/313169

Log:
 Clarify some option descriptions, add a line of text to makeman to
 add the slightest hint of a shade of a clue of what it does.

 Sponsored by:  iXsystems

Modified:
 head/tools/build/options/WITHOUT_BLACKLIST
 head/tools/build/options/WITHOUT_CLANG_BOOTSTRAP
 head/tools/build/options/WITHOUT_CROSS_COMPILER
 head/tools/build/options/WITHOUT_DIALOG
 head/tools/build/options/WITHOUT_DMAGENT
 head/tools/build/options/WITHOUT_DOCCOMPRESS
 head/tools/build/options/WITHOUT_GPL_DTC
 head/tools/build/options/WITHOUT_INSTALLLIB
 head/tools/build/options/WITHOUT_KERBEROS
 head/tools/build/options/WITH_CCACHE_BUILD
 head/tools/build/options/WITH_DIRDEPS_BUILD
 head/tools/build/options/WITH_INSTALL_AS_USER
 head/tools/build/options/WITH_META_MODE
 head/tools/build/options/WITH_STAGING_MAN
 head/tools/build/options/makeman


I’m ok with the overall change, but next time, could changes to makeman be 
committed separately from the WITH* options to make it easier to MFC? Also, 
speaking of MFCing the change, will this ever be MFCed?


Sorry, was not planning on MFCing the makeman change, although it 
wouldn't hurt.

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

svn commit: r313175 - stable/11/sys/dev/cxgbe

2017-02-03 Thread John Baldwin
Author: jhb
Date: Fri Feb  3 21:37:27 2017
New Revision: 313175
URL: https://svnweb.freebsd.org/changeset/base/313175

Log:
  MFC 313020: Fix a couple of issues with t4iov probe and attach.
  
  - Check for Chelsio vendor ID in probe routines.
  - Fail attach instead of faulting if pci_find_dbsf() doesn't find a
device.
  
  PR:   216539
  Sponsored by: Chelsio Communications

Modified:
  stable/11/sys/dev/cxgbe/t4_iov.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/cxgbe/t4_iov.c
==
--- stable/11/sys/dev/cxgbe/t4_iov.cFri Feb  3 20:33:23 2017
(r313174)
+++ stable/11/sys/dev/cxgbe/t4_iov.cFri Feb  3 21:37:27 2017
(r313175)
@@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #endif
 
+#include "common/common.h"
 #include "t4_if.h"
 
 struct t4iov_softc {
@@ -106,6 +107,9 @@ t4iov_probe(device_t dev)
uint16_t d;
size_t i;
 
+   if (pci_get_vendor(dev) != PCI_VENDOR_ID_CHELSIO)
+   return (ENXIO);
+
d = pci_get_device(dev);
for (i = 0; i < nitems(t4iov_pciids); i++) {
if (d == t4iov_pciids[i].device) {
@@ -123,6 +127,9 @@ t5iov_probe(device_t dev)
uint16_t d;
size_t i;
 
+   if (pci_get_vendor(dev) != PCI_VENDOR_ID_CHELSIO)
+   return (ENXIO);
+
d = pci_get_device(dev);
for (i = 0; i < nitems(t5iov_pciids); i++) {
if (d == t5iov_pciids[i].device) {
@@ -140,6 +147,9 @@ t6iov_probe(device_t dev)
uint16_t d;
size_t i;
 
+   if (pci_get_vendor(dev) != PCI_VENDOR_ID_CHELSIO)
+   return (ENXIO);
+
d = pci_get_device(dev);
for (i = 0; i < nitems(t6iov_pciids); i++) {
if (d == t6iov_pciids[i].device) {
@@ -161,6 +171,8 @@ t4iov_attach(device_t dev)
 
sc->sc_main = pci_find_dbsf(pci_get_domain(dev), pci_get_bus(dev),
pci_get_slot(dev), 4);
+   if (sc->sc_main == NULL)
+   return (ENXIO);
if (T4_IS_MAIN_READY(sc->sc_main) == 0)
return (t4iov_attach_child(dev));
return (0);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r313166 - head/sys/boot/efi/libefi

2017-02-03 Thread Warner Losh
On Fri, Feb 3, 2017 at 1:44 PM, Ian Lepore  wrote:
> On Fri, 2017-02-03 at 13:25 -0700, Warner Losh wrote:
>> On Fri, Feb 3, 2017 at 11:20 AM, Ian Lepore  wrote:
>> >
>> > On Fri, 2017-02-03 at 18:52 +0200, Toomas Soome wrote:
>> > >
>> > > >
>> > > >
>> > > > On 3. veebr 2017, at 18:47, Ian Lepore  wrote:
>> > > >
>> > > > On Fri, 2017-02-03 at 16:39 +, Toomas Soome wrote:
>> > > > >
>> > > > >
>> > > > > Author: tsoome
>> > > > > Date: Fri Feb  3 16:39:10 2017
>> > > > > New Revision: 313166
>> > > > > URL: https://svnweb.freebsd.org/changeset/base/313166
>> > > > >
>> > > > > Log:
>> > > > >   loader: libefi/env.c warnings in arm build
>> > > > >
>> > > > >   The arm build has revealed some of the warnings, the fix
>> > > > > for
>> > > > > CHAR16
>> > > > >   warning is to switch the warning off for env.c (same as for
>> > > > > efinet.c).
>> > > > >
>> > > > How is disabling the warning instead of just fixing it the
>> > > > right
>> > > > thing
>> > > > to do?  I think disabling a printf format warning is never the
>> > > > right
>> > > > thing to do, it just turns a compile warning into a runtime
>> > > > failure.
>> > > I would love to see the correct fix - as all UEFI chars are 2
>> > > byte;
>> > > but thats up to arm experts. I just do not know the details why
>> > > the
>> > > arm is stuck with 4 byte wchar_t there - Im sure they do not have
>> > > this just for fun:)
>> > >
>> > > rgds,
>> > > toomas
>> > Hmm, looks like the right fix is to add -fshort-wchar to CFLAGS,
>> > but
>> > it's got to be consistant across all the libraries that get linked,
>> > and
>> > some of them are used in the non-efi case too.  I'll have a closer
>> > look
>> >  at whether we can fix it properly over the next few days.
>> I just wonder why that isn't the default And the consistency
>> matters only of wchar_t is used in the library... Lemme know what you
>> come up with...
>>
>> Warner
>
> ARM's abi definition requires 4-byte wchar_t, but allows "certain
> virtual environments" to use different sizes (without any explanation
> about what that might mean or how to achieve it).
>
> I'm not sure about the "only matters if" part -- the linker was
> spitting out hundreds of warnings about mismatched wchar_t sizes, as if
> it were part of object file metadata that failed a sanity check or
> something (or there are a lot more references to wchar_t in libstand
> and libfdt than I would have imagined).

Gotcha. I know the linker records various details in the .o's for
sanity checking. Didn't think this was one of them, so, yea, it looks
like you're right. We may have to build a separate copy of such
libraries for UEFI since it has a different ABI.

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


Re: svn commit: r313166 - head/sys/boot/efi/libefi

2017-02-03 Thread Ian Lepore
On Fri, 2017-02-03 at 13:25 -0700, Warner Losh wrote:
> On Fri, Feb 3, 2017 at 11:20 AM, Ian Lepore  wrote:
> > 
> > On Fri, 2017-02-03 at 18:52 +0200, Toomas Soome wrote:
> > > 
> > > > 
> > > > 
> > > > On 3. veebr 2017, at 18:47, Ian Lepore  wrote:
> > > > 
> > > > On Fri, 2017-02-03 at 16:39 +, Toomas Soome wrote:
> > > > > 
> > > > > 
> > > > > Author: tsoome
> > > > > Date: Fri Feb  3 16:39:10 2017
> > > > > New Revision: 313166
> > > > > URL: https://svnweb.freebsd.org/changeset/base/313166
> > > > > 
> > > > > Log:
> > > > >   loader: libefi/env.c warnings in arm build
> > > > > 
> > > > >   The arm build has revealed some of the warnings, the fix
> > > > > for
> > > > > CHAR16
> > > > >   warning is to switch the warning off for env.c (same as for
> > > > > efinet.c).
> > > > > 
> > > > How is disabling the warning instead of just fixing it the
> > > > right
> > > > thing
> > > > to do?  I think disabling a printf format warning is never the
> > > > right
> > > > thing to do, it just turns a compile warning into a runtime
> > > > failure.
> > > I would love to see the correct fix - as all UEFI chars are 2
> > > byte;
> > > but thats up to arm experts. I just do not know the details why
> > > the
> > > arm is stuck with 4 byte wchar_t there - Im sure they do not have
> > > this just for fun:)
> > > 
> > > rgds,
> > > toomas
> > Hmm, looks like the right fix is to add -fshort-wchar to CFLAGS,
> > but
> > it's got to be consistant across all the libraries that get linked,
> > and
> > some of them are used in the non-efi case too.  I'll have a closer
> > look
> >  at whether we can fix it properly over the next few days.
> I just wonder why that isn't the default And the consistency
> matters only of wchar_t is used in the library... Lemme know what you
> come up with...
> 
> Warner

ARM's abi definition requires 4-byte wchar_t, but allows "certain
virtual environments" to use different sizes (without any explanation
about what that might mean or how to achieve it).

I'm not sure about the "only matters if" part -- the linker was
spitting out hundreds of warnings about mismatched wchar_t sizes, as if
it were part of object file metadata that failed a sanity check or
something (or there are a lot more references to wchar_t in libstand
and libfdt than I would have imagined).

-- Ian

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


svn commit: r313174 - in head: lib/libc/sys share/man/man4

2017-02-03 Thread Jilles Tjoelker
Author: jilles
Date: Fri Feb  3 20:33:23 2017
New Revision: 313174
URL: https://svnweb.freebsd.org/changeset/base/313174

Log:
  Clean up documentation of AF_UNIX control messages.
  
  Document AF_UNIX control messages in unix(4) only, not split between unix(4)
  and recv(2).
  
  Also, warn about LOCAL_CREDS effective uid/gid fields, since the write could
  be from a setuid or setgid program (with the explicit SCM_CREDS and
  LOCAL_PEERCRED, the credentials are read at such a time that it can be
  assumed that the process intends for them to be used in this context).
  
  Reviewed by:  wblock
  MFC after:1 week
  Differential Revision:https://reviews.freebsd.org/D9298

Modified:
  head/lib/libc/sys/recv.2
  head/share/man/man4/unix.4

Modified: head/lib/libc/sys/recv.2
==
--- head/lib/libc/sys/recv.2Fri Feb  3 20:17:54 2017(r313173)
+++ head/lib/libc/sys/recv.2Fri Feb  3 20:33:23 2017(r313174)
@@ -28,7 +28,7 @@
 .\" @(#)recv.2 8.3 (Berkeley) 2/21/94
 .\" $FreeBSD$
 .\"
-.Dd August 18, 2016
+.Dd February 3, 2017
 .Dt RECV 2
 .Os
 .Sh NAME
@@ -266,57 +266,10 @@ with no data buffer provided immediately
 .Fn accept
 system call.
 .Pp
-Open file descriptors are now passed as ancillary data for
+With
 .Dv AF_UNIX
-domain sockets, with
-.Fa cmsg_level
-set to
-.Dv SOL_SOCKET
-and
-.Fa cmsg_type
-set to
-.Dv SCM_RIGHTS .
-The close-on-exec flag on received descriptors is set according to the
-.Dv MSG_CMSG_CLOEXEC
-flag passed to
-.Fn recvmsg .
-.Pp
-Process credentials can also be passed as ancillary data for
-.Dv AF_UNIX
-domain sockets using a
-.Fa cmsg_type
-of
-.Dv SCM_CREDS .
-In this case,
-.Fa cmsg_data
-should be a structure of type
-.Fa cmsgcred ,
-which is defined in
-.In sys/socket.h
-as follows:
-.Bd -literal
-struct cmsgcred {
-   pid_t   cmcred_pid; /* PID of sending process */
-   uid_t   cmcred_uid; /* real UID of sending process */
-   uid_t   cmcred_euid;/* effective UID of sending process */
-   gid_t   cmcred_gid; /* real GID of sending process */
-   short   cmcred_ngroups; /* number or groups */
-   gid_t   cmcred_groups[CMGROUP_MAX]; /* groups */
-};
-.Ed
-.Pp
-If a sender supplies ancillary data with enough space for the above struct
-tagged as
-.Dv SCM_CREDS
-control message type to the
-.Fn sendmsg
-system call, then kernel will fill in the credential information of the
-sending process and deliver it to the receiver.
-Since receiver usually has no control over a sender, this method of retrieving
-credential information isn't reliable.
-For reliable retrieval of remote side credentials it is advised to use the
-.Dv LOCAL_CREDS
-socket option on the receiving socket.
+domain sockets, ancillary data can be used to pass file descriptors and
+process credentials.
 See
 .Xr unix 4
 for details.

Modified: head/share/man/man4/unix.4
==
--- head/share/man/man4/unix.4  Fri Feb  3 20:17:54 2017(r313173)
+++ head/share/man/man4/unix.4  Fri Feb  3 20:33:23 2017(r313174)
@@ -28,7 +28,7 @@
 .\" @(#)unix.4 8.1 (Berkeley) 6/9/93
 .\" $FreeBSD$
 .\"
-.Dd March 19, 2013
+.Dd February 3, 2017
 .Dt UNIX 4
 .Os
 .Sh NAME
@@ -119,12 +119,12 @@ of a
 or
 .Xr sendto 2
 must be writable.
-.Sh PASSING FILE DESCRIPTORS
+.Sh CONTROL MESSAGES
 The
 .Ux Ns -domain
 sockets support the communication of
 .Ux
-file descriptors through the use of the
+file descriptors and process credentials through the use of the
 .Va msg_control
 field in the
 .Fa msg
@@ -132,13 +132,12 @@ argument to
 .Xr sendmsg 2
 and
 .Xr recvmsg 2 .
-.Pp
-Any valid descriptor may be sent in a message.
-The file descriptor(s) to be passed are described using a
+The items to be passed are described using a
 .Vt "struct cmsghdr"
 that is defined in the include file
 .In sys/socket.h .
-The type of the message is
+.Pp
+To send file descriptors, the type of the message is
 .Dv SCM_RIGHTS ,
 and the data portion of the messages is an array of integers
 representing the file descriptors to be passed.
@@ -161,6 +160,39 @@ call.
 Descriptors that are awaiting delivery, or that are
 purposely not received, are automatically closed by the system
 when the destination socket is closed.
+.Pp
+Credentials of the sending process can be transmitted explicitly using a
+control message of type
+.Dv SCM_CREDS
+with a data portion of type
+.Vt "struct cmsgcred" ,
+defined in
+.In sys/socket.h
+as follows:
+.Bd -literal
+struct cmsgcred {
+  pid_tcmcred_pid; /* PID of sending process */
+  uid_tcmcred_uid; /* real UID of sending process */
+  uid_tcmcred_euid;/* effective UID of sending process */
+  gid_tcmcred_gid; /* real GID of sending process */
+  shortcmcred_ngroups;

Re: svn commit: r313166 - head/sys/boot/efi/libefi

2017-02-03 Thread Warner Losh
On Fri, Feb 3, 2017 at 11:20 AM, Ian Lepore  wrote:
> On Fri, 2017-02-03 at 18:52 +0200, Toomas Soome wrote:
>> >
>> > On 3. veebr 2017, at 18:47, Ian Lepore  wrote:
>> >
>> > On Fri, 2017-02-03 at 16:39 +, Toomas Soome wrote:
>> > >
>> > > Author: tsoome
>> > > Date: Fri Feb  3 16:39:10 2017
>> > > New Revision: 313166
>> > > URL: https://svnweb.freebsd.org/changeset/base/313166
>> > >
>> > > Log:
>> > >   loader: libefi/env.c warnings in arm build
>> > >
>> > >   The arm build has revealed some of the warnings, the fix for
>> > > CHAR16
>> > >   warning is to switch the warning off for env.c (same as for
>> > > efinet.c).
>> > >
>> > How is disabling the warning instead of just fixing it the right
>> > thing
>> > to do?  I think disabling a printf format warning is never the
>> > right
>> > thing to do, it just turns a compile warning into a runtime
>> > failure.
>>
>> I would love to see the correct fix - as all UEFI chars are 2 byte;
>> but thats up to arm experts. I just do not know the details why the
>> arm is stuck with 4 byte wchar_t there - Im sure they do not have
>> this just for fun:)
>>
>> rgds,
>> toomas
>
> Hmm, looks like the right fix is to add -fshort-wchar to CFLAGS, but
> it's got to be consistant across all the libraries that get linked, and
> some of them are used in the non-efi case too.  I'll have a closer look
>  at whether we can fix it properly over the next few days.

I just wonder why that isn't the default And the consistency
matters only of wchar_t is used in the library... Lemme know what you
come up with...

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


svn commit: r313173 - head/tools/build/options

2017-02-03 Thread Warren Block
Author: wblock (doc committer)
Date: Fri Feb  3 20:17:54 2017
New Revision: 313173
URL: https://svnweb.freebsd.org/changeset/base/313173

Log:
  Re-enable an accidentally-disabled temp directory creation test.
  
  Reported by:  bjk
  Sponsored by: iXsystems

Modified:
  head/tools/build/options/makeman

Modified: head/tools/build/options/makeman
==
--- head/tools/build/options/makemanFri Feb  3 19:21:28 2017
(r313172)
+++ head/tools/build/options/makemanFri Feb  3 20:17:54 2017
(r313173)
@@ -8,7 +8,7 @@ export LC_ALL=C
 ident='$FreeBSD$'
 
 t=$(mktemp -d -t makeman)
-# trap 'test -d $t && rm -rf $t' exit
+trap 'test -d $t && rm -rf $t' exit
 
 srcdir=$(realpath ../../..)
 make="make -C $srcdir -m $srcdir/share/mk"
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r313169 - head/tools/build/options

2017-02-03 Thread Ngie Cooper (yaneurabeya)

> On Feb 3, 2017, at 11:09, Warren Block  wrote:
> 
> Author: wblock (doc committer)
> Date: Fri Feb  3 19:09:46 2017
> New Revision: 313169
> URL: https://svnweb.freebsd.org/changeset/base/313169
> 
> Log:
>  Clarify some option descriptions, add a line of text to makeman to
>  add the slightest hint of a shade of a clue of what it does.
> 
>  Sponsored by:iXsystems
> 
> Modified:
>  head/tools/build/options/WITHOUT_BLACKLIST
>  head/tools/build/options/WITHOUT_CLANG_BOOTSTRAP
>  head/tools/build/options/WITHOUT_CROSS_COMPILER
>  head/tools/build/options/WITHOUT_DIALOG
>  head/tools/build/options/WITHOUT_DMAGENT
>  head/tools/build/options/WITHOUT_DOCCOMPRESS
>  head/tools/build/options/WITHOUT_GPL_DTC
>  head/tools/build/options/WITHOUT_INSTALLLIB
>  head/tools/build/options/WITHOUT_KERBEROS
>  head/tools/build/options/WITH_CCACHE_BUILD
>  head/tools/build/options/WITH_DIRDEPS_BUILD
>  head/tools/build/options/WITH_INSTALL_AS_USER
>  head/tools/build/options/WITH_META_MODE
>  head/tools/build/options/WITH_STAGING_MAN
>  head/tools/build/options/makeman

I’m ok with the overall change, but next time, could changes to makeman be 
committed separately from the WITH* options to make it easier to MFC? Also, 
speaking of MFCing the change, will this ever be MFCed?
Thanks,
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r313043 - head/sys/kern

2017-02-03 Thread Gleb Smirnoff
On Fri, Feb 03, 2017 at 07:51:24AM +, hartmut.bra...@dlr.de wrote:
H> It was attached to my mail, but maybe got removed somewhere. Here it is. It 
does not use asio, but reproduces the same sequence of system calls. You start 
it and the try to connect with telnet to port 1.

I was blind, sorry :( And thanks for all replies.

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


Re: svn commit: r313048 - in head: contrib/tcpdump contrib/tcpdump/lbl contrib/tcpdump/missing usr.sbin/tcpdump/tcpdump

2017-02-03 Thread Gleb Smirnoff
On Fri, Feb 03, 2017 at 06:26:49AM -0200, Renato Botelho wrote:
R> > Author: glebius
R> > Date: Wed Feb  1 20:26:42 2017
R> > New Revision: 313048
R> > URL: https://svnweb.freebsd.org/changeset/base/313048
R> > 
R> > Log:
R> >  Update tcpdump to 4.9.0.
R> > 
R> >  It fixes many buffer overflow in different protocol parsers, but none of
R> >  them are critical, even in absense of Capsicum.
R> > 
R> >  Security: CVE-2016-7922, CVE-2016-7923, CVE-2016-7924, CVE-2016-7925
R> >  Security: CVE-2016-7926, CVE-2016-7927, CVE-2016-7928, CVE-2016-7929
R> >  Security: CVE-2016-7930, CVE-2016-7931, CVE-2016-7932, CVE-2016-7933
R> >  Security: CVE-2016-7934, CVE-2016-7935, CVE-2016-7936, CVE-2016-7937
R> >  Security: CVE-2016-7938, CVE-2016-7939, CVE-2016-7940, CVE-2016-7973
R> >  Security: CVE-2016-7974, CVE-2016-7975, CVE-2016-7983, CVE-2016-7984
R> >  Security: CVE-2016-7985, CVE-2016-7986, CVE-2016-7992, CVE-2016-7993
R> >  Security: CVE-2016-8574, CVE-2016-8575, CVE-2017-5202, CVE-2017-5203
R> >  Security: CVE-2017-5204, CVE-2017-5205, CVE-2017-5341, CVE-2017-5342
R> >  Security: CVE-2017-5482, CVE-2017-5483, CVE-2017-5484, CVE-2017-5485
R> >  Security: CVE-2017-5486
R> 
R> Hi Gleb,
R> 
R> Do you plan to MFC it to stable/11 and stable/10?

Yes, after 3 days.

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


Re: svn commit: r313169 - head/tools/build/options

2017-02-03 Thread Warren Block

On Fri, 3 Feb 2017, Ronald Klop wrote:


On Fri, 03 Feb 2017 20:09:46 +0100, Warren Block  wrote:


Modified: head/tools/build/options/WITHOUT_INSTALLLIB
==
--- head/tools/build/options/WITHOUT_INSTALLLIB	Fri Feb  3 17:02:57 
2017	(r313168)
+++ head/tools/build/options/WITHOUT_INSTALLLIB	Fri Feb  3 19:09:46 
2017	(r313169)

@@ -1,6 +1,6 @@
.\" $FreeBSD$
-Set this if you do not want to install optional libraries.
-For example when creating a
+Set this if to not install optional libraries.
+For example, when creating a
.Xr nanobsd 8
image.
.Bf -symbolic


I think this sentence did not become what you meant it to be.


Er... yes. Already decromulated.  But please keep an eye out for others.

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


svn commit: r313172 - head/tools/build/options

2017-02-03 Thread Warren Block
Author: wblock (doc committer)
Date: Fri Feb  3 19:21:28 2017
New Revision: 313172
URL: https://svnweb.freebsd.org/changeset/base/313172

Log:
  Decromulate an extra "if".
  
  Reported by:  rpokala
  Sponsored by: iXsystems

Modified:
  head/tools/build/options/WITHOUT_INSTALLLIB

Modified: head/tools/build/options/WITHOUT_INSTALLLIB
==
--- head/tools/build/options/WITHOUT_INSTALLLIB Fri Feb  3 19:15:53 2017
(r313171)
+++ head/tools/build/options/WITHOUT_INSTALLLIB Fri Feb  3 19:21:28 2017
(r313172)
@@ -1,5 +1,5 @@
 .\" $FreeBSD$
-Set this if to not install optional libraries.
+Set this to not install optional libraries.
 For example, when creating a
 .Xr nanobsd 8
 image.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r313169 - head/tools/build/options

2017-02-03 Thread Ronald Klop
On Fri, 03 Feb 2017 20:09:46 +0100, Warren Block   
wrote:



Modified: head/tools/build/options/WITHOUT_INSTALLLIB
==
--- head/tools/build/options/WITHOUT_INSTALLLIB	Fri Feb  3 17:02:57  
2017	(r313168)
+++ head/tools/build/options/WITHOUT_INSTALLLIB	Fri Feb  3 19:09:46  
2017	(r313169)

@@ -1,6 +1,6 @@
 .\" $FreeBSD$
-Set this if you do not want to install optional libraries.
-For example when creating a
+Set this if to not install optional libraries.
+For example, when creating a
 .Xr nanobsd 8
 image.
 .Bf -symbolic


I think this sentence did not become what you meant it to be.

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


svn commit: r313171 - stable/11/contrib/llvm/lib/Transforms/Scalar

2017-02-03 Thread Dimitry Andric
Author: dim
Date: Fri Feb  3 19:15:53 2017
New Revision: 313171
URL: https://svnweb.freebsd.org/changeset/base/313171

Log:
  MFC r312993:
  
  Pull in r279454 from upstream llvm trunk (by James Molloy):
  
[SROA] Remove incorrect assertion
  
Confirmed with aprantl, this assertion is incorrect - code can get
here (for example 80-bit FP types) and if it does it's benign. This
is exposed by a completely unrelated patch of mine, so stop the
compiler falling over.
  
Original differential: http://reviews.llvm.org/D16187
aprantl's advice to remove assertion:

http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160815/382129.html
  
  This should fix assertions when building the math/opensolaris-libm port.
  
  Reported by:  marino

Modified:
  stable/11/contrib/llvm/lib/Transforms/Scalar/SROA.cpp
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/contrib/llvm/lib/Transforms/Scalar/SROA.cpp
==
--- stable/11/contrib/llvm/lib/Transforms/Scalar/SROA.cpp   Fri Feb  3 
19:12:54 2017(r313170)
+++ stable/11/contrib/llvm/lib/Transforms/Scalar/SROA.cpp   Fri Feb  3 
19:15:53 2017(r313171)
@@ -4040,9 +4040,6 @@ bool SROA::splitAlloca(AllocaInst &AI, A
   Size = std::min(Size, AbsEnd - Start);
 }
 PieceExpr = DIB.createBitPieceExpression(Start, Size);
-  } else {
-assert(Pieces.size() == 1 &&
-   "partition is as large as original alloca");
   }
 
   // Remove any existing dbg.declare intrinsic describing the same alloca.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313170 - in stable/11/contrib/llvm: include/llvm/Analysis lib/Analysis lib/Transforms/Scalar

2017-02-03 Thread Dimitry Andric
Author: dim
Date: Fri Feb  3 19:12:54 2017
New Revision: 313170
URL: https://svnweb.freebsd.org/changeset/base/313170

Log:
  MFC r312832:
  
  Pull in r278160 from upstream llvm trunk (by Wei Mi):
  
Recommit "Use ValueOffsetPair to enhance value reuse during SCEV
expansion".
  
The fix for PR28705 will be committed consecutively.
  
In D12090, the ExprValueMap was added to reuse existing value during
SCEV expansion. However, const folding and sext/zext distribution can
make the reuse still difficult.
  
A simplified case is: suppose we know S1 expands to V1 in
ExprValueMap, and
  S1 = S2 + C_a
  S3 = S2 + C_b
where C_a and C_b are different SCEVConstants. Then we'd like to
expand S3 as V1 - C_a + C_b instead of expanding S2 literally. It is
helpful when S2 is a complex SCEV expr and S2 has no entry in
ExprValueMap, which is usually caused by the fact that S3 is
generated from S1 after const folding.
  
In order to do that, we represent ExprValueMap as a mapping from SCEV
to ValueOffsetPair. We will save both S1->{V1, 0} and S2->{V1, C_a}
into the ExprValueMap when we create SCEV for V1. When S3 is
expanded, it will first expand S2 to V1 - C_a because of S2->{V1,
C_a} in the map, then expand S3 to V1 - C_a + C_b.
  
Differential Revision: https://reviews.llvm.org/D21313
  
  Pull in r278161 from upstream llvm trunk (by Wei Mi):
  
Fix the runtime error caused by "Use ValueOffsetPair to enhance value
reuse during SCEV expansion".
  
The patch is to fix the bug in PR28705. It was caused by setting
wrong return value for SCEVExpander::findExistingExpansion. The
return values of findExistingExpansion have different meanings when
the function is used in different ways so it is easy to make mistake.
The fix creates two new interfaces to replace
SCEVExpander::findExistingExpansion, and specifies where each
interface is expected to be used.
  
Differential Revision: https://reviews.llvm.org/D22942
  
  Pull in r281439 from upstream llvm trunk (by Wei Mi):
  
Create a getelementptr instead of sub expr for ValueOffsetPair if the
value is a pointer.
  
This patch is to fix PR30213. When expanding an expr based on
ValueOffsetPair, if the value is of pointer type, we can only create
a getelementptr instead of sub expr.
  
Differential Revision: https://reviews.llvm.org/D24088
  
  This should fix assertion failures when building OpenCV >= 3.1, and also
  allow building lang/spidermonkey24 without any further assertions.
  
  PR:   215649

Modified:
  stable/11/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h
  stable/11/contrib/llvm/include/llvm/Analysis/ScalarEvolutionExpander.h
  stable/11/contrib/llvm/lib/Analysis/ScalarEvolution.cpp
  stable/11/contrib/llvm/lib/Analysis/ScalarEvolutionExpander.cpp
  stable/11/contrib/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h
==
--- stable/11/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h  Fri Feb 
 3 19:09:46 2017(r313169)
+++ stable/11/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h  Fri Feb 
 3 19:12:54 2017(r313170)
@@ -495,10 +495,29 @@ namespace llvm {
 
 /// The typedef for ExprValueMap.
 ///
-typedef DenseMap> ExprValueMapType;
+typedef std::pair ValueOffsetPair;
+typedef DenseMap> 
ExprValueMapType;
 
 /// ExprValueMap -- This map records the original values from which
 /// the SCEV expr is generated from.
+///
+/// We want to represent the mapping as SCEV -> ValueOffsetPair instead
+/// of SCEV -> Value:
+/// Suppose we know S1 expands to V1, and
+///  S1 = S2 + C_a
+///  S3 = S2 + C_b
+/// where C_a and C_b are different SCEVConstants. Then we'd like to
+/// expand S3 as V1 - C_a + C_b instead of expanding S2 literally.
+/// It is helpful when S2 is a complex SCEV expr.
+///
+/// In order to do that, we represent ExprValueMap as a mapping from
+/// SCEV to ValueOffsetPair. We will save both S1->{V1, 0} and
+/// S2->{V1, C_a} into the map when we create SCEV for V1. When S3
+/// is expanded, it will first expand S2 to V1 - C_a because of
+/// S2->{V1, C_a} in the map, then expand S3 to V1 - C_a + C_b.
+///
+/// Note: S->{V, Offset} in the ExprValueMap means S can be expanded
+/// to V - Offset.
 ExprValueMapType ExprValueMap;
 
 /// The typedef for ValueExprMap.
@@ -1181,7 +1200,7 @@ namespace llvm {
 bool containsAddRecurrence(const SCEV *S);
 
 /// Return the Value set from which the SCEV expr is generated.
-SetVector *getSCEVValues(const SCEV *S);
+SetVector *getSCEVValues(const SCEV *S);
 
 /// Erase Value from ValueExprMap and ExprValueMap.
 v

svn commit: r313169 - head/tools/build/options

2017-02-03 Thread Warren Block
Author: wblock (doc committer)
Date: Fri Feb  3 19:09:46 2017
New Revision: 313169
URL: https://svnweb.freebsd.org/changeset/base/313169

Log:
  Clarify some option descriptions, add a line of text to makeman to
  add the slightest hint of a shade of a clue of what it does.
  
  Sponsored by: iXsystems

Modified:
  head/tools/build/options/WITHOUT_BLACKLIST
  head/tools/build/options/WITHOUT_CLANG_BOOTSTRAP
  head/tools/build/options/WITHOUT_CROSS_COMPILER
  head/tools/build/options/WITHOUT_DIALOG
  head/tools/build/options/WITHOUT_DMAGENT
  head/tools/build/options/WITHOUT_DOCCOMPRESS
  head/tools/build/options/WITHOUT_GPL_DTC
  head/tools/build/options/WITHOUT_INSTALLLIB
  head/tools/build/options/WITHOUT_KERBEROS
  head/tools/build/options/WITH_CCACHE_BUILD
  head/tools/build/options/WITH_DIRDEPS_BUILD
  head/tools/build/options/WITH_INSTALL_AS_USER
  head/tools/build/options/WITH_META_MODE
  head/tools/build/options/WITH_STAGING_MAN
  head/tools/build/options/makeman

Modified: head/tools/build/options/WITHOUT_BLACKLIST
==
--- head/tools/build/options/WITHOUT_BLACKLIST  Fri Feb  3 17:02:57 2017
(r313168)
+++ head/tools/build/options/WITHOUT_BLACKLIST  Fri Feb  3 19:09:46 2017
(r313169)
@@ -1,2 +1,2 @@
 .\" $FreeBSD$
-Set this if you do not want to build blacklistd / blacklistctl.
+Set this if you do not want to build blacklistd/blacklistctl.

Modified: head/tools/build/options/WITHOUT_CLANG_BOOTSTRAP
==
--- head/tools/build/options/WITHOUT_CLANG_BOOTSTRAPFri Feb  3 17:02:57 
2017(r313168)
+++ head/tools/build/options/WITHOUT_CLANG_BOOTSTRAPFri Feb  3 19:09:46 
2017(r313169)
@@ -1,5 +1,5 @@
 .\" $FreeBSD$
-Set to not build the Clang C/C++ compiler during the bootstrap phase of the 
build.
-You must enable either gcc or clang bootstrap to be able to build the system,
-unless an alternative compiler is provided via
-XCC.
+Set to not build the Clang C/C++ compiler during the bootstrap phase of
+the build.
+To be able to build the system, either gcc or clang bootstrap must be
+enabled unless an alternate compiler is provided via XCC.

Modified: head/tools/build/options/WITHOUT_CROSS_COMPILER
==
--- head/tools/build/options/WITHOUT_CROSS_COMPILER Fri Feb  3 17:02:57 
2017(r313168)
+++ head/tools/build/options/WITHOUT_CROSS_COMPILER Fri Feb  3 19:09:46 
2017(r313169)
@@ -1,10 +1,10 @@
 .\" $FreeBSD$
 Set to not build any cross compiler in the cross-tools stage of buildworld.
-If you are compiling a different version of
+When compiling a different version of
 .Fx
-than what is installed on the system, you will need to provide an alternate
+than what is installed on the system, provide an alternate
 compiler with XCC to ensure success.
-If you are compiling with an identical version of
+When compiling with an identical version of
 .Fx
 to the host, this option may be safely used.
 This option may also be safe when the host version of

Modified: head/tools/build/options/WITHOUT_DIALOG
==
--- head/tools/build/options/WITHOUT_DIALOG Fri Feb  3 17:02:57 2017
(r313168)
+++ head/tools/build/options/WITHOUT_DIALOG Fri Feb  3 19:09:46 2017
(r313169)
@@ -1,2 +1,7 @@
 .\" $FreeBSD$
-Set to not build dialog(1), dialog(1,3), and dpv(1,3).
+Set to not build
+.Xr dialog 1 ,
+.Xr dialog 3 ,
+.Xr dpv 1 ,
+and
+.Xr dpv 3 .

Modified: head/tools/build/options/WITHOUT_DMAGENT
==
--- head/tools/build/options/WITHOUT_DMAGENTFri Feb  3 17:02:57 2017
(r313168)
+++ head/tools/build/options/WITHOUT_DMAGENTFri Feb  3 19:09:46 2017
(r313169)
@@ -1,2 +1,2 @@
 .\" $FreeBSD$
-Set to not build dma Mail Transport Agent
+Set to not build dma Mail Transport Agent.

Modified: head/tools/build/options/WITHOUT_DOCCOMPRESS
==
--- head/tools/build/options/WITHOUT_DOCCOMPRESSFri Feb  3 17:02:57 
2017(r313168)
+++ head/tools/build/options/WITHOUT_DOCCOMPRESSFri Feb  3 19:09:46 
2017(r313169)
@@ -1,3 +1,3 @@
 .\" $FreeBSD$
-Set to not to install compressed system documentation.
+Set to not install compressed system documentation.
 Only the uncompressed version will be installed.

Modified: head/tools/build/options/WITHOUT_GPL_DTC
==
--- head/tools/build/options/WITHOUT_GPL_DTCFri Feb  3 17:02:57 2017
(r313168)
+++ head/tools/build/options/WITHOUT_GPL_DTCFri Feb  3 19:09:46 2017
(r313169)
@@ -1,3 +1,3 @@
 .\" $FreeBSD$
-Set to build the BSD licensed version of the de

Re: svn commit: r313166 - head/sys/boot/efi/libefi

2017-02-03 Thread Ian Lepore
On Fri, 2017-02-03 at 18:52 +0200, Toomas Soome wrote:
> > 
> > On 3. veebr 2017, at 18:47, Ian Lepore  wrote:
> > 
> > On Fri, 2017-02-03 at 16:39 +, Toomas Soome wrote:
> > > 
> > > Author: tsoome
> > > Date: Fri Feb  3 16:39:10 2017
> > > New Revision: 313166
> > > URL: https://svnweb.freebsd.org/changeset/base/313166
> > > 
> > > Log:
> > >   loader: libefi/env.c warnings in arm build
> > >   
> > >   The arm build has revealed some of the warnings, the fix for
> > > CHAR16
> > >   warning is to switch the warning off for env.c (same as for
> > > efinet.c).
> > >   
> > How is disabling the warning instead of just fixing it the right
> > thing
> > to do?  I think disabling a printf format warning is never the
> > right
> > thing to do, it just turns a compile warning into a runtime
> > failure.
> 
> I would love to see the correct fix - as all UEFI chars are 2 byte;
> but thats up to arm experts. I just do not know the details why the
> arm is stuck with 4 byte wchar_t there - Im sure they do not have
> this just for fun:)
> 
> rgds,
> toomas

Hmm, looks like the right fix is to add -fshort-wchar to CFLAGS, but
it's got to be consistant across all the libraries that get linked, and
some of them are used in the non-efi case too.  I'll have a closer look
 at whether we can fix it properly over the next few days.

-- Ian

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


svn commit: r313168 - head/sys/netinet

2017-02-03 Thread Patrick Kelsey
Author: pkelsey
Date: Fri Feb  3 17:02:57 2017
New Revision: 313168
URL: https://svnweb.freebsd.org/changeset/base/313168

Log:
  Fix VIMAGE-related bugs in TFO.  The autokey callout vnet context was
  not being initialized, and the per-vnet fastopen context was only
  being initialized for the default vnet.
  
  PR:   216613
  Reported by:  Alex Deiter 
  MFC after:1 week

Modified:
  head/sys/netinet/tcp_fastopen.c
  head/sys/netinet/tcp_subr.c

Modified: head/sys/netinet/tcp_fastopen.c
==
--- head/sys/netinet/tcp_fastopen.c Fri Feb  3 16:57:14 2017
(r313167)
+++ head/sys/netinet/tcp_fastopen.c Fri Feb  3 17:02:57 2017
(r313168)
@@ -209,6 +209,7 @@ tcp_fastopen_init(void)
rm_init(&V_tcp_fastopen_keylock, "tfo_keylock");
callout_init_rm(&V_tcp_fastopen_autokey_ctx.c,
&V_tcp_fastopen_keylock, 0);
+   V_tcp_fastopen_autokey_ctx.v = curvnet;
V_tcp_fastopen_keys.newest = TCP_FASTOPEN_MAX_KEYS - 1;
 }
 

Modified: head/sys/netinet/tcp_subr.c
==
--- head/sys/netinet/tcp_subr.c Fri Feb  3 16:57:14 2017(r313167)
+++ head/sys/netinet/tcp_subr.c Fri Feb  3 17:02:57 2017(r313168)
@@ -679,6 +679,10 @@ tcp_init(void)
V_sack_hole_zone = uma_zcreate("sackhole", sizeof(struct sackhole),
NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0);
 
+#ifdef TCP_RFC7413
+   tcp_fastopen_init();
+#endif
+
/* Skip initialization of globals for non-default instances. */
if (!IS_DEFAULT_VNET(curvnet))
return;
@@ -732,10 +736,6 @@ tcp_init(void)
 #ifdef TCPPCAP
tcp_pcap_init();
 #endif
-
-#ifdef TCP_RFC7413
-   tcp_fastopen_init();
-#endif
 }
 
 #ifdef VIMAGE
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313167 - stable/11/bin/dd

2017-02-03 Thread Sevan Janiyan
Author: sevan (doc committer)
Date: Fri Feb  3 16:57:14 2017
New Revision: 313167
URL: https://svnweb.freebsd.org/changeset/base/313167

Log:
  Add history section for dd(1)
  First version of UNIX to include dd found using TUHS
  http://minnie.tuhs.org/cgi-bin/utree.pl?file=V5/usr/source/s1/dd.c
  
  PR:   211777
  Approved by:  bcr (mentor)
  Differential Revision:https://reviews.freebsd.org/D8104

Modified:
  stable/11/bin/dd/dd.1
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/bin/dd/dd.1
==
--- stable/11/bin/dd/dd.1   Fri Feb  3 16:39:10 2017(r313166)
+++ stable/11/bin/dd/dd.1   Fri Feb  3 16:57:14 2017(r313167)
@@ -32,7 +32,7 @@
 .\" @(#)dd.1   8.2 (Berkeley) 1/13/94
 .\" $FreeBSD$
 .\"
-.Dd February 28, 2016
+.Dd October 5, 2016
 .Dt DD 1
 .Os
 .Sh NAME
@@ -447,6 +447,11 @@ and
 values are extensions to the
 .Tn POSIX
 standard.
+.Sh HISTORY
+A
+.Nm
+command appeared in
+.At v5 .
 .Sh BUGS
 Protection mechanisms in the
 .Xr geom 4
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r313166 - head/sys/boot/efi/libefi

2017-02-03 Thread Toomas Soome

> On 3. veebr 2017, at 18:47, Ian Lepore  wrote:
> 
> On Fri, 2017-02-03 at 16:39 +, Toomas Soome wrote:
>> Author: tsoome
>> Date: Fri Feb  3 16:39:10 2017
>> New Revision: 313166
>> URL: https://svnweb.freebsd.org/changeset/base/313166
>> 
>> Log:
>>   loader: libefi/env.c warnings in arm build
>>   
>>   The arm build has revealed some of the warnings, the fix for CHAR16
>>   warning is to switch the warning off for env.c (same as for
>> efinet.c).
>>   
> 
> How is disabling the warning instead of just fixing it the right thing
> to do?  I think disabling a printf format warning is never the right
> thing to do, it just turns a compile warning into a runtime failure.


I would love to see the correct fix - as all UEFI chars are 2 byte; but thats 
up to arm experts. I just do not know the details why the arm is stuck with 4 
byte wchar_t there - Im sure they do not have this just for fun:)

rgds,
toomas

> 
> -- Ian
> 
>>   For error code we need to use macro.
>>   
>>   Reported by:   gjb
>>   Reviewed by:   imp
>>   Approved by:   imp (mentor)
>>   Differential Revision: https://reviews.freebsd.org/D9422
>> 
>> Modified:
>>   head/sys/boot/efi/libefi/Makefile
>>   head/sys/boot/efi/libefi/env.c
>> 
>> Modified: head/sys/boot/efi/libefi/Makefile
>> =
>> =
>> --- head/sys/boot/efi/libefi/MakefileFri Feb  3 16:36:14 2017
>>  (r313165)
>> +++ head/sys/boot/efi/libefi/MakefileFri Feb  3 16:39:10 2017
>>  (r313166)
>> @@ -26,6 +26,7 @@ SRCS+= time_event.c
>>  # of a short. There's no good cast to use here so just ignore the
>>  # warnings for now.
>>  CWARNFLAGS.efinet.c+=   -Wno-format
>> +CWARNFLAGS.env.c+=  -Wno-format
>>  
>>  .if ${MACHINE_CPUARCH} == "aarch64"
>>  CFLAGS+=-msoft-float -mgeneral-regs-only
>> 
>> Modified: head/sys/boot/efi/libefi/env.c
>> =
>> =
>> --- head/sys/boot/efi/libefi/env.c   Fri Feb  3 16:36:14 2017
>> (r313165)
>> +++ head/sys/boot/efi/libefi/env.c   Fri Feb  3 16:39:10 2017
>> (r313166)
>> @@ -94,14 +94,16 @@ efi_print_var(CHAR16 *varnamearg, EFI_GU
>>  status = RS->GetVariable(varnamearg, matchguid, &attr,
>>  &datasz, NULL);
>>  if (status != EFI_BUFFER_TOO_SMALL) {
>> -printf("Can't get the variable: error %#lx\n",
>> status);
>> +printf("Can't get the variable: error %#lx\n",
>> +EFI_ERROR_CODE(status));
>>  return (CMD_ERROR);
>>  }
>>  data = malloc(datasz);
>>  status = RS->GetVariable(varnamearg, matchguid, &attr,
>>  &datasz, data);
>>  if (status != EFI_SUCCESS) {
>> -printf("Can't get the variable: error %#lx\n",
>> status);
>> +printf("Can't get the variable: error %#lx\n",
>> +EFI_ERROR_CODE(status));
>>  return (CMD_ERROR);
>>  }
>>  uuid_to_string((uuid_t *)matchguid, &str, &uuid_status);
>> 

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


Re: svn commit: r313166 - head/sys/boot/efi/libefi

2017-02-03 Thread Warner Losh
On Fri, Feb 3, 2017 at 9:47 AM, Ian Lepore  wrote:
> On Fri, 2017-02-03 at 16:39 +, Toomas Soome wrote:
>> Author: tsoome
>> Date: Fri Feb  3 16:39:10 2017
>> New Revision: 313166
>> URL: https://svnweb.freebsd.org/changeset/base/313166
>>
>> Log:
>>   loader: libefi/env.c warnings in arm build
>>
>>   The arm build has revealed some of the warnings, the fix for CHAR16
>>   warning is to switch the warning off for env.c (same as for
>> efinet.c).
>>
>
> How is disabling the warning instead of just fixing it the right thing
> to do?  I think disabling a printf format warning is never the right
> thing to do, it just turns a compile warning into a runtime failure.

Because clang's understanding of %S in the bootloader doesn't match
how it's actually used and there's no casting that will fix that.

Warner

> -- Ian
>
>>   For error code we need to use macro.
>>
>>   Reported by:gjb
>>   Reviewed by:imp
>>   Approved by:imp (mentor)
>>   Differential Revision:  https://reviews.freebsd.org/D9422
>>
>> Modified:
>>   head/sys/boot/efi/libefi/Makefile
>>   head/sys/boot/efi/libefi/env.c
>>
>> Modified: head/sys/boot/efi/libefi/Makefile
>> =
>> =
>> --- head/sys/boot/efi/libefi/Makefile Fri Feb  3 16:36:14 2017
>>   (r313165)
>> +++ head/sys/boot/efi/libefi/Makefile Fri Feb  3 16:39:10 2017
>>   (r313166)
>> @@ -26,6 +26,7 @@ SRCS+=  time_event.c
>>  # of a short. There's no good cast to use here so just ignore the
>>  # warnings for now.
>>  CWARNFLAGS.efinet.c+=-Wno-format
>> +CWARNFLAGS.env.c+=   -Wno-format
>>
>>  .if ${MACHINE_CPUARCH} == "aarch64"
>>  CFLAGS+= -msoft-float -mgeneral-regs-only
>>
>> Modified: head/sys/boot/efi/libefi/env.c
>> =
>> =
>> --- head/sys/boot/efi/libefi/env.cFri Feb  3 16:36:14 2017
>> (r313165)
>> +++ head/sys/boot/efi/libefi/env.cFri Feb  3 16:39:10 2017
>> (r313166)
>> @@ -94,14 +94,16 @@ efi_print_var(CHAR16 *varnamearg, EFI_GU
>>   status = RS->GetVariable(varnamearg, matchguid, &attr,
>>   &datasz, NULL);
>>   if (status != EFI_BUFFER_TOO_SMALL) {
>> - printf("Can't get the variable: error %#lx\n",
>> status);
>> + printf("Can't get the variable: error %#lx\n",
>> + EFI_ERROR_CODE(status));
>>   return (CMD_ERROR);
>>   }
>>   data = malloc(datasz);
>>   status = RS->GetVariable(varnamearg, matchguid, &attr,
>>   &datasz, data);
>>   if (status != EFI_SUCCESS) {
>> - printf("Can't get the variable: error %#lx\n",
>> status);
>> + printf("Can't get the variable: error %#lx\n",
>> + EFI_ERROR_CODE(status));
>>   return (CMD_ERROR);
>>   }
>>   uuid_to_string((uuid_t *)matchguid, &str, &uuid_status);
>>
>
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r313166 - head/sys/boot/efi/libefi

2017-02-03 Thread Ian Lepore
On Fri, 2017-02-03 at 16:39 +, Toomas Soome wrote:
> Author: tsoome
> Date: Fri Feb  3 16:39:10 2017
> New Revision: 313166
> URL: https://svnweb.freebsd.org/changeset/base/313166
> 
> Log:
>   loader: libefi/env.c warnings in arm build
>   
>   The arm build has revealed some of the warnings, the fix for CHAR16
>   warning is to switch the warning off for env.c (same as for
> efinet.c).
>   

How is disabling the warning instead of just fixing it the right thing
to do?  I think disabling a printf format warning is never the right
thing to do, it just turns a compile warning into a runtime failure.

-- Ian

>   For error code we need to use macro.
>   
>   Reported by:gjb
>   Reviewed by:imp
>   Approved by:imp (mentor)
>   Differential Revision:  https://reviews.freebsd.org/D9422
> 
> Modified:
>   head/sys/boot/efi/libefi/Makefile
>   head/sys/boot/efi/libefi/env.c
> 
> Modified: head/sys/boot/efi/libefi/Makefile
> =
> =
> --- head/sys/boot/efi/libefi/Makefile Fri Feb  3 16:36:14 2017
>   (r313165)
> +++ head/sys/boot/efi/libefi/Makefile Fri Feb  3 16:39:10 2017
>   (r313166)
> @@ -26,6 +26,7 @@ SRCS+=  time_event.c
>  # of a short. There's no good cast to use here so just ignore the
>  # warnings for now.
>  CWARNFLAGS.efinet.c+=-Wno-format
> +CWARNFLAGS.env.c+=   -Wno-format
>  
>  .if ${MACHINE_CPUARCH} == "aarch64"
>  CFLAGS+= -msoft-float -mgeneral-regs-only
> 
> Modified: head/sys/boot/efi/libefi/env.c
> =
> =
> --- head/sys/boot/efi/libefi/env.cFri Feb  3 16:36:14 2017
> (r313165)
> +++ head/sys/boot/efi/libefi/env.cFri Feb  3 16:39:10 2017
> (r313166)
> @@ -94,14 +94,16 @@ efi_print_var(CHAR16 *varnamearg, EFI_GU
>   status = RS->GetVariable(varnamearg, matchguid, &attr,
>   &datasz, NULL);
>   if (status != EFI_BUFFER_TOO_SMALL) {
> - printf("Can't get the variable: error %#lx\n",
> status);
> + printf("Can't get the variable: error %#lx\n",
> + EFI_ERROR_CODE(status));
>   return (CMD_ERROR);
>   }
>   data = malloc(datasz);
>   status = RS->GetVariable(varnamearg, matchguid, &attr,
>   &datasz, data);
>   if (status != EFI_SUCCESS) {
> - printf("Can't get the variable: error %#lx\n",
> status);
> + printf("Can't get the variable: error %#lx\n",
> + EFI_ERROR_CODE(status));
>   return (CMD_ERROR);
>   }
>   uuid_to_string((uuid_t *)matchguid, &str, &uuid_status);
> 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313166 - head/sys/boot/efi/libefi

2017-02-03 Thread Toomas Soome
Author: tsoome
Date: Fri Feb  3 16:39:10 2017
New Revision: 313166
URL: https://svnweb.freebsd.org/changeset/base/313166

Log:
  loader: libefi/env.c warnings in arm build
  
  The arm build has revealed some of the warnings, the fix for CHAR16
  warning is to switch the warning off for env.c (same as for efinet.c).
  
  For error code we need to use macro.
  
  Reported by:  gjb
  Reviewed by:  imp
  Approved by:  imp (mentor)
  Differential Revision:https://reviews.freebsd.org/D9422

Modified:
  head/sys/boot/efi/libefi/Makefile
  head/sys/boot/efi/libefi/env.c

Modified: head/sys/boot/efi/libefi/Makefile
==
--- head/sys/boot/efi/libefi/Makefile   Fri Feb  3 16:36:14 2017
(r313165)
+++ head/sys/boot/efi/libefi/Makefile   Fri Feb  3 16:39:10 2017
(r313166)
@@ -26,6 +26,7 @@ SRCS+=time_event.c
 # of a short. There's no good cast to use here so just ignore the
 # warnings for now.
 CWARNFLAGS.efinet.c+=  -Wno-format
+CWARNFLAGS.env.c+= -Wno-format
 
 .if ${MACHINE_CPUARCH} == "aarch64"
 CFLAGS+=   -msoft-float -mgeneral-regs-only

Modified: head/sys/boot/efi/libefi/env.c
==
--- head/sys/boot/efi/libefi/env.c  Fri Feb  3 16:36:14 2017
(r313165)
+++ head/sys/boot/efi/libefi/env.c  Fri Feb  3 16:39:10 2017
(r313166)
@@ -94,14 +94,16 @@ efi_print_var(CHAR16 *varnamearg, EFI_GU
status = RS->GetVariable(varnamearg, matchguid, &attr,
&datasz, NULL);
if (status != EFI_BUFFER_TOO_SMALL) {
-   printf("Can't get the variable: error %#lx\n", status);
+   printf("Can't get the variable: error %#lx\n",
+   EFI_ERROR_CODE(status));
return (CMD_ERROR);
}
data = malloc(datasz);
status = RS->GetVariable(varnamearg, matchguid, &attr,
&datasz, data);
if (status != EFI_SUCCESS) {
-   printf("Can't get the variable: error %#lx\n", status);
+   printf("Can't get the variable: error %#lx\n",
+   EFI_ERROR_CODE(status));
return (CMD_ERROR);
}
uuid_to_string((uuid_t *)matchguid, &str, &uuid_status);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313165 - stable/10/sys/x86/x86

2017-02-03 Thread Pedro F. Giffuni
Author: pfg
Date: Fri Feb  3 16:36:14 2017
New Revision: 313165
URL: https://svnweb.freebsd.org/changeset/base/313165

Log:
  MFC r312001:
  Remove __nonnull() attributes from x86 machine check architecture.
  
  In this case the attributes serve little purpose as they just don't
  enforce run time checks, If anything the attributes would cause NULL pointer
  checks to be ignored but there are no such checks so the only effect is
  cosmetic.
  
  Reviewed by:  jhb, avg

Modified:
  stable/10/sys/x86/x86/mca.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/x86/x86/mca.c
==
--- stable/10/sys/x86/x86/mca.c Fri Feb  3 16:35:10 2017(r313164)
+++ stable/10/sys/x86/x86/mca.c Fri Feb  3 16:36:14 2017(r313165)
@@ -249,7 +249,7 @@ mca_error_mmtype(uint16_t mca_error)
return ("???");
 }
 
-static int __nonnull(1)
+static int
 mca_mute(const struct mca_record *rec)
 {
 
@@ -278,7 +278,7 @@ mca_mute(const struct mca_record *rec)
 }
 
 /* Dump details about a single machine check. */
-static void __nonnull(1)
+static void
 mca_log(const struct mca_record *rec)
 {
uint16_t mca_error;
@@ -417,7 +417,7 @@ mca_log(const struct mca_record *rec)
printf("MCA: Misc 0x%llx\n", (long long)rec->mr_misc);
 }
 
-static int __nonnull(2)
+static int
 mca_check_status(int bank, struct mca_record *rec)
 {
uint64_t status;
@@ -484,7 +484,7 @@ mca_refill(void *context, int pending)
mca_fill_freelist();
 }
 
-static void __nonnull(2)
+static void
 mca_record_entry(enum scan_mode mode, const struct mca_record *record)
 {
struct mca_internal *rec;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313164 - stable/11/sys/x86/x86

2017-02-03 Thread Pedro F. Giffuni
Author: pfg
Date: Fri Feb  3 16:35:10 2017
New Revision: 313164
URL: https://svnweb.freebsd.org/changeset/base/313164

Log:
  MFC r312001:
  Remove __nonnull() attributes from x86 machine check architecture.
  
  In this case the attributes serve little purpose as they just don't
  enforce run time checks, If anything the attributes would cause NULL pointer
  checks to be ignored but there are no such checks so the only effect is
  cosmetic.
  
  Reviewed by:  jhb, avg

Modified:
  stable/11/sys/x86/x86/mca.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/x86/x86/mca.c
==
--- stable/11/sys/x86/x86/mca.c Fri Feb  3 16:27:23 2017(r313163)
+++ stable/11/sys/x86/x86/mca.c Fri Feb  3 16:35:10 2017(r313164)
@@ -247,7 +247,7 @@ mca_error_mmtype(uint16_t mca_error)
return ("???");
 }
 
-static int __nonnull(1)
+static int
 mca_mute(const struct mca_record *rec)
 {
 
@@ -276,7 +276,7 @@ mca_mute(const struct mca_record *rec)
 }
 
 /* Dump details about a single machine check. */
-static void __nonnull(1)
+static void
 mca_log(const struct mca_record *rec)
 {
uint16_t mca_error;
@@ -415,7 +415,7 @@ mca_log(const struct mca_record *rec)
printf("MCA: Misc 0x%llx\n", (long long)rec->mr_misc);
 }
 
-static int __nonnull(2)
+static int
 mca_check_status(int bank, struct mca_record *rec)
 {
uint64_t status;
@@ -482,7 +482,7 @@ mca_refill(void *context, int pending)
mca_fill_freelist();
 }
 
-static void __nonnull(2)
+static void
 mca_record_entry(enum scan_mode mode, const struct mca_record *record)
 {
struct mca_internal *rec;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313163 - head

2017-02-03 Thread Bryan Drewery
Author: bdrewery
Date: Fri Feb  3 16:27:23 2017
New Revision: 313163
URL: https://svnweb.freebsd.org/changeset/base/313163

Log:
  native-xtools: Add missing readelf.
  
  The switch to elftoolchain's readelf in r280859 caused native-xtools
  to no longer build readelf.  This fixes poudriere builds not using
  a native readelf when expected.
  
  Reported by:  strejda on freenode
  MFC after:2 weeks
  Sponsored by: Dell EMC Isilon

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Fri Feb  3 16:21:30 2017(r313162)
+++ head/Makefile.inc1  Fri Feb  3 16:27:23 2017(r313163)
@@ -1950,6 +1950,7 @@ native-xtools: .PHONY
 usr.bin/mktemp \
 usr.bin/mt \
 usr.bin/patch \
+usr.bin/readelf \
 usr.bin/sed \
 usr.bin/sort \
 usr.bin/tar \
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313162 - head/usr.sbin/ctladm

2017-02-03 Thread Warren Block
Author: wblock (doc committer)
Date: Fri Feb  3 16:21:30 2017
New Revision: 313162
URL: https://svnweb.freebsd.org/changeset/base/313162

Log:
  Replace Cyrillic characters with Latin (normal) ones.
  
  PR:   216534
  Submitted by: eborisch+free...@gmail.com
  MFC after:1 week
  Sponsored by: iXsystems

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

Modified: head/usr.sbin/ctladm/ctladm.8
==
--- head/usr.sbin/ctladm/ctladm.8   Fri Feb  3 16:15:06 2017
(r313161)
+++ head/usr.sbin/ctladm/ctladm.8   Fri Feb  3 16:21:30 2017
(r313162)
@@ -888,8 +888,8 @@ client through the selection of appropri
 The default value is "restricted".  It improves data integrity, but may
 introduce some additional delays.
 .It Va serseq
-Set to "on" to serialize conseсutive reads/writes.
-Set to "read" to serialize conseсutive reads.
+Set to "on" to serialize consecutive reads/writes.
+Set to "read" to serialize consecutive reads.
 Set to "off" to allow them be issued in parallel.
 Parallel issue of consecutive operations may confuse logic of the
 backing file system, hurting performance; but it may improve performance
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

svn commit: r313161 - stable/10/share/misc

2017-02-03 Thread Sevan Janiyan
Author: sevan (doc committer)
Date: Fri Feb  3 16:15:06 2017
New Revision: 313161
URL: https://svnweb.freebsd.org/changeset/base/313161

Log:
  MFC from r27 to 307002.

Modified:
  stable/10/share/misc/bsd-family-tree

Modified: stable/10/share/misc/bsd-family-tree
==
--- stable/10/share/misc/bsd-family-treeFri Feb  3 16:08:58 2017
(r313160)
+++ stable/10/share/misc/bsd-family-treeFri Feb  3 16:15:06 2017
(r313161)
@@ -258,6 +258,9 @@ FreeBSD 5.2   |  |  
  | |  8.3 |  | |  ||   |
  | |   |  |  | |   NetBSD  |   |
  | |   |  |  | |5.1.3  |   |
+ | |   |  |  | |  ||   |
+ | |   |  |  | |   NetBSD  |   |
+ | |   |  |  | |5.1.4  |   |
  | |   |  |  | |   OpenBSD 5.1 |
  | |   |   Mac OS X  | `.  |   |
  | |   | 10.8|   \ |   |
@@ -268,14 +271,17 @@ FreeBSD 5.2   |  |  
  | |   |  |  | | |||   |
  | |   |  |  | | | NetBSD  |   |
  | |   |  |  | | |  5.2.1  |   |
+ | |   |  |  | | |||   |
+ | |   |  |  | | | NetBSD  |   |
+ | |   |  |  | | |  5.2.2  |   |
  | |   |  |  | | | |   |
  | |   |  |  | |  \|   |
  | |   |  |  | |   NetBSD  |   |
  | |   |  |  | |6.0.1  |   |
- | |   |  |  | |  ||   |
+ | |   |  |  | |  |   OpenBSD 5.3  DragonFly 3.4.1
  | |   |  |  | |   NetBSD  |   |
  | |   |  |  | |6.0.2  |   |
- | |   |  |  | |  |   OpenBSD 5.3  DragonFly 3.4.1
+ | |   |  |  | |  ||   | 
  | |   |  |  | |   NetBSD  |   |
  | |   |  |  | |6.0.3  |   |
  | |   |  |  | |  ||   |
@@ -296,25 +302,55 @@ FreeBSD 5.2   |  |  
  |\   |  |   | |   |
  *--FreeBSD|  |  |NetBSD 6.1.3 |   |
  |   10.0  |  |  |   | |   |
- | |  |  |   | |   DragonFly 3.6.1
- | |  |  |   | |   |
- | |  |  |   | |   |
- | |  |  |   | |   DragonFly 3.6.2
- | |  |  |NetBSD 6.1.4 |   |
- | |  |  | |   |
- | |  |  |OpenBSD 5.5  |
- | |  |  | |   DragonFly 3.8.0
- |  FreeBSD   |  | |   |
- |9.3 |  | |   |
- ||  | |   |
- ||  | |   |
- ||  | |   |
- ||  | |   |
- ||  | |   |
- ||  | |   |
+ | |   |  |  |   | |   DragonFly 3.6.1
+ | |   |  |  |   | |   |
+ | |   |  |  |   | |   |
+ | |   |  |  |   | |   DragonFly 3.6.2
+ | |   |  |  |NetBSD 6.1.4 |   |
+ | |   |  |  |   | |   |
+ | |   |  |  |   |OpenBSD 5.5  |
+ | |   |  |  |   | |   |
+ | |   |  |  |   | |   DragonFly 3.8.0
+ | |   |  |  |   | |   |
+ | | 

svn commit: r313160 - head/sbin/resolvconf

2017-02-03 Thread Pedro F. Giffuni
Author: pfg
Date: Fri Feb  3 16:08:58 2017
New Revision: 313160
URL: https://svnweb.freebsd.org/changeset/base/313160

Log:
  resolvconf: restore RESTARTCMD=, CMD1=, CMD2= and sed pattern as before.
  
  r312992 removed RESTARTCMD_WITH_ARG for @RESTARTCMD something@ but
  reverted the sed to be '@RESTARTCMD \(.*\)@' and RESTARTCMD= to be
  the value of RESTARTCMD_WITH_ARG.
  
  Submitted by: Guy Yur
  x_MFC with:   r312992

Modified:
  head/sbin/resolvconf/Makefile

Modified: head/sbin/resolvconf/Makefile
==
--- head/sbin/resolvconf/Makefile   Fri Feb  3 13:07:24 2017
(r313159)
+++ head/sbin/resolvconf/Makefile   Fri Feb  3 16:08:58 2017
(r313160)
@@ -20,16 +20,16 @@ SBINDIR=/sbin
 
 # We don't assume to restart the services in /sbin.  So, though
 # our service(8) is in /usr/sbin, we can use it, here.
-CMD1=  \1 onestatus >/dev/null 2>\&1
-CMD2=  \1 restart
-RESTARTCMD=/usr/sbin/service ${CMD1} \&\& /usr/sbin/service ${CMD2}
+CMD1=  \\$$1 onestatus >/dev/null 2>\&1
+CMD2=  \\$$1 restart
+RESTARTCMD="/usr/sbin/service ${CMD1} \&\& /usr/sbin/service ${CMD2}"
 
 .for f in ${SCRIPTS} ${FILES} ${MAN}
 ${f}:  ${f}.in
sed -e 's:@SYSCONFDIR@:${SYSCONFDIR}:g' \
-e 's:@LIBEXECDIR@:${FILESDIR}:g' \
-e 's:@VARDIR@:${VARDIR}:g' \
-   -e 's:@RESTARTCMD \(.*\)@:${RESTARTCMD}:g' \
+   -e 's:@RESTARTCMD@:${RESTARTCMD}:g' \
-e 's:@RCDIR@:${RCDIR}:g' \
-e 's:@SBINDIR@:${SBINDIR}:g' \
-e 's: vpn : ng[0-9]*&:g' \
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313159 - vendor/unbound/1.6.0

2017-02-03 Thread Dag-Erling Smørgrav
Author: des
Date: Fri Feb  3 13:07:24 2017
New Revision: 313159
URL: https://svnweb.freebsd.org/changeset/base/313159

Log:
  tag unbound 1.6.0

Added:
  vendor/unbound/1.6.0/
 - copied from r313158, vendor/unbound/dist/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313158 - in vendor/unbound/dist: . cachedb contrib daemon dns64 doc iterator libunbound libunbound/python/doc libunbound/python/doc/examples pythonmod pythonmod/doc pythonmod/doc/examp...

2017-02-03 Thread Dag-Erling Smørgrav
Author: des
Date: Fri Feb  3 13:06:34 2017
New Revision: 313158
URL: https://svnweb.freebsd.org/changeset/base/313158

Log:
  import unbound 1.6.0

Added:
  vendor/unbound/dist/.gitattributes
  vendor/unbound/dist/doc/CNAME-basedRedirectionDesignNotes.pdf   (contents, 
props changed)
  vendor/unbound/dist/pythonmod/doc/examples/example5.rst
  vendor/unbound/dist/pythonmod/doc/examples/example6.rst
  vendor/unbound/dist/pythonmod/examples/edns.py
  vendor/unbound/dist/pythonmod/examples/inplace_callbacks.py
  vendor/unbound/dist/pythonmod/test-edns.conf
  vendor/unbound/dist/pythonmod/test-inplace_callbacks.py
  vendor/unbound/dist/services/view.c
  vendor/unbound/dist/services/view.h
  vendor/unbound/dist/testdata/local_cname.rpl
  vendor/unbound/dist/testdata/stop_nxdomain_minimised.rpl
  vendor/unbound/dist/testdata/views.rpl
Modified:
  vendor/unbound/dist/Makefile.in
  vendor/unbound/dist/cachedb/cachedb.c
  vendor/unbound/dist/config.h.in
  vendor/unbound/dist/configure
  vendor/unbound/dist/configure.ac
  vendor/unbound/dist/contrib/libunbound.pc.in
  vendor/unbound/dist/contrib/unbound_munin_
  vendor/unbound/dist/daemon/acl_list.c
  vendor/unbound/dist/daemon/acl_list.h
  vendor/unbound/dist/daemon/cachedump.c
  vendor/unbound/dist/daemon/daemon.c
  vendor/unbound/dist/daemon/daemon.h
  vendor/unbound/dist/daemon/remote.c
  vendor/unbound/dist/daemon/stats.c
  vendor/unbound/dist/daemon/stats.h
  vendor/unbound/dist/daemon/unbound.c
  vendor/unbound/dist/daemon/worker.c
  vendor/unbound/dist/daemon/worker.h
  vendor/unbound/dist/dns64/dns64.c
  vendor/unbound/dist/doc/Changelog
  vendor/unbound/dist/doc/README
  vendor/unbound/dist/doc/example.conf.in
  vendor/unbound/dist/doc/libunbound.3.in
  vendor/unbound/dist/doc/unbound-anchor.8.in
  vendor/unbound/dist/doc/unbound-checkconf.8.in
  vendor/unbound/dist/doc/unbound-control.8.in
  vendor/unbound/dist/doc/unbound-host.1.in
  vendor/unbound/dist/doc/unbound.8.in
  vendor/unbound/dist/doc/unbound.conf.5.in
  vendor/unbound/dist/iterator/iter_delegpt.c
  vendor/unbound/dist/iterator/iter_delegpt.h
  vendor/unbound/dist/iterator/iter_fwd.c
  vendor/unbound/dist/iterator/iter_hints.c
  vendor/unbound/dist/iterator/iter_utils.c
  vendor/unbound/dist/iterator/iterator.c
  vendor/unbound/dist/libunbound/context.c
  vendor/unbound/dist/libunbound/libunbound.c
  vendor/unbound/dist/libunbound/libworker.c
  vendor/unbound/dist/libunbound/libworker.h
  vendor/unbound/dist/libunbound/python/doc/conf.py
  vendor/unbound/dist/libunbound/python/doc/examples/example1a.rst
  vendor/unbound/dist/libunbound/python/doc/examples/example1b.rst
  vendor/unbound/dist/libunbound/python/doc/examples/example2.rst
  vendor/unbound/dist/libunbound/python/doc/examples/example3.rst
  vendor/unbound/dist/libunbound/python/doc/examples/example4.rst
  vendor/unbound/dist/libunbound/python/doc/examples/example5.rst
  vendor/unbound/dist/libunbound/python/doc/examples/example6.rst
  vendor/unbound/dist/libunbound/python/doc/examples/example7.rst
  vendor/unbound/dist/libunbound/python/doc/examples/example8.rst
  vendor/unbound/dist/libunbound/python/doc/examples/index.rst
  vendor/unbound/dist/libunbound/python/doc/install.rst
  vendor/unbound/dist/libunbound/python/doc/intro.rst
  vendor/unbound/dist/libunbound/worker.h
  vendor/unbound/dist/pythonmod/doc/conf.py
  vendor/unbound/dist/pythonmod/doc/examples/example1.rst
  vendor/unbound/dist/pythonmod/doc/examples/example2.rst
  vendor/unbound/dist/pythonmod/doc/examples/example4.rst
  vendor/unbound/dist/pythonmod/doc/examples/index.rst
  vendor/unbound/dist/pythonmod/doc/install.rst
  vendor/unbound/dist/pythonmod/doc/modules/functions.rst
  vendor/unbound/dist/pythonmod/doc/modules/struct.rst
  vendor/unbound/dist/pythonmod/interface.i
  vendor/unbound/dist/pythonmod/pythonmod.c
  vendor/unbound/dist/pythonmod/pythonmod.h
  vendor/unbound/dist/services/cache/dns.c
  vendor/unbound/dist/services/localzone.c
  vendor/unbound/dist/services/localzone.h
  vendor/unbound/dist/services/mesh.c
  vendor/unbound/dist/services/mesh.h
  vendor/unbound/dist/services/outside_network.c
  vendor/unbound/dist/services/outside_network.h
  vendor/unbound/dist/sldns/str2wire.c
  vendor/unbound/dist/sldns/wire2str.c
  vendor/unbound/dist/smallapp/unbound-anchor.c
  vendor/unbound/dist/smallapp/unbound-checkconf.c
  vendor/unbound/dist/smallapp/unbound-control.c
  vendor/unbound/dist/smallapp/worker_cb.c
  vendor/unbound/dist/testcode/asynclook.c
  vendor/unbound/dist/testcode/fake_event.c
  vendor/unbound/dist/testcode/memstats.c
  vendor/unbound/dist/testcode/perf.c
  vendor/unbound/dist/testcode/streamtcp.c
  vendor/unbound/dist/testdata/04-checkconf.tpkg
  vendor/unbound/dist/testdata/09-unbound-control.tpkg
  vendor/unbound/dist/testdata/val_cnamewctonodata.rpl
  vendor/unbound/dist/testdata/val_ds_sha2.crpl
  vendor/unbound/dist/testdata/val_ds_sha2_downgrade.crpl
  vendor/unbound/dist/testdata/val_nodata_failsig.rpl
  vendor/unbound/dist/testd

svn commit: r313157 - vendor/ldns/1.7.0

2017-02-03 Thread Dag-Erling Smørgrav
Author: des
Date: Fri Feb  3 13:01:33 2017
New Revision: 313157
URL: https://svnweb.freebsd.org/changeset/base/313157

Log:
  tag ldns 1.7.0

Added:
  vendor/ldns/1.7.0/
 - copied from r313156, vendor/ldns/dist/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313156 - in vendor/ldns/dist: . compat contrib/DNS-LDNS contrib/DNS-LDNS/lib/DNS contrib/DNS-LDNS/lib/DNS/LDNS contrib/DNS-LDNS/t contrib/ldnsx contrib/python doc drill examples ldns m...

2017-02-03 Thread Dag-Erling Smørgrav
Author: des
Date: Fri Feb  3 13:01:00 2017
New Revision: 313156
URL: https://svnweb.freebsd.org/changeset/base/313156

Log:
  import ldns 1.7.0

Added:
  vendor/ldns/dist/contrib/DNS-LDNS/META.yml
  vendor/ldns/dist/m4/ax_config_feature.m4
  vendor/ldns/dist/m4/ax_have_poll.m4
Modified:
  vendor/ldns/dist/Changelog
  vendor/ldns/dist/Makefile.in
  vendor/ldns/dist/README
  vendor/ldns/dist/README.git
  vendor/ldns/dist/aclocal.m4
  vendor/ldns/dist/acx_nlnetlabs.m4
  vendor/ldns/dist/buffer.c
  vendor/ldns/dist/compat/b64_pton.c
  vendor/ldns/dist/compat/malloc.c
  vendor/ldns/dist/compat/snprintf.c
  vendor/ldns/dist/config.guess
  vendor/ldns/dist/config.sub
  vendor/ldns/dist/configure
  vendor/ldns/dist/configure.ac
  vendor/ldns/dist/contrib/DNS-LDNS/Changes
  vendor/ldns/dist/contrib/DNS-LDNS/LDNS.xs
  vendor/ldns/dist/contrib/DNS-LDNS/Makefile.PL
  vendor/ldns/dist/contrib/DNS-LDNS/README
  vendor/ldns/dist/contrib/DNS-LDNS/lib/DNS/LDNS.pm
  vendor/ldns/dist/contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecDataChain.pm
  vendor/ldns/dist/contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecName.pm
  vendor/ldns/dist/contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecRRSets.pm
  vendor/ldns/dist/contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecRRs.pm
  vendor/ldns/dist/contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecTrustTree.pm
  vendor/ldns/dist/contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecZone.pm
  vendor/ldns/dist/contrib/DNS-LDNS/lib/DNS/LDNS/GC.pm
  vendor/ldns/dist/contrib/DNS-LDNS/lib/DNS/LDNS/Key.pm
  vendor/ldns/dist/contrib/DNS-LDNS/lib/DNS/LDNS/KeyList.pm
  vendor/ldns/dist/contrib/DNS-LDNS/lib/DNS/LDNS/Packet.pm
  vendor/ldns/dist/contrib/DNS-LDNS/lib/DNS/LDNS/RBNode.pm
  vendor/ldns/dist/contrib/DNS-LDNS/lib/DNS/LDNS/RBTree.pm
  vendor/ldns/dist/contrib/DNS-LDNS/lib/DNS/LDNS/RData.pm
  vendor/ldns/dist/contrib/DNS-LDNS/lib/DNS/LDNS/RR.pm
  vendor/ldns/dist/contrib/DNS-LDNS/lib/DNS/LDNS/RRList.pm
  vendor/ldns/dist/contrib/DNS-LDNS/lib/DNS/LDNS/Resolver.pm
  vendor/ldns/dist/contrib/DNS-LDNS/lib/DNS/LDNS/Zone.pm
  vendor/ldns/dist/contrib/DNS-LDNS/t/dnssec_datachain.t
  vendor/ldns/dist/contrib/DNS-LDNS/t/rr.t
  vendor/ldns/dist/contrib/DNS-LDNS/typemap
  vendor/ldns/dist/contrib/ldnsx/ldnsx.py
  vendor/ldns/dist/contrib/python/Makefile
  vendor/ldns/dist/contrib/python/ldns.i
  vendor/ldns/dist/contrib/python/ldns_key.i
  vendor/ldns/dist/contrib/python/ldns_rdf.i
  vendor/ldns/dist/contrib/python/ldns_resolver.i
  vendor/ldns/dist/dane.c
  vendor/ldns/dist/dname.c
  vendor/ldns/dist/dnssec.c
  vendor/ldns/dist/dnssec_sign.c
  vendor/ldns/dist/dnssec_verify.c
  vendor/ldns/dist/dnssec_zone.c
  vendor/ldns/dist/doc/TODO
  vendor/ldns/dist/doc/doxyparse.pl
  vendor/ldns/dist/doc/function_manpages
  vendor/ldns/dist/doc/header.html
  vendor/ldns/dist/drill/chasetrace.c
  vendor/ldns/dist/drill/config.h.in
  vendor/ldns/dist/drill/configure
  vendor/ldns/dist/drill/configure.ac
  vendor/ldns/dist/drill/drill.1.in
  vendor/ldns/dist/drill/drill.c
  vendor/ldns/dist/drill/drill.h
  vendor/ldns/dist/drill/error.c
  vendor/ldns/dist/drill/securetrace.c
  vendor/ldns/dist/drill/work.c
  vendor/ldns/dist/duration.c
  vendor/ldns/dist/error.c
  vendor/ldns/dist/examples/config.h.in
  vendor/ldns/dist/examples/configure
  vendor/ldns/dist/examples/configure.ac
  vendor/ldns/dist/examples/ldns-compare-zones.1
  vendor/ldns/dist/examples/ldns-compare-zones.c
  vendor/ldns/dist/examples/ldns-dane.1.in
  vendor/ldns/dist/examples/ldns-dane.c
  vendor/ldns/dist/examples/ldns-dpa.1
  vendor/ldns/dist/examples/ldns-dpa.c
  vendor/ldns/dist/examples/ldns-gen-zone.1
  vendor/ldns/dist/examples/ldns-gen-zone.c
  vendor/ldns/dist/examples/ldns-key2ds.1
  vendor/ldns/dist/examples/ldns-key2ds.c
  vendor/ldns/dist/examples/ldns-keyfetcher.c
  vendor/ldns/dist/examples/ldns-keygen.1
  vendor/ldns/dist/examples/ldns-keygen.c
  vendor/ldns/dist/examples/ldns-mx.c
  vendor/ldns/dist/examples/ldns-notify.1
  vendor/ldns/dist/examples/ldns-notify.c
  vendor/ldns/dist/examples/ldns-read-zone.1
  vendor/ldns/dist/examples/ldns-read-zone.c
  vendor/ldns/dist/examples/ldns-signzone.1
  vendor/ldns/dist/examples/ldns-signzone.c
  vendor/ldns/dist/examples/ldns-test-edns.c
  vendor/ldns/dist/examples/ldns-testns.c
  vendor/ldns/dist/examples/ldns-testpkts.c
  vendor/ldns/dist/examples/ldns-update.1
  vendor/ldns/dist/examples/ldns-update.c
  vendor/ldns/dist/examples/ldns-verify-zone.1.in
  vendor/ldns/dist/examples/ldns-verify-zone.c
  vendor/ldns/dist/examples/ldns-walk.c
  vendor/ldns/dist/examples/ldnsd.c
  vendor/ldns/dist/higher.c
  vendor/ldns/dist/host2str.c
  vendor/ldns/dist/host2wire.c
  vendor/ldns/dist/install-sh
  vendor/ldns/dist/keys.c
  vendor/ldns/dist/ldns/buffer.h
  vendor/ldns/dist/ldns/common.h.in
  vendor/ldns/dist/ldns/config.h.in
  vendor/ldns/dist/ldns/dane.h
  vendor/ldns/dist/ldns/dname.h
  vendor/ldns/dist/ldns/dnssec.h
  vendor/ldns/dist/ldns/dnssec_sign.h
  vendor/ldns/dist/ldns/dnssec_verify.h
  vendor/ldns/dist/ldns/dnssec_zone.h
  vendor/ldns/dist/ldns/duration.h
  v

svn commit: r313154 - in head/sys: conf i386/conf i386/i386 i386/include i386/isa i386/linux x86/acpica x86/x86

2017-02-03 Thread Konstantin Belousov
Author: kib
Date: Fri Feb  3 12:51:40 2017
New Revision: 313154
URL: https://svnweb.freebsd.org/changeset/base/313154

Log:
  For i386, remove config options CPU_DISABLE_CMPXCHG, CPU_DISABLE_SSE
  and device npx.
  
  This means that FPU is always initialized and handled when available,
  and SSE+ register file and exception are handled when available.  This
  makes the kernel FPU code much easier to maintain by the cost of
  slight bloat for CPUs older than 25 years.
  
  CPU_DISABLE_CMPXCHG outlived its usefulness, see the removed comment
  explaining the original purpose.
  
  Suggested by and discussed with:  bde
  Tested by:pho
  Sponsored by: The FreeBSD Foundation
  MFC after:3 weeks

Modified:
  head/sys/conf/files.i386
  head/sys/conf/options.i386
  head/sys/i386/conf/DEFAULTS
  head/sys/i386/conf/NOTES
  head/sys/i386/i386/elf_machdep.c
  head/sys/i386/i386/exception.s
  head/sys/i386/i386/initcpu.c
  head/sys/i386/i386/machdep.c
  head/sys/i386/i386/mp_machdep.c
  head/sys/i386/i386/pmap.c
  head/sys/i386/i386/ptrace_machdep.c
  head/sys/i386/i386/support.s
  head/sys/i386/i386/swtch.s
  head/sys/i386/i386/trap.c
  head/sys/i386/i386/vm86bios.s
  head/sys/i386/i386/vm_machdep.c
  head/sys/i386/include/atomic.h
  head/sys/i386/isa/npx.c
  head/sys/i386/linux/linux_ptrace.c
  head/sys/x86/acpica/acpi_wakeup.c
  head/sys/x86/x86/cpu_machdep.c
  head/sys/x86/x86/identcpu.c

Modified: head/sys/conf/files.i386
==
--- head/sys/conf/files.i386Fri Feb  3 12:48:44 2017(r313153)
+++ head/sys/conf/files.i386Fri Feb  3 12:51:40 2017(r313154)
@@ -530,7 +530,7 @@ i386/ibcs2/ibcs2_xenix.coptional ibcs2
 i386/ibcs2/ibcs2_xenix_sysent.coptional ibcs2
 i386/ibcs2/imgact_coff.c   optional ibcs2
 i386/isa/elink.c   optional ep | ie
-i386/isa/npx.c optional npx
+i386/isa/npx.c standard
 i386/isa/pmtimer.c optional pmtimer
 i386/isa/prof_machdep.coptional profiling-routine
 i386/linux/imgact_linux.c  optional compat_linux

Modified: head/sys/conf/options.i386
==
--- head/sys/conf/options.i386  Fri Feb  3 12:48:44 2017(r313153)
+++ head/sys/conf/options.i386  Fri Feb  3 12:51:40 2017(r313154)
@@ -50,8 +50,6 @@ CPU_BTB_ENopt_cpu.h
 CPU_CYRIX_NO_LOCK  opt_cpu.h
 CPU_DIRECT_MAPPED_CACHEopt_cpu.h
 CPU_DISABLE_5X86_LSSER opt_cpu.h
-CPU_DISABLE_CMPXCHGopt_global.h# XXX global, unlike other CPU_*
-CPU_DISABLE_SSEopt_cpu.h
 CPU_ELAN   opt_cpu.h
 CPU_ELAN_PPS   opt_cpu.h
 CPU_ELAN_XTAL  opt_cpu.h
@@ -113,7 +111,6 @@ NETGRAPH_CRONYX opt_ng_cronyx.h
 # Device options
 DEV_APIC   opt_apic.h
 DEV_ATPIC  opt_atpic.h
-DEV_NPXopt_npx.h
 
 # Debugging
 NPX_DEBUG  opt_npx.h

Modified: head/sys/i386/conf/DEFAULTS
==
--- head/sys/i386/conf/DEFAULTS Fri Feb  3 12:48:44 2017(r313153)
+++ head/sys/i386/conf/DEFAULTS Fri Feb  3 12:51:40 2017(r313154)
@@ -9,9 +9,6 @@ machine i386
 device isa
 optionsISAPNP
 
-# Floating point support.
-device npx
-
 # Pseudo devices.
 device mem # Memory and kernel memory devices
 device io  # I/O device

Modified: head/sys/i386/conf/NOTES
==
--- head/sys/i386/conf/NOTESFri Feb  3 12:48:44 2017(r313153)
+++ head/sys/i386/conf/NOTESFri Feb  3 12:51:40 2017(r313154)
@@ -115,15 +115,6 @@ cpuI686_CPU# aka Pentium 
Pro(tm)
 # reorder).  This option should not be used if you use memory mapped
 # I/O device(s).
 #
-# CPU_DISABLE_CMPXCHG disables the CMPXCHG instruction on > i386 IA32
-# machines.  VmWare 3.x seems to emulate this instruction poorly, causing
-# the guest OS to run very slowly.  This problem appears to be fixed in
-# VmWare 4.x, at least in version 4.5.2, so that enabling this option with
-# VmWare 4.x will result in locking operations to be 20-30 times slower.
-# Enabling this with an SMP kernel will cause the kernel to be unusable.
-#
-# CPU_DISABLE_SSE explicitly prevents I686_CPU from turning on SSE.
-#
 # CPU_ELAN enables support for AMDs ElanSC520 CPU.
 #CPU_ELAN_PPS enables precision timestamp code.
 #CPU_ELAN_XTAL sets the clock crystal frequency in Hz.
@@ -201,8 +192,6 @@ options CPU_BLUELIGHTNING_FPU_OP_CACHE
 optionsCPU_BTB_EN
 optionsCPU_DIRECT_MAPPED_CACHE
 optionsCPU_DISABLE_5X86_LSSER
-optionsCPU_DISABLE_CMPXCHG
-#options   CPU_DISABLE_SSE
 opt

svn commit: r313155 - in vendor-crypto/openssh/dist: . openbsd-compat openbsd-compat/regress regress regress/misc regress/misc/kexfuzz regress/unittests regress/unittests/bitmap regress/unittests/h...

2017-02-03 Thread Dag-Erling Smørgrav
Author: des
Date: Fri Feb  3 12:51:40 2017
New Revision: 313155
URL: https://svnweb.freebsd.org/changeset/base/313155

Log:
  More property fixups.  Damn svn autoprops :(

Modified:
Directory Properties:
  vendor-crypto/openssh/dist/openbsd-compat/bsd-err.c   (props changed)
  vendor-crypto/openssh/dist/openbsd-compat/kludge-fd_set.c   (props changed)
  vendor-crypto/openssh/dist/openbsd-compat/regress/opensslvertest.c   (props 
changed)
  vendor-crypto/openssh/dist/openbsd-compat/strcasestr.c   (props changed)
  vendor-crypto/openssh/dist/platform-pledge.c   (props changed)
  vendor-crypto/openssh/dist/regress/cert-file.sh   (props changed)
  vendor-crypto/openssh/dist/regress/cfgparse.sh   (props changed)
  vendor-crypto/openssh/dist/regress/check-perm.c   (props changed)
  vendor-crypto/openssh/dist/regress/hostkey-agent.sh   (props changed)
  vendor-crypto/openssh/dist/regress/hostkey-rotate.sh   (props changed)
  vendor-crypto/openssh/dist/regress/keygen-knownhosts.sh   (props changed)
  vendor-crypto/openssh/dist/regress/limit-keytype.sh   (props changed)
  vendor-crypto/openssh/dist/regress/misc/Makefile   (props changed)
  vendor-crypto/openssh/dist/regress/misc/kexfuzz/Makefile   (props changed)
  vendor-crypto/openssh/dist/regress/misc/kexfuzz/kexfuzz.c   (props changed)
  vendor-crypto/openssh/dist/regress/moduli.in   (props changed)
  vendor-crypto/openssh/dist/regress/multipubkey.sh   (props changed)
  vendor-crypto/openssh/dist/regress/principals-command.sh   (props changed)
  vendor-crypto/openssh/dist/regress/unittests/Makefile   (props changed)
  vendor-crypto/openssh/dist/regress/unittests/bitmap/Makefile   (props changed)
  vendor-crypto/openssh/dist/regress/unittests/hostkeys/Makefile   (props 
changed)
  vendor-crypto/openssh/dist/regress/unittests/hostkeys/mktestdata.sh   (props 
changed)
  vendor-crypto/openssh/dist/regress/unittests/kex/Makefile   (props changed)
  vendor-crypto/openssh/dist/regress/unittests/match/Makefile   (props changed)
  vendor-crypto/openssh/dist/regress/unittests/match/tests.c   (props changed)
  vendor-crypto/openssh/dist/regress/unittests/sshbuf/Makefile   (props changed)
  vendor-crypto/openssh/dist/regress/unittests/sshbuf/test_sshbuf.c   (props 
changed)
  vendor-crypto/openssh/dist/regress/unittests/sshbuf/test_sshbuf_fixed.c   
(props changed)
  vendor-crypto/openssh/dist/regress/unittests/sshbuf/test_sshbuf_fuzz.c   
(props changed)
  
vendor-crypto/openssh/dist/regress/unittests/sshbuf/test_sshbuf_getput_basic.c  
 (props changed)
  
vendor-crypto/openssh/dist/regress/unittests/sshbuf/test_sshbuf_getput_crypto.c 
  (props changed)
  vendor-crypto/openssh/dist/regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c 
  (props changed)
  vendor-crypto/openssh/dist/regress/unittests/sshbuf/test_sshbuf_misc.c   
(props changed)
  vendor-crypto/openssh/dist/regress/unittests/sshbuf/tests.c   (props changed)
  vendor-crypto/openssh/dist/regress/unittests/sshkey/Makefile   (props changed)
  vendor-crypto/openssh/dist/regress/unittests/sshkey/common.c   (props changed)
  vendor-crypto/openssh/dist/regress/unittests/sshkey/common.h   (props changed)
  vendor-crypto/openssh/dist/regress/unittests/sshkey/test_file.c   (props 
changed)
  vendor-crypto/openssh/dist/regress/unittests/sshkey/test_fuzz.c   (props 
changed)
  vendor-crypto/openssh/dist/regress/unittests/sshkey/test_sshkey.c   (props 
changed)
  vendor-crypto/openssh/dist/regress/unittests/sshkey/tests.c   (props changed)
  vendor-crypto/openssh/dist/regress/unittests/test_helper/Makefile   (props 
changed)
  vendor-crypto/openssh/dist/regress/unittests/test_helper/fuzz.c   (props 
changed)
  vendor-crypto/openssh/dist/regress/unittests/test_helper/test_helper.c   
(props changed)
  vendor-crypto/openssh/dist/regress/unittests/test_helper/test_helper.h   
(props changed)
  vendor-crypto/openssh/dist/regress/unittests/utf8/Makefile   (props changed)
  vendor-crypto/openssh/dist/regress/unittests/utf8/tests.c   (props changed)
  vendor-crypto/openssh/dist/regress/valgrind-unit.sh   (props changed)
  vendor-crypto/openssh/dist/sandbox-pledge.c   (props changed)
  vendor-crypto/openssh/dist/sandbox-solaris.c   (props changed)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313153 - vendor-crypto/openssh/dist

2017-02-03 Thread Dag-Erling Smørgrav
Author: des
Date: Fri Feb  3 12:48:44 2017
New Revision: 313153
URL: https://svnweb.freebsd.org/changeset/base/313153

Log:
  Add missing properties

Modified:
Directory Properties:
  vendor-crypto/openssh/dist/cipher-aesctr.c   (props changed)
  vendor-crypto/openssh/dist/cipher-aesctr.h   (props changed)
  vendor-crypto/openssh/dist/platform-tracing.c   (props changed)
  vendor-crypto/openssh/dist/sshbuf-getput-basic.c   (props changed)
  vendor-crypto/openssh/dist/sshbuf-getput-crypto.c   (props changed)
  vendor-crypto/openssh/dist/sshbuf-misc.c   (props changed)
  vendor-crypto/openssh/dist/sshbuf.c   (props changed)
  vendor-crypto/openssh/dist/sshbuf.h   (props changed)
  vendor-crypto/openssh/dist/ssherr.c   (props changed)
  vendor-crypto/openssh/dist/ssherr.h   (props changed)
  vendor-crypto/openssh/dist/sshkey.c   (props changed)
  vendor-crypto/openssh/dist/sshkey.h   (props changed)
  vendor-crypto/openssh/dist/utf8.c   (props changed)
  vendor-crypto/openssh/dist/utf8.h   (props changed)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313152 - stable/11/share/misc

2017-02-03 Thread Sevan Janiyan
Author: sevan (doc committer)
Date: Fri Feb  3 12:47:24 2017
New Revision: 313152
URL: https://svnweb.freebsd.org/changeset/base/313152

Log:
  Revert previous merge as it contained incorrect commit message.

Modified:
  stable/11/share/misc/bsd-family-tree

Modified: stable/11/share/misc/bsd-family-tree
==
--- stable/11/share/misc/bsd-family-treeFri Feb  3 12:21:15 2017
(r313151)
+++ stable/11/share/misc/bsd-family-treeFri Feb  3 12:47:24 2017
(r313152)
@@ -339,11 +339,7 @@ FreeBSD 5.2   |  |  
  |  FreeBSD   |  |OpenBSD 5.9  |
  |   10.3 |  | |   |
  ||  | |   |
- *--FreeBSD   |  | |   |
- |   11.0 |  | |   |
- ||  | |   |
- ||  | |   |
-FreeBSD 12 -current   |  NetBSD -current  OpenBSD -current DragonFly 
-current
+FreeBSD 11 -current   |  NetBSD -current  OpenBSD -current DragonFly 
-current
  ||  | |   |
  vv  v v   v
 
@@ -691,8 +687,6 @@ OpenBSD 5.8 2015-10-18 [OBD]
 DragonFly 4.4.12015-12-07 [DFB]
 OpenBSD 5.92016-03-29 [OBD]
 FreeBSD 10.3   2016-04-04 [FBD]
-FreeBSD 11.0   2016-06-08 [FBD]
-FreeBSD 12.0   2016-06-09 [FBD]
 
 Bibliography
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313150 - in stable/10/sys: amd64/amd64 amd64/include i386/i386 i386/include

2017-02-03 Thread Konstantin Belousov
Author: kib
Date: Fri Feb  3 12:20:44 2017
New Revision: 313150
URL: https://svnweb.freebsd.org/changeset/base/313150

Log:
  MFC r289894:
  CLFLUSH does not need barriers, the instruction is ordered WRT other writes.
  Use CLFLUSHOPT when available.
  
  MFC r312555:
  Use SFENCE for ordering CLFLUSHOPT.

Modified:
  stable/10/sys/amd64/amd64/initcpu.c
  stable/10/sys/amd64/amd64/pmap.c
  stable/10/sys/amd64/include/cpufunc.h
  stable/10/sys/i386/i386/initcpu.c
  stable/10/sys/i386/i386/pmap.c
  stable/10/sys/i386/include/cpufunc.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/amd64/amd64/initcpu.c
==
--- stable/10/sys/amd64/amd64/initcpu.c Fri Feb  3 12:13:55 2017
(r313149)
+++ stable/10/sys/amd64/amd64/initcpu.c Fri Feb  3 12:20:44 2017
(r313150)
@@ -253,12 +253,17 @@ initializecpucache(void)
 * CPUID_SS feature even though the native CPU supports it.
 */
TUNABLE_INT_FETCH("hw.clflush_disable", &hw_clflush_disable);
-   if (vm_guest != VM_GUEST_NO && hw_clflush_disable == -1)
+   if (vm_guest != VM_GUEST_NO && hw_clflush_disable == -1) {
cpu_feature &= ~CPUID_CLFSH;
+   cpu_stdext_feature &= ~CPUID_STDEXT_CLFLUSHOPT;
+   }
+
/*
-* Allow to disable CLFLUSH feature manually by
-* hw.clflush_disable tunable.
+* The kernel's use of CLFLUSH{,OPT} can be disabled manually
+* by setting the hw.clflush_disable tunable.
 */
-   if (hw_clflush_disable == 1)
+   if (hw_clflush_disable == 1) {
cpu_feature &= ~CPUID_CLFSH;
+   cpu_stdext_feature &= ~CPUID_STDEXT_CLFLUSHOPT;
+   }
 }

Modified: stable/10/sys/amd64/amd64/pmap.c
==
--- stable/10/sys/amd64/amd64/pmap.cFri Feb  3 12:13:55 2017
(r313149)
+++ stable/10/sys/amd64/amd64/pmap.cFri Feb  3 12:20:44 2017
(r313150)
@@ -1789,9 +1789,8 @@ pmap_invalidate_cache_range(vm_offset_t 
 
if ((cpu_feature & CPUID_SS) != 0 && !force)
; /* If "Self Snoop" is supported and allowed, do nothing. */
-   else if ((cpu_feature & CPUID_CLFSH) != 0 &&
+   else if ((cpu_stdext_feature & CPUID_STDEXT_CLFLUSHOPT) != 0 &&
eva - sva < PMAP_CLFLUSH_THRESHOLD) {
-
/*
 * XXX: Some CPUs fault, hang, or trash the local APIC
 * registers if we use CLFLUSH on the local APIC
@@ -1802,16 +1801,29 @@ pmap_invalidate_cache_range(vm_offset_t 
return;
 
/*
-* Otherwise, do per-cache line flush.  Use the mfence
+* Otherwise, do per-cache line flush.  Use the sfence
 * instruction to insure that previous stores are
 * included in the write-back.  The processor
 * propagates flush to other processors in the cache
 * coherence domain.
 */
-   mfence();
+   sfence();
+   for (; sva < eva; sva += cpu_clflush_line_size)
+   clflushopt(sva);
+   sfence();
+   } else if ((cpu_feature & CPUID_CLFSH) != 0 &&
+   eva - sva < PMAP_CLFLUSH_THRESHOLD) {
+   if (pmap_kextract(sva) == lapic_paddr)
+   return;
+   /*
+* Writes are ordered by CLFLUSH on Intel CPUs.
+*/
+   if (cpu_vendor_id != CPU_VENDOR_INTEL)
+   mfence();
for (; sva < eva; sva += cpu_clflush_line_size)
clflush(sva);
-   mfence();
+   if (cpu_vendor_id != CPU_VENDOR_INTEL)
+   mfence();
} else {
 
/*
@@ -1835,19 +1847,31 @@ pmap_invalidate_cache_pages(vm_page_t *p
 {
vm_offset_t daddr, eva;
int i;
+   bool useclflushopt;
 
+   useclflushopt = (cpu_stdext_feature & CPUID_STDEXT_CLFLUSHOPT) != 0;
if (count >= PMAP_CLFLUSH_THRESHOLD / PAGE_SIZE ||
-   (cpu_feature & CPUID_CLFSH) == 0)
+   ((cpu_feature & CPUID_CLFSH) == 0 && !useclflushopt))
pmap_invalidate_cache();
else {
-   mfence();
+   if (useclflushopt)
+   sfence();
+   else if (cpu_vendor_id != CPU_VENDOR_INTEL)
+   mfence();
for (i = 0; i < count; i++) {
daddr = PHYS_TO_DMAP(VM_PAGE_TO_PHYS(pages[i]));
eva = daddr + PAGE_SIZE;
-   for (; daddr < eva; daddr += cpu_clflush_line_size)
-   clflush(daddr);
+   for (; daddr < eva; daddr += cpu_clflush_line_size) {
+   if (useclflushopt)
+

svn commit: r313148 - in stable/11/sys: amd64/amd64 amd64/include i386/i386 i386/include

2017-02-03 Thread Konstantin Belousov
Author: kib
Date: Fri Feb  3 12:03:10 2017
New Revision: 313148
URL: https://svnweb.freebsd.org/changeset/base/313148

Log:
  MFC r312555:
  Use SFENCE for ordering CLFLUSHOPT.

Modified:
  stable/11/sys/amd64/amd64/pmap.c
  stable/11/sys/amd64/include/cpufunc.h
  stable/11/sys/i386/i386/pmap.c
  stable/11/sys/i386/include/cpufunc.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/amd64/amd64/pmap.c
==
--- stable/11/sys/amd64/amd64/pmap.cFri Feb  3 12:01:28 2017
(r313147)
+++ stable/11/sys/amd64/amd64/pmap.cFri Feb  3 12:03:10 2017
(r313148)
@@ -1863,16 +1863,16 @@ pmap_invalidate_cache_range(vm_offset_t 
return;
 
/*
-* Otherwise, do per-cache line flush.  Use the mfence
+* Otherwise, do per-cache line flush.  Use the sfence
 * instruction to insure that previous stores are
 * included in the write-back.  The processor
 * propagates flush to other processors in the cache
 * coherence domain.
 */
-   mfence();
+   sfence();
for (; sva < eva; sva += cpu_clflush_line_size)
clflushopt(sva);
-   mfence();
+   sfence();
} else if ((cpu_feature & CPUID_CLFSH) != 0 &&
eva - sva < PMAP_CLFLUSH_THRESHOLD) {
if (pmap_kextract(sva) == lapic_paddr)
@@ -1916,7 +1916,9 @@ pmap_invalidate_cache_pages(vm_page_t *p
((cpu_feature & CPUID_CLFSH) == 0 && !useclflushopt))
pmap_invalidate_cache();
else {
-   if (useclflushopt || cpu_vendor_id != CPU_VENDOR_INTEL)
+   if (useclflushopt)
+   sfence();
+   else if (cpu_vendor_id != CPU_VENDOR_INTEL)
mfence();
for (i = 0; i < count; i++) {
daddr = PHYS_TO_DMAP(VM_PAGE_TO_PHYS(pages[i]));
@@ -1928,7 +1930,9 @@ pmap_invalidate_cache_pages(vm_page_t *p
clflush(daddr);
}
}
-   if (useclflushopt || cpu_vendor_id != CPU_VENDOR_INTEL)
+   if (useclflushopt)
+   sfence();
+   else if (cpu_vendor_id != CPU_VENDOR_INTEL)
mfence();
}
 }

Modified: stable/11/sys/amd64/include/cpufunc.h
==
--- stable/11/sys/amd64/include/cpufunc.h   Fri Feb  3 12:01:28 2017
(r313147)
+++ stable/11/sys/amd64/include/cpufunc.h   Fri Feb  3 12:03:10 2017
(r313148)
@@ -327,6 +327,13 @@ mfence(void)
 }
 
 static __inline void
+sfence(void)
+{
+
+   __asm __volatile("sfence" : : : "memory");
+}
+
+static __inline void
 ia32_pause(void)
 {
__asm __volatile("pause");

Modified: stable/11/sys/i386/i386/pmap.c
==
--- stable/11/sys/i386/i386/pmap.c  Fri Feb  3 12:01:28 2017
(r313147)
+++ stable/11/sys/i386/i386/pmap.c  Fri Feb  3 12:03:10 2017
(r313148)
@@ -1284,16 +1284,16 @@ pmap_invalidate_cache_range(vm_offset_t 
return;
 #endif
/*
-* Otherwise, do per-cache line flush.  Use the mfence
+* Otherwise, do per-cache line flush.  Use the sfence
 * instruction to insure that previous stores are
 * included in the write-back.  The processor
 * propagates flush to other processors in the cache
 * coherence domain.
 */
-   mfence();
+   sfence();
for (; sva < eva; sva += cpu_clflush_line_size)
clflushopt(sva);
-   mfence();
+   sfence();
} else if ((cpu_feature & CPUID_CLFSH) != 0 &&
eva - sva < PMAP_CLFLUSH_THRESHOLD) {
 #ifdef DEV_APIC
@@ -5348,12 +5348,14 @@ pmap_flush_page(vm_page_t m)
eva = sva + PAGE_SIZE;
 
/*
-* Use mfence despite the ordering implied by
+* Use mfence or sfence despite the ordering implied by
 * mtx_{un,}lock() because clflush on non-Intel CPUs
 * and clflushopt are not guaranteed to be ordered by
 * any other instruction.
 */
-   if (useclflushopt || cpu_vendor_id != CPU_VENDOR_INTEL)
+   if (useclflushopt)
+   sfence();
+   else if (cpu_vendor_id != CPU_VENDOR_INTEL)
mfence();
for (; sva < eva; sva += cpu_clflush_line_size) {
if (useclflushopt)
@@ -5361,7 +5363,9 @@ pmap_flush_pa

svn commit: r313146 - head/lib/libc/aarch64/gen

2017-02-03 Thread Andrew Turner
Author: andrew
Date: Fri Feb  3 11:51:06 2017
New Revision: 313146
URL: https://svnweb.freebsd.org/changeset/base/313146

Log:
  Fix the comment showing the meaning of the first argument to sigprocmask.
  
  Sponsored by: ABT Systems Ltd

Modified:
  head/lib/libc/aarch64/gen/setjmp.S

Modified: head/lib/libc/aarch64/gen/setjmp.S
==
--- head/lib/libc/aarch64/gen/setjmp.S  Fri Feb  3 11:47:57 2017
(r313145)
+++ head/lib/libc/aarch64/gen/setjmp.S  Fri Feb  3 11:51:06 2017
(r313146)
@@ -82,7 +82,7 @@ ENTRY(longjmp)
/* Restore the signal mask */
mov x2, #0  /* oset */
add x1, x0, #(_JB_SIGMASK * 8)  /* set */
-   mov x0, #3  /* SIG_BLOCK */
+   mov x0, #3  /* SIG_SETMASK */
bl  sigprocmask
 
ldr x1, [sp, #16]
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313145 - head/sys/arm/include

2017-02-03 Thread Andrew Turner
Author: andrew
Date: Fri Feb  3 11:47:57 2017
New Revision: 313145
URL: https://svnweb.freebsd.org/changeset/base/313145

Log:
  Remove an old use of _ARM_ARCH_6, we are moving to using the standard
  __ARM_ARCH >= 6 spelling.
  
  Sponsored by: ABT Systems Ltd

Modified:
  head/sys/arm/include/asmacros.h

Modified: head/sys/arm/include/asmacros.h
==
--- head/sys/arm/include/asmacros.h Fri Feb  3 11:18:34 2017
(r313144)
+++ head/sys/arm/include/asmacros.h Fri Feb  3 11:47:57 2017
(r313145)
@@ -35,7 +35,7 @@
 
 #ifdef LOCORE
 
-#ifdef _ARM_ARCH_6
+#if __ARM_ARCH >= 6
 #define GET_CURTHREAD_PTR(tmp) \
mrc p15, 0, tmp, c13, c0, 4
 #else
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313144 - stable/10/bin/kill

2017-02-03 Thread Sevan Janiyan
Author: sevan (doc committer)
Date: Fri Feb  3 11:18:34 2017
New Revision: 313144
URL: https://svnweb.freebsd.org/changeset/base/313144

Log:
  In v3 UNIX, the kill utility is documented in category 8, not 1.
  Add a note of it.
  http://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man8/kill.8
  
  PR:   211786
  Approved by:  bcr (mentor)
  Obtained from:TUHS
  Differential Revision:https://reviews.freebsd.org/D8105

Modified:
  stable/10/bin/kill/kill.1
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/bin/kill/kill.1
==
--- stable/10/bin/kill/kill.1   Fri Feb  3 11:17:44 2017(r313143)
+++ stable/10/bin/kill/kill.1   Fri Feb  3 11:18:34 2017(r313144)
@@ -32,7 +32,7 @@
 .\"@(#)kill.1  8.2 (Berkeley) 4/28/95
 .\" $FreeBSD$
 .\"
-.Dd April 28, 1995
+.Dd October 3, 2016
 .Dt KILL 1
 .Os
 .Sh NAME
@@ -147,7 +147,8 @@ compatible.
 A
 .Nm
 command appeared in
-.At v3 .
+.At v3
+in section 8 of the manual.
 .Sh BUGS
 A replacement for the command
 .Dq Li kill 0
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313143 - stable/11/bin/kill

2017-02-03 Thread Sevan Janiyan
Author: sevan (doc committer)
Date: Fri Feb  3 11:17:44 2017
New Revision: 313143
URL: https://svnweb.freebsd.org/changeset/base/313143

Log:
  In v3 UNIX, the kill utility is documented in category 8, not 1.
  Add a note of it.
  http://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man8/kill.8
  
  PR:   211786
  Approved by:  bcr (mentor)
  Obtained from:TUHS
  Differential Revision:https://reviews.freebsd.org/D8105

Modified:
  stable/11/bin/kill/kill.1
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/bin/kill/kill.1
==
--- stable/11/bin/kill/kill.1   Fri Feb  3 11:04:50 2017(r313142)
+++ stable/11/bin/kill/kill.1   Fri Feb  3 11:17:44 2017(r313143)
@@ -32,7 +32,7 @@
 .\"@(#)kill.1  8.2 (Berkeley) 4/28/95
 .\" $FreeBSD$
 .\"
-.Dd April 28, 1995
+.Dd October 3, 2016
 .Dt KILL 1
 .Os
 .Sh NAME
@@ -147,7 +147,8 @@ compatible.
 A
 .Nm
 command appeared in
-.At v3 .
+.At v3
+in section 8 of the manual.
 .Sh BUGS
 A replacement for the command
 .Dq Li kill 0
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313142 - stable/11/share/misc

2017-02-03 Thread Sevan Janiyan
Author: sevan (doc committer)
Date: Fri Feb  3 11:04:50 2017
New Revision: 313142
URL: https://svnweb.freebsd.org/changeset/base/313142

Log:
  Fix the previous commit to the family tree file.  It is too early
  to list 11.0, and we do not list -CURRENT here.
  
  Submitted by: maxim
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/11/share/misc/bsd-family-tree
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/share/misc/bsd-family-tree
==
--- stable/11/share/misc/bsd-family-treeFri Feb  3 10:04:17 2017
(r313141)
+++ stable/11/share/misc/bsd-family-treeFri Feb  3 11:04:50 2017
(r313142)
@@ -339,7 +339,11 @@ FreeBSD 5.2   |  |  
  |  FreeBSD   |  |OpenBSD 5.9  |
  |   10.3 |  | |   |
  ||  | |   |
-FreeBSD 11 -current   |  NetBSD -current  OpenBSD -current DragonFly 
-current
+ *--FreeBSD   |  | |   |
+ |   11.0 |  | |   |
+ ||  | |   |
+ ||  | |   |
+FreeBSD 12 -current   |  NetBSD -current  OpenBSD -current DragonFly 
-current
  ||  | |   |
  vv  v v   v
 
@@ -687,6 +691,8 @@ OpenBSD 5.8 2015-10-18 [OBD]
 DragonFly 4.4.12015-12-07 [DFB]
 OpenBSD 5.92016-03-29 [OBD]
 FreeBSD 10.3   2016-04-04 [FBD]
+FreeBSD 11.0   2016-06-08 [FBD]
+FreeBSD 12.0   2016-06-09 [FBD]
 
 Bibliography
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313141 - head/sys/arm/include

2017-02-03 Thread Andrew Turner
Author: andrew
Date: Fri Feb  3 10:04:17 2017
New Revision: 313141
URL: https://svnweb.freebsd.org/changeset/base/313141

Log:
  Only define atomic_fcmpset_long in the kernel. We may include
  machine/atomic.h in userspace, however atomic_fcmpset_32 is unimplemented
  there.
  
  Sponsored by: ABT Systems Ltd

Modified:
  head/sys/arm/include/atomic-v4.h

Modified: head/sys/arm/include/atomic-v4.h
==
--- head/sys/arm/include/atomic-v4.hFri Feb  3 08:15:23 2017
(r313140)
+++ head/sys/arm/include/atomic-v4.hFri Feb  3 10:04:17 2017
(r313141)
@@ -463,6 +463,8 @@ atomic_cmpset_long(volatile u_long *dst,
return (atomic_cmpset_32((volatile uint32_t *)dst, old, newe));
 }
 
+#ifdef _KERNEL
+/* atomic_fcmpset_32 is only defined for the kernel */
 static __inline u_long
 atomic_fcmpset_long(volatile u_long *dst, u_long *old, u_long newe)
 {
@@ -470,6 +472,7 @@ atomic_fcmpset_long(volatile u_long *dst
return (atomic_fcmpset_32((volatile uint32_t *)dst,
(uint32_t *)old, newe));
 }
+#endif
 
 static __inline u_long
 atomic_fetchadd_long(volatile u_long *p, u_long v)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r313006 - in head: sys/conf sys/libkern sys/libkern/x86 sys/sys tests/sys/kern

2017-02-03 Thread Hans Petter Selasky

On 01/31/17 16:36, Bruce Evans wrote:

gcc-4.2.1 is an ancient compiler.  Good riddance.


I prefer it.


This change also breaks compilation with clang v3.6 (FYI)

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


Re: svn commit: r313048 - in head: contrib/tcpdump contrib/tcpdump/lbl contrib/tcpdump/missing usr.sbin/tcpdump/tcpdump

2017-02-03 Thread Renato Botelho
> On 1 Feb 2017, at 18:26, Gleb Smirnoff  wrote:
> 
> Author: glebius
> Date: Wed Feb  1 20:26:42 2017
> New Revision: 313048
> URL: https://svnweb.freebsd.org/changeset/base/313048
> 
> Log:
>  Update tcpdump to 4.9.0.
> 
>  It fixes many buffer overflow in different protocol parsers, but none of
>  them are critical, even in absense of Capsicum.
> 
>  Security:CVE-2016-7922, CVE-2016-7923, CVE-2016-7924, CVE-2016-7925
>  Security:CVE-2016-7926, CVE-2016-7927, CVE-2016-7928, CVE-2016-7929
>  Security:CVE-2016-7930, CVE-2016-7931, CVE-2016-7932, CVE-2016-7933
>  Security:CVE-2016-7934, CVE-2016-7935, CVE-2016-7936, CVE-2016-7937
>  Security:CVE-2016-7938, CVE-2016-7939, CVE-2016-7940, CVE-2016-7973
>  Security:CVE-2016-7974, CVE-2016-7975, CVE-2016-7983, CVE-2016-7984
>  Security:CVE-2016-7985, CVE-2016-7986, CVE-2016-7992, CVE-2016-7993
>  Security:CVE-2016-8574, CVE-2016-8575, CVE-2017-5202, CVE-2017-5203
>  Security:CVE-2017-5204, CVE-2017-5205, CVE-2017-5341, CVE-2017-5342
>  Security:CVE-2017-5482, CVE-2017-5483, CVE-2017-5484, CVE-2017-5485
>  Security:CVE-2017-5486

Hi Gleb,

Do you plan to MFC it to stable/11 and stable/10?

--
Renato Botelho

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