Re: CVS commit: src/lib/librumpuser

2014-06-17 Thread Alan Barrett

On Mon, 16 Jun 2014, Alexander Nasonov wrote:

Log Message:
Add __RCSID.



+#if !defined(lint)
+__RCSID($NetBSD: rumpuser_bio.c,v 1.8 2014/06/16 21:07:28 alnsn Exp $);
+#endif /* !lint */


Some historical uses of __RCSID have an unnecessary #if/#endif wrapper
around them, but for new uses, please just write __RCSID(...);
without any #if/#endif wrapper.

--apb (Alan Barrett)


Re: CVS commit: src/lib/librumpuser

2014-06-17 Thread Alexander Nasonov
Alan Barrett wrote:
 Some historical uses of __RCSID have an unnecessary #if/#endif wrapper
 around them, but for new uses, please just write __RCSID(...);
 without any #if/#endif wrapper.

I copy/pasted this block from another file from the same directory.

Alex


Re: CVS commit: src/lib/librumpuser

2014-06-17 Thread Antti Kantee
On Tue, Jun 17, 2014 at 08:42:35AM +, Alexander Nasonov wrote:
 Module Name:  src
 Committed By: alnsn
 Date: Tue Jun 17 08:42:35 UTC 2014
 
 Modified Files:
   src/lib/librumpuser: Makefile
 
 Log Message:
 Antti objected to including rumpuser_sync_icache. Exclude it from the build.

To be clear: the objection was to modifying a stable interface
without coordination.  The hypercall interface is implemented in
multiple places outside of the NetBSD tree, including by 3rd parties.

Think of it like changing the libc ABI: no matter the merits of
the change itself (which they too remain to be discussed), it will
be objected to.


Re: CVS commit: src/lib/librumpuser

2014-06-17 Thread Alexander Nasonov
Antti Kantee wrote:
 To be clear: the objection was to modifying a stable interface
 without coordination.  The hypercall interface is implemented in
 multiple places outside of the NetBSD tree, including by 3rd parties.

Stable interface in -current? How are you supposed to make any
significant changes then? 

As I stated in the private email to Antti, we need to support two
versions: stable for users and current for developers. Otherwise,
it will block a development of NetBSD if every time you need to
make a change in NetBSD-current, you have to wait for a rumpuser
bump for stable users even though many of them are outside of
NetBSD.

In other words, don't rely on NetBSD-current being 100% stable,
especially for users outside of NetBSD.

I don't know enough details about rump to be certain but would
splitting only rumpuser into two versions work? If there were two
versions of rumpuser I could tweak the makefile to build cpufunc.c
only if MKSLJIT=yes and it would solve the problem because MKSLJIT
is no by default on arm.

Another reason for splitting rumpuser is because some hypercalls can't
be implemented with POSIX API. I don't think we need to support Linux or
Solaris in NetBSD tree, especailly if it depends on OS-specific code.

 Think of it like changing the libc ABI: no matter the merits of
 the change itself (which they too remain to be discussed), it will
 be objected to.

I got an impression from your private email yesterday that the
approach is correct (you didn't say that librumpuser code must be
POSIX while the code I sent to you wasn't as it used NetBSD specific
sysarch syscall).

And because it was a pure addition of a new function and it didn't break
NetBSD build, I assumed that it's safe to add it. The only thing I
didn't do was rumpuser ABI version bump.

Alex


Re: CVS commit: src/lib/librumpuser

2014-06-17 Thread Antti Kantee

On 17/06/14 09:46, Alexander Nasonov wrote:

Antti Kantee wrote:

To be clear: the objection was to modifying a stable interface
without coordination.  The hypercall interface is implemented in
multiple places outside of the NetBSD tree, including by 3rd parties.


Stable interface in -current? How are you supposed to make any
significant changes then?



As I stated in the private email to Antti, we need to support two
versions: stable for users and current for developers. Otherwise,
it will block a development of NetBSD if every time you need to
make a change in NetBSD-current, you have to wait for a rumpuser
bump for stable users even though many of them are outside of
NetBSD.



In other words, don't rely on NetBSD-current being 100% stable,
especially for users outside of NetBSD.

I don't know enough details about rump to be certain but would
splitting only rumpuser into two versions work? If there were two
versions of rumpuser I could tweak the makefile to build cpufunc.c
only if MKSLJIT=yes and it would solve the problem because MKSLJIT
is no by default on arm.


I think that will be overengineering it, but if you want to come up with 
a concrete proposal patch, please.  I'd simply use discussion and not 
rushing commits to avoid issues here.


If you don't have time to wait for discussion or coordination, do 
everything in the privacy of the sljit component.


In either case, there's no need for the blocking development drama card.


Another reason for splitting rumpuser is because some hypercalls can't
be implemented with POSIX API. I don't think we need to support Linux or
Solaris in NetBSD tree, especailly if it depends on OS-specific code.


I don't think we need to support Linux or Solaris in the NetBSD tree. 
Similarly, I don't think we need to make changes which _unnecessarily_ 
makes supporting them hard.



Think of it like changing the libc ABI: no matter the merits of
the change itself (which they too remain to be discussed), it will
be objected to.


I got an impression from your private email yesterday that the
approach is correct (you didn't say that librumpuser code must be
POSIX while the code I sent to you wasn't as it used NetBSD specific
sysarch syscall).


For reference, here's what I wrote:

=== snip ===
If the problem is syncing icache, the approach is correct.

However, I'd argue that the problem is dynamically loading code into a 
rump kernel, and with that the interface falls somewhat short.  What if 
someone wants W^X?

=== snip ===

If you understood that as go ahead, sorry for not being clear, falls 
short was the comment that I was trying to ease in.


I'm not saying that librumpuser must be POSIX.  I'm not sure where 
you're getting that from.


What I _am_ saying is that there must be some critical thought going in 
to the interfaces and their implications.  We're several years past the 
oh I'll just add this because I need it today stage of discovery.



And because it was a pure addition of a new function and it didn't break
NetBSD build, I assumed that it's safe to add it. The only thing I
didn't do was rumpuser ABI version bump.


It's a pure addition in the same sense as if you made a pure addition to 
NetBSD's Xen hypercall interface and made guests unconditionally use it. 
 It would not break the NetBSD build.  Would you assume that's a safe 
change to make?


Re: CVS commit: src/lib/librumpuser

2014-06-17 Thread Alexander Nasonov
Antti Kantee wrote:
 I think that will be overengineering it, but if you want to come up with a
 concrete proposal patch, please.  I'd simply use discussion and not rushing
 commits to avoid issues here.

The code is in the tree already. I don't need anything else for
sljit. The sljit library doesn't support W^X protection. Rumpuser
has a way to create an executable page via rumpuser_anonmap(...
exec=true). I understand it's not perfect but it's not my area to
change memory management in rumpuser.

 If you don't have time to wait for discussion or coordination, do everything
 in the privacy of the sljit component.

Please teach me how to create a private component.

 In either case, there's no need for the blocking development drama card.

It's not a drama, it's a technical issue.

 ...

 For reference, here's what I wrote:
 
 === snip ===
 If the problem is syncing icache, the approach is correct.
 
 However, I'd argue that the problem is dynamically loading code into a rump
 kernel, and with that the interface falls somewhat short.  What if someone
 wants W^X?
 === snip ===
 
 If you understood that as go ahead, sorry for not being clear, falls
 short was the comment that I was trying to ease in.

My problem is syncing icache, therefore, the approach is correct.

 I'm not saying that librumpuser must be POSIX.  I'm not sure where you're
 getting that from.

rumpuser(3):

DESCRIPTION
 The rumpuser hypercall interfaces allow a rump kernel to access host
 resources.  A hypervisor implementation must implement the routines
 described in this document to allow a rump kernel to run on the host.
 The implementation included in NetBSD is for POSIX hosts.
  ^
  ^

and it indeed broke buildrump.sh builds on Linux because sysarch
stuff isn't available.

There is no way I can make this interface POSIX-compatible because
POSIX doesn't specify icache sync as far as I know.

 What I _am_ saying is that there must be some critical thought going in to
 the interfaces and their implications.  We're several years past the oh
 I'll just add this because I need it today stage of discovery.

Ok, I'll leave it to you to think about it. All I need now is a private
component for my change.

 ...

 It's a pure addition in the same sense as if you made a pure addition to
 NetBSD's Xen hypercall interface and made guests unconditionally use it.  It
 would not break the NetBSD build.  Would you assume that's a safe change to
 make?

In my case, I could easily build icache in rumpkern conditionally
with MKSLJIT if librumpuser didn't break on non NetBSD hosts.

Alex


Re: CVS commit: src/lib/librumpuser

2014-06-17 Thread Alexander Nasonov
Antti Kantee wrote:
 Use RUMPCOMP_USER_SRCS, several examples under src/sys/rump
Thanks for the pointer, will do.

 That's one more indication that sync icache is the wrong level of problem
 to represent at the interface level.

Existence of __clear_cache is an indication of the opposite.

I'm not saying that POSIX should have icache sync routine, they
could specify that mprotect syscall that turns on PROT_EXEC should
sync icache. But that's no guaranteed by POSIX.

 If it were a high-level, holistic
 interface, both the caller and callee would what needs to be done, and the
 caller could perhaps implement the same with a alternative method.  A
 low-level interface like sync icache for this memory range leaves no room
 for interpretation, even if it will ever be used for only one purpose.

Not quite sure what you're saying because no room for interpretation
is a good thing in general and using something for one purpose is even
better ;-)

-- 
Alex


Re: CVS commit: src/lib/librumpuser

2014-06-17 Thread Antti Kantee

On 17/06/14 11:23, Alexander Nasonov wrote:

If you don't have time to wait for discussion or coordination, do everything
in the privacy of the sljit component.


Please teach me how to create a private component.


Use RUMPCOMP_USER_SRCS, several examples under src/sys/rump


I'm not saying that librumpuser must be POSIX.  I'm not sure where you're
getting that from.


rumpuser(3):

DESCRIPTION
  The rumpuser hypercall interfaces allow a rump kernel to access host
  resources.  A hypervisor implementation must implement the routines
  described in this document to allow a rump kernel to run on the host.
  The implementation included in NetBSD is for POSIX hosts.
   ^
   ^


ic.  I'd change that to POSIX-like, but currently I cannot access nbcvs.


and it indeed broke buildrump.sh builds on Linux because sysarch
stuff isn't available.

There is no way I can make this interface POSIX-compatible because
POSIX doesn't specify icache sync as far as I know.


That's one more indication that sync icache is the wrong level of 
problem to represent at the interface level.  If it were a high-level, 
holistic interface, both the caller and callee would what needs to be 
done, and the caller could perhaps implement the same with a alternative 
method.  A low-level interface like sync icache for this memory range 
leaves no room for interpretation, even if it will ever be used for only 
one purpose.


Re: CVS commit: src/lib/librumpuser

2014-06-17 Thread Antti Kantee

On 17/06/14 11:52, Alexander Nasonov wrote:

That's one more indication that sync icache is the wrong level of problem
to represent at the interface level.


Existence of __clear_cache is an indication of the opposite.


Let's be thankful we're not discussing implementing a compiler.


If it were a high-level, holistic
interface, both the caller and callee would what needs to be done, and the
caller could perhaps implement the same with a alternative method.  A
low-level interface like sync icache for this memory range leaves no room
for interpretation, even if it will ever be used for only one purpose.


Not quite sure what you're saying because no room for interpretation
is a good thing in general and using something for one purpose is even
better ;-)


Ok, one more try, this time with an example:

* fact: interface will be used to say I have loaded code here, please 
arrange things so that it can be executed
* fact: you want to call the interface sync icache and possess those 
semantics


the example:
Let's assume some fictional platform where you need to sign newly loaded 
code before it can execute.  Should the implementation of sync icache 
on that platform sign code?  If not, you can't execute the code, which 
was the original purpose.  If yes, you've failed to implement the 
interface correctly, because that might not be what the caller wants at 
all.  Will such a platform be supported?  Who knows.  Is it cause to 
leave known problems into the interface?  Definitely not!


If you don't want to solve anything except your immediate problem, 
that's more than fair enough (we've all been there), but it needs to be 
done without breaking things for everyone else or knowingly introducing 
suboptimal interfaces that everyone else will suffer from.


Re: CVS commit: src/lib/librumpuser

2014-06-17 Thread Alexander Nasonov
Antti Kantee wrote:
 Ok, one more try, this time with an example:
 
 * fact: interface will be used to say I have loaded code here, please
 arrange things so that it can be executed
 * fact: you want to call the interface sync icache and possess those
 semantics
 
 the example:
 Let's assume some fictional platform where you need to sign newly loaded
 code before it can execute.  Should the implementation of sync icache on
 that platform sign code?  If not, you can't execute the code, which was the
 original purpose.  If yes, you've failed to implement the interface
 correctly, because that might not be what the caller wants at all.  Will
 such a platform be supported?  Who knows.  Is it cause to leave known
 problems into the interface?  Definitely not!

You're over generalizing. You can't generate and sign your own code
without posing a security risk. This case deserves a special interface,
you can't just bring it under umbrella of a single hypercall that does
everything to turn memory into code.

I'm following a common practice of calling __clear_cache for JIT code
except that I wrap it as a hypercall. 

 If you don't want to solve anything except your immediate problem, that's
 more than fair enough (we've all been there),

We've seen many examples of over generalizing too.

My need is driven by existing sljit code which follows a common practice
of calling __clear_cache() gcc extension. If you want to generalize it,
we will need to work with sljit upstream to design a new interface.
Alternatively, we can disable jit code on arm and mips and give intel
a favor.

 but it needs to be done
 without breaking things for everyone else or knowingly introducing
 suboptimal interfaces that everyone else will suffer from.

Everyone else is a multi-dimentional term. Are you referring to users
of other operating systems or users of arches where sync_icache is noop
or a hypotetical arch where you need to sign code before running it?
(well, it's probably not hypotetical anymore, I vaguely remember reading
about a similar feature few months ago).

As I stated in the earlier email, I can build my rumpkern stuff
conditionally if you split librumpuser into NetBSD and non-NetBSD
versions. I'm going to check how it will work with a private component.

Alex


Re: CVS commit: src/lib/librumpuser

2014-06-17 Thread Valery Ushakov
On Tue, Jun 17, 2014 at 16:20:57 +0200, Joerg Sonnenberger wrote:

 On Tue, Jun 17, 2014 at 06:43:21AM +, Alexander Nasonov wrote:
  Module Name:src
  Committed By:   alnsn
  Date:   Tue Jun 17 06:43:21 UTC 2014
  
  Modified Files:
  src/lib/librumpuser: rumpuser_pth_dummy.c
  
  Log Message:
  For consistency with other files in the same directory
  don't include sys/cdefs.h before __RCSID.
 
 This one is actually wrong, the include should be the first thing in the
 file, followed by __RCSID without conditional.

In that case a local rump header plays that role (either including
cdefs.h or providing the necessary definition).

The conditional is a separate issue and yes it shoud be gc'ed.

-uwe


Re: CVS commit: src/lib/librumpuser

2014-06-17 Thread Alexander Nasonov
Valery Ushakov wrote:
 In that case a local rump header plays that role (either including
 cdefs.h or providing the necessary definition).

Yes, I believe that rumpuser_port.h includes sys/cdefs.h.

 The conditional is a separate issue and yes it shoud be gc'ed.

I agree but I wanted to be consistent with other files in the same
directory.

Alex


CVS commit: src

2014-06-17 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Tue Jun 17 06:31:47 UTC 2014

Modified Files:
src/lib/librumpuser: Makefile
src/sys/rump/include/rump: rumpuser.h
src/sys/rump/librump/rumpkern/arch/arm: Makefile.inc
Added Files:
src/lib/librumpuser: rumpuser_cache.c
src/sys/rump/librump/rumpkern/arch/arm: cpufunc.c

Log Message:
Implement rumpuser_sync_icache hypercall.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/lib/librumpuser/Makefile
cvs rdiff -u -r0 -r1.1 src/lib/librumpuser/rumpuser_cache.c
cvs rdiff -u -r1.111 -r1.112 src/sys/rump/include/rump/rumpuser.h
cvs rdiff -u -r1.2 -r1.3 src/sys/rump/librump/rumpkern/arch/arm/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/sys/rump/librump/rumpkern/arch/arm/cpufunc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librumpuser/Makefile
diff -u src/lib/librumpuser/Makefile:1.16 src/lib/librumpuser/Makefile:1.17
--- src/lib/librumpuser/Makefile:1.16	Thu Feb 20 00:42:27 2014
+++ src/lib/librumpuser/Makefile	Tue Jun 17 06:31:47 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.16 2014/02/20 00:42:27 pooka Exp $
+#	$NetBSD: Makefile,v 1.17 2014/06/17 06:31:47 alnsn Exp $
 #
 
 .include bsd.own.mk
@@ -20,6 +20,7 @@ CPPFLAGS+=	-DLIBRUMPUSER
 SRCS=		rumpuser.c
 SRCS+=		rumpuser_pth.c
 SRCS+=		rumpuser_component.c rumpuser_bio.c
+SRCS+=		rumpuser_cache.c
 
 SRCS+=		rumpuser_errtrans.c rumpuser_sigtrans.c
 

Index: src/sys/rump/include/rump/rumpuser.h
diff -u src/sys/rump/include/rump/rumpuser.h:1.111 src/sys/rump/include/rump/rumpuser.h:1.112
--- src/sys/rump/include/rump/rumpuser.h:1.111	Sun Apr 27 15:18:59 2014
+++ src/sys/rump/include/rump/rumpuser.h	Tue Jun 17 06:31:47 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpuser.h,v 1.111 2014/04/27 15:18:59 pooka Exp $	*/
+/*	$NetBSD: rumpuser.h,v 1.112 2014/06/17 06:31:47 alnsn Exp $	*/
 
 /*
  * Copyright (c) 2007-2013 Antti Kantee.  All Rights Reserved.
@@ -229,6 +229,11 @@ typedef void (*rump_compload_fn)(const s
 void rumpuser_dl_bootstrap(rump_modinit_fn, rump_symload_fn, rump_compload_fn);
 
 /*
+ * cache management
+ */
+int rumpuser_sync_icache(void *addr, uint64_t len);
+
+/*
  * misc management
  */
 

Index: src/sys/rump/librump/rumpkern/arch/arm/Makefile.inc
diff -u src/sys/rump/librump/rumpkern/arch/arm/Makefile.inc:1.2 src/sys/rump/librump/rumpkern/arch/arm/Makefile.inc:1.3
--- src/sys/rump/librump/rumpkern/arch/arm/Makefile.inc:1.2	Wed Feb 12 22:28:43 2014
+++ src/sys/rump/librump/rumpkern/arch/arm/Makefile.inc	Tue Jun 17 06:31:47 2014
@@ -1,7 +1,9 @@
-# $NetBSD: Makefile.inc,v 1.2 2014/02/12 22:28:43 pooka Exp $
+# $NetBSD: Makefile.inc,v 1.3 2014/06/17 06:31:47 alnsn Exp $
 
 CPPFLAGS+=	-DARCH_ELFSIZE=32
 
+SRCS+=		cpufunc.c
+
 .PATH:  ${RUMPTOP}/../arch/arm/arm32
 SRCS+=  	kobj_machdep.c
 

Added files:

Index: src/lib/librumpuser/rumpuser_cache.c
diff -u /dev/null src/lib/librumpuser/rumpuser_cache.c:1.1
--- /dev/null	Tue Jun 17 06:31:47 2014
+++ src/lib/librumpuser/rumpuser_cache.c	Tue Jun 17 06:31:47 2014
@@ -0,0 +1,61 @@
+/*	$NetBSD: rumpuser_cache.c,v 1.1 2014/06/17 06:31:47 alnsn Exp $	*/
+
+/*-
+ * Copyright (c) 2014 Alexander Nasonov.
+ * 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 ``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.
+ */
+
+#include rumpuser_port.h
+
+#if !defined(lint)
+__RCSID($NetBSD: rumpuser_cache.c,v 1.1 2014/06/17 06:31:47 alnsn Exp $);
+#endif /* !lint */
+
+#include sys/types.h
+
+#include machine/sysarch.h
+#include machine/types.h
+
+#include rump/rumpuser.h
+
+
+int
+rumpuser_sync_icache(void *addr, uint64_t len)
+{
+#if defined(__arm__)
+	/*
+	 * arm_sync_icache is recommended over sysarch but
+	 * it adds a link dependency 

CVS commit: src/tests/lib

2014-06-17 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Tue Jun 17 06:36:01 UTC 2014

Modified Files:
src/tests/lib/libbpfjit: Makefile
src/tests/lib/libsljit: Makefile

Log Message:
Link with -l${MACHINE_CPU}.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libbpfjit/Makefile
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libsljit/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/lib/libbpfjit/Makefile
diff -u src/tests/lib/libbpfjit/Makefile:1.1 src/tests/lib/libbpfjit/Makefile:1.2
--- src/tests/lib/libbpfjit/Makefile:1.1	Sun Nov 11 17:37:34 2012
+++ src/tests/lib/libbpfjit/Makefile	Tue Jun 17 06:36:01 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2012/11/11 17:37:34 alnsn Exp $
+# $NetBSD: Makefile,v 1.2 2014/06/17 06:36:01 alnsn Exp $
 
 .include bsd.own.mk
 .include ../../../external/bsd/sljit/Makefile.inc
@@ -16,6 +16,9 @@ DPADD+=		${LIBBPFJITDIR}/libbpfjit.a
 LDADD+=		-L${LIBSLJITDIR} -lsljit
 DPADD+=		${LIBSLJITDIR}/libsljit.a
 
+# I-cache sync routines for arm and mips
+LDADD+=		-l${MACHINE_CPU}
+
 LDADD+=		${LIBPCAP}
 
 .include bsd.test.mk

Index: src/tests/lib/libsljit/Makefile
diff -u src/tests/lib/libsljit/Makefile:1.1 src/tests/lib/libsljit/Makefile:1.2
--- src/tests/lib/libsljit/Makefile:1.1	Mon Nov  5 00:34:28 2012
+++ src/tests/lib/libsljit/Makefile	Tue Jun 17 06:36:01 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2012/11/05 00:34:28 alnsn Exp $
+# $NetBSD: Makefile,v 1.2 2014/06/17 06:36:01 alnsn Exp $
 
 TESTSDIR=	${TESTSBASE}/lib/libsljit
 
@@ -20,4 +20,7 @@ WARNS=		3
 LDADD+=		-L${LIBSLJITDIR} -lsljit
 DPADD+=		${LIBSLJITDIR}/libsljit.a
 
+# I-cache sync routines for arm and mips
+LDADD+=		-l${MACHINE_CPU}
+
 .include bsd.test.mk



CVS commit: src

2014-06-17 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Tue Jun 17 06:36:40 UTC 2014

Modified Files:
src/distrib/sets/lists/comp: ad.arm
src/sys/arch/arm/include: Makefile
src/sys/arch/evbarm/include: Makefile
src/sys/arch/hpcarm/include: Makefile
src/sys/arch/iyonix/include: Makefile
src/sys/arch/zaurus/include: Makefile
Added Files:
src/sys/arch/arm/include: sljitarch.h
src/sys/arch/evbarm/include: sljitarch.h
src/sys/arch/hpcarm/include: sljitarch.h
src/sys/arch/iyonix/include: sljitarch.h
src/sys/arch/zaurus/include: sljitarch.h

Log Message:
Add sljit support to arm.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/distrib/sets/lists/comp/ad.arm
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/arm/include/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/include/sljitarch.h
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/evbarm/include/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/arch/evbarm/include/sljitarch.h
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/hpcarm/include/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/arch/hpcarm/include/sljitarch.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/iyonix/include/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/arch/iyonix/include/sljitarch.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/zaurus/include/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/arch/zaurus/include/sljitarch.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/comp/ad.arm
diff -u src/distrib/sets/lists/comp/ad.arm:1.55 src/distrib/sets/lists/comp/ad.arm:1.56
--- src/distrib/sets/lists/comp/ad.arm:1.55	Thu Jan  2 16:46:40 2014
+++ src/distrib/sets/lists/comp/ad.arm	Tue Jun 17 06:36:40 2014
@@ -1,4 +1,4 @@
-# $NetBSD: ad.arm,v 1.55 2014/01/02 16:46:40 tho Exp $
+# $NetBSD: ad.arm,v 1.56 2014/06/17 06:36:40 alnsn Exp $
 ./usr/include/acorn26comp-c-include
 ./usr/include/acorn26/ansi.h			comp-obsolete		obsolete
 ./usr/include/acorn26/aout_machdep.h		comp-obsolete		obsolete
@@ -172,6 +172,7 @@
 ./usr/include/arm/rwlock.h			comp-c-include
 ./usr/include/arm/setjmp.h			comp-c-include
 ./usr/include/arm/signal.h			comp-c-include
+./usr/include/arm/sljitarch.h			comp-c-include
 ./usr/include/arm/stdarg.h			comp-obsolete		obsolete
 ./usr/include/arm/swi.hcomp-c-include
 ./usr/include/arm/sysarch.h			comp-c-include
@@ -378,6 +379,7 @@
 ./usr/include/evbarm/rwlock.h			comp-obsolete		obsolete
 ./usr/include/evbarm/setjmp.h			comp-obsolete		obsolete
 ./usr/include/evbarm/signal.h			comp-obsolete		obsolete
+./usr/include/evbarm/sljitarch.h		comp-c-include
 ./usr/include/evbarm/stdarg.h			comp-obsolete		obsolete
 ./usr/include/evbarm/sysarch.h			comp-obsolete		obsolete
 ./usr/include/evbarm/trap.h			comp-obsolete		obsolete
@@ -435,6 +437,7 @@
 ./usr/include/hpcarm/rwlock.h			comp-obsolete		obsolete
 ./usr/include/hpcarm/setjmp.h			comp-obsolete		obsolete
 ./usr/include/hpcarm/signal.h			comp-obsolete		obsolete
+./usr/include/hpcarm/sljitarch.h		comp-c-include
 ./usr/include/hpcarm/stdarg.h			comp-obsolete		obsolete
 ./usr/include/hpcarm/sysarch.h			comp-obsolete		obsolete
 ./usr/include/hpcarm/trap.h			comp-obsolete		obsolete
@@ -486,6 +489,7 @@
 ./usr/include/iyonix/rwlock.h			comp-obsolete		obsolete
 ./usr/include/iyonix/setjmp.h			comp-obsolete		obsolete
 ./usr/include/iyonix/signal.h			comp-obsolete		obsolete
+./usr/include/iyonix/sljitarch.h		comp-c-include
 ./usr/include/iyonix/stdarg.h			comp-obsolete		obsolete
 ./usr/include/iyonix/sysarch.h			comp-obsolete		obsolete
 ./usr/include/iyonix/trap.h			comp-obsolete		obsolete
@@ -636,6 +640,7 @@
 ./usr/include/zaurus/rwlock.h			comp-obsolete		obsolete
 ./usr/include/zaurus/setjmp.h			comp-obsolete		obsolete
 ./usr/include/zaurus/signal.h			comp-obsolete		obsolete
+./usr/include/zaurus/sljitarch.h		comp-c-include
 ./usr/include/zaurus/stdarg.h			comp-obsolete		obsolete
 ./usr/include/zaurus/sysarch.h			comp-obsolete		obsolete
 ./usr/include/zaurus/trap.h			comp-obsolete		obsolete

Index: src/sys/arch/arm/include/Makefile
diff -u src/sys/arch/arm/include/Makefile:1.47 src/sys/arch/arm/include/Makefile:1.48
--- src/sys/arch/arm/include/Makefile:1.47	Thu May  2 03:56:40 2013
+++ src/sys/arch/arm/include/Makefile	Tue Jun 17 06:36:39 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.47 2013/05/02 03:56:40 matt Exp $
+#	$NetBSD: Makefile,v 1.48 2014/06/17 06:36:39 alnsn Exp $
 
 INCSDIR= /usr/include/arm
 
@@ -17,7 +17,7 @@ INCS=	aeabi.h ansi.h aout_machdep.h apmv
 	param.h pcb.h pmc.h proc.h profile.h rwlock.h \
 	ptrace.h \
 	reg.h rwlock.h \
-	setjmp.h signal.h swi.h sysarch.h \
+	setjmp.h signal.h sljitarch.h swi.h sysarch.h \
 	trap.h types.h \
 	vfpreg.h vmparam.h \
 	wchar_limits.h

Index: src/sys/arch/evbarm/include/Makefile
diff -u src/sys/arch/evbarm/include/Makefile:1.20 src/sys/arch/evbarm/include/Makefile:1.21
--- src/sys/arch/evbarm/include/Makefile:1.20	Thu May  2 03:56:40 2013
+++ 

CVS commit: src/lib/librumpuser

2014-06-17 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Tue Jun 17 06:43:21 UTC 2014

Modified Files:
src/lib/librumpuser: rumpuser_pth_dummy.c

Log Message:
For consistency with other files in the same directory
don't include sys/cdefs.h before __RCSID.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/lib/librumpuser/rumpuser_pth_dummy.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librumpuser/rumpuser_pth_dummy.c
diff -u src/lib/librumpuser/rumpuser_pth_dummy.c:1.16 src/lib/librumpuser/rumpuser_pth_dummy.c:1.17
--- src/lib/librumpuser/rumpuser_pth_dummy.c:1.16	Wed May 15 14:52:49 2013
+++ src/lib/librumpuser/rumpuser_pth_dummy.c	Tue Jun 17 06:43:21 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpuser_pth_dummy.c,v 1.16 2013/05/15 14:52:49 pooka Exp $	*/
+/*	$NetBSD: rumpuser_pth_dummy.c,v 1.17 2014/06/17 06:43:21 alnsn Exp $	*/
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -27,9 +27,8 @@
 
 #include rumpuser_port.h
 
-#include sys/cdefs.h
 #if !defined(lint)
-__RCSID($NetBSD: rumpuser_pth_dummy.c,v 1.16 2013/05/15 14:52:49 pooka Exp $);
+__RCSID($NetBSD: rumpuser_pth_dummy.c,v 1.17 2014/06/17 06:43:21 alnsn Exp $);
 #endif /* !lint */
 
 #include sys/time.h



CVS commit: src/external/bsd/openpam/dist/lib

2014-06-17 Thread S.P.Zeidler
Module Name:src
Committed By:   spz
Date:   Tue Jun 17 07:08:47 UTC 2014

Modified Files:
src/external/bsd/openpam/dist/lib: openpam_configure.c

Log Message:
make sure we have a log message at the appropriate level (error) on
why pam is failing in the case of an included pam config file missing.

example: instead of logging with the default log settings:
Jun 17 08:49:37 tucana su: pam_start failed: system error
it will log:
Jun 17 08:55:49 tucana su: in openpam_parse_chain(): failed loading include for 
service gibbetnich in /etc/pam.d/su(15): No such file or directory
Jun 17 08:55:49 tucana su: pam_start failed: system error


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
src/external/bsd/openpam/dist/lib/openpam_configure.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/openpam/dist/lib/openpam_configure.c
diff -u src/external/bsd/openpam/dist/lib/openpam_configure.c:1.9 src/external/bsd/openpam/dist/lib/openpam_configure.c:1.10
--- src/external/bsd/openpam/dist/lib/openpam_configure.c:1.9	Tue Jun  3 20:22:54 2014
+++ src/external/bsd/openpam/dist/lib/openpam_configure.c	Tue Jun 17 07:08:47 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: openpam_configure.c,v 1.9 2014/06/03 20:22:54 christos Exp $	*/
+/*	$NetBSD: openpam_configure.c,v 1.10 2014/06/17 07:08:47 spz Exp $	*/
 
 /*-
  * Copyright (c) 2001-2003 Networks Associates Technology, Inc.
@@ -229,8 +229,19 @@ openpam_parse_chain(pam_handle_t *pamh,
  * outer loop does not just ignore the
  * error and keep searching.
  */
-if (errno == ENOENT)
+if (errno == ENOENT) {
+	/*
+	 * we're failing load, make sure
+	 * there's a log message of severity
+	 * higher than debug
+	 */
+	openpam_log(PAM_LOG_ERROR,
+	failed loading include for service 
+	%s in %s(%d): %s,
+	servicename, filename, lineno,
+	strerror(errno));
 	errno = EINVAL;
+}
 goto fail;
 			}
 			continue;



CVS commit: src/lib/librumpuser

2014-06-17 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Tue Jun 17 08:42:35 UTC 2014

Modified Files:
src/lib/librumpuser: Makefile

Log Message:
Antti objected to including rumpuser_sync_icache. Exclude it from the build.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/lib/librumpuser/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librumpuser/Makefile
diff -u src/lib/librumpuser/Makefile:1.17 src/lib/librumpuser/Makefile:1.18
--- src/lib/librumpuser/Makefile:1.17	Tue Jun 17 06:31:47 2014
+++ src/lib/librumpuser/Makefile	Tue Jun 17 08:42:35 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.17 2014/06/17 06:31:47 alnsn Exp $
+#	$NetBSD: Makefile,v 1.18 2014/06/17 08:42:35 alnsn Exp $
 #
 
 .include bsd.own.mk
@@ -20,7 +20,6 @@ CPPFLAGS+=	-DLIBRUMPUSER
 SRCS=		rumpuser.c
 SRCS+=		rumpuser_pth.c
 SRCS+=		rumpuser_component.c rumpuser_bio.c
-SRCS+=		rumpuser_cache.c
 
 SRCS+=		rumpuser_errtrans.c rumpuser_sigtrans.c
 



CVS commit: src/sys/rump/librump/rumpkern/arch/arm

2014-06-17 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Tue Jun 17 08:50:49 UTC 2014

Modified Files:
src/sys/rump/librump/rumpkern/arch/arm: Makefile.inc

Log Message:
Antti objected to including rumpuser_sync_icache. Exclude it from the build.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/rump/librump/rumpkern/arch/arm/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpkern/arch/arm/Makefile.inc
diff -u src/sys/rump/librump/rumpkern/arch/arm/Makefile.inc:1.3 src/sys/rump/librump/rumpkern/arch/arm/Makefile.inc:1.4
--- src/sys/rump/librump/rumpkern/arch/arm/Makefile.inc:1.3	Tue Jun 17 06:31:47 2014
+++ src/sys/rump/librump/rumpkern/arch/arm/Makefile.inc	Tue Jun 17 08:50:48 2014
@@ -1,9 +1,7 @@
-# $NetBSD: Makefile.inc,v 1.3 2014/06/17 06:31:47 alnsn Exp $
+# $NetBSD: Makefile.inc,v 1.4 2014/06/17 08:50:48 alnsn Exp $
 
 CPPFLAGS+=	-DARCH_ELFSIZE=32
 
-SRCS+=		cpufunc.c
-
 .PATH:  ${RUMPTOP}/../arch/arm/arm32
 SRCS+=  	kobj_machdep.c
 



CVS commit: src/sys/dev/usb

2014-06-17 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Jun 17 09:35:46 UTC 2014

Modified Files:
src/sys/dev/usb: uhidev.c uhidev.h

Log Message:
PR/48908: Cannot open /dev/uhid? when another report id at the same uhidev
was already opened.

Restore the sc reference counting lost in usbmp merge.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/dev/usb/uhidev.c
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/usb/uhidev.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/usb/uhidev.c
diff -u src/sys/dev/usb/uhidev.c:1.59 src/sys/dev/usb/uhidev.c:1.60
--- src/sys/dev/usb/uhidev.c:1.59	Thu Dec 26 15:32:48 2013
+++ src/sys/dev/usb/uhidev.c	Tue Jun 17 09:35:46 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhidev.c,v 1.59 2013/12/26 15:32:48 christos Exp $	*/
+/*	$NetBSD: uhidev.c,v 1.60 2014/06/17 09:35:46 skrll Exp $	*/
 
 /*
  * Copyright (c) 2001, 2012 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uhidev.c,v 1.59 2013/12/26 15:32:48 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: uhidev.c,v 1.60 2014/06/17 09:35:46 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -545,6 +545,10 @@ uhidev_open(struct uhidev *scd)
 		return (EBUSY);
 	}
 	scd-sc_state |= UHIDEV_OPEN;
+	if (sc-sc_refcnt++) {
+		mutex_exit(sc-sc_lock);
+		return (0);
+	}
 	mutex_exit(sc-sc_lock);
 
 	if (sc-sc_isize == 0)
@@ -604,6 +608,7 @@ out1:
 	free(sc-sc_ibuf, M_USBDEV);
 	mutex_enter(sc-sc_lock);
 	scd-sc_state = ~UHIDEV_OPEN;
+	sc-sc_refcnt = 0;
 	sc-sc_ibuf = NULL;
 	sc-sc_ipipe = NULL;
 	sc-sc_opipe = NULL;
@@ -623,6 +628,10 @@ uhidev_close(struct uhidev *scd)
 		return;
 	}
 	scd-sc_state = ~UHIDEV_OPEN;
+	if (--sc-sc_refcnt) {
+		mutex_exit(sc-sc_lock);
+		return;
+	}
 	mutex_exit(sc-sc_lock);
 
 	DPRINTF((uhidev_close: close pipe\n));

Index: src/sys/dev/usb/uhidev.h
diff -u src/sys/dev/usb/uhidev.h:1.14 src/sys/dev/usb/uhidev.h:1.15
--- src/sys/dev/usb/uhidev.h:1.14	Thu Sep 26 07:25:31 2013
+++ src/sys/dev/usb/uhidev.h	Tue Jun 17 09:35:46 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhidev.h,v 1.14 2013/09/26 07:25:31 skrll Exp $	*/
+/*	$NetBSD: uhidev.h,v 1.15 2014/06/17 09:35:46 skrll Exp $	*/
 
 /*
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -53,6 +53,7 @@ struct uhidev_softc {
 	u_int sc_nrepid;
 	device_t *sc_subdevs;
 
+	int sc_refcnt;
 	u_char sc_dying;
 
 	kmutex_t sc_lock;		/* protects writes to sc_state */



CVS commit: src/lib/librumpuser

2014-06-17 Thread Justin Cormack
Module Name:src
Committed By:   justin
Date:   Tue Jun 17 09:53:59 UTC 2014

Modified Files:
src/lib/librumpuser: rumpuser_port.h

Log Message:
Applications are not supposed to and do not need to include features.h 
explicitly


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/lib/librumpuser/rumpuser_port.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librumpuser/rumpuser_port.h
diff -u src/lib/librumpuser/rumpuser_port.h:1.32 src/lib/librumpuser/rumpuser_port.h:1.33
--- src/lib/librumpuser/rumpuser_port.h:1.32	Wed Apr  2 17:09:23 2014
+++ src/lib/librumpuser/rumpuser_port.h	Tue Jun 17 09:53:59 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpuser_port.h,v 1.32 2014/04/02 17:09:23 justin Exp $	*/
+/*	$NetBSD: rumpuser_port.h,v 1.33 2014/06/17 09:53:59 justin Exp $	*/
 
 /*
  * Portability header for non-NetBSD platforms.
@@ -58,7 +58,6 @@
 #define _XOPEN_SOURCE 600
 #define _BSD_SOURCE
 #define _GNU_SOURCE
-#include features.h
 #endif
 
 #ifdef __ANDROID__



CVS commit: src/sys/net

2014-06-17 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue Jun 17 10:39:46 UTC 2014

Modified Files:
src/sys/net: bridgestp.c if_bridge.c if_bridgevar.h if_ethersubr.c

Log Message:
Restructure ether_input and bridge_input

The network stack of NetBSD is well organized and
layered. A packet reception is processed from a
lower layer to an upper layer one by one. However,
ether_input and bridge_input are not structured so.
bridge_input is called inside ether_input.

The new structure replaces ifnet#if_input of a bridge
member with bridge_input when the member is attached.
So a packet goes straight on a packet reception via
a bridge, bridge_input = ether_input = ip_input.

The change is part of a patch of Lloyd Parkes submitted
in PR 48104. Unlike the patch, the change doesn't
intend to change the behavior of the packet processing.
Another patch will fix PR 48104.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/net/bridgestp.c
cvs rdiff -u -r1.80 -r1.81 src/sys/net/if_bridge.c
cvs rdiff -u -r1.17 -r1.18 src/sys/net/if_bridgevar.h
cvs rdiff -u -r1.200 -r1.201 src/sys/net/if_ethersubr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/bridgestp.c
diff -u src/sys/net/bridgestp.c:1.14 src/sys/net/bridgestp.c:1.15
--- src/sys/net/bridgestp.c:1.14	Sun Jan 18 10:28:55 2009
+++ src/sys/net/bridgestp.c	Tue Jun 17 10:39:46 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: bridgestp.c,v 1.14 2009/01/18 10:28:55 mrg Exp $	*/
+/*	$NetBSD: bridgestp.c,v 1.15 2014/06/17 10:39:46 ozaki-r Exp $	*/
 
 /*
  * Copyright (c) 2000 Jason L. Wright (ja...@thought.net)
@@ -40,7 +40,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bridgestp.c,v 1.14 2009/01/18 10:28:55 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: bridgestp.c,v 1.15 2014/06/17 10:39:46 ozaki-r Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -579,7 +579,7 @@ bstp_acknowledge_topology_change(struct 
 	bstp_transmit_config(sc, bif);
 }
 
-struct mbuf *
+void
 bstp_input(struct bridge_softc *sc, struct bridge_iflist *bif, struct mbuf *m)
 {
 	struct ether_header *eh;
@@ -592,7 +592,7 @@ bstp_input(struct bridge_softc *sc, stru
 	eh = mtod(m, struct ether_header *);
 
 	if ((bif-bif_flags  IFBIF_STP) == 0)
-		return (m);
+		goto out;
 
 	len = ntohs(eh-ether_type);
 	if (len  sizeof(tpdu))
@@ -664,7 +664,7 @@ bstp_input(struct bridge_softc *sc, stru
  out:
 	if (m)
 		m_freem(m);
-	return (NULL);
+	return;
 }
 
 void

Index: src/sys/net/if_bridge.c
diff -u src/sys/net/if_bridge.c:1.80 src/sys/net/if_bridge.c:1.81
--- src/sys/net/if_bridge.c:1.80	Mon Jun 16 01:05:25 2014
+++ src/sys/net/if_bridge.c	Tue Jun 17 10:39:46 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bridge.c,v 1.80 2014/06/16 01:05:25 ozaki-r Exp $	*/
+/*	$NetBSD: if_bridge.c,v 1.81 2014/06/17 10:39:46 ozaki-r Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -80,7 +80,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_bridge.c,v 1.80 2014/06/16 01:05:25 ozaki-r Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_bridge.c,v 1.81 2014/06/17 10:39:46 ozaki-r Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_bridge_ipf.h
@@ -188,6 +188,7 @@ static int	bridge_init(struct ifnet *);
 static void	bridge_stop(struct ifnet *, int);
 static void	bridge_start(struct ifnet *);
 
+static void	bridge_input(struct ifnet *, struct mbuf *);
 static void	bridge_forward(void *);
 
 static void	bridge_timer(void *);
@@ -707,6 +708,7 @@ bridge_delete_member(struct bridge_softc
 		break;
 	}
 
+	ifs-if_input = ether_input;
 	ifs-if_bridge = NULL;
 	LIST_REMOVE(bif, bif_next);
 
@@ -739,6 +741,9 @@ bridge_ioctl_add(struct bridge_softc *sc
 	if (ifs-if_bridge != NULL)
 		return (EBUSY);
 
+	if (ifs-if_input != ether_input)
+		return EINVAL;
+
 	bif = malloc(sizeof(*bif), M_DEVBUF, M_NOWAIT);
 	if (bif == NULL)
 		return (ENOMEM);
@@ -764,6 +769,7 @@ bridge_ioctl_add(struct bridge_softc *sc
 
 	ifs-if_bridge = sc;
 	LIST_INSERT_HEAD(sc-sc_iflist, bif, bif_next);
+	ifs-if_input = bridge_input;
 
 	if (sc-sc_if.if_flags  IFF_RUNNING)
 		bstp_initialization(sc);
@@ -1570,7 +1576,7 @@ bridge_forward(void *v)
  *	bridging if it is not for us.
  *	should be called at splnet()
  */
-struct mbuf *
+static void
 bridge_input(struct ifnet *ifp, struct mbuf *m)
 {
 	struct bridge_softc *sc = ifp-if_bridge;
@@ -1578,30 +1584,42 @@ bridge_input(struct ifnet *ifp, struct m
 	struct ether_header *eh;
 	struct mbuf *mc;
 
-	if ((sc-sc_if.if_flags  IFF_RUNNING) == 0)
-		return (m);
+	if ((sc-sc_if.if_flags  IFF_RUNNING) == 0) {
+		ether_input(ifp, m);
+		return;
+	}
 
 	bif = bridge_lookup_member_if(sc, ifp);
-	if (bif == NULL)
-		return (m);
+	if (bif == NULL) {
+		ether_input(ifp, m);
+		return;
+	}
 
 	eh = mtod(m, struct ether_header *);
 
+	if (ETHER_IS_MULTICAST(eh-ether_dhost)) {
+		if (memcmp(etherbroadcastaddr,
+		eh-ether_dhost, ETHER_ADDR_LEN) == 0)
+			m-m_flags |= M_BCAST;
+		else
+			m-m_flags |= 

CVS commit: src/sys/dev/sbus

2014-06-17 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Jun 17 10:47:27 UTC 2014

Modified Files:
src/sys/dev/sbus: tcx.c

Log Message:
remove last remnants of CG8 emulation


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/dev/sbus/tcx.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/sbus/tcx.c
diff -u src/sys/dev/sbus/tcx.c:1.48 src/sys/dev/sbus/tcx.c:1.49
--- src/sys/dev/sbus/tcx.c:1.48	Tue May 13 05:30:38 2014
+++ src/sys/dev/sbus/tcx.c	Tue Jun 17 10:47:27 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcx.c,v 1.48 2014/05/13 05:30:38 martin Exp $ */
+/*	$NetBSD: tcx.c,v 1.49 2014/06/17 10:47:27 macallan Exp $ */
 
 /*
  *  Copyright (c) 1996, 1998, 2009 The NetBSD Foundation, Inc.
@@ -38,13 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tcx.c,v 1.48 2014/05/13 05:30:38 martin Exp $);
-
-/*
- * define for cg8 emulation on S24 (24-bit version of tcx) for the SS5;
- * it is bypassed on the 8-bit version (onboard framebuffer for SS4)
- */
-#undef TCX_CG8
+__KERNEL_RCSID(0, $NetBSD: tcx.c,v 1.49 2014/06/17 10:47:27 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -205,19 +199,6 @@ struct wsdisplay_accessops tcx_accessops
 
 #define OBPNAME	SUNW,tcx
 
-#ifdef TCX_CG8
-/*
- * For CG8 emulation, we map the 32-bit-deep framebuffer at an offset of
- * 256K; the cg8 space begins with a mono overlay plane and an overlay
- * enable plane (128K bytes each, 1 bit per pixel), immediately followed
- * by the color planes, 32 bits per pixel.  We also map just the 32-bit
- * framebuffer at 0x0400 (TCX_USER_RAM_COMPAT), for compatibility
- * with the cg8 driver.
- */
-#define	TCX_CG8OVERLAY	(256 * 1024)
-#define	TCX_SIZE_DFB32	(1152 * 900 * 4) /* max size of the framebuffer */
-#endif
-
 /*
  * Match a tcx.
  */



CVS commit: src/sys/fs/union

2014-06-17 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Tue Jun 17 12:38:12 UTC 2014

Modified Files:
src/sys/fs/union: union_subr.c

Log Message:
Unlock directory vnode after VOP_CREATE.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/fs/union/union_subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/fs/union/union_subr.c
diff -u src/sys/fs/union/union_subr.c:1.65 src/sys/fs/union/union_subr.c:1.66
--- src/sys/fs/union/union_subr.c:1.65	Sat May 17 04:07:15 2014
+++ src/sys/fs/union/union_subr.c	Tue Jun 17 12:38:12 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: union_subr.c,v 1.65 2014/05/17 04:07:15 dholland Exp $	*/
+/*	$NetBSD: union_subr.c,v 1.66 2014/06/17 12:38:12 hannken Exp $	*/
 
 /*
  * Copyright (c) 1994
@@ -72,7 +72,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: union_subr.c,v 1.65 2014/05/17 04:07:15 dholland Exp $);
+__KERNEL_RCSID(0, $NetBSD: union_subr.c,v 1.66 2014/06/17 12:38:12 hannken Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -892,10 +892,13 @@ union_vn_create(struct vnode **vpp, stru
 	vref(un-un_dirvp);
 	vp = NULL;
 	error = VOP_CREATE(un-un_dirvp, vp, cn, vap);
-	if (error)
+	if (error) {
+		VOP_UNLOCK(un-un_dirvp);
 		return error;
+	}
 
 	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
+	VOP_UNLOCK(un-un_dirvp);
 	error = VOP_OPEN(vp, fmode, cred);
 	if (error) {
 		vput(vp);



CVS commit: src/sys/dev/sbus

2014-06-17 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Jun 17 14:25:17 UTC 2014

Modified Files:
src/sys/dev/sbus: tcx.c

Log Message:
fix a few 8bit tcx issues:
- set ROP when clearing the screen, tcx actually uses it
- deal with possible 2MB VRAM tcx
while there, consistently use aprint_* in tcxattach()


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/dev/sbus/tcx.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/sbus/tcx.c
diff -u src/sys/dev/sbus/tcx.c:1.49 src/sys/dev/sbus/tcx.c:1.50
--- src/sys/dev/sbus/tcx.c:1.49	Tue Jun 17 10:47:27 2014
+++ src/sys/dev/sbus/tcx.c	Tue Jun 17 14:25:17 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcx.c,v 1.49 2014/06/17 10:47:27 macallan Exp $ */
+/*	$NetBSD: tcx.c,v 1.50 2014/06/17 14:25:17 macallan Exp $ */
 
 /*
  *  Copyright (c) 1996, 1998, 2009 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tcx.c,v 1.49 2014/06/17 10:47:27 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: tcx.c,v 1.50 2014/06/17 14:25:17 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -86,18 +86,19 @@ struct tcx_softc {
 
 	bus_space_handle_t sc_bt;	/* Brooktree registers */
 	bus_space_handle_t sc_thc;	/* THC registers */
-	uint8_t *sc_fbaddr;		/* framebuffer */
-	uint64_t *sc_rblit;		/* blitspace */
-	uint64_t *sc_rstip;		/* stipple space */
-
-	short	sc_8bit;		/* true if 8-bit hardware */
-	short	sc_blanked;		/* true if blanked */
-	u_char	sc_cmap_red[256];
-	u_char	sc_cmap_green[256];
-	u_char	sc_cmap_blue[256];
-	int 	sc_mode, sc_bg;
-	int	sc_cursor_x, sc_cursor_y;
-	int	sc_hotspot_x, sc_hotspot_y;
+	uint8_t 	*sc_fbaddr;	/* framebuffer */
+	uint64_t 	*sc_rblit;	/* blitspace */
+	uint64_t 	*sc_rstip;	/* stipple space */
+
+	short		sc_8bit;	/* true if 8-bit hardware */
+	short		sc_blanked;	/* true if blanked */
+	uint32_t	sc_fbsize;	/* size of the 8bit fb */
+	u_char		sc_cmap_red[256];
+	u_char		sc_cmap_green[256];
+	u_char		sc_cmap_blue[256];
+	int 		sc_mode, sc_bg;
+	int		sc_cursor_x, sc_cursor_y;
+	int		sc_hotspot_x, sc_hotspot_y;
 	struct vcons_data vd;
 };
 
@@ -138,6 +139,15 @@ struct wsscreen_list tcx_screenlist = {
 #define TCX_CTL_24_LEVEL	0x0300	/* 24 bits, ignores color map */
 #define TCX_CTL_PIXELMASK	0x00FF	/* mask for index/level */
 
+/*
+ * differences between S24 and tcx, as far as this driver is concerned:
+ * - S24 has 4MB VRAM, 24bit + 2bit control planes, no expansion possible
+ * - tcx has 1MB VRAM, 8bit, no control planes, may have a VSIMM toat bumps
+ *   VRAM to 2MB
+ * - tcx can apply ROPs to STIP operations, unlike S24
+ * - tcx has a Bt458 DAC, just like CG6. S24 has an ATT 20C567
+ */
+
 /* autoconfiguration driver */
 static void	tcxattach(device_t, device_t, void *);
 static int	tcxmatch(device_t, cfdata_t, void *);
@@ -223,7 +233,7 @@ tcxattach(device_t parent, device_t self
 	struct wsemuldisplaydev_attach_args aa;
 	struct rasops_info *ri;
 	unsigned long defattr;
-	int node, ramsize;
+	int node;
 	struct fbdevice *fb = sc-sc_fb;
 	bus_space_handle_t bh;
 	int isconsole, i, j;
@@ -251,17 +261,23 @@ tcxattach(device_t parent, device_t self
 	fb-fb_type.fb_depth = 8;
 	fb_setsize_obp(fb, fb-fb_type.fb_depth, 1152, 900, node);
 
+	/*
+	 * actual FB size ( of the 8bit region )
+	 * no need to restrict userland mappings to the visible VRAM
+	 */
 	if (sc-sc_8bit) {
-		printf( (8-bit only TCX)\n);
-		ramsize = 1024 * 1024;
+		aprint_normal( (8-bit only TCX)\n);
+		/* at least the SS4 can have 2MB with a VSIMM */
+		sc-sc_fbsize = 0x10 * prom_getpropint(node, vram, 1);
 	} else {
-		printf( (S24)\n);
-		ramsize = 4 * 1024 * 1024;
+		aprint_normal( (S24)\n);
+		/* all S24 I know of have 4MB, non-expandable */
+		sc-sc_fbsize = 0x10;
 	}
 
 	fb-fb_type.fb_cmsize = 256;
-	fb-fb_type.fb_size = ramsize;
-	printf(%s: %s, %d x %d, device_xname(self), OBPNAME,
+	fb-fb_type.fb_size = sc-sc_fbsize;	/* later code assumes 8bit */
+	aprint_normal_dev(self, %s, %d x %d\n, OBPNAME,
 		fb-fb_type.fb_width,
 		fb-fb_type.fb_height);
 
@@ -289,7 +305,8 @@ tcxattach(device_t parent, device_t self
 			 sc-sc_physaddr[TCX_REG_THC].oa_base,
 			 0x1000,
 			 BUS_SPACE_MAP_LINEAR, sc-sc_thc) != 0) {
-		printf(tcxattach: cannot map thc registers\n);
+		aprint_error_dev(self,
+		tcxattach: cannot map thc registers\n);
 		return;
 	}
 
@@ -298,7 +315,7 @@ tcxattach(device_t parent, device_t self
 			 sc-sc_physaddr[TCX_REG_CMAP].oa_base,
 			 0x1000,
 			 BUS_SPACE_MAP_LINEAR, sc-sc_bt) != 0) {
-		printf(tcxattach: cannot map bt registers\n);
+		aprint_error_dev(self, tcxattach: cannot map DAC registers\n);
 		return;
 	}
 
@@ -306,10 +323,10 @@ tcxattach(device_t parent, device_t self
 	if (sbus_bus_map(sa-sa_bustag,
 		 sc-sc_physaddr[TCX_REG_DFB8].oa_space,
 		 sc-sc_physaddr[TCX_REG_DFB8].oa_base,
-			 1024 * 1024,
+			 sc-sc_fbsize,
 			 BUS_SPACE_MAP_LINEAR,
 			 bh) 

CVS import: src/sys/external/bsd/sljit/dist

2014-06-17 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Tue Jun 17 15:37:44 UTC 2014

Update of /cvsroot/src/sys/external/bsd/sljit/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv17842

Log Message:
Import sljit 0.91 (svn r257).

The changes since the last import are:

r257: Add missing ADJUST_LOCAL_OFFSET for ARM64.
r256: Move incorrectly placed array definitions.
r255: More work on testing environment.
r254: Refactor test default output.
r253: Pass entry adress in r12 on PPC-LE.
r252: Optimize calls on MIPS-64.
r251: Several minor fixes.
r250: Add missing SLJIT_IS_FPU_AVAILABLE checks and reorder U and S flags.
r249: Optimize jumps on ARM-64.
r248: Optimize jumps on PowerPC.
r247: MIPS64 support is mostly finished.
r246: MIPS arithmetic.
r245: Start working on MIPS64.
r244: Uniform names for TILE-Gx.
r243: Uniform the names of ARM compilers.
r242: Change ll to l on x86 and rename some instructions on ARM-64.
r241: Improved memory access in PPC and reordering the parameter type flags.
r240: Prepare for more registers on ARM-Thumb2 and renaming TMP_REGISTER to 
TMP_REG1 on x86.
r239: Prepare for more registers on ARMv5.
r238: Prepare for more registers on TILE-Gx.
r237: Prepare for more registers on MIPS and SPARC.
r236: Prepare for more registers on PPC.
r235: Prepare for more registers on x86.
r234: Most tests are pass on ARM-64 now.
r233: Around 25 test cases are now pass on ARM-64.
r232: More progress on ARM-64 and Thumb2 refactoring.
r231: Some progress an ARM-64 and ARM-T2 refactoring.
r230: Thumb2 code refactoring.
r229: Start working on ARM-64.
r228: Little endian PowerPC systems are supported now by the JIT compiler.
r227: TileGX architecture is now supported. Patch made by Jiong Wang.
r226: Cache flush for android. Patch by  Giuseppe D'Angelo.
r225: Add support for forcibly freeing unused executable memory. Inspired by 
Carsten Klein.
r224: Few typo fixes.
r223: Reorder madvise and posix_madvise.
r222: The missing sljit_get_float_register_index function is added.
r221: Remove an invalid shift on ARM.
r220: JIT compiler now supports 32 bit Macs thanks to Lawrence Velazquez.
r219: Better code size statistics.
r218: Improvements for x86 and LIR dump.
r217: ICC and SunPro C fixes
r216: A new file for tracking internal changes are added.
r215: Less GNU dependnet Makefile and Intel style assemby for x86-64 systems.
r214: Switch from stdcall to cdecl in x86-32.
r213: Upstreaming minor fixes. Thanks for Daniel Richard G.
r212: Documentation update and a fix for a locking issue.
r211: Renaming temporaries to scratches to match the new name of the register. 
Does not affect compatibility.
r210: Improving assertions.
r209: Port sljit to SunPro C compiler. Patch by Daniel Richard G.
r208: SLJIT_TEMPORARY_REGx registers are renamed to SLJIT_SCRATCH_REGx.
r207: Removing unused checks.
r206: Optimizations for arm.
r205: Some optimizations on powerpc, mips and sparc.
r204: Rename sljit_emit_cond_value to sljit_emit_op_flags.
r203: Small x86 optimization.
r202: Finish cond_value with AND and INT_OP.
r201: More x86 fixes and improvements.
r200: Rename buf and code to inst.
r199: Replacing constants with instruction names in x86. Greatly improves 
maintainability.
r198: Only xmm0-xmm5 is volatile on Win64, so xmm6 must be saved.
r197: PowerPC shift right always modifies the carry flag. We may need to 
restore it.
r196: Rename SLJIT_F* functions to SLJIT_*D
r195: SLJIT_INT_OP works in the same way as SLJIT_SINGLE_OP: the input register 
arguments must be generated by the output of another instruction with 
SLJIT_INT_OP flag
r194: Renaming sljit_w to sljit_sw, sljit_i to sljit_si, sljit_h to sljit_sh, 
and sljit_b to sljit_sb.
r193: ARM single precision support.
r192: Single precision support added for ppc, mips and sparc.
r191: Add single precision support. Only works on x86 now.
r190: Relace C types with sljit types. No functionality change.
r189: Change 0 to NULL for mmap.
r188: Support environments where MAP_ANON is not available.
r187: Adding type descriptors for pointers and doubles (preparing for x32 ABIs 
and single precision support).

Status:

Vendor Tag: TNF
Release Tags:   SLJIT-r257

N src/sys/external/bsd/sljit/dist/API_CHANGES
N src/sys/external/bsd/sljit/dist/INTERNAL_CHANGES
U src/sys/external/bsd/sljit/dist/Makefile
U src/sys/external/bsd/sljit/dist/README
U src/sys/external/bsd/sljit/dist/regex_src/regexMain.c
U src/sys/external/bsd/sljit/dist/regex_src/regexJIT.c
U src/sys/external/bsd/sljit/dist/regex_src/regexJIT.h
C src/sys/external/bsd/sljit/dist/test_src/sljitTest.c
C src/sys/external/bsd/sljit/dist/test_src/sljitMain.c
U src/sys/external/bsd/sljit/dist/sljit_src/sljitLir.h
U src/sys/external/bsd/sljit/dist/sljit_src/sljitNativePPC_32.c
C src/sys/external/bsd/sljit/dist/sljit_src/sljitUtils.c
N src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_32.c
C src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_32.c
C 

CVS commit: src/usr.bin/sed

2014-06-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jun 17 16:39:02 UTC 2014

Modified Files:
src/usr.bin/sed: main.c sed.1

Log Message:
add -u (unbuffered output) after GNU sed.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/usr.bin/sed/main.c
cvs rdiff -u -r1.34 -r1.35 src/usr.bin/sed/sed.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/sed/main.c
diff -u src/usr.bin/sed/main.c:1.24 src/usr.bin/sed/main.c:1.25
--- src/usr.bin/sed/main.c:1.24	Fri Jun  6 08:46:54 2014
+++ src/usr.bin/sed/main.c	Tue Jun 17 12:39:02 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.24 2014/06/06 12:46:54 joerg Exp $	*/
+/*	$NetBSD: main.c,v 1.25 2014/06/17 16:39:02 christos Exp $	*/
 
 /*-
  * Copyright (c) 2013 Johann 'Myrkraverk' Oskarsson.
@@ -39,7 +39,7 @@
 #endif
 
 #include sys/cdefs.h
-__RCSID($NetBSD: main.c,v 1.24 2014/06/06 12:46:54 joerg Exp $);
+__RCSID($NetBSD: main.c,v 1.25 2014/06/17 16:39:02 christos Exp $);
 #ifdef __FBSDID
 __FBSDID($FreeBSD: head/usr.bin/sed/main.c 252231 2013-06-26 04:14:19Z pfg $);
 #endif
@@ -137,7 +137,7 @@ main(int argc, char *argv[])
 	fflag = 0;
 	inplace = NULL;
 
-	while ((c = getopt(argc, argv, EI::ae:f:i::lnr)) != -1)
+	while ((c = getopt(argc, argv, EI::ae:f:i::lnru)) != -1)
 		switch (c) {
 		case 'r':		/* Gnu sed compat */
 		case 'E':
@@ -177,6 +177,16 @@ main(int argc, char *argv[])
 		case 'n':
 			nflag = 1;
 			break;
+		case 'u':
+#ifdef _IONBF
+			c = setvbuf(stdout, NULL, _IONBF, 0);
+#else
+			c = -1;
+			errno = EOPNOTSUPP;
+#endif
+			if (c)
+warn(setting unbuffered output failed);
+			break;
 		default:
 		case '?':
 			usage();
@@ -208,9 +218,10 @@ main(int argc, char *argv[])
 static void
 usage(void)
 {
-	(void)fprintf(stderr, %s\n%s\n,
-		usage: sed script [-Ealn] [-i extension] [file ...],
-		   sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]);
+	(void)fprintf(stderr,
+	Usage: %s script [-Ealnu] [-i[extension]] [file ...]\n
+	\t%s [-Ealnu] [-i[extension]] [-e script] ... [-f script_file]
+	 ... [file ...]\n, getprogname(), getprogname());
 	exit(1);
 }
 

Index: src/usr.bin/sed/sed.1
diff -u src/usr.bin/sed/sed.1:1.34 src/usr.bin/sed/sed.1:1.35
--- src/usr.bin/sed/sed.1:1.34	Fri Jun  6 10:36:38 2014
+++ src/usr.bin/sed/sed.1	Tue Jun 17 12:39:02 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: sed.1,v 1.34 2014/06/06 14:36:38 christos Exp $
+.\	$NetBSD: sed.1,v 1.35 2014/06/17 16:39:02 christos Exp $
 .\ Copyright (c) 1992, 1993
 .\	The Regents of the University of California.  All rights reserved.
 .\
@@ -32,7 +32,7 @@
 .\	@(#)sed.1	8.2 (Berkeley) 12/30/93
 .\ $FreeBSD: head/usr.bin/sed/sed.1 259132 2013-12-09 18:57:20Z eadler $
 .\
-.Dd December 9, 2013
+.Dd June 17, 2014
 .Dt SED 1
 .Os
 .Sh NAME
@@ -40,7 +40,7 @@
 .Nd stream editor
 .Sh SYNOPSIS
 .Nm
-.Op Fl Ealnr
+.Op Fl Ealnru
 .Ar command
 .Op Ar
 .Nm
@@ -149,6 +149,8 @@ option suppresses this behavior.
 Same as
 .Fl E
 for compatibility with GNU sed.
+.It Fl u
+Make output unbuffered.
 .El
 .Pp
 The form of a



CVS commit: src/sys/net

2014-06-17 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Tue Jun 17 16:52:33 UTC 2014

Modified Files:
src/sys/net: bpfjit.c

Log Message:
Update code to the latest sljit version.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/net/bpfjit.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/bpfjit.c
diff -u src/sys/net/bpfjit.c:1.11 src/sys/net/bpfjit.c:1.12
--- src/sys/net/bpfjit.c:1.11	Fri May 23 22:04:09 2014
+++ src/sys/net/bpfjit.c	Tue Jun 17 16:52:33 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: bpfjit.c,v 1.11 2014/05/23 22:04:09 alnsn Exp $	*/
+/*	$NetBSD: bpfjit.c,v 1.12 2014/06/17 16:52:33 alnsn Exp $	*/
 
 /*-
  * Copyright (c) 2011-2014 Alexander Nasonov.
@@ -31,9 +31,9 @@
 
 #include sys/cdefs.h
 #ifdef _KERNEL
-__KERNEL_RCSID(0, $NetBSD: bpfjit.c,v 1.11 2014/05/23 22:04:09 alnsn Exp $);
+__KERNEL_RCSID(0, $NetBSD: bpfjit.c,v 1.12 2014/06/17 16:52:33 alnsn Exp $);
 #else
-__RCSID($NetBSD: bpfjit.c,v 1.11 2014/05/23 22:04:09 alnsn Exp $);
+__RCSID($NetBSD: bpfjit.c,v 1.12 2014/06/17 16:52:33 alnsn Exp $);
 #endif
 
 #include sys/types.h
@@ -81,9 +81,9 @@ __RCSID($NetBSD: bpfjit.c,v 1.11 2014/0
 #define BJ_BUF		SLJIT_SAVED_REG1
 #define BJ_WIRELEN	SLJIT_SAVED_REG2
 #define BJ_BUFLEN	SLJIT_SAVED_REG3
-#define BJ_AREG		SLJIT_TEMPORARY_REG1
-#define BJ_TMP1REG	SLJIT_TEMPORARY_REG2
-#define BJ_TMP2REG	SLJIT_TEMPORARY_REG3
+#define BJ_AREG		SLJIT_SCRATCH_REG1
+#define BJ_TMP1REG	SLJIT_SCRATCH_REG2
+#define BJ_TMP2REG	SLJIT_SCRATCH_REG3
 #define BJ_XREG		SLJIT_TEMPORARY_EREG1
 #define BJ_TMP3REG	SLJIT_TEMPORARY_EREG2
 
@@ -425,13 +425,13 @@ emit_read32(struct sljit_compiler* compi
  */
 static int
 emit_xcall(struct sljit_compiler* compiler, const struct bpf_insn *pc,
-int dst, sljit_w dstw, struct sljit_jump **ret0_jump,
+int dst, sljit_sw dstw, struct sljit_jump **ret0_jump,
 uint32_t (*fn)(const struct mbuf *, uint32_t, int *))
 {
 #if BJ_XREG == SLJIT_RETURN_REG   || \
-BJ_XREG == SLJIT_TEMPORARY_REG1 || \
-BJ_XREG == SLJIT_TEMPORARY_REG2 || \
-BJ_XREG == SLJIT_TEMPORARY_REG3
+BJ_XREG == SLJIT_SCRATCH_REG1 || \
+BJ_XREG == SLJIT_SCRATCH_REG2 || \
+BJ_XREG == SLJIT_SCRATCH_REG3
 #error Not supported assignment of registers.
 #endif
 	int status;
@@ -456,7 +456,7 @@ emit_xcall(struct sljit_compiler* compil
 	 */
 	status = sljit_emit_op1(compiler,
 	SLJIT_MOV,
-	SLJIT_TEMPORARY_REG1, 0,
+	SLJIT_SCRATCH_REG1, 0,
 	BJ_BUF, 0);
 	if (status != SLJIT_SUCCESS)
 		return status;
@@ -464,13 +464,13 @@ emit_xcall(struct sljit_compiler* compil
 	if (BPF_CLASS(pc-code) == BPF_LD  BPF_MODE(pc-code) == BPF_IND) {
 		status = sljit_emit_op2(compiler,
 		SLJIT_ADD,
-		SLJIT_TEMPORARY_REG2, 0,
+		SLJIT_SCRATCH_REG2, 0,
 		BJ_XREG, 0,
 		SLJIT_IMM, (uint32_t)pc-k);
 	} else {
 		status = sljit_emit_op1(compiler,
 		SLJIT_MOV,
-		SLJIT_TEMPORARY_REG2, 0,
+		SLJIT_SCRATCH_REG2, 0,
 		SLJIT_IMM, (uint32_t)pc-k);
 	}
 
@@ -478,7 +478,7 @@ emit_xcall(struct sljit_compiler* compil
 		return status;
 
 	status = sljit_get_local_base(compiler,
-	SLJIT_TEMPORARY_REG3, 0, arg3_offset);
+	SLJIT_SCRATCH_REG3, 0, arg3_offset);
 	if (status != SLJIT_SUCCESS)
 		return status;
 
@@ -510,7 +510,7 @@ emit_xcall(struct sljit_compiler* compil
 	/* tmp3 = *err; */
 	status = sljit_emit_op1(compiler,
 	SLJIT_MOV_UI,
-	SLJIT_TEMPORARY_REG3, 0,
+	SLJIT_SCRATCH_REG3, 0,
 	SLJIT_MEM1(SLJIT_LOCALS_REG), arg3_offset);
 	if (status != SLJIT_SUCCESS)
 		return status;
@@ -518,7 +518,7 @@ emit_xcall(struct sljit_compiler* compil
 	/* if (tmp3 != 0) return 0; */
 	*ret0_jump = sljit_emit_cmp(compiler,
 	SLJIT_C_NOT_EQUAL,
-	SLJIT_TEMPORARY_REG3, 0,
+	SLJIT_SCRATCH_REG3, 0,
 	SLJIT_IMM, 0);
 	if (*ret0_jump == NULL)
 		return SLJIT_ERR_ALLOC_FAILED;
@@ -819,21 +819,21 @@ divide(sljit_uw x, sljit_uw y)
  * divt,divw are either SLJIT_IMM,pc-k or BJ_XREG,0.
  */
 static int
-emit_division(struct sljit_compiler* compiler, int divt, sljit_w divw)
+emit_division(struct sljit_compiler* compiler, int divt, sljit_sw divw)
 {
 	int status;
 
 #if BJ_XREG == SLJIT_RETURN_REG   || \
-BJ_XREG == SLJIT_TEMPORARY_REG1 || \
-BJ_XREG == SLJIT_TEMPORARY_REG2 || \
-BJ_AREG == SLJIT_TEMPORARY_REG2
+BJ_XREG == SLJIT_SCRATCH_REG1 || \
+BJ_XREG == SLJIT_SCRATCH_REG2 || \
+BJ_AREG == SLJIT_SCRATCH_REG2
 #error Not supported assignment of registers.
 #endif
 
-#if BJ_AREG != SLJIT_TEMPORARY_REG1
+#if BJ_AREG != SLJIT_SCRATCH_REG1
 	status = sljit_emit_op1(compiler,
 	SLJIT_MOV,
-	SLJIT_TEMPORARY_REG1, 0,
+	SLJIT_SCRATCH_REG1, 0,
 	BJ_AREG, 0);
 	if (status != SLJIT_SUCCESS)
 		return status;
@@ -841,7 +841,7 @@ emit_division(struct sljit_compiler* com
 
 	status = sljit_emit_op1(compiler,
 	SLJIT_MOV,
-	SLJIT_TEMPORARY_REG2, 0,
+	SLJIT_SCRATCH_REG2, 0,
 	divt, divw);
 	if 

CVS commit: src/sys/external/bsd/sljit

2014-06-17 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Tue Jun 17 16:49:11 UTC 2014

Modified Files:
src/sys/external/bsd/sljit: README.import

Log Message:
New sljit version is r257.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/sljit/README.import

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/sljit/README.import
diff -u src/sys/external/bsd/sljit/README.import:1.3 src/sys/external/bsd/sljit/README.import:1.4
--- src/sys/external/bsd/sljit/README.import:1.3	Sun Oct 28 09:41:12 2012
+++ src/sys/external/bsd/sljit/README.import	Tue Jun 17 16:49:11 2014
@@ -1,6 +1,6 @@
 There are no CVS/SVN ids in sljit repository but don't forget to
 remove .svn before importing the new version.
 
-Current sljit import is @ r186:
+Current sljit import is @ r257:
 
-svn co https://sljit.svn.sourceforge.net/svnroot/sljit@186 dist
+svn co https://sljit.svn.sourceforge.net/svnroot/sljit@257 dist



CVS commit: src/sys/external/bsd/sljit/dist/sljit_src

2014-06-17 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Tue Jun 17 17:30:48 UTC 2014

Modified Files:
src/sys/external/bsd/sljit/dist/sljit_src: sljitConfigInternal.h

Log Message:
Don't redefine SLJIT_HALT_PROCESS().


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
src/sys/external/bsd/sljit/dist/sljit_src/sljitConfigInternal.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/sljit/dist/sljit_src/sljitConfigInternal.h
diff -u src/sys/external/bsd/sljit/dist/sljit_src/sljitConfigInternal.h:1.7 src/sys/external/bsd/sljit/dist/sljit_src/sljitConfigInternal.h:1.8
--- src/sys/external/bsd/sljit/dist/sljit_src/sljitConfigInternal.h:1.7	Tue Jun 17 16:48:24 2014
+++ src/sys/external/bsd/sljit/dist/sljit_src/sljitConfigInternal.h	Tue Jun 17 17:30:48 2014
@@ -488,8 +488,6 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_free
 #include assert.h
 #include stdlib.h
 
-#define SLJIT_HALT_PROCESS() abort()
-
 #define SLJIT_ASSERT(x) assert(x)
 
 #endif /* !SLJIT_ASSERT */



CVS commit: src/sys/dev/pci

2014-06-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jun 17 17:37:08 UTC 2014

Modified Files:
src/sys/dev/pci: if_bge.c if_bgereg.h

Log Message:
- Print yet another hardware config word in SRAM(BGE_SRAM_DATA_CFG_5) for
  BCM5717 and newer devices.
- Fix a trivial bug in #ifdef NOTYET.


To generate a diff of this commit:
cvs rdiff -u -r1.266 -r1.267 src/sys/dev/pci/if_bge.c
cvs rdiff -u -r1.87 -r1.88 src/sys/dev/pci/if_bgereg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/if_bge.c
diff -u src/sys/dev/pci/if_bge.c:1.266 src/sys/dev/pci/if_bge.c:1.267
--- src/sys/dev/pci/if_bge.c:1.266	Sat Mar 29 19:28:24 2014
+++ src/sys/dev/pci/if_bge.c	Tue Jun 17 17:37:08 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bge.c,v 1.266 2014/03/29 19:28:24 christos Exp $	*/
+/*	$NetBSD: if_bge.c,v 1.267 2014/06/17 17:37:08 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_bge.c,v 1.266 2014/03/29 19:28:24 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_bge.c,v 1.267 2014/06/17 17:37:08 msaitoh Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -3293,7 +3293,7 @@ bge_attach(device_t parent, device_t sel
 	pci_chipset_tag_t	pc;
 	pci_intr_handle_t	ih;
 	const char		*intrstr = NULL;
-	uint32_t 		hwcfg, hwcfg2, hwcfg3, hwcfg4;
+	uint32_t 		hwcfg, hwcfg2, hwcfg3, hwcfg4, hwcfg5;
 	uint32_t		command;
 	struct ifnet		*ifp;
 	uint32_t		misccfg, mimode;
@@ -3667,7 +3667,7 @@ bge_attach(device_t parent, device_t sel
 	 * memory, or fall back to the config word in the EEPROM.
 	 * Note: on some BCM5700 cards, this value appears to be unset.
 	 */
-	hwcfg = hwcfg2 = hwcfg3 = hwcfg4 = 0;
+	hwcfg = hwcfg2 = hwcfg3 = hwcfg4 = hwcfg5 = 0;
 	if (bge_readmem_ind(sc, BGE_SRAM_DATA_SIG) ==
 	BGE_SRAM_DATA_SIG_MAGIC) {
 		uint32_t tmp;
@@ -3681,13 +3681,16 @@ bge_attach(device_t parent, device_t sel
 			hwcfg3 = bge_readmem_ind(sc, BGE_SRAM_DATA_CFG_3);
 		if (BGE_ASICREV(sc-bge_chipid == BGE_ASICREV_BCM5785))
 			hwcfg4 = bge_readmem_ind(sc, BGE_SRAM_DATA_CFG_4);
+		if (BGE_IS_5717_PLUS(sc))
+			hwcfg4 = bge_readmem_ind(sc, BGE_SRAM_DATA_CFG_5);
 	} else if (!(sc-bge_flags  BGEF_NO_EEPROM)) {
 		bge_read_eeprom(sc, (void *)hwcfg,
 		BGE_EE_HWCFG_OFFSET, sizeof(hwcfg));
 		hwcfg = be32toh(hwcfg);
 	}
-	aprint_normal_dev(sc-bge_dev, HW config %08x, %08x, %08x, %08x\n,
-	hwcfg, hwcfg2, hwcfg3, hwcfg4);
+	aprint_normal_dev(sc-bge_dev,
+	HW config %08x, %08x, %08x, %08x %08x\n,
+	hwcfg, hwcfg2, hwcfg3, hwcfg4, hwcfg5);
 
 	bge_sig_legacy(sc, BGE_RESET_START);
 	bge_sig_post_reset(sc, BGE_RESET_START);
@@ -5040,7 +5043,7 @@ doit:
 			 * XXX jonat...@netbsd.org: untested.
 			 * how to force  this branch to be taken?
 			 */
-			BGE_EVCNT_INCR(sc-sc_ev_txtsopain);
+			BGE_EVCNT_INCR(sc-bge_ev_txtsopain);
 
 			m_copydata(m0, offset, sizeof(ip), ip);
 			m_copydata(m0, hlen, sizeof(th), th);

Index: src/sys/dev/pci/if_bgereg.h
diff -u src/sys/dev/pci/if_bgereg.h:1.87 src/sys/dev/pci/if_bgereg.h:1.88
--- src/sys/dev/pci/if_bgereg.h:1.87	Tue May 27 16:17:55 2014
+++ src/sys/dev/pci/if_bgereg.h	Tue Jun 17 17:37:08 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bgereg.h,v 1.87 2014/05/27 16:17:55 msaitoh Exp $	*/
+/*	$NetBSD: if_bgereg.h,v 1.88 2014/06/17 17:37:08 msaitoh Exp $	*/
 /*
  * Copyright (c) 2001 Wind River Systems
  * Copyright (c) 1997, 1998, 1999, 2001
@@ -85,6 +85,7 @@
 #define	BGE_SRAM_DATA_CFG_2		0x0D38
 #define	BGE_SRAM_DATA_CFG_3		0x0D3C
 #define	BGE_SRAM_DATA_CFG_4		0x0D60
+#define	BGE_SRAM_DATA_CFG_5		0x0E0C
 #define BGE_SOFTWARE_GENCOMM_END	0x0FFF
 #define BGE_UNMAPPED			0x1000
 #define BGE_UNMAPPED_END		0x1FFF



CVS commit: src/sys/dev/pci

2014-06-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jun 17 18:18:51 UTC 2014

Modified Files:
src/sys/dev/pci: if_bge.c

Log Message:
Fix a variable name in last commit.


To generate a diff of this commit:
cvs rdiff -u -r1.267 -r1.268 src/sys/dev/pci/if_bge.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/if_bge.c
diff -u src/sys/dev/pci/if_bge.c:1.267 src/sys/dev/pci/if_bge.c:1.268
--- src/sys/dev/pci/if_bge.c:1.267	Tue Jun 17 17:37:08 2014
+++ src/sys/dev/pci/if_bge.c	Tue Jun 17 18:18:51 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bge.c,v 1.267 2014/06/17 17:37:08 msaitoh Exp $	*/
+/*	$NetBSD: if_bge.c,v 1.268 2014/06/17 18:18:51 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_bge.c,v 1.267 2014/06/17 17:37:08 msaitoh Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_bge.c,v 1.268 2014/06/17 18:18:51 msaitoh Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -3682,7 +3682,7 @@ bge_attach(device_t parent, device_t sel
 		if (BGE_ASICREV(sc-bge_chipid == BGE_ASICREV_BCM5785))
 			hwcfg4 = bge_readmem_ind(sc, BGE_SRAM_DATA_CFG_4);
 		if (BGE_IS_5717_PLUS(sc))
-			hwcfg4 = bge_readmem_ind(sc, BGE_SRAM_DATA_CFG_5);
+			hwcfg5 = bge_readmem_ind(sc, BGE_SRAM_DATA_CFG_5);
 	} else if (!(sc-bge_flags  BGEF_NO_EEPROM)) {
 		bge_read_eeprom(sc, (void *)hwcfg,
 		BGE_EE_HWCFG_OFFSET, sizeof(hwcfg));



CVS commit: src/doc

2014-06-17 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Tue Jun 17 18:48:35 UTC 2014

Modified Files:
src/doc: 3RDPARTY

Log Message:
Update sljit entry.


To generate a diff of this commit:
cvs rdiff -u -r1.1123 -r1.1124 src/doc/3RDPARTY

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1123 src/doc/3RDPARTY:1.1124
--- src/doc/3RDPARTY:1.1123	Sun Jun 15 17:55:43 2014
+++ src/doc/3RDPARTY	Tue Jun 17 18:48:35 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1123 2014/06/15 17:55:43 tls Exp $
+#	$NetBSD: 3RDPARTY,v 1.1124 2014/06/17 18:48:35 alnsn Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1431,8 +1431,8 @@ Location:	external/cddl/osnet
 Notes:
 
 Package:	sljit
-Version:	svn revision 186
-Current Vers:	svn revision 226
+Version:	0.91 (svn revision 257)
+Current Vers:	svn revision 268
 Maintainer:	Zoltán Herczeg hzmes...@freemail.hu
 Archive Site:	http://sourceforge.net/projects/sljit/
 Home Page:	http://sljit.sourceforge.net/



CVS commit: src/tests/lib

2014-06-17 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Tue Jun 17 19:26:18 UTC 2014

Modified Files:
src/tests/lib/libbpfjit: Makefile
src/tests/lib/libsljit: Makefile

Log Message:
libarch on sparc isn't -l${MACHINE_CPU}. Don't link to it.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libbpfjit/Makefile
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libsljit/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/lib/libbpfjit/Makefile
diff -u src/tests/lib/libbpfjit/Makefile:1.2 src/tests/lib/libbpfjit/Makefile:1.3
--- src/tests/lib/libbpfjit/Makefile:1.2	Tue Jun 17 06:36:01 2014
+++ src/tests/lib/libbpfjit/Makefile	Tue Jun 17 19:26:18 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2014/06/17 06:36:01 alnsn Exp $
+# $NetBSD: Makefile,v 1.3 2014/06/17 19:26:18 alnsn Exp $
 
 .include bsd.own.mk
 .include ../../../external/bsd/sljit/Makefile.inc
@@ -16,9 +16,6 @@ DPADD+=		${LIBBPFJITDIR}/libbpfjit.a
 LDADD+=		-L${LIBSLJITDIR} -lsljit
 DPADD+=		${LIBSLJITDIR}/libsljit.a
 
-# I-cache sync routines for arm and mips
-LDADD+=		-l${MACHINE_CPU}
-
 LDADD+=		${LIBPCAP}
 
 .include bsd.test.mk

Index: src/tests/lib/libsljit/Makefile
diff -u src/tests/lib/libsljit/Makefile:1.2 src/tests/lib/libsljit/Makefile:1.3
--- src/tests/lib/libsljit/Makefile:1.2	Tue Jun 17 06:36:01 2014
+++ src/tests/lib/libsljit/Makefile	Tue Jun 17 19:26:18 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2014/06/17 06:36:01 alnsn Exp $
+# $NetBSD: Makefile,v 1.3 2014/06/17 19:26:18 alnsn Exp $
 
 TESTSDIR=	${TESTSBASE}/lib/libsljit
 
@@ -20,7 +20,4 @@ WARNS=		3
 LDADD+=		-L${LIBSLJITDIR} -lsljit
 DPADD+=		${LIBSLJITDIR}/libsljit.a
 
-# I-cache sync routines for arm and mips
-LDADD+=		-l${MACHINE_CPU}
-
 .include bsd.test.mk



CVS commit: src/sys/external/bsd/sljit/dist/sljit_src

2014-06-17 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Tue Jun 17 19:33:20 UTC 2014

Modified Files:
src/sys/external/bsd/sljit/dist/sljit_src: sljitExecAllocator.c
sljitLir.c sljitNativeARM_32.c sljitNativeARM_64.c
sljitNativeARM_T2_32.c sljitNativeMIPS_32.c sljitNativeMIPS_64.c
sljitNativeMIPS_common.c sljitNativePPC_32.c sljitNativePPC_64.c
sljitNativePPC_common.c sljitNativeSPARC_32.c
sljitNativeSPARC_common.c sljitNativeTILEGX-encoder.c
sljitNativeTILEGX_64.c sljitNativeX86_32.c sljitNativeX86_64.c
sljitNativeX86_common.c sljitUtils.c

Log Message:
Add $NetBSD$.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/bsd/sljit/dist/sljit_src/sljitExecAllocator.c \
src/sys/external/bsd/sljit/dist/sljit_src/sljitLir.c \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativePPC_common.c \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_32.c
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_32.c \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_64.c \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_T2_32.c \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeMIPS_64.c \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeTILEGX-encoder.c \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeTILEGX_64.c
cvs rdiff -u -r1.1.1.3 -r1.2 \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeMIPS_32.c \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativePPC_32.c \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativePPC_64.c \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_64.c
cvs rdiff -u -r1.1.1.4 -r1.2 \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeMIPS_common.c
cvs rdiff -u -r1.1.1.2 -r1.2 \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeSPARC_32.c \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeSPARC_common.c
cvs rdiff -u -r1.5 -r1.6 \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_common.c
cvs rdiff -u -r1.6 -r1.7 \
src/sys/external/bsd/sljit/dist/sljit_src/sljitUtils.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/sljit/dist/sljit_src/sljitExecAllocator.c
diff -u src/sys/external/bsd/sljit/dist/sljit_src/sljitExecAllocator.c:1.3 src/sys/external/bsd/sljit/dist/sljit_src/sljitExecAllocator.c:1.4
--- src/sys/external/bsd/sljit/dist/sljit_src/sljitExecAllocator.c:1.3	Tue Jun 17 16:48:24 2014
+++ src/sys/external/bsd/sljit/dist/sljit_src/sljitExecAllocator.c	Tue Jun 17 19:33:20 2014
@@ -1,3 +1,5 @@
+/*	$NetBSD: sljitExecAllocator.c,v 1.4 2014/06/17 19:33:20 alnsn Exp $	*/
+
 /*
  *Stack-less Just-In-Time compiler
  *
Index: src/sys/external/bsd/sljit/dist/sljit_src/sljitLir.c
diff -u src/sys/external/bsd/sljit/dist/sljit_src/sljitLir.c:1.3 src/sys/external/bsd/sljit/dist/sljit_src/sljitLir.c:1.4
--- src/sys/external/bsd/sljit/dist/sljit_src/sljitLir.c:1.3	Tue Jun 17 16:48:24 2014
+++ src/sys/external/bsd/sljit/dist/sljit_src/sljitLir.c	Tue Jun 17 19:33:20 2014
@@ -1,3 +1,5 @@
+/*	$NetBSD: sljitLir.c,v 1.4 2014/06/17 19:33:20 alnsn Exp $	*/
+
 /*
  *Stack-less Just-In-Time compiler
  *
Index: src/sys/external/bsd/sljit/dist/sljit_src/sljitNativePPC_common.c
diff -u src/sys/external/bsd/sljit/dist/sljit_src/sljitNativePPC_common.c:1.3 src/sys/external/bsd/sljit/dist/sljit_src/sljitNativePPC_common.c:1.4
--- src/sys/external/bsd/sljit/dist/sljit_src/sljitNativePPC_common.c:1.3	Tue Jun 17 16:48:24 2014
+++ src/sys/external/bsd/sljit/dist/sljit_src/sljitNativePPC_common.c	Tue Jun 17 19:33:20 2014
@@ -1,3 +1,5 @@
+/*	$NetBSD: sljitNativePPC_common.c,v 1.4 2014/06/17 19:33:20 alnsn Exp $	*/
+
 /*
  *Stack-less Just-In-Time compiler
  *
Index: src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_32.c
diff -u src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_32.c:1.3 src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_32.c:1.4
--- src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_32.c:1.3	Tue Jun 17 16:48:24 2014
+++ src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_32.c	Tue Jun 17 19:33:20 2014
@@ -1,3 +1,5 @@
+/*	$NetBSD: sljitNativeX86_32.c,v 1.4 2014/06/17 19:33:20 alnsn Exp $	*/
+
 /*
  *Stack-less Just-In-Time compiler
  *

Index: src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_32.c
diff -u src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_32.c:1.1.1.1 src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_32.c:1.2
--- src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_32.c:1.1.1.1	Tue Jun 17 15:37:41 2014
+++ src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_32.c	Tue Jun 17 19:33:20 2014
@@ -1,3 +1,5 @@
+/*	$NetBSD: sljitNativeARM_32.c,v 1.2 2014/06/17 19:33:20 alnsn Exp $	*/
+
 /*
  *Stack-less Just-In-Time compiler
  

CVS commit: src/sys/external/bsd/sljit/dist/sljit_src

2014-06-17 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Tue Jun 17 19:36:45 UTC 2014

Modified Files:
src/sys/external/bsd/sljit/dist/sljit_src: sljitConfig.h
sljitConfigInternal.h sljitLir.h

Log Message:
Add $NetBSD$.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
src/sys/external/bsd/sljit/dist/sljit_src/sljitConfig.h
cvs rdiff -u -r1.8 -r1.9 \
src/sys/external/bsd/sljit/dist/sljit_src/sljitConfigInternal.h
cvs rdiff -u -r1.1.1.3 -r1.2 \
src/sys/external/bsd/sljit/dist/sljit_src/sljitLir.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/sljit/dist/sljit_src/sljitConfig.h
diff -u src/sys/external/bsd/sljit/dist/sljit_src/sljitConfig.h:1.9 src/sys/external/bsd/sljit/dist/sljit_src/sljitConfig.h:1.10
--- src/sys/external/bsd/sljit/dist/sljit_src/sljitConfig.h:1.9	Tue Jun 17 16:48:24 2014
+++ src/sys/external/bsd/sljit/dist/sljit_src/sljitConfig.h	Tue Jun 17 19:36:45 2014
@@ -1,3 +1,5 @@
+/*	$NetBSD: sljitConfig.h,v 1.10 2014/06/17 19:36:45 alnsn Exp $	*/
+
 /*
  *Stack-less Just-In-Time compiler
  *

Index: src/sys/external/bsd/sljit/dist/sljit_src/sljitConfigInternal.h
diff -u src/sys/external/bsd/sljit/dist/sljit_src/sljitConfigInternal.h:1.8 src/sys/external/bsd/sljit/dist/sljit_src/sljitConfigInternal.h:1.9
--- src/sys/external/bsd/sljit/dist/sljit_src/sljitConfigInternal.h:1.8	Tue Jun 17 17:30:48 2014
+++ src/sys/external/bsd/sljit/dist/sljit_src/sljitConfigInternal.h	Tue Jun 17 19:36:45 2014
@@ -1,3 +1,5 @@
+/*	$NetBSD: sljitConfigInternal.h,v 1.9 2014/06/17 19:36:45 alnsn Exp $	*/
+
 /*
  *Stack-less Just-In-Time compiler
  *

Index: src/sys/external/bsd/sljit/dist/sljit_src/sljitLir.h
diff -u src/sys/external/bsd/sljit/dist/sljit_src/sljitLir.h:1.1.1.3 src/sys/external/bsd/sljit/dist/sljit_src/sljitLir.h:1.2
--- src/sys/external/bsd/sljit/dist/sljit_src/sljitLir.h:1.1.1.3	Tue Jun 17 15:37:41 2014
+++ src/sys/external/bsd/sljit/dist/sljit_src/sljitLir.h	Tue Jun 17 19:36:45 2014
@@ -1,3 +1,5 @@
+/*	$NetBSD: sljitLir.h,v 1.2 2014/06/17 19:36:45 alnsn Exp $	*/
+
 /*
  *Stack-less Just-In-Time compiler
  *



CVS commit: src/sys/external/bsd/sljit/dist/test_src

2014-06-17 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Tue Jun 17 19:37:03 UTC 2014

Modified Files:
src/sys/external/bsd/sljit/dist/test_src: sljitMain.c sljitTest.c

Log Message:
Add $NetBSD$.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/sljit/dist/test_src/sljitMain.c \
src/sys/external/bsd/sljit/dist/test_src/sljitTest.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/sljit/dist/test_src/sljitMain.c
diff -u src/sys/external/bsd/sljit/dist/test_src/sljitMain.c:1.3 src/sys/external/bsd/sljit/dist/test_src/sljitMain.c:1.4
--- src/sys/external/bsd/sljit/dist/test_src/sljitMain.c:1.3	Tue Jun 17 16:48:24 2014
+++ src/sys/external/bsd/sljit/dist/test_src/sljitMain.c	Tue Jun 17 19:37:03 2014
@@ -1,3 +1,5 @@
+/*	$NetBSD: sljitMain.c,v 1.4 2014/06/17 19:37:03 alnsn Exp $	*/
+
 /*
  *Stack-less Just-In-Time compiler
  *
Index: src/sys/external/bsd/sljit/dist/test_src/sljitTest.c
diff -u src/sys/external/bsd/sljit/dist/test_src/sljitTest.c:1.3 src/sys/external/bsd/sljit/dist/test_src/sljitTest.c:1.4
--- src/sys/external/bsd/sljit/dist/test_src/sljitTest.c:1.3	Tue Jun 17 16:48:24 2014
+++ src/sys/external/bsd/sljit/dist/test_src/sljitTest.c	Tue Jun 17 19:37:03 2014
@@ -1,3 +1,5 @@
+/*	$NetBSD: sljitTest.c,v 1.4 2014/06/17 19:37:03 alnsn Exp $	*/
+
 /*
  *Stack-less Just-In-Time compiler
  *



CVS commit: src/sys/dev

2014-06-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jun 17 21:37:20 UTC 2014

Modified Files:
src/sys/dev/mii: brgphy.c brgphyreg.h
src/sys/dev/pci: if_bge.c if_bnx.c if_bnxreg.h

Log Message:
- Fix detection of BGEPHYF_FIBER_{MII|TBI}
- Add BCM5708S support in brgphy(4). The auto negotiation may have some bugs.
- Add 2500SX support (not tested).
- Fix bit definition of BRGPHY_MRBE_MSG_PG5_NP_T2 from FreeBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/sys/dev/mii/brgphy.c
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/mii/brgphyreg.h
cvs rdiff -u -r1.268 -r1.269 src/sys/dev/pci/if_bge.c
cvs rdiff -u -r1.52 -r1.53 src/sys/dev/pci/if_bnx.c
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/pci/if_bnxreg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/mii/brgphy.c
diff -u src/sys/dev/mii/brgphy.c:1.70 src/sys/dev/mii/brgphy.c:1.71
--- src/sys/dev/mii/brgphy.c:1.70	Mon Jun 16 16:48:16 2014
+++ src/sys/dev/mii/brgphy.c	Tue Jun 17 21:37:20 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: brgphy.c,v 1.70 2014/06/16 16:48:16 msaitoh Exp $	*/
+/*	$NetBSD: brgphy.c,v 1.71 2014/06/17 21:37:20 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: brgphy.c,v 1.70 2014/06/16 16:48:16 msaitoh Exp $);
+__KERNEL_RCSID(0, $NetBSD: brgphy.c,v 1.71 2014/06/17 21:37:20 msaitoh Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -90,8 +90,10 @@ struct brgphy_softc {
 	struct mii_softc sc_mii;
 	bool sc_isbge;
 	bool sc_isbnx;
-	uint32_t sc_chipid;/* parent's chipid */
-	uint32_t sc_phyflags;  /* parent's phyflags */
+	uint32_t sc_chipid;	/* parent's chipid */
+	uint32_t sc_phyflags;	/* parent's phyflags */
+	uint32_t sc_shared_hwcfg; /* shared hw config */
+	uint32_t sc_port_hwcfg;	/* port specific hw config */
 };
 
 CFATTACH_DECL3_NEW(brgphy, sizeof(struct brgphy_softc),
@@ -99,7 +101,10 @@ CFATTACH_DECL3_NEW(brgphy, sizeof(struct
 DVF_DETACH_SHUTDOWN);
 
 static int	brgphy_service(struct mii_softc *, struct mii_data *, int);
-static void	brgphy_status(struct mii_softc *);
+static void	brgphy_copper_status(struct mii_softc *);
+static void	brgphy_fiber_status(struct mii_softc *);
+static void	brgphy_5708s_status(struct mii_softc *);
+static void	brgphy_5709s_status(struct mii_softc *);
 static int	brgphy_mii_phy_auto(struct mii_softc *);
 static void	brgphy_loop(struct mii_softc *);
 static void	brgphy_reset(struct mii_softc *);
@@ -116,8 +121,20 @@ static void	brgphy_jumbo_settings(struct
 static void	brgphy_eth_wirespeed(struct mii_softc *);
 
 
-static const struct mii_phy_funcs brgphy_funcs = {
-	brgphy_service, brgphy_status, brgphy_reset,
+static const struct mii_phy_funcs brgphy_copper_funcs = {
+	brgphy_service, brgphy_copper_status, brgphy_reset,
+};
+
+static const struct mii_phy_funcs brgphy_fiber_funcs = {
+	brgphy_service, brgphy_fiber_status, brgphy_reset,
+};
+
+static const struct mii_phy_funcs brgphy_5708s_funcs = {
+	brgphy_service, brgphy_5708s_status, brgphy_reset,
+};
+
+static const struct mii_phy_funcs brgphy_5709s_funcs = {
+	brgphy_service, brgphy_5709s_status, brgphy_reset,
 };
 
 static const struct mii_phydesc brgphys[] = {
@@ -178,6 +195,9 @@ static const struct mii_phydesc brgphys[
 	{ MII_OUI_BROADCOM2,		MII_MODEL_BROADCOM2_BCM5482,
 	  MII_STR_BROADCOM2_BCM5482 },
 
+	{ MII_OUI_BROADCOM2,		MII_MODEL_BROADCOM2_BCM5708S,
+	  MII_STR_BROADCOM2_BCM5708S },
+
 	{ MII_OUI_BROADCOM2,		MII_MODEL_BROADCOM2_BCM5709C,
 	  MII_STR_BROADCOM2_BCM5709C },
 
@@ -264,7 +284,6 @@ brgphyattach(device_t parent, device_t s
 	sc-mii_pdata = mii;
 	sc-mii_flags = ma-mii_flags;
 	sc-mii_anegticks = MII_ANEGTICKS;
-	sc-mii_funcs = brgphy_funcs;
 
 	if (device_is_a(parent, bge))
 		bsc-sc_isbge = true;
@@ -281,10 +300,29 @@ brgphyattach(device_t parent, device_t s
 			aprint_error_dev(self, failed to get chipid\n);
 	}
 
+	if (bsc-sc_isbnx) {
+		/* Currently, only bnx use sc_shared_hwcfg and sc_port_hwcfg */
+		if (!prop_dictionary_get_uint32(dict, shared_hwcfg,
+			bsc-sc_shared_hwcfg))
+			aprint_error_dev(self, failed to get shared_hwcfg\n);
+		if (!prop_dictionary_get_uint32(dict, port_hwcfg,
+			bsc-sc_port_hwcfg))
+			aprint_error_dev(self, failed to get port_hwcfg\n);
+	}
+
+	if (sc-mii_flags  MIIF_HAVEFIBER) {
+		if (_BNX_CHIP_NUM(bsc-sc_chipid) == BNX_CHIP_NUM_5708)
+			sc-mii_funcs = brgphy_5708s_funcs;
+		else if (_BNX_CHIP_NUM(bsc-sc_chipid) == BNX_CHIP_NUM_5709)
+			sc-mii_funcs = brgphy_5709s_funcs;
+		else
+			sc-mii_funcs = brgphy_fiber_funcs;
+	} else
+		sc-mii_funcs = brgphy_copper_funcs;
+
 	PHY_RESET(sc);
 
-	sc-mii_capabilities =
-	PHY_READ(sc, MII_BMSR)  ma-mii_capmask;
+	sc-mii_capabilities = PHY_READ(sc, MII_BMSR)  ma-mii_capmask;
 	if (sc-mii_capabilities  BMSR_EXTSTAT)
 		sc-mii_extcapabilities = PHY_READ(sc, MII_EXTSR);
 
@@ -363,6 +401,10 @@ 

CVS commit: src/sys/dev/pci

2014-06-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jun 17 22:29:13 UTC 2014

Modified Files:
src/sys/dev/pci: if_bge.c

Log Message:
Add BGEPHYF_NO_WIRESPEED flag for fiber devices.


To generate a diff of this commit:
cvs rdiff -u -r1.269 -r1.270 src/sys/dev/pci/if_bge.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/if_bge.c
diff -u src/sys/dev/pci/if_bge.c:1.269 src/sys/dev/pci/if_bge.c:1.270
--- src/sys/dev/pci/if_bge.c:1.269	Tue Jun 17 21:37:20 2014
+++ src/sys/dev/pci/if_bge.c	Tue Jun 17 22:29:13 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bge.c,v 1.269 2014/06/17 21:37:20 msaitoh Exp $	*/
+/*	$NetBSD: if_bge.c,v 1.270 2014/06/17 22:29:13 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_bge.c,v 1.269 2014/06/17 21:37:20 msaitoh Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_bge.c,v 1.270 2014/06/17 22:29:13 msaitoh Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -3578,6 +3578,7 @@ bge_attach(device_t parent, device_t sel
 	PCI_PRODUCT(pa-pa_id) == PCI_PRODUCT_BROADCOM_BCM57791 ||
 	PCI_PRODUCT(pa-pa_id) == PCI_PRODUCT_BROADCOM_BCM57795 ||
 	BGE_ASICREV(sc-bge_chipid) == BGE_ASICREV_BCM5906) {
+		/* These chips are 10/100 only. */
 		capmask = ~BMSR_EXTSTAT;
 		sc-bge_phy_flags |= BGEPHYF_NO_WIRESPEED;
 	}
@@ -3865,10 +3866,11 @@ bge_attach(device_t parent, device_t sel
 	 */
 	if (PCI_PRODUCT(pa-pa_id) == SK_SUBSYSID_9D41 ||
 	(hwcfg  BGE_HWCFG_MEDIA) == BGE_MEDIA_FIBER) {
-		if (BGE_IS_5705_PLUS(sc))
-		sc-bge_flags |= BGEF_FIBER_MII;
-		else
-		sc-bge_flags |= BGEF_FIBER_TBI;
+		if (BGE_IS_5705_PLUS(sc)) {
+			sc-bge_flags |= BGEF_FIBER_MII;
+			sc-bge_phy_flags |= BGEPHYF_NO_WIRESPEED;
+		} else
+			sc-bge_flags |= BGEF_FIBER_TBI;
 	}
 
 	/* Set bge_phy_flags before prop_dictionary_set_uint32() */



CVS commit: src/sys/net

2014-06-17 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Jun 18 01:19:19 UTC 2014

Modified Files:
src/sys/net: bridgestp.c

Log Message:
Make local functions static

This change unveiled some functions are unused. Remove some and
comment out the others.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/net/bridgestp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/bridgestp.c
diff -u src/sys/net/bridgestp.c:1.15 src/sys/net/bridgestp.c:1.16
--- src/sys/net/bridgestp.c:1.15	Tue Jun 17 10:39:46 2014
+++ src/sys/net/bridgestp.c	Wed Jun 18 01:19:19 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: bridgestp.c,v 1.15 2014/06/17 10:39:46 ozaki-r Exp $	*/
+/*	$NetBSD: bridgestp.c,v 1.16 2014/06/18 01:19:19 ozaki-r Exp $	*/
 
 /*
  * Copyright (c) 2000 Jason L. Wright (ja...@thought.net)
@@ -40,7 +40,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bridgestp.c,v 1.15 2014/06/17 10:39:46 ozaki-r Exp $);
+__KERNEL_RCSID(0, $NetBSD: bridgestp.c,v 1.16 2014/06/18 01:19:19 ozaki-r Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -115,64 +115,67 @@ struct bstp_tbpdu {
 
 const uint8_t bstp_etheraddr[] = { 0x01, 0x80, 0xc2, 0x00, 0x00, 0x00 };
 
-void	bstp_initialize_port(struct bridge_softc *, struct bridge_iflist *);
-void	bstp_ifupdstatus(struct bridge_softc *, struct bridge_iflist *);
-void	bstp_enable_port(struct bridge_softc *, struct bridge_iflist *);
-void	bstp_disable_port(struct bridge_softc *, struct bridge_iflist *);
-void	bstp_enable_change_detection(struct bridge_iflist *);
-void	bstp_disable_change_detection(struct bridge_iflist *);
-int	bstp_root_bridge(struct bridge_softc *sc);
-int	bstp_supersedes_port_info(struct bridge_softc *,
-	struct bridge_iflist *, struct bstp_config_unit *);
-int	bstp_designated_port(struct bridge_softc *, struct bridge_iflist *);
-int	bstp_designated_for_some_port(struct bridge_softc *);
-void	bstp_transmit_config(struct bridge_softc *, struct bridge_iflist *);
-void	bstp_transmit_tcn(struct bridge_softc *);
-void	bstp_received_config_bpdu(struct bridge_softc *,
-	struct bridge_iflist *, struct bstp_config_unit *);
-void	bstp_received_tcn_bpdu(struct bridge_softc *, struct bridge_iflist *,
-	struct bstp_tcn_unit *);
-void	bstp_record_config_information(struct bridge_softc *,
-	struct bridge_iflist *, struct bstp_config_unit *);
-void	bstp_record_config_timeout_values(struct bridge_softc *,
-	struct bstp_config_unit *);
-void	bstp_config_bpdu_generation(struct bridge_softc *);
-void	bstp_send_config_bpdu(struct bridge_softc *, struct bridge_iflist *,
-	struct bstp_config_unit *);
-void	bstp_configuration_update(struct bridge_softc *);
-void	bstp_root_selection(struct bridge_softc *);
-void	bstp_designated_port_selection(struct bridge_softc *);
-void	bstp_become_designated_port(struct bridge_softc *,
-	struct bridge_iflist *);
-void	bstp_port_state_selection(struct bridge_softc *);
-void	bstp_make_forwarding(struct bridge_softc *, struct bridge_iflist *);
-void	bstp_make_blocking(struct bridge_softc *, struct bridge_iflist *);
-void	bstp_set_port_state(struct bridge_iflist *, uint8_t);
-void	bstp_set_bridge_priority(struct bridge_softc *, uint64_t);
-void	bstp_set_port_priority(struct bridge_softc *, struct bridge_iflist *,
-	uint16_t);
-void	bstp_set_path_cost(struct bridge_softc *, struct bridge_iflist *,
-	uint32_t);
-void	bstp_topology_change_detection(struct bridge_softc *);
-void	bstp_topology_change_acknowledged(struct bridge_softc *);
-void	bstp_acknowledge_topology_change(struct bridge_softc *,
-	struct bridge_iflist *);
-
-void	bstp_tick(void *);
-void	bstp_timer_start(struct bridge_timer *, uint16_t);
-void	bstp_timer_stop(struct bridge_timer *);
-int	bstp_timer_expired(struct bridge_timer *, uint16_t);
-
-void	bstp_hold_timer_expiry(struct bridge_softc *, struct bridge_iflist *);
-void	bstp_message_age_timer_expiry(struct bridge_softc *,
-	struct bridge_iflist *);
-void	bstp_forward_delay_timer_expiry(struct bridge_softc *,
-	struct bridge_iflist *);
-void	bstp_topology_change_timer_expiry(struct bridge_softc *);
-void	bstp_tcn_timer_expiry(struct bridge_softc *);
-void	bstp_hello_timer_expiry(struct bridge_softc *);
+static void bstp_initialize_port(struct bridge_softc *, struct bridge_iflist *);
+static void bstp_ifupdstatus(struct bridge_softc *, struct bridge_iflist *);
+static void bstp_enable_port(struct bridge_softc *, struct bridge_iflist *);
+static void bstp_disable_port(struct bridge_softc *, struct bridge_iflist *);
+static int bstp_root_bridge(struct bridge_softc *sc);
+static int bstp_supersedes_port_info(struct bridge_softc *,
+ struct bridge_iflist *,
+ struct bstp_config_unit *);
+static int bstp_designated_port(struct bridge_softc *, struct bridge_iflist *);
+static int bstp_designated_for_some_port(struct bridge_softc 

CVS commit: [netbsd-6] src/external/bsd/openpam/dist/lib

2014-06-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jun 18 02:03:26 UTC 2014

Modified Files:
src/external/bsd/openpam/dist/lib [netbsd-6]: openpam_configure.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1076):
src/external/bsd/openpam/dist/lib/openpam_configure.c 1.8 via patch

CVE-2014-3879: Incorrect error handling in PAM policy parser:
Missing module files were treated as soft failures leading to
unexpected behavior if policy files were copied between hosts with
differently installed modules or in the short period during upgrades
when module files were being replaced.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.2.1 \
src/external/bsd/openpam/dist/lib/openpam_configure.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/openpam/dist/lib/openpam_configure.c
diff -u src/external/bsd/openpam/dist/lib/openpam_configure.c:1.4 src/external/bsd/openpam/dist/lib/openpam_configure.c:1.4.2.1
--- src/external/bsd/openpam/dist/lib/openpam_configure.c:1.4	Tue Jan  3 18:56:49 2012
+++ src/external/bsd/openpam/dist/lib/openpam_configure.c	Wed Jun 18 02:03:26 2014
@@ -1,8 +1,8 @@
-/*	$NetBSD: openpam_configure.c,v 1.4 2012/01/03 18:56:49 christos Exp $	*/
+/*	$NetBSD: openpam_configure.c,v 1.4.2.1 2014/06/18 02:03:26 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2001-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2011 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2014 Dag-Erling Smørgrav
  * All rights reserved.
  *
  * This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -365,12 +365,17 @@ openpam_parse_chain(pam_handle_t *pamh,
 	char *line, *str, *name;
 	char *option, **optv;
 	size_t len;
-	int lineno, ret;
+	int lineno, ret, serrno;
 	FILE *f;
 
+	if (errno == ENOENT)
+		errno = 0;
+
 	if ((f = fopen(filename, r)) == NULL) {
+		serrno = errno;
 		openpam_log(errno == ENOENT ? PAM_LOG_DEBUG : PAM_LOG_NOTICE,
 		%s: %s, filename, strerror(errno));
+		errno = serrno;
 		return (PAM_SUCCESS);
 	}
 	if (openpam_check_desc_owner_perms(filename, fileno(f)) != 0) {
@@ -380,6 +385,7 @@ openpam_parse_chain(pam_handle_t *pamh,
 	this = NULL;
 	name = NULL;
 	lineno = 0;
+	serrno = 0;
 	while ((line = openpam_readline(f, lineno, NULL)) != NULL) {
 		/* get service name if necessary */
 		if (style == pam_conf_style) {
@@ -425,9 +431,14 @@ openpam_parse_chain(pam_handle_t *pamh,
 goto fail;
 			}
 			ret = openpam_load_chain(pamh, name, fclt);
-			FREE(name);
-			if (ret != PAM_SUCCESS)
+			if (ret != PAM_SUCCESS || errno == ENOENT) {
+serrno = errno;
+openpam_log(PAM_LOG_ERROR, failed loading 
+	include for service %s in %s: %s,
+	name, filename, strerror(errno));
 goto fail;
+			}
+			FREE(name);
 			FREE(line);
 			continue;
 		}
@@ -477,9 +488,11 @@ openpam_parse_chain(pam_handle_t *pamh,
 
 		/* load module */
 		this-module = openpam_load_module(name);
-		FREE(name);
-		if (this-module == NULL)
+		if (this-module == NULL) {
+			serrno = (errno == ENOENT ? ENOEXEC : errno);
 			goto fail;
+		}
+		FREE(name);
 
 		/* hook it up */
 		for (next = pamh-chains[fclt]; *next != NULL;
@@ -496,6 +509,7 @@ openpam_parse_chain(pam_handle_t *pamh,
 	fclose(f);
 	return (PAM_SUCCESS);
 syserr:
+	serrno = errno;
 	openpam_log(PAM_LOG_ERROR, %s: %s, filename, strerror(errno));
 fail:
 	if (this  this-optc) {
@@ -507,6 +521,10 @@ fail:
 	FREE(line);
 	FREE(name);
 	fclose(f);
+	if (serrno == 0)
+		errno = EINVAL;
+	else
+		errno = serrno;
 	return (PAM_SYSTEM_ERR);
 }
 
@@ -534,7 +552,7 @@ openpam_load_chain(pam_handle_t *pamh,
 	const char **path;
 	char *filename;
 	size_t len;
-	int ret;
+	int ret, serrno;
 
 	/* don't allow to escape from policy_path */
 	if (strchr(service, '/')) {
@@ -542,6 +560,7 @@ openpam_load_chain(pam_handle_t *pamh,
 		return (-PAM_SYSTEM_ERR);
 	}
 
+	ret = PAM_SYSTEM_ERR; /* shut up compiler stupidity */
 	for (path = openpam_policy_path; *path != NULL; ++path) {
 		len = strlen(*path);
 		if ((*path)[len - 1] == '/') {
@@ -552,11 +571,19 @@ openpam_load_chain(pam_handle_t *pamh,
 			}
 			ret = openpam_parse_chain(pamh, service, facility,
 			filename, pam_d_style);
+			serrno = errno;
 			FREE(filename);
+			errno = serrno;
 		} else {
 			ret = openpam_parse_chain(pamh, service, facility,
 			*path, pam_conf_style);
 		}
+
+		/* If /etc/pam.d/ exists, /etc/pam.conf will be ignored */
+		if (ret == PAM_SUCCESS  errno != ENOENT)
+			return (PAM_SUCCESS);
+
+		/* If we had a definitive error, bail out immediately */
 		if (ret != PAM_SUCCESS)
 			return (ret);
 	}



CVS commit: [netbsd-6] src/doc

2014-06-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jun 18 02:03:46 UTC 2014

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Ticket 1076.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.118 -r1.1.2.119 src/doc/CHANGES-6.2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.118 src/doc/CHANGES-6.2:1.1.2.119
--- src/doc/CHANGES-6.2:1.1.2.118	Wed Jun 11 15:47:54 2014
+++ src/doc/CHANGES-6.2	Wed Jun 18 02:03:46 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.118 2014/06/11 15:47:54 msaitoh Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.119 2014/06/18 02:03:46 msaitoh Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -2901,3 +2901,12 @@ external/mit/xorg/lib/fontconfig/etc/fon
 	Also look in new pkgsrc default path, /usr/pkg/share/fonts.
 	Noted by tsutsui.
 	[wiz, ticket #1077]
+
+src/external/bsd/openpam/dist/lib/openpam_configure.c 1.8 via patch
+
+	CVE-2014-3879: Incorrect error handling in PAM policy parser:
+	Missing module files were treated as soft failures leading to
+	unexpected behavior if policy files were copied between hosts with
+	differently installed modules or in the short period during upgrades
+	when module files were being replaced.
+	[christos, ticket #1076]



CVS commit: [netbsd-6-1] src/external/bsd/openpam/dist/lib

2014-06-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jun 18 02:15:27 UTC 2014

Modified Files:
src/external/bsd/openpam/dist/lib [netbsd-6-1]: openpam_configure.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1076):
src/external/bsd/openpam/dist/lib/openpam_configure.c 1.8 via patch

CVE-2014-3879: Incorrect error handling in PAM policy parser:
Missing module files were treated as soft failures leading to
unexpected behavior if policy files were copied between hosts with
differently installed modules or in the short period during upgrades
when module files were being replaced.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.16.1 \
src/external/bsd/openpam/dist/lib/openpam_configure.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/openpam/dist/lib/openpam_configure.c
diff -u src/external/bsd/openpam/dist/lib/openpam_configure.c:1.4 src/external/bsd/openpam/dist/lib/openpam_configure.c:1.4.16.1
--- src/external/bsd/openpam/dist/lib/openpam_configure.c:1.4	Tue Jan  3 18:56:49 2012
+++ src/external/bsd/openpam/dist/lib/openpam_configure.c	Wed Jun 18 02:15:27 2014
@@ -1,8 +1,8 @@
-/*	$NetBSD: openpam_configure.c,v 1.4 2012/01/03 18:56:49 christos Exp $	*/
+/*	$NetBSD: openpam_configure.c,v 1.4.16.1 2014/06/18 02:15:27 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2001-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2011 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2014 Dag-Erling Smørgrav
  * All rights reserved.
  *
  * This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -365,12 +365,17 @@ openpam_parse_chain(pam_handle_t *pamh,
 	char *line, *str, *name;
 	char *option, **optv;
 	size_t len;
-	int lineno, ret;
+	int lineno, ret, serrno;
 	FILE *f;
 
+	if (errno == ENOENT)
+		errno = 0;
+
 	if ((f = fopen(filename, r)) == NULL) {
+		serrno = errno;
 		openpam_log(errno == ENOENT ? PAM_LOG_DEBUG : PAM_LOG_NOTICE,
 		%s: %s, filename, strerror(errno));
+		errno = serrno;
 		return (PAM_SUCCESS);
 	}
 	if (openpam_check_desc_owner_perms(filename, fileno(f)) != 0) {
@@ -380,6 +385,7 @@ openpam_parse_chain(pam_handle_t *pamh,
 	this = NULL;
 	name = NULL;
 	lineno = 0;
+	serrno = 0;
 	while ((line = openpam_readline(f, lineno, NULL)) != NULL) {
 		/* get service name if necessary */
 		if (style == pam_conf_style) {
@@ -425,9 +431,14 @@ openpam_parse_chain(pam_handle_t *pamh,
 goto fail;
 			}
 			ret = openpam_load_chain(pamh, name, fclt);
-			FREE(name);
-			if (ret != PAM_SUCCESS)
+			if (ret != PAM_SUCCESS || errno == ENOENT) {
+serrno = errno;
+openpam_log(PAM_LOG_ERROR, failed loading 
+	include for service %s in %s: %s,
+	name, filename, strerror(errno));
 goto fail;
+			}
+			FREE(name);
 			FREE(line);
 			continue;
 		}
@@ -477,9 +488,11 @@ openpam_parse_chain(pam_handle_t *pamh,
 
 		/* load module */
 		this-module = openpam_load_module(name);
-		FREE(name);
-		if (this-module == NULL)
+		if (this-module == NULL) {
+			serrno = (errno == ENOENT ? ENOEXEC : errno);
 			goto fail;
+		}
+		FREE(name);
 
 		/* hook it up */
 		for (next = pamh-chains[fclt]; *next != NULL;
@@ -496,6 +509,7 @@ openpam_parse_chain(pam_handle_t *pamh,
 	fclose(f);
 	return (PAM_SUCCESS);
 syserr:
+	serrno = errno;
 	openpam_log(PAM_LOG_ERROR, %s: %s, filename, strerror(errno));
 fail:
 	if (this  this-optc) {
@@ -507,6 +521,10 @@ fail:
 	FREE(line);
 	FREE(name);
 	fclose(f);
+	if (serrno == 0)
+		errno = EINVAL;
+	else
+		errno = serrno;
 	return (PAM_SYSTEM_ERR);
 }
 
@@ -534,7 +552,7 @@ openpam_load_chain(pam_handle_t *pamh,
 	const char **path;
 	char *filename;
 	size_t len;
-	int ret;
+	int ret, serrno;
 
 	/* don't allow to escape from policy_path */
 	if (strchr(service, '/')) {
@@ -542,6 +560,7 @@ openpam_load_chain(pam_handle_t *pamh,
 		return (-PAM_SYSTEM_ERR);
 	}
 
+	ret = PAM_SYSTEM_ERR; /* shut up compiler stupidity */
 	for (path = openpam_policy_path; *path != NULL; ++path) {
 		len = strlen(*path);
 		if ((*path)[len - 1] == '/') {
@@ -552,11 +571,19 @@ openpam_load_chain(pam_handle_t *pamh,
 			}
 			ret = openpam_parse_chain(pamh, service, facility,
 			filename, pam_d_style);
+			serrno = errno;
 			FREE(filename);
+			errno = serrno;
 		} else {
 			ret = openpam_parse_chain(pamh, service, facility,
 			*path, pam_conf_style);
 		}
+
+		/* If /etc/pam.d/ exists, /etc/pam.conf will be ignored */
+		if (ret == PAM_SUCCESS  errno != ENOENT)
+			return (PAM_SUCCESS);
+
+		/* If we had a definitive error, bail out immediately */
 		if (ret != PAM_SUCCESS)
 			return (ret);
 	}



CVS commit: [netbsd-6-1] src/doc

2014-06-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jun 18 02:15:51 UTC 2014

Modified Files:
src/doc [netbsd-6-1]: CHANGES-6.1.5

Log Message:
Ticket 1076.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.9 -r1.1.2.10 src/doc/CHANGES-6.1.5

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/CHANGES-6.1.5
diff -u src/doc/CHANGES-6.1.5:1.1.2.9 src/doc/CHANGES-6.1.5:1.1.2.10
--- src/doc/CHANGES-6.1.5:1.1.2.9	Fri Jun  6 05:33:38 2014
+++ src/doc/CHANGES-6.1.5	Wed Jun 18 02:15:51 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1.5,v 1.1.2.9 2014/06/06 05:33:38 msaitoh Exp $
+# $NetBSD: CHANGES-6.1.5,v 1.1.2.10 2014/06/18 02:15:51 msaitoh Exp $
 
 A complete list of changes from the NetBSD 6.1.4 release to the NetBSD 6.1.5
 release:
@@ -590,3 +590,12 @@ crypto/external/bsd/openssl/lib/libcrypt
 	CVE-2014-0195, CVE-2014-3470 and fix some double free.
 	Avoid NULL dereference. (FreeBSD SA14:10).
 	[christos, ticket #1078]
+
+src/external/bsd/openpam/dist/lib/openpam_configure.c 1.8 via patch
+
+	CVE-2014-3879: Incorrect error handling in PAM policy parser:
+	Missing module files were treated as soft failures leading to
+	unexpected behavior if policy files were copied between hosts with
+	differently installed modules or in the short period during upgrades
+	when module files were being replaced.
+	[christos, ticket #1076]



CVS commit: [netbsd-6-0] src/external/bsd/openpam/dist/lib

2014-06-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jun 18 02:19:29 UTC 2014

Modified Files:
src/external/bsd/openpam/dist/lib [netbsd-6-0]: openpam_configure.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1076):
src/external/bsd/openpam/dist/lib/openpam_configure.c 1.8 via patch

CVE-2014-3879: Incorrect error handling in PAM policy parser:
Missing module files were treated as soft failures leading to
unexpected behavior if policy files were copied between hosts with
differently installed modules or in the short period during upgrades
when module files were being replaced.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.10.1 \
src/external/bsd/openpam/dist/lib/openpam_configure.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/openpam/dist/lib/openpam_configure.c
diff -u src/external/bsd/openpam/dist/lib/openpam_configure.c:1.4 src/external/bsd/openpam/dist/lib/openpam_configure.c:1.4.10.1
--- src/external/bsd/openpam/dist/lib/openpam_configure.c:1.4	Tue Jan  3 18:56:49 2012
+++ src/external/bsd/openpam/dist/lib/openpam_configure.c	Wed Jun 18 02:19:29 2014
@@ -1,8 +1,8 @@
-/*	$NetBSD: openpam_configure.c,v 1.4 2012/01/03 18:56:49 christos Exp $	*/
+/*	$NetBSD: openpam_configure.c,v 1.4.10.1 2014/06/18 02:19:29 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2001-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2011 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2014 Dag-Erling Smørgrav
  * All rights reserved.
  *
  * This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -365,12 +365,17 @@ openpam_parse_chain(pam_handle_t *pamh,
 	char *line, *str, *name;
 	char *option, **optv;
 	size_t len;
-	int lineno, ret;
+	int lineno, ret, serrno;
 	FILE *f;
 
+	if (errno == ENOENT)
+		errno = 0;
+
 	if ((f = fopen(filename, r)) == NULL) {
+		serrno = errno;
 		openpam_log(errno == ENOENT ? PAM_LOG_DEBUG : PAM_LOG_NOTICE,
 		%s: %s, filename, strerror(errno));
+		errno = serrno;
 		return (PAM_SUCCESS);
 	}
 	if (openpam_check_desc_owner_perms(filename, fileno(f)) != 0) {
@@ -380,6 +385,7 @@ openpam_parse_chain(pam_handle_t *pamh,
 	this = NULL;
 	name = NULL;
 	lineno = 0;
+	serrno = 0;
 	while ((line = openpam_readline(f, lineno, NULL)) != NULL) {
 		/* get service name if necessary */
 		if (style == pam_conf_style) {
@@ -425,9 +431,14 @@ openpam_parse_chain(pam_handle_t *pamh,
 goto fail;
 			}
 			ret = openpam_load_chain(pamh, name, fclt);
-			FREE(name);
-			if (ret != PAM_SUCCESS)
+			if (ret != PAM_SUCCESS || errno == ENOENT) {
+serrno = errno;
+openpam_log(PAM_LOG_ERROR, failed loading 
+	include for service %s in %s: %s,
+	name, filename, strerror(errno));
 goto fail;
+			}
+			FREE(name);
 			FREE(line);
 			continue;
 		}
@@ -477,9 +488,11 @@ openpam_parse_chain(pam_handle_t *pamh,
 
 		/* load module */
 		this-module = openpam_load_module(name);
-		FREE(name);
-		if (this-module == NULL)
+		if (this-module == NULL) {
+			serrno = (errno == ENOENT ? ENOEXEC : errno);
 			goto fail;
+		}
+		FREE(name);
 
 		/* hook it up */
 		for (next = pamh-chains[fclt]; *next != NULL;
@@ -496,6 +509,7 @@ openpam_parse_chain(pam_handle_t *pamh,
 	fclose(f);
 	return (PAM_SUCCESS);
 syserr:
+	serrno = errno;
 	openpam_log(PAM_LOG_ERROR, %s: %s, filename, strerror(errno));
 fail:
 	if (this  this-optc) {
@@ -507,6 +521,10 @@ fail:
 	FREE(line);
 	FREE(name);
 	fclose(f);
+	if (serrno == 0)
+		errno = EINVAL;
+	else
+		errno = serrno;
 	return (PAM_SYSTEM_ERR);
 }
 
@@ -534,7 +552,7 @@ openpam_load_chain(pam_handle_t *pamh,
 	const char **path;
 	char *filename;
 	size_t len;
-	int ret;
+	int ret, serrno;
 
 	/* don't allow to escape from policy_path */
 	if (strchr(service, '/')) {
@@ -542,6 +560,7 @@ openpam_load_chain(pam_handle_t *pamh,
 		return (-PAM_SYSTEM_ERR);
 	}
 
+	ret = PAM_SYSTEM_ERR; /* shut up compiler stupidity */
 	for (path = openpam_policy_path; *path != NULL; ++path) {
 		len = strlen(*path);
 		if ((*path)[len - 1] == '/') {
@@ -552,11 +571,19 @@ openpam_load_chain(pam_handle_t *pamh,
 			}
 			ret = openpam_parse_chain(pamh, service, facility,
 			filename, pam_d_style);
+			serrno = errno;
 			FREE(filename);
+			errno = serrno;
 		} else {
 			ret = openpam_parse_chain(pamh, service, facility,
 			*path, pam_conf_style);
 		}
+
+		/* If /etc/pam.d/ exists, /etc/pam.conf will be ignored */
+		if (ret == PAM_SUCCESS  errno != ENOENT)
+			return (PAM_SUCCESS);
+
+		/* If we had a definitive error, bail out immediately */
 		if (ret != PAM_SUCCESS)
 			return (ret);
 	}



CVS commit: [netbsd-6-0] src/doc

2014-06-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jun 18 02:20:05 UTC 2014

Modified Files:
src/doc [netbsd-6-0]: CHANGES-6.0.6

Log Message:
Ticket 1076.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.9 -r1.1.2.10 src/doc/CHANGES-6.0.6

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/CHANGES-6.0.6
diff -u src/doc/CHANGES-6.0.6:1.1.2.9 src/doc/CHANGES-6.0.6:1.1.2.10
--- src/doc/CHANGES-6.0.6:1.1.2.9	Fri Jun  6 05:36:43 2014
+++ src/doc/CHANGES-6.0.6	Wed Jun 18 02:20:05 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0.6,v 1.1.2.9 2014/06/06 05:36:43 msaitoh Exp $
+# $NetBSD: CHANGES-6.0.6,v 1.1.2.10 2014/06/18 02:20:05 msaitoh Exp $
 
 A complete list of changes from the NetBSD 6.0.5 release to the NetBSD 6.0.6
 release:
@@ -590,3 +590,12 @@ crypto/external/bsd/openssl/lib/libcrypt
 	CVE-2014-0195, CVE-2014-3470 and fix some double free.
 	Avoid NULL dereference. (FreeBSD SA14:10).
 	[christos, ticket #1078]
+
+src/external/bsd/openpam/dist/lib/openpam_configure.c 1.8 via patch
+
+	CVE-2014-3879: Incorrect error handling in PAM policy parser:
+	Missing module files were treated as soft failures leading to
+	unexpected behavior if policy files were copied between hosts with
+	differently installed modules or in the short period during upgrades
+	when module files were being replaced.
+	[christos, ticket #1076]



CVS commit: src/sys/dev/sbus

2014-06-17 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Jun 18 04:54:09 UTC 2014

Modified Files:
src/sys/dev/sbus: tcx.c

Log Message:
8bit tcx doesn't implement a hardware cursor, so don't pretend it does.
Also, avoid poking the hw cursor registers in that case. Real hardware doesn't
care but qemu does.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/dev/sbus/tcx.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/sbus/tcx.c
diff -u src/sys/dev/sbus/tcx.c:1.50 src/sys/dev/sbus/tcx.c:1.51
--- src/sys/dev/sbus/tcx.c:1.50	Tue Jun 17 14:25:17 2014
+++ src/sys/dev/sbus/tcx.c	Wed Jun 18 04:54:09 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcx.c,v 1.50 2014/06/17 14:25:17 macallan Exp $ */
+/*	$NetBSD: tcx.c,v 1.51 2014/06/18 04:54:09 macallan Exp $ */
 
 /*
  *  Copyright (c) 1996, 1998, 2009 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tcx.c,v 1.50 2014/06/17 14:25:17 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: tcx.c,v 1.51 2014/06/18 04:54:09 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -378,7 +378,9 @@ tcxattach(device_t parent, device_t self
 	}
 	tcx_loadcmap(sc, 0, 256);
 
-	tcx_set_cursor(sc);
+	if (!sc-sc_8bit)
+	tcx_set_cursor(sc);
+
 	/* enable video */
 	confreg = bus_space_read_4(sa-sa_bustag, sc-sc_thc, THC_MISC);
 	confreg |= THC_MISC_VIDEN;
@@ -755,8 +757,12 @@ tcx_ioctl(void *v, void *vs, u_long cmd,
 		tcx_clearscreen(sc, 3);
 }
 			}
+			return 0;
+
 		case WSDISPLAYIO_GCURPOS:
-			{
+			if (sc-sc_8bit) {
+return EOPNOTSUPP;
+			} else {
 struct wsdisplay_curpos *cp = (void *)data;
 
 cp-x = sc-sc_cursor_x;
@@ -765,7 +771,9 @@ tcx_ioctl(void *v, void *vs, u_long cmd,
 			return 0;
 
 		case WSDISPLAYIO_SCURPOS:
-			{
+			if (sc-sc_8bit) {
+return EOPNOTSUPP;
+			} else {
 struct wsdisplay_curpos *cp = (void *)data;
 
 sc-sc_cursor_x = cp-x;
@@ -775,7 +783,9 @@ tcx_ioctl(void *v, void *vs, u_long cmd,
 			return 0;
 
 		case WSDISPLAYIO_GCURMAX:
-			{
+			if (sc-sc_8bit) {
+return EOPNOTSUPP;
+			} else {
 struct wsdisplay_curpos *cp = (void *)data;
 
 cp-x = 32;
@@ -784,7 +794,9 @@ tcx_ioctl(void *v, void *vs, u_long cmd,
 			return 0;
 
 		case WSDISPLAYIO_SCURSOR:
-			{
+			if (sc-sc_8bit) {
+return EOPNOTSUPP;
+			} else {
 struct wsdisplay_cursor *cursor = (void *)data;
 
 return tcx_do_cursor(sc, cursor);
@@ -1074,6 +1086,10 @@ tcx_putchar(void *cookie, int row, int c
 static int
 tcx_do_cursor(struct tcx_softc *sc, struct wsdisplay_cursor *cur)
 {
+	if (sc-sc_8bit) {
+		/* hw cursor is not implemented on tcx */
+		return -1;
+	}
 	if (cur-which  WSDISPLAY_CURSOR_DOCUR) {
 
 		if (cur-enable) {



CVS commit: src

2014-06-17 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Tue Jun 17 06:31:47 UTC 2014

Modified Files:
src/lib/librumpuser: Makefile
src/sys/rump/include/rump: rumpuser.h
src/sys/rump/librump/rumpkern/arch/arm: Makefile.inc
Added Files:
src/lib/librumpuser: rumpuser_cache.c
src/sys/rump/librump/rumpkern/arch/arm: cpufunc.c

Log Message:
Implement rumpuser_sync_icache hypercall.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/lib/librumpuser/Makefile
cvs rdiff -u -r0 -r1.1 src/lib/librumpuser/rumpuser_cache.c
cvs rdiff -u -r1.111 -r1.112 src/sys/rump/include/rump/rumpuser.h
cvs rdiff -u -r1.2 -r1.3 src/sys/rump/librump/rumpkern/arch/arm/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/sys/rump/librump/rumpkern/arch/arm/cpufunc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib

2014-06-17 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Tue Jun 17 06:36:01 UTC 2014

Modified Files:
src/tests/lib/libbpfjit: Makefile
src/tests/lib/libsljit: Makefile

Log Message:
Link with -l${MACHINE_CPU}.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libbpfjit/Makefile
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libsljit/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2014-06-17 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Tue Jun 17 06:36:40 UTC 2014

Modified Files:
src/distrib/sets/lists/comp: ad.arm
src/sys/arch/arm/include: Makefile
src/sys/arch/evbarm/include: Makefile
src/sys/arch/hpcarm/include: Makefile
src/sys/arch/iyonix/include: Makefile
src/sys/arch/zaurus/include: Makefile
Added Files:
src/sys/arch/arm/include: sljitarch.h
src/sys/arch/evbarm/include: sljitarch.h
src/sys/arch/hpcarm/include: sljitarch.h
src/sys/arch/iyonix/include: sljitarch.h
src/sys/arch/zaurus/include: sljitarch.h

Log Message:
Add sljit support to arm.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/distrib/sets/lists/comp/ad.arm
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/arm/include/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/include/sljitarch.h
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/evbarm/include/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/arch/evbarm/include/sljitarch.h
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/hpcarm/include/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/arch/hpcarm/include/sljitarch.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/iyonix/include/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/arch/iyonix/include/sljitarch.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/zaurus/include/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/arch/zaurus/include/sljitarch.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librumpuser

2014-06-17 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Tue Jun 17 06:43:21 UTC 2014

Modified Files:
src/lib/librumpuser: rumpuser_pth_dummy.c

Log Message:
For consistency with other files in the same directory
don't include sys/cdefs.h before __RCSID.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/lib/librumpuser/rumpuser_pth_dummy.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/openpam/dist/lib

2014-06-17 Thread S.P.Zeidler
Module Name:src
Committed By:   spz
Date:   Tue Jun 17 07:08:47 UTC 2014

Modified Files:
src/external/bsd/openpam/dist/lib: openpam_configure.c

Log Message:
make sure we have a log message at the appropriate level (error) on
why pam is failing in the case of an included pam config file missing.

example: instead of logging with the default log settings:
Jun 17 08:49:37 tucana su: pam_start failed: system error
it will log:
Jun 17 08:55:49 tucana su: in openpam_parse_chain(): failed loading include for 
service gibbetnich in /etc/pam.d/su(15): No such file or directory
Jun 17 08:55:49 tucana su: pam_start failed: system error


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
src/external/bsd/openpam/dist/lib/openpam_configure.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librumpuser

2014-06-17 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Tue Jun 17 08:42:35 UTC 2014

Modified Files:
src/lib/librumpuser: Makefile

Log Message:
Antti objected to including rumpuser_sync_icache. Exclude it from the build.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/lib/librumpuser/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/librump/rumpkern/arch/arm

2014-06-17 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Tue Jun 17 08:50:49 UTC 2014

Modified Files:
src/sys/rump/librump/rumpkern/arch/arm: Makefile.inc

Log Message:
Antti objected to including rumpuser_sync_icache. Exclude it from the build.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/rump/librump/rumpkern/arch/arm/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/usb

2014-06-17 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Jun 17 09:35:46 UTC 2014

Modified Files:
src/sys/dev/usb: uhidev.c uhidev.h

Log Message:
PR/48908: Cannot open /dev/uhid? when another report id at the same uhidev
was already opened.

Restore the sc reference counting lost in usbmp merge.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/dev/usb/uhidev.c
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/usb/uhidev.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librumpuser

2014-06-17 Thread Justin Cormack
Module Name:src
Committed By:   justin
Date:   Tue Jun 17 09:53:59 UTC 2014

Modified Files:
src/lib/librumpuser: rumpuser_port.h

Log Message:
Applications are not supposed to and do not need to include features.h 
explicitly


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/lib/librumpuser/rumpuser_port.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/net

2014-06-17 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue Jun 17 10:39:46 UTC 2014

Modified Files:
src/sys/net: bridgestp.c if_bridge.c if_bridgevar.h if_ethersubr.c

Log Message:
Restructure ether_input and bridge_input

The network stack of NetBSD is well organized and
layered. A packet reception is processed from a
lower layer to an upper layer one by one. However,
ether_input and bridge_input are not structured so.
bridge_input is called inside ether_input.

The new structure replaces ifnet#if_input of a bridge
member with bridge_input when the member is attached.
So a packet goes straight on a packet reception via
a bridge, bridge_input = ether_input = ip_input.

The change is part of a patch of Lloyd Parkes submitted
in PR 48104. Unlike the patch, the change doesn't
intend to change the behavior of the packet processing.
Another patch will fix PR 48104.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/net/bridgestp.c
cvs rdiff -u -r1.80 -r1.81 src/sys/net/if_bridge.c
cvs rdiff -u -r1.17 -r1.18 src/sys/net/if_bridgevar.h
cvs rdiff -u -r1.200 -r1.201 src/sys/net/if_ethersubr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sbus

2014-06-17 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Jun 17 10:47:27 UTC 2014

Modified Files:
src/sys/dev/sbus: tcx.c

Log Message:
remove last remnants of CG8 emulation


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/dev/sbus/tcx.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/union

2014-06-17 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Tue Jun 17 12:38:12 UTC 2014

Modified Files:
src/sys/fs/union: union_subr.c

Log Message:
Unlock directory vnode after VOP_CREATE.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/fs/union/union_subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sbus

2014-06-17 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Jun 17 14:25:17 UTC 2014

Modified Files:
src/sys/dev/sbus: tcx.c

Log Message:
fix a few 8bit tcx issues:
- set ROP when clearing the screen, tcx actually uses it
- deal with possible 2MB VRAM tcx
while there, consistently use aprint_* in tcxattach()


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/dev/sbus/tcx.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS import: src/sys/external/bsd/sljit/dist

2014-06-17 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Tue Jun 17 15:37:44 UTC 2014

Update of /cvsroot/src/sys/external/bsd/sljit/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv17842

Log Message:
Import sljit 0.91 (svn r257).

The changes since the last import are:

r257: Add missing ADJUST_LOCAL_OFFSET for ARM64.
r256: Move incorrectly placed array definitions.
r255: More work on testing environment.
r254: Refactor test default output.
r253: Pass entry adress in r12 on PPC-LE.
r252: Optimize calls on MIPS-64.
r251: Several minor fixes.
r250: Add missing SLJIT_IS_FPU_AVAILABLE checks and reorder U and S flags.
r249: Optimize jumps on ARM-64.
r248: Optimize jumps on PowerPC.
r247: MIPS64 support is mostly finished.
r246: MIPS arithmetic.
r245: Start working on MIPS64.
r244: Uniform names for TILE-Gx.
r243: Uniform the names of ARM compilers.
r242: Change ll to l on x86 and rename some instructions on ARM-64.
r241: Improved memory access in PPC and reordering the parameter type flags.
r240: Prepare for more registers on ARM-Thumb2 and renaming TMP_REGISTER to 
TMP_REG1 on x86.
r239: Prepare for more registers on ARMv5.
r238: Prepare for more registers on TILE-Gx.
r237: Prepare for more registers on MIPS and SPARC.
r236: Prepare for more registers on PPC.
r235: Prepare for more registers on x86.
r234: Most tests are pass on ARM-64 now.
r233: Around 25 test cases are now pass on ARM-64.
r232: More progress on ARM-64 and Thumb2 refactoring.
r231: Some progress an ARM-64 and ARM-T2 refactoring.
r230: Thumb2 code refactoring.
r229: Start working on ARM-64.
r228: Little endian PowerPC systems are supported now by the JIT compiler.
r227: TileGX architecture is now supported. Patch made by Jiong Wang.
r226: Cache flush for android. Patch by  Giuseppe D'Angelo.
r225: Add support for forcibly freeing unused executable memory. Inspired by 
Carsten Klein.
r224: Few typo fixes.
r223: Reorder madvise and posix_madvise.
r222: The missing sljit_get_float_register_index function is added.
r221: Remove an invalid shift on ARM.
r220: JIT compiler now supports 32 bit Macs thanks to Lawrence Velazquez.
r219: Better code size statistics.
r218: Improvements for x86 and LIR dump.
r217: ICC and SunPro C fixes
r216: A new file for tracking internal changes are added.
r215: Less GNU dependnet Makefile and Intel style assemby for x86-64 systems.
r214: Switch from stdcall to cdecl in x86-32.
r213: Upstreaming minor fixes. Thanks for Daniel Richard G.
r212: Documentation update and a fix for a locking issue.
r211: Renaming temporaries to scratches to match the new name of the register. 
Does not affect compatibility.
r210: Improving assertions.
r209: Port sljit to SunPro C compiler. Patch by Daniel Richard G.
r208: SLJIT_TEMPORARY_REGx registers are renamed to SLJIT_SCRATCH_REGx.
r207: Removing unused checks.
r206: Optimizations for arm.
r205: Some optimizations on powerpc, mips and sparc.
r204: Rename sljit_emit_cond_value to sljit_emit_op_flags.
r203: Small x86 optimization.
r202: Finish cond_value with AND and INT_OP.
r201: More x86 fixes and improvements.
r200: Rename buf and code to inst.
r199: Replacing constants with instruction names in x86. Greatly improves 
maintainability.
r198: Only xmm0-xmm5 is volatile on Win64, so xmm6 must be saved.
r197: PowerPC shift right always modifies the carry flag. We may need to 
restore it.
r196: Rename SLJIT_F* functions to SLJIT_*D
r195: SLJIT_INT_OP works in the same way as SLJIT_SINGLE_OP: the input register 
arguments must be generated by the output of another instruction with 
SLJIT_INT_OP flag
r194: Renaming sljit_w to sljit_sw, sljit_i to sljit_si, sljit_h to sljit_sh, 
and sljit_b to sljit_sb.
r193: ARM single precision support.
r192: Single precision support added for ppc, mips and sparc.
r191: Add single precision support. Only works on x86 now.
r190: Relace C types with sljit types. No functionality change.
r189: Change 0 to NULL for mmap.
r188: Support environments where MAP_ANON is not available.
r187: Adding type descriptors for pointers and doubles (preparing for x32 ABIs 
and single precision support).

Status:

Vendor Tag: TNF
Release Tags:   SLJIT-r257

N src/sys/external/bsd/sljit/dist/API_CHANGES
N src/sys/external/bsd/sljit/dist/INTERNAL_CHANGES
U src/sys/external/bsd/sljit/dist/Makefile
U src/sys/external/bsd/sljit/dist/README
U src/sys/external/bsd/sljit/dist/regex_src/regexMain.c
U src/sys/external/bsd/sljit/dist/regex_src/regexJIT.c
U src/sys/external/bsd/sljit/dist/regex_src/regexJIT.h
C src/sys/external/bsd/sljit/dist/test_src/sljitTest.c
C src/sys/external/bsd/sljit/dist/test_src/sljitMain.c
U src/sys/external/bsd/sljit/dist/sljit_src/sljitLir.h
U src/sys/external/bsd/sljit/dist/sljit_src/sljitNativePPC_32.c
C src/sys/external/bsd/sljit/dist/sljit_src/sljitUtils.c
N src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_32.c
C src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_32.c
C 

CVS commit: src/usr.bin/sed

2014-06-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jun 17 16:39:02 UTC 2014

Modified Files:
src/usr.bin/sed: main.c sed.1

Log Message:
add -u (unbuffered output) after GNU sed.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/usr.bin/sed/main.c
cvs rdiff -u -r1.34 -r1.35 src/usr.bin/sed/sed.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/sljit/dist

2014-06-17 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Tue Jun 17 16:48:24 UTC 2014

Modified Files:
src/sys/external/bsd/sljit/dist/sljit_src: sljitConfig.h
sljitConfigInternal.h sljitExecAllocator.c sljitLir.c
sljitNativePPC_common.c sljitNativeX86_32.c sljitNativeX86_common.c
sljitUtils.c
src/sys/external/bsd/sljit/dist/test_src: sljitMain.c sljitTest.c
Removed Files:
src/sys/external/bsd/sljit/dist/sljit_src: sljitNativeARM_Thumb2.c
sljitNativeARM_v5.c

Log Message:
Resolve conflicts.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 \
src/sys/external/bsd/sljit/dist/sljit_src/sljitConfig.h
cvs rdiff -u -r1.6 -r1.7 \
src/sys/external/bsd/sljit/dist/sljit_src/sljitConfigInternal.h
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/bsd/sljit/dist/sljit_src/sljitExecAllocator.c \
src/sys/external/bsd/sljit/dist/sljit_src/sljitLir.c \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativePPC_common.c \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_32.c
cvs rdiff -u -r1.1.1.3 -r0 \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_Thumb2.c \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_v5.c
cvs rdiff -u -r1.4 -r1.5 \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_common.c
cvs rdiff -u -r1.5 -r1.6 \
src/sys/external/bsd/sljit/dist/sljit_src/sljitUtils.c
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/sljit/dist/test_src/sljitMain.c \
src/sys/external/bsd/sljit/dist/test_src/sljitTest.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/net

2014-06-17 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Tue Jun 17 16:52:33 UTC 2014

Modified Files:
src/sys/net: bpfjit.c

Log Message:
Update code to the latest sljit version.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/net/bpfjit.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/sljit

2014-06-17 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Tue Jun 17 16:49:11 UTC 2014

Modified Files:
src/sys/external/bsd/sljit: README.import

Log Message:
New sljit version is r257.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/sljit/README.import

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/sljit/dist/sljit_src

2014-06-17 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Tue Jun 17 17:30:48 UTC 2014

Modified Files:
src/sys/external/bsd/sljit/dist/sljit_src: sljitConfigInternal.h

Log Message:
Don't redefine SLJIT_HALT_PROCESS().


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
src/sys/external/bsd/sljit/dist/sljit_src/sljitConfigInternal.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci

2014-06-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jun 17 17:37:08 UTC 2014

Modified Files:
src/sys/dev/pci: if_bge.c if_bgereg.h

Log Message:
- Print yet another hardware config word in SRAM(BGE_SRAM_DATA_CFG_5) for
  BCM5717 and newer devices.
- Fix a trivial bug in #ifdef NOTYET.


To generate a diff of this commit:
cvs rdiff -u -r1.266 -r1.267 src/sys/dev/pci/if_bge.c
cvs rdiff -u -r1.87 -r1.88 src/sys/dev/pci/if_bgereg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci

2014-06-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jun 17 18:18:51 UTC 2014

Modified Files:
src/sys/dev/pci: if_bge.c

Log Message:
Fix a variable name in last commit.


To generate a diff of this commit:
cvs rdiff -u -r1.267 -r1.268 src/sys/dev/pci/if_bge.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/doc

2014-06-17 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Tue Jun 17 18:48:35 UTC 2014

Modified Files:
src/doc: 3RDPARTY

Log Message:
Update sljit entry.


To generate a diff of this commit:
cvs rdiff -u -r1.1123 -r1.1124 src/doc/3RDPARTY

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib

2014-06-17 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Tue Jun 17 19:26:18 UTC 2014

Modified Files:
src/tests/lib/libbpfjit: Makefile
src/tests/lib/libsljit: Makefile

Log Message:
libarch on sparc isn't -l${MACHINE_CPU}. Don't link to it.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libbpfjit/Makefile
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libsljit/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/sljit/dist/sljit_src

2014-06-17 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Tue Jun 17 19:33:20 UTC 2014

Modified Files:
src/sys/external/bsd/sljit/dist/sljit_src: sljitExecAllocator.c
sljitLir.c sljitNativeARM_32.c sljitNativeARM_64.c
sljitNativeARM_T2_32.c sljitNativeMIPS_32.c sljitNativeMIPS_64.c
sljitNativeMIPS_common.c sljitNativePPC_32.c sljitNativePPC_64.c
sljitNativePPC_common.c sljitNativeSPARC_32.c
sljitNativeSPARC_common.c sljitNativeTILEGX-encoder.c
sljitNativeTILEGX_64.c sljitNativeX86_32.c sljitNativeX86_64.c
sljitNativeX86_common.c sljitUtils.c

Log Message:
Add $NetBSD$.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/bsd/sljit/dist/sljit_src/sljitExecAllocator.c \
src/sys/external/bsd/sljit/dist/sljit_src/sljitLir.c \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativePPC_common.c \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_32.c
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_32.c \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_64.c \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_T2_32.c \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeMIPS_64.c \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeTILEGX-encoder.c \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeTILEGX_64.c
cvs rdiff -u -r1.1.1.3 -r1.2 \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeMIPS_32.c \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativePPC_32.c \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativePPC_64.c \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_64.c
cvs rdiff -u -r1.1.1.4 -r1.2 \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeMIPS_common.c
cvs rdiff -u -r1.1.1.2 -r1.2 \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeSPARC_32.c \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeSPARC_common.c
cvs rdiff -u -r1.5 -r1.6 \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_common.c
cvs rdiff -u -r1.6 -r1.7 \
src/sys/external/bsd/sljit/dist/sljit_src/sljitUtils.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/sljit/dist/sljit_src

2014-06-17 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Tue Jun 17 19:36:45 UTC 2014

Modified Files:
src/sys/external/bsd/sljit/dist/sljit_src: sljitConfig.h
sljitConfigInternal.h sljitLir.h

Log Message:
Add $NetBSD$.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
src/sys/external/bsd/sljit/dist/sljit_src/sljitConfig.h
cvs rdiff -u -r1.8 -r1.9 \
src/sys/external/bsd/sljit/dist/sljit_src/sljitConfigInternal.h
cvs rdiff -u -r1.1.1.3 -r1.2 \
src/sys/external/bsd/sljit/dist/sljit_src/sljitLir.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/sljit/dist/test_src

2014-06-17 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Tue Jun 17 19:37:03 UTC 2014

Modified Files:
src/sys/external/bsd/sljit/dist/test_src: sljitMain.c sljitTest.c

Log Message:
Add $NetBSD$.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/sljit/dist/test_src/sljitMain.c \
src/sys/external/bsd/sljit/dist/test_src/sljitTest.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev

2014-06-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jun 17 21:37:20 UTC 2014

Modified Files:
src/sys/dev/mii: brgphy.c brgphyreg.h
src/sys/dev/pci: if_bge.c if_bnx.c if_bnxreg.h

Log Message:
- Fix detection of BGEPHYF_FIBER_{MII|TBI}
- Add BCM5708S support in brgphy(4). The auto negotiation may have some bugs.
- Add 2500SX support (not tested).
- Fix bit definition of BRGPHY_MRBE_MSG_PG5_NP_T2 from FreeBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/sys/dev/mii/brgphy.c
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/mii/brgphyreg.h
cvs rdiff -u -r1.268 -r1.269 src/sys/dev/pci/if_bge.c
cvs rdiff -u -r1.52 -r1.53 src/sys/dev/pci/if_bnx.c
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/pci/if_bnxreg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci

2014-06-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jun 17 22:29:13 UTC 2014

Modified Files:
src/sys/dev/pci: if_bge.c

Log Message:
Add BGEPHYF_NO_WIRESPEED flag for fiber devices.


To generate a diff of this commit:
cvs rdiff -u -r1.269 -r1.270 src/sys/dev/pci/if_bge.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/net

2014-06-17 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Jun 18 01:19:19 UTC 2014

Modified Files:
src/sys/net: bridgestp.c

Log Message:
Make local functions static

This change unveiled some functions are unused. Remove some and
comment out the others.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/net/bridgestp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/external/bsd/openpam/dist/lib

2014-06-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jun 18 02:03:26 UTC 2014

Modified Files:
src/external/bsd/openpam/dist/lib [netbsd-6]: openpam_configure.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1076):
src/external/bsd/openpam/dist/lib/openpam_configure.c 1.8 via patch

CVE-2014-3879: Incorrect error handling in PAM policy parser:
Missing module files were treated as soft failures leading to
unexpected behavior if policy files were copied between hosts with
differently installed modules or in the short period during upgrades
when module files were being replaced.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.2.1 \
src/external/bsd/openpam/dist/lib/openpam_configure.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/doc

2014-06-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jun 18 02:03:46 UTC 2014

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Ticket 1076.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.118 -r1.1.2.119 src/doc/CHANGES-6.2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6-1] src/external/bsd/openpam/dist/lib

2014-06-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jun 18 02:15:27 UTC 2014

Modified Files:
src/external/bsd/openpam/dist/lib [netbsd-6-1]: openpam_configure.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1076):
src/external/bsd/openpam/dist/lib/openpam_configure.c 1.8 via patch

CVE-2014-3879: Incorrect error handling in PAM policy parser:
Missing module files were treated as soft failures leading to
unexpected behavior if policy files were copied between hosts with
differently installed modules or in the short period during upgrades
when module files were being replaced.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.16.1 \
src/external/bsd/openpam/dist/lib/openpam_configure.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6-1] src/doc

2014-06-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jun 18 02:15:51 UTC 2014

Modified Files:
src/doc [netbsd-6-1]: CHANGES-6.1.5

Log Message:
Ticket 1076.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.9 -r1.1.2.10 src/doc/CHANGES-6.1.5

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6-0] src/external/bsd/openpam/dist/lib

2014-06-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jun 18 02:19:29 UTC 2014

Modified Files:
src/external/bsd/openpam/dist/lib [netbsd-6-0]: openpam_configure.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1076):
src/external/bsd/openpam/dist/lib/openpam_configure.c 1.8 via patch

CVE-2014-3879: Incorrect error handling in PAM policy parser:
Missing module files were treated as soft failures leading to
unexpected behavior if policy files were copied between hosts with
differently installed modules or in the short period during upgrades
when module files were being replaced.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.10.1 \
src/external/bsd/openpam/dist/lib/openpam_configure.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6-0] src/doc

2014-06-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jun 18 02:20:05 UTC 2014

Modified Files:
src/doc [netbsd-6-0]: CHANGES-6.0.6

Log Message:
Ticket 1076.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.9 -r1.1.2.10 src/doc/CHANGES-6.0.6

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sbus

2014-06-17 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Jun 18 04:54:09 UTC 2014

Modified Files:
src/sys/dev/sbus: tcx.c

Log Message:
8bit tcx doesn't implement a hardware cursor, so don't pretend it does.
Also, avoid poking the hw cursor registers in that case. Real hardware doesn't
care but qemu does.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/dev/sbus/tcx.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.