svn commit: r226034 - head/sys/arm/xscale/ixp425

2011-10-05 Thread Andrew Thompson
Author: thompsa
Date: Wed Oct  5 08:33:50 2011
New Revision: 226034
URL: http://svn.freebsd.org/changeset/base/226034

Log:
  Add missing newbus glue, this has never attached properly to gpiobus.

Modified:
  head/sys/arm/xscale/ixp425/avila_gpio.c

Modified: head/sys/arm/xscale/ixp425/avila_gpio.c
==
--- head/sys/arm/xscale/ixp425/avila_gpio.c Wed Oct  5 07:28:23 2011
(r226033)
+++ head/sys/arm/xscale/ixp425/avila_gpio.c Wed Oct  5 08:33:50 2011
(r226034)
@@ -356,5 +356,10 @@ static driver_t gpio_avila_driver = {
sizeof(struct avila_gpio_softc),
 };
 static devclass_t gpio_avila_devclass;
+extern devclass_t gpiobus_devclass, gpioc_devclass;
+extern driver_t gpiobus_driver, gpioc_driver;
 
 DRIVER_MODULE(gpio_avila, ixp, gpio_avila_driver, gpio_avila_devclass, 0, 0);
+DRIVER_MODULE(gpiobus, gpio_avila, gpiobus_driver, gpiobus_devclass, 0, 0);
+DRIVER_MODULE(gpioc, gpio_avila, gpioc_driver, gpioc_devclass, 0, 0);
+MODULE_VERSION(gpio_avila, 1);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r226035 - in head/usr.bin/grep: . regex

2011-10-05 Thread Gabor Kovesdan
Author: gabor
Date: Wed Oct  5 09:56:43 2011
New Revision: 226035
URL: http://svn.freebsd.org/changeset/base/226035

Log:
  Update BSD grep to the latest development version.  It has some code
  backported that was written for the TRE integration project in Google
  Summer of Code 2011.  This is a temporary solution until the whole
  regex library is not replaced so that BSD grep development can continue
  and the backported code gets some review and testing.  This change only
  improves scalability slightly, there is no big performance boost yet
  but several minor bugs have been found and fixed.
  
  Approved by:  delphij (mentor)
  Sposored by:  Google Summer of Code 2011
  MFC after:1 week

Added:
  head/usr.bin/grep/regex/
  head/usr.bin/grep/regex/fastmatch.c   (contents, props changed)
  head/usr.bin/grep/regex/fastmatch.h   (contents, props changed)
  head/usr.bin/grep/regex/glue.h   (contents, props changed)
  head/usr.bin/grep/regex/hashtable.c   (contents, props changed)
  head/usr.bin/grep/regex/hashtable.h   (contents, props changed)
  head/usr.bin/grep/regex/tre-compile.c   (contents, props changed)
  head/usr.bin/grep/regex/tre-fastmatch.c   (contents, props changed)
  head/usr.bin/grep/regex/tre-fastmatch.h   (contents, props changed)
  head/usr.bin/grep/regex/xmalloc.c   (contents, props changed)
  head/usr.bin/grep/regex/xmalloc.h   (contents, props changed)
Deleted:
  head/usr.bin/grep/fastgrep.c
Modified:
  head/usr.bin/grep/Makefile
  head/usr.bin/grep/file.c
  head/usr.bin/grep/grep.c
  head/usr.bin/grep/grep.h
  head/usr.bin/grep/util.c

Modified: head/usr.bin/grep/Makefile
==
--- head/usr.bin/grep/Makefile  Wed Oct  5 08:33:50 2011(r226034)
+++ head/usr.bin/grep/Makefile  Wed Oct  5 09:56:43 2011(r226035)
@@ -8,28 +8,52 @@
 PROG=  grep
 .else
 PROG=  bsdgrep
+CLEANFILES+= bsdgrep.1
+
+bsdgrep.1: grep.1
+   cp ${.ALLSRC} ${.TARGET}
 .endif
-SRCS=  fastgrep.c file.c grep.c queue.c util.c
+SRCS=  file.c grep.c queue.c util.c
+
+# Extra files ported backported form some regex improvements
+.PATH: ${.CURDIR}/regex
+SRCS+= fastmatch.c hashtable.c tre-compile.c tre-fastmatch.c xmalloc.c
+CFLAGS+=-I${.CURDIR}/regex
 
 .if ${MK_BSD_GREP} == "yes"
 LINKS= ${BINDIR}/grep ${BINDIR}/egrep \
${BINDIR}/grep ${BINDIR}/fgrep \
${BINDIR}/grep ${BINDIR}/zgrep \
${BINDIR}/grep ${BINDIR}/zegrep \
-   ${BINDIR}/grep ${BINDIR}/zfgrep
+   ${BINDIR}/grep ${BINDIR}/zfgrep \
+   ${BINDIR}/grep ${BINDIR}/bzgrep \
+   ${BINDIR}/grep ${BINDIR}/bzegrep \
+   ${BINDIR}/grep ${BINDIR}/bzfgrep \
+   ${BINDIR}/grep ${BINDIR}/xzgrep \
+   ${BINDIR}/grep ${BINDIR}/xzegrep \
+   ${BINDIR}/grep ${BINDIR}/xzfgrep \
+   ${BINDIR}/grep ${BINDIR}/lzgrep \
+   ${BINDIR}/grep ${BINDIR}/lzegrep \
+   ${BINDIR}/grep ${BINDIR}/lzfgrep
 
 MLINKS= grep.1 egrep.1 \
grep.1 fgrep.1 \
grep.1 zgrep.1 \
grep.1 zegrep.1 \
-   grep.1 zfgrep.1
+   grep.1 zfgrep.1 \
+   grep.1 bzgrep.1 \
+   grep.1 bzegrep.1 \
+   grep.1 bzfgrep.1 \
+   grep.1 xzgrep.1 \
+   grep.1 xzegrep.1 \
+   grep.1 xzfgrep.1 \
+   grep.1 lzgrep.1 \
+   grep.1 lzegrep.1 \
+   grep.1 lzfgrep.1
 .endif
 
-bsdgrep.1: grep.1
-   cp ${.ALLSRC} ${.TARGET}
-
-LDADD= -lz -lbz2
-DPADD= ${LIBZ} ${LIBBZ2}
+LDADD= -lz -lbz2 -llzma
+DPADD= ${LIBZ} ${LIBBZ2} ${LIBLZMA}
 
 .if !defined(WITHOUT_GNU_COMPAT)
 CFLAGS+= -I/usr/include/gnu

Modified: head/usr.bin/grep/file.c
==
--- head/usr.bin/grep/file.cWed Oct  5 08:33:50 2011(r226034)
+++ head/usr.bin/grep/file.cWed Oct  5 09:56:43 2011(r226035)
@@ -34,13 +34,15 @@
 __FBSDID("$FreeBSD$");
 
 #include 
-#include 
+#include 
 #include 
+#include 
 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -56,10 +58,12 @@ __FBSDID("$FreeBSD$");
 
 static gzFile gzbufdesc;
 static BZFILE* bzbufdesc;
+static lzma_stream lstrm = LZMA_STREAM_INIT;
 
-static unsigned char buffer[MAXBUFSIZ];
+static unsigned char *buffer;
 static unsigned char *bufpos;
 static size_t bufrem;
+static size_t fsiz;
 
 static unsigned char *lnbuf;
 static size_t lnbuflen;
@@ -70,6 +74,9 @@ grep_refill(struct file *f)
ssize_t nr;
int bzerr;
 
+   if (filebehave == FILE_MMAP)
+   return (0);
+
bufpos = buffer;
bufrem = 0;
 
@@ -101,6 +108,36 @@ grep_refill(struct file *f)
/* Make sure we exit with an error */
nr = -1;
}
+   } else if ((filebehave == FILE_XZ) || (filebehave == FILE_LZMA)) {
+   lzma_action action = LZMA_RUN;
+   uint8_t in_buf[MAXBUFSIZ];
+   lzma_ret ret;
+
+   ret = (filebehave == FILE_XZ) ?
+   lzma_stream

Re: svn commit: r225937 - in head: . release release/amd64 release/i386 release/ia64 release/pc98 release/powerpc release/scripts release/sparc64 usr.sbin usr.sbin/sysinstall

2011-10-05 Thread Nathan Whitehorn

On 10/04/11 23:02, Craig Rodrigues wrote:

Nathan,

I took at look at this page:

http://wiki.pcbsd.org/index.php/Creating_an_Automated_Installation_with_pc-sysinstall

and compared it to the man page for sysinstall:

http://www.freebsd.org/cgi/man.cgi?query=sysinstall&apropos=0&sektion=0&manpath=FreeBSD+8.2-RELEASE&arch=default&format=html


pc-sysinstall pretty much does all of the same stuff as sysinstall,
and even many of the variable names are the same.  pc-sysinstall
seems far superior to sysinstall.

In the timeframe before 10.0, do you think it is worth doing the following:

(1)  import pc-sysinstall into FreeBSD
(2)  make pc-sysinstall compatible with all the variables from the

*or* if it is not worth doing (2)

(3)  provide a document somewhere that guides users in migrating their
   old install.cfg syntax to pc-sysinstall (or bsdinstall).

bsdinstall and pc-sysinstall are really good improvements!


pc-sysinstall is already part of FreeBSD, and will be part of the 9.0 
release. A manual for migration would probably be a good idea.

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


svn commit: r226039 - head/sys/x86/acpica

2011-10-05 Thread John Baldwin
Author: jhb
Date: Wed Oct  5 16:03:47 2011
New Revision: 226039
URL: http://svn.freebsd.org/changeset/base/226039

Log:
  Ignore SRAT memory entries if the memory range does not overlap with an
  existing phys_avail[] table.  If a hw.physmem setting causes a memory
  domain to not be present in phys_avail[], the SRAT table will now be
  ignored rather than triggering a panic when a CPU in the missing domain
  tries to allocate a page.
  
  MFC after:1 week

Modified:
  head/sys/x86/acpica/srat.c

Modified: head/sys/x86/acpica/srat.c
==
--- head/sys/x86/acpica/srat.c  Wed Oct  5 15:52:40 2011(r226038)
+++ head/sys/x86/acpica/srat.c  Wed Oct  5 16:03:47 2011(r226039)
@@ -59,6 +59,26 @@ static vm_paddr_t srat_physaddr;
 
 static voidsrat_walk_table(acpi_subtable_handler *handler, void *arg);
 
+/*
+ * Returns true if a memory range overlaps with at least one range in
+ * phys_avail[].
+ */
+static int
+overlaps_phys_avail(vm_paddr_t start, vm_paddr_t end)
+{
+   int i;
+
+   for (i = 0; phys_avail[i] != 0 && phys_avail[i + 1] != 0; i += 2) {
+   if (phys_avail[i + 1] < start)
+   continue;
+   if (phys_avail[i] < end)
+   return (1);
+   break;
+   }
+   return (0);
+   
+}
+
 static void
 srat_parse_entry(ACPI_SUBTABLE_HEADER *entry, void *arg)
 {
@@ -111,6 +131,12 @@ srat_parse_entry(ACPI_SUBTABLE_HEADER *e
"enabled" : "disabled");
if (!(mem->Flags & ACPI_SRAT_MEM_ENABLED))
break;
+   if (!overlaps_phys_avail(mem->BaseAddress,
+   mem->BaseAddress + mem->Length)) {
+   printf("SRAT: Ignoring memory at addr %jx\n",
+   (uintmax_t)mem->BaseAddress);
+   break;
+   }
if (num_mem == VM_PHYSSEG_MAX) {
printf("SRAT: Too many memory regions\n");
*(int *)arg = ENXIO;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r226040 - head/sys/netinet6

2011-10-05 Thread Qing Li
Author: qingli
Date: Wed Oct  5 16:27:11 2011
New Revision: 226040
URL: http://svn.freebsd.org/changeset/base/226040

Log:
  The IFA_RTSELF instead of the IFA_ROUTE flag should be checked to
  determine if a loopback route should be installed for an interface
  IPv6 address. Another condition is the address must not belong to a
  looopback interface.
  
  Reviewed by:  hrs
  MFC after:3 days

Modified:
  head/sys/netinet6/in6.c

Modified: head/sys/netinet6/in6.c
==
--- head/sys/netinet6/in6.c Wed Oct  5 16:03:47 2011(r226039)
+++ head/sys/netinet6/in6.c Wed Oct  5 16:27:11 2011(r226040)
@@ -1810,9 +1810,9 @@ in6_ifinit(struct ifnet *ifp, struct in6
/*
 * add a loopback route to self
 */
-   if (!(ia->ia_flags & IFA_ROUTE)
+   if (!(ia->ia_flags & IFA_RTSELF)
&& (V_nd6_useloopback
-   || (ifp->if_flags & IFF_LOOPBACK))) {
+   && !(ifp->if_flags & IFF_LOOPBACK))) {
error = ifa_add_loopback_route((struct ifaddr *)ia,
   (struct sockaddr *)&ia->ia_addr);
if (error == 0)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r225868 - head/bin/ps

2011-10-05 Thread David O'Brien
On Sat, Oct 01, 2011 at 12:43:23PM +, Alexander Best wrote:
> we could then add an envar $PS, so users can set PS=-k to restore the

Should be spelled "PS_OPTIONS" please.  Many of us likely have
"export PS=_" in order to have dot files that support multiple OS's.

This is also in-line with FreeBSD's existing "MALLOC_OPTIONS",
"DIFF_OPTIONS", "GREP_OPTIONS", "GCC_OPTIONS", etc...

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


Re: svn commit: r225617 - in head/sys: amd64/amd64 amd64/linux32 arm/arm cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/sparc/dtrace compat/freebsd32 compat/linux compat/svr4

2011-10-05 Thread David O'Brien
On Fri, Sep 16, 2011 at 01:58:51PM +, Kip Macy wrote:
> Author: kmacy
> Date: Fri Sep 16 13:58:51 2011
> New Revision: 225617
> Log:
>   In order to maximize the re-usability of kernel code in user space this
>   patch modifies makesyscalls.sh to prefix all of the non-compatibility
>   calls (e.g. not linux_, freebsd32_) with sys_ and updates the kernel
>   entry points and all places in the code that use them. It also

Hi Kip,
__FreeBSD_version does not seem to have been bumped for this.
Unfortunately this change has made a kernel module we use at work
unbuildable, and I don't have a __FreeBSD_version value to #ifdef
on.

If ever there was a change that needed __FreeBSD_version this is one.

Can you please get __FreeBSD_version bumped in 9-STABLE along with
9-RELENG?

thanks,
-- 
-- David  (obr...@freebsd.org)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r226041 - in head/sys: fs/devfs sys

2011-10-05 Thread Konstantin Belousov
Author: kib
Date: Wed Oct  5 16:50:15 2011
New Revision: 226041
URL: http://svn.freebsd.org/changeset/base/226041

Log:
  Export devfs inode number allocator for the kernel consumers.
  
  Reviewed by:  jhb
  MFC after:2 weeks

Modified:
  head/sys/fs/devfs/devfs_devs.c
  head/sys/sys/conf.h

Modified: head/sys/fs/devfs/devfs_devs.c
==
--- head/sys/fs/devfs/devfs_devs.c  Wed Oct  5 16:27:11 2011
(r226040)
+++ head/sys/fs/devfs/devfs_devs.c  Wed Oct  5 16:50:15 2011
(r226041)
@@ -171,8 +171,7 @@ devfs_free(struct cdev *cdev)
cdp = cdev2priv(cdev);
if (cdev->si_cred != NULL)
crfree(cdev->si_cred);
-   if (cdp->cdp_inode > 0)
-   free_unr(devfs_inos, cdp->cdp_inode);
+   devfs_free_cdp_inode(cdp->cdp_inode);
if (cdp->cdp_maxdirent > 0) 
free(cdp->cdp_dirents, M_DEVFS2);
free(cdp, M_CDEVP);
@@ -394,7 +393,7 @@ devfs_delete(struct devfs_mount *dm, str
mac_devfs_destroy(de);
 #endif
if (de->de_inode > DEVFS_ROOTINO) {
-   free_unr(devfs_inos, de->de_inode);
+   devfs_free_cdp_inode(de->de_inode);
de->de_inode = 0;
}
if (DEVFS_DE_DROP(de))
@@ -685,6 +684,21 @@ devfs_destroy(struct cdev *dev)
devfs_generation++;
 }
 
+ino_t
+devfs_alloc_cdp_inode(void)
+{
+
+   return (alloc_unr(devfs_inos));
+}
+
+void
+devfs_free_cdp_inode(ino_t ino)
+{
+
+   if (ino > 0)
+   free_unr(devfs_inos, ino);
+}
+
 static void
 devfs_devs_init(void *junk __unused)
 {

Modified: head/sys/sys/conf.h
==
--- head/sys/sys/conf.h Wed Oct  5 16:27:11 2011(r226040)
+++ head/sys/sys/conf.h Wed Oct  5 16:50:15 2011(r226041)
@@ -301,6 +301,9 @@ int devfs_set_cdevpriv(void *priv, cdevp
 void   devfs_clear_cdevpriv(void);
 void   devfs_fpdrop(struct file *fp);  /* XXX This is not public KPI */
 
+ino_t  devfs_alloc_cdp_inode(void);
+void   devfs_free_cdp_inode(ino_t ino);
+
 #defineUID_ROOT0
 #defineUID_BIN 3
 #defineUID_UUCP66
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r226042 - in head/sys: kern sys

2011-10-05 Thread Konstantin Belousov
Author: kib
Date: Wed Oct  5 16:56:06 2011
New Revision: 226042
URL: http://svn.freebsd.org/changeset/base/226042

Log:
  Supply unique (st_dev, st_ino) value pair for the fstat(2) done on the pipes.
  
  Reviewed by:  jhb, Peter Jeremy 
  MFC after:2 weeks

Modified:
  head/sys/kern/sys_pipe.c
  head/sys/sys/pipe.h

Modified: head/sys/kern/sys_pipe.c
==
--- head/sys/kern/sys_pipe.cWed Oct  5 16:50:15 2011(r226041)
+++ head/sys/kern/sys_pipe.cWed Oct  5 16:56:06 2011(r226042)
@@ -93,6 +93,7 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -224,6 +225,8 @@ static int  pipe_zone_init(void *mem, int
 static voidpipe_zone_fini(void *mem, int size);
 
 static uma_zone_t pipe_zone;
+static struct unrhdr *pipeino_unr;
+static dev_t pipedev_ino;
 
 SYSINIT(vfs, SI_SUB_VFS, SI_ORDER_ANY, pipeinit, NULL);
 
@@ -235,6 +238,10 @@ pipeinit(void *dummy __unused)
pipe_zone_ctor, NULL, pipe_zone_init, pipe_zone_fini,
UMA_ALIGN_PTR, 0);
KASSERT(pipe_zone != NULL, ("pipe_zone not initialized"));
+   pipeino_unr = new_unrhdr(1, INT32_MAX, NULL);
+   KASSERT(pipeino_unr != NULL, ("pipe fake inodes not initialized"));
+   pipedev_ino = devfs_alloc_cdp_inode();
+   KASSERT(pipedev_ino > 0, ("pipe dev inode not initialized"));
 }
 
 static int
@@ -562,6 +569,12 @@ 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;
+   }
return (error);
 }
 
@@ -1408,9 +1421,10 @@ pipe_stat(fp, ub, active_cred, td)
ub->st_ctim = pipe->pipe_ctime;
ub->st_uid = fp->f_cred->cr_uid;
ub->st_gid = fp->f_cred->cr_gid;
+   ub->st_dev = pipedev_ino;
+   ub->st_ino = pipe->pipe_ino;
/*
-* Left as 0: st_dev, st_ino, st_nlink, st_rdev, st_flags, st_gen.
-* XXX (st_dev, st_ino) should be unique.
+* Left as 0: st_nlink, st_rdev, st_flags, st_gen.
 */
return (0);
 }
@@ -1463,6 +1477,7 @@ pipeclose(cpipe)
 {
struct pipepair *pp;
struct pipe *ppipe;
+   ino_t ino;
 
KASSERT(cpipe != NULL, ("pipeclose: cpipe == NULL"));
 
@@ -1521,6 +1536,12 @@ pipeclose(cpipe)
knlist_destroy(&cpipe->pipe_sel.si_note);
 
/*
+* Postpone the destroy of the fake inode number allocated for
+* our end, until pipe mtx is unlocked.
+*/
+   ino = cpipe->pipe_ino;
+
+   /*
 * If both endpoints are now closed, release the memory for the
 * pipe pair.  If not, unlock.
 */
@@ -1532,6 +1553,9 @@ pipeclose(cpipe)
uma_zfree(pipe_zone, cpipe->pipe_pair);
} else
PIPE_UNLOCK(cpipe);
+
+   if (ino > 0)
+   free_unr(pipeino_unr, cpipe->pipe_ino);
 }
 
 /*ARGSUSED*/

Modified: head/sys/sys/pipe.h
==
--- head/sys/sys/pipe.h Wed Oct  5 16:50:15 2011(r226041)
+++ head/sys/sys/pipe.h Wed Oct  5 16:56:06 2011(r226042)
@@ -112,6 +112,7 @@ struct pipe {
u_int   pipe_state; /* pipe status info */
int pipe_busy;  /* busy flag, mostly to handle rundown 
sanely */
int pipe_present;   /* still present? */
+   ino_t   pipe_ino;   /* fake inode for stat(2) */
 };
 
 /*
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r226043 - head/sys/kern

2011-10-05 Thread Edward Tomasz Napierala
Author: trasz
Date: Wed Oct  5 17:29:49 2011
New Revision: 226043
URL: http://svn.freebsd.org/changeset/base/226043

Log:
  Remove assertion against empty NFSv4 ACLs.  An empty ACL is not exactly
  valid - we don't allow for setting it on a file, for example - but it's
  not something we should assert on.
  
  For STABLE kernel, it changes nothing, because it's not compiled with
  INVARIANTS.  If it was, it would fix crashes.  It also fixes an assert
  in libc encountered with NFSv4 without nfsuserd(8) running.
  
  Submitted by: Yuri Pankov (earlier version)
  MFC after:1 month

Modified:
  head/sys/kern/subr_acl_nfs4.c

Modified: head/sys/kern/subr_acl_nfs4.c
==
--- head/sys/kern/subr_acl_nfs4.c   Wed Oct  5 16:56:06 2011
(r226042)
+++ head/sys/kern/subr_acl_nfs4.c   Wed Oct  5 17:29:49 2011
(r226043)
@@ -114,7 +114,6 @@ _acl_denies(const struct acl *aclp, int 
if (denied_explicitly != NULL)
*denied_explicitly = 0;
 
-   KASSERT(aclp->acl_cnt > 0, ("aclp->acl_cnt > 0"));
KASSERT(aclp->acl_cnt <= ACL_MAX_ENTRIES,
("aclp->acl_cnt <= ACL_MAX_ENTRIES"));
 
@@ -723,7 +722,6 @@ acl_nfs4_sync_mode_from_acl(mode_t *_mod
mode_t old_mode = *_mode, mode = 0, seen = 0;
const struct acl_entry *entry;
 
-   KASSERT(aclp->acl_cnt > 0, ("aclp->acl_cnt > 0"));
KASSERT(aclp->acl_cnt <= ACL_MAX_ENTRIES,
("aclp->acl_cnt <= ACL_MAX_ENTRIES"));
 
@@ -854,7 +852,6 @@ acl_nfs4_compute_inherited_acl_draft(con
struct acl_entry *entry, *copy;
 
KASSERT(child_aclp->acl_cnt == 0, ("child_aclp->acl_cnt == 0"));
-   KASSERT(parent_aclp->acl_cnt > 0, ("parent_aclp->acl_cnt > 0"));
KASSERT(parent_aclp->acl_cnt <= ACL_MAX_ENTRIES,
("parent_aclp->acl_cnt <= ACL_MAX_ENTRIES"));
 
@@ -1017,7 +1014,6 @@ acl_nfs4_inherit_entries(const struct ac
const struct acl_entry *parent_entry;
struct acl_entry *entry;
 
-   KASSERT(parent_aclp->acl_cnt > 0, ("parent_aclp->acl_cnt > 0"));
KASSERT(parent_aclp->acl_cnt <= ACL_MAX_ENTRIES,
("parent_aclp->acl_cnt <= ACL_MAX_ENTRIES"));
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r225868 - head/bin/ps

2011-10-05 Thread Alexander Best
On Wed Oct  5 11, David O'Brien wrote:
> On Sat, Oct 01, 2011 at 12:43:23PM +, Alexander Best wrote:
> > we could then add an envar $PS, so users can set PS=-k to restore the
> 
> Should be spelled "PS_OPTIONS" please.  Many of us likely have
> "export PS=_" in order to have dot files that support multiple OS's.
> 
> This is also in-line with FreeBSD's existing "MALLOC_OPTIONS",
> "DIFF_OPTIONS", "GREP_OPTIONS", "GCC_OPTIONS", etc...

thanks for the hint. *if* it is being decided that ps(1) should get its own
envar, i'll make sure "PS_OPTIONS" gets chosen as the identifier. ;)

cheers.
alex

> 
> -- 
> -- David  (obr...@freebsd.org)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r226046 - in head: crypto/openssh crypto/openssh/openbsd-compat secure/usr.sbin/sshd

2011-10-05 Thread Dag-Erling Smorgrav
Author: des
Date: Wed Oct  5 22:08:17 2011
New Revision: 226046
URL: http://svn.freebsd.org/changeset/base/226046

Log:
  Upgrade to OpenSSH 5.9p1.
  
  MFC after:3 months

Added:
  head/crypto/openssh/sandbox-darwin.c
 - copied unchanged from r225834, 
vendor-crypto/openssh/dist/sandbox-darwin.c
  head/crypto/openssh/sandbox-null.c
 - copied unchanged from r225834, vendor-crypto/openssh/dist/sandbox-null.c
  head/crypto/openssh/sandbox-rlimit.c
 - copied unchanged from r225834, 
vendor-crypto/openssh/dist/sandbox-rlimit.c
  head/crypto/openssh/sandbox-systrace.c
 - copied unchanged from r225834, 
vendor-crypto/openssh/dist/sandbox-systrace.c
  head/crypto/openssh/ssh-sandbox.h
 - copied unchanged from r225834, vendor-crypto/openssh/dist/ssh-sandbox.h
Deleted:
  head/crypto/openssh/WARNING.RNG
  head/crypto/openssh/ssh-rand-helper.8
  head/crypto/openssh/ssh-rand-helper.c
Modified:
  head/crypto/openssh/ChangeLog
  head/crypto/openssh/INSTALL
  head/crypto/openssh/PROTOCOL.mux
  head/crypto/openssh/README
  head/crypto/openssh/aclocal.m4
  head/crypto/openssh/audit-linux.c   (contents, props changed)
  head/crypto/openssh/auth-rsa.c
  head/crypto/openssh/auth-skey.c
  head/crypto/openssh/auth.c
  head/crypto/openssh/auth.h
  head/crypto/openssh/auth2-gss.c
  head/crypto/openssh/auth2-pubkey.c
  head/crypto/openssh/auth2.c
  head/crypto/openssh/authfd.c
  head/crypto/openssh/authfile.c
  head/crypto/openssh/authfile.h
  head/crypto/openssh/channels.c
  head/crypto/openssh/channels.h
  head/crypto/openssh/clientloop.c
  head/crypto/openssh/clientloop.h
  head/crypto/openssh/config.guess
  head/crypto/openssh/config.h
  head/crypto/openssh/config.h.in
  head/crypto/openssh/defines.h
  head/crypto/openssh/entropy.c
  head/crypto/openssh/gss-serv.c
  head/crypto/openssh/key.c
  head/crypto/openssh/log.c
  head/crypto/openssh/log.h
  head/crypto/openssh/mac.c
  head/crypto/openssh/misc.c
  head/crypto/openssh/misc.h
  head/crypto/openssh/moduli.5
  head/crypto/openssh/monitor.c
  head/crypto/openssh/monitor.h
  head/crypto/openssh/monitor_wrap.c
  head/crypto/openssh/monitor_wrap.h
  head/crypto/openssh/mux.c
  head/crypto/openssh/myproposal.h
  head/crypto/openssh/openbsd-compat/bsd-cygwin_util.c
  head/crypto/openssh/openbsd-compat/bsd-cygwin_util.h
  head/crypto/openssh/openbsd-compat/openssl-compat.c
  head/crypto/openssh/openbsd-compat/openssl-compat.h
  head/crypto/openssh/openbsd-compat/port-linux.c
  head/crypto/openssh/openbsd-compat/port-linux.h
  head/crypto/openssh/packet.c
  head/crypto/openssh/packet.h
  head/crypto/openssh/pathnames.h
  head/crypto/openssh/readconf.c
  head/crypto/openssh/readconf.h
  head/crypto/openssh/servconf.c
  head/crypto/openssh/servconf.h
  head/crypto/openssh/serverloop.c
  head/crypto/openssh/session.c
  head/crypto/openssh/sftp-server.c
  head/crypto/openssh/sftp.1
  head/crypto/openssh/ssh-add.c
  head/crypto/openssh/ssh-agent.c
  head/crypto/openssh/ssh-keygen.1
  head/crypto/openssh/ssh-keygen.c
  head/crypto/openssh/ssh-keyscan.c
  head/crypto/openssh/ssh-keysign.c
  head/crypto/openssh/ssh-pkcs11-helper.c
  head/crypto/openssh/ssh-pkcs11.c
  head/crypto/openssh/ssh.1
  head/crypto/openssh/ssh.c
  head/crypto/openssh/ssh_config
  head/crypto/openssh/ssh_config.5
  head/crypto/openssh/ssh_namespace.h
  head/crypto/openssh/sshconnect.c
  head/crypto/openssh/sshconnect2.c
  head/crypto/openssh/sshd.8
  head/crypto/openssh/sshd.c
  head/crypto/openssh/sshd_config
  head/crypto/openssh/sshd_config.5
  head/crypto/openssh/version.h
  head/secure/usr.sbin/sshd/Makefile
Directory Properties:
  head/crypto/openssh/   (props changed)
  head/crypto/openssh/bufec.c   (props changed)
  head/crypto/openssh/kexecdh.c   (props changed)
  head/crypto/openssh/kexecdhc.c   (props changed)
  head/crypto/openssh/kexecdhs.c   (props changed)
  head/crypto/openssh/openbsd-compat/charclass.h   (props changed)
  head/crypto/openssh/openbsd-compat/sha2.c   (props changed)
  head/crypto/openssh/openbsd-compat/sha2.h   (props changed)
  head/crypto/openssh/openbsd-compat/strptime.c   (props changed)
  head/crypto/openssh/openbsd-compat/timingsafe_bcmp.c   (props changed)
  head/crypto/openssh/ssh-ecdsa.c   (props changed)

Modified: head/crypto/openssh/ChangeLog
==
--- head/crypto/openssh/ChangeLog   Wed Oct  5 20:00:50 2011
(r226045)
+++ head/crypto/openssh/ChangeLog   Wed Oct  5 22:08:17 2011
(r226046)
@@ -1,13 +1,463 @@
-20110403
+20110906
+ - (djm) [README version.h] Correct version
+ - (djm) [contrib/redhat/openssh.spec] Correct restorcon => restorecon
+ - (djm) Respin OpenSSH-5.9p1 release
+
+20110905
  - (djm) [README contrib/caldera/openssh.spec contrib/redhat/openssh.spec]
-   [contrib/suse/openssh.spec] Prepare for 5.8p2 release.
- - (djm) [version.h] crank version
- - Release 5.8p2
-
-20110329
- - (djm) [entropy.c] closefrom() before running ssh-rand-helper; l

Re: svn commit: r226040 - head/sys/netinet6

2011-10-05 Thread Bjoern A. Zeeb

On 5. Oct 2011, at 16:27 , Qing Li wrote:

> Author: qingli
> Date: Wed Oct  5 16:27:11 2011
> New Revision: 226040
> URL: http://svn.freebsd.org/changeset/base/226040
> 
> Log:
>  The IFA_RTSELF instead of the IFA_ROUTE flag should be checked to
>  determine if a loopback route should be installed for an interface
>  IPv6 address. Another condition is the address must not belong to a
>  looopback interface.

If I set useloopback to 0 my loopback will no longer have a route to itself 
anymore now?

> 
>  Reviewed by: hrs
>  MFC after:   3 days
> 
> Modified:
>  head/sys/netinet6/in6.c
> 
> Modified: head/sys/netinet6/in6.c
> ==
> --- head/sys/netinet6/in6.c   Wed Oct  5 16:03:47 2011(r226039)
> +++ head/sys/netinet6/in6.c   Wed Oct  5 16:27:11 2011(r226040)
> @@ -1810,9 +1810,9 @@ in6_ifinit(struct ifnet *ifp, struct in6
>   /*
>* add a loopback route to self
>*/
> - if (!(ia->ia_flags & IFA_ROUTE)
> + if (!(ia->ia_flags & IFA_RTSELF)
>   && (V_nd6_useloopback
> - || (ifp->if_flags & IFF_LOOPBACK))) {
> + && !(ifp->if_flags & IFF_LOOPBACK))) {
>   error = ifa_add_loopback_route((struct ifaddr *)ia,
>  (struct sockaddr *)&ia->ia_addr);
>   if (error == 0)

-- 
Bjoern A. Zeeb You have to have visions!
 Stop bit received. Insert coin for new address family.

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


Re: svn commit: r226040 - head/sys/netinet6

2011-10-05 Thread Qing Li
Correct, but local addresses assigned to interfaces that support
address resolution are
still reachable. For those addresses mapped to pseduo interfaces,
those are not reachable
anyways.

See ML thread

  http://unix.derkeiler.com/Mailing-Lists/FreeBSD/net/2009-09/msg00241.html

--Qing


On Wed, Oct 5, 2011 at 4:21 PM, Bjoern A. Zeeb
 wrote:
>
> On 5. Oct 2011, at 16:27 , Qing Li wrote:
>
>> Author: qingli
>> Date: Wed Oct  5 16:27:11 2011
>> New Revision: 226040
>> URL: http://svn.freebsd.org/changeset/base/226040
>>
>> Log:
>>  The IFA_RTSELF instead of the IFA_ROUTE flag should be checked to
>>  determine if a loopback route should be installed for an interface
>>  IPv6 address. Another condition is the address must not belong to a
>>  looopback interface.
>
> If I set useloopback to 0 my loopback will no longer have a route to itself 
> anymore now?
>
>>
>>  Reviewed by: hrs
>>  MFC after:   3 days
>>
>> Modified:
>>  head/sys/netinet6/in6.c
>>
>> Modified: head/sys/netinet6/in6.c
>> ==
>> --- head/sys/netinet6/in6.c   Wed Oct  5 16:03:47 2011        (r226039)
>> +++ head/sys/netinet6/in6.c   Wed Oct  5 16:27:11 2011        (r226040)
>> @@ -1810,9 +1810,9 @@ in6_ifinit(struct ifnet *ifp, struct in6
>>       /*
>>        * add a loopback route to self
>>        */
>> -     if (!(ia->ia_flags & IFA_ROUTE)
>> +     if (!(ia->ia_flags & IFA_RTSELF)
>>           && (V_nd6_useloopback
>> -             || (ifp->if_flags & IFF_LOOPBACK))) {
>> +             && !(ifp->if_flags & IFF_LOOPBACK))) {
>>               error = ifa_add_loopback_route((struct ifaddr *)ia,
>>                                      (struct sockaddr *)&ia->ia_addr);
>>               if (error == 0)
>
> --
> Bjoern A. Zeeb                                 You have to have visions!
>         Stop bit received. Insert coin for new address family.
>
>
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r226047 - head/usr.bin/grep/regex

2011-10-05 Thread Xin LI
Author: delphij
Date: Thu Oct  6 04:39:18 2011
New Revision: 226047
URL: http://svn.freebsd.org/changeset/base/226047

Log:
  Fix build on i386 and arm.
  
  Tested with:  make universe
  Pointy hat to:delphij

Modified:
  head/usr.bin/grep/regex/tre-fastmatch.c

Modified: head/usr.bin/grep/regex/tre-fastmatch.c
==
--- head/usr.bin/grep/regex/tre-fastmatch.c Wed Oct  5 22:08:17 2011
(r226046)
+++ head/usr.bin/grep/regex/tre-fastmatch.c Thu Oct  6 04:39:18 2011
(r226047)
@@ -163,7 +163,7 @@ static int  fastcmp(const fastmatch_t *fg
   shift = bc;  \
 else   \
   {
\
-   ts = ((long)u - v < 0) ? 0 : (u - v);   \
+   ts = (u >= v) ? (u - v) : 0;\
shift = MAX(ts, bc);\
shift = MAX(shift, gs); \
if (shift == gs)\
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"