svn commit: r307955 - in head/sys/boot/i386: gptboot gptzfsboot

2016-10-25 Thread Warner Losh
Author: imp
Date: Wed Oct 26 05:26:59 2016
New Revision: 307955
URL: https://svnweb.freebsd.org/changeset/base/307955

Log:
  LIBSTAND goes last, so put it last here too.

Modified:
  head/sys/boot/i386/gptboot/Makefile
  head/sys/boot/i386/gptzfsboot/Makefile

Modified: head/sys/boot/i386/gptboot/Makefile
==
--- head/sys/boot/i386/gptboot/Makefile Wed Oct 26 05:26:58 2016
(r307954)
+++ head/sys/boot/i386/gptboot/Makefile Wed Oct 26 05:26:59 2016
(r307955)
@@ -75,7 +75,7 @@ gptboot.bin: gptboot.out
${OBJCOPY} -S -O binary gptboot.out ${.TARGET}
 
 gptboot.out: ${BTXCRT} gptboot.o sio.o crc32.o drv.o cons.o util.o 
${OPENCRYPTO_XTS}
-   ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSTAND} 
${LIBGELIBOOT}
+   ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} 
${LIBGELIBOOT} ${LIBSTAND}
 
 gptboot.o: ${.CURDIR}/../../common/ufsread.c
 

Modified: head/sys/boot/i386/gptzfsboot/Makefile
==
--- head/sys/boot/i386/gptzfsboot/Makefile  Wed Oct 26 05:26:58 2016
(r307954)
+++ head/sys/boot/i386/gptzfsboot/Makefile  Wed Oct 26 05:26:59 2016
(r307955)
@@ -78,7 +78,7 @@ gptzfsboot.bin: gptzfsboot.out
 
 gptzfsboot.out: ${BTXCRT} zfsboot.o sio.o gpt.o drv.o cons.o util.o \
skein.o skein_block.o ${OPENCRYPTO_XTS}
-   ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSTAND} 
${LIBGELIBOOT}
+   ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} 
${LIBGELIBOOT} ${LIBSTAND}
 
 zfsboot.o: ${.CURDIR}/../../zfs/zfsimpl.c
 
___
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: r307954 - head/sys/boot/i386

2016-10-25 Thread Warner Losh
Author: imp
Date: Wed Oct 26 05:26:58 2016
New Revision: 307954
URL: https://svnweb.freebsd.org/changeset/base/307954

Log:
  Back out the move to the loader script from -N. This should fix the
  crypto-using boot problems.

Modified:
  head/sys/boot/i386/Makefile.inc

Modified: head/sys/boot/i386/Makefile.inc
==
--- head/sys/boot/i386/Makefile.inc Wed Oct 26 05:06:23 2016
(r307953)
+++ head/sys/boot/i386/Makefile.inc Wed Oct 26 05:26:58 2016
(r307954)
@@ -30,7 +30,9 @@ BTXCRT=   ${BTXDIR}/lib/crt0.o
 
 # compact binary with no padding between text, data, bss
 LDSCRIPT=  ${SRCTOP}/sys/boot/i386/boot.ldscript
-LDFLAGS_BIN=-e start -Ttext ${ORG} -Wl,-T,${LDSCRIPT},-S,--oformat,binary
-LD_FLAGS_BIN=-static -T ${LDSCRIPT} --gc-sections
+# LDFLAGS_BIN=-e start -Ttext ${ORG} -Wl,-T,${LDSCRIPT},-S,--oformat,binary
+# LD_FLAGS_BIN=-static -T ${LDSCRIPT} --gc-sections
+LDFLAGS_BIN=-e start -Ttext ${ORG} -Wl,-N,-S,--oformat,binary
+LD_FLAGS_BIN=-static -N --gc-sections
 
 .include "../Makefile.inc"
___
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: r307953 - head/sys/dev/hyperv/vmbus

2016-10-25 Thread Sepherosa Ziehau
Author: sephe
Date: Wed Oct 26 05:06:23 2016
New Revision: 307953
URL: https://svnweb.freebsd.org/changeset/base/307953

Log:
  hyperv/vmbus: Implement vmbus_chan_printf.
  
  And use it for vmbus channel logging, which can log the channel
  owner's name properly, instead of vmbus0.
  
  Submitted by: QianYue You 
  MFC after:1 week
  Sponsored by: Microsoft

Modified:
  head/sys/dev/hyperv/vmbus/vmbus_chan.c

Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c
==
--- head/sys/dev/hyperv/vmbus/vmbus_chan.c  Wed Oct 26 04:26:17 2016
(r307952)
+++ head/sys/dev/hyperv/vmbus/vmbus_chan.c  Wed Oct 26 05:06:23 2016
(r307953)
@@ -30,6 +30,7 @@
 __FBSDID("$FreeBSD$");
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -39,6 +40,7 @@ __FBSDID("$FreeBSD$");
 #include 
 
 #include 
+#include 
 
 #include 
 #include 
@@ -90,6 +92,9 @@ static void   vmbus_chan_msgproc_chresci
struct vmbus_softc *,
const struct vmbus_message *);
 
+static int vmbus_chan_printf(const struct vmbus_channel *,
+   const char *, ...) __printflike(2, 3);
+
 /*
  * Vmbus channel message processing.
  */
@@ -304,7 +309,7 @@ vmbus_chan_open(struct vmbus_channel *ch
PAGE_SIZE, 0, txbr_size + rxbr_size, >ch_bufring_dma,
BUS_DMA_WAITOK);
if (chan->ch_bufring == NULL) {
-   device_printf(chan->ch_dev, "bufring allocation failed\n");
+   vmbus_chan_printf(chan, "bufring allocation failed\n");
return (ENOMEM);
}
 
@@ -336,7 +341,7 @@ vmbus_chan_open_br(struct vmbus_channel 
uint8_t *br;
 
if (udlen > VMBUS_CHANMSG_CHOPEN_UDATA_SIZE) {
-   device_printf(sc->vmbus_dev,
+   vmbus_chan_printf(chan,
"invalid udata len %d for chan%u\n", udlen, chan->ch_id);
return EINVAL;
}
@@ -386,7 +391,7 @@ vmbus_chan_open_br(struct vmbus_channel 
error = vmbus_chan_gpadl_connect(chan, cbr->cbr_paddr,
txbr_size + rxbr_size, >ch_bufring_gpadl);
if (error) {
-   device_printf(sc->vmbus_dev,
+   vmbus_chan_printf(chan,
"failed to connect bufring GPADL to chan%u\n", chan->ch_id);
goto failed;
}
@@ -402,7 +407,7 @@ vmbus_chan_open_br(struct vmbus_channel 
 */
mh = vmbus_msghc_get(sc, sizeof(*req));
if (mh == NULL) {
-   device_printf(sc->vmbus_dev,
+   vmbus_chan_printf(chan,
"can not get msg hypercall for chopen(chan%u)\n",
chan->ch_id);
error = ENXIO;
@@ -421,7 +426,7 @@ vmbus_chan_open_br(struct vmbus_channel 
 
error = vmbus_msghc_exec(sc, mh);
if (error) {
-   device_printf(sc->vmbus_dev,
+   vmbus_chan_printf(chan,
"chopen(chan%u) msg hypercall exec failed: %d\n",
chan->ch_id, error);
vmbus_msghc_put(sc, mh);
@@ -436,13 +441,12 @@ vmbus_chan_open_br(struct vmbus_channel 
 
if (status == 0) {
if (bootverbose) {
-   device_printf(sc->vmbus_dev, "chan%u opened\n",
-   chan->ch_id);
+   vmbus_chan_printf(chan, "chan%u opened\n", chan->ch_id);
}
return 0;
}
 
-   device_printf(sc->vmbus_dev, "failed to open chan%u\n", chan->ch_id);
+   vmbus_chan_printf(chan, "failed to open chan%u\n", chan->ch_id);
error = ENXIO;
 
 failed:
@@ -485,7 +489,7 @@ vmbus_chan_gpadl_connect(struct vmbus_ch
 * We don't support multiple GPA ranges.
 */
if (range_len > UINT16_MAX) {
-   device_printf(sc->vmbus_dev, "GPA too large, %d pages\n",
+   vmbus_chan_printf(chan, "GPA too large, %d pages\n",
page_count);
return EOPNOTSUPP;
}
@@ -514,8 +518,8 @@ vmbus_chan_gpadl_connect(struct vmbus_ch
chm_range.gpa_page[cnt]);
mh = vmbus_msghc_get(sc, reqsz);
if (mh == NULL) {
-   device_printf(sc->vmbus_dev,
-   "can not get msg hypercall for gpadl->chan%u\n",
+   vmbus_chan_printf(chan,
+   "can not get msg hypercall for gpadl_conn(chan%u)\n",
chan->ch_id);
return EIO;
}
@@ -533,8 +537,8 @@ vmbus_chan_gpadl_connect(struct vmbus_ch
 
error = vmbus_msghc_exec(sc, mh);
if (error) {
-   device_printf(sc->vmbus_dev,
-   "gpadl->chan%u msg hypercall exec failed: %d\n",
+   vmbus_chan_printf(chan,
+   "gpadl_conn(chan%u) msg hypercall exec failed: %d\n",
chan->ch_id, 

svn commit: r307952 - head/sys/dev/hyperv/vmbus

2016-10-25 Thread Sepherosa Ziehau
Author: sephe
Date: Wed Oct 26 04:26:17 2016
New Revision: 307952
URL: https://svnweb.freebsd.org/changeset/base/307952

Log:
  hyperv/vmbus: Add missing white space.
  
  Submitted by: QianYue You 
  MFC after:1 week
  Sponsored by: Microsoft

Modified:
  head/sys/dev/hyperv/vmbus/vmbus.c

Modified: head/sys/dev/hyperv/vmbus/vmbus.c
==
--- head/sys/dev/hyperv/vmbus/vmbus.c   Tue Oct 25 19:04:44 2016
(r307951)
+++ head/sys/dev/hyperv/vmbus/vmbus.c   Wed Oct 26 04:26:17 2016
(r307952)
@@ -863,7 +863,7 @@ vmbus_intr_setup(struct vmbus_softc *sc)
device_printf(sc->vmbus_dev, "cannot find free IDT vector\n");
return ENXIO;
}
-   if(bootverbose) {
+   if (bootverbose) {
device_printf(sc->vmbus_dev, "vmbus IDT vector %d\n",
sc->vmbus_idtvec);
}
___
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: r307861 - in head: contrib/libarchive contrib/libarchive/cat/test contrib/libarchive/cpio/test contrib/libarchive/libarchive contrib/libarchive/libarchive/test contrib/libarchive/tar/t

2016-10-25 Thread Shawn Webb
Cool. Thanks! Also, does this need an SA like the previous libarchive
updates?

Thanks,

Shawn

On Tue, Oct 25, 2016 at 11:56:40PM +0200, Martin Matuska wrote:
> Hi Shawn,
> 
> I forgot to mention it in the commit message: MFC to stable/11 and
> stable/10 is 1 week.
> 
> Cheers,
> mm
> 
> 
> On 25.10.2016 17:16, Shawn Webb wrote:
> > On Mon, Oct 24, 2016 at 02:08:06PM +, Martin Matuska wrote:
> >> Author: mm
> >> Date: Mon Oct 24 14:08:05 2016
> >> New Revision: 307861
> >> URL: https://svnweb.freebsd.org/changeset/base/307861
> >>
> >> Log:
> >>   MFV r307859:
> >>   Update libarchive to 3.2.2
> > Hey Martin,
> >
> > Thanks for doing this upgrade! Any plans to MFC?
> >
> > Thanks,
> >
> 
> 

-- 
Shawn Webb
Cofounder and Security Engineer
HardenedBSD

GPG Key ID:  0x6A84658F52456EEE
GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89  3D9E 6A84 658F 5245 6EEE


signature.asc
Description: PGP signature


Re: svn commit: r307861 - in head: contrib/libarchive contrib/libarchive/cat/test contrib/libarchive/cpio/test contrib/libarchive/libarchive contrib/libarchive/libarchive/test contrib/libarchive/tar/t

2016-10-25 Thread Martin Matuska
Hi Shawn,

I forgot to mention it in the commit message: MFC to stable/11 and
stable/10 is 1 week.

Cheers,
mm


On 25.10.2016 17:16, Shawn Webb wrote:
> On Mon, Oct 24, 2016 at 02:08:06PM +, Martin Matuska wrote:
>> Author: mm
>> Date: Mon Oct 24 14:08:05 2016
>> New Revision: 307861
>> URL: https://svnweb.freebsd.org/changeset/base/307861
>>
>> Log:
>>   MFV r307859:
>>   Update libarchive to 3.2.2
> Hey Martin,
>
> Thanks for doing this upgrade! Any plans to MFC?
>
> Thanks,
>


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


Re: svn commit: r307936 - head/sys/amd64/amd64

2016-10-25 Thread Oliver Pinter
On 10/25/16, Tijl Coosemans  wrote:
> On Tue, 25 Oct 2016 17:13:46 + (UTC) Gleb Smirnoff 
> wrote:
>> Author: glebius
>> Date: Tue Oct 25 17:13:46 2016
>> New Revision: 307936
>> URL: https://svnweb.freebsd.org/changeset/base/307936
>>
>> Log:
>>   The argument validation in r296956 was not enough to close all possible
>>   overflows in sysarch(2).
>>
>>   Submitted by:  Kun Yang 
>>   Patch by:  kib
>>   Security:  SA-16:15
>>
>> Modified:
>>   head/sys/amd64/amd64/sys_machdep.c
>
> This patch and r296956 need to be applied to i386 too, don't they?

And what's about this for i386:


commit 3f32edbd77088eb3437503cca9fc4881d8e382e6
Author: tijl 
Date:   Sun Sep 25 18:29:02 2016 +

MFamd64: r266901

Allocate a zeroed LDT.

Failing to do this might result in the LDT appearing to run out of free
descriptors because of random junk in the descriptor's 'sd_type' field.

http://lists.freebsd.org/pipermail/freebsd-amd64/2014-May/016088.html

PR: 212639
Submitted by:   wheelcomp...@gmail.com
MFC after:  2 weeks

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


Re: svn commit: r307936 - head/sys/amd64/amd64

2016-10-25 Thread Tijl Coosemans
On Tue, 25 Oct 2016 17:13:46 + (UTC) Gleb Smirnoff  
wrote:
> Author: glebius
> Date: Tue Oct 25 17:13:46 2016
> New Revision: 307936
> URL: https://svnweb.freebsd.org/changeset/base/307936
> 
> Log:
>   The argument validation in r296956 was not enough to close all possible
>   overflows in sysarch(2).
>   
>   Submitted by:   Kun Yang 
>   Patch by:   kib
>   Security:   SA-16:15
> 
> Modified:
>   head/sys/amd64/amd64/sys_machdep.c

This patch and r296956 need to be applied to i386 too, don't they?
___
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: r307951 - in head: . sys/boot/efi/libefi

2016-10-25 Thread Warner Losh
Author: imp
Date: Tue Oct 25 19:04:44 2016
New Revision: 307951
URL: https://svnweb.freebsd.org/changeset/base/307951

Log:
  Fix two backwards tests.
  
  CID: 1365227, 1365228

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

Modified: head/sys/boot/efi/libefi/env.c
==
--- head/sys/boot/efi/libefi/env.c  Tue Oct 25 19:04:42 2016
(r307950)
+++ head/sys/boot/efi/libefi/env.c  Tue Oct 25 19:04:44 2016
(r307951)
@@ -114,7 +114,7 @@ ficlEfiSetenv(FICL_VM *pVM)
 
 #ifndef TESTMAIN
guid = (char*)ficlMalloc(guids);
-   if (guid != NULL)
+   if (guid == NULL)
vmThrowErr(pVM, "Error: out of memory");
memcpy(guid, guidp, guids);
uuid_from_string(guid, , );
@@ -131,7 +131,7 @@ ficlEfiSetenv(FICL_VM *pVM)
name[names] = (CHAR16)0;
 
value = (char*)ficlMalloc(values + 1);
-   if (value != NULL)
+   if (value == NULL)
vmThrowErr(pVM, "Error: out of memory");
memcpy(value, valuep, values);
 
@@ -166,7 +166,7 @@ ficlEfiGetenv(FICL_VM *pVM)
 
 #ifndef TESTMAIN
name = (char*) ficlMalloc(names+1);
-   if (!name)
+   if (name == NULL)
vmThrowErr(pVM, "Error: out of memory");
strncpy(name, namep, names);
name[names] = '\0';
@@ -201,7 +201,7 @@ ficlEfiUnsetenv(FICL_VM *pVM)
 
 #ifndef TESTMAIN
name = (char*) ficlMalloc(names+1);
-   if (!name)
+   if (name == NULL)
vmThrowErr(pVM, "Error: out of memory");
strncpy(name, namep, names);
name[names] = '\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: r307950 - head/sys/boot

2016-10-25 Thread Warner Losh
Author: imp
Date: Tue Oct 25 19:04:42 2016
New Revision: 307950
URL: https://svnweb.freebsd.org/changeset/base/307950

Log:
  Add it to the right place

Added:
  head/sys/boot/Makefile.ficl
 - copied, changed from r307949, head/Makefile.ficl

Copied and modified: head/sys/boot/Makefile.ficl (from r307949, 
head/Makefile.ficl)
==
___
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: r307949 - head

2016-10-25 Thread Warner Losh
Author: imp
Date: Tue Oct 25 18:57:25 2016
New Revision: 307949
URL: https://svnweb.freebsd.org/changeset/base/307949

Log:
  Add missing file

Added:
  head/Makefile.ficl   (contents, props changed)

Added: head/Makefile.ficl
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/Makefile.ficl  Tue Oct 25 18:57:25 2016(r307949)
@@ -0,0 +1,43 @@
+# $FreeBSD$
+
+# Common flags to build FICL related files
+
+FICLDIR?=  ${SRCTOP}/sys/boot/ficl
+
+.if ${MACHINE_CPUARCH} == "amd64" && defined(FICL32)
+FICL_CPUARCH=  i386
+.elif ${MACHINE_ARCH} == "mips64" || ${MACHINE_ARCH} == "mips64el"
+FICL_CPUARCH=  mips64
+.else
+FICL_CPUARCH=  ${MACHINE_CPUARCH}
+.endif
+
+.PATH: ${FICLDIR} ${FICLDIR}/${FICL_CPUARCH}
+
+.if ${MACHINE_CPUARCH} == "amd64"
+.if defined(FICL32)
+CFLAGS+=   -m32 -I.
+.else
+CFLAGS+=   -fPIC
+.endif
+.endif
+
+.if ${MACHINE_ARCH} == "powerpc64"
+CFLAGS+=   -m32 -mcpu=powerpc -I.
+.endif
+
+CFLAGS+=   -I${FICLDIR} -I${FICLDIR}/${FICL_CPUARCH} \
+   -I${FICLDIR}/../common
+
+.if ${MACHINE_CPUARCH} == "amd64" && defined(FICL32)
+.if !exists(machine)
+${SRCS:M*.c:R:S/$/.o/g}: machine
+
+beforedepend ${OBJS}: machine
+.endif
+
+machine: .NOMETA
+   ln -sf ${.CURDIR}/../../i386/include machine
+
+CLEANFILES+=   machine
+.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: r307948 - head/lib/libsysdecode

2016-10-25 Thread John Baldwin
Author: jhb
Date: Tue Oct 25 18:45:14 2016
New Revision: 307948
URL: https://svnweb.freebsd.org/changeset/base/307948

Log:
  Use binary and (&) instead of logical to extract the mask of a capability.
  
  CID:  1365227
  Submitted by: cem

Modified:
  head/lib/libsysdecode/flags.c

Modified: head/lib/libsysdecode/flags.c
==
--- head/lib/libsysdecode/flags.c   Tue Oct 25 18:43:36 2016
(r307947)
+++ head/lib/libsysdecode/flags.c   Tue Oct 25 18:45:14 2016
(r307948)
@@ -959,7 +959,7 @@ sysdecode_umtx_rwlock_flags(FILE *fp, u_
 }
 
 /* XXX: This should be in  */
-#defineCAPMASK(right)  ((right) && (((uint64_t)1 << 57) - 1))
+#defineCAPMASK(right)  ((right) & (((uint64_t)1 << 57) - 1))
 
 void
 sysdecode_cap_rights(FILE *fp, cap_rights_t *rightsp)
___
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: r307947 - head/tests/sys/geom/class/uzip

2016-10-25 Thread Ruslan Bukin
Author: br
Date: Tue Oct 25 18:43:36 2016
New Revision: 307947
URL: https://svnweb.freebsd.org/changeset/base/307947

Log:
  Change fs image name so it will not be regenerated (we
  have both big and little-endian images in tree).
  Also we don't known the endianness of the platform the
  image was generated on.
  
  Sponsored by: DARPA, AFRL
  Sponsored by: HEIF5

Modified:
  head/tests/sys/geom/class/uzip/Makefile

Modified: head/tests/sys/geom/class/uzip/Makefile
==
--- head/tests/sys/geom/class/uzip/Makefile Tue Oct 25 18:36:15 2016
(r307946)
+++ head/tests/sys/geom/class/uzip/Makefile Tue Oct 25 18:43:36 2016
(r307947)
@@ -8,7 +8,7 @@ PACKAGE=tests
 
 TESTSDIR=  ${TESTSBASE}/sys/geom/class/${.CURDIR:T}
 
-IMAGE= 1_endian_little.img
+IMAGE= 1_endian_unknown_autogenerated.img
 ZIMAGE=${IMAGE}.uzip
 UZIMAGE=   ${ZIMAGE}.uue
 
@@ -26,7 +26,7 @@ ${UZIMAGE}: ${IMAGE} ${ZIMAGE}
uuencode ${ZIMAGE} ${ZIMAGE} >>${.TARGET}
 
 ${PACKAGE}FILES+=  conf.sh 1_endian_big.img.uzip.uue \
-   ${UZIMAGE}
+   1_endian_little.img.uzip.uue
 
 FILESGROUPS+=  etalon
 etalon+=   etalon/etalon.txt
___
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: r307946 - head/sys/dev/usb/net

2016-10-25 Thread Conrad E. Meyer
Author: cem
Date: Tue Oct 25 18:36:15 2016
New Revision: 307946
URL: https://svnweb.freebsd.org/changeset/base/307946

Log:
  uhso(4): Fix a null pointer dereference
  
  The directly following m_defrag() call can wait, so there is no reason this
  call can't as well.
  
  Reported by:  Coverity
  CID:  1353551
  Sponsored by: Dell EMC Isilon

Modified:
  head/sys/dev/usb/net/uhso.c

Modified: head/sys/dev/usb/net/uhso.c
==
--- head/sys/dev/usb/net/uhso.c Tue Oct 25 18:17:03 2016(r307945)
+++ head/sys/dev/usb/net/uhso.c Tue Oct 25 18:36:15 2016(r307946)
@@ -1752,7 +1752,7 @@ uhso_if_rxflush(void *arg)
 * Allocate a new mbuf for this IP packet and
 * copy the IP-packet into it.
 */
-   m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
+   m = m_getcl(M_WAITOK, MT_DATA, M_PKTHDR);
memcpy(mtod(m, uint8_t *), mtod(m0, uint8_t *), iplen);
m->m_pkthdr.len = m->m_len = iplen;
 
___
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: r307944 - in head/sys/arm/ti: . am335x

2016-10-25 Thread Andrew Turner
Author: andrew
Date: Tue Oct 25 18:01:19 2016
New Revision: 307944
URL: https://svnweb.freebsd.org/changeset/base/307944

Log:
  Add MULTIDELAY support to the am335x dmtimer. This will be useful for
  testing Cortex-A8 support in GENERIC.
  
  Sponsored by: ABT Systems Ltd

Modified:
  head/sys/arm/ti/am335x/am335x_dmtimer.c
  head/sys/arm/ti/ti_machdep.c

Modified: head/sys/arm/ti/am335x/am335x_dmtimer.c
==
--- head/sys/arm/ti/am335x/am335x_dmtimer.c Tue Oct 25 17:57:31 2016
(r307943)
+++ head/sys/arm/ti/am335x/am335x_dmtimer.c Tue Oct 25 18:01:19 2016
(r307944)
@@ -38,6 +38,10 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#ifdef MULTIDELAY
+#include  /* For arm_set_delay */
+#endif
+
 #include 
 #include 
 #include 
@@ -67,6 +71,8 @@ struct am335x_dmtimer_softc {
 static struct am335x_dmtimer_softc *am335x_dmtimer_et_sc = NULL;
 static struct am335x_dmtimer_softc *am335x_dmtimer_tc_sc = NULL;
 
+static void am335x_dmtimer_delay(int, void *);
+
 /*
  * We use dmtimer2 for eventtimer and dmtimer3 for timecounter.
  */
@@ -235,6 +241,10 @@ am335x_dmtimer_tc_init(struct am335x_dmt
am335x_dmtimer_tc_sc = sc;
tc_init(>func.tc);
 
+#ifdef MULTIDELAY
+   arm_set_delay(am335x_dmtimer_delay, sc);
+#endif
+
return (0);
 }
 
@@ -328,23 +338,13 @@ static devclass_t am335x_dmtimer_devclas
 DRIVER_MODULE(am335x_dmtimer, simplebus, am335x_dmtimer_driver, 
am335x_dmtimer_devclass, 0, 0);
 MODULE_DEPEND(am335x_dmtimer, am335x_prcm, 1, 1, 1);
 
-void
-DELAY(int usec)
+static void
+am335x_dmtimer_delay(int usec, void *arg)
 {
-   struct am335x_dmtimer_softc *sc;
+   struct am335x_dmtimer_softc *sc = arg;
int32_t counts;
uint32_t first, last;
 
-   sc = am335x_dmtimer_tc_sc;
-
-   if (sc == NULL) {
-   for (; usec > 0; usec--)
-   for (counts = 200; counts > 0; counts--)
-   /* Prevent gcc from optimizing  out the loop */
-   cpufunc_nullop();
-   return;
-   }
-
/* Get the number of times to count */
counts = (usec + 1) * (sc->sysclk_freq / 100);
 
@@ -361,3 +361,19 @@ DELAY(int usec)
}
 }
 
+#ifndef MULTIDELAY
+void
+DELAY(int usec)
+{
+   int32_t counts;
+
+   if (am335x_dmtimer_tc_sc == NULL) {
+   for (; usec > 0; usec--)
+   for (counts = 200; counts > 0; counts--)
+   /* Prevent gcc from optimizing  out the loop */
+   cpufunc_nullop();
+   return;
+   } else
+   am335x_dmtimer_delay(usec, am335x_dmtimer_tc_sc);
+}
+#endif

Modified: head/sys/arm/ti/ti_machdep.c
==
--- head/sys/arm/ti/ti_machdep.cTue Oct 25 17:57:31 2016
(r307943)
+++ head/sys/arm/ti/ti_machdep.cTue Oct 25 18:01:19 2016
(r307944)
@@ -124,5 +124,5 @@ static platform_method_t am335x_methods[
PLATFORMMETHOD_END,
 };
 
-FDT_PLATFORM_DEF(am335x, "am335x", 0, "ti,am335x", 0);
+FDT_PLATFORM_DEF(am335x, "am335x", 0, "ti,am335x", 200);
 #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: r307943 - head/sys/arm/include

2016-10-25 Thread Andrew Turner
Author: andrew
Date: Tue Oct 25 17:57:31 2016
New Revision: 307943
URL: https://svnweb.freebsd.org/changeset/base/307943

Log:
  Remove the need for the delay to be zero when MULTIDELAY is undefined,
  it may be useful to only enable this in some configs.
  
  Sponsored by: ABT Systems Ltd

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

Modified: head/sys/arm/include/platformvar.h
==
--- head/sys/arm/include/platformvar.h  Tue Oct 25 17:31:57 2016
(r307942)
+++ head/sys/arm/include/platformvar.h  Tue Oct 25 17:57:31 2016
(r307943)
@@ -93,7 +93,7 @@ extern platform_method_t fdt_platform_me
 #ifdef MULTIDELAY
 #defineFDT_PLATFORM_CTASSERT(delay)CTASSERT(delay > 0)
 #else
-#defineFDT_PLATFORM_CTASSERT(delay)CTASSERT(delay == 0)
+#defineFDT_PLATFORM_CTASSERT(delay)
 #endif
 
 #define FDT_PLATFORM_DEF2(NAME, VAR_NAME, NAME_STR, size, compatible,  \
___
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: r307942 - in head/sys/boot: common efi/libefi ficl ficl32 i386/libi386 i386/loader

2016-10-25 Thread Warner Losh
Author: imp
Date: Tue Oct 25 17:31:57 2016
New Revision: 307942
URL: https://svnweb.freebsd.org/changeset/base/307942

Log:
  Really make WITHOUT_FORTH (MK_FORTH==no) work. The recent inclusion of
  FICL definitions not in ficl/ficl32 files broke this generally. This
  makes that stuff conditional on BOOT_FORTH. Also, move definitions
  related to the architecture (FICL_CPUARCH and friends) into
  Makefile.ficl that all parts of the tree that include files with ficl
  need to include (but only if MK_FORTH == yes). In addition, had to fix
  library ordering issue with LIBSTAND to keep it last. Without boot
  forth, there's no references to memset to bring in memset.o from
  libstand.a to satisfy libgeliboot.a's use of it. Listing libstand last
  solves this issue (and it's the proper place for libstand to boot).

Modified:
  head/sys/boot/common/Makefile.inc
  head/sys/boot/common/pnp.c
  head/sys/boot/efi/libefi/Makefile
  head/sys/boot/ficl/Makefile
  head/sys/boot/ficl32/Makefile
  head/sys/boot/i386/libi386/biospci.c
  head/sys/boot/i386/loader/Makefile

Modified: head/sys/boot/common/Makefile.inc
==
--- head/sys/boot/common/Makefile.inc   Tue Oct 25 17:16:58 2016
(r307941)
+++ head/sys/boot/common/Makefile.inc   Tue Oct 25 17:31:57 2016
(r307942)
@@ -60,6 +60,7 @@ SRCS+=pnp.c
 # Forth interpreter
 .if defined(BOOT_FORTH)
 SRCS+= interp_forth.c
+.include "${SRCTOP}/sys/boot/Makefile.ficl"
 .endif
 
 .if defined(BOOT_PROMPT_123)

Modified: head/sys/boot/common/pnp.c
==
--- head/sys/boot/common/pnp.c  Tue Oct 25 17:16:58 2016(r307941)
+++ head/sys/boot/common/pnp.c  Tue Oct 25 17:31:57 2016(r307942)
@@ -17,7 +17,9 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#ifdef BOOT_FORTH
 #include "ficl.h"
+#endif
 
 static struct pnpinfo_stql pnp_devices;
 static int pnp_devices_initted = 0;
@@ -186,6 +188,7 @@ pnp_eisaformat(u_int8_t *data)
 return(idbuf);
 }
 
+#ifdef BOOT_FORTH
 void
 ficlPnpdevices(FICL_VM *pVM)
 {
@@ -230,3 +233,4 @@ static void ficlCompilePnp(FICL_SYSTEM *
 }
 
 FICL_COMPILE_SET(ficlCompilePnp);
+#endif

Modified: head/sys/boot/efi/libefi/Makefile
==
--- head/sys/boot/efi/libefi/Makefile   Tue Oct 25 17:16:58 2016
(r307941)
+++ head/sys/boot/efi/libefi/Makefile   Tue Oct 25 17:31:57 2016
(r307942)
@@ -2,6 +2,10 @@
 
 .include 
 
+.if ${MK_FORTH} != "no"
+.include "${.CURDIR}/../../Makefile.ficl"
+.endif
+
 LIB=   efi
 INTERNALLIB=
 WARNS?=2
@@ -16,8 +20,6 @@ SRCS+=time_event.c
 .endif
 .if ${MK_FORTH} != "no"
 SRCS+= env.c
-CFLAGS+= -I${.CURDIR}/../../ficl
-CFLAGS+= -I${.CURDIR}/../../ficl/${MACHINE_CPUARCH}
 .endif
 
 # We implement a slightly non-standard %S in that it always takes a

Modified: head/sys/boot/ficl/Makefile
==
--- head/sys/boot/ficl/Makefile Tue Oct 25 17:16:58 2016(r307941)
+++ head/sys/boot/ficl/Makefile Tue Oct 25 17:31:57 2016(r307942)
@@ -1,15 +1,8 @@
 # $FreeBSD$
 #
 
-FICLDIR?=  ${.CURDIR}
+.include   "${.CURDIR}/../Makefile.ficl"
 
-.if defined(FICL32)
-.PATH: ${FICLDIR}/${MACHINE_CPUARCH:S/amd64/i386/}
-.elif ${MACHINE_ARCH} == "mips64" || ${MACHINE_ARCH} == "mips64el"
-.PATH: ${FICLDIR}/mips64
-.else
-.PATH: ${FICLDIR}/${MACHINE_CPUARCH}
-.endif
 BASE_SRCS= dict.c ficl.c fileaccess.c float.c loader.c math64.c \
prefix.c search.c stack.c tools.c vm.c words.c
 
@@ -41,42 +34,6 @@ SOFTWORDS=   softcore.fr jhlocal.fr marker
 # Optional OO extension softwords
 #SOFTWORDS+=   oo.fr classes.fr
 
-.if ${MACHINE_CPUARCH} == "amd64"
-.if defined(FICL32)
-CFLAGS+=   -m32 -I.
-.else
-CFLAGS+=   -fPIC
-.endif
-.endif
-
-.if ${MACHINE_ARCH} == "powerpc64"
-CFLAGS+=   -m32 -mcpu=powerpc -I.
-.endif
-
-.if ${MACHINE_CPUARCH} == "amd64" && defined(FICL32)
-FICL_CPUARCH=  i386
-.elif ${MACHINE_ARCH} == "mips64" || ${MACHINE_ARCH} == "mips64el"
-FICL_CPUARCH=  mips64
-.else
-FICL_CPUARCH=  ${MACHINE_CPUARCH}
-.endif
-
-CFLAGS+=   -I${FICLDIR} -I${FICLDIR}/${FICL_CPUARCH} \
-   -I${FICLDIR}/../common
-
 softcore.c: ${SOFTWORDS} softcore.awk
(cd ${FICLDIR}/softwords; cat ${SOFTWORDS} \
| awk -f softcore.awk -v datestamp="`LC_ALL=C date`") > ${.TARGET}
-
-.if ${MACHINE_CPUARCH} == "amd64" && defined(FICL32)
-.if !exists(machine)
-${SRCS:M*.c:R:S/$/.o/g}: machine
-
-beforedepend ${OBJS}: machine
-.endif
-
-machine: .NOMETA
-   ln -sf ${.CURDIR}/../../i386/include machine
-
-CLEANFILES+=   machine
-.endif

Modified: head/sys/boot/ficl32/Makefile
==
--- head/sys/boot/ficl32/Makefile   Tue Oct 25 17:16:58 2016

svn commit: r307931 - in releng/9.3: . sys/amd64/amd64 sys/conf

2016-10-25 Thread Gleb Smirnoff
Author: glebius
Date: Tue Oct 25 17:11:02 2016
New Revision: 307931
URL: https://svnweb.freebsd.org/changeset/base/307931

Log:
  Revised SA-16:15.  The initial patch didn't cover all possible overflows
  based on passing incorrect parameters to sysarch(2).
  
  Security: SA-16:15
  Approved by:  so

Modified:
  releng/9.3/UPDATING
  releng/9.3/sys/amd64/amd64/sys_machdep.c
  releng/9.3/sys/conf/newvers.sh

Modified: releng/9.3/UPDATING
==
--- releng/9.3/UPDATING Tue Oct 25 16:50:10 2016(r307930)
+++ releng/9.3/UPDATING Tue Oct 25 17:11:02 2016(r307931)
@@ -11,6 +11,10 @@ handbook:
 Items affecting the ports and packages system can be found in
 /usr/ports/UPDATING.  Please read that file before running portupgrade.
 
+20161025   p49 FreeBSD-SA-16:15.sysarch [revised]
+
+   Fix incorrect argument validation in sysarch(2). [SA-16:15]
+
 20161010   p48 FreeBSD-SA-16:28.bind
FreeBSD-SA-16:29.bspatch
FreeBSD-SA-16:30.portsnap

Modified: releng/9.3/sys/amd64/amd64/sys_machdep.c
==
--- releng/9.3/sys/amd64/amd64/sys_machdep.cTue Oct 25 16:50:10 2016
(r307930)
+++ releng/9.3/sys/amd64/amd64/sys_machdep.cTue Oct 25 17:11:02 2016
(r307931)
@@ -612,6 +612,8 @@ amd64_set_ldt(td, uap, descs)
largest_ld = uap->start + uap->num;
if (largest_ld > max_ldt_segment)
largest_ld = max_ldt_segment;
+   if (largest_ld < uap->start)
+   return (EINVAL);
i = largest_ld - uap->start;
mtx_lock(_lock);
bzero(&((struct user_segment_descriptor *)(pldt->ldt_base))
@@ -624,7 +626,8 @@ amd64_set_ldt(td, uap, descs)
/* verify range of descriptors to modify */
largest_ld = uap->start + uap->num;
if (uap->start >= max_ldt_segment ||
-   largest_ld > max_ldt_segment)
+   largest_ld > max_ldt_segment ||
+   largest_ld < uap->start)
return (EINVAL);
}
 

Modified: releng/9.3/sys/conf/newvers.sh
==
--- releng/9.3/sys/conf/newvers.sh  Tue Oct 25 16:50:10 2016
(r307930)
+++ releng/9.3/sys/conf/newvers.sh  Tue Oct 25 17:11:02 2016
(r307931)
@@ -32,7 +32,7 @@
 
 TYPE="FreeBSD"
 REVISION="9.3"
-BRANCH="RELEASE-p48"
+BRANCH="RELEASE-p49"
 if [ "X${BRANCH_OVERRIDE}" != "X" ]; then
BRANCH=${BRANCH_OVERRIDE}
 fi
___
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: r307941 - stable/9/sys/amd64/amd64

2016-10-25 Thread Gleb Smirnoff
Author: glebius
Date: Tue Oct 25 17:16:58 2016
New Revision: 307941
URL: https://svnweb.freebsd.org/changeset/base/307941

Log:
  Merge r307936:
The argument validation in r296956 was not enough to close all possible
overflows in sysarch(2).
  
Submitted by: Kun Yang 
Patch by: kib
Security: SA-16:15

Modified:
  stable/9/sys/amd64/amd64/sys_machdep.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/sys/   (props changed)

Modified: stable/9/sys/amd64/amd64/sys_machdep.c
==
--- stable/9/sys/amd64/amd64/sys_machdep.c  Tue Oct 25 17:16:08 2016
(r307940)
+++ stable/9/sys/amd64/amd64/sys_machdep.c  Tue Oct 25 17:16:58 2016
(r307941)
@@ -612,6 +612,8 @@ amd64_set_ldt(td, uap, descs)
largest_ld = uap->start + uap->num;
if (largest_ld > max_ldt_segment)
largest_ld = max_ldt_segment;
+   if (largest_ld < uap->start)
+   return (EINVAL);
i = largest_ld - uap->start;
mtx_lock(_lock);
bzero(&((struct user_segment_descriptor *)(pldt->ldt_base))
@@ -624,7 +626,8 @@ amd64_set_ldt(td, uap, descs)
/* verify range of descriptors to modify */
largest_ld = uap->start + uap->num;
if (uap->start >= max_ldt_segment ||
-   largest_ld > max_ldt_segment)
+   largest_ld > max_ldt_segment ||
+   largest_ld < uap->start)
return (EINVAL);
}
 
___
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: r307940 - stable/10/sys/amd64/amd64

2016-10-25 Thread Gleb Smirnoff
Author: glebius
Date: Tue Oct 25 17:16:08 2016
New Revision: 307940
URL: https://svnweb.freebsd.org/changeset/base/307940

Log:
  Merge r307936:
The argument validation in r296956 was not enough to close all possible
overflows in sysarch(2).
  
Submitted by: Kun Yang 
Patch by: kib
Security: SA-16:15

Modified:
  stable/10/sys/amd64/amd64/sys_machdep.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/amd64/amd64/sys_machdep.c
==
--- stable/10/sys/amd64/amd64/sys_machdep.c Tue Oct 25 17:15:32 2016
(r307939)
+++ stable/10/sys/amd64/amd64/sys_machdep.c Tue Oct 25 17:16:08 2016
(r307940)
@@ -619,6 +619,8 @@ amd64_set_ldt(td, uap, descs)
largest_ld = uap->start + uap->num;
if (largest_ld > max_ldt_segment)
largest_ld = max_ldt_segment;
+   if (largest_ld < uap->start)
+   return (EINVAL);
i = largest_ld - uap->start;
mtx_lock(_lock);
bzero(&((struct user_segment_descriptor *)(pldt->ldt_base))
@@ -631,7 +633,8 @@ amd64_set_ldt(td, uap, descs)
/* verify range of descriptors to modify */
largest_ld = uap->start + uap->num;
if (uap->start >= max_ldt_segment ||
-   largest_ld > max_ldt_segment)
+   largest_ld > max_ldt_segment ||
+   largest_ld < uap->start)
return (EINVAL);
}
 
___
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: r307939 - stable/11/usr.sbin/bhyve

2016-10-25 Thread Gleb Smirnoff
Author: glebius
Date: Tue Oct 25 17:15:32 2016
New Revision: 307939
URL: https://svnweb.freebsd.org/changeset/base/307939

Log:
  Merge r307937:
Fix unchecked array reference in the VGA device emulation code.
  
Submitted by:   Ilja Van Sprundel 
Patch by: tychon
Security:   SA-16:32

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

Modified: stable/11/usr.sbin/bhyve/vga.c
==
--- stable/11/usr.sbin/bhyve/vga.c  Tue Oct 25 17:14:50 2016
(r307938)
+++ stable/11/usr.sbin/bhyve/vga.c  Tue Oct 25 17:15:32 2016
(r307939)
@@ -161,10 +161,10 @@ struct vga_softc {
 */
struct {
uint8_t dac_state;
-   int dac_rd_index;
-   int dac_rd_subindex;
-   int dac_wr_index;
-   int dac_wr_subindex;
+   uint8_t dac_rd_index;
+   uint8_t dac_rd_subindex;
+   uint8_t dac_wr_index;
+   uint8_t dac_wr_subindex;
uint8_t dac_palette[3 * 256];
uint32_tdac_palette_rgb[256];
} vga_dac;
___
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: r307938 - stable/11/sys/amd64/amd64

2016-10-25 Thread Gleb Smirnoff
Author: glebius
Date: Tue Oct 25 17:14:50 2016
New Revision: 307938
URL: https://svnweb.freebsd.org/changeset/base/307938

Log:
  Merge r307936:
The argument validation in r296956 was not enough to close all possible
overflows in sysarch(2).
  
Submitted by: Kun Yang 
Patch by: kib
Security: SA-16:15

Modified:
  stable/11/sys/amd64/amd64/sys_machdep.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/amd64/amd64/sys_machdep.c
==
--- stable/11/sys/amd64/amd64/sys_machdep.c Tue Oct 25 17:13:58 2016
(r307937)
+++ stable/11/sys/amd64/amd64/sys_machdep.c Tue Oct 25 17:14:50 2016
(r307938)
@@ -608,6 +608,8 @@ amd64_set_ldt(td, uap, descs)
largest_ld = uap->start + uap->num;
if (largest_ld > max_ldt_segment)
largest_ld = max_ldt_segment;
+   if (largest_ld < uap->start)
+   return (EINVAL);
i = largest_ld - uap->start;
mtx_lock(_lock);
bzero(&((struct user_segment_descriptor *)(pldt->ldt_base))
@@ -620,7 +622,8 @@ amd64_set_ldt(td, uap, descs)
/* verify range of descriptors to modify */
largest_ld = uap->start + uap->num;
if (uap->start >= max_ldt_segment ||
-   largest_ld > max_ldt_segment)
+   largest_ld > max_ldt_segment ||
+   largest_ld < uap->start)
return (EINVAL);
}
 
___
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: r307937 - head/usr.sbin/bhyve

2016-10-25 Thread Gleb Smirnoff
Author: glebius
Date: Tue Oct 25 17:13:58 2016
New Revision: 307937
URL: https://svnweb.freebsd.org/changeset/base/307937

Log:
  Fix unchecked array reference in the VGA device emulation code.
  
  Submitted by:   Ilja Van Sprundel 
  Patch by: tychon
  Security:   SA-16:32

Modified:
  head/usr.sbin/bhyve/vga.c

Modified: head/usr.sbin/bhyve/vga.c
==
--- head/usr.sbin/bhyve/vga.c   Tue Oct 25 17:13:46 2016(r307936)
+++ head/usr.sbin/bhyve/vga.c   Tue Oct 25 17:13:58 2016(r307937)
@@ -161,10 +161,10 @@ struct vga_softc {
 */
struct {
uint8_t dac_state;
-   int dac_rd_index;
-   int dac_rd_subindex;
-   int dac_wr_index;
-   int dac_wr_subindex;
+   uint8_t dac_rd_index;
+   uint8_t dac_rd_subindex;
+   uint8_t dac_wr_index;
+   uint8_t dac_wr_subindex;
uint8_t dac_palette[3 * 256];
uint32_tdac_palette_rgb[256];
} vga_dac;
___
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: r307936 - head/sys/amd64/amd64

2016-10-25 Thread Gleb Smirnoff
Author: glebius
Date: Tue Oct 25 17:13:46 2016
New Revision: 307936
URL: https://svnweb.freebsd.org/changeset/base/307936

Log:
  The argument validation in r296956 was not enough to close all possible
  overflows in sysarch(2).
  
  Submitted by: Kun Yang 
  Patch by: kib
  Security: SA-16:15

Modified:
  head/sys/amd64/amd64/sys_machdep.c

Modified: head/sys/amd64/amd64/sys_machdep.c
==
--- head/sys/amd64/amd64/sys_machdep.c  Tue Oct 25 17:11:20 2016
(r307935)
+++ head/sys/amd64/amd64/sys_machdep.c  Tue Oct 25 17:13:46 2016
(r307936)
@@ -608,6 +608,8 @@ amd64_set_ldt(td, uap, descs)
largest_ld = uap->start + uap->num;
if (largest_ld > max_ldt_segment)
largest_ld = max_ldt_segment;
+   if (largest_ld < uap->start)
+   return (EINVAL);
i = largest_ld - uap->start;
mtx_lock(_lock);
bzero(&((struct user_segment_descriptor *)(pldt->ldt_base))
@@ -620,7 +622,8 @@ amd64_set_ldt(td, uap, descs)
/* verify range of descriptors to modify */
largest_ld = uap->start + uap->num;
if (uap->start >= max_ldt_segment ||
-   largest_ld > max_ldt_segment)
+   largest_ld > max_ldt_segment ||
+   largest_ld < uap->start)
return (EINVAL);
}
 
___
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: r307934 - in releng/10.3: . sys/amd64/amd64 sys/conf

2016-10-25 Thread Gleb Smirnoff
Author: glebius
Date: Tue Oct 25 17:11:15 2016
New Revision: 307934
URL: https://svnweb.freebsd.org/changeset/base/307934

Log:
  Revised SA-16:15.  The initial patch didn't cover all possible overflows
  based on passing incorrect parameters to sysarch(2).
  
  Security: SA-16:15
  Approved by:  so

Modified:
  releng/10.3/UPDATING
  releng/10.3/sys/amd64/amd64/sys_machdep.c
  releng/10.3/sys/conf/newvers.sh

Modified: releng/10.3/UPDATING
==
--- releng/10.3/UPDATINGTue Oct 25 17:11:11 2016(r307933)
+++ releng/10.3/UPDATINGTue Oct 25 17:11:15 2016(r307934)
@@ -16,6 +16,12 @@ from older versions of FreeBSD, try WITH
 stable/10, and then rebuild without this option. The bootstrap process from
 older version of current is a bit fragile.
 
+20161025   p11 FreeBSD-SA-16:15.sysarch [revised]
+   FreeBSD-EN-16:17.vm
+
+   Fix incorrect argument validation in sysarch(2). [SA-16:15]
+   Fix virtual memory subsystem bugs. [EN-16:17]
+
 20161010   p10 FreeBSD-SA-16:29.bspatch
FreeBSD-SA-16:30.portsnap
FreeBSD-SA-16:31.libarchive

Modified: releng/10.3/sys/amd64/amd64/sys_machdep.c
==
--- releng/10.3/sys/amd64/amd64/sys_machdep.c   Tue Oct 25 17:11:11 2016
(r307933)
+++ releng/10.3/sys/amd64/amd64/sys_machdep.c   Tue Oct 25 17:11:15 2016
(r307934)
@@ -617,6 +617,8 @@ amd64_set_ldt(td, uap, descs)
largest_ld = uap->start + uap->num;
if (largest_ld > max_ldt_segment)
largest_ld = max_ldt_segment;
+   if (largest_ld < uap->start)
+   return (EINVAL);
i = largest_ld - uap->start;
mtx_lock(_lock);
bzero(&((struct user_segment_descriptor *)(pldt->ldt_base))
@@ -629,7 +631,8 @@ amd64_set_ldt(td, uap, descs)
/* verify range of descriptors to modify */
largest_ld = uap->start + uap->num;
if (uap->start >= max_ldt_segment ||
-   largest_ld > max_ldt_segment)
+   largest_ld > max_ldt_segment ||
+   largest_ld < uap->start)
return (EINVAL);
}
 

Modified: releng/10.3/sys/conf/newvers.sh
==
--- releng/10.3/sys/conf/newvers.sh Tue Oct 25 17:11:11 2016
(r307933)
+++ releng/10.3/sys/conf/newvers.sh Tue Oct 25 17:11:15 2016
(r307934)
@@ -32,7 +32,7 @@
 
 TYPE="FreeBSD"
 REVISION="10.3"
-BRANCH="RELEASE-p10"
+BRANCH="RELEASE-p11"
 if [ "X${BRANCH_OVERRIDE}" != "X" ]; then
BRANCH=${BRANCH_OVERRIDE}
 fi
___
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: r307935 - in releng/11.0: . sys/amd64/amd64 sys/conf usr.sbin/bhyve

2016-10-25 Thread Gleb Smirnoff
Author: glebius
Date: Tue Oct 25 17:11:20 2016
New Revision: 307935
URL: https://svnweb.freebsd.org/changeset/base/307935

Log:
  Revised SA-16:15.  The initial patch didn't cover all possible overflows
  based on passing incorrect parameters to sysarch(2). [1]
  
  Fix unchecked array reference in the VGA device emulation code. [2]
  
  Security: SA-16:15 [1]
  Security:   SA-16:32 [2]
  Approved by:  so

Modified:
  releng/11.0/UPDATING
  releng/11.0/sys/amd64/amd64/sys_machdep.c
  releng/11.0/sys/conf/newvers.sh
  releng/11.0/usr.sbin/bhyve/vga.c

Modified: releng/11.0/UPDATING
==
--- releng/11.0/UPDATINGTue Oct 25 17:11:15 2016(r307934)
+++ releng/11.0/UPDATINGTue Oct 25 17:11:20 2016(r307935)
@@ -16,6 +16,12 @@ from older versions of FreeBSD, try WITH
 the tip of head, and then rebuild without this option. The bootstrap process
 from older version of current across the gcc/clang cutover is a bit fragile.
 
+20161025   p2  FreeBSD-SA-16:15.sysarch [revised]
+   FreeBSD-SA-16:32.bhyve
+
+   Fix incorrect argument validation in sysarch(2). [SA-16:15]
+   Fix access to host memory from guest in bhyve(8). [SA-16:32]
+
 20160928:
11.0-RELEASE.
 

Modified: releng/11.0/sys/amd64/amd64/sys_machdep.c
==
--- releng/11.0/sys/amd64/amd64/sys_machdep.c   Tue Oct 25 17:11:15 2016
(r307934)
+++ releng/11.0/sys/amd64/amd64/sys_machdep.c   Tue Oct 25 17:11:20 2016
(r307935)
@@ -608,6 +608,8 @@ amd64_set_ldt(td, uap, descs)
largest_ld = uap->start + uap->num;
if (largest_ld > max_ldt_segment)
largest_ld = max_ldt_segment;
+   if (largest_ld < uap->start)
+   return (EINVAL);
i = largest_ld - uap->start;
mtx_lock(_lock);
bzero(&((struct user_segment_descriptor *)(pldt->ldt_base))
@@ -620,7 +622,8 @@ amd64_set_ldt(td, uap, descs)
/* verify range of descriptors to modify */
largest_ld = uap->start + uap->num;
if (uap->start >= max_ldt_segment ||
-   largest_ld > max_ldt_segment)
+   largest_ld > max_ldt_segment ||
+   largest_ld < uap->start)
return (EINVAL);
}
 

Modified: releng/11.0/sys/conf/newvers.sh
==
--- releng/11.0/sys/conf/newvers.sh Tue Oct 25 17:11:15 2016
(r307934)
+++ releng/11.0/sys/conf/newvers.sh Tue Oct 25 17:11:20 2016
(r307935)
@@ -32,7 +32,7 @@
 
 TYPE="FreeBSD"
 REVISION="11.0"
-BRANCH="RELEASE-p1"
+BRANCH="RELEASE-p2"
 if [ -n "${BRANCH_OVERRIDE}" ]; then
BRANCH=${BRANCH_OVERRIDE}
 fi

Modified: releng/11.0/usr.sbin/bhyve/vga.c
==
--- releng/11.0/usr.sbin/bhyve/vga.cTue Oct 25 17:11:15 2016
(r307934)
+++ releng/11.0/usr.sbin/bhyve/vga.cTue Oct 25 17:11:20 2016
(r307935)
@@ -161,10 +161,10 @@ struct vga_softc {
 */
struct {
uint8_t dac_state;
-   int dac_rd_index;
-   int dac_rd_subindex;
-   int dac_wr_index;
-   int dac_wr_subindex;
+   uint8_t dac_rd_index;
+   uint8_t dac_rd_subindex;
+   uint8_t dac_wr_index;
+   uint8_t dac_wr_subindex;
uint8_t dac_palette[3 * 256];
uint32_tdac_palette_rgb[256];
} vga_dac;
___
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: r307933 - in releng/10.2: . sys/amd64/amd64 sys/conf

2016-10-25 Thread Gleb Smirnoff
Author: glebius
Date: Tue Oct 25 17:11:11 2016
New Revision: 307933
URL: https://svnweb.freebsd.org/changeset/base/307933

Log:
  Revised SA-16:15.  The initial patch didn't cover all possible overflows
  based on passing incorrect parameters to sysarch(2).
  
  Security: SA-16:15
  Approved by:  so

Modified:
  releng/10.2/UPDATING
  releng/10.2/sys/amd64/amd64/sys_machdep.c
  releng/10.2/sys/conf/newvers.sh

Modified: releng/10.2/UPDATING
==
--- releng/10.2/UPDATINGTue Oct 25 17:11:07 2016(r307932)
+++ releng/10.2/UPDATINGTue Oct 25 17:11:11 2016(r307933)
@@ -16,6 +16,10 @@ from older versions of FreeBSD, try WITH
 stable/10, and then rebuild without this option. The bootstrap process from
 older version of current is a bit fragile.
 
+20161025   p24 FreeBSD-SA-16:15.sysarch [revised]
+
+   Fix incorrect argument validation in sysarch(2). [SA-16:15]
+
 20161010   p23 FreeBSD-SA-16:29.bspatch
FreeBSD-SA-16:30.portsnap
FreeBSD-SA-16:31.libarchive

Modified: releng/10.2/sys/amd64/amd64/sys_machdep.c
==
--- releng/10.2/sys/amd64/amd64/sys_machdep.c   Tue Oct 25 17:11:07 2016
(r307932)
+++ releng/10.2/sys/amd64/amd64/sys_machdep.c   Tue Oct 25 17:11:11 2016
(r307933)
@@ -617,6 +617,8 @@ amd64_set_ldt(td, uap, descs)
largest_ld = uap->start + uap->num;
if (largest_ld > max_ldt_segment)
largest_ld = max_ldt_segment;
+   if (largest_ld < uap->start)
+   return (EINVAL);
i = largest_ld - uap->start;
mtx_lock(_lock);
bzero(&((struct user_segment_descriptor *)(pldt->ldt_base))
@@ -629,7 +631,8 @@ amd64_set_ldt(td, uap, descs)
/* verify range of descriptors to modify */
largest_ld = uap->start + uap->num;
if (uap->start >= max_ldt_segment ||
-   largest_ld > max_ldt_segment)
+   largest_ld > max_ldt_segment ||
+   largest_ld < uap->start)
return (EINVAL);
}
 

Modified: releng/10.2/sys/conf/newvers.sh
==
--- releng/10.2/sys/conf/newvers.sh Tue Oct 25 17:11:07 2016
(r307932)
+++ releng/10.2/sys/conf/newvers.sh Tue Oct 25 17:11:11 2016
(r307933)
@@ -32,7 +32,7 @@
 
 TYPE="FreeBSD"
 REVISION="10.2"
-BRANCH="RELEASE-p23"
+BRANCH="RELEASE-p24"
 if [ "X${BRANCH_OVERRIDE}" != "X" ]; then
BRANCH=${BRANCH_OVERRIDE}
 fi
___
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: r307932 - in releng/10.1: . sys/amd64/amd64 sys/conf

2016-10-25 Thread Gleb Smirnoff
Author: glebius
Date: Tue Oct 25 17:11:07 2016
New Revision: 307932
URL: https://svnweb.freebsd.org/changeset/base/307932

Log:
  Revised SA-16:15.  The initial patch didn't cover all possible overflows
  based on passing incorrect parameters to sysarch(2).
  
  Security: SA-16:15
  Approved by:  so

Modified:
  releng/10.1/UPDATING
  releng/10.1/sys/amd64/amd64/sys_machdep.c
  releng/10.1/sys/conf/newvers.sh

Modified: releng/10.1/UPDATING
==
--- releng/10.1/UPDATINGTue Oct 25 17:11:02 2016(r307931)
+++ releng/10.1/UPDATINGTue Oct 25 17:11:07 2016(r307932)
@@ -16,6 +16,10 @@ from older versions of FreeBSD, try WITH
 stable/10, and then rebuild without this option. The bootstrap process from
 older version of current is a bit fragile.
 
+20161025   p41 FreeBSD-SA-16:15.sysarch [revised]
+
+   Fix incorrect argument validation in sysarch(2). [SA-16:15]
+
 20161010   p40 FreeBSD-SA-16:29.bspatch
FreeBSD-SA-16:30.portsnap
FreeBSD-SA-16:31.libarchive

Modified: releng/10.1/sys/amd64/amd64/sys_machdep.c
==
--- releng/10.1/sys/amd64/amd64/sys_machdep.c   Tue Oct 25 17:11:02 2016
(r307931)
+++ releng/10.1/sys/amd64/amd64/sys_machdep.c   Tue Oct 25 17:11:07 2016
(r307932)
@@ -617,6 +617,8 @@ amd64_set_ldt(td, uap, descs)
largest_ld = uap->start + uap->num;
if (largest_ld > max_ldt_segment)
largest_ld = max_ldt_segment;
+   if (largest_ld < uap->start)
+   return (EINVAL);
i = largest_ld - uap->start;
mtx_lock(_lock);
bzero(&((struct user_segment_descriptor *)(pldt->ldt_base))
@@ -629,7 +631,8 @@ amd64_set_ldt(td, uap, descs)
/* verify range of descriptors to modify */
largest_ld = uap->start + uap->num;
if (uap->start >= max_ldt_segment ||
-   largest_ld > max_ldt_segment)
+   largest_ld > max_ldt_segment ||
+   largest_ld < uap->start)
return (EINVAL);
}
 

Modified: releng/10.1/sys/conf/newvers.sh
==
--- releng/10.1/sys/conf/newvers.sh Tue Oct 25 17:11:02 2016
(r307931)
+++ releng/10.1/sys/conf/newvers.sh Tue Oct 25 17:11:07 2016
(r307932)
@@ -32,7 +32,7 @@
 
 TYPE="FreeBSD"
 REVISION="10.1"
-BRANCH="RELEASE-p40"
+BRANCH="RELEASE-p41"
 if [ "X${BRANCH_OVERRIDE}" != "X" ]; then
BRANCH=${BRANCH_OVERRIDE}
 fi
___
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: r307930 - releng/11.0/sys/boot/geli

2016-10-25 Thread Gleb Smirnoff
Author: glebius
Date: Tue Oct 25 16:50:10 2016
New Revision: 307930
URL: https://svnweb.freebsd.org/changeset/base/307930

Log:
  EN-16:18: loader may hang during boot
  
  A programming error in GELIBoot causes the loader to attempt to read past
  the end of the disk if the size of the final partition is not a multiple of
  4 kB.
  
  Merge r306834 from stable/11.
  
  Approved by:  so

Modified:
  releng/11.0/sys/boot/geli/geliboot.c
Directory Properties:
  releng/11.0/   (props changed)

Modified: releng/11.0/sys/boot/geli/geliboot.c
==
--- releng/11.0/sys/boot/geli/geliboot.cTue Oct 25 16:45:55 2016
(r307929)
+++ releng/11.0/sys/boot/geli/geliboot.cTue Oct 25 16:50:10 2016
(r307930)
@@ -77,17 +77,25 @@ geli_taste(int read_func(void *vdev, voi
int error;
off_t alignsector;
 
-   alignsector = (lastsector * DEV_BSIZE) &
-   ~(off_t)(DEV_GELIBOOT_BSIZE - 1);
+   alignsector = rounddown2(lastsector * DEV_BSIZE, DEV_GELIBOOT_BSIZE);
+   if (alignsector + DEV_GELIBOOT_BSIZE > ((lastsector + 1) * DEV_BSIZE)) {
+   /* Don't read past the end of the disk */
+   alignsector = (lastsector * DEV_BSIZE) + DEV_BSIZE
+   - DEV_GELIBOOT_BSIZE;
+   }
error = read_func(NULL, dskp, alignsector, , DEV_GELIBOOT_BSIZE);
if (error != 0) {
return (error);
}
-   /* Extract the last DEV_BSIZE bytes from the block. */
-   error = eli_metadata_decode(buf + (DEV_GELIBOOT_BSIZE - DEV_BSIZE),
-   );
+   /* Extract the last 4k sector of the disk. */
+   error = eli_metadata_decode(buf, );
if (error != 0) {
-   return (error);
+   /* Try the last 512 byte sector instead. */
+   error = eli_metadata_decode(buf +
+   (DEV_GELIBOOT_BSIZE - DEV_BSIZE), );
+   if (error != 0) {
+   return (error);
+   }
}
 
if (!(md.md_flags & G_ELI_FLAG_GELIBOOT)) {
___
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: r307929 - in releng/10.3/sys: kern vm

2016-10-25 Thread Gleb Smirnoff
Author: glebius
Date: Tue Oct 25 16:45:55 2016
New Revision: 307929
URL: https://svnweb.freebsd.org/changeset/base/307929

Log:
  EN-16:17: virtual memory issues.
  
  Due to increased parallelism and optimizations in several parts of the
  system, the previously latent bugs in VM become much easier to trigger,
  affecting a significant number of the FreeBSD users.  The exact technical
  details of the issues are provided in the commit messages of the merged
  revisions, which are listed below with short summaries.
  
  r301184 prevent parallel object collapses, fixes object lifecycle
  r301436 do not leak the vm object lock, fixes overcommit disable
  r302243 avoid the active object marking for vm.vmtotal sysctl, fixes
  "vodead" hangs
  r302513 vm_fault() race with the vm_object_collapse(), fixes spurious
  SIGSEGV
  r303291 postpone BO_DEAD, fixes panic on fast vnode reclaim
  
  Approved by:  so

Modified:
  releng/10.3/sys/kern/vfs_subr.c
  releng/10.3/sys/vm/vm_fault.c
  releng/10.3/sys/vm/vm_meter.c
  releng/10.3/sys/vm/vm_object.c
  releng/10.3/sys/vm/vm_object.h
Directory Properties:
  releng/10.3/   (props changed)

Modified: releng/10.3/sys/kern/vfs_subr.c
==
--- releng/10.3/sys/kern/vfs_subr.c Tue Oct 25 16:33:05 2016
(r307928)
+++ releng/10.3/sys/kern/vfs_subr.c Tue Oct 25 16:45:55 2016
(r307929)
@@ -2934,7 +2934,13 @@ vgonel(struct vnode *vp)
TAILQ_EMPTY(>v_bufobj.bo_clean.bv_hd) &&
vp->v_bufobj.bo_clean.bv_cnt == 0,
("vp %p bufobj not invalidated", vp));
-   vp->v_bufobj.bo_flag |= BO_DEAD;
+
+   /*
+* For VMIO bufobj, BO_DEAD is set in vm_object_terminate()
+* after the object's page queue is flushed.
+*/
+   if (vp->v_bufobj.bo_object == NULL)
+   vp->v_bufobj.bo_flag |= BO_DEAD;
BO_UNLOCK(>v_bufobj);
 
/*

Modified: releng/10.3/sys/vm/vm_fault.c
==
--- releng/10.3/sys/vm/vm_fault.c   Tue Oct 25 16:33:05 2016
(r307928)
+++ releng/10.3/sys/vm/vm_fault.c   Tue Oct 25 16:45:55 2016
(r307929)
@@ -286,7 +286,7 @@ vm_fault_hold(vm_map_t map, vm_offset_t 
vm_prot_t prot;
long ahead, behind;
int alloc_req, era, faultcount, nera, reqpage, result;
-   boolean_t growstack, is_first_object_locked, wired;
+   boolean_t dead, growstack, is_first_object_locked, wired;
int map_generation;
vm_object_t next_object;
vm_page_t marray[VM_FAULT_READ_MAX];
@@ -423,11 +423,18 @@ fast_failed:
fs.pindex = fs.first_pindex;
while (TRUE) {
/*
-* If the object is dead, we stop here
+* If the object is marked for imminent termination,
+* we retry here, since the collapse pass has raced
+* with us.  Otherwise, if we see terminally dead
+* object, return fail.
 */
-   if (fs.object->flags & OBJ_DEAD) {
+   if ((fs.object->flags & OBJ_DEAD) != 0) {
+   dead = fs.object->type == OBJT_DEAD;
unlock_and_deallocate();
-   return (KERN_PROTECTION_FAILURE);
+   if (dead)
+   return (KERN_PROTECTION_FAILURE);
+   pause("vmf_de", 1);
+   goto RetryFault;
}
 
/*

Modified: releng/10.3/sys/vm/vm_meter.c
==
--- releng/10.3/sys/vm/vm_meter.c   Tue Oct 25 16:33:05 2016
(r307928)
+++ releng/10.3/sys/vm/vm_meter.c   Tue Oct 25 16:45:55 2016
(r307929)
@@ -93,29 +93,31 @@ SYSCTL_PROC(_vm, VM_LOADAVG, loadavg, CT
 CTLFLAG_MPSAFE, NULL, 0, sysctl_vm_loadavg, "S,loadavg",
 "Machine loadaverage history");
 
+/*
+ * This function aims to determine if the object is mapped,
+ * specifically, if it is referenced by a vm_map_entry.  Because
+ * objects occasionally acquire transient references that do not
+ * represent a mapping, the method used here is inexact.  However, it
+ * has very low overhead and is good enough for the advisory
+ * vm.vmtotal sysctl.
+ */
+static bool
+is_object_active(vm_object_t obj)
+{
+
+   return (obj->ref_count > obj->shadow_count);
+}
+
 static int
 vmtotal(SYSCTL_HANDLER_ARGS)
 {
-   struct proc *p;
struct vmtotal total;
-   vm_map_entry_t entry;
vm_object_t object;
-   vm_map_t map;
-   int paging;
+   struct proc *p;
struct thread *td;
-   struct vmspace *vm;
 
bzero(, sizeof(total));
-   /*
-* Mark all objects as inactive.
-*/
-   mtx_lock(_object_list_mtx);
-   TAILQ_FOREACH(object, _object_list, object_list) {
-  

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

2016-10-25 Thread Andrew Turner
Author: andrew
Date: Tue Oct 25 16:33:05 2016
New Revision: 307928
URL: https://svnweb.freebsd.org/changeset/base/307928

Log:
  Remove armadaxp_idcache_wbinv_all, it's a static function in the ELF
  trampoline and not used outside this.
  
  Sponsored by: ABT Systems Ltd

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

Modified: head/sys/arm/include/cpufunc.h
==
--- head/sys/arm/include/cpufunc.h  Tue Oct 25 16:29:15 2016
(r307927)
+++ head/sys/arm/include/cpufunc.h  Tue Oct 25 16:33:05 2016
(r307928)
@@ -284,8 +284,6 @@ voidarmv7_cpu_sleep (int);
 void   armv7_setup (void);
 void   armv7_drain_writebuf(void);
 
-void   armadaxp_idcache_wbinv_all  (void);
-
 void   cortexa_setup   (void);
 #endif
 #if defined(CPU_MV_PJ4B)
___
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: r307927 - in head/usr.sbin/makefs: . cd9660 ffs

2016-10-25 Thread Marcel Moolenaar
Author: marcel
Date: Tue Oct 25 16:29:15 2016
New Revision: 307927
URL: https://svnweb.freebsd.org/changeset/base/307927

Log:
  Be more precise when including headers so that we're less likely to
  depend on namespace pollution and as such become more portable. This
  means including headers like  or , but also
  making sure we include system/host headers before local headers.
  
  While here: define ENOATTR as ENOMSG in mtree.c. There is no ENOATTR
  on Linux.
  
  With this, makefs is ready for compilation on macOS and Linux.

Modified:
  head/usr.sbin/makefs/cd9660.c
  head/usr.sbin/makefs/cd9660/cd9660_archimedes.c
  head/usr.sbin/makefs/cd9660/iso9660_rrip.c
  head/usr.sbin/makefs/ffs/ffs_bswap.c
  head/usr.sbin/makefs/ffs/ffs_subr.c
  head/usr.sbin/makefs/mtree.c
  head/usr.sbin/makefs/walk.c

Modified: head/usr.sbin/makefs/cd9660.c
==
--- head/usr.sbin/makefs/cd9660.c   Tue Oct 25 16:28:30 2016
(r307926)
+++ head/usr.sbin/makefs/cd9660.c   Tue Oct 25 16:29:15 2016
(r307927)
@@ -98,10 +98,11 @@
 #include 
 __FBSDID("$FreeBSD$");
 
-#include 
-#include 
 #include 
 #include 
+#include 
+#include 
+#include 
 
 #include "makefs.h"
 #include "cd9660.h"

Modified: head/usr.sbin/makefs/cd9660/cd9660_archimedes.c
==
--- head/usr.sbin/makefs/cd9660/cd9660_archimedes.c Tue Oct 25 16:28:30 
2016(r307926)
+++ head/usr.sbin/makefs/cd9660/cd9660_archimedes.c Tue Oct 25 16:29:15 
2016(r307927)
@@ -40,9 +40,11 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include 
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include "makefs.h"

Modified: head/usr.sbin/makefs/cd9660/iso9660_rrip.c
==
--- head/usr.sbin/makefs/cd9660/iso9660_rrip.c  Tue Oct 25 16:28:30 2016
(r307926)
+++ head/usr.sbin/makefs/cd9660/iso9660_rrip.c  Tue Oct 25 16:29:15 2016
(r307927)
@@ -35,14 +35,16 @@
  * defined in iso9660_rrip.h
  */
 
-#include "makefs.h"
-#include "cd9660.h"
-#include "iso9660_rrip.h"
+#include 
+__FBSDID("$FreeBSD$");
+
 #include 
+#include 
 #include 
 
-#include 
-__FBSDID("$FreeBSD$");
+#include "makefs.h"
+#include "cd9660.h"
+#include "iso9660_rrip.h"
 
 static void cd9660_rrip_initialize_inode(cd9660node *);
 static int cd9660_susp_handle_continuation(cd9660node *);

Modified: head/usr.sbin/makefs/ffs/ffs_bswap.c
==
--- head/usr.sbin/makefs/ffs/ffs_bswap.cTue Oct 25 16:28:30 2016
(r307926)
+++ head/usr.sbin/makefs/ffs/ffs_bswap.cTue Oct 25 16:29:15 2016
(r307927)
@@ -38,18 +38,19 @@ __FBSDID("$FreeBSD$");
 #include 
 #endif
 
-#include 
-#include "ffs/ufs_bswap.h"
-#include 
-
 #if !defined(_KERNEL)
 #include 
+#include 
 #include 
 #include 
 #include 
 #define panic(x)   printf("%s\n", (x)), abort()
 #endif
 
+#include 
+#include "ffs/ufs_bswap.h"
+#include 
+
 #definefs_old_postblofffs_spare5[0]
 #definefs_old_rotbloff fs_spare5[1]
 #definefs_old_postbl_start fs_maxbsize

Modified: head/usr.sbin/makefs/ffs/ffs_subr.c
==
--- head/usr.sbin/makefs/ffs/ffs_subr.c Tue Oct 25 16:28:30 2016
(r307926)
+++ head/usr.sbin/makefs/ffs/ffs_subr.c Tue Oct 25 16:29:15 2016
(r307927)
@@ -35,6 +35,7 @@
 __FBSDID("$FreeBSD$");
 
 #include 
+#include 
 
 #include 
 #include 

Modified: head/usr.sbin/makefs/mtree.c
==
--- head/usr.sbin/makefs/mtree.cTue Oct 25 16:28:30 2016
(r307926)
+++ head/usr.sbin/makefs/mtree.cTue Oct 25 16:29:15 2016
(r307927)
@@ -44,10 +44,15 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include "makefs.h"
 
+#ifndef ENOATTR
+#defineENOATTR ENOMSG
+#endif
+
 #defineIS_DOT(nm)  ((nm)[0] == '.' && (nm)[1] == '\0')
 #defineIS_DOTDOT(nm)   ((nm)[0] == '.' && (nm)[1] == '.' && (nm)[2] == 
'\0')
 

Modified: head/usr.sbin/makefs/walk.c
==
--- head/usr.sbin/makefs/walk.c Tue Oct 25 16:28:30 2016(r307926)
+++ head/usr.sbin/makefs/walk.c Tue Oct 25 16:29:15 2016(r307927)
@@ -40,6 +40,7 @@
 __FBSDID("$FreeBSD$");
 
 #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"


svn commit: r307926 - head/sys/dev/bfe

2016-10-25 Thread Gleb Smirnoff
Author: glebius
Date: Tue Oct 25 16:28:30 2016
New Revision: 307926
URL: https://svnweb.freebsd.org/changeset/base/307926

Log:
  Check m_getcl() return value.
  
  CID:  611376

Modified:
  head/sys/dev/bfe/if_bfe.c

Modified: head/sys/dev/bfe/if_bfe.c
==
--- head/sys/dev/bfe/if_bfe.c   Tue Oct 25 16:25:06 2016(r307925)
+++ head/sys/dev/bfe/if_bfe.c   Tue Oct 25 16:28:30 2016(r307926)
@@ -793,6 +793,8 @@ bfe_list_newbuf(struct bfe_softc *sc, in
int nsegs;
 
m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
+   if (m == NULL)
+   return (ENOBUFS);
m->m_len = m->m_pkthdr.len = MCLBYTES;
 
if (bus_dmamap_load_mbuf_sg(sc->bfe_rxmbuf_tag, sc->bfe_rx_sparemap,
___
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: r307925 - in head/sys/arm: arm include

2016-10-25 Thread Andrew Turner
Author: andrew
Date: Tue Oct 25 16:25:06 2016
New Revision: 307925
URL: https://svnweb.freebsd.org/changeset/base/307925

Log:
  Remove arm11x6_setttb and armv7_setttb as they are unused. While here
  remove unneeded code from the ARMv7 cpu assembly code.
  
  Sponsored by: ABT Systems Ltd

Modified:
  head/sys/arm/arm/cpufunc_asm_arm11x6.S
  head/sys/arm/arm/cpufunc_asm_armv7.S
  head/sys/arm/include/cpufunc.h

Modified: head/sys/arm/arm/cpufunc_asm_arm11x6.S
==
--- head/sys/arm/arm/cpufunc_asm_arm11x6.S  Tue Oct 25 16:22:43 2016
(r307924)
+++ head/sys/arm/arm/cpufunc_asm_arm11x6.S  Tue Oct 25 16:25:06 2016
(r307925)
@@ -64,14 +64,6 @@ __FBSDID("$FreeBSD$");
 
.cpu arm1176jz-s
 
-ENTRY(arm11x6_setttb)
-   mov r1, #0
-   mcr p15, 0, r0, c2, c0, 0   /* load new TTB */
-   mcr p15, 0, r1, c8, c7, 0   /* invalidate I+D TLBs */
-   mcr p15, 0, r1, c7, c10, 4  /* drain write buffer */
-   RET
-END(arm11x6_setttb)
-
 /*
  * Preload the cache before issuing the WFI by conditionally disabling the
  * mcr intstructions the first time around the loop. Ensure the function is

Modified: head/sys/arm/arm/cpufunc_asm_armv7.S
==
--- head/sys/arm/arm/cpufunc_asm_armv7.STue Oct 25 16:22:43 2016
(r307924)
+++ head/sys/arm/arm/cpufunc_asm_armv7.STue Oct 25 16:25:06 2016
(r307925)
@@ -37,56 +37,16 @@ __FBSDID("$FreeBSD$");
 
.cpu cortex-a8
 
+#ifdef ELF_TRAMPOLINE
 .Lcoherency_level:
.word   _C_LABEL(arm_cache_loc)
 .Lcache_type:
.word   _C_LABEL(arm_cache_type)
-.Larmv7_dcache_line_size:
-   .word   _C_LABEL(arm_dcache_min_line_size)
-.Larmv7_icache_line_size:
-   .word   _C_LABEL(arm_icache_min_line_size)
-.Larmv7_idcache_line_size:
-   .word   _C_LABEL(arm_idcache_min_line_size)
 .Lway_mask:
.word   0x3ff
 .Lmax_index:
.word   0x7fff
-.Lpage_mask:
-   .word   0xfff
-
-#define PT_NOS  (1 << 5)
-#define PT_S   (1 << 1)
-#define PT_INNER_NC0
-#define PT_INNER_WT(1 << 0)
-#define PT_INNER_WB((1 << 0) | (1 << 6))
-#define PT_INNER_WBWA  (1 << 6)
-#define PT_OUTER_NC0
-#define PT_OUTER_WT(2 << 3)
-#define PT_OUTER_WB(3 << 3)
-#define PT_OUTER_WBWA  (1 << 3)
 
-#ifdef SMP
-#define PT_ATTR(PT_S|PT_INNER_WBWA|PT_OUTER_WBWA|PT_NOS)
-#else
-#define PT_ATTR(PT_INNER_WBWA|PT_OUTER_WBWA)
-#endif
-
-ENTRY(armv7_setttb)
-   dsb
-   orr r0, r0, #PT_ATTR
-   mcr CP15_TTBR0(r0)
-   isb
-#ifdef SMP
-   mcr CP15_TLBIALLIS
-#else
-   mcr CP15_TLBIALL
-#endif
-   dsb
-   isb
-   RET
-END(armv7_setttb)
-
-#ifdef ELF_TRAMPOLINE
 /* Based on algorithm from ARM Architecture Reference Manual */
 ENTRY(armv7_dcache_wbinv_all)
stmdb   sp!, {r4, r5, r6, r7, r8, r9}

Modified: head/sys/arm/include/cpufunc.h
==
--- head/sys/arm/include/cpufunc.h  Tue Oct 25 16:22:43 2016
(r307924)
+++ head/sys/arm/include/cpufunc.h  Tue Oct 25 16:25:06 2016
(r307925)
@@ -279,7 +279,6 @@ voidarmv6_idcache_wbinv_all (void);
 #endif
 #if defined(CPU_CORTEXA8) || defined(CPU_CORTEXA_MP) || \
 defined(CPU_MV_PJ4B) || defined(CPU_KRAIT)
-void   armv7_setttb(u_int);
 void   armv7_idcache_wbinv_all (void);
 void   armv7_cpu_sleep (int);
 void   armv7_setup (void);
@@ -297,7 +296,6 @@ voidpj4bv7_setup(void);
 #if defined(CPU_ARM1176)
 void   arm11_drain_writebuf(void);
 
-voidarm11x6_setttb  (u_int);
 voidarm11x6_setup   (void);
 voidarm11x6_sleep   (int);  /* no ref. for errata */
 #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: r307923 - in head/usr.sbin/makefs: . cd9660 ffs

2016-10-25 Thread Marcel Moolenaar
Author: marcel
Date: Tue Oct 25 16:21:38 2016
New Revision: 307923
URL: https://svnweb.freebsd.org/changeset/base/307923

Log:
  Allow building makefs(8) from another Makefile (such as one in
  a seperate directory hierarchy used to build tools). This boils
  down to replacing the use of ${.CURDIR} with either ${SRCDIR}
  or ${SRCTOP}. SRCDIR is defined as the directory in which the
  Makefile lives that bmake(1) is currently reading. Use SRCTOP
  when reaching outside of makefs's directory.

Modified:
  head/usr.sbin/makefs/Makefile
  head/usr.sbin/makefs/cd9660/Makefile.inc
  head/usr.sbin/makefs/ffs/Makefile.inc

Modified: head/usr.sbin/makefs/Makefile
==
--- head/usr.sbin/makefs/Makefile   Tue Oct 25 16:14:11 2016
(r307922)
+++ head/usr.sbin/makefs/Makefile   Tue Oct 25 16:21:38 2016
(r307923)
@@ -1,10 +1,12 @@
 #  $FreeBSD$
 
+SRCDIR:=${.PARSEDIR:tA}
+
 .include 
 
 PROG=  makefs
 
-CFLAGS+=-I${.CURDIR}
+CFLAGS+=-I${SRCDIR}
 
 SRCS=  cd9660.c ffs.c \
makefs.c \
@@ -14,24 +16,24 @@ MAN=makefs.8
 
 WARNS?=2
 
-.include "${.CURDIR}/cd9660/Makefile.inc"
-.include "${.CURDIR}/ffs/Makefile.inc"
+.include "${SRCDIR}/cd9660/Makefile.inc"
+.include "${SRCDIR}/ffs/Makefile.inc"
 
 CFLAGS+=-DHAVE_STRUCT_STAT_ST_FLAGS=1
 CFLAGS+=-DHAVE_STRUCT_STAT_ST_GEN=1
 
-.PATH: ${.CURDIR}/../../contrib/mtree
-CFLAGS+=-I${.CURDIR}/../../contrib/mtree
+.PATH: ${SRCTOP}/contrib/mtree
+CFLAGS+=-I${SRCTOP}/contrib/mtree
 SRCS+= getid.c misc.c spec.c
 
-.PATH: ${.CURDIR}/../../contrib/mknod
-CFLAGS+=-I${.CURDIR}/../../contrib/mknod
+.PATH: ${SRCTOP}/contrib/mknod
+CFLAGS+=-I${SRCTOP}/contrib/mknod
 SRCS+= pack_dev.c
 
-.PATH: ${.CURDIR}/../../sys/ufs/ffs
+.PATH: ${SRCTOP}/sys/ufs/ffs
 SRCS+= ffs_tables.c
 
-CFLAGS+=   -I${.CURDIR}/../../lib/libnetbsd
+CFLAGS+=   -I${SRCTOP}/lib/libnetbsd
 LIBADD=netbsd util sbuf
 
 .if ${MK_TESTS} != "no"

Modified: head/usr.sbin/makefs/cd9660/Makefile.inc
==
--- head/usr.sbin/makefs/cd9660/Makefile.incTue Oct 25 16:14:11 2016
(r307922)
+++ head/usr.sbin/makefs/cd9660/Makefile.incTue Oct 25 16:21:38 2016
(r307923)
@@ -1,9 +1,9 @@
 #  $FreeBSD$
 #
 
-.PATH: ${.CURDIR}/cd9660 ${.CURDIR}/../../sys/fs/cd9660/
+.PATH: ${SRCDIR}/cd9660 ${SRCTOP}/sys/fs/cd9660/
 
-CFLAGS+=-I${.CURDIR}/../../sys/fs/cd9660/
+CFLAGS+=-I${SRCTOP}/sys/fs/cd9660/
 
 SRCS+= cd9660_strings.c cd9660_debug.c cd9660_eltorito.c \
cd9660_write.c cd9660_conversion.c iso9660_rrip.c cd9660_archimedes.c

Modified: head/usr.sbin/makefs/ffs/Makefile.inc
==
--- head/usr.sbin/makefs/ffs/Makefile.inc   Tue Oct 25 16:14:11 2016
(r307922)
+++ head/usr.sbin/makefs/ffs/Makefile.inc   Tue Oct 25 16:21:38 2016
(r307923)
@@ -1,9 +1,9 @@
 #  $FreeBSD$
 #
 
-.PATH: ${.CURDIR}/ffs ${.CURDIR}/../../sys/ufs/ffs
+.PATH: ${SRCDIR}/ffs ${SRCTOP}/sys/ufs/ffs
 
-CFLAGS+=   -I${.CURDIR}/../../sys/ufs/ffs
+CFLAGS+=   -I${SRCTOP}/sys/ufs/ffs
 
 SRCS+= ffs_alloc.c ffs_balloc.c ffs_bswap.c ffs_subr.c ufs_bmap.c
 SRCS+= buf.c mkfs.c
___
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: r307922 - in vendor/heirloom-doctools/20161025: . checknr col eqn eqn/checkeq.d eqn/eqn.d eqn/eqnchar.d eqn/neqn.d grap include mpm pic picpack ptx refer soelim tbl troff troff/libhnj t...

2016-10-25 Thread Baptiste Daroussin
Author: bapt
Date: Tue Oct 25 16:14:11 2016
New Revision: 307922
URL: https://svnweb.freebsd.org/changeset/base/307922

Log:
  Tag import of heirloom-doctools 20161025

Added:
  vendor/heirloom-doctools/20161025/
 - copied from r306788, vendor/heirloom-doctools/dist/
  vendor/heirloom-doctools/20161025/compat.c
 - copied unchanged from r307809, vendor/heirloom-doctools/dist/compat.c
Replaced:
  vendor/heirloom-doctools/20161025/checknr/Makefile.mk
 - copied unchanged from r307921, 
vendor/heirloom-doctools/dist/checknr/Makefile.mk
  vendor/heirloom-doctools/20161025/checknr/checknr.c
 - copied unchanged from r307809, 
vendor/heirloom-doctools/dist/checknr/checknr.c
  vendor/heirloom-doctools/20161025/col/Makefile.mk
 - copied unchanged from r307921, 
vendor/heirloom-doctools/dist/col/Makefile.mk
  vendor/heirloom-doctools/20161025/configure
 - copied unchanged from r307921, vendor/heirloom-doctools/dist/configure
  vendor/heirloom-doctools/20161025/eqn/checkeq.d/Makefile.mk
 - copied unchanged from r307921, 
vendor/heirloom-doctools/dist/eqn/checkeq.d/Makefile.mk
  vendor/heirloom-doctools/20161025/eqn/checkeq.d/checkeq.c
 - copied unchanged from r307809, 
vendor/heirloom-doctools/dist/eqn/checkeq.d/checkeq.c
  vendor/heirloom-doctools/20161025/eqn/diacrit.c
 - copied unchanged from r307809, 
vendor/heirloom-doctools/dist/eqn/diacrit.c
  vendor/heirloom-doctools/20161025/eqn/e.h
 - copied unchanged from r307809, vendor/heirloom-doctools/dist/eqn/e.h
  vendor/heirloom-doctools/20161025/eqn/eqn.d/Makefile.mk
 - copied unchanged from r307921, 
vendor/heirloom-doctools/dist/eqn/eqn.d/Makefile.mk
  vendor/heirloom-doctools/20161025/eqn/eqnbox.c
 - copied unchanged from r307809, vendor/heirloom-doctools/dist/eqn/eqnbox.c
  vendor/heirloom-doctools/20161025/eqn/eqnchar.d/Makefile.mk
 - copied unchanged from r307921, 
vendor/heirloom-doctools/dist/eqn/eqnchar.d/Makefile.mk
  vendor/heirloom-doctools/20161025/eqn/eqnchar.d/genutf8.c
 - copied unchanged from r307809, 
vendor/heirloom-doctools/dist/eqn/eqnchar.d/genutf8.c
  vendor/heirloom-doctools/20161025/eqn/funny.c
 - copied unchanged from r307809, vendor/heirloom-doctools/dist/eqn/funny.c
  vendor/heirloom-doctools/20161025/eqn/integral.c
 - copied unchanged from r307809, 
vendor/heirloom-doctools/dist/eqn/integral.c
  vendor/heirloom-doctools/20161025/eqn/io.c
 - copied unchanged from r307809, vendor/heirloom-doctools/dist/eqn/io.c
  vendor/heirloom-doctools/20161025/eqn/lex.c
 - copied unchanged from r307921, vendor/heirloom-doctools/dist/eqn/lex.c
  vendor/heirloom-doctools/20161025/eqn/lookup.c
 - copied unchanged from r307809, vendor/heirloom-doctools/dist/eqn/lookup.c
  vendor/heirloom-doctools/20161025/eqn/matrix.c
 - copied unchanged from r307809, vendor/heirloom-doctools/dist/eqn/matrix.c
  vendor/heirloom-doctools/20161025/eqn/neqn.d/Makefile.mk
 - copied unchanged from r307921, 
vendor/heirloom-doctools/dist/eqn/neqn.d/Makefile.mk
  vendor/heirloom-doctools/20161025/eqn/paren.c
 - copied unchanged from r307809, vendor/heirloom-doctools/dist/eqn/paren.c
  vendor/heirloom-doctools/20161025/eqn/shift.c
 - copied unchanged from r307809, vendor/heirloom-doctools/dist/eqn/shift.c
  vendor/heirloom-doctools/20161025/eqn/text.c
 - copied unchanged from r307809, vendor/heirloom-doctools/dist/eqn/text.c
  vendor/heirloom-doctools/20161025/grap/Makefile.mk
 - copied unchanged from r307921, 
vendor/heirloom-doctools/dist/grap/Makefile.mk
  vendor/heirloom-doctools/20161025/grap/coord.c
 - copied unchanged from r307809, vendor/heirloom-doctools/dist/grap/coord.c
  vendor/heirloom-doctools/20161025/grap/grap.h
 - copied unchanged from r307809, vendor/heirloom-doctools/dist/grap/grap.h
  vendor/heirloom-doctools/20161025/grap/input.c
 - copied unchanged from r307809, vendor/heirloom-doctools/dist/grap/input.c
  vendor/heirloom-doctools/20161025/grap/main.c
 - copied unchanged from r307809, vendor/heirloom-doctools/dist/grap/main.c
  vendor/heirloom-doctools/20161025/grap/misc.c
 - copied unchanged from r307809, vendor/heirloom-doctools/dist/grap/misc.c
  vendor/heirloom-doctools/20161025/include/global.h
 - copied unchanged from r307809, 
vendor/heirloom-doctools/dist/include/global.h
  vendor/heirloom-doctools/20161025/mk.config
 - copied unchanged from r307921, vendor/heirloom-doctools/dist/mk.config
  vendor/heirloom-doctools/20161025/mpm/Makefile.mk
 - copied unchanged from r307921, 
vendor/heirloom-doctools/dist/mpm/Makefile.mk
  vendor/heirloom-doctools/20161025/mpm/misc.h
 - copied unchanged from r307809, vendor/heirloom-doctools/dist/mpm/misc.h
  vendor/heirloom-doctools/20161025/pic/Makefile.mk
 - copied unchanged from r307921, 
vendor/heirloom-doctools/dist/pic/Makefile.mk
  vendor/heirloom-doctools/20161025/pic/arcgen.c
 - copied unchanged from r307809, vendor/heirloom-doctools/dist/pic/arcgen.c
  vendor/heirloom

svn commit: r307921 - in vendor/heirloom-doctools/dist: . checknr col eqn eqn/checkeq.d eqn/eqn.d eqn/eqnchar.d eqn/neqn.d grap mpm pic picpack ptx refer soelim tbl troff troff/libhnj troff/nroff.d...

2016-10-25 Thread Baptiste Daroussin
Author: bapt
Date: Tue Oct 25 16:12:45 2016
New Revision: 307921
URL: https://svnweb.freebsd.org/changeset/base/307921

Log:
  Import heirloom doctools snapshot 20161025

Modified:
  vendor/heirloom-doctools/dist/checknr/Makefile.mk
  vendor/heirloom-doctools/dist/col/Makefile.mk
  vendor/heirloom-doctools/dist/configure
  vendor/heirloom-doctools/dist/eqn/checkeq.d/Makefile.mk
  vendor/heirloom-doctools/dist/eqn/eqn.d/Makefile.mk
  vendor/heirloom-doctools/dist/eqn/eqnchar.d/Makefile.mk
  vendor/heirloom-doctools/dist/eqn/lex.c
  vendor/heirloom-doctools/dist/eqn/neqn.d/Makefile.mk
  vendor/heirloom-doctools/dist/grap/Makefile.mk
  vendor/heirloom-doctools/dist/mk.config
  vendor/heirloom-doctools/dist/mpm/Makefile.mk
  vendor/heirloom-doctools/dist/pic/Makefile.mk
  vendor/heirloom-doctools/dist/picpack/Makefile.mk
  vendor/heirloom-doctools/dist/ptx/Makefile.mk
  vendor/heirloom-doctools/dist/refer/Makefile.mk
  vendor/heirloom-doctools/dist/refer/glue3.c
  vendor/heirloom-doctools/dist/soelim/Makefile.mk
  vendor/heirloom-doctools/dist/tbl/Makefile.mk
  vendor/heirloom-doctools/dist/troff/ext.h
  vendor/heirloom-doctools/dist/troff/libhnj/Makefile.mk
  vendor/heirloom-doctools/dist/troff/n1.c
  vendor/heirloom-doctools/dist/troff/n2.c
  vendor/heirloom-doctools/dist/troff/n5.c
  vendor/heirloom-doctools/dist/troff/nroff.d/Makefile.mk
  vendor/heirloom-doctools/dist/troff/troff.d/Makefile.mk
  vendor/heirloom-doctools/dist/troff/troff.d/devaps/Makefile.mk
  vendor/heirloom-doctools/dist/troff/troff.d/dhtml/Makefile.mk
  vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/Makefile.mk
  vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/dpost.c
  vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/ps_include.c
  vendor/heirloom-doctools/dist/troff/troff.d/draw.c
  vendor/heirloom-doctools/dist/troff/troff.d/font/Makefile.mk
  vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/Makefile.mk
  vendor/heirloom-doctools/dist/troff/troff.d/t10.c
  vendor/heirloom-doctools/dist/version.mk
  vendor/heirloom-doctools/dist/vgrind/Makefile.mk

Modified: vendor/heirloom-doctools/dist/checknr/Makefile.mk
==
--- vendor/heirloom-doctools/dist/checknr/Makefile.mk   Tue Oct 25 16:06:28 
2016(r307920)
+++ vendor/heirloom-doctools/dist/checknr/Makefile.mk   Tue Oct 25 16:12:45 
2016(r307921)
@@ -3,12 +3,12 @@ OBJ = checknr.o
 FLAGS = $(DEFINES) -I../include
 
 .c.o:
-   $(CC) $(CFLAGS) $(WARN) $(CPPFLAGS) $(FLAGS) -c $<
+   $(CC) $(_CFLAGS) $(FLAGS) -c $<
 
 all: checknr
 
 checknr: $(OBJ)
-   $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) $(LIBS) -o checknr
+   $(CC) $(_CFLAGS) $(_LDFLAGS) $(OBJ) $(LIBS) -o checknr
 
 install:
$(INSTALL) -c checknr $(ROOT)$(BINDIR)/checknr

Modified: vendor/heirloom-doctools/dist/col/Makefile.mk
==
--- vendor/heirloom-doctools/dist/col/Makefile.mk   Tue Oct 25 16:06:28 
2016(r307920)
+++ vendor/heirloom-doctools/dist/col/Makefile.mk   Tue Oct 25 16:12:45 
2016(r307921)
@@ -7,7 +7,7 @@ FLAGS = $(DEFINES) -I../include
 all: $(BIN)
 
 $(BIN): $(OBJ)
-   $(CC) ${CFLAGS} $(LDFLAGS) $(OBJ) -o $(BIN)
+   $(CC) ${_CFLAGS} $(_LDFLAGS) $(OBJ) -o $(BIN)
 
 install:
$(INSTALL) -c $(BIN) $(ROOT)$(BINDIR)/$(BIN)
@@ -19,4 +19,4 @@ clean:
 mrproper: clean
 
 .c.o:
-   ${CC} ${CFLAGS} ${CPPFLAGS} $(FLAGS) -c $<
+   ${CC} ${_CFLAGS} $(FLAGS) -c $<

Modified: vendor/heirloom-doctools/dist/configure
==
--- vendor/heirloom-doctools/dist/configure Tue Oct 25 16:06:28 2016
(r307920)
+++ vendor/heirloom-doctools/dist/configure Tue Oct 25 16:12:45 2016
(r307921)
@@ -86,7 +86,7 @@ gen_mk () {
[ -n "$LIB_AVLBST" ] && echo "LIB_AVLBST=$LIB_AVLBST" >> $OUTMK
[ -n "$LIB_LEX" ] && echo "LIB_LEX=$LIB_LEX" >> $OUTMK
[ -n "$__CDBG" ] && echo "__CDBG=$__CDBG" >> $OUTMK
-   [ -n "$__SAN" ] && echo "__SAN=$__SAN" >> $OUTMK
+   [ -n "$__CLDBG" ] && echo "__CLDBG=$__CLDBG" >> $OUTMK
cat $INMK >> $OUTMK || exit 1
 }
 check_make () {
@@ -225,6 +225,7 @@ rm -f $LOG
 gen_mk
 
 check_make
+#check_Sanitizer
 check_lex
 check_strlcpy
 check_strlcat

Modified: vendor/heirloom-doctools/dist/eqn/checkeq.d/Makefile.mk
==
--- vendor/heirloom-doctools/dist/eqn/checkeq.d/Makefile.mk Tue Oct 25 
16:06:28 2016(r307920)
+++ vendor/heirloom-doctools/dist/eqn/checkeq.d/Makefile.mk Tue Oct 25 
16:12:45 2016(r307921)
@@ -4,12 +4,12 @@ OBJ = checkeq.o
 FLAGS =
 
 .c.o:
-   $(CC) $(CFLAGS) $(WARN

svn commit: r307919 - stable/11/usr.sbin/bhyve

2016-10-25 Thread Baptiste Daroussin
Author: bapt
Date: Tue Oct 25 15:21:20 2016
New Revision: 307919
URL: https://svnweb.freebsd.org/changeset/base/307919

Log:
  accept4 actually expect SOCK_NONBLOCK and not O_NONBLOCK
  
  Reported by:jhb
  Pointyhat to:   bapt

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

Modified: stable/11/usr.sbin/bhyve/dbgport.c
==
--- stable/11/usr.sbin/bhyve/dbgport.c  Tue Oct 25 15:21:08 2016
(r307918)
+++ stable/11/usr.sbin/bhyve/dbgport.c  Tue Oct 25 15:21:20 2016
(r307919)
@@ -73,7 +73,7 @@ again:
printf("Waiting for connection from gdb\r\n");
printonce = 1;
}
-   conn_fd = accept4(listen_fd, NULL, NULL, O_NONBLOCK);
+   conn_fd = accept4(listen_fd, NULL, NULL, SOCK_NONBLOCK);
if (conn_fd < 0 && errno != EINTR)
perror("accept");
}
___
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: r307918 - head/sys/arm/allwinner/clk

2016-10-25 Thread Emmanuel Vadot
Author: manu
Date: Tue Oct 25 15:21:08 2016
New Revision: 307918
URL: https://svnweb.freebsd.org/changeset/base/307918

Log:
  allwinner A10 Pll1 allow changing freq
  
  PLL1 is used by the cpu core, allowing changing freq is needed for cpufreq.
  The factors table contains all the frequencies in the operating point table
  present in the DTS.
  
  MFC after:1 week

Modified:
  head/sys/arm/allwinner/clk/aw_pll.c

Modified: head/sys/arm/allwinner/clk/aw_pll.c
==
--- head/sys/arm/allwinner/clk/aw_pll.c Tue Oct 25 15:20:06 2016
(r307917)
+++ head/sys/arm/allwinner/clk/aw_pll.c Tue Oct 25 15:21:08 2016
(r307918)
@@ -192,6 +192,16 @@ struct aw_pll_factor {
 #definePLLFACTOR(_n, _k, _m, _p, _freq)\
{ .n = (_n), .k = (_k), .m = (_m), .p = (_p), .freq = (_freq) }
 
+static struct aw_pll_factor aw_a10_pll1_factors[] = {
+   PLLFACTOR(6, 0, 0, 0, 14400),
+   PLLFACTOR(12, 0, 0, 0, 31200),
+   PLLFACTOR(21, 0, 0, 0, 52800),
+   PLLFACTOR(29, 0, 0, 0, 72000),
+   PLLFACTOR(18, 1, 0, 0, 86400),
+   PLLFACTOR(19, 1, 0, 0, 91200),
+   PLLFACTOR(20, 1, 0, 0, 96000),
+};
+
 static struct aw_pll_factor aw_a23_pll1_factors[] = {
PLLFACTOR(9, 0, 0, 2, 6000),
PLLFACTOR(10, 0, 0, 2, 6600),
@@ -300,6 +310,47 @@ struct aw_pll_funcs {
 #defineDEVICE_UNLOCK(sc)   CLKDEV_DEVICE_UNLOCK((sc)->clkdev)
 
 static int
+a10_pll1_init(device_t dev, bus_addr_t reg, struct clknode_init_def *def)
+{
+   /* Allow changing PLL frequency while enabled */
+   def->flags = CLK_NODE_GLITCH_FREE;
+
+   return (0);
+}
+
+static int
+a10_pll1_set_freq(struct aw_pll_sc *sc, uint64_t fin, uint64_t *fout,
+int flags)
+{
+   struct aw_pll_factor *f;
+   uint32_t val;
+   int n;
+
+   f = NULL;
+   for (n = 0; n < nitems(aw_a10_pll1_factors); n++) {
+   if (aw_a10_pll1_factors[n].freq == *fout) {
+   f = _a10_pll1_factors[n];
+   break;
+   }
+   }
+   if (f == NULL)
+   return (EINVAL);
+
+   DEVICE_LOCK(sc);
+   PLL_READ(sc, );
+   val &= ~(A10_PLL1_FACTOR_N|A10_PLL1_FACTOR_K|A10_PLL1_FACTOR_M|
+   A10_PLL1_OUT_EXT_DIVP);
+   val |= (f->p << A10_PLL1_OUT_EXT_DIVP_SHIFT);
+   val |= (f->n << A10_PLL1_FACTOR_N_SHIFT);
+   val |= (f->k << A10_PLL1_FACTOR_K_SHIFT);
+   val |= (f->m << A10_PLL1_FACTOR_M_SHIFT);
+   PLL_WRITE(sc, val);
+   DEVICE_UNLOCK(sc);
+
+   return (0);
+}
+
+static int
 a10_pll1_recalc(struct aw_pll_sc *sc, uint64_t *freq)
 {
uint32_t val, m, n, k, p;
@@ -948,7 +999,7 @@ a83t_pllcpux_set_freq(struct aw_pll_sc *
}
 
 static struct aw_pll_funcs aw_pll_func[] = {
-   PLL(AWPLL_A10_PLL1, a10_pll1_recalc, NULL, NULL),
+   PLL(AWPLL_A10_PLL1, a10_pll1_recalc, a10_pll1_set_freq, a10_pll1_init),
PLL(AWPLL_A10_PLL2, a10_pll2_recalc, a10_pll2_set_freq, NULL),
PLL(AWPLL_A10_PLL3, a10_pll3_recalc, a10_pll3_set_freq, a10_pll3_init),
PLL(AWPLL_A10_PLL5, a10_pll5_recalc, NULL, NULL),
___
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: r307917 - head/usr.sbin/bhyve

2016-10-25 Thread Baptiste Daroussin
Author: bapt
Date: Tue Oct 25 15:20:06 2016
New Revision: 307917
URL: https://svnweb.freebsd.org/changeset/base/307917

Log:
  accept4 actually expect SOCK_NONBLOCK and not O_NONBLOCK
  
  Reported by:  jhb
  Pointyhat to: bapt

Modified:
  head/usr.sbin/bhyve/dbgport.c

Modified: head/usr.sbin/bhyve/dbgport.c
==
--- head/usr.sbin/bhyve/dbgport.c   Tue Oct 25 14:58:49 2016
(r307916)
+++ head/usr.sbin/bhyve/dbgport.c   Tue Oct 25 15:20:06 2016
(r307917)
@@ -73,7 +73,7 @@ again:
printf("Waiting for connection from gdb\r\n");
printonce = 1;
}
-   conn_fd = accept4(listen_fd, NULL, NULL, O_NONBLOCK);
+   conn_fd = accept4(listen_fd, NULL, NULL, SOCK_NONBLOCK);
if (conn_fd < 0 && errno != EINTR)
perror("accept");
}
___
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: r307861 - in head: contrib/libarchive contrib/libarchive/cat/test contrib/libarchive/cpio/test contrib/libarchive/libarchive contrib/libarchive/libarchive/test contrib/libarchive/tar/t

2016-10-25 Thread Shawn Webb
On Mon, Oct 24, 2016 at 02:08:06PM +, Martin Matuska wrote:
> Author: mm
> Date: Mon Oct 24 14:08:05 2016
> New Revision: 307861
> URL: https://svnweb.freebsd.org/changeset/base/307861
> 
> Log:
>   MFV r307859:
>   Update libarchive to 3.2.2

Hey Martin,

Thanks for doing this upgrade! Any plans to MFC?

Thanks,

-- 
Shawn Webb
Cofounder and Security Engineer
HardenedBSD

GPG Key ID:  0x6A84658F52456EEE
GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89  3D9E 6A84 658F 5245 6EEE


signature.asc
Description: PGP signature


svn commit: r307916 - stable/11/sys/boot/efi

2016-10-25 Thread Baptiste Daroussin
Author: bapt
Date: Tue Oct 25 14:58:49 2016
New Revision: 307916
URL: https://svnweb.freebsd.org/changeset/base/307916

Log:
  MFC r307787:
  
  Fix typo in the COMPILER_VERSION check
  
  PR:   213120
  Submitted by: Yuta Satoh 

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

Modified: stable/11/sys/boot/efi/Makefile
==
--- stable/11/sys/boot/efi/Makefile Tue Oct 25 14:56:42 2016
(r307915)
+++ stable/11/sys/boot/efi/Makefile Tue Oct 25 14:58:49 2016
(r307916)
@@ -4,7 +4,7 @@
 
 # In-tree GCC does not support __attribute__((ms_abi)), but gcc newer
 # than 4.5 supports it.
-.if ${COMPILER_TYPE} != "gcc" || ${COMPILER_VERSION} >= 404500
+.if ${COMPILER_TYPE} != "gcc" || ${COMPILER_VERSION} >= 40500
 
 .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm"
 .if ${MK_FDT} != "no"
@@ -18,6 +18,6 @@ SUBDIR+=  fdt
 SUBDIR+=   libefi loader boot1
 .endif
 
-.endif # ${COMPILER_TYPE} != "gcc" || ${COMPILER_VERSION} >= 404500
+.endif # ${COMPILER_TYPE} != "gcc" || ${COMPILER_VERSION} >= 40500
 
 .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: r307915 - in stable/11: etc/rc.d tools/build/mk

2016-10-25 Thread Baptiste Daroussin
Author: bapt
Date: Tue Oct 25 14:56:42 2016
New Revision: 307915
URL: https://svnweb.freebsd.org/changeset/base/307915

Log:
  MFC r307786:
  
  Do not install NIS program rc script if WITHOUT_NIS is set
  
  PR:   213375
  Submitted by: ser...@akhmatov.ru

Modified:
  stable/11/etc/rc.d/Makefile
  stable/11/tools/build/mk/OptionalObsoleteFiles.inc
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/etc/rc.d/Makefile
==
--- stable/11/etc/rc.d/Makefile Tue Oct 25 14:55:03 2016(r307914)
+++ stable/11/etc/rc.d/Makefile Tue Oct 25 14:56:42 2016(r307915)
@@ -118,14 +118,17 @@ FILES=DAEMON \
ugidfw \
${_utx} \
var \
-   watchdogd \
-   ypbind \
+   watchdogd
+
+.if ${MK_NIS} != "no"
+FILES+=ypbind \
ypldap \
yppasswdd \
ypserv \
ypset \
ypupdated \
ypxfrd
+.endif
 
 .if ${MK_ACCT} != "no"
 FILESGROUPS+=  ACCT

Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc
==
--- stable/11/tools/build/mk/OptionalObsoleteFiles.inc  Tue Oct 25 14:55:03 
2016(r307914)
+++ stable/11/tools/build/mk/OptionalObsoleteFiles.inc  Tue Oct 25 14:56:42 
2016(r307915)
@@ -6059,6 +6059,13 @@ OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-N
 .endif
 
 .if ${MK_NIS} == no
+OLD_FILES+=etc/rc.d/ypbind
+OLD_FILES+=etc/rc.d/ypldap
+OLD_FILES+=etc/rc.d/yppasswdd
+OLD_FILES+=etc/rc.d/ypserv
+OLD_FILES+=etc/rc.d/ypset
+OLD_FILES+=etc/rc.d/ypupdated
+OLD_FILES+=etc/rc.d/ypxfrd
 OLD_FILES+=usr/bin/ypcat
 OLD_FILES+=usr/bin/ypchfn
 OLD_FILES+=usr/bin/ypchpass
___
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: r307914 - stable/9/contrib/tzdata

2016-10-25 Thread Baptiste Daroussin
Author: bapt
Date: Tue Oct 25 14:55:03 2016
New Revision: 307914
URL: https://svnweb.freebsd.org/changeset/base/307914

Log:
  MFC r307783:
  
  Import tzdata 2016h

Modified:
  stable/9/contrib/tzdata/asia
  stable/9/contrib/tzdata/australasia
  stable/9/contrib/tzdata/europe
  stable/9/contrib/tzdata/northamerica
Directory Properties:
  stable/9/   (props changed)
  stable/9/contrib/   (props changed)
  stable/9/contrib/tzdata/   (props changed)

Modified: stable/9/contrib/tzdata/asia
==
--- stable/9/contrib/tzdata/asiaTue Oct 25 14:53:50 2016
(r307913)
+++ stable/9/contrib/tzdata/asiaTue Oct 25 14:55:03 2016
(r307914)
@@ -2544,11 +2544,6 @@ Zone Asia/Karachi4:28:12 -   LMT 1907
 # From Paul Eggert (2015-03-03):
 # http://www.timeanddate.com/time/change/west-bank/ramallah?year=2014
 # says that the fall 2014 transition was Oct 23 at 24:00.
-# For future dates, guess the last Friday in March at 24:00 through
-# the first Friday on or after October 21 at 00:00.  This is consistent with
-# the predictions in today's editions of the following URLs:
-# http://www.timeanddate.com/time/change/gaza-strip/gaza
-# http://www.timeanddate.com/time/change/west-bank/hebron
 
 # From Hannah Kreitem (2016-03-09):
 # http://www.palestinecabinet.gov.ps/WebSite/ar/ViewDetails?ID=31728
@@ -2558,7 +2553,21 @@ Zone Asia/Karachi4:28:12 -   LMT 1907
 #
 # From Paul Eggert (2016-03-12):
 # Predict spring transitions on March's last Saturday at 01:00 from now on.
-# Leave fall predictions alone for now.
+
+# From Sharef Mustafa (2016-10-19):
+# [T]he Palestinian cabinet decision (Mar 8th 2016) published on
+# 
http://www.palestinecabinet.gov.ps/WebSite/Upload/Decree/GOV_17/16032016134830.pdf
+# states that summer time will end on Oct 29th at 01:00.
+#
+# From Tim Parenti (2016-10-19):
+# Predict fall transitions on October's last Saturday at 01:00 from now on.
+# This is consistent with the 2016 transition as well as our spring
+# predictions.
+#
+# From Paul Eggert (2016-10-19):
+# It's also consistent with predictions in the following URLs today:
+# http://www.timeanddate.com/time/change/gaza-strip/gaza
+# http://www.timeanddate.com/time/change/west-bank/hebron
 
 # Rule NAMEFROMTO  TYPEIN  ON  AT  SAVELETTER/S
 Rule EgyptAsia 1957only-   May 10  0:001:00S
@@ -2587,9 +2596,10 @@ Rule Palestine   2011only-   Sep 30  
0:000
 Rule Palestine 20122014-   Mar lastThu 24:00   1:00S
 Rule Palestine 2012only-   Sep 21  1:000   -
 Rule Palestine 2013only-   Sep Fri>=21 0:000   -
-Rule Palestine 2014max -   Oct Fri>=21 0:000   -
+Rule Palestine 20142015-   Oct Fri>=21 0:000   -
 Rule Palestine 2015only-   Mar lastFri 24:00   1:00S
 Rule Palestine 2016max -   Mar lastSat 1:001:00S
+Rule Palestine 2016max -   Oct lastSat 1:000   -
 
 # Zone NAMEGMTOFF  RULES   FORMAT  [UNTIL]
 Zone   Asia/Gaza   2:17:52 -   LMT 1900 Oct
@@ -2739,45 +2749,31 @@ ZoneAsia/Singapore  6:55:25 -   LMT 1901 J
 # People who live in regions under Tamil control can use [TZ='Asia/Kolkata'],
 # as that zone has agreed with the Tamil areas since our cutoff date of 1970.
 
-# From K Sethu (2006-04-25):
-# I think the abbreviation LKT originated from the world of computers at
-# the time of or subsequent to the time zone changes by SL Government
-# twice in 1996 and probably SL Government or its standardization
-# agencies never declared an abbreviation as a national standard.
-#
-# I recollect before the recent change the government announcements
-# mentioning it as simply changing Sri Lanka Standard Time or Sri Lanka
-# Time and no mention was made about the abbreviation.
-#
-# If we look at Sri Lanka Department of Government's "Official News
-# Website of Sri Lanka" ... http://www.news.lk/ we can see that they
-# use SLT as abbreviation in time stamp at the beginning of each news
-# item
-#
-# Within Sri Lanka I think LKT is well known among computer users and
-# administrators.  In my opinion SLT may not be a good choice because the
-# nation's largest telcom / internet operator Sri Lanka Telcom is well
-# known by that abbreviation - simply as SLT (there IP domains are
-# slt.lk and sltnet.lk).
-#
-# But if indeed our government has adopted SLT as standard abbreviation
-# (that we have not known so far) then  it is better that it be used for
-# all computers.
-
-# From Paul Eggert (2006-04-25):
-# One possibility is that we wait for a bit for the dust to settle down
-# and then see what people actually say in practice.
+# From Sadika Sumanapala (2016-10-19):
+# According to http://www.sltime.org (maintained by Measurement 

svn commit: r307913 - stable/10/contrib/tzdata

2016-10-25 Thread Baptiste Daroussin
Author: bapt
Date: Tue Oct 25 14:53:50 2016
New Revision: 307913
URL: https://svnweb.freebsd.org/changeset/base/307913

Log:
  MFC r307783:
  
  Import tzdata 2016h

Modified:
  stable/10/contrib/tzdata/asia
  stable/10/contrib/tzdata/australasia
  stable/10/contrib/tzdata/europe
  stable/10/contrib/tzdata/northamerica
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/tzdata/asia
==
--- stable/10/contrib/tzdata/asia   Tue Oct 25 14:52:14 2016
(r307912)
+++ stable/10/contrib/tzdata/asia   Tue Oct 25 14:53:50 2016
(r307913)
@@ -2544,11 +2544,6 @@ Zone Asia/Karachi4:28:12 -   LMT 1907
 # From Paul Eggert (2015-03-03):
 # http://www.timeanddate.com/time/change/west-bank/ramallah?year=2014
 # says that the fall 2014 transition was Oct 23 at 24:00.
-# For future dates, guess the last Friday in March at 24:00 through
-# the first Friday on or after October 21 at 00:00.  This is consistent with
-# the predictions in today's editions of the following URLs:
-# http://www.timeanddate.com/time/change/gaza-strip/gaza
-# http://www.timeanddate.com/time/change/west-bank/hebron
 
 # From Hannah Kreitem (2016-03-09):
 # http://www.palestinecabinet.gov.ps/WebSite/ar/ViewDetails?ID=31728
@@ -2558,7 +2553,21 @@ Zone Asia/Karachi4:28:12 -   LMT 1907
 #
 # From Paul Eggert (2016-03-12):
 # Predict spring transitions on March's last Saturday at 01:00 from now on.
-# Leave fall predictions alone for now.
+
+# From Sharef Mustafa (2016-10-19):
+# [T]he Palestinian cabinet decision (Mar 8th 2016) published on
+# 
http://www.palestinecabinet.gov.ps/WebSite/Upload/Decree/GOV_17/16032016134830.pdf
+# states that summer time will end on Oct 29th at 01:00.
+#
+# From Tim Parenti (2016-10-19):
+# Predict fall transitions on October's last Saturday at 01:00 from now on.
+# This is consistent with the 2016 transition as well as our spring
+# predictions.
+#
+# From Paul Eggert (2016-10-19):
+# It's also consistent with predictions in the following URLs today:
+# http://www.timeanddate.com/time/change/gaza-strip/gaza
+# http://www.timeanddate.com/time/change/west-bank/hebron
 
 # Rule NAMEFROMTO  TYPEIN  ON  AT  SAVELETTER/S
 Rule EgyptAsia 1957only-   May 10  0:001:00S
@@ -2587,9 +2596,10 @@ Rule Palestine   2011only-   Sep 30  
0:000
 Rule Palestine 20122014-   Mar lastThu 24:00   1:00S
 Rule Palestine 2012only-   Sep 21  1:000   -
 Rule Palestine 2013only-   Sep Fri>=21 0:000   -
-Rule Palestine 2014max -   Oct Fri>=21 0:000   -
+Rule Palestine 20142015-   Oct Fri>=21 0:000   -
 Rule Palestine 2015only-   Mar lastFri 24:00   1:00S
 Rule Palestine 2016max -   Mar lastSat 1:001:00S
+Rule Palestine 2016max -   Oct lastSat 1:000   -
 
 # Zone NAMEGMTOFF  RULES   FORMAT  [UNTIL]
 Zone   Asia/Gaza   2:17:52 -   LMT 1900 Oct
@@ -2739,45 +2749,31 @@ ZoneAsia/Singapore  6:55:25 -   LMT 1901 J
 # People who live in regions under Tamil control can use [TZ='Asia/Kolkata'],
 # as that zone has agreed with the Tamil areas since our cutoff date of 1970.
 
-# From K Sethu (2006-04-25):
-# I think the abbreviation LKT originated from the world of computers at
-# the time of or subsequent to the time zone changes by SL Government
-# twice in 1996 and probably SL Government or its standardization
-# agencies never declared an abbreviation as a national standard.
-#
-# I recollect before the recent change the government announcements
-# mentioning it as simply changing Sri Lanka Standard Time or Sri Lanka
-# Time and no mention was made about the abbreviation.
-#
-# If we look at Sri Lanka Department of Government's "Official News
-# Website of Sri Lanka" ... http://www.news.lk/ we can see that they
-# use SLT as abbreviation in time stamp at the beginning of each news
-# item
-#
-# Within Sri Lanka I think LKT is well known among computer users and
-# administrators.  In my opinion SLT may not be a good choice because the
-# nation's largest telcom / internet operator Sri Lanka Telcom is well
-# known by that abbreviation - simply as SLT (there IP domains are
-# slt.lk and sltnet.lk).
-#
-# But if indeed our government has adopted SLT as standard abbreviation
-# (that we have not known so far) then  it is better that it be used for
-# all computers.
-
-# From Paul Eggert (2006-04-25):
-# One possibility is that we wait for a bit for the dust to settle down
-# and then see what people actually say in practice.
+# From Sadika Sumanapala (2016-10-19):
+# According to http://www.sltime.org (maintained by Measurement Units,
+# Standards & Services Department, Sri Lanka) abbreviation for Sri 

svn commit: r307912 - stable/11/contrib/tzdata

2016-10-25 Thread Baptiste Daroussin
Author: bapt
Date: Tue Oct 25 14:52:14 2016
New Revision: 307912
URL: https://svnweb.freebsd.org/changeset/base/307912

Log:
  MFC r307783:
  
  Import tzdata 2016h

Modified:
  stable/11/contrib/tzdata/asia
  stable/11/contrib/tzdata/australasia
  stable/11/contrib/tzdata/europe
  stable/11/contrib/tzdata/northamerica
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/contrib/tzdata/asia
==
--- stable/11/contrib/tzdata/asia   Tue Oct 25 14:42:09 2016
(r307911)
+++ stable/11/contrib/tzdata/asia   Tue Oct 25 14:52:14 2016
(r307912)
@@ -2544,11 +2544,6 @@ Zone Asia/Karachi4:28:12 -   LMT 1907
 # From Paul Eggert (2015-03-03):
 # http://www.timeanddate.com/time/change/west-bank/ramallah?year=2014
 # says that the fall 2014 transition was Oct 23 at 24:00.
-# For future dates, guess the last Friday in March at 24:00 through
-# the first Friday on or after October 21 at 00:00.  This is consistent with
-# the predictions in today's editions of the following URLs:
-# http://www.timeanddate.com/time/change/gaza-strip/gaza
-# http://www.timeanddate.com/time/change/west-bank/hebron
 
 # From Hannah Kreitem (2016-03-09):
 # http://www.palestinecabinet.gov.ps/WebSite/ar/ViewDetails?ID=31728
@@ -2558,7 +2553,21 @@ Zone Asia/Karachi4:28:12 -   LMT 1907
 #
 # From Paul Eggert (2016-03-12):
 # Predict spring transitions on March's last Saturday at 01:00 from now on.
-# Leave fall predictions alone for now.
+
+# From Sharef Mustafa (2016-10-19):
+# [T]he Palestinian cabinet decision (Mar 8th 2016) published on
+# 
http://www.palestinecabinet.gov.ps/WebSite/Upload/Decree/GOV_17/16032016134830.pdf
+# states that summer time will end on Oct 29th at 01:00.
+#
+# From Tim Parenti (2016-10-19):
+# Predict fall transitions on October's last Saturday at 01:00 from now on.
+# This is consistent with the 2016 transition as well as our spring
+# predictions.
+#
+# From Paul Eggert (2016-10-19):
+# It's also consistent with predictions in the following URLs today:
+# http://www.timeanddate.com/time/change/gaza-strip/gaza
+# http://www.timeanddate.com/time/change/west-bank/hebron
 
 # Rule NAMEFROMTO  TYPEIN  ON  AT  SAVELETTER/S
 Rule EgyptAsia 1957only-   May 10  0:001:00S
@@ -2587,9 +2596,10 @@ Rule Palestine   2011only-   Sep 30  
0:000
 Rule Palestine 20122014-   Mar lastThu 24:00   1:00S
 Rule Palestine 2012only-   Sep 21  1:000   -
 Rule Palestine 2013only-   Sep Fri>=21 0:000   -
-Rule Palestine 2014max -   Oct Fri>=21 0:000   -
+Rule Palestine 20142015-   Oct Fri>=21 0:000   -
 Rule Palestine 2015only-   Mar lastFri 24:00   1:00S
 Rule Palestine 2016max -   Mar lastSat 1:001:00S
+Rule Palestine 2016max -   Oct lastSat 1:000   -
 
 # Zone NAMEGMTOFF  RULES   FORMAT  [UNTIL]
 Zone   Asia/Gaza   2:17:52 -   LMT 1900 Oct
@@ -2739,45 +2749,31 @@ ZoneAsia/Singapore  6:55:25 -   LMT 1901 J
 # People who live in regions under Tamil control can use [TZ='Asia/Kolkata'],
 # as that zone has agreed with the Tamil areas since our cutoff date of 1970.
 
-# From K Sethu (2006-04-25):
-# I think the abbreviation LKT originated from the world of computers at
-# the time of or subsequent to the time zone changes by SL Government
-# twice in 1996 and probably SL Government or its standardization
-# agencies never declared an abbreviation as a national standard.
-#
-# I recollect before the recent change the government announcements
-# mentioning it as simply changing Sri Lanka Standard Time or Sri Lanka
-# Time and no mention was made about the abbreviation.
-#
-# If we look at Sri Lanka Department of Government's "Official News
-# Website of Sri Lanka" ... http://www.news.lk/ we can see that they
-# use SLT as abbreviation in time stamp at the beginning of each news
-# item
-#
-# Within Sri Lanka I think LKT is well known among computer users and
-# administrators.  In my opinion SLT may not be a good choice because the
-# nation's largest telcom / internet operator Sri Lanka Telcom is well
-# known by that abbreviation - simply as SLT (there IP domains are
-# slt.lk and sltnet.lk).
-#
-# But if indeed our government has adopted SLT as standard abbreviation
-# (that we have not known so far) then  it is better that it be used for
-# all computers.
-
-# From Paul Eggert (2006-04-25):
-# One possibility is that we wait for a bit for the dust to settle down
-# and then see what people actually say in practice.
+# From Sadika Sumanapala (2016-10-19):
+# According to http://www.sltime.org (maintained by Measurement Units,
+# Standards & Services Department, Sri Lanka) abbreviation for Sri 

svn commit: r307911 - head/sys/boot/efi/loader

2016-10-25 Thread Warner Losh
Author: imp
Date: Tue Oct 25 14:42:09 2016
New Revision: 307911
URL: https://svnweb.freebsd.org/changeset/base/307911

Log:
  Add better comment...

Modified:
  head/sys/boot/efi/loader/main.c

Modified: head/sys/boot/efi/loader/main.c
==
--- head/sys/boot/efi/loader/main.c Tue Oct 25 14:18:27 2016
(r307910)
+++ head/sys/boot/efi/loader/main.c Tue Oct 25 14:42:09 2016
(r307911)
@@ -56,7 +56,17 @@ extern char bootprog_date[];
 extern char bootprog_maker[];
 
 #ifdef BOOT_FORTH
-/* Force a reference to bring in EFI support from the library */
+/*
+ * Normally, efi.o from libefi.a would be brought in due to a function we call
+ * there that's defined there.  However, none of its functions are callable 
from
+ * here since it just adds words to the FORTH environment or implement those
+ * words. So, add a reference to a symbol in efi.o to force it to be be brought
+ * in so the init function there gets added to the "compile" linker set happens
+ * correctly.
+ *
+ * This assumes there's no global analysys that notices dummy1 isn't used
+ * anywhere and tries to eliminate it.
+ */
 extern int efi_variable_support;
 int *dummy1 = _variable_support;
 #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: r307910 - in head/sys: arm64/arm64 dev/psci

2016-10-25 Thread Andrew Turner
Author: andrew
Date: Tue Oct 25 14:18:27 2016
New Revision: 307910
URL: https://svnweb.freebsd.org/changeset/base/307910

Log:
  Create a new PSCI error code and use it to signal that starting the CPU is
  impossible as the PSCI firmware is missing.
  
  Sponsored by: ABT Systmes Ltd

Modified:
  head/sys/arm64/arm64/mp_machdep.c
  head/sys/dev/psci/psci.c
  head/sys/dev/psci/psci.h

Modified: head/sys/arm64/arm64/mp_machdep.c
==
--- head/sys/arm64/arm64/mp_machdep.c   Tue Oct 25 14:04:35 2016
(r307909)
+++ head/sys/arm64/arm64/mp_machdep.c   Tue Oct 25 14:18:27 2016
(r307910)
@@ -461,9 +461,13 @@ cpu_init_fdt(u_int id, phandle_t node, u
 
err = psci_cpu_on(target_cpu, pa, cpuid);
if (err != PSCI_RETVAL_SUCCESS) {
-   /* Panic here if INVARIANTS are enabled */
-   KASSERT(0, ("Failed to start CPU %u (%lx)\n", id,
-   target_cpu));
+   /*
+* Panic here if INVARIANTS are enabled and PSCI failed to
+* start the requested CPU. If psci_cpu_on returns PSCI_MISSING
+* to indicate we are unable to use it to start the given CPU.
+*/
+   KASSERT(err == PSCI_MISSING,
+   ("Failed to start CPU %u (%lx)\n", id, target_cpu));
 
pcpu_destroy(pcpup);
kmem_free(kernel_arena, (vm_offset_t)dpcpu[cpuid - 1],

Modified: head/sys/dev/psci/psci.c
==
--- head/sys/dev/psci/psci.cTue Oct 25 14:04:35 2016(r307909)
+++ head/sys/dev/psci/psci.cTue Oct 25 14:18:27 2016(r307910)
@@ -189,12 +189,12 @@ psci_cpu_on(unsigned long cpu, unsigned 
node = ofw_bus_find_compatible(OF_peer(0), "arm,psci-0.2");
if (node == 0)
/* TODO: Handle psci 0.1 */
-   return (PSCI_RETVAL_INTERNAL_FAILURE);
+   return (PSCI_MISSING);
 
fnid = PSCI_FNID_CPU_ON;
callfn = psci_get_callfn(node);
if (callfn == NULL)
-   return (PSCI_RETVAL_INTERNAL_FAILURE);
+   return (PSCI_MISSING);
} else {
callfn = psci_softc->psci_call;
fnid = psci_softc->psci_fnids[PSCI_FN_CPU_ON];

Modified: head/sys/dev/psci/psci.h
==
--- head/sys/dev/psci/psci.hTue Oct 25 14:04:35 2016(r307909)
+++ head/sys/dev/psci/psci.hTue Oct 25 14:18:27 2016(r307910)
@@ -54,6 +54,10 @@ int  psci_smc_despatch(register_t, regist
 #definePSCI_RETVAL_INTERNAL_FAILURE-6
 #definePSCI_RETVAL_NOT_PRESENT -7
 #definePSCI_RETVAL_DISABLED-8
+/*
+ * Used to signal PSCI is not available, e.g. to start a CPU.
+ */
+#definePSCI_MISSING1
 
 /*
  * PSCI function codes (as per PSCI v0.2).
___
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: r307909 - in head/sys: arm64/arm64 conf

2016-10-25 Thread Andrew Turner
Author: andrew
Date: Tue Oct 25 14:04:35 2016
New Revision: 307909
URL: https://svnweb.freebsd.org/changeset/base/307909

Log:
  Import the Cortex String memcpy and memmove into the kernel. On ThunderX
  these show a 9-10% reduction in user and system time for a buildworld -j48.
  
  Obtained from:ABT Systems Ltd
  MFC after:1 week
  Sponsored by: The FreeBSD Foundation

Added:
  head/sys/arm64/arm64/memcpy.S
 - copied, changed from r307901, 
head/contrib/cortex-strings/src/aarch64/memcpy.S
  head/sys/arm64/arm64/memmove.S
 - copied, changed from r307901, 
head/contrib/cortex-strings/src/aarch64/memmove.S
Deleted:
  head/sys/arm64/arm64/bcopy.c
Modified:
  head/sys/conf/files.arm64

Copied and modified: head/sys/arm64/arm64/memcpy.S (from r307901, 
head/contrib/cortex-strings/src/aarch64/memcpy.S)
==
--- head/contrib/cortex-strings/src/aarch64/memcpy.STue Oct 25 05:45:47 
2016(r307901, copy source)
+++ head/sys/arm64/arm64/memcpy.S   Tue Oct 25 14:04:35 2016
(r307909)
@@ -52,6 +52,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include 
+__FBSDID("$FreeBSD$");
+
 /* Assumptions:
  *
  * ARMv8-a, AArch64, unaligned accesses.
@@ -83,14 +86,6 @@
 
 #define L(l) .L ## l
 
-   .macro def_fn f p2align=0
-   .text
-   .p2align \p2align
-   .global \f
-   .type \f, %function
-\f:
-   .endm
-
 /* Copies are split into 3 main cases: small copies of up to 16 bytes,
medium copies of 17..96 bytes which are fully unrolled. Large copies
of more than 96 bytes align the destination and use an unrolled loop
@@ -100,7 +95,7 @@
well as non-overlapping copies.
 */
 
-def_fn memcpy p2align=6
+ENTRY(memcpy)
prfmPLDL1KEEP, [src]
add srcend, src, count
add dstend, dstin, count
@@ -221,5 +216,4 @@ L(copy_long):
stp B_l, B_h, [dstend, -32]
stp C_l, C_h, [dstend, -16]
ret
-
-   .size   memcpy, . - memcpy
+END(memcpy)

Copied and modified: head/sys/arm64/arm64/memmove.S (from r307901, 
head/contrib/cortex-strings/src/aarch64/memmove.S)
==
--- head/contrib/cortex-strings/src/aarch64/memmove.S   Tue Oct 25 05:45:47 
2016(r307901, copy source)
+++ head/sys/arm64/arm64/memmove.S  Tue Oct 25 14:04:35 2016
(r307909)
@@ -52,19 +52,14 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include 
+__FBSDID("$FreeBSD$");
+
 /* Assumptions:
  *
  * ARMv8-a, AArch64, unaligned accesses
  */
 
-   .macro def_fn f p2align=0
-   .text
-   .p2align \p2align
-   .global \f
-   .type \f, %function
-\f:
-   .endm
-
 /* Parameters and result.  */
 #define dstin  x0
 #define srcx1
@@ -89,7 +84,12 @@
unrolled loop processes 64 bytes per iteration.
 */
 
-def_fn memmove, 6
+ENTRY(bcopy)
+   /* Switch the input pointers when called as bcopy */
+   mov x3, x1
+   mov x1, x0
+   mov x0, x3
+EENTRY(memmove)
sub tmp1, dstin, src
cmp count, 96
ccmptmp1, count, 2, hi
@@ -146,5 +146,5 @@ def_fn memmove, 6
stp B_l, B_h, [dstin, 16]
stp C_l, C_h, [dstin]
 3: ret
-
-   .size   memmove, . - memmove
+EEND(memmove)
+END(bcopy)

Modified: head/sys/conf/files.arm64
==
--- head/sys/conf/files.arm64   Tue Oct 25 14:01:13 2016(r307908)
+++ head/sys/conf/files.arm64   Tue Oct 25 14:04:35 2016(r307909)
@@ -72,7 +72,6 @@ arm64/acpica/OsdEnvironment.c optionala
 arm64/acpica/acpi_wakeup.c optionalacpi
 arm64/acpica/pci_cfgreg.c  optionalacpipci
 arm64/arm64/autoconf.c standard
-arm64/arm64/bcopy.cstandard
 arm64/arm64/bus_machdep.c  standard
 arm64/arm64/bus_space_asm.Sstandard
 arm64/arm64/busdma_bounce.cstandard
@@ -98,6 +97,8 @@ arm64/arm64/in_cksum.coptionalinet | 
 arm64/arm64/locore.S   standardno-obj
 arm64/arm64/machdep.c  standard
 arm64/arm64/mem.c  standard
+arm64/arm64/memcpy.S   standard
+arm64/arm64/memmove.S  standard
 arm64/arm64/minidump_machdep.c standard
 arm64/arm64/mp_machdep.c   optionalsmp
 arm64/arm64/nexus.cstandard
@@ -178,7 +179,6 @@ libkern/ffsll.c standard
 libkern/fls.c  standard
 libkern/flsl.c standard
 libkern/flsll.cstandard
-libkern/memmove.c  standard
 libkern/memset.c   standard
 cddl/contrib/opensolaris/common/atomic/aarch64/opensolaris_atomic.S
optional zfs | dtrace compile-with "${CDDL_C}"
 cddl/dev/dtrace/aarch64/dtrace_asm.S   optional dtrace 
compile-with 

svn commit: r307908 - in head/sys/boot/efi: libefi loader

2016-10-25 Thread Andrew Turner
Author: andrew
Date: Tue Oct 25 14:01:13 2016
New Revision: 307908
URL: https://svnweb.freebsd.org/changeset/base/307908

Log:
  Fix the build on both arm64 and when WITHOUT_FORTH is defined.
  
   * On arm64 we need to use the ${MACHINE_CPUARCH} subdirectory.
   * env.c is only needed when using forth so only build it there.
  
  Sponsored by: ABT Systems Ltd

Modified:
  head/sys/boot/efi/libefi/Makefile
  head/sys/boot/efi/loader/main.c

Modified: head/sys/boot/efi/libefi/Makefile
==
--- head/sys/boot/efi/libefi/Makefile   Tue Oct 25 13:45:59 2016
(r307907)
+++ head/sys/boot/efi/libefi/Makefile   Tue Oct 25 14:01:13 2016
(r307908)
@@ -1,10 +1,12 @@
 # $FreeBSD$
 
+.include 
+
 LIB=   efi
 INTERNALLIB=
 WARNS?=2
 
-SRCS=  delay.c devpath.c efi_console.c efinet.c efipart.c env.c errno.c \
+SRCS=  delay.c devpath.c efi_console.c efinet.c efipart.c errno.c \
handles.c libefi.c
 
 .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
@@ -12,6 +14,11 @@ SRCS+=   time.c
 .elif ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm"
 SRCS+= time_event.c
 .endif
+.if ${MK_FORTH} != "no"
+SRCS+= env.c
+CFLAGS+= -I${.CURDIR}/../../ficl
+CFLAGS+= -I${.CURDIR}/../../ficl/${MACHINE_CPUARCH}
+.endif
 
 # We implement a slightly non-standard %S in that it always takes a
 # CHAR16 that's common in UEFI-land instead of a wchar_t. This only
@@ -26,7 +33,6 @@ CFLAGS+=  -msoft-float -mgeneral-regs-onl
 .if ${MACHINE_ARCH} == "amd64"
 CFLAGS+= -fPIC -mno-red-zone
 .endif
-CFLAGS+= -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/${MACHINE}
 CFLAGS+= -I${.CURDIR}/../include
 CFLAGS+= -I${.CURDIR}/../include/${MACHINE}
 CFLAGS+= -I${.CURDIR}/../../../../lib/libstand

Modified: head/sys/boot/efi/loader/main.c
==
--- head/sys/boot/efi/loader/main.c Tue Oct 25 13:45:59 2016
(r307907)
+++ head/sys/boot/efi/loader/main.c Tue Oct 25 14:01:13 2016
(r307908)
@@ -55,9 +55,11 @@ extern char bootprog_rev[];
 extern char bootprog_date[];
 extern char bootprog_maker[];
 
+#ifdef BOOT_FORTH
 /* Force a reference to bring in EFI support from the library */
 extern int efi_variable_support;
 int *dummy1 = _variable_support;
+#endif
 
 struct arch_switch archsw; /* MI/MD interface boundary */
 
___
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: r307906 - stable/10/sys/netinet

2016-10-25 Thread Julien Charbon
Author: jch
Date: Tue Oct 25 12:58:36 2016
New Revision: 307906
URL: https://svnweb.freebsd.org/changeset/base/307906

Log:
  MFC r307551:
  
  Fix a double-free when an inp transitions to INP_TIMEWAIT state
  after having been dropped.
  
  This change enforces in_pcbdrop() logic in tcp_input():
  
  "in_pcbdrop() is used by TCP to mark an inpcb as unused and avoid future 
packet
  delivery or event notification when a socket remains open but TCP has closed."
  
  PR:   203175
  Reported by:  Palle Girgensohn, Slawa Olhovchenkov
  Tested by:Slawa Olhovchenkov
  Reviewed by:  Slawa Olhovchenkov
  Approved by:  gnn, Slawa Olhovchenkov
  Differential Revision:https://reviews.freebsd.org/D8211
  Sponsored by: Verisign, inc

Modified:
  stable/10/sys/netinet/tcp_input.c
  stable/10/sys/netinet/tcp_timewait.c
  stable/10/sys/netinet/tcp_usrreq.c

Modified: stable/10/sys/netinet/tcp_input.c
==
--- stable/10/sys/netinet/tcp_input.c   Tue Oct 25 12:53:14 2016
(r307905)
+++ stable/10/sys/netinet/tcp_input.c   Tue Oct 25 12:58:36 2016
(r307906)
@@ -879,6 +879,16 @@ findpcb:
goto dropwithreset;
}
INP_WLOCK_ASSERT(inp);
+   /*
+* While waiting for inp lock during the lookup, another thread
+* can have dropped the inpcb, in which case we need to loop back
+* and try to find a new inpcb to deliver to.
+*/
+   if (inp->inp_flags & INP_DROPPED) {
+   INP_WUNLOCK(inp);
+   inp = NULL;
+   goto findpcb;
+   }
if ((inp->inp_flowtype == M_HASHTYPE_NONE) &&
(M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) &&
((inp->inp_socket == NULL) ||
@@ -940,6 +950,10 @@ relocked:
if (in_pcbrele_wlocked(inp)) {
inp = NULL;
goto findpcb;
+   } else if (inp->inp_flags & INP_DROPPED) {
+   INP_WUNLOCK(inp);
+   inp = NULL;
+   goto findpcb;
}
} else
ti_locked = TI_WLOCKED;
@@ -999,6 +1013,10 @@ relocked:
if (in_pcbrele_wlocked(inp)) {
inp = NULL;
goto findpcb;
+   } else if (inp->inp_flags & INP_DROPPED) {
+   INP_WUNLOCK(inp);
+   inp = NULL;
+   goto findpcb;
}
goto relocked;
} else

Modified: stable/10/sys/netinet/tcp_timewait.c
==
--- stable/10/sys/netinet/tcp_timewait.cTue Oct 25 12:53:14 2016
(r307905)
+++ stable/10/sys/netinet/tcp_timewait.cTue Oct 25 12:58:36 2016
(r307906)
@@ -230,6 +230,10 @@ tcp_twstart(struct tcpcb *tp)
INP_INFO_WLOCK_ASSERT(_tcbinfo);
INP_WLOCK_ASSERT(inp);
 
+   /* A dropped inp should never transition to TIME_WAIT state. */
+   KASSERT((inp->inp_flags & INP_DROPPED) == 0, ("tcp_twstart: "
+   "(inp->inp_flags & INP_DROPPED) != 0"));
+
if (V_nolocaltimewait) {
int error = 0;
 #ifdef INET6

Modified: stable/10/sys/netinet/tcp_usrreq.c
==
--- stable/10/sys/netinet/tcp_usrreq.c  Tue Oct 25 12:53:14 2016
(r307905)
+++ stable/10/sys/netinet/tcp_usrreq.c  Tue Oct 25 12:58:36 2016
(r307906)
@@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #ifdef DDB
 #include 
@@ -202,10 +203,26 @@ tcp_detach(struct socket *so, struct inp
 *  In all three cases the tcptw should not be freed here.
 */
if (inp->inp_flags & INP_DROPPED) {
-   KASSERT(tp == NULL, ("tcp_detach: INP_TIMEWAIT && "
-   "INP_DROPPED && tp != NULL"));
in_pcbdetach(inp);
-   in_pcbfree(inp);
+   if (__predict_true(tp == NULL)) {
+   in_pcbfree(inp);
+   } else {
+   /*
+* This case should not happen as in TIMEWAIT
+* state the inp should not be destroyed before
+* its tcptw.  If INVARIANTS is defined, panic.
+*/
+#ifdef INVARIANTS
+   panic("%s: 

svn commit: r307905 - stable/11/sys/netinet

2016-10-25 Thread Julien Charbon
Author: jch
Date: Tue Oct 25 12:53:14 2016
New Revision: 307905
URL: https://svnweb.freebsd.org/changeset/base/307905

Log:
  MFC r307551:
  
  Fix a double-free when an inp transitions to INP_TIMEWAIT state
  after having been dropped.
  
  This change enforces in_pcbdrop() logic in tcp_input():
  
  "in_pcbdrop() is used by TCP to mark an inpcb as unused and avoid future 
packet
  delivery or event notification when a socket remains open but TCP has closed."
  
  PR:   203175
  Reported by:  Palle Girgensohn, Slawa Olhovchenkov
  Tested by:Slawa Olhovchenkov
  Reviewed by:  Slawa Olhovchenkov
  Approved by:  gnn, Slawa Olhovchenkov
  Differential Revision:https://reviews.freebsd.org/D8211
  Sponsored by: Verisign, inc

Modified:
  stable/11/sys/netinet/tcp_input.c
  stable/11/sys/netinet/tcp_timewait.c
  stable/11/sys/netinet/tcp_usrreq.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/netinet/tcp_input.c
==
--- stable/11/sys/netinet/tcp_input.c   Tue Oct 25 10:59:21 2016
(r307904)
+++ stable/11/sys/netinet/tcp_input.c   Tue Oct 25 12:53:14 2016
(r307905)
@@ -914,6 +914,16 @@ findpcb:
goto dropwithreset;
}
INP_WLOCK_ASSERT(inp);
+   /*
+* While waiting for inp lock during the lookup, another thread
+* can have dropped the inpcb, in which case we need to loop back
+* and try to find a new inpcb to deliver to.
+*/
+   if (inp->inp_flags & INP_DROPPED) {
+   INP_WUNLOCK(inp);
+   inp = NULL;
+   goto findpcb;
+   }
if ((inp->inp_flowtype == M_HASHTYPE_NONE) &&
(M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) &&
((inp->inp_socket == NULL) ||
@@ -974,6 +984,10 @@ relocked:
if (in_pcbrele_wlocked(inp)) {
inp = NULL;
goto findpcb;
+   } else if (inp->inp_flags & INP_DROPPED) {
+   INP_WUNLOCK(inp);
+   inp = NULL;
+   goto findpcb;
}
} else
ti_locked = TI_RLOCKED;
@@ -1033,6 +1047,10 @@ relocked:
if (in_pcbrele_wlocked(inp)) {
inp = NULL;
goto findpcb;
+   } else if (inp->inp_flags & INP_DROPPED) {
+   INP_WUNLOCK(inp);
+   inp = NULL;
+   goto findpcb;
}
goto relocked;
} else

Modified: stable/11/sys/netinet/tcp_timewait.c
==
--- stable/11/sys/netinet/tcp_timewait.cTue Oct 25 10:59:21 2016
(r307904)
+++ stable/11/sys/netinet/tcp_timewait.cTue Oct 25 12:53:14 2016
(r307905)
@@ -231,6 +231,10 @@ tcp_twstart(struct tcpcb *tp)
INP_INFO_RLOCK_ASSERT(_tcbinfo);
INP_WLOCK_ASSERT(inp);
 
+   /* A dropped inp should never transition to TIME_WAIT state. */
+   KASSERT((inp->inp_flags & INP_DROPPED) == 0, ("tcp_twstart: "
+   "(inp->inp_flags & INP_DROPPED) != 0"));
+
if (V_nolocaltimewait) {
int error = 0;
 #ifdef INET6

Modified: stable/11/sys/netinet/tcp_usrreq.c
==
--- stable/11/sys/netinet/tcp_usrreq.c  Tue Oct 25 10:59:21 2016
(r307904)
+++ stable/11/sys/netinet/tcp_usrreq.c  Tue Oct 25 12:53:14 2016
(r307905)
@@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #ifdef DDB
 #include 
@@ -210,10 +211,26 @@ tcp_detach(struct socket *so, struct inp
 *  In all three cases the tcptw should not be freed here.
 */
if (inp->inp_flags & INP_DROPPED) {
-   KASSERT(tp == NULL, ("tcp_detach: INP_TIMEWAIT && "
-   "INP_DROPPED && tp != NULL"));
in_pcbdetach(inp);
-   in_pcbfree(inp);
+   if (__predict_true(tp == NULL)) {
+   in_pcbfree(inp);
+   } else {
+   /*
+* This case should not happen as in TIMEWAIT
+* state the inp should not be destroyed before
+* its tcptw.  If INVARIANTS is defined, panic.
+*/
+#ifdef 

svn commit: r307904 - head/sys/amd64/vmm/amd

2016-10-25 Thread Andriy Gapon
Author: avg
Date: Tue Oct 25 10:59:21 2016
New Revision: 307904
URL: https://svnweb.freebsd.org/changeset/base/307904

Log:
  fix up r307903, use correct max address definition
  
  MFC after:1 week
  X-MFC with:   r307903

Modified:
  head/sys/amd64/vmm/amd/svm.c

Modified: head/sys/amd64/vmm/amd/svm.c
==
--- head/sys/amd64/vmm/amd/svm.cTue Oct 25 10:34:14 2016
(r307903)
+++ head/sys/amd64/vmm/amd/svm.cTue Oct 25 10:59:21 2016
(r307904)
@@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include "vmm_lapic.h"
 #include "vmm_stat.h"
@@ -518,7 +519,7 @@ svm_vminit(struct vm *vm, pmap_t pmap)
int i;
 
svm_sc = contigmalloc(sizeof (*svm_sc), M_SVM, M_WAITOK | M_ZERO,
-   0, BUS_SPACE_MAXADDR, PAGE_SIZE, 0);
+   0, VM_MAX_ADDRESS, PAGE_SIZE, 0);
svm_sc->vm = vm;
svm_sc->nptp = (vm_offset_t)vtophys(pmap->pm_pml4);
 
___
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: r307903 - head/sys/amd64/vmm/amd

2016-10-25 Thread Andriy Gapon
Author: avg
Date: Tue Oct 25 10:34:14 2016
New Revision: 307903
URL: https://svnweb.freebsd.org/changeset/base/307903

Log:
  vmm/svm: iopm_bitmap and msr_bitmap must be contiguous in physical memory
  
  To achieve that the whole svm_softc is allocated with contigmalloc now.
  It would be more effient to de-embed those arrays and allocate only them
  with contigmalloc.
  
  Previously, if malloc(9) used non-contiguous pages for the arrays, then
  random bits in physical pages next to the first page would be used to
  determine permissions for I/O port and MSR accesses.  That could result
  in a guest dangerously modifying the host hardware configuration.
  
  One example is that sometimes NMI watchdog driver in a Linux guest
  would be able to configure a performance counter on a host system.
  The counter would generate an interrupt and if hwpmc(4) driver is loaded
  on the host, then the interrupt would be delivered as an NMI.
  
  Discussed with:   jhb
  Reviewed by:  grehan
  MFC after:2 weeks
  Differential Revision: https://reviews.freebsd.org/D8321

Modified:
  head/sys/amd64/vmm/amd/svm.c

Modified: head/sys/amd64/vmm/amd/svm.c
==
--- head/sys/amd64/vmm/amd/svm.cTue Oct 25 07:48:19 2016
(r307902)
+++ head/sys/amd64/vmm/amd/svm.cTue Oct 25 10:34:14 2016
(r307903)
@@ -517,7 +517,8 @@ svm_vminit(struct vm *vm, pmap_t pmap)
vm_paddr_t msrpm_pa, iopm_pa, pml4_pa;  
int i;
 
-   svm_sc = malloc(sizeof (struct svm_softc), M_SVM, M_WAITOK | M_ZERO);
+   svm_sc = contigmalloc(sizeof (*svm_sc), M_SVM, M_WAITOK | M_ZERO,
+   0, BUS_SPACE_MAXADDR, PAGE_SIZE, 0);
svm_sc->vm = vm;
svm_sc->nptp = (vm_offset_t)vtophys(pmap->pm_pml4);
 
@@ -2042,7 +2043,7 @@ svm_vmcleanup(void *arg)
 {
struct svm_softc *sc = arg;
 
-   free(sc, M_SVM);
+   contigfree(sc, sizeof (*sc), M_SVM);
 }
 
 static register_t *
___
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: r307902 - head/sys/dev/usb

2016-10-25 Thread Edward Tomasz Napierala
Author: trasz
Date: Tue Oct 25 07:48:19 2016
New Revision: 307902
URL: https://svnweb.freebsd.org/changeset/base/307902

Log:
  Make the USB attach strings in dmesg include product name.
  
  Note to self: MFC this to 9 and 8.
  
  Reviewed by:  hselasky@, imp@
  MFC after:1 month
  Differential Revision:https://reviews.freebsd.org/D8259

Modified:
  head/sys/dev/usb/usb_device.c

Modified: head/sys/dev/usb/usb_device.c
==
--- head/sys/dev/usb/usb_device.c   Tue Oct 25 05:45:47 2016
(r307901)
+++ head/sys/dev/usb/usb_device.c   Tue Oct 25 07:48:19 2016
(r307902)
@@ -1938,8 +1938,8 @@ config_done:
udev->ugen_symlink = usb_alloc_symlink(udev->ugen_name);
 
/* Announce device */
-   printf("%s: <%s> at %s\n", udev->ugen_name,
-   usb_get_manufacturer(udev),
+   printf("%s: <%s %s> at %s\n", udev->ugen_name,
+   usb_get_manufacturer(udev), usb_get_product(udev),
device_get_nameunit(udev->bus->bdev));
 #endif
 
@@ -2148,8 +2148,9 @@ usb_free_device(struct usb_device *udev,
 
 #if USB_HAVE_UGEN
if (!rebooting) {
-   printf("%s: <%s> at %s (disconnected)\n", udev->ugen_name,
-   usb_get_manufacturer(udev), device_get_nameunit(bus->bdev));
+   printf("%s: <%s %s> at %s (disconnected)\n", udev->ugen_name,
+   usb_get_manufacturer(udev), usb_get_product(udev),
+   device_get_nameunit(bus->bdev));
}
 
/* Destroy UGEN symlink, if any */
___
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"