svn commit: r228304 - head/sys/dev/usb/template

2011-12-06 Thread Hans Petter Selasky
Author: hselasky
Date: Tue Dec  6 08:08:52 2011
New Revision: 228304
URL: http://svn.freebsd.org/changeset/base/228304

Log:
  Correct some bInterval USB template descriptor values.
  
  MFC after:3 days

Modified:
  head/sys/dev/usb/template/usb_template.c
  head/sys/dev/usb/template/usb_template_kbd.c
  head/sys/dev/usb/template/usb_template_modem.c
  head/sys/dev/usb/template/usb_template_mouse.c

Modified: head/sys/dev/usb/template/usb_template.c
==
--- head/sys/dev/usb/template/usb_template.cTue Dec  6 07:55:25 2011
(r228303)
+++ head/sys/dev/usb/template/usb_template.cTue Dec  6 08:08:52 2011
(r228304)
@@ -260,7 +260,7 @@ usb_make_endpoint_desc(struct usb_temp_s
ed->bInterval = 1;  /* 1 ms */
break;
default:
-   ed->bInterval = 8;  /* 8*125 us */
+   ed->bInterval = 4;  /* 1 ms */
break;
}
break;

Modified: head/sys/dev/usb/template/usb_template_kbd.c
==
--- head/sys/dev/usb/template/usb_template_kbd.cTue Dec  6 07:55:25 
2011(r228303)
+++ head/sys/dev/usb/template/usb_template_kbd.cTue Dec  6 08:08:52 
2011(r228304)
@@ -89,9 +89,9 @@ static const struct usb_temp_packet_size
 };
 
 static const struct usb_temp_interval keyboard_intr_interval = {
-   .bInterval[USB_SPEED_LOW] = 2,  /* ms */
-   .bInterval[USB_SPEED_FULL] = 2,
-   .bInterval[USB_SPEED_HIGH] = 2 * 8,
+   .bInterval[USB_SPEED_LOW] = 2,  /* 2 ms */
+   .bInterval[USB_SPEED_FULL] = 2, /* 2 ms */
+   .bInterval[USB_SPEED_HIGH] = 5, /* 2 ms */
 };
 
 /* The following HID descriptor was dumped from a HP keyboard. */

Modified: head/sys/dev/usb/template/usb_template_modem.c
==
--- head/sys/dev/usb/template/usb_template_modem.c  Tue Dec  6 07:55:25 
2011(r228303)
+++ head/sys/dev/usb/template/usb_template_modem.c  Tue Dec  6 08:08:52 
2011(r228304)
@@ -98,9 +98,9 @@ static const struct usb_temp_packet_size
 };
 
 static const struct usb_temp_interval modem_intr_interval = {
-   .bInterval[USB_SPEED_LOW] = 10,
-   .bInterval[USB_SPEED_FULL] = 10,
-   .bInterval[USB_SPEED_HIGH] = 10 * 8,
+   .bInterval[USB_SPEED_LOW] = 8,  /* 8ms */
+   .bInterval[USB_SPEED_FULL] = 8, /* 8ms */
+   .bInterval[USB_SPEED_HIGH] = 7, /* 8ms */
 };
 
 static const struct usb_temp_endpoint_desc modem_ep_0 = {

Modified: head/sys/dev/usb/template/usb_template_mouse.c
==
--- head/sys/dev/usb/template/usb_template_mouse.c  Tue Dec  6 07:55:25 
2011(r228303)
+++ head/sys/dev/usb/template/usb_template_mouse.c  Tue Dec  6 08:08:52 
2011(r228304)
@@ -101,9 +101,9 @@ static const struct usb_temp_packet_size
 };
 
 static const struct usb_temp_interval mouse_intr_interval = {
-   .bInterval[USB_SPEED_LOW] = 2,
-   .bInterval[USB_SPEED_FULL] = 2,
-   .bInterval[USB_SPEED_HIGH] = 2 * 8,
+   .bInterval[USB_SPEED_LOW] = 2,  /* 2ms */
+   .bInterval[USB_SPEED_FULL] = 2, /* 2ms */
+   .bInterval[USB_SPEED_HIGH] = 5, /* 2ms */
 };
 
 static const struct usb_temp_endpoint_desc mouse_ep_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: r228305 - head/share/man/man4

2011-12-06 Thread Alexander Motin
Author: mav
Date: Tue Dec  6 09:12:11 2011
New Revision: 228305
URL: http://svn.freebsd.org/changeset/base/228305

Log:
  Mention that Cold Presence Detection feature used for hot-plug detection
  when interface power management is enabled.

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

Modified: head/share/man/man4/ahci.4
==
--- head/share/man/man4/ahci.4  Tue Dec  6 08:08:52 2011(r228304)
+++ head/share/man/man4/ahci.4  Tue Dec  6 09:12:11 2011(r228305)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 2, 2011
+.Dd December 6, 2011
 .Dt AHCI 4
 .Os
 .Sh NAME
@@ -90,9 +90,9 @@ Some controllers, such as ICH8, do not i
 Because of artificial entering latency, performance degradation in modes
 4 and 5 is much smaller then in modes 2 and 3.
 .Pp
-Note that interface Power Management is not compatible with
-device presence detection.
-A manual bus reset is needed on device hot-plug.
+Note that interface Power Management complicates device presence detection.
+A manual bus reset/rescan may be needed after device hot-plug, unless hardware
+implements Cold Presence Detection.
 .It Va hint.ahcich. Ns Ar X Ns Va .sata_rev
 setting to nonzero value limits maximum SATA revision (speed).
 Values 1, 2 and 3 are respectively 1.5, 3 and 6Gbps.
___
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: r228158 - in head: . share/mk sys/conf

2011-12-06 Thread Gary Jennejohn
On Mon, 5 Dec 2011 21:43:59 +0100
Hans Petter Selasky  wrote:

> Hi,
> 
> I see regressions when building kernel modules from /usr/ports:
> 
> On Monday 05 December 2011 14:39:56 Robert Huff wrote:
> > Hello:
> >   When trying to update I get:
> > 
> > ===>  Building for cuse4bsd-kmod-0.1.21_2
> > make -f
> > /data/port-work/usr/ports/multimedia/cuse4bsd-kmod/work/cuse4bsd-kmod-0.1.
> > 21/Makefile.lib HAVE_DEBUG=YES all Warning: Object directory not changed
> > from original
> > /data/port-work/usr/ports/multimedia/cuse4bsd-kmod/work/cuse4bsd-kmod-0.1.
> > 21 make -f
> > /data/port-work/usr/ports/multimedia/cuse4bsd-kmod/work/cuse4bsd-kmod-0.1.
> > 21/Makefile.kmod all "/sys/conf/kmod.mk", line 204: Malformed conditional
> > (${MK_CTF} != "no") "/sys/conf/kmod.mk", line 206: if-less endif
> > make: fatal errors encountered -- cannot continue
> > *** Error code 1
> 

I encountered this problem yesterday.  My quick hack was to put
.if defined(MK_CTF) .endif around the offending lines, similar to
EXPORT_SYMS.

-- 
Gary Jennejohn
___
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: r228306 - head/sys/kern

2011-12-06 Thread Konstantin Belousov
Author: kib
Date: Tue Dec  6 11:24:03 2011
New Revision: 228306
URL: http://svn.freebsd.org/changeset/base/228306

Log:
  Most users of pipe(2) do not call fstat(2) on the returned pipe descriptors.
  Optimize for the case, by lazily allocating the pipe inode number at the
  fstat(2) time. If alloc_unr(9) returns failure, do not fail fstat(2), since
  uses of inode numbers are even rare then fstat(2), but provide zero inode
  forever. Note that alloc_unr() failure is unlikely due to total number
  of pipes in the system limited by the number of file descriptors.
  
  Based on the submission by:   gianni
  MFC after:2 weeks

Modified:
  head/sys/kern/sys_pipe.c

Modified: head/sys/kern/sys_pipe.c
==
--- head/sys/kern/sys_pipe.cTue Dec  6 09:12:11 2011(r228305)
+++ head/sys/kern/sys_pipe.cTue Dec  6 11:24:03 2011(r228306)
@@ -569,12 +569,7 @@ pipe_create(pipe, backing)
/* If we're not backing this pipe, no need to do anything. */
error = 0;
}
-   if (error == 0) {
-   pipe->pipe_ino = alloc_unr(pipeino_unr);
-   if (pipe->pipe_ino == -1)
-   /* pipeclose will clear allocated kva */
-   error = ENOMEM;
-   }
+   pipe->pipe_ino = -1;
return (error);
 }
 
@@ -1398,16 +1393,40 @@ pipe_stat(fp, ub, active_cred, td)
struct ucred *active_cred;
struct thread *td;
 {
-   struct pipe *pipe = fp->f_data;
+   struct pipe *pipe;
+   int new_unr;
 #ifdef MAC
int error;
+#endif
 
+   pipe = fp->f_data;
PIPE_LOCK(pipe);
+#ifdef MAC
error = mac_pipe_check_stat(active_cred, pipe->pipe_pair);
-   PIPE_UNLOCK(pipe);
-   if (error)
+   if (error) {
+   PIPE_UNLOCK(pipe);
return (error);
+   }
 #endif
+   /*
+* Lazily allocate an inode number for the pipe.  Most pipe
+* users do not call fstat(2) on the pipe, which means that
+* postponing the inode allocation until it is must be
+* returned to userland is useful.  If alloc_unr failed,
+* assign st_ino zero instead of returning an error.
+* Special pipe_ino values:
+*  -1 - not yet initialized;
+*  0  - alloc_unr failed, return 0 as st_ino forever.
+*/
+   if (pipe->pipe_ino == (ino_t)-1) {
+   new_unr = alloc_unr(pipeino_unr);
+   if (new_unr != -1)
+   pipe->pipe_ino = new_unr;
+   else
+   pipe->pipe_ino = 0;
+   }
+   PIPE_UNLOCK(pipe);
+
bzero(ub, sizeof(*ub));
ub->st_mode = S_IFIFO;
ub->st_blksize = PAGE_SIZE;
___
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: r228307 - in head: secure/lib/libcrypto share/mk

2011-12-06 Thread Konstantin Belousov
Author: kib
Date: Tue Dec  6 11:28:17 2011
New Revision: 228307
URL: http://svn.freebsd.org/changeset/base/228307

Log:
  Force linker error when created shared library contains a relocation
  against text. Provide the override switch to turn off the strict
  behaviour. Apparently, openssl libcrypto needs it due to assembler
  code not being PIC.
  
  Discussed with:   bf
  MFC after:2 weeks

Modified:
  head/secure/lib/libcrypto/Makefile
  head/share/mk/bsd.lib.mk

Modified: head/secure/lib/libcrypto/Makefile
==
--- head/secure/lib/libcrypto/Makefile  Tue Dec  6 11:24:03 2011
(r228306)
+++ head/secure/lib/libcrypto/Makefile  Tue Dec  6 11:28:17 2011
(r228307)
@@ -7,6 +7,7 @@ SUBDIR= engines
 
 LIB=   crypto
 SHLIB_MAJOR=   6
+ALLOW_SHARED_TEXTREL=
 
 NO_LINT=
 

Modified: head/share/mk/bsd.lib.mk
==
--- head/share/mk/bsd.lib.mkTue Dec  6 11:24:03 2011(r228306)
+++ head/share/mk/bsd.lib.mkTue Dec  6 11:28:17 2011(r228307)
@@ -167,6 +167,11 @@ SOBJS+=${OBJS:.o=.So}
 .if defined(SHLIB_NAME)
 _LIBS+=${SHLIB_NAME}
 
+SOLINKOPTS=-shared -Wl,-x
+.if !defined(ALLOW_SHARED_TEXTREL)
+SOLINKOPTS+=   -Wl,--fatal-warnings -Wl,--warn-shared-textrel
+.endif
+
 .if target(beforelinking)
 ${SHLIB_NAME}: ${SOBJS} beforelinking
 .else
@@ -178,11 +183,11 @@ ${SHLIB_NAME}: ${SOBJS}
@ln -fs ${.TARGET} ${SHLIB_LINK}
 .endif
 .if !defined(NM)
-   @${CC} ${LDFLAGS} ${SSP_CFLAGS} -shared -Wl,-x \
+   @${CC} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \
-o ${.TARGET} -Wl,-soname,${SONAME} \
`lorder ${SOBJS} | tsort -q` ${LDADD}
 .else
-   @${CC} ${LDFLAGS} ${SSP_CFLAGS} -shared -Wl,-x \
+   @${CC} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \
-o ${.TARGET} -Wl,-soname,${SONAME} \
`NM='${NM}' lorder ${SOBJS} | tsort -q` ${LDADD}
 .endif
___
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: r228308 - head/kerberos5

2011-12-06 Thread Hajimu UMEMOTO
Author: ume
Date: Tue Dec  6 12:03:01 2011
New Revision: 228308
URL: http://svn.freebsd.org/changeset/base/228308

Log:
  Don't support OpenLDAP during lib32 build.

Modified:
  head/kerberos5/Makefile.inc

Modified: head/kerberos5/Makefile.inc
==
--- head/kerberos5/Makefile.inc Tue Dec  6 11:28:17 2011(r228307)
+++ head/kerberos5/Makefile.inc Tue Dec  6 12:03:01 2011(r228308)
@@ -6,7 +6,7 @@ KRB5DIR=${.CURDIR}/../../../crypto/heim
 
 CFLAGS+=   -DHAVE_CONFIG_H -I${.CURDIR}/../../include
 
-.if defined(WITH_OPENLDAP)
+.if defined(WITH_OPENLDAP) && !defined(COMPAT_32BIT)
 OPENLDAPBASE?= /usr/local
 LDAPLDADD= -lldap -llber
 LDAPDPADD= ${LDAPLDADD:C;^-l(.*)$;${OPENLDAPBASE}/lib/lib\1.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"


Re: svn commit: r228158 - in head: . share/mk sys/conf

2011-12-06 Thread Gleb Kurtsou
On (05/12/2011 21:43), Hans Petter Selasky wrote:
> Hi,
> 
> I see regressions when building kernel modules from /usr/ports:

make buildworld && make installworld should fix it

> 
> On Monday 05 December 2011 14:39:56 Robert Huff wrote:
> > Hello:
> >   When trying to update I get:
> > 
> > ===>  Building for cuse4bsd-kmod-0.1.21_2
> > make -f
> > /data/port-work/usr/ports/multimedia/cuse4bsd-kmod/work/cuse4bsd-kmod-0.1.
> > 21/Makefile.lib HAVE_DEBUG=YES all Warning: Object directory not changed
> > from original
> > /data/port-work/usr/ports/multimedia/cuse4bsd-kmod/work/cuse4bsd-kmod-0.1.
> > 21 make -f
> > /data/port-work/usr/ports/multimedia/cuse4bsd-kmod/work/cuse4bsd-kmod-0.1.
> > 21/Makefile.kmod all "/sys/conf/kmod.mk", line 204: Malformed conditional
> > (${MK_CTF} != "no") "/sys/conf/kmod.mk", line 206: if-less endif
> > make: fatal errors encountered -- cannot continue
> > *** Error code 1
> 
> 
> --HPS
___
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: r228207 - head/sys/kern

2011-12-06 Thread John Baldwin
On Saturday, December 03, 2011 5:51:42 am Ivan Klymenko wrote:
> В Fri, 2 Dec 2011 19:59:46 + (UTC)
> John Baldwin  пишет:
> 
> > Author: jhb
> > Date: Fri Dec  2 19:59:46 2011
> > New Revision: 228207
> > URL: http://svn.freebsd.org/changeset/base/228207
> > 
> > Log:
> >   When changing the user priority of a thread, change the real
> > priority in addition to the user priority for threads whose current
> > real priority is equal to the previous user priority or if the new
> > priority is a real-time priority.  This allows priority changes of
> > other threads to have an immediate effect.
> >   
> Thank you!
> It's a little corrected the situation with interactivity with using ULE
> scheduler...
> But quite a bit... :)

Hmm, I would not have expected this to make much of a difference unless you 
are explicitly running the 'rtprio' command.

-- 
John Baldwin
___
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: r227549 - stable/7/sys/nfsclient

2011-12-06 Thread John Baldwin
On Thursday, December 01, 2011 5:23:32 pm Andriy Gapon wrote:
> on 01/12/2011 23:42 John Baldwin said the following:
> > On Thursday, December 01, 2011 10:59:54 am Mark Saad wrote:
> >> On Wed, Nov 30, 2011 at 6:10 PM, Doug Barton  wrote:
> >>> On 11/30/2011 14:52, Rick Macklem wrote:
>  I'm relatively new to FreeBSD, but I've never heard of an MFC to a
>  Release branch. (As far as I know, if it ever happens, it's for a
>  serious errata or security issue.)
> >>>
> >>> You are correct sir. :)
> >>>
> >> So how would I ever see this in an official release as an errata fix ?
> > 
> > At this point you likely won't.  The vast majority of patches to releases 
> > are
> > only for security advisories.  Very few errata are merged back to releases
> > currently.  It may be that we are too hesitant to do so, but the manpower
> > overhead of actually getting the changes merged back and getting appropriate
> > folks to sign off on everything is extremely high (and the exact process for
> > getting an EN approved is not very clear or really even documented to my
> > knowledge).
> > 
> 
> Just to clarify - the fix will be in the future (official) releases from 8, 9
> and so on branches.

Yes, but without EN's there is no currently supported release a user can use
to get this bug fix.  I still think we are too hesitant to merge EN's.

-- 
John Baldwin
___
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: r228311 - head/sys/conf

2011-12-06 Thread Max Khon
Author: fjoe
Date: Tue Dec  6 18:01:09 2011
New Revision: 228311
URL: http://svn.freebsd.org/changeset/base/228311

Log:
  MK_CTF is not defined when kmod.mk is used with old bsd.own.mk.

Modified:
  head/sys/conf/kmod.mk

Modified: head/sys/conf/kmod.mk
==
--- head/sys/conf/kmod.mk   Tue Dec  6 17:54:59 2011(r228310)
+++ head/sys/conf/kmod.mk   Tue Dec  6 18:01:09 2011(r228311)
@@ -201,7 +201,7 @@ ${KMOD}.kld: ${OBJS}
 ${FULLPROG}: ${OBJS}
 .endif
${LD} ${LDFLAGS} -r -d -o ${.TARGET} ${OBJS}
-.if ${MK_CTF} != "no"
+.if defined(MK_CTF) && ${MK_CTF} != "no"
${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS}
 .endif
 .if defined(EXPORT_SYMS)
___
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: r228158 - in head: . share/mk sys/conf

2011-12-06 Thread Max Khon
Gary, Hans,

On Tue, Dec 6, 2011 at 4:06 PM, Gary Jennejohn wrote:

> I see regressions when building kernel modules from /usr/ports:
> >
> > On Monday 05 December 2011 14:39:56 Robert Huff wrote:
> > > Hello:
> > >   When trying to update I get:
> > >
> > > ===>  Building for cuse4bsd-kmod-0.1.21_2
> > > make -f
> > >
> /data/port-work/usr/ports/multimedia/cuse4bsd-kmod/work/cuse4bsd-kmod-0.1.
> > > 21/Makefile.lib HAVE_DEBUG=YES all Warning: Object directory not
> changed
> > > from original
> > >
> /data/port-work/usr/ports/multimedia/cuse4bsd-kmod/work/cuse4bsd-kmod-0.1.
> > > 21 make -f
> > >
> /data/port-work/usr/ports/multimedia/cuse4bsd-kmod/work/cuse4bsd-kmod-0.1.
> > > 21/Makefile.kmod all "/sys/conf/kmod.mk", line 204: Malformed
> conditional
> > > (${MK_CTF} != "no") "/sys/conf/kmod.mk", line 206: if-less endif
> > > make: fatal errors encountered -- cannot continue
> > > *** Error code 1
> >
>
> I encountered this problem yesterday.  My quick hack was to put
> .if defined(MK_CTF) .endif around the offending lines, similar to
> EXPORT_SYMS.
>

This should be fixed now (rev. 228311)

Max
___
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: r228313 - head/sys/netinet

2011-12-06 Thread Gleb Smirnoff
Author: glebius
Date: Tue Dec  6 20:55:20 2011
New Revision: 228313
URL: http://svn.freebsd.org/changeset/base/228313

Log:
  Fix a very special case when SIOCAIFADDR supplies mask of 0.0.0.0,
  don't overwrite the mask with autoguessing based on classes.

Modified:
  head/sys/netinet/in.c

Modified: head/sys/netinet/in.c
==
--- head/sys/netinet/in.c   Tue Dec  6 19:04:45 2011(r228312)
+++ head/sys/netinet/in.c   Tue Dec  6 20:55:20 2011(r228313)
@@ -73,7 +73,7 @@ static intin_addprefix(struct in_ifaddr
 static int in_scrubprefix(struct in_ifaddr *, u_int);
 static voidin_socktrim(struct sockaddr_in *);
 static int in_ifinit(struct ifnet *,
-   struct in_ifaddr *, struct sockaddr_in *, int);
+   struct in_ifaddr *, struct sockaddr_in *, int, int);
 static voidin_purgemaddrs(struct ifnet *);
 
 static VNET_DEFINE(int, sameprefixcarponly);
@@ -517,7 +517,7 @@ in_control(struct socket *so, u_long cmd
 
case SIOCSIFADDR:
error = in_ifinit(ifp, ia,
-   (struct sockaddr_in *) &ifr->ifr_addr, 1);
+   (struct sockaddr_in *) &ifr->ifr_addr, 1, 0);
if (error != 0 && iaIsNew)
break;
if (error == 0) {
@@ -569,7 +569,8 @@ in_control(struct socket *so, u_long cmd
maskIsNew  = 1; /* We lie; but the effect's the same */
}
if (hostIsNew || maskIsNew)
-   error = in_ifinit(ifp, ia, &ifra->ifra_addr, 0);
+   error = in_ifinit(ifp, ia, &ifra->ifra_addr, 0,
+   maskIsNew);
if (error != 0 && iaIsNew)
break;
 
@@ -842,7 +843,7 @@ in_ifscrub(struct ifnet *ifp, struct in_
  */
 static int
 in_ifinit(struct ifnet *ifp, struct in_ifaddr *ia, struct sockaddr_in *sin,
-int scrub)
+int scrub, int masksupplied)
 {
register u_long i = ntohl(sin->sin_addr.s_addr);
int flags = RTF_UP, error = 0;
@@ -872,7 +873,7 @@ in_ifinit(struct ifnet *ifp, struct in_i
 * Be compatible with network classes, if netmask isn't supplied,
 * guess it based on classes.
 */
-   if (ia->ia_subnetmask == 0) {
+   if (!masksupplied) {
if (IN_CLASSA(i))
ia->ia_subnetmask = IN_CLASSA_NET;
else if (IN_CLASSB(i))
___
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: r227997 - vendor/libcxxrt/8931d9e5180830a5433d16ae6b3ad8dd9e629512

2011-12-06 Thread Ulrich Spörlein
On Sat, 2011-11-26 at 14:20:34 +, David Chisnall wrote:
> Author: theraven
> Date: Sat Nov 26 14:20:34 2011
> New Revision: 227997
> URL: http://svn.freebsd.org/changeset/base/227997
> 
> Log:
>   Versioned snapshot for libcxxrt
>   
>   Approved by:dim (mentor)
> 
> Added:
>   vendor/libcxxrt/8931d9e5180830a5433d16ae6b3ad8dd9e629512/
>  - copied from r227996, vendor/libcxxrt/dist/

Ho humm, would you really call this a versioned directory? It's kinda
silly, IMHO, as it provides no clues as to the evolution of the code.
It's just a content identifier and cannot even be sorted.

Please consider using dated snapshots instead, e.g. -MM-DD, etc.

Thanks
Uli
___
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: r228317 - head/sys/kern

2011-12-06 Thread Alan Cox
Author: alc
Date: Wed Dec  7 07:03:14 2011
New Revision: 228317
URL: http://svn.freebsd.org/changeset/base/228317

Log:
  Eliminate the possibility of 32-bit arithmetic overflow in the calculation
  of vm_kmem_size that may occur if the system administrator has specified a
  vm.vm_kmem_size tunable value that exceeds the hard cap.
  
  PR:   162741
  Submitted by: Adam McDougall
  Reviewed by:  bde@
  MFC after:3 weeks

Modified:
  head/sys/kern/kern_malloc.c

Modified: head/sys/kern/kern_malloc.c
==
--- head/sys/kern/kern_malloc.c Wed Dec  7 00:22:34 2011(r228316)
+++ head/sys/kern/kern_malloc.c Wed Dec  7 07:03:14 2011(r228317)
@@ -740,11 +740,11 @@ kmeminit(void *dummy)
/*
 * Limit kmem virtual size to twice the physical memory.
 * This allows for kmem map sparseness, but limits the size
-* to something sane. Be careful to not overflow the 32bit
-* ints while doing the check.
+* to something sane.  Be careful to not overflow the 32bit
+* ints while doing the check or the adjustment.
 */
-   if (((vm_kmem_size / 2) / PAGE_SIZE) > cnt.v_page_count)
-   vm_kmem_size = 2 * cnt.v_page_count * PAGE_SIZE;
+   if (vm_kmem_size / 2 / PAGE_SIZE > mem_size)
+   vm_kmem_size = 2 * mem_size * PAGE_SIZE;
 
 #ifdef DEBUG_MEMGUARD
tmp = memguard_fudge(vm_kmem_size, vm_kmem_size_max);
___
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"