From owner-svn-src-head@freebsd.org Sun May 7 09:19:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5156FD605CF; Sun, 7 May 2017 09:19:44 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0697ADBC; Sun, 7 May 2017 09:19:43 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v479Jgqq050358; Sun, 7 May 2017 09:19:42 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v479Jg5v050357; Sun, 7 May 2017 09:19:42 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705070919.v479Jg5v050357@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 7 May 2017 09:19:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317901 - head/usr.bin/resizewin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 09:19:44 -0000 Author: trasz Date: Sun May 7 09:19:42 2017 New Revision: 317901 URL: https://svnweb.freebsd.org/changeset/base/317901 Log: Improve error reporting in resizewin(1). Reviewed by: cem (earlier version) MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D10624 Modified: head/usr.bin/resizewin/resizewin.c Modified: head/usr.bin/resizewin/resizewin.c ============================================================================== --- head/usr.bin/resizewin/resizewin.c Sun May 7 08:02:28 2017 (r317900) +++ head/usr.bin/resizewin/resizewin.c Sun May 7 09:19:42 2017 (r317901) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -87,8 +88,7 @@ main(__unused int argc, __unused char ** gettimeofday(&now, NULL); timersub(&now, &then, &now); if (now.tv_sec >= 2) { - fprintf(stderr, "\n\n\nTimeout reading from terminal\n"); - fprintf(stderr, "Read %d bytes, %s\n", cnt, data); + warnx("timeout reading from terminal"); err = 1; goto out; } @@ -104,7 +104,7 @@ main(__unused int argc, __unused char ** cnt++; if (cnt == sizeof(data) - 2) { - fprintf(stderr, "Response too long\n"); + warnx("response too long"); err = 1; goto out; } @@ -113,7 +113,7 @@ main(__unused int argc, __unused char ** /* Parse */ if (sscanf(data, "\033[%hu;%huR", &w.ws_row, &w.ws_col) != 2) { err = 1; - fprintf(stderr, "Unable to parse response\n"); + warnx("unable to parse response"); goto out; } From owner-svn-src-head@freebsd.org Sun May 7 11:44:27 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1108CD6221A; Sun, 7 May 2017 11:44:27 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA121EE2; Sun, 7 May 2017 11:44:26 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47BiPxv012066; Sun, 7 May 2017 11:44:25 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47BiPB4012065; Sun, 7 May 2017 11:44:25 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705071144.v47BiPB4012065@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 7 May 2017 11:44:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317904 - head/bin/stty X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 11:44:27 -0000 Author: trasz Date: Sun May 7 11:44:25 2017 New Revision: 317904 URL: https://svnweb.freebsd.org/changeset/base/317904 Log: .Xr resizewin from stty(1) man page. MFC after: 2 weeks Sponsored by: DARPA, AFRL Modified: head/bin/stty/stty.1 Modified: head/bin/stty/stty.1 ============================================================================== --- head/bin/stty/stty.1 Sun May 7 11:11:51 2017 (r317903) +++ head/bin/stty/stty.1 Sun May 7 11:44:25 2017 (r317904) @@ -588,6 +588,7 @@ Same as the control character .Sh EXIT STATUS .Ex -std .Sh SEE ALSO +.Xr resizewin 1 , .Xr termios 4 .Sh STANDARDS The From owner-svn-src-head@freebsd.org Sun May 7 12:08:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 569D8D62E08; Sun, 7 May 2017 12:08:43 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB139D08; Sun, 7 May 2017 12:08:42 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47C8fWG020446; Sun, 7 May 2017 12:08:41 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47C8f8n020445; Sun, 7 May 2017 12:08:41 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705071208.v47C8f8n020445@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 7 May 2017 12:08:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317905 - head/usr.bin/resizewin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 12:08:43 -0000 Author: trasz Date: Sun May 7 12:08:41 2017 New Revision: 317905 URL: https://svnweb.freebsd.org/changeset/base/317905 Log: Rename a variable, hopefully fixing build after r317901. MFC after: 2 weeks Sponsored by: DARPA, AFRL Modified: head/usr.bin/resizewin/resizewin.c Modified: head/usr.bin/resizewin/resizewin.c ============================================================================== --- head/usr.bin/resizewin/resizewin.c Sun May 7 11:44:25 2017 (r317904) +++ head/usr.bin/resizewin/resizewin.c Sun May 7 12:08:41 2017 (r317905) @@ -52,11 +52,11 @@ main(__unused int argc, __unused char ** { struct termios old, new; struct winsize w; - int ret, fd, cnt, err; + int ret, fd, cnt, error; char data[20]; struct timeval then, now; - err = 0; + error = 0; if ((fd = open("/dev/tty", O_RDWR | O_NONBLOCK)) == -1) exit(1); @@ -72,7 +72,7 @@ main(__unused int argc, __unused char ** exit(1); if (write(fd, query, sizeof(query)) != sizeof(query)) { - err = 1; + error = 1; goto out; } @@ -89,14 +89,14 @@ main(__unused int argc, __unused char ** timersub(&now, &then, &now); if (now.tv_sec >= 2) { warnx("timeout reading from terminal"); - err = 1; + error = 1; goto out; } usleep(20000); continue; } - err = 1; + error = 1; goto out; } if (data[cnt] == 'R') @@ -105,25 +105,25 @@ main(__unused int argc, __unused char ** cnt++; if (cnt == sizeof(data) - 2) { warnx("response too long"); - err = 1; + error = 1; goto out; } } /* Parse */ if (sscanf(data, "\033[%hu;%huR", &w.ws_row, &w.ws_col) != 2) { - err = 1; + error = 1; warnx("unable to parse response"); goto out; } /* Finally, what we want */ if (ioctl(fd, TIOCSWINSZ, &w) == -1) - err = 1; + error = 1; out: /* Restore echo */ tcsetattr(fd, TCSANOW, &old); close(fd); - exit(err); + exit(error); } From owner-svn-src-head@freebsd.org Sun May 7 12:12:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0DAE9D62FC4; Sun, 7 May 2017 12:12:47 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D1D271E2D; Sun, 7 May 2017 12:12:46 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47CCjUo024343; Sun, 7 May 2017 12:12:45 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47CCj85024342; Sun, 7 May 2017 12:12:45 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705071212.v47CCj85024342@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 7 May 2017 12:12:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317906 - head/sys/rpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 12:12:47 -0000 Author: rmacklem Date: Sun May 7 12:12:45 2017 New Revision: 317906 URL: https://svnweb.freebsd.org/changeset/base/317906 Log: Fix the client side krpc from doing TCP reconnects for ERESTART from sosend(). When sosend() replies ERESTART in the client side krpc, it indicates that the RPC message hasn't yet been sent and that the send queue is full or locked while a signal is posted for the process. Without this patch, this would result in a RPC_CANTSEND reply from clnt_vc_call(), which would cause clnt_reconnect_call() to create a new TCP transport connection. For most NFS servers, this wasn't a serious problem, although it did imply retries of outstanding RPCs, which could possibly have missed the DRC. For an NFSv4.1 mount to AmazonEFS, this caused a serious problem, since AmazonEFS often didn't retain the NFSv4.1 session and would reply with NFS4ERR_BAD_SESSION. This implies to the client a crash/reboot which requires open/lock state recovery. Three options were considered to fix this: - Return the ERESTART all the way up to the system call boundary and then have the system call redone. This is fraught with risk, due to convoluted code paths, asynchronous I/O RPCs etc. cperciva@ worked on this, but it is still a work in prgress and may not be feasible. - Set SB_NOINTR for the socket buffer. This fixes the problem, but makes the sosend() completely non interruptible, which kib@ considered inappropriate. It also would break forced dismount when a thread was blocked in sosend(). - Modify the retry loop in clnt_vc_call(), so that it loops for this case for up to 15sec. Testing showed that the sosend() usually succeeded by the 2nd retry. The extreme case observed was 111 loop iterations, or about 100msec of delay. This third alternative is what is implemented in this patch, since the change is: - localized - straightforward - forced dismount is not broken by it. This patch has been tested by cperciva@ extensively against AmazonEFS. Reported by: cperciva Tested by: cperciva MFC after: 2 weeks Modified: head/sys/rpc/clnt_vc.c Modified: head/sys/rpc/clnt_vc.c ============================================================================== --- head/sys/rpc/clnt_vc.c Sun May 7 12:08:41 2017 (r317905) +++ head/sys/rpc/clnt_vc.c Sun May 7 12:12:45 2017 (r317906) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -107,6 +108,8 @@ static struct clnt_ops clnt_vc_ops = { static void clnt_vc_upcallsdone(struct ct_data *); +static int fake_wchan; + /* * Create a client handle for a connection. * Default options are set, which the user can change using clnt_control()'s. @@ -298,7 +301,7 @@ clnt_vc_call( uint32_t xid; struct mbuf *mreq = NULL, *results; struct ct_request *cr; - int error; + int error, trycnt; cr = malloc(sizeof(struct ct_request), M_RPC, M_WAITOK); @@ -328,8 +331,20 @@ clnt_vc_call( timeout = ct->ct_wait; /* use default timeout */ } + /* + * After 15sec of looping, allow it to return RPC_CANTSEND, which will + * cause the clnt_reconnect layer to create a new TCP connection. + */ + trycnt = 15 * hz; call_again: mtx_assert(&ct->ct_lock, MA_OWNED); + if (ct->ct_closing || ct->ct_closed) { + ct->ct_threads--; + wakeup(ct); + mtx_unlock(&ct->ct_lock); + free(cr, M_RPC); + return (RPC_CANTSEND); + } ct->ct_xid++; xid = ct->ct_xid; @@ -397,13 +412,16 @@ call_again: */ error = sosend(ct->ct_socket, NULL, NULL, mreq, NULL, 0, curthread); mreq = NULL; - if (error == EMSGSIZE) { + if (error == EMSGSIZE || (error == ERESTART && + (ct->ct_waitflag & PCATCH) == 0 && trycnt-- > 0)) { SOCKBUF_LOCK(&ct->ct_socket->so_snd); sbwait(&ct->ct_socket->so_snd); SOCKBUF_UNLOCK(&ct->ct_socket->so_snd); AUTH_VALIDATE(auth, xid, NULL, NULL); mtx_lock(&ct->ct_lock); TAILQ_REMOVE(&ct->ct_pending, cr, cr_link); + /* Sleep for 1 clock tick before trying the sosend() again. */ + msleep(&fake_wchan, &ct->ct_lock, 0, "rpclpsnd", 1); goto call_again; } From owner-svn-src-head@freebsd.org Sun May 7 14:33:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE1C9D6299E; Sun, 7 May 2017 14:33:59 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 331CDBD6; Sun, 7 May 2017 14:33:59 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47EXwoZ080885; Sun, 7 May 2017 14:33:58 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47EXwtT080884; Sun, 7 May 2017 14:33:58 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201705071433.v47EXwtT080884@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sun, 7 May 2017 14:33:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317907 - head/sys/netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 14:34:00 -0000 Author: kp Date: Sun May 7 14:33:58 2017 New Revision: 317907 URL: https://svnweb.freebsd.org/changeset/base/317907 Log: pf: Fix vnet initialisation When running the vnet init code (pf_load_vnet()) we used to iterate over all vnets, marking them as unhooked. This is incorrect and leads to panics if pf is unloaded, as the unload code does not unregister the pfil hooks (because the vnet is marked as unhooked). There's no need or reason to touch other vnets during initialisation. Their pf_load_vnet() function will be triggered, which handles all required initialisation. Reviewed by: zec, gnn Differential Revision: https://reviews.freebsd.org/D10592 Modified: head/sys/netpfil/pf/pf_ioctl.c Modified: head/sys/netpfil/pf/pf_ioctl.c ============================================================================== --- head/sys/netpfil/pf/pf_ioctl.c Sun May 7 12:12:45 2017 (r317906) +++ head/sys/netpfil/pf/pf_ioctl.c Sun May 7 14:33:58 2017 (r317907) @@ -3712,17 +3712,8 @@ dehook_pf(void) static void pf_load_vnet(void) { - VNET_ITERATOR_DECL(vnet_iter); - - VNET_LIST_RLOCK(); - VNET_FOREACH(vnet_iter) { - CURVNET_SET(vnet_iter); - V_pf_pfil_hooked = 0; - TAILQ_INIT(&V_pf_tags); - TAILQ_INIT(&V_pf_qids); - CURVNET_RESTORE(); - } - VNET_LIST_RUNLOCK(); + TAILQ_INIT(&V_pf_tags); + TAILQ_INIT(&V_pf_qids); pfattach_vnet(); V_pf_vnet_active = 1; From owner-svn-src-head@freebsd.org Sun May 7 14:59:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A751D61008; Sun, 7 May 2017 14:59:47 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 12E2917A8; Sun, 7 May 2017 14:59:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47ExkH4089160; Sun, 7 May 2017 14:59:46 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47ExkdP089159; Sun, 7 May 2017 14:59:46 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705071459.v47ExkdP089159@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 7 May 2017 14:59:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317908 - head/sys/ufs/ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 14:59:47 -0000 Author: kib Date: Sun May 7 14:59:45 2017 New Revision: 317908 URL: https://svnweb.freebsd.org/changeset/base/317908 Log: Remove spl() calls from UFS code. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/ufs/ffs/ffs_rawread.c Modified: head/sys/ufs/ffs/ffs_rawread.c ============================================================================== --- head/sys/ufs/ffs/ffs_rawread.c Sun May 7 14:33:58 2017 (r317907) +++ head/sys/ufs/ffs/ffs_rawread.c Sun May 7 14:59:45 2017 (r317908) @@ -270,7 +270,6 @@ ffs_rawread_main(struct vnode *vp, int error, nerror; struct buf *bp, *nbp, *tbp; u_int iolen; - int spl; caddr_t udata; long resid; off_t offset; @@ -330,10 +329,7 @@ ffs_rawread_main(struct vnode *vp, } } - spl = splbio(); bwait(bp, PRIBIO, "rawrd"); - splx(spl); - vunmapbuf(bp); iolen = bp->b_bcount - bp->b_resid; @@ -400,9 +396,7 @@ ffs_rawread_main(struct vnode *vp, relpbuf(bp, &ffsrawbufcnt); } if (nbp != NULL) { /* Run down readahead buffer */ - spl = splbio(); bwait(nbp, PRIBIO, "rawrd"); - splx(spl); vunmapbuf(nbp); pbrelvp(nbp); relpbuf(nbp, &ffsrawbufcnt); From owner-svn-src-head@freebsd.org Sun May 7 15:02:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E76B7D6123D; Sun, 7 May 2017 15:02:19 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x242.google.com (mail-pf0-x242.google.com [IPv6:2607:f8b0:400e:c00::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2D31D8C8; Sun, 7 May 2017 15:02:19 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x242.google.com with SMTP id v14so6728764pfd.3; Sun, 07 May 2017 08:02:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=KMKyTueRgFyRz+zEUZHZBCOD3gm77lGEab7DC3zhSLQ=; b=ldLbB32y7lCeW+nJN8+hVYVIDeNtU19O8fNFPTcunYi8ScnXl06tDyM1fNVjC3pXXp UuL6K10a9hrLUYWCLLdvQ115haGcASjj5opIRX6erCwu/By5jSZlQtmQUZN1eoY4Kmrn rlVaIW/aIcmDhHpfvQ35QT7OLzZvsxaEAh1rvMY1L2j4Xn9ZiyQL+0rePmXPn7YBk1gA uUlD5ORlEbjm+YkHsGlV0vhmEpGoZV21BzUElUZkYgr62pmi/g6VJgFRlO6uePW1n+g1 eC9/tbP13rWSBRPbE5iVwihAamdGLxd2ZLKTpJgmyjGXbx4TH3Pt78XM57aBeYRl2QI2 n+Pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=KMKyTueRgFyRz+zEUZHZBCOD3gm77lGEab7DC3zhSLQ=; b=q1M5EYZeUIxSXlHpTltXoUSIKc0s0gQG0uW1+MB7VcoHqwI6vPNRQHaU2YULvvYqcP 9YDBQM47LmZ1+jmTpWp4nofTEsgFr5ELcVaJb2/QWsHJEFo4FcYiiJo86K6R5SVGLFSr J7C+FSeYHY9SJT/KJCunmEE0nw/8KsiFrXFRTLwrWhteiZ5AHvLNGKBuGK1hNt/kU0pe eHgz6WL+yF6on2Wh+FqQVr2YitYXQOWEUrPnaCOaizaPr+K7f6kIv2HDsEFF9zPeUB8p HZDGpXGWuKzCowQ4ANDDRw3U/koQdmnZ8W69vIJuSo+wyjoHZFreaaoY6wYqee5a8OV9 B2UA== X-Gm-Message-State: AN3rC/5f9v7NExw+rK3leEZYaTZ8CkpQo/31vxzVnAIoKM9bxdfM5c/P v7/Be1nyr8RYqQ== X-Received: by 10.99.173.6 with SMTP id g6mr13703430pgf.75.1494169338658; Sun, 07 May 2017 08:02:18 -0700 (PDT) Received: from [192.168.20.13] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id r73sm20856948pfa.65.2017.05.07.08.02.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 07 May 2017 08:02:17 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r317884 - head/sys/compat/linprocfs From: Ngie Cooper X-Mailer: iPhone Mail (14E304) In-Reply-To: Date: Sun, 7 May 2017 08:02:17 -0700 Cc: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201705061737.v46Hb1Aq067178@repo.freebsd.org> <20170506175528.GZ1622@kib.kiev.ua> To: mmokhi@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 15:02:20 -0000 > On May 6, 2017, at 11:43, Mahdi Mokhtari wrote: >=20 > Also I think it worths saying, I've tested this running on a X86. > It was not panic'd and printed data as expected. > So you mean it's possible to panic on "some" cases because of CPUID suppor= t? You'll get a hardware trap if/when the CPU doesn't support the instruction, w= hich will result in a panic. Cheers, -Ngie= From owner-svn-src-head@freebsd.org Sun May 7 16:19:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88CAFD62E3C; Sun, 7 May 2017 16:19:26 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-wr0-f174.google.com (mail-wr0-f174.google.com [209.85.128.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B8AA1DC3; Sun, 7 May 2017 16:19:25 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-wr0-f174.google.com with SMTP id z52so27100352wrc.2; Sun, 07 May 2017 09:19:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=GyWHWkoUOtjdB7hHRokcLdGM9kJJlpedL1zDaek0wF8=; b=RSpE4kVKGRndOgiRXepsEFNszdPUWZyeLb3/a6WqePcDNa0tgbmF/b8GVR8LRNDmpD G98KqbBI2ZUBOIjNMXbJ+5n+JggYEwUn/db4HLSgyb54/P9tEuI38TqGTMI9hfmEtBPY WFHuBZorSp/FEouKZO5pjXvPT2lwJpL429cznB+hv2KmqIvLOAWbIvCatiEzjVQaPy0o sYdB6ObQfQ38OR3dFuoKrf5YXaY/Uk0V3AkPlwT63vIZnh/I+eTkRgkfe41Z/ar/ezFD yE59+U/YQo7hB9bu209Yi6V9Y/GXpN3ZlQGBgW4YiqnRPcETrpoGbS7xR3fPHSyDNcfq Wqew== X-Gm-Message-State: AN3rC/7RUDRh4ZdOm/hQF/n+qX5w5Pg4fwKc+csuO7VSgSPQN2Cnp10M X772EVDaHI4+iL2CidQ= X-Received: by 10.223.176.84 with SMTP id g20mr39256699wra.172.1494173957616; Sun, 07 May 2017 09:19:17 -0700 (PDT) Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com. [74.125.82.44]) by smtp.gmail.com with ESMTPSA id z90sm18512937wrc.36.2017.05.07.09.19.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 07 May 2017 09:19:17 -0700 (PDT) Received: by mail-wm0-f44.google.com with SMTP id m123so42091650wma.0; Sun, 07 May 2017 09:19:17 -0700 (PDT) X-Received: by 10.80.186.201 with SMTP id x67mr2983965ede.46.1494173957327; Sun, 07 May 2017 09:19:17 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.80.169.4 with HTTP; Sun, 7 May 2017 09:19:16 -0700 (PDT) In-Reply-To: <201705070919.v479Jg5v050357@repo.freebsd.org> References: <201705070919.v479Jg5v050357@repo.freebsd.org> From: Conrad Meyer Date: Sun, 7 May 2017 09:19:16 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r317901 - head/usr.bin/resizewin To: Edward Tomasz Napierala Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 16:19:26 -0000 On Sun, May 7, 2017 at 2:19 AM, Edward Tomasz Napierala wrote: > Author: trasz > Date: Sun May 7 09:19:42 2017 > New Revision: 317901 > URL: https://svnweb.freebsd.org/changeset/base/317901 > > Log: > Improve error reporting in resizewin(1). > > Reviewed by: cem (earlier version) Also reviewed by: Daniel O'Connor (the original author) :-). Best, Conrad From owner-svn-src-head@freebsd.org Sun May 7 17:21:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63135D62FFE; Sun, 7 May 2017 17:21:24 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11F7D1F8A; Sun, 7 May 2017 17:21:24 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47HLNbl049019; Sun, 7 May 2017 17:21:23 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47HLNWB049018; Sun, 7 May 2017 17:21:23 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705071721.v47HLNWB049018@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 7 May 2017 17:21:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317909 - head/usr.bin/resizewin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 17:21:24 -0000 Author: trasz Date: Sun May 7 17:21:22 2017 New Revision: 317909 URL: https://svnweb.freebsd.org/changeset/base/317909 Log: Make resizewin(1) discard the terminal queues, to lower the chance for "unable to parse response" error which happens when youre typing too fast for the machine you're running it on. Reviewed by: cem, Daniel O'Connor MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D10624 Modified: head/usr.bin/resizewin/resizewin.c Modified: head/usr.bin/resizewin/resizewin.c ============================================================================== --- head/usr.bin/resizewin/resizewin.c Sun May 7 14:59:45 2017 (r317908) +++ head/usr.bin/resizewin/resizewin.c Sun May 7 17:21:22 2017 (r317909) @@ -52,7 +52,7 @@ main(__unused int argc, __unused char ** { struct termios old, new; struct winsize w; - int ret, fd, cnt, error; + int ret, fd, cnt, error, what; char data[20]; struct timeval then, now; @@ -71,6 +71,12 @@ main(__unused int argc, __unused char ** if (tcsetattr(fd, TCSANOW, &new) == -1) exit(1); + /* Discard input received so far */ + what = FREAD | FWRITE; + error = ioctl(fd, TIOCFLUSH, &what); + if (error != 0) + warn("ioctl"); + if (write(fd, query, sizeof(query)) != sizeof(query)) { error = 1; goto out; From owner-svn-src-head@freebsd.org Sun May 7 18:01:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94577D62ACB; Sun, 7 May 2017 18:01:51 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B70EF1372; Sun, 7 May 2017 18:01:50 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v47I1iDL041344 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 7 May 2017 21:01:44 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v47I1iDL041344 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v47I1hc9041343; Sun, 7 May 2017 21:01:43 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 7 May 2017 21:01:43 +0300 From: Konstantin Belousov To: Edward Tomasz Napierala Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r317909 - head/usr.bin/resizewin Message-ID: <20170507180143.GA1622@kib.kiev.ua> References: <201705071721.v47HLNWB049018@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201705071721.v47HLNWB049018@repo.freebsd.org> User-Agent: Mutt/1.8.2 (2017-04-18) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 18:01:51 -0000 On Sun, May 07, 2017 at 05:21:23PM +0000, Edward Tomasz Napierala wrote: > Author: trasz > Date: Sun May 7 17:21:22 2017 > New Revision: 317909 > URL: https://svnweb.freebsd.org/changeset/base/317909 > > Log: > Make resizewin(1) discard the terminal queues, to lower the chance > for "unable to parse response" error which happens when youre typing > too fast for the machine you're running it on. > > Reviewed by: cem, Daniel O'Connor > MFC after: 2 weeks > Sponsored by: DARPA, AFRL > Differential Revision: https://reviews.freebsd.org/D10624 > > Modified: > head/usr.bin/resizewin/resizewin.c > > Modified: head/usr.bin/resizewin/resizewin.c > ============================================================================== > --- head/usr.bin/resizewin/resizewin.c Sun May 7 14:59:45 2017 (r317908) > +++ head/usr.bin/resizewin/resizewin.c Sun May 7 17:21:22 2017 (r317909) > @@ -52,7 +52,7 @@ main(__unused int argc, __unused char ** > { > struct termios old, new; > struct winsize w; > - int ret, fd, cnt, error; > + int ret, fd, cnt, error, what; > char data[20]; > struct timeval then, now; > > @@ -71,6 +71,12 @@ main(__unused int argc, __unused char ** > if (tcsetattr(fd, TCSANOW, &new) == -1) > exit(1); > > + /* Discard input received so far */ > + what = FREAD | FWRITE; > + error = ioctl(fd, TIOCFLUSH, &what); This is correctly spelled tcflush(fd, TCIOFLUSH); > + if (error != 0) > + warn("ioctl"); > + > if (write(fd, query, sizeof(query)) != sizeof(query)) { > error = 1; > goto out; From owner-svn-src-head@freebsd.org Sun May 7 18:28:13 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC933D62310; Sun, 7 May 2017 18:28:13 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mailout.stack.nl (mailout05.stack.nl [IPv6:2001:610:1108:5010::202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mailout.stack.nl", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 3F6579BD; Sun, 7 May 2017 18:28:13 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mailout.stack.nl (Postfix) with ESMTP id B1C3C63; Sun, 7 May 2017 20:28:02 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id 9C55E28497; Sun, 7 May 2017 20:28:02 +0200 (CEST) Date: Sun, 7 May 2017 20:28:02 +0200 From: Jilles Tjoelker To: Konstantin Belousov Cc: Edward Tomasz Napierala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r317909 - head/usr.bin/resizewin Message-ID: <20170507182802.GA5248@stack.nl> References: <201705071721.v47HLNWB049018@repo.freebsd.org> <20170507180143.GA1622@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170507180143.GA1622@kib.kiev.ua> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 18:28:14 -0000 On Sun, May 07, 2017 at 09:01:43PM +0300, Konstantin Belousov wrote: > On Sun, May 07, 2017 at 05:21:23PM +0000, Edward Tomasz Napierala wrote: > > Author: trasz > > Date: Sun May 7 17:21:22 2017 > > New Revision: 317909 > > URL: https://svnweb.freebsd.org/changeset/base/317909 > > Log: > > Make resizewin(1) discard the terminal queues, to lower the chance > > for "unable to parse response" error which happens when youre typing > > too fast for the machine you're running it on. > > Reviewed by: cem, Daniel O'Connor > > MFC after: 2 weeks > > Sponsored by: DARPA, AFRL > > Differential Revision: https://reviews.freebsd.org/D10624 > > Modified: > > head/usr.bin/resizewin/resizewin.c > > > > Modified: head/usr.bin/resizewin/resizewin.c > > ============================================================================== > > --- head/usr.bin/resizewin/resizewin.c Sun May 7 14:59:45 2017 (r317908) > > +++ head/usr.bin/resizewin/resizewin.c Sun May 7 17:21:22 2017 (r317909) > > @@ -52,7 +52,7 @@ main(__unused int argc, __unused char ** > > { > > struct termios old, new; > > struct winsize w; > > - int ret, fd, cnt, error; > > + int ret, fd, cnt, error, what; > > char data[20]; > > struct timeval then, now; > > > > @@ -71,6 +71,12 @@ main(__unused int argc, __unused char ** > > if (tcsetattr(fd, TCSANOW, &new) == -1) > > exit(1); > > > > + /* Discard input received so far */ > > + what = FREAD | FWRITE; > > + error = ioctl(fd, TIOCFLUSH, &what); > This is correctly spelled tcflush(fd, TCIOFLUSH); Alternatively, the above TCSANOW could be changed to TCSAFLUSH. The effect is slightly different in that pending output is drained instead of discarded. In any case, the TIOCFLUSH ioctl is non-standard and should not be used directly. -- Jilles Tjoelker From owner-svn-src-head@freebsd.org Sun May 7 19:01:09 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7C03D62D94; Sun, 7 May 2017 19:01:09 +0000 (UTC) (envelope-from bjk@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 95DBB1B08; Sun, 7 May 2017 19:01:09 +0000 (UTC) (envelope-from bjk@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47J18iU088757; Sun, 7 May 2017 19:01:08 GMT (envelope-from bjk@FreeBSD.org) Received: (from bjk@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47J18Mt088756; Sun, 7 May 2017 19:01:08 GMT (envelope-from bjk@FreeBSD.org) Message-Id: <201705071901.v47J18Mt088756@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bjk set sender to bjk@FreeBSD.org using -f From: Benjamin Kaduk Date: Sun, 7 May 2017 19:01:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317910 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 19:01:10 -0000 Author: bjk (doc committer) Date: Sun May 7 19:01:08 2017 New Revision: 317910 URL: https://svnweb.freebsd.org/changeset/base/317910 Log: Bring VOP_GETPAGES.9 more up-to-date Attempt to catch up to the KPI changes from r292373, and perform some other tidying while in the area. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D10579 Modified: head/share/man/man9/VOP_GETPAGES.9 Modified: head/share/man/man9/VOP_GETPAGES.9 ============================================================================== --- head/share/man/man9/VOP_GETPAGES.9 Sun May 7 17:21:22 2017 (r317909) +++ head/share/man/man9/VOP_GETPAGES.9 Sun May 7 19:01:08 2017 (r317910) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 16, 2015 +.Dd May 7, 2017 .Dt VOP_GETPAGES 9 .Os .Sh NAME @@ -41,9 +41,21 @@ .In sys/vnode.h .In vm/vm.h .Ft int -.Fn VOP_GETPAGES "struct vnode *vp" "vm_page_t *ma" "int count" "int *rbehind" "int *rahead" +.Fo VOP_GETPAGES +.Fa "struct vnode *vp" +.Fa "vm_page_t *ma" +.Fa "int count" +.Fa "int *rbehind" +.Fa "int *rahead" +.Fc .Ft int -.Fn VOP_PUTPAGES "struct vnode *vp" "vm_page_t *ma" "int count" "int sync" "int *rtvals" +.Fo VOP_PUTPAGES +.Fa "struct vnode *vp" +.Fa "vm_page_t *ma" +.Fa "int bytecount" +.Fa "int flags" +.Fa "int *rtvals" +.Fc .Sh DESCRIPTION The .Fn VOP_GETPAGES @@ -70,10 +82,32 @@ The file to access. Pointer to the first element of an array of pages representing a contiguous region of the file to be read or written. .It Fa count -The number of bytes that should be read into the pages of the array. -.It Fa sync +The length of the +.Fa ma +array. +.It Fa bytecount +The number of bytes that should be written from the pages of the array. +.It Fa flags +A bitfield of flags affecting the function operation. +If .Dv VM_PAGER_PUT_SYNC -if the write should be synchronous. +is set, the write should be synchronous; control must not be returned +to the caller until after the write is finished. +If +.Dv VM_PAGER_PUT_INVAL +is set, the pages are to be invalidated after being written. +If +.Dv VM_PAGER_PUT_NOREUSE +is set, the I/O performed should set the IO_NOREUSE flag, to indicate +to the filesystem that pages should be marked for fast reuse if needed. +This could occur via a call to +.Xr vm_page_deactivate_noreuse 9 , +which puts such pages onto the head of the inactive queue. +If +.Dv VM_PAGER_CLUSTER_OK +is set, writes may be performed asynchronously, so that related writes +can be coalesced for efficiency, e.g., +using the clustering mechanism of the buffer cache. .It Fa rtvals An array of VM system result codes indicating the status of each page written by @@ -127,32 +161,33 @@ The page was not handled by this request .Pp The .Fn VOP_GETPAGES -method is expected to release any pages in +method must populate and validate all requested pages in order to +return success. +It is expected to release any pages in .Fa ma that it does not successfully handle, by calling .Xr vm_page_free 9 . When it succeeds, .Fn VOP_GETPAGES must set the valid bits appropriately. +Upon entry to +.Fn VOP_GETPAGES , +all pages in +.Fa ma +are busied exclusively. +Upon successful return, the pages must all be busied exclusively +as well, but pages may be unbusied during processing. +The filesystem is responsible for activating paged-out pages, but this +does not necessarily need to be done within .Fn VOP_GETPAGES -must keep -.Fa reqpage -busy. -It must unbusy all other successfully handled pages and put them -on appropriate page queue(s). -For example, -.Fn VOP_GETPAGES -may either activate a page (if its wanted bit is set) -or deactivate it (otherwise), and finally call -.Xr vm_page_xunbusy 9 -to arouse any threads currently waiting for the page to be faulted in. +depending on the architecture of the particular filesystem. .Sh RETURN VALUES -If it successfully reads -.Fa ma[reqpage] , +If it successfully reads all pages in +.Fa ma , .Fn VOP_GETPAGES returns .Dv VM_PAGER_OK ; -otherwise, +otherwise, it returns .Dv VM_PAGER_ERROR . By convention, the return value of .Fn VOP_PUTPAGES From owner-svn-src-head@freebsd.org Sun May 7 19:49:48 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 656BBD6211B; Sun, 7 May 2017 19:49:48 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0896528B; Sun, 7 May 2017 19:49:47 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47Jnko4009303; Sun, 7 May 2017 19:49:46 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47Jnk9r009300; Sun, 7 May 2017 19:49:46 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201705071949.v47Jnk9r009300@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 7 May 2017 19:49:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317912 - in head/bin/sh: . tests/builtins X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 19:49:48 -0000 Author: jilles Date: Sun May 7 19:49:46 2017 New Revision: 317912 URL: https://svnweb.freebsd.org/changeset/base/317912 Log: sh: Fix INTOFF leak after a builtin with different locale settings. After executing a builtin with different locale settings such as LC_ALL=C true SIGINT handling was left disabled indefinitely. MFC after: 1 week Added: head/bin/sh/tests/builtins/locale2.0 (contents, props changed) Modified: head/bin/sh/tests/builtins/Makefile head/bin/sh/var.c Modified: head/bin/sh/tests/builtins/Makefile ============================================================================== --- head/bin/sh/tests/builtins/Makefile Sun May 7 19:47:50 2017 (r317911) +++ head/bin/sh/tests/builtins/Makefile Sun May 7 19:49:46 2017 (r317912) @@ -120,6 +120,7 @@ ${PACKAGE}FILES+= local7.0 .if ${MK_NLS} != "no" ${PACKAGE}FILES+= locale1.0 .endif +${PACKAGE}FILES+= locale2.0 ${PACKAGE}FILES+= printf1.0 ${PACKAGE}FILES+= printf2.0 ${PACKAGE}FILES+= printf3.0 Added: head/bin/sh/tests/builtins/locale2.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/builtins/locale2.0 Sun May 7 19:49:46 2017 (r317912) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +$SH -c 'LC_ALL=C true; kill -INT $$; echo continued' +r=$? +[ "$r" -gt 128 ] && [ "$(kill -l "$r")" = INT ] Modified: head/bin/sh/var.c ============================================================================== --- head/bin/sh/var.c Sun May 7 19:47:50 2017 (r317911) +++ head/bin/sh/var.c Sun May 7 19:49:46 2017 (r317912) @@ -513,7 +513,7 @@ bltinunsetlocale(void) if (localevar(cmdenviron->args[i])) { setlocale(LC_ALL, ""); updatecharset(); - return; + break; } } INTON; From owner-svn-src-head@freebsd.org Sun May 7 19:52:58 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28D87D6231C; Sun, 7 May 2017 19:52:58 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D24A315D1; Sun, 7 May 2017 19:52:57 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47JquMQ013078; Sun, 7 May 2017 19:52:56 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47JquQF013077; Sun, 7 May 2017 19:52:56 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201705071952.v47JquQF013077@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 7 May 2017 19:52:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317913 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 19:52:58 -0000 Author: jilles Date: Sun May 7 19:52:56 2017 New Revision: 317913 URL: https://svnweb.freebsd.org/changeset/base/317913 Log: glob: Fix comment about collapsing asterisks after r317749. After r317749, collapsing adjacent asterisks is still required, but for a different reason. Modified: head/lib/libc/gen/glob.c Modified: head/lib/libc/gen/glob.c ============================================================================== --- head/lib/libc/gen/glob.c Sun May 7 19:49:46 2017 (r317912) +++ head/lib/libc/gen/glob.c Sun May 7 19:52:56 2017 (r317913) @@ -581,7 +581,8 @@ glob0(const Char *pattern, glob_t *pglob case STAR: pglob->gl_flags |= GLOB_MAGCHAR; /* collapse adjacent stars to one, - * to avoid exponential behavior + * to ensure "**" at the end continues to match the + * empty string */ if (bufnext == patbuf || bufnext[-1] != M_ALL) *bufnext++ = M_ALL; From owner-svn-src-head@freebsd.org Sun May 7 19:59:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4AC5ED624E4; Sun, 7 May 2017 19:59:39 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A8E212A7; Sun, 7 May 2017 19:59:38 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47JxbqQ013420; Sun, 7 May 2017 19:59:37 GMT (envelope-from n_hibma@FreeBSD.org) Received: (from n_hibma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47Jxbid013419; Sun, 7 May 2017 19:59:37 GMT (envelope-from n_hibma@FreeBSD.org) Message-Id: <201705071959.v47Jxbid013419@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: n_hibma set sender to n_hibma@FreeBSD.org using -f From: Nick Hibma Date: Sun, 7 May 2017 19:59:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317915 - head/sbin/dhclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 19:59:39 -0000 Author: n_hibma Date: Sun May 7 19:59:37 2017 New Revision: 317915 URL: https://svnweb.freebsd.org/changeset/base/317915 Log: Fix handling of large DHCP expiry values. They would overflow a signed 32-bit time_t on 32 bit architectures. This was taken care of, but a compiler optimisation makes this behave erratically. This could be resolved by adding a -fwrapv flag, but instead we can check the value before adding the current timestamp to it. In the lease file values are still wrong though: option dhcp-rebinding-time -644245096; PR: 218980 Reported by: Bob Eager MFC after: 2 weeks Modified: head/sbin/dhclient/dhclient.c Modified: head/sbin/dhclient/dhclient.c ============================================================================== --- head/sbin/dhclient/dhclient.c Sun May 7 19:57:45 2017 (r317914) +++ head/sbin/dhclient/dhclient.c Sun May 7 19:59:37 2017 (r317915) @@ -108,7 +108,11 @@ struct pidfh *pidfile; */ #define ASSERT_STATE(state_is, state_shouldbe) {} -#define TIME_MAX 2147483647 +/* + * We need to check that the expiry, renewal and rebind times are not beyond + * the end of time (~2038 when a 32-bit time_t is being used). + */ +#define TIME_MAX ((((time_t) 1 << (sizeof(time_t) * CHAR_BIT - 2)) - 1) * 2 + 1) int log_priority; int no_daemon; @@ -766,15 +770,17 @@ dhcpack(struct packet *packet) else ip->client->new->expiry = default_lease_time; /* A number that looks negative here is really just very large, - because the lease expiry offset is unsigned. */ - if (ip->client->new->expiry < 0) - ip->client->new->expiry = TIME_MAX; + because the lease expiry offset is unsigned. Also make sure that + the addition of cur_time below does not overflow (a 32 bit) time_t. */ + if (ip->client->new->expiry < 0 || + ip->client->new->expiry > TIME_MAX - cur_time) + ip->client->new->expiry = TIME_MAX - cur_time; /* XXX should be fixed by resetting the client state */ if (ip->client->new->expiry < 60) ip->client->new->expiry = 60; /* Unless overridden in the config, take the server-provided renewal - * time if there is one; otherwise figure it out according to the spec. + * time if there is one. Otherwise figure it out according to the spec. * Also make sure the renewal time does not exceed the expiry time. */ if (ip->client->config->default_actions[DHO_DHCP_RENEWAL_TIME] == @@ -786,7 +792,8 @@ dhcpack(struct packet *packet) ip->client->new->options[DHO_DHCP_RENEWAL_TIME].data); else ip->client->new->renewal = ip->client->new->expiry / 2; - if (ip->client->new->renewal > ip->client->new->expiry / 2) + if (ip->client->new->renewal < 0 || + ip->client->new->renewal > ip->client->new->expiry / 2) ip->client->new->renewal = ip->client->new->expiry / 2; /* Same deal with the rebind time. */ @@ -798,20 +805,15 @@ dhcpack(struct packet *packet) ip->client->new->rebind = getULong( ip->client->new->options[DHO_DHCP_REBINDING_TIME].data); else - ip->client->new->rebind = ip->client->new->renewal * 7 / 4; - if (ip->client->new->rebind > ip->client->new->renewal * 7 / 4) - ip->client->new->rebind = ip->client->new->renewal * 7 / 4; - - ip->client->new->expiry += cur_time; - /* Lease lengths can never be negative. */ - if (ip->client->new->expiry < cur_time) - ip->client->new->expiry = TIME_MAX; - ip->client->new->renewal += cur_time; - if (ip->client->new->renewal < cur_time) - ip->client->new->renewal = TIME_MAX; - ip->client->new->rebind += cur_time; - if (ip->client->new->rebind < cur_time) - ip->client->new->rebind = TIME_MAX; + ip->client->new->rebind = ip->client->new->renewal / 4 * 7; + if (ip->client->new->rebind < 0 || + ip->client->new->rebind > ip->client->new->renewal / 4 * 7) + ip->client->new->rebind = ip->client->new->renewal / 4 * 7; + + /* Convert the time offsets into seconds-since-the-epoch */ + ip->client->new->expiry += cur_time; + ip->client->new->renewal += cur_time; + ip->client->new->rebind += cur_time; bind_lease(ip); } From owner-svn-src-head@freebsd.org Sun May 7 21:11:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C32ACD62792; Sun, 7 May 2017 21:11:29 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 67F0916DE; Sun, 7 May 2017 21:11:29 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47LBSW4045541; Sun, 7 May 2017 21:11:28 GMT (envelope-from n_hibma@FreeBSD.org) Received: (from n_hibma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47LBSl6045540; Sun, 7 May 2017 21:11:28 GMT (envelope-from n_hibma@FreeBSD.org) Message-Id: <201705072111.v47LBSl6045540@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: n_hibma set sender to n_hibma@FreeBSD.org using -f From: Nick Hibma Date: Sun, 7 May 2017 21:11:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317923 - head/sbin/dhclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 21:11:30 -0000 Author: n_hibma Date: Sun May 7 21:11:28 2017 New Revision: 317923 URL: https://svnweb.freebsd.org/changeset/base/317923 Log: Fix the output of very large rebind, renew and lease time options in lease file. Some routers set very large values for rebind time (Netgear) and these are erroneously reported as negative in the leasefile. This was due to a wrong printf format specification of %ld for an unsigned long on 32-bit platforms. Modified: head/sbin/dhclient/options.c Modified: head/sbin/dhclient/options.c ============================================================================== --- head/sbin/dhclient/options.c Sun May 7 21:06:23 2017 (r317922) +++ head/sbin/dhclient/options.c Sun May 7 21:11:28 2017 (r317923) @@ -783,7 +783,7 @@ pretty_print_option(unsigned int code, u dp += 4; break; case 'L': - opcount = snprintf(op, opleft, "%ld", + opcount = snprintf(op, opleft, "%lu", (unsigned long)getULong(dp)); if (opcount >= opleft || opcount == -1) goto toobig; @@ -799,7 +799,7 @@ pretty_print_option(unsigned int code, u dp += 2; break; case 'S': - opcount = snprintf(op, opleft, "%d", + opcount = snprintf(op, opleft, "%u", getUShort(dp)); if (opcount >= opleft || opcount == -1) goto toobig; From owner-svn-src-head@freebsd.org Sun May 7 22:04:13 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB44DD63CBD; Sun, 7 May 2017 22:04:13 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D46B1A22; Sun, 7 May 2017 22:04:13 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47M4Cuc070217; Sun, 7 May 2017 22:04:12 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47M4C4V070215; Sun, 7 May 2017 22:04:12 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201705072204.v47M4C4V070215@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sun, 7 May 2017 22:04:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317928 - head/sys/contrib/octeon-sdk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 22:04:14 -0000 Author: jhibbits Date: Sun May 7 22:04:12 2017 New Revision: 317928 URL: https://svnweb.freebsd.org/changeset/base/317928 Log: Add necessary bits to get FreeBSD booting on the Unifi Security Gateway Summary: The Ubiquiti Unifi Security Gateway is virtually identical to the EdgeRouter Lite, with a smaller PCB and apparently a different board identifier. Simply adding the new board identifier alongside the ERL identifier, FreeBSD boots successfully, and can access the needed peripherals (tested with USB booting, and basic pings on one ethernet interface) Reviewed By: adrian MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D10639 Modified: head/sys/contrib/octeon-sdk/cvmx-app-init.h head/sys/contrib/octeon-sdk/cvmx-helper-board.c Modified: head/sys/contrib/octeon-sdk/cvmx-app-init.h ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-app-init.h Sun May 7 21:57:46 2017 (r317927) +++ head/sys/contrib/octeon-sdk/cvmx-app-init.h Sun May 7 22:04:12 2017 (r317928) @@ -311,6 +311,7 @@ enum cvmx_board_types_enum { #endif #if defined(OCTEON_VENDOR_UBIQUITI) CVMX_BOARD_TYPE_CUST_UBIQUITI_E100=20002, + CVMX_BOARD_TYPE_CUST_UBIQUITI_USG= 20004, #endif #if defined(OCTEON_VENDOR_RADISYS) CVMX_BOARD_TYPE_CUST_RADISYS_RSYS4GBE=20002, @@ -457,6 +458,7 @@ static inline const char *cvmx_board_typ #endif #if defined(OCTEON_VENDOR_UBIQUITI) ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_UBIQUITI_E100) + ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_UBIQUITI_USG) #endif #if defined(OCTEON_VENDOR_RADISYS) ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_RADISYS_RSYS4GBE) Modified: head/sys/contrib/octeon-sdk/cvmx-helper-board.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-helper-board.c Sun May 7 21:57:46 2017 (r317927) +++ head/sys/contrib/octeon-sdk/cvmx-helper-board.c Sun May 7 22:04:12 2017 (r317928) @@ -598,6 +598,7 @@ int cvmx_helper_board_get_mii_address(in #endif #if defined(OCTEON_VENDOR_UBIQUITI) case CVMX_BOARD_TYPE_CUST_UBIQUITI_E100: + case CVMX_BOARD_TYPE_CUST_UBIQUITI_USG: if (ipd_port > 2) return -1; return (7 - ipd_port); @@ -1499,7 +1500,8 @@ int __cvmx_helper_board_hardware_enable( } } #if defined(OCTEON_VENDOR_UBIQUITI) - else if (cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_CUST_UBIQUITI_E100) + else if (cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_CUST_UBIQUITI_E100 || + cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_CUST_UBIQUITI_USG) { /* Configure ASX cloks for all ports on interface 0. */ if (interface == 0) @@ -1590,6 +1592,7 @@ cvmx_helper_board_usb_clock_types_t __cv #endif #if defined(OCTEON_VENDOR_UBIQUITI) case CVMX_BOARD_TYPE_CUST_UBIQUITI_E100: + case CVMX_BOARD_TYPE_CUST_UBIQUITI_USG: #endif #if defined(OCTEON_BOARD_CAPK_0100ND) case CVMX_BOARD_TYPE_CN3010_EVB_HS5: From owner-svn-src-head@freebsd.org Mon May 8 00:45:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36874D5F479; Mon, 8 May 2017 00:45:07 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E40AB19EC; Mon, 8 May 2017 00:45:06 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v480j5rp035070; Mon, 8 May 2017 00:45:05 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v480j5f0035069; Mon, 8 May 2017 00:45:05 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705080045.v480j5f0035069@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 8 May 2017 00:45:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317931 - head/sbin/mount_nfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 00:45:07 -0000 Author: rmacklem Date: Mon May 8 00:45:05 2017 New Revision: 317931 URL: https://svnweb.freebsd.org/changeset/base/317931 Log: Fix mount_nfs so that it doesn't create mounttab entries for NFSv4 mounts. The NFSv4 protocol doesn't use the Mount protocol, so it doesn't make sense to add an entry for an NFSv4 mount to /var/db/mounttab. Also, r308871 modified umount so that it doesn't remove any entry created by mount_nfs. Reported on freebsd-current@. Reported by: clbuisson@orange.fr MFC after: 2 weeks Modified: head/sbin/mount_nfs/mount_nfs.c Modified: head/sbin/mount_nfs/mount_nfs.c ============================================================================== --- head/sbin/mount_nfs/mount_nfs.c Sun May 7 22:18:05 2017 (r317930) +++ head/sbin/mount_nfs/mount_nfs.c Mon May 8 00:45:05 2017 (r317931) @@ -636,7 +636,7 @@ getnfsargs(char *spec, struct iovec **io build_iovec(iov, iovlen, "hostname", nam, (size_t)-1); /* Add mounted file system to PATH_MOUNTTAB */ - if (!add_mtab(hostp, spec)) + if (mountmode != V4 && !add_mtab(hostp, spec)) warnx("can't update %s for %s:%s", PATH_MOUNTTAB, hostp, spec); return (1); } From owner-svn-src-head@freebsd.org Mon May 8 08:16:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3328D63DAB; Mon, 8 May 2017 08:16:06 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wr0-x231.google.com (mail-wr0-x231.google.com [IPv6:2a00:1450:400c:c0c::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 13B2E15F5; Mon, 8 May 2017 08:16:06 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-wr0-x231.google.com with SMTP id z52so37020512wrc.2; Mon, 08 May 2017 01:16:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=vgPMF7aUfWKsdXPj6XsXeaV1uO93OTuq5xodeiGq+aA=; b=FAuepmoV/QmHvLbGnwx8hgN2I1BWxKxqGoflM3yKYIArPf97QqTejhV746dTyXk5Qw N25QHsgehjMOYJun10r4bayXQ+b0Yf3mW7FMcT//3sH5ivsUB0Zs6qYjBJJJl5ZJIfsJ cLX6unQiVFxl1ficiPUbg2mlE4JZxqw4KbFvVRwL078Ur6oU+tW2+7UEoR6ox3pFrJa+ BTz47OXRd/mM9HgC/cqcyor2HWC4UsgkY6QCAPcSNnx4eJ6CPh3PisD7idFIC7gddhMI FTbV8ZC/NopFRchxlETsXtNWGQe7FrugDvMpY0qu8/mh1SqdpWYUJ68+8gCIRKyBldfq L5Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=vgPMF7aUfWKsdXPj6XsXeaV1uO93OTuq5xodeiGq+aA=; b=B4/f36CnKUombq1CQdW/t6DQjK74sLW6Qi3H/I5zYaLJHlQLTni5mZn/ByLhCy/TYl QMon4ybeLv8OQvzgUjGdcfqUE2BSOh5rBu4BjbOOLvUhCJE1q3qRxS+E26GK3uHdLMo+ 32Brbk2SayVULgD/r9Ia7CSwUB6I38jUKZcx8ADBl65vGxmIcj8od8YtW9KLVrq1EGY0 7PzYCnEivXAl6enH2ue/WrnQsiPlaE5dyOOWhbKWZRhlc1A7qVjj+zkhnre6gNP+F7hJ SU50PVXC+KBj9hJuEOcFJw1BZvvCuyHVb3cDolU+xWC2Gmn7/LfLP5tFmIbp1yI1JddX VuZg== X-Gm-Message-State: AN3rC/5w8R1smPQfLSRQubrCEH9lE7DmtCYK7gq0mCMnbuYy+Y1IZEzQ vJieGAhFyR86WX5S X-Received: by 10.223.135.213 with SMTP id c21mr45742461wrc.10.1494231363799; Mon, 08 May 2017 01:16:03 -0700 (PDT) Received: from brick (cpc92310-cmbg19-2-0-cust934.5-4.cable.virginm.net. [82.9.227.167]) by smtp.gmail.com with ESMTPSA id o97sm14437145wrc.48.2017.05.08.01.16.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 May 2017 01:16:03 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Mon, 8 May 2017 09:16:01 +0100 From: Edward Tomasz Napierala To: Conrad Meyer Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r317901 - head/usr.bin/resizewin Message-ID: <20170508081601.GA1437@brick> Mail-Followup-To: Conrad Meyer , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201705070919.v479Jg5v050357@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.2 (2017-04-18) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 08:16:06 -0000 On 0507T0919, Conrad Meyer wrote: > On Sun, May 7, 2017 at 2:19 AM, Edward Tomasz Napierala > wrote: > > Author: trasz > > Date: Sun May 7 09:19:42 2017 > > New Revision: 317901 > > URL: https://svnweb.freebsd.org/changeset/base/317901 > > > > Log: > > Improve error reporting in resizewin(1). > > > > Reviewed by: cem (earlier version) > > Also reviewed by: Daniel O'Connor (the original author) :-). Right, sorry; I somehow hadn't noticed one of the the 'accepted' checkboxes. From owner-svn-src-head@freebsd.org Mon May 8 08:34:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5BC1D621DE; Mon, 8 May 2017 08:34:51 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C6DB3F1; Mon, 8 May 2017 08:34:51 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v488YoqI026409; Mon, 8 May 2017 08:34:50 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v488YonF026408; Mon, 8 May 2017 08:34:50 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705080834.v488YonF026408@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 8 May 2017 08:34:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317933 - head/usr.bin/resizewin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 08:34:52 -0000 Author: trasz Date: Mon May 8 08:34:50 2017 New Revision: 317933 URL: https://svnweb.freebsd.org/changeset/base/317933 Log: Use tcflush(3) instead of (nonstandard) TIOCFLUSH. Reported by: kib MFC after: 2 weeks Sponsored by: DARPA, AFRL Modified: head/usr.bin/resizewin/resizewin.c Modified: head/usr.bin/resizewin/resizewin.c ============================================================================== --- head/usr.bin/resizewin/resizewin.c Mon May 8 01:29:40 2017 (r317932) +++ head/usr.bin/resizewin/resizewin.c Mon May 8 08:34:50 2017 (r317933) @@ -52,7 +52,7 @@ main(__unused int argc, __unused char ** { struct termios old, new; struct winsize w; - int ret, fd, cnt, error, what; + int ret, fd, cnt, error; char data[20]; struct timeval then, now; @@ -72,10 +72,9 @@ main(__unused int argc, __unused char ** exit(1); /* Discard input received so far */ - what = FREAD | FWRITE; - error = ioctl(fd, TIOCFLUSH, &what); + error = tcflush(fd, TCIOFLUSH); if (error != 0) - warn("ioctl"); + warn("tcflush"); if (write(fd, query, sizeof(query)) != sizeof(query)) { error = 1; From owner-svn-src-head@freebsd.org Mon May 8 08:36:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C93A4D6231E; Mon, 8 May 2017 08:36:57 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wm0-x22d.google.com (mail-wm0-x22d.google.com [IPv6:2a00:1450:400c:c09::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4329A12C2; Mon, 8 May 2017 08:36:57 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-wm0-x22d.google.com with SMTP id u65so75964637wmu.1; Mon, 08 May 2017 01:36:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=6SWSqDUSfZj0yHEZuC17pzVo4sMggYyh2GQUu+Ae8sc=; b=Z9udk75vcqAA/VuEZCMmnwQjfl6Ke7qXAwNkHwqP8N+xrYKvqnbVMzRA16o5taq3sQ mBtjxozB+cWFJraMoLkoT/JolUZofGXO/fhzhmyTIjfQjTFNJ5BS7HE/+GFaH8JfbBhw qf9tyozgPcca28wYpsMKD2s9oC/w8XIfOy/eBfzpiNtCnDPpOkc5igPXfSSMX57xVCi6 wcWq+HGrQe7MALTu9oOC+Q3SWkhVgQHYeNV33x35/MaXX/hAGDY0G8+10BYScATxSd8V 09o6YNnIAuUV07WnPrNpetXqWanldDC8HqhYWWHG5X8yeTFy0pgo4OsPL7zGvBeRM1Ni AvZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=6SWSqDUSfZj0yHEZuC17pzVo4sMggYyh2GQUu+Ae8sc=; b=Nj1d2VAznBVvS4u6dQDeeJ6LL1Ks9WNrZwSytypz4S8hRRyxnRIuQGY+C2OjwTNlDe z9xyZ/w4GQDL9vQYT393OshDSsWaWHDQn7UX4m8YtLoUdyXu3ST5WTc/XmKELhwWBDYn CTZhsna/T8lzyWLMcWgG6Pt++CQyZ2w07uDmEsIX8VfC5+p+fgCll4v0GGCBXhdO6Lfb Ss4viX3drp2nJ1NndCwOw2aYYsvL5tp40R6hJcLTAm4j8EWicGhrq1btUq7ojr2DvvMK oyAfhCAdEs/w1NYvt2S8w5CEQ6vOnKiCQOHkwj9L5gIx1yfIgf3wsNvgTARJLzswN7eD T3yA== X-Gm-Message-State: AODbwcCGr/HZb5Ec1IMWR1HXZGSANIcjHZHdo2rQ2fZoUDqzMU3F/ULX yJ438qqV8iRWjiHh X-Received: by 10.28.46.143 with SMTP id u137mr11316832wmu.56.1494232615575; Mon, 08 May 2017 01:36:55 -0700 (PDT) Received: from brick (cpc92310-cmbg19-2-0-cust934.5-4.cable.virginm.net. [82.9.227.167]) by smtp.gmail.com with ESMTPSA id 133sm12213296wms.22.2017.05.08.01.36.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 May 2017 01:36:55 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Mon, 8 May 2017 09:36:52 +0100 From: Edward Tomasz Napierala To: Jilles Tjoelker Cc: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r317909 - head/usr.bin/resizewin Message-ID: <20170508083652.GB1437@brick> Mail-Followup-To: Jilles Tjoelker , Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201705071721.v47HLNWB049018@repo.freebsd.org> <20170507180143.GA1622@kib.kiev.ua> <20170507182802.GA5248@stack.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170507182802.GA5248@stack.nl> User-Agent: Mutt/1.8.2 (2017-04-18) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 08:36:57 -0000 On 0507T2028, Jilles Tjoelker wrote: > On Sun, May 07, 2017 at 09:01:43PM +0300, Konstantin Belousov wrote: > > On Sun, May 07, 2017 at 05:21:23PM +0000, Edward Tomasz Napierala wrote: > > > Author: trasz > > > Date: Sun May 7 17:21:22 2017 > > > New Revision: 317909 > > > URL: https://svnweb.freebsd.org/changeset/base/317909 > > > > Log: > > > Make resizewin(1) discard the terminal queues, to lower the chance > > > for "unable to parse response" error which happens when youre typing > > > too fast for the machine you're running it on. > > > > Reviewed by: cem, Daniel O'Connor > > > MFC after: 2 weeks > > > Sponsored by: DARPA, AFRL > > > Differential Revision: https://reviews.freebsd.org/D10624 > > > > Modified: > > > head/usr.bin/resizewin/resizewin.c > > > > > > Modified: head/usr.bin/resizewin/resizewin.c > > > ============================================================================== > > > --- head/usr.bin/resizewin/resizewin.c Sun May 7 14:59:45 2017 (r317908) > > > +++ head/usr.bin/resizewin/resizewin.c Sun May 7 17:21:22 2017 (r317909) > > > @@ -52,7 +52,7 @@ main(__unused int argc, __unused char ** > > > { > > > struct termios old, new; > > > struct winsize w; > > > - int ret, fd, cnt, error; > > > + int ret, fd, cnt, error, what; > > > char data[20]; > > > struct timeval then, now; > > > > > > @@ -71,6 +71,12 @@ main(__unused int argc, __unused char ** > > > if (tcsetattr(fd, TCSANOW, &new) == -1) > > > exit(1); > > > > > > + /* Discard input received so far */ > > > + what = FREAD | FWRITE; > > > + error = ioctl(fd, TIOCFLUSH, &what); > > This is correctly spelled tcflush(fd, TCIOFLUSH); > > Alternatively, the above TCSANOW could be changed to TCSAFLUSH. The > effect is slightly different in that pending output is drained instead > of discarded. > > In any case, the TIOCFLUSH ioctl is non-standard and should not be used > directly. I've changed it to use tcflush(3), as suggested by kib@, as it keeps the current (tested) behaviour. I'll try to investigate TCSANOW as well, thanks! From owner-svn-src-head@freebsd.org Mon May 8 08:58:53 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5529BD62DC1; Mon, 8 May 2017 08:58:53 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1639A14E2; Mon, 8 May 2017 08:58:52 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v488wq6F035059; Mon, 8 May 2017 08:58:52 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v488wpCF035057; Mon, 8 May 2017 08:58:51 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705080858.v488wpCF035057@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 8 May 2017 08:58:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317934 - head/usr.bin/resizewin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 08:58:53 -0000 Author: trasz Date: Mon May 8 08:58:51 2017 New Revision: 317934 URL: https://svnweb.freebsd.org/changeset/base/317934 Log: Add resizewin -z. It makes resizewin not do anything if the terminal size is already set to something other than zero. It's supposed to be called from eg /etc/profile - it's not neccessary to query terminal size when logging in over the network, because the protocol used already takes care of this, but it's neccessary when logging over a serial line. Reviewed by: cem, Daniel O'Connor MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D10637 Modified: head/usr.bin/resizewin/resizewin.1 head/usr.bin/resizewin/resizewin.c Modified: head/usr.bin/resizewin/resizewin.1 ============================================================================== --- head/usr.bin/resizewin/resizewin.1 Mon May 8 08:34:50 2017 (r317933) +++ head/usr.bin/resizewin/resizewin.1 Mon May 8 08:58:51 2017 (r317934) @@ -27,17 +27,27 @@ .\" .\" $FreeBSD$ .\" -.Dd July 9, 2016 +.Dd May 8, 2017 .Dt RESIZEWIN 1 .Os .Sh NAME .Nm resizewin .Nd update the kernel window size for the current TTY +.Sh SYNOPSIS +.Nm +.Op Fl z .Sh DESCRIPTION Query the terminal emulator window size with the .Dv TIOCSWINSZ ioctl and set the window size known by the kernel to the new values. The terminal is assumed to be VT100/ANSI compatible. +.Pp +The following options are available: +.Bl -tag -width ".Fl z" +.It Fl z +Do nothing unless the current kernel terminal size is zero. +.El +.Pp .Nm is functionally similar to .Xr resize 1 , Modified: head/usr.bin/resizewin/resizewin.c ============================================================================== --- head/usr.bin/resizewin/resizewin.c Mon May 8 08:34:50 2017 (r317933) +++ head/usr.bin/resizewin/resizewin.c Mon May 8 08:58:51 2017 (r317934) @@ -47,20 +47,50 @@ static const char query[] = "\033[999;999H" /* Move cursor */ "\033[6n" /* Get cursor position */ "\0338"; /* Restore cursor position */ + +static void +usage(void) +{ + + fprintf(stderr, "usage: resizewin [-z]\n"); + exit(1); +} + int -main(__unused int argc, __unused char **argv) +main(int argc, char **argv) { struct termios old, new; struct winsize w; - int ret, fd, cnt, error; + int ret, fd, ch, cnt, error, zflag; char data[20]; struct timeval then, now; error = 0; + zflag = 0; + while ((ch = getopt(argc, argv, "z")) != -1) { + switch (ch) { + case 'z': + zflag = 1; + break; + case '?': + default: + usage(); + } + } + argc -= optind; + if (argc != 0) + usage(); if ((fd = open("/dev/tty", O_RDWR | O_NONBLOCK)) == -1) exit(1); + if (zflag) { + if (ioctl(fd, TIOCGWINSZ, &w) == -1) + exit(1); + if (w.ws_row != 0 && w.ws_col != 0) + exit(0); + } + /* Disable echo */ if (tcgetattr(fd, &old) == -1) exit(1); From owner-svn-src-head@freebsd.org Mon May 8 09:14:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25F63D6339B; Mon, 8 May 2017 09:14:43 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AFE901C31; Mon, 8 May 2017 09:14:42 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v489Efo3043125; Mon, 8 May 2017 09:14:41 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v489Ef4o043124; Mon, 8 May 2017 09:14:41 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705080914.v489Ef4o043124@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 8 May 2017 09:14:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317935 - head/usr.bin/resizewin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 09:14:43 -0000 Author: trasz Date: Mon May 8 09:14:41 2017 New Revision: 317935 URL: https://svnweb.freebsd.org/changeset/base/317935 Log: Sort variable declarations; no functional changes. MFC after: 2 weeks Sponsored by: DARPA, AFRL Modified: head/usr.bin/resizewin/resizewin.c Modified: head/usr.bin/resizewin/resizewin.c ============================================================================== --- head/usr.bin/resizewin/resizewin.c Mon May 8 08:58:51 2017 (r317934) +++ head/usr.bin/resizewin/resizewin.c Mon May 8 09:14:41 2017 (r317935) @@ -61,9 +61,9 @@ main(int argc, char **argv) { struct termios old, new; struct winsize w; - int ret, fd, ch, cnt, error, zflag; - char data[20]; struct timeval then, now; + char data[20]; + int ch, cnt, error, fd, ret, zflag; error = 0; zflag = 0; From owner-svn-src-head@freebsd.org Mon May 8 13:09:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8AFF6D620C8; Mon, 8 May 2017 13:09:29 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25CCB105D; Mon, 8 May 2017 13:09:29 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48D9SC7040553; Mon, 8 May 2017 13:09:28 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48D9SOE040551; Mon, 8 May 2017 13:09:28 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705081309.v48D9SOE040551@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 8 May 2017 13:09:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317937 - in head/usr.sbin/makefs: . cd9660 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 13:09:29 -0000 Author: emaste Date: Mon May 8 13:09:27 2017 New Revision: 317937 URL: https://svnweb.freebsd.org/changeset/base/317937 Log: makefs: use size_t as appropriate to clean up warnings Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/makefs/cd9660/cd9660_eltorito.c head/usr.sbin/makefs/ffs.c Modified: head/usr.sbin/makefs/cd9660/cd9660_eltorito.c ============================================================================== --- head/usr.sbin/makefs/cd9660/cd9660_eltorito.c Mon May 8 10:51:30 2017 (r317936) +++ head/usr.sbin/makefs/cd9660/cd9660_eltorito.c Mon May 8 13:09:27 2017 (r317937) @@ -224,7 +224,7 @@ cd9660_boot_setup_validation_entry(char boot_catalog_validation_entry *ve; int16_t checksum; unsigned char *csptr; - int i; + size_t i; entry = cd9660_init_boot_catalog_entry(); ve = &entry->entry_data.VE; Modified: head/usr.sbin/makefs/ffs.c ============================================================================== --- head/usr.sbin/makefs/ffs.c Mon May 8 10:51:30 2017 (r317936) +++ head/usr.sbin/makefs/ffs.c Mon May 8 13:09:27 2017 (r317937) @@ -621,7 +621,7 @@ ffs_size_dir(fsnode *root, fsinfo_t *fso if (node->type == S_IFREG) ADDSIZE(node->inode->st.st_size); if (node->type == S_IFLNK) { - int slen; + size_t slen; slen = strlen(node->symlink) + 1; if (slen >= (ffs_opts->version == 1 ? @@ -644,7 +644,7 @@ static void * ffs_build_dinode1(struct ufs1_dinode *dinp, dirbuf_t *dbufp, fsnode *cur, fsnode *root, fsinfo_t *fsopts) { - int slen; + size_t slen; void *membuf; struct stat *st = stampst.st_ino != 0 ? &stampst : &cur->inode->st; @@ -692,7 +692,7 @@ static void * ffs_build_dinode2(struct ufs2_dinode *dinp, dirbuf_t *dbufp, fsnode *cur, fsnode *root, fsinfo_t *fsopts) { - int slen; + size_t slen; void *membuf; struct stat *st = stampst.st_ino != 0 ? &stampst : &cur->inode->st; From owner-svn-src-head@freebsd.org Mon May 8 14:17:11 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6854D63362; Mon, 8 May 2017 14:17:11 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4E481E14; Mon, 8 May 2017 14:17:11 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48EHAZx068861; Mon, 8 May 2017 14:17:10 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48EHAnq068860; Mon, 8 May 2017 14:17:10 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705081417.v48EHAnq068860@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 8 May 2017 14:17:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317938 - head/share/man/man7 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 14:17:12 -0000 Author: emaste Date: Mon May 8 14:17:10 2017 New Revision: 317938 URL: https://svnweb.freebsd.org/changeset/base/317938 Log: arch(7): correct initial versions for alpha and pc98 Submitted by: imp Modified: head/share/man/man7/arch.7 Modified: head/share/man/man7/arch.7 ============================================================================== --- head/share/man/man7/arch.7 Mon May 8 13:09:27 2017 (r317937) +++ head/share/man/man7/arch.7 Mon May 8 14:17:10 2017 (r317938) @@ -90,7 +90,7 @@ architectures, the final release. .Pp .Bl -column -offset indent "Sy Architecture" "Sy Initial Release" "Sy Final Release" .It Sy Architecture Ta Sy Initial Release Ta Sy Final Release -.It alpha Ta 1.0 Ta 6.4 +.It alpha Ta 3.x Ta 6.4 .It amd64 Ta 5.1 .It arm Ta 6.0 .It armeb Ta 8.0 @@ -107,7 +107,7 @@ architectures, the final release. .It mips64el Ta 9.0 .It mips64elhf Ta 12.0 .It mips64hf Ta 12.0 -.It pc98 Ta 5.0 Ta 11.x +.It pc98 Ta 2.2 Ta 11.x .It powerpc Ta 6.0 .It powerpcspe Ta 12.0 .It powerpc64 Ta 6.0 From owner-svn-src-head@freebsd.org Mon May 8 14:33:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 171ACD637D0; Mon, 8 May 2017 14:33:40 +0000 (UTC) (envelope-from dbaio@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A9EEBD7; Mon, 8 May 2017 14:33:39 +0000 (UTC) (envelope-from dbaio@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48EXcn4076648; Mon, 8 May 2017 14:33:38 GMT (envelope-from dbaio@FreeBSD.org) Received: (from dbaio@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48EXcQ0076646; Mon, 8 May 2017 14:33:38 GMT (envelope-from dbaio@FreeBSD.org) Message-Id: <201705081433.v48EXcQ0076646@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dbaio set sender to dbaio@FreeBSD.org using -f From: "Danilo G. Baio" Date: Mon, 8 May 2017 14:33:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317939 - in head: share/misc usr.bin/calendar/calendars X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 14:33:40 -0000 Author: dbaio (ports committer) Date: Mon May 8 14:33:38 2017 New Revision: 317939 URL: https://svnweb.freebsd.org/changeset/base/317939 Log: Add myself (dbaio) as a new ports committer Approved by: garga (mentor) Differential Revision: https://reviews.freebsd.org/D10633 Modified: head/share/misc/committers-ports.dot head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Mon May 8 14:17:10 2017 (r317938) +++ head/share/misc/committers-ports.dot Mon May 8 14:33:38 2017 (r317939) @@ -84,6 +84,7 @@ daichi [label="Daichi Goto\ndaichi@FreeB danfe [label="Alexey Dokuchaev\ndanfe@FreeBSD.org\n2004/08/20"] danilo [label="Danilo E. Gondolfo\ndanilo@FreeBSD.org\n2013/09/23"] db [label="Diane Bruce\ndb@FreeBSD.org\n2007/01/18"] +dbaio [label="Danilo G. Baio\ndbaio@FreeBSD.org\n2017/05/03"] dbn [label="David Naylor\ndbn@FreeBSD.org\n2013/01/14"] decke [label="Bernhard Froehlich\ndecke@FreeBSD.org\n2010/03/21"] delphij [label="Xin Li\ndelphij@FreeBSD.org\n2006/05/01"] @@ -402,6 +403,7 @@ gabor -> scheidell garga -> acm garga -> alepulver +garga -> dbaio garga -> mandree garga -> mm garga -> rnoland Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Mon May 8 14:17:10 2017 (r317938) +++ head/usr.bin/calendar/calendars/calendar.freebsd Mon May 8 14:33:38 2017 (r317939) @@ -145,6 +145,7 @@ 04/29 Adam Weinberger born in Berkeley, California, United States, 1980 04/29 Eric Anholt born in Portland, Oregon, United States, 1983 05/01 Randall Stewart born in Spokane, Washington, United States, 1959 +05/02 Danilo G. Baio born in Maringa, Parana, Brazil, 1986 05/02 Wojciech A. Koszek born in Czestochowa, Poland, 1987 05/03 Brian Dean born in Elkins, West Virginia, United States, 1966 05/03 Patrick Kelsey born in Freehold, New Jersey, United States, 1976 From owner-svn-src-head@freebsd.org Mon May 8 15:51:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CBA47D62FE9; Mon, 8 May 2017 15:51:30 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A72EB81A; Mon, 8 May 2017 15:51:30 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48FpTl2006853; Mon, 8 May 2017 15:51:29 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48FpT5G006849; Mon, 8 May 2017 15:51:29 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201705081551.v48FpT5G006849@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Mon, 8 May 2017 15:51:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317942 - in head/usr.bin/csplit: . tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 15:51:31 -0000 Author: cem Date: Mon May 8 15:51:29 2017 New Revision: 317942 URL: https://svnweb.freebsd.org/changeset/base/317942 Log: csplit(1): Fix extraneous output in edge case When the input to csplit contains fewer lines than the number of matches specified, extra output was mistakenly included in some output files. Fix the bug and add a simple ATF regression test. PR: 219024 Submitted by: J.R. Oldroyd Added: head/usr.bin/csplit/tests/ head/usr.bin/csplit/tests/Makefile (contents, props changed) head/usr.bin/csplit/tests/csplit_test.sh (contents, props changed) Modified: head/usr.bin/csplit/Makefile head/usr.bin/csplit/csplit.c Modified: head/usr.bin/csplit/Makefile ============================================================================== --- head/usr.bin/csplit/Makefile Mon May 8 14:48:39 2017 (r317941) +++ head/usr.bin/csplit/Makefile Mon May 8 15:51:29 2017 (r317942) @@ -1,5 +1,11 @@ # $FreeBSD$ +.include + PROG= csplit +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Modified: head/usr.bin/csplit/csplit.c ============================================================================== --- head/usr.bin/csplit/csplit.c Mon May 8 14:48:39 2017 (r317941) +++ head/usr.bin/csplit/csplit.c Mon May 8 15:51:29 2017 (r317942) @@ -399,8 +399,10 @@ do_rexp(const char *expr) first = 0; } - if (p == NULL) + if (p == NULL) { + toomuch(NULL, 0); errx(1, "%s: no match", re); + } if (ofs <= 0) { /* Added: head/usr.bin/csplit/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/csplit/tests/Makefile Mon May 8 15:51:29 2017 (r317942) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +PACKAGE= tests + +ATF_TESTS_SH= csplit_test + +.include Added: head/usr.bin/csplit/tests/csplit_test.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/csplit/tests/csplit_test.sh Mon May 8 15:51:29 2017 (r317942) @@ -0,0 +1,60 @@ +# Copyright (c) 2017 Conrad Meyer +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ + +atf_test_case lines_lt_count +lines_lt_count_head() +{ + atf_set "descr" \ + "Test an edge case where input has fewer lines than count" +} +lines_lt_count_body() +{ + cat > expectfile00 << HERE +one +two +HERE + cat > expectfile01 << HERE +xxx 1 +three +four +HERE + cat > expectfile02 << HERE +xxx 2 +five +six +HERE + echo -e "one\ntwo\nxxx 1\nthree\nfour\nxxx 2\nfive\nsix" | \ + csplit -k - '/xxx/' '{10}' + + atf_check cmp expectfile00 xx00 + atf_check cmp expectfile01 xx01 + atf_check cmp expectfile02 xx02 +} + +atf_init_test_cases() +{ + atf_add_test_case lines_lt_count +} From owner-svn-src-head@freebsd.org Mon May 8 16:34:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD2A9D635B6; Mon, 8 May 2017 16:34:41 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 351731962; Mon, 8 May 2017 16:34:41 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48GYem0026239; Mon, 8 May 2017 16:34:40 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48GYdVg026237; Mon, 8 May 2017 16:34:39 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705081634.v48GYdVg026237@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 8 May 2017 16:34:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317944 - head/usr.sbin/makefs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 16:34:42 -0000 Author: emaste Date: Mon May 8 16:34:39 2017 New Revision: 317944 URL: https://svnweb.freebsd.org/changeset/base/317944 Log: makefs: cast snprintf return value to size_t to clear warning Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/makefs/ffs.c head/usr.sbin/makefs/walk.c Modified: head/usr.sbin/makefs/ffs.c ============================================================================== --- head/usr.sbin/makefs/ffs.c Mon May 8 16:06:20 2017 (r317943) +++ head/usr.sbin/makefs/ffs.c Mon May 8 16:34:39 2017 (r317944) @@ -846,8 +846,8 @@ ffs_populate_dir(const char *dir, fsnode for (cur = root; cur != NULL; cur = cur->next) { if (cur->child == NULL) continue; - if (snprintf(path, sizeof(path), "%s/%s", dir, cur->name) - >= sizeof(path)) + if ((size_t)snprintf(path, sizeof(path), "%s/%s", dir, + cur->name) >= sizeof(path)) errx(1, "Pathname too long."); if (! ffs_populate_dir(path, cur->child, fsopts)) return (0); Modified: head/usr.sbin/makefs/walk.c ============================================================================== --- head/usr.sbin/makefs/walk.c Mon May 8 16:06:20 2017 (r317943) +++ head/usr.sbin/makefs/walk.c Mon May 8 16:34:39 2017 (r317944) @@ -84,7 +84,7 @@ walk_dir(const char *root, const char *d assert(root != NULL); assert(dir != NULL); - len = snprintf(path, sizeof(path), "%s/%s", root, dir); + len = (size_t)snprintf(path, sizeof(path), "%s/%s", root, dir); if (len >= (int)sizeof(path)) errx(1, "Pathname too long."); if (debug & DEBUG_WALK_DIR) From owner-svn-src-head@freebsd.org Mon May 8 16:57:35 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16923D63BCD; Mon, 8 May 2017 16:57:35 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC1A7254; Mon, 8 May 2017 16:57:34 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48GvXji034532; Mon, 8 May 2017 16:57:33 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48GvXdI034531; Mon, 8 May 2017 16:57:33 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705081657.v48GvXdI034531@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 8 May 2017 16:57:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317945 - head/usr.sbin/makefs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 16:57:35 -0000 Author: emaste Date: Mon May 8 16:57:33 2017 New Revision: 317945 URL: https://svnweb.freebsd.org/changeset/base/317945 Log: makefs: further size_t warning cleanup (missing from r317944) Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/makefs/walk.c Modified: head/usr.sbin/makefs/walk.c ============================================================================== --- head/usr.sbin/makefs/walk.c Mon May 8 16:34:39 2017 (r317944) +++ head/usr.sbin/makefs/walk.c Mon May 8 16:57:33 2017 (r317945) @@ -79,13 +79,14 @@ walk_dir(const char *root, const char *d char path[MAXPATHLEN + 1]; struct stat stbuf; char *name, *rp; - int dot, len; + size_t len; + int dot; assert(root != NULL); assert(dir != NULL); - len = (size_t)snprintf(path, sizeof(path), "%s/%s", root, dir); - if (len >= (int)sizeof(path)) + len = snprintf(path, sizeof(path), "%s/%s", root, dir); + if (len >= sizeof(path)) errx(1, "Pathname too long."); if (debug & DEBUG_WALK_DIR) printf("walk_dir: %s %p\n", path, parent); @@ -119,8 +120,8 @@ walk_dir(const char *root, const char *d } if (debug & DEBUG_WALK_DIR_NODE) printf("scanning %s/%s/%s\n", root, dir, name); - if (snprintf(path + len, sizeof(path) - len, "/%s", name) >= - (int)sizeof(path) - len) + if ((size_t)snprintf(path + len, sizeof(path) - len, "/%s", + name) >= sizeof(path) - len) errx(1, "Pathname too long."); if (lstat(path, &stbuf) == -1) err(1, "Can't lstat `%s'", path); @@ -396,8 +397,8 @@ apply_specdir(const char *dir, NODE *spe if (strcmp(curnode->name, curfsnode->name) == 0) break; } - if (snprintf(path, sizeof(path), "%s/%s", - dir, curnode->name) >= sizeof(path)) + if ((size_t)snprintf(path, sizeof(path), "%s/%s", dir, + curnode->name) >= sizeof(path)) errx(1, "Pathname too long."); if (curfsnode == NULL) { /* need new entry */ struct stat stbuf; From owner-svn-src-head@freebsd.org Mon May 8 17:13:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DF74D634C7; Mon, 8 May 2017 17:13:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3E32813; Mon, 8 May 2017 17:13:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48HD0VH042536; Mon, 8 May 2017 17:13:00 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48HD09K042535; Mon, 8 May 2017 17:13:00 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705081713.v48HD09K042535@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 8 May 2017 17:13:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317949 - head/etc/mtree X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 17:13:02 -0000 Author: ngie Date: Mon May 8 17:13:00 2017 New Revision: 317949 URL: https://svnweb.freebsd.org/changeset/base/317949 Log: Fix the build after r317942 by adding usr.bin/csplit to BSD.tests.dist Pointyhat to: cem MFC with: r317942 Sponsored by: Dell EMC Isilon Modified: head/etc/mtree/BSD.tests.dist Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Mon May 8 17:12:57 2017 (r317948) +++ head/etc/mtree/BSD.tests.dist Mon May 8 17:13:00 2017 (r317949) @@ -612,6 +612,8 @@ .. comm .. + csplit + .. cut .. diff From owner-svn-src-head@freebsd.org Mon May 8 17:16:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95E3DD63AC9; Mon, 8 May 2017 17:16:03 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com [IPv6:2607:f8b0:400e:c00::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5DE6C189E; Mon, 8 May 2017 17:16:03 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x244.google.com with SMTP id u26so10599266pfd.2; Mon, 08 May 2017 10:16:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=Xcv6V+rcC712ZqIvvqhbyMN6LeJyiJFu+dlVzkAC1D8=; b=HjonhlSp84Kp33zBZ+nr/MzPAwKNDzvsXmJ6/r4YNwnEA2TMmzQQk2eVJrlpGwRZHi 5QMCfA0/YNrgR8ZkK52baeALlS8BpwPcNyHehMn4YlXL1yxgBdgV60QfC2PgmOLJxjsf ErjYwn1CXdpo7VsvbqZOawEgB2Le2SnxpNo8SKQKOndNBZutGuXfrMw4qHkS+3V+Wuvt 6O0uFrVwCGIkkl454p/cC09SQNtRdxglMwlWwoexDHLjL1hGPvPqfkAcJLHLybJs6yZk 5+H2/gzXf1yQZ5oCUcl31rfqX6aaqUdQl23nDsPxcsZFVu7v8DkCPF6FEIC4Fl/O6sW+ T7SQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=Xcv6V+rcC712ZqIvvqhbyMN6LeJyiJFu+dlVzkAC1D8=; b=d+5XnlUR/YO500wzejXxZkd2Xw5i9Xyn+HFIo6STFDgJo+HqFazX+aXn9R3qIx5lYh K9NoCTWCMdWkd3CKGqDVchbR9MWuxeOiVFDtXJsQAFXTWBdBovWCes4wzxzSjcJzfwDo Og38sRwBOSQP3p/heDHPa/3hH9LNrrybM9HI2uAj0bIlVv1f6tlRYdf/xZ+gLmc75y3w xhO5RMlSX4VrEmYRSdN/IlTZsCmyqKae2tqoAwnkPMmN1e3dtWa/5JKuFgHFxio5TVOF nXwSUyZf/oLkusQAbTU2bzy/ushwUIYVKLrXHtt9kIdwUCvFYJJ0EW6ft01S+kYzO6KF P2EQ== X-Gm-Message-State: AN3rC/6ngHXS60PXF+t5yyYZw8hrAncXcoTo0qZq3jRXzAUCAfaOoPk/ /DBI1uB4zxhsj7b8FWE= X-Received: by 10.98.13.220 with SMTP id 89mr18684546pfn.112.1494263762670; Mon, 08 May 2017 10:16:02 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id e185sm25492938pfa.115.2017.05.08.10.16.01 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 May 2017 10:16:01 -0700 (PDT) Subject: Re: svn commit: r317942 - in head/usr.bin/csplit: . tests Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_53994C2F-0C87-4C8D-A633-C6C01FE01CE0"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201705081551.v48FpT5G006849@repo.freebsd.org> Date: Mon, 8 May 2017 10:16:03 -0700 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <37A0D7B2-D610-4318-9D05-D9304BEF1078@gmail.com> References: <201705081551.v48FpT5G006849@repo.freebsd.org> To: Conrad Meyer X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 17:16:03 -0000 --Apple-Mail=_53994C2F-0C87-4C8D-A633-C6C01FE01CE0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On May 8, 2017, at 08:51, Conrad Meyer wrote: >=20 > Author: cem > Date: Mon May 8 15:51:29 2017 > New Revision: 317942 > URL: https://svnweb.freebsd.org/changeset/base/317942 >=20 > Log: > csplit(1): Fix extraneous output in edge case >=20 > When the input to csplit contains fewer lines than the number of = matches > specified, extra output was mistakenly included in some output files. >=20 > Fix the bug and add a simple ATF regression test. >=20 > PR: 219024 > Submitted by: J.R. Oldroyd >=20 > Added: > head/usr.bin/csplit/tests/ > head/usr.bin/csplit/tests/Makefile (contents, props changed) > head/usr.bin/csplit/tests/csplit_test.sh (contents, props changed) > Modified: > head/usr.bin/csplit/Makefile > head/usr.bin/csplit/csplit.c Conrad, Please add new directory entries to etc/mtree/BSD.tests.dist and = do a full buildworld/installworld cycle next time to avoid build = breakage (this isn=E2=80=99t the first time this has happened). Fixed up = in r317949. Thanks, -Ngie --Apple-Mail=_53994C2F-0C87-4C8D-A633-C6C01FE01CE0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJZEKfUAAoJEPWDqSZpMIYVYVoQAJrUNGEqghQSTqjGcl9q70+2 7evbxwPpESYx+bAv5i3Ka/Vyv/ncB64VZNm6qGndW9l3rjrdLAL+/bTDqDJagEK6 ddvzIlO9iGDpUs1r4LaxNohVWSxfmNdqSpV051CNso4MA6j6ONDChWfqg71SEXH+ GrrEHz8U0gybLsgRGyo4sOXXRgdIqmPtWtCnapGRhSnyP9+vqPcCwopHi/PMTIt+ XYPy0VKRZWuP7rQkoTRf2uwx5JR++q859o8gMpk1PtxqKbmZ9TCKf6ZwpvrWpp4o 2ZDXeLTlOZzjf7Qs/6MFM+XYBETfPa1NYGOeM1D+pF8rgzMAcA7eUyUwaG9OgRdY ODijxVYQUQFdYEGOKSuh5BGDPY8kyb6lAoMVyWd4kYdiPrlusyXUVCeBiTAfeulv ay4fXTGBrjr9qEekeGsFDVz7YG+IoGb4bc13UiyOfLfxeVLvcNzO2V/3u0+GzXA/ 0ZuBzyEk9W7vItdCswT1MKfF2GZP+dr1rTRgUAD7gnWeWmxQTeuy8Q8ZnSqLJZYe xKRSF4sF/c3MhnZF3EzKV+I+WeeKUu1/P0s+iwQ4qSJdyrXckT+KAGCjJi+jmM3H 3zRKmKcNZ2cEXVCF05AdWXvNuZqf4io2bPoZb75WeZhMsQDM+7EKlCCuSu73MAie asaFArFnzUhiN7gGwF8i =I9UT -----END PGP SIGNATURE----- --Apple-Mail=_53994C2F-0C87-4C8D-A633-C6C01FE01CE0-- From owner-svn-src-head@freebsd.org Mon May 8 18:25:00 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 910A7D635C7; Mon, 8 May 2017 18:25:00 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x242.google.com (mail-pg0-x242.google.com [IPv6:2607:f8b0:400e:c05::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1A55C1714; Mon, 8 May 2017 18:24:59 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x242.google.com with SMTP id 64so4146869pgb.3; Mon, 08 May 2017 11:24:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=NWu9gstc4AQcpdHYN78k1A4dOSSzwDZkL4fvI8YafpM=; b=qrXUslF26mpn3IHzgu7FBzbzhdwreJgwhSZDBo8kONZYIkV+FBHAlXtAeb2fFpHqry iid0CdU1qbCiIuPIDcGMjnAdGVKW+Nl6dY76swMRhg7fCWev6RmL0g4SHryiZtO1614O Ip9CokRKDGRn7iR+tGv60nkBmIWhsYlaL+eQjcK5DKi26rx+3xitqv3JpdlI+ZBhD7Ci NiCBEwPqKFlr7YMZnaZiMEQqyfwuX70FzjnSHPYYWHM+xl3tefbgkDB0H/YMGIk5Id7g EVL2DVXYDFckibcUKMLoDiGcTuNMj/sWOXYKHalrmv/TbY8k8JotTxTBI+WTXPTyzIa5 O81A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=NWu9gstc4AQcpdHYN78k1A4dOSSzwDZkL4fvI8YafpM=; b=Ka3pgEQH44Elamw9CuCXNovDruNQ3lCoMjlbnmlEIeQh9loG1uWbddkOy+fT+cifBM GvA/IWlG5SAPZpNgOMT2HiFcbgXP+l1K2WwoLqeaRXeVTuO+2MieYh7+RVBNt9G8RQ8I 2nTMDuER97Vp147hR3nn93EZWPAc+E+jw0hwHdfnQ8W74smqxOCZGbKd5Fu4M1U4NZs5 e1CcCT9BKqrYdGtyrGedo4Rj41GMVVNJjf/rElbhai1sZk1EuXPsu3nAcW549moeYww/ ulrfiqcQR/pOm1kz5ppP1+nEAG+xkoDQacWqtaHFgf5oqnI3jttxiK/tsabFJTcpyeZm Ih0A== X-Gm-Message-State: AN3rC/60z3ThrAyQJ6uix7RENdbSm11eR0LTmGg5PjusKF7sF0lxSuIe 4FFwAR2M6qWUVNp+Xi8= X-Received: by 10.99.146.92 with SMTP id s28mr20033568pgn.144.1494267897939; Mon, 08 May 2017 11:24:57 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id s3sm27934989pgn.29.2017.05.08.11.24.56 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 May 2017 11:24:57 -0700 (PDT) Subject: Re: svn commit: r317744 - in head/usr.sbin/makefs: . ffs Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_790DA4CE-5C46-4C97-9116-BE7BC0E2E194"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201705031421.v43ELIP9093367@repo.freebsd.org> Date: Mon, 8 May 2017 11:24:56 -0700 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201705031421.v43ELIP9093367@repo.freebsd.org> To: Ed Maste X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 18:25:00 -0000 --Apple-Mail=_790DA4CE-5C46-4C97-9116-BE7BC0E2E194 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On May 3, 2017, at 07:21, Ed Maste wrote: >=20 > Author: emaste > Date: Wed May 3 14:21:18 2017 > New Revision: 317744 > URL: https://svnweb.freebsd.org/changeset/base/317744 >=20 > Log: > makefs: make buf generic >=20 > it has nothing to do with ffs and will eventually be moved. > gc sectorsize. >=20 > NetBSD versions: > ffs.c 1.58 > ffs/buf.c 1.14 1.18 > ffs/buf.h 1.8 >=20 > Obtained from: NetBSD > Sponsored by: The FreeBSD Foundation This commit broke building releases and a number of tests: = https://ci.freebsd.org/job/FreeBSD-head-amd64-test/3003/ . Thanks, -Ngie --Apple-Mail=_790DA4CE-5C46-4C97-9116-BE7BC0E2E194 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJZELf4AAoJEPWDqSZpMIYVY5MP/0pkXzahf43VAUVGJOlHLH/f E4hh2PWkHa0e8NtWYVmW7CWfVVb2LOiaMnkqjDNJNOzqIOVZZsqeGReGixIQ5Xig gVm+Zk52cRSTBbnDrZ/4+mrzZ+sc/QBVWADofGZEpeC1eyrVANU+/1SrhtSN55ah VafpBrnDO1rscGK98ITiFN9J0GAGCLBJeA8zijhBqW/eZ96jhvTkPdQuPcr+WSuY E7kzZTQZQ+jfysFcGkrWFZgNA4bLF1Qxif/YwdwuMyep1zwmyGg3Z2Q9Hb8ShvhZ WCVQBMjZLtdU+xzXq335u8zkd+ZLsbcDo8VRTzflFBmQwxD4vXtFQliS2qcU7GAI SquzU9VVwnC5xprWljanHxMI75iCVZMSxQHnoV/SXVR7QAG+6dBAIzdY4/7z3cr3 DRFzdshyIIF3N4AN8Yot5IibN0YJJELu5D7vUSX3pIeh4C0AA5AFpSEbv/0PDy+K js/rY0rFkKj3BbELCy4xEn10lncZDrdtJ5+npXbRh+gvAvd6HXQvqMeUuf0qG5q4 DlURV/HMQBmpffupdTK9zzm0wIOL3hX8drW7a/yS0r1kFFoZEv2mmVAYM9Xoq2Tk kyKcNJb0ZRsWbOYXT7iluu5AgtQe6z1PCwCzfADBVc7umAZsl722J2/aSRU2ieha my7GSL2a/ZNj0D5LhKEB =SAXf -----END PGP SIGNATURE----- --Apple-Mail=_790DA4CE-5C46-4C97-9116-BE7BC0E2E194-- From owner-svn-src-head@freebsd.org Mon May 8 18:42:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E1B9D63110; Mon, 8 May 2017 18:42:40 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2EA5087C; Mon, 8 May 2017 18:42:40 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48IgdWx081942; Mon, 8 May 2017 18:42:39 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48IgdHp081940; Mon, 8 May 2017 18:42:39 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705081842.v48IgdHp081940@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 8 May 2017 18:42:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317967 - in head/usr.sbin/makefs: . ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 18:42:40 -0000 Author: ngie Date: Mon May 8 18:42:38 2017 New Revision: 317967 URL: https://svnweb.freebsd.org/changeset/base/317967 Log: Restore `sectorsize` global to unbreak makefs after r317744 This also unbreaks the fstyp tests. Reported by: Alastair Hogge , Jenkins Sponsored by: Dell EMC Isilon Modified: head/usr.sbin/makefs/ffs.c head/usr.sbin/makefs/ffs/buf.c Modified: head/usr.sbin/makefs/ffs.c ============================================================================== --- head/usr.sbin/makefs/ffs.c Mon May 8 18:30:56 2017 (r317966) +++ head/usr.sbin/makefs/ffs.c Mon May 8 18:42:38 2017 (r317967) @@ -143,7 +143,7 @@ static void *ffs_build_dinode2(struct u fsnode *, fsinfo_t *); - +int sectorsize; /* XXX: for buf.c::getblk() */ /* publicly visible functions */ void @@ -426,6 +426,8 @@ ffs_validate(const char *dir, fsnode *ro printf("ffs_validate: dir %s; %lld bytes, %lld inodes\n", dir, (long long)fsopts->size, (long long)fsopts->inodes); } + sectorsize = fsopts->sectorsize; /* XXX - see earlier */ + /* now check calculated sizes vs requested sizes */ if (fsopts->maxsize > 0 && fsopts->size > fsopts->maxsize) { errx(1, "`%s' size of %lld is larger than the maxsize of %lld.", Modified: head/usr.sbin/makefs/ffs/buf.c ============================================================================== --- head/usr.sbin/makefs/ffs/buf.c Mon May 8 18:30:56 2017 (r317966) +++ head/usr.sbin/makefs/ffs/buf.c Mon May 8 18:42:38 2017 (r317967) @@ -52,6 +52,8 @@ __FBSDID("$FreeBSD$"); #include "makefs.h" #include "buf.h" +extern int sectorsize; /* XXX: from ffs.c & mkfs.c */ + static TAILQ_HEAD(buftailhead,buf) buftail; int @@ -60,7 +62,6 @@ bread(struct vnode *vp, daddr_t blkno, i { off_t offset; ssize_t rv; - fsinfo_t *fs = vp->fs; assert (bpp != NULL); @@ -68,7 +69,7 @@ bread(struct vnode *vp, daddr_t blkno, i printf("%s: blkno %lld size %d\n", __func__, (long long)blkno, size); *bpp = getblk(vp, blkno, size, 0, 0, 0); - offset = (*bpp)->b_blkno * fs->sectorsize; + offset = (*bpp)->b_blkno * sectorsize; /* XXX */ if (debug & DEBUG_BUF_BREAD) printf("%s: blkno %lld offset %lld bcount %ld\n", __func__, (long long)(*bpp)->b_blkno, (long long) offset, @@ -125,10 +126,9 @@ bwrite(struct buf *bp) { off_t offset; ssize_t rv; - fsinfo_t *fs = bp->b_fs; assert (bp != NULL); - offset = bp->b_blkno * fs->sectorsize; + offset = bp->b_blkno * sectorsize; /* XXX */ if (debug & DEBUG_BUF_BWRITE) printf("bwrite: blkno %lld offset %lld bcount %ld\n", (long long)bp->b_blkno, (long long) offset, From owner-svn-src-head@freebsd.org Mon May 8 18:46:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1836D631AF; Mon, 8 May 2017 18:46:23 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x241.google.com (mail-pf0-x241.google.com [IPv6:2607:f8b0:400e:c00::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 396C61B6C; Mon, 8 May 2017 18:46:23 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x241.google.com with SMTP id b23so10865323pfc.0; Mon, 08 May 2017 11:46:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=3uECp90TNKm0HPK0uhTnAs8ovWXKore6dYASp0jq8EQ=; b=Rnj/IkXpgFifgphdoC0wxR8Ajp9vt9q/lLIAX2sXOLrYRnkOW+hxsg0BgQkv2Txl7F Jfwmyw0jYFTPaBUgDDPWAt/RmnZ//6q+zUNWAtNrlxoCKQONt3gLCcIcmgeqgHgJXuVP C7pqtXuDsPZmtEtDVDShd5GXnSWtDaG4AdNiZRjVLjyqLC2Fv7ooGLn8hwujgTZpV+Vf 0O29I945drDwstNpeqYloJbASErOYAe5nGntY6v1mFt6ADyKM8K3Et2Byt/AlWGL2JfY 9p3RzEFJQQaY3NwVUQWnMfygSg/o4g5nl6zJel0M3qh/raNykOtd34KuuYlxZLxwQOke ljww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=3uECp90TNKm0HPK0uhTnAs8ovWXKore6dYASp0jq8EQ=; b=N57pZYiHxfnWDfFrFvnxt+1JY2pDw0HIt5yqeWDUtcI6fB4/KZBlYXKWze+Fqxismv BLP1USnVWMj1xWalSN/CaQF7BmbKEN6FuSyNr9rIhxmZPzjWyniUzcuHdLzZ5U8RC7Ft k9smeX7lzvTdunHqhP3c37wkluD93yoIL0O9r7Ry6NperrypCm/oOOSvYp0TVLvc9VAd qhuh1HCn8sEFYXLjiuQwdW03MsCtcGaQPjEE+O1l/A3RMRc2e8q0dlCbrO2Uzsye2Vvr DCN5gpnd73CUGpM0V4+X+1yBiqAlSzVDreL0ibb5/V1sTIQca6xFJKKvglH6pxdcNCAN Rh4g== X-Gm-Message-State: AN3rC/6RH5vSOK5RZ267koGOxSg0jvBTAsCDxhmmRegi/SM/FYHXyhrx +zvAwNOOSEGK3jqYiRw= X-Received: by 10.98.5.132 with SMTP id 126mr32566932pff.229.1494269182549; Mon, 08 May 2017 11:46:22 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id y190sm7140642pgd.25.2017.05.08.11.46.21 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 May 2017 11:46:21 -0700 (PDT) Subject: Re: svn commit: r317744 - in head/usr.sbin/makefs: . ffs Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_65F4EF10-5AC1-4235-8142-3D979B8A4690"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Mon, 8 May 2017 11:46:20 -0700 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <980BBC93-4004-4036-BEF4-3C58DB23BED6@gmail.com> References: <201705031421.v43ELIP9093367@repo.freebsd.org> To: Ed Maste X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 18:46:24 -0000 --Apple-Mail=_65F4EF10-5AC1-4235-8142-3D979B8A4690 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On May 8, 2017, at 11:24, Ngie Cooper (yaneurabeya) = wrote: >=20 >>=20 >> On May 3, 2017, at 07:21, Ed Maste wrote: >>=20 >> Author: emaste >> Date: Wed May 3 14:21:18 2017 >> New Revision: 317744 >> URL: https://svnweb.freebsd.org/changeset/base/317744 >>=20 >> Log: >> makefs: make buf generic >>=20 >> it has nothing to do with ffs and will eventually be moved. >> gc sectorsize. >>=20 >> NetBSD versions: >> ffs.c 1.58 >> ffs/buf.c 1.14 1.18 >> ffs/buf.h 1.8 >>=20 >> Obtained from: NetBSD >> Sponsored by: The FreeBSD Foundation >=20 > This commit broke building releases and a number of tests: = https://ci.freebsd.org/job/FreeBSD-head-amd64-test/3003/ . > Thanks, > -Ngie I reverted the `sectorsize` portion of this change in r317967 to = unbreak the makefs and the fstyp tests. It seems that ffs_validate(..) = isn=E2=80=99t called in all cases properly, or the structure isn=E2=80=99t= being initialized properly. Thanks, -Ngie --Apple-Mail=_65F4EF10-5AC1-4235-8142-3D979B8A4690 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJZELz8AAoJEPWDqSZpMIYVaJcP/0ld1ywAg6eep0NNGE7V4NLV kryVUzEJ9H0FHrAu88FL0P2kXeSohnNdUzQbDSv1djUr6MJA5QF6fYgaXyqh9s9z u09BEWdg6AyuKrCtM61EowrDu45m9p/sbNnnydt6ZQ18gCc5r8win3mI/boik6Cb Xyj12EHO8oNS1fIwLZOZlobbfAygivQ8HqDkT8FTrqxFdtHuyq3I+1bOdI/FnIG4 oBMHdwfrzb5PhHYQC8MYGza6ILoEF5+h0JUKdoYUcyraqsbBtiwoMkuQSJARofOp nK9SyMHj5nubc+lnofJLeNYDRKW5OAgoRa1iPbET7S14dNEBK/vEP9MhxYbqeBPd s/Lgt/4tW5dsE4OfOCYCHXCQdC5oYGz5VFg9d+rBUeJdk2kh8VdOjsDQN27zIwp9 2osVwZkRgTOytvCDqFHc1rHxKHE/+5yzxf1pu6Es++0lejNLZ5TeFz5gXGDe7Ilj /lneJFqxOGekoCN/GY3WaKys8E1SREA4qqJR8CP+bx7QSqoPxQFaN5x6e1WI/Y0R 1gXEtaSLA4UjrNHyCARPpzOU/GNGdt6qlUnmLVWIqN9w2NJPkb84BKWNWOOAw9vs CmtApFNKTmhKAXLZ4bk/9LwSju2t49FyuZnUOYcsxO/edMuNnagl40HMN1lzQGsm loaJVFbH726Pvo9U6Htr =RI4W -----END PGP SIGNATURE----- --Apple-Mail=_65F4EF10-5AC1-4235-8142-3D979B8A4690-- From owner-svn-src-head@freebsd.org Mon May 8 18:51:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63BE1D6346E; Mon, 8 May 2017 18:51:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EFE84DC0; Mon, 8 May 2017 18:51:14 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48IpDP0083698; Mon, 8 May 2017 18:51:13 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48IpDVg083697; Mon, 8 May 2017 18:51:13 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705081851.v48IpDVg083697@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 8 May 2017 18:51:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317968 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 18:51:15 -0000 Author: jhb Date: Mon May 8 18:51:13 2017 New Revision: 317968 URL: https://svnweb.freebsd.org/changeset/base/317968 Log: Honor WITHOUT_LIB32 on mips64. The closing paren for the list of architectures that should enable LIB32 by default was in the wrong place resulting in LIB32 always be enabled on mips64 regardless of WITH_LIB32/WITHOUT_LIB32. Submitted by: Alex Richardson Obtained from: CheriBSD Sponsored by: DARPA / AFRL Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Mon May 8 18:42:38 2017 (r317967) +++ head/Makefile.inc1 Mon May 8 18:51:13 2017 (r317968) @@ -628,7 +628,7 @@ XCFLAGS+= ${BFLAGS} .endif .if ${MK_LIB32} != "no" && (${TARGET_ARCH} == "amd64" || \ - ${TARGET_ARCH} == "powerpc64") || ${TARGET_ARCH:Mmips64*} != "" + ${TARGET_ARCH} == "powerpc64" || ${TARGET_ARCH:Mmips64*} != "") LIBCOMPAT= 32 .include "Makefile.libcompat" .elif ${MK_LIBSOFT} != "no" && ${TARGET_ARCH} == "armv6" From owner-svn-src-head@freebsd.org Mon May 8 20:37:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35AC2D63126; Mon, 8 May 2017 20:37:21 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 00CB618A2; Mon, 8 May 2017 20:37:20 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 6F2DD10A7B9; Mon, 8 May 2017 16:37:19 -0400 (EDT) From: John Baldwin To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r317809 - head/share/man/man7 Date: Mon, 08 May 2017 13:37:15 -0700 Message-ID: <3467458.2hyvxKbuPT@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201705042131.v44LVokb076951@repo.freebsd.org> References: <201705042131.v44LVokb076951@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 08 May 2017 16:37:19 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 20:37:21 -0000 On Thursday, May 04, 2017 09:31:50 PM Konstantin Belousov wrote: > Author: kib > Date: Thu May 4 21:31:50 2017 > New Revision: 317809 > URL: https://svnweb.freebsd.org/changeset/base/317809 > > Log: > Provide introduction for the arch(7) manpage. > > Start with some words about linear address space and its layout, then > explain pointers models and ABIs, providing explanation to the > structure of the tables. > > Reviewed by: emaste, imp > 'Future-proof' cheri wording by: brooks > Sponsored by: The FreeBSD Foundation > MFC after: 2 weeks > Differential revision: https://reviews.freebsd.org/D10596 Note that mips n32 is neither ILP32 or LP64, it P32L64. (Similar to x32 for x86 if we were to ever add that.) Thus, we support 3 ABIs rather than just 2. -- John Baldwin From owner-svn-src-head@freebsd.org Mon May 8 20:37:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD457D6314F; Mon, 8 May 2017 20:37:25 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5763A18D6; Mon, 8 May 2017 20:37:24 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 4585010A82D; Mon, 8 May 2017 16:37:22 -0400 (EDT) From: John Baldwin To: Ed Maste Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r317938 - head/share/man/man7 Date: Mon, 08 May 2017 13:23:17 -0700 Message-ID: <13002182.nX2mUsr8JK@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201705081417.v48EHAnq068860@repo.freebsd.org> References: <201705081417.v48EHAnq068860@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 08 May 2017 16:37:22 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 20:37:26 -0000 On Monday, May 08, 2017 02:17:10 PM Ed Maste wrote: > Author: emaste > Date: Mon May 8 14:17:10 2017 > New Revision: 317938 > URL: https://svnweb.freebsd.org/changeset/base/317938 > > Log: > arch(7): correct initial versions for alpha and pc98 > > Submitted by: imp > > Modified: > head/share/man/man7/arch.7 > > Modified: head/share/man/man7/arch.7 > ============================================================================== > --- head/share/man/man7/arch.7 Mon May 8 13:09:27 2017 (r317937) > +++ head/share/man/man7/arch.7 Mon May 8 14:17:10 2017 (r317938) > @@ -90,7 +90,7 @@ architectures, the final release. > .Pp > .Bl -column -offset indent "Sy Architecture" "Sy Initial Release" "Sy Final Release" > .It Sy Architecture Ta Sy Initial Release Ta Sy Final Release > -.It alpha Ta 1.0 Ta 6.4 > +.It alpha Ta 3.x Ta 6.4 3.2 for alpha? Alpha is mentioned explicitly in the release notes for 3.2, 3.3, and 3.4, and the commit to add "multi-architecture" support to src/release/Makefile was MFC'd stable/3 in between 3.1 and 3.2. -- John Baldwin From owner-svn-src-head@freebsd.org Mon May 8 20:44:14 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 893D8D63411; Mon, 8 May 2017 20:44:14 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1CE8A1A66; Mon, 8 May 2017 20:44:14 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48KiDiv044995; Mon, 8 May 2017 20:44:13 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48KiDZN044994; Mon, 8 May 2017 20:44:13 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201705082044.v48KiDZN044994@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 8 May 2017 20:44:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317979 - head/targets/pseudo/userland X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 20:44:14 -0000 Author: bdrewery Date: Mon May 8 20:44:12 2017 New Revision: 317979 URL: https://svnweb.freebsd.org/changeset/base/317979 Log: Remove MK_MANDOCDB option missed in r315057 Modified: head/targets/pseudo/userland/Makefile.depend Modified: head/targets/pseudo/userland/Makefile.depend ============================================================================== --- head/targets/pseudo/userland/Makefile.depend Mon May 8 20:30:30 2017 (r317978) +++ head/targets/pseudo/userland/Makefile.depend Mon May 8 20:44:12 2017 (r317979) @@ -2,14 +2,9 @@ # This file is not autogenerated - take care! -.if !defined(MK_MANDOCDB) .include -.endif DIRDEPS= -.if ${MK_MANDOCDB} == "no" -DIRDEPS+= usr.bin/makewhatis -.endif DIRDEPS+= \ bin/cat \ bin/chflags \ From owner-svn-src-head@freebsd.org Mon May 8 20:44:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7ACE3D63443; Mon, 8 May 2017 20:44:22 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 348191AF3; Mon, 8 May 2017 20:44:22 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48KiL42045043; Mon, 8 May 2017 20:44:21 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48KiLw3045042; Mon, 8 May 2017 20:44:21 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201705082044.v48KiLw3045042@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 8 May 2017 20:44:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317980 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 20:44:22 -0000 Author: bdrewery Date: Mon May 8 20:44:21 2017 New Revision: 317980 URL: https://svnweb.freebsd.org/changeset/base/317980 Log: Fix syntax error in parse_path after r316952. Also fix bad whitespace in sort_unique after r314809. The parse_path syntax error came up in DIRDEPS_BUILD as the following and emptied out all Makefile.depend files due to it: # python share/mk/meta2deps.py File "share/mk/meta2deps.py", line 538 rdir = os.path.realpath(dir) ^ IndentationError: unexpected indent Sponsored by: Dell EMC Isilon Modified: head/share/mk/meta2deps.py Modified: head/share/mk/meta2deps.py ============================================================================== --- head/share/mk/meta2deps.py Mon May 8 20:44:12 2017 (r317979) +++ head/share/mk/meta2deps.py Mon May 8 20:44:21 2017 (r317980) @@ -143,7 +143,7 @@ def sort_unique(list, cmp=None, key=None for e in list: if e == le: continue - le = e + le = e nl.append(e) return nl @@ -535,7 +535,7 @@ class MetaFile: # to the src dir, we may need to add dependencies for each rdir = dir dir = abspath(dir, cwd, self.last_dir, self.debug, self.debug_out) - rdir = os.path.realpath(dir) + rdir = os.path.realpath(dir) if rdir == dir: rdir = None # now put path back together From owner-svn-src-head@freebsd.org Mon May 8 20:52:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3F29D636DB; Mon, 8 May 2017 20:52:16 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C5CB1B7C; Mon, 8 May 2017 20:52:15 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v48KqAqn097578 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 8 May 2017 23:52:10 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v48KqAqn097578 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v48KqAAN097577; Mon, 8 May 2017 23:52:10 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 8 May 2017 23:52:10 +0300 From: Konstantin Belousov To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r317809 - head/share/man/man7 Message-ID: <20170508205210.GF1622@kib.kiev.ua> References: <201705042131.v44LVokb076951@repo.freebsd.org> <3467458.2hyvxKbuPT@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3467458.2hyvxKbuPT@ralph.baldwin.cx> User-Agent: Mutt/1.8.2 (2017-04-18) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 20:52:16 -0000 On Mon, May 08, 2017 at 01:37:15PM -0700, John Baldwin wrote: > On Thursday, May 04, 2017 09:31:50 PM Konstantin Belousov wrote: > > Author: kib > > Date: Thu May 4 21:31:50 2017 > > New Revision: 317809 > > URL: https://svnweb.freebsd.org/changeset/base/317809 > > > > Log: > > Provide introduction for the arch(7) manpage. > > > > Start with some words about linear address space and its layout, then > > explain pointers models and ABIs, providing explanation to the > > structure of the tables. > > > > Reviewed by: emaste, imp > > 'Future-proof' cheri wording by: brooks > > Sponsored by: The FreeBSD Foundation > > MFC after: 2 weeks > > Differential revision: https://reviews.freebsd.org/D10596 > > Note that mips n32 is neither ILP32 or LP64, it P32L64. (Similar to x32 > for x86 if we were to ever add that.) Thus, we support 3 ABIs rather > than just 2. I trust your information about MIPS n32, but x32 uses ILP32 model. In particular, sizeof(long) == 4, according to the AMD64 ABI Draft 0.99.8, which includes both LP64 and ILP32 (x32) ABI description. From owner-svn-src-head@freebsd.org Mon May 8 20:58:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05BAED63987; Mon, 8 May 2017 20:58:34 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A635D18DB; Mon, 8 May 2017 20:58:33 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48KwWOu049270; Mon, 8 May 2017 20:58:32 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48KwWWq049269; Mon, 8 May 2017 20:58:32 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705082058.v48KwWWq049269@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Mon, 8 May 2017 20:58:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317981 - head/sys/modules/mmcsd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 20:58:34 -0000 Author: marius Date: Mon May 8 20:58:32 2017 New Revision: 317981 URL: https://svnweb.freebsd.org/changeset/base/317981 Log: Revise r315430; there's no need to build mmc_subr.c into both mmc.ko and mmcsd.ko. Modified: head/sys/modules/mmcsd/Makefile Modified: head/sys/modules/mmcsd/Makefile ============================================================================== --- head/sys/modules/mmcsd/Makefile Mon May 8 20:44:21 2017 (r317980) +++ head/sys/modules/mmcsd/Makefile Mon May 8 20:58:32 2017 (r317981) @@ -3,6 +3,6 @@ .PATH: ${SRCTOP}/sys/dev/mmc KMOD= mmcsd -SRCS= bus_if.h device_if.h mmc_subr.c mmcbr_if.h mmcbus_if.h mmcsd.c +SRCS= bus_if.h device_if.h mmcbr_if.h mmcbus_if.h mmcsd.c .include From owner-svn-src-head@freebsd.org Mon May 8 21:08:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C048D63CD0; Mon, 8 May 2017 21:08:41 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BFBCF826; Mon, 8 May 2017 21:08:40 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48L8d0o053455; Mon, 8 May 2017 21:08:39 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48L8dV7053453; Mon, 8 May 2017 21:08:39 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705082108.v48L8dV7053453@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Mon, 8 May 2017 21:08:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317982 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 21:08:41 -0000 Author: marius Date: Mon May 8 21:08:39 2017 New Revision: 317982 URL: https://svnweb.freebsd.org/changeset/base/317982 Log: - Also outside of the KOBJOPLOOKUP macro - which in turn is used by the code auto-generated for *.m - kobj_lookup_method(9) is useful; for example in back-ends or base class device drivers in order to determine whether a default method has been overridden. Thus, allow for the kobj_method_t pointer argument - used by KOBJOPLOOKUP in order to update the cache entry - of kobj_lookup_method(9), to be NULL. Actually, that pointer is redundant as it's just set to the same kobj_method_t that the kobj_lookup_method(9) function returns in the first place, but probably it serves to reduce the number of instructions generated for KOBJOPLOOKUP. - For the same reason, move updating kobj_lookup_{hits,misses} (if KOBJ_STATS is defined) from kobj_lookup_method(9) to KOBJOPLOOKUP. As a side-effect, this gets rid of the convoluted approach of always incrementing kobj_lookup_hits in KOBJOPLOOKUP and then in case of a cache miss, decrementing it in kobj_lookup_method(9) again. Modified: head/sys/kern/subr_kobj.c head/sys/sys/kobj.h Modified: head/sys/kern/subr_kobj.c ============================================================================== --- head/sys/kern/subr_kobj.c Mon May 8 20:58:32 2017 (r317981) +++ head/sys/kern/subr_kobj.c Mon May 8 21:08:39 2017 (r317982) @@ -213,19 +213,11 @@ kobj_lookup_method(kobj_class_t cls, { kobj_method_t *ce; -#ifdef KOBJ_STATS - /* - * Correct for the 'hit' assumption in KOBJOPLOOKUP and record - * a 'miss'. - */ - kobj_lookup_hits--; - kobj_lookup_misses++; -#endif - ce = kobj_lookup_method_mi(cls, desc); if (!ce) ce = &desc->deflt; - *cep = ce; + if (cep) + *cep = ce; return ce; } Modified: head/sys/sys/kobj.h ============================================================================== --- head/sys/sys/kobj.h Mon May 8 20:58:32 2017 (r317981) +++ head/sys/sys/kobj.h Mon May 8 21:08:39 2017 (r317982) @@ -226,10 +226,12 @@ extern u_int kobj_lookup_misses; kobj_method_t **_cep = \ &OPS->cache[_desc->id & (KOBJ_CACHE_SIZE-1)]; \ kobj_method_t *_ce = *_cep; \ - kobj_lookup_hits++; /* assume hit */ \ - if (_ce->desc != _desc) \ + if (_ce->desc != _desc) { \ _ce = kobj_lookup_method(OPS->cls, \ _cep, _desc); \ + kobj_lookup_misses++; \ + } else \ + kobj_lookup_hits++; \ _m = _ce->func; \ } while(0) #else From owner-svn-src-head@freebsd.org Mon May 8 22:18:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF5AFD64D2E; Mon, 8 May 2017 22:18:01 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EBC0C1E2C; Mon, 8 May 2017 22:18:00 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v48MHpMS016458 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 9 May 2017 01:17:51 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v48MHpMS016458 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v48MHpbL016457; Tue, 9 May 2017 01:17:51 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 9 May 2017 01:17:51 +0300 From: Konstantin Belousov To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r317809 - head/share/man/man7 Message-ID: <20170508221750.GG1622@kib.kiev.ua> References: <201705042131.v44LVokb076951@repo.freebsd.org> <3467458.2hyvxKbuPT@ralph.baldwin.cx> <20170508205210.GF1622@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170508205210.GF1622@kib.kiev.ua> User-Agent: Mutt/1.8.2 (2017-04-18) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 22:18:02 -0000 On Mon, May 08, 2017 at 11:52:10PM +0300, Konstantin Belousov wrote: > On Mon, May 08, 2017 at 01:37:15PM -0700, John Baldwin wrote: > > On Thursday, May 04, 2017 09:31:50 PM Konstantin Belousov wrote: > > > Author: kib > > > Date: Thu May 4 21:31:50 2017 > > > New Revision: 317809 > > > URL: https://svnweb.freebsd.org/changeset/base/317809 > > > > > > Log: > > > Provide introduction for the arch(7) manpage. > > > > > > Start with some words about linear address space and its layout, then > > > explain pointers models and ABIs, providing explanation to the > > > structure of the tables. > > > > > > Reviewed by: emaste, imp > > > 'Future-proof' cheri wording by: brooks > > > Sponsored by: The FreeBSD Foundation > > > MFC after: 2 weeks > > > Differential revision: https://reviews.freebsd.org/D10596 > > > > Note that mips n32 is neither ILP32 or LP64, it P32L64. (Similar to x32 > > for x86 if we were to ever add that.) Thus, we support 3 ABIs rather > > than just 2. > > I trust your information about MIPS n32, but x32 uses ILP32 model. In fact, from all documents that I can found about n32, it seems that long == pointer == 32bit. This is mentioned in the MIPSpro N32 ABI Handbook and in the MIPS Tech document MD00305 'MIPS ABIs Described'. The only strange thing for n32 is that register_t is 64bit, and vm_paddr_t is similar to PAE. > In particular, sizeof(long) == 4, according to the AMD64 ABI Draft 0.99.8, > which includes both LP64 and ILP32 (x32) ABI description. > From owner-svn-src-head@freebsd.org Mon May 8 22:53:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CBEE8D63ADE; Mon, 8 May 2017 22:53:51 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x22f.google.com (mail-io0-x22f.google.com [IPv6:2607:f8b0:4001:c06::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5C3BE6D8; Mon, 8 May 2017 22:53:51 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x22f.google.com with SMTP id p24so60135331ioi.0; Mon, 08 May 2017 15:53:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=Dgz/grd6pcYcNtpKlj0A9pOwouS9Nw56EdmC8BP/dMQ=; b=RSFN22jHKg1t3mEtk8rctyXXXeo+qYc9UnQrzJo0DFYwycnsfLOESCnuL2C5cy/q/b rs+WYcn94hG05YNkbpqG9yHbw35jpR8Xup9Skp3YnvZ2/1br7J29S1MeuJLFDpJkWwup gK3IYltkF9Pj5/PgJGh430OrZSGwVLe98e3Q4MKKKvpyhljc+p+HS53fVsOEm0DDstKR 0ppepsFMO2KXkjR9z1RqNsaI7TlYtut4V6kdJ4TH9AcTEQtZGNjq5wD2p09+MkjM13XF Xt8qnPdINXGaoC8bdYFE9nbi8SgJ6CvUYX1xvNp6smWHSZgkj7WD8mRLkPv3QwpgMhqv 6B3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=Dgz/grd6pcYcNtpKlj0A9pOwouS9Nw56EdmC8BP/dMQ=; b=i4Or/R78Nfd4vy5ntAa2nC8oQ6MfMp+kfl5SiUojU9I3WaG11/0KHx3fOz7mAaZUFM wCQPV2br2GHtshvVGPEpY3t97q3M0Pyejui27sEeSD8/1ROD6UD7V2BzP4x+0PlXEPY2 SA6038S1M/KdQVrk54Wf2Ki7wmq38y6nohm63lxPoi6OoJrxIeTmaV+mEZxGrYdk3/cz XWsrUVGLEw5Hri66w8OV2lOQkdhEMc95UmB6HloyuoNjEZ9YPqoIKfg5dp6Kh7wIvxoD guNyenKIZ95eOv3GMzZmFD8AyhVagWrntk16r+muYgC5AhgPG96FQLHp0Rg/UO41XSrL KtHw== X-Gm-Message-State: AN3rC/49l5xFA+sHBpOomJj3EbpK1smAsaHXyv42gUdI4aKZlyeavLYV KULWX8o1MfpVrU4hthGOQxwaW+HQXTUa X-Received: by 10.107.170.16 with SMTP id t16mr29817344ioe.113.1494284030185; Mon, 08 May 2017 15:53:50 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.30.136 with HTTP; Mon, 8 May 2017 15:53:29 -0700 (PDT) In-Reply-To: <201705081842.v48IgdHp081940@repo.freebsd.org> References: <201705081842.v48IgdHp081940@repo.freebsd.org> From: Ed Maste Date: Mon, 8 May 2017 18:53:29 -0400 X-Google-Sender-Auth: hH4pao0731QtFd2Y3Y0DYRr5F-k Message-ID: Subject: Re: svn commit: r317967 - in head/usr.sbin/makefs: . ffs To: Ngie Cooper Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 22:53:52 -0000 On 8 May 2017 at 14:42, Ngie Cooper wrote: > Author: ngie > Date: Mon May 8 18:42:38 2017 > New Revision: 317967 > URL: https://svnweb.freebsd.org/changeset/base/317967 > > Log: > Restore `sectorsize` global to unbreak makefs after r317744 > > This also unbreaks the fstyp tests. Sorry about that and thank you for reverting that piece. I suppose it must have been fixed by further WIP in my branch, and I missed it while trying to commit independent changes. From owner-svn-src-head@freebsd.org Tue May 9 01:01:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3CB17D62CB0; Tue, 9 May 2017 01:01:43 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B66C912C7; Tue, 9 May 2017 01:01:42 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4911f4M049464; Tue, 9 May 2017 01:01:41 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4911f5a049462; Tue, 9 May 2017 01:01:41 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201705090101.v4911f5a049462@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Tue, 9 May 2017 01:01:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317996 - head/sys/dev/qlxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 01:01:43 -0000 Author: davidcs Date: Tue May 9 01:01:41 2017 New Revision: 317996 URL: https://svnweb.freebsd.org/changeset/base/317996 Log: Fix bug where MTX_DEF lock was held while taskqueue_drain() was invoked. Check IFF_DRV_RUNNING flag is set prior to calling ql_hw_set_multi() MFC after:3 days Modified: head/sys/dev/qlxgbe/ql_isr.c head/sys/dev/qlxgbe/ql_os.c Modified: head/sys/dev/qlxgbe/ql_isr.c ============================================================================== --- head/sys/dev/qlxgbe/ql_isr.c Tue May 9 00:51:10 2017 (r317995) +++ head/sys/dev/qlxgbe/ql_isr.c Tue May 9 01:01:41 2017 (r317996) @@ -987,7 +987,8 @@ ql_isr(void *arg) fp = &ha->tx_fp[idx]; - if (fp->fp_taskqueue != NULL) + if ((fp->fp_taskqueue != NULL) && + (ifp->if_drv_flags & IFF_DRV_RUNNING)) taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task); return; Modified: head/sys/dev/qlxgbe/ql_os.c ============================================================================== --- head/sys/dev/qlxgbe/ql_os.c Tue May 9 00:51:10 2017 (r317995) +++ head/sys/dev/qlxgbe/ql_os.c Tue May 9 01:01:41 2017 (r317996) @@ -925,7 +925,9 @@ qla_set_multi(qla_host_t *ha, uint32_t a if_maddr_runlock(ifp); QLA_LOCK(ha); - ret = ql_hw_set_multi(ha, mta, mcnt, add_multi); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + ret = ql_hw_set_multi(ha, mta, mcnt, add_multi); + } QLA_UNLOCK(ha); return (ret); @@ -1031,20 +1033,16 @@ qla_ioctl(struct ifnet *ifp, u_long cmd, QL_DPRINT4(ha, (ha->pci_dev, "%s: %s (0x%lx)\n", __func__, "SIOCADDMULTI", cmd)); - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - if (qla_set_multi(ha, 1)) - ret = EINVAL; - } + if (qla_set_multi(ha, 1)) + ret = EINVAL; break; case SIOCDELMULTI: QL_DPRINT4(ha, (ha->pci_dev, "%s: %s (0x%lx)\n", __func__, "SIOCDELMULTI", cmd)); - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - if (qla_set_multi(ha, 0)) - ret = EINVAL; - } + if (qla_set_multi(ha, 0)) + ret = EINVAL; break; case SIOCSIFMEDIA: @@ -1529,9 +1527,9 @@ qla_stop(qla_host_t *ha) ha->flags.qla_interface_up = 0; + QLA_UNLOCK(ha); qla_drain_fp_taskqueues(ha); - - ql_hw_stop_rcv(ha); + QLA_LOCK(ha); ql_del_hw_if(ha); @@ -1922,8 +1920,6 @@ qla_error_recovery(void *context, int pe ha->hw.imd_compl = 1; qla_mdelay(__func__, 300); - ql_hw_stop_rcv(ha); - ifp->if_drv_flags &= ~(IFF_DRV_OACTIVE | IFF_DRV_RUNNING); for (i = 0; i < ha->hw.num_sds_rings; i++) { @@ -1943,6 +1939,8 @@ qla_error_recovery(void *context, int pe QLA_UNLOCK(ha); + qla_drain_fp_taskqueues(ha); + if ((ha->pci_func & 0x1) == 0) { if (!ha->msg_from_peer) { From owner-svn-src-head@freebsd.org Tue May 9 01:48:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E62B4D64ED3; Tue, 9 May 2017 01:48:03 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9953A893; Tue, 9 May 2017 01:48:03 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v491m2Xu067185; Tue, 9 May 2017 01:48:02 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v491m2Po067184; Tue, 9 May 2017 01:48:02 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201705090148.v491m2Po067184@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 9 May 2017 01:48:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317998 - head/secure/lib/libssh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 01:48:04 -0000 Author: bdrewery Date: Tue May 9 01:48:02 2017 New Revision: 317998 URL: https://svnweb.freebsd.org/changeset/base/317998 Log: Fix invalid .o SRCS from r314527. MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/secure/lib/libssh/Makefile Modified: head/secure/lib/libssh/Makefile ============================================================================== --- head/secure/lib/libssh/Makefile Tue May 9 01:08:45 2017 (r317997) +++ head/secure/lib/libssh/Makefile Tue May 9 01:48:02 2017 (r317998) @@ -13,7 +13,7 @@ SRCS+= authfd.c authfile.c bufaux.c bufb compat.c crc32.c deattack.c fatal.c hostfile.c \ log.c match.c md-sha256.c moduli.c nchan.c packet.c opacket.c \ readpass.c rsa.c ttymodes.c xmalloc.c addrmatch.c \ - atomicio.c key.c dispatch.c mac.c uidswap.c uuencode.c misc.c utf8.o \ + atomicio.c key.c dispatch.c mac.c uidswap.c uuencode.c misc.c utf8.c \ monitor_fdpass.c rijndael.c ssh-dss.c ssh-ecdsa.c ssh-rsa.c dh.c \ msg.c progressmeter.c dns.c entropy.c umac.c umac128.c \ ssh-pkcs11.c smult_curve25519_ref.c \ @@ -23,7 +23,7 @@ SRCS+= authfd.c authfile.c bufaux.c bufb kex.c kexdh.c kexgex.c kexecdh.c kexc25519.c \ kexdhc.c kexgexc.c kexecdhc.c kexc25519c.c \ kexdhs.c kexgexs.c kexecdhs.c kexc25519s.c \ - platform-pledge.c platform-tracing.o + platform-pledge.c platform-tracing.c PACKAGE= ssh # gss-genr.c should be in $SRCS but causes linking problems, so it is From owner-svn-src-head@freebsd.org Tue May 9 01:48:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC289D64EF1; Tue, 9 May 2017 01:48:16 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 76C0C948; Tue, 9 May 2017 01:48:16 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v491mF5i067241; Tue, 9 May 2017 01:48:15 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v491mEdb067232; Tue, 9 May 2017 01:48:14 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201705090148.v491mEdb067232@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 9 May 2017 01:48:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317999 - in head: lib/libzstd sbin/decryptcore share/doc/pjdfstest targets/pseudo/clang targets/pseudo/userland targets/pseudo/userland/share usr.bin/getaddrinfo usr.bin/zstd usr.sbin/... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 01:48:17 -0000 Author: bdrewery Date: Tue May 9 01:48:14 2017 New Revision: 317999 URL: https://svnweb.freebsd.org/changeset/base/317999 Log: DIRDEPS_BUILD: Connect new directories. Sponsored by: Dell EMC Isilon Added: head/lib/libzstd/Makefile.depend (contents, props changed) head/sbin/decryptcore/Makefile.depend (contents, props changed) head/share/doc/pjdfstest/Makefile.depend (contents, props changed) head/usr.bin/getaddrinfo/Makefile.depend (contents, props changed) head/usr.bin/zstd/Makefile.depend (contents, props changed) head/usr.sbin/prometheus_sysctl_exporter/Makefile.depend (contents, props changed) Modified: head/targets/pseudo/clang/Makefile.depend head/targets/pseudo/userland/Makefile.depend head/targets/pseudo/userland/share/Makefile.depend Added: head/lib/libzstd/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libzstd/Makefile.depend Tue May 9 01:48:14 2017 (r317999) @@ -0,0 +1,19 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/libthr \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/sbin/decryptcore/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/decryptcore/Makefile.depend Tue May 9 01:48:14 2017 (r317999) @@ -0,0 +1,21 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/libpjdlog \ + lib/libutil \ + secure/lib/libcrypto \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/share/doc/pjdfstest/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/doc/pjdfstest/Makefile.depend Tue May 9 01:48:14 2017 (r317999) @@ -0,0 +1,11 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Modified: head/targets/pseudo/clang/Makefile.depend ============================================================================== --- head/targets/pseudo/clang/Makefile.depend Tue May 9 01:48:02 2017 (r317998) +++ head/targets/pseudo/clang/Makefile.depend Tue May 9 01:48:14 2017 (r317999) @@ -27,19 +27,23 @@ DIRDEPS+= \ usr.bin/clang/llvm-bcanalyzer \ usr.bin/clang/llvm-cov \ usr.bin/clang/llvm-cxxdump \ + usr.bin/clang/llvm-cxxfilt \ usr.bin/clang/llvm-diff \ usr.bin/clang/llvm-dis \ usr.bin/clang/llvm-dwarfdump \ usr.bin/clang/llvm-extract \ usr.bin/clang/llvm-link \ usr.bin/clang/llvm-lto \ + usr.bin/clang/llvm-lto2 \ usr.bin/clang/llvm-mc \ + usr.bin/clang/llvm-modextract \ usr.bin/clang/llvm-nm \ usr.bin/clang/llvm-objdump \ usr.bin/clang/llvm-pdbdump \ usr.bin/clang/llvm-profdata \ usr.bin/clang/llvm-rtdyld \ usr.bin/clang/llvm-symbolizer \ + usr.bin/clang/llvm-xray \ usr.bin/clang/opt \ .endif Modified: head/targets/pseudo/userland/Makefile.depend ============================================================================== --- head/targets/pseudo/userland/Makefile.depend Tue May 9 01:48:02 2017 (r317998) +++ head/targets/pseudo/userland/Makefile.depend Tue May 9 01:48:14 2017 (r317999) @@ -54,6 +54,7 @@ DIRDEPS+= \ sbin/clri \ sbin/comcontrol \ sbin/conscontrol \ + sbin/decryptcore \ sbin/ddb \ sbin/devd \ sbin/devfs \ @@ -229,6 +230,7 @@ DIRDEPS+= \ usr.bin/ftp \ usr.bin/gcore \ usr.bin/gencat \ + usr.bin/getaddrinfo \ usr.bin/getconf \ usr.bin/getent \ usr.bin/getopt \ @@ -432,6 +434,7 @@ DIRDEPS+= \ usr.bin/ypcat \ usr.bin/ypmatch \ usr.bin/ypwhich \ + usr.bin/zstd \ usr.sbin/IPXrouted \ usr.sbin/ac \ usr.sbin/accton \ @@ -707,6 +710,7 @@ DIRDEPS+= \ usr.sbin/praliases \ usr.sbin/praudit \ usr.sbin/procctl \ + usr.sbin/prometheus_sysctl_exporter \ usr.sbin/pstat \ usr.sbin/pw \ usr.sbin/pwd_mkdb \ @@ -801,6 +805,11 @@ DIRDEPS+= \ ${DEP_RELDIR}/secure \ ${DEP_RELDIR}/share \ + +.if ${MK_EFI} != "no" +DIRDEPS+= usr.sbin/efidp +.endif + .if ${MK_NAND} != "no" DIRDEPS+= \ sbin/nandfs \ @@ -828,6 +837,8 @@ DIRDEPS.amd64= \ usr.sbin/camdd \ usr.sbin/cpucontrol \ usr.sbin/hyperv/tools \ + usr.sbin/hyperv/tools/kvp \ + usr.sbin/hyperv/tools/vss \ usr.sbin/kgmon \ usr.sbin/lptcontrol \ usr.sbin/mptable \ @@ -853,6 +864,8 @@ DIRDEPS.i386= \ usr.sbin/btxld \ usr.sbin/cpucontrol \ usr.sbin/hyperv/tools \ + usr.sbin/hyperv/tools/kvp \ + usr.sbin/hyperv/tools/vss \ usr.sbin/kgmon \ usr.sbin/kgzip \ usr.sbin/lptcontrol \ Modified: head/targets/pseudo/userland/share/Makefile.depend ============================================================================== --- head/targets/pseudo/userland/share/Makefile.depend Tue May 9 01:48:02 2017 (r317998) +++ head/targets/pseudo/userland/share/Makefile.depend Tue May 9 01:48:14 2017 (r317999) @@ -13,6 +13,7 @@ DIRDEPS = \ share/doc/legal/intel_iwi \ share/doc/legal/intel_iwn \ share/doc/legal/intel_wpi \ + share/doc/legal/realtek \ share/doc/llvm/clang \ share/doc/papers/beyond4.3 \ share/doc/papers/bufbio \ @@ -29,6 +30,7 @@ DIRDEPS = \ share/doc/papers/relengr \ share/doc/papers/sysperf \ share/doc/papers/timecounter \ + share/doc/pjdfstest \ share/doc/psd/01.cacm \ share/doc/psd/02.implement \ share/doc/psd/03.iosys \ Added: head/usr.bin/getaddrinfo/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/getaddrinfo/Makefile.depend Tue May 9 01:48:14 2017 (r317999) @@ -0,0 +1,20 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/libnetbsd \ + lib/libutil \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/usr.bin/zstd/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/zstd/Makefile.depend Tue May 9 01:48:14 2017 (r317999) @@ -0,0 +1,20 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/libthr \ + lib/libzstd \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/usr.sbin/prometheus_sysctl_exporter/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/prometheus_sysctl_exporter/Makefile.depend Tue May 9 01:48:14 2017 (r317999) @@ -0,0 +1,20 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/libz \ + lib/msun \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif From owner-svn-src-head@freebsd.org Tue May 9 01:48:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D603ED64F42; Tue, 9 May 2017 01:48:28 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8588E9ED; Tue, 9 May 2017 01:48:28 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v491mRgX067322; Tue, 9 May 2017 01:48:27 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v491mOVc067288; Tue, 9 May 2017 01:48:24 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201705090148.v491mOVc067288@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 9 May 2017 01:48:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318000 - in head: bin/dd lib/libbsnmp/libbsnmp lib/libsysdecode libexec/dma/dma-mbox-create rescue/rescue sbin/dumpon sbin/hastctl sbin/hastd sys/boot/i386/loader sys/boot/i386/zfsload... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 01:48:29 -0000 Author: bdrewery Date: Tue May 9 01:48:23 2017 New Revision: 318000 URL: https://svnweb.freebsd.org/changeset/base/318000 Log: DIRDEPS_BUILD: Update dependencies. Sponsored by: Dell EMC Isilon Modified: head/bin/dd/Makefile.depend head/lib/libbsnmp/libbsnmp/Makefile.depend head/lib/libsysdecode/Makefile.depend head/libexec/dma/dma-mbox-create/Makefile.depend head/rescue/rescue/Makefile.depend head/sbin/dumpon/Makefile.depend head/sbin/hastctl/Makefile.depend head/sbin/hastd/Makefile.depend head/sys/boot/i386/loader/Makefile.depend head/sys/boot/i386/zfsloader/Makefile.depend head/usr.bin/fold/Makefile.depend head/usr.bin/grep/Makefile.depend head/usr.bin/hexdump/Makefile.depend head/usr.bin/iconv/Makefile.depend head/usr.bin/ident/Makefile.depend head/usr.bin/ktrdump/Makefile.depend head/usr.bin/lam/Makefile.depend head/usr.bin/last/Makefile.depend head/usr.bin/ministat/Makefile.depend head/usr.bin/pom/Makefile.depend head/usr.sbin/amd/amq/Makefile.depend head/usr.sbin/amd/fixmount/Makefile.depend head/usr.sbin/amd/fsinfo/Makefile.depend head/usr.sbin/amd/hlfsd/Makefile.depend head/usr.sbin/amd/libamu/Makefile.depend head/usr.sbin/amd/mk-amd-map/Makefile.depend head/usr.sbin/amd/pawd/Makefile.depend head/usr.sbin/amd/wire-test/Makefile.depend head/usr.sbin/arp/Makefile.depend head/usr.sbin/bhyve/Makefile.depend head/usr.sbin/bsnmpd/tools/libbsnmptools/Makefile.depend head/usr.sbin/rpc.statd/Makefile.depend head/usr.sbin/traceroute/Makefile.depend Modified: head/bin/dd/Makefile.depend ============================================================================== --- head/bin/dd/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/bin/dd/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -8,6 +8,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ Modified: head/lib/libbsnmp/libbsnmp/Makefile.depend ============================================================================== --- head/lib/libbsnmp/libbsnmp/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/lib/libbsnmp/libbsnmp/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -5,6 +5,7 @@ DIRDEPS = \ gnu/lib/csu \ gnu/lib/libgcc \ include \ + include/arpa \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ Modified: head/lib/libsysdecode/Makefile.depend ============================================================================== --- head/lib/libsysdecode/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/lib/libsysdecode/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -3,13 +3,128 @@ DIRDEPS = \ gnu/lib/csu \ + gnu/lib/libdialog \ gnu/lib/libgcc \ + gnu/lib/libgomp \ + gnu/lib/libregex \ + gnu/lib/libssp \ + gnu/lib/libstdc++ \ + gnu/lib/libsupc++ \ include \ + include/arpa \ + include/gssapi \ + include/protocols \ include/rpc \ + include/rpcsvc \ include/xlocale \ + kerberos5/lib/libasn1 \ + kerberos5/lib/libgssapi_krb5 \ + kerberos5/lib/libhdb \ + kerberos5/lib/libheimbase \ + kerberos5/lib/libheimntlm \ + kerberos5/lib/libhx509 \ + kerberos5/lib/libkadm5clnt \ + kerberos5/lib/libkafs5 \ + kerberos5/lib/libkdc \ + kerberos5/lib/libkrb5 \ + kerberos5/lib/libroken \ + kerberos5/lib/libwind \ lib/${CSU_DIR} \ + lib/atf/libatf-c \ + lib/lib80211 \ + lib/libalias/libalias \ + lib/libarchive \ + lib/libbegemot \ + lib/libblacklist \ + lib/libblocksruntime \ + lib/libbluetooth \ + lib/libbsdstat \ + lib/libbsm \ + lib/libbsnmp/libbsnmp \ + lib/libbz2 \ lib/libc \ + lib/libc++ \ + lib/libcalendar \ + lib/libcam \ + lib/libcapsicum \ + lib/libcasper/libcasper \ + lib/libcasper/services/cap_dns \ + lib/libcasper/services/cap_grp \ + lib/libcasper/services/cap_pwd \ + lib/libcasper/services/cap_random \ + lib/libcasper/services/cap_sysctl \ + lib/libcom_err \ lib/libcompiler_rt \ + lib/libcuse \ + lib/libdevctl \ + lib/libdevdctl \ + lib/libdevinfo \ + lib/libdevstat \ + lib/libdpv \ + lib/libdwarf \ + lib/libedit \ + lib/libedit/edit/readline \ + lib/libefivar \ + lib/libelf \ + lib/libelftc \ + lib/libevent \ + lib/libexecinfo \ + lib/libexpat \ + lib/libfetch \ + lib/libfigpar \ + lib/libgeom \ + lib/libgpio \ + lib/libjail \ + lib/libkvm \ + lib/liblzma \ + lib/libmagic \ + lib/libmd \ + lib/libmemstat \ + lib/libmilter \ + lib/libmp \ + lib/libmt \ + lib/libnetgraph \ + lib/libngatm \ + lib/libopie \ + lib/libpam/libpam \ + lib/libpcap \ + lib/libpmc \ + lib/libproc \ + lib/libprocstat \ + lib/libradius \ + lib/librtld_db \ + lib/libsdp \ + lib/libsqlite3 \ + lib/libstand \ + lib/libstdthreads \ + lib/libtacplus \ + lib/libthread_db \ + lib/libucl \ + lib/libufs \ + lib/libugidfw \ + lib/libulog \ + lib/libusb \ + lib/libusbhid \ + lib/libutil \ + lib/libvgl \ + lib/libvmmapi \ + lib/libwrap \ + lib/libxo \ + lib/libypclnt \ + lib/libz \ + lib/libzstd \ + lib/msun \ + lib/ncurses/formw \ + lib/ncurses/menuw \ + lib/ncurses/ncursesw \ + lib/ncurses/panelw \ + secure/lib/libcrypto \ + secure/lib/libssl \ + usr.bin/lex \ + usr.sbin/bsnmpd/modules \ + usr.sbin/bsnmpd/modules/snmp_bridge \ + usr.sbin/bsnmpd/modules/snmp_mibII \ + usr.sbin/bsnmpd/modules/snmp_netgraph \ .include Modified: head/libexec/dma/dma-mbox-create/Makefile.depend ============================================================================== --- head/libexec/dma/dma-mbox-create/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/libexec/dma/dma-mbox-create/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -9,6 +9,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ secure/lib/libcrypto \ secure/lib/libssl \ Modified: head/rescue/rescue/Makefile.depend ============================================================================== --- head/rescue/rescue/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/rescue/rescue/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -39,13 +39,13 @@ DIRDEPS = \ lib/liblzma \ lib/libmd \ lib/libmt \ - lib/libnetgraph \ lib/libsbuf \ lib/libthr \ lib/libufs \ lib/libutil \ lib/libxo \ lib/libz \ + lib/libzstd \ lib/msun \ lib/ncurses/ncursesw \ rescue/librescue \ Modified: head/sbin/dumpon/Makefile.depend ============================================================================== --- head/sbin/dumpon/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/sbin/dumpon/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -9,6 +9,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + secure/lib/libcrypto \ .include Modified: head/sbin/hastctl/Makefile.depend ============================================================================== --- head/sbin/hastctl/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/sbin/hastctl/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -10,8 +10,8 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libmd \ lib/libutil \ - secure/lib/libcrypto \ usr.bin/yacc.host \ Modified: head/sbin/hastd/Makefile.depend ============================================================================== --- head/sbin/hastd/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/sbin/hastd/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -12,10 +12,10 @@ DIRDEPS = \ lib/libcompiler_rt \ lib/libexpat \ lib/libgeom \ + lib/libmd \ lib/libsbuf \ lib/libthr \ lib/libutil \ - secure/lib/libcrypto \ usr.bin/yacc.host \ Modified: head/sys/boot/i386/loader/Makefile.depend ============================================================================== --- head/sys/boot/i386/loader/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/sys/boot/i386/loader/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -4,7 +4,6 @@ DIRDEPS = \ include \ include/xlocale \ - lib/libstand \ sys/boot/ficl32 \ sys/boot/geli \ sys/boot/i386/btx/btx \ Modified: head/sys/boot/i386/zfsloader/Makefile.depend ============================================================================== --- head/sys/boot/i386/zfsloader/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/sys/boot/i386/zfsloader/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -4,7 +4,6 @@ DIRDEPS = \ include \ include/xlocale \ - lib/libstand \ sys/boot/ficl32 \ sys/boot/geli \ sys/boot/i386/btx/btx \ Modified: head/usr.bin/fold/Makefile.depend ============================================================================== --- head/usr.bin/fold/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.bin/fold/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -8,7 +8,6 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ - lib/libcapsicum \ lib/libcompiler_rt \ Modified: head/usr.bin/grep/Makefile.depend ============================================================================== --- head/usr.bin/grep/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.bin/grep/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -4,7 +4,6 @@ DIRDEPS = \ gnu/lib/csu \ gnu/lib/libgcc \ - gnu/lib/libregex \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: head/usr.bin/hexdump/Makefile.depend ============================================================================== --- head/usr.bin/hexdump/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.bin/hexdump/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -8,6 +8,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ Modified: head/usr.bin/iconv/Makefile.depend ============================================================================== --- head/usr.bin/iconv/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.bin/iconv/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -8,6 +8,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ Modified: head/usr.bin/ident/Makefile.depend ============================================================================== --- head/usr.bin/ident/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.bin/ident/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -8,6 +8,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ lib/libsbuf \ Modified: head/usr.bin/ktrdump/Makefile.depend ============================================================================== --- head/usr.bin/ktrdump/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.bin/ktrdump/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -8,6 +8,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ lib/libelf \ lib/libkvm \ Modified: head/usr.bin/lam/Makefile.depend ============================================================================== --- head/usr.bin/lam/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.bin/lam/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -8,6 +8,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ Modified: head/usr.bin/last/Makefile.depend ============================================================================== --- head/usr.bin/last/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.bin/last/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -8,6 +8,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ Modified: head/usr.bin/ministat/Makefile.depend ============================================================================== --- head/usr.bin/ministat/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.bin/ministat/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -8,6 +8,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ lib/msun \ Modified: head/usr.bin/pom/Makefile.depend ============================================================================== --- head/usr.bin/pom/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.bin/pom/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -8,6 +8,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ lib/msun \ Modified: head/usr.sbin/amd/amq/Makefile.depend ============================================================================== --- head/usr.sbin/amd/amq/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.sbin/amd/amq/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -12,7 +12,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - lib/libwrap \ usr.sbin/amd/include \ usr.sbin/amd/libamu \ Modified: head/usr.sbin/amd/fixmount/Makefile.depend ============================================================================== --- head/usr.sbin/amd/fixmount/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.sbin/amd/fixmount/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -13,7 +13,6 @@ DIRDEPS = \ lib/libc \ lib/libcompiler_rt \ lib/librpcsvc \ - lib/libwrap \ usr.sbin/amd/include \ usr.sbin/amd/libamu \ Modified: head/usr.sbin/amd/fsinfo/Makefile.depend ============================================================================== --- head/usr.sbin/amd/fsinfo/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.sbin/amd/fsinfo/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -12,7 +12,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - lib/libwrap \ usr.bin/yacc.host \ usr.sbin/amd/include \ usr.sbin/amd/libamu \ Modified: head/usr.sbin/amd/hlfsd/Makefile.depend ============================================================================== --- head/usr.sbin/amd/hlfsd/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.sbin/amd/hlfsd/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -12,7 +12,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - lib/libwrap \ usr.sbin/amd/include \ usr.sbin/amd/libamu \ Modified: head/usr.sbin/amd/libamu/Makefile.depend ============================================================================== --- head/usr.sbin/amd/libamu/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.sbin/amd/libamu/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -7,7 +7,6 @@ DIRDEPS = \ include/rpc \ include/rpcsvc \ include/xlocale \ - lib/libwrap \ usr.sbin/amd/include \ Modified: head/usr.sbin/amd/mk-amd-map/Makefile.depend ============================================================================== --- head/usr.sbin/amd/mk-amd-map/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.sbin/amd/mk-amd-map/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -12,7 +12,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - lib/libwrap \ usr.sbin/amd/include \ usr.sbin/amd/libamu \ Modified: head/usr.sbin/amd/pawd/Makefile.depend ============================================================================== --- head/usr.sbin/amd/pawd/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.sbin/amd/pawd/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -12,7 +12,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - lib/libwrap \ usr.sbin/amd/include \ usr.sbin/amd/libamu \ Modified: head/usr.sbin/amd/wire-test/Makefile.depend ============================================================================== --- head/usr.sbin/amd/wire-test/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.sbin/amd/wire-test/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -12,7 +12,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - lib/libwrap \ usr.sbin/amd/include \ usr.sbin/amd/libamu \ Modified: head/usr.sbin/arp/Makefile.depend ============================================================================== --- head/usr.sbin/arp/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.sbin/arp/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -10,6 +10,8 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libutil \ + lib/libxo \ .include Modified: head/usr.sbin/bhyve/Makefile.depend ============================================================================== --- head/usr.sbin/bhyve/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.sbin/bhyve/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -9,6 +9,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ lib/libmd \ lib/libthr \ Modified: head/usr.sbin/bsnmpd/tools/libbsnmptools/Makefile.depend ============================================================================== --- head/usr.sbin/bsnmpd/tools/libbsnmptools/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.sbin/bsnmpd/tools/libbsnmptools/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -2,15 +2,10 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ - gnu/lib/libgcc \ include \ include/arpa \ include/xlocale \ - lib/${CSU_DIR} \ lib/libbsnmp/libbsnmp \ - lib/libc \ - lib/libcompiler_rt \ .include Modified: head/usr.sbin/rpc.statd/Makefile.depend ============================================================================== --- head/usr.sbin/rpc.statd/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.sbin/rpc.statd/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -7,7 +7,6 @@ DIRDEPS = \ include \ include/arpa \ include/rpc \ - include/rpcsvc \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ Modified: head/usr.sbin/traceroute/Makefile.depend ============================================================================== --- head/usr.sbin/traceroute/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.sbin/traceroute/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -9,8 +9,12 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ + lib/libcasper/libcasper \ + lib/libcasper/services/cap_dns \ lib/libcompiler_rt \ lib/libipsec \ + lib/libnv \ .include From owner-svn-src-head@freebsd.org Tue May 9 02:38:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D08FD64C54; Tue, 9 May 2017 02:38:26 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F9BB1ADE; Tue, 9 May 2017 02:38:26 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v492cPwB087509; Tue, 9 May 2017 02:38:25 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v492cNq7087492; Tue, 9 May 2017 02:38:23 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705090238.v492cNq7087492@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 9 May 2017 02:38:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318001 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 02:38:26 -0000 Author: adrian Date: Tue May 9 02:38:23 2017 New Revision: 318001 URL: https://svnweb.freebsd.org/changeset/base/318001 Log: [iwm] include opt_iwm.h and opt_wlan.h consistently in all files. Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_7000.c head/sys/dev/iwm/if_iwm_8000.c head/sys/dev/iwm/if_iwm_binding.c head/sys/dev/iwm/if_iwm_fw.c head/sys/dev/iwm/if_iwm_led.c head/sys/dev/iwm/if_iwm_mac_ctxt.c head/sys/dev/iwm/if_iwm_notif_wait.c head/sys/dev/iwm/if_iwm_pcie_trans.c head/sys/dev/iwm/if_iwm_phy_ctxt.c head/sys/dev/iwm/if_iwm_phy_db.c head/sys/dev/iwm/if_iwm_power.c head/sys/dev/iwm/if_iwm_scan.c head/sys/dev/iwm/if_iwm_time_event.c head/sys/dev/iwm/if_iwm_util.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Tue May 9 01:48:23 2017 (r318000) +++ head/sys/dev/iwm/if_iwm.c Tue May 9 02:38:23 2017 (r318001) @@ -106,6 +106,7 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" +#include "opt_iwm.h" #include #include Modified: head/sys/dev/iwm/if_iwm_7000.c ============================================================================== --- head/sys/dev/iwm/if_iwm_7000.c Tue May 9 01:48:23 2017 (r318000) +++ head/sys/dev/iwm/if_iwm_7000.c Tue May 9 02:38:23 2017 (r318001) @@ -72,6 +72,9 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_wlan.h" +#include "opt_iwm.h" + #include #include "if_iwm_config.h" Modified: head/sys/dev/iwm/if_iwm_8000.c ============================================================================== --- head/sys/dev/iwm/if_iwm_8000.c Tue May 9 01:48:23 2017 (r318000) +++ head/sys/dev/iwm/if_iwm_8000.c Tue May 9 02:38:23 2017 (r318001) @@ -71,6 +71,9 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_wlan.h" +#include "opt_iwm.h" + #include #include "if_iwm_config.h" Modified: head/sys/dev/iwm/if_iwm_binding.c ============================================================================== --- head/sys/dev/iwm/if_iwm_binding.c Tue May 9 01:48:23 2017 (r318000) +++ head/sys/dev/iwm/if_iwm_binding.c Tue May 9 02:38:23 2017 (r318001) @@ -106,6 +106,7 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" +#include "opt_iwm.h" #include #include Modified: head/sys/dev/iwm/if_iwm_fw.c ============================================================================== --- head/sys/dev/iwm/if_iwm_fw.c Tue May 9 01:48:23 2017 (r318000) +++ head/sys/dev/iwm/if_iwm_fw.c Tue May 9 02:38:23 2017 (r318001) @@ -74,6 +74,7 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" +#include "opt_iwm.h" #include #include Modified: head/sys/dev/iwm/if_iwm_led.c ============================================================================== --- head/sys/dev/iwm/if_iwm_led.c Tue May 9 01:48:23 2017 (r318000) +++ head/sys/dev/iwm/if_iwm_led.c Tue May 9 02:38:23 2017 (r318001) @@ -89,6 +89,9 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_wlan.h" +#include "opt_iwm.h" + #include #include #include Modified: head/sys/dev/iwm/if_iwm_mac_ctxt.c ============================================================================== --- head/sys/dev/iwm/if_iwm_mac_ctxt.c Tue May 9 01:48:23 2017 (r318000) +++ head/sys/dev/iwm/if_iwm_mac_ctxt.c Tue May 9 02:38:23 2017 (r318001) @@ -106,6 +106,7 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" +#include "opt_iwm.h" #include #include Modified: head/sys/dev/iwm/if_iwm_notif_wait.c ============================================================================== --- head/sys/dev/iwm/if_iwm_notif_wait.c Tue May 9 01:48:23 2017 (r318000) +++ head/sys/dev/iwm/if_iwm_notif_wait.c Tue May 9 02:38:23 2017 (r318001) @@ -70,6 +70,7 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" +#include "opt_iwm.h" #include #include Modified: head/sys/dev/iwm/if_iwm_pcie_trans.c ============================================================================== --- head/sys/dev/iwm/if_iwm_pcie_trans.c Tue May 9 01:48:23 2017 (r318000) +++ head/sys/dev/iwm/if_iwm_pcie_trans.c Tue May 9 02:38:23 2017 (r318001) @@ -106,6 +106,7 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" +#include "opt_iwm.h" #include #include Modified: head/sys/dev/iwm/if_iwm_phy_ctxt.c ============================================================================== --- head/sys/dev/iwm/if_iwm_phy_ctxt.c Tue May 9 01:48:23 2017 (r318000) +++ head/sys/dev/iwm/if_iwm_phy_ctxt.c Tue May 9 02:38:23 2017 (r318001) @@ -106,6 +106,7 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" +#include "opt_iwm.h" #include #include Modified: head/sys/dev/iwm/if_iwm_phy_db.c ============================================================================== --- head/sys/dev/iwm/if_iwm_phy_db.c Tue May 9 01:48:23 2017 (r318000) +++ head/sys/dev/iwm/if_iwm_phy_db.c Tue May 9 02:38:23 2017 (r318001) @@ -106,6 +106,7 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" +#include "opt_iwm.h" #include #include Modified: head/sys/dev/iwm/if_iwm_power.c ============================================================================== --- head/sys/dev/iwm/if_iwm_power.c Tue May 9 01:48:23 2017 (r318000) +++ head/sys/dev/iwm/if_iwm_power.c Tue May 9 02:38:23 2017 (r318001) @@ -90,6 +90,7 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" +#include "opt_iwm.h" #include #include Modified: head/sys/dev/iwm/if_iwm_scan.c ============================================================================== --- head/sys/dev/iwm/if_iwm_scan.c Tue May 9 01:48:23 2017 (r318000) +++ head/sys/dev/iwm/if_iwm_scan.c Tue May 9 02:38:23 2017 (r318001) @@ -106,6 +106,7 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" +#include "opt_iwm.h" #include #include Modified: head/sys/dev/iwm/if_iwm_time_event.c ============================================================================== --- head/sys/dev/iwm/if_iwm_time_event.c Tue May 9 01:48:23 2017 (r318000) +++ head/sys/dev/iwm/if_iwm_time_event.c Tue May 9 02:38:23 2017 (r318001) @@ -106,6 +106,7 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" +#include "opt_iwm.h" #include #include Modified: head/sys/dev/iwm/if_iwm_util.c ============================================================================== --- head/sys/dev/iwm/if_iwm_util.c Tue May 9 01:48:23 2017 (r318000) +++ head/sys/dev/iwm/if_iwm_util.c Tue May 9 02:38:23 2017 (r318001) @@ -106,6 +106,7 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" +#include "opt_iwm.h" #include #include From owner-svn-src-head@freebsd.org Tue May 9 02:41:35 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DE32D64E5F; Tue, 9 May 2017 02:41:35 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 10A3419AA; Tue, 9 May 2017 02:41:34 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v492fYnl091369; Tue, 9 May 2017 02:41:34 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v492fXVN091367; Tue, 9 May 2017 02:41:33 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705090241.v492fXVN091367@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 9 May 2017 02:41:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318002 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 02:41:35 -0000 Author: adrian Date: Tue May 9 02:41:33 2017 New Revision: 318002 URL: https://svnweb.freebsd.org/changeset/base/318002 Log: [iwm] iwm_{read,write}_prph() don't grab the nic lock in iwm themselves. * Fix a couple of cases where the nic lock ended up not being grabbed during an iwm_read_prph() or iwm_write_prph(). Obtained from: dragonflybsd.git 6c5470f2db219c61e362c981fea969d97e1b8293 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_pcie_trans.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Tue May 9 02:38:23 2017 (r318001) +++ head/sys/dev/iwm/if_iwm.c Tue May 9 02:41:33 2017 (r318002) @@ -1294,9 +1294,9 @@ iwm_stop_device(struct iwm_softc *sc) /* stop tx and rx. tx and rx bits, as usual, are from if_iwn */ - iwm_write_prph(sc, IWM_SCD_TXFACT, 0); - if (iwm_nic_lock(sc)) { + iwm_write_prph(sc, IWM_SCD_TXFACT, 0); + /* Stop each Tx DMA channel */ for (chnl = 0; chnl < IWM_FH_TCSR_CHNL_NUM; chnl++) { IWM_WRITE(sc, @@ -1324,8 +1324,10 @@ iwm_stop_device(struct iwm_softc *sc) if (sc->cfg->device_family == IWM_DEVICE_FAMILY_7000) { /* Power-down device's busmaster DMA clocks */ - iwm_write_prph(sc, IWM_APMG_CLK_DIS_REG, - IWM_APMG_CLK_VAL_DMA_CLK_RQT); + if (iwm_nic_lock(sc)) { + iwm_write_prph(sc, IWM_APMG_CLK_DIS_REG, + IWM_APMG_CLK_VAL_DMA_CLK_RQT); + } DELAY(5); } @@ -1622,8 +1624,6 @@ iwm_trans_pcie_fw_alive(struct iwm_softc iwm_ict_reset(sc); - iwm_nic_unlock(sc); - sc->scd_base_addr = iwm_read_prph(sc, IWM_SCD_SRAM_BASE_ADDR); if (scd_base_addr != 0 && scd_base_addr != sc->scd_base_addr) { @@ -1632,6 +1632,8 @@ iwm_trans_pcie_fw_alive(struct iwm_softc __func__, sc->scd_base_addr, scd_base_addr); } + iwm_nic_unlock(sc); + /* reset context data, TX status and translation data */ error = iwm_write_mem(sc, sc->scd_base_addr + IWM_SCD_CONTEXT_MEM_LOWER_BOUND, @@ -2591,9 +2593,11 @@ iwm_pcie_load_given_ucode(struct iwm_sof if (image->is_dual_cpus) { /* set CPU2 header address */ - iwm_write_prph(sc, - IWM_LMPM_SECURE_UCODE_LOAD_CPU2_HDR_ADDR, - IWM_LMPM_SECURE_CPU2_HDR_MEM_SPACE); + if (iwm_nic_lock(sc)) { + iwm_write_prph(sc, + IWM_LMPM_SECURE_UCODE_LOAD_CPU2_HDR_ADDR, + IWM_LMPM_SECURE_CPU2_HDR_MEM_SPACE); + } /* load to FW the binary sections of CPU2 */ ret = iwm_pcie_load_cpu_sections(sc, image, 2, @@ -2622,7 +2626,10 @@ iwm_pcie_load_given_ucode_8000(struct iw /* configure the ucode to be ready to get the secured image */ /* release CPU reset */ - iwm_write_prph(sc, IWM_RELEASE_CPU_RESET, IWM_RELEASE_CPU_RESET_BIT); + if (iwm_nic_lock(sc)) { + iwm_write_prph(sc, IWM_RELEASE_CPU_RESET, + IWM_RELEASE_CPU_RESET_BIT); + } /* load to FW the binary Secured sections of CPU1 */ ret = iwm_pcie_load_cpu_sections_8000(sc, image, 1, @@ -2876,10 +2883,14 @@ iwm_mvm_load_ucode_wait_alive(struct iwm IWM_LOCK(sc); if (error) { if (sc->cfg->device_family == IWM_DEVICE_FAMILY_8000) { + uint32_t a = 0x5a5a5a5a, b = 0x5a5a5a5a; + if (iwm_nic_lock(sc)) { + a = iwm_read_prph(sc, IWM_SB_CPU_1_STATUS); + b = iwm_read_prph(sc, IWM_SB_CPU_2_STATUS); + } device_printf(sc->sc_dev, "SecBoot CPU1 Status: 0x%x, CPU2 Status: 0x%x\n", - iwm_read_prph(sc, IWM_SB_CPU_1_STATUS), - iwm_read_prph(sc, IWM_SB_CPU_2_STATUS)); + a, b); } sc->cur_ucode = old_type; return error; Modified: head/sys/dev/iwm/if_iwm_pcie_trans.c ============================================================================== --- head/sys/dev/iwm/if_iwm_pcie_trans.c Tue May 9 02:38:23 2017 (r318001) +++ head/sys/dev/iwm/if_iwm_pcie_trans.c Tue May 9 02:41:33 2017 (r318002) @@ -499,11 +499,15 @@ iwm_apm_init(struct iwm_softc *sc) * just to discard the value. But that's the way the hardware * seems to like it. */ - iwm_read_prph(sc, IWM_OSC_CLK); - iwm_read_prph(sc, IWM_OSC_CLK); + if (iwm_nic_lock(sc)) { + iwm_read_prph(sc, IWM_OSC_CLK); + iwm_read_prph(sc, IWM_OSC_CLK); + } iwm_set_bits_prph(sc, IWM_OSC_CLK, IWM_OSC_CLK_FORCE_CONTROL); - iwm_read_prph(sc, IWM_OSC_CLK); - iwm_read_prph(sc, IWM_OSC_CLK); + if (iwm_nic_lock(sc)) { + iwm_read_prph(sc, IWM_OSC_CLK); + iwm_read_prph(sc, IWM_OSC_CLK); + } } /* @@ -514,8 +518,10 @@ iwm_apm_init(struct iwm_softc *sc) * set by default in "CLK_CTRL_REG" after reset. */ if (sc->cfg->device_family == IWM_DEVICE_FAMILY_7000) { - iwm_write_prph(sc, IWM_APMG_CLK_EN_REG, - IWM_APMG_CLK_VAL_DMA_CLK_RQT); + if (iwm_nic_lock(sc)) { + iwm_write_prph(sc, IWM_APMG_CLK_EN_REG, + IWM_APMG_CLK_VAL_DMA_CLK_RQT); + } DELAY(20); /* Disable L1-Active */ @@ -523,8 +529,10 @@ iwm_apm_init(struct iwm_softc *sc) IWM_APMG_PCIDEV_STT_VAL_L1_ACT_DIS); /* Clear the interrupt in APMG if the NIC is in RFKILL */ - iwm_write_prph(sc, IWM_APMG_RTC_INT_STT_REG, - IWM_APMG_RTC_INT_STT_RFKILL); + if (iwm_nic_lock(sc)) { + iwm_write_prph(sc, IWM_APMG_RTC_INT_STT_REG, + IWM_APMG_RTC_INT_STT_RFKILL); + } } out: if (error) @@ -626,12 +634,12 @@ iwm_pcie_set_cmd_in_flight(struct iwm_so IWM_SETBITS(sc, IWM_CSR_GP_CNTRL, IWM_CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); - ret = iwm_poll_bit(sc, IWM_CSR_GP_CNTRL, + ret = iwm_poll_bit(sc, IWM_CSR_GP_CNTRL, IWM_CSR_GP_CNTRL_REG_VAL_MAC_ACCESS_EN, (IWM_CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY | IWM_CSR_GP_CNTRL_REG_FLAG_GOING_TO_SLEEP), 15000); - if (ret == 0) { + if (ret == 0) { IWM_CLRBITS(sc, IWM_CSR_GP_CNTRL, IWM_CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); device_printf(sc->sc_dev, From owner-svn-src-head@freebsd.org Tue May 9 02:42:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A29A0D64051; Tue, 9 May 2017 02:42:55 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 479441EB2; Tue, 9 May 2017 02:42:55 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v492gsau091459; Tue, 9 May 2017 02:42:54 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v492gsWF091457; Tue, 9 May 2017 02:42:54 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705090242.v492gsWF091457@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 9 May 2017 02:42:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318003 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 02:42:55 -0000 Author: adrian Date: Tue May 9 02:42:53 2017 New Revision: 318003 URL: https://svnweb.freebsd.org/changeset/base/318003 Log: [iwm] Add iwm_nic_unlock() calls missing from previous commit. Obtained from: dragonflybsd.git f88ab372284e63c4c13da93e9026a203b9b4cdc5 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_pcie_trans.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Tue May 9 02:41:33 2017 (r318002) +++ head/sys/dev/iwm/if_iwm.c Tue May 9 02:42:53 2017 (r318003) @@ -1327,6 +1327,7 @@ iwm_stop_device(struct iwm_softc *sc) if (iwm_nic_lock(sc)) { iwm_write_prph(sc, IWM_APMG_CLK_DIS_REG, IWM_APMG_CLK_VAL_DMA_CLK_RQT); + iwm_nic_unlock(sc); } DELAY(5); } @@ -2597,6 +2598,7 @@ iwm_pcie_load_given_ucode(struct iwm_sof iwm_write_prph(sc, IWM_LMPM_SECURE_UCODE_LOAD_CPU2_HDR_ADDR, IWM_LMPM_SECURE_CPU2_HDR_MEM_SPACE); + iwm_nic_unlock(sc); } /* load to FW the binary sections of CPU2 */ @@ -2629,6 +2631,7 @@ iwm_pcie_load_given_ucode_8000(struct iw if (iwm_nic_lock(sc)) { iwm_write_prph(sc, IWM_RELEASE_CPU_RESET, IWM_RELEASE_CPU_RESET_BIT); + iwm_nic_unlock(sc); } /* load to FW the binary Secured sections of CPU1 */ @@ -2887,6 +2890,7 @@ iwm_mvm_load_ucode_wait_alive(struct iwm if (iwm_nic_lock(sc)) { a = iwm_read_prph(sc, IWM_SB_CPU_1_STATUS); b = iwm_read_prph(sc, IWM_SB_CPU_2_STATUS); + iwm_nic_unlock(sc); } device_printf(sc->sc_dev, "SecBoot CPU1 Status: 0x%x, CPU2 Status: 0x%x\n", Modified: head/sys/dev/iwm/if_iwm_pcie_trans.c ============================================================================== --- head/sys/dev/iwm/if_iwm_pcie_trans.c Tue May 9 02:41:33 2017 (r318002) +++ head/sys/dev/iwm/if_iwm_pcie_trans.c Tue May 9 02:42:53 2017 (r318003) @@ -502,11 +502,13 @@ iwm_apm_init(struct iwm_softc *sc) if (iwm_nic_lock(sc)) { iwm_read_prph(sc, IWM_OSC_CLK); iwm_read_prph(sc, IWM_OSC_CLK); + iwm_nic_unlock(sc); } iwm_set_bits_prph(sc, IWM_OSC_CLK, IWM_OSC_CLK_FORCE_CONTROL); if (iwm_nic_lock(sc)) { iwm_read_prph(sc, IWM_OSC_CLK); iwm_read_prph(sc, IWM_OSC_CLK); + iwm_nic_unlock(sc); } } @@ -521,6 +523,7 @@ iwm_apm_init(struct iwm_softc *sc) if (iwm_nic_lock(sc)) { iwm_write_prph(sc, IWM_APMG_CLK_EN_REG, IWM_APMG_CLK_VAL_DMA_CLK_RQT); + iwm_nic_unlock(sc); } DELAY(20); @@ -532,6 +535,7 @@ iwm_apm_init(struct iwm_softc *sc) if (iwm_nic_lock(sc)) { iwm_write_prph(sc, IWM_APMG_RTC_INT_STT_REG, IWM_APMG_RTC_INT_STT_RFKILL); + iwm_nic_unlock(sc); } } out: From owner-svn-src-head@freebsd.org Tue May 9 04:11:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6164D65B6D; Tue, 9 May 2017 04:11:54 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E99A17AC; Tue, 9 May 2017 04:11:54 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v494BrgI028735; Tue, 9 May 2017 04:11:53 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v494BrVD028734; Tue, 9 May 2017 04:11:53 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705090411.v494BrVD028734@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 9 May 2017 04:11:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318004 - head/contrib/netbsd-tests/usr.bin/grep X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 04:11:55 -0000 Author: ngie Date: Tue May 9 04:11:53 2017 New Revision: 318004 URL: https://svnweb.freebsd.org/changeset/base/318004 Log: Remove expected failure that no longer fails with gnu grep in base Reported by: Jenkins Submitted by: Kyle Evans Sponsored by: Dell EMC Isilon Modified: head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh Modified: head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh ============================================================================== --- head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh Tue May 9 02:42:53 2017 (r318003) +++ head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh Tue May 9 04:11:53 2017 (r318004) @@ -399,11 +399,6 @@ wflag_emptypat_head() } wflag_emptypat_body() { - grep_type - if [ $? -eq $GREP_TYPE_GNU_FREEBSD ]; then - atf_expect_fail "this test does not pass with GNU grep in base" - fi - printf "" > test1 printf "\n" > test2 printf "qaz" > test3 From owner-svn-src-head@freebsd.org Tue May 9 04:15:09 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A0E5D65C29; Tue, 9 May 2017 04:15:09 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D7A6D60; Tue, 9 May 2017 04:15:09 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v494F8LU028890; Tue, 9 May 2017 04:15:08 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v494F7Wi028884; Tue, 9 May 2017 04:15:07 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705090415.v494F7Wi028884@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 9 May 2017 04:15:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318005 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 04:15:09 -0000 Author: adrian Date: Tue May 9 04:15:07 2017 New Revision: 318005 URL: https://svnweb.freebsd.org/changeset/base/318005 Log: [iwm] Add basic powermanagement support via ifconfig wlan0 powersave. * The DEVICE_POWER_FLAGS_CAM_MSK flag was removed in the upstream iwlwifi in Linux commit ceef91c89480dd18bb3ac51e91280a233d0ca41f. * Add sc_ps_disabled flag to struct iwm_softc, which corresponds to mvm->ps_disabled in struct iwl_mvm in Linux iwlwifi. * Adds a hw.iwm.power_scheme tunable which corresponds to the power_scheme module parameter in Linux iwlwifi. Set this to 1 for completely disabling power management, 2 (default) for balanced powermanagement, and 3 for lowerpower mode (which does dtim period skipping). * Imports the constants.h file from iwlwifi as if_iwm_constants.h. * This doesn't allow changing the powermanagement setting while connected, also one can only choose between enabled and disabled powersaving with ifconfig (so switching between balanced and low-power mode requires rebooting to change the tunable). * After any changes to powermanagement (i.e. "ifconfig wlan0 powersave" to enable powermanagement, or "ifconfig wlan0 -powersave" for disabling powermanagement), one has to disconnect and reconnect to the accespoint for the change to take effect. Obtained from: dragonflybsd.git d7002a7990d077c92585978ea998474af50f91e0 Added: head/sys/dev/iwm/if_iwm_constants.h (contents, props changed) Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_power.c head/sys/dev/iwm/if_iwm_power.h head/sys/dev/iwm/if_iwmreg.h head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Tue May 9 04:11:53 2017 (r318004) +++ head/sys/dev/iwm/if_iwm.c Tue May 9 04:15:07 2017 (r318005) @@ -4171,6 +4171,12 @@ iwm_auth(struct ieee80211vap *vap, struc "%s: failed to add MAC\n", __func__); goto out; } + if ((error = iwm_mvm_power_update_mac(sc)) != 0) { + device_printf(sc->sc_dev, + "%s: failed to update power management\n", + __func__); + goto out; + } if ((error = iwm_mvm_phy_ctxt_changed(sc, &sc->sc_phyctxt[0], in->in_ni.ni_chan, 1, 1)) != 0) { device_printf(sc->sc_dev, @@ -4582,8 +4588,8 @@ iwm_newstate(struct ieee80211vap *vap, e } in = IWM_NODE(vap->iv_bss); - iwm_mvm_power_mac_update_mode(sc, in); iwm_mvm_enable_beacon_filter(sc, in); + iwm_mvm_power_update_mac(sc); iwm_mvm_update_quotas(sc, in); iwm_setrates(sc, in); @@ -4871,6 +4877,7 @@ iwm_init_hw(struct iwm_softc *sc) * image just loaded */ iwm_stop_device(sc); + sc->sc_ps_disabled = FALSE; if ((error = iwm_start_hw(sc)) != 0) { device_printf(sc->sc_dev, "could not initialize hardware\n"); return error; @@ -6122,6 +6129,7 @@ iwm_attach(device_t dev) IEEE80211_C_STA | IEEE80211_C_WPA | /* WPA/RSN */ IEEE80211_C_WME | + IEEE80211_C_PMGT | IEEE80211_C_SHSLOT | /* short slot time supported */ IEEE80211_C_SHPREAMBLE /* short preamble supported */ // IEEE80211_C_BGSCAN /* capable of bg scanning */ Added: head/sys/dev/iwm/if_iwm_constants.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/iwm/if_iwm_constants.h Tue May 9 04:15:07 2017 (r318005) @@ -0,0 +1,154 @@ +/*- + * Based on BSD-licensed source modules in the Linux iwlwifi driver, + * which were used as the reference documentation for this implementation. + * + ****************************************************************************** + * + * This file is provided under a dual BSD/GPLv2 license. When using or + * redistributing this file, you may do so under either license. + * + * GPL LICENSE SUMMARY + * + * Copyright(c) 2013 - 2014 Intel Corporation. All rights reserved. + * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH + * Copyright(c) 2015 Intel Deutschland GmbH + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, + * USA + * + * The full GNU General Public License is included in this distribution + * in the file called COPYING. + * + * Contact Information: + * Intel Linux Wireless + * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 + * + * BSD LICENSE + * + * Copyright(c) 2013 - 2014 Intel Corporation. All rights reserved. + * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH + * Copyright(c) 2015 Intel Deutschland GmbH + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name Intel Corporation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * 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 MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + *****************************************************************************/ + +/* $FreeBSD$ */ + +#ifndef __IF_IWM_CONSTANTS_H +#define __IF_IWM_CONSTANTS_H + +/* */ + +#define IWM_MVM_DEFAULT_PS_TX_DATA_TIMEOUT (100 * 1000) +#define IWM_MVM_DEFAULT_PS_RX_DATA_TIMEOUT (100 * 1000) +#define IWM_MVM_WOWLAN_PS_TX_DATA_TIMEOUT (10 * 1000) +#define IWM_MVM_WOWLAN_PS_RX_DATA_TIMEOUT (10 * 1000) +#define IWM_MVM_SHORT_PS_TX_DATA_TIMEOUT (2 * 1024) /* defined in TU */ +#define IWM_MVM_SHORT_PS_RX_DATA_TIMEOUT (40 * 1024) /* defined in TU */ +#define IWM_MVM_P2P_LOWLATENCY_PS_ENABLE 0 +#define IWM_MVM_UAPSD_RX_DATA_TIMEOUT (50 * 1000) +#define IWM_MVM_UAPSD_TX_DATA_TIMEOUT (50 * 1000) +#ifdef notyet +/* XXX Find corresponding values from net80211 */ +#define IWM_MVM_UAPSD_QUEUES (IEEE80211_WMM_IE_STA_QOSINFO_AC_VO |\ + IEEE80211_WMM_IE_STA_QOSINFO_AC_VI |\ + IEEE80211_WMM_IE_STA_QOSINFO_AC_BK |\ + IEEE80211_WMM_IE_STA_QOSINFO_AC_BE) +#endif +#define IWM_MVM_PS_HEAVY_TX_THLD_PACKETS 20 +#define IWM_MVM_PS_HEAVY_RX_THLD_PACKETS 8 +#define IWM_MVM_PS_SNOOZE_HEAVY_TX_THLD_PACKETS 30 +#define IWM_MVM_PS_SNOOZE_HEAVY_RX_THLD_PACKETS 20 +#define IWM_MVM_PS_HEAVY_TX_THLD_PERCENT 50 +#define IWM_MVM_PS_HEAVY_RX_THLD_PERCENT 50 +#define IWM_MVM_PS_SNOOZE_INTERVAL 25 +#define IWM_MVM_PS_SNOOZE_WINDOW 50 +#define IWM_MVM_WOWLAN_PS_SNOOZE_WINDOW 25 +#define IWM_MVM_LOWLAT_QUOTA_MIN_PERCENT 64 +#define IWM_MVM_BT_COEX_EN_RED_TXP_THRESH 62 +#define IWM_MVM_BT_COEX_DIS_RED_TXP_THRESH 65 +#define IWM_MVM_BT_COEX_SYNC2SCO 1 +#define IWM_MVM_BT_COEX_CORUNNING 0 +#define IWM_MVM_BT_COEX_MPLUT 1 +#define IWM_MVM_BT_COEX_RRC 1 +#define IWM_MVM_BT_COEX_TTC 1 +#define IWM_MVM_BT_COEX_MPLUT_REG0 0x22002200 +#define IWM_MVM_BT_COEX_MPLUT_REG1 0x11118451 +#define IWM_MVM_BT_COEX_ANTENNA_COUPLING_THRS 30 +#define IWM_MVM_FW_MCAST_FILTER_PASS_ALL 0 +#define IWM_MVM_FW_BCAST_FILTER_PASS_ALL 0 +#define IWM_MVM_QUOTA_THRESHOLD 4 +#define IWM_MVM_RS_RSSI_BASED_INIT_RATE 0 +#define IWM_MVM_RS_80_20_FAR_RANGE_TWEAK 1 +#define IWM_MVM_TOF_IS_RESPONDER 0 +#define IWM_MVM_SW_TX_CSUM_OFFLOAD 0 +#define IWM_MVM_HW_CSUM_DISABLE 0 +#define IWM_MVM_COLLECT_FW_ERR_DUMP 1 +#define IWM_MVM_RS_NUM_TRY_BEFORE_ANT_TOGGLE 1 +#define IWM_MVM_RS_HT_VHT_RETRIES_PER_RATE 2 +#define IWM_MVM_RS_HT_VHT_RETRIES_PER_RATE_TW 1 +#define IWM_MVM_RS_INITIAL_MIMO_NUM_RATES 3 +#define IWM_MVM_RS_INITIAL_SISO_NUM_RATES 3 +#define IWM_MVM_RS_INITIAL_LEGACY_NUM_RATES 2 +#define IWM_MVM_RS_INITIAL_LEGACY_RETRIES 2 +#define IWM_MVM_RS_SECONDARY_LEGACY_RETRIES 1 +#define IWM_MVM_RS_SECONDARY_LEGACY_NUM_RATES 16 +#define IWM_MVM_RS_SECONDARY_SISO_NUM_RATES 3 +#define IWM_MVM_RS_SECONDARY_SISO_RETRIES 1 +#define IWM_MVM_RS_RATE_MIN_FAILURE_TH 3 +#define IWM_MVM_RS_RATE_MIN_SUCCESS_TH 8 +#define IWM_MVM_RS_STAY_IN_COLUMN_TIMEOUT 5 /* Seconds */ +#define IWM_MVM_RS_IDLE_TIMEOUT 5 /* Seconds */ +#define IWM_MVM_RS_MISSED_RATE_MAX 15 +#define IWM_MVM_RS_LEGACY_FAILURE_LIMIT 160 +#define IWM_MVM_RS_LEGACY_SUCCESS_LIMIT 480 +#define IWM_MVM_RS_LEGACY_TABLE_COUNT 160 +#define IWM_MVM_RS_NON_LEGACY_FAILURE_LIMIT 400 +#define IWM_MVM_RS_NON_LEGACY_SUCCESS_LIMIT 4500 +#define IWM_MVM_RS_NON_LEGACY_TABLE_COUNT 1500 +#define IWM_MVM_RS_SR_FORCE_DECREASE 15 /* percent */ +#define IWM_MVM_RS_SR_NO_DECREASE 85 /* percent */ +#define IWM_MVM_RS_AGG_TIME_LIMIT 4000 /* 4 msecs. valid 100-8000 */ +#define IWM_MVM_RS_AGG_DISABLE_START 3 +#define IWM_MVM_RS_TPC_SR_FORCE_INCREASE 75 /* percent */ +#define IWM_MVM_RS_TPC_SR_NO_INCREASE 85 /* percent */ +#define IWM_MVM_RS_TPC_TX_POWER_STEP 3 + +#endif /* __IF_IWM_CONSTANTS_H */ Modified: head/sys/dev/iwm/if_iwm_power.c ============================================================================== --- head/sys/dev/iwm/if_iwm_power.c Tue May 9 04:11:53 2017 (r318004) +++ head/sys/dev/iwm/if_iwm_power.c Tue May 9 04:15:07 2017 (r318005) @@ -138,9 +138,14 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include +static int iwm_power_scheme = IWM_POWER_SCHEME_BPS; + +TUNABLE_INT("hw.iwm.power_scheme", &iwm_power_scheme); + /* * BEGIN mvm/power.c */ @@ -154,7 +159,7 @@ iwm_mvm_beacon_filter_send_cmd(struct iw int ret; ret = iwm_mvm_send_cmd_pdu(sc, IWM_REPLY_BEACON_FILTERING_CMD, - IWM_CMD_SYNC, sizeof(struct iwm_beacon_filter_cmd), cmd); + 0, sizeof(struct iwm_beacon_filter_cmd), cmd); if (!ret) { IWM_DPRINTF(sc, IWM_DEBUG_PWRSAVE | IWM_DEBUG_CMD, @@ -201,24 +206,6 @@ iwm_mvm_beacon_filter_set_cqm_params(str cmd->ba_enable_beacon_abort = htole32(sc->sc_bf.ba_enabled); } -static int -iwm_mvm_update_beacon_abort(struct iwm_softc *sc, struct iwm_node *in, - int enable) -{ - struct iwm_beacon_filter_cmd cmd = { - IWM_BF_CMD_CONFIG_DEFAULTS, - .bf_enable_beacon_filter = htole32(1), - .ba_enable_beacon_abort = htole32(enable), - }; - - if (!sc->sc_bf.bf_enabled) - return 0; - - sc->sc_bf.ba_enabled = enable; - iwm_mvm_beacon_filter_set_cqm_params(sc, in, &cmd); - return iwm_mvm_beacon_filter_send_cmd(sc, &cmd); -} - static void iwm_mvm_power_log(struct iwm_softc *sc, struct iwm_mac_power_cmd *cmd) { @@ -234,6 +221,60 @@ iwm_mvm_power_log(struct iwm_softc *sc, "Disable power management\n"); return; } + + IWM_DPRINTF(sc, IWM_DEBUG_PWRSAVE | IWM_DEBUG_CMD, + "Rx timeout = %u usec\n", le32toh(cmd->rx_data_timeout)); + IWM_DPRINTF(sc, IWM_DEBUG_PWRSAVE | IWM_DEBUG_CMD, + "Tx timeout = %u usec\n", le32toh(cmd->tx_data_timeout)); + if (cmd->flags & htole16(IWM_POWER_FLAGS_SKIP_OVER_DTIM_MSK)) + IWM_DPRINTF(sc, IWM_DEBUG_PWRSAVE | IWM_DEBUG_CMD, + "DTIM periods to skip = %u\n", cmd->skip_dtim_periods); +} + +static boolean_t +iwm_mvm_power_is_radar(struct iwm_softc *sc) +{ + struct ieee80211com *ic = &sc->sc_ic; + struct ieee80211_channel *chan; + boolean_t radar_detect = FALSE; + + chan = ic->ic_bsschan; + if (chan == IEEE80211_CHAN_ANYC || + (chan->ic_flags & IEEE80211_CHAN_DFS) != 0) { + radar_detect = TRUE; + } + + return radar_detect; +} + +static void +iwm_mvm_power_config_skip_dtim(struct iwm_softc *sc, + struct iwm_mac_power_cmd *cmd) +{ + struct ieee80211com *ic = &sc->sc_ic; + struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); + int dtimper = vap->iv_dtim_period ?: 1; + int skip; + + /* disable, in case we're supposed to override */ + cmd->skip_dtim_periods = 0; + cmd->flags &= ~htole16(IWM_POWER_FLAGS_SKIP_OVER_DTIM_MSK); + + if (iwm_mvm_power_is_radar(sc)) + return; + + if (dtimper >= 10) + return; + + /* TODO: check that multicast wake lock is off */ + + if (iwm_power_scheme != IWM_POWER_SCHEME_LP) + return; + skip = 2; + + /* the firmware really expects "look at every X DTIMs", so add 1 */ + cmd->skip_dtim_periods = 1 + skip; + cmd->flags |= htole16(IWM_POWER_FLAGS_SKIP_OVER_DTIM_MSK); } static void @@ -258,45 +299,49 @@ iwm_mvm_power_build_cmd(struct iwm_softc */ dtimper_msec = dtimper * ni->ni_intval; keep_alive - = MAX(3 * dtimper_msec, 1000 * IWM_POWER_KEEP_ALIVE_PERIOD_SEC); + = imax(3 * dtimper_msec, 1000 * IWM_POWER_KEEP_ALIVE_PERIOD_SEC); keep_alive = roundup(keep_alive, 1000) / 1000; cmd->keep_alive_seconds = htole16(keep_alive); + + if (sc->sc_ps_disabled) + return; + + cmd->flags |= htole16(IWM_POWER_FLAGS_POWER_SAVE_ENA_MSK); + cmd->flags |= htole16(IWM_POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK); + + iwm_mvm_power_config_skip_dtim(sc, cmd); + + cmd->rx_data_timeout = + htole32(IWM_MVM_DEFAULT_PS_RX_DATA_TIMEOUT); + cmd->tx_data_timeout = + htole32(IWM_MVM_DEFAULT_PS_TX_DATA_TIMEOUT); } -int -iwm_mvm_power_mac_update_mode(struct iwm_softc *sc, struct iwm_node *in) +static int +iwm_mvm_power_send_cmd(struct iwm_softc *sc, struct iwm_node *in) { - int ret; - int ba_enable; - struct iwm_mac_power_cmd cmd; - - memset(&cmd, 0, sizeof(cmd)); + struct iwm_mac_power_cmd cmd = {}; iwm_mvm_power_build_cmd(sc, in, &cmd); iwm_mvm_power_log(sc, &cmd); - if ((ret = iwm_mvm_send_cmd_pdu(sc, IWM_MAC_PM_POWER_TABLE, - IWM_CMD_SYNC, sizeof(cmd), &cmd)) != 0) - return ret; - - ba_enable = !!(cmd.flags & - htole16(IWM_POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK)); - return iwm_mvm_update_beacon_abort(sc, in, ba_enable); + return iwm_mvm_send_cmd_pdu(sc, IWM_MAC_PM_POWER_TABLE, 0, + sizeof(cmd), &cmd); } -int -iwm_mvm_power_update_device(struct iwm_softc *sc) +static int +_iwm_mvm_enable_beacon_filter(struct iwm_softc *sc, struct iwm_node *in, + struct iwm_beacon_filter_cmd *cmd) { - struct iwm_device_power_cmd cmd = { - .flags = htole16(IWM_DEVICE_POWER_FLAGS_POWER_SAVE_ENA_MSK), - }; + int ret; - cmd.flags |= htole16(IWM_DEVICE_POWER_FLAGS_CAM_MSK); - IWM_DPRINTF(sc, IWM_DEBUG_PWRSAVE | IWM_DEBUG_CMD, - "Sending device power command with flags = 0x%X\n", cmd.flags); + iwm_mvm_beacon_filter_set_cqm_params(sc, in, cmd); + ret = iwm_mvm_beacon_filter_send_cmd(sc, cmd); - return iwm_mvm_send_cmd_pdu(sc, - IWM_POWER_TABLE_CMD, IWM_CMD_SYNC, sizeof(cmd), &cmd); + if (!ret) + sc->sc_bf.bf_enabled = 1; + + return ret; } int @@ -306,15 +351,8 @@ iwm_mvm_enable_beacon_filter(struct iwm_ IWM_BF_CMD_CONFIG_DEFAULTS, .bf_enable_beacon_filter = htole32(1), }; - int ret; - - iwm_mvm_beacon_filter_set_cqm_params(sc, in, &cmd); - ret = iwm_mvm_beacon_filter_send_cmd(sc, &cmd); - if (ret == 0) - sc->sc_bf.bf_enabled = 1; - - return ret; + return _iwm_mvm_enable_beacon_filter(sc, in, &cmd); } int @@ -329,3 +367,105 @@ iwm_mvm_disable_beacon_filter(struct iwm return ret; } + +static int +iwm_mvm_power_set_ps(struct iwm_softc *sc) +{ + struct ieee80211vap *vap = TAILQ_FIRST(&sc->sc_ic.ic_vaps); + boolean_t disable_ps; + int ret; + + /* disable PS if CAM */ + disable_ps = (iwm_power_scheme == IWM_POWER_SCHEME_CAM); + /* ...or if any of the vifs require PS to be off */ + if (vap != NULL && (vap->iv_flags & IEEE80211_F_PMGTON) == 0) + disable_ps = TRUE; + + /* update device power state if it has changed */ + if (sc->sc_ps_disabled != disable_ps) { + boolean_t old_ps_disabled = sc->sc_ps_disabled; + + sc->sc_ps_disabled = disable_ps; + ret = iwm_mvm_power_update_device(sc); + if (ret) { + sc->sc_ps_disabled = old_ps_disabled; + return ret; + } + } + + return 0; +} + +static int +iwm_mvm_power_set_ba(struct iwm_softc *sc, struct iwm_node *in) +{ + struct iwm_beacon_filter_cmd cmd = { + IWM_BF_CMD_CONFIG_DEFAULTS, + .bf_enable_beacon_filter = htole32(1), + }; + + if (!sc->sc_bf.bf_enabled) + return 0; + + sc->sc_bf.ba_enabled = !sc->sc_ps_disabled; + + return _iwm_mvm_enable_beacon_filter(sc, in, &cmd); +} + +int +iwm_mvm_power_update_ps(struct iwm_softc *sc) +{ + struct ieee80211vap *vap = TAILQ_FIRST(&sc->sc_ic.ic_vaps); + int ret; + + ret = iwm_mvm_power_set_ps(sc); + if (ret) + return ret; + + if (vap != NULL) + return iwm_mvm_power_set_ba(sc, IWM_NODE(vap->iv_bss)); + + return 0; +} + +int +iwm_mvm_power_update_mac(struct iwm_softc *sc) +{ + struct ieee80211vap *vap = TAILQ_FIRST(&sc->sc_ic.ic_vaps); + int ret; + + ret = iwm_mvm_power_set_ps(sc); + if (ret) + return ret; + + if (vap != NULL) { + ret = iwm_mvm_power_send_cmd(sc, IWM_NODE(vap->iv_bss)); + if (ret) + return ret; + } + + if (vap != NULL) + return iwm_mvm_power_set_ba(sc, IWM_NODE(vap->iv_bss)); + + return 0; +} + +int +iwm_mvm_power_update_device(struct iwm_softc *sc) +{ + struct iwm_device_power_cmd cmd = { + .flags = 0, + }; + + if (iwm_power_scheme == IWM_POWER_SCHEME_CAM) + sc->sc_ps_disabled = TRUE; + + if (!sc->sc_ps_disabled) + cmd.flags |= htole16(IWM_DEVICE_POWER_FLAGS_POWER_SAVE_ENA_MSK); + + IWM_DPRINTF(sc, IWM_DEBUG_PWRSAVE | IWM_DEBUG_CMD, + "Sending device power command with flags = 0x%X\n", cmd.flags); + + return iwm_mvm_send_cmd_pdu(sc, + IWM_POWER_TABLE_CMD, 0, sizeof(cmd), &cmd); +} Modified: head/sys/dev/iwm/if_iwm_power.h ============================================================================== --- head/sys/dev/iwm/if_iwm_power.h Tue May 9 04:11:53 2017 (r318004) +++ head/sys/dev/iwm/if_iwm_power.h Tue May 9 04:15:07 2017 (r318005) @@ -90,9 +90,9 @@ #ifndef __IF_IWM_POWER_H__ #define __IF_IWM_POWER_H__ -extern int iwm_mvm_power_mac_update_mode(struct iwm_softc *sc, - struct iwm_node *in); extern int iwm_mvm_power_update_device(struct iwm_softc *sc); +extern int iwm_mvm_power_update_mac(struct iwm_softc *sc); +extern int iwm_mvm_power_update_ps(struct iwm_softc *sc); extern int iwm_mvm_enable_beacon_filter(struct iwm_softc *sc, struct iwm_node *in); extern int iwm_mvm_disable_beacon_filter(struct iwm_softc *sc); Modified: head/sys/dev/iwm/if_iwmreg.h ============================================================================== --- head/sys/dev/iwm/if_iwmreg.h Tue May 9 04:11:53 2017 (r318004) +++ head/sys/dev/iwm/if_iwmreg.h Tue May 9 04:15:07 2017 (r318005) @@ -3620,17 +3620,11 @@ struct iwm_powertable_cmd { /** * enum iwm_device_power_flags - masks for device power command flags - * @DEVIC_POWER_FLAGS_POWER_SAVE_ENA_MSK: '1' Allow to save power by turning off - * receiver and transmitter. '0' - does not allow. This flag should be - * always set to '1' unless one need to disable actual power down for debug - * purposes. - * @IWM_DEVICE_POWER_FLAGS_CAM_MSK: '1' CAM (Continuous Active Mode) is set, meaning - * that power management is disabled. '0' Power management is enabled, one - * of power schemes is applied. -*/ + * @IWM_DEVICE_POWER_FLAGS_POWER_SAVE_ENA_MSK: '1' Allow to save power by turning off + * receiver and transmitter. '0' - does not allow. + */ enum iwm_device_power_flags { IWM_DEVICE_POWER_FLAGS_POWER_SAVE_ENA_MSK = (1 << 0), - IWM_DEVICE_POWER_FLAGS_CAM_MSK = (1 << 13), }; /** @@ -6043,6 +6037,12 @@ struct iwm_cmd_header_wide { uint8_t version; } __packed; +/** + * enum iwm_power_scheme + * @IWM_POWER_LEVEL_CAM - Continuously Active Mode + * @IWM_POWER_LEVEL_BPS - Balanced Power Save (default) + * @IWM_POWER_LEVEL_LP - Low Power + */ enum iwm_power_scheme { IWM_POWER_SCHEME_CAM = 1, IWM_POWER_SCHEME_BPS, Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Tue May 9 04:11:53 2017 (r318004) +++ head/sys/dev/iwm/if_iwmvar.h Tue May 9 04:15:07 2017 (r318005) @@ -538,6 +538,9 @@ struct iwm_softc { uint16_t num_of_pages_in_last_blk; boolean_t last_ebs_successful; + + /* Indicate if device power save is allowed */ + boolean_t sc_ps_disabled; }; #define IWM_LOCK_INIT(_sc) \ From owner-svn-src-head@freebsd.org Tue May 9 04:54:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 297A9D64597; Tue, 9 May 2017 04:54:31 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E72D0FC; Tue, 9 May 2017 04:54:30 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v494sTIX044810; Tue, 9 May 2017 04:54:29 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v494sTiR044809; Tue, 9 May 2017 04:54:29 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705090454.v494sTiR044809@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 9 May 2017 04:54:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318006 - head/sys/tests/framework X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 04:54:31 -0000 Author: ngie Date: Tue May 9 04:54:29 2017 New Revision: 318006 URL: https://svnweb.freebsd.org/changeset/base/318006 Log: style(9): sort headers and remove duplicates MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/sys/tests/framework/kern_testfrwk.c Modified: head/sys/tests/framework/kern_testfrwk.c ============================================================================== --- head/sys/tests/framework/kern_testfrwk.c Tue May 9 04:15:07 2017 (r318005) +++ head/sys/tests/framework/kern_testfrwk.c Tue May 9 04:54:29 2017 (r318006) @@ -27,22 +27,20 @@ #include __FBSDID("$FreeBSD$"); -#include -#include #include #include #include #include -#include #include #include #include #include +#include #include #include +#include #include #include -#include #include #include #ifdef SMP From owner-svn-src-head@freebsd.org Tue May 9 04:56:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 205B8D646D4; Tue, 9 May 2017 04:56:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 90E0CD5C; Tue, 9 May 2017 04:56:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v494uE1F044933; Tue, 9 May 2017 04:56:14 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v494uEuH044932; Tue, 9 May 2017 04:56:14 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705090456.v494uEuH044932@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 9 May 2017 04:56:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318007 - head/sys/modules/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 04:56:16 -0000 Author: ngie Date: Tue May 9 04:56:14 2017 New Revision: 318007 URL: https://svnweb.freebsd.org/changeset/base/318007 Log: Add intermediary Makefile for compiling all items in the directory MFC after: 3 weeks Sponsored by: Dell EMC Isilon Added: head/sys/modules/tests/Makefile (contents, props changed) Added: head/sys/modules/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/tests/Makefile Tue May 9 04:56:14 2017 (r318007) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +SUBDIR+= framework +SUBDIR+= .WAIT +SUBDIR+= callout_test + +.include From owner-svn-src-head@freebsd.org Tue May 9 04:59:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 925CAD647DC; Tue, 9 May 2017 04:59:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 490971946; Tue, 9 May 2017 04:59:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v494x5KQ045076; Tue, 9 May 2017 04:59:05 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v494x5dl045075; Tue, 9 May 2017 04:59:05 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705090459.v494x5dl045075@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 9 May 2017 04:59:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318008 - head/sys/modules X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 04:59:06 -0000 Author: ngie Date: Tue May 9 04:59:05 2017 New Revision: 318008 URL: https://svnweb.freebsd.org/changeset/base/318008 Log: Only compile tests/ if MK_TESTS != no or ALL_MODULES is defined MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Tue May 9 04:56:14 2017 (r318007) +++ head/sys/modules/Makefile Tue May 9 04:59:05 2017 (r318008) @@ -356,8 +356,6 @@ SUBDIR= \ sysvipc \ tcp \ ${_ti} \ - tests/framework \ - tests/callout_test \ tl \ tmpfs \ ${_toecore} \ @@ -516,6 +514,10 @@ _rtwnfw= rtwnfw _cxgbe= cxgbe .endif +.if ${MK_TESTS} != "no" || defined(ALL_MODULES) +SUBDIR+= tests +.endif + .if ${MK_ZFS} != "no" || defined(ALL_MODULES) SUBDIR+= zfs .endif From owner-svn-src-head@freebsd.org Tue May 9 05:03:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27703D64C04; Tue, 9 May 2017 05:03:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8E0CC4A; Tue, 9 May 2017 05:03:36 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4953Zq9049093; Tue, 9 May 2017 05:03:35 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4953ZWQ049092; Tue, 9 May 2017 05:03:35 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705090503.v4953ZWQ049092@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 9 May 2017 05:03:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318009 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 05:03:37 -0000 Author: ngie Date: Tue May 9 05:03:35 2017 New Revision: 318009 URL: https://svnweb.freebsd.org/changeset/base/318009 Log: Add MK_TESTS to kern.opts.mk to support r31800 MFC after: 3 weeks MFC with: r318008 Pointyhat to: ngie Sponsored by: Dell EMC Isilon Modified: head/sys/conf/kern.opts.mk Modified: head/sys/conf/kern.opts.mk ============================================================================== --- head/sys/conf/kern.opts.mk Tue May 9 04:59:05 2017 (r318008) +++ head/sys/conf/kern.opts.mk Tue May 9 05:03:35 2017 (r318009) @@ -41,6 +41,7 @@ __DEFAULT_YES_OPTIONS = \ PF \ SOURCELESS_HOST \ SOURCELESS_UCODE \ + TESTS \ USB_GADGET_EXAMPLES \ ZFS From owner-svn-src-head@freebsd.org Tue May 9 05:06:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C32FD64CDF; Tue, 9 May 2017 05:06:20 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CD43118A2; Tue, 9 May 2017 05:06:19 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from freyja.zeit4.iv.bundesimmobilien.de ([87.138.105.249]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Md3Eg-1dQ2AC45x4-00IHYK; Tue, 09 May 2017 07:06:11 +0200 Date: Tue, 9 May 2017 07:06:02 +0200 From: "O. Hartmann" To: Ngie Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318008 - head/sys/modules Message-ID: <20170509070602.22e979b0@freyja.zeit4.iv.bundesimmobilien.de> In-Reply-To: <201705090459.v494x5dl045075@repo.freebsd.org> References: <201705090459.v494x5dl045075@repo.freebsd.org> Organization: Walstatt X-Mailer: Claws Mail 3.15.0 (GTK+ 2.24.31; amd64-portbld-freebsd12.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:lyq5onSlu7jPoDk+VxCOuo4a3M4q288hsVYhCTCpLO3Zu+mG4wv eKiZUuAc3ns+2/ZxnY7rC1nppM69NKqyZeyhB2x4Rjos+41KhAWH6alh+nNtESLIqzcKezo h4WN+kiUmBMSgdSRaAcUko0COo+FlXegSu8ZUNfFnyghenVegKDJDohBQrPhGGnCzmtQhw/ MNnzVklQWxA8jSTtDrqPQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:Lhh93Ct1gDc=:VjUHFor1MteJb8YVnrj0l/ k9w/LC9xGJm8er+D0Lg/pkVkwGvHOH/gt6fA/BBdR6W8xdKNwu8VNepHiQ5exfJSl60MyO/q9 +oHqj6IIzhohyIOBBIZhqCWf8EcFdFClKfv5pWAkyrmKlF6lytjyvg0ZdJbvXAiOWSjuCaO/d qrWJIPV6qKos88PIeh5UtVQAiF7f0tgt01wWy0vk3gEjvAhjHYSYdHnK6OF5blYkDNenxEOF5 lO1qbcdLOoJVEDImKfBzr77h+fmXz6/3hAnwxGFCHt0lquxr8vlF27m0N8g6uZcPPWz3iVt9s ShNj72ng4VizTJJywM2bgLqybly5WL7fbRp8upyqqsv9xRG9dwYy/T/hue+NLjQsHARUPuLv2 pu8+kWH0VR8m7L86Hwh3QQjsuYk3hpJNjF/wyS46tlK6wP1viWkOOvV9Aw3kWWki2JvyrZeOc lNou5Jpm+pkNlv90Lw6IVt7xtGk/+R9j+aZgDy3wXj9cEpet4us5V1tw9dQczAf+2iInfURE3 83zhalEVIB/YRGjSZuuredcgp0ZJnRMwoyT7BJzBBOBfOu1vjYJ76RVclQt08+gaEyOdKpdPH MwZHdmJWHpHwAmjceHEcWjX3Y4A/lHwJEHp3dEu5T5dWgqDJPeN7VSyoHlz7+9duaJbg2s081 nL9z2clGC7Hx6x2BZLN5LynECxqTSxWJuvvn9ttTDBVDKyeLjR5FU99zEyWdWNNTX6I/7F1OB pWsbTYcGFmpeJwN+lv30a8MRxH9qN7a7wDrWqDaoUt2o9Rh5RaxjwumoiDlc9Bi64hg7AP3Zi ow2dth5 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 05:06:20 -0000 On Tue, 9 May 2017 04:59:05 +0000 (UTC) Ngie Cooper wrote: > Author: ngie > Date: Tue May 9 04:59:05 2017 > New Revision: 318008 > URL: https://svnweb.freebsd.org/changeset/base/318008 > > Log: > Only compile tests/ if MK_TESTS != no or ALL_MODULES is defined > > MFC after: 3 weeks > Sponsored by: Dell EMC Isilon > > Modified: > head/sys/modules/Makefile > > Modified: head/sys/modules/Makefile > ============================================================================== > --- head/sys/modules/Makefile Tue May 9 04:56:14 2017 (r318007) > +++ head/sys/modules/Makefile Tue May 9 04:59:05 2017 (r318008) > @@ -356,8 +356,6 @@ SUBDIR= \ > sysvipc \ > tcp \ > ${_ti} \ > - tests/framework \ > - tests/callout_test \ > tl \ > tmpfs \ > ${_toecore} \ > @@ -516,6 +514,10 @@ _rtwnfw= rtwnfw > _cxgbe= cxgbe > .endif > > +.if ${MK_TESTS} != "no" || defined(ALL_MODULES) > +SUBDIR+= tests > +.endif > + > .if ${MK_ZFS} != "no" || defined(ALL_MODULES) > SUBDIR+= zfs > .endif > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" Ooopsie ... ;-) Something went wrong after I sucked in this commit just a few seconds ago, compiling kernel failed: [...] usr/src/sys" WITH_EXTRA_TCP_STACKS="YES" make obj make[3]: "/usr/src/sys/modules/Makefile" line 517: Malformed conditional (${MK_TESTS} != "no" || defined(ALL_MODULES)) make[3]: Fatal errors encountered -- cannot continue make[3]: stopped in /usr/src/sys/modules .ERROR_TARGET='' .ERROR_META_FILE='' .MAKE.LEVEL='3' MAKEFILE='' .MAKE.MODE='meta missing-filemon=yes missing-meta=yes silent=yes verbose' .CURDIR='/usr/src/sys/modules' .MAKE='make' .OBJDIR='/usr/obj/usr/src/sys/FREYJA/modules/usr/src/sys/modules' .TARGETS='obj' DESTDIR='' From owner-svn-src-head@freebsd.org Tue May 9 05:08:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C116FD64E45; Tue, 9 May 2017 05:08:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 377BF1568; Tue, 9 May 2017 05:08:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4958mTe049301; Tue, 9 May 2017 05:08:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4958mKe049300; Tue, 9 May 2017 05:08:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705090508.v4958mKe049300@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 9 May 2017 05:08:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318010 - head/sys/tests/callout_test X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 05:08:49 -0000 Author: ngie Date: Tue May 9 05:08:47 2017 New Revision: 318010 URL: https://svnweb.freebsd.org/changeset/base/318010 Log: style(9): sort headers MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/sys/tests/callout_test/callout_test.c Modified: head/sys/tests/callout_test/callout_test.c ============================================================================== --- head/sys/tests/callout_test/callout_test.c Tue May 9 05:03:35 2017 (r318009) +++ head/sys/tests/callout_test/callout_test.c Tue May 9 05:08:47 2017 (r318010) @@ -27,23 +27,23 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include +#include +#include #include #include #include +#include +#include #include #include #include #include -#include +#include #include -#include #include -#include -#include -#include -#include #include #include #include From owner-svn-src-head@freebsd.org Tue May 9 05:09:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE366D64ECB; Tue, 9 May 2017 05:09:37 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x241.google.com (mail-pf0-x241.google.com [IPv6:2607:f8b0:400e:c00::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4EE20188B; Tue, 9 May 2017 05:09:37 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x241.google.com with SMTP id b23so12366724pfc.0; Mon, 08 May 2017 22:09:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=lj9mz0t8eC1Nhq04c1pOjeDaPnJZ3A+gYe7es7gStlk=; b=htX6tEY+Aqt2awnxPSqF4DNSAWWY1lxUBgnD33Ok5Nm34oTWMoZzMjWXdX2tNgwBXc RRxugZzvyk19j23/SGacqfK4jttQIlxIVeBsFdawynAykuYp49k4B8EUW5ILAx61YYmD f1odHsCDwEYV5Kqvj9Hc1r6A8ZvVrWU2jYkd00x2WbnG0uk3DNS4HQB0dpQS/DuwxPXf whp1w+pxA+2rEkziiCh70uv/Mhqzzk+a48b5EqmZmanf9XwFga1f+Wf3mqinbojz3aRM 7ds7H/ZFTGFglsRLC9KO/f8NfzVRqb0rtDgnR6aOfBVgxC7pjbJncakFW145grww0jso f3HA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=lj9mz0t8eC1Nhq04c1pOjeDaPnJZ3A+gYe7es7gStlk=; b=uZELTpC052j0a7A/oRm/HKz8Tce9tWX5AIEGzOxMVccR/b9hbMgOyTRrrqMQ+C0Jmr kfJGRl7aEjNdCoDelm72mEuk//PkmvJagc1ScJfcKvo32lqpPGm4Nr2+1u+M5/7SiGck HDy8nYsEOH+A8aYzt/cb7vVg4LDPbFIfjukd5+NGGdU7Mi6IpY0wXSu7xbxfTQau50p4 jvIsFIEh70Z+hxErKZHRQ6oZheEuyrHdYK/ip040XFDMzSSjWs9oK5OgpJ+qxLzE2cdd 4TAcqwO9JISEwgCpb7xG9HhLgkrFac9cC+hqrLMymwQPZY577cll/ZbOktZD2Wd7dq2B 9ydQ== X-Gm-Message-State: AN3rC/4n+Lzr+j8pVUdsEGUZIHiaGeTrPMBIV+NzJX1mq1QOnKdnV1UI GL2f3LwtezNaXt+3auY= X-Received: by 10.99.108.6 with SMTP id h6mr21878405pgc.188.1494306576520; Mon, 08 May 2017 22:09:36 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id u67sm18299574pgb.24.2017.05.08.22.09.35 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 May 2017 22:09:35 -0700 (PDT) Subject: Re: svn commit: r318008 - head/sys/modules Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_AB9B0B4B-4CED-4088-B5D5-98DF3C582613"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <20170509070602.22e979b0@freyja.zeit4.iv.bundesimmobilien.de> Date: Mon, 8 May 2017 22:09:34 -0700 Cc: Ngie Cooper , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <939F76F2-0B90-4BE1-BD3C-3E371E943810@gmail.com> References: <201705090459.v494x5dl045075@repo.freebsd.org> <20170509070602.22e979b0@freyja.zeit4.iv.bundesimmobilien.de> To: "O. Hartmann" X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 05:09:37 -0000 --Apple-Mail=_AB9B0B4B-4CED-4088-B5D5-98DF3C582613 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On May 8, 2017, at 22:06, O. Hartmann wrote: >=20 > On Tue, 9 May 2017 04:59:05 +0000 (UTC) > Ngie Cooper wrote: =E2=80=A6 > Ooopsie ... ;-) >=20 > Something went wrong after I sucked in this commit just a few seconds = ago, > compiling kernel failed: You=E2=80=99re fast. Fixed in r318009 5 minutes ago. -Ngie --Apple-Mail=_AB9B0B4B-4CED-4088-B5D5-98DF3C582613 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJZEU8PAAoJEPWDqSZpMIYVh5AP/jD2+ezYRhuUKuEXic7sXIbY U05I3QU9UxdzhZJluNfCCHl1LoCeTd1fHMG0tb1QJaH+96Kiu7d5Dpa9BziltDMu Sux5/vxLito9tq9thaNT5O5WazoZrzoXSmDH1A6OXddsbMWAP1bzQQs6zg7g8RJD 8+p4rArX3K8/Emlacl9XBKEoqILw8iqdiieB3DbnmWLTjKZ1Sf2c7K73ui/zLCYN rBYsjmhN7oKUO7P7uAvkR+fpYFI3bODrqeyzJtMCyTLnPQxbD/xVQ0yGhT24vfeL nlIRkmLTDKYV+Dfo4zXmnm0n+H7YZeIR3TMl0z+fxdX7eZdXkauUsUM4nQmumJ+x R2tZcEAiOLxzwqgrbHihsiAlgk3bjkT4zNSZQGXd7zzv0H8xke6BcyU2DcCgLVzF UvIH5jQzmJCs1j7HBNrDD5u3t/4yGmBqoT370zUXvocbGg89wh/uxfa61nyjySNW q8Dr1kJOWrM9PSLuVufSpD2Lj841Tgvupwl7azWjtnqRQt2Jb/GHkn8itMH0nfhH 7ZwdTjNX/NrYd8MduVgg33e3iz2hgkEGSweK+oBrIZFX3J15YGvaNufK0fcnV2Gv L6MwbnNFfPcln5aAEGnzGYbHc9naDNKtmUI7ggqDR6N4ZEIwbq9MCID9HIgpOpS3 1B0dJ2R01MKFGRAp4IcI =xpPe -----END PGP SIGNATURE----- --Apple-Mail=_AB9B0B4B-4CED-4088-B5D5-98DF3C582613-- From owner-svn-src-head@freebsd.org Tue May 9 05:22:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9673DD632F6; Tue, 9 May 2017 05:22:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A0011A8; Tue, 9 May 2017 05:22:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v495Mp5J057057; Tue, 9 May 2017 05:22:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v495MpXJ057056; Tue, 9 May 2017 05:22:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705090522.v495MpXJ057056@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 9 May 2017 05:22:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318011 - head/sys/modules/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 05:22:52 -0000 Author: ngie Date: Tue May 9 05:22:51 2017 New Revision: 318011 URL: https://svnweb.freebsd.org/changeset/base/318011 Log: Mark this Makefile SUBDIR_PARALLEL I inserted the necessary SUBDIR+= .WAIT in the previous commit MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/sys/modules/tests/Makefile Modified: head/sys/modules/tests/Makefile ============================================================================== --- head/sys/modules/tests/Makefile Tue May 9 05:08:47 2017 (r318010) +++ head/sys/modules/tests/Makefile Tue May 9 05:22:51 2017 (r318011) @@ -4,4 +4,6 @@ SUBDIR+= framework SUBDIR+= .WAIT SUBDIR+= callout_test +SUBDIR_PARALLEL= + .include From owner-svn-src-head@freebsd.org Tue May 9 05:31:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC799D63402; Tue, 9 May 2017 05:31:40 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68A6AB37; Tue, 9 May 2017 05:31:40 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v495VdrR057415; Tue, 9 May 2017 05:31:39 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v495Vdw3057411; Tue, 9 May 2017 05:31:39 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705090531.v495Vdw3057411@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 9 May 2017 05:31:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318012 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 05:31:41 -0000 Author: adrian Date: Tue May 9 05:31:38 2017 New Revision: 318012 URL: https://svnweb.freebsd.org/changeset/base/318012 Log: [iwm] Allow listening on both chains/atennas to get diversity. This might improve throughput slightly when far from the accesspoint, apparently by allowing the firmware to listen on either of the two antennas (if there are two, i.e. on 7260/7265/8260), whichever has a better reception. Obtained from: dragonflybsd.git 3b7fc5aac51f81062da0a2c8fdac23e683fbd548 Modified: head/sys/dev/iwm/if_iwm_phy_ctxt.c head/sys/dev/iwm/if_iwm_util.c head/sys/dev/iwm/if_iwm_util.h Modified: head/sys/dev/iwm/if_iwm_phy_ctxt.c ============================================================================== --- head/sys/dev/iwm/if_iwm_phy_ctxt.c Tue May 9 05:22:51 2017 (r318011) +++ head/sys/dev/iwm/if_iwm_phy_ctxt.c Tue May 9 05:31:38 2017 (r318012) @@ -218,6 +218,18 @@ iwm_mvm_phy_ctxt_cmd_data(struct iwm_sof idle_cnt = chains_static; active_cnt = chains_dynamic; + /* In scenarios where we only ever use a single-stream rates, + * i.e. legacy 11b/g/a associations, single-stream APs or even + * static SMPS, enable both chains to get diversity, improving + * the case where we're far enough from the AP that attenuation + * between the two antennas is sufficiently different to impact + * performance. + */ + if (active_cnt == 1 && iwm_mvm_rx_diversity_allowed(sc)) { + idle_cnt = 2; + active_cnt = 2; + } + cmd->rxchain_info = htole32(iwm_mvm_get_valid_rx_ant(sc) << IWM_PHY_RX_CHAIN_VALID_POS); cmd->rxchain_info |= htole32(idle_cnt << IWM_PHY_RX_CHAIN_CNT_POS); Modified: head/sys/dev/iwm/if_iwm_util.c ============================================================================== --- head/sys/dev/iwm/if_iwm_util.c Tue May 9 05:22:51 2017 (r318011) +++ head/sys/dev/iwm/if_iwm_util.c Tue May 9 05:31:38 2017 (r318012) @@ -153,6 +153,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -487,3 +488,17 @@ iwm_dma_contig_free(struct iwm_dma_info dma->tag = NULL; } } + +boolean_t +iwm_mvm_rx_diversity_allowed(struct iwm_softc *sc) +{ + if (num_of_ant(iwm_mvm_get_valid_rx_ant(sc)) == 1) + return FALSE; + + /* + * XXX Also return FALSE when SMPS (Spatial Multiplexing Powersave) + * is used on any vap (in the future). + */ + + return TRUE; +} Modified: head/sys/dev/iwm/if_iwm_util.h ============================================================================== --- head/sys/dev/iwm/if_iwm_util.h Tue May 9 05:22:51 2017 (r318011) +++ head/sys/dev/iwm/if_iwm_util.h Tue May 9 05:31:38 2017 (r318012) @@ -120,6 +120,8 @@ extern int iwm_dma_contig_alloc(bus_dma_ bus_size_t size, bus_size_t alignment); extern void iwm_dma_contig_free(struct iwm_dma_info *); +extern boolean_t iwm_mvm_rx_diversity_allowed(struct iwm_softc *sc); + extern uint8_t iwm_ridx2rate(struct ieee80211_rateset *rs, int ridx); static inline uint8_t From owner-svn-src-head@freebsd.org Tue May 9 05:32:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6509D63610; Tue, 9 May 2017 05:32:37 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 14796EE3; Tue, 9 May 2017 05:32:36 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v495Wagm061164; Tue, 9 May 2017 05:32:36 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v495WZ3b061160; Tue, 9 May 2017 05:32:35 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705090532.v495WZ3b061160@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 9 May 2017 05:32:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318013 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 05:32:38 -0000 Author: adrian Date: Tue May 9 05:32:35 2017 New Revision: 318013 URL: https://svnweb.freebsd.org/changeset/base/318013 Log: [iwm] Move in_phyctxt from struct iwm_node to phy_ctxt in struct iwm_vap. * This better matches how things are organized in Linux's iwlwifi. Obtained from: dragonflybsd.git 0cf16dd2e0e09a3e5140e50222ac2e69bcdb19a2 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_binding.c head/sys/dev/iwm/if_iwm_binding.h head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Tue May 9 05:31:38 2017 (r318012) +++ head/sys/dev/iwm/if_iwm.c Tue May 9 05:32:35 2017 (r318013) @@ -355,7 +355,7 @@ static int iwm_mvm_add_int_sta_common(st struct iwm_int_sta *, const uint8_t *, uint16_t, uint16_t); static int iwm_mvm_add_aux_sta(struct iwm_softc *); -static int iwm_mvm_update_quotas(struct iwm_softc *, struct iwm_node *); +static int iwm_mvm_update_quotas(struct iwm_softc *, struct iwm_vap *); static int iwm_auth(struct ieee80211vap *, struct iwm_softc *); static int iwm_assoc(struct ieee80211vap *, struct iwm_softc *); static int iwm_release(struct iwm_softc *, struct iwm_node *); @@ -1286,6 +1286,7 @@ iwm_stop_device(struct iwm_softc *sc) */ if (vap) { struct iwm_vap *iv = IWM_VAP(vap); + iv->phy_ctxt = NULL; iv->is_uploaded = 0; } @@ -4014,7 +4015,7 @@ iwm_mvm_add_aux_sta(struct iwm_softc *sc */ static int -iwm_mvm_update_quotas(struct iwm_softc *sc, struct iwm_node *in) +iwm_mvm_update_quotas(struct iwm_softc *sc, struct iwm_vap *ivp) { struct iwm_time_quota_cmd cmd; int i, idx, ret, num_active_macs, quota, quota_rem; @@ -4025,10 +4026,10 @@ iwm_mvm_update_quotas(struct iwm_softc * memset(&cmd, 0, sizeof(cmd)); /* currently, PHY ID == binding ID */ - if (in) { - id = in->in_phyctxt->id; + if (ivp) { + id = ivp->phy_ctxt->id; KASSERT(id < IWM_MAX_BINDINGS, ("invalid id")); - colors[id] = in->in_phyctxt->color; + colors[id] = ivp->phy_ctxt->color; if (1) n_ifs[id] = 1; @@ -4153,9 +4154,9 @@ iwm_auth(struct ieee80211vap *vap, struc "%s: failed update phy ctxt\n", __func__); goto out; } - in->in_phyctxt = &sc->sc_phyctxt[0]; + iv->phy_ctxt = &sc->sc_phyctxt[0]; - if ((error = iwm_mvm_binding_update(sc, in)) != 0) { + if ((error = iwm_mvm_binding_update(sc, iv)) != 0) { device_printf(sc->sc_dev, "%s: binding update cmd\n", __func__); goto out; @@ -4184,9 +4185,9 @@ iwm_auth(struct ieee80211vap *vap, struc error = ETIMEDOUT; goto out; } - in->in_phyctxt = &sc->sc_phyctxt[0]; + iv->phy_ctxt = &sc->sc_phyctxt[0]; - if ((error = iwm_mvm_binding_add_vif(sc, in)) != 0) { + if ((error = iwm_mvm_binding_add_vif(sc, iv)) != 0) { device_printf(sc->sc_dev, "%s: binding add cmd\n", __func__); goto out; @@ -4590,7 +4591,7 @@ iwm_newstate(struct ieee80211vap *vap, e in = IWM_NODE(vap->iv_bss); iwm_mvm_enable_beacon_filter(sc, in); iwm_mvm_power_update_mac(sc); - iwm_mvm_update_quotas(sc, in); + iwm_mvm_update_quotas(sc, ivp); iwm_setrates(sc, in); cmd.data[0] = &in->in_lq; @@ -5761,7 +5762,6 @@ iwm_intr(void *arg) device_printf(sc->sc_dev, "%s: controller panicked, iv_state = %d; " "restarting\n", __func__, vap->iv_state); - /* XXX TODO: turn this into a callout/taskqueue */ ieee80211_restart_all(ic); return; } Modified: head/sys/dev/iwm/if_iwm_binding.c ============================================================================== --- head/sys/dev/iwm/if_iwm_binding.c Tue May 9 05:31:38 2017 (r318012) +++ head/sys/dev/iwm/if_iwm_binding.c Tue May 9 05:32:35 2017 (r318013) @@ -162,10 +162,10 @@ __FBSDID("$FreeBSD$"); */ int -iwm_mvm_binding_cmd(struct iwm_softc *sc, struct iwm_node *in, uint32_t action) +iwm_mvm_binding_cmd(struct iwm_softc *sc, struct iwm_vap *ivp, uint32_t action) { struct iwm_binding_cmd cmd; - struct iwm_mvm_phy_ctxt *phyctxt = in->in_phyctxt; + struct iwm_mvm_phy_ctxt *phyctxt = ivp->phy_ctxt; int i, ret; uint32_t status; @@ -204,13 +204,13 @@ iwm_mvm_binding_cmd(struct iwm_softc *sc } int -iwm_mvm_binding_update(struct iwm_softc *sc, struct iwm_node *in) +iwm_mvm_binding_update(struct iwm_softc *sc, struct iwm_vap *ivp) { - return iwm_mvm_binding_cmd(sc, in, IWM_FW_CTXT_ACTION_MODIFY); + return iwm_mvm_binding_cmd(sc, ivp, IWM_FW_CTXT_ACTION_MODIFY); } int -iwm_mvm_binding_add_vif(struct iwm_softc *sc, struct iwm_node *in) +iwm_mvm_binding_add_vif(struct iwm_softc *sc, struct iwm_vap *ivp) { - return iwm_mvm_binding_cmd(sc, in, IWM_FW_CTXT_ACTION_ADD); + return iwm_mvm_binding_cmd(sc, ivp, IWM_FW_CTXT_ACTION_ADD); } Modified: head/sys/dev/iwm/if_iwm_binding.h ============================================================================== --- head/sys/dev/iwm/if_iwm_binding.h Tue May 9 05:31:38 2017 (r318012) +++ head/sys/dev/iwm/if_iwm_binding.h Tue May 9 05:32:35 2017 (r318013) @@ -105,9 +105,9 @@ #ifndef __IF_IWM_BINDING_H__ #define __IF_IWM_BINDING_H__ -extern int iwm_mvm_binding_cmd(struct iwm_softc *sc, struct iwm_node *in, +extern int iwm_mvm_binding_cmd(struct iwm_softc *sc, struct iwm_vap *ivp, uint32_t action); -extern int iwm_mvm_binding_update(struct iwm_softc *sc, struct iwm_node *in); -extern int iwm_mvm_binding_add_vif(struct iwm_softc *sc, struct iwm_node *in); +extern int iwm_mvm_binding_update(struct iwm_softc *sc, struct iwm_vap *ivp); +extern int iwm_mvm_binding_add_vif(struct iwm_softc *sc, struct iwm_vap *ivp); #endif /* __IF_IWM_BINDING_H__ */ Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Tue May 9 05:31:38 2017 (r318012) +++ head/sys/dev/iwm/if_iwmvar.h Tue May 9 05:32:35 2017 (r318013) @@ -373,12 +373,13 @@ struct iwm_vap { int (*iv_newstate)(struct ieee80211vap *, enum ieee80211_state, int); + + struct iwm_mvm_phy_ctxt *phy_ctxt; }; #define IWM_VAP(_vap) ((struct iwm_vap *)(_vap)) struct iwm_node { struct ieee80211_node in_ni; - struct iwm_mvm_phy_ctxt *in_phyctxt; /* status "bits" */ int in_assoc; From owner-svn-src-head@freebsd.org Tue May 9 08:08:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90556D65BA8; Tue, 9 May 2017 08:08:30 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B62A1E62; Tue, 9 May 2017 08:08:30 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4988T4M023307; Tue, 9 May 2017 08:08:29 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4988TG7023305; Tue, 9 May 2017 08:08:29 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705090808.v4988TG7023305@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 9 May 2017 08:08:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318014 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 08:08:30 -0000 Author: np Date: Tue May 9 08:08:28 2017 New Revision: 318014 URL: https://svnweb.freebsd.org/changeset/base/318014 Log: cxgbe(4): Fixes related to the knob that controls link autonegotiation. - Do not leak the adapter lock in sysctl_autoneg. - Accept only 0 or 1 as valid settings for autonegotiation. - A fixed speed must be requested by the driver when autonegotiation is disabled otherwise the firmware will reject the l1cfg command. Use the top speed supported by the port for now. MFC after: 3 days Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Tue May 9 05:32:35 2017 (r318013) +++ head/sys/dev/cxgbe/adapter.h Tue May 9 08:08:28 2017 (r318014) @@ -1086,6 +1086,24 @@ port_top_speed(const struct port_info *p } static inline int +port_top_speed_raw(const struct port_info *pi) +{ + + if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_100G) + return (FW_PORT_CAP_SPEED_100G); + if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_40G) + return (FW_PORT_CAP_SPEED_40G); + if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_25G) + return (FW_PORT_CAP_SPEED_25G); + if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_10G) + return (FW_PORT_CAP_SPEED_10G); + if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_1G) + return (FW_PORT_CAP_SPEED_1G); + + return (0); +} + +static inline int tx_resume_threshold(struct sge_eq *eq) { Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Tue May 9 05:32:35 2017 (r318013) +++ head/sys/dev/cxgbe/t4_main.c Tue May 9 08:08:28 2017 (r318014) @@ -995,6 +995,7 @@ t4_attach(device_t dev) lc->autoneg = t4_autoneg ? AUTONEG_ENABLE : AUTONEG_DISABLE; } + lc->requested_speed = port_top_speed_raw(pi); rc = -t4_link_l1cfg(sc, sc->mbox, pi->tx_chan, lc); if (rc != 0) { @@ -5883,7 +5884,12 @@ sysctl_autoneg(SYSCTL_HANDLER_ARGS) if ((lc->supported & FW_PORT_CAP_ANEG) == 0) return (ENOTSUP); - val = val ? AUTONEG_ENABLE : AUTONEG_DISABLE; + if (val == 0) + val = AUTONEG_DISABLE; + else if (val == 1) + val = AUTONEG_ENABLE; + else + return (EINVAL); if (lc->autoneg == val) return (0); /* no change */ @@ -5896,6 +5902,7 @@ sysctl_autoneg(SYSCTL_HANDLER_ARGS) rc = -t4_link_l1cfg(sc, sc->mbox, pi->tx_chan, lc); if (rc != 0) lc->autoneg = old; + end_synchronized_op(sc, 0); return (rc); } From owner-svn-src-head@freebsd.org Tue May 9 08:29:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28BCCD64294; Tue, 9 May 2017 08:29:57 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C473C1C08; Tue, 9 May 2017 08:29:56 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v498TtuV031888; Tue, 9 May 2017 08:29:55 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v498TtXb031887; Tue, 9 May 2017 08:29:55 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201705090829.v498TtXb031887@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Tue, 9 May 2017 08:29:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318015 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 08:29:57 -0000 Author: bz Date: Tue May 9 08:29:55 2017 New Revision: 318015 URL: https://svnweb.freebsd.org/changeset/base/318015 Log: Adjust a comment. MFC after: 3 days Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Tue May 9 08:08:28 2017 (r318014) +++ head/sys/net/iflib.c Tue May 9 08:29:55 2017 (r318015) @@ -5214,7 +5214,6 @@ iflib_msix_init(if_ctx_t ctx) /* * bar == -1 => "trust me I know what I'm doing" - * https://www.youtube.com/watch?v=nnwWKkNau4I * Some drivers are for hardware that is so shoddily * documented that no one knows which bars are which * so the developer has to map all bars. This hack From owner-svn-src-head@freebsd.org Tue May 9 08:31:35 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFDDED6440D; Tue, 9 May 2017 08:31:35 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92F0514BB; Tue, 9 May 2017 08:31:35 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v498VYxo033429; Tue, 9 May 2017 08:31:34 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v498VY6a033428; Tue, 9 May 2017 08:31:34 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705090831.v498VY6a033428@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 9 May 2017 08:31:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318016 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 08:31:36 -0000 Author: trasz Date: Tue May 9 08:31:34 2017 New Revision: 318016 URL: https://svnweb.freebsd.org/changeset/base/318016 Log: Fix mistake introduced to uart(4) man page in r317463. MFC after: 2 weeks Modified: head/share/man/man4/uart.4 Modified: head/share/man/man4/uart.4 ============================================================================== --- head/share/man/man4/uart.4 Tue May 9 08:29:55 2017 (r318015) +++ head/share/man/man4/uart.4 Tue May 9 08:31:34 2017 (r318016) @@ -233,7 +233,7 @@ for callin ports .It Pa /dev/ttyu?.lock corresponding callin initial-state and lock-state devices .Pp -.It Pa /dev/cuau* +.It Pa /dev/cuau? for callout ports .It Pa /dev/cuau?.init .It Pa /dev/cuau?.lock From owner-svn-src-head@freebsd.org Tue May 9 08:36:13 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80848D64668; Tue, 9 May 2017 08:36:13 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3C7A62C; Tue, 9 May 2017 08:36:12 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v498aB2n035798; Tue, 9 May 2017 08:36:11 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v498a9JJ035778; Tue, 9 May 2017 08:36:09 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705090836.v498a9JJ035778@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 9 May 2017 08:36:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318017 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 08:36:13 -0000 Author: trasz Date: Tue May 9 08:36:09 2017 New Revision: 318017 URL: https://svnweb.freebsd.org/changeset/base/318017 Log: Fix device paths for USB serial adapters: the formatting strings contain "%u", differently from eg uart(4) which uses "%r". Suggested by: bde@ MFC after: 2 weeks Modified: head/share/man/man4/u3g.4 head/share/man/man4/uark.4 head/share/man/man4/ubsa.4 head/share/man/man4/ubser.4 head/share/man/man4/uchcom.4 head/share/man/man4/ucom.4 head/share/man/man4/ucycom.4 head/share/man/man4/uftdi.4 head/share/man/man4/uipaq.4 head/share/man/man4/umcs.4 head/share/man/man4/umct.4 head/share/man/man4/umodem.4 head/share/man/man4/umoscom.4 head/share/man/man4/uplcom.4 head/share/man/man4/uslcom.4 head/share/man/man4/uvisor.4 head/share/man/man4/uvscom.4 Modified: head/share/man/man4/u3g.4 ============================================================================== --- head/share/man/man4/u3g.4 Tue May 9 08:31:34 2017 (r318016) +++ head/share/man/man4/u3g.4 Tue May 9 08:36:09 2017 (r318017) @@ -98,17 +98,17 @@ See and .Xr usb_quirk 4 . .Sh FILES -.Bl -tag -width "/dev/ttyU?.?.init" -compact -.It Pa /dev/ttyU?.? +.Bl -tag -width "/dev/ttyU*.*.init" -compact +.It Pa /dev/ttyU*.* for callin ports -.It Pa /dev/ttyU?.?.init -.It Pa /dev/ttyU?.?.lock +.It Pa /dev/ttyU*.*.init +.It Pa /dev/ttyU*.*.lock corresponding callin initial-state and lock-state devices .Pp -.It Pa /dev/cuaU?.? +.It Pa /dev/cuaU*.* for callout ports -.It Pa /dev/cuaU?.?.init -.It Pa /dev/cuaU?.?.lock +.It Pa /dev/cuaU*.*.init +.It Pa /dev/cuaU*.*.lock corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO Modified: head/share/man/man4/uark.4 ============================================================================== --- head/share/man/man4/uark.4 Tue May 9 08:31:34 2017 (r318016) +++ head/share/man/man4/uark.4 Tue May 9 08:36:09 2017 (r318017) @@ -58,17 +58,17 @@ KQ-U8A Data Cable Skymaster USB to RS232 .El .Sh FILES -.Bl -tag -width "/dev/ttyU?.init" -compact -.It Pa /dev/ttyU? +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* for callin ports -.It Pa /dev/ttyU?.init -.It Pa /dev/ttyU?.lock +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock corresponding callin initial-state and lock-state devices .Pp -.It Pa /dev/cuaU? +.It Pa /dev/cuaU* for callout ports -.It Pa /dev/cuaU?.init -.It Pa /dev/cuaU?.lock +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO Modified: head/share/man/man4/ubsa.4 ============================================================================== --- head/share/man/man4/ubsa.4 Tue May 9 08:31:34 2017 (r318016) +++ head/share/man/man4/ubsa.4 Tue May 9 08:36:09 2017 (r318017) @@ -82,17 +82,17 @@ GoHubs GoCOM232 Peracom single port serial adapter .El .Sh FILES -.Bl -tag -width "/dev/ttyU?.init" -compact -.It Pa /dev/ttyU? +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* for callin ports -.It Pa /dev/ttyU?.init -.It Pa /dev/ttyU?.lock +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock corresponding callin initial-state and lock-state devices .Pp -.It Pa /dev/cuaU? +.It Pa /dev/cuaU* for callout ports -.It Pa /dev/cuaU?.init -.It Pa /dev/cuaU?.lock +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO Modified: head/share/man/man4/ubser.4 ============================================================================== --- head/share/man/man4/ubser.4 Tue May 9 08:31:34 2017 (r318016) +++ head/share/man/man4/ubser.4 Tue May 9 08:36:09 2017 (r318017) @@ -55,17 +55,17 @@ The .Nm driver provides support for the BWCT console management serial adapters. .Sh FILES -.Bl -tag -width "/dev/ttyU?.?.init" -compact -.It Pa /dev/ttyU?.? +.Bl -tag -width "/dev/ttyU*.*.init" -compact +.It Pa /dev/ttyU*.* for callin ports -.It Pa /dev/ttyU?.?.init -.It Pa /dev/ttyU?.?.lock +.It Pa /dev/ttyU*.*.init +.It Pa /dev/ttyU*.*.lock corresponding callin initial-state and lock-state devices .Pp -.It Pa /dev/cuaU?.? +.It Pa /dev/cuaU*.* for callout ports -.It Pa /dev/cuaU?.?.init -.It Pa /dev/cuaU?.?.lock +.It Pa /dev/cuaU*.*.init +.It Pa /dev/cuaU*.*.lock corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO Modified: head/share/man/man4/uchcom.4 ============================================================================== --- head/share/man/man4/uchcom.4 Tue May 9 08:31:34 2017 (r318016) +++ head/share/man/man4/uchcom.4 Tue May 9 08:36:09 2017 (r318017) @@ -71,17 +71,17 @@ driver supports the following adapters: HL USB-RS232 .El .Sh FILES -.Bl -tag -width "/dev/ttyU?.init" -compact -.It Pa /dev/ttyU? +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* for callin ports -.It Pa /dev/ttyU?.init -.It Pa /dev/ttyU?.lock +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock corresponding callin initial-state and lock-state devices .Pp -.It Pa /dev/cuaU? +.It Pa /dev/cuaU* for callout ports -.It Pa /dev/cuaU?.init -.It Pa /dev/cuaU?.lock +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO Modified: head/share/man/man4/ucom.4 ============================================================================== --- head/share/man/man4/ucom.4 Tue May 9 08:31:34 2017 (r318016) +++ head/share/man/man4/ucom.4 Tue May 9 08:36:09 2017 (r318017) @@ -92,17 +92,17 @@ Capture pulses on the CTS line. Capture pulses on the DCD line. .El .Sh FILES -.Bl -tag -width "/dev/ttyU?.init" -compact -.It Pa /dev/ttyU? +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* for callin ports -.It Pa /dev/ttyU?.init -.It Pa /dev/ttyU?.lock +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock corresponding callin initial-state and lock-state devices .Pp -.It Pa /dev/cuaU? +.It Pa /dev/cuaU* for callout ports -.It Pa /dev/cuaU?.init -.It Pa /dev/cuaU?.lock +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO Modified: head/share/man/man4/ucycom.4 ============================================================================== --- head/share/man/man4/ucycom.4 Tue May 9 08:31:34 2017 (r318016) +++ head/share/man/man4/ucycom.4 Tue May 9 08:36:09 2017 (r318017) @@ -72,17 +72,17 @@ Cypress USB to RS232 bridge chips: DeLorme Earthmate USB GPS receiver .El .Sh FILES -.Bl -tag -width "/dev/ttyU?.init" -compact -.It Pa /dev/ttyU? +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* for callin ports -.It Pa /dev/ttyU?.init -.It Pa /dev/ttyU?.lock +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock corresponding callin initial-state and lock-state devices .Pp -.It Pa /dev/cuaU? +.It Pa /dev/cuaU* for callout ports -.It Pa /dev/cuaU?.init -.It Pa /dev/cuaU?.lock +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO Modified: head/share/man/man4/uftdi.4 ============================================================================== --- head/share/man/man4/uftdi.4 Tue May 9 08:31:34 2017 (r318016) +++ head/share/man/man4/uftdi.4 Tue May 9 08:36:09 2017 (r318017) @@ -243,17 +243,17 @@ Buffalo PC-OP-RS / Kurouto-shikou KURO-R Prologix GPIB-USB Controller .El .Sh FILES -.Bl -tag -width "/dev/ttyU?.init" -compact -.It Pa /dev/ttyU? +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* for callin ports -.It Pa /dev/ttyU?.init -.It Pa /dev/ttyU?.lock +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock corresponding callin initial-state and lock-state devices .Pp -.It Pa /dev/cuaU? +.It Pa /dev/cuaU* for callout ports -.It Pa /dev/cuaU?.init -.It Pa /dev/cuaU?.lock +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO Modified: head/share/man/man4/uipaq.4 ============================================================================== --- head/share/man/man4/uipaq.4 Tue May 9 08:31:34 2017 (r318016) +++ head/share/man/man4/uipaq.4 Tue May 9 08:36:09 2017 (r318017) @@ -80,17 +80,17 @@ The device is accessed through the driver which makes it behave like a .Xr tty 4 . .Sh FILES -.Bl -tag -width "/dev/ttyU?.init" -compact -.It Pa /dev/ttyU? +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* for callin ports -.It Pa /dev/ttyU?.init -.It Pa /dev/ttyU?.lock +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock corresponding callin initial-state and lock-state devices .Pp -.It Pa /dev/cuaU? +.It Pa /dev/cuaU* for callout ports -.It Pa /dev/cuaU?.init -.It Pa /dev/cuaU?.lock +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO Modified: head/share/man/man4/umcs.4 ============================================================================== --- head/share/man/man4/umcs.4 Tue May 9 08:31:34 2017 (r318016) +++ head/share/man/man4/umcs.4 Tue May 9 08:36:09 2017 (r318017) @@ -81,17 +81,17 @@ ST Lab U-360 two-port serial USB adapter ST Lab U-400 four-port serial USB adapter .El .Sh FILES -.Bl -tag -width "/dev/ttyU?.?.init" -compact -.It Pa /dev/ttyU?.? +.Bl -tag -width "/dev/ttyU*.*.init" -compact +.It Pa /dev/ttyU*.* for callin ports -.It Pa /dev/ttyU?.?.init -.It Pa /dev/ttyU?.?.lock +.It Pa /dev/ttyU*.*.init +.It Pa /dev/ttyU*.*.lock corresponding callin initial-state and lock-state devices .Pp -.It Pa /dev/cuaU?.? +.It Pa /dev/cuaU*.* for callout ports -.It Pa /dev/cuaU?.?.init -.It Pa /dev/cuaU?.?.lock +.It Pa /dev/cuaU*.*.init +.It Pa /dev/cuaU*.*.lock corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO Modified: head/share/man/man4/umct.4 ============================================================================== --- head/share/man/man4/umct.4 Tue May 9 08:31:34 2017 (r318016) +++ head/share/man/man4/umct.4 Tue May 9 08:36:09 2017 (r318017) @@ -79,17 +79,17 @@ Magic Control Technology USB-232 Sitecom USB-232 .El .Sh FILES -.Bl -tag -width "/dev/ttyU?.init" -compact -.It Pa /dev/ttyU? +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* for callin ports -.It Pa /dev/ttyU?.init -.It Pa /dev/ttyU?.lock +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock corresponding callin initial-state and lock-state devices .Pp -.It Pa /dev/cuaU? +.It Pa /dev/cuaU* for callout ports -.It Pa /dev/cuaU?.init -.It Pa /dev/cuaU?.lock +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO Modified: head/share/man/man4/umodem.4 ============================================================================== --- head/share/man/man4/umodem.4 Tue May 9 08:31:34 2017 (r318016) +++ head/share/man/man4/umodem.4 Tue May 9 08:36:09 2017 (r318017) @@ -96,17 +96,17 @@ Sony Ericsson W810i phone Sonim XP5300 Force .El .Sh FILES -.Bl -tag -width "/dev/ttyU?.init" -compact -.It Pa /dev/ttyU? +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* for callin ports -.It Pa /dev/ttyU?.init -.It Pa /dev/ttyU?.lock +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock corresponding callin initial-state and lock-state devices .Pp -.It Pa /dev/cuaU? +.It Pa /dev/cuaU* for callout ports -.It Pa /dev/cuaU?.init -.It Pa /dev/cuaU?.lock +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO Modified: head/share/man/man4/umoscom.4 ============================================================================== --- head/share/man/man4/umoscom.4 Tue May 9 08:31:34 2017 (r318016) +++ head/share/man/man4/umoscom.4 Tue May 9 08:36:09 2017 (r318017) @@ -57,17 +57,17 @@ The device is accessed through the driver which makes it behave like a .Xr tty 4 . .Sh FILES -.Bl -tag -width "/dev/ttyU?.init" -compact -.It Pa /dev/ttyU? +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* for callin ports -.It Pa /dev/ttyU?.init -.It Pa /dev/ttyU?.lock +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock corresponding callin initial-state and lock-state devices .Pp -.It Pa /dev/cuaU? +.It Pa /dev/cuaU* for callout ports -.It Pa /dev/cuaU?.init -.It Pa /dev/cuaU?.lock +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO Modified: head/share/man/man4/uplcom.4 ============================================================================== --- head/share/man/man4/uplcom.4 Tue May 9 08:31:34 2017 (r318016) +++ head/share/man/man4/uplcom.4 Tue May 9 08:36:09 2017 (r318017) @@ -181,17 +181,17 @@ YC-Cable USB-Serial Adapter Zeagle N2iTion3 Diving Computer .El .Sh FILES -.Bl -tag -width "/dev/ttyU?.init" -compact -.It Pa /dev/ttyU? +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* for callin ports -.It Pa /dev/ttyU?.init -.It Pa /dev/ttyU?.lock +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock corresponding callin initial-state and lock-state devices .Pp -.It Pa /dev/cuaU? +.It Pa /dev/cuaU* for callout ports -.It Pa /dev/cuaU?.init -.It Pa /dev/cuaU?.lock +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO Modified: head/share/man/man4/uslcom.4 ============================================================================== --- head/share/man/man4/uslcom.4 Tue May 9 08:31:34 2017 (r318016) +++ head/share/man/man4/uslcom.4 Tue May 9 08:36:09 2017 (r318017) @@ -193,17 +193,17 @@ WMR RIGblaster Plug&Play and RIGtalk RT1 Zephyr Bioharness .El .Sh FILES -.Bl -tag -width "/dev/ttyU?.init" -compact -.It Pa /dev/ttyU? +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* for callin ports -.It Pa /dev/ttyU?.init -.It Pa /dev/ttyU?.lock +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock corresponding callin initial-state and lock-state devices .Pp -.It Pa /dev/cuaU? +.It Pa /dev/cuaU* for callout ports -.It Pa /dev/cuaU?.init -.It Pa /dev/cuaU?.lock +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO Modified: head/share/man/man4/uvisor.4 ============================================================================== --- head/share/man/man4/uvisor.4 Tue May 9 08:31:34 2017 (r318016) +++ head/share/man/man4/uvisor.4 Tue May 9 08:36:09 2017 (r318017) @@ -119,17 +119,17 @@ Sony Clie S360 Sony Clie TJ37 .El .Sh FILES -.Bl -tag -width "/dev/ttyU?.init" -compact -.It Pa /dev/ttyU? +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* for callin ports -.It Pa /dev/ttyU?.init -.It Pa /dev/ttyU?.lock +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock corresponding callin initial-state and lock-state devices .Pp -.It Pa /dev/cuaU? +.It Pa /dev/cuaU* for callout ports -.It Pa /dev/cuaU?.init -.It Pa /dev/cuaU?.lock +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO Modified: head/share/man/man4/uvscom.4 ============================================================================== --- head/share/man/man4/uvscom.4 Tue May 9 08:31:34 2017 (r318016) +++ head/share/man/man4/uvscom.4 Tue May 9 08:36:09 2017 (r318017) @@ -78,17 +78,17 @@ The device is accessed through the driver which makes it behave like a .Xr tty 4 . .Sh FILES -.Bl -tag -width "/dev/ttyU?.init" -compact -.It Pa /dev/ttyU? +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* for callin ports -.It Pa /dev/ttyU?.init -.It Pa /dev/ttyU?.lock +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock corresponding callin initial-state and lock-state devices .Pp -.It Pa /dev/cuaU? +.It Pa /dev/cuaU* for callout ports -.It Pa /dev/cuaU?.init -.It Pa /dev/cuaU?.lock +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock corresponding callout initial-state and lock-state devices .Sh SEE ALSO .Xr tty 4 , From owner-svn-src-head@freebsd.org Tue May 9 09:10:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B59AD6523E; Tue, 9 May 2017 09:10:01 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2FD4C185D; Tue, 9 May 2017 09:10:01 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 185B56DCD; Tue, 9 May 2017 09:09:13 +0000 (UTC) Date: Tue, 9 May 2017 09:09:13 +0000 From: Alexey Dokuchaev To: "Bjoern A. Zeeb" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318015 - head/sys/net Message-ID: <20170509090913.GA38187@FreeBSD.org> References: <201705090829.v498TtXb031887@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201705090829.v498TtXb031887@repo.freebsd.org> User-Agent: Mutt/1.7.1 (2016-10-04) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 09:10:01 -0000 On Tue, May 09, 2017 at 08:29:55AM +0000, Bjoern A. Zeeb wrote: > New Revision: 318015 > URL: https://svnweb.freebsd.org/changeset/base/318015 > > Log: > Adjust a comment. > > Modified: > head/sys/net/iflib.c > > Modified: head/sys/net/iflib.c > ============================================================================== > --- head/sys/net/iflib.c Tue May 9 08:08:28 2017 (r318014) > +++ head/sys/net/iflib.c Tue May 9 08:29:55 2017 (r318015) > @@ -5214,7 +5214,6 @@ iflib_msix_init(if_ctx_t ctx) > > /* > * bar == -1 => "trust me I know what I'm doing" > - * https://www.youtube.com/watch?v=nnwWKkNau4I Commit message does not explain why this adjustment was necessary. At least a light hint what was wrong with that URL would be appropriate. ./danfe From owner-svn-src-head@freebsd.org Tue May 9 10:09:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D2ADD631D2; Tue, 9 May 2017 10:09:18 +0000 (UTC) (envelope-from royger@gmail.com) Received: from mail-qk0-x22e.google.com (mail-qk0-x22e.google.com [IPv6:2607:f8b0:400d:c09::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 00C891FD1; Tue, 9 May 2017 10:09:17 +0000 (UTC) (envelope-from royger@gmail.com) Received: by mail-qk0-x22e.google.com with SMTP id a72so58089493qkj.2; Tue, 09 May 2017 03:09:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=pVrFE1xF34rK4krEsRGJ9Xao9emvlBrs+R2VvBT6NoQ=; b=cDPkZGd68S61rlreR3ucUGq9bHR8qbr9WRs+l4HT23tTW9iBVobyaNYSJc20rsDFjb jiWdt63Cft6h5SCaSn9Hon1R/d5Wlnhbqrx59//o3YbyXo6HXK7ofIdZrn554S0ybZzk kBbF3PfukL1k9C+FTIyG3f+7aNqJXNoJRdg3yIsEvaact7hGclNK8ZfvXwRMOjWvZnKs DRW5SXi+enF+663na4A2+wwujWVcAE9L6RvA/Pfz+j7mK3FFwwIvtLtMtn/g7eAV03Lt 3H3LRo9djJKSl4zAKC+1jJF92dpyPufCLvr45RtbiAT2YhVltT9z9B98dijbedvmOtos u2ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=pVrFE1xF34rK4krEsRGJ9Xao9emvlBrs+R2VvBT6NoQ=; b=Jcy5gnKsW6mkBxYxQW1XFMf+KMc44SFP+eT9PfZh+RypAk5h3njpAPL9T7OVRaJiBD Iy3o3q+LylRzMZkRbDmRrnIxajcMm45nZZbICSZ8JDNV1n+aaTNXDKrrAGAZuyImeihB KYyPwjs2/nYa8NDg3aULd5R7+85nAxdRk/Sb3owGiyY/QSturp49YxVcrD0XxrOi6K7I C92n2ohOnVgdLCff+5ah1NyNOIcBLk0AOncBHvop0NH6kj1b8NOeEO6F/AJUWYJgdAFF 0IJ0qIliuKF3YgQraacb/6BCdOoQT1jBCgCLV99MPUuEaR3nqQ2xMbdsdYwgErdklLeA Bc5A== X-Gm-Message-State: AN3rC/4s7p60M1USDcQ6mOH2hvJXRpMVPmyt8EDJKnl9n0RMLUkXytcB UtyB19WYU03AGGTk X-Received: by 10.80.146.51 with SMTP id i48mr25038295eda.48.1494324556951; Tue, 09 May 2017 03:09:16 -0700 (PDT) Received: from localhost (default-46-102-197-194.interdsl.co.uk. [46.102.197.194]) by smtp.gmail.com with ESMTPSA id z27sm4924832edb.54.2017.05.09.03.09.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 May 2017 03:09:16 -0700 (PDT) Sender: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Date: Tue, 9 May 2017 11:09:12 +0100 From: Roger Pau =?iso-8859-1?Q?Monn=E9?= To: Colin Percival Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r301198 - head/sys/dev/xen/netfront Message-ID: <20170509100912.h3ylwugahvfi5cc2@dhcp-3-128.uk.xensource.com> References: <201606021116.u52BGajD047287@repo.freebsd.org> <0100015bccba6abc-4c3b1487-25e3-4640-8221-885341ece829-000000@email.amazonses.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <0100015bccba6abc-4c3b1487-25e3-4640-8221-885341ece829-000000@email.amazonses.com> User-Agent: NeoMutt/20170428 (1.8.2) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 10:09:18 -0000 On Wed, May 03, 2017 at 05:13:40AM +0000, Colin Percival wrote: > On 06/02/16 04:16, Roger Pau Monné wrote: > > Author: royger > > Date: Thu Jun 2 11:16:35 2016 > > New Revision: 301198 > > URL: https://svnweb.freebsd.org/changeset/base/301198 > > I think this commit is responsible for panics I'm seeing in EC2 on T2 family > instances. Every time a DHCP request is made, we call into xn_ifinit_locked > (not sure why -- something to do with making the interface promiscuous?) and > hit this code > > > @@ -1760,7 +1715,7 @@ xn_ifinit_locked(struct netfront_info *n > > xn_alloc_rx_buffers(rxq); > > rxq->ring.sring->rsp_event = rxq->ring.rsp_cons + 1; > > if (RING_HAS_UNCONSUMED_RESPONSES(&rxq->ring)) > > - taskqueue_enqueue(rxq->tq, &rxq->intrtask); > > + xn_rxeof(rxq); > > XN_RX_UNLOCK(rxq); > > } > > but under high traffic volumes I think a separate thread can already be > running in xn_rxeof, having dropped the RX lock while it passes a packet > up the stack. This would result in two different threads trying to process > the same set of responses from the ring, with (unsurprisingly) bad results. Hm, right, xn_rxeof drops the lock while pushing the packet up the stack. There's a "XXX" comment on top of that, could you try to remove the lock dripping and see what happens? I'm not sure there's any reason to drop the lock here, I very much doubt if_input is going to sleep. > I'm not 100% sure that this is what's causing the panic, but it's definitely > happening under high traffic conditions immediately after xn_ifinit_locked is > called, so I think my speculation is well-founded. > > There are a few things I don't understand here: > 1. Why DHCP requests are resulting in calls into xn_ifinit_locked. Maybe DHCP flaps the interface up and down? TBH I have no idea. Enabling/disabling certain features (CSUM, TSO) will also cause the interface to reconnect, which might cause incoming packets to get stuck in the RX ring. > 2. Why the calls into xn_ifinit_locked are only happening on T2 instances > and not on any of the other EC2 instances I've tried. Maybe T2 instances are on a more noisy environment? That I'm afraid I have no idea. > 3. Why xn_ifinit_locked is consuming ring responses. There might be pending RX packets on the ring, so netfront consumes them and signals netback. In the unlikely event that the RX ring was full when xn_ifinit_locked is called, not doing this would mean the RX queue would get stuck forever, since there's no guarantee netfront will receive event channel notifications. > so I'm not sure what the solution is, but hopefully someone who knows this > code better will be able to help... My first try would be to disable dropping the lock in xn_rxeof, I think that is utterly incorrect. That should prevent multiple consumers from pocking at the ring at the same time. Roger. From owner-svn-src-head@freebsd.org Tue May 9 11:05:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E38BD6544A; Tue, 9 May 2017 11:05:34 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA27C1736; Tue, 9 May 2017 11:05:33 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49B5W7V097954; Tue, 9 May 2017 11:05:32 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49B5WAp097952; Tue, 9 May 2017 11:05:32 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201705091105.v49B5WAp097952@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Tue, 9 May 2017 11:05:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318021 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 11:05:34 -0000 Author: mmel Date: Tue May 9 11:05:32 2017 New Revision: 318021 URL: https://svnweb.freebsd.org/changeset/base/318021 Log: Introduce pmap_remap_vm_attr(), it allows to remap one VM memattr class to another. This function is intent to be used as workaround for various SoC bugs, mainly access ordering/sequencing related bugs in crossbar fabric. Inspired by: https://reviews.freebsd.org/D10218 MFC after: 2 weeks Modified: head/sys/arm/arm/pmap-v6.c head/sys/arm/include/pmap-v6.h Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Tue May 9 10:42:23 2017 (r318020) +++ head/sys/arm/arm/pmap-v6.c Tue May 9 11:05:32 2017 (r318021) @@ -498,6 +498,25 @@ pmap_set_tex(void) } /* + * Remap one vm_meattr class to another one. This can be useful as + * workaround for SOC errata, e.g. if devices must be accessed using + * SO memory class. + */ +void +pmap_remap_vm_attr(vm_memattr_t old_attr, vm_memattr_t new_attr) +{ + int old_idx, new_idx; + + /* Map VM memattrs to indexes to tex_class table. */ + old_idx = pte2_attr_tab[(int)old_attr]; + new_idx = pte2_attr_tab[(int)new_attr]; + + /* Replace TEX attribute and apply it. */ + tex_class[old_idx] = tex_class[new_idx]; + pmap_set_tex(); +} + +/* * KERNBASE must be multiple of NPT2_IN_PG * PTE1_SIZE. In other words, * KERNBASE is mapped by first L2 page table in L2 page table page. It * meets same constrain due to PT2MAP being placed just under KERNBASE. Modified: head/sys/arm/include/pmap-v6.h ============================================================================== --- head/sys/arm/include/pmap-v6.h Tue May 9 10:42:23 2017 (r318020) +++ head/sys/arm/include/pmap-v6.h Tue May 9 11:05:32 2017 (r318021) @@ -188,6 +188,7 @@ vm_offset_t pmap_preboot_reserve_pages(u vm_offset_t pmap_preboot_get_vpages(u_int); void pmap_preboot_map_attr(vm_paddr_t, vm_offset_t, vm_size_t, vm_prot_t, vm_memattr_t); +void pmap_remap_vm_attr(vm_memattr_t old_attr, vm_memattr_t new_attr); #endif /* _KERNEL */ #endif /* !_MACHINE_PMAP_V6_H_ */ From owner-svn-src-head@freebsd.org Tue May 9 11:44:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6E67D65E0F; Tue, 9 May 2017 11:44:37 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from fry.fubar.geek.nz (fry.fubar.geek.nz [139.59.165.16]) by mx1.freebsd.org (Postfix) with ESMTP id 8A5221DA3; Tue, 9 May 2017 11:44:36 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from [10.0.0.68] (host81-149-102-120.in-addr.btopenworld.com [81.149.102.120]) by fry.fubar.geek.nz (Postfix) with ESMTPSA id 3CDF54E76E; Tue, 9 May 2017 11:34:12 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r318021 - in head/sys/arm: arm include From: Andrew Turner In-Reply-To: <201705091105.v49B5WAp097952@repo.freebsd.org> Date: Tue, 9 May 2017 12:34:10 +0100 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <85745E3A-3260-43C7-B134-85BFED786D55@fubar.geek.nz> References: <201705091105.v49B5WAp097952@repo.freebsd.org> To: Michal Meloun X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 11:44:37 -0000 > On 9 May 2017, at 12:05, Michal Meloun wrote: >=20 > Author: mmel > Date: Tue May 9 11:05:32 2017 > New Revision: 318021 > URL: https://svnweb.freebsd.org/changeset/base/318021 >=20 > Log: > Introduce pmap_remap_vm_attr(), > it allows to remap one VM memattr class to another. >=20 > This function is intent to be used as workaround for various SoC = bugs, > mainly access ordering/sequencing related bugs in crossbar fabric. This seems quite heavy handed to change the attribute for all memory of = a given type. Other architectures have pmap_change_attr to change the = attribute on a specific range of memory. Andrew From owner-svn-src-head@freebsd.org Tue May 9 12:14:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E675D63FFA; Tue, 9 May 2017 12:14:02 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B67F6936; Tue, 9 May 2017 12:14:01 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49CE0Jj027101; Tue, 9 May 2017 12:14:00 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49CE05T027096; Tue, 9 May 2017 12:14:00 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201705091214.v49CE05T027096@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Tue, 9 May 2017 12:14:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318024 - in head: contrib/gcc contrib/gcc/config/arm sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 12:14:02 -0000 Author: mmel Date: Tue May 9 12:14:00 2017 New Revision: 318024 URL: https://svnweb.freebsd.org/changeset/base/318024 Log: Fix _Unwind_Backtrace symbol version for ARM. In real GNU libgcc, _Unwind_Backtrace is published with GCC_3.3 version for all architectures but ARM. For ARM it's publishes with GCC_4.3.0 version. This exception is not implement in your version of libggc, thus we export _Unwind_Backtrace with bad version. To maintain backward compatibility, publish _Unwind_Backtrace twice, once as compatible symbol with GCC_3.3 version, and once as default symbol with GCC_4.3.0 version. While I'm in, fix typo in GCC_4.2.0 to GCC_4.3.0 inheritance declaration. MFC after: 2 weeks Modified: head/contrib/gcc/config/arm/libgcc-bpabi.ver head/contrib/gcc/config/arm/libunwind-arm.S head/contrib/gcc/libgcc-std.ver head/sys/arm/conf/std.armv6 Modified: head/contrib/gcc/config/arm/libgcc-bpabi.ver ============================================================================== --- head/contrib/gcc/config/arm/libgcc-bpabi.ver Tue May 9 12:08:54 2017 (r318023) +++ head/contrib/gcc/config/arm/libgcc-bpabi.ver Tue May 9 12:14:00 2017 (r318024) @@ -81,3 +81,11 @@ GCC_3.5 { # GNU-specific entry point. __gnu_unwind_frame } + +%exclude { + _Unwind_Backtrace +} + +GCC_4.3.0 { + _Unwind_Backtrace +} Modified: head/contrib/gcc/config/arm/libunwind-arm.S ============================================================================== --- head/contrib/gcc/config/arm/libunwind-arm.S Tue May 9 12:08:54 2017 (r318023) +++ head/contrib/gcc/config/arm/libunwind-arm.S Tue May 9 12:14:00 2017 (r318024) @@ -133,4 +133,22 @@ UNWIND_WRAPPER _Unwind_Resume_or_Rethrow UNWIND_WRAPPER _Unwind_ForcedUnwind 3 UNWIND_WRAPPER _Unwind_Backtrace 2 +/* + * Originally, we incorrectly export _Unwind_Backtrace symbol + * with GCC_3.3 version, but real GCC libgcc export it as GCC_4.3.0. + * To maintain backward compatibility, export it with both versions where + * GCC_4.3.0 is default one. + * + * The workaround is complicated by next two issues: + * - old GNU ld cannot handle two (or more) symbol versions + * targeting same function. + * - the .weakref crashes clang 4.0 + */ + .globl SYM(_Unwind_Backtrace33) + TYPE(_Unwind_Backtrace33) +SYM(_Unwind_Backtrace33): + b _Unwind_Backtrace + + .symver SYM(_Unwind_Backtrace33),_Unwind_Backtrace@GCC_3.3 + #endif /* ndef __symbian__ */ Modified: head/contrib/gcc/libgcc-std.ver ============================================================================== --- head/contrib/gcc/libgcc-std.ver Tue May 9 12:08:54 2017 (r318023) +++ head/contrib/gcc/libgcc-std.ver Tue May 9 12:14:00 2017 (r318024) @@ -275,7 +275,7 @@ GCC_4.2.0 { _Unwind_GetIPInfo } -%inherit GCC_4.3 GCC_4.2.0 +%inherit GCC_4.3.0 GCC_4.2.0 GCC_4.3.0 { # byte swapping routines __bswapsi2 Modified: head/sys/arm/conf/std.armv6 ============================================================================== --- head/sys/arm/conf/std.armv6 Tue May 9 12:08:54 2017 (r318023) +++ head/sys/arm/conf/std.armv6 Tue May 9 12:14:00 2017 (r318024) @@ -68,10 +68,10 @@ options USB_DEBUG # Enable usb debug s # Optional extras, never enabled by default: #options BOOTVERBOSE #options DEBUG # May result in extreme spewage -#options KTR -#options KTR_COMPILE=KTR_ALL -#options KTR_ENTRIES=16384 -#options KTR_MASK=(KTR_SPARE2) +options KTR +options KTR_COMPILE=KTR_ALL +options KTR_ENTRIES=163840 +options KTR_MASK=(KTR_SPARE3) #options KTR_VERBOSE=0 #options USB_REQ_DEBUG #options USB_VERBOSE From owner-svn-src-head@freebsd.org Tue May 9 12:32:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBB35D6462D; Tue, 9 May 2017 12:32:33 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41AC31C1A; Tue, 9 May 2017 12:32:33 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49CWWeR035574; Tue, 9 May 2017 12:32:32 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49CWWe9035573; Tue, 9 May 2017 12:32:32 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201705091232.v49CWWe9035573@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Tue, 9 May 2017 12:32:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318025 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 12:32:34 -0000 Author: mmel Date: Tue May 9 12:32:31 2017 New Revision: 318025 URL: https://svnweb.freebsd.org/changeset/base/318025 Log: Revert accidentally changed std.armv6 in r318024. MFC with: r318024 MFC after: 2 weeks Modified: head/sys/arm/conf/std.armv6 Modified: head/sys/arm/conf/std.armv6 ============================================================================== --- head/sys/arm/conf/std.armv6 Tue May 9 12:14:00 2017 (r318024) +++ head/sys/arm/conf/std.armv6 Tue May 9 12:32:31 2017 (r318025) @@ -68,10 +68,10 @@ options USB_DEBUG # Enable usb debug s # Optional extras, never enabled by default: #options BOOTVERBOSE #options DEBUG # May result in extreme spewage -options KTR -options KTR_COMPILE=KTR_ALL -options KTR_ENTRIES=163840 -options KTR_MASK=(KTR_SPARE3) +#options KTR +#options KTR_COMPILE=KTR_ALL +#options KTR_ENTRIES=16384 +#options KTR_MASK=(KTR_SPARE2) #options KTR_VERBOSE=0 #options USB_REQ_DEBUG #options USB_VERBOSE From owner-svn-src-head@freebsd.org Tue May 9 12:40:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8EF0D64822; Tue, 9 May 2017 12:40:30 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: from mail-wr0-x243.google.com (mail-wr0-x243.google.com [IPv6:2a00:1450:400c:c0c::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5D1DD1811; Tue, 9 May 2017 12:40:30 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: by mail-wr0-x243.google.com with SMTP id w50so13423733wrc.0; Tue, 09 May 2017 05:40:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:reply-to:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=8XhwPgEAjDqG+SMjMMGRMzj+7VkuQFdXQP/t2ClmDXU=; b=GAjh88nuZoPOx040vvW/9gsFuoaTnobB1b1qcPtDl2LUN7Mu0Hs3fn5pXe/m2U5AbP wTALv3n2JW5UiDT3L1MWZFlJO+pWBqgGUGJSXzgfdBydqx0QYKrRBTcLq4GJC9++r6A4 RQZ5DkQkA7JhDC7eIilxiVK24mzWhth9T4ULYg/sxgG+7wrRyBkw3rOfpZfjuW6LNtuW +2EIYrqoorqcW0TxgYUrDgkjCAm4tFpVMWcFQYdNrqCn3066XX1A0XosibX/uPNY16LY SBmrPY1GhG9XgZtsZMQyy87a7SWmKdibOIyq7pq4lBcDBrKt6v8T65q30gyZSXOznWr3 m/qA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:reply-to:subject:to:cc:references :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding:content-language; bh=8XhwPgEAjDqG+SMjMMGRMzj+7VkuQFdXQP/t2ClmDXU=; b=tP6CHqG73dVvB62uy7MYXoEzCp2zUxAeQnIJA7GDPya0yr7+I51gvIITqP04rSADqt o3dWgMGpPPESaZUl2BiCTmiJ4QfbV11LACNVWfZtfHwquBmIqD/4GwyqK6aDV914P5Qg CF76/I96HtQaj8o40zy3aVkDYyB5X0Aboo0vvKk7zS+1Niveos2Rv0ANHLLv9GXN/4Ug z6OqKAilouw8mdbrbhvj7dzbyBR2bq++70ltyT2WLygkE9KLTTFD3RG8ASe1TJzA7sm9 8XHvaeIMQ6YH7cn2FKoQpYfk5h7i71FQWS78hk6d8Ce7BJOfjduN0Dfa2+rqik5MWe2S w4Cg== X-Gm-Message-State: AODbwcCkjZxSm2t4s4VaW57JqrLiGuE7IEzltd9ajGBNl1lVzsrgJ3eg yH7/2pr4N8XovQLOPbkRpA== X-Received: by 10.28.58.16 with SMTP id h16mr1639380wma.131.1494333628431; Tue, 09 May 2017 05:40:28 -0700 (PDT) Received: from [88.208.79.100] (halouny.humusoft.cz. [88.208.79.100]) by smtp.gmail.com with ESMTPSA id g25sm23515693wra.1.2017.05.09.05.40.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 May 2017 05:40:27 -0700 (PDT) From: Michal Meloun X-Google-Original-From: Michal Meloun Reply-To: mmel@freebsd.org Subject: Re: svn commit: r318021 - in head/sys/arm: arm include To: Andrew Turner Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201705091105.v49B5WAp097952@repo.freebsd.org> <85745E3A-3260-43C7-B134-85BFED786D55@fubar.geek.nz> Message-ID: <8fe20c26-3c0c-98ce-227b-740491253047@freebsd.org> Date: Tue, 9 May 2017 14:40:29 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <85745E3A-3260-43C7-B134-85BFED786D55@fubar.geek.nz> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 12:40:31 -0000 On 09.05.2017 13:34, Andrew Turner wrote: >> On 9 May 2017, at 12:05, Michal Meloun wrote: >> >> Author: mmel >> Date: Tue May 9 11:05:32 2017 >> New Revision: 318021 >> URL: https://svnweb.freebsd.org/changeset/base/318021 >> >> Log: >> Introduce pmap_remap_vm_attr(), >> it allows to remap one VM memattr class to another. >> >> This function is intent to be used as workaround for various SoC bugs, >> mainly access ordering/sequencing related bugs in crossbar fabric. > This seems quite heavy handed to change the attribute for all memory of a given type. Yes, exactly. See comment in D10218 - /* * Workaround for Marvell Armada38X family HW issue * between Cortex-A9 CPUs and on-chip devices that may * cause hang on heavy load. * To avoid that, map all registers including PCIe IO * as strongly ordered instead of device memory. */ > Other architectures have pmap_change_attr to change the attribute on a specific range of memory. Right. Problem is that I don't known any method how we can change memory attribute for live memory in SMP system, without hitting undefined behavior. Michal From owner-svn-src-head@freebsd.org Tue May 9 12:51:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2159ED64DA0; Tue, 9 May 2017 12:51:44 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF5B3C68; Tue, 9 May 2017 12:51:43 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49Cpg8D041453; Tue, 9 May 2017 12:51:42 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49Cpg0l041452; Tue, 9 May 2017 12:51:42 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705091251.v49Cpg0l041452@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 9 May 2017 12:51:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318026 - head/sys/compat/linuxkpi/common/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 12:51:44 -0000 Author: hselasky Date: Tue May 9 12:51:42 2017 New Revision: 318026 URL: https://svnweb.freebsd.org/changeset/base/318026 Log: Fix init order in the LinuxKPI for RCU support. CPU_FOREACH() is not available until SI_SUB_CPU at SI_ORDER_ANY when the LinuxKPI is loaded as part of the kernel. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/src/linux_rcu.c Modified: head/sys/compat/linuxkpi/common/src/linux_rcu.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_rcu.c Tue May 9 12:32:31 2017 (r318025) +++ head/sys/compat/linuxkpi/common/src/linux_rcu.c Tue May 9 12:51:42 2017 (r318026) @@ -119,7 +119,7 @@ linux_rcu_runtime_init(void *arg __unuse TAILQ_INIT(&record->ts_head); } } -SYSINIT(linux_rcu_runtime, SI_SUB_LOCK, SI_ORDER_SECOND, linux_rcu_runtime_init, NULL); +SYSINIT(linux_rcu_runtime, SI_SUB_CPU, SI_ORDER_ANY, linux_rcu_runtime_init, NULL); static void linux_rcu_runtime_uninit(void *arg __unused) From owner-svn-src-head@freebsd.org Tue May 9 15:09:09 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26299D65561; Tue, 9 May 2017 15:09:09 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from fry.fubar.geek.nz (fry.fubar.geek.nz [139.59.165.16]) by mx1.freebsd.org (Postfix) with ESMTP id E9FA5935; Tue, 9 May 2017 15:09:08 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from dhcp-10-248-107-222.eduroam.wireless.private.cam.ac.uk (global-5-142.nat-2.net.cam.ac.uk [131.111.5.142]) by fry.fubar.geek.nz (Postfix) with ESMTPSA id 0EC7C4E77F; Tue, 9 May 2017 15:09:07 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r318021 - in head/sys/arm: arm include From: Andrew Turner In-Reply-To: <8fe20c26-3c0c-98ce-227b-740491253047@freebsd.org> Date: Tue, 9 May 2017 16:09:06 +0100 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201705091105.v49B5WAp097952@repo.freebsd.org> <85745E3A-3260-43C7-B134-85BFED786D55@fubar.geek.nz> <8fe20c26-3c0c-98ce-227b-740491253047@freebsd.org> To: mmel@freebsd.org X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 15:09:09 -0000 > On 9 May 2017, at 13:40, Michal Meloun wrote: >=20 >=20 >=20 > On 09.05.2017 13:34, Andrew Turner wrote: >>> On 9 May 2017, at 12:05, Michal Meloun wrote: >>>=20 >>> Author: mmel >>> Date: Tue May 9 11:05:32 2017 >>> New Revision: 318021 >>> URL: https://svnweb.freebsd.org/changeset/base/318021 >>>=20 >>> Log: >>> Introduce pmap_remap_vm_attr(), >>> it allows to remap one VM memattr class to another. >>>=20 >>> This function is intent to be used as workaround for various SoC = bugs, >>> mainly access ordering/sequencing related bugs in crossbar fabric. >> This seems quite heavy handed to change the attribute for all memory = of a given type. > Yes, exactly. See comment in D10218 - > /* > * Workaround for Marvell Armada38X family HW issue > * between Cortex-A9 CPUs and on-chip devices that may > * cause hang on heavy load. > * To avoid that, map all registers including PCIe IO > * as strongly ordered instead of device memory. > */ I don=E2=80=99t think it=E2=80=99s been answered if this is just for = PCIe, or all devices. >=20 >> Other architectures have pmap_change_attr to change the attribute on = a specific range of memory. > Right. Problem is that I don't known any method how we can change=20 > memory attribute for live memory in SMP system, > without hitting undefined behavior. I would expect drivers to change the attributes early, before they = access the memory. We could also use smp_rendezvous to ensure nothing = else is running, this will have a performance code, however I would not = expect pmap_change_attr to be used in the fast path. Andrew From owner-svn-src-head@freebsd.org Tue May 9 17:35:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4FA4D65EA4; Tue, 9 May 2017 17:35:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ACBD21DA2; Tue, 9 May 2017 17:35:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49HZH6p063053; Tue, 9 May 2017 17:35:17 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49HZH4E063046; Tue, 9 May 2017 17:35:17 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705091735.v49HZH4E063046@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 9 May 2017 17:35:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318067 - in head/sys/mips: include mips X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 17:35:18 -0000 Author: jhb Date: Tue May 9 17:35:16 2017 New Revision: 318067 URL: https://svnweb.freebsd.org/changeset/base/318067 Log: Add initial support for the floating point implementation register. - Save the current FIR in the global 'cpuinfo' structure in a new 'fpu_id' member. - Decode flags in the FIR when displaying other CPU flags during boot. - Use the existing "dummy" slot in the floating point register structure to export the FIR in process core dumps and via ptrace(). Note that while the FIR register is not volatile, this practice of storing the FIR in the floating-point register set is used in other OS's. Reviewed by: kan MFC after: 1 month Sponsored by: DARPA / AFRL Differential Revision: https://reviews.freebsd.org/D10617 Modified: head/sys/mips/include/cpuinfo.h head/sys/mips/include/frame.h head/sys/mips/include/md_var.h head/sys/mips/include/regnum.h head/sys/mips/mips/cpu.c head/sys/mips/mips/pm_machdep.c head/sys/mips/mips/swtch.S Modified: head/sys/mips/include/cpuinfo.h ============================================================================== --- head/sys/mips/include/cpuinfo.h Tue May 9 17:21:54 2017 (r318066) +++ head/sys/mips/include/cpuinfo.h Tue May 9 17:35:16 2017 (r318067) @@ -75,6 +75,7 @@ struct mips_cpuinfo { u_int8_t dc_nways; u_int16_t dc_nsets; } l2; + u_int32_t fpu_id; }; extern struct mips_cpuinfo cpuinfo; Modified: head/sys/mips/include/frame.h ============================================================================== --- head/sys/mips/include/frame.h Tue May 9 17:21:54 2017 (r318066) +++ head/sys/mips/include/frame.h Tue May 9 17:35:16 2017 (r318067) @@ -134,7 +134,7 @@ struct trapframe { f_register_t f30; f_register_t f31; register_t fsr; - register_t fdummy; + register_t fir; }; #endif /* !_MACHINE_FRAME_H_ */ Modified: head/sys/mips/include/md_var.h ============================================================================== --- head/sys/mips/include/md_var.h Tue May 9 17:21:54 2017 (r318066) +++ head/sys/mips/include/md_var.h Tue May 9 17:35:16 2017 (r318067) @@ -52,6 +52,7 @@ extern int vm_page_dump_size; extern vm_offset_t kstack0; extern vm_offset_t kernel_kseg0_end; +uint32_t MipsFPID(void); void MipsSaveCurFPState(struct thread *); void fork_trampoline(void); uintptr_t MipsEmulateBranch(struct trapframe *, uintptr_t, int, uintptr_t); Modified: head/sys/mips/include/regnum.h ============================================================================== --- head/sys/mips/include/regnum.h Tue May 9 17:21:54 2017 (r318066) +++ head/sys/mips/include/regnum.h Tue May 9 17:35:16 2017 (r318067) @@ -160,7 +160,7 @@ #define F30 (FPBASE+30) #define F31 (FPBASE+31) #define FSR (FPBASE+32) -#define FSR_DUMMY (FPBASE+33) /* For 8 byte alignment */ +#define FIR (FPBASE+33) #define NUMFPREGS 34 @@ -204,5 +204,6 @@ #define F30_NUM (30) #define F31_NUM (31) #define FSR_NUM (32) +#define FIR_NUM (33) #endif /* !_MACHINE_REGNUM_H_ */ Modified: head/sys/mips/mips/cpu.c ============================================================================== --- head/sys/mips/mips/cpu.c Tue May 9 17:21:54 2017 (r318066) +++ head/sys/mips/mips/cpu.c Tue May 9 17:35:16 2017 (r318067) @@ -184,6 +184,10 @@ mips_get_identity(struct mips_cpuinfo *c cfg3 = mips_rd_config3(); } + /* Save FP implementation revision if FP is present. */ + if (cfg1 & MIPS_CONFIG1_FP) + cpuinfo->fpu_id = MipsFPID(); + /* Check to see if UserLocal register is implemented. */ if (cfg3 & MIPS_CONFIG3_ULR) { /* UserLocal register is implemented, enable it. */ @@ -474,6 +478,19 @@ cpu_identify(void) printf(" Config1=0x%b\n", cfg1, "\20\7COP2\6MDMX\5PerfCount\4WatchRegs\3MIPS16\2EJTAG\1FPU"); + if (cpuinfo.fpu_id != 0) + printf(" FPU ID=0x%b\n", cpuinfo.fpu_id, + "\020" + "\020S" + "\021D" + "\022PS" + "\0233D" + "\024W" + "\025L" + "\026F64" + "\0272008" + "\034UFRP"); + /* If config register selection 2 does not exist, exit. */ if (!(cfg1 & MIPS_CONFIG_CM)) return; Modified: head/sys/mips/mips/pm_machdep.c ============================================================================== --- head/sys/mips/mips/pm_machdep.c Tue May 9 17:21:54 2017 (r318066) +++ head/sys/mips/mips/pm_machdep.c Tue May 9 17:35:16 2017 (r318067) @@ -60,6 +60,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -378,7 +379,8 @@ fill_fpregs(struct thread *td, struct fp { if (td == PCPU_GET(fpcurthread)) MipsSaveCurFPState(td); - memcpy(fpregs, &td->td_frame->f0, sizeof(struct fpreg)); + memcpy(fpregs, &td->td_frame->f0, sizeof(struct fpreg)); + fpregs->r_regs[FIR_NUM] = cpuinfo.fpu_id; return 0; } Modified: head/sys/mips/mips/swtch.S ============================================================================== --- head/sys/mips/mips/swtch.S Tue May 9 17:21:54 2017 (r318066) +++ head/sys/mips/mips/swtch.S Tue May 9 17:35:16 2017 (r318067) @@ -526,6 +526,44 @@ END(MipsSwitchFPState) /*---------------------------------------------------------------------------- * + * MipsFPID -- + * + * Read and return the floating point implementation register. + * + * uint32_t + * MipsFPID(void) + * + * Results: + * Floating point implementation register. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------------- + */ +LEAF(MipsFPID) + .set push + .set hardfloat + mfc0 t1, MIPS_COP_0_STATUS # Save the status register. + HAZARD_DELAY +#if defined(__mips_n64) + or t0, t1, MIPS_SR_COP_1_BIT | MIPS_SR_FR +#else + or t0, t1, MIPS_SR_COP_1_BIT +#endif + mtc0 t0, MIPS_COP_0_STATUS # Enable the coprocessor + HAZARD_DELAY + ITLBNOPFIX + cfc1 v0, MIPS_FPU_ID + mtc0 t1, MIPS_COP_0_STATUS # Restore the status register. + ITLBNOPFIX + j ra + nop + .set pop +END(MipsFPID) + +/*---------------------------------------------------------------------------- + * * MipsSaveCurFPState -- * * Save the current floating point coprocessor state. From owner-svn-src-head@freebsd.org Tue May 9 18:05:14 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 038A6D6567D; Tue, 9 May 2017 18:05:14 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D7975F05; Tue, 9 May 2017 18:05:13 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id E9FAE10A82D; Tue, 9 May 2017 14:05:12 -0400 (EDT) From: John Baldwin To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r317809 - head/share/man/man7 Date: Tue, 09 May 2017 10:28:51 -0700 Message-ID: <1914546.2HFVuP4Uap@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <20170508221750.GG1622@kib.kiev.ua> References: <201705042131.v44LVokb076951@repo.freebsd.org> <20170508205210.GF1622@kib.kiev.ua> <20170508221750.GG1622@kib.kiev.ua> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Tue, 09 May 2017 14:05:13 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 18:05:14 -0000 On Tuesday, May 09, 2017 01:17:51 AM Konstantin Belousov wrote: > On Mon, May 08, 2017 at 11:52:10PM +0300, Konstantin Belousov wrote: > > On Mon, May 08, 2017 at 01:37:15PM -0700, John Baldwin wrote: > > > On Thursday, May 04, 2017 09:31:50 PM Konstantin Belousov wrote: > > > > Author: kib > > > > Date: Thu May 4 21:31:50 2017 > > > > New Revision: 317809 > > > > URL: https://svnweb.freebsd.org/changeset/base/317809 > > > > > > > > Log: > > > > Provide introduction for the arch(7) manpage. > > > > > > > > Start with some words about linear address space and its layout, then > > > > explain pointers models and ABIs, providing explanation to the > > > > structure of the tables. > > > > > > > > Reviewed by: emaste, imp > > > > 'Future-proof' cheri wording by: brooks > > > > Sponsored by: The FreeBSD Foundation > > > > MFC after: 2 weeks > > > > Differential revision: https://reviews.freebsd.org/D10596 > > > > > > Note that mips n32 is neither ILP32 or LP64, it P32L64. (Similar to x32 > > > for x86 if we were to ever add that.) Thus, we support 3 ABIs rather > > > than just 2. > > > > I trust your information about MIPS n32, but x32 uses ILP32 model. > In fact, from all documents that I can found about n32, it seems that > long == pointer == 32bit. This is mentioned in the MIPSpro N32 ABI Handbook > and in the MIPS Tech document MD00305 'MIPS ABIs Described'. Interesting, my apologies then. > The only strange thing for n32 is that register_t is 64bit, and vm_paddr_t > is similar to PAE. x32 would match as well. -- John Baldwin From owner-svn-src-head@freebsd.org Tue May 9 18:12:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31CA5D65901; Tue, 9 May 2017 18:12:07 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0201C132D; Tue, 9 May 2017 18:12:06 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49IC5SG079205; Tue, 9 May 2017 18:12:05 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49IC50b079203; Tue, 9 May 2017 18:12:05 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201705091812.v49IC50b079203@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Tue, 9 May 2017 18:12:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318068 - in head/sys: arm/conf modules/dtb/mv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 18:12:07 -0000 Author: loos Date: Tue May 9 18:12:05 2017 New Revision: 318068 URL: https://svnweb.freebsd.org/changeset/base/318068 Log: Disable the build of the static/embedded DTB for the ARMADA38X kernel. Build the supported DTBs as part of modules build. MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC (Netgate) Added: head/sys/modules/dtb/mv/ head/sys/modules/dtb/mv/Makefile (contents, props changed) Modified: head/sys/arm/conf/ARMADA38X Modified: head/sys/arm/conf/ARMADA38X ============================================================================== --- head/sys/arm/conf/ARMADA38X Tue May 9 17:35:16 2017 (r318067) +++ head/sys/arm/conf/ARMADA38X Tue May 9 18:12:05 2017 (r318068) @@ -12,6 +12,7 @@ ident ARMADA38X options SOC_MV_ARMADA38X makeoptions WERROR="-Werror" +makeoptions MODULES_EXTRA="dtb/mv" options MD_ROOT #makeoptions MFS_IMAGE=/path/to/miniroot @@ -78,7 +79,5 @@ device cryptodev # L2 Cache device pl310 -#FDT +# FDT options FDT -options FDT_DTB_STATIC -makeoptions FDT_DTS_FILE=armada-388-gp.dts Added: head/sys/modules/dtb/mv/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/dtb/mv/Makefile Tue May 9 18:12:05 2017 (r318068) @@ -0,0 +1,7 @@ +# $FreeBSD$ +# All the dts files for Marvell systems we support. +DTS= \ + armada-388-clearfog.dts \ + armada-388-gp.dts + +.include From owner-svn-src-head@freebsd.org Tue May 9 18:28:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1E0BD65762; Tue, 9 May 2017 18:28:43 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8EF37B84; Tue, 9 May 2017 18:28:43 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49ISg7C084476; Tue, 9 May 2017 18:28:42 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49ISgOv084474; Tue, 9 May 2017 18:28:42 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705091828.v49ISgOv084474@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 9 May 2017 18:28:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318090 - head/sys/opencrypto X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 18:28:43 -0000 Author: jhb Date: Tue May 9 18:28:42 2017 New Revision: 318090 URL: https://svnweb.freebsd.org/changeset/base/318090 Log: Use const with some read-only buffers in opencrypto APIs. - Mark the source buffer for a copyback operation as const in the kernel API. - Use const with input-only buffers in crypto ioctl structures used with /dev/crypto. MFC after: 1 month Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D10517 Modified: head/sys/opencrypto/criov.c head/sys/opencrypto/cryptodev.h Modified: head/sys/opencrypto/criov.c ============================================================================== --- head/sys/opencrypto/criov.c Tue May 9 18:19:55 2017 (r318089) +++ head/sys/opencrypto/criov.c Tue May 9 18:28:42 2017 (r318090) @@ -79,7 +79,7 @@ cuio_copydata(struct uio* uio, int off, } void -cuio_copyback(struct uio* uio, int off, int len, caddr_t cp) +cuio_copyback(struct uio* uio, int off, int len, c_caddr_t cp) { struct iovec *iov = uio->uio_iov; int iol = uio->uio_iovcnt; @@ -155,7 +155,7 @@ cuio_apply(struct uio *uio, int off, int } void -crypto_copyback(int flags, caddr_t buf, int off, int size, caddr_t in) +crypto_copyback(int flags, caddr_t buf, int off, int size, c_caddr_t in) { if ((flags & CRYPTO_F_IMBUF) != 0) Modified: head/sys/opencrypto/cryptodev.h ============================================================================== --- head/sys/opencrypto/cryptodev.h Tue May 9 18:19:55 2017 (r318089) +++ head/sys/opencrypto/cryptodev.h Tue May 9 18:28:42 2017 (r318090) @@ -211,9 +211,9 @@ struct session_op { u_int32_t mac; /* ie. CRYPTO_MD5_HMAC */ u_int32_t keylen; /* cipher key */ - caddr_t key; + c_caddr_t key; int mackeylen; /* mac key */ - caddr_t mackey; + c_caddr_t mackey; u_int32_t ses; /* returns: session # */ }; @@ -223,9 +223,9 @@ struct session2_op { u_int32_t mac; /* ie. CRYPTO_MD5_HMAC */ u_int32_t keylen; /* cipher key */ - caddr_t key; + c_caddr_t key; int mackeylen; /* mac key */ - caddr_t mackey; + c_caddr_t mackey; u_int32_t ses; /* returns: session # */ int crid; /* driver id + flags (rw) */ @@ -240,9 +240,10 @@ struct crypt_op { u_int16_t flags; #define COP_F_BATCH 0x0008 /* Batch op if possible */ u_int len; - caddr_t src, dst; /* become iov[] inside kernel */ + c_caddr_t src; /* become iov[] inside kernel */ + caddr_t dst; caddr_t mac; /* must be big enough for chosen MAC */ - caddr_t iv; + c_caddr_t iv; }; /* op and flags the same as crypt_op */ @@ -253,10 +254,11 @@ struct crypt_aead { u_int len; u_int aadlen; u_int ivlen; - caddr_t src, dst; /* become iov[] inside kernel */ - caddr_t aad; /* additional authenticated data */ + c_caddr_t src; /* become iov[] inside kernel */ + caddr_t dst; + c_caddr_t aad; /* additional authenticated data */ caddr_t tag; /* must fit for chosen TAG length */ - caddr_t iv; + c_caddr_t iv; }; /* @@ -503,7 +505,7 @@ extern int crypto_devallowsoft; /* only */ struct uio; extern void cuio_copydata(struct uio* uio, int off, int len, caddr_t cp); -extern void cuio_copyback(struct uio* uio, int off, int len, caddr_t cp); +extern void cuio_copyback(struct uio* uio, int off, int len, c_caddr_t cp); extern int cuio_getptr(struct uio *uio, int loc, int *off); extern int cuio_apply(struct uio *uio, int off, int len, int (*f)(void *, void *, u_int), void *arg); @@ -514,7 +516,7 @@ extern int crypto_mbuftoiov(struct mbuf int *cnt, int *allocated); extern void crypto_copyback(int flags, caddr_t buf, int off, int size, - caddr_t in); + c_caddr_t in); extern void crypto_copydata(int flags, caddr_t buf, int off, int size, caddr_t out); extern int crypto_apply(int flags, caddr_t buf, int off, int len, From owner-svn-src-head@freebsd.org Tue May 9 18:33:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5658FD659DF; Tue, 9 May 2017 18:33:43 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 04F3391; Tue, 9 May 2017 18:33:42 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49IXgRY088221; Tue, 9 May 2017 18:33:42 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49IXfxq088218; Tue, 9 May 2017 18:33:41 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705091833.v49IXfxq088218@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 9 May 2017 18:33:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318091 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 18:33:43 -0000 Author: np Date: Tue May 9 18:33:41 2017 New Revision: 318091 URL: https://svnweb.freebsd.org/changeset/base/318091 Log: cxgbe(4): Do not assume that if_qflush is always followed by inteface-down. MFC after: 3 days Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Tue May 9 18:28:42 2017 (r318090) +++ head/sys/dev/cxgbe/adapter.h Tue May 9 18:33:41 2017 (r318091) @@ -399,6 +399,7 @@ enum { EQ_TYPEMASK = 0x3, /* 2 lsbits hold the type (see above) */ EQ_ALLOCATED = (1 << 2), /* firmware resources allocated */ EQ_ENABLED = (1 << 3), /* open for business */ + EQ_QFLUSH = (1 << 4), /* if_qflush in progress */ }; /* Listed in order of preference. Update t4_sysctls too if you change these */ Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Tue May 9 18:28:42 2017 (r318090) +++ head/sys/dev/cxgbe/t4_main.c Tue May 9 18:33:41 2017 (r318091) @@ -1869,12 +1869,15 @@ cxgbe_qflush(struct ifnet *ifp) if (vi->flags & VI_INIT_DONE) { for_each_txq(vi, i, txq) { TXQ_LOCK(txq); - txq->eq.flags &= ~EQ_ENABLED; + txq->eq.flags |= EQ_QFLUSH; TXQ_UNLOCK(txq); while (!mp_ring_is_idle(txq->r)) { mp_ring_check_drainage(txq->r, 0); pause("qflush", 1); } + TXQ_LOCK(txq); + txq->eq.flags &= ~EQ_QFLUSH; + TXQ_UNLOCK(txq); } } if_qflush(ifp); Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Tue May 9 18:28:42 2017 (r318090) +++ head/sys/dev/cxgbe/t4_sge.c Tue May 9 18:33:41 2017 (r318091) @@ -2452,6 +2452,13 @@ cannot_use_txpkts(struct mbuf *m) return (needs_tso(m)); } +static inline int +discard_tx(struct sge_eq *eq) +{ + + return ((eq->flags & (EQ_ENABLED | EQ_QFLUSH)) != EQ_ENABLED); +} + /* * r->items[cidx] to r->items[pidx], with a wraparound at r->size, are ready to * be consumed. Return the actual number consumed. 0 indicates a stall. @@ -2477,7 +2484,7 @@ eth_tx(struct mp_ring *r, u_int cidx, u_ total = 0; TXQ_LOCK(txq); - if (__predict_false((eq->flags & EQ_ENABLED) == 0)) { + if (__predict_false(discard_tx(eq))) { while (cidx != pidx) { m0 = r->items[cidx]; m_freem(m0); From owner-svn-src-head@freebsd.org Tue May 9 18:45:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3BF88D65DA8; Tue, 9 May 2017 18:45:36 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DBAE6939; Tue, 9 May 2017 18:45:35 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49IjYoY092730; Tue, 9 May 2017 18:45:34 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49IjYxC092729; Tue, 9 May 2017 18:45:34 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201705091845.v49IjYxC092729@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 9 May 2017 18:45:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318092 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 18:45:36 -0000 Author: bdrewery Date: Tue May 9 18:45:34 2017 New Revision: 318092 URL: https://svnweb.freebsd.org/changeset/base/318092 Log: PROGS+META_MODE: Avoid rebuilding common sources when recursing. This could be seen in lib/libkvm/tests where kvm_test_common.o was a common dependency, but one of the recursed progs had a special CFLAGS+= -I that changed the build command. This would cause all recursed builds to rebuild while fighting over the meta file and object file. Reported by: Mark Millard MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/share/mk/bsd.progs.mk Modified: head/share/mk/bsd.progs.mk ============================================================================== --- head/share/mk/bsd.progs.mk Tue May 9 18:33:41 2017 (r318091) +++ head/share/mk/bsd.progs.mk Tue May 9 18:45:34 2017 (r318092) @@ -87,11 +87,7 @@ $v = # handle being called [bsd.]progs.mk .include -.if !empty(PROGS) && !defined(_RECURSING_PROGS) && !defined(PROG) -# tell progs.mk we might want to install things -PROGS_TARGETS+= checkdpadd clean cleandepend cleandir depend install - -# Find common sources among the PROGS and depend on them before building +# Find common sources among the PROGS to depend on them before building # anything. This allows parallelization without them each fighting over # the same objects. _PROGS_COMMON_SRCS= @@ -110,6 +106,20 @@ _PROGS_COMMON_OBJS= ${_PROGS_COMMON_SRCS .if !empty(_PROGS_COMMON_SRCS:N*.[dhly]) _PROGS_COMMON_OBJS+= ${_PROGS_COMMON_SRCS:N*.[dhly]:R:S/$/.o/g} .endif +.endif + +# When recursing, ensure common sources are not rebuilt in META_MODE. +.if defined(_RECURSING_PROGS) && !empty(_PROGS_COMMON_OBJS) && \ + !empty(.MAKE.MODE:Mmeta) +${_PROGS_COMMON_OBJS}: .NOMETA +.endif + +.if !empty(PROGS) && !defined(_RECURSING_PROGS) && !defined(PROG) +# tell progs.mk we might want to install things +PROGS_TARGETS+= checkdpadd clean cleandepend cleandir depend install + +# Ensure common objects are built before recursing. +.if !empty(_PROGS_COMMON_OBJS) ${PROGS}: ${_PROGS_COMMON_OBJS} .endif From owner-svn-src-head@freebsd.org Tue May 9 18:54:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4AEC7D661A5; Tue, 9 May 2017 18:54:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 12C8112B; Tue, 9 May 2017 18:54:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49IsaIo096738; Tue, 9 May 2017 18:54:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49IsaGW096737; Tue, 9 May 2017 18:54:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705091854.v49IsaGW096737@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 9 May 2017 18:54:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318094 - head/tests/sys/aio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 18:54:37 -0000 Author: ngie Date: Tue May 9 18:54:35 2017 New Revision: 318094 URL: https://svnweb.freebsd.org/changeset/base/318094 Log: style(9): clean up trailing whitespace MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/tests/sys/aio/local.h Modified: head/tests/sys/aio/local.h ============================================================================== --- head/tests/sys/aio/local.h Tue May 9 18:46:49 2017 (r318093) +++ head/tests/sys/aio/local.h Tue May 9 18:54:35 2017 (r318094) @@ -52,7 +52,7 @@ } else if (_unsafe == 0) \ atf_tc_skip("Unsafe AIO is disabled"); \ } while (0) - + #define PLAIN_REQUIRE_UNSAFE_AIO(_exit_code) do { \ size_t _len; \ int _unsafe; \ From owner-svn-src-head@freebsd.org Tue May 9 19:01:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3289D6635F; Tue, 9 May 2017 19:01:58 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3EA57F7; Tue, 9 May 2017 19:01:58 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49J1vJE000680; Tue, 9 May 2017 19:01:57 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49J1vuZ000678; Tue, 9 May 2017 19:01:57 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201705091901.v49J1vuZ000678@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Tue, 9 May 2017 19:01:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318095 - head/sys/dev/sdhci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 19:01:59 -0000 Author: loos Date: Tue May 9 19:01:57 2017 New Revision: 318095 URL: https://svnweb.freebsd.org/changeset/base/318095 Log: Add a new SDHCI quirk, SDHCI_QUIRK_BROKEN_AUTO_STOP, to workaround controllers that do not support or have broken ACMD12 implementations. Reviewed by: jmcneill Obtained from: NetBSD MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC (Netgate) Differential Revision: https://reviews.freebsd.org/D10602 Modified: head/sys/dev/sdhci/sdhci.c head/sys/dev/sdhci/sdhci.h Modified: head/sys/dev/sdhci/sdhci.c ============================================================================== --- head/sys/dev/sdhci/sdhci.c Tue May 9 18:54:35 2017 (r318094) +++ head/sys/dev/sdhci/sdhci.c Tue May 9 19:01:57 2017 (r318095) @@ -1060,7 +1060,7 @@ sdhci_set_transfer_mode(struct sdhci_slo mode |= SDHCI_TRNS_MULTI; if (data->flags & MMC_DATA_READ) mode |= SDHCI_TRNS_READ; - if (slot->req->stop) + if (slot->req->stop && !(slot->quirks & SDHCI_QUIRK_BROKEN_AUTO_STOP)) mode |= SDHCI_TRNS_ACMD12; if (slot->flags & SDHCI_USE_DMA) mode |= SDHCI_TRNS_DMA; @@ -1305,7 +1305,8 @@ sdhci_finish_data(struct sdhci_slot *slo slot->intmask |= SDHCI_INT_RESPONSE); } /* Unload rest of data from DMA buffer. */ - if (!slot->data_done && (slot->flags & SDHCI_USE_DMA)) { + if (!slot->data_done && (slot->flags & SDHCI_USE_DMA) && + slot->curcmd->data != NULL) { if (data->flags & MMC_DATA_READ) { left = data->len - slot->offset; bus_dmamap_sync(slot->dmatag, slot->dmamap, @@ -1343,17 +1344,18 @@ sdhci_start(struct sdhci_slot *slot) sdhci_start_command(slot, req->cmd); return; } -/* We don't need this until using Auto-CMD12 feature - if (!(slot->flags & STOP_STARTED) && req->stop) { + if ((slot->quirks & SDHCI_QUIRK_BROKEN_AUTO_STOP) && + !(slot->flags & STOP_STARTED) && req->stop) { slot->flags |= STOP_STARTED; sdhci_start_command(slot, req->stop); return; } -*/ if (sdhci_debug > 1) slot_printf(slot, "result: %d\n", req->cmd->error); if (!req->cmd->error && - (slot->quirks & SDHCI_QUIRK_RESET_AFTER_REQUEST)) { + ((slot->curcmd == req->stop && + (slot->quirks & SDHCI_QUIRK_BROKEN_AUTO_STOP)) || + (slot->quirks & SDHCI_QUIRK_RESET_AFTER_REQUEST))) { sdhci_reset(slot, SDHCI_RESET_CMD); sdhci_reset(slot, SDHCI_RESET_DATA); } Modified: head/sys/dev/sdhci/sdhci.h ============================================================================== --- head/sys/dev/sdhci/sdhci.h Tue May 9 18:54:35 2017 (r318094) +++ head/sys/dev/sdhci/sdhci.h Tue May 9 19:01:57 2017 (r318095) @@ -87,6 +87,8 @@ #define SDHCI_QUIRK_CAPS_BIT63_FOR_MMC_HS400 (1 << 26) /* Controller support for SDHCI_CTRL2_PRESET_VALUE is broken. */ #define SDHCI_QUIRK_PRESET_VALUE_BROKEN (1 << 27) +/* Controller does not support or the support for ACMD12 is broken. */ +#define SDHCI_QUIRK_BROKEN_AUTO_STOP (1 << 28) /* * Controller registers From owner-svn-src-head@freebsd.org Tue May 9 19:16:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 360E1D667E2; Tue, 9 May 2017 19:16:20 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E0BEC1483; Tue, 9 May 2017 19:16:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49JGIlC004983; Tue, 9 May 2017 19:16:18 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49JGIgd004982; Tue, 9 May 2017 19:16:18 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705091916.v49JGIgd004982@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 9 May 2017 19:16:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318098 - head/tests/sys/aio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 19:16:20 -0000 Author: ngie Date: Tue May 9 19:16:18 2017 New Revision: 318098 URL: https://svnweb.freebsd.org/changeset/base/318098 Log: Refactor ATF_REQUIRE_UNSAFE_AIO and PLAIN_REQUIRE_UNSAFE_AIO This is being done to reduce duplication between the two macros. MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/tests/sys/aio/local.h Modified: head/tests/sys/aio/local.h ============================================================================== --- head/tests/sys/aio/local.h Tue May 9 19:15:11 2017 (r318097) +++ head/tests/sys/aio/local.h Tue May 9 19:16:18 2017 (r318098) @@ -39,36 +39,49 @@ #include -#define ATF_REQUIRE_UNSAFE_AIO() do { \ - size_t _len; \ - int _unsafe; \ - \ - _len = sizeof(_unsafe); \ - if (sysctlbyname("vfs.aio.enable_unsafe", &_unsafe, &_len, NULL,\ - 0) < 0) { \ - if (errno != ENOENT) \ - atf_libc_error(errno, \ - "Failed to read vfs.aio.enable_unsafe"); \ - } else if (_unsafe == 0) \ - atf_tc_skip("Unsafe AIO is disabled"); \ +static const char *sysctl_oid_name = "vfs.aio.enable_unsafe"; + +static int +is_unsafe_aio_enabled(void) +{ + size_t len; + int unsafe; + + len = sizeof(unsafe); + if (sysctlbyname(sysctl_oid_name, &unsafe, &len, NULL, 0) < 0) { + if (errno == ENOENT) + return (-1); + return (0); + } + return (unsafe == 0 ? 0 : 1); +} + +#define ATF_REQUIRE_UNSAFE_AIO() do { \ + switch (is_unsafe_aio_enabled()) { \ + case -1: \ + atf_libc_error(errno, "Failed to read %s", sysctl_oid_name); \ + break; \ + case 0: \ + atf_tc_skip("Unsafe AIO is disabled"); \ + break; \ + default: \ + break; \ + } \ } while (0) -#define PLAIN_REQUIRE_UNSAFE_AIO(_exit_code) do { \ - size_t _len; \ - int _unsafe; \ - \ - _len = sizeof(_unsafe); \ - if (sysctlbyname("vfs.aio.enable_unsafe", &_unsafe, &_len, NULL,\ - 0) < 0) { \ - if (errno != ENOENT) { \ - printf("Failed to read vfs.aio.enable_unsafe: %s\n",\ - strerror(errno)); \ - _exit(1); \ - } \ - } else if (_unsafe == 0) { \ - printf("Unsafe AIO is disabled"); \ - _exit(_exit_code); \ - } \ +#define PLAIN_REQUIRE_UNSAFE_AIO(_exit_code) do { \ + switch (is_unsafe_aio_enabled()) { \ + case -1: \ + printf("Failed to read %s", sysctl_oid_name); \ + _exit(_exit_code); \ + break; \ + case 0: \ + printf("Unsafe AIO is disabled\n"); \ + _exit(_exit_code); \ + break; \ + default: \ + break; \ + } \ } while (0) #endif /* !_AIO_TEST_LOCAL_H_ */ From owner-svn-src-head@freebsd.org Tue May 9 19:20:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2AD56D6699D; Tue, 9 May 2017 19:20:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F0E93180F; Tue, 9 May 2017 19:20:03 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49JK3ME005317; Tue, 9 May 2017 19:20:03 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49JK30F005316; Tue, 9 May 2017 19:20:03 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705091920.v49JK30F005316@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 9 May 2017 19:20:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318099 - head/tests/sys/aio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 19:20:04 -0000 Author: ngie Date: Tue May 9 19:20:02 2017 New Revision: 318099 URL: https://svnweb.freebsd.org/changeset/base/318099 Log: Print out when unsafe AIO is enabled to debugging purposes MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/tests/sys/aio/local.h Modified: head/tests/sys/aio/local.h ============================================================================== --- head/tests/sys/aio/local.h Tue May 9 19:16:18 2017 (r318098) +++ head/tests/sys/aio/local.h Tue May 9 19:20:02 2017 (r318099) @@ -65,6 +65,7 @@ is_unsafe_aio_enabled(void) atf_tc_skip("Unsafe AIO is disabled"); \ break; \ default: \ + printf("Unsafe AIO is enabled\n"); \ break; \ } \ } while (0) @@ -80,6 +81,7 @@ is_unsafe_aio_enabled(void) _exit(_exit_code); \ break; \ default: \ + printf("Unsafe AIO is enabled\n"); \ break; \ } \ } while (0) From owner-svn-src-head@freebsd.org Tue May 9 19:23:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C56D5D66B08; Tue, 9 May 2017 19:23:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9459B1C4B; Tue, 9 May 2017 19:23:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49JNEmj009483; Tue, 9 May 2017 19:23:14 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49JNEmI009482; Tue, 9 May 2017 19:23:14 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705091923.v49JNEmI009482@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 9 May 2017 19:23:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318100 - head/tests/sys/aio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 19:23:15 -0000 Author: ngie Date: Tue May 9 19:23:14 2017 New Revision: 318100 URL: https://svnweb.freebsd.org/changeset/base/318100 Log: style(9): move function definition curly braces to column 0 MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/tests/sys/aio/aio_test.c Modified: head/tests/sys/aio/aio_test.c ============================================================================== --- head/tests/sys/aio/aio_test.c Tue May 9 19:20:02 2017 (r318099) +++ head/tests/sys/aio/aio_test.c Tue May 9 19:23:14 2017 (r318100) @@ -187,7 +187,8 @@ aio_context_init(struct aio_context *ac, } static ssize_t -poll(struct aiocb *aio) { +poll(struct aiocb *aio) +{ int error; while ((error = aio_error(aio)) == EINPROGRESS && !aio_timedout) @@ -204,7 +205,8 @@ poll(struct aiocb *aio) { } static ssize_t -suspend(struct aiocb *aio) { +suspend(struct aiocb *aio) +{ const struct aiocb *const iocbs[] = {aio}; int error; @@ -216,7 +218,8 @@ suspend(struct aiocb *aio) { } static ssize_t -waitcomplete(struct aiocb *aio) { +waitcomplete(struct aiocb *aio) +{ struct aiocb *aiop; ssize_t ret; From owner-svn-src-head@freebsd.org Tue May 9 20:21:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF343D64F66; Tue, 9 May 2017 20:21:40 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7260C1378; Tue, 9 May 2017 20:21:40 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49KLdA5030993; Tue, 9 May 2017 20:21:39 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49KLd3J030985; Tue, 9 May 2017 20:21:39 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201705092021.v49KLd3J030985@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 9 May 2017 20:21:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318105 - in head: . share/man/man7 sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 20:21:40 -0000 Author: bdrewery Date: Tue May 9 20:21:38 2017 New Revision: 318105 URL: https://svnweb.freebsd.org/changeset/base/318105 Log: Support skipping 'make obj' tree-walk. This is part of a larger effort for WITH_AUTO_OBJ and a WORLDFAST option. Sponsored by: Dell EMC Isilon Modified: head/Makefile.inc1 head/Makefile.libcompat head/share/man/man7/build.7 head/sys/conf/kern.post.mk head/sys/conf/kern.pre.mk Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue May 9 20:14:58 2017 (r318104) +++ head/Makefile.inc1 Tue May 9 20:21:38 2017 (r318105) @@ -310,6 +310,13 @@ CLEANDIR= cleandir NO_CLEAN= t .endif .endif +.if defined(NO_OBJ) || ${MK_AUTO_OBJ} == "yes" +NO_OBJ= t +NO_KERNELOBJ= t +.endif +.if !defined(NO_OBJ) +_obj= obj +.endif LOCAL_TOOL_DIRS?= PACKAGEDIR?= ${DESTDIR}/${DISTDIR} @@ -828,7 +835,11 @@ WMAKE_TGTS+= _worldtmp _legacy .if empty(SUBDIR_OVERRIDE) WMAKE_TGTS+= _bootstrap-tools .endif -WMAKE_TGTS+= _cleanobj _obj _build-tools _cross-tools +WMAKE_TGTS+= _cleanobj +.if !defined(NO_OBJ) +WMAKE_TGTS+= _obj +.endif +WMAKE_TGTS+= _build-tools _cross-tools WMAKE_TGTS+= _compiler-metadata WMAKE_TGTS+= _includes _libraries WMAKE_TGTS+= everything @@ -1610,7 +1621,7 @@ legacy: .PHONY .for _tool in tools/build ${_elftoolchain_libs} ${_+_}@${ECHODIR} "===> ${_tool} (obj,includes,all,install)"; \ cd ${.CURDIR}/${_tool}; \ - ${MAKE} DIRPRFX=${_tool}/ obj; \ + if [ -z "${NO_OBJ}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \ ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy includes; \ ${MAKE} DIRPRFX=${_tool}/ MK_INCLUDES=no all; \ ${MAKE} DIRPRFX=${_tool}/ MK_INCLUDES=no \ @@ -1766,7 +1777,7 @@ bootstrap-tools: .PHONY ${_bt}-${_tool}: .PHONY .MAKE ${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \ cd ${.CURDIR}/${_tool}; \ - ${MAKE} DIRPRFX=${_tool}/ obj; \ + if [ -z "${NO_OBJ}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \ ${MAKE} DIRPRFX=${_tool}/ all; \ ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy install @@ -1805,7 +1816,7 @@ _rescue=rescue/rescue build-tools_${_tool}: .PHONY ${_+_}@${ECHODIR} "===> ${_tool} (obj,build-tools)"; \ cd ${.CURDIR}/${_tool}; \ - ${MAKE} DIRPRFX=${_tool}/ obj; \ + if [ -z "${NO_OBJ}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \ ${MAKE} DIRPRFX=${_tool}/ build-tools build-tools: build-tools_${_tool} .endfor @@ -1814,7 +1825,7 @@ build-tools: build-tools_${_tool} build-tools_${_tool}: .PHONY ${_+_}@${ECHODIR} "===> ${_tool} (obj,all)"; \ cd ${.CURDIR}/${_tool}; \ - ${MAKE} DIRPRFX=${_tool}/ obj; \ + if [ -z "${NO_OBJ}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \ ${MAKE} DIRPRFX=${_tool}/ all build-tools: build-tools_${_tool} .endfor @@ -1899,7 +1910,7 @@ cross-tools: .MAKE .PHONY ${_usb_tools} ${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \ cd ${.CURDIR}/${_tool}; \ - ${MAKE} DIRPRFX=${_tool}/ obj; \ + if [ -z "${NO_OBJ}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \ ${MAKE} DIRPRFX=${_tool}/ all; \ ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX} install .endfor @@ -1931,7 +1942,7 @@ native-xtools: .PHONY mkdir -p ${OBJTREE}/gperf_for_gcc/usr/bin ${_+_}@${ECHODIR} "===> ${_gperf} (obj,all,install)"; \ cd ${.CURDIR}/${_gperf}; \ - ${NXBMAKE} DIRPRFX=${_gperf}/ obj; \ + if [ -z "${NO_OBJ}" ]; then ${NXBMAKE} DIRPRFX=${_gperf}/ obj; fi; \ ${NXBMAKE} DIRPRFX=${_gperf}/ all; \ ${NXBMAKE} DIRPRFX=${_gperf}/ DESTDIR=${OBJTREE}/gperf_for_gcc install .endif @@ -2007,7 +2018,7 @@ native-xtools: .PHONY usr.sbin/chown ${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \ cd ${.CURDIR}/${_tool}; \ - ${NXBMAKE} DIRPRFX=${_tool}/ obj; \ + if [ -z "${NO_OBJ}" ]; then ${NXBMAKE} DIRPRFX=${_tool}/ obj; fi; \ ${NXBMAKE} DIRPRFX=${_tool}/ all; \ ${NXBMAKE} DIRPRFX=${_tool}/ DESTDIR=${NXBDESTDIR} install .endfor @@ -2269,7 +2280,7 @@ ${_lib}__PL: .PHONY .MAKE .if exists(${.CURDIR}/${_lib}) ${_+_}@${ECHODIR} "===> ${_lib} (obj,all,install)"; \ cd ${.CURDIR}/${_lib}; \ - ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ obj; \ + if [ -z "${NO_OBJ}" ]; then ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ obj; fi; \ ${MAKE} MK_TESTS=no MK_PROFILE=no -DNO_PIC \ DIRPRFX=${_lib}/ all; \ ${MAKE} MK_TESTS=no MK_PROFILE=no -DNO_PIC \ @@ -2282,7 +2293,7 @@ ${_lib}__L: .PHONY .MAKE .if exists(${.CURDIR}/${_lib}) ${_+_}@${ECHODIR} "===> ${_lib} (obj,all,install)"; \ cd ${.CURDIR}/${_lib}; \ - ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ obj; \ + if [ -z "${NO_OBJ}" ]; then ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ obj; fi; \ ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ all; \ ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ install .endif @@ -2609,7 +2620,7 @@ _xb-bootstrap-tools: .PHONY ${_yacc} ${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \ cd ${.CURDIR}/${_tool}; \ - ${CDMAKE} DIRPRFX=${_tool}/ obj; \ + if [ -z "${NO_OBJ}" ]; then ${CDMAKE} DIRPRFX=${_tool}/ obj; fi; \ ${CDMAKE} DIRPRFX=${_tool}/ all; \ ${CDMAKE} DIRPRFX=${_tool}/ DESTDIR=${CDTMP} install .endfor @@ -2628,7 +2639,7 @@ _xb-cross-tools: .PHONY ${_gcc} ${_+_}@${ECHODIR} "===> xdev ${_tool} (obj,all)"; \ cd ${.CURDIR}/${_tool}; \ - ${CDMAKE} DIRPRFX=${_tool}/ obj; \ + if [ -z "${NO_OBJ}" ]; then ${CDMAKE} DIRPRFX=${_tool}/ obj; fi; \ ${CDMAKE} DIRPRFX=${_tool}/ all .endfor Modified: head/Makefile.libcompat ============================================================================== --- head/Makefile.libcompat Tue May 9 20:14:58 2017 (r318104) +++ head/Makefile.libcompat Tue May 9 20:21:38 2017 (r318105) @@ -163,7 +163,7 @@ build${libcompat}: .PHONY .endif mkdir -p ${WORLDTMP} ln -sf ${.CURDIR}/sys ${WORLDTMP} -.for _t in obj includes +.for _t in ${_obj} includes .for _dir in ${_LC_INCDIRS} ${_+_}cd ${.CURDIR}/${_dir}; ${LIBCOMPATWMAKE} MK_INCLUDES=yes \ DIRPRFX=${_dir}/ ${_t} @@ -180,7 +180,7 @@ build${libcompat}: .PHONY ${_+_}cd ${.CURDIR}; \ ${LIBCOMPATWMAKE} -f Makefile.inc1 -DNO_FSCHG libraries .if ${libcompat} == "32" -.for _t in obj all +.for _t in ${_obj} all ${_+_}cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIBCOMPATWMAKE} \ -DNO_FSCHG DIRPRFX=libexec/rtld-elf/ ${_t} ${_+_}cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIBCOMPATWMAKE} \ Modified: head/share/man/man7/build.7 ============================================================================== --- head/share/man/man7/build.7 Tue May 9 20:14:58 2017 (r318104) +++ head/share/man/man7/build.7 Tue May 9 20:21:38 2017 (r318105) @@ -605,6 +605,10 @@ If set, the update process does not upda documentation as part of the .Dq make update target. +.It Va NO_OBJ +If set, no object directories will be created. +This should only be used if object directories were created in a +previous build and no new directories are connected. .It Va NO_PORTSUPDATE If set, the update process does not update the Ports tree as part of the .Dq make update Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Tue May 9 20:14:58 2017 (r318104) +++ head/sys/conf/kern.post.mk Tue May 9 20:21:38 2017 (r318105) @@ -35,7 +35,7 @@ KERN_DEBUGDIR?= ${DEBUGDIR} .MAIN: all .for target in all clean cleandepend cleandir clobber depend install \ - obj reinstall tags + ${_obj} reinstall tags ${target}: kernel-${target} .if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists($S/modules) ${target}: modules-${target} Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Tue May 9 20:14:58 2017 (r318104) +++ head/sys/conf/kern.pre.mk Tue May 9 20:21:38 2017 (r318105) @@ -24,6 +24,14 @@ _srcconf_included_: .MAKE.MODE+= curdirOk=yes .endif +.if defined(NO_OBJ) || ${MK_AUTO_OBJ} == "yes" +NO_OBJ= t +NO_MODULES_OBJ= t +.endif +.if !defined(NO_OBJ) +_obj= obj +.endif + # Can be overridden by makeoptions or /etc/make.conf KERNEL_KO?= kernel KERNEL?= kernel From owner-svn-src-head@freebsd.org Tue May 9 20:22:00 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 870D1D6512F; Tue, 9 May 2017 20:22:00 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3A82C1551; Tue, 9 May 2017 20:22:00 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49KLxmH034155; Tue, 9 May 2017 20:21:59 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49KLx6r034152; Tue, 9 May 2017 20:21:59 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201705092021.v49KLx6r034152@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 9 May 2017 20:21:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318106 - in head: . share/man/man7 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 20:22:00 -0000 Author: bdrewery Date: Tue May 9 20:21:58 2017 New Revision: 318106 URL: https://svnweb.freebsd.org/changeset/base/318106 Log: Support -DWORLDFAST to skip all build steps up to 'libraries' and 'everything'. This allows for building the world against the already-created host/sysroot environment. It is not overly useful outside of cases of large-impact changes such as a testing a new compiler. It will allow quickly getting back to an error in the target-phases of the build where a new compiler is being used. Sponsored by: Dell EMC Isilon Modified: head/Makefile.inc1 head/share/man/man7/build.7 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue May 9 20:21:38 2017 (r318105) +++ head/Makefile.inc1 Tue May 9 20:21:58 2017 (r318106) @@ -302,6 +302,11 @@ CLEANDIR= clean cleandepend CLEANDIR= cleandir .endif +.if defined(WORLDFAST) +NO_CLEAN= t +NO_OBJ= t +.endif + .if ${MK_META_MODE} == "yes" # If filemon is used then we can rely on the build being incremental-safe. # The .meta files will also track the build command and rebuild should @@ -831,6 +836,7 @@ everything: .PHONY ${_+_}cd ${.CURDIR}; _PARALLEL_SUBDIR_OK=1 ${WMAKE} all WMAKE_TGTS= +.if !defined(WORLDFAST) WMAKE_TGTS+= _worldtmp _legacy .if empty(SUBDIR_OVERRIDE) WMAKE_TGTS+= _bootstrap-tools @@ -841,7 +847,9 @@ WMAKE_TGTS+= _obj .endif WMAKE_TGTS+= _build-tools _cross-tools WMAKE_TGTS+= _compiler-metadata -WMAKE_TGTS+= _includes _libraries +WMAKE_TGTS+= _includes +.endif +WMAKE_TGTS+= _libraries WMAKE_TGTS+= everything .if defined(LIBCOMPAT) && empty(SUBDIR_OVERRIDE) WMAKE_TGTS+= build${libcompat} Modified: head/share/man/man7/build.7 ============================================================================== --- head/share/man/man7/build.7 Tue May 9 20:21:38 2017 (r318105) +++ head/share/man/man7/build.7 Tue May 9 20:21:58 2017 (r318106) @@ -617,6 +617,16 @@ target. If set, the update process does not update the www tree as part of the .Dq make update target. +.It Va WORLDFAST +If set, the build target +.Cm buildworld +defaults to setting +.Va NO_CLEAN , +.Va NO_OBJ , +and will skip most bootstrap phases. +It will only bootstrap libraries and build all of userland. +This option should be used only when it is known that none of the bootstrap +needs changed and that no new directories have been connected to the build. .El .Pp Builds under directory From owner-svn-src-head@freebsd.org Tue May 9 20:26:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE26ED65245; Tue, 9 May 2017 20:26:44 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B378190C; Tue, 9 May 2017 20:26:44 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49KQhkU036321; Tue, 9 May 2017 20:26:43 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49KQhub036320; Tue, 9 May 2017 20:26:43 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705092026.v49KQhub036320@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 9 May 2017 20:26:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318107 - head/tests/sys/aio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 20:26:44 -0000 Author: ngie Date: Tue May 9 20:26:43 2017 New Revision: 318107 URL: https://svnweb.freebsd.org/changeset/base/318107 Log: Remove unused constant (PATH_TEMPLATE) It was made unnecessary in r312913. MFC after: 3 weeks MFC with: r312913 Sponsored by: Dell EMC Isilon Modified: head/tests/sys/aio/aio_test.c Modified: head/tests/sys/aio/aio_test.c ============================================================================== --- head/tests/sys/aio/aio_test.c Tue May 9 20:21:58 2017 (r318106) +++ head/tests/sys/aio/aio_test.c Tue May 9 20:26:43 2017 (r318107) @@ -63,8 +63,6 @@ #include "freebsd_test_suite/macros.h" #include "local.h" -#define PATH_TEMPLATE "aio.XXXXXXXXXX" - /* * GLOBAL_MAX sets the largest usable buffer size to be read and written, as * it sizes ac_buffer in the aio_context structure. It is also the default From owner-svn-src-head@freebsd.org Tue May 9 20:39:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 155B2D656C9 for ; Tue, 9 May 2017 20:39:20 +0000 (UTC) (envelope-from 0100015beeed2897-85c5b43b-da66-4c04-86ae-d4ebd3fd93e8-000000@amazonses.com) Received: from a8-237.smtp-out.amazonses.com (a8-237.smtp-out.amazonses.com [54.240.8.237]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CED85185 for ; Tue, 9 May 2017 20:39:19 +0000 (UTC) (envelope-from 0100015beeed2897-85c5b43b-da66-4c04-86ae-d4ebd3fd93e8-000000@amazonses.com) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=ae7m2yrxjw65l2cqdpjxuucyrvy564tn; d=tarsnap.com; t=1494362172; h=Subject:To:References:Cc:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=DnjoyBzGAjcvBemGuipj8e6EllRRfEYSCjaWuYMQTdM=; b=llg9OKvOcTYCnvubq4wIJBIc8oSUWnQn5o+BGzwa6NVVb1ZSenAmYUy4nNpL1jtS Y90XaKb+dfeUfNlSCR+JUVbwdeDsT11+unf+aPaLKQZzYpyyvUQUTnw8ammr7THwrJi BazFO+lryiPGBcooUW+yJH5ikLUXkpfPsParBZi8= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=224i4yxa5dv7c2xz3womw6peuasteono; d=amazonses.com; t=1494362171; h=Subject:To:References:Cc:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding:Feedback-ID; bh=DnjoyBzGAjcvBemGuipj8e6EllRRfEYSCjaWuYMQTdM=; b=NFJcEiChxjUwORek4tWuzMTodW2gpdFAfg8C0aOmgMZsko76rkp+kmtyQaOmh2Fz 7Wyun0D1N01cZRkQLufPVmYw1JAZwlvK3NdB5o8TRb91Cf3uqa16+wlqd+ndW0+pB0X vQQJsWp+EVbXciBeBcR2tis3cYF70rujJVfI1dD8= Subject: Re: svn commit: r301198 - head/sys/dev/xen/netfront To: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= References: <201606021116.u52BGajD047287@repo.freebsd.org> <0100015bccba6abc-4c3b1487-25e3-4640-8221-885341ece829-000000@email.amazonses.com> <20170509100912.h3ylwugahvfi5cc2@dhcp-3-128.uk.xensource.com> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Colin Percival Message-ID: <0100015beeed2897-85c5b43b-da66-4c04-86ae-d4ebd3fd93e8-000000@email.amazonses.com> Date: Tue, 9 May 2017 20:36:11 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20170509100912.h3ylwugahvfi5cc2@dhcp-3-128.uk.xensource.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-SES-Outgoing: 2017.05.09-54.240.8.237 Feedback-ID: 1.us-east-1.Lv9FVjaNvvR5llaqfLoOVbo2VxOELl7cjN0AOyXnPlk=:AmazonSES X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 20:39:20 -0000 On 05/09/17 03:09, Roger Pau Monn� wrote: > On Wed, May 03, 2017 at 05:13:40AM +0000, Colin Percival wrote: >> On 06/02/16 04:16, Roger Pau Monn� wrote: >>> Author: royger >>> Date: Thu Jun 2 11:16:35 2016 >>> New Revision: 301198 >>> URL: https://svnweb.freebsd.org/changeset/base/301198 >> >> I think this commit is responsible for panics I'm seeing in EC2 on T2 family >> instances. [...] >> but under high traffic volumes I think a separate thread can already be >> running in xn_rxeof, having dropped the RX lock while it passes a packet >> up the stack. This would result in two different threads trying to process >> the same set of responses from the ring, with (unsurprisingly) bad results. > > Hm, right, xn_rxeof drops the lock while pushing the packet up the stack. > There's a "XXX" comment on top of that, could you try to remove the lock > dripping and see what happens? > > I'm not sure there's any reason to drop the lock here, I very much doubt > if_input is going to sleep. Judging by $ grep -R -B 1 -A 1 if_input /usr/src/sys/dev I'm pretty sure that we do indeed need to drop the lock. If it's possible to enter if_input while holding locks, there are a *lot* of network interface drivers which are dropping locks unnecessarily... >> 3. Why xn_ifinit_locked is consuming ring responses. > > There might be pending RX packets on the ring, so netfront consumes them and > signals netback. In the unlikely event that the RX ring was full when > xn_ifinit_locked is called, not doing this would mean the RX queue would get > stuck forever, since there's no guarantee netfront will receive event channel > notifications. In that case, I'm guessing it would be safe to skip this if another thread is already running xn_rxeof and chewing through the packets on the ring? It would be easy to set a flag in xn_rxeof before we drop locks. -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From owner-svn-src-head@freebsd.org Tue May 9 20:39:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F32AD6570D; Tue, 9 May 2017 20:39:59 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 509B51B9; Tue, 9 May 2017 20:39:59 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49KdwgL041472; Tue, 9 May 2017 20:39:58 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49KdvXh041467; Tue, 9 May 2017 20:39:57 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705092039.v49KdvXh041467@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 20:39:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318109 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 20:39:59 -0000 Author: gjb Date: Tue May 9 20:39:57 2017 New Revision: 318109 URL: https://svnweb.freebsd.org/changeset/base/318109 Log: Correct "first appeared in" entries for various drivers that exist in stable/11. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/share/man/man4/bnxt.4 head/share/man/man4/bytgpio.4 head/share/man/man4/cxgbev.4 head/share/man/man4/jedec_ts.4 head/share/man/man4/qlnxe.4 Modified: head/share/man/man4/bnxt.4 ============================================================================== --- head/share/man/man4/bnxt.4 Tue May 9 20:37:40 2017 (r318108) +++ head/share/man/man4/bnxt.4 Tue May 9 20:39:57 2017 (r318109) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 16, 2016 +.Dd May 9, 2017 .Dt BNXT 4 .Os .Sh NAME @@ -213,7 +213,7 @@ As of this writing, the system must be r The .Nm device driver first appeared in -.Fx 12.0 . +.Fx 11.1 . .Sh AUTHORS .An -nosplit The Modified: head/share/man/man4/bytgpio.4 ============================================================================== --- head/share/man/man4/bytgpio.4 Tue May 9 20:37:40 2017 (r318108) +++ head/share/man/man4/bytgpio.4 Tue May 9 20:39:57 2017 (r318109) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2016 +.Dd May 9, 2017 .Dt BYTGPIO 4 .Os .Sh NAME @@ -49,7 +49,7 @@ on boards schematics: GPIO_S0_SCnn, GPIO The .Nm manual page first appeared in -.Fx 12.0 . +.Fx 11.1 . .Sh AUTHORS This driver and man page was written by .An Oleksandr Tymoshenko Aq Mt gonzo@FreeBSD.org . Modified: head/share/man/man4/cxgbev.4 ============================================================================== --- head/share/man/man4/cxgbev.4 Tue May 9 20:37:40 2017 (r318108) +++ head/share/man/man4/cxgbev.4 Tue May 9 20:39:57 2017 (r318109) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 22, 2016 +.Dd May 9, 2017 .Dt CXGBEV 4 .Os .Sh NAME @@ -312,7 +312,7 @@ The device driver first appeared in .Fx 11.1 and -.Fx 12.0 . +.Fx 11.1 . .Sh AUTHORS .An -nosplit The Modified: head/share/man/man4/jedec_ts.4 ============================================================================== --- head/share/man/man4/jedec_ts.4 Tue May 9 20:37:40 2017 (r318108) +++ head/share/man/man4/jedec_ts.4 Tue May 9 20:39:57 2017 (r318109) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 13, 2016 +.Dd May 9, 2017 .Dt JEDEC_TS 4 .Os .Sh NAME @@ -121,7 +121,7 @@ dev.jedec_ts.1.temp: 40.7500C The .Nm driver first appeared in -.Fx 12.0 . +.Fx 11.1 . .Sh AUTHORS .An -nosplit The Modified: head/share/man/man4/qlnxe.4 ============================================================================== --- head/share/man/man4/qlnxe.4 Tue May 9 20:37:40 2017 (r318108) +++ head/share/man/man4/qlnxe.4 Tue May 9 20:39:57 2017 (r318109) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 24, 2017 +.Dd May 9, 2017 .Dt QLNXE 4 .Os .Sh NAME @@ -80,7 +80,7 @@ or by E-mail at The .Nm device driver first appeared in -.Fx 12.0 . +.Fx 11.1 . .Sh AUTHORS .An -nosplit The From owner-svn-src-head@freebsd.org Tue May 9 20:45:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9FD2D65C2C; Tue, 9 May 2017 20:45:22 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 610DD112A; Tue, 9 May 2017 20:45:22 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49KjLxm045535; Tue, 9 May 2017 20:45:21 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49KjLQi045534; Tue, 9 May 2017 20:45:21 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705092045.v49KjLQi045534@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 9 May 2017 20:45:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318116 - head/usr.bin/resizewin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 20:45:22 -0000 Author: trasz Date: Tue May 9 20:45:21 2017 New Revision: 318116 URL: https://svnweb.freebsd.org/changeset/base/318116 Log: Random updates to resizewin(1) man page. Reviewed by: cem, Daniel O'Connor MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D10640 Modified: head/usr.bin/resizewin/resizewin.1 Modified: head/usr.bin/resizewin/resizewin.1 ============================================================================== --- head/usr.bin/resizewin/resizewin.1 Tue May 9 20:43:57 2017 (r318115) +++ head/usr.bin/resizewin/resizewin.1 Tue May 9 20:45:21 2017 (r318116) @@ -27,27 +27,38 @@ .\" .\" $FreeBSD$ .\" -.Dd May 8, 2017 +.Dd May 9, 2017 .Dt RESIZEWIN 1 .Os .Sh NAME .Nm resizewin -.Nd update the kernel window size for the current TTY +.Nd update terminal size .Sh SYNOPSIS .Nm .Op Fl z .Sh DESCRIPTION -Query the terminal emulator window size with the +The +.Nm +utility +queries the terminal emulator for the current window size and updates +the size known to the kernel using the .Dv TIOCSWINSZ -ioctl and set the window size known by the kernel to the new values. -The terminal is assumed to be VT100/ANSI compatible. +ioctl. .Pp The following options are available: .Bl -tag -width ".Fl z" .It Fl z Do nothing unless the current kernel terminal size is zero. +This is useful when run from user's profile (shell startup) scripts: +querying the window size is required for serial lines, but not when +logging in over the network, as protocols like TELNET or SSH already +handle the terminal size by themselves. .El .Pp +After a terminal window has been resized, running +.Nm +updates the kernel's window size to match the new size. +.Pp .Nm is functionally similar to .Xr resize 1 , @@ -56,21 +67,18 @@ which is part of the distribution. However, .Nm -only works with VT100/ANSI-compatible terminals and does -not emit commands to set environment variables. +only works with VT100/ANSI-compatible terminals and directly sets +the terminal size instead of emitting commands to set environment variables. .Pp -After a terminal window has been resized, running -.Nm -updates the kernel's window size to match the new size. -.Pp -Note that virtually all modern terninals support VT100/ANSI escape -sequences, including xterm, konsole, gnome-terminal iTerm, +The terminal is assumed to be VT100/ANSI compatible. +The VT100/ANSI escape sequences are supported by virtually all modern +terminals; this include xterm, konsole, gnome-terminal, iTerm, Terminal.app, and PuTTY. .Sh SEE ALSO -.Xr resize 1 , -.Xr stty 1 +.Xr stty 1 , +.Xr tty 4 .Sh HISTORY The .Nm command first appeared in -.Fx 11 . +.Fx 11.0 . From owner-svn-src-head@freebsd.org Tue May 9 23:30:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F13CCD666AA for ; Tue, 9 May 2017 23:30:57 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5FCCA75 for ; Tue, 9 May 2017 23:30:57 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 43738c9c-350f-11e7-8c46-c35e37f62db1 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound2.ore.mailhop.org (Halon) with ESMTPSA id 43738c9c-350f-11e7-8c46-c35e37f62db1; Tue, 09 May 2017 23:28:53 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v49NTlL8002313; Tue, 9 May 2017 17:29:47 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1494372587.59865.9.camel@freebsd.org> Subject: Re: svn commit: r318017 - head/share/man/man4 From: Ian Lepore To: Edward Tomasz Napierala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Tue, 09 May 2017 17:29:47 -0600 In-Reply-To: <201705090836.v498a9JJ035778@repo.freebsd.org> References: <201705090836.v498a9JJ035778@repo.freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 23:30:58 -0000 On Tue, 2017-05-09 at 08:36 +0000, Edward Tomasz Napierala wrote: > Author: trasz > Date: Tue May  9 08:36:09 2017 > New Revision: 318017 > URL: https://svnweb.freebsd.org/changeset/base/318017 > > Log: >   Fix device paths for USB serial adapters: the formatting strings >   contain "%u", differently from eg uart(4) which uses "%r". >    What is %r and where is it documented? -- Ian From owner-svn-src-head@freebsd.org Tue May 9 23:39:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08405D669A5 for ; Tue, 9 May 2017 23:39:30 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22e.google.com (mail-it0-x22e.google.com [IPv6:2607:f8b0:4001:c0b::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CDF781084 for ; Tue, 9 May 2017 23:39:29 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22e.google.com with SMTP id o5so15469521ith.1 for ; Tue, 09 May 2017 16:39:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=TM4N0GPA34R+/vLn2bQiTOB+AMB2jhrUKSuzYFvAuzk=; b=fXZmz1wI1xA8ekRmyrFJwA+jrdQ1pTQjquRndBv+fqlmItRHv2g9VncRVwEGplO3Rv Y+sagxumQhAHJxxUIg3PCs37pOc3QhM4Qmhwemst02o19cVRsdxeDpnb47N43nyJraYb QWC7SylbYkuJ9DzkXdbWHuu3x2en2yZyyig0Y0tbLVau2IlefCcO6bOhLDtOcddvesw5 kot8zyJRCNub2j8HALH7WXNfwPaBnNflYfVyEGPauMAyNvFRfUcXucfRP/USzPx0pa1Y pJhy6AqGrJXHtDokt3wHOehsNLODS++7z9MQXH5vRmWG4AVlfXug2kvdzWsqMMwZ0gTH RTfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=TM4N0GPA34R+/vLn2bQiTOB+AMB2jhrUKSuzYFvAuzk=; b=fTSGCMra2SNoPNhS6J5HIvHW+VpYh1Csh6uhtN5Bvj82XLUZKWKO+LlxIBU0rlS3ig rQvLQAKfE/6K9xVAkGYm0OOYTqU1LC+M4smHIDWAbaMsrdirFgTo89mret3NjdFpVdy6 MzRTUMgPm9Mdz3YlJ5YcrTn18l4pYVMNhA0LwE+L04klHtVonl4CORzHpCswbzxVRVYp 92qXjN6CU+0hVSX3I3UsZSqPZyAeRKfXvqYN8yjyGMYgiG/LYHB+5sYfr1VixlFHzTFK i5mU2uOxonzHaOROSB7v0xXZh9D6+B0sVPLzgOcLuzSY0a/6uEs34jI/hLT31lVJv/lK dcyg== X-Gm-Message-State: AODbwcBJ7Zr6r0yFPHGdhZaJgIOt9e2Ft7X+YNUBbJsGbAo3ili1MKNO UxVcsAOR3FVIknajEes51i074fZfLA== X-Received: by 10.36.181.1 with SMTP id v1mr2947613ite.103.1494373168900; Tue, 09 May 2017 16:39:28 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.126.6 with HTTP; Tue, 9 May 2017 16:39:28 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:d47:7464:7e21:6b87] In-Reply-To: <1494372587.59865.9.camel@freebsd.org> References: <201705090836.v498a9JJ035778@repo.freebsd.org> <1494372587.59865.9.camel@freebsd.org> From: Warner Losh Date: Tue, 9 May 2017 17:39:28 -0600 X-Google-Sender-Auth: gB-KnWWI0J9UiFl0Pbl25KTP1os Message-ID: Subject: Re: svn commit: r318017 - head/share/man/man4 To: Ian Lepore Cc: Edward Tomasz Napierala , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 23:39:30 -0000 It's the passed in radix. In this case it is 32: len = vsnrprintf(dev->si_name, sizeof(dev->si_name), 32, fmt, ap); so we get things like ttya following tty9. It should be in printf(9), but isn't. Warner On Tue, May 9, 2017 at 5:29 PM, Ian Lepore wrote: > On Tue, 2017-05-09 at 08:36 +0000, Edward Tomasz Napierala wrote: >> Author: trasz >> Date: Tue May 9 08:36:09 2017 >> New Revision: 318017 >> URL: https://svnweb.freebsd.org/changeset/base/318017 >> >> Log: >> Fix device paths for USB serial adapters: the formatting strings >> contain "%u", differently from eg uart(4) which uses "%r". >> > > What is %r and where is it documented? > > -- Ian > > From owner-svn-src-head@freebsd.org Tue May 9 23:58:08 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6205D66F1A; Tue, 9 May 2017 23:58:08 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97F9B19D4; Tue, 9 May 2017 23:58:08 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49Nw7Ce024212; Tue, 9 May 2017 23:58:07 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49Nw7uj024210; Tue, 9 May 2017 23:58:07 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201705092358.v49Nw7uj024210@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 9 May 2017 23:58:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318122 - in head: . share/man/man7 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 23:58:08 -0000 Author: bdrewery Date: Tue May 9 23:58:07 2017 New Revision: 318122 URL: https://svnweb.freebsd.org/changeset/base/318122 Log: Add a -DNO_LIBS to skip building the libraries phase as well. This is useful for cases where -DWORLDFAST is useful. Sponsored by: Dell EMC Isilon Modified: head/Makefile.inc1 head/share/man/man7/build.7 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue May 9 23:31:09 2017 (r318121) +++ head/Makefile.inc1 Tue May 9 23:58:07 2017 (r318122) @@ -849,7 +849,9 @@ WMAKE_TGTS+= _build-tools _cross-tools WMAKE_TGTS+= _compiler-metadata WMAKE_TGTS+= _includes .endif +.if !defined(NO_LIBS) WMAKE_TGTS+= _libraries +.endif WMAKE_TGTS+= everything .if defined(LIBCOMPAT) && empty(SUBDIR_OVERRIDE) WMAKE_TGTS+= build${libcompat} Modified: head/share/man/man7/build.7 ============================================================================== --- head/share/man/man7/build.7 Tue May 9 23:31:09 2017 (r318121) +++ head/share/man/man7/build.7 Tue May 9 23:58:07 2017 (r318122) @@ -605,6 +605,8 @@ If set, the update process does not upda documentation as part of the .Dq make update target. +.It Va NO_LIBS +If set, the libraries phase will be skipped. .It Va NO_OBJ If set, no object directories will be created. This should only be used if object directories were created in a From owner-svn-src-head@freebsd.org Wed May 10 00:02:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB627D64038; Wed, 10 May 2017 00:02:25 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB8931E13; Wed, 10 May 2017 00:02:25 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4A02OgY028230; Wed, 10 May 2017 00:02:24 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4A02OhC028229; Wed, 10 May 2017 00:02:24 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201705100002.v4A02OhC028229@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 10 May 2017 00:02:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318123 - head/share/man/man7 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 00:02:26 -0000 Author: bdrewery Date: Wed May 10 00:02:24 2017 New Revision: 318123 URL: https://svnweb.freebsd.org/changeset/base/318123 Log: SUBDIR_OVERRIDE: Note how to restore historical behavior pre-r289725. Sponsored by: Dell EMC Isilon Modified: head/share/man/man7/build.7 Modified: head/share/man/man7/build.7 ============================================================================== --- head/share/man/man7/build.7 Tue May 9 23:58:07 2017 (r318122) +++ head/share/man/man7/build.7 Wed May 10 00:02:24 2017 (r318123) @@ -499,6 +499,11 @@ If combined with .Cm buildworld then all libraries and includes, and some of the build tools will still build as well. +Specifying +.Cm -DNO_LIBS , +and +.Cm -DWORLDFAST +will only build the specified directory as was done historically. When combined with .Cm buildworld it is necesarry to override From owner-svn-src-head@freebsd.org Wed May 10 00:14:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24F57D64617; Wed, 10 May 2017 00:14:57 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB57FB67; Wed, 10 May 2017 00:14:56 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4A0EuGR032198; Wed, 10 May 2017 00:14:56 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4A0Et2W032197; Wed, 10 May 2017 00:14:55 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705100014.v4A0Et2W032197@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 10 May 2017 00:14:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318124 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 00:14:57 -0000 Author: np Date: Wed May 10 00:14:55 2017 New Revision: 318124 URL: https://svnweb.freebsd.org/changeset/base/318124 Log: ip6_output runs with the inp lock held, just like ip_output. Modified: head/sys/netinet6/ip6_output.c Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Wed May 10 00:02:24 2017 (r318123) +++ head/sys/netinet6/ip6_output.c Wed May 10 00:14:55 2017 (r318124) @@ -325,6 +325,7 @@ ip6_output(struct mbuf *m0, struct ip6_p uint32_t id; if (inp != NULL) { + INP_LOCK_ASSERT(inp); M_SETFIB(m, inp->inp_inc.inc_fibnum); if ((flags & IP_NODEFAULTFLOWID) == 0) { /* unconditionally set flowid */ From owner-svn-src-head@freebsd.org Wed May 10 00:42:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CCCDAD64E0D; Wed, 10 May 2017 00:42:29 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C0B1185F; Wed, 10 May 2017 00:42:29 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4A0gSFS044200; Wed, 10 May 2017 00:42:28 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4A0gSvW044199; Wed, 10 May 2017 00:42:28 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705100042.v4A0gSvW044199@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 10 May 2017 00:42:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318125 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 00:42:29 -0000 Author: np Date: Wed May 10 00:42:28 2017 New Revision: 318125 URL: https://svnweb.freebsd.org/changeset/base/318125 Log: Adjust whitespace and fix a comment. No functional change. MFC after: 3 days Modified: head/sys/dev/cxgbe/adapter.h Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Wed May 10 00:14:55 2017 (r318124) +++ head/sys/dev/cxgbe/adapter.h Wed May 10 00:42:28 2017 (r318125) @@ -204,11 +204,11 @@ struct vi_info { int first_intr; /* These need to be int as they are used in sysctl */ - int ntxq; /* # of tx queues */ - int first_txq; /* index of first tx queue */ - int rsrv_noflowq; /* Reserve queue 0 for non-flowid packets */ - int nrxq; /* # of rx queues */ - int first_rxq; /* index of first rx queue */ + int ntxq; /* # of tx queues */ + int first_txq; /* index of first tx queue */ + int rsrv_noflowq; /* Reserve queue 0 for non-flowid packets */ + int nrxq; /* # of rx queues */ + int first_rxq; /* index of first rx queue */ int nofldtxq; /* # of offload tx queues */ int first_ofld_txq; /* index of first offload tx queue */ int nofldrxq; /* # of offload rx queues */ @@ -705,7 +705,7 @@ struct sge_nm_txq { struct sge { int nrxq; /* total # of Ethernet rx queues */ - int ntxq; /* total # of Ethernet tx tx queues */ + int ntxq; /* total # of Ethernet tx queues */ int nofldrxq; /* total # of TOE rx queues */ int nofldtxq; /* total # of TOE tx queues */ int nnmrxq; /* total # of netmap rx queues */ From owner-svn-src-head@freebsd.org Wed May 10 00:47:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DDC9FD64F5C; Wed, 10 May 2017 00:47:49 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id A643D1A57; Wed, 10 May 2017 00:47:49 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id 4EB3DD444EE; Wed, 10 May 2017 10:47:41 +1000 (AEST) Date: Wed, 10 May 2017 10:47:36 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Ian Lepore cc: Edward Tomasz Napierala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318017 - head/share/man/man4 In-Reply-To: <1494372587.59865.9.camel@freebsd.org> Message-ID: <20170510095816.X5705@besplex.bde.org> References: <201705090836.v498a9JJ035778@repo.freebsd.org> <1494372587.59865.9.camel@freebsd.org> MIME-Version: 1.0 X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=VbSHBBh9 c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=nlC_4_pT8q9DhB4Ho9EA:9 a=6I5d2MoRAAAA:8 a=n3V31rENc5Mu-Ry0EfMA:9 a=45ClL6m2LaAA:10 a=IjZwj45LgO3ly-622nXo:22 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 00:47:50 -0000 On Tue, 9 May 2017, Ian Lepore wrote: > On Tue, 2017-05-09 at 08:36 +0000, Edward Tomasz Napierala wrote: >> Author: trasz >> Date: Tue May=A0=A09 08:36:09 2017 >> New Revision: 318017 >> URL: https://svnweb.freebsd.org/changeset/base/318017 >> >> Log: >> =A0 Fix device paths for USB serial adapters: the formatting strings >> =A0 contain "%u", differently from eg uart(4) which uses "%r". >> =A0=A0 > > What is %r and where is it documented? In the source code. It was a ddb internal (but supported by -fformat-extensions, except IIRC for %jr (1)), but is now used by makedev(). For ddb, %r means to use ddb's radix. All output in ddb must go through db_printf(). db_printf() calls kvprintf() with ddb's radix as an arg. Unlike printf(3), kvprintf(9) supports arbitrary radixes and special formats like signed hex (%y format). kvprintf() is of course undocumented. %y is another ddb internal, like %r except it is not so useful or used outside of ddb. make_dev() supports a dumbed down version of %r. %r for make_dev() always means radix 32. This is implemented by calling vnsrprintf(9) with a hard-coded 32 as an arg since kvprintf() is unsuitable. vnsrprintf() is of course undocumented. %r implies %d. I think the strange-looking %dr works too, but the normal-looking %rd might not. db mostly use %...lr, but never a bare %lr, so use of %r is a bit hard to grep for. ddb rarely uses the long long abomination or intmax_t (it assumes that plain long is long enough, as was correct in C90), and never uses %...jr or %...yr, but I think these work except for (1). It might be a bug to hard-code hex or decimal formats instead of using %r (this is sometimes done for addresses, when the user's radix is not usually wanted, but is still too hard-coded). (1) kvprintf() handles extensions like %r and %y[r] in a general way that should work if %d or %x[r] works. But -fformat-extensions doesn't support %r or %y for intmax_t, so these formats are unusable and unused in practice= =2E The serial driver man pages are still deficient in not documenting what '?' and '*' mean. '?' is not a general wild card, but means specifically base 32 with 1 digit. This naming scheme was familar since it was used by ptys, to go up to 1024 with only 2 digits. It is still documented in pty(4) with enough details as 2 digits but not full range ([l-sL-S][0-9a-v]). I'm not sure if the first digit is restricted by the implementation or just by convention. Bruce From owner-svn-src-head@freebsd.org Wed May 10 01:01:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F31EBD653FF; Wed, 10 May 2017 01:01:21 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE8FD82; Wed, 10 May 2017 01:01:21 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4A11KRJ051952; Wed, 10 May 2017 01:01:20 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4A11KEw051951; Wed, 10 May 2017 01:01:20 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201705100101.v4A11KEw051951@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Wed, 10 May 2017 01:01:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318126 - head/sys/dev/qlnx/qlnxe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 01:01:22 -0000 Author: davidcs Date: Wed May 10 01:01:20 2017 New Revision: 318126 URL: https://svnweb.freebsd.org/changeset/base/318126 Log: llh_func_filter needs to be configured for 100G MFC after:3 days Modified: head/sys/dev/qlnx/qlnxe/ecore_dev.c Modified: head/sys/dev/qlnx/qlnxe/ecore_dev.c ============================================================================== --- head/sys/dev/qlnx/qlnxe/ecore_dev.c Wed May 10 00:42:28 2017 (r318125) +++ head/sys/dev/qlnx/qlnxe/ecore_dev.c Wed May 10 01:01:20 2017 (r318126) @@ -1986,6 +1986,15 @@ static enum _ecore_status_t ecore_hw_ini } } #endif + /* Add an LLH filter with the primary MAC address. */ + if (p_hwfn->p_dev->num_hwfns > 1 && IS_LEAD_HWFN(p_hwfn)) { + rc = ecore_llh_add_mac_filter(p_hwfn, p_ptt, + p_hwfn->hw_info.hw_mac_addr); + if (rc != ECORE_SUCCESS) + DP_NOTICE(p_hwfn, false, + "Failed to add an LLH filter with the primary MAC\n"); + } + if (b_hw_start) { /* enable interrupts */ rc = ecore_int_igu_enable(p_hwfn, p_ptt, int_mode); @@ -2473,6 +2482,11 @@ enum _ecore_status_t ecore_hw_stop(struc rc2 = ECORE_UNKNOWN_ERROR; } } + + /* remove the LLH filter with the primary MAC addres */ + if (p_hwfn->p_dev->num_hwfns > 1 && IS_LEAD_HWFN(p_hwfn)) + ecore_llh_remove_mac_filter(p_hwfn, p_ptt, + p_hwfn->hw_info.hw_mac_addr); } /* hwfn loop */ if (IS_PF(p_dev)) { @@ -4569,7 +4583,7 @@ enum _ecore_status_t ecore_llh_add_mac_f } DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "MAC: %02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx is added at %d\n", + "MAC: %02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx is added at LLH entry %d\n", p_filter[0], p_filter[1], p_filter[2], p_filter[3], p_filter[4], p_filter[5], entry_num); @@ -4651,7 +4665,7 @@ void ecore_llh_remove_mac_filter(struct } DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "MAC: %02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx was removed from %d\n", + "MAC: %02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx was removed from LLH entry %d\n", p_filter[0], p_filter[1], p_filter[2], p_filter[3], p_filter[4], p_filter[5], entry_num); } @@ -4760,37 +4774,37 @@ ecore_llh_add_protocol_filter(struct eco switch (type) { case ECORE_LLH_FILTER_ETHERTYPE: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "ETH type %x is added at %d\n", + "ETH type %x is added at LLH entry %d\n", source_port_or_eth_type, entry_num); break; case ECORE_LLH_FILTER_TCP_SRC_PORT: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "TCP src port %x is added at %d\n", + "TCP src port %x is added at LLH entry %d\n", source_port_or_eth_type, entry_num); break; case ECORE_LLH_FILTER_UDP_SRC_PORT: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "UDP src port %x is added at %d\n", + "UDP src port %x is added at LLH entry %d\n", source_port_or_eth_type, entry_num); break; case ECORE_LLH_FILTER_TCP_DEST_PORT: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "TCP dst port %x is added at %d\n", + "TCP dst port %x is added at LLH entry %d\n", dest_port, entry_num); break; case ECORE_LLH_FILTER_UDP_DEST_PORT: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "UDP dst port %x is added at %d\n", + "UDP dst port %x is added at LLH entry %d\n", dest_port, entry_num); break; case ECORE_LLH_FILTER_TCP_SRC_AND_DEST_PORT: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "TCP src/dst ports %x/%x are added at %d\n", + "TCP src/dst ports %x/%x are added at LLH entry %d\n", source_port_or_eth_type, dest_port, entry_num); break; case ECORE_LLH_FILTER_UDP_SRC_AND_DEST_PORT: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "UDP src/dst ports %x/%x are added at %d\n", + "UDP src/dst ports %x/%x are added at LLH entry %d\n", source_port_or_eth_type, dest_port, entry_num); break; } @@ -4917,7 +4931,7 @@ ecore_llh_remove_protocol_filter(struct } DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "Protocol filter [type %d, source_port_or_eth_type 0x%x, dest_port 0x%x] was removed from %d\n", + "Protocol filter [type %d, source_port_or_eth_type 0x%x, dest_port 0x%x] was removed from LLH entry %d\n", type, source_port_or_eth_type, dest_port, entry_num); } From owner-svn-src-head@freebsd.org Wed May 10 03:20:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41E3BD654CC; Wed, 10 May 2017 03:20:22 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 13AF21D6B; Wed, 10 May 2017 03:20:22 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4A3KLxW005741; Wed, 10 May 2017 03:20:21 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4A3KLwn005740; Wed, 10 May 2017 03:20:21 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201705100320.v4A3KLwn005740@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 10 May 2017 03:20:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318129 - head/sys/cddl/dev/fbt/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 03:20:22 -0000 Author: jhibbits Date: Wed May 10 03:20:20 2017 New Revision: 318129 URL: https://svnweb.freebsd.org/changeset/base/318129 Log: Fix check for fbt_excluded() in powerpc fbt_excluded() returns 1 if the symbol is to be excluded. Every other arch has this correct, powerpc was the only broken one MFC after: 1 week Modified: head/sys/cddl/dev/fbt/powerpc/fbt_isa.c Modified: head/sys/cddl/dev/fbt/powerpc/fbt_isa.c ============================================================================== --- head/sys/cddl/dev/fbt/powerpc/fbt_isa.c Wed May 10 01:39:21 2017 (r318128) +++ head/sys/cddl/dev/fbt/powerpc/fbt_isa.c Wed May 10 03:20:20 2017 (r318129) @@ -127,7 +127,7 @@ fbt_provide_module_function(linker_file_ return (0); #endif - if (fbt_excluded(name) == 0) + if (fbt_excluded(name)) return (0); instr = (uint32_t *) symval->value; From owner-svn-src-head@freebsd.org Wed May 10 03:47:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D90EBD65A9C; Wed, 10 May 2017 03:47:23 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A9200DF2; Wed, 10 May 2017 03:47:23 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4A3lMUj017858; Wed, 10 May 2017 03:47:22 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4A3lMl1017857; Wed, 10 May 2017 03:47:22 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201705100347.v4A3lMl1017857@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 10 May 2017 03:47:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318130 - head/sys/cddl/dev/fbt/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 03:47:24 -0000 Author: jhibbits Date: Wed May 10 03:47:22 2017 New Revision: 318130 URL: https://svnweb.freebsd.org/changeset/base/318130 Log: Fix the encoded instruction for FBT traps on powerpc r314370 changed EXC_DTRACE to a different instruction, but neglected to make the same change to fbt, so dtrace didn't actually pick it up, resulting in entering KDB instead of trapping for dtrace. MFC after: 1 week Modified: head/sys/cddl/dev/fbt/powerpc/fbt_isa.c Modified: head/sys/cddl/dev/fbt/powerpc/fbt_isa.c ============================================================================== --- head/sys/cddl/dev/fbt/powerpc/fbt_isa.c Wed May 10 03:20:20 2017 (r318129) +++ head/sys/cddl/dev/fbt/powerpc/fbt_isa.c Wed May 10 03:47:22 2017 (r318130) @@ -37,7 +37,7 @@ #include "fbt.h" -#define FBT_PATCHVAL 0x7c810808 +#define FBT_PATCHVAL 0x7ffff808 #define FBT_MFLR_R0 0x7c0802a6 #define FBT_MTLR_R0 0x7c0803a6 #define FBT_BLR 0x4e800020 From owner-svn-src-head@freebsd.org Wed May 10 05:07:42 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5E5ED6644E; Wed, 10 May 2017 05:07:42 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D17E1E0C; Wed, 10 May 2017 05:07:42 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4A57fpc050553; Wed, 10 May 2017 05:07:41 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4A57fbi050552; Wed, 10 May 2017 05:07:41 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201705100507.v4A57fbi050552@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Wed, 10 May 2017 05:07:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318135 - head/contrib/binutils/gas/config X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 05:07:42 -0000 Author: mmel Date: Wed May 10 05:07:41 2017 New Revision: 318135 URL: https://svnweb.freebsd.org/changeset/base/318135 Log: Fix parsing of 'vmov Q.F32,Q.F32' instruction. parse_qfloat_immediate() accidentaly parses register with size qualifier as immediate constant (It takes '.' substring as valid floating point constant). Due to this, slightly reorder cases in parse_neon_mov() and move parsing of vmov with immediate constant to last place. MFC after: 2 weeks Modified: head/contrib/binutils/gas/config/tc-arm.c Modified: head/contrib/binutils/gas/config/tc-arm.c ============================================================================== --- head/contrib/binutils/gas/config/tc-arm.c Wed May 10 05:05:21 2017 (r318134) +++ head/contrib/binutils/gas/config/tc-arm.c Wed May 10 05:07:41 2017 (r318135) @@ -5211,12 +5211,6 @@ parse_neon_mov (char **str, int *which_o inst.operands[i].present = 1; } } - else if (parse_qfloat_immediate (&ptr, &inst.operands[i].imm) == SUCCESS) - /* Case 2: VMOV.
, # - Case 3: VMOV.
, # - Case 10: VMOV.F32 , # - Case 11: VMOV.F64
, # */ - inst.operands[i].immisfloat = 1; else if ((val = arm_typed_reg_parse (&ptr, REG_TYPE_NSDQ, &rtype, &optype)) != FAIL) { @@ -5253,9 +5247,15 @@ parse_neon_mov (char **str, int *which_o inst.operands[i].reg = val; inst.operands[i].isreg = 1; - inst.operands[i++].present = 1; + inst.operands[i].present = 1; } } + else if (parse_qfloat_immediate (&ptr, &inst.operands[i].imm) == SUCCESS) + /* Case 2: VMOV.
, # + Case 3: VMOV.
, # + Case 10: VMOV.F32 , # + Case 11: VMOV.F64
, # */ + inst.operands[i].immisfloat = 1; else if (parse_big_immediate (&ptr, i) == SUCCESS) /* Case 2: VMOV.
, # Case 3: VMOV.
, # */ @@ -5337,7 +5337,7 @@ parse_neon_mov (char **str, int *which_o inst.operands[i].isvec = 1; inst.operands[i].issingle = 1; inst.operands[i].vectype = optype; - inst.operands[i++].present = 1; + inst.operands[i].present = 1; } } else From owner-svn-src-head@freebsd.org Wed May 10 05:28:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4349ED66993; Wed, 10 May 2017 05:28:16 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05AF3A06; Wed, 10 May 2017 05:28:15 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4A5SFlh058517; Wed, 10 May 2017 05:28:15 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4A5SEb9058509; Wed, 10 May 2017 05:28:14 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201705100528.v4A5SEb9058509@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Wed, 10 May 2017 05:28:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318136 - in head/sys: conf dev/acpica dev/hyperv/vmbus modules/hyperv/vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 05:28:16 -0000 Author: sephe Date: Wed May 10 05:28:14 2017 New Revision: 318136 URL: https://svnweb.freebsd.org/changeset/base/318136 Log: hyperv/vmbus: Reorganize vmbus device tree For GEN1 Hyper-V, vmbus is attached to pcib0, which contains the resources for PCI passthrough and SR-IOV. There is no acpi_syscontainer0 on GEN1 Hyper-V. For GEN2 Hyper-V, vmbus is attached to acpi_syscontainer0, which contains the resources for PCI passthrough and SR-IOV. There is no pcib0 on GEN2 Hyper-V. The ACPI VMBUS device now only holds its _CRS, which is empty as of this commit; its existence is mainly for upward compatibility. Device tree structure is suggested by jhb@. Tested-by: dexuan@ Collabrated-wth: dexuan@ MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D10565 Added: head/sys/dev/acpica/acpi_container.c (contents, props changed) head/sys/dev/hyperv/vmbus/vmbus_res.c (contents, props changed) Modified: head/sys/conf/files head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/dev/acpica/acpi_pcib_acpi.c head/sys/dev/hyperv/vmbus/vmbus.c head/sys/modules/hyperv/vmbus/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed May 10 05:07:41 2017 (r318135) +++ head/sys/conf/files Wed May 10 05:28:14 2017 (r318136) @@ -673,6 +673,7 @@ dev/acpica/acpi_perf.c optional acpi dev/acpica/acpi_powerres.c optional acpi dev/acpica/acpi_quirk.c optional acpi dev/acpica/acpi_resource.c optional acpi +dev/acpica/acpi_container.c optional acpi dev/acpica/acpi_smbat.c optional acpi dev/acpica/acpi_thermal.c optional acpi dev/acpica/acpi_throttle.c optional acpi Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Wed May 10 05:07:41 2017 (r318135) +++ head/sys/conf/files.amd64 Wed May 10 05:28:14 2017 (r318136) @@ -323,6 +323,7 @@ dev/hyperv/vmbus/vmbus_br.c optional dev/hyperv/vmbus/vmbus_chan.c optional hyperv dev/hyperv/vmbus/vmbus_et.c optional hyperv dev/hyperv/vmbus/vmbus_if.m optional hyperv +dev/hyperv/vmbus/vmbus_res.c optional hyperv dev/hyperv/vmbus/vmbus_xact.c optional hyperv dev/hyperv/vmbus/amd64/hyperv_machdep.c optional hyperv dev/hyperv/vmbus/amd64/vmbus_vector.S optional hyperv Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Wed May 10 05:07:41 2017 (r318135) +++ head/sys/conf/files.i386 Wed May 10 05:28:14 2017 (r318136) @@ -244,6 +244,7 @@ dev/hyperv/vmbus/vmbus_br.c optional dev/hyperv/vmbus/vmbus_chan.c optional hyperv dev/hyperv/vmbus/vmbus_et.c optional hyperv dev/hyperv/vmbus/vmbus_if.m optional hyperv +dev/hyperv/vmbus/vmbus_res.c optional hyperv dev/hyperv/vmbus/vmbus_xact.c optional hyperv dev/hyperv/vmbus/i386/hyperv_machdep.c optional hyperv dev/hyperv/vmbus/i386/vmbus_vector.S optional hyperv Added: head/sys/dev/acpica/acpi_container.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/acpica/acpi_container.c Wed May 10 05:28:14 2017 (r318136) @@ -0,0 +1,166 @@ +/*- + * Copyright (c) 2017 Microsoft Corp. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include +#include + +#include "pcib_if.h" + +ACPI_MODULE_NAME("CONTAINER") + +static int acpi_syscont_probe(device_t); +static int acpi_syscont_attach(device_t); +static int acpi_syscont_detach(device_t); +static int acpi_syscont_alloc_msi(device_t, device_t, + int count, int maxcount, int *irqs); +static int acpi_syscont_release_msi(device_t bus, device_t dev, + int count, int *irqs); +static int acpi_syscont_alloc_msix(device_t bus, device_t dev, + int *irq); +static int acpi_syscont_release_msix(device_t bus, device_t dev, + int irq); +static int acpi_syscont_map_msi(device_t bus, device_t dev, + int irq, uint64_t *addr, uint32_t *data); + +static device_method_t acpi_syscont_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, acpi_syscont_probe), + DEVMETHOD(device_attach, acpi_syscont_attach), + DEVMETHOD(device_detach, acpi_syscont_detach), + + /* Bus interface */ + DEVMETHOD(bus_add_child, bus_generic_add_child), + DEVMETHOD(bus_print_child, bus_generic_print_child), + DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource), + DEVMETHOD(bus_release_resource, bus_generic_release_resource), + DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), + DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), +#if __FreeBSD_version >= 1100000 + DEVMETHOD(bus_get_cpus, bus_generic_get_cpus), +#endif + + /* pcib interface */ + DEVMETHOD(pcib_alloc_msi, acpi_syscont_alloc_msi), + DEVMETHOD(pcib_release_msi, acpi_syscont_release_msi), + DEVMETHOD(pcib_alloc_msix, acpi_syscont_alloc_msix), + DEVMETHOD(pcib_release_msix, acpi_syscont_release_msix), + DEVMETHOD(pcib_map_msi, acpi_syscont_map_msi), + + DEVMETHOD_END +}; + +static driver_t acpi_syscont_driver = { + "acpi_syscontainer", + acpi_syscont_methods, + 0, +}; + +static devclass_t acpi_syscont_devclass; + +DRIVER_MODULE(acpi_syscontainer, acpi, acpi_syscont_driver, + acpi_syscont_devclass, NULL, NULL); +MODULE_DEPEND(acpi_syscontainer, acpi, 1, 1, 1); + +static int +acpi_syscont_probe(device_t dev) +{ + static char *syscont_ids[] = { "ACPI0004", "PNP0A05", "PNP0A06", NULL }; + + if (acpi_disabled("syscontainer") || + ACPI_ID_PROBE(device_get_parent(dev), dev, syscont_ids) == NULL) + return (ENXIO); + + device_set_desc(dev, "System Container"); + return (BUS_PROBE_DEFAULT); +} + +static int +acpi_syscont_attach(device_t dev) +{ + + bus_generic_probe(dev); + return (bus_generic_attach(dev)); +} + +static int +acpi_syscont_detach(device_t dev) +{ + + return (bus_generic_detach(dev)); +} + +static int +acpi_syscont_alloc_msi(device_t bus, device_t dev, int count, int maxcount, + int *irqs) +{ + device_t parent = device_get_parent(bus); + + return (PCIB_ALLOC_MSI(device_get_parent(parent), dev, count, maxcount, + irqs)); +} + +static int +acpi_syscont_release_msi(device_t bus, device_t dev, int count, int *irqs) +{ + device_t parent = device_get_parent(bus); + + return (PCIB_RELEASE_MSI(device_get_parent(parent), dev, count, irqs)); +} + +static int +acpi_syscont_alloc_msix(device_t bus, device_t dev, int *irq) +{ + device_t parent = device_get_parent(bus); + + return (PCIB_ALLOC_MSIX(device_get_parent(parent), dev, irq)); +} + +static int +acpi_syscont_release_msix(device_t bus, device_t dev, int irq) +{ + device_t parent = device_get_parent(bus); + + return (PCIB_RELEASE_MSIX(device_get_parent(parent), dev, irq)); +} + +static int +acpi_syscont_map_msi(device_t bus, device_t dev, int irq, uint64_t *addr, + uint32_t *data) +{ + device_t parent = device_get_parent(bus); + + return (PCIB_MAP_MSI(device_get_parent(parent), dev, irq, addr, data)); +} Modified: head/sys/dev/acpica/acpi_pcib_acpi.c ============================================================================== --- head/sys/dev/acpica/acpi_pcib_acpi.c Wed May 10 05:07:41 2017 (r318135) +++ head/sys/dev/acpica/acpi_pcib_acpi.c Wed May 10 05:28:14 2017 (r318136) @@ -537,6 +537,7 @@ acpi_pcib_acpi_attach(device_t dev) acpi_pcib_fetch_prt(dev, &sc->ap_prt); + bus_generic_probe(dev); if (device_add_child(dev, "pci", -1) == NULL) { device_printf(device_get_parent(dev), "couldn't attach pci bus\n"); #if defined(NEW_PCIB) && defined(PCI_RES_BUS) Modified: head/sys/dev/hyperv/vmbus/vmbus.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus.c Wed May 10 05:07:41 2017 (r318135) +++ head/sys/dev/hyperv/vmbus/vmbus.c Wed May 10 05:28:14 2017 (r318136) @@ -71,6 +71,7 @@ struct vmbus_msghc { struct hypercall_postmsg_in mh_inprm_save; }; +static void vmbus_identify(driver_t *, device_t); static int vmbus_probe(device_t); static int vmbus_attach(device_t); static int vmbus_detach(device_t); @@ -144,6 +145,7 @@ vmbus_chanmsg_handlers[VMBUS_CHANMSG_TYP static device_method_t vmbus_methods[] = { /* Device interface */ + DEVMETHOD(device_identify, vmbus_identify), DEVMETHOD(device_probe, vmbus_probe), DEVMETHOD(device_attach, vmbus_attach), DEVMETHOD(device_detach, vmbus_detach), @@ -190,7 +192,10 @@ static driver_t vmbus_driver = { static devclass_t vmbus_devclass; -DRIVER_MODULE(vmbus, acpi, vmbus_driver, vmbus_devclass, NULL, NULL); +DRIVER_MODULE(vmbus, pcib, vmbus_driver, vmbus_devclass, NULL, NULL); +DRIVER_MODULE(vmbus, acpi_syscontainer, vmbus_driver, vmbus_devclass, + NULL, NULL); + MODULE_DEPEND(vmbus, acpi, 1, 1, 1); MODULE_DEPEND(vmbus, pci, 1, 1, 1); MODULE_VERSION(vmbus, 1); @@ -1066,43 +1071,41 @@ vmbus_alloc_resource(device_t dev, devic return (res); } -static device_t -get_nexus(device_t vmbus) -{ - device_t acpi = device_get_parent(vmbus); - device_t nexus = device_get_parent(acpi); - return (nexus); -} - static int vmbus_alloc_msi(device_t bus, device_t dev, int count, int maxcount, int *irqs) { - return (PCIB_ALLOC_MSI(get_nexus(bus), dev, count, maxcount, irqs)); + + return (PCIB_ALLOC_MSI(device_get_parent(bus), dev, count, maxcount, + irqs)); } static int vmbus_release_msi(device_t bus, device_t dev, int count, int *irqs) { - return (PCIB_RELEASE_MSI(get_nexus(bus), dev, count, irqs)); + + return (PCIB_RELEASE_MSI(device_get_parent(bus), dev, count, irqs)); } static int vmbus_alloc_msix(device_t bus, device_t dev, int *irq) { - return (PCIB_ALLOC_MSIX(get_nexus(bus), dev, irq)); + + return (PCIB_ALLOC_MSIX(device_get_parent(bus), dev, irq)); } static int vmbus_release_msix(device_t bus, device_t dev, int irq) { - return (PCIB_RELEASE_MSIX(get_nexus(bus), dev, irq)); + + return (PCIB_RELEASE_MSIX(device_get_parent(bus), dev, irq)); } static int vmbus_map_msi(device_t bus, device_t dev, int irq, uint64_t *addr, uint32_t *data) { - return (PCIB_MAP_MSI(get_nexus(bus), dev, irq, addr, data)); + + return (PCIB_MAP_MSI(device_get_parent(bus), dev, irq, addr, data)); } static uint32_t @@ -1216,36 +1219,44 @@ vmbus_get_crs(device_t dev, device_t vmb static void vmbus_get_mmio_res_pass(device_t dev, enum parse_pass pass) { - device_t acpi0, pcib0 = NULL; - device_t *children; - int i, count; - - /* Try to find _CRS on VMBus device */ - vmbus_get_crs(dev, dev, pass); - - /* Try to find _CRS on VMBus device's parent */ - acpi0 = device_get_parent(dev); - vmbus_get_crs(acpi0, dev, pass); + device_t acpi0, parent; - /* Try to locate pcib0 and find _CRS on it */ - if (device_get_children(acpi0, &children, &count) != 0) - return; + parent = device_get_parent(dev); - for (i = 0; i < count; i++) { - if (!device_is_attached(children[i])) - continue; + acpi0 = device_get_parent(parent); + if (strcmp("acpi0", device_get_nameunit(acpi0)) == 0) { + device_t *children; + int count; - if (strcmp("pcib0", device_get_nameunit(children[i]))) - continue; + /* + * Try to locate VMBUS resources and find _CRS on them. + */ + if (device_get_children(acpi0, &children, &count) == 0) { + int i; - pcib0 = children[i]; - break; - } + for (i = 0; i < count; ++i) { + if (!device_is_attached(children[i])) + continue; + + if (strcmp("vmbus_res", + device_get_name(children[i])) == 0) + vmbus_get_crs(children[i], dev, pass); + } + free(children, M_TEMP); + } - if (pcib0) - vmbus_get_crs(pcib0, dev, pass); + /* + * Try to find _CRS on acpi. + */ + vmbus_get_crs(acpi0, dev, pass); + } else { + device_printf(dev, "not grandchild of acpi\n"); + } - free(children, M_TEMP); + /* + * Try to find _CRS on parent. + */ + vmbus_get_crs(parent, dev, pass); } static void @@ -1275,18 +1286,25 @@ vmbus_free_mmio_res(device_t dev) } #endif /* NEW_PCIB */ +static void +vmbus_identify(driver_t *driver, device_t parent) +{ + + if (device_get_unit(parent) != 0 || vm_guest != VM_GUEST_HV || + (hyperv_features & CPUID_HV_MSR_SYNIC) == 0) + return; + device_add_child(parent, "vmbus", -1); +} + static int vmbus_probe(device_t dev) { - char *id[] = { "VMBUS", NULL }; - if (ACPI_ID_PROBE(device_get_parent(dev), dev, id) == NULL || - device_get_unit(dev) != 0 || vm_guest != VM_GUEST_HV || + if (device_get_unit(dev) != 0 || vm_guest != VM_GUEST_HV || (hyperv_features & CPUID_HV_MSR_SYNIC) == 0) return (ENXIO); device_set_desc(dev, "Hyper-V Vmbus"); - return (BUS_PROBE_DEFAULT); } Added: head/sys/dev/hyperv/vmbus/vmbus_res.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/hyperv/vmbus/vmbus_res.c Wed May 10 05:28:14 2017 (r318136) @@ -0,0 +1,98 @@ +/*- + * Copyright (c) 2017 Microsoft Corp. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include +#include + +#include + +#include "acpi_if.h" +#include "bus_if.h" + +static int vmbus_res_probe(device_t); +static int vmbus_res_attach(device_t); +static int vmbus_res_detach(device_t); + +static device_method_t vmbus_res_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, vmbus_res_probe), + DEVMETHOD(device_attach, vmbus_res_attach), + DEVMETHOD(device_detach, vmbus_res_detach), + DEVMETHOD(device_shutdown, bus_generic_shutdown), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), + + DEVMETHOD_END +}; + +static driver_t vmbus_res_driver = { + "vmbus_res", + vmbus_res_methods, + 1 +}; + +static devclass_t vmbus_res_devclass; + +DRIVER_MODULE(vmbus_res, acpi, vmbus_res_driver, vmbus_res_devclass, + NULL, NULL); +MODULE_DEPEND(vmbus_res, acpi, 1, 1, 1); +MODULE_VERSION(vmbus_res, 1); + +static int +vmbus_res_probe(device_t dev) +{ + char *id[] = { "VMBUS", NULL }; + + if (ACPI_ID_PROBE(device_get_parent(dev), dev, id) == NULL || + device_get_unit(dev) != 0 || vm_guest != VM_GUEST_HV || + (hyperv_features & CPUID_HV_MSR_SYNIC) == 0) + return (ENXIO); + + device_set_desc(dev, "Hyper-V Vmbus Resource"); + return (BUS_PROBE_DEFAULT); +} + +static int +vmbus_res_attach(device_t dev __unused) +{ + + return (0); +} + +static int +vmbus_res_detach(device_t dev __unused) +{ + + return (0); +} Modified: head/sys/modules/hyperv/vmbus/Makefile ============================================================================== --- head/sys/modules/hyperv/vmbus/Makefile Wed May 10 05:07:41 2017 (r318135) +++ head/sys/modules/hyperv/vmbus/Makefile Wed May 10 05:28:14 2017 (r318136) @@ -12,6 +12,7 @@ SRCS= hyperv.c \ vmbus_chan.c \ vmbus_et.c \ vmbus_if.c \ + vmbus_res.c \ vmbus_xact.c SRCS+= acpi_if.h bus_if.h device_if.h opt_acpi.h pci_if.h pcib_if.h vmbus_if.h From owner-svn-src-head@freebsd.org Wed May 10 06:18:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62C5CD654D7; Wed, 10 May 2017 06:18:55 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: from mail-wr0-x22d.google.com (mail-wr0-x22d.google.com [IPv6:2a00:1450:400c:c0c::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 049371E76; Wed, 10 May 2017 06:18:55 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: by mail-wr0-x22d.google.com with SMTP id z52so28407348wrc.2; Tue, 09 May 2017 23:18:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:reply-to:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=rlaJ5nahoC1q4tss2HXr4OLwUVFktswol17qtqc9eaw=; b=JQLp3tfGxgP4zzBl/oQzgQCglpe1fRVF4jsxe9X+JCAeuippZ+aYLjJs7tebQh/Y5k rMgUU9Qz0shKkhaSNIYCMkUjvlnlQI3h7xaofhcPlxjThqoT7+PB2nn4yzBoVCBduppJ B4nHoHtIRe4FEu5FfT72bxoQPs6YF1foYcM8Wscg6Utq0Unrc3caVaoIBMMQNlTSQXb6 2z0LLLUgYbIB6+iE0zNiFZAhLbR6VnJXYqTuvCLfDdawfXf89MHqfDtTNcRLuaqaPxEx FLtd7CiOFRnACKHWCPo9pQABgpTzAlQSBlYlC531TewGNZAKYUcsygjtzAFBF1p46Otd Y9/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:reply-to:subject:to:cc:references :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding:content-language; bh=rlaJ5nahoC1q4tss2HXr4OLwUVFktswol17qtqc9eaw=; b=Hb3hWinvZ9XA77VsDqdl5uVRWj4RgtrYzxATNzN/yxwUsrhGxVs0eV9z+LL0UQqKo6 gq6/WYyacIAUG8wwJisFYtTZ81duYme1L/RJlPyCfT6SIVUqJuCklA0YuXAXG2e4vIFU a2byWVJzpswHGJWvWVQOp6rbEP3Gd9B7+OFws0cLzyDIeTH0UUQLUwbn9WVObl0uzhcF r6AsaahxYj7PXvj0/dZ9jliYkvErXILxXJ0X+/fOe+ANs4ri6er53maXbIUxhRvMu0ux cD6RBbV044n7asSP3LLaUxv4bpUC6jSYoEsXINyb0bTTrilwBN1iBK7OxYPQzXBLB7dJ /5fg== X-Gm-Message-State: AODbwcCmxz0ClUt7mqCa9PdCkdk18pIdCMWeKHyNihYIvcI7pdmmQbOR JnN7mO8zVvjsJEd5Aj/M9Q== X-Received: by 10.28.152.133 with SMTP id a127mr3029472wme.115.1494397132415; Tue, 09 May 2017 23:18:52 -0700 (PDT) Received: from [88.208.79.100] (halouny.humusoft.cz. [88.208.79.100]) by smtp.gmail.com with ESMTPSA id c37sm2102514wra.16.2017.05.09.23.18.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 May 2017 23:18:51 -0700 (PDT) From: Michal Meloun X-Google-Original-From: Michal Meloun Reply-To: mmel@freebsd.org Subject: Re: svn commit: r318021 - in head/sys/arm: arm include To: Andrew Turner Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201705091105.v49B5WAp097952@repo.freebsd.org> <85745E3A-3260-43C7-B134-85BFED786D55@fubar.geek.nz> <8fe20c26-3c0c-98ce-227b-740491253047@freebsd.org> Message-ID: <46e9d14a-87d4-589d-8a1d-97800cdae0cf@freebsd.org> Date: Wed, 10 May 2017 08:18:52 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 06:18:55 -0000 On 09.05.2017 17:09, Andrew Turner wrote: >> On 9 May 2017, at 13:40, Michal Meloun wrote: >> >> >> >> On 09.05.2017 13:34, Andrew Turner wrote: >>>> On 9 May 2017, at 12:05, Michal Meloun wrote: >>>> >>>> Author: mmel >>>> Date: Tue May 9 11:05:32 2017 >>>> New Revision: 318021 >>>> URL: https://svnweb.freebsd.org/changeset/base/318021 >>>> >>>> Log: >>>> Introduce pmap_remap_vm_attr(), >>>> it allows to remap one VM memattr class to another. >>>> >>>> This function is intent to be used as workaround for various SoC bugs, >>>> mainly access ordering/sequencing related bugs in crossbar fabric. >>> This seems quite heavy handed to change the attribute for all memory of a given type. >> Yes, exactly. See comment in D10218 - >> /* >> * Workaround for Marvell Armada38X family HW issue >> * between Cortex-A9 CPUs and on-chip devices that may >> * cause hang on heavy load. >> * To avoid that, map all registers including PCIe IO >> * as strongly ordered instead of device memory. >> */ > I don’t think it’s been answered if this is just for PCIe, or all devices. Well, I have not access to Armada errata, so I can't give you more exact answer. But this kind of bugs (ordering/sequencing problems in crossbar fabric) are not that uncommon, I think that some early versions of NPX QorIQ have exactly same problem (all devices must be mapped as SO), i.MX6 can hangs if devices are not mapped with shared flag... > >>> Other architectures have pmap_change_attr to change the attribute on a specific range of memory. >> Right. Problem is that I don't known any method how we can change >> memory attribute for live memory in SMP system, >> without hitting undefined behavior. > I would expect drivers to change the attributes early, before they access the memory. So then why driver does not request right type of memory at allocation? But yes, current situation around pmap_mapdev(), bus_space_map(), bus_activate_resource() and bus_map_resource() is not an optimal. At least for systems where devices must be mapped with different attributes - e.g. normal devices, PCI config space, memory mapped PCI I/O bars, normal/prefetchable memory bars. I think that we needs more *common* VM_MEMATTR_ classes. > We could also use smp_rendezvous to ensure nothing else is running, this will have a performance code, however I would not expect pmap_change_attr to be used in the fast path. > pmap_change_attr() must work very early, so smp_rendezvous() can be problematic. But, for me, the problematic part is cache - mainly transition from cached to uncached memory. I'm not sure, if I known always working sequence of mapping/cache operations witch ensure this transition in architecturally clean way. Next think is that pmap_change_attr() is used very rarely and probably only as workaround for limited bus_activate_resource() functionality. Michal From owner-svn-src-head@freebsd.org Wed May 10 08:35:00 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35AA0D66B16; Wed, 10 May 2017 08:35:00 +0000 (UTC) (envelope-from royger@gmail.com) Received: from mail-wr0-x241.google.com (mail-wr0-x241.google.com [IPv6:2a00:1450:400c:c0c::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B1D5D1AC; Wed, 10 May 2017 08:34:59 +0000 (UTC) (envelope-from royger@gmail.com) Received: by mail-wr0-x241.google.com with SMTP id w50so6286307wrc.0; Wed, 10 May 2017 01:34:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=XVlnfQKNNJAVWKgZ5uBqvGxw9ZXCI//h8obNzN6634Q=; b=iM5SPV8e3vIVBZz8ambtQfZK+BtSBAPrF5u6G7koxbaB14meoXwoW2SxE0NX3QvXfa SYIkjxOK3NOzyo66unTRB3Eb90oichEjsoCThRdUNEhhm2oaUZ5oNTJVMKKLoyLXxdqy XGufbV/WV0suJbNYcPUe7lTDug9ZINbk4DbHE+j/4DCalVF/kE7+cN5eORu9O4rdNIAE Vss+BQK0JYxMBeP+bf35bdCGLYXxbszMhtBLNLWxM7PAIpzxj1UbmLwCarbW0m8ApRxP RPmzHMxO4W9CeC9md+Xqmyg2OMNRTIaErU+7m/a53qCY/9nRr4rvvw7NcOT+mO+RjLV9 cCXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=XVlnfQKNNJAVWKgZ5uBqvGxw9ZXCI//h8obNzN6634Q=; b=A7dklT82ZBFx9T4j+1ji0Y1/AH1ZAeppiKkkT/ZH2jHgksyn5HkS7l6skFdBNvsYs5 BmPYV0VQqO1RQWNjwDiLGTq4vnwz+jO5wSxsJzgsIm7fotlIF8Eo/haAQ9C6oYH1rHEY Kf/Jtz9k8SQRyKkR2aHRMKOcztgAxIU6RyongvgjuzsWLJ+WERD93Gt0s0XxpTmDVc3J gbiM3XuZWQ9lfjKcQ+pp0liBnXg0187ehTi7feN3niUYtWT3gn4ZSXbxsTKjAljeRKvI jUIwNlWeqkGWAB7eRtZtXbJun0IrCdkx1JLH8roY5ilFwq5h8Ck4VQ2CJiP8dlldIo28 CmJg== X-Gm-Message-State: AODbwcDVemroEq6xl3JonvtOm8GxlcrflbiMxPMsuw+P6WBrdygblcuR 2btC0iBivDEthQ== X-Received: by 10.80.174.99 with SMTP id c90mr3302064edd.136.1494405297760; Wed, 10 May 2017 01:34:57 -0700 (PDT) Received: from localhost (default-46-102-197-194.interdsl.co.uk. [46.102.197.194]) by smtp.gmail.com with ESMTPSA id x26sm850694edx.60.2017.05.10.01.34.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 May 2017 01:34:56 -0700 (PDT) Sender: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Date: Wed, 10 May 2017 09:34:52 +0100 From: Roger Pau =?iso-8859-1?Q?Monn=E9?= To: Colin Percival Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r301198 - head/sys/dev/xen/netfront Message-ID: <20170510083452.tmhumxatf356miv6@dhcp-3-128.uk.xensource.com> References: <201606021116.u52BGajD047287@repo.freebsd.org> <0100015bccba6abc-4c3b1487-25e3-4640-8221-885341ece829-000000@email.amazonses.com> <20170509100912.h3ylwugahvfi5cc2@dhcp-3-128.uk.xensource.com> <0100015beeed2f38-6246d7db-7f23-4b8a-ba50-b97ec0953457-000000@email.amazonses.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <0100015beeed2f38-6246d7db-7f23-4b8a-ba50-b97ec0953457-000000@email.amazonses.com> User-Agent: NeoMutt/20170428 (1.8.2) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 08:35:00 -0000 On Tue, May 09, 2017 at 08:36:13PM +0000, Colin Percival wrote: > On 05/09/17 03:09, Roger Pau Monn� wrote: > > On Wed, May 03, 2017 at 05:13:40AM +0000, Colin Percival wrote: > >> On 06/02/16 04:16, Roger Pau Monn� wrote: > >>> Author: royger > >>> Date: Thu Jun 2 11:16:35 2016 > >>> New Revision: 301198 > >>> URL: https://svnweb.freebsd.org/changeset/base/301198 > >> > >> I think this commit is responsible for panics I'm seeing in EC2 on T2 family > >> instances. [...] > >> but under high traffic volumes I think a separate thread can already be > >> running in xn_rxeof, having dropped the RX lock while it passes a packet > >> up the stack. This would result in two different threads trying to process > >> the same set of responses from the ring, with (unsurprisingly) bad results. > > > > Hm, right, xn_rxeof drops the lock while pushing the packet up the stack. > > There's a "XXX" comment on top of that, could you try to remove the lock > > dripping and see what happens? > > > > I'm not sure there's any reason to drop the lock here, I very much doubt > > if_input is going to sleep. > > Judging by > $ grep -R -B 1 -A 1 if_input /usr/src/sys/dev > I'm pretty sure that we do indeed need to drop the lock. If it's possible > to enter if_input while holding locks, there are a *lot* of network interface > drivers which are dropping locks unnecessarily... > > >> 3. Why xn_ifinit_locked is consuming ring responses. > > > > There might be pending RX packets on the ring, so netfront consumes them and > > signals netback. In the unlikely event that the RX ring was full when > > xn_ifinit_locked is called, not doing this would mean the RX queue would get > > stuck forever, since there's no guarantee netfront will receive event channel > > notifications. > > In that case, I'm guessing it would be safe to skip this if another thread is > already running xn_rxeof and chewing through the packets on the ring? It > would be easy to set a flag in xn_rxeof before we drop locks. Hm, I think it would be better to fix xn_rxeof so that netfront doesn't drop the lock while poking at the ring, what about the following patch? It should also prevent needlessly dropping and acquiring the lock for each packet netfront pushes up the stack. NB: I've only compile-tested this. ---8<--- diff --git a/sys/dev/xen/netfront/netfront.c b/sys/dev/xen/netfront/netfront.c index 99ccdaaf5000..482b9e948fde 100644 --- a/sys/dev/xen/netfront/netfront.c +++ b/sys/dev/xen/netfront/netfront.c @@ -1161,17 +1161,18 @@ xn_rxeof(struct netfront_rxq *rxq) struct mbufq mbufq_rxq, mbufq_errq; int err, work_to_do; - do { - XN_RX_LOCK_ASSERT(rxq); - if (!netfront_carrier_ok(np)) - return; + XN_RX_LOCK_ASSERT(rxq); + + if (!netfront_carrier_ok(np)) + return; - /* XXX: there should be some sane limit. */ - mbufq_init(&mbufq_errq, INT_MAX); - mbufq_init(&mbufq_rxq, INT_MAX); + /* XXX: there should be some sane limit. */ + mbufq_init(&mbufq_errq, INT_MAX); + mbufq_init(&mbufq_rxq, INT_MAX); - ifp = np->xn_ifp; + ifp = np->xn_ifp; + do { rp = rxq->ring.sring->rsp_prod; rmb(); /* Ensure we see queued responses up to 'rp'. */ @@ -1191,7 +1192,7 @@ xn_rxeof(struct netfront_rxq *rxq) } m->m_pkthdr.rcvif = ifp; - if ( rx->flags & NETRXF_data_validated ) { + if (rx->flags & NETRXF_data_validated) { /* * According to mbuf(9) the correct way to tell * the stack that the checksum of an inbound @@ -1214,50 +1215,45 @@ xn_rxeof(struct netfront_rxq *rxq) } (void )mbufq_enqueue(&mbufq_rxq, m); - rxq->ring.rsp_cons = i; } - mbufq_drain(&mbufq_errq); + rxq->ring.rsp_cons = i; - /* - * Process all the mbufs after the remapping is complete. - * Break the mbuf chain first though. - */ - while ((m = mbufq_dequeue(&mbufq_rxq)) != NULL) { - if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); + xn_alloc_rx_buffers(rxq); - /* XXX: Do we really need to drop the rx lock? */ - XN_RX_UNLOCK(rxq); + RING_FINAL_CHECK_FOR_RESPONSES(&rxq->ring, work_to_do); + } while (work_to_do); + + XN_RX_UNLOCK(rxq); + mbufq_drain(&mbufq_errq); + /* + * Process all the mbufs after the remapping is complete. + * Break the mbuf chain first though. + */ + while ((m = mbufq_dequeue(&mbufq_rxq)) != NULL) { + if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); #if (defined(INET) || defined(INET6)) - /* Use LRO if possible */ - if ((ifp->if_capenable & IFCAP_LRO) == 0 || - lro->lro_cnt == 0 || tcp_lro_rx(lro, m, 0)) { - /* - * If LRO fails, pass up to the stack - * directly. - */ - (*ifp->if_input)(ifp, m); - } -#else + /* Use LRO if possible */ + if ((ifp->if_capenable & IFCAP_LRO) == 0 || + lro->lro_cnt == 0 || tcp_lro_rx(lro, m, 0)) { + /* + * If LRO fails, pass up to the stack + * directly. + */ (*ifp->if_input)(ifp, m); -#endif - - XN_RX_LOCK(rxq); } - - rxq->ring.rsp_cons = i; +#else + (*ifp->if_input)(ifp, m); +#endif + } #if (defined(INET) || defined(INET6)) - /* - * Flush any outstanding LRO work - */ - tcp_lro_flush_all(lro); + /* + * Flush any outstanding LRO work + */ + tcp_lro_flush_all(lro); #endif - - xn_alloc_rx_buffers(rxq); - - RING_FINAL_CHECK_FOR_RESPONSES(&rxq->ring, work_to_do); - } while (work_to_do); + XN_RX_LOCK(rxq); } static void From owner-svn-src-head@freebsd.org Wed May 10 08:46:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1F98D66F3B; Wed, 10 May 2017 08:46:16 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6B32FB86; Wed, 10 May 2017 08:46:16 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [192.168.3.3] (unknown [77.95.97.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 00DBF240CB; Wed, 10 May 2017 10:46:13 +0200 (CEST) From: Dimitry Andric Message-Id: <1D188CE2-2860-4204-BD34-F5C4DD6BAFEA@FreeBSD.org> Content-Type: multipart/signed; boundary="Apple-Mail=_9BDC38ED-CC7A-48B6-ADC9-79495770E915"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r318017 - head/share/man/man4 Date: Wed, 10 May 2017 10:46:12 +0200 In-Reply-To: <20170510095816.X5705@besplex.bde.org> Cc: Ian Lepore , Edward Tomasz Napierala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Bruce Evans References: <201705090836.v498a9JJ035778@repo.freebsd.org> <1494372587.59865.9.camel@freebsd.org> <20170510095816.X5705@besplex.bde.org> X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 08:46:16 -0000 --Apple-Mail=_9BDC38ED-CC7A-48B6-ADC9-79495770E915 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 10 May 2017, at 02:47, Bruce Evans wrote: > > On Tue, 9 May 2017, Ian Lepore wrote: > >> On Tue, 2017-05-09 at 08:36 +0000, Edward Tomasz Napierala wrote: >>> Author: trasz >>> Date: Tue May 9 08:36:09 2017 >>> New Revision: 318017 >>> URL: https://svnweb.freebsd.org/changeset/base/318017 >>> >>> Log: >>> Fix device paths for USB serial adapters: the formatting strings >>> contain "%u", differently from eg uart(4) which uses "%r". >>> >> >> What is %r and where is it documented? > > In the source code. > > It was a ddb internal (but supported by -fformat-extensions, except IIRC > for %jr (1)), but is now used by makedev(). In clang, it is supported with __attribute__((__freebsd_kprintf__)) (since r280031). The format checker assumes the argument is a plain int, just like our patched gcc does. -Dimitry --Apple-Mail=_9BDC38ED-CC7A-48B6-ADC9-79495770E915 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.30 iEYEARECAAYFAlkS01QACgkQsF6jCi4glqPiowCcCmfJ8wkuiktcFxGngM1Akuq1 7ycAn1OSrLoH/u8QHOzXRp2oSiZpT/aa =+jGj -----END PGP SIGNATURE----- --Apple-Mail=_9BDC38ED-CC7A-48B6-ADC9-79495770E915-- From owner-svn-src-head@freebsd.org Wed May 10 09:36:35 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB86CD6346D; Wed, 10 May 2017 09:36:35 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AEC6D1BB5; Wed, 10 May 2017 09:36:35 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4A9aYlP061798; Wed, 10 May 2017 09:36:34 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4A9aYrH061796; Wed, 10 May 2017 09:36:34 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201705100936.v4A9aYrH061796@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 10 May 2017 09:36:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318137 - head/usr.bin/mkimg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 09:36:36 -0000 Author: manu Date: Wed May 10 09:36:34 2017 New Revision: 318137 URL: https://svnweb.freebsd.org/changeset/base/318137 Log: mkimg: Add -C argument to specify maximum capacity Add a -C option to specify a maximum capacity for the final image file. It is useful to control the size of the generated image for sdcard or when we will add dynamic size partition. Add --capacity which is a shorthand to define min and max capacity at the same time. Reviewed by: bapt, marcel, wblock (manpages) Sponsored by: Gandi.net Differential Revision: https://reviews.freebsd.org/D10509 Modified: head/usr.bin/mkimg/mkimg.1 head/usr.bin/mkimg/mkimg.c Modified: head/usr.bin/mkimg/mkimg.1 ============================================================================== --- head/usr.bin/mkimg/mkimg.1 Wed May 10 05:28:14 2017 (r318136) +++ head/usr.bin/mkimg/mkimg.1 Wed May 10 09:36:34 2017 (r318137) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 7, 2015 +.Dd April 26, 2017 .Dt MKIMG 1 .Os .Sh NAME @@ -37,7 +37,9 @@ .Op Fl S Ar secsz .Op Fl T Ar tracksz .Op Fl b Ar bootcode -.Op Fl c Ar capacity +.Op Fl c Ar min_capacity +.Op Fl C Ar max_capacity +.Op Fl -capacity Ar capacity .Op Fl f Ar format .Op Fl o Ar outfile .Op Fl a Ar active @@ -125,6 +127,18 @@ given capacity, then the disk image will given. .Pp The +.Fl C +option specifies a maximum capacity for the disk image. +If the combined sizes of the given partitions exceed the size given with +.Fl C , +image creation fails. +.Pp +The +.Fl -capacity +option is a shorthand to specify the minimum and maximum capacity at the +same time. +.Pp +The .Fl v option increases the level of output that the .Nm Modified: head/usr.bin/mkimg/mkimg.c ============================================================================== --- head/usr.bin/mkimg/mkimg.c Wed May 10 05:28:14 2017 (r318136) +++ head/usr.bin/mkimg/mkimg.c Wed May 10 09:36:34 2017 (r318137) @@ -27,6 +27,7 @@ #include __FBSDID("$FreeBSD$"); +#include #include #include #include @@ -46,18 +47,21 @@ __FBSDID("$FreeBSD$"); #include "mkimg.h" #include "scheme.h" -#define LONGOPT_FORMATS 0x01000001 -#define LONGOPT_SCHEMES 0x01000002 -#define LONGOPT_VERSION 0x01000003 +#define LONGOPT_FORMATS 0x01000001 +#define LONGOPT_SCHEMES 0x01000002 +#define LONGOPT_VERSION 0x01000003 +#define LONGOPT_CAPACITY 0x01000004 static struct option longopts[] = { { "formats", no_argument, NULL, LONGOPT_FORMATS }, { "schemes", no_argument, NULL, LONGOPT_SCHEMES }, { "version", no_argument, NULL, LONGOPT_VERSION }, + { "capacity", required_argument, NULL, LONGOPT_CAPACITY }, { NULL, 0, NULL, 0 } }; -static uint64_t capacity; +static uint64_t min_capacity = 0; +static uint64_t max_capacity = 0; struct partlisthead partlist = TAILQ_HEAD_INITIALIZER(partlist); u_int nparts = 0; @@ -148,7 +152,8 @@ usage(const char *why) fputc('\n', stderr); fprintf(stderr, "\t-a \t- mark num'th partion as active\n"); fprintf(stderr, "\t-b \t- file containing boot code\n"); - fprintf(stderr, "\t-c \t- capacity (in bytes) of the disk\n"); + fprintf(stderr, "\t-c \t- minimum capacity (in bytes) of the disk\n"); + fprintf(stderr, "\t-C \t- maximum capacity (in bytes) of the disk\n"); fprintf(stderr, "\t-f \n"); fprintf(stderr, "\t-o \t- file to write image into\n"); fprintf(stderr, "\t-p \n"); @@ -378,12 +383,17 @@ mkimg_chs(lba_t lba, u_int maxcyl, u_int static int capacity_resize(lba_t end) { - lba_t capsz; + lba_t min_capsz, max_capsz; - capsz = (capacity + secsz - 1) / secsz; - if (end >= capsz) + min_capsz = (min_capacity + secsz - 1) / secsz; + max_capsz = (max_capacity + secsz - 1) / secsz; + + if (max_capsz != 0 && end > max_capsz) + return (ENOSPC); + if (end >= min_capsz) return (0); - return (image_set_size(capsz)); + + return (image_set_size(min_capsz)); } static void @@ -470,7 +480,7 @@ main(int argc, char *argv[]) bcfd = -1; outfd = 1; /* Write to stdout by default */ - while ((c = getopt_long(argc, argv, "a:b:c:f:o:p:s:vyH:P:S:T:", + while ((c = getopt_long(argc, argv, "a:b:c:C:f:o:p:s:vyH:P:S:T:", longopts, NULL)) != -1) { switch (c) { case 'a': /* ACTIVE PARTITION, if supported */ @@ -485,10 +495,15 @@ main(int argc, char *argv[]) if (bcfd == -1) err(EX_UNAVAILABLE, "%s", optarg); break; - case 'c': /* CAPACITY */ - error = parse_uint64(&capacity, 1, INT64_MAX, optarg); + case 'c': /* MINIMUM CAPACITY */ + error = parse_uint64(&min_capacity, 1, INT64_MAX, optarg); if (error) - errc(EX_DATAERR, error, "capacity in bytes"); + errc(EX_DATAERR, error, "minimum capacity in bytes"); + break; + case 'C': /* MAXIMUM CAPACITY */ + error = parse_uint64(&max_capacity, 1, INT64_MAX, optarg); + if (error) + errc(EX_DATAERR, error, "maximum capacity in bytes"); break; case 'f': /* OUTPUT FORMAT */ if (format_selected() != NULL) @@ -559,6 +574,12 @@ main(int argc, char *argv[]) print_version(); exit(EX_OK); /*NOTREACHED*/ + case LONGOPT_CAPACITY: + error = parse_uint64(&min_capacity, 1, INT64_MAX, optarg); + if (error) + errc(EX_DATAERR, error, "capacity in bytes"); + max_capacity = min_capacity; + break; default: usage("unknown option"); } @@ -568,8 +589,10 @@ main(int argc, char *argv[]) usage("trailing arguments"); if (scheme_selected() == NULL && nparts > 0) usage("no scheme"); - if (nparts == 0 && capacity == 0) + if (nparts == 0 && min_capacity == 0) usage("no partitions"); + if (max_capacity != 0 && min_capacity > max_capacity) + usage("minimum capacity cannot be larger than the maximum one"); if (secsz > blksz) { if (blksz != 0) From owner-svn-src-head@freebsd.org Wed May 10 14:54:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4DE2D66592; Wed, 10 May 2017 14:54:33 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 71B7938A; Wed, 10 May 2017 14:54:33 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4AEsWqv092773; Wed, 10 May 2017 14:54:32 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4AEsWWf092772; Wed, 10 May 2017 14:54:32 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705101454.v4AEsWWf092772@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 10 May 2017 14:54:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318138 - head/usr.bin/resizewin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 14:54:33 -0000 Author: trasz Date: Wed May 10 14:54:32 2017 New Revision: 318138 URL: https://svnweb.freebsd.org/changeset/base/318138 Log: Revert to pre-r318116 wording to not give the false impression that setting the kernels' idea of terminal size is somehow an alternative to environment variables. Reported by: kib MFC after: 2 weeks Sponsored by: DARPA, AFRL Modified: head/usr.bin/resizewin/resizewin.1 Modified: head/usr.bin/resizewin/resizewin.1 ============================================================================== --- head/usr.bin/resizewin/resizewin.1 Wed May 10 09:36:34 2017 (r318137) +++ head/usr.bin/resizewin/resizewin.1 Wed May 10 14:54:32 2017 (r318138) @@ -67,8 +67,8 @@ which is part of the distribution. However, .Nm -only works with VT100/ANSI-compatible terminals and directly sets -the terminal size instead of emitting commands to set environment variables. +only works with VT100/ANSI-compatible terminals and does not emit +commands to set environment variables. .Pp The terminal is assumed to be VT100/ANSI compatible. The VT100/ANSI escape sequences are supported by virtually all modern From owner-svn-src-head@freebsd.org Wed May 10 15:27:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4053ED66365; Wed, 10 May 2017 15:27:38 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 123401D87; Wed, 10 May 2017 15:27:38 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4AFRbcc005470; Wed, 10 May 2017 15:27:37 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4AFRbbu005469; Wed, 10 May 2017 15:27:37 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705101527.v4AFRbbu005469@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 10 May 2017 15:27:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318141 - head/usr.bin/mkuzip X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 15:27:38 -0000 Author: asomers Date: Wed May 10 15:27:36 2017 New Revision: 318141 URL: https://svnweb.freebsd.org/changeset/base/318141 Log: strcpy => strlcpy Reported by: Coverity CID: 1352771 MFC after: 3 weeks Sponsored by: Spectra Logic Corp Modified: head/usr.bin/mkuzip/mkuzip.c Modified: head/usr.bin/mkuzip/mkuzip.c ============================================================================== --- head/usr.bin/mkuzip/mkuzip.c Wed May 10 15:20:39 2017 (r318140) +++ head/usr.bin/mkuzip/mkuzip.c Wed May 10 15:27:36 2017 (r318141) @@ -192,7 +192,8 @@ int main(int argc, char **argv) /* Not reached */ } - strcpy(hdr.magic, cfs.handler->magic); + assert(strlcpy(hdr.magic, cfs.handler->magic, sizeof(hdr.magic)) + < sizeof(hdr.magic)); if (cfs.en_dedup != 0) { hdr.magic[CLOOP_OFS_VERSN] = CLOOP_MAJVER_3; From owner-svn-src-head@freebsd.org Wed May 10 15:32:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE750D66605 for ; Wed, 10 May 2017 15:32:30 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x231.google.com (mail-io0-x231.google.com [IPv6:2607:f8b0:4001:c06::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 833F2329 for ; Wed, 10 May 2017 15:32:30 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x231.google.com with SMTP id k91so3818002ioi.1 for ; Wed, 10 May 2017 08:32:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=PLxXlreCVKO/0OoVWBxVoVlHyksVtRHF/85WE7jXr3w=; b=A7yuYF5N2cGXqhJY8A+VaKg/Xz6TMol6FNiYZYvVbLMhySCyrWmQLVfgb4CtntlII4 XQwq/LUeXQbGei0ENENZPbWgBGBSukZmN4JW3E/L0Ym+2bjMWRcZBCPZxlzqIQD6VD0s YQUnd1wKIeo2fUJMlCzZ5moAZY3rXwqQD9XMtEM6egwmCi4i6WN6k/eoH5DHLeZCbEvR flFts1upZv82I3lSO+Rjj0ZdiYmyQw6Z/g9TYEmivjT6MkZIKXDpDZLXCZHEKw4H8JBT D2KfXMobH7jbkC6QMI+/8JB8ktw5T9h5WZY2/AM2bMQvS36eG3Wm51NLBTcMnXuvdvge Cf1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=PLxXlreCVKO/0OoVWBxVoVlHyksVtRHF/85WE7jXr3w=; b=qSP9izD3rR6NC+C154cWHqp1YnqzLouGDkfbAZqvfwOd7f7ys7H92QbcdMx+LHLA3o 9kx5yaqoqjI84KPGoDQe/BtMoNmbo1JoiucnJFVD+sI9l8l+fMDMbX38L26/1dPXq0OO mS9m8Ab9DOaxqlXSuy2KSmkN/nuDOQBcY2hiYU/5zXMsijTJYrskCVYmY00VbxWhPvjp Ddf2McsxgNvcveUXi7NQycBBiOK0VZi9GxZhwc/dTT12jCtIhfSY8t1GC+WmjRkqbknM Wyl169tz715WsS1qUIyOAvw7X3oGFa0gdN3zj16GGeOrXr/prM+9r+x+7LtIxN6F/mjI vvdA== X-Gm-Message-State: AODbwcAqHkBPP015Axw6o4BZo+Kx8XLy4MQmmNWj9tjoyVaqXsxCyTu/ HNMBXstXpQF7nX87GpnfaG7asoI7pg== X-Received: by 10.107.188.69 with SMTP id m66mr4545269iof.148.1494430349730; Wed, 10 May 2017 08:32:29 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.126.6 with HTTP; Wed, 10 May 2017 08:32:29 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:55:e5ab:afa:6971] In-Reply-To: <201705101527.v4AFRbbu005469@repo.freebsd.org> References: <201705101527.v4AFRbbu005469@repo.freebsd.org> From: Warner Losh Date: Wed, 10 May 2017 09:32:29 -0600 X-Google-Sender-Auth: B_8tofRDESDKIpNWDQ631QtX_Mw Message-ID: Subject: Re: svn commit: r318141 - head/usr.bin/mkuzip To: Alan Somers Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 15:32:30 -0000 Doesn't assert get compiled out, which would cause strlcpy to never happen? Warner On Wed, May 10, 2017 at 9:27 AM, Alan Somers wrote: > Author: asomers > Date: Wed May 10 15:27:36 2017 > New Revision: 318141 > URL: https://svnweb.freebsd.org/changeset/base/318141 > > Log: > strcpy => strlcpy > > Reported by: Coverity > CID: 1352771 > MFC after: 3 weeks > Sponsored by: Spectra Logic Corp > > Modified: > head/usr.bin/mkuzip/mkuzip.c > > Modified: head/usr.bin/mkuzip/mkuzip.c > ============================================================================== > --- head/usr.bin/mkuzip/mkuzip.c Wed May 10 15:20:39 2017 (r318140) > +++ head/usr.bin/mkuzip/mkuzip.c Wed May 10 15:27:36 2017 (r318141) > @@ -192,7 +192,8 @@ int main(int argc, char **argv) > /* Not reached */ > } > > - strcpy(hdr.magic, cfs.handler->magic); > + assert(strlcpy(hdr.magic, cfs.handler->magic, sizeof(hdr.magic)) > + < sizeof(hdr.magic)); > > if (cfs.en_dedup != 0) { > hdr.magic[CLOOP_OFS_VERSN] = CLOOP_MAJVER_3; > From owner-svn-src-head@freebsd.org Wed May 10 15:35:42 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 79D68D66792; Wed, 10 May 2017 15:35:42 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BE0177A; Wed, 10 May 2017 15:35:42 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4AFZfeH009451; Wed, 10 May 2017 15:35:41 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4AFZfOR009450; Wed, 10 May 2017 15:35:41 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201705101535.v4AFZfOR009450@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Wed, 10 May 2017 15:35:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318142 - head/lib/libstand X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 15:35:42 -0000 Author: tsoome Date: Wed May 10 15:35:41 2017 New Revision: 318142 URL: https://svnweb.freebsd.org/changeset/base/318142 Log: libstand: NULL pointer dereference in rarp readether argument is missing & operator. CID: 1374944 Reported by: Coverity, cem Reviewed by: cem Differential Revision: https://reviews.freebsd.org/D10663 Modified: head/lib/libstand/rarp.c Modified: head/lib/libstand/rarp.c ============================================================================== --- head/lib/libstand/rarp.c Wed May 10 15:27:36 2017 (r318141) +++ head/lib/libstand/rarp.c Wed May 10 15:35:41 2017 (r318142) @@ -155,7 +155,7 @@ rarprecv(struct iodesc *d, void **pkt, v printf("rarprecv: "); #endif - n = readether(d, ptr, (void **)&ap, tleft, &etype); + n = readether(d, &ptr, (void **)&ap, tleft, &etype); errno = 0; /* XXX */ if (n == -1 || n < sizeof(struct ether_arp)) { #ifdef RARP_DEBUG From owner-svn-src-head@freebsd.org Wed May 10 15:38:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B17BD66872; Wed, 10 May 2017 15:38:07 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 480F0920; Wed, 10 May 2017 15:38:07 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4AFc6Dk009589; Wed, 10 May 2017 15:38:06 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4AFc6c8009588; Wed, 10 May 2017 15:38:06 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705101538.v4AFc6c8009588@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 10 May 2017 15:38:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318143 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 15:38:07 -0000 Author: asomers Date: Wed May 10 15:38:06 2017 New Revision: 318143 URL: https://svnweb.freebsd.org/changeset/base/318143 Log: strcpy => strlcpy Reported by: Coverity CID: 1006715 MFC after: 3 weeks Sponsored by: Spectra Logic Corp Modified: head/usr.sbin/pw/pw_user.c Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Wed May 10 15:35:41 2017 (r318142) +++ head/usr.sbin/pw/pw_user.c Wed May 10 15:38:06 2017 (r318143) @@ -33,6 +33,7 @@ static const char rcsid[] = #include #include +#include #include #include #include @@ -501,7 +502,8 @@ pw_pwcrypt(char *password) cryptpw = crypt(password, salt); if (cryptpw == NULL) errx(EX_CONFIG, "crypt(3) failure"); - return strcpy(buf, cryptpw); + assert(strlcpy(buf, cryptpw, sizeof(buf)) < sizeof(buf)); + return (buf); } static char * From owner-svn-src-head@freebsd.org Wed May 10 15:40:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE455D66957; Wed, 10 May 2017 15:40:30 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-yb0-x234.google.com (mail-yb0-x234.google.com [IPv6:2607:f8b0:4002:c09::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8C008A95; Wed, 10 May 2017 15:40:30 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-yb0-x234.google.com with SMTP id 8so8985484ybw.1; Wed, 10 May 2017 08:40:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=TII6qmWLolAjU/hzBG+SwsRa56jyoSx6OmYSPvDnZSw=; b=eWYQ0NGFlKofduqObRkDlnPjV0eAKQRmKmlIzWHPyzy8xkvt1LQXTy5YXVdZ7ZWoNJ ciXl1SiFPr26Mnc666jmVJVpX6hqxtwrUm68JZK8bq8+1Cfx7f8th6Y72qM8bEYn3fi3 AnMZoLY85yGdaV4XMtI7c/lVqCpegIhe8y+ghOvtEuBpTqPgutyj2O51pbFCsNuG0e// khoQZVDvhTe2Mbl788Z6rbnubK0GEGyMhA4pDwQbLPMfqTwrUcoxQXrCJgp0woff+DKy Jq5YYUUYlN/8kXa5MxUovytSJ1obeScVBNG/GnjpVZqL+Q3zBVDzt74l7SnWr6VvHLZo l32A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=TII6qmWLolAjU/hzBG+SwsRa56jyoSx6OmYSPvDnZSw=; b=fK4tleFomDZBebCam/x8DCzWO0Scf8wrQHd5YaW3oihCGiYyZxFs9kCXYEiq8nfQri NZo9XwBRxcvOgn92v7H3CyuH4LeHlbUHGD8+2xzIpGOfWRJJhvXpeA/hS4QexPYwW/mM O7cEdjo+irOyqRYgoiOqDo94klDvEeP2s8KvOTIQ0udumTopbqoOOhBtDA56LRzhIK2r Op0ckg/g/nvzobnmaCgnZPhfaBqH5OXGgmhZYA3nTohUm8AD9ysNM9zNo1IQZ7JDDDSA JSrRmnBfVXB3JJOxSygUCTW/te59k2VlQpzQm8iU+juAUviO54qBTFi8lzmfEsiTIKZ8 gsGA== X-Gm-Message-State: AODbwcDem0rn031G8CdbQUYLVUXUaerrI1EUR+3oW/eQed0DkWCsKchF Iy+un5oPsWylMQyk7r3Sw0PeQKCUEQ== X-Received: by 10.37.220.15 with SMTP id y15mr5261134ybe.16.1494430829165; Wed, 10 May 2017 08:40:29 -0700 (PDT) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.129.20.214 with HTTP; Wed, 10 May 2017 08:40:28 -0700 (PDT) In-Reply-To: References: <201705101527.v4AFRbbu005469@repo.freebsd.org> From: Alan Somers Date: Wed, 10 May 2017 09:40:28 -0600 X-Google-Sender-Auth: fyMpEvAtUS1LRyuxDgvpHDs6-K8 Message-ID: Subject: Re: svn commit: r318141 - head/usr.bin/mkuzip To: Warner Losh Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 15:40:30 -0000 Hmm. I thought that assert(e) would get turned into e when -DNDEBUG. But looking at the header, you're right. I'll fix it soon. Good catch. -Alan On Wed, May 10, 2017 at 9:32 AM, Warner Losh wrote: > Doesn't assert get compiled out, which would cause strlcpy to never happen? > > Warner > > On Wed, May 10, 2017 at 9:27 AM, Alan Somers wrote: >> Author: asomers >> Date: Wed May 10 15:27:36 2017 >> New Revision: 318141 >> URL: https://svnweb.freebsd.org/changeset/base/318141 >> >> Log: >> strcpy => strlcpy >> >> Reported by: Coverity >> CID: 1352771 >> MFC after: 3 weeks >> Sponsored by: Spectra Logic Corp >> >> Modified: >> head/usr.bin/mkuzip/mkuzip.c >> >> Modified: head/usr.bin/mkuzip/mkuzip.c >> ============================================================================== >> --- head/usr.bin/mkuzip/mkuzip.c Wed May 10 15:20:39 2017 (r318140) >> +++ head/usr.bin/mkuzip/mkuzip.c Wed May 10 15:27:36 2017 (r318141) >> @@ -192,7 +192,8 @@ int main(int argc, char **argv) >> /* Not reached */ >> } >> >> - strcpy(hdr.magic, cfs.handler->magic); >> + assert(strlcpy(hdr.magic, cfs.handler->magic, sizeof(hdr.magic)) >> + < sizeof(hdr.magic)); >> >> if (cfs.en_dedup != 0) { >> hdr.magic[CLOOP_OFS_VERSN] = CLOOP_MAJVER_3; >> From owner-svn-src-head@freebsd.org Wed May 10 15:44:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CE75D66BE1; Wed, 10 May 2017 15:44:41 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5AD09FB2; Wed, 10 May 2017 15:44:41 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id C06E310A7DB; Wed, 10 May 2017 11:44:39 -0400 (EDT) From: John Baldwin To: Colin Percival Cc: Roger Pau =?ISO-8859-1?Q?Monn=E9?= , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r301198 - head/sys/dev/xen/netfront Date: Tue, 09 May 2017 13:59:24 -0700 Message-ID: <1571628.UQhQsSBvqn@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <0100015beeed2f38-6246d7db-7f23-4b8a-ba50-b97ec0953457-000000@email.amazonses.com> References: <201606021116.u52BGajD047287@repo.freebsd.org> <20170509100912.h3ylwugahvfi5cc2@dhcp-3-128.uk.xensource.com> <0100015beeed2f38-6246d7db-7f23-4b8a-ba50-b97ec0953457-000000@email.amazonses.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Wed, 10 May 2017 11:44:39 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 15:44:41 -0000 On Tuesday, May 09, 2017 08:36:13 PM Colin Percival wrote: > On 05/09/17 03:09, Roger Pau Monn=EF=BF=BD wrote: > > On Wed, May 03, 2017 at 05:13:40AM +0000, Colin Percival wrote: > >> On 06/02/16 04:16, Roger Pau Monn=EF=BF=BD wrote: > >>> Author: royger > >>> Date: Thu Jun 2 11:16:35 2016 > >>> New Revision: 301198 > >>> URL: https://svnweb.freebsd.org/changeset/base/301198 > >> > >> I think this commit is responsible for panics I'm seeing in EC2 on= T2 family > >> instances. [...] > >> but under high traffic volumes I think a separate thread can alrea= dy be > >> running in xn_rxeof, having dropped the RX lock while it passes a = packet > >> up the stack. This would result in two different threads trying t= o process > >> the same set of responses from the ring, with (unsurprisingly) bad= results. > >=20 > > Hm, right, xn_rxeof drops the lock while pushing the packet up the = stack. > > There's a "XXX" comment on top of that, could you try to remove the= lock > > dripping and see what happens? > >=20 > > I'm not sure there's any reason to drop the lock here, I very much = doubt > > if_input is going to sleep. >=20 > Judging by > $ grep -R -B 1 -A 1 if_input /usr/src/sys/dev > I'm pretty sure that we do indeed need to drop the lock. If it's pos= sible > to enter if_input while holding locks, there are a *lot* of network i= nterface > drivers which are dropping locks unnecessarily... It depends on how the locks are used. If a NIC driver uses a single lo= ck for both TX and RX, then it needs to drop the lock as on the TX side, if_transmit/if_start will be invoked with various network stack locks h= eld. However, if a driver uses separate locks for RX and TX and doesn't acqu= ire the RX lock while holding a TX lock, then it should be safe to hold the= lock across if_input. A lot of the older 100Mbps PCI NIC drivers only use a single lock and t= hus need to drop the lock. Many multiqueue NIC drivers use separate locks however and probably don't need to drop them around if_input. --=20 John Baldwin From owner-svn-src-head@freebsd.org Wed May 10 15:54:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E2D1D672D8 for ; Wed, 10 May 2017 15:54:29 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 66C96173B for ; Wed, 10 May 2017 15:54:27 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from thor.intern.walstatt.dynvpn.de ([92.225.11.184]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Mb7lL-1dRWvX0pZ5-00KjyO for ; Wed, 10 May 2017 17:54:20 +0200 Date: Wed, 10 May 2017 17:54:13 +0200 From: "O. Hartmann" To: svn-src-head@freebsd.org Subject: Re: svn commit: r318008 - head/sys/modules Message-ID: <20170510175413.188c43be@thor.intern.walstatt.dynvpn.de> In-Reply-To: <939F76F2-0B90-4BE1-BD3C-3E371E943810@gmail.com> References: <201705090459.v494x5dl045075@repo.freebsd.org> <20170509070602.22e979b0@freyja.zeit4.iv.bundesimmobilien.de> <939F76F2-0B90-4BE1-BD3C-3E371E943810@gmail.com> Organization: WALSTATT User-Agent: OutScare 3.1415926 X-Operating-System: ImNotAnOperatingSystem 3.141592527 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/jqeWxQQLHHuwj9UOzlY6YJZ"; protocol="application/pgp-signature" X-Provags-ID: V03:K0:ZFZaUJH49zi7va/s0sILZkBzkxfr6LsvzvubjOTpaVHWkouKthc 9Twcjqi/Q9Nfv1nwkCX2CPUGJJSzA7fUAbbOYUvKPLaQuRmgv+jDLULifYeguq3OydzqIJa dAzAlD5FNV4WIABF/LouY4Nr/O4Qz0AcGG8kt6htB81qjnzaq4liruZhcd+a4YDFETGxDFE x77YD42VtAczMtFOjlfSA== X-UI-Out-Filterresults: notjunk:1;V01:K0:4qzwBByj7+M=:Wd6Xw13SpT4fyMDeqCtiDG IXXs7lRIDj3EJjlduYpsdbjm7HJbQL0C7Bfvq96DipR10aexshhOOr5azMokzRsrP4SYarRPq 6jTi8UBQyYIdkDX0A9CKsDwgk2N3hKdoAUuFv4Shwy/mvn1DVCYwz6s3uJ83Jg7k8sEz8YLwS gglgHWZ+Rc7/QUC4zuh2w4m5kEHZN+8J6YgH1RTlsOq0QVuPJZPTXyEMctmaxHlJRv3KeSKT1 5E83wX50Kz25X8PTMh1zLdZCQClov+uOAvblxoWqQqt8+7llTL28Hs63gXQWU49u8qHnqaKI+ 0kY1qT473B/RhiKmJF4TsVQOhl4FGrzVhmcx7jZRiFB80/DHP8Py2gXwyDlaPKremBVzHq2hz vCA4GgdgtCeBw2SAJDZL2PwvN7WVE4IIyvmFVkn+nHMXjxH8dUksYTqE0F6S2EoAUGyogE/FQ KlaH+8Cr9E+CME/75A1cUWIXdUcAREwErP4mQKbfFNvHVKWV5CLYJ2lBwraMebYpfg5zgQQbM uc9WVkakZEyR5YWorwwICy7T0s1oU7zH0fBt6QEcmiodqsnGDIcwaQRPaSb6gQuPHkPkeWp+y m2xurT2NkHCIhT0wQ2Mr+7AAVMs/3U8zUajjbni2B3sSvoC4S/3fhZlVCu3EPaiHZsx0IccYq Tv89GmwM7uza9wa28Hk4uhVlVFh/MhGS+2XnsNHa75nWDG3WeRDLfHnk1RdZawoZEH6a3GRtR rPUyHHY/oMLlfSuqx3aamoCWL5apdnQq/n/h7L+3T5iSUTc2f8yHBJpvPHY= X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 15:54:29 -0000 --Sig_/jqeWxQQLHHuwj9UOzlY6YJZ Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Am Mon, 8 May 2017 22:09:34 -0700 "Ngie Cooper (yaneurabeya)" schrieb: > > On May 8, 2017, at 22:06, O. Hartmann wrote: > >=20 > > On Tue, 9 May 2017 04:59:05 +0000 (UTC) > > Ngie Cooper wrote: =20 >=20 > =E2=80=A6 >=20 > > Ooopsie ... ;-) > >=20 > > Something went wrong after I sucked in this commit just a few seconds a= go, > > compiling kernel failed: =20 >=20 > You=E2=80=99re fast. Fixed in r318009 5 minutes ago. > -Ngie ... I think it is more the delay between Europe and overseas and a coincide= nce, that I just picked up the wrong checkout ;-) Thanks. oh --=20 O. Hartmann Ich widerspreche der Nutzung oder =C3=9Cbermittlung meiner Daten f=C3=BCr Werbezwecke oder f=C3=BCr die Markt- oder Meinungsforschung (=C2=A7 28 Abs.= 4 BDSG). --Sig_/jqeWxQQLHHuwj9UOzlY6YJZ Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCWRM3pQAKCRDS528fyFhY lJtCAfwMxEOcqtU16Alt7EwEKLNOYdj40RxflhyO69prj8enNLSTi7gOwUkK1bUC +ge60EpVUWuvTSlTFirelcW8/pj6Af9ExRQIy6J9935mbUhIrMXxofa+Yq7exRoN Cxio8Xkj8ZHkg3HZ6kk5RKsvfCt1ZmhPyiNlF2XackpOO2FrIuef =lwLE -----END PGP SIGNATURE----- --Sig_/jqeWxQQLHHuwj9UOzlY6YJZ-- From owner-svn-src-head@freebsd.org Wed May 10 16:06:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9892D6774E; Wed, 10 May 2017 16:06:23 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 907301C5; Wed, 10 May 2017 16:06:23 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4AG6MXM021692; Wed, 10 May 2017 16:06:22 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4AG6M4i021690; Wed, 10 May 2017 16:06:22 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705101606.v4AG6M4i021690@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 10 May 2017 16:06:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318144 - in head: usr.bin/mkuzip usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 16:06:24 -0000 Author: asomers Date: Wed May 10 16:06:22 2017 New Revision: 318144 URL: https://svnweb.freebsd.org/changeset/base/318144 Log: Don't depend on assert(3) getting evaluated Reported by: imp MFC after: 3 weeks X-MFC-With: 318141, 318143 Sponsored by: Spectra Logic Corp Modified: head/usr.bin/mkuzip/mkuzip.c head/usr.sbin/pw/pw_user.c Modified: head/usr.bin/mkuzip/mkuzip.c ============================================================================== --- head/usr.bin/mkuzip/mkuzip.c Wed May 10 15:38:06 2017 (r318143) +++ head/usr.bin/mkuzip/mkuzip.c Wed May 10 16:06:22 2017 (r318144) @@ -108,7 +108,7 @@ int main(int argc, char **argv) struct mkuz_conveyor *cvp; void *c_ctx; struct mkuz_blk_info *chit; - size_t ncpusz, ncpu; + size_t ncpusz, ncpu, magiclen; double st, et; st = getdtime(); @@ -192,8 +192,8 @@ int main(int argc, char **argv) /* Not reached */ } - assert(strlcpy(hdr.magic, cfs.handler->magic, sizeof(hdr.magic)) - < sizeof(hdr.magic)); + magiclen = strlcpy(hdr.magic, cfs.handler->magic, sizeof(hdr.magic)); + assert(magiclen < sizeof(hdr.magic)); if (cfs.en_dedup != 0) { hdr.magic[CLOOP_OFS_VERSN] = CLOOP_MAJVER_3; Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Wed May 10 15:38:06 2017 (r318143) +++ head/usr.sbin/pw/pw_user.c Wed May 10 16:06:22 2017 (r318144) @@ -491,6 +491,7 @@ pw_pwcrypt(char *password) char salt[SALTSIZE + 1]; char *cryptpw; static char buf[256]; + size_t pwlen; /* * Calculate a salt value @@ -502,7 +503,8 @@ pw_pwcrypt(char *password) cryptpw = crypt(password, salt); if (cryptpw == NULL) errx(EX_CONFIG, "crypt(3) failure"); - assert(strlcpy(buf, cryptpw, sizeof(buf)) < sizeof(buf)); + pwlen = strlcpy(buf, cryptpw, sizeof(buf)); + assert(pwlen < sizeof(buf)); return (buf); } From owner-svn-src-head@freebsd.org Wed May 10 16:19:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4022D67DBF for ; Wed, 10 May 2017 16:19:22 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x229.google.com (mail-io0-x229.google.com [IPv6:2607:f8b0:4001:c06::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A94B5104A for ; Wed, 10 May 2017 16:19:22 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x229.google.com with SMTP id k91so4793715ioi.1 for ; Wed, 10 May 2017 09:19:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=Plz3j3o2jbzr68ypodhMd1WDucBNgM0ZuUAYt3DiwCY=; b=Adlc8uXPOng0TYppRgxVPTTe3oNnsun+eF6Vb2xMts68Fis0wpVHb++pKtqpO+cHii nOlJ2DyAGkBG+FmZBSnYkKjZZF0pnKV/k+RChzTXccGTEq4+HCx7zvHorWyIXG6HvAJo rftN3CR3XM11wRNdQZFhx2IMqECjj2qh+zoJrJtehuyo68V8ftjdnU560rQWd4f6imNC Ps5b9rLcrOdILStLaiTTyPPRCzA4M876dZ7VIKoLfX0wtFL3c+iLFrVCTh70F4pQ5Nwf fbgnEArtvenGTCRSOvI8cgAoFmRCu3q3Z7gEv0YDJgsJ0C2Y0MVXIpnSJOfajCiIOcfi WIkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=Plz3j3o2jbzr68ypodhMd1WDucBNgM0ZuUAYt3DiwCY=; b=VFo2Oxmzsyn1erxs6KhjUsFXvMGyFD7+BWPW87U3oPsAAF9EtZoMJKUHKNXLnERMdm sDK6wkz3JZ2TU9VX2aVbG+yRtdCLVWeUaamTobGuhYbpx8i6UjhmFfEOPeks5dV6WXfm dCTQoGm+7OFzl6rrXp5VCIYynwBCc0nMiJmAeOm7sjeHMRkMCo3ZRWGBrlFGsEEb2bSI R2psjSVW9AOvvJ3S8xY5hc5Bz9pgxxZtDyR4p/ZAfPKrkP5SsA/yBtlpEtAGdhN+jCiG HMLO+ocNPiC2X17PWKEo5hhcmP78mcUjwTy0Sp6xn/PX6i/dQoYyPxJogbOi7zoY8LME Y3yw== X-Gm-Message-State: AODbwcCIXuML9cy/FZrAGSQqyr6FtMHtSDOJQNSBeCBF6PJbEmYNvThL j4cw5TatzwA5ES1V5QEb6sYdwjjQaw== X-Received: by 10.107.85.4 with SMTP id j4mr4276510iob.218.1494433161879; Wed, 10 May 2017 09:19:21 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.126.6 with HTTP; Wed, 10 May 2017 09:19:21 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:4c5d:3029:c8d8:ae82] In-Reply-To: <201705101538.v4AFc6c8009588@repo.freebsd.org> References: <201705101538.v4AFc6c8009588@repo.freebsd.org> From: Warner Losh Date: Wed, 10 May 2017 10:19:21 -0600 X-Google-Sender-Auth: -V71iAmEdinxClIJq3wbJomaV00 Message-ID: Subject: Re: svn commit: r318143 - head/usr.sbin/pw To: Alan Somers Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 16:19:23 -0000 Again, this is wrong. -DNDEBUG makes this a nop. Warner. On Wed, May 10, 2017 at 9:38 AM, Alan Somers wrote: > Author: asomers > Date: Wed May 10 15:38:06 2017 > New Revision: 318143 > URL: https://svnweb.freebsd.org/changeset/base/318143 > > Log: > strcpy => strlcpy > > Reported by: Coverity > CID: 1006715 > MFC after: 3 weeks > Sponsored by: Spectra Logic Corp > > Modified: > head/usr.sbin/pw/pw_user.c > > Modified: head/usr.sbin/pw/pw_user.c > ============================================================================== > --- head/usr.sbin/pw/pw_user.c Wed May 10 15:35:41 2017 (r318142) > +++ head/usr.sbin/pw/pw_user.c Wed May 10 15:38:06 2017 (r318143) > @@ -33,6 +33,7 @@ static const char rcsid[] = > #include > #include > > +#include > #include > #include > #include > @@ -501,7 +502,8 @@ pw_pwcrypt(char *password) > cryptpw = crypt(password, salt); > if (cryptpw == NULL) > errx(EX_CONFIG, "crypt(3) failure"); > - return strcpy(buf, cryptpw); > + assert(strlcpy(buf, cryptpw, sizeof(buf)) < sizeof(buf)); > + return (buf); > } > > static char * > From owner-svn-src-head@freebsd.org Wed May 10 16:23:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66780D67FF0 for ; Wed, 10 May 2017 16:23:32 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x235.google.com (mail-io0-x235.google.com [IPv6:2607:f8b0:4001:c06::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2745F1575 for ; Wed, 10 May 2017 16:23:32 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x235.google.com with SMTP id o12so4857678iod.3 for ; Wed, 10 May 2017 09:23:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=xlF6aVHF1YKY8cBF3LIMC8z+kuQR8yWZnAa3+H0OPsA=; b=e3tRXNWItzTC7i/I7fT/L/0vDS3Z5mdDkvzMDuBZxrq+3I9Hom4HdRdnKOzlQi8EBv fPM1VVBB74JuWEasjG1MVD1RYl0SCSjimzvAb4QHwovBcgacHDyNkuLfI5QfClNZSs6C uZAEYyR8l8qJisxZYuhTLsW6TGWM2w80jK77rSlbzkF70SFXdhcedFisI3k+BE1I//8j YGpj7/DcampJTBfz3pHQ2LvdNP6fnLTvRf9GsEdOB+4isfJ1tquLj7ACBa3rTbwjzlXA O9wzlyWU9YcuBdpIqGo1bbq31PcciP3h3pP2VHBx2ocMvFnUp8tLhdDLdFLCtiiYwa61 jFxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=xlF6aVHF1YKY8cBF3LIMC8z+kuQR8yWZnAa3+H0OPsA=; b=HRZ2lzPPhLlb6aFsyjtJHz1+pFL1r1zCd5dKraXZL1llDeKoyAWyk3jEPS0VG7SI2p tHqUtraI5BB/Ouh5NdNXfsgKg1TRtAO7fuIwshxdAndYqeDEgzVVqMmWFG+yA2kiuczp YkGyUxdCI9m+Qaw9R/KUXKw3p0L4xnpQTX2wMbGHymo3sZGxaMiQ0ESSZim+sYSbgfAF QuNqa1xuGW2DXSBJ2LyPSMPpqNCZS0q2M/cehiovUAKAQfG3benCudub7MVbRDqg0EAF pyA6UXgPW9mSkjc9/pt3fnU1jqEv+N/gndQZX4Se82ADULe9obsG2nRgq3z0k27TVSOb DwAQ== X-Gm-Message-State: AODbwcBm5BXP3u8o6y6dkIoXcJhSWEae+pyRx6AjirT6+gzpGI6ZNgHb cuLn1U7hcfUfhU+ZGEXmCa7Us6TVdQ== X-Received: by 10.107.85.4 with SMTP id j4mr4297048iob.218.1494433411299; Wed, 10 May 2017 09:23:31 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.126.6 with HTTP; Wed, 10 May 2017 09:23:30 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:4c5d:3029:c8d8:ae82] In-Reply-To: <201705101606.v4AG6M4i021690@repo.freebsd.org> References: <201705101606.v4AG6M4i021690@repo.freebsd.org> From: Warner Losh Date: Wed, 10 May 2017 10:23:30 -0600 X-Google-Sender-Auth: 2svVExrqBxPpN4WqFW6FhBCHT20 Message-ID: Subject: Re: svn commit: r318144 - in head: usr.bin/mkuzip usr.sbin/pw To: Alan Somers Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 16:23:32 -0000 On Wed, May 10, 2017 at 10:06 AM, Alan Somers wrote: > Author: asomers > Date: Wed May 10 16:06:22 2017 > New Revision: 318144 > URL: https://svnweb.freebsd.org/changeset/base/318144 > > Log: > Don't depend on assert(3) getting evaluated Thanks! You can ignore my other grump. I unwisely didn't read all my inbox. Warner > Reported by: imp > MFC after: 3 weeks > X-MFC-With: 318141, 318143 > Sponsored by: Spectra Logic Corp > > Modified: > head/usr.bin/mkuzip/mkuzip.c > head/usr.sbin/pw/pw_user.c > > Modified: head/usr.bin/mkuzip/mkuzip.c > ============================================================================== > --- head/usr.bin/mkuzip/mkuzip.c Wed May 10 15:38:06 2017 (r318143) > +++ head/usr.bin/mkuzip/mkuzip.c Wed May 10 16:06:22 2017 (r318144) > @@ -108,7 +108,7 @@ int main(int argc, char **argv) > struct mkuz_conveyor *cvp; > void *c_ctx; > struct mkuz_blk_info *chit; > - size_t ncpusz, ncpu; > + size_t ncpusz, ncpu, magiclen; > double st, et; > > st = getdtime(); > @@ -192,8 +192,8 @@ int main(int argc, char **argv) > /* Not reached */ > } > > - assert(strlcpy(hdr.magic, cfs.handler->magic, sizeof(hdr.magic)) > - < sizeof(hdr.magic)); > + magiclen = strlcpy(hdr.magic, cfs.handler->magic, sizeof(hdr.magic)); > + assert(magiclen < sizeof(hdr.magic)); > > if (cfs.en_dedup != 0) { > hdr.magic[CLOOP_OFS_VERSN] = CLOOP_MAJVER_3; > > Modified: head/usr.sbin/pw/pw_user.c > ============================================================================== > --- head/usr.sbin/pw/pw_user.c Wed May 10 15:38:06 2017 (r318143) > +++ head/usr.sbin/pw/pw_user.c Wed May 10 16:06:22 2017 (r318144) > @@ -491,6 +491,7 @@ pw_pwcrypt(char *password) > char salt[SALTSIZE + 1]; > char *cryptpw; > static char buf[256]; > + size_t pwlen; > > /* > * Calculate a salt value > @@ -502,7 +503,8 @@ pw_pwcrypt(char *password) > cryptpw = crypt(password, salt); > if (cryptpw == NULL) > errx(EX_CONFIG, "crypt(3) failure"); > - assert(strlcpy(buf, cryptpw, sizeof(buf)) < sizeof(buf)); > + pwlen = strlcpy(buf, cryptpw, sizeof(buf)); > + assert(pwlen < sizeof(buf)); > return (buf); > } > > From owner-svn-src-head@freebsd.org Wed May 10 16:27:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28CCBD660A7; Wed, 10 May 2017 16:27:04 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-wr0-f179.google.com (mail-wr0-f179.google.com [209.85.128.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B8EC9170B; Wed, 10 May 2017 16:27:03 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-wr0-f179.google.com with SMTP id l9so712688wre.1; Wed, 10 May 2017 09:27:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=77Su0Lvqgqyrv33J+IoEMw3flivEAJmA7iHsls6kadM=; b=j9lXG2pmtNxWcNIIiCpTKI0wzt5GtFtlPcnah7FFVKrqiByvAkhhJMGnv5+RZVY8B7 QOH2l+Wnkv7WcunBOnyBk5vbZSkyYjZ4L5QqAbT5QEaObc5BKtz/H/BLI+B3rLEAxU49 TscWyexGLkJTCPt3ymd4PXozBgDVWoZE8MFeTugcLe+ugPuvauChELQAXgE/AsaY5Bwq NuPH1SkLKwqONxBhsSRqNUYAf3i/QsFoDcwaSQjkwrQDY22bPn7t2dVaEQPmEAV2xouI q5DNnPPi5U6dEbCPMKDAkWHOgKSAiocdrsFJ5VmXXBqdlCYA91nRDl9uRVYFg7kAeC5p qVsQ== X-Gm-Message-State: AODbwcCqXhqlGEsHF4KlMHMV6xEURmDODZ+z2TrvWrdAfMdvSn9uirOs 9c65GiBDACytoskzPQU= X-Received: by 10.223.139.150 with SMTP id o22mr4357960wra.118.1494429688542; Wed, 10 May 2017 08:21:28 -0700 (PDT) Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com. [74.125.82.52]) by smtp.gmail.com with ESMTPSA id s81sm3903637wms.6.2017.05.10.08.21.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 May 2017 08:21:28 -0700 (PDT) Received: by mail-wm0-f52.google.com with SMTP id 142so3038371wma.1; Wed, 10 May 2017 08:21:28 -0700 (PDT) X-Received: by 10.80.186.201 with SMTP id x67mr4789064ede.46.1494429688179; Wed, 10 May 2017 08:21:28 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.80.169.4 with HTTP; Wed, 10 May 2017 08:21:27 -0700 (PDT) In-Reply-To: <201705040004.v4404Hru044263@repo.freebsd.org> References: <201705040004.v4404Hru044263@repo.freebsd.org> From: Conrad Meyer Date: Wed, 10 May 2017 08:21:27 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r317782 - in head: contrib/libarchive/cpio contrib/libarchive/cpio/test contrib/libarchive/libarchive contrib/libarchive/libarchive/test contrib/libarchive/test_utils lib/libarchive/tests To: Martin Matuska Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 16:27:04 -0000 Hi Martin, One minor Coverity nit below: On Wed, May 3, 2017 at 5:04 PM, Martin Matuska wrote: > Author: mm > Date: Thu May 4 00:04:17 2017 > New Revision: 317782 > URL: https://svnweb.freebsd.org/changeset/base/317782 > > Log: > MFV r317781: > Sync libarchive with vendor > > Vendor changes (FreeBSD-related): > PR 897: add test for ZIP archives with invalid EOCD headers > PR 901: fix invalid renaming of sparse files > OSS-Fuzz issue 497: remove fallback tree in LZX decoder > OSS-Fuzz issue 527: rewrite expressions in lz4 filter > OSS-Fuzz issue 577: fix integer overflow in cpio reader > OSS-Fuzz issue 862: fix numerc parsing in mtree reader > OSS-Fuzz issue 1097: fix undefined shift in rar reader > cpio: various optimizations and memory leak fixes > > MFC after: 1 week > > ... > Modified: head/contrib/libarchive/cpio/test/test_option_lz4.c > ============================================================================== > --- head/contrib/libarchive/cpio/test/test_option_lz4.c Wed May 3 23:55:12 2017 (r317781) > +++ head/contrib/libarchive/cpio/test/test_option_lz4.c Thu May 4 00:04:17 2017 (r317782) > ... > @@ -68,14 +71,18 @@ DEFINE_TEST(test_option_lz4) > if (strstr(p, "Error closing") != NULL && !canLz4()) { > skipping("This version of bsdcpio uses an external lz4 program " > "but no such program is available on this system."); > + free(p); > return; > } > + free(p); > failure("--lz4 option is broken: %s", p); p is used after free here. Coverity CID 1374948. Best, Conrad > assertEqualInt(r, 0); > return; > } > + free(p); > /* Check that the archive file has an lz4 signature. */ > p = slurpfile(&s, "archive.out"); > assert(s > 2); > assertEqualMem(p, "\x04\x22\x4d\x18", 4); > + free(p); > } > ... From owner-svn-src-head@freebsd.org Wed May 10 18:33:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6630D66EA8; Wed, 10 May 2017 18:33:41 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A0384E77; Wed, 10 May 2017 18:33:41 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4AIXeHk082989; Wed, 10 May 2017 18:33:40 GMT (envelope-from erj@FreeBSD.org) Received: (from erj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4AIXeof082987; Wed, 10 May 2017 18:33:40 GMT (envelope-from erj@FreeBSD.org) Message-Id: <201705101833.v4AIXeof082987@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: erj set sender to erj@FreeBSD.org using -f From: Eric Joyner Date: Wed, 10 May 2017 18:33:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318147 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 18:33:42 -0000 Author: erj Date: Wed May 10 18:33:40 2017 New Revision: 318147 URL: https://svnweb.freebsd.org/changeset/base/318147 Log: Add several new media types to if_media.h These include several 25G types (for active direct attach cables and LR modules), and a missing type for 10G active direct attach. Differential Revision: https://reviews.freebsd.org/D10425 Reviewed by: smh, imp MFC after: 3 days Sponsored by: Intel Corporation Modified: head/sys/net/ieee8023ad_lacp.c head/sys/net/if_media.h Modified: head/sys/net/ieee8023ad_lacp.c ============================================================================== --- head/sys/net/ieee8023ad_lacp.c Wed May 10 17:32:29 2017 (r318146) +++ head/sys/net/ieee8023ad_lacp.c Wed May 10 18:33:40 2017 (r318147) @@ -1121,6 +1121,7 @@ lacp_compose_key(struct lacp_port *lp) case IFM_10G_CR1: case IFM_10G_ER: case IFM_10G_SFI: + case IFM_10G_AOC: key = IFM_10G_LR; break; case IFM_20G_KR2: @@ -1145,6 +1146,9 @@ lacp_compose_key(struct lacp_port *lp) case IFM_25G_CR: case IFM_25G_KR: case IFM_25G_SR: + case IFM_25G_LR: + case IFM_25G_ACC: + case IFM_25G_AOC: key = IFM_25G_PCIE; break; case IFM_40G_CR4: Modified: head/sys/net/if_media.h ============================================================================== --- head/sys/net/if_media.h Wed May 10 17:32:29 2017 (r318146) +++ head/sys/net/if_media.h Wed May 10 18:33:40 2017 (r318147) @@ -196,6 +196,10 @@ uint64_t ifmedia_baudrate(int); #define IFM_25G_SR IFM_X(55) /* 25GBase-SR */ #define IFM_50G_CR2 IFM_X(56) /* 50GBase-CR2 */ #define IFM_50G_KR2 IFM_X(57) /* 50GBase-KR2 */ +#define IFM_25G_LR IFM_X(58) /* 25GBase-LR */ +#define IFM_10G_AOC IFM_X(59) /* 10G active optical cable */ +#define IFM_25G_ACC IFM_X(60) /* 25G active copper cable */ +#define IFM_25G_AOC IFM_X(61) /* 25G active optical cable */ /* * Please update ieee8023ad_lacp.c:lacp_compose_key() @@ -450,6 +454,10 @@ struct ifmedia_description { { IFM_25G_SR, "25GBase-SR" }, \ { IFM_50G_CR2, "50GBase-CR2" }, \ { IFM_50G_KR2, "50GBase-KR2" }, \ + { IFM_25G_LR, "25GBase-LR" }, \ + { IFM_10G_AOC, "10GBase-AOC" }, \ + { IFM_25G_ACC, "25GBase-ACC" }, \ + { IFM_25G_AOC, "25GBase-AOC" }, \ { 0, NULL }, \ } @@ -782,6 +790,10 @@ struct ifmedia_baudrate { { IFM_ETHER | IFM_25G_SR, IF_Gbps(25ULL) }, \ { IFM_ETHER | IFM_50G_CR2, IF_Gbps(50ULL) }, \ { IFM_ETHER | IFM_50G_KR2, IF_Gbps(50ULL) }, \ + { IFM_ETHER | IFM_25G_LR, IF_Gbps(25ULL) }, \ + { IFM_ETHER | IFM_10G_AOC, IF_Gbps(10ULL) }, \ + { IFM_ETHER | IFM_25G_ACC, IF_Gbps(25ULL) }, \ + { IFM_ETHER | IFM_25G_AOC, IF_Gbps(25ULL) }, \ \ { IFM_TOKEN | IFM_TOK_STP4, IF_Mbps(4) }, \ { IFM_TOKEN | IFM_TOK_STP16, IF_Mbps(16) }, \ From owner-svn-src-head@freebsd.org Wed May 10 19:41:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A19FD5B449; Wed, 10 May 2017 19:41:54 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 10AE31783; Wed, 10 May 2017 19:41:53 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4AJfrAO010172; Wed, 10 May 2017 19:41:53 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4AJfrfF010171; Wed, 10 May 2017 19:41:53 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201705101941.v4AJfrfF010171@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Wed, 10 May 2017 19:41:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318150 - head/sys/netinet/libalias X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 19:41:54 -0000 Author: eugen (ports committer) Date: Wed May 10 19:41:52 2017 New Revision: 318150 URL: https://svnweb.freebsd.org/changeset/base/318150 Log: ipfw nat and natd support multiple aliasing instances with "nat global" feature that chooses right alias_address for outgoing packets that already have corresponding state in one of aliasing instances. This feature works just fine for ICMP, UDP, TCP and SCTP packes but not for others. For example, outgoing PPtP/GRE packets always get alias_address of latest configured instance no matter whether such packets have corresponding state or not. This change unbreaks translation of transit PPtP/GRE connections for "nat global" case fixing a bug in static ProtoAliasOut() function that ignores its "create" argument and performs translation regardless of its value. This static function is called only by LibAliasOutLocked() function and only for packers other than ICMP, UDP, TCP and SCTP. LibAliasOutLocked() passes its "create" argument unmodified. We have only two consumers of LibAliasOutLocked() in the source tree calling it with "create" unequal to 1: "ipfw nat global" code and similar natd code having same problem. All other consumers of LibAliasOutLocked() call it with create = 1 and the patch is "no-op" for such cases. PR: 218968 Approved by: ae, vsevolod (mentor) MFC after: 1 week Modified: head/sys/netinet/libalias/alias.c Modified: head/sys/netinet/libalias/alias.c ============================================================================== --- head/sys/netinet/libalias/alias.c Wed May 10 18:59:20 2017 (r318149) +++ head/sys/netinet/libalias/alias.c Wed May 10 19:41:52 2017 (r318150) @@ -699,12 +699,14 @@ ProtoAliasOut(struct libalias *la, struc struct alias_link *lnk; LIBALIAS_LOCK_ASSERT(la); - (void)create; /* Return if proxy-only mode is enabled */ if (la->packetAliasMode & PKT_ALIAS_PROXY_ONLY) return (PKT_ALIAS_OK); + if (!create) + return (PKT_ALIAS_IGNORED); + lnk = FindProtoOut(la, *ip_src, ip_dst, ip_p); if (lnk != NULL) { struct in_addr alias_address; From owner-svn-src-head@freebsd.org Wed May 10 22:13:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D6A3D664BA; Wed, 10 May 2017 22:13:49 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 10E9A3CD; Wed, 10 May 2017 22:13:48 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4AMDmv0074715; Wed, 10 May 2017 22:13:48 GMT (envelope-from rpokala@FreeBSD.org) Received: (from rpokala@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4AMDlE2074710; Wed, 10 May 2017 22:13:47 GMT (envelope-from rpokala@FreeBSD.org) Message-Id: <201705102213.v4AMDlE2074710@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpokala set sender to rpokala@FreeBSD.org using -f From: Ravi Pokala Date: Wed, 10 May 2017 22:13:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318160 - in head: sbin/ifconfig sys/net sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 22:13:49 -0000 Author: rpokala Date: Wed May 10 22:13:47 2017 New Revision: 318160 URL: https://svnweb.freebsd.org/changeset/base/318160 Log: Persistently store NIC's hardware MAC address, and add a way to retrive it The MAC address reported by `ifconfig ${nic} ether' does not always match the address in the hardware, as reported by the driver during attach. In particular, NICs which are components of a lagg(4) interface all report the same MAC. When attaching, the NIC driver passes the MAC address it read from the hardware as an argument to ether_ifattach(). Keep a second copy of it, and create ioctl(SIOCGHWADDR) to return it. Teach `ifconfig' to report it along with the active MAC address. PR: 194386 Reviewed by: glebius MFC after: 1 week Sponsored by: Panasas Differential Revision: https://reviews.freebsd.org/D10609 Modified: head/sbin/ifconfig/af_link.c head/sys/net/if.c head/sys/net/if_ethersubr.c head/sys/net/if_var.h head/sys/sys/sockio.h Modified: head/sbin/ifconfig/af_link.c ============================================================================== --- head/sbin/ifconfig/af_link.c Wed May 10 21:42:16 2017 (r318159) +++ head/sbin/ifconfig/af_link.c Wed May 10 22:13:47 2017 (r318160) @@ -42,6 +42,7 @@ static const char rcsid[] = #include #include #include +#include #include #include @@ -67,7 +68,7 @@ link_status(int s __unused, const struct sdl->sdl_alen == ETHER_ADDR_LEN) { ether_format = ether_ntoa((struct ether_addr *)LLADDR(sdl)); if (f_ether != NULL && strcmp(f_ether, "dash") == 0) { - for (format_char = strchr(ether_format, ':'); + for (format_char = strchr(ether_format, ':'); format_char != NULL; format_char = strchr(ether_format, ':')) *format_char = '-'; @@ -78,6 +79,48 @@ link_status(int s __unused, const struct printf("\tlladdr %s\n", link_ntoa(sdl) + n); } + /* Best-effort (i.e. failures are silent) to get original + * hardware address, as read by NIC driver at attach time. Only + * applies to Ethernet NICs (IFT_ETHER). However, laggX + * interfaces claim to be IFT_ETHER, and re-type their component + * Ethernet NICs as IFT_IEEE8023ADLAG. So, check for both. If + * the MAC is zeroed, then it's actually a lagg. + */ + if ((sdl->sdl_type == IFT_ETHER || + sdl->sdl_type == IFT_IEEE8023ADLAG) && + sdl->sdl_alen == ETHER_ADDR_LEN) { + struct ifreq ifr; + int sock_hw; + int rc; + static const u_char laggaddr[6] = {0}; + + strncpy(ifr.ifr_name, ifa->ifa_name, + sizeof(ifr.ifr_name)); + memcpy(&ifr.ifr_addr, ifa->ifa_addr, + sizeof(ifa->ifa_addr->sa_len)); + ifr.ifr_addr.sa_family = AF_LOCAL; + if ((sock_hw = socket(AF_LOCAL, SOCK_DGRAM, 0)) < 0) { + warn("socket(AF_LOCAL,SOCK_DGRAM)"); + return; + } + rc = ioctl(sock_hw, SIOCGHWADDR, &ifr); + close(sock_hw); + if (rc != 0) { + return; + } + if (memcmp(ifr.ifr_addr.sa_data, laggaddr, sdl->sdl_alen) == 0) { + return; + } + ether_format = ether_ntoa((const struct ether_addr *) + &ifr.ifr_addr.sa_data); + if (f_ether != NULL && strcmp(f_ether, "dash") == 0) { + for (format_char = strchr(ether_format, ':'); + format_char != NULL; + format_char = strchr(ether_format, ':')) + *format_char = '-'; + } + printf("\thwaddr %s\n", ether_format); + } } } Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Wed May 10 21:42:16 2017 (r318159) +++ head/sys/net/if.c Wed May 10 22:13:47 2017 (r318160) @@ -744,6 +744,11 @@ if_attach_internal(struct ifnet *ifp, in /* Reliably crash if used uninitialized. */ ifp->if_broadcastaddr = NULL; + if (ifp->if_type == IFT_ETHER) { + ifp->if_hw_addr = malloc(ifp->if_addrlen, M_IFADDR, + M_WAITOK | M_ZERO); + } + #if defined(INET) || defined(INET6) /* Use defaults for TSO, if nothing is set */ if (ifp->if_hw_tsomax == 0 && @@ -1059,6 +1064,8 @@ if_detach_internal(struct ifnet *ifp, in * Remove link ifaddr pointer and maybe decrement if_index. * Clean up all addresses. */ + free(ifp->if_hw_addr, M_IFADDR); + ifp->if_hw_addr = NULL; ifp->if_addr = NULL; /* We can now free link ifaddr. */ @@ -2667,6 +2674,10 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, ifr->ifr_addr.sa_data, ifr->ifr_addr.sa_len); break; + case SIOCGHWADDR: + error = if_gethwaddr(ifp, ifr); + break; + case SIOCAIFGROUP: { struct ifgroupreq *ifgr = (struct ifgroupreq *)ifr; @@ -3584,6 +3595,29 @@ if_requestencap_default(struct ifnet *if } /* + * Get the link layer address that was read from the hardware at attach. + * + * This is only set by Ethernet NICs (IFT_ETHER), but laggX interfaces re-type + * their component interfaces as IFT_IEEE8023ADLAG. + */ +int +if_gethwaddr(struct ifnet *ifp, struct ifreq *ifr) +{ + + if (ifp->if_hw_addr == NULL) + return (ENODEV); + + switch (ifp->if_type) { + case IFT_ETHER: + case IFT_IEEE8023ADLAG: + bcopy(ifp->if_hw_addr, ifr->ifr_addr.sa_data, ifp->if_addrlen); + return (0); + default: + return (ENODEV); + } +} + +/* * The name argument must be a pointer to storage which will last as * long as the interface does. For physical devices, the result of * device_get_name(dev) is a good choice and for pseudo-devices a Modified: head/sys/net/if_ethersubr.c ============================================================================== --- head/sys/net/if_ethersubr.c Wed May 10 21:42:16 2017 (r318159) +++ head/sys/net/if_ethersubr.c Wed May 10 22:13:47 2017 (r318160) @@ -916,6 +916,8 @@ ether_ifattach(struct ifnet *ifp, const sdl->sdl_alen = ifp->if_addrlen; bcopy(lla, LLADDR(sdl), ifp->if_addrlen); + bcopy(lla, ifp->if_hw_addr, ifp->if_addrlen); + bpfattach(ifp, DLT_EN10MB, ETHER_HDR_LEN); if (ng_ether_attach_p != NULL) (*ng_ether_attach_p)(ifp); Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Wed May 10 21:42:16 2017 (r318159) +++ head/sys/net/if_var.h Wed May 10 22:13:47 2017 (r318160) @@ -281,6 +281,7 @@ struct ifnet { struct ifmultihead if_multiaddrs; /* multicast addresses configured */ int if_amcount; /* number of all-multicast requests */ struct ifaddr *if_addr; /* pointer to link-level address */ + void *if_hw_addr; /* hardware link-level address */ const u_int8_t *if_broadcastaddr; /* linklevel broadcast bytestring */ struct rwlock if_afdata_lock; void *if_afdata[AF_MAX]; @@ -650,6 +651,7 @@ int if_gethwassist(if_t ifp); int if_setsoftc(if_t ifp, void *softc); void *if_getsoftc(if_t ifp); int if_setflags(if_t ifp, int flags); +int if_gethwaddr(if_t ifp, struct ifreq *); int if_setmtu(if_t ifp, int mtu); int if_getmtu(if_t ifp); int if_getmtu_family(if_t ifp, int family); Modified: head/sys/sys/sockio.h ============================================================================== --- head/sys/sys/sockio.h Wed May 10 21:42:16 2017 (r318159) +++ head/sys/sys/sockio.h Wed May 10 22:13:47 2017 (r318160) @@ -97,6 +97,7 @@ #define SIOCGIFSTATUS _IOWR('i', 59, struct ifstat) /* get IF status */ #define SIOCSIFLLADDR _IOW('i', 60, struct ifreq) /* set linklevel addr */ #define SIOCGI2C _IOWR('i', 61, struct ifreq) /* get I2C data */ +#define SIOCGHWADDR _IOWR('i', 62, struct ifreq) /* get hardware lladdr */ #define SIOCSIFPHYADDR _IOW('i', 70, struct ifaliasreq) /* set gif address */ #define SIOCGIFPSRCADDR _IOWR('i', 71, struct ifreq) /* get gif psrc addr */ From owner-svn-src-head@freebsd.org Wed May 10 22:24:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E681D667C0; Wed, 10 May 2017 22:24:10 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 353C5ACF; Wed, 10 May 2017 22:24:10 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4AMO9Ob078719; Wed, 10 May 2017 22:24:09 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4AMO9SQ078718; Wed, 10 May 2017 22:24:09 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201705102224.v4AMO9SQ078718@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Wed, 10 May 2017 22:24:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318161 - head/contrib/bmake X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 22:24:10 -0000 Author: sjg Date: Wed May 10 22:24:09 2017 New Revision: 318161 URL: https://svnweb.freebsd.org/changeset/base/318161 Log: Ensure buf2 is in scope Modified: head/contrib/bmake/main.c Modified: head/contrib/bmake/main.c ============================================================================== --- head/contrib/bmake/main.c Wed May 10 22:13:47 2017 (r318160) +++ head/contrib/bmake/main.c Wed May 10 22:24:09 2017 (r318161) @@ -751,6 +751,7 @@ Main_SetObjdir(const char *fmt, ...) struct stat sb; char *path; char buf[MAXPATHLEN + 1]; + char buf2[MAXPATHLEN + 1]; Boolean rc = FALSE; va_list ap; @@ -759,8 +760,6 @@ Main_SetObjdir(const char *fmt, ...) va_end(ap); if (path[0] != '/') { - char buf2[MAXPATHLEN + 1]; - snprintf(buf2, MAXPATHLEN, "%s/%s", curdir, path); path = buf2; } From owner-svn-src-head@freebsd.org Wed May 10 22:31:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8235AD66A29; Wed, 10 May 2017 22:31:25 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qk0-x22f.google.com (mail-qk0-x22f.google.com [IPv6:2607:f8b0:400d:c09::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3FF6DDEB; Wed, 10 May 2017 22:31:25 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-qk0-x22f.google.com with SMTP id k74so8799904qke.1; Wed, 10 May 2017 15:31:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=SrknS3qGcyCLjgqh1OVj9FkQuaEQMcLvKcqNH40E3TI=; b=bvDAz/ePCtWekRl5RxTAbFUF3HBgCnkAVSm74fISwtfDVuKCOoWgp39N6aIlDOYIvs EibNpg7DQ9xhXper3FR6LZJi65DkNVq8NiQG3OzPCw+Jri8r5X6Jvms0ACqKjyiONUha rY6MMq5NGTWdMfLiPfvWE2Om5YF+NDCExWEMvBi85MIEb5/WwHZjRiNJWml8uNlY6uTB XC4HXjuhO8VIseMxUcl6kMI4UN/MtZkuqs06mG9Hnz2h0zfrf2m+yly2gRCXJ76HKLlk VGBQQQJX7e9pN9TISg/s/p2j7Rl/x8U1lmTp8bOIB8ygm+Pul661+4oa/fqavyBR6Ymf zz1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=SrknS3qGcyCLjgqh1OVj9FkQuaEQMcLvKcqNH40E3TI=; b=n3tmjjbbJ3U0mnZHwDrxKIkMDRtxV9usQR2P5K1dEJXBSTjDWkI04viI1NzTFl0wPp r2kfc7xwpPYilQ9TwSSLGHr3mSMeaAyBLJB8CA0wPozliB1rR5mgCKDu04FJrk1H0T60 e33z6RGR62b1ZFMd/6QpIyVwyJiZ2PrIocFfd76ojpwIibWpkUP3mRn2R5ecFsyw9Y2L lkVXSVw2BHz+KpGyVvjYU/ChDrupaK5QcvsX2y1i+nTL18NR8/JVL3b0jqBEl4zv+R+r cWeA7sdnF4Zhx4/rPHrWF4iOt/gzsOu4TYHNOG6I+zD5d2iFnedPtZ9jVzagw3xXUwM0 DNDQ== X-Gm-Message-State: AODbwcBMbyBYJNdZhNvpeDisRNwsu+06/ccNZVwGFiMaAB2UqS8UnjAg +MTlRn31nEZNAkH7ogKAxS6fzfQigdAnfiA= X-Received: by 10.55.73.71 with SMTP id w68mr8788596qka.76.1494455484105; Wed, 10 May 2017 15:31:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.93.48 with HTTP; Wed, 10 May 2017 15:31:23 -0700 (PDT) In-Reply-To: <201705102224.v4AMO9SQ078718@repo.freebsd.org> References: <201705102224.v4AMO9SQ078718@repo.freebsd.org> From: Ngie Cooper Date: Wed, 10 May 2017 15:31:23 -0700 Message-ID: Subject: Re: svn commit: r318161 - head/contrib/bmake To: "Simon J. Gerraty" Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 22:31:25 -0000 On Wed, May 10, 2017 at 3:24 PM, Simon J. Gerraty wrote: > Author: sjg > Date: Wed May 10 22:24:09 2017 > New Revision: 318161 > URL: https://svnweb.freebsd.org/changeset/base/318161 > > Log: > Ensure buf2 is in scope I think this is the proper fix for the issue that Bryan, Ravi, and I reported.. also reported as Coverity CID: 1374641. Thanks! -Ngie From owner-svn-src-head@freebsd.org Wed May 10 22:35:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E233D66C59; Wed, 10 May 2017 22:35:07 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qt0-x22b.google.com (mail-qt0-x22b.google.com [IPv6:2607:f8b0:400d:c0d::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49535146A; Wed, 10 May 2017 22:35:07 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-qt0-x22b.google.com with SMTP id m91so4343238qte.3; Wed, 10 May 2017 15:35:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=xcQdeF47Crb9BTRM3doG+z8ILZa7azBKJMpByK229PQ=; b=nmJuueTnheAfWjCimGyRWniKuqkp8rIir9Pxc1nqGEIO4tRGF1b63fWxciR6aYS9mV Bwarzn7k8MBxOd1esbANb4ActPT3443CNWYQqA1dbUdC9Ro3DBAPimDVaEuEsfRVrrWx xHYI2P5JyF9hKKuL03MlKuQYC7fJaRVXXGlNzch7vFFsdN17cU8Y3uEcwEN3hKKEfLgk dVorvs530vZsDqDlQloUy+lS9k+FjmgStrVp3r1VwD/aYPND0oEj2TwpAZyQoodGY641 fmuU5/mSYfHUzcBN+W2WgzYxyh+v4gIGEmeaJ4jT6hF0mHKAov/up9kHsFxlApV6FGfx RnIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=xcQdeF47Crb9BTRM3doG+z8ILZa7azBKJMpByK229PQ=; b=jDT/XJTRVwzQuDIsnl2gBYriq+Lru3SarQHQEqaUlWe4igOQcrhscrXw156ZOnfrmO QikZGuZQqUQp3q7+L0xDFK0nABj16a3mD4cIvouvwEBKL1o5sk8cUrv3yC+bvDSw/kPf TLmL/qjbeEXhSDwidN+G1+5TekvrxuyEyWSwN38BHkCLrcRj7l1Hrf9SD1a+yjqyUStP yJRRbT51xEO+nnpRE4wdH4fwzMWzK1dQEid8Mok/mSJYKlI5kb8F9zpSu22bA0q+/Z6y eIf+CAvKA8iDA77TbtEXc2VaiI8jDUaWUhD/oWqaV4Eu01mjLrL0zdGSdhMOcUPSuY/i 5rAA== X-Gm-Message-State: AODbwcCA9ZyuWEvTV0bz68DNVYz2BmB8n2M83TEEBrj3gvtfuizhlUBg 1UxyOvCc2zNGJxHDdtN8fowxdCFEfdDu X-Received: by 10.200.38.251 with SMTP id 56mr987479qtp.244.1494455706359; Wed, 10 May 2017 15:35:06 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.93.48 with HTTP; Wed, 10 May 2017 15:35:05 -0700 (PDT) In-Reply-To: References: <201705102224.v4AMO9SQ078718@repo.freebsd.org> From: Ngie Cooper Date: Wed, 10 May 2017 15:35:05 -0700 Message-ID: Subject: Re: svn commit: r318161 - head/contrib/bmake To: "Simon J. Gerraty" Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 22:35:07 -0000 On Wed, May 10, 2017 at 3:31 PM, Ngie Cooper wrote: > On Wed, May 10, 2017 at 3:24 PM, Simon J. Gerraty wrote: >> Author: sjg >> Date: Wed May 10 22:24:09 2017 >> New Revision: 318161 >> URL: https://svnweb.freebsd.org/changeset/base/318161 >> >> Log: >> Ensure buf2 is in scope > > I think this is the proper fix for the issue that Bryan, Ravi, and I Ravi -> Renato > reported.. also reported as Coverity CID: 1374641. > Thanks! > -Ngie From owner-svn-src-head@freebsd.org Wed May 10 22:45:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06396D67033; Wed, 10 May 2017 22:45:10 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C1EAF1A7E; Wed, 10 May 2017 22:45:09 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4AMj883087118; Wed, 10 May 2017 22:45:08 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4AMj5rb087086; Wed, 10 May 2017 22:45:05 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201705102245.v4AMj5rb087086@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Wed, 10 May 2017 22:45:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318163 - in head: contrib/bmake contrib/bmake/mk contrib/bmake/mk/sys usr.bin/bmake X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 22:45:10 -0000 Author: sjg Date: Wed May 10 22:45:05 2017 New Revision: 318163 URL: https://svnweb.freebsd.org/changeset/base/318163 Log: Merge bmake-20170510 No-op change other than version update. Added: head/contrib/bmake/mk/files.mk - copied unchanged from r318162, vendor/NetBSD/bmake/dist/mk/files.mk Modified: head/contrib/bmake/ChangeLog head/contrib/bmake/Makefile head/contrib/bmake/main.c head/contrib/bmake/mk/ChangeLog head/contrib/bmake/mk/FILES head/contrib/bmake/mk/dirdeps.mk head/contrib/bmake/mk/doc.mk head/contrib/bmake/mk/final.mk head/contrib/bmake/mk/inc.mk head/contrib/bmake/mk/init.mk head/contrib/bmake/mk/install-mk head/contrib/bmake/mk/lib.mk head/contrib/bmake/mk/meta2deps.py head/contrib/bmake/mk/own.mk head/contrib/bmake/mk/prog.mk head/contrib/bmake/mk/scripts.mk head/contrib/bmake/mk/sys/AIX.mk head/contrib/bmake/mk/sys/Darwin.mk head/contrib/bmake/mk/sys/Generic.mk head/contrib/bmake/mk/sys/HP-UX.mk head/contrib/bmake/mk/sys/IRIX.mk head/contrib/bmake/mk/sys/Linux.mk head/contrib/bmake/mk/sys/NetBSD.mk head/contrib/bmake/mk/sys/OSF1.mk head/contrib/bmake/mk/sys/OpenBSD.mk head/contrib/bmake/mk/sys/SunOS.mk head/contrib/bmake/mk/sys/UnixWare.mk head/contrib/bmake/parse.c head/contrib/bmake/str.c head/usr.bin/bmake/Makefile Directory Properties: head/contrib/bmake/ (props changed) Modified: head/contrib/bmake/ChangeLog ============================================================================== --- head/contrib/bmake/ChangeLog Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/ChangeLog Wed May 10 22:45:05 2017 (r318163) @@ -1,3 +1,29 @@ +2017-05-10 Simon J. Gerraty + + * Makefile (_MAKE_VERSION): 20170510 + Merge with NetBSD make, pick up + o main.c: Main_SetObjdir: ensure buf2 is in scope + +2017-05-08 Simon J. Gerraty + + * Makefile (_MAKE_VERSION): 20170505 + see mk/ChangeLog + +2017-05-05 Simon J. Gerraty + + * parse.c: not everyone has stdint.h + +2017-05-01 Simon J. Gerraty + + * Makefile (_MAKE_VERSION): 20170501 + see mk/ChangeLog + +2017-04-21 Simon J. Gerraty + + * Makefile (_MAKE_VERSION): 20170421 + Merge with NetBSD make, pick up + o str.c: Str_Match: fix closure tests for [^] and add unit-test. + 2017-04-20 Simon J. Gerraty * Makefile (_MAKE_VERSION): 20170420 Modified: head/contrib/bmake/Makefile ============================================================================== --- head/contrib/bmake/Makefile Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/Makefile Wed May 10 22:45:05 2017 (r318163) @@ -1,7 +1,7 @@ -# $Id: Makefile,v 1.88 2017/04/20 14:51:14 sjg Exp $ +# $Id: Makefile,v 1.92 2017/05/10 22:29:04 sjg Exp $ # Base version on src date -_MAKE_VERSION= 20170420 +_MAKE_VERSION= 20170510 PROG= bmake Modified: head/contrib/bmake/main.c ============================================================================== --- head/contrib/bmake/main.c Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/main.c Wed May 10 22:45:05 2017 (r318163) @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.264 2017/04/20 03:57:27 sjg Exp $ */ +/* $NetBSD: main.c,v 1.265 2017/05/10 22:26:14 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,7 +69,7 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: main.c,v 1.264 2017/04/20 03:57:27 sjg Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.265 2017/05/10 22:26:14 sjg Exp $"; #else #include #ifndef lint @@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19 #if 0 static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: main.c,v 1.264 2017/04/20 03:57:27 sjg Exp $"); +__RCSID("$NetBSD: main.c,v 1.265 2017/05/10 22:26:14 sjg Exp $"); #endif #endif /* not lint */ #endif Modified: head/contrib/bmake/mk/ChangeLog ============================================================================== --- head/contrib/bmake/mk/ChangeLog Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/ChangeLog Wed May 10 22:45:05 2017 (r318163) @@ -1,3 +1,37 @@ +2017-05-08 Simon J. Gerraty + + * install-mk (MK_VERSION): 20170505 + + * meta2deps.py: fix botched indenation. + +2017-05-05 Simon J. Gerraty + + * sys/*.mk: Remove setting of MAKE it is unnecessary and + in many cases wrong (basname rather than full path) + + * scripts.mk (SCRIPTSGROUPS): make this more like files.mk and inc.mk + + * init.mk: define realbuild to simplify logic in {lib,prog}.mk etc + +2017-05-01 Simon J. Gerraty + + * install-mk (MK_VERSION): 20170501 + + * doc.mk: fix typo in DOC_INSTALL_OWN + + * inc.mk: handle INCGROUPS similar to freebsd + + * files.mk: add something for files too + + * add staging logic to lib.mk prog.mk etc. + +2017-04-24 Simon J. Gerraty + + * install-mk (MK_VERSION): 20170424 + + * dirdeps.mk: set NO_DIRDEPS when bootstrapping. + also target of bootstrap-this when sed is needed should be ${_want:T} + 2017-04-18 Simon J. Gerraty * install-mk (MK_VERSION): 20170418 Modified: head/contrib/bmake/mk/FILES ============================================================================== --- head/contrib/bmake/mk/FILES Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/FILES Wed May 10 22:45:05 2017 (r318163) @@ -9,6 +9,7 @@ cython.mk dep.mk doc.mk dpadd.mk +files.mk final.mk host-target.mk host.libnames.mk Modified: head/contrib/bmake/mk/dirdeps.mk ============================================================================== --- head/contrib/bmake/mk/dirdeps.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/dirdeps.mk Wed May 10 22:45:05 2017 (r318163) @@ -1,4 +1,4 @@ -# $Id: dirdeps.mk,v 1.87 2017/03/07 01:49:03 sjg Exp $ +# $Id: dirdeps.mk,v 1.88 2017/04/24 20:34:59 sjg Exp $ # Copyright (c) 2010-2013, Juniper Networks, Inc. # All rights reserved. @@ -137,6 +137,14 @@ # built for. # +.if !target(bootstrap) && (make(bootstrap) || \ + make(bootstrap-this) || \ + make(bootstrap-recurse) || \ + make(bootstrap-empty)) +# disable most of below +.MAKE.LEVEL = 1 +.endif + # touch this at your peril _DIRDEP_USE_LEVEL?= 0 .if ${.MAKE.LEVEL} == ${_DIRDEP_USE_LEVEL} @@ -757,7 +765,7 @@ bootstrap-this: .NOTMAIN @echo Bootstrapping ${RELDIR}/${_want:T} from ${_src:T}; \ echo You need to build ${RELDIR} to correctly populate it. .if ${_src:T} != ${.MAKE.DEPENDFILE_PREFIX:T} - (cd ${.CURDIR} && sed ${.MAKE.DEPENDFILE_BOOTSTRAP_SED} ${_src} > ${_want}) + (cd ${.CURDIR} && sed ${.MAKE.DEPENDFILE_BOOTSTRAP_SED} ${_src} > ${_want:T}) .else cp ${.CURDIR}/${_src:T} ${_want} .endif Modified: head/contrib/bmake/mk/doc.mk ============================================================================== --- head/contrib/bmake/mk/doc.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/doc.mk Wed May 10 22:45:05 2017 (r318163) @@ -1,4 +1,4 @@ -# $Id: doc.mk,v 1.5 2015/09/08 06:15:31 sjg Exp $ +# $Id: doc.mk,v 1.6 2017/05/01 21:24:10 sjg Exp $ .if !target(__${.PARSEFILE}__) __${.PARSEFILE}__: @@ -59,7 +59,7 @@ spell: ${SRCS} .include .if !empty(DOCOWN) -DOC_INSTALL_OWN?= -o ${DOCOWN} -g ${DOGGRP} +DOC_INSTALL_OWN?= -o ${DOCOWN} -g ${DOCGRP} .endif .endif Copied: head/contrib/bmake/mk/files.mk (from r318162, vendor/NetBSD/bmake/dist/mk/files.mk) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/bmake/mk/files.mk Wed May 10 22:45:05 2017 (r318163, copy of r318162, vendor/NetBSD/bmake/dist/mk/files.mk) @@ -0,0 +1,83 @@ +# $Id: files.mk,v 1.6 2017/05/07 02:21:02 sjg Exp $ +# +# @(#) Copyright (c) 2017, Simon J. Gerraty +# +# This file is provided in the hope that it will +# be of use. There is absolutely NO WARRANTY. +# Permission to copy, redistribute or otherwise +# use this file is hereby granted provided that +# the above copyright notice and this notice are +# left intact. +# +# Please send copies of changes and bug-fixes to: +# sjg@crufty.net +# + +.include + +FILES_INSTALL_OWN ?= -o ${SHAREOWN} -g ${SHAREGRP} +FILESMODE ?= ${SHAREMODE} +FILES_COPY ?= -C + +FILESGROUPS ?= FILES +FILESGROUPS := ${FILESGROUPS:O:u} + +.if !target(buildfiles) +.for group in ${FILESGROUPS} +buildfiles: ${${group}} +.endfor +.endif +buildfiles: +realbuild: buildfiles + +# there is no default FILESDIR so +# ignore group if ${group}DIR is not defined +.for group in ${FILESGROUPS} +.if !empty(${group}) && defined(${group}DIR) +.if ${group} != "FILES" +${group}_INSTALL_OWN ?= ${FILES_INSTALL_OWN} +.endif +# incase we are staging +STAGE_DIR.${group} ?= ${STAGE_OBJTOP}${${group}DIR} + +.for file in ${${group}:O:u} +${group}_INSTALL_OWN.${file:T} ?= ${${group}_INSTALL_OWN} +${group}DIR.${file:T} ?= ${${group}DIR} +file_mkdir_list += ${${group}DIR.${file:T}} + +.if defined(${group}NAME.${file:T}) +STAGE_AS_SETS += ${group} +STAGE_AS_${file} = ${${group}NAME.${file:T}} +stage_as.${group}: ${file} + +installfiles: installfiles.${group}.${file:T} +installfiles.${group}.${file:T}: ${file} file_mkdirs + ${INSTALL} ${FILES_COPY} ${${group}_INSTALL_OWN.${file:T}} \ + -m ${FILESMODE} ${.ALLSRC:Nfile_mkdirs} ${DESTDIR}${${group}DIR}/${${group}NAME.${file:T}} + +.else +STAGE_SETS += ${group} +stage_files.${group}: ${file} +installfiles.${group}: ${file} +installfiles: installfiles.${group} +.endif + +.endfor # file + +installfiles.${group}: file_mkdirs + ${INSTALL} ${FILES_COPY} ${${group}_INSTALL_OWN} -m ${FILESMODE} \ + ${.ALLSRC:Nfile_mkdirs:O:u} ${DESTDIR}${${group}DIR} + +.endif # !empty +.endfor # group + +file_mkdirs: + @for d in ${file_mkdir_list:O:u}; do \ + test -d ${DESTDIR}$$d || \ + ${INSTALL} -d ${FILES_INSTALL_OWN} -m 775 ${DESTDIR}$$d; \ + done + +beforeinstall: +installfiles: +realinstall: installfiles +.ORDER: beforeinstall installfiles Modified: head/contrib/bmake/mk/final.mk ============================================================================== --- head/contrib/bmake/mk/final.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/final.mk Wed May 10 22:45:05 2017 (r318163) @@ -1,4 +1,4 @@ -# $Id: final.mk,v 1.6 2016/04/05 15:58:37 sjg Exp $ +# $Id: final.mk,v 1.8 2017/05/07 20:30:08 sjg Exp $ .if !target(__${.PARSEFILE}__) __${.PARSEFILE}__: @@ -6,9 +6,17 @@ __${.PARSEFILE}__: # provide a hook for folk who want to do scary stuff .-include <${.CURDIR:H}/Makefile-final.inc> -.if !empty(STAGE) +.if ${MK_STAGING} == "yes" +.include +.elif !empty(STAGE) .-include .endif .-include + +.if empty(_SKIP_BUILD) +install: realinstall +.endif +realinstall: + .endif Modified: head/contrib/bmake/mk/inc.mk ============================================================================== --- head/contrib/bmake/mk/inc.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/inc.mk Wed May 10 22:45:05 2017 (r318163) @@ -1,4 +1,4 @@ -# $Id: inc.mk,v 1.3 2011/03/11 05:23:05 sjg Exp $ +# $Id: inc.mk,v 1.7 2017/05/06 17:29:45 sjg Exp $ # # @(#) Copyright (c) 2008, Simon J. Gerraty # @@ -15,8 +15,6 @@ .include -includes: ${INCS} - .if !empty(LIBOWN) INC_INSTALL_OWN ?= -o ${LIBOWN} -g ${LIBGRP} .endif @@ -24,12 +22,68 @@ INCMODE ?= 444 INC_COPY ?= -C INCSDIR ?= ${INCDIR} -realinstall: incinstall +STAGE_INCSDIR?= ${STAGE_OBJTOP}${INCSDIR} + +# accommodate folk used to freebsd +INCGROUPS ?= ${INCSGROUPS:UINCS} +INCGROUPS := ${INCGROUPS:O:u} + +.if !target(buildincludes) +.for group in ${INCGROUPS} +buildincludes: ${${group}} +.endfor +.endif +buildincludes: +includes: buildincludes + .if !target(incinstall) -incinstall: -.if !empty(INCS) - [ -d ${DESTDIR}${INCSDIR} ] || \ - ${INSTALL} -d ${INC_INSTALL_OWN} -m 775 ${DESTDIR}${INCSDIR} - ${INSTALL} ${INC_COPY} ${INC_INSTALL_OWN} -m ${INCMODE} ${INCS} ${DESTDIR}${INCSDIR} +.for group in ${INCGROUPS} +.if !empty(${group}) +.if ${group} != "INC" +${group}_INSTALL_OWN ?= ${INC_INSTALL_OWN} +${group}DIR ?= ${INCDIR} .endif +# incase we are staging +STAGE_DIR.${group} ?= ${STAGE_OBJTOP}${${group}DIR} + +.for header in ${${group}:O:u} +${group}_INSTALL_OWN.${header:T} ?= ${${group}_INSTALL_OWN} +${group}DIR.${header:T} ?= ${${group}DIR} +inc_mkdir_list += ${${group}DIR.${header:T}} + +.if defined(${group}NAME.${header:T}) +STAGE_AS_SETS += ${group} +STAGE_AS_${header} = ${${group}NAME.${header:T}} +stage_as.${group}: ${header} + +incinstall: incinstall.${group}.${header:T} +incinstall.${group}.${header:T}: ${header} inc_mkdirs + ${INSTALL} ${INC_COPY} ${${group}_INSTALL_OWN.${header:T}} -m ${INCMODE} ${.ALLSRC:Ninc_mkdirs} ${DESTDIR}${${group}DIR}/${${group}NAME.${header:T}} + +.else +STAGE_SETS += ${group} +stage_files.${group}: ${header} +incinstall.${group}: ${header} +incinstall: incinstall.${group} .endif + +.endfor # header + +incinstall.${group}: inc_mkdirs + ${INSTALL} ${INC_COPY} ${${group}_INSTALL_OWN} -m ${INCMODE} \ + ${.ALLSRC:Ninc_mkdirs:O:u} ${DESTDIR}${${group}DIR} + +.endif # !empty +.endfor # group + +inc_mkdirs: + @for d in ${inc_mkdir_list:O:u}; do \ + test -d ${DESTDIR}$$d || \ + ${INSTALL} -d ${INC_INSTALL_OWN} -m 775 ${DESTDIR}$$d; \ + done + +.endif # !target(incinstall) + +beforeinstall: +realinstall: incinstall +.ORDER: beforeinstall incinstall Modified: head/contrib/bmake/mk/init.mk ============================================================================== --- head/contrib/bmake/mk/init.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/init.mk Wed May 10 22:45:05 2017 (r318163) @@ -1,4 +1,4 @@ -# $Id: init.mk,v 1.12 2016/04/05 15:58:37 sjg Exp $ +# $Id: init.mk,v 1.15 2017/05/07 20:27:54 sjg Exp $ # # @(#) Copyright (c) 2002, Simon J. Gerraty # @@ -50,8 +50,20 @@ PROFFLAGS?= -DGPROF -DPROF _SKIP_BUILD = not building at level 0 .endif -.if !empty(_SKIP_BUILD) +.if !defined(.PARSEDIR) +# no-op is the best we can do if not bmake. +.WAIT: +.endif + +# define this once for consistency +.if empty(_SKIP_BUILD) +# beforebuild is a hook for things that must be done early +all: beforebuild .WAIT realbuild +.else all: .PHONY .warning ${_SKIP_BUILD} .endif +beforebuild: +realbuild: + .endif Modified: head/contrib/bmake/mk/install-mk ============================================================================== --- head/contrib/bmake/mk/install-mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/install-mk Wed May 10 22:45:05 2017 (r318163) @@ -55,7 +55,7 @@ # Simon J. Gerraty # RCSid: -# $Id: install-mk,v 1.141 2017/04/18 23:53:18 sjg Exp $ +# $Id: install-mk,v 1.145 2017/05/09 04:05:32 sjg Exp $ # # @(#) Copyright (c) 1994 Simon J. Gerraty # @@ -70,7 +70,7 @@ # sjg@crufty.net # -MK_VERSION=20170418 +MK_VERSION=20170505 OWNER= GROUP= MODE=444 @@ -176,7 +176,7 @@ $SKIP_MKFILES Do chmod $BINMODE $mk_scri [ "$OWNER" ] && $SKIP_MKFILES Do chown $OWNER $mk_files $sys_mk_files # if this is a BSD system the bsd.*.mk should exist and be used. if [ -z "$SKIP_BSD_MK" ]; then - for f in dep doc init lib links man nls obj own prog subdir + for f in dep doc files inc init lib links man nls obj own prog subdir do b=bsd.$f.mk [ -s $b ] || Do ln -s $f.mk $b Modified: head/contrib/bmake/mk/lib.mk ============================================================================== --- head/contrib/bmake/mk/lib.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/lib.mk Wed May 10 22:45:05 2017 (r318163) @@ -1,4 +1,4 @@ -# $Id: lib.mk,v 1.55 2016/09/23 23:04:51 sjg Exp $ +# $Id: lib.mk,v 1.61 2017/05/06 17:30:09 sjg Exp $ .if !target(__${.PARSEFILE}__) __${.PARSEFILE}__: @@ -37,7 +37,7 @@ PICO?= .pico CFLAGS+= ${COPTS} -# Derrived from NetBSD-1.6 +# Originally derrived from NetBSD-1.6 # Set PICFLAGS to cc flags for producing position-independent code, # if not already set. Includes -DPIC, if required. @@ -375,15 +375,14 @@ _LIBS+=llib-l${LIB}.ln .include .endif -.if !defined(_SKIP_BUILD) -all: prebuild .WAIT ${_LIBS} -# a hook for things that must be done early -prebuild: -.if !defined(.PARSEDIR) -# no-op is the best we can do if not bmake. -.WAIT: +.if empty(LIB) +_LIBS= .endif + +.if !defined(_SKIP_BUILD) +realbuild: ${_LIBS} .endif + all: _SUBDIRUSE .for s in ${SRCS:N*.h:M*/*} @@ -509,7 +508,7 @@ LIB_INSTALL_OWN ?= -o ${LIBOWN} -g ${LIB .include -.if !target(realinstall) +.if !target(realinstall) && !empty(LIB) realinstall: libinstall .endif .if !target(libinstall) @@ -552,13 +551,19 @@ libinstall: .endif .endif +.if ${MK_MAN} != "no" install: maninstall _SUBDIRUSE maninstall: afterinstall +.endif afterinstall: realinstall libinstall: beforeinstall realinstall: beforeinstall .endif +.if defined(FILES) || defined(FILESGROUPS) +.include +.endif + .if ${MK_MAN} != "no" .include .endif @@ -591,5 +596,10 @@ realinstall: beforeinstall .endfor @touch ${.TARGET} +.if !empty(LIB) +STAGE_LIBDIR?= ${STAGE_OBJTOP}${LIBDIR} +stage_libs: ${_LIBS} +.endif + .include .endif Modified: head/contrib/bmake/mk/meta2deps.py ============================================================================== --- head/contrib/bmake/mk/meta2deps.py Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/meta2deps.py Wed May 10 22:45:05 2017 (r318163) @@ -37,7 +37,7 @@ We only pay attention to a subset of the """ RCSid: - $Id: meta2deps.py,v 1.25 2017/04/03 21:04:09 sjg Exp $ + $Id: meta2deps.py,v 1.26 2017/05/09 04:04:16 sjg Exp $ Copyright (c) 2011-2013, Juniper Networks, Inc. All rights reserved. @@ -142,7 +142,7 @@ def sort_unique(list, cmp=None, key=None for e in list: if e == le: continue - le = e + le = e nl.append(e) return nl @@ -534,7 +534,7 @@ class MetaFile: # to the src dir, we may need to add dependencies for each rdir = dir dir = abspath(dir, cwd, self.last_dir, self.debug, self.debug_out) - rdir = os.path.realpath(dir) + rdir = os.path.realpath(dir) if rdir == dir: rdir = None # now put path back together Modified: head/contrib/bmake/mk/own.mk ============================================================================== --- head/contrib/bmake/mk/own.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/own.mk Wed May 10 22:45:05 2017 (r318163) @@ -1,4 +1,4 @@ -# $Id: own.mk,v 1.32 2016/05/18 20:54:29 sjg Exp $ +# $Id: own.mk,v 1.35 2017/05/03 18:09:44 sjg Exp $ .if !target(__${.PARSEFILE}__) __${.PARSEFILE}__: @@ -117,6 +117,7 @@ OPTIONS_DEFAULT_DEPENDENT+= \ PICINSTALL/LINKLIB \ PICLIB/PIC \ PROFILE/LINKLIB \ + STAGING_PROG/STAGING \ .include @@ -128,7 +129,7 @@ _uid!= id -u USERGRP!= id -g .export USERGRP .endif -.for x in BIN CONF DOC INFO KMOD LIB MAN NLS SHARE +.for x in BIN CONF DOC INC INFO FILES KMOD LIB MAN NLS SHARE $xOWN= ${USER} $xGRP= ${USERGRP} $x_INSTALL_OWN= @@ -145,6 +146,9 @@ BINMODE?= 555 NONBINMODE?= 444 DIRMODE?= 755 +INCLUDEDIR?= ${prefix}/include +INCDIR?= ${INCLUDEDIR} + # Define MANZ to have the man pages compressed (gzip) #MANZ= 1 @@ -184,6 +188,10 @@ KMODGRP?= ${BINGRP} KMODOWN?= ${BINOWN} KMODMODE?= ${NONBINMODE} +SHAREGRP?= ${BINGRP} +SHAREOWN?= ${BINOWN} +SHAREMODE?= ${NONBINMODE} + COPY?= -c STRIP_FLAG?= -s @@ -244,4 +252,19 @@ MK_MAN= no MK_NLS= no .endif +# :U incase not using our sys.mk +.if ${MK_META_MODE:Uno} == "yes" +# should all be set by sys.mk if not default +TARGET_SPEC_VARS ?= MACHINE +.if ${TARGET_SPEC_VARS:[#]} > 1 +TARGET_SPEC_VARS_REV := ${TARGET_SPEC_VARS:[-1..1]} +.else +TARGET_SPEC_VARS_REV = ${TARGET_SPEC_VARS} +.endif +.if ${MK_STAGING} == "yes" +STAGE_ROOT?= ${OBJROOT}/stage +STAGE_OBJTOP?= ${STAGE_ROOT}/${TARGET_SPEC_VARS_REV:ts/} +.endif +.endif + .endif Modified: head/contrib/bmake/mk/prog.mk ============================================================================== --- head/contrib/bmake/mk/prog.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/prog.mk Wed May 10 22:45:05 2017 (r318163) @@ -1,4 +1,4 @@ -# $Id: prog.mk,v 1.28 2017/02/14 21:26:13 sjg Exp $ +# $Id: prog.mk,v 1.32 2017/05/06 17:30:09 sjg Exp $ .if !target(__${.PARSEFILE}__) __${.PARSEFILE}__: @@ -75,6 +75,8 @@ ${CXX_SUFFIXES:%=%.o}: .if defined(PROG) +BINDIR ?= ${prefix}/bin + SRCS?= ${PROG}.c .for s in ${SRCS:N*.h:N*.sh:M*/*} ${.o .po .lo:L:@o@${s:T:R}$o@}: $s @@ -126,8 +128,9 @@ MAN= ${PROG}.1 .endif # defined(PROG) .if !defined(_SKIP_BUILD) -all: ${PROG} +realbuild: ${PROG} .endif + all: _SUBDIRUSE .if !target(clean) @@ -208,6 +211,10 @@ lint: ${LOBJS} .NOPATH: ${OBJS} .endif +.if defined(FILES) || defined(FILESGROUPS) +.include +.endif + .if ${MK_MAN} != "no" .include .endif @@ -219,6 +226,20 @@ lint: ${LOBJS} .include .include .include + +.if !empty(PROG) && ${MK_STAGING_PROG} == "yes" +STAGE_BINDIR ?= ${STAGE_OBJTOP}${BINDIR} +STAGE_DIR.prog ?= ${STAGE_BINDIR} +.if ${PROG_NAME:U${PROG}} != ${PROG} +STAGE_AS_SETS += prog +STAGE_AS_${PROG} = ${PROG_NAME} +stage_as.prog: ${PROG} +.else +STAGE_SETS += prog +stage_files.prog: ${PROG} +.endif +.endif + .include .endif Modified: head/contrib/bmake/mk/scripts.mk ============================================================================== --- head/contrib/bmake/mk/scripts.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/scripts.mk Wed May 10 22:45:05 2017 (r318163) @@ -1,52 +1,91 @@ -# $Id: scripts.mk,v 1.2 2006/11/09 01:55:18 sjg Exp $ +# $Id: scripts.mk,v 1.3 2017/05/06 17:29:45 sjg Exp $ +# +# @(#) Copyright (c) 2006, Simon J. Gerraty +# +# This file is provided in the hope that it will +# be of use. There is absolutely NO WARRANTY. +# Permission to copy, redistribute or otherwise +# use this file is hereby granted provided that +# the above copyright notice and this notice are +# left intact. +# +# Please send copies of changes and bug-fixes to: +# sjg@crufty.net +# .include -.if defined(SCRIPTS) +SCRIPTSGROUPS ?= SCRIPTS +SCRIPTSGROUPS := ${SCRIPTSGROUPS:O:u} -all: ${SCRIPTS} - -.PHONY: scriptsinstall -install: scriptsinstall - -.if !target(scriptsinstall) SCRIPTSDIR?= ${BINDIR} SCRIPTSOWN?= ${BINOWN} SCRIPTSGRP?= ${BINGRP} SCRIPTSMODE?= ${BINMODE} +SCRIPTS_INSTALL_OWN?= -o ${SCRIPTSOWN} -g ${SCRIPTSGRP} +SCRIPTS_COPY ?= -C + # how we get script name from src SCRIPTSNAME_MOD?=T:R -script_targets= ${SCRIPTS:@s@${DESTDIR}${SCRIPTSDIR_$s:U${SCRIPTSDIR}}/${SCRIPTSNAME_$s:U${s:${SCRIPTSNAME_MOD}}}@} - -scriptsinstall:: ${script_targets} - -.PRECIOUS: ${script_targets} -.if !defined(UPDATE) -.PHONY: ${script_targets} -.endif - -INSTALL_FLAGS?= ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} \ - -o ${OWN_${.TARGET:T}:U${SCRIPTSOWN}} \ - -g ${GRP_${.TARGET:T}:U${SCRIPTSGRP}} \ - -m ${MODE_${.TARGET:T}:U${SCRIPTSMODE}} - -__SCRIPTINSTALL_USE: .USE - ${INSTALL} ${INSTALL_FLAGS_${.TARGET:T}:U${INSTALL_FLAGS}} \ - ${.ALLSRC} ${.TARGET} - -.for s in ${SCRIPTS} -.if !defined(BUILD) && !make(all) && !make(${s}) -${DESTDIR}${SCRIPTSDIR_$s:U${SCRIPTSDIR}}/${SCRIPTSNAME_$s:U${s:${SCRIPTSNAME_MOD}}}: .MADE -.endif -${DESTDIR}${SCRIPTSDIR_$s:U${SCRIPTSDIR}}/${SCRIPTSNAME_$s:U${s:${SCRIPTSNAME_MOD}}}: ${s} __SCRIPTINSTALL_USE +.if !target(buildfiles) +.for group in ${SCRIPTSGROUPS} +buildfiles: ${${group}} .endfor .endif +buildfiles: +realbuild: buildfiles +.for group in ${SCRIPTSGROUPS} +.if !empty(${group}) && defined(${group}DIR) +.if ${group} != "SCRIPTS" +${group}_INSTALL_OWN ?= ${SCRIPTS_INSTALL_OWN} .endif +# incase we are staging +STAGE_DIR.${group} ?= ${STAGE_OBJTOP}${${group}DIR} -.if !target(scriptsinstall) -scriptsinstall:: +.for script in ${${group}:O:u} +${group}_INSTALL_OWN.${script:T} ?= ${${group}_INSTALL_OWN} +${group}DIR.${script:T} ?= ${${group}DIR_${script:T}:U${${group}DIR}} +script_mkdir_list += ${${group}DIR.${script:T}} + +${group}NAME.${script} ?= ${${group}NAME_${script:T}:U${script:${SCRIPTSNAME_MOD}}} +.if ${${group}NAME.${script}:T} != ${script:T} +STAGE_AS_SETS += ${group} +STAGE_AS_${script} = ${${group}NAME.${script:T}} +stage_as.${group}: ${script} + +installscripts: installscripts.${group}.${script:T} +installscripts.${group}.${script:T}: ${script} script_mkdirs + ${INSTALL} ${SCRIPTS_COPY} ${${group}_INSTALL_OWN.${script:T}} \ + -m ${SCRIPTSMODE} ${.ALLSRC:Nscript_mkdirs} ${DESTDIR}${${group}DIR}/${${group}NAME.${script:T}} + +.else +STAGE_SETS += ${group} +stage_files.${group}: ${script} +installscripts.${group}: ${script} +installscripts: installscripts.${group} .endif +.endfor # script + +installscripts.${group}: script_mkdirs + ${INSTALL} ${SCRIPTS_COPY} ${${group}_INSTALL_OWN} -m ${SCRIPTSMODE} \ + ${.ALLSRC:Nscript_mkdirs:O:u} ${DESTDIR}${${group}DIR} + +.endif # !empty +.endfor # group + +script_mkdirs: + @for d in ${script_mkdir_list:O:u}; do \ + test -d ${DESTDIR}$$d || \ + ${INSTALL} -d ${SCRIPTS_INSTALL_OWN} -m 775 ${DESTDIR}$$d; \ + done + + +beforeinstall: +installscripts: +realinstall: installscripts +.ORDER: beforeinstall installscripts + Modified: head/contrib/bmake/mk/sys/AIX.mk ============================================================================== --- head/contrib/bmake/mk/sys/AIX.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/sys/AIX.mk Wed May 10 22:45:05 2017 (r318163) @@ -67,8 +67,6 @@ LDFLAGS= LINT= lint LINTFLAGS= -chapbx -MAKE= bmake - PC= pc PFLAGS= COMPILE.p= ${PC} ${PFLAGS} ${CPPFLAGS} -c Modified: head/contrib/bmake/mk/sys/Darwin.mk ============================================================================== --- head/contrib/bmake/mk/sys/Darwin.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/sys/Darwin.mk Wed May 10 22:45:05 2017 (r318163) @@ -84,8 +84,6 @@ LINTFLAGS?= -chapbx LORDER?= lorder -MAKE?= bmake - NM?= nm PC?= pc Modified: head/contrib/bmake/mk/sys/Generic.mk ============================================================================== --- head/contrib/bmake/mk/sys/Generic.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/sys/Generic.mk Wed May 10 22:45:05 2017 (r318163) @@ -1,4 +1,4 @@ -# $Id: Generic.mk,v 1.12 2016/03/22 20:45:14 sjg Exp $ +# $Id: Generic.mk,v 1.13 2017/05/05 18:02:16 sjg Exp $ # # some reasonable defaults @@ -80,8 +80,6 @@ LDFLAGS?= LINT?= lint LINTFLAGS?= -chapbxzF -MAKE?= ${.MAKE} - NM?= nm PC?= pc Modified: head/contrib/bmake/mk/sys/HP-UX.mk ============================================================================== --- head/contrib/bmake/mk/sys/HP-UX.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/sys/HP-UX.mk Wed May 10 22:45:05 2017 (r318163) @@ -1,4 +1,4 @@ -# $Id: HP-UX.mk,v 1.10 2016/03/22 20:45:14 sjg Exp $ +# $Id: HP-UX.mk,v 1.11 2017/05/05 18:02:16 sjg Exp $ # $NetBSD: sys.mk,v 1.19.2.1 1994/07/26 19:58:31 cgd Exp $ # @(#)sys.mk 5.11 (Berkeley) 3/13/91 @@ -101,8 +101,6 @@ LDFLAGS= LINT= lint LINTFLAGS= -chapbx -MAKE= bmake - PC= pc PFLAGS= COMPILE.p= ${PC} ${PFLAGS} ${CPPFLAGS} -c Modified: head/contrib/bmake/mk/sys/IRIX.mk ============================================================================== --- head/contrib/bmake/mk/sys/IRIX.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/sys/IRIX.mk Wed May 10 22:45:05 2017 (r318163) @@ -70,8 +70,6 @@ LINTFLAGS?= -chapbxzF LORDER?= lorder -MAKE?= make - NM?= nm PC?= pc Modified: head/contrib/bmake/mk/sys/Linux.mk ============================================================================== --- head/contrib/bmake/mk/sys/Linux.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/sys/Linux.mk Wed May 10 22:45:05 2017 (r318163) @@ -1,4 +1,4 @@ -# $Id: Linux.mk,v 1.8 2016/03/22 20:45:14 sjg Exp $ +# $Id: Linux.mk,v 1.9 2017/05/05 18:02:16 sjg Exp $ # $NetBSD: sys.mk,v 1.19.2.1 1994/07/26 19:58:31 cgd Exp $ # @(#)sys.mk 5.11 (Berkeley) 3/13/91 @@ -70,8 +70,6 @@ LDFLAGS= LINT= lint LINTFLAGS= -chapbx -MAKE= bmake - PC= pc PFLAGS= COMPILE.p= ${PC} ${PFLAGS} ${CPPFLAGS} -c Modified: head/contrib/bmake/mk/sys/NetBSD.mk ============================================================================== --- head/contrib/bmake/mk/sys/NetBSD.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/sys/NetBSD.mk Wed May 10 22:45:05 2017 (r318163) @@ -105,8 +105,6 @@ LINTFLAGS?= -chapbxzF LORDER?= lorder -MAKE?= make - NM?= nm PC?= pc Modified: head/contrib/bmake/mk/sys/OSF1.mk ============================================================================== --- head/contrib/bmake/mk/sys/OSF1.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/sys/OSF1.mk Wed May 10 22:45:05 2017 (r318163) @@ -1,4 +1,4 @@ -# $Id: OSF1.mk,v 1.7 2016/03/22 20:45:15 sjg Exp $ +# $Id: OSF1.mk,v 1.8 2017/05/05 18:02:16 sjg Exp $ # $NetBSD: sys.mk,v 1.19.2.1 1994/07/26 19:58:31 cgd Exp $ # @(#)sys.mk 5.11 (Berkeley) 3/13/91 @@ -77,8 +77,6 @@ LDFLAGS= LINT= lint LINTFLAGS= -chapbx -MAKE= bmake - PC= pc PFLAGS= COMPILE.p= ${PC} ${PFLAGS} ${CPPFLAGS} -c Modified: head/contrib/bmake/mk/sys/OpenBSD.mk ============================================================================== --- head/contrib/bmake/mk/sys/OpenBSD.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/sys/OpenBSD.mk Wed May 10 22:45:05 2017 (r318163) @@ -80,8 +80,6 @@ LINTFLAGS?= -chapbxzF LORDER?= lorder -MAKE?= make - NM?= nm PC?= pc Modified: head/contrib/bmake/mk/sys/SunOS.mk ============================================================================== --- head/contrib/bmake/mk/sys/SunOS.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/sys/SunOS.mk Wed May 10 22:45:05 2017 (r318163) @@ -1,4 +1,4 @@ -# $Id: SunOS.mk,v 1.7 2016/03/22 20:45:15 sjg Exp $ +# $Id: SunOS.mk,v 1.8 2017/05/05 18:02:17 sjg Exp $ .if ${.PARSEFILE} == "sys.mk" .include @@ -98,8 +98,6 @@ LDFLAGS= LINT= lint LINTFLAGS= -chapbx -MAKE= bmake - PC= pc PFLAGS= COMPILE.p= ${PC} ${PFLAGS} ${CPPFLAGS} -c Modified: head/contrib/bmake/mk/sys/UnixWare.mk ============================================================================== --- head/contrib/bmake/mk/sys/UnixWare.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/sys/UnixWare.mk Wed May 10 22:45:05 2017 (r318163) @@ -1,4 +1,4 @@ -# $Id: UnixWare.mk,v 1.2 2016/03/22 20:45:15 sjg Exp $ +# $Id: UnixWare.mk,v 1.3 2017/05/05 18:02:17 sjg Exp $ # based on "Id: SunOS.5.sys.mk,v 1.6 2003/09/30 16:42:23 sjg Exp " # $NetBSD: sys.mk,v 1.19.2.1 1994/07/26 19:58:31 cgd Exp $ # @(#)sys.mk 5.11 (Berkeley) 3/13/91 @@ -114,8 +114,6 @@ LINTFLAGS?= -pF LORDER?= lorder -MAKE?= bmake - NM?= nm PC?= pc # XXX: UDK probably does not have pc Modified: head/contrib/bmake/parse.c ============================================================================== --- head/contrib/bmake/parse.c Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/parse.c Wed May 10 22:45:05 2017 (r318163) @@ -130,7 +130,6 @@ __RCSID("$NetBSD: parse.c,v 1.225 2017/0 #include #include #include -#include #include "make.h" #include "hash.h" @@ -139,6 +138,10 @@ __RCSID("$NetBSD: parse.c,v 1.225 2017/0 #include "buf.h" #include "pathnames.h" +#ifdef HAVE_STDINT_H +#include +#endif + #ifdef HAVE_MMAP #include Modified: head/contrib/bmake/str.c ============================================================================== --- head/contrib/bmake/str.c Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/str.c Wed May 10 22:45:05 2017 (r318163) @@ -1,4 +1,4 @@ -/* $NetBSD: str.c,v 1.37 2017/04/11 17:30:13 sjg Exp $ */ +/* $NetBSD: str.c,v 1.38 2017/04/21 22:15:44 sjg Exp $ */ /*- * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: str.c,v 1.37 2017/04/11 17:30:13 sjg Exp $"; +static char rcsid[] = "$NetBSD: str.c,v 1.38 2017/04/21 22:15:44 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)str.c 5.8 (Berkeley) 6/1/90"; #else -__RCSID("$NetBSD: str.c,v 1.37 2017/04/11 17:30:13 sjg Exp $"); +__RCSID("$NetBSD: str.c,v 1.38 2017/04/21 22:15:44 sjg Exp $"); #endif #endif /* not lint */ #endif Modified: head/usr.bin/bmake/Makefile ============================================================================== --- head/usr.bin/bmake/Makefile Wed May 10 22:40:27 2017 (r318162) +++ head/usr.bin/bmake/Makefile Wed May 10 22:45:05 2017 (r318163) @@ -14,10 +14,10 @@ CFLAGS+= -I${.CURDIR} *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Wed May 10 23:32:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70ABFD67D1B; Wed, 10 May 2017 23:32:32 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 40DFC1764; Wed, 10 May 2017 23:32:32 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4ANWVxt007217; Wed, 10 May 2017 23:32:31 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4ANWVGW007216; Wed, 10 May 2017 23:32:31 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201705102332.v4ANWVGW007216@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 10 May 2017 23:32:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318166 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 23:32:32 -0000 Author: glebius Date: Wed May 10 23:32:31 2017 New Revision: 318166 URL: https://svnweb.freebsd.org/changeset/base/318166 Log: There is no good reason for TCP reassembly zone to be UMA_ZONE_NOFREE. It has strong locking model, doesn't have any timers associated with entries. The entries theirselves are referenced only from the tcpcb zone, which itself is a normal zone, without the UMA_ZONE_NOFREE flag. Modified: head/sys/netinet/tcp_reass.c Modified: head/sys/netinet/tcp_reass.c ============================================================================== --- head/sys/netinet/tcp_reass.c Wed May 10 23:14:09 2017 (r318165) +++ head/sys/netinet/tcp_reass.c Wed May 10 23:32:31 2017 (r318166) @@ -108,7 +108,7 @@ tcp_reass_global_init(void) TUNABLE_INT_FETCH("net.inet.tcp.reass.maxsegments", &tcp_reass_maxseg); tcp_reass_zone = uma_zcreate("tcpreass", sizeof (struct tseg_qent), - NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); + NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); /* Set the zone limit and read back the effective value. */ tcp_reass_maxseg = uma_zone_set_max(tcp_reass_zone, tcp_reass_maxseg); From owner-svn-src-head@freebsd.org Thu May 11 00:23:53 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B376D67AF1; Thu, 11 May 2017 00:23:53 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0CA3DEDD; Thu, 11 May 2017 00:23:52 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4B0NqTs027775; Thu, 11 May 2017 00:23:52 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4B0Npct027773; Thu, 11 May 2017 00:23:51 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201705110023.v4B0Npct027773@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Thu, 11 May 2017 00:23:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318167 - in head/sys: cddl/dev/dtrace/powerpc powerpc/booke X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 00:23:53 -0000 Author: jhibbits Date: Thu May 11 00:23:51 2017 New Revision: 318167 URL: https://svnweb.freebsd.org/changeset/base/318167 Log: Fix stack tracing in dtrace for powerpc The current method only sort of works, and usually doesn't work reliably. Also, on Book-E the return address from DEBUG exceptions is not the sentinel addresses, so it won't exit the loop correctly. Fix this by better handling trap frames during unwinding, and using the common trap handler for debug traps, as the code in that segment is identical between the two. MFC after: 1 week Modified: head/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c head/sys/powerpc/booke/trap_subr.S Modified: head/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c ============================================================================== --- head/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c Wed May 10 23:32:31 2017 (r318166) +++ head/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c Thu May 11 00:23:51 2017 (r318167) @@ -38,6 +38,7 @@ #include #include +#include #include #include @@ -54,16 +55,19 @@ #ifdef __powerpc64__ #define OFFSET 4 /* Account for the TOC reload slot */ +#define FRAME_OFFSET 48 #else #define OFFSET 0 +#define FRAME_OFFSET 8 #endif #define INKERNEL(x) ((x) <= VM_MAX_KERNEL_ADDRESS && \ (x) >= VM_MIN_KERNEL_ADDRESS) static __inline int -dtrace_sp_inkernel(uintptr_t sp, int aframes) +dtrace_sp_inkernel(uintptr_t sp) { + struct trapframe *frame; vm_offset_t callpc; #ifdef __powerpc64__ @@ -77,14 +81,15 @@ dtrace_sp_inkernel(uintptr_t sp, int afr /* * trapexit() and asttrapexit() are sentinels * for kernel stack tracing. - * - * Special-case this for 'aframes == 0', because fbt sets aframes to the - * trap callchain depth, so we want to break out of it. */ - if ((callpc + OFFSET == (vm_offset_t) &trapexit || - callpc + OFFSET == (vm_offset_t) &asttrapexit) && - aframes != 0) - return (0); + if (callpc + OFFSET == (vm_offset_t) &trapexit || + callpc + OFFSET == (vm_offset_t) &asttrapexit) { + if (sp == 0) + return (0); + frame = (struct trapframe *)(sp + FRAME_OFFSET); + + return ((frame->srr1 & PSL_PR) == 0); + } return (1); } @@ -93,6 +98,7 @@ static __inline uintptr_t dtrace_next_sp(uintptr_t sp) { vm_offset_t callpc; + struct trapframe *frame; #ifdef __powerpc64__ callpc = *(vm_offset_t *)(sp + RETURN_OFFSET64); @@ -103,18 +109,13 @@ dtrace_next_sp(uintptr_t sp) /* * trapexit() and asttrapexit() are sentinels * for kernel stack tracing. - * - * Special-case this for 'aframes == 0', because fbt sets aframes to the - * trap callchain depth, so we want to break out of it. */ if ((callpc + OFFSET == (vm_offset_t) &trapexit || - callpc + OFFSET == (vm_offset_t) &asttrapexit)) - /* Access the trap frame */ -#ifdef __powerpc64__ - return (*(uintptr_t *)sp + 48 + sizeof(register_t)); -#else - return (*(uintptr_t *)sp + 8 + sizeof(register_t)); -#endif + callpc + OFFSET == (vm_offset_t) &asttrapexit)) { + /* Access the trap frame */ + frame = (struct trapframe *)(sp + FRAME_OFFSET); + return (*(uintptr_t *)(frame->fixreg[1])); + } return (*(uintptr_t*)sp); } @@ -122,6 +123,7 @@ dtrace_next_sp(uintptr_t sp) static __inline uintptr_t dtrace_get_pc(uintptr_t sp) { + struct trapframe *frame; vm_offset_t callpc; #ifdef __powerpc64__ @@ -133,18 +135,13 @@ dtrace_get_pc(uintptr_t sp) /* * trapexit() and asttrapexit() are sentinels * for kernel stack tracing. - * - * Special-case this for 'aframes == 0', because fbt sets aframes to the - * trap callchain depth, so we want to break out of it. */ if ((callpc + OFFSET == (vm_offset_t) &trapexit || - callpc + OFFSET == (vm_offset_t) &asttrapexit)) - /* Access the trap frame */ -#ifdef __powerpc64__ - return (*(uintptr_t *)sp + 48 + offsetof(struct trapframe, lr)); -#else - return (*(uintptr_t *)sp + 8 + offsetof(struct trapframe, lr)); -#endif + callpc + OFFSET == (vm_offset_t) &asttrapexit)) { + /* Access the trap frame */ + frame = (struct trapframe *)(sp + FRAME_OFFSET); + return (frame->srr0); + } return (callpc); } @@ -176,7 +173,7 @@ dtrace_getpcstack(pc_t *pcstack, int pcs if (sp <= osp) break; - if (!dtrace_sp_inkernel(sp, aframes)) + if (!dtrace_sp_inkernel(sp)) break; callpc = dtrace_get_pc(sp); @@ -537,7 +534,7 @@ dtrace_getstackdepth(int aframes) if (sp <= osp) break; - if (!dtrace_sp_inkernel(sp, aframes)) + if (!dtrace_sp_inkernel(sp)) break; if (aframes == 0) Modified: head/sys/powerpc/booke/trap_subr.S ============================================================================== --- head/sys/powerpc/booke/trap_subr.S Wed May 10 23:32:31 2017 (r318166) +++ head/sys/powerpc/booke/trap_subr.S Thu May 11 00:23:51 2017 (r318167) @@ -981,12 +981,12 @@ int_debug_int: LOAD %r4,0(%r5) /* interrupt_vector_base in r4 */ add %r4,%r4,%r5 CMPL cr0, %r3, %r4 - blt 1f + blt trap_common LOAD %r4,4(%r5) /* interrupt_vector_top in r4 */ add %r4,%r4,%r5 addi %r4,%r4,4 CMPL cr0, %r3, %r4 - bge 1f + bge trap_common /* Disable single-stepping for the interrupt handlers. */ LOAD %r3, FRAME_SRR1+CALLSIZE(%r1); rlwinm %r3, %r3, 0, 23, 21 @@ -999,16 +999,6 @@ int_debug_int: mtspr SPR_SRR1, %r4 mtlr %r14 blr -1: - GET_TOCBASE(%r2) - addi %r3, %r1, CALLSIZE - bl CNAME(trap) - TOC_RESTORE - /* - * Handle ASTs, needed for proper support of single-stepping. - * We actually need to return to the process with an rfi. - */ - b trapexit /***************************************************************************** * Common trap code From owner-svn-src-head@freebsd.org Thu May 11 03:47:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A608D68D24; Thu, 11 May 2017 03:47:59 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C45616F0; Thu, 11 May 2017 03:47:59 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4B3lwcM009424; Thu, 11 May 2017 03:47:58 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4B3lwj4009423; Thu, 11 May 2017 03:47:58 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201705110347.v4B3lwj4009423@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Thu, 11 May 2017 03:47:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318171 - head/sys/dev/dpaa X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 03:47:59 -0000 Author: jhibbits Date: Thu May 11 03:47:58 2017 New Revision: 318171 URL: https://svnweb.freebsd.org/changeset/base/318171 Log: Fix uma_zcreate() align argument, now that the constraint is asserted. The alignment argument is the mask of low bits to mask off when allocating items in a zone, not the block-size alignment. Modified: head/sys/dev/dpaa/if_dtsec_rm.c Modified: head/sys/dev/dpaa/if_dtsec_rm.c ============================================================================== --- head/sys/dev/dpaa/if_dtsec_rm.c Thu May 11 03:41:55 2017 (r318170) +++ head/sys/dev/dpaa/if_dtsec_rm.c Thu May 11 03:47:58 2017 (r318171) @@ -115,7 +115,7 @@ dtsec_rm_fi_pool_init(struct dtsec_softc sc->sc_fi_zone = uma_zcreate(sc->sc_fi_zname, sizeof(struct dtsec_rm_frame_info), NULL, NULL, NULL, NULL, - sizeof(void *), 0); + sizeof(void *) - 1, 0); if (sc->sc_fi_zone == NULL) return (EIO); @@ -312,7 +312,7 @@ dtsec_rm_pool_rx_init(struct dtsec_softc device_get_nameunit(sc->sc_dev)); sc->sc_rx_zone = uma_zcreate(sc->sc_rx_zname, FM_PORT_BUFFER_SIZE, NULL, - NULL, NULL, NULL, FM_PORT_BUFFER_SIZE, 0); + NULL, NULL, NULL, FM_PORT_BUFFER_SIZE - 1, 0); if (sc->sc_rx_zone == NULL) return (EIO); From owner-svn-src-head@freebsd.org Thu May 11 04:39:12 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC679D68563; Thu, 11 May 2017 04:39:12 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E73E1390; Thu, 11 May 2017 04:39:12 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4B4dBVa029885; Thu, 11 May 2017 04:39:11 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4B4dBsH029884; Thu, 11 May 2017 04:39:11 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201705110439.v4B4dBsH029884@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 11 May 2017 04:39:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318173 - head/contrib/ipfilter/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 04:39:12 -0000 Author: cy Date: Thu May 11 04:39:11 2017 New Revision: 318173 URL: https://svnweb.freebsd.org/changeset/base/318173 Log: Implement outputting of IPv6 addresses in the ippool debug list of tree type pools (ippool -l -d -t tree). Currently IPv6 in ippool tree type pool handling is partially implemented (meaning it doesn't work). This is the first of a series of commits to remediate ippool. This will be MFCed with a yet to be committed series of fixes to ippool after it has been fully remediated. PR: 218433 Modified: head/contrib/ipfilter/lib/printpoolnode.c Modified: head/contrib/ipfilter/lib/printpoolnode.c ============================================================================== --- head/contrib/ipfilter/lib/printpoolnode.c Thu May 11 04:29:20 2017 (r318172) +++ head/contrib/ipfilter/lib/printpoolnode.c Thu May 11 04:39:11 2017 (r318173) @@ -33,8 +33,30 @@ printpoolnode(np, opts, fields) printmask(np->ipn_addr.adf_family, (u_32_t *)&np->ipn_mask.adf_addr); } else { - PRINTF("\tAddress: %s%s", np->ipn_info ? "! " : "", - inet_ntoa(np->ipn_addr.adf_addr.in4)); +#ifdef AF_INET6 + if (np->ipn_addr.adf_family == AF_INET6) { + char buf[INET6_ADDRSTRLEN + 1]; + const char *str; + + buf[0] = '\0'; + str = inet_ntop(AF_INET6, &np->ipn_addr.adf_addr.in6, + buf, sizeof(buf) - 1); + if (str == NULL) + str = "???"; + PRINTF("\tAddress: %s%s", np->ipn_info ? "! " : "", + str); + } else if (np->ipn_addr.adf_family == AF_INET) { +#else + if (np->ipn_addr.adf_family == AF_INET) { +#endif + PRINTF("\tAddress: %s%s", np->ipn_info ? "! " : "", + inet_ntoa(np->ipn_addr.adf_addr.in4)); + } else { + PRINTF("\tAddress: family: %d", + np->ipn_addr.adf_family); +#ifdef AF_INET6 + } +#endif printmask(np->ipn_addr.adf_family, (u_32_t *)&np->ipn_mask.adf_addr); #ifdef USE_QUAD_T From owner-svn-src-head@freebsd.org Thu May 11 05:36:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8FFA9D689CD; Thu, 11 May 2017 05:36:07 +0000 (UTC) (envelope-from srs0=hy3x=4r=sigsegv.be=kristof@codepro.be) Received: from venus.codepro.be (venus.codepro.be [IPv6:2a01:4f8:162:1127::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.codepro.be", Issuer "Gandi Standard SSL CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5A6E61244; Thu, 11 May 2017 05:36:03 +0000 (UTC) (envelope-from srs0=hy3x=4r=sigsegv.be=kristof@codepro.be) Received: from [172.16.16.31] (unknown [119.161.97.34]) (Authenticated sender: kp) by venus.codepro.be (Postfix) with ESMTPSA id A1C05994A; Thu, 11 May 2017 07:35:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sigsegv.be; s=mail; t=1494480960; bh=H5R7jQlNXsH6G3KB8PmwNxb0/cePE6nWgW/Bgrmz3M0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Ygd08d4QtqzhQvopsprePNyo4vzOLsUXfn0etMWzOsy+PS9GSmu1cJoBKy4I6gvHo qLbMJytc5PDw6iBVBhtSpe50wAtRTnXu3dL2ktTie+f3EVeX74fYCIPIwUC4diE0Kp 6YpnQomlVnR/Yz2pwutSzfNHJ6c/Sf+4YzTSL1n0= From: "Kristof Provost" To: "Ravi Pokala" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318160 - in head: sbin/ifconfig sys/net sys/sys Date: Thu, 11 May 2017 11:05:57 +0530 Message-ID: <3F09C117-5017-481D-AAB2-7C64FF23B395@sigsegv.be> In-Reply-To: <201705102213.v4AMDlE2074710@repo.freebsd.org> References: <201705102213.v4AMDlE2074710@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Mailer: MailMate (2.0BETAr6082) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 05:36:07 -0000 On 11 May 2017, at 3:43, Ravi Pokala wrote: > Author: rpokala > Date: Wed May 10 22:13:47 2017 > New Revision: 318160 > URL: https://svnweb.freebsd.org/changeset/base/318160 > > Log: > Persistently store NIC's hardware MAC address, and add a way to > retrive it > > Modified: head/sys/net/if_ethersubr.c > ============================================================================== > --- head/sys/net/if_ethersubr.c Wed May 10 21:42:16 2017 (r318159) > +++ head/sys/net/if_ethersubr.c Wed May 10 22:13:47 2017 (r318160) > @@ -916,6 +916,8 @@ ether_ifattach(struct ifnet *ifp, const > sdl->sdl_alen = ifp->if_addrlen; > bcopy(lla, LLADDR(sdl), ifp->if_addrlen); > > + bcopy(lla, ifp->if_hw_addr, ifp->if_addrlen); > + > bpfattach(ifp, DLT_EN10MB, ETHER_HDR_LEN); > if (ng_ether_attach_p != NULL) > (*ng_ether_attach_p)(ifp); > This seems to cause panics when I create a bridge interface: #10 0xffffffff80ef9304 in bcopy () at /usr/src/sys/amd64/amd64/support.S:139 #11 0xffffffff80b57a80 in ether_ifattach (ifp=0xfffff80035663000, lla=0xfffff800090e13f8 "\002k") at /usr/src/sys/net/if_ethersubr.c:919 #12 0xffffffff8325dc67 in bridge_clone_create (ifc=, unit=, params=) at /usr/src/sys/net/if_bridge.c:704 #13 0xffffffff80b54f54 in if_clone_createif (ifc=0xfffff80035081500, name=0xfffffe03e7936780 "bridge0", len=, params=0x0) at /usr/src/sys/net/if_clone.c:685 #14 0xffffffff80b50833 in ifioctl (so=, cmd=3223349628, data=, td=) at /usr/src/sys/net/if.c:2794 #15 0xffffffff80abc00d in kern_ioctl (td=, fd=, com=, data=) at file.h:323 #16 0xffffffff80abbccf in sys_ioctl (td=, uap=0xfffffe03e7936930) at /usr/src/sys/kern/sys_generic.c:745 #17 0xffffffff80efc059 in amd64_syscall (td=0xfffff80009114000, traced=0) at subr_syscall.c:136 #18 0xffffffff80edd09b in Xfast_syscall () at /usr/src/sys/amd64/amd64/exception.S:396 ifp->if_hw_addr is NULL here: (kgdb) fr 11 #11 0xffffffff80b57a80 in ether_ifattach (ifp=0xfffff80035663000, lla=0xfffff800090e13f8 "\002k") at /usr/src/sys/net/if_ethersubr.c:919 919 bcopy(lla, ifp->if_hw_addr, ifp->if_addrlen); (kgdb) p ifp->if_hw_addr $1 = (void *) 0x0 Regards, Kristof From owner-svn-src-head@freebsd.org Thu May 11 05:38:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E99F8D68C00; Thu, 11 May 2017 05:38:56 +0000 (UTC) (envelope-from srs0=hy3x=4r=sigsegv.be=kristof@codepro.be) Received: from venus.codepro.be (venus.codepro.be [IPv6:2a01:4f8:162:1127::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.codepro.be", Issuer "Gandi Standard SSL CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8590B1668; Thu, 11 May 2017 05:38:56 +0000 (UTC) (envelope-from srs0=hy3x=4r=sigsegv.be=kristof@codepro.be) Received: from [172.16.16.31] (unknown [119.161.97.34]) (Authenticated sender: kp) by venus.codepro.be (Postfix) with ESMTPSA id D59779973; Thu, 11 May 2017 07:38:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sigsegv.be; s=mail; t=1494481134; bh=mMpGty9sQQtczmS2iTKpv73OIU6u8MMG2NrYvNv6yms=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=2V6pU8ityBCHl3WetMVGUhtuvQPUIcrWjhyqnee2MY8n38twiSzStn5FSmXiIn44Q EG/PXvYEoNXLsIsWDedZqDHyRj+6ZU8K+tYFage4qMzMyMrPjAMoJ1NMqB7M4YMP4c Tq8ZxKzpYeE3XYvMD3FahWIPXTkj/3XBs8x0syZg= From: "Kristof Provost" To: "Ravi Pokala" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318160 - in head: sbin/ifconfig sys/net sys/sys Date: Thu, 11 May 2017 11:08:51 +0530 Message-ID: In-Reply-To: <3F09C117-5017-481D-AAB2-7C64FF23B395@sigsegv.be> References: <201705102213.v4AMDlE2074710@repo.freebsd.org> <3F09C117-5017-481D-AAB2-7C64FF23B395@sigsegv.be> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Mailer: MailMate (2.0BETAr6082) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 05:38:57 -0000 On 11 May 2017, at 11:05, Kristof Provost wrote: > On 11 May 2017, at 3:43, Ravi Pokala wrote: >> Author: rpokala >> Date: Wed May 10 22:13:47 2017 >> New Revision: 318160 >> URL: https://svnweb.freebsd.org/changeset/base/318160 >> >> Log: >> Persistently store NIC's hardware MAC address, and add a way to = >> retrive it >> > >> Modified: head/sys/net/if_ethersubr.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sys/net/if_ethersubr.c Wed May 10 21:42:16 2017 (r318159) >> +++ head/sys/net/if_ethersubr.c Wed May 10 22:13:47 2017 (r318160) >> @@ -916,6 +916,8 @@ ether_ifattach(struct ifnet *ifp, const >> sdl->sdl_alen =3D ifp->if_addrlen; >> bcopy(lla, LLADDR(sdl), ifp->if_addrlen); >> >> + bcopy(lla, ifp->if_hw_addr, ifp->if_addrlen); >> + >> bpfattach(ifp, DLT_EN10MB, ETHER_HDR_LEN); >> if (ng_ether_attach_p !=3D NULL) >> (*ng_ether_attach_p)(ifp); >> > > This seems to cause panics when I create a bridge interface: > > #10 0xffffffff80ef9304 in bcopy () at = > /usr/src/sys/amd64/amd64/support.S:139 > #11 0xffffffff80b57a80 in ether_ifattach (ifp=3D0xfffff80035663000, = > lla=3D0xfffff800090e13f8 "\002k") at /usr/src/sys/net/if_ethersubr.c:91= 9 > #12 0xffffffff8325dc67 in bridge_clone_create (ifc=3D out>, unit=3D, params=3D) at = > /usr/src/sys/net/if_bridge.c:704 > #13 0xffffffff80b54f54 in if_clone_createif (ifc=3D0xfffff80035081500, = > name=3D0xfffffe03e7936780 "bridge0", len=3D, = > params=3D0x0) at /usr/src/sys/net/if_clone.c:685 > #14 0xffffffff80b50833 in ifioctl (so=3D, = > cmd=3D3223349628, data=3D, td=3D) = > at /usr/src/sys/net/if.c:2794 > #15 0xffffffff80abc00d in kern_ioctl (td=3D, = > fd=3D, com=3D, data=3D optimized out>) at file.h:323 > #16 0xffffffff80abbccf in sys_ioctl (td=3D, = > uap=3D0xfffffe03e7936930) at /usr/src/sys/kern/sys_generic.c:745 > #17 0xffffffff80efc059 in amd64_syscall (td=3D0xfffff80009114000, = > traced=3D0) at subr_syscall.c:136 > #18 0xffffffff80edd09b in Xfast_syscall () at = > /usr/src/sys/amd64/amd64/exception.S:396 > > ifp->if_hw_addr is NULL here: > (kgdb) fr 11 > #11 0xffffffff80b57a80 in ether_ifattach (ifp=3D0xfffff80035663000, = > lla=3D0xfffff800090e13f8 "\002k") at /usr/src/sys/net/if_ethersubr.c:91= 9 > 919 bcopy(lla, ifp->if_hw_addr, ifp->if_addrlen); > (kgdb) p ifp->if_hw_addr > $1 =3D (void *) 0x0 > This may be because I=E2=80=99ve not yet updated world, just the kernel, = but = clearly that still shouldn=E2=80=99t cause panics. Regards, Kristof From owner-svn-src-head@freebsd.org Thu May 11 05:47:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FB26D68FBF; Thu, 11 May 2017 05:47:32 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from mr11p00im-asmtp002.me.com (mr11p00im-asmtp002.me.com [17.110.69.253]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 549F51B9F; Thu, 11 May 2017 05:47:32 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from process-dkim-sign-daemon.mr11p00im-asmtp002.me.com by mr11p00im-asmtp002.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) id <0OPR00K00WNS3Y00@mr11p00im-asmtp002.me.com>; Thu, 11 May 2017 05:47:17 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mac.com; s=4d515a; t=1494481637; bh=BUg8AolDgRXnN62Ol1z1LyR+izu6sThdSFDhgnkE9Ds=; h=Date:Subject:From:To:Message-id:MIME-version:Content-type; b=r2gxOHT51dwFUJRq85lszDw4pl4Ghj4aOYYOLPXPvWv7jUvofNvpzLdbf3d4iewk+ L9tSXMn0YN86qMwBy98r5YBM5EQ6I1TgYmOtKRLCZoZvySFiu1hsM1mpEw413mX+6q lCZLwOscxxoWjJxYhumtFen1ABefFnz5f+wntjlOcxTHYLpK0bfGKykJSlQs/R1sYm X++JLxW8UUYOrohTjVMd2v0H2FdASxzwCi9g4BgfiOFR6brrxeQIgYpi1EAP14xbHI QA8AUkQzyLVlWT5Ae19/nh97WDyiBC6O/RzZUQp4tPexor2OOsLaoopjfEgoEcnZQn fbtgLJ7aMCVcQ== Received: from icloud.com ([127.0.0.1]) by mr11p00im-asmtp002.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) with ESMTPSA id <0OPR00LMQXERAG30@mr11p00im-asmtp002.me.com>; Thu, 11 May 2017 05:47:16 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-05-11_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1034 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1701120000 definitions=main-1705110036 User-Agent: Microsoft-MacOutlook/f.21.0.170409 Date: Wed, 10 May 2017 22:47:14 -0700 Subject: Re: svn commit: r318160 - in head: sbin/ifconfig sys/net sys/sys From: Ravi Pokala To: Kristof Provost Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-id: Thread-topic: svn commit: r318160 - in head: sbin/ifconfig sys/net sys/sys References: <201705102213.v4AMDlE2074710@repo.freebsd.org> <3F09C117-5017-481D-AAB2-7C64FF23B395@sigsegv.be> In-reply-to: MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 05:47:32 -0000 -----Original Message----- > From: on behalf of Kristof Provost > Date: 2017-05-10, Wednesday at 22:38 > To: Ravi Pokala > Cc: , , > Subject: Re: svn commit: r318160 - in head: sbin/ifconfig sys/net sys/sys >=20 > On 11 May 2017, at 11:05, Kristof Provost wrote: >> On 11 May 2017, at 3:43, Ravi Pokala wrote: >>> Author: rpokala >>> Date: Wed May 10 22:13:47 2017 >>> New Revision: 318160 >>> URL: https://svnweb.freebsd.org/changeset/base/318160 >>> >>> Log: >>> Persistently store NIC's hardware MAC address, and add a way to=20 >>> retrive it >>> >> >> This seems to cause panics when I create a bridge interface: >> >> #10 0xffffffff80ef9304 in bcopy () at=20 >> /usr/src/sys/amd64/amd64/support.S:139 >> #11 0xffffffff80b57a80 in ether_ifattach (ifp=3D0xfffff80035663000,=20 >> lla=3D0xfffff800090e13f8 "\002k") at /usr/src/sys/net/if_ethersubr.c:919 >> #12 0xffffffff8325dc67 in bridge_clone_create (ifc=3D> out>, unit=3D, params=3D) at=20 >> /usr/src/sys/net/if_bridge.c:704 >> ... >> >> ifp->if_hw_addr is NULL here: >> (kgdb) fr 11 >> #11 0xffffffff80b57a80 in ether_ifattach (ifp=3D0xfffff80035663000,=20 >> lla=3D0xfffff800090e13f8 "\002k") at /usr/src/sys/net/if_ethersubr.c:919 >> 919 bcopy(lla, ifp->if_hw_addr, ifp->if_addrlen); >> (kgdb) p ifp->if_hw_addr >> $1 =3D (void *) 0x0 >> >=20 > This may be because I=E2=80=99ve not yet updated world, just the kernel, but=20 > clearly that still shouldn=E2=80=99t cause panics. >=20 > Regards, > Kristof No, this is purely a kernel mistake -- I forgot to add a NULL-check in ethe= r_ifattach(). :-p Fixing now... -Ravi (rpokala@) From owner-svn-src-head@freebsd.org Thu May 11 06:24:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23B51D68BBB; Thu, 11 May 2017 06:24:59 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E9DE91469; Thu, 11 May 2017 06:24:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4B6OvAS074433; Thu, 11 May 2017 06:24:57 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4B6OvtA074432; Thu, 11 May 2017 06:24:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705110624.v4B6OvtA074432@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 11 May 2017 06:24:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318174 - head/usr.bin/procstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 06:24:59 -0000 Author: ngie Date: Thu May 11 06:24:57 2017 New Revision: 318174 URL: https://svnweb.freebsd.org/changeset/base/318174 Log: procstat(1): fix a typo (it's -> its) MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/usr.bin/procstat/procstat.1 Modified: head/usr.bin/procstat/procstat.1 ============================================================================== --- head/usr.bin/procstat/procstat.1 Thu May 11 04:39:11 2017 (r318173) +++ head/usr.bin/procstat/procstat.1 Thu May 11 06:24:57 2017 (r318174) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 5, 2015 +.Dd May 10, 2017 .Dt PROCSTAT 1 .Os .Sh NAME @@ -80,7 +80,7 @@ printed. .It Fl l Display resource limits for the process. .It Fl L -Display LWP info for the process pertaining to it's signal driven exit. +Display LWP info for the process pertaining to its signal driven exit. .It Fl r Display resource usage information for the process. .It Fl s From owner-svn-src-head@freebsd.org Thu May 11 06:35:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01C19D6800F; Thu, 11 May 2017 06:35:25 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C60BB1B03; Thu, 11 May 2017 06:35:24 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4B6ZNWV078414; Thu, 11 May 2017 06:35:23 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4B6ZN8a078413; Thu, 11 May 2017 06:35:23 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705110635.v4B6ZN8a078413@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 11 May 2017 06:35:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318175 - head/usr.bin/procstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 06:35:25 -0000 Author: ngie Date: Thu May 11 06:35:23 2017 New Revision: 318175 URL: https://svnweb.freebsd.org/changeset/base/318175 Log: procstat(1): clarify the Signal Disposition section - Fix a typo (SIGIGN -> SIG_IGN). Use .Dv when referencing SIG_IGN. - Use semi-colons as soft breaks when separating sentences for the FLAGS section. - Tweak wording for C slightly to flow better and to be a bit more technically correct (signals with handlers installed will be caught by the target program). - Reference signal(3) in the SEE ALSO section. MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/usr.bin/procstat/procstat.1 Modified: head/usr.bin/procstat/procstat.1 ============================================================================== --- head/usr.bin/procstat/procstat.1 Thu May 11 06:24:57 2017 (r318174) +++ head/usr.bin/procstat/procstat.1 Thu May 11 06:35:23 2017 (r318175) @@ -285,11 +285,13 @@ signal name process signal disposition details, three symbols .Bl -tag -width X -compact .It P -if signal is pending in the global process queue, - otherwise +if signal is pending in the global process queue; - otherwise. .It I -if signal delivery disposition is SIGIGN, - otherwise +if signal delivery disposition is +.Dv SIG_IGN; +- otherwise. .It C -if signal delivery is to catch it, - otherwise +if the signal will be caught; - otherwise. .El .El .Pp @@ -542,6 +544,7 @@ auxiliary vector value .Xr cap_rights_limit 2 , .Xr libprocstat 3 , .Xr libxo 3 , +.Xr signal 3 , .Xr xo_parse_args 3 , .Xr ddb 4 , .Xr stack 9 From owner-svn-src-head@freebsd.org Thu May 11 06:46:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC28FD68319; Thu, 11 May 2017 06:46:40 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 913941FC2; Thu, 11 May 2017 06:46:40 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4B6kd3M082327; Thu, 11 May 2017 06:46:39 GMT (envelope-from rpokala@FreeBSD.org) Received: (from rpokala@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4B6kdCM082326; Thu, 11 May 2017 06:46:39 GMT (envelope-from rpokala@FreeBSD.org) Message-Id: <201705110646.v4B6kdCM082326@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpokala set sender to rpokala@FreeBSD.org using -f From: Ravi Pokala Date: Thu, 11 May 2017 06:46:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318176 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 06:46:40 -0000 Author: rpokala Date: Thu May 11 06:46:39 2017 New Revision: 318176 URL: https://svnweb.freebsd.org/changeset/base/318176 Log: Persistently store NIC's hardware MAC address, and add a way to retrive it An earlier version of r318160 allocated if_hw_addr unconditionally; when it became conditional, I forgot to check for NULL in ether_ifattach(). Reviewed by: kp MFC after: 1 week MFC with: r318160 Sponsored by: Panasas Differential Revision: https://reviews.freebsd.org/D10678 Pointy-hat to: rpokala Modified: head/sys/net/if_ethersubr.c Modified: head/sys/net/if_ethersubr.c ============================================================================== --- head/sys/net/if_ethersubr.c Thu May 11 06:35:23 2017 (r318175) +++ head/sys/net/if_ethersubr.c Thu May 11 06:46:39 2017 (r318176) @@ -916,7 +916,8 @@ ether_ifattach(struct ifnet *ifp, const sdl->sdl_alen = ifp->if_addrlen; bcopy(lla, LLADDR(sdl), ifp->if_addrlen); - bcopy(lla, ifp->if_hw_addr, ifp->if_addrlen); + if (ifp->if_hw_addr != NULL) + bcopy(lla, ifp->if_hw_addr, ifp->if_addrlen); bpfattach(ifp, DLT_EN10MB, ETHER_HDR_LEN); if (ng_ether_attach_p != NULL) From owner-svn-src-head@freebsd.org Thu May 11 06:55:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 412A1D6855B; Thu, 11 May 2017 06:55:57 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from mr11p00im-asmtp004.me.com (mr11p00im-asmtp004.me.com [17.110.69.135]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FD9B785; Thu, 11 May 2017 06:55:57 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from process-dkim-sign-daemon.mr11p00im-asmtp004.me.com by mr11p00im-asmtp004.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) id <0OPS006000FP9000@mr11p00im-asmtp004.me.com>; Thu, 11 May 2017 06:55:56 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mac.com; s=4d515a; t=1494485756; bh=PkoyV3mzfhGhV2F8Ds+HT04ZGHVLIPnOFzaxwCslAiA=; h=Date:Subject:From:To:Message-id:MIME-version:Content-type; b=HaAVMuGYNZrAy53QZUNTuYO9i9hRyrGjW3FH8R3lFjiqcxi+6mpLS58y6q1Don9M9 SSY9kNia5mIWcqw3RT2r8s1j6FhP5UddOoAjqCPezHY7zFYEwGBjufg6QQwBxrZiGs TPMVBGFRLEsW/VRt1PUQRgC20iaaSgT0TqfZEK7ltNZ95AhbLL/tF2fEPRM/20Uzka bdNaEXHRQOXSLdoIasUV65V74tvEbXWTB5BzKEkupqxHlQoHvzOceHUTUSFdVy8IDe qT3bWKwHQ+RqKL0IIQksu+yTZQBTXoqmqw3+tU1NyWrv4C+zQ4OnzAdBsloqgaNGxw ETck0xCec06Bw== Received: from icloud.com ([127.0.0.1]) by mr11p00im-asmtp004.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) with ESMTPSA id <0OPS00OA80L5DO20@mr11p00im-asmtp004.me.com>; Thu, 11 May 2017 06:55:54 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-05-11_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1034 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1701120000 definitions=main-1705110044 User-Agent: Microsoft-MacOutlook/f.21.0.170409 Date: Wed, 10 May 2017 23:55:52 -0700 Subject: Re: svn commit: r318160 - in head: sbin/ifconfig sys/net sys/sys From: Ravi Pokala To: Kristof Provost Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-id: Thread-topic: svn commit: r318160 - in head: sbin/ifconfig sys/net sys/sys References: <201705102213.v4AMDlE2074710@repo.freebsd.org> <3F09C117-5017-481D-AAB2-7C64FF23B395@sigsegv.be> In-reply-to: MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 06:55:57 -0000 Fixed in r318176. Sorry for the breakage everyone. :-p -Ravi (rpokala@) -----Original Message----- From: Ravi Pokala Date: 2017-05-10, Wednesday at 22:47 To: Kristof Provost Cc: , , Subject: Re: svn commit: r318160 - in head: sbin/ifconfig sys/net sys/sys -----Original Message----- > From: on behalf of Kristof Provost > Date: 2017-05-10, Wednesday at 22:38 > To: Ravi Pokala > Cc: , , > Subject: Re: svn commit: r318160 - in head: sbin/ifconfig sys/net sys/sys >=20 > On 11 May 2017, at 11:05, Kristof Provost wrote: >> On 11 May 2017, at 3:43, Ravi Pokala wrote: >>> Author: rpokala >>> Date: Wed May 10 22:13:47 2017 >>> New Revision: 318160 >>> URL: https://svnweb.freebsd.org/changeset/base/318160 >>> >>> Log: >>> Persistently store NIC's hardware MAC address, and add a way to=20 >>> retrive it >>> >> >> This seems to cause panics when I create a bridge interface: >> >> #10 0xffffffff80ef9304 in bcopy () at=20 >> /usr/src/sys/amd64/amd64/support.S:139 >> #11 0xffffffff80b57a80 in ether_ifattach (ifp=3D0xfffff80035663000,=20 >> lla=3D0xfffff800090e13f8 "\002k") at /usr/src/sys/net/if_ethersubr.c:919 >> #12 0xffffffff8325dc67 in bridge_clone_create (ifc=3D> out>, unit=3D, params=3D) at=20 >> /usr/src/sys/net/if_bridge.c:704 >> ... >> >> ifp->if_hw_addr is NULL here: >> (kgdb) fr 11 >> #11 0xffffffff80b57a80 in ether_ifattach (ifp=3D0xfffff80035663000,=20 >> lla=3D0xfffff800090e13f8 "\002k") at /usr/src/sys/net/if_ethersubr.c:919 >> 919 bcopy(lla, ifp->if_hw_addr, ifp->if_addrlen); >> (kgdb) p ifp->if_hw_addr >> $1 =3D (void *) 0x0 >> >=20 > This may be because I=E2=80=99ve not yet updated world, just the kernel, but=20 > clearly that still shouldn=E2=80=99t cause panics. >=20 > Regards, > Kristof No, this is purely a kernel mistake -- I forgot to add a NULL-check in ethe= r_ifattach(). :-p Fixing now... -Ravi (rpokala@) From owner-svn-src-head@freebsd.org Thu May 11 06:57:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 884E9D68605; Thu, 11 May 2017 06:57:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 586EE8F0; Thu, 11 May 2017 06:57:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4B6vKOV086556; Thu, 11 May 2017 06:57:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4B6vKxW086554; Thu, 11 May 2017 06:57:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705110657.v4B6vKxW086554@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 11 May 2017 06:57:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318177 - in head: share/man/man4 tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 06:57:21 -0000 Author: ngie Date: Thu May 11 06:57:20 2017 New Revision: 318177 URL: https://svnweb.freebsd.org/changeset/base/318177 Log: Unconditionally install udp(4) and udplite(4) again I added this to the MK_USB != no block in error in r278202. MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/share/man/man4/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Thu May 11 06:46:39 2017 (r318176) +++ head/share/man/man4/Makefile Thu May 11 06:57:20 2017 (r318177) @@ -528,6 +528,8 @@ MAN= aac.4 \ tws.4 \ tx.4 \ txp.4 \ + udp.4 \ + udplite.4 \ ure.4 \ vale.4 \ vga.4 \ @@ -924,8 +926,6 @@ MAN+= \ ucycom.4 \ udav.4 \ udbp.4 \ - udp.4 \ - udplite.4 \ udl.4 \ uep.4 \ ufm.4 \ Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Thu May 11 06:46:39 2017 (r318176) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Thu May 11 06:57:20 2017 (r318177) @@ -9342,8 +9342,6 @@ OLD_FILES+=usr/share/man/man4/ucom.4.gz OLD_FILES+=usr/share/man/man4/ucycom.4.gz OLD_FILES+=usr/share/man/man4/udav.4.gz OLD_FILES+=usr/share/man/man4/udbp.4.gz -OLD_FILES+=usr/share/man/man4/udp.4.gz -OLD_FILES+=usr/share/man/man4/udplite.4.gz OLD_FILES+=usr/share/man/man4/uep.4.gz OLD_FILES+=usr/share/man/man4/ufm.4.gz OLD_FILES+=usr/share/man/man4/ufoma.4.gz From owner-svn-src-head@freebsd.org Thu May 11 07:55:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6244D63879; Thu, 11 May 2017 07:55:39 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5FEE02E2; Thu, 11 May 2017 07:55:39 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4B7tcHK010599; Thu, 11 May 2017 07:55:38 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4B7tc8e010598; Thu, 11 May 2017 07:55:38 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705110755.v4B7tc8e010598@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 11 May 2017 07:55:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318178 - head/usr.bin/procstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 07:55:39 -0000 Author: ngie Date: Thu May 11 07:55:38 2017 New Revision: 318178 URL: https://svnweb.freebsd.org/changeset/base/318178 Log: procstat(1): document all possible `PRO` (network protocol) values Reference the appropriate section 4 manpages for networking protocols. MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/usr.bin/procstat/procstat.1 Modified: head/usr.bin/procstat/procstat.1 ============================================================================== --- head/usr.bin/procstat/procstat.1 Thu May 11 06:57:20 2017 (r318177) +++ head/usr.bin/procstat/procstat.1 Thu May 11 07:55:38 2017 (r318178) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 10, 2017 +.Dd May 11, 2017 .Dt PROCSTAT 1 .Os .Sh NAME @@ -271,6 +271,60 @@ omitted, and a new capabilities field wi as described in .Xr cap_rights_limit 2 , present for each capability descriptor. +.Pp +The following network protocols may be displayed (grouped by address family): +.Pp +.Dv AF_INET , +.Dv AF_INET6 +.Pp +.Bl -tag -width indent -compact +.It ICM +.Dv IPPROTO_ICMP ; +see +.Xr icmp 4 . +.It IPD +.Dv IPPROTO_DIVERT ; +see +.Xr divert 4 . +.It IP\? +unknown protocol. +.It RAW +.Dv IPPROTO_RAW ; +see +.Xr ip 4 . +.It SCT +.Dv IPPROTO_SCTP ; +see +.Xr sctp 4 . +.It TCP +.Dv IPPROTO_TCP ; +see +.Xr tcp 4 . +.It UDP +.Dv IPPROTO_UDP ; +see +.Xr udp 4 . +.El +.Pp +.Dv AF_LOCAL +.Pp +.Bl -tag -width indent -compact +.It UDD +.Dv IPPROTO_UDP ; +see +.Xr udp 4 . +.It UDS +.Dv IPPROTO_TCP ; +see +.Xr tcp 4 . +.It UD\? +unknown protocol. +.El +.Pp +.Bl -tag -width indent -compact +.It \? +unknown address family. +.El .Ss Signal Disposition Information Display signal pending and disposition for a process: .Pp @@ -547,6 +601,10 @@ auxiliary vector value .Xr signal 3 , .Xr xo_parse_args 3 , .Xr ddb 4 , +.Xr divert 4 , +.Xr ip 4 , +.Xr tcp 4 , +.Xr udp 4 , .Xr stack 9 .Sh AUTHORS .An Robert N M Watson Aq Mt rwatson@FreeBSD.org . From owner-svn-src-head@freebsd.org Thu May 11 07:58:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E9C6D639A6; Thu, 11 May 2017 07:58:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2EBFF6A1; Thu, 11 May 2017 07:58:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4B7w5sw010719; Thu, 11 May 2017 07:58:05 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4B7w5K9010718; Thu, 11 May 2017 07:58:05 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705110758.v4B7w5K9010718@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 11 May 2017 07:58:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318179 - head/usr.bin/procstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 07:58:06 -0000 Author: ngie Date: Thu May 11 07:58:04 2017 New Revision: 318179 URL: https://svnweb.freebsd.org/changeset/base/318179 Log: procstat(1): also reference icmp(4) and sctp(4) This was missed in the previous commit by accident. MFC after: 3 weeks MFC with: r318178 Sponsored by: Dell EMC Isilon Modified: head/usr.bin/procstat/procstat.1 Modified: head/usr.bin/procstat/procstat.1 ============================================================================== --- head/usr.bin/procstat/procstat.1 Thu May 11 07:55:38 2017 (r318178) +++ head/usr.bin/procstat/procstat.1 Thu May 11 07:58:04 2017 (r318179) @@ -602,7 +602,9 @@ auxiliary vector value .Xr xo_parse_args 3 , .Xr ddb 4 , .Xr divert 4 , +.Xr icmp 4 , .Xr ip 4 , +.Xr sctp 4 , .Xr tcp 4 , .Xr udp 4 , .Xr stack 9 From owner-svn-src-head@freebsd.org Thu May 11 08:06:48 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A0EAD63EE3; Thu, 11 May 2017 08:06:48 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D52D6C26; Thu, 11 May 2017 08:06:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4B86kvo014559; Thu, 11 May 2017 08:06:46 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4B86k7p014558; Thu, 11 May 2017 08:06:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705110806.v4B86k7p014558@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 11 May 2017 08:06:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318180 - head/tests/sys/aio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 08:06:48 -0000 Author: ngie Date: Thu May 11 08:06:46 2017 New Revision: 318180 URL: https://svnweb.freebsd.org/changeset/base/318180 Log: Mark all md tests as requiring unsafe AIO in order to function These tests have been flapping (failing<->passing) on Jenkins for months. It passes reliably for me if unsafe AIO is permitted, but it doesn't pass on Jenkins reliably if unsafe AIO is disabled (the current default). Mark the tests as requiring unsafe AIO to mitigate the intermittent failures when unsafe AIO isn't permitted. If the kernel code is changed to reliably function with md(4) devices using unsafe AIO, this commit can be reverted. MFC after: 2 months PR: 217261 Reported by: Jenkins Sponsored by: Dell EMC Isilon Modified: head/tests/sys/aio/aio_test.c Modified: head/tests/sys/aio/aio_test.c ============================================================================== --- head/tests/sys/aio/aio_test.c Thu May 11 07:58:04 2017 (r318179) +++ head/tests/sys/aio/aio_test.c Thu May 11 08:06:46 2017 (r318180) @@ -735,6 +735,7 @@ aio_md_test(completion comp) struct md_ioctl mdio; ATF_REQUIRE_KERNEL_MODULE("aio"); + ATF_REQUIRE_UNSAFE_AIO(); mdctl_fd = open("/dev/" MDCTL_NAME, O_RDWR, 0); ATF_REQUIRE_MSG(mdctl_fd != -1, From owner-svn-src-head@freebsd.org Thu May 11 08:22:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4BB2D67680; Thu, 11 May 2017 08:22:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74FB21686; Thu, 11 May 2017 08:22:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4B8M1UD021962; Thu, 11 May 2017 08:22:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4B8M10n021961; Thu, 11 May 2017 08:22:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705110822.v4B8M10n021961@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 11 May 2017 08:22:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318181 - head/contrib/libarchive/cpio/test X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 08:22:02 -0000 Author: ngie Date: Thu May 11 08:22:01 2017 New Revision: 318181 URL: https://svnweb.freebsd.org/changeset/base/318181 Log: cpio/tests/test_option_lz4: fix a use after free in the failure case This change will be upstreamed to the libarchive project. MFC after: 6 days MFC with: r317782 Reported by: Coverity Sponsored by: Dell EMC Isilon Modified: head/contrib/libarchive/cpio/test/test_option_lz4.c Modified: head/contrib/libarchive/cpio/test/test_option_lz4.c ============================================================================== --- head/contrib/libarchive/cpio/test/test_option_lz4.c Thu May 11 08:06:46 2017 (r318180) +++ head/contrib/libarchive/cpio/test/test_option_lz4.c Thu May 11 08:22:01 2017 (r318181) @@ -74,8 +74,8 @@ DEFINE_TEST(test_option_lz4) free(p); return; } - free(p); failure("--lz4 option is broken: %s", p); + free(p); assertEqualInt(r, 0); return; } From owner-svn-src-head@freebsd.org Thu May 11 08:39:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE1F4D67C14; Thu, 11 May 2017 08:39:56 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66072103; Thu, 11 May 2017 08:39:56 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4B8dtsG027112; Thu, 11 May 2017 08:39:55 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4B8dtoo027111; Thu, 11 May 2017 08:39:55 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705110839.v4B8dtoo027111@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 11 May 2017 08:39:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318182 - head/share/man/man7 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 08:39:56 -0000 Author: trasz Date: Thu May 11 08:39:55 2017 New Revision: 318182 URL: https://svnweb.freebsd.org/changeset/base/318182 Log: Improve build(7): add missing "buildkernel" and "installkernel" to the example, change the architectures to something more common, and improve description of defaults for TARGET. Reviewed by: bdrewery, ngie, imp (older revisions) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D10654 Modified: head/share/man/man7/build.7 Modified: head/share/man/man7/build.7 ============================================================================== --- head/share/man/man7/build.7 Thu May 11 08:22:01 2017 (r318181) +++ head/share/man/man7/build.7 Thu May 11 08:39:55 2017 (r318182) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 22, 2017 +.Dd May 11, 2017 .Dt BUILD 7 .Os .Sh NAME @@ -528,7 +528,10 @@ and .Va TARGET Ns = Ns Li arm64 . If not set, .Va TARGET -defaults to the current hardware platform. +defaults to the current hardware platform, unless +.Va TARGET_ARCH +is also set, in which case it defaults to the appropriate +value for that architecture. .It Va TARGET_ARCH The target machine processor architecture. This is analogous to the @@ -689,11 +692,11 @@ section in .Pa src/UPDATING . .Pp The following sequence of commands can be used to cross-build the -system for the sparc64 architecture on an i386 host: +system for the armv6 architecture on an amd64 host: .Bd -literal -offset indent cd /usr/src -make TARGET=sparc64 buildworld -make TARGET=sparc64 DESTDIR=/clients/sparc64 installworld +make TARGET_ARCH=armv6 buildworld buildkernel +make TARGET_ARCH=armv6 DESTDIR=/clients/arm64 installworld installkernel .Ed .Sh SEE ALSO .Xr cc 1 , @@ -702,6 +705,7 @@ make TARGET=sparc64 DESTDIR=/clients/spa .Xr svn 1 , .Xr make.conf 5 , .Xr src.conf 5 , +.Xr arch 7 , .Xr ports 7 , .Xr release 7 , .Xr tests 7 , From owner-svn-src-head@freebsd.org Thu May 11 11:30:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39B12D65637; Thu, 11 May 2017 11:30:23 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: from mail-qk0-x243.google.com (mail-qk0-x243.google.com [IPv6:2607:f8b0:400d:c09::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DDEEE1873; Thu, 11 May 2017 11:30:22 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: by mail-qk0-x243.google.com with SMTP id u75so3191122qka.1; Thu, 11 May 2017 04:30:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=7ZUnWF+V//e6VSPxNcUBgrvUBNQUS6o1Ze3t9/kG0I0=; b=FLgGc1jM+NFXhXD9xwO/p3t2g4Ysuh/hHNUs5BK4dUlHkhT7+f9yB8FwcY6UEtt6zc ja15TCv3P7uwoInffvJ9TIu8j84gCoqpbITDS+6YCRDQE3uGIObklzY3qTcgE0TpaW9N UKymOGTcuQ27xtqgD5uBSMC3Yfq/l/maB+RNirmtY+98gY7VOIt+dsgBBR+JE4+7k1O8 YKvYERJYO1VHuPSHLdSNSYFLeGfg10DmHHIPe7qtG/XmXO6m8m/uhY6v0BIjItQVehk6 d4Tgrhv3xHC8BuC4ykDDyQ7hwzcE16UGl73CGqfGM3V492YuXV8JNJ7mqnbVyul9X/aU 5QXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=7ZUnWF+V//e6VSPxNcUBgrvUBNQUS6o1Ze3t9/kG0I0=; b=O9lJvM9rO5LlkNvexq2oOT7z+g0XTsbisTFu/7I0X0veF9kAyr8nxj++YeTYVZ5RMz LtLGJ6a24IByB0gKmm4vek8KUhOBxB7sf3UCYDoLkUI/RGyZVfSHPK2n1uhorJN8xE9i dv7KtI1lFu3ddoiu+S5rMBTQa7UlkUz5uG8EKbvsRwIyJblIxir+BfgpUxAj0/dt1i1N r0d+dzZmeUXxAcPaSkU8dqVe74FuGwteHQAz57+Mz49l8D49Rkl2sf/d818pCNx5zzpG 8MzpT2Uwio2A1SZS2ct7zOW2VDLilVAxb1mz5wX2oYnIP/kdCrWAE+P6TTXdAb9QF8DJ zNsQ== X-Gm-Message-State: AODbwcBSCDVBAuxvdITVgQha/oxhbubokg/SVDfu25fvB56Ym7mQ6W0r NualguyR8hIWoA== X-Received: by 10.55.25.80 with SMTP id k77mr10029303qkh.294.1494502222042; Thu, 11 May 2017 04:30:22 -0700 (PDT) Received: from mbp-eth.home ([177.53.86.172]) by smtp.gmail.com with ESMTPSA id r19sm988835qkl.54.2017.05.11.04.30.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 May 2017 04:30:20 -0700 (PDT) Subject: Re: svn commit: r318161 - head/contrib/bmake To: Ngie Cooper , "Simon J. Gerraty" References: <201705102224.v4AMO9SQ078718@repo.freebsd.org> Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" From: Renato Botelho Message-ID: <76c18c38-e38d-e98a-d107-c1e5fb7012f7@gmail.com> Date: Thu, 11 May 2017 08:30:16 -0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 11:30:23 -0000 On 10/05/17 19:35, Ngie Cooper wrote: > On Wed, May 10, 2017 at 3:31 PM, Ngie Cooper wrote: >> On Wed, May 10, 2017 at 3:24 PM, Simon J. Gerraty wrote: >>> Author: sjg >>> Date: Wed May 10 22:24:09 2017 >>> New Revision: 318161 >>> URL: https://svnweb.freebsd.org/changeset/base/318161 >>> >>> Log: >>> Ensure buf2 is in scope >> >> I think this is the proper fix for the issue that Bryan, Ravi, and I > > Ravi -> Renato > >> reported.. also reported as Coverity CID: 1374641. Yeah, it fixed the problem to me. Thanks! -- Renato Botelho From owner-svn-src-head@freebsd.org Thu May 11 13:46:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B098AD67819; Thu, 11 May 2017 13:46:31 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5CA1B1F68; Thu, 11 May 2017 13:46:31 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4BDkUPY053081; Thu, 11 May 2017 13:46:30 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4BDkU1N053079; Thu, 11 May 2017 13:46:30 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201705111346.v4BDkU1N053079@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Thu, 11 May 2017 13:46:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318185 - in head: lib/libmt usr.bin/mt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 13:46:31 -0000 Author: ken Date: Thu May 11 13:46:30 2017 New Revision: 318185 URL: https://svnweb.freebsd.org/changeset/base/318185 Log: Add LTO-8 density codes. lib/libmt/mtlib.c: Add the LTO-8 density code to the density table in libmt. usr.bin/mt/mt.1: Add the LTO-8 density code, tracks, bpmm, and bpi to the density table in the mt(1) man page. MFC after: 3 days Sponsored by: Spectra Logic Modified: head/lib/libmt/mtlib.c head/usr.bin/mt/mt.1 Modified: head/lib/libmt/mtlib.c ============================================================================== --- head/lib/libmt/mtlib.c Thu May 11 11:13:02 2017 (r318184) +++ head/lib/libmt/mtlib.c Thu May 11 13:46:30 2017 (r318185) @@ -644,6 +644,7 @@ static struct densities { { 0x58, 15142, 384607, "LTO-5" }, { 0x5A, 15142, 384607, "LTO-6" }, { 0x5C, 19107, 485318, "LTO-7" }, + { 0x5E, 20669, 524993, "LTO-8" }, { 0x71, 11800, 299720, "3592A1 (encrypted)" }, { 0x72, 11800, 299720, "3592A2 (encrypted)" }, { 0x73, 13452, 341681, "3592A3 (encrypted)" }, Modified: head/usr.bin/mt/mt.1 ============================================================================== --- head/usr.bin/mt/mt.1 Thu May 11 11:13:02 2017 (r318184) +++ head/usr.bin/mt/mt.1 Thu May 11 13:46:30 2017 (r318185) @@ -29,7 +29,7 @@ .\" @(#)mt.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd May 5, 2017 +.Dd May 11, 2017 .Dt MT 1 .Os .Sh NAME @@ -521,6 +521,7 @@ Value Width Tracks Density 0x58 12.7 (0.5) 1280 15,142 (384,607) C LTO-5 0x5A 12.7 (0.5) 2176 15,142 (384,607) C LTO-6 0x5C 12.7 (0.5) 3584 19,107 (485,318) C LTO-7 +0x5E 12.7 (0.5) 6656 20,669 (524,993) C LTO-8 0x71 12.7 (0.5) 512 11,800 (299,720) C 3592A1 (encrypted) 0x72 12.7 (0.5) 896 11,800 (299,720) C 3592A2 (encrypted) 0x73 12.7 (0.5) 1152 13,452 (341,681) C 3592A3 (encrypted) From owner-svn-src-head@freebsd.org Thu May 11 15:19:05 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC729D68FA9; Thu, 11 May 2017 15:19:05 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6DEEC12AE; Thu, 11 May 2017 15:19:05 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4BFJ45R090489; Thu, 11 May 2017 15:19:04 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4BFJ4nF090487; Thu, 11 May 2017 15:19:04 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201705111519.v4BFJ4nF090487@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Thu, 11 May 2017 15:19:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318188 - in head/sys/dev: mpr mps X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 15:19:05 -0000 Author: scottl Date: Thu May 11 15:19:04 2017 New Revision: 318188 URL: https://svnweb.freebsd.org/changeset/base/318188 Log: Improve error messages during command timeout for the mpr and mps drivers. Sponsored by: Netflix Modified: head/sys/dev/mpr/mpr_sas.c head/sys/dev/mps/mps_sas.c Modified: head/sys/dev/mpr/mpr_sas.c ============================================================================== --- head/sys/dev/mpr/mpr_sas.c Thu May 11 13:50:16 2017 (r318187) +++ head/sys/dev/mpr/mpr_sas.c Thu May 11 15:19:04 2017 (r318188) @@ -1562,7 +1562,7 @@ mprsas_send_abort(struct mpr_softc *sc, return -1; } - mprsas_log_command(tm, MPR_RECOVERY|MPR_INFO, + mprsas_log_command(cm, MPR_RECOVERY|MPR_INFO, "Aborting command %p\n", cm); req = (MPI2_SCSI_TASK_MANAGE_REQUEST *)tm->cm_req; @@ -1594,7 +1594,7 @@ mprsas_send_abort(struct mpr_softc *sc, err = mpr_map_command(sc, tm); if (err) - mprsas_log_command(tm, MPR_RECOVERY, + mpr_dprint(sc, MPR_RECOVERY, "error %d sending abort for cm %p SMID %u\n", err, cm, req->TaskMID); return err; @@ -1635,8 +1635,9 @@ mprsas_scsiio_timeout(void *data) targ = cm->cm_targ; targ->timeouts++; - mprsas_log_command(cm, MPR_ERROR, "command timeout cm %p ccb %p target " - "%u, handle(0x%04x)\n", cm, cm->cm_ccb, targ->tid, targ->handle); + mprsas_log_command(cm, MPR_ERROR, "command timeout %d cm %p target " + "%u, handle(0x%04x)\n", cm->cm_ccb->ccb_h.timeout, cm, targ->tid, + targ->handle); if (targ->encl_level_valid) { mpr_dprint(sc, MPR_ERROR, "At enclosure level %d, slot %d, " "connector name (%4s)\n", targ->encl_level, targ->encl_slot, Modified: head/sys/dev/mps/mps_sas.c ============================================================================== --- head/sys/dev/mps/mps_sas.c Thu May 11 13:50:16 2017 (r318187) +++ head/sys/dev/mps/mps_sas.c Thu May 11 15:19:04 2017 (r318188) @@ -1505,7 +1505,7 @@ mpssas_send_abort(struct mps_softc *sc, return -1; } - mpssas_log_command(tm, MPS_RECOVERY|MPS_INFO, + mpssas_log_command(cm, MPS_RECOVERY|MPS_INFO, "Aborting command %p\n", cm); req = (MPI2_SCSI_TASK_MANAGE_REQUEST *)tm->cm_req; @@ -1536,7 +1536,7 @@ mpssas_send_abort(struct mps_softc *sc, err = mps_map_command(sc, tm); if (err) - mpssas_log_command(tm, MPS_RECOVERY, + mps_dprint(sc, MPS_RECOVERY, "error %d sending abort for cm %p SMID %u\n", err, cm, req->TaskMID); return err; @@ -1574,12 +1574,13 @@ mpssas_scsiio_timeout(void *data) return; } - mpssas_log_command(cm, MPS_INFO, "command timeout cm %p ccb %p\n", - cm, cm->cm_ccb); - targ = cm->cm_targ; targ->timeouts++; + mpssas_log_command(cm, MPS_ERROR, "command timeout %d cm %p target " + "%u, handle(0x%04x)\n", cm->cm_ccb->ccb_h.timeout, cm, targ->tid, + targ->handle); + /* XXX first, check the firmware state, to see if it's still * operational. if not, do a diag reset. */ From owner-svn-src-head@freebsd.org Thu May 11 16:26:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB368D68354; Thu, 11 May 2017 16:26:57 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E96216F2; Thu, 11 May 2017 16:26:57 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4BGQujj018999; Thu, 11 May 2017 16:26:56 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4BGQuaK018998; Thu, 11 May 2017 16:26:56 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705111626.v4BGQuaK018998@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 11 May 2017 16:26:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318189 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 16:26:57 -0000 Author: asomers Date: Thu May 11 16:26:56 2017 New Revision: 318189 URL: https://svnweb.freebsd.org/changeset/base/318189 Log: vdev_geom may associate multiple vdevs per g_consumer vdev_geom.c currently uses the g_consumer's private field to point to a vdev_t. That way, a GEOM event can cause a change to a ZFS vdev. For example, when you remove a disk, the vdev's status will change to REMOVED. However, vdev_geom will sometimes attach multiple vdevs to the same GEOM consumer. If this happens, then geom events will only be propagated to one of the vdevs. Fix this by storing a linked list of vdevs in g_consumer's private field. sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c * g_consumer.private now stores a linked list of vdev pointers associated with the consumer instead of just a single vdev pointer. * Change vdev_geom_set_physpath's signature to more closely match vdev_geom_set_rotation_rate * Don't bother calling g_access in vdev_geom_set_physpath. It's guaranteed that we've already accessed the consumer by the time we get here. * Don't call vdev_geom_set_physpath in vdev_geom_attach. Instead, call it in vdev_geom_open, after we know that the open has succeeded. PR: 218634 Reviewed by: gibbs MFC after: 1 week Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D10391 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Thu May 11 15:19:04 2017 (r318188) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Thu May 11 16:26:56 2017 (r318189) @@ -49,6 +49,16 @@ struct g_class zfs_vdev_class = { .attrchanged = vdev_geom_attrchanged, }; +struct consumer_vdev_elem { + SLIST_ENTRY(consumer_vdev_elem) elems; + vdev_t *vd; +}; + +SLIST_HEAD(consumer_priv_t, consumer_vdev_elem); +_Static_assert(sizeof(((struct g_consumer*)NULL)->private) + == sizeof(struct consumer_priv_t*), + "consumer_priv_t* can't be stored in g_consumer.private"); + DECLARE_GEOM_CLASS(zfs_vdev_class, zfs_vdev); SYSCTL_DECL(_vfs_zfs_vdev); @@ -85,21 +95,16 @@ vdev_geom_set_rotation_rate(vdev_t *vd, } static void -vdev_geom_set_physpath(struct g_consumer *cp, boolean_t do_null_update) +vdev_geom_set_physpath(vdev_t *vd, struct g_consumer *cp, + boolean_t do_null_update) { boolean_t needs_update = B_FALSE; - vdev_t *vd; char *physpath; int error, physpath_len; - if (g_access(cp, 1, 0, 0) != 0) - return; - - vd = cp->private; physpath_len = MAXPATHLEN; physpath = g_malloc(physpath_len, M_WAITOK|M_ZERO); error = g_io_getattr("GEOM::physpath", cp, &physpath_len, physpath); - g_access(cp, -1, 0, 0); if (error == 0) { char *old_physpath; @@ -130,37 +135,40 @@ vdev_geom_set_physpath(struct g_consumer static void vdev_geom_attrchanged(struct g_consumer *cp, const char *attr) { - vdev_t *vd; char *old_physpath; + struct consumer_priv_t *priv; + struct consumer_vdev_elem *elem; int error; - vd = cp->private; - if (vd == NULL) + priv = (struct consumer_priv_t*)&cp->private; + if (SLIST_EMPTY(priv)) return; - if (strcmp(attr, "GEOM::rotation_rate") == 0) { - vdev_geom_set_rotation_rate(vd, cp); - return; - } - - if (strcmp(attr, "GEOM::physpath") == 0) { - vdev_geom_set_physpath(cp, /*do_null_update*/B_TRUE); - return; + SLIST_FOREACH(elem, priv, elems) { + vdev_t *vd = elem->vd; + if (strcmp(attr, "GEOM::rotation_rate") == 0) { + vdev_geom_set_rotation_rate(vd, cp); + return; + } + if (strcmp(attr, "GEOM::physpath") == 0) { + vdev_geom_set_physpath(vd, cp, /*null_update*/B_TRUE); + return; + } } } static void vdev_geom_orphan(struct g_consumer *cp) { - vdev_t *vd; + struct consumer_priv_t *priv; + struct consumer_vdev_elem *elem; g_topology_assert(); - vd = cp->private; - if (vd == NULL) { + priv = (struct consumer_priv_t*)&cp->private; + if (SLIST_EMPTY(priv)) /* Vdev close in progress. Ignore the event. */ return; - } /* * Orphan callbacks occur from the GEOM event thread. @@ -176,8 +184,12 @@ vdev_geom_orphan(struct g_consumer *cp) * async removal support to invoke a close on this * vdev once it is safe to do so. */ - vd->vdev_remove_wanted = B_TRUE; - spa_async_request(vd->vdev_spa, SPA_ASYNC_REMOVE); + SLIST_FOREACH(elem, priv, elems) { + vdev_t *vd = elem->vd; + + vd->vdev_remove_wanted = B_TRUE; + spa_async_request(vd->vdev_spa, SPA_ASYNC_REMOVE); + } } static struct g_consumer * @@ -265,21 +277,8 @@ vdev_geom_attach(struct g_provider *pp, } } - /* - * BUG: cp may already belong to a vdev. This could happen if: - * 1) That vdev is a shared spare, or - * 2) We are trying to reopen a missing vdev and we are scanning by - * guid. In that case, we'll ultimately fail to open this consumer, - * but not until after setting the private field. - * The solution is to: - * 1) Don't set the private field until after the open succeeds, and - * 2) Set it to a linked list of vdevs, not just a single vdev - */ - cp->private = vd; - if (vd != NULL) { + if (vd != NULL) vd->vdev_tsd = cp; - vdev_geom_set_physpath(cp, /*do_null_update*/B_FALSE); - } cp->flags |= G_CF_DIRECT_SEND | G_CF_DIRECT_RECEIVE; return (cp); @@ -289,16 +288,12 @@ static void vdev_geom_detach(struct g_consumer *cp, boolean_t open_for_read) { struct g_geom *gp; - vdev_t *vd; g_topology_assert(); ZFS_LOG(1, "Detaching from %s.", cp->provider && cp->provider->name ? cp->provider->name : "NULL"); - vd = cp->private; - cp->private = NULL; - gp = cp->geom; if (open_for_read) g_access(cp, -1, 0, -1); @@ -324,16 +319,26 @@ static void vdev_geom_close_locked(vdev_t *vd) { struct g_consumer *cp; + struct consumer_priv_t *priv; + struct consumer_vdev_elem *elem, *elem_temp; g_topology_assert(); cp = vd->vdev_tsd; - vd->vdev_tsd = NULL; vd->vdev_delayed_close = B_FALSE; if (cp == NULL) return; ZFS_LOG(1, "Closing access to %s.", cp->provider->name); + KASSERT(cp->private != NULL, ("%s: cp->private is NULL", __func__)); + priv = (struct consumer_priv_t*)&cp->private; + vd->vdev_tsd = NULL; + SLIST_FOREACH_SAFE(elem, priv, elems, elem_temp) { + if (elem->vd == vd) { + SLIST_REMOVE(priv, elem, consumer_vdev_elem, elems); + g_free(elem); + } + } vdev_geom_detach(cp, B_TRUE); } @@ -870,11 +875,27 @@ vdev_geom_open(vdev_t *vd, uint64_t *psi cp = NULL; } } + if (cp != NULL) { + struct consumer_priv_t *priv; + struct consumer_vdev_elem *elem; + + priv = (struct consumer_priv_t*)&cp->private; + if (cp->private == NULL) + SLIST_INIT(priv); + elem = g_malloc(sizeof(*elem), M_WAITOK|M_ZERO); + elem->vd = vd; + SLIST_INSERT_HEAD(priv, elem, elems); + } /* Fetch initial physical path information for this device. */ - if (cp != NULL) + if (cp != NULL) { vdev_geom_attrchanged(cp, "GEOM::physpath"); + /* Set other GEOM characteristics */ + vdev_geom_set_physpath(vd, cp, /*do_null_update*/B_FALSE); + vdev_geom_set_rotation_rate(vd, cp); + } + g_topology_unlock(); PICKUP_GIANT(); if (cp == NULL) { @@ -905,11 +926,6 @@ skip_open: */ vd->vdev_nowritecache = B_FALSE; - /* - * Determine the device's rotation rate. - */ - vdev_geom_set_rotation_rate(vd, cp); - return (0); } From owner-svn-src-head@freebsd.org Thu May 11 16:37:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CD14D68781; Thu, 11 May 2017 16:37:31 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 31D9A1D1D; Thu, 11 May 2017 16:37:31 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4BGbUpV022951; Thu, 11 May 2017 16:37:30 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4BGbUK6022950; Thu, 11 May 2017 16:37:30 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705111637.v4BGbUK6022950@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 11 May 2017 16:37:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318190 - head/release/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 16:37:31 -0000 Author: gjb Date: Thu May 11 16:37:29 2017 New Revision: 318190 URL: https://svnweb.freebsd.org/changeset/base/318190 Log: Update release/scripts/atlas-upload.sh to account for API changes made recently by Atlas Hashicorp. The data returned from GET and POST requests has changed, which caused a number of regex patterns to fail to be properly identified as 'success' or 'failure', which ended up in upload/publish failures. Tested with: 12-CURRENT MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/release/scripts/atlas-upload.sh Modified: head/release/scripts/atlas-upload.sh ============================================================================== --- head/release/scripts/atlas-upload.sh Thu May 11 16:26:56 2017 (r318189) +++ head/release/scripts/atlas-upload.sh Thu May 11 16:37:29 2017 (r318190) @@ -132,20 +132,20 @@ main () { echo "Failed to get the token from the API" exit 2; fi - echo ${TOKENRESULT} | grep "\"token\":" > /dev/null + echo ${TOKENRESULT} | grep -E "\"(token|upload_path)\":" > /dev/null if [ $? != 0 ]; then echo "No token found from the API" exit 2 else - TOKEN=$(echo $TOKENRESULT | sed -e 's/.*token":"//' -e 's/".*//') + TOKEN=$(echo $TOKENRESULT | sed -e 's/.*token":"//' -e 's/.*upload_path":"//' -e 's/}$//g' -e 's/"//g') echo "Uploading to Atlas" - UPLOADRESULT=$(/usr/local/bin/curl -s -X PUT --upload-file ${FILE} ${ATLAS_UPLOAD_URL}/${TOKEN}) + UPLOADRESULT=$(/usr/local/bin/curl -s -X PUT --upload-file ${FILE} ${TOKEN}) # Validate the Upload echo "Validating" VALIDRESULT=$(/usr/local/bin/curl -s "https://atlas.hashicorp.com/api/v1/box/${USERNAME}/${BOX}/version/${VERSION}/provider/${PROVIDER}?access_token=${KEY}") - HOSTED_TOKEN=$(echo $VALIDRESULT | sed -e 's/.*hosted_token":"//' -e 's/".*//') - if [ ! -z ${HOSTED_TOKEN} -a ! -z ${TOKEN} -a ${HOSTED_TOKEN} != ${TOKEN} ]; then + HOSTED_TOKEN=$(echo $VALIDRESULT | sed -e 's/.*"hosted"://' -e 's/,.*$//') + if [ ! -z ${TOKEN} -a "${HOSTED_TOKEN}" != "true" ]; then echo "Upload failed, try again." exit 2 fi From owner-svn-src-head@freebsd.org Thu May 11 17:03:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8AC54D680C0; Thu, 11 May 2017 17:03:46 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5CDCBF98; Thu, 11 May 2017 17:03:46 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4BH3jTG035619; Thu, 11 May 2017 17:03:45 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4BH3jVa035618; Thu, 11 May 2017 17:03:45 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201705111703.v4BH3jVa035618@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 11 May 2017 17:03:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318191 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 17:03:46 -0000 Author: markj Date: Thu May 11 17:03:45 2017 New Revision: 318191 URL: https://svnweb.freebsd.org/changeset/base/318191 Log: Let ptracestop() suspend threads sleeping in an SBDRY section. When a thread enters ptracestop(), for example because it had received SIGSTOP from ptrace(PT_ATTACH), it attempts to suspend other threads in the same process. In the case of a thread sleeping interruptibly in an SBDRY section, sig_suspend_threads() must wake the thread and allow it to reach the user-mode boundary. However, sig_suspend_threads() would erroneously avoid waking up such threads, resulting in an apparent hang. Reviewed by: kib Tested by: pho MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Thu May 11 16:37:29 2017 (r318190) +++ head/sys/kern/kern_sig.c Thu May 11 17:03:45 2017 (r318191) @@ -2477,6 +2477,7 @@ sig_suspend_threads(struct thread *td, s PROC_LOCK_ASSERT(p, MA_OWNED); PROC_SLOCK_ASSERT(p, MA_OWNED); + MPASS(sending || td == curthread); wakeup_swapper = 0; FOREACH_THREAD_IN_PROC(p, td2) { @@ -2493,10 +2494,9 @@ sig_suspend_threads(struct thread *td, s */ KASSERT(!TD_IS_SUSPENDED(td2), ("thread with deferred stops suspended")); - if (TD_SBDRY_INTR(td2) && sending) { + if (TD_SBDRY_INTR(td2)) wakeup_swapper |= sleepq_abort(td2, TD_SBDRY_ERRNO(td2)); - } } else if (!TD_IS_SUSPENDED(td2)) { thread_suspend_one(td2); } From owner-svn-src-head@freebsd.org Thu May 11 18:14:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13C98D68740; Thu, 11 May 2017 18:14:46 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E890F1A53; Thu, 11 May 2017 18:14:45 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 5965010A82D; Thu, 11 May 2017 14:14:44 -0400 (EDT) From: John Baldwin To: Justin Hibbits Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318171 - head/sys/dev/dpaa Date: Thu, 11 May 2017 10:52:14 -0700 Message-ID: <1565622.4efZRtpFtU@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201705110347.v4B3lwj4009423@repo.freebsd.org> References: <201705110347.v4B3lwj4009423@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Thu, 11 May 2017 14:14:44 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 18:14:46 -0000 On Thursday, May 11, 2017 03:47:58 AM Justin Hibbits wrote: > Author: jhibbits > Date: Thu May 11 03:47:58 2017 > New Revision: 318171 > URL: https://svnweb.freebsd.org/changeset/base/318171 > > Log: > Fix uma_zcreate() align argument, now that the constraint is asserted. > > The alignment argument is the mask of low bits to mask off when allocating > items in a zone, not the block-size alignment. The first one should probably be using UMA_ALIGN_PTR instead. However, I do wonder if we shouldn't fix the API. All of the other APIs in the kernel for memory allocation use the size for alignment (contigmalloc, kmem_*, bus_dma, etc.). We could support a transition for uma by doing something like this in the implementation: if (alignment == 0) zone->align = 0; else if (powerof2(alignment)) zone->align = alignment - 1; else { KASSERT(powerof2(alignment + 1), ...); printf("WARNING: UMA zone %s using old alignment\n"); zone->alignment = alignment; } Along with updating the UMA_ALIGN_* constants which should fix most of the zones in the tree to use the new strategy. In 13 we would turn the printf() into a panic() / KASSERT. -- John Baldwin From owner-svn-src-head@freebsd.org Thu May 11 18:53:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D081D691B0; Thu, 11 May 2017 18:53:30 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D34414DE; Thu, 11 May 2017 18:53:29 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4BIrTu4081825; Thu, 11 May 2017 18:53:29 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4BIrTP6081824; Thu, 11 May 2017 18:53:29 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201705111853.v4BIrTP6081824@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 11 May 2017 18:53:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318193 - head/sys/boot/efi/loader X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 18:53:30 -0000 Author: markj Date: Thu May 11 18:53:28 2017 New Revision: 318193 URL: https://svnweb.freebsd.org/changeset/base/318193 Log: Set the right variable when overriding the default console speed. MFC after: 1 week Modified: head/sys/boot/efi/loader/main.c Modified: head/sys/boot/efi/loader/main.c ============================================================================== --- head/sys/boot/efi/loader/main.c Thu May 11 17:26:34 2017 (r318192) +++ head/sys/boot/efi/loader/main.c Thu May 11 18:53:28 2017 (r318193) @@ -391,7 +391,7 @@ main(int argc, CHAR16 *argv[]) } else { cpy16to8(&argv[i + 1][0], var, sizeof(var)); - setenv("comconsole_speedspeed", var, 1); + setenv("comconsole_speed", var, 1); } i++; break; From owner-svn-src-head@freebsd.org Thu May 11 19:49:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D5E4D69CCC; Thu, 11 May 2017 19:49:24 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A5F9F8C; Thu, 11 May 2017 19:49:24 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4BJnN4C002737; Thu, 11 May 2017 19:49:23 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4BJnN1k002736; Thu, 11 May 2017 19:49:23 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201705111949.v4BJnN1k002736@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Thu, 11 May 2017 19:49:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318194 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 19:49:24 -0000 Author: sjg Date: Thu May 11 19:49:22 2017 New Revision: 318194 URL: https://svnweb.freebsd.org/changeset/base/318194 Log: Tell bmake (meta mode) to ignore changes to /usr/local/etc/libmap.d/* Differential Revision: D10685 Reviewed by: bdrewery Modified: head/share/mk/local.meta.sys.mk Modified: head/share/mk/local.meta.sys.mk ============================================================================== --- head/share/mk/local.meta.sys.mk Thu May 11 18:53:28 2017 (r318193) +++ head/share/mk/local.meta.sys.mk Thu May 11 19:49:22 2017 (r318194) @@ -283,3 +283,6 @@ META_MODE+= missing-meta=yes .if empty(META_MODE:Mnofilemon) META_MODE+= missing-filemon=yes .endif +# We do not want everything out-of-date just because +# some unrelated shared lib updated this. +.MAKE.META.IGNORE_PATHS+= /usr/local/etc/libmap.d From owner-svn-src-head@freebsd.org Fri May 12 01:09:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A41C4D5ECBF; Fri, 12 May 2017 01:09:25 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 748AEDFA; Fri, 12 May 2017 01:09:25 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C19OMV037053; Fri, 12 May 2017 01:09:24 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C19O5I037052; Fri, 12 May 2017 01:09:24 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201705120109.v4C19O5I037052@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 12 May 2017 01:09:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318202 - head/contrib/ipfilter/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 01:09:25 -0000 Author: cy Date: Fri May 12 01:09:24 2017 New Revision: 318202 URL: https://svnweb.freebsd.org/changeset/base/318202 Log: Add missing linefeed in debug output. Modified: head/contrib/ipfilter/lib/printpoolnode.c Modified: head/contrib/ipfilter/lib/printpoolnode.c ============================================================================== --- head/contrib/ipfilter/lib/printpoolnode.c Thu May 11 23:49:53 2017 (r318201) +++ head/contrib/ipfilter/lib/printpoolnode.c Fri May 12 01:09:24 2017 (r318202) @@ -52,7 +52,7 @@ printpoolnode(np, opts, fields) PRINTF("\tAddress: %s%s", np->ipn_info ? "! " : "", inet_ntoa(np->ipn_addr.adf_addr.in4)); } else { - PRINTF("\tAddress: family: %d", + PRINTF("\tAddress: family: %d\n", np->ipn_addr.adf_family); #ifdef AF_INET6 } From owner-svn-src-head@freebsd.org Fri May 12 04:10:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9188D69D9D; Fri, 12 May 2017 04:10:03 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB1EA108D; Fri, 12 May 2017 04:10:03 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C4A2pL012140; Fri, 12 May 2017 04:10:02 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C4A2tZ012139; Fri, 12 May 2017 04:10:02 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201705120410.v4C4A2tZ012139@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 12 May 2017 04:10:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318209 - head/sys/dev/dpaa X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 04:10:04 -0000 Author: jhibbits Date: Fri May 12 04:10:02 2017 New Revision: 318209 URL: https://svnweb.freebsd.org/changeset/base/318209 Log: Use UMA_ALIGN_PTR to specify pointer alignment Suggested by: jhb Modified: head/sys/dev/dpaa/if_dtsec_rm.c Modified: head/sys/dev/dpaa/if_dtsec_rm.c ============================================================================== --- head/sys/dev/dpaa/if_dtsec_rm.c Fri May 12 03:44:20 2017 (r318208) +++ head/sys/dev/dpaa/if_dtsec_rm.c Fri May 12 04:10:02 2017 (r318209) @@ -115,7 +115,7 @@ dtsec_rm_fi_pool_init(struct dtsec_softc sc->sc_fi_zone = uma_zcreate(sc->sc_fi_zname, sizeof(struct dtsec_rm_frame_info), NULL, NULL, NULL, NULL, - sizeof(void *) - 1, 0); + UMA_ALIGN_PTR, 0); if (sc->sc_fi_zone == NULL) return (EIO); From owner-svn-src-head@freebsd.org Fri May 12 05:06:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7DF1BD68932; Fri, 12 May 2017 05:06:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FE6E85F; Fri, 12 May 2017 05:06:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C56mAk036170; Fri, 12 May 2017 05:06:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C56mKI036169; Fri, 12 May 2017 05:06:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705120506.v4C56mKI036169@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 12 May 2017 05:06:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318210 - head/contrib/netbsd-tests/lib/libc/ssp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 05:06:49 -0000 Author: ngie Date: Fri May 12 05:06:48 2017 New Revision: 318210 URL: https://svnweb.freebsd.org/changeset/base/318210 Log: ssp_test:read:: query the value of MAXPATHLEN via getconf(1) In the event the value of PATH_MAX was changed, the assumption that MAXPATHLEN is 1024 (and hence the buffer length required to trigger SSP to fail for read(2)) would be invalidated. Query getconf(1) for the actual value of MAXPATHLEN via _XOPEN_PATH_MAX instead, and increment the value by 1 to ensure that the SSP support tests the stack smashing support properly. MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh Modified: head/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh ============================================================================== --- head/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh Fri May 12 04:10:02 2017 (r318209) +++ head/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh Fri May 12 05:06:48 2017 (r318210) @@ -392,7 +392,8 @@ read_body() h_fail "$prog 1027" "echo bar |" else # End FreeBSD - h_fail "$prog 1025" "echo bar |" + MAX_PATH=$(getconf _XOPEN_MAX_PATH) || atf_fail "getconf failed" + h_fail "$prog $(( $MAX_PATH + 1))" "echo bar |" # Begin FreeBSD fi # End FreeBSD From owner-svn-src-head@freebsd.org Fri May 12 05:17:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E119D68BD1; Fri, 12 May 2017 05:17:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D545D02; Fri, 12 May 2017 05:17:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C5HoxX040444; Fri, 12 May 2017 05:17:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C5Hokj040443; Fri, 12 May 2017 05:17:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705120517.v4C5Hokj040443@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 12 May 2017 05:17:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318211 - head/contrib/netbsd-tests/lib/libc/ssp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 05:17:51 -0000 Author: ngie Date: Fri May 12 05:17:49 2017 New Revision: 318211 URL: https://svnweb.freebsd.org/changeset/base/318211 Log: Fix up previous commit - Apply the logic to the FreeBSD block - Fix a typo with the getconf(1) call that I would have caught, were it not for the fact that I got the blocks wrong. - Consolidate the hardcoded buffer sizes to the NetBSD block. This would have been discovered had I run the test on a system where PATH_MAX != 1024 (I don't have that at my disposal right at this moment). MFC after: 3 weeks MFC with: r318210 Sponsored by: Dell EMC Isilon Modified: head/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh Modified: head/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh ============================================================================== --- head/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh Fri May 12 05:06:48 2017 (r318210) +++ head/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh Fri May 12 05:17:49 2017 (r318211) @@ -386,14 +386,15 @@ read_body() { prog="$(atf_get_srcdir)/h_read" - h_pass "$prog 1024" "echo foo |" # Begin FreeBSD if true; then - h_fail "$prog 1027" "echo bar |" + MAX_PATH=$(getconf _XOPEN_PATH_MAX) || atf_fail "getconf failed" + h_pass "$prog $MAX_PATH" "echo foo |" + h_fail "$prog $(( $MAX_PATH + 3 ))" "echo bar |" else # End FreeBSD - MAX_PATH=$(getconf _XOPEN_MAX_PATH) || atf_fail "getconf failed" - h_fail "$prog $(( $MAX_PATH + 1))" "echo bar |" + h_pass "$prog 1024" "echo foo |" + h_fail "$prog 1025" "echo bar |" # Begin FreeBSD fi # End FreeBSD From owner-svn-src-head@freebsd.org Fri May 12 05:19:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0855D68C5F; Fri, 12 May 2017 05:19:10 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 900C2E60; Fri, 12 May 2017 05:19:10 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C5J99I040544; Fri, 12 May 2017 05:19:09 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C5J8a2040536; Fri, 12 May 2017 05:19:08 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120519.v4C5J8a2040536@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 05:19:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318212 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 05:19:10 -0000 Author: adrian Date: Fri May 12 05:19:08 2017 New Revision: 318212 URL: https://svnweb.freebsd.org/changeset/base/318212 Log: [if_iwm] Partly sync if_iwm_binding.c to Linux iwlwifi code. * Store macid and color values in struct iwm_vap, to avoid hardcoded constants a bit. * Add iwm_mvm_binding_remove_vif() function (will be used in disconnecting from an access point without resetting the whole device). * Not adding code from Linux iwlwifi yet, to handle one PHY context to be bound to several VAPs/virtual-interfaces, it's definitely not needed in the near future. Obtained from: dragonflybsd.git f16ef74977e51e1bfc7a625dd18b98b02158e0e5 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_binding.c head/sys/dev/iwm/if_iwm_binding.h head/sys/dev/iwm/if_iwm_mac_ctxt.c head/sys/dev/iwm/if_iwm_power.c head/sys/dev/iwm/if_iwm_time_event.c head/sys/dev/iwm/if_iwm_time_event.h head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Fri May 12 05:17:49 2017 (r318211) +++ head/sys/dev/iwm/if_iwm.c Fri May 12 05:19:08 2017 (r318212) @@ -4156,7 +4156,7 @@ iwm_auth(struct ieee80211vap *vap, struc } iv->phy_ctxt = &sc->sc_phyctxt[0]; - if ((error = iwm_mvm_binding_update(sc, iv)) != 0) { + if ((error = iwm_mvm_binding_add_vif(sc, iv)) != 0) { device_printf(sc->sc_dev, "%s: binding update cmd\n", __func__); goto out; @@ -4205,7 +4205,7 @@ iwm_auth(struct ieee80211vap *vap, struc */ /* XXX duration is in units of TU, not MS */ duration = IWM_MVM_TE_SESSION_PROTECTION_MAX_TIME_MS; - iwm_mvm_protect_session(sc, in, duration, 500 /* XXX magic number */); + iwm_mvm_protect_session(sc, iv, duration, 500 /* XXX magic number */); DELAY(100); error = 0; @@ -4250,7 +4250,7 @@ iwm_release(struct iwm_softc *sc, struct * iwm_mvm_rm_sta(sc, in); * iwm_mvm_update_quotas(sc, NULL); * iwm_mvm_mac_ctxt_changed(sc, in); - * iwm_mvm_binding_remove_vif(sc, in); + * iwm_mvm_binding_remove_vif(sc, IWM_VAP(in->in_ni.ni_vap)); * iwm_mvm_mac_ctxt_remove(sc, in); * * However, that freezes the device not matter which permutations @@ -4299,7 +4299,7 @@ iwm_release(struct iwm_softc *sc, struct device_printf(sc->sc_dev, "mac ctxt change fail 2 %d\n", error); return error; } - iwm_mvm_binding_remove_vif(sc, in); + iwm_mvm_binding_remove_vif(sc, IWM_VAP(in->in_ni.ni_vap)); iwm_mvm_mac_ctxt_remove(sc, in); @@ -6303,6 +6303,9 @@ iwm_vap_create(struct ieee80211com *ic, ivp->iv_newstate = vap->iv_newstate; vap->iv_newstate = iwm_newstate; + ivp->id = IWM_DEFAULT_MACID; + ivp->color = IWM_DEFAULT_COLOR; + ieee80211_ratectl_init(vap); /* Complete setup. */ ieee80211_vap_attach(vap, iwm_media_change, ieee80211_media_status, Modified: head/sys/dev/iwm/if_iwm_binding.c ============================================================================== --- head/sys/dev/iwm/if_iwm_binding.c Fri May 12 05:17:49 2017 (r318211) +++ head/sys/dev/iwm/if_iwm_binding.c Fri May 12 05:19:08 2017 (r318212) @@ -31,7 +31,7 @@ * * GPL LICENSE SUMMARY * - * Copyright(c) 2007 - 2013 Intel Corporation. All rights reserved. + * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as @@ -51,13 +51,12 @@ * in the file called COPYING. * * Contact Information: - * Intel Linux Wireless + * Intel Linux Wireless * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 * - * * BSD LICENSE * - * Copyright(c) 2005 - 2013 Intel Corporation. All rights reserved. + * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -87,21 +86,6 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/*- - * Copyright (c) 2007-2010 Damien Bergamini - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ #include __FBSDID("$FreeBSD$"); @@ -161,11 +145,21 @@ __FBSDID("$FreeBSD$"); * BEGIN iwlwifi/mvm/binding.c */ -int -iwm_mvm_binding_cmd(struct iwm_softc *sc, struct iwm_vap *ivp, uint32_t action) +struct iwm_mvm_iface_iterator_data { + int idx; + + struct iwm_mvm_phy_ctxt *phyctxt; + + uint16_t ids[IWM_MAX_MACS_IN_BINDING]; + int16_t colors[IWM_MAX_MACS_IN_BINDING]; +}; + +static int +iwm_mvm_binding_cmd(struct iwm_softc *sc, uint32_t action, + struct iwm_mvm_iface_iterator_data *data) { struct iwm_binding_cmd cmd; - struct iwm_mvm_phy_ctxt *phyctxt = ivp->phy_ctxt; + struct iwm_mvm_phy_ctxt *phyctxt = data->phyctxt; int i, ret; uint32_t status; @@ -176,41 +170,88 @@ iwm_mvm_binding_cmd(struct iwm_softc *sc cmd.action = htole32(action); cmd.phy = htole32(IWM_FW_CMD_ID_AND_COLOR(phyctxt->id, phyctxt->color)); - cmd.macs[0] = htole32(IWM_FW_CMD_ID_AND_COLOR(IWM_DEFAULT_MACID, - IWM_DEFAULT_COLOR)); - /* We use MACID 0 here.. */ - for (i = 1; i < IWM_MAX_MACS_IN_BINDING; i++) + for (i = 0; i < IWM_MAX_MACS_IN_BINDING; i++) cmd.macs[i] = htole32(IWM_FW_CTXT_INVALID); + for (i = 0; i < data->idx; i++) + cmd.macs[i] = htole32(IWM_FW_CMD_ID_AND_COLOR(data->ids[i], + data->colors[i])); status = 0; ret = iwm_mvm_send_cmd_pdu_status(sc, IWM_BINDING_CONTEXT_CMD, sizeof(cmd), &cmd, &status); if (ret) { - IWM_DPRINTF(sc, IWM_DEBUG_CMD | IWM_DEBUG_RESET, - "%s: Failed to send binding (action:%d): %d\n", - __func__, action, ret); + device_printf(sc->sc_dev, + "Failed to send binding (action:%d): %d\n", action, ret); return ret; } if (status) { - IWM_DPRINTF(sc, IWM_DEBUG_CMD | IWM_DEBUG_RESET, - "%s: Binding command failed: %u\n", - __func__, - status); + device_printf(sc->sc_dev, + "Binding command failed: %u\n", status); ret = EIO; } return ret; } -int -iwm_mvm_binding_update(struct iwm_softc *sc, struct iwm_vap *ivp) +static int +iwm_mvm_binding_update(struct iwm_softc *sc, struct iwm_vap *ivp, + struct iwm_mvm_phy_ctxt *phyctxt, boolean_t add) { - return iwm_mvm_binding_cmd(sc, ivp, IWM_FW_CTXT_ACTION_MODIFY); + struct iwm_mvm_iface_iterator_data data = { + .phyctxt = phyctxt, + }; + uint32_t action; + + if (add) + action = IWM_FW_CTXT_ACTION_ADD; + else + action = IWM_FW_CTXT_ACTION_REMOVE; + + if (add) { + data.ids[0] = ivp->id; + data.colors[0] = ivp->color; + data.idx++; + } + + return iwm_mvm_binding_cmd(sc, action, &data); } int iwm_mvm_binding_add_vif(struct iwm_softc *sc, struct iwm_vap *ivp) { - return iwm_mvm_binding_cmd(sc, ivp, IWM_FW_CTXT_ACTION_ADD); + if (!ivp->phy_ctxt) + return EINVAL; + +#ifdef notyet + /* + * Update SF - Disable if needed. if this fails, SF might still be on + * while many macs are bound, which is forbidden - so fail the binding. + */ + if (iwm_mvm_sf_update(sc, ivp, FALSE)) + return EINVAL; +#endif + + return iwm_mvm_binding_update(sc, ivp, ivp->phy_ctxt, TRUE); +} + +int +iwm_mvm_binding_remove_vif(struct iwm_softc *sc, struct iwm_vap *ivp) +{ + int ret; + + if (!ivp->phy_ctxt) + return EINVAL; + + ret = iwm_mvm_binding_update(sc, ivp, ivp->phy_ctxt, FALSE); + +#ifdef notyet + if (!ret) { + if (iwm_mvm_sf_update(sc, ivp, TRUE)) + device_printf(sc->sc_dev, + "Failed to update SF state\n"); + } +#endif + + return ret; } Modified: head/sys/dev/iwm/if_iwm_binding.h ============================================================================== --- head/sys/dev/iwm/if_iwm_binding.h Fri May 12 05:17:49 2017 (r318211) +++ head/sys/dev/iwm/if_iwm_binding.h Fri May 12 05:19:08 2017 (r318212) @@ -105,9 +105,7 @@ #ifndef __IF_IWM_BINDING_H__ #define __IF_IWM_BINDING_H__ -extern int iwm_mvm_binding_cmd(struct iwm_softc *sc, struct iwm_vap *ivp, - uint32_t action); -extern int iwm_mvm_binding_update(struct iwm_softc *sc, struct iwm_vap *ivp); extern int iwm_mvm_binding_add_vif(struct iwm_softc *sc, struct iwm_vap *ivp); +extern int iwm_mvm_binding_remove_vif(struct iwm_softc *sc, struct iwm_vap *ivp); #endif /* __IF_IWM_BINDING_H__ */ Modified: head/sys/dev/iwm/if_iwm_mac_ctxt.c ============================================================================== --- head/sys/dev/iwm/if_iwm_mac_ctxt.c Fri May 12 05:17:49 2017 (r318211) +++ head/sys/dev/iwm/if_iwm_mac_ctxt.c Fri May 12 05:19:08 2017 (r318212) @@ -252,6 +252,7 @@ iwm_mvm_mac_ctxt_cmd_common(struct iwm_s struct ieee80211com *ic = &sc->sc_ic; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); struct ieee80211_node *ni = vap->iv_bss; + struct iwm_vap *ivp = IWM_VAP(vap); int cck_ack_rates, ofdm_ack_rates; int i; int is2ghz; @@ -263,8 +264,8 @@ iwm_mvm_mac_ctxt_cmd_common(struct iwm_s * These are both functions of the vap, not of the node. * So, for now, hard-code both to 0 (default). */ - cmd->id_and_color = htole32(IWM_FW_CMD_ID_AND_COLOR(IWM_DEFAULT_MACID, - IWM_DEFAULT_COLOR)); + cmd->id_and_color = htole32(IWM_FW_CMD_ID_AND_COLOR(ivp->id, + ivp->color)); cmd->action = htole32(action); cmd->mac_type = htole32(IWM_FW_MAC_TYPE_BSS_STA); Modified: head/sys/dev/iwm/if_iwm_power.c ============================================================================== --- head/sys/dev/iwm/if_iwm_power.c Fri May 12 05:17:49 2017 (r318211) +++ head/sys/dev/iwm/if_iwm_power.c Fri May 12 05:19:08 2017 (r318212) @@ -286,9 +286,10 @@ iwm_mvm_power_build_cmd(struct iwm_softc int keep_alive; struct ieee80211com *ic = &sc->sc_ic; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); + struct iwm_vap *ivp = IWM_VAP(vap); - cmd->id_and_color = htole32(IWM_FW_CMD_ID_AND_COLOR(IWM_DEFAULT_MACID, - IWM_DEFAULT_COLOR)); + cmd->id_and_color = htole32(IWM_FW_CMD_ID_AND_COLOR(ivp->id, + ivp->color)); dtimper = vap->iv_dtim_period ?: 1; /* Modified: head/sys/dev/iwm/if_iwm_time_event.c ============================================================================== --- head/sys/dev/iwm/if_iwm_time_event.c Fri May 12 05:17:49 2017 (r318211) +++ head/sys/dev/iwm/if_iwm_time_event.c Fri May 12 05:19:08 2017 (r318212) @@ -166,7 +166,7 @@ __FBSDID("$FreeBSD$"); #define IWM_MVM_ROC_TE_TYPE_MGMT_TX IWM_TE_P2P_CLIENT_ASSOC static int -iwm_mvm_time_event_send_add(struct iwm_softc *sc, struct iwm_node *in, +iwm_mvm_time_event_send_add(struct iwm_softc *sc, struct iwm_vap *ivp, void *te_data, struct iwm_time_event_cmd *te_cmd) { int ret; @@ -186,14 +186,14 @@ iwm_mvm_time_event_send_add(struct iwm_s } void -iwm_mvm_protect_session(struct iwm_softc *sc, struct iwm_node *in, +iwm_mvm_protect_session(struct iwm_softc *sc, struct iwm_vap *ivp, uint32_t duration, uint32_t max_delay) { struct iwm_time_event_cmd time_cmd = {}; time_cmd.action = htole32(IWM_FW_CTXT_ACTION_ADD); time_cmd.id_and_color = - htole32(IWM_FW_CMD_ID_AND_COLOR(IWM_DEFAULT_MACID, IWM_DEFAULT_COLOR)); + htole32(IWM_FW_CMD_ID_AND_COLOR(ivp->id, ivp->color)); time_cmd.id = htole32(IWM_TE_BSS_STA_AGGRESSIVE_ASSOC); time_cmd.apply_time = htole32(0); @@ -209,5 +209,5 @@ iwm_mvm_protect_session(struct iwm_softc IWM_TE_V2_NOTIF_HOST_EVENT_END | IWM_T2_V2_START_IMMEDIATELY); - iwm_mvm_time_event_send_add(sc, in, /*te_data*/NULL, &time_cmd); + iwm_mvm_time_event_send_add(sc, ivp, /*te_data*/NULL, &time_cmd); } Modified: head/sys/dev/iwm/if_iwm_time_event.h ============================================================================== --- head/sys/dev/iwm/if_iwm_time_event.h Fri May 12 05:17:49 2017 (r318211) +++ head/sys/dev/iwm/if_iwm_time_event.h Fri May 12 05:19:08 2017 (r318212) @@ -107,7 +107,7 @@ #ifndef __IF_IWM_TIME_EVENT_H__ #define __IF_IWM_TIME_EVENT_H__ -extern void iwm_mvm_protect_session(struct iwm_softc *sc, struct iwm_node *in, +extern void iwm_mvm_protect_session(struct iwm_softc *sc, struct iwm_vap *ivp, uint32_t duration, uint32_t max_delay); #endif /* __IF_IWM_TIME_EVENT_H__ */ Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Fri May 12 05:17:49 2017 (r318211) +++ head/sys/dev/iwm/if_iwmvar.h Fri May 12 05:19:08 2017 (r318212) @@ -375,6 +375,9 @@ struct iwm_vap { enum ieee80211_state, int); struct iwm_mvm_phy_ctxt *phy_ctxt; + + uint16_t id; + uint16_t color; }; #define IWM_VAP(_vap) ((struct iwm_vap *)(_vap)) From owner-svn-src-head@freebsd.org Fri May 12 05:21:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A003ED68D2D; Fri, 12 May 2017 05:21:03 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 703A1101A; Fri, 12 May 2017 05:21:03 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C5L2mG040687; Fri, 12 May 2017 05:21:02 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C5L2a4040686; Fri, 12 May 2017 05:21:02 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120521.v4C5L2a4040686@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 05:21:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318213 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 05:21:03 -0000 Author: adrian Date: Fri May 12 05:21:02 2017 New Revision: 318213 URL: https://svnweb.freebsd.org/changeset/base/318213 Log: [if_iwm] Get rid of another usage of the IWM_DEFAULT_MACID/_COLOR constant. Obtained from: dragonflybsd.git c009badecf7b1389cd86adde9fd35f6113c75b5b Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Fri May 12 05:19:08 2017 (r318212) +++ head/sys/dev/iwm/if_iwm.c Fri May 12 05:21:02 2017 (r318213) @@ -3895,6 +3895,7 @@ iwm_mvm_send_add_sta_cmd_status(struct i static int iwm_mvm_sta_send_to_fw(struct iwm_softc *sc, struct iwm_node *in, int update) { + struct iwm_vap *ivp = IWM_VAP(in->in_ni.ni_vap); struct iwm_mvm_add_sta_cmd add_sta_cmd; int ret; uint32_t status; @@ -3903,8 +3904,7 @@ iwm_mvm_sta_send_to_fw(struct iwm_softc add_sta_cmd.sta_id = IWM_STATION_ID; add_sta_cmd.mac_id_n_color - = htole32(IWM_FW_CMD_ID_AND_COLOR(IWM_DEFAULT_MACID, - IWM_DEFAULT_COLOR)); + = htole32(IWM_FW_CMD_ID_AND_COLOR(ivp->id, ivp->color)); if (!update) { int ac; for (ac = 0; ac < WME_NUM_AC; ac++) { From owner-svn-src-head@freebsd.org Fri May 12 05:21:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B9BFD68F08; Fri, 12 May 2017 05:21:52 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B3731251; Fri, 12 May 2017 05:21:51 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C5Lpof044458; Fri, 12 May 2017 05:21:51 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C5LpJt044457; Fri, 12 May 2017 05:21:51 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120521.v4C5LpJt044457@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 05:21:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318214 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 05:21:52 -0000 Author: adrian Date: Fri May 12 05:21:50 2017 New Revision: 318214 URL: https://svnweb.freebsd.org/changeset/base/318214 Log: [iwm] Sanity check channel for IEEE80211_CHAN_ANYC in if_iwm_mac_ctxt.c. * This avoids panicing in some broken vap state handling cases. Obtained from: dragonflybsd.git 10d5b77b5421e7cbcc426160edbe858d1d610a29 Modified: head/sys/dev/iwm/if_iwm_mac_ctxt.c Modified: head/sys/dev/iwm/if_iwm_mac_ctxt.c ============================================================================== --- head/sys/dev/iwm/if_iwm_mac_ctxt.c Fri May 12 05:21:02 2017 (r318213) +++ head/sys/dev/iwm/if_iwm_mac_ctxt.c Fri May 12 05:21:50 2017 (r318214) @@ -308,7 +308,7 @@ iwm_mvm_mac_ctxt_cmd_common(struct iwm_s /* * Default to 2ghz if no node information is given. */ - if (in) { + if (in && in->in_ni.ni_chan != IEEE80211_CHAN_ANYC) { is2ghz = !! IEEE80211_IS_CHAN_2GHZ(in->in_ni.ni_chan); } else { is2ghz = 1; From owner-svn-src-head@freebsd.org Fri May 12 05:22:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 714FDD68F80; Fri, 12 May 2017 05:22:31 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E6B415BB; Fri, 12 May 2017 05:22:31 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C5MUEN044550; Fri, 12 May 2017 05:22:30 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C5MU2u044549; Fri, 12 May 2017 05:22:30 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120522.v4C5MU2u044549@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 05:22:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318215 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 05:22:31 -0000 Author: adrian Date: Fri May 12 05:22:29 2017 New Revision: 318215 URL: https://svnweb.freebsd.org/changeset/base/318215 Log: [iwm] change the check for ADD_STA status, use IWM_ADD_STA_STATUS_MASK. Obtained from: dragonflybsd.git 74d41163ddac72b0d7ea7b7873d53fe134723a12 Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Fri May 12 05:21:50 2017 (r318214) +++ head/sys/dev/iwm/if_iwm.c Fri May 12 05:22:29 2017 (r318215) @@ -3925,7 +3925,7 @@ iwm_mvm_sta_send_to_fw(struct iwm_softc if (ret) return ret; - switch (status) { + switch (status & IWM_ADD_STA_STATUS_MASK) { case IWM_ADD_STA_SUCCESS: break; default: @@ -3971,7 +3971,7 @@ iwm_mvm_add_int_sta_common(struct iwm_so if (ret) return ret; - switch (status) { + switch (status & IWM_ADD_STA_STATUS_MASK) { case IWM_ADD_STA_SUCCESS: IWM_DPRINTF(sc, IWM_DEBUG_RESET, "%s: Internal station added.\n", __func__); From owner-svn-src-head@freebsd.org Fri May 12 05:28:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32282D69014; Fri, 12 May 2017 05:28:51 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E70041781; Fri, 12 May 2017 05:28:50 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C5SnlH044852; Fri, 12 May 2017 05:28:49 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C5SnmZ044851; Fri, 12 May 2017 05:28:49 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120528.v4C5SnmZ044851@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 05:28:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318216 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 05:28:51 -0000 Author: adrian Date: Fri May 12 05:28:49 2017 New Revision: 318216 URL: https://svnweb.freebsd.org/changeset/base/318216 Log: [iwm] Sync iwm_read_firmware()'s loop to iwlwifi's code. Obtained from: dragonflybsd.git d1c10ccfcf2d6d2a664f17197add0b4f93333181 Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Fri May 12 05:22:29 2017 (r318215) +++ head/sys/dev/iwm/if_iwm.c Fri May 12 05:28:49 2017 (r318216) @@ -549,12 +549,14 @@ iwm_read_firmware(struct iwm_softc *sc, { struct iwm_fw_info *fw = &sc->sc_fw; const struct iwm_tlv_ucode_header *uhdr; - struct iwm_ucode_tlv tlv; + const struct iwm_ucode_tlv *tlv; struct iwm_ucode_capabilities *capa = &sc->ucode_capa; enum iwm_ucode_tlv_type tlv_type; const struct firmware *fwp; const uint8_t *data; + uint32_t tlv_len; uint32_t usniffer_img; + const uint8_t *tlv_data; uint32_t paging_mem_size; int num_of_cpus; int error = 0; @@ -607,24 +609,20 @@ iwm_read_firmware(struct iwm_softc *sc, goto out; } - snprintf(sc->sc_fwver, sizeof(sc->sc_fwver), "%d.%d (API ver %d)", + snprintf(sc->sc_fwver, sizeof(sc->sc_fwver), "%u.%u (API ver %u)", IWM_UCODE_MAJOR(le32toh(uhdr->ver)), IWM_UCODE_MINOR(le32toh(uhdr->ver)), IWM_UCODE_API(le32toh(uhdr->ver))); data = uhdr->data; len = fw->fw_fp->datasize - sizeof(*uhdr); - while (len >= sizeof(tlv)) { - size_t tlv_len; - const void *tlv_data; - - memcpy(&tlv, data, sizeof(tlv)); - tlv_len = le32toh(tlv.length); - tlv_type = le32toh(tlv.type); - - len -= sizeof(tlv); - data += sizeof(tlv); - tlv_data = data; + while (len >= sizeof(*tlv)) { + len -= sizeof(*tlv); + tlv = (const void *)data; + + tlv_len = le32toh(tlv->length); + tlv_type = le32toh(tlv->type); + tlv_data = tlv->data; if (len < tlv_len) { device_printf(sc->sc_dev, @@ -633,19 +631,21 @@ iwm_read_firmware(struct iwm_softc *sc, error = EINVAL; goto parse_out; } + len -= roundup2(tlv_len, 4); + data += sizeof(tlv) + roundup2(tlv_len, 4); switch ((int)tlv_type) { case IWM_UCODE_TLV_PROBE_MAX_LEN: - if (tlv_len < sizeof(uint32_t)) { + if (tlv_len != sizeof(uint32_t)) { device_printf(sc->sc_dev, - "%s: PROBE_MAX_LEN (%d) < sizeof(uint32_t)\n", + "%s: PROBE_MAX_LEN (%d) != sizeof(uint32_t)\n", __func__, (int) tlv_len); error = EINVAL; goto parse_out; } capa->max_probe_length = - le32toh(*(const uint32_t *)tlv_data); + le32_to_cpup((const uint32_t *)tlv_data); /* limit it to something sensible */ if (capa->max_probe_length > IWM_SCAN_OFFLOAD_PROBE_REQ_SIZE) { @@ -676,6 +676,14 @@ iwm_read_firmware(struct iwm_softc *sc, error = EINVAL; goto parse_out; } + if (tlv_len % sizeof(uint32_t)) { + device_printf(sc->sc_dev, + "%s: IWM_UCODE_TLV_FLAGS: tlv_len (%d) %% sizeof(uint32_t)\n", + __func__, + (int) tlv_len); + error = EINVAL; + goto parse_out; + } /* * Apparently there can be many flags, but Linux driver * parses only the first one, and so do we. @@ -687,7 +695,7 @@ iwm_read_firmware(struct iwm_softc *sc, * 2) TLV_FLAGS contains TLV_FLAGS_PAN * ==> this resets TLV_PAN to itself... hnnnk */ - capa->flags = le32toh(*(const uint32_t *)tlv_data); + capa->flags = le32_to_cpup((const uint32_t *)tlv_data); break; case IWM_UCODE_TLV_CSCHEME: if ((error = iwm_store_cscheme(sc, @@ -708,7 +716,7 @@ iwm_read_firmware(struct iwm_softc *sc, error = EINVAL; goto parse_out; } - num_of_cpus = le32toh(*(const uint32_t *)tlv_data); + num_of_cpus = le32_to_cpup((const uint32_t *)tlv_data); if (num_of_cpus == 2) { fw->fw_sects[IWM_UCODE_REGULAR].is_dual_cpus = TRUE; @@ -782,7 +790,7 @@ iwm_read_firmware(struct iwm_softc *sc, goto parse_out; } sc->sc_fw.phy_config = - le32toh(*(const uint32_t *)tlv_data); + le32_to_cpup((const uint32_t *)tlv_data); sc->sc_fw.valid_tx_ant = (sc->sc_fw.phy_config & IWM_FW_PHY_CFG_TX_CHAIN) >> IWM_FW_PHY_CFG_TX_CHAIN_POS; @@ -833,7 +841,7 @@ iwm_read_firmware(struct iwm_softc *sc, error = EINVAL; goto parse_out; } - paging_mem_size = le32toh(*(const uint32_t *)tlv_data); + paging_mem_size = le32_to_cpup((const uint32_t *)tlv_data); IWM_DPRINTF(sc, IWM_DEBUG_FIRMWARE_TLV, "%s: Paging: paging enabled (size = %u bytes)\n", @@ -866,7 +874,7 @@ iwm_read_firmware(struct iwm_softc *sc, goto parse_out; } capa->n_scan_channels = - le32toh(*(const uint32_t *)tlv_data); + le32_to_cpup((const uint32_t *)tlv_data); break; case IWM_UCODE_TLV_FW_VERSION: @@ -891,9 +899,6 @@ iwm_read_firmware(struct iwm_softc *sc, error = EINVAL; goto parse_out; } - - len -= roundup(tlv_len, 4); - data += roundup(tlv_len, 4); } KASSERT(error == 0, ("unhandled error")); From owner-svn-src-head@freebsd.org Fri May 12 05:30:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D672CD69095; Fri, 12 May 2017 05:30:02 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A698018FD; Fri, 12 May 2017 05:30:02 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C5U1a6044964; Fri, 12 May 2017 05:30:01 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C5U1mg044963; Fri, 12 May 2017 05:30:01 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120530.v4C5U1mg044963@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 05:30:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318217 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 05:30:02 -0000 Author: adrian Date: Fri May 12 05:30:01 2017 New Revision: 318217 URL: https://svnweb.freebsd.org/changeset/base/318217 Log: [iwm] Change UCODE_TLV_API #define-s from bitmasks to indexes. * Fixes oversight from commit 757eecf0e6c92745aa2eee95811e573c8300850e. fw_has_api now uses the isset macro instead of a simple logical-and. Obtained from: dragonflybsd.git c00575de8491dc402abf52c8c7e1cca1ef79e257 Modified: head/sys/dev/iwm/if_iwmreg.h Modified: head/sys/dev/iwm/if_iwmreg.h ============================================================================== --- head/sys/dev/iwm/if_iwmreg.h Fri May 12 05:28:49 2017 (r318216) +++ head/sys/dev/iwm/if_iwmreg.h Fri May 12 05:30:01 2017 (r318217) @@ -669,12 +669,12 @@ P2P_PS_SCM\31UAPSD_SUPPORT\32EBS\33P2P_P * @IWM_NUM_UCODE_TLV_API: number of bits used */ enum iwm_ucode_tlv_api { - IWM_UCODE_TLV_API_FRAGMENTED_SCAN = (1 << 8), - IWM_UCODE_TLV_API_WIFI_MCC_UPDATE = (1 << 9), - IWM_UCODE_TLV_API_WIDE_CMD_HDR = (1 << 14), - IWM_UCODE_TLV_API_LQ_SS_PARAMS = (1 << 18), - IWM_UCODE_TLV_API_EXT_SCAN_PRIORITY = (1 << 24), - IWM_UCODE_TLV_API_TX_POWER_CHAIN = (1 << 27), + IWM_UCODE_TLV_API_FRAGMENTED_SCAN = 8, + IWM_UCODE_TLV_API_WIFI_MCC_UPDATE = 9, + IWM_UCODE_TLV_API_WIDE_CMD_HDR = 14, + IWM_UCODE_TLV_API_LQ_SS_PARAMS = 18, + IWM_UCODE_TLV_API_EXT_SCAN_PRIORITY = 24, + IWM_UCODE_TLV_API_TX_POWER_CHAIN = 27, IWM_NUM_UCODE_TLV_API = 32 }; From owner-svn-src-head@freebsd.org Fri May 12 05:49:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 476C6D69421; Fri, 12 May 2017 05:49:26 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1777CED; Fri, 12 May 2017 05:49:26 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C5nPh6052926; Fri, 12 May 2017 05:49:25 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C5nO0m052923; Fri, 12 May 2017 05:49:24 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120549.v4C5nO0m052923@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 05:49:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318218 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 05:49:26 -0000 Author: adrian Date: Fri May 12 05:49:24 2017 New Revision: 318218 URL: https://svnweb.freebsd.org/changeset/base/318218 Log: [iwm] Process multiple frames per RX buffer. * Factor out iwm_handle_rxb() function from iwm_notif_intr(). * Removing the IWM_FH_RCSR_CHNL0_RX_CONFIG_SINGLE_FRAME_MSK flag allows the device to put multiple frames (both command responses and 80211 frames) into a single RX buffer. * Uses m_copym() to split up the receive buffers when multiple 80211 frames are received in one RX buffer. The effect is basically the same as when using m_split(), but we want to keep the original mbuf around when calling iwm_mvm_rx_rx_mpdu() to make error handling a bit easier for now. * Contains a small optimization to avoid the m_copym() when only a single 80211 frame is received in one RX buffer (i.e. matching the existing behaviour). Obtained from: dragonflybsd.git b5eb43f0280bbcfd26af51cf5a4b8e8ff3590b67 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwmreg.h head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Fri May 12 05:30:01 2017 (r318217) +++ head/sys/dev/iwm/if_iwm.c Fri May 12 05:49:24 2017 (r318218) @@ -169,6 +169,9 @@ __FBSDID("$FreeBSD$"); #include #include +/* From DragonflyBSD */ +#define mtodoff(m, t, off) ((t)((m)->m_data + (off))) + const uint8_t iwm_nvm_channels[] = { /* 2.4 GHz */ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, @@ -320,16 +323,15 @@ static int iwm_rx_addbuf(struct iwm_soft static int iwm_mvm_get_signal_strength(struct iwm_softc *, struct iwm_rx_phy_info *); static void iwm_mvm_rx_rx_phy_cmd(struct iwm_softc *, - struct iwm_rx_packet *, - struct iwm_rx_data *); + struct iwm_rx_packet *); static int iwm_get_noise(struct iwm_softc *sc, const struct iwm_mvm_statistics_rx_non_phy *); -static void iwm_mvm_rx_rx_mpdu(struct iwm_softc *, struct mbuf *); +static boolean_t iwm_mvm_rx_rx_mpdu(struct iwm_softc *, struct mbuf *, + uint32_t, boolean_t); static int iwm_mvm_rx_tx_cmd_single(struct iwm_softc *, struct iwm_rx_packet *, struct iwm_node *); -static void iwm_mvm_rx_tx_cmd(struct iwm_softc *, struct iwm_rx_packet *, - struct iwm_rx_data *); +static void iwm_mvm_rx_tx_cmd(struct iwm_softc *, struct iwm_rx_packet *); static void iwm_cmd_done(struct iwm_softc *, struct iwm_rx_packet *); #if 0 static void iwm_update_sched(struct iwm_softc *, int, int, uint8_t, @@ -385,6 +387,7 @@ static const char * static void iwm_nic_error(struct iwm_softc *); static void iwm_nic_umac_error(struct iwm_softc *); #endif +static void iwm_handle_rxb(struct iwm_softc *, struct mbuf *); static void iwm_notif_intr(struct iwm_softc *); static void iwm_intr(void *); static int iwm_attach(device_t); @@ -1432,14 +1435,21 @@ iwm_nic_rx_init(struct iwm_softc *sc) IWM_WRITE(sc, IWM_FH_RSCSR_CHNL0_STTS_WPTR_REG, sc->rxq.stat_dma.paddr >> 4); - /* Enable RX. */ + /* Enable Rx DMA + * XXX 5000 HW isn't supported by the iwm(4) driver. + * IWM_FH_RCSR_CHNL0_RX_IGNORE_RXF_EMPTY is set because of HW bug in + * the credit mechanism in 5000 HW RX FIFO + * Direct rx interrupts to hosts + * Rx buffer size 4 or 8k or 12k + * RB timeout 0x10 + * 256 RBDs + */ IWM_WRITE(sc, IWM_FH_MEM_RCSR_CHNL0_CONFIG_REG, IWM_FH_RCSR_RX_CONFIG_CHNL_EN_ENABLE_VAL | IWM_FH_RCSR_CHNL0_RX_IGNORE_RXF_EMPTY | /* HW bug */ IWM_FH_RCSR_CHNL0_RX_CONFIG_IRQ_DEST_INT_HOST_VAL | - IWM_FH_RCSR_CHNL0_RX_CONFIG_SINGLE_FRAME_MSK | - (IWM_RX_RB_TIMEOUT << IWM_FH_RCSR_RX_CONFIG_REG_IRQ_RBTH_POS) | IWM_FH_RCSR_RX_CONFIG_REG_VAL_RB_SIZE_4K | + (IWM_RX_RB_TIMEOUT << IWM_FH_RCSR_RX_CONFIG_REG_IRQ_RBTH_POS) | IWM_RX_QUEUE_SIZE_LOG << IWM_FH_RCSR_RX_CONFIG_RBDCB_SIZE_POS); IWM_WRITE_1(sc, IWM_CSR_INT_COALESCING, IWM_HOST_INT_TIMEOUT_DEF); @@ -3126,13 +3136,11 @@ iwm_mvm_get_signal_strength(struct iwm_s } static void -iwm_mvm_rx_rx_phy_cmd(struct iwm_softc *sc, - struct iwm_rx_packet *pkt, struct iwm_rx_data *data) +iwm_mvm_rx_rx_phy_cmd(struct iwm_softc *sc, struct iwm_rx_packet *pkt) { struct iwm_rx_phy_info *phy_info = (void *)pkt->data; IWM_DPRINTF(sc, IWM_DEBUG_RECV, "received PHY stats\n"); - bus_dmamap_sync(sc->rxq.data_dmat, data->map, BUS_DMASYNC_POSTREAD); memcpy(&sc->sc_last_phy_info, phy_info, sizeof(sc->sc_last_phy_info)); } @@ -3176,8 +3184,9 @@ iwm_get_noise(struct iwm_softc *sc, * * Handles the actual data of the Rx packet from the fw */ -static void -iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc, struct mbuf *m) +static boolean_t +iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc, struct mbuf *m, uint32_t offset, + boolean_t stolen) { struct ieee80211com *ic = &sc->sc_ic; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); @@ -3186,7 +3195,7 @@ iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc, struct ieee80211_rx_stats rxs; struct iwm_rx_phy_info *phy_info; struct iwm_rx_mpdu_res_start *rx_res; - struct iwm_rx_packet *pkt = mtod(m, struct iwm_rx_packet *); + struct iwm_rx_packet *pkt = mtodoff(m, struct iwm_rx_packet *, offset); uint32_t len; uint32_t rx_pkt_status; int rssi; @@ -3217,7 +3226,7 @@ iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc, rssi = rssi - sc->sc_noise; /* replenish ring for the buffer we're going to feed to the sharks */ - if (iwm_rx_addbuf(sc, IWM_RBUF_SIZE, sc->rxq.cur) != 0) { + if (!stolen && iwm_rx_addbuf(sc, IWM_RBUF_SIZE, sc->rxq.cur) != 0) { device_printf(sc->sc_dev, "%s: unable to add more buffers\n", __func__); goto fail; @@ -3302,10 +3311,11 @@ iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc, } IWM_LOCK(sc); - return; + return TRUE; fail: counter_u64_add(ic->ic_ierrors, 1); + return FALSE; } static int @@ -3360,8 +3370,7 @@ iwm_mvm_rx_tx_cmd_single(struct iwm_soft } static void -iwm_mvm_rx_tx_cmd(struct iwm_softc *sc, - struct iwm_rx_packet *pkt, struct iwm_rx_data *data) +iwm_mvm_rx_tx_cmd(struct iwm_softc *sc, struct iwm_rx_packet *pkt) { struct iwm_cmd_header *cmd_hdr = &pkt->hdr; int idx = cmd_hdr->idx; @@ -3376,8 +3385,6 @@ iwm_mvm_rx_tx_cmd(struct iwm_softc *sc, KASSERT(txd->in != NULL, ("txd without node")); KASSERT(txd->m != NULL, ("txd without mbuf")); - bus_dmamap_sync(ring->data_dmat, data->map, BUS_DMASYNC_POSTREAD); - sc->sc_tx_timer = 0; status = iwm_mvm_rx_tx_cmd_single(sc, pkt, in); @@ -5379,68 +5386,95 @@ iwm_nic_error(struct iwm_softc *sc) } #endif -#define ADVANCE_RXQ(sc) (sc->rxq.cur = (sc->rxq.cur + 1) % IWM_RX_RING_COUNT); - -/* - * Process an IWM_CSR_INT_BIT_FH_RX or IWM_CSR_INT_BIT_SW_RX interrupt. - * Basic structure from if_iwn - */ static void -iwm_notif_intr(struct iwm_softc *sc) +iwm_handle_rxb(struct iwm_softc *sc, struct mbuf *m) { struct ieee80211com *ic = &sc->sc_ic; - uint16_t hw; - - bus_dmamap_sync(sc->rxq.stat_dma.tag, sc->rxq.stat_dma.map, - BUS_DMASYNC_POSTREAD); - - hw = le16toh(sc->rxq.stat->closed_rb_num) & 0xfff; - - /* - * Process responses - */ - while (sc->rxq.cur != hw) { - struct iwm_rx_ring *ring = &sc->rxq; - struct iwm_rx_data *data = &ring->data[ring->cur]; - struct iwm_rx_packet *pkt; - struct iwm_cmd_response *cresp; - int qid, idx, code; - - bus_dmamap_sync(ring->data_dmat, data->map, - BUS_DMASYNC_POSTREAD); - pkt = mtod(data->m, struct iwm_rx_packet *); + struct iwm_cmd_response *cresp; + struct mbuf *m1; + uint32_t offset = 0; + uint32_t maxoff = IWM_RBUF_SIZE; + uint32_t nextoff; + boolean_t stolen = FALSE; + +#define HAVEROOM(a) \ + ((a) + sizeof(uint32_t) + sizeof(struct iwm_cmd_header) < maxoff) + + while (HAVEROOM(offset)) { + struct iwm_rx_packet *pkt = mtodoff(m, struct iwm_rx_packet *, + offset); + int qid, idx, code, len; - qid = pkt->hdr.qid & ~0x80; + qid = pkt->hdr.qid; idx = pkt->hdr.idx; code = IWM_WIDE_ID(pkt->hdr.flags, pkt->hdr.code); - IWM_DPRINTF(sc, IWM_DEBUG_INTR, - "rx packet qid=%d idx=%d type=%x %d %d\n", - pkt->hdr.qid & ~0x80, pkt->hdr.idx, code, ring->cur, hw); /* * randomly get these from the firmware, no idea why. * they at least seem harmless, so just ignore them for now */ - if (__predict_false((pkt->hdr.code == 0 && qid == 0 && idx == 0) - || pkt->len_n_flags == htole32(0x55550000))) { - ADVANCE_RXQ(sc); - continue; + if ((pkt->hdr.code == 0 && (qid & ~0x80) == 0 && idx == 0) || + pkt->len_n_flags == htole32(IWM_FH_RSCSR_FRAME_INVALID)) { + break; } + IWM_DPRINTF(sc, IWM_DEBUG_INTR, + "rx packet qid=%d idx=%d type=%x\n", + qid & ~0x80, pkt->hdr.idx, code); + + len = le32toh(pkt->len_n_flags) & IWM_FH_RSCSR_FRAME_SIZE_MSK; + len += sizeof(uint32_t); /* account for status word */ + nextoff = offset + roundup2(len, IWM_FH_RSCSR_FRAME_ALIGN); + iwm_notification_wait_notify(sc->sc_notif_wait, code, pkt); switch (code) { case IWM_REPLY_RX_PHY_CMD: - iwm_mvm_rx_rx_phy_cmd(sc, pkt, data); + iwm_mvm_rx_rx_phy_cmd(sc, pkt); break; - case IWM_REPLY_RX_MPDU_CMD: - iwm_mvm_rx_rx_mpdu(sc, data->m); + case IWM_REPLY_RX_MPDU_CMD: { + /* + * If this is the last frame in the RX buffer, we + * can directly feed the mbuf to the sharks here. + */ + struct iwm_rx_packet *nextpkt = mtodoff(m, + struct iwm_rx_packet *, nextoff); + if (!HAVEROOM(nextoff) || + (nextpkt->hdr.code == 0 && + (nextpkt->hdr.qid & ~0x80) == 0 && + nextpkt->hdr.idx == 0) || + (nextpkt->len_n_flags == + htole32(IWM_FH_RSCSR_FRAME_INVALID))) { + if (iwm_mvm_rx_rx_mpdu(sc, m, offset, stolen)) { + stolen = FALSE; + /* Make sure we abort the loop */ + nextoff = maxoff; + } + break; + } + + /* + * Use m_copym instead of m_split, because that + * makes it easier to keep a valid rx buffer in + * the ring, when iwm_mvm_rx_rx_mpdu() fails. + * + * We need to start m_copym() at offset 0, to get the + * M_PKTHDR flag preserved. + */ + m1 = m_copym(m, 0, M_COPYALL, M_NOWAIT); + if (m1) { + if (iwm_mvm_rx_rx_mpdu(sc, m1, offset, stolen)) + stolen = TRUE; + else + m_freem(m1); + } break; + } case IWM_TX_CMD: - iwm_mvm_rx_tx_cmd(sc, pkt, data); + iwm_mvm_rx_tx_cmd(sc, pkt); break; case IWM_MISSED_BEACONS_NOTIFICATION: { @@ -5501,7 +5535,7 @@ iwm_notif_intr(struct iwm_softc *sc) case IWM_NVM_ACCESS_CMD: case IWM_MCC_UPDATE_CMD: - if (sc->sc_wantresp == ((qid << 16) | idx)) { + if (sc->sc_wantresp == (((qid & ~0x80) << 16) | idx)) { memcpy(sc->sc_cmd_resp, pkt, sizeof(sc->sc_cmd_resp)); } @@ -5561,7 +5595,7 @@ iwm_notif_intr(struct iwm_softc *sc) case IWM_BT_CONFIG: case IWM_REPLY_THERMAL_MNG_BACKOFF: cresp = (void *)pkt->data; - if (sc->sc_wantresp == ((qid << 16) | idx)) { + if (sc->sc_wantresp == (((qid & ~0x80) << 16) | idx)) { memcpy(sc->sc_cmd_resp, pkt, sizeof(*pkt)+sizeof(*cresp)); } @@ -5645,7 +5679,7 @@ iwm_notif_intr(struct iwm_softc *sc) default: device_printf(sc->sc_dev, "frame %d/%d %x UNHANDLED (this should " - "not happen)\n", qid, idx, + "not happen)\n", qid & ~0x80, idx, pkt->len_n_flags); break; } @@ -5664,20 +5698,55 @@ iwm_notif_intr(struct iwm_softc *sc) * uses a slightly different format for pkt->hdr, and "qid" * is actually the upper byte of a two-byte field. */ - if (!(pkt->hdr.qid & (1 << 7))) { + if (!(qid & (1 << 7))) iwm_cmd_done(sc, pkt); - } - ADVANCE_RXQ(sc); + offset = nextoff; + } + if (stolen) + m_freem(m); +#undef HAVEROOM +} + +/* + * Process an IWM_CSR_INT_BIT_FH_RX or IWM_CSR_INT_BIT_SW_RX interrupt. + * Basic structure from if_iwn + */ +static void +iwm_notif_intr(struct iwm_softc *sc) +{ + uint16_t hw; + + bus_dmamap_sync(sc->rxq.stat_dma.tag, sc->rxq.stat_dma.map, + BUS_DMASYNC_POSTREAD); + + hw = le16toh(sc->rxq.stat->closed_rb_num) & 0xfff; + + /* + * Process responses + */ + while (sc->rxq.cur != hw) { + struct iwm_rx_ring *ring = &sc->rxq; + struct iwm_rx_data *data = &ring->data[ring->cur]; + + bus_dmamap_sync(ring->data_dmat, data->map, + BUS_DMASYNC_POSTREAD); + + IWM_DPRINTF(sc, IWM_DEBUG_INTR, + "%s: hw = %d cur = %d\n", __func__, hw, ring->cur); + iwm_handle_rxb(sc, data->m); + + ring->cur = (ring->cur + 1) % IWM_RX_RING_COUNT; } /* - * Tell the firmware what we have processed. + * Tell the firmware that it can reuse the ring entries that + * we have just processed. * Seems like the hardware gets upset unless we align * the write by 8?? */ hw = (hw == 0) ? IWM_RX_RING_COUNT - 1 : hw - 1; - IWM_WRITE(sc, IWM_FH_RSCSR_CHNL0_WPTR, hw & ~7); + IWM_WRITE(sc, IWM_FH_RSCSR_CHNL0_WPTR, rounddown2(hw, 8)); } static void Modified: head/sys/dev/iwm/if_iwmreg.h ============================================================================== --- head/sys/dev/iwm/if_iwmreg.h Fri May 12 05:30:01 2017 (r318217) +++ head/sys/dev/iwm/if_iwmreg.h Fri May 12 05:49:24 2017 (r318218) @@ -5979,16 +5979,9 @@ struct iwm_dts_measurement_notif_v2 { #define IWM_FRAME_LIMIT 64 /* - * From Linux commit ab02165ccec4c78162501acedeef1a768acdb811: - * As the firmware is slowly running out of command IDs and grouping of - * commands is desirable anyway, the firmware is extending the command - * header from 4 bytes to 8 bytes to introduce a group (in place of the - * former flags field, since that's always 0 on commands and thus can - * be easily used to distinguish between the two). - * * These functions retrieve specific information from the id field in * the iwm_host_cmd struct which contains the command id, the group id, - * and the version of the command. + * and the version of the command and vice versa. */ static inline uint8_t iwm_cmd_opcode(uint32_t cmdid) @@ -5999,7 +5992,7 @@ iwm_cmd_opcode(uint32_t cmdid) static inline uint8_t iwm_cmd_groupid(uint32_t cmdid) { - return ((cmdid & 0Xff00) >> 8); + return ((cmdid & 0xff00) >> 8); } static inline uint8_t @@ -6092,6 +6085,8 @@ struct iwm_rx_packet { } __packed; #define IWM_FH_RSCSR_FRAME_SIZE_MSK 0x00003fff +#define IWM_FH_RSCSR_FRAME_INVALID 0x55550000 +#define IWM_FH_RSCSR_FRAME_ALIGN 0x40 static inline uint32_t iwm_rx_packet_len(const struct iwm_rx_packet *pkt) Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Fri May 12 05:30:01 2017 (r318217) +++ head/sys/dev/iwm/if_iwmvar.h Fri May 12 05:49:24 2017 (r318218) @@ -304,7 +304,6 @@ struct iwm_tx_ring { }; #define IWM_RX_RING_COUNT 256 -#define IWM_RBUF_COUNT (IWM_RX_RING_COUNT + 32) /* Linux driver optionally uses 8k buffer */ #define IWM_RBUF_SIZE 4096 From owner-svn-src-head@freebsd.org Fri May 12 05:50:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D773D694C1; Fri, 12 May 2017 05:50:40 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C22E527E; Fri, 12 May 2017 05:50:39 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C5ocnH053034; Fri, 12 May 2017 05:50:38 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C5ocfa053030; Fri, 12 May 2017 05:50:38 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120550.v4C5ocfa053030@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 05:50:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318219 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 05:50:40 -0000 Author: adrian Date: Fri May 12 05:50:38 2017 New Revision: 318219 URL: https://svnweb.freebsd.org/changeset/base/318219 Log: [iwm] Properly implement iwm_wme_update callback function. * Inspired by iwn(4) and Linux iwlwifi. * Read wme parameters into a buffer within struct iwm_vap in iwm_wme_update(). * If we aren't associated yet, the new settings will soon be sent by iwm_mvm_mac_ctxt_changed() during association. * If we are already associated, explicitly call iwm_mvm_mac_ctxt_changed() from iwm_wme_update() to send the new settings to the firmware. * Change iwm_mvm_ac_to_tx_fifo mapping, to fit the freebsd net80211 WME stream class numbering, instead of Linux's enum ieee80211_ac_numbers. Obtained from: dragonflybsd.git b8bd6cd746d1f45e616ccfcbeed06dfe452a1108 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_mac_ctxt.c head/sys/dev/iwm/if_iwm_mac_ctxt.h head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Fri May 12 05:49:24 2017 (r318218) +++ head/sys/dev/iwm/if_iwm.c Fri May 12 05:50:38 2017 (r318219) @@ -1533,13 +1533,6 @@ iwm_nic_init(struct iwm_softc *sc) return 0; } -const uint8_t iwm_mvm_ac_to_tx_fifo[] = { - IWM_MVM_TX_FIFO_VO, - IWM_MVM_TX_FIFO_VI, - IWM_MVM_TX_FIFO_BE, - IWM_MVM_TX_FIFO_BK, -}; - static int iwm_enable_txq(struct iwm_softc *sc, int sta_id, int qid, int fifo) { @@ -4258,7 +4251,7 @@ iwm_release(struct iwm_softc *sc, struct * from RUN back to SCAN is: * * iwm_mvm_power_mac_disable(sc, in); - * iwm_mvm_mac_ctxt_changed(sc, in); + * iwm_mvm_mac_ctxt_changed(sc, vap); * iwm_mvm_rm_sta(sc, in); * iwm_mvm_update_quotas(sc, NULL); * iwm_mvm_mac_ctxt_changed(sc, in); @@ -4295,7 +4288,7 @@ iwm_release(struct iwm_softc *sc, struct iwm_mvm_power_mac_disable(sc, in); - if ((error = iwm_mvm_mac_ctxt_changed(sc, in)) != 0) { + if ((error = iwm_mvm_mac_ctxt_changed(sc, vap)) != 0) { device_printf(sc->sc_dev, "mac ctxt change fail 1 %d\n", error); return error; } @@ -4307,7 +4300,7 @@ iwm_release(struct iwm_softc *sc, struct error = iwm_mvm_rm_sta(sc, in); in->in_assoc = 0; iwm_mvm_update_quotas(sc, NULL); - if ((error = iwm_mvm_mac_ctxt_changed(sc, in)) != 0) { + if ((error = iwm_mvm_mac_ctxt_changed(sc, vap)) != 0) { device_printf(sc->sc_dev, "mac ctxt change fail 2 %d\n", error); return error; } @@ -6260,12 +6253,47 @@ iwm_is_valid_ether_addr(uint8_t *addr) } static int -iwm_update_edca(struct ieee80211com *ic) +iwm_wme_update(struct ieee80211com *ic) { +#define IWM_EXP2(x) ((1 << (x)) - 1) /* CWmin = 2^ECWmin - 1 */ struct iwm_softc *sc = ic->ic_softc; + struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); + struct iwm_vap *ivp = IWM_VAP(vap); + struct iwm_node *in; + struct wmeParams tmp[WME_NUM_AC]; + int aci, error; + + if (vap == NULL) + return (0); + + IEEE80211_LOCK(ic); + for (aci = 0; aci < WME_NUM_AC; aci++) + tmp[aci] = ic->ic_wme.wme_chanParams.cap_wmeParams[aci]; + IEEE80211_UNLOCK(ic); + + IWM_LOCK(sc); + for (aci = 0; aci < WME_NUM_AC; aci++) { + const struct wmeParams *ac = &tmp[aci]; + ivp->queue_params[aci].aifsn = ac->wmep_aifsn; + ivp->queue_params[aci].cw_min = IWM_EXP2(ac->wmep_logcwmin); + ivp->queue_params[aci].cw_max = IWM_EXP2(ac->wmep_logcwmax); + ivp->queue_params[aci].edca_txop = + IEEE80211_TXOP_TO_US(ac->wmep_txopLimit); + } + ivp->have_wme = TRUE; + if (ivp->is_uploaded && vap->iv_bss != NULL) { + in = IWM_NODE(vap->iv_bss); + if (in->in_assoc) { + if ((error = iwm_mvm_mac_ctxt_changed(sc, vap)) != 0) { + device_printf(sc->sc_dev, + "%s: failed to update MAC\n", __func__); + } + } + } + IWM_UNLOCK(sc); - device_printf(sc->sc_dev, "%s: called\n", __func__); return (0); +#undef IWM_EXP2 } static void @@ -6322,7 +6350,7 @@ iwm_preinit(void *arg) ic->ic_set_channel = iwm_set_channel; ic->ic_scan_curchan = iwm_scan_curchan; ic->ic_scan_mindwell = iwm_scan_mindwell; - ic->ic_wme.wme_update = iwm_update_edca; + ic->ic_wme.wme_update = iwm_wme_update; ic->ic_parent = iwm_parent; ic->ic_transmit = iwm_transmit; iwm_radiotap_attach(sc); @@ -6380,6 +6408,8 @@ iwm_vap_create(struct ieee80211com *ic, ivp->id = IWM_DEFAULT_MACID; ivp->color = IWM_DEFAULT_COLOR; + ivp->have_wme = FALSE; + ieee80211_ratectl_init(vap); /* Complete setup. */ ieee80211_vap_attach(vap, iwm_media_change, ieee80211_media_status, Modified: head/sys/dev/iwm/if_iwm_mac_ctxt.c ============================================================================== --- head/sys/dev/iwm/if_iwm_mac_ctxt.c Fri May 12 05:49:24 2017 (r318218) +++ head/sys/dev/iwm/if_iwm_mac_ctxt.c Fri May 12 05:50:38 2017 (r318219) @@ -161,6 +161,13 @@ __FBSDID("$FreeBSD$"); * BEGIN mvm/mac-ctxt.c */ +const uint8_t iwm_mvm_ac_to_tx_fifo[] = { + IWM_MVM_TX_FIFO_BE, + IWM_MVM_TX_FIFO_BK, + IWM_MVM_TX_FIFO_VI, + IWM_MVM_TX_FIFO_VO, +}; + static void iwm_mvm_ack_rates(struct iwm_softc *sc, int is2ghz, int *cck_rates, int *ofdm_rates, struct iwm_node *in) @@ -329,17 +336,20 @@ iwm_mvm_mac_ctxt_cmd_common(struct iwm_s * cmd->qos_flags |= cpu_to_le32(MAC_QOS_FLG_UPDATE_EDCA) */ - /* XXX TODO: set wme parameters; also handle getting updated wme parameters */ - for (i = 0; i < IWM_AC_NUM+1; i++) { - int txf = i; - - cmd->ac[txf].cw_min = htole16(0x0f); - cmd->ac[txf].cw_max = htole16(0x3f); - cmd->ac[txf].aifsn = 1; + for (i = 0; i < WME_NUM_AC; i++) { + uint8_t txf = iwm_mvm_ac_to_tx_fifo[i]; + + cmd->ac[txf].cw_min = htole16(ivp->queue_params[i].cw_min); + cmd->ac[txf].cw_max = htole16(ivp->queue_params[i].cw_max); + cmd->ac[txf].edca_txop = + htole16(ivp->queue_params[i].edca_txop); + cmd->ac[txf].aifsn = ivp->queue_params[i].aifsn; cmd->ac[txf].fifos_mask = (1 << txf); - cmd->ac[txf].edca_txop = 0; } + if (ivp->have_wme) + cmd->qos_flags |= htole32(IWM_MAC_QOS_FLG_UPDATE_EDCA); + if (ic->ic_flags & IEEE80211_F_USEPROT) cmd->protection_flags |= htole32(IWM_MAC_PROT_FLG_TGG_PROTECT); Modified: head/sys/dev/iwm/if_iwm_mac_ctxt.h ============================================================================== --- head/sys/dev/iwm/if_iwm_mac_ctxt.h Fri May 12 05:49:24 2017 (r318218) +++ head/sys/dev/iwm/if_iwm_mac_ctxt.h Fri May 12 05:50:38 2017 (r318219) @@ -106,6 +106,8 @@ #ifndef __IF_IWM_MAC_CTXT_H__ #define __IF_IWM_MAC_CTXT_H__ +extern const uint8_t iwm_mvm_ac_to_tx_fifo[]; + extern int iwm_mvm_mac_ctxt_add(struct iwm_softc *sc, struct ieee80211vap *vap); extern int iwm_mvm_mac_ctxt_changed(struct iwm_softc *sc, struct ieee80211vap *vap); extern int iwm_mvm_mac_ctxt_remove(struct iwm_softc *sc, struct ieee80211vap *vap); Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Fri May 12 05:49:24 2017 (r318218) +++ head/sys/dev/iwm/if_iwmvar.h Fri May 12 05:50:38 2017 (r318219) @@ -377,6 +377,19 @@ struct iwm_vap { uint16_t id; uint16_t color; + + boolean_t have_wme; + /* + * QoS data from net80211, need to store this here + * as net80211 has a separate callback but we need + * to have the data for the MAC context + */ + struct { + uint16_t cw_min; + uint16_t cw_max; + uint16_t edca_txop; + uint8_t aifsn; + } queue_params[WME_NUM_AC]; }; #define IWM_VAP(_vap) ((struct iwm_vap *)(_vap)) From owner-svn-src-head@freebsd.org Fri May 12 05:51:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E57ED696C6; Fri, 12 May 2017 05:51:51 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49CBF76D; Fri, 12 May 2017 05:51:51 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C5polX056802; Fri, 12 May 2017 05:51:50 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C5poVn056801; Fri, 12 May 2017 05:51:50 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120551.v4C5poVn056801@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 05:51:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318220 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 05:51:51 -0000 Author: adrian Date: Fri May 12 05:51:50 2017 New Revision: 318220 URL: https://svnweb.freebsd.org/changeset/base/318220 Log: [iwm] No need for iwm_assoc() in AUTH->ASSOC transition. * Hence no need to keep stuff in separate iwm_assoc() function, just inline the stuff into iwm_newstate(). Obtained from: dragonflybsd.git e8f7d88e0d030f138f95ecdb7c1a729d9fb0d6ab Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Fri May 12 05:50:38 2017 (r318219) +++ head/sys/dev/iwm/if_iwm.c Fri May 12 05:51:50 2017 (r318220) @@ -359,7 +359,6 @@ static int iwm_mvm_add_int_sta_common(st static int iwm_mvm_add_aux_sta(struct iwm_softc *); static int iwm_mvm_update_quotas(struct iwm_softc *, struct iwm_vap *); static int iwm_auth(struct ieee80211vap *, struct iwm_softc *); -static int iwm_assoc(struct ieee80211vap *, struct iwm_softc *); static int iwm_release(struct iwm_softc *, struct iwm_node *); static struct ieee80211_node * iwm_node_alloc(struct ieee80211vap *, @@ -4166,9 +4165,9 @@ iwm_auth(struct ieee80211vap *vap, struc "%s: binding update cmd\n", __func__); goto out; } - if ((error = iwm_mvm_update_sta(sc, in)) != 0) { + if ((error = iwm_mvm_add_sta(sc, in)) != 0) { device_printf(sc->sc_dev, - "%s: failed to update sta\n", __func__); + "%s: failed to add sta\n", __func__); goto out; } } else { @@ -4220,28 +4219,6 @@ out: } static int -iwm_assoc(struct ieee80211vap *vap, struct iwm_softc *sc) -{ - struct iwm_node *in = IWM_NODE(vap->iv_bss); - int error; - - if ((error = iwm_mvm_update_sta(sc, in)) != 0) { - device_printf(sc->sc_dev, - "%s: failed to update STA\n", __func__); - return error; - } - - in->in_assoc = 1; - if ((error = iwm_mvm_mac_ctxt_changed(sc, vap)) != 0) { - device_printf(sc->sc_dev, - "%s: failed to update MAC\n", __func__); - return error; - } - - return 0; -} - -static int iwm_release(struct iwm_softc *sc, struct iwm_node *in) { uint32_t tfd_msk; @@ -4556,7 +4533,6 @@ iwm_newstate(struct ieee80211vap *vap, e device_printf(sc->sc_dev, "%s: could not move to auth state: %d\n", __func__, error); - break; } break; @@ -4565,13 +4541,7 @@ iwm_newstate(struct ieee80211vap *vap, e * EBS may be disabled due to previous failures reported by FW. * Reset EBS status here assuming environment has been changed. */ - sc->last_ebs_successful = TRUE; - if ((error = iwm_assoc(vap, sc)) != 0) { - device_printf(sc->sc_dev, - "%s: failed to associate: %d\n", __func__, - error); - break; - } + sc->last_ebs_successful = TRUE; break; case IEEE80211_S_RUN: @@ -4582,18 +4552,24 @@ iwm_newstate(struct ieee80211vap *vap, e .flags = IWM_CMD_SYNC, }; + in = IWM_NODE(vap->iv_bss); /* Update the association state, now we have it all */ /* (eg associd comes in at this point */ - error = iwm_assoc(vap, sc); + error = iwm_mvm_update_sta(sc, in); if (error != 0) { device_printf(sc->sc_dev, - "%s: failed to update association state: %d\n", - __func__, - error); - break; + "%s: failed to update STA\n", __func__); + IWM_UNLOCK(sc); + IEEE80211_LOCK(ic); + return error; + } + in->in_assoc = 1; + error = iwm_mvm_mac_ctxt_changed(sc, vap); + if (error != 0) { + device_printf(sc->sc_dev, + "%s: failed to update MAC: %d\n", __func__, error); } - in = IWM_NODE(vap->iv_bss); iwm_mvm_enable_beacon_filter(sc, in); iwm_mvm_power_update_mac(sc); iwm_mvm_update_quotas(sc, ivp); From owner-svn-src-head@freebsd.org Fri May 12 05:53:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A73BAD69739; Fri, 12 May 2017 05:53:29 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D84FA68; Fri, 12 May 2017 05:53:29 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C5rSHD056908; Fri, 12 May 2017 05:53:28 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C5rSOI056907; Fri, 12 May 2017 05:53:28 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120553.v4C5rSOI056907@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 05:53:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318221 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 05:53:29 -0000 Author: adrian Date: Fri May 12 05:53:28 2017 New Revision: 318221 URL: https://svnweb.freebsd.org/changeset/base/318221 Log: [iwm] Deduplicate code in iwm_auth() from an if condition. Obtained from: dragonflybsd.git 03c6e6970115727c9d39f9358e0500ab4f4634cd Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Fri May 12 05:51:50 2017 (r318220) +++ head/sys/dev/iwm/if_iwm.c Fri May 12 05:53:28 2017 (r318221) @@ -4152,24 +4152,6 @@ iwm_auth(struct ieee80211vap *vap, struc "%s: failed to update MAC\n", __func__); goto out; } - if ((error = iwm_mvm_phy_ctxt_changed(sc, &sc->sc_phyctxt[0], - in->in_ni.ni_chan, 1, 1)) != 0) { - device_printf(sc->sc_dev, - "%s: failed update phy ctxt\n", __func__); - goto out; - } - iv->phy_ctxt = &sc->sc_phyctxt[0]; - - if ((error = iwm_mvm_binding_add_vif(sc, iv)) != 0) { - device_printf(sc->sc_dev, - "%s: binding update cmd\n", __func__); - goto out; - } - if ((error = iwm_mvm_add_sta(sc, in)) != 0) { - device_printf(sc->sc_dev, - "%s: failed to add sta\n", __func__); - goto out; - } } else { if ((error = iwm_mvm_mac_ctxt_add(sc, vap)) != 0) { device_printf(sc->sc_dev, @@ -4182,25 +4164,25 @@ iwm_auth(struct ieee80211vap *vap, struc __func__); goto out; } - if ((error = iwm_mvm_phy_ctxt_changed(sc, &sc->sc_phyctxt[0], - in->in_ni.ni_chan, 1, 1)) != 0) { - device_printf(sc->sc_dev, - "%s: failed add phy ctxt!\n", __func__); - error = ETIMEDOUT; - goto out; - } - iv->phy_ctxt = &sc->sc_phyctxt[0]; + } - if ((error = iwm_mvm_binding_add_vif(sc, iv)) != 0) { - device_printf(sc->sc_dev, - "%s: binding add cmd\n", __func__); - goto out; - } - if ((error = iwm_mvm_add_sta(sc, in)) != 0) { - device_printf(sc->sc_dev, - "%s: failed to add sta\n", __func__); - goto out; - } + if ((error = iwm_mvm_phy_ctxt_changed(sc, &sc->sc_phyctxt[0], + in->in_ni.ni_chan, 1, 1)) != 0) { + device_printf(sc->sc_dev, + "%s: failed update phy ctxt\n", __func__); + goto out; + } + iv->phy_ctxt = &sc->sc_phyctxt[0]; + + if ((error = iwm_mvm_binding_add_vif(sc, iv)) != 0) { + device_printf(sc->sc_dev, + "%s: binding update cmd\n", __func__); + goto out; + } + if ((error = iwm_mvm_add_sta(sc, in)) != 0) { + device_printf(sc->sc_dev, + "%s: failed to add sta\n", __func__); + goto out; } /* From owner-svn-src-head@freebsd.org Fri May 12 06:03:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38F5ED69916; Fri, 12 May 2017 06:03:25 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 025E2EC4; Fri, 12 May 2017 06:03:24 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C63OkF061127; Fri, 12 May 2017 06:03:24 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C63Nc3061120; Fri, 12 May 2017 06:03:23 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120603.v4C63Nc3061120@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 06:03:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318222 - in head/sys: conf dev/iwm modules/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 06:03:25 -0000 Author: adrian Date: Fri May 12 06:03:23 2017 New Revision: 318222 URL: https://svnweb.freebsd.org/changeset/base/318222 Log: [iwm] Factor out firmware station handling into if_iwm_sta.c. * This adds iwm_mvm_rm_sta(), which will be used to tear down firmware state for better/cleaner iwm_newstate() handling. * Makes iwm_enable_txq() and iwm_mvm_flush_tx_path() non-static, add the declarations to if_iwm_util.h for now. Obtained from: dragonflybsd.git 85d1c6190c4c3564b1a347f253e823aa95c202b2 Added: head/sys/dev/iwm/if_iwm_sta.c (contents, props changed) head/sys/dev/iwm/if_iwm_sta.h (contents, props changed) Modified: head/sys/conf/files head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_util.h head/sys/modules/iwm/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Fri May 12 05:53:28 2017 (r318221) +++ head/sys/conf/files Fri May 12 06:03:23 2017 (r318222) @@ -1855,6 +1855,7 @@ dev/iwm/if_iwm_phy_ctxt.c optional iwm dev/iwm/if_iwm_phy_db.c optional iwm dev/iwm/if_iwm_power.c optional iwm dev/iwm/if_iwm_scan.c optional iwm +dev/iwm/if_iwm_sta.c optional iwm dev/iwm/if_iwm_time_event.c optional iwm dev/iwm/if_iwm_util.c optional iwm iwm3160fw.c optional iwm3160fw | iwmfw \ Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Fri May 12 05:53:28 2017 (r318221) +++ head/sys/dev/iwm/if_iwm.c Fri May 12 06:03:23 2017 (r318222) @@ -164,6 +164,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -265,7 +266,6 @@ static void iwm_mvm_nic_config(struct iw static int iwm_nic_rx_init(struct iwm_softc *); static int iwm_nic_tx_init(struct iwm_softc *); static int iwm_nic_init(struct iwm_softc *); -static int iwm_enable_txq(struct iwm_softc *, int, int, int); static int iwm_trans_pcie_fw_alive(struct iwm_softc *, uint32_t); static int iwm_nvm_read_chunk(struct iwm_softc *, uint16_t, uint16_t, uint16_t, uint8_t *, uint16_t *); @@ -344,19 +344,6 @@ static int iwm_tx(struct iwm_softc *, st struct ieee80211_node *, int); static int iwm_raw_xmit(struct ieee80211_node *, struct mbuf *, const struct ieee80211_bpf_params *); -static int iwm_mvm_flush_tx_path(struct iwm_softc *sc, - uint32_t tfd_msk, uint32_t flags); -static int iwm_mvm_send_add_sta_cmd_status(struct iwm_softc *, - struct iwm_mvm_add_sta_cmd *, - int *); -static int iwm_mvm_sta_send_to_fw(struct iwm_softc *, struct iwm_node *, - int); -static int iwm_mvm_add_sta(struct iwm_softc *, struct iwm_node *); -static int iwm_mvm_update_sta(struct iwm_softc *, struct iwm_node *); -static int iwm_mvm_add_int_sta_common(struct iwm_softc *, - struct iwm_int_sta *, - const uint8_t *, uint16_t, uint16_t); -static int iwm_mvm_add_aux_sta(struct iwm_softc *); static int iwm_mvm_update_quotas(struct iwm_softc *, struct iwm_vap *); static int iwm_auth(struct ieee80211vap *, struct iwm_softc *); static int iwm_release(struct iwm_softc *, struct iwm_node *); @@ -1532,7 +1519,7 @@ iwm_nic_init(struct iwm_softc *sc) return 0; } -static int +int iwm_enable_txq(struct iwm_softc *sc, int sta_id, int qid, int fifo) { if (!iwm_nic_lock(sc)) { @@ -3884,137 +3871,6 @@ iwm_mvm_flush_tx_path(struct iwm_softc * } /* - * BEGIN mvm/sta.c - */ - -static int -iwm_mvm_send_add_sta_cmd_status(struct iwm_softc *sc, - struct iwm_mvm_add_sta_cmd *cmd, int *status) -{ - return iwm_mvm_send_cmd_pdu_status(sc, IWM_ADD_STA, sizeof(*cmd), - cmd, status); -} - -/* send station add/update command to firmware */ -static int -iwm_mvm_sta_send_to_fw(struct iwm_softc *sc, struct iwm_node *in, int update) -{ - struct iwm_vap *ivp = IWM_VAP(in->in_ni.ni_vap); - struct iwm_mvm_add_sta_cmd add_sta_cmd; - int ret; - uint32_t status; - - memset(&add_sta_cmd, 0, sizeof(add_sta_cmd)); - - add_sta_cmd.sta_id = IWM_STATION_ID; - add_sta_cmd.mac_id_n_color - = htole32(IWM_FW_CMD_ID_AND_COLOR(ivp->id, ivp->color)); - if (!update) { - int ac; - for (ac = 0; ac < WME_NUM_AC; ac++) { - add_sta_cmd.tfd_queue_msk |= - htole32(1 << iwm_mvm_ac_to_tx_fifo[ac]); - } - IEEE80211_ADDR_COPY(&add_sta_cmd.addr, in->in_ni.ni_bssid); - } - add_sta_cmd.add_modify = update ? 1 : 0; - add_sta_cmd.station_flags_msk - |= htole32(IWM_STA_FLG_FAT_EN_MSK | IWM_STA_FLG_MIMO_EN_MSK); - add_sta_cmd.tid_disable_tx = htole16(0xffff); - if (update) - add_sta_cmd.modify_mask |= (IWM_STA_MODIFY_TID_DISABLE_TX); - - status = IWM_ADD_STA_SUCCESS; - ret = iwm_mvm_send_add_sta_cmd_status(sc, &add_sta_cmd, &status); - if (ret) - return ret; - - switch (status & IWM_ADD_STA_STATUS_MASK) { - case IWM_ADD_STA_SUCCESS: - break; - default: - ret = EIO; - device_printf(sc->sc_dev, "IWM_ADD_STA failed\n"); - break; - } - - return ret; -} - -static int -iwm_mvm_add_sta(struct iwm_softc *sc, struct iwm_node *in) -{ - return iwm_mvm_sta_send_to_fw(sc, in, 0); -} - -static int -iwm_mvm_update_sta(struct iwm_softc *sc, struct iwm_node *in) -{ - return iwm_mvm_sta_send_to_fw(sc, in, 1); -} - -static int -iwm_mvm_add_int_sta_common(struct iwm_softc *sc, struct iwm_int_sta *sta, - const uint8_t *addr, uint16_t mac_id, uint16_t color) -{ - struct iwm_mvm_add_sta_cmd cmd; - int ret; - uint32_t status; - - memset(&cmd, 0, sizeof(cmd)); - cmd.sta_id = sta->sta_id; - cmd.mac_id_n_color = htole32(IWM_FW_CMD_ID_AND_COLOR(mac_id, color)); - - cmd.tfd_queue_msk = htole32(sta->tfd_queue_msk); - cmd.tid_disable_tx = htole16(0xffff); - - if (addr) - IEEE80211_ADDR_COPY(cmd.addr, addr); - - ret = iwm_mvm_send_add_sta_cmd_status(sc, &cmd, &status); - if (ret) - return ret; - - switch (status & IWM_ADD_STA_STATUS_MASK) { - case IWM_ADD_STA_SUCCESS: - IWM_DPRINTF(sc, IWM_DEBUG_RESET, - "%s: Internal station added.\n", __func__); - return 0; - default: - device_printf(sc->sc_dev, - "%s: Add internal station failed, status=0x%x\n", - __func__, status); - ret = EIO; - break; - } - return ret; -} - -static int -iwm_mvm_add_aux_sta(struct iwm_softc *sc) -{ - int ret; - - sc->sc_aux_sta.sta_id = IWM_AUX_STA_ID; - sc->sc_aux_sta.tfd_queue_msk = (1 << IWM_MVM_AUX_QUEUE); - - ret = iwm_enable_txq(sc, 0, IWM_MVM_AUX_QUEUE, IWM_MVM_TX_FIFO_MCAST); - if (ret) - return ret; - - ret = iwm_mvm_add_int_sta_common(sc, - &sc->sc_aux_sta, NULL, IWM_MAC_INDEX_AUX, 0); - - if (ret) - memset(&sc->sc_aux_sta, 0, sizeof(sc->sc_aux_sta)); - return ret; -} - -/* - * END mvm/sta.c - */ - -/* * BEGIN mvm/quota.c */ Added: head/sys/dev/iwm/if_iwm_sta.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/iwm/if_iwm_sta.c Fri May 12 06:03:23 2017 (r318222) @@ -0,0 +1,378 @@ +/*- + * Based on BSD-licensed source modules in the Linux iwlwifi driver, + * which were used as the reference documentation for this implementation. + * + * Driver version we are currently based off of is + * Linux 4.7.3 (tag id d7f6728f57e3ecbb7ef34eb7d9f564d514775d75) + * + *********************************************************************** + * + * This file is provided under a dual BSD/GPLv2 license. When using or + * redistributing this file, you may do so under either license. + * + * GPL LICENSE SUMMARY + * + * Copyright(c) 2012 - 2015 Intel Corporation. All rights reserved. + * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH + * Copyright(c) 2016 Intel Deutschland GmbH + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, + * USA + * + * The full GNU General Public License is included in this distribution + * in the file called COPYING. + * + * Contact Information: + * Intel Linux Wireless + * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 + * + * BSD LICENSE + * + * Copyright(c) 2012 - 2015 Intel Corporation. All rights reserved. + * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH + * Copyright(c) 2016 Intel Deutschland GmbH + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name Intel Corporation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * 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 MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + *****************************************************************************/ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_wlan.h" +#include "opt_iwm.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * New version of ADD_STA_sta command added new fields at the end of the + * structure, so sending the size of the relevant API's structure is enough to + * support both API versions. + */ +static inline int +iwm_mvm_add_sta_cmd_size(struct iwm_softc *sc) +{ +#ifdef notyet + return iwm_mvm_has_new_rx_api(mvm) ? + sizeof(struct iwm_mvm_add_sta_cmd) : + sizeof(struct iwm_mvm_add_sta_cmd_v7); +#else + return sizeof(struct iwm_mvm_add_sta_cmd); +#endif +} + +/* send station add/update command to firmware */ +int +iwm_mvm_sta_send_to_fw(struct iwm_softc *sc, struct iwm_node *in, + boolean_t update) +{ + struct iwm_vap *ivp = IWM_VAP(in->in_ni.ni_vap); + struct iwm_mvm_add_sta_cmd add_sta_cmd = { + .sta_id = IWM_STATION_ID, + .mac_id_n_color = + htole32(IWM_FW_CMD_ID_AND_COLOR(ivp->id, ivp->color)), + .add_modify = update ? 1 : 0, + .station_flags_msk = htole32(IWM_STA_FLG_FAT_EN_MSK | + IWM_STA_FLG_MIMO_EN_MSK), + .tid_disable_tx = htole16(0xffff), + }; + int ret; + uint32_t status; + uint32_t agg_size = 0, mpdu_dens = 0; + + if (!update) { + int ac; + for (ac = 0; ac < WME_NUM_AC; ac++) { + add_sta_cmd.tfd_queue_msk |= + htole32(1 << iwm_mvm_ac_to_tx_fifo[ac]); + } + IEEE80211_ADDR_COPY(&add_sta_cmd.addr, in->in_ni.ni_bssid); + } + + add_sta_cmd.station_flags |= + htole32(agg_size << IWM_STA_FLG_MAX_AGG_SIZE_SHIFT); + add_sta_cmd.station_flags |= + htole32(mpdu_dens << IWM_STA_FLG_AGG_MPDU_DENS_SHIFT); + + status = IWM_ADD_STA_SUCCESS; + ret = iwm_mvm_send_cmd_pdu_status(sc, IWM_ADD_STA, + iwm_mvm_add_sta_cmd_size(sc), + &add_sta_cmd, &status); + if (ret) + return ret; + + switch (status & IWM_ADD_STA_STATUS_MASK) { + case IWM_ADD_STA_SUCCESS: + IWM_DPRINTF(sc, IWM_DEBUG_NODE, "IWM_ADD_STA PASSED\n"); + break; + default: + ret = EIO; + device_printf(sc->sc_dev, "IWM_ADD_STA failed\n"); + break; + } + + return ret; +} + +int +iwm_mvm_add_sta(struct iwm_softc *sc, struct iwm_node *in) +{ + return iwm_mvm_sta_send_to_fw(sc, in, FALSE); +} + +int +iwm_mvm_update_sta(struct iwm_softc *sc, struct iwm_node *in) +{ + return iwm_mvm_sta_send_to_fw(sc, in, TRUE); +} + +int +iwm_mvm_drain_sta(struct iwm_softc *sc, struct iwm_node *in, boolean_t drain) +{ + struct iwm_mvm_add_sta_cmd cmd = {}; + struct iwm_vap *ivp = IWM_VAP(in->in_ni.ni_vap); + int ret; + uint32_t status; + + cmd.mac_id_n_color = + htole32(IWM_FW_CMD_ID_AND_COLOR(ivp->id, ivp->color)); + cmd.sta_id = IWM_STATION_ID; + cmd.add_modify = IWM_STA_MODE_MODIFY; + cmd.station_flags = drain ? htole32(IWM_STA_FLG_DRAIN_FLOW) : 0; + cmd.station_flags_msk = htole32(IWM_STA_FLG_DRAIN_FLOW); + + status = IWM_ADD_STA_SUCCESS; + ret = iwm_mvm_send_cmd_pdu_status(sc, IWM_ADD_STA, + iwm_mvm_add_sta_cmd_size(sc), + &cmd, &status); + if (ret) + return ret; + + switch (status & IWM_ADD_STA_STATUS_MASK) { + case IWM_ADD_STA_SUCCESS: + IWM_DPRINTF(sc, IWM_DEBUG_NODE, + "Frames for staid %d will drained in fw\n", IWM_STATION_ID); + break; + default: + ret = EIO; + device_printf(sc->sc_dev, + "Couldn't drain frames for staid %d\n", IWM_STATION_ID); + break; + } + + return ret; +} + +/* + * Remove a station from the FW table. Before sending the command to remove + * the station validate that the station is indeed known to the driver (sanity + * only). + */ +static int +iwm_mvm_rm_sta_common(struct iwm_softc *sc) +{ + struct iwm_mvm_rm_sta_cmd rm_sta_cmd = { + .sta_id = IWM_STATION_ID, + }; + int ret; + + ret = iwm_mvm_send_cmd_pdu(sc, IWM_REMOVE_STA, 0, + sizeof(rm_sta_cmd), &rm_sta_cmd); + if (ret) { + device_printf(sc->sc_dev, + "Failed to remove station. Id=%d\n", IWM_STATION_ID); + return ret; + } + + return 0; +} + +int +iwm_mvm_rm_sta(struct iwm_softc *sc, struct ieee80211vap *vap, + struct iwm_node *in) +{ + uint32_t tfd_queue_msk = 0; + int ret; + int ac; + + ret = iwm_mvm_drain_sta(sc, in, TRUE); + if (ret) + return ret; + mbufq_drain(&sc->sc_snd); /* XXX needed ? */ + for (ac = 0; ac < WME_NUM_AC; ac++) { + tfd_queue_msk |= htole32(1 << iwm_mvm_ac_to_tx_fifo[ac]); + } + ret = iwm_mvm_flush_tx_path(sc, tfd_queue_msk, 0); + if (ret) + return ret; +#ifdef notyet /* function not yet implemented */ + ret = iwl_trans_wait_tx_queue_empty(mvm->trans, + mvm_sta->tfd_queue_msk); + if (ret) + return ret; +#endif + ret = iwm_mvm_drain_sta(sc, in, FALSE); + +#if 0 + /* if we are associated - we can't remove the AP STA now */ + if (sta->assoc) + return ret; +#endif + /* XXX wait until STA is drained */ + + ret = iwm_mvm_rm_sta_common(sc); + + return ret; +} + +static int +iwm_mvm_add_int_sta_common(struct iwm_softc *sc, struct iwm_int_sta *sta, + const uint8_t *addr, uint16_t mac_id, uint16_t color) +{ + struct iwm_mvm_add_sta_cmd cmd; + int ret; + uint32_t status; + + memset(&cmd, 0, sizeof(cmd)); + cmd.sta_id = sta->sta_id; + cmd.mac_id_n_color = htole32(IWM_FW_CMD_ID_AND_COLOR(mac_id, color)); + + cmd.tfd_queue_msk = htole32(sta->tfd_queue_msk); + cmd.tid_disable_tx = htole16(0xffff); + + if (addr) + IEEE80211_ADDR_COPY(cmd.addr, addr); + + ret = iwm_mvm_send_cmd_pdu_status(sc, IWM_ADD_STA, + iwm_mvm_add_sta_cmd_size(sc), + &cmd, &status); + if (ret) + return ret; + + switch (status & IWM_ADD_STA_STATUS_MASK) { + case IWM_ADD_STA_SUCCESS: + IWM_DPRINTF(sc, IWM_DEBUG_NODE, "Internal station added.\n"); + return 0; + default: + ret = EIO; + device_printf(sc->sc_dev, + "Add internal station failed, status=0x%x\n", status); + break; + } + return ret; +} + +int +iwm_mvm_add_aux_sta(struct iwm_softc *sc) +{ + int ret; + + sc->sc_aux_sta.sta_id = IWM_AUX_STA_ID; + sc->sc_aux_sta.tfd_queue_msk = (1 << IWM_MVM_AUX_QUEUE); + + /* Map Aux queue to fifo - needs to happen before adding Aux station */ + ret = iwm_enable_txq(sc, 0, IWM_MVM_AUX_QUEUE, IWM_MVM_TX_FIFO_MCAST); + if (ret) + return ret; + + ret = iwm_mvm_add_int_sta_common(sc, &sc->sc_aux_sta, NULL, + IWM_MAC_INDEX_AUX, 0); + + if (ret) { + memset(&sc->sc_aux_sta, 0, sizeof(sc->sc_aux_sta)); + sc->sc_aux_sta.sta_id = IWM_MVM_STATION_COUNT; + } + return ret; +} + +void iwm_mvm_del_aux_sta(struct iwm_softc *sc) +{ + memset(&sc->sc_aux_sta, 0, sizeof(sc->sc_aux_sta)); + sc->sc_aux_sta.sta_id = IWM_MVM_STATION_COUNT; +} Added: head/sys/dev/iwm/if_iwm_sta.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/iwm/if_iwm_sta.h Fri May 12 06:03:23 2017 (r318222) @@ -0,0 +1,222 @@ +/*- + * Based on BSD-licensed source modules in the Linux iwlwifi driver, + * which were used as the reference documentation for this implementation. + * + * Driver version we are currently based off of is + * Linux 4.7.3 (tag id d7f6728f57e3ecbb7ef34eb7d9f564d514775d75) + * + *********************************************************************** + * + * + * This file is provided under a dual BSD/GPLv2 license. When using or + * redistributing this file, you may do so under either license. + * + * GPL LICENSE SUMMARY + * + * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. + * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH + * Copyright(c) 2015 - 2016 Intel Deutschland GmbH + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, + * USA + * + * The full GNU General Public License is included in this distribution + * in the file called COPYING. + * + * Contact Information: + * Intel Linux Wireless + * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 + * + * BSD LICENSE + * + * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. + * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH + * Copyright(c) 2015 - 2016 Intel Deutschland GmbH + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name Intel Corporation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * 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 MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + *****************************************************************************/ + +/* $FreeBSD$ */ + +#ifndef __IF_IWM_STA_H__ +#define __IF_IWM_STA_H__ + +/** + * DOC: station table - introduction + * + * The station table is a list of data structure that reprensent the stations. + * In STA/P2P client mode, the driver will hold one station for the AP/ GO. + * In GO/AP mode, the driver will have as many stations as associated clients. + * All these stations are reflected in the fw's station table. The driver + * keeps the fw's station table up to date with the ADD_STA command. Stations + * can be removed by the REMOVE_STA command. + * + * All the data related to a station is held in the structure %iwl_mvm_sta + * which is embed in the mac80211's %ieee80211_sta (in the drv_priv) area. + * This data includes the index of the station in the fw, per tid information + * (sequence numbers, Block-ack state machine, etc...). The stations are + * created and deleted by the %sta_state callback from %ieee80211_ops. + * + * The driver holds a map: %fw_id_to_mac_id that allows to fetch a + * %ieee80211_sta (and the %iwl_mvm_sta embedded into it) based on a fw + * station index. That way, the driver is able to get the tid related data in + * O(1) in time sensitive paths (Tx / Tx response / BA notification). These + * paths are triggered by the fw, and the driver needs to get a pointer to the + * %ieee80211 structure. This map helps to get that pointer quickly. + */ + +/** + * DOC: station table - locking + * + * As stated before, the station is created / deleted by mac80211's %sta_state + * callback from %ieee80211_ops which can sleep. The next paragraph explains + * the locking of a single stations, the next ones relates to the station + * table. + * + * The station holds the sequence number per tid. So this data needs to be + * accessed in the Tx path (which is softIRQ). It also holds the Block-Ack + * information (the state machine / and the logic that checks if the queues + * were drained), so it also needs to be accessible from the Tx response flow. + * In short, the station needs to be access from sleepable context as well as + * from tasklets, so the station itself needs a spinlock. + * + * The writers of %fw_id_to_mac_id map are serialized by the global mutex of + * the mvm op_mode. This is possible since %sta_state can sleep. + * The pointers in this map are RCU protected, hence we won't replace the + * station while we have Tx / Tx response / BA notification running. + * + * If a station is deleted while it still has packets in its A-MPDU queues, + * then the reclaim flow will notice that there is no station in the map for + * sta_id and it will dump the responses. + */ + +/** + * DOC: station table - internal stations + * + * The FW needs a few internal stations that are not reflected in + * mac80211, such as broadcast station in AP / GO mode, or AUX sta for + * scanning and P2P device (during the GO negotiation). + * For these kind of stations we have %iwl_mvm_int_sta struct which holds the + * data relevant for them from both %iwl_mvm_sta and %ieee80211_sta. + * Usually the data for these stations is static, so no locking is required, + * and no TID data as this is also not needed. + * One thing to note, is that these stations have an ID in the fw, but not + * in mac80211. In order to "reserve" them a sta_id in %fw_id_to_mac_id + * we fill ERR_PTR(EINVAL) in this mapping and all other dereferencing of + * pointers from this mapping need to check that the value is not error + * or NULL. + * + * Currently there is only one auxiliary station for scanning, initialized + * on init. + */ + +/** + * DOC: station table - AP Station in STA mode + * + * %iwl_mvm_vif includes the index of the AP station in the fw's STA table: + * %ap_sta_id. To get the point to the corresponding %ieee80211_sta, + * &fw_id_to_mac_id can be used. Due to the way the fw works, we must not remove + * the AP station from the fw before setting the MAC context as unassociated. + * Hence, %fw_id_to_mac_id[%ap_sta_id] will be NULLed when the AP station is + * removed by mac80211, but the station won't be removed in the fw until the + * VIF is set as unassociated. Then, %ap_sta_id will be invalidated. + */ + +/** + * DOC: station table - Drain vs. Flush + * + * Flush means that all the frames in the SCD queue are dumped regardless the + * station to which they were sent. We do that when we disassociate and before + * we remove the STA of the AP. The flush can be done synchronously against the + * fw. + * Drain means that the fw will drop all the frames sent to a specific station. + * This is useful when a client (if we are IBSS / GO or AP) disassociates. In + * that case, we need to drain all the frames for that client from the AC queues + * that are shared with the other clients. Only then, we can remove the STA in + * the fw. In order to do so, we track the non-AMPDU packets for each station. + * If mac80211 removes a STA and if it still has non-AMPDU packets pending in + * the queues, we mark this station as %EBUSY in %fw_id_to_mac_id, and drop all + * the frames for this STA (%iwl_mvm_rm_sta). When the last frame is dropped + * (we know about it with its Tx response), we remove the station in fw and set + * it as %NULL in %fw_id_to_mac_id: this is the purpose of + * %iwl_mvm_sta_drained_wk. + */ + +/** + * DOC: station table - fw restart + * + * When the fw asserts, or we have any other issue that requires to reset the + * driver, we require mac80211 to reconfigure the driver. Since the private + * data of the stations is embed in mac80211's %ieee80211_sta, that data will + * not be zeroed and needs to be reinitialized manually. + * %IWL_MVM_STATUS_IN_HW_RESTART is set during restart and that will hint us + * that we must not allocate a new sta_id but reuse the previous one. This + * means that the stations being re-added after the reset will have the same + * place in the fw as before the reset. We do need to zero the %fw_id_to_mac_id + * map, since the stations aren't in the fw any more. Internal stations that + * are not added by mac80211 will be re-added in the init flow that is called + * after the restart: mac80211 call's %iwl_mvm_mac_start which calls to + * %iwl_mvm_up. + */ + +/** + * Send the STA info to the FW. + * + * @sc: the iwm_softc* to use + * @sta: the STA + * @update: this is true if the FW is being updated about a STA it already knows + * about. Otherwise (if this is a new STA), this should be false. + * @flags: if update==true, this marks what is being changed via ORs of values + * from enum iwm_sta_modify_flag. Otherwise, this is ignored. + */ +extern int iwm_mvm_sta_send_to_fw(struct iwm_softc *sc, struct iwm_node *in, + boolean_t update); +extern int iwm_mvm_add_sta(struct iwm_softc *sc, struct iwm_node *in); +extern int iwm_mvm_update_sta(struct iwm_softc *sc, struct iwm_node *in); +extern int iwm_mvm_rm_sta(struct iwm_softc *sc, struct ieee80211vap *vap, + struct iwm_node *in); + +extern int iwm_mvm_add_aux_sta(struct iwm_softc *sc); +extern void iwm_mvm_del_aux_sta(struct iwm_softc *sc); + +extern int iwm_mvm_drain_sta(struct iwm_softc *sc, struct iwm_node *in, + boolean_t drain); + +#endif /* __IF_IWM_STA_H__ */ Modified: head/sys/dev/iwm/if_iwm_util.h ============================================================================== --- head/sys/dev/iwm/if_iwm_util.h Fri May 12 05:53:28 2017 (r318221) +++ head/sys/dev/iwm/if_iwm_util.h Fri May 12 06:03:23 2017 (r318222) @@ -123,6 +123,9 @@ extern void iwm_dma_contig_free(struct i extern boolean_t iwm_mvm_rx_diversity_allowed(struct iwm_softc *sc); extern uint8_t iwm_ridx2rate(struct ieee80211_rateset *rs, int ridx); +extern int iwm_enable_txq(struct iwm_softc *sc, int sta_id, int qid, int fifo); +extern int iwm_mvm_flush_tx_path(struct iwm_softc *sc, uint32_t tfd_msk, + uint32_t flags); static inline uint8_t iwm_mvm_get_valid_tx_ant(struct iwm_softc *sc) Modified: head/sys/modules/iwm/Makefile ============================================================================== --- head/sys/modules/iwm/Makefile Fri May 12 05:53:28 2017 (r318221) +++ head/sys/modules/iwm/Makefile Fri May 12 06:03:23 2017 (r318222) @@ -7,10 +7,10 @@ KMOD= if_iwm SRCS= if_iwm.c if_iwm_binding.c if_iwm_util.c if_iwm_phy_db.c SRCS+= if_iwm_mac_ctxt.c if_iwm_phy_ctxt.c if_iwm_time_event.c SRCS+= if_iwm_power.c if_iwm_scan.c if_iwm_led.c if_iwm_notif_wait.c -SRCS+= if_iwm_7000.c if_iwm_8000.c if_iwm_fw.c +SRCS+= if_iwm_7000.c if_iwm_8000.c if_iwm_fw.c if_iwm_sta.c # bus layer SRCS+= if_iwm_pcie_trans.c -SRCS+= device_if.h bus_if.h pci_if.h opt_wlan.h +SRCS+= device_if.h bus_if.h pci_if.h opt_wlan.h opt_iwm.h CFLAGS+= -DIWM_DEBUG From owner-svn-src-head@freebsd.org Fri May 12 06:05:35 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6AB6D699D9; Fri, 12 May 2017 06:05:35 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C03D1032; Fri, 12 May 2017 06:05:35 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C65YuY061288; Fri, 12 May 2017 06:05:34 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C65YZD061287; Fri, 12 May 2017 06:05:34 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120605.v4C65YZD061287@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 06:05:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318223 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 06:05:35 -0000 Author: adrian Date: Fri May 12 06:05:34 2017 New Revision: 318223 URL: https://svnweb.freebsd.org/changeset/base/318223 Log: [iwm] Handle AUTH->SCAN/INIT and ASSOC->SCAN/INIT better * Tear down the relevant firmware state (i.e. the station, the vif binding) in these transition cases. * Before this case would leave the firmware state lying around, resulting in errors and firmware panics in the subsequent association attempts. Obtained from: dragonflybsd.git 94b501399fde6368ae388a669c95b099a6e66e93 Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Fri May 12 06:03:23 2017 (r318222) +++ head/sys/dev/iwm/if_iwm.c Fri May 12 06:05:34 2017 (r318223) @@ -4364,6 +4364,39 @@ iwm_newstate(struct ieee80211vap *vap, e switch (nstate) { case IEEE80211_S_INIT: + case IEEE80211_S_SCAN: + if (vap->iv_state == IEEE80211_S_AUTH || + vap->iv_state == IEEE80211_S_ASSOC) { + int myerr; + IWM_UNLOCK(sc); + IEEE80211_LOCK(ic); + myerr = ivp->iv_newstate(vap, nstate, arg); + IEEE80211_UNLOCK(ic); + IWM_LOCK(sc); + in = IWM_NODE(vap->iv_bss); + error = iwm_mvm_rm_sta(sc, vap, in); + if (error) { + device_printf(sc->sc_dev, + "%s: Failed to remove station: %d\n", + __func__, error); + } + error = iwm_mvm_mac_ctxt_changed(sc, vap); + if (error) { + device_printf(sc->sc_dev, + "%s: Failed to change mac context: %d\n", + __func__, error); + } + error = iwm_mvm_binding_remove_vif(sc, ivp); + if (error) { + device_printf(sc->sc_dev, + "%s: Failed to remove channel ctx: %d\n", + __func__, error); + } + ivp->phy_ctxt = NULL; + IWM_UNLOCK(sc); + IEEE80211_LOCK(ic); + return myerr; + } break; case IEEE80211_S_AUTH: From owner-svn-src-head@freebsd.org Fri May 12 06:16:12 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6A80D69CFD; Fri, 12 May 2017 06:16:12 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7680015C6; Fri, 12 May 2017 06:16:12 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C6GB4t065379; Fri, 12 May 2017 06:16:11 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C6GB7i065378; Fri, 12 May 2017 06:16:11 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120616.v4C6GB7i065378@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 06:16:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318224 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 06:16:12 -0000 Author: adrian Date: Fri May 12 06:16:11 2017 New Revision: 318224 URL: https://svnweb.freebsd.org/changeset/base/318224 Log: [iwm] Refuse connection to APs with beacon interval < 16. Obtained from: dragonflybsd.git aba448de727e9b122adadeb36fd00a8ad6018d4f Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Fri May 12 06:05:34 2017 (r318223) +++ head/sys/dev/iwm/if_iwm.c Fri May 12 06:16:11 2017 (r318224) @@ -3976,6 +3976,21 @@ iwm_auth(struct ieee80211vap *vap, struc in->in_assoc = 0; + /* + * Firmware bug - it'll crash if the beacon interval is less + * than 16. We can't avoid connecting at all, so refuse the + * station state change, this will cause net80211 to abandon + * attempts to connect to this AP, and eventually wpa_s will + * blacklist the AP... + */ + if (ni->ni_intval < 16) { + device_printf(sc->sc_dev, + "AP %s beacon interval is %d, refusing due to firmware bug!\n", + ether_sprintf(ni->ni_bssid), ni->ni_intval); + error = EINVAL; + goto out; + } + error = iwm_mvm_sf_config(sc, IWM_SF_FULL_ON); if (error != 0) return error; From owner-svn-src-head@freebsd.org Fri May 12 06:21:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EEADAD69DDA; Fri, 12 May 2017 06:21:04 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4F1617CA; Fri, 12 May 2017 06:21:04 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C6L32v066301; Fri, 12 May 2017 06:21:03 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C6L3gi066280; Fri, 12 May 2017 06:21:03 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120621.v4C6L3gi066280@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 06:21:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318225 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 06:21:05 -0000 Author: adrian Date: Fri May 12 06:21:03 2017 New Revision: 318225 URL: https://svnweb.freebsd.org/changeset/base/318225 Log: [iwm] Already call iwm_mvm_power_update_mac() during SCAN<->AUTH paths. * Otherwise we would never update powersaving settings until we complete an association, after the first authentication attempt. * This corresponds to what Linux iwlwifi seems to do. Obtained from: dragonflybsd.git aa128dc02a17c2e616232ef0fa997121e969c995 Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Fri May 12 06:16:11 2017 (r318224) +++ head/sys/dev/iwm/if_iwm.c Fri May 12 06:21:03 2017 (r318225) @@ -4029,12 +4029,6 @@ iwm_auth(struct ieee80211vap *vap, struc "%s: failed to add MAC\n", __func__); goto out; } - if ((error = iwm_mvm_power_update_mac(sc)) != 0) { - device_printf(sc->sc_dev, - "%s: failed to update power management\n", - __func__); - goto out; - } } if ((error = iwm_mvm_phy_ctxt_changed(sc, &sc->sc_phyctxt[0], @@ -4050,6 +4044,12 @@ iwm_auth(struct ieee80211vap *vap, struc "%s: binding update cmd\n", __func__); goto out; } + if ((error = iwm_mvm_power_update_mac(sc)) != 0) { + device_printf(sc->sc_dev, + "%s: failed to update power management\n", + __func__); + goto out; + } if ((error = iwm_mvm_add_sta(sc, in)) != 0) { device_printf(sc->sc_dev, "%s: failed to add sta\n", __func__); @@ -4408,6 +4408,12 @@ iwm_newstate(struct ieee80211vap *vap, e __func__, error); } ivp->phy_ctxt = NULL; + error = iwm_mvm_power_update_mac(sc); + if (error != 0) { + device_printf(sc->sc_dev, + "%s: failed to update power management\n", + __func__); + } IWM_UNLOCK(sc); IEEE80211_LOCK(ic); return myerr; From owner-svn-src-head@freebsd.org Fri May 12 06:30:08 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E958D69FB5; Fri, 12 May 2017 06:30:08 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5B3F1BE1; Fri, 12 May 2017 06:30:07 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C6U6uG069573; Fri, 12 May 2017 06:30:06 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C6U6F9069570; Fri, 12 May 2017 06:30:06 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120630.v4C6U6F9069570@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 06:30:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318226 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 06:30:08 -0000 Author: adrian Date: Fri May 12 06:30:06 2017 New Revision: 318226 URL: https://svnweb.freebsd.org/changeset/base/318226 Log: [iwm] Switch arguments from iwm_node* to iwm_vap* in if_iwm_power.c. * Power management handling is per-vap, not per-node, so we should pass the iwm_vap in these arguments. Obtained from: dragonflybsd.git 62a4e7957a736b4de38938b02fa7eb9b45bc5d0d Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_power.c head/sys/dev/iwm/if_iwm_power.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Fri May 12 06:21:03 2017 (r318225) +++ head/sys/dev/iwm/if_iwm.c Fri May 12 06:30:06 2017 (r318226) @@ -4462,7 +4462,7 @@ iwm_newstate(struct ieee80211vap *vap, e "%s: failed to update MAC: %d\n", __func__, error); } - iwm_mvm_enable_beacon_filter(sc, in); + iwm_mvm_enable_beacon_filter(sc, ivp); iwm_mvm_power_update_mac(sc); iwm_mvm_update_quotas(sc, ivp); iwm_setrates(sc, in); Modified: head/sys/dev/iwm/if_iwm_power.c ============================================================================== --- head/sys/dev/iwm/if_iwm_power.c Fri May 12 06:21:03 2017 (r318225) +++ head/sys/dev/iwm/if_iwm_power.c Fri May 12 06:30:06 2017 (r318226) @@ -201,7 +201,7 @@ iwm_mvm_beacon_filter_send_cmd(struct iw static void iwm_mvm_beacon_filter_set_cqm_params(struct iwm_softc *sc, - struct iwm_node *in, struct iwm_beacon_filter_cmd *cmd) + struct iwm_vap *ivp, struct iwm_beacon_filter_cmd *cmd) { cmd->ba_enable_beacon_abort = htole32(sc->sc_bf.ba_enabled); } @@ -278,15 +278,14 @@ iwm_mvm_power_config_skip_dtim(struct iw } static void -iwm_mvm_power_build_cmd(struct iwm_softc *sc, struct iwm_node *in, +iwm_mvm_power_build_cmd(struct iwm_softc *sc, struct iwm_vap *ivp, struct iwm_mac_power_cmd *cmd) { - struct ieee80211_node *ni = &in->in_ni; + struct ieee80211_node *ni = ivp->iv_vap.iv_bss; int dtimper, dtimper_msec; int keep_alive; struct ieee80211com *ic = &sc->sc_ic; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); - struct iwm_vap *ivp = IWM_VAP(vap); cmd->id_and_color = htole32(IWM_FW_CMD_ID_AND_COLOR(ivp->id, ivp->color)); @@ -319,11 +318,11 @@ iwm_mvm_power_build_cmd(struct iwm_softc } static int -iwm_mvm_power_send_cmd(struct iwm_softc *sc, struct iwm_node *in) +iwm_mvm_power_send_cmd(struct iwm_softc *sc, struct iwm_vap *ivp) { struct iwm_mac_power_cmd cmd = {}; - iwm_mvm_power_build_cmd(sc, in, &cmd); + iwm_mvm_power_build_cmd(sc, ivp, &cmd); iwm_mvm_power_log(sc, &cmd); return iwm_mvm_send_cmd_pdu(sc, IWM_MAC_PM_POWER_TABLE, 0, @@ -331,12 +330,12 @@ iwm_mvm_power_send_cmd(struct iwm_softc } static int -_iwm_mvm_enable_beacon_filter(struct iwm_softc *sc, struct iwm_node *in, +_iwm_mvm_enable_beacon_filter(struct iwm_softc *sc, struct iwm_vap *ivp, struct iwm_beacon_filter_cmd *cmd) { int ret; - iwm_mvm_beacon_filter_set_cqm_params(sc, in, cmd); + iwm_mvm_beacon_filter_set_cqm_params(sc, ivp, cmd); ret = iwm_mvm_beacon_filter_send_cmd(sc, cmd); if (!ret) @@ -346,14 +345,14 @@ _iwm_mvm_enable_beacon_filter(struct iwm } int -iwm_mvm_enable_beacon_filter(struct iwm_softc *sc, struct iwm_node *in) +iwm_mvm_enable_beacon_filter(struct iwm_softc *sc, struct iwm_vap *ivp) { struct iwm_beacon_filter_cmd cmd = { IWM_BF_CMD_CONFIG_DEFAULTS, .bf_enable_beacon_filter = htole32(1), }; - return _iwm_mvm_enable_beacon_filter(sc, in, &cmd); + return _iwm_mvm_enable_beacon_filter(sc, ivp, &cmd); } int @@ -398,7 +397,7 @@ iwm_mvm_power_set_ps(struct iwm_softc *s } static int -iwm_mvm_power_set_ba(struct iwm_softc *sc, struct iwm_node *in) +iwm_mvm_power_set_ba(struct iwm_softc *sc, struct iwm_vap *ivp) { struct iwm_beacon_filter_cmd cmd = { IWM_BF_CMD_CONFIG_DEFAULTS, @@ -410,7 +409,7 @@ iwm_mvm_power_set_ba(struct iwm_softc *s sc->sc_bf.ba_enabled = !sc->sc_ps_disabled; - return _iwm_mvm_enable_beacon_filter(sc, in, &cmd); + return _iwm_mvm_enable_beacon_filter(sc, ivp, &cmd); } int @@ -424,7 +423,7 @@ iwm_mvm_power_update_ps(struct iwm_softc return ret; if (vap != NULL) - return iwm_mvm_power_set_ba(sc, IWM_NODE(vap->iv_bss)); + return iwm_mvm_power_set_ba(sc, IWM_VAP(vap)); return 0; } @@ -440,13 +439,13 @@ iwm_mvm_power_update_mac(struct iwm_soft return ret; if (vap != NULL) { - ret = iwm_mvm_power_send_cmd(sc, IWM_NODE(vap->iv_bss)); + ret = iwm_mvm_power_send_cmd(sc, IWM_VAP(vap)); if (ret) return ret; } if (vap != NULL) - return iwm_mvm_power_set_ba(sc, IWM_NODE(vap->iv_bss)); + return iwm_mvm_power_set_ba(sc, IWM_VAP(vap)); return 0; } Modified: head/sys/dev/iwm/if_iwm_power.h ============================================================================== --- head/sys/dev/iwm/if_iwm_power.h Fri May 12 06:21:03 2017 (r318225) +++ head/sys/dev/iwm/if_iwm_power.h Fri May 12 06:30:06 2017 (r318226) @@ -94,7 +94,7 @@ extern int iwm_mvm_power_update_device(s extern int iwm_mvm_power_update_mac(struct iwm_softc *sc); extern int iwm_mvm_power_update_ps(struct iwm_softc *sc); extern int iwm_mvm_enable_beacon_filter(struct iwm_softc *sc, - struct iwm_node *in); + struct iwm_vap *ivp); extern int iwm_mvm_disable_beacon_filter(struct iwm_softc *sc); #endif /* __IF_IWM_POWER_H__ */ From owner-svn-src-head@freebsd.org Fri May 12 06:30:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C837D69022; Fri, 12 May 2017 06:30:52 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F2B061D5E; Fri, 12 May 2017 06:30:51 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C6Upgm071930; Fri, 12 May 2017 06:30:51 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C6Upt1071929; Fri, 12 May 2017 06:30:51 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120630.v4C6Upt1071929@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 06:30:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318227 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 06:30:52 -0000 Author: adrian Date: Fri May 12 06:30:50 2017 New Revision: 318227 URL: https://svnweb.freebsd.org/changeset/base/318227 Log: [iwm] Clean up if_iwm_power.c a bit. Fix iwm_power_scheme debug print. Obtained from: dragonflybsd.git 52c3adbee676d8558065618e5ad694ea5c6697e0 Modified: head/sys/dev/iwm/if_iwm_power.c Modified: head/sys/dev/iwm/if_iwm_power.c ============================================================================== --- head/sys/dev/iwm/if_iwm_power.c Fri May 12 06:30:06 2017 (r318226) +++ head/sys/dev/iwm/if_iwm_power.c Fri May 12 06:30:50 2017 (r318227) @@ -212,7 +212,7 @@ iwm_mvm_power_log(struct iwm_softc *sc, IWM_DPRINTF(sc, IWM_DEBUG_PWRSAVE | IWM_DEBUG_CMD, "Sending power table command on mac id 0x%X for " "power level %d, flags = 0x%X\n", - cmd->id_and_color, IWM_POWER_SCHEME_CAM, le16toh(cmd->flags)); + cmd->id_and_color, iwm_power_scheme, le16toh(cmd->flags)); IWM_DPRINTF(sc, IWM_DEBUG_PWRSAVE | IWM_DEBUG_CMD, "Keep alive = %u sec\n", le16toh(cmd->keep_alive_seconds)); @@ -281,11 +281,10 @@ static void iwm_mvm_power_build_cmd(struct iwm_softc *sc, struct iwm_vap *ivp, struct iwm_mac_power_cmd *cmd) { - struct ieee80211_node *ni = ivp->iv_vap.iv_bss; + struct ieee80211vap *vap = &ivp->iv_vap; + struct ieee80211_node *ni = vap->iv_bss; int dtimper, dtimper_msec; int keep_alive; - struct ieee80211com *ic = &sc->sc_ic; - struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); cmd->id_and_color = htole32(IWM_FW_CMD_ID_AND_COLOR(ivp->id, ivp->color)); From owner-svn-src-head@freebsd.org Fri May 12 06:31:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D99AD691D1; Fri, 12 May 2017 06:31:59 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 484251FF4; Fri, 12 May 2017 06:31:59 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C6VwE1073414; Fri, 12 May 2017 06:31:58 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C6VwJk073411; Fri, 12 May 2017 06:31:58 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120631.v4C6VwJk073411@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 06:31:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318228 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 06:31:59 -0000 Author: adrian Date: Fri May 12 06:31:57 2017 New Revision: 318228 URL: https://svnweb.freebsd.org/changeset/base/318228 Log: [iwm] Make powersaving more similar to Linux iwlwifi behaviour. * Add a per-vap ps_disabled flag, and use it for a workaround which fixes an association issue when powersaving is enabled. * Compute flag that should correpsond to the mvmif->bss_conf.ps flag in Linux's iwlwifi (e.g. this disallows powersaving when not associated yet). Inspired-By: Linux iwlwifi Obtained from: dragonflybsd.git dc2e69bdfe8c9d7049c8a28da0adffbfbc6de5c0 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_power.c head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Fri May 12 06:30:50 2017 (r318227) +++ head/sys/dev/iwm/if_iwm.c Fri May 12 06:31:57 2017 (r318228) @@ -4044,7 +4044,15 @@ iwm_auth(struct ieee80211vap *vap, struc "%s: binding update cmd\n", __func__); goto out; } - if ((error = iwm_mvm_power_update_mac(sc)) != 0) { + /* + * Authentication becomes unreliable when powersaving is left enabled + * here. Powersaving will be activated again when association has + * finished or is aborted. + */ + iv->ps_disabled = TRUE; + error = iwm_mvm_power_update_mac(sc); + iv->ps_disabled = FALSE; + if (error != 0) { device_printf(sc->sc_dev, "%s: failed to update power management\n", __func__); @@ -6277,6 +6285,7 @@ iwm_vap_create(struct ieee80211com *ic, ivp->color = IWM_DEFAULT_COLOR; ivp->have_wme = FALSE; + ivp->ps_disabled = FALSE; ieee80211_ratectl_init(vap); /* Complete setup. */ Modified: head/sys/dev/iwm/if_iwm_power.c ============================================================================== --- head/sys/dev/iwm/if_iwm_power.c Fri May 12 06:30:50 2017 (r318227) +++ head/sys/dev/iwm/if_iwm_power.c Fri May 12 06:31:57 2017 (r318228) @@ -285,6 +285,7 @@ iwm_mvm_power_build_cmd(struct iwm_softc struct ieee80211_node *ni = vap->iv_bss; int dtimper, dtimper_msec; int keep_alive; + boolean_t bss_conf_ps = FALSE; cmd->id_and_color = htole32(IWM_FW_CMD_ID_AND_COLOR(ivp->id, ivp->color)); @@ -306,6 +307,14 @@ iwm_mvm_power_build_cmd(struct iwm_softc return; cmd->flags |= htole16(IWM_POWER_FLAGS_POWER_SAVE_ENA_MSK); + + if (IWM_NODE(ni)->in_assoc && + (vap->iv_flags & IEEE80211_F_PMGTON) != 0) { + bss_conf_ps = TRUE; + } + if (!bss_conf_ps) + return; + cmd->flags |= htole16(IWM_POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK); iwm_mvm_power_config_skip_dtim(sc, cmd); @@ -370,15 +379,18 @@ iwm_mvm_disable_beacon_filter(struct iwm static int iwm_mvm_power_set_ps(struct iwm_softc *sc) { - struct ieee80211vap *vap = TAILQ_FIRST(&sc->sc_ic.ic_vaps); + struct ieee80211vap *vap; boolean_t disable_ps; int ret; /* disable PS if CAM */ disable_ps = (iwm_power_scheme == IWM_POWER_SCHEME_CAM); /* ...or if any of the vifs require PS to be off */ - if (vap != NULL && (vap->iv_flags & IEEE80211_F_PMGTON) == 0) - disable_ps = TRUE; + TAILQ_FOREACH(vap, &sc->sc_ic.ic_vaps, iv_next) { + struct iwm_vap *ivp = IWM_VAP(vap); + if (ivp->phy_ctxt != NULL && ivp->ps_disabled) + disable_ps = TRUE; + } /* update device power state if it has changed */ if (sc->sc_ps_disabled != disable_ps) { @@ -402,11 +414,18 @@ iwm_mvm_power_set_ba(struct iwm_softc *s IWM_BF_CMD_CONFIG_DEFAULTS, .bf_enable_beacon_filter = htole32(1), }; + struct ieee80211vap *vap = &ivp->iv_vap; + struct ieee80211_node *ni = vap->iv_bss; + boolean_t bss_conf_ps = FALSE; if (!sc->sc_bf.bf_enabled) return 0; - sc->sc_bf.ba_enabled = !sc->sc_ps_disabled; + if (ni != NULL && IWM_NODE(ni)->in_assoc && + (vap->iv_flags & IEEE80211_F_PMGTON) != 0) { + bss_conf_ps = TRUE; + } + sc->sc_bf.ba_enabled = !sc->sc_ps_disabled && bss_conf_ps; return _iwm_mvm_enable_beacon_filter(sc, ivp, &cmd); } Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Fri May 12 06:30:50 2017 (r318227) +++ head/sys/dev/iwm/if_iwmvar.h Fri May 12 06:31:57 2017 (r318228) @@ -390,6 +390,9 @@ struct iwm_vap { uint16_t edca_txop; uint8_t aifsn; } queue_params[WME_NUM_AC]; + + /* indicates that this interface requires PS to be disabled */ + boolean_t ps_disabled; }; #define IWM_VAP(_vap) ((struct iwm_vap *)(_vap)) From owner-svn-src-head@freebsd.org Fri May 12 06:33:08 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D060FD6925F; Fri, 12 May 2017 06:33:08 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ABB29383; Fri, 12 May 2017 06:33:08 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C6X7lk073525; Fri, 12 May 2017 06:33:07 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C6X7cK073522; Fri, 12 May 2017 06:33:07 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120633.v4C6X7cK073522@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 06:33:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318229 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 06:33:08 -0000 Author: adrian Date: Fri May 12 06:33:07 2017 New Revision: 318229 URL: https://svnweb.freebsd.org/changeset/base/318229 Log: [iwm] Adjust if_iwm_sta.h prototypes, don't pass iwm_node to rm_sta(). * Since a RUN -> INIT/SCAN transition seems to immediately destroy the ieee80211_node for the AP, we can't read the in_assoc value from there. Instead just directly pass that information via a boolean_t argument. * Adds iwm_mvm_rm_sta_id() function, which just unconditionally removes the station from the firmware. * The iwm_mvm_rm_sta() function shouldn't actually remove the station from firmware when we are still associated (i.e. during a RUN -> INIT/SCAN transition). * So when disassociating we will first call iwm_mvm_rm_sta() to drain the queues/fifos. Later during disassociation we will then use iwm_mvm_rm_sta_id() to actually remove the station. Inspired-By: Linux iwlwifi Obtained from: dragonflybsd.git 81b3c1fe9122fa22f33d97103039cc375f656231 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_sta.c head/sys/dev/iwm/if_iwm_sta.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Fri May 12 06:31:57 2017 (r318228) +++ head/sys/dev/iwm/if_iwm.c Fri May 12 06:33:07 2017 (r318229) @@ -4396,8 +4396,7 @@ iwm_newstate(struct ieee80211vap *vap, e myerr = ivp->iv_newstate(vap, nstate, arg); IEEE80211_UNLOCK(ic); IWM_LOCK(sc); - in = IWM_NODE(vap->iv_bss); - error = iwm_mvm_rm_sta(sc, vap, in); + error = iwm_mvm_rm_sta(sc, vap, FALSE); if (error) { device_printf(sc->sc_dev, "%s: Failed to remove station: %d\n", Modified: head/sys/dev/iwm/if_iwm_sta.c ============================================================================== --- head/sys/dev/iwm/if_iwm_sta.c Fri May 12 06:31:57 2017 (r318228) +++ head/sys/dev/iwm/if_iwm_sta.c Fri May 12 06:33:07 2017 (r318229) @@ -213,10 +213,9 @@ iwm_mvm_update_sta(struct iwm_softc *sc, } int -iwm_mvm_drain_sta(struct iwm_softc *sc, struct iwm_node *in, boolean_t drain) +iwm_mvm_drain_sta(struct iwm_softc *sc, struct iwm_vap *ivp, boolean_t drain) { struct iwm_mvm_add_sta_cmd cmd = {}; - struct iwm_vap *ivp = IWM_VAP(in->in_ni.ni_vap); int ret; uint32_t status; @@ -275,13 +274,13 @@ iwm_mvm_rm_sta_common(struct iwm_softc * int iwm_mvm_rm_sta(struct iwm_softc *sc, struct ieee80211vap *vap, - struct iwm_node *in) + boolean_t is_assoc) { uint32_t tfd_queue_msk = 0; int ret; int ac; - ret = iwm_mvm_drain_sta(sc, in, TRUE); + ret = iwm_mvm_drain_sta(sc, IWM_VAP(vap), TRUE); if (ret) return ret; mbufq_drain(&sc->sc_snd); /* XXX needed ? */ @@ -297,13 +296,12 @@ iwm_mvm_rm_sta(struct iwm_softc *sc, str if (ret) return ret; #endif - ret = iwm_mvm_drain_sta(sc, in, FALSE); + ret = iwm_mvm_drain_sta(sc, IWM_VAP(vap), FALSE); -#if 0 /* if we are associated - we can't remove the AP STA now */ - if (sta->assoc) + if (is_assoc) return ret; -#endif + /* XXX wait until STA is drained */ ret = iwm_mvm_rm_sta_common(sc); @@ -311,6 +309,14 @@ iwm_mvm_rm_sta(struct iwm_softc *sc, str return ret; } +int +iwm_mvm_rm_sta_id(struct iwm_softc *sc, struct ieee80211vap *vap) +{ + /* XXX wait until STA is drained */ + + return iwm_mvm_rm_sta_common(sc); +} + static int iwm_mvm_add_int_sta_common(struct iwm_softc *sc, struct iwm_int_sta *sta, const uint8_t *addr, uint16_t mac_id, uint16_t color) Modified: head/sys/dev/iwm/if_iwm_sta.h ============================================================================== --- head/sys/dev/iwm/if_iwm_sta.h Fri May 12 06:31:57 2017 (r318228) +++ head/sys/dev/iwm/if_iwm_sta.h Fri May 12 06:33:07 2017 (r318229) @@ -211,12 +211,13 @@ extern int iwm_mvm_sta_send_to_fw(struct extern int iwm_mvm_add_sta(struct iwm_softc *sc, struct iwm_node *in); extern int iwm_mvm_update_sta(struct iwm_softc *sc, struct iwm_node *in); extern int iwm_mvm_rm_sta(struct iwm_softc *sc, struct ieee80211vap *vap, - struct iwm_node *in); + boolean_t is_assoc); +extern int iwm_mvm_rm_sta_id(struct iwm_softc *sc, struct ieee80211vap *vap); extern int iwm_mvm_add_aux_sta(struct iwm_softc *sc); extern void iwm_mvm_del_aux_sta(struct iwm_softc *sc); -extern int iwm_mvm_drain_sta(struct iwm_softc *sc, struct iwm_node *in, +extern int iwm_mvm_drain_sta(struct iwm_softc *sc, struct iwm_vap *ivp, boolean_t drain); #endif /* __IF_IWM_STA_H__ */ From owner-svn-src-head@freebsd.org Fri May 12 06:33:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A2DDD692CA; Fri, 12 May 2017 06:33:57 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5C0974E; Fri, 12 May 2017 06:33:56 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C6XtJw073599; Fri, 12 May 2017 06:33:55 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C6XtGv073597; Fri, 12 May 2017 06:33:55 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120633.v4C6XtGv073597@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 06:33:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318230 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 06:33:57 -0000 Author: adrian Date: Fri May 12 06:33:55 2017 New Revision: 318230 URL: https://svnweb.freebsd.org/changeset/base/318230 Log: [iwm] Fix iwm_mvm_send_cmd_pdu(_status) declarations. Make id a uint32_t. * This fixes cases where the group id of wide commands got lost, e.g. this happened to the IWM_SCAN_ABORT_UMAC command. Obtained from: dragonflybsd.git 71310fab0caca79bb5da43d9d642e77a4c27eea2 Modified: head/sys/dev/iwm/if_iwm_util.c head/sys/dev/iwm/if_iwm_util.h Modified: head/sys/dev/iwm/if_iwm_util.c ============================================================================== --- head/sys/dev/iwm/if_iwm_util.c Fri May 12 06:33:07 2017 (r318229) +++ head/sys/dev/iwm/if_iwm_util.c Fri May 12 06:33:55 2017 (r318230) @@ -346,7 +346,7 @@ iwm_send_cmd(struct iwm_softc *sc, struc /* iwlwifi: mvm/utils.c */ int -iwm_mvm_send_cmd_pdu(struct iwm_softc *sc, uint8_t id, +iwm_mvm_send_cmd_pdu(struct iwm_softc *sc, uint32_t id, uint32_t flags, uint16_t len, const void *data) { struct iwm_host_cmd cmd = { @@ -402,7 +402,7 @@ iwm_mvm_send_cmd_status(struct iwm_softc /* iwlwifi/mvm/utils.c */ int -iwm_mvm_send_cmd_pdu_status(struct iwm_softc *sc, uint8_t id, +iwm_mvm_send_cmd_pdu_status(struct iwm_softc *sc, uint32_t id, uint16_t len, const void *data, uint32_t *status) { struct iwm_host_cmd cmd = { Modified: head/sys/dev/iwm/if_iwm_util.h ============================================================================== --- head/sys/dev/iwm/if_iwm_util.h Fri May 12 06:33:07 2017 (r318229) +++ head/sys/dev/iwm/if_iwm_util.h Fri May 12 06:33:55 2017 (r318230) @@ -107,12 +107,12 @@ #define __IF_IWM_UTIL_H__ extern int iwm_send_cmd(struct iwm_softc *sc, struct iwm_host_cmd *hcmd); -extern int iwm_mvm_send_cmd_pdu(struct iwm_softc *sc, uint8_t id, +extern int iwm_mvm_send_cmd_pdu(struct iwm_softc *sc, uint32_t id, uint32_t flags, uint16_t len, const void *data); extern int iwm_mvm_send_cmd_status(struct iwm_softc *sc, struct iwm_host_cmd *cmd, uint32_t *status); -extern int iwm_mvm_send_cmd_pdu_status(struct iwm_softc *sc, uint8_t id, +extern int iwm_mvm_send_cmd_pdu_status(struct iwm_softc *sc, uint32_t id, uint16_t len, const void *data, uint32_t *status); extern void iwm_free_resp(struct iwm_softc *sc, struct iwm_host_cmd *hcmd); From owner-svn-src-head@freebsd.org Fri May 12 06:34:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0512D69334; Fri, 12 May 2017 06:34:44 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8FF628C0; Fri, 12 May 2017 06:34:44 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C6YhIc073674; Fri, 12 May 2017 06:34:43 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C6YhG5073673; Fri, 12 May 2017 06:34:43 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120634.v4C6YhG5073673@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 06:34:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318231 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 06:34:44 -0000 Author: adrian Date: Fri May 12 06:34:43 2017 New Revision: 318231 URL: https://svnweb.freebsd.org/changeset/base/318231 Log: [iwm] Revert "if_iwm - SCAN_ABORT_UMAC response doesn't use a wide id" This reverts commit cef47a9cbb0a3ce5f18369fed9403d2764884bc2. Obtained from: dragonflybsd.git f62d325820ee7f7c2bcf721ada9cef8b70f74471 Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Fri May 12 06:33:55 2017 (r318230) +++ head/sys/dev/iwm/if_iwm.c Fri May 12 06:34:43 2017 (r318231) @@ -5450,7 +5450,7 @@ iwm_handle_rxb(struct iwm_softc *sc, str case IWM_TIME_EVENT_CMD: case IWM_WIDE_ID(IWM_ALWAYS_LONG_GROUP, IWM_SCAN_CFG_CMD): case IWM_WIDE_ID(IWM_ALWAYS_LONG_GROUP, IWM_SCAN_REQ_UMAC): - case IWM_SCAN_ABORT_UMAC: + case IWM_WIDE_ID(IWM_ALWAYS_LONG_GROUP, IWM_SCAN_ABORT_UMAC): case IWM_SCAN_OFFLOAD_REQUEST_CMD: case IWM_SCAN_OFFLOAD_ABORT_CMD: case IWM_REPLY_BEACON_FILTERING_CMD: From owner-svn-src-head@freebsd.org Fri May 12 06:35:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED190D69394; Fri, 12 May 2017 06:35:21 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD8F9A0C; Fri, 12 May 2017 06:35:21 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C6ZKiO073755; Fri, 12 May 2017 06:35:20 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C6ZKr9073754; Fri, 12 May 2017 06:35:20 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120635.v4C6ZKr9073754@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 06:35:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318232 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 06:35:22 -0000 Author: adrian Date: Fri May 12 06:35:20 2017 New Revision: 318232 URL: https://svnweb.freebsd.org/changeset/base/318232 Log: [iwm] Recognize IWM_FW_PAGING_BLOCK_CMD wide cmd response correctly. Obtained from: dragonflybsd.git ef688cebb9b29b67f7a011846589971987949e0d Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Fri May 12 06:34:43 2017 (r318231) +++ head/sys/dev/iwm/if_iwm.c Fri May 12 06:35:20 2017 (r318232) @@ -5459,7 +5459,8 @@ iwm_handle_rxb(struct iwm_softc *sc, str case IWM_REMOVE_STA: case IWM_TXPATH_FLUSH: case IWM_LQ_CMD: - case IWM_FW_PAGING_BLOCK_CMD: + case IWM_WIDE_ID(IWM_ALWAYS_LONG_GROUP, + IWM_FW_PAGING_BLOCK_CMD): case IWM_BT_CONFIG: case IWM_REPLY_THERMAL_MNG_BACKOFF: cresp = (void *)pkt->data; From owner-svn-src-head@freebsd.org Fri May 12 15:20:14 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F68BD69CEA; Fri, 12 May 2017 15:20:14 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4EC631D77; Fri, 12 May 2017 15:20:14 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4CFKD2J085842; Fri, 12 May 2017 15:20:13 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4CFKCq5085834; Fri, 12 May 2017 15:20:12 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201705121520.v4CFKCq5085834@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Fri, 12 May 2017 15:20:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318242 - head/crypto/openssh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 15:20:14 -0000 Author: lidl Date: Fri May 12 15:20:12 2017 New Revision: 318242 URL: https://svnweb.freebsd.org/changeset/base/318242 Log: Refine and update blacklist support in sshd Adjust notification points slightly to catch all auth failures, rather than just the ones caused by bad usernames. Modify notification point for bad usernames to send new type of BLACKLIST_BAD_USER. (Support in libblacklist will be forthcoming soon.) Add guards to allow library headers to expose the enum of action values. Reviewed by: des Approved by: des Sponsored by: The FreeBSD Foundation Modified: head/crypto/openssh/auth-pam.c head/crypto/openssh/auth.c head/crypto/openssh/auth1.c head/crypto/openssh/auth2.c head/crypto/openssh/blacklist.c head/crypto/openssh/blacklist_client.h head/crypto/openssh/packet.c head/crypto/openssh/sshd.c Modified: head/crypto/openssh/auth-pam.c ============================================================================== --- head/crypto/openssh/auth-pam.c Fri May 12 15:08:23 2017 (r318241) +++ head/crypto/openssh/auth-pam.c Fri May 12 15:20:12 2017 (r318242) @@ -799,7 +799,8 @@ sshpam_query(void *ctx, char **name, cha free(msg); return (0); } - BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL); + BLACKLIST_NOTIFY(BLACKLIST_BAD_USER, + sshpam_authctxt->user); error("PAM: %s for %s%.100s from %.100s", msg, sshpam_authctxt->valid ? "" : "illegal user ", sshpam_authctxt->user, Modified: head/crypto/openssh/auth.c ============================================================================== --- head/crypto/openssh/auth.c Fri May 12 15:08:23 2017 (r318241) +++ head/crypto/openssh/auth.c Fri May 12 15:20:12 2017 (r318242) @@ -311,7 +311,7 @@ auth_log(Authctxt *authctxt, int authent else { authmsg = authenticated ? "Accepted" : "Failed"; if (authenticated) - BLACKLIST_NOTIFY(BLACKLIST_AUTH_OK); + BLACKLIST_NOTIFY(BLACKLIST_AUTH_OK, "ssh"); } authlog("%s %s%s%s for %s%.100s from %.200s port %d ssh2%s%s", @@ -664,7 +664,7 @@ getpwnamallow(const char *user) } #endif if (pw == NULL) { - BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL); + BLACKLIST_NOTIFY(BLACKLIST_BAD_USER, user); logit("Invalid user %.100s from %.100s port %d", user, ssh_remote_ipaddr(ssh), ssh_remote_port(ssh)); #ifdef CUSTOM_FAILED_LOGIN Modified: head/crypto/openssh/auth1.c ============================================================================== --- head/crypto/openssh/auth1.c Fri May 12 15:08:23 2017 (r318241) +++ head/crypto/openssh/auth1.c Fri May 12 15:20:12 2017 (r318242) @@ -338,7 +338,7 @@ do_authloop(Authctxt *authctxt) char *msg; size_t len; - BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL); + BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL, "ssh"); error("Access denied for user %s by PAM account " "configuration", authctxt->user); len = buffer_len(&loginmsg); @@ -364,6 +364,7 @@ do_authloop(Authctxt *authctxt) if (authenticated) return; + BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL, "ssh"); if (++authctxt->failures >= options.max_authtries) { #ifdef SSH_AUDIT_EVENTS PRIVSEP(audit_event(SSH_LOGIN_EXCEED_MAXTRIES)); @@ -406,7 +407,7 @@ do_authentication(Authctxt *authctxt) else { debug("do_authentication: invalid user %s", user); authctxt->pw = fakepw(); - BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL); + BLACKLIST_NOTIFY(BLACKLIST_BAD_USER, user); } /* Configuration may have changed as a result of Match */ Modified: head/crypto/openssh/auth2.c ============================================================================== --- head/crypto/openssh/auth2.c Fri May 12 15:08:23 2017 (r318241) +++ head/crypto/openssh/auth2.c Fri May 12 15:20:12 2017 (r318242) @@ -245,7 +245,6 @@ input_userauth_request(int type, u_int32 } else { logit("input_userauth_request: invalid user %s", user); authctxt->pw = fakepw(); - BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL); #ifdef SSH_AUDIT_EVENTS PRIVSEP(audit_event(SSH_INVALID_USER)); #endif @@ -386,8 +385,10 @@ userauth_finish(Authctxt *authctxt, int /* Allow initial try of "none" auth without failure penalty */ if (!partial && !authctxt->server_caused_failure && - (authctxt->attempt > 1 || strcmp(method, "none") != 0)) + (authctxt->attempt > 1 || strcmp(method, "none") != 0)) { authctxt->failures++; + BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL, "ssh"); + } if (authctxt->failures >= options.max_authtries) { #ifdef SSH_AUDIT_EVENTS PRIVSEP(audit_event(SSH_LOGIN_EXCEED_MAXTRIES)); Modified: head/crypto/openssh/blacklist.c ============================================================================== --- head/crypto/openssh/blacklist.c Fri May 12 15:08:23 2017 (r318241) +++ head/crypto/openssh/blacklist.c Fri May 12 15:20:12 2017 (r318242) @@ -46,8 +46,8 @@ #include "log.h" #include "misc.h" #include "servconf.h" -#include "blacklist_client.h" #include +#include "blacklist_client.h" static struct blacklist *blstate = NULL; @@ -88,10 +88,10 @@ blacklist_init(void) } void -blacklist_notify(int action) +blacklist_notify(int action, const char *msg) { if (blstate != NULL && packet_connection_is_on_socket()) (void)blacklist_r(blstate, action, - packet_get_connection_in(), "ssh"); + packet_get_connection_in(), msg); } Modified: head/crypto/openssh/blacklist_client.h ============================================================================== --- head/crypto/openssh/blacklist_client.h Fri May 12 15:08:23 2017 (r318241) +++ head/crypto/openssh/blacklist_client.h Fri May 12 15:20:12 2017 (r318242) @@ -34,22 +34,26 @@ #ifndef BLACKLIST_CLIENT_H #define BLACKLIST_CLIENT_H +#ifndef BLACKLIST_API_ENUM enum { BLACKLIST_AUTH_OK = 0, - BLACKLIST_AUTH_FAIL + BLACKLIST_AUTH_FAIL, + BLACKLIST_ABUSIVE_BEHAVIOR, + BLACKLIST_BAD_USER }; +#endif #ifdef USE_BLACKLIST void blacklist_init(void); -void blacklist_notify(int); +void blacklist_notify(int, const char *); #define BLACKLIST_INIT() blacklist_init() -#define BLACKLIST_NOTIFY(x) blacklist_notify(x) +#define BLACKLIST_NOTIFY(x,msg) blacklist_notify(x,msg) #else #define BLACKLIST_INIT() -#define BLACKLIST_NOTIFY(x) +#define BLACKLIST_NOTIFY(x,msg) #endif Modified: head/crypto/openssh/packet.c ============================================================================== --- head/crypto/openssh/packet.c Fri May 12 15:08:23 2017 (r318241) +++ head/crypto/openssh/packet.c Fri May 12 15:20:12 2017 (r318242) @@ -2104,7 +2104,7 @@ sshpkt_fatal(struct ssh *ssh, const char case SSH_ERR_NO_KEX_ALG_MATCH: case SSH_ERR_NO_HOSTKEY_ALG_MATCH: if (ssh && ssh->kex && ssh->kex->failed_choice) { - BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL); + BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL, "ssh"); logdie("Unable to negotiate with %.200s port %d: %s. " "Their offer: %s", ssh_remote_ipaddr(ssh), ssh_remote_port(ssh), ssh_err(r), Modified: head/crypto/openssh/sshd.c ============================================================================== --- head/crypto/openssh/sshd.c Fri May 12 15:08:23 2017 (r318241) +++ head/crypto/openssh/sshd.c Fri May 12 15:20:12 2017 (r318242) @@ -371,7 +371,7 @@ grace_alarm_handler(int sig) kill(0, SIGTERM); } - BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL); + BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL, "ssh"); /* Log error and exit. */ sigdie("Timeout before authentication for %s port %d", From owner-svn-src-head@freebsd.org Fri May 12 15:26:53 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EAEFFD6906A; Fri, 12 May 2017 15:26:53 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from hydra.pix.net (hydra.pix.net [IPv6:2001:470:e254:10::4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.pix.net", Issuer "Pix.Com Technologies LLC CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id BBF8D806; Fri, 12 May 2017 15:26:53 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from torb.pix.net (torb.pix.net [IPv6:2001:470:e254:10:1042:6a31:1deb:9f8a]) (authenticated bits=0) by hydra.pix.net (8.16.0.19/8.15.2) with ESMTPA id v4CFQquh020580; Fri, 12 May 2017 11:26:52 -0400 (EDT) (envelope-from lidl@FreeBSD.org) Subject: Re: svn commit: r318242 - head/crypto/openssh From: Kurt Lidl To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201705121520.v4CFKCq5085834@repo.freebsd.org> Reply-To: lidl@FreeBSD.org Message-ID: <1db4302e-63a1-e8ce-b493-91c0db9540a3@FreeBSD.org> Date: Fri, 12 May 2017 11:26:52 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <201705121520.v4CFKCq5085834@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 15:26:54 -0000 On 5/12/17 11:20 AM, Kurt Lidl wrote: > Author: lidl > Date: Fri May 12 15:20:12 2017 > New Revision: 318242 > URL: https://svnweb.freebsd.org/changeset/base/318242 > > Log: > Refine and update blacklist support in sshd > > Adjust notification points slightly to catch all auth failures, > rather than just the ones caused by bad usernames. > > Modify notification point for bad usernames to send new type of > BLACKLIST_BAD_USER. (Support in libblacklist will be forthcoming soon.) > Add guards to allow library headers to expose the enum of action values. > > Reviewed by: des > Approved by: des > Sponsored by: The FreeBSD Foundation Forgot: MFC after: 3 days -Kurt From owner-svn-src-head@freebsd.org Fri May 12 15:35:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5142CD692F8; Fri, 12 May 2017 15:35:01 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20C00CC6; Fri, 12 May 2017 15:35:01 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4CFZ03o094174; Fri, 12 May 2017 15:35:00 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4CFZ0eL094172; Fri, 12 May 2017 15:35:00 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705121535.v4CFZ0eL094172@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 12 May 2017 15:35:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318243 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 15:35:01 -0000 Author: kib Date: Fri May 12 15:34:59 2017 New Revision: 318243 URL: https://svnweb.freebsd.org/changeset/base/318243 Log: Do not wake up sleeping thread in reschedule_signals() if the signal is blocked. The spurious wakeup might result in spurious EINTR. The reschedule_signals() function is called when the calling thread has the signal mask changed. For each newly blocked signal, we try to find a thread which might have the signal not blocked. If no such thread exists, sigtd() returns random thread, which must not be waken up. I decided that re-checking, as suggested by PR submitter, is more reasonable change than to change sigtd() interface, due to other uses of sigtd(). signotify() already performs this check. Submitted by: Duane PR: 219228 Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Fri May 12 15:20:12 2017 (r318242) +++ head/sys/kern/kern_sig.c Fri May 12 15:34:59 2017 (r318243) @@ -2646,7 +2646,9 @@ reschedule_signals(struct proc *p, sigse signotify(td); if (!(flags & SIGPROCMASK_PS_LOCKED)) mtx_lock(&ps->ps_mtx); - if (p->p_flag & P_TRACED || SIGISMEMBER(ps->ps_sigcatch, sig)) + if (p->p_flag & P_TRACED || + (SIGISMEMBER(ps->ps_sigcatch, sig) && + !SIGISMEMBER(td->td_sigmask, sig))) tdsigwakeup(td, sig, SIG_CATCH, (SIGISMEMBER(ps->ps_sigintr, sig) ? EINTR : ERESTART)); From owner-svn-src-head@freebsd.org Fri May 12 18:02:58 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98CEBD699AF; Fri, 12 May 2017 18:02:58 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 70DA01EA9; Fri, 12 May 2017 18:02:58 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4CI2vLT057019; Fri, 12 May 2017 18:02:57 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4CI2vjx057018; Fri, 12 May 2017 18:02:57 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201705121802.v4CI2vjx057018@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 12 May 2017 18:02:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318246 - head/tests/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 18:02:58 -0000 Author: markj Date: Fri May 12 18:02:57 2017 New Revision: 318246 URL: https://svnweb.freebsd.org/changeset/base/318246 Log: Add a regression test for r318191. Reviewed by: badger MFC after: 1 week Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D10684 Modified: head/tests/sys/kern/ptrace_test.c Modified: head/tests/sys/kern/ptrace_test.c ============================================================================== --- head/tests/sys/kern/ptrace_test.c Fri May 12 18:01:05 2017 (r318245) +++ head/tests/sys/kern/ptrace_test.c Fri May 12 18:02:57 2017 (r318246) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -3025,6 +3026,99 @@ ATF_TC_BODY(ptrace__event_mask_sigkill_d ATF_REQUIRE(errno == ECHILD); } +static void * +flock_thread(void *arg) +{ + int fd; + + fd = *(int *)arg; + (void)flock(fd, LOCK_EX); + (void)flock(fd, LOCK_UN); + return (NULL); +} + +/* + * Verify that PT_ATTACH will suspend threads sleeping in an SBDRY section. + * We rely on the fact that the lockf implementation sets SBDRY before blocking + * on a lock. This is a regression test for r318191. + */ +ATF_TC_WITHOUT_HEAD(ptrace__PT_ATTACH_with_SBDRY_thread); +ATF_TC_BODY(ptrace__PT_ATTACH_with_SBDRY_thread, tc) +{ + pthread_barrier_t barrier; + pthread_barrierattr_t battr; + char tmpfile[64]; + pid_t child, wpid; + int error, fd, i, status; + + ATF_REQUIRE(pthread_barrierattr_init(&battr) == 0); + ATF_REQUIRE(pthread_barrierattr_setpshared(&battr, + PTHREAD_PROCESS_SHARED) == 0); + ATF_REQUIRE(pthread_barrier_init(&barrier, &battr, 2) == 0); + + (void)snprintf(tmpfile, sizeof(tmpfile), "./ptrace.XXXXXX"); + fd = mkstemp(tmpfile); + ATF_REQUIRE(fd >= 0); + + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + pthread_t t[2]; + int error, cfd; + + error = pthread_barrier_wait(&barrier); + if (error != 0 && error != PTHREAD_BARRIER_SERIAL_THREAD) + _exit(1); + + cfd = open(tmpfile, O_RDONLY); + if (cfd < 0) + _exit(1); + + /* + * We want at least two threads blocked on the file lock since + * the SIGSTOP from PT_ATTACH may kick one of them out of + * sleep. + */ + if (pthread_create(&t[0], NULL, flock_thread, &cfd) != 0) + _exit(1); + if (pthread_create(&t[1], NULL, flock_thread, &cfd) != 0) + _exit(1); + if (pthread_join(t[0], NULL) != 0) + _exit(1); + if (pthread_join(t[1], NULL) != 0) + _exit(1); + _exit(0); + } + + ATF_REQUIRE(flock(fd, LOCK_EX) == 0); + + error = pthread_barrier_wait(&barrier); + ATF_REQUIRE(error == 0 || error == PTHREAD_BARRIER_SERIAL_THREAD); + + /* + * Give the child some time to block. Is there a better way to do this? + */ + sleep(1); + + /* + * Attach and give the child 3 seconds to stop. + */ + ATF_REQUIRE(ptrace(PT_ATTACH, child, NULL, 0) == 0); + for (i = 0; i < 3; i++) { + wpid = waitpid(child, &status, WNOHANG); + if (wpid == child && WIFSTOPPED(status) && + WSTOPSIG(status) == SIGSTOP) + break; + sleep(1); + } + ATF_REQUIRE_MSG(i < 3, "failed to stop child process after PT_ATTACH"); + + ATF_REQUIRE(ptrace(PT_DETACH, child, NULL, 0) == 0); + + ATF_REQUIRE(flock(fd, LOCK_UN) == 0); + ATF_REQUIRE(unlink(tmpfile) == 0); + ATF_REQUIRE(close(fd) == 0); +} + ATF_TP_ADD_TCS(tp) { @@ -3072,6 +3166,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, ptrace__parent_terminate_with_pending_sigstop1); ATF_TP_ADD_TC(tp, ptrace__parent_terminate_with_pending_sigstop2); ATF_TP_ADD_TC(tp, ptrace__event_mask_sigkill_discard); + ATF_TP_ADD_TC(tp, ptrace__PT_ATTACH_with_SBDRY_thread); return (atf_no_error()); } From owner-svn-src-head@freebsd.org Sat May 13 03:10:53 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E74B1D6A7CA; Sat, 13 May 2017 03:10:53 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A7BCC1859; Sat, 13 May 2017 03:10:53 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4D3AqL9085753; Sat, 13 May 2017 03:10:52 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4D3ApUl085738; Sat, 13 May 2017 03:10:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705130310.v4D3ApUl085738@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 13 May 2017 03:10:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 03:10:54 -0000 Author: ngie Date: Sat May 13 03:10:50 2017 New Revision: 318250 URL: https://svnweb.freebsd.org/changeset/base/318250 Log: Handle the logfiles in newsyslog and syslogd conditionally, based on src.conf(5) knobs This will allow consumers of FreeBSD to use the unmodified configuration files out of the box more than previously. Both newsyslog.conf and syslog.conf: - /var/log/lpd-errs (MK_LPR != no) - /var/log/ppp.log (MK_PPP != no) - /var/log/xferlog (MK_FTP != no) newsyslog.conf: - /var/log/amd.log (MK_AMD != no) - /var/log/pflog (MK_PF != no) - /var/log/sendmail.st (MK_SENDMAIL != no) MFC after: 3 weeks Sponsored by: Dell EMC Isilon Added: head/etc/newsyslog.conf.d/amd.conf (contents, props changed) head/etc/newsyslog.conf.d/ftp.conf (contents, props changed) head/etc/newsyslog.conf.d/lpr.conf (contents, props changed) head/etc/newsyslog.conf.d/pf.conf (contents, props changed) head/etc/newsyslog.conf.d/ppp.conf (contents, props changed) head/etc/newsyslog.conf.d/sendmail.conf (contents, props changed) head/etc/syslog.d/ head/etc/syslog.d/Makefile (contents, props changed) head/etc/syslog.d/ftp.conf (contents, props changed) head/etc/syslog.d/lpr.conf (contents, props changed) head/etc/syslog.d/ppp.conf (contents, props changed) Modified: head/etc/Makefile head/etc/newsyslog.conf head/etc/newsyslog.conf.d/Makefile head/etc/syslog.conf head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Fri May 12 18:37:08 2017 (r318249) +++ head/etc/Makefile Sat May 13 03:10:50 2017 (r318250) @@ -8,7 +8,8 @@ FILESGROUPS= FILES # No need as it is empty and just causes rebuilds since this file does so much. UPDATE_DEPENDFILE= no SUBDIR= \ - newsyslog.conf.d + newsyslog.conf.d \ + syslog.d .if ${MK_SENDMAIL} != "no" SUBDIR+=sendmail Modified: head/etc/newsyslog.conf ============================================================================== --- head/etc/newsyslog.conf Fri May 12 18:37:08 2017 (r318249) +++ head/etc/newsyslog.conf Sat May 13 03:10:50 2017 (r318250) @@ -18,7 +18,6 @@ # # logfilename [owner:group] mode count size when flags [/pid_file] [sig_num] /var/log/all.log 600 7 * @T00 J -/var/log/amd.log 644 7 1000 * J /var/log/auth.log 600 7 1000 @0101T JC /var/log/console.log 600 5 1000 * J /var/log/cron 600 3 1000 * JC @@ -26,18 +25,13 @@ /var/log/debug.log 600 7 1000 * JC /var/log/init.log 644 3 1000 * J /var/log/kerberos.log 600 7 1000 * J -/var/log/lpd-errs 644 7 1000 * JC /var/log/maillog 640 7 * @T00 JC /var/log/messages 644 5 1000 @0101T JC /var/log/monthly.log 640 12 * $M1D0 JN -/var/log/pflog 600 3 1000 * JB /var/run/pflogd.pid -/var/log/ppp.log root:network 640 3 1000 * JC /var/log/devd.log 644 3 1000 * JC /var/log/security 600 10 1000 * JC -/var/log/sendmail.st 640 10 * 168 BN /var/log/utx.log 644 3 * @01T05 B /var/log/weekly.log 640 5 * $W6D0 JN -/var/log/xferlog 600 7 1000 * JC /etc/newsyslog.conf.d/* /usr/local/etc/newsyslog.conf.d/* Modified: head/etc/newsyslog.conf.d/Makefile ============================================================================== --- head/etc/newsyslog.conf.d/Makefile Fri May 12 18:37:08 2017 (r318249) +++ head/etc/newsyslog.conf.d/Makefile Sat May 13 03:10:50 2017 (r318250) @@ -6,8 +6,32 @@ BINDIR= /etc/newsyslog.conf.d FILES= +.if ${MK_AMD} != "no" +FILES+= amd.conf +.endif + +.if ${MK_FTP} != "no" +FILES+= ftp.conf +.endif + +.if ${MK_LPR} != "no" +FILES+= lpr.conf +.endif + .if ${MK_OFED} != "no" FILES+= opensm.conf .endif +.if ${MK_PF} != "no" +FILES+= pf.conf +.endif + +.if ${MK_PPP} != "no" +FILES+= ppp.conf +.endif + +.if ${MK_SENDMAIL} != "no" +FILES+= sendmail.conf +.endif + .include Added: head/etc/newsyslog.conf.d/amd.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/newsyslog.conf.d/amd.conf Sat May 13 03:10:50 2017 (r318250) @@ -0,0 +1,2 @@ +# $FreeBSD$ +/var/log/amd.log 644 7 1000 * J Added: head/etc/newsyslog.conf.d/ftp.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/newsyslog.conf.d/ftp.conf Sat May 13 03:10:50 2017 (r318250) @@ -0,0 +1,2 @@ +# $FreeBSD$ +/var/log/xferlog 600 7 1000 * JC Added: head/etc/newsyslog.conf.d/lpr.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/newsyslog.conf.d/lpr.conf Sat May 13 03:10:50 2017 (r318250) @@ -0,0 +1,2 @@ +# $FreeBSD$ +/var/log/lpd-errs 644 7 1000 * JC Added: head/etc/newsyslog.conf.d/pf.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/newsyslog.conf.d/pf.conf Sat May 13 03:10:50 2017 (r318250) @@ -0,0 +1,2 @@ +# $FreeBSD$ +/var/log/pflog 600 3 1000 * JB /var/run/pflogd.pid Added: head/etc/newsyslog.conf.d/ppp.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/newsyslog.conf.d/ppp.conf Sat May 13 03:10:50 2017 (r318250) @@ -0,0 +1,2 @@ +# $FreeBSD$ +/var/log/ppp.log root:network 640 3 1000 * JC Added: head/etc/newsyslog.conf.d/sendmail.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/newsyslog.conf.d/sendmail.conf Sat May 13 03:10:50 2017 (r318250) @@ -0,0 +1,2 @@ +# $FreeBSD$ +/var/log/sendmail.st 640 10 * 168 BN Modified: head/etc/syslog.conf ============================================================================== --- head/etc/syslog.conf Fri May 12 18:37:08 2017 (r318249) +++ head/etc/syslog.conf Sat May 13 03:10:50 2017 (r318250) @@ -10,8 +10,6 @@ security.* /var/log/security auth.info;authpriv.info /var/log/auth.log mail.info /var/log/maillog -lpr.info /var/log/lpd-errs -ftp.info /var/log/xferlog cron.* /var/log/cron !-devd *.=debug /var/log/debug.log @@ -31,8 +29,6 @@ cron.* /var/log/cron # Uncomment this if you wish to see messages produced by devd # !devd # *.>=notice /var/log/devd.log -!ppp -*.* /var/log/ppp.log !* include /etc/syslog.d include /usr/local/etc/syslog.d Added: head/etc/syslog.d/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/syslog.d/Makefile Sat May 13 03:10:50 2017 (r318250) @@ -0,0 +1,19 @@ +# $FreeBSD$ + +.include + +.if ${MK_FTP} != "no" +FILES+= ftp.conf +.endif + +.if ${MK_LPR} != "no" +FILES+= lpr.conf +.endif + +.if ${MK_PPP} != "no" +FILES+= ppp.conf +.endif + +BINDIR= /etc/syslog.d + +.include Added: head/etc/syslog.d/ftp.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/syslog.d/ftp.conf Sat May 13 03:10:50 2017 (r318250) @@ -0,0 +1,2 @@ +# $FreeBSD$ +ftp.info /var/log/xferlog Added: head/etc/syslog.d/lpr.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/syslog.d/lpr.conf Sat May 13 03:10:50 2017 (r318250) @@ -0,0 +1,2 @@ +# $FreeBSD$ +lpr.info /var/log/lpd-errs Added: head/etc/syslog.d/ppp.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/syslog.d/ppp.conf Sat May 13 03:10:50 2017 (r318250) @@ -0,0 +1,3 @@ +# $FreeBSD$ +!ppp +*.* /var/log/ppp.log Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Fri May 12 18:37:08 2017 (r318249) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat May 13 03:10:50 2017 (r318250) @@ -56,6 +56,7 @@ OLD_FILES+=usr/share/man/man8/iasl.8.gz .if ${MK_AMD} == no OLD_FILES+=etc/amd.map +OLD_FILES+=etc/newsyslog.conf.d/amd.conf OLD_FILES+=etc/rc.d/amd OLD_FILES+=usr/bin/pawd OLD_FILES+=usr/sbin/amd @@ -1588,9 +1589,11 @@ OLD_FILES+=usr/share/man/man8/fmtree.8.g .if ${MK_FTP} == no OLD_FILES+=etc/ftpusers +OLD_FILES+=etc/newsyslog.conf.d/ftp.conf OLD_FILES+=etc/pam.d/ftp OLD_FILES+=etc/pam.d/ftpd OLD_FILES+=etc/rc.d/ftpd +OLD_FILES+=etc/syslog.d/ftp.conf OLD_FILES+=usr/bin/ftp OLD_FILES+=usr/bin/gate-ftp OLD_FILES+=usr/bin/pftp @@ -6183,7 +6186,9 @@ OLD_FILES+=usr/share/man/man8/updatedb.8 .if ${MK_LPR} == no OLD_FILES+=etc/hosts.lpd OLD_FILES+=etc/printcap +OLD_FILES+=etc/newsyslog.conf.d/lpr.conf OLD_FILES+=etc/rc.d/lpd +OLD_FILES+=etc/syslog.d/lpr.conf OLD_FILES+=usr/bin/lp OLD_FILES+=usr/bin/lpq OLD_FILES+=usr/bin/lpr @@ -7158,6 +7163,7 @@ OLD_DIRS+=usr/share/examples/pc-sysinsta .endif .if ${MK_PF} == no +OLD_FILES+=etc/newsyslog.conf.d/pf.conf OLD_FILES+=etc/periodic/security/520.pfdenied OLD_FILES+=etc/pf.os OLD_FILES+=etc/rc.d/ftp-proxy @@ -7297,7 +7303,9 @@ OLD_FILES+=usr/share/man/man8/portsnap.8 .endif .if ${MK_PPP} == no +OLD_FILES+=etc/newsyslog.conf.d/ppp.conf OLD_FILES+=etc/ppp/ppp.conf +OLD_FILES+=etc/syslog.d/ppp.conf OLD_DIRS+=etc/ppp OLD_FILES+=usr/sbin/ppp OLD_FILES+=usr/sbin/pppctl @@ -7473,6 +7481,7 @@ OLD_FILES+=usr/share/man/man8/rtquery.8. .endif .if ${MK_SENDMAIL} == no +OLD_FILES+=etc/newsyslog.conf.d/sendmail.conf OLD_FILES+=etc/periodic/daily/150.clean-hoststat OLD_FILES+=etc/periodic/daily/440.status-mailq OLD_FILES+=etc/periodic/daily/460.status-mail-rejects From owner-svn-src-head@freebsd.org Sat May 13 10:00:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E29C3D6990C; Sat, 13 May 2017 10:00:25 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B48B51E3F; Sat, 13 May 2017 10:00:25 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4DA0OOC057570; Sat, 13 May 2017 10:00:24 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4DA0O1m057569; Sat, 13 May 2017 10:00:24 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201705131000.v4DA0O1m057569@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Sat, 13 May 2017 10:00:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318251 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 10:00:26 -0000 Author: mmel Date: Sat May 13 10:00:24 2017 New Revision: 318251 URL: https://svnweb.freebsd.org/changeset/base/318251 Log: Clarify usage rules for pmap_remap_vm_attr(). Not a functional change. MFC with: r318021 MFC after: 2 weeks Modified: head/sys/arm/arm/pmap-v6.c Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Sat May 13 03:10:50 2017 (r318250) +++ head/sys/arm/arm/pmap-v6.c Sat May 13 10:00:24 2017 (r318251) @@ -500,7 +500,24 @@ pmap_set_tex(void) /* * Remap one vm_meattr class to another one. This can be useful as * workaround for SOC errata, e.g. if devices must be accessed using - * SO memory class. + * SO memory class. + * + * !!! Please note that this function is absolutely last resort thing. + * It should not be used under normal circumstances. !!! + * + * Usage rules: + * - it shall be called after pmap_bootstrap_prepare() and before + * cpu_mp_start() (thus only on boot CPU). In practice, it's expected + * to be called from platform_attach() or platform_late_init(). + * + * - if remapping doesn't change caching mode, or until uncached class + * is remapped to any kind of cached one, then no other restriction exists. + * + * - if pmap_remap_vm_attr() changes caching mode, but both (original and + * remapped) remain cached, then caller is resposible for calling + * of dcache_wbinv_poc_all(). + * + * - remapping of any kind of cached class to uncached is not permitted. */ void pmap_remap_vm_attr(vm_memattr_t old_attr, vm_memattr_t new_attr) From owner-svn-src-head@freebsd.org Sat May 13 13:01:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6BD8AD6A0A0; Sat, 13 May 2017 13:01:16 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B669174A; Sat, 13 May 2017 13:01:16 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4DD1FhJ038259; Sat, 13 May 2017 13:01:15 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4DD1FBc038256; Sat, 13 May 2017 13:01:15 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201705131301.v4DD1FBc038256@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 13 May 2017 13:01:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318252 - head/sys/arm64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 13:01:16 -0000 Author: andrew Date: Sat May 13 13:01:15 2017 New Revision: 318252 URL: https://svnweb.freebsd.org/changeset/base/318252 Log: Add the VM_MEMATTR_WRITE_THROUGH memory type to arm64 and use it to support VM_MEMATTR_WRITE_COMBINING in the kernel. This fixes a bug where Xorg would use write back cached memory for its graphics buffers. This would produce artifacts on the screen as cachelines were written to memory. MFC after: 1 week Sponsored by: DARPA, AFRL Modified: head/sys/arm64/include/vm.h Modified: head/sys/arm64/include/vm.h ============================================================================== --- head/sys/arm64/include/vm.h Sat May 13 10:00:24 2017 (r318251) +++ head/sys/arm64/include/vm.h Sat May 13 13:01:15 2017 (r318252) @@ -30,9 +30,15 @@ #define _MACHINE_VM_H_ /* Memory attribute configuration. */ -#define VM_MEMATTR_DEVICE 0 -#define VM_MEMATTR_UNCACHEABLE 1 -#define VM_MEMATTR_WRITE_BACK 2 +#define VM_MEMATTR_DEVICE 0 +#define VM_MEMATTR_UNCACHEABLE 1 +#define VM_MEMATTR_WRITE_BACK 2 +#define VM_MEMATTR_WRITE_THROUGH 3 + +#ifdef _KERNEL +/* If defined vmstat will try to use both of these in a switch statement */ +#define VM_MEMATTR_WRITE_COMBINING VM_MEMATTR_WRITE_THROUGH +#endif #define VM_MEMATTR_DEFAULT VM_MEMATTR_WRITE_BACK From owner-svn-src-head@freebsd.org Sat May 13 13:03:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97B68D6A19D; Sat, 13 May 2017 13:03:21 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69E6B19E5; Sat, 13 May 2017 13:03:21 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4DD3KKo041947; Sat, 13 May 2017 13:03:20 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4DD3Kai041946; Sat, 13 May 2017 13:03:20 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201705131303.v4DD3Kai041946@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 13 May 2017 13:03:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318253 - head/sys/arm64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 13:03:21 -0000 Author: andrew Date: Sat May 13 13:03:20 2017 New Revision: 318253 URL: https://svnweb.freebsd.org/changeset/base/318253 Log: Allocate a cacheline when reading or writing to write through memory. The hardware will still write to memory, however following reads will be from the cache. MFC after: 1 week Sponsored by: DARPA, AFRL Modified: head/sys/arm64/include/armreg.h Modified: head/sys/arm64/include/armreg.h ============================================================================== --- head/sys/arm64/include/armreg.h Sat May 13 13:01:15 2017 (r318252) +++ head/sys/arm64/include/armreg.h Sat May 13 13:03:20 2017 (r318253) @@ -360,7 +360,7 @@ #define MAIR_ATTR(attr, idx) ((attr) << ((idx) * 8)) #define MAIR_DEVICE_nGnRnE 0x00 #define MAIR_NORMAL_NC 0x44 -#define MAIR_NORMAL_WT 0x88 +#define MAIR_NORMAL_WT 0xbb #define MAIR_NORMAL_WB 0xff /* PAR_EL1 - Physical Address Register */ From owner-svn-src-head@freebsd.org Sat May 13 15:57:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03F57D6B7F6; Sat, 13 May 2017 15:57:31 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D2F9513C0; Sat, 13 May 2017 15:57:30 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v4DFbgnM045291; Sat, 13 May 2017 08:37:42 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v4DFbgWV045290; Sat, 13 May 2017 08:37:42 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk In-Reply-To: <201705130310.v4D3ApUl085738@repo.freebsd.org> To: Ngie Cooper Date: Sat, 13 May 2017 08:37:42 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 15:57:31 -0000 > Author: ngie > Date: Sat May 13 03:10:50 2017 > New Revision: 318250 > URL: https://svnweb.freebsd.org/changeset/base/318250 > > Log: > Handle the logfiles in newsyslog and syslogd conditionally, based on > src.conf(5) knobs > > This will allow consumers of FreeBSD to use the unmodified configuration > files out of the box more than previously. What about simply generating proper newsyslog.conf and syslog.conf based on the the MK_ values rather than change the visible administration interface that has finger memory, ansible, and puppet support? > > Both newsyslog.conf and syslog.conf: > - /var/log/lpd-errs (MK_LPR != no) > - /var/log/ppp.log (MK_PPP != no) > - /var/log/xferlog (MK_FTP != no) > > newsyslog.conf: > - /var/log/amd.log (MK_AMD != no) > - /var/log/pflog (MK_PF != no) > - /var/log/sendmail.st (MK_SENDMAIL != no) > > MFC after: 3 weeks > Sponsored by: Dell EMC Isilon > > Added: > head/etc/newsyslog.conf.d/amd.conf (contents, props changed) > head/etc/newsyslog.conf.d/ftp.conf (contents, props changed) > head/etc/newsyslog.conf.d/lpr.conf (contents, props changed) > head/etc/newsyslog.conf.d/pf.conf (contents, props changed) > head/etc/newsyslog.conf.d/ppp.conf (contents, props changed) > head/etc/newsyslog.conf.d/sendmail.conf (contents, props changed) > head/etc/syslog.d/ > head/etc/syslog.d/Makefile (contents, props changed) > head/etc/syslog.d/ftp.conf (contents, props changed) > head/etc/syslog.d/lpr.conf (contents, props changed) > head/etc/syslog.d/ppp.conf (contents, props changed) > Modified: > head/etc/Makefile > head/etc/newsyslog.conf > head/etc/newsyslog.conf.d/Makefile > head/etc/syslog.conf > head/tools/build/mk/OptionalObsoleteFiles.inc > > Modified: head/etc/Makefile > ============================================================================== > --- head/etc/Makefile Fri May 12 18:37:08 2017 (r318249) > +++ head/etc/Makefile Sat May 13 03:10:50 2017 (r318250) > @@ -8,7 +8,8 @@ FILESGROUPS= FILES > # No need as it is empty and just causes rebuilds since this file does so much. > UPDATE_DEPENDFILE= no > SUBDIR= \ > - newsyslog.conf.d > + newsyslog.conf.d \ > + syslog.d > > .if ${MK_SENDMAIL} != "no" > SUBDIR+=sendmail > > Modified: head/etc/newsyslog.conf > ============================================================================== > --- head/etc/newsyslog.conf Fri May 12 18:37:08 2017 (r318249) > +++ head/etc/newsyslog.conf Sat May 13 03:10:50 2017 (r318250) > @@ -18,7 +18,6 @@ > # > # logfilename [owner:group] mode count size when flags [/pid_file] [sig_num] > /var/log/all.log 600 7 * @T00 J > -/var/log/amd.log 644 7 1000 * J > /var/log/auth.log 600 7 1000 @0101T JC > /var/log/console.log 600 5 1000 * J > /var/log/cron 600 3 1000 * JC > @@ -26,18 +25,13 @@ > /var/log/debug.log 600 7 1000 * JC > /var/log/init.log 644 3 1000 * J > /var/log/kerberos.log 600 7 1000 * J > -/var/log/lpd-errs 644 7 1000 * JC > /var/log/maillog 640 7 * @T00 JC > /var/log/messages 644 5 1000 @0101T JC > /var/log/monthly.log 640 12 * $M1D0 JN > -/var/log/pflog 600 3 1000 * JB /var/run/pflogd.pid > -/var/log/ppp.log root:network 640 3 1000 * JC > /var/log/devd.log 644 3 1000 * JC > /var/log/security 600 10 1000 * JC > -/var/log/sendmail.st 640 10 * 168 BN > /var/log/utx.log 644 3 * @01T05 B > /var/log/weekly.log 640 5 * $W6D0 JN > -/var/log/xferlog 600 7 1000 * JC > > /etc/newsyslog.conf.d/* > /usr/local/etc/newsyslog.conf.d/* > > Modified: head/etc/newsyslog.conf.d/Makefile > ============================================================================== > --- head/etc/newsyslog.conf.d/Makefile Fri May 12 18:37:08 2017 (r318249) > +++ head/etc/newsyslog.conf.d/Makefile Sat May 13 03:10:50 2017 (r318250) > @@ -6,8 +6,32 @@ BINDIR= /etc/newsyslog.conf.d > > FILES= > > +.if ${MK_AMD} != "no" > +FILES+= amd.conf > +.endif > + > +.if ${MK_FTP} != "no" > +FILES+= ftp.conf > +.endif > + > +.if ${MK_LPR} != "no" > +FILES+= lpr.conf > +.endif > + > .if ${MK_OFED} != "no" > FILES+= opensm.conf > .endif > > +.if ${MK_PF} != "no" > +FILES+= pf.conf > +.endif > + > +.if ${MK_PPP} != "no" > +FILES+= ppp.conf > +.endif > + > +.if ${MK_SENDMAIL} != "no" > +FILES+= sendmail.conf > +.endif > + > .include > > Added: head/etc/newsyslog.conf.d/amd.conf > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/etc/newsyslog.conf.d/amd.conf Sat May 13 03:10:50 2017 (r318250) > @@ -0,0 +1,2 @@ > +# $FreeBSD$ > +/var/log/amd.log 644 7 1000 * J > > Added: head/etc/newsyslog.conf.d/ftp.conf > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/etc/newsyslog.conf.d/ftp.conf Sat May 13 03:10:50 2017 (r318250) > @@ -0,0 +1,2 @@ > +# $FreeBSD$ > +/var/log/xferlog 600 7 1000 * JC > > Added: head/etc/newsyslog.conf.d/lpr.conf > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/etc/newsyslog.conf.d/lpr.conf Sat May 13 03:10:50 2017 (r318250) > @@ -0,0 +1,2 @@ > +# $FreeBSD$ > +/var/log/lpd-errs 644 7 1000 * JC > > Added: head/etc/newsyslog.conf.d/pf.conf > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/etc/newsyslog.conf.d/pf.conf Sat May 13 03:10:50 2017 (r318250) > @@ -0,0 +1,2 @@ > +# $FreeBSD$ > +/var/log/pflog 600 3 1000 * JB /var/run/pflogd.pid > > Added: head/etc/newsyslog.conf.d/ppp.conf > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/etc/newsyslog.conf.d/ppp.conf Sat May 13 03:10:50 2017 (r318250) > @@ -0,0 +1,2 @@ > +# $FreeBSD$ > +/var/log/ppp.log root:network 640 3 1000 * JC > > Added: head/etc/newsyslog.conf.d/sendmail.conf > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/etc/newsyslog.conf.d/sendmail.conf Sat May 13 03:10:50 2017 (r318250) > @@ -0,0 +1,2 @@ > +# $FreeBSD$ > +/var/log/sendmail.st 640 10 * 168 BN > > Modified: head/etc/syslog.conf > ============================================================================== > --- head/etc/syslog.conf Fri May 12 18:37:08 2017 (r318249) > +++ head/etc/syslog.conf Sat May 13 03:10:50 2017 (r318250) > @@ -10,8 +10,6 @@ > security.* /var/log/security > auth.info;authpriv.info /var/log/auth.log > mail.info /var/log/maillog > -lpr.info /var/log/lpd-errs > -ftp.info /var/log/xferlog > cron.* /var/log/cron > !-devd > *.=debug /var/log/debug.log > @@ -31,8 +29,6 @@ cron.* /var/log/cron > # Uncomment this if you wish to see messages produced by devd > # !devd > # *.>=notice /var/log/devd.log > -!ppp > -*.* /var/log/ppp.log > !* > include /etc/syslog.d > include /usr/local/etc/syslog.d > > Added: head/etc/syslog.d/Makefile > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/etc/syslog.d/Makefile Sat May 13 03:10:50 2017 (r318250) > @@ -0,0 +1,19 @@ > +# $FreeBSD$ > + > +.include > + > +.if ${MK_FTP} != "no" > +FILES+= ftp.conf > +.endif > + > +.if ${MK_LPR} != "no" > +FILES+= lpr.conf > +.endif > + > +.if ${MK_PPP} != "no" > +FILES+= ppp.conf > +.endif > + > +BINDIR= /etc/syslog.d > + > +.include > > Added: head/etc/syslog.d/ftp.conf > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/etc/syslog.d/ftp.conf Sat May 13 03:10:50 2017 (r318250) > @@ -0,0 +1,2 @@ > +# $FreeBSD$ > +ftp.info /var/log/xferlog > > Added: head/etc/syslog.d/lpr.conf > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/etc/syslog.d/lpr.conf Sat May 13 03:10:50 2017 (r318250) > @@ -0,0 +1,2 @@ > +# $FreeBSD$ > +lpr.info /var/log/lpd-errs > > Added: head/etc/syslog.d/ppp.conf > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/etc/syslog.d/ppp.conf Sat May 13 03:10:50 2017 (r318250) > @@ -0,0 +1,3 @@ > +# $FreeBSD$ > +!ppp > +*.* /var/log/ppp.log > > Modified: head/tools/build/mk/OptionalObsoleteFiles.inc > ============================================================================== > --- head/tools/build/mk/OptionalObsoleteFiles.inc Fri May 12 18:37:08 2017 (r318249) > +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat May 13 03:10:50 2017 (r318250) > @@ -56,6 +56,7 @@ OLD_FILES+=usr/share/man/man8/iasl.8.gz > > .if ${MK_AMD} == no > OLD_FILES+=etc/amd.map > +OLD_FILES+=etc/newsyslog.conf.d/amd.conf > OLD_FILES+=etc/rc.d/amd > OLD_FILES+=usr/bin/pawd > OLD_FILES+=usr/sbin/amd > @@ -1588,9 +1589,11 @@ OLD_FILES+=usr/share/man/man8/fmtree.8.g > > .if ${MK_FTP} == no > OLD_FILES+=etc/ftpusers > +OLD_FILES+=etc/newsyslog.conf.d/ftp.conf > OLD_FILES+=etc/pam.d/ftp > OLD_FILES+=etc/pam.d/ftpd > OLD_FILES+=etc/rc.d/ftpd > +OLD_FILES+=etc/syslog.d/ftp.conf > OLD_FILES+=usr/bin/ftp > OLD_FILES+=usr/bin/gate-ftp > OLD_FILES+=usr/bin/pftp > @@ -6183,7 +6186,9 @@ OLD_FILES+=usr/share/man/man8/updatedb.8 > .if ${MK_LPR} == no > OLD_FILES+=etc/hosts.lpd > OLD_FILES+=etc/printcap > +OLD_FILES+=etc/newsyslog.conf.d/lpr.conf > OLD_FILES+=etc/rc.d/lpd > +OLD_FILES+=etc/syslog.d/lpr.conf > OLD_FILES+=usr/bin/lp > OLD_FILES+=usr/bin/lpq > OLD_FILES+=usr/bin/lpr > @@ -7158,6 +7163,7 @@ OLD_DIRS+=usr/share/examples/pc-sysinsta > .endif > > .if ${MK_PF} == no > +OLD_FILES+=etc/newsyslog.conf.d/pf.conf > OLD_FILES+=etc/periodic/security/520.pfdenied > OLD_FILES+=etc/pf.os > OLD_FILES+=etc/rc.d/ftp-proxy > @@ -7297,7 +7303,9 @@ OLD_FILES+=usr/share/man/man8/portsnap.8 > .endif > > .if ${MK_PPP} == no > +OLD_FILES+=etc/newsyslog.conf.d/ppp.conf > OLD_FILES+=etc/ppp/ppp.conf > +OLD_FILES+=etc/syslog.d/ppp.conf > OLD_DIRS+=etc/ppp > OLD_FILES+=usr/sbin/ppp > OLD_FILES+=usr/sbin/pppctl > @@ -7473,6 +7481,7 @@ OLD_FILES+=usr/share/man/man8/rtquery.8. > .endif > > .if ${MK_SENDMAIL} == no > +OLD_FILES+=etc/newsyslog.conf.d/sendmail.conf > OLD_FILES+=etc/periodic/daily/150.clean-hoststat > OLD_FILES+=etc/periodic/daily/440.status-mailq > OLD_FILES+=etc/periodic/daily/460.status-mail-rejects > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sat May 13 16:25:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6432D6B01F for ; Sat, 13 May 2017 16:25:39 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 675C31D2 for ; Sat, 13 May 2017 16:25:38 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: a1e6d573-37f8-11e7-b96e-2378c10e3beb X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.eu.mailhop.org (Halon) with ESMTPSA id a1e6d573-37f8-11e7-b96e-2378c10e3beb; Sat, 13 May 2017 16:24:27 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v4DGOLRR004128; Sat, 13 May 2017 10:24:21 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1494692660.59865.85.camel@freebsd.org> Subject: Re: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk From: Ian Lepore To: rgrimes@freebsd.org, Ngie Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sat, 13 May 2017 10:24:20 -0600 In-Reply-To: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> References: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 16:25:39 -0000 On Sat, 2017-05-13 at 08:37 -0700, Rodney W. Grimes wrote: > > > > Author: ngie > > Date: Sat May 13 03:10:50 2017 > > New Revision: 318250 > > URL: https://svnweb.freebsd.org/changeset/base/318250 > > > > Log: > >   Handle the logfiles in newsyslog and syslogd conditionally, based on > >   src.conf(5) knobs > >    > >   This will allow consumers of FreeBSD to use the unmodified configuration > >   files out of the box more than previously. > What about simply generating proper newsyslog.conf and syslog.conf based > on the the MK_ values rather than change the visible administration > interface that has finger memory, ansible, and puppet support? > The evolution for years has been away from monolithic config files containing a mashup of values for unrelated subsystems and towards .conf.d directories containing many single-subject files.  The monolithic files are difficult to edit and otherwise manage programmatically, and especially difficult to manage in terms of software packaging and software updates. -- Ian From owner-svn-src-head@freebsd.org Sat May 13 16:28:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF8B5D6B0A4; Sat, 13 May 2017 16:28:38 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D23F2376; Sat, 13 May 2017 16:28:38 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 101BD1A54; Sat, 13 May 2017 16:28:38 +0000 (UTC) Date: Sat, 13 May 2017 16:28:38 +0000 From: Alexey Dokuchaev To: rgrimes@freebsd.org Cc: Ngie Cooper , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk Message-ID: <20170513162838.GB84947@FreeBSD.org> References: <201705130310.v4D3ApUl085738@repo.freebsd.org> <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> User-Agent: Mutt/1.7.1 (2016-10-04) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 16:28:39 -0000 On Sat, May 13, 2017 at 08:37:42AM -0700, Rodney W. Grimes wrote: > > New Revision: 318250 > > URL: https://svnweb.freebsd.org/changeset/base/318250 > > > > Log: > > Handle the logfiles in newsyslog and syslogd conditionally, based on > > src.conf(5) knobs > > > > This will allow consumers of FreeBSD to use the unmodified configuration > > files out of the box more than previously. > > What about simply generating proper newsyslog.conf and syslog.conf based > on the the MK_ values rather than change the visible administration > interface that has finger memory, ansible, and puppet support? +1. I've always loved FreeBSD for its simplicity, and having to know/care about one or two config files is one of it; these *.d populated directories smell like Linux too much. I understand the reason behind supporting those for ports, but please don't plague our base with this one-line config files scattered around idiocy. ./danfe From owner-svn-src-head@freebsd.org Sat May 13 16:29:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F231D6B12A; Sat, 13 May 2017 16:29:54 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x243.google.com (mail-pg0-x243.google.com [IPv6:2607:f8b0:400e:c05::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F37626EB; Sat, 13 May 2017 16:29:53 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x243.google.com with SMTP id i63so11347981pgd.2; Sat, 13 May 2017 09:29:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=ocLYMLPUgKWH+JIa5sF+7kk1xH1u9S1ovkFIXpCbmLw=; b=ur0fthpnNUKlx75NiTw4XIV0skuT5LF61VgbJvu+/h4AN9RfnLxCDZnrg3RXnhF6HV /86DAu2dYLhXbPdBIjJeeRvAwiiweEd6AH1NmuXgxX4WvmcPs6OlO8cLq+y3//SyYCcq MUvkz2jER3mNBST+vXmijo+OKbt/nDivmoIdkd3aApoVPADKfgcPoLjyaB9C3h82W0ag urJMRrsgCvc06YKXtmCiE2fr2Qpo3N8e9wGuH35K1A8xXCbeWCoocCwn0MOqF+19GxRA IDkYEgxQZ18A709gucBWGOpFMNvfxqC/QgzEZRc70at/9p4Py/bmvf2ofm8hEzSp+c+3 5qRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=ocLYMLPUgKWH+JIa5sF+7kk1xH1u9S1ovkFIXpCbmLw=; b=NnNAVI8j9Iy7jHrXjly9hTtcceWFRU50J4NntNXQZM8JDOYT0SSpec6G4UW1/4p+G8 dc6qPqBQUofFt4kKpDz6aqUPey4A8HPjHKWBdR/LHlALH9Kwt12cAhqZeojGRy4L0GAt jOpYZ98Ifat7Jssto+GwVt/mWkn1imcGYMfZVzuZVs5EAXPuJlqwpg9Vw+GMBoNgzezA 0DkZGvmTLOPw/NlNyAdZ9SBtCoQScCR9Phonk+gaDvQwOlcBIqcgArLIroa84c2Cdl0A SMQid6DN18entJIFe3m0BNVjYmJ9ILXZaeRwdyrZJtDSEOj348wXTpoSPsY3sPbjr9ME UpuA== X-Gm-Message-State: AODbwcDwbW9bzWoogR4HOQWmtoXliYHl9AIo3f0rJwjnGh2ZlHLp4znx 63l33Ln5iIGttCBWVWk= X-Received: by 10.84.141.129 with SMTP id 1mr12788765plv.75.1494692993315; Sat, 13 May 2017 09:29:53 -0700 (PDT) Received: from [192.168.20.13] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id e4sm10217109pfe.96.2017.05.13.09.29.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 May 2017 09:29:52 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk From: Ngie Cooper X-Mailer: iPhone Mail (14E304) In-Reply-To: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> Date: Sat, 13 May 2017 09:29:51 -0700 Cc: Ngie Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> To: rgrimes@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 16:29:54 -0000 On May 13, 2017, at 08:37, Rodney W. Grimes = wrote: >> Author: ngie >> Date: Sat May 13 03:10:50 2017 >> New Revision: 318250 >> URL: https://svnweb.freebsd.org/changeset/base/318250 >>=20 >> Log: >> Handle the logfiles in newsyslog and syslogd conditionally, based on >> src.conf(5) knobs >>=20 >> This will allow consumers of FreeBSD to use the unmodified configuration= >> files out of the box more than previously. >=20 > What about simply generating proper newsyslog.conf and syslog.conf based > on the the MK_ values rather than change the visible administration > interface that has finger memory, ansible, and puppet support? - My employer doesn't use puppet on its appliances. - Files snapshotted in time bitrot (which was the case with our configs, whi= ch is part of the reason behind this change. - It's really easy to screw up a mergemaster call if you edit the files, and= install the stock version which removes the edits. Thanks, -Ngie= From owner-svn-src-head@freebsd.org Sat May 13 16:32:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6651BD6B2EC; Sat, 13 May 2017 16:32:38 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x242.google.com (mail-pf0-x242.google.com [IPv6:2607:f8b0:400e:c00::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2EDE9B13; Sat, 13 May 2017 16:32:38 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x242.google.com with SMTP id u26so10499155pfd.2; Sat, 13 May 2017 09:32:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=rSZ/EcO7zxEex2JwET6SlykQHCQLYs0Y4eLZWpDtUJc=; b=pfsTtgWwX3YEa9Id6Sn3vGslJ+Yj+zzlFhjktK5ZhKMDwd3622goknZu/lYDFl6L2c sDymivqm/z/iwo0m2+gPIZ4hJlXDNUxTFLeV5qCinWd/D1tdY+Y790/t874bG8JA4gI6 5mDL2GMdtB/MVAhLKPDPDlE4KBKYTe2BFCZ9CXncNvF0A9G5IJX8mckCbmZicSzeNLsb TtW8dCiVWPu1pfqZ0uM8Jahm2qxuS6IFTGHQpnsaVGBj/5fo4ac4NMJQJJdGMDb45gBU BFYcaQJvWnQZU5Ke/fzOpMgdWnDBCUrUQm5sNOZgUwnO2TBW+zbaaEUvsQqaOhADNNR2 Ywsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=rSZ/EcO7zxEex2JwET6SlykQHCQLYs0Y4eLZWpDtUJc=; b=Fzv6KO9rI8+ofpLOMgqNum1SLQlmr8jkjRVAICfQG/F8PpACTuYC/BhYhcGzua1zdX 76lSd/7kfmMbHMUa+ORiRp45zhwIAfgM/jjzO3HxSoXr/2bNEYzWO55IsLIizvmQwCgP sKhH4L+IUeK+o8Tht9HbASk2+b0RGwX5TN2E9BBHPFq58yVsgF7lz+j7Vy6KHOfxAu17 QPupoiay2A8yhPxU8huE4FALpQx4gg33XyWSjWR39/17Fy0HZVQ3G5fXDbiKdR3Ao7ps AixLO4s5q7L0EA32vCBiH+L3CFqYJZezlZ5lCAP6XWwkP9uHhs8Ifkf0Um2JGebNXcot tScg== X-Gm-Message-State: AODbwcDwxpF4Qab6Vy34gCHgB9ZGIKn2j6ZsoWcpvr0yOOoRJw8jUTCG 7gBAnbZZASAZmmeUzIs= X-Received: by 10.84.224.200 with SMTP id k8mr13611115pln.49.1494693157519; Sat, 13 May 2017 09:32:37 -0700 (PDT) Received: from [192.168.20.13] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id 7sm10915861pff.36.2017.05.13.09.32.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 May 2017 09:32:36 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk From: Ngie Cooper X-Mailer: iPhone Mail (14E304) In-Reply-To: Date: Sat, 13 May 2017 09:32:36 -0700 Cc: Ngie Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> To: rgrimes@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 16:32:38 -0000 > On May 13, 2017, at 09:29, Ngie Cooper wrote: >=20 > On May 13, 2017, at 08:37, Rodney W. Grimes wrote: >=20 >>> Author: ngie >>> Date: Sat May 13 03:10:50 2017 >>> New Revision: 318250 >>> URL: https://svnweb.freebsd.org/changeset/base/318250 >>>=20 >>> Log: >>> Handle the logfiles in newsyslog and syslogd conditionally, based on >>> src.conf(5) knobs >>>=20 >>> This will allow consumers of FreeBSD to use the unmodified configuration= >>> files out of the box more than previously. >>=20 >> What about simply generating proper newsyslog.conf and syslog.conf based >> on the the MK_ values rather than change the visible administration >> interface that has finger memory, ansible, and puppet support? >=20 > - My employer doesn't use puppet on its appliances. > - Files snapshotted in time bitrot (which was the case with our configs, w= hich is part of the reason behind this change. > - It's really easy to screw up a mergemaster call if you edit the files, a= nd install the stock version which removes the edits. Also, programmatically removing the entries means you have to bake the metad= ata into etc/Makefile, which is already complicated enough as-is. Thanks, -Ngie= From owner-svn-src-head@freebsd.org Sat May 13 16:39:17 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 704F9D6B397 for ; Sat, 13 May 2017 16:39:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x229.google.com (mail-io0-x229.google.com [IPv6:2607:f8b0:4001:c06::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2A13DCC3 for ; Sat, 13 May 2017 16:39:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x229.google.com with SMTP id p24so54828867ioi.0 for ; Sat, 13 May 2017 09:39:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=HbZCQ/YfeUyhHxvJ86bwGonNQZZ2UR7bYETppkJ+Ubw=; b=CQ4Bj25tNul6OL92dZMz4MuiQ9pDi8Hmy/+BA+4TR3tNt4xvpodfd3crDfUt9NhsHb zfSwRkx5WYdgMrO2hBj/Uh6GCIVne9cng5RCQwqqcwjbx4/JW8hGL9B+lsyMJsV49gIu WBy9UuAwlSVre42h7H8eI6BByaCGmDiyzipryiGAMaKp+ciyNLX7W85nbkae+BiXfLPI 7pWGbJtxZaobKOWsEB0eSzAUlTBNUHuj4wEjyGOpAwYQX87Nwk6J5RMkpG6f5S0pXqfu b0MGDOykEMLHy8p/Xq+19Jm5FKLu8AkOzVJr/j76JWFvCngXDPxaT1yq3ve0RXyCCG53 P/Tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=HbZCQ/YfeUyhHxvJ86bwGonNQZZ2UR7bYETppkJ+Ubw=; b=q5XJxOZFyvSHA5aetLjwkHUz9M913ffkGFNd1PVcctjX75pso+0AYd9/eUPDyvG9AX KsUt0PEsTPpQvSEWWvf6rC9EcIGrKdOu/5pLTEgvtkZiV1zE/XoPDBPiyvTseMkgVU2o 9D5OKALeNQA0mxzwMtW/pR1qEvrMogf4LISVZg6M221kfj7RRVxZT8awo3KY7SNSoW9X +31ieUMAHsNVVz5EM7q2js+qWc3hIQUxiBbO9uEffsDqaaNrRM2k8QuAmyFUEE58zvDS qPAme0GKI/00F9DXie9mPHO1rQ7eS0/9nZc8AZGUgi1AB1dJIOMtFOuQKK6bHVfKScZw WQ+Q== X-Gm-Message-State: AODbwcBO4jPZTBVUNZnRgdvME6XtM0Foi4QbM/E2HZpfeKfsD1jViUnJ PMAXgPhFC6Z4P58pLQm6GQUyRvuAtg== X-Received: by 10.107.85.4 with SMTP id j4mr9557338iob.218.1494693556442; Sat, 13 May 2017 09:39:16 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.126.6 with HTTP; Sat, 13 May 2017 09:39:15 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:5c7c:18cc:3900:fa11] In-Reply-To: References: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> From: Warner Losh Date: Sat, 13 May 2017 10:39:15 -0600 X-Google-Sender-Auth: XhPw2u20NXQRJme6PFYXNoSOaWg Message-ID: Subject: Re: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk To: Ngie Cooper Cc: "Rodney W. Grimes" , Ngie Cooper , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 16:39:17 -0000 On Sat, May 13, 2017 at 10:32 AM, Ngie Cooper wrote: > >> On May 13, 2017, at 09:29, Ngie Cooper wrote: >> >> On May 13, 2017, at 08:37, Rodney W. Grimes wrote: >> >>>> Author: ngie >>>> Date: Sat May 13 03:10:50 2017 >>>> New Revision: 318250 >>>> URL: https://svnweb.freebsd.org/changeset/base/318250 >>>> >>>> Log: >>>> Handle the logfiles in newsyslog and syslogd conditionally, based on >>>> src.conf(5) knobs >>>> >>>> This will allow consumers of FreeBSD to use the unmodified configuration >>>> files out of the box more than previously. >>> >>> What about simply generating proper newsyslog.conf and syslog.conf based >>> on the the MK_ values rather than change the visible administration >>> interface that has finger memory, ansible, and puppet support? >> >> - My employer doesn't use puppet on its appliances. >> - Files snapshotted in time bitrot (which was the case with our configs, which is part of the reason behind this change. couldn't you have an Isilion config file in the appropriate directory instead? And use the default newsyslog / syslog config files? >> - It's really easy to screw up a mergemaster call if you edit the files, and install the stock version which removes the edits. > > Also, programmatically removing the entries means you have to bake the metadata into etc/Makefile, which is already complicated enough as-is. Why do you care about removing them at all? They are no-ops if the files don't exist. Why not just always install all these files is where I'm going with this... Warner From owner-svn-src-head@freebsd.org Sat May 13 16:51:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5EC90D6B7CC; Sat, 13 May 2017 16:51:46 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3EEFB128E; Sat, 13 May 2017 16:51:46 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 5AB861F6E; Sat, 13 May 2017 16:51:45 +0000 (UTC) Date: Sat, 13 May 2017 16:51:45 +0000 From: Alexey Dokuchaev To: Ian Lepore Cc: rgrimes@freebsd.org, Ngie Cooper , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk Message-ID: <20170513165145.GC84947@FreeBSD.org> References: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> <1494692660.59865.85.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1494692660.59865.85.camel@freebsd.org> User-Agent: Mutt/1.7.1 (2016-10-04) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 16:51:46 -0000 On Sat, May 13, 2017 at 10:24:20AM -0600, Ian Lepore wrote: > ... > The evolution for years has been away from monolithic config files > containing a mashup of values for unrelated subsystems and towards > .conf.d directories containing many single-subject files. This "evolution" had probably originated in people's minds who know little about software development and maintenance. And FWIW, newsyslog files are not about "unrelated subsystems", it's about one subsystem responsible for log rotation. Speaking of "unrelated subsystems", /etc/rc.conf is a living manifestation of how "unrelated subsystems" can be configured in a single file and, mind you, everyone is being quite happy about it. > The monolithic files are difficult to edit Quite on the contrary: monolithic files are much easier to edit and keep track of by a human being (system operator). > and otherwise manage programmatically, and especially difficult to manage > in terms of software packaging and software updates. Please don't mix "difficult to edit" and "manage programmatically". As I have said, having support for "include *.conf.d" makes sense for 3rd-party software (read: ports), but has little need for the base, and IMHO brings more maintenance burden than any benefit. ./danfe From owner-svn-src-head@freebsd.org Sat May 13 17:09:48 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54024D6B0CE; Sat, 13 May 2017 17:09:48 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x241.google.com (mail-pg0-x241.google.com [IPv6:2607:f8b0:400e:c05::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1C1C21D56; Sat, 13 May 2017 17:09:48 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x241.google.com with SMTP id h64so6695460pge.3; Sat, 13 May 2017 10:09:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=ers6k7lmFDYo98YneDXyvqCF/3tfvnBfbuj/10TMtmE=; b=dv1yZoSBJjEl8KaDtZ6XQHDjrdiGTY5cxa+7jiMdeMkwU64A1l5dBtlPwRAm/ErFyR rTllhVNJ0F8nUrazBsxn9Dw/y4Yx/QG6LZddchZZU7+I3pA49Lqkjd64B6WFys09PXPO lQLqKrM2X+5jGEwk3VRsSIrSCJvnEflySfKEOuj08XyDPhBvoORydHzjGFzwCchdf69h zLC+zQp2DWKbVHxd6irBcgKV+ltfbp8ILP6PqHaUTUOxWEJ1ybqnknFpcL0UIArqJnuj a7ziNxLTLeI6NNFi29hW3Ff+Ukyqt1VA582LaYLQ94BC6jwGi/DTIeObIBBHx8TJg3fF Rvtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=ers6k7lmFDYo98YneDXyvqCF/3tfvnBfbuj/10TMtmE=; b=HHd9e0M6fXv2VAFNWbmbvax4aSpIvjPel+pGwKTXyQwDH8CjygYdWbDQHnUMy6TY3S Jyq4s8nEPKv/1UItvYwKD945tqNg2UquRWX4+r/4QBf4GrsoEL5cloZjzqctbzh4BuRn 1j4FIjaEim91LUmK2URIsK57y/Syk2ZdJDs+Q7I0TPYfGjPbopklLYOPmYJGolTrdMvv Ngxi6rcNPeEaGWkrByxLAXcUj0/BN+iTSCUmrBXTQjH4iREdUh5dNq2v1YRR6yXd3/wM dpZbcgmOGFWrJe6NkslX1wnd+4lZ8WPuyeM4LkFcuJl0aGgPNp7JEynzsm+1Bs4eZKhM vQBg== X-Gm-Message-State: AODbwcD185b+hH2hcP8Enxl6F8Lk1vGxnscx+JKLbPb94GzylmzAF1Rh m4S0bivNuKcAtg== X-Received: by 10.99.54.137 with SMTP id d131mr10450389pga.72.1494695387649; Sat, 13 May 2017 10:09:47 -0700 (PDT) Received: from fuji-wireless.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id e5sm16108332pga.13.2017.05.13.10.09.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 May 2017 10:09:46 -0700 (PDT) From: "Ngie Cooper (yaneurabeya)" Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_9100C495-705F-4A7A-8839-5639A9A68FFD"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk Date: Sat, 13 May 2017 10:09:52 -0700 In-Reply-To: Cc: "Rodney W. Grimes" , Ngie Cooper , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" To: Warner Losh References: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> X-Mailer: Apple Mail (2.3273) X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 17:09:48 -0000 --Apple-Mail=_9100C495-705F-4A7A-8839-5639A9A68FFD Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On May 13, 2017, at 9:39 AM, Warner Losh wrote: >=20 > On Sat, May 13, 2017 at 10:32 AM, Ngie Cooper > wrote: >>=20 >>> On May 13, 2017, at 09:29, Ngie Cooper = wrote: >>>=20 >>> On May 13, 2017, at 08:37, Rodney W. Grimes = wrote: >>>=20 >>>>> Author: ngie >>>>> Date: Sat May 13 03:10:50 2017 >>>>> New Revision: 318250 >>>>> URL: https://svnweb.freebsd.org/changeset/base/318250 >>>>>=20 >>>>> Log: >>>>> Handle the logfiles in newsyslog and syslogd conditionally, based = on >>>>> src.conf(5) knobs >>>>>=20 >>>>> This will allow consumers of FreeBSD to use the unmodified = configuration >>>>> files out of the box more than previously. >>>>=20 >>>> What about simply generating proper newsyslog.conf and syslog.conf = based >>>> on the the MK_ values rather than change the visible administration >>>> interface that has finger memory, ansible, and puppet support? >>>=20 >>> - My employer doesn't use puppet on its appliances. >>> - Files snapshotted in time bitrot (which was the case with our = configs, which is part of the reason behind this change. >=20 > couldn't you have an Isilion config file in the appropriate directory > instead? And use the default newsyslog / syslog config files? I=E2=80=99m not sure I=E2=80=99m in disagreement with this statement, = but the fact is that there are a handful of config files, about 200 = lines each, which drive newsyslog/syslogd on OneFS, with a fair amount = of duplication. I=E2=80=99m trying to simplify the mess I=E2=80=99m = presented with at work, one bit at a time. >>> - It's really easy to screw up a mergemaster call if you edit the = files, and install the stock version which removes the edits. >>=20 >> Also, programmatically removing the entries means you have to bake = the metadata into etc/Makefile, which is already complicated enough = as-is. >=20 > Why do you care about removing them at all? They are no-ops if the > files don't exist. Why not just always install all these files is > where I'm going with this=E2=80=A6 I don=E2=80=99t follow. Could you please restate this paragraph? Thanks, -Ngie --Apple-Mail=_9100C495-705F-4A7A-8839-5639A9A68FFD Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJZFz3gAAoJEPWDqSZpMIYV5dAP/REv7uL4OCv1mMMMShFpHQgG v1P+4qx9JRw+o+AEIuk9FNN5we2Utz4chTSYsoZzidrEJoqIj4vQZHVLVpiy+8/p TnqHguzPI6NawkjJIy1u0/cQS0esrOr808wuYpS2pxlQUllZNA1VQ2Sztgdd6LU9 zL2GMeRKRWLUQlUkImgCz1Nmgky+2lB+dL3kR4yuAf2b3Lnqr5YIfrMX0fhMYEmw Pp11ybVuDRBEMvSzWLGh/tCTyj6L3EuwJEU5F6JjUrgZAlrao6sKSNeZnrJk6ORa p2o2TnTFlV5lZouPwDnP7MLTK9/gt5z1qvv7Wbuil0vjNJRbQNDHWj0bdCEsU/ze 0Wu1vnVDPy5R5jBv9ZGTZcge08mQEeiu0/0G9JFn76na8IudSG8HmhPgeQvy3BXH 5sr+S90JTVz+IRO98SroK4qy+2n1UZw5BL0/2nVvLBhRDNmYrPL9MD9UpdTZGbgI 4P/6vLZpYGT2DCwpMGTDqY/hRpesLR9G0BiHBgKY4M29UqOItJuXG8A0PYOTDlM2 tDzH2lpMRnfHjhriIDg8qzTfaNUpf9dqDjYAR07Se1hcHnwUYU86Qo28g5CEPBbE uL+DvO8/s19Ye2Cv3GYdFwabEVnBCTZPAI+9KA1Qa7Od90rV+137Z843YkDaoDjS vQhg1DBofkOi1S0CQAjj =LJZA -----END PGP SIGNATURE----- --Apple-Mail=_9100C495-705F-4A7A-8839-5639A9A68FFD-- From owner-svn-src-head@freebsd.org Sat May 13 17:21:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8134D6B67E; Sat, 13 May 2017 17:21:29 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x242.google.com (mail-pf0-x242.google.com [IPv6:2607:f8b0:400e:c00::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B3BEF777; Sat, 13 May 2017 17:21:29 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x242.google.com with SMTP id w69so10598228pfk.1; Sat, 13 May 2017 10:21:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=YWStF9UE6UUwSI9yQQjNKdeuBuR4vvX2p0hWy+ZmazI=; b=bxrAa6UQ8/rLFdySJq9DsSo8tDBmzg2a2eE6VXMBKSjOp8bsHgqxvrKAtMUS51XeVM y8PiGUoZyTOnZgkDBwNWAhVNhtitx4OYPvuK7vyBlmO5rossCdtIRpD/RlAKXxtTMtFg ytzYlDOh+FuC7ZEldqpIlx5abLqsCE/91FHhhsrkTkqPwNgY7bsNSo0CC1l1S04aypFk MzwR+gginZKA1sbEx0fLZmlJqQBN3ziRwtqrBteqHNQU3/x3DaLTFuR/v8jh6h0pX+/w NKwQYkzLZLOpc/B1KoIzQonIfMXePG7ec0FYFHXzWaSF++QxJMQXTmMf77eDjcxY/7xn Lh6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=YWStF9UE6UUwSI9yQQjNKdeuBuR4vvX2p0hWy+ZmazI=; b=ZHp7doI0jM86i5vCYpbsHWzhbEftAPuEe3WMCqe8TvJNdpIibMdwmrXXYuxRF7DbE0 O7ZUgVcqy+yMOCb1u1tDKMq74fNvzTPzbzt7HK5OQCYKf/Gf6vg7iKK+OQ58c+BkxcOv je1BJcGj5oYZeD8iyz7DDaLGwY5Oa5O5lsPLgW+o9CmK7lLPkeQNRboTaWCeNppqNXmC vUJ/8YxYWJpClOvyJlryrt78LoqTaXlf1mSziUrX7IODYU+DKMMyX4ahD8NWtG7l+7CN 7xQ6XLZ/UUWhiEtYWoOtzDjaZ/brT7EHsBcNBXG63eBskear/4tpI54QAUk3P5vqkfcL pvSQ== X-Gm-Message-State: AODbwcC7GD0irjpNEjhezJ06rsEF/JzFX1zjatclFwGYdCOi54FcRcgJ R/o7s1/esXRTvNz5GVw= X-Received: by 10.98.201.212 with SMTP id l81mr10519500pfk.225.1494696089126; Sat, 13 May 2017 10:21:29 -0700 (PDT) Received: from fuji-wireless.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id s18sm12272804pfi.16.2017.05.13.10.21.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 May 2017 10:21:28 -0700 (PDT) From: "Ngie Cooper (yaneurabeya)" Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_80996CD5-7498-4790-A375-2BAA04DC6751"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk Date: Sat, 13 May 2017 10:21:33 -0700 In-Reply-To: <20170513165145.GC84947@FreeBSD.org> Cc: Ian Lepore , rgrimes@freebsd.org, Ngie Cooper , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org To: Alexey Dokuchaev References: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> <1494692660.59865.85.camel@freebsd.org> <20170513165145.GC84947@FreeBSD.org> X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 17:21:30 -0000 --Apple-Mail=_80996CD5-7498-4790-A375-2BAA04DC6751 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On May 13, 2017, at 9:51 AM, Alexey Dokuchaev = wrote: >=20 > On Sat, May 13, 2017 at 10:24:20AM -0600, Ian Lepore wrote: >> ... >> The evolution for years has been away from monolithic config files >> containing a mashup of values for unrelated subsystems and towards >> .conf.d directories containing many single-subject files. >=20 > This "evolution" had probably originated in people's minds who know = little > about software development and maintenance. And FWIW, newsyslog files = are > not about "unrelated subsystems", it's about one subsystem responsible = for > log rotation. This hasn=E2=80=99t really changed with moving to .conf.d. A single = subsystem is managing a series of modular config files, instead of a = single config file. I firmly believe that this was the right general = approach to go. > Speaking of "unrelated subsystems", /etc/rc.conf is a living = manifestation > of how "unrelated subsystems" can be configured in a single file and, = mind > you, everyone is being quite happy about it. =E2=80=A6 except people have to bake in defaults in rc.d scripts for = whether or not services should be disabled because they can=E2=80=99t = put apache defaults in /etc/rc.conf . /etc/rc.conf isn=E2=80=99t managed = via etcupdate or mergemaster, so I think this comparison is like apples = to oranges. >> The monolithic files are difficult to edit >=20 > Quite on the contrary: monolithic files are much easier to edit and = keep > track of by a human being (system operator). I strongly disagree, having seen multiple configuration files a couple = hundred lines long. It gets messy and for those who don=E2=80=99t = understand how syslogd/newsyslog works (inevitably, these people are the = ones that get charged with implementing daemons, and this is one of the = pieces that needs to be done). >> and otherwise manage programmatically, and especially difficult to = manage >> in terms of software packaging and software updates. >=20 > Please don't mix "difficult to edit" and "manage programmatically". = As I > have said, having support for "include *.conf.d" makes sense for = 3rd-party > software (read: ports), but has little need for the base, and IMHO = brings > more maintenance burden than any benefit. Can you please provide an example of how it=E2=80=99s more burdensome = going to .conf.d? Personally, I think it=E2=80=99s a whole lot easier = doing `rm -f /etc/newsyslog.d/amd.conf`, than it is to open up the file = and edit out the amd entries, or invoke sed/something else to do the = same thing. Even ansible/chef/puppet would have to bake the configuration removal = logic into its template files, which seems like a pain for folks (and = the same logic would need to be implemented multiple times instead of = once). Thanks, -Ngie --Apple-Mail=_80996CD5-7498-4790-A375-2BAA04DC6751 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJZF0CeAAoJEPWDqSZpMIYVfVIP+wQ8wESMVwC2Zj2KoU0Xs8O3 S5gMXTBLJocE1As2VayrlLp6L03ZkdCTAkrds50klDzr4rTagf4aeuf1g86pw5b4 c17cdVKUFnsTpOnnQu8q/wCuHQoQJ2Zsj/Zb2CPW6nb9hdeOl28AXoyUU7B0YSVm nDXOl9lKxL6CjXvWPOcMHwid7nczupWF3dRnSbxr/+pmCx6VIQ4witsGmOJg3rsi C4vTkInHNHL9o8m2rJmJD4BaVPJnVoh2oFTFg+2kSBVvKmGeHo8omVTy7EpDIpVC 0NVyJV/GvtWsw6sO+aQSdHHJJn56X2lPZh0aopmgSA/rjl/61KjXOjOqMpvCjdDm QULup/DBtPqOdag0UEGfA/1b6Q9QLApnWPRyPKCpP3L2V7EH/Sy2C7dYGGobsMqK ljEjB6DKTCgwXIiYcQqqB/mjV6uR/Wh5kQfURLlc7e6GDI2z66axGfaeY/fnIkar ZxJxzQz0nVglV9aShF8ArvDNavz8/C3ISGOoK+clJ7/hhdAjTy3xZjevD0MYkx4n PZSxc4pMXzCjZA9PlW+5Nl6D/zaIKofCjxjHNWksjaWp/oy5PreCsBUTDfoNYhZa 6d9TUIOJb78vfZT9rj9flbxsexfmJeUcMixzu2fH+E6EZoi6q8mc36KRKvUKmUhK BHPCw3rAZ3eklEAsGmGN =bZit -----END PGP SIGNATURE----- --Apple-Mail=_80996CD5-7498-4790-A375-2BAA04DC6751-- From owner-svn-src-head@freebsd.org Sat May 13 17:49:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A297DD6BD57; Sat, 13 May 2017 17:49:54 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 744C91594; Sat, 13 May 2017 17:49:54 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4DHnr1P057220; Sat, 13 May 2017 17:49:53 GMT (envelope-from jasone@FreeBSD.org) Received: (from jasone@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4DHnrTE057219; Sat, 13 May 2017 17:49:53 GMT (envelope-from jasone@FreeBSD.org) Message-Id: <201705131749.v4DHnrTE057219@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jasone set sender to jasone@FreeBSD.org using -f From: Jason Evans Date: Sat, 13 May 2017 17:49:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318254 - head/lib/libthr/thread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 17:49:54 -0000 Author: jasone Date: Sat May 13 17:49:53 2017 New Revision: 318254 URL: https://svnweb.freebsd.org/changeset/base/318254 Log: Fix __pthread_mutex_trylock() to call THR_CRITICAL_LEAVE() on failure rather than on success. This regression was introduced by r300043 (Add implementation of robust mutexes...). MFC after: 1 day Modified: head/lib/libthr/thread/thr_mutex.c Modified: head/lib/libthr/thread/thr_mutex.c ============================================================================== --- head/lib/libthr/thread/thr_mutex.c Sat May 13 13:03:20 2017 (r318253) +++ head/lib/libthr/thread/thr_mutex.c Sat May 13 17:49:53 2017 (r318254) @@ -631,7 +631,7 @@ __pthread_mutex_trylock(pthread_mutex_t } /* else {} */ if (robust) _mutex_leave_robust(curthread, m); - if ((ret == 0 || ret == EOWNERDEAD) && + if (ret != 0 && ret != EOWNERDEAD && (m->m_flags & PMUTEX_FLAG_PRIVATE) != 0) THR_CRITICAL_LEAVE(curthread); return (ret); From owner-svn-src-head@freebsd.org Sat May 13 18:15:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F29E7D6AD25; Sat, 13 May 2017 18:15:04 +0000 (UTC) (envelope-from lifanov@FreeBSD.org) Received: from mail.lifanov.com (mail.lifanov.com [206.125.175.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D1ABCA29; Sat, 13 May 2017 18:15:04 +0000 (UTC) (envelope-from lifanov@FreeBSD.org) Received: from [10.10.0.1] (unknown [107.15.73.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.lifanov.com (Postfix) with ESMTPSA id 7D949239431; Sat, 13 May 2017 14:07:51 -0400 (EDT) Subject: Re: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk To: "Ngie Cooper (yaneurabeya)" , Alexey Dokuchaev Cc: src-committers@freebsd.org, Ian Lepore , svn-src-all@freebsd.org, rgrimes@freebsd.org, svn-src-head@freebsd.org, Ngie Cooper References: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> <1494692660.59865.85.camel@freebsd.org> <20170513165145.GC84947@FreeBSD.org> From: Nikolai Lifanov Message-ID: Date: Sat, 13 May 2017 14:07:38 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="PnBpcmiaHXBqbuDBXesQ1BAE4GOGavLlH" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 18:15:05 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --PnBpcmiaHXBqbuDBXesQ1BAE4GOGavLlH Content-Type: multipart/mixed; boundary="CuHCJ9R7lqG2XFRKaaW96Ftkh3ldPgmNj"; protected-headers="v1" From: Nikolai Lifanov To: "Ngie Cooper (yaneurabeya)" , Alexey Dokuchaev Cc: src-committers@freebsd.org, Ian Lepore , svn-src-all@freebsd.org, rgrimes@freebsd.org, svn-src-head@freebsd.org, Ngie Cooper Message-ID: Subject: Re: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk References: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> <1494692660.59865.85.camel@freebsd.org> <20170513165145.GC84947@FreeBSD.org> In-Reply-To: --CuHCJ9R7lqG2XFRKaaW96Ftkh3ldPgmNj Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 05/13/2017 13:21, Ngie Cooper (yaneurabeya) wrote: > Even ansible/chef/puppet would have to bake the configuration removal l= ogic into its template files, which seems like a pain for folks (and the = same logic would need to be implemented multiple times instead of once). Having to template one .conf file couples not necessarily related config modules together and it's *a lot* more performant to conditionally install and remove config snippets in .d/ than to expand a template. The separation matters when separate people write separate configuration modules and the performance matters when deciding on frequency of config runs. - Nikolai --CuHCJ9R7lqG2XFRKaaW96Ftkh3ldPgmNj-- --PnBpcmiaHXBqbuDBXesQ1BAE4GOGavLlH Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQKoBAEBCgCSFiEE5oT6TcuaWvG5gtjzZ6sv56ecR0UFAlkXS3VfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEU2 ODRGQTREQ0I5QTVBRjFCOTgyRDhGMzY3QUIyRkU3QTc5QzQ3NDUUHGxpZmFub3ZA ZnJlZWJzZC5vcmcACgkQZ6sv56ecR0XRsg//RLgDDYopkbt4ILhCI1e1cY+HKP16 jTt6y5G0/rjSMsGdnzAPDgXaMsj54kBRl+pkYl3GD7iwZg/ylF1ViYaXwu6oylkS 2unVM9e9dtYOy41wIh3iawpXeCJT3fdpYmenELCWq/SAVXP++nOfK+nyyUqmp03U 8XVEgntchmvzgr8Rv4vse42dMDfVZ8xE4TejQceIktceQRSLfd4pwnKzKmpBqC9o dQhifW5RpzEXUBzu7QfpAg0r12Ygde28LwmI8zSD+vNMOUpPMXU3Im7tIddkHGHx ImmsWPyhZWdwG4SJcI+DZoBHEK/VjuYEuwvRiVYfgtyZ2k4Bf4L4toyTeIdPQpof L3R/sqHGUoDPfiLIzWs8cELHF/kBfkrhM9/bh9HWJogkwxw2BzpXZ+JeThfsV0V3 Ch9Z05EFeNJMNX3AK/HL0Ny1FWvPwPH5vchkNsOwmkaapk7REErC3OiBvw0J8Uyv HeS7kJ1vw88dbKwHa3eZd4IpW86rG9HFs02neiut4zWgqc/ndcS799R0nqCBFMgm FiRWxp0VFoTKT3WE0lpfsWeugCVya+iPfoIqfHcn8xAgzSJ5OzuKvSlyxVOQYqj6 g86Y7AQEZ3RBdQ3VT64fZB8iyesD7yS7JUp2TwjaA/COKVuVUNXsJ4zEJLT5Vg+o 7LDV1ifO/+kPb6A= =OqNk -----END PGP SIGNATURE----- --PnBpcmiaHXBqbuDBXesQ1BAE4GOGavLlH-- From owner-svn-src-head@freebsd.org Sat May 13 18:41:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56968D6B58A; Sat, 13 May 2017 18:41:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1013117A8; Sat, 13 May 2017 18:41:25 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4DIfPHR078153; Sat, 13 May 2017 18:41:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4DIfOnH078151; Sat, 13 May 2017 18:41:25 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705131841.v4DIfOnH078151@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 13 May 2017 18:41:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318255 - in head/sys: netinet netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 18:41:26 -0000 Author: ngie Date: Sat May 13 18:41:24 2017 New Revision: 318255 URL: https://svnweb.freebsd.org/changeset/base/318255 Log: Add missing braces around MCAST_EXCLUDE check when KTR support is compiled into the kernel This ensures that .iss_asm (the number of ASM listeners) isn't incorrectly decremented for MLD-layer source datagrams when inspecting im*s_st[1] (the second state in the structure). MFC after: 2 months PR: 217509 [1] Reported by: Coverity (Isilon) Reviewed by: ae ("This patch looks correct to me." [1]) Submitted by: Miles Ohlrich Sponsored by: Dell EMC Isilon Modified: head/sys/netinet/in_mcast.c head/sys/netinet6/in6_mcast.c Modified: head/sys/netinet/in_mcast.c ============================================================================== --- head/sys/netinet/in_mcast.c Sat May 13 17:49:53 2017 (r318254) +++ head/sys/netinet/in_mcast.c Sat May 13 18:41:24 2017 (r318255) @@ -1047,9 +1047,10 @@ inm_merge(struct in_multi *inm, /*const* /* Decrement ASM listener count on transition out of ASM mode. */ if (imf->imf_st[0] == MCAST_EXCLUDE && nsrc0 == 0) { if ((imf->imf_st[1] != MCAST_EXCLUDE) || - (imf->imf_st[1] == MCAST_EXCLUDE && nsrc1 > 0)) + (imf->imf_st[1] == MCAST_EXCLUDE && nsrc1 > 0)) { CTR1(KTR_IGMPV3, "%s: --asm on inm at t1", __func__); --inm->inm_st[1].iss_asm; + } } /* Increment ASM listener count on transition to ASM mode. */ Modified: head/sys/netinet6/in6_mcast.c ============================================================================== --- head/sys/netinet6/in6_mcast.c Sat May 13 17:49:53 2017 (r318254) +++ head/sys/netinet6/in6_mcast.c Sat May 13 18:41:24 2017 (r318255) @@ -999,9 +999,10 @@ in6m_merge(struct in6_multi *inm, /*cons /* Decrement ASM listener count on transition out of ASM mode. */ if (imf->im6f_st[0] == MCAST_EXCLUDE && nsrc0 == 0) { if ((imf->im6f_st[1] != MCAST_EXCLUDE) || - (imf->im6f_st[1] == MCAST_EXCLUDE && nsrc1 > 0)) + (imf->im6f_st[1] == MCAST_EXCLUDE && nsrc1 > 0)) { CTR1(KTR_MLD, "%s: --asm on inm at t1", __func__); --inm->in6m_st[1].iss_asm; + } } /* Increment ASM listener count on transition to ASM mode. */ From owner-svn-src-head@freebsd.org Sat May 13 18:59:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF2DBD6BA2A; Sat, 13 May 2017 18:59:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74C6E1EC4; Sat, 13 May 2017 18:59:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4DIxRdb085465; Sat, 13 May 2017 18:59:27 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4DIxRJg085464; Sat, 13 May 2017 18:59:27 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705131859.v4DIxRJg085464@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 13 May 2017 18:59:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318256 - head/libexec/rtld-elf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 18:59:28 -0000 Author: kib Date: Sat May 13 18:59:27 2017 New Revision: 318256 URL: https://svnweb.freebsd.org/changeset/base/318256 Log: In _rtld(), reorder local declarations to compact the block and partially sort them by style(9). Move locals declarations from nested blocks into the block at function start. Discussed with: emaste MFC after: 1 week Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Sat May 13 18:41:24 2017 (r318255) +++ head/libexec/rtld-elf/rtld.c Sat May 13 18:59:27 2017 (r318256) @@ -339,22 +339,16 @@ _LD(const char *var) func_ptr_type _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entry **objp) { - Elf_Auxinfo *aux_info[AT_COUNT]; - int i; - int argc; - char **argv; - char **env; - Elf_Auxinfo *aux; - Elf_Auxinfo *auxp; - const char *argv0; + Elf_Auxinfo *aux, *auxp, *aux_info[AT_COUNT]; Objlist_Entry *entry; - Obj_Entry *obj; - Obj_Entry *preload_tail; - Obj_Entry *last_interposer; + Obj_Entry *last_interposer, *obj, *preload_tail; + const Elf_Phdr *phdr; Objlist initlist; RtldLockState lockstate; - char *library_path_rpath; - int mib[2]; + char **argv, *argv0, **env, *kexecpath, *library_path_rpath; + caddr_t imgentry; + char buf[MAXPATHLEN]; + int argc, fd, i, mib[2], phnum; size_t len; /* @@ -477,7 +471,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ * already loaded. */ if (aux_info[AT_EXECFD] != NULL) { /* Load the main program. */ - int fd = aux_info[AT_EXECFD]->a_un.a_val; + fd = aux_info[AT_EXECFD]->a_un.a_val; dbg("loading main program"); obj_main = map_object(fd, argv0, NULL); close(fd); @@ -485,10 +479,6 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ rtld_die(); max_stack_flags = obj->stack_flags; } else { /* Main program already loaded. */ - const Elf_Phdr *phdr; - int phnum; - caddr_t entry; - dbg("processing main program's program header"); assert(aux_info[AT_PHDR] != NULL); phdr = (const Elf_Phdr *) aux_info[AT_PHDR]->a_un.a_ptr; @@ -497,15 +487,12 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ assert(aux_info[AT_PHENT] != NULL); assert(aux_info[AT_PHENT]->a_un.a_val == sizeof(Elf_Phdr)); assert(aux_info[AT_ENTRY] != NULL); - entry = (caddr_t) aux_info[AT_ENTRY]->a_un.a_ptr; - if ((obj_main = digest_phdr(phdr, phnum, entry, argv0)) == NULL) + imgentry = (caddr_t) aux_info[AT_ENTRY]->a_un.a_ptr; + if ((obj_main = digest_phdr(phdr, phnum, imgentry, argv0)) == NULL) rtld_die(); } if (aux_info[AT_EXECPATH] != NULL) { - char *kexecpath; - char buf[MAXPATHLEN]; - kexecpath = aux_info[AT_EXECPATH]->a_un.a_ptr; dbg("AT_EXECPATH %p %s", kexecpath, kexecpath); if (kexecpath[0] == '/') From owner-svn-src-head@freebsd.org Sat May 13 19:59:05 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5932ED6BE9B; Sat, 13 May 2017 19:59:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25C3B1C87; Sat, 13 May 2017 19:59:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4DJx4x2010291; Sat, 13 May 2017 19:59:04 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4DJx4nq010290; Sat, 13 May 2017 19:59:04 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705131959.v4DJx4nq010290@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 13 May 2017 19:59:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318257 - head/usr.bin/localedef X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 19:59:05 -0000 Author: ngie Date: Sat May 13 19:59:03 2017 New Revision: 318257 URL: https://svnweb.freebsd.org/changeset/base/318257 Log: style(9): sort headers MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/usr.bin/localedef/localedef.h Modified: head/usr.bin/localedef/localedef.h ============================================================================== --- head/usr.bin/localedef/localedef.h Sat May 13 18:59:27 2017 (r318256) +++ head/usr.bin/localedef/localedef.h Sat May 13 19:59:03 2017 (r318257) @@ -35,10 +35,10 @@ */ /* Common header files. */ +#include +#include #include #include -#include -#include extern int com_char; extern int esc_char; From owner-svn-src-head@freebsd.org Sat May 13 20:28:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74A5FD6B7EF; Sat, 13 May 2017 20:28:34 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44AFFDB7; Sat, 13 May 2017 20:28:34 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4DKSXcB022815; Sat, 13 May 2017 20:28:33 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4DKSXKp022813; Sat, 13 May 2017 20:28:33 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201705132028.v4DKSXKp022813@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sat, 13 May 2017 20:28:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318258 - head/bin/sh/tests/builtins X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 20:28:34 -0000 Author: jilles Date: Sat May 13 20:28:32 2017 New Revision: 318258 URL: https://svnweb.freebsd.org/changeset/base/318258 Log: sh: Add test for arithmetic expansion in [x-y] pattern range. It does not make much sense to generate the '-' in a pattern bracket expression using arithmetic expansion, but it does not make sense to forbid it either. This test already passes. Added: head/bin/sh/tests/builtins/case21.0 (contents, props changed) Modified: head/bin/sh/tests/builtins/Makefile Modified: head/bin/sh/tests/builtins/Makefile ============================================================================== --- head/bin/sh/tests/builtins/Makefile Sat May 13 19:59:03 2017 (r318257) +++ head/bin/sh/tests/builtins/Makefile Sat May 13 20:28:32 2017 (r318258) @@ -40,6 +40,7 @@ ${PACKAGE}FILES+= case17.0 ${PACKAGE}FILES+= case18.0 ${PACKAGE}FILES+= case19.0 ${PACKAGE}FILES+= case20.0 +${PACKAGE}FILES+= case21.0 ${PACKAGE}FILES+= cd1.0 ${PACKAGE}FILES+= cd2.0 ${PACKAGE}FILES+= cd3.0 Added: head/bin/sh/tests/builtins/case21.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/builtins/case21.0 Sat May 13 20:28:32 2017 (r318258) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +case 5 in +[0$((-9))]) ;; +*) echo bad1 ;; +esac + +case - in +[0$((-9))]) echo bad2 ;; +esac From owner-svn-src-head@freebsd.org Sat May 13 22:36:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7FF7D66FAA; Sat, 13 May 2017 22:36:55 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 835529EC; Sat, 13 May 2017 22:36:55 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4DMasr3077356; Sat, 13 May 2017 22:36:54 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4DMaswD077353; Sat, 13 May 2017 22:36:54 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705132236.v4DMaswD077353@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 13 May 2017 22:36:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318259 - head/lib/msun/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 22:36:56 -0000 Author: dim Date: Sat May 13 22:36:54 2017 New Revision: 318259 URL: https://svnweb.freebsd.org/changeset/base/318259 Log: Silence a -Wunused warning about the junk variable being used to raise an inexact floating point exception. The variable cannot be eliminated, unfortunately, otherwise the desired addition triggering the exception will be emitted neither by clang, nor by gcc. Reviewed by: Steve Kargl, bde MFC after: 3 days Modified: head/lib/msun/src/catrig.c head/lib/msun/src/catrigf.c head/lib/msun/src/catrigl.c Modified: head/lib/msun/src/catrig.c ============================================================================== --- head/lib/msun/src/catrig.c Sat May 13 20:28:32 2017 (r318258) +++ head/lib/msun/src/catrig.c Sat May 13 22:36:54 2017 (r318259) @@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$"); #define isinf(x) (fabs(x) == INFINITY) #undef isnan #define isnan(x) ((x) != (x)) -#define raise_inexact() do { volatile float junk = 1 + tiny; } while(0) +#define raise_inexact() do { volatile float junk __unused = 1 + tiny; } while(0) #undef signbit #define signbit(x) (__builtin_signbit(x)) Modified: head/lib/msun/src/catrigf.c ============================================================================== --- head/lib/msun/src/catrigf.c Sat May 13 20:28:32 2017 (r318258) +++ head/lib/msun/src/catrigf.c Sat May 13 22:36:54 2017 (r318259) @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); #define isinf(x) (fabsf(x) == INFINITY) #undef isnan #define isnan(x) ((x) != (x)) -#define raise_inexact() do { volatile float junk = 1 + tiny; } while(0) +#define raise_inexact() do { volatile float junk __unused = 1 + tiny; } while(0) #undef signbit #define signbit(x) (__builtin_signbitf(x)) Modified: head/lib/msun/src/catrigl.c ============================================================================== --- head/lib/msun/src/catrigl.c Sat May 13 20:28:32 2017 (r318258) +++ head/lib/msun/src/catrigl.c Sat May 13 22:36:54 2017 (r318259) @@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$"); #define isinf(x) (fabsl(x) == INFINITY) #undef isnan #define isnan(x) ((x) != (x)) -#define raise_inexact() do { volatile float junk = 1 + tiny; } while(0) +#define raise_inexact() do { volatile float junk __unused = 1 + tiny; } while(0) #undef signbit #define signbit(x) (__builtin_signbitl(x))