svn commit: r361820 - head/sys/dev/iwn

2020-06-04 Thread Adrian Chadd
Author: adrian
Date: Fri Jun  5 04:24:34 2020
New Revision: 361820
URL: https://svnweb.freebsd.org/changeset/base/361820

Log:
  [iwn] Set default ampdu parameters.
  
  These are from the linux iwlwifi driver ;the default use smaller
  maximum AMPDUs (8k) and a much smaller density (none.)  The latter
  could cause stability issues.
  
  Tested:
  
  * Tested on Intel 6300, STA mode.
  
  Differential Revision: https://reviews.freebsd.org/D25113

Modified:
  head/sys/dev/iwn/if_iwn.c

Modified: head/sys/dev/iwn/if_iwn.c
==
--- head/sys/dev/iwn/if_iwn.c   Fri Jun  5 04:04:47 2020(r361819)
+++ head/sys/dev/iwn/if_iwn.c   Fri Jun  5 04:24:34 2020(r361820)
@@ -1351,6 +1351,8 @@ iwn_vap_create(struct ieee80211com *ic, const char nam
ivp->iv_newstate = vap->iv_newstate;
vap->iv_newstate = iwn_newstate;
sc->ivap[IWN_RXON_BSS_CTX] = vap;
+   vap->iv_ampdu_rxmax = IEEE80211_HTCAP_MAXRXAMPDU_64K;
+   vap->iv_ampdu_density = IEEE80211_HTCAP_MPDUDENSITY_4; /* 4uS */
 
ieee80211_ratectl_init(vap);
/* Complete setup. */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r361819 - head/sys/net80211

2020-06-04 Thread Adrian Chadd
Author: adrian
Date: Fri Jun  5 04:04:47 2020
New Revision: 361819
URL: https://svnweb.freebsd.org/changeset/base/361819

Log:
  [net80211] Add field definition for A-MSDU inside A-MPDU.
  
  Now that I have A-MSDU and A-MPDU coexisting together, we need to actually
  announce if (a) it's permitted and (b) figure out if we should use it
  when transmitting.
  
  This just adds the field; it doesn't yet include it in ADDBA exchanges.

Modified:
  head/sys/net80211/ieee80211.h

Modified: head/sys/net80211/ieee80211.h
==
--- head/sys/net80211/ieee80211.h   Fri Jun  5 02:56:42 2020
(r361818)
+++ head/sys/net80211/ieee80211.h   Fri Jun  5 04:04:47 2020
(r361819)
@@ -430,6 +430,8 @@ struct ieee80211_action_ht_mimopowersave {
 #defineIEEE80211_BAPS_TID_S2
 #defineIEEE80211_BAPS_POLICY   0x0002  /* block ack policy */
 #defineIEEE80211_BAPS_POLICY_S 1
+#defineIEEE80211_BAPS_AMSDU0x0001  /* A-MSDU permitted */
+#defineIEEE80211_BAPS_AMSDU_S  0
 
 #defineIEEE80211_BAPS_POLICY_DELAYED   (0

svn commit: r361818 - stable/12/bin/ls

2020-06-04 Thread Kyle Evans
Author: kevans
Date: Fri Jun  5 02:56:42 2020
New Revision: 361818
URL: https://svnweb.freebsd.org/changeset/base/361818

Log:
  MFC r361318, r361331-r361332
  
  r361318:
  ls: fix a --color regression from r337956
  
  The regression is in-fact that I flipped the default from never to auto. The
  incorrect impression was based on an alias that I failed to notice,
  installed by the Linux distribution that I used for testing compatibility
  here. Users that want the old default should be doing so with a shell alias
  as is done elsewhere, rather than making this decision in ls(1).
  
  Many thanks to rgrimes for pointing out the alias that I clearly overlooked
  that resulted in this; if you despised colors in your terminal from this,
  consider buying him a beer at the next venue that you see him at.
  
  r361331:
  ls(1): actually restore proper behavior
  
  Highlights:
  - CLICOLOR in the environment should imply --color=auto to maintain
compatibility with historical behavior
  - -G should set CLICOLOR and imply --color=auto
  
  The manpage has been updated to draw the connection between -G and --color;
  the former is in-fact a sort of compromise between --color=always and
  --color=auto, where we'll output color regardless of the environment lacking
  CLICOLOR/COLORTERM assuming stdout is a tty.
  
  r361332:
  ls: fix WITHOUT_LS_COLORS build
  
  *sigh* references to colorflags should be gated by COLORLS.
  
  Relnotes: yes

Modified:
  stable/12/bin/ls/ls.1
  stable/12/bin/ls/ls.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/bin/ls/ls.1
==
--- stable/12/bin/ls/ls.1   Fri Jun  5 02:52:07 2020(r361817)
+++ stable/12/bin/ls/ls.1   Fri Jun  5 02:56:42 2020(r361818)
@@ -32,7 +32,7 @@
 .\" @(#)ls.1   8.7 (Berkeley) 7/29/94
 .\" $FreeBSD$
 .\"
-.Dd August 18, 2018
+.Dd May 21, 2020
 .Dt LS 1
 .Os
 .Sh NAME
@@ -135,7 +135,8 @@ This option is equivalent to defining
 .Ev CLICOLOR
 or
 .Ev COLORTERM
-in the environment.
+in the environment and setting
+.Fl -color Ns = Ns Ar auto .
 (See below.)
 This functionality can be compiled out by removing the definition of
 .Ev COLORLS .
@@ -216,8 +217,8 @@ Output colored escape sequences based on
 .Ar when ,
 which may be set to either
 .Cm always ,
-.Cm auto
-(default), or
+.Cm auto ,
+or
 .Cm never .
 .Pp
 .Cm always
@@ -252,6 +253,12 @@ environment variable is set and not empty.
 .Pp
 .Cm never
 will disable color regardless of environment variables.
+.Cm never
+is the default when neither
+.Fl -color
+nor
+.Fl G
+is specified.
 .Pp
 For compatibility with GNU coreutils,
 .Nm

Modified: stable/12/bin/ls/ls.c
==
--- stable/12/bin/ls/ls.c   Fri Jun  5 02:52:07 2020(r361817)
+++ stable/12/bin/ls/ls.c   Fri Jun  5 02:56:42 2020(r361818)
@@ -152,7 +152,7 @@ static int f_timesort;  /* sort by time vice 
name */
int f_type; /* add type character for non-regular files */
 static int f_whiteout; /* show whiteout entries */
 #ifdef COLORLS
-   int colorflag = COLORFLAG_AUTO; /* passed in colorflag */
+   int colorflag = COLORFLAG_NEVER;/* passed in colorflag 
*/
int f_color;/* add type in color for non-regular files */
bool explicitansi;  /* Explicit ANSI sequences, no termcap(5) */
 char *ansi_bgcol;  /* ANSI sequence to set background colour */
@@ -265,6 +265,15 @@ main(int argc, char *argv[])
fts_options = FTS_PHYSICAL;
if (getenv("LS_SAMESORT"))
f_samesort = 1;
+
+   /*
+* For historical compatibility, we'll use our autodetection if CLICOLOR
+* is set.
+*/
+#ifdef COLORLS
+   if (getenv("CLICOLOR"))
+   colorflag = COLORFLAG_AUTO;
+#endif
while ((ch = getopt_long(argc, argv,
"+1ABCD:FGHILPRSTUWXZabcdfghiklmnopqrstuwxy,", long_opts,
NULL)) != -1) {
@@ -342,7 +351,15 @@ main(int argc, char *argv[])
f_slash = 0;
break;
case 'G':
+   /*
+* We both set CLICOLOR here and set colorflag to
+* COLORFLAG_AUTO, because -G should not force color if
+* stdout isn't a tty.
+*/
setenv("CLICOLOR", "", 1);
+#ifdef COLORLS
+   colorflag = COLORFLAG_AUTO;
+#endif
break;
case 'H':
fts_options |= FTS_COMFOLLOW;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r361817 - in stable: 11/stand/lua 12/stand/lua

2020-06-04 Thread Kyle Evans
Author: kevans
Date: Fri Jun  5 02:52:07 2020
New Revision: 361817
URL: https://svnweb.freebsd.org/changeset/base/361817

Log:
  MFC r361709: lualoader: improve drawer error handling
  
  At least one user has landed in a scenario where logo files appear to be
  misnamed, and we failed to find them. Our fallback for missing logodefs is
  orb/orbbw, based on the color status. In a scenario where we can't locate
  the logos, though, this is not ideal. Add in one more layer of fallback
  to properly just don't draw any logo if the fan has been jam packed with
  foreign material.
  
  PR:   246046

Modified:
  stable/12/stand/lua/drawer.lua
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/stand/lua/drawer.lua
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/stand/lua/drawer.lua
==
--- stable/12/stand/lua/drawer.lua  Fri Jun  5 02:21:46 2020
(r361816)
+++ stable/12/stand/lua/drawer.lua  Fri Jun  5 02:52:07 2020
(r361817)
@@ -258,6 +258,11 @@ local function drawlogo()
else
logodef = getLogodef(drawer.default_bw_logodef)
end
+
+   -- Something has gone terribly wrong.
+   if logodef == nil then
+   logodef = getLogodef(drawer.default_fallback_logodef)
+   end
end
 
if logodef ~= nil and logodef.graphic == none then
@@ -355,6 +360,9 @@ shift = default_shift
 drawer.default_brand = 'fbsd'
 drawer.default_color_logodef = 'orb'
 drawer.default_bw_logodef = 'orbbw'
+-- For when things go terribly wrong; this def should be present here in the
+-- drawer module in case it's a filesystem issue.
+drawer.default_fallback_logodef = 'none'
 
 function drawer.addBrand(name, def)
branddefs[name] = def
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r361817 - in stable: 11/stand/lua 12/stand/lua

2020-06-04 Thread Kyle Evans
Author: kevans
Date: Fri Jun  5 02:52:07 2020
New Revision: 361817
URL: https://svnweb.freebsd.org/changeset/base/361817

Log:
  MFC r361709: lualoader: improve drawer error handling
  
  At least one user has landed in a scenario where logo files appear to be
  misnamed, and we failed to find them. Our fallback for missing logodefs is
  orb/orbbw, based on the color status. In a scenario where we can't locate
  the logos, though, this is not ideal. Add in one more layer of fallback
  to properly just don't draw any logo if the fan has been jam packed with
  foreign material.
  
  PR:   246046

Modified:
  stable/11/stand/lua/drawer.lua
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/stand/lua/drawer.lua
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/stand/lua/drawer.lua
==
--- stable/11/stand/lua/drawer.lua  Fri Jun  5 02:21:46 2020
(r361816)
+++ stable/11/stand/lua/drawer.lua  Fri Jun  5 02:52:07 2020
(r361817)
@@ -258,6 +258,11 @@ local function drawlogo()
else
logodef = getLogodef(drawer.default_bw_logodef)
end
+
+   -- Something has gone terribly wrong.
+   if logodef == nil then
+   logodef = getLogodef(drawer.default_fallback_logodef)
+   end
end
 
if logodef ~= nil and logodef.graphic == none then
@@ -355,6 +360,9 @@ shift = default_shift
 drawer.default_brand = 'fbsd'
 drawer.default_color_logodef = 'orb'
 drawer.default_bw_logodef = 'orbbw'
+-- For when things go terribly wrong; this def should be present here in the
+-- drawer module in case it's a filesystem issue.
+drawer.default_fallback_logodef = 'none'
 
 function drawer.addBrand(name, def)
branddefs[name] = def
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r361816 - head/sys/dev/ahci

2020-06-04 Thread Alexander Motin
Author: mav
Date: Fri Jun  5 02:21:46 2020
New Revision: 361816
URL: https://svnweb.freebsd.org/changeset/base/361816

Log:
  Limit AHCI to only one MSI if more is not needed.
  
  My AMD Ryzen system has 4 AHCI controllers, each supporting 16 MSI vectors.
  Since two of the controllers have only one SATA port, limit to single MSI
  saves system 30 interrupt vectors for free.
  
  It may be possible to also limit number of MSI vectors to 4 and 8 for the
  other two controllers, but according to the AHCI specification after that
  controllers may revert to only one vector, that would be a bigger loss to
  risk.
  
  MFC after:2 weeks

Modified:
  head/sys/dev/ahci/ahci_pci.c

Modified: head/sys/dev/ahci/ahci_pci.c
==
--- head/sys/dev/ahci/ahci_pci.cFri Jun  5 01:44:33 2020
(r361815)
+++ head/sys/dev/ahci/ahci_pci.cFri Jun  5 02:21:46 2020
(r361816)
@@ -470,6 +470,7 @@ ahci_pci_attach(device_t dev)
uint8_t revid = pci_get_revid(dev);
int msi_count, msix_count;
uint8_t table_bar = 0, pba_bar = 0;
+   uint32_t caps, pi;
 
msi_count = pci_msi_count(dev);
msix_count = pci_msix_count(dev);
@@ -604,9 +605,12 @@ ahci_pci_attach(device_t dev)
 
/* Setup MSI register parameters */
/* Process hints. */
+   caps = ATA_INL(ctlr->r_mem, AHCI_CAP);
+   pi = ATA_INL(ctlr->r_mem, AHCI_PI);
if (ctlr->quirks & AHCI_Q_NOMSI)
ctlr->msi = 0;
-   else if (ctlr->quirks & AHCI_Q_1MSI)
+   else if ((ctlr->quirks & AHCI_Q_1MSI) ||
+   ((caps & (AHCI_CAP_NPMASK | AHCI_CAP_CCCS)) == 0 && pi == 1))
ctlr->msi = 1;
else
ctlr->msi = 2;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r361814 - in head/sys/ufs: ffs ufs

2020-06-04 Thread Kirk McKusick
Author: mckusick
Date: Fri Jun  5 01:00:55 2020
New Revision: 361814
URL: https://svnweb.freebsd.org/changeset/base/361814

Log:
  Further evaluation of the POSIX spec for fdatasync() shows that it
  requires that new data on growing files be accessible. Thus, the
  the fsyncdata() system call must update the on-disk inode when the
  size of the file has changed.
  
  This commit adds another inode update flag, IN_SIZEMOD, that gets
  set any time that the file size changes. If either the IN_IBLKDATA
  or the IN_SIZEMOD flag is set when fdatasync() is called, the
  associated inode is synchronously written to disk. We could have
  overloaded the IN_IBLKDATA flag to also track size changes since
  the only (current) use case for these flags are for fsyncdata(),
  but it does seem useful for possible future uses to separately
  track the file size changes and the inode block pointer changes.
  
  Reviewed by: kib
  MFC with: -r361785
  Differential revision:  https://reviews.freebsd.org/D25072

Modified:
  head/sys/ufs/ffs/ffs_alloc.c
  head/sys/ufs/ffs/ffs_balloc.c
  head/sys/ufs/ffs/ffs_inode.c
  head/sys/ufs/ffs/ffs_snapshot.c
  head/sys/ufs/ffs/ffs_softdep.c
  head/sys/ufs/ffs/ffs_vnops.c
  head/sys/ufs/ufs/inode.h
  head/sys/ufs/ufs/ufs_lookup.c
  head/sys/ufs/ufs/ufs_vnops.c

Modified: head/sys/ufs/ffs/ffs_alloc.c
==
--- head/sys/ufs/ffs/ffs_alloc.cFri Jun  5 00:16:54 2020
(r361813)
+++ head/sys/ufs/ffs/ffs_alloc.cFri Jun  5 01:00:55 2020
(r361814)
@@ -3306,7 +3306,7 @@ sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS)
break;
ip = VTOI(vp);
DIP_SET(ip, i_size, cmd.size);
-   UFS_INODE_SET_FLAG(ip, IN_CHANGE | IN_MODIFIED);
+   UFS_INODE_SET_FLAG(ip, IN_SIZEMOD | IN_CHANGE | IN_MODIFIED);
error = ffs_update(vp, 1);
vput(vp);
break;

Modified: head/sys/ufs/ffs/ffs_balloc.c
==
--- head/sys/ufs/ffs/ffs_balloc.c   Fri Jun  5 00:16:54 2020
(r361813)
+++ head/sys/ufs/ffs/ffs_balloc.c   Fri Jun  5 01:00:55 2020
(r361814)
@@ -155,7 +155,7 @@ ffs_balloc_ufs1(struct vnode *vp, off_t startoffset, i
dp->di_size = ip->i_size;
dp->di_db[nb] = dbtofsb(fs, bp->b_blkno);
UFS_INODE_SET_FLAG(ip,
-   IN_CHANGE | IN_UPDATE | IN_IBLKDATA);
+   IN_SIZEMOD | IN_CHANGE | IN_UPDATE | IN_IBLKDATA);
if (flags & IO_SYNC)
bwrite(bp);
else if (DOINGASYNC(vp))
@@ -648,7 +648,8 @@ ffs_balloc_ufs2(struct vnode *vp, off_t startoffset, i
dp->di_extsize = smalllblktosize(fs, nb + 1);
dp->di_extb[nb] = dbtofsb(fs, bp->b_blkno);
bp->b_xflags |= BX_ALTDATA;
-   UFS_INODE_SET_FLAG(ip, IN_CHANGE | IN_IBLKDATA);
+   UFS_INODE_SET_FLAG(ip,
+   IN_SIZEMOD | IN_CHANGE | IN_IBLKDATA);
if (flags & IO_SYNC)
bwrite(bp);
else
@@ -751,8 +752,8 @@ ffs_balloc_ufs2(struct vnode *vp, off_t startoffset, i
ip->i_size = smalllblktosize(fs, nb + 1);
dp->di_size = ip->i_size;
dp->di_db[nb] = dbtofsb(fs, bp->b_blkno);
-   UFS_INODE_SET_FLAG(ip, IN_CHANGE | IN_UPDATE |
-   IN_IBLKDATA);
+   UFS_INODE_SET_FLAG(ip,
+   IN_SIZEMOD |IN_CHANGE | IN_UPDATE | IN_IBLKDATA);
if (flags & IO_SYNC)
bwrite(bp);
else

Modified: head/sys/ufs/ffs/ffs_inode.c
==
--- head/sys/ufs/ffs/ffs_inode.cFri Jun  5 00:16:54 2020
(r361813)
+++ head/sys/ufs/ffs/ffs_inode.cFri Jun  5 01:00:55 2020
(r361814)
@@ -279,7 +279,7 @@ ffs_truncate(vp, length, flags, cred)
oldblks[i] = ip->i_din2->di_extb[i];
ip->i_din2->di_extb[i] = 0;
}
-   UFS_INODE_SET_FLAG(ip, IN_CHANGE);
+   UFS_INODE_SET_FLAG(ip, IN_SIZEMOD | IN_CHANGE);
if ((error = ffs_update(vp, waitforupdate)))
return (error);
for (i = 0; i < UFS_NXADDR; i++) {
@@ -303,7 +303,7 @@ ffs_truncate(vp, length, flags, cred)
bzero(SHORTLINK(ip), (u_int)ip->i_size);
ip->i_size = 

svn commit: r361813 - head/sys/net80211

2020-06-04 Thread Adrian Chadd
Author: adrian
Date: Fri Jun  5 00:16:54 2020
New Revision: 361813
URL: https://svnweb.freebsd.org/changeset/base/361813

Log:
  [net80211] Add some more debugging during scanning
  
  I'm trying to chase down more weird "I am not doing an incremental scan
  when being asked" issues so these debugging statements help.
  Notably, I've added more debugging around reasons why the scan is skipped -
  eg because the cache is considered hot.
  
  This should be a no-op unless you care about the debugging output!

Modified:
  head/sys/net80211/ieee80211_scan_sta.c
  head/sys/net80211/ieee80211_scan_sw.c

Modified: head/sys/net80211/ieee80211_scan_sta.c
==
--- head/sys/net80211/ieee80211_scan_sta.c  Fri Jun  5 00:14:02 2020
(r361812)
+++ head/sys/net80211/ieee80211_scan_sta.c  Fri Jun  5 00:16:54 2020
(r361813)
@@ -1276,6 +1276,8 @@ sta_pick_bss(struct ieee80211_scan_state *ss, struct i
 * handle notification that this has completed.
 */
ss->ss_flags &= ~IEEE80211_SCAN_NOPICK;
+   IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN,
+   "%s: nopick; return 1\n", __func__);
return 1;
}
/*
@@ -1285,7 +1287,9 @@ sta_pick_bss(struct ieee80211_scan_state *ss, struct i
/* NB: unlocked read should be ok */
if (TAILQ_FIRST(>st_entry) == NULL) {
IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN,
-   "%s: no scan candidate\n", __func__);
+   "%s: no scan candidate, join=%d, return 0\n",
+   __func__,
+   !! (ss->ss_flags & IEEE80211_SCAN_NOJOIN));
if (ss->ss_flags & IEEE80211_SCAN_NOJOIN)
return 0;
 notfound:
@@ -1310,6 +1314,8 @@ notfound:
chan = demote11b(vap, chan);
if (!ieee80211_sta_join(vap, chan, >base))
goto notfound;
+   IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN,
+   "%s: terminate scan; return 1\n", __func__);
return 1;   /* terminate scan */
 }
 

Modified: head/sys/net80211/ieee80211_scan_sw.c
==
--- head/sys/net80211/ieee80211_scan_sw.c   Fri Jun  5 00:14:02 2020
(r361812)
+++ head/sys/net80211/ieee80211_scan_sw.c   Fri Jun  5 00:16:54 2020
(r361813)
@@ -298,6 +298,11 @@ ieee80211_swscan_check_scan(const struct ieee80211_sca
 * use.  Also discard any frames that might come
 * in while temporarily marked as scanning.
 */
+   IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN,
+   "cache hot; ic_lastscan=%d, scanvalid=%d, 
ticks=%d\n",
+   ic->ic_lastscan,
+   vap->iv_scanvalid,
+   ticks);
SCAN_PRIVATE(ss)->ss_iflags |= ISCAN_DISCARD;
ic->ic_flags |= IEEE80211_F_SCAN;
 
@@ -307,6 +312,8 @@ ieee80211_swscan_check_scan(const struct ieee80211_sca
 
ic->ic_flags &= ~IEEE80211_F_SCAN;
SCAN_PRIVATE(ss)->ss_iflags &= ~ISCAN_DISCARD;
+   IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN,
+   "%s: scan_end returned %d\n", __func__, result);
if (result) {
ieee80211_notify_scan_done(vap);
return 1;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r361812 - head/sys/net80211

2020-06-04 Thread Adrian Chadd
Author: adrian
Date: Fri Jun  5 00:14:02 2020
New Revision: 361812
URL: https://svnweb.freebsd.org/changeset/base/361812

Log:
  [net80211] Print out a bad PN in both hex and decimal.
  
  I've been using this to visually identify when I'm getting corrupted PNs
  from the hardware. :(

Modified:
  head/sys/net80211/ieee80211_freebsd.c

Modified: head/sys/net80211/ieee80211_freebsd.c
==
--- head/sys/net80211/ieee80211_freebsd.c   Fri Jun  5 00:11:44 2020
(r361811)
+++ head/sys/net80211/ieee80211_freebsd.c   Fri Jun  5 00:14:02 2020
(r361812)
@@ -789,8 +789,11 @@ ieee80211_notify_replay_failure(struct ieee80211vap *v
struct ifnet *ifp = vap->iv_ifp;
 
IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_CRYPTO, wh->i_addr2,
-   "%s replay detected tid %d ",
-   k->wk_cipher->ic_name, tid, (intmax_t) rsc,
+   "%s replay detected tid %d ",
+   k->wk_cipher->ic_name, tid,
+   (intmax_t) rsc,
+   (intmax_t) rsc,
+   (intmax_t) k->wk_keyrsc[tid],
(intmax_t) k->wk_keyrsc[tid],
k->wk_keyix, k->wk_rxkeyix);
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r361811 - head/sys/net80211

2020-06-04 Thread Adrian Chadd
Author: adrian
Date: Fri Jun  5 00:11:44 2020
New Revision: 361811
URL: https://svnweb.freebsd.org/changeset/base/361811

Log:
  [net80211] Send a probe request after IBSS node discovery
  
  This sends a probe request after IBSS node discovery through
  beacon frames. This allows things like HT and VHT capabilities
  to be "negotiated" in adhoc mode.
  
  It is .. kinda fire and pray - this isn't retried after discovery
  so it's quite possible that nodes occasionally don't come up with
  HT/VHT rate upgrades. At some point it may be a fun side project
  to add support for retrying these probe requests/negotiations
  after IBSS node discovery.
  
  Tested:
  
  * tested with multiple ath(4) NICs in 11n mode.
  
  Differential Revision:https://reviews.freebsd.org/D24979

Modified:
  head/sys/net80211/ieee80211_adhoc.c

Modified: head/sys/net80211/ieee80211_adhoc.c
==
--- head/sys/net80211/ieee80211_adhoc.c Thu Jun  4 22:58:37 2020
(r361810)
+++ head/sys/net80211/ieee80211_adhoc.c Fri Jun  5 00:11:44 2020
(r361811)
@@ -715,6 +715,15 @@ adhoc_recv_mgmt(struct ieee80211_node *ni, struct mbuf
wh = mtod(m0, struct ieee80211_frame *);
frm = (uint8_t *)[1];
efrm = mtod(m0, uint8_t *) + m0->m_len;
+
+   IEEE80211_DPRINTF(vap, IEEE80211_MSG_INPUT | IEEE80211_MSG_DEBUG,
+   "%s: recv mgmt frame, addr2=%6D, ni=%p (%6D) fc=%.02x %.02x\n",
+   __func__,
+   wh->i_addr2, ":",
+   ni,
+   ni->ni_macaddr, ":",
+   wh->i_fc[0],
+   wh->i_fc[1]);
switch (subtype) {
case IEEE80211_FC0_SUBTYPE_PROBE_RESP:
case IEEE80211_FC0_SUBTYPE_BEACON: {
@@ -788,6 +797,20 @@ adhoc_recv_mgmt(struct ieee80211_node *ni, struct mbuf
} else
ni = NULL;
 
+   /*
+* Send a probe request so we announce 11n
+* capabilities.
+*
+* Don't do this if we're scanning.
+*/
+   if (! (ic->ic_flags & IEEE80211_F_SCAN))
+   ieee80211_send_probereq(ni, /* node */
+   vap->iv_myaddr, /* SA */
+   ni->ni_macaddr, /* DA */
+   vap->iv_bss->ni_bssid, /* BSSID 
*/
+   vap->iv_bss->ni_essid,
+   vap->iv_bss->ni_esslen); /* 
SSID */
+
} else if (ni->ni_capinfo == 0) {
/*
 * Update faked node created on transmit.
@@ -936,11 +959,11 @@ adhoc_recv_mgmt(struct ieee80211_node *ni, struct mbuf
vap->iv_stats.is_rx_mgtdiscard++;
} else if (!IEEE80211_ADDR_EQ(vap->iv_myaddr, wh->i_addr1) &&
!IEEE80211_IS_MULTICAST(wh->i_addr1)) {
-   IEEE80211_DISCARD(vap, IEEE80211_MSG_INPUT,
+   IEEE80211_DISCARD(vap, IEEE80211_MSG_INPUT | 
IEEE80211_MSG_DEBUG,
wh, NULL, "%s", "not for us");
vap->iv_stats.is_rx_mgtdiscard++;
} else if (vap->iv_state != IEEE80211_S_RUN) {
-   IEEE80211_DISCARD(vap, IEEE80211_MSG_INPUT,
+   IEEE80211_DISCARD(vap, IEEE80211_MSG_INPUT | 
IEEE80211_MSG_DEBUG,
wh, NULL, "wrong state %s",
ieee80211_state_name[vap->iv_state]);
vap->iv_stats.is_rx_mgtdiscard++;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r361810 - in head: lib/libipsec sbin/setkey sys/net usr.bin/netstat

2020-06-04 Thread John Baldwin
Author: jhb
Date: Thu Jun  4 22:58:37 2020
New Revision: 361810
URL: https://svnweb.freebsd.org/changeset/base/361810

Log:
  Refer to AES-CBC as "aes-cbc" rather than "rijndael-cbc" for IPsec.
  
  At this point, AES is the more common name for Rijndael128.  setkey(8)
  will still accept the old name, and old constants remain for
  compatiblity.
  
  Reviewed by:  cem, bcr (manpages)
  MFC after:2 weeks
  Sponsored by: Chelsio Communications
  Differential Revision:https://reviews.freebsd.org/D24964

Modified:
  head/lib/libipsec/pfkey_dump.c
  head/sbin/setkey/setkey.8
  head/sbin/setkey/token.l
  head/sys/net/pfkeyv2.h
  head/usr.bin/netstat/ipsec.c

Modified: head/lib/libipsec/pfkey_dump.c
==
--- head/lib/libipsec/pfkey_dump.c  Thu Jun  4 22:16:19 2020
(r361809)
+++ head/lib/libipsec/pfkey_dump.c  Thu Jun  4 22:58:37 2020
(r361810)
@@ -159,8 +159,8 @@ static struct val2str str_alg_enc[] = {
 #ifdef SADB_X_EALG_RC5CBC
{ SADB_X_EALG_RC5CBC, "rc5-cbc", },
 #endif
-#ifdef SADB_X_EALG_RIJNDAELCBC
-   { SADB_X_EALG_RIJNDAELCBC, "rijndael-cbc", },
+#ifdef SADB_X_EALG_AESCBC
+   { SADB_X_EALG_AESCBC, "aes-cbc", },
 #endif
 #ifdef SADB_X_EALG_TWOFISHCBC
{ SADB_X_EALG_TWOFISHCBC, "twofish-cbc", },

Modified: head/sbin/setkey/setkey.8
==
--- head/sbin/setkey/setkey.8   Thu Jun  4 22:16:19 2020(r361809)
+++ head/sbin/setkey/setkey.8   Thu Jun  4 22:58:37 2020(r361810)
@@ -29,7 +29,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd May 04, 2020
+.Dd June 4, 2020
 .Dt SETKEY 8
 .Os
 .\"
@@ -612,7 +612,7 @@ parameter:
 .Bd -literal -offset indent
 algorithm  keylen (bits)   comment
 null   0 to 2048   rfc2410
-rijndael-cbc   128/192/256 rfc3602
+aes-cbc128/192/256 rfc3602
 aes-ctr160/224/288 rfc3686
 aes-gcm-16 160/224/288 rfc4106
 .Ed

Modified: head/sbin/setkey/token.l
==
--- head/sbin/setkey/token.lThu Jun  4 22:16:19 2020(r361809)
+++ head/sbin/setkey/token.lThu Jun  4 22:58:37 2020(r361810)
@@ -159,7 +159,8 @@ tcp { yylval.num = 0; return(PR_TCP); }
 {hyphen}E  { BEGIN S_ENCALG; return(F_ENC); }
 null { yylval.num = SADB_EALG_NULL; BEGIN INITIAL; 
return(ALG_ENC); }
 simple   { yylval.num = SADB_EALG_NULL; BEGIN INITIAL; 
return(ALG_ENC_OLD); }
-rijndael-cbc { yylval.num = SADB_X_EALG_RIJNDAELCBC; BEGIN INITIAL; 
return(ALG_ENC); }
+rijndael-cbc { yylval.num = SADB_X_EALG_AESCBC; BEGIN INITIAL; 
return(ALG_ENC); }
+aes-cbc  { yylval.num = SADB_X_EALG_AESCBC; BEGIN INITIAL; 
return(ALG_ENC); }
 aes-ctr  { yylval.num = SADB_X_EALG_AESCTR; BEGIN INITIAL; 
return(ALG_ENC_SALT); }
 aes-gcm-16   { yylval.num = SADB_X_EALG_AESGCM16; BEGIN INITIAL; 
return(ALG_ENC_SALT); }
 

Modified: head/sys/net/pfkeyv2.h
==
--- head/sys/net/pfkeyv2.h  Thu Jun  4 22:16:19 2020(r361809)
+++ head/sys/net/pfkeyv2.h  Thu Jun  4 22:58:37 2020(r361810)
@@ -383,6 +383,7 @@ _Static_assert(sizeof(struct sadb_x_sa_replay) == 8, "
 #define SADB_EALG_NULL 11
 #define SADB_X_EALG_RIJNDAELCBC12
 #define SADB_X_EALG_AES12
+#defineSADB_X_EALG_AESCBC  12
 #define SADB_X_EALG_AESCTR 13
 #define SADB_X_EALG_AESGCM818  /* RFC4106 */
 #define SADB_X_EALG_AESGCM12   19

Modified: head/usr.bin/netstat/ipsec.c
==
--- head/usr.bin/netstat/ipsec.cThu Jun  4 22:16:19 2020
(r361809)
+++ head/usr.bin/netstat/ipsec.cThu Jun  4 22:58:37 2020
(r361810)
@@ -139,7 +139,7 @@ static struct val2str ipsec_ahnames[] = {
 static struct val2str ipsec_espnames[] = {
{ SADB_EALG_NONE, "none", },
{ SADB_EALG_NULL, "null", },
-   { SADB_X_EALG_RIJNDAELCBC, "rijndael-cbc", },
+   { SADB_X_EALG_AESCBC, "aes-cbc", },
{ SADB_X_EALG_AESCTR, "aes-ctr", },
{ SADB_X_EALG_AESGCM16, "aes-gcm-16", },
{ SADB_X_EALG_AESGMAC, "aes-gmac", },
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r361809 - head/share/man/man7

2020-06-04 Thread John Baldwin
Author: jhb
Date: Thu Jun  4 22:16:19 2020
New Revision: 361809
URL: https://svnweb.freebsd.org/changeset/base/361809

Log:
  Update crypto(7) to list current ciphers.
  
  Add descriptions of AES-CCM, Camellia-CBC, and Chacha20.
  
  Reviewed by:  cem (previous version)
  Sponsored by: Chelsio Communications
  Differential Revision:https://reviews.freebsd.org/D24963

Modified:
  head/share/man/man7/crypto.7

Modified: head/share/man/man7/crypto.7
==
--- head/share/man/man7/crypto.7Thu Jun  4 21:02:24 2020
(r361808)
+++ head/share/man/man7/crypto.7Thu Jun  4 22:16:19 2020
(r361809)
@@ -27,7 +27,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd May 22, 2020
+.Dd June 04, 2020
 .Dt CRYPTO 7
 .Os
 .Sh NAME
@@ -43,7 +43,7 @@ The following cryptographic algorithms that are part o
 framework have the following requirements.
 .Pp
 Cipher algorithms:
-.Bl -tag -width ".Dv CRYPTO_AES_CBC"
+.Bl -tag -width "CRYPTO_AES_NIST_GCM_16"
 .It Dv CRYPTO_AES_CBC
 .Bl -tag -width "Block size :" -compact -offset indent
 .It IV size :
@@ -54,7 +54,33 @@ Cipher algorithms:
 16, 24 or 32
 .El
 .Pp
-This algorithm implements Cipher-block chaining.
+This algorithm implements Cipher Block Chaining.
+.It Dv CRYPTO_AES_CCM_16
+.Bl -tag -width "Block size :" -compact -offset indent
+.It IV size :
+12
+.It Block size :
+16
+.It Key size :
+16, 24 or 32
+.It Digest size :
+16
+.El
+.Pp
+This algorithm implements Counter with CBC-MAC Mode.
+This cipher uses AEAD
+.Pq Authenticated Encryption with Associated Data
+mode.
+.Pp
+The authentication tag will be read from or written to the offset
+.Va crp_digest_start
+specified in the request.
+.Pp
+Note: The nonce for each request must be provided in
+.Fa crp_iv
+via the
+.Dv CRYPTO_F_IV_SEPARATE
+flag.
 .It Dv CRYPTO_AES_NIST_GCM_16
 .Bl -tag -width "Block size :" -compact -offset indent
 .It IV size :
@@ -72,11 +98,15 @@ This cipher uses AEAD
 .Pq Authenticated Encryption with Associated Data
 mode.
 .Pp
-The authentication tag will be read/written from/to the offset
+The authentication tag will be read from or written to the offset
 .Va crp_digest_start
 specified in the request.
 .Pp
-Note: You must provide an IV on every call.
+Note: The nonce for each request must be provided in
+.Fa crp_iv
+via the
+.Dv CRYPTO_F_IV_SEPARATE
+flag.
 .It Dv CRYPTO_AES_ICM
 .Bl -tag -width "Block size :" -compact -offset indent
 .It IV size :
@@ -95,7 +125,11 @@ This does mean that if a counter is required that roll
 the transaction need to be split into two parts where the counter rolls over.
 The counter incremented as a 128-bit big endian number.
 .Pp
-Note: You must provide an IV on every call.
+Note: The counter for each request must be provided in
+.Fa crp_iv
+via the
+.Dv CRYPTO_F_IV_SEPARATE
+flag.
 .It Dv CRYPTO_AES_XTS
 .Bl -tag -width "Block size :" -compact -offset indent
 .It IV size :
@@ -111,6 +145,26 @@ as defined in NIST SP 800-38E.
 .Pp
 NOTE: The ciphertext stealing part is not implemented which is why this cipher
 is listed as having a block size of 16 instead of 1.
+.It Dv CRYPTO_CAMELLIA_CBC
+.Bl -tag -width "Block size :" -compact -offset indent
+.It IV size :
+16
+.It Block size :
+16
+.It Key size :
+16, 24 or 32
+.El
+.Pp
+This algorithm implements Cipher Block Chaining.
+.It Dv CRYPTO_CHACHA20
+.Bl -tag -width "Block size :" -compact -offset indent
+.It IV size :
+16
+.It Block size :
+1
+.It Key size :
+16 or 32
+.El
 .El
 .Sh HISTORY
 The
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r361790 - head/sbin/ifconfig

2020-06-04 Thread Shawn Webb
On Thu, Jun 04, 2020 at 02:44:45PM +, Eugene Grosbein wrote:
> Author: eugen
> Date: Thu Jun  4 14:44:44 2020
> New Revision: 361790
> URL: https://svnweb.freebsd.org/changeset/base/361790
> 
> Log:
>   ifconfig(8): make it possible to filter output by interface group.
>   
>   Now options -g/-G allow to select/unselect interfaces by groups
>   in the "ifconfig -a" output just like already existing -d/-u.
>   
>   Examples:
>   
>   to exclude loopback from the list: ifconfig -a -G lo
>   to show vlan interfaces only: ifconfig -a -g vlan
>   to show tap interfaces that are up: ifconfig -aug tap
>   
>   Arguments to -g/-G may be shell patterns and both may be specified.
>   Later options -g/-G override previous ones.
>   
>   MFC after:  2 weeks
>   Relnotes:   yes
>   Differential Revision:  https://reviews.freebsd.org/D25029
> 
> Modified:
>   head/sbin/ifconfig/ifconfig.8
>   head/sbin/ifconfig/ifconfig.c
> 
> Modified: head/sbin/ifconfig/ifconfig.8
> ==
> --- head/sbin/ifconfig/ifconfig.8 Thu Jun  4 14:15:39 2020
> (r361789)
> +++ head/sbin/ifconfig/ifconfig.8 Thu Jun  4 14:44:44 2020
> (r361790)

Hey Eugene,

Does the manpage need a date bump?

Thanks,

-- 
Shawn Webb
Cofounder / Security Engineer
HardenedBSD

GPG Key ID:  0xFF2E67A277F8E1FA
GPG Key Fingerprint: D206 BB45 15E0 9C49 0CF9  3633 C85B 0AF8 AB23 0FB2
https://git-01.md.hardenedbsd.org/HardenedBSD/pubkeys/src/branch/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc


signature.asc
Description: PGP signature


svn commit: r361808 - stable/12/sys/netinet/cc

2020-06-04 Thread Richard Scheffenegger
Author: rscheff
Date: Thu Jun  4 21:02:24 2020
New Revision: 361808
URL: https://svnweb.freebsd.org/changeset/base/361808

Log:
  MFC rS361348: DCTCP: update alpha only once after loss recovery.
  
  In mixed ECN marking and loss scenarios it was found, that
  the alpha value of DCTCP is updated two times. The second
  update happens with freshly initialized counters indicating
  to ECN loss. Overall this leads to alpha not adjusting as
  quickly as expected to ECN markings, and therefore lead to
  excessive loss.
  
  Reported by:  Cheng Cui
  Reviewed by:  chengc_netapp.com, rrs, tuexen (mentor)
  Approved by:  tuexen (mentor), rgrimes (mentor, blanket)
  Sponsored by: NetApp, Inc.
  Differential Revision:https://reviews.freebsd.org/D24817

Modified:
  stable/12/sys/netinet/cc/cc_dctcp.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/netinet/cc/cc_dctcp.c
==
--- stable/12/sys/netinet/cc/cc_dctcp.c Thu Jun  4 20:48:57 2020
(r361807)
+++ stable/12/sys/netinet/cc/cc_dctcp.c Thu Jun  4 21:02:24 2020
(r361808)
@@ -154,10 +154,8 @@ dctcp_ack_received(struct cc_var *ccv, uint16_t type)
 * Update the fraction of marked bytes at the end of
 * current window size.
 */
-   if ((IN_FASTRECOVERY(CCV(ccv, t_flags)) &&
-   SEQ_GEQ(ccv->curack, CCV(ccv, snd_recover))) ||
-   (!IN_FASTRECOVERY(CCV(ccv, t_flags)) &&
-   SEQ_GT(ccv->curack, dctcp_data->save_sndnxt)))
+   if (!IN_FASTRECOVERY(CCV(ccv, t_flags)) &&
+   SEQ_GT(ccv->curack, dctcp_data->save_sndnxt))
dctcp_update_alpha(ccv);
} else
newreno_cc_algo.ack_received(ccv, type);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r361807 - head/sys/contrib/edk2

2020-06-04 Thread Mitchell Horne
Author: mhorne
Date: Thu Jun  4 20:48:57 2020
New Revision: 361807
URL: https://svnweb.freebsd.org/changeset/base/361807

Log:
  Document upgrade procedure in FREEBSD-upgrade
  
  It was pointed out to me that this is the convention for documenting upgrade
  instructions, rather than just leaving the instructions in the commit message.
  It's possible these commands won't be used again before we transition to git,
  but then at least they'll give a path forward for whoever touches this next.
  
  Suggested by: lwhsu

Added:
  head/sys/contrib/edk2/FREEBSD-upgrade   (contents, props changed)

Added: head/sys/contrib/edk2/FREEBSD-upgrade
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/contrib/edk2/FREEBSD-upgrade   Thu Jun  4 20:48:57 2020
(r361807)
@@ -0,0 +1,23 @@
+$FreeBSD$
+
+We try to maintain the minimal set of headers required to build, as the full
+set of files from MdePkg is quite large (10MB at the time of writing). To do
+this when performing an upgrade, execute the following:
+
+# Generate list of the headers needed to build
+cp -r ../vendor/edk2/dist/MdePkg/Include sys/contrib/edk2
+cd lib/libefivar
+make
+pushd `make -V .OBJDIR`
+cat .depend*.o | grep sys/contrib | cut -d' ' -f 3 |
+sort -u | sed -e 's=/full/path/sys/contrib/edk2/==' > /tmp/xxx
+popd
+
+# Merge the needed files
+cd ../../sys/contrib/edk2
+svn revert -R .
+for i in `cat /tmp/xxx`; do
+svn merge -c VendorRevision 
svn+ssh://repo.freebsd.org/base/vendor/edk2/dist/MdePkg/$i $i
+done
+svn merge -c VendorRevision \
+svn+ssh://repo.freebsd.org/base/vendor/edk2/dist/MdePkg/MdePkg.dec 
MdePkg.dec
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r361806 - head/bin/dd

2020-06-04 Thread Richard Scheffenegger
Author: rscheff
Date: Thu Jun  4 20:47:11 2020
New Revision: 361806
URL: https://svnweb.freebsd.org/changeset/base/361806

Log:
  Add O_DIRECT flag to DD for cache bypass
  
  FreeBSD DD utility has not had support for the O_DIRECT flag, which
  is useful to bypass local caching, e.g. for unconditionally issuing
  NFS IO requests during testing.
  
  Reviewed by:  rgrimes (mentor)
  Approved by:  rgrimes (mentor, blanket)
  MFC after:3 weeks
  Sponsored by: NetApp, Inc.
  Differential Revision:https://reviews.freebsd.org/D25066

Modified:
  head/bin/dd/args.c
  head/bin/dd/dd.1
  head/bin/dd/dd.c
  head/bin/dd/dd.h

Modified: head/bin/dd/args.c
==
--- head/bin/dd/args.c  Thu Jun  4 20:39:28 2020(r361805)
+++ head/bin/dd/args.c  Thu Jun  4 20:47:11 2020(r361806)
@@ -266,6 +266,7 @@ static const struct iflag {
const char *name;
uint64_t set, noset;
 } ilist[] = {
+   { "direct", C_IDIRECT,  0 },
{ "fullblock",  C_IFULLBLOCK,   C_SYNC },
 };
 
@@ -410,6 +411,7 @@ static const struct oflag {
const char *name;
uint64_t set;
 } olist[] = {
+   { "direct", C_ODIRECT },
{ "fsync",  C_OFSYNC },
{ "sync",   C_OFSYNC },
 };

Modified: head/bin/dd/dd.1
==
--- head/bin/dd/dd.1Thu Jun  4 20:39:28 2020(r361805)
+++ head/bin/dd/dd.1Thu Jun  4 20:47:11 2020(r361806)
@@ -32,7 +32,7 @@
 .\" @(#)dd.1   8.2 (Berkeley) 1/13/94
 .\" $FreeBSD$
 .\"
-.Dd March 26, 2019
+.Dd June 4, 2020
 .Dt DD 1
 .Os
 .Sh NAME
@@ -117,6 +117,8 @@ limits the number of times
 is called on the input rather than the number of blocks copied in full.
 May not be combined with
 .Cm conv=sync .
+.It Cm direct
+Set the O_DIRECT flag on the input file to make reads bypass any local caching.
 .El
 .It Cm iseek Ns = Ns Ar n
 Seek on the input file
@@ -143,7 +145,7 @@ the output file is truncated at that point.
 Where
 .Cm value
 is one of the symbols from the following list.
-.Bl -tag -width "fsync"
+.Bl -tag -width "direct"
 .It Cm fsync
 Set the O_FSYNC flag on the output file to make writes synchronous.
 .It Cm sync
@@ -151,6 +153,8 @@ Set the O_SYNC flag on the output file to make writes 
 This is synonymous with the
 .Cm fsync
 value.
+.It Cm direct
+Set the O_DIRECT flag on the output file to make writes bypass any local 
caching.
 .El
 .It Cm oseek Ns = Ns Ar n
 Seek on the output file

Modified: head/bin/dd/dd.c
==
--- head/bin/dd/dd.cThu Jun  4 20:39:28 2020(r361805)
+++ head/bin/dd/dd.cThu Jun  4 20:47:11 2020(r361806)
@@ -143,7 +143,7 @@ static void
 setup(void)
 {
u_int cnt;
-   int oflags;
+   int iflags, oflags;
cap_rights_t rights;
unsigned long cmds[] = { FIODTYPE, MTIOCTOP };
 
@@ -151,7 +151,10 @@ setup(void)
in.name = "stdin";
in.fd = STDIN_FILENO;
} else {
-   in.fd = open(in.name, O_RDONLY, 0);
+   iflags = 0;
+   if (ddflags & C_IDIRECT)
+   iflags |= O_DIRECT;
+   in.fd = open(in.name, O_RDONLY | iflags, 0);
if (in.fd == -1)
err(1, "%s", in.name);
}
@@ -186,6 +189,8 @@ setup(void)
oflags |= O_TRUNC;
if (ddflags & C_OFSYNC)
oflags |= O_FSYNC;
+   if (ddflags & C_ODIRECT)
+   oflags |= O_DIRECT;
out.fd = open(out.name, O_RDWR | oflags, DEFFILEMODE);
/*
 * May not have read access, so try again with write only.

Modified: head/bin/dd/dd.h
==
--- head/bin/dd/dd.hThu Jun  4 20:39:28 2020(r361805)
+++ head/bin/dd/dd.hThu Jun  4 20:47:11 2020(r361806)
@@ -105,6 +105,8 @@ typedef struct {
 #defineC_FDATASYNC 0x0001ULL
 #defineC_OFSYNC0x0002ULL
 #defineC_IFULLBLOCK0x0004ULL
+#defineC_IDIRECT   0x0008ULL
+#defineC_ODIRECT   0x0010ULL
 
 #defineC_PARITY(C_PAREVEN | C_PARODD | C_PARNONE | C_PARSET)
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r361805 - head/sys/dev/e1000

2020-06-04 Thread Eric Joyner
Author: erj
Date: Thu Jun  4 20:39:28 2020
New Revision: 361805
URL: https://svnweb.freebsd.org/changeset/base/361805

Log:
  em(4): Add support for Comet Lake Mobile Platform, update shared code
  
  This change introduces Comet Lake Mobile Platform support in the e1000
  driver along with shared code patches described below.
  
  - Cast return value of e1000_ltr2ns() to higher type to avoid overflow
  - Remove useless statement of assigning act_offset
  - Add initialization of identification LED
  - Fix flow control setup after connected standby:
After connected standby the driver blocks resets during
"AdapterStart" and skips flow control setup. This change adds
condition in e1000_setup_link_ich8lan() to always setup flow control
and to setup physical interface only when there is no need to block
resets.
  
  Signed-off-by: Piotr Pietruszewski 
  
  Submitted by: Piotr Pietruszewski 
  Reviewed by:  erj@
  Tested by:Jeffrey Pieper 
  MFC after:1 week
  Relnotes: yes
  Sponsored by: Intel Corporation
  Differential Revision:https://reviews.freebsd.org/D25035

Modified:
  head/sys/dev/e1000/e1000_api.c
  head/sys/dev/e1000/e1000_hw.h
  head/sys/dev/e1000/e1000_i210.c
  head/sys/dev/e1000/e1000_ich8lan.c
  head/sys/dev/e1000/if_em.c

Modified: head/sys/dev/e1000/e1000_api.c
==
--- head/sys/dev/e1000/e1000_api.c  Thu Jun  4 20:12:34 2020
(r361804)
+++ head/sys/dev/e1000/e1000_api.c  Thu Jun  4 20:39:28 2020
(r361805)
@@ -309,6 +309,8 @@ s32 e1000_set_mac_type(struct e1000_hw *hw)
case E1000_DEV_ID_PCH_SPT_I219_V4:
case E1000_DEV_ID_PCH_SPT_I219_LM5:
case E1000_DEV_ID_PCH_SPT_I219_V5:
+   case E1000_DEV_ID_PCH_CMP_I219_LM12:
+   case E1000_DEV_ID_PCH_CMP_I219_V12:
mac->type = e1000_pch_spt;
break;
case E1000_DEV_ID_PCH_CNP_I219_LM6:
@@ -319,7 +321,10 @@ s32 e1000_set_mac_type(struct e1000_hw *hw)
case E1000_DEV_ID_PCH_ICP_I219_V8:
case E1000_DEV_ID_PCH_ICP_I219_LM9:
case E1000_DEV_ID_PCH_ICP_I219_V9:
-   case E1000_DEV_ID_PCH_ICP_I219_V10:
+   case E1000_DEV_ID_PCH_CMP_I219_LM10:
+   case E1000_DEV_ID_PCH_CMP_I219_V10:
+   case E1000_DEV_ID_PCH_CMP_I219_LM11:
+   case E1000_DEV_ID_PCH_CMP_I219_V11:
mac->type = e1000_pch_cnp;
break;
case E1000_DEV_ID_82575EB_COPPER:

Modified: head/sys/dev/e1000/e1000_hw.h
==
--- head/sys/dev/e1000/e1000_hw.h   Thu Jun  4 20:12:34 2020
(r361804)
+++ head/sys/dev/e1000/e1000_hw.h   Thu Jun  4 20:39:28 2020
(r361805)
@@ -155,7 +155,12 @@ struct e1000_hw;
 #define E1000_DEV_ID_PCH_ICP_I219_V8   0x15E0
 #define E1000_DEV_ID_PCH_ICP_I219_LM9  0x15E1
 #define E1000_DEV_ID_PCH_ICP_I219_V9   0x15E2
-#define E1000_DEV_ID_PCH_ICP_I219_V10  0x0D4F
+#define E1000_DEV_ID_PCH_CMP_I219_LM10 0x0D4E
+#define E1000_DEV_ID_PCH_CMP_I219_V10  0x0D4F
+#define E1000_DEV_ID_PCH_CMP_I219_LM11 0x0D4C
+#define E1000_DEV_ID_PCH_CMP_I219_V11  0x0D4D
+#define E1000_DEV_ID_PCH_CMP_I219_LM12 0x0D53
+#define E1000_DEV_ID_PCH_CMP_I219_V12  0x0D55
 #define E1000_DEV_ID_82576 0x10C9
 #define E1000_DEV_ID_82576_FIBER   0x10E6
 #define E1000_DEV_ID_82576_SERDES  0x10E7

Modified: head/sys/dev/e1000/e1000_i210.c
==
--- head/sys/dev/e1000/e1000_i210.c Thu Jun  4 20:12:34 2020
(r361804)
+++ head/sys/dev/e1000/e1000_i210.c Thu Jun  4 20:39:28 2020
(r361805)
@@ -774,6 +774,7 @@ static s32 e1000_get_cfg_done_i210(struct e1000_hw *hw
  **/
 s32 e1000_init_hw_i210(struct e1000_hw *hw)
 {
+   struct e1000_mac_info *mac = >mac;
s32 ret_val;
 
DEBUGFUNC("e1000_init_hw_i210");
@@ -784,6 +785,10 @@ s32 e1000_init_hw_i210(struct e1000_hw *hw)
return ret_val;
}
hw->phy.ops.get_cfg_done = e1000_get_cfg_done_i210;
+
+   /* Initialize identification LED */
+   mac->ops.id_led_init(hw);
+
ret_val = e1000_init_hw_82575(hw);
return ret_val;
 }

Modified: head/sys/dev/e1000/e1000_ich8lan.c
==
--- head/sys/dev/e1000/e1000_ich8lan.c  Thu Jun  4 20:12:34 2020
(r361804)
+++ head/sys/dev/e1000/e1000_ich8lan.c  Thu Jun  4 20:39:28 2020
(r361805)
@@ -1091,7 +1091,7 @@ static u64 e1000_ltr2ns(u16 ltr)
value = ltr & E1000_LTRV_VALUE_MASK;
scale = (ltr & E1000_LTRV_SCALE_MASK) >> E1000_LTRV_SCALE_SHIFT;
 
-   return value * (1 << (scale * E1000_LTRV_SCALE_FACTOR));
+   return value * (1ULL << (scale * E1000_LTRV_SCALE_FACTOR));
 }
 
 /**
@@ 

Re: svn commit: r361801 - head/sys/ufs/ffs

2020-06-04 Thread Stefan Eßer
Am 04.06.20 um 21:48 schrieb Kyle Evans:
> On Thu, Jun 4, 2020 at 1:35 PM Kirk McKusick  wrote:
[...]
>> Modified: head/sys/ufs/ffs/ffs_balloc.c
>> ==
>> --- head/sys/ufs/ffs/ffs_balloc.c   Thu Jun  4 18:19:16 2020
>> (r361800)
>> +++ head/sys/ufs/ffs/ffs_balloc.c   Thu Jun  4 18:35:21 2020
>> (r361801)
>> @@ -154,7 +154,8 @@ ffs_balloc_ufs1(struct vnode *vp, off_t startoffset, i
>> ip->i_size = smalllblktosize(fs, nb + 1);
>> dp->di_size = ip->i_size;
>> dp->di_db[nb] = dbtofsb(fs, bp->b_blkno);
>> -   UFS_INODE_SET_FLAG(ip, IN_CHANGE | IN_UPDATE);
>> +   UFS_INODE_SET_FLAG(ip,
>> +   IN_CHANGE | IN_UPDATE | IN_IBLKDATA);
>> if (flags & IO_SYNC)
>> bwrite(bp);
>> else if (DOINGASYNC(vp))
>> @@ -647,7 +648,7 @@ ffs_balloc_ufs2(struct vnode *vp, off_t startoffset, i
>> dp->di_extsize = smalllblktosize(fs, nb + 1);
>> dp->di_extb[nb] = dbtofsb(fs, bp->b_blkno);
>> bp->b_xflags |= BX_ALTDATA;
>> -   UFS_INODE_SET_FLAG(ip, IN_CHANGE);
>> +   UFS_INODE_SET_FLAG(ip, IN_CHANGE | 
>> IN_BLKDATA);
>> if (flags & IO_SYNC)
>> bwrite(bp);
>> else
> 
> Hello!
> 
> This second one seems to have been accidentally misspelled as "IN_BLKDATA"

I had noticed this independently since my kernel builds failed and took
liberty to commit a fix of this obvious typo.

Regards, STefan
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r361796 - head/sys/dts/arm64/overlays

2020-06-04 Thread Oleksandr Tymoshenko
Oleksandr Tymoshenko (go...@freebsd.org) wrote:
> Author: gonzo
> Date: Thu Jun  4 17:20:58 2020
> New Revision: 361796
> URL: https://svnweb.freebsd.org/changeset/base/361796
> 
> Log:
>   Remove licenses
>   
>   I haven't requested explicit permission from authors and shouldn't have
>   added BSDL headers without it.
>   
>   Requestes by:   imp

Some comments on this commit.

Adding license texts was a knee-jerk reaction to the request
to get over with a minor change. Not asking actual
contributors for permissions was the wrong thing to do, so I
reverted it.

I agree with Warner's view that dts files are not subject to
copyright because they're statements of facts. I also
checked other files in sys/dts/{arm,arm64}/overlays/ - none
of them has a license header, so my original commit was
consistent with the standards of that particular part of the
codebase and didn't introduce any legal exposure
(hypothetical or not) FreeBSD didn't have at the time of the
commit. Summing up everything above: I think r361796
brings files to the form they should be in.

If the eventual consensus in the Project is that dtso files
require licenses and copyright statements there need to be a
wider effort organized to get permissions from the respective
contributors. 

-- 
gonzo
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r361804 - head/sys/opencrypto

2020-06-04 Thread John Baldwin
Author: jhb
Date: Thu Jun  4 20:12:34 2020
New Revision: 361804
URL: https://svnweb.freebsd.org/changeset/base/361804

Log:
  Use separate output buffers for OCF requests in KTLS.
  
  KTLS encryption requests for file-backed data such as from sendfile(2)
  require the encrypted data to be stored in a separate buffer from the
  unencrypted file input data.  Previously the OCF backend for KTLS
  manually copied the data from the input buffer to the output buffer
  before queueing the crypto request.  Now the OCF backend will use a
  separate output buffer for such requests and avoid the copy.  This
  mostly helps when an async co-processor is used by saving CPU cycles
  used on the copy.
  
  Reviewed by:  gallatin (earlier version)
  Sponsored by: Netflix
  Differential Revision:https://reviews.freebsd.org/D24545

Modified:
  head/sys/opencrypto/ktls_ocf.c

Modified: head/sys/opencrypto/ktls_ocf.c
==
--- head/sys/opencrypto/ktls_ocf.c  Thu Jun  4 19:54:25 2020
(r361803)
+++ head/sys/opencrypto/ktls_ocf.c  Thu Jun  4 20:12:34 2020
(r361804)
@@ -73,6 +73,16 @@ SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, 
 CTLFLAG_RD, _tls13_gcm_crypts,
 "Total number of OCF TLS 1.3 GCM encryption operations");
 
+static counter_u64_t ocf_inplace;
+SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, inplace,
+CTLFLAG_RD, _inplace,
+"Total number of OCF in-place operations");
+
+static counter_u64_t ocf_separate_output;
+SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, separate_output,
+CTLFLAG_RD, _separate_output,
+"Total number of OCF operations with a separate output buffer");
+
 static counter_u64_t ocf_retries;
 SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, retries, CTLFLAG_RD,
 _retries,
@@ -97,22 +107,34 @@ ktls_ocf_tls12_gcm_encrypt(struct ktls_session *tls,
 struct iovec *outiov, int iovcnt, uint64_t seqno,
 uint8_t record_type __unused)
 {
-   struct uio uio;
+   struct uio uio, out_uio, *tag_uio;
struct tls_aead_data ad;
struct cryptop *crp;
struct ocf_session *os;
struct ocf_operation *oo;
-   struct iovec *iov;
+   struct iovec *iov, *out_iov;
int i, error;
uint16_t tls_comp_len;
+   bool inplace;
 
os = tls->cipher;
 
-   oo = malloc(sizeof(*oo) + (iovcnt + 2) * sizeof(*iov), M_KTLS_OCF,
+   oo = malloc(sizeof(*oo) + (iovcnt + 2) * sizeof(*iov) * 2, M_KTLS_OCF,
M_WAITOK | M_ZERO);
oo->os = os;
iov = oo->iov;
+   out_iov = iov + iovcnt + 2;
 
+   uio.uio_iov = iov;
+   uio.uio_offset = 0;
+   uio.uio_segflg = UIO_SYSSPACE;
+   uio.uio_td = curthread;
+
+   out_uio.uio_iov = out_iov;
+   out_uio.uio_offset = 0;
+   out_uio.uio_segflg = UIO_SYSSPACE;
+   out_uio.uio_td = curthread;
+
crp = crypto_getreq(os->sid, M_WAITOK);
 
/* Setup the IV. */
@@ -129,44 +151,50 @@ ktls_ocf_tls12_gcm_encrypt(struct ktls_session *tls,
ad.tls_length = htons(tls_comp_len);
iov[0].iov_base = 
iov[0].iov_len = sizeof(ad);
-   uio.uio_resid = sizeof(ad);
+   crp->crp_aad_start = 0;
+   crp->crp_aad_length = sizeof(ad);
 
-   /*
-* OCF always does encryption in place, so copy the data if
-* needed.  Ugh.
-*/
+   /* Copy iov's. */
+   memcpy(iov + 1, iniov, iovcnt * sizeof(*iov));
+   uio.uio_iovcnt = iovcnt + 1;
+   memcpy(out_iov, outiov, iovcnt * sizeof(*out_iov));
+   out_uio.uio_iovcnt = iovcnt;
+
+   /* Compute payload length and determine if encryption is in place. */
+   inplace = true;
+   crp->crp_payload_start = sizeof(ad);
for (i = 0; i < iovcnt; i++) {
-   iov[i + 1] = outiov[i];
if (iniov[i].iov_base != outiov[i].iov_base)
-   memcpy(outiov[i].iov_base, iniov[i].iov_base,
-   outiov[i].iov_len);
-   uio.uio_resid += outiov[i].iov_len;
+   inplace = false;
+   crp->crp_payload_length += iniov[i].iov_len;
}
+   uio.uio_resid = sizeof(ad) + crp->crp_payload_length;
+   out_uio.uio_resid = crp->crp_payload_length;
 
-   iov[iovcnt + 1].iov_base = trailer;
-   iov[iovcnt + 1].iov_len = AES_GMAC_HASH_LEN;
-   uio.uio_resid += AES_GMAC_HASH_LEN;
+   if (inplace)
+   tag_uio = 
+   else
+   tag_uio = _uio;
 
-   uio.uio_iov = iov;
-   uio.uio_iovcnt = iovcnt + 2;
-   uio.uio_offset = 0;
-   uio.uio_segflg = UIO_SYSSPACE;
-   uio.uio_td = curthread;
+   tag_uio->uio_iov[tag_uio->uio_iovcnt].iov_base = trailer;
+   tag_uio->uio_iov[tag_uio->uio_iovcnt].iov_len = AES_GMAC_HASH_LEN;
+   tag_uio->uio_iovcnt++;
+   crp->crp_digest_start = tag_uio->uio_resid;
+   tag_uio->uio_resid += 

svn commit: r361803 - head/sys/ufs/ffs

2020-06-04 Thread Stefan Eßer
Author: se
Date: Thu Jun  4 19:54:25 2020
New Revision: 361803
URL: https://svnweb.freebsd.org/changeset/base/361803

Log:
  Fix obvious typo: IN_BLKDATA should be IN_IBLKDATA

Modified:
  head/sys/ufs/ffs/ffs_balloc.c

Modified: head/sys/ufs/ffs/ffs_balloc.c
==
--- head/sys/ufs/ffs/ffs_balloc.c   Thu Jun  4 19:21:41 2020
(r361802)
+++ head/sys/ufs/ffs/ffs_balloc.c   Thu Jun  4 19:54:25 2020
(r361803)
@@ -648,7 +648,7 @@ ffs_balloc_ufs2(struct vnode *vp, off_t startoffset, i
dp->di_extsize = smalllblktosize(fs, nb + 1);
dp->di_extb[nb] = dbtofsb(fs, bp->b_blkno);
bp->b_xflags |= BX_ALTDATA;
-   UFS_INODE_SET_FLAG(ip, IN_CHANGE | IN_BLKDATA);
+   UFS_INODE_SET_FLAG(ip, IN_CHANGE | IN_IBLKDATA);
if (flags & IO_SYNC)
bwrite(bp);
else
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r361801 - head/sys/ufs/ffs

2020-06-04 Thread Kyle Evans
On Thu, Jun 4, 2020 at 1:35 PM Kirk McKusick  wrote:
>
> Author: mckusick
> Date: Thu Jun  4 18:35:21 2020
> New Revision: 361801
> URL: https://svnweb.freebsd.org/changeset/base/361801
>
> Log:
>   Two additional places that need to identify IN_IBLKDATA.
>
>   Reviewed by: kib
>   MFC with: -r361785
>   Differential Revision:  https://reviews.freebsd.org/D25072
>
> Modified:
>   head/sys/ufs/ffs/ffs_balloc.c
>
> Modified: head/sys/ufs/ffs/ffs_balloc.c
> ==
> --- head/sys/ufs/ffs/ffs_balloc.c   Thu Jun  4 18:19:16 2020
> (r361800)
> +++ head/sys/ufs/ffs/ffs_balloc.c   Thu Jun  4 18:35:21 2020
> (r361801)
> @@ -154,7 +154,8 @@ ffs_balloc_ufs1(struct vnode *vp, off_t startoffset, i
> ip->i_size = smalllblktosize(fs, nb + 1);
> dp->di_size = ip->i_size;
> dp->di_db[nb] = dbtofsb(fs, bp->b_blkno);
> -   UFS_INODE_SET_FLAG(ip, IN_CHANGE | IN_UPDATE);
> +   UFS_INODE_SET_FLAG(ip,
> +   IN_CHANGE | IN_UPDATE | IN_IBLKDATA);
> if (flags & IO_SYNC)
> bwrite(bp);
> else if (DOINGASYNC(vp))
> @@ -647,7 +648,7 @@ ffs_balloc_ufs2(struct vnode *vp, off_t startoffset, i
> dp->di_extsize = smalllblktosize(fs, nb + 1);
> dp->di_extb[nb] = dbtofsb(fs, bp->b_blkno);
> bp->b_xflags |= BX_ALTDATA;
> -   UFS_INODE_SET_FLAG(ip, IN_CHANGE);
> +   UFS_INODE_SET_FLAG(ip, IN_CHANGE | 
> IN_BLKDATA);
> if (flags & IO_SYNC)
> bwrite(bp);
> else

Hello!

This second one seems to have been accidentally misspelled as "IN_BLKDATA"

Thanks,

Kyle Evans
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r361802 - in head/sys/contrib/edk2: . Include Include/Guid Include/IndustryStandard Include/Library Include/Protocol Include/Uefi

2020-06-04 Thread Mitchell Horne
Author: mhorne
Date: Thu Jun  4 19:21:41 2020
New Revision: 361802
URL: https://svnweb.freebsd.org/changeset/base/361802

Log:
  Update edk2 headers to stable202005
  
  We use these to compile libefivar. The particular motivation for this update 
is
  the inclusion of the RISC-V machine definitions that allow us to build the
  library on the platform. This support could easily have been submitted as a
  small local diff, but the timing of the release coincided with this work, and
  it has been over 3 years since these sources were initially imported.
  
  Note that this comes with a license change from regular BSD 2-clause to the
  BSD+Patent license. This has been approved by core@ for this particular
  project [1].
  
  As with the original import, we retain only the subset of headers that we
  actually need to build libefivar. I adapted imp@'s process slightly for this
  update:
  
  # Generate list of the headers needed to build
  cp -r ../vendor/edk2/dist/MdePkg/Include sys/contrib/edk2
  cd lib/libefivar
  make
  pushd `make -V .OBJDIR`
  cat .depend*.o | grep sys/contrib | cut -d' ' -f 3 |
  sort -u | sed -e 's=/full/path/sys/contrib/edk2/==' > /tmp/xxx
  popd
  
  # Merge the needed files
  cd ../../sys/contrib/edk2
  svn revert -R .
  for i in `cat /tmp/xxx`; do
  svn merge -c VendorRevision 
svn+ssh://repo.freebsd.org/base/vendor/edk2/dist/MdePkg/$i $i
  done
  svn merge -c VendorRevision 
svn+ssh://repo.freebsd.org/base/vendor/edk2/dist/MdePkg/MdePkg.dec MdePkg.dec
  
  [1] https://www.freebsd.org/internal/software-license.html

Modified:
  head/sys/contrib/edk2/Include/Base.h   (contents, props changed)
  head/sys/contrib/edk2/Include/Guid/HiiFormMapMethodGuid.h   (contents, props 
changed)
  head/sys/contrib/edk2/Include/Guid/PcAnsi.h   (contents, props changed)
  head/sys/contrib/edk2/Include/Guid/WinCertificate.h   (contents, props 
changed)
  head/sys/contrib/edk2/Include/IndustryStandard/Acpi10.h   (contents, props 
changed)
  head/sys/contrib/edk2/Include/IndustryStandard/Acpi20.h   (contents, props 
changed)
  head/sys/contrib/edk2/Include/IndustryStandard/Acpi30.h   (contents, props 
changed)
  head/sys/contrib/edk2/Include/IndustryStandard/Acpi40.h   (contents, props 
changed)
  head/sys/contrib/edk2/Include/IndustryStandard/Acpi50.h   (contents, props 
changed)
  head/sys/contrib/edk2/Include/IndustryStandard/Acpi51.h   (contents, props 
changed)
  head/sys/contrib/edk2/Include/IndustryStandard/Acpi60.h   (contents, props 
changed)
  head/sys/contrib/edk2/Include/IndustryStandard/AcpiAml.h   (contents, props 
changed)
  head/sys/contrib/edk2/Include/IndustryStandard/Bluetooth.h   (contents, props 
changed)
  head/sys/contrib/edk2/Include/Library/BaseLib.h   (contents, props changed)
  head/sys/contrib/edk2/Include/Library/BaseMemoryLib.h   (contents, props 
changed)
  head/sys/contrib/edk2/Include/Library/DebugLib.h   (contents, props changed)
  head/sys/contrib/edk2/Include/Library/DevicePathLib.h   (contents, props 
changed)
  head/sys/contrib/edk2/Include/Library/MemoryAllocationLib.h   (contents, 
props changed)
  head/sys/contrib/edk2/Include/Library/PcdLib.h   (contents, props changed)
  head/sys/contrib/edk2/Include/Library/PrintLib.h   (contents, props changed)
  head/sys/contrib/edk2/Include/Library/UefiBootServicesTableLib.h   (contents, 
props changed)
  head/sys/contrib/edk2/Include/Protocol/DebugPort.h   (contents, props changed)
  head/sys/contrib/edk2/Include/Protocol/DevicePath.h   (contents, props 
changed)
  head/sys/contrib/edk2/Include/Protocol/DevicePathFromText.h   (contents, 
props changed)
  head/sys/contrib/edk2/Include/Protocol/DevicePathToText.h   (contents, props 
changed)
  head/sys/contrib/edk2/Include/Protocol/DevicePathUtilities.h   (contents, 
props changed)
  head/sys/contrib/edk2/Include/Protocol/SimpleTextIn.h   (contents, props 
changed)
  head/sys/contrib/edk2/Include/Protocol/SimpleTextInEx.h   (contents, props 
changed)
  head/sys/contrib/edk2/Include/Protocol/SimpleTextOut.h   (contents, props 
changed)
  head/sys/contrib/edk2/Include/Uefi.h   (contents, props changed)
  head/sys/contrib/edk2/Include/Uefi/UefiBaseType.h   (contents, props changed)
  head/sys/contrib/edk2/Include/Uefi/UefiGpt.h   (contents, props changed)
  head/sys/contrib/edk2/Include/Uefi/UefiInternalFormRepresentation.h   
(contents, props changed)
  head/sys/contrib/edk2/Include/Uefi/UefiMultiPhase.h   (contents, props 
changed)
  head/sys/contrib/edk2/Include/Uefi/UefiPxe.h   (contents, props changed)
  head/sys/contrib/edk2/Include/Uefi/UefiSpec.h   (contents, props changed)
  head/sys/contrib/edk2/MdePkg.dec   (contents, props changed)
Directory Properties:
  head/sys/contrib/edk2/   (props changed)

Modified: head/sys/contrib/edk2/Include/Base.h
==
--- head/sys/contrib/edk2/Include/Base.hThu Jun  4 18:35:21 2020

svn commit: r361801 - head/sys/ufs/ffs

2020-06-04 Thread Kirk McKusick
Author: mckusick
Date: Thu Jun  4 18:35:21 2020
New Revision: 361801
URL: https://svnweb.freebsd.org/changeset/base/361801

Log:
  Two additional places that need to identify IN_IBLKDATA.
  
  Reviewed by: kib
  MFC with: -r361785
  Differential Revision:  https://reviews.freebsd.org/D25072

Modified:
  head/sys/ufs/ffs/ffs_balloc.c

Modified: head/sys/ufs/ffs/ffs_balloc.c
==
--- head/sys/ufs/ffs/ffs_balloc.c   Thu Jun  4 18:19:16 2020
(r361800)
+++ head/sys/ufs/ffs/ffs_balloc.c   Thu Jun  4 18:35:21 2020
(r361801)
@@ -154,7 +154,8 @@ ffs_balloc_ufs1(struct vnode *vp, off_t startoffset, i
ip->i_size = smalllblktosize(fs, nb + 1);
dp->di_size = ip->i_size;
dp->di_db[nb] = dbtofsb(fs, bp->b_blkno);
-   UFS_INODE_SET_FLAG(ip, IN_CHANGE | IN_UPDATE);
+   UFS_INODE_SET_FLAG(ip,
+   IN_CHANGE | IN_UPDATE | IN_IBLKDATA);
if (flags & IO_SYNC)
bwrite(bp);
else if (DOINGASYNC(vp))
@@ -647,7 +648,7 @@ ffs_balloc_ufs2(struct vnode *vp, off_t startoffset, i
dp->di_extsize = smalllblktosize(fs, nb + 1);
dp->di_extb[nb] = dbtofsb(fs, bp->b_blkno);
bp->b_xflags |= BX_ALTDATA;
-   UFS_INODE_SET_FLAG(ip, IN_CHANGE);
+   UFS_INODE_SET_FLAG(ip, IN_CHANGE | IN_BLKDATA);
if (flags & IO_SYNC)
bwrite(bp);
else
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r361800 - head

2020-06-04 Thread Kyle Evans
Author: kevans
Date: Thu Jun  4 18:19:16 2020
New Revision: 361800
URL: https://svnweb.freebsd.org/changeset/base/361800

Log:
  RELNOTES and UPDATING: Document the new policy on read(2) of dirfd
  
  These changes have been completely flushed as of r361799; note it.

Modified:
  head/RELNOTES
  head/UPDATING

Modified: head/RELNOTES
==
--- head/RELNOTES   Thu Jun  4 18:17:25 2020(r361799)
+++ head/RELNOTES   Thu Jun  4 18:19:16 2020(r361800)
@@ -10,8 +10,17 @@ newline.  Entries should be separated by a newline.
 
 Changes to this file should not be MFCed.
 
-r361238:
-   ZFS will now reject read(2) of a dirfd with EISDIR.
+r361238, r361798, r361799:
+   ZFS will now unconditionally reject read(2) of a directory with EISDIR.
+   Additionally, read(2) of a directory is now rejected with EISDIR by
+   default and may be re-enabled for non-ZFS filesystems that allow it with
+   the sysctl(8) MIB 'security.bsd.allow_read_dir'.
+
+   Aliases for grep to default to '-d skip' may be desired if commonly
+   non-recursively grepping a list that includes directories and the
+   possibility of EISDIR errors in stderr is not tolerable.  Example
+   aliases, commented out, have been installed in /root/.cshrc and
+   /root/.shrc.
 
 r361066:
Add exec.prepare and exec.release hooks for jail(8) and jail.conf(5).

Modified: head/UPDATING
==
--- head/UPDATING   Thu Jun  4 18:17:25 2020(r361799)
+++ head/UPDATING   Thu Jun  4 18:19:16 2020(r361800)
@@ -26,6 +26,18 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW:
disable the most expensive debugging functionality run
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
 
+20200604:
+   read(2) of a directory fd is now rejected by default.  root may
+   re-enable it for system root only on non-ZFS filesystems with the
+   security.bsd.allow_read_dir sysctl(8) MIB if
+   security.bsd.suser_enabled=1.
+
+   It may be advised to setup aliases for grep to default to `-d skip` if
+   commonly non-recursively grepping a list that includes directories and
+   the potential for the resulting stderr output is not tolerable.  Example
+   aliases are now installed, commented out, in /root/.cshrc and
+   /root/.shrc.
+
 20200523:
Clang, llvm, lld, lldb, compiler-rt, libc++, libunwind and openmp have
been upgraded to 10.0.1.  Please see the 20141231 entry below for
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r361799 - in head: lib/libc/sys sys/kern sys/sys

2020-06-04 Thread Kyle Evans
Author: kevans
Date: Thu Jun  4 18:17:25 2020
New Revision: 361799
URL: https://svnweb.freebsd.org/changeset/base/361799

Log:
  vfs: add restrictions to read(2) of a directory [2/2]
  
  This commit adds the priv(9) that waters down the sysctl to make it only
  allow read(2) of a dirfd by the system root. Jailed root is not allowed, but
  jail policy and superuser policy will abstain from allowing/denying it so
  that a MAC module can fully control the policy.
  
  Such a MAC module has been written, and can be found at:
  https://people.freebsd.org/~kevans/mac_read_dir-0.1.0.tar.gz
  
  It is expected that the MAC module won't be needed by many, as most only
  need to do such diagnostics that require this behavior as system root
  anyways. Interested parties are welcome to grab the MAC module above and
  create a port or locally integrate it, and with enough support it could see
  introduction to base. As noted in mac_read_dir.c, it is released under the
  BSD 2 clause license and allows the restrictions to be lifted for only
  jailed root or for all unprivileged users.
  
  PR:   246412
  Reviewed by:  mckusick, kib, emaste, jilles, cy, phk, imp (all previous)
  Reviewed by:  rgrimes (latest version)
  Differential Revision:https://reviews.freebsd.org/D24596

Modified:
  head/lib/libc/sys/read.2
  head/sys/kern/kern_jail.c
  head/sys/kern/kern_priv.c
  head/sys/kern/vfs_vnops.c
  head/sys/sys/priv.h

Modified: head/lib/libc/sys/read.2
==
--- head/lib/libc/sys/read.2Thu Jun  4 18:09:55 2020(r361798)
+++ head/lib/libc/sys/read.2Thu Jun  4 18:17:25 2020(r361799)
@@ -200,7 +200,7 @@ The file was marked for non-blocking I/O,
 and no data were ready to be read.
 .It Bq Er EISDIR
 The file descriptor is associated with a directory.
-Directories may only be read directly if the filesystem supports it and
+Directories may only be read directly by root if the filesystem supports it and
 the
 .Dv security.bsd.allow_read_dir
 sysctl MIB is set to a non-zero value.

Modified: head/sys/kern/kern_jail.c
==
--- head/sys/kern/kern_jail.c   Thu Jun  4 18:09:55 2020(r361798)
+++ head/sys/kern/kern_jail.c   Thu Jun  4 18:17:25 2020(r361799)
@@ -3324,6 +3324,14 @@ prison_priv_check(struct ucred *cred, int priv)
return (EPERM);
 
/*
+* Jails should hold no disposition on the PRIV_VFS_READ_DIR
+* policy.  priv_check_cred will not specifically allow it, and
+* we may want a MAC policy to allow it.
+*/
+   case PRIV_VFS_READ_DIR:
+   return (0);
+
+   /*
 * Conditionnaly allow locking (unlocking) physical pages
 * in memory.
 */

Modified: head/sys/kern/kern_priv.c
==
--- head/sys/kern/kern_priv.c   Thu Jun  4 18:09:55 2020(r361798)
+++ head/sys/kern/kern_priv.c   Thu Jun  4 18:17:25 2020(r361799)
@@ -194,6 +194,14 @@ priv_check_cred(struct ucred *cred, int priv)
goto out;
}
break;
+   case PRIV_VFS_READ_DIR:
+   /*
+* Allow PRIV_VFS_READ_DIR for root if we're not in a
+* jail, otherwise deny unless a MAC policy grants it.
+*/
+   if (jailed(cred))
+   break;
+   /* FALLTHROUGH */
default:
if (cred->cr_uid == 0) {
error = 0;

Modified: head/sys/kern/vfs_vnops.c
==
--- head/sys/kern/vfs_vnops.c   Thu Jun  4 18:09:55 2020(r361798)
+++ head/sys/kern/vfs_vnops.c   Thu Jun  4 18:17:25 2020(r361799)
@@ -1226,12 +1226,16 @@ vn_io_fault(struct file *fp, struct uio *uio, struct u
 * The ability to read(2) on a directory has historically been
 * allowed for all users, but this can and has been the source of
 * at least one security issue in the past.  As such, it is now hidden
-* away behind a sysctl for those that actually need it to use it.
+* away behind a sysctl for those that actually need it to use it, and
+* restricted to root when it's turned on to make it relatively safe to
+* leave on for longer sessions of need.
 */
if (vp->v_type == VDIR) {
KASSERT(uio->uio_rw == UIO_READ,
("illegal write attempted on a directory"));
if (!vfs_allow_read_dir)
+   return (EISDIR);
+   if ((error = priv_check(td, 

svn commit: r361798 - in head: bin/csh bin/sh lib/libc/sys sys/kern

2020-06-04 Thread Kyle Evans
Author: kevans
Date: Thu Jun  4 18:09:55 2020
New Revision: 361798
URL: https://svnweb.freebsd.org/changeset/base/361798

Log:
  vfs: add restrictions to read(2) of a directory [1/2]
  
  Historically, we've allowed read() of a directory and some filesystems will
  accommodate (e.g. ufs/ffs, msdosfs). From the history department staffed by
  Warner: uio_rw == UIO_READ ? vn_read : vn_write;
vp = fp->f_vnode;
+
+   /*
+* The ability to read(2) on a directory has historically been
+* allowed for all users, but this can and has been the source of
+* at least one security issue in the past.  As such, it is now hidden
+* away behind a sysctl for those that actually need it to use it.
+*/
+   if (vp->v_type == VDIR) {
+   KASSERT(uio->uio_rw == UIO_READ,
+   ("illegal write attempted on a directory"));
+   if (!vfs_allow_read_dir)
+   return (EISDIR);
+   }
+
foffset_lock_uio(fp, uio, flags);
if (do_vn_io_fault(vp, uio)) {
args.kind = VN_IO_FAULT_FOP;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r361797 - in stable: 11/sys/kern 12/sys/kern

2020-06-04 Thread Ryan Moeller
Author: freqlabs
Date: Thu Jun  4 17:23:49 2020
New Revision: 361797
URL: https://svnweb.freebsd.org/changeset/base/361797

Log:
  MFC r361699, r361711:
  
  Assign default security flavor when converting old export args
  
  vfs_export requires security flavors be explicitly listed when
  exporting as of r360900.
  
  Use the default AUTH_SYS flavor when converting old export args to
  ensure compatibility with the legacy mount syscall.
  
  Reported by:rmacklem
  Reviewed by:rmacklem
  Approved by:mav (mentor)
  Sponsored by:   iXsystems, Inc.
  Differential Revision:  https://reviews.freebsd.org/D25045

Modified:
  stable/11/sys/kern/vfs_mount.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/sys/kern/vfs_mount.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/sys/kern/vfs_mount.c
==
--- stable/11/sys/kern/vfs_mount.c  Thu Jun  4 17:20:58 2020
(r361796)
+++ stable/11/sys/kern/vfs_mount.c  Thu Jun  4 17:23:49 2020
(r361797)
@@ -65,6 +65,9 @@ __FBSDID("$FreeBSD$");
 
 #include 
 
+#include 
+#include 
+
 #include 
 #include 
 
@@ -2049,10 +2052,22 @@ kernel_vmount(int flags, ...)
return (error);
 }
 
+/*
+ * Convert the old export args format into new export args.
+ *
+ * The old export args struct does not have security flavors.  Otherwise, the
+ * structs are identical.  The default security flavor 'sys' is applied when
+ * the given args export the filesystem.
+ */
 void
 vfs_oexport_conv(const struct oexport_args *oexp, struct export_args *exp)
 {
 
bcopy(oexp, exp, sizeof(*oexp));
-   exp->ex_numsecflavors = 0;
+   if (exp->ex_flags & MNT_EXPORTED) {
+   exp->ex_numsecflavors = 1;
+   exp->ex_secflavors[0] = AUTH_SYS;
+   } else {
+   exp->ex_numsecflavors = 0;
+   }
 }
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r361797 - in stable: 11/sys/kern 12/sys/kern

2020-06-04 Thread Ryan Moeller
Author: freqlabs
Date: Thu Jun  4 17:23:49 2020
New Revision: 361797
URL: https://svnweb.freebsd.org/changeset/base/361797

Log:
  MFC r361699, r361711:
  
  Assign default security flavor when converting old export args
  
  vfs_export requires security flavors be explicitly listed when
  exporting as of r360900.
  
  Use the default AUTH_SYS flavor when converting old export args to
  ensure compatibility with the legacy mount syscall.
  
  Reported by:rmacklem
  Reviewed by:rmacklem
  Approved by:mav (mentor)
  Sponsored by:   iXsystems, Inc.
  Differential Revision:  https://reviews.freebsd.org/D25045

Modified:
  stable/12/sys/kern/vfs_mount.c
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/sys/kern/vfs_mount.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/sys/kern/vfs_mount.c
==
--- stable/12/sys/kern/vfs_mount.c  Thu Jun  4 17:20:58 2020
(r361796)
+++ stable/12/sys/kern/vfs_mount.c  Thu Jun  4 17:23:49 2020
(r361797)
@@ -68,6 +68,9 @@ __FBSDID("$FreeBSD$");
 
 #include 
 
+#include 
+#include 
+
 #include 
 #include 
 
@@ -2043,10 +2046,22 @@ kernel_vmount(int flags, ...)
return (error);
 }
 
+/*
+ * Convert the old export args format into new export args.
+ *
+ * The old export args struct does not have security flavors.  Otherwise, the
+ * structs are identical.  The default security flavor 'sys' is applied when
+ * the given args export the filesystem.
+ */
 void
 vfs_oexport_conv(const struct oexport_args *oexp, struct export_args *exp)
 {
 
bcopy(oexp, exp, sizeof(*oexp));
-   exp->ex_numsecflavors = 0;
+   if (exp->ex_flags & MNT_EXPORTED) {
+   exp->ex_numsecflavors = 1;
+   exp->ex_secflavors[0] = AUTH_SYS;
+   } else {
+   exp->ex_numsecflavors = 0;
+   }
 }
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r361796 - head/sys/dts/arm64/overlays

2020-06-04 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Thu Jun  4 17:20:58 2020
New Revision: 361796
URL: https://svnweb.freebsd.org/changeset/base/361796

Log:
  Remove licenses
  
  I haven't requested explicit permission from authors and shouldn't have
  added BSDL headers without it.
  
  Requestes by: imp

Modified:
  head/sys/dts/arm64/overlays/spigen-rpi3.dtso
  head/sys/dts/arm64/overlays/spigen-rpi4.dtso

Modified: head/sys/dts/arm64/overlays/spigen-rpi3.dtso
==
--- head/sys/dts/arm64/overlays/spigen-rpi3.dtsoThu Jun  4 17:08:07 
2020(r361795)
+++ head/sys/dts/arm64/overlays/spigen-rpi3.dtsoThu Jun  4 17:20:58 
2020(r361796)
@@ -1,31 +1,4 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2019 Bob Frazier 
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *notice, this list of conditions and the following disclaimer in the
- *documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
+/* $FreeBSD$ */
 
 /dts-v1/;
 /plugin/;

Modified: head/sys/dts/arm64/overlays/spigen-rpi4.dtso
==
--- head/sys/dts/arm64/overlays/spigen-rpi4.dtsoThu Jun  4 17:08:07 
2020(r361795)
+++ head/sys/dts/arm64/overlays/spigen-rpi4.dtsoThu Jun  4 17:20:58 
2020(r361796)
@@ -1,31 +1,4 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2020 Gergely Czuczy 
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *notice, this list of conditions and the following disclaimer in the
- *documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
+/* $FreeBSD$ */
 
 /dts-v1/;
 /plugin/;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r361795 - stable/11/sys/x86/xen

2020-06-04 Thread Alexander Motin
Author: mav
Date: Thu Jun  4 17:08:07 2020
New Revision: 361795
URL: https://svnweb.freebsd.org/changeset/base/361795

Log:
  MFC r354637 (by royger): xen: fix dispatching of NMIs

Modified:
  stable/11/sys/x86/xen/xen_apic.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/x86/xen/xen_apic.c
==
--- stable/11/sys/x86/xen/xen_apic.cThu Jun  4 17:01:39 2020
(r361794)
+++ stable/11/sys/x86/xen/xen_apic.cThu Jun  4 17:08:07 2020
(r361795)
@@ -72,7 +72,6 @@ static driver_filter_t xen_invlcache;
 static driver_filter_t xen_ipi_bitmap_handler;
 static driver_filter_t xen_cpustop_handler;
 static driver_filter_t xen_cpususpend_handler;
-static driver_filter_t xen_cpustophard_handler;
 #endif
 
 /*-- Macros 
--*/
@@ -96,7 +95,6 @@ static struct xen_ipi_handler xen_ipis[] = 
[IPI_TO_IDX(IPI_BITMAP_VECTOR)] = { xen_ipi_bitmap_handler, "b"   },
[IPI_TO_IDX(IPI_STOP)]  = { xen_cpustop_handler,"st"  },
[IPI_TO_IDX(IPI_SUSPEND)]   = { xen_cpususpend_handler, "sp"  },
-   [IPI_TO_IDX(IPI_STOP_HARD)] = { xen_cpustophard_handler,"sth" },
 };
 #endif
 
@@ -259,12 +257,52 @@ xen_pv_lapic_ipi_raw(register_t icrlo, u_int dest)
XEN_APIC_UNSUPPORTED;
 }
 
+#define PCPU_ID_GET(id, field) (pcpu_find(id)->pc_##field)
 static void
+send_nmi(int dest)
+{
+   unsigned int cpu;
+
+   /*
+* NMIs are not routed over event channels, and instead delivered as on
+* native using the exception vector (#2). Triggering them can be done
+* using the local APIC, or an hypercall as a shortcut like it's done
+* below.
+*/
+   switch(dest) {
+   case APIC_IPI_DEST_SELF:
+   HYPERVISOR_vcpu_op(VCPUOP_send_nmi, PCPU_GET(vcpu_id), NULL);
+   break;
+   case APIC_IPI_DEST_ALL:
+   CPU_FOREACH(cpu)
+   HYPERVISOR_vcpu_op(VCPUOP_send_nmi,
+   PCPU_ID_GET(cpu, vcpu_id), NULL);
+   break;
+   case APIC_IPI_DEST_OTHERS:
+   CPU_FOREACH(cpu)
+   if (cpu != PCPU_GET(cpuid))
+   HYPERVISOR_vcpu_op(VCPUOP_send_nmi,
+   PCPU_ID_GET(cpu, vcpu_id), NULL);
+   break;
+   default:
+   HYPERVISOR_vcpu_op(VCPUOP_send_nmi,
+   PCPU_ID_GET(apic_cpuid(dest), vcpu_id), NULL);
+   break;
+   }
+}
+#undef PCPU_ID_GET
+
+static void
 xen_pv_lapic_ipi_vectored(u_int vector, int dest)
 {
xen_intr_handle_t *ipi_handle;
int ipi_idx, to_cpu, self;
 
+   if (vector >= IPI_NMI_FIRST) {
+   send_nmi(dest);
+   return;
+   }
+
ipi_idx = IPI_TO_IDX(vector);
if (ipi_idx >= nitems(xen_ipis))
panic("IPI out of range");
@@ -519,14 +557,6 @@ xen_cpususpend_handler(void *arg)
 {
 
cpususpend_handler();
-   return (FILTER_HANDLED);
-}
-
-static int
-xen_cpustophard_handler(void *arg)
-{
-
-   ipi_nmi_handler();
return (FILTER_HANDLED);
 }
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r361794 - stable/11/sys/amd64/amd64

2020-06-04 Thread Alexander Motin
Author: mav
Date: Thu Jun  4 17:01:39 2020
New Revision: 361794
URL: https://svnweb.freebsd.org/changeset/base/361794

Log:
  MFC r354638: teach db_nextframe/x86 about [X]xen_intr_upcall interrupt handler

Modified:
  stable/11/sys/amd64/amd64/db_trace.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/amd64/amd64/db_trace.c
==
--- stable/11/sys/amd64/amd64/db_trace.cThu Jun  4 16:24:13 2020
(r361793)
+++ stable/11/sys/amd64/amd64/db_trace.cThu Jun  4 17:01:39 2020
(r361794)
@@ -206,6 +206,7 @@ db_nextframe(struct amd64_frame **fp, db_addr_t *ip, s
frame_type = TRAP;
else if (strncmp(name, "Xatpic_intr", 11) == 0 ||
strncmp(name, "Xapic_isr", 9) == 0 ||
+   strcmp(name, "Xxen_intr_upcall") == 0 ||
strcmp(name, "Xtimerint") == 0 ||
strcmp(name, "Xipi_intr_bitmap_handler") == 0 ||
strcmp(name, "Xcpustop") == 0 ||
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


userboot.so can't open rootfs partition if you use raw BSD partitions directly on disk without any slices

2020-06-04 Thread Michael Pounov
Excuse me for double sent, but I forgot the attachment :(

After upgrade from FreeBSD 12.0 to 12-STABLE of embedded image under BHyve 
guest I faced with bootloader issue.

>From FreeBSD 12.1 till current version of FreeBFrom FreeBSD 12.1 till current 
>version of FreeBSD. userboot.so loader haves issue with raw BSD partitions 
>directly on disk without any PC slice schema aka MBR or GPT.

Bug came after commit, when predefine constant values was replaced with macro 
definitions in userboot/main.c and common/disk.c. These two members of devsw 
structure d_slice and d_partition now have defined constants. One of them have 
different value from previous version of code.
D_PARTWILD now have value -2, before that change dev.d_partition has 0.

I didn't take easy step directly to change macro D_PARTWILD to 0, because I saw 
that uboot loader already used this macro.
I made patch in common/disk.c file into disk_open() functionSD. userboot.so 
loader haves issue with raw BSD partitions directly on disk without any PC 
slice schema aka MBR or GPT.

Bug came after commit, when predefine constant values was replaced with macro 
definitions in userboot/main.c and common/disk.c. These two members of devsw 
structure d_slice and d_partition now have defined constants. One of them have 
different value from previous version of code.
D_PARTWILD now have value -2, before that change dev.d_partition has 0.

I didn't take easy step directly to change macro D_PARTWILD to 0, because I saw 
that uboot loader already used this macro.
I made patch in common/disk.c file into disk_open() function

P.S. Patch was produced against base/head sources

Regards

Michael Pounov
CloudSigma AG


disk_open.patch
Description: Binary data
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


userboot.so can't open rootfs partition if you use raw BSD partitions directly on disk without any slices

2020-06-04 Thread Michael Pounov
Hi 

After upgrade from FreeBSD 12.0 to 12-STABLE of embedded image under BHyve 
guest I faced with bootloader issue.

>From FreeBSD 12.1 till current version of FreeBFrom FreeBSD 12.1 till current 
>version of FreeBSD. userboot.so loader haves issue with raw BSD partitions 
>directly on disk without any PC slice schema aka MBR or GPT.

Bug came after commit, when predefine constant values was replaced with macro 
definitions in userboot/main.c and common/disk.c. These two members of devsw 
structure d_slice and d_partition now have defined constants. One of them have 
different value from previous version of code.
D_PARTWILD now have value -2, before that change dev.d_partition has 0.

I didn't take easy step directly to change macro D_PARTWILD to 0, because I saw 
that uboot loader already used this macro.
I made patch in common/disk.c file into disk_open() functionSD. userboot.so 
loader haves issue with raw BSD partitions directly on disk without any PC 
slice schema aka MBR or GPT.

Bug came after commit, when predefine constant values was replaced with macro 
definitions in userboot/main.c and common/disk.c. These two members of devsw 
structure d_slice and d_partition now have defined constants. One of them have 
different value from previous version of code.
D_PARTWILD now have value -2, before that change dev.d_partition has 0.

I didn't take easy step directly to change macro D_PARTWILD to 0, because I saw 
that uboot loader already used this macro.
I made patch in common/disk.c file into disk_open() function

P.S. Patch was produced against base/head sources

Regards

Michael Pounov
CloudSigma AG
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r361791 - head/etc/mtree

2020-06-04 Thread Conrad Meyer
On Thu, Jun 4, 2020 at 9:04 AM Conrad Meyer  wrote:
>   750 is no more restrictive than defaults for the rest of the open source
>   Unix-alike world.  In particular, Ben Woods surveyed DragonFly, NetBSD,
>   OpenBSD, ArchLinux, CentOS, Debian, Fedora, Slackware, and Ubuntu.  None 
> have a
>   world-readable /root by default.

A minor correction: NetBSD does have a world-readable /root by
default.  The rest do not.

Conrad
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r361793 - head/sbin/dhclient

2020-06-04 Thread Mark Johnston
Author: markj
Date: Thu Jun  4 16:24:13 2020
New Revision: 361793
URL: https://svnweb.freebsd.org/changeset/base/361793

Log:
  dhclient: Fix a logic bug remove_protocol().
  
  A logic bug in remove_protocol() meant that it would remove (leak) all
  structures in the list preceding the one intended for removal.
  
  PR:   245971
  Submitted by: jo...@jodocus.org (original version)
  MFC after:1 week

Modified:
  head/sbin/dhclient/dispatch.c

Modified: head/sbin/dhclient/dispatch.c
==
--- head/sbin/dhclient/dispatch.c   Thu Jun  4 16:05:24 2020
(r361792)
+++ head/sbin/dhclient/dispatch.c   Thu Jun  4 16:24:13 2020
(r361793)
@@ -474,13 +474,16 @@ add_protocol(const char *name, int fd, void (*handler)
 void
 remove_protocol(struct protocol *proto)
 {
-   struct protocol *p, *next;
+   struct protocol *p, *prev;
 
-   for (p = protocols; p; p = next) {
-   next = p->next;
+   for (p = protocols, prev = NULL; p != NULL; prev = p, p = p->next) {
if (p == proto) {
-   protocols = p->next;
+   if (prev == NULL)
+   protocols = p->next;
+   else
+   prev->next = p->next;
free(p);
+   break;
}
}
 }
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r361791 - head/etc/mtree

2020-06-04 Thread Cy Schubert
In message <202006041604.054g4kab098...@repo.freebsd.org>, Conrad Meyer 
writes:
> Author: cem
> Date: Thu Jun  4 16:04:19 2020
> New Revision: 361791
> URL: https://svnweb.freebsd.org/changeset/base/361791
>
> Log:
>   Restrict default /root permissions
>   
>   Remove world-readability from the root directory.  Sensitive information ma
> y be
>   stored in /root and we diverge here from normative administrative practice,
>  as
>   well as installation defaults of other Unix-alikes.  The wheel group is sti
> ll
>   permitted to read the directory.
>   
>   750 is no more restrictive than defaults for the rest of the open source
>   Unix-alike world.  In particular, Ben Woods surveyed DragonFly, NetBSD,
>   OpenBSD, ArchLinux, CentOS, Debian, Fedora, Slackware, and Ubuntu.  None ha
> ve a
>   world-readable /root by default.
>   
>   Submitted by:   Gordon Bergling 
>   Reviewed by:ian, myself
>   Discussed with: emaste (informal approval)
>   Relnotes:   sure?
>   Differential Revision:  https://reviews.freebsd.org/D23392
>
> Modified:
>   head/etc/mtree/BSD.root.dist
>
> Modified: head/etc/mtree/BSD.root.dist
> =
> =
> --- head/etc/mtree/BSD.root.dist  Thu Jun  4 14:44:44 2020(r36179
> 0)
> +++ head/etc/mtree/BSD.root.dist  Thu Jun  4 16:04:19 2020(r36179
> 1)
> @@ -117,7 +117,7 @@
>  ..
>  rescue
>  ..
> -root
> +rootmode=0750
>  ..
>  sbin
>  ..
>


Recent CIS benchmarks recommend 0700.


-- 
Cheers,
Cy Schubert 
FreeBSD UNIX: Web:  https://FreeBSD.org
NTP:   Web:  https://nwtime.org

The need of the many outweighs the greed of the few.


___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r361792 - in head: share/man/man4 sys/conf

2020-06-04 Thread Mark Johnston
Author: markj
Date: Thu Jun  4 16:05:24 2020
New Revision: 361792
URL: https://svnweb.freebsd.org/changeset/base/361792

Log:
  Update vt(4) config option names to chase r303043.
  
  PR:   246080
  Submitted by: David Marec 
  MFC after:1 week

Modified:
  head/share/man/man4/vt.4
  head/sys/conf/NOTES
  head/sys/conf/options

Modified: head/share/man/man4/vt.4
==
--- head/share/man/man4/vt.4Thu Jun  4 16:04:19 2020(r361791)
+++ head/share/man/man4/vt.4Thu Jun  4 16:05:24 2020(r361792)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 28, 2017
+.Dd June 4, 2020
 .Dt "VT" 4
 .Os
 .Sh NAME
@@ -145,11 +145,11 @@ In effect, this makes the right-hand mouse button perf
 These options are checked in the order shown.
 .It Dv SC_NO_CUTPASTE
 Disable mouse support.
-.It VT_FB_DEFAULT_WIDTH=X
-Set the default width to
+.It VT_FB_MAX_WIDTH=X
+Set the maximum width to
 .Fa X .
-.It VT_FB_DEFAULT_HEIGHT=Y
-Set the default height to
+.It VT_FB_MAX_HEIGHT=Y
+Set the maximum height to
 .Fa Y .
 .El
 .Sh BACKWARDS COMPATIBILITY

Modified: head/sys/conf/NOTES
==
--- head/sys/conf/NOTES Thu Jun  4 16:04:19 2020(r361791)
+++ head/sys/conf/NOTES Thu Jun  4 16:05:24 2020(r361792)
@@ -1487,9 +1487,9 @@ options   VT_ALT_TO_ESC_HACK=1# Prepend ESC 
sequence t
 optionsVT_MAXWINDOWS=16# Number of virtual consoles
 optionsVT_TWOBUTTON_MOUSE  # Use right mouse button to 
paste
 
-# The following options set the default framebuffer size.
-optionsVT_FB_DEFAULT_HEIGHT=480
-optionsVT_FB_DEFAULT_WIDTH=640
+# The following options set the maximum framebuffer size.
+optionsVT_FB_MAX_HEIGHT=480
+optionsVT_FB_MAX_WIDTH=640
 
 # The following options will let you change the default vt terminal colors.
 optionsTERMINAL_NORM_ATTR=(FG_GREEN|BG_BLACK)

Modified: head/sys/conf/options
==
--- head/sys/conf/options   Thu Jun  4 16:04:19 2020(r361791)
+++ head/sys/conf/options   Thu Jun  4 16:05:24 2020(r361792)
@@ -773,8 +773,8 @@ SC_PIXEL_MODE   opt_syscons.h
 SC_RENDER_DEBUGopt_syscons.h
 SC_TWOBUTTON_MOUSE opt_syscons.h
 VT_ALT_TO_ESC_HACK opt_syscons.h
-VT_FB_DEFAULT_WIDTHopt_syscons.h
-VT_FB_DEFAULT_HEIGHT   opt_syscons.h
+VT_FB_MAX_WIDTHopt_syscons.h
+VT_FB_MAX_HEIGHT   opt_syscons.h
 VT_MAXWINDOWS  opt_syscons.h
 VT_TWOBUTTON_MOUSE opt_syscons.h
 DEV_SC opt_syscons.h
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r361791 - head/etc/mtree

2020-06-04 Thread Conrad Meyer
Author: cem
Date: Thu Jun  4 16:04:19 2020
New Revision: 361791
URL: https://svnweb.freebsd.org/changeset/base/361791

Log:
  Restrict default /root permissions
  
  Remove world-readability from the root directory.  Sensitive information may 
be
  stored in /root and we diverge here from normative administrative practice, as
  well as installation defaults of other Unix-alikes.  The wheel group is still
  permitted to read the directory.
  
  750 is no more restrictive than defaults for the rest of the open source
  Unix-alike world.  In particular, Ben Woods surveyed DragonFly, NetBSD,
  OpenBSD, ArchLinux, CentOS, Debian, Fedora, Slackware, and Ubuntu.  None have 
a
  world-readable /root by default.
  
  Submitted by: Gordon Bergling 
  Reviewed by:  ian, myself
  Discussed with:   emaste (informal approval)
  Relnotes: sure?
  Differential Revision:https://reviews.freebsd.org/D23392

Modified:
  head/etc/mtree/BSD.root.dist

Modified: head/etc/mtree/BSD.root.dist
==
--- head/etc/mtree/BSD.root.distThu Jun  4 14:44:44 2020
(r361790)
+++ head/etc/mtree/BSD.root.distThu Jun  4 16:04:19 2020
(r361791)
@@ -117,7 +117,7 @@
 ..
 rescue
 ..
-root
+rootmode=0750
 ..
 sbin
 ..
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r361775 - in head/sys: dts/arm64/overlays modules/dtb/rpi

2020-06-04 Thread Warner Losh
On Thu, Jun 4, 2020 at 7:46 AM Rodney W. Grimes 
wrote:

> > On Thu, Jun 4, 2020 at 7:27 AM Rodney W. Grimes <
> free...@gndrsh.dnsmgr.net>
> > wrote:
> >
> > > > On Thu, Jun 4, 2020 at 7:04 AM Rodney W. Grimes <
> > > free...@gndrsh.dnsmgr.net>
> > > > wrote:
> > > >
> > > > > > On Wed, Jun 3, 2020, 8:10 PM Pedro Giffuni 
> wrote:
> > > > > >
> > > > > > >
> > > > > > > On 03/06/2020 19:59, Oleksandr Tymoshenko wrote:
> > > > > > > > Rodney W. Grimes (free...@gndrsh.dnsmgr.net) wrote:
> > > > > > > >> [ Charset UTF-8 unsupported, converting... ]
> > > > > > > >>> Author: gonzo
> > > > > > > >>> Date: Wed Jun  3 22:18:15 2020
> > > > > > > >>> New Revision: 361775
> > > > > > > >>> URL: https://svnweb.freebsd.org/changeset/base/361775
> > > > > > > >>>
> > > > > > > >>> Log:
> > > > > > > >>>Add spigen overlay for Raspberry Pi 4
> > > > > > > >>>
> > > > > > > >>>Submitted by:gergely.czu...@harmless.hu
> > > > > > > >>>
> > > > > > > >>> Added:
> > > > > > > >>>head/sys/dts/arm64/overlays/spigen-rpi4.dtso
>  (contents,
> > > props
> > > > > > > changed)
> > > > > > > >>> Modified:
> > > > > > > >>>head/sys/modules/dtb/rpi/Makefile
> > > > > > > >>>
> > > > > > > >>> Added: head/sys/dts/arm64/overlays/spigen-rpi4.dtso
> > > > > > > >>>
> > > > > > >
> > > > >
> > >
> ==
> > > > > > > >>> --- /dev/null   00:00:00 1970   (empty, because file is
> > > newly
> > > > > > > added)
> > > > > > > >>> +++ head/sys/dts/arm64/overlays/spigen-rpi4.dtsoWed
> Jun  3
> > > > > > > 22:18:15 2020(r361775)
> > > > > > > >>> @@ -0,0 +1,30 @@
> > > > > > > >>> +/* $FreeBSD$ */
> > > > > > > >> This file needs some form of copyright/license.
> > > > > > > > Whom should I put as a copyright folder, The FreeBSD Project
> or
> > > the
> > > > > > > > person who submitted the patch?
> > > > > > >
> > > > > > > The person that submitted the patch.
> > > > > > >
> > > > > >
> > > > > > If it can be copyrighted.
> > > > > >
> > > > > > Note that the FreeBSD Project is not an entity and cannot hold
> > > > > > > copyrights
> > > > > >
> > > > > >
> > > > > > True, but the FreeBSD Project can be the name in the copyright
> line.
> > > It
> > > > > is
> > > > > > the eponymous author of the FreeBSD collection.
> > > > >
> > > > > Thats a very slippery slope, though US copyright law allows
> pseudonyms
> > > > > as the copyright holder, I know of nothing that allows eponymous
> names.
> > > > > And I do not believe pseudonyms are support in other jurisdiction.
> > > > >
> > > > > https://www.copyright.gov/fls/fl101.pdf
> > > >
> > > >
> > > > It is not. Legally, there's no real difference from a pseudonym and
> an
> > > > eponymous name. How could there be?
> > >
> > > Based on what?   eponymous appears no place in the copyright law, so
> > > I shall strongly disagree with you on that point.
> > >
> >
> > An eponym is a type of pseudonym. It's not a nickname, nor an abbreviated
> > form of a company.
>
> And the usage "The FreeBSD Project" does not meet the definition of
> either:
>
> eponym
>   A person after whom a discovery, invention, place, etc., is named or
> thought to be named.
>
> pseudonym
>   A fictitious name, especially one used by an author.
>
> My keypoint is "A/AN PERSON".
>
> > > I should have added that the project decided, years ago, to only use it
> > > for
> > > > the collection copyright holder in the /COPYRIGHT file. All other
> files
> > >
> > > It appears as if it is used many other places, as my find/grep showed.
> > >
> >
> > Yes. And apart from the 3 files I identified, the others should be
> fixed. I
> > did this the last time we did a sweep maybe in the late 90s / early 2000s
> > based on advice from an IP attorney who specialized in open source. For
> > various reasons, it's fine in the collection copyright context, but we
> > don't want to have it anywhere else if we can help it.
>
> I find it very hard to believe that using anything in 3 copyrights is
> somehow valid if it can not be used in all copyrights.  That,  again,
> is just a slippery slope.
>
> Further, let me speculate, more "Free" advice?  Free legal advice is
> worth exactly what you paid for it, nothing.  Especially if you do not
> have the advice in writting.
>

You are getting quite toxic in your tone. It's quite rude and disrespectful.

You know, as well as anybody, that conversations with lawyers are covered
by attorney client privilege.

But then again, neither one of us are lawyers. Unless I see you working to
fix all the other non-disputed areas, I'm not going to reply further.

Warner



> > Warner
> >
> >
> > > > require an actual copyright holder at the time of submission. The
> project
> > > > generally doesn't track successors in interest, though there are
> > > exceptions
> > > > when the copyright holder themselves make the change.
> > > >
> > > > Warner
> > > >
> > > >
> > > > >
> > > > > > (The Foundation can but 

svn commit: r361790 - head/sbin/ifconfig

2020-06-04 Thread Eugene Grosbein
Author: eugen
Date: Thu Jun  4 14:44:44 2020
New Revision: 361790
URL: https://svnweb.freebsd.org/changeset/base/361790

Log:
  ifconfig(8): make it possible to filter output by interface group.
  
  Now options -g/-G allow to select/unselect interfaces by groups
  in the "ifconfig -a" output just like already existing -d/-u.
  
  Examples:
  
  to exclude loopback from the list: ifconfig -a -G lo
  to show vlan interfaces only: ifconfig -a -g vlan
  to show tap interfaces that are up: ifconfig -aug tap
  
  Arguments to -g/-G may be shell patterns and both may be specified.
  Later options -g/-G override previous ones.
  
  MFC after:2 weeks
  Relnotes: yes
  Differential Revision:https://reviews.freebsd.org/D25029

Modified:
  head/sbin/ifconfig/ifconfig.8
  head/sbin/ifconfig/ifconfig.c

Modified: head/sbin/ifconfig/ifconfig.8
==
--- head/sbin/ifconfig/ifconfig.8   Thu Jun  4 14:15:39 2020
(r361789)
+++ head/sbin/ifconfig/ifconfig.8   Thu Jun  4 14:44:44 2020
(r361790)
@@ -56,6 +56,7 @@
 .Fl a
 .Op Fl L
 .Op Fl d
+.Op Fl [gG] Ar groupname
 .Op Fl m
 .Op Fl u
 .Op Fl v
@@ -2910,9 +2911,26 @@ This flag instructs
 to display information about all interfaces in the system.
 The
 .Fl d
-flag limits this to interfaces that are down, and
+flag limits this to interfaces that are down,
 .Fl u
-limits this to interfaces that are up.
+limits this to interfaces that are up,
+limits this to interfaces that are up,
+.Fl g
+limits this to members of the specified group of interfaces, and
+.Fl G
+excludes members of the specified group from the list.
+Both
+.Fl g
+and
+.Fl G
+flags may be specified to apply both conditions.
+Only one option
+.Fl g
+should be specified as later override previous ones
+(same for
+.Fl G ) .
+.Sy groupname
+may contain shell patterns in which case it should be quoted.
 When no arguments are given,
 .Fl a
 is implied.
@@ -3036,6 +3054,9 @@ Display available wireless networks using
 .Pp
 Display inet and inet6 address subnet masks in CIDR notation
 .Dl # ifconfig -f inet:cidr,inet6:cidr
+.Pp
+Display interfaces that are up with the exception of loopback
+.Dl # ifconfig -a -u -G lo
 .Sh DIAGNOSTICS
 Messages indicating the specified interface does not exist, the
 requested address is unknown, or the user is not privileged and

Modified: head/sbin/ifconfig/ifconfig.c
==
--- head/sbin/ifconfig/ifconfig.c   Thu Jun  4 14:15:39 2020
(r361789)
+++ head/sbin/ifconfig/ifconfig.c   Thu Jun  4 14:44:44 2020
(r361790)
@@ -63,6 +63,7 @@ static const char rcsid[] =
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -105,6 +106,8 @@ int exit_code = 0;
 /* Formatter Strings */
 char   *f_inet, *f_inet6, *f_ether, *f_addr;
 
+static bool group_member(const char *ifname, const char *match,
+   const char *nomatch);
 static int ifconfig(int argc, char *const *argv, int iscreate,
const struct afswtch *afp);
 static void status(const struct afswtch *afp, const struct sockaddr_dl *sdl,
@@ -402,13 +405,14 @@ main(int argc, char *argv[])
char options[1024], *cp, *envformat, *namecp = NULL;
struct ifa_queue q = TAILQ_HEAD_INITIALIZER(q);
struct ifa_order_elt *cur, *tmp;
-   const char *ifname;
+   const char *ifname, *matchgroup, *nogroup;
struct option *p;
size_t iflen;
int flags;
 
all = downonly = uponly = namesonly = noload = verbose = 0;
f_inet = f_inet6 = f_ether = f_addr = NULL;
+   matchgroup = nogroup = NULL;
 
envformat = getenv("IFCONFIG_FORMAT");
if (envformat != NULL)
@@ -421,7 +425,7 @@ main(int argc, char *argv[])
atexit(printifnamemaybe);
 
/* Parse leading line options */
-   strlcpy(options, "f:adklmnuv", sizeof(options));
+   strlcpy(options, "G:adf:klmnuv", sizeof(options));
for (p = opts; p != NULL; p = p->next)
strlcat(options, p->opt, sizeof(options));
while ((c = getopt(argc, argv, options)) != -1) {
@@ -437,6 +441,11 @@ main(int argc, char *argv[])
usage();
setformat(optarg);
break;
+   case 'G':
+   if (optarg == NULL || all == 0)
+   usage();
+   nogroup = optarg;
+   break;
case 'k':
printkeys++;
break;
@@ -455,6 +464,14 @@ main(int argc, char *argv[])
case 'v':
verbose++;
break;
+   case 'g':
+   if (all) {
+   if (optarg == NULL)
+   usage();
+  

Re: svn commit: r361775 - in head/sys: dts/arm64/overlays modules/dtb/rpi

2020-06-04 Thread Warner Losh
I look forward to your working with the contributors of all the other files
to get them corrected. Then we could consider the last three once we come
up with what's more proper than "The FreeBSD Project" for those remaining
cases.

Warner

On Thu, Jun 4, 2020 at 7:46 AM Rodney W. Grimes 
wrote:

> > On Thu, Jun 4, 2020 at 7:27 AM Rodney W. Grimes <
> free...@gndrsh.dnsmgr.net>
> > wrote:
> >
> > > > On Thu, Jun 4, 2020 at 7:04 AM Rodney W. Grimes <
> > > free...@gndrsh.dnsmgr.net>
> > > > wrote:
> > > >
> > > > > > On Wed, Jun 3, 2020, 8:10 PM Pedro Giffuni 
> wrote:
> > > > > >
> > > > > > >
> > > > > > > On 03/06/2020 19:59, Oleksandr Tymoshenko wrote:
> > > > > > > > Rodney W. Grimes (free...@gndrsh.dnsmgr.net) wrote:
> > > > > > > >> [ Charset UTF-8 unsupported, converting... ]
> > > > > > > >>> Author: gonzo
> > > > > > > >>> Date: Wed Jun  3 22:18:15 2020
> > > > > > > >>> New Revision: 361775
> > > > > > > >>> URL: https://svnweb.freebsd.org/changeset/base/361775
> > > > > > > >>>
> > > > > > > >>> Log:
> > > > > > > >>>Add spigen overlay for Raspberry Pi 4
> > > > > > > >>>
> > > > > > > >>>Submitted by:gergely.czu...@harmless.hu
> > > > > > > >>>
> > > > > > > >>> Added:
> > > > > > > >>>head/sys/dts/arm64/overlays/spigen-rpi4.dtso
>  (contents,
> > > props
> > > > > > > changed)
> > > > > > > >>> Modified:
> > > > > > > >>>head/sys/modules/dtb/rpi/Makefile
> > > > > > > >>>
> > > > > > > >>> Added: head/sys/dts/arm64/overlays/spigen-rpi4.dtso
> > > > > > > >>>
> > > > > > >
> > > > >
> > >
> ==
> > > > > > > >>> --- /dev/null   00:00:00 1970   (empty, because file is
> > > newly
> > > > > > > added)
> > > > > > > >>> +++ head/sys/dts/arm64/overlays/spigen-rpi4.dtsoWed
> Jun  3
> > > > > > > 22:18:15 2020(r361775)
> > > > > > > >>> @@ -0,0 +1,30 @@
> > > > > > > >>> +/* $FreeBSD$ */
> > > > > > > >> This file needs some form of copyright/license.
> > > > > > > > Whom should I put as a copyright folder, The FreeBSD Project
> or
> > > the
> > > > > > > > person who submitted the patch?
> > > > > > >
> > > > > > > The person that submitted the patch.
> > > > > > >
> > > > > >
> > > > > > If it can be copyrighted.
> > > > > >
> > > > > > Note that the FreeBSD Project is not an entity and cannot hold
> > > > > > > copyrights
> > > > > >
> > > > > >
> > > > > > True, but the FreeBSD Project can be the name in the copyright
> line.
> > > It
> > > > > is
> > > > > > the eponymous author of the FreeBSD collection.
> > > > >
> > > > > Thats a very slippery slope, though US copyright law allows
> pseudonyms
> > > > > as the copyright holder, I know of nothing that allows eponymous
> names.
> > > > > And I do not believe pseudonyms are support in other jurisdiction.
> > > > >
> > > > > https://www.copyright.gov/fls/fl101.pdf
> > > >
> > > >
> > > > It is not. Legally, there's no real difference from a pseudonym and
> an
> > > > eponymous name. How could there be?
> > >
> > > Based on what?   eponymous appears no place in the copyright law, so
> > > I shall strongly disagree with you on that point.
> > >
> >
> > An eponym is a type of pseudonym. It's not a nickname, nor an abbreviated
> > form of a company.
>
> And the usage "The FreeBSD Project" does not meet the definition of
> either:
>
> eponym
>   A person after whom a discovery, invention, place, etc., is named or
> thought to be named.
>
> pseudonym
>   A fictitious name, especially one used by an author.
>
> My keypoint is "A/AN PERSON".
>
> > > I should have added that the project decided, years ago, to only use it
> > > for
> > > > the collection copyright holder in the /COPYRIGHT file. All other
> files
> > >
> > > It appears as if it is used many other places, as my find/grep showed.
> > >
> >
> > Yes. And apart from the 3 files I identified, the others should be
> fixed. I
> > did this the last time we did a sweep maybe in the late 90s / early 2000s
> > based on advice from an IP attorney who specialized in open source. For
> > various reasons, it's fine in the collection copyright context, but we
> > don't want to have it anywhere else if we can help it.
>
> I find it very hard to believe that using anything in 3 copyrights is
> somehow valid if it can not be used in all copyrights.  That,  again,
> is just a slippery slope.
>
> Further, let me speculate, more "Free" advice?  Free legal advice is
> worth exactly what you paid for it, nothing.  Especially if you do not
> have the advice in writting.
>
> > Warner
> >
> >
> > > > require an actual copyright holder at the time of submission. The
> project
> > > > generally doesn't track successors in interest, though there are
> > > exceptions
> > > > when the copyright holder themselves make the change.
> > > >
> > > > Warner
> > > >
> > > >
> > > > >
> > > > > > (The Foundation can but unless they sponsored it, that
> > > > > > > usually involves paperwork).
> > > > > > >
> > > > > >
> > 

svn commit: r361789 - head/sys/netpfil/ipfw

2020-06-04 Thread Eugene Grosbein
Author: eugen
Date: Thu Jun  4 14:15:39 2020
New Revision: 361789
URL: https://svnweb.freebsd.org/changeset/base/361789

Log:
  ipfw: unbreak matching with big table type flow.
  
  Test case:
  
  # n=32769
  # ipfw -q table 1 create type flow:proto,dst-ip,dst-port
  # jot -w 'table 1 add tcp,127.0.0.1,' $n 1 | ipfw -q /dev/stdin
  # ipfw -q add 5 unreach filter-prohib flow 'table(1)'
  
  The rule 5 matches nothing without the fix if n>=32769.
  
  With the fix, it works:
  # telnet localhost 10001
  Trying 127.0.0.1...
  telnet: connect to address 127.0.0.1: Permission denied
  telnet: Unable to connect to remote host
  
  MFC after:2 weeks
  Discussed with: ae, melifaro

Modified:
  head/sys/netpfil/ipfw/ip_fw_table_algo.c

Modified: head/sys/netpfil/ipfw/ip_fw_table_algo.c
==
--- head/sys/netpfil/ipfw/ip_fw_table_algo.cThu Jun  4 13:18:21 2020
(r361788)
+++ head/sys/netpfil/ipfw/ip_fw_table_algo.cThu Jun  4 14:15:39 2020
(r361789)
@@ -3204,7 +3204,8 @@ ta_lookup_fhash(struct table_info *ti, void *key, uint
struct fhashentry *ent;
struct fhashentry4 *m4;
struct ipfw_flow_id *id;
-   uint16_t hash, hsize;
+   uint32_t hsize;
+   uint16_t hash;
 
id = (struct ipfw_flow_id *)key;
head = (struct fhashbhead *)ti->state;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r361783 - head/usr.bin/killall

2020-06-04 Thread Conrad Meyer
On Thu, Jun 4, 2020 at 3:43 AM Eugene Grosbein  wrote:
>
> 04.06.2020 11:29, Benjamin Kaduk wrote:
> > --- head/usr.bin/killall/killall.1Thu Jun  4 02:36:41 2020
> > (r361782)
> > +++ head/usr.bin/killall/killall.1Thu Jun  4 04:29:43 2020
> > (r361783)
> > @@ -145,6 +145,50 @@ utility exits 0 if some processes have been found and
> >  signalled successfully.
> >  Otherwise, a status of 1 will be
> >  returned.
> > +.Sh EXAMPLES
> > +Send
> > +.Dv SIGTERM
> > +to all firefox processes:
> > +.Bd -literal -offset indent
> > +killall firefox
> > +.Ed
> > +.Pp
> > +Send
> > +.Dv SIGTERM
> > +to firefox processes belonging to
> > +.Va USER :
> > +.Bd -literal -offset indent
> > +killall -u ${USER} firefox
> > +.Ed
> > +.Pp
> > +Stop all firefox processes:
> > +.Bd -literal -offset indent
> > +killall -SIGSTOP firefox
> > +.Ed
> > +.Pp
> > +Resume firefox processes:
> > +.Bd -literal -offset indent
> > +killall -SIGCONT firefox
> > +.Ed
> > +.Pp
> > +Show what would be done to firefox processes, but do not actually signal 
> > them:
> > +.Bd -literal -offset indent
> > +killall -s firefox
> > +.Ed
>
> "Firefox" is a trade mark (type of intellectual property) of Mozilla 
> Foundation.
> Is it OK for us to use this name such way?

Yes.  You can of course refer to trademarks in writing, or else no one
could write news or blog about Firefox™, Chrome™, Windows™, Linux™, or
even FreeBSD™.  There is no likelihood of confusion with the firefox
product or dilution of the trademark, and the use is non-commerical.

Conrad
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r361775 - in head/sys: dts/arm64/overlays modules/dtb/rpi

2020-06-04 Thread Rodney W. Grimes
> On Thu, Jun 4, 2020 at 7:27 AM Rodney W. Grimes 
> wrote:
> 
> > > On Thu, Jun 4, 2020 at 7:04 AM Rodney W. Grimes <
> > free...@gndrsh.dnsmgr.net>
> > > wrote:
> > >
> > > > > On Wed, Jun 3, 2020, 8:10 PM Pedro Giffuni  wrote:
> > > > >
> > > > > >
> > > > > > On 03/06/2020 19:59, Oleksandr Tymoshenko wrote:
> > > > > > > Rodney W. Grimes (free...@gndrsh.dnsmgr.net) wrote:
> > > > > > >> [ Charset UTF-8 unsupported, converting... ]
> > > > > > >>> Author: gonzo
> > > > > > >>> Date: Wed Jun  3 22:18:15 2020
> > > > > > >>> New Revision: 361775
> > > > > > >>> URL: https://svnweb.freebsd.org/changeset/base/361775
> > > > > > >>>
> > > > > > >>> Log:
> > > > > > >>>Add spigen overlay for Raspberry Pi 4
> > > > > > >>>
> > > > > > >>>Submitted by:gergely.czu...@harmless.hu
> > > > > > >>>
> > > > > > >>> Added:
> > > > > > >>>head/sys/dts/arm64/overlays/spigen-rpi4.dtso   (contents,
> > props
> > > > > > changed)
> > > > > > >>> Modified:
> > > > > > >>>head/sys/modules/dtb/rpi/Makefile
> > > > > > >>>
> > > > > > >>> Added: head/sys/dts/arm64/overlays/spigen-rpi4.dtso
> > > > > > >>>
> > > > > >
> > > >
> > ==
> > > > > > >>> --- /dev/null   00:00:00 1970   (empty, because file is
> > newly
> > > > > > added)
> > > > > > >>> +++ head/sys/dts/arm64/overlays/spigen-rpi4.dtsoWed Jun  3
> > > > > > 22:18:15 2020(r361775)
> > > > > > >>> @@ -0,0 +1,30 @@
> > > > > > >>> +/* $FreeBSD$ */
> > > > > > >> This file needs some form of copyright/license.
> > > > > > > Whom should I put as a copyright folder, The FreeBSD Project or
> > the
> > > > > > > person who submitted the patch?
> > > > > >
> > > > > > The person that submitted the patch.
> > > > > >
> > > > >
> > > > > If it can be copyrighted.
> > > > >
> > > > > Note that the FreeBSD Project is not an entity and cannot hold
> > > > > > copyrights
> > > > >
> > > > >
> > > > > True, but the FreeBSD Project can be the name in the copyright line.
> > It
> > > > is
> > > > > the eponymous author of the FreeBSD collection.
> > > >
> > > > Thats a very slippery slope, though US copyright law allows pseudonyms
> > > > as the copyright holder, I know of nothing that allows eponymous names.
> > > > And I do not believe pseudonyms are support in other jurisdiction.
> > > >
> > > > https://www.copyright.gov/fls/fl101.pdf
> > >
> > >
> > > It is not. Legally, there's no real difference from a pseudonym and an
> > > eponymous name. How could there be?
> >
> > Based on what?   eponymous appears no place in the copyright law, so
> > I shall strongly disagree with you on that point.
> >
> 
> An eponym is a type of pseudonym. It's not a nickname, nor an abbreviated
> form of a company.

And the usage "The FreeBSD Project" does not meet the definition of
either:

eponym
  A person after whom a discovery, invention, place, etc., is named or thought 
to be named.

pseudonym
  A fictitious name, especially one used by an author.

My keypoint is "A/AN PERSON".   

> > I should have added that the project decided, years ago, to only use it
> > for
> > > the collection copyright holder in the /COPYRIGHT file. All other files
> >
> > It appears as if it is used many other places, as my find/grep showed.
> >
> 
> Yes. And apart from the 3 files I identified, the others should be fixed. I
> did this the last time we did a sweep maybe in the late 90s / early 2000s
> based on advice from an IP attorney who specialized in open source. For
> various reasons, it's fine in the collection copyright context, but we
> don't want to have it anywhere else if we can help it.

I find it very hard to believe that using anything in 3 copyrights is
somehow valid if it can not be used in all copyrights.  That,  again,
is just a slippery slope.

Further, let me speculate, more "Free" advice?  Free legal advice is
worth exactly what you paid for it, nothing.  Especially if you do not
have the advice in writting.

> Warner
> 
> 
> > > require an actual copyright holder at the time of submission. The project
> > > generally doesn't track successors in interest, though there are
> > exceptions
> > > when the copyright holder themselves make the change.
> > >
> > > Warner
> > >
> > >
> > > >
> > > > > (The Foundation can but unless they sponsored it, that
> > > > > > usually involves paperwork).
> > > > > >
> > > > >
> > > > > Yup.
> > > > >
> > > > > Warner
> > > > >
> > > > > > Pedro.
> > > > > >
> > > > > >
> > > >
> > > > --
> > > > Rod Grimes
> > > > rgri...@freebsd.org
> > > >
> >
> > --
> > Rod Grimes
> > rgri...@freebsd.org
> >

-- 
Rod Grimes rgri...@freebsd.org
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r361775 - in head/sys: dts/arm64/overlays modules/dtb/rpi

2020-06-04 Thread Warner Losh
On Thu, Jun 4, 2020 at 7:37 AM Rodney W. Grimes 
wrote:

> > On Thu, Jun 4, 2020 at 6:54 AM Rodney W. Grimes <
> free...@gndrsh.dnsmgr.net>
> > wrote:
> >
> > > >
> > > > On 03/06/2020 19:59, Oleksandr Tymoshenko wrote:
> > > > > Rodney W. Grimes (free...@gndrsh.dnsmgr.net) wrote:
> > > > >> [ Charset UTF-8 unsupported, converting... ]
> > > > >>> Author: gonzo
> > > > >>> Date: Wed Jun  3 22:18:15 2020
> > > > >>> New Revision: 361775
> > > > >>> URL: https://svnweb.freebsd.org/changeset/base/361775
> > > > >>>
> > > > >>> Log:
> > > > >>>Add spigen overlay for Raspberry Pi 4
> > > > >>>
> > > > >>>Submitted by:  gergely.czu...@harmless.hu
> > > > >>>
> > > > >>> Added:
> > > > >>>head/sys/dts/arm64/overlays/spigen-rpi4.dtso   (contents,
> props
> > > changed)
> > > > >>> Modified:
> > > > >>>head/sys/modules/dtb/rpi/Makefile
> > > > >>>
> > > > >>> Added: head/sys/dts/arm64/overlays/spigen-rpi4.dtso
> > > > >>>
> > >
> ==
> > > > >>> --- /dev/null 00:00:00 1970   (empty, because file is newly
> > > added)
> > > > >>> +++ head/sys/dts/arm64/overlays/spigen-rpi4.dtso  Wed Jun  3
> > > 22:18:15 2020(r361775)
> > > > >>> @@ -0,0 +1,30 @@
> > > > >>> +/* $FreeBSD$ */
> > > > >> This file needs some form of copyright/license.
> > > > > Whom should I put as a copyright folder, The FreeBSD Project or the
> > > > > person who submitted the patch?
> > > >
> > > > The person that submitted the patch.
> > > >
> > > > Note that the FreeBSD Project is not an entity and cannot hold
> > > > copyrights (The Foundation can but unless they sponsored it, that
> > > > usually involves paperwork).
> > >
> > > I am glad at least one other person understands that point in law:
> > >
> > > :root {1002}# find . -type f | xargs grep Copyright | grep -i freebsd |
> > > grep -i project
> > > ./cddl/compat/opensolaris/kern/opensolaris_dtrace.c: * Copyright 2014
> The
> > > FreeBSD Project.
> > > ./net/if_enc.h: * Copyright (c) 2008 The FreeBSD Project.
> > > ./net/if_enc.c: * Copyright (c) 2006 The FreeBSD Project.
> > > ./kern/kern_idle.c: * Copyright (C) 2000-2004 The FreeBSD Project. All
> > > rights reserved.
> >
> > ./kern/subr_kdb.c: * Copyright (c) 2004 The FreeBSD Project
> > >
> >
> > These should be changed to the actual author.
> >
> >
> > > ./conf/newvers.sh:  year=$(sed -Ee '/^Copyright .* The FreeBSD
> > > Project/!d;s/^.*1992-([0-9]*) .*$/\1/g' ${SYSDIR}/../COPYRIGHT)
> > > ./conf/newvers.sh: * Copyright (c) 1992-$year The FreeBSD Project.
> > > ./sys/copyright.h: * Copyright (C) 1992-2018 The FreeBSD Project. All
> > > rights reserved.
> > > ./sys/copyright.h:  "Copyright (c) 1992-2019 The FreeBSD
> Project.\n"
> > > ^^^  The copyright we spit out on every boot :-(
> > >
> >
> > These four are fine. They were cleared by lawyers long ago. This is a
> point
> > that was extensively litigated during your absence and has been settled
>
> There was a lawsuit?
>
> Cleared by which lawyers, you have some documentation of opinion?
>

There was no lawsuit. I have no written documentation of my conversations.
Others were involved in the discussions and the one clear item was for the
collection copyright it's fine, since that doesn't protect much since we
allow anybody to copy it (the FreeBSD trademark protects much more). For
other files, it's not fine because you want traceability to the original
sources should there be a dispute about a specific technology.


> > practice for a long, long time. Those four instances and /COPYRIGHT are
> the
> > only places in the tree we should have this, however.
>
> One can operate outside the law... until one gets caught.  As can be
> seen just having this copyright statement in the tree has lead to others
> to copy it thinking it was ok, and those "tending the house" did not
> catch it.
>

Yes. We didn't. We're not perfect. Now that you've found it, it would be
great if you took the initiative to fix the other instances in the tree by
digging into svn, contacting the original authors and asking for permission
to make the appropriate changes. If you expect someone else to do that
work, you'll likely be disappointed.

Warner


> >
> > ./compat/linux/linux_uid16.c: * Copyright (c) 2001  The FreeBSD Project
> > > ./tools/embed_mfs.sh:# Copyright (C) 2008 The FreeBSD Project. All
> rights
> > > reserved.
> > > ./dev/mfi/mfi_syspd.c: *Copyright 1994-2009 The FreeBSD
> > > Project.
> > > ./dev/mfi/mfi_tbolt.c: *Copyright 1994-2009 The FreeBSD
> > > Project.
> > > ./dev/chromebook_platform/chromebook_platform.c: * Copyright (c) 2016
> The
> > > FreeBSD Project.
> > > ./dev/pccard/pccarddevs: * Copyright (c) 1999-2004 The FreeBSD Project.
> > > ./dev/tdfx/tdfx_linux.c: * Copyright (c) 2006 The FreeBSD Project
> > > ./powerpc/powerpc/uma_machdep.c: * Copyright (c) 2003 The FreeBSD
> Project
> > > ./libkern/memset.c: * Copyright (C) 1992-2007 The FreeBSD Project. 

Re: svn commit: r361775 - in head/sys: dts/arm64/overlays modules/dtb/rpi

2020-06-04 Thread Warner Losh
On Thu, Jun 4, 2020 at 7:27 AM Rodney W. Grimes 
wrote:

> > On Thu, Jun 4, 2020 at 7:04 AM Rodney W. Grimes <
> free...@gndrsh.dnsmgr.net>
> > wrote:
> >
> > > > On Wed, Jun 3, 2020, 8:10 PM Pedro Giffuni  wrote:
> > > >
> > > > >
> > > > > On 03/06/2020 19:59, Oleksandr Tymoshenko wrote:
> > > > > > Rodney W. Grimes (free...@gndrsh.dnsmgr.net) wrote:
> > > > > >> [ Charset UTF-8 unsupported, converting... ]
> > > > > >>> Author: gonzo
> > > > > >>> Date: Wed Jun  3 22:18:15 2020
> > > > > >>> New Revision: 361775
> > > > > >>> URL: https://svnweb.freebsd.org/changeset/base/361775
> > > > > >>>
> > > > > >>> Log:
> > > > > >>>Add spigen overlay for Raspberry Pi 4
> > > > > >>>
> > > > > >>>Submitted by:gergely.czu...@harmless.hu
> > > > > >>>
> > > > > >>> Added:
> > > > > >>>head/sys/dts/arm64/overlays/spigen-rpi4.dtso   (contents,
> props
> > > > > changed)
> > > > > >>> Modified:
> > > > > >>>head/sys/modules/dtb/rpi/Makefile
> > > > > >>>
> > > > > >>> Added: head/sys/dts/arm64/overlays/spigen-rpi4.dtso
> > > > > >>>
> > > > >
> > >
> ==
> > > > > >>> --- /dev/null   00:00:00 1970   (empty, because file is
> newly
> > > > > added)
> > > > > >>> +++ head/sys/dts/arm64/overlays/spigen-rpi4.dtsoWed Jun  3
> > > > > 22:18:15 2020(r361775)
> > > > > >>> @@ -0,0 +1,30 @@
> > > > > >>> +/* $FreeBSD$ */
> > > > > >> This file needs some form of copyright/license.
> > > > > > Whom should I put as a copyright folder, The FreeBSD Project or
> the
> > > > > > person who submitted the patch?
> > > > >
> > > > > The person that submitted the patch.
> > > > >
> > > >
> > > > If it can be copyrighted.
> > > >
> > > > Note that the FreeBSD Project is not an entity and cannot hold
> > > > > copyrights
> > > >
> > > >
> > > > True, but the FreeBSD Project can be the name in the copyright line.
> It
> > > is
> > > > the eponymous author of the FreeBSD collection.
> > >
> > > Thats a very slippery slope, though US copyright law allows pseudonyms
> > > as the copyright holder, I know of nothing that allows eponymous names.
> > > And I do not believe pseudonyms are support in other jurisdiction.
> > >
> > > https://www.copyright.gov/fls/fl101.pdf
> >
> >
> > It is not. Legally, there's no real difference from a pseudonym and an
> > eponymous name. How could there be?
>
> Based on what?   eponymous appears no place in the copyright law, so
> I shall strongly disagree with you on that point.
>

An eponym is a type of pseudonym. It's not a nickname, nor an abbreviated
form of a company.

> I should have added that the project decided, years ago, to only use it
> for
> > the collection copyright holder in the /COPYRIGHT file. All other files
>
> It appears as if it is used many other places, as my find/grep showed.
>

Yes. And apart from the 3 files I identified, the others should be fixed. I
did this the last time we did a sweep maybe in the late 90s / early 2000s
based on advice from an IP attorney who specialized in open source. For
various reasons, it's fine in the collection copyright context, but we
don't want to have it anywhere else if we can help it.

Warner


> > require an actual copyright holder at the time of submission. The project
> > generally doesn't track successors in interest, though there are
> exceptions
> > when the copyright holder themselves make the change.
> >
> > Warner
> >
> >
> > >
> > > > (The Foundation can but unless they sponsored it, that
> > > > > usually involves paperwork).
> > > > >
> > > >
> > > > Yup.
> > > >
> > > > Warner
> > > >
> > > > > Pedro.
> > > > >
> > > > >
> > >
> > > --
> > > Rod Grimes
> > > rgri...@freebsd.org
> > >
>
> --
> Rod Grimes
> rgri...@freebsd.org
>
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r361775 - in head/sys: dts/arm64/overlays modules/dtb/rpi

2020-06-04 Thread Rodney W. Grimes
> On Thu, Jun 4, 2020 at 6:54 AM Rodney W. Grimes 
> wrote:
> 
> > >
> > > On 03/06/2020 19:59, Oleksandr Tymoshenko wrote:
> > > > Rodney W. Grimes (free...@gndrsh.dnsmgr.net) wrote:
> > > >> [ Charset UTF-8 unsupported, converting... ]
> > > >>> Author: gonzo
> > > >>> Date: Wed Jun  3 22:18:15 2020
> > > >>> New Revision: 361775
> > > >>> URL: https://svnweb.freebsd.org/changeset/base/361775
> > > >>>
> > > >>> Log:
> > > >>>Add spigen overlay for Raspberry Pi 4
> > > >>>
> > > >>>Submitted by:  gergely.czu...@harmless.hu
> > > >>>
> > > >>> Added:
> > > >>>head/sys/dts/arm64/overlays/spigen-rpi4.dtso   (contents, props
> > changed)
> > > >>> Modified:
> > > >>>head/sys/modules/dtb/rpi/Makefile
> > > >>>
> > > >>> Added: head/sys/dts/arm64/overlays/spigen-rpi4.dtso
> > > >>>
> > ==
> > > >>> --- /dev/null 00:00:00 1970   (empty, because file is newly
> > added)
> > > >>> +++ head/sys/dts/arm64/overlays/spigen-rpi4.dtso  Wed Jun  3
> > 22:18:15 2020(r361775)
> > > >>> @@ -0,0 +1,30 @@
> > > >>> +/* $FreeBSD$ */
> > > >> This file needs some form of copyright/license.
> > > > Whom should I put as a copyright folder, The FreeBSD Project or the
> > > > person who submitted the patch?
> > >
> > > The person that submitted the patch.
> > >
> > > Note that the FreeBSD Project is not an entity and cannot hold
> > > copyrights (The Foundation can but unless they sponsored it, that
> > > usually involves paperwork).
> >
> > I am glad at least one other person understands that point in law:
> >
> > :root {1002}# find . -type f | xargs grep Copyright | grep -i freebsd |
> > grep -i project
> > ./cddl/compat/opensolaris/kern/opensolaris_dtrace.c: * Copyright 2014 The
> > FreeBSD Project.
> > ./net/if_enc.h: * Copyright (c) 2008 The FreeBSD Project.
> > ./net/if_enc.c: * Copyright (c) 2006 The FreeBSD Project.
> > ./kern/kern_idle.c: * Copyright (C) 2000-2004 The FreeBSD Project. All
> > rights reserved.
> 
> ./kern/subr_kdb.c: * Copyright (c) 2004 The FreeBSD Project
> >
> 
> These should be changed to the actual author.
> 
> 
> > ./conf/newvers.sh:  year=$(sed -Ee '/^Copyright .* The FreeBSD
> > Project/!d;s/^.*1992-([0-9]*) .*$/\1/g' ${SYSDIR}/../COPYRIGHT)
> > ./conf/newvers.sh: * Copyright (c) 1992-$year The FreeBSD Project.
> > ./sys/copyright.h: * Copyright (C) 1992-2018 The FreeBSD Project. All
> > rights reserved.
> > ./sys/copyright.h:  "Copyright (c) 1992-2019 The FreeBSD Project.\n"
> > ^^^  The copyright we spit out on every boot :-(
> >
> 
> These four are fine. They were cleared by lawyers long ago. This is a point
> that was extensively litigated during your absence and has been settled

There was a lawsuit?  

Cleared by which lawyers, you have some documentation of opinion?

> practice for a long, long time. Those four instances and /COPYRIGHT are the
> only places in the tree we should have this, however.

One can operate outside the law... until one gets caught.  As can be
seen just having this copyright statement in the tree has lead to others
to copy it thinking it was ok, and those "tending the house" did not
catch it.

> 
> ./compat/linux/linux_uid16.c: * Copyright (c) 2001  The FreeBSD Project
> > ./tools/embed_mfs.sh:# Copyright (C) 2008 The FreeBSD Project. All rights
> > reserved.
> > ./dev/mfi/mfi_syspd.c: *Copyright 1994-2009 The FreeBSD
> > Project.
> > ./dev/mfi/mfi_tbolt.c: *Copyright 1994-2009 The FreeBSD
> > Project.
> > ./dev/chromebook_platform/chromebook_platform.c: * Copyright (c) 2016 The
> > FreeBSD Project.
> > ./dev/pccard/pccarddevs: * Copyright (c) 1999-2004 The FreeBSD Project.
> > ./dev/tdfx/tdfx_linux.c: * Copyright (c) 2006 The FreeBSD Project
> > ./powerpc/powerpc/uma_machdep.c: * Copyright (c) 2003 The FreeBSD Project
> > ./libkern/memset.c: * Copyright (C) 1992-2007 The FreeBSD Project. All
> > rights reserved.
> >
> 
> These are also not fine and should be similarly changed.
> 
> It would be a great project for someone to do the svn diving and find who
> committed those files originally and correct it.
> 
> Warner
> > > Pedro.
> > --
> > Rod Grimes
> > rgri...@freebsd.org
-- 
Rod Grimes rgri...@freebsd.org
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r361775 - in head/sys: dts/arm64/overlays modules/dtb/rpi

2020-06-04 Thread Warner Losh
On Thu, Jun 4, 2020 at 6:54 AM Rodney W. Grimes 
wrote:

> >
> > On 03/06/2020 19:59, Oleksandr Tymoshenko wrote:
> > > Rodney W. Grimes (free...@gndrsh.dnsmgr.net) wrote:
> > >> [ Charset UTF-8 unsupported, converting... ]
> > >>> Author: gonzo
> > >>> Date: Wed Jun  3 22:18:15 2020
> > >>> New Revision: 361775
> > >>> URL: https://svnweb.freebsd.org/changeset/base/361775
> > >>>
> > >>> Log:
> > >>>Add spigen overlay for Raspberry Pi 4
> > >>>
> > >>>Submitted by:  gergely.czu...@harmless.hu
> > >>>
> > >>> Added:
> > >>>head/sys/dts/arm64/overlays/spigen-rpi4.dtso   (contents, props
> changed)
> > >>> Modified:
> > >>>head/sys/modules/dtb/rpi/Makefile
> > >>>
> > >>> Added: head/sys/dts/arm64/overlays/spigen-rpi4.dtso
> > >>>
> ==
> > >>> --- /dev/null 00:00:00 1970   (empty, because file is newly
> added)
> > >>> +++ head/sys/dts/arm64/overlays/spigen-rpi4.dtso  Wed Jun  3
> 22:18:15 2020(r361775)
> > >>> @@ -0,0 +1,30 @@
> > >>> +/* $FreeBSD$ */
> > >> This file needs some form of copyright/license.
> > > Whom should I put as a copyright folder, The FreeBSD Project or the
> > > person who submitted the patch?
> >
> > The person that submitted the patch.
> >
> > Note that the FreeBSD Project is not an entity and cannot hold
> > copyrights (The Foundation can but unless they sponsored it, that
> > usually involves paperwork).
>
> I am glad at least one other person understands that point in law:
>
> :root {1002}# find . -type f | xargs grep Copyright | grep -i freebsd |
> grep -i project
> ./cddl/compat/opensolaris/kern/opensolaris_dtrace.c: * Copyright 2014 The
> FreeBSD Project.
> ./net/if_enc.h: * Copyright (c) 2008 The FreeBSD Project.
> ./net/if_enc.c: * Copyright (c) 2006 The FreeBSD Project.
> ./kern/kern_idle.c: * Copyright (C) 2000-2004 The FreeBSD Project. All
> rights reserved.

./kern/subr_kdb.c: * Copyright (c) 2004 The FreeBSD Project
>

These should be changed to the actual author.


> ./conf/newvers.sh:  year=$(sed -Ee '/^Copyright .* The FreeBSD
> Project/!d;s/^.*1992-([0-9]*) .*$/\1/g' ${SYSDIR}/../COPYRIGHT)
> ./conf/newvers.sh: * Copyright (c) 1992-$year The FreeBSD Project.
> ./sys/copyright.h: * Copyright (C) 1992-2018 The FreeBSD Project. All
> rights reserved.
> ./sys/copyright.h:  "Copyright (c) 1992-2019 The FreeBSD Project.\n"
> ^^^  The copyright we spit out on every boot :-(
>

These four are fine. They were cleared by lawyers long ago. This is a point
that was extensively litigated during your absence and has been settled
practice for a long, long time. Those four instances and /COPYRIGHT are the
only places in the tree we should have this, however.

./compat/linux/linux_uid16.c: * Copyright (c) 2001  The FreeBSD Project
> ./tools/embed_mfs.sh:# Copyright (C) 2008 The FreeBSD Project. All rights
> reserved.
> ./dev/mfi/mfi_syspd.c: *Copyright 1994-2009 The FreeBSD
> Project.
> ./dev/mfi/mfi_tbolt.c: *Copyright 1994-2009 The FreeBSD
> Project.
> ./dev/chromebook_platform/chromebook_platform.c: * Copyright (c) 2016 The
> FreeBSD Project.
> ./dev/pccard/pccarddevs: * Copyright (c) 1999-2004 The FreeBSD Project.
> ./dev/tdfx/tdfx_linux.c: * Copyright (c) 2006 The FreeBSD Project
> ./powerpc/powerpc/uma_machdep.c: * Copyright (c) 2003 The FreeBSD Project
> ./libkern/memset.c: * Copyright (C) 1992-2007 The FreeBSD Project. All
> rights reserved.
>

These are also not fine and should be similarly changed.

It would be a great project for someone to do the svn diving and find who
committed those files originally and correct it.

Warner


> >
> > Pedro.
> >
> >
>
> --
> Rod Grimes
> rgri...@freebsd.org
>
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r361775 - in head/sys: dts/arm64/overlays modules/dtb/rpi

2020-06-04 Thread Rodney W. Grimes
> On Thu, Jun 4, 2020 at 7:04 AM Rodney W. Grimes 
> wrote:
> 
> > > On Wed, Jun 3, 2020, 8:10 PM Pedro Giffuni  wrote:
> > >
> > > >
> > > > On 03/06/2020 19:59, Oleksandr Tymoshenko wrote:
> > > > > Rodney W. Grimes (free...@gndrsh.dnsmgr.net) wrote:
> > > > >> [ Charset UTF-8 unsupported, converting... ]
> > > > >>> Author: gonzo
> > > > >>> Date: Wed Jun  3 22:18:15 2020
> > > > >>> New Revision: 361775
> > > > >>> URL: https://svnweb.freebsd.org/changeset/base/361775
> > > > >>>
> > > > >>> Log:
> > > > >>>Add spigen overlay for Raspberry Pi 4
> > > > >>>
> > > > >>>Submitted by:gergely.czu...@harmless.hu
> > > > >>>
> > > > >>> Added:
> > > > >>>head/sys/dts/arm64/overlays/spigen-rpi4.dtso   (contents, props
> > > > changed)
> > > > >>> Modified:
> > > > >>>head/sys/modules/dtb/rpi/Makefile
> > > > >>>
> > > > >>> Added: head/sys/dts/arm64/overlays/spigen-rpi4.dtso
> > > > >>>
> > > >
> > ==
> > > > >>> --- /dev/null   00:00:00 1970   (empty, because file is newly
> > > > added)
> > > > >>> +++ head/sys/dts/arm64/overlays/spigen-rpi4.dtsoWed Jun  3
> > > > 22:18:15 2020(r361775)
> > > > >>> @@ -0,0 +1,30 @@
> > > > >>> +/* $FreeBSD$ */
> > > > >> This file needs some form of copyright/license.
> > > > > Whom should I put as a copyright folder, The FreeBSD Project or the
> > > > > person who submitted the patch?
> > > >
> > > > The person that submitted the patch.
> > > >
> > >
> > > If it can be copyrighted.
> > >
> > > Note that the FreeBSD Project is not an entity and cannot hold
> > > > copyrights
> > >
> > >
> > > True, but the FreeBSD Project can be the name in the copyright line. It
> > is
> > > the eponymous author of the FreeBSD collection.
> >
> > Thats a very slippery slope, though US copyright law allows pseudonyms
> > as the copyright holder, I know of nothing that allows eponymous names.
> > And I do not believe pseudonyms are support in other jurisdiction.
> >
> > https://www.copyright.gov/fls/fl101.pdf
> 
> 
> It is not. Legally, there's no real difference from a pseudonym and an
> eponymous name. How could there be?

Based on what?   eponymous appears no place in the copyright law, so
I shall strongly disagree with you on that point.

> 
> I should have added that the project decided, years ago, to only use it for
> the collection copyright holder in the /COPYRIGHT file. All other files

It appears as if it is used many other places, as my find/grep showed.

> require an actual copyright holder at the time of submission. The project
> generally doesn't track successors in interest, though there are exceptions
> when the copyright holder themselves make the change.
> 
> Warner
> 
> 
> >
> > > (The Foundation can but unless they sponsored it, that
> > > > usually involves paperwork).
> > > >
> > >
> > > Yup.
> > >
> > > Warner
> > >
> > > > Pedro.
> > > >
> > > >
> >
> > --
> > Rod Grimes
> > rgri...@freebsd.org
> >

-- 
Rod Grimes rgri...@freebsd.org
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r361787 - head/sbin/ifconfig

2020-06-04 Thread Andriy Gapon
On 04/06/2020 16:06, Andriy Gapon wrote:
> +Channel agility.
> +.It Li B
> +PBCC modulation.
> +.It Li C
> +Poll request capability.

I would like to invite anyone who can expand short descriptions like the above
to do so.

-- 
Andriy Gapon
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r361775 - in head/sys: dts/arm64/overlays modules/dtb/rpi

2020-06-04 Thread Warner Losh
On Thu, Jun 4, 2020 at 7:04 AM Rodney W. Grimes 
wrote:

> > On Wed, Jun 3, 2020, 8:10 PM Pedro Giffuni  wrote:
> >
> > >
> > > On 03/06/2020 19:59, Oleksandr Tymoshenko wrote:
> > > > Rodney W. Grimes (free...@gndrsh.dnsmgr.net) wrote:
> > > >> [ Charset UTF-8 unsupported, converting... ]
> > > >>> Author: gonzo
> > > >>> Date: Wed Jun  3 22:18:15 2020
> > > >>> New Revision: 361775
> > > >>> URL: https://svnweb.freebsd.org/changeset/base/361775
> > > >>>
> > > >>> Log:
> > > >>>Add spigen overlay for Raspberry Pi 4
> > > >>>
> > > >>>Submitted by:gergely.czu...@harmless.hu
> > > >>>
> > > >>> Added:
> > > >>>head/sys/dts/arm64/overlays/spigen-rpi4.dtso   (contents, props
> > > changed)
> > > >>> Modified:
> > > >>>head/sys/modules/dtb/rpi/Makefile
> > > >>>
> > > >>> Added: head/sys/dts/arm64/overlays/spigen-rpi4.dtso
> > > >>>
> > >
> ==
> > > >>> --- /dev/null   00:00:00 1970   (empty, because file is newly
> > > added)
> > > >>> +++ head/sys/dts/arm64/overlays/spigen-rpi4.dtsoWed Jun  3
> > > 22:18:15 2020(r361775)
> > > >>> @@ -0,0 +1,30 @@
> > > >>> +/* $FreeBSD$ */
> > > >> This file needs some form of copyright/license.
> > > > Whom should I put as a copyright folder, The FreeBSD Project or the
> > > > person who submitted the patch?
> > >
> > > The person that submitted the patch.
> > >
> >
> > If it can be copyrighted.
> >
> > Note that the FreeBSD Project is not an entity and cannot hold
> > > copyrights
> >
> >
> > True, but the FreeBSD Project can be the name in the copyright line. It
> is
> > the eponymous author of the FreeBSD collection.
>
> Thats a very slippery slope, though US copyright law allows pseudonyms
> as the copyright holder, I know of nothing that allows eponymous names.
> And I do not believe pseudonyms are support in other jurisdiction.
>
> https://www.copyright.gov/fls/fl101.pdf


It is not. Legally, there's no real difference from a pseudonym and an
eponymous name. How could there be?

I should have added that the project decided, years ago, to only use it for
the collection copyright holder in the /COPYRIGHT file. All other files
require an actual copyright holder at the time of submission. The project
generally doesn't track successors in interest, though there are exceptions
when the copyright holder themselves make the change.

Warner


>
> > (The Foundation can but unless they sponsored it, that
> > > usually involves paperwork).
> > >
> >
> > Yup.
> >
> > Warner
> >
> > > Pedro.
> > >
> > >
>
> --
> Rod Grimes
> rgri...@freebsd.org
>
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r361788 - head/sys/dev/superio

2020-06-04 Thread Andriy Gapon
Author: avg
Date: Thu Jun  4 13:18:21 2020
New Revision: 361788
URL: https://svnweb.freebsd.org/changeset/base/361788

Log:
  superio: do not assume that current LDN cannot change after config exit
  
  That assumption should be true when superio(4) uses the hardware
  exlusively.  But it turns out to not hold on some real systems.
  So, err on the side of correctness rather than performance.
  Clear current_ldn in sio_conf_exit.
  
  Reported by:  bz
  Tested by:bz
  MFC after:1 week

Modified:
  head/sys/dev/superio/superio.c

Modified: head/sys/dev/superio/superio.c
==
--- head/sys/dev/superio/superio.c  Thu Jun  4 13:06:49 2020
(r361787)
+++ head/sys/dev/superio/superio.c  Thu Jun  4 13:18:21 2020
(r361788)
@@ -190,6 +190,7 @@ static void
 sio_conf_exit(struct siosc *sc)
 {
sc->methods->exit(sc->io_res, sc->io_port);
+   sc->current_ldn = 0xff;
mtx_unlock(>conf_lock);
 }
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r361783 - head/usr.bin/killall

2020-06-04 Thread Rodney W. Grimes
> 04.06.2020 11:29, Benjamin Kaduk wrote:
> 
> > Author: bjk (doc committer)
> > Date: Thu Jun  4 04:29:43 2020
> > New Revision: 361783
> > URL: https://svnweb.freebsd.org/changeset/base/361783
> > 
> > Log:
> >   Add EXAMPLES to killall(1)
> >   
> >   Submitted by: fernape
> >   Differential Revision:https://reviews.freebsd.org/D25002
> > 
> > Modified:
> >   head/usr.bin/killall/killall.1
> > 
> > Modified: head/usr.bin/killall/killall.1
> > ==
> > --- head/usr.bin/killall/killall.1  Thu Jun  4 02:36:41 2020
> > (r361782)
> > +++ head/usr.bin/killall/killall.1  Thu Jun  4 04:29:43 2020
> > (r361783)
> > @@ -145,6 +145,50 @@ utility exits 0 if some processes have been found and
> >  signalled successfully.
> >  Otherwise, a status of 1 will be
> >  returned.
> > +.Sh EXAMPLES
> > +Send
> > +.Dv SIGTERM
> > +to all firefox processes:
> > +.Bd -literal -offset indent
> > +killall firefox
> > +.Ed
> > +.Pp
> > +Send
> > +.Dv SIGTERM
> > +to firefox processes belonging to
> > +.Va USER :
> > +.Bd -literal -offset indent
> > +killall -u ${USER} firefox
> > +.Ed
> > +.Pp
> > +Stop all firefox processes:
> > +.Bd -literal -offset indent
> > +killall -SIGSTOP firefox
> > +.Ed
> > +.Pp
> > +Resume firefox processes:
> > +.Bd -literal -offset indent
> > +killall -SIGCONT firefox
> > +.Ed
> > +.Pp
> > +Show what would be done to firefox processes, but do not actually signal 
> > them:
> > +.Bd -literal -offset indent
> > +killall -s firefox
> > +.Ed
> > +.Pp
> > +Send
> > +.Dv SIGKILL
> > +to csh process running inside jail ID 282:
> > +.Bd -literal -offset indent
> > +killall -9 -j282 csh
> > +.Ed
> > +.Pp
> > +Send
> > +.Dv SIGTERM
> > +to all processes matching provided pattern (like vim and vimdiff):
> > +.Bd -literal -offset indent
> > +killall -m 'vim*'
> > +.Ed
> >  .Sh DIAGNOSTICS
> >  Diagnostic messages will only be printed if requested by
> >  .Fl d
> 
> "Firefox" is a trade mark (type of intellectual property) of Mozilla 
> Foundation.
> Is it OK for us to use this name such way?
> 
> Isn't it better using a name of some utility we have in the base system like 
> systat(1) ?

Purley out of simple safety I agree here.   Though I doubt a case could
be made for infringement it is just too easy to do the safe thing.

-- 
Rod Grimes rgri...@freebsd.org
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r361787 - head/sbin/ifconfig

2020-06-04 Thread Andriy Gapon
Author: avg
Date: Thu Jun  4 13:06:49 2020
New Revision: 361787
URL: https://svnweb.freebsd.org/changeset/base/361787

Log:
  ifconfig.8: fix cpability and flag descriptions for list scan / sta
  
  Some capability descriptions under list scan actually described flags.
  Some capability descriptions were missing.
  Some flag descriptions under list sta actually described capabilites.
  
  Reviewed by:  adrian
  MFC after:1 week
  Differential Revision: https://reviews.freebsd.org/D25014

Modified:
  head/sbin/ifconfig/ifconfig.8

Modified: head/sbin/ifconfig/ifconfig.8
==
--- head/sbin/ifconfig/ifconfig.8   Thu Jun  4 13:03:13 2020
(r361786)
+++ head/sbin/ifconfig/ifconfig.8   Thu Jun  4 13:06:49 2020
(r361787)
@@ -28,7 +28,7 @@
 .\" From: @(#)ifconfig.8   8.3 (Berkeley) 1/5/94
 .\" $FreeBSD$
 .\"
-.Dd December 17, 2019
+.Dd June 4, 2020
 .Dt IFCONFIG 8
 .Os
 .Sh NAME
@@ -1511,39 +1511,30 @@ Depending on the capabilities of the stations the foll
 flags can be included in the output:
 .Bl -tag -width 3n
 .It Li A
-Authorized.
-Indicates that the station is permitted to send/receive data frames.
+Channel agility.
+.It Li B
+PBCC modulation.
+.It Li C
+Poll request capability.
+.It Li D
+DSSS/OFDM capability.
 .It Li E
-Extended Rate Phy (ERP).
-Indicates that the station is operating in an 802.11g network
-using extended transmit rates.
-.It Li H
-High Throughput (HT).
-Indicates that the station is using HT transmit rates.
-If a `+' follows immediately after then the station associated
-using deprecated mechanisms supported only when
-.Cm htcompat
-is enabled.
+Extended Service Set (ESS).
+.It Li I
+Independent Basic Service Set (IBSS).
 .It Li P
-Power Save.
-Indicates that the station is operating in power save mode.
-.It Li Q
-Quality of Service (QoS).
-Indicates that the station is using QoS encapsulation for
-data frame.
-QoS encapsulation is enabled only when WME mode is enabled.
+Privacy capability.
+The station requires authentication.
+.It Li R
+Robust Secure Network (RSN).
 .It Li S
 Short Preamble.
 Indicates that the station is doing short preamble to optionally
 improve throughput performance with 802.11g and 802.11b.
-.It Li T
-Transitional Security Network (TSN).
-Indicates that the station associated using TSN; see also
-.Cm tsn
-below.
-.It Li W
-Wi-Fi Protected Setup (WPS).
-Indicates that the station associated using WPS.
+.It Li c
+Pollable capability.
+.It Li s
+Short slot time capability.
 .El
 .Pp
 By default interesting information elements captured from the neighboring
@@ -1585,8 +1576,7 @@ Capabilities advertised by the stations are described 
 the
 .Cm scan
 request.
-Depending on the capabilities of the stations the following
-flags can be included in the output:
+The following flags can be included in the output:
 .Bl -tag -width 3n
 .It Li A
 Authorized.
@@ -1598,7 +1588,9 @@ using extended transmit rates.
 .It Li H
 High Throughput (HT).
 Indicates that the station is using HT transmit rates.
-If a `+' follows immediately after then the station associated
+If a
+.Sq Li +
+follows immediately after then the station associated
 using deprecated mechanisms supported only when
 .Cm htcompat
 is enabled.
@@ -1611,9 +1603,10 @@ Indicates that the station is using QoS encapsulation 
 data frame.
 QoS encapsulation is enabled only when WME mode is enabled.
 .It Li S
-Short Preamble.
-Indicates that the station is doing short preamble to optionally
-improve throughput performance with 802.11g and 802.11b.
+Short GI in HT 40MHz mode enabled.
+If a
+.Sq Li +
+follows immediately after then short GI in HT 20MHz mode is enabled as well.
 .It Li T
 Transitional Security Network (TSN).
 Indicates that the station associated using TSN; see also
@@ -1622,6 +1615,8 @@ below.
 .It Li W
 Wi-Fi Protected Setup (WPS).
 Indicates that the station associated using WPS.
+.It Li s
+Short GI in HT 20MHz mode enabled.
 .El
 .Pp
 By default information elements received from associated stations
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r361775 - in head/sys: dts/arm64/overlays modules/dtb/rpi

2020-06-04 Thread Rodney W. Grimes
> On Wed, Jun 3, 2020, 8:10 PM Pedro Giffuni  wrote:
> 
> >
> > On 03/06/2020 19:59, Oleksandr Tymoshenko wrote:
> > > Rodney W. Grimes (free...@gndrsh.dnsmgr.net) wrote:
> > >> [ Charset UTF-8 unsupported, converting... ]
> > >>> Author: gonzo
> > >>> Date: Wed Jun  3 22:18:15 2020
> > >>> New Revision: 361775
> > >>> URL: https://svnweb.freebsd.org/changeset/base/361775
> > >>>
> > >>> Log:
> > >>>Add spigen overlay for Raspberry Pi 4
> > >>>
> > >>>Submitted by:gergely.czu...@harmless.hu
> > >>>
> > >>> Added:
> > >>>head/sys/dts/arm64/overlays/spigen-rpi4.dtso   (contents, props
> > changed)
> > >>> Modified:
> > >>>head/sys/modules/dtb/rpi/Makefile
> > >>>
> > >>> Added: head/sys/dts/arm64/overlays/spigen-rpi4.dtso
> > >>>
> > ==
> > >>> --- /dev/null   00:00:00 1970   (empty, because file is newly
> > added)
> > >>> +++ head/sys/dts/arm64/overlays/spigen-rpi4.dtsoWed Jun  3
> > 22:18:15 2020(r361775)
> > >>> @@ -0,0 +1,30 @@
> > >>> +/* $FreeBSD$ */
> > >> This file needs some form of copyright/license.
> > > Whom should I put as a copyright folder, The FreeBSD Project or the
> > > person who submitted the patch?
> >
> > The person that submitted the patch.
> >
> 
> If it can be copyrighted.
> 
> Note that the FreeBSD Project is not an entity and cannot hold
> > copyrights
> 
> 
> True, but the FreeBSD Project can be the name in the copyright line. It is
> the eponymous author of the FreeBSD collection.

Thats a very slippery slope, though US copyright law allows pseudonyms
as the copyright holder, I know of nothing that allows eponymous names.
And I do not believe pseudonyms are support in other jurisdiction.

https://www.copyright.gov/fls/fl101.pdf

> (The Foundation can but unless they sponsored it, that
> > usually involves paperwork).
> >
> 
> Yup.
> 
> Warner
> 
> > Pedro.
> >
> >

-- 
Rod Grimes rgri...@freebsd.org
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r361786 - stable/12/sys/dev/iwm

2020-06-04 Thread Andriy Gapon
Author: avg
Date: Thu Jun  4 13:03:13 2020
New Revision: 361786
URL: https://svnweb.freebsd.org/changeset/base/361786

Log:
  MFC r361273: iwm: improve rfkill handling
  
  Previously the driver handled the bit within itself, but did not expose
  the state change to net80211 and interface layers.
  This change uses net80211 KPI for rfkill signaling.
  The code is modeled after similar code in iwn and wpi.

Modified:
  stable/12/sys/dev/iwm/if_iwm.c
  stable/12/sys/dev/iwm/if_iwmvar.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/iwm/if_iwm.c
==
--- stable/12/sys/dev/iwm/if_iwm.c  Thu Jun  4 12:23:15 2020
(r361785)
+++ stable/12/sys/dev/iwm/if_iwm.c  Thu Jun  4 13:03:13 2020
(r361786)
@@ -5059,20 +5059,48 @@ iwm_parent(struct ieee80211com *ic)
 {
struct iwm_softc *sc = ic->ic_softc;
int startall = 0;
+   int rfkill = 0;
 
IWM_LOCK(sc);
if (ic->ic_nrunning > 0) {
if (!(sc->sc_flags & IWM_FLAG_HW_INITED)) {
iwm_init(sc);
-   startall = 1;
+   rfkill = iwm_check_rfkill(sc);
+   if (!rfkill)
+   startall = 1;
}
} else if (sc->sc_flags & IWM_FLAG_HW_INITED)
iwm_stop(sc);
IWM_UNLOCK(sc);
if (startall)
ieee80211_start_all(ic);
+   else if (rfkill)
+   taskqueue_enqueue(sc->sc_tq, >sc_rftoggle_task);
 }
 
+static void
+iwm_rftoggle_task(void *arg, int npending __unused)
+{
+   struct iwm_softc *sc = arg;
+   struct ieee80211com *ic = >sc_ic;
+   int rfkill;
+
+   IWM_LOCK(sc);
+   rfkill = iwm_check_rfkill(sc);
+   IWM_UNLOCK(sc);
+   if (rfkill) {
+   device_printf(sc->sc_dev,
+   "%s: rfkill switch, disabling interface\n", __func__);
+   ieee80211_suspend_all(ic);
+   ieee80211_notify_radio(ic, 0);
+   } else {
+   device_printf(sc->sc_dev,
+   "%s: rfkill cleared, re-enabling interface\n", __func__);
+   ieee80211_resume_all(ic);
+   ieee80211_notify_radio(ic, 1);
+   }
+}
+
 /*
  * The interrupt side of things
  */
@@ -5809,12 +5837,7 @@ iwm_intr(void *arg)
 
if (r1 & IWM_CSR_INT_BIT_RF_KILL) {
handled |= IWM_CSR_INT_BIT_RF_KILL;
-   if (iwm_check_rfkill(sc)) {
-   device_printf(sc->sc_dev,
-   "%s: rfkill switch, disabling interface\n",
-   __func__);
-   iwm_stop(sc);
-   }
+   taskqueue_enqueue(sc->sc_tq, >sc_rftoggle_task);
}
 
/*
@@ -6019,7 +6042,17 @@ iwm_attach(device_t dev)
callout_init_mtx(>sc_watchdog_to, >sc_mtx, 0);
callout_init_mtx(>sc_led_blink_to, >sc_mtx, 0);
TASK_INIT(>sc_es_task, 0, iwm_endscan_cb, sc);
+   TASK_INIT(>sc_rftoggle_task, 0, iwm_rftoggle_task, sc);
 
+   sc->sc_tq = taskqueue_create("iwm_taskq", M_WAITOK,
+   taskqueue_thread_enqueue, >sc_tq);
+   error = taskqueue_start_threads(>sc_tq, 1, 0, "iwm_taskq");
+   if (error != 0) {
+   device_printf(dev, "can't start taskq thread, error %d\n",
+   error);
+   goto fail;
+   }
+
error = iwm_dev_check(dev);
if (error != 0)
goto fail;
@@ -6585,6 +6618,8 @@ iwm_detach_local(struct iwm_softc *sc, int do_net80211
ieee80211_draintask(>sc_ic, >sc_es_task);
}
iwm_stop_device(sc);
+   taskqueue_drain_all(sc->sc_tq);
+   taskqueue_free(sc->sc_tq);
if (do_net80211) {
IWM_LOCK(sc);
iwm_xmit_queue_drain(sc);

Modified: stable/12/sys/dev/iwm/if_iwmvar.h
==
--- stable/12/sys/dev/iwm/if_iwmvar.h   Thu Jun  4 12:23:15 2020
(r361785)
+++ stable/12/sys/dev/iwm/if_iwmvar.h   Thu Jun  4 13:03:13 2020
(r361786)
@@ -499,7 +499,9 @@ struct iwm_softc {
uint8_t sc_cmd_resp[IWM_CMD_RESP_MAX];
int sc_wantresp;
 
+   struct taskqueue*sc_tq;
struct task sc_es_task;
+   struct task sc_rftoggle_task;
 
struct iwm_rx_phy_info  sc_last_phy_info;
int sc_ampdu_ref;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r361775 - in head/sys: dts/arm64/overlays modules/dtb/rpi

2020-06-04 Thread Rodney W. Grimes
> On Wed, Jun 3, 2020, 6:28 PM Rodney W. Grimes 
> wrote:
> 
> > [ Charset UTF-8 unsupported, converting... ]
> > > Author: gonzo
> > > Date: Wed Jun  3 22:18:15 2020
> > > New Revision: 361775
> > > URL: https://svnweb.freebsd.org/changeset/base/361775
> > >
> > > Log:
> > >   Add spigen overlay for Raspberry Pi 4
> > >
> > >   Submitted by:   gergely.czu...@harmless.hu
> > >
> > > Added:
> > >   head/sys/dts/arm64/overlays/spigen-rpi4.dtso   (contents, props
> > changed)
> > > Modified:
> > >   head/sys/modules/dtb/rpi/Makefile
> > >
> > > Added: head/sys/dts/arm64/overlays/spigen-rpi4.dtso
> > >
> > ==
> > > --- /dev/null 00:00:00 1970   (empty, because file is newly added)
> > > +++ head/sys/dts/arm64/overlays/spigen-rpi4.dtso  Wed Jun  3
> > 22:18:15 2020(r361775)
> > > @@ -0,0 +1,30 @@
> > > +/* $FreeBSD$ */
> >
> > This file needs some form of copyright/license.
> >
> 
> Dts files are like database files: they likely have no copyright
> protection.

THough I concur on that, it seems the project has lost much insite
on that, as has the industry.  I now see copyrights and licenses
on almost any thing in our tree, shell scripts, Makefiles, etc, etc...

If we infact feel these files are non copyrightable/licensable perhaps
they should have a statement making that clear?  The Berne convention
leaves files with no copyright/license statement in them subject to
dispute.


> Warner
> 
> 
> > +
> > > +/dts-v1/;
> > > +/plugin/;
> > > +
> > > +/ {
> > > + compatible = "brcm,bcm2711";
> > > +};
> > > +
> > > +&{/soc/spi@7e204000} {
> > > + status = "okay";
> > > + spigen0: spigen0 {
> > > + compatible = "freebsd,spigen";
> > > + reg = <0>;
> > > + spi-max-frequency = <50>; /* Req'd property, override
> > with spi(8) */
> > > + status = "okay";
> > > + };
> > > + spigen1: spigen1 {
> > > + compatible = "freebsd,spigen";
> > > + reg = <1>;
> > > + spi-max-frequency = <50>; /* Req'd property, override
> > with spi(8) */
> > > + status = "okay";
> > > + };
> > > +};
> > > +
> > > +&{/soc/gpio@7e20/spi0_cs_pins} {
> > > + brcm,pins = <8 7>;
> > > + brcm,function = <4>; /* ALT0 */
> > > +};
> > > +
> > >
> > > Modified: head/sys/modules/dtb/rpi/Makefile
> > >
> > ==
> > > --- head/sys/modules/dtb/rpi/Makefile Wed Jun  3 22:15:11 2020
> > (r361774)
> > > +++ head/sys/modules/dtb/rpi/Makefile Wed Jun  3 22:18:15 2020
> > (r361775)
> > > @@ -6,7 +6,8 @@ DTSO= \
> > >   spigen-rpi2.dtso
> > >  .elif ${MACHINE_ARCH} == "aarch64"
> > >  DTSO=\
> > > - spigen-rpi3.dtso
> > > + spigen-rpi3.dtso \
> > > + spigen-rpi4.dtso
> > >  .endif
> > >
> > >  .include 
> > >
> >
> > --
> > Rod Grimes
> > rgri...@freebsd.org
> >

-- 
Rod Grimes rgri...@freebsd.org
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r361782 - head/sys/dts/arm64/overlays

2020-06-04 Thread Rodney W. Grimes
> Author: gonzo
> Date: Thu Jun  4 02:36:41 2020
> New Revision: 361782
> URL: https://svnweb.freebsd.org/changeset/base/361782
> 
> Log:
>   Add copyright headers to spigen overlays for rpi3 and rpi4
>   
>   Reported by:Rodney W. Grimes  (for rpi4)


Thank you, and you did obtain Bob's permission I hope?

> Modified:
>   head/sys/dts/arm64/overlays/spigen-rpi3.dtso
>   head/sys/dts/arm64/overlays/spigen-rpi4.dtso
> 
> Modified: head/sys/dts/arm64/overlays/spigen-rpi3.dtso
> ==
> --- head/sys/dts/arm64/overlays/spigen-rpi3.dtso  Thu Jun  4 01:49:29 
> 2020(r361781)
> +++ head/sys/dts/arm64/overlays/spigen-rpi3.dtso  Thu Jun  4 02:36:41 
> 2020(r361782)
> @@ -1,4 +1,31 @@
> -/* $FreeBSD$ */
> +/*-
> + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
> + *
> + * Copyright (c) 2019 Bob Frazier 
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + * 1. Redistributions of source code must retain the above copyright
> + *notice, this list of conditions and the following disclaimer.
> + * 2. Redistributions in binary form must reproduce the above copyright
> + *notice, this list of conditions and the following disclaimer in the
> + *documentation and/or other materials provided with the distribution.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
> + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
> + * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
> + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
> + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
> + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
> + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
> + * SUCH DAMAGE.
> + *
> + * $FreeBSD$
> + */
>  
>  /dts-v1/;
>  /plugin/;
> 
> Modified: head/sys/dts/arm64/overlays/spigen-rpi4.dtso
> ==
> --- head/sys/dts/arm64/overlays/spigen-rpi4.dtso  Thu Jun  4 01:49:29 
> 2020(r361781)
> +++ head/sys/dts/arm64/overlays/spigen-rpi4.dtso  Thu Jun  4 02:36:41 
> 2020(r361782)
> @@ -1,4 +1,31 @@
> -/* $FreeBSD$ */
> +/*-
> + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
> + *
> + * Copyright (c) 2020 Gergely Czuczy 
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + * 1. Redistributions of source code must retain the above copyright
> + *notice, this list of conditions and the following disclaimer.
> + * 2. Redistributions in binary form must reproduce the above copyright
> + *notice, this list of conditions and the following disclaimer in the
> + *documentation and/or other materials provided with the distribution.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
> + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
> + * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
> + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
> + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
> + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
> + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
> + * SUCH DAMAGE.
> + *
> + * $FreeBSD$
> + */
>  
>  /dts-v1/;
>  /plugin/;
> 

-- 
Rod Grimes rgri...@freebsd.org
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r361775 - in head/sys: dts/arm64/overlays modules/dtb/rpi

2020-06-04 Thread Rodney W. Grimes
> 
> On 03/06/2020 19:59, Oleksandr Tymoshenko wrote:
> > Rodney W. Grimes (free...@gndrsh.dnsmgr.net) wrote:
> >> [ Charset UTF-8 unsupported, converting... ]
> >>> Author: gonzo
> >>> Date: Wed Jun  3 22:18:15 2020
> >>> New Revision: 361775
> >>> URL: https://svnweb.freebsd.org/changeset/base/361775
> >>>
> >>> Log:
> >>>Add spigen overlay for Raspberry Pi 4
> >>>
> >>>Submitted by:  gergely.czu...@harmless.hu
> >>>
> >>> Added:
> >>>head/sys/dts/arm64/overlays/spigen-rpi4.dtso   (contents, props 
> >>> changed)
> >>> Modified:
> >>>head/sys/modules/dtb/rpi/Makefile
> >>>
> >>> Added: head/sys/dts/arm64/overlays/spigen-rpi4.dtso
> >>> ==
> >>> --- /dev/null 00:00:00 1970   (empty, because file is newly added)
> >>> +++ head/sys/dts/arm64/overlays/spigen-rpi4.dtso  Wed Jun  3 22:18:15 
> >>> 2020(r361775)
> >>> @@ -0,0 +1,30 @@
> >>> +/* $FreeBSD$ */
> >> This file needs some form of copyright/license.
> > Whom should I put as a copyright folder, The FreeBSD Project or the
> > person who submitted the patch?
> 
> The person that submitted the patch.
> 
> Note that the FreeBSD Project is not an entity and cannot hold 
> copyrights (The Foundation can but unless they sponsored it, that 
> usually involves paperwork).

I am glad at least one other person understands that point in law:

:root {1002}# find . -type f | xargs grep Copyright | grep -i freebsd | grep -i 
project
./cddl/compat/opensolaris/kern/opensolaris_dtrace.c: * Copyright 2014 The 
FreeBSD Project.
./net/if_enc.h: * Copyright (c) 2008 The FreeBSD Project.
./net/if_enc.c: * Copyright (c) 2006 The FreeBSD Project.
./kern/kern_idle.c: * Copyright (C) 2000-2004 The FreeBSD Project. All rights 
reserved.
./kern/subr_kdb.c: * Copyright (c) 2004 The FreeBSD Project
./conf/newvers.sh:  year=$(sed -Ee '/^Copyright .* The FreeBSD 
Project/!d;s/^.*1992-([0-9]*) .*$/\1/g' ${SYSDIR}/../COPYRIGHT)
./conf/newvers.sh: * Copyright (c) 1992-$year The FreeBSD Project.
./sys/copyright.h: * Copyright (C) 1992-2018 The FreeBSD Project. All rights 
reserved.
./sys/copyright.h:  "Copyright (c) 1992-2019 The FreeBSD Project.\n"
^^^  The copyright we spit out on every boot :-(

./compat/linux/linux_uid16.c: * Copyright (c) 2001  The FreeBSD Project
./tools/embed_mfs.sh:# Copyright (C) 2008 The FreeBSD Project. All rights 
reserved.
./dev/mfi/mfi_syspd.c: *Copyright 1994-2009 The FreeBSD Project.
./dev/mfi/mfi_tbolt.c: *Copyright 1994-2009 The FreeBSD Project.
./dev/chromebook_platform/chromebook_platform.c: * Copyright (c) 2016 The 
FreeBSD Project.
./dev/pccard/pccarddevs: * Copyright (c) 1999-2004 The FreeBSD Project.
./dev/tdfx/tdfx_linux.c: * Copyright (c) 2006 The FreeBSD Project
./powerpc/powerpc/uma_machdep.c: * Copyright (c) 2003 The FreeBSD Project
./libkern/memset.c: * Copyright (C) 1992-2007 The FreeBSD Project. All rights 
reserved.

> 
> Pedro.
> 
> 

-- 
Rod Grimes rgri...@freebsd.org
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r361775 - in head/sys: dts/arm64/overlays modules/dtb/rpi

2020-06-04 Thread Rodney W. Grimes
> Rodney W. Grimes (free...@gndrsh.dnsmgr.net) wrote:
> > [ Charset UTF-8 unsupported, converting... ]
> > > Author: gonzo
> > > Date: Wed Jun  3 22:18:15 2020
> > > New Revision: 361775
> > > URL: https://svnweb.freebsd.org/changeset/base/361775
> > > 
> > > Log:
> > >   Add spigen overlay for Raspberry Pi 4
> > >   
> > >   Submitted by:   gergely.czu...@harmless.hu
> > > 
> > > Added:
> > >   head/sys/dts/arm64/overlays/spigen-rpi4.dtso   (contents, props changed)
> > > Modified:
> > >   head/sys/modules/dtb/rpi/Makefile
> > > 
> > > Added: head/sys/dts/arm64/overlays/spigen-rpi4.dtso
> > > ==
> > > --- /dev/null 00:00:00 1970   (empty, because file is newly added)
> > > +++ head/sys/dts/arm64/overlays/spigen-rpi4.dtso  Wed Jun  3 22:18:15 
> > > 2020(r361775)
> > > @@ -0,0 +1,30 @@
> > > +/* $FreeBSD$ */
> > 
> > This file needs some form of copyright/license.
> 
> Whom should I put as a copyright folder, The FreeBSD Project or the
> person who submitted the patch?

You need to obtain there permission too, you can not just slap
someones name in a copyright statement.  They can also make the
file "in the public domain".

-- 
Rod Grimes rgri...@freebsd.org
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r361785 - in head/sys/ufs: ffs ufs

2020-06-04 Thread Konstantin Belousov
Author: kib
Date: Thu Jun  4 12:23:15 2020
New Revision: 361785
URL: https://svnweb.freebsd.org/changeset/base/361785

Log:
  UFS: write inode block for fdatasync(2) if pointers in inode where allocated
  
  The fdatasync() description in POSIX specifies that
  all I/O operations shall be completed as defined for synchronized I/O
  data integrity completion.
  and then the explanation of Synchronized I/O Data Integrity Completion says
  The write is complete only when the data specified in the write
  request is successfully transferred and all file system
  information required to retrieve the data is successfully
  transferred.
  
  For UFS this means that all pointers must be on disk. Indirect
  pointers already contribute to the list of dirty data blocks, so only
  direct blocks and root pointers to indirect blocks, both of which
  reside in the inode block, should be taken care of. In ffs_balloc(),
  mark the inode with the new flag IN_IBLKDATA that specifies that
  ffs_syncvnode(DATA_ONLY) needs a call to ffs_update() to flush the
  inode block.
  
  Reviewed by:  mckusick
  Discussed with:   tmunro
  Sponsored by: The FreeBSD Foundation
  MFC after:1 week
  Differential revision:https://reviews.freebsd.org/D25072

Modified:
  head/sys/ufs/ffs/ffs_balloc.c
  head/sys/ufs/ffs/ffs_inode.c
  head/sys/ufs/ffs/ffs_vnops.c
  head/sys/ufs/ufs/inode.h

Modified: head/sys/ufs/ffs/ffs_balloc.c
==
--- head/sys/ufs/ffs/ffs_balloc.c   Thu Jun  4 09:06:03 2020
(r361784)
+++ head/sys/ufs/ffs/ffs_balloc.c   Thu Jun  4 12:23:15 2020
(r361785)
@@ -224,7 +224,7 @@ ffs_balloc_ufs1(struct vnode *vp, off_t startoffset, i
nsize, 0, bp);
}
dp->di_db[lbn] = dbtofsb(fs, bp->b_blkno);
-   UFS_INODE_SET_FLAG(ip, IN_CHANGE | IN_UPDATE);
+   UFS_INODE_SET_FLAG(ip, IN_CHANGE | IN_UPDATE | IN_IBLKDATA);
*bpp = bp;
return (0);
}
@@ -280,7 +280,7 @@ ffs_balloc_ufs1(struct vnode *vp, off_t startoffset, i
}
allocib = >di_ib[indirs[0].in_off];
*allocib = nb;
-   UFS_INODE_SET_FLAG(ip, IN_CHANGE | IN_UPDATE);
+   UFS_INODE_SET_FLAG(ip, IN_CHANGE | IN_UPDATE | IN_IBLKDATA);
}
/*
 * Fetch through the indirect blocks, allocating as necessary.
@@ -721,7 +721,7 @@ ffs_balloc_ufs2(struct vnode *vp, off_t startoffset, i
nsize, 0, bp);
}
dp->di_extb[lbn] = dbtofsb(fs, bp->b_blkno);
-   UFS_INODE_SET_FLAG(ip, IN_CHANGE);
+   UFS_INODE_SET_FLAG(ip, IN_CHANGE | IN_IBLKDATA);
*bpp = bp;
return (0);
}
@@ -750,7 +750,8 @@ ffs_balloc_ufs2(struct vnode *vp, off_t startoffset, i
ip->i_size = smalllblktosize(fs, nb + 1);
dp->di_size = ip->i_size;
dp->di_db[nb] = dbtofsb(fs, bp->b_blkno);
-   UFS_INODE_SET_FLAG(ip, IN_CHANGE | IN_UPDATE);
+   UFS_INODE_SET_FLAG(ip, IN_CHANGE | IN_UPDATE |
+   IN_IBLKDATA);
if (flags & IO_SYNC)
bwrite(bp);
else
@@ -820,7 +821,7 @@ ffs_balloc_ufs2(struct vnode *vp, off_t startoffset, i
nsize, 0, bp);
}
dp->di_db[lbn] = dbtofsb(fs, bp->b_blkno);
-   UFS_INODE_SET_FLAG(ip, IN_CHANGE | IN_UPDATE);
+   UFS_INODE_SET_FLAG(ip, IN_CHANGE | IN_UPDATE | IN_IBLKDATA);
*bpp = bp;
return (0);
}
@@ -877,7 +878,7 @@ ffs_balloc_ufs2(struct vnode *vp, off_t startoffset, i
}
allocib = >di_ib[indirs[0].in_off];
*allocib = nb;
-   UFS_INODE_SET_FLAG(ip, IN_CHANGE | IN_UPDATE);
+   UFS_INODE_SET_FLAG(ip, IN_CHANGE | IN_UPDATE | IN_IBLKDATA);
}
/*
 * Fetch through the indirect blocks, allocating as necessary.

Modified: head/sys/ufs/ffs/ffs_inode.c
==
--- head/sys/ufs/ffs/ffs_inode.cThu Jun  4 09:06:03 2020
(r361784)
+++ head/sys/ufs/ffs/ffs_inode.cThu Jun  4 12:23:15 2020
(r361785)
@@ -94,7 +94,7 @@ ffs_update(vp, waitfor)
ip = VTOI(vp);
if ((ip->i_flag & IN_MODIFIED) == 0 && waitfor == 0)
return (0);
-   ip->i_flag &= ~(IN_LAZYACCESS | IN_LAZYMOD | IN_MODIFIED);
+   ip->i_flag &= ~(IN_LAZYACCESS | IN_LAZYMOD | IN_MODIFIED | IN_IBLKDATA);
fs = ITOFS(ip);
if (fs->fs_ronly && ITOUMP(ip)->um_fsckpid == 0)
return (0);

Modified: 

Re: svn commit: r361770 - in head: include lib/libthr lib/libthr/thread share/man/man3

2020-06-04 Thread Konstantin Belousov
On Thu, Jun 04, 2020 at 07:51:42AM +0200, Antoine Brodin wrote:
> On Thu, Jun 4, 2020 at 4:30 AM Jung-uk Kim  wrote:
> >
> > It broke Firefox build and I found Linux pthread_{get,set}name_np(3)
> > returns int.
> >
> > https://linux.die.net/man/3/pthread_getname_np
> >
> > I guess you need to write a wrapper.  Please revert this patch for now.
> 
> Hi,
> 
> It broke devel/glib20 too,  which now tries to use the function
> without including the header:
> http://beefy18.nyi.freebsd.org/data/head-amd64-default/p537862_s361780/logs/errors/glib-2.56.3_7,1.log

I reworked the change, please see the updated review
https://reviews.freebsd.org/D25117
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r361783 - head/usr.bin/killall

2020-06-04 Thread Eugene Grosbein
04.06.2020 11:29, Benjamin Kaduk wrote:

> Author: bjk (doc committer)
> Date: Thu Jun  4 04:29:43 2020
> New Revision: 361783
> URL: https://svnweb.freebsd.org/changeset/base/361783
> 
> Log:
>   Add EXAMPLES to killall(1)
>   
>   Submitted by:   fernape
>   Differential Revision:  https://reviews.freebsd.org/D25002
> 
> Modified:
>   head/usr.bin/killall/killall.1
> 
> Modified: head/usr.bin/killall/killall.1
> ==
> --- head/usr.bin/killall/killall.1Thu Jun  4 02:36:41 2020
> (r361782)
> +++ head/usr.bin/killall/killall.1Thu Jun  4 04:29:43 2020
> (r361783)
> @@ -145,6 +145,50 @@ utility exits 0 if some processes have been found and
>  signalled successfully.
>  Otherwise, a status of 1 will be
>  returned.
> +.Sh EXAMPLES
> +Send
> +.Dv SIGTERM
> +to all firefox processes:
> +.Bd -literal -offset indent
> +killall firefox
> +.Ed
> +.Pp
> +Send
> +.Dv SIGTERM
> +to firefox processes belonging to
> +.Va USER :
> +.Bd -literal -offset indent
> +killall -u ${USER} firefox
> +.Ed
> +.Pp
> +Stop all firefox processes:
> +.Bd -literal -offset indent
> +killall -SIGSTOP firefox
> +.Ed
> +.Pp
> +Resume firefox processes:
> +.Bd -literal -offset indent
> +killall -SIGCONT firefox
> +.Ed
> +.Pp
> +Show what would be done to firefox processes, but do not actually signal 
> them:
> +.Bd -literal -offset indent
> +killall -s firefox
> +.Ed
> +.Pp
> +Send
> +.Dv SIGKILL
> +to csh process running inside jail ID 282:
> +.Bd -literal -offset indent
> +killall -9 -j282 csh
> +.Ed
> +.Pp
> +Send
> +.Dv SIGTERM
> +to all processes matching provided pattern (like vim and vimdiff):
> +.Bd -literal -offset indent
> +killall -m 'vim*'
> +.Ed
>  .Sh DIAGNOSTICS
>  Diagnostic messages will only be printed if requested by
>  .Fl d

"Firefox" is a trade mark (type of intellectual property) of Mozilla Foundation.
Is it OK for us to use this name such way?

Isn't it better using a name of some utility we have in the base system like 
systat(1) ?

___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r361784 - in head: include lib/libthr lib/libthr/thread share/man/man3

2020-06-04 Thread Konstantin Belousov
Author: kib
Date: Thu Jun  4 09:06:03 2020
New Revision: 361784
URL: https://svnweb.freebsd.org/changeset/base/361784

Log:
  Revert r361770 "Add pthread_getname_np() and pthread_setname_np() aliases" 
for now.
  
  It is not compatible enough with Linux.
  
  Requested by: antoine, jkim
  Sponsored by: The FreeBSD Foundation

Modified:
  head/include/pthread_np.h
  head/lib/libthr/pthread.map
  head/lib/libthr/thread/thr_info.c
  head/share/man/man3/Makefile
  head/share/man/man3/pthread_set_name_np.3

Modified: head/include/pthread_np.h
==
--- head/include/pthread_np.h   Thu Jun  4 04:29:43 2020(r361783)
+++ head/include/pthread_np.h   Thu Jun  4 09:06:03 2020(r361784)
@@ -50,7 +50,6 @@ int pthread_attr_get_np(pthread_t, pthread_attr_t *);
 int pthread_attr_getaffinity_np(const pthread_attr_t *, size_t, cpuset_t *);
 int pthread_attr_setaffinity_np(pthread_attr_t *, size_t, const cpuset_t *);
 void pthread_get_name_np(pthread_t, char *, size_t);
-void pthread_getname_np(pthread_t, char *, size_t);
 int pthread_getaffinity_np(pthread_t, size_t, cpuset_t *);
 int pthread_getthreadid_np(void);
 int pthread_main_np(void);
@@ -66,7 +65,6 @@ void pthread_resume_all_np(void);
 int pthread_resume_np(pthread_t);
 int pthread_peekjoin_np(pthread_t, void **);
 void pthread_set_name_np(pthread_t, const char *);
-void pthread_setname_np(pthread_t, const char *);
 int pthread_setaffinity_np(pthread_t, size_t, const cpuset_t *);
 int pthread_single_np(void);
 void pthread_suspend_all_np(void);

Modified: head/lib/libthr/pthread.map
==
--- head/lib/libthr/pthread.map Thu Jun  4 04:29:43 2020(r361783)
+++ head/lib/libthr/pthread.map Thu Jun  4 09:06:03 2020(r361784)
@@ -328,7 +328,5 @@ FBSD_1.5 {
 };
 
 FBSD_1.6 {
-pthread_getname_np;
 pthread_peekjoin_np;
-pthread_setname_np;
 };

Modified: head/lib/libthr/thread/thr_info.c
==
--- head/lib/libthr/thread/thr_info.c   Thu Jun  4 04:29:43 2020
(r361783)
+++ head/lib/libthr/thread/thr_info.c   Thu Jun  4 09:06:03 2020
(r361784)
@@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$");
 #include "thr_private.h"
 
 __weak_reference(_pthread_set_name_np, pthread_set_name_np);
-__weak_reference(_pthread_set_name_np, pthread_setname_np);
 
 static void
 thr_set_name_np(struct pthread *thread, const char *name)
@@ -90,7 +89,6 @@ thr_get_name_np(struct pthread *thread, char *buf, siz
 }
 
 __weak_reference(_pthread_get_name_np, pthread_get_name_np);
-__weak_reference(_pthread_get_name_np, pthread_getname_np);
 
 void
 _pthread_get_name_np(pthread_t thread, char *buf, size_t len)

Modified: head/share/man/man3/Makefile
==
--- head/share/man/man3/MakefileThu Jun  4 04:29:43 2020
(r361783)
+++ head/share/man/man3/MakefileThu Jun  4 09:06:03 2020
(r361784)
@@ -493,9 +493,7 @@ PTHREAD_MLINKS+=pthread_rwlock_rdlock.3 pthread_rwlock
 PTHREAD_MLINKS+=pthread_rwlock_wrlock.3 pthread_rwlock_trywrlock.3
 PTHREAD_MLINKS+=pthread_schedparam.3 pthread_getschedparam.3 \
pthread_schedparam.3 pthread_setschedparam.3
-PTHREAD_MLINKS+=pthread_set_name_np.3 pthread_get_name_np.3 \
-   pthread_set_name_np.3 pthread_getname_np.3 \
-   pthread_set_name_np.3 pthread_setname_np.3
+PTHREAD_MLINKS+=pthread_set_name_np.3 pthread_get_name_np.3
 PTHREAD_MLINKS+=pthread_spin_init.3 pthread_spin_destroy.3 \
pthread_spin_lock.3 pthread_spin_trylock.3 \
pthread_spin_lock.3 pthread_spin_unlock.3

Modified: head/share/man/man3/pthread_set_name_np.3
==
--- head/share/man/man3/pthread_set_name_np.3   Thu Jun  4 04:29:43 2020
(r361783)
+++ head/share/man/man3/pthread_set_name_np.3   Thu Jun  4 09:06:03 2020
(r361784)
@@ -24,14 +24,12 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 3, 2020
+.Dd August 12, 2018
 .Dt PTHREAD_SET_NAME_NP 3
 .Os
 .Sh NAME
 .Nm pthread_get_name_np ,
-.Nm pthread_getname_np ,
 .Nm pthread_set_name_np
-.Nm pthread_setname_np
 .Nd set and retrieve the thread name
 .Sh LIBRARY
 .Lb libpthread
@@ -40,26 +38,18 @@
 .Ft void
 .Fn pthread_get_name_np "pthread_t thread" "char *name" "size_t len"
 .Ft void
-.Fn pthread_getname_np "pthread_t thread" "char *name" "size_t len"
-.Ft void
 .Fn pthread_set_name_np "pthread_t thread" "const char *name"
-.Ft void
-.Fn pthread_setname_np "pthread_t thread" "const char *name"
 .Sh DESCRIPTION
 The
 .Fn pthread_set_name_np
-and
-.Fn pthread_setname_np
-functions applies a copy of the given
+function applies a copy of the given
 .Fa name
 to the given
 .Fa thread .
 .Pp
 The
 .Fn pthread_get_name_np
-and
-.Fn pthread_getname_np