daily CVS update output

2016-11-18 Thread NetBSD source update

Updating src tree:
P src/distrib/sets/lists/debug/mi
P src/distrib/sets/lists/tests/mi
P src/etc/rc.d/rtadvd
P src/external/gpl3/gdb/dist/gdb/alphanbsd-tdep.c
P src/external/gpl3/gdb/dist/gdb/armnbsd-tdep.c
P src/external/gpl3/gdb/dist/gdb/configure.tgt
P src/external/gpl3/gdb/dist/gdb/nbsd-tdep.c
P src/external/gpl3/gdb/dist/gdb/nbsd-tdep.h
P src/external/gpl3/gdb/lib/libgdb/arch/arm/defs.mk
P src/external/gpl3/gdb/lib/libgdb/arch/armeb/defs.mk
P src/share/man/man9/bufq.9
P src/sys/arch/mips/mips/spl.S
P src/sys/dev/pci/if_wm.c
P src/sys/fs/nfs/files.newnfs
P src/sys/fs/nfs/client/nfs.h
P src/sys/fs/nfs/client/nfs_clbio.c
P src/sys/fs/nfs/client/nfs_clcomsubs.c
U src/sys/fs/nfs/client/nfs_clkdtrace.c
U src/sys/fs/nfs/client/nfs_clmodule.c
P src/sys/fs/nfs/client/nfs_clnode.c
P src/sys/fs/nfs/client/nfs_clport.c
P src/sys/fs/nfs/client/nfs_clrpcops.c
P src/sys/fs/nfs/client/nfs_clstate.c
P src/sys/fs/nfs/client/nfs_clsubs.c
P src/sys/fs/nfs/client/nfs_clvfsops.c
P src/sys/fs/nfs/client/nfs_clvnops.c
P src/sys/fs/nfs/client/nfs_kdtrace.h
P src/sys/fs/nfs/client/nfsmount.h
P src/sys/fs/nfs/client/nfsnode.h
P src/sys/fs/nfs/common/bootp_subr.c
P src/sys/fs/nfs/common/krpc_subr.c
P src/sys/fs/nfs/common/nfs.h
P src/sys/fs/nfs/common/nfs_commonacl.c
P src/sys/fs/nfs/common/nfs_commonkrpc.c
P src/sys/fs/nfs/common/nfs_commonport.c
P src/sys/fs/nfs/common/nfs_commonsubs.c
P src/sys/fs/nfs/common/nfs_diskless.c
P src/sys/fs/nfs/common/nfs_fha.c
P src/sys/fs/nfs/common/nfs_fha.h
P src/sys/fs/nfs/common/nfs_lock.c
U src/sys/fs/nfs/common/nfs_module.c
P src/sys/fs/nfs/common/nfs_nfssvc.c
P src/sys/fs/nfs/common/nfs_var.h
P src/sys/fs/nfs/common/nfsclstate.h
P src/sys/fs/nfs/common/nfsdport.h
P src/sys/fs/nfs/common/nfsm_subs.h
P src/sys/fs/nfs/common/nfsport.h
P src/sys/fs/nfs/common/nfsproto.h
P src/sys/fs/nfs/common/nfsrvcache.h
P src/sys/fs/nfs/common/nfsrvstate.h
P src/sys/fs/nfs/common/nfssvc.h
P src/sys/fs/nfs/nlm/nlm_advlock.c
P src/sys/fs/nfs/nlm/nlm_prot_impl.c
P src/sys/fs/nfs/server/nfs_fha_new.c
P src/sys/fs/nfs/server/nfs_nfsdcache.c
P src/sys/fs/nfs/server/nfs_nfsdkrpc.c
U src/sys/fs/nfs/server/nfs_nfsdmodule.c
P src/sys/fs/nfs/server/nfs_nfsdport.c
P src/sys/fs/nfs/server/nfs_nfsdserv.c
P src/sys/fs/nfs/server/nfs_nfsdsocket.c
P src/sys/fs/nfs/server/nfs_nfsdstate.c
P src/sys/fs/nfs/server/nfs_nfsdsubs.c
P src/sys/net/if_pppoe.c
P src/sys/net/if_spppsubr.c
P src/sys/netinet/in.c
P src/sys/netinet/in_var.h
P src/sys/netinet/tcp_usrreq.c
P src/sys/netinet/udp_usrreq.c
P src/sys/netinet6/dccp6_usrreq.c
P src/sys/netinet6/in6.c
P src/sys/netinet6/mld6.c
P src/sys/netinet6/raw_ip6.c
P src/sys/netinet6/sctp6_usrreq.c
P src/sys/netinet6/udp6_usrreq.c
P src/sys/sys/pslist.h
P src/tests/lib/libpthread_dbg/Makefile
U src/tests/lib/libpthread_dbg/h_common.h
P src/tests/lib/libpthread_dbg/t_dummy.c
U src/tests/lib/libpthread_dbg/t_threads.c
P src/usr.bin/at/at.1

Updating xsrc tree:


Killing core files:


Updating tar files:
src/top-level: collecting... replacing... done
src/bin: collecting... replacing... done
src/common: collecting... replacing... done
src/compat: collecting... replacing... done
src/crypto: collecting... replacing... done
src/dist: collecting... replacing... done
src/distrib: collecting... replacing... done
src/doc: collecting... replacing... done
src/etc: collecting... replacing... done
src/external: collecting... replacing... done
src/extsrc: collecting... replacing... done
src/games: collecting... replacing... done
src/gnu: collecting... replacing... done
src/include: collecting... replacing... done
src/lib: collecting... replacing... done
src/libexec: collecting... replacing... done
src/regress: collecting... replacing... done
src/rescue: collecting... replacing... done
src/sbin: collecting... replacing... done
src/share: collecting... replacing... done
src/sys: collecting... replacing... done
src/tests: collecting... replacing... done
src/tools: collecting... replacing... done
src/usr.bin: collecting... replacing... done
src/usr.sbin: collecting... replacing... done
src/config: collecting... replacing... done
src: collecting... replacing... done
xsrc/top-level: collecting... replacing... done
xsrc/external: collecting... replacing... done
xsrc/local: collecting... replacing... done
xsrc: collecting... replacing... done

Running the SUP scanner:
SUP Scan for current starting at Sat Nov 19 03:08:03 2016
SUP Scan for current completed at Sat Nov 19 03:08:23 2016
SUP Scan for mirror starting at Sat Nov 19 03:08:23 2016
SUP Scan for mirror completed at Sat Nov 19 03:10:19 2016



Updating release-6 src tree (netbsd-6):
P bin/sh/exec.c
P bin/sh/var.c
U doc/CHANGES-6.2
P sys/arch/alpha/alpha/machdep.c
P sys/arch/alpha/alpha/prom.c
P sys/arch/alpha/stand/common/booted_dev.c
P sys/arch/alpha/stand/common/prom.c
P usr.bin/ftp/fetch.c

Updating release-6 xsrc tree (netbsd-6):


Updating release-6 tar files:
src/top-level: collecting... replacing... done
src/bin: collecting... replacing... done
src/c

Re: fstat(2) fails on AF_LINK socket descriptor

2016-11-18 Thread Christos Zoulas
In article <20161118144721.ga25...@issan.sis.pasteur.fr>,
Nicolas Joly   wrote:
>-=-=-=-=-=-
>
>
>Hi,
>
>I have some code that tries to detect file type given a descriptor by
>using fstat(2) ... and do some specific stuff accordingly, and
>specifically for socket descriptors.
>
>It mostly works, except for AF_LINK socket descriptor where fstat(2)
>fails with EOPNOTSUPP. Like with the attached sample code.
>
>Looking at the code in src/sys/net/link_proto.c confirms that
>behavior :
>
>static int
>link_stat(struct socket *so, struct stat *ub)
>{
>KASSERT(solocked(so));
>
>return EOPNOTSUPP;
>}
>
>But this is an exception as all other stat functions returns 0 instead
>of EOPNOTSUPP.
>
>Any specific reason for this one ?

Nope, please fix it.

christos



Re: configure vlan-if jumbo mtu crashs kernel

2016-11-18 Thread Joerg Sonnenberger
On Fri, Nov 18, 2016 at 02:35:03PM +0100, 6b...@6bone.informatik.uni-leipzig.de 
wrote:
> in some networks we are working with jumbo mtu's. If I configure the mtu to
> the native interface all works fine.
> 
> ifconfig ixg1 mtu 9000 (no problem)
> 
> but
> 
> ifconfig vlan850 ip4csum tcp4csum udp4csum tcp6csum udp6csum ip4csum-tx
> ip4csum-rx tcp4csum-tx tcp4csum-rx udp4csum-tx udp4csum-rx tcp6csum-tx
> tcp6csum-rx udp6csum-tx udp6csum-rx tso4 tso6 mtu 9000

The attached patch should prevent the crash, does it?

Joerg
Index: if_vlan.c
===
RCS file: /home/joerg/repo/netbsd/src/sys/net/if_vlan.c,v
retrieving revision 1.70.2.3
diff -u -p -r1.70.2.3 if_vlan.c
--- if_vlan.c   23 Apr 2015 19:23:45 -  1.70.2.3
+++ if_vlan.c   18 Nov 2016 15:26:08 -
@@ -550,6 +550,10 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd
case SIOCSIFCAP:
ifcr = data;
/* make sure caps are enabled on parent */
+   if (ifv->ifv_p == NULL) {
+   error = EINVAL;
+   break;
+   }
if ((ifv->ifv_p->if_capenable & ifcr->ifcr_capenable) !=
ifcr->ifcr_capenable) {
error = EINVAL;


configure vlan-if jumbo mtu crashs kernel

2016-11-18 Thread 6bone

hello,

in some networks we are working with jumbo mtu's. If I configure the mtu 
to the native interface all works fine.


ifconfig ixg1 mtu 9000 (no problem)

but

ifconfig vlan850 ip4csum tcp4csum udp4csum tcp6csum udp6csum ip4csum-tx 
ip4csum-rx tcp4csum-tx tcp4csum-rx udp4csum-tx udp4csum-rx tcp6csum-tx 
tcp6csum-rx udp6csum-tx udp6csum-rx tso4 tso6 mtu 9000


results in a kernel crash (netbsd-7):

#0  0x806867df in cpu_reboot (howto=howto@entry=260,
bootstr=bootstr@entry=0x0) at /usr/src/sys/arch/amd64/amd64/machdep.c:671
#1  0x808cc214 in vpanic (fmt=fmt@entry=0x80dd44dd "trap",
ap=ap@entry=0xfe815af29a28) at /usr/src/sys/kern/subr_prf.c:340
#2  0x808cc2cf in panic (fmt=fmt@entry=0x80dd44dd "trap")
at /usr/src/sys/kern/subr_prf.c:256
#3  0x8091b531 in trap (frame=0xfe815af29b30)
at /usr/src/sys/arch/amd64/amd64/trap.c:298
#4  0x80100fde in alltraps ()
#5  0x804c62fb in vlan_ioctl (ifp=0xfe8a70fc2410, cmd=2149607797,
data=0xfe815af29df8) at /usr/src/sys/net/if_vlan.c:553
#6  0x803e88f5 in doifioctl (so=0xfe8bf6dfadb0, cmd=2149607797,
data=, l=0xfe88032ca560) at /usr/src/sys/net/if.c:1934
#7  0x808e9976 in soo_ioctl (fp=, cmd=2149607797,
data=0xfe815af29df8) at /usr/src/sys/kern/sys_socket.c:202
#8  0x808deb79 in sys_ioctl (l=,
uap=0xfe815af29f00, retval=)
at /usr/src/sys/kern/sys_generic.c:681
#9  0x808e9a7a in sy_call (rval=0xfe815af29eb8,
uap=0xfe815af29f00, l=0xfe88032ca560,
sy=0x810d2ba0 ) at /usr/src/sys/sys/syscallvar.h:61
#10 sy_invoke (code=54, rval=0xfe815af29eb8, uap=0xfe815af29f00,
l=0xfe88032ca560, sy=0x810d2ba0 )
at /usr/src/sys/sys/syscallvar.h:85
#11 syscall (frame=0xfe815af29f00)
at /usr/src/sys/arch/x86/x86/syscall.c:156
#12 0x80100691 in Xsyscall ()


Is is possible to get a patch so that I can use jumbo-frames with vlan 
interfaces?




Thank you for your efforts


Regards
Uwe



fstat(2) fails on AF_LINK socket descriptor

2016-11-18 Thread Nicolas Joly

Hi,

I have some code that tries to detect file type given a descriptor by
using fstat(2) ... and do some specific stuff accordingly, and
specifically for socket descriptors.

It mostly works, except for AF_LINK socket descriptor where fstat(2)
fails with EOPNOTSUPP. Like with the attached sample code.

Looking at the code in src/sys/net/link_proto.c confirms that
behavior :

static int
link_stat(struct socket *so, struct stat *ub)
{
KASSERT(solocked(so));

return EOPNOTSUPP;
}

But this is an exception as all other stat functions returns 0 instead
of EOPNOTSUPP.

Any specific reason for this one ?

Thanks.

-- 
Nicolas Joly

Cluster & Computing Group
Biology IT Center
Institut Pasteur, Paris.

#include 
#include 

#include 
#include 

int main() {
  int res, fd;
  struct stat st;

  fd = socket(AF_LINK, SOCK_DGRAM, 0);
  assert(fd != -1);
  res = fstat(fd, &st);
  assert(res != -1);
  assert(S_ISSOCK(st.st_mode) != 0);
  assert(close(fd) != -1);

  return 0; }