svn commit: r341006 - head/sys/netgraph

2018-11-26 Thread Eugene Grosbein
Author: eugen
Date: Tue Nov 27 04:05:38 2018
New Revision: 341006
URL: https://svnweb.freebsd.org/changeset/base/341006

Log:
  ng_source(4): correction after the change r340617
  
  tv_usec has "long" type for all architecture in FreeBSD
  and follows __LP64__. However, this is not true for tv_sec
  that has "time_t" type.
  
  Since r320347 that changed time_t from 32 to 64 bit integer
  for 32 bit version of powerpc architecture, we have only single
  i386 architecture having 32 bit time_t type.
  
  Submitted by: jhb
  MFC after:1 week.

Modified:
  head/sys/netgraph/ng_source.c

Modified: head/sys/netgraph/ng_source.c
==
--- head/sys/netgraph/ng_source.c   Tue Nov 27 00:36:35 2018
(r341005)
+++ head/sys/netgraph/ng_source.c   Tue Nov 27 04:05:38 2018
(r341006)
@@ -125,11 +125,14 @@ static intng_source_dup_mod(sc_p, struct 
mbuf *,
 
 /* Parse type for timeval */
 static const struct ng_parse_struct_field ng_source_timeval_type_fields[] = {
-#ifdef __LP64__
+#ifdef __i386__
+   { "tv_sec", &ng_parse_int32_type},
+#else
{ "tv_sec", &ng_parse_int64_type},
+#endif
+#ifdef __LP64__
{ "tv_usec",&ng_parse_int64_type},
 #else
-   { "tv_sec", &ng_parse_int32_type},
{ "tv_usec",&ng_parse_int32_type},
 #endif
{ NULL }
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r340617 - head/sys/netgraph

2018-11-26 Thread Eugene Grosbein
27.11.2018 10:22, Warner Losh пишет:
> 
> 
> On Mon, Nov 26, 2018 at 8:18 PM Eugene Grosbein  > wrote:
> 
> 27.11.2018 7:15, Warner Losh wrote:
> 
> > time_t is 64-bits in FreeBSD for all architectures regardless of 
> __LP64__, except it's 32-bits on i386.
> >
> > Warner
> 
> sys/powerpc/include/_types.h defines time_t being 32 or 64 bit depending 
> on __LP64__
> just like sys/x86/include/_types.h does.
> 
> Does 32-bit PowerPC mode actually exist/is supported?
> 
> 
> typedef __int64_t   __time_t;   /* time()... */
> 
> is what I see, unconditionally. It used to be 32-bit years ago...

In fact, it is 32-bit in stable/11 :-)
It was changed 17 months ago, 
https://svnweb.freebsd.org/base?view=revision&revision=320347
and never merged, so 12.0-RELEASE will be the first release with 64-bit time_t 
for powerpc32.

> 32-bit powerpc is still a thing.

OK


___
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: r340617 - head/sys/netgraph

2018-11-26 Thread Warner Losh
On Mon, Nov 26, 2018 at 8:18 PM Eugene Grosbein  wrote:

> 27.11.2018 7:15, Warner Losh wrote:
>
> > time_t is 64-bits in FreeBSD for all architectures regardless of
> __LP64__, except it's 32-bits on i386.
> >
> > Warner
>
> sys/powerpc/include/_types.h defines time_t being 32 or 64 bit depending
> on __LP64__
> just like sys/x86/include/_types.h does.
>
> Does 32-bit PowerPC mode actually exist/is supported?
>

typedef __int64_t   __time_t;   /* time()... */

is what I see, unconditionally. It used to be 32-bit years ago...

32-bit powerpc is still a thing.

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


Re: svn commit: r340617 - head/sys/netgraph

2018-11-26 Thread Eugene Grosbein
27.11.2018 7:15, Warner Losh wrote:

> time_t is 64-bits in FreeBSD for all architectures regardless of __LP64__, 
> except it's 32-bits on i386. 
> 
> Warner

sys/powerpc/include/_types.h defines time_t being 32 or 64 bit depending on 
__LP64__
just like sys/x86/include/_types.h does.

Does 32-bit PowerPC mode actually exist/is supported?


___
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: r341005 - head/sys/cam

2018-11-26 Thread Warner Losh
Author: imp
Date: Tue Nov 27 00:36:35 2018
New Revision: 341005
URL: https://svnweb.freebsd.org/changeset/base/341005

Log:
  NVME trim clocking
  
  Add the ability to set two goals for trims in the I/O scheduler. The
  first goal is the number of BIO_DELETEs to accumulate
  (kern.cam.XX.U.trim_goal). When non-zero, this many trims will be
  accumulated before we start to transfer them to lower layers. This is
  useful for devices that like to get lots of trims all at once in one
  transaction (not all devices are like this, and some vary by workload).
  
  The second is a number of ticks to defer trims. If you've set a trim
  goal, then kern.cam.XX.U.trim_ticks controls how long the system will
  defer those trims before timing out and sending them anyway. It has no
  effect when trim_goal is 0.
  
  In any event, a BIO_FLUSH will cause all the TRIMs to be released to
  the periph drivers. This may be a minor overloading of what BIO_FLUSH
  is supposed to mean, but it's useful to preserve other ordering
  semantics that users of BIO_FLUSH reply on.
  
  Sponsored by: Netflix, Inc

Modified:
  head/sys/cam/cam_iosched.c
  head/sys/cam/cam_iosched.h

Modified: head/sys/cam/cam_iosched.c
==
--- head/sys/cam/cam_iosched.c  Mon Nov 26 23:09:45 2018(r341004)
+++ head/sys/cam/cam_iosched.c  Tue Nov 27 00:36:35 2018(r341005)
@@ -277,6 +277,10 @@ struct cam_iosched_softc {
/* scheduler flags < 16, user flags >= 16 */
uint32_tflags;
int sort_io_queue;
+   int trim_goal;  /* # of trims to queue before 
sending */
+   int trim_ticks; /* Max ticks to hold trims */
+   int last_trim_tick; /* Last 'tick' time ld a trim */
+   int queued_trims;   /* Number of trims in the queue 
*/
 #ifdef CAM_IOSCHED_DYNAMIC
int read_bias;  /* Read bias setting */
int current_read_bias;  /* Current read bias state */
@@ -751,6 +755,22 @@ cam_iosched_has_io(struct cam_iosched_softc *isc)
 static inline bool
 cam_iosched_has_more_trim(struct cam_iosched_softc *isc)
 {
+
+   /*
+* If we've set a trim_goal, then if we exceed that allow trims
+* to be passed back to the driver. If we've also set a tick timeout
+* allow trims back to the driver. Otherwise, don't allow trims yet.
+*/
+   if (isc->trim_goal > 0) {
+   if (isc->queued_trims >= isc->trim_goal)
+   return true;
+   if (isc->queued_trims > 0 &&
+   isc->trim_ticks > 0 &&
+   ticks - isc->last_trim_tick > isc->trim_ticks)
+   return true;
+   return false;
+   }
+
return !(isc->flags & CAM_IOSCHED_FLAG_TRIM_ACTIVE) &&
bioq_first(&isc->trim_queue);
 }
@@ -1131,14 +1151,21 @@ cam_iosched_fini(struct cam_iosched_softc *isc)
 void cam_iosched_sysctl_init(struct cam_iosched_softc *isc,
 struct sysctl_ctx_list *ctx, struct sysctl_oid *node)
 {
-#ifdef CAM_IOSCHED_DYNAMIC
struct sysctl_oid_list *n;
-#endif
 
-   SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(node),
+   n = SYSCTL_CHILDREN(node);
+   SYSCTL_ADD_INT(ctx, n,
OID_AUTO, "sort_io_queue", CTLFLAG_RW | CTLFLAG_MPSAFE,
&isc->sort_io_queue, 0,
"Sort IO queue to try and optimise disk access patterns");
+   SYSCTL_ADD_INT(ctx, n,
+   OID_AUTO, "trim_goal", CTLFLAG_RW,
+   &isc->trim_goal, 0,
+   "Number of trims to try to accumulate before sending to hardware");
+   SYSCTL_ADD_INT(ctx, n,
+   OID_AUTO, "trim_ticks", CTLFLAG_RW,
+   &isc->trim_goal, 0,
+   "IO Schedul qaunta to hold back trims for when accumulating");
 
 #ifdef CAM_IOSCHED_DYNAMIC
if (!do_dynamic_iosched)
@@ -1193,6 +1220,41 @@ cam_iosched_set_latfcn(struct cam_iosched_softc *isc,
 }
 
 /*
+ * Client drivers can set two parameters. "goal" is the number of BIO_DELETEs
+ * that will be queued up before iosched will "release" the trims to the client
+ * driver to wo with what they will (usually combine as many as possible). If 
we
+ * don't get this many, after trim_ticks we'll submit the I/O anyway with
+ * whatever we have.  We do need an I/O of some kind of to clock the deferred
+ * trims out to disk. Since we will eventually get a write for the super block
+ * or something before we shutdown, the trims will complete. To be safe, when a
+ * BIO_FLUSH is presented to the iosched work queue, we set the ticks time far
+ * enough in the past so we'll present the BIO_DELETEs to the client driver.
+ * There might be a race if no BIO_DELETESs were queued, a BIO_FLUSH comes in
+ * and then a BIO_DELETE is sent down. No know client does this, and there's
+ * already a rac

Re: svn commit: r340617 - head/sys/netgraph

2018-11-26 Thread Eugene Grosbein
27.11.2018 7:15, Warner Losh wrote:

> I'm not sure I get it right: do you mean there is a difference for some 
> platform we have?
> 
> time_t is 64-bits in FreeBSD for all architectures regardless of __LP64__, 
> except it's 32-bits on i386. 

Now I've got it :-) thanks.


___
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: r340617 - head/sys/netgraph

2018-11-26 Thread Warner Losh
On Mon, Nov 26, 2018 at 4:29 PM Eugene Grosbein  wrote:

> 27.11.2018 4:26, John Baldwin wrote:
>
> >>  /* Parse type for timeval */
> >>  static const struct ng_parse_struct_field
> ng_source_timeval_type_fields[] = {
> >> +#ifdef __LP64__
> >> +{ "tv_sec", &ng_parse_int64_type},
> >> +{ "tv_usec",&ng_parse_int64_type},
> >> +#else
> >>  { "tv_sec", &ng_parse_int32_type},
> >>  { "tv_usec",&ng_parse_int32_type},
> >> +#endif
> >>  { NULL }
> >
> > time_t (and thus tv_sec) is 64 bits on all but i386 now.  tv_usec is
> still a
> > long, so follows LP64 though.  If this is trying to match an actual
> struct
> > timeval then you might want something like this:
> >
> > #ifdef __i386__
> > { "tv_sec", &ng_parse_int32_type },
> > #else
> > { "tv_sec", &ng_parse_int64_type },
> > #endif
> > #ifdef __LP64__
> > { "tv_usec",&ng_parse_int32_type },
> > #else
> > { "tv_usec",&ng_parse_int64_type },
> > #endif
>
> I'm not sure I get it right: do you mean there is a difference for some
> platform we have?
>

time_t is 64-bits in FreeBSD for all architectures regardless of __LP64__,
except it's 32-bits on i386.

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


Re: svn commit: r340617 - head/sys/netgraph

2018-11-26 Thread Ian Lepore
On Tue, 2018-11-27 at 06:45 +0700, Eugene Grosbein wrote:
> 27.11.2018 6:35, Ian Lepore wrote:
> 
> > 
> > > 
> > > > 
> > > > #ifdef __LP64__
> > > > { "tv_usec",&ng_parse_int32_type },
> > > > #else
> > > > { "tv_usec",&ng_parse_int64_type },
> > > > #endif
> > > I'm not sure I get it right: do you mean there is a difference
> > > for
> > > some platform we have?
> > I think there's a typo there... it makes more sense if the second
> > test
> > is #ifndef __LP64__ (or swap the 32 and 64 in the true/false legs
> > of
> > the test as shown).
> That was obvious typo :-) and my question was not about it.
> 

Hrm, then what is your question? It seems like the suggested code is
self-explanatory with the typo corrected.

-- Ian
___
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: r340617 - head/sys/netgraph

2018-11-26 Thread Eugene Grosbein
27.11.2018 6:35, Ian Lepore wrote:

>>> #ifdef __LP64__
>>> { "tv_usec",&ng_parse_int32_type },
>>> #else
>>> { "tv_usec",&ng_parse_int64_type },
>>> #endif
>> I'm not sure I get it right: do you mean there is a difference for
>> some platform we have?
> 
> I think there's a typo there... it makes more sense if the second test
> is #ifndef __LP64__ (or swap the 32 and 64 in the true/false legs of
> the test as shown).

That was obvious typo :-) and my question was not about it.


___
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: r340617 - head/sys/netgraph

2018-11-26 Thread Ian Lepore
On Tue, 2018-11-27 at 06:29 +0700, Eugene Grosbein wrote:
> 27.11.2018 4:26, John Baldwin wrote:
> 
> > 
> > > 
> > >  /* Parse type for timeval */
> > >  static const struct ng_parse_struct_field
> > > ng_source_timeval_type_fields[] = {
> > > +#ifdef __LP64__
> > > + { "tv_sec", &ng_parse_int64_type}
> > > ,
> > > + { "tv_usec",&ng_parse_int64_type
> > > },
> > > +#else
> > >   { "tv_sec", &ng_parse_int32_type}
> > > ,
> > >   { "tv_usec",&ng_parse_int32_type
> > > },
> > > +#endif
> > >   { NULL }
> > time_t (and thus tv_sec) is 64 bits on all but i386 now.  tv_usec
> > is still a
> > long, so follows LP64 though.  If this is trying to match an actual
> > struct
> > timeval then you might want something like this:
> > 
> > #ifdef __i386__
> > { "tv_sec", &ng_parse_int32_type },
> > #else
> > { "tv_sec", &ng_parse_int64_type },
> > #endif
> > #ifdef __LP64__
> > { "tv_usec",&ng_parse_int32_type },
> > #else
> > { "tv_usec",&ng_parse_int64_type },
> > #endif
> I'm not sure I get it right: do you mean there is a difference for
> some platform we have?

I think there's a typo there... it makes more sense if the second test
is #ifndef __LP64__ (or swap the 32 and 64 in the true/false legs of
the test as shown).

-- Ian
___
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: r340617 - head/sys/netgraph

2018-11-26 Thread Eugene Grosbein
27.11.2018 4:26, John Baldwin wrote:

>>  /* Parse type for timeval */
>>  static const struct ng_parse_struct_field ng_source_timeval_type_fields[] = 
>> {
>> +#ifdef __LP64__
>> +{ "tv_sec", &ng_parse_int64_type},
>> +{ "tv_usec",&ng_parse_int64_type},
>> +#else
>>  { "tv_sec", &ng_parse_int32_type},
>>  { "tv_usec",&ng_parse_int32_type},
>> +#endif
>>  { NULL }
> 
> time_t (and thus tv_sec) is 64 bits on all but i386 now.  tv_usec is still a
> long, so follows LP64 though.  If this is trying to match an actual struct
> timeval then you might want something like this:
> 
> #ifdef __i386__
> { "tv_sec", &ng_parse_int32_type },
> #else
> { "tv_sec", &ng_parse_int64_type },
> #endif
> #ifdef __LP64__
> { "tv_usec",&ng_parse_int32_type },
> #else
> { "tv_usec",&ng_parse_int64_type },
> #endif

I'm not sure I get it right: do you mean there is a difference for some 
platform we have?


___
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: r341004 - head/lib/libufs

2018-11-26 Thread Kirk McKusick
Author: mckusick
Date: Mon Nov 26 23:09:45 2018
New Revision: 341004
URL: https://svnweb.freebsd.org/changeset/base/341004

Log:
  Bring up to date with recently added functions berase(3), getinode(3),
  putinode(3), sbget(3), and sbput(3).
  
  Sponsored by: Netflix

Modified:
  head/lib/libufs/libufs.3

Modified: head/lib/libufs/libufs.3
==
--- head/lib/libufs/libufs.3Mon Nov 26 22:50:30 2018(r341003)
+++ head/lib/libufs/libufs.3Mon Nov 26 23:09:45 2018(r341004)
@@ -7,7 +7,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd January 19, 2018
+.Dd November 26, 2018
 .Dt LIBUFS 3
 .Os
 .Sh NAME
@@ -53,6 +53,7 @@ field of
 .Vt "struct uufsd"
 to a string describing the error.
 .Sh SEE ALSO
+.Xr berase 3 ,
 .Xr bread 3 ,
 .Xr bwrite 3 ,
 .Xr cgget 3 ,
@@ -61,6 +62,10 @@ to a string describing the error.
 .Xr cgread1 3 ,
 .Xr cgwrite 3 ,
 .Xr cgwrite1 3 ,
+.Xr getinode 3 ,
+.Xr putinode 3 ,
+.Xr sbget 3 ,
+.Xr sbput 3 ,
 .Xr sbread 3 ,
 .Xr sbwrite 3 ,
 .Xr ufs_disk_close 3 ,
___
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: r341003 - head/sys/cam

2018-11-26 Thread Warner Losh
Author: imp
Date: Mon Nov 26 22:50:30 2018
New Revision: 341003
URL: https://svnweb.freebsd.org/changeset/base/341003

Log:
  Minor tweaks to the formatting
  
  Tweak the format of the trim + read bias code. Add similar debug to
  the read + writes case.
  
  Spondored by: Netflix

Modified:
  head/sys/cam/cam_iosched.c

Modified: head/sys/cam/cam_iosched.c
==
--- head/sys/cam/cam_iosched.c  Mon Nov 26 22:45:58 2018(r341002)
+++ head/sys/cam/cam_iosched.c  Mon Nov 26 22:50:30 2018(r341003)
@@ -1240,7 +1240,7 @@ cam_iosched_get_write(struct cam_iosched_softc *isc)
"Reads present and current_read_bias is %d queued "
"writes %d queued reads %d\n",
isc->current_read_bias, isc->write_stats.queued,
-   isc->read_stats.queued);
+   isc->read_stats.queued);
isc->current_read_bias--;
/* We're not limiting writes, per se, just doing reads first */
return NULL;
@@ -1326,14 +1326,18 @@ cam_iosched_get_trim(struct cam_iosched_softc *isc)
if (!cam_iosched_has_more_trim(isc))
return NULL;
 #ifdef CAM_IOSCHED_DYNAMIC
+   /*
+* If pending read, prefer that based on current read bias setting. The
+* read bias is shared for both writes and TRIMs, but on TRIMs the bias
+* is for a combined TRIM not a single TRIM request that's come in.
+*/
if (do_dynamic_iosched) {
-   /*
-* If pending read, prefer that based on current read bias
-* setting. The read bias is shared for both writes and
-* TRIMs, but on TRIMs the bias is for a combined TRIM
-* not a single TRIM request that's come in.
-*/
if (bioq_first(&isc->bio_queue) && isc->current_read_bias) {
+   if (iosched_debug)
+   printf("Reads present and current_read_bias is 
%d"
+   " queued trims %d queued reads %d\n",
+   isc->current_read_bias, 
isc->trim_stats.queued,
+   isc->read_stats.queued);
isc->current_read_bias--;
/* We're not limiting TRIMS, per se, just doing reads 
first */
return NULL;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r341002 - head/sys/conf

2018-11-26 Thread Mark Murray
Author: markm
Date: Mon Nov 26 22:45:58 2018
New Revision: 341002
URL: https://svnweb.freebsd.org/changeset/base/341002

Log:
  Add dependency to allow if_muge device to be only ethernet device in 
stripped-down RPI3 kernel.

Modified:
  head/sys/conf/files

Modified: head/sys/conf/files
==
--- head/sys/conf/files Mon Nov 26 22:42:52 2018(r341001)
+++ head/sys/conf/files Mon Nov 26 22:45:58 2018(r341002)
@@ -3282,7 +3282,7 @@ dev/usb/net/if_urndis.c   optional urndis
 dev/usb/net/ruephy.c   optional rue
 dev/usb/net/usb_ethernet.c optional uether | aue | axe | axge | cdce | \
 cue | ipheth | kue | mos | rue | \
-smsc | udav | ure | urndis
+smsc | udav | ure | urndis | muge
 dev/usb/net/uhso.c optional uhso
 #
 # USB WLAN drivers
___
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: r341001 - head/sys/dev/cxgbe/cxgbei

2018-11-26 Thread Mark Johnston
Author: markj
Date: Mon Nov 26 22:42:52 2018
New Revision: 341001
URL: https://svnweb.freebsd.org/changeset/base/341001

Log:
  Check for an allocation failure before dereferencing the pointer.
  
  Reported by:  Ilja Van Sprundel 
  Reviewed by:  np
  MFC after:1 week
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D18310

Modified:
  head/sys/dev/cxgbe/cxgbei/cxgbei.c

Modified: head/sys/dev/cxgbe/cxgbei/cxgbei.c
==
--- head/sys/dev/cxgbe/cxgbei/cxgbei.c  Mon Nov 26 22:21:40 2018
(r341000)
+++ head/sys/dev/cxgbe/cxgbei/cxgbei.c  Mon Nov 26 22:42:52 2018
(r341001)
@@ -449,9 +449,9 @@ do_rx_iscsi_ddp(struct sge_iq *iq, const struct rss_he
struct icl_pdu *ip0;
 
ip0 = icl_cxgbei_new_pdu(M_NOWAIT);
-   icl_cxgbei_new_pdu_set_conn(ip0, ic);
if (ip0 == NULL)
CXGBE_UNIMPLEMENTED("PDU allocation failure");
+   icl_cxgbei_new_pdu_set_conn(ip0, ic);
icp0 = ip_to_icp(ip0);
icp0->icp_seq = 0; /* XXX */
icp0->icp_flags = ICPF_RX_HDR | ICPF_RX_STATUS;
___
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: r340997 - head/lib/libarchive

2018-11-26 Thread Martin Matuska
Author: mm
Date: Mon Nov 26 21:45:27 2018
New Revision: 340997
URL: https://svnweb.freebsd.org/changeset/base/340997

Log:
  libarchive configuration changes
  - move HAVE_BZLIB_H, HAVE_LIBLZMA and HAVE_LZMA_H to config_freebsd.h
  - activate support for multi-threaded lzma encoding [1]
  
  PR:   233543 [1]
  Reported by:  cem
  MFC after:1 week

Modified:
  head/lib/libarchive/Makefile
  head/lib/libarchive/config_freebsd.h

Modified: head/lib/libarchive/Makefile
==
--- head/lib/libarchive/MakefileMon Nov 26 20:56:05 2018
(r340996)
+++ head/lib/libarchive/MakefileMon Nov 26 21:45:27 2018
(r340997)
@@ -7,7 +7,6 @@ _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive
 LIB=   archive
 
 LIBADD=z bz2 lzma bsdxml
-CFLAGS+= -DHAVE_BZLIB_H=1 -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1
 
 # FreeBSD SHLIB_MAJOR value is managed as part of the FreeBSD system.
 # It has no real relation to the libarchive version number.

Modified: head/lib/libarchive/config_freebsd.h
==
--- head/lib/libarchive/config_freebsd.hMon Nov 26 20:56:05 2018
(r340996)
+++ head/lib/libarchive/config_freebsd.hMon Nov 26 21:45:27 2018
(r340997)
@@ -133,14 +133,17 @@
 #define HAVE_LCHFLAGS 1
 #define HAVE_LCHMOD 1
 #define HAVE_LCHOWN 1
+#define HAVE_LIBLZMA 1
 #define HAVE_LIBZ 1
 #define HAVE_LIMITS_H 1
 #define HAVE_LINK 1
+#define HAVE_LZMA_H 1
 #define HAVE_LOCALE_H 1
 #define HAVE_LOCALTIME_R 1
 #define HAVE_LONG_LONG_INT 1
 #define HAVE_LSTAT 1
 #define HAVE_LUTIMES 1
+#define HAVE_LZMA_STREAM_ENCODER_MT 1
 #define HAVE_MBRTOWC 1
 #define HAVE_MEMMOVE 1
 #define HAVE_MEMORY_H 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"


Re: svn commit: r340617 - head/sys/netgraph

2018-11-26 Thread John Baldwin
On 11/18/18 11:27 PM, Eugene Grosbein wrote:
> Author: eugen
> Date: Mon Nov 19 07:27:50 2018
> New Revision: 340617
> URL: https://svnweb.freebsd.org/changeset/base/340617
> 
> Log:
>   Unbreak ng_source(4) for 64-bit platforms including amd64.
> 
> Modified:
>   head/sys/netgraph/ng_source.c
> 
> Modified: head/sys/netgraph/ng_source.c
> ==
> --- head/sys/netgraph/ng_source.c Mon Nov 19 06:52:20 2018
> (r340616)
> +++ head/sys/netgraph/ng_source.c Mon Nov 19 07:27:50 2018
> (r340617)
> @@ -125,8 +125,13 @@ static int   ng_source_dup_mod(sc_p, struct 
> mbuf *,
>  
>  /* Parse type for timeval */
>  static const struct ng_parse_struct_field ng_source_timeval_type_fields[] = {
> +#ifdef __LP64__
> + { "tv_sec", &ng_parse_int64_type},
> + { "tv_usec",&ng_parse_int64_type},
> +#else
>   { "tv_sec", &ng_parse_int32_type},
>   { "tv_usec",&ng_parse_int32_type},
> +#endif
>   { NULL }

time_t (and thus tv_sec) is 64 bits on all but i386 now.  tv_usec is still a
long, so follows LP64 though.  If this is trying to match an actual struct
timeval then you might want something like this:

#ifdef __i386__
{ "tv_sec", &ng_parse_int32_type },
#else
{ "tv_sec", &ng_parse_int64_type },
#endif
#ifdef __LP64__
{ "tv_usec",&ng_parse_int32_type },
#else
{ "tv_usec",&ng_parse_int64_type },
#endif

-- 
John Baldwin


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


svn commit: r340996 - in head/sys: amd64/amd64 amd64/ia32 i386/i386 kern

2018-11-26 Thread Eric van Gyzen
Author: vangyzen
Date: Mon Nov 26 20:56:05 2018
New Revision: 340996
URL: https://svnweb.freebsd.org/changeset/base/340996

Log:
  Remove superfluous bzero in getcontext/swapcontext/sendsig
  
  We zero the whole structure; we don't need to zero the __spare__ field again.
  
  Remove trailing whitespace.
  
  MFC after:2 weeks
  Sponsored by: Dell EMC Isilon

Modified:
  head/sys/amd64/amd64/machdep.c
  head/sys/amd64/ia32/ia32_signal.c
  head/sys/i386/i386/machdep.c
  head/sys/kern/kern_context.c

Modified: head/sys/amd64/amd64/machdep.c
==
--- head/sys/amd64/amd64/machdep.c  Mon Nov 26 20:52:53 2018
(r340995)
+++ head/sys/amd64/amd64/machdep.c  Mon Nov 26 20:56:05 2018
(r340996)
@@ -392,7 +392,6 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask
sf.sf_uc.uc_mcontext.mc_gsbase = pcb->pcb_gsbase;
bzero(sf.sf_uc.uc_mcontext.mc_spare,
sizeof(sf.sf_uc.uc_mcontext.mc_spare));
-   bzero(sf.sf_uc.__spare__, sizeof(sf.sf_uc.__spare__));
 
/* Allocate space for the signal handler context. */
if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack &&

Modified: head/sys/amd64/ia32/ia32_signal.c
==
--- head/sys/amd64/ia32/ia32_signal.c   Mon Nov 26 20:52:53 2018
(r340995)
+++ head/sys/amd64/ia32/ia32_signal.c   Mon Nov 26 20:56:05 2018
(r340996)
@@ -266,7 +266,6 @@ freebsd32_getcontext(struct thread *td, struct freebsd
PROC_LOCK(td->td_proc);
uc.uc_sigmask = td->td_sigmask;
PROC_UNLOCK(td->td_proc);
-   bzero(&uc.__spare__, sizeof(uc.__spare__));
ret = copyout(&uc, uap->ucp, UC_COPY_SIZE);
}
return (ret);
@@ -276,7 +275,7 @@ int
 freebsd32_setcontext(struct thread *td, struct freebsd32_setcontext_args *uap)
 {
struct ia32_ucontext uc;
-   int ret;
+   int ret;
 
if (uap->ucp == NULL)
ret = EINVAL;
@@ -297,7 +296,7 @@ int
 freebsd32_swapcontext(struct thread *td, struct freebsd32_swapcontext_args 
*uap)
 {
struct ia32_ucontext uc;
-   int ret;
+   int ret;
 
if (uap->oucp == NULL || uap->ucp == NULL)
ret = EINVAL;
@@ -622,7 +621,6 @@ ia32_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t 
fpstate_drop(td);
sf.sf_uc.uc_mcontext.mc_fsbase = td->td_pcb->pcb_fsbase;
sf.sf_uc.uc_mcontext.mc_gsbase = td->td_pcb->pcb_gsbase;
-   bzero(sf.sf_uc.__spare__, sizeof(sf.sf_uc.__spare__));
 
/* Allocate space for the signal handler context. */
if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack &&

Modified: head/sys/i386/i386/machdep.c
==
--- head/sys/i386/i386/machdep.cMon Nov 26 20:52:53 2018
(r340995)
+++ head/sys/i386/i386/machdep.cMon Nov 26 20:56:05 2018
(r340996)
@@ -645,7 +645,6 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask
sdp->sd_lobase;
bzero(sf.sf_uc.uc_mcontext.mc_spare2,
sizeof(sf.sf_uc.uc_mcontext.mc_spare2));
-   bzero(sf.sf_uc.__spare__, sizeof(sf.sf_uc.__spare__));
 
/* Allocate space for the signal handler context. */
if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack &&

Modified: head/sys/kern/kern_context.c
==
--- head/sys/kern/kern_context.cMon Nov 26 20:52:53 2018
(r340995)
+++ head/sys/kern/kern_context.cMon Nov 26 20:56:05 2018
(r340996)
@@ -75,7 +75,6 @@ sys_getcontext(struct thread *td, struct getcontext_ar
PROC_LOCK(td->td_proc);
uc.uc_sigmask = td->td_sigmask;
PROC_UNLOCK(td->td_proc);
-   bzero(uc.__spare__, sizeof(uc.__spare__));
ret = copyout(&uc, uap->ucp, UC_COPY_SIZE);
}
return (ret);
@@ -85,7 +84,7 @@ int
 sys_setcontext(struct thread *td, struct setcontext_args *uap)
 {
ucontext_t uc;
-   int ret;
+   int ret;
 
if (uap->ucp == NULL)
ret = EINVAL;
@@ -106,14 +105,13 @@ int
 sys_swapcontext(struct thread *td, struct swapcontext_args *uap)
 {
ucontext_t uc;
-   int ret;
+   int ret;
 
if (uap->oucp == NULL || uap->ucp == NULL)
ret = EINVAL;
else {
bzero(&uc, sizeof(ucontext_t));
get_mcontext(td, &uc.uc_mcontext, GET_MC_CLEAR_RET);
-   bzero(uc.__spare__, sizeof(uc.__spare__));
PROC_LOCK(td->td_proc);
uc.uc_sigmask = td->td_sigmask;
PROC_UNLOCK(td->td_proc);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.o

svn commit: r340995 - in head/sys: arm/arm arm64/arm64 riscv/riscv

2018-11-26 Thread Eric van Gyzen
Author: vangyzen
Date: Mon Nov 26 20:52:53 2018
New Revision: 340995
URL: https://svnweb.freebsd.org/changeset/base/340995

Log:
  Prevent kernel stack disclosure in signal delivery
  
  On arm64 and riscv platforms, sendsig() failed to zero the signal
  frame before copying it out to userspace.  Zero it.
  
  On arm, I believe all the contents of the frame were initialized,
  so there was no disclosure.  However, explicitly zero the whole frame
  because that fact could inadvertently change in the future,
  it's more clear to the reader, and I could be wrong in the first place.
  
  MFC after:2 days
  Security: similar to FreeBSD-EN-18:12.mem and CVE-2018-17155
  Sponsored by: Dell EMC Isilon

Modified:
  head/sys/arm/arm/machdep.c
  head/sys/arm64/arm64/machdep.c
  head/sys/riscv/riscv/machdep.c

Modified: head/sys/arm/arm/machdep.c
==
--- head/sys/arm/arm/machdep.c  Mon Nov 26 20:50:55 2018(r340994)
+++ head/sys/arm/arm/machdep.c  Mon Nov 26 20:52:53 2018(r340995)
@@ -641,6 +641,7 @@ sendsig(catcher, ksi, mask)
/* make the stack aligned */
fp = (struct sigframe *)STACKALIGN(fp);
/* Populate the siginfo frame. */
+   bzero(&frame, sizeof(frame));
get_mcontext(td, &frame.sf_uc.uc_mcontext, 0);
 #ifdef VFP
get_vfpcontext(td, &frame.sf_vfp);

Modified: head/sys/arm64/arm64/machdep.c
==
--- head/sys/arm64/arm64/machdep.c  Mon Nov 26 20:50:55 2018
(r340994)
+++ head/sys/arm64/arm64/machdep.c  Mon Nov 26 20:52:53 2018
(r340995)
@@ -656,6 +656,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask
fp = (struct sigframe *)STACKALIGN(fp);
 
/* Fill in the frame to copy out */
+   bzero(&frame, sizeof(frame));
get_mcontext(td, &frame.sf_uc.uc_mcontext, 0);
get_fpcontext(td, &frame.sf_uc.uc_mcontext);
frame.sf_si = ksi->ksi_info;

Modified: head/sys/riscv/riscv/machdep.c
==
--- head/sys/riscv/riscv/machdep.c  Mon Nov 26 20:50:55 2018
(r340994)
+++ head/sys/riscv/riscv/machdep.c  Mon Nov 26 20:52:53 2018
(r340995)
@@ -582,6 +582,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask
fp = (struct sigframe *)STACKALIGN(fp);
 
/* Fill in the frame to copy out */
+   bzero(&frame, sizeof(frame));
get_mcontext(td, &frame.sf_uc.uc_mcontext, 0);
get_fpcontext(td, &frame.sf_uc.uc_mcontext);
frame.sf_si = ksi->ksi_info;
___
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: r340994 - in head/sys: amd64/ia32 mips/mips powerpc/powerpc

2018-11-26 Thread Eric van Gyzen
Author: vangyzen
Date: Mon Nov 26 20:50:55 2018
New Revision: 340994
URL: https://svnweb.freebsd.org/changeset/base/340994

Log:
  Prevent kernel stack disclosure in getcontext/swapcontext
  
  Expand r338982 to cover freebsd32 interfaces on amd64, mips, and powerpc.
  
  MFC after:2 days
  Security: FreeBSD-EN-18:12.mem
  Security: CVE-2018-17155
  Sponsored by: Dell EMC Isilon

Modified:
  head/sys/amd64/ia32/ia32_signal.c
  head/sys/mips/mips/freebsd32_machdep.c
  head/sys/powerpc/powerpc/exec_machdep.c

Modified: head/sys/amd64/ia32/ia32_signal.c
==
--- head/sys/amd64/ia32/ia32_signal.c   Mon Nov 26 19:41:13 2018
(r340993)
+++ head/sys/amd64/ia32/ia32_signal.c   Mon Nov 26 20:50:55 2018
(r340994)
@@ -261,6 +261,7 @@ freebsd32_getcontext(struct thread *td, struct freebsd
if (uap->ucp == NULL)
ret = EINVAL;
else {
+   bzero(&uc, sizeof(uc));
ia32_get_mcontext(td, &uc.uc_mcontext, GET_MC_CLEAR_RET);
PROC_LOCK(td->td_proc);
uc.uc_sigmask = td->td_sigmask;
@@ -301,6 +302,7 @@ freebsd32_swapcontext(struct thread *td, struct freebs
if (uap->oucp == NULL || uap->ucp == NULL)
ret = EINVAL;
else {
+   bzero(&uc, sizeof(uc));
ia32_get_mcontext(td, &uc.uc_mcontext, GET_MC_CLEAR_RET);
PROC_LOCK(td->td_proc);
uc.uc_sigmask = td->td_sigmask;

Modified: head/sys/mips/mips/freebsd32_machdep.c
==
--- head/sys/mips/mips/freebsd32_machdep.c  Mon Nov 26 19:41:13 2018
(r340993)
+++ head/sys/mips/mips/freebsd32_machdep.c  Mon Nov 26 20:50:55 2018
(r340994)
@@ -294,6 +294,7 @@ freebsd32_getcontext(struct thread *td, struct freebsd
if (uap->ucp == NULL)
ret = EINVAL;
else {
+   bzero(&uc, sizeof(uc));
get_mcontext32(td, &uc.uc_mcontext, GET_MC_CLEAR_RET);
PROC_LOCK(td->td_proc);
uc.uc_sigmask = td->td_sigmask;
@@ -333,6 +334,7 @@ freebsd32_swapcontext(struct thread *td, struct freebs
if (uap->oucp == NULL || uap->ucp == NULL)
ret = EINVAL;
else {
+   bzero(&uc, sizeof(uc));
get_mcontext32(td, &uc.uc_mcontext, GET_MC_CLEAR_RET);
PROC_LOCK(td->td_proc);
uc.uc_sigmask = td->td_sigmask;

Modified: head/sys/powerpc/powerpc/exec_machdep.c
==
--- head/sys/powerpc/powerpc/exec_machdep.c Mon Nov 26 19:41:13 2018
(r340993)
+++ head/sys/powerpc/powerpc/exec_machdep.c Mon Nov 26 20:50:55 2018
(r340994)
@@ -785,6 +785,7 @@ freebsd32_getcontext(struct thread *td, struct freebsd
if (uap->ucp == NULL)
ret = EINVAL;
else {
+   bzero(&uc, sizeof(uc));
get_mcontext32(td, &uc.uc_mcontext, GET_MC_CLEAR_RET);
PROC_LOCK(td->td_proc);
uc.uc_sigmask = td->td_sigmask;
@@ -824,6 +825,7 @@ freebsd32_swapcontext(struct thread *td, struct freebs
if (uap->oucp == NULL || uap->ucp == NULL)
ret = EINVAL;
else {
+   bzero(&uc, sizeof(uc));
get_mcontext32(td, &uc.uc_mcontext, GET_MC_CLEAR_RET);
PROC_LOCK(td->td_proc);
uc.uc_sigmask = td->td_sigmask;
___
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: r340676 - in head/sys: kern sys

2018-11-26 Thread John Baldwin
On 11/22/18 9:28 AM, Mateusz Guzik wrote:
> diff --git a/sys/sys/systm.h b/sys/sys/systm.h
> index a1b98c5660c..fab94ee7979 100644
> --- a/sys/sys/systm.h
> +++ b/sys/sys/systm.h
> @@ -523,7 +523,11 @@ int alloc_unr_specific(struct unrhdr *uh, u_int item);
>  int alloc_unrl(struct unrhdr *uh);
>  void free_unr(struct unrhdr *uh, u_int item);
> 
> -#if defined(__mips__) || defined(__powerpc__)
> +#if defined(mips) && !defined(__mips_n64) && !defined(__mips_n32)
> +#define UNR64_LOCKED
> +#endif

This would perhaps be shorter as:

#if defined(__mips__) && defined(__mips_o32)

> +
> +#if defined(__powerpc__) && !defined(__powerpc64__)
>  #define UNR64_LOCKED
>  #endif

It's not clear to me why this isn't just conditional on LP64 though.
If 32-bit riscv existed in FreeBSD it would also not have this.  If we
really care that much about i386 and 32-bit arm you could write it as:

#if !(defined(__LP64__) || defined(__i386__) || defined(__arm__))

(I'm not sure we care that much though and think we could just use __LP64__
alone and call it a day.)

-- 
John Baldwin


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


svn commit: r340993 - head/sys/dev/acpica

2018-11-26 Thread Ben Widawsky
Author: bwidawsk
Date: Mon Nov 26 19:41:13 2018
New Revision: 340993
URL: https://svnweb.freebsd.org/changeset/base/340993

Log:
  acpi/ec: Fix regression caused by r340644
  
  After r340644 there were two things wrong in cases where there is both
  an ECDT, and an EC device exposed via acpica. The first is a rather
  trivial situation where the device desc would say ECDT even when it was
  not implicitly created via ECDT (not really sure why the compiler
  doesn't seem to warn about this).
  
  The other more pervasive issue is that the code is designed to
  essentially not do anything for EC probe when its uid was already
  created an EC based on the ECDT's uid. The issue was that probe would
  still return 0 in this case, and so we'd end up with some weird
  duplication. Now to be honest, I'm not actually sure what exactly broke,
  but it was definitely not working as intended. To fix this, all that is
  really needed is to make sure we return ENXIO when we're probing the
  device already added for the ECDT entry. While here though, move the
  check for this earlier to avoid wasted cycles when we know after
  obtaining the uid that it's duplicative.
  
  There remains one questionable bit here which I don't want to touch -
  when doing probe for PNP0C09, if acquiring _UID for the device fails, 0
  is assumed, which is a valid UID used by the implicit ECDT.
  
  Reported by:  Charlie Li, et al.
  Reviewed by:  jhb
  Differential Revision:https://reviews.freebsd.org/D18311

Modified:
  head/sys/dev/acpica/acpi_ec.c

Modified: head/sys/dev/acpica/acpi_ec.c
==
--- head/sys/dev/acpica/acpi_ec.c   Mon Nov 26 19:39:49 2018
(r340992)
+++ head/sys/dev/acpica/acpi_ec.c   Mon Nov 26 19:41:13 2018
(r340993)
@@ -362,7 +362,8 @@ acpi_ec_probe(device_t dev)
ret = 0;
 
goto out;
-}
+} else
+   ecdt = 0;
 
 ret = ACPI_ID_PROBE(device_get_parent(dev), dev, ec_ids, NULL);
 if (ret > 0)
@@ -382,6 +383,22 @@ acpi_ec_probe(device_t dev)
 if (ACPI_FAILURE(status))
params->uid = 0;
 
+/*
+ * Check for a duplicate probe. This can happen when a probe via ECDT
+ * succeeded already. If this is a duplicate, disable this device.
+ *
+ * NB: It would seem device_disable would be sufficient to not get
+ * duplicated devices, and ENXIO isn't needed, however, device_probe() only
+ * checks DF_ENABLED at the start and so disabling it here is too late to
+ * prevent device_attach() from being called.
+ */
+peer = devclass_get_device(acpi_ec_devclass, params->uid);
+if (peer != NULL && device_is_alive(peer)) {
+   device_disable(dev);
+   ret = ENXIO;
+   goto out;
+}
+
 status = acpi_GetInteger(h, "_GLK", ¶ms->glk);
 if (ACPI_FAILURE(status))
params->glk = 0;
@@ -421,16 +438,6 @@ acpi_ec_probe(device_t dev)
 
 /* Store the values we got from the namespace for attach. */
 acpi_set_private(dev, params);
-
-/*
- * Check for a duplicate probe. This can happen when a probe via ECDT
- * succeeded already. If this is a duplicate, disable this device.
- */
-peer = devclass_get_device(acpi_ec_devclass, params->uid);
-if (peer == NULL || !device_is_alive(peer))
-   ret = 0;
-else
-   device_disable(dev);
 
 if (buf.Pointer)
AcpiOsFree(buf.Pointer);
___
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: r340992 - in head: etc/mtree share/colldef share/ctypedef share/monetdef share/msgdef share/numericdef share/timedef tools/tools/locale tools/tools/locale/etc

2018-11-26 Thread Yuri Pankov
Author: yuripv
Date: Mon Nov 26 19:39:49 2018
New Revision: 340992
URL: https://svnweb.freebsd.org/changeset/base/340992

Log:
  Add ga_IE.UTF-8 locale.
  
  PR:   228587
  Submitted by: Micil  (LC_TIME)
  Reviewed by:  bapt
  Approved by:  kib (mentor, implicit)
  MFC after:3 days
  Differential revision:https://reviews.freebsd.org/D17997

Added:
  head/share/monetdef/ga_IE.UTF-8.src
 - copied unchanged from r340991, head/share/monetdef/en_IE.UTF-8.src
  head/share/msgdef/ga_IE.UTF-8.src   (contents, props changed)
  head/share/timedef/ga_IE.UTF-8.src   (contents, props changed)
Deleted:
  head/share/monetdef/en_IE.UTF-8.src
Modified:
  head/etc/mtree/BSD.usr.dist
  head/share/colldef/Makefile
  head/share/ctypedef/Makefile
  head/share/monetdef/Makefile
  head/share/msgdef/Makefile
  head/share/numericdef/Makefile
  head/share/timedef/Makefile
  head/tools/tools/locale/Makefile
  head/tools/tools/locale/etc/charmaps.xml

Modified: head/etc/mtree/BSD.usr.dist
==
--- head/etc/mtree/BSD.usr.dist Mon Nov 26 19:29:18 2018(r340991)
+++ head/etc/mtree/BSD.usr.dist Mon Nov 26 19:39:49 2018(r340992)
@@ -635,6 +635,8 @@
 ..
 fr_FR.UTF-8
 ..
+ga_IE.UTF-8
+..
 he_IL.UTF-8
 ..
 hi_IN.ISCII-DEV

Modified: head/share/colldef/Makefile
==
--- head/share/colldef/Makefile Mon Nov 26 19:29:18 2018(r340991)
+++ head/share/colldef/Makefile Mon Nov 26 19:39:49 2018(r340992)
@@ -184,6 +184,7 @@ SAME+=  en_US.UTF-8 nl_NL.UTF-8
 SAME+= en_US.UTF-8 nl_BE.UTF-8
 SAME+= en_US.UTF-8 it_IT.UTF-8
 SAME+= en_US.UTF-8 it_CH.UTF-8
+SAME+= en_US.UTF-8 ga_IE.UTF-8
 SAME+= en_US.UTF-8 fr_FR.UTF-8
 SAME+= en_US.UTF-8 fr_CH.UTF-8
 SAME+= en_US.UTF-8 fr_BE.UTF-8

Modified: head/share/ctypedef/Makefile
==
--- head/share/ctypedef/MakefileMon Nov 26 19:29:18 2018
(r340991)
+++ head/share/ctypedef/MakefileMon Nov 26 19:39:49 2018
(r340992)
@@ -82,6 +82,7 @@ SAME+=C.UTF-8 hu_HU.UTF-8
 SAME+= C.UTF-8 hr_HR.UTF-8
 SAME+= C.UTF-8 hi_IN.UTF-8
 SAME+= C.UTF-8 he_IL.UTF-8
+SAME+= C.UTF-8 ga_IE.UTF-8
 SAME+= C.UTF-8 fr_FR.UTF-8
 SAME+= C.UTF-8 fr_CH.UTF-8
 SAME+= C.UTF-8 fr_CA.UTF-8

Modified: head/share/monetdef/Makefile
==
--- head/share/monetdef/MakefileMon Nov 26 19:29:18 2018
(r340991)
+++ head/share/monetdef/MakefileMon Nov 26 19:39:49 2018
(r340992)
@@ -31,7 +31,6 @@ LOCALES+= en_GB.US-ASCII
 LOCALES+=  en_GB.UTF-8
 LOCALES+=  en_IE.ISO8859-1
 LOCALES+=  en_IE.ISO8859-15
-LOCALES+=  en_IE.UTF-8
 LOCALES+=  en_NZ.UTF-8
 LOCALES+=  en_PH.UTF-8
 LOCALES+=  en_SG.UTF-8
@@ -47,6 +46,7 @@ LOCALES+= fr_CA.UTF-8
 LOCALES+=  fr_CH.ISO8859-15
 LOCALES+=  fr_CH.UTF-8
 LOCALES+=  fr_FR.UTF-8
+LOCALES+=  ga_IE.UTF-8
 LOCALES+=  he_IL.UTF-8
 LOCALES+=  hi_IN.ISCII-DEV
 LOCALES+=  hi_IN.UTF-8
@@ -156,6 +156,7 @@ SAME+=  en_CA.UTF-8 en_CA.ISO8859-1
 SAME+= en_GB.ISO8859-15 en_GB.ISO8859-1
 SAME+= zh_HK.UTF-8 en_HK.UTF-8
 SAME+= zh_HK.UTF-8 en_HK.ISO8859-1
+SAME+= ga_IE.UTF-8 en_IE.UTF-8
 SAME+= en_NZ.UTF-8 en_NZ.US-ASCII
 SAME+= en_NZ.UTF-8 en_NZ.ISO8859-15
 SAME+= en_NZ.UTF-8 en_NZ.ISO8859-1

Copied: head/share/monetdef/ga_IE.UTF-8.src (from r340991, 
head/share/monetdef/en_IE.UTF-8.src)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/monetdef/ga_IE.UTF-8.src Mon Nov 26 19:39:49 2018
(r340992, copy of r340991, head/share/monetdef/en_IE.UTF-8.src)
@@ -0,0 +1,50 @@
+# Warning: Do not edit. This file is automatically generated from the
+# tools in /usr/src/tools/tools/locale. The data is obtained from the
+# CLDR project, obtained from http://cldr.unicode.org/
+# -
+#
+# int_curr_symbol (last character always SPACE)
+EUR 
+#
+# currency_symbol
+€
+#
+# mon_decimal_point
+.
+#
+# mon_thousands_sep
+,
+#
+# mon_grouping
+3
+#
+# positive_sign
+
+#
+# negative_sign
+-
+#
+# int_frac_digits
+2
+#
+# frac_digits
+2
+#
+# p_cs_precedes
+1
+#
+# p_sep_by_space
+0
+#
+# n_cs_precedes
+1
+#
+# n_sep_by_space
+0
+#
+# p_sign_posn
+1
+#
+# n_sign_posn
+1
+# EOF

Modified: head/share/msgdef/Makefile
==
--- head/share/msgdef/Makefile

svn commit: r340991 - head/stand/i386/libi386

2018-11-26 Thread Ed Maste
Author: emaste
Date: Mon Nov 26 19:29:18 2018
New Revision: 340991
URL: https://svnweb.freebsd.org/changeset/base/340991

Log:
  stand/i386/libi386: rename .s file to .S to use Clang IAS
  
  As part of the migration away from obsolete binutils we want to retire
  GNU as.  Most assembly files used on amd64 have a .S extension and are
  assembled with Clang's Integrated Assembler (IAS); rename pxetram.s to
  .S to use IAS as well.
  
  The generated .text is identical (the entire .o file is not, as Clang
  adds debug info.)
  
  PR:   205250, 233094
  Sponsored by: The FreeBSD Foundation

Added:
  head/stand/i386/libi386/pxetramp.S
 - copied unchanged from r340990, head/stand/i386/libi386/pxetramp.s
Deleted:
  head/stand/i386/libi386/pxetramp.s
Modified:
  head/stand/i386/libi386/Makefile

Modified: head/stand/i386/libi386/Makefile
==
--- head/stand/i386/libi386/MakefileMon Nov 26 19:14:33 2018
(r340990)
+++ head/stand/i386/libi386/MakefileMon Nov 26 19:29:18 2018
(r340991)
@@ -8,7 +8,7 @@ SRCS=   biosacpi.c bioscd.c biosdisk.c biosmem.c biospnp
biospci.c biossmap.c bootinfo.c bootinfo32.c bootinfo64.c \
comconsole.c devicename.c elf32_freebsd.c \
elf64_freebsd.c multiboot.c multiboot_tramp.S relocater_tramp.S \
-   i386_copy.c i386_module.c nullconsole.c pxe.c pxetramp.s \
+   i386_copy.c i386_module.c nullconsole.c pxe.c pxetramp.S \
smbios.c time.c vidconsole.c amd64_tramp.S spinconsole.c
 .PATH: ${ZFSSRC}
 SRCS+=  devicename_stubs.c

Copied: head/stand/i386/libi386/pxetramp.S (from r340990, 
head/stand/i386/libi386/pxetramp.s)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/stand/i386/libi386/pxetramp.S  Mon Nov 26 19:29:18 2018
(r340991, copy of r340990, head/stand/i386/libi386/pxetramp.s)
@@ -0,0 +1,38 @@
+#
+# Copyright (c) 2000 Peter Wemm
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms are freely
+# permitted provided that the above copyright notice and this
+# paragraph and the following disclaimer are duplicated in all
+# such forms.
+#
+# This software is provided "AS IS" and without any express or
+# implied warranties, including, without limitation, the implied
+# warranties of merchantability and fitness for a particular
+# purpose.
+#
+# $FreeBSD$
+
+# ph33r this
+
+   .globl  __bangpxeentry, __bangpxeseg, __bangpxeoff
+   .globl  __pxenventry, __pxenvseg, __pxenvoff
+
+   .code16
+   .p2align 4,0x90
+__bangpxeentry:
+   push%dx # seg:data
+   push%ax # off:data
+   push%bx # int16 func
+   .byte   0x9a# far call
+__bangpxeoff:  .word   0x  # offset
+__bangpxeseg:  .word   0x  # segment
+   add $6, %sp # restore stack
+   .byte   0xcb# to vm86int
+#
+__pxenventry:
+   .byte   0x9a# far call
+__pxenvoff:.word   0x  # offset
+__pxenvseg:.word   0x  # segment
+   .byte   0xcb# to vm86int
___
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: r340990 - head/stand/i386/btx/lib

2018-11-26 Thread Ed Maste
Author: emaste
Date: Mon Nov 26 19:14:33 2018
New Revision: 340990
URL: https://svnweb.freebsd.org/changeset/base/340990

Log:
  btx: rename .s files to .S to use Clang IAS
  
  As part of the migration away from obsolete binutils we want to retire
  GNU as.  Most assembly files used on amd64 have a .S extension and are
  assembled with Clang's integrated assembler; rename two files in
  stand/i386/btx/lib to .S to use IAS as well.
  
  The generated .text is identical (the entire .o files are not, as Clang
  adds debug info).
  
  PR:   205250, 233094
  Discussed with:   imp
  Sponsored by: The FreeBSD Foundation

Added:
  head/stand/i386/btx/lib/btxsys.S
 - copied unchanged from r340989, head/stand/i386/btx/lib/btxsys.s
  head/stand/i386/btx/lib/btxv86.S
 - copied unchanged from r340989, head/stand/i386/btx/lib/btxv86.s
Deleted:
  head/stand/i386/btx/lib/btxsys.s
  head/stand/i386/btx/lib/btxv86.s
Modified:
  head/stand/i386/btx/lib/Makefile

Modified: head/stand/i386/btx/lib/Makefile
==
--- head/stand/i386/btx/lib/MakefileMon Nov 26 18:46:15 2018
(r340989)
+++ head/stand/i386/btx/lib/MakefileMon Nov 26 19:14:33 2018
(r340990)
@@ -4,7 +4,7 @@
 
 PROG=  crt0.o
 INTERNALPROG=
-SRCS=  btxcsu.S btxsys.s btxv86.s
+SRCS=  btxcsu.S btxsys.S btxv86.S
 CFLAGS+=-I${BOOTSRC}/i386/common
 LDFLAGS+=-Wl,-r
 

Copied: head/stand/i386/btx/lib/btxsys.S (from r340989, 
head/stand/i386/btx/lib/btxsys.s)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/stand/i386/btx/lib/btxsys.SMon Nov 26 19:14:33 2018
(r340990, copy of r340989, head/stand/i386/btx/lib/btxsys.s)
@@ -0,0 +1,40 @@
+#
+# Copyright (c) 1998 Robert Nordier
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms are freely
+# permitted provided that the above copyright notice and this
+# paragraph and the following disclaimer are duplicated in all
+# such forms.
+#
+# This software is provided "AS IS" and without any express or
+# implied warranties, including, without limitation, the implied
+# warranties of merchantability and fitness for a particular
+# purpose.
+#
+
+# $FreeBSD$
+
+#
+# BTX system calls.
+#
+
+#
+# Globals.
+#
+   .global __exit
+   .global __exec
+#
+# Constants.
+#
+   .set INT_SYS,0x30   # Interrupt number
+#
+# System call: exit
+#
+__exit:xorl %eax,%eax  # BTX system
+   int $INT_SYS#  call 0x0
+#
+# System call: exec
+#
+__exec:movl $0x1,%eax  # BTX system
+   int $INT_SYS#  call 0x1

Copied: head/stand/i386/btx/lib/btxv86.S (from r340989, 
head/stand/i386/btx/lib/btxv86.s)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/stand/i386/btx/lib/btxv86.SMon Nov 26 19:14:33 2018
(r340990, copy of r340989, head/stand/i386/btx/lib/btxv86.s)
@@ -0,0 +1,85 @@
+#
+# Copyright (c) 1998 Robert Nordier
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms are freely
+# permitted provided that the above copyright notice and this
+# paragraph and the following disclaimer are duplicated in all
+# such forms.
+#
+# This software is provided "AS IS" and without any express or
+# implied warranties, including, without limitation, the implied
+# warranties of merchantability and fitness for a particular
+# purpose.
+#
+
+# $FreeBSD$
+
+#
+# BTX V86 interface.
+#
+
+#
+# Globals.
+#
+   .global __v86int
+#
+# Fields in V86 interface structure.
+#
+   .set V86_CTL,0x0# Control flags
+   .set V86_ADDR,0x4   # Int number/address
+   .set V86_ES,0x8 # V86 ES
+   .set V86_DS,0xc # V86 DS
+   .set V86_FS,0x10# V86 FS
+   .set V86_GS,0x14# V86 GS
+   .set V86_EAX,0x18   # V86 EAX
+   .set V86_ECX,0x1c   # V86 ECX
+   .set V86_EDX,0x20   # V86 EDX
+   .set V86_EBX,0x24   # V86 EBX
+   .set V86_EFL,0x28   # V86 eflags
+   .set V86_EBP,0x2c   # V86 EBP
+   .set V86_ESI,0x30   # V86 ESI
+   .set V86_EDI,0x34   # V86 EDI
+#
+# Other constants.
+#
+   .set INT_V86,0x31   # Interrupt number
+   .set SIZ_V86,0x38   # Size of V86 structure
+#
+# V86 interface function.
+#
+__v86int:  popl __v86ret   # Save return address
+   pushl $__v86# Push pointer
+  

svn commit: r340989 - head/sys/dev/extres/regulator

2018-11-26 Thread Emmanuel Vadot
Author: manu
Date: Mon Nov 26 18:46:15 2018
New Revision: 340989
URL: https://svnweb.freebsd.org/changeset/base/340989

Log:
  regulator_fixed: Do not disable fixed regulator at probe
  
  If the regulator is unused it will be disabled by the regulator_shutdown 
sysinit.
  
  Tested on pinebook where the backlight is controlled by a fixed-regulator.
  The regulator doesn't have a regulator-boot-on param (I'm gonna upstream 
this) and so we disable it at probe.
  We later enable it but this cause the screen to go black.
  Linux doesn't disable regulator at boot (at least for fixed-regulator) so 
better match this to have the same UX.
  
  MFC after:1 month
  Differential Revision:https://reviews.freebsd.org/D17978

Modified:
  head/sys/dev/extres/regulator/regulator_fixed.c

Modified: head/sys/dev/extres/regulator/regulator_fixed.c
==
--- head/sys/dev/extres/regulator/regulator_fixed.c Mon Nov 26 18:31:00 
2018(r340988)
+++ head/sys/dev/extres/regulator/regulator_fixed.c Mon Nov 26 18:46:15 
2018(r340989)
@@ -145,7 +145,6 @@ regnode_fixed_init(struct regnode *regnode)
struct regnode_fixed_sc *sc;
struct gpiobus_pin *pin;
uint32_t flags;
-   bool enable;
int rv;
 
sc = regnode_get_softc(regnode);
@@ -158,14 +157,15 @@ regnode_fixed_init(struct regnode *regnode)
flags = GPIO_PIN_OUTPUT;
if (sc->gpio_open_drain)
flags |= GPIO_PIN_OPENDRAIN;
-   enable = sc->param->boot_on || sc->param->always_on;
-   if (!sc->param->enable_active_high)
-   enable = !enable;
-   rv = GPIO_PIN_SET(pin->dev, pin->pin, enable);
-   if (rv != 0) {
-   device_printf(dev, "Cannot set GPIO pin: %d\n", pin->pin);
-   return (rv);
+   if (sc->param->boot_on || sc->param->always_on) {
+   rv = GPIO_PIN_SET(pin->dev, pin->pin, 
sc->param->enable_active_high);
+   if (rv != 0) {
+   device_printf(dev, "Cannot set GPIO pin: %d\n",
+   pin->pin);
+   return (rv);
+   }
}
+
rv = GPIO_PIN_SETFLAGS(pin->dev, pin->pin, flags);
if (rv != 0) {
device_printf(dev, "Cannot configure GPIO pin: %d\n", pin->pin);
___
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: r340988 - head/sys/kern

2018-11-26 Thread Alan Somers
Author: asomers
Date: Mon Nov 26 18:31:00 2018
New Revision: 340988
URL: https://svnweb.freebsd.org/changeset/base/340988

Log:
  vfs_aio.c: rename "physio" symbols to "bio".
  
  aio has two paths: an asynchronous "physio" path and a synchronous path.
  Confusingly, physio(9) isn't actually used by the "physio" path, and never
  has been.  In fact, it may even be called by the synchronous path!  Rename
  the "physio" path to the "bio" path to reflect what it actually does:
  directly compose BIOs and send them to character devices.
  
  MFC after:2 weeks

Modified:
  head/sys/kern/vfs_aio.c

Modified: head/sys/kern/vfs_aio.c
==
--- head/sys/kern/vfs_aio.c Mon Nov 26 17:59:25 2018(r340987)
+++ head/sys/kern/vfs_aio.c Mon Nov 26 18:31:00 2018(r340988)
@@ -212,7 +212,7 @@ typedef struct oaiocb {
 /*
  * If the routine that services an AIO request blocks while running in an
  * AIO kernel process it can starve other I/O requests.  BIO requests
- * queued via aio_qphysio() complete in GEOM and do not use AIO kernel
+ * queued via aio_qbio() complete asynchronously and do not use AIO kernel
  * processes at all.  Socket I/O requests use a separate pool of
  * kprocs and also force non-blocking I/O.  Other file I/O requests
  * use the generic fo_read/fo_write operations which can block.  The
@@ -268,7 +268,7 @@ struct kaioinfo {
int kaio_flags; /* (a) per process kaio flags */
int kaio_active_count;  /* (c) number of currently used AIOs */
int kaio_count; /* (a) size of AIO queue */
-   int kaio_buffer_count;  /* (a) number of physio buffers */
+   int kaio_buffer_count;  /* (a) number of bio buffers */
TAILQ_HEAD(,kaiocb) kaio_all;   /* (a) all AIOs in a process */
TAILQ_HEAD(,kaiocb) kaio_done;  /* (a) done queue for process */
TAILQ_HEAD(,aioliojob) kaio_liojoblist; /* (a) list of lio jobs */
@@ -318,11 +318,11 @@ static intaio_newproc(int *);
 intaio_aqueue(struct thread *td, struct aiocb *ujob,
struct aioliojob *lio, int type, struct aiocb_ops *ops);
 static int aio_queue_file(struct file *fp, struct kaiocb *job);
-static voidaio_physwakeup(struct bio *bp);
+static voidaio_biowakeup(struct bio *bp);
 static voidaio_proc_rundown(void *arg, struct proc *p);
 static voidaio_proc_rundown_exec(void *arg, struct proc *p,
struct image_params *imgp);
-static int aio_qphysio(struct proc *p, struct kaiocb *job);
+static int aio_qbio(struct proc *p, struct kaiocb *job);
 static voidaio_daemon(void *param);
 static voidaio_bio_done_notify(struct proc *userp, struct kaiocb *job);
 static boolaio_clear_cancel_function_locked(struct kaiocb *job);
@@ -741,9 +741,9 @@ drop:
 
 /*
  * The AIO processing activity for LIO_READ/LIO_WRITE.  This is the code that
- * does the I/O request for the non-physio version of the operations.  The
- * normal vn operations are used, and this code should work in all instances
- * for every type of file, including pipes, sockets, fifos, and regular files.
+ * does the I/O request for the non-bio version of the operations.  The normal
+ * vn operations are used, and this code should work in all instances for every
+ * type of file, including pipes, sockets, fifos, and regular files.
  *
  * XXX I don't think it works well for socket, pipe, and fifo.
  */
@@ -1195,7 +1195,7 @@ aio_newproc(int *start)
 }
 
 /*
- * Try the high-performance, low-overhead physio method for eligible
+ * Try the high-performance, low-overhead bio method for eligible
  * VCHR devices.  This method doesn't use an aio helper thread, and
  * thus has very low overhead.
  *
@@ -1204,7 +1204,7 @@ aio_newproc(int *start)
  * duration of this call.
  */
 static int
-aio_qphysio(struct proc *p, struct kaiocb *job)
+aio_qbio(struct proc *p, struct kaiocb *job)
 {
struct aiocb *cb;
struct file *fp;
@@ -1277,7 +1277,7 @@ aio_qphysio(struct proc *p, struct kaiocb *job)
 
bp->bio_length = cb->aio_nbytes;
bp->bio_bcount = cb->aio_nbytes;
-   bp->bio_done = aio_physwakeup;
+   bp->bio_done = aio_biowakeup;
bp->bio_data = (void *)(uintptr_t)cb->aio_buf;
bp->bio_offset = cb->aio_offset;
bp->bio_cmd = cb->aio_lio_opcode == LIO_WRITE ? BIO_WRITE : BIO_READ;
@@ -1442,7 +1442,7 @@ static struct aiocb_ops aiocb_ops_osigevent = {
 #endif
 
 /*
- * Queue a new AIO request.  Choosing either the threaded or direct physio VCHR
+ * Queue a new AIO request.  Choosing either the threaded or direct bio VCHR
  * technique is done in this code.
  */
 int
@@ -1697,7 +1697,7 @@ aio_queue_file(struct file *fp, struct kaiocb *job)
bool safe;
 
ki = job->userproc->p_aioinfo;
-   error = aio_qphysio(job->userproc, job);
+   error = aio_qbio(job->userproc, job

svn commit: r340987 - head/sys/arm64/conf

2018-11-26 Thread Emmanuel Vadot
Author: manu
Date: Mon Nov 26 17:59:25 2018
New Revision: 340987
URL: https://svnweb.freebsd.org/changeset/base/340987

Log:
  arm64: Add evdev support to GENERIC

Modified:
  head/sys/arm64/conf/GENERIC

Modified: head/sys/arm64/conf/GENERIC
==
--- head/sys/arm64/conf/GENERIC Mon Nov 26 17:22:23 2018(r340986)
+++ head/sys/arm64/conf/GENERIC Mon Nov 26 17:59:25 2018(r340987)
@@ -242,6 +242,11 @@ device kbdmux
 
 device vt_efifb
 
+# EVDEV support
+device evdev   # input event device support
+optionsEVDEV_SUPPORT   # evdev support in legacy 
drivers
+device uinput  # install /dev/uinput cdev
+
 # Pseudo devices.
 device crypto  # core crypto support
 device loop# Network loopback
___
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: r340986 - head

2018-11-26 Thread Ed Maste
Author: emaste
Date: Mon Nov 26 17:22:23 2018
New Revision: 340986
URL: https://svnweb.freebsd.org/changeset/base/340986

Log:
  UPDATING: add note for r340984 (ld.bfd removal)
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/UPDATING

Modified: head/UPDATING
==
--- head/UPDATING   Mon Nov 26 17:11:50 2018(r340985)
+++ head/UPDATING   Mon Nov 26 17:22:23 2018(r340986)
@@ -31,6 +31,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW:
disable the most expensive debugging functionality run
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
 
+20181126:
+   On amd64, arm64 and armv7 (architectures that install LLVM's ld.lld
+   linker as /usr/bin/ld) GNU ld is no longer installed as ld.bfd, as
+   it produces broken binaries when ifuncs are in use.  Users needing
+   GNU ld should install the binutils port or package.
+
 20181123:
The BSD crtbegin and crtend code has been enabled by default. It has
had extensive testing on amd64, arm64, and i386. It can be disabled
___
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: r340985 - head/share/man/man5

2018-11-26 Thread Ed Maste
Author: emaste
Date: Mon Nov 26 17:11:50 2018
New Revision: 340985
URL: https://svnweb.freebsd.org/changeset/base/340985

Log:
  src.conf.5: regen after r340984 (and r340841)

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

Modified: head/share/man/man5/src.conf.5
==
--- head/share/man/man5/src.conf.5  Mon Nov 26 17:07:35 2018
(r340984)
+++ head/share/man/man5/src.conf.5  Mon Nov 26 17:11:50 2018
(r340985)
@@ -1,6 +1,6 @@
 .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman.
 .\" $FreeBSD$
-.Dd November 6, 2018
+.Dd November 26, 2018
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -149,7 +149,12 @@ Build all binaries with the
 flag set to indicate that the run-time loader should perform all relocation
 processing at process startup rather than on demand.
 .It Va WITHOUT_BINUTILS
-Set to not build or install binutils (as, ld, and objdump) as part
+Set to not build or install GNU
+.Xr as 1 ,
+.Xr objdump 1 ,
+and for some CPU architectures
+.Xr ld.bfd 1
+as part
 of the normal system build.
 The resulting system cannot build programs from source.
 .Pp
@@ -162,7 +167,12 @@ When set, it enforces these options:
 .Va WITHOUT_GDB
 .El
 .It Va WITH_BINUTILS
-Set to build and install binutils (as, ld, and objdump) as part
+Set to build and install GNU
+.Xr as 1 ,
+.Xr objdump 1 ,
+and for some CPU architectures
+.Xr ld.bfd 1
+as part
 of the normal system build.
 .Pp
 This is a default setting on
@@ -224,8 +234,8 @@ and related programs.
 .It Va WITHOUT_BSD_CPIO
 Set to not build the BSD licensed version of cpio based on
 .Xr libarchive 3 .
-.It Va WITH_BSD_CRTBEGIN
-Enable the BSD licensed
+.It Va WITHOUT_BSD_CRTBEGIN
+Disable the BSD licensed
 .Pa crtbegin.o
 and
 .Pa crtend.o .
___
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: r340984 - in head: gnu/usr.bin/binutils tools/build/mk tools/build/options

2018-11-26 Thread Ed Maste
Author: emaste
Date: Mon Nov 26 17:07:35 2018
New Revision: 340984
URL: https://svnweb.freebsd.org/changeset/base/340984

Log:
  Do not install GNU ld if lld is /usr/bin/ld
  
  GNU binutils ld.bfd 2.17.50 does not support ifuncs and produces broken
  binaries when ifuncs are in use.  When LLD_IS_LD is default we have an
  ifunc-capable system linker and can just avoid installing ld.bfd.
  
  Reported by:  theraven
  Reviewed by:  bz
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D18340

Modified:
  head/gnu/usr.bin/binutils/Makefile
  head/tools/build/mk/OptionalObsoleteFiles.inc
  head/tools/build/options/WITHOUT_BINUTILS
  head/tools/build/options/WITH_BINUTILS

Modified: head/gnu/usr.bin/binutils/Makefile
==
--- head/gnu/usr.bin/binutils/Makefile  Mon Nov 26 17:00:39 2018
(r340983)
+++ head/gnu/usr.bin/binutils/Makefile  Mon Nov 26 17:07:35 2018
(r340984)
@@ -8,9 +8,13 @@ SUBDIR=doc\
libopcodes \
libbinutils \
as \
-   ld \
objdump
 
+# When we use ld.lld as /usr/bin/ld, do not install the non-ifunc-capable
+# GNU binutils 2.17.50 ld.
+.if ${MK_LLD_IS_LD} == "no"
+SUBDIR+=ld
+.endif
 
 SUBDIR_DEPEND_libbinutils=libbfd   # for bfdver.h
 SUBDIR_DEPEND_as=libbfd libiberty libopcodes

Modified: head/tools/build/mk/OptionalObsoleteFiles.inc
==
--- head/tools/build/mk/OptionalObsoleteFiles.inc   Mon Nov 26 17:00:39 
2018(r340983)
+++ head/tools/build/mk/OptionalObsoleteFiles.inc   Mon Nov 26 17:07:35 
2018(r340984)
@@ -208,7 +208,6 @@ OLD_FILES+=usr/bin/as
 OLD_FILES+=usr/bin/ld
 OLD_FILES+=usr/share/man/man1/ld.1.gz
 .endif
-OLD_FILES+=usr/bin/ld.bfd
 OLD_FILES+=usr/bin/objdump
 OLD_FILES+=usr/libdata/ldscripts/armelf_fbsd.x
 OLD_FILES+=usr/libdata/ldscripts/armelf_fbsd.xbn
@@ -411,6 +410,9 @@ OLD_FILES+=usr/share/man/man7/as.7.gz
 OLD_FILES+=usr/share/man/man7/ld.7.gz
 OLD_FILES+=usr/share/man/man7/ldint.7.gz
 OLD_FILES+=usr/share/man/man7/binutils.7.gz
+.endif
+.if ${MK_BINUTILS} == no || ${MK_LLD_IS_LD} == yes
+OLD_FILES+=usr/bin/ld.bfd
 .endif
 
 .if ${MK_BLACKLIST} == no

Modified: head/tools/build/options/WITHOUT_BINUTILS
==
--- head/tools/build/options/WITHOUT_BINUTILS   Mon Nov 26 17:00:39 2018
(r340983)
+++ head/tools/build/options/WITHOUT_BINUTILS   Mon Nov 26 17:07:35 2018
(r340984)
@@ -1,4 +1,9 @@
 .\" $FreeBSD$
-Set to not build or install binutils (as, ld, and objdump) as part
+Set to not build or install GNU
+.Xr as 1 ,
+.Xr objdump 1 ,
+and for some CPU architectures
+.Xr ld.bfd 1
+as part
 of the normal system build.
 The resulting system cannot build programs from source.

Modified: head/tools/build/options/WITH_BINUTILS
==
--- head/tools/build/options/WITH_BINUTILS  Mon Nov 26 17:00:39 2018
(r340983)
+++ head/tools/build/options/WITH_BINUTILS  Mon Nov 26 17:07:35 2018
(r340984)
@@ -1,3 +1,8 @@
 .\" $FreeBSD$
-Set to build and install binutils (as, ld, and objdump) as part
+Set to build and install GNU
+.Xr as 1 ,
+.Xr objdump 1 ,
+and for some CPU architectures
+.Xr ld.bfd 1
+as part
 of the normal system build.
___
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: r340983 - head/release/tools

2018-11-26 Thread Glen Barber
Author: gjb
Date: Mon Nov 26 17:00:39 2018
New Revision: 340983
URL: https://svnweb.freebsd.org/changeset/base/340983

Log:
  Fix NTP query on GCE due to unresolved hostname.
  
  PR:   232456
  Submitted by: Lucas Kanashiro
  MFC after:3 days
  Sponsored by: The FreeBSD Foundation

Modified:
  head/release/tools/gce.conf

Modified: head/release/tools/gce.conf
==
--- head/release/tools/gce.conf Mon Nov 26 16:54:16 2018(r340982)
+++ head/release/tools/gce.conf Mon Nov 26 17:00:39 2018(r340983)
@@ -49,7 +49,7 @@ aesni_load="YES"
 nvme_load="YES"
 EOF
 
-   echo '169.254.169.254 metadata.google.internal metadata' > \
+   echo '169.254.169.254 metadata.google.internal metadata' >> \
${DESTDIR}/etc/hosts
 
 # overwrite ntp.conf
___
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: r340981 - in head/release: arm64 tools

2018-11-26 Thread Emmanuel Vadot
Author: manu
Date: Mon Nov 26 16:38:39 2018
New Revision: 340981
URL: https://svnweb.freebsd.org/changeset/base/340981

Log:
  release: arm64: Add PINEBOOK config
  
  Add a configuration for PINEBOOK image.
  Pinebook is a arm64 laptop based on a Pine64 board.
  
  Since the usb trackpad need a quirk, add a common function for adding
  quirk for arm board.
  A default one is supplied as most board to not need quirks.
  
  Reviewed by:  gjb
  MFC after:1 month
  Differential Revision:https://reviews.freebsd.org/D18337

Added:
  head/release/arm64/PINEBOOK.conf   (contents, props changed)
Modified:
  head/release/tools/arm.subr

Added: head/release/arm64/PINEBOOK.conf
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/release/arm64/PINEBOOK.confMon Nov 26 16:38:39 2018
(r340981)
@@ -0,0 +1,42 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+EMBEDDED_TARGET_ARCH="aarch64"
+EMBEDDED_TARGET="arm64"
+EMBEDDEDBUILD=1
+EMBEDDEDPORTS="sysutils/u-boot-pinebook"
+FAT_SIZE="54m -b 1m"
+FAT_TYPE="16"
+IMAGE_SIZE="2560M"
+KERNEL="GENERIC"
+MD_ARGS="-x 63 -y 255"
+NODOC=1
+PART_SCHEME="MBR"
+FDT_OVERLAYS="sun50i-a64-sid,sun50i-a64-ths,sun50i-a64-timer"
+export BOARDNAME="PINEBOOK"
+
+arm_install_uboot() {
+   UBOOT_DIR="/usr/local/share/u-boot/u-boot-pinebook"
+   UBOOT_FILES="u-boot-sunxi-with-spl.bin"
+   chroot ${CHROOTDIR} dd if=${UBOOT_DIR}/${UBOOT_FILES} \
+   of=/dev/${mddev} bs=1k seek=8 conv=sync
+
+   return 0
+}
+
+arm_do_quirk() {
+   echo '# Enable quirk for trackpad' \
+>> ${CHROOTDIR}/${DESTDIR}/boot/loader.conf
+   echo 'usb_quirk_load=YES' \
+>> ${CHROOTDIR}/${DESTDIR}/boot/loader.conf
+   echo 'ums_load=YES' \
+>> ${CHROOTDIR}/${DESTDIR}/boot/loader.conf
+   echo 'hw.usb.quirk="0x258a 0x000c 0x 0x UQ_CFG_INDEX=1"' \
+>> ${CHROOTDIR}/${DESTDIR}/boot/loader.conf
+   # We want EFIFB but there is no node and so we cannot know
+   # which regulator is used for powering lcd/hdmi
+   echo 'hw.regulator.disable_unused=0' \
+>> ${CHROOTDIR}/${DESTDIR}/boot/loader.conf
+}

Modified: head/release/tools/arm.subr
==
--- head/release/tools/arm.subr Mon Nov 26 16:36:38 2018(r340980)
+++ head/release/tools/arm.subr Mon Nov 26 16:38:39 2018(r340981)
@@ -174,6 +174,7 @@ arm_install_base() {
arm64_setup_multicons
arm_setup_fdt_overlays
arm_setup_minimal_loader
+   arm_do_quirk
 
echo '# Custom /etc/fstab for FreeBSD embedded images' \
> ${CHROOTDIR}/${DESTDIR}/etc/fstab
@@ -237,4 +238,8 @@ arm_install_uboot() {
# Override in the arm/KERNEL.conf file.
 
return 0
+}
+
+arm_do_quirk() {
+   # Override in the arm{,64}/BOARD.conf file.
 }
___
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: r340979 - head/sbin/ipfw

2018-11-26 Thread Eugene Grosbein
Author: eugen
Date: Mon Nov 26 16:10:20 2018
New Revision: 340979
URL: https://svnweb.freebsd.org/changeset/base/340979

Log:
  Small language fix after r340978.
  
  MFC after:3 days

Modified:
  head/sbin/ipfw/ipfw.8

Modified: head/sbin/ipfw/ipfw.8
==
--- head/sbin/ipfw/ipfw.8   Mon Nov 26 16:02:17 2018(r340978)
+++ head/sbin/ipfw/ipfw.8   Mon Nov 26 16:10:20 2018(r340979)
@@ -4134,7 +4134,7 @@ For both incoming and outgoing frames while flowing th
 .Dl "ipfw add ngtee 1 ip from any to 192.168.0.1 layer2 via em0"
 .Pp
 Make sure you do not perform mirroring for already duplicated frames
-or kernel may hang as there is no safety net here.
+or kernel may hang as there is no safety net.
 .Ss DYNAMIC RULES
 In order to protect a site from flood attacks involving fake
 TCP packets, it is safer to use dynamic rules:
___
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: r340978 - head/sbin/ipfw

2018-11-26 Thread Eugene Grosbein
Author: eugen
Date: Mon Nov 26 16:02:17 2018
New Revision: 340978
URL: https://svnweb.freebsd.org/changeset/base/340978

Log:
  ipfw.8: add new section to EXAMPLES:
  
  SELECTIVE MIRRORING
   If your network has network traffic analyzer connected to your host
   directly via dedicated interface or remotely via RSPAN vlan, you can
   selectively mirror some ethernet layer2 frames to the analyzer.
   ...

Modified:
  head/sbin/ipfw/ipfw.8

Modified: head/sbin/ipfw/ipfw.8
==
--- head/sbin/ipfw/ipfw.8   Mon Nov 26 15:46:46 2018(r340977)
+++ head/sbin/ipfw/ipfw.8   Mon Nov 26 16:02:17 2018(r340978)
@@ -4086,6 +4086,55 @@ option could be used to (re)mark user traffic,
 by adding the following to the appropriate place in ruleset:
 .Pp
 .Dl "ipfw add setdscp be ip from any to any dscp af11,af21"
+.Ss SELECTIVE MIRRORING
+If your network has network traffic analyzer
+connected to your host directly via dedicated interface
+or remotely via RSPAN vlan, you can selectively mirror
+some ethernet layer2 frames to the analyzer.
+.Pp
+First, make sure your firewall is already configured and runs.
+Then, enable layer2 processing if not already enabled:
+.Pp
+.Dl "sysctl net.link.ether.ipfw=1"
+.Pp
+Next, load needed additional kernel modules:
+.Pp
+.Dl "kldload ng_ether ng_ipfw"
+.Pp
+Optionally, make system load these modules automatically
+at startup:
+.Pp
+.Dl sysrc kld_list+="ng_ether ng_ipfw"
+.Pp
+Next, configure
+.Xr ng_ipfw 4
+kernel module to transmit mirrored copies of layer2 frames
+out via vlan900 interface:
+.Pp
+.Dl "ngctl connect ipfw: vlan900: 1 lower"
+.Pp
+Think of "1" here as of "mirroring instance index" and vlan900 is its
+destination.
+You can have arbitrary number of instances.
+Refer to
+.Xr ng_ipfw 4
+for details.
+.Pp
+At last, actually start mirroring of selected frames using "instance 1".
+For frames incoming from em0 interface:
+.Pp
+.Dl "ipfw add ngtee 1 ip from any to 192.168.0.1 layer2 in recv em0"
+.Pp
+For frames outgoing to em0 interface:
+.Pp
+.Dl "ipfw add ngtee 1 ip from any to 192.168.0.1 layer2 out xmit em0"
+.Pp
+For both incoming and outgoing frames while flowing through em0:
+.Pp
+.Dl "ipfw add ngtee 1 ip from any to 192.168.0.1 layer2 via em0"
+.Pp
+Make sure you do not perform mirroring for already duplicated frames
+or kernel may hang as there is no safety net here.
 .Ss DYNAMIC RULES
 In order to protect a site from flood attacks involving fake
 TCP packets, it is safer to use dynamic rules:
@@ -4524,6 +4573,7 @@ can be changed in a similar way as for
 .Xr if_bridge 4 ,
 .Xr ip 4 ,
 .Xr ipfirewall 4 ,
+.Xr ng_ether 4 ,
 .Xr ng_ipfw 4 ,
 .Xr protocols 5 ,
 .Xr services 5 ,
@@ -4531,6 +4581,7 @@ can be changed in a similar way as for
 .Xr kldload 8 ,
 .Xr reboot 8 ,
 .Xr sysctl 8 ,
+.Xr sysrc 8 ,
 .Xr syslogd 8
 .Sh HISTORY
 The
___
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: r340976 - head/contrib/nvi/common

2018-11-26 Thread Yuri Pankov
Author: yuripv
Date: Mon Nov 26 15:33:55 2018
New Revision: 340976
URL: https://svnweb.freebsd.org/changeset/base/340976

Log:
  vi: fix UTF-8 detection.
  
  PR:   202290
  Submitted by: la...@fit.vutbr.cz
  Reviewed by:  bapt
  Approved by:  kib (mentor, implicit)
  MFC after:3 days
  Differential Revision:https://reviews.freebsd.org/D17950

Modified:
  head/contrib/nvi/common/encoding.c

Modified: head/contrib/nvi/common/encoding.c
==
--- head/contrib/nvi/common/encoding.c  Mon Nov 26 15:12:58 2018
(r340975)
+++ head/contrib/nvi/common/encoding.c  Mon Nov 26 15:33:55 2018
(r340976)
@@ -96,7 +96,7 @@ looks_utf8(const char *ibuf, size_t nbytes)
if (i >= nbytes)
goto done;
 
-   if (buf[i] & 0x40)  /* 10xx */
+   if ((buf[i] & 0xc0) != 0x80)/* 10xx */
return -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: r340974 - head/sbin/bectl

2018-11-26 Thread Yuri Pankov
Author: yuripv
Date: Mon Nov 26 15:11:32 2018
New Revision: 340974
URL: https://svnweb.freebsd.org/changeset/base/340974

Log:
  bectl: sync usage with man page, removing stray multibyte characters
  in the process.
  
  PR:   233526
  Submitted by: tigersha...@gmail.com (original version)
  Reviewed by:  kevans
  Approved by:  kib (mentor, implicit)
  MFC after:3 days
  Differential revision:https://reviews.freebsd.org/D18335

Modified:
  head/sbin/bectl/bectl.c

Modified: head/sbin/bectl/bectl.c
==
--- head/sbin/bectl/bectl.c Mon Nov 26 14:45:58 2018(r340973)
+++ head/sbin/bectl/bectl.c Mon Nov 26 15:11:32 2018(r340974)
@@ -66,22 +66,24 @@ usage(bool explicit)
FILE *fp;
 
fp =  explicit ? stdout : stderr;
-   fprintf(fp,
+   fprintf(fp, "%s",
"usage:\tbectl {-h | -? | subcommand [args...]}\n"
+#if SOON
+   "\tbectl add (path)*\n"
+#endif
"\tbectl activate [-t] beName\n"
-   "\tbectl create [-e {nonActiveBe | -e beName@snapshot}] beName\n"
-   "\tbectl create beName@snapshot\n"
+   "\tbectl create [-r] [-e {nonActiveBe | beName@snapshot}] beName\n"
+   "\tbectl create [-r] beName@snapshot\n"
"\tbectl destroy [-F] {beName | beName@snapshot}\n"
"\tbectl export sourceBe\n"
"\tbectl import targetBe\n"
-#if SOON
-   "\tbectl add (path)*\n"
-#endif
-   "\tbectl jail [{-b | -U}] [{-o key=value | -u key}]... bootenv 
[utility [argument ...]]\n"
-   "\tbectl list [-a] [-D] [-H] [-s]\n"
+   "\tbectl jail {-b | -U} [{-o key=value | -u key}]... "
+   "{jailID | jailName}\n"
+   "\t  bootenv [utility [argument ...]]\n"
+   "\tbectl list [-DHas]\n"
"\tbectl mount beName [mountpoint]\n"
"\tbectl rename origBeName newBeName\n"
-   "\tbectl {ujail | unjail} ⟨jailID | jailName | bootenv)\n"
+   "\tbectl {ujail | unjail} {jailID | jailName} bootenv\n"
"\tbectl {umount | unmount} [-f] beName\n");
 
return (explicit ? 0 : EX_USAGE);
___
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: r340975 - head/usr.bin/clang/llvm-objdump

2018-11-26 Thread Ed Maste
Author: emaste
Date: Mon Nov 26 15:12:58 2018
New Revision: 340975
URL: https://svnweb.freebsd.org/changeset/base/340975

Log:
  llvm-objdump.1: fix igor / mandoc -Tlint warnings
  
  Accidentally omitted from r340972.

Modified:
  head/usr.bin/clang/llvm-objdump/llvm-objdump.1

Modified: head/usr.bin/clang/llvm-objdump/llvm-objdump.1
==
--- head/usr.bin/clang/llvm-objdump/llvm-objdump.1  Mon Nov 26 15:11:32 
2018(r340974)
+++ head/usr.bin/clang/llvm-objdump/llvm-objdump.1  Mon Nov 26 15:12:58 
2018(r340975)
@@ -87,7 +87,8 @@ for more.
 .It Fl -lazy-bind
 Display mach-o lazy binding info.
 .It Fl -line-numbers
-Display source line numbers with disassembly. Implies disassemble object.
+Display source line numbers with disassembly.
+Implies disassemble object.
 .It Fl -macho
 Use MachO specific object file parser.
 .It Fl -mattr Ns = Ns Ar attribute ...
@@ -177,7 +178,7 @@ Print the offset to each archive member for Mach-O arc
 Requires
 .Fl -macho
 and
-.Fl -archive-headers.
+.Fl -archive-headers .
 .It Fl -data-in-code
 Print the data in code table for Mach-O objects.
 .It Fl -dis-symname Ns = Ns Ar symbol
___
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: r340973 - head/usr.bin/clang/llvm-objdump

2018-11-26 Thread Ed Maste
Author: emaste
Date: Mon Nov 26 14:45:58 2018
New Revision: 340973
URL: https://svnweb.freebsd.org/changeset/base/340973

Log:
  llvm-objdump.1: remove invalid options
  
  Some options appear in llvm-objdump's usage information as a side effect
  of its option parsing implementation and are not actually llvm-objdump
  options.  Reported in LLVM review https://reviews.llvm.org/D54864.
  
  Reported by:  Fangrui Song
  Sponsored by: The FreeBSD Foundation

Modified:
  head/usr.bin/clang/llvm-objdump/llvm-objdump.1

Modified: head/usr.bin/clang/llvm-objdump/llvm-objdump.1
==
--- head/usr.bin/clang/llvm-objdump/llvm-objdump.1  Mon Nov 26 14:34:30 
2018(r340972)
+++ head/usr.bin/clang/llvm-objdump/llvm-objdump.1  Mon Nov 26 14:45:58 
2018(r340973)
@@ -103,10 +103,6 @@ Print no leading address.
 Print no leading headers.
 .It Fl -no-show-raw-insn
 When disassembling instructions, do not print the instruction bytes.
-.It Fl -print-after-all
-Print IR after each pass.
-.It Fl -print-before-all
-Print IR before each pass.
 .It Fl -print-imm-hex
 Use hex format for immediate values.
 .It Fl -private-header
@@ -155,10 +151,6 @@ See
 for available targets.
 .It Fl -unwind-info
 Display unwind information.
-.It Fl -verify-debug-info
-Verify debug info.
-.It Fl -verify-dom-info
-Verify dominator info (time consuming).
 .It Fl -version
 Display the version of this program.
 .It Fl -weak-bind
___
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: r340972 - head/usr.bin/clang/llvm-objdump

2018-11-26 Thread Ed Maste
Author: emaste
Date: Mon Nov 26 14:34:30 2018
New Revision: 340972
URL: https://svnweb.freebsd.org/changeset/base/340972

Log:
  llvm-objdump: initial man page
  
  Based on llvm-objdump's online documentation and usage information.
  This serves as a starting point; additional detail and cleanup still
  required.
  
  Also being submitted upstream in LLVM review D54864.  I expect to use
  this bespoke copy while we have LLVM 6.0 or 7.0 in FreeBSD; when we
  update to LLVM 8.0 it should be upstream and we will switch to it.
  
  PR:   233437
  Reviewed by:  bcr (man formatting)
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D18309

Added:
  head/usr.bin/clang/llvm-objdump/llvm-objdump.1   (contents, props changed)
Modified:
  head/usr.bin/clang/llvm-objdump/Makefile

Modified: head/usr.bin/clang/llvm-objdump/Makefile
==
--- head/usr.bin/clang/llvm-objdump/MakefileMon Nov 26 14:27:13 2018
(r340971)
+++ head/usr.bin/clang/llvm-objdump/MakefileMon Nov 26 14:34:30 2018
(r340972)
@@ -1,7 +1,6 @@
 # $FreeBSD$
 
 PROG_CXX=  llvm-objdump
-MAN=
 
 SRCDIR=tools/llvm-objdump
 SRCS+= COFFDump.cpp

Added: head/usr.bin/clang/llvm-objdump/llvm-objdump.1
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/usr.bin/clang/llvm-objdump/llvm-objdump.1  Mon Nov 26 14:34:30 
2018(r340972)
@@ -0,0 +1,213 @@
+.\" This file is distributed under the University of Illinois Open Source
+.\" License.
+.\"
+.Dd November 26, 2018
+.Dt LLVM-OBJDUMP 1
+.Os
+.Sh NAME
+.Nm llvm-objdump
+.Nd LLVM object file dumper
+.Sh SYNOPSIS
+.Nm llvm-objdump
+.Op Ar options
+.Ar objfile ...
+.Sh DESCRIPTION
+.Nm
+prints the contents of object files and final linked images named on the
+command line.
+If no file name is specified,
+.Nm
+will attempt to read from
+.Pa a.out .
+If
+.Pa -
+is used as a file name,
+.Nm
+will process a file on its standard input stream.
+.Nm
+accepts many of the same command line arguments as GNU objdump.
+.Sh OPTIONS
+.Ss General Options
+.Bl -tag -width indent
+.It Fl -aarch64-neon-syntax Ns = Ns Ar value
+Choose style of NEON code to emit from AArch64 backend.
+.Ar value
+may be one of:
+.Bl -tag -width indent
+.It generic
+Generic NEON assembly
+.It apple
+Apple-style NEON assembly
+.El
+.It Fl -arch Ns = Ns Ar value
+Choose architecture(s) from a Mach-O file to dump
+.It Fl -arch-name Ns = Ns ar arch
+Target arch to disassemble for.
+See
+.Fl -version
+for available targets.
+.It Fl -bind
+Display mach-o binding info.
+.It Fl -color
+Use colored syntax highlighting.
+Default autodetect.
+.It Fl -disassemble
+Display assembler mnemonics for machine instructions.
+.It Fl -disassemble-all
+Display assembler mnemonics for the machine instruction in all sections.
+.It Fl -dsym Ns = Ns Ar file
+Use
+.Ar file
+for debug info.
+.It Fl -dwarf Ns = Ns Ar sections
+Dump of dwarf debug sections.
+.Bl -tag -width indent
+.It frames
+.Dv .debug_frame
+.El
+.It Fl -exports-trie
+Display mach-o exported symbols.
+.It Fl -fault-map-section
+Display contents of faultmap section.
+.It Fl -filter-print-funcs Ns = Ns Ar functions
+Only print IR for functions whose name match
+.Ar functions
+for all print-[before|after][-all] options.
+.It Fl -full-leading-addr
+Print full leading address.
+.It Fl g
+Print line information from debug info if available.
+.It Fl h , -headers , -section-headers
+Display summaries of the headers for each section.
+.It Fl -help
+Display available options.
+Use
+.Fl -help-hidden
+for more.
+.It Fl -lazy-bind
+Display mach-o lazy binding info.
+.It Fl -line-numbers
+Display source line numbers with disassembly. Implies disassemble object.
+.It Fl -macho
+Use MachO specific object file parser.
+.It Fl -mattr Ns = Ns Ar attribute ...
+Target specific attributes.
+.It Fl -mcpu Ns = Ns Ar CPU
+Target a specific cpu type.
+Use
+.Fl mcpu Ns = Ns help
+for details.
+.It Fl -no-leading-addr
+Print no leading address.
+.It Fl -no-leading-headers
+Print no leading headers.
+.It Fl -no-show-raw-insn
+When disassembling instructions, do not print the instruction bytes.
+.It Fl -print-after-all
+Print IR after each pass.
+.It Fl -print-before-all
+Print IR before each pass.
+.It Fl -print-imm-hex
+Use hex format for immediate values.
+.It Fl -private-header
+Display only the first format specific file header.
+.It Fl -private-headers
+Display format specific file headers.
+.It Fl r
+Display the relocation entries in the file.
+.It Fl -raw-clang-ast
+Dump the raw binary contents of the clang AST section.
+.It Fl -rebase
+Display mach-o rebasing info.
+.It Fl -reverse-iterate
+Reverse iterate.
+.It Fl -rng-seed Ns = Ns Ar seed
+Seed for the random number generator.
+.It Fl s
+Display the content of each section.
+.It Fl -section Ns 

svn commit: r340971 - head/sys/arm/allwinner

2018-11-26 Thread Emmanuel Vadot
Author: manu
Date: Mon Nov 26 14:27:13 2018
New Revision: 340971
URL: https://svnweb.freebsd.org/changeset/base/340971

Log:
  aw_usbphy: Do not error if it's not phy 0
  
  Only phy0 can switch between host/otg, do not error if we request
  host mode on phy != 0.
  
  MFC after:1 month
  X-MFC with:   r340846

Modified:
  head/sys/arm/allwinner/aw_usbphy.c

Modified: head/sys/arm/allwinner/aw_usbphy.c
==
--- head/sys/arm/allwinner/aw_usbphy.c  Mon Nov 26 14:01:05 2018
(r340970)
+++ head/sys/arm/allwinner/aw_usbphy.c  Mon Nov 26 14:27:13 2018
(r340971)
@@ -389,8 +389,11 @@ awusbphy_set_mode(struct phynode *phynode, int mode)
phy = phynode_get_id(phynode);
sc = device_get_softc(dev);
 
-   if (phy != 0)
-   return (EINVAL);
+   if (phy != 0) {
+   if (mode != PHY_USB_MODE_HOST)
+   return (EINVAL);
+   return (0);
+   }
 
switch (mode) {
case PHY_USB_MODE_HOST:
___
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: r340969 - head/lib/libc

2018-11-26 Thread Ed Maste
Author: emaste
Date: Mon Nov 26 13:56:19 2018
New Revision: 340969
URL: https://svnweb.freebsd.org/changeset/base/340969

Log:
  revert r340640 "libc: forcibly disable BIND_NOW"
  
  When immediate bind mode is requested, as of r340675 rtld processes
  irelocs in PLT immediately after other PLT relocs.  That addresses the
  libc + BIND_NOW startup crash the workaround is no longer needed.
  
  PR:   23

Modified:
  head/lib/libc/Makefile

Modified: head/lib/libc/Makefile
==
--- head/lib/libc/Makefile  Mon Nov 26 13:42:18 2018(r340968)
+++ head/lib/libc/Makefile  Mon Nov 26 13:56:19 2018(r340969)
@@ -6,8 +6,6 @@ SHLIBDIR?= /lib
 
 .include 
 
-# BIND_NOW in libc results in segfault at startup (PR 23)
-MK_BIND_NOW=   no
 # Force building of libc_pic.a
 MK_TOOLCHAIN=  yes
 
___
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: r340968 - head/sys/net

2018-11-26 Thread Mark Johnston
Author: markj
Date: Mon Nov 26 13:42:18 2018
New Revision: 340968
URL: https://svnweb.freebsd.org/changeset/base/340968

Log:
  Plug routing sysctl leaks.
  
  Various structures exported by sysctl_rtsock() contain padding fields
  which were not being zeroed.
  
  Reported by:  Thomas Barabosch, Fraunhofer FKIE
  Reviewed by:  ae
  MFC after:3 days
  Security: kernel memory disclosure
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D18333

Modified:
  head/sys/net/if.h
  head/sys/net/route.h
  head/sys/net/rtsock.c

Modified: head/sys/net/if.h
==
--- head/sys/net/if.h   Mon Nov 26 13:36:30 2018(r340967)
+++ head/sys/net/if.h   Mon Nov 26 13:42:18 2018(r340968)
@@ -271,6 +271,7 @@ struct if_msghdr {
int ifm_addrs;  /* like rtm_addrs */
int ifm_flags;  /* value of if_flags */
u_short ifm_index;  /* index for associated ifp */
+   u_short _ifm_spare1;
struct  if_data ifm_data;/* statistics and other data about if */
 };
 
@@ -296,6 +297,7 @@ struct if_msghdrl {
u_short _ifm_spare1;/* spare space to grow if_index, see if_var.h */
u_short ifm_len;/* length of if_msghdrl incl. if_data */
u_short ifm_data_off;   /* offset of if_data from beginning */
+   int _ifm_spare2;
struct  if_data ifm_data;/* statistics and other data about if */
 };
 
@@ -311,6 +313,7 @@ struct ifa_msghdr {
int ifam_addrs; /* like rtm_addrs */
int ifam_flags; /* value of ifa_flags */
u_short ifam_index; /* index for associated ifp */
+   u_short _ifam_spare1;
int ifam_metric;/* value of ifa_ifp->if_metric */
 };
 
@@ -352,6 +355,7 @@ struct ifma_msghdr {
int ifmam_addrs;/* like rtm_addrs */
int ifmam_flags;/* value of ifa_flags */
u_short ifmam_index;/* index for associated ifp */
+   u_short _ifmam_spare1;
 };
 
 /*

Modified: head/sys/net/route.h
==
--- head/sys/net/route.hMon Nov 26 13:36:30 2018(r340967)
+++ head/sys/net/route.hMon Nov 26 13:42:18 2018(r340968)
@@ -251,6 +251,7 @@ struct rt_msghdr {
u_char  rtm_version;/* future binary compatibility */
u_char  rtm_type;   /* message type */
u_short rtm_index;  /* index for associated ifp */
+   u_short _rtm_spare1;
int rtm_flags;  /* flags, incl. kern & message, e.g. DONE */
int rtm_addrs;  /* bitmask identifying sockaddrs in msg */
pid_t   rtm_pid;/* identify sender */

Modified: head/sys/net/rtsock.c
==
--- head/sys/net/rtsock.c   Mon Nov 26 13:36:30 2018(r340967)
+++ head/sys/net/rtsock.c   Mon Nov 26 13:42:18 2018(r340968)
@@ -83,6 +83,7 @@ struct if_msghdr32 {
int32_t ifm_addrs;
int32_t ifm_flags;
uint16_t ifm_index;
+   uint16_t _ifm_spare1;
struct  if_data ifm_data;
 };
 
@@ -96,6 +97,7 @@ struct if_msghdrl32 {
uint16_t _ifm_spare1;
uint16_t ifm_len;
uint16_t ifm_data_off;
+   uint32_t _ifm_spare2;
struct  if_data ifm_data;
 };
 
@@ -1219,8 +1221,11 @@ rtsock_msg_buffer(int type, struct rt_addrinfo *rtinfo
dlen = ALIGN(len) - len;
if (buflen < dlen)
cp = NULL;
-   else
+   else {
+   bzero(cp, dlen);
+   cp += dlen;
buflen -= dlen;
+   }
}
len = ALIGN(len);
 
@@ -1577,6 +1582,8 @@ sysctl_dumpentry(struct radix_node *rn, void *vw)
if (w->w_req && w->w_tmem) {
struct rt_msghdr *rtm = (struct rt_msghdr *)w->w_tmem;
 
+   bzero(&rtm->rtm_index,
+   sizeof(*rtm) - offsetof(struct rt_msghdr, rtm_index));
if (rt->rt_flags & RTF_GWFLAG_COMPAT)
rtm->rtm_flags = RTF_GATEWAY | 
(rt->rt_flags & ~RTF_GWFLAG_COMPAT);
@@ -1584,7 +1591,6 @@ sysctl_dumpentry(struct radix_node *rn, void *vw)
rtm->rtm_flags = rt->rt_flags;
rt_getmetrics(rt, &rtm->rtm_rmx);
rtm->rtm_index = rt->rt_ifp->if_index;
-   rtm->rtm_errno = rtm->rtm_pid = rtm->rtm_seq = 0;
rtm->rtm_addrs = info.rti_addrs;
error = SYSCTL_OUT(w->w_req, (caddr_t)rtm, size);
return (error);
@@ -1612,6 +1618,7 @@ sysctl_iflist_ifml(struct ifnet *ifp, const struct if_
ifm32->_ifm_spare1 = 0;
ifm32->ifm_len = sizeof(*ifm32);
ifm32->ifm_data_off = offsetof(struct if_msgh

svn commit: r340939 - in head/contrib/libarchive/libarchive: . test

2018-11-26 Thread Martin Matuska
Author: mm
Date: Mon Nov 26 11:04:35 2018
New Revision: 340939
URL: https://svnweb.freebsd.org/changeset/base/340939

Log:
  MFV r340938:
  Sync libarchive with vendor.
  
  Relevant vendor changes:
Issue #1096: Support extracting ACLs with in-entry comments (GNU tar)
PR #1023: Support extracting extattrs as non-root on non-user-writeable
  files
  
  MFC after:1 week

Modified:
  head/contrib/libarchive/libarchive/archive_acl.c
  head/contrib/libarchive/libarchive/archive_write_disk_posix.c
  head/contrib/libarchive/libarchive/test/test_extattr_freebsd.c
  head/contrib/libarchive/libarchive/test/test_read_format_rar5.c
Directory Properties:
  head/contrib/libarchive/   (props changed)

Modified: head/contrib/libarchive/libarchive/archive_acl.c
==
--- head/contrib/libarchive/libarchive/archive_acl.cMon Nov 26 11:01:51 
2018(r340938)
+++ head/contrib/libarchive/libarchive/archive_acl.cMon Nov 26 11:04:35 
2018(r340939)
@@ -1585,18 +1585,30 @@ next_field_w(const wchar_t **wp, const wchar_t **start
 
/* Scan for the separator. */
while (**wp != L'\0' && **wp != L',' && **wp != L':' &&
-   **wp != L'\n') {
+   **wp != L'\n' && **wp != L'#') {
(*wp)++;
}
*sep = **wp;
 
-   /* Trim trailing whitespace to locate end of field. */
-   *end = *wp - 1;
-   while (**end == L' ' || **end == L'\t' || **end == L'\n') {
-   (*end)--;
+   /* Locate end of field, trim trailing whitespace if necessary */
+   if (*wp == *start) {
+   *end = *wp;
+   } else {
+   *end = *wp - 1;
+   while (**end == L' ' || **end == L'\t' || **end == L'\n') {
+   (*end)--;
+   }
+   (*end)++;
}
-   (*end)++;
 
+   /* Handle in-field comments */
+   if (*sep == L'#') {
+   while (**wp != L'\0' && **wp != L',' && **wp != L'\n') {
+   (*wp)++;
+   }
+   *sep = **wp;
+   }
+
/* Adjust scanner location. */
if (**wp != L'\0')
(*wp)++;
@@ -1646,7 +1658,7 @@ archive_acl_from_text_l(struct archive_acl *acl, const
ret = ARCHIVE_OK;
types = 0;
 
-   while (text != NULL  &&  *text != '\0') {
+   while (text != NULL &&  *text != '\0') {
/*
 * Parse the fields out of the next entry,
 * advance 'text' to start of next entry.
@@ -2057,23 +2069,30 @@ next_field(const char **p, const char **start,
*start = *p;
 
/* Scan for the separator. */
-   while (**p != '\0' && **p != ',' && **p != ':' && **p != '\n') {
+   while (**p != '\0' && **p != ',' && **p != ':' && **p != '\n' &&
+   **p != '#') {
(*p)++;
}
*sep = **p;
 
-   /* If the field is only whitespace, bail out now. */
-   if (**p == '\0') {
+   /* Locate end of field, trim trailing whitespace if necessary */
+   if (*p == *start) {
*end = *p;
-   return;
+   } else {
+   *end = *p - 1;
+   while (**end == ' ' || **end == '\t' || **end == '\n') {
+   (*end)--;
+   }
+   (*end)++;
}
 
-   /* Trim trailing whitespace to locate end of field. */
-   *end = *p - 1;
-   while (**end == ' ' || **end == '\t' || **end == '\n') {
-   (*end)--;
+   /* Handle in-field comments */
+   if (*sep == '#') {
+   while (**p != '\0' && **p != ',' && **p != '\n') {
+   (*p)++;
+   }
+   *sep = **p;
}
-   (*end)++;
 
/* Adjust scanner location. */
if (**p != '\0')

Modified: head/contrib/libarchive/libarchive/archive_write_disk_posix.c
==
--- head/contrib/libarchive/libarchive/archive_write_disk_posix.c   Mon Nov 
26 11:01:51 2018(r340938)
+++ head/contrib/libarchive/libarchive/archive_write_disk_posix.c   Mon Nov 
26 11:04:35 2018(r340939)
@@ -1705,6 +1705,20 @@ _archive_write_disk_finish_entry(struct archive *_a)
}
 
/*
+* HYPOTHESIS:
+* If we're not root, we won't be setting any security
+* attributes that may be wiped by the set_mode() routine
+* below.  We also can't set xattr on non-owner-writable files,
+* which may be the state after set_mode(). Perform
+* set_xattrs() first based on these constraints.
+*/
+   if (a->user_uid != 0 &&
+   (a->todo & TODO_XATTR)) {
+   int r2 = set_xattrs(a);
+   if (r2 < ret) ret = r2;
+   }
+
+   /*
 * set_mode must precede ACLs on systems such as Solaris and
 * FreeBSD where setting

svn commit: r340933 - head/lib/libedit

2018-11-26 Thread Baptiste Daroussin
Author: bapt
Date: Mon Nov 26 08:16:33 2018
New Revision: 340933
URL: https://svnweb.freebsd.org/changeset/base/340933

Log:
  libedit: improve multibyte support
  
  Until this commit libedit only supported UTF-8 for multibyte charset
  Improve it to support other multibyte charsets
  
  Tested with eucJP and SJIS charsets.
  Note that this change as been review and committed in upstream libedit
  as well via christos@NetBSD
  
  Submitted by: naito.yuichiro _at_ gmail.com
  Reviewed by:  bapt, pfg, yuripv, 0mp
  MFC after:1 month
  Differential Revision:https://reviews.freebsd.org/D17903

Modified:
  head/lib/libedit/chartype.c
  head/lib/libedit/chartype.h
  head/lib/libedit/el.c
  head/lib/libedit/el.h
  head/lib/libedit/read.c

Modified: head/lib/libedit/chartype.c
==
--- head/lib/libedit/chartype.c Mon Nov 26 07:42:52 2018(r340932)
+++ head/lib/libedit/chartype.c Mon Nov 26 08:16:33 2018(r340933)
@@ -37,6 +37,7 @@ __RCSID("$NetBSD: chartype.c,v 1.23 2016/02/28 23:02:2
 __FBSDID("$FreeBSD$");
 
 #include 
+#include 
 #include 
 #include 
 
@@ -182,17 +183,13 @@ ct_decode_argv(int argc, const char *argv[], ct_buffer
 protected size_t
 ct_enc_width(Char c)
 {
-   /* UTF-8 encoding specific values */
-   if (c < 0x80)
-   return 1;
-   else if (c < 0x0800)
-   return 2;
-   else if (c < 0x1)
-   return 3;
-   else if (c < 0x11)
-   return 4;
-   else
-   return 0; /* not a valid codepoint */
+   mbstate_t ps = (mbstate_t){{0}};
+   size_t len;
+   char cbuf[MB_LEN_MAX];
+   len = ct_wcrtomb(cbuf, c, &ps);
+   if (len == (size_t)-1)
+   return (0);
+   return (len);
 }
 
 protected ssize_t

Modified: head/lib/libedit/chartype.h
==
--- head/lib/libedit/chartype.h Mon Nov 26 07:42:52 2018(r340932)
+++ head/lib/libedit/chartype.h Mon Nov 26 08:16:33 2018(r340933)
@@ -56,6 +56,7 @@
 
 #define ct_wctob wctob
 #define ct_wctombwctomb
+#define ct_wcrtomb   wcrtomb
 #define ct_wctomb_reset  wctomb(0,0)
 #define ct_wcstombs  wcstombs
 #define ct_mbstowcs  mbstowcs
@@ -109,6 +110,7 @@ Width(wchar_t c)
 
 #define ct_wctob(w)  ((int)(w))
 #define ct_wctomberror
+#define ct_wcrtomb   error
 #define ct_wctomb_reset
 #define ct_wcstombs(a, b, c)(strncpy(a, b, c), strlen(a))
 #define ct_mbstowcs(a, b, c)(strncpy(a, b, c), strlen(a))

Modified: head/lib/libedit/el.c
==
--- head/lib/libedit/el.c   Mon Nov 26 07:42:52 2018(r340932)
+++ head/lib/libedit/el.c   Mon Nov 26 08:16:33 2018(r340933)
@@ -99,10 +99,6 @@ el_init_fd(const char *prog, FILE *fin, FILE *fout, FI
  * Initialize all the modules. Order is important!!!
  */
el->el_flags = 0;
-   if (setlocale(LC_CTYPE, NULL) != NULL){
-   if (strcmp(nl_langinfo(CODESET), "UTF-8") == 0)
-   el->el_flags |= CHARSET_IS_UTF8;
-   }
 
if (terminal_init(el) == -1) {
el_free(el->el_prog);
@@ -293,7 +289,7 @@ FUN(el,set)(EditLine *el, int op, ...)
void *ptr = va_arg(ap, void *);
 
rv = hist_set(el, func, ptr);
-   if (!(el->el_flags & CHARSET_IS_UTF8))
+   if (MB_CUR_MAX == 1)
el->el_flags &= ~NARROW_HISTORY;
break;
}

Modified: head/lib/libedit/el.h
==
--- head/lib/libedit/el.h   Mon Nov 26 07:42:52 2018(r340932)
+++ head/lib/libedit/el.h   Mon Nov 26 08:16:33 2018(r340933)
@@ -56,7 +56,6 @@
 #defineNO_TTY  0x02
 #defineEDIT_DISABLED   0x04
 #defineUNBUFFERED  0x08
-#defineCHARSET_IS_UTF8 0x10
 #defineNARROW_HISTORY  0x40
 
 typedef unsigned char el_action_t; /* Index to command array   */

Modified: head/lib/libedit/read.c
==
--- head/lib/libedit/read.c Mon Nov 26 07:42:52 2018(r340932)
+++ head/lib/libedit/read.c Mon Nov 26 08:16:33 2018(r340933)
@@ -363,13 +363,7 @@ read_char(EditLine *el, wchar_t *cp)
goto again;
}
case (size_t)-2:
-   /*
-* We don't support other multibyte charsets.
-* The second condition shouldn't happen
-* and is here merely for additional safety.
-*/
-   if ((el->el_flags & CHARSET_IS_UTF8) == 0 ||
-