svn commit: r255625 - head/sys/kern

2013-09-17 Thread Gleb Smirnoff
Author: glebius
Date: Tue Sep 17 06:37:21 2013
New Revision: 255625
URL: http://svnweb.freebsd.org/changeset/base/255625

Log:
Fix assertion in sendfile_readpage() to assert only the validity
  of requested amount of data in a page. Move assertion down below
  object unlock.
  
  Approved by:  re (kib)
  Sponsored by: Nginx, Inc.
  Sponsored by: Netflix

Modified:
  head/sys/kern/uipc_syscalls.c

Modified: head/sys/kern/uipc_syscalls.c
==
--- head/sys/kern/uipc_syscalls.c   Tue Sep 17 04:24:34 2013
(r255624)
+++ head/sys/kern/uipc_syscalls.c   Tue Sep 17 06:37:21 2013
(r255625)
@@ -2076,10 +2076,10 @@ free_page:
vm_page_free(m);
vm_page_unlock(m);
}
-   VM_OBJECT_WUNLOCK(obj);
-   KASSERT(error != 0 || (m-wire_count  0  m-valid ==
-   VM_PAGE_BITS_ALL),
+   KASSERT(error != 0 || (m-wire_count  0 
+   vm_page_is_valid(m, off  PAGE_MASK, xfsize)),
(wrong page state m %p, m));
+   VM_OBJECT_WUNLOCK(obj);
return (error);
 }
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r255626 - head/sys/vm

2013-09-17 Thread Konstantin Belousov
Author: kib
Date: Tue Sep 17 07:35:26 2013
New Revision: 255626
URL: http://svnweb.freebsd.org/changeset/base/255626

Log:
  PG_SLAB no longer serves a useful purpose, since m-object is no
  longer abused to store pointer to slab. Remove it.
  
  Reviewed by:alc
  Sponsored by:   The FreeBSD Foundation
  Approved by:  re (hrs)

Modified:
  head/sys/vm/uma_int.h
  head/sys/vm/vm_page.c
  head/sys/vm/vm_page.h
  head/sys/vm/vm_reserv.c

Modified: head/sys/vm/uma_int.h
==
--- head/sys/vm/uma_int.h   Tue Sep 17 06:37:21 2013(r255625)
+++ head/sys/vm/uma_int.h   Tue Sep 17 07:35:26 2013(r255626)
@@ -404,15 +404,9 @@ static __inline uma_slab_t
 vtoslab(vm_offset_t va)
 {
vm_page_t p;
-   uma_slab_t slab;
 
p = PHYS_TO_VM_PAGE(pmap_kextract(va));
-   slab = (uma_slab_t )p-plinks.s.pv;
-
-   if (p-flags  PG_SLAB)
-   return (slab);
-   else
-   return (NULL);
+   return ((uma_slab_t)p-plinks.s.pv);
 }
 
 static __inline void
@@ -422,7 +416,6 @@ vsetslab(vm_offset_t va, uma_slab_t slab
 
p = PHYS_TO_VM_PAGE(pmap_kextract(va));
p-plinks.s.pv = slab;
-   p-flags |= PG_SLAB;
 }
 
 /*

Modified: head/sys/vm/vm_page.c
==
--- head/sys/vm/vm_page.c   Tue Sep 17 06:37:21 2013(r255625)
+++ head/sys/vm/vm_page.c   Tue Sep 17 07:35:26 2013(r255626)
@@ -968,8 +968,7 @@ vm_page_insert_after(vm_page_t m, vm_obj
KASSERT(m-object == NULL,
(vm_page_insert_after: page already inserted));
if (mpred != NULL) {
-   KASSERT(mpred-object == object ||
-   (mpred-flags  PG_SLAB) != 0,
+   KASSERT(mpred-object == object,
(vm_page_insert_after: object doesn't contain mpred));
KASSERT(mpred-pindex  pindex,
(vm_page_insert_after: mpred doesn't precede pindex));
@@ -1019,8 +1018,7 @@ vm_page_insert_radixdone(vm_page_t m, vm
KASSERT(object != NULL  m-object == object,
(vm_page_insert_radixdone: page %p has inconsistent object, m));
if (mpred != NULL) {
-   KASSERT(mpred-object == object ||
-   (mpred-flags  PG_SLAB) != 0,
+   KASSERT(mpred-object == object,
(vm_page_insert_after: object doesn't contain mpred));
KASSERT(mpred-pindex  m-pindex,
(vm_page_insert_after: mpred doesn't precede pindex));

Modified: head/sys/vm/vm_page.h
==
--- head/sys/vm/vm_page.h   Tue Sep 17 06:37:21 2013(r255625)
+++ head/sys/vm/vm_page.h   Tue Sep 17 07:35:26 2013(r255626)
@@ -325,7 +325,6 @@ extern struct mtx_padalign pa_lock[];
 #definePG_FICTITIOUS   0x0004  /* physical page doesn't exist 
*/
 #definePG_ZERO 0x0008  /* page is zeroed */
 #definePG_MARKER   0x0010  /* special queue marker page */
-#definePG_SLAB 0x0020  /* object pointer is actually a 
slab */
 #definePG_WINATCFLS0x0040  /* flush dirty page on inactive 
q */
 #definePG_NODUMP   0x0080  /* don't include this page in a 
dump */
 #definePG_UNHOLDFREE   0x0100  /* delayed free of a held page 
*/

Modified: head/sys/vm/vm_reserv.c
==
--- head/sys/vm/vm_reserv.c Tue Sep 17 06:37:21 2013(r255625)
+++ head/sys/vm/vm_reserv.c Tue Sep 17 07:35:26 2013(r255626)
@@ -502,8 +502,7 @@ vm_reserv_alloc_page(vm_object_t object,
 * Look for an existing reservation.
 */
if (mpred != NULL) {
-   KASSERT(mpred-object == object ||
-   (mpred-flags  PG_SLAB) != 0,
+   KASSERT(mpred-object == object,
(vm_reserv_alloc_page: object doesn't contain mpred));
KASSERT(mpred-pindex  pindex,
(vm_reserv_alloc_page: mpred doesn't precede pindex));
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r255627 - head/share/mk

2013-09-17 Thread Dag-Erling Smørgrav
Author: des
Date: Tue Sep 17 07:41:08 2013
New Revision: 255627
URL: http://svnweb.freebsd.org/changeset/base/255627

Log:
  Set the correct path for LIBUNBOUND.
  
  Approved by:  re (blanket)

Modified:
  head/share/mk/bsd.libnames.mk

Modified: head/share/mk/bsd.libnames.mk
==
--- head/share/mk/bsd.libnames.mk   Tue Sep 17 07:35:26 2013
(r255626)
+++ head/share/mk/bsd.libnames.mk   Tue Sep 17 07:41:08 2013
(r255627)
@@ -165,7 +165,7 @@ LIBUFS?=${DESTDIR}${LIBDIR}/libufs.a
 LIBUGIDFW?=${DESTDIR}${LIBDIR}/libugidfw.a
 LIBUMEM?=  ${DESTDIR}${LIBDIR}/libumem.a
 .if ${MK_UNBOUND} != no
-LIBUNBOUND?=   ${DESTDIR}${LIBDIR}/libunbound.a
+LIBUNBOUND?=   ${DESTDIR}${LIBPRIVATEDIR}/libunbound.a
 .endif
 LIBUSBHID?=${DESTDIR}${LIBDIR}/libusbhid.a
 LIBUSB?=   ${DESTDIR}${LIBDIR}/libusb.a
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r255628 - svnadmin/conf

2013-09-17 Thread Edward Tomasz Napierala
Author: trasz
Date: Tue Sep 17 08:43:12 2013
New Revision: 255628
URL: http://svnweb.freebsd.org/changeset/base/255628

Log:
  Explicitly require Security Officer's approval for kernel PRNG bits.
  
  Note that there is ongoing discussion about approval requirement
  for userland PRNG bits.
  
  Reviewed by:  so (des)
  Approved by:  core (jhb)

Modified:
  svnadmin/conf/approvers

Modified: svnadmin/conf/approvers
==
--- svnadmin/conf/approvers Tue Sep 17 07:41:08 2013(r255627)
+++ svnadmin/conf/approvers Tue Sep 17 08:43:12 2013(r255628)
@@ -32,3 +32,7 @@
 ^svnadmin/conf/approvers   (core|re)
 ^svnadmin/conf/access  core
 ^head/LOCKScore
+^head/sys/dev/random   (security-officer|so|secteam|core)
+^head/sys/libkern/arc4random.c (security-officer|so|secteam|core)
+^stable/[7-9]/sys/dev/random   (security-officer|so|secteam|core)
+^stable/[7-9]/sys/libkern/arc4random.c (security-officer|so|secteam|core)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r255613 - head/sys/arm/arm

2013-09-17 Thread Zbigniew Bodek
2013/9/16 Ed Schouten e...@80386.nl

 2013/9/16 Zbigniew Bodek z...@freebsd.org:
  Log:
Fix GCC build error when building for ARMv6
 
Apply theravens's idea to move __strong_reference
macros into the proper ifdef section.
 
Approved by:  cognet (mentor)
Approved by:  re
 
  Modified:
head/sys/arm/arm/stdatomic.c

 For some reason, this still breaks the build of the AVILA kernel:

 Hello Ed,

You mean that this doesn't help for AVILA?
To be precise the patch is for ARMv6/v7 issues and AVILA is ARMv5te?

Nevertheless if the problem occurs for ARMs  v6 then another patch for
that needs to be done.

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


Re: svn commit: r255613 - head/sys/arm/arm

2013-09-17 Thread Zbigniew Bodek
2013/9/17 Zbigniew Bodek z...@freebsd.org

 2013/9/16 Ed Schouten e...@80386.nl

 2013/9/16 Zbigniew Bodek z...@freebsd.org:
  Log:
Fix GCC build error when building for ARMv6
 
Apply theravens's idea to move __strong_reference
macros into the proper ifdef section.
 
Approved by:  cognet (mentor)
Approved by:  re
 
  Modified:
head/sys/arm/arm/stdatomic.c

 For some reason, this still breaks the build of the AVILA kernel:

 Hello Ed,

 You mean that this doesn't help for AVILA?
 To be precise the patch is for ARMv6/v7 issues and AVILA is ARMv5te?

 Nevertheless if the problem occurs for ARMs  v6 then another patch for
 that needs to be done.

 Best regards
 Zbyszek


Hello again Ed,

Can you test this one:
http://people.freebsd.org/~zbb/arm/other/stdatomic_fix_vol2.diff

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


Re: svn commit: r255628 - svnadmin/conf

2013-09-17 Thread Gleb Smirnoff
  Edward,

On Tue, Sep 17, 2013 at 08:43:12AM +, Edward Tomasz Napierala wrote:
E Modified: svnadmin/conf/approvers
E 
==
E --- svnadmin/conf/approvers  Tue Sep 17 07:41:08 2013(r255627)
E +++ svnadmin/conf/approvers  Tue Sep 17 08:43:12 2013(r255628)
E @@ -32,3 +32,7 @@
E  ^svnadmin/conf/approvers(core|re)
E  ^svnadmin/conf/access   core
E  ^head/LOCKS core
E +^head/sys/dev/random(security-officer|so|secteam|core)
E +^head/sys/libkern/arc4random.c  (security-officer|so|secteam|core)
E +^stable/[7-9]/sys/dev/random(security-officer|so|secteam|core)
E +^stable/[7-9]/sys/libkern/arc4random.c  
(security-officer|so|secteam|core)

stable/10 won't match.

I'd suggest ^stable/[0-9]+/sys

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


svn commit: r255629 - in head: include usr.sbin/gpioctl

2013-09-17 Thread Sean Bruno
Author: sbruno
Date: Tue Sep 17 11:48:47 2013
New Revision: 255629
URL: http://svnweb.freebsd.org/changeset/base/255629

Log:
  Assume that the -f argument is /dev/gpioc0 if it is not passed.
  
  hrs@ provided this verison of the patch and showed me where all the needed
  changes were to be made outside of gpioctl.c
  
  Approved by:  re (hrs)
  MFC after:2 weeks

Modified:
  head/include/paths.h
  head/usr.sbin/gpioctl/gpioctl.8
  head/usr.sbin/gpioctl/gpioctl.c

Modified: head/include/paths.h
==
--- head/include/paths.hTue Sep 17 08:43:12 2013(r255628)
+++ head/include/paths.hTue Sep 17 11:48:47 2013(r255629)
@@ -50,6 +50,7 @@
 #define_PATH_CSHELL/bin/csh
 #define_PATH_CSMAPPER  /usr/share/i18n/csmapper
 #define_PATH_DEFTAPE   /dev/sa0
+#define_PATH_DEVGPIOC  /dev/gpioc
 #define_PATH_DEVNULL   /dev/null
 #define_PATH_DEVZERO   /dev/zero
 #define_PATH_DRUM  /dev/drum

Modified: head/usr.sbin/gpioctl/gpioctl.8
==
--- head/usr.sbin/gpioctl/gpioctl.8 Tue Sep 17 08:43:12 2013
(r255628)
+++ head/usr.sbin/gpioctl/gpioctl.8 Tue Sep 17 11:48:47 2013
(r255629)
@@ -36,20 +36,20 @@
 .Sh SYNOPSIS
 .Nm
 .Cm -l
-.Fl f Ar ctldev
+.Op Fl f Ar ctldev
 .Op Fl v
 .Nm
 .Cm -t
-.Fl f Ar ctldev
+.Op Fl f Ar ctldev
 .Ar pin
 .Nm
 .Cm -c
-.Fl f Ar ctldev
+.Op Fl f Ar ctldev
 .Ar pin
 .Ar flag
 .Op flag ...
 .Nm
-.Cm -f Ar ctldev
+.Op Cm -f Ar ctldev
 .Ar pin
 .Ar [0|1]
 .Sh DESCRIPTION
@@ -83,6 +83,8 @@ Inverted output pin
 .El
 .It Fl f Ar ctldev
 GPIO controller device to use
+If not specified, defaults to
+.Pa /dev/gpioc0
 .It Fl l
 list available pins
 .It Fl t Ar pin

Modified: head/usr.sbin/gpioctl/gpioctl.c
==
--- head/usr.sbin/gpioctl/gpioctl.c Tue Sep 17 08:43:12 2013
(r255628)
+++ head/usr.sbin/gpioctl/gpioctl.c Tue Sep 17 11:48:47 2013
(r255629)
@@ -30,6 +30,7 @@ __FBSDID($FreeBSD$);
 
 #include fcntl.h
 #include getopt.h
+#include paths.h
 #include stdio.h
 #include stdarg.h
 #include stdlib.h
@@ -63,10 +64,10 @@ static void
 usage(void)
 {
fprintf(stderr, Usage:\n);
-   fprintf(stderr, \tgpioctl -f ctldev -l [-v]\n);
-   fprintf(stderr, \tgpioctl -f ctldev -t pin\n);
-   fprintf(stderr, \tgpioctl -f ctldev -c pin flag ...\n);
-   fprintf(stderr, \tgpioctl -f ctldev pin [0|1]\n);
+   fprintf(stderr, \tgpioctl [-f ctldev] -l [-v]\n);
+   fprintf(stderr, \tgpioctl [-f ctldev] -t pin\n);
+   fprintf(stderr, \tgpioctl [-f ctldev] -c pin flag ...\n);
+   fprintf(stderr, \tgpioctl [-f ctldev] pin [0|1]\n);
exit(1);
 }
 
@@ -185,6 +186,7 @@ main(int argc, char **argv)
int i;
struct gpio_pin pin;
struct gpio_req req;
+   char defctlfile[] = _PATH_DEVGPIOC 0;
char *ctlfile = NULL;
int pinn, pinv, fd, ch;
int flags, flag, ok;
@@ -226,7 +228,7 @@ main(int argc, char **argv)
printf(%d/%s\n, i, argv[i]);
 
if (ctlfile == NULL)
-   fail(No gpioctl device provided\n);
+   ctlfile = defctlfile;
 
fd = open(ctlfile, O_RDONLY);
if (fd  0) {
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r255630 - stable/9/sys/dev/usb

2013-09-17 Thread Hans Petter Selasky
Author: hselasky
Date: Tue Sep 17 12:50:57 2013
New Revision: 255630
URL: http://svnweb.freebsd.org/changeset/base/255630

Log:
  MFC r248246:
  
  - Make quirk for reading device descriptor from broken USB devices.
  Else they won't enumerate at all:
  hw.usb.full_ddesc=1
  - Reduce the USB descriptor read timeout from 1000ms to
  500ms. Typical value for LOW speed devices is 50-100ms.
  - Enumerate USB device a maximum of 3 times when a port
  connection change event is detected, before giving up.

Modified:
  stable/9/sys/dev/usb/usb_device.c
  stable/9/sys/dev/usb/usb_request.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/usb/usb_device.c
==
--- stable/9/sys/dev/usb/usb_device.c   Tue Sep 17 11:48:47 2013
(r255629)
+++ stable/9/sys/dev/usb/usb_device.c   Tue Sep 17 12:50:57 2013
(r255630)
@@ -1673,10 +1673,14 @@ usb_alloc_device(device_t parent_dev, st
err = usbd_setup_device_desc(udev, NULL);
 
if (err != 0) {
-   /* XXX try to re-enumerate the device */
+   /* try to enumerate two more times */
err = usbd_req_re_enumerate(udev, NULL);
-   if (err)
-   goto done;
+   if (err != 0) {
+   err = usbd_req_re_enumerate(udev, NULL);
+   if (err != 0) {
+   goto done;
+   }
+   }
}
 
/*

Modified: stable/9/sys/dev/usb/usb_request.c
==
--- stable/9/sys/dev/usb/usb_request.c  Tue Sep 17 11:48:47 2013
(r255629)
+++ stable/9/sys/dev/usb/usb_request.c  Tue Sep 17 12:50:57 2013
(r255630)
@@ -71,6 +71,11 @@ static int usb_no_cs_fail;
 SYSCTL_INT(_hw_usb, OID_AUTO, no_cs_fail, CTLFLAG_RW,
 usb_no_cs_fail, 0, USB clear stall failures are ignored, if set);
 
+static int usb_full_ddesc;
+
+SYSCTL_INT(_hw_usb, OID_AUTO, full_ddesc, CTLFLAG_RW,
+usb_full_ddesc, 0, USB always read complete device descriptor, if set);
+
 #ifdef USB_DEBUG
 #ifdef USB_REQ_DEBUG
 /* The following structures are used in connection to fault injection. */
@@ -996,7 +1001,7 @@ usbd_req_get_desc(struct usb_device *ude
USETW(req.wLength, min_len);
 
err = usbd_do_request_flags(udev, mtx, req,
-   desc, 0, NULL, 1000);
+   desc, 0, NULL, 500 /* ms */);
 
if (err) {
if (!retries) {
@@ -1881,32 +1886,41 @@ usbd_setup_device_desc(struct usb_device
 */
switch (udev-speed) {
case USB_SPEED_FULL:
-   case USB_SPEED_LOW:
+   if (usb_full_ddesc != 0) {
+   /* get full device descriptor */
+   err = usbd_req_get_device_desc(udev, mtx, udev-ddesc);
+   if (err == 0)
+   break;
+   }
+
+   /* get partial device descriptor, some devices crash on this */
err = usbd_req_get_desc(udev, mtx, NULL, udev-ddesc,
USB_MAX_IPACKET, USB_MAX_IPACKET, 0, UDESC_DEVICE, 0, 0);
-   if (err != 0) {
-   DPRINTFN(0, getting device descriptor 
-   at addr %d failed, %s\n, udev-address,
-   usbd_errstr(err));
-   return (err);
-   }
+   if (err != 0)
+   break;
+
+   /* get the full device descriptor */
+   err = usbd_req_get_device_desc(udev, mtx, udev-ddesc);
break;
+
default:
DPRINTF(Minimum MaxPacketSize is large enough 
-   to hold the complete device descriptor\n);
-   break;
-   }
+   to hold the complete device descriptor or 
+   only once MaxPacketSize choice\n);
 
-   /* get the full device descriptor */
-   err = usbd_req_get_device_desc(udev, mtx, udev-ddesc);
-
-   /* try one more time, if error */
-   if (err)
+   /* get the full device descriptor */
err = usbd_req_get_device_desc(udev, mtx, udev-ddesc);
 
-   if (err) {
-   DPRINTF(addr=%d, getting full desc failed\n,
-   udev-address);
+   /* try one more time, if error */
+   if (err != 0)
+   err = usbd_req_get_device_desc(udev, mtx, udev-ddesc);
+   break;
+   }
+
+   if (err != 0) {
+   DPRINTFN(0, getting device descriptor 
+   at addr %d failed, %s\n, udev-address,
+   usbd_errstr(err));
return (err);
}
 
___
svn-src-all@freebsd.org 

svn commit: r255631 - stable/9/sys/dev/usb/input

2013-09-17 Thread Hans Petter Selasky
Author: hselasky
Date: Tue Sep 17 12:53:09 2013
New Revision: 255631
URL: http://svnweb.freebsd.org/changeset/base/255631

Log:
  MFC r254572:
  Force keyboards which don't have the required
  HID fields to use the USB BOOT protocol for now.
  
  PR:   usb/181425

Modified:
  stable/9/sys/dev/usb/input/ukbd.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/usb/input/ukbd.c
==
--- stable/9/sys/dev/usb/input/ukbd.c   Tue Sep 17 12:50:57 2013
(r255630)
+++ stable/9/sys/dev/usb/input/ukbd.c   Tue Sep 17 12:53:09 2013
(r255631)
@@ -1126,8 +1126,12 @@ ukbd_parse_hid(struct ukbd_softc *sc, co
HID_USAGE2(HUP_KEYBOARD, 0x00),
hid_input, 0, sc-sc_loc_events, flags,
sc-sc_id_events)) {
-   sc-sc_flags |= UKBD_FLAG_EVENTS;
-   DPRINTFN(1, Found keyboard events\n);
+   if (flags  HIO_VARIABLE) {
+   DPRINTFN(1, Ignoring keyboard event control\n);
+   } else {
+   sc-sc_flags |= UKBD_FLAG_EVENTS;
+   DPRINTFN(1, Found keyboard event array\n);
+   }
}
 
/* figure out leds on keyboard */
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r255632 - stable/8/sys/dev/usb

2013-09-17 Thread Hans Petter Selasky
Author: hselasky
Date: Tue Sep 17 12:56:37 2013
New Revision: 255632
URL: http://svnweb.freebsd.org/changeset/base/255632

Log:
  MFC r248246:
  
  - Make quirk for reading device descriptor from broken USB devices.
  Else they won't enumerate at all:
  hw.usb.full_ddesc=1
  - Reduce the USB descriptor read timeout from 1000ms to
  500ms. Typical value for LOW speed devices is 50-100ms.
  - Enumerate USB device a maximum of 3 times when a port
  connection change event is detected, before giving up.

Modified:
  stable/8/sys/dev/usb/usb_device.c
  stable/8/sys/dev/usb/usb_request.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/dev/   (props changed)
  stable/8/sys/dev/usb/   (props changed)

Modified: stable/8/sys/dev/usb/usb_device.c
==
--- stable/8/sys/dev/usb/usb_device.c   Tue Sep 17 12:53:09 2013
(r255631)
+++ stable/8/sys/dev/usb/usb_device.c   Tue Sep 17 12:56:37 2013
(r255632)
@@ -1673,10 +1673,14 @@ usb_alloc_device(device_t parent_dev, st
err = usbd_setup_device_desc(udev, NULL);
 
if (err != 0) {
-   /* XXX try to re-enumerate the device */
+   /* try to enumerate two more times */
err = usbd_req_re_enumerate(udev, NULL);
-   if (err)
-   goto done;
+   if (err != 0) {
+   err = usbd_req_re_enumerate(udev, NULL);
+   if (err != 0) {
+   goto done;
+   }
+   }
}
 
/*

Modified: stable/8/sys/dev/usb/usb_request.c
==
--- stable/8/sys/dev/usb/usb_request.c  Tue Sep 17 12:53:09 2013
(r255631)
+++ stable/8/sys/dev/usb/usb_request.c  Tue Sep 17 12:56:37 2013
(r255632)
@@ -71,6 +71,11 @@ static int usb_no_cs_fail;
 SYSCTL_INT(_hw_usb, OID_AUTO, no_cs_fail, CTLFLAG_RW,
 usb_no_cs_fail, 0, USB clear stall failures are ignored, if set);
 
+static int usb_full_ddesc;
+
+SYSCTL_INT(_hw_usb, OID_AUTO, full_ddesc, CTLFLAG_RW,
+usb_full_ddesc, 0, USB always read complete device descriptor, if set);
+
 #ifdef USB_DEBUG
 #ifdef USB_REQ_DEBUG
 /* The following structures are used in connection to fault injection. */
@@ -996,7 +1001,7 @@ usbd_req_get_desc(struct usb_device *ude
USETW(req.wLength, min_len);
 
err = usbd_do_request_flags(udev, mtx, req,
-   desc, 0, NULL, 1000);
+   desc, 0, NULL, 500 /* ms */);
 
if (err) {
if (!retries) {
@@ -1881,32 +1886,41 @@ usbd_setup_device_desc(struct usb_device
 */
switch (udev-speed) {
case USB_SPEED_FULL:
-   case USB_SPEED_LOW:
+   if (usb_full_ddesc != 0) {
+   /* get full device descriptor */
+   err = usbd_req_get_device_desc(udev, mtx, udev-ddesc);
+   if (err == 0)
+   break;
+   }
+
+   /* get partial device descriptor, some devices crash on this */
err = usbd_req_get_desc(udev, mtx, NULL, udev-ddesc,
USB_MAX_IPACKET, USB_MAX_IPACKET, 0, UDESC_DEVICE, 0, 0);
-   if (err != 0) {
-   DPRINTFN(0, getting device descriptor 
-   at addr %d failed, %s\n, udev-address,
-   usbd_errstr(err));
-   return (err);
-   }
+   if (err != 0)
+   break;
+
+   /* get the full device descriptor */
+   err = usbd_req_get_device_desc(udev, mtx, udev-ddesc);
break;
+
default:
DPRINTF(Minimum MaxPacketSize is large enough 
-   to hold the complete device descriptor\n);
-   break;
-   }
+   to hold the complete device descriptor or 
+   only once MaxPacketSize choice\n);
 
-   /* get the full device descriptor */
-   err = usbd_req_get_device_desc(udev, mtx, udev-ddesc);
-
-   /* try one more time, if error */
-   if (err)
+   /* get the full device descriptor */
err = usbd_req_get_device_desc(udev, mtx, udev-ddesc);
 
-   if (err) {
-   DPRINTF(addr=%d, getting full desc failed\n,
-   udev-address);
+   /* try one more time, if error */
+   if (err != 0)
+   err = usbd_req_get_device_desc(udev, mtx, udev-ddesc);
+   break;
+   }
+
+   if (err != 0) {
+   DPRINTFN(0, getting device descriptor 
+   at addr %d failed, %s\n, udev-address,
+   usbd_errstr(err));
return (err);
}
 

svn commit: r255633 - stable/8/sys/dev/usb/input

2013-09-17 Thread Hans Petter Selasky
Author: hselasky
Date: Tue Sep 17 12:58:17 2013
New Revision: 255633
URL: http://svnweb.freebsd.org/changeset/base/255633

Log:
  MFC r254572:
  Force keyboards which don't have the required
  HID fields to use the USB BOOT protocol for now.
  
  PR:   usb/181425

Modified:
  stable/8/sys/dev/usb/input/ukbd.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/dev/   (props changed)
  stable/8/sys/dev/usb/   (props changed)

Modified: stable/8/sys/dev/usb/input/ukbd.c
==
--- stable/8/sys/dev/usb/input/ukbd.c   Tue Sep 17 12:56:37 2013
(r255632)
+++ stable/8/sys/dev/usb/input/ukbd.c   Tue Sep 17 12:58:17 2013
(r255633)
@@ -1118,8 +1118,12 @@ ukbd_parse_hid(struct ukbd_softc *sc, co
HID_USAGE2(HUP_KEYBOARD, 0x00),
hid_input, 0, sc-sc_loc_events, flags,
sc-sc_id_events)) {
-   sc-sc_flags |= UKBD_FLAG_EVENTS;
-   DPRINTFN(1, Found keyboard events\n);
+   if (flags  HIO_VARIABLE) {
+   DPRINTFN(1, Ignoring keyboard event control\n);
+   } else {
+   sc-sc_flags |= UKBD_FLAG_EVENTS;
+   DPRINTFN(1, Found keyboard event array\n);
+   }
}
 
/* figure out leds on keyboard */
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r255634 - head

2013-09-17 Thread Dag-Erling Smørgrav
Author: des
Date: Tue Sep 17 12:59:37 2013
New Revision: 255634
URL: http://svnweb.freebsd.org/changeset/base/255634

Log:
  Add unbound to the list of UIDs / GIDs to check fore before installing.
  
  Approved by:  re (blanket)

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Tue Sep 17 12:58:17 2013(r255633)
+++ head/Makefile.inc1  Tue Sep 17 12:59:37 2013(r255634)
@@ -709,6 +709,10 @@ CHECK_GIDS+=   smmsp
 CHECK_UIDS+=   proxy
 CHECK_GIDS+=   proxy authpf
 .endif
+.if ${MK_UNBOUND} != no
+CHECK_UIDS+=   unbound
+CHECK_GIDS+=   unbound
+.endif
 installcheck_UGID:
 .for uid in ${CHECK_UIDS}
@if ! `id -u ${uid} /dev/null 21`; then \
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r255634 - head

2013-09-17 Thread Bryan Drewery
On 9/17/2013 7:59 AM, Dag-Erling Smørgrav wrote:
 Author: des
 Date: Tue Sep 17 12:59:37 2013
 New Revision: 255634
 URL: http://svnweb.freebsd.org/changeset/base/255634
 
 Log:
   Add unbound to the list of UIDs / GIDs to check fore before installing.
   
   Approved by:re (blanket)
 
 Modified:
   head/Makefile.inc1
 
 Modified: head/Makefile.inc1
 ==
 --- head/Makefile.inc1Tue Sep 17 12:58:17 2013(r255633)
 +++ head/Makefile.inc1Tue Sep 17 12:59:37 2013(r255634)
 @@ -709,6 +709,10 @@ CHECK_GIDS+= smmsp
  CHECK_UIDS+= proxy
  CHECK_GIDS+= proxy authpf
  .endif
 +.if ${MK_UNBOUND} != no

Hm, I know you noticed this, but by making this conditional, it will not
check if building WITHOUT_UNBOUND, but the passwd and mtree files are
still using it and will blow up.

All of these conditions should probably be removed until a better
mechanism for passwd/mtree can be thought up.


 +CHECK_UIDS+= unbound
 +CHECK_GIDS+= unbound
 +.endif
  installcheck_UGID:
  .for uid in ${CHECK_UIDS}
   @if ! `id -u ${uid} /dev/null 21`; then \
 ___
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
 


-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r255486 - in head/lib/libc: gen sys

2013-09-17 Thread Bryan Drewery
On 9/12/2013 8:15 AM, Bruce Evans wrote:
 On Thu, 12 Sep 2013, Bryan Drewery wrote:
 
 On 9/12/2013 6:36 AM, Hiroki Sato wrote:
 Bryan Drewery bdrew...@freebsd.org wrote
   in 201309120053.r8c0rc7h082...@svn.freebsd.org:

 bd Author: bdrewery (ports committer)
 bd Date: Thu Sep 12 00:53:38 2013
 bd New Revision: 255486
 bd URL: http://svnweb.freebsd.org/changeset/base/255486
 bd
 bd Log:
 bd   Consistently reference file descriptors as fd. 55 other manpages
 
 Inconsistently...
 
 bd   used fd, while these used d and filedes.
 
 ... About 57 man pages (counting links multiply) in /usr/share/man[23]
 still use the POSIX spelling fildes.

Yes I see I did miss a few.

 
 POSIX never uses the spelling filedes, at least in the old 2001
 draft7.txt.  But it is inconsistent between fildes and fd.  In the
 old draft, it uses int fildes on 67 lines (including for most of the
 functions changed in this commit).  It uses int fd on 40 lines.  But
 most of the latter are not for prototypes.  The only exceptions are
 for posix_fadvise() and posix_fallocate().
 
 Anyway, this change mainly improves d to fd.  filedes - fd is not
 so clearly an improvement, but filedes was only used in a couple of
 files and thus rarely changed.
 
 I think chroot.2 still has the grammar error filedescriptors in
 descriptions.  Normal English grammar file descriptors is used in
 about 872 man pages (counting links multiply) in /usr/share/man[23].

I am mostly interested at the moment in updating the variable names, and
not the descriptions.

 
 bd
 bd   MFC after:1 week
 bd   Approved by:gjb
 bd   Approved by:re (delphij)

  I think this kind of changes need a consensus because several POSIX
  functions use filedes in the specification document.  r254484 by
  pjd was a similar change (s/type/af/ in gethostbyaddr()).

  In SUSv4, fdopen() uses filedes and openat() uses fd, for
  example.  Consistency throughout our manual pages is generally good.
  However, I also see the benefit of using the same expression as the
  specification even if it is inconsistent.  What do you think?
 
 Does it really use filedes?  POSIX still never uses this in the 2007
 draft (austin-d2r.pdf).  It uses fildes for fdopen(), but fd for
 fdopendir() and openat().  It still uses fd for posix_fadvise() and
 posix_fallocate().  I now think that the fds in POSIX are just
 style bugs.  The normal fildes had only rotted to fd in 2 places
 in 2001, but rotted much further in 2007.
 
 If we ever copied the POSIX spec to improve FreeBSD man pages, then
 it would be painful to make any changes to the text (other than
 deshallify, and I wouldn't trust that either).  FreeBSD now copies the
 POSIX inconsistencies for fildes vs fd for at least fdopen() and
 fdopendir(), although it doesn't copy whole sections of POSIX for these
 functions (or any at all?).
 
 I did notice that 'filedes' was referenced in some specs, but it's very
 weird to open multiple manpages and expect 'fd' and find 'd' and rework
 my brain to understand that 'd' or 'filedes' is just a 'fd'. Takes a
 second of thinking.

 It was surprising to me when I noticed it, especially given how many
 used 'fd'.
 
 fd is a good abbreviation, but fildes is more formal.  I actually
 prefer fd throughout.  fildes is not such a good abbreviation, since
 it is half-way.  Using both is just a style bug that is not quite as
 confusing as using d and fd.  Using d, fd, fildes and filedes
 was a larger style bug.
 
 Bruce

Should I revert until we can have more discussion on this and what
impact it has on maintaining the manpages?

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r255635 - head

2013-09-17 Thread Edward Tomasz Napierala
Author: trasz
Date: Tue Sep 17 14:19:05 2013
New Revision: 255635
URL: http://svnweb.freebsd.org/changeset/base/255635

Log:
  Explicitly require Security Officer's approval for kernel PRNG bits.
  
  Note that there is ongoing discussion about approval requirement
  for userland PRNG bits.
  
  Reviewed by:  so (des)
  Approved by:  core (jhb)
  Approved by:  re (gjb)

Modified:
  head/LOCKS

Modified: head/LOCKS
==
--- head/LOCKS  Tue Sep 17 12:59:37 2013(r255634)
+++ head/LOCKS  Tue Sep 17 14:19:05 2013(r255635)
@@ -12,3 +12,7 @@ releng/5.*Requires Security Officer app
 releng/6.* Requires Security Officer approval.
 releng/7.* Requires Security Officer approval.
 releng/8.* Requires Security Officer approval.
+head/sys/dev/randomRequires Security Officer approval.
+head/sys/libkern/arc4random.c  Requires Security Officer approval.
+stable/*/sys/dev/randomRequires Security Officer 
approval.
+stable/*/sys/libkern/arc4random.c  Requires Security Officer approval.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r255636 - head/usr.sbin/iscsid

2013-09-17 Thread Edward Tomasz Napierala
Author: trasz
Date: Tue Sep 17 14:23:15 2013
New Revision: 255636
URL: http://svnweb.freebsd.org/changeset/base/255636

Log:
  Improve iSCSI address resolution, fixing InitiatorAddress handling,
  and error reporting.
  
  Approved by:  re (kib)

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

Modified: head/usr.sbin/iscsid/iscsid.c
==
--- head/usr.sbin/iscsid/iscsid.c   Tue Sep 17 14:19:05 2013
(r255635)
+++ head/usr.sbin/iscsid/iscsid.c   Tue Sep 17 14:23:15 2013
(r255636)
@@ -76,8 +76,9 @@ checked_strdup(const char *s)
return (c);
 }
 
-static int
-resolve_addr(const char *address, struct addrinfo **ai)
+static void
+resolve_addr(const struct connection *conn, const char *address,
+struct addrinfo **ai, bool initiator_side)
 {
struct addrinfo hints;
char *arg, *addr, *ch;
@@ -87,8 +88,8 @@ resolve_addr(const char *address, struct
arg = checked_strdup(address);
 
if (arg[0] == '\0') {
-   log_warnx(empty address);
-   return (1);
+   fail(conn, empty address);
+   log_errx(1, empty address);
}
if (arg[0] == '[') {
/*
@@ -97,16 +98,16 @@ resolve_addr(const char *address, struct
arg++;
addr = strsep(arg, ]);
if (arg == NULL) {
-   log_warnx(invalid address %s, address);
-   return (1);
+   fail(conn, malformed address);
+   log_errx(1, malformed address %s, address);
}
if (arg[0] == '\0') {
-   port = 3260;
+   port = NULL;
} else if (arg[0] == ':') {
port = arg + 1;
} else {
-   log_warnx(invalid address %s, address);
-   return (1);
+   fail(conn, malformed address);
+   log_errx(1, malformed address %s, address);
}
} else {
/*
@@ -119,29 +120,32 @@ resolve_addr(const char *address, struct
}
if (colons  1) {
addr = arg;
-   port = 3260;
+   port = NULL;
} else {
addr = strsep(arg, :);
if (arg == NULL)
-   port = 3260;
+   port = NULL;
else
port = arg;
}
}
 
+   if (port == NULL  !initiator_side)
+   port = 3260;
+
memset(hints, 0, sizeof(hints));
hints.ai_family = PF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
-   hints.ai_flags = AI_PASSIVE;
+   hints.ai_flags = AI_ADDRCONFIG | AI_NUMERICSERV;
+   if (initiator_side)
+   hints.ai_flags |= AI_PASSIVE;
 
error = getaddrinfo(addr, port, hints, ai);
if (error != 0) {
-   log_warnx(getaddrinfo for %s failed: %s,
+   fail(conn, gai_strerror(error));
+   log_errx(1, getaddrinfo for %s failed: %s,
address, gai_strerror(error));
-   return (1);
}
-
-   return (0);
 }
 
 static struct connection *
@@ -172,6 +176,8 @@ connection_new(unsigned int session_id, 
conn-conn_first_burst_length = 65536;
 
conn-conn_session_id = session_id;
+   conn-conn_iscsi_fd = iscsi_fd;
+
/*
 * XXX: Should we sanitize this somehow?
 */
@@ -180,20 +186,12 @@ connection_new(unsigned int session_id, 
from_addr = conn-conn_conf.isc_initiator_addr;
to_addr = conn-conn_conf.isc_target_addr;
 
-   if (from_addr[0] != '\0') {
-   error = resolve_addr(from_addr, from_ai);
-   if (error != 0)
-   log_errx(1, failed to resolve initiator address %s,
-   from_addr);
-   } else {
+   if (from_addr[0] != '\0')
+   resolve_addr(conn, from_addr, from_ai, true);
+   else
from_ai = NULL;
-   }
 
-   error = resolve_addr(to_addr, to_ai);
-   if (error != 0)
-   log_errx(1, failed to resolve target address %s, to_addr);
-
-   conn-conn_iscsi_fd = iscsi_fd;
+   resolve_addr(conn, to_addr, to_ai, false);
 
 #ifdef ICL_KERNEL_PROXY
 
@@ -224,19 +222,25 @@ connection_new(unsigned int session_id, 
 
 #else /* !ICL_KERNEL_PROXY */
 
-   if (conn-conn_conf.isc_iser)
+   if (conn-conn_conf.isc_iser) {
+   fail(conn, iSER not supported);
log_errx(1, iscsid(8) compiled without ICL_KERNEL_PROXY 
does not support iSER);
+   }
 
conn-conn_socket = socket(to_ai-ai_family, to_ai-ai_socktype,
to_ai-ai_protocol);
- 

svn commit: r255637 - head/tools/tools/sysbuild

2013-09-17 Thread Poul-Henning Kamp
Author: phk
Date: Tue Sep 17 15:19:26 2013
New Revision: 255637
URL: http://svnweb.freebsd.org/changeset/base/255637

Log:
  Don't attempt to build ports with missing dependencies.
  
  Approved by:  re (gjb)

Modified:
  head/tools/tools/sysbuild/sysbuild.sh

Modified: head/tools/tools/sysbuild/sysbuild.sh
==
--- head/tools/tools/sysbuild/sysbuild.sh   Tue Sep 17 14:23:15 2013
(r255636)
+++ head/tools/tools/sysbuild/sysbuild.sh   Tue Sep 17 15:19:26 2013
(r255637)
@@ -254,6 +254,13 @@ ports_build() (
fi
fi
 
+   miss=`(cd $p ; make missing ${PORTS_OPTS}) || true`
+
+   if [ x${miss} != x ] ; then
+   log_it MISSING for $p: $miss
+   continue
+   fi
+
log_it build $pn ($p)
(
set +e
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r255628 - svnadmin/conf

2013-09-17 Thread Rui Paulo
On 17 Sep 2013, at 01:43, Edward Tomasz Napierala tr...@freebsd.org wrote:

 Author: trasz
 Date: Tue Sep 17 08:43:12 2013
 New Revision: 255628
 URL: http://svnweb.freebsd.org/changeset/base/255628
 
 Log:
  Explicitly require Security Officer's approval for kernel PRNG bits.
 
  Note that there is ongoing discussion about approval requirement
  for userland PRNG bits.
 
  Reviewed by: so (des)
  Approved by: core (jhb)
 
 Modified:
  svnadmin/conf/approvers
 
 Modified: svnadmin/conf/approvers
 ==
 --- svnadmin/conf/approvers   Tue Sep 17 07:41:08 2013(r255627)
 +++ svnadmin/conf/approvers   Tue Sep 17 08:43:12 2013(r255628)
 @@ -32,3 +32,7 @@
 ^svnadmin/conf/approvers  (core|re)
 ^svnadmin/conf/access core
 ^head/LOCKS   core
 +^head/sys/dev/random (security-officer|so|secteam|core)
 +^head/sys/libkern/arc4random.c   (security-officer|so|secteam|core)
 +^stable/[7-9]/sys/dev/random (security-officer|so|secteam|core)
 +^stable/[7-9]/sys/libkern/arc4random.c   
 (security-officer|so|secteam|core)


This means that every time we branch a stable release, you have to change this 
regular expression... Why not stable/* ?

--
Rui Paulo



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


svn commit: r255638 - head/sys/amd64/vmm

2013-09-17 Thread Neel Natu
Author: neel
Date: Tue Sep 17 16:06:07 2013
New Revision: 255638
URL: http://svnweb.freebsd.org/changeset/base/255638

Log:
  Fix a bug in decoding an instruction that has an SIB byte as well as an
  immediate operand. The presence of an SIB byte in decoding the ModR/M field
  would cause 'imm_bytes' to not be set to the correct value.
  
  Fix this by initializing 'imm_bytes' independent of the ModR/M decoding.
  
  Reported by: grehan@
  Approved by: re@

Modified:
  head/sys/amd64/vmm/vmm_instruction_emul.c

Modified: head/sys/amd64/vmm/vmm_instruction_emul.c
==
--- head/sys/amd64/vmm/vmm_instruction_emul.c   Tue Sep 17 15:19:26 2013
(r255637)
+++ head/sys/amd64/vmm/vmm_instruction_emul.c   Tue Sep 17 16:06:07 2013
(r255638)
@@ -701,12 +701,6 @@ decode_modrm(struct vie *vie)
break;
}
 
-   /* Figure out immediate operand size (if any) */
-   if (vie-op.op_flags  VIE_OP_F_IMM)
-   vie-imm_bytes = 4;
-   else if (vie-op.op_flags  VIE_OP_F_IMM8)
-   vie-imm_bytes = 1;
-
 done:
vie_advance(vie);
 
@@ -822,6 +816,12 @@ decode_immediate(struct vie *vie)
int32_t signed32;
} u;
 
+   /* Figure out immediate operand size (if any) */
+   if (vie-op.op_flags  VIE_OP_F_IMM)
+   vie-imm_bytes = 4;
+   else if (vie-op.op_flags  VIE_OP_F_IMM8)
+   vie-imm_bytes = 1;
+
if ((n = vie-imm_bytes) == 0)
return (0);
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r255639 - head/sys/powerpc/powerpc

2013-09-17 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Tue Sep 17 17:29:07 2013
New Revision: 255639
URL: http://svnweb.freebsd.org/changeset/base/255639

Log:
  Make sure to copy segments back to the segs array if non-NULL. This is
  relied upon by bus_dmamap_load_mbuf_sg() (i.e. all network drivers).
  
  Approved by:  re (kib)
  MFC after:2 weeks

Modified:
  head/sys/powerpc/powerpc/busdma_machdep.c

Modified: head/sys/powerpc/powerpc/busdma_machdep.c
==
--- head/sys/powerpc/powerpc/busdma_machdep.c   Tue Sep 17 16:06:07 2013
(r255638)
+++ head/sys/powerpc/powerpc/busdma_machdep.c   Tue Sep 17 17:29:07 2013
(r255639)
@@ -847,13 +847,16 @@ _bus_dmamap_complete(bus_dma_tag_t dmat,
map-nsegs = nsegs;
if (segs != NULL)
memcpy(map-segments, segs, map-nsegs*sizeof(segs[0]));
-   else
-   segs = map-segments;
if (dmat-iommu != NULL)
IOMMU_MAP(dmat-iommu, map-segments, map-nsegs,
dmat-lowaddr, dmat-highaddr, dmat-alignment,
dmat-boundary, dmat-iommu_cookie);
 
+   if (segs != NULL)
+   memcpy(segs, map-segments, map-nsegs*sizeof(segs[0]));
+   else
+   segs = map-segments;
+
return (segs);
 }
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r255640 - in head/sys/powerpc: include powerpc

2013-09-17 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Tue Sep 17 17:29:56 2013
New Revision: 255640
URL: http://svnweb.freebsd.org/changeset/base/255640

Log:
  Add POWER7+ and POWER8 to the CPU ID table.
  
  Approved by:  re (kib)

Modified:
  head/sys/powerpc/include/spr.h
  head/sys/powerpc/powerpc/cpu.c

Modified: head/sys/powerpc/include/spr.h
==
--- head/sys/powerpc/include/spr.h  Tue Sep 17 17:29:07 2013
(r255639)
+++ head/sys/powerpc/include/spr.h  Tue Sep 17 17:29:56 2013
(r255640)
@@ -168,6 +168,8 @@
 #define  IBMPOWER3PLUS   0x0041
 #define  IBM970MP0x0044
 #define  IBM970GX0x0045
+#define  IBMPOWER7PLUS   0x004a
+#define  IBMPOWER8   0x004b
 #define  MPC860  0x0050
 #define  IBMCELLBE   0x0070
 #define  MPC8240 0x0081

Modified: head/sys/powerpc/powerpc/cpu.c
==
--- head/sys/powerpc/powerpc/cpu.c  Tue Sep 17 17:29:07 2013
(r255639)
+++ head/sys/powerpc/powerpc/cpu.c  Tue Sep 17 17:29:56 2013
(r255640)
@@ -141,6 +141,12 @@ static const struct cputab models[] = {
 { IBM POWER7,IBMPOWER7,  REVFMT_MAJMIN,
   PPC_FEATURE_64 | PPC_FEATURE_HAS_ALTIVEC | PPC_FEATURE_HAS_FPU,
   NULL },
+{ IBM POWER7+,   IBMPOWER7PLUS,  REVFMT_MAJMIN,
+  PPC_FEATURE_64 | PPC_FEATURE_HAS_ALTIVEC | PPC_FEATURE_HAS_FPU,
+  NULL },
+{ IBM POWER8,IBMPOWER8,  REVFMT_MAJMIN,
+  PPC_FEATURE_64 | PPC_FEATURE_HAS_ALTIVEC | PPC_FEATURE_HAS_FPU,
+  NULL },
 { Motorola PowerPC 7400, MPC7400,REVFMT_MAJMIN,
   PPC_FEATURE_HAS_ALTIVEC | PPC_FEATURE_HAS_FPU, cpu_6xx_setup },
 { Motorola PowerPC 7410, MPC7410,REVFMT_MAJMIN,
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r255641 - head/release/powerpc

2013-09-17 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Tue Sep 17 17:30:49 2013
New Revision: 255641
URL: http://svnweb.freebsd.org/changeset/base/255641

Log:
  CDs are not partitioned, so this is not correct syntax for loading from
  ISO 9660. Omit the partition ID.
  
  Approved by:  re (kib)
  MFC after:2 weeks

Modified:
  head/release/powerpc/mkisoimages.sh

Modified: head/release/powerpc/mkisoimages.sh
==
--- head/release/powerpc/mkisoimages.sh Tue Sep 17 17:29:56 2013
(r255640)
+++ head/release/powerpc/mkisoimages.sh Tue Sep 17 17:30:49 2013
(r255641)
@@ -40,7 +40,7 @@ if [ x$1 = x-b ]; then
 chrp-boot
 descriptionFreeBSD Install/description
 os-nameFreeBSD/os-name
-boot-scriptboot device;:partition;,\ppc\chrp\loader/boot-script
+boot-scriptboot device;:,\ppc\chrp\loader/boot-script
 /chrp-boot
 EOF
bootable=$bootable -o chrp-boot
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r255645 - head/sys/amd64/vmm

2013-09-17 Thread Peter Grehan
Author: grehan
Date: Tue Sep 17 17:56:53 2013
New Revision: 255645
URL: http://svnweb.freebsd.org/changeset/base/255645

Log:
  Hide TSC-deadline APIC timer support from guests. This mode
  isn't yet implemented in bhyve's APIC emulation.
  
  Reviewed by:  neel
  Approved by:  re@ (blanket)

Modified:
  head/sys/amd64/vmm/x86.c

Modified: head/sys/amd64/vmm/x86.c
==
--- head/sys/amd64/vmm/x86.cTue Sep 17 17:39:40 2013(r255644)
+++ head/sys/amd64/vmm/x86.cTue Sep 17 17:56:53 2013(r255645)
@@ -163,7 +163,12 @@ x86_emulate_cpuid(struct vm *vm, int vcp
 * Hide the performance and debug features.
 */
regs[2] = ~CPUID2_PDCM;
-   
+
+   /*
+* No TSC deadline support in the APIC yet
+*/
+   regs[2] = ~CPUID2_TSCDLT;
+
/*
 * Hide thermal monitoring
 */
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r255643 - in head/sys: conf powerpc/conf powerpc/pseries

2013-09-17 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Tue Sep 17 17:37:04 2013
New Revision: 255643
URL: http://svnweb.freebsd.org/changeset/base/255643

Log:
  Merge in support for PAPR-compliant (Power Architecture Platform
  Requirements) systems from the projects/pseries branch. This in principle
  includes all IBM POWER hardware released in the last 15 years with the
  exception of POWER3-based systems when run in 64-bit mode. The main
  development target, however, has been the PAPR logical partition support
  that is the default target in KVM on POWER and QEMU -- mileage may vary
  on actual hardware at present. Much of the heavy lifting here was done
  by Andreas Tobler.
  
  Approved by:  re (kib)

Added:
  head/sys/powerpc/pseries/
  head/sys/powerpc/pseries/mmu_phyp.c   (contents, props changed)
  head/sys/powerpc/pseries/phyp-hvcall.S   (contents, props changed)
  head/sys/powerpc/pseries/phyp-hvcall.h   (contents, props changed)
  head/sys/powerpc/pseries/phyp_console.c   (contents, props changed)
  head/sys/powerpc/pseries/platform_chrp.c   (contents, props changed)
  head/sys/powerpc/pseries/plpar_iommu.c   (contents, props changed)
  head/sys/powerpc/pseries/plpar_iommu.h   (contents, props changed)
  head/sys/powerpc/pseries/rtas_dev.c   (contents, props changed)
  head/sys/powerpc/pseries/rtas_pci.c   (contents, props changed)
  head/sys/powerpc/pseries/vdevice.c   (contents, props changed)
  head/sys/powerpc/pseries/xics.c   (contents, props changed)
Modified:
  head/sys/conf/files.powerpc
  head/sys/conf/options.powerpc
  head/sys/powerpc/conf/DEFAULTS
  head/sys/powerpc/conf/GENERIC
  head/sys/powerpc/conf/GENERIC64

Modified: head/sys/conf/files.powerpc
==
--- head/sys/conf/files.powerpc Tue Sep 17 17:31:53 2013(r255642)
+++ head/sys/conf/files.powerpc Tue Sep 17 17:37:04 2013(r255643)
@@ -225,6 +225,15 @@ powerpc/ps3/ps3disk.c  optionalps3
 powerpc/ps3/ps3pic.c   optionalps3
 powerpc/ps3/ps3_syscons.c  optionalps3 sc
 powerpc/ps3/ps3-hvcall.S   optionalps3 sc
+powerpc/pseries/phyp-hvcall.S  optionalpseries powerpc64
+powerpc/pseries/mmu_phyp.c optionalpseries powerpc64
+powerpc/pseries/phyp_console.c optionalpseries powerpc64
+powerpc/pseries/platform_chrp.coptionalpseries
+powerpc/pseries/plpar_iommu.c  optionalpseries powerpc64
+powerpc/pseries/rtas_dev.c optionalpseries
+powerpc/pseries/rtas_pci.c optionalpseries pci
+powerpc/pseries/vdevice.c  optionalpseries powerpc64
+powerpc/pseries/xics.c optionalpseries powerpc64
 powerpc/psim/iobus.c   optionalpsim
 powerpc/psim/ata_iobus.c   optionalata psim
 powerpc/psim/openpic_iobus.c   optionalpsim

Modified: head/sys/conf/options.powerpc
==
--- head/sys/conf/options.powerpc   Tue Sep 17 17:31:53 2013
(r255642)
+++ head/sys/conf/options.powerpc   Tue Sep 17 17:37:04 2013
(r255643)
@@ -22,6 +22,7 @@ MPC85XX   opt_platform.h
 POWERMAC   opt_platform.h
 PS3opt_platform.h
 MAMBO
+PSERIES
 PSIM
 WIIopt_platform.h
 

Modified: head/sys/powerpc/conf/DEFAULTS
==
--- head/sys/powerpc/conf/DEFAULTS  Tue Sep 17 17:31:53 2013
(r255642)
+++ head/sys/powerpc/conf/DEFAULTS  Tue Sep 17 17:37:04 2013
(r255643)
@@ -9,6 +9,7 @@ device  mem # Memory and kernel memory 
 # UART chips on this platform
 device uart_ns8250
 
+optionsGEOM_PART_BSD
 optionsGEOM_PART_MBR
 
 options NEW_PCIB

Modified: head/sys/powerpc/conf/GENERIC
==
--- head/sys/powerpc/conf/GENERIC   Tue Sep 17 17:31:53 2013
(r255642)
+++ head/sys/powerpc/conf/GENERIC   Tue Sep 17 17:37:04 2013
(r255643)
@@ -30,6 +30,7 @@ makeoptions   WITH_CTF=1
 optionsPOWERMAC#NewWorld Apple PowerMacs
 optionsPSIM#GDB PSIM ppc simulator
 optionsMAMBO   #IBM Mambo Full System Simulator
+optionsPSERIES #PAPR-compliant systems
 
 optionsSCHED_ULE   #ULE scheduler
 optionsPREEMPTION  #Enable kernel thread preemption

Modified: head/sys/powerpc/conf/GENERIC64
==
--- head/sys/powerpc/conf/GENERIC64 Tue Sep 17 17:31:53 2013
(r255642)
+++ head/sys/powerpc/conf/GENERIC64 Tue Sep 17 17:37:04 2013
(r255643)
@@ -30,6 +30,7 @@ makeoptions   WITH_CTF=1
 optionsPOWERMAC#NewWorld 

Re: svn commit: r255613 - head/sys/arm/arm

2013-09-17 Thread Ed Schouten
2013/9/17 Zbigniew Bodek z...@freebsd.org:
 Can you test this one:
 http://people.freebsd.org/~zbb/arm/other/stdatomic_fix_vol2.diff

Works. Thanks!

-- 
Ed Schouten e...@80386.nl
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r255647 - head/usr.sbin/bhyve

2013-09-17 Thread Peter Grehan
Author: grehan
Date: Tue Sep 17 18:42:13 2013
New Revision: 255647
URL: http://svnweb.freebsd.org/changeset/base/255647

Log:
  Pass the number of supported vectors to pci_emul_add_msicap() and
  not the actual PCI BAR number.
  
  Reviewed by:  neel
  Approved by:  re@ (blanket)

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

Modified: head/usr.sbin/bhyve/virtio.c
==
--- head/usr.sbin/bhyve/virtio.cTue Sep 17 18:41:32 2013
(r255646)
+++ head/usr.sbin/bhyve/virtio.cTue Sep 17 18:42:13 2013
(r255647)
@@ -139,7 +139,8 @@ vi_intr_init(struct virtio_softc *vs, in
return (1);
} else {
vs-vs_flags = ~VIRTIO_USE_MSIX;
-   pci_emul_add_msicap(vs-vs_pi, barnum);
+   /* Only 1 MSI vector for bhyve */
+   pci_emul_add_msicap(vs-vs_pi, 1);
}
return (0);
 }
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


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

2013-09-17 Thread Jean-Sebastien Pedron
Author: dumbbell
Date: Tue Sep 17 18:41:32 2013
New Revision: 255646
URL: http://svnweb.freebsd.org/changeset/base/255646

Log:
  psm: Update struct synapticshw in psm(4) man page
  
  This structure was updated in r255153 and r255154.
  
  PR:   kern/170834
  Approved by:  re (hrs)

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

Modified: head/share/man/man4/psm.4
==
--- head/share/man/man4/psm.4   Tue Sep 17 17:56:53 2013(r255645)
+++ head/share/man/man4/psm.4   Tue Sep 17 18:41:32 2013(r255646)
@@ -460,7 +460,7 @@ typedef struct synapticshw {
 int infoHardware;  /* hardware model */
 int infoNewAbs;/* supports the newabs format */
 int capPen;/* can detect a pen */
-int infoSimpleC;   /* supports simple commands */
+int infoSimplC;/* supports simple commands */
 int infoGeometry;  /* touchpad dimensions */
 int capExtended;   /* supports extended packets */
 int capSleep;  /* can be suspended/resumed */
@@ -468,6 +468,9 @@ typedef struct synapticshw {
 int capMultiFinger;/* can detect multiple fingers */
 int capPalmDetect; /* can detect a palm */
 int capPassthrough;/* can passthrough guest packets */
+int capMiddle; /* has a physical middle button */
+int nExtendedButtons; /* has N additionnal buttons */
+int nExtendedQueries; /* supports N extended queries */
 } synapticshw_t;
 .Ed
 .Pp
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r255648 - head/sys/dev/nfe

2013-09-17 Thread Xin LI
Author: delphij
Date: Tue Sep 17 18:46:10 2013
New Revision: 255648
URL: http://svnweb.freebsd.org/changeset/base/255648

Log:
  Fix a typo when accounting for tx_broadcast statistics.
  
  Submitted by: Paul A. Patience paul-a patience polymtl ca
  MFC after:2 weeks
  Approved by:  re (hrs)

Modified:
  head/sys/dev/nfe/if_nfe.c

Modified: head/sys/dev/nfe/if_nfe.c
==
--- head/sys/dev/nfe/if_nfe.c   Tue Sep 17 18:42:13 2013(r255647)
+++ head/sys/dev/nfe/if_nfe.c   Tue Sep 17 18:46:10 2013(r255648)
@@ -3260,7 +3260,7 @@ nfe_stats_update(struct nfe_softc *sc)
if ((sc-nfe_flags  NFE_MIB_V3) != 0) {
stats-tx_unicast += NFE_READ(sc, NFE_TX_UNICAST);
stats-tx_multicast += NFE_READ(sc, NFE_TX_MULTICAST);
-   stats-rx_broadcast += NFE_READ(sc, NFE_TX_BROADCAST);
+   stats-tx_broadcast += NFE_READ(sc, NFE_TX_BROADCAST);
}
 }
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r255649 - stable/9/sys/netinet

2013-09-17 Thread Andrey V. Elsukov
Author: ae
Date: Tue Sep 17 18:47:31 2013
New Revision: 255649
URL: http://svnweb.freebsd.org/changeset/base/255649

Log:
  MFC r255235:
Remove unused code and sort variables declarations.
  
  PR:   kern/181822

Modified:
  stable/9/sys/netinet/ip_mroute.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/netinet/ip_mroute.c
==
--- stable/9/sys/netinet/ip_mroute.cTue Sep 17 18:46:10 2013
(r255648)
+++ stable/9/sys/netinet/ip_mroute.cTue Sep 17 18:47:31 2013
(r255649)
@@ -703,10 +703,9 @@ ip_mrouter_init(struct socket *so, int v
 static int
 X_ip_mrouter_done(void)
 {
-vifi_t vifi;
-int i;
 struct ifnet *ifp;
-struct ifreq ifr;
+int i;
+vifi_t vifi;
 
 MROUTER_LOCK();
 
@@ -731,11 +730,6 @@ X_ip_mrouter_done(void)
 for (vifi = 0; vifi  V_numvifs; vifi++) {
if (!in_nullhost(V_viftable[vifi].v_lcl_addr) 
!(V_viftable[vifi].v_flags  (VIFF_TUNNEL | VIFF_REGISTER))) {
-   struct sockaddr_in *so = (struct sockaddr_in *)(ifr.ifr_addr);
-
-   so-sin_len = sizeof(struct sockaddr_in);
-   so-sin_family = AF_INET;
-   so-sin_addr.s_addr = INADDR_ANY;
ifp = V_viftable[vifi].v_ifp;
if_allmulti(ifp, 0);
}
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r255187 - in head/sys: conf crypto/aesni modules/aesni

2013-09-17 Thread Bjoern A. Zeeb

On Tue, 3 Sep 2013, John-Mark Gurney wrote:


Author: jmg
Date: Tue Sep  3 18:31:23 2013
New Revision: 255187
URL: http://svnweb.freebsd.org/changeset/base/255187

Log:
 Use the fact that the AES-NI instructions can be pipelined to improve
 performance... Use SSE2 instructions for calculating the XTS tweek
 factor...  Let the compiler do more work and handle register allocation
 by using intrinsics, now only the key schedule is in assembly...

 Replace .byte hard coded instructions w/ the proper instructions now
 that both clang and gcc support them...

 On my machine, pulling the code to userland I saw performance go from
 ~150MB/sec to 2GB/sec in XTS mode.  GELI on GNOP saw a more modest
 increase of about 3x due to other system overhead (geom and
 opencrypto)...

 These changes allow almost full disk io rate w/ geli...

 Reviewed by:   -current, -security
 Thanks to: Mike Hamburg for the XTS tweek algorithm

Added:
 head/sys/crypto/aesni/aesencdec.h   (contents, props changed)
Deleted:
 head/sys/crypto/aesni/aesencdec_amd64.S
 head/sys/crypto/aesni/aesencdec_i386.S
Modified:
 head/sys/conf/files.amd64
 head/sys/conf/files.i386
 head/sys/crypto/aesni/aeskeys_amd64.S
 head/sys/crypto/aesni/aesni.c
 head/sys/crypto/aesni/aesni.h
 head/sys/crypto/aesni/aesni_wrap.c
 head/sys/modules/aesni/Makefile


...

Added: head/sys/crypto/aesni/aesencdec.h
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/crypto/aesni/aesencdec.h   Tue Sep  3 18:31:23 2013
(r255187)
@@ -0,0 +1,136 @@
+/*-
+ * Copyright 2013 John-Mark Gurney j...@freebsd.org
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ *
+ */
+
+#include wmmintrin.h
+



This pulls in a header from user space, in fact from clang, and if
cross-building without building clang this header file is not
available and a buildkernel is failing.

(paths shortend)
In file included from /sys/modules/aesni/../../crypto/aesni/aesni_wrap.c:40:
/sys/modules/aesni/../../crypto/aesni/aesencdec.h:30:10: fatal error: 
'wmmintrin.h' file not found
#include wmmintrin.h ^
1 error generated.
--- aesni_wrap.o ---



--
Bjoern A. Zeeb ? ??? ??? ??:
'??? ???  ??  ??? ?? ?? ??? ??? ??? ? ? 
?? ?? ? ',  ? ?, ??? ? ?? ?, ?.???
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r255650 - stable/8/sys/netinet

2013-09-17 Thread Andrey V. Elsukov
Author: ae
Date: Tue Sep 17 18:51:35 2013
New Revision: 255650
URL: http://svnweb.freebsd.org/changeset/base/255650

Log:
  MFC r255235:
Remove unused code and sort variables declarations.
  
  PR:   kern/181822

Modified:
  stable/8/sys/netinet/ip_mroute.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/netinet/   (props changed)

Modified: stable/8/sys/netinet/ip_mroute.c
==
--- stable/8/sys/netinet/ip_mroute.cTue Sep 17 18:47:31 2013
(r255649)
+++ stable/8/sys/netinet/ip_mroute.cTue Sep 17 18:51:35 2013
(r255650)
@@ -705,10 +705,9 @@ ip_mrouter_init(struct socket *so, int v
 static int
 X_ip_mrouter_done(void)
 {
-vifi_t vifi;
-int i;
 struct ifnet *ifp;
-struct ifreq ifr;
+int i;
+vifi_t vifi;
 
 MROUTER_LOCK();
 
@@ -733,11 +732,6 @@ X_ip_mrouter_done(void)
 for (vifi = 0; vifi  V_numvifs; vifi++) {
if (!in_nullhost(V_viftable[vifi].v_lcl_addr) 
!(V_viftable[vifi].v_flags  (VIFF_TUNNEL | VIFF_REGISTER))) {
-   struct sockaddr_in *so = (struct sockaddr_in *)(ifr.ifr_addr);
-
-   so-sin_len = sizeof(struct sockaddr_in);
-   so-sin_family = AF_INET;
-   so-sin_addr.s_addr = INADDR_ANY;
ifp = V_viftable[vifi].v_ifp;
if_allmulti(ifp, 0);
}
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r255651 - in head/share/i18n: csmapper esdb

2013-09-17 Thread Jilles Tjoelker
Author: jilles
Date: Tue Sep 17 20:09:25 2013
New Revision: 255651
URL: http://svnweb.freebsd.org/changeset/base/255651

Log:
  share/i18n: Fix installworld with read-only obj.
  
  Since iconv was enabled (r254273, August 13), it has been impossible to
  installworld using a read-only obj tree. This is common with NFS. Parts of
  share/i18n unconditionally rebuild files like mapper.dir during
  installation.
  
  This patch ensures the files like mapper.dir are not rewritten with the same
  contents.
  
  Tested by:joel
  Approved by:  re (hrs)

Modified:
  head/share/i18n/csmapper/Makefile
  head/share/i18n/esdb/Makefile

Modified: head/share/i18n/csmapper/Makefile
==
--- head/share/i18n/csmapper/Makefile   Tue Sep 17 18:51:35 2013
(r255650)
+++ head/share/i18n/csmapper/Makefile   Tue Sep 17 20:09:25 2013
(r255651)
@@ -7,10 +7,11 @@ SUBDIR=   APPLE AST BIG5 CNS CP EBCDIC GB 
KAZAKH KOI KS MISC TCVN
 
 mapper.dir: ${SUBDIR}
-${.TARGET}
-.for i in ${SUBDIR}
-   cat ${i}/mapper.dir.${i}  ${.TARGET}
-.endfor
+   newfile=$$(for i in ${SUBDIR}; do \
+   cat $$i/mapper.dir.$$i; \
+   done); \
+   [ $$newfile = $$(cat ${.TARGET} 2/dev/null) ] || \
+   printf '%s\n' $$newfile ${.TARGET}
 mapper.dir.db: mapper.dir
${MKCSMAPPER} -m -o ${.TARGET} ${.ALLSRC}
 
@@ -18,10 +19,11 @@ FILES+= mapper.dir mapper.dir.db
 CLEANFILES+= mapper.dir mapper.dir.db
 
 charset.pivot: ${SUBDIR}
-${.TARGET}
-.for i in ${SUBDIR}
-   cat ${i}/charset.pivot.${i}  ${.TARGET}
-.endfor
+   newfile=$$(for i in ${SUBDIR}; do \
+   cat $$i/charset.pivot.$$i; \
+   done); \
+   [ $$newfile = $$(cat ${.TARGET} 2/dev/null) ] || \
+   printf '%s\n' $$newfile ${.TARGET}
 charset.pivot.pvdb: charset.pivot
${MKCSMAPPER} -p -o ${.TARGET} ${.ALLSRC}
 

Modified: head/share/i18n/esdb/Makefile
==
--- head/share/i18n/esdb/Makefile   Tue Sep 17 18:51:35 2013
(r255650)
+++ head/share/i18n/esdb/Makefile   Tue Sep 17 20:09:25 2013
(r255651)
@@ -10,18 +10,20 @@ FILES+= esdb.dir esdb.dir.db esdb.alias 
 CLEANFILES= ${FILES}
 
 esdb.dir: ${SUBDIR}
-$@
-.for i in ${SUBDIR}
-   cat ${i}/esdb.dir.${i} ${.TARGET}
-.endfor
+   newfile=$$(for i in ${SUBDIR}; do \
+   cat $$i/esdb.dir.$$i; \
+   done); \
+   [ $$newfile = $$(cat ${.TARGET} 2/dev/null) ] || \
+   printf '%s\n' $$newfile ${.TARGET}
 esdb.dir.db: esdb.dir
${MKESDB} -m -o ${.TARGET} ${.ALLSRC}
 
 esdb.alias: ${SUBDIR}
-$@
-.for i in ${SUBDIR}
-   cat ${i}/esdb.alias.${i} ${.TARGET}
-.endfor
+   newfile=$$(for i in ${SUBDIR}; do \
+   cat $$i/esdb.alias.$$i; \
+   done); \
+   [ $$newfile = $$(cat ${.TARGET} 2/dev/null) ] || \
+   printf '%s\n' $$newfile ${.TARGET}
 esdb.alias.db: esdb.alias
${MKESDB} -m -o ${.TARGET} ${.ALLSRC}
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r255653 - head/etc

2013-09-17 Thread Hiroki Sato
Author: hrs
Date: Tue Sep 17 20:22:24 2013
New Revision: 255653
URL: http://svnweb.freebsd.org/changeset/base/255653

Log:
  Fix parsing lines of ifconfig output which include \t in the case of
  inet and inet6.
  
  Approved by:  re (delphij)

Modified:
  head/etc/network.subr

Modified: head/etc/network.subr
==
--- head/etc/network.subr   Tue Sep 17 20:20:04 2013(r255652)
+++ head/etc/network.subr   Tue Sep 17 20:22:24 2013(r255653)
@@ -654,18 +654,16 @@ ipv4_down()
 
ifalias ${_if} inet -alias  _ret=0
 
-   inetList=`${IFCONFIG_CMD} ${_if} | grep 'inet ' | tr \n $_ifs`
+   inetList=`${IFCONFIG_CMD} ${_if} | grep 'inet ' | tr \n\t $_ifs`
 
oldifs=$IFS
IFS=$_ifs
for _inet in $inetList ; do
# get rid of extraneous line
case $_inet in
-   ) break ;;
-   \   inet\ *|inet\ *);;
-   *)  continue ;;
+   inet\ *);;
+   *)  continue ;;
esac
-   [ -z $_inet ]  break
 
_inet=`expr $_inet : '.*\(inet 
\([0-9]\{1,3\}\.\)\{3\}[0-9]\{1,3\}\).*'`
 
@@ -696,13 +694,16 @@ ipv6_down()
ipv6_prefix_hostid_addr_common ${_if} -alias  _ret=0
ifalias ${_if} inet6 -alias  _ret=0
 
-   inetList=`${IFCONFIG_CMD} ${_if} | grep 'inet6 ' | tr \n $_ifs`
+   inetList=`${IFCONFIG_CMD} ${_if} | grep 'inet6 ' | tr \n\t $_ifs`
 
oldifs=$IFS
IFS=$_ifs
for _inet6 in $inetList ; do
# get rid of extraneous line
-   [ -z $_inet6 ]  break
+   case $_inet in
+   inet6\ *)   ;;
+   *)  continue ;;
+   esac
 
_inet6=`expr $_inet6 : '.*\(inet6 \([0-9a-f:]*\)\).*'`
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r255654 - head/etc/rc.d

2013-09-17 Thread Hiroki Sato
Author: hrs
Date: Tue Sep 17 20:24:03 2013
New Revision: 255654
URL: http://svnweb.freebsd.org/changeset/base/255654

Log:
  - Fix pidfile handling in sendmail_msp_queue.  The pidfile was ignored
and multiple instances were invoked by start/stop cycles.
  
  - Remove redundant start_cmd rewrite.
  
  Approved by:  re (gjb)
  Tested by:jmg

Modified:
  head/etc/rc.d/sendmail

Modified: head/etc/rc.d/sendmail
==
--- head/etc/rc.d/sendmail  Tue Sep 17 20:22:24 2013(r255653)
+++ head/etc/rc.d/sendmail  Tue Sep 17 20:24:03 2013(r255654)
@@ -80,20 +80,17 @@ required_files=
 if checkyesno sendmail_submit_enable; then
name=sendmail_submit
rcvar=sendmail_submit_enable
-   start_cmd=${command} ${sendmail_submit_flags}
run_rc_command $1
 fi
 
 if checkyesno sendmail_outbound_enable; then
name=sendmail_outbound
rcvar=sendmail_outbound_enable
-   start_cmd=${command} ${sendmail_outbound_flags}
run_rc_command $1
 fi
 
-name=sendmail_clientmqueue
+name=sendmail_msp_queue
 rcvar=sendmail_msp_queue_enable
-start_cmd=${command} ${sendmail_msp_queue_flags}
-pidfile=${sendmail_mspq_pidfile:-/var/spool/clientmqueue/sm-client.pid}
+pidfile=${sendmail_msp_queue_pidfile:-/var/spool/clientmqueue/sm-client.pid}
 required_files=/etc/mail/submit.cf
 run_rc_command $1
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r255652 - head/share/man/man5

2013-09-17 Thread Hiroki Sato
Author: hrs
Date: Tue Sep 17 20:20:04 2013
New Revision: 255652
URL: http://svnweb.freebsd.org/changeset/base/255652

Log:
  Remove description ifconfig_IF_aliasN is deprecated.  While this
  sentence was added in 2005, many users still need it.
  
  Approved by:  re (gjb)
  PR:   docs/162354

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

Modified: head/share/man/man5/rc.conf.5
==
--- head/share/man/man5/rc.conf.5   Tue Sep 17 20:09:25 2013
(r255651)
+++ head/share/man/man5/rc.conf.5   Tue Sep 17 20:20:04 2013
(r255652)
@@ -24,7 +24,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd July 22, 2013
+.Dd September 10, 2013
 .Dt RC.CONF 5
 .Os
 .Sh NAME
@@ -1192,10 +1192,8 @@ be added since the search would
 stop with the missing
 .Dq Li alias3
 entry.
-Due to this difficult to manage behavior, the
-.Va ifconfig_ Ns Ao Ar interface Ac Ns Va _alias Ns Aq Ar n
-form is deprecated.
-There is
+Because of this difficult to manage behavior,
+there is
 .Va ifconfig_ Ns Ao Ar interface Ac Ns Va _aliases
 variable, which has the same functionality as
 .Va ifconfig_ Ns Ao Ar interface Ac Ns Va _alias Ns Aq Ar n
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r255655 - head/share/man/man5

2013-09-17 Thread Hiroki Sato
Author: hrs
Date: Tue Sep 17 20:25:29 2013
New Revision: 255655
URL: http://svnweb.freebsd.org/changeset/base/255655

Log:
  Add EXAMPLES section to explain the format of fstab(5).
  
  Approved by:  re (marius)
  Reviewed by:  wblock

Modified:
  head/share/man/man5/fstab.5

Modified: head/share/man/man5/fstab.5
==
--- head/share/man/man5/fstab.5 Tue Sep 17 20:24:03 2013(r255654)
+++ head/share/man/man5/fstab.5 Tue Sep 17 20:25:29 2013(r255655)
@@ -32,7 +32,7 @@
 .\ @(#)fstab.58.1 (Berkeley) 6/5/93
 .\ $FreeBSD$
 .\
-.Dd July 15, 2013
+.Dd September 10, 2013
 .Dt FSTAB 5
 .Os
 .Sh NAME
@@ -378,6 +378,41 @@ The file
 resides in
 .Pa /etc .
 .El
+.Sh EXAMPLES
+.Bd -literal
+# Device   Mountpoint  FStype  Options DumpPass#
+#
+# UFS file system.
+/dev/da0p2 /   ufs rw  1   1
+#
+# Swap space on a block device.
+/dev/da0p1 noneswapsw  0   0
+#
+# Swap space using a block device with GBDE/GELI encyption.
+# aalgo, ealgo, keylen, sectorsize options are available
+# for .eli devices.
+/dev/da1p1.bde noneswapsw  0   0
+/dev/da1p2.eli noneswapsw  0   0
+#
+# tmpfs.
+tmpfs  /tmptmpfs   rw,size=1g,mode=17770 0
+#
+# UFS file system on a swap-backed md(4).  /dev/md10 is
+# automatically created.  If it is md, a unit number
+# will be automatically selected.
+md10   /scratchmfs rw,-s1g 0   0
+#
+# Swap space on a vnode-backed md(4).
+md11   noneswapsw,file=/swapfile   0 0
+#
+# CDROM.  noauto option is typically used because the
+# media is removable.
+/dev/cd0   /cdrom  cd9660  ro,noauto   0   0
+#
+# NFS-exported file system.  serv is an NFS server name
+# or IP address.
+serv:/export   /nfsnfs rw,noinet6  0   0
+.Ed
 .Sh SEE ALSO
 .Xr getfsent 3 ,
 .Xr getvfsbyname 3 ,
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r255657 - head/sys/compat/freebsd32

2013-09-17 Thread Jilles Tjoelker
Author: jilles
Date: Tue Sep 17 20:48:19 2013
New Revision: 255657
URL: http://svnweb.freebsd.org/changeset/base/255657

Log:
  Disallow cap_enter() in freebsd32 compatibility mode.
  
  The freebsd32 compatibility mode (for running 32-bit binaries on 64-bit
  kernels) does not currently allow any system calls in capability mode, but
  still permits cap_enter(). As a result, 32-bit binaries on 64-bit kernels
  that use capability mode do not work (they crash after being disallowed to
  call sys_exit()). Affected binaries include dhclient and uniq. The latter's
  crashes cause obscure build failures.
  
  This commit makes freebsd32 cap_enter() fail with [ENOSYS], as if capability
  mode was not compiled in. Applications deal with this by doing their work
  without capability mode.
  
  This commit does not fix the uncommon situation where a 64-bit process
  enters capability mode and then executes a 32-bit binary using fexecve().
  
  This commit should be reverted when allowing the necessary freebsd32 system
  calls in capability mode.
  
  Reviewed by:  pjd
  Approved by:  re (hrs)

Modified:
  head/sys/compat/freebsd32/freebsd32_capability.c
  head/sys/compat/freebsd32/syscalls.master

Modified: head/sys/compat/freebsd32/freebsd32_capability.c
==
--- head/sys/compat/freebsd32/freebsd32_capability.cTue Sep 17 20:33:42 
2013(r255656)
+++ head/sys/compat/freebsd32/freebsd32_capability.cTue Sep 17 20:48:19 
2013(r255657)
@@ -49,6 +49,18 @@ __FBSDID($FreeBSD$);
 MALLOC_DECLARE(M_FILECAPS);
 
 int
+freebsd32_cap_enter(struct thread *td,
+struct freebsd32_cap_enter_args *uap)
+{
+
+   /*
+* We do not have an equivalent of capabilities.conf for freebsd32
+* compatibility, so do not allow capability mode for now.
+*/
+   return (ENOSYS);
+}
+
+int
 freebsd32_cap_ioctls_limit(struct thread *td,
 struct freebsd32_cap_ioctls_limit_args *uap)
 {
@@ -136,6 +148,14 @@ out:
 #else /* !CAPABILITIES */
 
 int
+freebsd32_cap_enter(struct thread *td,
+struct freebsd32_cap_enter_args *uap)
+{
+
+   return (ENOSYS);
+}
+
+int
 freebsd32_cap_ioctls_limit(struct thread *td,
 struct freebsd32_cap_ioctls_limit_args *uap)
 {

Modified: head/sys/compat/freebsd32/syscalls.master
==
--- head/sys/compat/freebsd32/syscalls.master   Tue Sep 17 20:33:42 2013
(r255656)
+++ head/sys/compat/freebsd32/syscalls.master   Tue Sep 17 20:48:19 2013
(r255657)
@@ -973,7 +973,7 @@
 514AUE_NULLOBSOL   cap_new
 515AUE_CAP_RIGHTS_GET  NOPROTO { int __cap_rights_get(int version, \
int fd, cap_rights_t *rightsp); }
-516AUE_CAP_ENTER   NOPROTO { int cap_enter(void); }
+516AUE_CAP_ENTER   STD { int freebsd32_cap_enter(void); }
 517AUE_CAP_GETMODE NOPROTO { int cap_getmode(u_int *modep); }
 518AUE_PDFORK  NOPROTO { int pdfork(int *fdp, int flags); }
 519AUE_PDKILL  NOPROTO { int pdkill(int fd, int signum); }
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r255187 - in head/sys: conf crypto/aesni modules/aesni

2013-09-17 Thread Bjoern A. Zeeb

On Tue, 17 Sep 2013, John-Mark Gurney wrote:


Bjoern A. Zeeb wrote this message on Tue, Sep 17, 2013 at 19:26 +:

On Tue, 3 Sep 2013, John-Mark Gurney wrote:

+ *
+ */
+
+#include wmmintrin.h
+



This pulls in a header from user space, in fact from clang, and if
cross-building without building clang this header file is not
available and a buildkernel is failing.

(paths shortend)
In file included from /sys/modules/aesni/../../crypto/aesni/aesni_wrap.c:40:
/sys/modules/aesni/../../crypto/aesni/aesencdec.h:30:10: fatal error:
'wmmintrin.h' file not found
#include wmmintrin.h ^
1 error generated.
--- aesni_wrap.o ---


More details please...  cross building on what to what?  I will admit
I haven't tried to build from arm or other non-x86 platform to an
x86.. but I am pretty sure I tested cross building i386 on an amd64
machine...

Are you building w/ gcc?  it isn't clear from your message...  If you
are, is your toolchain more recent than the 3rd?

Also, all I did was turn off -nostdinc, I didn't add any other paths,
which sounds like that the cross build environment isn't built
properly if it can't access userland headers...


It should not access the base system headers, it needs the ones in
obj/ but these are not there when building WITHOUT_CLANG=
as that header file in my head checkout only exists in the clang source
(contrib/llvm/tools/clang/lib/Headers/wmmintrin.h).

The SVN revision is about r255569 or the following commit from Saturday.

And yes I am also building without buildtools using XCC= XCPP= XCXX=
using clang from the installed base system, which means the pollution from
that early stage doesn't happen either -- more pieces seem to rely on
this:(

And this is building i386 on i386 just reducing the compile time by 7
orders of magnitude not building clang twice but zero times as I don't
need it for the output install and the one installed in base is
exactly the same I'd build again for bootstrap so avoiding this.

I assume on an entirely clang-free system building with just gcc and
never seen clang the results would be the same as the header file
will never be available anywhere.

--
Bjoern A. Zeeb ? ??? ??? ??:
'??? ???  ??  ??? ?? ?? ??? ??? ??? ? ? 
?? ?? ? ',  ? ?, ??? ? ?? ?, ?.???
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r255658 - head/sys/compat/freebsd32

2013-09-17 Thread Jilles Tjoelker
Author: jilles
Date: Tue Sep 17 20:49:05 2013
New Revision: 255658
URL: http://svnweb.freebsd.org/changeset/base/255658

Log:
  Regenerate for freebsd32_cap_enter().
  
  Approved by:  re (hrs)

Modified:
  head/sys/compat/freebsd32/freebsd32_proto.h
  head/sys/compat/freebsd32/freebsd32_syscall.h
  head/sys/compat/freebsd32/freebsd32_syscalls.c
  head/sys/compat/freebsd32/freebsd32_sysent.c
  head/sys/compat/freebsd32/freebsd32_systrace_args.c

Modified: head/sys/compat/freebsd32/freebsd32_proto.h
==
--- head/sys/compat/freebsd32/freebsd32_proto.h Tue Sep 17 20:48:19 2013
(r255657)
+++ head/sys/compat/freebsd32/freebsd32_proto.h Tue Sep 17 20:49:05 2013
(r255658)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 255219 
2013-09-05 00:09:56Z pjd 
+ * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 255657 
2013-09-17 20:48:19Z jilles 
  */
 
 #ifndef _FREEBSD32_SYSPROTO_H_
@@ -15,6 +15,7 @@
 #include sys/_ffcounter.h
 #include sys/_semaphore.h
 #include sys/ucontext.h
+#include sys/wait.h
 
 #include bsm/audit_kevents.h
 
@@ -591,6 +592,9 @@ struct freebsd32_shmctl_args {
char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)];
char buf_l_[PADL_(struct shmid_ds32 *)]; struct shmid_ds32 * buf; char 
buf_r_[PADR_(struct shmid_ds32 *)];
 };
+struct freebsd32_cap_enter_args {
+   register_t dummy;
+};
 struct freebsd32_pselect_args {
char nd_l_[PADL_(int)]; int nd; char nd_r_[PADR_(int)];
char in_l_[PADL_(fd_set *)]; fd_set * in; char in_r_[PADR_(fd_set *)];
@@ -779,6 +783,7 @@ int freebsd32_jail_set(struct thread *, 
 intfreebsd32_semctl(struct thread *, struct freebsd32_semctl_args *);
 intfreebsd32_msgctl(struct thread *, struct freebsd32_msgctl_args *);
 intfreebsd32_shmctl(struct thread *, struct freebsd32_shmctl_args *);
+intfreebsd32_cap_enter(struct thread *, struct freebsd32_cap_enter_args *);
 intfreebsd32_pselect(struct thread *, struct freebsd32_pselect_args *);
 #ifdef PAD64_REQUIRED
 intfreebsd32_posix_fallocate(struct thread *, struct 
freebsd32_posix_fallocate_args *);
@@ -1182,6 +1187,7 @@ int   freebsd7_freebsd32_shmctl(struct thr
 #defineFREEBSD32_SYS_AUE_freebsd32_semctl  AUE_SEMCTL
 #defineFREEBSD32_SYS_AUE_freebsd32_msgctl  AUE_MSGCTL
 #defineFREEBSD32_SYS_AUE_freebsd32_shmctl  AUE_SHMCTL
+#defineFREEBSD32_SYS_AUE_freebsd32_cap_enter   AUE_CAP_ENTER
 #defineFREEBSD32_SYS_AUE_freebsd32_pselect AUE_SELECT
 #defineFREEBSD32_SYS_AUE_freebsd32_posix_fallocate AUE_NULL
 #defineFREEBSD32_SYS_AUE_freebsd32_posix_fadvise   AUE_NULL

Modified: head/sys/compat/freebsd32/freebsd32_syscall.h
==
--- head/sys/compat/freebsd32/freebsd32_syscall.h   Tue Sep 17 20:48:19 
2013(r255657)
+++ head/sys/compat/freebsd32/freebsd32_syscall.h   Tue Sep 17 20:49:05 
2013(r255658)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 255219 
2013-09-05 00:09:56Z pjd 
+ * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 255657 
2013-09-17 20:48:19Z jilles 
  */
 
 #defineFREEBSD32_SYS_syscall   0
@@ -422,7 +422,7 @@
 #defineFREEBSD32_SYS_lpathconf 513
/* 514 is obsolete cap_new */
 #defineFREEBSD32_SYS___cap_rights_get  515
-#defineFREEBSD32_SYS_cap_enter 516
+#defineFREEBSD32_SYS_freebsd32_cap_enter   516
 #defineFREEBSD32_SYS_cap_getmode   517
 #defineFREEBSD32_SYS_pdfork518
 #defineFREEBSD32_SYS_pdkill519

Modified: head/sys/compat/freebsd32/freebsd32_syscalls.c
==
--- head/sys/compat/freebsd32/freebsd32_syscalls.c  Tue Sep 17 20:48:19 
2013(r255657)
+++ head/sys/compat/freebsd32/freebsd32_syscalls.c  Tue Sep 17 20:49:05 
2013(r255658)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 255219 
2013-09-05 00:09:56Z pjd 
+ * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 255657 
2013-09-17 20:48:19Z jilles 
  */
 
 const char *freebsd32_syscallnames[] = {
@@ -539,7 +539,7 @@ const char *freebsd32_syscallnames[] = {
lpathconf,/* 513 = lpathconf */
obs_cap_new,  /* 514 = obsolete cap_new */
__cap_rights_get, /* 515 = __cap_rights_get */
-   cap_enter,/* 516 = cap_enter */
+   freebsd32_cap_enter,  

Re: svn commit: r255187 - in head/sys: conf crypto/aesni modules/aesni

2013-09-17 Thread John-Mark Gurney
Bjoern A. Zeeb wrote this message on Tue, Sep 17, 2013 at 19:26 +:
 On Tue, 3 Sep 2013, John-Mark Gurney wrote:
 
 Author: jmg
 Date: Tue Sep  3 18:31:23 2013
 New Revision: 255187
 URL: http://svnweb.freebsd.org/changeset/base/255187
 
 Log:
  Use the fact that the AES-NI instructions can be pipelined to improve
  performance... Use SSE2 instructions for calculating the XTS tweek
  factor...  Let the compiler do more work and handle register allocation
  by using intrinsics, now only the key schedule is in assembly...
 
  Replace .byte hard coded instructions w/ the proper instructions now
  that both clang and gcc support them...
 
  On my machine, pulling the code to userland I saw performance go from
  ~150MB/sec to 2GB/sec in XTS mode.  GELI on GNOP saw a more modest
  increase of about 3x due to other system overhead (geom and
  opencrypto)...
 
  These changes allow almost full disk io rate w/ geli...
 
  Reviewed by:-current, -security
  Thanks to:  Mike Hamburg for the XTS tweek algorithm
 
 Added:
  head/sys/crypto/aesni/aesencdec.h   (contents, props changed)
 Deleted:
  head/sys/crypto/aesni/aesencdec_amd64.S
  head/sys/crypto/aesni/aesencdec_i386.S
 Modified:
  head/sys/conf/files.amd64
  head/sys/conf/files.i386
  head/sys/crypto/aesni/aeskeys_amd64.S
  head/sys/crypto/aesni/aesni.c
  head/sys/crypto/aesni/aesni.h
  head/sys/crypto/aesni/aesni_wrap.c
  head/sys/modules/aesni/Makefile
 
 ...
 Added: head/sys/crypto/aesni/aesencdec.h
 ==
 --- /dev/null00:00:00 1970   (empty, because file is newly added)
 +++ head/sys/crypto/aesni/aesencdec.hTue Sep  3 18:31:23 2013 
 (r255187)
 @@ -0,0 +1,136 @@
 +/*-
 + * Copyright 2013 John-Mark Gurney j...@freebsd.org
 + * All rights reserved.
 + *
 + * Redistribution and use in source and binary forms, with or without
 + * modification, are permitted provided that the following conditions
 + * are met:
 + * 1. Redistributions of source code must retain the above copyright
 + *notice, this list of conditions and the following disclaimer.
 + * 2. Redistributions in binary form must reproduce the above copyright
 + *notice, this list of conditions and the following disclaimer in the
 + *documentation and/or other materials provided with the distribution.
 + *
 + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
 PURPOSE
 + * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
 CONSEQUENTIAL
 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 
 STRICT
 + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY 
 WAY
 + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 + * SUCH DAMAGE.
 + *
 + * $FreeBSD$
 + *
 + */
 +
 +#include wmmintrin.h
 +
 
 
 This pulls in a header from user space, in fact from clang, and if
 cross-building without building clang this header file is not
 available and a buildkernel is failing.
 
 (paths shortend)
 In file included from /sys/modules/aesni/../../crypto/aesni/aesni_wrap.c:40:
 /sys/modules/aesni/../../crypto/aesni/aesencdec.h:30:10: fatal error: 
 'wmmintrin.h' file not found
 #include wmmintrin.h ^
 1 error generated.
 --- aesni_wrap.o ---

More details please...  cross building on what to what?  I will admit
I haven't tried to build from arm or other non-x86 platform to an
x86.. but I am pretty sure I tested cross building i386 on an amd64
machine...

Are you building w/ gcc?  it isn't clear from your message...  If you
are, is your toolchain more recent than the 3rd?

Also, all I did was turn off -nostdinc, I didn't add any other paths,
which sounds like that the cross build environment isn't built
properly if it can't access userland headers...

-- 
  John-Mark Gurney  Voice: +1 415 225 5579

 All that I will do, has been done, All that I have, has not.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r255656 - head/sys/mips/conf

2013-09-17 Thread Hiren Panchasara
Author: hiren
Date: Tue Sep 17 20:33:42 2013
New Revision: 255656
URL: http://svnweb.freebsd.org/changeset/base/255656

Log:
  We have grown a bit too big lately. Shrinking the kernel for TP-Link
  TL-WR1043ND.
  
  Submitted by:   loos (initial version)
  Reviewed by:adrian
  Approved by:sbruno (mentor, implicit)
  Approved by:  re (delphij)
  Tested by:  hiren

Modified:
  head/sys/mips/conf/TP-WN1043ND

Modified: head/sys/mips/conf/TP-WN1043ND
==
--- head/sys/mips/conf/TP-WN1043ND  Tue Sep 17 20:25:29 2013
(r255655)
+++ head/sys/mips/conf/TP-WN1043ND  Tue Sep 17 20:33:42 2013
(r255656)
@@ -34,12 +34,26 @@ options MSDOSFS
 # redboot stuff.
 optionsAR71XX_ENV_UBOOT
 
-# uzip - to boot natively from flash
-device geom_uzip
-optionsGEOM_UZIP
+# uncompress - to boot natively from flash
+device geom_uncompress
+optionsGEOM_UNCOMPRESS
 
 # Used for the static uboot partition map
 device  geom_map
 
 # Boot off of the rootfs, as defined in the geom_map setup.
-optionsROOTDEVNAME=\ufs:map/rootfs.uzip\
+optionsROOTDEVNAME=\ufs:map/rootfs.uncompress\
+
+# We bite the performance overhead for now; the kernel won't
+# fit if the mutexes are inlined.
+optionsMUTEX_NOINLINE
+optionsRWLOCK_NOINLINE
+optionsSX_NOINLINE
+
+# Remove everything we don't need.  We need a _really_ small kernel!
+nooptions  INVARIANTS
+nooptions  INVARIANT_SUPPORT
+nooptions  WITNESS
+nooptions  WITNESS_SKIPSPIN
+nooptions  DEBUG_REDZONE
+nooptions  DEBUG_MEMGUARD
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r255642 - head/sys/powerpc/ofw

2013-09-17 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Tue Sep 17 17:31:53 2013
New Revision: 255642
URL: http://svnweb.freebsd.org/changeset/base/255642

Log:
  Only attach if properties we need (address, in particular) are present.
  This is the correct version of r255420.
  
  Approved by:  re (kib)

Modified:
  head/sys/powerpc/ofw/ofw_syscons.c

Modified: head/sys/powerpc/ofw/ofw_syscons.c
==
--- head/sys/powerpc/ofw/ofw_syscons.c  Tue Sep 17 17:30:49 2013
(r255641)
+++ head/sys/powerpc/ofw/ofw_syscons.c  Tue Sep 17 17:31:53 2013
(r255642)
@@ -264,6 +264,10 @@ ofwfb_configure(int flags)
} else
return (0);
 
+   if (OF_getproplen(node, height) != sizeof(sc-sc_height) ||
+   OF_getproplen(node, width) != sizeof(sc-sc_width))
+   return (0);
+
sc-sc_depth = depth;
sc-sc_node = node;
sc-sc_console = 1;
@@ -278,6 +282,8 @@ ofwfb_configure(int flags)
 *
 * XXX We assume #address-cells is 1 at this point.
 */
+   if (OF_getproplen(node, address) != sizeof(fb_phys))
+   return (0);
OF_getprop(node, address, fb_phys, sizeof(fb_phys));
 
bus_space_map(bs_be_tag, fb_phys, sc-sc_height * sc-sc_stride,
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r255659 - head/sys/mips/conf

2013-09-17 Thread Sean Bruno
Author: sbruno
Date: Tue Sep 17 22:26:07 2013
New Revision: 255659
URL: http://svnweb.freebsd.org/changeset/base/255659

Log:
  Bring in configuration for Buffalo Airstation WZR-300HP, Atheros based
  wireless home router.
  
  Notable things:
  2x 16 MB flash devices
  Atheros Wireless
  Atheros Switching
  
  Many thanks to adrian@ for his guidance on this and keeping the drivers in
  the base system up to date
  
  Approved by:re (delphij)

Added:
  head/sys/mips/conf/WZR-300HP   (contents, props changed)
  head/sys/mips/conf/WZR-300HP.hints   (contents, props changed)

Added: head/sys/mips/conf/WZR-300HP
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/mips/conf/WZR-300HPTue Sep 17 22:26:07 2013
(r255659)
@@ -0,0 +1,57 @@
+#
+# Specific board setup for the Buffalo Airstation WZR-300HP
+#
+# The WZR-300HP has the following hardware:
+#
+# + AR7242 CPU SoC
+# + AR9280 5GHz 11n
+# + AR8136 Gigabit switch
+# + 2 m25ll128 based 16MB flash
+# + 64MB RAM
+# + uboot environment
+
+# $FreeBSD$
+
+includeAR724X_BASE
+ident  WZR-300HP
+hints  WZR-300HP.hints
+
+optionsAR71XX_REALMEM=64*1024*1024
+
+optionsAR71XX_ENV_UBOOT
+
+optionsBOOTVERBOSE
+# Don't include the SCSI/CAM strings in the default build
+optionsSCSI_NO_SENSE_STRINGS
+optionsSCSI_NO_OP_STRINGS
+
+# .. And no sysctl strings
+optionsNO_SYSCTL_DESCR
+
+# GEOM modules
+device geom_map# to get access to the SPI flash partitions
+device geom_uncompress # compressed in-memory filesystem hackery!
+
+optionsROOTDEVNAME=\ufs:/dev/map/rootfs.uncompress\
+
+# options  MD_ROOT
+# options  MD_ROOT_SIZE=6144
+
+optionsAR71XX_ATH_EEPROM   # Fetch EEPROM/PCI config from 
flash
+optionsATH_EEPROM_FIRMWARE # Use EEPROM from flash
+device firmware# Used by the above
+
+# Options required for miiproxy and mdiobus
+options ARGE_MDIO   # Export an MDIO bus separate from arge
+device  miiproxy# MDIO bus - MII PHY rendezvous
+
+device  etherswitch
+device  arswitch
+
+# Enable GPIO
+device gpio
+device gpioled
+
+# hwpmc
+device hwpmc_mips24k
+device hwpmc

Added: head/sys/mips/conf/WZR-300HP.hints
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/mips/conf/WZR-300HP.hints  Tue Sep 17 22:26:07 2013
(r255659)
@@ -0,0 +1,187 @@
+# $FreeBSD$
+
+# arge0 is connected to the LAN side of the switch PHY.
+# arge1 is connected to the single port WAN side of the switch PHY.
+
+# arge1 MDIO bus
+hint.argemdio.0.at=nexus0
+hint.argemdio.0.maddr=0x1a00
+hint.argemdio.0.msize=0x1000
+hint.argemdio.0.order=0
+
+hint.arge.0.phymask=0x0
+hint.arge.0.media=1000
+hint.arge.0.fduplex=1
+hint.arge.0.eeprommac=0x1f05120c
+hint.arge.0.mdio=mdioproxy1 # .. off of the switch mdiobus
+
+
+# arge1: nail to 1000/full, RMII - connected to the switch
+hint.arge.1.media=1000  # Map to 1000/full
+hint.arge.1.fduplex=1   #
+hint.arge.1.phymask=0x0 # no directly mapped PHYs
+
+#
+# AR7240 switch config
+#
+hint.arswitch.0.at=mdio0
+hint.arswitch.0.is_7240=1   # We need to be explicitly told this
+hint.arswitch.0.numphys=4   # 4 active switch PHYs (PHY 0 - 3)
+hint.arswitch.0.phy4cpu=1   # Yes, PHY 4 == dedicated PHY
+hint.arswitch.0.is_rgmii=0  # No, not RGMII
+hint.arswitch.0.is_gmii=0   # No, not GMII
+
+# ath0 - slot 0
+hint.pcib.0.bus.0.0.0.ath_fixup_addr=0x1f051000
+hint.pcib.0.bus.0.0.0.ath_fixup_size=4096
+
+# .. and now, telling each ath(4) NIC where to find the firmware
+# image.
+hint.ath.0.eeprom_firmware=pcib.0.bus.0.0.0.eeprom_firmware
+
+# Inherited from AR724X_BASE.hints
+#hint.mx25l.0.at=spibus0
+#hint.mx25l.0.cs=0
+# This board has two 16 MB flash devices on difference Chip Select pins
+hint.mx25l.1.at=spibus0
+hint.mx25l.1.cs=1
+
+
+# Geom MAP
+
+# The WRZ-300HP has 2 16MB flash part - HOWEVER, the 64k caldata isn't
+# at the end of the flash. It's ~ 328KB into the flash image.
+
+# mtdparts=ar7240-nor0:
+#  256k(u-boot)
+#   64k(u-boot-env)
+#   64k@320k(ART)
+# 1152k@384k(uImage)
+# 6592k@1536k(rootfs)
+#   64k@8128k(properties)
+
+# Uboot lies like a lying liar.  OpenWRT does this:
+# [0.57] Concatenating MTD devices:
+# [0.57] (0): spi0.0
+# [0.57] (1): spi0.1
+# [0.58] into device flash
+# [0.58] Creating 7 MTD partitions on flash:
+# [0.59] 0x-0x0004 : u-boot
+# [0.60] 0x0004-0x0005 : u-boot-env
+# [0.60] 0x0005-0x0006 : art
+# [0.61] 

svn commit: r255660 - head

2013-09-17 Thread Bryan Drewery
Author: bdrewery (ports committer)
Date: Wed Sep 18 00:33:24 2013
New Revision: 255660
URL: http://svnweb.freebsd.org/changeset/base/255660

Log:
  Fix 'make installcheck' to check for missing UID/GID as well, broken
  since r249893, by adding a separate _installcheck_world and
  _installcheck_kernel so the destination targets can be more explicit
  on which they are needed for.
  
  installcheck will call both, while installworld only calls
  _installcheck_world and installkernel only calls _installcheck_kernel
  
  While here, mark the internal targets as starting with _.
  
  Reported by:  des
  Reviewed by:  des
  Pointyhat to: bdrewery
  Approved by:  re (delphij)

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Tue Sep 17 22:26:07 2013(r255659)
+++ head/Makefile.inc1  Wed Sep 18 00:33:24 2013(r255660)
@@ -676,8 +676,9 @@ kernel-toolchain: ${TOOLCHAIN_TGTS:N_inc
 #
 # Checks to be sure system is ready for installworld/installkernel.
 #
-installcheck:
-installcheck_UGID:
+installcheck: _installcheck_world _installcheck_kernel
+_installcheck_world:
+_installcheck_kernel:
 
 #
 # Require DESTDIR to be set if installing for a different architecture or
@@ -686,8 +687,9 @@ installcheck_UGID:
 .if ${TARGET_ARCH} != ${MACHINE_ARCH} || ${TARGET} != ${MACHINE} || \
 defined(DB_FROM_SRC)
 .if !make(distributeworld)
-installcheck: installcheck_DESTDIR
-installcheck_DESTDIR:
+_installcheck_world: __installcheck_DESTDIR
+_installcheck_kernel: __installcheck_DESTDIR
+__installcheck_DESTDIR:
 .if !defined(DESTDIR) || empty(DESTDIR)
@echo ERROR: Please set DESTDIR!; \
false
@@ -713,7 +715,8 @@ CHECK_GIDS+=proxy authpf
 CHECK_UIDS+=   unbound
 CHECK_GIDS+=   unbound
 .endif
-installcheck_UGID:
+_installcheck_world: __installcheck_UGID
+__installcheck_UGID:
 .for uid in ${CHECK_UIDS}
@if ! `id -u ${uid} /dev/null 21`; then \
echo ERROR: Required ${uid} user is missing, see 
/usr/src/UPDATING.; \
@@ -768,7 +771,7 @@ EXTRA_DISTRIBUTIONS+=   lib32
 
 MTREE_MAGIC?=  mtree 2.0
 
-distributeworld installworld: installcheck installcheck_UGID
+distributeworld installworld: _installcheck_world
mkdir -p ${INSTALLTMP}
progs=$$(for prog in ${ITOOLS}; do \
if progpath=`which $$prog`; then \
@@ -1046,7 +1049,7 @@ buildkernel:
 # Install the kernel defined by INSTALLKERNEL
 #
 installkernel installkernel.debug \
-reinstallkernel reinstallkernel.debug: installcheck
+reinstallkernel reinstallkernel.debug: _installcheck_kernel
 .if empty(INSTALLKERNEL)
@echo ERROR: No kernel \${KERNCONF}\ to install.; \
false
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r255662 - head/share/man/man5

2013-09-17 Thread Joel Dahl
Author: joel (doc committer)
Date: Wed Sep 18 04:44:54 2013
New Revision: 255662
URL: http://svnweb.freebsd.org/changeset/base/255662

Log:
  mdoc: sort SEE ALSO.
  
  Approved by:  re (blanket)

Modified:
  head/share/man/man5/fstab.5

Modified: head/share/man/man5/fstab.5
==
--- head/share/man/man5/fstab.5 Wed Sep 18 03:51:49 2013(r255661)
+++ head/share/man/man5/fstab.5 Wed Sep 18 04:44:54 2013(r255662)
@@ -416,6 +416,7 @@ serv:/export/nfsnfs rw,noinet6  
0   0
 .Sh SEE ALSO
 .Xr getfsent 3 ,
 .Xr getvfsbyname 3 ,
+.Xr strunvis 3 ,
 .Xr ccd 4 ,
 .Xr dump 8 ,
 .Xr fsck 8 ,
@@ -423,7 +424,6 @@ serv:/export/nfsnfs rw,noinet6  
0   0
 .Xr mount 8 ,
 .Xr quotacheck 8 ,
 .Xr quotaon 8 ,
-.Xr strunvis 3 ,
 .Xr swapon 8 ,
 .Xr umount 8
 .Sh HISTORY
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org