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

2018-03-19 Thread Jeff Roberson

Thanks for fixing my bug.  Sorry I didn't build universe for this one.

Thanks,
Jeff

On Tue, 20 Mar 2018, Justin Hibbits wrote:


Author: jhibbits
Date: Tue Mar 20 02:01:30 2018
New Revision: 331233
URL: https://svnweb.freebsd.org/changeset/base/331233

Log:
 Cast through uintptr_t to narrow the buf domain pointer on 32-bit archs

 arg2 is an intmax_t, which on 32-bit architectures is 64 bits, wider than a
 pointer.  When [i] is added to arg2 it widens from uintptr_t to
 intmax_t, then gcc whines when it gets cast to a pointer.  Casting through
 uintptr_t silences this warning.

Modified:
 head/sys/kern/vfs_bio.c

Modified: head/sys/kern/vfs_bio.c
==
--- head/sys/kern/vfs_bio.c Tue Mar 20 01:33:04 2018(r331232)
+++ head/sys/kern/vfs_bio.c Tue Mar 20 02:01:30 2018(r331233)
@@ -435,7 +435,7 @@ sysctl_bufdomain_int(SYSCTL_HANDLER_ARGS)
return (error);
*(int *)arg1 = value;
for (i = 0; i < buf_domains; i++)
-   *(int *)(((uintptr_t)[i]) + arg2) =
+   *(int *)(uintptr_t)(((uintptr_t)[i]) + arg2) =
value / buf_domains;

return (error);
@@ -454,7 +454,7 @@ sysctl_bufdomain_long(SYSCTL_HANDLER_ARGS)
return (error);
*(long *)arg1 = value;
for (i = 0; i < buf_domains; i++)
-   *(long *)(((uintptr_t)[i]) + arg2) =
+   *(long *)(uintptr_t)(((uintptr_t)[i]) + arg2) =
value / buf_domains;

return (error);


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


Re: svn commit: r331238 - head/sys/cam/nvme

2018-03-19 Thread O. Hartmann
On Tue, 20 Mar 2018 03:37:09 + (UTC)
Warner Losh  wrote:

> Author: imp
> Date: Tue Mar 20 03:37:09 2018
> New Revision: 331238
> URL: https://svnweb.freebsd.org/changeset/base/331238
> 
> Log:
>   Make kern.cam.nda.num_trim tunable to limit the number of BIO_DELETE
>   requests that we'll collapse into one DSM_TRIM. By default it is a
>   256, which is the max that will fit into a 4k page.
>   
>   Sponsored by: Netflix
> 
> Modified:
>   head/sys/cam/nvme/nvme_da.c
> 
> Modified: head/sys/cam/nvme/nvme_da.c
> ==
> --- head/sys/cam/nvme/nvme_da.c   Tue Mar 20 03:37:04 2018
> (r331237) +++ head/sys/cam/nvme/nvme_da.c Tue Mar 20 03:37:09
> 2018  (r331238) @@ -167,19 +167,22 @@ static void
> ndasuspend(void *arg); #define NDA_MAX_TRIM_ENTRIES 256   /* Number of
> DSM trims to use, max 256 */ #endif
>  
> +static SYSCTL_NODE(_kern_cam, OID_AUTO, nda, CTLFLAG_RD, 0,
> +"CAM Direct Access Disk driver");
> +
>  //static int nda_retry_count = NDA_DEFAULT_RETRY;
>  static int nda_send_ordered = NDA_DEFAULT_SEND_ORDERED;
>  static int nda_default_timeout = NDA_DEFAULT_TIMEOUT;
>  static int nda_max_trim_entries = NDA_MAX_TRIM_ENTRIES;
> +SYSCTL_INT(_kern_cam_nda, OID_AUTO, max_trim, CTLFLAG_RDTUN,
> +_max_trim_entries, NDA_MAX_TRIM_ENTRIES,
> +"Maximum number of BIO_DELETE to send down as a DSM TRIM.");
>  
>  /*
>   * All NVMe media is non-rotational, so all nvme device instances
>   * share this to implement the sysctl.
>   */
>  static int nda_rotating_media = 0;
> -
> -static SYSCTL_NODE(_kern_cam, OID_AUTO, nda, CTLFLAG_RD, 0,
> -"CAM Direct Access Disk driver");
>  
>  static struct periph_driver ndadriver =
>  {
> ___
> svn-src-h...@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"

Buildkernel on CURRENT fails with the error shown below sinde this commit:

[...]
--- nvme_da.o ---
/usr/src/sys/cam/nvme/nvme_da.c:221:72: error: too few arguments provided to
function-like macro invocation KASSERT(num_ranges * sizeof(struct
nvme_dsm_range) < NVME_MAX_DSM_TRIM); ^
/usr/src/sys/sys/systm.h:99:9: note: macro 'KASSERT' defined here
#define KASSERT(exp,msg) do { \
^
/usr/src/sys/cam/nvme/nvme_da.c:221:2: error: use of undeclared identifier
'KASSERT' KASSERT(num_ranges * sizeof(struct nvme_dsm_range) <
NVME_MAX_DSM_TRIM); ^
2 errors generated.
*** [nvme_da.o] Error code 1
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331237 - head/sys/cam/nvme

2018-03-19 Thread Warner Losh
Author: imp
Date: Tue Mar 20 03:37:04 2018
New Revision: 331237
URL: https://svnweb.freebsd.org/changeset/base/331237

Log:
  Remove some redundant MPSAFE flags.
  
  This was pointed out in a code review I'm having trouble finding right
  now, but go ahead and eliminate these.
  
  Sponsored by: Netfix

Modified:
  head/sys/cam/nvme/nvme_da.c

Modified: head/sys/cam/nvme/nvme_da.c
==
--- head/sys/cam/nvme/nvme_da.c Tue Mar 20 03:36:51 2018(r331236)
+++ head/sys/cam/nvme/nvme_da.c Tue Mar 20 03:37:04 2018(r331237)
@@ -626,25 +626,20 @@ ndasysctlinit(void *context, int pending)
}
 
SYSCTL_ADD_INT(>sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree),
-   OID_AUTO, "unmapped_io", CTLFLAG_RD | CTLFLAG_MPSAFE,
-   >unmappedio, 0, "Unmapped I/O leaf");
+   OID_AUTO, "unmapped_io", CTLFLAG_RD,
+   >unmappedio, 0, "Unmapped I/O leaf");
 
SYSCTL_ADD_QUAD(>sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree),
-   OID_AUTO, "deletes", CTLFLAG_RD | CTLFLAG_MPSAFE,
-   >deletes, "Number of BIO_DELETE requests");
+   OID_AUTO, "deletes", CTLFLAG_RD,
+   >deletes, "Number of BIO_DELETE requests");
 
SYSCTL_ADD_QUAD(>sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree),
-   OID_AUTO, "dsm_req", CTLFLAG_RD | CTLFLAG_MPSAFE,
-   >dsm_req, "Number of DSM requests sent to SIM");
+   OID_AUTO, "dsm_req", CTLFLAG_RD,
+   >dsm_req, "Number of DSM requests sent to SIM");
 
-   SYSCTL_ADD_INT(>sysctl_ctx,
-  SYSCTL_CHILDREN(softc->sysctl_tree),
-  OID_AUTO,
-  "rotating",
-  CTLFLAG_RD | CTLFLAG_MPSAFE, 
-  _rotating_media,
-  0,
-  "Rotating media");
+   SYSCTL_ADD_INT(>sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree),
+   OID_AUTO, "rotating", CTLFLAG_RD, _rotating_media, 1,
+   "Rotating media");
 
 #ifdef CAM_IO_STATS
softc->sysctl_stats_tree = SYSCTL_ADD_NODE(>sysctl_stats_ctx,
@@ -657,17 +652,17 @@ ndasysctlinit(void *context, int pending)
}
SYSCTL_ADD_INT(>sysctl_stats_ctx,
SYSCTL_CHILDREN(softc->sysctl_stats_tree),
-   OID_AUTO, "timeouts", CTLFLAG_RD | CTLFLAG_MPSAFE,
+   OID_AUTO, "timeouts", CTLFLAG_RD,
>timeouts, 0,
"Device timeouts reported by the SIM");
SYSCTL_ADD_INT(>sysctl_stats_ctx,
SYSCTL_CHILDREN(softc->sysctl_stats_tree),
-   OID_AUTO, "errors", CTLFLAG_RD | CTLFLAG_MPSAFE,
+   OID_AUTO, "errors", CTLFLAG_RD,
>errors, 0,
"Transport errors reported by the SIM.");
SYSCTL_ADD_INT(>sysctl_stats_ctx,
SYSCTL_CHILDREN(softc->sysctl_stats_tree),
-   OID_AUTO, "pack_invalidations", CTLFLAG_RD | CTLFLAG_MPSAFE,
+   OID_AUTO, "pack_invalidations", CTLFLAG_RD,
>invalidations, 0,
"Device pack invalidations.");
 #endif
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331236 - head

2018-03-19 Thread Warner Losh
Author: imp
Date: Tue Mar 20 03:36:51 2018
New Revision: 331236
URL: https://svnweb.freebsd.org/changeset/base/331236

Log:
  Note: this isn't a general thing. It only affects u-boot-based arm64
  systems. Make sure the note says that specific case only. Also,
  provide a recipe to do it.
  
  Sponsored by: Netflix

Modified:
  head/UPDATING

Modified: head/UPDATING
==
--- head/UPDATING   Tue Mar 20 02:54:32 2018(r331235)
+++ head/UPDATING   Tue Mar 20 03:36:51 2018(r331236)
@@ -52,11 +52,22 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW:
 ** SPECIAL WARNING: **
 
 20180319:
-   For UEFI systems: the UEFI loader(8), loader.efi, should be updated in
-   conjunction with installing a new kernel after r330868. The kernel,
-   after this revision, will be more lenient when mapping addresses for
-   UEFI Runtime Services and this may result in a kernel panic without the
-   corresponding loader(8) update.
+   For u-boot based arm64 UEFI systems: the UEFI loader(8), loader.efi,
+   should be updated in conjunction with installing a new kernel after
+   r330868. The kernel, after this revision, will be more lenient when
+   mapping addresses for UEFI Runtime Services and this may result in a
+   kernel panic without the corresponding loader(8) update. If you have a
+   recent kernel, you can do a installkernel / installworld and then reboot
+   as there's no recent syscall changes. If you have an older kernel and/or
+   a 11.x system, the following sequence is safe:
+   % make buildworld
+   % make buildkernel
+   % sudo make installkernel
+   % cd stand
+   % sudo make install
+   % sudo reboot
+   ...
+   % sudo make installworld
 
 20180212:
FreeBSD boot loader enhanced with Lua scripting. It's purely opt-in for
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331239 - in head/sys: cam/nvme dev/nvme

2018-03-19 Thread Warner Losh
Author: imp
Date: Tue Mar 20 03:37:14 2018
New Revision: 331239
URL: https://svnweb.freebsd.org/changeset/base/331239

Log:
  Starting LBA is a 64bit number, so use htole64 instead of htole32. The
  latter casts the LBA to a 32-bit number before assigning it to the 64
  bit structure entity. This works fine on the first 2TB of TRIMs, but
  terrible beyond that due to trucation.
  
  Also, add an assert to make sure we don't end too many DSM TRIM
  entries in one request.
  
  Sponsored by: Netflix

Modified:
  head/sys/cam/nvme/nvme_da.c
  head/sys/dev/nvme/nvme.h

Modified: head/sys/cam/nvme/nvme_da.c
==
--- head/sys/cam/nvme/nvme_da.c Tue Mar 20 03:37:09 2018(r331238)
+++ head/sys/cam/nvme/nvme_da.c Tue Mar 20 03:37:14 2018(r331239)
@@ -164,7 +164,7 @@ static void ndasuspend(void *arg);
 #defineNDA_DEFAULT_RETRY   4
 #endif
 #ifndef NDA_MAX_TRIM_ENTRIES
-#define NDA_MAX_TRIM_ENTRIES 256   /* Number of DSM trims to use, max 256 
*/
+#define NDA_MAX_TRIM_ENTRIES  (NVME_MAX_DSM_TRIM / sizeof(struct 
nvme_dsm_range))/* Number of DSM trims to use, max 256 */
 #endif
 
 static SYSCTL_NODE(_kern_cam, OID_AUTO, nda, CTLFLAG_RD, 0,
@@ -218,6 +218,8 @@ static void
 nda_nvme_trim(struct nda_softc *softc, struct ccb_nvmeio *nvmeio,
 void *payload, uint32_t num_ranges)
 {
+   KASSERT(num_ranges * sizeof(struct nvme_dsm_range) < NVME_MAX_DSM_TRIM);
+
cam_fill_nvmeio(nvmeio,
0,  /* retries */
ndadone,/* cbfcnp */
@@ -957,7 +959,7 @@ ndastart(struct cam_periph *periph, union ccb *start_c
dsm_range->length =
htole32(bp1->bio_bcount / 
softc->disk->d_sectorsize);
dsm_range->starting_lba =
-   htole32(bp1->bio_offset / 
softc->disk->d_sectorsize);
+   htole64(bp1->bio_offset / 
softc->disk->d_sectorsize);
dsm_range++;
if (dsm_range >= dsm_end)
break;

Modified: head/sys/dev/nvme/nvme.h
==
--- head/sys/dev/nvme/nvme.hTue Mar 20 03:37:09 2018(r331238)
+++ head/sys/dev/nvme/nvme.hTue Mar 20 03:37:14 2018(r331239)
@@ -478,7 +478,6 @@ struct nvme_completion {
 _Static_assert(sizeof(struct nvme_completion) == 4 * 4, "bad size for 
nvme_completion");
 
 struct nvme_dsm_range {
-
uint32_t attributes;
uint32_t length;
uint64_t starting_lba;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331238 - head/sys/cam/nvme

2018-03-19 Thread Warner Losh
Author: imp
Date: Tue Mar 20 03:37:09 2018
New Revision: 331238
URL: https://svnweb.freebsd.org/changeset/base/331238

Log:
  Make kern.cam.nda.num_trim tunable to limit the number of BIO_DELETE
  requests that we'll collapse into one DSM_TRIM. By default it is a
  256, which is the max that will fit into a 4k page.
  
  Sponsored by: Netflix

Modified:
  head/sys/cam/nvme/nvme_da.c

Modified: head/sys/cam/nvme/nvme_da.c
==
--- head/sys/cam/nvme/nvme_da.c Tue Mar 20 03:37:04 2018(r331237)
+++ head/sys/cam/nvme/nvme_da.c Tue Mar 20 03:37:09 2018(r331238)
@@ -167,19 +167,22 @@ static void   ndasuspend(void *arg);
 #define NDA_MAX_TRIM_ENTRIES 256   /* Number of DSM trims to use, max 256 
*/
 #endif
 
+static SYSCTL_NODE(_kern_cam, OID_AUTO, nda, CTLFLAG_RD, 0,
+"CAM Direct Access Disk driver");
+
 //static int nda_retry_count = NDA_DEFAULT_RETRY;
 static int nda_send_ordered = NDA_DEFAULT_SEND_ORDERED;
 static int nda_default_timeout = NDA_DEFAULT_TIMEOUT;
 static int nda_max_trim_entries = NDA_MAX_TRIM_ENTRIES;
+SYSCTL_INT(_kern_cam_nda, OID_AUTO, max_trim, CTLFLAG_RDTUN,
+_max_trim_entries, NDA_MAX_TRIM_ENTRIES,
+"Maximum number of BIO_DELETE to send down as a DSM TRIM.");
 
 /*
  * All NVMe media is non-rotational, so all nvme device instances
  * share this to implement the sysctl.
  */
 static int nda_rotating_media = 0;
-
-static SYSCTL_NODE(_kern_cam, OID_AUTO, nda, CTLFLAG_RD, 0,
-"CAM Direct Access Disk driver");
 
 static struct periph_driver ndadriver =
 {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r319510 - head/contrib/xz/src/liblzma/check

2018-03-19 Thread Ed Maste
On 18 March 2018 at 18:25, Eitan Adler  wrote:
> On 2 June 2017 at 19:42, Ed Maste  wrote:
>> Author: emaste
>> Date: Sat Jun  3 02:42:49 2017
>> New Revision: 319510
>> URL: https://svnweb.freebsd.org/changeset/base/319510
>>
>> Log:
>>   xz: set noexec stack flag on FreeBSD
>
> Heya. Is this one safe to MFC ?

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


svn commit: r331235 - stable/11/contrib/xz/src/liblzma/check

2018-03-19 Thread Ed Maste
Author: emaste
Date: Tue Mar 20 02:54:32 2018
New Revision: 331235
URL: https://svnweb.freebsd.org/changeset/base/331235

Log:
  MFC r319510: xz: set noexec stack flag on FreeBSD

Modified:
  stable/11/contrib/xz/src/liblzma/check/crc32_x86.S
  stable/11/contrib/xz/src/liblzma/check/crc64_x86.S
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/contrib/xz/src/liblzma/check/crc32_x86.S
==
--- stable/11/contrib/xz/src/liblzma/check/crc32_x86.S  Tue Mar 20 02:50:11 
2018(r331234)
+++ stable/11/contrib/xz/src/liblzma/check/crc32_x86.S  Tue Mar 20 02:54:32 
2018(r331235)
@@ -299,6 +299,6 @@ LZMA_CRC32:
  * use __linux__ here, but I don't know a way to detect when
  * we are using GNU assembler.
  */
-#if defined(__ELF__) && defined(__linux__)
+#if defined(__ELF__) && (defined(__FreeBSD__) || defined(__linux__))
.section.note.GNU-stack,"",@progbits
 #endif

Modified: stable/11/contrib/xz/src/liblzma/check/crc64_x86.S
==
--- stable/11/contrib/xz/src/liblzma/check/crc64_x86.S  Tue Mar 20 02:50:11 
2018(r331234)
+++ stable/11/contrib/xz/src/liblzma/check/crc64_x86.S  Tue Mar 20 02:54:32 
2018(r331235)
@@ -282,6 +282,6 @@ LZMA_CRC64:
  * use __linux__ here, but I don't know a way to detect when
  * we are using GNU assembler.
  */
-#if defined(__ELF__) && defined(__linux__)
+#if defined(__ELF__) && (defined(__FreeBSD__) || defined(__linux__))
.section.note.GNU-stack,"",@progbits
 #endif
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331234 - head/sys/i386/linux

2018-03-19 Thread Ed Maste
Author: emaste
Date: Tue Mar 20 02:50:11 2018
New Revision: 331234
URL: https://svnweb.freebsd.org/changeset/base/331234

Log:
  Rationalize license text on Linuxolator files
  
  i386 linux.h missed in r330239.
  
  Approved by:  sos
  MFC after:1 week
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/i386/linux/linux.h

Modified: head/sys/i386/linux/linux.h
==
--- head/sys/i386/linux/linux.h Tue Mar 20 02:01:30 2018(r331233)
+++ head/sys/i386/linux/linux.h Tue Mar 20 02:50:11 2018(r331234)
@@ -1,5 +1,5 @@
 /*-
- * SPDX-License-Identifier: BSD-3-Clause
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
  *
  * Copyright (c) 1994-1996 Søren Schmidt
  * All rights reserved.
@@ -8,25 +8,22 @@
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
- *notice, this list of conditions and the following disclaimer
- *in this position and unchanged.
+ *notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *notice, this list of conditions and the following disclaimer in the
  *documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- *derived from this software without specific prior written permission
  *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
  * $FreeBSD$
  */
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331233 - head/sys/kern

2018-03-19 Thread Justin Hibbits
Author: jhibbits
Date: Tue Mar 20 02:01:30 2018
New Revision: 331233
URL: https://svnweb.freebsd.org/changeset/base/331233

Log:
  Cast through uintptr_t to narrow the buf domain pointer on 32-bit archs
  
  arg2 is an intmax_t, which on 32-bit architectures is 64 bits, wider than a
  pointer.  When [i] is added to arg2 it widens from uintptr_t to
  intmax_t, then gcc whines when it gets cast to a pointer.  Casting through
  uintptr_t silences this warning.

Modified:
  head/sys/kern/vfs_bio.c

Modified: head/sys/kern/vfs_bio.c
==
--- head/sys/kern/vfs_bio.c Tue Mar 20 01:33:04 2018(r331232)
+++ head/sys/kern/vfs_bio.c Tue Mar 20 02:01:30 2018(r331233)
@@ -435,7 +435,7 @@ sysctl_bufdomain_int(SYSCTL_HANDLER_ARGS)
return (error);
*(int *)arg1 = value;
for (i = 0; i < buf_domains; i++)
-   *(int *)(((uintptr_t)[i]) + arg2) =
+   *(int *)(uintptr_t)(((uintptr_t)[i]) + arg2) =
value / buf_domains;
 
return (error);
@@ -454,7 +454,7 @@ sysctl_bufdomain_long(SYSCTL_HANDLER_ARGS)
return (error);
*(long *)arg1 = value;
for (i = 0; i < buf_domains; i++)
-   *(long *)(((uintptr_t)[i]) + arg2) =
+   *(long *)(uintptr_t)(((uintptr_t)[i]) + arg2) =
value / buf_domains;
 
return (error);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Factory direct signs outdoor advertising

2018-03-19 Thread Reed
Hi ,
Thank you for your time to open this email. There is a great business 
opportunity which is waiting for you.
Do you have any interest in Interactive Displaying Equipment? This is Hongbao 
which is dealing in this kind of requirement. We are looking for local agent 
for all over the world.
If you have any interest, please contact us. We will send you our product 
catalog.
Wish to hear from you soon.--Best regards, Mr. 
ReedSales Manager Chongqing Hongbao Technology Co., Ltd.Address: Building 9, 
Area C, Jinglong Industrial Park, Jiulongpo District, Chongqing, China
SKYPE: iec05_1Office: 0086 23 8867 0519Whatsapp: +86 17784283905
Contact of General Manager,Mr.Alan TanSKYPE: sendaindustryWhatsapp/Cellphone: 
+86 1800837

k3LdG8HMdNYVVZtaWT4YAhEXdTwogJVQloud3I61vekhTIKdvDUOmkj2pOZMCivtS8zwvf6dM3slXm4v9iTCO7t05rNfIkodJQpK8dHfxH2jRX43JuDjpSFLEyq3rQusEfC6WjmVBD575a98mKwdG5NRbE5ANDNGczEClY6q8HIMMyGupiGGkgLzrKVidM8XPoUvwxMoE55Zn14CYBauW6mWN4aA2OcmyKWoEaYSwh2ebMcqGijCBE0I2XHrncmPTJqC5FYNDiYF47L1SJTJuAKUJdlGtxvjVclrmzl0kvZiFlEVcGyDiCliYvTRjik5NEJRLjEioTpYBrenzqtMYR1iR3tRGuG1bTu1CN9T1geodmGwgvhTPx7VCqZIQNCUcnNIWdLMhzKIDD5vmWAbcNcDLzpbNr3eDkcPzYz3JvBfMpiZlulTcqHoa9WnNAZPww4iqfVnmxsHbXQmgqQi591dCNEp1bf9vMJglZy5yXxFY0ddjA7nJGJmuRGDAwmahibpdA0gRLJ7BleBAr6q4SpP2nLujVu2BnoFPNZJzRvYXCK9C529qV6oTmnQOwXWgHweXyMMrnQdmrSqCCReSkBFhZMtq8U3TzHf5wb3igH34S2ruWecFJ4W5QXXMimisNjNKCk6qNVCDyBoXlZtUHoauLafyeh0ToAhzfHRC7LRNsixfyZrjSoKp8iYs5xcwUIeXjOID7RMWwn2sCZ0eQH00QRrWIpwAzkSJ4zVJhNb1COSLfwP5xXGdHe7snLUIkbmcuin34gX2vZo1ZGHcAr3CEF2QrtmwTtHqsGgX8L1g0DIIQ6sG4H7T8JxPfxBATr92hYyipK4OpMC1Wk0l0GrblOhI9rHAarnzuGqSxagkDitm7vSVxfzdZYGtGQ9X2tEYo2xgU7OQp7x3kUADzL3URaAw0WbH1ih9EvX5YB0prJNRqD8LfvohqJ6es1gYW6P6QnoPXvEYKDt8mI5nNpsvU0JUoJCXk2tkU
 
H12ejOJQpwNgYRKVTawEjbQEtrdTHDHa8dFH38uBIEvtWEpRS1rSWFAvbnKSAP9LOC8Lc3RKGVWEGmIP1m1FcPdsCavGnC1TvJFjwEFPaGc1JWOOFVQeOtyZpF82xbn4T29XHpjnGbvwDcJGlG1sLN42aGTQwDiYi87GNR7fCtxCX2ldVrGQaVi6Y6N1vsQ3Txeu42TuzLPifs48kGU4WrNnP1IG36K9CuIqOQ8Tycgp50Qv2FGOxM6rJQF3jdqs1GFLJDjtx1wKboiPacDopVCQngGXb5zlLNook5MpldgvflglyPS6z2354PnsWmhrsbZnZTv4qe3cE6A20lpmcsLJKikvHksZVP34mTlFkOGlYQqYelsBWVfZqfCGyZn5L3hP2wG6ZK1oLpKTSmglSR2Zz4E6hE6kqBzUzAVIFlBcUQd0vIOcI1dU1hfYSzPlDGYaQPkhqyGwgP5JQEByPUConFTilXQ5wfzdR39FoxLalHDbcw7eYhvJ4zNaW2WtIAZ0gRRNuW9i9r2G2H5PPC7fKP9hgZImBhsLHCVkEkJ17dzDx68fW6D6sKgqIzwudNHRZhYpLLbvS57wgvK9RtquDliWluB4NfOkvIDf7ItaV8emCJacPnDJmcdDY23h96HChN1xSv190fyv7WjBkpfpC4Xju0h5Ec1OqB5PICkkluJ7DIv2IsWKRh0cPH3SdVuOeK4wRuTH4V48kPFMufncfgX9ASZ0zs6qZVTTDZbeyfGWdSSZ2hnYyiyXNVVYuS8COD8pWL8v49D0A0VI0ZYi47RHmV6H3cJG637zJs3g8SUpEynM0cYuTQyHMr20FrrSpXTxSlZxWH9bdr2OykHQdeMguqNhq2BHq20HEPTEcrycGmukodskJBEaaD2syI6T6sLarl9Iq2DLGAz8WsTcAgXPnQw1Nr6ulE6eBjT24JUHXTtA3Tv5OTjPvVMBO7UYV9q2ulwCzQ8QlfRumWYTW0FrkgJFwhdWP
 
WLOsr5InSwYLttf3ifS902VtZHdCR6hCc1pu31UQfw3tHGQMtBd2lMOUQltJS5vMfmys4L0hk1TtYrLiQq8fSegqcvEIxaYa1gek7oIIBWIjSkVozaSrXfT158fz7hJ92JsIdrbsIqEVwWxSzf9mhxcLmcfY89Bjdyh9Rda8ZqIwBYv8BnZR8mRvwHl0bcjzPlIXFo0m51nRPG9oH6nL9JaQHLCaR9WM68GgfxscmCM7ZZGQxWj4Oyp5aSgTMPuV4ALGZT99DapwX3QH5MDVQRYyJB6nhzqw7R2pe0QDN9rD9S861zOZcz4dCdXoNLS4JSp61rs5VZ7HqkpQsZlIKqjyMPN13sQ1hmTgt25z6I4drnMhO6VNp9jjyRjcEr2s86p3q8mqUMB1m66p2vdWw2C82AHCJTVFGB4lXIRFKvTDxiWsKU99e6W5uh1PqJH1RWlK1KrjDxb19YAKDfROJLrAFYRGH2e0OSMBWcqZsQvGUUWvHgbaRSi5vK42TKBBibcgcYNrPSmSfLGK2mZqQ48WAH6c8n6HeUnJIGjIsKlZvpPJ4j0xLbKe2gGvSBirLEDlnX2l2hX6I9qaRm7OnyW3a8GrZNPRrTdRLum7gEutdDvSQvDwut4cHAbfgBler6FPVyon00yI4sQwCNAuajmXP09bi7RFif26YGXh6gwtVm8fKFCs0R48JI0Upd4S9TpOqJyWQjnTNT1sSUrDvoEqaTmfG2STcDk1WjO07FBHualQGx2uMqnKeYEwmigOqtH9yZvy5qwPMXWZywy8Zo7LfzNYFhDOpNg0tbhH1tolTxXh2EYQJ7O2mWTYcxTNNHqZGVwmeR6vZLRHCvW0jM5hZeEwiiuuAAxb7YB78CBR1i2B4bmHASu0C9ZrgZ4VnCVodGADTPSHaegGb3s6VNTH6xzYZ9Q8xGtonEnoBJNL0NPoTifdxXZAJdiG6CEJZK9uKRjxF3ucZ7HjIb4GUCBAGTF9lHhZ53MfE
 
kD1ZHyttNBBvZXVxYPn8zOQc9bYMv7VlrEnx3Hc386Si3EmJmr7ep74wMPPwAGXFFg4kAougDj0sVy8vPep40HVkzRKdSGtr9dDNA28YXQA66CAeHjHlhTFXkJKJDgoXPyiIVkVM5r697PdXgwwyY8agxFtQipkGrDhykSimnUfPMvQuvNs7KPYGo1agR5uG7pIuyFDod9b4Tlt1OYkvXcWCEA9iH2viqzHmNmVQa4TAEUN3x9rSKZIUt6PYvkHaESEkD7es2tlTjlXKN6KyBCxqQNTHwXlPmIVMgtpqUYPgEPB785aoA8z2kdtPexV58vwApatkGjDCMhM1cLyrMWee9Tr2Zzcn2K88i1HXBQIhvWg3rsDsYuichiqwJrk67gA18DIa3APWdXJcDnBxWJoxsVR0AbeavB9emeUNJsooFlYjzdSlQNanR2zdMHASmFqCNuQptNNtl0S6XxrmiSjHqMnjFH11Sw10Vmw4ntS30H1QasgegeAtlJb07wJLLLAPYSbA0mYO0gHJLw9cqMLDVyFbavXQK6hf6cRhgFeUfLt41sfAnwkY0XTqdZquo84TYsCyERWLyQo94AaIgntdMje9jr4hfJw6HA5zPHVvAzq9yJlCPHe1FQ7FdsfdMEwPkhruuASzrXCcT5Bz5srxuvrRtplmrIIV3AOhhR7eOFzHdUM7RG8kcYkPPA15fv7JeG9igjheldIOVJDyDevLzoJ4fZrHP2ZjyQsxLuQyoUZZgwU5Xtr10l9QX52hSAoiepg4h6N8nXmFpJNJ4lJmAYicHCzGrzGOvGLRfQORFjD3YtrehicwQ2Hf73mFw7GNhyaIYWuexSGhkedeblp9m9YsYvKbt9kyCQMqiIfkOYYXlqVSP8tbIxr7zHJsciKoy7FusNVs54koa06yzRllF8Q4pFQAYN7wdApeLrp2c16Dd2WyBbSkWoIqhA4NWkuiXOazBSN8sj9E1dRmIiZMUMzOSYWamC6Sw
 
OFpRmXIoKSDf4o3JI4EkHoaemHDVCMPcg7dxsvmkho9TWyNASrExrxPqvavEkMLY3qYXawhdIj3jehiNU23b8hKJiN2hZH0uCbQvAQpm9qO
___
svn-src-all@freebsd.org mailing list

svn commit: r331232 - head

2018-03-19 Thread Kyle Evans
Author: kevans
Date: Tue Mar 20 01:33:04 2018
New Revision: 331232
URL: https://svnweb.freebsd.org/changeset/base/331232

Log:
  Add /boot/overlays to ObsoleteFiles
  
  It has been replaced by /boot/dtb/overlays. We haven't yet populated it with
  any of our own overlays, so no further damage from here.
  
  Reported by:  Oliver Pinter <oliver.pin...@hardenedbsd.org>

Modified:
  head/ObsoleteFiles.inc

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Tue Mar 20 01:07:22 2018(r331231)
+++ head/ObsoleteFiles.inc  Tue Mar 20 01:33:04 2018(r331232)
@@ -38,6 +38,8 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20180319: remove /boot/overlays, replaced by /boot/dtb/overlays
+OLD_DIRS+=boot/overlays
 # 20180311: remove sys/sys/i386/include/pcaudioio.h
 .if ${TARGET_ARCH} == "i386"
 OLD_FILES+=usr/include/machine/pcaudioio.h
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r319510 - head/contrib/xz/src/liblzma/check

2018-03-19 Thread Oliver Pinter
On Sunday, March 18, 2018, Eitan Adler  wrote:

> On 2 June 2017 at 19:42, Ed Maste  wrote:
> > Author: emaste
> > Date: Sat Jun  3 02:42:49 2017
> > New Revision: 319510
> > URL: https://svnweb.freebsd.org/changeset/base/319510
> >
> > Log:
> >   xz: set noexec stack flag on FreeBSD
>
> Heya. Is this one safe to MFC ?


I think go for it.


>
>
>
> --
> Eitan Adler
> ___
> svn-src-h...@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-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331231 - head/sys/powerpc/booke

2018-03-19 Thread Justin Hibbits
Author: jhibbits
Date: Tue Mar 20 01:07:22 2018
New Revision: 331231
URL: https://svnweb.freebsd.org/changeset/base/331231

Log:
  Fix powerpc Book-E build post-331018/331048.
  
  pagedaemon_wakeup() was moved from vm_pageout.h to vm_pagequeue.h.

Modified:
  head/sys/powerpc/booke/pmap.c

Modified: head/sys/powerpc/booke/pmap.c
==
--- head/sys/powerpc/booke/pmap.c   Tue Mar 20 00:16:24 2018
(r331230)
+++ head/sys/powerpc/booke/pmap.c   Tue Mar 20 01:07:22 2018
(r331231)
@@ -107,6 +107,8 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 
 #include 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r331212 - in head: etc/mtree stand/defaults

2018-03-19 Thread Oliver Pinter
On Monday, March 19, 2018, Kyle Evans  wrote:

> Author: kevans
> Date: Mon Mar 19 16:16:12 2018
> New Revision: 331212
> URL: https://svnweb.freebsd.org/changeset/base/331212
>
> Log:
>   Move /boot/overlays to /boot/dtb/overlays
>
>
Hi!

Do you plan to add the old files to ObsoleteFiles.inc?


>   The former is fairly vague; these are FDT overlays to be applied to the
>   running system, so /boot/dtb is a sensible location to put it without
>   cluttering up /boot/dtb even further if desired.
>
> Modified:
>   head/etc/mtree/BSD.root.dist
>   head/stand/defaults/loader.conf
>
> Modified: head/etc/mtree/BSD.root.dist
> 
> ==
> --- head/etc/mtree/BSD.root.distMon Mar 19 15:48:31 2018
> (r331211)
> +++ head/etc/mtree/BSD.root.distMon Mar 19 16:16:12 2018
> (r331212)
> @@ -11,6 +11,8 @@
>  defaults
>  ..
>  dtb
> +overlays  tags=package=runtime
> +..
>  ..
>  firmware
>  ..
> @@ -19,8 +21,6 @@
>  kernel
>  ..
>  modules
> -..
> -overlays  tags=package=runtime
>  ..
>  zfs
>  ..
>
> Modified: head/stand/defaults/loader.conf
> 
> ==
> --- head/stand/defaults/loader.conf Mon Mar 19 15:48:31 2018
> (r331211)
> +++ head/stand/defaults/loader.conf Mon Mar 19 16:16:12 2018
> (r331212)
> @@ -80,7 +80,7 @@ bootenv_autolist="YES"# Auto populate
> the list of ZF
>  #comconsole_speed="9600"   # Set the current serial console speed
>  #console="vidconsole"  # A comma separated list of console(s)
>  #currdev="disk1s1a"# Set the current device
> -module_path="/boot/modules;/boot/dtb;/boot/overlays"   # Set the module
> search path
> +module_path="/boot/modules;/boot/dtb;/boot/dtb/overlays"   # Set the
> module search path
>  #prompt="\\${interpret}"   # Set the command prompt
>  #root_disk_unit="0"# Force the root disk unit number
>  #rootdev="disk1s1a"# Set the root filesystem
> ___
> svn-src-h...@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-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331230 - head/contrib/blacklist/bin

2018-03-19 Thread Conrad Meyer
Author: cem
Date: Tue Mar 20 00:16:24 2018
New Revision: 331230
URL: https://svnweb.freebsd.org/changeset/base/331230

Log:
  blacklist: Fix minor memory leak in configuration parsing error case
  
  Ordinarily, the continue clause of the for-loop would free 'line.'  In this
  case we instead return early, missing the free.  Add an explicit free to
  avoid the leak.
  
  Reported by:  Coverity
  Sponsored by: Dell EMC Isilon

Modified:
  head/contrib/blacklist/bin/conf.c

Modified: head/contrib/blacklist/bin/conf.c
==
--- head/contrib/blacklist/bin/conf.c   Tue Mar 20 00:03:49 2018
(r331229)
+++ head/contrib/blacklist/bin/conf.c   Tue Mar 20 00:16:24 2018
(r331230)
@@ -1119,6 +1119,7 @@ conf_parse(const char *f)
confset_free();
confset_free();
fclose(fp);
+   free(line);
return;
}
}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331229 - in head/sys: arm/amlogic/aml8726 arm/annapurna/alpine arm/broadcom/bcm2835 arm/freescale arm/freescale/vybrid arm/mv arm/samsung/exynos arm/ti/am335x dev/fdt dev/ofw dev/ow de...

2018-03-19 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Tue Mar 20 00:03:49 2018
New Revision: 331229
URL: https://svnweb.freebsd.org/changeset/base/331229

Log:
  [ofw] fix errneous checks for OF_finddevice(9) return value
  
  OF_finddevices returns ((phandle_t)-1) in case of failure. Some code
  in existing drivers checked return value to be equal to 0 or
  less/equal to 0 which is also wrong because phandle_t is unsigned
  type. Most of these checks were for negative cases that were never
  triggered so trhere was no impact on functionality.
  
  Reviewed by:  nwhitehorn
  MFC after:2 weeks
  Differential Revision:https://reviews.freebsd.org/D14645

Modified:
  head/sys/arm/amlogic/aml8726/aml8726_clkmsr.c
  head/sys/arm/amlogic/aml8726/aml8726_mp.c
  head/sys/arm/amlogic/aml8726/aml8726_usb_phy-m3.c
  head/sys/arm/annapurna/alpine/alpine_machdep.c
  head/sys/arm/broadcom/bcm2835/bcm2835_fb.c
  head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c
  head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c
  head/sys/arm/freescale/fsl_ocotp.c
  head/sys/arm/freescale/vybrid/vf_machdep.c
  head/sys/arm/mv/mv_common.c
  head/sys/arm/samsung/exynos/chrome_ec.c
  head/sys/arm/samsung/exynos/exynos5_ehci.c
  head/sys/arm/ti/am335x/am335x_lcd.c
  head/sys/arm/ti/am335x/am335x_lcd_syscons.c
  head/sys/dev/fdt/fdt_common.c
  head/sys/dev/ofw/ofw_subr.c
  head/sys/dev/ofw/openfirmio.c
  head/sys/dev/ow/owc_gpiobus.c
  head/sys/dev/vnic/thunder_bgx_fdt.c
  head/sys/powerpc/cpufreq/mpc85xx_jog.c
  head/sys/powerpc/pseries/platform_chrp.c

Modified: head/sys/arm/amlogic/aml8726/aml8726_clkmsr.c
==
--- head/sys/arm/amlogic/aml8726/aml8726_clkmsr.c   Mon Mar 19 23:21:45 
2018(r331228)
+++ head/sys/arm/amlogic/aml8726/aml8726_clkmsr.c   Tue Mar 20 00:03:49 
2018(r331229)
@@ -255,14 +255,14 @@ aml8726_clkmsr_bus_frequency()
 * Try to access the clkmsr node directly i.e. through /aliases/.
 */
 
-   if ((node = OF_finddevice("clkmsr")) != 0)
+   if ((node = OF_finddevice("clkmsr")) != -1)
if (fdt_is_compatible_strict(node, "amlogic,aml8726-clkmsr"))
 goto moveon;
 
/*
 * Find the node the long way.
 */
-   if ((node = OF_finddevice("/soc")) == 0)
+   if ((node = OF_finddevice("/soc")) == -1)
return (0);
 
if ((node = fdt_find_compatible(node,

Modified: head/sys/arm/amlogic/aml8726/aml8726_mp.c
==
--- head/sys/arm/amlogic/aml8726/aml8726_mp.c   Mon Mar 19 23:21:45 2018
(r331228)
+++ head/sys/arm/amlogic/aml8726/aml8726_mp.c   Tue Mar 20 00:03:49 2018
(r331229)
@@ -178,7 +178,7 @@ find_node_for_device(const char *device, const char **
 * Try to access the node directly i.e. through /aliases/.
 */
 
-   if ((node = OF_finddevice(device)) != 0)
+   if ((node = OF_finddevice(device)) != -1)
for (i = 0; compatible[i]; i++)
if (fdt_is_compatible_strict(node, compatible[i]))
return node;
@@ -188,7 +188,7 @@ find_node_for_device(const char *device, const char **
 */
 
for (i = 0; compatible[i]; i++) {
-   if ((node = OF_finddevice("/soc")) == 0)
+   if ((node = OF_finddevice("/soc")) == -1)
return (0);
 
if ((node = fdt_find_compatible(node, compatible[i], 1)) != 0)

Modified: head/sys/arm/amlogic/aml8726/aml8726_usb_phy-m3.c
==
--- head/sys/arm/amlogic/aml8726/aml8726_usb_phy-m3.c   Mon Mar 19 23:21:45 
2018(r331228)
+++ head/sys/arm/amlogic/aml8726/aml8726_usb_phy-m3.c   Tue Mar 20 00:03:49 
2018(r331229)
@@ -117,7 +117,7 @@ aml8726_usb_phy_mode(const char *dwcotg_path, uint32_t
phandle_t node;
ssize_t len;

-   if ((node = OF_finddevice(dwcotg_path)) == 0)
+   if ((node = OF_finddevice(dwcotg_path)) == -1)
return (ENXIO);
 
if (fdt_is_compatible_strict(node, "synopsys,designware-hs-otg2") == 0)

Modified: head/sys/arm/annapurna/alpine/alpine_machdep.c
==
--- head/sys/arm/annapurna/alpine/alpine_machdep.c  Mon Mar 19 23:21:45 
2018(r331228)
+++ head/sys/arm/annapurna/alpine/alpine_machdep.c  Tue Mar 20 00:03:49 
2018(r331229)
@@ -71,7 +71,7 @@ alpine_get_devmap_base(bus_addr_t *pa, bus_addr_t *siz
 {
phandle_t node;
 
-   if ((node = OF_finddevice("/")) == 0)
+   if ((node = OF_finddevice("/")) == -1)
return (ENXIO);
 
if ((node = fdt_find_compatible(node, "simple-bus", 1)) == 0)

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

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

2018-03-19 Thread Conrad Meyer
On Mon, Mar 19, 2018 at 3:43 PM, Matt Joras  wrote:
> Author: mjoras
> Date: Mon Mar 19 22:43:27 2018
> New Revision: 331227
> URL: https://svnweb.freebsd.org/changeset/base/331227
>
> Log:
>   Fix initialization of eventhandler mutex.
>
>   mtx_init does not do a copy of the name string it is passed. The
>   eventhandler code incorrectly passed the parameter string directly to
>   mtx_init instead of using the copy it makes. This was an existing
>   problem with the code that I dutifully copied over in my changes in r325621.

For those without context:  The problem here is that the name string
comes from rodata of whatever module *registers* an eventhandler
listener, but isn't tied to the lifetime of that module.  So for
example, filemon.ko or hwpmc.ko.  If those modules are subsequently
unloaded, the kernel eventhandler lock lo_names continue to point to
the (now stale) module memory, resulting in kernel page fault crashes
if/when those names are eventually dereferenced (we hit it with
"sysctl kern.proc.all" after one of those modules was unloaded).

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


svn commit: r331228 - in head/sys/dev/mpr: . mpi

2018-03-19 Thread Alexander Motin
Author: mav
Date: Mon Mar 19 23:21:45 2018
New Revision: 331228
URL: https://svnweb.freebsd.org/changeset/base/331228

Log:
  Update mpr(4) driver from v15 to v18 from Broadcom site.
  
  Version 16 is just a number bump, since we already had those changes.
  
  Version 17 introduces new AdapterType value, that allows new user-space
  tools from Broadcom to differentiate adapter generations 3 and 3.5.
  
  Version 18 updates headers and adds SAS_DEVICE_DISCOVERY_ERROR reporting.
  
  MFC after:2 weeks

Modified:
  head/sys/dev/mpr/mpi/mpi2.h
  head/sys/dev/mpr/mpi/mpi2_cnfg.h
  head/sys/dev/mpr/mpi/mpi2_history.txt
  head/sys/dev/mpr/mpi/mpi2_ioc.h
  head/sys/dev/mpr/mpr_ioctl.h
  head/sys/dev/mpr/mpr_sas.c
  head/sys/dev/mpr/mpr_sas_lsi.c
  head/sys/dev/mpr/mpr_user.c
  head/sys/dev/mpr/mprvar.h

Modified: head/sys/dev/mpr/mpi/mpi2.h
==
--- head/sys/dev/mpr/mpi/mpi2.h Mon Mar 19 22:43:27 2018(r331227)
+++ head/sys/dev/mpr/mpi/mpi2.h Mon Mar 19 23:21:45 2018(r331228)
@@ -44,7 +44,7 @@
  *  scatter/gather formats.
  *  Creation Date:  June 21, 2006
  *
- *  mpi2.h Version:  02.00.46
+ *  mpi2.h Version:  02.00.48
  *
  *  NOTE: Names (typedefs, defines, etc.) beginning with an MPI25 or Mpi25
  *prefix are for use only on MPI v2.5 products, and must not be used
@@ -151,6 +151,8 @@
  *  04-10-16  02.00.44  Bumped MPI2_HEADER_VERSION_UNIT.
  *  07-06-16  02.00.45  Bumped MPI2_HEADER_VERSION_UNIT.
  *  09-02-16  02.00.46  Bumped MPI2_HEADER_VERSION_UNIT.
+ *  11-23-16  02.00.47  Bumped MPI2_HEADER_VERSION_UNIT.
+ *  02-03-17  02.00.48  Bumped MPI2_HEADER_VERSION_UNIT.
  *  --
  */
 
@@ -194,7 +196,7 @@
 
 
 /* Unit and Dev versioning for this MPI header set */
-#define MPI2_HEADER_VERSION_UNIT(0x2E)
+#define MPI2_HEADER_VERSION_UNIT(0x30)
 #define MPI2_HEADER_VERSION_DEV (0x00)
 #define MPI2_HEADER_VERSION_UNIT_MASK   (0xFF00)
 #define MPI2_HEADER_VERSION_UNIT_SHIFT  (8)

Modified: head/sys/dev/mpr/mpi/mpi2_cnfg.h
==
--- head/sys/dev/mpr/mpi/mpi2_cnfg.hMon Mar 19 22:43:27 2018
(r331227)
+++ head/sys/dev/mpr/mpi/mpi2_cnfg.hMon Mar 19 23:21:45 2018
(r331228)
@@ -42,7 +42,7 @@
  *  Title:  MPI Configuration messages and pages
  *  Creation Date:  November 10, 2006
  *
- *mpi2_cnfg.h Version:  02.00.39
+ *mpi2_cnfg.h Version:  02.00.40
  *
  *  NOTE: Names (typedefs, defines, etc.) beginning with an MPI25 or Mpi25
  *prefix are for use only on MPI v2.5 products, and must not be used
@@ -255,6 +255,10 @@
  *  09-01-16  02.00.39  Added MPI26_CONFIG_PAGE_ENCLOSURE_0 and related 
defines.
  *  Added MPI26_ENCLOS_PGAD_FORM_GET_NEXT_HANDLE and
  *  MPI26_ENCLOS_PGAD_FORM_HANDLE page address formats.
+ *  02-02-17  02.00.40  Added MPI2_MANPAGE7_SLOT_UNKNOWN.
+ *  Added ChassisSlot field to SAS Enclosure Page 0.
+ *  Added ChassisSlot Valid bit (bit 5) to the Flags field
+ *  in SAS Enclosure Page 0.
  *  --
  */
 
@@ -853,6 +857,9 @@ typedef struct _MPI2_MANPAGE7_CONNECTOR_INFO
 #define MPI2_MANPAGE7_LOCATION_NOT_PRESENT  (0x20)
 #define MPI2_MANPAGE7_LOCATION_NOT_CONNECTED(0x80)
 
+/* defines for the Slot field */
+#define MPI2_MANPAGE7_SLOT_UNKNOWN  (0x)
+
 /*
  * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
  * one and check the value returned for NumPhys at runtime.
@@ -3092,11 +3099,11 @@ typedef struct _MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0
 U16 EnclosureHandle;/* 0x16 */
 U16 NumSlots;   /* 0x18 */
 U16 StartSlot;  /* 0x1A */
-U8  Reserved2;  /* 0x1C */
+U8  ChassisSlot;/* 0x1C */
 U8  EnclosureLevel; /* 0x1D */
 U16 SEPDevHandle;   /* 0x1E */
-U32 Reserved3;  /* 0x20 */
-U32 Reserved4;  /* 0x24 */
+U32 Reserved2;  /* 0x20 */
+U32 Reserved3;  /* 0x24 */
 } MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0,
   MPI2_POINTER PTR_MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0,
   Mpi2SasEnclosurePage0_t, MPI2_POINTER pMpi2SasEnclosurePage0_t,
@@ -3107,6 +3114,7 @@ typedef struct 

svn commit: r331227 - head/sys/kern

2018-03-19 Thread Matt Joras
Author: mjoras
Date: Mon Mar 19 22:43:27 2018
New Revision: 331227
URL: https://svnweb.freebsd.org/changeset/base/331227

Log:
  Fix initialization of eventhandler mutex.
  
  mtx_init does not do a copy of the name string it is passed. The
  eventhandler code incorrectly passed the parameter string directly to
  mtx_init instead of using the copy it makes. This was an existing
  problem with the code that I dutifully copied over in my changes in r325621.
  
  Reported by:  Anton Rang 
  Reviewed by:  rstone, markj
  Approved by:  rstone (mentor)
  MFC after:1 week
  Sponsored by: Dell EMC Isilon
  Differential Revision:https://reviews.freebsd.org/D14764

Modified:
  head/sys/kern/subr_eventhandler.c

Modified: head/sys/kern/subr_eventhandler.c
==
--- head/sys/kern/subr_eventhandler.c   Mon Mar 19 21:26:32 2018
(r331226)
+++ head/sys/kern/subr_eventhandler.c   Mon Mar 19 22:43:27 2018
(r331227)
@@ -90,9 +90,10 @@ eventhandler_find_or_create_list(const char *name)
CTR2(KTR_EVH, "%s: creating list \"%s\"", __func__, name);
list = new_list;
TAILQ_INIT(>el_entries);
-   mtx_init(>el_lock, name, "eventhandler list", MTX_DEF);
list->el_name = (char *)(list + 1);
strcpy(list->el_name, name);
+   mtx_init(>el_lock, list->el_name, "eventhandler list",
+   MTX_DEF);
TAILQ_INSERT_HEAD(_lists, list, el_link);
}
}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r331057 - head/sys/compat/linux

2018-03-19 Thread Ed Maste
On 16 March 2018 at 17:08, John Baldwin  wrote:
> On Friday, March 16, 2018 02:51:47 PM Ed Maste wrote:
>> Author: emaste
>> Date: Fri Mar 16 14:51:47 2018
>> New Revision: 331057
>> URL: https://svnweb.freebsd.org/changeset/base/331057
>>
>> Log:
>>   linux_errno.c: add newer errno values
>
> Could you move the table to a header perhaps so it can also be shared
> with lib/libsysdecode/errno.c (which has another copy of this table)?

I found that copy shortly after I made this change (and then updated
it to match). We could just add linux_errno.c to libsysdecode though?
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331226 - in head/sys: amd64/linux amd64/linux32 i386/linux

2018-03-19 Thread Ed Maste
Author: emaste
Date: Mon Mar 19 21:26:32 2018
New Revision: 331226
URL: https://svnweb.freebsd.org/changeset/base/331226

Log:
  Rename linuxulator functions with linux_ prefix
  
  It's preferable to have a consistent prefix.  This also reduces
  differences between the three linux*_sysvec.c files.
  
  Sponsored by: Turing Robotic Industries Inc.

Modified:
  head/sys/amd64/linux/linux_sysvec.c
  head/sys/amd64/linux32/linux.h
  head/sys/amd64/linux32/linux32_sysvec.c
  head/sys/i386/linux/linux.h
  head/sys/i386/linux/linux_sysvec.c

Modified: head/sys/amd64/linux/linux_sysvec.c
==
--- head/sys/amd64/linux/linux_sysvec.c Mon Mar 19 21:13:25 2018
(r331225)
+++ head/sys/amd64/linux/linux_sysvec.c Mon Mar 19 21:26:32 2018
(r331226)
@@ -119,14 +119,14 @@ extern struct sysent linux_sysent[LINUX_SYS_MAXSYSCALL
 SET_DECLARE(linux_ioctl_handler_set, struct linux_ioctl_handler);
 
 static register_t * linux_copyout_strings(struct image_params *imgp);
-static int elf_linux_fixup(register_t **stack_base,
+static int linux_elf_fixup(register_t **stack_base,
struct image_params *iparams);
 static boollinux_trans_osrel(const Elf_Note *note, int32_t *osrel);
 static voidlinux_vdso_install(void *param);
 static voidlinux_vdso_deinstall(void *param);
 static voidlinux_set_syscall_retval(struct thread *td, int error);
 static int linux_fetch_syscall_args(struct thread *td);
-static int exec_linux_imgact_try(struct image_params *iparams);
+static int linux_exec_imgact_try(struct image_params *iparams);
 static voidlinux_exec_setregs(struct thread *td, struct image_params *imgp,
u_long stack);
 static int linux_vsyscall(struct thread *td);
@@ -180,7 +180,7 @@ LINUX_VDSO_SYM_CHAR(linux_platform);
  * MPSAFE
  */
 static int
-translate_traps(int signal, int trap_code)
+linux_translate_traps(int signal, int trap_code)
 {
 
if (signal != SIGBUS)
@@ -245,7 +245,7 @@ linux_set_syscall_retval(struct thread *td, int error)
 }
 
 static int
-elf_linux_fixup(register_t **stack_base, struct image_params *imgp)
+linux_fixup_elf(register_t **stack_base, struct image_params *imgp)
 {
Elf_Auxargs *args;
Elf_Addr *base;
@@ -258,7 +258,7 @@ elf_linux_fixup(register_t **stack_base, struct image_
arginfo = (struct ps_strings *)p->p_sysent->sv_psstrings;
 
KASSERT(curthread->td_proc == imgp->proc,
-   ("unsafe elf_linux_fixup(), should be curproc"));
+   ("unsafe linux_fixup_elf(), should be curproc"));
base = (Elf64_Addr *)*stack_base;
args = (Elf64_Auxargs *)imgp->auxargs;
pos = base + (imgp->args->argc + imgp->args->envc + 2);
@@ -671,7 +671,7 @@ linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigse
  * binary is doing the exec, so we do not create an EXEC module for it.
  */
 static int
-exec_linux_imgact_try(struct image_params *imgp)
+linux_exec_imgact_try(struct image_params *imgp)
 {
const char *head = (const char *)imgp->image_header;
char *rpath;
@@ -753,14 +753,14 @@ struct sysentvec elf_linux_sysvec = {
.sv_mask= 0,
.sv_errsize = ELAST + 1,
.sv_errtbl  = bsd_to_linux_errno_generic,
-   .sv_transtrap   = translate_traps,
-   .sv_fixup   = elf_linux_fixup,
+   .sv_transtrap   = linux_translate_traps,
+   .sv_fixup   = linux_fixup_elf,
.sv_sendsig = linux_rt_sendsig,
.sv_sigcode = &_binary_linux_locore_o_start,
.sv_szsigcode   = _szsigcode,
.sv_name= "Linux ELF64",
.sv_coredump= elf64_coredump,
-   .sv_imgact_try  = exec_linux_imgact_try,
+   .sv_imgact_try  = linux_exec_imgact_try,
.sv_minsigstksz = LINUX_MINSIGSTKSZ,
.sv_pagesize= PAGE_SIZE,
.sv_minuser = VM_MIN_ADDRESS,

Modified: head/sys/amd64/linux32/linux.h
==
--- head/sys/amd64/linux32/linux.h  Mon Mar 19 21:13:25 2018
(r331225)
+++ head/sys/amd64/linux32/linux.h  Mon Mar 19 21:26:32 2018
(r331226)
@@ -116,7 +116,7 @@ typedef struct {
  */
 #defineLINUX_AT_COUNT  20  /* Count of used aux entry 
types.
 * Keep this synchronized with
-* elf_linux_fixup() code.
+* linux_fixup_elf() code.
 */
 struct l___sysctl_args
 {

Modified: head/sys/amd64/linux32/linux32_sysvec.c
==
--- head/sys/amd64/linux32/linux32_sysvec.c Mon Mar 19 21:13:25 2018
(r331225)
+++ head/sys/amd64/linux32/linux32_sysvec.c Mon Mar 19 21:26:32 2018
(r331226)
@@ -120,12 +120,12 @@ extern struct sysent 

svn commit: r331225 - head/sys/netpfil/pf

2018-03-19 Thread Kristof Provost
Author: kp
Date: Mon Mar 19 21:13:25 2018
New Revision: 331225
URL: https://svnweb.freebsd.org/changeset/base/331225

Log:
  pf: Fix memory leak in DIOCRADDTABLES
  
  If a user attempts to add two tables with the same name the duplicate table
  will not be added, but we forgot to free the duplicate table, leaking memory.
  Ensure we free the duplicate table in the error path.
  
  Reported by:  Coverity
  CID:  1382111
  MFC after:3 weeks

Modified:
  head/sys/netpfil/pf/pf_table.c

Modified: head/sys/netpfil/pf/pf_table.c
==
--- head/sys/netpfil/pf/pf_table.c  Mon Mar 19 20:55:05 2018
(r331224)
+++ head/sys/netpfil/pf/pf_table.c  Mon Mar 19 21:13:25 2018
(r331225)
@@ -1131,8 +1131,10 @@ pfr_add_tables(struct pfr_table *tbl, int size, int *n
if (p == NULL)
senderr(ENOMEM);
SLIST_FOREACH(q, , pfrkt_workq) {
-   if (!pfr_ktable_compare(p, q))
+   if (!pfr_ktable_compare(p, q)) {
+   pfr_destroy_ktable(p, 0);
goto _skip;
+   }
}
SLIST_INSERT_HEAD(, p, pfrkt_workq);
xadd++;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331224 - head/sys/dev/ixgbe

2018-03-19 Thread Eric Joyner
Author: erj
Date: Mon Mar 19 20:55:05 2018
New Revision: 331224
URL: https://svnweb.freebsd.org/changeset/base/331224

Log:
  ixgbe(4): Update shared code, add support for X552 1G, fix bug
  
  This patch will:
  
  - Update ixgbe shared code
  - Add support for Intel(R) Ethernet Connection X552 1000BASE-T
  - Add error handling for link state check preventing VF from stopping traffic
after changing PF's MTU value
  
  Submitted by: Krzysztof Galazka 
  Reviewed by: Intel Networking
  Sponsored by: Intel Corporation
  Differential Revision: https://reviews.freebsd.org/D13885

Modified:
  head/sys/dev/ixgbe/if_ix.c
  head/sys/dev/ixgbe/if_ixv.c
  head/sys/dev/ixgbe/ixgbe_82598.c
  head/sys/dev/ixgbe/ixgbe_82599.c
  head/sys/dev/ixgbe/ixgbe_api.c
  head/sys/dev/ixgbe/ixgbe_common.c
  head/sys/dev/ixgbe/ixgbe_common.h
  head/sys/dev/ixgbe/ixgbe_dcb.c
  head/sys/dev/ixgbe/ixgbe_dcb_82598.c
  head/sys/dev/ixgbe/ixgbe_dcb_82599.c
  head/sys/dev/ixgbe/ixgbe_phy.c
  head/sys/dev/ixgbe/ixgbe_type.h
  head/sys/dev/ixgbe/ixgbe_vf.c
  head/sys/dev/ixgbe/ixgbe_x540.c
  head/sys/dev/ixgbe/ixgbe_x550.c

Modified: head/sys/dev/ixgbe/if_ix.c
==
--- head/sys/dev/ixgbe/if_ix.c  Mon Mar 19 20:19:00 2018(r331223)
+++ head/sys/dev/ixgbe/if_ix.c  Mon Mar 19 20:55:05 2018(r331224)
@@ -47,7 +47,7 @@
 /
  * Driver version
  /
-char ixgbe_driver_version[] = "4.0.0-k";
+char ixgbe_driver_version[] = "4.0.1-k";
 
 
 /
@@ -92,6 +92,7 @@ static pci_vendor_info_t ixgbe_vendor_info_array[] =
   PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_KR,  "Intel(R) PRO/10GbE 
PCI-Express Network Driver"),
   PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_KX4,  "Intel(R) PRO/10GbE 
PCI-Express Network Driver"),
   PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_10G_T,  "Intel(R) 
PRO/10GbE PCI-Express Network Driver"),
+  PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_1G_T,  "Intel(R) PRO/10GbE 
PCI-Express Network Driver"),
   PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_SFP, "Intel(R) PRO/10GbE 
PCI-Express Network Driver"),
   PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_KR, "Intel(R) PRO/10GbE 
PCI-Express Network Driver"),
   PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_KR_L, "Intel(R) PRO/10GbE 
PCI-Express Network Driver"),

Modified: head/sys/dev/ixgbe/if_ixv.c
==
--- head/sys/dev/ixgbe/if_ixv.c Mon Mar 19 20:19:00 2018(r331223)
+++ head/sys/dev/ixgbe/if_ixv.c Mon Mar 19 20:55:05 2018(r331224)
@@ -45,7 +45,7 @@
 /
  * Driver version
  /
-char ixv_driver_version[] = "2.0.0-k";
+char ixv_driver_version[] = "2.0.1-k";
 
 /
  * PCI Device ID Table
@@ -616,6 +616,7 @@ ixv_if_init(if_ctx_t ctx)
 
/* Reset VF and renegotiate mailbox API version */
hw->mac.ops.reset_hw(hw);
+   hw->mac.ops.start_hw(hw);
error = ixv_negotiate_api(adapter);
if (error) {
device_printf(dev,
@@ -909,10 +910,18 @@ ixv_if_update_admin_status(if_ctx_t ctx)
 {
struct adapter *adapter = iflib_get_softc(ctx);
device_t   dev = iflib_get_dev(ctx);
+   s32status;
 
adapter->hw.mac.get_link_status = TRUE;
-   ixgbe_check_link(>hw, >link_speed, >link_up,
-   FALSE);
+
+   status = ixgbe_check_link(>hw, >link_speed,
+   >link_up, FALSE);
+
+   if (status != IXGBE_SUCCESS && adapter->hw.adapter_stopped == FALSE) {
+   /* Mailbox's Clear To Send status is lost or timeout occurred.
+* We need reinitialization. */
+   iflib_get_ifp(ctx)->if_init(ctx);
+   }
 
if (adapter->link_up) {
if (adapter->link_active == FALSE) {

Modified: head/sys/dev/ixgbe/ixgbe_82598.c
==
--- head/sys/dev/ixgbe/ixgbe_82598.cMon Mar 19 20:19:00 2018
(r331223)
+++ head/sys/dev/ixgbe/ixgbe_82598.cMon Mar 19 20:55:05 2018
(r331224)
@@ -550,6 +550,7 @@ out:
 /**
  *  ixgbe_start_mac_link_82598 - Configures MAC link settings
  *  @hw: pointer to hardware structure
+ *  @autoneg_wait_to_complete: TRUE when waiting for completion is needed
  *
  *  Configures link settings based on values in the ixgbe_hw struct.
  *  Restarts the link.  Performs autonegotiation if needed.
@@ -1207,7 +1208,7 @@ s32 ixgbe_read_i2c_eeprom_82598(struct ixgbe_hw *hw, u
  *  

svn commit: r331223 - head/sys/cam/scsi

2018-03-19 Thread Kenneth D. Merry
Author: ken
Date: Mon Mar 19 20:19:00 2018
New Revision: 331223
URL: https://svnweb.freebsd.org/changeset/base/331223

Log:
  cam_periph_acquire() now returns an errno.
  
  The ch(4) driver was missed in change 328918, which changed
  cam_periph_acquire() to return an errno instead of cam_status.
  
  As a result, ch(4) failed to attach.
  
  Sponsored by: Spectra Logic

Modified:
  head/sys/cam/scsi/scsi_ch.c

Modified: head/sys/cam/scsi/scsi_ch.c
==
--- head/sys/cam/scsi/scsi_ch.c Mon Mar 19 19:32:05 2018(r331222)
+++ head/sys/cam/scsi/scsi_ch.c Mon Mar 19 20:19:00 2018(r331223)
@@ -419,7 +419,7 @@ chregister(struct cam_periph *periph, void *arg)
 * instance for it.  We'll release this reference once the devfs
 * instance has been freed.
 */
-   if (cam_periph_acquire(periph) != CAM_REQ_CMP) {
+   if (cam_periph_acquire(periph) != 0) {
xpt_print(periph->path, "%s: lost periph during "
  "registration!\n", __func__);
cam_periph_lock(periph);
@@ -467,7 +467,7 @@ chopen(struct cdev *dev, int flags, int fmt, struct th
int error;
 
periph = (struct cam_periph *)dev->si_drv1;
-   if (cam_periph_acquire(periph) != CAM_REQ_CMP)
+   if (cam_periph_acquire(periph) != 0)
return (ENXIO);
 
softc = (struct ch_softc *)periph->softc;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r331218 - in vendor/processor-trace: . 24982c1a6fce48f1e416461d42899805f74fbb26 24982c1a6fce48f1e416461d42899805f74fbb26/doc 24982c1a6fce48f1e416461d42899805f74fbb26/doc/man 24982c1a6f

2018-03-19 Thread John Baldwin
On Monday, March 19, 2018 06:34:08 PM Ruslan Bukin wrote:
> Author: br
> Date: Mon Mar 19 18:34:08 2018
> New Revision: 331218
> URL: https://svnweb.freebsd.org/changeset/base/331218
> 
> Log:
>   Import Intel Processor Trace library.
>   
>   Git ID 24982c1a6fce48f1e416461d42899805f74fbb26
>   
>   Sponsored by:   DARPA, AFRL
>   Differential Revision:  https://reviews.freebsd.org/D12815

Presumably you meant to import this to vendor/processor-trace/dist and then do 
an 'svn cp'
to tag it to the git hash?  If you do the svn cp from the git hash instead of 
from dist
I'm not sure if future 'svn merge' requests from the vendor area will work 
correctly when
you try to merge an update.

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


svn commit: r331222 - head/cddl/contrib/opensolaris/lib/libdtrace/common

2018-03-19 Thread Mark Johnston
Author: markj
Date: Mon Mar 19 19:32:05 2018
New Revision: 331222
URL: https://svnweb.freebsd.org/changeset/base/331222

Log:
  Given hidden visibility to symbols referenced by the DOF section.
  
  MFC after:1 week

Modified:
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c

Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c
==
--- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.cMon Mar 
19 19:09:15 2018(r331221)
+++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.cMon Mar 
19 19:32:05 2018(r331222)
@@ -22,6 +22,7 @@
 /*
  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
+ * Copyright 2017-2018 Mark Johnston 
  */
 
 #pragma ident  "%Z%%M% %I% %E% SMI"
@@ -265,7 +266,7 @@ prepare_elf32(dtrace_hdl_t *dtp, const dof_hdr_t *dof,
sym->st_value = 0;
sym->st_size = 0;
sym->st_info = ELF32_ST_INFO(STB_GLOBAL, STT_FUNC);
-   sym->st_other = 0;
+   sym->st_other = ELF32_ST_VISIBILITY(STV_HIDDEN);
sym->st_shndx = SHN_UNDEF;
 
rel++;
@@ -449,7 +450,7 @@ prepare_elf64(dtrace_hdl_t *dtp, const dof_hdr_t *dof,
sym->st_value = 0;
sym->st_size = 0;
sym->st_info = GELF_ST_INFO(STB_GLOBAL, STT_FUNC);
-   sym->st_other = 0;
+   sym->st_other = ELF64_ST_VISIBILITY(STV_HIDDEN);
sym->st_shndx = SHN_UNDEF;
 
rel++;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331221 - head/tests/sys/aio

2018-03-19 Thread John Baldwin
Author: jhb
Date: Mon Mar 19 19:09:15 2018
New Revision: 331221
URL: https://svnweb.freebsd.org/changeset/base/331221

Log:
  Revert r318180 and re-enable AIO tests on md(4) by default.
  
  The 'physio' fast-path used by AIO requests on md(4) devices, is not
  gated on the unsafe_aio knob.  Prior to r327755, some AIO requests could
  fail the fast-path and fall back to the slow-path (requests for devices
  not supporting unmapped I/O and requests which failed with EFAULT during
  the fast-path).  However, those cases now return a suitable error rather
  than using the slow-path.
  
  PR:   217261
  Reviewed by:  asomers
  Sponsored by: Chelsio Communications
  Differential Revision:https://reviews.freebsd.org/D14742

Modified:
  head/tests/sys/aio/aio_test.c

Modified: head/tests/sys/aio/aio_test.c
==
--- head/tests/sys/aio/aio_test.c   Mon Mar 19 18:59:15 2018
(r331220)
+++ head/tests/sys/aio/aio_test.c   Mon Mar 19 19:09:15 2018
(r331221)
@@ -667,7 +667,6 @@ aio_md_test(completion comp, struct sigevent *sev)
char buf[80];
 
ATF_REQUIRE_KERNEL_MODULE("aio");
-   ATF_REQUIRE_UNSAFE_AIO();
 
mdctl_fd = open("/dev/" MDCTL_NAME, O_RDWR, 0);
ATF_REQUIRE_MSG(mdctl_fd != -1,
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331220 - in head/contrib/processor-trace: . include libipt libipt/include

2018-03-19 Thread Ruslan Bukin
Author: br
Date: Mon Mar 19 18:59:15 2018
New Revision: 331220
URL: https://svnweb.freebsd.org/changeset/base/331220

Log:
  Import Intel Processor Trace decoder library from
  vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26
  
  Sponsored by: DARPA, AFRL

Added:
  head/contrib/processor-trace/
  head/contrib/processor-trace/include/
 - copied from r331219, 
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/include/
  head/contrib/processor-trace/libipt/
 - copied from r331219, 
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/libipt/
  head/contrib/processor-trace/libipt/include/intel-pt.h
 - copied unchanged from r331219, 
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/libipt/include/intel-pt.h.in

Copied: head/contrib/processor-trace/libipt/include/intel-pt.h (from r331219, 
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/libipt/include/intel-pt.h.in)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/contrib/processor-trace/libipt/include/intel-pt.h  Mon Mar 19 
18:59:15 2018(r331220, copy of r331219, 
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/libipt/include/intel-pt.h.in)
@@ -0,0 +1,2463 @@
+/*
+ * Copyright (c) 2013-2018, Intel Corporation
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *this list of conditions and the following disclaimer.
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *this list of conditions and the following disclaimer in the documentation
+ *and/or other materials provided with the distribution.
+ *  * Neither the name of Intel Corporation nor the names of its contributors
+ *may be used to endorse or promote products derived from this software
+ *without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef INTEL_PT_H
+#define INTEL_PT_H
+
+#include 
+#include 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Intel(R) Processor Trace (Intel PT) decoder library.
+ *
+ * This file is logically structured into the following sections:
+ *
+ * - Version
+ * - Errors
+ * - Configuration
+ * - Packet encoder / decoder
+ * - Query decoder
+ * - Traced image
+ * - Instruction flow decoder
+ * - Block decoder
+ */
+
+
+
+struct pt_encoder;
+struct pt_packet_decoder;
+struct pt_query_decoder;
+struct pt_insn_decoder;
+struct pt_block_decoder;
+
+
+
+/* A macro to mark functions as exported. */
+#ifndef pt_export
+#  if defined(__GNUC__)
+#define pt_export __attribute__((visibility("default")))
+#  elif defined(_MSC_VER)
+#define pt_export __declspec(dllimport)
+#  else
+#error "unknown compiler"
+#  endif
+#endif
+
+
+
+/* Version. */
+
+
+/** The header version. */
+#define LIBIPT_VERSION_MAJOR ${PT_VERSION_MAJOR}
+#define LIBIPT_VERSION_MINOR ${PT_VERSION_MINOR}
+
+#define LIBIPT_VERSION ((LIBIPT_VERSION_MAJOR << 8) + LIBIPT_VERSION_MINOR)
+
+
+/** The library version. */
+struct pt_version {
+   /** Major version number. */
+   uint8_t major;
+
+   /** Minor version number. */
+   uint8_t minor;
+
+   /** Reserved bits. */
+   uint16_t reserved;
+
+   /** Build number. */
+   uint32_t build;
+
+   /** Version extension. */
+   const char *ext;
+};
+
+
+/** Return the library version. */
+extern pt_export struct pt_version pt_library_version(void);
+
+
+
+/* Errors. */
+
+
+
+/** Error codes. */
+enum pt_error_code {
+   /* No error. Everything is OK. */
+   pte_ok,
+
+   /* Internal decoder error. */
+   pte_internal,
+
+   /* Invalid argument. */
+   pte_invalid,
+
+   /* Decoder out of sync. */
+   pte_nosync,
+
+   /* Unknown opcode. */
+   pte_bad_opc,
+
+   /* Unknown payload. */
+   pte_bad_packet,
+
+   /* Unexpected packet context. */
+   pte_bad_context,
+
+   /* Decoder reached end of trace stream. */
+   

svn commit: r331219 - in stable/11: contrib/llvm/include/llvm contrib/llvm/include/llvm/CodeGen contrib/llvm/include/llvm/Target contrib/llvm/lib/CodeGen contrib/llvm/lib/Target/X86 contrib/llvm/to...

2018-03-19 Thread Dimitry Andric
Author: dim
Date: Mon Mar 19 18:36:43 2018
New Revision: 331219
URL: https://svnweb.freebsd.org/changeset/base/331219

Log:
  Merge retpoline support from the upstream llvm, clang and lld 5.0
  branches.  Upstream merge revisions:
  
r324007: merging r323155 for llvm
r324009: merging r323915 for llvm
r324012: merging r323155 for clang
r324025: merging r323155 for lld, with modifications to
 handle int3 fill
r324026: merging r323288 for lld
r325088: merging r324449 for llvm
r325089: merging r324645 for llvm
r325090: merging r325049 for llvm
r325091: merging r325085 for llvm
  
  Original commit messages:
  
  r323155 (by Chandler Carruth):
  
Introduce the "retpoline" x86 mitigation technique for variant #2 of
the speculative execution vulnerabilities disclosed today,
specifically identified by CVE-2017-5715, "Branch Target Injection",
and is one of the two halves to Spectre.
  
Summary:
First, we need to explain the core of the vulnerability. Note that
this is a very incomplete description, please see the Project Zero
blog post for details:

https://googleprojectzero.blogspot.com/2018/01/reading-privileged-memory-with-side.html
  
The basis for branch target injection is to direct speculative
execution of the processor to some "gadget" of executable code by
poisoning the prediction of indirect branches with the address of
that gadget. The gadget in turn contains an operation that provides a
side channel for reading data. Most commonly, this will look like a
load of secret data followed by a branch on the loaded value and then
a load of some predictable cache line. The attacker then uses timing
of the processors cache to determine which direction the branch took
*in the speculative execution*, and in turn what one bit of the
loaded value was. Due to the nature of these timing side channels and
the branch predictor on Intel processors, this allows an attacker to
leak data only accessible to a privileged domain (like the kernel)
back into an unprivileged domain.
  
The goal is simple: avoid generating code which contains an indirect
branch that could have its prediction poisoned by an attacker. In
many cases, the compiler can simply use directed conditional branches
and a small search tree. LLVM already has support for lowering
switches in this way and the first step of this patch is to disable
jump-table lowering of switches and introduce a pass to rewrite
explicit indirectbr sequences into a switch over integers.
  
However, there is no fully general alternative to indirect calls. We
introduce a new construct we call a "retpoline" to implement indirect
calls in a non-speculatable way. It can be thought of loosely as a
trampoline for indirect calls which uses the RET instruction on x86.
Further, we arrange for a specific call->ret sequence which ensures
the processor predicts the return to go to a controlled, known
location. The retpoline then "smashes" the return address pushed onto
the stack by the call with the desired target of the original
indirect call. The result is a predicted return to the next
instruction after a call (which can be used to trap speculative
execution within an infinite loop) and an actual indirect branch to
an arbitrary address.
  
On 64-bit x86 ABIs, this is especially easily done in the compiler by
using a guaranteed scratch register to pass the target into this
device.  For 32-bit ABIs there isn't a guaranteed scratch register
and so several different retpoline variants are introduced to use a
scratch register if one is available in the calling convention and to
otherwise use direct stack push/pop sequences to pass the target
address.
  
This "retpoline" mitigation is fully described in the following blog
post: https://support.google.com/faqs/answer/7625886
  
We also support a target feature that disables emission of the
retpoline thunk by the compiler to allow for custom thunks if users
want them.  These are particularly useful in environments like
kernels that routinely do hot-patching on boot and want to hot-patch
their thunk to different code sequences. They can write this custom
thunk and use `-mretpoline-external-thunk` *in addition* to
`-mretpoline`. In this case, on x86-64 thu thunk names must be:
```
  __llvm_external_retpoline_r11
```
or on 32-bit:
```
  __llvm_external_retpoline_eax
  __llvm_external_retpoline_ecx
  __llvm_external_retpoline_edx
  __llvm_external_retpoline_push
```
  
And the target of the retpoline is passed in the named register, or
in the case of the `push` suffix on the top of the stack via a
`pushl` instruction.
  
There is one other important source of indirect branches in x86 ELF
binaries: the PLT. These patches 

svn commit: r331218 - in vendor/processor-trace: . 24982c1a6fce48f1e416461d42899805f74fbb26 24982c1a6fce48f1e416461d42899805f74fbb26/doc 24982c1a6fce48f1e416461d42899805f74fbb26/doc/man 24982c1a6fc...

2018-03-19 Thread Ruslan Bukin
Author: br
Date: Mon Mar 19 18:34:08 2018
New Revision: 331218
URL: https://svnweb.freebsd.org/changeset/base/331218

Log:
  Import Intel Processor Trace library.
  
  Git ID 24982c1a6fce48f1e416461d42899805f74fbb26
  
  Sponsored by: DARPA, AFRL
  Differential Revision:https://reviews.freebsd.org/D12815

Added:
  vendor/processor-trace/
  vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/
  vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/.gitignore
  
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/CMakeLists.txt  
 (contents, props changed)
  vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/CONTRIBUTING  
 (contents, props changed)
  vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/LICENSE
  vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/README
  vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/
  
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/getting_started.md
   (contents, props changed)
  
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/howto_build.md
   (contents, props changed)
  
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/howto_capture.md
  
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/howto_libipt.md
  
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/howto_pttc.md
   (contents, props changed)
  vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/man/
  
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/man/CMakeLists.txt
   (contents, props changed)
  
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/man/pt_alloc_encoder.3.md
  
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/man/pt_blk_alloc_decoder.3.md
  
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/man/pt_blk_get_offset.3.md
  
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/man/pt_blk_next.3.md
  
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/man/pt_blk_sync_forward.3.md
  
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/man/pt_config.3.md
  
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/man/pt_enc_get_config.3.md
  
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/man/pt_enc_get_offset.3.md
  
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/man/pt_image_add_file.3.md
  
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/man/pt_image_alloc.3.md
  
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/man/pt_image_remove_by_filename.3.md
  
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/man/pt_image_set_callback.3.md
  
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/man/pt_insn_alloc_decoder.3.md
  
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/man/pt_insn_get_image.3.md
  
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/man/pt_insn_get_offset.3.md
  
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/man/pt_insn_next.3.md
  
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/man/pt_insn_sync_forward.3.md
  
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/man/pt_iscache_add_file.3.md
  
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/man/pt_iscache_alloc.3.md
  
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/man/pt_iscache_read.3.md
  
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/man/pt_iscache_set_limit.3.md
  
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/man/pt_library_version.3.md
  
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/man/pt_packet.3.md
  
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/man/pt_pkt_alloc_decoder.3.md
  
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/man/pt_pkt_get_offset.3.md
  
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/man/pt_pkt_sync_forward.3.md
  
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/man/pt_qry_alloc_decoder.3.md
  
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/man/pt_qry_cond_branch.3.md
  
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/man/pt_qry_event.3.md
  
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/man/pt_qry_get_offset.3.md
  
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/man/pt_qry_sync_forward.3.md
  
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/doc/man/pt_qry_time.3.md
  vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/include/
  vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26/include/posix/
  

Re: svn commit: r331209 - head

2018-03-19 Thread Warner Losh
On Mon, Mar 19, 2018 at 12:09 PM, Rodney W. Grimes <
free...@pdx.rh.cn85.dnsmgr.net> wrote:

> > On Mon, Mar 19, 2018 at 11:51 AM, Andriy Gapon  wrote:
> >
> > > On 19/03/2018 18:20, John Baldwin wrote:
> > > > On Monday, March 19, 2018 03:27:53 PM Kyle Evans wrote:
> > > >> Author: kevans
> > > >> Date: Mon Mar 19 15:27:53 2018
> > > >> New Revision: 331209
> > > >> URL: https://svnweb.freebsd.org/changeset/base/331209
> > > >>
> > > >> Log:
> > > >>   Add note to UPDATING about UEFI changes requiring loader(8) update
> > > >>
> > > >>   These problems have only been observed with boards using U-Boot
> (e.g.
> > > ARM)
> > > >>   where virtual addresses are already set in the memory map by the
> > > firmware
> > > >>   and the firmware is expecting a call to SetVirtualAddressMap to be
> > > made.
> > > >>   I refrain from mentioning this in the note because this could
> also be
> > > the
> > > >>   case on some not-yet-tested firmware on amd64 and it's not a bad
> > > >>   recommendation for the general case.
> > > >
> > > > How does this fit with the recommended installation steps of doing
> > > > 'make installkernel' and rebooting before doing a 'make
> installworld'?
> > >
> > > Installation of /boot/loader along with likes of cat and cut has always
> > > puzzled
> > > me very much.
> > >
> >
> > Historical reason. We've always installed /boot/loader with installworld.
> > We also install the other boot loaders, but don't deploy them (so
> there's a
> > new /boot/boot, but it isn't installed into /).
>
> More complete historical information.  The "boot" code use to live in
> hidden places in the MBR, and the {disk,bsd}label, so installing it
> into the file system had 0 effect, as the actuall in use running
> code was hidden and had to be replaced using either fdisk or
> {disk,bsd}label.
>

Right. That's still the case, but these bits are considered 'static' and
uninteresting to update.


> When "loader" was added this should of probably changed with
> preseverations of old code and ways to get back to it incase
> things went a foul, and ways to update it in a more controlled
> manner than installworld.  And more approprate timing of
> installing it (should it now go with installkernel?).


No. Where it is fine. The arm64 thing is actually fixed in the kernel so we
don't need to cope with it.

Warner


> > To get around this issue, though, is trivial:
> >
> > make installkenrel
> > cd stand
> > make install
> > reboot
> > make installworld
> >
> > in this weird case.
> >
> > Warner
>
> --
> Rod Grimes
> rgri...@freebsd.org
>
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r331209 - head

2018-03-19 Thread Rodney W. Grimes
> On Mon, Mar 19, 2018 at 11:51 AM, Andriy Gapon  wrote:
> 
> > On 19/03/2018 18:20, John Baldwin wrote:
> > > On Monday, March 19, 2018 03:27:53 PM Kyle Evans wrote:
> > >> Author: kevans
> > >> Date: Mon Mar 19 15:27:53 2018
> > >> New Revision: 331209
> > >> URL: https://svnweb.freebsd.org/changeset/base/331209
> > >>
> > >> Log:
> > >>   Add note to UPDATING about UEFI changes requiring loader(8) update
> > >>
> > >>   These problems have only been observed with boards using U-Boot (e.g.
> > ARM)
> > >>   where virtual addresses are already set in the memory map by the
> > firmware
> > >>   and the firmware is expecting a call to SetVirtualAddressMap to be
> > made.
> > >>   I refrain from mentioning this in the note because this could also be
> > the
> > >>   case on some not-yet-tested firmware on amd64 and it's not a bad
> > >>   recommendation for the general case.
> > >
> > > How does this fit with the recommended installation steps of doing
> > > 'make installkernel' and rebooting before doing a 'make installworld'?
> >
> > Installation of /boot/loader along with likes of cat and cut has always
> > puzzled
> > me very much.
> >
> 
> Historical reason. We've always installed /boot/loader with installworld.
> We also install the other boot loaders, but don't deploy them (so there's a
> new /boot/boot, but it isn't installed into /).

More complete historical information.  The "boot" code use to live in
hidden places in the MBR, and the {disk,bsd}label, so installing it
into the file system had 0 effect, as the actuall in use running
code was hidden and had to be replaced using either fdisk or
{disk,bsd}label.

When "loader" was added this should of probably changed with
preseverations of old code and ways to get back to it incase
things went a foul, and ways to update it in a more controlled
manner than installworld.  And more approprate timing of
installing it (should it now go with installkernel?).
 
> To get around this issue, though, is trivial:
> 
> make installkenrel
> cd stand
> make install
> reboot
> make installworld
> 
> in this weird case.
> 
> Warner

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


Re: svn commit: r331209 - head

2018-03-19 Thread Warner Losh
On Mon, Mar 19, 2018 at 11:51 AM, Andriy Gapon  wrote:

> On 19/03/2018 18:20, John Baldwin wrote:
> > On Monday, March 19, 2018 03:27:53 PM Kyle Evans wrote:
> >> Author: kevans
> >> Date: Mon Mar 19 15:27:53 2018
> >> New Revision: 331209
> >> URL: https://svnweb.freebsd.org/changeset/base/331209
> >>
> >> Log:
> >>   Add note to UPDATING about UEFI changes requiring loader(8) update
> >>
> >>   These problems have only been observed with boards using U-Boot (e.g.
> ARM)
> >>   where virtual addresses are already set in the memory map by the
> firmware
> >>   and the firmware is expecting a call to SetVirtualAddressMap to be
> made.
> >>   I refrain from mentioning this in the note because this could also be
> the
> >>   case on some not-yet-tested firmware on amd64 and it's not a bad
> >>   recommendation for the general case.
> >
> > How does this fit with the recommended installation steps of doing
> > 'make installkernel' and rebooting before doing a 'make installworld'?
>
> Installation of /boot/loader along with likes of cat and cut has always
> puzzled
> me very much.
>

Historical reason. We've always installed /boot/loader with installworld.
We also install the other boot loaders, but don't deploy them (so there's a
new /boot/boot, but it isn't installed into /).

To get around this issue, though, is trivial:

make installkenrel
cd stand
make install
reboot
make installworld

in this weird case.

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


Re: svn commit: r331209 - head

2018-03-19 Thread Andriy Gapon
On 19/03/2018 18:20, John Baldwin wrote:
> On Monday, March 19, 2018 03:27:53 PM Kyle Evans wrote:
>> Author: kevans
>> Date: Mon Mar 19 15:27:53 2018
>> New Revision: 331209
>> URL: https://svnweb.freebsd.org/changeset/base/331209
>>
>> Log:
>>   Add note to UPDATING about UEFI changes requiring loader(8) update
>>   
>>   These problems have only been observed with boards using U-Boot (e.g. ARM)
>>   where virtual addresses are already set in the memory map by the firmware
>>   and the firmware is expecting a call to SetVirtualAddressMap to be made.
>>   I refrain from mentioning this in the note because this could also be the
>>   case on some not-yet-tested firmware on amd64 and it's not a bad
>>   recommendation for the general case.
> 
> How does this fit with the recommended installation steps of doing
> 'make installkernel' and rebooting before doing a 'make installworld'?

Installation of /boot/loader along with likes of cat and cut has always puzzled
me very much.


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


svn commit: r331217 - stable/10/etc/rc.d

2018-03-19 Thread David Bright
Author: dab
Date: Mon Mar 19 17:38:35 2018
New Revision: 331217
URL: https://svnweb.freebsd.org/changeset/base/331217

Log:
  MFC r331015:
  
  Modify rc.d/fsck to handle new status from fsck/fsck_ffs
  
  r328013 introduced a new error code from fsck_ffs that indicates that
  it could not completely fix the file system; this happens when it
  prints the message PLEASE RERUN FSCK. However, this status can happen
  when fsck is run in "preen" mode and the rc.d/fsck script does not
  handle that error code. Modify rc.d/fsck so that if "fsck -p"
  ("preen") returns the new status code (16) it will run "fsck -y", as
  it currently does for a status code of 8 (the "standard error exit").
  
  Reported by:markj
  Sponsored by:   Dell EMC

Modified:
  stable/10/etc/rc.d/fsck
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/etc/rc.d/fsck
==
--- stable/10/etc/rc.d/fsck Mon Mar 19 17:37:51 2018(r331216)
+++ stable/10/etc/rc.d/fsck Mon Mar 19 17:38:35 2018(r331217)
@@ -42,7 +42,7 @@ fsck_start()
echo "Reboot failed; help!"
stop_boot
;;
-   8)
+   8|16)
if checkyesno fsck_y_enable; then
echo "File system preen failed, trying fsck -y 
${fsck_y_flags}"
fsck -y ${fsck_y_flags}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331216 - stable/11/etc/rc.d

2018-03-19 Thread David Bright
Author: dab
Date: Mon Mar 19 17:37:51 2018
New Revision: 331216
URL: https://svnweb.freebsd.org/changeset/base/331216

Log:
  MFC r331015:
  
  Modify rc.d/fsck to handle new status from fsck/fsck_ffs
  
  r328013 introduced a new error code from fsck_ffs that indicates that
  it could not completely fix the file system; this happens when it
  prints the message PLEASE RERUN FSCK. However, this status can happen
  when fsck is run in "preen" mode and the rc.d/fsck script does not
  handle that error code. Modify rc.d/fsck so that if "fsck -p"
  ("preen") returns the new status code (16) it will run "fsck -y", as
  it currently does for a status code of 8 (the "standard error exit").
  
  Reported by:markj
  Sponsored by:   Dell EMC

Modified:
  stable/11/etc/rc.d/fsck
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/etc/rc.d/fsck
==
--- stable/11/etc/rc.d/fsck Mon Mar 19 17:14:56 2018(r331215)
+++ stable/11/etc/rc.d/fsck Mon Mar 19 17:37:51 2018(r331216)
@@ -57,7 +57,7 @@ fsck_start()
echo "Reboot failed; help!"
stop_boot
;;
-   8)
+   8|16)
if checkyesno fsck_y_enable; then
echo "File system preen failed, trying fsck -y 
${fsck_y_flags}"
fsck -y ${fsck_y_flags}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r325739 - in head: lib/libcasper/services lib/libcasper/services/cap_syslog share/mk

2018-03-19 Thread John Baldwin
On Sunday, March 18, 2018 01:07:38 PM Mark Johnston wrote:
> On Sun, Mar 18, 2018 at 03:20:39PM +0100, Mariusz Zaborski wrote:
> > On Mon, Mar 05, 2018 at 11:19:16AM -0600, Mark Linimon wrote:
> > > On Mon, Mar 05, 2018 at 11:13:58AM -0500, Mark Johnston wrote:
> > > > The growing divergence with stable/11 makes it rather painful to
> > > > maintain a port, depending on libcasper, that aims to work on both 11
> > > > and head.
> > > 
> > > Even an MFC won't help you, in the medium-term.
> > > 
> > > e.g. via https://www.freebsd.org/security/#sup, even if the MFC made it
> > > into 11.2, you would still have several months of supporting the old
> > > one.  (The FreeBSD package builds are based on the oldest supported
> > > point release from a branch.)  The current estimate for 11.2 is late June.
> > > 
> > > mcl
> > 
> > Hi,
> > 
> > Sorry for delay I just get back.
> > 
> > Yes I can integrate all my changes in libcasper and I guess libcapsicum.
> > I'm did do a lot of integrations to stable so I have one question -
> > if I understand correctly all changes which change API/ABI but are
> > pointed as SHLIB_MAJOR I can safety integrate.
> > 
> > Mark what else can I do?
> 
> Sorry, I don't quite follow. I don't think SHLIB_MAJOR bumps can be
> MFCed: what happens if an SA is later released for the library in
> question?

We have MFC'd them in the past I believe and rolled the  shlib into
the misc/compatXX package (so that one might need misc/compat11 to run
older 11.x binaries even on an 11.x host).  We haven't done that nearly as
often since adding symbol versioning though.  I don't know if we ever had
to deal with merging an SA to an old library version though.

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


Re: svn commit: r331209 - head

2018-03-19 Thread John Baldwin
On Monday, March 19, 2018 03:27:53 PM Kyle Evans wrote:
> Author: kevans
> Date: Mon Mar 19 15:27:53 2018
> New Revision: 331209
> URL: https://svnweb.freebsd.org/changeset/base/331209
> 
> Log:
>   Add note to UPDATING about UEFI changes requiring loader(8) update
>   
>   These problems have only been observed with boards using U-Boot (e.g. ARM)
>   where virtual addresses are already set in the memory map by the firmware
>   and the firmware is expecting a call to SetVirtualAddressMap to be made.
>   I refrain from mentioning this in the note because this could also be the
>   case on some not-yet-tested firmware on amd64 and it's not a bad
>   recommendation for the general case.

How does this fit with the recommended installation steps of doing
'make installkernel' and rebooting before doing a 'make installworld'?

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


svn commit: r331215 - head/sys/x86/include

2018-03-19 Thread John Baldwin
Author: jhb
Date: Mon Mar 19 17:14:56 2018
New Revision: 331215
URL: https://svnweb.freebsd.org/changeset/base/331215

Log:
  Fix a typo.
  
  Reviewed by:  kib

Modified:
  head/sys/x86/include/ucontext.h

Modified: head/sys/x86/include/ucontext.h
==
--- head/sys/x86/include/ucontext.h Mon Mar 19 16:37:47 2018
(r331214)
+++ head/sys/x86/include/ucontext.h Mon Mar 19 17:14:56 2018
(r331215)
@@ -96,7 +96,7 @@ typedef struct __mcontext {
 
 #ifdef __amd64__
 /*
- * mc_trapno bits. Shall be in sync with TF_XXX.
+ * mc_flags bits. Shall be in sync with TF_XXX.
  */
 #define_MC_HASSEGS 0x1
 #define_MC_HASBASES0x2
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


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

2018-03-19 Thread Lawrence Stewart
Author: lstewart
Date: Mon Mar 19 16:37:47 2018
New Revision: 331214
URL: https://svnweb.freebsd.org/changeset/base/331214

Log:
  Add support for the experimental Internet-Draft "TCP Alternative Backoff with
  ECN (ABE)" proposal to the New Reno congestion control algorithm module.
  ABE reduces the amount of congestion window reduction in response to
  ECN-signalled congestion relative to the loss-inferred congestion response.
  
  More details about ABE can be found in the Internet-Draft:
  https://tools.ietf.org/html/draft-ietf-tcpm-alternativebackoff-ecn
  
  The implementation introduces four new sysctls:
  
  - net.inet.tcp.cc.abe defaults to 0 (disabled) and can be set to non-zero to
enable ABE for ECN-enabled TCP connections.
  
  - net.inet.tcp.cc.newreno.beta and net.inet.tcp.cc.newreno.beta_ecn set the
multiplicative window decrease factor, specified as a percentage, applied to
the congestion window in response to a loss-based or ECN-based congestion
signal respectively. They default to the values specified in the draft i.e.
beta=50 and beta_ecn=80.
  
  - net.inet.tcp.cc.abe_frlossreduce defaults to 0 (disabled) and can be set to
non-zero to enable the use of standard beta (50% by default) when repairing
loss during an ECN-signalled congestion recovery episode. It enables a more
conservative congestion response and is provided for the purposes of
experimentation as a result of some discussion at IETF 100 in Singapore.
  
  The values of beta and beta_ecn can also be set per-connection by way of the
  TCP_CCALGOOPT TCP-level socket option and the new CC_NEWRENO_BETA or
  CC_NEWRENO_BETA_ECN CC algo sub-options.
  
  Submitted by: Tom Jones 
  Tested by:Tom Jones , Grenville Armitage 

  Relnotes: Yes
  Differential Revision:https://reviews.freebsd.org/D11616

Added:
  head/sys/netinet/cc/cc_newreno.h   (contents, props changed)
Modified:
  head/share/man/man4/cc_newreno.4
  head/share/man/man4/mod_cc.4
  head/sys/netinet/cc/cc.c
  head/sys/netinet/cc/cc.h
  head/sys/netinet/cc/cc_newreno.c

Modified: head/share/man/man4/cc_newreno.4
==
--- head/share/man/man4/cc_newreno.4Mon Mar 19 16:17:10 2018
(r331213)
+++ head/share/man/man4/cc_newreno.4Mon Mar 19 16:37:47 2018
(r331214)
@@ -30,17 +30,69 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 15, 2011
+.Dd March 19, 2018
 .Dt CC_NEWRENO 4
 .Os
 .Sh NAME
 .Nm cc_newreno
 .Nd NewReno Congestion Control Algorithm
+.Sh SYNOPSIS
+.In netinet/cc/cc_newreno.h
 .Sh DESCRIPTION
 The NewReno congestion control algorithm is the default for TCP.
 Details about the algorithm can be found in RFC5681.
+.Sh Socket Options
+The
+.Nm
+module supports a number of socket options under TCP_CCALGOOPT (refer to
+.Xr tcp 4
+and
+.Xr moc_cc 9 for details)
+which can
+be set with
+.Xr setsockopt 2
+and tested with
+.Xr getsockopt 2 .
+The 
+.Nm
+socket options use this structure defined in
+:
+.Bd -literal
+struct cc_newreno_opts {
+   int name;
+   uint32_t val;
+}
+.Ed
+.Bl -tag -width ".Va CC_NEWRENO_BETA_ECN"
+.It Va CC_NEWRENO_BETA
+Multiplicative window decrease factor, specified as a percentage, applied to
+the congestion window in response to a congestion signal per: cwnd = (cwnd *
+CC_NEWRENO_BETA) / 100.
+Default is 50.
+.It Va CC_NEWRENO_BETA_ECN
+Multiplicative window decrease factor, specified as a percentage, applied to
+the congestion window in response to an ECN congestion signal when
+.Va net.inet.tcp.cc.abe=1
+per: cwnd = (cwnd * CC_NEWRENO_BETA_ECN) / 100.
+Default is 80.
 .Sh MIB Variables
-There are currently no tunable MIB variables.
+The algorithm exposes these variables in the
+.Va net.inet.tcp.cc.newreno
+branch of the
+.Xr sysctl 3
+MIB:
+.Bl -tag -width ".Va beta_ecn"
+.It Va beta
+Multiplicative window decrease factor, specified as a percentage, applied to
+the congestion window in response to a congestion signal per: cwnd = (cwnd *
+beta) / 100.
+Default is 50.
+.It Va beta_ecn
+Multiplicative window decrease factor, specified as a percentage, applied to
+the congestion window in response to an ECN congestion signal when
+.Va net.inet.tcp.cc.abe=1
+per: cwnd = (cwnd * beta_ecn) / 100.
+Default is 80.
 .Sh SEE ALSO
 .Xr cc_chd 4 ,
 .Xr cc_cubic 4 ,
@@ -50,6 +102,24 @@ There are currently no tunable MIB variables.
 .Xr mod_cc 4 ,
 .Xr tcp 4 ,
 .Xr mod_cc 9
+.Rs
+.%A "Mark Allman"
+.%A "Vern Paxson"
+.%A "Ethan Blanton"
+.%T "TCP Congestion Control"
+.%O "RFC 5681"
+.Re
+.Rs
+.%A "Naeem Khademi"
+.%A "Michael Welzl"
+.%A "Grenville Armitage"
+.%A "Gorry Fairhurst"
+.%T "TCP Alternative Backoff with ECN (ABE)"
+.%R "internet draft"
+.%D "February 2018"
+.%N "draft-ietf-tcpm-alternativebackoff-ecn"
+.%O "work in progress"
+.Re
 .Sh ACKNOWLEDGEMENTS
 Development and testing of this software were made possible in part by grants
 from the FreeBSD 

svn commit: r331213 - head/stand/defaults

2018-03-19 Thread Kyle Evans
Author: kevans
Date: Mon Mar 19 16:17:10 2018
New Revision: 331213
URL: https://svnweb.freebsd.org/changeset/base/331213

Log:
  Amend missed reference to /boot/overlays, moved to /boot/dtb/overlays

Modified:
  head/stand/defaults/loader.conf.5

Modified: head/stand/defaults/loader.conf.5
==
--- head/stand/defaults/loader.conf.5   Mon Mar 19 16:16:12 2018
(r331212)
+++ head/stand/defaults/loader.conf.5   Mon Mar 19 16:17:10 2018
(r331213)
@@ -284,7 +284,7 @@ that have no default value:
 .Bl -tag -width bootfile -offset indent
 .It Va fdt_overlays
 Specifies a comma-delimited list of FDT overlays to apply.
-.Pa /boot/overlays
+.Pa /boot/dtb/overlays
 is created by default for overlays to be placed in.
 .It Va kernels_autodetect
 If set to
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331212 - in head: etc/mtree stand/defaults

2018-03-19 Thread Kyle Evans
Author: kevans
Date: Mon Mar 19 16:16:12 2018
New Revision: 331212
URL: https://svnweb.freebsd.org/changeset/base/331212

Log:
  Move /boot/overlays to /boot/dtb/overlays
  
  The former is fairly vague; these are FDT overlays to be applied to the
  running system, so /boot/dtb is a sensible location to put it without
  cluttering up /boot/dtb even further if desired.

Modified:
  head/etc/mtree/BSD.root.dist
  head/stand/defaults/loader.conf

Modified: head/etc/mtree/BSD.root.dist
==
--- head/etc/mtree/BSD.root.distMon Mar 19 15:48:31 2018
(r331211)
+++ head/etc/mtree/BSD.root.distMon Mar 19 16:16:12 2018
(r331212)
@@ -11,6 +11,8 @@
 defaults
 ..
 dtb
+overlays  tags=package=runtime
+..
 ..
 firmware
 ..
@@ -19,8 +21,6 @@
 kernel
 ..
 modules
-..
-overlays  tags=package=runtime
 ..
 zfs
 ..

Modified: head/stand/defaults/loader.conf
==
--- head/stand/defaults/loader.conf Mon Mar 19 15:48:31 2018
(r331211)
+++ head/stand/defaults/loader.conf Mon Mar 19 16:16:12 2018
(r331212)
@@ -80,7 +80,7 @@ bootenv_autolist="YES"# Auto populate the 
list of ZF
 #comconsole_speed="9600"   # Set the current serial console speed
 #console="vidconsole"  # A comma separated list of console(s)
 #currdev="disk1s1a"# Set the current device
-module_path="/boot/modules;/boot/dtb;/boot/overlays"   # Set the module search 
path
+module_path="/boot/modules;/boot/dtb;/boot/dtb/overlays"   # Set the 
module search path
 #prompt="\\${interpret}"   # Set the command prompt
 #root_disk_unit="0"# Force the root disk unit number
 #rootdev="disk1s1a"# Set the root filesystem
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331211 - head/stand/lua

2018-03-19 Thread Kyle Evans
Author: kevans
Date: Mon Mar 19 15:48:31 2018
New Revision: 331211
URL: https://svnweb.freebsd.org/changeset/base/331211

Log:
  lualoader: Setup default color scheme if we're using colors
  
  The console may have been set for different colors before lualoader kicks
  in; notably, a black-on-white color scheme is not necessarily what we're
  expecting.
  
  While here, make color.default() a composition of color.escape() instead of
  rewriting the escape sequence to make it more obvious what it's achieving: a
  white-on-black color scheme with no attributes set.
  
  Reported by:  emaste, whose eyes may rest easily

Modified:
  head/stand/lua/color.lua
  head/stand/lua/loader.lua

Modified: head/stand/lua/color.lua
==
--- head/stand/lua/color.luaMon Mar 19 15:35:26 2018(r331210)
+++ head/stand/lua/color.luaMon Mar 19 15:48:31 2018(r331211)
@@ -89,7 +89,7 @@ function color.default()
if color.disabled then
return ""
end
-   return core.KEYSTR_CSI .. "0;37;40m"
+   return color.escape(color.WHITE, color.BLACK, color.DEFAULT)
 end
 
 function color.highlight(str)

Modified: head/stand/lua/loader.lua
==
--- head/stand/lua/loader.lua   Mon Mar 19 15:35:26 2018(r331210)
+++ head/stand/lua/loader.lua   Mon Mar 19 15:48:31 2018(r331211)
@@ -34,6 +34,7 @@
 -- Other modules will also need some of the functions it defines to safely
 -- execute loader commands.
 require("cli")
+local color = require("color")
 local core = require("core")
 local config = require("config")
 local menu
@@ -49,6 +50,11 @@ if result ~= nil then
 end
 
 config.load()
+-- Our console may have been setup for a different color scheme before we get
+-- here, so make sure we set the default.
+if color.isEnabled() then
+   printc(color.default())
+end
 password.check()
 -- menu might be disabled
 if menu ~= nil then
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r331057 - head/sys/compat/linux

2018-03-19 Thread John Baldwin
On Friday, March 16, 2018 02:51:47 PM Ed Maste wrote:
> Author: emaste
> Date: Fri Mar 16 14:51:47 2018
> New Revision: 331057
> URL: https://svnweb.freebsd.org/changeset/base/331057
> 
> Log:
>   linux_errno.c: add newer errno values
>   
>   Also introduce a static assert to ensure the list is kept up to date.
>   
>   Sponsored by:   Turing Robotic Industries Inc.

Could you move the table to a header perhaps so it can also be shared
with lib/libsysdecode/errno.c (which has another copy of this table)?

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


svn commit: r331210 - head/sys/dts

2018-03-19 Thread Emmanuel Vadot
Author: manu
Date: Mon Mar 19 15:35:26 2018
New Revision: 331210
URL: https://svnweb.freebsd.org/changeset/base/331210

Log:
  sys/dts: Remove arm64 from subdir as it no longer exists.
  
  r325987 removed the arm64 directory, remove it from SUBDIR too.

Modified:
  head/sys/dts/Makefile

Modified: head/sys/dts/Makefile
==
--- head/sys/dts/Makefile   Mon Mar 19 15:27:53 2018(r331209)
+++ head/sys/dts/Makefile   Mon Mar 19 15:35:26 2018(r331210)
@@ -1,5 +1,5 @@
 # $FreeBSD$
 
-SUBDIR=arm arm64 mips powerpc
+SUBDIR=arm mips powerpc
 
 .include 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331209 - head

2018-03-19 Thread Kyle Evans
Author: kevans
Date: Mon Mar 19 15:27:53 2018
New Revision: 331209
URL: https://svnweb.freebsd.org/changeset/base/331209

Log:
  Add note to UPDATING about UEFI changes requiring loader(8) update
  
  These problems have only been observed with boards using U-Boot (e.g. ARM)
  where virtual addresses are already set in the memory map by the firmware
  and the firmware is expecting a call to SetVirtualAddressMap to be made.
  I refrain from mentioning this in the note because this could also be the
  case on some not-yet-tested firmware on amd64 and it's not a bad
  recommendation for the general case.

Modified:
  head/UPDATING

Modified: head/UPDATING
==
--- head/UPDATING   Mon Mar 19 15:11:10 2018(r331208)
+++ head/UPDATING   Mon Mar 19 15:27:53 2018(r331209)
@@ -51,6 +51,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW:
 
 ** SPECIAL WARNING: **
 
+20180319:
+   For UEFI systems: the UEFI loader(8), loader.efi, should be updated in
+   conjunction with installing a new kernel after r330868. The kernel,
+   after this revision, will be more lenient when mapping addresses for
+   UEFI Runtime Services and this may result in a kernel panic without the
+   corresponding loader(8) update.
+
 20180212:
FreeBSD boot loader enhanced with Lua scripting. It's purely opt-in for
now by building WITH_LOADER_LUA and WITHOUT_FORTH in /etc/src.conf.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331208 - in head/sys: amd64/linux amd64/linux32 i386/linux

2018-03-19 Thread Ed Maste
Author: emaste
Date: Mon Mar 19 15:11:10 2018
New Revision: 331208
URL: https://svnweb.freebsd.org/changeset/base/331208

Log:
  linux*_sysvec.c: rationalize whitespace and comments
  
  There's a fair amount of duplication between MD linuxulator files.
  Make indentation and comments consistent between the three versions of
  linux_sysvec.c to reduce diffs when comparing them.
  
  Sponsored by: Turing Robotic Industries Inc.

Modified:
  head/sys/amd64/linux/linux_sysvec.c
  head/sys/amd64/linux32/linux32_sysvec.c
  head/sys/i386/linux/linux_sysvec.c

Modified: head/sys/amd64/linux/linux_sysvec.c
==
--- head/sys/amd64/linux/linux_sysvec.c Mon Mar 19 15:07:15 2018
(r331207)
+++ head/sys/amd64/linux/linux_sysvec.c Mon Mar 19 15:11:10 2018
(r331208)
@@ -126,6 +126,7 @@ static void linux_vdso_install(void *param);
 static voidlinux_vdso_deinstall(void *param);
 static voidlinux_set_syscall_retval(struct thread *td, int error);
 static int linux_fetch_syscall_args(struct thread *td);
+static int exec_linux_imgact_try(struct image_params *iparams);
 static voidlinux_exec_setregs(struct thread *td, struct image_params *imgp,
u_long stack);
 static int linux_vsyscall(struct thread *td);
@@ -669,8 +670,6 @@ linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigse
  * be able to modify the interpreter path.  We only do this if a Linux
  * binary is doing the exec, so we do not create an EXEC module for it.
  */
-static int exec_linux_imgact_try(struct image_params *iparams);
-
 static int
 exec_linux_imgact_try(struct image_params *imgp)
 {
@@ -685,15 +684,14 @@ exec_linux_imgact_try(struct image_params *imgp)
 */
if (((const short *)head)[0] == SHELLMAGIC) {
/*
-* Run our normal shell image activator.  If it succeeds
-* attempt to use the alternate path for the interpreter.
-* If an alternate path is found, use our stringspace
-* to store it.
+* Run our normal shell image activator.  If it succeeds then
+* attempt to use the alternate path for the interpreter.  If
+* an alternate path is found, use our stringspace to store it.
 */
if ((error = exec_shell_imgact(imgp)) == 0) {
linux_emul_convpath(FIRST_THREAD_IN_PROC(imgp->proc),
-   imgp->interpreter_name, UIO_SYSSPACE,
-   , 0, AT_FDCWD);
+   imgp->interpreter_name, UIO_SYSSPACE, , 0,
+   AT_FDCWD);
if (rpath != NULL)
imgp->args->fname_buf =
imgp->interpreter_name = rpath;

Modified: head/sys/amd64/linux32/linux32_sysvec.c
==
--- head/sys/amd64/linux32/linux32_sysvec.c Mon Mar 19 15:07:15 2018
(r331207)
+++ head/sys/amd64/linux32/linux32_sysvec.c Mon Mar 19 15:11:10 2018
(r331208)
@@ -124,6 +124,7 @@ static int  elf_linux_fixup(register_t **stack_base,
struct image_params *iparams);
 static register_t *linux_copyout_strings(struct image_params *imgp);
 static void linux_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask);
+static int exec_linux_imgact_try(struct image_params *iparams);
 static voidexec_linux_setregs(struct thread *td,
   struct image_params *imgp, u_long stack);
 static voidlinux32_fixlimit(struct rlimit *rl, int which);
@@ -722,8 +723,6 @@ linux32_fetch_syscall_args(struct thread *td)
  * be able to modify the interpreter path.  We only do this if a Linux
  * binary is doing the exec, so we do not create an EXEC module for it.
  */
-static int exec_linux_imgact_try(struct image_params *iparams);
-
 static int
 exec_linux_imgact_try(struct image_params *imgp)
 {
@@ -732,16 +731,16 @@ exec_linux_imgact_try(struct image_params *imgp)
int error = -1;
 
/*
-   * The interpreter for shell scripts run from a Linux binary needs
-   * to be located in /compat/linux if possible in order to recursively
-   * maintain Linux path emulation.
-   */
+* The interpreter for shell scripts run from a Linux binary needs
+* to be located in /compat/linux if possible in order to recursively
+* maintain Linux path emulation.
+*/
if (((const short *)head)[0] == SHELLMAGIC) {
/*
-   * Run our normal shell image activator.  If it succeeds attempt
-   * to use the alternate path for the interpreter.  If an
-   * alternate * path is found, use our stringspace to store it.
-   */
+* Run our normal shell image activator.  If it succeeds 

svn commit: r331207 - head/stand/defaults

2018-03-19 Thread Ed Maste
Author: emaste
Date: Mon Mar 19 15:07:15 2018
New Revision: 331207
URL: https://svnweb.freebsd.org/changeset/base/331207

Log:
  loader.conf: remove obsolete non-x86 beastie menu statement
  
  As of r330005 the same loader.conf defaults are used on all platforms.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/stand/defaults/loader.conf.5

Modified: head/stand/defaults/loader.conf.5
==
--- head/stand/defaults/loader.conf.5   Mon Mar 19 14:28:58 2018
(r331206)
+++ head/stand/defaults/loader.conf.5   Mon Mar 19 15:07:15 2018
(r331207)
@@ -23,7 +23,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" $FreeBSD$
-.Dd March 7, 2018
+.Dd March 19, 2018
 .Dt LOADER.CONF 5
 .Os
 .Sh NAME
@@ -249,7 +249,6 @@ be displayed.
 If set to
 .Dq YES ,
 the beastie boot menu will be skipped.
-The beastie boot menu is always skipped if running non-x86 hardware.
 .It Va loader_logo Pq Dq Li orbbw
 Selects a desired logo in the beastie boot menu.
 Possible values are:
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331206 - in stable/10: lib/libc/sparc64/sys libexec/rtld-elf libexec/rtld-elf/amd64 libexec/rtld-elf/arm libexec/rtld-elf/i386 libexec/rtld-elf/ia64 libexec/rtld-elf/mips libexec/rtld-...

2018-03-19 Thread Marius Strobl
Author: marius
Date: Mon Mar 19 14:28:58 2018
New Revision: 331206
URL: https://svnweb.freebsd.org/changeset/base/331206

Log:
  MFC: r328834
  
  o Let rtld(1) set up psABI user trap handlers prior to executing the
objects' init functions instead of doing the setup via a constructor
in libc as the init functions may already depend on these handlers
to be in place. This gets us rid of:
- the undefined order in which libc constructors as __guard_setup()
  and jemalloc_constructor() are executed WRT __sparc_utrap_setup(),
- the requirement to link libc last so __sparc_utrap_setup() gets
  called prior to constructors in other libraries (see r122883).
For static binaries, crt1.o still sets up the user trap handlers.
  o Move misplaced prototypes for MD functions in to the MD prototype
section of rtld.h.
  o Sprinkle nitems().

Modified:
  stable/10/lib/libc/sparc64/sys/__sparc_utrap_setup.c
  stable/10/libexec/rtld-elf/amd64/reloc.c
  stable/10/libexec/rtld-elf/arm/reloc.c
  stable/10/libexec/rtld-elf/i386/reloc.c
  stable/10/libexec/rtld-elf/ia64/reloc.c
  stable/10/libexec/rtld-elf/mips/reloc.c
  stable/10/libexec/rtld-elf/powerpc/reloc.c
  stable/10/libexec/rtld-elf/powerpc64/reloc.c
  stable/10/libexec/rtld-elf/rtld.c
  stable/10/libexec/rtld-elf/rtld.h
  stable/10/libexec/rtld-elf/sparc64/reloc.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/sparc64/sys/__sparc_utrap_setup.c
==
--- stable/10/lib/libc/sparc64/sys/__sparc_utrap_setup.cMon Mar 19 
14:28:20 2018(r331205)
+++ stable/10/lib/libc/sparc64/sys/__sparc_utrap_setup.cMon Mar 19 
14:28:58 2018(r331206)
@@ -27,13 +27,11 @@
 #include 
 __FBSDID("$FreeBSD$");
 
-#include 
+#include 
 
 #include 
 #include 
 
-#include 
-
 #include "__sparc_utrap_private.h"
 
 static const struct sparc_utrap_args ua[] = {
@@ -45,10 +43,10 @@ static const struct sparc_utrap_args ua[] = {
 };
 
 static const struct sparc_utrap_install_args uia[] = {
-   { sizeof (ua) / sizeof (*ua), ua }
+   { nitems(ua), ua }
 };
 
-void __sparc_utrap_setup(void) __attribute__((constructor));
+void __sparc_utrap_setup(void);
 
 void
 __sparc_utrap_setup(void)

Modified: stable/10/libexec/rtld-elf/amd64/reloc.c
==
--- stable/10/libexec/rtld-elf/amd64/reloc.cMon Mar 19 14:28:20 2018
(r331205)
+++ stable/10/libexec/rtld-elf/amd64/reloc.cMon Mar 19 14:28:58 2018
(r331206)
@@ -471,6 +471,12 @@ ifunc_init(Elf_Auxinfo aux_info[__min_size(AT_COUNT)] 
 }
 
 void
+pre_init(void)
+{
+
+}
+
+void
 allocate_initial_tls(Obj_Entry *objs)
 {
 /*

Modified: stable/10/libexec/rtld-elf/arm/reloc.c
==
--- stable/10/libexec/rtld-elf/arm/reloc.c  Mon Mar 19 14:28:20 2018
(r331205)
+++ stable/10/libexec/rtld-elf/arm/reloc.c  Mon Mar 19 14:28:58 2018
(r331206)
@@ -437,6 +437,13 @@ reloc_jmpslot(Elf_Addr *where, Elf_Addr target, const 
 void
 ifunc_init(Elf_Auxinfo aux_info[__min_size(AT_COUNT)] __unused)
 {
+
+}
+
+void
+pre_init(void)
+{
+
 }
 
 void

Modified: stable/10/libexec/rtld-elf/i386/reloc.c
==
--- stable/10/libexec/rtld-elf/i386/reloc.c Mon Mar 19 14:28:20 2018
(r331205)
+++ stable/10/libexec/rtld-elf/i386/reloc.c Mon Mar 19 14:28:58 2018
(r331206)
@@ -457,6 +457,12 @@ ifunc_init(Elf_Auxinfo aux_info[__min_size(AT_COUNT)] 
 }
 
 void
+pre_init(void)
+{
+
+}
+
+void
 allocate_initial_tls(Obj_Entry *objs)
 {
 void* tls;

Modified: stable/10/libexec/rtld-elf/ia64/reloc.c
==
--- stable/10/libexec/rtld-elf/ia64/reloc.c Mon Mar 19 14:28:20 2018
(r331205)
+++ stable/10/libexec/rtld-elf/ia64/reloc.c Mon Mar 19 14:28:58 2018
(r331206)
@@ -606,6 +606,13 @@ call_init_pointer(const Obj_Entry *obj, Elf_Addr targe
 void  
 ifunc_init(Elf_Auxinfo aux_info[__min_size(AT_COUNT)] __unused)
 {
+
+}
+
+void
+pre_init(void)
+{
+
 }
 
 /* Initialize the special PLT entries. */

Modified: stable/10/libexec/rtld-elf/mips/reloc.c
==
--- stable/10/libexec/rtld-elf/mips/reloc.c Mon Mar 19 14:28:20 2018
(r331205)
+++ stable/10/libexec/rtld-elf/mips/reloc.c Mon Mar 19 14:28:58 2018
(r331206)
@@ -620,6 +620,13 @@ reloc_jmpslot(Elf_Addr *where, Elf_Addr target, const 
 void
 ifunc_init(Elf_Auxinfo aux_info[__min_size(AT_COUNT)] __unused)
 {
+
+}
+
+void
+pre_init(void)
+{
+
 }
 
 void

Modified: stable/10/libexec/rtld-elf/powerpc/reloc.c
==
--- 

svn commit: r331205 - in stable/11: lib/libc/sparc64/sys libexec/rtld-elf libexec/rtld-elf/aarch64 libexec/rtld-elf/amd64 libexec/rtld-elf/arm libexec/rtld-elf/i386 libexec/rtld-elf/mips libexec/rt...

2018-03-19 Thread Marius Strobl
Author: marius
Date: Mon Mar 19 14:28:20 2018
New Revision: 331205
URL: https://svnweb.freebsd.org/changeset/base/331205

Log:
  MFC: r328834
  
  o Let rtld(1) set up psABI user trap handlers prior to executing the
objects' init functions instead of doing the setup via a constructor
in libc as the init functions may already depend on these handlers
to be in place. This gets us rid of:
- the undefined order in which libc constructors as __guard_setup()
  and jemalloc_constructor() are executed WRT __sparc_utrap_setup(),
- the requirement to link libc last so __sparc_utrap_setup() gets
  called prior to constructors in other libraries (see r122883).
For static binaries, crt1.o still sets up the user trap handlers.
  o Move misplaced prototypes for MD functions in to the MD prototype
section of rtld.h.
  o Sprinkle nitems().

Modified:
  stable/11/lib/libc/sparc64/sys/__sparc_utrap_setup.c
  stable/11/libexec/rtld-elf/aarch64/reloc.c
  stable/11/libexec/rtld-elf/amd64/reloc.c
  stable/11/libexec/rtld-elf/arm/reloc.c
  stable/11/libexec/rtld-elf/i386/reloc.c
  stable/11/libexec/rtld-elf/mips/reloc.c
  stable/11/libexec/rtld-elf/powerpc/reloc.c
  stable/11/libexec/rtld-elf/powerpc64/reloc.c
  stable/11/libexec/rtld-elf/riscv/reloc.c
  stable/11/libexec/rtld-elf/rtld.c
  stable/11/libexec/rtld-elf/rtld.h
  stable/11/libexec/rtld-elf/sparc64/reloc.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/lib/libc/sparc64/sys/__sparc_utrap_setup.c
==
--- stable/11/lib/libc/sparc64/sys/__sparc_utrap_setup.cMon Mar 19 
13:51:33 2018(r331204)
+++ stable/11/lib/libc/sparc64/sys/__sparc_utrap_setup.cMon Mar 19 
14:28:20 2018(r331205)
@@ -29,13 +29,11 @@
 #include 
 __FBSDID("$FreeBSD$");
 
-#include 
+#include 
 
 #include 
 #include 
 
-#include 
-
 #include "__sparc_utrap_private.h"
 
 static const struct sparc_utrap_args ua[] = {
@@ -47,10 +45,10 @@ static const struct sparc_utrap_args ua[] = {
 };
 
 static const struct sparc_utrap_install_args uia[] = {
-   { sizeof (ua) / sizeof (*ua), ua }
+   { nitems(ua), ua }
 };
 
-void __sparc_utrap_setup(void) __attribute__((constructor));
+void __sparc_utrap_setup(void);
 
 void
 __sparc_utrap_setup(void)

Modified: stable/11/libexec/rtld-elf/aarch64/reloc.c
==
--- stable/11/libexec/rtld-elf/aarch64/reloc.c  Mon Mar 19 13:51:33 2018
(r331204)
+++ stable/11/libexec/rtld-elf/aarch64/reloc.c  Mon Mar 19 14:28:20 2018
(r331205)
@@ -306,6 +306,13 @@ reloc_jmpslot(Elf_Addr *where, Elf_Addr target, const 
 void
 ifunc_init(Elf_Auxinfo aux_info[__min_size(AT_COUNT)] __unused)
 {
+
+}
+
+void
+pre_init(void)
+{
+
 }
 
 /*

Modified: stable/11/libexec/rtld-elf/amd64/reloc.c
==
--- stable/11/libexec/rtld-elf/amd64/reloc.cMon Mar 19 13:51:33 2018
(r331204)
+++ stable/11/libexec/rtld-elf/amd64/reloc.cMon Mar 19 14:28:20 2018
(r331205)
@@ -485,6 +485,12 @@ ifunc_init(Elf_Auxinfo aux_info[__min_size(AT_COUNT)] 
 }
 
 void
+pre_init(void)
+{
+
+}
+
+void
 allocate_initial_tls(Obj_Entry *objs)
 {
 /*

Modified: stable/11/libexec/rtld-elf/arm/reloc.c
==
--- stable/11/libexec/rtld-elf/arm/reloc.c  Mon Mar 19 13:51:33 2018
(r331204)
+++ stable/11/libexec/rtld-elf/arm/reloc.c  Mon Mar 19 14:28:20 2018
(r331205)
@@ -481,6 +481,13 @@ reloc_jmpslot(Elf_Addr *where, Elf_Addr target, const 
 void
 ifunc_init(Elf_Auxinfo aux_info[__min_size(AT_COUNT)] __unused)
 {
+
+}
+
+void
+pre_init(void)
+{
+
 }
 
 void

Modified: stable/11/libexec/rtld-elf/i386/reloc.c
==
--- stable/11/libexec/rtld-elf/i386/reloc.c Mon Mar 19 13:51:33 2018
(r331204)
+++ stable/11/libexec/rtld-elf/i386/reloc.c Mon Mar 19 14:28:20 2018
(r331205)
@@ -471,6 +471,12 @@ ifunc_init(Elf_Auxinfo aux_info[__min_size(AT_COUNT)] 
 }
 
 void
+pre_init(void)
+{
+
+}
+
+void
 allocate_initial_tls(Obj_Entry *objs)
 {
 void* tls;

Modified: stable/11/libexec/rtld-elf/mips/reloc.c
==
--- stable/11/libexec/rtld-elf/mips/reloc.c Mon Mar 19 13:51:33 2018
(r331204)
+++ stable/11/libexec/rtld-elf/mips/reloc.c Mon Mar 19 14:28:20 2018
(r331205)
@@ -628,6 +628,13 @@ reloc_jmpslot(Elf_Addr *where, Elf_Addr target, const 
 void
 ifunc_init(Elf_Auxinfo aux_info[__min_size(AT_COUNT)] __unused)
 {
+
+}
+
+void
+pre_init(void)
+{
+
 }
 
 void

Modified: stable/11/libexec/rtld-elf/powerpc/reloc.c
==
--- 

svn commit: r331204 - head/sys/ofed/drivers/infiniband/core

2018-03-19 Thread Hans Petter Selasky
Author: hselasky
Date: Mon Mar 19 13:51:33 2018
New Revision: 331204
URL: https://svnweb.freebsd.org/changeset/base/331204

Log:
  Remove redundant integer cast in ibcore. The "ref_count" field already
  has integer type.
  
  MFC after:1 week
  Sponsored by: Mellanox Technologies

Modified:
  head/sys/ofed/drivers/infiniband/core/ib_fmr_pool.c

Modified: head/sys/ofed/drivers/infiniband/core/ib_fmr_pool.c
==
--- head/sys/ofed/drivers/infiniband/core/ib_fmr_pool.c Mon Mar 19 10:50:27 
2018(r331203)
+++ head/sys/ofed/drivers/infiniband/core/ib_fmr_pool.c Mon Mar 19 13:51:33 
2018(r331204)
@@ -155,7 +155,7 @@ static void ib_fmr_batch_release(struct ib_fmr_pool *p
 #ifdef DEBUG
if (fmr->ref_count !=0) {
pr_warn(PFX "Unmapping FMR %p with ref count %d\n",
-   fmr, (int)fmr->ref_count);
+   fmr, fmr->ref_count);
}
 #endif
}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331203 - head/sbin/ipfw

2018-03-19 Thread Andrey V. Elsukov
Author: ae
Date: Mon Mar 19 10:50:27 2018
New Revision: 331203
URL: https://svnweb.freebsd.org/changeset/base/331203

Log:
  Remove note that `fwd tablearg` is supported only by IPv4. IPv6 is
  supported too.
  
  MFC after:1 week

Modified:
  head/sbin/ipfw/ipfw.8

Modified: head/sbin/ipfw/ipfw.8
==
--- head/sbin/ipfw/ipfw.8   Mon Mar 19 09:54:16 2018(r331202)
+++ head/sbin/ipfw/ipfw.8   Mon Mar 19 10:50:27 2018(r331203)
@@ -1,7 +1,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 12, 2018
+.Dd March 19, 2018
 .Dt IPFW 8
 .Os
 .Sh NAME
@@ -825,7 +825,7 @@ The search terminates.
 Change the next-hop on matching packets to
 .Ar ipaddr ,
 which can be an IP address or a host name.
-For IPv4, the next hop can also be supplied by the last table
+The next hop can also be supplied by the last table
 looked up for the packet by using the
 .Cm tablearg
 keyword instead of an explicit address.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331202 - in stable/10: sbin/ipfw sys/netpfil/ipfw

2018-03-19 Thread Andrey V. Elsukov
Author: ae
Date: Mon Mar 19 09:54:16 2018
New Revision: 331202
URL: https://svnweb.freebsd.org/changeset/base/331202

Log:
  MFC r330792:
Do not try to reassemble IPv6 fragments in "reass" rule.
  
ip_reass() expects IPv4 packet and will just corrupt any IPv6 packets
that it gets. Until proper IPv6 fragments handling function will be
implemented, pass IPv6 packets to next rule.
  
PR: 170604

Modified:
  stable/10/sbin/ipfw/ipfw.8
  stable/10/sys/netpfil/ipfw/ip_fw2.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/ipfw/ipfw.8
==
--- stable/10/sbin/ipfw/ipfw.8  Mon Mar 19 09:52:16 2018(r331201)
+++ stable/10/sbin/ipfw/ipfw.8  Mon Mar 19 09:54:16 2018(r331202)
@@ -1,7 +1,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd May 26, 2016
+.Dd March 12, 2018
 .Dt IPFW 8
 .Os
 .Sh NAME
@@ -1016,7 +1016,7 @@ keyword with setdscp.
 If the tablearg value is not within the 0..64 range, lower 6 bits of supplied
 value are used.
 .It Cm reass
-Queue and reassemble IP fragments.
+Queue and reassemble IPv4 fragments.
 If the packet is not fragmented, counters are updated and
 processing continues with the next rule.
 If the packet is the last logical fragment, the packet is reassembled and, if

Modified: stable/10/sys/netpfil/ipfw/ip_fw2.c
==
--- stable/10/sys/netpfil/ipfw/ip_fw2.c Mon Mar 19 09:52:16 2018
(r331201)
+++ stable/10/sys/netpfil/ipfw/ip_fw2.c Mon Mar 19 09:54:16 2018
(r331202)
@@ -2461,8 +2461,10 @@ do { 
\
case O_REASS: {
int ip_off;
 
-   IPFW_INC_RULE_COUNTER(f, pktlen);
l = 0;  /* in any case exit inner loop */
+   if (is_ipv6) /* IPv6 is not supported yet */
+   break;
+   IPFW_INC_RULE_COUNTER(f, pktlen);
ip_off = ntohs(ip->ip_off);
 
/* if not fragmented, go to next rule */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331201 - in stable/11: sbin/ipfw sys/netpfil/ipfw

2018-03-19 Thread Andrey V. Elsukov
Author: ae
Date: Mon Mar 19 09:52:16 2018
New Revision: 331201
URL: https://svnweb.freebsd.org/changeset/base/331201

Log:
  MFC r330792:
Do not try to reassemble IPv6 fragments in "reass" rule.
  
ip_reass() expects IPv4 packet and will just corrupt any IPv6 packets
that it gets. Until proper IPv6 fragments handling function will be
implemented, pass IPv6 packets to next rule.
  
PR: 170604

Modified:
  stable/11/sbin/ipfw/ipfw.8
  stable/11/sys/netpfil/ipfw/ip_fw2.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sbin/ipfw/ipfw.8
==
--- stable/11/sbin/ipfw/ipfw.8  Mon Mar 19 08:28:25 2018(r331200)
+++ stable/11/sbin/ipfw/ipfw.8  Mon Mar 19 09:52:16 2018(r331201)
@@ -1,7 +1,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 3, 2017
+.Dd March 12, 2018
 .Dt IPFW 8
 .Os
 .Sh NAME
@@ -1135,7 +1135,7 @@ Regardless of matched a packet or not by the
 .Cm tcp-setmss
 rule, the search continues with the next rule.
 .It Cm reass
-Queue and reassemble IP fragments.
+Queue and reassemble IPv4 fragments.
 If the packet is not fragmented, counters are updated and
 processing continues with the next rule.
 If the packet is the last logical fragment, the packet is reassembled and, if

Modified: stable/11/sys/netpfil/ipfw/ip_fw2.c
==
--- stable/11/sys/netpfil/ipfw/ip_fw2.c Mon Mar 19 08:28:25 2018
(r331200)
+++ stable/11/sys/netpfil/ipfw/ip_fw2.c Mon Mar 19 09:52:16 2018
(r331201)
@@ -2779,8 +2779,10 @@ do { 
\
case O_REASS: {
int ip_off;
 
-   IPFW_INC_RULE_COUNTER(f, pktlen);
l = 0;  /* in any case exit inner loop */
+   if (is_ipv6) /* IPv6 is not supported yet */
+   break;
+   IPFW_INC_RULE_COUNTER(f, pktlen);
ip_off = ntohs(ip->ip_off);
 
/* if not fragmented, go to next rule */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331200 - svnadmin/conf

2018-03-19 Thread Hiroki Sato
Author: hrs
Date: Mon Mar 19 08:28:25 2018
New Revision: 331200
URL: https://svnweb.freebsd.org/changeset/base/331200

Log:
  Please welcome Vincenzo Maffione (vmaffione) as a new src
  committer.  He will work on netmap framework.
  
  I (hrs) will be his mentor.
  
  Approved by:  core (implicit)

Modified:
  svnadmin/conf/access

Modified: svnadmin/conf/access
==
--- svnadmin/conf/accessMon Mar 19 07:37:36 2018(r331199)
+++ svnadmin/conf/accessMon Mar 19 08:28:25 2018(r331200)
@@ -218,6 +218,7 @@ tychon
 ume
 uqs
 vangyzen
+vmaffione
 whu
 will
 wma
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331199 - stable/11/share/man/man4

2018-03-19 Thread Eitan Adler
Author: eadler
Date: Mon Mar 19 07:37:36 2018
New Revision: 331199
URL: https://svnweb.freebsd.org/changeset/base/331199

Log:
  MFC r324860:
  
  Modernise this man page somewhat.
  
  1. Add a reference to a good 3rd party list of compatible cables, but
  provide suggestions for 'known good' vendors.
  
  2. Change IP-based USB host-host example to a modern Ethernet one which
  works 'out of box' with current Linux systems.
  
  3. Explain that USB 3.0 is host-host, even though point-to-point soft
  Ethernet can be achieved.

Modified:
  stable/11/share/man/man4/udbp.4
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/share/man/man4/udbp.4
==
--- stable/11/share/man/man4/udbp.4 Mon Mar 19 07:37:13 2018
(r331198)
+++ stable/11/share/man/man4/udbp.4 Mon Mar 19 07:37:36 2018
(r331199)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd November 22, 2006
+.Dd October 20, 2017
 .Dt UDBP 4
 .Os
 .Sh NAME
@@ -48,9 +48,14 @@ udbp_load="YES"
 The
 .Nm
 driver provides support for host-to-host cables
-that contain at least two bulk pipes (one for each direction),
-for example
-the EzLink cable and the NetChip 1080 chip.
+that contain at least two bulk pipes (one for each direction).
+This typically includes cables branded for use with
+.Sy Windows USB Easy Transfer ,
+and many cables based on the Prolific PL2xx1 series of USB bridge chips.
+A useful (but non-comprehensive) list of compatible USB host cables
+is listed in the
+.Sx SEE ALSO
+section below.
 .Pp
 .\" XXXThe description of how to add netgraph to the kernel
 .\"is out of place here.  It should be limited to the
@@ -86,30 +91,64 @@ module and then the
 .Nm
 driver.
 .Pp
-.Dl ngctl mkpeer udbp0: iface data inet
-.Dl ifconfig ng0 10.0.0.1 10.0.0.2
+.Dl ngctl mkpeer udbp0: eiface data ether
+.Dl ifconfig ngeth0 ether aa:dd:xx:xx:xx
+.Dl ifconfig ngeth0 inet 169.254.x.x/16
 .Pp
-Create a new network interface node
-and connect its inet hook to the data hook of the
+Create a new Ethernet network interface node
+and connect its ether hook to the data hook of the
 .Nm
-node.
-.Xr ifconfig 8
-configures the resulting network interface ng0 with a local
-IP address of 10.0.0.1 and a remote IP address of 10.0.0.2.
-On the remote host, the two
-IP addresses should of course be reversed.
+driver.
+.Pp
+This enables FreeBSD to communicate with a Linux peer (e.g. using the
+.Sy plusb
+driver).
+The Linux node should be configured to prefer link-local IPv4 addresses
+(e.g. using Network Manager in Debian and Red Hat derived distributions).
+.Pp
+Whilst both FreeBSD and Linux are able to interoperate by
+loosely following CDC EEM 1.0 in their behaviour, neither implementation
+has been expressly designed to follow its specification.
 .Sh SEE ALSO
 .Xr netgraph 4 ,
-.Xr ng_iface 4 ,
+.Xr ng_eiface 4 ,
 .Xr ohci 4 ,
 .Xr uhci 4 ,
 .Xr usb 4 ,
 .Xr ngctl 8
+.\"
+.Rs
+.%B Universal Serial Bus: Communications Class Subclass Specification for 
Ethernet Emulation Model Devices 
+.%N Revision 1.0
+.%D February 2, 2005
+.%I USB Implementers Forum, Inc.
+.%U http://www.usb.org/developers/docs/devclass_docs/CDC_EEM10.pdf
+.Re
+.\"
+.Rs
+.%B Total Commander: Supported cables for USB cable connection
+.%I Ghisler Software GmbH.
+.%U https://www.ghisler.com/cables/index.htm
+.Re
+.Sh CAVEATS
+The point-to-point nature and additional latency of USB host-host links
+makes them unsuitable as a "drop-in" replacement for an Ethernet LAN;
+for a USB 3.0 SuperSpeed cable, latency is comparable to 100BaseTX Ethernet
+(but often worse), with throughput comparable to 2.5GBASE-T.
+.Pp
+However, their energy efficiency makes them attractive for embedded
+applications. A Plugable PL27A1 cable claims 24mA of USB3 bus power,
+as compared to 150mA for a typical USB 3.0 to Gigabit Ethernet interface.
 .Sh HISTORY
 The
 .Nm
 driver first appeared in
 .Fx 5.0 .
+.Sh BUGS
+The
+.Nm
+driver does not support the special packets described in section 5.1
+of the CDC EEM specification.
 .Sh AUTHORS
 .An -nosplit
 The
@@ -121,4 +160,6 @@ and
 .An Nick Hibma Aq Mt n_hi...@freebsd.org .
 .Pp
 This manual page was written by
-.An Nick Hibma Aq Mt n_hi...@freebsd.org .
+.An Nick Hibma Aq Mt n_hi...@freebsd.org 
+and updated by
+.An Bruce Simpson Aq Mt b...@freebsd.org .
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331198 - in stable/11/sys/dev/usb: . misc

2018-03-19 Thread Eitan Adler
Author: eadler
Date: Mon Mar 19 07:37:13 2018
New Revision: 331198
URL: https://svnweb.freebsd.org/changeset/base/331198

Log:
  MFC r324858:
  
  Add Prolific PL27A1 USB 3.0 Host-Host device to udbp(4).
  
  Tested with a Plugable cable in VirtualBox against Linux 4.11.

Modified:
  stable/11/sys/dev/usb/misc/udbp.c
  stable/11/sys/dev/usb/usbdevs
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/usb/misc/udbp.c
==
--- stable/11/sys/dev/usb/misc/udbp.c   Mon Mar 19 07:35:35 2018
(r331197)
+++ stable/11/sys/dev/usb/misc/udbp.c   Mon Mar 19 07:37:13 2018
(r331198)
@@ -265,6 +265,7 @@ static const STRUCT_USB_HOST_ID udbp_devs[] = {
{USB_VPI(USB_VENDOR_NETCHIP, USB_PRODUCT_NETCHIP_GADGETZERO, 0)},
{USB_VPI(USB_VENDOR_PROLIFIC, USB_PRODUCT_PROLIFIC_PL2301, 0)},
{USB_VPI(USB_VENDOR_PROLIFIC, USB_PRODUCT_PROLIFIC_PL2302, 0)},
+   {USB_VPI(USB_VENDOR_PROLIFIC, USB_PRODUCT_PROLIFIC_PL27A1, 0)},
{USB_VPI(USB_VENDOR_ANCHOR, USB_PRODUCT_ANCHOR_EZLINK, 0)},
{USB_VPI(USB_VENDOR_GENESYS, USB_PRODUCT_GENESYS_GL620USB, 0)},
 };

Modified: stable/11/sys/dev/usb/usbdevs
==
--- stable/11/sys/dev/usb/usbdevs   Mon Mar 19 07:35:35 2018
(r331197)
+++ stable/11/sys/dev/usb/usbdevs   Mon Mar 19 07:37:13 2018
(r331198)
@@ -3633,6 +3633,7 @@ product PROLIFIC PL2305   0x2305  Parallel printer
 product PROLIFIC ATAPI40x2307  ATAPI-4 Controller
 product PROLIFIC PL25010x2501  PL2501 Host-Host interface
 product PROLIFIC PL25060x2506  PL2506 USB to IDE Bridge
+product PROLIFIC PL27A10x27A1  PL27A1 USB 3.0 Host-Host 
interface
 product PROLIFIC HCR3310x331a  HCR331 Hybrid Card Reader
 product PROLIFIC PHAROS0xaaa0  Prolific Pharos
 product PROLIFIC RSAQ3 0xaaa2  PL2303 Serial Adapter (IODATA USB-RSAQ3)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331197 - stable/11/share/man/man4

2018-03-19 Thread Eitan Adler
Author: eadler
Date: Mon Mar 19 07:35:35 2018
New Revision: 331197
URL: https://svnweb.freebsd.org/changeset/base/331197

Log:
  MFC r324806:
  
  Use the .Fx macro consistently.
  
  Sponsored by: Spectra Logic Corp

Modified:
  stable/11/share/man/man4/mpr.4
  stable/11/share/man/man4/usfs.4
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/share/man/man4/mpr.4
==
--- stable/11/share/man/man4/mpr.4  Mon Mar 19 07:34:24 2018
(r331196)
+++ stable/11/share/man/man4/mpr.4  Mon Mar 19 07:35:35 2018
(r331197)
@@ -380,7 +380,8 @@ These bits have the described effects:
 .Sh HISTORY
 The
 .Nm
-driver first appeared in FreeBSD 9.3.
+driver first appeared in
+.Fx 9.3 .
 .Sh AUTHORS
 The
 .Nm

Modified: stable/11/share/man/man4/usfs.4
==
--- stable/11/share/man/man4/usfs.4 Mon Mar 19 07:34:24 2018
(r331196)
+++ stable/11/share/man/man4/usfs.4 Mon Mar 19 07:35:35 2018
(r331197)
@@ -65,4 +65,5 @@ Upon attach the driver creates a RAM disk which can be
 .Sh HISTORY
 The
 .Nm
-driver appeared in FreeBSD 8.
+driver appeared in
+.Fx 8.0 .
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331196 - stable/11/share/man/man4

2018-03-19 Thread Eitan Adler
Author: eadler
Date: Mon Mar 19 07:34:24 2018
New Revision: 331196
URL: https://svnweb.freebsd.org/changeset/base/331196

Log:
  MFC r322674:
  
  Add Thunderbolt Apple interfaces to the bge(4) supported list.
  Document message reported by kernel upon removal in DIAGNOSTIC section.
  Document shortcomings in BUGS section.

Modified:
  stable/11/share/man/man4/bge.4
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/share/man/man4/bge.4
==
--- stable/11/share/man/man4/bge.4  Mon Mar 19 07:33:12 2018
(r331195)
+++ stable/11/share/man/man4/bge.4  Mon Mar 19 07:34:24 2018
(r331196)
@@ -31,7 +31,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd January 19, 2012
+.Dd August 18, 2017
 .Dt BGE 4
 .Os
 .Sh NAME
@@ -159,6 +159,10 @@ following:
 .It
 3Com 3c996-T (10/100/1000baseTX)
 .It
+Apple Thunderbolt Display (10/100/1000baseTX)
+.It
+Apple Thunderbolt to Gigabit Ethernet Adapter (10/100/1000baseTX)
+.It
 Dell PowerEdge 1750 integrated BCM5704C NIC (10/100/1000baseTX)
 .It
 Dell PowerEdge 2550 integrated BCM5700 NIC (10/100/1000baseTX)
@@ -236,6 +240,9 @@ during initialization.
 The driver failed to initialize PCI shared memory mapping.
 This might
 happen if the card is not in a bus-master slot.
+.It "bge%d: firmware handshake timed out, found 0x"
+The device was physically disconnected from the system, or there is a problem 
with
+the device causing it to stop responding to the host it is attached to.
 .It "bge%d: no memory for jumbo buffers!"
 The driver failed to allocate memory for jumbo frames during
 initialization.
@@ -262,3 +269,12 @@ The
 .Nm
 driver was written by
 .An Bill Paul Aq Mt wp...@windriver.com .
+.Sh BUGS
+Hotplug is not currently supported in
+.Fx ,
+hence, Thunderbolt interfaces need to be connected prior to system power up on
+Apple systems in order for the interface to be detected.
+Also, due to the lack of hotplug support, Thunderbolt-based interfaces must 
not be removed
+while the system is up as the kernel is currently unable to cope with a
+.Nm
+interface disappearing.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331195 - in stable/11/sys/dev: ahci usb/controller

2018-03-19 Thread Eitan Adler
Author: eadler
Date: Mon Mar 19 07:33:12 2018
New Revision: 331195
URL: https://svnweb.freebsd.org/changeset/base/331195

Log:
  MFC r320178:
  
  Add some device IDs for Intel Denverton SoCs.

Modified:
  stable/11/sys/dev/ahci/ahci_pci.c
  stable/11/sys/dev/usb/controller/xhci_pci.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/ahci/ahci_pci.c
==
--- stable/11/sys/dev/ahci/ahci_pci.c   Mon Mar 19 07:28:54 2018
(r331194)
+++ stable/11/sys/dev/ahci/ahci_pci.c   Mon Mar 19 07:33:12 2018
(r331195)
@@ -123,6 +123,26 @@ static const struct {
{0x3b298086, 0x00, "Intel Ibex Peak-M", 0},
{0x3b2c8086, 0x00, "Intel Ibex Peak-M (RAID)",  0},
{0x3b2f8086, 0x00, "Intel Ibex Peak-M", 0},
+   {0x19b08086, 0x00, "Intel Denverton",   0},
+   {0x19b18086, 0x00, "Intel Denverton",   0},
+   {0x19b28086, 0x00, "Intel Denverton",   0},
+   {0x19b38086, 0x00, "Intel Denverton",   0},
+   {0x19b48086, 0x00, "Intel Denverton",   0},
+   {0x19b58086, 0x00, "Intel Denverton",   0},
+   {0x19b68086, 0x00, "Intel Denverton",   0},
+   {0x19b78086, 0x00, "Intel Denverton",   0},
+   {0x19be8086, 0x00, "Intel Denverton",   0},
+   {0x19bf8086, 0x00, "Intel Denverton",   0},
+   {0x19c08086, 0x00, "Intel Denverton",   0},
+   {0x19c18086, 0x00, "Intel Denverton",   0},
+   {0x19c28086, 0x00, "Intel Denverton",   0},
+   {0x19c38086, 0x00, "Intel Denverton",   0},
+   {0x19c48086, 0x00, "Intel Denverton",   0},
+   {0x19c58086, 0x00, "Intel Denverton",   0},
+   {0x19c68086, 0x00, "Intel Denverton",   0},
+   {0x19c78086, 0x00, "Intel Denverton",   0},
+   {0x19ce8086, 0x00, "Intel Denverton",   0},
+   {0x19cf8086, 0x00, "Intel Denverton",   0},
{0x1c028086, 0x00, "Intel Cougar Point",0},
{0x1c038086, 0x00, "Intel Cougar Point",0},
{0x1c048086, 0x00, "Intel Cougar Point (RAID)", 0},

Modified: stable/11/sys/dev/usb/controller/xhci_pci.c
==
--- stable/11/sys/dev/usb/controller/xhci_pci.c Mon Mar 19 07:28:54 2018
(r331194)
+++ stable/11/sys/dev/usb/controller/xhci_pci.c Mon Mar 19 07:33:12 2018
(r331195)
@@ -119,6 +119,8 @@ xhci_pci_match(device_t self)
 
case 0x0f358086:
return ("Intel BayTrail USB 3.0 controller");
+   case 0x19d08086:
+   return ("Intel Denverton USB 3.0 controller");
case 0x9c318086:
case 0x1e318086:
return ("Intel Panther Point USB 3.0 controller");
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331194 - stable/11/sbin/ipfw

2018-03-19 Thread Eitan Adler
Author: eadler
Date: Mon Mar 19 07:28:54 2018
New Revision: 331194
URL: https://svnweb.freebsd.org/changeset/base/331194

Log:
  MFC r320268,r320276:
  
  ipfw: dummynet: Add 'G' and 'g' suffix for bandwidth configuration/display

Modified:
  stable/11/sbin/ipfw/dummynet.c
  stable/11/sbin/ipfw/ipfw.8
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sbin/ipfw/dummynet.c
==
--- stable/11/sbin/ipfw/dummynet.c  Mon Mar 19 07:08:14 2018
(r331193)
+++ stable/11/sbin/ipfw/dummynet.c  Mon Mar 19 07:28:54 2018
(r331194)
@@ -626,6 +626,8 @@ list_pipes(struct dn_id *oid, struct dn_id *end)
/* data rate */
if (b == 0)
sprintf(bwbuf, "unlimited ");
+   else if (b >= 10)
+   sprintf(bwbuf, "%7.3f Gbit/s", b/10);
else if (b >= 100)
sprintf(bwbuf, "%7.3f Mbit/s", b/100);
else if (b >= 1000)
@@ -818,6 +820,9 @@ read_bandwidth(char *arg, int *bandwidth, char *if_nam
} else if (*end == 'M' || *end == 'm') {
end++;
bw *= 100;
+   } else if (*end == 'G' || *end == 'g') {
+   end++;
+   bw *= 10;
}
if ((*end == 'B' &&
_substrcmp2(end, "Bi", "Bit/s") != 0) ||

Modified: stable/11/sbin/ipfw/ipfw.8
==
--- stable/11/sbin/ipfw/ipfw.8  Mon Mar 19 07:08:14 2018(r331193)
+++ stable/11/sbin/ipfw/ipfw.8  Mon Mar 19 07:28:54 2018(r331194)
@@ -2499,7 +2499,7 @@ The following parameters can be configured for a pipe:
 .It Cm bw Ar bandwidth | device
 Bandwidth, measured in
 .Sm off
-.Op Cm K | M
+.Op Cm K | M | G
 .Brq Cm bit/s | Byte/s .
 .Sm on
 .Pp
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331193 - stable/11/usr.bin/cut

2018-03-19 Thread Eitan Adler
Author: eadler
Date: Mon Mar 19 07:08:14 2018
New Revision: 331193
URL: https://svnweb.freebsd.org/changeset/base/331193

Log:
  MFC r322013:
  
  Document -w flag is an extension to POSIX.
  
  PR:   201937

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

Modified: stable/11/usr.bin/cut/cut.1
==
--- stable/11/usr.bin/cut/cut.1 Mon Mar 19 07:07:03 2018(r331192)
+++ stable/11/usr.bin/cut/cut.1 Mon Mar 19 07:08:14 2018(r331193)
@@ -31,7 +31,7 @@
 .\" @(#)cut.1  8.1 (Berkeley) 6/6/93
 .\" $FreeBSD$
 .\"
-.Dd August 8, 2012
+.Dd August 3, 2017
 .Dt CUT 1
 .Os
 .Sh NAME
@@ -154,6 +154,10 @@ The
 .Nm
 utility conforms to
 .St -p1003.2-92 .
+.Pp
+The
+.Fl w
+flag is an extension to the specification.
 .Sh HISTORY
 A
 .Nm
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331192 - stable/11/lib/libc/stdlib

2018-03-19 Thread Eitan Adler
Author: eadler
Date: Mon Mar 19 07:07:03 2018
New Revision: 331192
URL: https://svnweb.freebsd.org/changeset/base/331192

Log:
  MFC r320992,r320993:
  
  Add a complete example to tsearch(3)

Modified:
  stable/11/lib/libc/stdlib/tsearch.3
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/lib/libc/stdlib/tsearch.3
==
--- stable/11/lib/libc/stdlib/tsearch.3 Mon Mar 19 07:03:02 2018
(r331191)
+++ stable/11/lib/libc/stdlib/tsearch.3 Mon Mar 19 07:07:03 2018
(r331192)
@@ -27,7 +27,7 @@
 .\"OpenBSD: tsearch.3,v 1.2 1998/06/21 22:13:49 millert Exp
 .\" $FreeBSD$
 .\"
-.Dd October 9, 2016
+.Dd June 4, 2017
 .Dt TSEARCH 3
 .Os
 .Sh NAME
@@ -130,6 +130,64 @@ is NULL or the datum cannot be found.
 The
 .Fn twalk
 function returns no value.
+.Sh EXAMPLES
+This example uses
+.Fn tsearch
+to search for four strings in
+.Dv root .
+Because the strings are not already present, they are added.
+.Fn tsearch
+is called twice on the fourth string to demonstrate that a string is not added 
when it is already present.
+.Fn tfind
+is used to find the single instance of the fourth string, and
+.Fn tdelete
+removes it.
+Finally,
+.Fn twalk
+is used to return and display the resulting binary search tree.
+.Bd -literal
+#include 
+#include 
+#include 
+
+int
+comp(const void *a, const void *b)
+{
+
+   return strcmp(a, b);
+}
+
+void
+printwalk(const posix_tnode * node, VISIT v, int __unused0)
+{
+
+   if (v == postorder || v == leaf) {
+   printf("node: %s\en", *(char **)node);
+   }
+}
+
+int
+main(void)
+{
+   posix_tnode *root = NULL;
+
+   char one[] = "blah1";
+   char two[] = "blah-2";
+   char three[] = "blah-3";
+   char four[] = "blah-4";
+
+   tsearch(one, , comp);
+   tsearch(two, , comp);
+   tsearch(three, , comp);
+   tsearch(four, , comp);
+   tsearch(four, , comp);
+   printf("four: %s\en", *(char **)tfind(four, , comp));
+   tdelete(four, , comp);
+
+   twalk(root, printwalk);
+   return 0;
+}
+.Ed
 .Sh SEE ALSO
 .Xr bsearch 3 ,
 .Xr hsearch 3 ,
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331191 - stable/11/sys/dev/fb

2018-03-19 Thread Eitan Adler
Author: eadler
Date: Mon Mar 19 07:03:02 2018
New Revision: 331191
URL: https://svnweb.freebsd.org/changeset/base/331191

Log:
  MFC r315986:
  
  Fix 3 entries in mode tables related to mono and 90-column text modes.
  Newer VGAs don't support any mono modes, but bugs in the tables created
  2 virtual mono modes (#45 90x43 and #112 80x43) that behaved more
  strangely than crashing.  90-column modes are tweaked 80-column ones
  and also fail to work on newer VGAs.  #45 did crash (hang) on some
  hardware.

Modified:
  stable/11/sys/dev/fb/vga.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/fb/vga.c
==
--- stable/11/sys/dev/fb/vga.c  Mon Mar 19 07:00:15 2018(r331190)
+++ stable/11/sys/dev/fb/vga.c  Mon Mar 19 07:03:02 2018(r331191)
@@ -347,7 +347,7 @@ static video_info_t bios_vmode[] = {
 { M_EGAMONO80x25, 0,  80, 25, 8, 14, 2, 1,
   MDA_BUF_BASE, MDA_BUF_SIZE, MDA_BUF_SIZE, 0, 0, V_INFO_MM_TEXT },
 /* EGA */
-{ M_ENH_B80x43, 0,80, 43, 8,  8, 2, 1,
+{ M_ENH_B80x43, V_INFO_COLOR, 80, 43, 8,  8, 2, 1,
   CGA_BUF_BASE, CGA_BUF_SIZE, CGA_BUF_SIZE, 0, 0, V_INFO_MM_TEXT },
 { M_ENH_C80x43, V_INFO_COLOR, 80, 43, 8,  8, 4, 1,
   CGA_BUF_BASE, CGA_BUF_SIZE, CGA_BUF_SIZE, 0, 0, V_INFO_MM_TEXT },
@@ -377,7 +377,7 @@ static video_info_t bios_vmode[] = {
 { M_VGA_C90x30, V_INFO_COLOR, 90, 30, 8, 16, 4, 1,
   CGA_BUF_BASE, CGA_BUF_SIZE, CGA_BUF_SIZE, 0, 0, V_INFO_MM_TEXT },
 { M_VGA_M90x43, 0,90, 43, 8,  8, 2, 1,
-  CGA_BUF_BASE, CGA_BUF_SIZE, CGA_BUF_SIZE, 0, 0, V_INFO_MM_TEXT },
+  MDA_BUF_BASE, MDA_BUF_SIZE, MDA_BUF_SIZE, 0, 0, V_INFO_MM_TEXT },
 { M_VGA_C90x43, V_INFO_COLOR, 90, 43, 8,  8, 4, 1,
   CGA_BUF_BASE, CGA_BUF_SIZE, CGA_BUF_SIZE, 0, 0, V_INFO_MM_TEXT },
 { M_VGA_M90x50, 0,90, 50, 8,  8, 2, 1,
@@ -593,7 +593,7 @@ map_mode_num(int mode)
 { M_VGA_C90x25, M_VGA_C80x25 },
 { M_VGA_M90x30, M_VGA_M80x25 },
 { M_VGA_C90x30, M_VGA_C80x25 },
-{ M_VGA_M90x43, M_ENH_B80x25 },
+{ M_VGA_M90x43, M_VGA_M80x25 },
 { M_VGA_C90x43, M_ENH_C80x25 },
 { M_VGA_M90x50, M_VGA_M80x25 },
 { M_VGA_C90x50, M_VGA_C80x25 },
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331190 - stable/11/include

2018-03-19 Thread Eitan Adler
Author: eadler
Date: Mon Mar 19 07:00:15 2018
New Revision: 331190
URL: https://svnweb.freebsd.org/changeset/base/331190

Log:
  MFC r313818:
  
  Small inclusion guard comment fix.

Modified:
  stable/11/include/pthread.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/include/pthread.h
==
--- stable/11/include/pthread.h Mon Mar 19 06:57:41 2018(r331189)
+++ stable/11/include/pthread.h Mon Mar 19 07:00:15 2018(r331190)
@@ -349,4 +349,4 @@ void__pthread_cleanup_pop_imp(int);
 __END_DECLS
 __NULLABILITY_PRAGMA_POP
 
-#endif /* _PTHREAD_H_ */
+#endif /* !_PTHREAD_H_ */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331189 - stable/11/sys/powerpc/include

2018-03-19 Thread Eitan Adler
Author: eadler
Date: Mon Mar 19 06:57:41 2018
New Revision: 331189
URL: https://svnweb.freebsd.org/changeset/base/331189

Log:
  MFC r325112:
  
  Add P5010/P5010E for completeness

Modified:
  stable/11/sys/powerpc/include/spr.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/powerpc/include/spr.h
==
--- stable/11/sys/powerpc/include/spr.h Mon Mar 19 06:56:30 2018
(r331188)
+++ stable/11/sys/powerpc/include/spr.h Mon Mar 19 06:57:41 2018
(r331189)
@@ -713,6 +713,8 @@
 #define  SVR_P4040E  0x8208
 #define  SVR_P4080   0x8201
 #define  SVR_P4080E  0x8209
+#define  SVR_P5010   0x8221
+#define  SVR_P5010E  0x8229
 #define  SVR_P5020   0x8220
 #define  SVR_P5020E  0x8228
 #defineSVR_VER(svr)(((svr) >> 16) & 0x)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331188 - stable/11/sys/dev/flash

2018-03-19 Thread Eitan Adler
Author: eadler
Date: Mon Mar 19 06:56:30 2018
New Revision: 331188
URL: https://svnweb.freebsd.org/changeset/base/331188

Log:
  MFC r325113:
  
  Add Microchip 1-MBit SPI flash ID
  
  Used on the AmigaOne X5000.

Modified:
  stable/11/sys/dev/flash/mx25l.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/flash/mx25l.c
==
--- stable/11/sys/dev/flash/mx25l.c Mon Mar 19 06:55:26 2018
(r331187)
+++ stable/11/sys/dev/flash/mx25l.c Mon Mar 19 06:56:30 2018
(r331188)
@@ -124,6 +124,7 @@ struct mx25l_flash_ident flash_devices[] = {
{ "s25fl064",   0x01, 0x0216, 64 * 1024, 128, FL_NONE },
{ "s25fl128",   0x01, 0x2018, 64 * 1024, 256, FL_NONE },
{ "s25fl256s",  0x01, 0x0219, 64 * 1024, 512, FL_NONE },
+   { "SST25VF010A", 0xbf, 0x2549, 4 * 1024, 32, FL_ERASE_4K | FL_ERASE_32K 
},
{ "SST25VF032B", 0xbf, 0x254a, 64 * 1024, 64, FL_ERASE_4K | 
FL_ERASE_32K },
 
/* Winbond -- w25x "blocks" are 64K, "sectors" are 4KiB */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331187 - stable/11/lib/libsysdecode

2018-03-19 Thread Eitan Adler
Author: eadler
Date: Mon Mar 19 06:55:26 2018
New Revision: 331187
URL: https://svnweb.freebsd.org/changeset/base/331187

Log:
  MFC r326183:
  
  Add stdio.h to the synopsis for sysdecode functions that take a FILE *.

Modified:
  stable/11/lib/libsysdecode/sysdecode_cap_rights.3
  stable/11/lib/libsysdecode/sysdecode_fcntl_arg.3
  stable/11/lib/libsysdecode/sysdecode_mask.3
  stable/11/lib/libsysdecode/sysdecode_quotactl_cmd.3
  stable/11/lib/libsysdecode/sysdecode_utrace.3
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/lib/libsysdecode/sysdecode_cap_rights.3
==
--- stable/11/lib/libsysdecode/sysdecode_cap_rights.3   Mon Mar 19 06:54:53 
2018(r331186)
+++ stable/11/lib/libsysdecode/sysdecode_cap_rights.3   Mon Mar 19 06:55:26 
2018(r331187)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd October 17, 2016
+.Dd November 24, 2017
 .Dt sysdecode_cap_rights 3
 .Os
 .Sh NAME
@@ -36,6 +36,7 @@
 .Sh SYNOPSIS
 .In sys/types.h
 .In stdbool.h
+.In stdio.h
 .In sysdecode.h
 .Ft void
 .Fn sysdecode_cap_rights "FILE *fp" "cap_rights_t *rightsp"

Modified: stable/11/lib/libsysdecode/sysdecode_fcntl_arg.3
==
--- stable/11/lib/libsysdecode/sysdecode_fcntl_arg.3Mon Mar 19 06:54:53 
2018(r331186)
+++ stable/11/lib/libsysdecode/sysdecode_fcntl_arg.3Mon Mar 19 06:55:26 
2018(r331187)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd October 17, 2016
+.Dd November 24, 2017
 .Dt sysdecode_fcntl_arg 3
 .Os
 .Sh NAME
@@ -37,6 +37,7 @@
 .Sh SYNOPSIS
 .In sys/types.h
 .In stdbool.h
+.In stdio.h
 .In sysdecode.h
 .Ft void
 .Fn sysdecode_fcntl_arg "FILE *fp" "int cmd" "uintptr_t arg" "int base"

Modified: stable/11/lib/libsysdecode/sysdecode_mask.3
==
--- stable/11/lib/libsysdecode/sysdecode_mask.3 Mon Mar 19 06:54:53 2018
(r331186)
+++ stable/11/lib/libsysdecode/sysdecode_mask.3 Mon Mar 19 06:55:26 2018
(r331187)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 3, 2017
+.Dd November 24, 2017
 .Dt sysdecode_mask 3
 .Os
 .Sh NAME
@@ -63,6 +63,7 @@
 .Sh SYNOPSIS
 .In sys/types.h
 .In stdbool.h
+.In stdio.h
 .In sysdecode.h
 .Ft bool
 .Fn sysdecode_access_mode "FILE *fp" "int mode" "int *rem"

Modified: stable/11/lib/libsysdecode/sysdecode_quotactl_cmd.3
==
--- stable/11/lib/libsysdecode/sysdecode_quotactl_cmd.3 Mon Mar 19 06:54:53 
2018(r331186)
+++ stable/11/lib/libsysdecode/sysdecode_quotactl_cmd.3 Mon Mar 19 06:55:26 
2018(r331187)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd October 17, 2016
+.Dd November 24, 2017
 .Dt sysdecode_quotactl_cmd 3
 .Os
 .Sh NAME
@@ -36,6 +36,7 @@
 .Sh SYNOPSIS
 .In sys/types.h
 .In stdbool.h
+.In stdio.h
 .In sysdecode.h
 .Ft bool
 .Fn sysdecode_quotactl_cmd "FILE *fp" "int cmd"

Modified: stable/11/lib/libsysdecode/sysdecode_utrace.3
==
--- stable/11/lib/libsysdecode/sysdecode_utrace.3   Mon Mar 19 06:54:53 
2018(r331186)
+++ stable/11/lib/libsysdecode/sysdecode_utrace.3   Mon Mar 19 06:55:26 
2018(r331187)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd October 17, 2016
+.Dd November 24, 2017
 .Dt sysdecode_utrace 3
 .Os
 .Sh NAME
@@ -36,6 +36,7 @@
 .Sh SYNOPSIS
 .In sys/types.h
 .In stdbool.h
+.In stdio.h
 .In sysdecode.h
 .Ft int
 .Fn sysdecode_utrace "FILE *fp" "void *buf" "size_t len" "int decimal"
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331186 - stable/11/usr.bin/truss

2018-03-19 Thread Eitan Adler
Author: eadler
Date: Mon Mar 19 06:54:53 2018
New Revision: 331186
URL: https://svnweb.freebsd.org/changeset/base/331186

Log:
  MFC r326356:
  
  Replace a reference to a license in another file with the license text.
  
  The relevant file was recently renamed, so the reference was stale.
  In addition, explicit licenses are more typical in our sources.

Modified:
  stable/11/usr.bin/truss/syscall.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.bin/truss/syscall.h
==
--- stable/11/usr.bin/truss/syscall.h   Mon Mar 19 06:54:16 2018
(r331185)
+++ stable/11/usr.bin/truss/syscall.h   Mon Mar 19 06:54:53 2018
(r331186)
@@ -1,6 +1,39 @@
-/*
- * See i386-fbsd.c for copyright and license terms.
+/*-
+ * SPDX-License-Identifier: BSD-4-Clause
  *
+ * Copyright 1997 Sean Eric Fagan
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *must display the following acknowledgement:
+ * This product includes software developed by Sean Eric Fagan
+ * 4. Neither the name of the author may be used to endorse or promote
+ *products derived from this software without specific prior written
+ *permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+/*
  * System call arguments come in several flavours:
  * Hex -- values that should be printed in hex (addresses)
  * Octal -- Same as above, but octal
@@ -33,9 +66,6 @@
  * In addition, the pointer types (String, Ptr) may have OUT masked in --
  * this means that the data is set on *return* from the system call -- or
  * IN (meaning that the data is passed *into* the system call).
- */
-/*
- * $FreeBSD$
  */
 
 enum Argtype { None = 1, Hex, Octal, Int, UInt, LongHex, Name, Ptr, Stat, 
Ioctl,
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331185 - in stable/11/lib/libc: gen sys

2018-03-19 Thread Eitan Adler
Author: eadler
Date: Mon Mar 19 06:54:16 2018
New Revision: 331185
URL: https://svnweb.freebsd.org/changeset/base/331185

Log:
  MFC r326437:
  
  Correct history for Unix 2nd Edition through 6th Edition for the
  system calls. Man pages are missing for v2 and v5, so any entries for
  those versions were inferred by new implementations of these functions
  in libc.

Modified:
  stable/11/lib/libc/gen/signal.3
  stable/11/lib/libc/sys/dup.2
  stable/11/lib/libc/sys/getuid.2
  stable/11/lib/libc/sys/kill.2
  stable/11/lib/libc/sys/mknod.2
  stable/11/lib/libc/sys/pipe.2
  stable/11/lib/libc/sys/profil.2
  stable/11/lib/libc/sys/ptrace.2
  stable/11/lib/libc/sys/setuid.2
  stable/11/lib/libc/sys/sync.2
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/lib/libc/gen/signal.3
==
--- stable/11/lib/libc/gen/signal.3 Mon Mar 19 06:49:49 2018
(r331184)
+++ stable/11/lib/libc/gen/signal.3 Mon Mar 19 06:54:16 2018
(r331185)
@@ -28,7 +28,7 @@
 .\" @(#)signal.3   8.3 (Berkeley) 4/19/94
 .\" $FreeBSD$
 .\"
-.Dd June 7, 2004
+.Dd December 1, 2017
 .Dt SIGNAL 3
 .Os
 .Sh NAME
@@ -263,6 +263,10 @@ or
 .Xr tty 4
 .Sh HISTORY
 The
+.Fn signal
+function appeared in
+.At v4 .
+The current
 .Nm
 facility appeared in
 .Bx 4.0 .

Modified: stable/11/lib/libc/sys/dup.2
==
--- stable/11/lib/libc/sys/dup.2Mon Mar 19 06:49:49 2018
(r331184)
+++ stable/11/lib/libc/sys/dup.2Mon Mar 19 06:54:16 2018
(r331185)
@@ -28,7 +28,7 @@
 .\" @(#)dup.2  8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd June 1, 2013
+.Dd December 1, 2017
 .Dt DUP 2
 .Os
 .Sh NAME
@@ -163,7 +163,9 @@ system calls are expected to conform to
 .Sh HISTORY
 The
 .Fn dup
-and
+function appeared in
+.At v3 .
+The
 .Fn dup2
-functions appeared in
+function appeared in
 .At v7 .

Modified: stable/11/lib/libc/sys/getuid.2
==
--- stable/11/lib/libc/sys/getuid.2 Mon Mar 19 06:49:49 2018
(r331184)
+++ stable/11/lib/libc/sys/getuid.2 Mon Mar 19 06:54:16 2018
(r331185)
@@ -86,4 +86,4 @@ The
 and
 .Fn geteuid
 functions appeared in
-.At v7 .
+.At v4 .

Modified: stable/11/lib/libc/sys/kill.2
==
--- stable/11/lib/libc/sys/kill.2   Mon Mar 19 06:49:49 2018
(r331184)
+++ stable/11/lib/libc/sys/kill.2   Mon Mar 19 06:54:16 2018
(r331185)
@@ -28,7 +28,7 @@
 .\" @(#)kill.2 8.3 (Berkeley) 4/19/94
 .\" $FreeBSD$
 .\"
-.Dd March 15, 2012
+.Dd December 1, 2017
 .Dt KILL 2
 .Os
 .Sh NAME
@@ -150,7 +150,11 @@ The
 system call is expected to conform to
 .St -p1003.1-90 .
 .Sh HISTORY
-The
+A version of the
 .Fn kill
 function appeared in
-.At v7 .
+.At v3 .
+The signal number was added to the
+.Fn kill
+function in
+.At v4 .

Modified: stable/11/lib/libc/sys/mknod.2
==
--- stable/11/lib/libc/sys/mknod.2  Mon Mar 19 06:49:49 2018
(r331184)
+++ stable/11/lib/libc/sys/mknod.2  Mon Mar 19 06:54:16 2018
(r331185)
@@ -175,7 +175,7 @@ system call follows The Open Group Extended API Set 2 
 The
 .Fn mknod
 function appeared in
-.At v6 .
+.At v4 .
 The
 .Fn mknodat
 system call appeared in

Modified: stable/11/lib/libc/sys/pipe.2
==
--- stable/11/lib/libc/sys/pipe.2   Mon Mar 19 06:49:49 2018
(r331184)
+++ stable/11/lib/libc/sys/pipe.2   Mon Mar 19 06:54:16 2018
(r331185)
@@ -28,7 +28,7 @@
 .\" @(#)pipe.2 8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd July 20, 2016
+.Dd December 1, 2017
 .Dt PIPE 2
 .Os
 .Sh NAME

Modified: stable/11/lib/libc/sys/profil.2
==
--- stable/11/lib/libc/sys/profil.2 Mon Mar 19 06:49:49 2018
(r331184)
+++ stable/11/lib/libc/sys/profil.2 Mon Mar 19 06:54:16 2018
(r331185)
@@ -31,7 +31,7 @@
 .\"@(#)profil.28.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd June 4, 1993
+.Dd December 1, 2017
 .Dt PROFIL 2
 .Os
 .Sh NAME
@@ -109,7 +109,7 @@ contains an invalid address.
 The
 .Fn profil
 function appeared in
-.At v7 .
+.At v6 .
 .Sh BUGS
 This routine should be named
 .Fn profile .

Modified: stable/11/lib/libc/sys/ptrace.2
==
--- stable/11/lib/libc/sys/ptrace.2 Mon Mar 19 06:49:49 2018
(r331184)
+++ stable/11/lib/libc/sys/ptrace.2 Mon Mar 19 06:54:16 2018
(r331185)
@@ -2,7 +2,7 @@
 .\"$NetBSD: ptrace.2,v 1.2 1995/02/27 12:35:37 cgd Exp $
 .\"
 .\" This file is in the public domain.
-.Dd September 14, 2017
+.Dd December 1, 2017
 .Dt 

svn commit: r331184 - stable/11/sys/powerpc/powerpc

2018-03-19 Thread Eitan Adler
Author: eadler
Date: Mon Mar 19 06:49:49 2018
New Revision: 331184
URL: https://svnweb.freebsd.org/changeset/base/331184

Log:
  MFC r326859:
  
  Add identifier for POWER9 CPU to CPU list
  
  Without the identifier in the list booting FreeBSD results in printing the
  following (from a PowerKVM boot):
  
  cpu0: Unknown PowerPC CPU revision 0x1201, 2550.00 MHz
  
  For now, add the same feature list as POWER8.  As new capabilities are added 
to
  support POWER9 specific features, they will be added to this.
  
  PR:   224344

Modified:
  stable/11/sys/powerpc/powerpc/cpu.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/powerpc/powerpc/cpu.c
==
--- stable/11/sys/powerpc/powerpc/cpu.c Mon Mar 19 06:45:40 2018
(r331183)
+++ stable/11/sys/powerpc/powerpc/cpu.c Mon Mar 19 06:49:49 2018
(r331184)
@@ -163,6 +163,12 @@ static const struct cputab models[] = {
   PPC_FEATURE_HAS_VSX,
   PPC_FEATURE2_ARCH_2_07 | PPC_FEATURE2_HAS_HTM |
   PPC_FEATURE2_HAS_VCRYPTO, NULL },
+{ "IBM POWER9",IBMPOWER9,  REVFMT_MAJMIN,
+  PPC_FEATURE_64 | PPC_FEATURE_HAS_ALTIVEC | PPC_FEATURE_HAS_FPU |
+  PPC_FEATURE_SMT | PPC_FEATURE_ARCH_2_05 | PPC_FEATURE_ARCH_2_06 |
+  PPC_FEATURE_HAS_VSX,
+  PPC_FEATURE2_ARCH_2_07 | PPC_FEATURE2_HAS_HTM | PPC_FEATURE2_ISEL |
+  PPC_FEATURE2_HAS_VCRYPTO, NULL },
 { "Motorola PowerPC 7400", MPC7400,REVFMT_MAJMIN,
   PPC_FEATURE_HAS_ALTIVEC | PPC_FEATURE_HAS_FPU, 0, cpu_6xx_setup },
 { "Motorola PowerPC 7410", MPC7410,REVFMT_MAJMIN,
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331183 - stable/11/usr.sbin/vidcontrol

2018-03-19 Thread Eitan Adler
Author: eadler
Date: Mon Mar 19 06:45:40 2018
New Revision: 331183
URL: https://svnweb.freebsd.org/changeset/base/331183

Log:
  MFC r316422:
  
  Remove checks that background (bg) colors are not bright and buggy
  attempts to keep them that way.  The bg brightness bit is interpreted
  as blinking in some modes, but it would barely be useful to disallow
  setting it when it would give blinking in code which knew when that
  is.  The old code mostly knew this wrong, and added handling errors.
  It is in fact impossible to know, since future mode switches may
  change the meaning of the bit many times on the screen and in history.
  
  Old versions of vidcontrol disallowed bg color numbers >= 8 in all
  cases.  This is very VGA/syscons-centric.  Syscons uses the VGA defaults
  of blinking fg instead of bright bg in text mode and bright bg in
  graphics mode.  On VGA, this is very easy to toggle at any time, and
  vt blows away the VGA text mode default at boot time.
  
  r146736 changed this to try to allow bg color numbers in graphics mode
  only.  This is even more VGA/syscons-centric, and there are many bugs
  in this, and many nearby bugs in the parser.  These are increased or
  decreased by differences and bugs in vt and teken.
  
  Perhaps the most obvious bug was that almost any vidcontrol command
  which changes any color or the mode causes an error if the initial fg
  color is bright.  E.g., in syscons text mode, after "vidcontrol
  lightwhite" to make the fg bright, another "vidcontrol lightwhite" is
  rejected and buggy fixup code changes the fg to white.  This is because
  the bright fg color creates a bright bg color for the phantom reverse
  video attribute, so was rejected.  (The reverse video attribute is
  phantom because teken ignores the user's setting of it and simply
  reverses the fg attributes to create the bg attributes.  Sometimes
  some layer masks off the brightness/blinking bit, but not here.)
  
  Perhaps the next most obvious one was that "vidcontrol lightgreen
  lightblue" was misparsed as 2 settings of the fg instead of 1 setting
  of the fg and 1 invalid setting of the bg.  This is because the
  parser supports an undocumented syntax with many parsing bugs (an
  ambiguity gives this one).
  
  I recently fix bugs in teken that broke setting of bright fg's and
  bg's in the normal way.  This gave more settings of then, so the old
  bugs showed up more often.

Modified:
  stable/11/usr.sbin/vidcontrol/vidcontrol.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.sbin/vidcontrol/vidcontrol.c
==
--- stable/11/usr.sbin/vidcontrol/vidcontrol.c  Mon Mar 19 06:40:11 2018
(r331182)
+++ stable/11/usr.sbin/vidcontrol/vidcontrol.c  Mon Mar 19 06:45:40 2018
(r331183)
@@ -852,8 +852,7 @@ get_normal_colors(int argc, char **argv, int *_index)
normal_fore_color=color;
colors_changed = 1;
if (*_index < argc
-   && (color = get_color_number(argv[*_index])) != -1
-   && color < 8) {
+   && (color = get_color_number(argv[*_index])) != -1) {
(*_index)++;
fprintf(stderr, "\033[=%dG", color);
normal_back_color=color;
@@ -876,8 +875,7 @@ get_reverse_colors(int argc, char **argv, int *_index)
revers_fore_color=color;
colors_changed = 1;
if (*_index < argc
-   && (color = get_color_number(argv[*_index])) != -1
-   && color < 8) {
+   && (color = get_color_number(argv[*_index])) != -1) {
(*_index)++;
fprintf(stderr, "\033[=%dI", color);
revers_back_color=color;
@@ -1489,18 +1487,8 @@ main(int argc, char **argv)
 
get_normal_colors(argc, argv, );
 
-   if (colors_changed || video_mode_changed) {
-   if (!(new_mode_info.vi_flags & V_INFO_GRAPHICS)) {
-   if ((normal_back_color < 8) && (revers_back_color < 8)) 
{
-   set_colors();
-   } else {
-   revert();
-   errx(1, "bg color for text modes must be < 8");
-   }
-   } else {
-   set_colors();
-   }
-   }
+   if (colors_changed || video_mode_changed)
+   set_colors();
 
if ((optind != argc) || (argc == 1))
usage();
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r331182 - in stable/11/sys: arm/allwinner arm/allwinner/a10 dev/iicbus/twsi

2018-03-19 Thread Eitan Adler
Author: eadler
Date: Mon Mar 19 06:40:11 2018
New Revision: 331182
URL: https://svnweb.freebsd.org/changeset/base/331182

Log:
  MFC r327184:
  
  Change the remaining files using my personnal email address to my freebsd one

Modified:
  stable/11/sys/arm/allwinner/a10/a10_intc.c
  stable/11/sys/arm/allwinner/allwinner_pinctrl.h
  stable/11/sys/arm/allwinner/aw_mp.c
  stable/11/sys/arm/allwinner/aw_mp.h
  stable/11/sys/arm/allwinner/aw_wdog.c
  stable/11/sys/dev/iicbus/twsi/a10_twsi.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/arm/allwinner/a10/a10_intc.c
==
--- stable/11/sys/arm/allwinner/a10/a10_intc.c  Mon Mar 19 06:37:59 2018
(r331181)
+++ stable/11/sys/arm/allwinner/a10/a10_intc.c  Mon Mar 19 06:40:11 2018
(r331182)
@@ -1,6 +1,6 @@
 /*-
  * Copyright (c) 2012 Ganbold Tsagaankhuu 
- * Copyright (c) 2016 Emmanuel Vadot 
+ * Copyright (c) 2016 Emmanuel Vadot 
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

Modified: stable/11/sys/arm/allwinner/allwinner_pinctrl.h
==
--- stable/11/sys/arm/allwinner/allwinner_pinctrl.h Mon Mar 19 06:37:59 
2018(r331181)
+++ stable/11/sys/arm/allwinner/allwinner_pinctrl.h Mon Mar 19 06:40:11 
2018(r331182)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2016 Emmanuel Vadot 
+ * Copyright (c) 2016 Emmanuel Vadot 
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

Modified: stable/11/sys/arm/allwinner/aw_mp.c
==
--- stable/11/sys/arm/allwinner/aw_mp.c Mon Mar 19 06:37:59 2018
(r331181)
+++ stable/11/sys/arm/allwinner/aw_mp.c Mon Mar 19 06:40:11 2018
(r331182)
@@ -1,6 +1,6 @@
 /*-
  * Copyright (c) 2014 Ganbold Tsagaankhuu 
- * Copyright (c) 2016 Emmanuel Vadot 
+ * Copyright (c) 2016 Emmanuel Vadot 
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

Modified: stable/11/sys/arm/allwinner/aw_mp.h
==
--- stable/11/sys/arm/allwinner/aw_mp.h Mon Mar 19 06:37:59 2018
(r331181)
+++ stable/11/sys/arm/allwinner/aw_mp.h Mon Mar 19 06:40:11 2018
(r331182)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2016 Emmanuel Vadot 
+ * Copyright (c) 2016 Emmanuel Vadot 
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

Modified: stable/11/sys/arm/allwinner/aw_wdog.c
==
--- stable/11/sys/arm/allwinner/aw_wdog.c   Mon Mar 19 06:37:59 2018
(r331181)
+++ stable/11/sys/arm/allwinner/aw_wdog.c   Mon Mar 19 06:40:11 2018
(r331182)
@@ -1,6 +1,6 @@
 /*-
  * Copyright (c) 2013 Oleksandr Tymoshenko 
- * Copyright (c) 2016 Emmanuel Vadot 
+ * Copyright (c) 2016 Emmanuel Vadot 
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

Modified: stable/11/sys/dev/iicbus/twsi/a10_twsi.c
==
--- stable/11/sys/dev/iicbus/twsi/a10_twsi.cMon Mar 19 06:37:59 2018
(r331181)
+++ stable/11/sys/dev/iicbus/twsi/a10_twsi.cMon Mar 19 06:40:11 2018
(r331182)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2016 Emmanuel Vadot 
+ * Copyright (c) 2016 Emmanuel Vadot 
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


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

2018-03-19 Thread Eitan Adler
Author: eadler
Date: Mon Mar 19 06:37:59 2018
New Revision: 331181
URL: https://svnweb.freebsd.org/changeset/base/331181

Log:
  MFC r328300:
  
  copyright.h: Update license text to 'THE AUTHOR'
  
  This matches the license text at
  https://www.freebsd.org/copyright/freebsd-license.html

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

Modified: stable/11/sys/sys/copyright.h
==
--- stable/11/sys/sys/copyright.h   Mon Mar 19 05:49:26 2018
(r331180)
+++ stable/11/sys/sys/copyright.h   Mon Mar 19 06:37:59 2018
(r331181)
@@ -12,10 +12,10 @@
  *notice, this list of conditions and the following disclaimer in the
  *documentation and/or other materials provided with the distribution.
  *
- * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"