CVS commit: src/doc
Module Name:src Committed By: spz Date: Tue Jul 8 06:01:47 UTC 2014 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: note bind import To generate a diff of this commit: cvs rdiff -u -r1.1130 -r1.1131 src/doc/3RDPARTY cvs rdiff -u -r1.1941 -r1.1942 src/doc/CHANGES 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.1130 src/doc/3RDPARTY:1.1131 --- src/doc/3RDPARTY:1.1130 Sun Jul 6 20:14:08 2014 +++ src/doc/3RDPARTY Tue Jul 8 06:01:47 2014 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1130 2014/07/06 20:14:08 tron Exp $ +# $NetBSD: 3RDPARTY,v 1.1131 2014/07/08 06:01:47 spz Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -113,8 +113,8 @@ Notes: bc includes dc, both of which are in the NetBSD tree. Package: bind [named and utils] -Version: 9.10.0b1 -Current Vers: 9.10.0b1 +Version: 9.10.0-P2 +Current Vers: 9.10.0-P2 Maintainer: Paul Vixie vi...@vix.com Archive Site: ftp://ftp.isc.org/isc/bind9/ Home Page: http://www.isc.org/software/bind/ Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.1941 src/doc/CHANGES:1.1942 --- src/doc/CHANGES:1.1941 Sun Jul 6 20:14:08 2014 +++ src/doc/CHANGES Tue Jul 8 06:01:47 2014 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1941 $ +# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1942 $ # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -436,3 +436,4 @@ Changes from NetBSD 6.0 to NetBSD 7.0: pigz(1): Update to pigz-2.3.1 [tls 20140615] gdb(1): Updated to 7.7.1. [christos 20140622] postfix(1): Import version 2.11.1 [tron 20140706] + bind: Import version 9.10.0-P2 [spz 20140708]
CVS commit: src/etc/rc.d
Module Name:src Committed By: spz Date: Tue Jul 8 07:04:07 UTC 2014 Modified Files: src/etc/rc.d: named Log Message: create /etc/rndc.key on start if it doesn't already exist To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/etc/rc.d/named Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/rc.d/named diff -u src/etc/rc.d/named:1.23 src/etc/rc.d/named:1.24 --- src/etc/rc.d/named:1.23 Mon Oct 1 18:46:43 2012 +++ src/etc/rc.d/named Tue Jul 8 07:04:07 2014 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: named,v 1.23 2012/10/01 18:46:43 christos Exp $ +# $NetBSD: named,v 1.24 2014/07/08 07:04:07 spz Exp $ # # PROVIDE: named @@ -63,6 +63,11 @@ named_migrate() named_precmd() { + if [ ! -e /etc/rndc.key ]; then + echo Generating rndc.key + /usr/sbin/rndc-confgen -a + fi + if [ -z $named_chrootdir ]; then if [ ! -d /etc/namedb/keys ]; then mkdir -m 775 /etc/namedb/keys
CVS commit: src/external/bsd/bind/dist/lib/dns
Module Name:src Committed By: martin Date: Tue Jul 8 09:08:05 UTC 2014 Modified Files: src/external/bsd/bind/dist/lib/dns: rbt.c Log Message: Make it compilable: avoid void* arithmetic To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/external/bsd/bind/dist/lib/dns/rbt.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/bind/dist/lib/dns/rbt.c diff -u src/external/bsd/bind/dist/lib/dns/rbt.c:1.7 src/external/bsd/bind/dist/lib/dns/rbt.c:1.8 --- src/external/bsd/bind/dist/lib/dns/rbt.c:1.7 Tue Jul 8 05:43:39 2014 +++ src/external/bsd/bind/dist/lib/dns/rbt.c Tue Jul 8 09:08:05 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rbt.c,v 1.7 2014/07/08 05:43:39 spz Exp $ */ +/* $NetBSD: rbt.c,v 1.8 2014/07/08 09:08:05 martin Exp $ */ /* * Copyright (C) 2004, 2005, 2007-2009, 2011-2014 Internet Systems Consortium, Inc. (ISC) @@ -307,12 +307,13 @@ Name(dns_rbtnode_t *node) { static void printnodename(dns_rbtnode_t *node); static void -hexdump(const char *desc, void *data, size_t size) { +hexdump(const char *desc, void *blob, size_t size) { char hexdump[BUFSIZ * 2 + 1]; isc_buffer_t b; isc_region_t r; isc_result_t result; size_t bytes; + isc_uint8_t *data = blob; fprintf(stderr, %s: , desc); do {
CVS commit: src/sys/fs/msdosfs
Module Name:src Committed By: hannken Date: Tue Jul 8 09:21:52 UTC 2014 Modified Files: src/sys/fs/msdosfs: denode.h msdosfs_denode.c msdosfs_lookup.c msdosfs_vfsops.c msdosfs_vnops.c msdosfsmount.h Log Message: Change msdosfs from hashlist to vcache: - Use (dir_cluster, dir_offset, dir_generation) as key, where dir_generation is non-zero and unique for unlinked but open nodes. - Change deget() to return a vnode as it is unsafe to return a referenced but unlocked denode. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/fs/msdosfs/denode.h cvs rdiff -u -r1.49 -r1.50 src/sys/fs/msdosfs/msdosfs_denode.c cvs rdiff -u -r1.32 -r1.33 src/sys/fs/msdosfs/msdosfs_lookup.c cvs rdiff -u -r1.108 -r1.109 src/sys/fs/msdosfs/msdosfs_vfsops.c cvs rdiff -u -r1.89 -r1.90 src/sys/fs/msdosfs/msdosfs_vnops.c cvs rdiff -u -r1.19 -r1.20 src/sys/fs/msdosfs/msdosfsmount.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/fs/msdosfs/denode.h diff -u src/sys/fs/msdosfs/denode.h:1.23 src/sys/fs/msdosfs/denode.h:1.24 --- src/sys/fs/msdosfs/denode.h:1.23 Sat Jan 26 19:45:02 2013 +++ src/sys/fs/msdosfs/denode.h Tue Jul 8 09:21:52 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: denode.h,v 1.23 2013/01/26 19:45:02 christos Exp $ */ +/* $NetBSD: denode.h,v 1.24 2014/07/08 09:21:52 hannken Exp $ */ /*- * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank. @@ -153,15 +153,21 @@ struct fatcache { * This is the in memory variant of a dos directory entry. It is usually * contained within a vnode. */ +struct denode_key { + u_long dk_dirclust; /* cluster of the directory file containing this entry */ + u_long dk_diroffset; /* offset of this entry in the directory cluster */ + void *dk_dirgen; /* non zero and unique for unlinked nodes */ +}; struct denode { struct genfs_node de_gnode; - LIST_ENTRY(denode) de_hash; struct vnode *de_vnode; /* addr of vnode we are part of */ struct vnode *de_devvp; /* vnode of blk dev we live on */ u_long de_flag; /* flag bits */ dev_t de_dev; /* device where direntry lives */ - u_long de_dirclust; /* cluster of the directory file containing this entry */ - u_long de_diroffset; /* offset of this entry in the directory cluster */ + struct denode_key de_key; +#define de_dirclust de_key.dk_dirclust +#define de_diroffset de_key.dk_diroffset +#define de_dirgen de_key.dk_dirgen u_long de_fndoffset; /* offset of found dir entry */ int de_fndcnt; /* number of slots before de_fndoffset */ long de_refcnt; /* reference count */ @@ -303,7 +309,11 @@ int msdosfs_update(struct vnode *, const int createde(struct denode *, struct denode *, struct denode **, struct componentname *); int deextend(struct denode *, u_long, struct kauth_cred *); +#ifdef MAKEFS int deget(struct msdosfsmount *, u_long, u_long, struct denode **); +#else +int deget(struct msdosfsmount *, u_long, u_long, struct vnode **); +#endif int detrunc(struct denode *, u_long, int, struct kauth_cred *); int deupdat(struct denode *, int); int doscheckpath(struct denode *, struct denode *); @@ -311,7 +321,6 @@ int dosdirempty(struct denode *); int readde(struct denode *, struct buf **, struct direntry **); int readep(struct msdosfsmount *, u_long, u_long, struct buf **, struct direntry **); -void reinsert(struct denode *); int removede(struct denode *, struct denode *); int uniqdosname(struct denode *, struct componentname *, u_char *); int findwin95(struct denode *); Index: src/sys/fs/msdosfs/msdosfs_denode.c diff -u src/sys/fs/msdosfs/msdosfs_denode.c:1.49 src/sys/fs/msdosfs/msdosfs_denode.c:1.50 --- src/sys/fs/msdosfs/msdosfs_denode.c:1.49 Fri May 30 08:42:35 2014 +++ src/sys/fs/msdosfs/msdosfs_denode.c Tue Jul 8 09:21:52 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: msdosfs_denode.c,v 1.49 2014/05/30 08:42:35 hannken Exp $ */ +/* $NetBSD: msdosfs_denode.c,v 1.50 2014/07/08 09:21:52 hannken Exp $ */ /*- * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank. @@ -48,7 +48,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: msdosfs_denode.c,v 1.49 2014/05/30 08:42:35 hannken Exp $); +__KERNEL_RCSID(0, $NetBSD: msdosfs_denode.c,v 1.50 2014/07/08 09:21:52 hannken Exp $); #include sys/param.h #include sys/systm.h @@ -72,14 +72,6 @@ __KERNEL_RCSID(0, $NetBSD: msdosfs_deno #include fs/msdosfs/denode.h #include fs/msdosfs/fat.h -LIST_HEAD(ihashhead, denode) *dehashtbl; -u_long dehash; /* size of hash table - 1 */ -#define DEHASH(dev, dcl, doff) \ -(((dev) + (dcl) + (doff) / sizeof(struct direntry)) dehash) - -kmutex_t msdosfs_ihash_lock; -kmutex_t msdosfs_hashlock; - struct pool msdosfs_denode_pool; extern int prtactive; @@ -138,10 +130,6 @@ static const struct genfs_ops msdosfs_ge .gop_markupdate = msdosfs_gop_markupdate, }; -static struct denode *msdosfs_hashget(dev_t, u_long, u_long, int); -static void msdosfs_hashins(struct denode *); -static void
CVS commit: src/external/ibm-public/postfix/sbin/posttls-finger
Module Name:src Committed By: martin Date: Tue Jul 8 09:58:12 UTC 2014 Modified Files: src/external/ibm-public/postfix/sbin/posttls-finger: Makefile Log Message: Add missing libcrypto To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ src/external/ibm-public/postfix/sbin/posttls-finger/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/ibm-public/postfix/sbin/posttls-finger/Makefile diff -u src/external/ibm-public/postfix/sbin/posttls-finger/Makefile:1.1 src/external/ibm-public/postfix/sbin/posttls-finger/Makefile:1.2 --- src/external/ibm-public/postfix/sbin/posttls-finger/Makefile:1.1 Sun Jul 6 20:09:26 2014 +++ src/external/ibm-public/postfix/sbin/posttls-finger/Makefile Tue Jul 8 09:58:12 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2014/07/06 20:09:26 tron Exp $ +# $NetBSD: Makefile,v 1.2 2014/07/08 09:58:12 martin Exp $ NOMAN= # defined @@ -10,7 +10,7 @@ SRCS= posttls-finger.c tlsmgrmem.c DIST= ${NETBSDSRCDIR}/external/ibm-public/postfix/dist/src/${PROG} .PATH: ${DIST} -DPADD+= ${LIBPDNS} ${LIBPTLS} ${LIBPGLOBAL} ${LIBPUTIL} -LDADD+= ${LIBPDNS} ${LIBPTLS} ${LIBPGLOBAL} ${LIBPUTIL} +DPADD+= ${LIBPDNS} ${LIBPTLS} ${LIBPGLOBAL} ${LIBPUTIL} ${LIBCRYPTO} +LDADD+= ${LIBPDNS} ${LIBPTLS} ${LIBPGLOBAL} ${LIBPUTIL} ${LIBCRYPTO} .include bsd.prog.mk
CVS commit: src/distrib/sets/lists/debug
Module Name:src Committed By: martin Date: Tue Jul 8 11:13:24 UTC 2014 Modified Files: src/distrib/sets/lists/debug: mi shl.mi Log Message: Try to fix debug and debuglib setlists for the bind import To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.69 src/distrib/sets/lists/debug/mi cvs rdiff -u -r1.65 -r1.66 src/distrib/sets/lists/debug/shl.mi 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/debug/mi diff -u src/distrib/sets/lists/debug/mi:1.68 src/distrib/sets/lists/debug/mi:1.69 --- src/distrib/sets/lists/debug/mi:1.68 Mon Jul 7 19:41:22 2014 +++ src/distrib/sets/lists/debug/mi Tue Jul 8 11:13:24 2014 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.68 2014/07/07 19:41:22 alnsn Exp $ +# $NetBSD: mi,v 1.69 2014/07/08 11:13:24 martin Exp $ ./etc/mtree/set.debug comp-sys-root ./usr/lib/i18n/libBIG5_g.a comp-c-debuglib debuglib @@ -75,6 +75,7 @@ ./usr/lib/libheimntlm_g.a comp-c-debuglib debuglib,kerberos ./usr/lib/libhx509_g.acomp-c-debuglib debuglib,kerberos ./usr/lib/libiberty_g.acomp-c-debuglib debuglib,binutils +./usr/lib/libirs_g.acomp-c-debuglib debuglib ./usr/lib/libintl_g.acomp-c-debuglib debuglib ./usr/lib/libipsec_g.acomp-c-debuglib debuglib ./usr/lib/libisc_g.acomp-c-debuglib debuglib @@ -477,6 +478,7 @@ ./usr/libdata/debug/usr/bin/db.debug comp-util-debug debug ./usr/libdata/debug/usr/bin/dc.debug comp-util-debug debug ./usr/libdata/debug/usr/bin/deroff.debug comp-util-debug debug +./usr/libdata/debug/usr/bin/delv.debug comp-bind-bin debug ./usr/libdata/debug/usr/bin/diff.debug comp-util-debug debug ./usr/libdata/debug/usr/bin/diff3.debug comp-util-debug debug ./usr/libdata/debug/usr/bin/dig.debug comp-netutil-debug debug @@ -1000,6 +1002,7 @@ ./usr/libdata/debug/usr/sbin/dhcrelay.debug comp-dhcpd-debug debug ./usr/libdata/debug/usr/sbin/diskpart.debug comp-sysutil-debug debug ./usr/libdata/debug/usr/sbin/dnssec-dsfromkey.debug comp-bind-debug debug +./usr/libdata/debug/usr/sbin/dnssec-importkey.debug comp-bind-debug debug ./usr/libdata/debug/usr/sbin/dnssec-keyfromlabel.debug comp-bind-debug debug ./usr/libdata/debug/usr/sbin/dnssec-keygen.debug comp-bind-debug debug ./usr/libdata/debug/usr/sbin/dnssec-revoke.debug comp-bind-debug debug Index: src/distrib/sets/lists/debug/shl.mi diff -u src/distrib/sets/lists/debug/shl.mi:1.65 src/distrib/sets/lists/debug/shl.mi:1.66 --- src/distrib/sets/lists/debug/shl.mi:1.65 Wed Jun 18 17:50:15 2014 +++ src/distrib/sets/lists/debug/shl.mi Tue Jul 8 11:13:24 2014 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.65 2014/06/18 17:50:15 christos Exp $ +# $NetBSD: shl.mi,v 1.66 2014/07/08 11:13:24 martin Exp $ ./usr/libdata/debug/lib/libc.so.12.192.debug comp-sys-debug debug ./usr/libdata/debug/lib/libcrypt.so.1.0.debug comp-sys-debug debug ./usr/libdata/debug/lib/libcrypto.so.8.2.debug comp-sys-debug debug @@ -98,12 +98,14 @@ ./usr/libdata/debug/usr/lib/libhx509.so.5.0.debug comp-krb5-debug kerberos,debug ./usr/libdata/debug/usr/lib/libintl.so.1.0.debug comp-sys-debug debug ./usr/libdata/debug/usr/lib/libipsec.so.3.0.debug comp-net-debug debug +./usr/libdata/debug/usr/lib/libirs.so.8.0.debug comp-bind-debug debug ./usr/libdata/debug/usr/lib/libisc.so.6.0.debug comp-bind-debug debug,obsolete ./usr/libdata/debug/usr/lib/libisc.so.8.0.debug comp-bind-debug debug ./usr/libdata/debug/usr/lib/libisccc.so.6.0.debug comp-bind-debug debug,obsolete ./usr/libdata/debug/usr/lib/libisccc.so.8.0.debug comp-bind-debug debug ./usr/libdata/debug/usr/lib/libisccfg.so.6.0.debug comp-bind-debug debug,obsolete -./usr/libdata/debug/usr/lib/libisccfg.so.8.0.debug comp-bind-debug debug +./usr/libdata/debug/usr/lib/libisccfg.so.8.0.debug comp-bind-debug debug,obsolete +./usr/libdata/debug/usr/lib/libisccfg.so.8.1.debug comp-bind-debug debug ./usr/libdata/debug/usr/lib/libiscsi.so.2.0.debug comp-iscsi-debug iscsi,debug ./usr/libdata/debug/usr/lib/libisns.so.0.0.debug comp-isns-debug debug ./usr/libdata/debug/usr/lib/libkadm5clnt.so.13.0.debug comp-krb5-debug kerberos,debug
CVS commit: src/sys/net
Module Name:src Committed By: alnsn Date: Tue Jul 8 11:30:31 UTC 2014 Modified Files: src/sys/net: bpfjit.c Log Message: Most filter programs in the kernel need 3 scratch registers. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 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.21 src/sys/net/bpfjit.c:1.22 --- src/sys/net/bpfjit.c:1.21 Sat Jul 5 11:13:13 2014 +++ src/sys/net/bpfjit.c Tue Jul 8 11:30:31 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: bpfjit.c,v 1.21 2014/07/05 11:13:13 alnsn Exp $ */ +/* $NetBSD: bpfjit.c,v 1.22 2014/07/08 11:30:31 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.21 2014/07/05 11:13:13 alnsn Exp $); +__KERNEL_RCSID(0, $NetBSD: bpfjit.c,v 1.22 2014/07/08 11:30:31 alnsn Exp $); #else -__RCSID($NetBSD: bpfjit.c,v 1.21 2014/07/05 11:13:13 alnsn Exp $); +__RCSID($NetBSD: bpfjit.c,v 1.22 2014/07/08 11:30:31 alnsn Exp $); #endif #include sys/types.h @@ -251,6 +251,14 @@ nscratches(bpfjit_hint_t hints) { sljit_si rv = 2; +#ifdef _KERNEL + /* + * Most kernel programs load packet bytes and they generate + * m_xword/m_xhalf/m_xbyte() calls with three arguments. + */ + rv = 3; +#endif + if (hints BJ_HINT_LDW) rv = 3; /* uses BJ_TMP2REG */
CVS commit: src/external/ibm-public/postfix/sbin/posttls-finger
Module Name:src Committed By: christos Date: Tue Jul 8 13:04:07 UTC 2014 Modified Files: src/external/ibm-public/postfix/sbin/posttls-finger: Makefile Log Message: fix libcrypto To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/external/ibm-public/postfix/sbin/posttls-finger/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/ibm-public/postfix/sbin/posttls-finger/Makefile diff -u src/external/ibm-public/postfix/sbin/posttls-finger/Makefile:1.2 src/external/ibm-public/postfix/sbin/posttls-finger/Makefile:1.3 --- src/external/ibm-public/postfix/sbin/posttls-finger/Makefile:1.2 Tue Jul 8 05:58:12 2014 +++ src/external/ibm-public/postfix/sbin/posttls-finger/Makefile Tue Jul 8 09:04:07 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2014/07/08 09:58:12 martin Exp $ +# $NetBSD: Makefile,v 1.3 2014/07/08 13:04:07 christos Exp $ NOMAN= # defined @@ -10,7 +10,12 @@ SRCS= posttls-finger.c tlsmgrmem.c DIST= ${NETBSDSRCDIR}/external/ibm-public/postfix/dist/src/${PROG} .PATH: ${DIST} -DPADD+= ${LIBPDNS} ${LIBPTLS} ${LIBPGLOBAL} ${LIBPUTIL} ${LIBCRYPTO} -LDADD+= ${LIBPDNS} ${LIBPTLS} ${LIBPGLOBAL} ${LIBPUTIL} ${LIBCRYPTO} +DPADD+= ${LIBPDNS} ${LIBPTLS} ${LIBPGLOBAL} ${LIBPUTIL} +LDADD+= ${LIBPDNS} ${LIBPTLS} ${LIBPGLOBAL} ${LIBPUTIL} + +.if ${MKCRYPTO} != no +DPADD+= ${LIBCRYPTO} +LDADD+= -lcrypto +.endif .include bsd.prog.mk
CVS commit: src/sys/arch/playstation2/ee
Module Name:src Committed By: martin Date: Tue Jul 8 13:35:43 UTC 2014 Modified Files: src/sys/arch/playstation2/ee: gsfb.c Log Message: Split softc, fix wsfont_find call. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/playstation2/ee/gsfb.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/arch/playstation2/ee/gsfb.c diff -u src/sys/arch/playstation2/ee/gsfb.c:1.21 src/sys/arch/playstation2/ee/gsfb.c:1.22 --- src/sys/arch/playstation2/ee/gsfb.c:1.21 Mon Mar 31 11:25:49 2014 +++ src/sys/arch/playstation2/ee/gsfb.c Tue Jul 8 13:35:43 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: gsfb.c,v 1.21 2014/03/31 11:25:49 martin Exp $ */ +/* $NetBSD: gsfb.c,v 1.22 2014/07/08 13:35:43 martin Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: gsfb.c,v 1.21 2014/03/31 11:25:49 martin Exp $); +__KERNEL_RCSID(0, $NetBSD: gsfb.c,v 1.22 2014/07/08 13:35:43 martin Exp $); #include debug_playstation2.h @@ -59,13 +59,15 @@ __KERNEL_RCSID(0, $NetBSD: gsfb.c,v 1.2 #define STATIC static #endif -STATIC struct gsfb { - int initialized; - int attached; - int is_console; - const struct wsscreen_descr *screen; - struct wsdisplay_font *font; -} gsfb; +struct gsfb_softc { + device_t sc_dev; + const struct wsscreen_descr *sc_screen; + struct wsdisplay_font *sc_font; + bool sc_is_console; +}; + +static int gsfb_is_console; +static struct gsfb_softc gsfb_console_softc; STATIC void gsfb_dma_kick(paddr_t, size_t); STATIC void gsfb_font_expand_psmct32(const struct wsdisplay_font *, u_int, @@ -177,14 +179,14 @@ STATIC const struct _gsfb_debug_window { STATIC char _gsfb_debug_buf[80 * 2]; #endif /* GSFB_DEBUG_MONITOR */ -STATIC int gsfb_match(struct device *, struct cfdata *, void *); -STATIC void gsfb_attach(struct device *, struct device *, void *); +STATIC int gsfb_match(device_t, cfdata_t, void *); +STATIC void gsfb_attach(device_t, device_t, void *); -CFATTACH_DECL(gsfb, sizeof(struct device), +CFATTACH_DECL_NEW(gsfb, sizeof(struct gsfb_softc), gsfb_match, gsfb_attach, NULL, NULL); STATIC void gsfb_hwinit(void); -STATIC int gsfb_swinit(void); +STATIC int gsfb_swinit(struct gsfb_softc*); /* console */ void gsfbcnprobe(struct consdev *); @@ -265,7 +267,7 @@ struct wsdisplay_accessops _gsfb_accesso }; int -gsfb_match(struct device *parent, struct cfdata *cf, void *aux) +gsfb_match(device_t parent, cfdata_t cf, void *aux) { extern struct cfdriver gsfb_cd; struct mainbus_attach_args *ma = aux; @@ -273,24 +275,30 @@ gsfb_match(struct device *parent, struct if (strcmp(ma-ma_name, gsfb_cd.cd_name) != 0) return (0); - return (!gsfb.attached); + return 1; } void -gsfb_attach(struct device *parent, struct device *self, void *aux) +gsfb_attach(device_t parent, device_t self, void *aux) { struct wsemuldisplaydev_attach_args wa; + struct gsfb_softc *sc = device_private(self); + + if (gsfb_is_console) { + memcpy(sc, gsfb_console_softc, sizeof(gsfb_console_softc)); + sc-sc_is_console = true; + } + sc-sc_dev = self; - gsfb.attached = 1; - if (!gsfb.is_console gsfb_swinit() != 0) + if (!sc-sc_is_console !gsfb_swinit(sc) != 0) return; printf(\n); - wa.console = gsfb.is_console; + wa.console = sc-sc_is_console; wa.scrdata = _gsfb_screen_list; wa.accessops = _gsfb_accessops; - wa.accesscookie = gsfb; + wa.accesscookie = sc; config_found(self, wa, wsdisplaydevprint); } @@ -312,10 +320,10 @@ gsfbcninit(struct consdev *cndev) u_int32_t *buf = (void *)MIPS_PHYS_TO_KSEG1(paddr); long defattr = ATTR_BG_SET(WS_DEFAULT_BG) | ATTR_FG_SET(WS_DEFAULT_FG); - gsfb.is_console = 1; + gsfb_is_console = 1; gsfb_hwinit(); - gsfb_swinit(); + gsfb_swinit(gsfb_console_softc); /* Set the screen to the default background color at boot */ buf[28] = gsfb_ansi_psmct32[ATTR_BG_GET(defattr)]; @@ -332,7 +340,8 @@ gsfbcninit(struct consdev *cndev) } #endif /* GSFB_DEBUG_MONITOR */ - wsdisplay_cnattach(_gsfb_std_screen, gsfb, 0, 0, defattr); + wsdisplay_cnattach(_gsfb_std_screen, gsfb_console_softc, 0, 0, + defattr); } void @@ -355,21 +364,20 @@ gsfb_hwinit(void) } int -gsfb_swinit(void) +gsfb_swinit(struct gsfb_softc *sc) { int font; wsfont_init(); - font = wsfont_find(NULL, 8, 16, 0, WSDISPLAY_FONTORDER_L2R, - WSDISPLAY_FONTORDER_L2R); + font = wsfont_find(NULL, 8, 16, 0, WSDISPLAY_FONTORDER_L2R, + WSDISPLAY_FONTORDER_L2R, WSFONT_FIND_BITMAP); if (font 0) return (1); - if (wsfont_lock(font, gsfb.font)) + if (wsfont_lock(font, sc-sc_font)) return (1); - gsfb.screen = _gsfb_std_screen; - gsfb.initialized = 1; + sc-sc_screen = _gsfb_std_screen; return (0); } @@ -380,9 +388,10 @@ gsfb_swinit(void) void _gsfb_cursor(void *cookie, int on, int row, int col) { + struct gsfb_softc *sc = cookie; paddr_t paddr =
CVS commit: src/libexec/httpd
Module Name:src Committed By: mrg Date: Tue Jul 8 13:59:39 UTC 2014 Modified Files: src/libexec/httpd: Makefile Log Message: make export-distfile target slightly more stable. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/libexec/httpd/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/httpd/Makefile diff -u src/libexec/httpd/Makefile:1.21 src/libexec/httpd/Makefile:1.22 --- src/libexec/httpd/Makefile:1.21 Sun Feb 2 03:20:57 2014 +++ src/libexec/httpd/Makefile Tue Jul 8 13:59:39 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.21 2014/02/02 03:20:57 mrg Exp $ +# $NetBSD: Makefile,v 1.22 2014/07/08 13:59:39 mrg Exp $ # # $eterna: Makefile,v 1.30 2010/07/11 00:34:27 mrg Exp $ # @@ -84,9 +84,9 @@ export-distfile: ); \ pax -wf ${TAR} ${BASE}; \ gzip -nc9 ${TAR} ${TAR}.gz; \ - bzip2 -9 ${TAR} - @echo Exported two files in ${dir}: - @echo ${TAR}.gz - @echo ${TAR}.bz2 + bzip2 -9 ${TAR}; \ + echo Exported two files in $${dir}:; \ + echo ${TAR}.gz; \ + echo ${TAR}.bz2 .include bsd.prog.mk
CVS commit: src/libexec/httpd
Module Name:src Committed By: mrg Date: Tue Jul 8 14:01:21 UTC 2014 Modified Files: src/libexec/httpd: CHANGES auth-bozo.c bozohttpd.c Log Message: avoid truncating a directory path when using snprintf(), but instead detect and return an error. found and fixed by shm@netbsd. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/libexec/httpd/CHANGES cvs rdiff -u -r1.12 -r1.13 src/libexec/httpd/auth-bozo.c cvs rdiff -u -r1.52 -r1.53 src/libexec/httpd/bozohttpd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/httpd/CHANGES diff -u src/libexec/httpd/CHANGES:1.16 src/libexec/httpd/CHANGES:1.17 --- src/libexec/httpd/CHANGES:1.16 Sat May 17 05:50:46 2014 +++ src/libexec/httpd/CHANGES Tue Jul 8 14:01:21 2014 @@ -3,6 +3,8 @@ $eterna: CHANGES,v 1.78 2011/11/18 01:25 changes in bozohttpd 20140201: o support .svg files o fix a core dump when requests timeout + o fix a security issue in basic HTTP authentication which would allow + authentication to be bypassed, from s...@netbsd.org changes in bozohttpd 20140102: o update a few content types Index: src/libexec/httpd/auth-bozo.c diff -u src/libexec/httpd/auth-bozo.c:1.12 src/libexec/httpd/auth-bozo.c:1.13 --- src/libexec/httpd/auth-bozo.c:1.12 Thu Jan 2 08:21:38 2014 +++ src/libexec/httpd/auth-bozo.c Tue Jul 8 14:01:21 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: auth-bozo.c,v 1.12 2014/01/02 08:21:38 mrg Exp $ */ +/* $NetBSD: auth-bozo.c,v 1.13 2014/07/08 14:01:21 mrg Exp $ */ /* $eterna: auth-bozo.c,v 1.17 2011/11/18 09:21:15 mrg Exp $ */ @@ -74,7 +74,11 @@ bozo_auth_check(bozo_httpreq_t *request, } request-hr_authrealm = bozostrdup(httpd, dir); - snprintf(authfile, sizeof(authfile), %s/%s, dir, AUTH_FILE); + if ((size_t)snprintf(authfile, sizeof(authfile), %s/%s, dir, AUTH_FILE) = + sizeof(authfile)) { + return bozo_http_error(httpd, 404, request, + authfile path too long); + } if (stat(authfile, sb) 0) { debug((httpd, DEBUG_NORMAL, bozo_auth_check realm `%s' dir `%s' authfile `%s' missing, Index: src/libexec/httpd/bozohttpd.c diff -u src/libexec/httpd/bozohttpd.c:1.52 src/libexec/httpd/bozohttpd.c:1.53 --- src/libexec/httpd/bozohttpd.c:1.52 Wed Jul 2 13:58:09 2014 +++ src/libexec/httpd/bozohttpd.c Tue Jul 8 14:01:21 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: bozohttpd.c,v 1.52 2014/07/02 13:58:09 shm Exp $ */ +/* $NetBSD: bozohttpd.c,v 1.53 2014/07/08 14:01:21 mrg Exp $ */ /* $eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $ */ @@ -935,7 +935,12 @@ check_direct_access(bozo_httpreq_t *requ bozo_check_special_files(request, basename); } - snprintf(dirfile, sizeof(dirfile), %s/%s, dir, DIRECT_ACCESS_FILE); + if ((size_t)snprintf(dirfile, sizeof(dirfile), %s/%s, dir, + DIRECT_ACCESS_FILE) = sizeof(dirfile)) { + bozo_http_error(request-hr_httpd, 404, request, + directfile path too long); + return 0; + } if (stat(dirfile, sb) 0 || (fp = fopen(dirfile, r)) == NULL) return 0; @@ -1127,7 +1132,7 @@ use_slashdir: /* * checks to see if this request has a valid .bzredirect file. returns * 0 when no redirection happend, or 1 when handle_redirect() has been - * called. + * called, -1 on error. */ static int check_bzredirect(bozo_httpreq_t *request) @@ -1142,7 +1147,12 @@ check_bzredirect(bozo_httpreq_t *request * if this pathname is really a directory, but doesn't end in /, * use it as the directory to look for the redir file. */ - snprintf(dir, sizeof(dir), %s, request-hr_file + 1); + if((size_t)snprintf(dir, sizeof(dir), %s, request-hr_file + 1) = + sizeof(dir)) { + bozo_http_error(request-hr_httpd, 404, request, + file path too long); + return -1; + } debug((request-hr_httpd, DEBUG_FAT, check_bzredirect: dir %s, dir)); basename = strrchr(dir, '/'); @@ -1156,13 +1166,23 @@ check_bzredirect(bozo_httpreq_t *request bozo_check_special_files(request, basename); } - snprintf(redir, sizeof(redir), %s/%s, dir, REDIRECT_FILE); + if ((size_t)snprintf(redir, sizeof(redir), %s/%s, dir, + REDIRECT_FILE) = sizeof(redir)) { + bozo_http_error(request-hr_httpd, 404, request, + redirectfile path too long); + return -1; + } if (lstat(redir, sb) == 0) { if (!S_ISLNK(sb.st_mode)) return 0; absolute = 0; } else { - snprintf(redir, sizeof(redir), %s/%s, dir, ABSREDIRECT_FILE); + if((size_t)snprintf(redir, sizeof(redir), %s/%s, dir, + ABSREDIRECT_FILE) = sizeof(redir)) { + bozo_http_error(request-hr_httpd, 404, request, + redirectfile path too long); + return -1; + } if (lstat(redir, sb) 0 || !S_ISLNK(sb.st_mode)) return 0; absolute = 1; @@ -1186,9 +1206,14 @@ check_bzredirect(bozo_httpreq_t *request /* now we have the link pointer, redirect to the real place */ if (absolute) finalredir = redirpath; - else - snprintf(finalredir = redir, sizeof(redir), /%s/%s, dir, - redirpath); + else { +
CVS commit: src/libexec/httpd
Module Name:src Committed By: mrg Date: Tue Jul 8 14:06:17 UTC 2014 Modified Files: src/libexec/httpd: CHANGES bozohttpd.c Log Message: call this bozohttpd 20140708, and add/fix a couple of CHANGES entries. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/libexec/httpd/CHANGES cvs rdiff -u -r1.53 -r1.54 src/libexec/httpd/bozohttpd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/httpd/CHANGES diff -u src/libexec/httpd/CHANGES:1.17 src/libexec/httpd/CHANGES:1.18 --- src/libexec/httpd/CHANGES:1.17 Tue Jul 8 14:01:21 2014 +++ src/libexec/httpd/CHANGES Tue Jul 8 14:06:17 2014 @@ -1,10 +1,14 @@ $eterna: CHANGES,v 1.78 2011/11/18 01:25:11 mrg Exp $ +changes in bozohttpd 20140708: + o fixes for virtual host support, from rajeev_v_pil...@yahoo.com + o avoid printing double errors, from s...@netbsd.org + o fix a security issue in basic HTTP authentication which would allow + authentication to be bypassed, from s...@netbsd.org + changes in bozohttpd 20140201: o support .svg files o fix a core dump when requests timeout - o fix a security issue in basic HTTP authentication which would allow - authentication to be bypassed, from s...@netbsd.org changes in bozohttpd 20140102: o update a few content types Index: src/libexec/httpd/bozohttpd.c diff -u src/libexec/httpd/bozohttpd.c:1.53 src/libexec/httpd/bozohttpd.c:1.54 --- src/libexec/httpd/bozohttpd.c:1.53 Tue Jul 8 14:01:21 2014 +++ src/libexec/httpd/bozohttpd.c Tue Jul 8 14:06:17 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: bozohttpd.c,v 1.53 2014/07/08 14:01:21 mrg Exp $ */ +/* $NetBSD: bozohttpd.c,v 1.54 2014/07/08 14:06:17 mrg Exp $ */ /* $eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $ */ @@ -109,7 +109,7 @@ #define INDEX_HTML index.html #endif #ifndef SERVER_SOFTWARE -#define SERVER_SOFTWARE bozohttpd/20140516 +#define SERVER_SOFTWARE bozohttpd/20140708 #endif #ifndef DIRECT_ACCESS_FILE #define DIRECT_ACCESS_FILE .bzdirect
CVS commit: src/sys/dev/ic
Module Name:src Committed By: chs Date: Tue Jul 8 14:18:54 UTC 2014 Modified Files: src/sys/dev/ic: mpt_netbsd.c Log Message: fix a device/softc error. remove some related glue that is no longer needed. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/dev/ic/mpt_netbsd.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/ic/mpt_netbsd.c diff -u src/sys/dev/ic/mpt_netbsd.c:1.24 src/sys/dev/ic/mpt_netbsd.c:1.25 --- src/sys/dev/ic/mpt_netbsd.c:1.24 Thu Apr 17 16:08:42 2014 +++ src/sys/dev/ic/mpt_netbsd.c Tue Jul 8 14:18:54 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: mpt_netbsd.c,v 1.24 2014/04/17 16:08:42 christos Exp $ */ +/* $NetBSD: mpt_netbsd.c,v 1.25 2014/07/08 14:18:54 chs Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -77,7 +77,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mpt_netbsd.c,v 1.24 2014/04/17 16:08:42 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: mpt_netbsd.c,v 1.25 2014/07/08 14:18:54 chs Exp $); #include dev/ic/mpt.h /* pulls in all headers */ #include sys/scsiio.h @@ -100,13 +100,6 @@ static void mpt_minphys(struct buf *); static int mpt_ioctl(struct scsipi_channel *, u_long, void *, int, struct proc *); -/* - * XXX - this assumes the device_private() of the attachement starts with - * a struct mpt_softc, so we can use the return value of device_private() - * straight without any offset. - */ -#define DEV_TO_MPT(DEV) device_private(DEV) - void mpt_scsipi_attach(mpt_softc_t *mpt) { @@ -367,7 +360,7 @@ mpt_timeout(void *arg) } xs = req-xfer; periph = xs-xs_periph; - mpt = (void *) periph-periph_channel-chan_adapter-adapt_dev; + mpt = device_private(periph-periph_channel-chan_adapter-adapt_dev); scsipi_printaddr(periph); printf(command timeout\n); @@ -1541,7 +1534,7 @@ mpt_scsipi_request(struct scsipi_channel void *arg) { struct scsipi_adapter *adapt = chan-chan_adapter; - mpt_softc_t *mpt = DEV_TO_MPT(adapt-adapt_dev); + mpt_softc_t *mpt = device_private(adapt-adapt_dev); switch (req) { case ADAPTER_REQ_RUN_XFER:
CVS commit: src/sys/rump
Module Name:src Committed By: pooka Date: Tue Jul 8 14:30:21 UTC 2014 Modified Files: src/sys/rump: listsrcdirs Log Message: In addition to kernel/tools sources, include another selection of sources useful for running application stacks on rump kernels. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/rump/listsrcdirs 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/listsrcdirs diff -u src/sys/rump/listsrcdirs:1.14 src/sys/rump/listsrcdirs:1.15 --- src/sys/rump/listsrcdirs:1.14 Sun Jun 15 14:36:57 2014 +++ src/sys/rump/listsrcdirs Tue Jul 8 14:30:21 2014 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: listsrcdirs,v 1.14 2014/06/15 14:36:57 pooka Exp $ +# $NetBSD: listsrcdirs,v 1.15 2014/07/08 14:30:21 pooka Exp $ # # @@ -11,44 +11,89 @@ # ./listsrcdirs | xargs cvs -d anon...@anoncvs.netbsd.org:/cvsroot -z3 co -P # -precho () -{ +# default echomode (for compat) +em=sys - pfx=$1 +# mini-getopt (so that we don't have to with getopt vs. getopts +unset cvsmode +if [ ${1} = -c ]; then + cvsmode=true shift - for arg in $* ; do echo ${pfx}${arg} ; done +fi +[ ! -z ${1} ] em=$1 +# both is undocumented, can be used for checking dupes: +# sh listsrcdirs both | sort | uniq -d +if [ ${em} != sys -a ${em} != usr -a ${em} != both ]; then + echo 'mode must be sys or usr' + exit 1 +fi + +lsrc () +{ + + what=$1 + pfx=$2 + shift 2 + if [ ${em} = both -o ${what} = ${em} ]; then + for arg in $* ; do echo src${pfx}${arg} ; done + fi } ARCHS=amd64 i386 x86 arm evbarm sparc sparc64 powerpc evbppc mips evbmips ARCHS_EXTRA=arm/arm32 Makefile -precho src/ build.sh Makefile Makefile.inc -precho src/ tools common include share/mk -precho src/etc/ Makefile.params master.passwd group -precho src/lib/lib c util rump -precho src/lib/librump user client hijack dev net vfs -precho src/external/bsd/ flex mdocml byacc -precho src/external/cddl/ osnet -precho src/external/historical/ nawk -precho src/bin/ cat -precho src/usr.bin/ make xinstall config mktemp sed tsort -precho src/usr.bin/ lorder join cksum m4 mkdep Makefile.inc -precho src/usr.bin/ rpcgen rump_server rump_allserver rump_wmd -precho src/usr.bin/ stat shmif_dumpbus -precho src/usr.sbin/ mtree +# sources necessary for building rump kernel components +lsrc sys / build.sh Makefile Makefile.inc +lsrc sys / tools common include share/mk +lsrc sys /etc/ Makefile.params master.passwd group +lsrc sys /lib/lib c util rump +lsrc sys /lib/librump user client hijack dev net vfs +lsrc sys /external/bsd/ flex mdocml byacc +lsrc sys /external/cddl/ osnet +lsrc sys /external/historical/ nawk +lsrc sys /bin/ cat +lsrc sys /usr.bin/ make xinstall config mktemp sed tsort +lsrc sys /usr.bin/ lorder join cksum m4 mkdep Makefile.inc +lsrc sys /usr.bin/ rpcgen rump_server rump_allserver rump_wmd +lsrc sys /usr.bin/ stat shmif_dumpbus +lsrc sys /usr.sbin/ mtree + +# assorted userspace sources, mostly for configuration diagnostics +lsrc usr /lib/lib crypt ipsec m npf pci prop +lsrc usr /lib/lib pthread rmt y z +lsrc usr /libexec/ ld.elf_so +lsrc usr /bin/ chmod cp dd df ed ln ls mkdir mv pax +lsrc usr /bin/ rm rmdir +lsrc usr /sbin/ cgdconfig chown +lsrc usr /sbin/ disklabel dump fsck fsck_ext2fs fsck_ffs +lsrc usr /sbin/ fsck_lfs fsck_msdos fsck_v7fs +lsrc usr /sbin/ ifconfig mknod +lsrc usr /sbin/ modstat mount mount_ffs mount_tmpfs newfs +lsrc usr /sbin/ newfs_v7fs newfs_msdos newfs_ext2fs +lsrc usr /sbin/ newfs_lfs newfs_sysvbfs newfs_udf +lsrc usr /sbin/ ping ping6 raidctl reboot +lsrc usr /sbin/ rndctl route setkey sysctl umount +lsrc usr /usr.bin/ kdump ktrace +lsrc usr /usr.sbin/ arp dumpfs makefs ndp npf pcictl vnconfig +lsrc usr /usr.sbin/ wlanctl +lsrc usr /external/bsd/ libpcap tcpdump wpa +lsrc usr /crypto/ Makefile.openssl +lsrc usr /crypto/dist/ ipsec-tools +lsrc usr /crypto/external/bsd/ openssl + # If -c is given, use CVS syntax to exclude large subdirectories # of sys. Otherwise just do it wholesale. -if [ ${1} = '-c' ]; then - echo \!src/sys/arch src/sys +if ${cvsmode:-false}; then + [ ${em} = sys ] echo \!src/sys/arch src/sys # pick a few useful archs, namely those mentioned in buildrump.sh for arch in ${ARCHS}; do - precho src/sys/arch/${arch}/ include ${arch} Makefile + lsrc sys /sys/arch/${arch}/ include ${arch} Makefile done for extra in ${ARCHS_EXTRA}; do - echo src/sys/arch/${extra} + lsrc sys /sys/arch/ ${extra} done else - echo src/sys + lsrc sys / sys fi
CVS commit: xsrc/external/mit/xf86-video-suntcx/dist/src
Module Name:xsrc Committed By: macallan Date: Tue Jul 8 17:05:27 UTC 2014 Modified Files: xsrc/external/mit/xf86-video-suntcx/dist/src: tcx.h tcx_accel.c tcx_driver.c Log Message: if the hardware supports stipples with ROPs, use them while there, downgrade some config output from X_ERROR to X_PROBED To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 xsrc/external/mit/xf86-video-suntcx/dist/src/tcx.h cvs rdiff -u -r1.8 -r1.9 \ xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_accel.c \ xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_driver.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-suntcx/dist/src/tcx.h diff -u xsrc/external/mit/xf86-video-suntcx/dist/src/tcx.h:1.6 xsrc/external/mit/xf86-video-suntcx/dist/src/tcx.h:1.7 --- xsrc/external/mit/xf86-video-suntcx/dist/src/tcx.h:1.6 Wed Jul 2 11:54:48 2014 +++ xsrc/external/mit/xf86-video-suntcx/dist/src/tcx.h Tue Jul 8 17:05:26 2014 @@ -59,6 +59,7 @@ typedef struct { CloseScreenProcPtr CloseScreen; Bool HWCursor; Bool Is8bit; + Bool HasStipROP; int vramsize; /* size of the 8bit fb */ uint64_t *rblit; uint64_t *rstip; Index: xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_accel.c diff -u xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_accel.c:1.8 xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_accel.c:1.9 --- xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_accel.c:1.8 Wed Jul 2 11:54:48 2014 +++ xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_accel.c Tue Jul 8 17:05:26 2014 @@ -21,7 +21,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/* $NetBSD: tcx_accel.c,v 1.8 2014/07/02 11:54:48 macallan Exp $ */ +/* $NetBSD: tcx_accel.c,v 1.9 2014/07/08 17:05:26 macallan Exp $ */ #include sys/types.h @@ -178,22 +178,29 @@ TcxPrepareSolid( { ScrnInfoPtr pScreenInfo = xf86Screens[pPixmap-drawable.pScreen-myNum]; TcxPtr pTcx = GET_TCX_FROM_SCRN(pScreenInfo); +uint32_t hwfg; ENTER; + /* weed out the cases we can't accelerate */ -if (alu != GXcopy) +if (pTcx-HasStipROP) { + hwfg = alu 28; +} else if (alu == GXcopy) { +hwfg = 0x3000; +} else return FALSE; + if ((planemask != 0x) (planemask != 0x00ff)) return FALSE; if (exaGetPixmapOffset(pPixmap) != 0) return FALSE; pTcx-fg = (fg 0x00ff); -if (pTcx-pitchshift == 0) { - pTcx-fg |= 0x3000; -} else - pTcx-fg |= 0x3300; +/* set colour space ID if we're in 24bit mode */ +if (pTcx-pitchshift != 0) + hwfg |= 0x0300; +pTcx-fg |= hwfg; #ifdef DEBUG -xf86Msg(X_ERROR, fg: %08x\n, fg); +xf86Msg(X_ERROR, fg: %08x\n, hwfg); #endif LEAVE; return TRUE; Index: xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_driver.c diff -u xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_driver.c:1.8 xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_driver.c:1.9 --- xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_driver.c:1.8 Wed Jul 2 11:54:48 2014 +++ xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_driver.c Tue Jul 8 17:05:26 2014 @@ -345,7 +345,9 @@ TCXPreInit(ScrnInfoPtr pScrn, int flags) prom = sparcPromInit(); hwCursor = sparcPromGetBool(psdp-node, hw-cursor); lowDepth = sparcPromGetBool(psdp-node, tcx-8-bit); - +if (pTcx-HasStipROP = sparcPromGetBool(psdp-node, stip-rop)) { + xf86Msg(X_PROBED, stipple space supports ROPs\n); +} pTcx-Is8bit = (lowDepth != 0); /* all S24 support a hardware cursor */ if (!lowDepth) { @@ -362,13 +364,14 @@ TCXPreInit(ScrnInfoPtr pScrn, int flags) if ((v 0) (v 3)) pTcx-vramsize = 0x10 * v; } - xf86Msg(X_ERROR, found %d MB video memory\n, v); + xf86Msg(X_PROBED, found %d MB video memory\n, v); } if (prom) sparcPromClose(); -xf86Msg(X_ERROR, hw-cursor: %d\n, hwCursor); +xf86Msg(X_PROBED, hardware cursor support %s\n, + hwCursor ? found : not found); /* deal with depth
CVS commit: src/distrib/sets/lists/debug
Module Name:src Committed By: htodd Date: Tue Jul 8 17:15:14 UTC 2014 Modified Files: src/distrib/sets/lists/debug: md.amd64 Log Message: Fix debug sets for bind. To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 src/distrib/sets/lists/debug/md.amd64 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/debug/md.amd64 diff -u src/distrib/sets/lists/debug/md.amd64:1.57 src/distrib/sets/lists/debug/md.amd64:1.58 --- src/distrib/sets/lists/debug/md.amd64:1.57 Wed Jul 2 13:38:05 2014 +++ src/distrib/sets/lists/debug/md.amd64 Tue Jul 8 17:15:14 2014 @@ -1,4 +1,4 @@ -# $NetBSD: md.amd64,v 1.57 2014/07/02 13:38:05 alnsn Exp $ +# $NetBSD: md.amd64,v 1.58 2014/07/08 17:15:14 htodd Exp $ ./usr/lib/i386/i18n/libBIG5_g.a comp-c-debuglib compat,debuglib ./usr/lib/i386/i18n/libDECHanyu_g.a comp-c-debuglib compat,debuglib ./usr/lib/i386/i18n/libEUCTW_g.a comp-c-debuglib compat,debuglib @@ -237,12 +237,14 @@ ./usr/libdata/debug/usr/lib/i386/libi386.so.1.0.debug comp-compat-shlib compat,pic,debug ./usr/libdata/debug/usr/lib/i386/libintl.so.1.0.debug comp-compat-shlib compat,pic,debug ./usr/libdata/debug/usr/lib/i386/libipsec.so.3.0.debug comp-compat-shlib compat,pic,debug +./usr/libdata/debug/usr/lib/i386/libirs.so.8.0.debug comp-compat-shlib compat,pic,debug ./usr/libdata/debug/usr/lib/i386/libisc.so.6.0.debug comp-compat-shlib compat,pic,debug,obsolete ./usr/libdata/debug/usr/lib/i386/libisc.so.8.0.debug comp-compat-shlib compat,pic,debug ./usr/libdata/debug/usr/lib/i386/libisccc.so.6.0.debug comp-compat-shlib compat,pic,debug,obsolete ./usr/libdata/debug/usr/lib/i386/libisccc.so.8.0.debug comp-compat-shlib compat,pic,debug ./usr/libdata/debug/usr/lib/i386/libisccfg.so.6.0.debug comp-compat-shlib compat,pic,debug,obsolete -./usr/libdata/debug/usr/lib/i386/libisccfg.so.8.0.debug comp-compat-shlib compat,pic,debug +./usr/libdata/debug/usr/lib/i386/libisccfg.so.8.0.debug comp-compat-shlib compat,pic,debug,obsolete +./usr/libdata/debug/usr/lib/i386/libisccfg.so.8.1.debug comp-compat-shlib compat,pic,debug ./usr/libdata/debug/usr/lib/i386/libiscsi.so.2.0.debug comp-compat-shlib compat,pic,debug,iscsi ./usr/libdata/debug/usr/lib/i386/libisns.so.0.0.debug comp-compat-shlib compat,pic,debug ./usr/libdata/debug/usr/lib/i386/libkadm5clnt.so.12.0.debug comp-compat-shlib compat,pic,kerberos,debug,obsolete
CVS commit: src/sys
Module Name:src Committed By: maxv Date: Tue Jul 8 17:16:25 UTC 2014 Modified Files: src/sys/kern: exec_elf.c src/sys/sys: exec_elf.h Log Message: Define ELF_MAXNOTESIZE, ELF_MAXSHNUM and ELF_MAXPHNUM in sys/exec_elf.h, so that it can be used externally. To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.69 src/sys/kern/exec_elf.c cvs rdiff -u -r1.140 -r1.141 src/sys/sys/exec_elf.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/kern/exec_elf.c diff -u src/sys/kern/exec_elf.c:1.68 src/sys/kern/exec_elf.c:1.69 --- src/sys/kern/exec_elf.c:1.68 Sun Jul 6 07:41:41 2014 +++ src/sys/kern/exec_elf.c Tue Jul 8 17:16:25 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: exec_elf.c,v 1.68 2014/07/06 07:41:41 maxv Exp $ */ +/* $NetBSD: exec_elf.c,v 1.69 2014/07/08 17:16:25 maxv Exp $ */ /*- * Copyright (c) 1994, 2000, 2005 The NetBSD Foundation, Inc. @@ -57,7 +57,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(1, $NetBSD: exec_elf.c,v 1.68 2014/07/06 07:41:41 maxv Exp $); +__KERNEL_RCSID(1, $NetBSD: exec_elf.c,v 1.69 2014/07/08 17:16:25 maxv Exp $); #ifdef _KERNEL_OPT #include opt_pax.h @@ -115,13 +115,6 @@ static void elf_free_emul_arg(void *); #define ELF_ROUND(a, b) (((a) + (b) - 1) ~((b) - 1)) #define ELF_TRUNC(a, b) ((a) ~((b) - 1)) -/* - * Arbitrary limits to avoid DoS for excessive memory allocation. - */ -#define MAXPHNUM 128 -#define MAXSHNUM 32768 -#define MAXNOTESIZE 1024 - static void elf_placedynexec(struct lwp *l, struct exec_package *epp, Elf_Ehdr *eh, Elf_Phdr *ph) @@ -304,7 +297,7 @@ elf_check_header(Elf_Ehdr *eh) if (ELF_EHDR_FLAGS_OK(eh) == 0) return ENOEXEC; - if (eh-e_shnum MAXSHNUM || eh-e_phnum MAXPHNUM) + if (eh-e_shnum ELF_MAXSHNUM || eh-e_phnum ELF_MAXPHNUM) return ENOEXEC; return 0; @@ -882,7 +875,7 @@ netbsd_elf_signature(struct lwp *l, stru #endif epp-ep_pax_flags = 0; - if (eh-e_shnum MAXSHNUM || eh-e_shnum == 0) + if (eh-e_shnum ELF_MAXSHNUM || eh-e_shnum == 0) return ENOEXEC; shsize = eh-e_shnum * sizeof(Elf_Shdr); @@ -891,12 +884,12 @@ netbsd_elf_signature(struct lwp *l, stru if (error) goto out; - np = kmem_alloc(MAXNOTESIZE, KM_SLEEP); + np = kmem_alloc(ELF_MAXNOTESIZE, KM_SLEEP); for (i = 0; i eh-e_shnum; i++) { Elf_Shdr *shp = sh[i]; if (shp-sh_type != SHT_NOTE || - shp-sh_size MAXNOTESIZE || + shp-sh_size ELF_MAXNOTESIZE || shp-sh_size sizeof(Elf_Nhdr) + ELF_NOTE_NETBSD_NAMESZ) continue; @@ -1035,7 +1028,7 @@ bad: break; } } - kmem_free(np, MAXNOTESIZE); + kmem_free(np, ELF_MAXNOTESIZE); error = isnetbsd ? 0 : ENOEXEC; out: Index: src/sys/sys/exec_elf.h diff -u src/sys/sys/exec_elf.h:1.140 src/sys/sys/exec_elf.h:1.141 --- src/sys/sys/exec_elf.h:1.140 Sun Mar 9 17:59:19 2014 +++ src/sys/sys/exec_elf.h Tue Jul 8 17:16:25 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: exec_elf.h,v 1.140 2014/03/09 17:59:19 christos Exp $ */ +/* $NetBSD: exec_elf.h,v 1.141 2014/07/08 17:16:25 maxv Exp $ */ /*- * Copyright (c) 1994 The NetBSD Foundation, Inc. @@ -1225,6 +1225,13 @@ typedef Elf32_Versym Elf64_Versym; #ifdef _KERNEL +/* + * Arbitrary limits to avoid DoS for excessive memory allocation. + */ +#define ELF_MAXPHNUM 128 +#define ELF_MAXSHNUM 32768 +#define ELF_MAXNOTESIZE 1024 + #define ELF_AUX_ENTRIES 15 /* Max size of aux array passed to loader */ #define ELF32_NO_ADDR (~(Elf32_Addr)0) /* Indicates addr. not yet filled in */ #define ELF32_LINK_ADDR ((Elf32_Addr)-2) /* advises to use link address */
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Tue Jul 8 17:45:12 UTC 2014 Modified Files: src/sys/dev/pci: pcidevs Log Message: Add some RDC devices. To generate a diff of this commit: cvs rdiff -u -r1.1196 -r1.1197 src/sys/dev/pci/pcidevs 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/pcidevs diff -u src/sys/dev/pci/pcidevs:1.1196 src/sys/dev/pci/pcidevs:1.1197 --- src/sys/dev/pci/pcidevs:1.1196 Thu Jul 3 19:08:31 2014 +++ src/sys/dev/pci/pcidevs Tue Jul 8 17:45:12 2014 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.1196 2014/07/03 19:08:31 msaitoh Exp $ +$NetBSD: pcidevs,v 1.1197 2014/07/08 17:45:12 msaitoh Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -4880,9 +4880,16 @@ product RALINK RT3090 0x3090 RT3090 802 product RATOC REXPCI31 0x0853 REX PCI-31/33 SCSI /* RDC Semiconductor products */ -product RDC IDE 0x1011 RDC IDE controller -product RDC PCIB 0x6036 RDC PCI-ISA bridge -product RDC R6040 0x6040 RDC R6040 10/100 Ethernet +product RDC R1010_IDE 0x1010 R1010 IDE controller +product RDC R1011_IDE 0x1011 R1011 IDE controller +product RDC R1012_IDE 0x1012 R1012 IDE controller +product RDC R6021_HB 0x6021 R6021 Host +product RDC R6025_HB 0x6025 R6025 Host +product RDC R6031_ISA 0x6031 R6031 PCI-ISA bridge +product RDC PCIB 0x6036 R6036 PCI-ISA bridge +product RDC R6040 0x6040 R6040 10/100 Ethernet +product RDC R6060_OHCI 0x6060 R6060 USB OHCI +product RDC R6061_EHCI 0x6061 R6061 USB EHCI /* Realtek products */ product REALTEK RTS5209 0x5209 RTS5209 PCI-E Card Reader
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Tue Jul 8 18:01:26 UTC 2014 Modified Files: src/sys/dev/pci: rdcide.c Log Message: Add support for RDC R1012 IDE controller. Tested on EduCake(Vortex86EX) with sdcard: | read | write | --+-+---+ pciide| 999519| 244574| rdcide| 16011238| 939895| --+-+---+ (bytes/sec) rd: dd if=/dev/rwd0a of=/dev/null bs=1m count=100 wr: dd if=/dev/zero of=/var/tmp/hoge bs=1m count=100 To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/dev/pci/rdcide.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/rdcide.c diff -u src/sys/dev/pci/rdcide.c:1.7 src/sys/dev/pci/rdcide.c:1.8 --- src/sys/dev/pci/rdcide.c:1.7 Tue Jul 31 15:50:36 2012 +++ src/sys/dev/pci/rdcide.c Tue Jul 8 18:01:26 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rdcide.c,v 1.7 2012/07/31 15:50:36 bouyer Exp $ */ +/* $NetBSD: rdcide.c,v 1.8 2014/07/08 18:01:26 msaitoh Exp $ */ /* * Copyright (c) 2011 Manuel Bouyer. @@ -25,7 +25,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rdcide.c,v 1.7 2012/07/31 15:50:36 bouyer Exp $); +__KERNEL_RCSID(0, $NetBSD: rdcide.c,v 1.8 2014/07/08 18:01:26 msaitoh Exp $); #include sys/param.h #include sys/systm.h @@ -46,9 +46,14 @@ static int rdcide_match(device_t, cfdat static void rdcide_attach(device_t, device_t, void *); static const struct pciide_product_desc pciide_intel_products[] = { - { PCI_PRODUCT_RDC_IDE, + { PCI_PRODUCT_RDC_R1011_IDE, 0, - RDC IDE controller, + RDC R1011 IDE controller, + rdcide_chip_map, + }, + { PCI_PRODUCT_RDC_R1012_IDE, + 0, + RDC R1012 IDE controller, rdcide_chip_map, }, };
CVS commit: src/external/bsd/bind/bin/delv
Module Name:src Committed By: martin Date: Tue Jul 8 19:08:43 UTC 2014 Modified Files: src/external/bsd/bind/bin/delv: Makefile Log Message: Add missing -lisccfg (hopefully fixing static builds) To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/bsd/bind/bin/delv/Makefile 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/bind/bin/delv/Makefile diff -u src/external/bsd/bind/bin/delv/Makefile:1.1 src/external/bsd/bind/bin/delv/Makefile:1.2 --- src/external/bsd/bind/bin/delv/Makefile:1.1 Tue Jul 8 05:55:33 2014 +++ src/external/bsd/bind/bin/delv/Makefile Tue Jul 8 19:08:43 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2014/07/08 05:55:33 spz Exp $ +# $NetBSD: Makefile,v 1.2 2014/07/08 19:08:43 martin Exp $ .include bsd.own.mk @@ -10,7 +10,7 @@ BINDIR= /usr/bin DIST=${IDIST}/bin/delv CPPFLAGS+= -I${DIST}/include -I${IDIST}/lib/irs/include -LDADD+=-lirs +LDADD+=-lirs -lisccfg .PATH: ${DIST}
CVS commit: src/sys/fs/msdosfs
Module Name:src Committed By: maxv Date: Tue Jul 8 19:34:47 UTC 2014 Modified Files: src/sys/fs/msdosfs: msdosfs_vfsops.c Log Message: - Perform sanity checks not just for GEMDOSFS, but for all FAT devices. This also fixes a division-by-zero bug that could crash the system. - Define GEMDOSFS_BSIZE instead of a hard-coded 512 value, and remove 'bsize'. - Rename 'tmp' to 'BlkPerSec'. From me, FreeBSD, OpenBSD and the FAT specification. ok christos@ To generate a diff of this commit: cvs rdiff -u -r1.109 -r1.110 src/sys/fs/msdosfs/msdosfs_vfsops.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/msdosfs/msdosfs_vfsops.c diff -u src/sys/fs/msdosfs/msdosfs_vfsops.c:1.109 src/sys/fs/msdosfs/msdosfs_vfsops.c:1.110 --- src/sys/fs/msdosfs/msdosfs_vfsops.c:1.109 Tue Jul 8 09:21:52 2014 +++ src/sys/fs/msdosfs/msdosfs_vfsops.c Tue Jul 8 19:34:47 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: msdosfs_vfsops.c,v 1.109 2014/07/08 09:21:52 hannken Exp $ */ +/* $NetBSD: msdosfs_vfsops.c,v 1.110 2014/07/08 19:34:47 maxv Exp $ */ /*- * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank. @@ -48,7 +48,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: msdosfs_vfsops.c,v 1.109 2014/07/08 09:21:52 hannken Exp $); +__KERNEL_RCSID(0, $NetBSD: msdosfs_vfsops.c,v 1.110 2014/07/08 19:34:47 maxv Exp $); #if defined(_KERNEL_OPT) #include opt_compat_netbsd.h @@ -93,6 +93,8 @@ MODULE(MODULE_CLASS_VFS, msdos, NULL); #define DPRINTF(a) #endif +#define GEMDOSFS_BSIZE 512 + #define MSDOSFS_NAMEMAX(pmp) \ (pmp)-pm_flags MSDOSFSMNT_LONGNAME ? WIN_MAXLEN : 12 @@ -466,8 +468,7 @@ msdosfs_mountfs(struct vnode *devvp, str struct byte_bpb50 *b50; struct byte_bpb710 *b710; uint8_t SecPerClust; - int ronly, error, tmp; - int bsize; + int ronly, error, BlkPerSec; uint64_t psize; unsigned secsize; @@ -496,14 +497,12 @@ msdosfs_mountfs(struct vnode *devvp, str } if (argp-flags MSDOSFSMNT_GEMDOSFS) { - bsize = secsize; - if (bsize != 512) { - DPRINTF((Invalid block bsize %d for GEMDOS\n, bsize)); + if (secsize != GEMDOSFS_BSIZE) { + DPRINTF((Invalid block secsize %d for GEMDOS\n, secsize)); error = EINVAL; goto error_exit; } - } else - bsize = 0; + } /* * Read the boot sector of the filesystem, and then check the @@ -547,19 +546,6 @@ msdosfs_mountfs(struct vnode *devvp, str pmp-pm_Heads = getushort(b50-bpbHeads); pmp-pm_Media = b50-bpbMedia; - if (!(argp-flags MSDOSFSMNT_GEMDOSFS)) { - /* XXX - We should probably check more values here */ - if (!pmp-pm_BytesPerSec || !SecPerClust - || pmp-pm_SecPerTrack 63) { - DPRINTF((bytespersec %d secperclust %d - secpertrack %d\n, - pmp-pm_BytesPerSec, SecPerClust, - pmp-pm_SecPerTrack)); - error = EINVAL; - goto error_exit; - } - } - if (pmp-pm_Sectors == 0) { pmp-pm_HiddenSects = getulong(b50-bpbHiddenSecs); pmp-pm_HugeSectors = getulong(b50-bpbHugeSectors); @@ -568,6 +554,29 @@ msdosfs_mountfs(struct vnode *devvp, str pmp-pm_HugeSectors = pmp-pm_Sectors; } + /* + * Sanity checks, from the FAT specification: + * - sectors per cluster: = 1, power of 2 + * - logical sector size: = 1, power of 2 + * - cluster size:= max FS block size + * - number of sectors: = 1 + */ + if ((SecPerClust == 0) || !powerof2(SecPerClust) || + (pmp-pm_BytesPerSec == 0) || !powerof2(pmp-pm_BytesPerSec) || + (SecPerClust * pmp-pm_BytesPerSec MAXBSIZE) || + (pmp-pm_HugeSectors == 0)) { + DPRINTF((consistency checks\n)); + error = EINVAL; + goto error_exit; + } + + if (!(argp-flags MSDOSFSMNT_GEMDOSFS) + (pmp-pm_SecPerTrack 63)) { + DPRINTF((SecPerTrack %d\n, pmp-pm_SecPerTrack)); + error = EINVAL; + goto error_exit; + } + if (pmp-pm_RootDirEnts == 0) { unsigned short vers = getushort(b710-bpbFSVers); /* @@ -606,17 +615,12 @@ msdosfs_mountfs(struct vnode *devvp, str /* * Check a few values (could do some more): - * - logical sector size: power of 2, = block size - * - sectors per cluster: power of 2, = 1 - * - number of sectors: = 1, = size of partition + * - logical sector size: = block size + * - number of sectors: = size of partition */ - if ( (SecPerClust == 0) - || (SecPerClust (SecPerClust - 1)) - || (pmp-pm_BytesPerSec bsize) - || (pmp-pm_BytesPerSec (pmp-pm_BytesPerSec - 1)) - || (pmp-pm_HugeSectors == 0) - || (pmp-pm_HugeSectors * (pmp-pm_BytesPerSec / bsize) - psize)) { + if ((pmp-pm_BytesPerSec GEMDOSFS_BSIZE) || + (pmp-pm_HugeSectors * + (pmp-pm_BytesPerSec / GEMDOSFS_BSIZE) psize)) { DPRINTF((consistency checks for GEMDOS\n)); error = EINVAL; goto error_exit; @@ -627,14 +631,14 @@ msdosfs_mountfs(struct vnode *devvp, str * always be the same as the number of bytes per disk block * Let's pretend it is. */ - tmp = pmp-pm_BytesPerSec /
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: msaitoh Date: Tue Jul 8 19:35:36 UTC 2014 Modified Files: src/sys/arch/x86/x86: identcpu.c Log Message: Add Vortex86EX. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/arch/x86/x86/identcpu.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/arch/x86/x86/identcpu.c diff -u src/sys/arch/x86/x86/identcpu.c:1.44 src/sys/arch/x86/x86/identcpu.c:1.45 --- src/sys/arch/x86/x86/identcpu.c:1.44 Mon Mar 24 20:06:33 2014 +++ src/sys/arch/x86/x86/identcpu.c Tue Jul 8 19:35:36 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: identcpu.c,v 1.44 2014/03/24 20:06:33 christos Exp $ */ +/* $NetBSD: identcpu.c,v 1.45 2014/07/08 19:35:36 msaitoh Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: identcpu.c,v 1.44 2014/03/24 20:06:33 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: identcpu.c,v 1.45 2014/07/08 19:35:36 msaitoh Exp $); #include opt_xen.h @@ -667,6 +667,9 @@ cpu_probe_vortex86(struct cpu_info *ci) case 0x33504d44: strcpy(cpu_brand_string, Vortex86MX); break; + case 0x37504d44: + strcpy(cpu_brand_string, Vortex86EX); + break; default: strcpy(cpu_brand_string, Unknown Vortex86); break;
CVS commit: src/tests/lib/libbpfjit
Module Name:src Committed By: alnsn Date: Tue Jul 8 21:07:52 UTC 2014 Modified Files: src/tests/lib/libbpfjit: t_bpfjit.c Log Message: Rename bpfjit tests to libbpfjit, don't test zero buflen and a couple of cosmetic changes. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libbpfjit/t_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/tests/lib/libbpfjit/t_bpfjit.c diff -u src/tests/lib/libbpfjit/t_bpfjit.c:1.5 src/tests/lib/libbpfjit/t_bpfjit.c:1.6 --- src/tests/lib/libbpfjit/t_bpfjit.c:1.5 Tue Jun 24 10:53:30 2014 +++ src/tests/lib/libbpfjit/t_bpfjit.c Tue Jul 8 21:07:52 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: t_bpfjit.c,v 1.5 2014/06/24 10:53:30 alnsn Exp $ */ +/* $NetBSD: t_bpfjit.c,v 1.6 2014/07/08 21:07:52 alnsn Exp $ */ /*- * Copyright (c) 2011-2012, 2014 Alexander Nasonov. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: t_bpfjit.c,v 1.5 2014/06/24 10:53:30 alnsn Exp $); +__RCSID($NetBSD: t_bpfjit.c,v 1.6 2014/07/08 21:07:52 alnsn Exp $); #include atf-c.h #include stdint.h @@ -56,28 +56,28 @@ unsigned int jitcall(bpfjit_func_t fn, return fn(NULL, args); } -ATF_TC(bpfjit_empty); -ATF_TC_HEAD(bpfjit_empty, tc) +ATF_TC(libbpfjit_empty); +ATF_TC_HEAD(libbpfjit_empty, tc) { atf_tc_set_md_var(tc, descr, - Test that JIT compilation for an empty bpf program fails); + Test that JIT compilation of an empty bpf program fails); } -ATF_TC_BODY(bpfjit_empty, tc) +ATF_TC_BODY(libbpfjit_empty, tc) { struct bpf_insn dummy; ATF_CHECK(bpfjit_generate_code(NULL, dummy, 0) == NULL); } -ATF_TC(bpfjit_alu_add_k); -ATF_TC_HEAD(bpfjit_alu_add_k, tc) +ATF_TC(libbpfjit_alu_add_k); +ATF_TC_HEAD(libbpfjit_alu_add_k, tc) { atf_tc_set_md_var(tc, descr, Test JIT compilation of BPF_ALU+BPF_ADD+BPF_K); } -ATF_TC_BODY(bpfjit_alu_add_k, tc) +ATF_TC_BODY(libbpfjit_alu_add_k, tc) { static struct bpf_insn insns[] = { BPF_STMT(BPF_LD+BPF_IMM, 3), @@ -100,14 +100,14 @@ ATF_TC_BODY(bpfjit_alu_add_k, tc) bpfjit_free_code(code); } -ATF_TC(bpfjit_alu_sub_k); -ATF_TC_HEAD(bpfjit_alu_sub_k, tc) +ATF_TC(libbpfjit_alu_sub_k); +ATF_TC_HEAD(libbpfjit_alu_sub_k, tc) { atf_tc_set_md_var(tc, descr, Test JIT compilation of BPF_ALU+BPF_SUB+BPF_K); } -ATF_TC_BODY(bpfjit_alu_sub_k, tc) +ATF_TC_BODY(libbpfjit_alu_sub_k, tc) { static struct bpf_insn insns[] = { BPF_STMT(BPF_LD+BPF_IMM, 1), @@ -130,14 +130,14 @@ ATF_TC_BODY(bpfjit_alu_sub_k, tc) bpfjit_free_code(code); } -ATF_TC(bpfjit_alu_mul_k); -ATF_TC_HEAD(bpfjit_alu_mul_k, tc) +ATF_TC(libbpfjit_alu_mul_k); +ATF_TC_HEAD(libbpfjit_alu_mul_k, tc) { atf_tc_set_md_var(tc, descr, Test JIT compilation of BPF_ALU+BPF_MUL+BPF_K); } -ATF_TC_BODY(bpfjit_alu_mul_k, tc) +ATF_TC_BODY(libbpfjit_alu_mul_k, tc) { static struct bpf_insn insns[] = { BPF_STMT(BPF_LD+BPF_IMM, UINT32_C(0x)), @@ -160,14 +160,14 @@ ATF_TC_BODY(bpfjit_alu_mul_k, tc) bpfjit_free_code(code); } -ATF_TC(bpfjit_alu_div0_k); -ATF_TC_HEAD(bpfjit_alu_div0_k, tc) +ATF_TC(libbpfjit_alu_div0_k); +ATF_TC_HEAD(libbpfjit_alu_div0_k, tc) { atf_tc_set_md_var(tc, descr, Test JIT compilation of BPF_ALU+BPF_DIV+BPF_K with k=0); } -ATF_TC_BODY(bpfjit_alu_div0_k, tc) +ATF_TC_BODY(libbpfjit_alu_div0_k, tc) { static struct bpf_insn insns[] = { BPF_STMT(BPF_ALU+BPF_DIV+BPF_K, 0), @@ -189,14 +189,14 @@ ATF_TC_BODY(bpfjit_alu_div0_k, tc) bpfjit_free_code(code); } -ATF_TC(bpfjit_alu_div1_k); -ATF_TC_HEAD(bpfjit_alu_div1_k, tc) +ATF_TC(libbpfjit_alu_div1_k); +ATF_TC_HEAD(libbpfjit_alu_div1_k, tc) { atf_tc_set_md_var(tc, descr, Test JIT compilation of BPF_ALU+BPF_DIV+BPF_K with k=1); } -ATF_TC_BODY(bpfjit_alu_div1_k, tc) +ATF_TC_BODY(libbpfjit_alu_div1_k, tc) { static struct bpf_insn insns[] = { BPF_STMT(BPF_LD+BPF_IMM, 7), @@ -219,14 +219,14 @@ ATF_TC_BODY(bpfjit_alu_div1_k, tc) bpfjit_free_code(code); } -ATF_TC(bpfjit_alu_div2_k); -ATF_TC_HEAD(bpfjit_alu_div2_k, tc) +ATF_TC(libbpfjit_alu_div2_k); +ATF_TC_HEAD(libbpfjit_alu_div2_k, tc) { atf_tc_set_md_var(tc, descr, Test JIT compilation of BPF_ALU+BPF_DIV+BPF_K with k=2); } -ATF_TC_BODY(bpfjit_alu_div2_k, tc) +ATF_TC_BODY(libbpfjit_alu_div2_k, tc) { static struct bpf_insn insns[] = { BPF_STMT(BPF_LD+BPF_IMM, 7), @@ -249,14 +249,14 @@ ATF_TC_BODY(bpfjit_alu_div2_k, tc) bpfjit_free_code(code); } -ATF_TC(bpfjit_alu_div4_k); -ATF_TC_HEAD(bpfjit_alu_div4_k, tc) +ATF_TC(libbpfjit_alu_div4_k); +ATF_TC_HEAD(libbpfjit_alu_div4_k, tc) { atf_tc_set_md_var(tc, descr, Test JIT compilation of BPF_ALU+BPF_DIV+BPF_K with k=4); } -ATF_TC_BODY(bpfjit_alu_div4_k, tc) +ATF_TC_BODY(libbpfjit_alu_div4_k, tc) { static struct bpf_insn insns[] = { BPF_STMT(BPF_LD+BPF_IMM, UINT32_C(0x)), @@ -279,14 +279,14 @@ ATF_TC_BODY(bpfjit_alu_div4_k, tc) bpfjit_free_code(code); }
CVS commit: src/tests/lib/libbpfjit
Module Name:src Committed By: alnsn Date: Tue Jul 8 21:13:01 UTC 2014 Modified Files: src/tests/lib/libbpfjit: t_cop.c t_extmem.c Log Message: Rename bpfjit tests to libbpfjit. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libbpfjit/t_cop.c cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libbpfjit/t_extmem.c 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/t_cop.c diff -u src/tests/lib/libbpfjit/t_cop.c:1.2 src/tests/lib/libbpfjit/t_cop.c:1.3 --- src/tests/lib/libbpfjit/t_cop.c:1.2 Wed Jun 25 18:16:40 2014 +++ src/tests/lib/libbpfjit/t_cop.c Tue Jul 8 21:13:01 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: t_cop.c,v 1.2 2014/06/25 18:16:40 alnsn Exp $ */ +/* $NetBSD: t_cop.c,v 1.3 2014/07/08 21:13:01 alnsn Exp $ */ /*- * Copyright (c) 2013-2014 Alexander Nasonov. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: t_cop.c,v 1.2 2014/06/25 18:16:40 alnsn Exp $); +__RCSID($NetBSD: t_cop.c,v 1.3 2014/07/08 21:13:01 alnsn Exp $); #include atf-c.h #include stdint.h @@ -101,14 +101,14 @@ setARG(const bpf_ctx_t *bc, bpf_args_t * return old; } -ATF_TC(bpfjit_cop_no_ctx); -ATF_TC_HEAD(bpfjit_cop_no_ctx, tc) +ATF_TC(libbpfjit_cop_no_ctx); +ATF_TC_HEAD(libbpfjit_cop_no_ctx, tc) { atf_tc_set_md_var(tc, descr, Test that bpf program with BPF_COP instruction isn't valid without a context); } -ATF_TC_BODY(bpfjit_cop_no_ctx, tc) +ATF_TC_BODY(libbpfjit_cop_no_ctx, tc) { static struct bpf_insn insns[] = { BPF_STMT(BPF_MISC+BPF_COP, 0), @@ -125,14 +125,14 @@ ATF_TC_BODY(bpfjit_cop_no_ctx, tc) ATF_CHECK(code == NULL); } -ATF_TC(bpfjit_cop_ret_A); -ATF_TC_HEAD(bpfjit_cop_ret_A, tc) +ATF_TC(libbpfjit_cop_ret_A); +ATF_TC_HEAD(libbpfjit_cop_ret_A, tc) { atf_tc_set_md_var(tc, descr, Test coprocessor function that returns a content of the A register); } -ATF_TC_BODY(bpfjit_cop_ret_A, tc) +ATF_TC_BODY(libbpfjit_cop_ret_A, tc) { static struct bpf_insn insns[] = { BPF_STMT(BPF_LD+BPF_IMM, 13), @@ -158,14 +158,14 @@ ATF_TC_BODY(bpfjit_cop_ret_A, tc) bpfjit_free_code(code); } -ATF_TC(bpfjit_cop_ret_buflen); -ATF_TC_HEAD(bpfjit_cop_ret_buflen, tc) +ATF_TC(libbpfjit_cop_ret_buflen); +ATF_TC_HEAD(libbpfjit_cop_ret_buflen, tc) { atf_tc_set_md_var(tc, descr, Test coprocessor function that returns the buflen argument); } -ATF_TC_BODY(bpfjit_cop_ret_buflen, tc) +ATF_TC_BODY(libbpfjit_cop_ret_buflen, tc) { static struct bpf_insn insns[] = { BPF_STMT(BPF_LD+BPF_IMM, 13), @@ -191,14 +191,14 @@ ATF_TC_BODY(bpfjit_cop_ret_buflen, tc) bpfjit_free_code(code); } -ATF_TC(bpfjit_cop_ret_wirelen); -ATF_TC_HEAD(bpfjit_cop_ret_wirelen, tc) +ATF_TC(libbpfjit_cop_ret_wirelen); +ATF_TC_HEAD(libbpfjit_cop_ret_wirelen, tc) { atf_tc_set_md_var(tc, descr, Test coprocessor function that returns the wirelen argument); } -ATF_TC_BODY(bpfjit_cop_ret_wirelen, tc) +ATF_TC_BODY(libbpfjit_cop_ret_wirelen, tc) { static struct bpf_insn insns[] = { BPF_STMT(BPF_LD+BPF_IMM, 13), @@ -224,14 +224,14 @@ ATF_TC_BODY(bpfjit_cop_ret_wirelen, tc) bpfjit_free_code(code); } -ATF_TC(bpfjit_cop_ret_nfuncs); -ATF_TC_HEAD(bpfjit_cop_ret_nfuncs, tc) +ATF_TC(libbpfjit_cop_ret_nfuncs); +ATF_TC_HEAD(libbpfjit_cop_ret_nfuncs, tc) { atf_tc_set_md_var(tc, descr, Test coprocessor function that returns nfuncs member of the context argument); } -ATF_TC_BODY(bpfjit_cop_ret_nfuncs, tc) +ATF_TC_BODY(libbpfjit_cop_ret_nfuncs, tc) { static struct bpf_insn insns[] = { BPF_STMT(BPF_LD+BPF_IMM, 13), @@ -257,14 +257,14 @@ ATF_TC_BODY(bpfjit_cop_ret_nfuncs, tc) bpfjit_free_code(code); } -ATF_TC(bpfjit_cop_side_effect); -ATF_TC_HEAD(bpfjit_cop_side_effect, tc) +ATF_TC(libbpfjit_cop_side_effect); +ATF_TC_HEAD(libbpfjit_cop_side_effect, tc) { atf_tc_set_md_var(tc, descr, Test that ABC optimization doesn't skip BPF_COP call); } -ATF_TC_BODY(bpfjit_cop_side_effect, tc) +ATF_TC_BODY(libbpfjit_cop_side_effect, tc) { static struct bpf_insn insns[] = { BPF_STMT(BPF_LD+BPF_IMM, 13), @@ -296,14 +296,14 @@ ATF_TC_BODY(bpfjit_cop_side_effect, tc) bpfjit_free_code(code); } -ATF_TC(bpfjit_cop_invalid_index); -ATF_TC_HEAD(bpfjit_cop_invalid_index, tc) +ATF_TC(libbpfjit_cop_invalid_index); +ATF_TC_HEAD(libbpfjit_cop_invalid_index, tc) { atf_tc_set_md_var(tc, descr, Test that out-of-range coprocessor function fails validation); } -ATF_TC_BODY(bpfjit_cop_invalid_index, tc) +ATF_TC_BODY(libbpfjit_cop_invalid_index, tc) { static struct bpf_insn insns[] = { BPF_STMT(BPF_LD+BPF_IMM, 13), @@ -316,14 +316,14 @@ ATF_TC_BODY(bpfjit_cop_invalid_index, tc ATF_CHECK(bpfjit_generate_code(ctx, insns, insn_count) == NULL); } -ATF_TC(bpfjit_copx_no_ctx); -ATF_TC_HEAD(bpfjit_copx_no_ctx, tc) +ATF_TC(libbpfjit_copx_no_ctx); +ATF_TC_HEAD(libbpfjit_copx_no_ctx, tc) { atf_tc_set_md_var(tc, descr, Test that
CVS commit: src/tests/net/bpfjit
Module Name:src Committed By: alnsn Date: Tue Jul 8 21:45:55 UTC 2014 Added Files: src/tests/net/bpfjit: t_mbuf.c Log Message: Move bpfjit mbuf tests to t_mbuf.c. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/tests/net/bpfjit/t_mbuf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/tests/net/bpfjit/t_mbuf.c diff -u /dev/null src/tests/net/bpfjit/t_mbuf.c:1.1 --- /dev/null Tue Jul 8 21:45:55 2014 +++ src/tests/net/bpfjit/t_mbuf.c Tue Jul 8 21:45:55 2014 @@ -0,0 +1,982 @@ +/* $NetBSD: t_mbuf.c,v 1.1 2014/07/08 21:45:55 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 sys/cdefs.h +__RCSID($NetBSD: t_mbuf.c,v 1.1 2014/07/08 21:45:55 alnsn Exp $); + +#include sys/param.h +#include sys/mbuf.h + +#include net/bpf.h +#include net/bpfjit.h + +#include stdint.h +#include string.h + +#include rump/rump.h +#include rump/rump_syscalls.h + +#include ../../net/bpf/h_bpf.h + +/* XXX: atf-c.h has collisions with mbuf */ +#undef m_type +#undef m_data +#include atf-c.h + +#include ../../h_macros.h + +static bool +test_ldb_abs(size_t split) +{ + /* Return a product of all packet bytes. */ + static struct bpf_insn insns[] = { + BPF_STMT(BPF_LDX+BPF_W+BPF_IMM, 1), /* X - 1 */ + + BPF_STMT(BPF_LD+BPF_B+BPF_ABS, 0), /* A - P[0] */ + BPF_STMT(BPF_ALU+BPF_MUL+BPF_X, 0), /* A - A * X */ + BPF_STMT(BPF_MISC+BPF_TAX, 0), /* X - A */ + + BPF_STMT(BPF_LD+BPF_B+BPF_ABS, 1), /* A - P[1] */ + BPF_STMT(BPF_ALU+BPF_MUL+BPF_X, 0), /* A - A * X */ + BPF_STMT(BPF_MISC+BPF_TAX, 0), /* X - A */ + + BPF_STMT(BPF_LD+BPF_B+BPF_ABS, 2), /* A - P[2] */ + BPF_STMT(BPF_ALU+BPF_MUL+BPF_X, 0), /* A - A * X */ + BPF_STMT(BPF_MISC+BPF_TAX, 0), /* X - A */ + + BPF_STMT(BPF_LD+BPF_B+BPF_ABS, 3), /* A - P[3] */ + BPF_STMT(BPF_ALU+BPF_MUL+BPF_X, 0), /* A - A * X */ + BPF_STMT(BPF_MISC+BPF_TAX, 0), /* X - A */ + + BPF_STMT(BPF_LD+BPF_B+BPF_ABS, 4), /* A - P[4] */ + BPF_STMT(BPF_ALU+BPF_MUL+BPF_X, 0), /* A - A * X */ + BPF_STMT(BPF_RET+BPF_A, 0), /* ret A */ + }; + + static unsigned char P[] = { 1, 2, 3, 4, 5 }; + const unsigned int res = 120; + const size_t insn_count = sizeof(insns) / sizeof(insns[0]); + + if (!prog_validate(insns, insn_count)) + return false; + + return exec_prog_mchain2(insns, insn_count, P, sizeof(P), split) == res; +} + +static bool +test_ldh_abs(size_t split) +{ + static struct bpf_insn insns[] = { + BPF_STMT(BPF_LD+BPF_H+BPF_ABS, 0), /* A - P[0:2] */ + BPF_STMT(BPF_ALU+BPF_ADD+BPF_X, 0), /* A - A + X */ + BPF_STMT(BPF_MISC+BPF_TAX, 0), /* X - A */ + + BPF_STMT(BPF_LD+BPF_H+BPF_ABS, 1), /* A - P[1:2] */ + BPF_STMT(BPF_ALU+BPF_ADD+BPF_X, 0), /* A - A + X */ + BPF_STMT(BPF_MISC+BPF_TAX, 0), /* X - A */ + + BPF_STMT(BPF_LD+BPF_H+BPF_ABS, 2), /* A - P[2:2] */ + BPF_STMT(BPF_ALU+BPF_ADD+BPF_X, 0), /* A - A + X */ + BPF_STMT(BPF_MISC+BPF_TAX, 0), /* X - A */ + + BPF_STMT(BPF_LD+BPF_H+BPF_ABS, 3), /* A - P[3:2] */ + BPF_STMT(BPF_ALU+BPF_ADD+BPF_X, 0), /* A - A + X */ + BPF_STMT(BPF_RET+BPF_A, 0), /* ret A*/ + }; + + static unsigned char P[] = { 1, 2, 3, 4, 5 }; + const unsigned int res = 0x0a0e; /* 10 14 */ + const size_t insn_count = sizeof(insns) / sizeof(insns[0]); + + if (!prog_validate(insns, insn_count)) + return false; + + return exec_prog_mchain2(insns, insn_count, P, sizeof(P), split) == res; +} + +static bool +test_ldw_abs(size_t split) +{ + static struct bpf_insn insns[] = { + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 0), /* A -
CVS commit: src
Module Name:src Committed By: alnsn Date: Tue Jul 8 21:47:22 UTC 2014 Modified Files: src/distrib/sets/lists/debug: mi src/distrib/sets/lists/tests: mi src/tests/net/bpfjit: Makefile Log Message: Add t_mbuf tests to the build. To generate a diff of this commit: cvs rdiff -u -r1.69 -r1.70 src/distrib/sets/lists/debug/mi cvs rdiff -u -r1.577 -r1.578 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.2 -r1.3 src/tests/net/bpfjit/Makefile 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/debug/mi diff -u src/distrib/sets/lists/debug/mi:1.69 src/distrib/sets/lists/debug/mi:1.70 --- src/distrib/sets/lists/debug/mi:1.69 Tue Jul 8 11:13:24 2014 +++ src/distrib/sets/lists/debug/mi Tue Jul 8 21:47:21 2014 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.69 2014/07/08 11:13:24 martin Exp $ +# $NetBSD: mi,v 1.70 2014/07/08 21:47:21 alnsn Exp $ ./etc/mtree/set.debug comp-sys-root ./usr/lib/i18n/libBIG5_g.a comp-c-debuglib debuglib @@ -2131,6 +2131,7 @@ ./usr/libdata/debug/usr/tests/net/bpf/t_mbuf.debug tests-net-debug debug,atf,rump ./usr/libdata/debug/usr/tests/net/bpfilter/t_bpfilter.debug tests-net-debug debug,atf,rump ./usr/libdata/debug/usr/tests/net/bpfjit/t_bpfjit.debug tests-net-debug debug,atf,sljit,rump +./usr/libdata/debug/usr/tests/net/bpfjit/t_mbuf.debug tests-net-debug debug,atf,sljit,rump ./usr/libdata/debug/usr/tests/net/carp/t_basic.debug tests-net-debug debug,atf,rump ./usr/libdata/debug/usr/tests/net/fdpass/fdpass32.debug tests-net-debug debug,atf ./usr/libdata/debug/usr/tests/net/fdpass/fdpass64.debug tests-net-debug debug,atf Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.577 src/distrib/sets/lists/tests/mi:1.578 --- src/distrib/sets/lists/tests/mi:1.577 Mon Jul 7 19:41:22 2014 +++ src/distrib/sets/lists/tests/mi Tue Jul 8 21:47:21 2014 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.577 2014/07/07 19:41:22 alnsn Exp $ +# $NetBSD: mi,v 1.578 2014/07/08 21:47:21 alnsn Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -3090,6 +3090,7 @@ ./usr/tests/net/bpfjit/Atffile tests-net-tests atf,sljit,rump ./usr/tests/net/bpfjit/Kyuafile tests-net-tests atf,sljit,rump,kyua ./usr/tests/net/bpfjit/t_bpfjit tests-net-tests atf,sljit,rump +./usr/tests/net/bpfjit/t_mbuf tests-net-tests atf,sljit,rump ./usr/tests/net/carptests-net-tests ./usr/tests/net/carp/Atffile tests-net-tests atf,rump ./usr/tests/net/carp/Kyuafile tests-net-tests atf,rump,kyua Index: src/tests/net/bpfjit/Makefile diff -u src/tests/net/bpfjit/Makefile:1.2 src/tests/net/bpfjit/Makefile:1.3 --- src/tests/net/bpfjit/Makefile:1.2 Mon Jun 30 21:34:22 2014 +++ src/tests/net/bpfjit/Makefile Tue Jul 8 21:47:22 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2014/06/30 21:34:22 alnsn Exp $ +# $NetBSD: Makefile,v 1.3 2014/07/08 21:47:22 alnsn Exp $ # .include bsd.own.mk @@ -6,6 +6,7 @@ TESTSDIR= ${TESTSBASE}/net/bpfjit TESTS_C= t_bpfjit +TESTS_C+= t_mbuf LDADD+= -lrumpnet_bpfjit -lrumpkern_sljit LDADD+= -lrumpdev_bpf -lrumpnet_net -lrumpnet
CVS commit: src/distrib/sets/lists/debug
Module Name:src Committed By: riastradh Date: Tue Jul 8 22:06:06 UTC 2014 Modified Files: src/distrib/sets/lists/debug: md.amd64 Log Message: Add missing i386/libirs_g.a. To generate a diff of this commit: cvs rdiff -u -r1.58 -r1.59 src/distrib/sets/lists/debug/md.amd64 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/debug/md.amd64 diff -u src/distrib/sets/lists/debug/md.amd64:1.58 src/distrib/sets/lists/debug/md.amd64:1.59 --- src/distrib/sets/lists/debug/md.amd64:1.58 Tue Jul 8 17:15:14 2014 +++ src/distrib/sets/lists/debug/md.amd64 Tue Jul 8 22:06:06 2014 @@ -1,4 +1,4 @@ -# $NetBSD: md.amd64,v 1.58 2014/07/08 17:15:14 htodd Exp $ +# $NetBSD: md.amd64,v 1.59 2014/07/08 22:06:06 riastradh Exp $ ./usr/lib/i386/i18n/libBIG5_g.a comp-c-debuglib compat,debuglib ./usr/lib/i386/i18n/libDECHanyu_g.a comp-c-debuglib compat,debuglib ./usr/lib/i386/i18n/libEUCTW_g.a comp-c-debuglib compat,debuglib @@ -74,6 +74,7 @@ ./usr/lib/i386/libiberty_g.a comp-c-debuglib compat,debuglib ./usr/lib/i386/libintl_g.a comp-c-debuglib compat,debuglib ./usr/lib/i386/libipsec_g.a comp-c-debuglib compat,debuglib +./usr/lib/i386/libirs_g.a comp-c-debuglib compat,debuglib ./usr/lib/i386/libisc_g.a comp-c-debuglib compat,debuglib ./usr/lib/i386/libisccc_g.a comp-c-debuglib compat,debuglib ./usr/lib/i386/libisccfg_g.a comp-c-debuglib compat,debuglib
CVS import: xsrc/external/mit/MesaDemos/dist
Module Name:xsrc Committed By: riastradh Date: Tue Jul 8 22:14:20 UTC 2014 Update of /cvsroot/xsrc/external/mit/MesaDemos/dist In directory ivanova.netbsd.org:/tmp/cvs-serv12919 Log Message: import mesa-demos-8.1.0 glxinfo and glxgears only, since that's all we build. This is a test run to make sure I don't make a hash of the repository before I import MesaLib and MesaGLUT updates. mesa-demos-8.2.0 requires newer Mesa APIs, so we'll defer importing that until the rest of Mesa is updated. Status: Vendor Tag: xorg Release Tags: mesa-demos-8-1-0 N xsrc/external/mit/MesaDemos/dist/src/xdemos/glxgears.c N xsrc/external/mit/MesaDemos/dist/src/xdemos/glxinfo.c No conflicts created by this import
CVS commit: xsrc/external/mit/MesaDemos/dist
Module Name:xsrc Committed By: riastradh Date: Tue Jul 8 22:18:40 UTC 2014 Removed Files: xsrc/external/mit/MesaDemos/dist/include/GL: glew.h glxew.h wglew.h xsrc/external/mit/MesaDemos/dist/progs/beos: GLInfo.cpp Makefile demo.cpp sample.cpp xsrc/external/mit/MesaDemos/dist/progs/demos: Makefile Makefile.cygnus Makefile.win README arbfplight.c arbfslight.c arbocclude.c arbocclude2.c bounce.c clearspd.c copypix.c cubemap.c descrip.mms dinoshade.c dissolve.c drawpix.c engine.c fbo_firecube.c fbotexture.c fire.c fogcoord.c fplight.c fslight.c gamma.c gearbox.c gears.c geartrain.c geartrain.dat glinfo.c gloss.c gltestperf.c ipers.c isosurf.c isosurf.dat lodbias.c morph3d.c multiarb.c paltex.c particles.cxx particles.h pointblast.c projtex.c rain.cxx ray.c readpix.c reflect.c renormal.c shadowtex.c singlebuffer.c spectex.c spriteblast.c stex3d.c teapot.c terrain.c terrain.dat tessdemo.c texcyl.c texenv.c textures.c trispd.c tunnel.c tunnel2.c tunneldat.h vao_demo.c winpos.c xsrc/external/mit/MesaDemos/dist/progs/egl: Makefile demo1.c demo2.c demo3.c eglgears.c eglinfo.c eglscreen.c egltri.c peglgears.c xegl_tri.c xeglgears.c xeglthreads.c xsrc/external/mit/MesaDemos/dist/progs/es1/screen: Makefile gears.c tri.c winsys.c winsys.h xsrc/external/mit/MesaDemos/dist/progs/es1/xegl: Makefile bindtex.c drawtex.c es1_info.c msaa.c pbuffer.c render_tex.c torus.c tri.c two_win.c xsrc/external/mit/MesaDemos/dist/progs/es2/xegl: Makefile tri.c xsrc/external/mit/MesaDemos/dist/progs/fbdev: Makefile glfbdevtest.c xsrc/external/mit/MesaDemos/dist/progs/glsl: CH06-brick.frag CH06-brick.vert CH11-bumpmap.frag CH11-bumpmap.vert CH11-bumpmaptex.frag CH11-toyball.frag CH11-toyball.vert CH18-mandel.frag CH18-mandel.vert Makefile array.c bitmap.c brick.c brick.shtest bump.c convolution.frag convolution.vert convolutions.c cubemap.frag deriv.c fragcoord.c identity.c linktest.c mandelbrot.c mandelbrot.shtest multinoise.c multitex.c multitex.frag multitex.shtest multitex.vert noise.c noise2.c pointcoord.c points.c reflect.vert samplers.c shadow_sampler.c shadowtex.frag shtest.c simple.vert skinning.c skinning.frag skinning.vert texaaline.c texdemo1.c toyball.c toyball.shtest trirast.c twoside.c vert-or-frag-only.c vert-tex.c xsrc/external/mit/MesaDemos/dist/progs/images: arch.rgb bw.rgb girl.rgb girl2.rgb reflect.rgb s128.rgb tile.rgb tree2.rgba tree3.rgb wrs_logo.rgb xsrc/external/mit/MesaDemos/dist/progs/objviewer: GreatLakesBiplaneHP.mtl Makefile README.txt alpine_down.rgb alpine_east.rgb alpine_north.rgb alpine_south.rgb alpine_up.rgb alpine_west.rgb bobcat.mtl glm.c glm.h glmdraw.c objview.c skybox.c skybox.h xsrc/external/mit/MesaDemos/dist/progs/openvg/demos: Makefile eglcommon.c eglcommon.h lion-render.c lion-render.h lion.c sp.c xsrc/external/mit/MesaDemos/dist/progs/openvg/trivial: Makefile arc.c cap.c clear.c coord.c dash.c eglcommon.c eglcommon.h ellipse.c filter.c gradorigin.c lineto.c lingrad.c lookup.c mask.c mask4.c path3.c radialgrad.c readpixels.c roundedrect.c star-nonzero.c star-oddeven.c stroke.c stroke2.c vguarc.c xsrc/external/mit/MesaDemos/dist/progs/osdemos: Makefile osdemo.c osdemo16.c osdemo32.c ostest1.c xsrc/external/mit/MesaDemos/dist/progs/redbook: Makefile Makefile.win README aaindex.c aapoly.c aargb.c accanti.c accpersp.c alpha.c alpha3D.c anti.c bezcurve.c bezmesh.c checker.c clip.c colormat.c combiner.c convolution.c cube.c cubemap.c depthcue.c dof.c double.c drawf.c feedback.c fog.c fogcoord.c fogindex.c font.c hello.c histogram.c image.c jitter.h light.c lines.c list.c material.c minmax.c mipmap.c model.c movelight.c multisamp.c multitex.c mvarray.c nurbs.c pickdepth.c picksquare.c plane.c planet.c pointp.c polyoff.c polys.c quadric.c robot.c sccolorlight.c scene.c scenebamb.c sceneflat.c select.c shadowmap.c smooth.c stencil.c stroke.c surface.c surfpoints.c teaambient.c teapots.c tess.c tesswind.c texbind.c texgen.c texprox.c texsub.c texture3d.c texturesurf.c torus.c trim.c unproject.c varray.c wrap.c xsrc/external/mit/MesaDemos/dist/progs/samples: Makefile Makefile.dja Makefile.mgw Makefile.win README accum.c bitmap1.c bitmap2.c blendeq.c blendxor.c copy.c cursor.c depth.c eval.c fog.c font.c line.c
CVS commit: src/external/mit/xorg/bin
Module Name:src Committed By: riastradh Date: Tue Jul 8 22:29:12 UTC 2014 Modified Files: src/external/mit/xorg/bin/glxgears: Makefile src/external/mit/xorg/bin/glxinfo: Makefile Log Message: Update glxinfo/glxgears reachover makefiles for mesa-demos update. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/mit/xorg/bin/glxgears/Makefile cvs rdiff -u -r1.3 -r1.4 src/external/mit/xorg/bin/glxinfo/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/bin/glxgears/Makefile diff -u src/external/mit/xorg/bin/glxgears/Makefile:1.2 src/external/mit/xorg/bin/glxgears/Makefile:1.3 --- src/external/mit/xorg/bin/glxgears/Makefile:1.2 Sun Sep 7 14:07:21 2008 +++ src/external/mit/xorg/bin/glxgears/Makefile Tue Jul 8 22:29:12 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2008/09/07 14:07:21 lukem Exp $ +# $NetBSD: Makefile,v 1.3 2014/07/08 22:29:12 riastradh Exp $ NOMAN= # defined @@ -11,7 +11,7 @@ CPPFLAGS+=${X11FLAGS.THREADS} LDADD+= -lGL -lXext -lX11 -lpthread -lm DPADD+= ${LIBGL} ${LIBXEXT} ${LIBX11} ${LIBPTHREAD} ${LIBM} -.PATH: ${X11SRCDIR.MesaDemos}/progs/xdemos +.PATH: ${X11SRCDIR.MesaDemos}/src/xdemos .include bsd.x11.mk .include bsd.prog.mk Index: src/external/mit/xorg/bin/glxinfo/Makefile diff -u src/external/mit/xorg/bin/glxinfo/Makefile:1.3 src/external/mit/xorg/bin/glxinfo/Makefile:1.4 --- src/external/mit/xorg/bin/glxinfo/Makefile:1.3 Thu Sep 12 17:14:20 2013 +++ src/external/mit/xorg/bin/glxinfo/Makefile Tue Jul 8 22:29:12 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2013/09/12 17:14:20 joerg Exp $ +# $NetBSD: Makefile,v 1.4 2014/07/08 22:29:12 riastradh Exp $ NOMAN= # defined @@ -15,7 +15,7 @@ CPPFLAGS+=${X11FLAGS.THREADS} -DDO_GLU LDADD+= -lGLU -lGL -lXext -lX11 -lpthread -lm DPADD+= ${LIBGLU} ${LIBGL} ${LIBXEXT} ${LIBX11} ${LIBPTHREAD} ${LIBM} -.PATH: ${X11SRCDIR.MesaDemos}/progs/xdemos +.PATH: ${X11SRCDIR.MesaDemos}/src/xdemos .include bsd.x11.mk .include bsd.prog.mk
CVS commit: src/doc
Module Name:src Committed By: riastradh Date: Tue Jul 8 22:39:38 UTC 2014 Modified Files: src/doc: 3RDPARTY Log Message: Note mesa-demos in 3RDPARTY. To generate a diff of this commit: cvs rdiff -u -r1.1131 -r1.1132 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.1131 src/doc/3RDPARTY:1.1132 --- src/doc/3RDPARTY:1.1131 Tue Jul 8 06:01:47 2014 +++ src/doc/3RDPARTY Tue Jul 8 22:39:38 2014 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1131 2014/07/08 06:01:47 spz Exp $ +# $NetBSD: 3RDPARTY,v 1.1132 2014/07/08 22:39:38 riastradh Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -799,6 +799,21 @@ License: BSD (2-clause) Location: external/bsd/mdocml/dist Notes: +Package: mesa-demos +Version: 8.1.0 +Current Vers: 8.2.0 +Maintainer: mesa-git@? +Archive Site: ftp://ftp.freedesktop.org/pub/mesa/demos/ +Home Page: http://www.mesa3d.org/ +Mailing List: +Responsible: riastradh, mrg +License: ISC +Location: xsrc/external/mit/MesaDemos/dist +Notes: +We use only glxinfo and glxgears. Delete all else on import. +Vendor tag: xorg +Release tag: mesa-demos-X-Y-Z + Package: mesa-drm Version: git 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c Current Vers:
CVS commit: src/doc
Module Name:src Committed By: dholland Date: Wed Jul 9 04:53:35 UTC 2014 Modified Files: src/doc: CHANGES Log Message: Mention /usr/share/doc/changes. To generate a diff of this commit: cvs rdiff -u -r1.1942 -r1.1943 src/doc/CHANGES 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 diff -u src/doc/CHANGES:1.1942 src/doc/CHANGES:1.1943 --- src/doc/CHANGES:1.1942 Tue Jul 8 06:01:47 2014 +++ src/doc/CHANGES Wed Jul 9 04:53:35 2014 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1942 $ +# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1943 $ # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -435,5 +435,7 @@ Changes from NetBSD 6.0 to NetBSD 7.0: dhcpcd(8): Import dhcpcd-6.4.0 [roy 20140614] pigz(1): Update to pigz-2.3.1 [tls 20140615] gdb(1): Updated to 7.7.1. [christos 20140622] + /usr/share/doc: Install formatted docs instead of nroff sources, + and reorganize. [dholland 20140705] postfix(1): Import version 2.11.1 [tron 20140706] bind: Import version 9.10.0-P2 [spz 20140708]
CVS commit: src/sys/kern
Module Name:src Committed By: maxv Date: Wed Jul 9 05:50:51 UTC 2014 Modified Files: src/sys/kern: subr_kobj.c Log Message: - limit the number of sections with ELF_MAXSHNUM - fix the (symstrindex hdr-e_shnum) check: it should be =, otherwise there's an off-by-one - fix the (symstrindex 0) check: the value is unsigned, so it can't be 0. However, we should ensure that symstrindex!=0 (done with SHN_UNDEF) - set 'error' as appropriate - ensure that e_shstrndx hdr-e_shnum, to prevent out-of-bound reads Fixes several crashes that could occur when loading a kernel module. Quick glance from martin@ To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/sys/kern/subr_kobj.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/kern/subr_kobj.c diff -u src/sys/kern/subr_kobj.c:1.48 src/sys/kern/subr_kobj.c:1.49 --- src/sys/kern/subr_kobj.c:1.48 Sun Jul 6 15:35:32 2014 +++ src/sys/kern/subr_kobj.c Wed Jul 9 05:50:51 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_kobj.c,v 1.48 2014/07/06 15:35:32 maxv Exp $ */ +/* $NetBSD: subr_kobj.c,v 1.49 2014/07/09 05:50:51 maxv Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -63,7 +63,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: subr_kobj.c,v 1.48 2014/07/06 15:35:32 maxv Exp $); +__KERNEL_RCSID(0, $NetBSD: subr_kobj.c,v 1.49 2014/07/09 05:50:51 maxv Exp $); #include opt_modular.h @@ -225,13 +225,13 @@ kobj_load(kobj_t ko) /* * Allocate and read in the section header. */ - ko-ko_shdrsz = hdr-e_shnum * hdr-e_shentsize; - if (ko-ko_shdrsz == 0 || hdr-e_shoff == 0 || - hdr-e_shentsize != sizeof(Elf_Shdr)) { + if (hdr-e_shnum == 0 || hdr-e_shnum ELF_MAXSHNUM || + hdr-e_shoff == 0 || hdr-e_shentsize != sizeof(Elf_Shdr)) { kobj_error(ko, bad sizes); error = ENOEXEC; goto out; } + ko-ko_shdrsz = hdr-e_shnum * sizeof(Elf_Shdr); error = ko-ko_read(ko, (void **)shdr, ko-ko_shdrsz, hdr-e_shoff, true); if (error != 0) { @@ -282,7 +282,9 @@ kobj_load(kobj_t ko) goto out; } KASSERT(symtabindex != -1); - if (symstrindex 0 || symstrindex hdr-e_shnum || + KASSERT(symstrindex != -1); + + if (symstrindex == SHN_UNDEF || symstrindex = hdr-e_shnum || shdr[symstrindex].sh_type != SHT_STRTAB) { kobj_error(ko, file has invalid symbol strings); error = ENOEXEC; @@ -326,6 +328,7 @@ kobj_load(kobj_t ko) ko-ko_symcnt = shdr[symtabindex].sh_size / sizeof(Elf_Sym); if (ko-ko_symcnt == 0) { kobj_error(ko, no symbol table); + error = ENOEXEC; goto out; } error = ko-ko_read(ko, (void **)ko-ko_symtab, @@ -342,6 +345,7 @@ kobj_load(kobj_t ko) ko-ko_strtabsz = shdr[symstrindex].sh_size; if (ko-ko_strtabsz == 0) { kobj_error(ko, no symbol strings); + error = ENOEXEC; goto out; } error = ko-ko_read(ko, (void *)ko-ko_strtab, ko-ko_strtabsz, @@ -365,16 +369,23 @@ kobj_load(kobj_t ko) /* * Do we have a string table for the section names? */ - if (hdr-e_shstrndx != 0 shdr[hdr-e_shstrndx].sh_size != 0 - shdr[hdr-e_shstrndx].sh_type == SHT_STRTAB) { - ko-ko_shstrtabsz = shdr[hdr-e_shstrndx].sh_size; - error = ko-ko_read(ko, (void **)ko-ko_shstrtab, - shdr[hdr-e_shstrndx].sh_size, - shdr[hdr-e_shstrndx].sh_offset, true); - if (error != 0) { - kobj_error(ko, read failed %d, error); + if (hdr-e_shstrndx != SHN_UNDEF) { + if (hdr-e_shstrndx = hdr-e_shnum) { + kobj_error(ko, bad shstrndx); + error = ENOEXEC; goto out; } + if (shdr[hdr-e_shstrndx].sh_size != 0 + shdr[hdr-e_shstrndx].sh_type == SHT_STRTAB) { + ko-ko_shstrtabsz = shdr[hdr-e_shstrndx].sh_size; + error = ko-ko_read(ko, (void **)ko-ko_shstrtab, + shdr[hdr-e_shstrndx].sh_size, + shdr[hdr-e_shstrndx].sh_offset, true); + if (error != 0) { +kobj_error(ko, read failed %d, error); +goto out; + } + } } /*