Re: svn commit: r335836 - head/usr.bin/top

2018-07-01 Thread Hiroki Sato
Eitan Adler  wrote
  in :

li> On 1 July 2018 at 10:08, Conrad Meyer  wrote:
li> > Hi Daichi,
li> >
li> >
li> >
li> > I don't think code to decode UTF-8 belongs in top(1).  I don't know
li> > what the goal of this routine is, but I doubt this is the right way to
li> > accomplish it.
li>
li> For the record, I agree. This is why I didn't click "accept" on the
li> revision. I don't fully oppose leaving it in top(1) for now as we work
li> out the API, but long term its the wrong place.
li>
li> https://reviews.freebsd.org/D16058 is the review.

 I strongly object this kind of encoding-specific routine.  Please
 back out it.  The problem is that top(1) does not support multibyte
 encoding in functions for printing, and using C99 wide/multibyte
 character manipulation API such as iswprint(3) is the way to solve
 it.  Doing getenv("LANG") and assuming an encoding based on it is a
 very bad practice to internationalize software.

-- Hiroki


pgpzfTFsLXa5y.pgp
Description: PGP signature


Re: svn commit: r335838 - head

2018-07-01 Thread Eitan Adler
On 1 July 2018 at 03:05, Wolfram Schneider  wrote:

>  #
>  # Require DESTDIR to be set if installing for a different architecture or
> @@ -1412,12 +1418,15 @@ restage reinstall: .MAKE .PHONY
>  .endif
> @echo
> @echo "--"
> -   @echo ">>> Installing everything"
> +   @echo ">>> Installing everything started on `LC_ALL=C date`"

Shouldn't we respect the user preference for locale? Are we using the
date for anything automated?


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


svn commit: r335856 - in head/sys: netinet sys

2018-07-01 Thread Matt Macy
Author: mmacy
Date: Mon Jul  2 05:19:44 2018
New Revision: 335856
URL: https://svnweb.freebsd.org/changeset/base/335856

Log:
  inpcb: don't gratuitously defer frees
  
  Don't defer frees in sysctl handlers. It isn't necessary
  and it just confuses things.
  revert: r333911, r334104, and r334125
  
  Requested by: jtl

Modified:
  head/sys/netinet/ip_divert.c
  head/sys/netinet/raw_ip.c
  head/sys/netinet/tcp_subr.c
  head/sys/netinet/udp_usrreq.c
  head/sys/sys/malloc.h

Modified: head/sys/netinet/ip_divert.c
==
--- head/sys/netinet/ip_divert.cMon Jul  2 01:30:33 2018
(r335855)
+++ head/sys/netinet/ip_divert.cMon Jul  2 05:19:44 2018
(r335856)
@@ -552,7 +552,6 @@ div_detach(struct socket *so)
KASSERT(inp != NULL, ("div_detach: inp == NULL"));
INP_INFO_WLOCK(&V_divcbinfo);
INP_WLOCK(inp);
-   /* XXX defer destruction to epoch_call */
in_pcbdetach(inp);
in_pcbfree(inp);
INP_INFO_WUNLOCK(&V_divcbinfo);
@@ -632,7 +631,6 @@ static int
 div_pcblist(SYSCTL_HANDLER_ARGS)
 {
int error, i, n;
-   struct in_pcblist *il;
struct inpcb *inp, **inp_list;
inp_gen_t gencnt;
struct xinpgen xig;
@@ -672,8 +670,9 @@ div_pcblist(SYSCTL_HANDLER_ARGS)
if (error)
return error;
 
-   il = malloc(sizeof(struct in_pcblist) + n * sizeof(struct inpcb *), 
M_TEMP, M_WAITOK|M_ZERO_INVARIANTS);
-   inp_list = il->il_inp_list;
+   inp_list = malloc(n * sizeof *inp_list, M_TEMP, M_WAITOK);
+   if (inp_list == NULL)
+   return ENOMEM;

INP_INFO_RLOCK(&V_divcbinfo);
for (inp = CK_LIST_FIRST(V_divcbinfo.ipi_listhead), i = 0; inp && i < n;
@@ -702,9 +701,14 @@ div_pcblist(SYSCTL_HANDLER_ARGS)
} else
INP_RUNLOCK(inp);
}
-   il->il_count = n;
-   il->il_pcbinfo = &V_divcbinfo;
-   epoch_call(net_epoch_preempt, &il->il_epoch_ctx, 
in_pcblist_rele_rlocked);
+   INP_INFO_WLOCK(&V_divcbinfo);
+   for (i = 0; i < n; i++) {
+   inp = inp_list[i];
+   INP_RLOCK(inp);
+   if (!in_pcbrele_rlocked(inp))
+   INP_RUNLOCK(inp);
+   }
+   INP_INFO_WUNLOCK(&V_divcbinfo);
 
if (!error) {
/*
@@ -721,6 +725,7 @@ div_pcblist(SYSCTL_HANDLER_ARGS)
INP_INFO_RUNLOCK(&V_divcbinfo);
error = SYSCTL_OUT(req, &xig, sizeof xig);
}
+   free(inp_list, M_TEMP);
return error;
 }
 
@@ -800,7 +805,6 @@ div_modevent(module_t mod, int type, void *unused)
break;
}
ip_divert_ptr = NULL;
-   /* XXX defer to epoch_call ? */
err = pf_proto_unregister(PF_INET, IPPROTO_DIVERT, SOCK_RAW);
INP_INFO_WUNLOCK(&V_divcbinfo);
 #ifndef VIMAGE

Modified: head/sys/netinet/raw_ip.c
==
--- head/sys/netinet/raw_ip.c   Mon Jul  2 01:30:33 2018(r335855)
+++ head/sys/netinet/raw_ip.c   Mon Jul  2 05:19:44 2018(r335856)
@@ -863,7 +863,6 @@ rip_detach(struct socket *so)
ip_rsvp_force_done(so);
if (so == V_ip_rsvpd)
ip_rsvp_done();
-   /* XXX defer to epoch_call */
in_pcbdetach(inp);
in_pcbfree(inp);
INP_INFO_WUNLOCK(&V_ripcbinfo);
@@ -1033,7 +1032,6 @@ static int
 rip_pcblist(SYSCTL_HANDLER_ARGS)
 {
int error, i, n;
-   struct in_pcblist *il;
struct inpcb *inp, **inp_list;
inp_gen_t gencnt;
struct xinpgen xig;
@@ -1068,8 +1066,9 @@ rip_pcblist(SYSCTL_HANDLER_ARGS)
if (error)
return (error);
 
-   il = malloc(sizeof(struct in_pcblist) + n * sizeof(struct inpcb *), 
M_TEMP, M_WAITOK|M_ZERO_INVARIANTS);
-   inp_list = il->il_inp_list;
+   inp_list = malloc(n * sizeof *inp_list, M_TEMP, M_WAITOK);
+   if (inp_list == NULL)
+   return (ENOMEM);
 
INP_INFO_RLOCK(&V_ripcbinfo);
for (inp = CK_LIST_FIRST(V_ripcbinfo.ipi_listhead), i = 0; inp && i < n;
@@ -1098,9 +1097,14 @@ rip_pcblist(SYSCTL_HANDLER_ARGS)
} else
INP_RUNLOCK(inp);
}
-   il->il_count = n;
-   il->il_pcbinfo = &V_ripcbinfo;
-   epoch_call(net_epoch_preempt, &il->il_epoch_ctx, 
in_pcblist_rele_rlocked);
+   INP_INFO_WLOCK(&V_ripcbinfo);
+   for (i = 0; i < n; i++) {
+   inp = inp_list[i];
+   INP_RLOCK(inp);
+   if (!in_pcbrele_rlocked(inp))
+   INP_RUNLOCK(inp);
+   }
+   INP_INFO_WUNLOCK(&V_ripcbinfo);
 
if (!error) {
/*
@@ -1116,6 +1120,7 @@ rip_pcblist(SYSCTL_HANDLER_ARGS)
INP_INFO_RUNLOCK(&V_ripcbinfo);
error = SYSCTL_OUT(req, &xig

svn commit: r335855 - head/sys/arm/broadcom/bcm2835

2018-07-01 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Mon Jul  2 01:30:33 2018
New Revision: 335855
URL: https://svnweb.freebsd.org/changeset/base/335855

Log:
  [rpi] Add support for the second PWM channel
  
  Add support for the second channel to bcm2835_pwm driver. Configurable
  parameters like mode, period, ratio are exposed as sysctls with postfix '2',
  e.g.: dev.pwm.N.mode2, dev.pwm.N.period2, dev.pwm.N.ratio2
  
  Second channel can be enabled in DTB by configuring pwn-2chan overlay
  instead of pwm in config.txt. See [1]
  
  [1] https://github.com/raspberrypi/firmware/blob/master/boot/overlays/README
  
  Submitted by: Bob Frazier
  Differential Revision:https://reviews.freebsd.org/D15769

Modified:
  head/sys/arm/broadcom/bcm2835/bcm2835_pwm.c

Modified: head/sys/arm/broadcom/bcm2835/bcm2835_pwm.c
==
--- head/sys/arm/broadcom/bcm2835/bcm2835_pwm.c Sun Jul  1 22:48:00 2018
(r335854)
+++ head/sys/arm/broadcom/bcm2835/bcm2835_pwm.c Mon Jul  2 01:30:33 2018
(r335855)
@@ -63,11 +63,13 @@ struct bcm_pwm_softc {
 
device_tclkman;
 
-   uint32_tfreq;
-   uint32_tperiod;
+   uint32_tfreq;/* shared between channels 1 and 2 */
+   uint32_tperiod;  /* channel 1 */
uint32_tratio;
uint32_tmode;
-
+   uint32_tperiod2; /* channel 2 */
+   uint32_tratio2;
+   uint32_tmode2;
 };
 
 #define BCM_PWM_MEM_WRITE(_sc, _off, _val) \
@@ -87,11 +89,15 @@ struct bcm_pwm_softc {
 #define R_RNG(_sc) BCM_PWM_MEM_READ(_sc, 0x10)
 #define W_DAT(_sc, _val) BCM_PWM_MEM_WRITE(_sc, 0x14, _val)
 #define R_DAT(_sc) BCM_PWM_MEM_READ(_sc, 0x14)
+#define W_RNG2(_sc, _val) BCM_PWM_MEM_WRITE(_sc, 0x20, _val)
+#define R_RNG2(_sc) BCM_PWM_MEM_READ(_sc, 0x20)
+#define W_DAT2(_sc, _val) BCM_PWM_MEM_WRITE(_sc, 0x24, _val)
+#define R_DAT2(_sc) BCM_PWM_MEM_READ(_sc, 0x24)
 
 static int
 bcm_pwm_reconf(struct bcm_pwm_softc *sc)
 {
-   uint32_t u;
+   uint32_t u, ctlr;
 
/* Disable PWM */
W_CTL(sc, 0);
@@ -99,26 +105,78 @@ bcm_pwm_reconf(struct bcm_pwm_softc *sc)
/* Stop PWM clock */
(void)bcm2835_clkman_set_frequency(sc->clkman, BCM_PWM_CLKSRC, 0);
 
-   if (sc->mode == 0)
-   return (0);
+   ctlr = 0; /* pre-assign zero, enable bits, write to CTL at end */
 
+   if (sc->mode == 0 && sc->mode2 == 0) /* both modes are zero */
+   return 0; /* device is now off - return */
+
+   /* set the PWM clock frequency */
+   /* TODO:  should I only do this if it changes and not stop it first? */
u = bcm2835_clkman_set_frequency(sc->clkman, BCM_PWM_CLKSRC, sc->freq);
if (u == 0)
return (EINVAL);
sc->freq = u;
 
-   /* Config PWM */
-   W_RNG(sc, sc->period);
-   if (sc->ratio > sc->period)
-   sc->ratio = sc->period;
-   W_DAT(sc, sc->ratio);
+   /* control register CTL bits:
+* (from BCM2835 ARM Peripherals manual, section 9.6)
+*
+* 15 MSEN2  chan 2 M/S enable; 0 for PWM algo, 1 for M/S transmission
+* 14 unused; always reads as 0
+* 13 USEF2  chan 2 use FIFO (0 uses data; 1 uses FIFO)
+* 12 POLA2  chan 2 invert polarity (0 normal, 1 inverted polarity)
+* 11 SBIT2  chan 2 'Silence' bit (when not transmitting data)
+* 10 RPTL2  chan 2 FIFO repeat last data (1 repeats, 0 interrupts)
+*  9 MODE2  chan 2 PWM/Serializer mode (0 PWM, 1 Serializer)
+*  8 PWEN2  chan 2 enable (0 disable, 1 enable)
+*  7 MSEN1  chan 1 M/S enable; 0 for PWM algo, 1 for M/S transmission
+*  6 CLRF1  chan 1 clear FIFO (set 1 to clear; always reads as 0)
+*  5 USEF1  chan 1 use FIFO (0 uses data; 1 uses FIFO)
+*  4 POLA1  chan 1 invert polarity (0 normal, 1 inverted polarity)
+*  3 SBIT1  chan 1 'Silence' bit (when not transmitting data)
+*  2 RTPL1  chan 1 FIFO repeat last data (1 repeats, 0 interrupts)
+*  1 MODE1  chan 1 PWM/Serializer mode (0 PWM, 1 Serializer)
+*  0 PWMEN1 chan 1 enable (0 disable, 1 enable)
+*
+* Notes on M/S enable:  when this bit is '1', a simple M/S ratio is 
used. In short,
+* the value of 'ratio' is the number of 'on' bits, and the total 
length of the data is
+* defined by 'period'.  So if 'ratio' is 2500 and 'period' is 1, 
then the output
+* remains 'on' for 2500 clocks, and goes 'off' for the remaining 7500 
clocks.
+* When the M/S enable is '0', a more complicated algorithm effectively 
'dithers' the
+* pulses in order to obtain the desired ratio.  For details, see 
section 9.3 of the
+* BCM2835 ARM Peripherals manual.
+*/
 
-   /* Start PWM */
-   if (sc->mode == 1)
-   W_C

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

2018-07-01 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Sun Jul  1 22:48:00 2018
New Revision: 335854
URL: https://svnweb.freebsd.org/changeset/base/335854

Log:
  [man] Get uhid(4) man page in sync with current API
  
  API documented in previous version of uhid(4) man page has been obsolete
  since May 2009 when old USB stack was replaced with USB2 implentation.
  Current API has the same set of ioctl calls but uses usb_gen_descriptor
  structure to pass data to/from kernel.
  
  MFC after:1 week

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

Modified: head/share/man/man4/uhid.4
==
--- head/share/man/man4/uhid.4  Sun Jul  1 20:52:50 2018(r335853)
+++ head/share/man/man4/uhid.4  Sun Jul  1 22:48:00 2018(r335854)
@@ -29,7 +29,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 24, 2018
+.Dd July 1, 2018
 .Dt UHID 4
 .Os
 .Sh NAME
@@ -61,17 +61,28 @@ calls:
 .Bl -tag -width indent
 .It Dv USB_GET_REPORT_ID Pq Vt int
 Get the report identifier used by this HID report.
-.It Dv USB_GET_REPORT_DESC Pq Vt "struct usb_ctl_report_desc"
+.It Dv USB_GET_REPORT_DESC Pq Vt "struct usb_gen_descriptor"
 Get the HID report descriptor.
+Copies a maximum of
+.Va ugd_maxlen
+bytes of the report descriptor data into the memory
+specified by
+.Va ugd_data .
+Upon return
+.Va ugd_actlen
+is set to the number of bytes copied.
 Using
 this descriptor the exact layout and meaning of data to/from
 the device can be found.
 The report descriptor is delivered
 without any processing.
 .Bd -literal
-struct usb_ctl_report_desc {
-int ucrd_size;
-u_char  ucrd_data[1024];   /* filled data size will vary */
+struct usb_gen_descriptor {
+   void   *ugd_data;
+   uint16_t ugd_maxlen;
+   uint16_t ugd_actlen;
+   uint8_t ugd_report_type;
+   ...
 };
 .Ed
 .It Dv USB_SET_IMMED Pq Vt int
@@ -85,11 +96,18 @@ will only return the data that the device reports on i
 interrupt pipe.
 This call may fail if the device does not support
 this feature.
-.It Dv USB_GET_REPORT Pq Vt "struct usb_ctl_report"
+.It Dv USB_GET_REPORT Pq Vt "struct usb_gen_descriptor"
 Get a report from the device without waiting for data on
 the interrupt pipe.
+Copies a maximum of
+.Va ugd_maxlen
+bytes of the report data into the memory specified by
+.Va ugd_data .
+Upon return
+.Va ugd_actlen
+is set to the number of bytes copied.
 The
-.Va report
+.Va ugd_report_type
 field indicates which report is requested.
 It should be
 .Dv UHID_INPUT_REPORT ,
@@ -97,22 +115,21 @@ It should be
 or
 .Dv UHID_FEATURE_REPORT .
 This call may fail if the device does not support this feature.
-.Bd -literal
-struct usb_ctl_report {
-   int ucr_report;
-   u_char  ucr_data[1024]; /* used data size will vary */
-};
-.Ed
-.It Dv USB_SET_REPORT Pq Vt "struct usb_ctl_report"
+.It Dv USB_SET_REPORT Pq Vt "struct usb_gen_descriptor"
 Set a report in the device.
 The
-.Va report
+.Va ugd_report_type
 field indicates which report is to be set.
 It should be
 .Dv UHID_INPUT_REPORT ,
 .Dv UHID_OUTPUT_REPORT ,
 or
 .Dv UHID_FEATURE_REPORT .
+The value of the report is specified by the
+.Va ugd_data
+and the
+.Va ugd_maxlen
+fields.
 This call may fail if the device does not support this feature.
 .El
 .Pp
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r335852 - head/usr.bin/find

2018-07-01 Thread Eitan Adler
Author: eadler
Date: Sun Jul  1 20:09:56 2018
New Revision: 335852
URL: https://svnweb.freebsd.org/changeset/base/335852

Log:
  find(1): use correct type for readlink

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

Modified: head/usr.bin/find/ls.c
==
--- head/usr.bin/find/ls.c  Sun Jul  1 20:09:52 2018(r335851)
+++ head/usr.bin/find/ls.c  Sun Jul  1 20:09:56 2018(r335852)
@@ -110,7 +110,7 @@ printtime(time_t ftime)
 static void
 printlink(char *name)
 {
-   int lnklen;
+   ssize_t lnklen;
char path[MAXPATHLEN];
 
if ((lnklen = readlink(name, path, MAXPATHLEN - 1)) == -1) {
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r335851 - head/usr.bin/find

2018-07-01 Thread Eitan Adler
Author: eadler
Date: Sun Jul  1 20:09:52 2018
New Revision: 335851
URL: https://svnweb.freebsd.org/changeset/base/335851

Log:
  find(1): deLINTify

Modified:
  head/usr.bin/find/find.c
  head/usr.bin/find/function.c
  head/usr.bin/find/ls.c
  head/usr.bin/find/main.c
  head/usr.bin/find/misc.c
  head/usr.bin/find/operator.c
  head/usr.bin/find/option.c

Modified: head/usr.bin/find/find.c
==
--- head/usr.bin/find/find.cSun Jul  1 19:44:29 2018(r335850)
+++ head/usr.bin/find/find.cSun Jul  1 20:09:52 2018(r335851)
@@ -32,12 +32,10 @@
  * SUCH DAMAGE.
  */
 
-#ifndef lint
 #if 0
 static char sccsid[] = "@(#)find.c 8.5 (Berkeley) 8/5/94";
 #else
 #endif
-#endif /* not lint */
 
 #include 
 __FBSDID("$FreeBSD$");

Modified: head/usr.bin/find/function.c
==
--- head/usr.bin/find/function.cSun Jul  1 19:44:29 2018
(r335850)
+++ head/usr.bin/find/function.cSun Jul  1 20:09:52 2018
(r335851)
@@ -32,11 +32,9 @@
  * SUCH DAMAGE.
  */
 
-#ifndef lint
 #if 0
 static const char sccsid[] = "@(#)function.c   8.10 (Berkeley) 5/4/95";
 #endif
-#endif /* not lint */
 
 #include 
 __FBSDID("$FreeBSD$");

Modified: head/usr.bin/find/ls.c
==
--- head/usr.bin/find/ls.c  Sun Jul  1 19:44:29 2018(r335850)
+++ head/usr.bin/find/ls.c  Sun Jul  1 20:09:52 2018(r335851)
@@ -29,11 +29,9 @@
  * SUCH DAMAGE.
  */
 
-#ifndef lint
 #if 0
 static char sccsid[] = "@(#)ls.c   8.1 (Berkeley) 6/6/93";
 #endif
-#endif /* not lint */
 
 #include 
 __FBSDID("$FreeBSD$");

Modified: head/usr.bin/find/main.c
==
--- head/usr.bin/find/main.cSun Jul  1 19:44:29 2018(r335850)
+++ head/usr.bin/find/main.cSun Jul  1 20:09:52 2018(r335851)
@@ -32,17 +32,13 @@
  * SUCH DAMAGE.
  */
 
-#ifndef lint
 static const char copyright[] =
 "@(#) Copyright (c) 1990, 1993, 1994\n\
The Regents of the University of California.  All rights reserved.\n";
-#endif /* not lint */
 
-#ifndef lint
 #if 0
 static char sccsid[] = "@(#)main.c 8.4 (Berkeley) 5/4/95";
 #endif
-#endif /* not lint */
 
 #include 
 __FBSDID("$FreeBSD$");

Modified: head/usr.bin/find/misc.c
==
--- head/usr.bin/find/misc.cSun Jul  1 19:44:29 2018(r335850)
+++ head/usr.bin/find/misc.cSun Jul  1 20:09:52 2018(r335851)
@@ -32,12 +32,10 @@
  * SUCH DAMAGE.
  */
 
-#ifndef lint
 #if 0
 static char sccsid[] = "@(#)misc.c 8.2 (Berkeley) 4/1/94";
 #else
 #endif
-#endif /* not lint */
 
 #include 
 __FBSDID("$FreeBSD$");

Modified: head/usr.bin/find/operator.c
==
--- head/usr.bin/find/operator.cSun Jul  1 19:44:29 2018
(r335850)
+++ head/usr.bin/find/operator.cSun Jul  1 20:09:52 2018
(r335851)
@@ -32,11 +32,9 @@
  * SUCH DAMAGE.
  */
 
-#ifndef lint
 #if 0
 static char sccsid[] = "@(#)operator.c 8.1 (Berkeley) 6/6/93";
 #endif
-#endif /* not lint */
 
 #include 
 __FBSDID("$FreeBSD$");

Modified: head/usr.bin/find/option.c
==
--- head/usr.bin/find/option.c  Sun Jul  1 19:44:29 2018(r335850)
+++ head/usr.bin/find/option.c  Sun Jul  1 20:09:52 2018(r335851)
@@ -32,11 +32,9 @@
  * SUCH DAMAGE.
  */
 
-#ifndef lint
 /*
 static char sccsid[] = "@(#)option.c   8.2 (Berkeley) 4/16/94";
 */
-#endif /* not lint */
 
 #include 
 __FBSDID("$FreeBSD$");
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r335836 - head/usr.bin/top

2018-07-01 Thread Eitan Adler
On 1 July 2018 at 10:08, Conrad Meyer  wrote:
> Hi Daichi,
>
>
>
> I don't think code to decode UTF-8 belongs in top(1).  I don't know
> what the goal of this routine is, but I doubt this is the right way to
> accomplish it.

For the record, I agree. This is why I didn't click "accept" on the
revision. I don't fully oppose leaving it in top(1) for now as we work
out the API, but long term its the wrong place.

https://reviews.freebsd.org/D16058 is the review.


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


svn commit: r335850 - head/usr.bin/top

2018-07-01 Thread Eitan Adler
Author: eadler
Date: Sun Jul  1 19:44:29 2018
New Revision: 335850
URL: https://svnweb.freebsd.org/changeset/base/335850

Log:
  top(1): permit infinite length for command
  
  There isn't any need to limit the size of the screen. Utilities like
  'less -S' don't have a (meaningful) limit anyways.  This also makes the
  way to dynamically changing the column widths based on the screen width.

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

Modified: head/usr.bin/top/machine.c
==
--- head/usr.bin/top/machine.c  Sun Jul  1 19:44:26 2018(r335849)
+++ head/usr.bin/top/machine.c  Sun Jul  1 19:44:29 2018(r335850)
@@ -59,7 +59,6 @@ static const int namelength = 10;
 /* TOP_JID_LEN based on max of 99 */
 #define TOP_JID_LEN 6
 #define TOP_SWAP_LEN 5
-static int cmdlengthdelta;
 
 /* get_process_info passes back a handle.  This is what it looks like: */
 
@@ -415,7 +414,6 @@ format_header(const char *uname_field)
assert("displaymode must not be set to DISP_MAX");
}
 
-   cmdlengthdelta = sbuf_len(header) - 7;
return sbuf_data(header);
 }
 
@@ -1091,10 +1089,7 @@ format_next_process(struct handle * xhandle, char *(*g
sbuf_printf(procbuf, "%6s ", format_time(cputime));
sbuf_printf(procbuf, "%6.2f%% ", ps.wcpu ? 100.0 * 
weighted_cpu(PCTCPU(pp), pp) : 100.0 * PCTCPU(pp));
}
-   sbuf_printf(procbuf, "%.*s",
-   screen_width > cmdlengthdelta ?
-   screen_width - cmdlengthdelta : 0,
-   printable(cmdbuf));
+   sbuf_printf(procbuf, "%s", printable(cmdbuf));
free(cmdbuf);
return (sbuf_data(procbuf));
 }
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r335849 - head/usr.bin/find

2018-07-01 Thread Eitan Adler
Author: eadler
Date: Sun Jul  1 19:44:26 2018
New Revision: 335849
URL: https://svnweb.freebsd.org/changeset/base/335849

Log:
  find(1): remove portability ifdefs
  
  This code isn't designed to be particularly portable outside of FreeBSD.
  To be more specific it doesn't make much sense to support compiling
  find(1) on VMS.

Modified:
  head/usr.bin/find/getdate.y

Modified: head/usr.bin/find/getdate.y
==
--- head/usr.bin/find/getdate.y Sun Jul  1 18:58:53 2018(r335848)
+++ head/usr.bin/find/getdate.y Sun Jul  1 19:44:26 2018(r335849)
@@ -23,22 +23,11 @@ __FBSDID("$FreeBSD$");
tricks are need, but defaults to using the gettimeofday system call.
Include  if that will be used.  */
 
-#ifdefined(vms)
-# include 
-#else /* defined(vms) */
 # include 
 # include 
-#endif /* !defined(vms) */
 
 #if defined (__STDC__) || defined (USG)
 #include 
-#endif
-
-/* Some old versions of bison generate parsers that use bcopy.
-   That loses on systems that don't provide the function, so we have
-   to redefine it here.  */
-#if !defined (HAVE_BCOPY) && defined (HAVE_MEMCPY) && !defined (bcopy)
-#define bcopy(from, to, len) memcpy ((to), (from), (len))
 #endif
 
 #if defined (__STDC__)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r335848 - in head/lib: libcapsicum libcasper/libcasper

2018-07-01 Thread Mariusz Zaborski
Author: oshogbo
Date: Sun Jul  1 18:58:53 2018
New Revision: 335848
URL: https://svnweb.freebsd.org/changeset/base/335848

Log:
  With r335636 C++ program use libcasper.h and capsicum_helpers.h.
  Add __BEGIN_DECLS and __END_DECLS to those headers.

Modified:
  head/lib/libcapsicum/capsicum_helpers.h
  head/lib/libcasper/libcasper/libcasper.h

Modified: head/lib/libcapsicum/capsicum_helpers.h
==
--- head/lib/libcapsicum/capsicum_helpers.h Sun Jul  1 18:09:16 2018
(r335847)
+++ head/lib/libcapsicum/capsicum_helpers.h Sun Jul  1 18:58:53 2018
(r335848)
@@ -46,6 +46,8 @@
 #defineCAPH_WRITE  0x0004
 #defineCAPH_LOOKUP 0x0008
 
+__BEGIN_DECLS
+
 static __inline int
 caph_limit_stream(int fd, int flags)
 {
@@ -141,5 +143,7 @@ caph_enter_casper(void)
 
return (CASPER_SUPPORT == 0 ? 0 : caph_enter());
 }
+
+__END_DECLS
 
 #endif /* _CAPSICUM_HELPERS_H_ */

Modified: head/lib/libcasper/libcasper/libcasper.h
==
--- head/lib/libcasper/libcasper/libcasper.hSun Jul  1 18:09:16 2018
(r335847)
+++ head/lib/libcasper/libcasper/libcasper.hSun Jul  1 18:58:53 2018
(r335848)
@@ -71,6 +71,8 @@ typedef struct cap_channel cap_channel_t;
 #endif /* ! WITH_CASPER */
 #endif /* ! _CAP_CHANNEL_T_DECLARED */
 
+__BEGIN_DECLS
+
 #ifdef WITH_CASPER
 int cap_channel_flags(const cap_channel_t *chan);
 #else
@@ -278,5 +280,7 @@ cap_xfer_nvlist(const cap_channel_t *chan, nvlist_t *n
return (nvlist_create(channel_nvlist_flags(chan)));
 }
 #endif
+
+__END_DECLS
 
 #endif /* !_LIBCASPER_H_ */
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r335836 - head/usr.bin/top

2018-07-01 Thread Conrad Meyer
On Sun, Jul 1, 2018 at 10:08 AM, Conrad Meyer  wrote:
> (Also, the patch in phabricator does not seem to match what was committed.)

It seems the right phabricator URL is https://reviews.freebsd.org/D16058 .

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


svn commit: r335847 - in head/sys/modules: pflog pfsync

2018-07-01 Thread Kristof Provost
Author: kp
Date: Sun Jul  1 18:09:16 2018
New Revision: 335847
URL: https://svnweb.freebsd.org/changeset/base/335847

Log:
  pflog/pfsync: Fix module build with VIMAGE=yes
  
  pflog and pfsync's module Makefile fails to include opt_global.h to SRCS
  leading to build error for VIMAGE case.
  
  Reproduced with:
  cd /usr/src/sys/modules/pflog && make VIMAGE=yes
  
  PR:   229404
  Submitted by: eugen@
  MFC after:1 week

Modified:
  head/sys/modules/pflog/Makefile
  head/sys/modules/pfsync/Makefile

Modified: head/sys/modules/pflog/Makefile
==
--- head/sys/modules/pflog/Makefile Sun Jul  1 17:51:52 2018
(r335846)
+++ head/sys/modules/pflog/Makefile Sun Jul  1 18:09:16 2018
(r335847)
@@ -4,7 +4,7 @@
 
 KMOD=  pflog
 SRCS=  if_pflog.c \
-   opt_pf.h opt_inet.h opt_inet6.h opt_bpf.h
+   opt_pf.h opt_inet.h opt_inet6.h opt_bpf.h opt_global.h
 SRCS+= bus_if.h device_if.h
 
 .if !defined(KERNBUILDDIR)

Modified: head/sys/modules/pfsync/Makefile
==
--- head/sys/modules/pfsync/MakefileSun Jul  1 17:51:52 2018
(r335846)
+++ head/sys/modules/pfsync/MakefileSun Jul  1 18:09:16 2018
(r335847)
@@ -4,7 +4,7 @@
 
 KMOD=  pfsync
 SRCS=  if_pfsync.c \
-   opt_pf.h opt_inet.h opt_inet6.h
+   opt_pf.h opt_inet.h opt_inet6.h opt_global.h
 SRCS+= bus_if.h device_if.h
 
 .if !defined(KERNBUILDDIR)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r335846 - head/usr.sbin/pnfsdsfile

2018-07-01 Thread Rick Macklem
Author: rmacklem
Date: Sun Jul  1 17:51:52 2018
New Revision: 335846
URL: https://svnweb.freebsd.org/changeset/base/335846

Log:
  Document the new "-m" command line option for pnfsdsfile(8).
  
  This is a content change.

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

Modified: head/usr.sbin/pnfsdsfile/pnfsdsfile.8
==
--- head/usr.sbin/pnfsdsfile/pnfsdsfile.8   Sun Jul  1 17:49:02 2018
(r335845)
+++ head/usr.sbin/pnfsdsfile/pnfsdsfile.8   Sun Jul  1 17:51:52 2018
(r335846)
@@ -23,7 +23,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 11, 2018
+.Dd June 30, 2018
 .Dt PNFSDSFILE 8
 .Os
 .Sh NAME
@@ -37,6 +37,7 @@ extended attribute for them
 .Op Fl qz
 .Op Fl s Ar dshostname
 .Op Fl c Ar old-dshostname,new-dshostname
+.Op Fl m Ar mirror_level
 .Op Fl r Ar dshostname
 .Ar mdsfile
 .Sh DESCRIPTION
@@ -91,6 +92,16 @@ or AF_INET6 address that
 returns for the new-dshostname.
 Changing a DS server's host IP# should be avoided, but this option will
 allow it to be changed, if the change is unavoidable.
+.It Fl m Ar mirror_level
+This option adds entrie(s) to the extended attributes with IP address set
+to 0.0.0.0 to bring the number of entries up to
+.Dq mirror_level .
+It can be used by a system administrator to prepare a file for mirroring
+via the
+.Xr pnfsdscopymr
+command with
+.Fl r
+option.
 .It Fl r Ar dshostname
 This option sets the IP address of the extended attribute entry for the
 .Ar dshostname
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r335845 - head/usr.sbin/pnfsdsfile

2018-07-01 Thread Rick Macklem
Author: rmacklem
Date: Sun Jul  1 17:49:02 2018
New Revision: 335845
URL: https://svnweb.freebsd.org/changeset/base/335845

Log:
  Add a new "-m" option to pnfsdsfile(8) to prepare a file for mirroring.
  
  When pnfsdscopymr(8) is used to create a mirror of a file on a mirrored
  pNFS service, it expects to find an entry in the extended attribute for
  IP address 0.0.0.0.
  This patch adds a "-m" option which can be used to create these entrie(s).
  It also tightens up the checks for use of incompatible command line options.

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

Modified: head/usr.sbin/pnfsdsfile/pnfsdsfile.c
==
--- head/usr.sbin/pnfsdsfile/pnfsdsfile.c   Sun Jul  1 17:28:46 2018
(r335844)
+++ head/usr.sbin/pnfsdsfile/pnfsdsfile.c   Sun Jul  1 17:49:02 2018
(r335845)
@@ -50,6 +50,7 @@ static void usage(void);
 
 static struct option longopts[] = {
{ "changeds",   required_argument,  NULL,   'c' },
+   { "mirror", required_argument,  NULL,   'm' },
{ "quiet",  no_argument,NULL,   'q' },
{ "zerods", required_argument,  NULL,   'r' },
{ "ds", required_argument,  NULL,   's' },
@@ -71,27 +72,27 @@ main(int argc, char *argv[])
struct sockaddr_in6 *sin6, adsin6;
char hostn[2 * NI_MAXHOST + 2], *cp;
struct pnfsdsfile dsfile[NFSDEV_MAXMIRRORS];
-   int ch, dosetxattr, i, mirrorcnt, quiet, zerods, zerofh;
+   int ch, dosetxattr, i, mirrorcnt, mirrorit, quiet, zerods, zerofh;
in_port_t tport;
ssize_t xattrsize, xattrsize2;
 
zerods = 0;
zerofh = 0;
+   mirrorit = 0;
quiet = 0;
dosetxattr = 0;
res = NULL;
newres = NULL;
cp = NULL;
-   while ((ch = getopt_long(argc, argv, "c:qr:s:z", longopts, NULL)) != -1)
-   {
+   while ((ch = getopt_long(argc, argv, "c:m:qr:s:z", longopts, NULL)) !=
+   -1) {
switch (ch) {
case 'c':
/* Replace the first DS server with the second one. */
-   if (zerofh != 0 || zerods != 0)
-   errx(1, "-c, -r and -z are mutually "
-   "exclusive");
-   if (res != NULL)
-   errx(1, "-c and -s are mutually exclusive");
+   if (zerofh != 0 || zerods != 0 || mirrorit != 0 ||
+   newres != NULL || res != NULL)
+   errx(1, "-c, -m, -r, -s and -z are mutually "
+   "exclusive and only can be used once");
strlcpy(hostn, optarg, 2 * NI_MAXHOST + 2);
cp = strchr(hostn, ',');
if (cp == NULL)
@@ -103,31 +104,44 @@ main(int argc, char *argv[])
if (getaddrinfo(cp, NULL, NULL, &newres) != 0)
errx(1, "Can't get IP# for %s", cp);
break;
+   case 'm':
+   /* Add 0.0.0.0 entries up to mirror level. */
+   if (zerofh != 0 || zerods != 0 || mirrorit != 0 ||
+   newres != NULL || res != NULL)
+   errx(1, "-c, -m, -r, -s and -z are mutually "
+   "exclusive and only can be used once");
+   mirrorit = atoi(optarg);
+   if (mirrorit < 2 || mirrorit > NFSDEV_MAXMIRRORS)
+   errx(1, "-m %d out of range", mirrorit);
+   break;
case 'q':
quiet = 1;
break;
case 'r':
/* Reset the DS server in a mirror with 0.0.0.0. */
-   if (zerofh != 0 || res != NULL || newres != NULL)
-   errx(1, "-r and -s, -z or -c are mutually "
-   "exclusive");
+   if (zerofh != 0 || zerods != 0 || mirrorit != 0 ||
+   newres != NULL || res != NULL)
+   errx(1, "-c, -m, -r, -s and -z are mutually "
+   "exclusive and only can be used once");
zerods = 1;
/* Translate the server name to an IP address. */
if (getaddrinfo(optarg, NULL, NULL, &res) != 0)
errx(1, "Can't get IP# for %s", optarg);
break;
case 's':
-   if (res != NULL)
-   errx(1, "-s, -c and -r are mutually "
-   "exclusive");
/* Translate the server name to an IP address. *

svn commit: r335844 - in head: . sys/kern

2018-07-01 Thread Mariusz Zaborski
Author: oshogbo
Date: Sun Jul  1 17:28:46 2018
New Revision: 335844
URL: https://svnweb.freebsd.org/changeset/base/335844

Log:
  core(5): overwrite the oldest core dump
  
  The '%I' format in the kern.corefile sysctl limits the number of
  core files that a process can generate to the number stored in the
  debug.ncores sysctl. The '%I' format is replaced by the single digit
  index. Previously, if all indexes were taken the kernel would overwrite
  only a core file with the highest index in a filename.
  Currently the system will create a new core file if there is a free
  index or if all slots are taken it will overwrite the oldest one.
  
  Reviewed by:  kib(code), bcr (updating)
  Differential Revision:https://reviews.freebsd.org/D15991
  Differential Revision:https://reviews.freebsd.org/D16084

Modified:
  head/UPDATING
  head/sys/kern/kern_sig.c

Modified: head/UPDATING
==
--- head/UPDATING   Sun Jul  1 16:18:38 2018(r335843)
+++ head/UPDATING   Sun Jul  1 17:28:46 2018(r335844)
@@ -31,6 +31,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW:
disable the most expensive debugging functionality run
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
 
+20180701:
+   The '%I' format in the kern.corefile sysctl limits the number of
+   core files that a process can generate to the number stored in the
+   debug.ncores sysctl. The '%I' format is replaced by the single digit
+   index. Previously, if all indexes were taken the kernel would overwrite
+   only a core file with the highest index in a filename.
+   Currently the system will create a new core file if there is a free
+   index or if all slots are taken it will overwrite the oldest one.
 
 20180630:
Clang, llvm, lld, lldb, compiler-rt and libc++ have been upgraded to

Modified: head/sys/kern/kern_sig.c
==
--- head/sys/kern/kern_sig.cSun Jul  1 16:18:38 2018(r335843)
+++ head/sys/kern/kern_sig.cSun Jul  1 17:28:46 2018(r335844)
@@ -3299,7 +3299,89 @@ SYSCTL_PROC(_kern, OID_AUTO, corefile, CTLTYPE_STRING 
 CTLFLAG_MPSAFE, 0, 0, sysctl_kern_corefile, "A",
 "Process corefile name format string");
 
+static void
+vnode_close_locked(struct thread *td, struct vnode *vp)
+{
+
+   VOP_UNLOCK(vp, 0);
+   vn_close(vp, FWRITE, td->td_ucred, td);
+}
+
 /*
+ * If the core format has a %I in it, then we need to check
+ * for existing corefiles before defining a name.
+ * To do this we iterate over 0..num_cores to find a
+ * non-existing core file name to use. If all core files are
+ * already used we choose the oldest one.
+ */
+static int
+corefile_open_last(struct thread *td, char *name, int indexpos,
+struct vnode **vpp)
+{
+   struct vnode *oldvp, *nextvp, *vp;
+   struct vattr vattr;
+   struct nameidata nd;
+   int error, i, flags, oflags, cmode;
+   struct timespec lasttime;
+
+   nextvp = oldvp = NULL;
+   cmode = S_IRUSR | S_IWUSR;
+   oflags = VN_OPEN_NOAUDIT | VN_OPEN_NAMECACHE |
+   (capmode_coredump ? VN_OPEN_NOCAPCHECK : 0);
+
+   for (i = 0; i < num_cores; i++) {
+   flags = O_CREAT | FWRITE | O_NOFOLLOW;
+   name[indexpos] = '0' + i;
+
+   NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, name, td);
+   error = vn_open_cred(&nd, &flags, cmode, oflags, td->td_ucred,
+   NULL);
+   if (error != 0)
+   break;
+
+   vp = nd.ni_vp;
+   NDFREE(&nd, NDF_ONLY_PNBUF);
+   if ((flags & O_CREAT) == O_CREAT) {
+   nextvp = vp;
+   break;
+   }
+
+   error = VOP_GETATTR(vp, &vattr, td->td_ucred);
+   if (error != 0) {
+   vnode_close_locked(td, vp);
+   break;
+   }
+
+   if (oldvp == NULL ||
+   lasttime.tv_sec > vattr.va_mtime.tv_sec ||
+   (lasttime.tv_sec == vattr.va_mtime.tv_sec &&
+   lasttime.tv_nsec >= vattr.va_mtime.tv_nsec)) {
+   if (oldvp != NULL)
+   vnode_close_locked(td, oldvp);
+   oldvp = vp;
+   lasttime = vattr.va_mtime;
+   } else {
+   vnode_close_locked(td, vp);
+   }
+   }
+
+   if (oldvp != NULL) {
+   if (nextvp == NULL)
+   nextvp = oldvp;
+   else
+   vnode_close_locked(td, oldvp);
+   }
+   if (error != 0) {
+   if (nextvp != NU

Re: svn commit: r335836 - head/usr.bin/top

2018-07-01 Thread Conrad Meyer
Hi Daichi,

On Sat, Jun 30, 2018 at 10:32 PM, Daichi GOTO  wrote:
> Author: daichi
> Date: Sun Jul  1 05:32:03 2018
> New Revision: 335836
> URL: https://svnweb.freebsd.org/changeset/base/335836
>
> Log:
>   top(1) - support UTF-8 display
>
> ...
> ==
> --- head/usr.bin/top/display.c  Sun Jul  1 01:56:40 2018(r335835)
> +++ head/usr.bin/top/display.c  Sun Jul  1 05:32:03 2018(r335836)
> @@ -1258,19 +1258,43 @@ line_update(char *old, char *new, int start, int line)
>  char *
>  printable(char str[])
>  {
> -char *ptr;
> -char ch;
> +   char *ptr;
> +   char ch;
>
> -ptr = str;
> -while ((ch = *ptr) != '\0')
> -{
> -   if (!isprint(ch))
> -   {
> -   *ptr = '?';
> +   ptr = str;
> +   if (utf8flag) {
> +   while ((ch = *ptr) != '\0') {
> +   if (0x00 == (0x80 & ch)) {
> +   if (!isprint(ch)) {
> +   *ptr = '?';
> +   }
> +   ++ptr;
> +   } else if (0xC0 == (0xE0 & ch)) {
> +   ++ptr;
> +   if ('\0' != *ptr) ++ptr;
> +   } else if (0xE0 == (0xF0 & ch)) {
> +   ++ptr;
> +   if ('\0' != *ptr) ++ptr;
> +   if ('\0' != *ptr) ++ptr;
> +   } else if (0xF0 == (0xF8 & ch)) {
> +   ++ptr;
> +   if ('\0' != *ptr) ++ptr;
> +   if ('\0' != *ptr) ++ptr;
> +   if ('\0' != *ptr) ++ptr;
> +   } else {
> +   *ptr = '?';
> +   ++ptr;
> +   }
> +   }
> +   } else {
> +   while ((ch = *ptr) != '\0') {
> +   if (!isprint(ch)) {
> +   *ptr = '?';
> +   }
> +   ptr++;
> +   }
> }


I don't think code to decode UTF-8 belongs in top(1).  I don't know
what the goal of this routine is, but I doubt this is the right way to
accomplish it.

For the strvisx portion it seems like support should be rolled into
libc instead.

(Also, the patch in phabricator does not seem to match what was committed.)

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


svn commit: r335843 - head/usr.sbin/portsnap/portsnap

2018-07-01 Thread Edward Tomasz Napierala
Author: trasz
Date: Sun Jul  1 16:18:38 2018
New Revision: 335843
URL: https://svnweb.freebsd.org/changeset/base/335843

Log:
  Add basic examples to portsnap(8).
  
  MFC after:2 weeks

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

Modified: head/usr.sbin/portsnap/portsnap/portsnap.8
==
--- head/usr.sbin/portsnap/portsnap/portsnap.8  Sun Jul  1 16:05:50 2018
(r335842)
+++ head/usr.sbin/portsnap/portsnap/portsnap.8  Sun Jul  1 16:18:38 2018
(r335843)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 1, 2016
+.Dd July 1, 2018
 .Dt PORTSNAP 8
 .Os FreeBSD
 .Sh NAME
@@ -268,6 +268,15 @@ Default location where compressed snapshots are stored
 .It Pa /usr/ports
 Default location where the ports tree is extracted.
 .El
+.Sh EXAMPLES
+Fetch the snapshots and create the
+.Xr ports 7
+tree under
+.Pa /usr/ports :
+.Dl Nm Ar fetch Ar extract
+.Pp
+Update the ports tree:
+.Dl Nm Ar fetch Ar update
 .Sh SEE ALSO
 .Xr fetch 1 ,
 .Xr sha256 1 ,
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r335842 - head/tests/sys/audit

2018-07-01 Thread Alan Somers
Author: asomers
Date: Sun Jul  1 16:05:50 2018
New Revision: 335842
URL: https://svnweb.freebsd.org/changeset/base/335842

Log:
  audit(4): add tests for procctl(2)
  
  Submitted by: aniketp
  MFC after:2 weeks
  Sponsored by: Google, Inc. (GSoC 2018)
  Differential Revision:https://reviews.freebsd.org/D16086

Modified:
  head/tests/sys/audit/process-control.c

Modified: head/tests/sys/audit/process-control.c
==
--- head/tests/sys/audit/process-control.c  Sun Jul  1 15:17:53 2018
(r335841)
+++ head/tests/sys/audit/process-control.c  Sun Jul  1 16:05:50 2018
(r335842)
@@ -29,6 +29,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1423,6 +1424,54 @@ ATF_TC_CLEANUP(ktrace_failure, tc)
 }
 
 
+ATF_TC_WITH_CLEANUP(procctl_success);
+ATF_TC_HEAD(procctl_success, tc)
+{
+   atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful "
+   "procctl(2) call");
+}
+
+ATF_TC_BODY(procctl_success, tc)
+{
+   pid = getpid();
+   snprintf(pcregex, sizeof(pcregex), "procctl.*%d.*return,success", pid);
+
+   struct procctl_reaper_status reapstat;
+   FILE *pipefd = setup(fds, auclass);
+   /* Retrieve information about the reaper of current process (pid) */
+   ATF_REQUIRE_EQ(0, procctl(P_PID, pid, PROC_REAP_STATUS, &reapstat));
+   check_audit(fds, pcregex, pipefd);
+}
+
+ATF_TC_CLEANUP(procctl_success, tc)
+{
+   cleanup();
+}
+
+
+ATF_TC_WITH_CLEANUP(procctl_failure);
+ATF_TC_HEAD(procctl_failure, tc)
+{
+   atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful "
+   "procctl(2) call");
+}
+
+ATF_TC_BODY(procctl_failure, tc)
+{
+   pid = getpid();
+   snprintf(pcregex, sizeof(pcregex), "procctl.*%d.*return,failure", pid);
+
+   FILE *pipefd = setup(fds, auclass);
+   ATF_REQUIRE_EQ(-1, procctl(-1, -1, -1, NULL));
+   check_audit(fds, pcregex, pipefd);
+}
+
+ATF_TC_CLEANUP(procctl_failure, tc)
+{
+   cleanup();
+}
+
+
 ATF_TP_ADD_TCS(tp)
 {
ATF_TP_ADD_TC(tp, fork_success);
@@ -1488,6 +1537,8 @@ ATF_TP_ADD_TCS(tp)
ATF_TP_ADD_TC(tp, ptrace_failure);
ATF_TP_ADD_TC(tp, ktrace_success);
ATF_TP_ADD_TC(tp, ktrace_failure);
+   ATF_TP_ADD_TC(tp, procctl_success);
+   ATF_TP_ADD_TC(tp, procctl_failure);
 
return (atf_no_error());
 }
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


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

2018-07-01 Thread Kristof Provost
Author: kp
Date: Sun Jul  1 15:17:53 2018
New Revision: 335841
URL: https://svnweb.freebsd.org/changeset/base/335841

Log:
  carp: Minor language improvements in the man page
  
  Submitted by: Massimiliano Stucchi 

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

Modified: head/share/man/man4/carp.4
==
--- head/share/man/man4/carp.4  Sun Jul  1 13:50:37 2018(r335840)
+++ head/share/man/man4/carp.4  Sun Jul  1 15:17:53 2018(r335841)
@@ -84,7 +84,7 @@ An arbitrary number of virtual host IDs can be configu
 An arbitrary number of IPv4 or IPv6 addresses can be attached to a particular
 vhid.
 It is important that all hosts participating in a vhid have the same list
-of prefixes configured on the vhid, since all prefixes are included in the
+of prefixes configured on the vhid, since all the prefixes are included in the
 cryptographic checksum supplied in each advertisement.
 Multiple vhids running on one interface participate in master/backup
 elections independently.
@@ -123,10 +123,10 @@ Values above 1 enable logging of bad
 packets.
 The default value is 1.
 .It Va net.inet.carp.demotion
-This value shows current level of CARP demotion.
+This value shows the current level of CARP demotion.
 The value is added to the actual advskew sent in announcements for
 all vhids.
-At normal system operation the demotion factor is zero.
+During normal system operation the demotion factor is zero.
 However, problematic conditions raise its level: when
 .Nm
 experiences problem with sending announcements, when an interface
@@ -300,11 +300,11 @@ To see
 .Nm
 packets decoded in
 .Xr tcpdump 1
-output, one needs to specify
+output, one needs to specify the
 .Fl T Ar carp
 option, otherwise
 .Xr tcpdump 1
-tries to interpret them as VRRP packets:
+will interpret them as VRRP packets:
 .Bd -literal -offset indent
 tcpdump -npi vlan0 -T carp
 .Ed
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r335840 - head

2018-07-01 Thread Bryan Drewery
Author: bdrewery
Date: Sun Jul  1 13:50:37 2018
New Revision: 335840
URL: https://svnweb.freebsd.org/changeset/base/335840

Log:
  Ignore _.universe-toolchain file.
  
  MFC after:3 weeks
  X-MFC-with:   r335711

Modified:
  head/.gitignore

Modified: head/.gitignore
==
--- head/.gitignore Sun Jul  1 13:50:06 2018(r335839)
+++ head/.gitignore Sun Jul  1 13:50:37 2018(r335840)
@@ -1,4 +1,5 @@
 _.tinderbox.*
+_.universe-toolchain
 _.amd64.*
 _.arm.*
 _.arm64.*
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r335839 - head

2018-07-01 Thread Bryan Drewery
Author: bdrewery
Date: Sun Jul  1 13:50:06 2018
New Revision: 335839
URL: https://svnweb.freebsd.org/changeset/base/335839

Log:
  Ignore _.universe-toolchain file.
  
  MFC after:3 weeks
  X-MFC-with:   r335711

Modified:
Directory Properties:
  head/   (props changed)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: head -r335782 (?) broke ci.freebsd.org's FreeBSD-head-amd64-gcc build (lib32 part of build)

2018-07-01 Thread Mark Millard via svn-src-head
My brain finally engaged for showing exactly what files are included
for the gcc builds: the .meta files include that information explicitly
(along with other files that are opened during the operation).

amd64 is as I reported, just one header file from gcc: float.h .

powerpc64 builds Lex/Lexer.cpp without defining __ALTIVEC__ and so
is not including  . Building without __ALTIVEC__ might
be an error itself but would be a workaround for the altivec.h
file name aliasing vs. search-path problem.

The details from the .meta files for the amd64 float.h
failure and the powerpc64 altivec.h issue follow.

For the -r335782+ amd64 context:

E 73559 /bin/sh
R 73559 /etc/libmap.conf
R 73559 /var/run/ld-elf.so.hints
R 73559 /lib/libedit.so.7
R 73559 /lib/libc.so.7
R 73559 /lib/libncursesw.so.8
F 73559 73560
E 73560 /usr/local/bin/x86_64-unknown-freebsd12.0-gcc
R 73560 /etc/libmap.conf
R 73560 /var/run/ld-elf.so.hints
R 73560 /usr/lib/libc++.so.1
R 73560 /lib/libcxxrt.so.1
R 73560 /lib/libm.so.5
R 73560 /lib/libc.so.7
R 73560 /lib/libgcc_s.so.1
F 73560 73561
E 73561 /usr/local/libexec/gcc/x86_64-unknown-freebsd12.0/6.4.0/cc1
R 73561 /etc/libmap.conf
R 73561 /var/run/ld-elf.so.hints
R 73561 /usr/local/lib/libmpc.so.3
R 73561 /usr/local/lib/libmpfr.so.6
R 73561 /usr/local/lib/libgmp.so.10
R 73561 /lib/libz.so.6
R 73561 /usr/lib/libc++.so.1
R 73561 /lib/libcxxrt.so.1
R 73561 /lib/libm.so.5
R 73561 /lib/libc.so.7
R 73561 /lib/libgcc_s.so.1
R 73561 /dev/urandom
R 73561 /usr/src/lib/msun/src/catrigl.c
F 73560 73562
E 73562 /usr/local/bin/x86_64-unknown-freebsd12.0-as
R 73562 /etc/libmap.conf
R 73562 /var/run/ld-elf.so.hints
R 73562 /lib/libc.so.7
R 73562 catrigl.o
W 73562 catrigl.o
R 73561 
/usr/obj/amd64_xtoolchain-gcc/amd64.amd64/usr/src/amd64.amd64/obj-lib32/tmp/usr/include/sys/cdefs.h
R 73561 
/usr/obj/amd64_xtoolchain-gcc/amd64.amd64/usr/src/amd64.amd64/obj-lib32/tmp/usr/include/complex.h
R 73561 /usr/local/lib/gcc/x86_64-unknown-freebsd12.0/6.4.0/include/float.h
R 73561 /usr/src/lib/msun/ld80/invtrig.h
R 73561 /usr/src/lib/libc/include/fpmath.h
R 73561 
/usr/obj/amd64_xtoolchain-gcc/amd64.amd64/usr/src/amd64.amd64/obj-lib32/tmp/usr/include/sys/endian.h
R 73561 
/usr/obj/amd64_xtoolchain-gcc/amd64.amd64/usr/src/amd64.amd64/obj-lib32/tmp/usr/include/sys/_types.h
R 73561 
/usr/obj/amd64_xtoolchain-gcc/amd64.amd64/usr/src/amd64.amd64/obj-lib32/tmp/usr/include/machine/_types.h
R 73561 
/usr/obj/amd64_xtoolchain-gcc/amd64.amd64/usr/src/amd64.amd64/obj-lib32/tmp/usr/include/x86/_types.h
R 73561 
/usr/obj/amd64_xtoolchain-gcc/amd64.amd64/usr/src/amd64.amd64/obj-lib32/tmp/usr/include/machine/_limits.h
R 73561 
/usr/obj/amd64_xtoolchain-gcc/amd64.amd64/usr/src/amd64.amd64/obj-lib32/tmp/usr/include/x86/_limits.h
R 73561 
/usr/obj/amd64_xtoolchain-gcc/amd64.amd64/usr/src/amd64.amd64/obj-lib32/tmp/usr/include/machine/endian.h
R 73561 
/usr/obj/amd64_xtoolchain-gcc/amd64.amd64/usr/src/amd64.amd64/obj-lib32/tmp/usr/include/x86/endian.h
R 73561 /usr/src/lib/libc/i386/_fpmath.h
R 73561 /usr/src/lib/msun/src/math.h
R 73561 
/usr/obj/amd64_xtoolchain-gcc/amd64.amd64/usr/src/amd64.amd64/obj-lib32/tmp/usr/include/machine/_limits.h
R 73561 /usr/src/lib/msun/src/math_private.h
R 73561 
/usr/obj/amd64_xtoolchain-gcc/amd64.amd64/usr/src/amd64.amd64/obj-lib32/tmp/usr/include/sys/types.h
R 73561 
/usr/obj/amd64_xtoolchain-gcc/amd64.amd64/usr/src/amd64.amd64/obj-lib32/tmp/usr/include/machine/endian.h
R 73561 
/usr/obj/amd64_xtoolchain-gcc/amd64.amd64/usr/src/amd64.amd64/obj-lib32/tmp/usr/include/sys/_pthreadtypes.h
R 73561 
/usr/obj/amd64_xtoolchain-gcc/amd64.amd64/usr/src/amd64.amd64/obj-lib32/tmp/usr/include/sys/_stdint.h
R 73561 
/usr/obj/amd64_xtoolchain-gcc/amd64.amd64/usr/src/amd64.amd64/obj-lib32/tmp/usr/include/sys/select.h
R 73561 
/usr/obj/amd64_xtoolchain-gcc/amd64.amd64/usr/src/amd64.amd64/obj-lib32/tmp/usr/include/sys/_sigset.h
R 73561 
/usr/obj/amd64_xtoolchain-gcc/amd64.amd64/usr/src/amd64.amd64/obj-lib32/tmp/usr/include/sys/_timeval.h
R 73561 
/usr/obj/amd64_xtoolchain-gcc/amd64.amd64/usr/src/amd64.amd64/obj-lib32/tmp/usr/include/sys/timespec.h
R 73561 
/usr/obj/amd64_xtoolchain-gcc/amd64.amd64/usr/src/amd64.amd64/obj-lib32/tmp/usr/include/sys/_timespec.h
R 73561 
/usr/obj/amd64_xtoolchain-gcc/amd64.amd64/usr/src/amd64.amd64/obj-lib32/tmp/usr/include/machine/endian.h
R 73561 /usr/src/lib/msun/src/catrigl.c
X 73562 0 0
X 73561 1 0
D 73560 catrigl.o
X 73560 1 0
X 73559 1 0

Note that only one one file (float.h) comes from gcc.
It would have to not be a file of a related set of files
(very independent) for such to be coherent.



As for my pre-existing powerpc64 build under -r335782+: It
did not include altivec.h at all according to its Lex_Lexer.o.meta
file. Apparently __ALTIVEC__ is not defined, as the code for
the #include in Lex/Lexer.cpp is:

#ifdef __SSE2__
#include 
#elif __ALTIVEC__
#include 
#undef bool
#endif


It did open the 3 files with /gcc/ in the path (2 being headers):

/usr/local/libexec/gcc/powerpc64-unknown-freeb

svn commit: r335838 - head

2018-07-01 Thread Wolfram Schneider
Author: wosch
Date: Sun Jul  1 10:05:45 2018
New Revision: 335838
URL: https://svnweb.freebsd.org/changeset/base/335838

Log:
  `make installworld' should display "completed" message if done
  
  PR: 225159
  Reviewed by:bdrewery
  Approved by:cem (mentor)
  Differential Revision:  https://reviews.freebsd.org/D14057

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Sun Jul  1 08:37:07 2018(r335837)
+++ head/Makefile.inc1  Sun Jul  1 10:05:45 2018(r335838)
@@ -1145,7 +1145,13 @@ kernel-toolchain: ${KERNEL_TOOLCHAIN_TGTS} .PHONY
 #
 installcheck: _installcheck_world _installcheck_kernel .PHONY
 _installcheck_world: .PHONY
+   @echo "--"
+   @echo ">>> Install check world"
+   @echo "--"
 _installcheck_kernel: .PHONY
+   @echo "--"
+   @echo ">>> Install check kernel"
+   @echo "--"
 
 #
 # Require DESTDIR to be set if installing for a different architecture or
@@ -1412,12 +1418,15 @@ restage reinstall: .MAKE .PHONY
 .endif
@echo
@echo "--"
-   @echo ">>> Installing everything"
+   @echo ">>> Installing everything started on `LC_ALL=C date`"
@echo "--"
${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install
 .if defined(LIBCOMPAT)
${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install${libcompat}
 .endif
+   @echo "--"
+   @echo ">>> Installing everything completed on `LC_ALL=C date`"
+   @echo "--"
 
 redistribute: .MAKE .PHONY
@echo "--"
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r335837 - in head: share/man/man4 sys/netinet

2018-07-01 Thread Kristof Provost
Author: kp
Date: Sun Jul  1 08:37:07 2018
New Revision: 335837
URL: https://svnweb.freebsd.org/changeset/base/335837

Log:
  carp: Set DSCP value CS7
  
  Update carp to set DSCP value CS7(Network Traffic) in the flowlabel field of
  packets by default. Currently carp only sets TOS_LOWDELAY in IPv4 which was
  deprecated in 1998. This also implements sysctl that can revert carp back to
  it's old behavior if desired.
  
  This will allow implementation of QOS on modern network devices to make sure
  carp packets aren't dropped during interface contention.
  
  Submitted by: Nick Wolff 
  Reviewed by:  kp, mav (earlier version)
  Differential Revision:https://reviews.freebsd.org/D14536

Modified:
  head/share/man/man4/carp.4
  head/sys/netinet/ip.h
  head/sys/netinet/ip6.h
  head/sys/netinet/ip_carp.c

Modified: head/share/man/man4/carp.4
==
--- head/share/man/man4/carp.4  Sun Jul  1 05:32:03 2018(r335836)
+++ head/share/man/man4/carp.4  Sun Jul  1 08:37:07 2018(r335837)
@@ -26,7 +26,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd May 7, 2018
+.Dd July 1, 2018
 .Dt CARP 4
 .Os
 .Sh NAME
@@ -104,6 +104,12 @@ Allow virtual hosts to preempt each other.
 When enabled, a vhid in a backup state would preempt a master that
 is announcing itself with a lower advskew.
 Disabled by default.
+.It Va net.inet.carp.dscp
+DSCP value in carp packet.
+Valid Values are 0 to 63.
+A value of 4 is equivalent to the old standard of TOS LOW_DELAY.
+TOS values were deprecated and replaced by DSCP in 1998.
+The default value is 56 (CS7/Network Control).
 .It Va net.inet.carp.log
 Determines what events relating to
 .Nm

Modified: head/sys/netinet/ip.h
==
--- head/sys/netinet/ip.h   Sun Jul  1 05:32:03 2018(r335836)
+++ head/sys/netinet/ip.h   Sun Jul  1 08:37:07 2018(r335837)
@@ -94,6 +94,11 @@ struct ip {
 #defineIPTOS_PREC_ROUTINE  IPTOS_DSCP_CS0
 
 /*
+ * Offset of Diffserv decimal value to convert it to tos value .
+ */
+#defineIPTOS_DSCP_OFFSET   2
+
+/*
  * Definitions for DiffServ Codepoints as per RFC2474 and RFC5865.
  */
 #defineIPTOS_DSCP_CS0  0x00

Modified: head/sys/netinet/ip6.h
==
--- head/sys/netinet/ip6.h  Sun Jul  1 05:32:03 2018(r335836)
+++ head/sys/netinet/ip6.h  Sun Jul  1 08:37:07 2018(r335837)
@@ -104,6 +104,7 @@ struct ip6_hdr {
 #define IPV6_FLOWLABEL_MASK0x0f00  /* flow label (20 bits) */
 #endif /* LITTLE_ENDIAN */
 #endif
+#define IPV6_FLOWLABEL_LEN 20
 #if 1
 /* ECN bits proposed by Sally Floyd */
 #define IP6TOS_CE  0x01/* congestion experienced */

Modified: head/sys/netinet/ip_carp.c
==
--- head/sys/netinet/ip_carp.c  Sun Jul  1 05:32:03 2018(r335836)
+++ head/sys/netinet/ip_carp.c  Sun Jul  1 08:37:07 2018(r335837)
@@ -190,6 +190,10 @@ static int proto_reg[] = {-1, -1};
 static VNET_DEFINE(int, carp_allow) = 1;
 #defineV_carp_allowVNET(carp_allow)
 
+/* Set DSCP in outgoing CARP packets. */
+static VNET_DEFINE(int, carp_dscp) = 56;
+#defineV_carp_dscp VNET(carp_dscp)
+
 /* Preempt slower nodes. */
 static VNET_DEFINE(int, carp_preempt) = 0;
 #defineV_carp_preempt  VNET(carp_preempt)
@@ -211,12 +215,16 @@ static VNET_DEFINE(int, carp_ifdown_adj) = CARP_MAXSKE
 #defineV_carp_ifdown_adj   VNET(carp_ifdown_adj)
 
 static int carp_allow_sysctl(SYSCTL_HANDLER_ARGS);
+static int carp_dscp_sysctl(SYSCTL_HANDLER_ARGS);
 static int carp_demote_adj_sysctl(SYSCTL_HANDLER_ARGS);
 
 SYSCTL_NODE(_net_inet, IPPROTO_CARP,   carp,   CTLFLAG_RW, 0,  "CARP");
 SYSCTL_PROC(_net_inet_carp, OID_AUTO, allow,
 CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RW, 0, 0, carp_allow_sysctl, "I",
 "Accept incoming CARP packets");
+SYSCTL_PROC(_net_inet_carp, OID_AUTO, dscp,
+CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RW, 0, 0, carp_dscp_sysctl, "I",
+"DSCP value for carp packets");
 SYSCTL_INT(_net_inet_carp, OID_AUTO, preempt, CTLFLAG_VNET | CTLFLAG_RW,
 &VNET_NAME(carp_preempt), 0, "High-priority backup preemption mode");
 SYSCTL_INT(_net_inet_carp, OID_AUTO, log, CTLFLAG_VNET | CTLFLAG_RW,
@@ -933,7 +941,7 @@ carp_send_ad_locked(struct carp_softc *sc)
ip = mtod(m, struct ip *);
ip->ip_v = IPVERSION;
ip->ip_hl = sizeof(*ip) >> 2;
-   ip->ip_tos = IPTOS_LOWDELAY;
+   ip->ip_tos = V_carp_dscp << IPTOS_DSCP_OFFSET;
ip->ip_len = htons(len);
ip->ip_off = htons(IP_DF);
ip->ip_ttl = CARP_DFLTTL;
@@ -983,6 +991,10 @@ carp_send_ad_locked(struct carp_softc *sc)
ip6 = mtod(m, struct ip6_hdr *);

Re: svn commit: r335833 - in head: share/man/man4 sys/net sys/netpfil/pf

2018-07-01 Thread Mark Johnston
On Sun, Jul 01, 2018 at 01:16:03AM +, Will Andrews wrote:
> Author: will
> Date: Sun Jul  1 01:16:03 2018
> New Revision: 335833
> URL: https://svnweb.freebsd.org/changeset/base/335833
> 
> Log:
>   pf: remove unused ioctls.
>   
>   Several ioctls are unused in pf, in the sense that no base utility
>   references them.  Additionally, a cursory review of pf-based ports
>   indicates they're not used elsewhere either.  Some of them have been
>   unused since the original import.  As far as I can tell, they're also
>   unused in OpenBSD.  Finally, removing this code removes the need for
>   future pf work to take them into account.

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


Re: svn commit: r335813 [ broke ci.freebsd.org 's FreeBSD-head-{aarch64,amd64,i386}-build ]

2018-07-01 Thread Dimitry Andric
On 30 Jun 2018, at 15:58, Dimitry Andric  wrote:
> 
> On 30 Jun 2018, at 15:22, Mark Millard  wrote:
>> 
>> https://ci.freebsd.org/job/FreeBSD-head-aarch64-build/8358/consoleText
>> 
>> --- all_subdir_armv8crypto ---
>> /usr/src/sys/crypto/armv8/armv8_crypto_wrap.c:46:10: fatal error: 
>> 'arm_neon.h' file not found
>> #include 
>>^~~~
>> 1 error generated.
>> *** [armv8_crypto_wrap.o] Error code 1
>> 
>> 
>> https://ci.freebsd.org/job/FreeBSD-head-amd64-build/9268/consoleText
>> 
>> --- lib/liblzma__L ---
>> In file included from /usr/src/contrib/xz/src/liblzma/lz/lz_encoder.c:23:
>> /usr/src/contrib/xz/src/liblzma/common/memcmplen.h:19:11: fatal error: 
>> 'immintrin.h' file not found
>> #   include 
>>   ^
>> 1 error generated.
>> *** [lz_encoder.o] Error code 1
> 
> Yeah, sorry about that, working on it now.  I'm awaiting a full build to
> see if there are any other issues.

This should now be fixed with r335819.

-Dimitry



signature.asc
Description: Message signed with OpenPGP


Re: svn commit: r335836 - head/usr.bin/top [broke ci.freebsd.org 's FreeBSD-head-riscv64-build]

2018-07-01 Thread Mark Millard via svn-src-head
https://ci.freebsd.org/job/FreeBSD-head-riscv64-build/9229/consoleText

--- utils.o ---
/usr/local/bin/riscv64-unknown-freebsd11.1-gcc 
--sysroot=/workspace/obj/workspace/src/riscv.riscv64/tmp 
-B/usr/local/riscv64-unknown-freebsd11.1/bin/  -O2 -pipe -march=rv64imafdc 
-mabi=lp64d   -g -MD  -MF.depend.utils.o -MTutils.o -std=gnu99 
-fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W 
-Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith 
-Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter 
-Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls 
-Wold-style-definition -Wno-pointer-sign -Wno-error=address 
-Wno-error=array-bounds -Wno-error=attributes -Wno-error=bool-compare 
-Wno-error=cast-align -Wno-error=clobbered -Wno-error=enum-compare 
-Wno-error=extra -Wno-error=inline -Wno-error=logical-not-parentheses 
-Wno-error=strict-aliasing -Wno-error=uninitialized 
-Wno-error=unused-but-set-variable -Wno-error=unused-function 
-Wno-error=unused-value -Wno-error=misleading-indentation -Wno-erro
 r=nonnull-compare -Wno-error=shift-negative-value 
-Wno-error=tautological-compare -Wno-error=unused-const-variable 
-Wno-error=bool-operation -Wno-error=deprecated -Wno-error=expansion-to-defined 
-Wno-error=format-overflow -Wno-error=format-truncation 
-Wno-error=implicit-fallthrough -Wno-error=int-in-bool-context 
-Wno-error=memset-elt-size -Wno-error=nonnull -Wno-error=pointer-compare 
-Wno-error=stringop-overflow   -Wno-error=discarded-qualifiers 
-Wno-error=incompatible-pointer-types  -c /workspace/src/usr.bin/top/utils.c -o 
utils.o
/workspace/src/usr.bin/top/utils.c: In function 'utf8strvisx':
/workspace/src/usr.bin/top/utils.c:357:10: error: comparison is always true due 
to limited range of data type [-Werror=type-limits]
if (0 <= *src_p && *src_p <= 31) {
  ^~

I'd guess that riscv64 has an unsigned type for *src_p --and that
fairly modern gcc complains where system clang and old gcc 4.2.1
do not complain for the issue.



===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)

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