Re: svn commit: r299108 - head/sys/sys
oops! sorry! -a On 4 May 2016 at 20:17, John Baldwinwrote: > On Thursday, May 05, 2016 02:51:31 AM Garrett Cooper wrote: >> Author: ngie >> Date: Thu May 5 02:51:31 2016 >> New Revision: 299108 >> URL: https://svnweb.freebsd.org/changeset/base/299108 >> >> Log: >> Revert r299096 >> >> The change broke buildworld when building lib/libkvm >> >> This change likely needs to be run through a ports -exp run as a sanity >> check, as it might break downstream consumers. >> >> Pointyhat to: adrian >> Reported by: kargl (confirmed on $work workstation) >> Sponsored by: EMC / Isilon Storage Division > > 'struct foo *' can be use with a simple forward declare in headers without > requiring header pollution (and is often done for that reason). device_t > should be used in any .c files, but headers might need to stick with > 'struct device *' in a few cases for that reason. I suspect both of these > fall into that category. > > -- > John Baldwin > ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r298933 - in head: share/man/man9 sys/amd64/include sys/dev/acpica sys/dev/drm2 sys/dev/drm2/i915 sys/kern sys/sys sys/x86/acpica sys/x86/x86
On Tuesday, May 03, 2016 11:19:44 AM John Baldwin wrote: > On Wednesday, May 04, 2016 03:58:40 AM Bruce Evans wrote: > > On Tue, 3 May 2016, John Baldwin wrote: > > > I would be happy to fix _bitset.h and _cpuset.h to not need sys/param.h. > > > However, they also use NBBY which is defined in sys/param.h. _sigset.h > > > gets around this because it uses an array of uint32_t and hardcodes a > > > shift count of 5 in _SIG_WORD() and a mask of 31 in _SIG_BIT(). If you > > > think it is fine to hardcode '8' instead of 'NBBY' I'll do that. Hmm, > > > sys/select.h hardcodes '8' for _NFDBITS, so I guess that is fine. > > > > NBBY can be cleaned up too. I rather like it, but it is bogus in C90 > > since it is spelled CHAR_BIT there, and it is now more bogus in POSIX > > since POSIX started specifying 8-bit bytes in 2001. Thus 8 is the > > correct spelling of it in the implementation where you don't want to > > expose a macro that makes it clearer what this magic 8 is. > > Ok. > > > BTW, I don't like select's and bitset's use of longs. Using unsigned > > for select is a historical mistake. Bitset apparently copied select > > except it unimproved to signed long. Bitstring uses unsigned char with > > no optimizations. Sigset uses uint32_t with no obvious optimizations, > > but compilers do a good job with with it due to its fixed size. I doubt > > that the manual optimization of using a wider size is important. > > I agree, but cpuset_t is already part of the ABI in existing releases. :( > Changing it to uint32_t would break the ABI for big-endian platforms. How about this: diff --git a/sys/arm/arm/genassym.c b/sys/arm/arm/genassym.c index f9cb23e..9c67018 100644 --- a/sys/arm/arm/genassym.c +++ b/sys/arm/arm/genassym.c @@ -28,6 +28,7 @@ #include __FBSDID("$FreeBSD$"); #include +#include #include #include #include diff --git a/sys/sys/_bitset.h b/sys/sys/_bitset.h index 26a8848..89dd7b6 100644 --- a/sys/sys/_bitset.h +++ b/sys/sys/_bitset.h @@ -36,26 +36,15 @@ * Macros addressing word and bit within it, tuned to make compiler * optimize cases when SETSIZE fits into single machine word. */ -#define_BITSET_BITS(sizeof(long) * NBBY) +#define_BITSET_BITS(sizeof(long) * 8) -#define__bitset_words(_s) (howmany(_s, _BITSET_BITS)) +#define_howmany(x, y) (((x) + ((y) - 1)) / (y)) -#define__bitset_mask(_s, n) \ - (1L << ((__bitset_words((_s)) == 1) ? \ - (__size_t)(n) : ((n) % _BITSET_BITS))) - -#define__bitset_word(_s, n) \ - ((__bitset_words((_s)) == 1) ? 0 : ((n) / _BITSET_BITS)) +#define__bitset_words(_s) (_howmany(_s, _BITSET_BITS)) #defineBITSET_DEFINE(t, _s) \ struct t { \ long__bits[__bitset_words((_s))]; \ } -#defineBITSET_T_INITIALIZER(x) \ - { .__bits = { x } } - -#defineBITSET_FSET(n) \ - [ 0 ... ((n) - 1) ] = (-1L) - #endif /* !_SYS__BITSET_H_ */ diff --git a/sys/sys/_cpuset.h b/sys/sys/_cpuset.h index cd38484..1ddafac 100644 --- a/sys/sys/_cpuset.h +++ b/sys/sys/_cpuset.h @@ -44,13 +44,7 @@ #defineCPU_SETSIZE CPU_MAXSIZE #endif -#define_NCPUBITS _BITSET_BITS -#define_NCPUWORDS __bitset_words(CPU_SETSIZE) - BITSET_DEFINE(_cpuset, CPU_SETSIZE); typedef struct _cpuset cpuset_t; -#defineCPUSET_FSET BITSET_FSET(_NCPUWORDS) -#defineCPUSET_T_INITIALIZERBITSET_T_INITIALIZER - #endif /* !_SYS__CPUSET_H_ */ diff --git a/sys/sys/bitset.h b/sys/sys/bitset.h index d130522..f1c7bf8 100644 --- a/sys/sys/bitset.h +++ b/sys/sys/bitset.h @@ -32,6 +32,13 @@ #ifndef _SYS_BITSET_H_ #define_SYS_BITSET_H_ +#define__bitset_mask(_s, n) \ + (1L << ((__bitset_words((_s)) == 1) ? \ + (__size_t)(n) : ((n) % _BITSET_BITS))) + +#define__bitset_word(_s, n) \ + ((__bitset_words((_s)) == 1) ? 0 : ((n) / _BITSET_BITS)) + #defineBIT_CLR(_s, n, p) \ ((p)->__bits[__bitset_word(_s, n)] &= ~__bitset_mask((_s), (n))) @@ -185,5 +192,11 @@ __count += __bitcountl((p)->__bits[__i]); \ __count;\ }) - + +#defineBITSET_T_INITIALIZER(x) \ + { .__bits = { x } } + +#defineBITSET_FSET(n) \ + [ 0 ... ((n) - 1) ]
Re: svn commit: r299108 - head/sys/sys
On Thursday, May 05, 2016 02:51:31 AM Garrett Cooper wrote: > Author: ngie > Date: Thu May 5 02:51:31 2016 > New Revision: 299108 > URL: https://svnweb.freebsd.org/changeset/base/299108 > > Log: > Revert r299096 > > The change broke buildworld when building lib/libkvm > > This change likely needs to be run through a ports -exp run as a sanity > check, as it might break downstream consumers. > > Pointyhat to: adrian > Reported by: kargl (confirmed on $work workstation) > Sponsored by: EMC / Isilon Storage Division 'struct foo *' can be use with a simple forward declare in headers without requiring header pollution (and is often done for that reason). device_t should be used in any .c files, but headers might need to stick with 'struct device *' in a few cases for that reason. I suspect both of these fall into that category. -- John Baldwin ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299108 - head/sys/sys
Author: ngie Date: Thu May 5 02:51:31 2016 New Revision: 299108 URL: https://svnweb.freebsd.org/changeset/base/299108 Log: Revert r299096 The change broke buildworld when building lib/libkvm This change likely needs to be run through a ports -exp run as a sanity check, as it might break downstream consumers. Pointyhat to: adrian Reported by: kargl (confirmed on $work workstation) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/sys/pcpu.h head/sys/sys/rman.h Modified: head/sys/sys/pcpu.h == --- head/sys/sys/pcpu.h Thu May 5 01:35:42 2016(r299107) +++ head/sys/sys/pcpu.h Thu May 5 02:51:31 2016(r299108) @@ -160,7 +160,7 @@ struct pcpu { struct lock_list_entry *pc_spinlocks; struct vmmeter pc_cnt; /* VM stats counters */ longpc_cp_time[CPUSTATES]; /* statclock ticks */ - device_tpc_device; + struct device *pc_device; void*pc_netisr; /* netisr SWI cookie */ int pc_unused1; /* unused field */ int pc_domain; /* Memory domain. */ Modified: head/sys/sys/rman.h == --- head/sys/sys/rman.h Thu May 5 01:35:42 2016(r299107) +++ head/sys/sys/rman.h Thu May 5 02:51:31 2016(r299108) @@ -126,7 +126,7 @@ int rman_first_free_region(struct rman * bus_space_handle_t rman_get_bushandle(struct resource *); bus_space_tag_t rman_get_bustag(struct resource *); rman_res_t rman_get_end(struct resource *); -device_t rman_get_device(struct resource *); +struct device *rman_get_device(struct resource *); u_int rman_get_flags(struct resource *); intrman_get_rid(struct resource *); rman_res_t rman_get_size(struct resource *); @@ -143,13 +143,13 @@ int rman_is_region_manager(struct resour intrman_release_resource(struct resource *r); struct resource *rman_reserve_resource(struct rman *rm, rman_res_t start, rman_res_t end, rman_res_t count, - u_int flags, device_t dev); + u_int flags, struct device *dev); struct resource *rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end, rman_res_t count, rman_res_t bound, - u_int flags, device_t dev); + u_int flags, struct device *dev); void rman_set_bushandle(struct resource *_r, bus_space_handle_t _h); void rman_set_bustag(struct resource *_r, bus_space_tag_t _t); -void rman_set_device(struct resource *_r, device_t _dev); +void rman_set_device(struct resource *_r, struct device *_dev); void rman_set_end(struct resource *_r, rman_res_t _end); void rman_set_rid(struct resource *_r, int _rid); void rman_set_start(struct resource *_r, rman_res_t _start); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r299086 - head
> On May 4, 2016, at 19:05, Warner Loshwrote: > > BTW, why is this a new NO_ thing? It should be MK_ instead... *sigh* I was just trying to fix my build :(… yes, there are a few variables in there (not just this one) that should be MK_, not NO_; converting this to MK_* will require a one-line change to release/… Thanks, -Ngie ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r299086 - head
BTW, why is this a new NO_ thing? It should be MK_ instead... Warner On Wed, May 4, 2016 at 6:47 PM, Ngie Cooper (yaneurabeya) < yaneurab...@gmail.com> wrote: > > > On May 4, 2016, at 17:31, Gleb Smirnoffwrote: > > > > On Wed, May 04, 2016 at 02:06:33PM -0700, Ngie Cooper (yaneurabeya) > wrote: > > N> > > N> > On May 4, 2016, at 14:00, Garrett Cooper wrote: > > N> > > > N> > Author: ngie > > N> > Date: Wed May 4 21:00:41 2016 > > N> > New Revision: 299086 > > N> > URL: https://svnweb.freebsd.org/changeset/base/299086 > > N> > > > N> > Log: > > N> > Default NO_INSTALLEXTRAKERNELS to "no" to unbreak the build > > N> > > > N> > MFC after: soon (was insta-MFCed -_-..) > > N> > Pointyhat to: glebius > > N> > Sponsored by: EMC / Isilon Storage Division > > N> > > > N> > Modified: > > N> > head/Makefile.inc1 > > > > Defaulting it to "no" you changed the behaviour backwards, which is > > wrong. > > Agreed. That’s why I inverted it back to “yes” in r299088. > > > N> This broke for me on 11.0-CURRENT because I use: > > N> > > N> KERNCONFS= GENERIC GENERIC-NODEBUG > > N> > > N> and use installkernel with INSTKERNNAME. > > > > That's quite specific setup. Probably NO_INSTALLEXTRAKERNELS should > > be played with conditionally. > > It’s not an uncommon setup though. I have used it on all my CURRENT > machines for some time because I might want to be able to use INVARIANTS > kernels sometimes when doing kernel changes, and boot !INVARIANTS kernels > all of the time. > > I chose "?= yes” because it’s better syntactic sugar than > `defined(NO_INSTALLEXTRAKERNELS) && ${NO_INSTALLKERNELS} != “yes”` and it > works with pre-bmake (the other idiom that bmake allows that would work > here… although with more duplicity is `:Uyes`, which would break > installkernel on FreeBSD 9 machines or with fmake as the system make). > > Thanks! > -Ngie > ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299107 - stable/9/sys/fs/devfs
Author: pfg Date: Thu May 5 01:35:42 2016 New Revision: 299107 URL: https://svnweb.freebsd.org/changeset/base/299107 Log: MFC r298732: sys/devfs: unsign an index to prevent signed integer overflow. cdp_maxdirent in struct:cdev_priv is of type u_int. Use the same type for the corresponding index in devfs_revoke(). Modified: stable/9/sys/fs/devfs/devfs_vnops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/devfs/devfs_vnops.c == --- stable/9/sys/fs/devfs/devfs_vnops.c Thu May 5 01:34:58 2016 (r299106) +++ stable/9/sys/fs/devfs/devfs_vnops.c Thu May 5 01:35:42 2016 (r299107) @@ -1374,7 +1374,7 @@ devfs_revoke(struct vop_revoke_args *ap) struct cdev *dev; struct cdev_priv *cdp; struct devfs_dirent *de; - int i; + u_int i; KASSERT((ap->a_flags & REVOKEALL) != 0, ("devfs_revoke !REVOKEALL")); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299106 - stable/10/sys/fs/devfs
Author: pfg Date: Thu May 5 01:34:58 2016 New Revision: 299106 URL: https://svnweb.freebsd.org/changeset/base/299106 Log: MFC r298732: sys/devfs: unsign an index to prevent signed integer overflow. cdp_maxdirent in struct:cdev_priv is of type u_int. Use the same type for the corresponding index in devfs_revoke(). Modified: stable/10/sys/fs/devfs/devfs_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/devfs/devfs_vnops.c == --- stable/10/sys/fs/devfs/devfs_vnops.cThu May 5 01:30:53 2016 (r299105) +++ stable/10/sys/fs/devfs/devfs_vnops.cThu May 5 01:34:58 2016 (r299106) @@ -1409,7 +1409,7 @@ devfs_revoke(struct vop_revoke_args *ap) struct cdev *dev; struct cdev_priv *cdp; struct devfs_dirent *de; - int i; + u_int i; KASSERT((ap->a_flags & REVOKEALL) != 0, ("devfs_revoke !REVOKEALL")); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299105 - stable/9/sys/compat/ndis
Author: pfg Date: Thu May 5 01:30:53 2016 New Revision: 299105 URL: https://svnweb.freebsd.org/changeset/base/299105 Log: MFC r298731, r298734: ndis(4): unsign some indexes to prevent overflows. The "len" parameter is uint32_t, indexing it with an int may end up in a signed integer overflow. strlen(3) returns an integer of size_t but a correponding index of type u_int is more than enough. Modified: stable/9/sys/compat/ndis/subr_ndis.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/compat/ndis/subr_ndis.c == --- stable/9/sys/compat/ndis/subr_ndis.cThu May 5 01:30:00 2016 (r299104) +++ stable/9/sys/compat/ndis/subr_ndis.cThu May 5 01:30:53 2016 (r299105) @@ -895,7 +895,7 @@ NdisReadPciSlotInformation(adapter, slot uint32_tlen; { ndis_miniport_block *block; - int i; + uint32_ti; char*dest; device_tdev; @@ -938,7 +938,7 @@ NdisWritePciSlotInformation(adapter, slo uint32_tlen; { ndis_miniport_block *block; - int i; + uint32_ti; char*dest; device_tdev; @@ -2431,7 +2431,7 @@ NdisReadPcmciaAttributeMemory(handle, of bus_space_handle_t bh; bus_space_tag_t bt; char*dest; - int i; + uint32_ti; if (handle == NULL) return (0); @@ -2461,7 +2461,7 @@ NdisWritePcmciaAttributeMemory(handle, o bus_space_handle_t bh; bus_space_tag_t bt; char*src; - int i; + uint32_ti; if (handle == NULL) return (0); @@ -2669,7 +2669,7 @@ ndis_find_sym(lf, filename, suffix, sym) { char*fullsym; char*suf; - int i; + u_int i; fullsym = ExAllocatePoolWithTag(NonPagedPool, MAXPATHLEN, 0); if (fullsym == NULL) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299103 - stable/10/sys/compat/ndis
Author: pfg Date: Thu May 5 01:29:53 2016 New Revision: 299103 URL: https://svnweb.freebsd.org/changeset/base/299103 Log: MFC r298731, r298734: ndis(4): unsign some indexes to prevent overflows. The "len" parameter is uint32_t, indexing it with an int may end up in a signed integer overflow. strlen(3) returns an integer of size_t but a correponding index of type u_int is more than enough. Modified: stable/10/sys/compat/ndis/subr_ndis.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/ndis/subr_ndis.c == --- stable/10/sys/compat/ndis/subr_ndis.c Thu May 5 01:09:30 2016 (r299102) +++ stable/10/sys/compat/ndis/subr_ndis.c Thu May 5 01:29:53 2016 (r299103) @@ -895,7 +895,7 @@ NdisReadPciSlotInformation(adapter, slot uint32_tlen; { ndis_miniport_block *block; - int i; + uint32_ti; char*dest; device_tdev; @@ -938,7 +938,7 @@ NdisWritePciSlotInformation(adapter, slo uint32_tlen; { ndis_miniport_block *block; - int i; + uint32_ti; char*dest; device_tdev; @@ -2431,7 +2431,7 @@ NdisReadPcmciaAttributeMemory(handle, of bus_space_handle_t bh; bus_space_tag_t bt; char*dest; - int i; + uint32_ti; if (handle == NULL) return (0); @@ -2461,7 +2461,7 @@ NdisWritePcmciaAttributeMemory(handle, o bus_space_handle_t bh; bus_space_tag_t bt; char*src; - int i; + uint32_ti; if (handle == NULL) return (0); @@ -2669,7 +2669,7 @@ ndis_find_sym(lf, filename, suffix, sym) { char*fullsym; char*suf; - int i; + u_int i; fullsym = ExAllocatePoolWithTag(NonPagedPool, MAXPATHLEN, 0); if (fullsym == NULL) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r299086 - head
> On May 4, 2016, at 17:31, Gleb Smirnoffwrote: > > On Wed, May 04, 2016 at 02:06:33PM -0700, Ngie Cooper (yaneurabeya) wrote: > N> > N> > On May 4, 2016, at 14:00, Garrett Cooper wrote: > N> > > N> > Author: ngie > N> > Date: Wed May 4 21:00:41 2016 > N> > New Revision: 299086 > N> > URL: https://svnweb.freebsd.org/changeset/base/299086 > N> > > N> > Log: > N> > Default NO_INSTALLEXTRAKERNELS to "no" to unbreak the build > N> > > N> > MFC after: soon (was insta-MFCed -_-..) > N> > Pointyhat to: glebius > N> > Sponsored by: EMC / Isilon Storage Division > N> > > N> > Modified: > N> > head/Makefile.inc1 > > Defaulting it to "no" you changed the behaviour backwards, which is > wrong. Agreed. That’s why I inverted it back to “yes” in r299088. > N> This broke for me on 11.0-CURRENT because I use: > N> > N> KERNCONFS= GENERIC GENERIC-NODEBUG > N> > N> and use installkernel with INSTKERNNAME. > > That's quite specific setup. Probably NO_INSTALLEXTRAKERNELS should > be played with conditionally. It’s not an uncommon setup though. I have used it on all my CURRENT machines for some time because I might want to be able to use INVARIANTS kernels sometimes when doing kernel changes, and boot !INVARIANTS kernels all of the time. I chose "?= yes” because it’s better syntactic sugar than `defined(NO_INSTALLEXTRAKERNELS) && ${NO_INSTALLKERNELS} != “yes”` and it works with pre-bmake (the other idiom that bmake allows that would work here… although with more duplicity is `:Uyes`, which would break installkernel on FreeBSD 9 machines or with fmake as the system make). Thanks! -Ngie ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r299086 - head
On Wed, May 04, 2016 at 02:06:33PM -0700, Ngie Cooper (yaneurabeya) wrote: N> N> > On May 4, 2016, at 14:00, Garrett Cooperwrote: N> > N> > Author: ngie N> > Date: Wed May 4 21:00:41 2016 N> > New Revision: 299086 N> > URL: https://svnweb.freebsd.org/changeset/base/299086 N> > N> > Log: N> > Default NO_INSTALLEXTRAKERNELS to "no" to unbreak the build N> > N> > MFC after: soon (was insta-MFCed -_-..) N> > Pointyhat to: glebius N> > Sponsored by: EMC / Isilon Storage Division N> > N> > Modified: N> > head/Makefile.inc1 Defaulting it to "no" you changed the behaviour backwards, which is wrong. N> This broke for me on 11.0-CURRENT because I use: N> N> KERNCONFS= GENERIC GENERIC-NODEBUG N> N> and use installkernel with INSTKERNNAME. That's quite specific setup. Probably NO_INSTALLEXTRAKERNELS should be played with conditionally. -- Totus tuus, Glebius. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299098 - head/sys/boot/efi/libefi
Author: cem Date: Thu May 5 00:07:08 2016 New Revision: 299098 URL: https://svnweb.freebsd.org/changeset/base/299098 Log: efipart: Support an arbitrary number of partitions Don't crash if the user has more than 31 of them. A follow-up to r298230. Reviewed by: allanjude Relnotes: maybe Sponsored by: EMC / Isilon Storage Division Differential Revision:https://reviews.freebsd.org/D6212 Modified: head/sys/boot/efi/libefi/efipart.c Modified: head/sys/boot/efi/libefi/efipart.c == --- head/sys/boot/efi/libefi/efipart.c Wed May 4 23:38:27 2016 (r299097) +++ head/sys/boot/efi/libefi/efipart.c Thu May 5 00:07:08 2016 (r299098) @@ -65,14 +65,12 @@ struct devsw efipart_dev = { /* * info structure to support bcache */ -#defineMAXPDDEV31 /* see MAXDEV in libi386.h */ - -static struct pdinfo -{ +struct pdinfo { int pd_unit;/* unit number */ int pd_open;/* reference counter */ void*pd_bcache; /* buffer cache data */ -} pdinfo [MAXPDDEV]; +}; +static struct pdinfo *pdinfo; static int npdinfo = 0; #define PD(dev) (pdinfo[(dev)->d_unit]) @@ -109,6 +107,9 @@ efipart_init(void) nout = 0; bzero(aliases, nin * sizeof(EFI_HANDLE)); + pdinfo = malloc(nin * sizeof(*pdinfo)); + if (pdinfo == NULL) + return (ENOMEM); for (n = 0; n < nin; n++) { status = BS->HandleProtocol(hin[n], _guid, ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299097 - in head: share/man/man4 sys/conf sys/dev/bhnd/bhndb sys/dev/bwn sys/modules sys/modules/bwn_pci
Author: adrian Date: Wed May 4 23:38:27 2016 New Revision: 299097 URL: https://svnweb.freebsd.org/changeset/base/299097 Log: [bwn] [bhnd] initial support for using bhnd for if_bwn devices. This is an initial work in progress to use the replacement bhnd bus code for devices which support it. * Add manpage updates for bhnd, bhndb, siba * Add kernel options for bhnd, bhndbus, etc * Add initial support in if_bwn_pci / if_bwn_mac for using bhnd as the bus transport for suppoted NICs * if_bwn_pci will eventually be the PCI bus glue to interface to bwn, which will use the right backend bus to attach to, versus direct nexus/bhnd attachments (as found in embedded broadcom devices.) The PCI glue defaults to probing at a lower level than the bwn glue, so bwn should still attach as per normal without a boot time tunable set. It's also not fully fleshed out - the bwn probe/attach code needs to be broken out into platform and bus specific things (just like ath, ath_pci, ath_ahb) before we can shift the driver over to using this. Tested: * BCM4311, STA mode * BCM4312, STA mode Submitted by: Landon FullerDifferential Revision:https://reviews.freebsd.org/D6191 Added: head/share/man/man4/bcma.4 (contents, props changed) head/share/man/man4/bhnd.4 (contents, props changed) head/share/man/man4/bhndb.4 (contents, props changed) head/sys/dev/bwn/bwn_mac.c (contents, props changed) head/sys/dev/bwn/if_bwn.c.c (contents, props changed) head/sys/dev/bwn/if_bwn_pci.c (contents, props changed) head/sys/dev/bwn/if_bwn_pcivar.h (contents, props changed) head/sys/modules/bwn_pci/ head/sys/modules/bwn_pci/Makefile (contents, props changed) Modified: head/share/man/man4/Makefile head/share/man/man4/siba.4 head/sys/conf/files head/sys/dev/bhnd/bhndb/bhndb.c head/sys/dev/bhnd/bhndb/bhndb_pci.c head/sys/dev/bhnd/bhndb/bhndb_subr.c head/sys/dev/bwn/if_bwn.c head/sys/dev/bwn/if_bwn_debug.h head/sys/modules/Makefile Modified: head/share/man/man4/Makefile == --- head/share/man/man4/MakefileWed May 4 23:32:57 2016 (r299096) +++ head/share/man/man4/MakefileWed May 4 23:38:27 2016 (r299097) @@ -71,9 +71,12 @@ MAN= aac.4 \ axe.4 \ axge.4 \ bce.4 \ + bcma.4 \ bfe.4 \ bge.4 \ ${_bhyve.4} \ + bhnd.4 \ + bhndb.4 \ bktr.4 \ blackhole.4 \ bpf.4 \ Added: head/share/man/man4/bcma.4 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/bcma.4 Wed May 4 23:38:27 2016(r299097) @@ -0,0 +1,78 @@ +.\" Copyright (c) 2015 Landon Fuller +.\" Copyright (c) 2010 Weongyo Jeong +.\" 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 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 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. +.\" +.\" $FreeBSD$ +.\" +.Dd December 8, 2015 +.Dt BCMA 4 +.Os +.Sh NAME +.Nm bcma +.Nd Broadcom AMBA Backplane driver +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your kernel configuration file: +.Bd -ragged -offset indent +.Cd "device bhnd" +.Cd "device bcma" +.Ed +.Pp +Alternatively, to load the driver as a module at boot time, +place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +bcma_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides +.Xr bhnd 4 +support for devices using the ARM AMBA-based backplane architecture found +in later Broadcom Home Networking Division's (HND) wireless chipsets and +embedded systems.
svn commit: r299096 - head/sys/sys
Author: adrian Date: Wed May 4 23:32:57 2016 New Revision: 299096 URL: https://svnweb.freebsd.org/changeset/base/299096 Log: s/struct device */device_t/g Submitted by: kmacy Modified: head/sys/sys/pcpu.h head/sys/sys/rman.h Modified: head/sys/sys/pcpu.h == --- head/sys/sys/pcpu.h Wed May 4 23:31:52 2016(r299095) +++ head/sys/sys/pcpu.h Wed May 4 23:32:57 2016(r299096) @@ -160,7 +160,7 @@ struct pcpu { struct lock_list_entry *pc_spinlocks; struct vmmeter pc_cnt; /* VM stats counters */ longpc_cp_time[CPUSTATES]; /* statclock ticks */ - struct device *pc_device; + device_tpc_device; void*pc_netisr; /* netisr SWI cookie */ int pc_unused1; /* unused field */ int pc_domain; /* Memory domain. */ Modified: head/sys/sys/rman.h == --- head/sys/sys/rman.h Wed May 4 23:31:52 2016(r299095) +++ head/sys/sys/rman.h Wed May 4 23:32:57 2016(r299096) @@ -126,7 +126,7 @@ int rman_first_free_region(struct rman * bus_space_handle_t rman_get_bushandle(struct resource *); bus_space_tag_t rman_get_bustag(struct resource *); rman_res_t rman_get_end(struct resource *); -struct device *rman_get_device(struct resource *); +device_t rman_get_device(struct resource *); u_int rman_get_flags(struct resource *); intrman_get_rid(struct resource *); rman_res_t rman_get_size(struct resource *); @@ -143,13 +143,13 @@ int rman_is_region_manager(struct resour intrman_release_resource(struct resource *r); struct resource *rman_reserve_resource(struct rman *rm, rman_res_t start, rman_res_t end, rman_res_t count, - u_int flags, struct device *dev); + u_int flags, device_t dev); struct resource *rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end, rman_res_t count, rman_res_t bound, - u_int flags, struct device *dev); + u_int flags, device_t dev); void rman_set_bushandle(struct resource *_r, bus_space_handle_t _h); void rman_set_bustag(struct resource *_r, bus_space_tag_t _t); -void rman_set_device(struct resource *_r, struct device *_dev); +void rman_set_device(struct resource *_r, device_t _dev); void rman_set_end(struct resource *_r, rman_res_t _end); void rman_set_rid(struct resource *_r, int _rid); void rman_set_start(struct resource *_r, rman_res_t _start); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299095 - head/sys/kern
Author: adrian Date: Wed May 4 23:31:52 2016 New Revision: 299095 URL: https://svnweb.freebsd.org/changeset/base/299095 Log: s/struct device */device_t/g Submitted by: kmacy Modified: head/sys/kern/subr_bus.c head/sys/kern/subr_rman.c Modified: head/sys/kern/subr_bus.c == --- head/sys/kern/subr_bus.cWed May 4 23:20:53 2016(r299094) +++ head/sys/kern/subr_bus.cWed May 4 23:31:52 2016(r299095) @@ -5186,7 +5186,7 @@ find_device(struct devreq *req, device_t } static bool -driver_exists(struct device *bus, const char *driver) +driver_exists(device_t bus, const char *driver) { devclass_t dc; Modified: head/sys/kern/subr_rman.c == --- head/sys/kern/subr_rman.c Wed May 4 23:20:53 2016(r299094) +++ head/sys/kern/subr_rman.c Wed May 4 23:31:52 2016(r299095) @@ -94,7 +94,7 @@ struct resource_i { rman_res_t r_end; /* index of the last entry (inclusive) */ u_int r_flags; void*r_virtual; /* virtual address of this resource */ - struct device *r_dev; /* device which has allocated this resource */ + device_t r_dev; /* device which has allocated this resource */ struct rman *r_rm; /* resource manager from whence this came */ int r_rid; /* optional rid for this resource. */ }; @@ -436,7 +436,7 @@ rman_adjust_resource(struct resource *rr struct resource * rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end, rman_res_t count, rman_res_t bound, u_int flags, - struct device *dev) + device_t dev) { u_int new_rflags; struct resource_i *r, *s, *rv; @@ -652,7 +652,7 @@ out: struct resource * rman_reserve_resource(struct rman *rm, rman_res_t start, rman_res_t end, - rman_res_t count, u_int flags, struct device *dev) + rman_res_t count, u_int flags, device_t dev) { return (rman_reserve_resource_bound(rm, start, end, count, 0, flags, @@ -911,13 +911,13 @@ rman_get_rid(struct resource *r) } void -rman_set_device(struct resource *r, struct device *dev) +rman_set_device(struct resource *r, device_t dev) { r->__r_i->r_dev = dev; } -struct device * +device_t rman_get_device(struct resource *r) { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299094 - in head: bin/cat/tests bin/date/tests bin/dd/tests bin/expr/tests bin/ls/tests bin/mv/tests bin/pax/tests bin/pkill/tests bin/sh/tests bin/sh/tests/builtins bin/sh/tests/error...
Author: ngie Date: Wed May 4 23:20:53 2016 New Revision: 299094 URL: https://svnweb.freebsd.org/changeset/base/299094 Log: Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed after r298107 Summary of changes: - Replace all instances of FILES/TESTS with ${PACKAGE}FILES. This ensures that namespacing is kept with FILES appropriately, and that this shouldn't need to be repeated if the namespace changes -- only the definition of PACKAGE needs to be changed - Allow PACKAGE to be overridden by callers instead of forcing it to always be `tests`. In the event we get to the point where things can be split up enough in the base system, it would make more sense to group the tests with the blocks they're a part of, e.g. byacc with byacc-tests, etc - Remove PACKAGE definitions where possible, i.e. where FILES wasn't used previously. - Remove unnecessary TESTSPACKAGE definitions; this has been elided into bsd.tests.mk - Remove unnecessary BINDIRs used previously with ${PACKAGE}FILES; ${PACKAGE}FILESDIR is now automatically defined in bsd.test.mk. - Fix installation of files under data/ subdirectories in lib/libc/tests/hash and lib/libc/tests/net/getaddrinfo - Remove unnecessary .include s (some opportunistic cleanup) Document the proposed changes in share/examples/tests/tests/... via examples so it's clear that ${PACKAGES}FILES is the suggested way forward in terms of replacing FILES. share/mk/bsd.README didn't seem like the appropriate method of communicating that info. MFC after: never probably X-MFC with: r298107 PR: 209114 Relnotes: yes Tested with: buildworld, installworld, checkworld; buildworld, packageworld Sponsored by: EMC / Isilon Storage Division Modified: head/bin/cat/tests/Makefile head/bin/date/tests/Makefile head/bin/dd/tests/Makefile head/bin/expr/tests/Makefile head/bin/ls/tests/Makefile head/bin/mv/tests/Makefile head/bin/pax/tests/Makefile head/bin/pkill/tests/Makefile head/bin/sh/tests/Makefile head/bin/sh/tests/builtins/Makefile head/bin/sh/tests/errors/Makefile head/bin/sh/tests/execution/Makefile head/bin/sh/tests/expansion/Makefile head/bin/sh/tests/parameters/Makefile head/bin/sh/tests/parser/Makefile head/bin/sh/tests/set-e/Makefile head/bin/sleep/tests/Makefile head/bin/test/tests/Makefile head/bin/tests/Makefile head/cddl/lib/tests/Makefile head/cddl/sbin/tests/Makefile head/cddl/tests/Makefile head/cddl/usr.bin/tests/Makefile head/cddl/usr.sbin/dtrace/tests/Makefile head/cddl/usr.sbin/dtrace/tests/common/aggs/Makefile head/cddl/usr.sbin/dtrace/tests/common/arithmetic/Makefile head/cddl/usr.sbin/dtrace/tests/common/arrays/Makefile head/cddl/usr.sbin/dtrace/tests/common/assocs/Makefile head/cddl/usr.sbin/dtrace/tests/common/begin/Makefile head/cddl/usr.sbin/dtrace/tests/common/bitfields/Makefile head/cddl/usr.sbin/dtrace/tests/common/buffering/Makefile head/cddl/usr.sbin/dtrace/tests/common/builtinvar/Makefile head/cddl/usr.sbin/dtrace/tests/common/cg/Makefile head/cddl/usr.sbin/dtrace/tests/common/clauses/Makefile head/cddl/usr.sbin/dtrace/tests/common/cpc/Makefile head/cddl/usr.sbin/dtrace/tests/common/decls/Makefile head/cddl/usr.sbin/dtrace/tests/common/docsExamples/Makefile head/cddl/usr.sbin/dtrace/tests/common/drops/Makefile head/cddl/usr.sbin/dtrace/tests/common/dtraceUtil/Makefile head/cddl/usr.sbin/dtrace/tests/common/end/Makefile head/cddl/usr.sbin/dtrace/tests/common/enum/Makefile head/cddl/usr.sbin/dtrace/tests/common/error/Makefile head/cddl/usr.sbin/dtrace/tests/common/exit/Makefile head/cddl/usr.sbin/dtrace/tests/common/fbtprovider/Makefile head/cddl/usr.sbin/dtrace/tests/common/funcs/Makefile head/cddl/usr.sbin/dtrace/tests/common/grammar/Makefile head/cddl/usr.sbin/dtrace/tests/common/include/Makefile head/cddl/usr.sbin/dtrace/tests/common/inline/Makefile head/cddl/usr.sbin/dtrace/tests/common/io/Makefile head/cddl/usr.sbin/dtrace/tests/common/ip/Makefile head/cddl/usr.sbin/dtrace/tests/common/java_api/Makefile head/cddl/usr.sbin/dtrace/tests/common/json/Makefile head/cddl/usr.sbin/dtrace/tests/common/lexer/Makefile head/cddl/usr.sbin/dtrace/tests/common/llquantize/Makefile head/cddl/usr.sbin/dtrace/tests/common/mdb/Makefile head/cddl/usr.sbin/dtrace/tests/common/mib/Makefile head/cddl/usr.sbin/dtrace/tests/common/misc/Makefile head/cddl/usr.sbin/dtrace/tests/common/multiaggs/Makefile head/cddl/usr.sbin/dtrace/tests/common/nfs/Makefile head/cddl/usr.sbin/dtrace/tests/common/offsetof/Makefile head/cddl/usr.sbin/dtrace/tests/common/operators/Makefile head/cddl/usr.sbin/dtrace/tests/common/pid/Makefile head/cddl/usr.sbin/dtrace/tests/common/plockstat/Makefile head/cddl/usr.sbin/dtrace/tests/common/pointers/Makefile head/cddl/usr.sbin/dtrace/tests/common/pragma/Makefile
svn commit: r299092 - head/sys/dev/fdc
Author: jhb Date: Wed May 4 23:00:57 2016 New Revision: 299092 URL: https://svnweb.freebsd.org/changeset/base/299092 Log: Fix the acpi attachment to always start the worker thread. The previous change to split the worker thread start out of fdc_attach() did not start the worker thread if the fdc device in the ACPI namespace did not have an _FDE method. This fixes hangs when booting with a floppy controller enabled on certain machines with ACPI. Tested by:joel Modified: head/sys/dev/fdc/fdc_acpi.c Modified: head/sys/dev/fdc/fdc_acpi.c == --- head/sys/dev/fdc/fdc_acpi.c Wed May 4 22:57:28 2016(r299091) +++ head/sys/dev/fdc/fdc_acpi.c Wed May 4 23:00:57 2016(r299092) @@ -135,14 +135,13 @@ fdc_acpi_attach(device_t dev) obj = buf.Pointer; error = fdc_acpi_probe_children(bus, dev, obj->Buffer.Pointer); - if (error == 0) - fdc_start_worker(dev); - out: if (buf.Pointer) free(buf.Pointer, M_TEMP); if (error != 0) fdc_release_resources(sc); + else + fdc_start_worker(dev); return (error); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299090 - in head: etc/mtree include lib/libbluetooth sbin/hastd share/man/man3 sys/dev/xen/blkback sys/kern sys/net sys/sys tests/sys tests/sys/sys usr.sbin/bluetooth/hccontrol
Author: asomers Date: Wed May 4 22:34:11 2016 New Revision: 299090 URL: https://svnweb.freebsd.org/changeset/base/299090 Log: Improve performance and functionality of the bitstring(3) api Two new functions are provided, bit_ffs_at() and bit_ffc_at(), which allow for efficient searching of set or cleared bits starting from any bit offset within the bit string. Performance is improved by operating on longs instead of bytes and using ffsl() for searches within a long. ffsl() is a compiler builtin in both clang and gcc for most architectures, converting what was a brute force while loop search into a couple of instructions. All of the bitstring(3) API continues to be contained in the header file. Some of the functions are large enough that perhaps they should be uninlined and moved to a library, but that is beyond the scope of this commit. sys/sys/bitstring.h: Convert the majority of the existing bit string implementation from macros to inline functions. Properly protect the implementation from inadvertant macro expansion when included in a user's program by prefixing all private macros/functions and local variables with '_'. Add bit_ffs_at() and bit_ffc_at(). Implement bit_ffs() and bit_ffc() in terms of their "at" counterparts. Provide a kernel implementation of bit_alloc(), making the full API usable in the kernel. Improve code documenation. share/man/man3/bitstring.3: Add pre-exisiting API bit_ffc() to the synopsis. Document new APIs. Document the initialization state of the bit strings allocated/declared by bit_alloc() and bit_decl(). Correct documentation for bitstr_size(). The original code comments indicate the size is in bytes, not "elements of bitstr_t". The new implementation follows this lead. Only hastd assumed "elements" rather than bytes and it has been corrected. etc/mtree/BSD.tests.dist: tests/sys/Makefile: tests/sys/sys/Makefile: tests/sys/sys/bitstring.c: Add tests for all existing and new functionality. include/bitstring.h Include all headers needed by sys/bitstring.h lib/libbluetooth/bluetooth.h: usr.sbin/bluetooth/hccontrol/le.c: Include bitstring.h instead of sys/bitstring.h. sbin/hastd/activemap.c: Correct usage of bitstr_size(). sys/dev/xen/blkback/blkback.c Use new bit_alloc. sys/kern/subr_unit.c: Remove hard-coded assumption that sizeof(bitstr_t) is 1. Get rid of unrb.busy, which caches the number of bits set in unrb.map. When INVARIANTS are disabled, nothing needs to know that information. callapse_unr can be adapted to use bit_ffs and bit_ffc instead. Eliminating unrb.busy saves memory, simplifies the code, and provides a slight speedup when INVARIANTS are disabled. sys/net/flowtable.c: Use the new kernel implementation of bit-alloc, instead of hacking the old libc-dependent macro. sys/sys/param.h Update __FreeBSD_version to indicate availability of new API Submitted by: gibbs, asomers Reviewed by:gibbs, ngie MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D6004 Added: head/tests/sys/sys/ head/tests/sys/sys/Makefile (contents, props changed) head/tests/sys/sys/bitstring_test.c (contents, props changed) Modified: head/etc/mtree/BSD.tests.dist head/include/bitstring.h head/lib/libbluetooth/bluetooth.h head/sbin/hastd/activemap.c head/share/man/man3/bitstring.3 head/sys/dev/xen/blkback/blkback.c head/sys/kern/subr_unit.c head/sys/net/flowtable.c head/sys/sys/bitstring.h head/sys/sys/param.h head/tests/sys/Makefile head/usr.sbin/bluetooth/hccontrol/le.c Modified: head/etc/mtree/BSD.tests.dist == --- head/etc/mtree/BSD.tests.dist Wed May 4 22:27:22 2016 (r299089) +++ head/etc/mtree/BSD.tests.dist Wed May 4 22:34:11 2016 (r299090) @@ -460,6 +460,8 @@ .. posixshm .. +sys +.. vfs .. vm Modified: head/include/bitstring.h == --- head/include/bitstring.hWed May 4 22:27:22 2016(r299089) +++ head/include/bitstring.hWed May 4 22:34:11 2016(r299090) @@ -29,6 +29,8 @@ #ifndef _BITSTRING_H_ #define_BITSTRING_H_ +#include +#include #include #endif /* _BITSTRING_H_ */ Modified: head/lib/libbluetooth/bluetooth.h == --- head/lib/libbluetooth/bluetooth.h Wed May 4 22:27:22 2016
svn commit: r299089 - head/sbin/fsck_msdosfs
Author: pfg Date: Wed May 4 22:27:22 2016 New Revision: 299089 URL: https://svnweb.freebsd.org/changeset/base/299089 Log: fsck_msdosfs: Adjust a check. The on-disk FAT array does not include anything before CLUST_FIRST, compensate in size check. Obtained from:NetBSD (CVS Rev. 1.20) MFC after:2 weeks Modified: head/sbin/fsck_msdosfs/boot.c Modified: head/sbin/fsck_msdosfs/boot.c == --- head/sbin/fsck_msdosfs/boot.c Wed May 4 21:15:28 2016 (r299088) +++ head/sbin/fsck_msdosfs/boot.c Wed May 4 22:27:22 2016 (r299089) @@ -221,7 +221,7 @@ readboot(int dosfs, struct bootblock *bo break; } - if (boot->NumFatEntries < boot->NumClusters) { + if (boot->NumFatEntries < boot->NumClusters - CLUST_FIRST) { pfatal("FAT size too small, %u entries won't fit into %u sectors\n", boot->NumClusters, boot->FATsecs); return FSFATAL; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299088 - head
Author: ngie Date: Wed May 4 21:15:28 2016 New Revision: 299088 URL: https://svnweb.freebsd.org/changeset/base/299088 Log: Default NO_INSTALLEXTRAKERNELS to yes, not no The old (^/stable/9) default was yes, not no ("no" was the new default introduced recently that broke POLA). Restore it to keep POLA like glebius intended in r299077 MFC after: 3 days X-MFC with: r299086 Pointyhat to: ngie (research before assuming and committing next time) Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Wed May 4 21:07:30 2016(r299087) +++ head/Makefile.inc1 Wed May 4 21:15:28 2016(r299088) @@ -1133,7 +1133,7 @@ buildkernel: .MAKE .PHONY @echo "--" .endfor -NO_INSTALLEXTRAKERNELS?= no +NO_INSTALLEXTRAKERNELS?= yes # # installkernel, etc. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299087 - in head/usr.sbin/extattr: . tests
Author: asomers Date: Wed May 4 21:07:30 2016 New Revision: 299087 URL: https://svnweb.freebsd.org/changeset/base/299087 Log: Fix "getextattr -x" with non-ascii attribute values extattr/rmextattr.c When printing hex output, treat all attribute values as unsigned char arrays instead of sign extending them to 32 bit values. extattr/tests/extattr_test.sh Add a regression test PR: 209039 MFC after:4 weeks Sponsored by: Spectra Logic Corp Modified: head/usr.sbin/extattr/rmextattr.c head/usr.sbin/extattr/tests/extattr_test.sh Modified: head/usr.sbin/extattr/rmextattr.c == --- head/usr.sbin/extattr/rmextattr.c Wed May 4 21:00:41 2016 (r299086) +++ head/usr.sbin/extattr/rmextattr.c Wed May 4 21:07:30 2016 (r299087) @@ -294,7 +294,8 @@ main(int argc, char *argv[]) printf("\"%s\"", visbuf); } else if (flag_hex) { for (i = 0; i < ret; i++) - printf("%s%02x", i ? " " : "", buf[i]); + printf("%s%02x", i ? " " : "", + (unsigned char)buf[i]); } else { fwrite(buf, ret, 1, stdout); } Modified: head/usr.sbin/extattr/tests/extattr_test.sh == --- head/usr.sbin/extattr/tests/extattr_test.sh Wed May 4 21:00:41 2016 (r299086) +++ head/usr.sbin/extattr/tests/extattr_test.sh Wed May 4 21:07:30 2016 (r299087) @@ -43,9 +43,22 @@ hex_head() { } hex_body() { touch foo - atf_check -s exit:0 -o empty setextattr user myattr1 XYZ foo + atf_check -s exit:0 -o empty setextattr user myattr XYZ foo atf_check -s exit:0 -o inline:"58 59 5a\n" \ - getextattr -qx user myattr1 foo + getextattr -qx user myattr foo +} + +atf_test_case hex_nonascii +hex_nonascii_head() { + atf_set "descr" "Get binary attribute values in hexadecimal" +} +hex_nonascii_body() { + touch foo + BINSTUFF=`echo $'\x20\x30\x40\x55\x66\x70\x81\xa2\xb3\xee\xff'` + atf_check -s exit:0 -o empty setextattr user myattr "$BINSTUFF" foo + getextattr user myattr foo + atf_check -s exit:0 -o inline:"20 30 40 55 66 70 81 a2 b3 ee ff\n" \ + getextattr -qx user myattr foo } atf_test_case long_name @@ -299,9 +312,9 @@ unprivileged_user_cannot_set_system_attr atf_init_test_cases() { - # TODO: add test cases for verbose output (without -q) atf_add_test_case bad_namespace atf_add_test_case hex + atf_add_test_case hex_nonascii atf_add_test_case long_name atf_add_test_case loud atf_add_test_case noattrs ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r299086 - head
> On May 4, 2016, at 14:00, Garrett Cooperwrote: > > Author: ngie > Date: Wed May 4 21:00:41 2016 > New Revision: 299086 > URL: https://svnweb.freebsd.org/changeset/base/299086 > > Log: > Default NO_INSTALLEXTRAKERNELS to "no" to unbreak the build > > MFC after: soon (was insta-MFCed -_-..) > Pointyhat to: glebius > Sponsored by: EMC / Isilon Storage Division > > Modified: > head/Makefile.inc1 This broke for me on 11.0-CURRENT because I use: KERNCONFS= GENERIC GENERIC-NODEBUG and use installkernel with INSTKERNNAME. Thanks, -Ngie ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299086 - head
Author: ngie Date: Wed May 4 21:00:41 2016 New Revision: 299086 URL: https://svnweb.freebsd.org/changeset/base/299086 Log: Default NO_INSTALLEXTRAKERNELS to "no" to unbreak the build MFC after: soon (was insta-MFCed -_-..) Pointyhat to: glebius Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Wed May 4 20:20:55 2016(r299085) +++ head/Makefile.inc1 Wed May 4 21:00:41 2016(r299086) @@ -1133,6 +1133,8 @@ buildkernel: .MAKE .PHONY @echo "--" .endfor +NO_INSTALLEXTRAKERNELS?= no + # # installkernel, etc. # ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299085 - in head/usr.sbin/extattr: . tests
Author: asomers Date: Wed May 4 20:20:55 2016 New Revision: 299085 URL: https://svnweb.freebsd.org/changeset/base/299085 Log: Allow setextattr(8) to take attribute values from stdin Add the -i option to setextattr. This option allow extended attribute data to be provided via stdin. Add a -qq option to getextattr, which omits the trailing newline. Together these options can be used to work with extended attributes whose values are large and/or binary. usr.sbin/extattr/Makefile: Link against libsbuf which is used for processing stdin data. usr.sbin/extattr/rmextattr.8: Document setextattr's -i option, getextattr's -qq option, and remove the BUG about setextattr only being useful for strings. usr.sbin/extattr/rmextattr.c: For setextattr operations, buffer attribute data in an sbuf. If -i is specified, pull the data from stdin, otherwise from the appropriate argurment. Update usage text and argument validation code for setextattr's -i option. usr.sbin/extattr/tests/extattr_test.sh Add tests for -q and -i. Reviewed by: wblock (manpage) MFC after:4 weeks Sponsored by: Spectra Logic Corp Differential Revision:https://reviews.freebsd.org/D6090 Modified: head/usr.sbin/extattr/Makefile head/usr.sbin/extattr/rmextattr.8 head/usr.sbin/extattr/rmextattr.c head/usr.sbin/extattr/tests/extattr_test.sh Modified: head/usr.sbin/extattr/Makefile == --- head/usr.sbin/extattr/Makefile Wed May 4 20:06:20 2016 (r299084) +++ head/usr.sbin/extattr/Makefile Wed May 4 20:20:55 2016 (r299085) @@ -3,6 +3,8 @@ PROG= rmextattr MAN= rmextattr.8 +LIBADD=sbuf + LINKS+=${BINDIR}/rmextattr ${BINDIR}/getextattr LINKS+=${BINDIR}/rmextattr ${BINDIR}/setextattr LINKS+=${BINDIR}/rmextattr ${BINDIR}/lsextattr Modified: head/usr.sbin/extattr/rmextattr.8 == --- head/usr.sbin/extattr/rmextattr.8 Wed May 4 20:06:20 2016 (r299084) +++ head/usr.sbin/extattr/rmextattr.8 Wed May 4 20:20:55 2016 (r299085) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 30, 2000 +.Dd April 27, 2016 .Dt RMEXTATTR 8 .Os .Sh NAME @@ -61,6 +61,12 @@ .Ar attrname .Ar attrvalue .Ar filename ... +.Nm setextattr +.Fl i +.Op Fl fhnq +.Ar attrnamespace +.Ar attrname +.Ar filename ... .Sh DESCRIPTION These utilities @@ -91,6 +97,9 @@ the remaining arguments. (No follow.) If the file is a symbolic link, perform the operation on the link itself rather than the file that the link points to. +.It Fl i +(From stdin.) +Read attribute data from stdin instead of as an argument. .It Fl n .Dv ( NUL Ns -terminate.) @@ -99,6 +108,7 @@ link itself rather than the file that th .It Fl q (Quiet.) Do not print out the pathname and suppress error messages. +When given twice, do not print a trailing newline. .It Fl s (Stringify.) Escape nonprinting characters and put quotes around the output. @@ -109,6 +119,7 @@ Print the output in hexadecimal. .Sh EXAMPLES .Bd -literal setextattr system md5 `md5 -q /boot/kernel/kernel` /boot/kernel/kernel +md5 -q /boot/kernel/kernel | setextattr -i system md5 /boot/kernel/kernel getextattr system md5 /boot/kernel/kernel lsextattr system /boot/kernel/kernel rmextattr system md5 /boot/kernel/kernel @@ -129,7 +140,3 @@ to be associated with each file or direc .Sh AUTHORS .An Robert N M Watson .An Poul-Henning Kamp -.Sh BUGS -The -.Nm setextattr -utility can only be used to set attributes to strings. Modified: head/usr.sbin/extattr/rmextattr.c == --- head/usr.sbin/extattr/rmextattr.c Wed May 4 20:06:20 2016 (r299084) +++ head/usr.sbin/extattr/rmextattr.c Wed May 4 20:20:55 2016 (r299085) @@ -37,6 +37,7 @@ */ #include +#include #include #include @@ -64,6 +65,8 @@ usage(void) case EASET: fprintf(stderr, "usage: setextattr [-fhnq] attrnamespace"); fprintf(stderr, " attrname attrvalue filename ...\n"); + fprintf(stderr, " or setextattr -i [-fhnq] attrnamespace"); + fprintf(stderr, " attrname filename ...\n"); exit(-1); case EARM: fprintf(stderr, "usage: rmextattr [-fhq] attrnamespace"); @@ -99,24 +102,28 @@ mkbuf(char **buf, int *oldlen, int newle int main(int argc, char *argv[]) { - char*buf, *visbuf, *p; +#define STDIN_BUF_SZ 1024 + char stdin_data[STDIN_BUF_SZ]; + char*p; const char *options, *attrname; size_t len; ssize_t ret; - int buflen, visbuflen, ch, error, i, arg_counter, attrnamespace, -minargc; + int ch, error, i, arg_counter,
svn commit: r299084 - head/sys/arm/allwinner
Author: jmcneill Date: Wed May 4 20:06:20 2016 New Revision: 299084 URL: https://svnweb.freebsd.org/changeset/base/299084 Log: Add driver for Allwinner A83T/H3/A64 Gigabit Ethernet. The datasheets refer to this controller as EMAC, not to be confused with the fast ethernet controller (also named EMAC) found in A10/A20 SoCs. Tested on a BananaPi M3 (A83T), which uses an external RGMII PHY (RTL8211E). Reviewed by: adrian Differential Revision:https://reviews.freebsd.org/D6169 Added: head/sys/arm/allwinner/if_awg.c (contents, props changed) head/sys/arm/allwinner/if_awgreg.h (contents, props changed) Modified: head/sys/arm/allwinner/files.allwinner Modified: head/sys/arm/allwinner/files.allwinner == --- head/sys/arm/allwinner/files.allwinner Wed May 4 18:08:38 2016 (r299083) +++ head/sys/arm/allwinner/files.allwinner Wed May 4 20:06:20 2016 (r299084) @@ -18,6 +18,7 @@ arm/allwinner/a20/a20_cpu_cfg.c standar arm/allwinner/allwinner_machdep.c standard arm/allwinner/aw_mp.c optionalsmp arm/allwinner/axp209.c optionalaxp209 +arm/allwinner/if_awg.c optionalawg arm/allwinner/if_emac.coptionalemac arm/allwinner/sunxi_dma_if.m standard dev/iicbus/twsi/a10_twsi.c optionaltwsi Added: head/sys/arm/allwinner/if_awg.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/allwinner/if_awg.c Wed May 4 20:06:20 2016 (r299084) @@ -0,0 +1,1418 @@ +/*- + * Copyright (c) 2016 Jared McNeill+ * 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 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$ + */ + +/* + * Allwinner Gigabit Ethernet MAC (EMAC) controller + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include +#include +#include + +#include +#include +#include + +#include "miibus_if.h" + +#defineRD4(sc, reg)bus_read_4((sc)->res[0], (reg)) +#defineWR4(sc, reg, val) bus_write_4((sc)->res[0], (reg), (val)) + +#defineAWG_LOCK(sc)mtx_lock(&(sc)->mtx) +#defineAWG_UNLOCK(sc) mtx_unlock(&(sc)->mtx); +#defineAWG_ASSERT_LOCKED(sc) mtx_assert(&(sc)->mtx, MA_OWNED) +#defineAWG_ASSERT_UNLOCKED(sc) mtx_assert(&(sc)->mtx, MA_NOTOWNED) + +#defineDESC_ALIGN 4 +#defineTX_DESC_COUNT 256 +#defineTX_DESC_SIZE(sizeof(struct emac_desc) * TX_DESC_COUNT) +#defineRX_DESC_COUNT 256 +#defineRX_DESC_SIZE(sizeof(struct emac_desc) * RX_DESC_COUNT) + +#defineDESC_OFF(n) ((n) * sizeof(struct emac_desc)) +#defineTX_NEXT(n) (((n) + 1) & (TX_DESC_COUNT - 1)) +#defineTX_SKIP(n, o) (((n) + (o)) & (TX_DESC_COUNT - 1)) +#defineRX_NEXT(n) (((n) + 1) & (RX_DESC_COUNT - 1)) + +#defineTX_MAX_SEGS 10 + +#defineSOFT_RST_RETRY 1000 +#defineMII_BUSY_RETRY 1000 +#defineMDIO_FREQ 250 + +#defineBURST_LEN_DEFAULT 8 +#defineRX_TX_PRI_DEFAULT 0 +#definePAUSE_TIME_DEFAULT 0x400 +#defineTX_INTERVAL_DEFAULT 64 + +/*
Re: svn commit: r298823 - in head: gnu/usr.bin gnu/usr.bin/sdiff usr.bin usr.bin/sdiff usr.bin/sdiff/tests
2016-05-04 8:29 GMT+02:00 Baptiste Daroussin: > On Wed, May 04, 2016 at 07:54:46AM +0200, Kamil Czekirda wrote: > > Hi, > > > > make ftp stops here since r298823: > > > What is the revision you last tested because it is supposed to be fixed > by: r298837 > r298837 looks fine, thanks. > > Best regards, > Bapt > Kamil ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299083 - head/sys/dev/wi
Author: avos Date: Wed May 4 18:08:38 2016 New Revision: 299083 URL: https://svnweb.freebsd.org/changeset/base/299083 Log: wi: fix a comment (0x1fff has 13 bits set). Modified: head/sys/dev/wi/if_wi.c Modified: head/sys/dev/wi/if_wi.c == --- head/sys/dev/wi/if_wi.c Wed May 4 17:54:13 2016(r299082) +++ head/sys/dev/wi/if_wi.c Wed May 4 18:08:38 2016(r299083) @@ -337,7 +337,7 @@ wi_attach(device_t dev) */ buflen = sizeof(val); if (wi_read_rid(sc, WI_RID_CHANNEL_LIST, , ) != 0) - val = htole16(0x1fff); /* assume 1-11 */ + val = htole16(0x1fff); /* assume 1-13 */ KASSERT(val != 0, ("wi_attach: no available channels listed!")); val <<= 1; /* shift for base 1 indices */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299082 - head/sys/amd64/amd64
Author: alc Date: Wed May 4 17:54:13 2016 New Revision: 299082 URL: https://svnweb.freebsd.org/changeset/base/299082 Log: Explain why pmap_copy(), pmap_enter_pde(), and pmap_enter_quick_locked() call pmap_invalidate_page() even though they are not destroying a leaf- level page table entry. Eliminate some bogus white-space characters in a comment. Reviewed by: kib Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c == --- head/sys/amd64/amd64/pmap.c Wed May 4 17:52:53 2016(r299081) +++ head/sys/amd64/amd64/pmap.c Wed May 4 17:54:13 2016(r299082) @@ -4407,6 +4407,12 @@ pmap_enter_pde(pmap_t pmap, vm_offset_t lockp)) { SLIST_INIT(); if (pmap_unwire_ptp(pmap, va, mpde, )) { + /* +* Although "va" is not mapped, paging- +* structure caches could nonetheless have +* entries that refer to the freed page table +* pages. Invalidate those entries. +*/ pmap_invalidate_page(pmap, va); pmap_free_zero_pages(); } @@ -4584,6 +4590,12 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ if (mpte != NULL) { SLIST_INIT(); if (pmap_unwire_ptp(pmap, va, mpte, )) { + /* +* Although "va" is not mapped, paging- +* structure caches could nonetheless have +* entries that refer to the freed page table +* pages. Invalidate those entries. +*/ pmap_invalidate_page(pmap, va); pmap_free_zero_pages(); } @@ -4967,6 +4979,14 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm SLIST_INIT(); if (pmap_unwire_ptp(dst_pmap, addr, dstmpte, )) { + /* +* Although "addr" is not +* mapped, paging-structure +* caches could nonetheless +* have entries that refer to +* the freed page table pages. +* Invalidate those entries. +*/ pmap_invalidate_page(dst_pmap, addr); pmap_free_zero_pages(); @@ -5219,7 +5239,7 @@ pmap_page_is_mapped(vm_page_t m) * Destroy all managed, non-wired mappings in the given user-space * pmap. This pmap cannot be active on any processor besides the * caller. - * + * * This function cannot be applied to the kernel pmap. Moreover, it * is not intended for general use. It is only to be used during * process termination. Consequently, it can be implemented in ways ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299081 - in head/sys/dev/pms/freebsd/driver: common ini/src
Author: pfg Date: Wed May 4 17:52:53 2016 New Revision: 299081 URL: https://svnweb.freebsd.org/changeset/base/299081 Log: dev/pms: minor spelling fixes for the FreeBSD-specific part. Modified: head/sys/dev/pms/freebsd/driver/common/lxcommon.h head/sys/dev/pms/freebsd/driver/common/osenv.h head/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c head/sys/dev/pms/freebsd/driver/ini/src/osapi.c Modified: head/sys/dev/pms/freebsd/driver/common/lxcommon.h == --- head/sys/dev/pms/freebsd/driver/common/lxcommon.h Wed May 4 17:29:07 2016(r299080) +++ head/sys/dev/pms/freebsd/driver/common/lxcommon.h Wed May 4 17:52:53 2016(r299081) @@ -452,7 +452,7 @@ typedef struct _ag_card_info { /* ** Optional Adjustable Parameters Structures. -** Not using pointer stucture for easy read and access tree structure. +** Not using pointer structure for easy read and access tree structure. ** In the future if more layer of key tree involved, it might be a good ** idea to change the structure and program. */ @@ -637,7 +637,7 @@ typedef struct _LINK_LIST { PLINK_NODE pHead; bit32 Count; - LINK_NODE Head __cacheline_aligned; // allways one link to speed up insert + LINK_NODE Head __cacheline_aligned; // always one link to speed up insert } LINK_LIST, * PLINK_LIST __cacheline_aligned; Modified: head/sys/dev/pms/freebsd/driver/common/osenv.h == --- head/sys/dev/pms/freebsd/driver/common/osenv.h Wed May 4 17:29:07 2016(r299080) +++ head/sys/dev/pms/freebsd/driver/common/osenv.h Wed May 4 17:52:53 2016(r299081) @@ -28,7 +28,7 @@ Version Control Information: $RCSfile: osenv.h,v $ $Revision: 114125 $ -Note: This file defines the working enviornment of the system. All +Note: This file defines the working environment of the system. All defines listed in this file could also be compiler flags. I am listing all the defines (even if used as a compiler flag) so that they can be seen and documented. @@ -41,7 +41,7 @@ Note: This file defines the working env /* ** Define the protocols to compile with. Currently, these defines are ** only for this header file and are used further down to define the protocol -** specific enviornment: +** specific environment: ** ** #define AG_PROTOCOL_ISCSI ** #define AG_PROTOCOL_FC @@ -87,12 +87,12 @@ Note: This file defines the working env #endif /*** -iSCSI enviornment - The following is used for compiling the iSCSI +iSCSI environment - The following is used for compiling the iSCSI protocol. **/ /* -** Define the existance of an external bus swapper using on of the +** Define the existence of an external bus swapper using on of the ** following: ** ** #define AG_SWAPPING_BUS @@ -109,7 +109,7 @@ iSCSI enviornment - The following is use /* #define AG_CACHED_MSG_SYSTEM */ /*** -FC enviornment - The following is used for compiling the FC protocol. +FC environment - The following is used for compiling the FC protocol. **/ /* Modified: head/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c == --- head/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c Wed May 4 17:29:07 2016(r299080) +++ head/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c Wed May 4 17:52:53 2016(r299081) @@ -3749,7 +3749,7 @@ static void agtiapi_PrepareSMPSGListCB( return; } /* TODO: add indirect handling */ - /* set the flag correctly based on Indiret SMP request and responce */ + /* set the flag correctly based on Indiret SMP request and response */ AGTIAPI_PRINTK( "agtiapi_PrepareSMPSGListCB: send ccb pccb->devHandle %p, " "pccb->targetId %d TID %d pmcsc->devDiscover %d card %p\n", @@ -5811,7 +5811,7 @@ agtiapi_ReleaseCCBs() Purpose: Free all allocated CCB memories for the Host Adapter. Parameters: - struct agtiapi_softc *pCard (IN) Pointer to HBA data stucture + struct agtiapi_softc *pCard (IN) Pointer to HBA data structure Return: Note: **/ Modified: head/sys/dev/pms/freebsd/driver/ini/src/osapi.c == --- head/sys/dev/pms/freebsd/driver/ini/src/osapi.c Wed May 4 17:29:07 2016(r299080) +++ head/sys/dev/pms/freebsd/driver/ini/src/osapi.c Wed May 4 17:52:53 2016(r299081) @@ -172,7 +172,7 @@ void ostiInitiatorEvent(
svn commit: r299080 - head/tools/tools/locale/etc
Author: pfg Date: Wed May 4 17:29:07 2016 New Revision: 299080 URL: https://svnweb.freebsd.org/changeset/base/299080 Log: tools: minor spelling fix in locales template. No functional change. Modified: head/tools/tools/locale/etc/charmaps.xml Modified: head/tools/tools/locale/etc/charmaps.xml == --- head/tools/tools/locale/etc/charmaps.xmlWed May 4 17:27:49 2016 (r299079) +++ head/tools/tools/locale/etc/charmaps.xmlWed May 4 17:29:07 2016 (r299080) @@ -2,13 +2,13 @@
svn commit: r299079 - in stable/10: . release
Author: glebius Date: Wed May 4 17:27:49 2016 New Revision: 299079 URL: https://svnweb.freebsd.org/changeset/base/299079 Log: Merge r299077, which provides ability to override NO_INSTALLEXTRAKERNELS. Override NO_INSTALLEXTRAKERNELS for the release build. Historically, in the stable/10 branch the regular 'installkernel' target DID NOT install extra kernels, while the release build DID. This change finally restores POLA, I hope. Reported by: Fedor Reviewed by: gjb Modified: stable/10/Makefile.inc1 stable/10/release/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 == --- stable/10/Makefile.inc1 Wed May 4 17:22:35 2016(r299078) +++ stable/10/Makefile.inc1 Wed May 4 17:27:49 2016(r299079) @@ -1110,7 +1110,7 @@ reinstallkernel reinstallkernel.debug: _ ${CROSSENV} PATH=${TMPPATH} \ ${MAKE} ${IMAKE_INSTALL} KERNEL=${INSTKERNNAME} ${.TARGET:S/kernel//} .endif -.if ${BUILDKERNELS:[#]} > 1 && !defined(NO_INSTALLEXTRAKERNELS) +.if ${BUILDKERNELS:[#]} > 1 && ${NO_INSTALLEXTRAKERNELS} != "yes" .for _kernel in ${BUILDKERNELS:[2..-1]} @echo "--" @echo ">>> Installing kernel ${_kernel}" @@ -1141,7 +1141,7 @@ distributekernel distributekernel.debug: ${DESTDIR}/${DISTDIR}/kernel.meta .endif .endif -.if ${BUILDKERNELS:[#]} > 1 && !defined(NO_INSTALLEXTRAKERNELS) +.if ${BUILDKERNELS:[#]} > 1 && ${NO_INSTALLEXTRAKERNELS} != "yes" .for _kernel in ${BUILDKERNELS:[2..-1]} .if defined(NO_ROOT) echo "#${MTREE_MAGIC}" > ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.premeta @@ -1167,7 +1167,7 @@ packagekernel: tar cvf - @${DESTDIR}/${DISTDIR}/kernel.meta | \ ${XZ_CMD} > ${PACKAGEDIR}/kernel.txz .endif -.if ${BUILDKERNELS:[#]} > 1 && !defined(NO_INSTALLEXTRAKERNELS) +.if ${BUILDKERNELS:[#]} > 1 && ${NO_INSTALLEXTRAKERNELS} != "yes" .for _kernel in ${BUILDKERNELS:[2..-1]} cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \ tar cvf - @${DESTDIR}/${DISTDIR}/kernel.${_kernel}.meta | \ @@ -1180,7 +1180,7 @@ packagekernel: tar cvf - . | \ ${XZ_CMD} > ${PACKAGEDIR}/kernel.txz .endif -.if ${BUILDKERNELS:[#]} > 1 && !defined(NO_INSTALLEXTRAKERNELS) +.if ${BUILDKERNELS:[#]} > 1 && ${NO_INSTALLEXTRAKERNELS} != "yes" .for _kernel in ${BUILDKERNELS:[2..-1]} cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \ tar cvf - . | \ Modified: stable/10/release/Makefile == --- stable/10/release/Makefile Wed May 4 17:22:35 2016(r299078) +++ stable/10/release/Makefile Wed May 4 17:27:49 2016(r299079) @@ -70,6 +70,8 @@ VOLUME_LABEL= ${REVISION:C/[.-]/_/g}_${B .endfor .endif +NO_INSTALLEXTRAKERNELS=no + .if !defined(VOLUME_LABEL) || empty(VOLUME_LABEL) VOLUME_LABEL= FreeBSD_Install .endif ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299078 - head/sys/net80211
Author: avos Date: Wed May 4 17:22:35 2016 New Revision: 299078 URL: https://svnweb.freebsd.org/changeset/base/299078 Log: net80211: do not hardcode size of ic_modecaps field. Modified: head/sys/net80211/ieee80211_var.h Modified: head/sys/net80211/ieee80211_var.h == --- head/sys/net80211/ieee80211_var.h Wed May 4 17:21:34 2016 (r299077) +++ head/sys/net80211/ieee80211_var.h Wed May 4 17:22:35 2016 (r299078) @@ -148,7 +148,8 @@ struct ieee80211com { uint32_tic_htcaps; /* HT capabilities */ uint32_tic_htextcaps; /* HT extended capabilities */ uint32_tic_cryptocaps; /* crypto capabilities */ - uint8_t ic_modecaps[2]; /* set of mode capabilities */ + /* set of mode capabilities */ + uint8_t ic_modecaps[IEEE80211_MODE_BYTES]; uint8_t ic_promisc; /* vap's needing promisc mode */ uint8_t ic_allmulti;/* vap's needing all multicast*/ uint8_t ic_nrunning;/* vap's marked running */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299077 - head
Author: glebius Date: Wed May 4 17:21:34 2016 New Revision: 299077 URL: https://svnweb.freebsd.org/changeset/base/299077 Log: Make it possible to override NO_INSTALLEXTRAKERNELS. Reviewed by: gjb Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Wed May 4 17:02:37 2016(r299076) +++ head/Makefile.inc1 Wed May 4 17:21:34 2016(r299077) @@ -1152,7 +1152,7 @@ reinstallkernel reinstallkernel.debug: _ ${CROSSENV} PATH=${TMPPATH} \ ${MAKE} ${IMAKE_INSTALL} KERNEL=${INSTKERNNAME} ${.TARGET:S/kernel//} .endif -.if ${BUILDKERNELS:[#]} > 1 && !defined(NO_INSTALLEXTRAKERNELS) +.if ${BUILDKERNELS:[#]} > 1 && ${NO_INSTALLEXTRAKERNELS} != "yes" .for _kernel in ${BUILDKERNELS:[2..-1]} @echo "--" @echo ">>> Installing kernel ${_kernel}" @@ -1183,7 +1183,7 @@ distributekernel distributekernel.debug: ${DESTDIR}/${DISTDIR}/kernel.meta .endif .endif -.if ${BUILDKERNELS:[#]} > 1 && !defined(NO_INSTALLEXTRAKERNELS) +.if ${BUILDKERNELS:[#]} > 1 && ${NO_INSTALLEXTRAKERNELS} != "yes" .for _kernel in ${BUILDKERNELS:[2..-1]} .if defined(NO_ROOT) @echo "#${MTREE_MAGIC}" > ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.premeta @@ -1214,7 +1214,7 @@ packagekernel: .PHONY tar cvf - --include '*/*/*.debug' \ @${DESTDIR}/${DISTDIR}/kernel.meta | \ ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel-dbg.txz -.if ${BUILDKERNELS:[#]} > 1 && !defined(NO_INSTALLEXTRAKERNELS) +.if ${BUILDKERNELS:[#]} > 1 && ${NO_INSTALLEXTRAKERNELS} != "yes" .for _kernel in ${BUILDKERNELS:[2..-1]} cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \ tar cvf - --exclude '*.debug' \ @@ -1235,7 +1235,7 @@ packagekernel: .PHONY cd ${DESTDIR}/${DISTDIR}/kernel; \ tar cvf - --include '*/*/*.debug' $$(eval find .) | \ ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel-dbg.txz -.if ${BUILDKERNELS:[#]} > 1 && !defined(NO_INSTALLEXTRAKERNELS) +.if ${BUILDKERNELS:[#]} > 1 && ${NO_INSTALLEXTRAKERNELS} != "yes" .for _kernel in ${BUILDKERNELS:[2..-1]} cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \ tar cvf - --exclude '*.debug' . | \ @@ -1345,7 +1345,7 @@ create-kernel-packages: _pkgbootstrap .P -o ${REPODIR}/$$(pkg -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION} .endfor .endif -.if ${BUILDKERNELS:[#]} > 1 && !defined(NO_INSTALLEXTRAKERNELS) +.if ${BUILDKERNELS:[#]} > 1 && ${NO_INSTALLEXTRAKERNELS} != "yes" .for _kernel in ${BUILDKERNELS:[2..-1]} .if exists(${KSTAGEDIR}/kernel.${_kernel}.meta) .for flavor in "" -debug ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299074 - head/sys/net80211
Author: adrian Date: Wed May 4 16:42:53 2016 New Revision: 299074 URL: https://svnweb.freebsd.org/changeset/base/299074 Log: [net80211] add extra debugging around negotiated A-MPDU parameters. Modified: head/sys/net80211/ieee80211_ht.c Modified: head/sys/net80211/ieee80211_ht.c == --- head/sys/net80211/ieee80211_ht.cWed May 4 16:24:12 2016 (r299073) +++ head/sys/net80211/ieee80211_ht.cWed May 4 16:42:53 2016 (r299074) @@ -2742,6 +2742,14 @@ ieee80211_add_htcap_body(uint8_t *frm, s rxmax = MS(ni->ni_htparam, IEEE80211_HTCAP_MAXRXAMPDU); density = MS(ni->ni_htparam, IEEE80211_HTCAP_MPDUDENSITY); + IEEE80211_DPRINTF(vap, IEEE80211_MSG_11N, + "%s: advertised rxmax=%d, density=%d, vap rxmax=%d, density=%d\n", + __func__, + rxmax, + density, + vap->iv_ampdu_rxmax, + vap->iv_ampdu_density); + /* Cap at VAP rxmax */ if (rxmax > vap->iv_ampdu_rxmax) rxmax = vap->iv_ampdu_rxmax; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r299063 - head/sys/dev/iwn
good catch! Same goes for scanning, btw. Let's see if someone (who isn't me, I'm still working on work related wifi things) can test out the scan patch to just reset things. -a ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299073 - head/sys/arm/qemu
Author: bz Date: Wed May 4 16:24:12 2016 New Revision: 299073 URL: https://svnweb.freebsd.org/changeset/base/299073 Log: While gem5 is not qemu, we treat it as "simulators" or "virtual environments". Add the needed hardcoded gem5 attachments for the UART there, re-using all the other bits. In collaboration with:andrew Sponsored by: DARPA/AFRL Reviewed by: andrew MFC after:2 weeks Differential Revision:https://reviews.freebsd.org/D6204 Modified: head/sys/arm/qemu/virt_machdep.c Modified: head/sys/arm/qemu/virt_machdep.c == --- head/sys/arm/qemu/virt_machdep.cWed May 4 16:15:39 2016 (r299072) +++ head/sys/arm/qemu/virt_machdep.cWed May 4 16:24:12 2016 (r299073) @@ -97,3 +97,20 @@ static platform_method_t virt_methods[] }; FDT_PLATFORM_DEF(virt, "virt", 0, "linux,dummy-virt", 1); + +static int +gem5_devmap_init(platform_t plat) +{ + + devmap_add_entry(0x1c09, 0x10); /* Uart */ + return (0); +} + +static platform_method_t gem5_methods[] = { + PLATFORMMETHOD(platform_devmap_init,gem5_devmap_init), + PLATFORMMETHOD(platform_lastaddr, virt_lastaddr), + + PLATFORMMETHOD_END, +}; + +FDT_PLATFORM_DEF(gem5, "gem5", 0, "arm,vexpress", 1); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299072 - head/sys/arm/arm
Author: bz Date: Wed May 4 16:15:39 2016 New Revision: 299072 URL: https://svnweb.freebsd.org/changeset/base/299072 Log: The virtual timer is optional on ARM64. Properly handle that condition. [1] In case we do not have an interrupt assignment for the virtual timer, force the physical timer. Also skip resource allocation for any timer we do not have an interrupt assignment for. In collaboration with:andrew Submitted by: br ([1] from his gem5 arm64 work) Sponsored by: DARPA/AFRL Reviewed by: andrew MFC after:2 weeks Differential Revision:https://reviews.freebsd.org/D6203 Modified: head/sys/arm/arm/generic_timer.c Modified: head/sys/arm/arm/generic_timer.c == --- head/sys/arm/arm/generic_timer.cWed May 4 16:09:51 2016 (r299071) +++ head/sys/arm/arm/generic_timer.cWed May 4 16:15:39 2016 (r299072) @@ -100,7 +100,7 @@ static struct arm_tmr_softc *arm_tmr_sc static struct resource_spec timer_spec[] = { { SYS_RES_IRQ, 0, RF_ACTIVE },/* Secure */ { SYS_RES_IRQ, 1, RF_ACTIVE },/* Non-secure */ - { SYS_RES_IRQ, 2, RF_ACTIVE },/* Virt */ + { SYS_RES_IRQ, 2, RF_ACTIVE | RF_OPTIONAL }, /* Virt */ { SYS_RES_IRQ, 3, RF_ACTIVE | RF_OPTIONAL }, /* Hyp */ { -1, 0 } }; @@ -392,13 +392,17 @@ arm_tmr_attach(device_t dev) #ifdef __arm__ sc->physical = true; #else /* __aarch64__ */ - sc->physical = false; + /* If we do not have a virtual timer use the physical. */ + sc->physical = (sc->res[2] == NULL) ? true : false; #endif arm_tmr_sc = sc; /* Setup secure, non-secure and virtual IRQs handler */ for (i = 0; i < 3; i++) { + /* If we do not have the interrupt, skip it. */ + if (sc->res[i] == NULL) + continue; error = bus_setup_intr(dev, sc->res[i], INTR_TYPE_CLK, arm_tmr_intr, NULL, sc, >ihl[i]); if (error) { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299071 - head/sys/arm/arm
Author: bz Date: Wed May 4 16:09:51 2016 New Revision: 299071 URL: https://svnweb.freebsd.org/changeset/base/299071 Log: The ARM generic timer keeps ticking even if disabled or it expired. In case of updating it with a very low value it might expire again after writing the tval but before updating ctrl. In that case we do lose the status bit saying that the timer expired and we will consequently not get an interrupt for it, leaving the timer in a "dead" state. In order to solve this increase the minimum period with what the timer can be loaded to something higher. Found & analysed with:gem5 Debugged with:andrew Sponsored by: DARPA/AFRL Reviewed by: andrew MFC after:2 weeks Differential Revision:https://reviews.freebsd.org/D6202 Modified: head/sys/arm/arm/generic_timer.c Modified: head/sys/arm/arm/generic_timer.c == --- head/sys/arm/arm/generic_timer.cWed May 4 15:52:40 2016 (r299070) +++ head/sys/arm/arm/generic_timer.cWed May 4 16:09:51 2016 (r299071) @@ -417,7 +417,7 @@ arm_tmr_attach(device_t dev) sc->et.et_quality = 1000; sc->et.et_frequency = sc->clkfreq; - sc->et.et_min_period = (0x0002LLU << 32) / sc->et.et_frequency; + sc->et.et_min_period = (0x0010LLU << 32) / sc->et.et_frequency; sc->et.et_max_period = (0xfffeLLU << 32) / sc->et.et_frequency; sc->et.et_start = arm_tmr_start; sc->et.et_stop = arm_tmr_stop; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299070 - in head/sys/sparc64: sbus sparc64
Author: pfg Date: Wed May 4 15:52:40 2016 New Revision: 299070 URL: https://svnweb.freebsd.org/changeset/base/299070 Log: sys/sparc64: minor spelling fixes. Only affects comments: no functional change. Modified: head/sys/sparc64/sbus/sbus.c head/sys/sparc64/sparc64/intr_machdep.c Modified: head/sys/sparc64/sbus/sbus.c == --- head/sys/sparc64/sbus/sbus.cWed May 4 15:48:59 2016 (r299069) +++ head/sys/sparc64/sbus/sbus.cWed May 4 15:52:40 2016 (r299070) @@ -341,7 +341,7 @@ sbus_attach(device_t dev) sc->sc_burst = (SBUS_BURST64_DEF << SBUS_BURST64_SHIFT) | SBUS_BURST_DEF; - /* initalise the IOMMU */ + /* initialise the IOMMU */ /* punch in our copies */ sc->sc_is.is_pmaxaddr = IOMMU_MAXADDR(SBUS_IOMMU_BITS); Modified: head/sys/sparc64/sparc64/intr_machdep.c == --- head/sys/sparc64/sparc64/intr_machdep.c Wed May 4 15:48:59 2016 (r299069) +++ head/sys/sparc64/sparc64/intr_machdep.c Wed May 4 15:52:40 2016 (r299070) @@ -367,7 +367,7 @@ inthand_add(const char *name, int vec, d /* * Check if we need to upgrade from PIL_ITHREAD to PIL_FILTER. * Given that apart from the on-board SCCs and UARTs shared -* interrupts are rather uncommon on sparc64 this sould be +* interrupts are rather uncommon on sparc64 this should be * pretty rare in practice. */ filter = 0; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299069 - in head/sys/arm: amlogic/aml8726 arm at91 broadcom/bcm2835 cavium/cns11xx freescale/imx freescale/vybrid mv samsung/exynos ti ti/omap4 xilinx xscale/i8134x xscale/ixp425 xscal...
Author: pfg Date: Wed May 4 15:48:59 2016 New Revision: 299069 URL: https://svnweb.freebsd.org/changeset/base/299069 Log: sys/arm: Minor spelling fixes. Only affects comments: no functional change. Modified: head/sys/arm/amlogic/aml8726/aml8726_mmc.c head/sys/arm/amlogic/aml8726/aml8726_mmc.h head/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c head/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.h head/sys/arm/arm/cpufunc_asm_arm11.S head/sys/arm/arm/exception.S head/sys/arm/arm/gic.c head/sys/arm/arm/machdep.c head/sys/arm/arm/mpcore_timer.c head/sys/arm/arm/pmap-v4.c head/sys/arm/arm/pmap-v6.c head/sys/arm/arm/swtch-v4.S head/sys/arm/at91/at91_cfata.c head/sys/arm/at91/at91_machdep.c head/sys/arm/at91/at91_mci.c head/sys/arm/at91/at91_reset.S head/sys/arm/at91/at91reg.h head/sys/arm/at91/at91sam9260.c head/sys/arm/at91/if_ate.c head/sys/arm/at91/if_atereg.h head/sys/arm/broadcom/bcm2835/bcm2835_audio.c head/sys/arm/broadcom/bcm2835/bcm2835_dma.c head/sys/arm/cavium/cns11xx/if_ece.c head/sys/arm/freescale/imx/imx6_ipu.c head/sys/arm/freescale/imx/imx6_ssi.c head/sys/arm/freescale/vybrid/vf_uart.c head/sys/arm/mv/mpic.c head/sys/arm/mv/mv_common.c head/sys/arm/samsung/exynos/exynos5_usb_phy.c head/sys/arm/ti/omap4/omap4_prcm_clks.c head/sys/arm/ti/ti_i2c.c head/sys/arm/ti/ti_pinmux.c head/sys/arm/ti/ti_prcm.c head/sys/arm/ti/ti_scm.c head/sys/arm/ti/ti_sdma.c head/sys/arm/xilinx/zy7_slcr.c head/sys/arm/xscale/i8134x/crb_machdep.c head/sys/arm/xscale/i8134x/i81342reg.h head/sys/arm/xscale/ixp425/avila_machdep.c head/sys/arm/xscale/ixp425/cambria_gpio.c head/sys/arm/xscale/ixp425/ixp425_npe.c head/sys/arm/xscale/ixp425/ixp425_npereg.h head/sys/arm/xscale/ixp425/ixp425_qmgr.c head/sys/arm/xscale/pxa/pxa_machdep.c Modified: head/sys/arm/amlogic/aml8726/aml8726_mmc.c == --- head/sys/arm/amlogic/aml8726/aml8726_mmc.c Wed May 4 15:27:09 2016 (r299068) +++ head/sys/arm/amlogic/aml8726/aml8726_mmc.c Wed May 4 15:48:59 2016 (r299069) @@ -240,7 +240,7 @@ aml8726_mmc_start_command(struct aml8726 * Start and transmission bits are per section 4.7.2 of the: * * SD Specifications Part 1 -* Physicaly Layer Simplified Specification +* Physical Layer Simplified Specification * Version 4.10 */ cmdr = AML_MMC_CMD_START_BIT | AML_MMC_CMD_TRANS_BIT_HOST | cmd->opcode; Modified: head/sys/arm/amlogic/aml8726/aml8726_mmc.h == --- head/sys/arm/amlogic/aml8726/aml8726_mmc.h Wed May 4 15:27:09 2016 (r299068) +++ head/sys/arm/amlogic/aml8726/aml8726_mmc.h Wed May 4 15:48:59 2016 (r299069) @@ -39,7 +39,7 @@ * Read and write are per section 4.6.2 of the: * * SD Specifications Part 1 - * Physicaly Layer Simplified Specification + * Physical Layer Simplified Specification * Version 4.10 */ #defineAML_MMC_CMD_TIMEOUT 50 Modified: head/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c == --- head/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c Wed May 4 15:27:09 2016(r299068) +++ head/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c Wed May 4 15:48:59 2016(r299069) @@ -484,7 +484,7 @@ aml8726_sdxc_finish_command(struct aml87 if (stop_cmd != NULL) { /* -* If the original command executed successfuly, then +* If the original command executed successfully, then * the hardware will also have automatically executed * a stop command so don't bother with the one supplied * with the original request. Modified: head/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.h == --- head/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.h Wed May 4 15:27:09 2016(r299068) +++ head/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.h Wed May 4 15:48:59 2016(r299069) @@ -38,7 +38,7 @@ * Read and write are per section 4.6.2 of the: * * SD Specifications Part 1 - * Physicaly Layer Simplified Specification + * Physical Layer Simplified Specification * Version 4.10 */ #defineAML_SDXC_CMD_TIMEOUT50 Modified: head/sys/arm/arm/cpufunc_asm_arm11.S == --- head/sys/arm/arm/cpufunc_asm_arm11.SWed May 4 15:27:09 2016 (r299068) +++ head/sys/arm/arm/cpufunc_asm_arm11.SWed May 4 15:48:59 2016 (r299069) @@ -30,7 +30,7 @@ * * ARM11 assembly functions for CPU / MMU / TLB specific operations * - * XXX We make no attempt at present to take advantage
svn commit: r299068 - in releng: 10.1 10.1/crypto/openssl/crypto/asn1 10.1/crypto/openssl/crypto/evp 10.1/crypto/openssl/crypto/x509 10.1/sys/cddl/compat/opensolaris/kern 10.1/sys/conf 9.3 9.3/cryp...
Author: delphij Date: Wed May 4 15:27:09 2016 New Revision: 299068 URL: https://svnweb.freebsd.org/changeset/base/299068 Log: Fix multiple OpenSSL vulnerabilitites. [SA-16:17] Fix memory leak in ZFS. [EN-16:08] Approved by: so Modified: releng/10.1/UPDATING releng/10.1/crypto/openssl/crypto/asn1/a_type.c releng/10.1/crypto/openssl/crypto/asn1/tasn_dec.c releng/10.1/crypto/openssl/crypto/asn1/tasn_enc.c releng/10.1/crypto/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c releng/10.1/crypto/openssl/crypto/evp/encode.c releng/10.1/crypto/openssl/crypto/evp/evp_enc.c releng/10.1/crypto/openssl/crypto/x509/x509_obj.c releng/10.1/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c releng/10.1/sys/conf/newvers.sh releng/9.3/UPDATING releng/9.3/crypto/openssl/crypto/asn1/a_type.c releng/9.3/crypto/openssl/crypto/asn1/tasn_dec.c releng/9.3/crypto/openssl/crypto/asn1/tasn_enc.c releng/9.3/crypto/openssl/crypto/evp/encode.c releng/9.3/crypto/openssl/crypto/evp/evp_enc.c releng/9.3/crypto/openssl/crypto/x509/x509_obj.c releng/9.3/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c releng/9.3/sys/conf/newvers.sh Modified: releng/10.1/UPDATING == --- releng/10.1/UPDATINGWed May 4 15:26:23 2016(r299067) +++ releng/10.1/UPDATINGWed May 4 15:27:09 2016(r299068) @@ -16,7 +16,14 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. -20150429 p32 FreeBSD-SA-16:16.ntp +20160504 p33 FreeBSD-SA-16:17.openssl + FreeBSD-EN-16:08.zfs + + Fix multiple OpenSSL vulnerabilitites. [SA-16:17] + + Fix memory leak in ZFS. [EN-16:08] + +20160429 p32 FreeBSD-SA-16:16.ntp Fix multiple vulnerabilities of ntp. Modified: releng/10.1/crypto/openssl/crypto/asn1/a_type.c == --- releng/10.1/crypto/openssl/crypto/asn1/a_type.c Wed May 4 15:26:23 2016(r299067) +++ releng/10.1/crypto/openssl/crypto/asn1/a_type.c Wed May 4 15:27:09 2016(r299068) @@ -126,9 +126,7 @@ int ASN1_TYPE_cmp(const ASN1_TYPE *a, co result = 0; /* They do not have content. */ break; case V_ASN1_INTEGER: -case V_ASN1_NEG_INTEGER: case V_ASN1_ENUMERATED: -case V_ASN1_NEG_ENUMERATED: case V_ASN1_BIT_STRING: case V_ASN1_OCTET_STRING: case V_ASN1_SEQUENCE: Modified: releng/10.1/crypto/openssl/crypto/asn1/tasn_dec.c == --- releng/10.1/crypto/openssl/crypto/asn1/tasn_dec.c Wed May 4 15:26:23 2016(r299067) +++ releng/10.1/crypto/openssl/crypto/asn1/tasn_dec.c Wed May 4 15:27:09 2016(r299068) @@ -903,9 +903,7 @@ int asn1_ex_c2i(ASN1_VALUE **pval, const break; case V_ASN1_INTEGER: -case V_ASN1_NEG_INTEGER: case V_ASN1_ENUMERATED: -case V_ASN1_NEG_ENUMERATED: tint = (ASN1_INTEGER **)pval; if (!c2i_ASN1_INTEGER(tint, , len)) goto err; Modified: releng/10.1/crypto/openssl/crypto/asn1/tasn_enc.c == --- releng/10.1/crypto/openssl/crypto/asn1/tasn_enc.c Wed May 4 15:26:23 2016(r299067) +++ releng/10.1/crypto/openssl/crypto/asn1/tasn_enc.c Wed May 4 15:27:09 2016(r299068) @@ -611,9 +611,7 @@ int asn1_ex_i2c(ASN1_VALUE **pval, unsig break; case V_ASN1_INTEGER: -case V_ASN1_NEG_INTEGER: case V_ASN1_ENUMERATED: -case V_ASN1_NEG_ENUMERATED: /* * These are all have the same content format as ASN1_INTEGER */ Modified: releng/10.1/crypto/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c == --- releng/10.1/crypto/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c Wed May 4 15:26:23 2016(r299067) +++ releng/10.1/crypto/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c Wed May 4 15:27:09 2016(r299068) @@ -59,6 +59,7 @@ # include # include # include "evp_locl.h" +# include "constant_time_locl.h" # ifndef EVP_CIPH_FLAG_AEAD_CIPHER # define EVP_CIPH_FLAG_AEAD_CIPHER 0x20 @@ -286,6 +287,8 @@ static int aesni_cbc_hmac_sha1_cipher(EV maxpad |= (255 - maxpad) >> (sizeof(maxpad) * 8 - 8); maxpad &= 255; +ret &= constant_time_ge(maxpad, pad); + inp_len = len - (SHA_DIGEST_LENGTH + pad + 1); mask = (0 - ((inp_len - len) >> (sizeof(inp_len) * 8 - 1))); inp_len &= mask; Modified: releng/10.1/crypto/openssl/crypto/evp/encode.c =
svn commit: r299067 - in releng/10.2: . crypto/openssl/crypto/asn1 crypto/openssl/crypto/evp crypto/openssl/crypto/x509 sys/cddl/compat/opensolaris/kern sys/conf sys/x86/x86
Author: delphij Date: Wed May 4 15:26:23 2016 New Revision: 299067 URL: https://svnweb.freebsd.org/changeset/base/299067 Log: Fix multiple OpenSSL vulnerabilitites. [SA-16:17] Fix excessive latency in x86 IPI delivery. [EN-16:07] Fix memory leak in ZFS. [EN-16:08] Approved by: so Modified: releng/10.2/UPDATING releng/10.2/crypto/openssl/crypto/asn1/a_type.c releng/10.2/crypto/openssl/crypto/asn1/tasn_dec.c releng/10.2/crypto/openssl/crypto/asn1/tasn_enc.c releng/10.2/crypto/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c releng/10.2/crypto/openssl/crypto/evp/encode.c releng/10.2/crypto/openssl/crypto/evp/evp_enc.c releng/10.2/crypto/openssl/crypto/x509/x509_obj.c releng/10.2/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c releng/10.2/sys/conf/newvers.sh releng/10.2/sys/x86/x86/local_apic.c Modified: releng/10.2/UPDATING == --- releng/10.2/UPDATINGWed May 4 15:25:47 2016(r299066) +++ releng/10.2/UPDATINGWed May 4 15:26:23 2016(r299067) @@ -16,7 +16,17 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. -20150429 p15 FreeBSD-SA-16:16.ntp +20160504 p16 FreeBSD-SA-16:17.openssl + FreeBSD-EN-16:07.ipi + FreeBSD-EN-16:08.zfs + + Fix multiple OpenSSL vulnerabilitites. [SA-16:17] + + Fix excessive latency in x86 IPI delivery. [EN-16:07] + + Fix memory leak in ZFS. [EN-16:08] + +20160429 p15 FreeBSD-SA-16:16.ntp Fix multiple vulnerabilities of ntp. Modified: releng/10.2/crypto/openssl/crypto/asn1/a_type.c == --- releng/10.2/crypto/openssl/crypto/asn1/a_type.c Wed May 4 15:25:47 2016(r299066) +++ releng/10.2/crypto/openssl/crypto/asn1/a_type.c Wed May 4 15:26:23 2016(r299067) @@ -126,9 +126,7 @@ int ASN1_TYPE_cmp(const ASN1_TYPE *a, co result = 0; /* They do not have content. */ break; case V_ASN1_INTEGER: -case V_ASN1_NEG_INTEGER: case V_ASN1_ENUMERATED: -case V_ASN1_NEG_ENUMERATED: case V_ASN1_BIT_STRING: case V_ASN1_OCTET_STRING: case V_ASN1_SEQUENCE: Modified: releng/10.2/crypto/openssl/crypto/asn1/tasn_dec.c == --- releng/10.2/crypto/openssl/crypto/asn1/tasn_dec.c Wed May 4 15:25:47 2016(r299066) +++ releng/10.2/crypto/openssl/crypto/asn1/tasn_dec.c Wed May 4 15:26:23 2016(r299067) @@ -903,9 +903,7 @@ int asn1_ex_c2i(ASN1_VALUE **pval, const break; case V_ASN1_INTEGER: -case V_ASN1_NEG_INTEGER: case V_ASN1_ENUMERATED: -case V_ASN1_NEG_ENUMERATED: tint = (ASN1_INTEGER **)pval; if (!c2i_ASN1_INTEGER(tint, , len)) goto err; Modified: releng/10.2/crypto/openssl/crypto/asn1/tasn_enc.c == --- releng/10.2/crypto/openssl/crypto/asn1/tasn_enc.c Wed May 4 15:25:47 2016(r299066) +++ releng/10.2/crypto/openssl/crypto/asn1/tasn_enc.c Wed May 4 15:26:23 2016(r299067) @@ -611,9 +611,7 @@ int asn1_ex_i2c(ASN1_VALUE **pval, unsig break; case V_ASN1_INTEGER: -case V_ASN1_NEG_INTEGER: case V_ASN1_ENUMERATED: -case V_ASN1_NEG_ENUMERATED: /* * These are all have the same content format as ASN1_INTEGER */ Modified: releng/10.2/crypto/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c == --- releng/10.2/crypto/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c Wed May 4 15:25:47 2016(r299066) +++ releng/10.2/crypto/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c Wed May 4 15:26:23 2016(r299067) @@ -59,6 +59,7 @@ # include # include # include "evp_locl.h" +# include "constant_time_locl.h" # ifndef EVP_CIPH_FLAG_AEAD_CIPHER # define EVP_CIPH_FLAG_AEAD_CIPHER 0x20 @@ -286,6 +287,8 @@ static int aesni_cbc_hmac_sha1_cipher(EV maxpad |= (255 - maxpad) >> (sizeof(maxpad) * 8 - 8); maxpad &= 255; +ret &= constant_time_ge(maxpad, pad); + inp_len = len - (SHA_DIGEST_LENGTH + pad + 1); mask = (0 - ((inp_len - len) >> (sizeof(inp_len) * 8 - 1))); inp_len &= mask; Modified: releng/10.2/crypto/openssl/crypto/evp/encode.c == --- releng/10.2/crypto/openssl/crypto/evp/encode.c Wed May 4 15:25:47 2016(r299066) +++ releng/10.2/crypto/openssl/crypto/evp/encode.c Wed May 4 15:26:23 2016(r299067) @
svn commit: r299066 - in releng/10.3: . crypto/openssl/crypto/asn1 crypto/openssl/crypto/evp crypto/openssl/crypto/x509 lib/libc/db/hash sys/cddl/compat/opensolaris/kern sys/conf sys/x86/x86
Author: delphij Date: Wed May 4 15:25:47 2016 New Revision: 299066 URL: https://svnweb.freebsd.org/changeset/base/299066 Log: Fix multiple OpenSSL vulnerabilitites. [SA-16:17] Fix performance regression in libc hash(3). [EN-16:06] Fix excessive latency in x86 IPI delivery. [EN-16:07] Fix memory leak in ZFS. [EN-16:08] Approved by: so Modified: releng/10.3/UPDATING releng/10.3/crypto/openssl/crypto/asn1/a_type.c releng/10.3/crypto/openssl/crypto/asn1/tasn_dec.c releng/10.3/crypto/openssl/crypto/asn1/tasn_enc.c releng/10.3/crypto/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c releng/10.3/crypto/openssl/crypto/evp/encode.c releng/10.3/crypto/openssl/crypto/evp/evp_enc.c releng/10.3/crypto/openssl/crypto/x509/x509_obj.c releng/10.3/lib/libc/db/hash/hash.c releng/10.3/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c releng/10.3/sys/conf/newvers.sh releng/10.3/sys/x86/x86/local_apic.c Modified: releng/10.3/UPDATING == --- releng/10.3/UPDATINGWed May 4 13:49:59 2016(r299065) +++ releng/10.3/UPDATINGWed May 4 15:25:47 2016(r299066) @@ -16,7 +16,20 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. -20150429 p1 FreeBSD-SA-16:16.ntp +20160504 p2 FreeBSD-SA-16:17.openssl + FreeBSD-EN-16:06.libc + FreeBSD-EN-16:07.ipi + FreeBSD-EN-16:08.zfs + + Fix multiple OpenSSL vulnerabilitites. [SA-16:17] + + Fix performance regression in libc hash(3). [EN-16:06] + + Fix excessive latency in x86 IPI delivery. [EN-16:07] + + Fix memory leak in ZFS. [EN-16:08] + +20160429 p1 FreeBSD-SA-16:16.ntp Fix multiple vulnerabilities of ntp. Modified: releng/10.3/crypto/openssl/crypto/asn1/a_type.c == --- releng/10.3/crypto/openssl/crypto/asn1/a_type.c Wed May 4 13:49:59 2016(r299065) +++ releng/10.3/crypto/openssl/crypto/asn1/a_type.c Wed May 4 15:25:47 2016(r299066) @@ -126,9 +126,7 @@ int ASN1_TYPE_cmp(const ASN1_TYPE *a, co result = 0; /* They do not have content. */ break; case V_ASN1_INTEGER: -case V_ASN1_NEG_INTEGER: case V_ASN1_ENUMERATED: -case V_ASN1_NEG_ENUMERATED: case V_ASN1_BIT_STRING: case V_ASN1_OCTET_STRING: case V_ASN1_SEQUENCE: Modified: releng/10.3/crypto/openssl/crypto/asn1/tasn_dec.c == --- releng/10.3/crypto/openssl/crypto/asn1/tasn_dec.c Wed May 4 13:49:59 2016(r299065) +++ releng/10.3/crypto/openssl/crypto/asn1/tasn_dec.c Wed May 4 15:25:47 2016(r299066) @@ -903,9 +903,7 @@ int asn1_ex_c2i(ASN1_VALUE **pval, const break; case V_ASN1_INTEGER: -case V_ASN1_NEG_INTEGER: case V_ASN1_ENUMERATED: -case V_ASN1_NEG_ENUMERATED: tint = (ASN1_INTEGER **)pval; if (!c2i_ASN1_INTEGER(tint, , len)) goto err; Modified: releng/10.3/crypto/openssl/crypto/asn1/tasn_enc.c == --- releng/10.3/crypto/openssl/crypto/asn1/tasn_enc.c Wed May 4 13:49:59 2016(r299065) +++ releng/10.3/crypto/openssl/crypto/asn1/tasn_enc.c Wed May 4 15:25:47 2016(r299066) @@ -611,9 +611,7 @@ int asn1_ex_i2c(ASN1_VALUE **pval, unsig break; case V_ASN1_INTEGER: -case V_ASN1_NEG_INTEGER: case V_ASN1_ENUMERATED: -case V_ASN1_NEG_ENUMERATED: /* * These are all have the same content format as ASN1_INTEGER */ Modified: releng/10.3/crypto/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c == --- releng/10.3/crypto/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c Wed May 4 13:49:59 2016(r299065) +++ releng/10.3/crypto/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c Wed May 4 15:25:47 2016(r299066) @@ -59,6 +59,7 @@ # include # include # include "evp_locl.h" +# include "constant_time_locl.h" # ifndef EVP_CIPH_FLAG_AEAD_CIPHER # define EVP_CIPH_FLAG_AEAD_CIPHER 0x20 @@ -286,6 +287,8 @@ static int aesni_cbc_hmac_sha1_cipher(EV maxpad |= (255 - maxpad) >> (sizeof(maxpad) * 8 - 8); maxpad &= 255; +ret &= constant_time_ge(maxpad, pad); + inp_len = len - (SHA_DIGEST_LENGTH + pad + 1); mask = (0 - ((inp_len - len) >> (sizeof(inp_len) * 8 - 1))); inp_len &= mask; Modified: releng/10.3/crypto/openssl/crypto/evp/encode.c =
Re: svn commit: r299064 - head/sys/kern
On Wed, 4 May 2016, [UTF-8] Roger Pau Monn?? wrote: Log: rtc: fix inverted resolution check The current code in clock_register checks if the newly added clock has a resolution value higher than the current one in order to make it the default, which is wrong. Clocks with a lower resolution value should be better than ones with a higher resolution value, in fact with the current code FreeBSD is always selecting the worse clock. ... Modified: head/sys/kern/subr_rtc.c == --- head/sys/kern/subr_rtc.cWed May 4 12:51:27 2016(r299063) +++ head/sys/kern/subr_rtc.cWed May 4 13:48:59 2016(r299064) @@ -84,7 +84,7 @@ clock_register(device_t dev, long res)/ { if (clock_dev != NULL) { - if (clock_res > res) { + if (clock_res <= res) { if (bootverbose) device_printf(dev, "not installed as " "time-of-day clock: clock %s has higher " This and the next message are still sort of backwards, and have an off-by-1 error. It is not incorrect for them to say that the current clock has higher resolution, except for the off-by-1 error. Higher resolution means numerically lower and this now matches the code. But it is confusing. It is better to say that the current clock has finer resolution. The off by 1 error is that the current clock is actually also preferred if it has the same resolution. The wording "finer or equal" is not so good, and neither is "not coarser" Other bugs in these messages: - the first 2 are are obfuscated by splitting them across 3 lines; the third one is only across 2 lines - I think they are misformatted (too long) in the output too - the first message says "not installed", but this function is named clock_register() and third message says it registers, not installs - "removed" in the second message is inconsistent with both "registered" and "installed". Other bugs in the printf()s: - tv_nsec has type long. %09ld format handles this perfectly, but %09jd is used. This requires more verboseness to cast to intmax_t - though %09ld handles nanoseconds perfectly, it is a bogus format since the resolution is only microseconds. - casting tv_sec to intmax_t to print it is excessive. long works on general time_t values until 2038 and is used a lot elsewhere in kern, and here the value is an adjustment that is known to be small. In fact it is 'long res' divided by 2 million, so it is at least 2 million times smaller than needed to print it using %ld. Bruce___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299065 - head/sys/dev/xen/timer
Author: royger Date: Wed May 4 13:49:59 2016 New Revision: 299065 URL: https://svnweb.freebsd.org/changeset/base/299065 Log: xen/pvclock: set the correct resolution for the Xen PV clock The Xen PV clock has a resolution of 1ns, so set the resolution to the highest one that FreeBSD supports, which is 1us. MFC after:2 weeks Sponsored by: Citrix Systems R Modified: head/sys/dev/xen/timer/timer.c Modified: head/sys/dev/xen/timer/timer.c == --- head/sys/dev/xen/timer/timer.c Wed May 4 13:48:59 2016 (r299064) +++ head/sys/dev/xen/timer/timer.c Wed May 4 13:49:59 2016 (r299065) @@ -77,7 +77,12 @@ static devclass_t xentimer_devclass; /* Xen timers may fire up to 100us off */ #defineXENTIMER_MIN_PERIOD_IN_NSEC 100*NSEC_IN_USEC -#defineXENCLOCK_RESOLUTION 101 /* ATRTC resolution + 1 */ + +/* + * The real resolution of the PV clock is 1ns, but the highest + * resolution that FreeBSD supports is 1us, so just use that. + */ +#defineXENCLOCK_RESOLUTION 1 #defineXENTIMER_QUALITY950 ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299064 - head/sys/kern
Author: royger Date: Wed May 4 13:48:59 2016 New Revision: 299064 URL: https://svnweb.freebsd.org/changeset/base/299064 Log: rtc: fix inverted resolution check The current code in clock_register checks if the newly added clock has a resolution value higher than the current one in order to make it the default, which is wrong. Clocks with a lower resolution value should be better than ones with a higher resolution value, in fact with the current code FreeBSD is always selecting the worse clock. Reviewed by: kib jhb jkim Sponsored by: Citrix Systems R MFC after:2 weeks Differential revision:https://reviews.freebsd.org/D6185 Modified: head/sys/kern/subr_rtc.c Modified: head/sys/kern/subr_rtc.c == --- head/sys/kern/subr_rtc.cWed May 4 12:51:27 2016(r299063) +++ head/sys/kern/subr_rtc.cWed May 4 13:48:59 2016(r299064) @@ -84,7 +84,7 @@ clock_register(device_t dev, long res)/ { if (clock_dev != NULL) { - if (clock_res > res) { + if (clock_res <= res) { if (bootverbose) device_printf(dev, "not installed as " "time-of-day clock: clock %s has higher " ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299063 - head/sys/dev/iwn
Author: avos Date: Wed May 4 12:51:27 2016 New Revision: 299063 URL: https://svnweb.freebsd.org/changeset/base/299063 Log: iwn: fix device reset after watchdog timeout. Simple device reset (stop/start) is not enough here; post-init state changes must be applied too. Modified: head/sys/dev/iwn/if_iwn.c head/sys/dev/iwn/if_iwnvar.h Modified: head/sys/dev/iwn/if_iwn.c == --- head/sys/dev/iwn/if_iwn.c Wed May 4 11:53:30 2016(r299062) +++ head/sys/dev/iwn/if_iwn.c Wed May 4 12:51:27 2016(r299063) @@ -344,7 +344,6 @@ static void iwn_scan_end(struct ieee8021 static voidiwn_set_channel(struct ieee80211com *); static voidiwn_scan_curchan(struct ieee80211_scan_state *, unsigned long); static voidiwn_scan_mindwell(struct ieee80211_scan_state *); -static voidiwn_hw_reset(void *, int); #ifdef IWN_DEBUG static char*iwn_get_csr_string(int); static voidiwn_debug_register(struct iwn_softc *); @@ -677,7 +676,6 @@ iwn_attach(device_t dev) callout_init_mtx(>calib_to, >sc_mtx, 0); callout_init_mtx(>watchdog_to, >sc_mtx, 0); - TASK_INIT(>sc_reinit_task, 0, iwn_hw_reset, sc); TASK_INIT(>sc_radioon_task, 0, iwn_radio_on, sc); TASK_INIT(>sc_radiooff_task, 0, iwn_radio_off, sc); TASK_INIT(>sc_panic_task, 0, iwn_panicked, sc); @@ -1400,7 +1398,6 @@ iwn_detach(device_t dev) iwn_xmit_queue_drain(sc); IWN_UNLOCK(sc); - ieee80211_draintask(>sc_ic, >sc_reinit_task); ieee80211_draintask(>sc_ic, >sc_radioon_task); ieee80211_draintask(>sc_ic, >sc_radiooff_task); iwn_stop(sc); @@ -4972,7 +4969,7 @@ iwn_watchdog(void *arg) if (sc->sc_tx_timer > 0) { if (--sc->sc_tx_timer == 0) { ic_printf(ic, "device timeout\n"); - ieee80211_runtask(ic, >sc_reinit_task); + ieee80211_restart_all(ic); return; } } @@ -8907,19 +8904,6 @@ iwn_scan_mindwell(struct ieee80211_scan_ { /* NB: don't try to abort scan; wait for firmware to finish */ } - -static void -iwn_hw_reset(void *arg0, int pending) -{ - struct iwn_softc *sc = arg0; - struct ieee80211com *ic = >sc_ic; - - DPRINTF(sc, IWN_DEBUG_TRACE, "->Doing %s\n", __func__); - - iwn_stop(sc); - iwn_init(sc); - ieee80211_notify_radio(ic, 1); -} #ifdef IWN_DEBUG #defineIWN_DESC(x) case x: return #x Modified: head/sys/dev/iwn/if_iwnvar.h == --- head/sys/dev/iwn/if_iwnvar.hWed May 4 11:53:30 2016 (r299062) +++ head/sys/dev/iwn/if_iwnvar.hWed May 4 12:51:27 2016 (r299063) @@ -304,7 +304,6 @@ struct iwn_softc { int sc_cap_off; /* PCIe Capabilities. */ /* Tasks used by the driver */ - struct task sc_reinit_task; struct task sc_radioon_task; struct task sc_radiooff_task; struct task sc_panic_task; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299062 - in stable/10/sys: amd64/amd64 amd64/include i386/i386 i386/include x86/include x86/x86
Author: avg Date: Wed May 4 11:53:30 2016 New Revision: 299062 URL: https://svnweb.freebsd.org/changeset/base/299062 Log: MFC r297857: re-enable AMD Topology extension on certain models if disabled by BIOS Modified: stable/10/sys/amd64/amd64/mp_machdep.c stable/10/sys/amd64/include/md_var.h stable/10/sys/i386/i386/mp_machdep.c stable/10/sys/i386/include/md_var.h stable/10/sys/x86/include/specialreg.h stable/10/sys/x86/x86/identcpu.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/mp_machdep.c == --- stable/10/sys/amd64/amd64/mp_machdep.c Wed May 4 11:40:13 2016 (r299061) +++ stable/10/sys/amd64/amd64/mp_machdep.c Wed May 4 11:53:30 2016 (r299062) @@ -682,7 +682,7 @@ init_secondary(void) wrmsr(MSR_FSBASE, 0); /* User value */ wrmsr(MSR_GSBASE, (u_int64_t)pc); wrmsr(MSR_KGSBASE, (u_int64_t)pc); /* XXX User value while we're in the kernel */ - intel_fix_cpuid(); + fix_cpuid(); lidt(_idt); Modified: stable/10/sys/amd64/include/md_var.h == --- stable/10/sys/amd64/include/md_var.hWed May 4 11:40:13 2016 (r299061) +++ stable/10/sys/amd64/include/md_var.hWed May 4 11:53:30 2016 (r299062) @@ -112,7 +112,7 @@ voiddump_drop_page(vm_paddr_t); void identify_cpu(void); void initializecpu(void); void initializecpucache(void); -bool intel_fix_cpuid(void); +bool fix_cpuid(void); void fillw(int /*u_short*/ pat, void *base, size_t cnt); void fpstate_drop(struct thread *td); intis_physical_memory(vm_paddr_t addr); Modified: stable/10/sys/i386/i386/mp_machdep.c == --- stable/10/sys/i386/i386/mp_machdep.cWed May 4 11:40:13 2016 (r299061) +++ stable/10/sys/i386/i386/mp_machdep.cWed May 4 11:53:30 2016 (r299062) @@ -684,7 +684,7 @@ init_secondary(void) pc->pc_prvspace = pc; pc->pc_curthread = 0; - intel_fix_cpuid(); + fix_cpuid(); gdt_segs[GPRIV_SEL].ssd_base = (int) pc; gdt_segs[GPROC0_SEL].ssd_base = (int) >pc_common_tss; Modified: stable/10/sys/i386/include/md_var.h == --- stable/10/sys/i386/include/md_var.h Wed May 4 11:40:13 2016 (r299061) +++ stable/10/sys/i386/include/md_var.h Wed May 4 11:53:30 2016 (r299062) @@ -116,7 +116,7 @@ voidfillw(int /*u_short*/ pat, void *ba void fill_based_sd(struct segment_descriptor *sdp, uint32_t base); void initializecpu(void); void initializecpucache(void); -bool intel_fix_cpuid(void); +bool fix_cpuid(void); void i686_pagezero(void *addr); void sse2_pagezero(void *addr); void init_AMD_Elan_sc520(void); Modified: stable/10/sys/x86/include/specialreg.h == --- stable/10/sys/x86/include/specialreg.h Wed May 4 11:40:13 2016 (r299061) +++ stable/10/sys/x86/include/specialreg.h Wed May 4 11:53:30 2016 (r299062) @@ -821,6 +821,7 @@ #defineMSR_P_STATE_CONFIG(n) (0xc0010064 + (n)) /* P-state Config */ #defineMSR_SMM_ADDR0xc0010112 /* SMM TSEG base address */ #defineMSR_SMM_MASK0xc0010113 /* SMM TSEG address mask */ +#defineMSR_EXTFEATURES 0xc0011005 /* Extended CPUID Features override */ #defineMSR_IC_CFG 0xc0011021 /* Instruction Cache Configuration */ #defineMSR_K8_UCODE_UPDATE 0xc0010020 /* update microcode */ #defineMSR_MC0_CTL_MASK0xc0010044 Modified: stable/10/sys/x86/x86/identcpu.c == --- stable/10/sys/x86/x86/identcpu.cWed May 4 11:40:13 2016 (r299061) +++ stable/10/sys/x86/x86/identcpu.cWed May 4 11:53:30 2016 (r299062) @@ -1304,23 +1304,22 @@ identify_hypervisor(void) } #endif -/* - * Clear "Limit CPUID Maxval" bit and return true if the caller should - * get the largest standard CPUID function number again if it is set - * from BIOS. It is necessary for probing correct CPU topology later - * and for the correct operation of the AVX-aware userspace. - */ bool -intel_fix_cpuid(void) +fix_cpuid(void) { uint64_t msr; - if (cpu_vendor_id != CPU_VENDOR_INTEL) - return (false); - if ((CPUID_TO_FAMILY(cpu_id) == 0xf && + /* +* Clear "Limit CPUID Maxval" bit and return true if the caller should +* get the largest standard CPUID function number again if it is set +* from BIOS. It is necessary for probing correct CPU topology later +* and for the correct
svn commit: r299061 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: avg Date: Wed May 4 11:40:13 2016 New Revision: 299061 URL: https://svnweb.freebsd.org/changeset/base/299061 Log: MFC r297812: zio: align use of "no dump" flag between use_uma and !use_uma cases Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c == --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Wed May 4 08:57:40 2016(r299060) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Wed May 4 11:40:13 2016(r299061) @@ -133,11 +133,13 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, sync_pass boolean_t zio_requeue_io_start_cut_in_line = B_TRUE; +#ifdef illumos #ifdef ZFS_DEBUG int zio_buf_debug_limit = 16384; #else int zio_buf_debug_limit = 0; #endif +#endif void zio_init(void) @@ -159,7 +161,7 @@ zio_init(void) size_t size = (c + 1) << SPA_MINBLOCKSHIFT; size_t p2 = size; size_t align = 0; - size_t cflags = (size > zio_buf_debug_limit) ? KMC_NODEBUG : 0; + int cflags = zio_exclude_metadata ? KMC_NODEBUG : 0; while (!ISP2(p2)) p2 &= p2 - 1; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299060 - head/sys/dev/usb
Author: hselasky Date: Wed May 4 08:57:40 2016 New Revision: 299060 URL: https://svnweb.freebsd.org/changeset/base/299060 Log: Extend the UQ_NO_STRINGS quirk to also cover the USB language string descriptor. This fixes enumeration of some older Samsung Galaxy S3 phones. MFC after:1 week Modified: head/sys/dev/usb/usb_device.c Modified: head/sys/dev/usb/usb_device.c == --- head/sys/dev/usb/usb_device.c Wed May 4 07:39:23 2016 (r299059) +++ head/sys/dev/usb/usb_device.c Wed May 4 08:57:40 2016 (r299060) @@ -1774,7 +1774,9 @@ usb_alloc_device(device_t parent_dev, st scratch_ptr = udev->scratch.data; - if (udev->ddesc.iManufacturer || + if (udev->flags.no_strings) { + err = USB_ERR_INVAL; + } else if (udev->ddesc.iManufacturer || udev->ddesc.iProduct || udev->ddesc.iSerialNumber) { /* read out the language ID string */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r298187 - head/sys/netinet
> On 04 May 2016, at 01:03, Gleb Smirnoffwrote: > > Michael, > > On Mon, Apr 18, 2016 at 06:56:29PM +0200, Michael Tuexen wrote: > M> > On Mon, 2016-04-18 at 06:38 +, Michael Tuexen wrote: > M> >> Author: tuexen > M> >> Date: Mon Apr 18 06:38:53 2016 > M> >> New Revision: 298187 > M> >> URL: https://svnweb.freebsd.org/changeset/base/298187 > M> >> > M> >> Log: > M> >> Don't use anonymous unions. > M> >> > M> > > M> > Why not? This is one of those commit messages that really needs to say > M> Because the same code is used in a userland SCTP stack and that > M> uses C99. Anonymous unions are introduced in C11. That's why. > > This explanation of course emerges next question :) > Why don't enable C11 when compiling the userland SCTP stack? Since this is used (meaning compiled) by other projects which have its own constraints and which I don't control... Best regards Michael > > -- > Totus tuus, Glebius. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299059 - stable/10/contrib/netbsd-tests/lib/libc/sys
Author: ngie Date: Wed May 4 07:39:23 2016 New Revision: 299059 URL: https://svnweb.freebsd.org/changeset/base/299059 Log: MFC r298366: Fix coverity issues with contrib/netbsd-tests/lib/libc/sys/t_connect.c - Ensure socket(2) calls succeed - Don't leak slist allocated by earlier socket(2) call CID: 976773, 1251405 Modified: stable/10/contrib/netbsd-tests/lib/libc/sys/t_connect.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libc/sys/t_connect.c == --- stable/10/contrib/netbsd-tests/lib/libc/sys/t_connect.c Wed May 4 07:37:02 2016(r299058) +++ stable/10/contrib/netbsd-tests/lib/libc/sys/t_connect.c Wed May 4 07:39:23 2016(r299059) @@ -56,6 +56,11 @@ ATF_TC_BODY(connect_low_port, tc) slist = socket(AF_INET, SOCK_STREAM, 0); sd = socket(AF_INET, SOCK_STREAM, 0); +#ifdef __FreeBSD__ + ATF_REQUIRE(sd > 0); + ATF_REQUIRE(slist > 0); +#endif + /* bind listening socket */ memset(, 0, sizeof(sinlist)); sinlist.sin_family = AF_INET; @@ -92,6 +97,9 @@ ATF_TC_BODY(connect_low_port, tc) ATF_REQUIRE(ntohs(sin.sin_port) <= IPPORT_RESERVEDMAX); close(sd); +#ifdef __FreeBSD__ + close(slist); +#endif } ATF_TP_ADD_TCS(tp) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299058 - stable/10/tests/sys/posixshm
Author: ngie Date: Wed May 4 07:37:02 2016 New Revision: 299058 URL: https://svnweb.freebsd.org/changeset/base/299058 Log: MFC r298304: Fix issues identified by Coverity - Always munmap memory regions after mmap'ing them. - Make sure getpagesize() returns a value greater than 0 and use a cached value instead of always calling getpagesize(3). - Remove intermediate variable for assigning from $TMPDIR if set in the environment to eliminate warnings about pointer conversions with "/tmp", and to mute an invalid buffer overflow concern from Coverity (snprintf and tacking on a NUL terminator was alleviating that concern before). - Remove useless self-test of psize before it's initialized. - Check the return values of getrlimit/setrlimit. Cosmetic changes: - Replace a `(void*)0` with NULL. - Do some minor whitespace clean up. - Remove an unnecessary cast to mmap. - Make all munmap calls use ATF_REQUIRE_MSG instead of using the: > if (munmap(..) == -1) >atf_tc_fail(..) idiom. Employ the new idiom consistently when calling munmap. CID: 1331351, 1331382-1331386, 1331513, 1331514, 1331565, 1331583, 1331694 Modified: stable/10/tests/sys/posixshm/posixshm_test.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tests/sys/posixshm/posixshm_test.c == --- stable/10/tests/sys/posixshm/posixshm_test.cWed May 4 07:35:43 2016(r299057) +++ stable/10/tests/sys/posixshm/posixshm_test.cWed May 4 07:37:02 2016(r299058) @@ -50,12 +50,9 @@ static char test_path[TEST_PATH_LEN]; static void gen_test_path(void) { - char *tmpdir = getenv("TMPDIR"); - if (tmpdir == NULL) - tmpdir = "/tmp"; - - snprintf(test_path, sizeof(test_path), "%s/tmp.XX", tmpdir); + snprintf(test_path, sizeof(test_path), "%s/tmp.XX", + getenv("TMPDIR") == NULL ? "/tmp" : getenv("TMPDIR")); test_path[sizeof(test_path) - 1] = '\0'; ATF_REQUIRE_MSG(mkstemp(test_path) != -1, "mkstemp failed; errno=%d", errno); @@ -99,10 +96,12 @@ static int scribble_object(void) { char *page; - int fd; + int fd, pagesize; gen_test_path(); + ATF_REQUIRE(0 < (pagesize = getpagesize())); + fd = shm_open(test_path, O_CREAT|O_EXCL|O_RDWR, 0777); if (fd < 0 && errno == EEXIST) { if (shm_unlink(test_path) < 0) @@ -111,17 +110,16 @@ scribble_object(void) } if (fd < 0) atf_tc_fail("shm_open failed; errno=%d", errno); - if (ftruncate(fd, getpagesize()) < 0) + if (ftruncate(fd, pagesize) < 0) atf_tc_fail("ftruncate failed; errno=%d", errno); - page = mmap(0, getpagesize(), PROT_READ | PROT_WRITE, MAP_SHARED, fd, - 0); + page = mmap(0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); if (page == MAP_FAILED) atf_tc_fail("mmap failed; errno=%d", errno); page[0] = '1'; - if (munmap(page, getpagesize()) < 0) - atf_tc_fail("munmap failed; errno=%d", errno); + ATF_REQUIRE_MSG(munmap(page, pagesize) == 0, "munmap failed; errno=%d", + errno); return (fd); } @@ -130,12 +128,13 @@ ATF_TC_WITHOUT_HEAD(remap_object); ATF_TC_BODY(remap_object, tc) { char *page; - int fd; + int fd, pagesize; + + ATF_REQUIRE(0 < (pagesize = getpagesize())); fd = scribble_object(); - page = mmap(0, getpagesize(), PROT_READ | PROT_WRITE, MAP_SHARED, fd, - 0); + page = mmap(0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); if (page == MAP_FAILED) atf_tc_fail("mmap(2) failed; errno=%d", errno); @@ -143,8 +142,8 @@ ATF_TC_BODY(remap_object, tc) atf_tc_fail("missing data ('%c' != '1')", page[0]); close(fd); - if (munmap(page, getpagesize()) < 0) - atf_tc_fail("munmap failed; errno=%d", errno); + ATF_REQUIRE_MSG(munmap(page, pagesize) == 0, "munmap failed; errno=%d", + errno); ATF_REQUIRE_MSG(shm_unlink(test_path) != -1, "shm_unlink failed; errno=%d", errno); @@ -154,7 +153,9 @@ ATF_TC_WITHOUT_HEAD(reopen_object); ATF_TC_BODY(reopen_object, tc) { char *page; - int fd; + int fd, pagesize; + + ATF_REQUIRE(0 < (pagesize = getpagesize())); fd = scribble_object(); close(fd); @@ -163,14 +164,15 @@ ATF_TC_BODY(reopen_object, tc) if (fd < 0) atf_tc_fail("shm_open(2) failed; errno=%d", errno); - page = mmap(0, getpagesize(), PROT_READ, MAP_SHARED, fd, 0); + page = mmap(0, pagesize, PROT_READ, MAP_SHARED, fd, 0); if (page == MAP_FAILED) atf_tc_fail("mmap(2) failed; errno=%d", errno); if (page[0] != '1')
svn commit: r299057 - stable/10/tests/sys/vm
Author: ngie Date: Wed May 4 07:35:43 2016 New Revision: 299057 URL: https://svnweb.freebsd.org/changeset/base/299057 Log: MFC r298301: Fix leaks and test for getpagesize() returning == -1 - close file descriptors after use. - Always munmap memory regions after mmap'ing them. - Make sure getpagesize() returns a value greater than 0 and use a cached value instead of always calling getpagesize(3). CID: 1331374-1331377, 1331653-1331662 Modified: stable/10/tests/sys/vm/mmap_test.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tests/sys/vm/mmap_test.c == --- stable/10/tests/sys/vm/mmap_test.c Wed May 4 07:33:58 2016 (r299056) +++ stable/10/tests/sys/vm/mmap_test.c Wed May 4 07:35:43 2016 (r299057) @@ -91,8 +91,10 @@ static void checked_mmap(int prot, int flags, int fd, int error, const char *msg) { void *p; + int pagesize; - p = mmap(NULL, getpagesize(), prot, flags, fd, 0); + ATF_REQUIRE((pagesize = getpagesize()) > 0); + p = mmap(NULL, pagesize, prot, flags, fd, 0); if (p == MAP_FAILED) { if (error == 0) ATF_CHECK_MSG(0, "%s failed with errno %d", msg, @@ -103,18 +105,19 @@ checked_mmap(int prot, int flags, int fd errno, error); } else { ATF_CHECK_MSG(error == 0, "%s succeeded", msg); - munmap(p, getpagesize()); + munmap(p, pagesize); } } ATF_TC_WITHOUT_HEAD(mmap__bad_arguments); ATF_TC_BODY(mmap__bad_arguments, tc) { - int devstatfd, shmfd, zerofd; + int devstatfd, pagesize, shmfd, zerofd; + ATF_REQUIRE((pagesize = getpagesize()) > 0); ATF_REQUIRE((devstatfd = open("/dev/devstat", O_RDONLY)) >= 0); ATF_REQUIRE((shmfd = shm_open(SHM_ANON, O_RDWR, 0644)) >= 0); - ATF_REQUIRE(ftruncate(shmfd, getpagesize()) == 0); + ATF_REQUIRE(ftruncate(shmfd, pagesize) == 0); ATF_REQUIRE((zerofd = open("/dev/zero", O_RDONLY)) >= 0); /* These should work. */ @@ -179,6 +182,10 @@ ATF_TC_BODY(mmap__bad_arguments, tc) */ checked_mmap(PROT_READ, MAP_PRIVATE, devstatfd, EINVAL, "MAP_PRIVATE of /dev/devstat"); + + close(devstatfd); + close(shmfd); + close(zerofd); } ATF_TC_WITHOUT_HEAD(mmap__dev_zero_private); @@ -186,22 +193,21 @@ ATF_TC_BODY(mmap__dev_zero_private, tc) { char *p1, *p2, *p3; size_t i; - int fd; + int fd, pagesize; + ATF_REQUIRE((pagesize = getpagesize()) > 0); ATF_REQUIRE((fd = open("/dev/zero", O_RDONLY)) >= 0); - p1 = mmap(NULL, getpagesize(), PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, - 0); + p1 = mmap(NULL, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); ATF_REQUIRE(p1 != MAP_FAILED); - p2 = mmap(NULL, getpagesize(), PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, - 0); + p2 = mmap(NULL, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); ATF_REQUIRE(p2 != MAP_FAILED); - for (i = 0; i < getpagesize(); i++) + for (i = 0; i < pagesize; i++) ATF_REQUIRE_EQ_MSG(0, p1[i], "byte at p1[%zu] is %x", i, p1[i]); - ATF_REQUIRE(memcmp(p1, p2, getpagesize()) == 0); + ATF_REQUIRE(memcmp(p1, p2, pagesize) == 0); p1[0] = 1; @@ -211,11 +217,15 @@ ATF_TC_BODY(mmap__dev_zero_private, tc) ATF_REQUIRE(p1[0] == 1); - p3 = mmap(NULL, getpagesize(), PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, - 0); + p3 = mmap(NULL, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); ATF_REQUIRE(p3 != MAP_FAILED); ATF_REQUIRE(p3[0] == 0); + + munmap(p1, pagesize); + munmap(p2, pagesize); + munmap(p3, pagesize); + close(fd); } ATF_TC_WITHOUT_HEAD(mmap__dev_zero_shared); @@ -223,22 +233,21 @@ ATF_TC_BODY(mmap__dev_zero_shared, tc) { char *p1, *p2, *p3; size_t i; - int fd; + int fd, pagesize; + ATF_REQUIRE((pagesize = getpagesize()) > 0); ATF_REQUIRE((fd = open("/dev/zero", O_RDWR)) >= 0); - p1 = mmap(NULL, getpagesize(), PROT_READ | PROT_WRITE, MAP_SHARED, fd, - 0); + p1 = mmap(NULL, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); ATF_REQUIRE(p1 != MAP_FAILED); - p2 = mmap(NULL, getpagesize(), PROT_READ | PROT_WRITE, MAP_SHARED, fd, - 0); + p2 = mmap(NULL, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); ATF_REQUIRE(p2 != MAP_FAILED); - for (i = 0; i < getpagesize(); i++) + for (i = 0; i < pagesize; i++) ATF_REQUIRE_EQ_MSG(0, p1[i], "byte at p1[%zu] is %x", i, p1[i]); - ATF_REQUIRE(memcmp(p1, p2, getpagesize()) == 0); + ATF_REQUIRE(memcmp(p1, p2, pagesize) == 0); p1[0] = 1; @@ -248,11 +257,16 @@
svn commit: r299056 - stable/10/sbin/camcontrol
Author: ngie Date: Wed May 4 07:33:58 2016 New Revision: 299056 URL: https://svnweb.freebsd.org/changeset/base/299056 Log: MFC r298758: Remove logically impossible test in scsidoinquiry(..) It was already done 4 lines prior and the value of error didn't change CID: 1011236 Modified: stable/10/sbin/camcontrol/camcontrol.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/camcontrol/camcontrol.c == --- stable/10/sbin/camcontrol/camcontrol.c Wed May 4 07:06:48 2016 (r299055) +++ stable/10/sbin/camcontrol/camcontrol.c Wed May 4 07:33:58 2016 (r299056) @@ -814,9 +814,6 @@ scsidoinquiry(struct cam_device *device, if (arglist & CAM_ARG_GET_SERIAL) scsiserial(device, retry_count, timeout); - if (error != 0) - return(error); - if (arglist & CAM_ARG_GET_XFERRATE) error = camxferrate(device); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299053 - in stable/9/crypto/openssl/crypto: asn1 evp x509
Author: delphij Date: Wed May 4 06:53:02 2016 New Revision: 299053 URL: https://svnweb.freebsd.org/changeset/base/299053 Log: Fix several OpenSSL vulnerabilities. Security: CVE-2016-2105, CVE-2016-2106, CVE-2016-2109 Security: CVE-2016-2176 (does not affect FreeBSD) Security: FreeBSD-SA-16:17.openssl Modified: stable/9/crypto/openssl/crypto/asn1/a_type.c stable/9/crypto/openssl/crypto/asn1/tasn_dec.c stable/9/crypto/openssl/crypto/asn1/tasn_enc.c stable/9/crypto/openssl/crypto/evp/encode.c stable/9/crypto/openssl/crypto/evp/evp_enc.c stable/9/crypto/openssl/crypto/x509/x509_obj.c Modified: stable/9/crypto/openssl/crypto/asn1/a_type.c == --- stable/9/crypto/openssl/crypto/asn1/a_type.cWed May 4 06:26:27 2016(r299052) +++ stable/9/crypto/openssl/crypto/asn1/a_type.cWed May 4 06:53:02 2016(r299053) @@ -123,9 +123,7 @@ int ASN1_TYPE_cmp(const ASN1_TYPE *a, co result = 0; /* They do not have content. */ break; case V_ASN1_INTEGER: -case V_ASN1_NEG_INTEGER: case V_ASN1_ENUMERATED: -case V_ASN1_NEG_ENUMERATED: case V_ASN1_BIT_STRING: case V_ASN1_OCTET_STRING: case V_ASN1_SEQUENCE: Modified: stable/9/crypto/openssl/crypto/asn1/tasn_dec.c == --- stable/9/crypto/openssl/crypto/asn1/tasn_dec.c Wed May 4 06:26:27 2016(r299052) +++ stable/9/crypto/openssl/crypto/asn1/tasn_dec.c Wed May 4 06:53:02 2016(r299053) @@ -901,9 +901,7 @@ int asn1_ex_c2i(ASN1_VALUE **pval, const break; case V_ASN1_INTEGER: -case V_ASN1_NEG_INTEGER: case V_ASN1_ENUMERATED: -case V_ASN1_NEG_ENUMERATED: tint = (ASN1_INTEGER **)pval; if (!c2i_ASN1_INTEGER(tint, , len)) goto err; Modified: stable/9/crypto/openssl/crypto/asn1/tasn_enc.c == --- stable/9/crypto/openssl/crypto/asn1/tasn_enc.c Wed May 4 06:26:27 2016(r299052) +++ stable/9/crypto/openssl/crypto/asn1/tasn_enc.c Wed May 4 06:53:02 2016(r299053) @@ -610,9 +610,7 @@ int asn1_ex_i2c(ASN1_VALUE **pval, unsig break; case V_ASN1_INTEGER: -case V_ASN1_NEG_INTEGER: case V_ASN1_ENUMERATED: -case V_ASN1_NEG_ENUMERATED: /* * These are all have the same content format as ASN1_INTEGER */ Modified: stable/9/crypto/openssl/crypto/evp/encode.c == --- stable/9/crypto/openssl/crypto/evp/encode.c Wed May 4 06:26:27 2016 (r299052) +++ stable/9/crypto/openssl/crypto/evp/encode.c Wed May 4 06:53:02 2016 (r299053) @@ -57,6 +57,7 @@ */ #include +#include #include "cryptlib.h" #include @@ -134,13 +135,13 @@ void EVP_EncodeUpdate(EVP_ENCODE_CTX *ct const unsigned char *in, int inl) { int i, j; -unsigned int total = 0; +size_t total = 0; *outl = 0; if (inl == 0) return; OPENSSL_assert(ctx->length <= (int)sizeof(ctx->enc_data)); -if ((ctx->num + inl) < ctx->length) { +if (ctx->length - ctx->num > inl) { memcpy(&(ctx->enc_data[ctx->num]), in, inl); ctx->num += inl; return; @@ -157,7 +158,7 @@ void EVP_EncodeUpdate(EVP_ENCODE_CTX *ct *out = '\0'; total = j + 1; } -while (inl >= ctx->length) { +while (inl >= ctx->length && total <= INT_MAX) { j = EVP_EncodeBlock(out, in, ctx->length); in += ctx->length; inl -= ctx->length; @@ -166,6 +167,11 @@ void EVP_EncodeUpdate(EVP_ENCODE_CTX *ct *out = '\0'; total += j + 1; } +if (total > INT_MAX) { +/* Too much output data! */ +*outl = 0; +return; +} if (inl != 0) memcpy(&(ctx->enc_data[0]), in, inl); ctx->num = inl; Modified: stable/9/crypto/openssl/crypto/evp/evp_enc.c == --- stable/9/crypto/openssl/crypto/evp/evp_enc.cWed May 4 06:26:27 2016(r299052) +++ stable/9/crypto/openssl/crypto/evp/evp_enc.cWed May 4 06:53:02 2016(r299053) @@ -166,7 +166,7 @@ int EVP_EncryptUpdate(EVP_CIPHER_CTX *ct bl = ctx->cipher->block_size; OPENSSL_assert(bl <= (int)sizeof(ctx->buf)); if (i != 0) { -if (i + inl < bl) { +if (bl - i > inl) { memcpy(&(ctx->buf[i]), in, inl); ctx->buf_len += inl; *outl = 0; Modified: stable/9/crypto/openssl/crypto/x509/x509_obj.c == --- stable/9/crypto/openssl/crypto/x509/x509_obj.c Wed May 4 06:26:27 2016(r299052) +++
Re: svn commit: r298823 - in head: gnu/usr.bin gnu/usr.bin/sdiff usr.bin usr.bin/sdiff usr.bin/sdiff/tests
On Wed, May 04, 2016 at 07:54:46AM +0200, Kamil Czekirda wrote: > Hi, > > make ftp stops here since r298823: > What is the revision you last tested because it is supposed to be fixed by: r298837 Best regards, Bapt signature.asc Description: PGP signature
svn commit: r299052 - head/sys/dev/acpi_support
Author: adrian Date: Wed May 4 06:26:27 2016 New Revision: 299052 URL: https://svnweb.freebsd.org/changeset/base/299052 Log: s/struct device */device_t/g Submitted by: kmacy Modified: head/sys/dev/acpi_support/atk0110.c Modified: head/sys/dev/acpi_support/atk0110.c == --- head/sys/dev/acpi_support/atk0110.c Wed May 4 06:25:12 2016 (r299051) +++ head/sys/dev/acpi_support/atk0110.c Wed May 4 06:26:27 2016 (r299052) @@ -66,7 +66,7 @@ struct aibs_sensor { }; struct aibs_softc { - struct device *sc_dev; + device_tsc_dev; ACPI_HANDLE sc_ah; struct aibs_sensor *sc_asens_volt; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299051 - head/sys/dev/fdc
Author: adrian Date: Wed May 4 06:25:12 2016 New Revision: 299051 URL: https://svnweb.freebsd.org/changeset/base/299051 Log: s/struct device */device_t/g Submitted by: kmacy Modified: head/sys/dev/fdc/fdcvar.h Modified: head/sys/dev/fdc/fdcvar.h == --- head/sys/dev/fdc/fdcvar.h Wed May 4 06:24:51 2016(r299050) +++ head/sys/dev/fdc/fdcvar.h Wed May 4 06:25:12 2016(r299051) @@ -66,7 +66,7 @@ struct fdc_data { bus_space_handle_t ioh[FDC_MAXREG]; int ioff[FDC_MAXREG]; void*fdc_intr; - struct device *fdc_dev; + device_t fdc_dev; struct mtx fdc_mtx; struct proc *fdc_thread; }; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299050 - head/sys/dev/esp
Author: adrian Date: Wed May 4 06:24:51 2016 New Revision: 299050 URL: https://svnweb.freebsd.org/changeset/base/299050 Log: s/struct device */device_t/g Submitted by: kmacy Modified: head/sys/dev/esp/esp_pci.c Modified: head/sys/dev/esp/esp_pci.c == --- head/sys/dev/esp/esp_pci.c Wed May 4 06:24:10 2016(r299049) +++ head/sys/dev/esp/esp_pci.c Wed May 4 06:24:51 2016(r299050) @@ -97,7 +97,7 @@ __FBSDID("$FreeBSD$"); struct esp_pci_softc { struct ncr53c9x_softc sc_ncr53c9x;/* glue to MI code */ - struct device *sc_dev; + device_tsc_dev; struct resource *sc_res[2]; #defineESP_PCI_RES_INTR0 ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299048 - head/sys/dev/lmc
Author: adrian Date: Wed May 4 06:23:49 2016 New Revision: 299048 URL: https://svnweb.freebsd.org/changeset/base/299048 Log: s/struct device */device_t/g Submitted by: kmacy Modified: head/sys/dev/lmc/if_lmc.h Modified: head/sys/dev/lmc/if_lmc.h == --- head/sys/dev/lmc/if_lmc.h Wed May 4 06:22:41 2016(r299047) +++ head/sys/dev/lmc/if_lmc.h Wed May 4 06:23:49 2016(r299048) @@ -1092,7 +1092,7 @@ struct softc #endif struct callout callout; /* watchdog needs this */ - struct device*dev; /* base device pointer */ + device_t dev;/* base device pointer */ bus_space_tag_t csr_tag; /* bus_space needs this*/ bus_space_handle_t csr_handle;/* bus_space_needs this*/ void *irq_cookie;/* bus_teardown_intr needs this*/ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299047 - head/sys/dev/pci
Author: jkim Date: Wed May 4 06:22:41 2016 New Revision: 299047 URL: https://svnweb.freebsd.org/changeset/base/299047 Log: Fix build without "options PCI_IOV". Modified: head/sys/dev/pci/pci.c Modified: head/sys/dev/pci/pci.c == --- head/sys/dev/pci/pci.c Wed May 4 06:09:13 2016(r299046) +++ head/sys/dev/pci/pci.c Wed May 4 06:22:41 2016(r299047) @@ -5644,9 +5644,10 @@ pci_cfg_restore(device_t dev, struct pci if (dinfo->cfg.msix.msix_location != 0) pci_resume_msix(dev); +#ifdef PCI_IOV if (dinfo->cfg.iov != NULL) pci_iov_cfg_restore(dev, dinfo); - +#endif } static void @@ -5759,8 +5760,10 @@ pci_cfg_save(device_t dev, struct pci_de if (dinfo->cfg.pcix.pcix_location != 0) pci_cfg_save_pcix(dev, dinfo); +#ifdef PCI_IOV if (dinfo->cfg.iov != NULL) pci_iov_cfg_save(dev, dinfo); +#endif /* * don't set the state for display devices, base peripherals and ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"