svn commit: r286871 - head/contrib/jemalloc/include/jemalloc
Author: jasone Date: Tue Aug 18 08:10:46 2015 New Revision: 286871 URL: https://svnweb.freebsd.org/changeset/base/286871 Log: Fix build failure due to missing CPU_SPINWAIT definition. Modified: head/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h Modified: head/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h == --- head/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h Tue Aug 18 06:28:37 2015(r286870) +++ head/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h Tue Aug 18 08:10:46 2015(r286871) @@ -57,6 +57,10 @@ # define JEMALLOC_TLS_MODEL /* Default. */ #endif +#ifndef CPU_SPINWAIT +# define CPU_SPINWAIT do {} while (0) +#endif + #defineSTATIC_PAGE_SHIFT PAGE_SHIFT #defineLG_SIZEOF_INT 2 #defineLG_SIZEOF_LONG LG_SIZEOF_PTR ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r286872 - head/lib/libc/stdlib/jemalloc
Author: jasone Date: Tue Aug 18 08:18:28 2015 New Revision: 286872 URL: https://svnweb.freebsd.org/changeset/base/286872 Log: Add missing sdallocx updates and remove *allocm manpage links. Submitted by: jbeich Modified: head/lib/libc/stdlib/jemalloc/Makefile.inc head/lib/libc/stdlib/jemalloc/Symbol.map Modified: head/lib/libc/stdlib/jemalloc/Makefile.inc == --- head/lib/libc/stdlib/jemalloc/Makefile.inc Tue Aug 18 08:10:46 2015 (r286871) +++ head/lib/libc/stdlib/jemalloc/Makefile.inc Tue Aug 18 08:18:28 2015 (r286872) @@ -40,12 +40,8 @@ MLINKS+= \ jemalloc.3 xallocx.3 \ jemalloc.3 sallocx.3 \ jemalloc.3 dallocx.3 \ + jemalloc.3 sdallocx.3 \ jemalloc.3 nallocx.3 \ - jemalloc.3 allocm.3 \ - jemalloc.3 rallocm.3 \ - jemalloc.3 sallocm.3 \ - jemalloc.3 dallocm.3 \ - jemalloc.3 nallocm.3 \ jemalloc.3 malloc.conf.5 .if defined(MALLOC_PRODUCTION) Modified: head/lib/libc/stdlib/jemalloc/Symbol.map == --- head/lib/libc/stdlib/jemalloc/Symbol.mapTue Aug 18 08:10:46 2015 (r286871) +++ head/lib/libc/stdlib/jemalloc/Symbol.mapTue Aug 18 08:18:28 2015 (r286872) @@ -51,6 +51,11 @@ FBSD_1.3 { __nallocm; }; +FBSD_1.4 { + sdallocx; + __sdallocx; +}; + FBSDprivate_1.0 { _malloc_thread_cleanup; _malloc_prefork; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r286873 - head/sys/netinet
Author: jch Date: Tue Aug 18 08:27:26 2015 New Revision: 286873 URL: https://svnweb.freebsd.org/changeset/base/286873 Log: Make clear that TIME_WAIT timeout expiration is managed solely by tcp_tw_2msl_scan(). Sponsored by: Verisign, Inc. Modified: head/sys/netinet/tcp_timer.c Modified: head/sys/netinet/tcp_timer.c == --- head/sys/netinet/tcp_timer.cTue Aug 18 08:18:28 2015 (r286872) +++ head/sys/netinet/tcp_timer.cTue Aug 18 08:27:26 2015 (r286873) @@ -333,21 +333,29 @@ tcp_timer_2msl(void *xtp) /* * 2 MSL timeout in shutdown went off. If we're closed but * still waiting for peer to close and connection has been idle -* too long, or if 2MSL time is up from TIME_WAIT, delete connection -* control block. Otherwise, check again in a bit. +* too long delete connection control block. Otherwise, check +* again in a bit. +* +* If in TIME_WAIT state just ignore as this timeout is handled in +* tcp_tw_2msl_scan(). * * If fastrecycle of FIN_WAIT_2, in FIN_WAIT_2 and receiver has closed, * there's no point in hanging onto FIN_WAIT_2 socket. Just close it. * Ignore fact that there were recent incoming segments. */ + if ((inp->inp_flags & INP_TIMEWAIT) != 0) { + INP_WUNLOCK(inp); + INP_INFO_RUNLOCK(&V_tcbinfo); + CURVNET_RESTORE(); + return; + } if (tcp_fast_finwait2_recycle && tp->t_state == TCPS_FIN_WAIT_2 && tp->t_inpcb && tp->t_inpcb->inp_socket && (tp->t_inpcb->inp_socket->so_rcv.sb_state & SBS_CANTRCVMORE)) { TCPSTAT_INC(tcps_finwait2_drops); tp = tcp_close(tp); } else { - if (tp->t_state != TCPS_TIME_WAIT && - ticks - tp->t_rcvtime <= TP_MAXIDLE(tp)) { + if (ticks - tp->t_rcvtime <= TP_MAXIDLE(tp)) { if (!callout_reset(&tp->t_timers->tt_2msl, TP_KEEPINTVL(tp), tcp_timer_2msl, tp)) { tp->t_timers->tt_flags &= ~TT_2MSL_RST; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r286874 - head/sys/sys
Author: jasone Date: Tue Aug 18 08:29:13 2015 New Revision: 286874 URL: https://svnweb.freebsd.org/changeset/base/286874 Log: Bump __FreeBSD_version for the jemalloc 4.0.0 import. Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h == --- head/sys/sys/param.hTue Aug 18 08:27:26 2015(r286873) +++ head/sys/sys/param.hTue Aug 18 08:29:13 2015(r286874) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100078 /* Master, propagated to newvers */ +#define __FreeBSD_version 1100079 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r286866 - in head: contrib/jemalloc contrib/jemalloc/doc contrib/jemalloc/include/jemalloc contrib/jemalloc/include/jemalloc/internal contrib/jemalloc/src include lib/libc/gen lib/libc
On Aug 17, 2015, at 6:16 PM, NGie Cooper wrote: > On Mon, Aug 17, 2015 at 5:21 PM, Jason Evans wrote: >> Author: jasone >> Date: Tue Aug 18 00:21:25 2015 >> New Revision: 286866 >> URL: https://svnweb.freebsd.org/changeset/base/286866 >> >> Log: >> Update jemalloc to version 4.0.0. > > Relnotes: yes! > > Also, is there a summary of the changes that can be provided here, or > should the reader get this information from the ChangeLog? The ChangeLog is rather long, and part of the commit itself. See src/contrib/jemalloc/ChangeLog or https://github.com/jemalloc/jemalloc/releases/tag/4.0.0 . Thanks, Jason ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r286866 - in head: contrib/jemalloc contrib/jemalloc/doc contrib/jemalloc/include/jemalloc contrib/jemalloc/include/jemalloc/internal contrib/jemalloc/src include lib/libc/gen lib/libc
On Aug 17, 2015, at 9:35 PM, Jan Beich wrote: > Jason Evans writes: > >> Author: jasone >> Date: Tue Aug 18 00:21:25 2015 >> New Revision: 286866 >> URL: https://svnweb.freebsd.org/changeset/base/286866 >> >> Log: >> Update jemalloc to version 4.0.0. > > Can you bump __FreeBSD_version for non-standard API changes? Some ports > like www/firefox may want to take advantage of it without complicating > configure scripts. Done. >> + - Add sdallocx(), which implements sized deallocation. The primary >> +optimization over dallocx() is the removal of a metadata read, which >> often >> +suffers an L1 cache miss. > [...] >> + - Remove the *allocm() API, which is superseded by the *allocx() API. > > Symbol.map and manpages haven't been updated. > [...] Committed; thanks! Jason ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r286877 - in head/contrib/jemalloc: . include/jemalloc
Author: jasone Date: Tue Aug 18 09:09:27 2015 New Revision: 286877 URL: https://svnweb.freebsd.org/changeset/base/286877 Log: Re-add LG_SIZEOF_PTR definition for __aarch64__. This definition was erroneously removed during the 4.0.0 import. Modified: head/contrib/jemalloc/FREEBSD-diffs head/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h Modified: head/contrib/jemalloc/FREEBSD-diffs == --- head/contrib/jemalloc/FREEBSD-diffs Tue Aug 18 09:05:59 2015 (r286876) +++ head/contrib/jemalloc/FREEBSD-diffs Tue Aug 18 09:09:27 2015 (r286877) @@ -117,10 +117,10 @@ index dbf6aa7..f87dba8 100644 jemalloc_postfork_child diff --git a/include/jemalloc/jemalloc_FreeBSD.h b/include/jemalloc/jemalloc_FreeBSD.h new file mode 100644 -index 000..66d6da5 +index 000..c5113b9 --- /dev/null +++ b/include/jemalloc/jemalloc_FreeBSD.h -@@ -0,0 +1,137 @@ +@@ -0,0 +1,144 @@ +/* + * Override settings that were generated in jemalloc_defs.h as necessary. + */ @@ -163,6 +163,9 @@ index 000..66d6da5 +#ifdef __arm__ +# define LG_SIZEOF_PTR 2 +#endif ++#ifdef __aarch64__ ++# define LG_SIZEOF_PTR 3 ++#endif +#ifdef __mips__ +#ifdef __mips_n64 +# define LG_SIZEOF_PTR 3 @@ -180,6 +183,10 @@ index 000..66d6da5 +# define JEMALLOC_TLS_MODEL /* Default. */ +#endif + ++#ifndef CPU_SPINWAIT ++# define CPU_SPINWAIT do {} while (0) ++#endif ++ +#define STATIC_PAGE_SHIFT PAGE_SHIFT +#define LG_SIZEOF_INT 2 +#define LG_SIZEOF_LONG LG_SIZEOF_PTR Modified: head/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h == --- head/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h Tue Aug 18 09:05:59 2015(r286876) +++ head/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h Tue Aug 18 09:09:27 2015(r286877) @@ -40,6 +40,9 @@ #ifdef __arm__ # define LG_SIZEOF_PTR2 #endif +#ifdef __aarch64__ +# define LG_SIZEOF_PTR3 +#endif #ifdef __mips__ #ifdef __mips_n64 # define LG_SIZEOF_PTR3 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r286879 - head/sys/arm64/arm64
Author: emaste Date: Tue Aug 18 10:07:03 2015 New Revision: 286879 URL: https://svnweb.freebsd.org/changeset/base/286879 Log: Remove register dump from arm64 el0 unknown exception An exception with an unknown reasion is the expected result of the attempted execution of an instruction bit pattern that has no allocated instruction. Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/arm64/trap.c Modified: head/sys/arm64/arm64/trap.c == --- head/sys/arm64/arm64/trap.c Tue Aug 18 09:09:39 2015(r286878) +++ head/sys/arm64/arm64/trap.c Tue Aug 18 10:07:03 2015(r286879) @@ -309,8 +309,8 @@ do_el1h_sync(struct trapframe *frame) } /* - * We get EXCP_UNKNOWN from QEMU when executing zeroed memory. For now turn - * this into a SIGILL. + * The attempted execution of an instruction bit pattern that has no allocated + * instruction resuls in an exception with an unknown reason. */ static void el0_excp_unknown(struct trapframe *frame) @@ -320,8 +320,6 @@ el0_excp_unknown(struct trapframe *frame td = curthread; far = READ_SPECIALREG(far_el1); - printf("el0 EXCP_UNKNOWN exception\n"); - print_registers(frame); call_trapsignal(td, SIGILL, ILL_ILLTRP, (void *)far); userret(td, frame); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r286880 - head/sys/kern
Author: jch Date: Tue Aug 18 10:15:09 2015 New Revision: 286880 URL: https://svnweb.freebsd.org/changeset/base/286880 Log: callout_stop() should return 0 (fail) when the callout is currently being serviced and indeed unstoppable. A scenario to reproduce this case is: - the callout is being serviced and at same time, - callout_reset() is called on this callout that sets the CALLOUT_PENDING flag and at same time, - callout_stop() is called on this callout and returns 1 (success) even if the callout is indeed currently running and unstoppable. This issue was caught up while making r284245 (D2763) workaround, and was discussed at BSDCan 2015. Once applied the r284245 workaround is not needed anymore and will be reverted. Differential Revision:https://reviews.freebsd.org/D3078 Reviewed by: jhb Sponsored by: Verisign, Inc. Modified: head/sys/kern/kern_timeout.c Modified: head/sys/kern/kern_timeout.c == --- head/sys/kern/kern_timeout.cTue Aug 18 10:07:03 2015 (r286879) +++ head/sys/kern/kern_timeout.cTue Aug 18 10:15:09 2015 (r286880) @@ -1150,7 +1150,7 @@ _callout_stop_safe(struct callout *c, in struct callout_cpu *cc, *old_cc; struct lock_class *class; int direct, sq_locked, use_lock; - int not_on_a_list; + int not_on_a_list, not_running; if (safe) WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, c->c_lock, @@ -1378,8 +1378,15 @@ again: } } callout_cc_del(c, cc); + + /* +* If we are asked to stop a callout which is currently in progress +* and indeed impossible to stop then return 0. +*/ + not_running = !(cc_exec_curr(cc, direct) == c); + CC_UNLOCK(cc); - return (1); + return (not_running); } void ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r286880 - head/sys/kern
On 08/18/15 12:15, Julien Charbon wrote: Author: jch Date: Tue Aug 18 10:15:09 2015 New Revision: 286880 URL: https://svnweb.freebsd.org/changeset/base/286880 Log: callout_stop() should return 0 (fail) when the callout is currently being serviced and indeed unstoppable. A scenario to reproduce this case is: - the callout is being serviced and at same time, - callout_reset() is called on this callout that sets the CALLOUT_PENDING flag and at same time, - callout_stop() is called on this callout and returns 1 (success) even if the callout is indeed currently running and unstoppable. This issue was caught up while making r284245 (D2763) workaround, and was discussed at BSDCan 2015. Once applied the r284245 workaround is not needed anymore and will be reverted. Differential Revision: https://reviews.freebsd.org/D3078 Reviewed by: jhb Sponsored by:Verisign, Inc. Modified: head/sys/kern/kern_timeout.c Modified: head/sys/kern/kern_timeout.c == --- head/sys/kern/kern_timeout.cTue Aug 18 10:07:03 2015 (r286879) +++ head/sys/kern/kern_timeout.cTue Aug 18 10:15:09 2015 (r286880) @@ -1150,7 +1150,7 @@ _callout_stop_safe(struct callout *c, in struct callout_cpu *cc, *old_cc; struct lock_class *class; int direct, sq_locked, use_lock; - int not_on_a_list; + int not_on_a_list, not_running; if (safe) WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, c->c_lock, @@ -1378,8 +1378,15 @@ again: } } callout_cc_del(c, cc); + + /* +* If we are asked to stop a callout which is currently in progress +* and indeed impossible to stop then return 0. +*/ + not_running = !(cc_exec_curr(cc, direct) == c); + CC_UNLOCK(cc); - return (1); + return (not_running); } void Should this be MFC'ed to 10? --HPS ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r286883 - head/sys/arm64/arm64
Author: emaste Date: Tue Aug 18 11:52:45 2015 New Revision: 286883 URL: https://svnweb.freebsd.org/changeset/base/286883 Log: Correct comment typo noted by erik Modified: head/sys/arm64/arm64/trap.c Modified: head/sys/arm64/arm64/trap.c == --- head/sys/arm64/arm64/trap.c Tue Aug 18 11:51:29 2015(r286882) +++ head/sys/arm64/arm64/trap.c Tue Aug 18 11:52:45 2015(r286883) @@ -310,7 +310,7 @@ do_el1h_sync(struct trapframe *frame) /* * The attempted execution of an instruction bit pattern that has no allocated - * instruction resuls in an exception with an unknown reason. + * instruction results in an exception with an unknown reason. */ static void el0_excp_unknown(struct trapframe *frame) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r286885 - head/usr.bin/calendar/calendars
Author: brueffer Date: Tue Aug 18 12:27:21 2015 New Revision: 286885 URL: https://svnweb.freebsd.org/changeset/base/286885 Log: RIP Stefan Farfeleder (stefanf), committer since 2004. You will be missed! Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd == --- head/usr.bin/calendar/calendars/calendar.freebsdTue Aug 18 12:26:38 2015(r286884) +++ head/usr.bin/calendar/calendars/calendar.freebsdTue Aug 18 12:27:21 2015(r286885) @@ -259,6 +259,7 @@ 08/06 Damjan Marion born in Rijeka, Croatia, 1978 08/07 Jonathan Mini born in San Mateo, California, United States, 1979 08/08 Mikolaj Golub born in Kharkov, USSR, 1977 +08/09 Stefan Farfeleder died in Wien, Austria, 2015 08/10 Julio Merino born in Barcelona, Spain, 1984 08/10 Peter Pentchev born in Sofia, Bulgaria, 1977 08/12 Joe Marcus Clarke born in Lakeland, Florida, United States, 1976 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r286886 - head/sys/dev/sound/midi
Author: avatar Date: Tue Aug 18 12:50:46 2015 New Revision: 286886 URL: https://svnweb.freebsd.org/changeset/base/286886 Log: Fixing typo as well as improving readability of a few comments. MFC after:3 days Modified: head/sys/dev/sound/midi/midi.c Modified: head/sys/dev/sound/midi/midi.c == --- head/sys/dev/sound/midi/midi.c Tue Aug 18 12:27:21 2015 (r286885) +++ head/sys/dev/sound/midi/midi.c Tue Aug 18 12:50:46 2015 (r286886) @@ -86,7 +86,7 @@ enum midi_states { }; /* - * The MPU interface current has init() uninit() inqsize(( outqsize() + * The MPU interface current has init() uninit() inqsize() outqsize() * callback() : fiddle with the tx|rx status. */ @@ -160,10 +160,15 @@ DEFINE_CLASS(midisynth, midisynth_method /* * Module Exports & Interface * - * struct midi_chan *midi_init(MPU_CLASS cls, int unit, int chan) int - * midi_uninit(struct snd_midi *) 0 == no error EBUSY or other error int - * Midi_in(struct midi_chan *, char *buf, int count) int Midi_out(struct - * midi_chan *, char *buf, int count) + * struct midi_chan *midi_init(MPU_CLASS cls, int unit, int chan, + * void *cookie) + * int midi_uninit(struct snd_midi *) + * + * 0 == no error + * EBUSY or other error + * + * int midi_in(struct snd_midi *, char *buf, int count) + * int midi_out(struct snd_midi *, char *buf, int count) * * midi_{in,out} return actual size transfered * @@ -388,7 +393,7 @@ err0: mtx_unlock(&midistat_lock); /* * midi_uninit does not call MIDI_UNINIT, as since this is the implementors - * entry point. midi_unint if fact, does not send any methods. A call to + * entry point. midi_uninit if fact, does not send any methods. A call to * midi_uninit is a defacto promise that you won't manipulate ch anymore * */ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r286887 - head/sys/dev/sound/midi
Author: avatar Date: Tue Aug 18 13:16:06 2015 New Revision: 286887 URL: https://svnweb.freebsd.org/changeset/base/286887 Log: Using the error return code documented in the comment. Though there is no direct midi_uninit() caller amongst existing drivers at this moment, a quick experiment indicates that EBUSY gives users more precise error message once drivers start to honour this result. For example, emu_midi_detach() should check the result of mpu401_uninit() and block module unloading if there is any MIDI I/O in progress. MFC after:2 weeks Modified: head/sys/dev/sound/midi/midi.c Modified: head/sys/dev/sound/midi/midi.c == --- head/sys/dev/sound/midi/midi.c Tue Aug 18 12:50:46 2015 (r286886) +++ head/sys/dev/sound/midi/midi.c Tue Aug 18 13:16:06 2015 (r286887) @@ -403,7 +403,7 @@ midi_uninit(struct snd_midi *m) { int err; - err = ENXIO; + err = EBUSY; mtx_lock(&midistat_lock); mtx_lock(&m->lock); if (m->busy) { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r286880 - head/sys/kern
Hi Hans, On 18/08/15 12:59, Hans Petter Selasky wrote: > On 08/18/15 12:15, Julien Charbon wrote: >> Author: jch >> Date: Tue Aug 18 10:15:09 2015 >> New Revision: 286880 >> URL: https://svnweb.freebsd.org/changeset/base/286880 >> >> Log: >>callout_stop() should return 0 (fail) when the callout is currently >>being serviced and indeed unstoppable. >>[...] > > Should this be MFC'ed to 10? Good question. I did not find any code paths that relies on the issue to happen, thus it looks "MFC-able" to 10. I would say "MFC: After two weeks" if nobody disagrees. -- Julien signature.asc Description: OpenPGP digital signature
svn commit: r286888 - head/sys/gnu/fs/reiserfs
Author: avatar Date: Tue Aug 18 13:16:23 2015 New Revision: 286888 URL: https://svnweb.freebsd.org/changeset/base/286888 Log: Using consistent coding style to deal with error inside the loop. MFC after:1 week Modified: head/sys/gnu/fs/reiserfs/reiserfs_vfsops.c Modified: head/sys/gnu/fs/reiserfs/reiserfs_vfsops.c == --- head/sys/gnu/fs/reiserfs/reiserfs_vfsops.c Tue Aug 18 13:16:06 2015 (r286887) +++ head/sys/gnu/fs/reiserfs/reiserfs_vfsops.c Tue Aug 18 13:16:23 2015 (r286888) @@ -960,8 +960,8 @@ uint32_t find_hash_out(struct reiserfs_m key.on_disk_key.k_objectid, key.on_disk_key.k_dir_id); retval = search_by_entry_key(sbi, &key, &path, &de); if (retval == IO_ERROR) { - pathrelse(&path); - return (UNSET_HASH); + hash = UNSET_HASH; + break; } if (retval == NAME_NOT_FOUND) de.de_entry_num--; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r286890 - head/sys/dev/ichwd
Author: fabient Date: Tue Aug 18 14:54:29 2015 New Revision: 286890 URL: https://svnweb.freebsd.org/changeset/base/286890 Log: Add ichwd TCO version 3 support (Bay Trail / Rangeley...) Reviewed by: jhb Obtained from: Cas-well Sponsored by: Stormshield Modified: head/sys/dev/ichwd/ichwd.c head/sys/dev/ichwd/ichwd.h Modified: head/sys/dev/ichwd/ichwd.c == --- head/sys/dev/ichwd/ichwd.c Tue Aug 18 14:10:04 2015(r286889) +++ head/sys/dev/ichwd/ichwd.c Tue Aug 18 14:54:29 2015(r286890) @@ -53,6 +53,7 @@ * (document no. 252516-001) sections 9.10 and 9.11. * * ICH6/7/8 support by Takeharu KATO + * SoC PMC support by Denir Li */ #include @@ -74,161 +75,216 @@ __FBSDID("$FreeBSD$"); #include static struct ichwd_device ichwd_devices[] = { - { DEVICEID_82801AA, "Intel 82801AA watchdog timer",1 }, - { DEVICEID_82801AB, "Intel 82801AB watchdog timer",1 }, - { DEVICEID_82801BA, "Intel 82801BA watchdog timer",2 }, - { DEVICEID_82801BAM, "Intel 82801BAM watchdog timer", 2 }, - { DEVICEID_82801CA, "Intel 82801CA watchdog timer",3 }, - { DEVICEID_82801CAM, "Intel 82801CAM watchdog timer", 3 }, - { DEVICEID_82801DB, "Intel 82801DB watchdog timer",4 }, - { DEVICEID_82801DBM, "Intel 82801DBM watchdog timer", 4 }, - { DEVICEID_82801E, "Intel 82801E watchdog timer", 5 }, - { DEVICEID_82801EB, "Intel 82801EB watchdog timer",5 }, - { DEVICEID_82801EBR, "Intel 82801EB/ER watchdog timer", 5 }, - { DEVICEID_6300ESB, "Intel 6300ESB watchdog timer",5 }, - { DEVICEID_82801FBR, "Intel 82801FB/FR watchdog timer", 6 }, - { DEVICEID_ICH6M,"Intel ICH6M watchdog timer", 6 }, - { DEVICEID_ICH6W,"Intel ICH6W watchdog timer", 6 }, - { DEVICEID_ICH7, "Intel ICH7 watchdog timer", 7 }, - { DEVICEID_ICH7DH, "Intel ICH7DH watchdog timer", 7 }, - { DEVICEID_ICH7M,"Intel ICH7M watchdog timer", 7 }, - { DEVICEID_ICH7MDH, "Intel ICH7MDH watchdog timer",7 }, - { DEVICEID_NM10, "Intel NM10 watchdog timer", 7 }, - { DEVICEID_ICH8, "Intel ICH8 watchdog timer", 8 }, - { DEVICEID_ICH8DH, "Intel ICH8DH watchdog timer", 8 }, - { DEVICEID_ICH8DO, "Intel ICH8DO watchdog timer", 8 }, - { DEVICEID_ICH8M,"Intel ICH8M watchdog timer", 8 }, - { DEVICEID_ICH8ME, "Intel ICH8M-E watchdog timer",8 }, - { DEVICEID_63XXESB, "Intel 63XXESB watchdog timer",8 }, - { DEVICEID_ICH9, "Intel ICH9 watchdog timer", 9 }, - { DEVICEID_ICH9DH, "Intel ICH9DH watchdog timer", 9 }, - { DEVICEID_ICH9DO, "Intel ICH9DO watchdog timer", 9 }, - { DEVICEID_ICH9M,"Intel ICH9M watchdog timer", 9 }, - { DEVICEID_ICH9ME, "Intel ICH9M-E watchdog timer",9 }, - { DEVICEID_ICH9R,"Intel ICH9R watchdog timer", 9 }, - { DEVICEID_ICH10,"Intel ICH10 watchdog timer", 10 }, - { DEVICEID_ICH10D, "Intel ICH10D watchdog timer", 10 }, - { DEVICEID_ICH10DO, "Intel ICH10DO watchdog timer",10 }, - { DEVICEID_ICH10R, "Intel ICH10R watchdog timer", 10 }, - { DEVICEID_PCH, "Intel PCH watchdog timer",10 }, - { DEVICEID_PCHM, "Intel PCH watchdog timer",10 }, - { DEVICEID_P55, "Intel P55 watchdog timer",10 }, - { DEVICEID_PM55, "Intel PM55 watchdog timer", 10 }, - { DEVICEID_H55, "Intel H55 watchdog timer",10 }, - { DEVICEID_QM57, "Intel QM57 watchdog timer", 10 }, - { DEVICEID_H57, "Intel H57 watchdog timer",10 }, - { DEVICEID_HM55, "Intel HM55 watchdog timer", 10 }, - { DEVICEID_Q57, "Intel Q57 watchdog timer",10 }, - { DEVICEID_HM57, "Intel HM57 watchdog timer", 10 }, - { DEVICEID_PCHMSFF, "Intel PCHMSFF watchdog timer",10 }, - { DEVICEID_QS57, "Intel QS57 watchdog timer", 10 }, - { DEVICEID_3400, "Intel 3400 watchdog timer", 10 }, - { DEVICEID_3420, "Intel 3420 watchdog timer", 10 }, - { DEVICEID_3450, "Intel 3450 watchdog timer", 10 }, - { DEVICEID_CPT0, "Intel Cougar Point watchdog timer", 10 }, - { DEVICEID_CPT1, "Intel Cougar Point watchdog timer", 10 }, - { DEVICEID_CPT2, "Intel Cougar Point watchdog timer", 10 }, - { DEVICEID_CPT3, "Intel Cougar Point watchdog timer", 10 }, - { DEVICEID_CPT4, "Intel Cougar Point watchdog timer", 10 }, - { DEVICEID_CPT5, "Intel Cougar Point watchdog timer", 10 }, - { DEVICEID_CPT6, "Intel Cougar Point watchdog timer", 10 }, - { DEVICEID_CPT7, "Intel Cougar Po
svn commit: r286891 - head/usr.bin/calendar/calendars
Author: pfg Date: Tue Aug 18 15:11:41 2015 New Revision: 286891 URL: https://svnweb.freebsd.org/changeset/base/286891 Log: Calendar: add a few more dates to the Christian calendar The many christian denominations have different dates for their celebrations and controversies are likely to be always. These are well established and happen to be holidays in many Catholic countries. MFC after:1 month Modified: head/usr.bin/calendar/calendars/calendar.christian Modified: head/usr.bin/calendar/calendars/calendar.christian == --- head/usr.bin/calendar/calendars/calendar.christian Tue Aug 18 14:54:29 2015(r286890) +++ head/usr.bin/calendar/calendars/calendar.christian Tue Aug 18 15:11:41 2015(r286891) @@ -5,8 +5,9 @@ */ #ifndef _calendar_christian_ -#define _calendar_christian_ +#define_calendar_christian_ +01/01 Solemnity of Mary, Mother of God 01/05 Last (twelfth) day of Christmastide 01/06 Epiphany Easter-47 Shrove Tuesday / Mardi Gras (day before Ash Wednesday) @@ -21,10 +22,13 @@ Easter+50 Whitmonday Easter+56 Trinity Sunday (7 days after Pentecost) Easter+60 Corpus Christi (11 days after Pentecost) 05/28* Rogation Sunday +08/15 Assumption of the Blessed Virgin Mary +09/01 All Saints' Day 10/18 Feast Day of St. Luke 11/SunLast First Sunday of Advent (4th Sunday before Christmas) 12/SunFirstFirst Sunday of Advent (4th Sunday before Christmas) 12/06 St. Nicholas' Day +12/08 Feast of the Immaculate Conception 12/24 Christmas Eve 12/25 Christmastide begins: First day of Christmas 12/26 Second day of Christmas (Boxing Day) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r286892 - head/usr.sbin/ypserv
Author: asomers Date: Tue Aug 18 15:33:23 2015 New Revision: 286892 URL: https://svnweb.freebsd.org/changeset/base/286892 Log: Serve /etc/eui64 via NIS. The C library already knows how to lookup eui64 entries from NIS. For example, fwcontrol(8) does it. But /var/yp/Makefile.dist doesn't build the eui64 maps, and ypinit(8) doesn't push them to slaves. This change fixes that. Reviewed by: brooks, wblock MFC after:2 weeks Sponsored by: SpectraLogic Corp Differential Revision:https://reviews.freebsd.org/D3404 Modified: head/usr.sbin/ypserv/Makefile.yp head/usr.sbin/ypserv/ypinit.8 head/usr.sbin/ypserv/ypinit.sh Modified: head/usr.sbin/ypserv/Makefile.yp == --- head/usr.sbin/ypserv/Makefile.ypTue Aug 18 15:11:41 2015 (r286891) +++ head/usr.sbin/ypserv/Makefile.ypTue Aug 18 15:33:23 2015 (r286892) @@ -103,6 +103,7 @@ YPMAPDIR = $(YPDIR)/$(DOMAIN) # passwd file will be generated from the master.passwd file automagically. # ETHERS= $(YPSRCDIR)/ethers# ethernet addresses (for rarpd) +EUI64 = $(YPSRCDIR)/eui64 # eui64 addresses (for firewire) BOOTPARAMS= $(YPSRCDIR)/bootparams # for booting Sun boxes (bootparamd) HOSTS = $(YPSRCDIR)/hosts IPNODES = $(YPDIR)/ipnodes @@ -143,8 +144,8 @@ TARGETS= servers hosts networks protocol #TARGETS+= aliases # Sanity checks: filter out targets we can't build -# Note that we don't build the ethers or boorparams maps by default -# since /etc/ethers and /etc/bootparams are not likely to be present +# Note that we don't build the ethers, eui64, or boorparams maps by default +# since /etc/ethers, /etc/eui64 and /etc/bootparams are not likely to be present # on all systems. .if exists($(ETHERS)) TARGETS+= ethers @@ -152,6 +153,12 @@ TARGETS+= ethers ETHERS= /dev/null .endif +.if exists($(EUI64)) +TARGETS+= eui64 +.else +EUI64= /dev/null +.endif + .if exists($(BOOTPARAMS)) TARGETS+= bootparams .else @@ -195,6 +202,7 @@ IPNODES= /dev/null all: $(TARGETS) ethers: ethers.byname ethers.byaddr +eui64:eui64.byname eui64.byid bootparam: bootparams hosts:hosts.byname hosts.byaddr ipnodes: ipnodes.byname ipnodes.byaddr @@ -294,6 +302,32 @@ ethers.byaddr: $(ETHERS) @if [ ! $(NOPUSH) ]; then echo "Pushed $@ map." ; fi .endif +eui64.byname: $(EUI64) + @echo "Updating $@..." +.if ${EUI64} == "/dev/null" + @echo "EUI64 source file not found -- skipping" +.else + @$(AWK) '{ if ($$1 != "" && $$1 !~ "^#.*" && $$1 != "+") \ + print $$2"\t"$$0 }' $(EUI64) | $(DBLOAD) -i $(EUI64) \ + -o $(YPMAPDIR)/$@ - $(TMP); $(RMV) $(TMP) $@ + @$(DBLOAD) -c + @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOMAIN) $@; fi + @if [ ! $(NOPUSH) ]; then echo "Pushed $@ map." ; fi +.endif + +eui64.byid: $(EUI64) + @echo "Updating $@..." +.if ${EUI64} == "/dev/null" + @echo "EUI64 source file not found -- skipping" +.else + @$(AWK) '{ if ($$1 != "" && $$1 !~ "^#.*" && $$1 != "+") \ + print $$1"\t"$$0 }' $(EUI64) | $(DBLOAD) -i $(EUI64) \ + -o $(YPMAPDIR)/$@ - $(TMP); $(RMV) $(TMP) $@ + @$(DBLOAD) -c + @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOMAIN) $@; fi + @if [ ! $(NOPUSH) ]; then echo "Pushed $@ map." ; fi +.endif + bootparams: $(BOOTPARAMS) @echo "Updating $@..." Modified: head/usr.sbin/ypserv/ypinit.8 == --- head/usr.sbin/ypserv/ypinit.8 Tue Aug 18 15:11:41 2015 (r286891) +++ head/usr.sbin/ypserv/ypinit.8 Tue Aug 18 15:33:23 2015 (r286892) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 10, 1997 +.Dd August 18, 2015 .Dt YPINIT 8 .Os .Sh NAME @@ -147,6 +147,8 @@ can propagate updates on the master to a Bootparams source file .It Pa /etc/ethers Ethers data source file +.It Pa /etc/eui64 +EUI64 data source file .It Pa /etc/group Group source file .It Pa /etc/hosts Modified: head/usr.sbin/ypserv/ypinit.sh == --- head/usr.sbin/ypserv/ypinit.sh Tue Aug 18 15:11:41 2015 (r286891) +++ head/usr.sbin/ypserv/ypinit.sh Tue Aug 18 15:33:23 2015 (r286892) @@ -14,8 +14,9 @@ MAPLIST="master.passwd.byname master.pas group.byname group.bygid hosts.byname hosts.byaddr services.byname \ rpc.byname rpc.bynumber networks.byname networks.byaddr netgroup \ netgroup.byuser netgroup.byhost netid.byname publickey.byname \ -bootparams ethers.byname ethers.byaddr amd.host mail.aliases \ -ypservers protocols.byname protocols.bynumber netmasks.byaddr" +bootparams ethers.byname ethers.byaddr eui64.byname eui64.byid \ +amd.host mail.aliases ypservers protocols.byname protocols.bynumber \ +netmasks.byaddr" ERROR_
svn commit: r286893 - head/usr.bin/calendar/calendars
Author: pfg Date: Tue Aug 18 15:50:02 2015 New Revision: 286893 URL: https://svnweb.freebsd.org/changeset/base/286893 Log: Correct All Saints' day. Thanks to:zec X-MFC with: r286891 Modified: head/usr.bin/calendar/calendars/calendar.christian Modified: head/usr.bin/calendar/calendars/calendar.christian == --- head/usr.bin/calendar/calendars/calendar.christian Tue Aug 18 15:33:23 2015(r286892) +++ head/usr.bin/calendar/calendars/calendar.christian Tue Aug 18 15:50:02 2015(r286893) @@ -23,8 +23,8 @@ Easter+56 Trinity Sunday (7 days after P Easter+60 Corpus Christi (11 days after Pentecost) 05/28* Rogation Sunday 08/15 Assumption of the Blessed Virgin Mary -09/01 All Saints' Day 10/18 Feast Day of St. Luke +11/01 All Saints' Day 11/SunLast First Sunday of Advent (4th Sunday before Christmas) 12/SunFirstFirst Sunday of Advent (4th Sunday before Christmas) 12/06 St. Nicholas' Day ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r286894 - head/sys/rpc
Author: delphij Date: Tue Aug 18 18:12:46 2015 New Revision: 286894 URL: https://svnweb.freebsd.org/changeset/base/286894 Log: Set curvnet context inside the RPC code in more places. Reviewed by: melifaro MFC after:2 weeks Differential Revision: https://reviews.freebsd.org/D3398 Modified: head/sys/rpc/rpc_generic.c head/sys/rpc/svc_vc.c Modified: head/sys/rpc/rpc_generic.c == --- head/sys/rpc/rpc_generic.c Tue Aug 18 15:50:02 2015(r286893) +++ head/sys/rpc/rpc_generic.c Tue Aug 18 18:12:46 2015(r286894) @@ -703,7 +703,9 @@ __rpc_sockisbound(struct socket *so) struct sockaddr *sa; int error, bound; + CURVNET_SET(so->so_vnet); error = so->so_proto->pr_usrreqs->pru_sockaddr(so, &sa); + CURVNET_RESTORE(); if (error) return (0); @@ -791,7 +793,9 @@ bindresvport(struct socket *so, struct s socklen_t salen; if (sa == NULL) { + CURVNET_SET(so->so_vnet); error = so->so_proto->pr_usrreqs->pru_sockaddr(so, &sa); + CURVNET_RESTORE(); if (error) return (error); freesa = TRUE; Modified: head/sys/rpc/svc_vc.c == --- head/sys/rpc/svc_vc.c Tue Aug 18 15:50:02 2015(r286893) +++ head/sys/rpc/svc_vc.c Tue Aug 18 18:12:46 2015(r286894) @@ -150,7 +150,9 @@ svc_vc_create(SVCPOOL *pool, struct sock SOCK_LOCK(so); if (so->so_state & (SS_ISCONNECTED|SS_ISDISCONNECTED)) { SOCK_UNLOCK(so); + CURVNET_SET(so->so_vnet); error = so->so_proto->pr_usrreqs->pru_peeraddr(so, &sa); + CURVNET_RESTORE(); if (error) return (NULL); xprt = svc_vc_create_conn(pool, so, sa); @@ -167,7 +169,9 @@ svc_vc_create(SVCPOOL *pool, struct sock xprt->xp_p2 = NULL; xprt->xp_ops = &svc_vc_rendezvous_ops; + CURVNET_SET(so->so_vnet); error = so->so_proto->pr_usrreqs->pru_sockaddr(so, &sa); + CURVNET_RESTORE(); if (error) { goto cleanup_svc_vc_create; } @@ -249,7 +253,9 @@ svc_vc_create_conn(SVCPOOL *pool, struct memcpy(&xprt->xp_rtaddr, raddr, raddr->sa_len); + CURVNET_SET(so->so_vnet); error = so->so_proto->pr_usrreqs->pru_sockaddr(so, &sa); + CURVNET_RESTORE(); if (error) goto cleanup_svc_vc_create; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r286899 - head/contrib/expat/lib
Author: delphij Date: Tue Aug 18 19:30:04 2015 New Revision: 286899 URL: https://svnweb.freebsd.org/changeset/base/286899 Log: Fix multiple integer overflows in expat. Security: CVE-2015-1283 Security: FreeBSD-SA-15:20.expat Modified: head/contrib/expat/lib/xmlparse.c Modified: head/contrib/expat/lib/xmlparse.c == --- head/contrib/expat/lib/xmlparse.c Tue Aug 18 19:15:20 2015 (r286898) +++ head/contrib/expat/lib/xmlparse.c Tue Aug 18 19:30:04 2015 (r286899) @@ -1678,6 +1678,12 @@ XML_ParseBuffer(XML_Parser parser, int l void * XMLCALL XML_GetBuffer(XML_Parser parser, int len) { +/* BEGIN MOZILLA CHANGE (sanity check len) */ + if (len < 0) { +errorCode = XML_ERROR_NO_MEMORY; +return NULL; + } +/* END MOZILLA CHANGE */ switch (ps_parsing) { case XML_SUSPENDED: errorCode = XML_ERROR_SUSPENDED; @@ -1689,8 +1695,13 @@ XML_GetBuffer(XML_Parser parser, int len } if (len > bufferLim - bufferEnd) { -/* FIXME avoid integer overflow */ int neededSize = len + (int)(bufferEnd - bufferPtr); +/* BEGIN MOZILLA CHANGE (sanity check neededSize) */ +if (neededSize < 0) { + errorCode = XML_ERROR_NO_MEMORY; + return NULL; +} +/* END MOZILLA CHANGE */ #ifdef XML_CONTEXT_BYTES int keep = (int)(bufferPtr - buffer); @@ -1719,7 +1730,15 @@ XML_GetBuffer(XML_Parser parser, int len bufferSize = INIT_BUFFER_SIZE; do { bufferSize *= 2; - } while (bufferSize < neededSize); +/* BEGIN MOZILLA CHANGE (prevent infinite loop on overflow) */ + } while (bufferSize < neededSize && bufferSize > 0); +/* END MOZILLA CHANGE */ +/* BEGIN MOZILLA CHANGE (sanity check bufferSize) */ + if (bufferSize <= 0) { +errorCode = XML_ERROR_NO_MEMORY; +return NULL; + } +/* END MOZILLA CHANGE */ newBuf = (char *)MALLOC(bufferSize); if (newBuf == 0) { errorCode = XML_ERROR_NO_MEMORY; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r286866 - in head: contrib/jemalloc contrib/jemalloc/doc contrib/jemalloc/include/jemalloc contrib/jemalloc/include/jemalloc/internal contrib/jemalloc/src include lib/libc/gen lib/libc
Jason Evans writes: >>> Index: include/malloc_np.h [...] >>> +typedef void *(chunk_alloc_t)(void *, size_t, size_t, bool *, bool *, >>> unsigned); >>> +typedef bool (chunk_dalloc_t)(void *, size_t, bool, unsigned); malloc_np.h changes regressing consumers isn't surprising given the lack of tests for jemalloc shipped with FreeBSD. $ cc -include malloc_np.h -c -xc -:311: In file included from :1: /usr/include/malloc_np.h:39:55: error: unknown type name 'bool' typedef void *(chunk_alloc_t)(void *, size_t, size_t, bool *, bool *, unsigned); ^ /usr/include/malloc_np.h:39:63: error: unknown type name 'bool' typedef void *(chunk_alloc_t)(void *, size_t, size_t, bool *, bool *, unsigned); ^ [...] >>> + - Remove the --enable-dss options, and make dss non-optional on all >>> platforms >>> +which support sbrk(2). FREEBSD-upgrade still references it. >>> Modified: head/contrib/jemalloc/doc/jemalloc.3 [...] >>> @@ -53,8 +51,7 @@ make variable)\&. >>> .sp >>> .ft B >>> .nf >>> -#include >>> -#include >>> +#include Bad rebase. >>> + - Add sdallocx(), which implements sized deallocation. The primary >>> +optimization over dallocx() is the removal of a metadata read, which >>> often >>> +suffers an L1 cache miss. >> [...] >>> + - Remove the *allocm() API, which is superseded by the *allocx() API. >> >> Symbol.map and manpages haven't been updated. >> [...] > > Committed; thanks! Stale links have to be removed as well. Index: contrib/jemalloc/FREEBSD-diffs === --- contrib/jemalloc/FREEBSD-diffs (revision 286894) +++ contrib/jemalloc/FREEBSD-diffs (working copy) @@ -20,7 +20,14 @@ diff --git a/doc/jemalloc.xml.in b/doc/jemalloc.xm SYNOPSIS -@@ -2759,4 +2770,18 @@ malloc_conf = "lg_chunk:24";]]> + +- #include <jemalloc/jemalloc.h> ++ #include <stdlib.h> ++#include <malloc_np.h> + + Standard API + +@@ -2759,4 +2771,18 @@ malloc_conf = "lg_chunk:24";]]> The posix_memalign function conforms to IEEE Std 1003.1-2001 (“POSIX.1”). Index: contrib/jemalloc/FREEBSD-upgrade === --- contrib/jemalloc/FREEBSD-upgrade(revision 286894) +++ contrib/jemalloc/FREEBSD-upgrade(working copy) @@ -72,7 +72,7 @@ do_extract() { patch -p1 < "${src}/FREEBSD-diffs" find . -name '*.orig' -delete # Generate various files. -./autogen.sh --enable-cc-silence --enable-dss --enable-xmalloc \ +./autogen.sh --enable-cc-silence --enable-xmalloc \ --enable-utrace --with-xslroot=/usr/local/share/xsl/docbook \ --with-private-namespace=__ --with-lg-page-sizes=12,13,14,16 gmake dist Index: contrib/jemalloc/doc/jemalloc.3 === --- contrib/jemalloc/doc/jemalloc.3 (revision 286894) +++ contrib/jemalloc/doc/jemalloc.3 (working copy) @@ -51,7 +51,8 @@ make variable)\&. .sp .ft B .nf -#include +#include +#include .fi .ft .SS "Standard API" Index: include/malloc_np.h === --- include/malloc_np.h (revision 286893) +++ include/malloc_np.h (working copy) @@ -33,6 +33,7 @@ #define _MALLOC_NP_H_ #include #include +#include #include __BEGIN_DECLS Index: ObsoleteFiles.inc === --- ObsoleteFiles.inc (revision 286893) +++ ObsoleteFiles.inc (working copy) @@ -38,6 +38,12 @@ # xargs -n1 | sort | uniq -d; # done +# 20150818: *allocm() are gone in jemalloc 4.0.0 +OLD_FILES+=usr/share/man/man3/allocm.3.gz +OLD_FILES+=usr/share/man/man3/dallocm.3.gz +OLD_FILES+=usr/share/man/man3/nallocm.3.gz +OLD_FILES+=usr/share/man/man3/rallocm.3.gz +OLD_FILES+=usr/share/man/man3/sallocm.3.gz # 20150802: Remove netbsd's test on pw(8) OLD_FILES+=usr/tests/usr.sbin/pw/pw_test # 20150719: Remove libarchive.pc signature.asc Description: PGP signature
svn commit: r286903 - head/lib/libc/gen
Author: jilles Date: Tue Aug 18 20:13:36 2015 New Revision: 286903 URL: https://svnweb.freebsd.org/changeset/base/286903 Log: wordexp(3): Update man page for no longer using the wordexp builtin. Modified: head/lib/libc/gen/wordexp.3 Modified: head/lib/libc/gen/wordexp.3 == --- head/lib/libc/gen/wordexp.3 Tue Aug 18 19:30:35 2015(r286902) +++ head/lib/libc/gen/wordexp.3 Tue Aug 18 20:13:36 2015(r286903) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 07, 2015 +.Dd August 18, 2015 .Dt WORDEXP 3 .Os .Sh NAME @@ -108,9 +108,8 @@ function frees the memory allocated by .Sh IMPLEMENTATION NOTES The .Fn wordexp -function is implemented as a wrapper around the undocumented -.Ic wordexp -shell built-in command. +function is implemented by executing +.Xr sh 1 . .Sh RETURN VALUES The .Fn wordexp ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r286904 - head/tools/tools/sysbuild
Author: phk Date: Tue Aug 18 20:19:48 2015 New Revision: 286904 URL: https://svnweb.freebsd.org/changeset/base/286904 Log: Update sysbuild to new ports infrastructure. Modified: head/tools/tools/sysbuild/sysbuild.sh Modified: head/tools/tools/sysbuild/sysbuild.sh == --- head/tools/tools/sysbuild/sysbuild.sh Tue Aug 18 20:13:36 2015 (r286903) +++ head/tools/tools/sysbuild/sysbuild.sh Tue Aug 18 20:19:48 2015 (r286904) @@ -80,6 +80,8 @@ fi # serial console ? SERCONS=false +PKG_DIR=/usr/ports/packages/All + # Remotely mounted distfiles # REMOTEDISTFILES=fs:/rdonly/distfiles @@ -174,6 +176,7 @@ log_it() ( ports_recurse() ( + cd /usr/ports t=$1 shift if [ "x$t" = "x." ] ; then @@ -191,6 +194,7 @@ ports_recurse() ( echo "Missing port $d" 1>&2 continue fi + d=`cd /usr/ports && cd $d && /bin/pwd` if [ ! -f $d/Makefile ] ; then echo "Missing port $d" 1>&2 continue @@ -205,7 +209,16 @@ ports_recurse() ( else ( cd $d - ports_recurse $d `make -V _DEPEND_DIRS ${PORTS_OPTS}` + l="" + for a in `make -V _UNIFIED_DEPENDS ${PORTS_OPTS}` + do + x=`expr "$a" : '.*:\(.*\)'` + l="${l} ${x}" + done + ports_recurse $d $l + # -> _UNIFIED_DEPENDS + #ports_recurse $d `make -V _DEPEND_DIRS ${PORTS_OPTS}` + #ports_recurse $d `make all-depends-list` ) echo "$d" >> /tmp/_.plist fi @@ -223,11 +236,12 @@ ports_build() ( mkdir -p ${PKG_DIR} fi + pd=`cd /usr/ports && /bin/pwd` # Now build & install them for p in `cat /tmp/_.plist` do b=`echo $p | tr / _` - t=`echo $p | sed 's,/usr/ports/,,'` + t=`echo $p | sed "s,${pd},,"` pn=`cd $p && make package-name` if [ "x`basename $p`" == "xpkg" ] ; then @@ -471,10 +485,13 @@ fi for i in ${PORTS_WE_WANT} do + ( + cd /usr/ports if [ ! -d $i ] ; then echo "Port $i not found" 1>&2 exit 2 fi + ) done export PORTS_WE_WANT ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r286907 - in head/contrib/jemalloc: . include/jemalloc
Author: jasone Date: Tue Aug 18 20:42:08 2015 New Revision: 286907 URL: https://svnweb.freebsd.org/changeset/base/286907 Log: Define CPU_SPINWAIT as cpu_spinwait(). Submitted by: cem Modified: head/contrib/jemalloc/FREEBSD-diffs head/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h Modified: head/contrib/jemalloc/FREEBSD-diffs == --- head/contrib/jemalloc/FREEBSD-diffs Tue Aug 18 20:27:03 2015 (r286906) +++ head/contrib/jemalloc/FREEBSD-diffs Tue Aug 18 20:42:08 2015 (r286907) @@ -117,10 +117,10 @@ index dbf6aa7..f87dba8 100644 jemalloc_postfork_child diff --git a/include/jemalloc/jemalloc_FreeBSD.h b/include/jemalloc/jemalloc_FreeBSD.h new file mode 100644 -index 000..c5113b9 +index 000..737542e --- /dev/null +++ b/include/jemalloc/jemalloc_FreeBSD.h -@@ -0,0 +1,144 @@ +@@ -0,0 +1,142 @@ +/* + * Override settings that were generated in jemalloc_defs.h as necessary. + */ @@ -135,7 +135,6 @@ index 000..c5113b9 + * The following are architecture-dependent, so conditionally define them for + * each supported architecture. + */ -+#undef CPU_SPINWAIT +#undef JEMALLOC_TLS_MODEL +#undef STATIC_PAGE_SHIFT +#undef LG_SIZEOF_PTR @@ -145,7 +144,6 @@ index 000..c5113b9 + +#ifdef __i386__ +# define LG_SIZEOF_PTR 2 -+# define CPU_SPINWAIT__asm__ volatile("pause") +# define JEMALLOC_TLS_MODEL __attribute__((tls_model("initial-exec"))) +#endif +#ifdef __ia64__ @@ -157,7 +155,6 @@ index 000..c5113b9 +#endif +#ifdef __amd64__ +# define LG_SIZEOF_PTR 3 -+# define CPU_SPINWAIT__asm__ volatile("pause") +# define JEMALLOC_TLS_MODEL __attribute__((tls_model("initial-exec"))) +#endif +#ifdef __arm__ @@ -183,15 +180,16 @@ index 000..c5113b9 +# define JEMALLOC_TLS_MODEL /* Default. */ +#endif + -+#ifndef CPU_SPINWAIT -+# define CPU_SPINWAIT do {} while (0) -+#endif -+ +#define STATIC_PAGE_SHIFT PAGE_SHIFT +#define LG_SIZEOF_INT 2 +#define LG_SIZEOF_LONG LG_SIZEOF_PTR +#define LG_SIZEOF_INTMAX_T 3 + ++#undef CPU_SPINWAIT ++#include ++#include ++#define CPU_SPINWAITcpu_spinwait() ++ +/* Disable lazy-lock machinery, mangle isthreaded, and adjust its type. */ +#undef JEMALLOC_LAZY_LOCK +extern int __isthreaded; Modified: head/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h == --- head/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h Tue Aug 18 20:27:03 2015(r286906) +++ head/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h Tue Aug 18 20:42:08 2015(r286907) @@ -12,7 +12,6 @@ * The following are architecture-dependent, so conditionally define them for * each supported architecture. */ -#undef CPU_SPINWAIT #undef JEMALLOC_TLS_MODEL #undef STATIC_PAGE_SHIFT #undef LG_SIZEOF_PTR @@ -22,7 +21,6 @@ #ifdef __i386__ # define LG_SIZEOF_PTR2 -# define CPU_SPINWAIT __asm__ volatile("pause") # define JEMALLOC_TLS_MODEL __attribute__((tls_model("initial-exec"))) #endif #ifdef __ia64__ @@ -34,7 +32,6 @@ #endif #ifdef __amd64__ # define LG_SIZEOF_PTR3 -# define CPU_SPINWAIT __asm__ volatile("pause") # define JEMALLOC_TLS_MODEL __attribute__((tls_model("initial-exec"))) #endif #ifdef __arm__ @@ -60,15 +57,16 @@ # define JEMALLOC_TLS_MODEL /* Default. */ #endif -#ifndef CPU_SPINWAIT -# define CPU_SPINWAIT do {} while (0) -#endif - #defineSTATIC_PAGE_SHIFT PAGE_SHIFT #defineLG_SIZEOF_INT 2 #defineLG_SIZEOF_LONG LG_SIZEOF_PTR #defineLG_SIZEOF_INTMAX_T 3 +#undef CPU_SPINWAIT +#include +#include +#defineCPU_SPINWAITcpu_spinwait() + /* Disable lazy-lock machinery, mangle isthreaded, and adjust its type. */ #undef JEMALLOC_LAZY_LOCK extern int __isthreaded; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r286908 - in head: share/man/man4 sys/conf sys/dev/rccgpio sys/modules/rccgpio
Author: loos Date: Tue Aug 18 21:05:56 2015 New Revision: 286908 URL: https://svnweb.freebsd.org/changeset/base/286908 Log: Add the GPIO driver for the ADI Engineering RCC-VE and RCC-DFF/DFFv2. This driver allows read the software reset switch state and control the status LEDs. The GPIO pins have their direction (input/output) locked down to prevent possible short circuits. Note that most people get a reset button that is a hardware reset. The software reset button is available on boards from Netgate. Sponsored by: Rubicon Communications (Netgate) Added: head/share/man/man4/rccgpio.4 (contents, props changed) head/sys/dev/rccgpio/ head/sys/dev/rccgpio/rccgpio.c (contents, props changed) head/sys/modules/rccgpio/ head/sys/modules/rccgpio/Makefile (contents, props changed) Modified: head/sys/conf/files Added: head/share/man/man4/rccgpio.4 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/rccgpio.4 Tue Aug 18 21:05:56 2015 (r286908) @@ -0,0 +1,63 @@ +.\" Copyright (c) 2015, Rubicon Communications, LLC (Netgate) +.\" 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 August 18, 2015 +.Dt RCCGPIO 4 +.Os +.Sh NAME +.Nm rccgpio +.Nd ADI Engineering RCC-VE and RCC-DFF/DFFv2 GPIO controller +.Sh SYNOPSIS +.Cd "device rccgpio" +.Cd "device gpio" +.Cd "device gpioled" +.Sh DESCRIPTION +The +.Nm +provides a simple interface to read the reset switch state and control the +status LEDs. +.Pp +The software controlled reset switch is known to be available on boards from +Netgate. +Most people get a button that is a hardware reset. +.Pp +All the GPIO pins are locked in their intended setup to disallow any harmful +settings (the ones that can cause short circuits). +.Sh SEE ALSO +.Xr gpio 3 , +.Xr gpio 4 , +.Xr gpioled 4 , +.Xr gpioctl 8 +.Sh HISTORY +The +.Nm +manual page first appeared in +.Fx 11.0 . +.Sh AUTHORS +The +.Nm +driver was written by +.An Luiz Otavio O Souza Aq Mt l...@freebsd.org . Modified: head/sys/conf/files == --- head/sys/conf/files Tue Aug 18 20:42:08 2015(r286907) +++ head/sys/conf/files Tue Aug 18 21:05:56 2015(r286908) @@ -2323,6 +2323,7 @@ dev/random/fortuna.c optional random !r dev/random/hash.c optional random random_yarrow | \ random !random_yarrow !random_loadable dev/rc/rc.coptional rc +dev/rccgpio/rccgpio.c optional rccgpio gpio dev/re/if_re.c optional re dev/rl/if_rl.c optional rl pci dev/rndtest/rndtest.c optional rndtest Added: head/sys/dev/rccgpio/rccgpio.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/rccgpio/rccgpio.c Tue Aug 18 21:05:56 2015 (r286908) @@ -0,0 +1,368 @@ +/*- + * Copyright (c) 2015 Rubicon Communications, LLC (Netgate) + * 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 pr
Re: svn commit: r286866 - in head: contrib/jemalloc contrib/jemalloc/doc contrib/jemalloc/include/jemalloc contrib/jemalloc/include/jemalloc/internal contrib/jemalloc/src include lib/libc/gen lib/libc
On Tue, Aug 18, 2015 at 09:49:44PM +0200, Jan Beich wrote: > Jason Evans writes: > >>> Index: include/malloc_np.h > [...] > >>> +typedef void *(chunk_alloc_t)(void *, size_t, size_t, bool *, bool *, > >>> unsigned); > >>> +typedef bool (chunk_dalloc_t)(void *, size_t, bool, unsigned); > malloc_np.h changes regressing consumers isn't surprising given the lack > of tests for jemalloc shipped with FreeBSD. > $ cc -include malloc_np.h -c -xc - In file included from :311: > In file included from :1: > /usr/include/malloc_np.h:39:55: error: unknown type name 'bool' > typedef void *(chunk_alloc_t)(void *, size_t, size_t, bool *, bool *, > unsigned); > ^ > /usr/include/malloc_np.h:39:63: error: unknown type name 'bool' > typedef void *(chunk_alloc_t)(void *, size_t, size_t, bool *, bool *, > unsigned); A #include will of course fix this, but by using 1, 0 and _Bool instead of true, false and bool you can make it work without adding namespace pollution. This might be useful if someone has bool defined or typedeffed to something else. Note that only the header files need to be uglified this way. > >>> + - Add sdallocx(), which implements sized deallocation. The primary > >>> +optimization over dallocx() is the removal of a metadata read, which > >>> often > >>> +suffers an L1 cache miss. > >> [...] > >>> + - Remove the *allocm() API, which is superseded by the *allocx() API. > >> Symbol.map and manpages haven't been updated. You can't really remove anything from Symbol.map files, since that breaks binary compatibility for applications that used the removed symbols. Such breakage usually crashes the application if and when it attempts to use a removed symbol. To avoid the breakage, wrappers invoking the new APIs should be provided; using some special symver directives, it is possible to prevent linking new applications against the obsolete symbols. A corollary is that experimental APIs should not be added to Symbol.map. It may be better for developers that want to use experimental APIs to build jemalloc themselves, or to use jemalloc from ports (although such a port doesn't seem to exist, currently). -- Jilles Tjoelker ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r286866 - in head: contrib/jemalloc contrib/jemalloc/doc contrib/jemalloc/include/jemalloc contrib/jemalloc/include/jemalloc/internal contrib/jemalloc/src include lib/libc/gen lib/libc
On Aug 18, 2015, at 2:17 PM, Jilles Tjoelker wrote: > On Tue, Aug 18, 2015 at 09:49:44PM +0200, Jan Beich wrote: >> Jason Evans writes: > Index: include/malloc_np.h >> [...] > +typedef void *(chunk_alloc_t)(void *, size_t, size_t, bool *, bool *, > unsigned); > +typedef bool (chunk_dalloc_t)(void *, size_t, bool, unsigned); > >> malloc_np.h changes regressing consumers isn't surprising given the lack >> of tests for jemalloc shipped with FreeBSD. > >> $ cc -include malloc_np.h -c -xc -> In file included from :311: >> In file included from :1: >> /usr/include/malloc_np.h:39:55: error: unknown type name 'bool' >> typedef void *(chunk_alloc_t)(void *, size_t, size_t, bool *, bool *, >> unsigned); >>^ >> /usr/include/malloc_np.h:39:63: error: unknown type name 'bool' >> typedef void *(chunk_alloc_t)(void *, size_t, size_t, bool *, bool *, >> unsigned); > > A #include will of course fix this, but by using 1, 0 and > _Bool instead of true, false and bool you can make it work without > adding namespace pollution. This might be useful if someone has bool > defined or typedeffed to something else. Note that only the header files > need to be uglified this way. Cool, I'll make that change to the patch I'm currently testing. > + - Remove the *allocm() API, which is superseded by the *allocx() API. Symbol.map and manpages haven't been updated. > > You can't really remove anything from Symbol.map files, since that > breaks binary compatibility for applications that used the removed > symbols. Such breakage usually crashes the application if and when it > attempts to use a removed symbol. To avoid the breakage, wrappers > invoking the new APIs should be provided; using some special symver > directives, it is possible to prevent linking new applications against > the obsolete symbols. *allocm() compatibility functions are in place, so I think this is correctly sorted out. Jan also pointed out missing entries for sdallocx() in a previous email, which I've already committed the fix for (r286872). > A corollary is that experimental APIs should not be added to Symbol.map. > It may be better for developers that want to use experimental APIs to > build jemalloc themselves, or to use jemalloc from ports (although such > a port doesn't seem to exist, currently). Yes, exposing *allocm() was a big mistake. :( Thanks, Jason ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r286909 - head/sys/dev/gpio
Author: loos Date: Tue Aug 18 21:37:14 2015 New Revision: 286909 URL: https://svnweb.freebsd.org/changeset/base/286909 Log: Fix the use of plural in two cases that I missed on r285784. This should cause no functional change. Modified: head/sys/dev/gpio/gpiobus.c Modified: head/sys/dev/gpio/gpiobus.c == --- head/sys/dev/gpio/gpiobus.c Tue Aug 18 21:05:56 2015(r286908) +++ head/sys/dev/gpio/gpiobus.c Tue Aug 18 21:37:14 2015(r286909) @@ -386,7 +386,10 @@ gpiobus_probe_nomatch(device_t dev, devi devi = GPIOBUS_IVAR(child); memset(pins, 0, sizeof(pins)); gpiobus_print_pins(devi, pins, sizeof(pins)); - device_printf(dev, " at pin(s) %s", pins); + if (devi->npins > 1) + device_printf(dev, " at pins %s", pins); + else + device_printf(dev, " at pin %s", pins); resource_list_print_type(&devi->rl, "irq", SYS_RES_IRQ, "%ld"); printf("\n"); } @@ -422,7 +425,10 @@ gpiobus_child_location_str(device_t bus, struct gpiobus_ivar *devi; devi = GPIOBUS_IVAR(child); - strlcpy(buf, "pin(s)=", buflen); + if (devi->npins > 1) + strlcpy(buf, "pins=", buflen); + else + strlcpy(buf, "pin=", buflen); gpiobus_print_pins(devi, buf, buflen); return (0); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r286910 - head/lib/libc/net
Author: delphij Date: Tue Aug 18 22:37:25 2015 New Revision: 286910 URL: https://svnweb.freebsd.org/changeset/base/286910 Log: - ANSIfy - Remove the redundant _PATH_RSH definition (paths.h at r96194); - Use pid_t for PIDs - Note that we are at the same level of OpenBSD's counterpart of revision 1.7 (r94757). No functional changes. MFC after:2 weeks Modified: head/lib/libc/net/rcmdsh.c Modified: head/lib/libc/net/rcmdsh.c == --- head/lib/libc/net/rcmdsh.c Tue Aug 18 21:37:14 2015(r286909) +++ head/lib/libc/net/rcmdsh.c Tue Aug 18 22:37:25 2015(r286910) @@ -1,4 +1,4 @@ -/* $OpenBSD: rcmdsh.c,v 1.5 1998/04/25 16:23:58 millert Exp $ */ +/* $OpenBSD: rcmdsh.c,v 1.7 2002/03/12 00:05:44 millert Exp $ */ /* * Copyright (c) 2001, MagniComp @@ -49,23 +49,18 @@ __FBSDID("$FreeBSD$"); #include #include -#ifndef _PATH_RSH -#define_PATH_RSH "/usr/bin/rsh" -#endif - /* * This is a replacement rcmd() function that uses the rsh(1) * program in place of a direct rcmd(3) function call so as to * avoid having to be root. Note that rport is ignored. */ int -rcmdsh(ahost, rport, locuser, remuser, cmd, rshprog) - char **ahost; - int rport; - const char *locuser, *remuser, *cmd, *rshprog; +rcmdsh(char **ahost, int rport, const char *locuser, const char *remuser, +const char *cmd, const char *rshprog) { struct addrinfo hints, *res; - int cpid, sp[2], error; + int sp[2], error; + pid_t cpid; char *p; struct passwd *pw; char num[8]; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r286911 - in head: . contrib/jemalloc contrib/jemalloc/doc include
Author: jasone Date: Wed Aug 19 00:06:46 2015 New Revision: 286911 URL: https://svnweb.freebsd.org/changeset/base/286911 Log: Fix minor malloc regressions. - Use _Bool rather than bool to resolve missing type errors in malloc_np.h. - Fix malloc manual page #include documentation. - Add *allocm manual pages to obsolete files. Submitted by: jbeich Modified: head/ObsoleteFiles.inc head/contrib/jemalloc/FREEBSD-diffs head/contrib/jemalloc/FREEBSD-upgrade head/contrib/jemalloc/doc/jemalloc.3 head/include/malloc_np.h Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Tue Aug 18 22:37:25 2015(r286910) +++ head/ObsoleteFiles.inc Wed Aug 19 00:06:46 2015(r286911) @@ -38,6 +38,12 @@ # xargs -n1 | sort | uniq -d; # done +# 20150818: *allocm() are gone in jemalloc 4.0.0 +OLD_FILES+=usr/share/man/man3/allocm.3.gz +OLD_FILES+=usr/share/man/man3/dallocm.3.gz +OLD_FILES+=usr/share/man/man3/nallocm.3.gz +OLD_FILES+=usr/share/man/man3/rallocm.3.gz +OLD_FILES+=usr/share/man/man3/sallocm.3.gz # 20150802: Remove netbsd's test on pw(8) OLD_FILES+=usr/tests/usr.sbin/pw/pw_test # 20150719: Remove libarchive.pc Modified: head/contrib/jemalloc/FREEBSD-diffs == --- head/contrib/jemalloc/FREEBSD-diffs Tue Aug 18 22:37:25 2015 (r286910) +++ head/contrib/jemalloc/FREEBSD-diffs Wed Aug 19 00:06:46 2015 (r286911) @@ -1,8 +1,8 @@ diff --git a/doc/jemalloc.xml.in b/doc/jemalloc.xml.in -index 8fc774b..47b453c 100644 +index 8fc774b..fdbef95 100644 --- a/doc/jemalloc.xml.in +++ b/doc/jemalloc.xml.in -@@ -53,6 +53,17 @@ +@@ -53,11 +53,23 @@ This manual describes jemalloc @jemalloc_version@. More information can be found at the http://www.canonware.com/jemalloc/";>jemalloc website. @@ -20,7 +20,14 @@ index 8fc774b..47b453c 100644 SYNOPSIS -@@ -2759,4 +2770,18 @@ malloc_conf = "lg_chunk:24";]]> + +- #include <jemalloc/jemalloc.h> ++ #include <stdlib.h> ++#include <malloc_np.h> + + Standard API + +@@ -2759,4 +2771,18 @@ malloc_conf = "lg_chunk:24";]]> The posix_memalign function conforms to IEEE Std 1003.1-2001 (“POSIX.1”). Modified: head/contrib/jemalloc/FREEBSD-upgrade == --- head/contrib/jemalloc/FREEBSD-upgrade Tue Aug 18 22:37:25 2015 (r286910) +++ head/contrib/jemalloc/FREEBSD-upgrade Wed Aug 19 00:06:46 2015 (r286911) @@ -72,9 +72,9 @@ do_extract() { patch -p1 < "${src}/FREEBSD-diffs" find . -name '*.orig' -delete # Generate various files. -./autogen.sh --enable-cc-silence --enable-dss --enable-xmalloc \ - --enable-utrace --with-xslroot=/usr/local/share/xsl/docbook \ - --with-private-namespace=__ --with-lg-page-sizes=12,13,14,16 +./autogen.sh --enable-cc-silence --enable-xmalloc --enable-utrace \ + --with-xslroot=/usr/local/share/xsl/docbook --with-private-namespace=__ \ + --with-lg-page-sizes=12,13,14,16 gmake dist ) } Modified: head/contrib/jemalloc/doc/jemalloc.3 == --- head/contrib/jemalloc/doc/jemalloc.3Tue Aug 18 22:37:25 2015 (r286910) +++ head/contrib/jemalloc/doc/jemalloc.3Wed Aug 19 00:06:46 2015 (r286911) @@ -2,12 +2,12 @@ .\" Title: JEMALLOC .\"Author: Jason Evans .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 08/17/2015 +.\" Date: 08/18/2015 .\"Manual: User Manual .\"Source: jemalloc 4.0.0-0-g6e98caf8f064482b9ab292ef3638dea67420bbc2 .\" Language: English .\" -.TH "JEMALLOC" "3" "08/17/2015" "jemalloc 4.0.0-0-g6e98caf8f064" "User Manual" +.TH "JEMALLOC" "3" "08/18/2015" "jemalloc 4.0.0-0-g6e98caf8f064" "User Manual" .\" - .\" * Define some portability stuff .\" - @@ -51,7 +51,8 @@ make variable)\&. .sp .ft B .nf -#include +#include +#include .fi .ft .SS "Standard API" Modified: head/include/malloc_np.h == --- head/include/malloc_np.hTue Aug 18 22:37:25 2015(r286910) +++ head/include/malloc_np.hWed Aug 19 00:06:46 2015(r286911) @@ -36,13 +36,14 @@ #include __BEGIN_DECLS -typedef void *(chunk_alloc_t)(void *, size_t, size_t, bool *, bool *, unsigned); -typedef bool
Re: svn commit: r286866 - in head: contrib/jemalloc contrib/jemalloc/doc contrib/jemalloc/include/jemalloc contrib/jemalloc/include/jemalloc/internal contrib/jemalloc/src include lib/libc/gen lib/libc
On Aug 18, 2015, at 12:49 PM, Jan Beich wrote: > [various fixes] Committed as r286911. Thanks, Jason ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r286913 - head/usr.bin/truss
Author: jhb Date: Wed Aug 19 00:49:50 2015 New Revision: 286913 URL: https://svnweb.freebsd.org/changeset/base/286913 Log: Change the argument formatting function to use a stdio FILE object opened with open_memstream() to build the string for each argument. This allows for more complicated argument building without resorting to intermediate malloc's, etc. Related, the strsig*() functions no longer return allocated strings but use a static global buffer instead. Modified: head/usr.bin/truss/main.c head/usr.bin/truss/syscalls.c Modified: head/usr.bin/truss/main.c == --- head/usr.bin/truss/main.c Wed Aug 19 00:26:54 2015(r286912) +++ head/usr.bin/truss/main.c Wed Aug 19 00:49:50 2015(r286913) @@ -149,15 +149,13 @@ set_etype(struct trussinfo *trussinfo) char * strsig(int sig) { - char *ret; + static char tmp[64]; - ret = NULL; if (sig > 0 && sig < NSIG) { - asprintf(&ret, "SIG%s", sys_signame[sig]); - if (ret == NULL) - return (NULL); + snprintf(tmp, sizeof(tmp), "SIG%s", sys_signame[sig]); + return (tmp); } - return (ret); + return (NULL); } int @@ -340,7 +338,6 @@ START_TRACE: fprintf(trussinfo->outfile, "SIGNAL %u (%s)\n", trussinfo->pr_data, signame == NULL ? "?" : signame); - free(signame); break; case S_EXIT: if (trussinfo->flags & COUNTONLY) Modified: head/usr.bin/truss/syscalls.c == --- head/usr.bin/truss/syscalls.c Wed Aug 19 00:26:54 2015 (r286912) +++ head/usr.bin/truss/syscalls.c Wed Aug 19 00:49:50 2015 (r286913) @@ -731,12 +731,15 @@ get_string(pid_t pid, void *addr, int ma static char * strsig2(int sig) { - char *tmp; + static char tmp[sizeof(int) * 3 + 1]; + char *ret; - tmp = strsig(sig); - if (tmp == NULL) - asprintf(&tmp, "%d", sig); - return (tmp); + ret = strsig(sig); + if (ret == NULL) { + snprintf(tmp, sizeof(tmp), "%d", sig); + ret = tmp; + } + return (ret); } /* @@ -753,32 +756,34 @@ char * print_arg(struct syscall_args *sc, unsigned long *args, long retval, struct trussinfo *trussinfo) { + FILE *fp; char *tmp; + size_t tmplen; pid_t pid; - tmp = NULL; + fp = open_memstream(&tmp, &tmplen); pid = trussinfo->pid; switch (sc->type & ARG_MASK) { case Hex: - asprintf(&tmp, "0x%x", (int)args[sc->offset]); + fprintf(fp, "0x%x", (int)args[sc->offset]); break; case Octal: - asprintf(&tmp, "0%o", (int)args[sc->offset]); + fprintf(fp, "0%o", (int)args[sc->offset]); break; case Int: - asprintf(&tmp, "%d", (int)args[sc->offset]); + fprintf(fp, "%d", (int)args[sc->offset]); break; case LongHex: - asprintf(&tmp, "0x%lx", args[sc->offset]); + fprintf(fp, "0x%lx", args[sc->offset]); break; case Long: - asprintf(&tmp, "%ld", args[sc->offset]); + fprintf(fp, "%ld", args[sc->offset]); break; case Name: { /* NULL-terminated string. */ char *tmp2; tmp2 = get_string(pid, (void*)args[sc->offset], 0); - asprintf(&tmp, "\"%s\"", tmp2); + fprintf(fp, "\"%s\"", tmp2); free(tmp2); break; } @@ -814,11 +819,11 @@ print_arg(struct syscall_args *sc, unsig len--; truncated = 1; }; - asprintf(&tmp, "\"%s\"%s", tmp3, truncated ? + fprintf(fp, "\"%s\"%s", tmp3, truncated ? "..." : ""); free(tmp3); } else { - asprintf(&tmp, "0x%lx", args[sc->offset]); + fprintf(fp, "0x%lx", args[sc->offset]); } break; } @@ -857,37 +862,35 @@ print_arg(struct syscall_args *sc, unsig } #ifdef __LP64__ case Quad: - asprintf(&tmp, "0x%lx", args[sc->offset]); + fprintf(fp, "0x%lx", args[sc->offset]); break; #else case Quad: { unsigned long long ll; ll = *(unsigned long long *)(args + sc->offset); - asprintf(&tmp, "0x%llx", ll); + fprintf(fp, "0x%llx", ll); brea
svn commit: r286914 - head/usr.bin/truss
Author: jhb Date: Wed Aug 19 01:44:56 2015 New Revision: 286914 URL: https://svnweb.freebsd.org/changeset/base/286914 Log: Expand the decoding of kevent structures. - Print the ident value as decimal instead of hexadecimal for filter types that use "small" values such as file descriptors and PIDs. - Decode NOTE_* flags in the fflags field of kevents for several system filter types. Modified: head/usr.bin/truss/syscalls.c Modified: head/usr.bin/truss/syscalls.c == --- head/usr.bin/truss/syscalls.c Wed Aug 19 00:49:50 2015 (r286913) +++ head/usr.bin/truss/syscalls.c Wed Aug 19 01:44:56 2015 (r286914) @@ -397,6 +397,30 @@ static struct xlat kevent_flags[] = { X(EV_DROP) X(EV_FLAG1) X(EV_ERROR) X(EV_EOF) XEND }; +static struct xlat kevent_user_ffctrl[] = { + X(NOTE_FFNOP) X(NOTE_FFAND) X(NOTE_FFOR) X(NOTE_FFCOPY) + XEND +}; + +static struct xlat kevent_rdwr_fflags[] = { + X(NOTE_LOWAT) X(NOTE_FILE_POLL) XEND +}; + +static struct xlat kevent_vnode_fflags[] = { + X(NOTE_DELETE) X(NOTE_WRITE) X(NOTE_EXTEND) X(NOTE_ATTRIB) + X(NOTE_LINK) X(NOTE_RENAME) X(NOTE_REVOKE) XEND +}; + +static struct xlat kevent_proc_fflags[] = { + X(NOTE_EXIT) X(NOTE_FORK) X(NOTE_EXEC) X(NOTE_TRACK) X(NOTE_TRACKERR) + X(NOTE_CHILD) XEND +}; + +static struct xlat kevent_timer_fflags[] = { + X(NOTE_SECONDS) X(NOTE_MSECONDS) X(NOTE_USECONDS) X(NOTE_NSECONDS) + XEND +}; + static struct xlat poll_flags[] = { X(POLLSTANDARD) X(POLLIN) X(POLLPRI) X(POLLOUT) X(POLLERR) X(POLLHUP) X(POLLNVAL) X(POLLRDNORM) X(POLLRDBAND) @@ -742,6 +766,64 @@ strsig2(int sig) return (ret); } +static void +print_kevent(FILE *fp, struct kevent *ke, int input) +{ + + switch (ke->filter) { + case EVFILT_READ: + case EVFILT_WRITE: + case EVFILT_VNODE: + case EVFILT_PROC: + case EVFILT_TIMER: + case EVFILT_PROCDESC: + fprintf(fp, "%ju", (uintmax_t)ke->ident); + break; + case EVFILT_SIGNAL: + fputs(strsig2(ke->ident), fp); + break; + default: + fprintf(fp, "%p", (void *)ke->ident); + } + fprintf(fp, ",%s,%s,", xlookup(kevent_filters, ke->filter), + xlookup_bits(kevent_flags, ke->flags)); + switch (ke->filter) { + case EVFILT_READ: + case EVFILT_WRITE: + fputs(xlookup_bits(kevent_rdwr_fflags, ke->fflags), fp); + break; + case EVFILT_VNODE: + fputs(xlookup_bits(kevent_vnode_fflags, ke->fflags), fp); + break; + case EVFILT_PROC: + case EVFILT_PROCDESC: + fputs(xlookup_bits(kevent_proc_fflags, ke->fflags), fp); + break; + case EVFILT_TIMER: + fputs(xlookup_bits(kevent_timer_fflags, ke->fflags), fp); + break; + case EVFILT_USER: { + int ctrl, data; + + ctrl = ke->fflags & NOTE_FFCTRLMASK; + data = ke->fflags & NOTE_FFLAGSMASK; + if (input) { + fputs(xlookup(kevent_user_ffctrl, ctrl), fp); + if (ke->fflags & NOTE_TRIGGER) + fputs("|NOTE_TRIGGER", fp); + if (data != 0) + fprintf(fp, "|%#x", data); + } else { + fprintf(fp, "%#x", data); + } + break; + } + default: + fprintf(fp, "%#x", ke->fflags); + } + fprintf(fp, ",%p,%p", (void *)ke->data, (void *)ke->udata); +} + /* * print_arg * Converts a syscall argument into a string. Said string is @@ -1281,14 +1363,10 @@ print_arg(struct syscall_args *sc, unsig if (numevents >= 0 && get_struct(pid, (void *)args[sc->offset], ke, bytes) != -1) { fputc('{', fp); - for (i = 0; i < numevents; i++) - fprintf(fp, " %p,%s,%s,%d,%p,%p", - (void *)ke[i].ident, - xlookup(kevent_filters, ke[i].filter), - xlookup_bits(kevent_flags, ke[i].flags), - ke[i].fflags, - (void *)ke[i].data, - (void *)ke[i].udata); + for (i = 0; i < numevents; i++) { + fputc(' ', fp); + print_kevent(fp, &ke[i], sc->offset == 1); + } fputs(" }", fp); } else { fprintf(fp, "0x%lx", args[sc->offset]); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd
svn commit: r286915 - head/sys/modules/am335x_dmtpps
Author: ian Date: Wed Aug 19 02:37:30 2015 New Revision: 286915 URL: https://svnweb.freebsd.org/changeset/base/286915 Log: Add required foo_if.h files to SRCS to fix build errors. Pointed out by: gjb Pointy hat to: ian Modified: head/sys/modules/am335x_dmtpps/Makefile Modified: head/sys/modules/am335x_dmtpps/Makefile == --- head/sys/modules/am335x_dmtpps/Makefile Wed Aug 19 01:44:56 2015 (r286914) +++ head/sys/modules/am335x_dmtpps/Makefile Wed Aug 19 02:37:30 2015 (r286915) @@ -5,4 +5,6 @@ KMOD= am335x_dmtpps SRCS= am335x_dmtpps.c +SRCS+= bus_if.h device_if.h ofw_bus_if.h + .include ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r286916 - head/sys/powerpc/booke
Author: jhibbits Date: Wed Aug 19 06:07:32 2015 New Revision: 286916 URL: https://svnweb.freebsd.org/changeset/base/286916 Log: Save the registers at the correct offsets. When merging the AIM and BookE trap.c files, the offsets for BookE's setfault inadvertantly got munged. Modified: head/sys/powerpc/booke/locore.S Modified: head/sys/powerpc/booke/locore.S == --- head/sys/powerpc/booke/locore.S Wed Aug 19 02:37:30 2015 (r286915) +++ head/sys/powerpc/booke/locore.S Wed Aug 19 06:07:32 2015 (r286916) @@ -723,11 +723,12 @@ setfault: mfsprg0 %r4 lwz %r4, TD_PCB(%r2) stw %r3, PCB_ONFAULT(%r4) - mfcr%r10 + mfcr%r4 stw %r0, 0(%r3) stw %r1, 4(%r3) stw %r2, 8(%r3) - stmw%r13, 12(%r3) /* store CR, CTR, XER, [r13 .. r31] */ + stw %r4, 8(%r3) + stmw%r13, 16(%r3) /* store CR, CTR, XER, [r13 .. r31] */ li %r3, 0 /* return FALSE */ blr ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r286917 - head/sys/powerpc/booke
Author: jhibbits Date: Wed Aug 19 06:08:11 2015 New Revision: 286917 URL: https://svnweb.freebsd.org/changeset/base/286917 Log: Fix copy&paste. Modified: head/sys/powerpc/booke/locore.S Modified: head/sys/powerpc/booke/locore.S == --- head/sys/powerpc/booke/locore.S Wed Aug 19 06:07:32 2015 (r286916) +++ head/sys/powerpc/booke/locore.S Wed Aug 19 06:08:11 2015 (r286917) @@ -727,7 +727,7 @@ setfault: stw %r0, 0(%r3) stw %r1, 4(%r3) stw %r2, 8(%r3) - stw %r4, 8(%r3) + stw %r4, 12(%r3) stmw%r13, 16(%r3) /* store CR, CTR, XER, [r13 .. r31] */ li %r3, 0 /* return FALSE */ blr ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"