svn commit: r293035 - in head/sys: net netinet

2016-01-01 Thread Alexander V. Chernikov
Author: melifaro
Date: Fri Jan  1 10:15:06 2016
New Revision: 293035
URL: https://svnweb.freebsd.org/changeset/base/293035

Log:
  Remove second EVENTHANDLER_REGISTER slipped in r292978.
  Describe the reason of doing unconditional M_PREPEND in ether_output().

Modified:
  head/sys/net/if_ethersubr.c
  head/sys/netinet/if_ether.c

Modified: head/sys/net/if_ethersubr.c
==
--- head/sys/net/if_ethersubr.c Fri Jan  1 04:04:40 2016(r293034)
+++ head/sys/net/if_ethersubr.c Fri Jan  1 10:15:06 2016(r293035)
@@ -324,6 +324,10 @@ ether_output(struct ifnet *ifp, struct m
/*
 * Add local net header.  If no space in first mbuf,
 * allocate another.
+*
+* Note that we do prepend regardless of RT_HAS_HEADER flag.
+* This is done because BPF code shifts m_data pointer
+* to the end of ethernet header prior to calling if_output().
 */
M_PREPEND(m, hlen, M_NOWAIT);
if (m == NULL)

Modified: head/sys/netinet/if_ether.c
==
--- head/sys/netinet/if_ether.c Fri Jan  1 04:04:40 2016(r293034)
+++ head/sys/netinet/if_ether.c Fri Jan  1 10:15:06 2016(r293035)
@@ -1334,8 +1334,5 @@ arp_init(void)
if (IS_DEFAULT_VNET(curvnet))
iflladdr_tag = EVENTHANDLER_REGISTER(iflladdr_event,
arp_iflladdr, NULL, EVENTHANDLER_PRI_ANY);
-   if (IS_DEFAULT_VNET(curvnet))
-   iflladdr_tag = EVENTHANDLER_REGISTER(iflladdr_event,
-   arp_iflladdr, NULL, EVENTHANDLER_PRI_ANY);
 }
 SYSINIT(arp, SI_SUB_PROTO_DOMAIN, SI_ORDER_ANY, arp_init, 0);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r293037 - head/etc/ntp

2016-01-01 Thread Cy Schubert
Author: cy
Date: Fri Jan  1 11:57:32 2016
New Revision: 293037
URL: https://svnweb.freebsd.org/changeset/base/293037

Log:
  Update leap-seconds to latest. This will satisfy the ntpd leap-second
  version check.
  
  Obtained from:ftp://tycho.usno.navy.mil/pub/ntp/.
  See also: http://www.iers.org/SharedDocs/News/EN/BulletinC.html

Modified:
  head/etc/ntp/leap-seconds

Modified: head/etc/ntp/leap-seconds
==
--- head/etc/ntp/leap-seconds   Fri Jan  1 11:19:32 2016(r293036)
+++ head/etc/ntp/leap-seconds   Fri Jan  1 11:57:32 2016(r293037)
@@ -1,119 +1,221 @@
 #
 # $FreeBSD$
 #
-#  ATOMIC TIME.
-#  The Coordinated Universal Time (UTC) is the reference time scale 
derived 
-#  from The "Temps Atomique International" (TAI) calculated by the Bureau 
-#  International des Poids et Mesures (BIPM) using a worldwide network of 
atomic 
-#  clocks. UTC differs from TAI by an integer number of seconds; it is the 
basis 
-#  of all activities in the world. 
-#
-#
-#  ASTRONOMICAL TIME (UT1) is the time scale based on the rate of rotation 
of the earth. 
-#  It is now mainly derived from Very Long Baseline Interferometry (VLBI). 
The various 
-#  irregular fluctuations progressively detected in the rotation rate of 
the Earth lead 
-#  in 1972 to the replacement of UT1 by UTC as the reference time scale. 
-#
-#
-#  LEAP SECOND
-#  Atomic clocks are more stable than the rate of the earth rotatiob since 
the later 
-#  undergoes a full range of geophysical perturbations at various time 
scales (lunisolar 
-#  and core-mantle torques,atmospheric and oceanic effetcs, ...)
-#  Leap seconds are needed to keep the two time scales in agreement, i.e. 
UT1-UTC smaller 
-#  than 0.9 second. So, when necessary a "leap second" is introduced in 
UTC.
-#  Since the adoption of this system in 1972 it has been necessary to add 
26 seconds to UTC, 
-#  firstly due to the initial choice of the value of the second (1/86400 
mean solar day of 
-#  the year 1820) and secondly to the general slowing down of the Earth's 
rotation. It is 
-#  theorically possible to have a negative leap second (a second removed 
from UTC), but so far, 
-#  all leap seconds have been positive (a second has been added to UTC). 
Based on what we know about the earth's rotation, 
-#  it is unlikely that we will ever have a negative leap second.
-#
-#
-#  HISTORY
-#  The first leap second was added on June 30, 1972. Until 2000, it was 
necessary in average to add a leap second at a rate 
-#  of 1 to 2 years. Since 2000, due to the fact that the earth rate of 
rotation is accelerating, leap seconds are introduced 
-#  with an average  frequency of 3 to 4 years.
-#
-#
-#  RESPONSABILITY OF THE DECISION TO INTRODUCE A LEAP SECOND IN UTC
-#  The decision to introduce a leap second in UTC is the responsibility of 
the Earth Orientation Center of 
-#  the International Earth Rotation and reference System Service (IERS). 
This center is located at Paris 
-#  Observatory. According to international agreements, leap second date 
have to occur at fixed date :
-#  first preference is given to the end of December and June, and second 
preference at the end of March 
-#  and September. Since the system was introduced in 1972, only dates in 
June and December were used.
-#
-#  Questions or comments to:
-#  Daniel Gambis, daniel.gam...@obspm.fr
-#  Christian Bizouard:  christian.bizou...@obspm.fr
-#  Earth orientation Center of the IERS
-#  Paris Observatory, France   
-#  
-#
-#
-#  VALIDITY OF THE FILE
-#  It is important to express the validity of the file. These next two 
dates are
-#  given in units of seconds since 1900.0.
-#
-#  1) Last update of the file. 
-#
-#  Updated through IERS Bulletin C 
(ftp://hpiers.obspm.fr/iers/bul/bulc/bulletinc.dat)
-#
-#  The following line shows the last update of this file in NTP timestamp: 
-#
-#$ 3645216000 
-#   
-#  2) Expiration date of the file given on a semi-annual basis: last June 
or last December
-#
-#  File expires on 28 December 2015
-#
-#  Expire date in NTP timestamp: 
-#
-#@ 3660249600
-#
-#
-#  LIST OF LEAP SECONDS
-#  NTP timestamp (X parameter) is the number of seconds since 1900.0
-#
-#  MJD: The Modified Julian Day number. MJD = X/86400 + 15020
-#
-#  DTAI: The difference DTAI= TAI-UTC in units of seconds
-#  It is the quantity to add to UTC to get the time in TAI
-#
-#  Day Month Year : epoch in clear
-#
-#NTP Time  DTAIDay Month Year
-#
-2272060800  10  # 1 Jan 1972
-2287785600  11  # 1 Jul 1972
-2303683200  12  # 1 Jan 1973
-2335219200  13  # 1 Jan 1974
-236675520

svn commit: r293038 - head/sys/netinet6

2016-01-01 Thread Alexander V. Chernikov
Author: melifaro
Date: Fri Jan  1 12:35:33 2016
New Revision: 293038
URL: https://svnweb.freebsd.org/changeset/base/293038

Log:
  Use lltable_get_ifp() instead of direct access to lltable fields.

Modified:
  head/sys/netinet6/nd6_nbr.c

Modified: head/sys/netinet6/nd6_nbr.c
==
--- head/sys/netinet6/nd6_nbr.c Fri Jan  1 11:57:32 2016(r293037)
+++ head/sys/netinet6/nd6_nbr.c Fri Jan  1 12:35:33 2016(r293038)
@@ -877,6 +877,7 @@ nd6_na_input(struct mbuf *m, int off, in
 */
struct nd_defrouter *dr;
struct in6_addr *in6;
+   struct ifnet *nd6_ifp;
 
in6 = &ln->r_l3addr.addr6;
 
@@ -886,10 +887,11 @@ nd6_na_input(struct mbuf *m, int off, in
 * is only called under the network software interrupt
 * context.  However, we keep it just for safety.
 */
-   dr = defrouter_lookup(in6, ln->lle_tbl->llt_ifp);
+   nd6_ifp = lltable_get_ifp(ln->lle_tbl);
+   dr = defrouter_lookup(in6, nd6_ifp);
if (dr)
defrtrlist_del(dr);
-   else if (ND_IFINFO(ln->lle_tbl->llt_ifp)->flags &
+   else if (ND_IFINFO(nd6_ifp)->flags &
ND6_IFF_ACCEPT_RTADV) {
/*
 * Even if the neighbor is not in the default
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r292987 - in head/sys/compat/linuxkpi/common: include/linux src

2016-01-01 Thread Hans Petter Selasky

On 12/31/15 19:15, Bjoern A. Zeeb wrote:



On 31 Dec 2015, at 12:30 , Hans Petter Selasky  wrote:

Author: hselasky
Date: Thu Dec 31 12:30:19 2015
New Revision: 292987
URL: https://svnweb.freebsd.org/changeset/base/292987

Log:
  Minor LinuxKPI code cleanup:
  - Declare some static functions in linux_compat.c instead if inside
various header files.
  - Prefix FreeBSD local functions in the LinuxKPI with "linux_" to
avoid symbol name conflicts in the future and to make debugging
easier.
  - Make the "struct kobj_ktype" declaractions constant to shave off a
few bytes from the data segment.

  MFC after:1 week
  Sponsored by: Mellanox Technologies

Modified:
  head/sys/compat/linuxkpi/common/include/linux/cdev.h
  head/sys/compat/linuxkpi/common/include/linux/device.h
  head/sys/compat/linuxkpi/common/include/linux/kobject.h
  head/sys/compat/linuxkpi/common/include/linux/miscdevice.h
  head/sys/compat/linuxkpi/common/src/linux_compat.c
  head/sys/compat/linuxkpi/common/src/linux_pci.c



I can only guess if it was this commit?   This is i386.LINT* erroring (but 
there might be other kernels as well; don’t know yet):



I'll check it out. Did you build from clean?

--HPS

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

Re: svn commit: r292987 - in head/sys/compat/linuxkpi/common: include/linux src

2016-01-01 Thread Hans Petter Selasky

On 12/31/15 19:15, Bjoern A. Zeeb wrote:



On 31 Dec 2015, at 12:30 , Hans Petter Selasky  wrote:

Author: hselasky
Date: Thu Dec 31 12:30:19 2015
New Revision: 292987
URL: https://svnweb.freebsd.org/changeset/base/292987

Log:
  Minor LinuxKPI code cleanup:
  - Declare some static functions in linux_compat.c instead if inside
various header files.
  - Prefix FreeBSD local functions in the LinuxKPI with "linux_" to
avoid symbol name conflicts in the future and to make debugging
easier.
  - Make the "struct kobj_ktype" declaractions constant to shave off a
few bytes from the data segment.

  MFC after:1 week
  Sponsored by: Mellanox Technologies

Modified:
  head/sys/compat/linuxkpi/common/include/linux/cdev.h
  head/sys/compat/linuxkpi/common/include/linux/device.h
  head/sys/compat/linuxkpi/common/include/linux/kobject.h
  head/sys/compat/linuxkpi/common/include/linux/miscdevice.h
  head/sys/compat/linuxkpi/common/src/linux_compat.c
  head/sys/compat/linuxkpi/common/src/linux_pci.c



I can only guess if it was this commit?   This is i386.LINT* erroring (but 
there might be other kernels as well; don’t know yet):



Hi,

There are currently missing dependency rules, which is due to a lack in 
the "config" utility, for the infiniband code, so you'll need to clean 
your already compiled objects manually, and the compile errors will go 
away I think. I'll double check my LINT builds locally and come back to 
you if it is a real issue.


--HPS


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

svn commit: r293039 - in head/sys/dev: sec tsec

2016-01-01 Thread Justin Hibbits
Author: jhibbits
Date: Fri Jan  1 15:17:24 2016
New Revision: 293039
URL: https://svnweb.freebsd.org/changeset/base/293039

Log:
  Fix a couple printf formats.
  
  This was found when working on 64-bit PowerPC book-e support.

Modified:
  head/sys/dev/sec/sec.c
  head/sys/dev/tsec/if_tsec.c

Modified: head/sys/dev/sec/sec.c
==
--- head/sys/dev/sec/sec.c  Fri Jan  1 12:35:33 2016(r293038)
+++ head/sys/dev/sec/sec.c  Fri Jan  1 15:17:24 2016(r293039)
@@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#include 
 #include 
 #include 
 
@@ -235,7 +236,7 @@ sec_probe(device_t dev)
sc->sc_version = 3;
break;
default:
-   device_printf(dev, "unknown SEC ID 0x%016llx!\n", id);
+   device_printf(dev, "unknown SEC ID 0x%16"PRIx64"!\n", id);
return (ENXIO);
}
 

Modified: head/sys/dev/tsec/if_tsec.c
==
--- head/sys/dev/tsec/if_tsec.c Fri Jan  1 12:35:33 2016(r293038)
+++ head/sys/dev/tsec/if_tsec.c Fri Jan  1 15:17:24 2016(r293039)
@@ -561,7 +561,7 @@ tsec_set_mac_address(struct tsec_softc *
TSEC_GLOBAL_LOCK_ASSERT(sc);
 
KASSERT((ETHER_ADDR_LEN <= sizeof(macbuf)),
-   ("tsec_set_mac_address: (%d <= %d", ETHER_ADDR_LEN,
+   ("tsec_set_mac_address: (%d <= %zd", ETHER_ADDR_LEN,
sizeof(macbuf)));
 
macbufp = (char *)macbuf;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r293040 - in head: lib/libstand sys/boot/libstand32

2016-01-01 Thread Ed Maste
Author: emaste
Date: Fri Jan  1 15:30:11 2016
New Revision: 293040
URL: https://svnweb.freebsd.org/changeset/base/293040

Log:
  Reduce libstand Makefile duplication
  
  libstand is built in three places (lib/libstand, sys/boot/libstand32,
  and sys/boot/userboot/libstand). Reduce Makefile duplication by
  .including libstand/Makefile from sys/boot/libstand32/Makefile.
  
  sys/boot/userboot/libstand/Makefile will be addressed later, as it
  contains additional differences yet to be handled.
  
  This change also switches libstand32 to use the new uuid_from_string
  and uuid_to_string, which was not included in r292473.
  
  Reviewed by:  jhb
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D4747

Modified:
  head/lib/libstand/Makefile
  head/sys/boot/libstand32/Makefile

Modified: head/lib/libstand/Makefile
==
--- head/lib/libstand/Makefile  Fri Jan  1 15:17:24 2016(r293039)
+++ head/lib/libstand/Makefile  Fri Jan  1 15:30:11 2016(r293040)
@@ -11,13 +11,14 @@ MK_SSP= no
 
 .include 
 
-LIBSTAND_SRC=  ${.CURDIR}
+LIBSTAND_SRC?= ${.CURDIR}
+LIBSTAND_CPUARCH?=${MACHINE_CPUARCH}
 LIBC_SRC=  ${LIBSTAND_SRC}/../libc
 
 LIB=   stand
 NO_PIC=
 INCS=  stand.h
-MAN=   libstand.3
+MAN?=  libstand.3
 
 WARNS?=0
 
@@ -78,7 +79,7 @@ SRCS+=syncicache.c
 SRCS+= uuid_create_nil.c uuid_equal.c uuid_from_string.c uuid_is_nil.c 
uuid_to_string.c
 
 # _setjmp/_longjmp
-.PATH: ${LIBSTAND_SRC}/${MACHINE_CPUARCH}
+.PATH: ${LIBSTAND_SRC}/${LIBSTAND_CPUARCH}
 SRCS+= _setjmp.S
 
 # decompression functionality from libbz2

Modified: head/sys/boot/libstand32/Makefile
==
--- head/sys/boot/libstand32/Makefile   Fri Jan  1 15:17:24 2016
(r293039)
+++ head/sys/boot/libstand32/Makefile   Fri Jan  1 15:30:11 2016
(r293040)
@@ -1,151 +1,23 @@
 # $FreeBSD$
-# Originally from  $NetBSD: Makefile,v 1.21 1997/10/26 22:08:38 lukem Exp $
-#
-# Notes:
-# - We don't use the libc strerror/sys_errlist because the string table is
-#   quite large.
-#
-
-MAN=
 
 .include 
-MK_SSP=no
 
 LIBSTAND_SRC=  ${.CURDIR}/../../../lib/libstand
-LIBC_SRC=  ${LIBSTAND_SRC}/../libc
-
-.PATH: ${LIBSTAND_SRC}
-LIB=   stand
-INTERNALLIB=
-MK_PROFILE=no
-NO_PIC=
-.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "powerpc64"
-CFLAGS+=   -m32 -I.
-.endif
-
-WARNS?=0
-
-# standalone components and stuff we have modified locally
-SRCS+= gzguts.h zutil.h __main.c assert.c bcd.c bswap.c environment.c getopt.c 
gets.c \
-   globals.c pager.c printf.c strdup.c strerror.c strtol.c strtoul.c 
random.c \
-   sbrk.c twiddle.c zalloc.c zalloc_malloc.c
-
-# private (pruned) versions of libc string functions
-SRCS+= strcasecmp.c
-
-.PATH: ${LIBC_SRC}/net
-
-SRCS+= ntoh.c
-
-# string functions from libc
-.PATH: ${LIBC_SRC}/string
-SRCS+= bcmp.c bcopy.c bzero.c ffs.c memccpy.c memchr.c memcmp.c memcpy.c \
-   memmove.c memset.c qdivrem.c strcat.c strchr.c strcmp.c strcpy.c \
-   strcspn.c strlcat.c strlcpy.c strlen.c strncat.c strncmp.c strncpy.c \
-   strpbrk.c strrchr.c strsep.c strspn.c strstr.c strtok.c swab.c
-.if ${MACHINE_CPUARCH} == "arm"
-.PATH: ${LIBC_SRC}/arm/gen
-
-# Compiler support functions
-.PATH: ${LIBSTAND_SRC}/../../contrib/compiler-rt/lib/builtins/
-# __clzsi2 and ctzsi2 for various builtin functions
-SRCS+= clzsi2.c ctzsi2.c
-# Divide and modulus functions called by the compiler
-SRCS+=  divmoddi4.c  divmodsi4.c  divdi3.c  divsi3.c  moddi3.c  modsi3.c
-SRCS+= udivmoddi4.c udivmodsi4.c udivdi3.c udivsi3.c umoddi3.c umodsi3.c
-
-.PATH: ${LIBSTAND_SRC}/../../contrib/compiler-rt/lib/builtins/arm/
-SRCS+= aeabi_idivmod.S aeabi_ldivmod.S aeabi_uidivmod.S aeabi_uldivmod.S
-SRCS+= aeabi_memcmp.S aeabi_memcpy.S aeabi_memmove.S aeabi_memset.S
-
-.endif
-.if ${MACHINE_CPUARCH} == "powerpc"
-.PATH: ${LIBC_SRC}/quad
-SRCS+= ashldi3.c ashrdi3.c
-SRCS+= syncicache.c
-.endif
-
-# uuid functions from libc
-.PATH: ${LIBC_SRC}/uuid
-SRCS+= uuid_equal.c uuid_is_nil.c
-
-# _setjmp/_longjmp
 .if ${MACHINE_CPUARCH} == "amd64"
-.PATH: ${LIBSTAND_SRC}/i386
+LIBSTAND_CPUARCH=i386
 .else
-.PATH: ${LIBSTAND_SRC}/${MACHINE_CPUARCH}
+LIBSTAND_CPUARCH=${MACHINE_CPUARCH}
 .endif
-SRCS+= _setjmp.S
-
-# decompression functionality from libbz2
-# NOTE: to actually test this functionality after libbz2 upgrade compile
-# loader(8) with LOADER_BZIP2_SUPPORT defined
-.PATH: ${LIBSTAND_SRC}/../../contrib/bzip2
-CFLAGS+= -DBZ_NO_STDIO -DBZ_NO_COMPRESS
-SRCS+= libstand_bzlib_private.h
-
-.for file in bzlib.c crctable.c decompress.c huffman.c randtable.c
-SRCS+= _${file}
-CLEANFILES+=   _${file}
-
-_${file}: ${file}
-   sed "s|bzlib_private\.h|libstand_bzlib_private.h|" \
-   ${.ALLSRC} > ${.TARGET}
-.endfor
-

svn commit: r293041 - head/sys/powerpc/mpc85xx

2016-01-01 Thread Justin Hibbits
Author: jhibbits
Date: Fri Jan  1 15:36:56 2016
New Revision: 293041
URL: https://svnweb.freebsd.org/changeset/base/293041

Log:
  Use uint32_t for LBC block size.
  
  LBC block size can only be up to 4GB.  The existing code already clamps it, 
but
  mixes unsigned long and uint32_t.  This works on 32-bit targets, but not 
64-bit,
  so isn't completely correct.  This fixes the type confusion.

Modified:
  head/sys/powerpc/mpc85xx/lbc.c

Modified: head/sys/powerpc/mpc85xx/lbc.c
==
--- head/sys/powerpc/mpc85xx/lbc.c  Fri Jan  1 15:30:11 2016
(r293040)
+++ head/sys/powerpc/mpc85xx/lbc.c  Fri Jan  1 15:36:56 2016
(r293041)
@@ -126,11 +126,11 @@ lbc_address_mask(uint32_t size)
 {
int n = 15;
 
-   if (size == ~0UL)
+   if (size == ~0)
return (0);
 
while (n < 32) {
-   if (size == (1UL << n))
+   if (size == (1U << n))
break;
n++;
}
@@ -267,7 +267,7 @@ lbc_banks_map(struct lbc_softc *sc)
 static int
 lbc_banks_enable(struct lbc_softc *sc)
 {
-   u_long size;
+   uint32_t size;
uint32_t regval;
int error, i;
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r293042 - head/sys/fs/devfs

2016-01-01 Thread Konstantin Belousov
Author: kib
Date: Fri Jan  1 15:48:48 2016
New Revision: 293042
URL: https://svnweb.freebsd.org/changeset/base/293042

Log:
  Minor style cleanup.
  
  Submitted by: bde
  MFC after:1 week

Modified:
  head/sys/fs/devfs/devfs_vnops.c

Modified: head/sys/fs/devfs/devfs_vnops.c
==
--- head/sys/fs/devfs/devfs_vnops.c Fri Jan  1 15:36:56 2016
(r293041)
+++ head/sys/fs/devfs/devfs_vnops.c Fri Jan  1 15:48:48 2016
(r293042)
@@ -1147,7 +1147,7 @@ devfs_open(struct vop_open_args *ap)
error = dsw->d_fdopen(dev, ap->a_mode, td, fp);
else
error = dsw->d_open(dev, ap->a_mode, S_IFCHR, td);
-   /* cleanup any cdevpriv upon error */
+   /* Clean up any cdevpriv upon error. */
if (error != 0)
devfs_clear_cdevpriv();
td->td_fpop = fpop;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r293043 - in head: sys/kgssapi usr.sbin/gssd

2016-01-01 Thread Josh Paetzel
Author: jpaetzel
Date: Fri Jan  1 17:06:16 2016
New Revision: 293043
URL: https://svnweb.freebsd.org/changeset/base/293043

Log:
  Unset the gss kernel state when gssd exits
  
  When gssd exits it leaves the kernel state set by
  gssd_syscall().  nfsd sees this and waits endlessly
  in an unkillable state for gssd to come back.  If you
  had acidentally started gssd then stopped it, then
  started nfsd you'd be in a bad way until you either
  restarted gssd or rebooted the system.  This change
  fixes that by setting the kernel state to "" when
  gssd exits.
  Reviewed by:  rmacklem
  MFC after:1 week
  Sponsored by: iXsystems

Modified:
  head/sys/kgssapi/gss_impl.c
  head/usr.sbin/gssd/gssd.c

Modified: head/sys/kgssapi/gss_impl.c
==
--- head/sys/kgssapi/gss_impl.c Fri Jan  1 15:48:48 2016(r293042)
+++ head/sys/kgssapi/gss_impl.c Fri Jan  1 17:06:16 2016(r293043)
@@ -105,14 +105,17 @@ sys_gssd_syscall(struct thread *td, stru
if (error)
return (error);
 
-sun.sun_family = AF_LOCAL;
-strcpy(sun.sun_path, path);
-sun.sun_len = SUN_LEN(&sun);
-
-nconf = getnetconfigent("local");
-cl = clnt_reconnect_create(nconf,
-   (struct sockaddr *) &sun, GSSD, GSSDVERS,
-   RPC_MAXDATASIZE, RPC_MAXDATASIZE);
+   if (path[0] != '\0') {
+   sun.sun_family = AF_LOCAL;
+   strcpy(sun.sun_path, path);
+   sun.sun_len = SUN_LEN(&sun);
+   
+   nconf = getnetconfigent("local");
+   cl = clnt_reconnect_create(nconf,
+   (struct sockaddr *) &sun, GSSD, GSSDVERS,
+   RPC_MAXDATASIZE, RPC_MAXDATASIZE);
+   } else
+   cl = NULL;
 
mtx_lock(&kgss_gssd_lock);
oldcl = kgss_gssd_handle;

Modified: head/usr.sbin/gssd/gssd.c
==
--- head/usr.sbin/gssd/gssd.c   Fri Jan  1 15:48:48 2016(r293042)
+++ head/usr.sbin/gssd/gssd.c   Fri Jan  1 17:06:16 2016(r293043)
@@ -254,6 +254,7 @@ main(int argc, char **argv)
 
gssd_syscall(_PATH_GSSDSOCK);
svc_run();
+   gssd_syscall("");
 
return (0);
 }
@@ -1285,6 +1286,7 @@ void gssd_terminate(int sig __unused)
if (hostbased_initiator_cred != 0)
unlink(GSSD_CREDENTIAL_CACHE_FILE);
 #endif
+   gssd_syscall("");
exit(0);
 }
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r293039 - in head/sys/dev: sec tsec

2016-01-01 Thread Conrad Meyer
On Fri, Jan 1, 2016 at 7:17 AM, Justin Hibbits  wrote:
> Author: jhibbits
> Date: Fri Jan  1 15:17:24 2016
> New Revision: 293039
> URL: https://svnweb.freebsd.org/changeset/base/293039
>
> Log:
>   Fix a couple printf formats.
>
> ...
> @@ -235,7 +236,7 @@ sec_probe(device_t dev)
> sc->sc_version = 3;
> break;
> default:
> -   device_printf(dev, "unknown SEC ID 0x%016llx!\n", id);
> +   device_printf(dev, "unknown SEC ID 0x%16"PRIx64"!\n", id);
> return (ENXIO);
> }

Hi,

The 0 got dropped, which makes this a slightly different format.  The
zero is ignored if a precision is given, but the 16 in the format
string represents a field width.  (Either "%016" or "%.16" should
print the same as the original, I think.)

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


svn commit: r293044 - head/sys/dev/sec

2016-01-01 Thread Justin Hibbits
Author: jhibbits
Date: Fri Jan  1 17:56:52 2016
New Revision: 293044
URL: https://svnweb.freebsd.org/changeset/base/293044

Log:
  Accidentally dropped the 0 padding.
  
  Pointed out by:   cmeyer

Modified:
  head/sys/dev/sec/sec.c

Modified: head/sys/dev/sec/sec.c
==
--- head/sys/dev/sec/sec.c  Fri Jan  1 17:06:16 2016(r293043)
+++ head/sys/dev/sec/sec.c  Fri Jan  1 17:56:52 2016(r293044)
@@ -236,7 +236,7 @@ sec_probe(device_t dev)
sc->sc_version = 3;
break;
default:
-   device_printf(dev, "unknown SEC ID 0x%16"PRIx64"!\n", id);
+   device_printf(dev, "unknown SEC ID 0x%016"PRIx64"!\n", id);
return (ENXIO);
}
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r293039 - in head/sys/dev: sec tsec

2016-01-01 Thread Justin Hibbits
On Jan 1, 2016 11:30, "Conrad Meyer"  wrote:
>
> On Fri, Jan 1, 2016 at 7:17 AM, Justin Hibbits 
wrote:
> > Author: jhibbits
> > Date: Fri Jan  1 15:17:24 2016
> > New Revision: 293039
> > URL: https://svnweb.freebsd.org/changeset/base/293039
> >
> > Log:
> >   Fix a couple printf formats.
> >
> > ...
> > @@ -235,7 +236,7 @@ sec_probe(device_t dev)
> > sc->sc_version = 3;
> > break;
> > default:
> > -   device_printf(dev, "unknown SEC ID 0x%016llx!\n", id);
> > +   device_printf(dev, "unknown SEC ID 0x%16"PRIx64"!\n",
id);
> > return (ENXIO);
> > }
>
> Hi,
>
> The 0 got dropped, which makes this a slightly different format.  The
> zero is ignored if a precision is given, but the 16 in the format
> string represents a field width.  (Either "%016" or "%.16" should
> print the same as the original, I think.)
>
> Best,
> Conrad

Oops, fixed in r293044.
Thanks!

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


Re: svn commit: r293044 - head/sys/dev/sec

2016-01-01 Thread Justin Hibbits
On Fri, Jan 1, 2016 at 11:56 AM, Justin Hibbits  wrote:
> Author: jhibbits
> Date: Fri Jan  1 17:56:52 2016
> New Revision: 293044
> URL: https://svnweb.freebsd.org/changeset/base/293044
>
> Log:
>   Accidentally dropped the 0 padding.
>
>   Pointed out by:   cmeyer

That should be cem.

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


Re: svn commit: r293022 - head/sys/net80211

2016-01-01 Thread John Baldwin
On Friday, January 01, 2016 12:21:07 AM Adrian Chadd wrote:
> Author: adrian
> Date: Fri Jan  1 00:21:07 2016
> New Revision: 293022
> URL: https://svnweb.freebsd.org/changeset/base/293022
> 
> Log:
>   [net80211] document the (not completely complete) set of places where
>   we're assuming hz=1000 and not gracefully handling when it isn't.
>   
>   The math involved will return 0 for hz < 1000, which it is on some
>   platforms and on DragonflyBSD.
>   
>   This doesn't fix it, it:
>   
>   * converts one manual use over to use the macro, and
>   * comments where it needs some thought/fixing.
>   
>   I'll think about this a bit more before fixing it.
>   
>   Submitted by:   i...@vdsz.com
> 
> Modified:
>   head/sys/net80211/ieee80211_freebsd.h
>   head/sys/net80211/ieee80211_scan_sw.c
>   head/sys/net80211/ieee80211_var.h
> 
> Modified: head/sys/net80211/ieee80211_scan_sw.c
> ==
> --- head/sys/net80211/ieee80211_scan_sw.c Fri Jan  1 00:16:54 2016
> (r293021)
> +++ head/sys/net80211/ieee80211_scan_sw.c Fri Jan  1 00:21:07 2016
> (r293022)
> @@ -641,7 +641,7 @@ scan_task(void *arg, int pending)
>* XXX Should use M_TXCB mechanism to eliminate this.
>*/
>   cv_timedwait(&SCAN_PRIVATE(ss)->ss_scan_cv,
> - IEEE80211_LOCK_OBJ(ic), hz / 1000);
> + IEEE80211_LOCK_OBJ(ic), msecs_to_ticks(1));

It would be better to use SBT_1MS instead with cv_timedwait_sbt().  Especially 
if
the 1 ms is fuzzy you can specify "how" fuzzy it is to permit coalescing of
timer interrupts to reduce power usage.  This would seem to be especially useful
for 802.11 since it is commonly used in devices for which power usage is more
impactful.

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


svn commit: r293045 - in head/sys: amd64/amd64 arm/arm arm/xscale/ixp425 arm64/arm64 boot i386/i386 kern mips/beri powerpc/powerpc sparc64/sparc64 x86/xen

2016-01-01 Thread Ian Lepore
Author: ian
Date: Sat Jan  2 02:53:48 2016
New Revision: 293045
URL: https://svnweb.freebsd.org/changeset/base/293045

Log:
  Make the 'env' directive described in config(5) work on all architectures,
  providing compiled-in static environment data that is used instead of any
  data passed in from a boot loader.
  
  Previously 'env' worked only on i386 and arm xscale systems, because it
  required the MD startup code to examine the global envmode variable and
  decide whether to use static_env or an environment obtained from the boot
  loader, and set the global kern_envp accordingly.  Most startup code wasn't
  doing so.  Making things even more complex, some mips startup code uses an
  alternate scheme that involves calling init_static_kenv() to pass an empty
  buffer and its size, then uses a series of kern_setenv() calls to populate
  that buffer.
  
  Now all MD startup code calls init_static_kenv(), and that routine provides
  a single point where envmode is checked and the decision is made whether to
  use the compiled-in static_kenv or the values provided by the MD code.
  
  The routine also continues to serve its original purpose for mips; if a
  non-zero buffer size is passed the routine installs the empty buffer ready
  to accept kern_setenv() values.  Now if the size is zero, the provided buffer
  full of existing env data is installed.  A NULL pointer can be passed if the
  boot loader provides no env data; this allows the static env to be installed
  if envmode is set to do so.
  
  Most of the work here is a near-mechanical change to call the init function
  instead of directly setting kern_envp.  A notable exception is in xen/pv.c;
  that code was originally installing a buffer full of preformatted env data
  along with its non-zero size (like mips code does), which would have allowed
  kern_setenv() calls to wipe out the preformatted data.  Now it passes a zero
  for the size so that the buffer of data it installs is treated as
  non-writeable.

Modified:
  head/sys/amd64/amd64/machdep.c
  head/sys/arm/arm/machdep.c
  head/sys/arm/xscale/ixp425/avila_machdep.c
  head/sys/arm64/arm64/machdep.c
  head/sys/boot/Makefile.arm
  head/sys/i386/i386/machdep.c
  head/sys/kern/kern_environment.c
  head/sys/mips/beri/beri_machdep.c
  head/sys/powerpc/powerpc/machdep.c
  head/sys/sparc64/sparc64/machdep.c
  head/sys/x86/xen/pv.c

Modified: head/sys/amd64/amd64/machdep.c
==
--- head/sys/amd64/amd64/machdep.c  Fri Jan  1 17:56:52 2016
(r293044)
+++ head/sys/amd64/amd64/machdep.c  Sat Jan  2 02:53:48 2016
(r293045)
@@ -1484,6 +1484,7 @@ static caddr_t
 native_parse_preload_data(u_int64_t modulep)
 {
caddr_t kmdp;
+   char *envp;
 #ifdef DDB
vm_offset_t ksym_start;
vm_offset_t ksym_end;
@@ -1495,7 +1496,10 @@ native_parse_preload_data(u_int64_t modu
if (kmdp == NULL)
kmdp = preload_search_by_type("elf64 kernel");
boothowto = MD_FETCH(kmdp, MODINFOMD_HOWTO, int);
-   kern_envp = MD_FETCH(kmdp, MODINFOMD_ENVP, char *) + KERNBASE;
+   envp = MD_FETCH(kmdp, MODINFOMD_ENVP, char *);
+   if (envp != NULL)
+   envp += KERNBASE;
+   init_static_kenv(envp, 0);
 #ifdef DDB
ksym_start = MD_FETCH(kmdp, MODINFOMD_SSYM, uintptr_t);
ksym_end = MD_FETCH(kmdp, MODINFOMD_ESYM, uintptr_t);

Modified: head/sys/arm/arm/machdep.c
==
--- head/sys/arm/arm/machdep.c  Fri Jan  1 17:56:52 2016(r293044)
+++ head/sys/arm/arm/machdep.c  Sat Jan  2 02:53:48 2016(r293045)
@@ -1002,6 +1002,8 @@ fake_preload_metadata(struct arm_boot_pa
fake_preload[i] = 0;
preload_metadata = (void *)fake_preload;
 
+   init_static_kenv(NULL, 0);
+
return (lastaddr);
 }
 
@@ -1074,6 +1076,8 @@ linux_parse_boot_param(struct arm_boot_p
bcopy(atag_list, atags,
(char *)walker - (char *)atag_list + ATAG_SIZE(walker));
 
+   init_static_kenv(NULL, 0);
+
return fake_preload_metadata(abp);
 }
 #endif
@@ -1106,7 +1110,7 @@ freebsd_parse_boot_param(struct arm_boot
return 0;
 
boothowto = MD_FETCH(kmdp, MODINFOMD_HOWTO, int);
-   kern_envp = MD_FETCH(kmdp, MODINFOMD_ENVP, char *);
+   init_static_kenv(MD_FETCH(kmdp, MODINFOMD_ENVP, char *), 0);
lastaddr = MD_FETCH(kmdp, MODINFOMD_KERNEND, vm_offset_t);
 #ifdef DDB
ksym_start = MD_FETCH(kmdp, MODINFOMD_SSYM, uintptr_t);

Modified: head/sys/arm/xscale/ixp425/avila_machdep.c
==
--- head/sys/arm/xscale/ixp425/avila_machdep.c  Fri Jan  1 17:56:52 2016
(r293044)
+++ head/sys/arm/xscale/ixp425/avila_machdep.c  Sat Jan  2 02:53:48 2016
(r293045)
@@ -225,8 +225,8 @@ initarm(struct arm_boot_params *abp)
pcpu_init(pcpup, 0, sizeof(

svn commit: r293046 - head/sys/boot

2016-01-01 Thread Ian Lepore
Author: ian
Date: Sat Jan  2 03:00:31 2016
New Revision: 293046
URL: https://svnweb.freebsd.org/changeset/base/293046

Log:
  Revert accidental change that snuck into r293045.

Modified:
  head/sys/boot/Makefile.arm

Modified: head/sys/boot/Makefile.arm
==
--- head/sys/boot/Makefile.arm  Sat Jan  2 02:53:48 2016(r293045)
+++ head/sys/boot/Makefile.arm  Sat Jan  2 03:00:31 2016(r293046)
@@ -5,10 +5,3 @@ SUBDIR+=   fdt
 .endif
 
 SUBDIR+=   efi uboot
-
-# Do not generate movt/movw, because the relocation fixup for them does not
-# translate to the -Bsymbolic -pie format required by self_reloc() in 
loader(8).
-# Also, the fpu is not available in a standalone environment.
-CFLAGS.clang+= -mllvm -arm-use-movt=0
-CFLAGS.clang+= -mfpu=none
-.export: CFLAGS.clang
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r293022 - head/sys/net80211

2016-01-01 Thread Adrian Chadd
yup. all  of this is ... terrible atm.

I do need to be able to give a bounds though. :(


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


svn commit: r293047 - head/share/vt/keymaps

2016-01-01 Thread Ed Maste
Author: emaste
Date: Sat Jan  2 04:42:53 2016
New Revision: 293047
URL: https://svnweb.freebsd.org/changeset/base/293047

Log:
  Use correct name 'us' for character 31 in keymaps
  
  'ns' was a historical accident, and kbdcontrol(1) has accepted the
  correct 'us' as well as 'ns' since r38139.
  
  PR:   205776
  MFC after:1 week

Modified:
  head/share/vt/keymaps/gr.101.acc.kbd
  head/share/vt/keymaps/gr.elot.acc.kbd
  head/share/vt/keymaps/hu.101.kbd
  head/share/vt/keymaps/hu.102.kbd
  head/share/vt/keymaps/lt.kbd
  head/share/vt/keymaps/pt.acc.kbd
  head/share/vt/keymaps/pt.kbd
  head/share/vt/keymaps/ua.kbd
  head/share/vt/keymaps/ua.shift.alt.kbd

Modified: head/share/vt/keymaps/gr.101.acc.kbd
==
--- head/share/vt/keymaps/gr.101.acc.kbdSat Jan  2 03:00:31 2016
(r293046)
+++ head/share/vt/keymaps/gr.101.acc.kbdSat Jan  2 04:42:53 2016
(r293047)
@@ -18,7 +18,7 @@
   009   '8''*'nopnop'8''*'nopnop O
   010   '9''('nopnop'9''('nopnop O
   011   '0'')'nopnop'0'')'nopnop O
-  012   '-''_'ns ns '-''_'ns ns  O
+  012   '-''_'us us '-''_'us us  O
   013   '=''+'nopnop'=''+'nopnop O
   014   bs bs deldelbs bs deldel O
   015   ht btab   nopnopht btab   nopnop O
@@ -90,7 +90,7 @@
   081   fkey59 '3''3''3''3''3''3''3' N
   082   fkey60 '0''0''0''0''0''0''0' N
   083   del'.''.''.''.''.'boot   bootN
-  084   ns ns ns ns ns ns ns ns  O
+  084   us us us us us us us us  O
   085   nopnopnopnopnopnopnopnop O
   086   '\''|'nopnop'\''|'nopnop O
   087   fkey11 fkey23 fkey35 fkey47 scr11  scr11  scr11  scr11   O
@@ -148,7 +148,7 @@
   137   '8''*'nopnop'8''*'nopnop O
   138   '9''('nopnop'9''('nopnop O
   139   '0'')'nopnop'0'')'nopnop O
-  140   '-''_'ns ns '-''_'ns ns  O
+  140   '-''_'us us '-''_'us us  O
   141   '=''+'nopnop'=''+'nopnop O
   142   bs bs deldelbs bs deldel O
   143   ht btab   nopnopht btab   nopnop O
@@ -220,7 +220,7 @@
   209   fkey59 '3''3''3''3''3''3''3' N
   210   fkey60 '0''0''0''0''0''0''0' N
   211   del'.''.''.''.''.'boot   bootN
-  212   ns ns ns ns ns ns ns ns  O
+  212   us us us us us us us us  O
   213   nopnopnopnopnopnopnopnop O
   214   '\''|'nopnop'\''|'nopnop O
   215   fkey11 fkey23 fkey35 fkey47 scr11  scr11  scr11  scr11   O

Modified: head/share/vt/keymaps/gr.elot.acc.kbd
==
--- head/share/vt/keymaps/gr.elot.acc.kbd   Sat Jan  2 03:00:31 2016
(r293046)
+++ head/share/vt/keymaps/gr.elot.acc.kbd   Sat Jan  2 04:42:53 2016
(r293047)
@@ -18,7 +18,7 @@
   009   '8''*'nopnop'8''*'nopnop O
   010   '9''('nopnop'9''('nopnop O
   011   '0'')'nopnop'0'')'nopnop O
-  012   '-''_'ns ns '-''_'ns ns  O
+  012   '-''_'us us '-''_'us us  O
   013   '=''+'nopnop'=''+'nopnop O
   014   bs bs deldelbs bs deldel O
   015   ht btab   nopnopht btab   nopnop O
@@ -90,7 +90,7 @@
   081   fkey59 '3''3''3''3''3''3''3' N
   082   fkey60 '0''0''0''0''0''0''0' N
   083   del'.''.''.''.''.'boot   bootN
-  084   ns ns ns ns ns ns ns ns  O
+  084   us us us us us us us us  O
   085   nopnopnopnopnopnopnopnop O
   086   '\''|'nopnop'\''|'nopnop O
   087   fkey11 fkey23 fkey35 fkey47 scr11  scr11  scr11  scr11   O
@@ -148,7 +148,7 @@
   137   '8''*'nopnop'8''*'nopnop O
   138   '9''('nopnop'9''('nopnop O
   139   '0'')'nopnop'0'')'nopnop O
-  140   '-''_'ns ns '-''_'ns ns  O
+  140   '-''_'us us '

Re: svn commit: r292955 - head/lib/libmd

2016-01-01 Thread Allan Jude
On 2015-12-31 13:50, Allan Jude wrote:
> On 2015-12-31 13:32, Jonathan T. Looney wrote:
>> On 12/31/15, 2:15 AM, "Allan Jude"  wrote:
>>
>>> It seems these problems also slow things down, a lot:
>>>
>>> # time md5 /media/md5test/bigdata
>>> MD5 (/media/md5test/bigdata) = 6afad0bf5d8318093e943229be05be67
>>> 4.310u 3.476s 0:07.79 99.8% 20+167k 0+0io 0pf+0w
>>> # time env LD_PRELOAD=/usr/obj/media/svn/md5/head/tmp/lib/libmd.so
>>> /usr/obj/media/svn/md5/head/sbin/md5/md5 /media/md5test/bigdata
>>> MD5 (/media/md5test/bigdata) = 6afad0bf5d8318093e943229be05be67
>>> 4.133u 0.354s 0:04.49 99.7% 20+167k 1+0io 0pf+0w
>>>
>>> (file is fully cached in ZFS ARC, dd reads it at 11GB/s)
>>>
>>> Will investigate more tomorrow.
>>
>> md5 will be slower than dd due to the extra processing it needs to do to
>> generate the hash. I suspect that explains the difference you're seeing
>> between those utilities.
>>
>> Jonathan
>>
>>
>>
> 
> Sorry, you missed my point here.
> 
> I replaced MDXFile() with the implementation included in my earlier
> email. Using the newer libmd with that code, cut the time to md5 the
> SAME data down a lot. I need to do a more scientific test on a box that
> isn't doing other stuff still though.
> 
> The comment about dd doing 11GB/s, was just to clarify that I wasn't
> reading the file from disk, which would introduce other variables.
> 

I found the cause of my bogus benchmark, the world on my test machine
was just old enough to be missing jmg@'s bufsize patch.

Now the difference is about 1 second on a 2GB file, so ignore my
foolishness.

-- 
Allan Jude



signature.asc
Description: OpenPGP digital signature