svn commit: r314643 - head/sys/compat/linux

2017-03-03 Thread Dmitry Chagin
Author: dchagin
Date: Sat Mar  4 06:54:05 2017
New Revision: 314643
URL: https://svnweb.freebsd.org/changeset/base/314643

Log:
  Hide Linux socketcall constants under corresponding #ifdef since
  they are used only in i386 Linuxulator.
  
  MFC after:1 week

Modified:
  head/sys/compat/linux/linux_socket.h

Modified: head/sys/compat/linux/linux_socket.h
==
--- head/sys/compat/linux/linux_socket.hSat Mar  4 06:19:41 2017
(r314642)
+++ head/sys/compat/linux/linux_socket.hSat Mar  4 06:54:05 2017
(r314643)
@@ -141,7 +141,6 @@ struct l_ucred {
 };
 
 #if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
-
 struct linux_accept_args {
register_t s;
register_t addr;
@@ -150,12 +149,7 @@ struct linux_accept_args {
 
 int linux_accept(struct thread *td, struct linux_accept_args *args);
 
-#endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */
-
-
-
 /* Operations for socketcall */
-
 #defineLINUX_SOCKET1
 #defineLINUX_BIND  2
 #defineLINUX_CONNECT   3
@@ -176,6 +170,7 @@ int linux_accept(struct thread *td, stru
 #defineLINUX_ACCEPT4   18
 #defineLINUX_RECVMMSG  19
 #defineLINUX_SENDMMSG  20
+#endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */
 
 /* Socket options */
 #defineLINUX_IP_TOS1
___
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: r314641 - head/sys/dev/syscons

2017-03-03 Thread Bruce Evans
Author: bde
Date: Sat Mar  4 06:19:12 2017
New Revision: 314641
URL: https://svnweb.freebsd.org/changeset/base/314641

Log:
  Colorize syscons kernel console output according to a table indexed
  by the CPU number.
  
  This was originally for debugging near-deadlock conditions where
  multiple CPUs either deadlock or scramble each other's output trying
  to report the problem, but I found it interesting and sometimes
  useful for ordinary kernel messages.  Ordinary kernel messages
  shouldn't be interleaved, but if they are then the colorization
  makes them readable even if the interleaving is for every character
  (provided the CPU printing each message doesn't change).
  
  The default colors are 8-15 starting at 15 (bright white on black)
  for CPU 0 and repeating every 8 CPUs.  This works best with 8 CPUs.
  Non-bright colors and nonzero background colors need special
  configuration to avoid unreadable and ugly combinations so are not
  configured by default.  The next bright color after 15 is 8 (bright
  black = dark gray) is not very readable but is the only other color
  used with 2 CPUs.  After that the next bright color is 9 (bright
  blue) which is not much brighter than bright black, but is used with
  3+ CPUs.  Other bright colors are brighter.
  
  Colorization is configured by default so that it gets tested.  It can
  only be turned off by configuring SC_KERNEL_CONS_ATTR to anything other
  than FG_WHITE.  After booting, all colors can be changed using the
  syscons.kattr sysctl.  This is a SYSCTL_OPAQUE, and no utility is
  provided to change it (sysctl only displays it).
  
  The default colors work in all VGA modes that I could test.  In 2-color
  graphics modes, all 8 bright colors are displayed as bright white, so
  the colorization has no effect, but anything with a nonzero background
  gives white on white unless the foreground is zero.  I don't have an
  mono or VGA grayscale hardware to test on.  Support for mono mode seems
  to have never worked right in syscons (I think bright white gives white
  underline with either bold or bright), but VGA grayscale should work
  better than 2-color graphics.

Modified:
  head/sys/dev/syscons/scterm-teken.c
  head/sys/dev/syscons/syscons.c
  head/sys/dev/syscons/syscons.h

Modified: head/sys/dev/syscons/scterm-teken.c
==
--- head/sys/dev/syscons/scterm-teken.c Sat Mar  4 04:06:33 2017
(r314640)
+++ head/sys/dev/syscons/scterm-teken.c Sat Mar  4 06:19:12 2017
(r314641)
@@ -176,7 +176,7 @@ scteken_puts(scr_stat *scp, u_char *buf,
if (kernel) {
/* Use special colors for kernel messages. */
backup = *teken_get_curattr(&ts->ts_teken);
-   scteken_revattr(SC_KERNEL_CONS_ATTR, &kattr);
+   scteken_revattr(sc_kattr(), &kattr);
teken_set_curattr(&ts->ts_teken, &kattr);
teken_input(&ts->ts_teken, buf, len);
teken_set_curattr(&ts->ts_teken, &backup);

Modified: head/sys/dev/syscons/syscons.c
==
--- head/sys/dev/syscons/syscons.c  Sat Mar  4 04:06:33 2017
(r314640)
+++ head/sys/dev/syscons/syscons.c  Sat Mar  4 06:19:12 2017
(r314641)
@@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -100,6 +101,8 @@ static default_attr user_default = {
 SC_NORM_REV_ATTR,
 };
 
+static u_char  sc_kattrtab[MAXCPU];
+
 static int sc_console_unit = -1;
 static int sc_saver_keyb_only = 1;
 static  scr_stat   *sc_console;
@@ -141,6 +144,8 @@ static  int sc_no_suspend_vtswitch = 0;
 static int sc_susp_scr;
 
 static SYSCTL_NODE(_hw, OID_AUTO, syscons, CTLFLAG_RD, 0, "syscons");
+SYSCTL_OPAQUE(_hw_syscons, OID_AUTO, kattr, CTLFLAG_RW,
+&sc_kattrtab, sizeof(sc_kattrtab), "CU", "kernel console attributes");
 static SYSCTL_NODE(_hw_syscons, OID_AUTO, saver, CTLFLAG_RD, 0, "saver");
 SYSCTL_INT(_hw_syscons_saver, OID_AUTO, keybonly, CTLFLAG_RW,
 &sc_saver_keyb_only, 0, "screen saver interrupted by input only");
@@ -2994,8 +2999,16 @@ scinit(int unit, int flags)
 int i;
 
 /* one time initialization */
-if (init_done == COLD)
+if (init_done == COLD) {
sc_get_bios_values(&bios_value);
+   for (i = 0; i < nitems(sc_kattrtab); i++) {
+#if SC_KERNEL_CONS_ATTR == FG_WHITE
+   sc_kattrtab[i] = 8 + (i + FG_WHITE) % 8U;
+#else
+   sc_kattrtab[i] = SC_KERNEL_CONS_ATTR;
+#endif
+   }
+}
 init_done = WARM;
 
 /*
@@ -4008,6 +4021,12 @@ sc_bell(scr_stat *scp, int pitch, int du
 }
 }
 
+int
+sc_kattr(void)
+{
+return (sc_kattrtab[PCPU_GET(cpuid) % nitems(sc_kattrtab)]);
+}
+
 static void
 blink_screen(void *arg)
 {

Modified: head/sys/dev/syscons/syscons.h
===

svn commit: r314642 - head/usr.sbin/syslogd

2017-03-03 Thread Ngie Cooper
Author: ngie
Date: Sat Mar  4 06:19:41 2017
New Revision: 314642
URL: https://svnweb.freebsd.org/changeset/base/314642

Log:
  Correct nuance of -a :service -> "*" in r314563, r314585
  
  My attempt to correct the sender/receiver behavior was incorrect.
  The source port of the sender for forwarded datagrams is filtered
  with -a, and my change in r314585 didn't clarify that point at all.
  
  Wording is based on suggestion by hrs.
  
  MFC after:28 days
  X-MFC with:   r314563, r314585
  Reported by:  hrs
  In collaboration with:hrs, rgrimes
  Sponsored by: Dell EMC Isilon

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

Modified: head/usr.sbin/syslogd/syslogd.8
==
--- head/usr.sbin/syslogd/syslogd.8 Sat Mar  4 06:19:12 2017
(r314641)
+++ head/usr.sbin/syslogd/syslogd.8 Sat Mar  4 06:19:41 2017
(r314642)
@@ -28,7 +28,7 @@
 .\" @(#)syslogd.8  8.1 (Berkeley) 6/6/93
 .\" $FreeBSD$
 .\"
-.Dd March 2, 2017
+.Dd March 3, 2017
 .Dt SYSLOGD 8
 .Os
 .Sh NAME
@@ -131,7 +131,7 @@ A
 .Ar service
 of
 .Ql \&*
-allows packets to be received from any UDP port.
+accepts UDP packets from any source port.
 The default
 .Ar service
 is
___
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: r314464 - head/usr.sbin/yppush

2017-03-03 Thread Dag-Erling Smørgrav
"Rodney W. Grimes"  writes:
> It makes the logfiles of make output now src tree possition dependent,
> but I am probalby the only person in the universe that has ever run a
> diff on the output of make world.

tinderbox (or, to be precise, tbmaster) contains a ton of code to
normalize paths in buildworld / buildkernel output :)

DES
-- 
Dag-Erling Smørgrav - d...@des.no
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

svn commit: r314640 - head/usr.bin/ruptime

2017-03-03 Thread Bruce Evans
Author: bde
Date: Sat Mar  4 04:06:33 2017
New Revision: 314640
URL: https://svnweb.freebsd.org/changeset/base/314640

Log:
  Fix formatting.  ruptime output on FreeBSD cluster machines annoyed me
  by usually being double-spaced due to auto-wrap at column 80.
  
  r212771 increased width of the hostname field from 12 to 25.  This was
  supposed to allow for 80-column output with all 3 load averages taking
  5 characters each, but it actually gave width exactly 80 and thus worse
  than useless auto-wrap in that case.  3 wide load average fields are
  unusual, but later expansion of another field gave the auto-wrap with
  just 2 wide load average fields.
  
  Change to dynamic field widths for all fields except the uptime.  This
  also fixes the formatting of high (above ) user counts and not
  very high (above 9.99) load averages.  The formatting for numbers now
  breaks at 9.99, but scientific notation should be used starting
  well below that.
  
  The field width for the uptime remains hard-coded to work consistently
  for uptimes less than 1 days, but this gives too much space for
  small uptimes.  Punctuation between fields could be improved in many
  ways, for example by removing it.

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

Modified: head/usr.bin/ruptime/ruptime.c
==
--- head/usr.bin/ruptime/ruptime.c  Sat Mar  4 00:33:41 2017
(r314639)
+++ head/usr.bin/ruptime/ruptime.c  Sat Mar  4 04:06:33 2017
(r314640)
@@ -69,6 +69,7 @@ static DIR *dirp;
 
 static int  hscmp(const void *, const void *);
 static char*interval(time_t, const char *);
+static int  iwidth(int);
 static int  lcmp(const void *, const void *);
 static void ruptime(const char *, int, int (*)(const void *, const void 
*));
 static int  tcmp(const void *, const void *);
@@ -143,6 +144,21 @@ interval(time_t tval, const char *updown
return (resbuf);
 }
 
+/* Width to print a small nonnegative integer. */
+static int
+iwidth(int w)
+{
+   if (w < 10)
+   return (1);
+   if (w < 100)
+   return (2);
+   if (w < 1000)
+   return (3);
+   if (w < 1)
+   return (4);
+   return (5);
+}
+
 #defineHS(a)   ((const struct hs *)(a))
 
 /* Alphabetical comparison. */
@@ -176,14 +192,17 @@ ruptime(const char *host, int aflg, int 
struct whod *wd;
struct whoent *we;
struct dirent *dp;
-   const char *hostname;
-   int fd, i, maxloadav;
+   int fd, hostnamewidth, i, loadavwidth[3], userswidth, w;
size_t hspace;
ssize_t cc;
 
rewinddir(dirp);
hsp = NULL;
-   maxloadav = -1;
+   hostnamewidth = 0;
+   loadavwidth[0] = 4;
+   loadavwidth[1] = 4;
+   loadavwidth[2] = 4;
+   userswidth = 1;
(void)time(&now);
for (nhosts = hspace = 0; (dp = readdir(dirp)) != NULL;) {
if (dp->d_ino == 0 || strncmp(dp->d_name, "whod.", 5) != 0)
@@ -206,22 +225,25 @@ ruptime(const char *host, int aflg, int 
if (cc < (ssize_t)WHDRSIZE)
continue;
 
-   if (host != NULL) {
-   hostname = wd->wd_hostname;
-   if (strcasecmp(hostname, host) != 0)
-   continue;
-   }
+   if (host != NULL && strcasecmp(wd->wd_hostname, host) != 0)
+   continue;
if (LEFTEARTH(wd->wd_recvtime))
continue;
 
-   for (i = 0; i < 2; i++)
-   if (wd->wd_loadav[i] > maxloadav)
-   maxloadav = wd->wd_loadav[i];
+   if (hostnamewidth < (int)strlen(wd->wd_hostname))
+   hostnamewidth = (int)strlen(wd->wd_hostname);
+   for (i = 0; i < 3; i++) {
+   w = iwidth(wd->wd_loadav[i] / 100) + 3;
+   if (loadavwidth[i] < w)
+   loadavwidth[i] = w;
+   }
 
for (hsp->hs_nusers = 0, we = &wd->wd_we[0];
(char *)(we + 1) <= (char *)wd + cc; we++)
if (aflg || we->we_idle < 3600)
++hsp->hs_nusers;
+   if (userswidth < iwidth(hsp->hs_nusers))
+   userswidth = iwidth(hsp->hs_nusers);
++hsp;
++nhosts;
}
@@ -233,27 +255,28 @@ ruptime(const char *host, int aflg, int 
}
 
qsort(hs, nhosts, sizeof(hs[0]), cmp);
+   w = userswidth + loadavwidth[0] + loadavwidth[1] + loadavwidth[2];
+   if (hostnamewidth + w > 41)
+   hostnamewidth = 41 - w; /* limit to 79 cols */
for (i = 0; i < (int)nhosts; i++) {
hsp = &hs[i];
wd = &hsp->hs_wd;
if (ISDOWN(hsp)) {
-  

Re: svn commit: r314585 - head/usr.sbin/syslogd

2017-03-03 Thread Ian Lepore
On Fri, 2017-03-03 at 17:10 -0800, Rodney W. Grimes wrote:
> [ Charset UTF-8 unsupported, converting... ]
> > 
> > 
> > > 
> > > On Mar 3, 2017, at 15:14, Ngie Cooper (yaneurabeya)  > > gmail.com> wrote:
> > ?
> > 
> > > 
> > > Actually, accepts is better. Although it isn?t clear by itself,
> > > the sentence fragment is describing the -a option, which is
> > > singular, not plural. Here?s the sentence in full context:
> > > 
> > > source packet must
> > > belong to.  A
> > > service of `*'
> > > accepts UDP
> > > packets from any
> > > source port.
> > Correction: it?s describing `service`, which is still singular.
> > -Ngie
> Tongue in cheek:  Now my head hurts!!!   I let this stir around in my
> grey
> space for a minute and went wait, adding (s) to accept does not make
> it
> plurar.  This is one of those really screwed up situations that is
> just
> a mess.  So I had to google.  AmE would like us to use just accept in
> this specific case.  BrE would rather see accepts.  It has to do with
> some thing they call present subjunctive.  If you want to make your
> head hurt too google up "accept or accepts"
> 

The verb (accepts) in this case does not occur in a subjunctive clause,
the sentence is a simple indicative statement, so any rules about how
to conjugate the verb for a subjunctive don't apply here. 

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


Re: svn commit: r314585 - head/usr.sbin/syslogd

2017-03-03 Thread Rodney W. Grimes
[ Charset UTF-8 unsupported, converting... ]
> 
> > On Mar 3, 2017, at 15:14, Ngie Cooper (yaneurabeya)  
> > wrote:
> 
> ?
> 
> > Actually, accepts is better. Although it isn?t clear by itself, the 
> > sentence fragment is describing the -a option, which is singular, not 
> > plural. Here?s the sentence in full context:
> > 
> > source packet must belong to.  A
> > service of `*' accepts UDP
> > packets from any source port.
> 
> Correction: it?s describing `service`, which is still singular.
> -Ngie

Tongue in cheek:  Now my head hurts!!!   I let this stir around in my grey
space for a minute and went wait, adding (s) to accept does not make it
plurar.  This is one of those really screwed up situations that is just
a mess.  So I had to google.  AmE would like us to use just accept in
this specific case.  BrE would rather see accepts.  It has to do with
some thing they call present subjunctive.  If you want to make your
head hurt too google up "accept or accepts"

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


Re: svn commit: r314585 - head/usr.sbin/syslogd

2017-03-03 Thread Rodney W. Grimes
-- Start of PGP signed section.
[ Charset UTF-8 unsupported, converting... ]
> 
> > On Mar 3, 2017, at 15:12, Ngie Cooper (yaneurabeya)  
> > wrote:
> > 
> > 
> >> On Mar 3, 2017, at 05:56, Rodney W. Grimes 
> >>  wrote:
> >> 
> >> -- Start of PGP signed section.
> >> [ Charset ISO-8859-7 unsupported, converting... ]
> >>> "Ngie Cooper (yaneurabeya)"  wrote
> >>> in <1a3f6606-822c-4c80-adfa-48378f0f2...@gmail.com>:
> >>> 
> >>> ya> >> How about "...accepts UDP packets sent with any source port" or
> >> 
> >> I actually think this right here is the clearest one of all the ones
> >> I have seen attempted.  Oh, remove the s from accepts.
> > 
> > How about this instead (it incorporates hrs?s suggestion and your?s)?
> > Thanks,
> > -Ngie
> > 
> > $ svn diff syslogd.8
> > Index: syslogd.8
> > ===
> > --- syslogd.8   (revision 314626)
> > +++ syslogd.8   (working copy)
> > @@ -131,7 +131,7 @@
> > .Ar service
> > of
> > .Ql \&*
> > -allows packets to be received from any UDP port.
> > +accept UDP packets from any source port.
> > The default
> > .Ar service
> > is
> 
> Actually, accepts is better. Although it isn?t clear by itself, the sentence 
> fragment is describing the -a option, which is singular, not plural. Here?s 
> the sentence in full context:
> 
>  source packet must belong to.  A
>  service of `*' accepts UDP
>  packets from any source port.
> 

Oh, yes, it shoud be accepts given the additional context.


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


Re: svn commit: r314585 - head/usr.sbin/syslogd

2017-03-03 Thread Rodney W. Grimes
-- Start of PGP signed section.
[ Charset UTF-8 unsupported, converting... ]
> 
> > On Mar 3, 2017, at 05:56, Rodney W. Grimes 
> >  wrote:
> > 
> > -- Start of PGP signed section.
> > [ Charset ISO-8859-7 unsupported, converting... ]
> >> "Ngie Cooper (yaneurabeya)"  wrote
> >>  in <1a3f6606-822c-4c80-adfa-48378f0f2...@gmail.com>:
> >> 
> >> ya> >> How about "...accepts UDP packets sent with any source port" or
> > 
> > I actually think this right here is the clearest one of all the ones
> > I have seen attempted.  Oh, remove the s from accepts.
> 
> How about this instead (it incorporates hrs?s suggestion and your?s)?
> Thanks,
> -Ngie
> 
> $ svn diff syslogd.8
> Index: syslogd.8
> ===
> --- syslogd.8   (revision 314626)
> +++ syslogd.8   (working copy)
> @@ -131,7 +131,7 @@
>  .Ar service
>  of
>  .Ql \&*
> -allows packets to be received from any UDP port.
> +accept UDP packets from any source port.
>  The default
>  .Ar service
>  is
> 
-- End of PGP section, PGP failed!

I think that is probably as clear as you can get on this in
one line.

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


svn commit: r314639 - stable/11/sys/sys

2017-03-03 Thread Konstantin Belousov
Author: kib
Date: Sat Mar  4 00:33:41 2017
New Revision: 314639
URL: https://svnweb.freebsd.org/changeset/base/314639

Log:
  MFC r314490:
  Add some explanation for SV_TIMEKEEP flag.

Modified:
  stable/11/sys/sys/sysent.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/sys/sysent.h
==
--- stable/11/sys/sys/sysent.h  Fri Mar  3 22:51:04 2017(r314638)
+++ stable/11/sys/sys/sysent.h  Sat Mar  4 00:33:41 2017(r314639)
@@ -138,7 +138,7 @@ struct sysentvec {
 #defineSV_AOUT 0x008000/* a.out executable. */
 #defineSV_SHP  0x01/* Shared page. */
 #defineSV_CAPSICUM 0x02/* Force cap_enter() on 
startup. */
-#defineSV_TIMEKEEP 0x04
+#defineSV_TIMEKEEP 0x04/* Shared page timehands. */
 
 #defineSV_ABI_MASK 0xff
 #defineSV_ABI_ERRNO(p, e)  ((p)->p_sysent->sv_errsize <= 0 ? e :   
\
___
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: r314599 - head/sys/gnu/dts/arm

2017-03-03 Thread Emmanuel Vadot

 Hi Ruslan,

 Could you revert please ?
 GNU DTS are from vendor import and I plan to update to linux 4.10 soon
(like this week), and this will complicate merge.

 Thanks,

On Fri, 3 Mar 2017 14:17:07 + (UTC)
Ruslan Bukin  wrote:

> Author: br
> Date: Fri Mar  3 14:17:07 2017
> New Revision: 314599
> URL: https://svnweb.freebsd.org/changeset/base/314599
> 
> Log:
>   Import latest vendor DTS files for Intel Arria 10.
> 
> Modified:
>   head/sys/gnu/dts/arm/socfpga_arria10.dtsi
>   head/sys/gnu/dts/arm/socfpga_arria10_socdk.dtsi
>   head/sys/gnu/dts/arm/socfpga_arria10_socdk_sdmmc.dts
> 
> Modified: head/sys/gnu/dts/arm/socfpga_arria10.dtsi
> ==
> --- head/sys/gnu/dts/arm/socfpga_arria10.dtsi Fri Mar  3 14:06:22 2017
> (r314598)
> +++ head/sys/gnu/dts/arm/socfpga_arria10.dtsi Fri Mar  3 14:17:07 2017
> (r314599)
> @@ -22,11 +22,6 @@
>   #address-cells = <1>;
>   #size-cells = <1>;
>  
> - aliases {
> - serial0 = &uart0;
> - serial1 = &uart1;
> - };
> -
>   cpus {
>   #address-cells = <1>;
>   #size-cells = <0>;
> @@ -88,6 +83,14 @@
>   };
>   };
>  
> + base_fpga_region {
> + #address-cells = <0x1>;
> + #size-cells = <0x1>;
> +
> + compatible = "fpga-region";
> + fpga-mgr = <&fpga_mgr>;
> + };
> +
>   clkmgr@ffd04000 {
>   compatible = "altr,clk-mgr";
>   reg = <0xffd04000 0x1000>;
> @@ -405,6 +408,12 @@
>   };
>   };
>  
> + socfpga_axi_setup: stmmac-axi-config {
> + snps,wr_osr_lmt = <0xf>;
> + snps,rd_osr_lmt = <0xf>;
> + snps,blen = <0 0 0 0 16 0 0>;
> + };
> +
>   gmac0: ethernet@ff80 {
>   compatible = "altr,socfpga-stmmac", "snps,dwmac-3.72a", 
> "snps,dwmac";
>   altr,sysmgr-syscon = <&sysmgr 0x44 0>;
> @@ -421,6 +430,7 @@
>   clock-names = "stmmaceth";
>   resets = <&rst EMAC0_RESET>;
>   reset-names = "stmmaceth";
> + snps,axi-config = <&socfpga_axi_setup>;
>   status = "disabled";
>   };
>  
> @@ -440,6 +450,7 @@
>   clock-names = "stmmaceth";
>   resets = <&rst EMAC1_RESET>;
>   reset-names = "stmmaceth";
> + snps,axi-config = <&socfpga_axi_setup>;
>   status = "disabled";
>   };
>  
> @@ -457,6 +468,7 @@
>   rx-fifo-depth = <16384>;
>   clocks = <&l4_mp_clk>;
>   clock-names = "stmmaceth";
> + snps,axi-config = <&socfpga_axi_setup>;
>   status = "disabled";
>   };
>  
> @@ -517,6 +529,15 @@
>   };
>   };
>  
> + fpga_mgr: fpga-mgr@ffd03000 {
> + compatible = "altr,socfpga-a10-fpga-mgr";
> + reg = <0xffd03000 0x100
> +0xffcfe400 0x20>;
> + clocks = <&l4_mp_clk>;
> + resets = <&rst FPGAMGR_RESET>;
> + reset-names = "fpgamgr";
> + };
> +
>   i2c0: i2c@ffc02200 {
>   #address-cells = <1>;
>   #size-cells = <0>;
> @@ -567,15 +588,24 @@
>   status = "disabled";
>   };
>  
> - sdr: sdr@ffc25000 {
> - compatible = "syscon";
> - reg = <0xffcfb100 0x80>;
> + spi1: spi@ffda5000 {
> + compatible = "snps,dw-apb-ssi";
> + #address-cells = <1>;
> + #size-cells = <0>;
> + reg = <0xffda5000 0x100>;
> + interrupts = <0 102 4>;
> + num-chipselect = <4>;
> + bus-num = <0>;
> + /*32bit_access;*/
> + tx-dma-channel = <&pdma 16>;
> + rx-dma-channel = <&pdma 17>;
> + clocks = <&spi_m_clk>;
> + status = "disabled";
>   };
>  
> - sdramedac {
> - compatible = "altr,sdram-edac-a10";
> - altr,sdr-syscon = <&sdr>;
> - interrupts = <0 2 4>, <0 0 4>;
> + sdr: sdr@ffc25000 {
> + compatible = "altr,sdr-ctl", "syscon";
> + reg = <0xffcfb100 0x80>;
>   };
>  
>   L2: l2-cache@f000 {
> @@ -584,6 +614,9 @@
>   interrupts 

Re: svn commit: r314585 - head/usr.sbin/syslogd

2017-03-03 Thread Ngie Cooper (yaneurabeya)

> On Mar 3, 2017, at 15:14, Ngie Cooper (yaneurabeya)  
> wrote:

…

> Actually, accepts is better. Although it isn’t clear by itself, the sentence 
> fragment is describing the -a option, which is singular, not plural. Here’s 
> the sentence in full context:
> 
> source packet must belong to.  A
> service of `*' accepts UDP
> packets from any source port.

Correction: it’s describing `service`, which is still singular.
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r314585 - head/usr.sbin/syslogd

2017-03-03 Thread Ngie Cooper (yaneurabeya)

> On Mar 3, 2017, at 15:12, Ngie Cooper (yaneurabeya)  
> wrote:
> 
> 
>> On Mar 3, 2017, at 05:56, Rodney W. Grimes 
>>  wrote:
>> 
>> -- Start of PGP signed section.
>> [ Charset ISO-8859-7 unsupported, converting... ]
>>> "Ngie Cooper (yaneurabeya)"  wrote
>>> in <1a3f6606-822c-4c80-adfa-48378f0f2...@gmail.com>:
>>> 
>>> ya> >> How about "...accepts UDP packets sent with any source port" or
>> 
>> I actually think this right here is the clearest one of all the ones
>> I have seen attempted.  Oh, remove the s from accepts.
> 
> How about this instead (it incorporates hrs’s suggestion and your’s)?
> Thanks,
> -Ngie
> 
> $ svn diff syslogd.8
> Index: syslogd.8
> ===
> --- syslogd.8   (revision 314626)
> +++ syslogd.8   (working copy)
> @@ -131,7 +131,7 @@
> .Ar service
> of
> .Ql \&*
> -allows packets to be received from any UDP port.
> +accept UDP packets from any source port.
> The default
> .Ar service
> is

Actually, accepts is better. Although it isn’t clear by itself, the sentence 
fragment is describing the -a option, which is singular, not plural. Here’s the 
sentence in full context:

 source packet must belong to.  A
 service of `*' accepts UDP
 packets from any source port.

Thanks,
-Ngie



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r314636 - in head/sys/x86: include x86

2017-03-03 Thread Andriy Gapon
On 04/03/2017 00:42, Andriy Gapon wrote:
> Author: avg
> Date: Fri Mar  3 22:42:43 2017
> New Revision: 314636
> URL: https://svnweb.freebsd.org/changeset/base/314636
> 
> Log:
>   MCA: add AMD Error Thresholding support
>   
>   Currently the feature is implemented only for a subset of errors
>   reported via Bank 4.  The subset includes only DRAM-related errors.
>   
>   The new code builds upon and reuses the Intel CMC (Correctable MCE
>   Counters) support code.  However, the AMD feature is quite different
>   and, unfortunately, much less regular.
>   
>   For references please see AMD BKDGs for models 10h - 16h.
>   Specifically, see MSR_0413 NB Machine Check Misc (Thresholding)
>   Register (MC4_MISC0).
>   http://developer.amd.com/resources/developer-guides-manuals/
>   

AMD processors from the new family 17h (Ryzen) are said to implement somehting
called Scalable MCA which is different from both Error Thresholding and Intel
CMC.  That's not supported, because no technical documentation is released at
the moment.

-- 
Andriy Gapon
___
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: r314585 - head/usr.sbin/syslogd

2017-03-03 Thread Ngie Cooper (yaneurabeya)

> On Mar 3, 2017, at 05:56, Rodney W. Grimes 
>  wrote:
> 
> -- Start of PGP signed section.
> [ Charset ISO-8859-7 unsupported, converting... ]
>> "Ngie Cooper (yaneurabeya)"  wrote
>>  in <1a3f6606-822c-4c80-adfa-48378f0f2...@gmail.com>:
>> 
>> ya> >> How about "...accepts UDP packets sent with any source port" or
> 
> I actually think this right here is the clearest one of all the ones
> I have seen attempted.  Oh, remove the s from accepts.

How about this instead (it incorporates hrs’s suggestion and your’s)?
Thanks,
-Ngie

$ svn diff syslogd.8
Index: syslogd.8
===
--- syslogd.8   (revision 314626)
+++ syslogd.8   (working copy)
@@ -131,7 +131,7 @@
 .Ar service
 of
 .Ql \&*
-allows packets to be received from any UDP port.
+accept UDP packets from any source port.
 The default
 .Ar service
 is



signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r314638 - in head/sys: dev/amd_ecc_inject modules modules/amd_ecc_inject

2017-03-03 Thread Andriy Gapon
Author: avg
Date: Fri Mar  3 22:51:04 2017
New Revision: 314638
URL: https://svnweb.freebsd.org/changeset/base/314638

Log:
  add a module that provides support for DRAM ECC error injection on AMD CPUs
  
  I imagine that the module would be useful only to a very limited number
  of developers, so that's my excuse for not writing any documentation.
  On a more serious note, please see DRAM Error Injection section of BKDGs
  for families 10h - 16h.  E.g. section 2.13.3.1 of  BKDG for AMD Family 15h
  Models 00h-0Fh Processors.
  
  Many thanks to kib for his suggestions and comments.
  
  Discussed with:   kib
  MFC after:3 weeks
  Differential Revision: https://reviews.freebsd.org/D9824

Added:
  head/sys/dev/amd_ecc_inject/
  head/sys/dev/amd_ecc_inject/ecc_inject.c   (contents, props changed)
  head/sys/modules/amd_ecc_inject/
  head/sys/modules/amd_ecc_inject/Makefile   (contents, props changed)
Modified:
  head/sys/modules/Makefile

Added: head/sys/dev/amd_ecc_inject/ecc_inject.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/dev/amd_ecc_inject/ecc_inject.cFri Mar  3 22:51:04 2017
(r314638)
@@ -0,0 +1,243 @@
+/*-
+ * Copyright (c) 2017 Andriy Gapon
+ * 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 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+
+/*
+ * See BKDG for AMD Family 15h Models 00h-0Fh Processors
+ * (publication 42301 Rev 3.08 - March 12, 2012):
+ * - 2.13.3.1 DRAM Error Injection
+ * - D18F3xB8 NB Array Address
+ * - D18F3xBC NB Array Data Port
+ * - D18F3xBC_x8 DRAM ECC
+ */
+#defineNB_MCA_CFG  0x44
+#defineDRAM_ECC_EN (1 << 22)
+#defineNB_MCA_EXTCFG   0x180
+#defineECC_SYMB_SZ (1 << 25)
+#defineNB_ARRAY_ADDR   0xb8
+#defineDRAM_ECC_SEL(0x8 << 28)
+#defineQUADRANT_SHIFT  1
+#defineQUADRANT_MASK   0x3
+#defineNB_ARRAY_PORT   0xbc
+#defineINJ_WORD_SHIFT  20
+#defineINJ_WORD_MASK   0x1ff
+#defineDRAM_ERR_EN (1 << 18)
+#defineDRAM_WR_REQ (1 << 17)
+#defineDRAM_RD_REQ (1 << 16)
+#defineINJ_VECTOR_MASK 0x
+
+static void ecc_ei_inject(int);
+
+static device_t nbdev;
+static int delay_ms = 0;
+static int quadrant = 0;   /* 0 - 3 */
+static int word_mask = 0x001;  /* 9 bits: 8 + 1 for ECC */
+static int bit_mask = 0x0001;  /* 16 bits */
+
+static int
+sysctl_int_with_max(SYSCTL_HANDLER_ARGS)
+{
+   u_int value;
+   int error;
+
+   value = *(u_int *)arg1;
+   error = sysctl_handle_int(oidp, &value, 0, req);
+   if (error || req->newptr == NULL)
+   return (error);
+   if (value > arg2)
+   return (EINVAL);
+   *(u_int *)arg1 = value;
+   return (0);
+}
+
+static int
+sysctl_nonzero_int_with_max(SYSCTL_HANDLER_ARGS)
+{
+   u_int value;
+   int error;
+
+   value = *(u_int *)arg1;
+   error = sysctl_int_with_max(oidp, &value, arg2, req);
+   if (error || req->newptr == NULL)
+   return (error);
+   if (value == 0)
+   return (EINVAL);
+   *(u_int *)arg1 = value;
+   return (0);
+}
+
+static int
+sysctl_proc_inject(SYSCTL_HANDLER_ARGS)
+{
+   int error;
+   int i;
+
+   i = 0;
+   error = sysctl_handle_int(oidp, &i, 0, req);
+   if (error)
+   return (

svn commit: r314637 - head/bin/sh/tests/expansion

2017-03-03 Thread Jilles Tjoelker
Author: jilles
Date: Fri Mar  3 22:46:20 2017
New Revision: 314637
URL: https://svnweb.freebsd.org/changeset/base/314637

Log:
  sh: Add some already working tests that exercise new code paths.

Added:
  head/bin/sh/tests/expansion/cmdsubst18.0   (contents, props changed)
  head/bin/sh/tests/expansion/cmdsubst19.0   (contents, props changed)
  head/bin/sh/tests/expansion/cmdsubst20.0   (contents, props changed)
Modified:
  head/bin/sh/tests/expansion/Makefile

Modified: head/bin/sh/tests/expansion/Makefile
==
--- head/bin/sh/tests/expansion/MakefileFri Mar  3 22:42:43 2017
(r314636)
+++ head/bin/sh/tests/expansion/MakefileFri Mar  3 22:46:20 2017
(r314637)
@@ -39,6 +39,9 @@ ${PACKAGE}FILES+= cmdsubst14.0
 ${PACKAGE}FILES+=  cmdsubst15.0
 ${PACKAGE}FILES+=  cmdsubst16.0
 ${PACKAGE}FILES+=  cmdsubst17.0
+${PACKAGE}FILES+=  cmdsubst18.0
+${PACKAGE}FILES+=  cmdsubst19.0
+${PACKAGE}FILES+=  cmdsubst20.0
 ${PACKAGE}FILES+=  export1.0
 ${PACKAGE}FILES+=  export2.0
 ${PACKAGE}FILES+=  export3.0

Added: head/bin/sh/tests/expansion/cmdsubst18.0
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/bin/sh/tests/expansion/cmdsubst18.0Fri Mar  3 22:46:20 2017
(r314637)
@@ -0,0 +1,6 @@
+# $FreeBSD$
+
+x=X
+unset n
+r=${x+$(echo a)}${x-$(echo b)}${n+$(echo c)}${n-$(echo d)}$(echo e)
+[ "$r" = aXde ]

Added: head/bin/sh/tests/expansion/cmdsubst19.0
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/bin/sh/tests/expansion/cmdsubst19.0Fri Mar  3 22:46:20 2017
(r314637)
@@ -0,0 +1,5 @@
+# $FreeBSD$
+
+b=200 c=30 d=5 x=4
+r=$(echo a)$(($(echo b) + ${x+$(echo c)} + ${x-$(echo d)}))$(echo e)
+[ "$r" = a234e ]

Added: head/bin/sh/tests/expansion/cmdsubst20.0
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/bin/sh/tests/expansion/cmdsubst20.0Fri Mar  3 22:46:20 2017
(r314637)
@@ -0,0 +1,6 @@
+# $FreeBSD$
+
+set -T
+trapped=''
+trap "trapped=x$trapped" USR1
+[ "x$(kill -USR1 $$)y" = xy ] && [ "$trapped" = x ]
___
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: r314636 - in head/sys/x86: include x86

2017-03-03 Thread Andriy Gapon
Author: avg
Date: Fri Mar  3 22:42:43 2017
New Revision: 314636
URL: https://svnweb.freebsd.org/changeset/base/314636

Log:
  MCA: add AMD Error Thresholding support
  
  Currently the feature is implemented only for a subset of errors
  reported via Bank 4.  The subset includes only DRAM-related errors.
  
  The new code builds upon and reuses the Intel CMC (Correctable MCE
  Counters) support code.  However, the AMD feature is quite different
  and, unfortunately, much less regular.
  
  For references please see AMD BKDGs for models 10h - 16h.
  Specifically, see MSR_0413 NB Machine Check Misc (Thresholding)
  Register (MC4_MISC0).
  http://developer.amd.com/resources/developer-guides-manuals/
  
  Reviewed by:  jhb
  MFC after:1 month
  Differential Revision: https://reviews.freebsd.org/D9613

Modified:
  head/sys/x86/include/specialreg.h
  head/sys/x86/x86/mca.c

Modified: head/sys/x86/include/specialreg.h
==
--- head/sys/x86/include/specialreg.h   Fri Mar  3 21:46:30 2017
(r314635)
+++ head/sys/x86/include/specialreg.h   Fri Mar  3 22:42:43 2017
(r314636)
@@ -704,6 +704,22 @@
 #defineMC_MISC_ADDRESS_MODE0x01c0  /* If 
MCG_CAP_SER_P */
 #defineMC_CTL2_THRESHOLD   0x7fff
 #defineMC_CTL2_CMCI_EN 0x4000
+#defineMC_AMDNB_BANK   4
+#defineMC_MISC_AMDNB_VAL   0x8000  /* Counter 
presence valid */
+#defineMC_MISC_AMDNB_CNTP  0x4000  /* Counter 
present */
+#defineMC_MISC_AMDNB_LOCK  0x2000  /* Register 
locked */
+#defineMC_MISC_AMDNB_LVT_MASK  0x00f0  /* Extended LVT 
offset */
+#defineMC_MISC_AMDNB_LVT_SHIFT 52
+#defineMC_MISC_AMDNB_CNTEN 0x0008  /* Counter 
enabled */
+#defineMC_MISC_AMDNB_INT_MASK  0x0006  /* Interrupt 
type */
+#defineMC_MISC_AMDNB_INT_LVT   0x0002  /* Interrupt 
via Extended LVT */
+#defineMC_MISC_AMDNB_INT_SMI   0x0004  /* SMI */
+#defineMC_MISC_AMDNB_OVERFLOW  0x0001  /* Counter 
overflow */
+#defineMC_MISC_AMDNB_CNT_MASK  0x0fff  /* Counter 
value */
+#defineMC_MISC_AMDNB_CNT_SHIFT 32
+#defineMC_MISC_AMDNB_CNT_MAX   0xfff
+#defineMC_MISC_AMDNB_PTR_MASK  0xff00  /* Pointer to 
additional registers */
+#defineMC_MISC_AMDNB_PTR_SHIFT 24
 
 /*
  * The following four 3-byte registers control the non-cacheable regions.

Modified: head/sys/x86/x86/mca.c
==
--- head/sys/x86/x86/mca.c  Fri Mar  3 21:46:30 2017(r314635)
+++ head/sys/x86/x86/mca.c  Fri Mar  3 22:42:43 2017(r314636)
@@ -75,6 +75,11 @@ struct cmc_state {
int max_threshold;
time_t  last_intr;
 };
+
+struct amd_et_state {
+   int cur_threshold;
+   time_t  last_intr;
+};
 #endif
 
 struct mca_internal {
@@ -118,8 +123,11 @@ static struct task mca_refill_task, mca_
 static struct mtx mca_lock;
 
 #ifdef DEV_APIC
-static struct cmc_state **cmc_state;   /* Indexed by cpuid, bank */
+static struct cmc_state **cmc_state;   /* Indexed by cpuid, bank. */
+static struct amd_et_state *amd_et_state;  /* Indexed by cpuid. */
 static int cmc_throttle = 60;  /* Time in seconds to throttle CMCI. */
+
+static int amd_elvt = -1;
 #endif
 
 static int
@@ -521,19 +529,15 @@ mca_record_entry(enum scan_mode mode, co
  * cmc_throttle seconds or the periodic scan.  If a periodic scan
  * finds that the threshold is too high, it is lowered.
  */
-static void
-cmci_update(enum scan_mode mode, int bank, int valid, struct mca_record *rec)
+static int
+update_threshold(enum scan_mode mode, int valid, int last_intr, int count,
+int cur_threshold, int max_threshold)
 {
-   struct cmc_state *cc;
-   uint64_t ctl;
u_int delta;
-   int count, limit;
+   int limit;
 
-   /* Fetch the current limit for this bank. */
-   cc = &cmc_state[PCPU_GET(cpuid)][bank];
-   ctl = rdmsr(MSR_MC_CTL2(bank));
-   count = (rec->mr_status & MC_STATUS_COR_COUNT) >> 38;
-   delta = (u_int)(time_uptime - cc->last_intr);
+   delta = (u_int)(time_uptime - last_intr);
+   limit = cur_threshold;
 
/*
 * If an interrupt was received less than cmc_throttle seconds
@@ -542,16 +546,11 @@ cmci_update(enum scan_mode mode, int ban
 * double the threshold up to the max.
 */
if (mode == CMCI && valid) {
-   limit = ctl & MC_CTL2_THRESHOLD;
if (delta < cmc_throttle && count >= limit &&
-   limit < cc->max_threshold) {
-   limit = min(limit << 1, cc->max_threshold);
-   ctl &= ~MC_C

svn commit: r314635 - stable/11

2017-03-03 Thread Bryan Drewery
Author: bdrewery
Date: Fri Mar  3 21:46:30 2017
New Revision: 314635
URL: https://svnweb.freebsd.org/changeset/base/314635

Log:
  MFC r313907:
  
xdev: Fix after libc++ update in r300873.

Modified:
  stable/11/Makefile.inc1
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/Makefile.inc1
==
--- stable/11/Makefile.inc1 Fri Mar  3 21:43:03 2017(r314634)
+++ stable/11/Makefile.inc1 Fri Mar  3 21:46:30 2017(r314635)
@@ -2461,10 +2461,25 @@ CDBENV=MAKEOBJDIRPREFIX=${MAKEOBJDIRPREF
INSTALL="sh ${.CURDIR}/tools/install.sh"
 CDENV= ${CDBENV} \
TOOLS_PREFIX=${XDTP}
-CD2CFLAGS=-isystem ${XDDESTDIR}/usr/include -L${XDDESTDIR}/usr/lib \
-   --sysroot=${XDDESTDIR}/ -B${XDDESTDIR}/usr/libexec \
-   -B${XDDESTDIR}/usr/bin -B${XDDESTDIR}/usr/lib
-CD2ENV=${CDENV} CC="${CC} ${CD2CFLAGS}" CXX="${CXX} ${CD2CFLAGS}" \
+
+.if ${WANT_COMPILER_TYPE} == gcc || \
+(defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == gcc)
+# GCC requires -isystem and -L when using a cross-compiler.  --sysroot
+# won't set header path and -L is used to ensure the base library path
+# is added before the port PREFIX library path.
+CD2CFLAGS+=-isystem ${XDDESTDIR}/usr/include -L${XDDESTDIR}/usr/lib
+# GCC requires -B to find /usr/lib/crti.o when using a cross-compiler
+# combined with --sysroot.
+CD2CFLAGS+=-B${XDDESTDIR}/usr/lib
+# Force using libc++ for external GCC.
+# XXX: This should be checking MK_GNUCXX == no
+.if ${X_COMPILER_VERSION} >= 40800
+CD2CXXFLAGS+=  -isystem ${XDDESTDIR}/usr/include/c++/v1 -std=c++11 \
+   -nostdinc++
+.endif
+.endif
+CD2CFLAGS+=--sysroot=${XDDESTDIR}/
+CD2ENV=${CDENV} CC="${CC} ${CD2CFLAGS}" CXX="${CXX} ${CD2CXXFLAGS} 
${CD2CFLAGS}" \
CPP="${CPP} ${CD2CFLAGS}" \
MACHINE=${TARGET} MACHINE_ARCH=${TARGET_ARCH}
 
___
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: r314634 - in stable/11: contrib/libc-vis contrib/netbsd-tests/lib/libc/locale lib/libc/tests/nss

2017-03-03 Thread Bryan Drewery
Author: bdrewery
Date: Fri Mar  3 21:43:03 2017
New Revision: 314634
URL: https://svnweb.freebsd.org/changeset/base/314634

Log:
  MFC r309626,r309627,r309659:
  
r309626:
  strvis(3): Avoid internal state of multibyte functions being tainted.
r309627:
  Remove unneeded hack fixed by r309626.
r309659:
  Support spaces in group names.

Modified:
  stable/11/contrib/libc-vis/vis.c
  stable/11/contrib/netbsd-tests/lib/libc/locale/t_mbtowc.c
  stable/11/lib/libc/tests/nss/getgr_test.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/contrib/libc-vis/vis.c
==
--- stable/11/contrib/libc-vis/vis.cFri Mar  3 21:41:26 2017
(r314633)
+++ stable/11/contrib/libc-vis/vis.cFri Mar  3 21:43:03 2017
(r314634)
@@ -353,12 +353,14 @@ makeextralist(int flags, const char *src
wchar_t *dst, *d;
size_t len;
const wchar_t *s;
+   mbstate_t mbstate;
 
+   bzero(&mbstate, sizeof(mbstate));
len = strlen(src);
if ((dst = calloc(len + MAXEXTRAS, sizeof(*dst))) == NULL)
return NULL;
 
-   if ((flags & VIS_NOLOCALE) || mbstowcs(dst, src, len) == (size_t)-1) {
+   if ((flags & VIS_NOLOCALE) || mbsrtowcs(dst, &src, len, &mbstate) == 
(size_t)-1) {
size_t i;
for (i = 0; i < len; i++)
dst[i] = (wchar_t)(u_char)src[i];
@@ -400,6 +402,7 @@ istrsenvisx(char **mbdstp, size_t *dlen,
int clen = 0, cerr, error = -1, i, shft;
char *mbdst, *mdst;
ssize_t mbslength, maxolen;
+   mbstate_t mbstate;
 
_DIAGASSERT(mbdstp != NULL);
_DIAGASSERT(mbsrc != NULL || mblength == 0);
@@ -456,10 +459,11 @@ istrsenvisx(char **mbdstp, size_t *dlen,
 */
if (mbslength == 1)
mbslength++;
+   bzero(&mbstate, sizeof(mbstate));
while (mbslength > 0) {
/* Convert one multibyte character to wchar_t. */
if (!cerr)
-   clen = mbtowc(src, mbsrc, MB_LEN_MAX);
+   clen = mbrtowc(src, mbsrc, MB_LEN_MAX, &mbstate);
if (cerr || clen < 0) {
/* Conversion error, process as a byte instead. */
*src = (wint_t)(u_char)*mbsrc;
@@ -530,9 +534,10 @@ istrsenvisx(char **mbdstp, size_t *dlen,
len = wcslen(start);
maxolen = dlen ? *dlen : (wcslen(start) * MB_LEN_MAX + 1);
olen = 0;
+   bzero(&mbstate, sizeof(mbstate));
for (dst = start; len > 0; len--) {
if (!cerr)
-   clen = wctomb(mbdst, *dst);
+   clen = wcrtomb(mbdst, *dst, &mbstate);
if (cerr || clen < 0) {
/*
 * Conversion error, process as a byte(s) instead.

Modified: stable/11/contrib/netbsd-tests/lib/libc/locale/t_mbtowc.c
==
--- stable/11/contrib/netbsd-tests/lib/libc/locale/t_mbtowc.c   Fri Mar  3 
21:41:26 2017(r314633)
+++ stable/11/contrib/netbsd-tests/lib/libc/locale/t_mbtowc.c   Fri Mar  3 
21:43:03 2017(r314634)
@@ -137,16 +137,10 @@ ATF_TC_BODY(mbtowc, tc)
h_mbtowc("ja_JP.ISO2022-JP", "\033$B", "\033$B$\"\033(B");
h_mbtowc("ja_JP.SJIS", "\202", "\202\240");
h_mbtowc("ja_JP.eucJP", "\244", "\244\242");
-#ifndef __FreeBSD__
/* Moved last as it fails */
h_mbtowc("zh_CN.GB18030", "\241", "\241\241");
-#endif
h_mbtowc("zh_TW.Big5", "\241", "\241@");
h_mbtowc("zh_TW.eucTW", "\241", "\241\241");
-#ifdef __FreeBSD__
-   atf_tc_expect_fail("zh_CN.GB18030");
-   h_mbtowc("zh_CN.GB18030", "\241", "\241\241");
-#endif
 }
 
 ATF_TP_ADD_TCS(tp)

Modified: stable/11/lib/libc/tests/nss/getgr_test.c
==
--- stable/11/lib/libc/tests/nss/getgr_test.c   Fri Mar  3 21:41:26 2017
(r314633)
+++ stable/11/lib/libc/tests/nss/getgr_test.c   Fri Mar  3 21:43:03 2017
(r314634)
@@ -176,7 +176,7 @@ sdump_group(struct group *grp, char *buf
char **cp;
int written;
 
-   written = snprintf(buffer, buflen, "%s %s %d",
+   written = snprintf(buffer, buflen, "%s:%s:%d:",
grp->gr_name, grp->gr_passwd, grp->gr_gid);
buffer += written;
if (written > buflen)
@@ -186,7 +186,8 @@ sdump_group(struct group *grp, char *buf
if (grp->gr_mem != NULL) {
if (*(grp->gr_mem) != '\0') {
for (cp = grp->gr_mem; *cp; ++cp) {
-   written = snprintf(buffer, buflen, " %s",*cp);
+   written = snprintf(buffer, buflen, "%s%s",
+   cp == grp->gr_mem ? "" : ",", *cp);
buffer += wri

svn commit: r314632 - stable/10/usr.bin/timeout

2017-03-03 Thread Bryan Drewery
Author: bdrewery
Date: Fri Mar  3 21:41:17 2017
New Revision: 314632
URL: https://svnweb.freebsd.org/changeset/base/314632

Log:
  MFC r313867,r313869,r313870,r314001:
  
r313867:
  Add history and Authors section in the manpage
r313869:
  Also add vsevolod@ in the authors
r313870:
  Use full name for the month
r314001:
  Make it more clear that -k sends SIGKILL, not the -s signal.

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

Modified: stable/10/usr.bin/timeout/timeout.1
==
--- stable/10/usr.bin/timeout/timeout.1 Fri Mar  3 21:39:36 2017
(r314631)
+++ stable/10/usr.bin/timeout/timeout.1 Fri Mar  3 21:41:17 2017
(r314632)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd Oct 28, 2014
+.Dd February 20, 2017
 .Dt TIMEOUT 1
 .Os
 .Sh NAME
@@ -68,7 +68,9 @@ By default,
 .Ar SIGTERM .
 is sent.
 .It Fl k Ar time , Fl -kill-after Ar time
-Send a second kill signal if
+Send a
+.Ar SIGKILL
+signal if
 .Ar command
 is still running after
 .Ar time
@@ -127,3 +129,12 @@ the exit status return is 125.
 .Sh SEE ALSO
 .Xr kill 1 ,
 .Xr signal 3
+.Sh HISTORY
+The
+.Nm
+command first appeared in
+.Fx 10.3 .
+.Sh AUTHORS
+.An Baptiste Daroussin Aq Mt b...@freebsd.org
+and
+.An Vsevolod Stakhov Aq Mt vsevo...@freebsd.org
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314633 - stable/11

2017-03-03 Thread Bryan Drewery
Author: bdrewery
Date: Fri Mar  3 21:41:26 2017
New Revision: 314633
URL: https://svnweb.freebsd.org/changeset/base/314633

Log:
  MFC r313905:
  
xdev: Build yacc which is needed for recent libpcap updates.

Modified:
  stable/11/Makefile.inc1
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/Makefile.inc1
==
--- stable/11/Makefile.inc1 Fri Mar  3 21:41:17 2017(r314632)
+++ stable/11/Makefile.inc1 Fri Mar  3 21:41:26 2017(r314633)
@@ -2494,7 +2494,8 @@ _xb-worldtmp: .PHONY
 _xb-bootstrap-tools: .PHONY
 .for _tool in \
 ${_clang_tblgen} \
-${_gperf}
+${_gperf} \
+${_yacc}
${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \
cd ${.CURDIR}/${_tool}; \
${CDMAKE} DIRPRFX=${_tool}/ obj; \
___
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: r314631 - stable/11/usr.bin/timeout

2017-03-03 Thread Bryan Drewery
Author: bdrewery
Date: Fri Mar  3 21:39:36 2017
New Revision: 314631
URL: https://svnweb.freebsd.org/changeset/base/314631

Log:
  MFC r314001:
  
Make it more clear that -k sends SIGKILL, not the -s signal.

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

Modified: stable/11/usr.bin/timeout/timeout.1
==
--- stable/11/usr.bin/timeout/timeout.1 Fri Mar  3 21:38:34 2017
(r314630)
+++ stable/11/usr.bin/timeout/timeout.1 Fri Mar  3 21:39:36 2017
(r314631)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd February 17, 2017
+.Dd February 20, 2017
 .Dt TIMEOUT 1
 .Os
 .Sh NAME
@@ -68,7 +68,9 @@ By default,
 .Ar SIGTERM .
 is sent.
 .It Fl k Ar time , Fl -kill-after Ar time
-Send a second kill signal if
+Send a
+.Ar SIGKILL
+signal if
 .Ar command
 is still running after
 .Ar time
___
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: r314630 - stable/11

2017-03-03 Thread Bryan Drewery
Author: bdrewery
Date: Fri Mar  3 21:38:34 2017
New Revision: 314630
URL: https://svnweb.freebsd.org/changeset/base/314630

Log:
  MFC r313904:
  
META_MODE+xdev: Don't rebuild build-tools during normal build.

Modified:
  stable/11/Makefile.inc1
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/Makefile.inc1
==
--- stable/11/Makefile.inc1 Fri Mar  3 21:37:33 2017(r314629)
+++ stable/11/Makefile.inc1 Fri Mar  3 21:38:34 2017(r314630)
@@ -2471,6 +2471,10 @@ CD2ENV=${CDENV} CC="${CC} ${CD2CFLAGS}" 
 CDTMP= ${MAKEOBJDIRPREFIX}/${XDDIR}/${.CURDIR}/tmp
 CDMAKE=${CDENV} PATH=${CDTMP}/usr/bin:${PATH} ${MAKE} ${NOFUN}
 CD2MAKE=${CD2ENV} PATH=${CDTMP}/usr/bin:${XDDESTDIR}/usr/bin:${PATH} ${MAKE} 
${NOFUN}
+.if ${MK_META_MODE} != "no"
+# Don't rebuild build-tools targets during normal build.
+CD2MAKE+=  BUILD_TOOLS_META=.NOMETA_CMP
+.endif
 XDDESTDIR=${DESTDIR}/${XDTP}
 .if !defined(OSREL)
 OSREL!= uname -r | sed -e 's/[-(].*//'
___
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: r314629 - stable/11

2017-03-03 Thread Bryan Drewery
Author: bdrewery
Date: Fri Mar  3 21:37:33 2017
New Revision: 314629
URL: https://svnweb.freebsd.org/changeset/base/314629

Log:
  MFC r313163:
  
native-xtools: Add missing readelf.

Modified:
  stable/11/Makefile.inc1
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/Makefile.inc1
==
--- stable/11/Makefile.inc1 Fri Mar  3 21:35:09 2017(r314628)
+++ stable/11/Makefile.inc1 Fri Mar  3 21:37:33 2017(r314629)
@@ -1918,6 +1918,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: r314628 - stable/11

2017-03-03 Thread Bryan Drewery
Author: bdrewery
Date: Fri Mar  3 21:35:09 2017
New Revision: 314628
URL: https://svnweb.freebsd.org/changeset/base/314628

Log:
  MFC r313184:
  
Remove LOCAL_LIB_DIRS warning added in r275839.

Modified:
  stable/11/Makefile.inc1
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/Makefile.inc1
==
--- stable/11/Makefile.inc1 Fri Mar  3 21:32:27 2017(r314627)
+++ stable/11/Makefile.inc1 Fri Mar  3 21:35:09 2017(r314628)
@@ -245,8 +245,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: r314627 - head/contrib/ipfilter/lib

2017-03-03 Thread Cy Schubert
Author: cy
Date: Fri Mar  3 21:32:27 2017
New Revision: 314627
URL: https://svnweb.freebsd.org/changeset/base/314627

Log:
  Fix leak (free str before returning when ctx's calloc fails).
  
  Submitted by: trix_juniper.net (Tom Rix)
  Discovered by:clang's static analyzer
  MFC after:4 days
  Relnotes: ngie
  Differential Revision:D9877

Modified:
  head/contrib/ipfilter/lib/save_v2trap.c

Modified: head/contrib/ipfilter/lib/save_v2trap.c
==
--- head/contrib/ipfilter/lib/save_v2trap.c Fri Mar  3 21:03:28 2017
(r314626)
+++ head/contrib/ipfilter/lib/save_v2trap.c Fri Mar  3 21:32:27 2017
(r314627)
@@ -124,8 +124,10 @@ snmpv2_parse(char **strings)
str = strdup(*strings);
 
ctx = calloc(1, sizeof(*ctx));
-   if (ctx == NULL)
+   if (ctx == NULL) {
+   free(str);
return NULL;
+   }
 
ctx->fd = -1;
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314626 - head/sys/kern

2017-03-03 Thread Eric van Gyzen
Author: vangyzen
Date: Fri Mar  3 21:03:28 2017
New Revision: 314626
URL: https://svnweb.freebsd.org/changeset/base/314626

Log:
  Fix grammar in some comments in subr_sleepqueue.c
  
  While I'm here, remove trailing whitespace.
  
  Reviewed by:  kib, mostly, as part of a larger review
  MFC after:3 days

Modified:
  head/sys/kern/subr_sleepqueue.c

Modified: head/sys/kern/subr_sleepqueue.c
==
--- head/sys/kern/subr_sleepqueue.c Fri Mar  3 20:57:40 2017
(r314625)
+++ head/sys/kern/subr_sleepqueue.c Fri Mar  3 21:03:28 2017
(r314626)
@@ -26,7 +26,7 @@
 
 /*
  * Implementation of sleep queues used to hold queue of threads blocked on
- * a wait channel.  Sleep queues different from turnstiles in that wait
+ * a wait channel.  Sleep queues are different from turnstiles in that wait
  * channels are not owned by anyone, so there is no priority propagation.
  * Sleep queues can also provide a timeout and can also be interrupted by
  * signals.  That said, there are several similarities between the turnstile
@@ -36,7 +36,7 @@
  * a linked list of queues.  An individual queue is located by using a hash
  * to pick a chain, locking the chain, and then walking the chain searching
  * for the queue.  This means that a wait channel object does not need to
- * embed it's queue head just as locks do not embed their turnstile queue
+ * embed its queue head just as locks do not embed their turnstile queue
  * head.  Threads also carry around a sleep queue that they lend to the
  * wait channel when blocking.  Just as in turnstiles, the queue includes
  * a free list of the sleep queues of other threads blocked on the same
@@ -98,7 +98,7 @@ __FBSDID("$FreeBSD$");
 #defineSC_LOOKUP(wc)   &sleepq_chains[SC_HASH(wc)]
 #define NR_SLEEPQS  2
 /*
- * There two different lists of sleep queues.  Both lists are connected
+ * There are two different lists of sleep queues.  Both lists are connected
  * via the sq_hash entries.  The first list is the sleep queue chain list
  * that a sleep queue is on when it is attached to a wait channel.  The
  * second list is the free list hung off of a sleep queue that is attached
@@ -183,7 +183,7 @@ init_sleepqueue_profiling(void)
 
for (i = 0; i < SC_TABLESIZE; i++) {
snprintf(chain_name, sizeof(chain_name), "%u", i);
-   chain_oid = SYSCTL_ADD_NODE(NULL, 
+   chain_oid = SYSCTL_ADD_NODE(NULL,
SYSCTL_STATIC_CHILDREN(_debug_sleepq_chains), OID_AUTO,
chain_name, CTLFLAG_RD, NULL, "sleepq chain stats");
SYSCTL_ADD_UINT(NULL, SYSCTL_CHILDREN(chain_oid), OID_AUTO,
@@ -218,7 +218,7 @@ init_sleepqueues(void)
 #else
NULL, NULL, sleepq_init, NULL, UMA_ALIGN_CACHE, 0);
 #endif
-   
+
thread0.td_sleepqueue = sleepq_alloc();
 }
 
@@ -545,7 +545,7 @@ sleepq_switch(void *wchan, int pri)
mtx_assert(&sc->sc_lock, MA_OWNED);
THREAD_LOCK_ASSERT(td, MA_OWNED);
 
-   /* 
+   /*
 * If we have a sleep queue, then we've already been woken up, so
 * just return.
 */
@@ -572,7 +572,7 @@ sleepq_switch(void *wchan, int pri)
 #endif
}
mtx_unlock_spin(&sc->sc_lock);
-   return; 
+   return;
}
 #ifdef SLEEPQUEUE_PROFILING
if (prof_enabled)
___
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: r314625 - head/sys/kern

2017-03-03 Thread Mark Johnston
Author: markj
Date: Fri Mar  3 20:57:40 2017
New Revision: 314625
URL: https://svnweb.freebsd.org/changeset/base/314625

Log:
  Fix a ticks comparison in sched_pctcpu_update().
  
  We may fail to reset the %CPU tracking window if a thread does not run
  for over half of the ticks rollover period, resulting in a bogus %CPU
  value for the thread until ticks fully rolls over. Handle this by comparing
  the unsigned difference ticks - ts_ltick with SCHED_TICK_TARG instead.
  
  Reviewed by:  cem, jeff
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/sys/kern/sched_ule.c

Modified: head/sys/kern/sched_ule.c
==
--- head/sys/kern/sched_ule.c   Fri Mar  3 20:51:57 2017(r314624)
+++ head/sys/kern/sched_ule.c   Fri Mar  3 20:57:40 2017(r314625)
@@ -1662,7 +1662,11 @@ sched_pctcpu_update(struct td_sched *ts,
 {
int t = ticks;
 
-   if (t - ts->ts_ltick >= SCHED_TICK_TARG) {
+   /*
+* The signed difference may be negative if the thread hasn't run for
+* over half of the ticks rollover period.
+*/
+   if ((u_int)(t - ts->ts_ltick) >= SCHED_TICK_TARG) {
ts->ts_ticks = 0;
ts->ts_ftick = t - SCHED_TICK_TARG;
} else if (t - ts->ts_ftick >= SCHED_TICK_MAX) {
___
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: r314624 - in head/sys/cam: . scsi

2017-03-03 Thread Mark Johnston
Author: markj
Date: Fri Mar  3 20:51:57 2017
New Revision: 314624
URL: https://svnweb.freebsd.org/changeset/base/314624

Log:
  Reject userland CCBs that have CAM_UNLOCKED set.
  
  CAM_UNLOCKED is internal flag and cannot correctly be set by userland.
  Return EINVAL from CAMIOCOMMAND and CAMIOQUEUE if it is set.
  
  Also fix leaks in some of the error paths for CAMIOQUEUE.
  
  PR:   215356
  Reviewed by:  ken, mav
  MFC after:1 week
  Differential Revision:https://reviews.freebsd.org/D9869

Modified:
  head/sys/cam/cam_xpt.c
  head/sys/cam/scsi/scsi_pass.c

Modified: head/sys/cam/cam_xpt.c
==
--- head/sys/cam/cam_xpt.c  Fri Mar  3 20:23:23 2017(r314623)
+++ head/sys/cam/cam_xpt.c  Fri Mar  3 20:51:57 2017(r314624)
@@ -435,6 +435,9 @@ xptdoioctl(struct cdev *dev, u_long cmd,
inccb->csio.bio = NULL;
 #endif
 
+   if (inccb->ccb_h.flags & CAM_UNLOCKED)
+   return (EINVAL);
+
bus = xpt_find_bus(inccb->ccb_h.path_id);
if (bus == NULL)
return (EINVAL);

Modified: head/sys/cam/scsi/scsi_pass.c
==
--- head/sys/cam/scsi/scsi_pass.c   Fri Mar  3 20:23:23 2017
(r314623)
+++ head/sys/cam/scsi/scsi_pass.c   Fri Mar  3 20:51:57 2017
(r314624)
@@ -1782,6 +1782,11 @@ passdoioctl(struct cdev *dev, u_long cmd
inccb->csio.bio = NULL;
 #endif
 
+   if (inccb->ccb_h.flags & CAM_UNLOCKED) {
+   error = EINVAL;
+   break;
+   }
+
/*
 * Some CCB types, like scan bus and scan lun can only go
 * through the transport layer device.
@@ -1875,24 +1880,27 @@ passdoioctl(struct cdev *dev, u_long cmd
xpt_print(periph->path, "Copy of user CCB %p to "
  "kernel address %p failed with error %d\n",
  *user_ccb, ccb, error);
-   uma_zfree(softc->pass_zone, io_req);
-   cam_periph_lock(periph);
-   break;
+   goto camioqueue_error;
}
 #if defined(BUF_TRACKING) || defined(FULL_BUF_TRACKING)
if (ccb->ccb_h.func_code == XPT_SCSI_IO)
ccb->csio.bio = NULL;
 #endif
 
+   if (ccb->ccb_h.flags & CAM_UNLOCKED) {
+   error = EINVAL;
+   goto camioqueue_error;
+   }
+
if (ccb->ccb_h.flags & CAM_CDB_POINTER) {
if (ccb->csio.cdb_len > IOCDBLEN) {
error = EINVAL;
-   break;
+   goto camioqueue_error;
}
error = copyin(ccb->csio.cdb_io.cdb_ptr,
ccb->csio.cdb_io.cdb_bytes, ccb->csio.cdb_len);
-   if (error)
-   break;
+   if (error != 0)
+   goto camioqueue_error;
ccb->ccb_h.flags &= ~CAM_CDB_POINTER;
}
 
@@ -1904,10 +1912,8 @@ passdoioctl(struct cdev *dev, u_long cmd
xpt_print(periph->path, "CCB function code %#x is "
"restricted to the XPT device\n",
ccb->ccb_h.func_code);
-   uma_zfree(softc->pass_zone, io_req);
-   cam_periph_lock(periph);
error = ENODEV;
-   break;
+   goto camioqueue_error;
}
 
/*
@@ -1953,11 +1959,8 @@ passdoioctl(struct cdev *dev, u_long cmd
 || (fc == XPT_SMP_IO) || (fc == XPT_DEV_MATCH)
 || (fc == XPT_DEV_ADVINFO)) {
error = passmemsetup(periph, io_req);
-   if (error != 0) {
-   uma_zfree(softc->pass_zone, io_req);
-   cam_periph_lock(periph);
-   break;
-   }
+   if (error != 0)
+   goto camioqueue_error;
} else
io_req->mapinfo.num_bufs_used = 0;
 
@@ -2002,6 +2005,11 @@ passdoioctl(struct cdev *dev, u_long cmd
TAILQ_INSERT_TAIL(&softc->done_queue, io_req, links);
}
break;
+
+camioqueue_error:
+   uma_zfree(softc->pass_zone, io_req);
+   cam_periph_lock(periph);
+   break;
}
case CAMIOGET:
{
___
svn-src-all@freebsd.org ma

svn commit: r314623 - head/lib/libefivar

2017-03-03 Thread Warner Losh
Author: imp
Date: Fri Mar  3 20:23:23 2017
New Revision: 314623
URL: https://svnweb.freebsd.org/changeset/base/314623

Log:
  Make sure guid table is compiled before we use it.
  
  Sponsored by: Netflix

Modified:
  head/lib/libefivar/efivar.c

Modified: head/lib/libefivar/efivar.c
==
--- head/lib/libefivar/efivar.c Fri Mar  3 20:23:21 2017(r314622)
+++ head/lib/libefivar/efivar.c Fri Mar  3 20:23:23 2017(r314623)
@@ -301,6 +301,7 @@ efi_guid_to_name(efi_guid_t *guid, char 
size_t i;
uint32_t status;
 
+   efi_guid_tbl_compile();
for (i = 0; i < nitems(guid_tbl); i++) {
if (uuid_equal(guid, &guid_tbl[i].guid, &status)) {
*name = strdup(guid_tbl[i].name);
@@ -337,6 +338,7 @@ efi_name_to_guid(const char *name, efi_g
 {
size_t i;
 
+   efi_guid_tbl_compile();
for (i = 0; i < nitems(guid_tbl); i++) {
if (strcmp(name, guid_tbl[i].name) == 0) {
*guid = guid_tbl[i].guid;
___
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: r314622 - head

2017-03-03 Thread Dag-Erling Smørgrav
Author: des
Date: Fri Mar  3 20:23:21 2017
New Revision: 314622
URL: https://svnweb.freebsd.org/changeset/base/314622

Log:
  As suggested by several people, note that I prefer to communicate by email.

Modified:
  head/MAINTAINERS

Modified: head/MAINTAINERS
==
--- head/MAINTAINERSFri Mar  3 20:23:18 2017(r314621)
+++ head/MAINTAINERSFri Mar  3 20:23:21 2017(r314622)
@@ -49,17 +49,17 @@ dev/usb/wlanadrian  Pre-commit review re
code, please have patches reviewed by secteam.
 etc/mail   gshapiroPre-commit review requested.  Keep in sync with 
-STABLE.
 etc/sendmail   gshapiroPre-commit review requested.  Keep in sync with 
-STABLE.
-fetch  des Pre-commit review requested.
+fetch  des Pre-commit review requested, email only.
 geli   pjd Pre-commit review requested (both sys/geom/eli/ and 
sbin/geom/class/eli/).
 isci(4)jimharris   Pre-commit review requested.
 iwm(4) adrian  Pre-commit review requested, send to 
freebsd-wirel...@freebsd.org
 iwn(4) adrian  Pre-commit review requested, send to 
freebsd-wirel...@freebsd.org
 kqueue jmg Pre-commit review requested.  Documentation Required.
 libdpv dteske  Pre-commit review requested. Keep in sync with dpv(1).
-libfetch   des Pre-commit review requested.
+libfetch   des Pre-commit review requested, email only.
 libfigpar  dteske  Pre-commit review requested.
-libpam des Pre-commit review requested.
-linprocfs  des Pre-commit review requested.
+libpam des Pre-commit review requested, email only.
+linprocfs  des Pre-commit review requested, email only.
 lprgad Pre-commit review requested, particularly for
lpd/recvjob.c and lpd/printjob.c.
 nanobsdimp Pre-commit phabricator review requested.
@@ -70,13 +70,13 @@ nvd(4)  jimharris   Pre-commit review requ
 nvme(4)jimharris   Pre-commit review requested.
 nvmecontrol(8) jimharris   Pre-commit review requested.
 opencrypto jmg Pre-commit review requested.  Documentation Required.
-opensshdes Pre-commit review requested.
+opensshdes Pre-commit review requested, email only.
 opensslbenl,jkim   Pre-commit review requested.
 otus(4)adrian  Pre-commit review requested, send to 
freebsd-wirel...@freebsd.org
 pci busimp,jhb Pre-commit review requested.
 pmcstudy(8)rrs Pre-commit review requested.
-procfs des Pre-commit review requested.
-pseudofs   des Pre-commit review requested.
+procfs des Pre-commit review requested, email only.
+pseudofs   des Pre-commit review requested, email only.
 release/release.sh gjb,re  Pre-commit review and regression tests
requested.
 sctp   rrs,tuexen  Pre-commit review requested (changes need to be 
backported to github).
___
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: r314621 - head/usr.sbin/efivar

2017-03-03 Thread Warner Losh
Author: imp
Date: Fri Mar  3 20:23:18 2017
New Revision: 314621
URL: https://svnweb.freebsd.org/changeset/base/314621

Log:
  If the guid specified can't be decoded as a GUID, try looking it up in
  the known guid to name table.
  
  Sponsored by: Netflix

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

Modified: head/usr.sbin/efivar/efivar.c
==
--- head/usr.sbin/efivar/efivar.c   Fri Mar  3 20:23:14 2017
(r314620)
+++ head/usr.sbin/efivar/efivar.c   Fri Mar  3 20:23:18 2017
(r314621)
@@ -87,7 +87,7 @@ breakdown_name(char *name, efi_guid_t *g
errx(1, "Invalid name: %s", name);
*vname = cp + 1;
*cp = '\0';
-   if (efi_str_to_guid(name, guid) < 0)
+   if (efi_name_to_guid(name, guid) < 0)
errx(1, "Invalid guid %s", name);
 }
 
___
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: r314620 - head/usr.sbin/efivar

2017-03-03 Thread Warner Losh
Author: imp
Date: Fri Mar  3 20:23:14 2017
New Revision: 314620
URL: https://svnweb.freebsd.org/changeset/base/314620

Log:
  Implement -d / --device-path to print the ascii representation of a variable 
that contains a UEFI device path.
  
  Sponsored by: Netflix

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

Modified: head/usr.sbin/efivar/efivar.c
==
--- head/usr.sbin/efivar/efivar.c   Fri Mar  3 20:23:10 2017
(r314619)
+++ head/usr.sbin/efivar/efivar.c   Fri Mar  3 20:23:14 2017
(r314620)
@@ -45,6 +45,8 @@ static struct option longopts[] = {
{ "attributes", required_argument,  NULL,   't' },
{ "binary", no_argument,NULL,   'b' },
{ "delete", no_argument,NULL,   'D' },
+   { "device", no_argument,NULL,   'd' },
+   { "device-path",no_argument,NULL,   'd' },
{ "fromfile",   required_argument,  NULL,   'f' },
{ "guid",   no_argument,NULL,   'g' },
{ "hex",no_argument,NULL,   'H' },
@@ -197,6 +199,13 @@ bindump(uint8_t *data, size_t datalen)
 }
 
 static void
+devpath_dump(uint8_t *data, size_t datalen)
+{
+
+   fprintf(stderr, "junk %p %zu\n", data, datalen);
+}
+
+static void
 pretty_guid(efi_guid_t *guid, char **gname)
 {
char *pretty = NULL;
@@ -232,6 +241,8 @@ print_var(efi_guid_t *guid, char *name)
asciidump(data, datalen);
else if (bflag)
bindump(data, datalen);
+   else if (dflag)
+   devpath_dump(data, datalen);
else
hexdump(data, datalen);
} 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: r314619 - head/usr.sbin/efivar

2017-03-03 Thread Warner Losh
Author: imp
Date: Fri Mar  3 20:23:10 2017
New Revision: 314619
URL: https://svnweb.freebsd.org/changeset/base/314619

Log:
  Implement --guid/-g to print the known GUIDs as human readable. The
  list of known GUIDs can be found with --list-guids.
  
  Sponsored by: Netflix

Modified:
  head/usr.sbin/efivar/efivar.8
  head/usr.sbin/efivar/efivar.c

Modified: head/usr.sbin/efivar/efivar.8
==
--- head/usr.sbin/efivar/efivar.8   Fri Mar  3 20:23:05 2017
(r314618)
+++ head/usr.sbin/efivar/efivar.8   Fri Mar  3 20:23:10 2017
(r314619)
@@ -41,6 +41,7 @@
 .Op Fl -binary
 .Op Fl -delete
 .Op Fl -fromfile Ar file
+.Op Fl -guid
 .Op Fl -hex
 .Op Fl -list-guids
 .Op Fl -list
@@ -116,6 +117,10 @@ flags.
 No
 .Ar value
 may be specified.
+.It Fl g Fl -guid
+flag is specified, guids are converted to names if they are known (and
+show up in
+.Fl -list-guids ).
 .It Fl H Fl -hex
 List variable data as a hex dump.
 .It Fl L Fl -list-guids
@@ -151,6 +156,7 @@ Set the specified
 to
 .Ar value .
 This is not yet implemented.
+If the
 .Sh COMPATIBILITY
 The
 .Nm

Modified: head/usr.sbin/efivar/efivar.c
==
--- head/usr.sbin/efivar/efivar.c   Fri Mar  3 20:23:05 2017
(r314618)
+++ head/usr.sbin/efivar/efivar.c   Fri Mar  3 20:23:10 2017
(r314619)
@@ -46,6 +46,7 @@ static struct option longopts[] = {
{ "binary", no_argument,NULL,   'b' },
{ "delete", no_argument,NULL,   'D' },
{ "fromfile",   required_argument,  NULL,   'f' },
+   { "guid",   no_argument,NULL,   'g' },
{ "hex",no_argument,NULL,   'H' },
{ "list-guids", no_argument,NULL,   'L' },
{ "list",   no_argument,NULL,   'l' },
@@ -59,7 +60,7 @@ static struct option longopts[] = {
 };
 
 
-static int aflag, Aflag, bflag, dflag, Dflag, Hflag, Nflag,
+static int aflag, Aflag, bflag, dflag, Dflag, gflag, Hflag, Nflag,
lflag, Lflag, Rflag, wflag, pflag;
 static char *varname;
 static u_long attrib = EFI_VARIABLE_NON_VOLATILE | 
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS;
@@ -196,6 +197,20 @@ bindump(uint8_t *data, size_t datalen)
 }
 
 static void
+pretty_guid(efi_guid_t *guid, char **gname)
+{
+   char *pretty = NULL;
+
+   if (gflag)
+   efi_guid_to_name(guid, &pretty);
+
+   if (pretty == NULL)
+   efi_guid_to_str(guid, gname);
+   else
+   *gname = pretty;
+}
+
+static void
 print_var(efi_guid_t *guid, char *name)
 {
uint32_t att;
@@ -204,7 +219,7 @@ print_var(efi_guid_t *guid, char *name)
char *gname;
int rv;
 
-   efi_guid_to_str(guid, &gname);
+   pretty_guid(guid, &gname);
if (pflag) {
rv = efi_get_variable(*guid, name, &data, &datalen, &att);
 
@@ -267,7 +282,7 @@ parse_args(int argc, char **argv)
 {
int ch, i;
 
-   while ((ch = getopt_long(argc, argv, "aAbdDf:HlLNn:pRt:w",
+   while ((ch = getopt_long(argc, argv, "aAbdDf:gHlLNn:pRt:w",
longopts, NULL)) != -1) {
switch (ch) {
case 'a':
@@ -285,6 +300,9 @@ parse_args(int argc, char **argv)
case 'D':
Dflag++;
break;
+   case 'g':
+   gflag++;
+   break;
case 'H':
Hflag++;
break;
___
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: r314618 - head/usr.sbin/efivar

2017-03-03 Thread Warner Losh
Author: imp
Date: Fri Mar  3 20:23:05 2017
New Revision: 314618
URL: https://svnweb.freebsd.org/changeset/base/314618

Log:
  Actually implement efivar -L
  
  Sponsored by: Netflix

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

Modified: head/usr.sbin/efivar/efivar.c
==
--- head/usr.sbin/efivar/efivar.c   Fri Mar  3 20:23:01 2017
(r314617)
+++ head/usr.sbin/efivar/efivar.c   Fri Mar  3 20:23:05 2017
(r314618)
@@ -252,6 +252,17 @@ print_variables(void)
 }
 
 static void
+print_known_guid(void)
+{
+   struct uuid_table *tbl;
+   int i, n;
+
+   n = efi_known_guid(&tbl);
+   for (i = 0; i < n; i++)
+   printf("%s %s\n", tbl[i].uuid_str, tbl[i].name);
+}
+
+static void
 parse_args(int argc, char **argv)
 {
int ch, i;
@@ -333,6 +344,8 @@ parse_args(int argc, char **argv)
delete_variable(varname);
else if (wflag)
write_variable(varname, NULL);
+   else if (Lflag)
+   print_known_guid();
else if (varname) {
pflag++;
print_variable(varname);
___
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: r314616 - head/lib/libefivar

2017-03-03 Thread Warner Losh
Author: imp
Date: Fri Mar  3 20:22:56 2017
New Revision: 314616
URL: https://svnweb.freebsd.org/changeset/base/314616

Log:
  Only compile the known uuid table once.
  
  Sponsored by: Netflix

Modified:
  head/lib/libefivar/efivar.c

Modified: head/lib/libefivar/efivar.c
==
--- head/lib/libefivar/efivar.c Fri Mar  3 20:22:47 2017(r314615)
+++ head/lib/libefivar/efivar.c Fri Mar  3 20:22:56 2017(r314616)
@@ -88,7 +88,10 @@ efi_guid_tbl_compile(void)
 {
size_t i;
uint32_t status;
+   static int done = 0;
 
+   if (done)
+   return;
for (i = 0; i < nitems(guid_tbl); i++) {
uuid_from_string(guid_tbl[i].uuid_str, &guid_tbl[i].guid,
&status);
@@ -97,6 +100,7 @@ efi_guid_tbl_compile(void)
fprintf(stderr, "Can't convert %s to a uuid for %s: 
%d\n",
guid_tbl[i].uuid_str, guid_tbl[i].name, 
(int)status);
}
+   done = 1;
 }
 
 int
___
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: r314617 - head/usr.sbin/efivar

2017-03-03 Thread Warner Losh
Author: imp
Date: Fri Mar  3 20:23:01 2017
New Revision: 314617
URL: https://svnweb.freebsd.org/changeset/base/314617

Log:
  Print just the variables when we're not printing the values.
  
  Sponsored by: Netflix

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

Modified: head/usr.sbin/efivar/efivar.c
==
--- head/usr.sbin/efivar/efivar.c   Fri Mar  3 20:22:56 2017
(r314616)
+++ head/usr.sbin/efivar/efivar.c   Fri Mar  3 20:23:01 2017
(r314617)
@@ -219,6 +219,8 @@ print_var(efi_guid_t *guid, char *name)
bindump(data, datalen);
else
hexdump(data, datalen);
+   } else {
+   printf("%s-%s", gname, name);
}
free(gname);
if (!Nflag)
___
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: r314615 - head/lib/libefivar

2017-03-03 Thread Warner Losh
Author: imp
Date: Fri Mar  3 20:22:47 2017
New Revision: 314615
URL: https://svnweb.freebsd.org/changeset/base/314615

Log:
  Move uuid_table definition to efivar.h.
  Create new function efi_known_guid() to return list of guids.
  
  Sponsored by: Netflix

Modified:
  head/lib/libefivar/efivar.c
  head/lib/libefivar/efivar.h

Modified: head/lib/libefivar/efivar.c
==
--- head/lib/libefivar/efivar.c Fri Mar  3 20:22:42 2017(r314614)
+++ head/lib/libefivar/efivar.c Fri Mar  3 20:22:47 2017(r314615)
@@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#include "efivar.h"
 #include "libefivar_int.h"
 
 static int efi_fd = -2;
@@ -44,12 +45,7 @@ static int efi_fd = -2;
 
 const efi_guid_t efi_guid_empty = Z;
 
-static struct uuid_table
-{
-   const char *uuid_str;
-   const char *name;
-   efi_guid_t guid;
-} guid_tbl [] =
+static struct uuid_table guid_tbl [] =
 {
{ "----", "zero", Z },
{ "093e0fae-a6c4-4f50-9f1b-d41e2b89c19a", "sha512", Z },
@@ -103,6 +99,14 @@ efi_guid_tbl_compile(void)
}
 }
 
+int
+efi_known_guid(struct uuid_table **tbl)
+{
+
+   *tbl = guid_tbl;
+   return (nitems(guid_tbl));
+}
+
 static int
 efi_open_dev(void)
 {

Modified: head/lib/libefivar/efivar.h
==
--- head/lib/libefivar/efivar.h Fri Mar  3 20:22:42 2017(r314614)
+++ head/lib/libefivar/efivar.h Fri Mar  3 20:22:47 2017(r314615)
@@ -83,6 +83,16 @@ int efi_set_variable(efi_guid_t guid, co
 int efi_str_to_guid(const char *s, efi_guid_t *guid);
 int efi_variables_supported(void);
 
+/* FreeBSD extensions */
+struct uuid_table
+{
+   const char *uuid_str;
+   const char *name;
+   efi_guid_t guid;
+};
+
+int efi_known_guid(struct uuid_table **);
+
 extern const efi_guid_t efi_guid_empty;
 
 /* Stubs that are expected, but aren't really used */
___
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: r314614 - head/sys/netpfil/ipfw

2017-03-03 Thread Andrey V. Elsukov
Author: ae
Date: Fri Mar  3 20:22:42 2017
New Revision: 314614
URL: https://svnweb.freebsd.org/changeset/base/314614

Log:
  Fix matching table entry value. Use real table value instead of its index
  in valuestate array.
  
  When opcode has size equal to ipfw_insn_u32, this means that it should
  additionally match value specified in d[0] with table entry value.
  ipfw_table_lookup() returns table value index, use TARG_VAL() macro to
  convert it to its value. The actual 32-bit value stored in the tag field
  of table_value structure, where all unspecified u32 values are kept.
  
  PR:   217262
  Reviewed by:  melifaro
  MFC after:1 week
  Sponsored by: Yandex LLC

Modified:
  head/sys/netpfil/ipfw/ip_fw2.c

Modified: head/sys/netpfil/ipfw/ip_fw2.c
==
--- head/sys/netpfil/ipfw/ip_fw2.c  Fri Mar  3 20:15:22 2017
(r314613)
+++ head/sys/netpfil/ipfw/ip_fw2.c  Fri Mar  3 20:22:42 2017
(r314614)
@@ -1511,8 +1511,8 @@ do {  
\
if (!match)
break;
if (cmdlen == F_INSN_SIZE(ipfw_insn_u32))
-   match =
-   ((ipfw_insn_u32 *)cmd)->d[0] == v;
+   match = ((ipfw_insn_u32 *)cmd)->d[0] ==
+   TARG_VAL(chain, v, tag);
else
tablearg = v;
} else if (is_ipv6) {
@@ -1524,7 +1524,8 @@ do {  
\
sizeof(struct in6_addr),
pkey, &v);
if (cmdlen == 
F_INSN_SIZE(ipfw_insn_u32))
-   match = ((ipfw_insn_u32 
*)cmd)->d[0] == v;
+   match = ((ipfw_insn_u32 
*)cmd)->d[0] ==
+   TARG_VAL(chain, v, tag);
if (match)
tablearg = v;
}
@@ -1536,7 +1537,8 @@ do {  
\
match = 
ipfw_lookup_table_extended(chain,
cmd->arg1, 0, &args->f_id, &v);
if (cmdlen == 
F_INSN_SIZE(ipfw_insn_u32))
-   match = ((ipfw_insn_u32 
*)cmd)->d[0] == v;
+   match = ((ipfw_insn_u32 
*)cmd)->d[0] ==
+   TARG_VAL(chain, v, tag);
if (match)
tablearg = 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"


svn commit: r314613 - in head: etc/mtree usr.bin/indent usr.bin/indent/tests

2017-03-03 Thread Ngie Cooper
Author: ngie
Date: Fri Mar  3 20:15:22 2017
New Revision: 314613
URL: https://svnweb.freebsd.org/changeset/base/314613

Log:
  Integrate indent tests added in r313544 into ATF/Kyua and the FreeBSD
  test suite
  
  This change does the following:
  
  - Introduces symmetry in the test inputs/outputs by adding the exit
code to the files. This simplified the test driver notably by
requiring less filename/test name manipulation.
  - Adds a test driver for the testcases added in r313544, patterned
after bin/sh/tests/functional_test.sh . The driver calls indent as
noted in r313544, with an exception: The $FreeBSD$ RCS keyword's
expansion is reindented with indent, which means that the output
differs from the expected output. Thus, all lines with $FreeBSD$
in them are deleted on the fly, both in the input file and the
output file.
  
The test inputs/outputs are copied to the kyua sandbox before the
test is run as the pathing in some of the files relies on pathing
normalized to the current directory (copying the files is the
easiest way to resolve the issue).
  
  Approved by:  pstef (maintainer)
  Reviewed by:  pstef
  X-MFC with:   r313544
  Sponsored by: Dell EMC Isilon
  Differential Revision:https://reviews.freebsd.org/D9682

Added:
  head/usr.bin/indent/tests/Makefile   (contents, props changed)
  head/usr.bin/indent/tests/elsecomment.0.pro
 - copied unchanged from r314612, head/usr.bin/indent/tests/elsecomment.pro
  head/usr.bin/indent/tests/functional_test.sh   (contents, props changed)
  head/usr.bin/indent/tests/label.0.pro
 - copied unchanged from r314612, head/usr.bin/indent/tests/label.pro
  head/usr.bin/indent/tests/nsac.0.pro
 - copied unchanged from r314612, head/usr.bin/indent/tests/nsac.pro
  head/usr.bin/indent/tests/sac.0.pro
 - copied unchanged from r314612, head/usr.bin/indent/tests/sac.pro
  head/usr.bin/indent/tests/surplusbad.0.pro
 - copied unchanged from r314612, head/usr.bin/indent/tests/surplusbad.pro
  head/usr.bin/indent/tests/types_from_file.0.list
 - copied unchanged from r314612, 
head/usr.bin/indent/tests/types_from_file.list
  head/usr.bin/indent/tests/types_from_file.0.pro
 - copied, changed from r314612, 
head/usr.bin/indent/tests/types_from_file.pro
Deleted:
  head/usr.bin/indent/tests/elsecomment.pro
  head/usr.bin/indent/tests/label.pro
  head/usr.bin/indent/tests/nsac.pro
  head/usr.bin/indent/tests/sac.pro
  head/usr.bin/indent/tests/surplusbad.pro
  head/usr.bin/indent/tests/types_from_file.list
  head/usr.bin/indent/tests/types_from_file.pro
Modified:
  head/etc/mtree/BSD.tests.dist
  head/usr.bin/indent/Makefile

Modified: head/etc/mtree/BSD.tests.dist
==
--- head/etc/mtree/BSD.tests.dist   Fri Mar  3 19:03:44 2017
(r314612)
+++ head/etc/mtree/BSD.tests.dist   Fri Mar  3 20:15:22 2017
(r314613)
@@ -620,6 +620,8 @@
 ..
 ident
 ..
+indent
+..
 join
 ..
 jot

Modified: head/usr.bin/indent/Makefile
==
--- head/usr.bin/indent/MakefileFri Mar  3 19:03:44 2017
(r314612)
+++ head/usr.bin/indent/MakefileFri Mar  3 20:15:22 2017
(r314613)
@@ -1,9 +1,15 @@
 #  @(#)Makefile8.1 (Berkeley) 6/6/93
 # $FreeBSD$
 
+.include 
+
 PROG=  indent
 SRCS=  indent.c io.c lexi.c parse.c pr_comment.c args.c
 
 NO_WMISSING_VARIABLE_DECLARATIONS=
 
+.if ${MK_TESTS} != "no"
+SUBDIR+=   tests
+.endif
+
 .include 

Added: head/usr.bin/indent/tests/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/usr.bin/indent/tests/Makefile  Fri Mar  3 20:15:22 2017
(r314613)
@@ -0,0 +1,43 @@
+# $FreeBSD$
+
+PACKAGE=   tests
+
+${PACKAGE}FILES+=  comments.0
+${PACKAGE}FILES+=  comments.0.stdout
+${PACKAGE}FILES+=  declarations.0
+${PACKAGE}FILES+=  declarations.0.stdout
+${PACKAGE}FILES+=  elsecomment.0
+${PACKAGE}FILES+=  elsecomment.0.stdout
+${PACKAGE}FILES+=  elsecomment.0.pro
+${PACKAGE}FILES+=  float.0
+${PACKAGE}FILES+=  float.0.stdout
+${PACKAGE}FILES+=  label.0
+${PACKAGE}FILES+=  label.0.stdout
+${PACKAGE}FILES+=  label.0.pro
+${PACKAGE}FILES+=  list_head.0
+${PACKAGE}FILES+=  list_head.0.stdout
+${PACKAGE}FILES+=  nsac.0
+${PACKAGE}FILES+=  nsac.0.stdout
+${PACKAGE}FILES+=  nsac.0.pro
+${PACKAGE}FILES+=  offsetof.0
+${PACKAGE}FILES+=  offsetof.0.stdout
+${PACKAGE}FILES+=  sac.0
+${PACKAGE}FILES+=  sac.0.stdout
+${PACKAGE}FILES+=  sac.0.pro
+${PACKAGE}FILES+=  struct.0
+${PACKAGE}FILES+=  struct.0.stdout
+${PACKAGE}FILES+=  surplusbad.0
+${PACKAGE}FILES+=  surplusbad.0.stdout
+${PACKAGE}FILES+=  surplusbad.0.pro

svn commit: r314612 - svnadmin/conf

2017-03-03 Thread Jung-uk Kim
Author: jkim
Date: Fri Mar  3 19:03:44 2017
New Revision: 314612
URL: https://svnweb.freebsd.org/changeset/base/314612

Log:
  Remove myself.  ACPICA 20170303 has been imported and merged.

Modified:
  svnadmin/conf/sizelimit.conf

Modified: svnadmin/conf/sizelimit.conf
==
--- svnadmin/conf/sizelimit.confFri Mar  3 18:56:15 2017
(r314611)
+++ svnadmin/conf/sizelimit.confFri Mar  3 19:03:44 2017
(r314612)
@@ -22,7 +22,6 @@ dim
 imp
 jb
 jeff
-jkim
 mm
 np
 obrien
___
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: r314611 - in head: sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/components/disa...

2017-03-03 Thread Jung-uk Kim
Author: jkim
Date: Fri Mar  3 18:56:15 2017
New Revision: 314611
URL: https://svnweb.freebsd.org/changeset/base/314611

Log:
  Merge ACPICA 20170303.

Added:
  head/sys/contrib/dev/acpica/compiler/cvcompiler.c
 - copied, changed from r314405, 
vendor-sys/acpica/dist/source/compiler/cvcompiler.c
  head/sys/contrib/dev/acpica/compiler/cvdisasm.c
 - copied, changed from r314405, 
vendor-sys/acpica/dist/source/compiler/cvdisasm.c
  head/sys/contrib/dev/acpica/compiler/cvparser.c
 - copied, changed from r314405, 
vendor-sys/acpica/dist/source/compiler/cvparser.c
  head/sys/contrib/dev/acpica/include/acconvert.h
 - copied, changed from r314405, 
vendor-sys/acpica/dist/source/include/acconvert.h
Modified:
  head/sys/contrib/dev/acpica/acpica_prep.sh
  head/sys/contrib/dev/acpica/changes.txt
  head/sys/contrib/dev/acpica/common/acfileio.c
  head/sys/contrib/dev/acpica/common/acgetline.c
  head/sys/contrib/dev/acpica/common/adfile.c
  head/sys/contrib/dev/acpica/common/adisasm.c
  head/sys/contrib/dev/acpica/common/adwalk.c
  head/sys/contrib/dev/acpica/common/ahids.c
  head/sys/contrib/dev/acpica/common/ahpredef.c
  head/sys/contrib/dev/acpica/common/ahtable.c
  head/sys/contrib/dev/acpica/common/ahuuids.c
  head/sys/contrib/dev/acpica/common/cmfsize.c
  head/sys/contrib/dev/acpica/common/dmextern.c
  head/sys/contrib/dev/acpica/common/dmrestag.c
  head/sys/contrib/dev/acpica/common/dmtable.c
  head/sys/contrib/dev/acpica/common/dmtables.c
  head/sys/contrib/dev/acpica/common/dmtbdump.c
  head/sys/contrib/dev/acpica/common/dmtbinfo.c
  head/sys/contrib/dev/acpica/common/getopt.c
  head/sys/contrib/dev/acpica/compiler/aslanalyze.c
  head/sys/contrib/dev/acpica/compiler/aslascii.c
  head/sys/contrib/dev/acpica/compiler/aslbtypes.c
  head/sys/contrib/dev/acpica/compiler/aslcodegen.c
  head/sys/contrib/dev/acpica/compiler/aslcompile.c
  head/sys/contrib/dev/acpica/compiler/aslcompiler.h
  head/sys/contrib/dev/acpica/compiler/aslcompiler.l
  head/sys/contrib/dev/acpica/compiler/aslcstyle.y
  head/sys/contrib/dev/acpica/compiler/asldebug.c
  head/sys/contrib/dev/acpica/compiler/asldefine.h
  head/sys/contrib/dev/acpica/compiler/aslerror.c
  head/sys/contrib/dev/acpica/compiler/aslexternal.c
  head/sys/contrib/dev/acpica/compiler/aslfileio.c
  head/sys/contrib/dev/acpica/compiler/aslfiles.c
  head/sys/contrib/dev/acpica/compiler/aslfold.c
  head/sys/contrib/dev/acpica/compiler/aslglobal.h
  head/sys/contrib/dev/acpica/compiler/aslhelp.c
  head/sys/contrib/dev/acpica/compiler/aslhelpers.y
  head/sys/contrib/dev/acpica/compiler/aslhex.c
  head/sys/contrib/dev/acpica/compiler/aslkeywords.y
  head/sys/contrib/dev/acpica/compiler/asllength.c
  head/sys/contrib/dev/acpica/compiler/asllisting.c
  head/sys/contrib/dev/acpica/compiler/asllistsup.c
  head/sys/contrib/dev/acpica/compiler/aslload.c
  head/sys/contrib/dev/acpica/compiler/asllookup.c
  head/sys/contrib/dev/acpica/compiler/aslmain.c
  head/sys/contrib/dev/acpica/compiler/aslmap.c
  head/sys/contrib/dev/acpica/compiler/aslmapenter.c
  head/sys/contrib/dev/acpica/compiler/aslmapoutput.c
  head/sys/contrib/dev/acpica/compiler/aslmaputils.c
  head/sys/contrib/dev/acpica/compiler/aslmessages.c
  head/sys/contrib/dev/acpica/compiler/aslmessages.h
  head/sys/contrib/dev/acpica/compiler/aslmethod.c
  head/sys/contrib/dev/acpica/compiler/aslnamesp.c
  head/sys/contrib/dev/acpica/compiler/asloffset.c
  head/sys/contrib/dev/acpica/compiler/aslopcodes.c
  head/sys/contrib/dev/acpica/compiler/asloperands.c
  head/sys/contrib/dev/acpica/compiler/aslopt.c
  head/sys/contrib/dev/acpica/compiler/asloptions.c
  head/sys/contrib/dev/acpica/compiler/aslparser.y
  head/sys/contrib/dev/acpica/compiler/aslpld.c
  head/sys/contrib/dev/acpica/compiler/aslpredef.c
  head/sys/contrib/dev/acpica/compiler/aslprepkg.c
  head/sys/contrib/dev/acpica/compiler/aslprimaries.y
  head/sys/contrib/dev/acpica/compiler/aslprintf.c
  head/sys/contrib/dev/acpica/compiler/aslprune.c
  head/sys/contrib/dev/acpica/compiler/aslresource.c
  head/sys/contrib/dev/acpica/compiler/aslresources.y
  head/sys/contrib/dev/acpica/compiler/aslrestype1.c
  head/sys/contrib/dev/acpica/compiler/aslrestype1i.c
  head/sys/contrib/dev/acpica/compiler/aslrestype2.c
  head/sys/contrib/dev/acpica/compiler/aslrestype2d.c
  head/sys/contrib/dev/acpica/compiler/aslrestype2e.c
  head/sys/contrib/dev/acpica/compiler/aslrestype2q.c
  head/sys/contrib/dev/acpica/compiler/aslrestype2s.c
  head/sys/contrib/dev/acpica/compiler/aslrestype2w.c
  head/sys/contrib/dev/acpica/compiler/aslrules.y
  head/sys/contrib/dev/acpica/compiler/aslstartup.c
  head/sys/contrib/dev/acpica/compiler/aslstubs.c
  head/sys/contrib/dev/acpica/compiler/aslsupport.l
  head/sys/contrib/dev/acpica/compiler/aslsupport.y
  head/sys/contrib/dev/acpica/compiler/asltokens.y
  head/sys/contrib/dev/acpica/compiler/asltransform.c
  head/sys/contrib/dev/acpica/compiler/asltree.c
  head/sys/contrib/dev/acpica/compiler/asltypes.h
  head/sys/contrib/dev/acpica

Re: svn commit: r314527 - in head: crypto/openssh crypto/openssh/contrib crypto/openssh/contrib/cygwin crypto/openssh/contrib/redhat crypto/openssh/contrib/suse crypto/openssh/openbsd-compat crypto/op

2017-03-03 Thread Dag-Erling Smørgrav
Ed Maste  writes:
> If you don't want to use Phabricator, I'd ask that you consider
> removing your account.

I didn't realize that was an option.  And I wonder what will happen to
existing diffs that I have commented on or approved if I do...

DES
-- 
Dag-Erling Smørgrav - d...@des.no
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

svn commit: r314610 - head/share/man/man4

2017-03-03 Thread Ngie Cooper
Author: ngie
Date: Fri Mar  3 18:44:20 2017
New Revision: 314610
URL: https://svnweb.freebsd.org/changeset/base/314610

Log:
  Clean up ddb(4) slightly
  
  - Delete empty Li macro uses [1]. This removes some spaces between
the optional command/subcommand arguments.
  - Attempt to clarify "show lock" subcommand by being more
terse/direct. This addresses an issue with a contraction [2].
  
  MFC after:1 week
  Reported by:  make manlint [1], igor [2]
  Reviewed by:  wblock
  Sponsored by: Dell EMC Isilon
  Differential Revision:https://reviews.freebsd.org/D9858

Modified:
  head/share/man/man4/ddb.4

Modified: head/share/man/man4/ddb.4
==
--- head/share/man/man4/ddb.4   Fri Mar  3 18:36:17 2017(r314609)
+++ head/share/man/man4/ddb.4   Fri Mar  3 18:44:20 2017(r314610)
@@ -60,7 +60,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd July 13, 2016
+.Dd March 3, 2017
 .Dt DDB 4
 .Os
 .Sh NAME
@@ -146,7 +146,7 @@ to be the same as
 .Pp
 The general command syntax is:
 .Ar command Ns Op Li / Ns Ar modifier
-.Oo Ar addr Oc Ns Op Li , Ns Ar count
+.Oo Ar addr Oc Ns Op , Ns Ar count
 .Pp
 A blank line repeats the previous command from the address
 .Va next
@@ -213,11 +213,11 @@ current line.
 .Bl -tag -width indent -compact
 .It Xo
 .Ic examine Ns Op Li / Ns Cm AISabcdghilmorsuxz ...
-.Oo Ar addr Oc Ns Op Li , Ns Ar count
+.Oo Ar addr Oc Ns Op , Ns Ar count
 .Xc
 .It Xo
 .Ic x   Ns Op Li / Ns Cm AISabcdghilmorsuxz ...
-.Oo Ar addr Oc Ns Op Li , Ns Ar count
+.Oo Ar addr Oc Ns Op , Ns Ar count
 .Xc
 Display the addressed locations according to the formats in the modifier.
 Multiple modifier formats display multiple locations.
@@ -343,8 +343,8 @@ Set the named variable or register with 
 .Ar expr .
 Valid variable names are described below.
 .Pp
-.It Ic break Ns Oo Li / Ns Cm u Oc Oo Ar addr Oc Ns Op Li , Ns Ar count
-.It Ic b Ns Oo Li / Ns Cm u Oc Oo Ar addr Oc Ns Op Li , Ns Ar count
+.It Ic break Ns Oo Li / Ns Cm u Oc Oo Ar addr Oc Ns Op , Ns Ar count
+.It Ic b Ns Oo Li / Ns Cm u Oc Oo Ar addr Oc Ns Op , Ns Ar count
 Set a break point at
 .Ar addr .
 If
@@ -394,7 +394,7 @@ command, or by omitting
 to get the default address of
 .Va dot .
 .Pp
-.It Ic watch Oo Ar addr Oc Ns Op Li , Ns Ar size
+.It Ic watch Oo Ar addr Oc Ns Op , Ns Ar size
 Set a watchpoint for a region.
 Execution stops when an attempt to modify the region occurs.
 The
@@ -408,7 +408,7 @@ Attempts to watch wired kernel memory
 may cause unrecoverable error in some systems such as i386.
 Watchpoints on user addresses work best.
 .Pp
-.It Ic hwatch Oo Ar addr Oc Ns Op Li , Ns Ar size
+.It Ic hwatch Oo Ar addr Oc Ns Op , Ns Ar size
 Set a hardware watchpoint for a region if supported by the
 architecture.
 Execution stops when an attempt to modify the region occurs.
@@ -424,11 +424,11 @@ Use
 for setting watchpoints on kernel address locations only, and avoid
 its use on user mode address spaces.
 .Pp
-.It Ic dhwatch Oo Ar addr Oc Ns Op Li , Ns Ar size
+.It Ic dhwatch Oo Ar addr Oc Ns Op , Ns Ar size
 Delete specified hardware watchpoint.
 .Pp
-.It Ic step Ns Oo Li / Ns Cm p Oc Ns Op Li , Ns Ar count
-.It Ic sNs Oo Li / Ns Cm p Oc Ns Op Li , Ns Ar count
+.It Ic step Ns Oo Li / Ns Cm p Oc Ns Op , Ns Ar count
+.It Ic sNs Oo Li / Ns Cm p Oc Ns Op , Ns Ar count
 Single step
 .Ar count
 times.
@@ -478,22 +478,22 @@ Otherwise, only print when the matching 
 .It Xo
 .Ic trace Ns Op Li / Ns Cm u
 .Op Ar pid | tid Ns
-.Op Li , Ns Ar count
+.Op , Ns Ar count
 .Xc
 .It Xo
 .Ic t Ns Op Li / Ns Cm u
 .Op Ar pid | tid Ns
-.Op Li , Ns Ar count
+.Op , Ns Ar count
 .Xc
 .It Xo
 .Ic where Ns Op Li / Ns Cm u
 .Op Ar pid | tid Ns
-.Op Li , Ns Ar count
+.Op , Ns Ar count
 .Xc
 .It Xo
 .Ic bt Ns Op Li / Ns Cm u
 .Op Ar pid | tid Ns
-.Op Li , Ns Ar count
+.Op , Ns Ar count
 .Xc
 Stack trace.
 The
@@ -518,7 +518,7 @@ only if the machine dependent code suppo
 .Ar addr
 .Ar value
 .Op Ar mask Ns
-.Op Li , Ns Ar count
+.Op , Ns Ar count
 .Xc
 Search memory for
 .Ar value .
@@ -768,12 +768,12 @@ Possible types include
 Name of the lock.
 .It Ic flags:
 Flags passed to the lock initialization function.
-For exact possibilities see manual pages of possible lock types.
+.Em flags
+values are lock class specific.
 .It Ic state:
 Current state of a lock.
-As well as
-.Ic flags
-it's lock-specific.
+.Em state
+values are lock class specific.
 .It Ic owner:
 Lock owner.
 .El
___
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: r314609 - vendor-sys/acpica/20170303

2017-03-03 Thread Jung-uk Kim
Author: jkim
Date: Fri Mar  3 18:36:17 2017
New Revision: 314609
URL: https://svnweb.freebsd.org/changeset/base/314609

Log:
  Tag ACPICA 20170303.

Added:
  vendor-sys/acpica/20170303/
 - copied from r314608, vendor-sys/acpica/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: r314608 - in vendor-sys/acpica/dist: . generate/unix source/common source/compiler source/components/debugger source/components/disassembler source/components/dispatcher source/componen...

2017-03-03 Thread Jung-uk Kim
Author: jkim
Date: Fri Mar  3 18:34:52 2017
New Revision: 314608
URL: https://svnweb.freebsd.org/changeset/base/314608

Log:
  Import ACPICA 20170303.

Modified:
  vendor-sys/acpica/dist/changes.txt
  vendor-sys/acpica/dist/generate/unix/Makefile.config
  vendor-sys/acpica/dist/source/common/acfileio.c
  vendor-sys/acpica/dist/source/common/acgetline.c
  vendor-sys/acpica/dist/source/common/adfile.c
  vendor-sys/acpica/dist/source/common/adisasm.c
  vendor-sys/acpica/dist/source/common/adwalk.c
  vendor-sys/acpica/dist/source/common/ahids.c
  vendor-sys/acpica/dist/source/common/ahpredef.c
  vendor-sys/acpica/dist/source/common/ahtable.c
  vendor-sys/acpica/dist/source/common/ahuuids.c
  vendor-sys/acpica/dist/source/common/cmfsize.c
  vendor-sys/acpica/dist/source/common/dmextern.c
  vendor-sys/acpica/dist/source/common/dmrestag.c
  vendor-sys/acpica/dist/source/common/dmtable.c
  vendor-sys/acpica/dist/source/common/dmtables.c
  vendor-sys/acpica/dist/source/common/dmtbdump.c
  vendor-sys/acpica/dist/source/common/dmtbinfo.c
  vendor-sys/acpica/dist/source/common/getopt.c
  vendor-sys/acpica/dist/source/compiler/aslanalyze.c
  vendor-sys/acpica/dist/source/compiler/aslascii.c
  vendor-sys/acpica/dist/source/compiler/aslbtypes.c
  vendor-sys/acpica/dist/source/compiler/aslcodegen.c
  vendor-sys/acpica/dist/source/compiler/aslcompile.c
  vendor-sys/acpica/dist/source/compiler/aslcompiler.h
  vendor-sys/acpica/dist/source/compiler/aslcompiler.l
  vendor-sys/acpica/dist/source/compiler/aslcstyle.y
  vendor-sys/acpica/dist/source/compiler/asldebug.c
  vendor-sys/acpica/dist/source/compiler/asldefine.h
  vendor-sys/acpica/dist/source/compiler/aslerror.c
  vendor-sys/acpica/dist/source/compiler/aslexternal.c
  vendor-sys/acpica/dist/source/compiler/aslfileio.c
  vendor-sys/acpica/dist/source/compiler/aslfiles.c
  vendor-sys/acpica/dist/source/compiler/aslfold.c
  vendor-sys/acpica/dist/source/compiler/aslglobal.h
  vendor-sys/acpica/dist/source/compiler/aslhelp.c
  vendor-sys/acpica/dist/source/compiler/aslhelpers.y
  vendor-sys/acpica/dist/source/compiler/aslhex.c
  vendor-sys/acpica/dist/source/compiler/aslkeywords.y
  vendor-sys/acpica/dist/source/compiler/asllength.c
  vendor-sys/acpica/dist/source/compiler/asllisting.c
  vendor-sys/acpica/dist/source/compiler/asllistsup.c
  vendor-sys/acpica/dist/source/compiler/aslload.c
  vendor-sys/acpica/dist/source/compiler/asllookup.c
  vendor-sys/acpica/dist/source/compiler/aslmain.c
  vendor-sys/acpica/dist/source/compiler/aslmap.c
  vendor-sys/acpica/dist/source/compiler/aslmapenter.c
  vendor-sys/acpica/dist/source/compiler/aslmapoutput.c
  vendor-sys/acpica/dist/source/compiler/aslmaputils.c
  vendor-sys/acpica/dist/source/compiler/aslmessages.c
  vendor-sys/acpica/dist/source/compiler/aslmessages.h
  vendor-sys/acpica/dist/source/compiler/aslmethod.c
  vendor-sys/acpica/dist/source/compiler/aslnamesp.c
  vendor-sys/acpica/dist/source/compiler/asloffset.c
  vendor-sys/acpica/dist/source/compiler/aslopcodes.c
  vendor-sys/acpica/dist/source/compiler/asloperands.c
  vendor-sys/acpica/dist/source/compiler/aslopt.c
  vendor-sys/acpica/dist/source/compiler/asloptions.c
  vendor-sys/acpica/dist/source/compiler/aslparser.y
  vendor-sys/acpica/dist/source/compiler/aslpld.c
  vendor-sys/acpica/dist/source/compiler/aslpredef.c
  vendor-sys/acpica/dist/source/compiler/aslprepkg.c
  vendor-sys/acpica/dist/source/compiler/aslprimaries.y
  vendor-sys/acpica/dist/source/compiler/aslprintf.c
  vendor-sys/acpica/dist/source/compiler/aslprune.c
  vendor-sys/acpica/dist/source/compiler/aslresource.c
  vendor-sys/acpica/dist/source/compiler/aslresources.y
  vendor-sys/acpica/dist/source/compiler/aslrestype1.c
  vendor-sys/acpica/dist/source/compiler/aslrestype1i.c
  vendor-sys/acpica/dist/source/compiler/aslrestype2.c
  vendor-sys/acpica/dist/source/compiler/aslrestype2d.c
  vendor-sys/acpica/dist/source/compiler/aslrestype2e.c
  vendor-sys/acpica/dist/source/compiler/aslrestype2q.c
  vendor-sys/acpica/dist/source/compiler/aslrestype2s.c
  vendor-sys/acpica/dist/source/compiler/aslrestype2w.c
  vendor-sys/acpica/dist/source/compiler/aslrules.y
  vendor-sys/acpica/dist/source/compiler/aslstartup.c
  vendor-sys/acpica/dist/source/compiler/aslstubs.c
  vendor-sys/acpica/dist/source/compiler/aslsupport.l
  vendor-sys/acpica/dist/source/compiler/aslsupport.y
  vendor-sys/acpica/dist/source/compiler/asltokens.y
  vendor-sys/acpica/dist/source/compiler/asltransform.c
  vendor-sys/acpica/dist/source/compiler/asltree.c
  vendor-sys/acpica/dist/source/compiler/asltypes.h
  vendor-sys/acpica/dist/source/compiler/asltypes.y
  vendor-sys/acpica/dist/source/compiler/aslutils.c
  vendor-sys/acpica/dist/source/compiler/asluuid.c
  vendor-sys/acpica/dist/source/compiler/aslwalks.c
  vendor-sys/acpica/dist/source/compiler/aslxref.c
  vendor-sys/acpica/dist/source/compiler/aslxrefout.c
  vendor-sys/acpica/dist/source/compiler/cvcompiler.c
  vendor-sys/acpica/dist/source/compiler/cvdisasm.c
  vendor

svn commit: r314607 - svnadmin/conf

2017-03-03 Thread Jung-uk Kim
Author: jkim
Date: Fri Mar  3 18:34:20 2017
New Revision: 314607
URL: https://svnweb.freebsd.org/changeset/base/314607

Log:
  Add myself for upcoming ACPICA import.

Modified:
  svnadmin/conf/sizelimit.conf

Modified: svnadmin/conf/sizelimit.conf
==
--- svnadmin/conf/sizelimit.confFri Mar  3 17:57:17 2017
(r314606)
+++ svnadmin/conf/sizelimit.confFri Mar  3 18:34:20 2017
(r314607)
@@ -22,6 +22,7 @@ dim
 imp
 jb
 jeff
+jkim
 mm
 np
 obrien
___
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: r314527 - in head: crypto/openssh crypto/openssh/contrib crypto/openssh/contrib/cygwin crypto/openssh/contrib/redhat crypto/openssh/contrib/suse crypto/openssh/openbsd-compat crypto/op

2017-03-03 Thread Ravi Pokala
-Original Message-
> From:  on behalf of Dag-Erling Smørgrav 
> 
> Date: 2017-03-03, Friday at 00:47
> To: "Ngie Cooper (yaneurabeya)" 
> Cc: Allan Jude , "src-committ...@freebsd.org" 
> , "svn-src-all@freebsd.org" 
> , "svn-src-h...@freebsd.org" 
> 
> Subject: Re: svn commit: r314527 - in head: crypto/openssh 
> crypto/openssh/contrib crypto/openssh/contrib/cygwin 
> crypto/openssh/contrib/redhat crypto/openssh/contrib/suse 
> crypto/openssh/openbsd-compat crypto/ope...
> 
> "Ngie Cooper (yaneurabeya)"  writes:
>> Allan Jude  writes:
>>> Dag-Erling Smørgrav  writes:
 Ngie Cooper  writes:
> Yes, I included you on the CR [...]
 CR?
>>> Code Review (Phabricator)
>> Yup — that’s what I meant.
> 
> I don't use Phabricator, and I don't consider it a legitimate attempt to
> contact me about a patch.
> 
> DES
> -- 
> Dag-Erling Smørgrav - d...@des.no


In that case, please update MAINTAINERS with that info. i.e.

Pre-commit review requested; email, not Phabricator.

Or something along those lines.

Thanks,

Ravi (rpokala@)


___
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: r314606 - in stable/10/sys: dev/cxgbe/iw_cxgbe ofed/drivers/infiniband/core

2017-03-03 Thread Navdeep Parhar
Author: np
Date: Fri Mar  3 17:57:17 2017
New Revision: 314606
URL: https://svnweb.freebsd.org/changeset/base/314606

Log:
  MFC r314400:
  
  cxgbe/iw_cxgbe: fix various double-close panics with iWARP sockets.
  
  Sockets representing the TCP endpoints for iWARP connections are
  allocated by the ibcore module.  Before this revision they were closed
  either by the ibcore module or the iw_cxgbe hardware driver depending on
  the state transitions during connection teardown.  This is error prone
  and there were cases where both iw_cxgbe and ibcore closed the socket
  leading to double-free panics.  The fix is to let ibcore close the
  sockets it creates and never do it in the driver.
  
  - Use sodisconnect instead of soclose (preceded by solinger = 0) in the
driver to tear down an RDMA connection abruptly.  This does what's
intended without releasing the socket's fd reference.
  
  - Close the socket in ibcore when the iWARP iw_cm_id is destroyed.  This
works for all kinds of sockets: clients that initiate connections,
listeners, and sockets accepted off of listeners.
  
  Sponsored by: Chelsio Communications

Modified:
  stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c
  stable/10/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h
  stable/10/sys/ofed/drivers/infiniband/core/cma.c
  stable/10/sys/ofed/drivers/infiniband/core/iwcm.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c
==
--- stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c   Fri Mar  3 17:53:22 2017
(r314605)
+++ stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c   Fri Mar  3 17:57:17 2017
(r314606)
@@ -90,9 +90,7 @@ static void *alloc_ep(int size, gfp_t fl
 void __free_ep(struct c4iw_ep_common *epc);
 static struct rtentry * find_route(__be32 local_ip, __be32 peer_ip, __be16 
local_port,
__be16 peer_port, u8 tos);
-static int close_socket(struct c4iw_ep_common *epc, int close);
-static int shutdown_socket(struct c4iw_ep_common *epc);
-static void abort_socket(struct c4iw_ep *ep);
+static void close_socket(struct socket *so);
 static int send_mpa_req(struct c4iw_ep *ep);
 static int send_mpa_reject(struct c4iw_ep *ep, const void *pdata, u8 plen);
 static int send_mpa_reply(struct c4iw_ep *ep, const void *pdata, u8 plen);
@@ -109,7 +107,8 @@ static void process_peer_close(struct c4
 static void process_conn_error(struct c4iw_ep *ep);
 static void process_close_complete(struct c4iw_ep *ep);
 static void ep_timeout(unsigned long arg);
-static void init_sock(struct c4iw_ep_common *epc);
+static void init_iwarp_socket(struct socket *so, void *arg);
+static void uninit_iwarp_socket(struct socket *so);
 static void process_data(struct c4iw_ep *ep);
 static void process_connected(struct c4iw_ep *ep);
 static int c4iw_so_upcall(struct socket *so, void *arg, int waitflag);
@@ -319,87 +318,12 @@ find_route(__be32 local_ip, __be32 peer_
return iproute.ro_rt;
 }
 
-static int
-close_socket(struct c4iw_ep_common *epc, int close)
-{
-   struct socket *so = epc->so;
-   int rc;
-
-   CTR5(KTR_IW_CXGBE, "%s:csoB so %p, ep %p, state %s, tid %d", __func__,
-   so, epc, states[epc->state],
-   ((struct c4iw_ep *)epc)->hwtid);
-   mutex_lock(&epc->so_mutex);
-   if ((so == NULL) || (so->so_count == 0)) {
-   mutex_unlock(&epc->so_mutex);
-   CTR5(KTR_IW_CXGBE, "%s:cso1 so %p, ep %p, state %s, tid %d",
-   __func__, so, epc, states[epc->state],
-   ((struct c4iw_ep *)epc)->hwtid);
-   return -EINVAL;
-   }
-
-   SOCK_LOCK(so);
-   soupcall_clear(so, SO_RCV);
-   SOCK_UNLOCK(so);
-
-   if (close)
-rc = soclose(so);
-else
-rc = soshutdown(so, SHUT_WR | SHUT_RD);
-   epc->so = NULL;
-
-   mutex_unlock(&epc->so_mutex);
-   return (rc);
-}
-
-static int
-shutdown_socket(struct c4iw_ep_common *epc)
-{
-
-   struct socket *so = epc->so;
-   int rc;
-
-   CTR5(KTR_IW_CXGBE, "%s:ssoB so %p, ep %p, state %s, tid %d", __func__,
-   epc->so, epc, states[epc->state],
-   ((struct c4iw_ep *)epc)->hwtid);
-   mutex_lock(&epc->so_mutex);
-   if ((so == NULL) || (so->so_count == 0)) {
-   mutex_unlock(&epc->so_mutex);
-   CTR5(KTR_IW_CXGBE, "%s:sso1 so %p, ep %p, state %s, tid %d",
-   __func__, epc->so, epc, states[epc->state],
-   ((struct c4iw_ep *)epc)->hwtid);
-   return -EINVAL;
-   }
-   rc = soshutdown(so, SHUT_WR);
-   mutex_unlock(&epc->so_mutex);
-   return rc;
-}
-
 static void
-abort_socket(struct c4iw_ep *ep)
+close_socket(struct socket *so)
 {
-   struct sockopt sopt;
-   int rc;
-   struct linger l;
-
-   CTR5(KTR_IW_CXGBE, "%s ep %p so %p 

svn commit: r314605 - in stable/11/sys: dev/cxgbe/iw_cxgbe ofed/drivers/infiniband/core

2017-03-03 Thread Navdeep Parhar
Author: np
Date: Fri Mar  3 17:53:22 2017
New Revision: 314605
URL: https://svnweb.freebsd.org/changeset/base/314605

Log:
  MFC r314400:
  
  cxgbe/iw_cxgbe: fix various double-close panics with iWARP sockets.
  
  Sockets representing the TCP endpoints for iWARP connections are
  allocated by the ibcore module.  Before this revision they were closed
  either by the ibcore module or the iw_cxgbe hardware driver depending on
  the state transitions during connection teardown.  This is error prone
  and there were cases where both iw_cxgbe and ibcore closed the socket
  leading to double-free panics.  The fix is to let ibcore close the
  sockets it creates and never do it in the driver.
  
  - Use sodisconnect instead of soclose (preceded by solinger = 0) in the
driver to tear down an RDMA connection abruptly.  This does what's
intended without releasing the socket's fd reference.
  
  - Close the socket in ibcore when the iWARP iw_cm_id is destroyed.  This
works for all kinds of sockets: clients that initiate connections,
listeners, and sockets accepted off of listeners.
  
  Sponsored by: Chelsio Communications

Modified:
  stable/11/sys/dev/cxgbe/iw_cxgbe/cm.c
  stable/11/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h
  stable/11/sys/ofed/drivers/infiniband/core/cma.c
  stable/11/sys/ofed/drivers/infiniband/core/iwcm.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/cxgbe/iw_cxgbe/cm.c
==
--- stable/11/sys/dev/cxgbe/iw_cxgbe/cm.c   Fri Mar  3 16:28:03 2017
(r314604)
+++ stable/11/sys/dev/cxgbe/iw_cxgbe/cm.c   Fri Mar  3 17:53:22 2017
(r314605)
@@ -92,9 +92,7 @@ static void *alloc_ep(int size, gfp_t fl
 void __free_ep(struct c4iw_ep_common *epc);
 static int find_route(__be32 local_ip, __be32 peer_ip, __be16 local_port,
__be16 peer_port, u8 tos, struct nhop4_extended *pnh4);
-static int close_socket(struct c4iw_ep_common *epc, int close);
-static int shutdown_socket(struct c4iw_ep_common *epc);
-static void abort_socket(struct c4iw_ep *ep);
+static void close_socket(struct socket *so);
 static int send_mpa_req(struct c4iw_ep *ep);
 static int send_mpa_reject(struct c4iw_ep *ep, const void *pdata, u8 plen);
 static int send_mpa_reply(struct c4iw_ep *ep, const void *pdata, u8 plen);
@@ -111,7 +109,8 @@ static void process_peer_close(struct c4
 static void process_conn_error(struct c4iw_ep *ep);
 static void process_close_complete(struct c4iw_ep *ep);
 static void ep_timeout(unsigned long arg);
-static void init_sock(struct c4iw_ep_common *epc);
+static void init_iwarp_socket(struct socket *so, void *arg);
+static void uninit_iwarp_socket(struct socket *so);
 static void process_data(struct c4iw_ep *ep);
 static void process_connected(struct c4iw_ep *ep);
 static int c4iw_so_upcall(struct socket *so, void *arg, int waitflag);
@@ -319,87 +318,12 @@ find_route(__be32 local_ip, __be32 peer_
return err;
 }
 
-static int
-close_socket(struct c4iw_ep_common *epc, int close)
-{
-   struct socket *so = epc->so;
-   int rc;
-
-   CTR5(KTR_IW_CXGBE, "%s:csoB so %p, ep %p, state %s, tid %d", __func__,
-   so, epc, states[epc->state],
-   ((struct c4iw_ep *)epc)->hwtid);
-   mutex_lock(&epc->so_mutex);
-   if ((so == NULL) || (so->so_count == 0)) {
-   mutex_unlock(&epc->so_mutex);
-   CTR5(KTR_IW_CXGBE, "%s:cso1 so %p, ep %p, state %s, tid %d",
-   __func__, so, epc, states[epc->state],
-   ((struct c4iw_ep *)epc)->hwtid);
-   return -EINVAL;
-   }
-
-   SOCK_LOCK(so);
-   soupcall_clear(so, SO_RCV);
-   SOCK_UNLOCK(so);
-
-   if (close)
-rc = soclose(so);
-else
-rc = soshutdown(so, SHUT_WR | SHUT_RD);
-   epc->so = NULL;
-
-   mutex_unlock(&epc->so_mutex);
-   return (rc);
-}
-
-static int
-shutdown_socket(struct c4iw_ep_common *epc)
-{
-
-   struct socket *so = epc->so;
-   int rc;
-
-   CTR5(KTR_IW_CXGBE, "%s:ssoB so %p, ep %p, state %s, tid %d", __func__,
-   epc->so, epc, states[epc->state],
-   ((struct c4iw_ep *)epc)->hwtid);
-   mutex_lock(&epc->so_mutex);
-   if ((so == NULL) || (so->so_count == 0)) {
-   mutex_unlock(&epc->so_mutex);
-   CTR5(KTR_IW_CXGBE, "%s:sso1 so %p, ep %p, state %s, tid %d",
-   __func__, epc->so, epc, states[epc->state],
-   ((struct c4iw_ep *)epc)->hwtid);
-   return -EINVAL;
-   }
-   rc = soshutdown(so, SHUT_WR);
-   mutex_unlock(&epc->so_mutex);
-   return rc;
-}
-
 static void
-abort_socket(struct c4iw_ep *ep)
+close_socket(struct socket *so)
 {
-   struct sockopt sopt;
-   int rc;
-   struct linger l;
-
-   CTR5(KTR_IW_CXGBE, "%s ep %p s

Re: svn commit: r314527 - in head: crypto/openssh crypto/openssh/contrib crypto/openssh/contrib/cygwin crypto/openssh/contrib/redhat crypto/openssh/contrib/suse crypto/openssh/openbsd-compat crypto/op

2017-03-03 Thread Ed Maste
On 3 March 2017 at 03:47, Dag-Erling Smørgrav  wrote:
>
> I don't use Phabricator, and I don't consider it a legitimate attempt to
> contact me about a patch.

There's no requirement to use Phabricator, so that's absolutely fine.

However, it's completely reasonable for developers to assume that, if
one has a Phabricator account then adding them is a reasonable
notification of a proposed patch. If you don't want to use
Phabricator, I'd ask that you consider removing your account.
___
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: r314604 - in head/sys/compat/linuxkpi/common: include/linux src

2017-03-03 Thread Hans Petter Selasky
Author: hselasky
Date: Fri Mar  3 16:28:03 2017
New Revision: 314604
URL: https://svnweb.freebsd.org/changeset/base/314604

Log:
  Update the LinuxKPI RCU and SRCU wrappers for the concurrency kit, CK.
  
  - Optimise the RCU implementation to not allocate and free
  ck_epoch_records during runtime. Instead allocate two sets of
  ck_epoch_records per CPU for general purpose use. The first set is
  only used for reader locks and the second set is only used for
  synchronization and barriers and is protected with a regular mutex to
  prevent simultaneous issues.
  
  - Move the task structure away from the rcu_head structure and into
  the per-CPU structures. This allows the size of the rcu_head structure
  to be reduced down to the size of two pointers.
  
  - Fix a bug where the linux_rcu_barrier() function only waited for one
  per-CPU epoch record to be completed instead of all.
  
  - Use a critical section or a mutex to protect ck_epoch_begin() and
  ck_epoch_end() depending on RCU or SRCU type. All the ck_epoch_xxx()
  functions, except ck_epoch_register(), ck_epoch_unregister() and
  ck_epoch_recycle() are not re-entrant and needs a critical section or
  a mutex to operate in the LinuxKPI, after inspecting the CK
  implementation of the above mentioned functions. The simultaneous
  issues arise from per-CPU epoch records being shared between multiple
  threads depending on the amount of taskswitching and how many threads
  are involved with the RCU and SRCU operations.
  
  - Properly free all epoch records by using safe list traversal at
  LinuxKPI module unload. It turns out the ck_epoch_recycle() always
  have the records on an internal list and use a flag in the epoch
  record to track allocated and free entries. This would lead to use
  after free during module unload.
  
  - Remove redundant synchronize_rcu() call from the
  linux_compat_uninit() function. Let the linux_rcu_runtime_uninit()
  function do the final rcu_barrier() instead.
  
  MFC after:1 week
  Sponsored by: Mellanox Technologies

Modified:
  head/sys/compat/linuxkpi/common/include/linux/srcu.h
  head/sys/compat/linuxkpi/common/include/linux/types.h
  head/sys/compat/linuxkpi/common/src/linux_compat.c
  head/sys/compat/linuxkpi/common/src/linux_rcu.c

Modified: head/sys/compat/linuxkpi/common/include/linux/srcu.h
==
--- head/sys/compat/linuxkpi/common/include/linux/srcu.hFri Mar  3 
16:07:46 2017(r314603)
+++ head/sys/compat/linuxkpi/common/include/linux/srcu.hFri Mar  3 
16:28:03 2017(r314604)
@@ -29,9 +29,9 @@
 #ifndef_LINUX_SRCU_H_
 #define_LINUX_SRCU_H_
 
-struct ck_epoch_record;
+struct srcu_epoch_record;
 struct srcu_struct {
-   struct ck_epoch_record *ss_epoch_record;
+   struct srcu_epoch_record *ss_epoch_record;
 };
 
 #definesrcu_dereference(ptr,srcu)  ((__typeof(*(ptr)) *)(ptr))
@@ -41,6 +41,7 @@ struct srcu_struct {
 extern int srcu_read_lock(struct srcu_struct *);
 extern void srcu_read_unlock(struct srcu_struct *, int index);
 extern void synchronize_srcu(struct srcu_struct *);
+extern void srcu_barrier(struct srcu_struct *);
 extern int init_srcu_struct(struct srcu_struct *);
 extern void cleanup_srcu_struct(struct srcu_struct *);
 extern void srcu_barrier(struct srcu_struct *);

Modified: head/sys/compat/linuxkpi/common/include/linux/types.h
==
--- head/sys/compat/linuxkpi/common/include/linux/types.h   Fri Mar  3 
16:07:46 2017(r314603)
+++ head/sys/compat/linuxkpi/common/include/linux/types.h   Fri Mar  3 
16:28:03 2017(r314604)
@@ -2,7 +2,7 @@
  * Copyright (c) 2010 Isilon Systems, Inc.
  * Copyright (c) 2010 iX Systems, Inc.
  * Copyright (c) 2010 Panasas, Inc.
- * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd.
+ * Copyright (c) 2013-2017 Mellanox Technologies, Ltd.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -65,7 +65,7 @@ typedef u64 phys_addr_t;
unsigned long n[howmany(bits, sizeof(long) * 8)]
 
 struct rcu_head {
-   void *raw[8];
+   void *raw[2];
 } __aligned(sizeof(void *));
 
 typedef void (*rcu_callback_t)(struct rcu_head *head);

Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c
==
--- head/sys/compat/linuxkpi/common/src/linux_compat.c  Fri Mar  3 16:07:46 
2017(r314603)
+++ head/sys/compat/linuxkpi/common/src/linux_compat.c  Fri Mar  3 16:28:03 
2017(r314604)
@@ -69,7 +69,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -1503,8 +1502,6 @@ linux_compat_uninit(void *arg)
linux_kobject_kfree_name(&linux_class_root);
linux_kobject_kfree_name(&linux_root_device.kobj);
linux_kobject

svn commit: r314603 - head/share/man/man5

2017-03-03 Thread Ed Maste
Author: emaste
Date: Fri Mar  3 16:07:46 2017
New Revision: 314603
URL: https://svnweb.freebsd.org/changeset/base/314603

Log:
  regen src.conf.5 for clang-4.0.0 merge
  
  Note that makeman's use of 'make showconfig' interacts poorly with
  the COMPILER_FEATURES test in share/mk/src.opts.mk, because it tests the
  host compiler, not the bootstrap compiler that will actually be used to
  build world. This causes it to report that Clang is enabled by default
  on MIPS and PowerPC.
  
  For example:
  % make TARGET_ARCH=mips64 showconfig | grep CLANG
  MK_CLANG = yes
  MK_CLANG_BOOTSTRAP = no
  MK_CLANG_EXTRAS  = no
  MK_CLANG_FULL= yes
  MK_CLANG_IS_CC   = no
  
  I am committing this version anyway to avoid extraneous diffs in
  src.conf.5 after every other WITH_/WITHOUT_FOO change.
  
  In addition, we intend to switch to a C++11 compiler for all archs for
  12.0 (either by fixing Clang for those archs, or by requiring an
  external toolchain), and then src.conf.5 will be correct.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/share/man/man5/src.conf.5

Modified: head/share/man/man5/src.conf.5
==
--- head/share/man/man5/src.conf.5  Fri Mar  3 15:47:50 2017
(r314602)
+++ head/share/man/man5/src.conf.5  Fri Mar  3 16:07:46 2017
(r314603)
@@ -338,7 +338,7 @@ When set, it enforces these options:
 Set to not build the Clang C/C++ compiler during the regular phase of the 
build.
 .Pp
 This is a default setting on
-mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, 
mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf and sparc64/sparc64.
+sparc64/sparc64.
 When set, it enforces these options:
 .Pp
 .Bl -item -compact
@@ -352,7 +352,7 @@ When set, it enforces these options:
 Set to build the Clang C/C++ compiler during the normal phase of the build.
 .Pp
 This is a default setting on
-amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386, 
powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpcspe.
+amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386, 
mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, 
mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, 
powerpc/powerpc64 and powerpc/powerpcspe.
 .It Va WITHOUT_CLANG_BOOTSTRAP
 .\" from FreeBSD: head/tools/build/options/WITHOUT_CLANG_BOOTSTRAP 313169 
2017-02-03 19:09:46Z wblock
 Set to not build the Clang C/C++ compiler during the bootstrap phase of
@@ -377,14 +377,14 @@ Set to avoid building the ARCMigrate, Re
 the Clang C/C++ compiler.
 .Pp
 This is a default setting on
-mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, 
mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf and sparc64/sparc64.
+sparc64/sparc64.
 .It Va WITH_CLANG_FULL
 .\" from FreeBSD: head/tools/build/options/WITH_CLANG_FULL 246259 2013-02-02 
22:28:29Z dim
 Set to build the ARCMigrate, Rewriter and StaticAnalyzer components of the
 Clang C/C++ compiler.
 .Pp
 This is a default setting on
-amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386, 
powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpcspe.
+amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386, 
mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, 
mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, 
powerpc/powerpc64 and powerpc/powerpcspe.
 .It Va WITHOUT_CLANG_IS_CC
 .\" from FreeBSD: head/tools/build/options/WITHOUT_CLANG_IS_CC 242629 
2012-11-05 21:53:23Z brooks
 Set to install the GCC compiler as
@@ -1052,13 +1052,19 @@ library.
 Set to not build LLVM's lld linker.
 .Pp
 This is a default setting on
-arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, 
mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, 
mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, 
powerpc/powerpcspe and sparc64/sparc64.
+mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, 
mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, 
powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64.
+When set, it enforces these options:
+.Pp
+.Bl -item -compact
+.It
+.Va WITHOUT_LLD_IS_LD
+.El
 .It Va WITH_LLD
 .\" from FreeBSD: head/tools/build/options/WITH_LLD 309124 2016-11-24 
22:54:55Z dim
 Set to build LLVM's lld linker.
 .Pp
 This is a default setting on
-amd64/amd64 and arm64/aarch64.
+amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64 and i386/i386.
 .It Va WITHOUT_LLDB
 .\" from FreeBSD: head/tools/build/options/WITHOUT_LLDB 289275 2015-10-14 
00:23:31Z emaste
 Set to not build the LLDB debugger.
@@ -1083,6 +1089,14 @@ Set to use LLVM's LLD as the system link
 .Pp
 This is a default setting on
 arm64/aarch64.
+When set, these options are also in effect:
+.Pp
+.Bl -inset -compact
+.It Va WITHOUT_SYSTEM_COMPILER
+(unless
+.Va WITH_SYSTEM_COMPILER
+is set explic

svn commit: r314602 - head/share/man/man5

2017-03-03 Thread Navdeep Parhar
Author: np
Date: Fri Mar  3 15:47:50 2017
New Revision: 314602
URL: https://svnweb.freebsd.org/changeset/base/314602

Log:
  Regen src.conf.5 after r314579.
  
  Sponsored by: Chelsio Communications

Modified:
  head/share/man/man5/src.conf.5

Modified: head/share/man/man5/src.conf.5
==
--- head/share/man/man5/src.conf.5  Fri Mar  3 14:25:55 2017
(r314601)
+++ head/share/man/man5/src.conf.5  Fri Mar  3 15:47:50 2017
(r314602)
@@ -1,7 +1,7 @@
 .\" DO NOT EDIT-- this file is automatically generated.
 .\" from FreeBSD: head/tools/build/options/makeman 313173 2017-02-03 20:17:54Z 
wblock
 .\" $FreeBSD$
-.Dd March 1, 2017
+.Dd March 3, 2017
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -472,6 +472,20 @@ and related utilities.
 .It Va WITHOUT_CUSE
 .\" from FreeBSD: head/tools/build/options/WITHOUT_CUSE 270171 2014-08-19 
15:40:26Z hselasky
 Set to not build CUSE-related programs and libraries.
+.It Va WITHOUT_CXGBETOOL
+.\" from FreeBSD: head/tools/build/options/WITHOUT_CXGBETOOL 314579 2017-03-03 
03:11:58Z np
+Set to not build
+.Xr cxgbetool 8
+.Pp
+This is a default setting on
+arm/arm, arm/armeb, arm/armv6, mips/mipsel, mips/mips, mips/mips64el, 
mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, 
mips/mips64hf, powerpc/powerpc and powerpc/powerpcspe.
+.It Va WITH_CXGBETOOL
+.\" from FreeBSD: head/tools/build/options/WITH_CXGBETOOL 314579 2017-03-03 
03:11:58Z np
+Set to build
+.Xr cxgbetool 8
+.Pp
+This is a default setting on
+amd64/amd64, arm64/aarch64, i386/i386, powerpc/powerpc64 and sparc64/sparc64.
 .It Va WITHOUT_CXX
 .\" from FreeBSD: head/tools/build/options/WITHOUT_CXX 281053 2015-04-03 
23:55:04Z bdrewery
 Set to not build
___
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: r314594 - stable/10/sys/modules/mlx5

2017-03-03 Thread Andriy Gapon
On 03/03/2017 16:18, Hans Petter Selasky wrote:
> On 03/03/17 13:06, Andriy Gapon wrote:
>> Author: avg
>> Date: Fri Mar  3 12:06:33 2017
>> New Revision: 314594
>> URL: https://svnweb.freebsd.org/changeset/base/314594
>>
>> Log:
>>   mlx5 module: remove include path that doesn't exist in this branch
>>
>>   This is a direct commit.
>>   It allows the module to be compiled with the base gcc.
>>
>> Modified:
>>   stable/10/sys/modules/mlx5/Makefile
>>
>> Modified: stable/10/sys/modules/mlx5/Makefile
>> ==
>> --- stable/10/sys/modules/mlx5/MakefileFri Mar  3 12:03:50 2017
>> (r314593)
>> +++ stable/10/sys/modules/mlx5/MakefileFri Mar  3 12:06:33 2017
>> (r314594)
>> @@ -30,7 +30,6 @@ device_if.h bus_if.h vnode_if.h pci_if.h
>>  SRCS+= linux_compat.c linux_radix.c linux_idr.c
>>
>>  CFLAGS+= -I${.CURDIR}/../../ofed/include
>> -CFLAGS+= -I${.CURDIR}/../../compat/linuxkpi/common/include
>>
>>  .include 
>>
> 
> Hi,
> 
> Which version of GCC is this?

gcc version 4.2.1 20070831 patched [FreeBSD]
That is, the compiler that you get when clang is disabled.

> Do you want me to check for this kind of errors before committing or are you
> fine cleaning up every now and then? Currently the mlx4/mlx5 code is only 
> tested
> with the in-base compiler.

Checking with a non-default compiler is probably too much a burden for anyone
who doesn't use it regularly.

-- 
Andriy Gapon
___
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: r314601 - head/crypto/openssh

2017-03-03 Thread Dag-Erling Smørgrav
Author: des
Date: Fri Mar  3 14:25:55 2017
New Revision: 314601
URL: https://svnweb.freebsd.org/changeset/base/314601

Log:
  Re-apply part of r311585 which was inadvertantly reverted in the upgrade
  to 7.3p1.  The other part (which adds -DLIBWRAP to sshd's CFLAGS) is
  still in place.
  
  Reported by:  ngie

Modified:
  head/crypto/openssh/config.h

Modified: head/crypto/openssh/config.h
==
--- head/crypto/openssh/config.hFri Mar  3 14:19:37 2017
(r314600)
+++ head/crypto/openssh/config.hFri Mar  3 14:25:55 2017
(r314601)
@@ -1438,7 +1438,7 @@
 /* #undef LASTLOG_WRITE_PUTUTXLINE */
 
 /* Define if you want TCP Wrappers support */
-#define LIBWRAP 1
+/* #undef LIBWRAP */
 
 /* Define to whatever link() returns for "not supported" if it doesn't return
EOPNOTSUPP. */
___
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: r314600 - head/sys/arm/altera/socfpga

2017-03-03 Thread Ruslan Bukin
Author: br
Date: Fri Mar  3 14:19:37 2017
New Revision: 314600
URL: https://svnweb.freebsd.org/changeset/base/314600

Log:
  Add FPGA manager driver for Intel Arria 10.
  
  With this driver we able to program FPGA core from FreeBSD system
  running on ARM core.
  
  Sponsored by: DARPA, AFRL

Added:
  head/sys/arm/altera/socfpga/socfpga_a10_manager.c   (contents, props changed)
Modified:
  head/sys/arm/altera/socfpga/files.socfpga

Modified: head/sys/arm/altera/socfpga/files.socfpga
==
--- head/sys/arm/altera/socfpga/files.socfpga   Fri Mar  3 14:17:07 2017
(r314599)
+++ head/sys/arm/altera/socfpga/files.socfpga   Fri Mar  3 14:19:37 2017
(r314600)
@@ -11,6 +11,9 @@ arm/altera/socfpga/socfpga_gpio.c optio
 
 dev/mmc/host/dwmmc.c   optional dwmmc
 
+# Arria 10
+arm/altera/socfpga/socfpga_a10_manager.c   standard
+
 # BERI specific
 dev/beri/beri_ring.c   optional beri_ring
 dev/beri/beri_mem.coptional beri_mem

Added: head/sys/arm/altera/socfpga/socfpga_a10_manager.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/arm/altera/socfpga/socfpga_a10_manager.c   Fri Mar  3 14:19:37 
2017(r314600)
@@ -0,0 +1,444 @@
+/*-
+ * Copyright (c) 2017 Ruslan Bukin 
+ * All rights reserved.
+ *
+ * This software was developed by SRI International and the University of
+ * Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237
+ * ("CTSRD"), as part of the DARPA CRASH research programme.
+ *
+ * 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.
+ */
+
+/*
+ * Intel Arria 10 FPGA Manager.
+ * Chapter 4, Arria 10 Hard Processor System Technical Reference Manual.
+ * Chapter A, FPGA Reconfiguration.
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+
+#defineFPGAMGR_DCLKCNT 0x8 /* DCLK Count Register 
*/
+#defineFPGAMGR_DCLKSTAT0xC /* DCLK Status Register 
*/
+#defineFPGAMGR_GPO 0x10/* General-Purpose 
Output Register */
+#defineFPGAMGR_GPI 0x14/* General-Purpose 
Input Register */
+#defineFPGAMGR_MISCI   0x18/* Miscellaneous Input 
Register */
+#defineIMGCFG_CTRL_00  0x70
+#define S2F_CONDONE_OE (1 << 24)
+#define S2F_NSTATUS_OE (1 << 16)
+#define CTRL_00_NCONFIG(1 << 8)
+#define CTRL_00_NENABLE_CONDONE(1 << 2)
+#define CTRL_00_NENABLE_NSTATUS(1 << 1)
+#define CTRL_00_NENABLE_NCONFIG(1 << 0)
+#defineIMGCFG_CTRL_01  0x74
+#define CTRL_01_S2F_NCE(1 << 24)
+#define CTRL_01_S2F_PR_REQUEST (1 << 16)
+#define CTRL_01_S2F_NENABLE_CONFIG (1 << 0)
+#defineIMGCFG_CTRL_02  0x78
+#define CTRL_02_CDRATIO_S  16
+#define CTRL_02_CDRATIO_M  (0x3 << CTRL_02_CDRATIO_S)
+#define CTRL_02_CFGWIDTH_16(0 << 24)
+#define CTRL_02_CFGWIDTH_32(1 << 24)
+#define CTRL_02_EN_CFG_DATA(1 << 8)
+#define CTRL_02_EN_CFG_CTRL(1 << 0)
+#defineIMGCFG_STAT 0x80
+#define F2S_PR_ERROR

Re: svn commit: r314594 - stable/10/sys/modules/mlx5

2017-03-03 Thread Hans Petter Selasky

On 03/03/17 13:06, Andriy Gapon wrote:

Author: avg
Date: Fri Mar  3 12:06:33 2017
New Revision: 314594
URL: https://svnweb.freebsd.org/changeset/base/314594

Log:
  mlx5 module: remove include path that doesn't exist in this branch

  This is a direct commit.
  It allows the module to be compiled with the base gcc.

Modified:
  stable/10/sys/modules/mlx5/Makefile

Modified: stable/10/sys/modules/mlx5/Makefile
==
--- stable/10/sys/modules/mlx5/Makefile Fri Mar  3 12:03:50 2017
(r314593)
+++ stable/10/sys/modules/mlx5/Makefile Fri Mar  3 12:06:33 2017
(r314594)
@@ -30,7 +30,6 @@ device_if.h bus_if.h vnode_if.h pci_if.h
 SRCS+= linux_compat.c linux_radix.c linux_idr.c

 CFLAGS+= -I${.CURDIR}/../../ofed/include
-CFLAGS+= -I${.CURDIR}/../../compat/linuxkpi/common/include

 .include 



Hi,

Which version of GCC is this?

Do you want me to check for this kind of errors before committing or are 
you fine cleaning up every now and then? Currently the mlx4/mlx5 code is 
only tested with the in-base compiler.


--HPS

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


svn commit: r314599 - head/sys/gnu/dts/arm

2017-03-03 Thread Ruslan Bukin
Author: br
Date: Fri Mar  3 14:17:07 2017
New Revision: 314599
URL: https://svnweb.freebsd.org/changeset/base/314599

Log:
  Import latest vendor DTS files for Intel Arria 10.

Modified:
  head/sys/gnu/dts/arm/socfpga_arria10.dtsi
  head/sys/gnu/dts/arm/socfpga_arria10_socdk.dtsi
  head/sys/gnu/dts/arm/socfpga_arria10_socdk_sdmmc.dts

Modified: head/sys/gnu/dts/arm/socfpga_arria10.dtsi
==
--- head/sys/gnu/dts/arm/socfpga_arria10.dtsi   Fri Mar  3 14:06:22 2017
(r314598)
+++ head/sys/gnu/dts/arm/socfpga_arria10.dtsi   Fri Mar  3 14:17:07 2017
(r314599)
@@ -22,11 +22,6 @@
#address-cells = <1>;
#size-cells = <1>;
 
-   aliases {
-   serial0 = &uart0;
-   serial1 = &uart1;
-   };
-
cpus {
#address-cells = <1>;
#size-cells = <0>;
@@ -88,6 +83,14 @@
};
};
 
+   base_fpga_region {
+   #address-cells = <0x1>;
+   #size-cells = <0x1>;
+
+   compatible = "fpga-region";
+   fpga-mgr = <&fpga_mgr>;
+   };
+
clkmgr@ffd04000 {
compatible = "altr,clk-mgr";
reg = <0xffd04000 0x1000>;
@@ -405,6 +408,12 @@
};
};
 
+   socfpga_axi_setup: stmmac-axi-config {
+   snps,wr_osr_lmt = <0xf>;
+   snps,rd_osr_lmt = <0xf>;
+   snps,blen = <0 0 0 0 16 0 0>;
+   };
+
gmac0: ethernet@ff80 {
compatible = "altr,socfpga-stmmac", "snps,dwmac-3.72a", 
"snps,dwmac";
altr,sysmgr-syscon = <&sysmgr 0x44 0>;
@@ -421,6 +430,7 @@
clock-names = "stmmaceth";
resets = <&rst EMAC0_RESET>;
reset-names = "stmmaceth";
+   snps,axi-config = <&socfpga_axi_setup>;
status = "disabled";
};
 
@@ -440,6 +450,7 @@
clock-names = "stmmaceth";
resets = <&rst EMAC1_RESET>;
reset-names = "stmmaceth";
+   snps,axi-config = <&socfpga_axi_setup>;
status = "disabled";
};
 
@@ -457,6 +468,7 @@
rx-fifo-depth = <16384>;
clocks = <&l4_mp_clk>;
clock-names = "stmmaceth";
+   snps,axi-config = <&socfpga_axi_setup>;
status = "disabled";
};
 
@@ -517,6 +529,15 @@
};
};
 
+   fpga_mgr: fpga-mgr@ffd03000 {
+   compatible = "altr,socfpga-a10-fpga-mgr";
+   reg = <0xffd03000 0x100
+  0xffcfe400 0x20>;
+   clocks = <&l4_mp_clk>;
+   resets = <&rst FPGAMGR_RESET>;
+   reset-names = "fpgamgr";
+   };
+
i2c0: i2c@ffc02200 {
#address-cells = <1>;
#size-cells = <0>;
@@ -567,15 +588,24 @@
status = "disabled";
};
 
-   sdr: sdr@ffc25000 {
-   compatible = "syscon";
-   reg = <0xffcfb100 0x80>;
+   spi1: spi@ffda5000 {
+   compatible = "snps,dw-apb-ssi";
+   #address-cells = <1>;
+   #size-cells = <0>;
+   reg = <0xffda5000 0x100>;
+   interrupts = <0 102 4>;
+   num-chipselect = <4>;
+   bus-num = <0>;
+   /*32bit_access;*/
+   tx-dma-channel = <&pdma 16>;
+   rx-dma-channel = <&pdma 17>;
+   clocks = <&spi_m_clk>;
+   status = "disabled";
};
 
-   sdramedac {
-   compatible = "altr,sdram-edac-a10";
-   altr,sdr-syscon = <&sdr>;
-   interrupts = <0 2 4>, <0 0 4>;
+   sdr: sdr@ffc25000 {
+   compatible = "altr,sdr-ctl", "syscon";
+   reg = <0xffcfb100 0x80>;
};
 
L2: l2-cache@f000 {
@@ -584,6 +614,9 @@
interrupts = <0 18 IRQ_TYPE_LEVEL_HIGH>;
cache-unified;
cache-level = <2>;
+   prefetch-data = <1>;
+   prefetch-instr = <1>;
+   arm,shared-override;
};
 
mmc: dwmmc0@ff808000 {
@@ -598,6 +6

svn commit: r314598 - head/lib/libpam/modules/pam_krb5

2017-03-03 Thread Dag-Erling Smørgrav
Author: des
Date: Fri Mar  3 14:06:22 2017
New Revision: 314598
URL: https://svnweb.freebsd.org/changeset/base/314598

Log:
  Load default options before requesting a ticket.
  
  PR:   213909
  Reported by:  basarev...@gmail.com
  MFC after:1 week

Modified:
  head/lib/libpam/modules/pam_krb5/pam_krb5.c

Modified: head/lib/libpam/modules/pam_krb5/pam_krb5.c
==
--- head/lib/libpam/modules/pam_krb5/pam_krb5.c Fri Mar  3 13:32:01 2017
(r314597)
+++ head/lib/libpam/modules/pam_krb5/pam_krb5.c Fri Mar  3 14:06:22 2017
(r314598)
@@ -239,6 +239,8 @@ pam_sm_authenticate(pam_handle_t *pamh, 
retval = PAM_SERVICE_ERR;
goto cleanup2;
}
+   krb5_get_init_creds_opt_set_default_flags(pam_context,
+   service, NULL, opts);
 
if (openpam_get_option(pamh, PAM_OPT_FORWARDABLE))
krb5_get_init_creds_opt_set_forwardable(opts, 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: r314585 - head/usr.sbin/syslogd

2017-03-03 Thread Rodney W. Grimes
-- Start of PGP signed section.
[ Charset ISO-8859-7 unsupported, converting... ]
> "Ngie Cooper (yaneurabeya)"  wrote
>   in <1a3f6606-822c-4c80-adfa-48378f0f2...@gmail.com>:
> 
> ya> >> How about "...accepts UDP packets sent with any source port" or

I actually think this right here is the clearest one of all the ones
I have seen attempted.  Oh, remove the s from accepts.


> ya> >> something?
> ya> > 
> ya> > Yeah, that?s more accurate.
> ya> 
> ya> How about this?
> ya> -Ngie
> ya> 
> ya> $ svn diff usr.sbin/syslogd/syslogd.8
> ya> Index: usr.sbin/syslogd/syslogd.8
> ya> ===
> ya> --- usr.sbin/syslogd/syslogd.8  (revision 314585)
> ya> +++ usr.sbin/syslogd/syslogd.8  (working copy)
> ya> @@ -131,7 +131,7 @@
> ya>  .Ar service
> ya>  of
> ya>  .Ql \&*
> ya> -allows packets to be received from any UDP port.
> ya> +allows UDP packets to be sent with any source port.
> ya>  The default
> ya>  .Ar service
> ya>  is
> 
>  Looks good to me though probably I am not the best person who can
>  judge an English expression as good or bad...
> 
> -- Hiroki
> -- End of PGP section, PGP failed!

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


svn commit: r314597 - stable/10/tools/build/mk

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

Log:
  MFH (r278120): add missing ssh-related files
  
  PR:   193980
  Submitted by: mcdou...@egr.msu.edu

Modified:
  stable/10/tools/build/mk/OptionalObsoleteFiles.inc
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc
==
--- stable/10/tools/build/mk/OptionalObsoleteFiles.inc  Fri Mar  3 12:51:16 
2017(r314596)
+++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc  Fri Mar  3 13:32:01 
2017(r314597)
@@ -4044,18 +4044,28 @@ OLD_FILES+=usr/share/man/man8/ntptime.8.
 .endif
 
 .if ${MK_OPENSSH} == no
+OLD_FILES+=etc/rc.d/sshd
+OLD_FILES+=etc/ssh/moduli
+OLD_FILES+=etc/ssh/ssh_config
+OLD_FILES+=etc/ssh/sshd_config
+OLD_FILES+=usr/bin/scp
 OLD_FILES+=usr/bin/sftp
+OLD_FILES+=usr/bin/slogin
 OLD_FILES+=usr/bin/ssh
 OLD_FILES+=usr/bin/ssh-add
 OLD_FILES+=usr/bin/ssh-agent
 OLD_FILES+=usr/bin/ssh-copy-id
 OLD_FILES+=usr/bin/ssh-keygen
 OLD_FILES+=usr/bin/ssh-keyscan
+OLD_FILES+=usr/lib/pam_ssh.so
+OLD_LIBS+=usr/lib/pam_ssh.so.5
 OLD_FILES+=usr/lib/private/libssh.a
 OLD_FILES+=usr/lib/private/libssh.so
 OLD_LIBS+=usr/lib/private/libssh.so.5
 OLD_FILES+=usr/lib/private/libssh_p.a
 .if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64"
+OLD_FILES+=usr/lib32/pam_ssh.so
+OLD_LIBS+=usr/lib32/pam_ssh.so.5
 OLD_FILES+=usr/lib32/private/libssh.a
 OLD_FILES+=usr/lib32/private/libssh.so
 OLD_LIBS+=usr/lib32/private/libssh.so.5
@@ -4065,6 +4075,22 @@ OLD_FILES+=usr/libexec/sftp-server
 OLD_FILES+=usr/libexec/ssh-keysign
 OLD_FILES+=usr/libexec/ssh-pkcs11-helper
 OLD_FILES+=usr/sbin/sshd
+OLD_FILES+=usr/share/man/man1/scp.1.gz
+OLD_FILES+=usr/share/man/man1/sftp.1.gz
+OLD_FILES+=usr/share/man/man1/slogin.1.gz
+OLD_FILES+=usr/share/man/man1/ssh-add.1.gz
+OLD_FILES+=usr/share/man/man1/ssh-agent.1.gz
+OLD_FILES+=usr/share/man/man1/ssh-copy-id.1.gz
+OLD_FILES+=usr/share/man/man1/ssh-keygen.1.gz
+OLD_FILES+=usr/share/man/man1/ssh-keyscan.1.gz
+OLD_FILES+=usr/share/man/man1/ssh.1.gz
+OLD_FILES+=usr/share/man/man5/ssh_config.5.gz
+OLD_FILES+=usr/share/man/man5/sshd_config.5.gz
+OLD_FILES+=usr/share/man/man8/pam_ssh.8.gz
+OLD_FILES+=usr/share/man/man8/sftp-server.8.gz
+OLD_FILES+=usr/share/man/man8/ssh-keysign.8.gz
+OLD_FILES+=usr/share/man/man8/ssh-pkcs11-helper.8.gz
+OLD_FILES+=usr/share/man/man8/sshd.8.gz
 .endif
 
 .if ${MK_OPENSSL} == no
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314596 - head/lib/libfetch

2017-03-03 Thread Baptiste Daroussin
Author: bapt
Date: Fri Mar  3 12:51:16 2017
New Revision: 314596
URL: https://svnweb.freebsd.org/changeset/base/314596

Log:
  Properly initialize netrcfd in fetchParseURL
  
  This fixes ftp with fetch(1) which was broken after r313974
  
  Submitted by: dim
  Reported by:  olivier
  Pointyhat to: bapt

Modified:
  head/lib/libfetch/fetch.c

Modified: head/lib/libfetch/fetch.c
==
--- head/lib/libfetch/fetch.c   Fri Mar  3 12:30:18 2017(r314595)
+++ head/lib/libfetch/fetch.c   Fri Mar  3 12:51:16 2017(r314596)
@@ -350,6 +350,7 @@ fetchParseURL(const char *URL)
fetch_syserr();
return (NULL);
}
+   u->netrcfd = -2;
 
/* scheme name */
if ((p = strstr(URL, ":/"))) {
___
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: r314595 - stable/11/usr.bin/sockstat

2017-03-03 Thread Renato Botelho
Author: garga (ports committer)
Date: Fri Mar  3 12:30:18 2017
New Revision: 314595
URL: https://svnweb.freebsd.org/changeset/base/314595

Log:
  MFC r314039:
  
  Fix style(9)
  
  Reviewed by:  ngie, tuexen, vangyzen, allanjude
  Approved by:  allanjude
  MFC after:1 week
  Sponsored by: Rubicon Communications (Netgate)
  Differential Revision:https://reviews.freebsd.org/D9588

Modified:
  stable/11/usr.bin/sockstat/sockstat.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.bin/sockstat/sockstat.c
==
--- stable/11/usr.bin/sockstat/sockstat.c   Fri Mar  3 12:06:33 2017
(r314594)
+++ stable/11/usr.bin/sockstat/sockstat.c   Fri Mar  3 12:30:18 2017
(r314595)
@@ -88,9 +88,9 @@ static size_t  numprotos; /* allocated s
 
 static int *ports;
 
-#define INT_BIT (sizeof(int)*CHAR_BIT)
-#define SET_PORT(p) do { ports[p / INT_BIT] |= 1 << (p % INT_BIT); } while (0)
-#define CHK_PORT(p) (ports[p / INT_BIT] & (1 << (p % INT_BIT)))
+#defineINT_BIT (sizeof(int)*CHAR_BIT)
+#defineSET_PORT(p) do { ports[p / INT_BIT] |= 1 << (p % INT_BIT); } 
while (0)
+#defineCHK_PORT(p) (ports[p / INT_BIT] & (1 << (p % INT_BIT)))
 
 struct addr {
struct sockaddr_storage address;
@@ -111,7 +111,7 @@ struct sock {
struct sock *next;
 };
 
-#define HASHSIZE 1009
+#defineHASHSIZE 1009
 static struct sock *sockhash[HASHSIZE];
 
 static struct xfile *xfiles;
@@ -131,7 +131,6 @@ xprintf(const char *fmt, ...)
return (len);
 }
 
-
 static int
 get_proto_type(const char *proto)
 {
@@ -147,7 +146,6 @@ get_proto_type(const char *proto)
return (pent->p_proto);
 }
 
-
 static void
 init_protos(int num)
 {
@@ -167,7 +165,6 @@ init_protos(int num)
numprotos = proto_count;
 }
 
-
 static int
 parse_protos(char *protospec)
 {
@@ -190,7 +187,6 @@ parse_protos(char *protospec)
return (proto_index);
 }
 
-
 static void
 parse_ports(const char *portspec)
 {
@@ -359,27 +355,27 @@ gather_sctp(void)
err(1, "malloc()");
switch (xladdr->address.sa.sa_family) {
case AF_INET:
-#define __IN_IS_ADDR_LOOPBACK(pina) \
+#define__IN_IS_ADDR_LOOPBACK(pina) \
((ntohl((pina)->s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET)
-   if 
(!__IN_IS_ADDR_LOOPBACK(&xladdr->address.sin.sin_addr))
+   if (!__IN_IS_ADDR_LOOPBACK(
+   &xladdr->address.sin.sin_addr))
local_all_loopback = 0;
-#undef __IN_IS_ADDR_LOOPBACK
-   sockaddr(&laddr->address,
-AF_INET,
-&xladdr->address.sin.sin_addr,
-htons(xinpcb->local_port));
+#undef __IN_IS_ADDR_LOOPBACK
+   sockaddr(&laddr->address, AF_INET,
+   &xladdr->address.sin.sin_addr,
+   htons(xinpcb->local_port));
break;
case AF_INET6:
-   if 
(!IN6_IS_ADDR_LOOPBACK(&xladdr->address.sin6.sin6_addr))
+   if (!IN6_IS_ADDR_LOOPBACK(
+   &xladdr->address.sin6.sin6_addr))
local_all_loopback = 0;
-   sockaddr(&laddr->address,
-AF_INET6,
-&xladdr->address.sin6.sin6_addr,
-htons(xinpcb->local_port));
+   sockaddr(&laddr->address, AF_INET6,
+   &xladdr->address.sin6.sin6_addr,
+   htons(xinpcb->local_port));
break;
default:
errx(1, "address family %d not supported",
-xladdr->address.sa.sa_family);
+   xladdr->address.sa.sa_family);
}
laddr->next = NULL;
if (prev_laddr == NULL)
@@ -389,33 +385,38 @@ gather_sctp(void)
prev_laddr = laddr;
}
if (sock->laddr == NULL) {
-   if ((sock->laddr = calloc(1, sizeof(struct addr))) == 
NULL)
+   if ((sock->laddr =
+   calloc(1, sizeof(struct addr))) == NULL)
err(1, "malloc()");
sock->laddr->address.ss_family = sock->family;
if (sock->family == AF_INET)
-   sock->laddr->address.ss

Re: svn commit: r308996 - head/lib/libfetch

2017-03-03 Thread Dag-Erling Smørgrav
"Bjoern A. Zeeb"  writes:
> Dag-Erling Smørgrav  writes:
>> +/* split address if necessary */
>> +err = EAI_SYSTEM;
>> +if ((sep = strchr(addr, ':')) != NULL) {
>> +len = snprintf(hbuf, sizeof(hbuf),
>> +"%.*s", (int)(sep - addr), addr);
> I believe this code is what broke
>   fetch http://[::1]:/
> just to give an example;  and the printf traces will not reveal this
> but “addr” at this point has no more addr:port in it given the
> function arguments, right?

I think you're right, I'll look into it.  It means replacing strchr()
with a loop.  Is there a ticket for this bug, and if not, could you
please open one?

DES
-- 
Dag-Erling Smørgrav - d...@des.no
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

svn commit: r314594 - stable/10/sys/modules/mlx5

2017-03-03 Thread Andriy Gapon
Author: avg
Date: Fri Mar  3 12:06:33 2017
New Revision: 314594
URL: https://svnweb.freebsd.org/changeset/base/314594

Log:
  mlx5 module: remove include path that doesn't exist in this branch
  
  This is a direct commit.
  It allows the module to be compiled with the base gcc.

Modified:
  stable/10/sys/modules/mlx5/Makefile

Modified: stable/10/sys/modules/mlx5/Makefile
==
--- stable/10/sys/modules/mlx5/Makefile Fri Mar  3 12:03:50 2017
(r314593)
+++ stable/10/sys/modules/mlx5/Makefile Fri Mar  3 12:06:33 2017
(r314594)
@@ -30,7 +30,6 @@ device_if.h bus_if.h vnode_if.h pci_if.h
 SRCS+= linux_compat.c linux_radix.c linux_idr.c
 
 CFLAGS+= -I${.CURDIR}/../../ofed/include
-CFLAGS+= -I${.CURDIR}/../../compat/linuxkpi/common/include
 
 .include 
 
___
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: r314593 - in stable/10/sys/dev/drm2: . radeon

2017-03-03 Thread Andriy Gapon
Author: avg
Date: Fri Mar  3 12:03:50 2017
New Revision: 314593
URL: https://svnweb.freebsd.org/changeset/base/314593

Log:
  MFC r288112,r302571: remove unused and redundant declarations and code
  
  r288112 Hide an unused in FreeBSD function behind #ifdef linux to get rid of
  the compile time warning.
  
  r302571 Remove redundant declaration for radeon_pm_acpi_event_handler(..) to 
fix
  -Wredundant-decls warning
  
  This allows the code to be compiled with the base gcc.

Modified:
  stable/10/sys/dev/drm2/drm_lock.c
  stable/10/sys/dev/drm2/radeon/radeon_acpi.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/drm2/drm_lock.c
==
--- stable/10/sys/dev/drm2/drm_lock.c   Fri Mar  3 11:21:13 2017
(r314592)
+++ stable/10/sys/dev/drm2/drm_lock.c   Fri Mar  3 12:03:50 2017
(r314593)
@@ -38,7 +38,9 @@ __FBSDID("$FreeBSD$");
 
 #include 
 
+#if defined(__linux__)
 static int drm_notifier(void *priv);
+#endif
 
 static int drm_lock_take(struct drm_lock_data *lock_data, unsigned int 
context);
 
@@ -284,6 +286,7 @@ int drm_lock_free(struct drm_lock_data *
return 0;
 }
 
+#if defined(__linux__)
 /**
  * If we get here, it means that the process has called DRM_IOCTL_LOCK
  * without calling DRM_IOCTL_UNLOCK.
@@ -314,6 +317,7 @@ static int drm_notifier(void *priv)
} while (prev != old);
return 0;
 }
+#endif
 
 /**
  * This function returns immediately and takes the hw lock

Modified: stable/10/sys/dev/drm2/radeon/radeon_acpi.c
==
--- stable/10/sys/dev/drm2/radeon/radeon_acpi.c Fri Mar  3 11:21:13 2017
(r314592)
+++ stable/10/sys/dev/drm2/radeon/radeon_acpi.c Fri Mar  3 12:03:50 2017
(r314593)
@@ -32,8 +32,6 @@ __FBSDID("$FreeBSD$");
 
 #define ACPI_AC_CLASS   "ac_adapter"
 
-extern void radeon_pm_acpi_event_handler(struct radeon_device *rdev);
-
 struct atif_verify_interface {
u16 size;   /* structure size in bytes (includes size 
field) */
u16 version;/* version */
___
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: r314592 - head/usr.bin/ctlstat

2017-03-03 Thread Alexander Motin
Author: mav
Date: Fri Mar  3 11:21:13 2017
New Revision: 314592
URL: https://svnweb.freebsd.org/changeset/base/314592

Log:
  Fix JSON output.
  
  MFC after:1 week

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

Modified: head/usr.bin/ctlstat/ctlstat.c
==
--- head/usr.bin/ctlstat/ctlstat.c  Fri Mar  3 10:30:30 2017
(r314591)
+++ head/usr.bin/ctlstat/ctlstat.c  Fri Mar  3 11:21:13 2017
(r314592)
@@ -312,8 +312,8 @@ compute_stats(struct ctl_io_stats *cur_s
  * conducive to programming, however.
  */
 
-#definePRINT_BINTIME(prefix, bt) \
-   printf("%s %jd.%06ju\n", prefix, (intmax_t)(bt).sec, \
+#definePRINT_BINTIME(bt) \
+   printf("%jd.%06ju", (intmax_t)(bt).sec, \
   (uintmax_t)(((bt).frac >> 32) * 100 >> 32))
 static const char *iotypes[] = {"NO IO", "READ", "WRITE"};
 
@@ -335,15 +335,15 @@ ctlstat_dump(struct ctlstat_context *ctx
stats[i].operations[iotype]);
printf("   dmas %ju\n", (uintmax_t)
stats[i].dmas[iotype]);
-   PRINT_BINTIME("   io time", stats[i].time[iotype]);
-   PRINT_BINTIME("   dma time", stats[i].dma_time[iotype]);
+   printf("   io time ");
+   PRINT_BINTIME(stats[i].time[iotype]);
+   printf("\n   dma time ");
+   PRINT_BINTIME(stats[i].dma_time[iotype]);
+   printf("\n");
}
}
 }
 
-#defineJSON_BINTIME(prefix, bt) \
-   printf("\"%s\":%jd.%06ju,", prefix, (intmax_t)(bt).sec, \
-   (uintmax_t)(((bt).frac >> 32) * 100 >> 32))
 static void
 ctlstat_json(struct ctlstat_context *ctx) {
int iotype, i;
@@ -357,14 +357,17 @@ ctlstat_json(struct ctlstat_context *ctx
stats[i].item);
for (iotype = 0; iotype < CTL_STATS_NUM_TYPES; iotype++) {
printf("{\"type\":\"%s\",", iotypes[iotype]);
-   printf("\"bytes\":%ju,", (uintmax_t)stats[
-  i].bytes[iotype]);
-   printf("\"operations\":%ju,", (uintmax_t)stats[
-  i].operations[iotype]);
-   printf("\"dmas\":%ju}", (uintmax_t)
+   printf("\"bytes\":%ju,", (uintmax_t)
+   stats[i].bytes[iotype]);
+   printf("\"operations\":%ju,", (uintmax_t)
+   stats[i].operations[iotype]);
+   printf("\"dmas\":%ju,", (uintmax_t)
stats[i].dmas[iotype]);
-   JSON_BINTIME("io time", stats[i].time[iotype]);
-   JSON_BINTIME("dma time", stats[i].dma_time[iotype]);
+   printf("\"io time\":");
+   PRINT_BINTIME(stats[i].time[iotype]);
+   printf(",\"dma time\":");
+   PRINT_BINTIME(stats[i].dma_time[iotype]);
+   printf("}");
if (iotype < (CTL_STATS_NUM_TYPES - 1))
printf(","); /* continue io array */
}
___
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: r314473 - head

2017-03-03 Thread Alexey Dokuchaev
On Wed, Mar 01, 2017 at 08:29:57AM -0800, Rodney W. Grimes wrote:
> ...
> There are 21 directors in /usr/src, 20 of them documented in README,
> 18 of them documented in hier(7).
> 
> I'll rectifiy this if and when I get my commit bit.

Looks like you've just been punished.  Congratulations! ;-)

./danfe
___
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: r314591 - in stable/11/sys: amd64/amd64 conf i386/i386 modules/mem x86/x86

2017-03-03 Thread Konstantin Belousov
Author: kib
Date: Fri Mar  3 10:30:30 2017
New Revision: 314591
URL: https://svnweb.freebsd.org/changeset/base/314591

Log:
  MFC r313898, r313902, r313903, r313934, r314087, r314252:
  Merge i386 and amd64 mtrr drivers.

Added:
  stable/11/sys/x86/x86/x86_mem.c
 - copied, changed from r313898, head/sys/x86/x86/x86_mem.c
Deleted:
  stable/11/sys/amd64/amd64/amd64_mem.c
  stable/11/sys/i386/i386/i686_mem.c
Modified:
  stable/11/sys/conf/files.amd64
  stable/11/sys/conf/files.i386
  stable/11/sys/modules/mem/Makefile
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/conf/files.amd64
==
--- stable/11/sys/conf/files.amd64  Fri Mar  3 10:17:16 2017
(r314590)
+++ stable/11/sys/conf/files.amd64  Fri Mar  3 10:30:30 2017
(r314591)
@@ -125,7 +125,6 @@ acpi_wakedata.h optionalacpi
\
no-obj no-implicit-rule before-depend   \
clean   "acpi_wakedata.h"
 #
-amd64/amd64/amd64_mem.coptionalmem
 #amd64/amd64/apic_vector.S standard
 amd64/amd64/atomic.c   standard
 amd64/amd64/bios.c standard
@@ -651,6 +650,7 @@ x86/x86/io_apic.c   standard
 x86/x86/legacy.c   standard
 x86/x86/local_apic.c   standard
 x86/x86/mca.c  standard
+x86/x86/x86_mem.c  optionalmem
 x86/x86/mptable.c  optionalmptable
 x86/x86/mptable_pci.c  optionalmptable pci
 x86/x86/mp_x86.c   optionalsmp

Modified: stable/11/sys/conf/files.i386
==
--- stable/11/sys/conf/files.i386   Fri Mar  3 10:17:16 2017
(r314590)
+++ stable/11/sys/conf/files.i386   Fri Mar  3 10:30:30 2017
(r314591)
@@ -486,7 +486,6 @@ i386/i386/elf_machdep.c standard
 i386/i386/exception.s  standard
 i386/i386/gdb_machdep.coptional gdb
 i386/i386/geode.c  optional cpu_geode
-i386/i386/i686_mem.c   optional mem
 i386/i386/in_cksum.c   optional inet | inet6
 i386/i386/initcpu.cstandard
 i386/i386/io.c optional io
@@ -625,6 +624,7 @@ x86/x86/io_apic.c   optional apic
 x86/x86/legacy.c   standard
 x86/x86/local_apic.c   optional apic
 x86/x86/mca.c  standard
+x86/x86/x86_mem.c  optional mem
 x86/x86/mptable.c  optional apic
 x86/x86/mptable_pci.c  optional apic pci
 x86/x86/mp_x86.c   optional smp

Modified: stable/11/sys/modules/mem/Makefile
==
--- stable/11/sys/modules/mem/Makefile  Fri Mar  3 10:17:16 2017
(r314590)
+++ stable/11/sys/modules/mem/Makefile  Fri Mar  3 10:30:30 2017
(r314591)
@@ -3,14 +3,17 @@
 .PATH: ${.CURDIR}/../../dev/mem
 .PATH: ${.CURDIR}/../../${MACHINE}/${MACHINE}
 .PATH: ${.CURDIR}/../../${MACHINE_CPUARCH}/${MACHINE_CPUARCH}
+.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
+.PATH: ${.CURDIR}/../../x86/x86
+.endif
 
 KMOD=  mem
 SRCS=  mem.c memdev.c memutil.c
 .if ${MACHINE_CPUARCH} == "i386"
-SRCS+= i686_mem.c k6_mem.c
+SRCS+= x86_mem.c k6_mem.c
 .endif
 .if ${MACHINE_CPUARCH} == "amd64"
-SRCS+= amd64_mem.c
+SRCS+= x86_mem.c
 .endif
 SRCS+= bus_if.h device_if.h
 

Copied and modified: stable/11/sys/x86/x86/x86_mem.c (from r313898, 
head/sys/x86/x86/x86_mem.c)
==
--- head/sys/x86/x86/x86_mem.c  Fri Feb 17 21:08:32 2017(r313898, copy 
source)
+++ stable/11/sys/x86/x86/x86_mem.c Fri Mar  3 10:30:30 2017
(r314591)
@@ -260,7 +260,7 @@ x86_mrfetch(struct mem_range_softc *sc)
 
/* Compute the range from the mask. Ick. */
mrd->mr_len = (~(msrv & mtrr_physmask) &
-   (mtrr_physmask | 0xfffL)) + 1;
+   (mtrr_physmask | 0xfff)) + 1;
if (!mrvalid(mrd->mr_base, mrd->mr_len))
mrd->mr_flags |= MDF_BOGUS;
 
@@ -303,19 +303,13 @@ x86_mrt2mtrr(int flags, int oldval)
  * Update running CPU(s) MTRRs to match the ranges in the descriptor
  * list.
  *
- * XXX Must be called with interrupts enabled.
+ * Must be called with interrupts enabled.
  */
 static void
 x86_mrstore(struct mem_range_softc *sc)
 {
 
-#ifdef SMP
smp_rendezvous(NULL, x86_mrstoreone, NULL, sc);
-#else
-   disable_intr(); /* disable interrupts */
-   x86_mrstoreone(sc);
-   enable_intr();
-#endif
 }
 
 /*
@@ -644,7 +638,8 @@ x86_mrinit(struct mem_range_softc *sc)
 * Determine the size of the PhysMask and PhysBase fields in
 * the variable range MTRRs.
 */
-   mtrr_physmask = ((1UL <

svn commit: r314590 - stable/10/sys/vm

2017-03-03 Thread Konstantin Belousov
Author: kib
Date: Fri Mar  3 10:17:16 2017
New Revision: 314590
URL: https://svnweb.freebsd.org/changeset/base/314590

Log:
  MFC r314195:
  Properly handle possible underflow in vm_fault_prefault().

Modified:
  stable/10/sys/vm/vm_fault.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/vm/vm_fault.c
==
--- stable/10/sys/vm/vm_fault.c Fri Mar  3 10:02:56 2017(r314589)
+++ stable/10/sys/vm/vm_fault.c Fri Mar  3 10:17:16 2017(r314590)
@@ -1140,11 +1140,12 @@ vm_fault_prefault(const struct faultstat
}
entry = fs->entry;
 
-   starta = addra - backward * PAGE_SIZE;
-   if (starta < entry->start) {
+   if (addra < backward * PAGE_SIZE) {
starta = entry->start;
-   } else if (starta > addra) {
-   starta = 0;
+   } else {
+   starta = addra - backward * PAGE_SIZE;
+   if (starta < entry->start)
+   starta = entry->start;
}
 
/*
___
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: r314589 - stable/11/sys/vm

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

Log:
  MFC r314195:
  Properly handle possible underflow in vm_fault_prefault().

Modified:
  stable/11/sys/vm/vm_fault.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/vm/vm_fault.c
==
--- stable/11/sys/vm/vm_fault.c Fri Mar  3 08:13:45 2017(r314588)
+++ stable/11/sys/vm/vm_fault.c Fri Mar  3 10:02:56 2017(r314589)
@@ -1372,11 +1372,12 @@ vm_fault_prefault(const struct faultstat
 
entry = fs->entry;
 
-   starta = addra - backward * PAGE_SIZE;
-   if (starta < entry->start) {
+   if (addra < backward * PAGE_SIZE) {
starta = entry->start;
-   } else if (starta > addra) {
-   starta = 0;
+   } else {
+   starta = addra - backward * PAGE_SIZE;
+   if (starta < entry->start)
+   starta = entry->start;
}
 
/*
___
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: r314527 - in head: crypto/openssh crypto/openssh/contrib crypto/openssh/contrib/cygwin crypto/openssh/contrib/redhat crypto/openssh/contrib/suse crypto/openssh/openbsd-compat crypto/op

2017-03-03 Thread Dag-Erling Smørgrav
"Ngie Cooper (yaneurabeya)"  writes:
> Allan Jude  writes:
> > Dag-Erling Smørgrav  writes:
> > > Ngie Cooper  writes:
> > > > Yes, I included you on the CR [...]
> > > CR?
> > Code Review (Phabricator)
> Yup — that’s what I meant.

I don't use Phabricator, and I don't consider it a legitimate attempt to
contact me about a patch.

DES
-- 
Dag-Erling Smørgrav - d...@des.no
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

svn commit: r314588 - svnadmin/conf

2017-03-03 Thread Matthew Seaman
Author: matthew (ports committer)
Date: Fri Mar  3 08:13:45 2017
New Revision: 314588
URL: https://svnweb.freebsd.org/changeset/base/314588

Log:
  Restore rgrimes commit bit.  Welcome back!
  
  Rod will be mentored by grehan since it has been some time since he
  was last active.
  
  Approved by:  core

Modified:
  svnadmin/conf/access
  svnadmin/conf/mentors

Modified: svnadmin/conf/access
==
--- svnadmin/conf/accessFri Mar  3 06:31:47 2017(r314587)
+++ svnadmin/conf/accessFri Mar  3 08:13:45 2017(r314588)
@@ -170,6 +170,7 @@ pstef
 qingli
 ray
 remko
+rgrimes
 rmacklem
 roberto
 rodrigc

Modified: svnadmin/conf/mentors
==
--- svnadmin/conf/mentors   Fri Mar  3 06:31:47 2017(r314587)
+++ svnadmin/conf/mentors   Fri Mar  3 08:13:45 2017(r314588)
@@ -27,6 +27,7 @@ mahrens   mckusick
 peterj jhb Co-mentor: grog
 phil   theravenCo-mentor: sjg
 pstef  pfg
+rgrimesgrehan
 slmken Co-mentor: scottl, ambrisko
 stevek sjg
 tsoome allanjude   Co-mentor: imp
___
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: r314585 - head/usr.sbin/syslogd

2017-03-03 Thread Hiroki Sato
"Ngie Cooper (yaneurabeya)"  wrote
  in <1a3f6606-822c-4c80-adfa-48378f0f2...@gmail.com>:

ya> >> How about "...accepts UDP packets sent with any source port" or
ya> >> something?
ya> > 
ya> > Yeah, that’s more accurate.
ya> 
ya> How about this?
ya> -Ngie
ya> 
ya> $ svn diff usr.sbin/syslogd/syslogd.8
ya> Index: usr.sbin/syslogd/syslogd.8
ya> ===
ya> --- usr.sbin/syslogd/syslogd.8  (revision 314585)
ya> +++ usr.sbin/syslogd/syslogd.8  (working copy)
ya> @@ -131,7 +131,7 @@
ya>  .Ar service
ya>  of
ya>  .Ql \&*
ya> -allows packets to be received from any UDP port.
ya> +allows UDP packets to be sent with any source port.
ya>  The default
ya>  .Ar service
ya>  is

 Looks good to me though probably I am not the best person who can
 judge an English expression as good or bad...

-- Hiroki


pgptbGS8_7fUY.pgp
Description: PGP signature