svn commit: r274337 - in head: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/cmd/zstreamdump cddl/contrib/opensolaris...
Author: delphij Date: Mon Nov 10 08:20:21 2014 New Revision: 274337 URL: https://svnweb.freebsd.org/changeset/base/274337 Log: MFV r274273: ZFS large block support. Please note that booting from datasets that have recordsize greater than 128KB is not supported (but it's Okay to enable the feature on the pool). This *may* remain unchanged because of memory constraint. Limited safety belt is provided for mounted root filesystem but use caution is advised. Illumos issue: 5027 zfs large block support MFC after:1 month Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c head/cddl/contrib/opensolaris/cmd/ztest/ztest.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c head/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c head/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h head/sys/boot/zfs/zfsimpl.c head/sys/cddl/boot/zfs/zfsimpl.h head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c head/sys/cddl/contrib/opensolaris/common/zfs/zpool_prop.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deadlist.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_send.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_log.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c head/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/cmd/zfs/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c == --- head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Mon Nov 10 00:07:06 2014 (r274336) +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Mon Nov 10 08:20:21 2014 (r274337) @@ -2147,6 +2147,8 @@ dump_label(const char *dev) (void) close(fd); } +static uint64_t num_large_blocks; + /*ARGSUSED*/ static int dump_one_dir(const char *dsname, void *arg) @@ -2159,6 +2161,8 @@ dump_one_dir(const char *dsname, void *a (void) printf(Could not open %s, error %d\n, dsname, error); return
svn commit: r274338 - head/sys/net
Author: luigi Date: Mon Nov 10 08:31:56 2014 New Revision: 274338 URL: https://svnweb.freebsd.org/changeset/base/274338 Log: return kernel-supplied error if available. Also fix field names in a comment. Modified: head/sys/net/netmap_user.h Modified: head/sys/net/netmap_user.h == --- head/sys/net/netmap_user.h Mon Nov 10 08:20:21 2014(r274337) +++ head/sys/net/netmap_user.h Mon Nov 10 08:31:56 2014(r274338) @@ -40,7 +40,7 @@ * From there: * struct netmap_ring *NETMAP_TXRING(nifp, index) * struct netmap_ring *NETMAP_RXRING(nifp, index) - * we can access ring-nr_cur, ring-nr_avail, ring-nr_flags + * we can access ring-cur, ring-head, ring-tail, etc. * * ring-slot[i] gives us the i-th slot (we can access * directly len, flags, buf_idx) @@ -543,7 +543,8 @@ fail: nm_close(d); if (errmsg) D(%s %s, errmsg, ifname); - errno = EINVAL; + if (errno == 0) + errno = EINVAL; return NULL; } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r274340 - in head/sys: crypto/rijndael dev/random geom/bde
Author: des Date: Mon Nov 10 09:44:38 2014 New Revision: 274340 URL: https://svnweb.freebsd.org/changeset/base/274340 Log: Constify the AES code and propagate to consumers. This allows us to update the Fortuna code to use SHAd-256 as defined in FSK. Approved by: so (self) Modified: head/sys/crypto/rijndael/rijndael-api-fst.c head/sys/crypto/rijndael/rijndael-api-fst.h head/sys/dev/random/fortuna.c head/sys/dev/random/hash.c head/sys/dev/random/hash.h head/sys/geom/bde/g_bde.h Modified: head/sys/crypto/rijndael/rijndael-api-fst.c == --- head/sys/crypto/rijndael/rijndael-api-fst.c Mon Nov 10 09:11:23 2014 (r274339) +++ head/sys/crypto/rijndael/rijndael-api-fst.c Mon Nov 10 09:44:38 2014 (r274340) @@ -34,7 +34,8 @@ __FBSDID($FreeBSD$); typedef u_int8_t BYTE; -int rijndael_makeKey(keyInstance *key, BYTE direction, int keyLen, char *keyMaterial) { +int rijndael_makeKey(keyInstance *key, BYTE direction, int keyLen, + const char *keyMaterial) { u_int8_t cipherKey[RIJNDAEL_MAXKB]; if (key == NULL) { @@ -83,7 +84,7 @@ int rijndael_cipherInit(cipherInstance * } int rijndael_blockEncrypt(cipherInstance *cipher, keyInstance *key, - BYTE *input, int inputLen, BYTE *outBuffer) { + const BYTE *input, int inputLen, BYTE *outBuffer) { int i, k, numBlocks; u_int8_t block[16], iv[4][4]; @@ -198,7 +199,7 @@ int rijndael_blockEncrypt(cipherInstance * @return length in octets (not bits) of the encrypted output buffer. */ int rijndael_padEncrypt(cipherInstance *cipher, keyInstance *key, - BYTE *input, int inputOctets, BYTE *outBuffer) { + const BYTE *input, int inputOctets, BYTE *outBuffer) { int i, numBlocks, padLen; u_int8_t block[16], *iv, *cp; @@ -261,7 +262,7 @@ int rijndael_padEncrypt(cipherInstance * } int rijndael_blockDecrypt(cipherInstance *cipher, keyInstance *key, - BYTE *input, int inputLen, BYTE *outBuffer) { + const BYTE *input, int inputLen, BYTE *outBuffer) { int i, k, numBlocks; u_int8_t block[16], iv[4][4]; @@ -360,7 +361,7 @@ int rijndael_blockDecrypt(cipherInstance } int rijndael_padDecrypt(cipherInstance *cipher, keyInstance *key, - BYTE *input, int inputOctets, BYTE *outBuffer) { + const BYTE *input, int inputOctets, BYTE *outBuffer) { int i, numBlocks, padLen; u_int8_t block[16]; u_int32_t iv[4]; Modified: head/sys/crypto/rijndael/rijndael-api-fst.h == --- head/sys/crypto/rijndael/rijndael-api-fst.h Mon Nov 10 09:11:23 2014 (r274339) +++ head/sys/crypto/rijndael/rijndael-api-fst.h Mon Nov 10 09:44:38 2014 (r274340) @@ -56,18 +56,18 @@ typedef struct {/* c /* Function prototypes */ -int rijndael_makeKey(keyInstance *, u_int8_t, int, char *); +int rijndael_makeKey(keyInstance *, u_int8_t, int, const char *); int rijndael_cipherInit(cipherInstance *, u_int8_t, char *); -int rijndael_blockEncrypt(cipherInstance *, keyInstance *, u_int8_t *, int, - u_int8_t *); -int rijndael_padEncrypt(cipherInstance *, keyInstance *, u_int8_t *, int, - u_int8_t *); - -int rijndael_blockDecrypt(cipherInstance *, keyInstance *, u_int8_t *, int, - u_int8_t *); -int rijndael_padDecrypt(cipherInstance *, keyInstance *, u_int8_t *, int, - u_int8_t *); +int rijndael_blockEncrypt(cipherInstance *, keyInstance *, const u_int8_t *, + int, u_int8_t *); +int rijndael_padEncrypt(cipherInstance *, keyInstance *, const u_int8_t *, + int, u_int8_t *); + +int rijndael_blockDecrypt(cipherInstance *, keyInstance *, const u_int8_t *, + int, u_int8_t *); +int rijndael_padDecrypt(cipherInstance *, keyInstance *, const u_int8_t *, + int, u_int8_t *); #endif /* __RIJNDAEL_API_FST_H */ Modified: head/sys/dev/random/fortuna.c == --- head/sys/dev/random/fortuna.c Mon Nov 10 09:11:23 2014 (r274339) +++ head/sys/dev/random/fortuna.c Mon Nov 10 09:44:38 2014 (r274340) @@ -27,13 +27,11 @@ /* This implementation of Fortuna is based on the descriptions found in * ISBN 0-471-22357-3 Practical Cryptography by Ferguson and Schneier - * (KS). + * (FS). * - * The above book is superceded by ISBN 978-0-470-47424-2 Cryptography - * Engineering by Ferguson, Schneier and Kohno (FSK). - * - * This code has not yet caught up with FSK, but differences are not - * expected to be complex. + * The above book is superseded by ISBN 978-0-470-47424-2 Cryptography + * Engineering by Ferguson, Schneier and Kohno (FSK). The code has + * not yet fully caught up with FSK. */ #include sys/cdefs.h @@ -252,12 +250,9 @@ reseed(uint8_t
svn commit: r274341 - in head/sys: crypto/rijndael dev/random geom/bde
Author: des Date: Mon Nov 10 09:55:35 2014 New Revision: 274341 URL: https://svnweb.freebsd.org/changeset/base/274341 Log: I just realized that the previous commit message makes no sense: the first sentence should have read Constify the AES and SHA-256 code and wrappers. This allows us to feed zero_region (which is const) to the hash function during reseeding and thereby implement the FSK version of SHAd-256 instead of the older FS version. Approved by: so (self) Modified: head/sys/crypto/rijndael/rijndael-api-fst.c head/sys/crypto/rijndael/rijndael-api-fst.h head/sys/dev/random/fortuna.c head/sys/dev/random/hash.c head/sys/dev/random/hash.h head/sys/geom/bde/g_bde.h Modified: head/sys/crypto/rijndael/rijndael-api-fst.c == Modified: head/sys/crypto/rijndael/rijndael-api-fst.h == Modified: head/sys/dev/random/fortuna.c == Modified: head/sys/dev/random/hash.c == Modified: head/sys/dev/random/hash.h == Modified: head/sys/geom/bde/g_bde.h == ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r274342 - head/sys/netinet6
Author: ae Date: Mon Nov 10 10:59:08 2014 New Revision: 274342 URL: https://svnweb.freebsd.org/changeset/base/274342 Log: For now handle only multicast addresses, we still use routes to LLA unicasts yet. Sponsored by: Yandex LLC Modified: head/sys/netinet6/in6_src.c Modified: head/sys/netinet6/in6_src.c == --- head/sys/netinet6/in6_src.c Mon Nov 10 09:55:35 2014(r274341) +++ head/sys/netinet6/in6_src.c Mon Nov 10 10:59:08 2014(r274342) @@ -587,10 +587,18 @@ selectroute(struct sockaddr_in6 *dstsock goto getroute; } /* +* If the destination address is a multicast address and the outgoing +* interface for the address is specified by the caller, use it. +*/ + if (IN6_IS_ADDR_MULTICAST(dst) + mopts != NULL (ifp = mopts-im6o_multicast_ifp) != NULL) { + goto done; /* we do not need a route for multicast. */ + } + /* * If destination address is LLA or link- or node-local multicast, * use it's embedded scope zone id to determine outgoing interface. */ - if (IN6_IS_SCOPE_LINKLOCAL(dst) || + if (IN6_IS_ADDR_MC_LINKLOCAL(dst) || IN6_IS_ADDR_MC_NODELOCAL(dst)) { zoneid = ntohs(in6_getscope(dst)); if (zoneid 0) { @@ -598,14 +606,6 @@ selectroute(struct sockaddr_in6 *dstsock goto done; } } - /* -* If the destination address is a multicast address and the outgoing -* interface for the address is specified by the caller, use it. -*/ - if (IN6_IS_ADDR_MULTICAST(dst) - mopts != NULL (ifp = mopts-im6o_multicast_ifp) != NULL) { - goto done; /* we do not need a route for multicast. */ - } getroute: /* ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r274343 - head/sys/kern
Author: kib Date: Mon Nov 10 14:11:17 2014 New Revision: 274343 URL: https://svnweb.freebsd.org/changeset/base/274343 Log: When sleeping waiting for the profiling stop, always set P_STOPPROF before dropping process lock. Clear P_STOPPROF when doing wakeup. Both issues caused thread to hang in stopprofclock() stopprof sleep. Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/kern/kern_clock.c head/sys/kern/subr_prof.c Modified: head/sys/kern/kern_clock.c == --- head/sys/kern/kern_clock.c Mon Nov 10 10:59:08 2014(r274342) +++ head/sys/kern/kern_clock.c Mon Nov 10 14:11:17 2014(r274343) @@ -668,11 +668,11 @@ stopprofclock(p) PROC_LOCK_ASSERT(p, MA_OWNED); if (p-p_flag P_PROFIL) { if (p-p_profthreads != 0) { - p-p_flag |= P_STOPPROF; - while (p-p_profthreads != 0) + while (p-p_profthreads != 0) { + p-p_flag |= P_STOPPROF; msleep(p-p_profthreads, p-p_mtx, PPAUSE, stopprof, 0); - p-p_flag = ~P_STOPPROF; + } } if ((p-p_flag P_PROFIL) == 0) return; Modified: head/sys/kern/subr_prof.c == --- head/sys/kern/subr_prof.c Mon Nov 10 10:59:08 2014(r274342) +++ head/sys/kern/subr_prof.c Mon Nov 10 14:11:17 2014(r274343) @@ -533,6 +533,7 @@ out: if (--p-p_profthreads == 0) { if (p-p_flag P_STOPPROF) { wakeup(p-p_profthreads); + p-p_flag = ~P_STOPPROF; stop = 0; } } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r274340 - in head/sys: crypto/rijndael dev/random geom/bde
On 10 Nov 2014, at 09:44 , Dag-Erling Smørgrav d...@freebsd.org wrote: Author: des Date: Mon Nov 10 09:44:38 2014 New Revision: 274340 URL: https://svnweb.freebsd.org/changeset/base/274340 Log: Constify the AES code and propagate to consumers. This allows us to update the Fortuna code to use SHAd-256 as defined in FSK. Approved by: so (self) This fails to compile on all gcc platforms. cc1: warnings being treated as errors /scratch/tmp/bz/head.svn/sys/modules/geom/geom_bde/../../../crypto/rijndael/rijndael-api-fst.c: In function 'rijndael_padEncrypt': /scratch/tmp/bz/head.svn/sys/modules/geom/geom_bde/../../../crypto/rijndael/rijndael-api-fst.c:236: warning: cast discards qualifiers from pointer target type /scratch/tmp/bz/head.svn/sys/modules/geom/geom_bde/../../../crypto/rijndael/rijndael-api-fst.c:237: warning: cast discards qualifiers from pointer target type /scratch/tmp/bz/head.svn/sys/modules/geom/geom_bde/../../../crypto/rijndael/rijndael-api-fst.c:238: warning: cast discards qualifiers from pointer target type /scratch/tmp/bz/head.svn/sys/modules/geom/geom_bde/../../../crypto/rijndael/rijndael-api-fst.c:239: warning: cast discards qualifiers from pointer target type --- rijndael-api-fst.o --- *** [rijndael-api-fst.o] Error code 1 bmake: stopped in /scratch/tmp/bz/head.svn/sys/modules/geom/geom_bde cc1: warnings being treated as errors /scratch/tmp/bz/head.svn/sys/modules/random/../../crypto/rijndael/rijndael-api-fst.c: In function 'rijndael_padEncrypt': /scratch/tmp/bz/head.svn/sys/modules/random/../../crypto/rijndael/rijndael-api-fst.c:236: warning: cast discards qualifiers from pointer target type /scratch/tmp/bz/head.svn/sys/modules/random/../../crypto/rijndael/rijndael-api-fst.c:237: warning: cast discards qualifiers from pointer target type /scratch/tmp/bz/head.svn/sys/modules/random/../../crypto/rijndael/rijndael-api-fst.c:238: warning: cast discards qualifiers from pointer target type /scratch/tmp/bz/head.svn/sys/modules/random/../../crypto/rijndael/rijndael-api-fst.c:239: warning: cast discards qualifiers from pointer target type --- rijndael-api-fst.o --- *** [rijndael-api-fst.o] Error code 1 … Modified: head/sys/crypto/rijndael/rijndael-api-fst.c head/sys/crypto/rijndael/rijndael-api-fst.h head/sys/dev/random/fortuna.c head/sys/dev/random/hash.c head/sys/dev/random/hash.h head/sys/geom/bde/g_bde.h Modified: head/sys/crypto/rijndael/rijndael-api-fst.c == --- head/sys/crypto/rijndael/rijndael-api-fst.c Mon Nov 10 09:11:23 2014(r274339) +++ head/sys/crypto/rijndael/rijndael-api-fst.c Mon Nov 10 09:44:38 2014(r274340) @@ -34,7 +34,8 @@ __FBSDID($FreeBSD$); typedef u_int8_t BYTE; -int rijndael_makeKey(keyInstance *key, BYTE direction, int keyLen, char *keyMaterial) { +int rijndael_makeKey(keyInstance *key, BYTE direction, int keyLen, + const char *keyMaterial) { u_int8_t cipherKey[RIJNDAEL_MAXKB]; if (key == NULL) { @@ -83,7 +84,7 @@ int rijndael_cipherInit(cipherInstance * } int rijndael_blockEncrypt(cipherInstance *cipher, keyInstance *key, - BYTE *input, int inputLen, BYTE *outBuffer) { + const BYTE *input, int inputLen, BYTE *outBuffer) { int i, k, numBlocks; u_int8_t block[16], iv[4][4]; @@ -198,7 +199,7 @@ int rijndael_blockEncrypt(cipherInstance * @returnlength in octets (not bits) of the encrypted output buffer. */ int rijndael_padEncrypt(cipherInstance *cipher, keyInstance *key, - BYTE *input, int inputOctets, BYTE *outBuffer) { + const BYTE *input, int inputOctets, BYTE *outBuffer) { int i, numBlocks, padLen; u_int8_t block[16], *iv, *cp; @@ -261,7 +262,7 @@ int rijndael_padEncrypt(cipherInstance * } int rijndael_blockDecrypt(cipherInstance *cipher, keyInstance *key, - BYTE *input, int inputLen, BYTE *outBuffer) { + const BYTE *input, int inputLen, BYTE *outBuffer) { int i, k, numBlocks; u_int8_t block[16], iv[4][4]; @@ -360,7 +361,7 @@ int rijndael_blockDecrypt(cipherInstance } int rijndael_padDecrypt(cipherInstance *cipher, keyInstance *key, - BYTE *input, int inputOctets, BYTE *outBuffer) { + const BYTE *input, int inputOctets, BYTE *outBuffer) { int i, numBlocks, padLen; u_int8_t block[16]; u_int32_t iv[4]; Modified: head/sys/crypto/rijndael/rijndael-api-fst.h == --- head/sys/crypto/rijndael/rijndael-api-fst.h Mon Nov 10 09:11:23 2014(r274339) +++ head/sys/crypto/rijndael/rijndael-api-fst.h Mon Nov 10 09:44:38 2014(r274340) @@ -56,18 +56,18 @@ typedef struct {/* c /* Function prototypes */ -int rijndael_makeKey(keyInstance *, u_int8_t, int, char
svn commit: r274345 - head/sys/netinet6
Author: glebius Date: Mon Nov 10 15:56:30 2014 New Revision: 274345 URL: https://svnweb.freebsd.org/changeset/base/274345 Log: Consistently use if_link. Reviewed by: ae, melifaro Modified: head/sys/netinet6/icmp6.c head/sys/netinet6/in6.c head/sys/netinet6/in6_ifattach.c head/sys/netinet6/nd6.c Modified: head/sys/netinet6/icmp6.c == --- head/sys/netinet6/icmp6.c Mon Nov 10 14:26:56 2014(r274344) +++ head/sys/netinet6/icmp6.c Mon Nov 10 15:56:30 2014(r274345) @@ -1748,7 +1748,7 @@ ni6_addrs(struct icmp6_nodeinfo *ni6, st } IFNET_RLOCK_NOSLEEP(); - TAILQ_FOREACH(ifp, V_ifnet, if_list) { + TAILQ_FOREACH(ifp, V_ifnet, if_link) { addrsofif = 0; IF_ADDR_RLOCK(ifp); TAILQ_FOREACH(ifa, ifp-if_addrhead, ifa_link) { @@ -1835,7 +1835,7 @@ ni6_store_addrs(struct icmp6_nodeinfo *n ifp = ifp0 ? ifp0 : TAILQ_FIRST(V_ifnet); again: - for (; ifp; ifp = TAILQ_NEXT(ifp, if_list)) { + for (; ifp; ifp = TAILQ_NEXT(ifp, if_link)) { IF_ADDR_RLOCK(ifp); TAILQ_FOREACH(ifa, ifp-if_addrhead, ifa_link) { if (ifa-ifa_addr-sa_family != AF_INET6) Modified: head/sys/netinet6/in6.c == --- head/sys/netinet6/in6.c Mon Nov 10 14:26:56 2014(r274344) +++ head/sys/netinet6/in6.c Mon Nov 10 15:56:30 2014(r274345) @@ -1973,7 +1973,7 @@ in6_setmaxmtu(void) struct ifnet *ifp; IFNET_RLOCK_NOSLEEP(); - TAILQ_FOREACH(ifp, V_ifnet, if_list) { + TAILQ_FOREACH(ifp, V_ifnet, if_link) { /* this function can be called during ifnet initialization */ if (!ifp-if_afdata[AF_INET6]) continue; Modified: head/sys/netinet6/in6_ifattach.c == --- head/sys/netinet6/in6_ifattach.cMon Nov 10 14:26:56 2014 (r274344) +++ head/sys/netinet6/in6_ifattach.cMon Nov 10 15:56:30 2014 (r274345) @@ -407,7 +407,7 @@ get_ifid(struct ifnet *ifp0, struct ifne /* next, try to get it from some other hardware interface */ IFNET_RLOCK_NOSLEEP(); - TAILQ_FOREACH(ifp, V_ifnet, if_list) { + TAILQ_FOREACH(ifp, V_ifnet, if_link) { if (ifp == ifp0) continue; if (in6_get_hw_ifid(ifp, in6) != 0) @@ -847,7 +847,7 @@ in6_tmpaddrtimer(void *arg) V_ip6_temp_regen_advance) * hz, in6_tmpaddrtimer, curvnet); bzero(nullbuf, sizeof(nullbuf)); - TAILQ_FOREACH(ifp, V_ifnet, if_list) { + TAILQ_FOREACH(ifp, V_ifnet, if_link) { if (ifp-if_afdata[AF_INET6] == NULL) continue; ndi = ND_IFINFO(ifp); Modified: head/sys/netinet6/nd6.c == --- head/sys/netinet6/nd6.c Mon Nov 10 14:26:56 2014(r274344) +++ head/sys/netinet6/nd6.c Mon Nov 10 15:56:30 2014(r274345) @@ -1811,7 +1811,7 @@ nd6_slowtimo(void *arg) callout_reset(V_nd6_slowtimo_ch, ND6_SLOWTIMER_INTERVAL * hz, nd6_slowtimo, curvnet); IFNET_RLOCK_NOSLEEP(); - TAILQ_FOREACH(ifp, V_ifnet, if_list) { + TAILQ_FOREACH(ifp, V_ifnet, if_link) { if (ifp-if_afdata[AF_INET6] == NULL) continue; nd6if = ND_IFINFO(ifp); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r274347 - head/sys/netinet6
Author: melifaro Date: Mon Nov 10 16:01:39 2014 New Revision: 274347 URL: https://svnweb.freebsd.org/changeset/base/274347 Log: * Make nd6_dad_duplicated() constant. * Simplify refcounting by using nd6_dad_add() / nd6_dad_del(). Reviewed by: ae MFC after:2 weeks Sponsored by: Yandex LLC Modified: head/sys/netinet6/nd6.h head/sys/netinet6/nd6_nbr.c Modified: head/sys/netinet6/nd6.h == --- head/sys/netinet6/nd6.h Mon Nov 10 16:01:31 2014(r274346) +++ head/sys/netinet6/nd6.h Mon Nov 10 16:01:39 2014(r274347) @@ -430,7 +430,6 @@ void nd6_ns_output(struct ifnet *, const caddr_t nd6_ifptomac(struct ifnet *); void nd6_dad_start(struct ifaddr *, int); void nd6_dad_stop(struct ifaddr *); -void nd6_dad_duplicated(struct ifaddr *); /* nd6_rtr.c */ void nd6_rs_input(struct mbuf *, int, int); Modified: head/sys/netinet6/nd6_nbr.c == --- head/sys/netinet6/nd6_nbr.c Mon Nov 10 16:01:31 2014(r274346) +++ head/sys/netinet6/nd6_nbr.c Mon Nov 10 16:01:39 2014(r274347) @@ -79,9 +79,12 @@ __FBSDID($FreeBSD$); struct dadq; static struct dadq *nd6_dad_find(struct ifaddr *); +static void nd6_dad_add(struct dadq *dp); +static void nd6_dad_del(struct dadq *dp); static void nd6_dad_starttimer(struct dadq *, int); static void nd6_dad_stoptimer(struct dadq *); static void nd6_dad_timer(struct dadq *); +static void nd6_dad_duplicated(struct ifaddr *, struct dadq *); static void nd6_dad_ns_output(struct dadq *, struct ifaddr *); static void nd6_dad_ns_input(struct ifaddr *); static void nd6_dad_na_input(struct ifaddr *); @@ -1179,6 +1182,26 @@ static VNET_DEFINE(struct rwlock, dad_rw #defineDADQ_WLOCK()rw_wlock(V_dad_rwlock) #defineDADQ_WUNLOCK() rw_wunlock(V_dad_rwlock) +static void +nd6_dad_add(struct dadq *dp) +{ + + ifa_ref(dp-dad_ifa); /* just for safety */ + DADQ_WLOCK(); + TAILQ_INSERT_TAIL(V_dadq, (struct dadq *)dp, dad_list); + DADQ_WUNLOCK(); +} + +static void +nd6_dad_del(struct dadq *dp) +{ + + ifa_free(dp-dad_ifa); + DADQ_WLOCK(); + TAILQ_REMOVE(V_dadq, (struct dadq *)dp, dad_list); + DADQ_WUNLOCK(); +} + static struct dadq * nd6_dad_find(struct ifaddr *ifa) { @@ -1270,10 +1293,6 @@ nd6_dad_start(struct ifaddr *ifa, int de #ifdef VIMAGE dp-dad_vnet = curvnet; #endif - DADQ_WLOCK(); - TAILQ_INSERT_TAIL(V_dadq, (struct dadq *)dp, dad_list); - DADQ_WUNLOCK(); - nd6log((LOG_DEBUG, %s: starting DAD for %s\n, if_name(ifa-ifa_ifp), ip6_sprintf(ip6buf, ia-ia_addr.sin6_addr))); @@ -1284,10 +1303,10 @@ nd6_dad_start(struct ifaddr *ifa, int de * (re)initialization. */ dp-dad_ifa = ifa; - ifa_ref(ifa); /* just for safety */ dp-dad_count = V_ip6_dad_count; dp-dad_ns_icount = dp-dad_na_icount = 0; dp-dad_ns_ocount = dp-dad_ns_tcount = 0; + nd6_dad_add(dp); if (delay == 0) { nd6_dad_ns_output(dp, ifa); nd6_dad_starttimer(dp, @@ -1315,12 +1334,8 @@ nd6_dad_stop(struct ifaddr *ifa) nd6_dad_stoptimer(dp); - DADQ_WLOCK(); - TAILQ_REMOVE(V_dadq, (struct dadq *)dp, dad_list); - DADQ_WUNLOCK(); + nd6_dad_del(dp); free(dp, M_IP6NDP); - dp = NULL; - ifa_free(ifa); } static void @@ -1367,12 +1382,9 @@ nd6_dad_timer(struct dadq *dp) nd6log((LOG_INFO, %s: could not run DAD, driver problem?\n, if_name(ifa-ifa_ifp))); - DADQ_WLOCK(); - TAILQ_REMOVE(V_dadq, (struct dadq *)dp, dad_list); - DADQ_WUNLOCK(); + nd6_dad_del(dp); free(dp, M_IP6NDP); dp = NULL; - ifa_free(ifa); goto done; } @@ -1408,8 +1420,8 @@ nd6_dad_timer(struct dadq *dp) if (duplicate) { /* (*dp) will be freed in nd6_dad_duplicated() */ + nd6_dad_duplicated(ifa, dp); dp = NULL; - nd6_dad_duplicated(ifa); } else { /* * We are done with DAD. No NA came, no NS came. @@ -1425,12 +1437,9 @@ nd6_dad_timer(struct dadq *dp) if_name(ifa-ifa_ifp), ip6_sprintf(ip6buf, ia-ia_addr.sin6_addr))); - DADQ_WLOCK(); - TAILQ_REMOVE(V_dadq, (struct dadq *)dp, dad_list); - DADQ_WUNLOCK(); + nd6_dad_del(dp); free(dp, M_IP6NDP); dp = NULL; - ifa_free(ifa); } } @@ -1439,19 +1448,12 @@ done: }
svn commit: r274346 - head/sys/netinet6
Author: ae Date: Mon Nov 10 16:01:31 2014 New Revision: 274346 URL: https://svnweb.freebsd.org/changeset/base/274346 Log: Remove link-local multicast routes remnants from in6_purgeaddr. Also merge in6_purgeaddr_mc with in6_purgeaddr. Sponsored by: Yandex LLC Modified: head/sys/netinet6/in6.c Modified: head/sys/netinet6/in6.c == --- head/sys/netinet6/in6.c Mon Nov 10 15:56:30 2014(r274345) +++ head/sys/netinet6/in6.c Mon Nov 10 16:01:31 2014(r274346) @@ -1283,51 +1283,18 @@ in6_broadcast_ifa(struct ifnet *ifp, str return (error); } -/* - * Leave from multicast groups we have joined for the interface. - */ -static int -in6_purgeaddr_mc(struct ifnet *ifp, struct in6_ifaddr *ia, struct ifaddr *ifa0) -{ - struct in6_multi_mship *imm; - - while ((imm = LIST_FIRST(ia-ia6_memberships)) != NULL) { - LIST_REMOVE(imm, i6mm_chain); - in6_leavegroup(imm); - } - return (0); -} - void in6_purgeaddr(struct ifaddr *ifa) { struct ifnet *ifp = ifa-ifa_ifp; struct in6_ifaddr *ia = (struct in6_ifaddr *) ifa; + struct in6_multi_mship *imm; int plen, error; - struct ifaddr *ifa0; if (ifa-ifa_carp) (*carp_detach_p)(ifa); /* -* find another IPv6 address as the gateway for the -* link-local and node-local all-nodes multicast -* address routes -*/ - IF_ADDR_RLOCK(ifp); - TAILQ_FOREACH(ifa0, ifp-if_addrhead, ifa_link) { - if ((ifa0-ifa_addr-sa_family != AF_INET6) || - memcmp(satosin6(ifa0-ifa_addr)-sin6_addr, - ia-ia_addr.sin6_addr, sizeof(struct in6_addr)) == 0) - continue; - else - break; - } - if (ifa0 != NULL) - ifa_ref(ifa0); - IF_ADDR_RUNLOCK(ifp); - - /* * Remove the loopback route to the interface address. * The check for the current setting of nd6_useloopback * is not needed. @@ -1346,11 +1313,10 @@ in6_purgeaddr(struct ifaddr *ifa) nd6_rem_ifa_lle(ia); /* Leave multicast groups. */ - error = in6_purgeaddr_mc(ifp, ia, ifa0); - - if (ifa0 != NULL) - ifa_free(ifa0); - + while ((imm = LIST_FIRST(ia-ia6_memberships)) != NULL) { + LIST_REMOVE(imm, i6mm_chain); + in6_leavegroup(imm); + } plen = in6_mask2len(ia-ia_prefixmask.sin6_addr, NULL); /* XXX */ if ((ia-ia_flags IFA_ROUTE) plen == 128) { error = rtinit((ia-ia_ifa), RTM_DELETE, ia-ia_flags | ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r274348 - head/sys/netinet6
Author: ae Date: Mon Nov 10 16:12:51 2014 New Revision: 274348 URL: https://svnweb.freebsd.org/changeset/base/274348 Log: Add sa6_checkzone_ifp() function. It checks correctness of struct sockaddr_in6, usually obtained from the user level through ioctl. It initializes sin6_scope_id using given interface. Sponsored by: Yandex LLC Modified: head/sys/netinet6/scope6.c head/sys/netinet6/scope6_var.h Modified: head/sys/netinet6/scope6.c == --- head/sys/netinet6/scope6.c Mon Nov 10 16:01:39 2014(r274347) +++ head/sys/netinet6/scope6.c Mon Nov 10 16:12:51 2014(r274348) @@ -532,4 +532,25 @@ sa6_checkzone(struct sockaddr_in6 *sa6) return (sa6-sin6_scope_id ? 0: EADDRNOTAVAIL); } +/* + * This function is similar to sa6_checkzone, but it uses given ifp + * to initialize sin6_scope_id. + */ +int +sa6_checkzone_ifp(struct ifnet *ifp, struct sockaddr_in6 *sa6) +{ + int scope; + + scope = in6_addrscope(sa6-sin6_addr); + if (scope == IPV6_ADDR_SCOPE_LINKLOCAL || + scope == IPV6_ADDR_SCOPE_INTFACELOCAL) { + if (sa6-sin6_scope_id == 0) { + sa6-sin6_scope_id = in6_getscopezone(ifp, scope); + return (0); + } else if (sa6-sin6_scope_id != in6_getscopezone(ifp, scope)) + return (EADDRNOTAVAIL); + } + return (sa6_checkzone(sa6)); +} + Modified: head/sys/netinet6/scope6_var.h == --- head/sys/netinet6/scope6_var.h Mon Nov 10 16:01:39 2014 (r274347) +++ head/sys/netinet6/scope6_var.h Mon Nov 10 16:12:51 2014 (r274348) @@ -58,6 +58,7 @@ u_int32_t scope6_addr2default(struct in6 intsa6_embedscope(struct sockaddr_in6 *, int); intsa6_recoverscope(struct sockaddr_in6 *); intsa6_checkzone(struct sockaddr_in6 *); +intsa6_checkzone_ifp(struct ifnet *, struct sockaddr_in6 *); intin6_setscope(struct in6_addr *, struct ifnet *, u_int32_t *); intin6_clearscope(struct in6_addr *); uint16_t in6_getscope(struct in6_addr *); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
con respecto a mi último correo electrónico
A la atención de : Tengo algo de información vital para usted en relación con una herencia que se quiso dar a usted. E-mail o teléfono me llaman para que yo pueda darle una amplia desglose en este proyecto . Saludos, David Boucher www.snsbank.nl ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r274349 - head/share/man/man7
Author: emaste Date: Mon Nov 10 18:20:46 2014 New Revision: 274349 URL: https://svnweb.freebsd.org/changeset/base/274349 Log: Add /usr/lib/debug directory to hier(7) The canonical standalone debug directory established by the GNU toolchain is /usr/lib/debug, and we use it when WITH_DEBUG_FILES is set. Mention it in the file system hierarchy page. Reviewed by: bcr Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D1134 Modified: head/share/man/man7/hier.7 Modified: head/share/man/man7/hier.7 == --- head/share/man/man7/hier.7 Mon Nov 10 16:12:51 2014(r274348) +++ head/share/man/man7/hier.7 Mon Nov 10 18:20:46 2014(r274349) @@ -28,7 +28,7 @@ .\@(#)hier.7 8.1 (Berkeley) 6/5/93 .\ $FreeBSD$ .\ -.Dd July 25, 2014 +.Dd November 10, 2014 .Dt HIER 7 .Os .Sh NAME @@ -380,6 +380,8 @@ shared libraries for compatibility .It Pa aout/ a.out backward compatibility libraries .El +.It Pa debug/ +standalone debug data for the base system libraries and binaries .It Pa dtrace/ DTrace library scripts .It Pa engines/ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r274250 - head/sys/dev/random
On 07 Nov 2014, at 21:10, Konstantin Belousov k...@freebsd.org wrote: Author: kib Date: Fri Nov 7 20:10:09 2014 New Revision: 274250 URL: https://svnweb.freebsd.org/changeset/base/274250 Log: Simplify assembler in ivy.c. Move the copying of the random bits into buffer from asm to C, which reduces amount of arguments for inline asm and simplifies constraints. Use unsigned types consistently. Submitted by:bde Approved by: secteam (delphij) Reviewed by: markm MFC after: 1 week Modified: head/sys/dev/random/ivy.c Modified: head/sys/dev/random/ivy.c == --- head/sys/dev/random/ivy.c Fri Nov 7 19:34:10 2014(r274249) +++ head/sys/dev/random/ivy.c Fri Nov 7 20:10:09 2014(r274250) @@ -61,42 +61,41 @@ static struct live_entropy_source random }; static inline int -ivy_rng_store(long *buf) +ivy_rng_store(u_long *buf) { #ifdef __GNUCLIKE_ASM - long tmp; + u_long rndval; int retry; retry = RETRY_COUNT; __asm __volatile( 1:\n\t - rdrand %2\n\t /* read randomness into tmp */ - jb 2f\n\t /* CF is set on success, exit retry loop */ + rdrand %1\n\t /* read randomness into tmp */ + jc 2f\n\t /* CF is set on success, exit retry loop */ You might want to update the first comment to read randomness into rndval, for consistency. -Dimitry signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r274351 - head/sys/dev/cxgbe/firmware
Author: np Date: Mon Nov 10 19:45:28 2014 New Revision: 274351 URL: https://svnweb.freebsd.org/changeset/base/274351 Log: cxgbe(4): adjust PMRX and PMTX parameters. MFC after:1 week Modified: head/sys/dev/cxgbe/firmware/t4fw_cfg.txt head/sys/dev/cxgbe/firmware/t4fw_cfg_uwire.txt head/sys/dev/cxgbe/firmware/t5fw_cfg.txt head/sys/dev/cxgbe/firmware/t5fw_cfg_fpga.txt head/sys/dev/cxgbe/firmware/t5fw_cfg_uwire.txt Modified: head/sys/dev/cxgbe/firmware/t4fw_cfg.txt == --- head/sys/dev/cxgbe/firmware/t4fw_cfg.txtMon Nov 10 18:47:59 2014 (r274350) +++ head/sys/dev/cxgbe/firmware/t4fw_cfg.txtMon Nov 10 19:45:28 2014 (r274351) @@ -28,8 +28,8 @@ tp_ntxch = 0 # TP rx and tx payload memory (% of the total EDRAM + DDR3). - tp_pmrx = 38 - tp_pmtx = 60 + tp_pmrx = 38, 512 + tp_pmtx = 60, 512 tp_pmrx_pagesize = 64K tp_pmtx_pagesize = 64K @@ -160,7 +160,7 @@ [fini] version = 0x1 - checksum = 0x6a1f8858 + checksum = 0xb4168add # # $FreeBSD$ # Modified: head/sys/dev/cxgbe/firmware/t4fw_cfg_uwire.txt == --- head/sys/dev/cxgbe/firmware/t4fw_cfg_uwire.txt Mon Nov 10 18:47:59 2014(r274350) +++ head/sys/dev/cxgbe/firmware/t4fw_cfg_uwire.txt Mon Nov 10 19:45:28 2014(r274351) @@ -125,7 +125,7 @@ # Percentage of dynamic memory (in either the EDRAM or external MEM) # to use for TP RX payload - tp_pmrx = 34 + tp_pmrx = 34, 512 # TP RX payload page size tp_pmrx_pagesize = 64K @@ -135,7 +135,7 @@ # Percentage of dynamic memory (in either the EDRAM or external MEM) # to use for TP TX payload - tp_pmtx = 32 + tp_pmtx = 32, 512 # TP TX payload page size tp_pmtx_pagesize = 64K @@ -544,7 +544,7 @@ [fini] version = 0x14250012 - checksum = 0xd9ae0325 + checksum = 0x22f592a9 # Total resources used by above allocations: # Virtual Interfaces: 104 Modified: head/sys/dev/cxgbe/firmware/t5fw_cfg.txt == --- head/sys/dev/cxgbe/firmware/t5fw_cfg.txtMon Nov 10 18:47:59 2014 (r274350) +++ head/sys/dev/cxgbe/firmware/t5fw_cfg.txtMon Nov 10 19:45:28 2014 (r274351) @@ -37,8 +37,8 @@ tp_ntxch = 0 # TP rx and tx payload memory (% of the total EDRAM + DDR3). - tp_pmrx = 38 - tp_pmtx = 60 + tp_pmrx = 38, 512 + tp_pmtx = 60, 512 tp_pmrx_pagesize = 64K tp_pmtx_pagesize = 64K @@ -173,7 +173,7 @@ [fini] version = 0x1 - checksum = 0xa0ee1715 + checksum = 0x4f45e608 # # $FreeBSD$ # Modified: head/sys/dev/cxgbe/firmware/t5fw_cfg_fpga.txt == --- head/sys/dev/cxgbe/firmware/t5fw_cfg_fpga.txt Mon Nov 10 18:47:59 2014(r274350) +++ head/sys/dev/cxgbe/firmware/t5fw_cfg_fpga.txt Mon Nov 10 19:45:28 2014(r274351) @@ -149,7 +149,7 @@ # Percentage of dynamic memory (in either the EDRAM or external MEM) # to use for TP RX payload - tp_pmrx = 30 + tp_pmrx = 30, 512 # TP RX payload page size tp_pmrx_pagesize = 64K @@ -159,7 +159,7 @@ # Percentage of dynamic memory (in either the EDRAM or external MEM) # to use for TP TX payload - tp_pmtx = 50 + tp_pmtx = 50, 512 # TP TX payload page size tp_pmtx_pagesize = 64K @@ -463,7 +463,7 @@ [fini] version = 0x1425000d - checksum = 0xe56cb999 + checksum = 0x22f1530b # Total resources used by above allocations: # Virtual Interfaces: 104 Modified: head/sys/dev/cxgbe/firmware/t5fw_cfg_uwire.txt == --- head/sys/dev/cxgbe/firmware/t5fw_cfg_uwire.txt Mon Nov 10 18:47:59 2014(r274350) +++ head/sys/dev/cxgbe/firmware/t5fw_cfg_uwire.txt Mon Nov 10 19:45:28 2014(r274351) @@ -153,7 +153,7 @@ # Percentage of dynamic memory (in either the EDRAM or external MEM) # to use for TP RX payload - tp_pmrx = 30 + tp_pmrx = 30, 512 # TP RX payload page size tp_pmrx_pagesize = 64K @@ -163,7 +163,7 @@ # Percentage of dynamic memory (in either the EDRAM or external MEM) # to use for TP TX payload - tp_pmtx = 50 + tp_pmtx = 50, 512 # TP TX payload page size tp_pmtx_pagesize = 64K @@ -587,7 +587,7 @@ [fini] version = 0x14250016 - checksum = 0x5d740273 + checksum = 0xafaf8723 # Total resources used by above allocations: # Virtual Interfaces: 104 ___
Re: svn commit: r274340 - in head/sys: crypto/rijndael dev/random geom/bde
On 10 Nov 2014, at 16:10, Bjoern A. Zeeb b...@freebsd.org wrote: On 10 Nov 2014, at 09:44 , Dag-Erling Smørgrav d...@freebsd.org wrote: Author: des Date: Mon Nov 10 09:44:38 2014 New Revision: 274340 URL: https://svnweb.freebsd.org/changeset/base/274340 Log: Constify the AES code and propagate to consumers. This allows us to update the Fortuna code to use SHAd-256 as defined in FSK. Approved by: so (self) This fails to compile on all gcc platforms. cc1: warnings being treated as errors /scratch/tmp/bz/head.svn/sys/modules/geom/geom_bde/../../../crypto/rijndael/rijndael-api-fst.c: In function 'rijndael_padEncrypt': /scratch/tmp/bz/head.svn/sys/modules/geom/geom_bde/../../../crypto/rijndael/rijndael-api-fst.c:236: warning: cast discards qualifiers from pointer target type /scratch/tmp/bz/head.svn/sys/modules/geom/geom_bde/../../../crypto/rijndael/rijndael-api-fst.c:237: warning: cast discards qualifiers from pointer target type /scratch/tmp/bz/head.svn/sys/modules/geom/geom_bde/../../../crypto/rijndael/rijndael-api-fst.c:238: warning: cast discards qualifiers from pointer target type /scratch/tmp/bz/head.svn/sys/modules/geom/geom_bde/../../../crypto/rijndael/rijndael-api-fst.c:239: warning: cast discards qualifiers from pointer target type --- rijndael-api-fst.o --- *** [rijndael-api-fst.o] Error code 1 Proposed fix (the lines were too long anyway, so I didn't see reason to change that): Index: sys/crypto/rijndael/rijndael-api-fst.c === --- sys/crypto/rijndael/rijndael-api-fst.c (revision 274350) +++ sys/crypto/rijndael/rijndael-api-fst.c (working copy) @@ -233,10 +233,10 @@ case MODE_CBC: iv = cipher-IV; for (i = numBlocks; i 0; i--) { - ((u_int32_t*)block)[0] = ((u_int32_t*)input)[0] ^ ((u_int32_t*)iv)[0]; - ((u_int32_t*)block)[1] = ((u_int32_t*)input)[1] ^ ((u_int32_t*)iv)[1]; - ((u_int32_t*)block)[2] = ((u_int32_t*)input)[2] ^ ((u_int32_t*)iv)[2]; - ((u_int32_t*)block)[3] = ((u_int32_t*)input)[3] ^ ((u_int32_t*)iv)[3]; + ((u_int32_t*)block)[0] = ((const u_int32_t*)input)[0] ^ ((u_int32_t*)iv)[0]; + ((u_int32_t*)block)[1] = ((const u_int32_t*)input)[1] ^ ((u_int32_t*)iv)[1]; + ((u_int32_t*)block)[2] = ((const u_int32_t*)input)[2] ^ ((u_int32_t*)iv)[2]; + ((u_int32_t*)block)[3] = ((const u_int32_t*)input)[3] ^ ((u_int32_t*)iv)[3]; rijndaelEncrypt(key-rk, key-Nr, block, outBuffer); iv = outBuffer; input += 16; -Dimitry signature.asc Description: Message signed with OpenPGP using GPGMail
Re: svn commit: r273266 - in head: lib/libkvm sys/compat/freebsd32 sys/kern sys/sys
I noted something similar for kgdb, when compiled with gcc: cc1: warnings being treated as errors /usr/src/gnu/usr.bin/gdb/kgdb/trgt_i386.c: In function 'kgdb_trgt_fetch_tss': /usr/src/gnu/usr.bin/gdb/kgdb/trgt_i386.c:142: warning: comparison is always false due to limited range of data type In gnu/usr.bin/gdb/kgdb/kgdb.h, there is: struct kthr { struct kthr *next; uintptr_t paddr; uintptr_t kaddr; uintptr_t kstack; uintptr_t pcb; int tid; int pid; u_char cpu; }; The cpu field is assigned from td.td_oncpu (which is an int) in kgdb_thr_add_procs(), so I think it should be safe to change it to an int too: Index: gnu/usr.bin/gdb/kgdb/kgdb.h === --- gnu/usr.bin/gdb/kgdb/kgdb.h (revision 274350) +++ gnu/usr.bin/gdb/kgdb/kgdb.h (working copy) @@ -41,7 +41,7 @@ uintptr_t pcb; int tid; int pid; - u_char cpu; + int cpu; }; extern struct kthr *curkthr; -Dimitry On 19 Oct 2014, at 06:38, Adrian Chadd adr...@freebsd.org wrote: Rebuilt, tested, committed to -HEAD. Thanks! -a On 18 October 2014 20:51, Adrian Chadd adr...@freebsd.org wrote: .. actually, try this: adrian@testbox1:~/work/freebsd/head/src % svn diff sys/kern/ Index: sys/kern/kern_intr.c === --- sys/kern/kern_intr.c(revision 272839) +++ sys/kern/kern_intr.c(working copy) @@ -362,8 +362,7 @@ { struct intr_event *ie; cpuset_t *mask; - u_char cpu; - int n; + int cpu, n; mask = m; cpu = NOCPU; @@ -377,7 +376,7 @@ continue; if (cpu != NOCPU) return (EINVAL); - cpu = (u_char)n; + cpu = n; } } ie = intr_lookup(irq); -a signature.asc Description: Message signed with OpenPGP using GPGMail
Re: svn commit: r273582 - in head/sys/amd64: amd64 include
On 24 October 2014 05:48, Roger Pau Monné roy...@freebsd.org wrote: Author: royger Date: Fri Oct 24 09:48:58 2014 New Revision: 273582 URL: https://svnweb.freebsd.org/changeset/base/273582 Log: amd64: make uiomove_fromphys functional for pages not mapped by the DMAP UEFI boot fails after this commit. I haven't yet investigated in depth, but it appears to hang after the loader transfers execution to the kernel. It's likely a panic before the vt console is ready, I think. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r274353 - head/sys/dev/netmap
Author: luigi Date: Mon Nov 10 20:19:58 2014 New Revision: 274353 URL: https://svnweb.freebsd.org/changeset/base/274353 Log: sync a comment with our internal repo Modified: head/sys/dev/netmap/netmap_generic.c Modified: head/sys/dev/netmap/netmap_generic.c == --- head/sys/dev/netmap/netmap_generic.cMon Nov 10 19:53:39 2014 (r274352) +++ head/sys/dev/netmap/netmap_generic.cMon Nov 10 20:19:58 2014 (r274353) @@ -821,7 +821,7 @@ generic_netmap_attach(struct ifnet *ifp) num_tx_desc = num_rx_desc = netmap_generic_ringsize; /* starting point */ - generic_find_num_desc(ifp, num_tx_desc, num_rx_desc); + generic_find_num_desc(ifp, num_tx_desc, num_rx_desc); /* ignore errors */ ND(Netmap ring size: TX = %d, RX = %d, num_tx_desc, num_rx_desc); if (num_tx_desc == 0 || num_rx_desc == 0) { D(Device has no hw slots (tx %u, rx %u), num_tx_desc, num_rx_desc); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r274354 - head/sys/dev/netmap
Author: luigi Date: Mon Nov 10 20:25:33 2014 New Revision: 274354 URL: https://svnweb.freebsd.org/changeset/base/274354 Log: initialize *color if passed as an argument Modified: head/sys/dev/netmap/netmap_freebsd.c Modified: head/sys/dev/netmap/netmap_freebsd.c == --- head/sys/dev/netmap/netmap_freebsd.cMon Nov 10 20:19:58 2014 (r274353) +++ head/sys/dev/netmap/netmap_freebsd.cMon Nov 10 20:25:33 2014 (r274354) @@ -466,6 +466,8 @@ netmap_dev_pager_ctor(void *handle, vm_o if (netmap_verbose) D(handle %p size %jd prot %d foff %jd, handle, (intmax_t)size, prot, (intmax_t)foff); + if (color) + *color = 0; dev_ref(vmh-dev); return 0; } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r273266 - in head: lib/libkvm sys/compat/freebsd32 sys/kern sys/sys
On Monday, November 10, 2014 09:13:08 PM Dimitry Andric wrote: I noted something similar for kgdb, when compiled with gcc: cc1: warnings being treated as errors /usr/src/gnu/usr.bin/gdb/kgdb/trgt_i386.c: In function 'kgdb_trgt_fetch_tss': /usr/src/gnu/usr.bin/gdb/kgdb/trgt_i386.c:142: warning: comparison is always false due to limited range of data type In gnu/usr.bin/gdb/kgdb/kgdb.h, there is: struct kthr { struct kthr *next; uintptr_t paddr; uintptr_t kaddr; uintptr_t kstack; uintptr_t pcb; int tid; int pid; u_char cpu; }; The cpu field is assigned from td.td_oncpu (which is an int) in kgdb_thr_add_procs(), so I think it should be safe to change it to an int too: Index: gnu/usr.bin/gdb/kgdb/kgdb.h === --- gnu/usr.bin/gdb/kgdb/kgdb.h (revision 274350) +++ gnu/usr.bin/gdb/kgdb/kgdb.h (working copy) @@ -41,7 +41,7 @@ uintptr_t pcb; int tid; int pid; - u_char cpu; + int cpu; }; extern struct kthr *curkthr; Yes, please commit. -- John Baldwin ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r274355 - head/sys/dev/netmap
Author: luigi Date: Mon Nov 10 21:00:23 2014 New Revision: 274355 URL: https://svnweb.freebsd.org/changeset/base/274355 Log: fix a typo Modified: head/sys/dev/netmap/netmap_kern.h Modified: head/sys/dev/netmap/netmap_kern.h == --- head/sys/dev/netmap/netmap_kern.h Mon Nov 10 20:25:33 2014 (r274354) +++ head/sys/dev/netmap/netmap_kern.h Mon Nov 10 21:00:23 2014 (r274355) @@ -266,7 +266,7 @@ struct netmap_kring { struct netmap_adapter *na; - /* The folloiwing fields are for VALE switch support */ + /* The following fields are for VALE switch support */ struct nm_bdg_fwd *nkr_ft; uint32_t*nkr_leases; #define NR_NOSLOT ((uint32_t)~0) /* used in nkr_*lease* */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r273762 - head/sys/modules/dtrace/dtraceall
On Oct 27, 2014, at 21:18, Julian Elischer jul...@freebsd.org wrote: Author: julian Date: Tue Oct 28 04:18:09 2014 New Revision: 273762 URL: https://svnweb.freebsd.org/changeset/base/273762 Log: Allow loading of dtraceall without nfscl if what you really wnat is nfsclient Obtained from: Panzura tree MFC after: 1 week Modified: head/sys/modules/dtrace/dtraceall/dtraceall.c Modified: head/sys/modules/dtrace/dtraceall/dtraceall.c == --- head/sys/modules/dtrace/dtraceall/dtraceall.c Tue Oct 28 03:42:09 2014(r273761) +++ head/sys/modules/dtrace/dtraceall/dtraceall.c Tue Oct 28 04:18:09 2014(r273762) @@ -67,7 +67,9 @@ MODULE_DEPEND(dtraceall, cyclic, 1, 1, 1 MODULE_DEPEND(dtraceall, opensolaris, 1, 1, 1); MODULE_DEPEND(dtraceall, dtrace, 1, 1, 1); MODULE_DEPEND(dtraceall, dtmalloc, 1, 1, 1); +#if defined(NFSCLIENT) MODULE_DEPEND(dtraceall, dtnfscl, 1, 1, 1); +#endif #if defined(NFSCLIENT) MODULE_DEPEND(dtraceall, dtnfsclient, 1, 1, 1); #endif This change is wrong. NFSCLIENT is the old NFS client implementation and NFSCL is the new client implementation. The DTrace modules match them respectively. -- Rui Paulo ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r274359 - in head: sys/netinet sys/sys tools/tools/sysdoc
Author: melifaro Date: Mon Nov 10 23:10:01 2014 New Revision: 274359 URL: https://svnweb.freebsd.org/changeset/base/274359 Log: Remove kernel handling of ICMP_SOURCEQUENCH. It hasn't been used for a very long time. Additionally, it was deprecated by RFC 6633. Modified: head/sys/netinet/ip_fastfwd.c head/sys/netinet/ip_icmp.c head/sys/netinet/ip_input.c head/sys/netinet/tcp_subr.c head/sys/sys/protosw.h head/tools/tools/sysdoc/tunables.mdoc Modified: head/sys/netinet/ip_fastfwd.c == --- head/sys/netinet/ip_fastfwd.c Mon Nov 10 21:31:14 2014 (r274358) +++ head/sys/netinet/ip_fastfwd.c Mon Nov 10 23:10:01 2014 (r274359) @@ -502,7 +502,6 @@ passout: if ((ifp-if_snd.ifq_len + ip_len / ifp-if_mtu + 1) = ifp-if_snd.ifq_maxlen) { IPSTAT_INC(ips_odropped); - /* would send source quench here but that is depreciated */ goto drop; } #endif Modified: head/sys/netinet/ip_icmp.c == --- head/sys/netinet/ip_icmp.c Mon Nov 10 21:31:14 2014(r274358) +++ head/sys/netinet/ip_icmp.c Mon Nov 10 23:10:01 2014(r274359) @@ -486,12 +486,6 @@ icmp_input(struct mbuf **mp, int *offp, if (code 1) goto badcode; code = PRC_PARAMPROB; - goto deliver; - - case ICMP_SOURCEQUENCH: - if (code) - goto badcode; - code = PRC_QUENCH; deliver: /* * Problem with datagram; advise higher level routines. @@ -670,6 +664,7 @@ reflect: case ICMP_TSTAMPREPLY: case ICMP_IREQREPLY: case ICMP_MASKREPLY: + case ICMP_SOURCEQUENCH: default: break; } Modified: head/sys/netinet/ip_input.c == --- head/sys/netinet/ip_input.c Mon Nov 10 21:31:14 2014(r274358) +++ head/sys/netinet/ip_input.c Mon Nov 10 23:10:01 2014(r274359) @@ -104,12 +104,6 @@ SYSCTL_INT(_net_inet_ip, IPCTL_SENDREDIR VNET_NAME(ipsendredirects), 0, Enable sending IP redirects); -static VNET_DEFINE(int, ip_sendsourcequench); -#defineV_ip_sendsourcequench VNET(ip_sendsourcequench) -SYSCTL_INT(_net_inet_ip, OID_AUTO, sendsourcequench, CTLFLAG_VNET | CTLFLAG_RW, -VNET_NAME(ip_sendsourcequench), 0, -Enable the transmission of source quench packets); - VNET_DEFINE(int, ip_do_randomid); SYSCTL_INT(_net_inet_ip, OID_AUTO, random_id, CTLFLAG_VNET | CTLFLAG_RW, VNET_NAME(ip_do_randomid), 0, @@ -1647,25 +1641,6 @@ ip_forward(struct mbuf *m, int srcrt) break; case ENOBUFS: - /* -* A router should not generate ICMP_SOURCEQUENCH as -* required in RFC1812 Requirements for IP Version 4 Routers. -* Source quench could be a big problem under DoS attacks, -* or if the underlying interface is rate-limited. -* Those who need source quench packets may re-enable them -* via the net.inet.ip.sendsourcequench sysctl. -*/ - if (V_ip_sendsourcequench == 0) { - m_freem(mcopy); - if (ia != NULL) - ifa_free(ia-ia_ifa); - return; - } else { - type = ICMP_SOURCEQUENCH; - code = 0; - } - break; - case EACCES:/* ipfw denied packet */ m_freem(mcopy); if (ia != NULL) Modified: head/sys/netinet/tcp_subr.c == --- head/sys/netinet/tcp_subr.c Mon Nov 10 21:31:14 2014(r274358) +++ head/sys/netinet/tcp_subr.c Mon Nov 10 23:10:01 2014(r274359) @@ -1430,11 +1430,6 @@ tcp_ctlinput(int cmd, struct sockaddr *s else if (PRC_IS_REDIRECT(cmd)) return; /* -* Source quench is depreciated. -*/ - else if (cmd == PRC_QUENCH) - return; - /* * Hostdead is ugly because it goes linearly through all PCBs. * XXX: We never get this from ICMP, otherwise it makes an * excellent DoS attack on machines with many connections. @@ -1539,9 +1534,6 @@ tcp6_ctlinput(int cmd, struct sockaddr * else if (!PRC_IS_REDIRECT(cmd) ((unsigned)cmd = PRC_NCMDS || inet6ctlerrmap[cmd] == 0)) return; - /* Source quench is depreciated. */ - else if (cmd == PRC_QUENCH) - return; /* if the parameter is from icmp6, decode it. */ if (d != NULL) { Modified:
Re: svn commit: r273266 - in head: lib/libkvm sys/compat/freebsd32 sys/kern sys/sys
just double-check that the cpu id isn't used to size anything; I've seen it used as an offset into stuff, and NOCPU would've been entry 255 in the array, not -1. Ian pointed this out to me recently and I've only just started digging into it. -adrian On 10 November 2014 12:35, John Baldwin j...@freebsd.org wrote: On Monday, November 10, 2014 09:13:08 PM Dimitry Andric wrote: I noted something similar for kgdb, when compiled with gcc: cc1: warnings being treated as errors /usr/src/gnu/usr.bin/gdb/kgdb/trgt_i386.c: In function 'kgdb_trgt_fetch_tss': /usr/src/gnu/usr.bin/gdb/kgdb/trgt_i386.c:142: warning: comparison is always false due to limited range of data type In gnu/usr.bin/gdb/kgdb/kgdb.h, there is: struct kthr { struct kthr *next; uintptr_t paddr; uintptr_t kaddr; uintptr_t kstack; uintptr_t pcb; int tid; int pid; u_char cpu; }; The cpu field is assigned from td.td_oncpu (which is an int) in kgdb_thr_add_procs(), so I think it should be safe to change it to an int too: Index: gnu/usr.bin/gdb/kgdb/kgdb.h === --- gnu/usr.bin/gdb/kgdb/kgdb.h (revision 274350) +++ gnu/usr.bin/gdb/kgdb/kgdb.h (working copy) @@ -41,7 +41,7 @@ uintptr_t pcb; int tid; int pid; - u_char cpu; + int cpu; }; extern struct kthr *curkthr; Yes, please commit. -- John Baldwin ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r274362 - head/sys/dev/netmap
Author: luigi Date: Tue Nov 11 00:13:28 2014 New Revision: 274362 URL: https://svnweb.freebsd.org/changeset/base/274362 Log: in the Linux section, properly define the NMG_LOCK type. Also import WITH_GENERIC in preparation to adding fine-grained options to disable specific netmap components. Modified: head/sys/dev/netmap/netmap_kern.h Modified: head/sys/dev/netmap/netmap_kern.h == --- head/sys/dev/netmap/netmap_kern.h Tue Nov 11 00:10:44 2014 (r274361) +++ head/sys/dev/netmap/netmap_kern.h Tue Nov 11 00:13:28 2014 (r274362) @@ -37,6 +37,7 @@ #define WITH_VALE // comment out to disable VALE support #define WITH_PIPES #define WITH_MONITOR +#define WITH_GENERIC #if defined(__FreeBSD__) @@ -44,6 +45,8 @@ #define unlikely(x)__builtin_expect((long)!!(x), 0L) #defineNM_LOCK_T struct mtx + +/* netmap global lock */ #defineNMG_LOCK_T struct sx #define NMG_LOCK_INIT()sx_init(netmap_global_lock, \ netmap global lock) @@ -107,13 +110,20 @@ struct hrtimer { #define NM_ATOMIC_Tvolatile long unsigned int -// XXX a mtx would suffice here too 20130404 gl -#define NMG_LOCK_T struct semaphore -#define NMG_LOCK_INIT()sema_init(netmap_global_lock, 1) -#define NMG_LOCK_DESTROY() -#define NMG_LOCK() down(netmap_global_lock) -#define NMG_UNLOCK() up(netmap_global_lock) -#define NMG_LOCK_ASSERT() // XXX to be completed +#define NM_MTX_T struct mutex +#define NM_MTX_INIT(m, s) do { (void)s; mutex_init((m)); } while (0) +#define NM_MTX_DESTROY(m) do { (void)m; } while (0) +#define NM_MTX_LOCK(m) mutex_lock((m)) +#define NM_MTX_UNLOCK(m) mutex_unlock((m)) +#define NM_MTX_LOCK_ASSERT(m) mutex_is_locked((m)) + +#defineNMG_LOCK_T NM_MTX_T +#defineNMG_LOCK_INIT() NM_MTX_INIT(netmap_global_lock, \ + netmap_global_lock) +#defineNMG_LOCK_DESTROY() NM_MTX_DESTROY(netmap_global_lock) +#defineNMG_LOCK() NM_MTX_LOCK(netmap_global_lock) +#defineNMG_UNLOCK()NM_MTX_UNLOCK(netmap_global_lock) +#defineNMG_LOCK_ASSERT() NM_MTX_LOCK_ASSERT(netmap_global_lock) #ifndef DEV_NETMAP #define DEV_NETMAP @@ -641,6 +651,7 @@ struct netmap_hw_adapter { /* physical d int (*nm_hw_register)(struct netmap_adapter *, int onoff); }; +#ifdef WITH_GENERIC /* Mitigation support. */ struct nm_generic_mit { struct hrtimer mit_timer; @@ -668,6 +679,7 @@ struct netmap_generic_adapter { /* emula netdev_tx_t (*save_start_xmit)(struct mbuf *, struct ifnet *); #endif }; +#endif /* WITH_GENERIC */ static __inline int netmap_real_tx_rings(struct netmap_adapter *na) @@ -1481,6 +1493,7 @@ struct netmap_monitor_adapter { #endif /* WITH_MONITOR */ +#ifdef WITH_GENERIC /* * generic netmap emulation for devices that do not have * native netmap support. @@ -1512,6 +1525,7 @@ void netmap_mitigation_start(struct nm_g void netmap_mitigation_restart(struct nm_generic_mit *mit); int netmap_mitigation_active(struct nm_generic_mit *mit); void netmap_mitigation_cleanup(struct nm_generic_mit *mit); +#endif /* WITH_GENERIC */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r274363 - in head: sbin/route share/man/man4 share/man/man7 sys/netinet sys/netinet6 tools/tools/sysdoc
Author: melifaro Date: Tue Nov 11 02:52:40 2014 New Revision: 274363 URL: https://svnweb.freebsd.org/changeset/base/274363 Log: Kill custom in_matroute() radix mathing function removing one rte mutex lock. Initially in_matrote() in_clsroute() in their current state was introduced by r4105 20 years ago. Instead of deleting inactive routes immediately, we kept them in route table, setting RTPRF_OURS flag and some expire time. After that, either GC came or RTPRF_OURS got removed on first-packet. It was a good solution in that days (and probably another decade after that) to keep TCP metrics. However, after moving metrics to TCP hostcache in r122922, most of in_rmx functionality became unused. It might had been used for flushing icmp-originated routes before rte mutexes/refcounting, but I'm not sure about that. So it looks like this is nearly impossible to make GC do its work nowadays: in_rtkill() ignores non-RTPRF_OURS routes. route can only become RTPRF_OURS after dropping last reference via rtfree() which calls in_clsroute(), which, it turn, ignores UP and non-RTF_DYNAMIC routes. Dynamic routes can still be installed via received redirect, but they have default lifetime (no specific rt_expire) and no one has another trie walker to call RTFREE() on them. So, the changelist: * remove custom rnh_match / rnh_close matching function. * remove all GC functions * partially revert r256695 (proto3 is no more used inside kernel, it is not possible to use rt_expire from user point of view, proto3 support is not complete) * Finish r241884 (similar to this commit) and remove remaining IPv6 parts MFC after:1 month Modified: head/sbin/route/keywords head/sbin/route/route.8 head/sbin/route/route.c head/share/man/man4/inet.4 head/share/man/man4/inet6.4 head/share/man/man7/security.7 head/sys/netinet/in.h head/sys/netinet/in_rmx.c head/sys/netinet/in_var.h head/sys/netinet/ip_icmp.c head/sys/netinet/ip_input.c head/sys/netinet6/in6.h head/sys/netinet6/in6_rmx.c head/tools/tools/sysdoc/tunables.mdoc Modified: head/sbin/route/keywords == --- head/sbin/route/keywordsTue Nov 11 00:13:28 2014(r274362) +++ head/sbin/route/keywordsTue Nov 11 02:52:40 2014(r274363) @@ -40,7 +40,6 @@ osi prefixlen proto1 proto2 -proto3 proxy recvpipe reject Modified: head/sbin/route/route.8 == --- head/sbin/route/route.8 Tue Nov 11 00:13:28 2014(r274362) +++ head/sbin/route/route.8 Tue Nov 11 02:52:40 2014(r274363) @@ -28,7 +28,7 @@ .\ @(#)route.88.3 (Berkeley) 3/19/94 .\ $FreeBSD$ .\ -.Dd January 11, 2014 +.Dd November 11, 2014 .Dt ROUTE 8 .Os .Sh NAME @@ -315,7 +315,6 @@ by indicating the following correspondin -blackhole RTF_BLACKHOLE - silently discard pkts (during updates) -proto1RTF_PROTO1 - set protocol specific routing flag #1 -proto2RTF_PROTO2 - set protocol specific routing flag #2 --proto3RTF_PROTO3 - set protocol specific routing flag #3 .Ed .Pp The optional modifiers Modified: head/sbin/route/route.c == --- head/sbin/route/route.c Tue Nov 11 00:13:28 2014(r274362) +++ head/sbin/route/route.c Tue Nov 11 02:52:40 2014(r274363) @@ -847,9 +847,6 @@ newroute(int argc, char **argv) case K_PROTO2: flags |= RTF_PROTO2; break; - case K_PROTO3: - flags |= RTF_PROTO3; - break; case K_PROXY: nrflags |= F_PROXY; break; Modified: head/share/man/man4/inet.4 == --- head/share/man/man4/inet.4 Tue Nov 11 00:13:28 2014(r274362) +++ head/share/man/man4/inet.4 Tue Nov 11 02:52:40 2014(r274363) @@ -211,21 +211,6 @@ Boolean: enable/disable accepting of sou .It Dv IPCTL_SOURCEROUTE .Pq ip.sourceroute Boolean: enable/disable forwarding of source-routed IP packets (default false). -.It Dv IPCTL_RTEXPIRE -.Pq ip.rtexpire -Integer: lifetime in seconds of protocol-cloned -.Tn IP -routes after the last reference drops (default one hour). -This value varies dynamically as described above. -.It Dv IPCTL_RTMINEXPIRE -.Pq ip.rtminexpire -Integer: minimum value of ip.rtexpire (default ten seconds). -This value has no effect on user modifications, but restricts the dynamic -adaptation described above. -.It Dv IPCTL_RTMAXCACHE -.Pq ip.rtmaxcache -Integer: trigger level of cached, unreferenced, protocol-cloned routes -which initiates dynamic adaptation (default 128).
svn commit: r274364 - in head: contrib/telnet/arpa contrib/telnet/telnet contrib/telnet/telnetd contrib/tzcode/stdtime libexec/telnetd
Author: ngie Date: Tue Nov 11 04:06:05 2014 New Revision: 274364 URL: https://svnweb.freebsd.org/changeset/base/274364 Log: Add baud rate support to telnet(1) This implements part of RFC-2217 It's based off a patch originally written by Sujal Patel at Isilon, and contributions from other Isilon employees. PR: 173728 Phabric: D995 Reviewed by: markj, markm MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Added: head/contrib/telnet/telnet/baud.h (contents, props changed) Modified: head/contrib/telnet/arpa/telnet.h head/contrib/telnet/telnet/commands.c head/contrib/telnet/telnet/externs.h head/contrib/telnet/telnet/main.c head/contrib/telnet/telnet/sys_bsd.c head/contrib/telnet/telnet/telnet.1 head/contrib/telnet/telnet/telnet.c head/contrib/telnet/telnet/types.h head/contrib/telnet/telnetd/sys_term.c head/contrib/tzcode/stdtime/localtime.c head/libexec/telnetd/Makefile Modified: head/contrib/telnet/arpa/telnet.h == --- head/contrib/telnet/arpa/telnet.h Tue Nov 11 02:52:40 2014 (r274363) +++ head/contrib/telnet/arpa/telnet.h Tue Nov 11 04:06:05 2014 (r274364) @@ -127,6 +127,7 @@ extern char *telcmds[]; #defineTELOPT_KERMIT 47 /* RFC2840 - Kermit */ #defineTELOPT_EXOPL255 /* extended-options-list */ +#defineCOMPORT_SET_BAUDRATE1 /* RFC2217 - Com Port Set Baud Rate */ #defineNTELOPTS(1+TELOPT_KERMIT) #ifdef TELOPTS Added: head/contrib/telnet/telnet/baud.h == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/telnet/telnet/baud.h Tue Nov 11 04:06:05 2014 (r274364) @@ -0,0 +1,121 @@ +/* + * Copyright (c) 2014 EMC Corporation + * 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 JOHN BIRRELL AND CONTRIBUTORS ``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 REGENTS 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. + * + * $FreeBSD$ + */ + +/* + * Try to guess whether speeds are encoded (4.2BSD) or just numeric (4.4BSD). + */ +#if B4800 != 4800 +#defineDECODE_BAUD +#endif + +#ifdef DECODE_BAUD +#ifndefB7200 +#define B7200 B4800 +#endif + +#ifndefB14400 +#define B14400 B9600 +#endif + +#ifndefB19200 +#define B19200 B14400 +#endif + +#ifndefB28800 +#define B28800 B19200 +#endif + +#ifndefB38400 +#define B38400 B28800 +#endif + +#ifndef B57600 +#define B57600 B38400 +#endif + +#ifndef B76800 +#define B76800 B57600 +#endif + +#ifndef B115200 +#define B115200 B76800 +#endif + +#ifndef B115200 +#define B115200 B76800 +#endif +#endif + +#ifndef B230400 +#define B230400 B115200 +#endif + +/* + * A table of available terminal speeds + */ +struct termspeeds termspeeds[] = { + { 0, B0 }, + { 50, B50 }, + { 75, B75 }, + { 110,B110 }, + { 134,B134 }, + { 150,B150 }, + { 200,B200 }, + { 300,B300 }, + { 600,B600 }, + { 1200, B1200 }, + { 1800, B1800 }, + { 2400, B2400 }, + { 4800, B4800 }, +#ifdef B7200 + { 7200, B7200 }, +#endif + { 9600, B9600 }, +#ifdef B14400 + { 14400, B14400 }, +#endif +#ifdef B19200 + { 19200, B19200 }, +#endif +#ifdef B28800 + { 28800, B28800 }, +#endif +#ifdef B38400 + { 38400, B38400 }, +#endif +#ifdef B57600 + { 57600, B57600 }, +#endif +#ifdef B115200 + { 115200, B115200 }, +#endif +#ifdef B230400 + { 230400, B230400 }, +#endif + { -1, 0 } +}; Modified: head/contrib/telnet/telnet/commands.c == ---
svn commit: r274365 - head/contrib/tzcode/stdtime
Author: ngie Date: Tue Nov 11 04:07:41 2014 New Revision: 274365 URL: https://svnweb.freebsd.org/changeset/base/274365 Log: Revert WiP to contrib/tzcode accidentally committed with r274364 Modified: head/contrib/tzcode/stdtime/localtime.c Modified: head/contrib/tzcode/stdtime/localtime.c == --- head/contrib/tzcode/stdtime/localtime.c Tue Nov 11 04:06:05 2014 (r274364) +++ head/contrib/tzcode/stdtime/localtime.c Tue Nov 11 04:07:41 2014 (r274365) @@ -1792,11 +1792,7 @@ int delta; number0 = *number; *number += delta; - if ((*number number0) != (delta 0)) { - errno = EOVERFLOW; - return (1); - } - return (0); + return (*number number0) != (delta 0); } static int @@ -1808,11 +1804,7 @@ int delta; number0 = *number; *number += delta; - if ((*number number0) != (delta 0)) { - errno = EOVERFLOW; - return (1); - } - return (0); + return (*number number0) != (delta 0); } static int ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r274366 - in head/sys: dev/null geom kern sys
Author: pjd Date: Tue Nov 11 04:48:09 2014 New Revision: 274366 URL: https://svnweb.freebsd.org/changeset/base/274366 Log: Add missing privilege check when setting the dump device. Before that change it was possible for a regular user to setup the dump device if he had write access to the given device. In theory it is a security issue as user might get access to kernel's memory after provoking kernel crash, but in practise it is not recommended to give regular users direct access to storage devices. Rework the code so that we do privileges check within the set_dumper() function to avoid similar problems in the future. Discussed with: secteam Modified: head/sys/dev/null/null.c head/sys/geom/geom_dev.c head/sys/kern/kern_shutdown.c head/sys/sys/conf.h Modified: head/sys/dev/null/null.c == --- head/sys/dev/null/null.cTue Nov 11 04:07:41 2014(r274365) +++ head/sys/dev/null/null.cTue Nov 11 04:48:09 2014(r274366) @@ -37,7 +37,6 @@ __FBSDID($FreeBSD$); #include sys/kernel.h #include sys/malloc.h #include sys/module.h -#include sys/priv.h #include sys/disk.h #include sys/bus.h #include sys/filio.h @@ -110,9 +109,7 @@ null_ioctl(struct cdev *dev __unused, u_ switch (cmd) { case DIOCSKERNELDUMP: - error = priv_check(td, PRIV_SETDUMPER); - if (error == 0) - error = set_dumper(NULL, NULL); + error = set_dumper(NULL, NULL, td); break; case FIONBIO: break; Modified: head/sys/geom/geom_dev.c == --- head/sys/geom/geom_dev.cTue Nov 11 04:07:41 2014(r274365) +++ head/sys/geom/geom_dev.cTue Nov 11 04:48:09 2014(r274366) @@ -127,14 +127,14 @@ g_dev_fini(struct g_class *mp) } static int -g_dev_setdumpdev(struct cdev *dev) +g_dev_setdumpdev(struct cdev *dev, struct thread *td) { struct g_kerneldump kd; struct g_consumer *cp; int error, len; if (dev == NULL) - return (set_dumper(NULL, NULL)); + return (set_dumper(NULL, NULL, td)); cp = dev-si_drv2; len = sizeof(kd); @@ -142,7 +142,7 @@ g_dev_setdumpdev(struct cdev *dev) kd.length = OFF_MAX; error = g_io_getattr(GEOM::kerneldump, cp, len, kd); if (error == 0) { - error = set_dumper(kd.di, devtoname(dev)); + error = set_dumper(kd.di, devtoname(dev), td); if (error == 0) dev-si_flags |= SI_DUMPDEV; } @@ -157,7 +157,7 @@ init_dumpdev(struct cdev *dev) return; if (strcmp(devtoname(dev), dumpdev) != 0) return; - if (g_dev_setdumpdev(dev) == 0) { + if (g_dev_setdumpdev(dev, curthread) == 0) { freeenv(dumpdev); dumpdev = NULL; } @@ -453,9 +453,9 @@ g_dev_ioctl(struct cdev *dev, u_long cmd break; case DIOCSKERNELDUMP: if (*(u_int *)data == 0) - error = g_dev_setdumpdev(NULL); + error = g_dev_setdumpdev(NULL, td); else - error = g_dev_setdumpdev(dev); + error = g_dev_setdumpdev(dev, td); break; case DIOCGFLUSH: error = g_io_flush(cp); @@ -673,7 +673,7 @@ g_dev_orphan(struct g_consumer *cp) /* Reset any dump-area set on this device */ if (dev-si_flags SI_DUMPDEV) - (void)set_dumper(NULL, NULL); + (void)set_dumper(NULL, NULL, curthread); /* Destroy the struct cdev *so we get no more requests */ destroy_dev_sched_cb(dev, g_dev_callback, cp); Modified: head/sys/kern/kern_shutdown.c == --- head/sys/kern/kern_shutdown.c Tue Nov 11 04:07:41 2014 (r274365) +++ head/sys/kern/kern_shutdown.c Tue Nov 11 04:48:09 2014 (r274366) @@ -827,9 +827,14 @@ SYSCTL_STRING(_kern_shutdown, OID_AUTO, /* Registration of dumpers */ int -set_dumper(struct dumperinfo *di, const char *devname) +set_dumper(struct dumperinfo *di, const char *devname, struct thread *td) { size_t wantcopy; + int error; + + error = priv_check(td, PRIV_SETDUMPER); + if (error != 0) + return (error); if (di == NULL) { bzero(dumper, sizeof dumper); Modified: head/sys/sys/conf.h == --- head/sys/sys/conf.h Tue Nov 11 04:07:41 2014(r274365) +++ head/sys/sys/conf.h Tue Nov 11 04:48:09 2014(r274366) @@ -336,7 +336,7 @@ struct dumperinfo { off_t mediasize; /* Space available in bytes. */
svn commit: r274370 - head/contrib/hyperv/tools
Author: delphij Date: Tue Nov 11 05:49:57 2014 New Revision: 274370 URL: https://svnweb.freebsd.org/changeset/base/274370 Log: Rename variable name from 'index' to 'idx' to avoid shadowing index(3). Noticed by: dim MFC after:2 weeks Modified: head/contrib/hyperv/tools/hv_kvp_daemon.c Modified: head/contrib/hyperv/tools/hv_kvp_daemon.c == --- head/contrib/hyperv/tools/hv_kvp_daemon.c Tue Nov 11 05:49:35 2014 (r274369) +++ head/contrib/hyperv/tools/hv_kvp_daemon.c Tue Nov 11 05:49:57 2014 (r274370) @@ -511,25 +511,25 @@ kvp_get_value(int pool, __u8 *key, int k static int -kvp_pool_enumerate(int pool, int index, __u8 *key, int key_size, +kvp_pool_enumerate(int pool, int idx, __u8 *key, int key_size, __u8 *value, int value_size) { struct kvp_record *record; KVP_LOG(LOG_DEBUG, kvp_pool_enumerate: pool = %d, index = %d\n,, - pool, index); + pool, idx); /* First update our in-memory state first. */ kvp_update_mem_state(pool); record = kvp_pools[pool].records; /* Index starts with 0 */ - if (index = kvp_pools[pool].num_records) { + if (idx = kvp_pools[pool].num_records) { return (1); } - memcpy(key, record[index].key, key_size); - memcpy(value, record[index].value, value_size); + memcpy(key, record[idx].key, key_size); + memcpy(value, record[idx].value, value_size); return (0); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r273266 - in head: lib/libkvm sys/compat/freebsd32 sys/kern sys/sys
It is indeed used to calculate an address offset, but as it is already checked against NOCPU, it should be good: gnu/usr.bin/gdb/kgdb/kthr.c:kt-cpu = td.td_oncpu; gnu/usr.bin/gdb/kgdb/trgt_i386.c: if (kt == NULL || kt-cpu == NOCPU) gnu/usr.bin/gdb/kgdb/trgt_i386.c: addr += (kt-cpu * NGDT + GPROC0_SEL) * sizeof(sd); Maybe the test could be strengthened to check that kt-cpu = 0, but it might be overkill. -Dimitry On 11 Nov 2014, at 00:17, Adrian Chadd adr...@freebsd.org wrote: just double-check that the cpu id isn't used to size anything; I've seen it used as an offset into stuff, and NOCPU would've been entry 255 in the array, not -1. Ian pointed this out to me recently and I've only just started digging into it. -adrian On 10 November 2014 12:35, John Baldwin j...@freebsd.org wrote: On Monday, November 10, 2014 09:13:08 PM Dimitry Andric wrote: I noted something similar for kgdb, when compiled with gcc: cc1: warnings being treated as errors /usr/src/gnu/usr.bin/gdb/kgdb/trgt_i386.c: In function 'kgdb_trgt_fetch_tss': /usr/src/gnu/usr.bin/gdb/kgdb/trgt_i386.c:142: warning: comparison is always false due to limited range of data type In gnu/usr.bin/gdb/kgdb/kgdb.h, there is: struct kthr { struct kthr *next; uintptr_t paddr; uintptr_t kaddr; uintptr_t kstack; uintptr_t pcb; int tid; int pid; u_char cpu; }; The cpu field is assigned from td.td_oncpu (which is an int) in kgdb_thr_add_procs(), so I think it should be safe to change it to an int too: Index: gnu/usr.bin/gdb/kgdb/kgdb.h === --- gnu/usr.bin/gdb/kgdb/kgdb.h (revision 274350) +++ gnu/usr.bin/gdb/kgdb/kgdb.h (working copy) @@ -41,7 +41,7 @@ uintptr_t pcb; int tid; int pid; - u_char cpu; + int cpu; }; extern struct kthr *curkthr; Yes, please commit. -- John Baldwin signature.asc Description: Message signed with OpenPGP using GPGMail