From owner-svn-src-stable-11@freebsd.org Sun Mar 11 17:17:46 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69793F3D6C6 for ; Sun, 11 Mar 2018 17:17:46 +0000 (UTC) (envelope-from oliver.pinter@balabit.com) Received: from mail-io0-x244.google.com (mail-io0-x244.google.com [IPv6:2607:f8b0:4001:c06::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 EE524749D3 for ; Sun, 11 Mar 2018 17:17:45 +0000 (UTC) (envelope-from oliver.pinter@balabit.com) Received: by mail-io0-x244.google.com with SMTP id d71so8763525iog.4 for ; Sun, 11 Mar 2018 10:17:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=balabit-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=CWxCqlodFyER1I8sjS+607lkn84e30o6GJKsTws1QP4=; b=eU3a1yiazeAfbwO1sywQXaesxvlNIlB06K5QMR0WjfZ19hdzWyZEX+CGUJ9Cb/b/Df vG8eb5alOOIHUUSMPX92RDE+knrrhA6X/LtD3z1Td1ffTI302/v4E1X82CUiZPBqNgNe o3UBirB+JwO1Er5yACsQt+WN+7ZVAYN5A3RDOE5A0Ox+XYmsYBZzUIPzQfpn/QfhkSv/ TnVCZz8ynrqKiz2mXwX2d07aq12x/INDQ+E891i9DXOqNbnqA2fDkqCWd89Bv7iDpRlf yrhSlAtxd8m3yIgX9+GRWaa+kUZrQEgPkr05/TplMByrAa0VS5RboEnoCQyjrJDJffuV xq9w== 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=CWxCqlodFyER1I8sjS+607lkn84e30o6GJKsTws1QP4=; b=rtvA7EAb9h7YUEXUDHxH16kI+Mh4fIRkNgWyvxmQqv6JSvvpoAQkKjpgCNCripwGQd cHOoXtL10SdVF6qG8duJTjloVaV3Ko5zJ8t0lRLSQO5xSCbPfp/5ZdWir52vHYkn3GlS KJliUuqwq05raaVpKWxNlGZEJaPOh67oGum0LhAqZMwXJiRi9qr1uqQd+f6NwORE/rEe VGM+JwA5ZFYINuwVGwus4+ZUooqgg5a66pwRy+sao7ezoME6qaaRpOXWOZSCH6dAQ333 fhQe6qOie+wa9rNoZnpOaM4B2Ok5i9N+4zZYFrWlXqKByAbqT6B3oy9TIcM2KwlUNZtU h35g== X-Gm-Message-State: AElRT7FZ5MMjGBSt/whyp/5Opg6eIRPo1YtJ9LqKE7rohDq8qUdDRYJ7 l6BZ7njI3pFaHpXcRxwsAxAhmOk1eddn5KwjNgjRcw== X-Google-Smtp-Source: AG47ELvRMkMiLYwIkMWq+JlkvQAClJpZdp3lwFhfddKisnLYXpgU+q07lNgR2mAs//I+TIQQXYxUNve3VUb44WuWEhE= X-Received: by 10.107.112.21 with SMTP id l21mr6241534ioc.80.1520788665260; Sun, 11 Mar 2018 10:17:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.192.225.141 with HTTP; Sun, 11 Mar 2018 10:17:44 -0700 (PDT) In-Reply-To: References: <201803072318.w27NIrI6056501@pdx.rh.CN85.dnsmgr.net> From: =?UTF-8?B?UGludMOpciwgT2xpdsOpcg==?= Date: Sun, 11 Mar 2018 18:17:44 +0100 Message-ID: Subject: Re: svn commit: r330451 - in stable/11/sys: dev/iwm dev/otus dev/usb/wlan net80211 To: rgrimes@freebsd.org Cc: Eitan Adler , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , svn-src-stable-11@freebsd.org, John Baldwin Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 17:17:46 -0000 On Thu, Mar 8, 2018 at 12:51 PM, Pint=C3=A9r, Oliv=C3=A9r wrote: > > > On Thu, Mar 8, 2018 at 12:18 AM, Rodney W. Grimes < > freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > >> > On 7 March 2018 at 09:37, John Baldwin wrote: >> > > On Tuesday, March 06, 2018 06:46:37 PM Eitan Adler wrote: >> > >> On 6 March 2018 at 08:26, John Baldwin wrote: >> > >> > On Monday, March 05, 2018 07:13:59 PM Eitan Adler wrote: >> > >> >> On 5 March 2018 at 10:08, John Baldwin wrote: >> > >> >> > On Monday, March 05, 2018 07:54:58 AM Eitan Adler wrote: >> > >> >> >> Author: eadler >> > >> >> >> Date: Mon Mar 5 07:54:57 2018 >> > >> >> >> New Revision: 330451 >> > >> >> >> URL: https://svnweb.freebsd.org/changeset/base/330451 >> > >> >> >> >> > >> >> >> Log: >> > >> >> >> MFC r306837: >> > >> >> >> >> > >> >> >> [net80211] extend the ieee80211_rx_stats struct to include >> more information. >> > >> >> > >> > >> >> > Have you thought about the KBI implications of this change and >> some of the >> > >> >> > other changes you've merged? >> > >> >> >> > >> >> I do have a copy of the modules from 11.1 and have loaded them a= t >> > >> >> various points in time after merging. That said, I am not perfec= t. >> > >> >> Unfortunately, my -STABLE box did not have fully functioning >> drivers >> > >> >> before these changes so its difficult to test anything beyond >> "loads >> > >> >> and does not panic.". I havn't done so today yet, but that will >> happen >> > >> >> soon. >> > >> >> >> > >> >> Ensuring these things work through code inspection is certainly >> > >> >> possible and I've skipped over several changes as a result. >> > >> > >> > >> > Loading a module doesn't alone doesn't actually test for breakage= . >> > >> >> > >> I'm aware. In this case I should likely just revert this change sin= ce >> > >> its a pretty blatant break. >> > > >> > > I suspect many of these changes for iwm, etc. are all intertwined so >> I'm not >> > > sure if you can leave out individual ones. >> > >> > Possibly. I do have iwm working on my laptop though. I also know of >> > one open PR assigned to me w.r.t. a model I don't own. I'll be >> > addressing it some time this week. >> >> I believe I also have a tester of stable/11 iwm patches avaliable, >> he has an 8265? >> > > At weekend I will test them. > Sorry, -ENOTIME for 8265 this weekend, but it working fine (and much more stable) with 7260. > > >> >> -- >> Rod Grimes >> rgrimes@freebsd.org >> _______________________________________________ >> svn-src-stable-11@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/svn-src-stable-11 >> To unsubscribe, send any mail to "svn-src-stable-11-unsubscribe >> @freebsd.org" >> > > From owner-svn-src-stable-11@freebsd.org Sun Mar 11 17:40:03 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E49CF403DF; Sun, 11 Mar 2018 17:40:03 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3DF4B75A78; Sun, 11 Mar 2018 17:40:03 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 38A212058B; Sun, 11 Mar 2018 17:40:03 +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 w2BHe3m8086787; Sun, 11 Mar 2018 17:40:03 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2BHe2hT086781; Sun, 11 Mar 2018 17:40:02 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201803111740.w2BHe2hT086781@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 11 Mar 2018 17:40:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330769 - in stable/11: tools/build/mk usr.bin usr.bin/ruptime usr.bin/rwho usr.sbin usr.sbin/rwhod X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in stable/11: tools/build/mk usr.bin usr.bin/ruptime usr.bin/rwho usr.sbin usr.sbin/rwhod X-SVN-Commit-Revision: 330769 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 17:40:03 -0000 Author: emaste Date: Sun Mar 11 17:40:02 2018 New Revision: 330769 URL: https://svnweb.freebsd.org/changeset/base/330769 Log: MFC r322277 by jlh: rwho/ruptime/rwhod shouldn't be gated by RCMDS. As peter@ points out in pr/220953: "rwho, rwhod and ruptime are not part of the remote login suite (rsh, rlogin etc). They should *not* be in the rcmds package which is disabled by default. We rely on rwho/rwhod/ruptime in the freebsd.org cluster." This commit is a re-commit of r322029 and r322031 with a better commit log, as pointed out by ngie@. This also includes the necesary changes to OptionalObsoleteFiles.inc, as requested by jhb@. PR: 220953 Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc stable/11/usr.bin/Makefile stable/11/usr.bin/ruptime/ruptime.1 stable/11/usr.bin/rwho/rwho.1 stable/11/usr.sbin/Makefile stable/11/usr.sbin/rwhod/rwhod.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/11/tools/build/mk/OptionalObsoleteFiles.inc Sun Mar 11 17:21:48 2018 (r330768) +++ stable/11/tools/build/mk/OptionalObsoleteFiles.inc Sun Mar 11 17:40:02 2018 (r330769) @@ -7147,24 +7147,16 @@ OLD_FILES+=usr/share/man/man8/rbootd.8.gz .if ${MK_RCMDS} == no OLD_FILES+=bin/rcp -OLD_FILES+=etc/rc.d/rwho -OLD_FILES+=etc/periodic/daily/140.clean-rwho OLD_FILES+=rescue/rcp OLD_FILES+=usr/bin/rlogin OLD_FILES+=usr/bin/rsh -OLD_FILES+=usr/bin/ruptime -OLD_FILES+=usr/bin/rwho OLD_FILES+=usr/libexec/rlogind OLD_FILES+=usr/libexec/rshd -OLD_FILES+=usr/sbin/rwhod OLD_FILES+=usr/share/man/man1/rcp.1.gz OLD_FILES+=usr/share/man/man1/rlogin.1.gz OLD_FILES+=usr/share/man/man1/rsh.1.gz -OLD_FILES+=usr/share/man/man1/ruptime.1.gz -OLD_FILES+=usr/share/man/man1/rwho.1.gz OLD_FILES+=usr/share/man/man8/rlogind.8.gz OLD_FILES+=usr/share/man/man8/rshd.8.gz -OLD_FILES+=usr/share/man/man8/rwhod.8.gz .endif .if ${MK_RCS} == no Modified: stable/11/usr.bin/Makefile ============================================================================== --- stable/11/usr.bin/Makefile Sun Mar 11 17:21:48 2018 (r330768) +++ stable/11/usr.bin/Makefile Sun Mar 11 17:40:02 2018 (r330769) @@ -133,8 +133,10 @@ SUBDIR= alias \ rpcinfo \ rs \ rup \ + ruptime \ rusers \ rwall \ + rwho \ script \ sdiff \ sed \ @@ -255,8 +257,6 @@ SUBDIR.${MK_OPENSSL}+= newkey SUBDIR.${MK_QUOTAS}+= quota SUBDIR.${MK_RCMDS}+= rlogin SUBDIR.${MK_RCMDS}+= rsh -SUBDIR.${MK_RCMDS}+= ruptime -SUBDIR.${MK_RCMDS}+= rwho SUBDIR.${MK_SENDMAIL}+= vacation SUBDIR.${MK_TALK}+= talk SUBDIR.${MK_TELNET}+= telnet Modified: stable/11/usr.bin/ruptime/ruptime.1 ============================================================================== --- stable/11/usr.bin/ruptime/ruptime.1 Sun Mar 11 17:21:48 2018 (r330768) +++ stable/11/usr.bin/ruptime/ruptime.1 Sun Mar 11 17:40:02 2018 (r330769) @@ -38,15 +38,6 @@ .Nm .Op Fl alrtu .Op Ar host ... -.Sh DEPRECATION NOTICE -.Nm -is deprecated and will be removed from future versions of the -.Fx -base system. -If -.Nm -is still required, it can be installed from ports or packages -(net/bsdrcmds). .Sh DESCRIPTION The .Nm Modified: stable/11/usr.bin/rwho/rwho.1 ============================================================================== --- stable/11/usr.bin/rwho/rwho.1 Sun Mar 11 17:21:48 2018 (r330768) +++ stable/11/usr.bin/rwho/rwho.1 Sun Mar 11 17:40:02 2018 (r330769) @@ -37,15 +37,6 @@ .Sh SYNOPSIS .Nm .Op Fl a -.Sh DEPRECATION NOTICE -.Nm -is deprecated and will be removed from future versions of the -.Fx -base system. -If -.Nm -is still required, it can be installed from ports or packages -(net/bsdrcmds). .Sh DESCRIPTION The .Nm Modified: stable/11/usr.sbin/Makefile ============================================================================== --- stable/11/usr.sbin/Makefile Sun Mar 11 17:21:48 2018 (r330768) +++ stable/11/usr.sbin/Makefile Sun Mar 11 17:40:02 2018 (r330769) @@ -73,6 +73,7 @@ SUBDIR= adduser \ rpc.statd \ rpc.umntall \ rtprio \ + rwhod \ service \ services_mkdb \ sesutil \ @@ -190,7 +191,6 @@ SUBDIR.${MK_PPP}+= ppp SUBDIR.${MK_QUOTAS}+= edquota SUBDIR.${MK_QUOTAS}+= quotaon SUBDIR.${MK_QUOTAS}+= repquota -SUBDIR.${MK_RCMDS}+= rwhod SUBDIR.${MK_SENDMAIL}+= editmap SUBDIR.${MK_SENDMAIL}+= mailstats SUBDIR.${MK_SENDMAIL}+= makemap Modified: stable/11/usr.sbin/rwhod/rwhod.8 ============================================================================== --- stable/11/usr.sbin/rwhod/rwhod.8 Sun Mar 11 17:21:48 2018 (r330768) +++ stable/11/usr.sbin/rwhod/rwhod.8 Sun Mar 11 17:40:02 2018 (r330769) @@ -40,15 +40,6 @@ .Op Fl p .Op Fl l .Op Fl m Op Ar ttl -.Sh DEPRECATION NOTICE -.Nm -is deprecated and will be removed from future versions of the -.Fx -base system. -If -.Nm -is still required, it can be installed from ports or packages -(net/bsdrcmds). .Sh DESCRIPTION The .Nm From owner-svn-src-stable-11@freebsd.org Sun Mar 11 17:43:05 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A413BF4097B; Sun, 11 Mar 2018 17:43:05 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 568A375EA1; Sun, 11 Mar 2018 17:43:05 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5066B2070E; Sun, 11 Mar 2018 17:43:05 +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 w2BHh5Vn091697; Sun, 11 Mar 2018 17:43:05 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2BHh5rI091694; Sun, 11 Mar 2018 17:43:05 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201803111743.w2BHh5rI091694@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 11 Mar 2018 17:43:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330770 - in stable/11/etc: periodic/daily rc.d X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in stable/11/etc: periodic/daily rc.d X-SVN-Commit-Revision: 330770 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 17:43:05 -0000 Author: emaste Date: Sun Mar 11 17:43:04 2018 New Revision: 330770 URL: https://svnweb.freebsd.org/changeset/base/330770 Log: MFC r322552 by jhb: Unconditionally install rwhod support scripts. r322277 moved rwho* and ruptime out of the MK_RCMDS conditional including updating the obsolete files entries to not remove these scripts due to WITHOUT_RCMDS=yes. However, the initial installation was still conditional on MK_RCMDS, so new installs did not include these scripts and upgrades via mergemaster or etcupdate removed them. PR: 220953 Modified: stable/11/etc/periodic/daily/Makefile stable/11/etc/rc.d/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/periodic/daily/Makefile ============================================================================== --- stable/11/etc/periodic/daily/Makefile Sun Mar 11 17:40:02 2018 (r330769) +++ stable/11/etc/periodic/daily/Makefile Sun Mar 11 17:43:04 2018 (r330770) @@ -7,6 +7,7 @@ FILESGROUPS=FILES FILES= 100.clean-disks \ 110.clean-tmps \ 120.clean-preserve \ + 140.clean-rwho \ 200.backup-passwd \ 210.backup-aliases \ 330.news \ @@ -45,14 +46,6 @@ FILES+= 130.clean-msgs FILES+= 480.status-ntpd \ 480.leapfile-ntpd .endif - -.if ${MK_RCMDS} != "no" -FILESGROUPS+= RCMDS -RCMDS+= 140.clean-rwho -.endif -RCMDSDIR= /etc/periodic/daily -RCMDSMODE= ${BINMODE} -RCMDSPACKAGE= rcmds .if ${MK_SENDMAIL} != "no" FILES+= 150.clean-hoststat \ Modified: stable/11/etc/rc.d/Makefile ============================================================================== --- stable/11/etc/rc.d/Makefile Sun Mar 11 17:40:02 2018 (r330769) +++ stable/11/etc/rc.d/Makefile Sun Mar 11 17:43:04 2018 (r330770) @@ -100,6 +100,7 @@ FILES= DAEMON \ rpcbind \ rtadvd \ rtsold \ + rwho \ savecore \ securelevel \ serial \ @@ -277,12 +278,6 @@ SSHPACKAGE= ssh .if ${MK_PF} != "no" FILES+= ftp-proxy -.endif - -.if ${MK_RCMDS} != "no" -FILESGROUPS+= RCMDS -RCMDS+= rwho -RCMDSPACKAGE= rcmds .endif .if ${MK_ROUTED} != "no" From owner-svn-src-stable-11@freebsd.org Sun Mar 11 17:53:48 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89186F41690; Sun, 11 Mar 2018 17:53:48 +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 EF3CE76520; Sun, 11 Mar 2018 17:53:47 +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 w2BHrkpS074878; Sun, 11 Mar 2018 10:53:46 -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 w2BHrk7R074877; Sun, 11 Mar 2018 10:53:46 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201803111753.w2BHrk7R074877@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r330451 - in stable/11/sys: dev/iwm dev/otus dev/usb/wlan net80211 In-Reply-To: To: =?UTF-8?Q?Pint=C3=A9r=2C_Oliv=C3=A9r?= Date: Sun, 11 Mar 2018 10:53:46 -0700 (PDT) CC: rgrimes@freebsd.org, Eitan Adler , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , svn-src-stable-11@freebsd.org, John Baldwin 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-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 17:53:48 -0000 > On Thu, Mar 8, 2018 at 12:51 PM, Pint?r, Oliv?r > wrote: > > > > > > > On Thu, Mar 8, 2018 at 12:18 AM, Rodney W. Grimes < > > freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > > > >> > On 7 March 2018 at 09:37, John Baldwin wrote: > >> > > On Tuesday, March 06, 2018 06:46:37 PM Eitan Adler wrote: > >> > >> On 6 March 2018 at 08:26, John Baldwin wrote: > >> > >> > On Monday, March 05, 2018 07:13:59 PM Eitan Adler wrote: > >> > >> >> On 5 March 2018 at 10:08, John Baldwin wrote: > >> > >> >> > On Monday, March 05, 2018 07:54:58 AM Eitan Adler wrote: > >> > >> >> >> Author: eadler > >> > >> >> >> Date: Mon Mar 5 07:54:57 2018 > >> > >> >> >> New Revision: 330451 > >> > >> >> >> URL: https://svnweb.freebsd.org/changeset/base/330451 > >> > >> >> >> > >> > >> >> >> Log: > >> > >> >> >> MFC r306837: > >> > >> >> >> > >> > >> >> >> [net80211] extend the ieee80211_rx_stats struct to include > >> more information. > >> > >> >> > > >> > >> >> > Have you thought about the KBI implications of this change and > >> some of the > >> > >> >> > other changes you've merged? > >> > >> >> > >> > >> >> I do have a copy of the modules from 11.1 and have loaded them at > >> > >> >> various points in time after merging. That said, I am not perfect. > >> > >> >> Unfortunately, my -STABLE box did not have fully functioning > >> drivers > >> > >> >> before these changes so its difficult to test anything beyond > >> "loads > >> > >> >> and does not panic.". I havn't done so today yet, but that will > >> happen > >> > >> >> soon. > >> > >> >> > >> > >> >> Ensuring these things work through code inspection is certainly > >> > >> >> possible and I've skipped over several changes as a result. > >> > >> > > >> > >> > Loading a module doesn't alone doesn't actually test for breakage. > >> > >> > >> > >> I'm aware. In this case I should likely just revert this change since > >> > >> its a pretty blatant break. > >> > > > >> > > I suspect many of these changes for iwm, etc. are all intertwined so > >> I'm not > >> > > sure if you can leave out individual ones. > >> > > >> > Possibly. I do have iwm working on my laptop though. I also know of > >> > one open PR assigned to me w.r.t. a model I don't own. I'll be > >> > addressing it some time this week. > >> > >> I believe I also have a tester of stable/11 iwm patches avaliable, > >> he has an 8265? ^^^^ Its an 8565, my mistake. > >> > > > > At weekend I will test them. > > > > Sorry, -ENOTIME for 8265 this weekend, but it working fine (and much more > stable) with 7260. Thanks for keeping us informed. I am uncertain as to the state of iwm in stable/11, should the Intel 8565ac work, or not? I have exchanged an additional round of email with the volunteer tester, he says he is running an unmodified stable/11, now trying to find out if he is updating that regular or not. Hopefully we can have some test results soon. Thanks, -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-stable-11@freebsd.org Sun Mar 11 19:30:03 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B0D3F48893 for ; Sun, 11 Mar 2018 19:30:03 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yw0-x231.google.com (mail-yw0-x231.google.com [IPv6:2607:f8b0:4002:c05::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 4FC9D7A7A7 for ; Sun, 11 Mar 2018 19:30:02 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yw0-x231.google.com with SMTP id j143so4095370ywb.4 for ; Sun, 11 Mar 2018 12:30:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=aTJ4C+XyjfbBgkNzuXOJQj9yIXVVaRnxww2dId0D6/U=; b=YY3mhFt1VqE2uKABArN6GbxxFMAuPTre96EOrzVONis0PkgO4AaHGI3A8YlQyA/Oxu UNIjZ1AXoitX6FAB8/ZJkKoCTXQsz3lWkDPqOEaqMPE1DnSgt45sByAm4SmDIZh6cR4D M1GKEx44AvBwMUFnG1o3UFghVUgv9Xf0qRbp0= 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=aTJ4C+XyjfbBgkNzuXOJQj9yIXVVaRnxww2dId0D6/U=; b=Q1d5/OGJ9mdi4ozkfe1DVhaHO0QbEkCrNjJrNzR+sdbYgt2CYMe+321VIx8a85VSJf Yc7Cv+t2ljOPrEGSDSWHaLlsNZbN6sfNCT+sY3tXQq4D52MK8rWgdWvrYu9qMT3uj04a oivjiWt9SsA+eijntmMduOmHO8pEo52c4GXS3f8sOvjwFe6lMt9PWsCiHsdjVsulKZvo Gl6F9mJ4FektKGPyA/9sqEIocsipxDo2VtFYBJp6C0Ahsxt48HXuZjYUmz/8yu/XOEvJ RJAqSly70kQrcBdVSAnzDVVkZMEJY2A9yhuXc9nuz1kWCFxCletcTRCeu5jOANlD6xmt 8TBw== X-Gm-Message-State: AElRT7G0a5U88nroRb8MjLOWEiKdBaR//O83GZ6WXD7hgbiCd+8yUagq Wx66BpWK/IYHoG+HOvnnYzYbYAe2B6K/fwOkcg6KHw== X-Google-Smtp-Source: AG47ELt/7rGieyc/Fnfd5WlAKhpSJ0oh9m4sy3UVeZjFR/xRxK9MnP6X/p15gSUvhElKCCphmKMP6EB1Hj6LYP8pzBU= X-Received: by 10.129.159.132 with SMTP id w126mr11752ywg.141.1520796601499; Sun, 11 Mar 2018 12:30:01 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 2002:a25:23d2:0:0:0:0:0 with HTTP; Sun, 11 Mar 2018 12:29:31 -0700 (PDT) In-Reply-To: <201803111753.w2BHrk7R074877@pdx.rh.CN85.dnsmgr.net> References: <201803111753.w2BHrk7R074877@pdx.rh.CN85.dnsmgr.net> From: Eitan Adler Date: Sun, 11 Mar 2018 12:29:31 -0700 X-Google-Sender-Auth: _k74tZGtUm6BzWc-OGlkUioHFDI Message-ID: Subject: Re: svn commit: r330451 - in stable/11/sys: dev/iwm dev/otus dev/usb/wlan net80211 To: rgrimes@freebsd.org Cc: =?UTF-8?B?UGludMOpciwgT2xpdsOpcg==?= , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , svn-src-stable-11@freebsd.org, John Baldwin Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 19:30:03 -0000 On 11 March 2018 at 10:53, Rodney W. Grimes wrote: >> Sorry, -ENOTIME for 8265 this weekend, but it working fine (and much more >> stable) with 7260. > > Thanks for keeping us informed. > > I am uncertain as to the state of iwm in stable/11, should the > Intel 8565ac work, or not? I have exchanged an additional > round of email with the volunteer tester, he says he is > running an unmodified stable/11, now trying to find out if he > is updating that regular or not. Hopefully we can have some > test results soon. There has been a lot of discussion on this thread and I did not have time to digest it all. That being said - stable works for my hardware - there is one known issue that I have not yet resolved. I originally committed to resolving it this past week, but held off due to the long discussion here - I will take full responsibility for ensuring that anything working before my changes continues to work on stable - however, I will need reports of people who are able to help bisect to the broken changes -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-stable-11@freebsd.org Sun Mar 11 19:46:42 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7602DF49B93; Sun, 11 Mar 2018 19:46:41 +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 0FADD7B51D; Sun, 11 Mar 2018 19:46:39 +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 w2BJkaUX075427; Sun, 11 Mar 2018 12:46:36 -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 w2BJkZBr075426; Sun, 11 Mar 2018 12:46:36 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201803111946.w2BJkZBr075426@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r330451 - in stable/11/sys: dev/iwm dev/otus dev/usb/wlan net80211 In-Reply-To: To: Eitan Adler Date: Sun, 11 Mar 2018 12:46:35 -0700 (PDT) CC: rgrimes@freebsd.org, =?UTF-8?Q?Pint=C3=A9r=2C_Oliv=C3=A9r?= , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , svn-src-stable-11@freebsd.org, John Baldwin 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-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 19:46:42 -0000 > On 11 March 2018 at 10:53, Rodney W. Grimes > wrote: > > >> Sorry, -ENOTIME for 8265 this weekend, but it working fine (and much more > >> stable) with 7260. > > > > Thanks for keeping us informed. > > > > I am uncertain as to the state of iwm in stable/11, should the > > Intel 8565ac work, or not? I have exchanged an additional > > round of email with the volunteer tester, he says he is > > running an unmodified stable/11, now trying to find out if he > > is updating that regular or not. Hopefully we can have some > > test results soon. > > There has been a lot of discussion on this thread and I did not have > time to digest it all. > > That being said > > - stable works for my hardware > - there is one known issue that I have not yet resolved. I originally > committed to resolving it this past week, but held off due to the long > discussion here > - I will take full responsibility for ensuring that anything working > before my changes continues to work on stable > - however, I will need reports of people who are able to help bisect > to the broken changes Simple question you could answer before I have this guy do a bunch of work, *should* the Intel 8565AC work in stable/11 now? There is a specific PR and commit to ^/head that adds this functionality, did that get merged and stay, or ? Thanks, -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-stable-11@freebsd.org Sun Mar 11 19:52:45 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5165FF4A339; Sun, 11 Mar 2018 19:52:45 +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 8DEFD7BBD8; Sun, 11 Mar 2018 19:52:44 +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 w2BJqgiA075491; Sun, 11 Mar 2018 12:52: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 w2BJqgqO075490; Sun, 11 Mar 2018 12:52:42 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201803111952.w2BJqgqO075490@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r330451 - in stable/11/sys: dev/iwm dev/otus dev/usb/wlan net80211 In-Reply-To: <201803111946.w2BJkZBr075426@pdx.rh.CN85.dnsmgr.net> To: rgrimes@freebsd.org Date: Sun, 11 Mar 2018 12:52:42 -0700 (PDT) CC: Eitan Adler , =?UTF-8?Q?Pint=C3=A9r=2C_Oliv=C3=A9r?= , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , svn-src-stable-11@freebsd.org, John Baldwin 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-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 19:52:45 -0000 > > On 11 March 2018 at 10:53, Rodney W. Grimes > > wrote: > > > > >> Sorry, -ENOTIME for 8265 this weekend, but it working fine (and much more > > >> stable) with 7260. > > > > > > Thanks for keeping us informed. > > > > > > I am uncertain as to the state of iwm in stable/11, should the > > > Intel 8565ac work, or not? I have exchanged an additional > > > round of email with the volunteer tester, he says he is > > > running an unmodified stable/11, now trying to find out if he > > > is updating that regular or not. Hopefully we can have some > > > test results soon. > > > > There has been a lot of discussion on this thread and I did not have > > time to digest it all. > > > > That being said > > > > - stable works for my hardware > > - there is one known issue that I have not yet resolved. I originally > > committed to resolving it this past week, but held off due to the long > > discussion here > > - I will take full responsibility for ensuring that anything working > > before my changes continues to work on stable > > - however, I will need reports of people who are able to help bisect > > to the broken changes > > Simple question you could answer before I have this guy do a bunch > of work, *should* the Intel 8565AC work in stable/11 now? There > is a specific PR and commit to ^/head that adds this functionality, > did that get merged and stay, or ? Specifically: from bug 220229 and commit r324434 -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-stable-11@freebsd.org Sun Mar 11 22:49:47 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D187F2D1C0; Sun, 11 Mar 2018 22:49:47 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2680E83593; Sun, 11 Mar 2018 22:49:47 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1AF14236A2; Sun, 11 Mar 2018 22:49:47 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2BMnk2I044356; Sun, 11 Mar 2018 22:49:46 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2BMnkwJ044355; Sun, 11 Mar 2018 22:49:46 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803112249.w2BMnkwJ044355@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 11 Mar 2018 22:49:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330784 - stable/11/sys/dev/iwm X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/iwm X-SVN-Commit-Revision: 330784 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 22:49:47 -0000 Author: eadler Date: Sun Mar 11 22:49:46 2018 New Revision: 330784 URL: https://svnweb.freebsd.org/changeset/base/330784 Log: Revert r324434 Some users are reporting that it is causing issues for their hardware. In the interest of not breaking stable, revert while we investigate. Modified: stable/11/sys/dev/iwm/if_iwm.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/iwm/if_iwm.c ============================================================================== --- stable/11/sys/dev/iwm/if_iwm.c Sun Mar 11 20:13:15 2018 (r330783) +++ stable/11/sys/dev/iwm/if_iwm.c Sun Mar 11 22:49:46 2018 (r330784) @@ -547,14 +547,12 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode { struct iwm_fw_info *fw = &sc->sc_fw; const struct iwm_tlv_ucode_header *uhdr; - const struct iwm_ucode_tlv *tlv; + 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,21 +605,25 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode goto out; } - snprintf(sc->sc_fwver, sizeof(sc->sc_fwver), "%u.%u (API ver %u)", + snprintf(sc->sc_fwver, sizeof(sc->sc_fwver), "%d.%d (API ver %d)", 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)) { - len -= sizeof(*tlv); - tlv = (const void *)data; + while (len >= sizeof(tlv)) { + size_t tlv_len; + const void *tlv_data; - tlv_len = le32toh(tlv->length); - tlv_type = le32toh(tlv->type); - tlv_data = 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; + if (len < tlv_len) { device_printf(sc->sc_dev, "firmware too short: %zu bytes\n", @@ -629,21 +631,19 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode 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 = - le32_to_cpup((const uint32_t *)tlv_data); + le32toh(*(const uint32_t *)tlv_data); /* limit it to something sensible */ if (capa->max_probe_length > IWM_SCAN_OFFLOAD_PROBE_REQ_SIZE) { @@ -674,14 +674,6 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode 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. @@ -693,7 +685,7 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode * 2) TLV_FLAGS contains TLV_FLAGS_PAN * ==> this resets TLV_PAN to itself... hnnnk */ - capa->flags = le32_to_cpup((const uint32_t *)tlv_data); + capa->flags = le32toh(*(const uint32_t *)tlv_data); break; case IWM_UCODE_TLV_CSCHEME: if ((error = iwm_store_cscheme(sc, @@ -714,7 +706,7 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode error = EINVAL; goto parse_out; } - num_of_cpus = le32_to_cpup((const uint32_t *)tlv_data); + num_of_cpus = le32toh(*(const uint32_t *)tlv_data); if (num_of_cpus == 2) { fw->fw_sects[IWM_UCODE_REGULAR].is_dual_cpus = TRUE; @@ -788,7 +780,7 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode goto parse_out; } sc->sc_fw.phy_config = - le32_to_cpup((const uint32_t *)tlv_data); + le32toh(*(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; @@ -839,7 +831,7 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode error = EINVAL; goto parse_out; } - paging_mem_size = le32_to_cpup((const uint32_t *)tlv_data); + paging_mem_size = le32toh(*(const uint32_t *)tlv_data); IWM_DPRINTF(sc, IWM_DEBUG_FIRMWARE_TLV, "%s: Paging: paging enabled (size = %u bytes)\n", @@ -872,7 +864,7 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode goto parse_out; } capa->n_scan_channels = - le32_to_cpup((const uint32_t *)tlv_data); + le32toh(*(const uint32_t *)tlv_data); break; case IWM_UCODE_TLV_FW_VERSION: @@ -897,6 +889,9 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode error = EINVAL; goto parse_out; } + + len -= roundup(tlv_len, 4); + data += roundup(tlv_len, 4); } KASSERT(error == 0, ("unhandled error")); From owner-svn-src-stable-11@freebsd.org Sun Mar 11 22:51:02 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8D33F2D39D for ; Sun, 11 Mar 2018 22:51:02 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yw0-x231.google.com (mail-yw0-x231.google.com [IPv6:2607:f8b0:4002:c05::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 4A9E48374D for ; Sun, 11 Mar 2018 22:51:02 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yw0-x231.google.com with SMTP id k40so994199ywh.12 for ; Sun, 11 Mar 2018 15:51:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=pxp+atD63/vE8Bb8uWfqtOfzvwOJJX2LPGeYVJZ6F/c=; b=uHxqywhx24NUZYOe4PVjMbmvQId4/vJOWWGBVC3C78recKlxJBWLIGkr0G6UyRLkfo WX62vz9DYKEr1zpYUxiaD+m5q4sJWPmjRoesar22/GHVs30R2IpFf1LcPnIFWkddw7WX KTOhRdJtorJX8q3MktwmoMpA5rJgVbV0A59YI= 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:content-transfer-encoding; bh=pxp+atD63/vE8Bb8uWfqtOfzvwOJJX2LPGeYVJZ6F/c=; b=PItQKLfLDhndfWqfXWdDLZceSG+RrCRChFXaEHUIUKVI7Zi7qLy3dz94gnzwFr6lgy EdeiACxlG8G5yOUdhk8YiQEDYIHFYtj5uv1pCimZ1s4GrxvfEsu0Yrf1eORQym+i74DW yHq3I6HM7NkQL2JzEVNB4mOlq7DEWvcCu1KR2sjZWWh22tzyGAyWsz9DD3/EBNvnu/nW Sq1FMRcBOHBVdiXXwqAh9JQzD9ToFQGXvitRN5pOGrYf3shBoQKk6aXEDcMdXfDfVgKl pBjknccioNho0CA6Y+zmMTu1aRxOgPlhD//8kSuUYNAWnXduhJVryQjc2A4xkrAJK8XI jmnA== X-Gm-Message-State: AElRT7F56V2qspK0a+yJ6QR5Q4GLQZRRae+BCNWS200DzE57wHytANYT C4uFki0mJ6iy6F+h4aw1W+tzm2BSi9YKqPFv6uUItg== X-Google-Smtp-Source: AG47ELvAhcMvW1WClGawopfR67fPcQIYtxOnhIoBu+1iW1kachjobKg67xL3+4x70yt8AhqC0XRlgZH9iBmglovskZ4= X-Received: by 10.129.110.86 with SMTP id j83mr3555997ywc.19.1520808661456; Sun, 11 Mar 2018 15:51:01 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 2002:a25:23d2:0:0:0:0:0 with HTTP; Sun, 11 Mar 2018 15:50:30 -0700 (PDT) In-Reply-To: <201803112104.w2BL4uAE042123@nuc.oldach.net> References: <201803112104.w2BL4uAE042123@nuc.oldach.net> From: Eitan Adler Date: Sun, 11 Mar 2018 15:50:30 -0700 X-Google-Sender-Auth: AyCQZolx1hawYSyAtmTdGQUiows Message-ID: Subject: Re: svn commit: r330451 - in stable/11/sys: dev/iwm dev/otus dev/usb/wlan net80211 To: Helge Oldach Cc: =?UTF-8?B?UGludMOpciwgT2xpdsOpcg==?= , rgrimes@freebsd.org, src-committers , John Baldwin , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 22:51:02 -0000 On 11 March 2018 at 14:04, Helge Oldach wrote: > Pint=C3=A9r, Oliv=C3=A9r wrote on Sun, 11 Mar 2018 18:17:44 +0100 (CET): >> On Thu, Mar 8, 2018 at 12:51 PM, Pint=C3=A9r, Oliv=C3=A9r > Reverting r330206 (only, but keeping the succeeding commits) fixed it for= me, as described in the PR. r330206 has been reverted. --=20 Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-stable-11@freebsd.org Mon Mar 12 08:52:35 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 71C5AF2C880 for ; Mon, 12 Mar 2018 08:52:35 +0000 (UTC) (envelope-from oliver.pinter@balabit.com) Received: from mail-io0-x244.google.com (mail-io0-x244.google.com [IPv6:2607:f8b0:4001:c06::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 09594700A3 for ; Mon, 12 Mar 2018 08:52:34 +0000 (UTC) (envelope-from oliver.pinter@balabit.com) Received: by mail-io0-x244.google.com with SMTP id h23so10470276iob.11 for ; Mon, 12 Mar 2018 01:52:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=balabit-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=embZVTQmaUUgc8ErBXF0L0lBrlfVLy6qYpa785Oo35c=; b=fjr9ChRAuJz5NRn1P9qjmbKJzw0j26DeTSQJTpLkKrfC3AE9isaeQTAHwg65xHH450 /4jZtNWli0P9A9JKfj/PDiwWDJn8tI9RaUOr3JgTdDgCmMjhth/USiyTyBwhqacqJB+i e2kf1C330DRu86s4cfKRicwaQEVmCqQWOTij6eN//y2JM72QVr3b10+Vw7eczCamB9Cf FVh9u7GCYlIsIYXnWf/IofYks6THQSY/2Dq4MVbIL1BIHH82UbC/WHVt97dREO8gjeg5 L3/+ihSG12ol96F4C9HqbPHJqyc2deepMc7TWeVb/NgLzf3bcijEc/JZZib2fEIf7OB/ LTpQ== 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=embZVTQmaUUgc8ErBXF0L0lBrlfVLy6qYpa785Oo35c=; b=I8mozMiS6CkRln/xu0BrXHN9hWd7ryL6+IXbi1KbM3QJalfrrhGdFxNhuiJwP80577 I6sUkIhGfQ6hXto4SY/E+wIth5F3sRlvc4Wm/0bXnHsdbWVtVXnrb4ugWnu98+mT10R3 K5004CMrfvGyrnoVOpLGq53CQHLILcD81ThRv0/JLWxBGDSCrL4R+XzgJ4qHs/kbsFJ8 LnYHDzzZbpoMmc6pibnYM1bFuwQoNwIdR5pfHxdrIX/KmixYR1RJwX68YmQo/BXfxad6 SvuVkIVOGbCN7j9zJIjXz/9wzWEu0k5uCWeg+S4MBZxF/ZgA7YqQ+/ZCqhogMF06auEQ QfWA== X-Gm-Message-State: AElRT7GPT+PIl5A6FqFK7PoGVU0iy/gouBkFklCQzE3bKceeUuqCVfLA VsN4n9Uoc7wijrtWxsOotcz9qZ1pYS4ueE+twzqILw== X-Google-Smtp-Source: AG47ELvaKs/WH1JyJtap9Oiw+s9aQM6ixnXKqWUz70Jg2FWBBQnARyVC4PVS4QJ7kXVjKbnikCREoC3tIIxdYvqg2YQ= X-Received: by 10.107.48.3 with SMTP id w3mr7807269iow.84.1520844754324; Mon, 12 Mar 2018 01:52:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.192.225.141 with HTTP; Mon, 12 Mar 2018 01:52:33 -0700 (PDT) In-Reply-To: <201803112249.w2BMnkwJ044355@repo.freebsd.org> References: <201803112249.w2BMnkwJ044355@repo.freebsd.org> From: =?UTF-8?B?UGludMOpciwgT2xpdsOpcg==?= Date: Mon, 12 Mar 2018 09:52:33 +0100 Message-ID: Subject: Re: svn commit: r330784 - stable/11/sys/dev/iwm To: Eitan Adler Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 08:52:35 -0000 On Sun, Mar 11, 2018 at 11:49 PM, Eitan Adler wrote: > Author: eadler > Date: Sun Mar 11 22:49:46 2018 > New Revision: 330784 > URL: https://svnweb.freebsd.org/changeset/base/330784 > > Log: > Revert r324434 > Wrong revision here^ based on this: https://svnweb.freebsd.org/base?view=revision&revision=324434 > > Some users are reporting that it is causing issues for their hardware. > In the interest of not breaking stable, revert while we investigate. > > Modified: > stable/11/sys/dev/iwm/if_iwm.c > Directory Properties: > stable/11/ (props changed) > > Modified: stable/11/sys/dev/iwm/if_iwm.c > ============================================================ > ================== > --- stable/11/sys/dev/iwm/if_iwm.c Sun Mar 11 20:13:15 2018 > (r330783) > +++ stable/11/sys/dev/iwm/if_iwm.c Sun Mar 11 22:49:46 2018 > (r330784) > @@ -547,14 +547,12 @@ iwm_read_firmware(struct iwm_softc *sc, enum > iwm_ucode > { > struct iwm_fw_info *fw = &sc->sc_fw; > const struct iwm_tlv_ucode_header *uhdr; > - const struct iwm_ucode_tlv *tlv; > + 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,21 +605,25 @@ iwm_read_firmware(struct iwm_softc *sc, enum > iwm_ucode > goto out; > } > > - snprintf(sc->sc_fwver, sizeof(sc->sc_fwver), "%u.%u (API ver %u)", > + snprintf(sc->sc_fwver, sizeof(sc->sc_fwver), "%d.%d (API ver %d)", > 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)) { > - len -= sizeof(*tlv); > - tlv = (const void *)data; > + while (len >= sizeof(tlv)) { > + size_t tlv_len; > + const void *tlv_data; > > - tlv_len = le32toh(tlv->length); > - tlv_type = le32toh(tlv->type); > - tlv_data = 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; > + > if (len < tlv_len) { > device_printf(sc->sc_dev, > "firmware too short: %zu bytes\n", > @@ -629,21 +631,19 @@ iwm_read_firmware(struct iwm_softc *sc, enum > iwm_ucode > 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 = > - le32_to_cpup((const uint32_t *)tlv_data); > + le32toh(*(const uint32_t *)tlv_data); > /* limit it to something sensible */ > if (capa->max_probe_length > > IWM_SCAN_OFFLOAD_PROBE_REQ_SIZE) { > @@ -674,14 +674,6 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode > 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. > @@ -693,7 +685,7 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode > * 2) TLV_FLAGS contains TLV_FLAGS_PAN > * ==> this resets TLV_PAN to itself... hnnnk > */ > - capa->flags = le32_to_cpup((const uint32_t > *)tlv_data); > + capa->flags = le32toh(*(const uint32_t *)tlv_data); > break; > case IWM_UCODE_TLV_CSCHEME: > if ((error = iwm_store_cscheme(sc, > @@ -714,7 +706,7 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode > error = EINVAL; > goto parse_out; > } > - num_of_cpus = le32_to_cpup((const uint32_t > *)tlv_data); > + num_of_cpus = le32toh(*(const uint32_t *)tlv_data); > if (num_of_cpus == 2) { > fw->fw_sects[IWM_UCODE_REGULAR].is_dual_cpus > = > TRUE; > @@ -788,7 +780,7 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode > goto parse_out; > } > sc->sc_fw.phy_config = > - le32_to_cpup((const uint32_t *)tlv_data); > + le32toh(*(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; > @@ -839,7 +831,7 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode > error = EINVAL; > goto parse_out; > } > - paging_mem_size = le32_to_cpup((const uint32_t > *)tlv_data); > + paging_mem_size = le32toh(*(const uint32_t > *)tlv_data); > > IWM_DPRINTF(sc, IWM_DEBUG_FIRMWARE_TLV, > "%s: Paging: paging enabled (size = %u > bytes)\n", > @@ -872,7 +864,7 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode > goto parse_out; > } > capa->n_scan_channels = > - le32_to_cpup((const uint32_t *)tlv_data); > + le32toh(*(const uint32_t *)tlv_data); > break; > > case IWM_UCODE_TLV_FW_VERSION: > @@ -897,6 +889,9 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode > error = EINVAL; > goto parse_out; > } > + > + len -= roundup(tlv_len, 4); > + data += roundup(tlv_len, 4); > } > > KASSERT(error == 0, ("unhandled error")); > _______________________________________________ > svn-src-stable-11@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-stable-11 > To unsubscribe, send any mail to "svn-src-stable-11- > unsubscribe@freebsd.org" > From owner-svn-src-stable-11@freebsd.org Mon Mar 12 15:57:56 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E795F50F22; Mon, 12 Mar 2018 15:57:56 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3FCC9827EB; Mon, 12 Mar 2018 15:57:56 +0000 (UTC) (envelope-from brooks@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 360B05DDF; Mon, 12 Mar 2018 15:57:56 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2CFvuut057957; Mon, 12 Mar 2018 15:57:56 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2CFvtYF057954; Mon, 12 Mar 2018 15:57:55 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201803121557.w2CFvtYF057954@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 12 Mar 2018 15:57:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330800 - stable/11/lib/libc/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: stable/11/lib/libc/sys X-SVN-Commit-Revision: 330800 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 15:57:56 -0000 Author: brooks Date: Mon Mar 12 15:57:55 2018 New Revision: 330800 URL: https://svnweb.freebsd.org/changeset/base/330800 Log: MFC r330409: Refer to SysV IPC permissions as numeric constants. POSIX defines no macros for these permissions. Also remove unneeded headers from synopsis. PR: 225905 Reviewed by: wblock Differential Revision: https://reviews.freebsd.org/D14461 Modified: stable/11/lib/libc/sys/msgget.2 stable/11/lib/libc/sys/semget.2 stable/11/lib/libc/sys/shmget.2 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/msgget.2 ============================================================================== --- stable/11/lib/libc/sys/msgget.2 Mon Mar 12 15:45:50 2018 (r330799) +++ stable/11/lib/libc/sys/msgget.2 Mon Mar 12 15:57:55 2018 (r330800) @@ -31,7 +31,7 @@ .\" $FreeBSD$ .\" .\"/ -.Dd July 9, 2009 +.Dd March 4, 2018 .Dt MSGGET 2 .Os .Sh NAME @@ -40,8 +40,6 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In sys/types.h -.In sys/ipc.h .In sys/msg.h .Ft int .Fn msgget "key_t key" "int msgflg" @@ -83,7 +81,22 @@ are set to the effective gid of the calling process. .It .Va msg_perm.mode is set to the lower 9 bits of -.Fa msgflg . +.Fa msgflg +which are set by ORing these constants: +.Bl -tag -width 0000 +.It Dv 0400 +Read access for user. +.It Dv 0200 +Write access for user. +.It Dv 0040 +Read access for group. +.It Dv 0020 +Write access for group. +.It Dv 0004 +Read access for other. +.It Dv 0002 +Write access for other. +.El .It .Va msg_cbytes , .Va msg_qnum , Modified: stable/11/lib/libc/sys/semget.2 ============================================================================== --- stable/11/lib/libc/sys/semget.2 Mon Mar 12 15:45:50 2018 (r330799) +++ stable/11/lib/libc/sys/semget.2 Mon Mar 12 15:57:55 2018 (r330800) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 7, 2016 +.Dd March 4, 2018 .Dt SEMGET 2 .Os .Sh NAME @@ -34,8 +34,6 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In sys/types.h -.In sys/ipc.h .In sys/sem.h .Ft int .Fn semget "key_t key" "int nsems" "int flag" @@ -77,23 +75,22 @@ may be used to generate a key from a pathname. .\" Likewise for this section, except SHM_* becomes SEM_*. .\" .Pp -The mode of a newly created IPC object is determined by -.Em OR Ns 'ing -the following constants into the +The mode of a newly created IPC object is determined by ORing these constants +into the .Fa flag argument: -.Bl -tag -width XSEM_WXX6XXX -.It Dv SEM_R +.Bl -tag -width 0000 +.It Dv 0400 Read access for user. -.It Dv SEM_A +.It Dv 0200 Alter access for user. -.It Dv ( SEM_R>>3 ) +.It Dv 0040 Read access for group. -.It Dv ( SEM_A>>3 ) +.It Dv 0020 Alter access for group. -.It Dv ( SEM_R>>6 ) +.It Dv 0004 Read access for other. -.It Dv ( SEM_A>>6 ) +.It Dv 0002 Alter access for other. .El .Pp Modified: stable/11/lib/libc/sys/shmget.2 ============================================================================== --- stable/11/lib/libc/sys/shmget.2 Mon Mar 12 15:45:50 2018 (r330799) +++ stable/11/lib/libc/sys/shmget.2 Mon Mar 12 15:57:55 2018 (r330800) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 17, 2010 +.Dd March 4, 2018 .Dt SHMGET 2 .Os .Sh NAME @@ -34,8 +34,6 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In sys/types.h -.In sys/ipc.h .In sys/shm.h .Ft int .Fn shmget "key_t key" "size_t size" "int flag" @@ -74,22 +72,21 @@ may be used to generate a key from a pathname. .El .Pp The mode of a newly created IPC object is determined by -.Em OR Ns 'ing -the following constants into the +which are set by ORing these constants into the .Fa flag argument: -.Bl -tag -width XSHM_WXX6XXX -.It Dv S_IRUSR +.Bl -tag -width 0000 +.It Dv 0400 Read access for owner. -.It Dv S_IWUSR +.It Dv 0200 Write access for owner. -.It Dv S_IRGRP +.It Dv 0040 Read access for group. -.It Dv S_IWGRP +.It Dv 0020 Write access for group. -.It Dv S_IROTH +.It Dv 0004 Read access for other. -.It Dv S_IWOTH +.It Dv 0002 Write access for other. .El .\" @@ -142,5 +139,4 @@ already exists. .Xr shmat 2 , .Xr shmctl 2 , .Xr shmdt 2 , -.Xr stat 2 , .Xr ftok 3 From owner-svn-src-stable-11@freebsd.org Mon Mar 12 17:36:38 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72F41F2EDE8; Mon, 12 Mar 2018 17:36:38 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 227A587A48; Mon, 12 Mar 2018 17:36:38 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 18D026D25; Mon, 12 Mar 2018 17:36:38 +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 w2CHabCq008106; Mon, 12 Mar 2018 17:36:37 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2CHabOT008099; Mon, 12 Mar 2018 17:36:37 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201803121736.w2CHabOT008099@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 12 Mar 2018 17:36:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330804 - stable/11/usr.sbin/ppp X-SVN-Group: stable-11 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/11/usr.sbin/ppp X-SVN-Commit-Revision: 330804 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 17:36:38 -0000 Author: eugen Date: Mon Mar 12 17:36:37 2018 New Revision: 330804 URL: https://svnweb.freebsd.org/changeset/base/330804 Log: MFC r329105: ppp(8): fix code producing debugging logs ppp(8): fix code producing debugging logs Fix several cases when long buffer is copied to shorter one using snprintf that results in contents truncation and clobbering unsaved errno value and creation of misleading logs. PR: 218517 Approved by: mav (mentor) Modified: stable/11/usr.sbin/ppp/defs.h stable/11/usr.sbin/ppp/iface.c stable/11/usr.sbin/ppp/ip.c stable/11/usr.sbin/ppp/ipv6cp.c stable/11/usr.sbin/ppp/ncpaddr.c stable/11/usr.sbin/ppp/route.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/ppp/defs.h ============================================================================== --- stable/11/usr.sbin/ppp/defs.h Mon Mar 12 17:05:53 2018 (r330803) +++ stable/11/usr.sbin/ppp/defs.h Mon Mar 12 17:36:37 2018 (r330804) @@ -119,6 +119,8 @@ #define ROUNDUP(x) ((x) ? (1 + (((x) - 1) | (sizeof(long) - 1))) : sizeof(long)) +#define NCP_ASCIIBUFFERSIZE 52 + #ifdef __NetBSD__ extern void randinit(void); #else Modified: stable/11/usr.sbin/ppp/iface.c ============================================================================== --- stable/11/usr.sbin/ppp/iface.c Mon Mar 12 17:05:53 2018 (r330803) +++ stable/11/usr.sbin/ppp/iface.c Mon Mar 12 17:36:37 2018 (r330804) @@ -208,7 +208,7 @@ iface_addr_Zap(const char *name, struct iface_addr *ad #endif struct sockaddr_in *me4, *msk4, *peer4; struct sockaddr_storage ssme, sspeer, ssmsk; - int res; + int res, saved_errno; ncprange_getsa(&addr->ifa, &ssme, &ssmsk); ncpaddr_getsa(&addr->peer, &sspeer); @@ -234,8 +234,9 @@ iface_addr_Zap(const char *name, struct iface_addr *ad memcpy(peer4, &sspeer, sizeof *peer4); res = ID0ioctl(s, SIOCDIFADDR, &ifra); + saved_errno = errno; if (log_IsKept(LogDEBUG)) { - char buf[100]; + char buf[NCP_ASCIIBUFFERSIZE]; snprintf(buf, sizeof buf, "%s", ncprange_ntoa(&addr->ifa)); log_Printf(LogWARN, "%s: DIFADDR %s -> %s returns %d\n", @@ -259,12 +260,13 @@ iface_addr_Zap(const char *name, struct iface_addr *ad ifra6.ifra_lifetime.ia6t_pltime = ND6_INFINITE_LIFETIME; res = ID0ioctl(s, SIOCDIFADDR_IN6, &ifra6); + saved_errno = errno; break; #endif } if (res == -1) { - char dst[40]; + char dst[NCP_ASCIIBUFFERSIZE]; const char *end = #ifndef NOINET6 ncprange_family(&addr->ifa) == AF_INET6 ? "_IN6" : @@ -273,11 +275,11 @@ iface_addr_Zap(const char *name, struct iface_addr *ad if (ncpaddr_family(&addr->peer) == AF_UNSPEC) log_Printf(LogWARN, "iface rm: ioctl(SIOCDIFADDR%s, %s): %s\n", - end, ncprange_ntoa(&addr->ifa), strerror(errno)); + end, ncprange_ntoa(&addr->ifa), strerror(saved_errno)); else { snprintf(dst, sizeof dst, "%s", ncpaddr_ntoa(&addr->peer)); log_Printf(LogWARN, "iface rm: ioctl(SIOCDIFADDR%s, %s -> %s): %s\n", - end, ncprange_ntoa(&addr->ifa), dst, strerror(errno)); + end, ncprange_ntoa(&addr->ifa), dst, strerror(saved_errno)); } } @@ -293,7 +295,7 @@ iface_addr_Add(const char *name, struct iface_addr *ad #endif struct sockaddr_in *me4, *msk4, *peer4; struct sockaddr_storage ssme, sspeer, ssmsk; - int res; + int res, saved_errno; ncprange_getsa(&addr->ifa, &ssme, &ssmsk); ncpaddr_getsa(&addr->peer, &sspeer); @@ -319,8 +321,9 @@ iface_addr_Add(const char *name, struct iface_addr *ad memcpy(peer4, &sspeer, sizeof *peer4); res = ID0ioctl(s, SIOCAIFADDR, &ifra); + saved_errno = errno; if (log_IsKept(LogDEBUG)) { - char buf[100]; + char buf[NCP_ASCIIBUFFERSIZE]; snprintf(buf, sizeof buf, "%s", ncprange_ntoa(&addr->ifa)); log_Printf(LogWARN, "%s: AIFADDR %s -> %s returns %d\n", @@ -344,12 +347,13 @@ iface_addr_Add(const char *name, struct iface_addr *ad ifra6.ifra_lifetime.ia6t_pltime = ND6_INFINITE_LIFETIME; res = ID0ioctl(s, SIOCAIFADDR_IN6, &ifra6); + saved_errno = errno; break; #endif } if (res == -1) { - char dst[40]; + char dst[NCP_ASCIIBUFFERSIZE]; const char *end = #ifndef NOINET6 ncprange_family(&addr->ifa) == AF_INET6 ? "_IN6" : @@ -358,11 +362,11 @@ iface_addr_Add(const char *name, struct iface_addr *ad if (ncpaddr_family(&addr->peer) == AF_UNSPEC) log_Printf(LogWARN, "iface add: ioctl(SIOCAIFADDR%s, %s): %s\n", - end, ncprange_ntoa(&addr->ifa), strerror(errno)); + end, ncprange_ntoa(&addr->ifa), strerror(saved_errno)); else { snprintf(dst, sizeof dst, "%s", ncpaddr_ntoa(&addr->peer)); log_Printf(LogWARN, "iface add: ioctl(SIOCAIFADDR%s, %s -> %s): %s\n", - end, ncprange_ntoa(&addr->ifa), dst, strerror(errno)); + end, ncprange_ntoa(&addr->ifa), dst, strerror(saved_errno)); } } Modified: stable/11/usr.sbin/ppp/ip.c ============================================================================== --- stable/11/usr.sbin/ppp/ip.c Mon Mar 12 17:05:53 2018 (r330803) +++ stable/11/usr.sbin/ppp/ip.c Mon Mar 12 17:36:37 2018 (r330804) @@ -226,7 +226,7 @@ FilterCheck(const unsigned char *packet, int match; /* true if condition matched */ int mindata; /* minimum data size or zero */ const struct filterent *fp = filter->rule; - char dbuff[100], dstip[16]; + char dbuff[100], dstip[NCP_ASCIIBUFFERSIZE]; struct ncpaddr srcaddr, dstaddr; const char *payload; /* IP payload */ int datalen; /* IP datagram length */ Modified: stable/11/usr.sbin/ppp/ipv6cp.c ============================================================================== --- stable/11/usr.sbin/ppp/ipv6cp.c Mon Mar 12 17:05:53 2018 (r330803) +++ stable/11/usr.sbin/ppp/ipv6cp.c Mon Mar 12 17:36:37 2018 (r330804) @@ -467,7 +467,7 @@ ipv6cp_LayerUp(struct fsm *fp) { /* We're now up */ struct ipv6cp *ipv6cp = fsm2ipv6cp(fp); - char tbuff[40]; + char tbuff[NCP_ASCIIBUFFERSIZE]; log_Printf(LogIPV6CP, "%s: LayerUp.\n", fp->link->name); if (!ipv6cp_InterfaceUp(ipv6cp)) @@ -524,7 +524,7 @@ ipv6cp_LayerDown(struct fsm *fp) /* About to come down */ struct ipv6cp *ipv6cp = fsm2ipv6cp(fp); static int recursing; - char addr[40]; + char addr[NCP_ASCIIBUFFERSIZE]; if (!recursing++) { snprintf(addr, sizeof addr, "%s", ncpaddr_ntoa(&ipv6cp->myaddr)); Modified: stable/11/usr.sbin/ppp/ncpaddr.c ============================================================================== --- stable/11/usr.sbin/ppp/ncpaddr.c Mon Mar 12 17:05:53 2018 (r330803) +++ stable/11/usr.sbin/ppp/ncpaddr.c Mon Mar 12 17:36:37 2018 (r330804) @@ -78,8 +78,6 @@ #define ncpaddr_ip6addr u.ip6addr #endif -#define NCP_ASCIIBUFFERSIZE 52 - static struct in_addr bits2mask4(int bits) { Modified: stable/11/usr.sbin/ppp/route.c ============================================================================== --- stable/11/usr.sbin/ppp/route.c Mon Mar 12 17:05:53 2018 (r330803) +++ stable/11/usr.sbin/ppp/route.c Mon Mar 12 17:36:37 2018 (r330804) @@ -437,7 +437,7 @@ route_IfDelete(struct bundle *bundle, int all) ) && (all || (rtm->rtm_flags & RTF_GATEWAY))) { if (log_IsKept(LogDEBUG)) { - char gwstr[41]; + char gwstr[NCP_ASCIIBUFFERSIZE]; struct ncpaddr gw; ncprange_setsa(&range, sa[RTAX_DST], sa[RTAX_NETMASK]); ncpaddr_setsa(&gw, sa[RTAX_GATEWAY]); @@ -843,7 +843,7 @@ failed: } if (log_IsKept(LogDEBUG)) { - char gwstr[40]; + char gwstr[NCP_ASCIIBUFFERSIZE]; if (gw) snprintf(gwstr, sizeof gwstr, "%s", ncpaddr_ntoa(gw)); From owner-svn-src-stable-11@freebsd.org Tue Mar 13 01:19:08 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1EB0AA7EEFB; Tue, 13 Mar 2018 01:19:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C42FB7E2A1; Tue, 13 Mar 2018 01:19:07 +0000 (UTC) (envelope-from mav@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BEEEF133E8; Tue, 13 Mar 2018 01:19:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2D1J7QV048778; Tue, 13 Mar 2018 01:19:07 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2D1J7sn048777; Tue, 13 Mar 2018 01:19:07 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201803130119.w2D1J7sn048777@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 13 Mar 2018 01:19:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330824 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 330824 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 01:19:08 -0000 Author: mav Date: Tue Mar 13 01:19:07 2018 New Revision: 330824 URL: https://svnweb.freebsd.org/changeset/base/330824 Log: MFC r330048: Add sysctls/tunables for dbuf cache size. Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Tue Mar 13 00:40:05 2018 (r330823) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Tue Mar 13 01:19:07 2018 (r330824) @@ -133,6 +133,16 @@ int dbuf_cache_max_shift = 5; uint_t dbuf_cache_hiwater_pct = 10; uint_t dbuf_cache_lowater_pct = 10; +SYSCTL_DECL(_vfs_zfs); +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, dbuf_cache_max_bytes, CTLFLAG_RWTUN, + &dbuf_cache_max_bytes, 0, "dbuf cache size in bytes"); +SYSCTL_INT(_vfs_zfs, OID_AUTO, dbuf_cache_max_shift, CTLFLAG_RDTUN, + &dbuf_cache_max_shift, 0, "dbuf size as log2 fraction of ARC"); +SYSCTL_UINT(_vfs_zfs, OID_AUTO, dbuf_cache_hiwater_pct, CTLFLAG_RWTUN, + &dbuf_cache_hiwater_pct, 0, "max percents above the dbuf cache size"); +SYSCTL_UINT(_vfs_zfs, OID_AUTO, dbuf_cache_lowater_pct, CTLFLAG_RWTUN, + &dbuf_cache_lowater_pct, 0, "max percents below the dbuf cache size"); + /* ARGSUSED */ static int dbuf_cons(void *vdb, void *unused, int kmflag) From owner-svn-src-stable-11@freebsd.org Tue Mar 13 08:45:07 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9422AF2D5F2; Tue, 13 Mar 2018 08:45:07 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3F9A570C28; Tue, 13 Mar 2018 08:45:07 +0000 (UTC) (envelope-from ae@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3A92C17BAC; Tue, 13 Mar 2018 08:45:07 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2D8j7EH073635; Tue, 13 Mar 2018 08:45:07 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2D8j7Ep073634; Tue, 13 Mar 2018 08:45:07 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201803130845.w2D8j7Ep073634@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 13 Mar 2018 08:45:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330829 - stable/11/sys/net X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/11/sys/net X-SVN-Commit-Revision: 330829 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 08:45:07 -0000 Author: ae Date: Tue Mar 13 08:45:06 2018 New Revision: 330829 URL: https://svnweb.freebsd.org/changeset/base/330829 Log: MFC r330536: Define ethernet type 0x88A8 as ETHERTYPE_QINQ. Reviewed by: kp Obtained from: OpenBSD Differential Revision: https://reviews.freebsd.org/D14593 Modified: stable/11/sys/net/ethernet.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/ethernet.h ============================================================================== --- stable/11/sys/net/ethernet.h Tue Mar 13 03:54:41 2018 (r330828) +++ stable/11/sys/net/ethernet.h Tue Mar 13 08:45:06 2018 (r330829) @@ -341,6 +341,7 @@ struct ether_vlan_header { #define ETHERTYPE_PPPOE 0x8864 /* PPP Over Ethernet Session Stage */ #define ETHERTYPE_LANPROBE 0x8888 /* HP LanProbe test? */ #define ETHERTYPE_PAE 0x888e /* EAPOL PAE/802.1x */ +#define ETHERTYPE_QINQ 0x88A8 /* 802.1ad VLAN stacking */ #define ETHERTYPE_LOOPBACK 0x9000 /* Loopback: used to test interfaces */ #define ETHERTYPE_LBACK ETHERTYPE_LOOPBACK /* DEC MOP loopback */ #define ETHERTYPE_XNSSM 0x9001 /* 3Com (Formerly Bridge Communications), XNS Systems Management */ From owner-svn-src-stable-11@freebsd.org Tue Mar 13 08:46:48 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4D29F2D85E; Tue, 13 Mar 2018 08:46:48 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4602970DDD; Tue, 13 Mar 2018 08:46:48 +0000 (UTC) (envelope-from ae@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 40E4817BB0; Tue, 13 Mar 2018 08:46:48 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2D8kmsV073749; Tue, 13 Mar 2018 08:46:48 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2D8klPu073747; Tue, 13 Mar 2018 08:46:47 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201803130846.w2D8klPu073747@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 13 Mar 2018 08:46:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330830 - in stable/11/sys: compat/linuxkpi/common/include/linux dev/mlx4/mlx4_core X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: in stable/11/sys: compat/linuxkpi/common/include/linux dev/mlx4/mlx4_core X-SVN-Commit-Revision: 330830 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 08:46:48 -0000 Author: ae Date: Tue Mar 13 08:46:47 2018 New Revision: 330830 URL: https://svnweb.freebsd.org/changeset/base/330830 Log: MFC r330537: Add mapping for several ethernet types used by Linux to FreeBSD ethernet types. Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D14594 Modified: stable/11/sys/compat/linuxkpi/common/include/linux/if_ether.h stable/11/sys/dev/mlx4/mlx4_core/mlx4.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/if_ether.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/if_ether.h Tue Mar 13 08:45:06 2018 (r330829) +++ stable/11/sys/compat/linuxkpi/common/include/linux/if_ether.h Tue Mar 13 08:46:47 2018 (r330830) @@ -35,8 +35,6 @@ #include -#define ETH_P_8021Q ETHERTYPE_VLAN - #define ETH_HLEN ETHER_HDR_LEN /* Total octets in header. */ #ifndef ETH_ALEN #define ETH_ALEN ETHER_ADDR_LEN @@ -47,6 +45,11 @@ /* * defined Ethernet Protocol ID's. */ -#define ETH_P_IP 0x0800 /* Internet Protocol packet */ +#define ETH_P_IP ETHERTYPE_IP +#define ETH_P_IPV6 ETHERTYPE_IPV6 +#define ETH_P_MPLS_UC ETHERTYPE_MPLS +#define ETH_P_MPLS_MC ETHERTYPE_MPLS_MCAST +#define ETH_P_8021Q ETHERTYPE_VLAN +#define ETH_P_8021AD ETHERTYPE_QINQ #endif /* _LINUX_IF_ETHER_H_ */ Modified: stable/11/sys/dev/mlx4/mlx4_core/mlx4.h ============================================================================== --- stable/11/sys/dev/mlx4/mlx4_core/mlx4.h Tue Mar 13 08:45:06 2018 (r330829) +++ stable/11/sys/dev/mlx4/mlx4_core/mlx4.h Tue Mar 13 08:46:47 2018 (r330830) @@ -66,8 +66,6 @@ #define MLX4_QUERY_IF_STAT_RESET BIT(31) -#define ETH_P_8021AD 0x88A8 - enum { MLX4_HCR_BASE = 0x80680, MLX4_HCR_SIZE = 0x0001c, From owner-svn-src-stable-11@freebsd.org Tue Mar 13 09:18:05 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 241BFF311F1; Tue, 13 Mar 2018 09:18:05 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CDE2072085; Tue, 13 Mar 2018 09:18:04 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C43A818046; Tue, 13 Mar 2018 09:18:04 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2D9I4Q8088606; Tue, 13 Mar 2018 09:18:04 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2D9I4PG088605; Tue, 13 Mar 2018 09:18:04 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803130918.w2D9I4PG088605@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Tue, 13 Mar 2018 09:18:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330831 - stable/11/sys/dev/syscons/fonts X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/syscons/fonts X-SVN-Commit-Revision: 330831 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 09:18:05 -0000 Author: eadler Date: Tue Mar 13 09:18:04 2018 New Revision: 330831 URL: https://svnweb.freebsd.org/changeset/base/330831 Log: MFC r320805: Add files to help manage the (vga) syscons mouse cursor. To mostly fix distortion of mouse cursors by non-square pixels, I needed 8 variants of the same cursor shape for large fonts and another 7 variants for small fonts. Some variants are shared, leaving only 13 variants in 26 glyphs altogether. Keep these in the BDF source file cursor.bdf. cursor.bdf has another 5 unused experimental cursors in 10 glyphs. cursor.awk is a simple awk script for converting this and similar bdf files into C declarations for copying into scvgarndr.c. syscons doesn't use any of this yet. Added: stable/11/sys/dev/syscons/fonts/ - copied from r320805, head/sys/dev/syscons/fonts/ Modified: Directory Properties: stable/11/ (props changed) From owner-svn-src-stable-11@freebsd.org Tue Mar 13 09:21:08 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9AE40F31567; Tue, 13 Mar 2018 09:21:08 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4E807722DC; Tue, 13 Mar 2018 09:21:08 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 498541816C; Tue, 13 Mar 2018 09:21:08 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2D9L8p4091824; Tue, 13 Mar 2018 09:21:08 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2D9L86q091822; Tue, 13 Mar 2018 09:21:08 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803130921.w2D9L86q091822@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Tue, 13 Mar 2018 09:21:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330832 - stable/11/sys/dev/syscons X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/syscons X-SVN-Commit-Revision: 330832 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 09:21:08 -0000 Author: eadler Date: Tue Mar 13 09:21:07 2018 New Revision: 330832 URL: https://svnweb.freebsd.org/changeset/base/330832 Log: MFC r304153: Quick fix for locking fixes in r172250. The lock added there was per- virtual-device, but needs to be per-physical-device so that it protects shared data. Usually, scp->sc->write_in_progress got corrupted first and further corruption was limited when this variable was left at nonzero with no write in progress. Attempt to fix missing lock destruction in r162285. Put it with the lock destruction for r172250 after moving the latter. Both might be unreachable. To demonstrate the bug, find a buggy syscall or sysctl that calls printf(9) and run this often. Run hd /dev/zero >/dev/ttyvN for any N != 0. The console spam goes to ttyv0 and the non-console spam goes to ttyvN, so the lock provided no protection (but it helped for N == 0). Modified: stable/11/sys/dev/syscons/syscons.c stable/11/sys/dev/syscons/syscons.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/syscons/syscons.c ============================================================================== --- stable/11/sys/dev/syscons/syscons.c Tue Mar 13 09:18:04 2018 (r330831) +++ stable/11/sys/dev/syscons/syscons.c Tue Mar 13 09:21:07 2018 (r330832) @@ -2688,13 +2688,13 @@ sc_puts(scr_stat *scp, u_char *buf, int len, int kerne #endif if (scp->tsw) { - if (!kdb_active && !mtx_owned(&scp->scr_lock)) { + if (!kdb_active && !mtx_owned(&scp->sc->scr_lock)) { need_unlock = 1; - mtx_lock_spin(&scp->scr_lock); + mtx_lock_spin(&scp->sc->scr_lock); } (*scp->tsw->te_puts)(scp, buf, len, kernel); if (need_unlock) - mtx_unlock_spin(&scp->scr_lock); + mtx_unlock_spin(&scp->sc->scr_lock); } if (scp->sc->delayed_next_scr) @@ -2859,8 +2859,10 @@ scinit(int unit, int flags) * disappeared... */ sc = sc_get_softc(unit, flags & SC_KERNEL_CONSOLE); - if ((sc->flags & SC_INIT_DONE) == 0) + if ((sc->flags & SC_INIT_DONE) == 0) { + mtx_init(&sc->scr_lock, "scrlock", NULL, MTX_SPIN); SC_VIDEO_LOCKINIT(sc); + } adp = NULL; if (sc->adapter >= 0) { @@ -3077,7 +3079,8 @@ scterm(int unit, int flags) (*scp->tsw->te_term)(scp, &scp->ts); if (scp->ts != NULL) free(scp->ts, M_DEVBUF); - mtx_destroy(&scp->scr_lock); + mtx_destroy(&sc->scr_lock); + mtx_destroy(&sc->video_mtx); /* clear the structure */ if (!(flags & SC_KERNEL_CONSOLE)) { @@ -3302,8 +3305,6 @@ init_scp(sc_softc_t *sc, int vty, scr_stat *scp) scp->history = NULL; scp->history_pos = 0; scp->history_size = 0; - - mtx_init(&scp->scr_lock, "scrlock", NULL, MTX_SPIN); } int Modified: stable/11/sys/dev/syscons/syscons.h ============================================================================== --- stable/11/sys/dev/syscons/syscons.h Tue Mar 13 09:18:04 2018 (r330831) +++ stable/11/sys/dev/syscons/syscons.h Tue Mar 13 09:21:07 2018 (r330832) @@ -230,6 +230,7 @@ typedef struct sc_softc { char switch_in_progress; char write_in_progress; char blink_in_progress; + struct mtx scr_lock; /* mutex for sc_puts() */ struct mtx video_mtx; long scrn_time_stamp; @@ -344,7 +345,6 @@ typedef struct scr_stat { int splash_save_mode; /* saved mode for splash screen */ int splash_save_status; /* saved status for splash screen */ - struct mtx scr_lock; /* mutex for sc_puts() */ #ifdef _SCR_MD_STAT_DECLARED_ scr_md_stat_t md; /* machine dependent vars */ #endif From owner-svn-src-stable-11@freebsd.org Tue Mar 13 09:29:57 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 881DAF3232D; Tue, 13 Mar 2018 09:29:57 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 377AA72B9B; Tue, 13 Mar 2018 09:29:57 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 307B9181C7; Tue, 13 Mar 2018 09:29:57 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2D9TvTs093883; Tue, 13 Mar 2018 09:29:57 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2D9Tvxf093882; Tue, 13 Mar 2018 09:29:57 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803130929.w2D9Tvxf093882@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Tue, 13 Mar 2018 09:29:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330833 - stable/11/sys/dev/syscons X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/syscons X-SVN-Commit-Revision: 330833 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 09:29:57 -0000 Author: eadler Date: Tue Mar 13 09:29:56 2018 New Revision: 330833 URL: https://svnweb.freebsd.org/changeset/base/330833 Log: MFC r304161: Change all uses of 'debugger' to kdb_active and remove this variable. This restores avoidance of doing dangerous things like calling wakeup() and callouts while in ddb. Initialization of 'debugger' was broken by removing the cndbctl() console method that was used mainly in this driver to initialize 'debugger' and switch to the console screen on entry to ddb. The screen switch was restored using the cngrab() method, but cngrab() is more general so it should not initialize 'debugger' and never did. 'debugger' was just an over-engineered alias for kdb_active anyway. It existed because kdb_active (when it was named ddb_active) was considered as a private kdb variable, and there are ordering problems initializing the variables atomically with the state that they represent, but an extra variable and method to set it increased these problems. The bug caused LORs, but WITNESS is normally misconfigured with WITNESS_SKIPSIN so it doesn't check the spinlocks used by wakeup() and callouts. Modified: stable/11/sys/dev/syscons/syscons.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/syscons/syscons.c ============================================================================== --- stable/11/sys/dev/syscons/syscons.c Tue Mar 13 09:21:07 2018 (r330832) +++ stable/11/sys/dev/syscons/syscons.c Tue Mar 13 09:29:56 2018 (r330833) @@ -172,8 +172,6 @@ SYSCTL_INT(_machdep, OID_AUTO, enable_panic_key, CTLFL #define VTY_WCHAN(sc, vty) (&SC_DEV(sc, vty)) -static int debugger; - /* prototypes */ static int sc_allocate_keyboard(sc_softc_t *sc, int unit); static int scvidprobe(int unit, int flags, int cons); @@ -1815,7 +1813,7 @@ sccnupdate(scr_stat *scp) if (suspend_in_progress || scp->sc->font_loading_in_progress) return; - if (debugger > 0 || panicstr || shutdown_in_progress) { + if (kdb_active || panicstr || shutdown_in_progress) { sc_touch_scrn_saver(); } else if (scp != scp->sc->cur_scp) { return; @@ -1884,7 +1882,7 @@ scrn_timer(void *arg) #endif /* PC98 */ /* should we stop the screen saver? */ - if (debugger > 0 || panicstr || shutdown_in_progress) + if (kdb_active || panicstr || shutdown_in_progress) sc_touch_scrn_saver(); if (run_scrn_saver) { if (time_uptime > sc->scrn_time_stamp + scrn_blank_time) @@ -2279,7 +2277,7 @@ stop_scrn_saver(sc_softc_t *sc, void (*saver)(sc_softc mark_all(sc->cur_scp); if (sc->delayed_next_scr) sc_switch_scr(sc, sc->delayed_next_scr - 1); - if (debugger == 0) + if (!kdb_active) wakeup(&scrn_blanked); } @@ -2474,7 +2472,7 @@ sc_switch_scr(sc_softc_t *sc, u_int next_scr) DPRINTF(5, ("error 2, requested vty isn't open!\n")); return EINVAL; } - if ((debugger > 0) && (SC_STAT(tp)->smode.mode == VT_PROCESS)) { + if (kdb_active && SC_STAT(tp)->smode.mode == VT_PROCESS) { splx(s); DPRINTF(5, ("error 3, requested vty is in the VT_PROCESS mode\n")); return EINVAL; @@ -2495,7 +2493,7 @@ sc_switch_scr(sc_softc_t *sc, u_int next_scr) * is supposed to be locked by splhigh(), but the debugger may * be invoked at splhigh(). */ - if (debugger == 0) + if (!kdb_active) wakeup(VTY_WCHAN(sc,next_scr)); splx(s); DPRINTF(5, ("switch done (new == old)\n")); @@ -2518,7 +2516,7 @@ sc_switch_scr(sc_softc_t *sc, u_int next_scr) s = spltty(); /* wake up processes waiting for this vty */ - if (debugger == 0) + if (!kdb_active) wakeup(VTY_WCHAN(sc,next_scr)); /* wait for the controlling process to acknowledge, if necessary */ From owner-svn-src-stable-11@freebsd.org Tue Mar 13 09:46:09 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DDA06F33951; Tue, 13 Mar 2018 09:46:09 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8FEE373956; Tue, 13 Mar 2018 09:46:09 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8A60718518; Tue, 13 Mar 2018 09:46:09 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2D9k9pe004154; Tue, 13 Mar 2018 09:46:09 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2D9k9sN004152; Tue, 13 Mar 2018 09:46:09 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803130946.w2D9k9sN004152@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Tue, 13 Mar 2018 09:46:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330836 - stable/11/sys/dev/syscons X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/syscons X-SVN-Commit-Revision: 330836 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 09:46:10 -0000 Author: eadler Date: Tue Mar 13 09:46:09 2018 New Revision: 330836 URL: https://svnweb.freebsd.org/changeset/base/330836 Log: MFC r304165,r304166: Like scr_lock, the grab count needs to be per-physical-device to work. This bug corrupted the grab count on both vtys if the ungrabbed vty is different from the console, and failed to restore the keyboard state on the ungrabbed vty, but not restoring the latter usually left the keyboard mode part of it uncorrupted at 1 (K_XLATE), while after this fix the keyboard mode part is usually corrupted to 0 (K_RAW). While here, rename the grab count from 'grabbed' to grab_level. Modified: stable/11/sys/dev/syscons/syscons.c stable/11/sys/dev/syscons/syscons.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/syscons/syscons.c ============================================================================== --- stable/11/sys/dev/syscons/syscons.c Tue Mar 13 09:42:33 2018 (r330835) +++ stable/11/sys/dev/syscons/syscons.c Tue Mar 13 09:46:09 2018 (r330836) @@ -1661,7 +1661,7 @@ sc_cngrab(struct consdev *cp) if (scp->sc->kbd == NULL) return; - if (scp->grabbed++ > 0) + if (scp->sc->grab_level++ > 0) return; /* @@ -1687,7 +1687,7 @@ sc_cnungrab(struct consdev *cp) if (scp->sc->kbd == NULL) return; - if (--scp->grabbed > 0) + if (--scp->sc->grab_level > 0) return; kbdd_poll(scp->sc->kbd, FALSE); Modified: stable/11/sys/dev/syscons/syscons.h ============================================================================== --- stable/11/sys/dev/syscons/syscons.h Tue Mar 13 09:42:33 2018 (r330835) +++ stable/11/sys/dev/syscons/syscons.h Tue Mar 13 09:46:09 2018 (r330836) @@ -230,6 +230,7 @@ typedef struct sc_softc { char switch_in_progress; char write_in_progress; char blink_in_progress; + int grab_level; struct mtx scr_lock; /* mutex for sc_puts() */ struct mtx video_mtx; @@ -304,7 +305,6 @@ typedef struct scr_stat { void *ts; int status; /* status (bitfield) */ - int grabbed; int kbd_mode; /* keyboard I/O mode */ int kbd_prev_mode; /* keyboard I/O mode */ From owner-svn-src-stable-11@freebsd.org Tue Mar 13 10:00:15 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DCE1EF34CA3; Tue, 13 Mar 2018 10:00:14 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 901C3743C7; Tue, 13 Mar 2018 10:00:14 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 70D70186A1; Tue, 13 Mar 2018 10:00:14 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2DA0EQI009217; Tue, 13 Mar 2018 10:00:14 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DA0Ebi009216; Tue, 13 Mar 2018 10:00:14 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803131000.w2DA0Ebi009216@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Tue, 13 Mar 2018 10:00:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330838 - stable/11/sys/dev/syscons X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/syscons X-SVN-Commit-Revision: 330838 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 10:00:15 -0000 Author: eadler Date: Tue Mar 13 10:00:14 2018 New Revision: 330838 URL: https://svnweb.freebsd.org/changeset/base/330838 Log: MFC r304164: Disable some more unsafe things in (low level) console mode: - never call up to the tty layer to restart output for keyboard input in console mode. This was already disallowed in kdb mode. Other cases are rarely reached. - disable the reboot, halt and powerdown keys in console mode. The suspend, standby and panic keys are still allowed, and aren't even conditonal on excessive configuration options. Some of these actions are still available in ddb mode as ddb commands which are equally unsafe. Some are useful at input prompts and should be restored when the locking is fixed. - disallow bells in kdb mode (should be in console mode, but the flag for that is not available). Visual bell gives very alarming behaviour by trying to use callouts which don't work in kdb mode. Audio bell uses timeouts and hardware resources with mutexes that can deadlock in reasonable use of ddb. Screen switches in kdb mode are not very safe, but they are important functionality and there is a lot of code to make them sort of work. Modified: stable/11/sys/dev/syscons/syscons.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/syscons/syscons.c ============================================================================== --- stable/11/sys/dev/syscons/syscons.c Tue Mar 13 09:58:29 2018 (r330837) +++ stable/11/sys/dev/syscons/syscons.c Tue Mar 13 10:00:14 2018 (r330838) @@ -3505,8 +3505,9 @@ next_code: scp->status |= CURSOR_ENABLED; sc_draw_cursor_image(scp); } + /* Only safe in Giant-locked context. */ tp = SC_DEV(sc, scp->index); - if (!kdb_active && tty_opened_ns(tp)) + if (!(flags & SCGETC_CN) && tty_opened_ns(tp)) sctty_outwakeup(tp); #endif } @@ -3557,21 +3558,21 @@ next_code: case RBT: #ifndef SC_DISABLE_REBOOT - if (enable_reboot) + if (enable_reboot && !(flags & SCGETC_CN)) shutdown_nice(0); #endif break; case HALT: #ifndef SC_DISABLE_REBOOT - if (enable_reboot) + if (enable_reboot && !(flags & SCGETC_CN)) shutdown_nice(RB_HALT); #endif break; case PDWN: #ifndef SC_DISABLE_REBOOT - if (enable_reboot) + if (enable_reboot && !(flags & SCGETC_CN)) shutdown_nice(RB_HALT|RB_POWEROFF); #endif break; @@ -3842,7 +3843,7 @@ sc_respond(scr_stat *scp, const u_char *p, int count, void sc_bell(scr_stat *scp, int pitch, int duration) { - if (cold || shutdown_in_progress || !enable_bell) + if (cold || kdb_active || shutdown_in_progress || !enable_bell) return; if (scp != scp->sc->cur_scp && (scp->sc->flags & SC_QUIET_BELL)) From owner-svn-src-stable-11@freebsd.org Tue Mar 13 16:07:38 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1AD2F2BFFC; Tue, 13 Mar 2018 16:07:38 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 86FF884DBA; Tue, 13 Mar 2018 16:07:38 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7D8491BFAE; Tue, 13 Mar 2018 16:07:38 +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 w2DG7cV2094653; Tue, 13 Mar 2018 16:07:38 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DG7cgl094652; Tue, 13 Mar 2018 16:07:38 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803131607.w2DG7cgl094652@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Mar 2018 16:07:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330847 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 330847 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 16:07:39 -0000 Author: hselasky Date: Tue Mar 13 16:07:38 2018 New Revision: 330847 URL: https://svnweb.freebsd.org/changeset/base/330847 Log: MFC r330272: Implement wait_on_bit() function macro in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/wait.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/wait.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/wait.h Tue Mar 13 15:29:13 2018 (r330846) +++ stable/11/sys/compat/linuxkpi/common/include/linux/wait.h Tue Mar 13 16:07:38 2018 (r330847) @@ -249,6 +249,8 @@ void linux_wake_up_atomic_t(atomic_t *); int linux_wait_on_atomic_t(atomic_t *, unsigned int); #define wake_up_bit(word, bit) linux_wake_up_bit(word, bit) +#define wait_on_bit(word, bit, state) \ + linux_wait_on_bit_timeout(word, bit, state, MAX_SCHEDULE_TIMEOUT) #define wait_on_bit_timeout(word, bit, state, timeout) \ linux_wait_on_bit_timeout(word, bit, state, timeout) #define wake_up_atomic_t(a) linux_wake_up_atomic_t(a) From owner-svn-src-stable-11@freebsd.org Tue Mar 13 16:09:05 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7AE8BF2C309; Tue, 13 Mar 2018 16:09:05 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1EDE984FE9; Tue, 13 Mar 2018 16:09:05 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 19D7B1BFB0; Tue, 13 Mar 2018 16:09:05 +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 w2DG94Ef094757; Tue, 13 Mar 2018 16:09:04 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DG94bF094756; Tue, 13 Mar 2018 16:09:04 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803131609.w2DG94bF094756@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Mar 2018 16:09:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330848 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 330848 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 16:09:05 -0000 Author: hselasky Date: Tue Mar 13 16:09:04 2018 New Revision: 330848 URL: https://svnweb.freebsd.org/changeset/base/330848 Log: MFC r330273: Implement ktime_get_raw() function in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/ktime.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/ktime.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/ktime.h Tue Mar 13 16:07:38 2018 (r330847) +++ stable/11/sys/compat/linuxkpi/common/include/linux/ktime.h Tue Mar 13 16:09:04 2018 (r330848) @@ -189,6 +189,15 @@ ktime_get_real_seconds(void) return (ts.tv_sec); } +static inline ktime_t +ktime_get_raw(void) +{ + struct timespec ts; + + nanotime(&ts); + return (timespec_to_ktime(ts)); +} + static inline u64 ktime_get_raw_ns(void) { From owner-svn-src-stable-11@freebsd.org Tue Mar 13 16:10:12 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3E62F2C4D1; Tue, 13 Mar 2018 16:10:11 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A6F7185182; Tue, 13 Mar 2018 16:10:11 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A1DFC1BFB4; Tue, 13 Mar 2018 16:10:11 +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 w2DGABhC094884; Tue, 13 Mar 2018 16:10:11 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DGABPP094883; Tue, 13 Mar 2018 16:10:11 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803131610.w2DGABPP094883@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Mar 2018 16:10:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330849 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 330849 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 16:10:12 -0000 Author: hselasky Date: Tue Mar 13 16:10:11 2018 New Revision: 330849 URL: https://svnweb.freebsd.org/changeset/base/330849 Log: MFC r330274: Implement more lockdep stubs in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/lockdep.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/lockdep.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/lockdep.h Tue Mar 13 16:09:04 2018 (r330848) +++ stable/11/sys/compat/linuxkpi/common/include/linux/lockdep.h Tue Mar 13 16:10:11 2018 (r330849) @@ -36,8 +36,9 @@ struct lock_class_key { }; #define lockdep_set_class(lock, key) - #define lockdep_set_class_and_name(lock, key, name) +#define lockdep_set_current_reclaim_state(g) do { } while (0) +#define lockdep_clear_current_reclaim_state() do { } while (0) #define lockdep_assert_held(m) \ sx_assert(&(m)->sx, SA_XLOCKED) From owner-svn-src-stable-11@freebsd.org Tue Mar 13 16:14:54 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBCCCF2CB7B; Tue, 13 Mar 2018 16:14:53 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 89792857E5; Tue, 13 Mar 2018 16:14:53 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 844FB1C12C; Tue, 13 Mar 2018 16:14:53 +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 w2DGErsA099866; Tue, 13 Mar 2018 16:14:53 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DGErSi099861; Tue, 13 Mar 2018 16:14:53 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803131614.w2DGErSi099861@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Mar 2018 16:14:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330850 - in stable/11: share/man/man9 sys/kern sys/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11: share/man/man9 sys/kern sys/sys X-SVN-Commit-Revision: 330850 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 16:14:54 -0000 Author: hselasky Date: Tue Mar 13 16:14:52 2018 New Revision: 330850 URL: https://svnweb.freebsd.org/changeset/base/330850 Log: MFC r330349 and r330362: Allow pause_sbt() to catch signals during sleep by passing C_CATCH flag. Define pause_sig() function macro helper similarly to other kernel functions which catch signals. Update outdated function description. Document pause_sig(9) and update prototypes for existing pause(9) and pause_sbt(9) functions. Discussed with: kib@ Suggested by: cem@ Sponsored by: Mellanox Technologies Modified: stable/11/share/man/man9/Makefile stable/11/share/man/man9/sleep.9 stable/11/sys/kern/kern_synch.c stable/11/sys/sys/callout.h stable/11/sys/sys/systm.h Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man9/Makefile ============================================================================== --- stable/11/share/man/man9/Makefile Tue Mar 13 16:10:11 2018 (r330849) +++ stable/11/share/man/man9/Makefile Tue Mar 13 16:14:52 2018 (r330850) @@ -1597,6 +1597,7 @@ MLINKS+=sleep.9 msleep.9 \ sleep.9 msleep_spin.9 \ sleep.9 msleep_spin_sbt.9 \ sleep.9 pause.9 \ + sleep.9 pause_sig.9 \ sleep.9 pause_sbt.9 \ sleep.9 tsleep.9 \ sleep.9 tsleep_sbt.9 \ Modified: stable/11/share/man/man9/sleep.9 ============================================================================== --- stable/11/share/man/man9/sleep.9 Tue Mar 13 16:10:11 2018 (r330849) +++ stable/11/share/man/man9/sleep.9 Tue Mar 13 16:14:52 2018 (r330850) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 24, 2015 +.Dd March 4, 2018 .Dt SLEEP 9 .Os .Sh NAME @@ -34,6 +34,7 @@ .Nm msleep_spin , .Nm msleep_spin_sbt , .Nm pause , +.Nm pause_sig , .Nm pause_sbt , .Nm tsleep , .Nm tsleep_sbt , @@ -53,9 +54,11 @@ .Ft int .Fn msleep_spin_sbt "void *chan" "struct mtx *mtx" "const char *wmesg" \ "sbintime_t sbt" "sbintime_t pr" "int flags" -.Ft void +.Ft int .Fn pause "const char *wmesg" "int timo" -.Ft void +.Ft int +.Fn pause_sig "const char *wmesg" "int timo" +.Ft int .Fn pause_sbt "const char *wmesg" "sbintime_t sbt" "sbintime_t pr" \ "int flags" .Ft int @@ -73,6 +76,8 @@ The functions .Fn msleep , .Fn msleep_spin , .Fn pause , +.Fn pause_sig , +.Fn pause_sbt , .Fn wakeup , and .Fn wakeup_one @@ -82,8 +87,10 @@ external event, it is put to sleep by .Fn tsleep , .Fn msleep , .Fn msleep_spin , +.Fn pause , +.Fn pause_sig , or -.Fn pause . +.Fn pause_sbt . Threads may also wait using one of the locking primitive sleep routines .Xr mtx_sleep 9 , .Xr rw_sleep 9 , @@ -248,6 +255,11 @@ The thread can not be awakened early by signals or cal .Fn wakeup or .Fn wakeup_one . +The +.Fn pause_sig +function is a variant of +.Fn pause +which can be awakened early by signals. .Pp The .Fn wakeup_one @@ -385,6 +397,10 @@ The .Fn pause function appeared in .Fx 7.0 . +The +.Fn pause_sig +function appeared in +.Fx 12.0 . .Sh AUTHORS .An -nosplit This manual page was written by Modified: stable/11/sys/kern/kern_synch.c ============================================================================== --- stable/11/sys/kern/kern_synch.c Tue Mar 13 16:10:11 2018 (r330849) +++ stable/11/sys/kern/kern_synch.c Tue Mar 13 16:14:52 2018 (r330850) @@ -299,16 +299,16 @@ msleep_spin_sbt(void *ident, struct mtx *mtx, const ch } /* - * pause() delays the calling thread by the given number of system ticks. - * During cold bootup, pause() uses the DELAY() function instead of - * the tsleep() function to do the waiting. The "timo" argument must be - * greater than or equal to zero. A "timo" value of zero is equivalent - * to a "timo" value of one. + * pause_sbt() delays the calling thread by the given signed binary + * time. During cold bootup, pause_sbt() uses the DELAY() function + * instead of the _sleep() function to do the waiting. The "sbt" + * argument must be greater than or equal to zero. A "sbt" value of + * zero is equivalent to a "sbt" value of one tick. */ int pause_sbt(const char *wmesg, sbintime_t sbt, sbintime_t pr, int flags) { - KASSERT(sbt >= 0, ("pause: timeout must be >= 0")); + KASSERT(sbt >= 0, ("pause_sbt: timeout must be >= 0")); /* silently convert invalid timeouts */ if (sbt == 0) @@ -330,7 +330,8 @@ pause_sbt(const char *wmesg, sbintime_t sbt, sbintime_ DELAY(sbt); return (0); } - return (_sleep(&pause_wchan[curcpu], NULL, 0, wmesg, sbt, pr, flags)); + return (_sleep(&pause_wchan[curcpu], NULL, + (flags & C_CATCH) ? PCATCH : 0, wmesg, sbt, pr, flags)); } /* Modified: stable/11/sys/sys/callout.h ============================================================================== --- stable/11/sys/sys/callout.h Tue Mar 13 16:10:11 2018 (r330849) +++ stable/11/sys/sys/callout.h Tue Mar 13 16:14:52 2018 (r330850) @@ -58,6 +58,7 @@ #define C_HARDCLOCK 0x0100 /* align to hardclock() calls */ #define C_ABSOLUTE 0x0200 /* event time is absolute. */ #define C_PRECALC 0x0400 /* event time is pre-calculated. */ +#define C_CATCH 0x0800 /* catch signals, used by pause_sbt(9) */ struct callout_handle { struct callout *callout; Modified: stable/11/sys/sys/systm.h ============================================================================== --- stable/11/sys/sys/systm.h Tue Mar 13 16:10:11 2018 (r330849) +++ stable/11/sys/sys/systm.h Tue Mar 13 16:14:52 2018 (r330850) @@ -407,6 +407,8 @@ int pause_sbt(const char *wmesg, sbintime_t sbt, sbint int flags); #define pause(wmesg, timo) \ pause_sbt((wmesg), tick_sbt * (timo), 0, C_HARDCLOCK) +#define pause_sig(wmesg, timo) \ + pause_sbt((wmesg), tick_sbt * (timo), 0, C_HARDCLOCK | C_CATCH) #define tsleep(chan, pri, wmesg, timo) \ _sleep((chan), NULL, (pri), (wmesg), tick_sbt * (timo), \ 0, C_HARDCLOCK) From owner-svn-src-stable-11@freebsd.org Tue Mar 13 16:17:37 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C8BAF2CF86; Tue, 13 Mar 2018 16:17:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3F1B185A53; Tue, 13 Mar 2018 16:17:37 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1BC4B1C13B; Tue, 13 Mar 2018 16:17:37 +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 w2DGHaUc000122; Tue, 13 Mar 2018 16:17:36 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DGHafB000120; Tue, 13 Mar 2018 16:17:36 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803131617.w2DGHafB000120@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Mar 2018 16:17:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330851 - in stable/11/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 330851 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 16:17:37 -0000 Author: hselasky Date: Tue Mar 13 16:17:36 2018 New Revision: 330851 URL: https://svnweb.freebsd.org/changeset/base/330851 Log: MFC r330352 and r330353: Implement msleep_interruptible() in the LinuxKPI. While at it use pause_sbt() instead of pause() in the msleep() function to avoid rounding errors when converting delay values forth and back. Add a guard for a delay value of zero milliseconds which is undefined. Suggested by: ian@ Requested by: Johannes Lundberg Sponsored by: Mellanox Technologies Modified: stable/11/sys/compat/linuxkpi/common/include/linux/delay.h stable/11/sys/compat/linuxkpi/common/src/linux_schedule.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/delay.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/delay.h Tue Mar 13 16:14:52 2018 (r330850) +++ stable/11/sys/compat/linuxkpi/common/include/linux/delay.h Tue Mar 13 16:17:36 2018 (r330851) @@ -36,14 +36,20 @@ #include static inline void -linux_msleep(int ms) +linux_msleep(unsigned int ms) { - pause("lnxsleep", msecs_to_jiffies(ms)); + /* guard against invalid values */ + if (ms == 0) + ms = 1; + pause_sbt("lnxsleep", mstosbt(ms), 0, C_HARDCLOCK); } #undef msleep -#define msleep linux_msleep +#define msleep(ms) linux_msleep(ms) +#undef msleep_interruptible +#define msleep_interruptible(ms) linux_msleep_interruptible(ms) + #define udelay(t) DELAY(t) static inline void @@ -64,5 +70,7 @@ usleep_range(unsigned long min, unsigned long max) { DELAY(min); } + +extern unsigned int linux_msleep_interruptible(unsigned int ms); #endif /* _LINUX_DELAY_H_ */ Modified: stable/11/sys/compat/linuxkpi/common/src/linux_schedule.c ============================================================================== --- stable/11/sys/compat/linuxkpi/common/src/linux_schedule.c Tue Mar 13 16:14:52 2018 (r330850) +++ stable/11/sys/compat/linuxkpi/common/src/linux_schedule.c Tue Mar 13 16:17:36 2018 (r330851) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -72,6 +73,25 @@ linux_add_to_sleepqueue(void *wchan, struct task_struc ret = -ERESTARTSYS; } return (ret); +} + +unsigned int +linux_msleep_interruptible(unsigned int ms) +{ + int ret; + + /* guard against invalid values */ + if (ms == 0) + ms = 1; + ret = -pause_sbt("lnxsleep", mstosbt(ms), 0, C_HARDCLOCK | C_CATCH); + + switch (ret) { + case -EWOULDBLOCK: + return (0); + default: + linux_schedule_save_interrupt_value(current, ret); + return (ms); + } } static int From owner-svn-src-stable-11@freebsd.org Tue Mar 13 16:18:39 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E614FF2D155; Tue, 13 Mar 2018 16:18:38 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 91C3685BDB; Tue, 13 Mar 2018 16:18:38 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8C21D1C13C; Tue, 13 Mar 2018 16:18:38 +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 w2DGIcB1000219; Tue, 13 Mar 2018 16:18:38 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DGIc8X000218; Tue, 13 Mar 2018 16:18:38 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803131618.w2DGIc8X000218@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Mar 2018 16:18:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330852 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 330852 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 16:18:39 -0000 Author: hselasky Date: Tue Mar 13 16:18:38 2018 New Revision: 330852 URL: https://svnweb.freebsd.org/changeset/base/330852 Log: MFC r330344: Correct the return code from pause() during cold startup from zero to EWOULDBLOCK. This also matches the description in pause(9). Discussed with: kib@ Sponsored by: Mellanox Technologies Modified: stable/11/sys/kern/kern_synch.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_synch.c ============================================================================== --- stable/11/sys/kern/kern_synch.c Tue Mar 13 16:17:36 2018 (r330851) +++ stable/11/sys/kern/kern_synch.c Tue Mar 13 16:18:38 2018 (r330852) @@ -328,7 +328,7 @@ pause_sbt(const char *wmesg, sbintime_t sbt, sbintime_ sbt = howmany(sbt, SBT_1US); if (sbt > 0) DELAY(sbt); - return (0); + return (EWOULDBLOCK); } return (_sleep(&pause_wchan[curcpu], NULL, (flags & C_CATCH) ? PCATCH : 0, wmesg, sbt, pr, flags)); From owner-svn-src-stable-11@freebsd.org Tue Mar 13 16:21:00 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F4BDF2D4F3; Tue, 13 Mar 2018 16:21:00 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0CB2E85F70; Tue, 13 Mar 2018 16:21:00 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DDBEF1C162; Tue, 13 Mar 2018 16:20:59 +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 w2DGKxDl001323; Tue, 13 Mar 2018 16:20:59 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DGKxkD001106; Tue, 13 Mar 2018 16:20:59 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803131620.w2DGKxkD001106@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Mar 2018 16:20:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330853 - in stable/11/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 330853 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 16:21:00 -0000 Author: hselasky Date: Tue Mar 13 16:20:59 2018 New Revision: 330853 URL: https://svnweb.freebsd.org/changeset/base/330853 Log: MFC r330387 and r330396: Rename the SLAB_DESTROY_BY_RCU flag into SLAB_TYPESAFE_BY_RCU in the LinuxKPI to be compatible with Linux. Keep the old SLAB_DESTROY_BY_RCU macro definition around in the LinuxKPI to avoid compilation breakage in external kernel modules. Requested by: Johannes Lundberg Sponsored by: Mellanox Technologies Modified: stable/11/sys/compat/linuxkpi/common/include/linux/slab.h stable/11/sys/compat/linuxkpi/common/src/linux_slab.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/slab.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/slab.h Tue Mar 13 16:18:38 2018 (r330852) +++ stable/11/sys/compat/linuxkpi/common/include/linux/slab.h Tue Mar 13 16:20:59 2018 (r330853) @@ -79,9 +79,12 @@ struct linux_kmem_cache { }; #define SLAB_HWCACHE_ALIGN (1 << 0) -#define SLAB_DESTROY_BY_RCU (1 << 1) +#define SLAB_TYPESAFE_BY_RCU (1 << 1) #define SLAB_RECLAIM_ACCOUNT (1 << 2) +#define SLAB_DESTROY_BY_RCU \ + SLAB_TYPESAFE_BY_RCU + static inline gfp_t linux_check_m_flags(gfp_t flags) { @@ -162,7 +165,7 @@ extern void linux_kmem_cache_free_rcu(struct linux_kme static inline void linux_kmem_cache_free(struct linux_kmem_cache *c, void *m) { - if (unlikely(c->cache_flags & SLAB_DESTROY_BY_RCU)) + if (unlikely(c->cache_flags & SLAB_TYPESAFE_BY_RCU)) linux_kmem_cache_free_rcu(c, m); else uma_zfree(c->cache_zone, m); Modified: stable/11/sys/compat/linuxkpi/common/src/linux_slab.c ============================================================================== --- stable/11/sys/compat/linuxkpi/common/src/linux_slab.c Tue Mar 13 16:18:38 2018 (r330852) +++ stable/11/sys/compat/linuxkpi/common/src/linux_slab.c Tue Mar 13 16:20:59 2018 (r330853) @@ -49,7 +49,7 @@ linux_kmem_ctor(void *mem, int size, void *arg, int fl { struct linux_kmem_cache *c = arg; - if (unlikely(c->cache_flags & SLAB_DESTROY_BY_RCU)) { + if (unlikely(c->cache_flags & SLAB_TYPESAFE_BY_RCU)) { struct linux_kmem_rcu *rcu = LINUX_KMEM_TO_RCU(c, mem); /* duplicate cache pointer */ @@ -85,7 +85,7 @@ linux_kmem_cache_create(const char *name, size_t size, else if (align != 0) align--; - if (flags & SLAB_DESTROY_BY_RCU) { + if (flags & SLAB_TYPESAFE_BY_RCU) { /* make room for RCU structure */ size = ALIGN(size, sizeof(void *)); size += sizeof(struct linux_kmem_rcu); @@ -118,7 +118,7 @@ linux_kmem_cache_free_rcu(struct linux_kmem_cache *c, void linux_kmem_cache_destroy(struct linux_kmem_cache *c) { - if (unlikely(c->cache_flags & SLAB_DESTROY_BY_RCU)) { + if (unlikely(c->cache_flags & SLAB_TYPESAFE_BY_RCU)) { /* make sure all free callbacks have been called */ rcu_barrier(); } From owner-svn-src-stable-11@freebsd.org Tue Mar 13 16:22:33 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86EC0F2D8E0; Tue, 13 Mar 2018 16:22:33 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 37A3786340; Tue, 13 Mar 2018 16:22:33 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 32AAC1C2CD; Tue, 13 Mar 2018 16:22:33 +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 w2DGMXD0004998; Tue, 13 Mar 2018 16:22:33 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DGMXLD004997; Tue, 13 Mar 2018 16:22:33 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803131622.w2DGMXLD004997@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Mar 2018 16:22:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330854 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 330854 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 16:22:33 -0000 Author: hselasky Date: Tue Mar 13 16:22:32 2018 New Revision: 330854 URL: https://svnweb.freebsd.org/changeset/base/330854 Log: MFC r330388: Implement GENMASK_ULL() function macro in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/bitops.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/bitops.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/bitops.h Tue Mar 13 16:20:59 2018 (r330853) +++ stable/11/sys/compat/linuxkpi/common/include/linux/bitops.h Tue Mar 13 16:22:32 2018 (r330854) @@ -45,12 +45,15 @@ #define BITS_PER_LONG 32 #endif +#define BITS_PER_LONG_LONG 64 + #define BITMAP_FIRST_WORD_MASK(start) (~0UL << ((start) % BITS_PER_LONG)) #define BITMAP_LAST_WORD_MASK(n) (~0UL >> (BITS_PER_LONG - (n))) #define BITS_TO_LONGS(n) howmany((n), BITS_PER_LONG) #define BIT_MASK(nr) (1UL << ((nr) & (BITS_PER_LONG - 1))) #define BIT_WORD(nr) ((nr) / BITS_PER_LONG) #define GENMASK(h, l) (((~0UL) >> (BITS_PER_LONG - (h) - 1)) & ((~0UL) << (l))) +#define GENMASK_ULL(h, l) (((~0ULL) >> (BITS_PER_LONG_LONG - (h) - 1)) & ((~0ULL) << (l))) #define BITS_PER_BYTE 8 #define hweight8(x) bitcount((uint8_t)(x)) From owner-svn-src-stable-11@freebsd.org Tue Mar 13 16:23:34 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4EF1CF2DA94; Tue, 13 Mar 2018 16:23:34 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EB214864E2; Tue, 13 Mar 2018 16:23:33 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E610C1C2D0; Tue, 13 Mar 2018 16:23:33 +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 w2DGNXd0005095; Tue, 13 Mar 2018 16:23:33 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DGNX3L005094; Tue, 13 Mar 2018 16:23:33 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803131623.w2DGNX3L005094@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Mar 2018 16:23:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330855 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 330855 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 16:23:34 -0000 Author: hselasky Date: Tue Mar 13 16:23:33 2018 New Revision: 330855 URL: https://svnweb.freebsd.org/changeset/base/330855 Log: MFC r330389: Implement for_each_clear_bit() function macro in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/bitops.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/bitops.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/bitops.h Tue Mar 13 16:22:32 2018 (r330854) +++ stable/11/sys/compat/linuxkpi/common/include/linux/bitops.h Tue Mar 13 16:23:33 2018 (r330855) @@ -390,6 +390,10 @@ done: (bit) < (size); \ (bit) = find_next_bit((addr), (size), (bit) + 1)) +#define for_each_clear_bit(bit, addr, size) \ + for ((bit) = find_first_zero_bit((addr), (size)); \ + (bit) < (size); \ + (bit) = find_next_zero_bit((addr), (size), (bit) + 1)) static inline uint64_t sign_extend64(uint64_t value, int index) From owner-svn-src-stable-11@freebsd.org Tue Mar 13 16:24:29 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13AF0F2DC09; Tue, 13 Mar 2018 16:24:29 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B3E7D8665D; Tue, 13 Mar 2018 16:24:28 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AEFA81C2D3; Tue, 13 Mar 2018 16:24:28 +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 w2DGOSYf005184; Tue, 13 Mar 2018 16:24:28 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DGOSX5005183; Tue, 13 Mar 2018 16:24:28 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803131624.w2DGOSX5005183@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Mar 2018 16:24:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330856 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 330856 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 16:24:29 -0000 Author: hselasky Date: Tue Mar 13 16:24:28 2018 New Revision: 330856 URL: https://svnweb.freebsd.org/changeset/base/330856 Log: MFC r330390: Define noinline and __maybe_unused macros in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/compiler.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/compiler.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/compiler.h Tue Mar 13 16:23:33 2018 (r330855) +++ stable/11/sys/compat/linuxkpi/common/include/linux/compiler.h Tue Mar 13 16:24:28 2018 (r330856) @@ -64,6 +64,7 @@ #define __attribute_const__ __attribute__((__const__)) #undef __always_inline #define __always_inline inline +#define noinline __noinline #define ____cacheline_aligned __aligned(CACHE_LINE_SIZE) #define likely(x) __builtin_expect(!!(x), 1) @@ -71,6 +72,7 @@ #define typeof(x) __typeof(x) #define uninitialized_var(x) x = x +#define __maybe_unused __unused #define __always_unused __unused #define __must_check __result_use_check From owner-svn-src-stable-11@freebsd.org Tue Mar 13 16:25:28 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA62BF2DD51; Tue, 13 Mar 2018 16:25:28 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 679BF86812; Tue, 13 Mar 2018 16:25:28 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 629061C2D4; Tue, 13 Mar 2018 16:25:28 +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 w2DGPSFs005294; Tue, 13 Mar 2018 16:25:28 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DGPSTf005293; Tue, 13 Mar 2018 16:25:28 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803131625.w2DGPSTf005293@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Mar 2018 16:25:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330857 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 330857 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 16:25:28 -0000 Author: hselasky Date: Tue Mar 13 16:25:28 2018 New Revision: 330857 URL: https://svnweb.freebsd.org/changeset/base/330857 Log: MFC r330391: Implement writel_relaxed() in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/io.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/io.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/io.h Tue Mar 13 16:24:28 2018 (r330856) +++ stable/11/sys/compat/linuxkpi/common/include/linux/io.h Tue Mar 13 16:25:28 2018 (r330857) @@ -74,6 +74,13 @@ writel(uint32_t b, void *addr) *(volatile uint32_t *)addr = b; } +#undef writel_relaxed +static inline void +writel_relaxed(uint32_t b, void *addr) +{ + *(volatile uint32_t *)addr = b; +} + #undef writeq static inline void writeq(uint64_t b, void *addr) From owner-svn-src-stable-11@freebsd.org Tue Mar 13 16:26:58 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 287E6F2F032; Tue, 13 Mar 2018 16:26:58 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CEB4986A68; Tue, 13 Mar 2018 16:26:57 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C9B111C2D6; Tue, 13 Mar 2018 16:26:57 +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 w2DGQvfG005405; Tue, 13 Mar 2018 16:26:57 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DGQvwJ005404; Tue, 13 Mar 2018 16:26:57 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803131626.w2DGQvwJ005404@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Mar 2018 16:26:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330858 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 330858 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 16:26:58 -0000 Author: hselasky Date: Tue Mar 13 16:26:57 2018 New Revision: 330858 URL: https://svnweb.freebsd.org/changeset/base/330858 Log: MFC r330392 and r330408: Implement BUILD_BUG() function macro in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/kernel.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/kernel.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/kernel.h Tue Mar 13 16:25:28 2018 (r330857) +++ stable/11/sys/compat/linuxkpi/common/include/linux/kernel.h Tue Mar 13 16:26:57 2018 (r330858) @@ -86,6 +86,7 @@ #define S64_C(x) x ## LL #define U64_C(x) x ## ULL +#define BUILD_BUG() do { CTASSERT(0); } while (0) #define BUILD_BUG_ON(x) CTASSERT(!(x)) #define BUILD_BUG_ON_MSG(x, msg) BUILD_BUG_ON(x) #define BUILD_BUG_ON_NOT_POWER_OF_2(x) BUILD_BUG_ON(!powerof2(x)) From owner-svn-src-stable-11@freebsd.org Tue Mar 13 16:28:05 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A136F2F241; Tue, 13 Mar 2018 16:28:05 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DE89D86C18; Tue, 13 Mar 2018 16:28:04 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D94671C2E4; Tue, 13 Mar 2018 16:28:04 +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 w2DGS4Aw005504; Tue, 13 Mar 2018 16:28:04 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DGS46k005503; Tue, 13 Mar 2018 16:28:04 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803131628.w2DGS46k005503@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Mar 2018 16:28:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330859 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 330859 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 16:28:05 -0000 Author: hselasky Date: Tue Mar 13 16:28:04 2018 New Revision: 330859 URL: https://svnweb.freebsd.org/changeset/base/330859 Log: MFC r330393: Implement __MODULE_STRING() function macro in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/module.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/module.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/module.h Tue Mar 13 16:26:57 2018 (r330858) +++ stable/11/sys/compat/linuxkpi/common/include/linux/module.h Tue Mar 13 16:28:04 2018 (r330859) @@ -53,6 +53,7 @@ #define EXPORT_SYMBOL(name) #define EXPORT_SYMBOL_GPL(name) +#define __MODULE_STRING(x) __stringify(x) /* OFED pre-module initialization */ #define SI_SUB_OFED_PREINIT (SI_SUB_ROOT_CONF - 2) From owner-svn-src-stable-11@freebsd.org Tue Mar 13 16:29:03 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1746EF2F3E5; Tue, 13 Mar 2018 16:29:03 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BA1C386DBE; Tue, 13 Mar 2018 16:29:02 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B52F71C2E8; Tue, 13 Mar 2018 16:29:02 +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 w2DGT24F005595; Tue, 13 Mar 2018 16:29:02 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DGT2bY005594; Tue, 13 Mar 2018 16:29:02 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803131629.w2DGT2bY005594@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Mar 2018 16:29:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330860 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 330860 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 16:29:03 -0000 Author: hselasky Date: Tue Mar 13 16:29:02 2018 New Revision: 330860 URL: https://svnweb.freebsd.org/changeset/base/330860 Log: MFC r330394: Implement pr_err_ratelimited() function macro in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/printk.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/printk.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/printk.h Tue Mar 13 16:28:04 2018 (r330859) +++ stable/11/sys/compat/linuxkpi/common/include/linux/printk.h Tue Mar 13 16:29:02 2018 (r330860) @@ -118,4 +118,7 @@ print_hex_dump_bytes(const char *prefix_str, const int __retval; \ }) +#define pr_err_ratelimited(fmt, ...) \ + printk_ratelimited(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) + #endif /* _LINUX_PRINTK_H_ */ From owner-svn-src-stable-11@freebsd.org Tue Mar 13 16:30:02 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED66EF2F548; Tue, 13 Mar 2018 16:30:01 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9A66F86F44; Tue, 13 Mar 2018 16:30:01 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 955AD1C2F4; Tue, 13 Mar 2018 16:30:01 +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 w2DGU1Wl005715; Tue, 13 Mar 2018 16:30:01 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DGU1Rn005713; Tue, 13 Mar 2018 16:30:01 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803131630.w2DGU1Rn005713@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Mar 2018 16:30:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330861 - in stable/11/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 330861 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 16:30:02 -0000 Author: hselasky Date: Tue Mar 13 16:30:01 2018 New Revision: 330861 URL: https://svnweb.freebsd.org/changeset/base/330861 Log: MFC r330395: Implement DEFINE_WAIT_FUNC() function macro and default_wake_function() in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/wait.h stable/11/sys/compat/linuxkpi/common/src/linux_schedule.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/wait.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/wait.h Tue Mar 13 16:29:02 2018 (r330860) +++ stable/11/sys/compat/linuxkpi/common/include/linux/wait.h Tue Mar 13 16:30:01 2018 (r330861) @@ -76,13 +76,17 @@ struct wait_queue_head { * renamed and furthermore must be the default wait queue callback. */ extern wait_queue_func_t autoremove_wake_function; +extern wait_queue_func_t default_wake_function; -#define DEFINE_WAIT(name) \ +#define DEFINE_WAIT_FUNC(name, function) \ wait_queue_t name = { \ .private = current, \ - .func = autoremove_wake_function, \ + .func = function, \ .task_list = LINUX_LIST_HEAD_INIT(name.task_list) \ } + +#define DEFINE_WAIT(name) \ + DEFINE_WAIT_FUNC(name, autoremove_wake_function) #define DECLARE_WAITQUEUE(name, task) \ wait_queue_t name = { \ Modified: stable/11/sys/compat/linuxkpi/common/src/linux_schedule.c ============================================================================== --- stable/11/sys/compat/linuxkpi/common/src/linux_schedule.c Tue Mar 13 16:29:02 2018 (r330860) +++ stable/11/sys/compat/linuxkpi/common/src/linux_schedule.c Tue Mar 13 16:30:01 2018 (r330861) @@ -176,6 +176,13 @@ autoremove_wake_function(wait_queue_t *wq, unsigned in return (ret); } +int +default_wake_function(wait_queue_t *wq, unsigned int state, int flags, + void *key __unused) +{ + return (wake_up_task(wq->private, state)); +} + void linux_wake_up(wait_queue_head_t *wqh, unsigned int state, int nr, bool locked) { From owner-svn-src-stable-11@freebsd.org Tue Mar 13 16:30:52 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E7A21F2F799; Tue, 13 Mar 2018 16:30:51 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9C955870E1; Tue, 13 Mar 2018 16:30:51 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 978591C311; Tue, 13 Mar 2018 16:30:51 +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 w2DGUpf2009560; Tue, 13 Mar 2018 16:30:51 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DGUpSP009559; Tue, 13 Mar 2018 16:30:51 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803131630.w2DGUpSP009559@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Mar 2018 16:30:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330862 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 330862 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 16:30:52 -0000 Author: hselasky Date: Tue Mar 13 16:30:51 2018 New Revision: 330862 URL: https://svnweb.freebsd.org/changeset/base/330862 Log: MFC r330398: Implement wait_event_lock_irq() macro function in the LinuxKPI. Requested by: Johannes Lundberg Sponsored by: Mellanox Technologies Modified: stable/11/sys/compat/linuxkpi/common/include/linux/wait.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/wait.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/wait.h Tue Mar 13 16:30:01 2018 (r330861) +++ stable/11/sys/compat/linuxkpi/common/include/linux/wait.h Tue Mar 13 16:30:51 2018 (r330862) @@ -194,11 +194,19 @@ int linux_wait_event_common(wait_queue_head_t *, wait_ }) /* - * Hold the (locked) spinlock when testing the cond. + * The passed spinlock is held when testing the condition. */ #define wait_event_interruptible_lock_irq(wqh, cond, lock) ({ \ __wait_event_common(wqh, cond, MAX_SCHEDULE_TIMEOUT, \ TASK_INTERRUPTIBLE, &(lock)); \ +}) + +/* + * The passed spinlock is held when testing the condition. + */ +#define wait_event_lock_irq(wqh, cond, lock) ({ \ + __wait_event_common(wqh, cond, MAX_SCHEDULE_TIMEOUT, \ + TASK_UNINTERRUPTIBLE, &(lock)); \ }) static inline void From owner-svn-src-stable-11@freebsd.org Tue Mar 13 16:31:55 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40580F2F96B; Tue, 13 Mar 2018 16:31:55 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E5B4987315; Tue, 13 Mar 2018 16:31:54 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E0AEE1C444; Tue, 13 Mar 2018 16:31:54 +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 w2DGVs86009651; Tue, 13 Mar 2018 16:31:54 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DGVssv009650; Tue, 13 Mar 2018 16:31:54 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803131631.w2DGVssv009650@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Mar 2018 16:31:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330863 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 330863 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 16:31:55 -0000 Author: hselasky Date: Tue Mar 13 16:31:54 2018 New Revision: 330863 URL: https://svnweb.freebsd.org/changeset/base/330863 Log: MFC r330399: Stub kernel_param_lock() and kernel_param_unlock() in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/moduleparam.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/moduleparam.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/moduleparam.h Tue Mar 13 16:30:51 2018 (r330862) +++ stable/11/sys/compat/linuxkpi/common/include/linux/moduleparam.h Tue Mar 13 16:31:54 2018 (r330863) @@ -125,6 +125,9 @@ #define MODULE_PARM_DESC(name, desc) \ const char LINUXKPI_PARAM_DESC(name)[] = { desc } +#define kernel_param_lock(...) do {} while (0) +#define kernel_param_unlock(...) do {} while (0) + SYSCTL_DECL(_compat_linuxkpi); #endif /* _LINUX_MODULEPARAM_H_ */ From owner-svn-src-stable-11@freebsd.org Tue Mar 13 16:33:42 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 192A7F2FCD3; Tue, 13 Mar 2018 16:33:42 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BF98B87878; Tue, 13 Mar 2018 16:33:41 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BA8E21C46C; Tue, 13 Mar 2018 16:33:41 +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 w2DGXfW3010573; Tue, 13 Mar 2018 16:33:41 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DGXfA5010572; Tue, 13 Mar 2018 16:33:41 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803131633.w2DGXfA5010572@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Mar 2018 16:33:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330865 - stable/11/sys/compat/linuxkpi/common/src X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/src X-SVN-Commit-Revision: 330865 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 16:33:42 -0000 Author: hselasky Date: Tue Mar 13 16:33:41 2018 New Revision: 330865 URL: https://svnweb.freebsd.org/changeset/base/330865 Log: MFC r330689: Implement proper support for complete_all() in the LinuxKPI. When complete_all() is called there might be multiple waiters. The current implementation could only handle one waiter. Make sure the completion is sticky when complete_all() is called to be compatible with Linux. Found by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/src/linux_compat.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- stable/11/sys/compat/linuxkpi/common/src/linux_compat.c Tue Mar 13 16:33:00 2018 (r330864) +++ stable/11/sys/compat/linuxkpi/common/src/linux_compat.c Tue Mar 13 16:33:41 2018 (r330865) @@ -1779,11 +1779,14 @@ linux_complete_common(struct completion *c, int all) int wakeup_swapper; sleepq_lock(c); - c->done++; - if (all) + if (all) { + c->done = UINT_MAX; wakeup_swapper = sleepq_broadcast(c, SLEEPQ_SLEEP, 0, 0); - else + } else { + if (c->done != UINT_MAX) + c->done++; wakeup_swapper = sleepq_signal(c, SLEEPQ_SLEEP, 0, 0); + } sleepq_release(c); if (wakeup_swapper) kick_proc0(); @@ -1825,7 +1828,8 @@ linux_wait_for_common(struct completion *c, int flags) } else sleepq_wait(c, 0); } - c->done--; + if (c->done != UINT_MAX) + c->done--; sleepq_release(c); intr: @@ -1878,7 +1882,8 @@ linux_wait_for_timeout_common(struct completion *c, in goto done; } } - c->done--; + if (c->done != UINT_MAX) + c->done--; sleepq_release(c); /* return how many jiffies are left */ @@ -1894,12 +1899,10 @@ linux_try_wait_for_completion(struct completion *c) { int isdone; - isdone = 1; sleepq_lock(c); - if (c->done) + isdone = (c->done != 0); + if (c->done != 0 && c->done != UINT_MAX) c->done--; - else - isdone = 0; sleepq_release(c); return (isdone); } @@ -1909,10 +1912,8 @@ linux_completion_done(struct completion *c) { int isdone; - isdone = 1; sleepq_lock(c); - if (c->done == 0) - isdone = 0; + isdone = (c->done != 0); sleepq_release(c); return (isdone); } From owner-svn-src-stable-11@freebsd.org Tue Mar 13 17:04:15 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70A08F32FD9; Tue, 13 Mar 2018 17:04:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1B3A469682; Tue, 13 Mar 2018 17:04:15 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 15F1E1C8FC; Tue, 13 Mar 2018 17:04:15 +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 w2DH4EtF025827; Tue, 13 Mar 2018 17:04:14 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DH4E2w025825; Tue, 13 Mar 2018 17:04:14 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803131704.w2DH4E2w025825@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Mar 2018 17:04:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330867 - in stable/11/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 330867 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 17:04:15 -0000 Author: hselasky Date: Tue Mar 13 17:04:14 2018 New Revision: 330867 URL: https://svnweb.freebsd.org/changeset/base/330867 Log: MFC r330271: Rename callout member in struct timer_list to match the one in struct delayed_work in the LinuxKPI. This allows the timer_pending() function macro to be used with delayed work structures. No functional nor structural change. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/timer.h stable/11/sys/compat/linuxkpi/common/src/linux_compat.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/timer.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/timer.h Tue Mar 13 16:40:29 2018 (r330866) +++ stable/11/sys/compat/linuxkpi/common/include/linux/timer.h Tue Mar 13 17:04:14 2018 (r330867) @@ -38,7 +38,7 @@ #include struct timer_list { - struct callout timer_callout; + struct callout callout; void (*function) (unsigned long); unsigned long data; int expires; @@ -51,7 +51,7 @@ extern unsigned long linux_timer_hz_mask; #define setup_timer(timer, func, dat) do { \ (timer)->function = (func); \ (timer)->data = (dat); \ - callout_init(&(timer)->timer_callout, 1); \ + callout_init(&(timer)->callout, 1); \ } while (0) #define __setup_timer(timer, func, dat, flags) do { \ @@ -62,16 +62,16 @@ extern unsigned long linux_timer_hz_mask; #define init_timer(timer) do { \ (timer)->function = NULL; \ (timer)->data = 0; \ - callout_init(&(timer)->timer_callout, 1); \ + callout_init(&(timer)->callout, 1); \ } while (0) extern void mod_timer(struct timer_list *, int); extern void add_timer(struct timer_list *); extern void add_timer_on(struct timer_list *, int cpu); -#define del_timer(timer) (void)callout_stop(&(timer)->timer_callout) -#define del_timer_sync(timer) (void)callout_drain(&(timer)->timer_callout) -#define timer_pending(timer) callout_pending(&(timer)->timer_callout) +#define del_timer(timer) (void)callout_stop(&(timer)->callout) +#define del_timer_sync(timer) (void)callout_drain(&(timer)->callout) +#define timer_pending(timer) callout_pending(&(timer)->callout) #define round_jiffies(j) \ ((int)(((j) + linux_timer_hz_mask) & ~linux_timer_hz_mask)) #define round_jiffies_relative(j) round_jiffies(j) Modified: stable/11/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- stable/11/sys/compat/linuxkpi/common/src/linux_compat.c Tue Mar 13 16:40:29 2018 (r330866) +++ stable/11/sys/compat/linuxkpi/common/src/linux_compat.c Tue Mar 13 17:04:14 2018 (r330867) @@ -1734,7 +1734,7 @@ mod_timer(struct timer_list *timer, int expires) { timer->expires = expires; - callout_reset(&timer->timer_callout, + callout_reset(&timer->callout, linux_timer_jiffies_until(expires), &linux_timer_callback_wrapper, timer); } @@ -1743,7 +1743,7 @@ void add_timer(struct timer_list *timer) { - callout_reset(&timer->timer_callout, + callout_reset(&timer->callout, linux_timer_jiffies_until(timer->expires), &linux_timer_callback_wrapper, timer); } @@ -1752,7 +1752,7 @@ void add_timer_on(struct timer_list *timer, int cpu) { - callout_reset_on(&timer->timer_callout, + callout_reset_on(&timer->callout, linux_timer_jiffies_until(timer->expires), &linux_timer_callback_wrapper, timer, cpu); } From owner-svn-src-stable-11@freebsd.org Wed Mar 14 00:27:26 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78F4FF301D4; Wed, 14 Mar 2018 00:27:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2776B7E990; Wed, 14 Mar 2018 00:27:26 +0000 (UTC) (envelope-from mav@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 084CD20E24; Wed, 14 Mar 2018 00:27:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2E0RQb2050113; Wed, 14 Mar 2018 00:27:26 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E0RP2M050108; Wed, 14 Mar 2018 00:27:25 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201803140027.w2E0RP2M050108@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 14 Mar 2018 00:27:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330888 - in stable/11: share/man/man4 sys/dev/isp X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/11: share/man/man4 sys/dev/isp X-SVN-Commit-Revision: 330888 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 00:27:26 -0000 Author: mav Date: Wed Mar 14 00:27:25 2018 New Revision: 330888 URL: https://svnweb.freebsd.org/changeset/base/330888 Log: MFC r330121: Add support for Enhanced Gen 5 (16Gb) and Gen 6 (32Gb) QLogic FC HBAs. Sponsored by: iXsystems, Inc. Modified: stable/11/share/man/man4/isp.4 stable/11/sys/dev/isp/isp.c stable/11/sys/dev/isp/isp_pci.c stable/11/sys/dev/isp/ispmbox.h stable/11/sys/dev/isp/ispvar.h Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/isp.4 ============================================================================== --- stable/11/share/man/man4/isp.4 Wed Mar 14 00:04:58 2018 (r330887) +++ stable/11/share/man/man4/isp.4 Wed Mar 14 00:27:25 2018 (r330888) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2009-2017 Alexander Motin +.\" Copyright (c) 2009-2018 Alexander Motin .\" Copyright (c) 2006 Marcus Alves Grando .\" Copyright (c) 1998-2001 Matthew Jacob, for NASA/Ames Research Center .\" @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 3, 2017 +.Dd February 27, 2018 .Dt ISP 4 .Os .Sh NAME @@ -139,6 +139,10 @@ Optical 4Gb Fibre Channel PCIe cards. Optical 8Gb Fibre Channel PCIe cards. .It Qlogic 267x/836x (aka 2031/8031) Optical 16Gb FC/FCoE PCIe cards. +.It Qlogic 2690/2692/2694 (aka 2684/2692) +Optical 16Gb Fibre Channel PCIe cards. +.It Qlogic 2740/2742/2764 (aka 2722/2714) +Optical 32Gb Fibre Channel PCIe cards. .El .Sh CONFIGURATION OPTIONS Target mode support for Fibre Channel adapters may be enabled with the Modified: stable/11/sys/dev/isp/isp.c ============================================================================== --- stable/11/sys/dev/isp/isp.c Wed Mar 14 00:04:58 2018 (r330887) +++ stable/11/sys/dev/isp/isp.c Wed Mar 14 00:27:25 2018 (r330888) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009-2017 Alexander Motin + * Copyright (c) 2009-2018 Alexander Motin * Copyright (c) 1997-2009 by Matthew Jacob * All rights reserved. * @@ -224,8 +224,11 @@ isp_reset(ispsoftc_t *isp, int do_load_defaults) btype = "2532"; break; case ISP_HA_FC_2600: - btype = "2031"; + btype = "2600"; break; + case ISP_HA_FC_2700: + btype = "2700"; + break; default: break; } @@ -2018,7 +2021,7 @@ isp_fibre_init_2400(ispsoftc_t *isp) } icbp->icb_execthrottle = DEFAULT_EXEC_THROTTLE(isp); - if (icbp->icb_execthrottle < 1) { + if (icbp->icb_execthrottle < 1 && !IS_26XX(isp)) { isp_prt(isp, ISP_LOGERR, "bad execution throttle of %d- using %d", DEFAULT_EXEC_THROTTLE(isp), ICB_DFLT_THROTTLE); icbp->icb_execthrottle = ICB_DFLT_THROTTLE; } @@ -2123,11 +2126,15 @@ isp_fibre_init_2400(ispsoftc_t *isp) } else if (isp->isp_confopts & ISP_CFG_16GB) { icbp->icb_fwoptions3 &= ~ICB2400_OPT3_RATE_MASK; icbp->icb_fwoptions3 |= ICB2400_OPT3_RATE_16GB; + } else if (isp->isp_confopts & ISP_CFG_32GB) { + icbp->icb_fwoptions3 &= ~ICB2400_OPT3_RATE_MASK; + icbp->icb_fwoptions3 |= ICB2400_OPT3_RATE_32GB; } else { switch (icbp->icb_fwoptions3 & ICB2400_OPT3_RATE_MASK) { case ICB2400_OPT3_RATE_4GB: case ICB2400_OPT3_RATE_8GB: case ICB2400_OPT3_RATE_16GB: + case ICB2400_OPT3_RATE_32GB: case ICB2400_OPT3_RATE_AUTO: break; case ICB2400_OPT3_RATE_2GB: @@ -3092,6 +3099,8 @@ not_on_fabric: if (mbs.param[0] == MBOX_COMMAND_COMPLETE) { if (mbs.param[1] == MBGSD_10GB) fcp->isp_gbspeed = 10; + else if (mbs.param[1] == MBGSD_32GB) + fcp->isp_gbspeed = 32; else if (mbs.param[1] == MBGSD_16GB) fcp->isp_gbspeed = 16; else if (mbs.param[1] == MBGSD_8GB) @@ -5900,6 +5909,13 @@ isp_parse_async_fc(ispsoftc_t *isp, uint16_t mbox) isp_prt(isp, ISP_LOGERR, "Temperature alert (subcode 0x%x)", ISP_READ(isp, OUTMAILBOX1)); break; + case ASYNC_TRANSCEIVER_INSERTION: + isp_prt(isp, ISP_LOGDEBUG0, "Transceiver insertion (0x%x)", + ISP_READ(isp, OUTMAILBOX1)); + break; + case ASYNC_TRANSCEIVER_REMOVAL: + isp_prt(isp, ISP_LOGDEBUG0, "Transceiver removal"); + break; case ASYNC_AUTOLOAD_FW_COMPLETE: isp_prt(isp, ISP_LOGDEBUG0, "Autoload FW init complete"); break; @@ -6824,7 +6840,7 @@ static const uint32_t mbpfc[] = { ISP_FC_OPMAP(0x07, 0x01), /* 0x66: MBOX_TARGET_RESET */ ISP_FC_OPMAP(0x07, 0x01), /* 0x67: MBOX_CLEAR_TASK_SET */ ISP_FC_OPMAP(0x07, 0x01), /* 0x68: MBOX_ABORT_TASK_SET */ - ISP_FC_OPMAP(0x01, 0x07), /* 0x69: MBOX_GET_FW_STATE */ + ISP_FC_OPMAP_HALF(0x00, 0x01, 0x0f, 0x1f), /* 0x69: MBOX_GET_FW_STATE */ ISP_FC_OPMAP_HALF(0x6, 0x03, 0x0, 0xcf), /* 0x6a: MBOX_GET_PORT_NAME */ ISP_FC_OPMAP(0xcf, 0x01), /* 0x6b: MBOX_GET_LINK_STATUS */ ISP_FC_OPMAP(0x0f, 0x01), /* 0x6c: MBOX_INIT_LIP_RESET */ Modified: stable/11/sys/dev/isp/isp_pci.c ============================================================================== --- stable/11/sys/dev/isp/isp_pci.c Wed Mar 14 00:04:58 2018 (r330887) +++ stable/11/sys/dev/isp/isp_pci.c Wed Mar 14 00:27:25 2018 (r330888) @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2009-2018 Alexander Motin * Copyright (c) 1997-2008 by Matthew Jacob * All rights reserved. * @@ -175,6 +176,17 @@ static struct ispmdvec mdvec_2600 = { NULL }; +static struct ispmdvec mdvec_2700 = { + isp_pci_run_isr_2400, + isp_pci_rd_reg_2600, + isp_pci_wr_reg_2600, + isp_pci_mbxdma, + isp_pci_dmasetup, + isp_common_dmateardown, + isp_pci_irqsetup, + NULL +}; + #ifndef PCIM_CMD_INVEN #define PCIM_CMD_INVEN 0x10 #endif @@ -207,142 +219,80 @@ static struct ispmdvec mdvec_2600 = { #define PCIR_ROMADDR 0x30 #endif -#ifndef PCI_VENDOR_QLOGIC #define PCI_VENDOR_QLOGIC 0x1077 -#endif -#ifndef PCI_PRODUCT_QLOGIC_ISP1020 #define PCI_PRODUCT_QLOGIC_ISP1020 0x1020 -#endif - -#ifndef PCI_PRODUCT_QLOGIC_ISP1080 #define PCI_PRODUCT_QLOGIC_ISP1080 0x1080 -#endif - -#ifndef PCI_PRODUCT_QLOGIC_ISP10160 #define PCI_PRODUCT_QLOGIC_ISP10160 0x1016 -#endif - -#ifndef PCI_PRODUCT_QLOGIC_ISP12160 #define PCI_PRODUCT_QLOGIC_ISP12160 0x1216 -#endif - -#ifndef PCI_PRODUCT_QLOGIC_ISP1240 #define PCI_PRODUCT_QLOGIC_ISP1240 0x1240 -#endif - -#ifndef PCI_PRODUCT_QLOGIC_ISP1280 #define PCI_PRODUCT_QLOGIC_ISP1280 0x1280 -#endif -#ifndef PCI_PRODUCT_QLOGIC_ISP2100 #define PCI_PRODUCT_QLOGIC_ISP2100 0x2100 -#endif - -#ifndef PCI_PRODUCT_QLOGIC_ISP2200 #define PCI_PRODUCT_QLOGIC_ISP2200 0x2200 -#endif - -#ifndef PCI_PRODUCT_QLOGIC_ISP2300 #define PCI_PRODUCT_QLOGIC_ISP2300 0x2300 -#endif - -#ifndef PCI_PRODUCT_QLOGIC_ISP2312 #define PCI_PRODUCT_QLOGIC_ISP2312 0x2312 -#endif - -#ifndef PCI_PRODUCT_QLOGIC_ISP2322 #define PCI_PRODUCT_QLOGIC_ISP2322 0x2322 -#endif - -#ifndef PCI_PRODUCT_QLOGIC_ISP2422 #define PCI_PRODUCT_QLOGIC_ISP2422 0x2422 -#endif - -#ifndef PCI_PRODUCT_QLOGIC_ISP2432 #define PCI_PRODUCT_QLOGIC_ISP2432 0x2432 -#endif - -#ifndef PCI_PRODUCT_QLOGIC_ISP2532 #define PCI_PRODUCT_QLOGIC_ISP2532 0x2532 -#endif - -#ifndef PCI_PRODUCT_QLOGIC_ISP6312 +#define PCI_PRODUCT_QLOGIC_ISP5432 0x5432 #define PCI_PRODUCT_QLOGIC_ISP6312 0x6312 -#endif - -#ifndef PCI_PRODUCT_QLOGIC_ISP6322 #define PCI_PRODUCT_QLOGIC_ISP6322 0x6322 -#endif - -#ifndef PCI_PRODUCT_QLOGIC_ISP5432 -#define PCI_PRODUCT_QLOGIC_ISP5432 0x5432 -#endif - -#ifndef PCI_PRODUCT_QLOGIC_ISP2031 #define PCI_PRODUCT_QLOGIC_ISP2031 0x2031 -#endif - -#ifndef PCI_PRODUCT_QLOGIC_ISP8031 #define PCI_PRODUCT_QLOGIC_ISP8031 0x8031 -#endif +#define PCI_PRODUCT_QLOGIC_ISP2684 0x2171 +#define PCI_PRODUCT_QLOGIC_ISP2692 0x2b61 +#define PCI_PRODUCT_QLOGIC_ISP2714 0x2071 +#define PCI_PRODUCT_QLOGIC_ISP2722 0x2261 -#define PCI_QLOGIC_ISP5432 \ - ((PCI_PRODUCT_QLOGIC_ISP5432 << 16) | PCI_VENDOR_QLOGIC) - #define PCI_QLOGIC_ISP1020 \ ((PCI_PRODUCT_QLOGIC_ISP1020 << 16) | PCI_VENDOR_QLOGIC) - #define PCI_QLOGIC_ISP1080 \ ((PCI_PRODUCT_QLOGIC_ISP1080 << 16) | PCI_VENDOR_QLOGIC) - #define PCI_QLOGIC_ISP10160 \ ((PCI_PRODUCT_QLOGIC_ISP10160 << 16) | PCI_VENDOR_QLOGIC) - #define PCI_QLOGIC_ISP12160 \ ((PCI_PRODUCT_QLOGIC_ISP12160 << 16) | PCI_VENDOR_QLOGIC) - #define PCI_QLOGIC_ISP1240 \ ((PCI_PRODUCT_QLOGIC_ISP1240 << 16) | PCI_VENDOR_QLOGIC) - #define PCI_QLOGIC_ISP1280 \ ((PCI_PRODUCT_QLOGIC_ISP1280 << 16) | PCI_VENDOR_QLOGIC) #define PCI_QLOGIC_ISP2100 \ ((PCI_PRODUCT_QLOGIC_ISP2100 << 16) | PCI_VENDOR_QLOGIC) - #define PCI_QLOGIC_ISP2200 \ ((PCI_PRODUCT_QLOGIC_ISP2200 << 16) | PCI_VENDOR_QLOGIC) - #define PCI_QLOGIC_ISP2300 \ ((PCI_PRODUCT_QLOGIC_ISP2300 << 16) | PCI_VENDOR_QLOGIC) - #define PCI_QLOGIC_ISP2312 \ ((PCI_PRODUCT_QLOGIC_ISP2312 << 16) | PCI_VENDOR_QLOGIC) - #define PCI_QLOGIC_ISP2322 \ ((PCI_PRODUCT_QLOGIC_ISP2322 << 16) | PCI_VENDOR_QLOGIC) - #define PCI_QLOGIC_ISP2422 \ ((PCI_PRODUCT_QLOGIC_ISP2422 << 16) | PCI_VENDOR_QLOGIC) - #define PCI_QLOGIC_ISP2432 \ ((PCI_PRODUCT_QLOGIC_ISP2432 << 16) | PCI_VENDOR_QLOGIC) - #define PCI_QLOGIC_ISP2532 \ ((PCI_PRODUCT_QLOGIC_ISP2532 << 16) | PCI_VENDOR_QLOGIC) - +#define PCI_QLOGIC_ISP5432 \ + ((PCI_PRODUCT_QLOGIC_ISP5432 << 16) | PCI_VENDOR_QLOGIC) #define PCI_QLOGIC_ISP6312 \ ((PCI_PRODUCT_QLOGIC_ISP6312 << 16) | PCI_VENDOR_QLOGIC) - #define PCI_QLOGIC_ISP6322 \ ((PCI_PRODUCT_QLOGIC_ISP6322 << 16) | PCI_VENDOR_QLOGIC) - #define PCI_QLOGIC_ISP2031 \ ((PCI_PRODUCT_QLOGIC_ISP2031 << 16) | PCI_VENDOR_QLOGIC) - #define PCI_QLOGIC_ISP8031 \ ((PCI_PRODUCT_QLOGIC_ISP8031 << 16) | PCI_VENDOR_QLOGIC) +#define PCI_QLOGIC_ISP2684 \ + ((PCI_PRODUCT_QLOGIC_ISP2684 << 16) | PCI_VENDOR_QLOGIC) +#define PCI_QLOGIC_ISP2692 \ + ((PCI_PRODUCT_QLOGIC_ISP2692 << 16) | PCI_VENDOR_QLOGIC) +#define PCI_QLOGIC_ISP2714 \ + ((PCI_PRODUCT_QLOGIC_ISP2714 << 16) | PCI_VENDOR_QLOGIC) +#define PCI_QLOGIC_ISP2722 \ + ((PCI_PRODUCT_QLOGIC_ISP2722 << 16) | PCI_VENDOR_QLOGIC) /* * Odd case for some AMI raid cards... We need to *not* attach to this. @@ -462,6 +412,18 @@ isp_pci_probe(device_t dev) case PCI_QLOGIC_ISP8031: device_set_desc(dev, "Qlogic ISP 8031 PCI FCoE Adapter"); break; + case PCI_QLOGIC_ISP2684: + device_set_desc(dev, "Qlogic ISP 2684 PCI FC Adapter"); + break; + case PCI_QLOGIC_ISP2692: + device_set_desc(dev, "Qlogic ISP 2692 PCI FC Adapter"); + break; + case PCI_QLOGIC_ISP2714: + device_set_desc(dev, "Qlogic ISP 2714 PCI FC Adapter"); + break; + case PCI_QLOGIC_ISP2722: + device_set_desc(dev, "Qlogic ISP 2722 PCI FC Adapter"); + break; default: return (ENXIO); } @@ -807,6 +769,16 @@ isp_pci_attach(device_t dev) isp->isp_nchan += isp_nvports; isp->isp_mdvec = &mdvec_2600; isp->isp_type = ISP_HA_FC_2600; + pcs->pci_poff[MBOX_BLOCK >> _BLK_REG_SHFT] = PCI_MBOX_REGS2400_OFF; + break; + case PCI_QLOGIC_ISP2684: + case PCI_QLOGIC_ISP2692: + case PCI_QLOGIC_ISP2714: + case PCI_QLOGIC_ISP2722: + did = 0x2700; + isp->isp_nchan += isp_nvports; + isp->isp_mdvec = &mdvec_2700; + isp->isp_type = ISP_HA_FC_2700; pcs->pci_poff[MBOX_BLOCK >> _BLK_REG_SHFT] = PCI_MBOX_REGS2400_OFF; break; default: Modified: stable/11/sys/dev/isp/ispmbox.h ============================================================================== --- stable/11/sys/dev/isp/ispmbox.h Wed Mar 14 00:04:58 2018 (r330887) +++ stable/11/sys/dev/isp/ispmbox.h Wed Mar 14 00:27:25 2018 (r330888) @@ -1,6 +1,6 @@ /* $FreeBSD$ */ /*- - * Copyright (c) 2009-2017 Alexander Motin + * Copyright (c) 2009-2018 Alexander Motin * Copyright (c) 1997-2009 by Matthew Jacob * All rights reserved. * @@ -176,6 +176,7 @@ #define MBGSD_4GB 0x03 /* 24XX only */ #define MBGSD_8GB 0x04 /* 25XX only */ #define MBGSD_16GB 0x05 /* 26XX only */ +#define MBGSD_32GB 0x06 /* 27XX only */ #define MBGSD_10GB 0x13 /* 26XX only */ #define MBOX_SEND_RNFT 0x005e #define MBOX_INIT_FIRMWARE 0x0060 @@ -297,6 +298,8 @@ #define ASYNC_INTER_DRIVER_COMP 0x8100 /* FCoE only */ #define ASYNC_INTER_DRIVER_NOTIFY 0x8101 /* FCoE only */ #define ASYNC_INTER_DRIVER_TIME_EXT 0x8102 /* FCoE only */ +#define ASYNC_TRANSCEIVER_INSERTION 0x8130 +#define ASYNC_TRANSCEIVER_REMOVAL 0x8131 #define ASYNC_NIC_FW_STATE_CHANGE 0x8200 /* FCoE only */ #define ASYNC_AUTOLOAD_FW_COMPLETE 0x8400 #define ASYNC_AUTOLOAD_FW_FAILURE 0x8401 @@ -1070,6 +1073,7 @@ typedef struct { #define ICB2400_OPT3_RATE_4GB 0x00006000 #define ICB2400_OPT3_RATE_8GB 0x00008000 #define ICB2400_OPT3_RATE_16GB 0x0000A000 +#define ICB2400_OPT3_RATE_32GB 0x0000C000 #define ICB2400_OPT3_ENA_OOF_XFRDY 0x00000200 #define ICB2400_OPT3_NO_N2N_LOGI 0x00000100 #define ICB2400_OPT3_NO_LOCAL_PLOGI 0x00000080 Modified: stable/11/sys/dev/isp/ispvar.h ============================================================================== --- stable/11/sys/dev/isp/ispvar.h Wed Mar 14 00:04:58 2018 (r330887) +++ stable/11/sys/dev/isp/ispvar.h Wed Mar 14 00:27:25 2018 (r330888) @@ -1,6 +1,6 @@ /* $FreeBSD$ */ /*- - * Copyright (c) 2009-2017 Alexander Motin + * Copyright (c) 2009-2018 Alexander Motin * Copyright (c) 1997-2009 by Matthew Jacob * All rights reserved. * @@ -631,8 +631,8 @@ struct ispsoftc { #define ISP_CFG_NPORT_ONLY 0x04 /* insist on {N/F}-Port connection */ #define ISP_CFG_LPORT 0x06 /* prefer {N/F}L-Port connection */ #define ISP_CFG_NPORT 0x08 /* prefer {N/F}-Port connection */ -#define ISP_CFG_1GB 0x10 /* force 1GB connection (23XX only) */ -#define ISP_CFG_2GB 0x20 /* force 2GB connection (23XX only) */ +#define ISP_CFG_1GB 0x10 /* force 1Gb connection (23XX only) */ +#define ISP_CFG_2GB 0x20 /* force 2Gb connection (23XX only) */ #define ISP_CFG_NORELOAD 0x80 /* don't download f/w */ #define ISP_CFG_NONVRAM 0x40 /* ignore NVRAM */ #define ISP_CFG_NOFCTAPE 0x100 /* disable FC-Tape */ @@ -640,9 +640,10 @@ struct ispsoftc { #define ISP_CFG_OWNFSZ 0x400 /* override NVRAM frame size */ #define ISP_CFG_OWNLOOPID 0x800 /* override NVRAM loopid */ #define ISP_CFG_OWNEXCTHROTTLE 0x1000 /* override NVRAM execution throttle */ -#define ISP_CFG_4GB 0x2000 /* force 4GB connection (24XX only) */ -#define ISP_CFG_8GB 0x4000 /* force 8GB connection (25XX only) */ -#define ISP_CFG_16GB 0x8000 /* force 16GB connection (82XX only) */ +#define ISP_CFG_4GB 0x2000 /* force 4Gb connection (24XX only) */ +#define ISP_CFG_8GB 0x4000 /* force 8Gb connection (25XX only) */ +#define ISP_CFG_16GB 0x8000 /* force 16Gb connection (26XX only) */ +#define ISP_CFG_32GB 0x10000 /* force 32Gb connection (27XX only) */ /* * For each channel, the outer layers should know what role that channel @@ -743,6 +744,7 @@ struct ispsoftc { #define ISP_HA_FC_2400 0x60 #define ISP_HA_FC_2500 0x70 #define ISP_HA_FC_2600 0x80 +#define ISP_HA_FC_2700 0x90 #define IS_SCSI(isp) (isp->isp_type & ISP_HA_SCSI) #define IS_1020(isp) (isp->isp_type < ISP_HA_SCSI_1240) @@ -769,6 +771,7 @@ struct ispsoftc { #define IS_24XX(isp) ((isp)->isp_type >= ISP_HA_FC_2400) #define IS_25XX(isp) ((isp)->isp_type >= ISP_HA_FC_2500) #define IS_26XX(isp) ((isp)->isp_type >= ISP_HA_FC_2600) +#define IS_27XX(isp) ((isp)->isp_type >= ISP_HA_FC_2700) /* * DMA related macros From owner-svn-src-stable-11@freebsd.org Wed Mar 14 01:38:48 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B94FF3A962; Wed, 14 Mar 2018 01:38:48 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 39D03814A3; Wed, 14 Mar 2018 01:38:48 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 33F2A218C5; Wed, 14 Mar 2018 01:38:48 +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 w2E1cmUo084669; Wed, 14 Mar 2018 01:38:48 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E1cmMJ084668; Wed, 14 Mar 2018 01:38:48 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201803140138.w2E1cmMJ084668@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 14 Mar 2018 01:38:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330890 - stable/11/share/mk X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/share/mk X-SVN-Commit-Revision: 330890 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 01:38:48 -0000 Author: emaste Date: Wed Mar 14 01:38:47 2018 New Revision: 330890 URL: https://svnweb.freebsd.org/changeset/base/330890 Log: MFC r330613: Disable LLD_BOOTSTRAP under WITHOUT_CROSS_COMPILER LLD is a cross toolchain component. It shouldn't be built when requesting a build without building a cross compiler. (CROSS_COMPILER is somewhat unfortunately named; in any case, lld should be treated as GNU binutils here.) Submitted by: Dan McGregor Modified: stable/11/share/mk/src.opts.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/share/mk/src.opts.mk ============================================================================== --- stable/11/share/mk/src.opts.mk Wed Mar 14 00:30:49 2018 (r330889) +++ stable/11/share/mk/src.opts.mk Wed Mar 14 01:38:47 2018 (r330890) @@ -397,6 +397,7 @@ MK_BINUTILS_BOOTSTRAP:= no MK_CLANG_BOOTSTRAP:= no MK_ELFTOOLCHAIN_BOOTSTRAP:= no MK_GCC_BOOTSTRAP:= no +MK_LLD_BOOTSTRAP:= no .endif .if ${MK_META_MODE} == "yes" From owner-svn-src-stable-11@freebsd.org Wed Mar 14 02:45:43 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0EB6FF43BD8; Wed, 14 Mar 2018 02:45:43 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B12EA83C2E; Wed, 14 Mar 2018 02:45:42 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 89EBD22371; Wed, 14 Mar 2018 02:45:42 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2E2jges019646; Wed, 14 Mar 2018 02:45:42 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E2jgpG019644; Wed, 14 Mar 2018 02:45:42 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803140245.w2E2jgpG019644@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 14 Mar 2018 02:45:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330892 - stable/11/sys/dev/syscons X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/syscons X-SVN-Commit-Revision: 330892 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 02:45:43 -0000 Author: eadler Date: Wed Mar 14 02:45:42 2018 New Revision: 330892 URL: https://svnweb.freebsd.org/changeset/base/330892 Log: MFC r304173,r304181,r304186: Fix restoring the kbd_mode part of the keyboard state in grab/ungrab. Simply change the mode to K_XLATE using a local variable and use the grab level as a flag to tell screen switches not to change it again, so that we don't need to switch scp->kbd_mode. We did the latter, but didn't have the complications to update the keyboard mode switch for every screen switch. sc->kbd_mode remains at its user setting for all scp's and ungrabbing restores to it. Restructure the grabbing functions into mere wrappers of new open and close functions. Scattered calls to sc_cnputc() and sc_cngetc() were broken by turning the semi-reentrant inline context-switching code in these functions into the grabbing functions. cncheckc() calls for panic dumps are the main broken case. The grabbing functions have special behaviour (mainly screen switching in sc_cngrab()) which makes them unsuitable as replacements for the inline code. Clean up the new sc cn open and close functions (old sc cn grab and ungrab functions). Mainly, spell sc as itself instead of as scp->sc. Modified: stable/11/sys/dev/syscons/syscons.c stable/11/sys/dev/syscons/syscons.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/syscons/syscons.c ============================================================================== --- stable/11/sys/dev/syscons/syscons.c Wed Mar 14 02:35:49 2018 (r330891) +++ stable/11/sys/dev/syscons/syscons.c Wed Mar 14 02:45:42 2018 (r330892) @@ -1645,59 +1645,70 @@ sc_cnterm(struct consdev *cp) sc_console = NULL; } +struct sc_cnstate; /* not used yet */ +static void sccnclose(sc_softc_t *sc, struct sc_cnstate *sp); +static void sccnopen(sc_softc_t *sc, struct sc_cnstate *sp, int flags); + static void -sc_cngrab(struct consdev *cp) +sccnopen(sc_softc_t *sc, struct sc_cnstate *sp, int flags) { - scr_stat *scp; + int kbd_mode; if (!cold && - sc_console->sc->cur_scp->index != sc_console->index && - sc_console->sc->cur_scp->smode.mode == VT_AUTO && + sc->cur_scp->index != sc_console->index && + sc->cur_scp->smode.mode == VT_AUTO && sc_console->smode.mode == VT_AUTO) - sc_switch_scr(sc_console->sc, sc_console->index); + sc_switch_scr(sc, sc_console->index); - scp = sc_console->sc->cur_scp; - - if (scp->sc->kbd == NULL) + if (sc->kbd == NULL) return; - if (scp->sc->grab_level++ > 0) - return; - /* * Make sure the keyboard is accessible even when the kbd device * driver is disabled. */ - kbdd_enable(scp->sc->kbd); + kbdd_enable(sc->kbd); - /* we shall always use the keyboard in the XLATE mode here */ - scp->kbd_prev_mode = scp->kbd_mode; - scp->kbd_mode = K_XLATE; - (void)kbdd_ioctl(scp->sc->kbd, KDSKBMODE, (caddr_t)&scp->kbd_mode); - - kbdd_poll(scp->sc->kbd, TRUE); + /* Switch the keyboard to console mode (K_XLATE, polled) on all scp's. */ + kbd_mode = K_XLATE; + (void)kbdd_ioctl(sc->kbd, KDSKBMODE, (caddr_t)&kbd_mode); + kbdd_poll(sc->kbd, TRUE); } static void -sc_cnungrab(struct consdev *cp) +sccnclose(sc_softc_t *sc, struct sc_cnstate *sp) { - scr_stat *scp; - - scp = sc_console->sc->cur_scp; /* XXX */ - if (scp->sc->kbd == NULL) + if (sc->kbd == NULL) return; - if (--scp->sc->grab_level > 0) - return; + /* Restore keyboard mode (for the current, possibly-changed scp). */ + kbdd_poll(sc->kbd, FALSE); + (void)kbdd_ioctl(sc->kbd, KDSKBMODE, (caddr_t)&sc->cur_scp->kbd_mode); - kbdd_poll(scp->sc->kbd, FALSE); + kbdd_disable(sc->kbd); +} - scp->kbd_mode = scp->kbd_prev_mode; - (void)kbdd_ioctl(scp->sc->kbd, KDSKBMODE, (caddr_t)&scp->kbd_mode); - kbdd_disable(scp->sc->kbd); +static void +sc_cngrab(struct consdev *cp) +{ + sc_softc_t *sc; + + sc = sc_console->sc; + if (sc->grab_level++ == 0) + sccnopen(sc, NULL, 0); } static void +sc_cnungrab(struct consdev *cp) +{ + sc_softc_t *sc; + + sc = sc_console->sc; + if (--sc->grab_level == 0) + sccnclose(sc, NULL); +} + +static void sc_cnputc(struct consdev *cd, int c) { u_char buf[1]; @@ -2667,7 +2678,7 @@ exchange_scr(sc_softc_t *sc) sc_set_border(scp, scp->border); /* set up the keyboard for the new screen */ - if (sc->old_scp->kbd_mode != scp->kbd_mode) + if (sc->grab_level == 0 && sc->old_scp->kbd_mode != scp->kbd_mode) (void)kbdd_ioctl(sc->kbd, KDSKBMODE, (caddr_t)&scp->kbd_mode); update_kbd_state(scp, scp->status, LOCK_MASK); @@ -3412,7 +3423,7 @@ next_code: if (!(flags & SCGETC_CN)) random_harvest_queue(&c, sizeof(c), 1, RANDOM_KEYBOARD); - if (scp->kbd_mode != K_XLATE) + if (sc->grab_level == 0 && scp->kbd_mode != K_XLATE) return KEYCHAR(c); /* if scroll-lock pressed allow history browsing */ Modified: stable/11/sys/dev/syscons/syscons.h ============================================================================== --- stable/11/sys/dev/syscons/syscons.h Wed Mar 14 02:35:49 2018 (r330891) +++ stable/11/sys/dev/syscons/syscons.h Wed Mar 14 02:45:42 2018 (r330892) @@ -306,7 +306,6 @@ typedef struct scr_stat { int status; /* status (bitfield) */ int kbd_mode; /* keyboard I/O mode */ - int kbd_prev_mode; /* keyboard I/O mode */ int cursor_pos; /* cursor buffer position */ int cursor_oldpos; /* cursor old buffer position */ From owner-svn-src-stable-11@freebsd.org Wed Mar 14 02:56:43 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA895F468B6; Wed, 14 Mar 2018 02:56:43 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 58770843DB; Wed, 14 Mar 2018 02:56:43 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 535D7224EF; Wed, 14 Mar 2018 02:56:43 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2E2uhjK024420; Wed, 14 Mar 2018 02:56:43 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E2uhgs024419; Wed, 14 Mar 2018 02:56:43 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803140256.w2E2uhgs024419@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 14 Mar 2018 02:56:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330893 - stable/11/sys/dev/syscons X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/syscons X-SVN-Commit-Revision: 330893 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 02:56:44 -0000 Author: eadler Date: Wed Mar 14 02:56:43 2018 New Revision: 330893 URL: https://svnweb.freebsd.org/changeset/base/330893 Log: MFC r304758: Reorganise a little to prepare for locking fixes: - in sccnopen(), open the keyboard before the screen. The keyboard currently requires Giant (although it must be spinlocked to work correctly as a console), so the previous order would be a LOR if it has any semblance of locking. - add a (currently dummy) state arg to scgetc(). Modified: stable/11/sys/dev/syscons/syscons.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/syscons/syscons.c ============================================================================== --- stable/11/sys/dev/syscons/syscons.c Wed Mar 14 02:45:42 2018 (r330892) +++ stable/11/sys/dev/syscons/syscons.c Wed Mar 14 02:56:43 2018 (r330893) @@ -79,6 +79,8 @@ __FBSDID("$FreeBSD$"); #include #include +struct sc_cnstate; /* not used yet */ + #define COLD 0 #define WARM 1 @@ -185,7 +187,7 @@ static void scterm(int unit, int flags); static void scshutdown(void *, int); static void scsuspend(void *); static void scresume(void *); -static u_int scgetc(sc_softc_t *sc, u_int flags); +static u_int scgetc(sc_softc_t *sc, u_int flags, struct sc_cnstate *sp); static void sc_puts(scr_stat *scp, u_char *buf, int len, int kernel); #define SCGETC_CN 1 #define SCGETC_NONBLOCK 2 @@ -750,7 +752,7 @@ sckbdevent(keyboard_t *thiskbd, int event, void *arg) * I don't think this is nessesary, and it doesn't fix * the Xaccel-2.1 keyboard hang, but it can't hurt. XXX */ - while ((c = scgetc(sc, SCGETC_NONBLOCK)) != NOKEY) { + while ((c = scgetc(sc, SCGETC_NONBLOCK, NULL)) != NOKEY) { cur_tty = SC_DEV(sc, sc->cur_scp->index); if (!tty_opened_ns(cur_tty)) @@ -1645,7 +1647,6 @@ sc_cnterm(struct consdev *cp) sc_console = NULL; } -struct sc_cnstate; /* not used yet */ static void sccnclose(sc_softc_t *sc, struct sc_cnstate *sp); static void sccnopen(sc_softc_t *sc, struct sc_cnstate *sp, int flags); @@ -1654,14 +1655,8 @@ sccnopen(sc_softc_t *sc, struct sc_cnstate *sp, int fl { int kbd_mode; - if (!cold && - sc->cur_scp->index != sc_console->index && - sc->cur_scp->smode.mode == VT_AUTO && - sc_console->smode.mode == VT_AUTO) - sc_switch_scr(sc, sc_console->index); - if (sc->kbd == NULL) - return; + goto over_keyboard; /* * Make sure the keyboard is accessible even when the kbd device @@ -1673,6 +1668,14 @@ sccnopen(sc_softc_t *sc, struct sc_cnstate *sp, int fl kbd_mode = K_XLATE; (void)kbdd_ioctl(sc->kbd, KDSKBMODE, (caddr_t)&kbd_mode); kbdd_poll(sc->kbd, TRUE); +over_keyboard: ; + + if (!cold && + sc->cur_scp->index != sc_console->index && + sc->cur_scp->smode.mode == VT_AUTO && + sc_console->smode.mode == VT_AUTO) + sc_switch_scr(sc, sc_console->index); + } static void @@ -1787,7 +1790,7 @@ sc_cngetc(struct consdev *cd) return -1; } - c = scgetc(scp->sc, SCGETC_CN | SCGETC_NONBLOCK); + c = scgetc(scp->sc, SCGETC_CN | SCGETC_NONBLOCK, NULL); switch (KEYFLAGS(c)) { case 0: /* normal char */ @@ -3383,7 +3386,7 @@ sc_init_emulator(scr_stat *scp, char *name) * return NOKEY if there is nothing there. */ static u_int -scgetc(sc_softc_t *sc, u_int flags) +scgetc(sc_softc_t *sc, u_int flags, struct sc_cnstate *sp) { scr_stat *scp; #ifndef SC_NO_HISTORY From owner-svn-src-stable-11@freebsd.org Wed Mar 14 03:04:25 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 856B4F496AC; Wed, 14 Mar 2018 03:04:25 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 358F08510A; Wed, 14 Mar 2018 03:04:25 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3076C226F6; Wed, 14 Mar 2018 03:04:25 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2E34PwR031032; Wed, 14 Mar 2018 03:04:25 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E34O5P031030; Wed, 14 Mar 2018 03:04:24 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803140304.w2E34O5P031030@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 14 Mar 2018 03:04:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330895 - stable/11/sys/dev/syscons X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/syscons X-SVN-Commit-Revision: 330895 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 03:04:25 -0000 Author: eadler Date: Wed Mar 14 03:04:24 2018 New Revision: 330895 URL: https://svnweb.freebsd.org/changeset/base/330895 Log: MFC r304773,r304800: Flesh out the state and flags args to sccnopen(). Set state flags to indicate (potentially partial) success of the open. Use these to decide what to close in sccnclose(). Only grab/ungrab use open/close so far. Add a per-sc variable to count successful keyboard opens and use this instead of the grab count to decide if the keyboad state has been switched. Start fixing the locking by using atomic ops for the most important counter -- the grab level one. Other racy counting will eventually be fixed by normal mutex or kdb locking in most cases. Use a 2-entry per-sc stack of states for grabbing. 2 is just enough to debug grabbing, e.g., for gets(). gets() grabs once and might not be able to do a full (or any) state switch. ddb grabs again and has a better chance of doing a full state switch and needs a place to stack the previous state. For more than 3 levels, grabbing just changes the count. Console drivers should try to switch on every i/o in case lower levels of nesting failed to switch but the current level succeeds, but then the switch (back) must be completed on every i/o and this flaps the state unless the switch is null. The main point of grabbing is to make it null quite often. Syscons grabbing also does a carefully chosen screen focus that is not done on every i/o. Add a large comment about grabbing. Restore some small lost comments. Modified: stable/11/sys/dev/syscons/syscons.c stable/11/sys/dev/syscons/syscons.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/syscons/syscons.c ============================================================================== --- stable/11/sys/dev/syscons/syscons.c Wed Mar 14 03:00:17 2018 (r330894) +++ stable/11/sys/dev/syscons/syscons.c Wed Mar 14 03:04:24 2018 (r330895) @@ -79,8 +79,6 @@ __FBSDID("$FreeBSD$"); #include #include -struct sc_cnstate; /* not used yet */ - #define COLD 0 #define WARM 1 @@ -1655,7 +1653,13 @@ sccnopen(sc_softc_t *sc, struct sc_cnstate *sp, int fl { int kbd_mode; - if (sc->kbd == NULL) + /* assert(sc_console_unit >= 0) */ + + sp->kbd_opened = FALSE; + sp->scr_opened = FALSE; + + /* Opening the keyboard is optional. */ + if (!(flags & 1) || sc->kbd == NULL) goto over_keyboard; /* @@ -1667,48 +1671,79 @@ sccnopen(sc_softc_t *sc, struct sc_cnstate *sp, int fl /* Switch the keyboard to console mode (K_XLATE, polled) on all scp's. */ kbd_mode = K_XLATE; (void)kbdd_ioctl(sc->kbd, KDSKBMODE, (caddr_t)&kbd_mode); + sc->kbd_open_level++; kbdd_poll(sc->kbd, TRUE); + + sp->kbd_opened = TRUE; over_keyboard: ; + /* The screen is opened iff locking it succeeds. */ + sp->scr_opened = TRUE; + + /* The screen switch is optional. */ + if (!(flags & 2)) + return; + + /* try to switch to the kernel console screen */ if (!cold && sc->cur_scp->index != sc_console->index && sc->cur_scp->smode.mode == VT_AUTO && sc_console->smode.mode == VT_AUTO) sc_switch_scr(sc, sc_console->index); - } static void sccnclose(sc_softc_t *sc, struct sc_cnstate *sp) { - if (sc->kbd == NULL) + sp->scr_opened = FALSE; + + if (!sp->kbd_opened) return; /* Restore keyboard mode (for the current, possibly-changed scp). */ kbdd_poll(sc->kbd, FALSE); - (void)kbdd_ioctl(sc->kbd, KDSKBMODE, (caddr_t)&sc->cur_scp->kbd_mode); + if (--sc->kbd_open_level == 0) + (void)kbdd_ioctl(sc->kbd, KDSKBMODE, (caddr_t)&sc->cur_scp->kbd_mode); kbdd_disable(sc->kbd); + sp->kbd_opened = FALSE; } +/* + * Grabbing switches the screen and keyboard focus to sc_console and the + * keyboard mode to (K_XLATE, polled). Only switching to polled mode is + * essential (for preventing the interrupt handler from eating input + * between polls). Focus is part of the UI, and the other switches are + * work just was well when they are done on every entry and exit. + * + * Screen switches while grabbed are supported, and to maintain focus for + * this ungrabbing and closing only restore the polling state and then + * the keyboard mode if on the original screen. + */ + static void sc_cngrab(struct consdev *cp) { sc_softc_t *sc; + int lev; sc = sc_console->sc; - if (sc->grab_level++ == 0) - sccnopen(sc, NULL, 0); + lev = atomic_fetchadd_int(&sc->grab_level, 1); + if (lev >= 0 && lev < 2) + sccnopen(sc, &sc->grab_state[lev], 1 | 2); } static void sc_cnungrab(struct consdev *cp) { sc_softc_t *sc; + int lev; sc = sc_console->sc; - if (--sc->grab_level == 0) - sccnclose(sc, NULL); + lev = atomic_load_acq_int(&sc->grab_level) - 1; + if (lev >= 0 && lev < 2) + sccnclose(sc, &sc->grab_state[lev]); + atomic_add_int(&sc->grab_level, -1); } static void @@ -2681,7 +2716,7 @@ exchange_scr(sc_softc_t *sc) sc_set_border(scp, scp->border); /* set up the keyboard for the new screen */ - if (sc->grab_level == 0 && sc->old_scp->kbd_mode != scp->kbd_mode) + if (sc->kbd_open_level == 0 && sc->old_scp->kbd_mode != scp->kbd_mode) (void)kbdd_ioctl(sc->kbd, KDSKBMODE, (caddr_t)&scp->kbd_mode); update_kbd_state(scp, scp->status, LOCK_MASK); @@ -3426,7 +3461,7 @@ next_code: if (!(flags & SCGETC_CN)) random_harvest_queue(&c, sizeof(c), 1, RANDOM_KEYBOARD); - if (sc->grab_level == 0 && scp->kbd_mode != K_XLATE) + if (sc->kbd_open_level == 0 && scp->kbd_mode != K_XLATE) return KEYCHAR(c); /* if scroll-lock pressed allow history browsing */ Modified: stable/11/sys/dev/syscons/syscons.h ============================================================================== --- stable/11/sys/dev/syscons/syscons.h Wed Mar 14 03:00:17 2018 (r330894) +++ stable/11/sys/dev/syscons/syscons.h Wed Mar 14 03:04:24 2018 (r330895) @@ -188,6 +188,11 @@ struct video_adapter; struct scr_stat; struct tty; +struct sc_cnstate { + u_char kbd_opened; + u_char scr_opened; +}; + typedef struct sc_softc { int unit; /* unit # */ int config; /* configuration flags */ @@ -231,6 +236,9 @@ typedef struct sc_softc { char write_in_progress; char blink_in_progress; int grab_level; + /* 2 is just enough for kdb to grab for stepping normal grabbing: */ + struct sc_cnstate grab_state[2]; + int kbd_open_level; struct mtx scr_lock; /* mutex for sc_puts() */ struct mtx video_mtx; From owner-svn-src-stable-11@freebsd.org Wed Mar 14 03:09:49 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA068F49BB5; Wed, 14 Mar 2018 03:09:48 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 67E7F85779; Wed, 14 Mar 2018 03:09:48 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 62BE9226FC; Wed, 14 Mar 2018 03:09:48 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2E39mxg031371; Wed, 14 Mar 2018 03:09:48 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E39mMD031368; Wed, 14 Mar 2018 03:09:48 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803140309.w2E39mMD031368@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 14 Mar 2018 03:09:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330896 - in stable/11/sys: dev/syscons kern X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: in stable/11/sys: dev/syscons kern X-SVN-Commit-Revision: 330896 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 03:09:49 -0000 Author: eadler Date: Wed Mar 14 03:09:47 2018 New Revision: 330896 URL: https://svnweb.freebsd.org/changeset/base/330896 Log: MFC r304804: Less-quick fix for locking fixes in r172250. r172250 added a second syscons spinlock for the output routine alone. It is better to extend the coverage of the first syscons spinlock added in r162285. 2 locks might work with complicated juggling, but no juggling was done. What the 2 locks actually did was to cover some of the missing locking in each other and deadlock less often against each other than a single lock with larger coverage would against itself. Races are preferable to deadlocks here, but 2 locks are still worse since they are harder to understand and fix. Prefer deadlocks to races and merge the second lock into the first one. Extend the scope of the spinlocking to all of sc_cnputc() instead of just the sc_puts() part. This further prefers deadlocks to races. Extend the kdb_active hack from sc_puts() internals for the second lock to all spinlocking. This reduces deadlocks much more than the other changes increases them. The s/p,10* test in ddb gets much further now. Hide this detail in the SC_VIDEO_LOCK() macro. Add namespace pollution in 1 nested #include and reduce namespace pollution in other nested #includes to pay for this. Move the first lock higher in the witness order. The second lock was unnaturally low and the first lock was unnaturally high. The second lock had to be above "sleepq chain" and/or "callout" to avoid spurious LORs for visual bells in sc_puts(). Other console driver locks are already even higher (but not adjacent like they should be) except when they are missing from the table. Audio bells also benefit from the syscons lock being high so that audio mutexes have chance of being lower. Otherwise, console drviver locks should be as low as possible. Non-spurious LORs now occur if the bell code calls printf() or is interrupted (perhaps by an NMI) and the interrupt handler calls printf(). Previous commits turned off many bells in console i/o but missed ones done by the teken layer. Modified: stable/11/sys/dev/syscons/syscons.c stable/11/sys/dev/syscons/syscons.h stable/11/sys/kern/subr_witness.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/syscons/syscons.c ============================================================================== --- stable/11/sys/dev/syscons/syscons.c Wed Mar 14 03:04:24 2018 (r330895) +++ stable/11/sys/dev/syscons/syscons.c Wed Mar 14 03:09:47 2018 (r330896) @@ -343,7 +343,9 @@ sctty_outwakeup(struct tty *tp) len = ttydisc_getc(tp, buf, sizeof buf); if (len == 0) break; + SC_VIDEO_LOCK(scp->sc); sc_puts(scp, buf, len, 0); + SC_VIDEO_UNLOCK(scp->sc); } } @@ -1760,6 +1762,8 @@ sc_cnputc(struct consdev *cd, int c) /* assert(sc_console != NULL) */ + SC_VIDEO_LOCK(scp->sc); + #ifndef SC_NO_HISTORY if (scp == scp->sc->cur_scp && scp->status & SLKED) { scp->status &= ~SLKED; @@ -1793,6 +1797,7 @@ sc_cnputc(struct consdev *cd, int c) s = spltty(); /* block sckbdevent and scrn_timer */ sccnupdate(scp); splx(s); + SC_VIDEO_UNLOCK(scp->sc); } static int @@ -2726,24 +2731,14 @@ exchange_scr(sc_softc_t *sc) static void sc_puts(scr_stat *scp, u_char *buf, int len, int kernel) { - int need_unlock = 0; - #ifdef DEV_SPLASH /* make screensaver happy */ if (!sticky_splash && scp == scp->sc->cur_scp && !sc_saver_keyb_only) run_scrn_saver = FALSE; #endif - if (scp->tsw) { - if (!kdb_active && !mtx_owned(&scp->sc->scr_lock)) { - need_unlock = 1; - mtx_lock_spin(&scp->sc->scr_lock); - } + if (scp->tsw) (*scp->tsw->te_puts)(scp, buf, len, kernel); - if (need_unlock) - mtx_unlock_spin(&scp->sc->scr_lock); - } - if (scp->sc->delayed_next_scr) sc_switch_scr(scp->sc, scp->sc->delayed_next_scr - 1); } @@ -2906,10 +2901,8 @@ scinit(int unit, int flags) * disappeared... */ sc = sc_get_softc(unit, flags & SC_KERNEL_CONSOLE); - if ((sc->flags & SC_INIT_DONE) == 0) { - mtx_init(&sc->scr_lock, "scrlock", NULL, MTX_SPIN); + if ((sc->flags & SC_INIT_DONE) == 0) SC_VIDEO_LOCKINIT(sc); - } adp = NULL; if (sc->adapter >= 0) { @@ -3126,7 +3119,6 @@ scterm(int unit, int flags) (*scp->tsw->te_term)(scp, &scp->ts); if (scp->ts != NULL) free(scp->ts, M_DEVBUF); - mtx_destroy(&sc->scr_lock); mtx_destroy(&sc->video_mtx); /* clear the structure */ Modified: stable/11/sys/dev/syscons/syscons.h ============================================================================== --- stable/11/sys/dev/syscons/syscons.h Wed Mar 14 03:04:24 2018 (r330895) +++ stable/11/sys/dev/syscons/syscons.h Wed Mar 14 03:09:47 2018 (r330896) @@ -34,8 +34,9 @@ #ifndef _DEV_SYSCONS_SYSCONS_H_ #define _DEV_SYSCONS_SYSCONS_H_ -#include -#include +#include /* XXX */ +#include +#include /* machine-dependent part of the header */ @@ -239,7 +240,6 @@ typedef struct sc_softc { /* 2 is just enough for kdb to grab for stepping normal grabbing: */ struct sc_cnstate grab_state[2]; int kbd_open_level; - struct mtx scr_lock; /* mutex for sc_puts() */ struct mtx video_mtx; long scrn_time_stamp; @@ -547,12 +547,12 @@ typedef struct { MTX_SPIN | MTX_RECURSE); #define SC_VIDEO_LOCK(sc) \ do { \ - if (!cold) \ + if (!kdb_active) \ mtx_lock_spin(&(sc)->video_mtx); \ } while(0) #define SC_VIDEO_UNLOCK(sc) \ do { \ - if (!cold) \ + if (!kdb_active) \ mtx_unlock_spin(&(sc)->video_mtx); \ } while(0) Modified: stable/11/sys/kern/subr_witness.c ============================================================================== --- stable/11/sys/kern/subr_witness.c Wed Mar 14 03:04:24 2018 (r330895) +++ stable/11/sys/kern/subr_witness.c Wed Mar 14 03:09:47 2018 (r330896) @@ -645,7 +645,6 @@ static struct witness_order_list_entry order_lists[] = #endif { "rm.mutex_mtx", &lock_class_mtx_spin }, { "sio", &lock_class_mtx_spin }, - { "scrlock", &lock_class_mtx_spin }, #ifdef __i386__ { "cy", &lock_class_mtx_spin }, #endif @@ -661,6 +660,7 @@ static struct witness_order_list_entry order_lists[] = { "pmc-per-proc", &lock_class_mtx_spin }, #endif { "process slock", &lock_class_mtx_spin }, + { "syscons video lock", &lock_class_mtx_spin }, { "sleepq chain", &lock_class_mtx_spin }, { "rm_spinlock", &lock_class_mtx_spin }, { "turnstile chain", &lock_class_mtx_spin }, @@ -669,7 +669,6 @@ static struct witness_order_list_entry order_lists[] = { "td_contested", &lock_class_mtx_spin }, { "callout", &lock_class_mtx_spin }, { "entropy harvest mutex", &lock_class_mtx_spin }, - { "syscons video lock", &lock_class_mtx_spin }, #ifdef SMP { "smp rendezvous", &lock_class_mtx_spin }, #endif From owner-svn-src-stable-11@freebsd.org Wed Mar 14 03:20:09 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B426CF4A60F; Wed, 14 Mar 2018 03:20:08 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6644385D52; Wed, 14 Mar 2018 03:20:08 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5FDD12287D; Wed, 14 Mar 2018 03:20:08 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2E3K8x7036486; Wed, 14 Mar 2018 03:20:08 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E3JuGP036341; Wed, 14 Mar 2018 03:19:56 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803140319.w2E3JuGP036341@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 14 Mar 2018 03:19:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330897 - in stable/11: bin/cat bin/chflags bin/chmod bin/cp bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/hostname bin/kill bin/ln bin/ls bin/mkdir bin/mv bin/pax bin/ps bi... X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: in stable/11: bin/cat bin/chflags bin/chmod bin/cp bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/hostname bin/kill bin/ln bin/ls bin/mkdir bin/mv bin/pax bin/ps bin/pwd bin/realpath bin/rm... X-SVN-Commit-Revision: 330897 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 03:20:10 -0000 Author: eadler Date: Wed Mar 14 03:19:51 2018 New Revision: 330897 URL: https://svnweb.freebsd.org/changeset/base/330897 Log: Partial merge of the SPDX changes These changes are incomplete but are making it difficult to determine what other changes can/should be merged. No objections from: pfg Modified: stable/11/bin/cat/cat.c stable/11/bin/chflags/chflags.c stable/11/bin/chmod/chmod.c stable/11/bin/cp/cp.c stable/11/bin/cp/extern.h stable/11/bin/cp/utils.c stable/11/bin/date/date.c stable/11/bin/date/extern.h stable/11/bin/date/netdate.c stable/11/bin/dd/args.c stable/11/bin/dd/conv.c stable/11/bin/dd/conv_tab.c stable/11/bin/dd/dd.c stable/11/bin/dd/dd.h stable/11/bin/dd/extern.h stable/11/bin/dd/misc.c stable/11/bin/dd/position.c stable/11/bin/df/df.c stable/11/bin/domainname/domainname.c stable/11/bin/echo/echo.c stable/11/bin/ed/cbc.c stable/11/bin/hostname/hostname.c stable/11/bin/kill/kill.c stable/11/bin/ln/ln.c stable/11/bin/ls/cmp.c stable/11/bin/ls/extern.h stable/11/bin/ls/ls.c stable/11/bin/ls/ls.h stable/11/bin/ls/print.c stable/11/bin/ls/util.c stable/11/bin/mkdir/mkdir.c stable/11/bin/mv/mv.c stable/11/bin/pax/ar_io.c stable/11/bin/pax/ar_subs.c stable/11/bin/pax/buf_subs.c stable/11/bin/pax/cache.c stable/11/bin/pax/cache.h stable/11/bin/pax/cpio.c stable/11/bin/pax/cpio.h stable/11/bin/pax/extern.h stable/11/bin/pax/file_subs.c stable/11/bin/pax/ftree.c stable/11/bin/pax/ftree.h stable/11/bin/pax/gen_subs.c stable/11/bin/pax/options.c stable/11/bin/pax/options.h stable/11/bin/pax/pat_rep.c stable/11/bin/pax/pat_rep.h stable/11/bin/pax/pax.c stable/11/bin/pax/pax.h stable/11/bin/pax/sel_subs.c stable/11/bin/pax/sel_subs.h stable/11/bin/pax/tables.c stable/11/bin/pax/tables.h stable/11/bin/pax/tar.c stable/11/bin/pax/tar.h stable/11/bin/pax/tty_subs.c stable/11/bin/ps/extern.h stable/11/bin/ps/fmt.c stable/11/bin/ps/keyword.c stable/11/bin/ps/nlist.c stable/11/bin/ps/print.c stable/11/bin/ps/ps.c stable/11/bin/ps/ps.h stable/11/bin/pwd/pwd.c stable/11/bin/realpath/realpath.c stable/11/bin/rm/rm.c stable/11/bin/rmdir/rmdir.c stable/11/bin/sh/bltin/bltin.h stable/11/bin/sh/bltin/echo.c stable/11/bin/sh/mail.h stable/11/bin/sh/main.c stable/11/bin/sh/main.h stable/11/bin/sh/memalloc.c stable/11/bin/sh/memalloc.h stable/11/bin/sh/miscbltin.c stable/11/bin/sh/mknodes.c stable/11/bin/sh/mksyntax.c stable/11/bin/sh/myhistedit.h stable/11/bin/sh/mystring.c stable/11/bin/sh/mystring.h stable/11/bin/sh/options.c stable/11/bin/sh/options.h stable/11/bin/sh/output.c stable/11/bin/sh/output.h stable/11/bin/sh/parser.c stable/11/bin/sh/parser.h stable/11/bin/sh/redir.c stable/11/bin/sh/redir.h stable/11/bin/sh/shell.h stable/11/bin/sh/show.c stable/11/bin/sh/show.h stable/11/bin/sh/trap.c stable/11/bin/sh/trap.h stable/11/bin/sh/var.c stable/11/bin/sh/var.h stable/11/include/_ctype.h stable/11/include/a.out.h stable/11/include/ar.h stable/11/include/arpa/ftp.h stable/11/include/arpa/inet.h stable/11/include/arpa/nameser.h stable/11/include/arpa/nameser_compat.h stable/11/include/arpa/telnet.h stable/11/include/arpa/tftp.h stable/11/include/assert.h stable/11/include/bitstring.h stable/11/include/complex.h stable/11/include/cpio.h stable/11/include/ctype.h stable/11/include/db.h stable/11/include/dirent.h stable/11/include/dlfcn.h stable/11/include/elf-hints.h stable/11/include/elf.h stable/11/include/err.h stable/11/include/fmtmsg.h stable/11/include/fnmatch.h stable/11/include/fstab.h stable/11/include/fts.h stable/11/include/getopt.h stable/11/include/glob.h stable/11/include/grp.h stable/11/include/hesiod.h stable/11/include/iconv.h stable/11/include/inttypes.h stable/11/include/iso646.h stable/11/include/kenv.h stable/11/include/langinfo.h stable/11/include/libgen.h stable/11/include/limits.h stable/11/include/link.h stable/11/include/locale.h stable/11/include/malloc_np.h stable/11/include/memory.h stable/11/include/mk-osreldate.sh stable/11/include/monetary.h stable/11/include/mpool.h stable/11/include/mqueue.h stable/11/include/ndbm.h stable/11/include/netdb.h stable/11/include/nl_types.h stable/11/include/nlist.h stable/11/include/nss.h stable/11/include/nsswitch.h stable/11/include/paths.h stable/11/include/printf.h stable/11/include/proc_service.h stable/11/include/protocols/dumprestore.h stable/11/include/protocols/routed.h stable/11/include/protocols/rwhod.h stable/11/include/protocols/talkd.h stable/11/include/protocols/timed.h stable/11/include/pthread.h stable/11/include/pthread_np.h stable/11/include/pwd.h stable/11/include/ranlib.h stable/11/include/regex.h stable/11/include/resolv.h stable/11/include/rpc/auth.h stable/11/include/rpc/auth_des.h stable/11/include/rpc/auth_kerb.h stable/11/include/rpc/auth_unix.h stable/11/include/rpc/clnt.h stable/11/include/rpc/clnt_soc.h stable/11/include/rpc/des.h stable/11/include/rpc/des_crypt.h stable/11/include/rpc/nettype.h stable/11/include/rpc/pmap_clnt.h stable/11/include/rpc/pmap_prot.h stable/11/include/rpc/pmap_rmt.h stable/11/include/rpc/raw.h stable/11/include/rpc/rpc.h stable/11/include/rpc/rpc_com.h stable/11/include/rpc/rpc_msg.h stable/11/include/rpc/rpcb_clnt.h stable/11/include/rpc/rpcent.h stable/11/include/rpc/rpcsec_gss.h stable/11/include/rpc/svc.h stable/11/include/rpc/svc_auth.h stable/11/include/rpc/svc_dg.h stable/11/include/rpc/svc_soc.h stable/11/include/rpc/xdr.h stable/11/include/rpcsvc/nis_tags.h stable/11/include/rpcsvc/yp_prot.h stable/11/include/rpcsvc/ypclnt.h stable/11/include/runetype.h stable/11/include/semaphore.h stable/11/include/setjmp.h stable/11/include/signal.h stable/11/include/spawn.h stable/11/include/stab.h stable/11/include/stdalign.h stable/11/include/stdbool.h stable/11/include/stddef.h stable/11/include/stdio.h stable/11/include/stdlib.h stable/11/include/stdnoreturn.h stable/11/include/string.h stable/11/include/stringlist.h stable/11/include/strings.h stable/11/include/sysexits.h stable/11/include/tar.h stable/11/include/termios.h stable/11/include/tgmath.h stable/11/include/time.h stable/11/include/timeconv.h stable/11/include/timers.h stable/11/include/ttyent.h stable/11/include/uchar.h stable/11/include/ulimit.h stable/11/include/unistd.h stable/11/include/utime.h stable/11/include/utmpx.h stable/11/include/uuid.h stable/11/include/varargs.h stable/11/include/wchar.h stable/11/include/wctype.h stable/11/include/wordexp.h stable/11/include/xlocale.h stable/11/include/xlocale/_ctype.h stable/11/include/xlocale/_inttypes.h stable/11/include/xlocale/_langinfo.h stable/11/include/xlocale/_locale.h stable/11/include/xlocale/_monetary.h stable/11/include/xlocale/_stdio.h stable/11/include/xlocale/_stdlib.h stable/11/include/xlocale/_string.h stable/11/include/xlocale/_time.h stable/11/include/xlocale/_uchar.h stable/11/include/xlocale/_wchar.h stable/11/lib/csu/amd64/crt1.c stable/11/lib/csu/arm/crt1.c stable/11/lib/csu/common/crtbrand.c stable/11/lib/csu/common/ignore_init.c stable/11/lib/csu/common/notes.h stable/11/lib/csu/mips/crt1.c stable/11/lib/csu/powerpc/crt1.c stable/11/lib/csu/powerpc64/crt1.c stable/11/lib/csu/sparc64/crt1.c stable/11/lib/libarchive/config_freebsd.h stable/11/lib/libbluetooth/bluetooth.c stable/11/lib/libbluetooth/bluetooth.h stable/11/lib/libbluetooth/dev.c stable/11/lib/libbluetooth/hci.c stable/11/lib/libbsdstat/bsdstat.c stable/11/lib/libbsdstat/bsdstat.h stable/11/lib/libc/amd64/SYS.h stable/11/lib/libc/amd64/_fpmath.h stable/11/lib/libc/amd64/gen/_set_tp.c stable/11/lib/libc/amd64/gen/getcontextx.c stable/11/lib/libc/amd64/gen/makecontext.c stable/11/lib/libc/amd64/gen/signalcontext.c stable/11/lib/libc/amd64/string/strcpy.c stable/11/lib/libc/amd64/sys/amd64_get_fsbase.c stable/11/lib/libc/amd64/sys/amd64_get_gsbase.c stable/11/lib/libc/amd64/sys/amd64_set_fsbase.c stable/11/lib/libc/amd64/sys/amd64_set_gsbase.c stable/11/lib/libc/arm/SYS.h stable/11/lib/libc/arm/_fpmath.h stable/11/lib/libc/arm/aeabi/aeabi_atexit.c stable/11/lib/libc/arm/aeabi/aeabi_double.c stable/11/lib/libc/arm/aeabi/aeabi_float.c stable/11/lib/libc/arm/aeabi/aeabi_unwind_cpp.c stable/11/lib/libc/arm/gen/_set_tp.c stable/11/lib/libc/arm/gen/arm_initfini.c stable/11/lib/libc/arm/gen/fabs.c stable/11/lib/libc/arm/gen/flt_rounds.c stable/11/lib/libc/arm/gen/getcontextx.c stable/11/lib/libc/arm/gen/makecontext.c stable/11/lib/libc/arm/gen/signalcontext.c stable/11/lib/libc/arm/sys/__vdso_gettc.c stable/11/lib/libc/compat-43/creat.c stable/11/lib/libc/compat-43/gethostid.c stable/11/lib/libc/compat-43/getwd.c stable/11/lib/libc/compat-43/killpg.c stable/11/lib/libc/compat-43/sethostid.c stable/11/lib/libc/compat-43/setpgrp.c stable/11/lib/libc/compat-43/setrgid.c stable/11/lib/libc/compat-43/setruid.c stable/11/lib/libc/compat-43/sigcompat.c stable/11/lib/libc/db/btree/bt_close.c stable/11/lib/libc/db/btree/bt_conv.c stable/11/lib/libc/db/btree/bt_debug.c stable/11/lib/libc/db/btree/bt_delete.c stable/11/lib/libc/db/btree/bt_get.c stable/11/lib/libc/db/btree/bt_open.c stable/11/lib/libc/db/btree/bt_overflow.c stable/11/lib/libc/db/btree/bt_page.c stable/11/lib/libc/db/btree/bt_put.c stable/11/lib/libc/db/btree/bt_search.c stable/11/lib/libc/db/btree/bt_seq.c stable/11/lib/libc/db/btree/bt_split.c stable/11/lib/libc/db/btree/bt_utils.c stable/11/lib/libc/db/btree/btree.h stable/11/lib/libc/db/btree/extern.h stable/11/lib/libc/db/db/db.c stable/11/lib/libc/db/hash/extern.h stable/11/lib/libc/db/hash/hash.c stable/11/lib/libc/db/hash/hash.h stable/11/lib/libc/db/hash/hash_bigkey.c stable/11/lib/libc/db/hash/hash_buf.c stable/11/lib/libc/db/hash/hash_func.c stable/11/lib/libc/db/hash/hash_log2.c stable/11/lib/libc/db/hash/hash_page.c stable/11/lib/libc/db/hash/ndbm.c stable/11/lib/libc/db/hash/page.h stable/11/lib/libc/db/mpool/mpool-compat.c stable/11/lib/libc/db/mpool/mpool.c stable/11/lib/libc/db/recno/extern.h stable/11/lib/libc/db/recno/rec_close.c stable/11/lib/libc/db/recno/rec_delete.c stable/11/lib/libc/db/recno/rec_get.c stable/11/lib/libc/db/recno/rec_open.c stable/11/lib/libc/db/recno/rec_put.c stable/11/lib/libc/db/recno/rec_search.c stable/11/lib/libc/db/recno/rec_seq.c stable/11/lib/libc/db/recno/rec_utils.c stable/11/lib/libc/db/recno/recno.h stable/11/lib/libc/db/test/btree.tests/main.c stable/11/lib/libc/db/test/dbtest.c stable/11/lib/libc/db/test/hash.tests/driver2.c stable/11/lib/libc/db/test/hash.tests/tcreat3.c stable/11/lib/libc/db/test/hash.tests/tdel.c stable/11/lib/libc/db/test/hash.tests/thash4.c stable/11/lib/libc/db/test/hash.tests/tread2.c stable/11/lib/libc/db/test/hash.tests/tseq.c stable/11/lib/libc/db/test/hash.tests/tverify.c stable/11/lib/libc/gdtoa/_hdtoa.c stable/11/lib/libc/gdtoa/_hldtoa.c stable/11/lib/libc/gdtoa/_ldtoa.c stable/11/lib/libc/gdtoa/machdep_ldisQ.c stable/11/lib/libc/gdtoa/machdep_ldisd.c stable/11/lib/libc/gdtoa/machdep_ldisx.c stable/11/lib/libc/gen/__getosreldate.c stable/11/lib/libc/gen/__xuname.c stable/11/lib/libc/gen/_once_stub.c stable/11/lib/libc/gen/_pthread_stubs.c stable/11/lib/libc/gen/_spinlock_stub.c stable/11/lib/libc/gen/_thread_init.c stable/11/lib/libc/gen/alarm.c stable/11/lib/libc/gen/assert.c stable/11/lib/libc/gen/auxv.c stable/11/lib/libc/gen/cap_sandboxed.c stable/11/lib/libc/gen/clock.c stable/11/lib/libc/gen/clock_getcpuclockid.c stable/11/lib/libc/gen/closedir.c stable/11/lib/libc/gen/confstr.c stable/11/lib/libc/gen/crypt.c stable/11/lib/libc/gen/ctermid.c stable/11/lib/libc/gen/daemon.c stable/11/lib/libc/gen/devname.c stable/11/lib/libc/gen/dirfd.c stable/11/lib/libc/gen/disklabel.c stable/11/lib/libc/gen/dlfcn.c stable/11/lib/libc/gen/dup3.c stable/11/lib/libc/gen/elf_utils.c stable/11/lib/libc/gen/err.c stable/11/lib/libc/gen/errlst.c stable/11/lib/libc/gen/errno.c stable/11/lib/libc/gen/exec.c stable/11/lib/libc/gen/fdevname.c stable/11/lib/libc/gen/feature_present.c stable/11/lib/libc/gen/fmtcheck.c stable/11/lib/libc/gen/fmtmsg.c stable/11/lib/libc/gen/fnmatch.c stable/11/lib/libc/gen/fpclassify.c stable/11/lib/libc/gen/frexp.c stable/11/lib/libc/gen/fstab.c stable/11/lib/libc/gen/ftok.c stable/11/lib/libc/gen/fts-compat.c stable/11/lib/libc/gen/fts-compat.h stable/11/lib/libc/gen/fts.c stable/11/lib/libc/gen/gen-private.h stable/11/lib/libc/gen/getbootfile.c stable/11/lib/libc/gen/getbsize.c stable/11/lib/libc/gen/getcap.c stable/11/lib/libc/gen/getcwd.c stable/11/lib/libc/gen/getdomainname.c stable/11/lib/libc/gen/getgrent.c stable/11/lib/libc/gen/getgrouplist.c stable/11/lib/libc/gen/gethostname.c stable/11/lib/libc/gen/getloadavg.c stable/11/lib/libc/gen/getlogin.c stable/11/lib/libc/gen/getmntinfo.c stable/11/lib/libc/gen/getnetgrent.c stable/11/lib/libc/gen/getosreldate.c stable/11/lib/libc/gen/getpagesize.c stable/11/lib/libc/gen/getpagesizes.c stable/11/lib/libc/gen/getpeereid.c stable/11/lib/libc/gen/getpwent.c stable/11/lib/libc/gen/getttyent.c stable/11/lib/libc/gen/getusershell.c stable/11/lib/libc/gen/getutxent.c stable/11/lib/libc/gen/getvfsbyname.c stable/11/lib/libc/gen/glob.c stable/11/lib/libc/gen/initgroups.c stable/11/lib/libc/gen/isatty.c stable/11/lib/libc/gen/isinf.c stable/11/lib/libc/gen/isnan.c stable/11/lib/libc/gen/libc_dlopen.c stable/11/lib/libc/gen/lockf.c stable/11/lib/libc/gen/nice.c stable/11/lib/libc/gen/nlist.c stable/11/lib/libc/gen/opendir.c stable/11/lib/libc/gen/pause.c stable/11/lib/libc/gen/popen.c stable/11/lib/libc/gen/posix_spawn.c stable/11/lib/libc/gen/psignal.c stable/11/lib/libc/gen/pututxline.c stable/11/lib/libc/gen/pw_scan.c stable/11/lib/libc/gen/pw_scan.h stable/11/lib/libc/gen/raise.c stable/11/lib/libc/gen/readdir.c stable/11/lib/libc/gen/rewinddir.c stable/11/lib/libc/gen/scandir.c stable/11/lib/libc/gen/seekdir.c stable/11/lib/libc/gen/sem.c stable/11/lib/libc/gen/sem_new.c stable/11/lib/libc/gen/semctl.c stable/11/lib/libc/gen/setdomainname.c stable/11/lib/libc/gen/sethostname.c stable/11/lib/libc/gen/setjmperr.c stable/11/lib/libc/gen/setmode.c stable/11/lib/libc/gen/siginterrupt.c stable/11/lib/libc/gen/siglist.c stable/11/lib/libc/gen/signal.c stable/11/lib/libc/gen/sigsetops.c stable/11/lib/libc/gen/sleep.c stable/11/lib/libc/gen/stringlist.c stable/11/lib/libc/gen/strtofflags.c stable/11/lib/libc/gen/sysconf.c stable/11/lib/libc/gen/sysctl.c stable/11/lib/libc/gen/sysctlnametomib.c stable/11/lib/libc/gen/syslog.c stable/11/lib/libc/gen/telldir.c stable/11/lib/libc/gen/telldir.h stable/11/lib/libc/gen/termios.c stable/11/lib/libc/gen/time.c stable/11/lib/libc/gen/times.c stable/11/lib/libc/gen/timezone.c stable/11/lib/libc/gen/tls.c stable/11/lib/libc/gen/ttyname.c stable/11/lib/libc/gen/ttyslot.c stable/11/lib/libc/gen/ualarm.c stable/11/lib/libc/gen/ulimit.c stable/11/lib/libc/gen/uname.c stable/11/lib/libc/gen/unvis-compat.c stable/11/lib/libc/gen/usleep.c stable/11/lib/libc/gen/utime.c stable/11/lib/libc/gen/utxdb.c stable/11/lib/libc/gen/utxdb.h stable/11/lib/libc/gen/valloc.c stable/11/lib/libc/gen/wait.c stable/11/lib/libc/gen/wait3.c stable/11/lib/libc/gen/waitid.c stable/11/lib/libc/gen/waitpid.c stable/11/lib/libc/gen/wordexp.c stable/11/lib/libc/gmon/gmon.c stable/11/lib/libc/gmon/mcount.c stable/11/lib/libc/i386/SYS.h stable/11/lib/libc/i386/_fpmath.h stable/11/lib/libc/i386/gen/_set_tp.c stable/11/lib/libc/i386/gen/getcontextx.c stable/11/lib/libc/i386/gen/makecontext.c stable/11/lib/libc/i386/gen/signalcontext.c stable/11/lib/libc/i386/sys/i386_clr_watch.c stable/11/lib/libc/i386/sys/i386_get_fsbase.c stable/11/lib/libc/i386/sys/i386_get_gsbase.c stable/11/lib/libc/i386/sys/i386_get_ioperm.c stable/11/lib/libc/i386/sys/i386_get_ldt.c stable/11/lib/libc/i386/sys/i386_set_fsbase.c stable/11/lib/libc/i386/sys/i386_set_gsbase.c stable/11/lib/libc/i386/sys/i386_set_ioperm.c stable/11/lib/libc/i386/sys/i386_set_ldt.c stable/11/lib/libc/i386/sys/i386_set_watch.c stable/11/lib/libc/i386/sys/i386_vm86.c stable/11/lib/libc/iconv/__iconv.c stable/11/lib/libc/iconv/__iconv_free_list.c stable/11/lib/libc/iconv/__iconv_get_list.c stable/11/lib/libc/iconv/_strtol.h stable/11/lib/libc/iconv/_strtoul.h stable/11/lib/libc/iconv/bsd_iconv.c stable/11/lib/libc/iconv/citrus_aliasname_local.h stable/11/lib/libc/iconv/citrus_bcs.c stable/11/lib/libc/iconv/citrus_bcs.h stable/11/lib/libc/iconv/citrus_bcs_strtol.c stable/11/lib/libc/iconv/citrus_bcs_strtoul.c stable/11/lib/libc/iconv/citrus_csmapper.c stable/11/lib/libc/iconv/citrus_csmapper.h stable/11/lib/libc/iconv/citrus_db.c stable/11/lib/libc/iconv/citrus_db.h stable/11/lib/libc/iconv/citrus_db_factory.c stable/11/lib/libc/iconv/citrus_db_factory.h stable/11/lib/libc/iconv/citrus_db_file.h stable/11/lib/libc/iconv/citrus_db_hash.c stable/11/lib/libc/iconv/citrus_db_hash.h stable/11/lib/libc/iconv/citrus_esdb.c stable/11/lib/libc/iconv/citrus_esdb.h stable/11/lib/libc/iconv/citrus_esdb_file.h stable/11/lib/libc/iconv/citrus_fix_grouping.h stable/11/lib/libc/iconv/citrus_hash.c stable/11/lib/libc/iconv/citrus_hash.h stable/11/lib/libc/iconv/citrus_iconv.c stable/11/lib/libc/iconv/citrus_iconv.h stable/11/lib/libc/iconv/citrus_iconv_local.h stable/11/lib/libc/iconv/citrus_lock.h stable/11/lib/libc/iconv/citrus_lookup.c stable/11/lib/libc/iconv/citrus_lookup.h stable/11/lib/libc/iconv/citrus_lookup_factory.c stable/11/lib/libc/iconv/citrus_lookup_factory.h stable/11/lib/libc/iconv/citrus_lookup_file.h stable/11/lib/libc/iconv/citrus_mapper.c stable/11/lib/libc/iconv/citrus_mapper.h stable/11/lib/libc/iconv/citrus_mapper_local.h stable/11/lib/libc/iconv/citrus_memstream.c stable/11/lib/libc/iconv/citrus_memstream.h stable/11/lib/libc/iconv/citrus_mmap.c stable/11/lib/libc/iconv/citrus_mmap.h stable/11/lib/libc/iconv/citrus_module.c stable/11/lib/libc/iconv/citrus_module.h stable/11/lib/libc/iconv/citrus_namespace.h stable/11/lib/libc/iconv/citrus_none.c stable/11/lib/libc/iconv/citrus_none.h stable/11/lib/libc/iconv/citrus_pivot_factory.c stable/11/lib/libc/iconv/citrus_pivot_factory.h stable/11/lib/libc/iconv/citrus_pivot_file.h stable/11/lib/libc/iconv/citrus_prop.c stable/11/lib/libc/iconv/citrus_prop.h stable/11/lib/libc/iconv/citrus_region.h stable/11/lib/libc/iconv/citrus_stdenc.c stable/11/lib/libc/iconv/citrus_stdenc.h stable/11/lib/libc/iconv/citrus_stdenc_local.h stable/11/lib/libc/iconv/citrus_stdenc_template.h stable/11/lib/libc/iconv/citrus_types.h stable/11/lib/libc/iconv/iconv-internal.h stable/11/lib/libc/iconv/iconv.c stable/11/lib/libc/iconv/iconv_canonicalize.c stable/11/lib/libc/iconv/iconv_close.c stable/11/lib/libc/iconv/iconv_compat.c stable/11/lib/libc/iconv/iconv_open.c stable/11/lib/libc/iconv/iconv_open_into.c stable/11/lib/libc/iconv/iconv_set_relocation_prefix.c stable/11/lib/libc/iconv/iconvctl.c stable/11/lib/libc/iconv/iconvlist.c stable/11/lib/libc/include/compat.h stable/11/lib/libc/include/errlst.h stable/11/lib/libc/include/fpmath.h stable/11/lib/libc/include/libc_private.h stable/11/lib/libc/include/namespace.h stable/11/lib/libc/include/nscache.h stable/11/lib/libc/include/nscachedcli.h stable/11/lib/libc/include/nss_tls.h stable/11/lib/libc/include/reentrant.h stable/11/lib/libc/include/spinlock.h stable/11/lib/libc/include/un-namespace.h stable/11/lib/libc/inet/inet_addr.c stable/11/lib/libc/inet/inet_lnaof.c stable/11/lib/libc/inet/inet_makeaddr.c stable/11/lib/libc/inet/inet_netof.c stable/11/lib/libc/inet/inet_network.c stable/11/lib/libc/inet/inet_ntoa.c stable/11/lib/libc/locale/ascii.c stable/11/lib/libc/locale/btowc.c stable/11/lib/libc/locale/c16rtomb.c stable/11/lib/libc/locale/c32rtomb.c stable/11/lib/libc/locale/cXXrtomb_iconv.h stable/11/lib/libc/locale/collate.c stable/11/lib/libc/locale/collate.h stable/11/lib/libc/locale/collcmp.c stable/11/lib/libc/locale/ctype.c stable/11/lib/libc/locale/euc.c stable/11/lib/libc/locale/fix_grouping.c stable/11/lib/libc/locale/gb18030.c stable/11/lib/libc/locale/gb2312.c stable/11/lib/libc/locale/gbk.c stable/11/lib/libc/locale/isctype.c stable/11/lib/libc/locale/iswctype.c stable/11/lib/libc/locale/ldpart.c stable/11/lib/libc/locale/ldpart.h stable/11/lib/libc/locale/lmessages.c stable/11/lib/libc/locale/lmessages.h stable/11/lib/libc/locale/lmonetary.c stable/11/lib/libc/locale/lmonetary.h stable/11/lib/libc/locale/lnumeric.c stable/11/lib/libc/locale/lnumeric.h stable/11/lib/libc/locale/localeconv.c stable/11/lib/libc/locale/mblen.c stable/11/lib/libc/locale/mblocal.h stable/11/lib/libc/locale/mbrlen.c stable/11/lib/libc/locale/mbrtoc16.c stable/11/lib/libc/locale/mbrtoc32.c stable/11/lib/libc/locale/mbrtocXX_iconv.h stable/11/lib/libc/locale/mbrtowc.c stable/11/lib/libc/locale/mbsinit.c stable/11/lib/libc/locale/mbsnrtowcs.c stable/11/lib/libc/locale/mbsrtowcs.c stable/11/lib/libc/locale/mbstowcs.c stable/11/lib/libc/locale/mbtowc.c stable/11/lib/libc/locale/mskanji.c stable/11/lib/libc/locale/nextwctype.c stable/11/lib/libc/locale/nl_langinfo.c stable/11/lib/libc/locale/none.c stable/11/lib/libc/locale/rpmatch.c stable/11/lib/libc/locale/rune.c stable/11/lib/libc/locale/runefile.h stable/11/lib/libc/locale/runetype.c stable/11/lib/libc/locale/setlocale.c stable/11/lib/libc/locale/setlocale.h stable/11/lib/libc/locale/setrunelocale.c stable/11/lib/libc/locale/table.c stable/11/lib/libc/locale/tolower.c stable/11/lib/libc/locale/toupper.c stable/11/lib/libc/locale/utf8.c stable/11/lib/libc/locale/wcrtomb.c stable/11/lib/libc/locale/wcsftime.c stable/11/lib/libc/locale/wcsnrtombs.c stable/11/lib/libc/locale/wcsrtombs.c stable/11/lib/libc/locale/wcstod.c stable/11/lib/libc/locale/wcstof.c stable/11/lib/libc/locale/wcstoimax.c stable/11/lib/libc/locale/wcstol.c stable/11/lib/libc/locale/wcstold.c stable/11/lib/libc/locale/wcstoll.c stable/11/lib/libc/locale/wcstombs.c stable/11/lib/libc/locale/wcstoul.c stable/11/lib/libc/locale/wcstoull.c stable/11/lib/libc/locale/wcstoumax.c stable/11/lib/libc/locale/wctob.c stable/11/lib/libc/locale/wctomb.c stable/11/lib/libc/locale/wctrans.c stable/11/lib/libc/locale/wctype.c stable/11/lib/libc/locale/wcwidth.c stable/11/lib/libc/locale/xlocale.c stable/11/lib/libc/locale/xlocale_private.h stable/11/lib/libc/mips/SYS.h stable/11/lib/libc/mips/_f