Re: svn commit: r238990 - in head/sys: net netinet netinet6
On Tue, Aug 21, 2012 at 12:50:14PM -0600, Kenneth D. Merry wrote: K> On Thu, Aug 02, 2012 at 13:57:50 +, Gleb Smirnoff wrote: K> > Author: glebius K> > Date: Thu Aug 2 13:57:49 2012 K> > New Revision: 238990 K> > URL: http://svn.freebsd.org/changeset/base/238990 K> > K> > Log: K> > Fix races between in_lltable_prefix_free(), lla_lookup(), K> > llentry_free() and arptimer(): K> > K> > o Use callout_init_rw() for lle timeout, this allows us safely K> > disestablish them. K> > - This allows us to simplify the arptimer() and make it K> > race safe. K> > o Consistently use ifp->if_afdata_lock to lock access to K> > linked lists in the lle hashes. K> > o Introduce new lle flag LLE_LINKED, which marks an entry that K> > is attached to the hash. K> > - Use LLE_LINKED to avoid double unlinking via consequent K> > calls to llentry_free(). K> > - Mark lle with LLE_DELETED via |= operation istead of =, K> > so that other flags won't be lost. K> > o Make LLE_ADDREF(), LLE_REMREF() and LLE_FREE_LOCKED() more K> > consistent and provide more informative KASSERTs. K> > K> > The patch is a collaborative work of all submitters and myself. K> > K> > PR: kern/165863 K> > Submitted by:Andrey Zonov K> > Submitted by:Ryan Stone K> > Submitted by:Eric van Gyzen K> K> I'm running into this on stable/9, any plan on when this will get MFCed? I'm sorry, but after 9.1-RELEASE. Too large change to run MFC prior to release. I'd appreciate if you patch your stable/9 system manually and thus perform some testing prior to merge. -- Totus tuus, Glebius. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r238990 - in head/sys: net netinet netinet6
On Wed, Aug 22, 2012 at 02:17:05PM +0400, Gleb Smirnoff wrote: > On Tue, Aug 21, 2012 at 12:50:14PM -0600, Kenneth D. Merry wrote: > K> On Thu, Aug 02, 2012 at 13:57:50 +, Gleb Smirnoff wrote: > K> > Author: glebius > K> > Date: Thu Aug 2 13:57:49 2012 > K> > New Revision: 238990 > K> > URL: http://svn.freebsd.org/changeset/base/238990 > K> > > K> > Log: > K> > Fix races between in_lltable_prefix_free(), lla_lookup(), > K> > llentry_free() and arptimer(): > K> > > K> > o Use callout_init_rw() for lle timeout, this allows us safely > K> > disestablish them. > K> > - This allows us to simplify the arptimer() and make it > K> > race safe. > K> > o Consistently use ifp->if_afdata_lock to lock access to > K> > linked lists in the lle hashes. > K> > o Introduce new lle flag LLE_LINKED, which marks an entry that > K> > is attached to the hash. > K> > - Use LLE_LINKED to avoid double unlinking via consequent > K> > calls to llentry_free(). > K> > - Mark lle with LLE_DELETED via |= operation istead of =, > K> > so that other flags won't be lost. > K> > o Make LLE_ADDREF(), LLE_REMREF() and LLE_FREE_LOCKED() more > K> > consistent and provide more informative KASSERTs. > K> > > K> > The patch is a collaborative work of all submitters and myself. > K> > > K> > PR:kern/165863 > K> > Submitted by: Andrey Zonov > K> > Submitted by: Ryan Stone > K> > Submitted by: Eric van Gyzen > K> > K> I'm running into this on stable/9, any plan on when this will get MFCed? > > I'm sorry, but after 9.1-RELEASE. Too large change to run MFC prior to > release. > > I'd appreciate if you patch your stable/9 system manually and thus > perform some testing prior to merge. FYI, 9.1 was already branched. Not that I encourage you to make a commit that would diverge the stable/9 from releng/9.1 while 9.1 is still rolling. But the stall on stable/9 due to freeze was too long and IMO its longevity is damaging. pgpdwXLJ1AXYK.pgp Description: PGP signature
svn commit: r239564 - head/sbin/dhclient
Author: jhb Date: Wed Aug 22 13:53:37 2012 New Revision: 239564 URL: http://svn.freebsd.org/changeset/base/239564 Log: Revert r239356 and use an alternate algorithm. First, don't exit when the link goes down on an interface. Instead, teach dhclient to track changes in link state and to enter the reboot state when the link on an interface goes up causing dhclient to attempt to renew its existing lease. Second, remove the change I added to clear the old lease when dhclient exits due to an error (such as ifconfig down). If an interface is using autoconfiguration it should keep its autoconfiguration as much as possible. If the next time it needs a configuration it is able to reuse the previous autoconfiguration, then leaving the settings intact allows existing connections to survive temporary outages, etc. PR: bin/166656 MFC after:1 month Modified: head/sbin/dhclient/dhclient.c head/sbin/dhclient/dhcpd.h Modified: head/sbin/dhclient/dhclient.c == --- head/sbin/dhclient/dhclient.c Wed Aug 22 08:27:37 2012 (r239563) +++ head/sbin/dhclient/dhclient.c Wed Aug 22 13:53:37 2012 (r239564) @@ -218,6 +218,7 @@ routehandler(struct protocol *p) struct sockaddr *sa; struct iaddr a; ssize_t n; + int linkstat; n = read(routefd, &msg, sizeof(msg)); rtm = (struct rt_msghdr *)msg; @@ -278,10 +279,14 @@ routehandler(struct protocol *p) ifi->name); goto die; } - if (!interface_link_status(ifi->name)) { - warning("Interface %s is down, dhclient exiting", - ifi->name); - goto die; + linkstat = interface_link_status(ifi->name); + if (linkstat != ifi->linkstat) { + debug("%s link state %s -> %s", ifi->name, + ifi->linkstat ? "up" : "down", + linkstat ? "up" : "down"); + ifi->linkstat = linkstat; + if (linkstat) + state_reboot(ifi); } break; case RTM_IFANNOUNCE: @@ -321,8 +326,6 @@ routehandler(struct protocol *p) die: script_init("FAIL", NULL); - if (ifi->client->active) - script_write_params("old_", ifi->client->active); if (ifi->client->alias) script_write_params("alias_", ifi->client->alias); script_go(); @@ -437,6 +440,7 @@ main(int argc, char *argv[]) } fprintf(stderr, " got link\n"); } + ifi->linkstat = 1; if ((nullfd = open(_PATH_DEVNULL, O_RDWR, 0)) == -1) error("cannot open %s: %m", _PATH_DEVNULL); Modified: head/sbin/dhclient/dhcpd.h == --- head/sbin/dhclient/dhcpd.h Wed Aug 22 08:27:37 2012(r239563) +++ head/sbin/dhclient/dhcpd.h Wed Aug 22 13:53:37 2012(r239564) @@ -208,6 +208,7 @@ struct interface_info { int errors; int dead; u_int16_tindex; + int linkstat; }; struct timeout { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r239356 - head/sbin/dhclient
Hi, > On Wed, 22 Aug 2012 04:06:46 +0400 > Andrey Chernov said: ache> BTW, I notice that link-local router address behavior is ache> strange and inconsistant for both 'host -6' and 'dig -6' commands. ache> host -6 example.com fe80:: ache> dig -6 @fe80:: example.com ache> both hangs, but in the same time ache> host -6 example.com fe80::% ache> dig -6 @fe80::% example.com ache> works! ache> host -6 example.com fe80::%1 ache> dig -6 #fe80::%1 example.com ache> works too. Not understanding addresses without % or %1 looks like ache> routing problems, but I don't know where to fix it. A link-local address has a scope; an interface here. You cannot omit it on FreeBSD by default. To be able to omit it, specify something like ipv6_default_interface="em0" in your /etc/rc.conf. ache> So, I try to use ache> nameserver fe80::% (or with %1 suffix) ache> in my resolv.conf, as result ache> host -6 example.com ache> dig -6 example.com ache> (without NS specified) both hangs despite they working when exact the same ache> NS address is given in their command lines. Our stub resolver in libc should work with a link-local address as nameserver. However, host(1) and dig(1) don't use the stub resolver in libc, and use its own resolver. I suspect host(1) and dig(1) have some problem in handling a link-local address. In anyway, I don't recommend to use a link-local address for DNS. Sincerely, -- Hajimu UMEMOTO u...@mahoroba.org ume@{,jp.}FreeBSD.org http://www.mahoroba.org/~ume/ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r238990 - in head/sys: net netinet netinet6
On Wed, Aug 22, 2012 at 14:17:05 +0400, Gleb Smirnoff wrote: > On Tue, Aug 21, 2012 at 12:50:14PM -0600, Kenneth D. Merry wrote: > K> On Thu, Aug 02, 2012 at 13:57:50 +, Gleb Smirnoff wrote: > K> > Author: glebius > K> > Date: Thu Aug 2 13:57:49 2012 > K> > New Revision: 238990 > K> > URL: http://svn.freebsd.org/changeset/base/238990 > K> > > K> > Log: > K> > Fix races between in_lltable_prefix_free(), lla_lookup(), > K> > llentry_free() and arptimer(): > K> > > K> > o Use callout_init_rw() for lle timeout, this allows us safely > K> > disestablish them. > K> > - This allows us to simplify the arptimer() and make it > K> > race safe. > K> > o Consistently use ifp->if_afdata_lock to lock access to > K> > linked lists in the lle hashes. > K> > o Introduce new lle flag LLE_LINKED, which marks an entry that > K> > is attached to the hash. > K> > - Use LLE_LINKED to avoid double unlinking via consequent > K> > calls to llentry_free(). > K> > - Mark lle with LLE_DELETED via |= operation istead of =, > K> > so that other flags won't be lost. > K> > o Make LLE_ADDREF(), LLE_REMREF() and LLE_FREE_LOCKED() more > K> > consistent and provide more informative KASSERTs. > K> > > K> > The patch is a collaborative work of all submitters and myself. > K> > > K> > PR:kern/165863 > K> > Submitted by: Andrey Zonov > K> > Submitted by: Ryan Stone > K> > Submitted by: Eric van Gyzen > K> > K> I'm running into this on stable/9, any plan on when this will get MFCed? > > I'm sorry, but after 9.1-RELEASE. Too large change to run MFC prior to > release. I understand. > I'd appreciate if you patch your stable/9 system manually and thus > perform some testing prior to merge. I'm running stable/9 from late March (we're working on merging a newer version of stable/9), and have merged in these changes from head: 237571, 238222, 238945, 238967, 238990 At the moment I'm getting a panic inside arptimer: Fatal trap 12: page fault while in kernel mode cpuid = 0; apic id = 00 fault virtual address = 0x0 fault code = supervisor read instruction, page not present instruction pointer = 0x20:0x0 stack pointer = 0x28:0xff800027da40 frame pointer = 0x28:0xff800027da80 code segment= base 0x0, limit 0xf, type 0x1b = DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags= interrupt enabled, resume, IOPL = 0 current process = 12 (swi4: clock) [ thread pid 12 tid 100010 ] Stopped at 0: *** error reading from address 0 *** db> bt Tracing pid 12 tid 100010 td 0xfe00072158e0 uart_sab82532_class() at 0 arptimer() at arptimer+0xd0 softclock() at softclock+0x2ba intr_event_execute_handlers() at intr_event_execute_handlers+0x66 ithread_loop() at ithread_loop+0xb2 fork_exit() at fork_exit+0x135 fork_trampoline() at fork_trampoline+0xe --- trap 0, rip = 0, rsp = 0xff800027dcf0, rbp = 0 --- db> It looks like it's inside llentry_free(): (kgdb) up 15 #15 0x8056b420 in arptimer (arg=Variable "arg" is not available. ) at /usr/home/kenm/perforce7/sys/netinet/if_ether.c:189 189 pkts_dropped = llentry_free(lle); (kgdb) list 184 /* XXX: LOR avoidance. We still have ref on lle. */ 185 LLE_WUNLOCK(lle); 186 IF_AFDATA_LOCK(ifp); 187 LLE_WLOCK(lle); 188 LLE_REMREF(lle); 189 pkts_dropped = llentry_free(lle); 190 IF_AFDATA_UNLOCK(ifp); 191 ARPSTAT_ADD(dropped, pkts_dropped); 192 ARPSTAT_INC(timeouts); 193 CURVNET_RESTORE(); (kgdb) print lle $1 = (struct llentry *) 0xfe000aea8600 (kgdb) print *lle $2 = {lle_next = {le_next = 0x0, le_prev = 0xfe000a36dcd0}, lle_lock = { lock_object = {lo_name = 0x8090cc65 "lle", lo_flags = 73596928, lo_data = 0, lo_witness = 0x0}, rw_lock = 18446741874805922016}, lle_tbl = 0xfe000a36dc00, lle_head = 0xfe000a36dcd0, lle_free = 0, la_hold = 0x0, la_numheld = 0, la_expire = 33571, la_flags = 8192, la_asked = 0, la_preempt = 5, ln_byhint = 0, ln_state = 0, ln_router = 0, ln_ntick = 0, lle_refcnt = 1, ll_addr = {mac_aligned = 55295740969106, mac16 = {32914, 35583, 12874}}, lle_timer = {ln_timer_ch = {c_links = { sle = {sle_next = 0x0}, tqe = {tqe_next = 0x0, tqe_prev = 0xff81ed7e4760}}, c_time = 3357036, c_arg = 0xfe000aea8600, c_func = 0x8056b350 , c_lock = 0xfe000aea8610, c_flags = 16, c_cpu = 0}, la_timer = { c_links = {sle = {sle_next = 0x0}, tqe = {tqe_next = 0x0, tqe_prev = 0xff81ed7e4760}}, c_time = 3357036, c_arg = 0xfe000aea8600, c_func = 0x8056b350 , c_lock = 0xfe000aea8610, c_flags = 16, c_cpu = 0}}} (kgdb) down #14 0x80554950 in llentry_free (lle=0xfe000aea8600) at /usr/home/kenm/perforce7/sys/net/if_llatbl.c
Re: jemalloc and clang (was: Re: svn commit: r239462 - in head)
On Aug 21, 2012, at 1:39 AM, Dimitry Andric wrote: > On 2012-08-21 02:17, Jan Beich wrote: > ... >> Time to revert r228540? >> >> Index: contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h >> === >> --- contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h (revision >> 239467) >> +++ contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h (working copy) >> @@ -56,10 +56,6 @@ >> #ifndef JEMALLOC_TLS_MODEL >> # define JEMALLOC_TLS_MODEL/* Default. */ >> #endif >> -#ifdef __clang__ >> -# undef JEMALLOC_TLS_MODEL >> -# define JEMALLOC_TLS_MODEL/* clang does not support tls_model >> yet. */ >> -#endif >> >> #define STATIC_PAGE_SHIFT PAGE_SHIFT >> #define LG_SIZEOF_INT 2 > > Well, if Jason would like to support upstream jemalloc for different > versions of clang, it is probably better to to use __has_feature() > instead. > > Jason, what do you think of the attached patch? Or could we just remove > the whole #ifdef __clang__ part? > I'm happy with the above patch (completely removing the #ifdef __clang__). Jason ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r239567 - in head/sys/dev/usb: . serial
Author: hselasky Date: Wed Aug 22 18:30:13 2012 New Revision: 239567 URL: http://svn.freebsd.org/changeset/base/239567 Log: Add new USB device ID. Submitted by: Dmitry Luhtionov MFC after:1 week Modified: head/sys/dev/usb/serial/uftdi.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/uftdi.c == --- head/sys/dev/usb/serial/uftdi.c Wed Aug 22 17:16:05 2012 (r239566) +++ head/sys/dev/usb/serial/uftdi.c Wed Aug 22 18:30:13 2012 (r239567) @@ -434,6 +434,7 @@ static const STRUCT_USB_HOST_ID uftdi_de UFTDI_DEV(FTDI, SEMC_DSS20, UFTDI_TYPE_8U232AM), UFTDI_DEV(FTDI, SERIAL_2232C, UFTDI_TYPE_8U232AM), UFTDI_DEV(FTDI, SERIAL_2232D, UFTDI_TYPE_8U232AM), + UFTDI_DEV(FTDI, SERIAL_232RL, UFTDI_TYPE_AUTO), UFTDI_DEV(FTDI, SERIAL_4232H, UFTDI_TYPE_8U232AM), UFTDI_DEV(FTDI, SERIAL_8U100AX, UFTDI_TYPE_SIO), UFTDI_DEV(FTDI, SERIAL_8U232AM, UFTDI_TYPE_8U232AM), Modified: head/sys/dev/usb/usbdevs == --- head/sys/dev/usb/usbdevsWed Aug 22 17:16:05 2012(r239566) +++ head/sys/dev/usb/usbdevsWed Aug 22 18:30:13 2012(r239567) @@ -1699,6 +1699,7 @@ product FSC E5400 0x1009 PrismGT USB 2. product FTDI SERIAL_8U100AX0x8372 8U100AX Serial product FTDI SERIAL_8U232AM0x6001 8U232AM Serial product FTDI SERIAL_8U232AM4 0x6004 8U232AM Serial +product FTDI SERIAL_232RL 0x6006 FT232RL Serial product FTDI SERIAL_2232C 0x6010 FT2232C Dual port Serial product FTDI 232H 0x6014 FTDI compatible adapter product FTDI SERIAL_2232D 0x9e90 FT2232D Dual port Serial ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r239568 - head/etc/rc.d
Author: obrien Date: Wed Aug 22 18:35:17 2012 New Revision: 239568 URL: http://svn.freebsd.org/changeset/base/239568 Log: Add dependencies based on security(7). Modified: head/etc/rc.d/securelevel Modified: head/etc/rc.d/securelevel == --- head/etc/rc.d/securelevel Wed Aug 22 18:30:13 2012(r239567) +++ head/etc/rc.d/securelevel Wed Aug 22 18:35:17 2012(r239568) @@ -4,6 +4,7 @@ # # PROVIDE: securelevel +# REQUIRE: adjkerntz ipfw ipfilter pf . /etc/rc.subr ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r239569 - head/etc/rc.d
Author: obrien Date: Wed Aug 22 18:43:21 2012 New Revision: 239569 URL: http://svn.freebsd.org/changeset/base/239569 Log: Remove old entropy seeding after consumption initializing /dev/random PRNG. Not doing so opens us up to replay attacks. Submitted by: Arthur Mesh Sponsored by: Juniper Networks Added: head/etc/rc.d/postrandom (contents, props changed) Modified: head/etc/rc.d/random Added: head/etc/rc.d/postrandom == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/rc.d/postrandomWed Aug 22 18:43:21 2012(r239569) @@ -0,0 +1,41 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: postrandom +# REQUIRE: initrandom random var +# BEFORE: LOGIN +# KEYWORD: nojail + +. /etc/rc.subr + +name="postrandom" +start_cmd="${name}_start" +stop_cmd=":" + +# This will remove old ${entropy_file} and generate a new one. +# According to Bruce Schneier, this is stronly recomended in order +# to avoid using same ${entropy_file} across reboots. +# Reference: Chapter 10.6, Practical Cryptograpy, ISBN: 0-471-22357-3 + +postrandom_start() +{ + /etc/rc.d/random fastsaveseed + + case ${entropy_dir} in + [Nn][Oo]) + ;; + *) + entropy_dir=${entropy_dir:-/var/db/entropy} + if [ -d "${entropy_dir}" ]; then + if [ -w /dev/random ]; then + rm -f ${entropy_dir}/* + fi + fi + ;; + esac +} + +load_rc_config random +run_rc_command "$1" Modified: head/etc/rc.d/random == --- head/etc/rc.d/randomWed Aug 22 18:35:17 2012(r239568) +++ head/etc/rc.d/randomWed Aug 22 18:43:21 2012(r239569) @@ -4,7 +4,7 @@ # # PROVIDE: random -# REQUIRE: var initrandom +# REQUIRE: initrandom var # BEFORE: netif # KEYWORD: nojail shutdown @@ -14,6 +14,9 @@ name="random" start_cmd="random_start" stop_cmd="random_stop" +extra_commands="saveseed" +saveseed_cmd="${name}_stop" + feed_dev_random() { if [ -f "${1}" -a -r "${1}" -a -s "${1}" ]; then ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r239569 - head/etc/rc.d
On Wed, Aug 22, 2012 at 06:43:21PM +, David E. O'Brien wrote: > + > +# This will remove old ${entropy_file} and generate a new one. > +# According to Bruce Schneier, this is stronly recomended in order s/stronly/strongly -- Steve ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r239570 - head/etc/rc.d
Author: obrien Date: Wed Aug 22 18:49:02 2012 New Revision: 239570 URL: http://svn.freebsd.org/changeset/base/239570 Log: Depend on the new 'postrandom' instead of random. We need to limit the amount of time between consuming the entropy seeds and removing it in case of a kernel panic. Modified: head/etc/rc.d/adjkerntz Modified: head/etc/rc.d/adjkerntz == --- head/etc/rc.d/adjkerntz Wed Aug 22 18:43:21 2012(r239569) +++ head/etc/rc.d/adjkerntz Wed Aug 22 18:49:02 2012(r239570) @@ -4,7 +4,7 @@ # # PROVIDE: adjkerntz -# REQUIRE: FILESYSTEMS random +# REQUIRE: FILESYSTEMS postrandom # BEFORE: netif # KEYWORD: nojail ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r239571 - head/usr.sbin/pmcstat
Author: jimharris Date: Wed Aug 22 19:02:07 2012 New Revision: 239571 URL: http://svn.freebsd.org/changeset/base/239571 Log: Add -m option (for printing sampled PCs to a file) to pmcstat usage message. Sponsored by: Intel MFC after: 3 days Modified: head/usr.sbin/pmcstat/pmcstat.c Modified: head/usr.sbin/pmcstat/pmcstat.c == --- head/usr.sbin/pmcstat/pmcstat.c Wed Aug 22 18:49:02 2012 (r239570) +++ head/usr.sbin/pmcstat/pmcstat.c Wed Aug 22 19:02:07 2012 (r239571) @@ -509,6 +509,7 @@ pmcstat_show_usage(void) "\t -f spec\t pass \"spec\" to as plugin option\n" "\t -g\t\t produce gprof(1) compatible profiles\n" "\t -k dir\t\t set the path to the kernel\n" + "\t -m file\t print sampled PCs to \"file\"\n" "\t -n rate\t set sampling rate\n" "\t -o file\t send print output to \"file\"\n" "\t -p spec\t allocate a process-private counting PMC\n" ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r239562 - head/usr.sbin/makefs
On 8/22/12 10:37 AM, Hiroki Sato wrote: > Author: hrs > Date: Wed Aug 22 06:37:30 2012 > New Revision: 239562 > URL: http://svn.freebsd.org/changeset/base/239562 > > Log: > Add -p flag to create the image as a sparse file. > > Submitted by: Shesha Sreenivasamurthy > PR: bin/167779 > > Modified: > head/usr.sbin/makefs/ffs.c > head/usr.sbin/makefs/makefs.8 > head/usr.sbin/makefs/makefs.c > head/usr.sbin/makefs/makefs.h > [snip] > > Modified: head/usr.sbin/makefs/makefs.c > == > --- head/usr.sbin/makefs/makefs.c Wed Aug 22 05:38:06 2012 > (r239561) > +++ head/usr.sbin/makefs/makefs.c Wed Aug 22 06:37:30 2012 > (r239562) > @@ -112,7 +112,7 @@ main(int argc, char *argv[]) > start_time.tv_sec = start.tv_sec; > start_time.tv_nsec = start.tv_usec * 1000; > > - while ((ch = getopt(argc, argv, "B:b:d:f:F:M:m:N:o:s:S:t:x")) != -1) { > + while ((ch = getopt(argc, argv, "B:b:d:f:F:M:m:N:o:ps:S:t:x")) != -1) { > switch (ch) { > > case 'B': > @@ -199,6 +199,9 @@ main(int argc, char *argv[]) > } > break; > } > + case 'p': > + fsoptions.sparse = 1; > + break; > > case 's': > fsoptions.minsize = fsoptions.maxsize = > @@ -346,7 +349,7 @@ usage(void) > fprintf(stderr, > "usage: %s [-t fs-type] [-o fs-options] [-d debug-mask] [-B endian]\n" > "\t[-S sector-size] [-M minimum-size] [-m maximum-size] [-s image-size]\n" > -"\t[-b free-blocks] [-f free-files] [-F mtree-specfile] [-x]\n" > +"\t[-b free-blocks] [-f free-files] [-F mtree-specfile] [-x] [-p]\n" style(9) violation. Options should be sorted. > "\t[-N userdb-dir] image-file directory | manifest [extra-directory ...]\n", > prog); > exit(1); > > Modified: head/usr.sbin/makefs/makefs.h > == > --- head/usr.sbin/makefs/makefs.h Wed Aug 22 05:38:06 2012 > (r239561) > +++ head/usr.sbin/makefs/makefs.h Wed Aug 22 06:37:30 2012 > (r239562) > @@ -129,6 +129,7 @@ typedef struct { > int freeblockpc;/* free block % */ > int needswap; /* non-zero if byte swapping needed */ > int sectorsize; /* sector size */ > + int sparse; /* sparse image, don't fill it with zeros */ > > void*fs_specific; /* File system specific additions. */ > } fsinfo_t; > -- Andrey Zonov signature.asc Description: OpenPGP digital signature
svn commit: r239574 - head/usr.sbin/makefs
Author: hrs Date: Wed Aug 22 19:27:42 2012 New Revision: 239574 URL: http://svn.freebsd.org/changeset/base/239574 Log: Sort options. Modified: head/usr.sbin/makefs/makefs.8 head/usr.sbin/makefs/makefs.c Modified: head/usr.sbin/makefs/makefs.8 == --- head/usr.sbin/makefs/makefs.8 Wed Aug 22 19:27:17 2012 (r239573) +++ head/usr.sbin/makefs/makefs.8 Wed Aug 22 19:27:42 2012 (r239574) @@ -43,8 +43,7 @@ .Nd create a file system image from a directory tree or a mtree manifest .Sh SYNOPSIS .Nm -.Op Fl p -.Op Fl x +.Op Fl px .Op Fl B Ar byte-order .Op Fl b Ar free-blocks .Op Fl d Ar debug-mask Modified: head/usr.sbin/makefs/makefs.c == --- head/usr.sbin/makefs/makefs.c Wed Aug 22 19:27:17 2012 (r239573) +++ head/usr.sbin/makefs/makefs.c Wed Aug 22 19:27:42 2012 (r239574) @@ -349,7 +349,7 @@ usage(void) fprintf(stderr, "usage: %s [-t fs-type] [-o fs-options] [-d debug-mask] [-B endian]\n" "\t[-S sector-size] [-M minimum-size] [-m maximum-size] [-s image-size]\n" -"\t[-b free-blocks] [-f free-files] [-F mtree-specfile] [-x] [-p]\n" +"\t[-b free-blocks] [-f free-files] [-F mtree-specfile] [-px]\n" "\t[-N userdb-dir] image-file directory | manifest [extra-directory ...]\n", prog); exit(1); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r239571 - head/usr.sbin/pmcstat
On Wed, Aug 22, 2012 at 8:02 PM, Jim Harris wrote: > Author: jimharris > Date: Wed Aug 22 19:02:07 2012 > New Revision: 239571 > URL: http://svn.freebsd.org/changeset/base/239571 > > Log: > Add -m option (for printing sampled PCs to a file) to pmcstat usage > message. Pointy hat to me. Attilio -- Peace can only be achieved by understanding - A. Einstein ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r239584 - head/sys/kern
Author: jhb Date: Wed Aug 22 20:00:41 2012 New Revision: 239584 URL: http://svn.freebsd.org/changeset/base/239584 Log: Fix the 'show witness' DDB command to honor db_pager_quit. Modified: head/sys/kern/subr_witness.c Modified: head/sys/kern/subr_witness.c == --- head/sys/kern/subr_witness.cWed Aug 22 19:56:41 2012 (r239583) +++ head/sys/kern/subr_witness.cWed Aug 22 20:00:41 2012 (r239584) @@ -947,6 +947,8 @@ witness_ddb_display_descendants(int(*prn indent++; WITNESS_INDEX_ASSERT(w->w_index); for (i = 1; i <= w_max_used_index; i++) { + if (db_pager_quit) + return; if (w_rmatrix[w->w_index][i] & WITNESS_PARENT) witness_ddb_display_descendants(prnt, &w_data[i], indent); @@ -965,6 +967,8 @@ witness_ddb_display_list(int(*prnt)(cons /* This lock has no anscestors - display its descendants. */ witness_ddb_display_descendants(prnt, w, 0); + if (db_pager_quit) + return; } } @@ -986,12 +990,16 @@ witness_ddb_display(int(*prnt)(const cha */ prnt("Sleep locks:\n"); witness_ddb_display_list(prnt, &w_sleep); + if (db_pager_quit) + return; /* * Now do spin locks which have been acquired at least once. */ prnt("\nSpin locks:\n"); witness_ddb_display_list(prnt, &w_spin); + if (db_pager_quit) + return; /* * Finally, any locks which have not been acquired yet. @@ -1002,6 +1010,8 @@ witness_ddb_display(int(*prnt)(const cha continue; prnt("%s (type: %s, depth: %d)\n", w->w_name, w->w_class->lc_name, w->w_ddb_level); + if (db_pager_quit) + return; } } #endif /* DDB */ @@ -2398,6 +2408,8 @@ DB_SHOW_ALL_COMMAND(locks, db_witness_li db_printf("Process %d (%s) thread %p (%d)\n", p->p_pid, p->p_comm, td, td->td_tid); witness_ddb_list(td); + if (db_pager_quit) + return; } } } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r239585 - head/sys/kern
Author: jhb Date: Wed Aug 22 20:01:38 2012 New Revision: 239585 URL: http://svn.freebsd.org/changeset/base/239585 Log: Mark the idle threads as non-sleepable and also assert that an idle thread never blocks on a turnstile. Modified: head/sys/kern/sched_4bsd.c head/sys/kern/sched_ule.c head/sys/kern/subr_turnstile.c Modified: head/sys/kern/sched_4bsd.c == --- head/sys/kern/sched_4bsd.c Wed Aug 22 20:00:41 2012(r239584) +++ head/sys/kern/sched_4bsd.c Wed Aug 22 20:01:38 2012(r239585) @@ -1598,6 +1598,7 @@ sched_idletd(void *dummy) { struct pcpuidlestat *stat; + THREAD_NO_SLEEPING(); stat = DPCPU_PTR(idlestat); for (;;) { mtx_assert(&Giant, MA_NOTOWNED); Modified: head/sys/kern/sched_ule.c == --- head/sys/kern/sched_ule.c Wed Aug 22 20:00:41 2012(r239584) +++ head/sys/kern/sched_ule.c Wed Aug 22 20:01:38 2012(r239585) @@ -2581,6 +2581,7 @@ sched_idletd(void *dummy) mtx_assert(&Giant, MA_NOTOWNED); td = curthread; tdq = TDQ_SELF(); + THREAD_NO_SLEEPING(); for (;;) { #ifdef SMP if (tdq_idled(tdq) == 0) Modified: head/sys/kern/subr_turnstile.c == --- head/sys/kern/subr_turnstile.c Wed Aug 22 20:00:41 2012 (r239584) +++ head/sys/kern/subr_turnstile.c Wed Aug 22 20:01:38 2012 (r239585) @@ -684,6 +684,7 @@ turnstile_wait(struct turnstile *ts, str if (owner) MPASS(owner->td_proc->p_magic == P_MAGIC); MPASS(queue == TS_SHARED_QUEUE || queue == TS_EXCLUSIVE_QUEUE); + KASSERT(!TD_IS_IDLETHREAD(td), ("idle threads cannot block on locks")); /* * If the lock does not already have a turnstile, use this thread's ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r239586 - head/sys/kern
Author: jhb Date: Wed Aug 22 20:01:57 2012 New Revision: 239586 URL: http://svn.freebsd.org/changeset/base/239586 Log: Fix a typo. Modified: head/sys/kern/kern_module.c Modified: head/sys/kern/kern_module.c == --- head/sys/kern/kern_module.c Wed Aug 22 20:01:38 2012(r239585) +++ head/sys/kern/kern_module.c Wed Aug 22 20:01:57 2012(r239586) @@ -133,7 +133,7 @@ module_register_init(const void *arg) MOD_XLOCK; if (mod->file) { /* -* Once a module is succesfully loaded, move +* Once a module is successfully loaded, move * it to the head of the module list for this * linker file. This resorts the list so that * when the kernel linker iterates over the ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r239587 - head/sys/kern
Author: jhb Date: Wed Aug 22 20:02:42 2012 New Revision: 239587 URL: http://svn.freebsd.org/changeset/base/239587 Log: Assert that system calls do not leak a pinned thread (via sched_pin()) to userland. Modified: head/sys/kern/subr_syscall.c Modified: head/sys/kern/subr_syscall.c == --- head/sys/kern/subr_syscall.cWed Aug 22 20:01:57 2012 (r239586) +++ head/sys/kern/subr_syscall.cWed Aug 22 20:02:42 2012 (r239587) @@ -188,6 +188,9 @@ syscallret(struct thread *td, int error, KASSERT((td->td_pflags & TDP_NOSLEEPING) == 0, ("System call %s returning with sleep disabled", syscallname(p, sa->code))); + KASSERT(td->td_pinned == 0, + ("System call %s returning with pinned thread", +syscallname(p, sa->code))); /* * Handle reschedule and other end-of-syscall issues ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r239588 - head/sys/kern
Author: kib Date: Wed Aug 22 20:05:34 2012 New Revision: 239588 URL: http://svn.freebsd.org/changeset/base/239588 Log: Provide some compat32 shims for sysctl vfs.conflist. It is required for getvfsbyname(3) operation when called from 32bit process, and getvfsbyname(3) is used by recent bsdtar import. Reported by: many Tested by:David Naylor MFC after:5 days Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c == --- head/sys/kern/vfs_subr.cWed Aug 22 20:02:42 2012(r239587) +++ head/sys/kern/vfs_subr.cWed Aug 22 20:05:34 2012(r239588) @@ -41,6 +41,7 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_compat.h" #include "opt_ddb.h" #include "opt_watchdog.h" @@ -3111,22 +3112,50 @@ DB_SHOW_COMMAND(mount, db_show_mount) /* * Fill in a struct xvfsconf based on a struct vfsconf. */ -static void -vfsconf2x(struct vfsconf *vfsp, struct xvfsconf *xvfsp) +static int +vfsconf2x(struct sysctl_req *req, struct vfsconf *vfsp) { + struct xvfsconf xvfsp; - strcpy(xvfsp->vfc_name, vfsp->vfc_name); - xvfsp->vfc_typenum = vfsp->vfc_typenum; - xvfsp->vfc_refcount = vfsp->vfc_refcount; - xvfsp->vfc_flags = vfsp->vfc_flags; + bzero(&xvfsp, sizeof(xvfsp)); + strcpy(xvfsp.vfc_name, vfsp->vfc_name); + xvfsp.vfc_typenum = vfsp->vfc_typenum; + xvfsp.vfc_refcount = vfsp->vfc_refcount; + xvfsp.vfc_flags = vfsp->vfc_flags; /* * These are unused in userland, we keep them * to not break binary compatibility. */ - xvfsp->vfc_vfsops = NULL; - xvfsp->vfc_next = NULL; + xvfsp.vfc_vfsops = NULL; + xvfsp.vfc_next = NULL; + return (SYSCTL_OUT(req, &xvfsp, sizeof(xvfsp))); } +#ifdef COMPAT_FREEBSD32 +struct xvfsconf32 { + uint32_tvfc_vfsops; + charvfc_name[MFSNAMELEN]; + int32_t vfc_typenum; + int32_t vfc_refcount; + int32_t vfc_flags; + uint32_tvfc_next; +}; + +static int +vfsconf2x32(struct sysctl_req *req, struct vfsconf *vfsp) +{ + struct xvfsconf32 xvfsp; + + strcpy(xvfsp.vfc_name, vfsp->vfc_name); + xvfsp.vfc_typenum = vfsp->vfc_typenum; + xvfsp.vfc_refcount = vfsp->vfc_refcount; + xvfsp.vfc_flags = vfsp->vfc_flags; + xvfsp.vfc_vfsops = 0; + xvfsp.vfc_next = 0; + return (SYSCTL_OUT(req, &xvfsp, sizeof(xvfsp))); +} +#endif + /* * Top level filesystem related information gathering. */ @@ -3134,14 +3163,16 @@ static int sysctl_vfs_conflist(SYSCTL_HANDLER_ARGS) { struct vfsconf *vfsp; - struct xvfsconf xvfsp; int error; error = 0; TAILQ_FOREACH(vfsp, &vfsconf, vfc_list) { - bzero(&xvfsp, sizeof(xvfsp)); - vfsconf2x(vfsp, &xvfsp); - error = SYSCTL_OUT(req, &xvfsp, sizeof xvfsp); +#ifdef COMPAT_FREEBSD32 + if (req->flags & SCTL_MASK32) + error = vfsconf2x32(req, vfsp); + else +#endif + error = vfsconf2x(req, vfsp); if (error) break; } @@ -3161,7 +3192,6 @@ vfs_sysctl(SYSCTL_HANDLER_ARGS) int *name = (int *)arg1 - 1;/* XXX */ u_int namelen = arg2 + 1; /* XXX */ struct vfsconf *vfsp; - struct xvfsconf xvfsp; log(LOG_WARNING, "userland calling deprecated sysctl, " "please rebuild world\n"); @@ -3185,9 +3215,12 @@ vfs_sysctl(SYSCTL_HANDLER_ARGS) break; if (vfsp == NULL) return (EOPNOTSUPP); - bzero(&xvfsp, sizeof(xvfsp)); - vfsconf2x(vfsp, &xvfsp); - return (SYSCTL_OUT(req, &xvfsp, sizeof(xvfsp))); +#ifdef COMPAT_FREEBSD32 + if (req->flags & SCTL_MASK32) + return (vfsconf2x32(req, vfsp)); + else +#endif + return (vfsconf2x(req, vfsp)); } return (EOPNOTSUPP); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r239564 - head/sbin/dhclient
On Wednesday, August 22, 2012 11:24:05 am Jan Beich wrote: > (mx1.freebsd.org hates my smtp relay) > > John Baldwin writes: > > > Author: jhb > > Date: Wed Aug 22 13:53:37 2012 > > New Revision: 239564 > > URL: http://svn.freebsd.org/changeset/base/239564 > > > > Log: > > Revert r239356 and use an alternate algorithm. > > Doesn't help here. It now goes into an endless cycle trying to renew IP. > > $ (pciconf -l; dmesg) | fgrep -m2 fxp0 > fxp0@pci0:5:0:0:class=0x02 card=0xb1440e11 chip=0x12298086 rev=0x08 hdr=0x00 > fxp0: port 0xd000-0xd03f mem 0xf910-0xf9100fff,0xf900-0xf90f irq 20 at device 0.0 on pci5 Please try this patch relative to what is in HEAD: Index: dhcpd.h === --- dhcpd.h (revision 239564) +++ dhcpd.h (working copy) @@ -209,6 +209,7 @@ int dead; u_int16_tindex; int linkstat; + time_t linktime; }; struct timeout { Index: dhclient.c === --- dhclient.c (revision 239564) +++ dhclient.c (working copy) @@ -285,8 +285,14 @@ ifi->linkstat ? "up" : "down", linkstat ? "up" : "down"); ifi->linkstat = linkstat; - if (linkstat) + + /* +* XXX: Hardcoded 5 second grace window on +* link flaps. +*/ + if (linkstat && (cur_time - ifi->linktime) >= 5) state_reboot(ifi); + ifi->linktime = cur_time; } break; case RTM_IFANNOUNCE: @@ -441,6 +447,7 @@ fprintf(stderr, " got link\n"); } ifi->linkstat = 1; + ifi->linktime = cur_time; if ((nullfd = open(_PATH_DEVNULL, O_RDWR, 0)) == -1) error("cannot open %s: %m", _PATH_DEVNULL); -- John Baldwin ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r239591 - head/sys/sys
Author: jimharris Date: Wed Aug 22 20:22:55 2012 New Revision: 239591 URL: http://svn.freebsd.org/changeset/base/239591 Log: Remove unncessary atomic operation when reading process flags in PMC_PROC_IS_USING_PMCS macro. Invocations of this macro are not synchronized with setting/clearing of P_HWPMC flag, so the atomic operation here isn't needed. Removing the atomic operation provides noticeable improvement (5-6%) on some scheduler-intensive workloads with HWPMC_HOOKS enabled on an 8C Sandy Bridge Xeon system. Sponsored by: Intel Reviewed by: jhb MFC after: 1 week Modified: head/sys/sys/pmckern.h Modified: head/sys/sys/pmckern.h == --- head/sys/sys/pmckern.h Wed Aug 22 20:07:10 2012(r239590) +++ head/sys/sys/pmckern.h Wed Aug 22 20:22:55 2012(r239591) @@ -201,8 +201,7 @@ do {\ /* Check if a process is using HWPMCs.*/ #define PMC_PROC_IS_USING_PMCS(p) \ - (__predict_false(atomic_load_acq_int(&(p)->p_flag) &\ - P_HWPMC)) + (__predict_false(p->p_flag & P_HWPMC)) /* Check if a thread have pending user capture. */ #define PMC_IS_PENDING_CALLCHAIN(p)\ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r239593 - head/etc/rc.d
Author: obrien Date: Wed Aug 22 20:56:53 2012 New Revision: 239593 URL: http://svn.freebsd.org/changeset/base/239593 Log: Fix comment misspelling. Submitted by: kargl Modified: head/etc/rc.d/postrandom Modified: head/etc/rc.d/postrandom == --- head/etc/rc.d/postrandomWed Aug 22 20:34:23 2012(r239592) +++ head/etc/rc.d/postrandomWed Aug 22 20:56:53 2012(r239593) @@ -15,7 +15,7 @@ start_cmd="${name}_start" stop_cmd=":" # This will remove old ${entropy_file} and generate a new one. -# According to Bruce Schneier, this is stronly recomended in order +# According to Bruce Schneier, this is strongly recomended in order # to avoid using same ${entropy_file} across reboots. # Reference: Chapter 10.6, Practical Cryptograpy, ISBN: 0-471-22357-3 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r239593 - head/etc/rc.d
On 22 Aug 2012 21:57, "David E. O'Brien" wrote: > > Author: obrien > Date: Wed Aug 22 20:56:53 2012 > New Revision: 239593 > URL: http://svn.freebsd.org/changeset/base/239593 > > Log: > Fix comment misspelling. > > Submitted by: kargl > > Modified: > head/etc/rc.d/postrandom > > Modified: head/etc/rc.d/postrandom > == > --- head/etc/rc.d/postrandomWed Aug 22 20:34:23 2012(r239592) > +++ head/etc/rc.d/postrandomWed Aug 22 20:56:53 2012(r239593) > @@ -15,7 +15,7 @@ start_cmd="${name}_start" > stop_cmd=":" > > # This will remove old ${entropy_file} and generate a new one. > -# According to Bruce Schneier, this is stronly recomended in order > +# According to Bruce Schneier, this is strongly recomended in order > # to avoid using same ${entropy_file} across reboots. > # Reference: Chapter 10.6, Practical Cryptograpy, ISBN: 0-471-22357-3 Nitpicking... but recommended is also incorrect! Chris ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r239593 - head/etc/rc.d
On Wed, Aug 22, 2012 at 2:20 PM, Chris Rees wrote: > On 22 Aug 2012 21:57, "David E. O'Brien" wrote: >> >> Author: obrien >> Date: Wed Aug 22 20:56:53 2012 >> New Revision: 239593 >> URL: http://svn.freebsd.org/changeset/base/239593 >> >> Log: >> Fix comment misspelling. >> >> Submitted by: kargl >> >> Modified: >> head/etc/rc.d/postrandom >> >> Modified: head/etc/rc.d/postrandom >> > == >> --- head/etc/rc.d/postrandomWed Aug 22 20:34:23 2012(r239592) >> +++ head/etc/rc.d/postrandomWed Aug 22 20:56:53 2012(r239593) >> @@ -15,7 +15,7 @@ start_cmd="${name}_start" >> stop_cmd=":" >> >> # This will remove old ${entropy_file} and generate a new one. >> -# According to Bruce Schneier, this is stronly recomended in order >> +# According to Bruce Schneier, this is strongly recomended in order >> # to avoid using same ${entropy_file} across reboots. >> # Reference: Chapter 10.6, Practical Cryptograpy, ISBN: 0-471-22357-3 > > Nitpicking... but recommended is also incorrect! As is "Cryptography". -Garrett ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r239568 - head/etc/rc.d
Were these changes discussed somewhere and I missed it? I'm not opposed per se, but the security aspects should be discussed on freebsd-security@, and it's preferable that significant changes to rcorder be looked at on freebsd-rc@ as well. Can you hold off on MFC'ing any of this until it's been reviewed more thoroughly? Doug On 08/22/2012 11:35, David E. O'Brien wrote: > Author: obrien > Date: Wed Aug 22 18:35:17 2012 > New Revision: 239568 > URL: http://svn.freebsd.org/changeset/base/239568 > > Log: > Add dependencies based on security(7). > > Modified: > head/etc/rc.d/securelevel > > Modified: head/etc/rc.d/securelevel > == > --- head/etc/rc.d/securelevel Wed Aug 22 18:30:13 2012(r239567) > +++ head/etc/rc.d/securelevel Wed Aug 22 18:35:17 2012(r239568) > @@ -4,6 +4,7 @@ > # > > # PROVIDE: securelevel > +# REQUIRE: adjkerntz ipfw ipfilter pf > > . /etc/rc.subr > > -- I am only one, but I am one. I cannot do everything, but I can do something. And I will not let what I cannot do interfere with what I can do. -- Edward Everett Hale, (1822 - 1909) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r239595 - head/etc/rc.d
Author: delphij Date: Wed Aug 22 22:17:35 2012 New Revision: 239595 URL: http://svn.freebsd.org/changeset/base/239595 Log: Allow - be used in the name of a provider. Without this change it's not possible to specify a gptid in geli_devices. Modified: head/etc/rc.d/geli head/etc/rc.d/geli2 Modified: head/etc/rc.d/geli == --- head/etc/rc.d/geli Wed Aug 22 21:14:59 2012(r239594) +++ head/etc/rc.d/geli Wed Aug 22 22:17:35 2012(r239595) @@ -53,7 +53,7 @@ geli_start() fi for provider in ${devices}; do - provider_=`ltr ${provider} '/' '_'` + provider_=`ltr ${provider} '/-' '_'` eval "flags=\${geli_${provider_}_flags}" if [ -z "${flags}" ]; then Modified: head/etc/rc.d/geli2 == --- head/etc/rc.d/geli2 Wed Aug 22 21:14:59 2012(r239594) +++ head/etc/rc.d/geli2 Wed Aug 22 22:17:35 2012(r239595) @@ -42,7 +42,7 @@ geli2_start() devices=`geli_make_list` for provider in ${devices}; do - provider_=`ltr ${provider} '/' '_'` + provider_=`ltr ${provider} '/-' '_'` eval "autodetach=\${geli_${provider_}_autodetach}" if [ -z "${autodetach}" ]; then ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r239568 - head/etc/rc.d
On Wed, Aug 22, 2012 at 02:37:37PM -0700, Doug Barton wrote: > Were these changes discussed somewhere and I missed it? They were not discussed. I did not see the need. This is simple functionality. If securelevel is raised > 0, one cannot start up a firewall nor make major changes to time. Thus these components are required to be done before raising securelevel. > I'm not opposed per se, but the security aspects should be discussed on > freebsd-security@, I'm sorry, I didn't feel that ensuring the software follows the published specification of its functionality to have such a security aspect. > and it's preferable that significant changes to > rcorder be looked at on freebsd-rc@ as well. I don't consider this to be a significant change. I do have some significant changes that I do want freebsd-rc@ to review I will be sending soon. > Can you hold off on MFC'ing any of this until it's been reviewed more > thoroughly? Yes. -- -- David (obr...@freebsd.org) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r238563 - head/gnu/usr.bin/groff/tmac
On Tue, Aug 21, 2012 at 04:25:53PM -0700, Simon J. Gerraty wrote: > On Wed, 22 Aug 2012 00:29:44 +0200, Jilles Tjoelker writes: > >On FreeBSD, the first two statements are partially false. All sh(1) > >builtins that correspond to utilities specified by POSIX (but not > >special builtins) have versions accessible to execve() (on 8.x and > That's interesting, especially for 'cd', though is there any use case in > which it is actually useful? I'm drawing a blank. I think the most important reason is to reduce special cases. The POSIX developers did not want to create a second subset of utilities that are not available via execve() (the first subset is the special builtins). The burden on implementations is very low (see src/usr.bin/alias), and there are some possible use cases: 'cd' will fail if the directory does not exist. 'command -v' and 'command -V' will show information. 'read' will swallow input. 'type', 'umask' and 'ulimit' will show information. > >older, hash, type and ulimit are missing). This includes cd but not > >chdir, since chdir is not specified by POSIX. Also, FreeBSD make > >includes a somewhat arbitrary list of shell builtins, including cd, that > >cause it to invoke the shell even if there are no metacharacters. > Yes, I pondered whether something like that might be worthwhile, > but since a bare 'cd somewhere' all by itself is rather pointless, it > seemed a corner case. If it avoids the need to add semicolons for mysterious reasons, that may be enough reason. I think make's optimization of executing certain commands directly instead of passing them to sh should be rather invisible to the user, particularly if the optimization may be activated or deactivated by something seemingly innocuous like toggling -j. It seems not entirely possible to hide the optimization completely as that would require deeper knowledge of the shell in make. Shell builtins are usually found before a PATH search and there may be non-standard shell builtins. -- Jilles Tjoelker ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r239596 - head/etc/rc.d
Author: obrien Date: Wed Aug 22 22:34:55 2012 New Revision: 239596 URL: http://svn.freebsd.org/changeset/base/239596 Log: The entire comment block is now spell checked this time -- I promise. Modified: head/etc/rc.d/postrandom Modified: head/etc/rc.d/postrandom == --- head/etc/rc.d/postrandomWed Aug 22 22:17:35 2012(r239595) +++ head/etc/rc.d/postrandomWed Aug 22 22:34:55 2012(r239596) @@ -15,9 +15,9 @@ start_cmd="${name}_start" stop_cmd=":" # This will remove old ${entropy_file} and generate a new one. -# According to Bruce Schneier, this is strongly recomended in order +# According to Bruce Schneier, this is strongly recommended in order # to avoid using same ${entropy_file} across reboots. -# Reference: Chapter 10.6, Practical Cryptograpy, ISBN: 0-471-22357-3 +# Reference: Chapter 10.6, Practical Cryptography, ISBN: 0-471-22357-3 postrandom_start() { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r239597 - head/sys/arm/arm
Author: gonzo Date: Wed Aug 22 22:48:50 2012 New Revision: 239597 URL: http://svn.freebsd.org/changeset/base/239597 Log: Do not change "cachable" attribute for DMA memory allocated with BUS_DMA_COHERENT attribute The minimum unit for changing "cachable" attribute is page, so call to pmap_change_attr effectively disable cache for all pages that newly allocated DMA memory region spans on. The problem is that general-purpose memory could reside on these pages too and disabling cache might affect performance. Moreover ldrex/strex operators raise Data Abort exception when accessing memory on page with "cachable" attribute off. BUS_DMA_COHERENT does nto require memory to be coherent. It just suggests to do best effort for reducing synchronization overhead. Modified: head/sys/arm/arm/busdma_machdep-v6.c Modified: head/sys/arm/arm/busdma_machdep-v6.c == --- head/sys/arm/arm/busdma_machdep-v6.cWed Aug 22 22:34:55 2012 (r239596) +++ head/sys/arm/arm/busdma_machdep-v6.cWed Aug 22 22:48:50 2012 (r239597) @@ -618,10 +618,6 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi } dmat->map_count++; - if (flags & BUS_DMA_COHERENT) - pmap_change_attr((vm_offset_t)*vaddr, len, - BUS_DMA_NOCACHE); - CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d", __func__, dmat, dmat->flags, 0); return (0); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r239598 - head/etc/rc.d
Author: obrien Date: Wed Aug 22 23:37:24 2012 New Revision: 239598 URL: http://svn.freebsd.org/changeset/base/239598 Log: * Reinstate r128059's consumption of our best entropy first. r128060 for "hardware-supplied entropy" reversed this without reason, seems a typo. * Isolate "better than nothing" implementation to a function. Submitted by: obrien & Arthur Mesh Sponsored by: Juniper Networks Modified: head/etc/rc.d/initrandom Modified: head/etc/rc.d/initrandom == --- head/etc/rc.d/initrandomWed Aug 22 22:48:50 2012(r239597) +++ head/etc/rc.d/initrandomWed Aug 22 23:37:24 2012(r239598) @@ -21,6 +21,17 @@ feed_dev_random() fi } +better_than_nothing() +{ + # XXX temporary until we can improve the entropy + # harvesting rate. + # Entropy below is not great, but better than nothing. + # This unblocks the generator at startup + ( ps -fauxww; sysctl -a; date; df -ib; dmesg; ps -fauxww ) \ + | dd of=/dev/random bs=8k 2>/dev/null + cat /bin/ls | dd of=/dev/random bs=8k 2>/dev/null +} + initrandom_start() { soft_random_generator=`sysctl kern.random 2>/dev/null` @@ -52,14 +63,6 @@ initrandom_start() fi fi - # XXX temporary until we can improve the entropy - # harvesting rate. - # Entropy below is not great, but better than nothing. - # This unblocks the generator at startup - ( ps -fauxww; sysctl -a; date; df -ib; dmesg; ps -fauxww ) \ - | dd of=/dev/random bs=8k 2>/dev/null - cat /bin/ls | dd of=/dev/random bs=8k 2>/dev/null - # First pass at reseeding /dev/random. # case ${entropy_file} in @@ -72,6 +75,8 @@ initrandom_start() ;; esac + better_than_nothing() + echo -n ' kickstart' fi ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r239599 - head/etc/rc.d
Author: obrien Date: Wed Aug 22 23:44:12 2012 New Revision: 239599 URL: http://svn.freebsd.org/changeset/base/239599 Log: Correct style. Modified: head/etc/rc.d/initrandom Modified: head/etc/rc.d/initrandom == --- head/etc/rc.d/initrandomWed Aug 22 23:37:24 2012(r239598) +++ head/etc/rc.d/initrandomWed Aug 22 23:44:12 2012(r239599) @@ -75,7 +75,7 @@ initrandom_start() ;; esac - better_than_nothing() + better_than_nothing echo -n ' kickstart' fi ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r238563 - head/gnu/usr.bin/groff/tmac
On Thu, 23 Aug 2012 00:30:02 +0200, Jilles Tjoelker writes: >I think the most important reason is to reduce special cases. The POSIX >developers did not want to create a second subset of utilities that are >not available via execve() (the first subset is the special builtins). >The burden on implementations is very low (see src/usr.bin/alias), and >there are some possible use cases: The burden may be low, but so is the functionality ;-) 'cd' makes little sense in a child process. >'cd' will fail if the directory does not exist. so will 'test -d', and without giving the false impression that something useful will result if the directory does exist. >If it avoids the need to add semicolons for mysterious reasons, that may >be enough reason. I think everyone agrees that re-writing the target to remove the spurious 'cd' would have been better. That aside, I would disagree, at least for the case of 'cd'. It is only the fact that there is probably no way to construct a harmful example that did not involve a shell meta char (hence rendering the existance of /usr/bin/cd irrelevant). 'cd /tmp/dir && rm -rf *' would be rather dangerous if the && (or ;) didn't trigger use of a shell, and since as previously noted just 'cd /tmp/dir' is pretty pointless, the functionality is very low. In over 25 years of writing makefiles, I don't recall seeing this before. >I think make's optimization of executing certain commands directly >instead of passing them to sh should be rather invisible to the user, >particularly if the optimization may be activated or deactivated by >something seemingly innocuous like toggling -j. Changing the way the dependency graph is processed is probably more often the cause of surprises. But yes, makefiles which need work for -j (heck even separate objdirs) are common enough. >It seems not entirely possible to hide the optimization completely as >that would require deeper knowledge of the shell in make. Shell builtins >are usually found before a PATH search and there may be non-standard >shell builtins. True, which is a good argument for having a standard shell as part of the build environment. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r239602 - head/usr.sbin/jail
Author: jamie Date: Thu Aug 23 01:43:22 2012 New Revision: 239602 URL: http://svn.freebsd.org/changeset/base/239602 Log: Pre-separate IP addresses passed on the command line, so they can be properly parsed for interface prefixes and netmask suffixes. This was already done for the old-style (fixed) command line, but missed for the new-style. MFC after:1 week Modified: head/usr.sbin/jail/jail.c Modified: head/usr.sbin/jail/jail.c == --- head/usr.sbin/jail/jail.c Thu Aug 23 01:43:01 2012(r239601) +++ head/usr.sbin/jail/jail.c Thu Aug 23 01:43:22 2012(r239602) @@ -304,9 +304,33 @@ main(int argc, char **argv) for (i++; i < argc; i++) add_param(NULL, NULL, IP_COMMAND, argv[i]); - break; } - add_param(NULL, NULL, 0, argv[i]); +#ifdef INET + else if (!strncmp(argv[i], "ip4.addr=", 9)) { + for (cs = argv[i] + 9;; cs = ncs + 1) { + ncs = strchr(cs, ','); + if (ncs) + *ncs = '\0'; + add_param(NULL, NULL, KP_IP4_ADDR, cs); + if (!ncs) + break; + } + } +#endif +#ifdef INET6 + else if (!strncmp(argv[i], "ip6.addr=", 9)) { + for (cs = argv[i] + 9;; cs = ncs + 1) { + ncs = strchr(cs, ','); + if (ncs) + *ncs = '\0'; + add_param(NULL, NULL, KP_IP6_ADDR, cs); + if (!ncs) + break; + } + } +#endif + else + add_param(NULL, NULL, 0, argv[i]); } } else { /* From the config file, perhaps with a specified jail */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r239601 - head/usr.sbin/jail
Author: jamie Date: Thu Aug 23 01:43:01 2012 New Revision: 239601 URL: http://svn.freebsd.org/changeset/base/239601 Log: Remember that I'm using length-defined strings in parameters: Remove a bogus null terminator when stripping the netmask from IP addresses. This was causing later addresses in a comma-separated string to disappear. Use memcpy instead of strcpy. This could just cause Bad Things. PR: 170832 MFC after:1 week Modified: head/usr.sbin/jail/config.c Modified: head/usr.sbin/jail/config.c == --- head/usr.sbin/jail/config.c Thu Aug 23 00:39:08 2012(r239600) +++ head/usr.sbin/jail/config.c Thu Aug 23 01:43:01 2012(r239601) @@ -597,8 +597,7 @@ check_intparams(struct cfjail *j) "ip4.addr: bad netmask \"%s\"", cs); error = -1; } - *cs = '\0'; - s->len = cs - s->s + 1; + s->len = cs - s->s; } } } @@ -621,8 +620,7 @@ check_intparams(struct cfjail *j) cs); error = -1; } - *cs = '\0'; - s->len = cs - s->s + 1; + s->len = cs - s->s; } } } @@ -714,7 +712,7 @@ import_params(struct cfjail *j) value = alloca(vallen); cs = value; TAILQ_FOREACH_SAFE(s, &p->val, tq, ts) { - strcpy(cs, s->s); + memcpy(cs, s->s, s->len); if (ts != NULL) { cs += s->len + 1; cs[-1] = ','; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r239603 - head/sys/dev/ath/ath_hal
Author: adrian Date: Thu Aug 23 02:58:06 2012 New Revision: 239603 URL: http://svn.freebsd.org/changeset/base/239603 Log: Add chipset names. Modified: head/sys/dev/ath/ath_hal/ah.c Modified: head/sys/dev/ath/ath_hal/ah.c == --- head/sys/dev/ath/ath_hal/ah.c Thu Aug 23 01:43:22 2012 (r239602) +++ head/sys/dev/ath/ath_hal/ah.c Thu Aug 23 02:58:06 2012 (r239603) @@ -101,9 +101,9 @@ ath_hal_mac_name(struct ath_hal *ah) return "5413"; case AR_SREV_VERSION_COBRA: return "2415"; - case AR_SREV_2425: + case AR_SREV_2425: /* Swan */ return "2425"; - case AR_SREV_2417: + case AR_SREV_2417: /* Nala */ return "2417"; case AR_XSREV_VERSION_OWL_PCI: return "5416"; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r239604 - in head/sys/dev/ath/ath_hal: . ar9003
Author: adrian Date: Thu Aug 23 03:03:00 2012 New Revision: 239604 URL: http://svn.freebsd.org/changeset/base/239604 Log: Add AR9380 devid HAL definitions and probe/attach strings. Obtained from:Device IDs are from Qualcomm Atheros Added: head/sys/dev/ath/ath_hal/ar9003/ar9300_devid.h (contents, props changed) Modified: head/sys/dev/ath/ath_hal/ah.c Modified: head/sys/dev/ath/ath_hal/ah.c == --- head/sys/dev/ath/ath_hal/ah.c Thu Aug 23 02:58:06 2012 (r239603) +++ head/sys/dev/ath/ath_hal/ah.c Thu Aug 23 03:03:00 2012 (r239604) @@ -24,6 +24,7 @@ #include "ah_eeprom.h" /* for 5ghz fast clock flag */ #include "ar5416/ar5416reg.h" /* NB: includes ar5212reg.h */ +#include "ar9003/ar9300_devid.h" /* linker set of registered chips */ OS_SET_DECLARE(ah_chips, struct ath_hal_chip); @@ -123,6 +124,21 @@ ath_hal_mac_name(struct ath_hal *ah) if (AH_PRIVATE(ah)->ah_ispcie) return "9287"; return "9227"; + case AR_SREV_VERSION_AR9380: + if (ah->ah_macRev >= AR_SREV_REVISION_AR9580_10) + return "9580"; + return "9380"; + case AR_SREV_VERSION_AR9460: + return "9460"; + case AR_SREV_VERSION_AR9330: + return "9330"; + case AR_SREV_VERSION_AR9340: + return "9340"; + case AR_SREV_VERSION_QCA9550: + /* XXX should say QCA, not AR */ + return "9550"; + case AR_SREV_VERSION_AR9485: + return "9485"; } return ""; } Added: head/sys/dev/ath/ath_hal/ar9003/ar9300_devid.h == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ath/ath_hal/ar9003/ar9300_devid.h Thu Aug 23 03:03:00 2012(r239604) @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2012, Qualcomm Atheros, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that the following conditions are met: + * 1. The materials contained herein are unmodified and are used + *unmodified. + * 2. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following NO + *''WARRANTY'' disclaimer below (''Disclaimer''), without + *modification. + * 3. Redistributions in binary form must reproduce at minimum a + *disclaimer similar to the Disclaimer below and any redistribution + *must be conditioned upon including a substantially similar + *Disclaimer requirement for further binary redistribution. + * 4. Neither the names of the above-listed copyright holders nor the + *names of any contributors may be used to endorse or promote + *product derived from this software without specific prior written + *permission. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, + * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE + * FOR 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 DAMAGES. + * + * $FreeBSD$ + * + */ +#ifndef__AR9300_DEVID_H__ +#define__AR9300_DEVID_H__ + +/* + * AR9380 HAL device IDs. + */ + +/* + * MAC Version and Revision + */ +#defineAR_SREV_VERSION_AR9380 0x1C0 +#defineAR_SREV_VERSION_AR9580 0x1C0 +#defineAR_SREV_VERSION_AR9460 0x280 + +#defineAR_SREV_VERSION_AR9330 0x200 +#defineAR_SREV_VERSION_AR9340 0x300 +#defineAR_SREV_VERSION_QCA9550 0x400 +#defineAR_SREV_VERSION_AR9485 0x240 + +#defineAR_SREV_REVISION_AR9380_10 0 /* AR9380 1.0 */ +#defineAR_SREV_REVISION_AR9380_20 2 /* AR9380 2.0/2.1 */ +#defineAR_SREV_REVISION_AR9380_22 3 /* AR9380 2.2 */ +#defineAR_SREV_REVISION_AR9580_10 4 /* AR9580/Peacock 1.0 */ + +#defineAR_SREV_REVISION_AR9330_10 0 /* AR9330 1.0 */ +#defineAR_SREV_REVISION_AR9330_11 1 /* AR9330 1.1 */ +#defineAR_SREV_REVISION_AR9330_12 2 /* AR9330 1.2 */ +#defineAR_SREV_REVISION_AR9330_11_MASK 0xf /* AR9330 1.1 rev
svn commit: r239605 - head/sys/dev/ath/ath_hal
Author: adrian Date: Thu Aug 23 03:25:09 2012 New Revision: 239605 URL: http://svn.freebsd.org/changeset/base/239605 Log: Add some more interrupt handling bits. Obtained from:Qualcomm Atheros Modified: head/sys/dev/ath/ath_hal/ah.h Modified: head/sys/dev/ath/ath_hal/ah.h == --- head/sys/dev/ath/ath_hal/ah.h Thu Aug 23 03:03:00 2012 (r239604) +++ head/sys/dev/ath/ath_hal/ah.h Thu Aug 23 03:25:09 2012 (r239605) @@ -412,20 +412,23 @@ typedef enum { typedef enum { HAL_INT_RX = 0x0001, /* Non-common mapping */ HAL_INT_RXDESC = 0x0002, /* Legacy mapping */ + HAL_INT_RXERR = 0x0004, HAL_INT_RXHP= 0x0001, /* EDMA */ HAL_INT_RXLP= 0x0002, /* EDMA */ - HAL_INT_RXERR = 0x0004, HAL_INT_RXNOFRM = 0x0008, HAL_INT_RXEOL = 0x0010, HAL_INT_RXORN = 0x0020, HAL_INT_TX = 0x0040, /* Non-common mapping */ HAL_INT_TXDESC = 0x0080, HAL_INT_TIM_TIMER= 0x0100, + HAL_INT_MCI = 0x0200, + HAL_INT_BBPANIC = 0x0400, HAL_INT_TXURN = 0x0800, HAL_INT_MIB = 0x1000, HAL_INT_RXPHY = 0x4000, HAL_INT_RXKCM = 0x8000, HAL_INT_SWBA= 0x0001, + HAL_INT_BRSSI = 0x0002, HAL_INT_BMISS = 0x0004, HAL_INT_BNR = 0x0010, HAL_INT_TIM = 0x0020, /* Non-common mapping */ @@ -435,6 +438,8 @@ typedef enum { HAL_INT_CABEND = 0x0200, /* Non-common mapping */ HAL_INT_TSFOOR = 0x0400, /* Non-common mapping */ HAL_INT_TBTT= 0x0800, /* Non-common mapping */ + /* Atheros ref driver has a generic timer interrupt now..*/ + HAL_INT_GENTIMER= 0x0800, /* Non-common mapping */ HAL_INT_CST = 0x1000, /* Non-common mapping */ HAL_INT_GTT = 0x2000, /* Non-common mapping */ HAL_INT_FATAL = 0x4000, /* Non-common mapping */ @@ -457,6 +462,7 @@ typedef enum { | HAL_INT_RXKCM | HAL_INT_SWBA | HAL_INT_BMISS + | HAL_INT_BRSSI | HAL_INT_BNR | HAL_INT_GPIO, } HAL_INT; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r239606 - head/sys/dev/ath/ath_hal
Author: adrian Date: Thu Aug 23 03:37:01 2012 New Revision: 239606 URL: http://svn.freebsd.org/changeset/base/239606 Log: Add a placeholder and typedefs for MFP (management frame protection.) Obtained from:Qualcomm Atheros Modified: head/sys/dev/ath/ath_hal/ah.h Modified: head/sys/dev/ath/ath_hal/ah.h == --- head/sys/dev/ath/ath_hal/ah.h Thu Aug 23 03:25:09 2012 (r239605) +++ head/sys/dev/ath/ath_hal/ah.h Thu Aug 23 03:37:01 2012 (r239606) @@ -830,6 +830,16 @@ typedef enum { } HAL_DFS_DOMAIN; /* + * MFP decryption options for initializing the MAC. + */ + +typedef enum { + HAL_MFP_QOSDATA = 0,/* Decrypt MFP frames like QoS data frames. All chips before Merlin. */ + HAL_MFP_PASSTHRU, /* Don't decrypt MFP frames at all. Passthrough */ + HAL_MFP_HW_CRYPTO /* hardware decryption enabled. Merlin can do it. */ +} HAL_MFP_OPT_T; + +/* * Flag for setting QUIET period */ typedef enum { @@ -1404,4 +1414,14 @@ int __ahdecl ath_hal_getcca(struct ath_h HAL_BOOL __ahdecl ath_hal_EepromDataRead(struct ath_hal *ah, u_int off, uint16_t *data); +/* + * For now, simply pass through MFP frames. + */ +static inline u_int32_t +ath_hal_get_mfp_qos(struct ath_hal *ah) +{ + //return AH_PRIVATE(ah)->ah_mfp_qos; + return HAL_MFP_QOSDATA; +} + #endif /* _ATH_AH_H_ */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r238990 - in head/sys: net netinet netinet6
On Fri, Aug 03, 2012 at 01:33:44 +0400, Gleb Smirnoff wrote: > On Thu, Aug 02, 2012 at 04:46:42PM +, Bjoern A. Zeeb wrote: > B> On Thu, 2 Aug 2012, Gleb Smirnoff wrote: > B> > B> > Author: glebius > B> > Date: Thu Aug 2 13:57:49 2012 > B> > New Revision: 238990 > B> > URL: http://svn.freebsd.org/changeset/base/238990 > B> > > B> > Log: > B> > Fix races between in_lltable_prefix_free(), lla_lookup(), > B> > llentry_free() and arptimer(): > B> > > B> > o Use callout_init_rw() for lle timeout, this allows us safely > B> >disestablish them. > B> >- This allows us to simplify the arptimer() and make it > B> > race safe. > B> > o Consistently use ifp->if_afdata_lock to lock access to > B> >linked lists in the lle hashes. > B> > o Introduce new lle flag LLE_LINKED, which marks an entry that > B> >is attached to the hash. > B> >- Use LLE_LINKED to avoid double unlinking via consequent > B> > calls to llentry_free(). > B> >- Mark lle with LLE_DELETED via |= operation istead of =, > B> > so that other flags won't be lost. > B> > o Make LLE_ADDREF(), LLE_REMREF() and LLE_FREE_LOCKED() more > B> >consistent and provide more informative KASSERTs. > B> > > B> > The patch is a collaborative work of all submitters and myself. > B> > B> Quoting from 2 year old memory you just introduced a possible deadlock > B> on tbale (or with that networkstack) teardown adding the extra af_data > B> write locking to the table walk. > > Can you please give more details? I didn't get it. What else needs > afdata lock and what does it hold which is held by table walk. Is there a deadlock in that particular change? If so, what will it take to fix it? Thanks, Ken -- Kenneth Merry k...@freebsd.org ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r239607 - head/sys/dev/mmc
Author: imp Date: Thu Aug 23 04:35:55 2012 New Revision: 239607 URL: http://svn.freebsd.org/changeset/base/239607 Log: The check for MAXPHYS doesn't make sense, so remove it. Report errors indicated by the transport. If this is too chatty, I'll throw it behind a debug write. Remove commented out debugs that are no longer useful. Modified: head/sys/dev/mmc/mmcsd.c Modified: head/sys/dev/mmc/mmcsd.c == --- head/sys/dev/mmc/mmcsd.cThu Aug 23 03:37:01 2012(r239606) +++ head/sys/dev/mmc/mmcsd.cThu Aug 23 04:35:55 2012(r239607) @@ -88,6 +88,17 @@ struct mmcsd_softc { int suspend; }; +static const char *errmsg[] = +{ + "None", + "Timeout", + "Bad CRC", + "Fifo", + "Failed", + "Invalid", + "NO MEMORY" +}; + /* bus entry points */ static int mmcsd_attach(device_t dev); static int mmcsd_detach(device_t dev); @@ -169,13 +180,10 @@ mmcsd_attach(device_t dev) /* * Report the clock speed of the underlying hardware, which might be * different than what the card reports due to hardware limitations. -* Report how many blocks the hardware transfers at once, but clip the -* number to MAXPHYS since the system won't initiate larger transfers. +* Report how many blocks the hardware transfers at once. */ speed = mmcbr_get_clock(device_get_parent(dev)); maxblocks = mmc_get_max_data(dev); - if (maxblocks > MAXPHYS) - maxblocks = MAXPHYS; device_printf(dev, "%ju%cB <%s>%s at %s %d.%01dMHz/%dbit/%d-block\n", mb, unit, mmc_get_card_id_string(dev), mmc_get_read_only(dev) ? " (read-only)" : "", @@ -286,6 +294,14 @@ mmcsd_strategy(struct bio *bp) } } +static const char * +mmcsd_errmsg(int e) +{ + if (e < 0 || e > MMC_ERR_MAX) + return "Bad error code"; + return errmsg[e]; +} + static daddr_t mmcsd_rw(struct mmcsd_softc *sc, struct bio *bp) { @@ -337,12 +353,13 @@ mmcsd_rw(struct mmcsd_softc *sc, struct stop.flags = MMC_RSP_R1B | MMC_CMD_AC; req.stop = &stop; } -// printf("Len %d %lld-%lld flags %#x sz %d\n", -// (int)data.len, (long long)block, (long long)end, data.flags, sz); MMCBUS_WAIT_FOR_REQUEST(device_get_parent(dev), dev, &req); - if (req.cmd->error != MMC_ERR_NONE) + if (req.cmd->error != MMC_ERR_NONE) { + device_printf(dev, "Error indicated: %d %s\n", + req.cmd->error, mmcsd_errmsg(req.cmd->error)); break; + } block += numblocks; } return (block); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r239356 - head/sbin/dhclient
On Thu, Aug 23, 2012 at 12:27:46AM +0900, Hajimu UMEMOTO wrote: > A link-local address has a scope; an interface here. You cannot omit > it on FreeBSD by default. To be able to omit it, specify something > like ipv6_default_interface="em0" in your /etc/rc.conf. Please enlighten me a bit. RFC 4007 "11.6. Omitting Zone Indices" states: "The format defined in this document does not intend to invalidate the original format for non-global addresses; that is, the format without the zone index portion. As described in Section 6, in some common cases with the notion of the default zone index, there can be no ambiguity about scope zones. In such an environment, the implementation can omit the "%" part." Does absolutely trusted IPv6 local net using link-local addresses only falls in that case? If yes, is there a way to make address scope optional for all link-local addresses in FreeBSD? Are link-local addresses ever usable for DNS or not due to their % part? F.e. for the case there is no global IPv6 net assigned at all but pure isolated IPv6 local network. > In anyway, I don't recommend to use a link-local address for DNS. Is it only due to their scope part or other reasons exists too? -- http://ache.vniz.net/ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r239609 - head/lib/libthr/thread
Author: davidxu Date: Thu Aug 23 05:15:15 2012 New Revision: 239609 URL: http://svn.freebsd.org/changeset/base/239609 Log: Eliminate redundant code, _thr_spinlock_init() has already been called in init_private(), don't call it again in fork() wrapper. Modified: head/lib/libthr/thread/thr_fork.c Modified: head/lib/libthr/thread/thr_fork.c == --- head/lib/libthr/thread/thr_fork.c Thu Aug 23 04:57:56 2012 (r239608) +++ head/lib/libthr/thread/thr_fork.c Thu Aug 23 05:15:15 2012 (r239609) @@ -200,9 +200,6 @@ _fork(void) _rtld_atfork_post(rtld_locks); _thr_setthreaded(0); - /* reinitialize libc spinlocks. */ - _thr_spinlock_init(); - /* reinitalize library. */ _libpthread_init(curthread); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"