svn commit: r226090 - head/sys/sys
Author: obrien Date: Fri Oct 7 06:00:00 2011 New Revision: 226090 URL: http://svn.freebsd.org/changeset/base/226090 Log: Increase MSGBUF_SIZE. The previous size lead to truncated /var/run/dmesg.boot when booted with -v. Modified: head/sys/sys/msgbuf.h Modified: head/sys/sys/msgbuf.h == --- head/sys/sys/msgbuf.h Fri Oct 7 05:47:30 2011(r226089) +++ head/sys/sys/msgbuf.h Fri Oct 7 06:00:00 2011(r226090) @@ -77,7 +77,7 @@ int msgbuf_peekbytes(struct msgbuf *mbp, void msgbuf_reinit(struct msgbuf *mbp, void *ptr, int size); #ifndef MSGBUF_SIZE -#defineMSGBUF_SIZE (32768 * 2) +#defineMSGBUF_SIZE (32768 * 3) #endif #endif /* KERNEL */ ___ 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: r226091 - head/sys/dev/hwpmc
Author: adrian Date: Fri Oct 7 06:13:38 2011 New Revision: 226091 URL: http://svn.freebsd.org/changeset/base/226091 Log: Begin implementing correct MIPS24K sampling mode behaviour. * Add the interrupt bit in the configuration register * Correctly set the counter register for the sampling overflow interrupt. The interrupt is asserted when bit 31 is set. So set the overflow value at 0x8000 and subtract the programmed value as appropriate. Modified: head/sys/dev/hwpmc/hwpmc_mips24k.h Modified: head/sys/dev/hwpmc/hwpmc_mips24k.h == --- head/sys/dev/hwpmc/hwpmc_mips24k.h Fri Oct 7 06:00:00 2011 (r226090) +++ head/sys/dev/hwpmc/hwpmc_mips24k.h Fri Oct 7 06:13:38 2011 (r226091) @@ -35,7 +35,7 @@ PMC_CAP_WRITE | PMC_CAP_INVERT | \ PMC_CAP_QUALIFIER) - +#define MIPS24K_PMC_INTERRUPT_ENABLE 0x10 /* Enable interrupts */ #define MIPS24K_PMC_USER_ENABLE 0x08 /* Count in USER mode */ #define MIPS24K_PMC_SUPER_ENABLE 0x04 /* Count in SUPERVISOR mode */ #define MIPS24K_PMC_KERNEL_ENABLE 0x02 /* Count in KERNEL mode */ @@ -43,9 +43,12 @@ MIPS24K_PMC_SUPER_ENABLE | \ MIPS24K_PMC_KERNEL_ENABLE) - -#defineMIPS24K_RELOAD_COUNT_TO_PERFCTR_VALUE(R)(-(R)) -#defineMIPS24K_PERFCTR_VALUE_TO_RELOAD_COUNT(P)(-(P)) +/* + * Interrupts are posted when bit 31 of the relevant + * counter is set. + */ +#defineMIPS24K_RELOAD_COUNT_TO_PERFCTR_VALUE(R)(0x8000 - (R)) +#defineMIPS24K_PERFCTR_VALUE_TO_RELOAD_COUNT(P)((P) - 0x8000) #define MIPS24K_PMC_SELECT 0x4 /* Which bit position the event starts at. */ #define MIPS24K_PMC_OFFSET 2 /* Control registers are 0, 2, 4, etc. */ ___ 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: r226095 - in head/sys/dev: esp sym
Author: marius Date: Fri Oct 7 08:59:54 2011 New Revision: 226095 URL: http://svn.freebsd.org/changeset/base/226095 Log: Merge from r225950: Set the sense residual properly. Reviewed by: ken Modified: head/sys/dev/esp/ncr53c9x.c head/sys/dev/sym/sym_hipd.c Modified: head/sys/dev/esp/ncr53c9x.c == --- head/sys/dev/esp/ncr53c9x.c Fri Oct 7 08:56:51 2011(r226094) +++ head/sys/dev/esp/ncr53c9x.c Fri Oct 7 08:59:54 2011(r226095) @@ -1367,7 +1367,8 @@ ncr53c9x_sense(struct ncr53c9x_softc *sc ss-byte2 = ccb-ccb_h.target_lun SCSI_CMD_LUN_SHIFT; ss-length = sizeof(struct scsi_sense_data); ecb-clen = sizeof(*ss); - ecb-daddr = (char *)ecb-ccb-csio.sense_data; + memset(ccb-csio.sense_data, 0, sizeof(ccb-csio.sense_data)); + ecb-daddr = (char *)ccb-csio.sense_data; ecb-dleft = sizeof(struct scsi_sense_data); ecb-flags |= ECB_SENSE; ecb-timeout = NCR_SENSE_TIMEOUT; @@ -1397,7 +1398,7 @@ ncr53c9x_done(struct ncr53c9x_softc *sc, union ccb *ccb = ecb-ccb; struct ncr53c9x_linfo *li; struct ncr53c9x_tinfo *ti; - int lun; + int lun, sense_returned; NCR_LOCK_ASSERT(sc, MA_OWNED); @@ -1426,6 +1427,13 @@ ncr53c9x_done(struct ncr53c9x_softc *sc, ccb-csio.scsi_status = SCSI_STATUS_CHECK_COND; ccb-ccb_h.status = CAM_SCSI_STATUS_ERROR | CAM_AUTOSNS_VALID; + sense_returned = sizeof(ccb-csio.sense_data) - + ecb-dleft; + if (sense_returned ccb-csio.sense_len) + ccb-csio.sense_resid = ccb-csio.sense_len - + sense_returned; + else + ccb-csio.sense_resid = 0; } else if (ecb-stat == SCSI_STATUS_CHECK_COND) { if ((ecb-flags ECB_SENSE) != 0) ccb-ccb_h.status = CAM_AUTOSENSE_FAIL; Modified: head/sys/dev/sym/sym_hipd.c == --- head/sys/dev/sym/sym_hipd.c Fri Oct 7 08:56:51 2011(r226094) +++ head/sys/dev/sym/sym_hipd.c Fri Oct 7 08:59:54 2011(r226095) @@ -7154,7 +7154,7 @@ static void sym_complete_error (hcb_p np { struct ccb_scsiio *csio; u_int cam_status; - int i; + int i, sense_returned; SYM_LOCK_ASSERT(MA_OWNED); @@ -7214,11 +7214,15 @@ static void sym_complete_error (hcb_p np * Bounce back the sense data to user and * fix the residual. */ - bzero(csio-sense_data, csio-sense_len); + bzero(csio-sense_data, sizeof(csio-sense_data)); + sense_returned = SYM_SNS_BBUF_LEN - csio-sense_resid; + if (sense_returned csio-sense_len) + csio-sense_resid = csio-sense_len - + sense_returned; + else + csio-sense_resid = 0; bcopy(cp-sns_bbuf, csio-sense_data, - MIN(csio-sense_len, SYM_SNS_BBUF_LEN)); - csio-sense_resid += csio-sense_len; - csio-sense_resid -= SYM_SNS_BBUF_LEN; + MIN(csio-sense_len, sense_returned)); #if 0 /* * If the device reports a UNIT ATTENTION condition ___ 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: r226098 - head/sys/kern
Author: jonathan Date: Fri Oct 7 09:51:12 2011 New Revision: 226098 URL: http://svn.freebsd.org/changeset/base/226098 Log: Change one printf() to log(). As noted in kern/159780, printf() is not very jail-friendly, since it can't be easily monitored by jail management tools. This patch reports an error via log() instead, which, if nobody is watching the log file, still prints to the console. Approved by: mentor (rwatson) Submitted by: Eugene Grosbein eu...@eg.sd.rdtc.ru MFC after: 5 days Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c == --- head/sys/kern/vfs_subr.cFri Oct 7 09:35:17 2011(r226097) +++ head/sys/kern/vfs_subr.cFri Oct 7 09:51:12 2011(r226098) @@ -3054,7 +3054,7 @@ vfs_sysctl(SYSCTL_HANDLER_ARGS) struct vfsconf *vfsp; struct xvfsconf xvfsp; - printf(WARNING: userland calling deprecated sysctl, + log(LOG_WARNING, userland calling deprecated sysctl, please rebuild world\n); #if 1 || defined(COMPAT_PRELITE2) ___ 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: r226089 - in head: share/man/man7 sys/kern
on 07/10/2011 08:47 David E. O'Brien said the following: Author: obrien Date: Fri Oct 7 05:47:30 2011 New Revision: 226089 URL: http://svn.freebsd.org/changeset/base/226089 Log: Disallow various debug.kdb sysctl's when securelevel is raised. PR: 161350 Maybe the same would also be a good idea for sysctls defined at the top of sys/kern/kern_shutdown.c? Thank you! -- Andriy Gapon ___ 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: r226090 - head/sys/sys
on 07/10/2011 09:00 David E. O'Brien said the following: Author: obrien Date: Fri Oct 7 06:00:00 2011 New Revision: 226090 URL: http://svn.freebsd.org/changeset/base/226090 Log: Increase MSGBUF_SIZE. The previous size lead to truncated /var/run/dmesg.boot when booted with -v. Modified: head/sys/sys/msgbuf.h Modified: head/sys/sys/msgbuf.h == --- head/sys/sys/msgbuf.h Fri Oct 7 05:47:30 2011(r226089) +++ head/sys/sys/msgbuf.h Fri Oct 7 06:00:00 2011(r226090) @@ -77,7 +77,7 @@ int msgbuf_peekbytes(struct msgbuf *mbp, void msgbuf_reinit(struct msgbuf *mbp, void *ptr, int size); #ifndef MSGBUF_SIZE -#define MSGBUF_SIZE (32768 * 2) +#define MSGBUF_SIZE (32768 * 3) Heck, I am going to five! :-) #endif #endif /* KERNEL */ -- Andriy Gapon ___ 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: r226099 - head/sys/teken
Author: ed Date: Fri Oct 7 12:21:50 2011 New Revision: 226099 URL: http://svn.freebsd.org/changeset/base/226099 Log: Tab should not blank cells. It seems I was under the impression that a tab differs from a single forward tabulation, namely that it blanks the underlying cells. This seems not to be the case. They are identical. This should fix applications like jove(1) that use tabs instead of explicit cursor position setting. Reported by: Brett Glass brett lariat net MFC after:3 days, after it's tested Modified: head/sys/teken/teken_subr.h Modified: head/sys/teken/teken_subr.h == --- head/sys/teken/teken_subr.h Fri Oct 7 09:51:12 2011(r226098) +++ head/sys/teken/teken_subr.h Fri Oct 7 12:21:50 2011(r226099) @@ -595,20 +595,7 @@ static void teken_subr_horizontal_tab(teken_t *t) { - if (t-t_stateflags TS_CONS25) { - teken_subr_cursor_forward_tabulation(t, 1); - } else { - teken_rect_t tr; - - tr.tr_begin = t-t_cursor; - teken_subr_cursor_forward_tabulation(t, 1); - tr.tr_end.tp_row = tr.tr_begin.tp_row + 1; - tr.tr_end.tp_col = t-t_cursor.tp_col; - - /* Blank region that we skipped. */ - if (tr.tr_end.tp_col tr.tr_begin.tp_col) - teken_funcs_fill(t, tr, BLANK, t-t_curattr); - } + teken_subr_cursor_forward_tabulation(t, 1); } static void ___ 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: r226100 - head/sys/teken/stress
Author: ed Date: Fri Oct 7 12:42:03 2011 New Revision: 226100 URL: http://svn.freebsd.org/changeset/base/226100 Log: Simply let teken_stress use arc4random. This makes it run quite a bit faster, since it makes system calls less often. Modified: head/sys/teken/stress/teken_stress.c Modified: head/sys/teken/stress/teken_stress.c == --- head/sys/teken/stress/teken_stress.cFri Oct 7 12:21:50 2011 (r226099) +++ head/sys/teken/stress/teken_stress.cFri Oct 7 12:42:03 2011 (r226100) @@ -99,24 +99,14 @@ int main(int argc __unused, char *argv[] __unused) { teken_t t; - int rnd; unsigned int i, iteration = 0; unsigned char buf[2048]; - rnd = open(/dev/urandom, O_RDONLY); - if (rnd 0) { - perror(/dev/urandom); - exit(1); - } teken_init(t, tf, NULL); for (;;) { - if (read(rnd, buf, sizeof buf) != sizeof buf) { - perror(read); - exit(1); - } - + arc4random_buf(buf, sizeof buf); for (i = 0; i sizeof buf; i++) { if (buf[i] = 0x80) buf[i] = ___ 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: r226100 - head/sys/teken/stress
On Fri, Oct 07, 2011 at 12:42:03PM +, Ed Schouten wrote: Author: ed Date: Fri Oct 7 12:42:03 2011 New Revision: 226100 URL: http://svn.freebsd.org/changeset/base/226100 Log: Simply let teken_stress use arc4random. This makes it run quite a bit faster, since it makes system calls less often. It is because we still have in some sense incorrect (fatherson the same sequence after fork) arc4random() implementation with the patch stucking in the so-called FreeBSD Security Team review already several years. OpenBSD version have at least one syscall per arc4random() call - getpid(). -- 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: r226101 - head/lib/libpam/modules/pam_ssh
Author: des Date: Fri Oct 7 12:58:33 2011 New Revision: 226101 URL: http://svn.freebsd.org/changeset/base/226101 Log: Load the ECDSA key if there is one. MFC after:1 week Modified: head/lib/libpam/modules/pam_ssh/pam_ssh.8 head/lib/libpam/modules/pam_ssh/pam_ssh.c Modified: head/lib/libpam/modules/pam_ssh/pam_ssh.8 == --- head/lib/libpam/modules/pam_ssh/pam_ssh.8 Fri Oct 7 12:42:03 2011 (r226100) +++ head/lib/libpam/modules/pam_ssh/pam_ssh.8 Fri Oct 7 12:58:33 2011 (r226101) @@ -1,6 +1,6 @@ .\ Copyright (c) 2001 Mark R V Murray -.\ All rights reserved. .\ Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\ Copyright (c) 2004-2011 Dag-Erling Smørgrav .\ All rights reserved. .\ .\ This software was developed for the FreeBSD Project by ThinkSec AS and @@ -34,7 +34,7 @@ .\ .\ $FreeBSD$ .\ -.Dd November 26, 2001 +.Dd October 7, 2011 .Dt PAM_SSH 8 .Os .Sh NAME @@ -135,6 +135,8 @@ SSH1 RSA key SSH2 RSA key .It Pa $HOME/.ssh/id_dsa SSH2 DSA key +.It Pa $HOME/.ssh/id_ecdsa +SSH2 ECDSA key .El .Sh SEE ALSO .Xr ssh-agent 1 , Modified: head/lib/libpam/modules/pam_ssh/pam_ssh.c == --- head/lib/libpam/modules/pam_ssh/pam_ssh.c Fri Oct 7 12:42:03 2011 (r226100) +++ head/lib/libpam/modules/pam_ssh/pam_ssh.c Fri Oct 7 12:58:33 2011 (r226101) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2011 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -78,6 +79,7 @@ static const char *pam_ssh_keyfiles[] = .ssh/identity,/* SSH1 RSA key */ .ssh/id_rsa, /* SSH2 RSA key */ .ssh/id_dsa, /* SSH2 DSA key */ + .ssh/id_ecdsa,/* SSH2 ECDSA key */ NULL }; @@ -324,6 +326,7 @@ pam_ssh_add_keys_to_agent(pam_handle_t * /* get a connection to the agent */ if ((ac = ssh_get_authentication_connection()) == NULL) { + openpam_log(PAM_LOG_DEBUG, failed to connect to the agent); pam_err = PAM_SYSTEM_ERR; goto end; } ___ 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: r226103 - head/crypto/openssh
Author: des Date: Fri Oct 7 13:10:16 2011 New Revision: 226103 URL: http://svn.freebsd.org/changeset/base/226103 Log: Add a -x option that causes ssh-agent(1) to exit when all clients have disconnected. MFC after:1 week Modified: head/crypto/openssh/ssh-agent.1 head/crypto/openssh/ssh-agent.c Modified: head/crypto/openssh/ssh-agent.1 == --- head/crypto/openssh/ssh-agent.1 Fri Oct 7 12:59:04 2011 (r226102) +++ head/crypto/openssh/ssh-agent.1 Fri Oct 7 13:10:16 2011 (r226103) @@ -44,7 +44,7 @@ .Sh SYNOPSIS .Nm ssh-agent .Op Fl c | s -.Op Fl d +.Op Fl dx .Op Fl a Ar bind_address .Op Fl t Ar life .Op Ar command Op Ar arg ... @@ -103,6 +103,8 @@ A lifetime specified for an identity wit .Xr ssh-add 1 overrides this value. Without this option the default maximum lifetime is forever. +.It Fl x +Exit after the last client has disconnected. .El .Pp If a commandline is given, this is executed as a subprocess of the agent. Modified: head/crypto/openssh/ssh-agent.c == --- head/crypto/openssh/ssh-agent.c Fri Oct 7 12:59:04 2011 (r226102) +++ head/crypto/openssh/ssh-agent.c Fri Oct 7 13:10:16 2011 (r226103) @@ -138,15 +138,34 @@ extern char *__progname; /* Default lifetime (0 == forever) */ static int lifetime = 0; +/* + * Client connection count; incremented in new_socket() and decremented in + * close_socket(). When it reaches 0, ssh-agent will exit. Since it is + * normally initialized to 1, it will never reach 0. However, if the -x + * option is specified, it is initialized to 0 in main(); in that case, + * ssh-agent will exit as soon as it has had at least one client but no + * longer has any. + */ +static int xcount = 1; + static void close_socket(SocketEntry *e) { + int last = 0; + + if (e-type == AUTH_CONNECTION) { + debug(xcount %d - %d, xcount, xcount - 1); + if (--xcount == 0) + last = 1; + } close(e-fd); e-fd = -1; e-type = AUTH_UNUSED; buffer_free(e-input); buffer_free(e-output); buffer_free(e-request); + if (last) + cleanup_exit(0); } static void @@ -901,6 +920,10 @@ new_socket(sock_type type, int fd) { u_int i, old_alloc, new_alloc; + if (type == AUTH_CONNECTION) { + debug(xcount %d - %d, xcount, xcount + 1); + ++xcount; + } set_nonblock(fd); if (fd max_fd) @@ -1121,6 +1144,7 @@ usage(void) fprintf(stderr, -d Debug mode.\n); fprintf(stderr, -a socket Bind agent socket to given name.\n); fprintf(stderr, -t life Default identity lifetime (seconds).\n); + fprintf(stderr, -x Exit when the last client disconnects.\n); exit(1); } @@ -1162,7 +1186,7 @@ main(int ac, char **av) __progname = ssh_get_progname(av[0]); seed_rng(); - while ((ch = getopt(ac, av, cdksa:t:)) != -1) { + while ((ch = getopt(ac, av, cdksa:t:x)) != -1) { switch (ch) { case 'c': if (s_flag) @@ -1191,6 +1215,9 @@ main(int ac, char **av) usage(); } break; + case 'x': + xcount = 0; + break; default: usage(); } @@ -1350,8 +1377,7 @@ skip: if (ac 0) parent_alive_interval = 10; idtab_init(); - if (!d_flag) - signal(SIGINT, SIG_IGN); + signal(SIGINT, d_flag ? cleanup_handler : SIG_IGN); signal(SIGPIPE, SIG_IGN); signal(SIGHUP, cleanup_handler); signal(SIGTERM, cleanup_handler); ___ 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: r226104 - head/sys/rpc/rpcsec_gss
Author: rmacklem Date: Fri Oct 7 13:16:21 2011 New Revision: 226104 URL: http://svn.freebsd.org/changeset/base/226104 Log: Remove an extraneous already from a comment introduced by r226081. Submitted by: bf1783 at googlemail.com MFC after:3 days Modified: head/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Modified: head/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c == --- head/sys/rpc/rpcsec_gss/svc_rpcsec_gss.cFri Oct 7 13:10:16 2011 (r226103) +++ head/sys/rpc/rpcsec_gss/svc_rpcsec_gss.cFri Oct 7 13:16:21 2011 (r226104) @@ -639,7 +639,7 @@ svc_rpc_gss_forget_client(struct svc_rpc /* * Make sure this client has not already been removed * from the lists by svc_rpc_gss_forget_client() or -* svc_rpc_gss_forget_client_locked() already. +* svc_rpc_gss_forget_client_locked(). */ if (client == tclient) { svc_rpc_gss_forget_client_locked(client); ___ 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: r226105 - head/sys/netinet
Author: andre Date: Fri Oct 7 13:43:01 2011 New Revision: 226105 URL: http://svn.freebsd.org/changeset/base/226105 Log: Add back the IP header length to the total packet length field on raw IP sockets. It was deducted in ip_input() in preparation for protocols interested only in the payload. On raw sockets the IP header should be delivered as it at came in from the network except for the byte order swaps in some fields. This brings us in line with all other OS'es that provide raw IP sockets. Reported by: Matthew Cini Sarreo mcins1-at-gmail.com MFC after: 3 days Modified: head/sys/netinet/raw_ip.c Modified: head/sys/netinet/raw_ip.c == --- head/sys/netinet/raw_ip.c Fri Oct 7 13:16:21 2011(r226104) +++ head/sys/netinet/raw_ip.c Fri Oct 7 13:43:01 2011(r226105) @@ -289,6 +289,13 @@ rip_input(struct mbuf *m, int off) last = NULL; ifp = m-m_pkthdr.rcvif; + /* +* Add back the IP header length which was +* removed by ip_input(). Raw sockets do +* not modify the packet except for some +* byte order swaps. +*/ + ip-ip_len += off; hash = INP_PCBHASH_RAW(proto, ip-ip_src.s_addr, ip-ip_dst.s_addr, V_ripcbinfo.ipi_hashmask); ___ 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: r226090 - head/sys/sys
On Fri, Oct 07, 2011 at 02:14:46PM +0300 I heard the voice of Andriy Gapon, and lo! it spake thus: on 07/10/2011 09:00 David E. O'Brien said the following: -#defineMSGBUF_SIZE (32768 * 2) +#defineMSGBUF_SIZE (32768 * 3) Heck, I am going to five! :-) I've also had options MSGBUF_SIZE=163840 (which is * 5) in my kernel config for years. At least back to 2008, which is as far back as I have VCS history on it, and I'm pretty sure I had it around for some time prior. -- Matthew Fuller (MF4839) | fulle...@over-yonder.net Systems/Network Administrator | http://www.over-yonder.net/~fullermd/ On the Internet, nobody can hear you scream. ___ 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: r226090 - head/sys/sys
on 07/10/2011 16:43 Matthew D. Fuller said the following: On Fri, Oct 07, 2011 at 02:14:46PM +0300 I heard the voice of Andriy Gapon, and lo! it spake thus: on 07/10/2011 09:00 David E. O'Brien said the following: -#defineMSGBUF_SIZE (32768 * 2) +#defineMSGBUF_SIZE (32768 * 3) Heck, I am going to five! :-) I've also had options MSGBUF_SIZE=163840 (which is * 5) in my kernel config for years. At least back to 2008, which is as far back as I have VCS history on it, and I'm pretty sure I had it around for some time prior. Just in case: http://www.theonion.com/articles/fuck-everything-were-doing-five-blades,11056/ -- Andriy Gapon ___ 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: r226111 - in head: lib/libc/mips lib/libc/net lib/libc/sparc64 lib/libgssapi lib/libmp lib/libulog sys/teken/libteken
Author: ed Date: Fri Oct 7 15:05:24 2011 New Revision: 226111 URL: http://svn.freebsd.org/changeset/base/226111 Log: Fix whitespace inconsistencies found in homegrown Symbol.maps. Modified: head/lib/libc/mips/Symbol.map head/lib/libc/net/Symbol.map head/lib/libc/sparc64/Symbol.map head/lib/libgssapi/Symbol.map head/lib/libmp/Symbol.map head/lib/libulog/Symbol.map head/sys/teken/libteken/Symbol.map Modified: head/lib/libc/mips/Symbol.map == --- head/lib/libc/mips/Symbol.map Fri Oct 7 14:52:30 2011 (r226110) +++ head/lib/libc/mips/Symbol.map Fri Oct 7 15:05:24 2011 (r226111) @@ -1,5 +1,5 @@ -/* - * $FreeBSD$ +/* + * $FreeBSD$ */ /* Modified: head/lib/libc/net/Symbol.map == --- head/lib/libc/net/Symbol.mapFri Oct 7 14:52:30 2011 (r226110) +++ head/lib/libc/net/Symbol.mapFri Oct 7 15:05:24 2011 (r226111) @@ -155,14 +155,14 @@ FBSDprivate_1.0 { __ivaliduser_sa; __check_rhosts_file; __rcmd_errstr; - __nss_compat_getgrnam_r; - __nss_compat_getgrgid_r; - __nss_compat_getgrent_r; - __nss_compat_setgrent; - __nss_compat_endgrent; - __nss_compat_getpwnam_r; - __nss_compat_getpwuid_r; - __nss_compat_getpwent_r; - __nss_compat_setpwent; - __nss_compat_endpwent; + __nss_compat_getgrnam_r; + __nss_compat_getgrgid_r; + __nss_compat_getgrent_r; + __nss_compat_setgrent; + __nss_compat_endgrent; + __nss_compat_getpwnam_r; + __nss_compat_getpwuid_r; + __nss_compat_getpwent_r; + __nss_compat_setpwent; + __nss_compat_endpwent; }; Modified: head/lib/libc/sparc64/Symbol.map == --- head/lib/libc/sparc64/Symbol.mapFri Oct 7 14:52:30 2011 (r226110) +++ head/lib/libc/sparc64/Symbol.mapFri Oct 7 15:05:24 2011 (r226111) @@ -6,7 +6,7 @@ * This only needs to contain symbols that are not listed in * symbol maps from other parts of libc (i.e., not found in * stdlib/Symbol.map, string/Symbol.map, sys/Symbol.map, ...). - */ + */ FBSD_1.0 { /* PSEUDO syscalls */ _exit; Modified: head/lib/libgssapi/Symbol.map == --- head/lib/libgssapi/Symbol.map Fri Oct 7 14:52:30 2011 (r226110) +++ head/lib/libgssapi/Symbol.map Fri Oct 7 15:05:24 2011 (r226111) @@ -1,6 +1,6 @@ /* * $FreeBSD$ - */ + */ FBSD_1.1 { GSS_C_NT_ANONYMOUS; Modified: head/lib/libmp/Symbol.map == --- head/lib/libmp/Symbol.map Fri Oct 7 14:52:30 2011(r226110) +++ head/lib/libmp/Symbol.map Fri Oct 7 15:05:24 2011(r226111) @@ -1,6 +1,6 @@ /* * $FreeBSD$ - */ + */ FBSD_1.1 { mp_gcd; Modified: head/lib/libulog/Symbol.map == --- head/lib/libulog/Symbol.map Fri Oct 7 14:52:30 2011(r226110) +++ head/lib/libulog/Symbol.map Fri Oct 7 15:05:24 2011(r226111) @@ -1,6 +1,6 @@ /* * $FreeBSD$ - */ + */ FBSD_1.2 { ulog_login; Modified: head/sys/teken/libteken/Symbol.map == --- head/sys/teken/libteken/Symbol.map Fri Oct 7 14:52:30 2011 (r226110) +++ head/sys/teken/libteken/Symbol.map Fri Oct 7 15:05:24 2011 (r226111) @@ -1,6 +1,6 @@ /* * $FreeBSD$ - */ + */ FBSD_1.2 { teken_256to8; ___ 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: r226112 - in head/sys: amd64/include arm/include i386/include ia64/include mips/include powerpc/include sparc64/include
Author: kib Date: Fri Oct 7 16:09:44 2011 New Revision: 226112 URL: http://svn.freebsd.org/changeset/base/226112 Log: Remove unused define. MFC after:1 month Modified: head/sys/amd64/include/proc.h head/sys/arm/include/proc.h head/sys/i386/include/proc.h head/sys/ia64/include/proc.h head/sys/mips/include/proc.h head/sys/powerpc/include/proc.h head/sys/sparc64/include/proc.h Modified: head/sys/amd64/include/proc.h == --- head/sys/amd64/include/proc.h Fri Oct 7 15:05:24 2011 (r226111) +++ head/sys/amd64/include/proc.h Fri Oct 7 16:09:44 2011 (r226112) @@ -85,8 +85,6 @@ struct syscall_args { register_t args[8]; int narg; }; -#defineHAVE_SYSCALL_ARGS_DEF 1 - #endif /* _KERNEL */ #endif /* !_MACHINE_PROC_H_ */ Modified: head/sys/arm/include/proc.h == --- head/sys/arm/include/proc.h Fri Oct 7 15:05:24 2011(r226111) +++ head/sys/arm/include/proc.h Fri Oct 7 16:09:44 2011(r226112) @@ -71,6 +71,5 @@ struct syscall_args { u_int nap; u_int32_t insn; }; -#defineHAVE_SYSCALL_ARGS_DEF 1 #endif /* !_MACHINE_PROC_H_ */ Modified: head/sys/i386/include/proc.h == --- head/sys/i386/include/proc.hFri Oct 7 15:05:24 2011 (r226111) +++ head/sys/i386/include/proc.hFri Oct 7 16:09:44 2011 (r226112) @@ -83,8 +83,6 @@ struct syscall_args { register_t args[8]; int narg; }; -#defineHAVE_SYSCALL_ARGS_DEF 1 - #endif /* _KERNEL */ #endif /* !_MACHINE_PROC_H_ */ Modified: head/sys/ia64/include/proc.h == --- head/sys/ia64/include/proc.hFri Oct 7 15:05:24 2011 (r226111) +++ head/sys/ia64/include/proc.hFri Oct 7 16:09:44 2011 (r226112) @@ -49,7 +49,6 @@ struct syscall_args { register_t args32[8]; int narg; }; -#defineHAVE_SYSCALL_ARGS_DEF 1 #endif #endif /* !_MACHINE_PROC_H_ */ Modified: head/sys/mips/include/proc.h == --- head/sys/mips/include/proc.hFri Oct 7 15:05:24 2011 (r226111) +++ head/sys/mips/include/proc.hFri Oct 7 16:09:44 2011 (r226112) @@ -80,7 +80,6 @@ struct syscall_args { int narg; struct trapframe *trapframe; }; -#defineHAVE_SYSCALL_ARGS_DEF 1 #endif #ifdef __mips_n64 Modified: head/sys/powerpc/include/proc.h == --- head/sys/powerpc/include/proc.h Fri Oct 7 15:05:24 2011 (r226111) +++ head/sys/powerpc/include/proc.h Fri Oct 7 16:09:44 2011 (r226112) @@ -60,7 +60,6 @@ struct syscall_args { register_t args[10]; int narg; }; -#defineHAVE_SYSCALL_ARGS_DEF 1 #endif #endif /* !_MACHINE_PROC_H_ */ Modified: head/sys/sparc64/include/proc.h == --- head/sys/sparc64/include/proc.h Fri Oct 7 15:05:24 2011 (r226111) +++ head/sys/sparc64/include/proc.h Fri Oct 7 16:09:44 2011 (r226112) @@ -61,7 +61,6 @@ struct syscall_args { register_t args[8]; int narg; }; -#defineHAVE_SYSCALL_ARGS_DEF 1 #endif ___ 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: r226113 - head/sys/netinet
Author: andre Date: Fri Oct 7 16:39:03 2011 New Revision: 226113 URL: http://svn.freebsd.org/changeset/base/226113 Log: Prevent TCP sessions from stalling indefinitely in reassembly when reaching the zone limit of reassembly queue entries. When the zone limit was reached not even the missing segment that would complete the sequence space could be processed preventing the TCP session forever from making any further progress. Solve this deadlock by using a temporary on-stack queue entry for the missing segment followed by an immediate dequeue again by delivering the contiguous sequence space to the socket. Add logging under net.inet.tcp.log_debug for reassembly queue issues. Reviewed by: lsteward (previous version) Tested by:Steven Hartland killing-at-multiplay.co.uk MFC after:3 days Modified: head/sys/netinet/tcp_reass.c Modified: head/sys/netinet/tcp_reass.c == --- head/sys/netinet/tcp_reass.cFri Oct 7 16:09:44 2011 (r226112) +++ head/sys/netinet/tcp_reass.cFri Oct 7 16:39:03 2011 (r226113) @@ -177,7 +177,9 @@ tcp_reass(struct tcpcb *tp, struct tcphd struct tseg_qent *nq; struct tseg_qent *te = NULL; struct socket *so = tp-t_inpcb-inp_socket; + char *s = NULL; int flags; + struct tseg_qent tqs; INP_WLOCK_ASSERT(tp-t_inpcb); @@ -215,19 +217,40 @@ tcp_reass(struct tcpcb *tp, struct tcphd TCPSTAT_INC(tcps_rcvmemdrop); m_freem(m); *tlenp = 0; + if ((s = tcp_log_addrs(tp-t_inpcb-inp_inc, th, NULL, NULL))) { + log(LOG_DEBUG, %s; %s: queue limit reached, + segment dropped\n, s, __func__); + free(s, M_TCPLOG); + } return (0); } /* * Allocate a new queue entry. If we can't, or hit the zone limit * just drop the pkt. +* +* Use a temporary structure on the stack for the missing segment +* when the zone is exhausted. Otherwise we may get stuck. */ te = uma_zalloc(V_tcp_reass_zone, M_NOWAIT); - if (te == NULL) { + if (te == NULL th-th_seq != tp-rcv_nxt) { TCPSTAT_INC(tcps_rcvmemdrop); m_freem(m); *tlenp = 0; + if ((s = tcp_log_addrs(tp-t_inpcb-inp_inc, th, NULL, NULL))) { + log(LOG_DEBUG, %s; %s: global zone limit reached, + segment dropped\n, s, __func__); + free(s, M_TCPLOG); + } return (0); + } else if (th-th_seq == tp-rcv_nxt) { + bzero(tqs, sizeof(struct tseg_qent)); + te = tqs; + if ((s = tcp_log_addrs(tp-t_inpcb-inp_inc, th, NULL, NULL))) { + log(LOG_DEBUG, %s; %s: global zone limit reached, + using stack for missing segment\n, s, __func__); + free(s, M_TCPLOG); + } } tp-t_segqlen++; @@ -304,6 +327,8 @@ tcp_reass(struct tcpcb *tp, struct tcphd if (p == NULL) { LIST_INSERT_HEAD(tp-t_segq, te, tqe_q); } else { + KASSERT(te != tqs, (%s: temporary stack based entry not + first element in queue, __func__)); LIST_INSERT_AFTER(p, te, tqe_q); } @@ -327,7 +352,8 @@ present: m_freem(q-tqe_m); else sbappendstream_locked(so-so_rcv, q-tqe_m); - uma_zfree(V_tcp_reass_zone, q); + if (q != tqs) + uma_zfree(V_tcp_reass_zone, q); tp-t_segqlen--; q = nq; } while (q q-tqe_th-th_seq == tp-rcv_nxt); ___ 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: r226114 - head/sys/netinet
Author: qingli Date: Fri Oct 7 18:01:34 2011 New Revision: 226114 URL: http://svn.freebsd.org/changeset/base/226114 Log: Remove the reference held on the loopback route when the interface address is being deleted. Only the last reference holder deletes the loopback route. All other delete operations just clear the IFA_RTSELF flag. PR: kern/159601 Submitted by: pluknet Reviewed by: discussed on net@ MFC after:3 days Modified: head/sys/netinet/in.c Modified: head/sys/netinet/in.c == --- head/sys/netinet/in.c Fri Oct 7 16:39:03 2011(r226113) +++ head/sys/netinet/in.c Fri Oct 7 18:01:34 2011(r226114) @@ -1126,8 +1126,10 @@ in_scrubprefix(struct in_ifaddr *target, RT_LOCK(ia_ro.ro_rt); if (ia_ro.ro_rt-rt_refcnt = 1) freeit = 1; - else + else if (flags LLE_STATIC) { RT_REMREF(ia_ro.ro_rt); + target-ia_flags = ~IFA_RTSELF; + } RTFREE_LOCKED(ia_ro.ro_rt); } if (freeit (flags LLE_STATIC)) { ___ 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: r226116 - head/sys/dev/ppbus
Author: brueffer Date: Fri Oct 7 20:54:12 2011 New Revision: 226116 URL: http://svn.freebsd.org/changeset/base/226116 Log: Add missing va_end() to clean up after va_start(). CID: 4725 Found with: Coverity Prevent(tm) MFC after:1 week Modified: head/sys/dev/ppbus/ppb_msq.c Modified: head/sys/dev/ppbus/ppb_msq.c == --- head/sys/dev/ppbus/ppb_msq.cFri Oct 7 20:40:45 2011 (r226115) +++ head/sys/dev/ppbus/ppb_msq.cFri Oct 7 20:54:12 2011 (r226116) @@ -244,6 +244,7 @@ ppb_MS_init_msq(struct ppb_microseq *msq } } + va_end(p_list); 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: r226117 - head/sys/netipsec
Author: brueffer Date: Fri Oct 7 21:00:26 2011 New Revision: 226117 URL: http://svn.freebsd.org/changeset/base/226117 Log: Add missing va_end() in an error case to clean up after va_start() (already done in the non-error case). CID: 4726 Found with: Coverity Prevent(tm) MFC after:1 week Modified: head/sys/netipsec/key.c Modified: head/sys/netipsec/key.c == --- head/sys/netipsec/key.c Fri Oct 7 20:54:12 2011(r226116) +++ head/sys/netipsec/key.c Fri Oct 7 21:00:26 2011(r226117) @@ -1764,6 +1764,7 @@ key_gather_mbuf(m, mhp, ndeep, nitem, va fail: m_freem(result); + va_end(ap); return NULL; } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r226118 - in head/sys/dev: isp mps mpt
Author: marius Date: Fri Oct 7 21:23:42 2011 New Revision: 226118 URL: http://svn.freebsd.org/changeset/base/226118 Log: Sync with ahc(4)/ahd(4)/sym(4) etc: Zero any sense not transferred by the device as the SCSI specification mandates that any untransferred data should be assumed to be zero. Reviewed by: ken Modified: head/sys/dev/isp/isp_freebsd.h head/sys/dev/mps/mps_sas.c head/sys/dev/mpt/mpt_cam.c Modified: head/sys/dev/isp/isp_freebsd.h == --- head/sys/dev/isp/isp_freebsd.h Fri Oct 7 21:00:26 2011 (r226117) +++ head/sys/dev/isp/isp_freebsd.h Fri Oct 7 21:23:42 2011 (r226118) @@ -486,6 +486,7 @@ default: \ #defineXS_SAVE_SENSE(xs, sense_ptr, slen) do { \ (xs)-ccb_h.status |= CAM_AUTOSNS_VALID;\ + memset((xs)-sense_data, 0, sizeof((xs)-sense_data));\ memcpy((xs)-sense_data, sense_ptr, imin(XS_SNSLEN(xs),\ slen)); \ if (slen (xs)-sense_len) \ Modified: head/sys/dev/mps/mps_sas.c == --- head/sys/dev/mps/mps_sas.c Fri Oct 7 21:00:26 2011(r226117) +++ head/sys/dev/mps/mps_sas.c Fri Oct 7 21:23:42 2011(r226118) @@ -1675,6 +1675,7 @@ mpssas_scsiio_complete(struct mps_softc sense_len = min(rep-SenseCount, ccb-csio.sense_len - ccb-csio.sense_resid); + bzero(ccb-csio.sense_data, sizeof(ccb-csio.sense_data)); bcopy(cm-cm_sense, ccb-csio.sense_data, sense_len); ccb-ccb_h.status |= CAM_AUTOSNS_VALID; } Modified: head/sys/dev/mpt/mpt_cam.c == --- head/sys/dev/mpt/mpt_cam.c Fri Oct 7 21:00:26 2011(r226117) +++ head/sys/dev/mpt/mpt_cam.c Fri Oct 7 21:23:42 2011(r226118) @@ -3178,6 +3178,7 @@ mpt_scsi_reply_frame_handler(struct mpt_ else ccb-csio.sense_resid = 0; + bzero(ccb-csio.sense_data, sizeof(ccb-csio.sense_data)); bcopy(req-sense_vbuf, ccb-csio.sense_data, min(ccb-csio.sense_len, sense_returned)); } ___ 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: r225951 - head
On Mon, 2011-10-03 at 20:46:36 +, Nathan Whitehorn wrote: Author: nwhitehorn Date: Mon Oct 3 20:46:36 2011 New Revision: 225951 URL: http://svn.freebsd.org/changeset/base/225951 Log: Fix a number of platform problems in this file (mostly assuming that only amd64 has lib32). Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.incMon Oct 3 20:32:55 2011(r225950) +++ head/ObsoleteFiles.incMon Oct 3 20:46:36 2011(r225951) @@ -56,7 +56,7 @@ OLD_LIBS+=usr/lib/libdwarf.so.2 OLD_LIBS+=usr/lib/libopie.so.6 OLD_LIBS+=usr/lib/librtld_db.so.1 OLD_LIBS+=usr/lib/libtacplus.so.4 -.if ${TARGET_ARCH} == amd64 +.if ${TARGET_ARCH} == amd64 || ${TARGET_ARCH} == powerpc64 OLD_LIBS+=usr/lib32/libcam.so.5 OLD_LIBS+=usr/lib32/libpcap.so.7 OLD_LIBS+=usr/lib32/libufs.so.5 These conditionals should all be removed. 99% of them are not needed. The rm(1) should only be conditional on TARGET != arch1 iff arch1 is still using the file in question. It doesn't matter that arch2 never ever had that file. It's just one more rm(1) to a non-existing file. Uli ___ 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: r226119 - head/share/man/man9
Author: des Date: Fri Oct 7 22:14:18 2011 New Revision: 226119 URL: http://svn.freebsd.org/changeset/base/226119 Log: Mention tdsignal(9). MFC after:1 week Modified: head/share/man/man9/Makefile head/share/man/man9/psignal.9 Modified: head/share/man/man9/Makefile == --- head/share/man/man9/MakefileFri Oct 7 21:23:42 2011 (r226118) +++ head/share/man/man9/MakefileFri Oct 7 22:14:18 2011 (r226119) @@ -972,7 +972,8 @@ MLINKS+=printf.9 log.9 \ MLINKS+=priv.9 priv_check.9 \ priv.9 priv_check_cred.9 MLINKS+=psignal.9 gsignal.9 \ - psignal.9 pgsignal.9 + psignal.9 pgsignal.9 \ + psignal.9 tdsignal.9 MLINKS+=random.9 arc4rand.9 \ random.9 arc4random.9 \ random.9 read_random.9 \ Modified: head/share/man/man9/psignal.9 == --- head/share/man/man9/psignal.9 Fri Oct 7 21:23:42 2011 (r226118) +++ head/share/man/man9/psignal.9 Fri Oct 7 22:14:18 2011 (r226119) @@ -28,14 +28,15 @@ .\$NetBSD: psignal.9,v 1.1 1996/06/22 22:57:35 pk Exp $ .\ $FreeBSD$ .\ -.Dd June 22, 1996 +.Dd October 8, 2011 .Dt PSIGNAL 9 .Os .Sh NAME .Nm psignal , .Nm pgsignal , -.Nm gsignal -.Nd post signal to a process or process group +.Nm gsignal , +.Nm tdsignal +.Nd post signal to a thread, process, or process group .Sh SYNOPSIS .In sys/types.h .In sys/signalvar.h @@ -45,8 +46,10 @@ .Fn pgsignal struct pgrp *pgrp int signum int checkctty .Ft void .Fn gsignal int pgid int signum +.Ft void +.Fn tdsignal struct thread *td int signum .Sh DESCRIPTION -These functions post a signal to one or more processes. +These functions post a signal to a thread or one or more processes. The argument .Fa signum common to all three functions should be in the range @@ -135,6 +138,13 @@ set to zero. If .Fa pgid is zero no action is taken. +.Pp +The +.Fn tdsignal +function posts signal number +.Fa signum +to the thread represented by the thread structure +.Fa td . .Sh SEE ALSO .Xr sigaction 2 , .Xr signal 9 , ___ 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: r226120 - head/sys/netinet
Author: qingli Date: Fri Oct 7 22:22:19 2011 New Revision: 226120 URL: http://svn.freebsd.org/changeset/base/226120 Log: Do not try removing an ARP entry associated with a given interface address if that interface does not support ARP. Otherwise the system will generate error messages unnecessarily due to the missing entry. PR: kern/159602 Submitted by: pluknet MFC after:3 days Modified: head/sys/netinet/in.c Modified: head/sys/netinet/in.c == --- head/sys/netinet/in.c Fri Oct 7 22:14:18 2011(r226119) +++ head/sys/netinet/in.c Fri Oct 7 22:22:19 2011(r226120) @@ -1138,7 +1138,8 @@ in_scrubprefix(struct in_ifaddr *target, if (error == 0) target-ia_flags = ~IFA_RTSELF; } - if (flags LLE_STATIC) + if ((flags LLE_STATIC) + !(target-ia_ifp-if_flags IFF_NOARP)) /* remove arp cache */ arp_ifscrub(target-ia_ifp, IA_SIN(target)-sin_addr.s_addr); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r226121 - in head: share/misc usr.bin/calendar/calendars
Author: jceel Date: Fri Oct 7 23:12:33 2011 New Revision: 226121 URL: http://svn.freebsd.org/changeset/base/226121 Log: Add myself. Approved by: wkoszek (mentor) Modified: head/share/misc/committers-src.dot head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/share/misc/committers-src.dot == --- head/share/misc/committers-src.dot Fri Oct 7 22:22:19 2011 (r226120) +++ head/share/misc/committers-src.dot Fri Oct 7 23:12:33 2011 (r226121) @@ -153,6 +153,7 @@ iedowse [label=Ian Dowse\niedowse@FreeB imp [label=Warner Losh\n...@freebsd.org\n1996/09/20] ivoras [label=Ivan Voras\nivo...@freebsd.org\n2008/06/10] jamie [label=Jamie Gritton\nja...@freebsd.org\n2009/01/28] +jceel [label=Jakub Klama\njc...@freebsd.org\n2011/09/25] jchandra [label=Jayachandran C.\njchan...@freebsd.org\n2010/05/19] jeff [label=Jeff Roberson\nj...@freebsd.org\n2002/02/21] jh [label=Jaakko Heinonen\n...@freebsd.org\n2009/10/02] @@ -306,6 +307,7 @@ bz - anchie bz - jamie bz - syrinx +cognet - jceel cognet - kevlo cperciva - flz @@ -573,6 +575,8 @@ ume - tshiozak wes - scf +wkoszek - jceel + wollman - gad zml - mdf Modified: head/usr.bin/calendar/calendars/calendar.freebsd == --- head/usr.bin/calendar/calendars/calendar.freebsdFri Oct 7 22:22:19 2011(r226120) +++ head/usr.bin/calendar/calendars/calendar.freebsdFri Oct 7 23:12:33 2011(r226121) @@ -127,6 +127,7 @@ 04/17 Dryice Liu dry...@freebsd.org born in Jinan, Shandong, China, 1975 04/22 Joerg Wunsch jo...@freebsd.org born in Dresden, Sachsen, Germany, 1962 04/22 Jun Kuriyama kuriy...@freebsd.org born in Matsue, Shimane, Japan, 1973 +04/22 Jakub Klama jc...@freebsd.org born in Blachownia, Silesia, Poland, 1989 04/26 Rene Ladan r...@freebsd.org born in Geldrop, the Netherlands, 1980 04/29 Adam Weinberger ad...@freebsd.org born in Berkeley, California, United States, 1980 04/29 Eric Anholt anh...@freebsd.org born in Portland, Oregon, United States, 1983 ___ 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: r226122 - head/share/mk
Author: stas Date: Fri Oct 7 23:43:51 2011 New Revision: 226122 URL: http://svn.freebsd.org/changeset/base/226122 Log: - ${WRKSRC} might be missing when the autotools fixup is running. Account for this. Reported by: Mykola Dzham i...@levsha.me Modified: head/share/mk/bsd.port.mk Modified: head/share/mk/bsd.port.mk == --- head/share/mk/bsd.port.mk Fri Oct 7 23:12:33 2011(r226121) +++ head/share/mk/bsd.port.mk Fri Oct 7 23:43:51 2011(r226122) @@ -18,10 +18,10 @@ _WITHOUT_SRCCONF= .if !defined(BEFOREPORTMK) !defined(INOPTIONSMK) # Work around an issue where FreeBSD 10.0 is detected as FreeBSD 1.x. run-autotools-fixup: - find ${WRKSRC} -type f \( -name config.libpath -o \ + test -d ${WRKSRC} find ${WRKSRC} -type f \( -name config.libpath -o \ -name config.rpath -o -name configure -o -name libtool.m4 \) \ -exec sed -i '' -e 's/freebsd1\*)/SHOULDNOTMATCHANYTHING1)/' \ - -e 's/freebsd\[123\]\*)/SHOULDNOTMATCHANYTHING2)/' {} + + -e 's/freebsd\[123\]\*)/SHOULDNOTMATCHANYTHING2)/' {} + || /usr/bin/true .ORDER: run-autotools run-autotools-fixup do-configure do-configure: run-autotools-fixup ___ 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: r226123 - head/sys/dev/bce
Author: yongari Date: Sat Oct 8 00:00:54 2011 New Revision: 226123 URL: http://svn.freebsd.org/changeset/base/226123 Log: BCE_MISC_ID register of BCM5716 returns the same id of BCM5709 so remove explicit checks for BCM5716. The BCM5709 and BCM5716 chips are virtually indistinguishable by software except for the PCI device ID. The two chips differ in that BCM5709 supports TCP/IP and iSCSI offload in Windows while the BCM5716 doesn't. While I'm here remove now unused definition of BCE_CHIP_NUM_5716 and BCE_CHIP_ID_5716_C0. Reported by: sbruno Reviewed by: davidch Tested by:davidch Modified: head/sys/dev/bce/if_bce.c head/sys/dev/bce/if_bcereg.h Modified: head/sys/dev/bce/if_bce.c == --- head/sys/dev/bce/if_bce.c Fri Oct 7 23:43:51 2011(r226122) +++ head/sys/dev/bce/if_bce.c Sat Oct 8 00:00:54 2011(r226123) @@ -1112,8 +1112,7 @@ bce_attach(device_t dev) DBPRINT(sc, BCE_INFO_LOAD, %s(): Using MSI interrupt.\n, __FUNCTION__); sc-bce_flags |= BCE_USING_MSI_FLAG; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) sc-bce_flags |= BCE_ONE_SHOT_MSI_FLAG; sc-bce_irq_rid = 1; sc-bce_intr = bce_intr; @@ -1730,8 +1729,7 @@ bce_ctx_rd(struct bce_softc *sc, u32 cid offset = ctx_offset + cid_addr; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { REG_WR(sc, BCE_CTX_CTX_CTRL, (offset | BCE_CTX_CTX_CTRL_READ_REQ)); @@ -1783,8 +1781,7 @@ bce_ctx_wr(struct bce_softc *sc, u32 cid BCE_PRINTF(%s(): Invalid CID address: 0x%08X.\n, __FUNCTION__, cid_addr)); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { REG_WR(sc, BCE_CTX_CTX_DATA, ctx_val); REG_WR(sc, BCE_CTX_CTX_CTRL, (offset | BCE_CTX_CTX_CTRL_WRITE_REQ)); @@ -2469,8 +2466,7 @@ bce_init_nvram(struct bce_softc *sc) DBENTER(BCE_VERBOSE_NVRAM); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { sc-bce_flash_info = flash_5709; goto bce_init_nvram_get_flash_size; } @@ -3224,8 +3220,7 @@ bce_dma_free(struct bce_softc *sc) /* Free, unmap and destroy all context memory pages. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { for (i = 0; i sc-ctx_pages; i++ ) { if (sc-ctx_block[i] != NULL) { bus_dmamem_free( @@ -3564,8 +3559,7 @@ bce_dma_alloc(device_t dev) __FUNCTION__, (uintmax_t) sc-stats_block_paddr); /* BCM5709 uses host memory as cache for context memory. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { sc-ctx_pages = 0x2000 / BCM_PAGE_SIZE; if (sc-ctx_pages == 0) sc-ctx_pages = 1; @@ -4206,8 +4200,7 @@ bce_init_rxp_cpu(struct bce_softc *sc) cpu_reg.spad_base = BCE_RXP_SCRATCH; cpu_reg.mips_view_base = 0x800; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { fw.ver_major = bce_RXP_b09FwReleaseMajor; fw.ver_minor = bce_RXP_b09FwReleaseMinor; fw.ver_fix = bce_RXP_b09FwReleaseFix; @@ -4305,8 +4298,7 @@ bce_init_txp_cpu(struct bce_softc *sc) cpu_reg.spad_base = BCE_TXP_SCRATCH; cpu_reg.mips_view_base = 0x800; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { fw.ver_major = bce_TXP_b09FwReleaseMajor; fw.ver_minor = bce_TXP_b09FwReleaseMinor; fw.ver_fix = bce_TXP_b09FwReleaseFix; @@ -4403,8 +4395,7 @@ bce_init_tpat_cpu(struct bce_softc *sc) cpu_reg.spad_base = BCE_TPAT_SCRATCH; cpu_reg.mips_view_base = 0x800; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) ==
svn commit: r226124 - head/share/mk
Author: stas Date: Sat Oct 8 00:01:17 2011 New Revision: 226124 URL: http://svn.freebsd.org/changeset/base/226124 Log: - Add a couple of more sed subsitutions needed to get the correct libtool.m4. With these fixes libtool will correctly indentify the system as ELF (and not a.out). - While here, change the substitutions so they're still correctly match freebsd1.x, freebsd2.x etc. Modified: head/share/mk/bsd.port.mk Modified: head/share/mk/bsd.port.mk == --- head/share/mk/bsd.port.mk Sat Oct 8 00:00:54 2011(r226123) +++ head/share/mk/bsd.port.mk Sat Oct 8 00:01:17 2011(r226124) @@ -20,8 +20,12 @@ _WITHOUT_SRCCONF= run-autotools-fixup: test -d ${WRKSRC} find ${WRKSRC} -type f \( -name config.libpath -o \ -name config.rpath -o -name configure -o -name libtool.m4 \) \ - -exec sed -i '' -e 's/freebsd1\*)/SHOULDNOTMATCHANYTHING1)/' \ - -e 's/freebsd\[123\]\*)/SHOULDNOTMATCHANYTHING2)/' {} + || /usr/bin/true + -exec sed -i '' -e 's|freebsd1\*)|freebsd1.\*)|g' \ + -e 's|freebsd\[12\]\*)|freebsd[12].*)|g' \ + -e 's|freebsd\[123\]\*)|freebsd[123].*)|g' \ + -e 's|freebsd\[\[12\]\]\*)|freebsd[[12]].*)|g' \ + -e 's|freebsd\[\[123\]\]\*)|freebsd[[123]].*)|g' \ + {} + || /usr/bin/true .ORDER: run-autotools run-autotools-fixup do-configure do-configure: run-autotools-fixup ___ 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: r226113 - head/sys/netinet
Hi Andre and RE team, I've had a patch sitting in re@'s inbox for this problem since 15th Sep and have been waiting for their go-ahead to commit. The patch I submitted is at: http://people.freebsd.org/~lstewart/patches/misctcp/tcpreassstackfix_9.x.r225576.diff The proposed commit message was: ## Use a backup (stack allocated) struct tseg_qent when we are unable to allocate one from the TCP reassembly UMA zone and the incoming segment is the one we've been waiting for (i.e. th_seq == rcv_nxt). This avoids TCP connections stalling when the zone limit is reached. PR:kern/155407 Reported by:Slawa Olhovchenkov and Steven Hartland Tested by:Steven Hartland Submitted by:andre Reviewed by:jhb Approved by:re (?) MFC after:1 week ## I feel the logging changes should have been committed separately to the fix, but other than that, what you committed achieves the same thing as the patch I proposed. I should have updated the ML thread to say it was submitted and awaiting approval, so you weren't to know. Anyhoo, I guess I'll leave it up to you and re@ to sort out how you want to proceed, but wanted to make sure everyone was on the same page as RE would have gotten confused when you requested your patch be MFCed. Cheers, Lawrence On 10/08/11 03:39, Andre Oppermann wrote: Author: andre Date: Fri Oct 7 16:39:03 2011 New Revision: 226113 URL: http://svn.freebsd.org/changeset/base/226113 Log: Prevent TCP sessions from stalling indefinitely in reassembly when reaching the zone limit of reassembly queue entries. When the zone limit was reached not even the missing segment that would complete the sequence space could be processed preventing the TCP session forever from making any further progress. Solve this deadlock by using a temporary on-stack queue entry for the missing segment followed by an immediate dequeue again by delivering the contiguous sequence space to the socket. Add logging under net.inet.tcp.log_debug for reassembly queue issues. Reviewed by: lsteward (previous version) Tested by: Steven Hartlandkilling-at-multiplay.co.uk MFC after: 3 days Modified: head/sys/netinet/tcp_reass.c Modified: head/sys/netinet/tcp_reass.c == --- head/sys/netinet/tcp_reass.cFri Oct 7 16:09:44 2011 (r226112) +++ head/sys/netinet/tcp_reass.cFri Oct 7 16:39:03 2011 (r226113) @@ -177,7 +177,9 @@ tcp_reass(struct tcpcb *tp, struct tcphd struct tseg_qent *nq; struct tseg_qent *te = NULL; struct socket *so = tp-t_inpcb-inp_socket; + char *s = NULL; int flags; + struct tseg_qent tqs; INP_WLOCK_ASSERT(tp-t_inpcb); @@ -215,19 +217,40 @@ tcp_reass(struct tcpcb *tp, struct tcphd TCPSTAT_INC(tcps_rcvmemdrop); m_freem(m); *tlenp = 0; + if ((s = tcp_log_addrs(tp-t_inpcb-inp_inc, th, NULL, NULL))) { + log(LOG_DEBUG, %s; %s: queue limit reached, + segment dropped\n, s, __func__); + free(s, M_TCPLOG); + } return (0); } /* * Allocate a new queue entry. If we can't, or hit the zone limit * just drop the pkt. +* +* Use a temporary structure on the stack for the missing segment +* when the zone is exhausted. Otherwise we may get stuck. */ te = uma_zalloc(V_tcp_reass_zone, M_NOWAIT); - if (te == NULL) { + if (te == NULL th-th_seq != tp-rcv_nxt) { TCPSTAT_INC(tcps_rcvmemdrop); m_freem(m); *tlenp = 0; + if ((s = tcp_log_addrs(tp-t_inpcb-inp_inc, th, NULL, NULL))) { + log(LOG_DEBUG, %s; %s: global zone limit reached, + segment dropped\n, s, __func__); + free(s, M_TCPLOG); + } return (0); + } else if (th-th_seq == tp-rcv_nxt) { + bzero(tqs, sizeof(struct tseg_qent)); + te =tqs; + if ((s = tcp_log_addrs(tp-t_inpcb-inp_inc, th, NULL, NULL))) { + log(LOG_DEBUG, %s; %s: global zone limit reached, + using stack for missing segment\n, s, __func__); + free(s, M_TCPLOG); + } } tp-t_segqlen++; @@ -304,6 +327,8 @@ tcp_reass(struct tcpcb *tp, struct tcphd if (p == NULL) { LIST_INSERT_HEAD(tp-t_segq, te, tqe_q); } else { + KASSERT(te !=tqs, (%s: temporary stack based entry not + first element in queue, __func__)); LIST_INSERT_AFTER(p, te, tqe_q); } @@ -327,7 +352,8 @@ present: m_freem(q-tqe_m);