Re: svn commit: r285829 - head/sys/kern
On 23 Jul, Sergey Kandaurov wrote: Author: pluknet Date: Thu Jul 23 23:18:03 2015 New Revision: 285829 URL: https://svnweb.freebsd.org/changeset/base/285829 Log: Call ksem_get() with initialized 'rights'. ksem_get() consumes fget(), and it's mandatory there. Reported by:truckman Reviewed by:mjg Thanks! Things seem to be stable now. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r285834 - head/sys/compat/cloudabi
Author: ed Date: Fri Jul 24 07:46:02 2015 New Revision: 285834 URL: https://svnweb.freebsd.org/changeset/base/285834 Log: Implement the basic system calls that operate on pathnames. Summary: Unlike FreeBSD, CloudABI does not use null terminated strings for its pathnames. Introduce a function called copyin_path() that can be used by all of the filesystem system calls that use pathnames. This change already implements the system calls that don't depend on any additional functionality (e.g., conversion of struct stat). Also implement the socket system calls that operate on pathnames, namely the ones used by the C library functions bindat() and connectat(). These don't receive a 'struct sockaddr_un', but just the pathname, meaning they could be implemented in such a way that they don't depend on the size of sun_path. For now, just use the existing interfaces. Add a missing #include to cloudabi_syscalldefs.h to get this code to build, as one of its macros depends on UINT64_C(). Test Plan: These implementations have already been tested in the CloudABI branch on GitHub. They pass all of the tests. Reviewers: kib, pjd Subscribers: imp Differential Revision: https://reviews.freebsd.org/D3097 Modified: head/sys/compat/cloudabi/cloudabi_file.c head/sys/compat/cloudabi/cloudabi_sock.c head/sys/compat/cloudabi/cloudabi_syscalldefs.h Modified: head/sys/compat/cloudabi/cloudabi_file.c == --- head/sys/compat/cloudabi/cloudabi_file.cFri Jul 24 04:56:46 2015 (r285833) +++ head/sys/compat/cloudabi/cloudabi_file.cFri Jul 24 07:46:02 2015 (r285834) @@ -28,11 +28,67 @@ __FBSDID($FreeBSD$); #include sys/param.h #include sys/fcntl.h +#include sys/kernel.h +#include sys/malloc.h +#include sys/namei.h #include sys/syscallsubr.h #include compat/cloudabi/cloudabi_proto.h #include compat/cloudabi/cloudabi_syscalldefs.h +static MALLOC_DEFINE(M_CLOUDABI_PATH, cloudabipath, CloudABI pathnames); + +/* + * Copying pathnames from userspace to kernelspace. + * + * Unlike most operating systems, CloudABI doesn't use null-terminated + * pathname strings. Processes always pass pathnames to the kernel by + * providing a base pointer and a length. This has a couple of reasons: + * + * - It makes it easier to use CloudABI in combination with programming + * languages other than C, that may use non-null terminated strings. + * - It allows for calling system calls on individual components of the + * pathname without modifying the input string. + * + * The function below copies in pathname strings and null-terminates it. + * It also ensure that the string itself does not contain any null + * bytes. + * + * TODO(ed): Add an abstraction to vfs_lookup.c that allows us to pass + * in unterminated pathname strings, so we can do away with + * the copying. + */ + +static int +copyin_path(const char *uaddr, size_t len, char **result) +{ + char *buf; + int error; + + if (len = PATH_MAX) + return (ENAMETOOLONG); + buf = malloc(len + 1, M_CLOUDABI_PATH, M_WAITOK); + error = copyin(uaddr, buf, len); + if (error != 0) { + free(buf, M_CLOUDABI_PATH); + return (error); + } + if (memchr(buf, '\0', len) != NULL) { + free(buf, M_CLOUDABI_PATH); + return (EINVAL); + } + buf[len] = '\0'; + *result = buf; + return (0); +} + +static void +cloudabi_freestr(char *buf) +{ + + free(buf, M_CLOUDABI_PATH); +} + int cloudabi_sys_file_advise(struct thread *td, struct cloudabi_sys_file_advise_args *uap) @@ -86,9 +142,24 @@ int cloudabi_sys_file_link(struct thread *td, struct cloudabi_sys_file_link_args *uap) { + char *path1, *path2; + int error; - /* Not implemented. */ - return (ENOSYS); + error = copyin_path(uap-path1, uap-path1len, path1); + if (error != 0) + return (error); + error = copyin_path(uap-path2, uap-path2len, path2); + if (error != 0) { + cloudabi_freestr(path1); + return (error); + } + + error = kern_linkat(td, uap-fd1, uap-fd2, path1, path2, + UIO_SYSSPACE, (uap-fd1 CLOUDABI_LOOKUP_SYMLINK_FOLLOW) != 0 ? + FOLLOW : NOFOLLOW); + cloudabi_freestr(path1); + cloudabi_freestr(path2); + return (error); } int @@ -113,18 +184,40 @@ int cloudabi_sys_file_readlink(struct thread *td, struct cloudabi_sys_file_readlink_args *uap) { + char *path; + int error; - /* Not implemented. */ - return (ENOSYS); + error = copyin_path(uap-path, uap-pathlen, path); + if (error != 0) + return (error); + + error = kern_readlinkat(td, uap-fd, path, UIO_SYSSPACE, + uap-buf, UIO_USERSPACE, uap-bufsize); +
Re: svn: head/sys: conf dev/vt dev/vt/logo
Oh my! But in the past we've used to have splash so why not? I am just curious if someone if working on libvgl support in the vt? I think the graphics should go into loadable module, though. So it's easy to change or amend. -Max On Tue, Jul 21, 2015 at 1:33 PM, Conrad E. Meyer c...@freebsd.org wrote: Author: cem Date: Tue Jul 21 20:33:36 2015 New Revision: 285766 URL: https://svnweb.freebsd.org/changeset/base/285766 Log: vt: Draw logos per CPU core This feature is inspired by another Unix-alike OS commonly found on airplane headrests. A number of beasties[0] are drawn at top of framebuffer during boot, based on the number of active SMP CPUs[1]. Console buffer output continues to scroll in the screen area below beastie(s)[2]. After some time[3] has passed, the beasties are erased leaving the entire terminal for use. Includes two 80x80 vga16 beastie graphics and an 80x80 vga16 orb graphic. (The graphics are RLE compressed to save some space -- 3x 3200 bytes uncompressed, or 4208 compressed.) [0]: The user may select the style of beastie with kern.vt.splash_cpu_style=(0|1|2) [1]: Or the number may be overridden with tunable kern.vt.splash_ncpu. [2]: https://www.youtube.com/watch?v=UP2jizfr3_o [3]: Configurable with kern.vt.splash_cpu_duration (seconds, def. 10). Differential Revision:https://reviews.freebsd.org/D2181 Reviewed by: dumbbell, emaste Approved by: markj (mentor) MFC after:2 weeks Added: head/sys/dev/vt/logo/logo_beastie.c (contents, props changed) head/sys/dev/vt/vt_cpulogos.c (contents, props changed) Modified: head/sys/conf/files head/sys/dev/vt/vt.h head/sys/dev/vt/vt_core.c Modified: head/sys/conf/files == --- head/sys/conf/files Tue Jul 21 20:30:06 2015(r285765) +++ head/sys/conf/files Tue Jul 21 20:33:36 2015(r285766) @@ -2726,9 +2726,11 @@ dev/vt/hw/efifb/efifb.c optional vt_efi dev/vt/hw/fb/vt_fb.c optional vt dev/vt/hw/vga/vt_vga.c optional vt vt_vga dev/vt/logo/logo_freebsd.c optional vt splash +dev/vt/logo/logo_beastie.c optional vt splash dev/vt/vt_buf.coptional vt dev/vt/vt_consolectl.c optional vt dev/vt/vt_core.c optional vt +dev/vt/vt_cpulogos.c optional vt splash dev/vt/vt_font.c optional vt dev/vt/vt_sysmouse.c optional vt dev/vte/if_vte.c optional vte pci Added: head/sys/dev/vt/logo/logo_beastie.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/vt/logo/logo_beastie.c Tue Jul 21 20:33:36 2015 (r285766) @@ -0,0 +1,398 @@ +/*- + * Copyright (c) 2015 Conrad Meyer cse@gmail.com + * Copyright (c) 2005 The FreeBSD Foundation + * Copyright (c) 1996 Larry Ewing lew...@isc.tamu.edu + * Copyright (c) 1988 Kirk McKusick mckus...@freebsd.org + * + * 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. + */ + +#include sys/cdefs.h +__FBSDID($FreeBSD$); + +#include dev/vt/vt.h + +const unsigned int vt_logo_sprite_width = 80; +const unsigned int vt_logo_sprite_height = 80; + +const unsigned char vt_beastie_vga16[] = { + 0x16, 0x00, 0x62, 0x16, 0x88, 0x03, 0x80, 0x16, 0x00, 0x23, 0x88, 0x80, + 0x00, 0x00, 0x08, 0x88, 0x16, 0x00, 0x21, 0x08, 0x16, 0x00, 0x06, 0x88, + 0x16, 0x00, 0x20, 0x80, 0x16, 0x00, 0x06, 0x08, 0x80, 0x16, 0x00, 0x1e, + 0x08, 0x16, 0x00, 0x08, 0x88, 0x16, 0x00,
Re: svn commit: r284959 - in head: . share/man/man4 share/man/man9 sys/conf sys/dev/glxsb sys/dev/hifn sys/dev/random sys/dev/rndtest sys/dev/safe sys/dev/syscons sys/dev/ubsec sys/dev/virtio/random s
On 24 Jul 2015, at 02:25, John-Mark Gurney j...@funkthat.com wrote: I would like to point out that the goal of collecting large amounts is starting to fall out of favor, and I happen to agree with the likes of djb[1] that we don't need an infinite amount of entropy collected by the system. If the attacker can read out our RNG state, then we are already screwed due to many other vulns. I’m working on a premise of “tools, not policy”. I’d like there to be enough harvesting points for the box owner to get the warm fuzzies. If they choose to use less, fine by me. Many of the issues that FreeBSD sees with lack of entropy at start up is more of a problem on how systems are installed and provisioned. I don't believe that we currently store any entropy from the install process, yet this is one of the best places to get it, the user is banging on keyboard selecting options, etc. If an image is designed to be cloned (vm images or appliance images) we need to have a mechanism to ensure that before we start, we get the entropy from other sources, be it a hardware RNG or the console. Getting an initial entropy bundle for first boot is high up on my TODO list. :-) Patches welcome! We need the usual /entropy (or /var/db/entropy/… or whatever) and crucially we need /boot/entropy and the correct invocation in /boot/loader.conf. I would like to see us scale back the entropy collection, and replace it with something like scan the zone once an hour or something similar. Or do something dtrace style, where we nop/jmp the collection after we feel that the system has collected enough. Most of the current entropy gathering is just about invisible anyway. I think the above goes too far, but may be a useful way of enabling/disabling (say) UMA gathering on the fly. Heck, piping in mic data to /dev/random is a good way to seed the rng on many machines. Well, sure, but what if you don’t have microphone? I want lots of choices, in anticipation of only a subset being usable. M -- Mark R V Murray ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r285836 - head/usr.bin/man
Author: bapt Date: Fri Jul 24 09:20:02 2015 New Revision: 285836 URL: https://svnweb.freebsd.org/changeset/base/285836 Log: inode should be different to actually mean mandocdb is in used Sponsored by: gandi.net Modified: head/usr.bin/man/man.sh Modified: head/usr.bin/man/man.sh == --- head/usr.bin/man/man.sh Fri Jul 24 09:10:03 2015(r285835) +++ head/usr.bin/man/man.sh Fri Jul 24 09:20:02 2015(r285836) @@ -925,7 +925,7 @@ whatis_usage() { # Supported commands do_apropos() { - [ $(stat -f %i /usr/bin/man) -eq $(stat -f %i /usr/bin/apropos) ] \ + [ $(stat -f %i /usr/bin/man) -ne $(stat -f %i /usr/bin/apropos) ] \ exec apropos $@ search_whatis apropos $@ } @@ -962,7 +962,7 @@ do_manpath() { } do_whatis() { - [ $(stat -f %i /usr/bin/man) -eq $(stat -f %i /usr/bin/whatis) ] \ + [ $(stat -f %i /usr/bin/man) -ne $(stat -f %i /usr/bin/whatis) ] \ exec whatis $@ search_whatis whatis $@ } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r285835 - head/usr.bin/man
Author: bapt Date: Fri Jul 24 09:10:03 2015 New Revision: 285835 URL: https://svnweb.freebsd.org/changeset/base/285835 Log: Fix man -k with mandocdb If apropos(1) and whatis(1) are not hardlinks to man(1) that means the system is using mandocdb, then man -k should spawn apropos(1) and/or whatis(1) directly Reported by: kevlo Tested by:kevlo Sponsored by: gandi.net Modified: head/usr.bin/man/man.sh Modified: head/usr.bin/man/man.sh == --- head/usr.bin/man/man.sh Fri Jul 24 07:46:02 2015(r285834) +++ head/usr.bin/man/man.sh Fri Jul 24 09:10:03 2015(r285835) @@ -925,6 +925,8 @@ whatis_usage() { # Supported commands do_apropos() { + [ $(stat -f %i /usr/bin/man) -eq $(stat -f %i /usr/bin/apropos) ] \ + exec apropos $@ search_whatis apropos $@ } @@ -960,6 +962,8 @@ do_manpath() { } do_whatis() { + [ $(stat -f %i /usr/bin/man) -eq $(stat -f %i /usr/bin/whatis) ] \ + exec whatis $@ search_whatis whatis $@ } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r284959 - in head: . share/man/man4 share/man/man9 sys/conf sys/dev/glxsb sys/dev/hifn sys/dev/random sys/dev/rndtest sys/dev/safe sys/dev/syscons sys/dev/ubsec sys/dev/virtio/random s
On Fri, 2015-07-24 at 07:59 +0100, Mark R V Murray wrote: On 24 Jul 2015, at 02:25, John-Mark Gurney j...@funkthat.com wrote: I would like to point out that the goal of collecting large amounts is starting to fall out of favor, and I happen to agree with the likes of djb[1] that we don't need an infinite amount of entropy collected by the system. If the attacker can read out our RNG state, then we are already screwed due to many other vulns. I’m working on a premise of “tools, not policy”. I’d like there to be enough harvesting points for the box owner to get the warm fuzzies. If they choose to use less, fine by me. Many of the issues that FreeBSD sees with lack of entropy at start up is more of a problem on how systems are installed and provisioned. I don't believe that we currently store any entropy from the install process, yet this is one of the best places to get it, the user is banging on keyboard selecting options, etc. If an image is designed to be cloned (vm images or appliance images) we need to have a mechanism to ensure that before we start, we get the entropy from other sources, be it a hardware RNG or the console. Getting an initial entropy bundle for first boot is high up on my TODO list. :-) Patches welcome! We need the usual /entropy (or /var/db/entropy/… or whatever) and crucially we need /boot/entropy and the correct invocation in /boot/loader.conf. But keep in mind that loader(8) is optional and not used at all on some non-x86 systems. -- Ian ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r285840 - head/sys/dev/mpt
Author: marius Date: Fri Jul 24 16:00:35 2015 New Revision: 285840 URL: https://svnweb.freebsd.org/changeset/base/285840 Log: - In mpt_send_handshake_cmd(), use bus_space_write_stream_4(9) for writing raw data to the doorbell offset in order to clarify the intent and for avoiding unnecessarily converting the endianess back and forth. Unfortunately, the same can't be done in mpt_recv_handshake_reply() as 16-bit data needs to be read using 32-bit bus accessors. - In mpt_recv_handshake_reply(), get rid of a redundant variable. MFC after:1 fortnight Modified: head/sys/dev/mpt/mpt.c head/sys/dev/mpt/mpt.h Modified: head/sys/dev/mpt/mpt.c == --- head/sys/dev/mpt/mpt.c Fri Jul 24 15:13:21 2015(r285839) +++ head/sys/dev/mpt/mpt.c Fri Jul 24 16:00:35 2015(r285840) @@ -1423,7 +1423,7 @@ mpt_send_handshake_cmd(struct mpt_softc /* Send the command */ for (i = 0; i len; i++) { - mpt_write(mpt, MPT_OFFSET_DOORBELL, htole32(*data32++)); + mpt_write_stream(mpt, MPT_OFFSET_DOORBELL, *data32++); if (mpt_wait_db_ack(mpt) != MPT_OK) { mpt_prt(mpt, mpt_send_handshake_cmd: timeout @ index %d\n, i); @@ -1457,7 +1457,7 @@ mpt_recv_handshake_reply(struct mpt_soft *data16++ = le16toh(data MPT_DB_DATA_MASK); mpt_write(mpt, MPT_OFFSET_INTR_STATUS, 0); - /* Get Second Word */ + /* Get second word */ if (mpt_wait_db_int(mpt) != MPT_OK) { mpt_prt(mpt, mpt_recv_handshake_cmd timeout2\n); return ETIMEDOUT; @@ -1481,18 +1481,13 @@ mpt_recv_handshake_reply(struct mpt_soft left = (hdr-MsgLength 1) - 2; reply_left = reply_len - 2; while (left--) { - u_int16_t datum; - if (mpt_wait_db_int(mpt) != MPT_OK) { mpt_prt(mpt, mpt_recv_handshake_cmd timeout3\n); return ETIMEDOUT; } data = mpt_read(mpt, MPT_OFFSET_DOORBELL); - datum = le16toh(data MPT_DB_DATA_MASK); - if (reply_left-- 0) - *data16++ = datum; - + *data16++ = le16toh(data MPT_DB_DATA_MASK); mpt_write(mpt, MPT_OFFSET_INTR_STATUS, 0); } Modified: head/sys/dev/mpt/mpt.h == --- head/sys/dev/mpt/mpt.h Fri Jul 24 15:13:21 2015(r285839) +++ head/sys/dev/mpt/mpt.h Fri Jul 24 16:00:35 2015(r285840) @@ -329,7 +329,6 @@ typedef struct mpt_config_params { } cfgparms_t; / MPI Target State Info ***/ - typedef struct { uint32_t reply_desc;/* current reply descriptor */ uint32_t resid; /* current data residual */ @@ -784,6 +783,7 @@ mpt_assign_serno(struct mpt_softc *mpt, /*** Register Access **/ static __inline void mpt_write(struct mpt_softc *, size_t, uint32_t); +static __inline void mpt_write_stream(struct mpt_softc *, size_t, uint32_t); static __inline uint32_t mpt_read(struct mpt_softc *, int); static __inline void mpt_pio_write(struct mpt_softc *, size_t, uint32_t); static __inline uint32_t mpt_pio_read(struct mpt_softc *, int); @@ -794,6 +794,12 @@ mpt_write(struct mpt_softc *mpt, size_t bus_space_write_4(mpt-pci_st, mpt-pci_sh, offset, val); } +static __inline void +mpt_write_stream(struct mpt_softc *mpt, size_t offset, uint32_t val) +{ + bus_space_write_stream_4(mpt-pci_st, mpt-pci_sh, offset, val); +} + static __inline uint32_t mpt_read(struct mpt_softc *mpt, int offset) { @@ -818,6 +824,7 @@ mpt_pio_read(struct mpt_softc *mpt, int KASSERT(mpt-pci_pio_reg != NULL, (no PIO resource)); return (bus_space_read_4(mpt-pci_pio_st, mpt-pci_pio_sh, offset)); } + /*** Reply Frame/Request Management ***/ /* Max MPT Reply we are willing to accept (must be power of 2) */ #define MPT_REPLY_SIZE 256 @@ -958,6 +965,7 @@ mpt_cdblen(uint8_t cdb0, int maxlen) return (16); } } + #ifdef INVARIANTS static __inline request_t * mpt_tag_2_req(struct mpt_softc *, uint32_t); static __inline request_t * @@ -1136,6 +1144,7 @@ mpt_write_cur_cfg_page(struct mpt_softc PageAddress, hdr, len, sleep_ok, timeout_ms)); } + /* mpt_debug.c functions */ void mpt_print_reply(void *vmsg); void mpt_print_db(uint32_t mb); @@ -1145,4 +1154,5 @@ void mpt_req_state(mpt_req_state_t state void mpt_print_config_request(void *vmsg); void mpt_print_request(void *vmsg); void mpt_dump_sgl(SGE_IO_UNION *se, int offset); + #endif /* _MPT_H_ */
svn commit: r285839 - in head/sys: kern sparc64/include sparc64/sparc64
Author: marius Date: Fri Jul 24 15:13:21 2015 New Revision: 285839 URL: https://svnweb.freebsd.org/changeset/base/285839 Log: o Revert the other functional half of r239864, i. e. the merge of r134227 from x86 to use smp_ipi_mtx spin lock not only for smp_rendezvous_cpus() but also for the MD cache invalidation, TLB demapping and remote register reading IPIs due to the following reasons: - The cross-IPI SMP deadlock x86 otherwise is subject to can't happen on sparc64. That's because on sparc64, spin locks don't disable interrupts completely but only raise the processor interrupt level to PIL_TICK. This means that IPIs still get delivered and direct dispatch IPIs such as the cache invalidation etc. IPIs in question are still executed. - In smp_rendezvous_cpus(), smp_ipi_mtx is held not only while sending an IPI_RENDEZVOUS, but until all CPUs have processed smp_rendezvous_action(). Consequently, smp_ipi_mtx may be locked for an extended amount of time as queued IPIs (as opposed to the direct ones) such as IPI_RENDEZVOUS are scheduled via a soft interrupt. Moreover, given that this soft interrupt is only delivered at PIL_RENDEZVOUS, processing of smp_rendezvous_action() on a target may be interrupted by f. e. a tick interrupt at PIL_TICK, in turn leading to the target in question trying to send an IPI by itself while IPI_RENDEZVOUS isn't fully handled, yet, and, thus, resulting in a deadlock. o As mentioned in the commit message of r245850, on least some sun4u platforms concurrent sending of IPIs by different CPUs is fatal. Therefore, hold the reintroduced MD ipi_mtx also while delivering cross-traps via MI helpers, i. e. ipi_{all_but_self,cpu,selected}(). o Akin to x86, let the last CPU to process cpu_mp_bootstrap() set smp_started instead of the BSP in cpu_mp_unleash(). This ensures that all APs actually are started, when smp_started is no longer 0. o In all MD and MI IPI helpers, check for smp_started == 1 rather than for smp_cpus 1 or nothing at all. This avoids races during boot causing IPIs trying to be delivered to APs that in fact aren't up and running, yet. While at it, move setting of the cpu_ipi_{selected,single}() pointers to the appropriate delivery functions from mp_init() to cpu_mp_start() where it's better suited and allows to get rid of the global isjbus variable. o Given that now concurrent IPI delivery no longer is possible, also nuke the delays before completely disabling interrupts again in the CPU-specific cross-trap delivery functions, previously giving other CPUs a window for sending IPIs on their part. Actually, we now should be able to entirely get rid of completely disabling interrupts in these functions. Such a change needs more testing, though. o In {s,}tick_get_timecount_mp(), make the {s,}tick variable static. While not necessary for correctness, this avoids page faults when accessing the stack of a foreign CPU as {s,}tick now is locked into the TLBs as part of static kernel data. Hence, {s,}tick_get_timecount_mp() always execute as fast as possible, avoiding jitter. PR: 201245 MFC after:3 days Modified: head/sys/kern/subr_witness.c head/sys/sparc64/include/smp.h head/sys/sparc64/sparc64/machdep.c head/sys/sparc64/sparc64/mp_machdep.c head/sys/sparc64/sparc64/tick.c Modified: head/sys/kern/subr_witness.c == --- head/sys/kern/subr_witness.cFri Jul 24 14:13:43 2015 (r285838) +++ head/sys/kern/subr_witness.cFri Jul 24 15:13:21 2015 (r285839) @@ -661,6 +661,9 @@ static struct witness_order_list_entry o */ { intrcnt, lock_class_mtx_spin }, { icu, lock_class_mtx_spin }, +#if defined(SMP) defined(__sparc64__) + { ipi, lock_class_mtx_spin }, +#endif #ifdef __i386__ { allpmaps, lock_class_mtx_spin }, { descriptor tables, lock_class_mtx_spin }, Modified: head/sys/sparc64/include/smp.h == --- head/sys/sparc64/include/smp.h Fri Jul 24 14:13:43 2015 (r285838) +++ head/sys/sparc64/include/smp.h Fri Jul 24 15:13:21 2015 (r285839) @@ -39,13 +39,15 @@ #ifndefLOCORE +#include sys/param.h #include sys/cpuset.h +#include sys/lock.h +#include sys/mutex.h #include sys/proc.h #include sys/sched.h #include sys/smp.h #include machine/intr_machdep.h -#include machine/pcb.h #include machine/tte.h #defineIDR_BUSY0x0001ULL @@ -96,6 +98,7 @@ struct ipi_tlb_args { }; #defineita_va ita_start +struct pcb; struct pcpu; extern struct pcb stoppcbs[]; @@ -108,8 +111,9 @@ extern cpu_ipi_selected_t *cpu_ipi_selec typedefvoid cpu_ipi_single_t(u_int,
svn commit: r285857 - head/bin/ls
Author: allanjude (doc committer) Date: Fri Jul 24 20:20:59 2015 New Revision: 285857 URL: https://svnweb.freebsd.org/changeset/base/285857 Log: Cast uid and gid to the correct type for display to solve segfault in ls(1) on 32bit arches Correctly escape literal % for display This fixes segfaults in 32bit arches caused by r285734 Reviewed by: ngie Approved by: dim Sponsored by: ScaleEngine Inc. Differential Revision:https://reviews.freebsd.org/D3191 Modified: head/bin/ls/print.c Modified: head/bin/ls/print.c == --- head/bin/ls/print.c Fri Jul 24 19:51:51 2015(r285856) +++ head/bin/ls/print.c Fri Jul 24 20:20:59 2015(r285857) @@ -192,7 +192,7 @@ printlong(const DISPLAY *dp) if (f_numericonly) { xo_emit({t:mode/%s}{e:mode_octal/%03o} {t:links/%*u} {td:user/%-*s}{e:user/%ju} {td:group/%-*s}{e:group/%ju} , buf, (int) sp-st_mode ALLPERMS, dp-s_nlink, sp-st_nlink, - dp-s_user, np-user, sp-st_uid, dp-s_group, np-group, sp-st_gid); + dp-s_user, np-user, (uintmax_t)sp-st_uid, dp-s_group, np-group, (uintmax_t)sp-st_gid); } else { xo_emit({t:mode/%s}{e:mode_octal/%03o} {t:links/%*u} {t:user/%-*s} {t:group/%-*s} , buf, (int) sp-st_mode ALLPERMS, dp-s_nlink, sp-st_nlink, @@ -486,7 +486,7 @@ printtype(u_int mode) xo_emit({D:=}{e:type/socket}); return (1); case S_IFWHT: - xo_emit({D:%}{e:type/whiteout}); + xo_emit({D:%%}{e:type/whiteout}); return (1); default: break; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r285854 - head/sys/amd64/include
Alan Cox wrote this message on Fri, Jul 24, 2015 at 19:43 +: Author: alc Date: Fri Jul 24 19:43:18 2015 New Revision: 285854 URL: https://svnweb.freebsd.org/changeset/base/285854 Log: Add a comment discussing the appropriate use of the atomic_*() functions with acquire and release semantics versus the *mb() functions on amd64 processors. Please put this documentation in the atomic(9) man page where it is easier to read and access... it's probably best to just move it there and reference atomic(9) here... Also, this advice isn't amd64 specific is it? If it isn't, why is it in an amd64 include file? Modified: head/sys/amd64/include/atomic.h Modified: head/sys/amd64/include/atomic.h == --- head/sys/amd64/include/atomic.h Fri Jul 24 19:37:30 2015 (r285853) +++ head/sys/amd64/include/atomic.h Fri Jul 24 19:43:18 2015 (r285854) @@ -32,6 +32,25 @@ #error this file needs sys/cdefs.h as a prerequisite #endif +/* + * To express interprocessor (as opposed to processor and device) memory + * ordering constraints, use the atomic_*() functions with acquire and release + * semantics rather than the *mb() functions. An architecture's memory + * ordering (or memory consistency) model governs the order in which a + * program's accesses to different locations may be performed by an + * implementation of that architecture. In general, for memory regions + * defined as writeback cacheable, the memory ordering implemented by amd64 + * processors preserves the program ordering of a load followed by a load, a + * load followed by a store, and a store followed by a store. Only a store + * followed by a load to a different memory location may be reordered. + * Therefore, except for special cases, like non-temporal memory accesses or + * memory regions defined as write combining, the memory ordering effects + * provided by the sfence instruction in the wmb() function and the lfence + * instruction in the rmb() function are redundant. In contrast, the + * atomic_*() functions with acquire and release semantics do not perform + * redundant instructions for ordinary cases of interprocessor memory + * ordering on any architecture. + */ #define mb()__asm __volatile(mfence; : : : memory) #define wmb() __asm __volatile(sfence; : : : memory) #define rmb() __asm __volatile(lfence; : : : memory) -- John-Mark Gurney Voice: +1 415 225 5579 All that I will do, has been done, All that I have, has not. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r285841 - in head: contrib/elftoolchain/common contrib/elftoolchain/readelf sys/sys usr.bin/elfdump
Author: emaste Date: Fri Jul 24 16:52:21 2015 New Revision: 285841 URL: https://svnweb.freebsd.org/changeset/base/285841 Log: Add RISC-V ELF machine type definition EM_RISCV is now officially registered as e_machine 243. MFC after:1 month Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/common/elfdefinitions.h head/contrib/elftoolchain/readelf/readelf.c head/sys/sys/elf_common.h head/usr.bin/elfdump/elfdump.c Modified: head/contrib/elftoolchain/common/elfdefinitions.h == --- head/contrib/elftoolchain/common/elfdefinitions.h Fri Jul 24 16:00:35 2015(r285840) +++ head/contrib/elftoolchain/common/elfdefinitions.h Fri Jul 24 16:52:21 2015(r285841) @@ -813,7 +813,8 @@ _ELF_DEFINE_EM(EM_KM32, 210, _ELF_DEFINE_EM(EM_KMX32,211, KM211 KMX32 32-bit processor) \ _ELF_DEFINE_EM(EM_KMX16,212, KM211 KMX16 16-bit processor) \ _ELF_DEFINE_EM(EM_KMX8, 213, KM211 KMX8 8-bit processor) \ -_ELF_DEFINE_EM(EM_KVARC,214, KM211 KMX32 KVARC processor) +_ELF_DEFINE_EM(EM_KVARC,214, KM211 KMX32 KVARC processor) \ +_ELF_DEFINE_EM(EM_RISCV,243, RISC-V) #undef _ELF_DEFINE_EM #define_ELF_DEFINE_EM(N, V, DESCR) N = V , Modified: head/contrib/elftoolchain/readelf/readelf.c == --- head/contrib/elftoolchain/readelf/readelf.c Fri Jul 24 16:00:35 2015 (r285840) +++ head/contrib/elftoolchain/readelf/readelf.c Fri Jul 24 16:52:21 2015 (r285841) @@ -532,6 +532,7 @@ elf_machine(unsigned int mach) case EM_ARCA: return Arca RISC Microprocessor; case EM_UNICORE: return Microprocessor series from PKU-Unity Ltd; case EM_AARCH64: return AArch64; + case EM_RISCV: return RISC-V; default: snprintf(s_mach, sizeof(s_mach), unknown: %#x, mach); return (s_mach); Modified: head/sys/sys/elf_common.h == --- head/sys/sys/elf_common.h Fri Jul 24 16:00:35 2015(r285840) +++ head/sys/sys/elf_common.h Fri Jul 24 16:52:21 2015(r285841) @@ -297,6 +297,7 @@ typedef struct { #defineEM_UNICORE 110 /* Microprocessor series from PKU-Unity Ltd. and MPRC of Peking University */ #defineEM_AARCH64 183 /* AArch64 (64-bit ARM) */ +#defineEM_RISCV243 /* RISC-V */ /* Non-standard or deprecated. */ #defineEM_486 6 /* Intel i486. */ Modified: head/usr.bin/elfdump/elfdump.c == --- head/usr.bin/elfdump/elfdump.c Fri Jul 24 16:00:35 2015 (r285840) +++ head/usr.bin/elfdump/elfdump.c Fri Jul 24 16:52:21 2015 (r285841) @@ -272,6 +272,7 @@ e_machines(u_int mach) case EM_IA_64: return EM_IA_64; case EM_X86_64: return EM_X86_64; case EM_AARCH64:return EM_AARCH64; + case EM_RISCV: return EM_RISCV; } snprintf(machdesc, sizeof(machdesc), (unknown machine) -- type 0x%x, mach); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r285845 - head/contrib/elftoolchain/readelf
Author: emaste Date: Fri Jul 24 18:00:53 2015 New Revision: 285845 URL: https://svnweb.freebsd.org/changeset/base/285845 Log: readelf: avoid division by zero on section entry size ELF Tool Chain tickets #439, #444, #445, #467 Reported by: Alexander Cherepanov chere...@mccme.ru (#467) Reported by: antiAgainst (others) Reviewed by: brooks MFC after:1 month Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D2338 Modified: head/contrib/elftoolchain/readelf/readelf.c Modified: head/contrib/elftoolchain/readelf/readelf.c == --- head/contrib/elftoolchain/readelf/readelf.c Fri Jul 24 17:46:43 2015 (r285844) +++ head/contrib/elftoolchain/readelf/readelf.c Fri Jul 24 18:00:53 2015 (r285845) @@ -27,6 +27,7 @@ #include sys/param.h #include sys/queue.h #include ar.h +#include assert.h #include ctype.h #include dwarf.h #include err.h @@ -314,6 +315,7 @@ static const char *dwarf_reg(unsigned in static const char *dwarf_regname(struct readelf *re, unsigned int num); static struct dumpop *find_dumpop(struct readelf *re, size_t si, const char *sn, int op, int t); +static int get_ent_count(struct section *s, int *ent_count); static char *get_regoff_str(struct readelf *re, Dwarf_Half reg, Dwarf_Addr off); static const char *get_string(struct readelf *re, int strtab, size_t off); @@ -2901,6 +2903,24 @@ dump_shdr(struct readelf *re) #undef ST_CTL } +/* + * Return number of entries in the given section. We'd prefer ent_count be a + * size_t *, but libelf APIs already use int for section indices. + */ +static int +get_ent_count(struct section *s, int *ent_count) +{ + if (s-entsize == 0) { + warnx(section %s has entry size 0, s-name); + return (0); + } else if (s-sz / s-entsize INT_MAX) { + warnx(section %s has invalid section count, s-name); + return (0); + } + *ent_count = (int)(s-sz / s-entsize); + return (1); +} + static void dump_dynamic(struct readelf *re) { @@ -2929,8 +2949,8 @@ dump_dynamic(struct readelf *re) /* Determine the actual number of table entries. */ nentries = 0; - jmax = (int) (s-sz / s-entsize); - + if (!get_ent_count(s, jmax)) + continue; for (j = 0; j jmax; j++) { if (gelf_getdyn(d, j, dyn) != dyn) { warnx(gelf_getdyn failed: %s, @@ -3176,7 +3196,9 @@ dump_rel(struct readelf *re, struct sect else printf(%-12s %-12s %-19s %-16s %s\n, REL_HDR); } - len = d-d_size / s-entsize; + assert(d-d_size == s-sz); + if (!get_ent_count(s, len)) + return; for (i = 0; i len; i++) { if (gelf_getrel(d, i, r) != r) { warnx(gelf_getrel failed: %s, elf_errmsg(-1)); @@ -3232,7 +3254,9 @@ dump_rela(struct readelf *re, struct sec else printf(%-12s %-12s %-19s %-16s %s\n, RELA_HDR); } - len = d-d_size / s-entsize; + assert(d-d_size == s-sz); + if (!get_ent_count(s, len)) + return; for (i = 0; i len; i++) { if (gelf_getrela(d, i, r) != r) { warnx(gelf_getrel failed: %s, elf_errmsg(-1)); @@ -3297,7 +3321,7 @@ dump_symtab(struct readelf *re, int i) Elf_Data *d; GElf_Sym sym; const char *name; - int elferr, stab, j; + int elferr, stab, j, len; s = re-sl[i]; stab = s-link; @@ -3310,12 +3334,14 @@ dump_symtab(struct readelf *re, int i) } if (d-d_size = 0) return; + if (!get_ent_count(s, len)) + return; printf(Symbol table (%s), s-name); - printf( contains %ju entries:\n, s-sz / s-entsize); + printf( contains %d entries:\n, len); printf(%7s%9s%14s%5s%8s%6s%9s%5s\n, Num:, Value, Size, Type, Bind, Vis, Ndx, Name); - for (j = 0; (uint64_t)j s-sz / s-entsize; j++) { + for (j = 0; j len; j++) { if (gelf_getsym(d, j, sym) != sym) { warnx(gelf_getsym failed: %s, elf_errmsg(-1)); continue; @@ -3353,7 +3379,7 @@ dump_symtabs(struct readelf *re) Elf_Data *d; struct section *s; uint64_t dyn_off; - int elferr, i; + int elferr, i, len; /* * If -D is specified, only dump the symbol table specified by @@ -3378,8 +3404,10 @@ dump_symtabs(struct readelf *re) } if (d-d_size = 0) return; + if (!get_ent_count(s, len)) + return; - for (i = 0; (uint64_t)i s-sz / s-entsize; i++) { +
svn commit: r285847 - head/sbin/init
Author: trasz Date: Fri Jul 24 18:14:57 2015 New Revision: 285847 URL: https://svnweb.freebsd.org/changeset/base/285847 Log: Add missing SIGUSR1 description. MFC after:2 weeks Sponsored by: The FreeBSD Foundation Modified: head/sbin/init/init.8 Modified: head/sbin/init/init.8 == --- head/sbin/init/init.8 Fri Jul 24 18:13:13 2015(r285846) +++ head/sbin/init/init.8 Fri Jul 24 18:14:57 2015(r285847) @@ -31,7 +31,7 @@ .\ @(#)init.8 8.3 (Berkeley) 4/18/94 .\ $FreeBSD$ .\ -.Dd March 14, 2012 +.Dd July 24, 2015 .Dt INIT 8 .Os .Sh NAME @@ -284,6 +284,7 @@ will signal the original as follows: .Bl -column Run-level SIGTERM .It Sy Run-level Signal Action +.It Cm 0 Ta Dv SIGUSR1 Ta Halt .It Cm 0 Ta Dv SIGUSR2 Ta Halt and turn the power off .It Cm 1 Ta Dv SIGTERM Ta Go to single-user mode .It Cm 6 Ta Dv SIGINT Ta Reboot the machine ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r284959 - in head: . share/man/man4 share/man/man9 sys/conf sys/dev/glxsb sys/dev/hifn sys/dev/random sys/dev/rndtest sys/dev/safe sys/dev/syscons sys/dev/ubsec sys/dev/virtio/random s
On 24 Jul 2015, at 16:25, Ian Lepore i...@freebsd.org wrote: But keep in mind that loader(8) is optional and not used at all on some non-x86 systems. Duly noted. It’s on my TODO list to talk to you embedded folks about this. M -- Mark R V Murray ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r285842 - head/usr.bin/truss
Author: emaste Date: Fri Jul 24 16:57:13 2015 New Revision: 285842 URL: https://svnweb.freebsd.org/changeset/base/285842 Log: truss: follow pdfork()ed descendents with -f PR: 201276 Reported by: David Drysdale Reviewed by: oshogbo MFC after:1 week Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D2976 Modified: head/usr.bin/truss/amd64-fbsd.c head/usr.bin/truss/amd64-fbsd32.c head/usr.bin/truss/arm-fbsd.c head/usr.bin/truss/i386-fbsd.c head/usr.bin/truss/mips-fbsd.c head/usr.bin/truss/powerpc-fbsd.c head/usr.bin/truss/powerpc64-fbsd.c head/usr.bin/truss/sparc64-fbsd.c Modified: head/usr.bin/truss/amd64-fbsd.c == --- head/usr.bin/truss/amd64-fbsd.c Fri Jul 24 16:52:21 2015 (r285841) +++ head/usr.bin/truss/amd64-fbsd.c Fri Jul 24 16:57:13 2015 (r285842) @@ -158,6 +158,7 @@ amd64_syscall_entry(struct trussinfo *tr if (fsc-name (trussinfo-flags FOLLOWFORKS) (strcmp(fsc-name, fork) == 0 || + strcmp(fsc-name, pdfork) == 0 || strcmp(fsc-name, rfork) == 0 || strcmp(fsc-name, vfork) == 0)) trussinfo-curthread-in_fork = 1; Modified: head/usr.bin/truss/amd64-fbsd32.c == --- head/usr.bin/truss/amd64-fbsd32.c Fri Jul 24 16:52:21 2015 (r285841) +++ head/usr.bin/truss/amd64-fbsd32.c Fri Jul 24 16:57:13 2015 (r285842) @@ -165,6 +165,7 @@ amd64_fbsd32_syscall_entry(struct trussi if (fsc-name (trussinfo-flags FOLLOWFORKS) (strcmp(fsc-name, fork) == 0 || + strcmp(fsc-name, pdfork) == 0 || strcmp(fsc-name, rfork) == 0 || strcmp(fsc-name, vfork) == 0)) trussinfo-curthread-in_fork = 1; Modified: head/usr.bin/truss/arm-fbsd.c == --- head/usr.bin/truss/arm-fbsd.c Fri Jul 24 16:52:21 2015 (r285841) +++ head/usr.bin/truss/arm-fbsd.c Fri Jul 24 16:57:13 2015 (r285842) @@ -172,6 +172,7 @@ arm_syscall_entry(struct trussinfo *trus if (fsc-name (trussinfo-flags FOLLOWFORKS) (strcmp(fsc-name, fork) == 0 || + strcmp(fsc-name, pdfork) == 0 || strcmp(fsc-name, rfork) == 0 || strcmp(fsc-name, vfork) == 0)) trussinfo-curthread-in_fork = 1; Modified: head/usr.bin/truss/i386-fbsd.c == --- head/usr.bin/truss/i386-fbsd.c Fri Jul 24 16:52:21 2015 (r285841) +++ head/usr.bin/truss/i386-fbsd.c Fri Jul 24 16:57:13 2015 (r285842) @@ -162,6 +162,7 @@ i386_syscall_entry(struct trussinfo *tru if (fsc-name (trussinfo-flags FOLLOWFORKS) (strcmp(fsc-name, fork) == 0 || + strcmp(fsc-name, pdfork) == 0 || strcmp(fsc-name, rfork) == 0 || strcmp(fsc-name, vfork) == 0)) trussinfo-curthread-in_fork = 1; Modified: head/usr.bin/truss/mips-fbsd.c == --- head/usr.bin/truss/mips-fbsd.c Fri Jul 24 16:52:21 2015 (r285841) +++ head/usr.bin/truss/mips-fbsd.c Fri Jul 24 16:57:13 2015 (r285842) @@ -155,6 +155,7 @@ mips_syscall_entry(struct trussinfo *tru if (fsc-name (trussinfo-flags FOLLOWFORKS) (strcmp(fsc-name, fork) == 0 || + strcmp(fsc-name, pdfork) == 0 || strcmp(fsc-name, rfork) == 0 || strcmp(fsc-name, vfork) == 0)) trussinfo-curthread-in_fork = 1; Modified: head/usr.bin/truss/powerpc-fbsd.c == --- head/usr.bin/truss/powerpc-fbsd.c Fri Jul 24 16:52:21 2015 (r285841) +++ head/usr.bin/truss/powerpc-fbsd.c Fri Jul 24 16:57:13 2015 (r285842) @@ -169,6 +169,7 @@ powerpc_syscall_entry(struct trussinfo * if (fsc-name (trussinfo-flags FOLLOWFORKS) (strcmp(fsc-name, fork) == 0 || + strcmp(fsc-name, pdfork) == 0 || strcmp(fsc-name, rfork) == 0 || strcmp(fsc-name, vfork) == 0)) trussinfo-curthread-in_fork = 1; Modified: head/usr.bin/truss/powerpc64-fbsd.c == --- head/usr.bin/truss/powerpc64-fbsd.c Fri Jul 24 16:52:21 2015 (r285841) +++ head/usr.bin/truss/powerpc64-fbsd.c Fri Jul 24 16:57:13 2015 (r285842) @@ -157,6 +157,7 @@ powerpc64_syscall_entry(struct trussinfo if (fsc-name (trussinfo-flags FOLLOWFORKS) (strcmp(fsc-name, fork) == 0 || + strcmp(fsc-name, pdfork) == 0 || strcmp(fsc-name, rfork) == 0 ||
svn commit: r285844 - head/usr.bin/ar
Author: emaste Date: Fri Jul 24 17:46:43 2015 New Revision: 285844 URL: https://svnweb.freebsd.org/changeset/base/285844 Log: ar: add -U (unique) option to disable -D (deterministic) mode This is required in order for us to support deterministic mode by default. If multiple -D or -U options are specified on the command line, the final one takes precedence. GNU ar also uses -U for this. An equivalent change will be applied to ELF Tool Chain's version of ar. PR: 196929 MFC after:1 month Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D3175 Modified: head/usr.bin/ar/ar.1 head/usr.bin/ar/ar.c Modified: head/usr.bin/ar/ar.1 == --- head/usr.bin/ar/ar.1Fri Jul 24 17:01:16 2015(r285843) +++ head/usr.bin/ar/ar.1Fri Jul 24 17:46:43 2015(r285844) @@ -23,7 +23,7 @@ .\ .\ $FreeBSD$ .\ -.Dd December 22, 2011 +.Dd July 24, 2015 .Dt AR 1 .Os .Sh NAME @@ -66,6 +66,7 @@ .Op Fl D .Op Fl f .Op Fl s | Fl S +.Op Fl U .Op Fl v .Op Fl z .Ar archive @@ -82,6 +83,7 @@ .Op Fl j .Op Fl s | Fl S .Op Fl u +.Op Fl U .Op Fl v .Op Fl z .Ar archive @@ -112,6 +114,7 @@ .Fl M .Nm ranlib .Op Fl D +.Op Fl U .Ar archive ... .Sh DESCRIPTION The @@ -207,6 +210,11 @@ and 0644 instead of file mode from the m .Ar . This ensures that checksums on the resulting archives are reproducible when member contents are identical. +If multiple +.Fl D +and +.Fl U +options are specified on the command line, the final one takes precedence. .It Fl f Synonymous with option .Fl T . @@ -316,6 +324,19 @@ option, the members specified by argumen .Ar will be extracted only if they are newer than the corresponding files in the file system. +.It Fl U +When used in combination with the +.Fl r +or +.Fl q +option, insert the real mtime, uid and gid, and file mode values +from the members named by arguments +.Ar . +If multiple +.Fl D +and +.Fl U +options are specified on the command line, the final one takes precedence. .It Fl v Provide verbose output. When used with the Modified: head/usr.bin/ar/ar.c == --- head/usr.bin/ar/ar.cFri Jul 24 17:01:16 2015(r285843) +++ head/usr.bin/ar/ar.cFri Jul 24 17:46:43 2015(r285844) @@ -113,7 +113,7 @@ main(int argc, char **argv) len = strlen(bsdar-progname); if (len = strlen(ranlib) strcmp(bsdar-progname + len - strlen(ranlib), ranlib) == 0) { - while ((opt = getopt_long(argc, argv, tDV, longopts, + while ((opt = getopt_long(argc, argv, tDUV, longopts, NULL)) != -1) { switch(opt) { case 't': @@ -122,6 +122,9 @@ main(int argc, char **argv) case 'D': bsdar-options |= AR_D; break; + case 'U': + bsdar-options = ~AR_D; + break; case 'V': ranlib_version(); break; @@ -157,7 +160,7 @@ main(int argc, char **argv) } } - while ((opt = getopt_long(argc, argv, abCcdDfijlMmopqrSsTtuVvxz, + while ((opt = getopt_long(argc, argv, abCcdDfijlMmopqrSsTtUuVvxz, longopts, NULL)) != -1) { switch(opt) { case 'a': @@ -216,6 +219,9 @@ main(int argc, char **argv) case 't': set_mode(bsdar, opt); break; + case 'U': + bsdar-options = ~AR_D; + break; case 'u': bsdar-options |= AR_U; break; @@ -364,9 +370,9 @@ bsdar_usage(void) (void)fprintf(stderr, \tar -m [-Tjsvz] archive file ...\n); (void)fprintf(stderr, \tar -m [-Tabijsvz] position archive file ...\n); (void)fprintf(stderr, \tar -p [-Tv] archive [file ...]\n); - (void)fprintf(stderr, \tar -q [-TcDjsvz] archive file ...\n); - (void)fprintf(stderr, \tar -r [-TcDjsuvz] archive file ...\n); - (void)fprintf(stderr, \tar -r [-TabcDijsuvz] position archive file ...\n); + (void)fprintf(stderr, \tar -q [-TcDjsUvz] archive file ...\n); + (void)fprintf(stderr, \tar -r [-TcDjsUuvz] archive file ...\n); + (void)fprintf(stderr, \tar -r [-TabcDijsUuvz] position archive file ...\n); (void)fprintf(stderr, \tar -s [-jz] archive\n); (void)fprintf(stderr, \tar -t [-Tv] archive [file ...]\n); (void)fprintf(stderr, \tar -x [-CTouv] archive [file ...]\n); @@ -378,7 +384,7 @@ static void ranlib_usage(void) { - (void)fprintf(stderr, usage: ranlib [-t] archive
svn commit: r285843 - head/sys/dev/uart
Author: marius Date: Fri Jul 24 17:01:16 2015 New Revision: 285843 URL: https://svnweb.freebsd.org/changeset/base/285843 Log: - Since r253161, uart_intr() abuses FILTER_SCHEDULE_THREAD for signaling uart_bus_attach() during its test that 20 iterations weren't sufficient for clearing all pending interrupts, assuming this means that hardware is broken and doesn't deassert interrupts. However, under pressure, 20 iterations also can be insufficient for clearing all pending interrupts, leading to a panic as intr_event_handle() tries to schedule an interrupt handler not registered. Solve this by introducing a flag that is set in test mode and otherwise restores pre-r253161 behavior of uart_intr(). The approach of additionally registering uart_intr() as handler as suggested in PR 194979 is not taken as that in turn would abuse special pccard and pccbb handling code of intr_event_handle(). [1] - Const'ify uart_driver_name. - Fix some minor style bugs. PR: 194979 [1] Reviewed by: marcel (earlier version) MFC after:3 days Modified: head/sys/dev/uart/uart_bus.h head/sys/dev/uart/uart_core.c Modified: head/sys/dev/uart/uart_bus.h == --- head/sys/dev/uart/uart_bus.hFri Jul 24 16:57:13 2015 (r285842) +++ head/sys/dev/uart/uart_bus.hFri Jul 24 17:01:16 2015 (r285843) @@ -99,6 +99,7 @@ struct uart_softc { int sc_polled:1;/* This UART has no interrupts. */ int sc_txbusy:1;/* This UART is transmitting. */ int sc_isquelch:1; /* This UART has input squelched. */ + int sc_testintr:1; /* This UART is under int. testing. */ struct uart_devinfo *sc_sysdev; /* System device (or NULL). */ @@ -135,7 +136,7 @@ struct uart_softc { }; extern devclass_t uart_devclass; -extern char uart_driver_name[]; +extern const char uart_driver_name[]; int uart_bus_attach(device_t dev); int uart_bus_detach(device_t dev); @@ -157,14 +158,16 @@ void uart_tty_intr(void *arg); static __inline int uart_rx_empty(struct uart_softc *sc) { + return ((sc-sc_rxget == sc-sc_rxput) ? 1 : 0); } static __inline int uart_rx_full(struct uart_softc *sc) { - return ((sc-sc_rxput + 1 sc-sc_rxbufsz) - ? (sc-sc_rxput + 1 == sc-sc_rxget) : (sc-sc_rxget == 0)); + + return ((sc-sc_rxput + 1 sc-sc_rxbufsz) ? + (sc-sc_rxput + 1 == sc-sc_rxget) : (sc-sc_rxget == 0)); } static __inline int Modified: head/sys/dev/uart/uart_core.c == --- head/sys/dev/uart/uart_core.c Fri Jul 24 16:57:13 2015 (r285842) +++ head/sys/dev/uart/uart_core.c Fri Jul 24 17:01:16 2015 (r285843) @@ -52,7 +52,7 @@ __FBSDID($FreeBSD$); #include uart_if.h devclass_t uart_devclass; -char uart_driver_name[] = uart; +const char uart_driver_name[] = uart; SLIST_HEAD(uart_devinfo_list, uart_devinfo) uart_sysdevs = SLIST_HEAD_INITIALIZER(uart_sysdevs); @@ -260,13 +260,14 @@ static int uart_intr(void *arg) { struct uart_softc *sc = arg; - int cnt, ipend; + int cnt, ipend, testintr; if (sc-sc_leaving) return (FILTER_STRAY); cnt = 0; - while (cnt 20 (ipend = UART_IPEND(sc)) != 0) { + testintr = sc-sc_testintr; + while ((!testintr || cnt 20) (ipend = UART_IPEND(sc)) != 0) { cnt++; if (ipend SER_INT_OVERRUN) uart_intr_overrun(sc); @@ -277,7 +278,7 @@ uart_intr(void *arg) if (ipend SER_INT_SIGCHG) uart_intr_sigchg(sc); if (ipend SER_INT_TXIDLE) - uart_intr_txidle(sc); + uart_intr_txidle(sc); } if (sc-sc_polled) { @@ -286,7 +287,8 @@ uart_intr(void *arg) } return ((cnt == 0) ? FILTER_STRAY : - ((cnt == 20) ? FILTER_SCHEDULE_THREAD : FILTER_HANDLED)); + ((testintr cnt == 20) ? FILTER_SCHEDULE_THREAD : + FILTER_HANDLED)); } serdev_intr_t * @@ -433,7 +435,7 @@ uart_bus_attach(device_t dev) /* * Protect ourselves against interrupts while we're not completely * finished attaching and initializing. We don't expect interrupts -* until after UART_ATTACH() though. +* until after UART_ATTACH(), though. */ sc-sc_leaving = 1; @@ -513,7 +515,9 @@ uart_bus_attach(device_t dev) pps_init(sc-sc_pps); sc-sc_leaving = 0; + sc-sc_testintr = 1; filt = uart_intr(sc); + sc-sc_testintr = 0; /* * Don't use interrupts if we couldn't clear any pending interrupt ___ svn-src-all@freebsd.org mailing list
svn commit: r285858 - head/share/man/man4
Author: brueffer Date: Fri Jul 24 21:48:53 2015 New Revision: 285858 URL: https://svnweb.freebsd.org/changeset/base/285858 Log: Add a basic manpage for the pms driver. MFC after:1 week Committed from: Essen FreeBSD Hackathon Added: head/share/man/man4/pms.4 (contents, props changed) Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile == --- head/share/man/man4/MakefileFri Jul 24 20:20:59 2015 (r285857) +++ head/share/man/man4/MakefileFri Jul 24 21:48:53 2015 (r285858) @@ -388,6 +388,7 @@ MAN=aac.4 \ ${_pflog.4} \ ${_pfsync.4} \ pim.4 \ + pms.4 \ polling.4 \ ppbus.4 \ ppc.4 \ Added: head/share/man/man4/pms.4 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/pms.4 Fri Jul 24 21:48:53 2015(r285858) @@ -0,0 +1,128 @@ +.\ Copyright (c) 2015 Christian Brueffer +.\ 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 July 23, 2015 +.Dt PMS 4 +.Os +.Sh NAME +.Nm pms +.Nd PMC-Sierra PM8001/8081/8088/8089/8074/8076/8077 SAS/SATA HBA Controller driver +.Sh SYNOPSIS +To compile the driver into the kernel, +place the following line in the +kernel configuration file: +.Bd -ragged -offset indent +.Cd device pms +.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 +pms_load=YES +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for the PMC-Sierra PM8001/8081/8088/8089/8074/8076/8077 +range of SAS/SATA HBA controllers. +.Sh HARDWARE +The +.Nm +driver supports the following hardware: +.Pp +.Bl -bullet -compact +.It +Tachyon TS Fibre Channel Card +.It +Tachyon TL Fibre Channel Card +.It +Tachyon XL2 Fibre Channel Card +.It +Tachyon DX2 Fibre Channel Card +.It +Tachyon DX2+ Fibre Channel Card +.It +Tachyon DX4+ Fibre Channel Card +.It +Tachyon QX2 Fibre Channel Card +.It +Tachyon QX4 Fibre Channel Card +.It +Tachyon DE4 Fibre Channel Card +.It +Tachyon QE4 Fibre Channel Card +.It +Tachyon XL10 Fibre Channel Card +.It +PMC Sierra SPC SAS-SATA Card +.It +PMC Sierra SPC-V SAS-SATA Card +.It +PMC Sierra SPC-VE SAS-SATA Card +.It +PMC Sierra SPC-V 16 Port SAS-SATA Card +.It +PMC Sierra SPC-VE 16 Port SAS-SATA Card +.It +PMC Sierra SPC-V SAS-SATA Card 12Gig +.It +PMC Sierra SPC-VE SAS-SATA Card 12Gig +.It +PMC Sierra SPC-V 16 Port SAS-SATA Card 12Gig +.It +PMC Sierra SPC-VE 16 Port SAS-SATA Card 12Gig +.It +Adaptec Hialeah 4/8 Port SAS-SATA HBA Card 6Gig +.It +Adaptec Hialeah 4/8 Port SAS-SATA RAID Card 6Gig +.It +Adaptec Hialeah 8/16 Port SAS-SATA HBA Card 6Gig +.It +Adaptec Hialeah 8/16 Port SAS-SATA RAID Card 6Gig +.It +Adaptec Hialeah 8/16 Port SAS-SATA HBA Encryption Card 6Gig +.It +Adaptec Hialeah 8/16 Port SAS-SATA RAID Encryption Card 6Gig +.It +Adaptec Delray 8 Port SAS-SATA HBA Card 12Gig +.It +Adaptec Delray 8 Port SAS-SATA HBA Encryption Card 12Gig +.It +Adaptec Delray 16 Port SAS-SATA HBA Card 12Gig +.It +Adaptec Delray 16 Port SAS-SATA HBA Encryption Card 12Gig +.El +.Sh SEE ALSO +.Xr cam 4 , +.Xr camcontrol 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 10.2 . +.Sh AUTHORS +.An Achim Leubner Aq Mt achim.leub...@pmcs.com ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r285861 - in releng/10.2/usr.sbin/ntp: . ntpd
Author: delphij Date: Fri Jul 24 22:08:57 2015 New Revision: 285861 URL: https://svnweb.freebsd.org/changeset/base/285861 Log: MFS r285856: MFC r285701: Use fixed date/time (the time choosen was the time the import was done on -HEAD) in libntp so we can make reproducible build. PR: bin/201661 Differential Revision:https://reviews.freebsd.org/D3122 While I'm there also remove libmd from linkage as reported in bin/201738 PR: bin/201738 Submitted by: John Marshall Approved by: re (gjb) Modified: releng/10.2/usr.sbin/ntp/config.h releng/10.2/usr.sbin/ntp/ntpd/Makefile Directory Properties: releng/10.2/ (props changed) Modified: releng/10.2/usr.sbin/ntp/config.h == --- releng/10.2/usr.sbin/ntp/config.h Fri Jul 24 22:00:44 2015 (r285860) +++ releng/10.2/usr.sbin/ntp/config.h Fri Jul 24 22:08:57 2015 (r285861) @@ -1785,3 +1785,8 @@ typedef union mpinfou { # endif #endif /* !defined(_KERNEL) !defined(PARSESTREAM) */ +/* + * FreeBSD specific: Explicitly specify date/time for reproducible build. + */ +#defineMKREPRO_DATE Jul 04 2015 +#defineMKREPRO_TIME 15:42:16 Modified: releng/10.2/usr.sbin/ntp/ntpd/Makefile == --- releng/10.2/usr.sbin/ntp/ntpd/Makefile Fri Jul 24 22:00:44 2015 (r285860) +++ releng/10.2/usr.sbin/ntp/ntpd/Makefile Fri Jul 24 22:08:57 2015 (r285861) @@ -27,8 +27,8 @@ SRCS= cmd_args.c ntp_config.c ntp_contro refclock_tt560.c refclock_ulink.c refclock_wwv.c refclock_wwvb.c \ refclock_zyfer.c version.c -DPADD= ${LIBPARSE} ${LIBNTP} ${LIBM} ${LIBMD} ${LIBOPTS} ${LIBPTHREAD} -LDADD= ${LIBPARSE} ${LIBNTP} -lm -lmd ${LIBOPTS} -lpthread +DPADD= ${LIBPARSE} ${LIBNTP} ${LIBM} ${LIBOPTS} ${LIBPTHREAD} +LDADD= ${LIBPARSE} ${LIBNTP} -lm ${LIBOPTS} -lpthread CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/ntpd \ -I${.CURDIR}/../../../contrib/ntp/include \ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r285862 - head/sys/kern
Author: delphij Date: Fri Jul 24 22:13:39 2015 New Revision: 285862 URL: https://svnweb.freebsd.org/changeset/base/285862 Log: Fix a typo in comment. Submitted by: Yanhui Shen via twitter MFC after:3 days Modified: head/sys/kern/uipc_socket.c Modified: head/sys/kern/uipc_socket.c == --- head/sys/kern/uipc_socket.c Fri Jul 24 22:08:57 2015(r285861) +++ head/sys/kern/uipc_socket.c Fri Jul 24 22:13:39 2015(r285862) @@ -440,7 +440,7 @@ sodealloc(struct socket *so) if (so-so_snd.sb_hiwat) (void)chgsbsize(so-so_cred-cr_uidinfo, so-so_snd.sb_hiwat, 0, RLIM_INFINITY); - /* remove acccept filter if one is present. */ + /* remove accept filter if one is present. */ if (so-so_accf != NULL) do_setopt_accept_filter(so, NULL); #ifdef MAC ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r285837 - head/sys/netinet
Author: rrs Date: Fri Jul 24 14:09:03 2015 New Revision: 285837 URL: https://svnweb.freebsd.org/changeset/base/285837 Log: Fix an issue with MAC OS locking and also optimize the case where we are sending back a stream-reset and a sack timer is running, in that case we should just send the SACK. MFC after:3 weeks Modified: head/sys/netinet/sctp_input.c head/sys/netinet/sctp_output.c head/sys/netinet/sctp_output.h head/sys/netinet/sctp_usrreq.c Modified: head/sys/netinet/sctp_input.c == --- head/sys/netinet/sctp_input.c Fri Jul 24 09:20:02 2015 (r285836) +++ head/sys/netinet/sctp_input.c Fri Jul 24 14:09:03 2015 (r285837) @@ -3764,7 +3764,7 @@ sctp_handle_stream_reset_response(struct } } if (asoc-stream_reset_outstanding == 0) { - sctp_send_stream_reset_out_if_possible(stcb); + sctp_send_stream_reset_out_if_possible(stcb, SCTP_SO_NOT_LOCKED); } return (0); } @@ -3832,7 +3832,7 @@ bad_boy: } else { sctp_add_stream_reset_result(chk, seq, SCTP_STREAM_RESET_RESULT_ERR_BAD_SEQNO); } - sctp_send_stream_reset_out_if_possible(stcb); + sctp_send_stream_reset_out_if_possible(stcb, SCTP_SO_NOT_LOCKED); } static int @@ -3957,6 +3957,7 @@ sctp_handle_str_reset_request_out(struct memcpy(liste-list_of_streams, req-list_of_streams, number_entries * sizeof(uint16_t)); TAILQ_INSERT_TAIL(asoc-resetHead, liste, next_resp); asoc-last_reset_action[0] = SCTP_STREAM_RESET_RESULT_IN_PROGRESS; + x } sctp_add_stream_reset_result(chk, seq, asoc-last_reset_action[0]); asoc-str_reset_seq_in++; Modified: head/sys/netinet/sctp_output.c == --- head/sys/netinet/sctp_output.c Fri Jul 24 09:20:02 2015 (r285836) +++ head/sys/netinet/sctp_output.c Fri Jul 24 14:09:03 2015 (r285837) @@ -10104,7 +10104,7 @@ do_it_again: sctp_fix_ecn_echo(asoc); if (stcb-asoc.trigger_reset) { - if (sctp_send_stream_reset_out_if_possible(stcb) == 0) { + if (sctp_send_stream_reset_out_if_possible(stcb, so_locked) == 0) { goto do_it_again; } } @@ -11839,7 +11839,7 @@ sctp_add_an_in_stream(struct sctp_tmit_c } int -sctp_send_stream_reset_out_if_possible(struct sctp_tcb *stcb) +sctp_send_stream_reset_out_if_possible(struct sctp_tcb *stcb, int so_locked) { struct sctp_association *asoc; struct sctp_tmit_chunk *chk; @@ -11865,7 +11865,7 @@ sctp_send_stream_reset_out_if_possible(s chk-book_size_scale = 0; chk-data = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_NOWAIT, 1, MT_DATA); if (chk-data == NULL) { - sctp_free_a_chunk(stcb, chk, SCTP_SO_LOCKED); + sctp_free_a_chunk(stcb, chk, so_locked); SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTP_OUTPUT, ENOMEM); return (ENOMEM); } @@ -11892,7 +11892,7 @@ sctp_send_stream_reset_out_if_possible(s } else { m_freem(chk-data); chk-data = NULL; - sctp_free_a_chunk(stcb, chk, SCTP_SO_LOCKED); + sctp_free_a_chunk(stcb, chk, so_locked); return (ENOENT); } asoc-str_reset = chk; @@ -11901,6 +11901,10 @@ sctp_send_stream_reset_out_if_possible(s chk, sctp_next); asoc-ctrl_queue_cnt++; + + if (stcb-asoc.send_sack) { + sctp_send_sack(stcb, so_locked); + } sctp_timer_start(SCTP_TIMER_TYPE_STRRESET, stcb-sctp_ep, stcb, chk-whoTo); return (0); } @@ -12101,6 +12105,9 @@ skip_stuff: chk, sctp_next); asoc-ctrl_queue_cnt++; + if (stcb-asoc.send_sack) { + sctp_send_sack(stcb, SCTP_SO_LOCKED); + } sctp_timer_start(SCTP_TIMER_TYPE_STRRESET, stcb-sctp_ep, stcb, chk-whoTo); return (0); } Modified: head/sys/netinet/sctp_output.h == --- head/sys/netinet/sctp_output.h Fri Jul 24 09:20:02 2015 (r285836) +++ head/sys/netinet/sctp_output.h Fri Jul 24 14:09:03 2015 (r285837) @@ -181,7 +181,7 @@ void sctp_add_stream_reset_result_tsn(struct sctp_tmit_chunk *, uint32_t, uint32_t, uint32_t, uint32_t); int -sctp_send_stream_reset_out_if_possible(struct sctp_tcb *); +sctp_send_stream_reset_out_if_possible(struct sctp_tcb *, int); int sctp_send_str_reset_req(struct sctp_tcb *, uint16_t, uint16_t *, Modified: head/sys/netinet/sctp_usrreq.c
svn commit: r285838 - head/sys/netinet
Author: rrs Date: Fri Jul 24 14:13:43 2015 New Revision: 285838 URL: https://svnweb.freebsd.org/changeset/base/285838 Log: Fix silly syntax error emacs chugged in for me.. gesh. MFC after:3 weeks Modified: head/sys/netinet/sctp_input.c Modified: head/sys/netinet/sctp_input.c == --- head/sys/netinet/sctp_input.c Fri Jul 24 14:09:03 2015 (r285837) +++ head/sys/netinet/sctp_input.c Fri Jul 24 14:13:43 2015 (r285838) @@ -3957,7 +3957,6 @@ sctp_handle_str_reset_request_out(struct memcpy(liste-list_of_streams, req-list_of_streams, number_entries * sizeof(uint16_t)); TAILQ_INSERT_TAIL(asoc-resetHead, liste, next_resp); asoc-last_reset_action[0] = SCTP_STREAM_RESET_RESULT_IN_PROGRESS; - x } sctp_add_stream_reset_result(chk, seq, asoc-last_reset_action[0]); asoc-str_reset_seq_in++; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r285848 - svnadmin/conf
Author: gjb Date: Fri Jul 24 19:05:08 2015 New Revision: 285848 URL: https://svnweb.freebsd.org/changeset/base/285848 Log: The stable/10 branch no longer requires explicit re@ approval for commits. Committers are asked to please exercise caution when merging changes to stable/10 for the duration of the 10.2-RELEASE cycle. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: svnadmin/conf/approvers Modified: svnadmin/conf/approvers == --- svnadmin/conf/approvers Fri Jul 24 18:14:57 2015(r285847) +++ svnadmin/conf/approvers Fri Jul 24 19:05:08 2015(r285848) @@ -17,7 +17,7 @@ # $FreeBSD$ # #^head/re -^stable/10/re +#^stable/10/ re ^releng/10.2/ re ^releng/10.[0-1]/ (security-officer|so) ^releng/9.[0-3]/ (security-officer|so) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r285849 - stable/10/usr.sbin/pmcstudy
Author: emaste Date: Fri Jul 24 19:09:11 2015 New Revision: 285849 URL: https://svnweb.freebsd.org/changeset/base/285849 Log: MFC r277485 by rrs: Fix minor errors found by coverity. PR: 201594 Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/pmcstudy/pmcstudy.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pmcstudy/pmcstudy.c == --- stable/10/usr.sbin/pmcstudy/pmcstudy.c Fri Jul 24 19:05:08 2015 (r285848) +++ stable/10/usr.sbin/pmcstudy/pmcstudy.c Fri Jul 24 19:09:11 2015 (r285849) @@ -1808,6 +1808,9 @@ process_file(char *filename) if (cnts == NULL) { /* Nothing we can do */ printf(Nothing to do -- no counters built\n); + if (io) { + fclose(io); + } return; } lace_cpus_together(); @@ -2044,7 +2047,7 @@ get_cpuid_set(void) printf(No memory3 allocation fails at startup?\n); exit(-1); } - memset(more, sz, 0); + memset(more, 0, sz); memcpy(more, valid_pmcs, sz); pmc_allocated_cnt *= 2; free(valid_pmcs); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r285803 - head/bin/ls
On 2015-07-24 13:58, Antoine Brodin wrote: On Wed, Jul 22, 2015 at 9:58 PM, Allan Jude allanj...@freebsd.org wrote: Author: allanjude (doc committer) Date: Wed Jul 22 19:58:21 2015 New Revision: 285803 URL: https://svnweb.freebsd.org/changeset/base/285803 Log: Remove an excess space accidently introduced in the output in ls(1) by r285734 Spotted by: dim Approved by: eadler (mentor) Sponsored by: ScaleEngine Inc. Differential Revision:https://reviews.freebsd.org/D3152 Modified: head/bin/ls/print.c Hi, Some recent (less than 5 days old) changes on ls(1) broke it on i386, and more than 8000 ports are affected by this. See for instance http://beefy3.nyi.freebsd.org/data/head-i386-default/p392703_s285807/logs/errors/autoconf-2.69.log From the log: %%% gmake[3]: Entering directory '/wrkdirs/usr/ports/devel/autoconf/work/autoconf-2.69/doc' Segmentation fault (core dumped) ../build-aux/mdate-sh: failed parsing 'ls -L -l -d -n /' output Updating ./version.texi %%% It used to build fine with r285732 and doesn't work anymore at r285807. Cheers, Antoine Modified: head/bin/ls/print.c == --- head/bin/ls/print.c Wed Jul 22 19:55:32 2015(r285802) +++ head/bin/ls/print.c Wed Jul 22 19:58:21 2015(r285803) @@ -456,7 +456,7 @@ printtime(const char *field, time_t ftim snprintf(fmt, sizeof(fmt), {d:%s/%%hs} , field); xo_attr(value, %ld, (long) ftime); xo_emit(fmt, longstring); - snprintf(fmt, sizeof(fmt), {en:%s/%%ld} , field); + snprintf(fmt, sizeof(fmt), {en:%s/%%ld}, field); xo_emit(fmt, (long) ftime); } The r285734 change didn't explicitly cast some references to uid_t, resulting in a segfault on i386. Clang generated a warning about this immediately while I was debugging when I duplicated the xo_emit command as a printf. Can we teach our clang that xo_emit is printf, and so the same formatting type matching should be checked? That would be very helpful. I have posted a review for the fix: https://reviews.freebsd.org/D3191 -- Allan Jude ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r285851 - stable/10/usr.sbin/bsnmpd/modules/snmp_hostres
Author: pfg Date: Fri Jul 24 19:21:48 2015 New Revision: 285851 URL: https://svnweb.freebsd.org/changeset/base/285851 Log: MFC r285719: snmp_hostres(3): Fix buffer overflow. Actually just a typo. Detected by gcc + FORTIFY_SOURCE patches. CID: 1007594 Modified: stable/10/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_printer_tbl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_printer_tbl.c == --- stable/10/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_printer_tbl.c Fri Jul 24 19:16:16 2015(r285850) +++ stable/10/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_printer_tbl.c Fri Jul 24 19:21:48 2015(r285851) @@ -175,7 +175,7 @@ get_printer_status(const struct printer goto LABEL_DONE; } - memset(fline[0], '\0', sizeof(line)); + memset(fline[0], '\0', sizeof(fline)); if (fgets(fline, sizeof(fline) -1, f) == NULL) { ps = PS_UNKNOWN; goto LABEL_DONE; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r285852 - stable/9/usr.sbin/bsnmpd/modules/snmp_hostres
Author: pfg Date: Fri Jul 24 19:26:06 2015 New Revision: 285852 URL: https://svnweb.freebsd.org/changeset/base/285852 Log: MFC r285719: snmp_hostres(3): Fix buffer overflow. Actually just a typo. Detected by gcc + FORTIFY_SOURCE patches. CID: 1007594 Modified: stable/9/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_printer_tbl.c Directory Properties: stable/9/usr.sbin/bsnmpd/ (props changed) stable/9/usr.sbin/bsnmpd/modules/snmp_hostres/ (props changed) Modified: stable/9/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_printer_tbl.c == --- stable/9/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_printer_tbl.c Fri Jul 24 19:21:48 2015(r285851) +++ stable/9/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_printer_tbl.c Fri Jul 24 19:26:06 2015(r285852) @@ -175,7 +175,7 @@ get_printer_status(const struct printer goto LABEL_DONE; } - memset(fline[0], '\0', sizeof(line)); + memset(fline[0], '\0', sizeof(fline)); if (fgets(fline, sizeof(fline) -1, f) == NULL) { ps = PS_UNKNOWN; goto LABEL_DONE; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r285855 - in releng/10.2/release/doc: en_US.ISO8859-1/readme share/xml
Author: gjb Date: Fri Jul 24 19:50:55 2015 New Revision: 285855 URL: https://svnweb.freebsd.org/changeset/base/285855 Log: Fix rendering of a URL. Update entities to reflect 10.2-RELEASE in preparation for adding the hardware, relnotes, and installation pages to the website. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/10.2/release/doc/en_US.ISO8859-1/readme/article.xml releng/10.2/release/doc/share/xml/release.ent Modified: releng/10.2/release/doc/en_US.ISO8859-1/readme/article.xml == --- releng/10.2/release/doc/en_US.ISO8859-1/readme/article.xml Fri Jul 24 19:43:18 2015(r285854) +++ releng/10.2/release/doc/en_US.ISO8859-1/readme/article.xml Fri Jul 24 19:50:55 2015(r285855) @@ -349,8 +349,9 @@ other copies are kept updated on the Internet and should be consulted as the quotecurrent errata/quote for this release. These other copies of the errata are located at - uri - xlink:href=url.base;/releases/url.base;/releases//uri + the uri + xlink:href=url.base;/releases/os;nbsp;release.current; + page/uri (as well as any sites which keep up-to-date mirrors of this location)./para /note Modified: releng/10.2/release/doc/share/xml/release.ent == --- releng/10.2/release/doc/share/xml/release.ent Fri Jul 24 19:43:18 2015(r285854) +++ releng/10.2/release/doc/share/xml/release.ent Fri Jul 24 19:50:55 2015(r285855) @@ -6,7 +6,7 @@ !-- Version of the OS we're describing. This needs to be updated with each new release. -- -!ENTITY release.current 10.1-STABLE +!ENTITY release.current 10.2-RELEASE !-- The previous version used for comparison in the What's New section. For -CURRENT, we might point back to the last @@ -16,16 +16,16 @@ !-- The previous stable release, useful for pointing user's at the release they SHOULD be running if they don't want the bleeding edge. -- -!ENTITY release.prev.stable 10.0-RELEASE +!ENTITY release.prev.stable 10.1-RELEASE !-- The next version to be released, usually used for snapshots. -- -!ENTITY release.next 10.2-RELEASE +!ENTITY release.next 10.3-RELEASE !-- The name of this branch. -- -!ENTITY release.branch 10.1-STABLE +!ENTITY release.branch 10.2-STABLE !-- The URL for obtaining this version of FreeBSD. -- -!ENTITY release.url https://www.FreeBSD.org/snapshots/; +!ENTITY release.url https://www.FreeBSD.org/releases/; !-- The URL for Security Advisories and Errata Notices. -- !ENTITY security.url https://www.FreeBSD.org/security/advisories; @@ -37,10 +37,10 @@ or release -- !-- WARNING: Do not forget to also change the release type in doc.relnotes.mk when updating this -- -!ENTITY release.type snapshot -!ENTITY % release.type.current INCLUDE +!ENTITY release.type release +!ENTITY % release.type.current IGNORE !ENTITY % release.type.snapshot IGNORE -!ENTITY % release.type.release IGNORE +!ENTITY % release.type.release INCLUDE ![%release.type.current;[ !ENTITY release 'release.current;' ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r285850 - releng/10.2/release/pkg_repos
Author: gjb Date: Fri Jul 24 19:16:16 2015 New Revision: 285850 URL: https://svnweb.freebsd.org/changeset/base/285850 Log: Update the pkg.conf(5) for the dvd1.iso packages to use the 'quarterly' branch, which was missed in r285830. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/10.2/release/pkg_repos/release-dvd.conf Modified: releng/10.2/release/pkg_repos/release-dvd.conf == --- releng/10.2/release/pkg_repos/release-dvd.conf Fri Jul 24 19:09:11 2015(r285849) +++ releng/10.2/release/pkg_repos/release-dvd.conf Fri Jul 24 19:16:16 2015(r285850) @@ -1,6 +1,6 @@ # $FreeBSD$ release: { - url: pkg+http://pkg.FreeBSD.org/${ABI}/latest;, + url: pkg+http://pkg.FreeBSD.org/${ABI}/quarterly;, mirror_type: srv, signature_type: fingerprints, fingerprints: /usr/share/keys/pkg, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r285853 - releng/10.2/usr.sbin/pmcstudy
Author: emaste Date: Fri Jul 24 19:37:30 2015 New Revision: 285853 URL: https://svnweb.freebsd.org/changeset/base/285853 Log: MFS r285849: Fix minor errors found by coverity. PR: 201594 Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Modified: releng/10.2/usr.sbin/pmcstudy/pmcstudy.c Directory Properties: releng/10.2/ (props changed) Modified: releng/10.2/usr.sbin/pmcstudy/pmcstudy.c == --- releng/10.2/usr.sbin/pmcstudy/pmcstudy.cFri Jul 24 19:26:06 2015 (r285852) +++ releng/10.2/usr.sbin/pmcstudy/pmcstudy.cFri Jul 24 19:37:30 2015 (r285853) @@ -1808,6 +1808,9 @@ process_file(char *filename) if (cnts == NULL) { /* Nothing we can do */ printf(Nothing to do -- no counters built\n); + if (io) { + fclose(io); + } return; } lace_cpus_together(); @@ -2044,7 +2047,7 @@ get_cpuid_set(void) printf(No memory3 allocation fails at startup?\n); exit(-1); } - memset(more, sz, 0); + memset(more, 0, sz); memcpy(more, valid_pmcs, sz); pmc_allocated_cnt *= 2; free(valid_pmcs); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r285803 - head/bin/ls
On 07/24/15 14:10, Allan Jude wrote: ... The r285734 change didn't explicitly cast some references to uid_t, resulting in a segfault on i386. Clang generated a warning about this immediately while I was debugging when I duplicated the xo_emit command as a printf. Can we teach our clang that xo_emit is printf, and so the same formatting type matching should be checked? That would be very helpful. Perhaps something like this? (untested) Pedro. Index: contrib/libxo/libxo/xo.h === --- contrib/libxo/libxo/xo.h (revision 285847) +++ contrib/libxo/libxo/xo.h (working copy) @@ -160,10 +160,10 @@ xo_emit_hv (xo_handle_t *xop, const char *fmt, va_list vap); int -xo_emit_h (xo_handle_t *xop, const char *fmt, ...); +xo_emit_h (xo_handle_t *xop, const char *fmt, ...) PRINTFLIKE(2, 3) ; int -xo_emit (const char *fmt, ...); +xo_emit (const char *fmt, ...) PRINTFLIKE(1, 2); int xo_open_container_h (xo_handle_t *xop, const char *name); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r285856 - in stable/10/usr.sbin/ntp: . ntpd
Author: delphij Date: Fri Jul 24 19:51:51 2015 New Revision: 285856 URL: https://svnweb.freebsd.org/changeset/base/285856 Log: MFC r285701: Use fixed date/time (the time choosen was the time the import was done on -HEAD) in libntp so we can make reproducible build. PR: bin/201661 Differential Revision:https://reviews.freebsd.org/D3122 While I'm there also remove libmd from linkage as reported in bin/201738 PR: bin/201738 Submitted by: John Marshall Modified: stable/10/usr.sbin/ntp/config.h stable/10/usr.sbin/ntp/ntpd/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ntp/config.h == --- stable/10/usr.sbin/ntp/config.h Fri Jul 24 19:50:55 2015 (r285855) +++ stable/10/usr.sbin/ntp/config.h Fri Jul 24 19:51:51 2015 (r285856) @@ -1785,3 +1785,8 @@ typedef union mpinfou { # endif #endif /* !defined(_KERNEL) !defined(PARSESTREAM) */ +/* + * FreeBSD specific: Explicitly specify date/time for reproducible build. + */ +#defineMKREPRO_DATE Jul 04 2015 +#defineMKREPRO_TIME 15:42:16 Modified: stable/10/usr.sbin/ntp/ntpd/Makefile == --- stable/10/usr.sbin/ntp/ntpd/MakefileFri Jul 24 19:50:55 2015 (r285855) +++ stable/10/usr.sbin/ntp/ntpd/MakefileFri Jul 24 19:51:51 2015 (r285856) @@ -27,8 +27,8 @@ SRCS= cmd_args.c ntp_config.c ntp_contro refclock_tt560.c refclock_ulink.c refclock_wwv.c refclock_wwvb.c \ refclock_zyfer.c version.c -DPADD= ${LIBPARSE} ${LIBNTP} ${LIBM} ${LIBMD} ${LIBOPTS} ${LIBPTHREAD} -LDADD= ${LIBPARSE} ${LIBNTP} -lm -lmd ${LIBOPTS} -lpthread +DPADD= ${LIBPARSE} ${LIBNTP} ${LIBM} ${LIBOPTS} ${LIBPTHREAD} +LDADD= ${LIBPARSE} ${LIBNTP} -lm ${LIBOPTS} -lpthread CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/ntpd \ -I${.CURDIR}/../../../contrib/ntp/include \ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r285803 - head/bin/ls
On 2015-07-24 15:41, Pedro Giffuni wrote: On 07/24/15 14:10, Allan Jude wrote: ... The r285734 change didn't explicitly cast some references to uid_t, resulting in a segfault on i386. Clang generated a warning about this immediately while I was debugging when I duplicated the xo_emit command as a printf. Can we teach our clang that xo_emit is printf, and so the same formatting type matching should be checked? That would be very helpful. Perhaps something like this? (untested) Pedro. Yes, jhb@ pointed me in the same direction, and I have already submitted it upstream. It seems they already had it on some things, just not the most useful case. https://github.com/Juniper/libxo/pull/45 -- Allan Jude ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r285854 - head/sys/amd64/include
Author: alc Date: Fri Jul 24 19:43:18 2015 New Revision: 285854 URL: https://svnweb.freebsd.org/changeset/base/285854 Log: Add a comment discussing the appropriate use of the atomic_*() functions with acquire and release semantics versus the *mb() functions on amd64 processors. Reviewed by: bde (an earlier version), kib Sponsored by: EMC / Isilon Storage Division Modified: head/sys/amd64/include/atomic.h Modified: head/sys/amd64/include/atomic.h == --- head/sys/amd64/include/atomic.h Fri Jul 24 19:37:30 2015 (r285853) +++ head/sys/amd64/include/atomic.h Fri Jul 24 19:43:18 2015 (r285854) @@ -32,6 +32,25 @@ #error this file needs sys/cdefs.h as a prerequisite #endif +/* + * To express interprocessor (as opposed to processor and device) memory + * ordering constraints, use the atomic_*() functions with acquire and release + * semantics rather than the *mb() functions. An architecture's memory + * ordering (or memory consistency) model governs the order in which a + * program's accesses to different locations may be performed by an + * implementation of that architecture. In general, for memory regions + * defined as writeback cacheable, the memory ordering implemented by amd64 + * processors preserves the program ordering of a load followed by a load, a + * load followed by a store, and a store followed by a store. Only a store + * followed by a load to a different memory location may be reordered. + * Therefore, except for special cases, like non-temporal memory accesses or + * memory regions defined as write combining, the memory ordering effects + * provided by the sfence instruction in the wmb() function and the lfence + * instruction in the rmb() function are redundant. In contrast, the + * atomic_*() functions with acquire and release semantics do not perform + * redundant instructions for ordinary cases of interprocessor memory + * ordering on any architecture. + */ #definemb()__asm __volatile(mfence; : : : memory) #definewmb() __asm __volatile(sfence; : : : memory) #definermb() __asm __volatile(lfence; : : : memory) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r285803 - head/bin/ls
On Wed, Jul 22, 2015 at 9:58 PM, Allan Jude allanj...@freebsd.org wrote: Author: allanjude (doc committer) Date: Wed Jul 22 19:58:21 2015 New Revision: 285803 URL: https://svnweb.freebsd.org/changeset/base/285803 Log: Remove an excess space accidently introduced in the output in ls(1) by r285734 Spotted by: dim Approved by: eadler (mentor) Sponsored by: ScaleEngine Inc. Differential Revision:https://reviews.freebsd.org/D3152 Modified: head/bin/ls/print.c Hi, Some recent (less than 5 days old) changes on ls(1) broke it on i386, and more than 8000 ports are affected by this. See for instance http://beefy3.nyi.freebsd.org/data/head-i386-default/p392703_s285807/logs/errors/autoconf-2.69.log From the log: %%% gmake[3]: Entering directory '/wrkdirs/usr/ports/devel/autoconf/work/autoconf-2.69/doc' Segmentation fault (core dumped) ../build-aux/mdate-sh: failed parsing 'ls -L -l -d -n /' output Updating ./version.texi %%% It used to build fine with r285732 and doesn't work anymore at r285807. Cheers, Antoine Modified: head/bin/ls/print.c == --- head/bin/ls/print.c Wed Jul 22 19:55:32 2015(r285802) +++ head/bin/ls/print.c Wed Jul 22 19:58:21 2015(r285803) @@ -456,7 +456,7 @@ printtime(const char *field, time_t ftim snprintf(fmt, sizeof(fmt), {d:%s/%%hs} , field); xo_attr(value, %ld, (long) ftime); xo_emit(fmt, longstring); - snprintf(fmt, sizeof(fmt), {en:%s/%%ld} , field); + snprintf(fmt, sizeof(fmt), {en:%s/%%ld}, field); xo_emit(fmt, (long) ftime); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r285846 - head/lib/libc/sys
Author: trasz Date: Fri Jul 24 18:13:13 2015 New Revision: 285846 URL: https://svnweb.freebsd.org/changeset/base/285846 Log: Add missing capitalization. Modified: head/lib/libc/sys/reboot.2 Modified: head/lib/libc/sys/reboot.2 == --- head/lib/libc/sys/reboot.2 Fri Jul 24 18:00:53 2015(r285845) +++ head/lib/libc/sys/reboot.2 Fri Jul 24 18:13:13 2015(r285846) @@ -82,7 +82,7 @@ Dump kernel memory before rebooting; see .Xr savecore 8 for more information. .It Dv RB_HALT -the processor is simply halted; no reboot takes place. +The processor is simply halted; no reboot takes place. This option should be used with caution. .It Dv RB_POWEROFF After halting, the shutdown code will do what it can to turn ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r285859 - head/release/doc/en_US.ISO8859-1/hardware
Author: brueffer Date: Fri Jul 24 21:55:16 2015 New Revision: 285859 URL: https://svnweb.freebsd.org/changeset/base/285859 Log: Auto-generate hardware notes for pms(4). MFC after:1 week Committed from: Essen FreeBSD Hackathon Modified: head/release/doc/en_US.ISO8859-1/hardware/article.xml Modified: head/release/doc/en_US.ISO8859-1/hardware/article.xml == --- head/release/doc/en_US.ISO8859-1/hardware/article.xml Fri Jul 24 21:48:53 2015(r285858) +++ head/release/doc/en_US.ISO8859-1/hardware/article.xml Fri Jul 24 21:55:16 2015(r285859) @@ -731,6 +731,8 @@ hwlist.nsp; + hwlist.pms; + hwlist.pst; hwlist.siis; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r285860 - releng/10.2/release/doc/share/xml
Author: gjb Date: Fri Jul 24 22:00:44 2015 New Revision: 285860 URL: https://svnweb.freebsd.org/changeset/base/285860 Log: Add a local entity for the pms(4) driver. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/10.2/release/doc/share/xml/release.ent Modified: releng/10.2/release/doc/share/xml/release.ent == --- releng/10.2/release/doc/share/xml/release.ent Fri Jul 24 21:55:16 2015(r285859) +++ releng/10.2/release/doc/share/xml/release.ent Fri Jul 24 22:00:44 2015(r285860) @@ -76,3 +76,6 @@ !ENTITY arch.pc98 pc98 !ENTITY arch.powerpc powerpc !ENTITY arch.sparc64 sparc64 + +!-- Manual page references added after the doc tag -- +!ENTITY man.pms.4 citerefentry xmlns='http://docbook.org/ns/docbook'refentrytitlepms/refentrytitlemanvolnum4/manvolnum/citerefentry ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r285863 - in stable/10/sys/dev: pccbb pci
Author: jhb Date: Sat Jul 25 00:14:02 2015 New Revision: 285863 URL: https://svnweb.freebsd.org/changeset/base/285863 Log: Partially revert r284034. In particular, revert the final change in this MFC (281874). It broke suspend and resume on several Thinkpads (though not all) in 10 even though it works fine on the same laptops in HEAD. PR: 201239 Reported by: Kevin Oberman and several others Modified: stable/10/sys/dev/pccbb/pccbb_pci.c stable/10/sys/dev/pci/pci.c stable/10/sys/dev/pci/pci_pci.c stable/10/sys/dev/pci/pcib_private.h stable/10/sys/dev/pci/pcivar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/pccbb/pccbb_pci.c == --- stable/10/sys/dev/pccbb/pccbb_pci.c Fri Jul 24 22:13:39 2015 (r285862) +++ stable/10/sys/dev/pccbb/pccbb_pci.c Sat Jul 25 00:14:02 2015 (r285863) @@ -259,6 +259,32 @@ cbb_pci_probe(device_t brdev) } /* + * Still need this because the pci code only does power for type 0 + * header devices. + */ +static void +cbb_powerstate_d0(device_t dev) +{ + u_int32_t membase, irq; + + if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) { + /* Save important PCI config data. */ + membase = pci_read_config(dev, CBBR_SOCKBASE, 4); + irq = pci_read_config(dev, PCIR_INTLINE, 4); + + /* Reset the power state. */ + device_printf(dev, chip is in D%d power mode + -- setting to D0\n, pci_get_powerstate(dev)); + + pci_set_powerstate(dev, PCI_POWERSTATE_D0); + + /* Restore PCI config data. */ + pci_write_config(dev, CBBR_SOCKBASE, membase, 4); + pci_write_config(dev, PCIR_INTLINE, irq, 4); + } +} + +/* * Print out the config space */ static void @@ -295,15 +321,15 @@ cbb_pci_attach(device_t brdev) sc-cbdev = NULL; sc-exca[0].pccarddev = NULL; sc-domain = pci_get_domain(brdev); + sc-bus.sec = pci_read_config(brdev, PCIR_SECBUS_2, 1); + sc-bus.sub = pci_read_config(brdev, PCIR_SUBBUS_2, 1); sc-pribus = pcib_get_bus(parent); #if defined(NEW_PCIB) defined(PCI_RES_BUS) pci_write_config(brdev, PCIR_PRIBUS_2, sc-pribus, 1); pcib_setup_secbus(brdev, sc-bus, 1); -#else - sc-bus.sec = pci_read_config(brdev, PCIR_SECBUS_2, 1); - sc-bus.sub = pci_read_config(brdev, PCIR_SUBBUS_2, 1); #endif SLIST_INIT(sc-rl); + cbb_powerstate_d0(brdev); rid = CBBR_SOCKBASE; sc-base_res = bus_alloc_resource_any(brdev, SYS_RES_MEMORY, rid, @@ -448,6 +474,11 @@ cbb_chipinit(struct cbb_softc *sc) if (pci_read_config(sc-dev, PCIR_LATTIMER, 1) 0x20) pci_write_config(sc-dev, PCIR_LATTIMER, 0x20, 1); + /* Restore bus configuration */ + pci_write_config(sc-dev, PCIR_PRIBUS_2, sc-pribus, 1); + pci_write_config(sc-dev, PCIR_SECBUS_2, sc-bus.sec, 1); + pci_write_config(sc-dev, PCIR_SUBBUS_2, sc-bus.sub, 1); + /* Enable DMA, memory access for this card and I/O acces for children */ pci_enable_busmaster(sc-dev); pci_enable_io(sc-dev, SYS_RES_IOPORT); @@ -875,10 +906,15 @@ cbb_pci_resume(device_t brdev) * from D0 and back to D0 cause the bridge to lose its config space, so * all the bus mappings and such are preserved. * -* The PCI layer handles standard PCI registers like the -* command register and BARs, but cbb-specific registers are -* handled here. +* For most drivers, the PCI layer handles this saving. However, since +* there's much black magic and arcane art hidden in these few lines of +* code that would be difficult to transition into the PCI +* layer. chipinit was several years of trial and error to write. */ + pci_write_config(brdev, CBBR_SOCKBASE, rman_get_start(sc-base_res), 4); + DEVPRINTF((brdev, PCI Memory allocated: %08lx\n, + rman_get_start(sc-base_res))); + sc-chipinit(sc); /* reset interrupt -- Do we really need to do this? */ Modified: stable/10/sys/dev/pci/pci.c == --- stable/10/sys/dev/pci/pci.c Fri Jul 24 22:13:39 2015(r285862) +++ stable/10/sys/dev/pci/pci.c Sat Jul 25 00:14:02 2015(r285863) @@ -590,19 +590,9 @@ pci_hdrtypedata(device_t pcib, int b, in cfg-nummaps= PCI_MAXMAPS_0; break; case PCIM_HDRTYPE_BRIDGE: - cfg-bridge.br_seclat = REG(PCIR_SECLAT_1, 1); - cfg-bridge.br_subbus = REG(PCIR_SUBBUS_1, 1); - cfg-bridge.br_secbus = REG(PCIR_SECBUS_1, 1); - cfg-bridge.br_pribus = REG(PCIR_PRIBUS_1, 1); - cfg-bridge.br_control = REG(PCIR_BRIDGECTL_1, 2); cfg-nummaps
svn commit: r285865 - head/sys/dev/ofw
Author: gonzo Date: Sat Jul 25 00:58:50 2015 New Revision: 285865 URL: https://svnweb.freebsd.org/changeset/base/285865 Log: OF_getencprop_alloc shouldn't be used to get string value. If string length + 1 is not divisible by 4 this function returns NULL property value. Otherwise - string with each 4 letters inverted Modified: head/sys/dev/ofw/ofw_bus_subr.c Modified: head/sys/dev/ofw/ofw_bus_subr.c == --- head/sys/dev/ofw/ofw_bus_subr.c Sat Jul 25 00:21:29 2015 (r285864) +++ head/sys/dev/ofw/ofw_bus_subr.c Sat Jul 25 00:58:50 2015 (r285865) @@ -395,7 +395,7 @@ ofw_bus_reg_to_rl(device_t dev, phandle_ * This may be just redundant when having ofw_bus_devinfo * but makes this routine independent of it. */ - ret = OF_getencprop_alloc(node, name, sizeof(*name), (void **)name); + ret = OF_getprop_alloc(node, name, sizeof(*name), (void **)name); if (ret == -1) name = NULL; @@ -511,7 +511,7 @@ ofw_bus_find_child(phandle_t start, cons phandle_t child; for (child = OF_child(start); child != 0; child = OF_peer(child)) { - ret = OF_getencprop_alloc(child, name, sizeof(*name), (void **)name); + ret = OF_getprop_alloc(child, name, sizeof(*name), (void **)name); if (ret == -1) continue; if (strcmp(name, child_name) == 0) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r284959 - in head: . share/man/man4 share/man/man9 sys/conf sys/dev/glxsb sys/dev/hifn sys/dev/random sys/dev/rndtest sys/dev/safe sys/dev/syscons sys/dev/ubsec sys/dev/virtio/random s
On Jul 24, 2015, at 12:59 AM, Mark R V Murray ma...@freebsd.org wrote: On 24 Jul 2015, at 02:25, John-Mark Gurney j...@funkthat.com wrote: I would like to point out that the goal of collecting large amounts is starting to fall out of favor, and I happen to agree with the likes of djb[1] that we don't need an infinite amount of entropy collected by the system. If the attacker can read out our RNG state, then we are already screwed due to many other vulns. I’m working on a premise of “tools, not policy”. I’d like there to be enough harvesting points for the box owner to get the warm fuzzies. If they choose to use less, fine by me. Sure, and that’s not an unreasonable goal, but the devil is in the details. It’s an unfortunate fact of modern CPU architecture that even something as simple and innocent as a run-time control that checks a variable can cause significant performance problems, thanks to the penalty of cache misses and bus contention between lots of CPU cores. Maybe these “extended” collection points should be controlled with a compile-time option? Many of the issues that FreeBSD sees with lack of entropy at start up is more of a problem on how systems are installed and provisioned. I don't believe that we currently store any entropy from the install process, yet this is one of the best places to get it, the user is banging on keyboard selecting options, etc. If an image is designed to be cloned (vm images or appliance images) we need to have a mechanism to ensure that before we start, we get the entropy from other sources, be it a hardware RNG or the console. Getting an initial entropy bundle for first boot is high up on my TODO list. :-) Patches welcome! We need the usual /entropy (or /var/db/entropy/… or whatever) and crucially we need /boot/entropy and the correct invocation in /boot/loader.conf. I agree that bootstrap entropy is a big deal, especially with the increasing prevalence of using virtual machine containers, cloned images, and datacenter automation. Addressing that is an interesting problem, and goes well beyond the scope of in-kernel entropy collection. I wish I had a simple answer or a patch for you ;-) I would like to see us scale back the entropy collection, and replace it with something like scan the zone once an hour or something similar. Or do something dtrace style, where we nop/jmp the collection after we feel that the system has collected enough. Most of the current entropy gathering is just about invisible anyway. I think the above goes too far, but may be a useful way of enabling/disabling (say) UMA gathering on the fly. Heck, piping in mic data to /dev/random is a good way to seed the rng on many machines. Well, sure, but what if you don’t have microphone? I want lots of choices, in anticipation of only a subset being usable. I still think that for most use cases where you have a high likelyhood of draining /dev/random of useful bits, you’re likely already on a tight budget for CPU cycles and you’ll probably just look to a hardware accelerator rather than sacrifice even more CPU cycles. At least, that’s what the nice sale people at Cavium and Intel tell me ;-) Scott ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r285867 - head/sys/arm/ti/am335x
Author: gonzo Date: Sat Jul 25 03:03:32 2015 New Revision: 285867 URL: https://svnweb.freebsd.org/changeset/base/285867 Log: Synchronize PIN input/output modes with gnu/dts/include/dt-bindings/pinctrl/am33xx.h gpio driver requires exact value to match SoC pin mode with GPIO pin direction Modified: head/sys/arm/ti/am335x/am335x_scm_padconf.h Modified: head/sys/arm/ti/am335x/am335x_scm_padconf.h == --- head/sys/arm/ti/am335x/am335x_scm_padconf.h Sat Jul 25 02:59:45 2015 (r285866) +++ head/sys/arm/ti/am335x/am335x_scm_padconf.h Sat Jul 25 03:03:32 2015 (r285867) @@ -34,8 +34,9 @@ #define PULLTYPESEL(0x01 4) /* Pad pullup/pulldown type selection */ #define PULLUDEN (0x01 3) /* Pullup/pulldown disabled */ -#define PADCONF_OUTPUT (0) +#define PADCONF_OUTPUT (PULLUDEN) #define PADCONF_OUTPUT_PULLUP (PULLTYPESEL) +#define PADCONF_OUTPUT_PULLDOWN(0) #define PADCONF_INPUT (RXACTIVE | PULLUDEN) #define PADCONF_INPUT_PULLUP (RXACTIVE | PULLTYPESEL) #define PADCONF_INPUT_PULLDOWN (RXACTIVE) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r285868 - head/sys/arm/ti/am335x
Author: gonzo Date: Sat Jul 25 03:19:02 2015 New Revision: 285868 URL: https://svnweb.freebsd.org/changeset/base/285868 Log: Fix color mapping for TDA19988. Values for VIP_CNTRL_1 and VIP_CNTRL_2 registers were mixed up Modified: head/sys/arm/ti/am335x/tda19988.c Modified: head/sys/arm/ti/am335x/tda19988.c == --- head/sys/arm/ti/am335x/tda19988.c Sat Jul 25 03:03:32 2015 (r285867) +++ head/sys/arm/ti/am335x/tda19988.c Sat Jul 25 03:19:02 2015 (r285868) @@ -715,8 +715,8 @@ tda19988_start(void *xdev) /* Default values for RGB 4:4:4 mapping */ tda19988_reg_write(sc, TDA_VIP_CNTRL_0, 0x23); - tda19988_reg_write(sc, TDA_VIP_CNTRL_1, 0x45); - tda19988_reg_write(sc, TDA_VIP_CNTRL_2, 0x01); + tda19988_reg_write(sc, TDA_VIP_CNTRL_1, 0x01); + tda19988_reg_write(sc, TDA_VIP_CNTRL_2, 0x45); done: config_intrhook_disestablish(sc-enum_hook); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r285864 - head/lib/libc/stdlib
Author: delphij Date: Sat Jul 25 00:21:29 2015 New Revision: 285864 URL: https://svnweb.freebsd.org/changeset/base/285864 Log: Document the fact that system(3) can easily be misused due to shell meta characters are honored. While I'm there also mention posix_spawn in the SEE ALSO section. MFC after:2 weeks Modified: head/lib/libc/stdlib/system.3 Modified: head/lib/libc/stdlib/system.3 == --- head/lib/libc/stdlib/system.3 Sat Jul 25 00:14:02 2015 (r285863) +++ head/lib/libc/stdlib/system.3 Sat Jul 25 00:21:29 2015 (r285864) @@ -32,7 +32,7 @@ .\ @(#)system.3 8.1 (Berkeley) 6/4/93 .\ $FreeBSD$ .\ -.Dd June 4, 1993 +.Dd July 25, 2015 .Dt SYSTEM 3 .Os .Sh NAME @@ -87,7 +87,8 @@ failed. .Xr execve 2 , .Xr fork 2 , .Xr waitpid 2 , -.Xr popen 3 +.Xr popen 3 , +.Xr posix_spawn 3 .Sh STANDARDS The .Fn system @@ -97,3 +98,14 @@ conforms to and is expected to be .St -p1003.2 compatible. +.Sh SECURITY CONSIDERATIONS +The +.Fn system +function is easily misused in a manner that enables a malicious +user to run arbitrary command, +because all meta-characters supported by +.Xr sh 1 +would be honored. +User supplied parameters should always be carefully santized +before they appear in +.Fa string. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r285866 - head/sys/arm/ti/am335x
Author: gonzo Date: Sat Jul 25 02:59:45 2015 New Revision: 285866 URL: https://svnweb.freebsd.org/changeset/base/285866 Log: If there is panel info in DTB do not wait for HDMI event and setup framebuffer immediately Modified: head/sys/arm/ti/am335x/am335x_lcd.c Modified: head/sys/arm/ti/am335x/am335x_lcd.c == --- head/sys/arm/ti/am335x/am335x_lcd.c Sat Jul 25 00:58:50 2015 (r285865) +++ head/sys/arm/ti/am335x/am335x_lcd.c Sat Jul 25 02:59:45 2015 (r285866) @@ -998,8 +998,11 @@ am335x_lcd_attach(device_t dev) PWM_PERIOD, PWM_PERIOD) == 0) sc-sc_backlight = 100; - sc-sc_hdmi_evh = EVENTHANDLER_REGISTER(hdmi_event, - am335x_lcd_hdmi_event, sc, 0); + if (panel_node != 0) + am335x_lcd_configure(sc); + else + sc-sc_hdmi_evh = EVENTHANDLER_REGISTER(hdmi_event, + am335x_lcd_hdmi_event, sc, 0); return (0); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org