svn commit: r362216 - head/sbin/ifconfig

2020-06-15 Thread Adrian Chadd
Author: adrian
Date: Tue Jun 16 04:17:08 2020
New Revision: 362216
URL: https://svnweb.freebsd.org/changeset/base/362216

Log:
  [ifconfig] add UAPSD and LPDC flags
  
  * Add UAPSD and LDPC flags
  * expand the FLAGS section; it's kinda grown since I started hacking
on net80211..

Modified:
  head/sbin/ifconfig/ifieee80211.c

Modified: head/sbin/ifconfig/ifieee80211.c
==
--- head/sbin/ifconfig/ifieee80211.cTue Jun 16 02:35:30 2020
(r362215)
+++ head/sbin/ifconfig/ifieee80211.cTue Jun 16 04:17:08 2020
(r362216)
@@ -125,6 +125,8 @@
 #defineIEEE80211_NODE_AMSDU_RX 0x04/* AMSDU rx enabled */
 #defineIEEE80211_NODE_AMSDU_TX 0x08/* AMSDU tx enabled */
 #defineIEEE80211_NODE_VHT  0x10/* VHT enabled */
+#defineIEEE80211_NODE_LDPC 0x20/* LDPC enabled */
+#defineIEEE80211_NODE_UAPSD0x40/* UAPSD enabled */
 #endif
 
 #defineMAXCHAN 1536/* max 1.5K channels */
@@ -2637,6 +2639,10 @@ getflags(int flags)
*cp++ = 't';
if (flags & IEEE80211_NODE_AMSDU_RX)
*cp++ = 'r';
+   if (flags & IEEE80211_NODE_UAPSD)
+   *cp++ = 'U';
+   if (flags & IEEE80211_NODE_LDPC)
+   *cp++ = 'L';
*cp = '\0';
return flagstring;
 }
@@ -3846,8 +3852,8 @@ list_stations(int s)
, "TXSEQ"
, "RXSEQ"
);
-   else 
-   printf("%-17.17s %4s %4s %4s %4s %4s %6s %6s %4s %-7s\n"
+   else
+   printf("%-17.17s %4s %4s %4s %4s %4s %6s %6s %4s %-12s\n"
, "ADDR"
, "AID"
, "CHAN"
@@ -3881,8 +3887,8 @@ list_stations(int s)
, gettxseq(si)
, getrxseq(si)
);
-   else 
-   printf("%s %4u %4d %3dM %4.1f %4d %6d %6d %-4.4s %-7.7s"
+   else
+   printf("%s %4u %4d %3dM %4.1f %4d %6d %6d %-4.4s 
%-12.12s"
, ether_ntoa((const struct ether_addr*)
si->isi_macaddr)
, IEEE80211_AID(si->isi_associd)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r362215 - head/usr.sbin/mountd

2020-06-15 Thread Rick Macklem
Author: rmacklem
Date: Tue Jun 16 02:35:30 2020
New Revision: 362215
URL: https://svnweb.freebsd.org/changeset/base/362215

Log:
  Make use of the UID_NOBODY and GID_NOGROUP definitions in sys/conf.h.
  
  r362214 exposed UID_NOBODY and GID_NOGROUP to userspace, so use them
  instead of the numbers.
  
  Reviewed by:  kib
  Differential Revision:https://reviews.freebsd.org/D25281

Modified:
  head/usr.sbin/mountd/mountd.c

Modified: head/usr.sbin/mountd/mountd.c
==
--- head/usr.sbin/mountd/mountd.c   Tue Jun 16 02:31:22 2020
(r362214)
+++ head/usr.sbin/mountd/mountd.c   Tue Jun 16 02:35:30 2020
(r362215)
@@ -48,6 +48,7 @@ static char sccsid[] = "@(#)mountd.c  8.15 (Berkeley) 5
 __FBSDID("$FreeBSD$");
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1525,9 +1526,9 @@ get_exportlist_one(int passno)
 * Set defaults.
 */
has_host = FALSE;
-   anon.cr_uid = 65534;
+   anon.cr_uid = UID_NOBODY;
anon.cr_ngroups = 1;
-   anon.cr_groups[0] = 65533;
+   anon.cr_groups[0] = GID_NOGROUP;
exflags = MNT_EXPORTED;
got_nondir = 0;
opt_flags = 0;
@@ -3456,8 +3457,8 @@ parsecred(char *namelist, struct expcred *cr)
/*
 * Set up the unprivileged user.
 */
-   cr->cr_uid = 65534;
-   cr->cr_groups[0] = 65533;
+   cr->cr_uid = UID_NOBODY;
+   cr->cr_groups[0] = GID_NOGROUP;
cr->cr_ngroups = 1;
/*
 * Get the user's password table entry.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r362214 - head/sys/sys

2020-06-15 Thread Rick Macklem
Author: rmacklem
Date: Tue Jun 16 02:31:22 2020
New Revision: 362214
URL: https://svnweb.freebsd.org/changeset/base/362214

Log:
  Expose UID_xxx and GID_xxx definitions to userspace.
  
  This patch moves the UID_xxx and GID_xxx definitions out of the
  #ifdef _KERNEL section, so that userspace programs like mountd
  can use them.
  There are a couple of userspace programs that do define UID_ROOT,
  but they do not include sys/conf.h.  Since they are defined as
  the same value, maybe they should be changed to include sys/conf.h.
  
  Reviewed by:  kib
  Differential Revision:https:/reviews.freebsd.org/D25281

Modified:
  head/sys/sys/conf.h

Modified: head/sys/sys/conf.h
==
--- head/sys/sys/conf.h Tue Jun 16 01:11:40 2020(r362213)
+++ head/sys/sys/conf.h Tue Jun 16 02:31:22 2020(r362214)
@@ -147,6 +147,23 @@ typedef int dumper_hdr_t(struct dumperinfo *di, struct
 #defineD_TTY   0x0004
 #defineD_MEM   0x0008  /* /dev/(k)mem */
 
+/* Defined uid and gid values. */
+#defineUID_ROOT0
+#defineUID_BIN 3
+#defineUID_UUCP66
+#defineUID_NOBODY  65534
+
+#defineGID_WHEEL   0
+#defineGID_KMEM2
+#defineGID_TTY 4
+#defineGID_OPERATOR5
+#defineGID_BIN 7
+#defineGID_GAMES   13
+#defineGID_VIDEO   44
+#defineGID_DIALER  68
+#defineGID_NOGROUP 65533
+#defineGID_NOBODY  65534
+
 #ifdef _KERNEL
 
 #defineD_TYPEMASK  0x
@@ -308,22 +325,6 @@ void   devfs_clear_cdevpriv(void);
 
 ino_t  devfs_alloc_cdp_inode(void);
 void   devfs_free_cdp_inode(ino_t ino);
-
-#defineUID_ROOT0
-#defineUID_BIN 3
-#defineUID_UUCP66
-#defineUID_NOBODY  65534
-
-#defineGID_WHEEL   0
-#defineGID_KMEM2
-#defineGID_TTY 4
-#defineGID_OPERATOR5
-#defineGID_BIN 7
-#defineGID_GAMES   13
-#defineGID_VIDEO   44
-#defineGID_DIALER  68
-#defineGID_NOGROUP 65533
-#defineGID_NOBODY  65534
 
 typedef void (*dev_clone_fn)(void *arg, struct ucred *cred, char *name,
int namelen, struct cdev **result);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r362213 - head/sys/dev/usb/wlan

2020-06-15 Thread Adrian Chadd
Author: adrian
Date: Tue Jun 16 01:11:40 2020
New Revision: 362213
URL: https://svnweb.freebsd.org/changeset/base/362213

Log:
  [rsu] Update wme ie API use.
  
  Whoops, forgot to land this one too!

Modified:
  head/sys/dev/usb/wlan/if_rsu.c

Modified: head/sys/dev/usb/wlan/if_rsu.c
==
--- head/sys/dev/usb/wlan/if_rsu.c  Tue Jun 16 00:28:45 2020
(r362212)
+++ head/sys/dev/usb/wlan/if_rsu.c  Tue Jun 16 01:11:40 2020
(r362213)
@@ -1982,7 +1982,7 @@ rsu_join_bss(struct rsu_softc *sc, struct ieee80211_no
frm = ieee80211_add_qos(frm, ni);
if ((ic->ic_flags & IEEE80211_F_WME) &&
(ni->ni_ies.wme_ie != NULL))
-   frm = ieee80211_add_wme_info(frm, >ic_wme);
+   frm = ieee80211_add_wme_info(frm, >ic_wme, ni);
if (ni->ni_flags & IEEE80211_NODE_HT) {
frm = ieee80211_add_htcap(frm, ni);
frm = ieee80211_add_htinfo(frm, ni);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r362212 - head/sys/net80211

2020-06-15 Thread Adrian Chadd
Author: adrian
Date: Tue Jun 16 00:28:45 2020
New Revision: 362212
URL: https://svnweb.freebsd.org/changeset/base/362212

Log:
  [net80211] Add missing commit to previous-1 uapsd commit.
  
  Whoops; somehow my big commit line didn't include this..  cue the tree 
breakage emails.

Modified:
  head/sys/net80211/ieee80211_proto.h

Modified: head/sys/net80211/ieee80211_proto.h
==
--- head/sys/net80211/ieee80211_proto.h Tue Jun 16 00:28:08 2020
(r362211)
+++ head/sys/net80211/ieee80211_proto.h Tue Jun 16 00:28:45 2020
(r362212)
@@ -152,7 +152,8 @@ uint8_t *ieee80211_add_qos(uint8_t *, const struct iee
 uint16_t ieee80211_getcapinfo(struct ieee80211vap *,
struct ieee80211_channel *);
 struct ieee80211_wme_state;
-uint8_t * ieee80211_add_wme_info(uint8_t *frm, struct ieee80211_wme_state 
*wme);
+uint8_t * ieee80211_add_wme_info(uint8_t *frm, struct ieee80211_wme_state *wme,
+   struct ieee80211_node *ni);
 
 void   ieee80211_vap_reset_erp(struct ieee80211vap *);
 void   ieee80211_reset_erp(struct ieee80211com *);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r362211 - head/sbin/ifconfig

2020-06-15 Thread Adrian Chadd
Author: adrian
Date: Tue Jun 16 00:28:08 2020
New Revision: 362211
URL: https://svnweb.freebsd.org/changeset/base/362211

Log:
  [net80211] Add uapsd option to ifconfig
  
  Add an enable/disable option for controlling uapsd.  I'm not yet controlling
  the individual AC configs or the service period.

Modified:
  head/sbin/ifconfig/ifieee80211.c

Modified: head/sbin/ifconfig/ifieee80211.c
==
--- head/sbin/ifconfig/ifieee80211.cTue Jun 16 00:27:32 2020
(r362210)
+++ head/sbin/ifconfig/ifieee80211.cTue Jun 16 00:28:08 2020
(r362211)
@@ -1804,6 +1804,12 @@ set80211ldpc(const char *val, int d, int s, const stru
 set80211(s, IEEE80211_IOC_LDPC, ldpc, 0, NULL);
 }
 
+static void
+set80211uapsd(const char *val, int d, int s, const struct afswtch *rafp)
+{
+   set80211(s, IEEE80211_IOC_UAPSD, d, 0, NULL);
+}
+
 static
 DECL_CMD_FUNC(set80211ampdulimit, val, d)
 {
@@ -5288,6 +5294,16 @@ end:
break;
}
}
+   if (get80211val(s, IEEE80211_IOC_UAPSD, ) != -1) {
+   switch (val) {
+   case 0:
+   LINE_CHECK("-uapsd");
+   break;
+   case 1:
+   LINE_CHECK("uapsd");
+   break;
+   }
+   }
}
 
if (IEEE80211_IS_CHAN_VHT(c) || verbose) {
@@ -5872,6 +5888,8 @@ static struct cmd ieee80211_cmds[] = {
DEF_CMD("-ldpctx",  -1, set80211ldpc),
DEF_CMD("ldpc", 3,  set80211ldpc),  /* NB: tx+rx */
DEF_CMD("-ldpc",-3, set80211ldpc),
+   DEF_CMD("uapsd",1,  set80211uapsd),
+   DEF_CMD("-uapsd",   0,  set80211uapsd),
DEF_CMD("puren",1,  set80211puren),
DEF_CMD("-puren",   0,  set80211puren),
DEF_CMD("doth", 1,  set80211doth),
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r362210 - head/sys/net80211

2020-06-15 Thread Adrian Chadd
Author: adrian
Date: Tue Jun 16 00:27:32 2020
New Revision: 362210
URL: https://svnweb.freebsd.org/changeset/base/362210

Log:
  [net80211] Add initial U-APSD negotiation support.
  
  U-APSD (unscheduled automatic power save delivery) is a power save method
  that's a bit better than legacy PS-POLL - stations can mark frames with
  an extra flag that tells the AP to leak out more frames after it sends
  its own frames rather than needing to send a PS-POLL to get another frame
  from the AP.
  
  Now, this code just handles the negotiation bits; it doesn't actually
  implement U-APSD.  That's up to drivers, and nothing in the tree yet
  implements this.  I /may/ implement this for ath(4) if I eventually care
  enough but right now I plan on just implementing it for firmware offload
  based NICs that handle this in the NIC.
  
  I'll commit the ifconfig bit after this and I may have some follow-up
  commits as this gets used more by me in local testing.
  
  This should be a glorious no-op for everyone else.  If things change
  for anyone that isn't fixed by a complete recompile then please reach out
  to me.

Modified:
  head/sys/net80211/_ieee80211.h
  head/sys/net80211/ieee80211.c
  head/sys/net80211/ieee80211_hostap.c
  head/sys/net80211/ieee80211_ioctl.c
  head/sys/net80211/ieee80211_ioctl.h
  head/sys/net80211/ieee80211_node.h
  head/sys/net80211/ieee80211_output.c
  head/sys/net80211/ieee80211_proto.c
  head/sys/net80211/ieee80211_sta.c
  head/sys/net80211/ieee80211_sta.h
  head/sys/net80211/ieee80211_var.h

Modified: head/sys/net80211/_ieee80211.h
==
--- head/sys/net80211/_ieee80211.h  Mon Jun 15 22:43:46 2020
(r362209)
+++ head/sys/net80211/_ieee80211.h  Tue Jun 16 00:27:32 2020
(r362210)
@@ -488,6 +488,7 @@ struct ieee80211_mimo_info {
 #defineIEEE80211_C_MBSS0x0004  /* CAPABILITY: MBSS 
available */
 #defineIEEE80211_C_SWSLEEP 0x0008  /* CAPABILITY: do sleep 
here */
 #defineIEEE80211_C_SWAMSDUTX   0x0010  /* CAPABILITY: software 
A-MSDU TX */
+#defineIEEE80211_C_UAPSD   0x0020  /* CAPABILITY: U-APSD */
 /* 0x7c available */
 #defineIEEE80211_C_WPA10x0080  /* CAPABILITY: WPA1 
avail */
 #defineIEEE80211_C_WPA20x0100  /* CAPABILITY: WPA2 
avail */

Modified: head/sys/net80211/ieee80211.c
==
--- head/sys/net80211/ieee80211.c   Mon Jun 15 22:43:46 2020
(r362209)
+++ head/sys/net80211/ieee80211.c   Tue Jun 16 00:27:32 2020
(r362210)
@@ -616,6 +616,12 @@ ieee80211_vap_setup(struct ieee80211com *ic, struct ie
if (vap->iv_opmode == IEEE80211_M_HOSTAP &&
(vap->iv_caps & IEEE80211_C_DFS))
vap->iv_flags_ext |= IEEE80211_FEXT_DFS;
+   /* NB: only flip on U-APSD for hostap/sta for now */
+   if ((vap->iv_opmode == IEEE80211_M_STA)
+   || (vap->iv_opmode == IEEE80211_M_HOSTAP)) {
+   if (vap->iv_caps & IEEE80211_C_UAPSD)
+   vap->iv_flags_ext |= IEEE80211_FEXT_UAPSD;
+   }
 
vap->iv_des_chan = IEEE80211_CHAN_ANYC; /* any channel is ok */
vap->iv_bmissthreshold = IEEE80211_HWBMISS_DEFAULT;

Modified: head/sys/net80211/ieee80211_hostap.c
==
--- head/sys/net80211/ieee80211_hostap.cMon Jun 15 22:43:46 2020
(r362209)
+++ head/sys/net80211/ieee80211_hostap.cTue Jun 16 00:27:32 2020
(r362210)
@@ -65,6 +65,7 @@ __FBSDID("$FreeBSD$");
 #endif
 #include 
 #include 
+#include  /* for parse_wmeie */
 
 #defineIEEE80211_RATE2MBS(r)   (((r) & IEEE80211_RATE_VAL) / 2)
 
@@ -2253,8 +2254,18 @@ hostap_recv_mgmt(struct ieee80211_node *ni, struct mbu
 * Mark node as capable of QoS.
 */
ni->ni_flags |= IEEE80211_NODE_QOS;
+   if (ieee80211_parse_wmeie(wme, wh, ni) > 0) {
+   if (ni->ni_uapsd != 0)
+   ni->ni_flags |=
+   IEEE80211_NODE_UAPSD;
+   else
+   ni->ni_flags &=
+   ~IEEE80211_NODE_UAPSD;
+   }
} else
-   ni->ni_flags &= ~IEEE80211_NODE_QOS;
+   ni->ni_flags &=
+   ~(IEEE80211_NODE_QOS |
+ IEEE80211_NODE_UAPSD);
 #ifdef IEEE80211_SUPPORT_SUPERG
if (ath != NULL) {

Re: svn commit: r362191 - head/sbin/md5

2020-06-15 Thread Warner Losh
On Mon, Jun 15, 2020, 3:12 PM Rodney W. Grimes 
wrote:

> > On Mon, Jun 15, 2020 at 7:34 AM Mateusz Piotrowski <0...@freebsd.org>
> wrote:
> >
> > > Hi,
> > >
> > > On 6/15/20 2:33 PM, Rodney W. Grimes wrote:
> > > > [ Charset UTF-8 unsupported, converting... ]
> > > >> Author: fernape (ports committer)
> > > >> Date: Mon Jun 15 10:08:02 2020
> > > >> New Revision: 362191
> > > >> URL: https://svnweb.freebsd.org/changeset/base/362191
> > > >>
> > > >> Log:
> > > >>   md5(1): fix style in man page
> > > >
> > > > Mandoc is fine to ignore this, but it is wrong to call it useless.
> > > >
> > > > I really wish that this stop.  .Tn might be useless to mandoc,
> > > > but it is a very usable thing if your formatting to something
> > > > other than txt, as in a ps or pdf.
> > >
> > > In that case I would consider patching our in-tree mandoc to not warn
> > > about Tn. Or request support for Tn or a well-defined replacement
> upstream.
> > >
> > > I can see the benefit of keeping Tn around, as it /might/ potentially
> > > create nice formatting for HTML. On the other hand, I don't like the
> > > idea of not following the linter.
> > >
> >
> > I thought that Tn thing was the general consensus thing and added to the
> > linter because of that. The man page explains why it's problematic:
> >
> >  Tn word ...
> >   Supported only for compatibility, do not use this in new
> manuals.
> >   Even though the macro name ("tradename") suggests a semantic
> >   function, historic usage is inconsistent, mostly using it as a
> >   presentation-level macro to request a small caps font.
>
> I believe that comes about because of confusion over trade name vs
> trademark.  They are not defined as the same thing.
>
> > It was useful for the Unix trademark, but was tailor towards AT's
> > preferred dressing for the Unix trademark, not for trademarks in general.
>
> Crossing tradename with trademark?
>
> > In this case, there were several instances of abuse:
> >
> > -.Tn RSA .
> > +key under a public-key cryptosystem such as RSA.
>
> trade name: noun
>   1. the name used by a manufacturer, merchant, service company,
>  farming business, etc., to identify itself individually
>  as a business.
>   2. a word or phrase used in a trade to designate a business,
>  service, or a particular class of goods, but that is not
>  technically a trademark, either because it is not
>  susceptible of exclusive appropriation as a trademark or
>  because it is not affixed to goods sold in the market.
>   3. the name by which an article or substance is known to the trade.
>
> I would say RSA defanitly meets 3, and probably 2.
>
> >
> > Not a trademark in this context. RSA is a trademark for the RSA
> corporation
> > and it uses it in various other contexts.
> >
> > -The
> > -.Tn MD5
> > -and
> > -.Tn SHA-1
> > -algorithms have been proven to be vulnerable to practical collision
> > -attacks and should not be relied upon to produce unique outputs,
> > +The MD5 and SHA-1 algorithms have been proven to be vulnerable to
> practical
> > +collision attacks and should not be relied upon to produce unique
> outputs,
> >
> > MD5 and SHA-1 are not trade names in this context. The rest seem similar,
> > though I've not gone to the trouble to look them all up.
>
> I would disagree under the definition of trade name above,
> you seem to be applying the definition of trade mark.
>

None of these are trade names. They are all simple names used to describe
different algorithms. They are no more trade names than bubble sort or
radix tree.

>
> > All in all, while I have some sympathy to Rod's view that we're losing
> > semantic information by these changes in general, this particular one
> > actually fixes the abuse talked about in the mdoc manual, IMHO.
>
> Only if the macro is rigidly defined as "trademark" and it
> is not.
>

The macro is obsoleted in upstream. Splitting hairs on this isn't going to
change that. Time has passed this one by.

Warner

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


Re: svn commit: r362191 - head/sbin/md5

2020-06-15 Thread Rodney W. Grimes
> On Mon, Jun 15, 2020 at 7:34 AM Mateusz Piotrowski <0...@freebsd.org> wrote:
> 
> > Hi,
> >
> > On 6/15/20 2:33 PM, Rodney W. Grimes wrote:
> > > [ Charset UTF-8 unsupported, converting... ]
> > >> Author: fernape (ports committer)
> > >> Date: Mon Jun 15 10:08:02 2020
> > >> New Revision: 362191
> > >> URL: https://svnweb.freebsd.org/changeset/base/362191
> > >>
> > >> Log:
> > >>   md5(1): fix style in man page
> > >
> > > Mandoc is fine to ignore this, but it is wrong to call it useless.
> > >
> > > I really wish that this stop.  .Tn might be useless to mandoc,
> > > but it is a very usable thing if your formatting to something
> > > other than txt, as in a ps or pdf.
> >
> > In that case I would consider patching our in-tree mandoc to not warn
> > about Tn. Or request support for Tn or a well-defined replacement upstream.
> >
> > I can see the benefit of keeping Tn around, as it /might/ potentially
> > create nice formatting for HTML. On the other hand, I don't like the
> > idea of not following the linter.
> >
> 
> I thought that Tn thing was the general consensus thing and added to the
> linter because of that. The man page explains why it's problematic:
> 
>  Tn word ...
>   Supported only for compatibility, do not use this in new manuals.
>   Even though the macro name ("tradename") suggests a semantic
>   function, historic usage is inconsistent, mostly using it as a
>   presentation-level macro to request a small caps font.

I believe that comes about because of confusion over trade name vs
trademark.  They are not defined as the same thing.

> It was useful for the Unix trademark, but was tailor towards AT's
> preferred dressing for the Unix trademark, not for trademarks in general.

Crossing tradename with trademark?

> In this case, there were several instances of abuse:
> 
> -.Tn RSA .
> +key under a public-key cryptosystem such as RSA.

trade name: noun
  1. the name used by a manufacturer, merchant, service company,
 farming business, etc., to identify itself individually
 as a business.
  2. a word or phrase used in a trade to designate a business,
 service, or a particular class of goods, but that is not
 technically a trademark, either because it is not
 susceptible of exclusive appropriation as a trademark or
 because it is not affixed to goods sold in the market.
  3. the name by which an article or substance is known to the trade.

I would say RSA defanitly meets 3, and probably 2.

> 
> Not a trademark in this context. RSA is a trademark for the RSA corporation
> and it uses it in various other contexts.
> 
> -The
> -.Tn MD5
> -and
> -.Tn SHA-1
> -algorithms have been proven to be vulnerable to practical collision
> -attacks and should not be relied upon to produce unique outputs,
> +The MD5 and SHA-1 algorithms have been proven to be vulnerable to practical
> +collision attacks and should not be relied upon to produce unique outputs,
> 
> MD5 and SHA-1 are not trade names in this context. The rest seem similar,
> though I've not gone to the trouble to look them all up.

I would disagree under the definition of trade name above,
you seem to be applying the definition of trade mark.

> 
> All in all, while I have some sympathy to Rod's view that we're losing
> semantic information by these changes in general, this particular one
> actually fixes the abuse talked about in the mdoc manual, IMHO.

Only if the macro is rigidly defined as "trademark" and it
is not.

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


svn commit: r362205 - head/sys/compat/linux

2020-06-15 Thread Edward Tomasz Napierala
Author: trasz
Date: Mon Jun 15 20:12:10 2020
New Revision: 362205
URL: https://svnweb.freebsd.org/changeset/base/362205

Log:
  Make Linux uname(2) return x86_64 to 32-bit apps.  This helps Steam.
  
  PR:   kern/240432
  Analyzed by by:   Alex S 
  Reviewed by:  emaste
  MFC after:2 weeks
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D25248

Modified:
  head/sys/compat/linux/linux_misc.c

Modified: head/sys/compat/linux/linux_misc.c
==
--- head/sys/compat/linux/linux_misc.c  Mon Jun 15 19:46:34 2020
(r362204)
+++ head/sys/compat/linux/linux_misc.c  Mon Jun 15 20:12:10 2020
(r362205)
@@ -704,7 +704,17 @@ linux_newuname(struct thread *td, struct linux_newunam
*p = '\0';
break;
}
+#if defined(__amd64__)
+   /*
+* On amd64, Linux uname(2) needs to return "x86_64"
+* for both 64-bit and 32-bit applications.  On 32-bit,
+* the string returned by getauxval(AT_PLATFORM) needs
+* to remain "i686", though.
+*/
+   strlcpy(utsname.machine, "x86_64", LINUX_MAX_UTSNAME);
+#else
strlcpy(utsname.machine, linux_kplatform, LINUX_MAX_UTSNAME);
+#endif
 
return (copyout(, args->buf, sizeof(utsname)));
 }
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r362204 - head/sys/dev/virtio/network

2020-06-15 Thread Vincenzo Maffione
Author: vmaffione
Date: Mon Jun 15 19:46:34 2020
New Revision: 362204
URL: https://svnweb.freebsd.org/changeset/base/362204

Log:
  if_vtnet: let vtnet_rx_vq_intr() and vtnet_rxq_tq_intr() share code
  
  Since the two functions are similar, introduce a common function
  (vtnet_rx_vq_process()) to share common code.
  This also improves locking, by ensuring vrxs_rescheduled is accessed
  under the RXQ lock, and taskqueue_enqueue() is not called under the
  lock (therefore avoiding a spurious duplicate lock warning).
  
  Reported by:  jrtc27
  MFC after:2 weeks

Modified:
  head/sys/dev/virtio/network/if_vtnet.c

Modified: head/sys/dev/virtio/network/if_vtnet.c
==
--- head/sys/dev/virtio/network/if_vtnet.c  Mon Jun 15 19:38:48 2020
(r362203)
+++ head/sys/dev/virtio/network/if_vtnet.c  Mon Jun 15 19:46:34 2020
(r362204)
@@ -128,6 +128,7 @@ static int  vtnet_rxq_merged_eof(struct vtnet_rxq *, st
 static voidvtnet_rxq_input(struct vtnet_rxq *, struct mbuf *,
struct virtio_net_hdr *);
 static int vtnet_rxq_eof(struct vtnet_rxq *);
+static voidvtnet_rx_vq_process(struct vtnet_rxq *rxq, int tries);
 static voidvtnet_rx_vq_intr(void *);
 static voidvtnet_rxq_tq_intr(void *, int);
 
@@ -1915,20 +1916,17 @@ vtnet_rxq_eof(struct vtnet_rxq *rxq)
 }
 
 static void
-vtnet_rx_vq_intr(void *xrxq)
+vtnet_rx_vq_process(struct vtnet_rxq *rxq, int tries)
 {
struct vtnet_softc *sc;
-   struct vtnet_rxq *rxq;
struct ifnet *ifp;
-   int tries, more;
+   int more;
 #ifdef DEV_NETMAP
int nmirq;
 #endif /* DEV_NETMAP */
 
-   rxq = xrxq;
sc = rxq->vtnrx_sc;
ifp = sc->vtnet_ifp;
-   tries = 0;
 
if (__predict_false(rxq->vtnrx_id >= sc->vtnet_act_vq_pairs)) {
/*
@@ -1976,58 +1974,32 @@ again:
 * This is an occasional condition or race (when !more),
 * so retry a few times before scheduling the taskqueue.
 */
-   if (tries++ < VTNET_INTR_DISABLE_RETRIES)
+   if (tries-- > 0)
goto again;
 
-   VTNET_RXQ_UNLOCK(rxq);
rxq->vtnrx_stats.vrxs_rescheduled++;
+   VTNET_RXQ_UNLOCK(rxq);
taskqueue_enqueue(rxq->vtnrx_tq, >vtnrx_intrtask);
} else
VTNET_RXQ_UNLOCK(rxq);
 }
 
 static void
-vtnet_rxq_tq_intr(void *xrxq, int pending)
+vtnet_rx_vq_intr(void *xrxq)
 {
-   struct vtnet_softc *sc;
struct vtnet_rxq *rxq;
-   struct ifnet *ifp;
-   int more;
-#ifdef DEV_NETMAP
-   int nmirq;
-#endif /* DEV_NETMAP */
 
rxq = xrxq;
-   sc = rxq->vtnrx_sc;
-   ifp = sc->vtnet_ifp;
+   vtnet_rx_vq_process(rxq, VTNET_INTR_DISABLE_RETRIES);
+}
 
-   VTNET_RXQ_LOCK(rxq);
+static void
+vtnet_rxq_tq_intr(void *xrxq, int pending)
+{
+   struct vtnet_rxq *rxq;
 
-#ifdef DEV_NETMAP
-   nmirq = netmap_rx_irq(ifp, rxq->vtnrx_id, );
-   if (nmirq != NM_IRQ_PASS) {
-   VTNET_RXQ_UNLOCK(rxq);
-   if (nmirq == NM_IRQ_RESCHED) {
-   taskqueue_enqueue(rxq->vtnrx_tq, >vtnrx_intrtask);
-   }
-   return;
-   }
-#endif /* DEV_NETMAP */
-
-   if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) {
-   VTNET_RXQ_UNLOCK(rxq);
-   return;
-   }
-
-   more = vtnet_rxq_eof(rxq);
-   if (more || vtnet_rxq_enable_intr(rxq) != 0) {
-   if (!more)
-   vtnet_rxq_disable_intr(rxq);
-   rxq->vtnrx_stats.vrxs_rescheduled++;
-   taskqueue_enqueue(rxq->vtnrx_tq, >vtnrx_intrtask);
-   }
-
-   VTNET_RXQ_UNLOCK(rxq);
+   rxq = xrxq;
+   vtnet_rx_vq_process(rxq, 0);
 }
 
 static int
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r362203 - in head/lib/csu: . aarch64 amd64 arm common i386 mips powerpc powerpc64 riscv

2020-06-15 Thread John Baldwin
Author: jhb
Date: Mon Jun 15 19:38:48 2020
New Revision: 362203
URL: https://svnweb.freebsd.org/changeset/base/362203

Log:
  Remove the sed hack for ABI tag notes.
  
  The ELF notes compiled in C were placed in a section with the wrong type
  (SHT_PROGBITS instead of SHT_NOTE).  Previously, sed was used on the
  generated assembly to rewrite the section type.  Instead, write the notes
  in assembly which permits setting the correct section type directly.
  
  While here, move inline assembly entry points out of C and into assembly
  for aarch64, arm, and riscv.
  
  Reviewed by:  kib
  Tested on:amd64 (cirrus-ci), riscv64
  Sponsored by: DARPA
  Differential Revision:https://reviews.freebsd.org/D25211

Added:
  head/lib/csu/aarch64/crt1_c.c
 - copied, changed from r362202, head/lib/csu/aarch64/crt1.c
  head/lib/csu/aarch64/crt1_s.S
 - copied, changed from r362201, head/lib/csu/aarch64/crt1.c
  head/lib/csu/amd64/crt1_c.c
 - copied, changed from r362202, head/lib/csu/amd64/crt1.c
  head/lib/csu/arm/crt1_c.c
 - copied, changed from r362202, head/lib/csu/arm/crt1.c
  head/lib/csu/arm/crt1_s.S
 - copied, changed from r362201, head/lib/csu/arm/crt1.c
  head/lib/csu/common/crtbrand.S
 - copied, changed from r362202, head/lib/csu/common/crtbrand.c
  head/lib/csu/common/ignore_init_note.S
 - copied, changed from r362201, head/lib/csu/common/ignore_init.c
  head/lib/csu/mips/crt1_c.c
 - copied, changed from r362202, head/lib/csu/mips/crt1.c
  head/lib/csu/powerpc/crt1_c.c
 - copied, changed from r362202, head/lib/csu/powerpc/crt1.c
  head/lib/csu/powerpc64/crt1_c.c
 - copied, changed from r362202, head/lib/csu/powerpc64/crt1.c
  head/lib/csu/riscv/crt1_c.c
 - copied, changed from r362202, head/lib/csu/riscv/crt1.c
  head/lib/csu/riscv/crt1_s.S
 - copied, changed from r362201, head/lib/csu/riscv/crt1.c
Deleted:
  head/lib/csu/aarch64/crt1.c
  head/lib/csu/amd64/crt1.c
  head/lib/csu/arm/crt1.c
  head/lib/csu/common/crtbrand.c
  head/lib/csu/mips/crt1.c
  head/lib/csu/powerpc/crt1.c
  head/lib/csu/powerpc64/crt1.c
  head/lib/csu/riscv/crt1.c
Modified:
  head/lib/csu/Makefile.inc
  head/lib/csu/aarch64/Makefile
  head/lib/csu/amd64/Makefile
  head/lib/csu/arm/Makefile
  head/lib/csu/common/ignore_init.c
  head/lib/csu/i386/Makefile
  head/lib/csu/i386/crt1_c.c
  head/lib/csu/i386/crt1_s.S
  head/lib/csu/mips/Makefile
  head/lib/csu/powerpc/Makefile
  head/lib/csu/powerpc64/Makefile
  head/lib/csu/riscv/Makefile

Modified: head/lib/csu/Makefile.inc
==
--- head/lib/csu/Makefile.inc   Mon Jun 15 18:57:43 2020(r362202)
+++ head/lib/csu/Makefile.inc   Mon Jun 15 19:38:48 2020(r362203)
@@ -2,8 +2,6 @@
 
 SSP_CFLAGS=
 
-SED_FIX_NOTE = -i "" -e '/\.note\.tag/s/progbits/note/'
-
 NO_WMISSING_VARIABLE_DECLARATIONS=
 
 .include 
@@ -12,6 +10,8 @@ NO_WMISSING_VARIABLE_DECLARATIONS=
 
 OBJS+= crtbegin.o crtbeginS.o crtbeginT.o
 OBJS+= crtend.o crtendS.o
+
+ACFLAGS+=  -DLOCORE
 
 CFLAGS+=   -fno-asynchronous-unwind-tables
 CFLAGS+=   -fno-omit-frame-pointer

Modified: head/lib/csu/aarch64/Makefile
==
--- head/lib/csu/aarch64/Makefile   Mon Jun 15 18:57:43 2020
(r362202)
+++ head/lib/csu/aarch64/Makefile   Mon Jun 15 19:38:48 2020
(r362203)
@@ -2,9 +2,9 @@
 
 .PATH: ${.CURDIR:H}/common
 
-SRCS=  crt1.c crti.S crtn.S
+SRCS=  crti.S crtn.S
 OBJS=  ${SRCS:N*.h:R:S/$/.o/g}
-OBJS+= Scrt1.o gcrt1.o
+OBJS+= Scrt1.o crt1.o gcrt1.o
 CFLAGS+=   -I${.CURDIR:H}/common \
-I${SRCTOP}/lib/libc/include
 CFLAGS+=   -DCRT_IRELOC_SUPPRESS
@@ -17,31 +17,21 @@ FILESDIR=   ${LIBDIR}
 # These FILES qualify as libraries for the purpose of LIBRARIES_ONLY.
 .undef LIBRARIES_ONLY
 
-CLEANFILES=${OBJS}
-CLEANFILES+=   crt1.s gcrt1.s Scrt1.s
+CLEANFILES=${OBJS} crt1_c.o crt1_s.o gcrt1_c.o Scrt1_c.o
 
-# See the comment in lib/csu/common/crtbrand.c for the reason crt1.c is not
-# directly compiled to .o files.
+gcrt1_c.o: crt1_c.c
+   ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c
 
-crt1.s: crt1.c
-   ${CC} ${CFLAGS} -S -o ${.TARGET} ${.CURDIR}/crt1.c
-   sed ${SED_FIX_NOTE} ${.TARGET}
+gcrt1.o: gcrt1_c.o crt1_s.o
+   ${LD} ${_LDFLAGS} -o gcrt1.o -r crt1_s.o gcrt1_c.o
 
-crt1.o: crt1.s
-   ${CC} ${CFLAGS:N-g} ${ACFLAGS} -c -o ${.TARGET} crt1.s
+crt1.o:crt1_c.o crt1_s.o
+   ${LD} ${_LDFLAGS} -o crt1.o -r crt1_s.o crt1_c.o
 
-gcrt1.s: crt1.c
-   ${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${.CURDIR}/crt1.c
-   sed ${SED_FIX_NOTE} ${.TARGET}
+Scrt1_c.o: crt1_c.c
+   ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c
 
-gcrt1.o: gcrt1.s
-   ${CC} ${CFLAGS:N-g} ${ACFLAGS} -c -o ${.TARGET} gcrt1.s
-
-Scrt1.s: crt1.c
-   ${CC} ${CFLAGS} -fPIC -DPIC -S -o 

Re: svn commit: r361944 - in head/sys/dev/virtio: . network

2020-06-15 Thread Vincenzo Maffione
Il giorno lun 15 giu 2020 alle ore 00:05 Jessica Clarke 
ha scritto:

> On 14 Jun 2020, at 22:22, Tom Jones  wrote:
> > On Sun, Jun 14, 2020 at 09:56:03PM +0100, Jessica Clarke wrote:
> >> On 14 Jun 2020, at 20:51, Tom Jones  wrote:
> >>> On Mon, Jun 08, 2020 at 09:51:36PM +, Jessica Clarke wrote:
>  Author: jrtc27
>  Date: Mon Jun  8 21:51:36 2020
>  New Revision: 361944
>  URL: https://svnweb.freebsd.org/changeset/base/361944
> 
>  Log:
>  virtio: Support non-legacy network device and queue
> 
>  The non-legacy interface always defines num_buffers in the header,
>  regardless of whether VIRTIO_NET_F_MRG_RXBUF, just leaving it unused.
> We
>  also need to ensure our virtqueue doesn't filter out
> VIRTIO_F_VERSION_1
>  during negotiation, as it supports non-legacy transports just fine.
> This
>  fixes network packet transmission on TinyEMU.
> 
>  Reviewed by:   br, brooks (mentor), jhb (mentor)
>  Approved by:   br, brooks (mentor), jhb (mentor)
>  Differential Revision: https://reviews.freebsd.org/D25132
> 
>  Modified:
>  head/sys/dev/virtio/network/if_vtnet.c
>  head/sys/dev/virtio/network/if_vtnetvar.h
>  head/sys/dev/virtio/virtio.c
>  head/sys/dev/virtio/virtqueue.c
> 
> >>>
> >>> Hi Jessica,
> >>>
> >>> After updating my current bhyve vm today (on a 12.1 host), networking
> no longer
> >>> works. Reverting this commit seems to resolve the issue. I think vtnet
> is not
> >>> passing enough data up to the ip layer.
> >>>
> >>> If I capture on the tap interface for the vm I see arp requests and arp
> >>> replies, however kern.msgbuf is full of:
> >>>
> >>> <5>arp: short packet received on vtnet0
> >>>
> >>> and netstat does not see any replies to arp requests:
> >>>
> >>> root@freebsd-current:~ # netstat -s -p arp
> >>> arp:
> >>>   11 ARP requests sent
> >>>   0 ARP requests failed to sent
> >>>   0 ARP replies sent
> >>>   0 ARP requests received
> >>>   0 ARP replies received
> >>>   0 ARP packets received
> >>>   24 total packets dropped due to no ARP entry
> >>>   2 ARP entrys timed out
> >>>   0 Duplicate IPs seen
> >>>
> >>> If I set up an arp entry manually I can see ICMP echo requests and
> responses on
> >>> the tap interface, but the vm does not see the responses.
> >>>
> >>> root@freebsd-current:~ # netstat -s -p ip
> >>> ip:
> >>>   7 total packets received
> >>>   0 bad header checksums
> >>>   0 with size smaller than minimum
> >>>   7 with data size < data length
> >>>   0 with ip length > max ip packet size
> >>>   0 with header length < data size
> >>>   0 with data length < header length
> >>>
> >>> The line
> >>>
> >>>   7 with data size < data length
> >>>
> >>> makes me think that vtnet is truncating packets.
> >>>
> >>> markj pointed me at this bug in irc which might also be related:
> >>>
> >>> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=247242
> >>
> >> Hi Tom,
> >> Sorry about that; it seems bhyve hits the "legacy and no MrgRxBuf"
> >> case. Could you please try the patch below?
> >>
> >> Jess
> >>
> >
> > This changed fixed the issue for me. Please feel free to add
> >
> > Tested By: thj
> >
> > when you commit.
>
> Great, thanks for the report.
>
> > In testing I this lor went by, I wonder if this is something you care
> about:
> >
> > acquiring duplicate lock of same type: "vtnet0-rx0"
> > 1st vtnet0-rx0 @
> /usr/home/tj/code/freebsd/projects/review-D25220/sys/dev/virtio/network/if_vtnet.c:1780
> > 2nd vtnet0-rx0 @
> /usr/home/tj/code/freebsd/projects/review-D25220/sys/kern/subr_taskqueue.c:281
> > stack backtrace:
> > #0 0x80c32881 at witness_debugger+0x71
> > #1 0x80ba3e54 at __mtx_lock_flags+0x94
> > #2 0x80c24bd2 at taskqueue_enqueue+0x42
> > #3 0x80a1af99 at vtnet_rxq_tq_intr+0xb9
> > #4 0x80c2520a at taskqueue_run_locked+0xaa
> > #5 0x80c26284 at taskqueue_thread_loop+0x94
> > #6 0x80b830e0 at fork_exit+0x80
> > #7 0x81040eae at fork_trampoline+0xe
>
> Hm, I think that's just a false-positive, because if_vtnet constructs
> the taskqueue using the same name as its own internal mutexes. Though
> the locking around vtnet_rx_vq_intr and vtnet_rxq_tq_intr is a bit
> fishy given they're rather similar yet inconsistent. I would imagine
> rxq->vtnrx_stats.vrxs_rescheduled is supposed to be protected by that
> mutex, but wouldn't like to say whether taskqueue_enqueue needs to be.
> Vincenzo, you recently touched code around there, perhaps you could be
> persuaded to have a quick look?..
>

Yes, you are right on both. There is also code duplication that can be
easily removed.
I will fix that.

Cheers,
  Vincenzo

>
> Jess
>
>
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to 

Re: svn commit: r362152 - head/usr.bin/ldd

2020-06-15 Thread Konstantin Belousov
On Mon, Jun 15, 2020 at 11:45:31AM -0700, John Baldwin wrote:
> On 6/13/20 11:21 AM, Konstantin Belousov wrote:
> > Author: kib
> > Date: Sat Jun 13 18:21:31 2020
> > New Revision: 362152
> > URL: https://svnweb.freebsd.org/changeset/base/362152
> > 
> > Log:
> >   Fix ldd for PIE binaries after rtld stopped accepting binaries for dlopen.
> >   
> >   ldd proclaims ET_DYN objects as shared libraries and tries to
> >   dlopen(RTLD_TRACE) them to get dependencies. Since PIE binaries are
> >   ET_DYN | DF_1_PIE, refusal to dlopen such binaries breaks ldd.
> >   
> >   Fix it by reading and parsing dynamic segment looking for DF_FLAG_1
> >   and taking DF_1_PIE into account when deciding between binary and
> >   library.
> 
> Hmmm, I have an alternate patch for this that instead depends on the
> present of PT_INTERP (since we already look at program headers) to
> determine PIE vs not-PIE.
>From my understanding of some discussions on the ABI list PT_INTERP is
not the characteristic property of the binary.  Instead it is
  ET_EXEC | (ET_DYN && DF_1_PIE),
i.e. this is the reason why the flag was added.

> This has the advantage of working for older
> binaries since DF_1_PIE is relatively recent.  (I had also changed it to
> use libelf to reduce code duplication for the 32-bit compat stuff, but
> it was pending on getting the branding sorted out since it still doesn't
> fully work for RISC-V and aarch64 shared libraries until they are
> branded as the patches also look at notes sections to check for the
> FreeBSD ABI note tag to decide if a shared library is a FreeBSD one that
> can be passed to dlopen()).

Initially I considered to just reenable dlopening ET_DYN && DF_1_PIE
for tracing.  After your note about old binaries without DF_1_PIE, I
think it is even better idea.

I do not have an opinion on use of libelf in ldd.  It is fine, perhaps,
since I do not think about ldd as anything fundamental, just a convenience
wrapper around rtld.  So one more dependency for ldd is not that critical.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r362202 - head/sys/arm/include

2020-06-15 Thread John Baldwin
Author: jhb
Date: Mon Jun 15 18:57:43 2020
New Revision: 362202
URL: https://svnweb.freebsd.org/changeset/base/362202

Log:
  Simplify MACHINE_ARCH to be a single string.
  
  Big endian and armv4 mean that we are now down to only two supported
  variants.  A future change will use MACHINE_ARCH in assembly which
  does not support C-style string concatentation and thus needs
  MACHINE_ARCH defined as a single string.
  
  Reviewed by:  imp
  Sponsored by: DARPA
  Differential Revision:https://reviews.freebsd.org/D25211

Modified:
  head/sys/arm/include/param.h

Modified: head/sys/arm/include/param.h
==
--- head/sys/arm/include/param.hMon Jun 15 16:35:27 2020
(r362201)
+++ head/sys/arm/include/param.hMon Jun 15 18:57:43 2020
(r362202)
@@ -54,25 +54,15 @@
 
 #define __PCI_REROUTE_INTERRUPT
 
-#if __ARM_ARCH >= 7
-#define_V_SUFFIX "v7"
-#elif __ARM_ARCH >= 6
-#define_V_SUFFIX "v6"
-#else
-#define_V_SUFFIX ""
-#endif
-
-#ifdef __ARM_BIG_ENDIAN
-#define_EB_SUFFIX "eb"
-#else
-#define_EB_SUFFIX ""
-#endif
-
 #ifndef MACHINE
 #defineMACHINE "arm"
 #endif
 #ifndef MACHINE_ARCH
-#defineMACHINE_ARCH"arm" _V_SUFFIX _EB_SUFFIX
+#if __ARM_ARCH >= 7
+#defineMACHINE_ARCH"armv7"
+#else
+#defineMACHINE_ARCH"armv6"
+#endif
 #endif
 
 #ifdef SMP
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r362152 - head/usr.bin/ldd

2020-06-15 Thread John Baldwin
On 6/13/20 11:21 AM, Konstantin Belousov wrote:
> Author: kib
> Date: Sat Jun 13 18:21:31 2020
> New Revision: 362152
> URL: https://svnweb.freebsd.org/changeset/base/362152
> 
> Log:
>   Fix ldd for PIE binaries after rtld stopped accepting binaries for dlopen.
>   
>   ldd proclaims ET_DYN objects as shared libraries and tries to
>   dlopen(RTLD_TRACE) them to get dependencies. Since PIE binaries are
>   ET_DYN | DF_1_PIE, refusal to dlopen such binaries breaks ldd.
>   
>   Fix it by reading and parsing dynamic segment looking for DF_FLAG_1
>   and taking DF_1_PIE into account when deciding between binary and
>   library.

Hmmm, I have an alternate patch for this that instead depends on the
present of PT_INTERP (since we already look at program headers) to
determine PIE vs not-PIE.  This has the advantage of working for older
binaries since DF_1_PIE is relatively recent.  (I had also changed it to
use libelf to reduce code duplication for the 32-bit compat stuff, but
it was pending on getting the branding sorted out since it still doesn't
fully work for RISC-V and aarch64 shared libraries until they are
branded as the patches also look at notes sections to check for the
FreeBSD ABI note tag to decide if a shared library is a FreeBSD one that
can be passed to dlopen()).

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


svn commit: r362201 - in head/sys/dev: cxgb cxgbe mlx4/mlx4_en mlx5/mlx5_en mxge oce

2020-06-15 Thread Ryan Moeller
Author: freqlabs
Date: Mon Jun 15 16:35:27 2020
New Revision: 362201
URL: https://svnweb.freebsd.org/changeset/base/362201

Log:
  Avoid trying to toggle TSO twice
  
  Remove TSO from the toggle mask when automatically disabled by TXCKSUM* in
  various NIC drivers.
  
  Reviewed by:  hselasky, np, gallatin, jpaetzel
  Approved by:  mav (mentor)
  MFC after:1 week
  Sponsored by: iXsystems, Inc.
  Differential Revision:https://reviews.freebsd.org/D25120

Modified:
  head/sys/dev/cxgb/cxgb_main.c
  head/sys/dev/cxgbe/t4_main.c
  head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c
  head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
  head/sys/dev/mxge/if_mxge.c
  head/sys/dev/oce/oce_if.c

Modified: head/sys/dev/cxgb/cxgb_main.c
==
--- head/sys/dev/cxgb/cxgb_main.c   Mon Jun 15 15:59:44 2020
(r362200)
+++ head/sys/dev/cxgb/cxgb_main.c   Mon Jun 15 16:35:27 2020
(r362201)
@@ -1964,6 +1964,7 @@ fail:
 
if (IFCAP_TSO4 & ifp->if_capenable &&
!(IFCAP_TXCSUM & ifp->if_capenable)) {
+   mask &= ~IFCAP_TSO4;
ifp->if_capenable &= ~IFCAP_TSO4;
if_printf(ifp,
"tso4 disabled due to -txcsum.\n");
@@ -1975,6 +1976,7 @@ fail:
 
if (IFCAP_TSO6 & ifp->if_capenable &&
!(IFCAP_TXCSUM_IPV6 & ifp->if_capenable)) {
+   mask &= ~IFCAP_TSO6;
ifp->if_capenable &= ~IFCAP_TSO6;
if_printf(ifp,
"tso6 disabled due to -txcsum6.\n");

Modified: head/sys/dev/cxgbe/t4_main.c
==
--- head/sys/dev/cxgbe/t4_main.cMon Jun 15 15:59:44 2020
(r362200)
+++ head/sys/dev/cxgbe/t4_main.cMon Jun 15 16:35:27 2020
(r362201)
@@ -1989,6 +1989,7 @@ cxgbe_ioctl(struct ifnet *ifp, unsigned long cmd, cadd
 
if (IFCAP_TSO4 & ifp->if_capenable &&
!(IFCAP_TXCSUM & ifp->if_capenable)) {
+   mask &= ~IFCAP_TSO4;
ifp->if_capenable &= ~IFCAP_TSO4;
if_printf(ifp,
"tso4 disabled due to -txcsum.\n");
@@ -2000,6 +2001,7 @@ cxgbe_ioctl(struct ifnet *ifp, unsigned long cmd, cadd
 
if (IFCAP_TSO6 & ifp->if_capenable &&
!(IFCAP_TXCSUM_IPV6 & ifp->if_capenable)) {
+   mask &= ~IFCAP_TSO6;
ifp->if_capenable &= ~IFCAP_TSO6;
if_printf(ifp,
"tso6 disabled due to -txcsum6.\n");

Modified: head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c
==
--- head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c  Mon Jun 15 15:59:44 2020
(r362200)
+++ head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c  Mon Jun 15 16:35:27 2020
(r362201)
@@ -2006,6 +2006,7 @@ static int mlx4_en_ioctl(struct ifnet *dev, u_long com
 
if (IFCAP_TSO4 & dev->if_capenable &&
!(IFCAP_TXCSUM & dev->if_capenable)) {
+   mask &= ~IFCAP_TSO4;
dev->if_capenable &= ~IFCAP_TSO4;
dev->if_hwassist &= ~CSUM_IP_TSO;
if_printf(dev,
@@ -2018,6 +2019,7 @@ static int mlx4_en_ioctl(struct ifnet *dev, u_long com
 
if (IFCAP_TSO6 & dev->if_capenable &&
!(IFCAP_TXCSUM_IPV6 & dev->if_capenable)) {
+   mask &= ~IFCAP_TSO6;
dev->if_capenable &= ~IFCAP_TSO6;
dev->if_hwassist &= ~CSUM_IP6_TSO;
if_printf(dev,

Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
==
--- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.cMon Jun 15 15:59:44 2020
(r362200)
+++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.cMon Jun 15 16:35:27 2020
(r362201)
@@ -3323,6 +3323,7 @@ mlx5e_ioctl(struct ifnet *ifp, u_long command, caddr_t
 
if (IFCAP_TSO4 & ifp->if_capenable &&
!(IFCAP_TXCSUM & ifp->if_capenable)) {
+   mask &= ~IFCAP_TSO4;
ifp->if_capenable &= ~IFCAP_TSO4;
ifp->if_hwassist &= ~CSUM_IP_TSO;
mlx5_en_err(ifp,
@@ -3335,6 +3336,7 @@ mlx5e_ioctl(struct ifnet *ifp, u_long command, caddr_t
 
 

Re: svn commit: r362191 - head/sbin/md5

2020-06-15 Thread Warner Losh
On Mon, Jun 15, 2020 at 7:34 AM Mateusz Piotrowski <0...@freebsd.org> wrote:

> Hi,
>
> On 6/15/20 2:33 PM, Rodney W. Grimes wrote:
> > [ Charset UTF-8 unsupported, converting... ]
> >> Author: fernape (ports committer)
> >> Date: Mon Jun 15 10:08:02 2020
> >> New Revision: 362191
> >> URL: https://svnweb.freebsd.org/changeset/base/362191
> >>
> >> Log:
> >>   md5(1): fix style in man page
> >
> > Mandoc is fine to ignore this, but it is wrong to call it useless.
> >
> > I really wish that this stop.  .Tn might be useless to mandoc,
> > but it is a very usable thing if your formatting to something
> > other than txt, as in a ps or pdf.
>
> In that case I would consider patching our in-tree mandoc to not warn
> about Tn. Or request support for Tn or a well-defined replacement upstream.
>
> I can see the benefit of keeping Tn around, as it /might/ potentially
> create nice formatting for HTML. On the other hand, I don't like the
> idea of not following the linter.
>

I thought that Tn thing was the general consensus thing and added to the
linter because of that. The man page explains why it's problematic:

 Tn word ...
  Supported only for compatibility, do not use this in new manuals.
  Even though the macro name ("tradename") suggests a semantic
  function, historic usage is inconsistent, mostly using it as a
  presentation-level macro to request a small caps font.

It was useful for the Unix trademark, but was tailor towards AT's
preferred dressing for the Unix trademark, not for trademarks in general.

In this case, there were several instances of abuse:

-.Tn RSA .
+key under a public-key cryptosystem such as RSA.

Not a trademark in this context. RSA is a trademark for the RSA corporation
and it uses it in various other contexts.

-The
-.Tn MD5
-and
-.Tn SHA-1
-algorithms have been proven to be vulnerable to practical collision
-attacks and should not be relied upon to produce unique outputs,
+The MD5 and SHA-1 algorithms have been proven to be vulnerable to practical
+collision attacks and should not be relied upon to produce unique outputs,

MD5 and SHA-1 are not trade names in this context. The rest seem similar,
though I've not gone to the trouble to look them all up.

All in all, while I have some sympathy to Rod's view that we're losing
semantic information by these changes in general, this particular one
actually fixes the abuse talked about in the mdoc manual, IMHO.

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


svn commit: r362199 - head/sys/netgraph/bluetooth/include

2020-06-15 Thread Takanori Watanabe
Author: takawata
Date: Mon Jun 15 14:58:40 2020
New Revision: 362199
URL: https://svnweb.freebsd.org/changeset/base/362199

Log:
  Update event masks constant to Bluetooth core spec V5.2
  and add LE Events.
  
  PR: 247257
  Submitted by: Marc Veldman

Modified:
  head/sys/netgraph/bluetooth/include/ng_hci.h

Modified: head/sys/netgraph/bluetooth/include/ng_hci.h
==
--- head/sys/netgraph/bluetooth/include/ng_hci.hMon Jun 15 13:46:40 
2020(r362198)
+++ head/sys/netgraph/bluetooth/include/ng_hci.hMon Jun 15 14:58:40 
2020(r362199)
@@ -225,7 +225,8 @@
 /* 0x0010 - 0x8000 - reserved for future use */
 
 /* Event masks */
-#define NG_HCI_EVMSK_ALL   0x
+#define NG_HCI_EVMSK_DEFAULT   0x1fff
+#define NG_HCI_EVMSK_ALL   0x1fff  
 #define NG_HCI_EVMSK_NONE  0x
 #define NG_HCI_EVMSK_INQUIRY_COMPL 0x0001
 #define NG_HCI_EVMSK_INQUIRY_RESULT0x0002
@@ -259,7 +260,70 @@
 #define NG_HCI_EVMSK_QOS_VIOLATION 0x2000
 #define NG_HCI_EVMSK_PAGE_SCAN_MODE_CHANGE 0x4000
 #define NG_HCI_EVMSK_PAGE_SCAN_REP_MODE_CHANGE 0x8000
-/* 0x0001 - 0x8000 - reserved for future use */
+#define NG_HCI_EVMSK_FLOW_SPEC_COMPL   0x0001
+#define NG_HCI_EVMSK_INQUIRY_RESULT_W_RSSI 0x0002
+#define NG_HCI_EVMSK_READ_REM_EXT_FEAT_COMPL   0x0004
+
+/* 0x0008 -0x0800 - not in use */ 
+
+#define NG_HCI_EVMSK_SYNC_CONN_COMPL   0x1000
+#define NG_HCI_EVMSK_SYNC_CONN_CHANGED 0x2000
+#define NG_HCI_EVMSK_SNIFF_SUBRATING   0x4000
+#define NG_HCI_EVMSK_EXT_INQUIRY_RESULT0x8000
+#define NG_HCI_EVMSK_ENC_KEY_REFRESH_COMPL 0x0001
+#define NG_HCI_EVMSK_IO_CAPABILITY_REQ 0x0002
+#define NG_HCI_EVMSK_IO_CAPABILITY_RESP0x0004
+#define NG_HCI_EVMSK_USER_CONFIRMATION_REQ 0x0008
+#define NG_HCI_EVMSK_USER_PASSKEY_REQ  0x0010
+#define NG_HCI_EVMSK_REM_OOB_DATA_REQ  0x0020
+#define NG_HCI_EVMSK_SIMPLE_PAIRING_COMPL  0x0040
+#define NG_HCI_EVMSK_LINK_SUPERV_TO_CHANGED0x0080
+#define NG_HCI_EVMSK_ENH_FLUSH_COMPL   0x0100
+#define NG_HCI_EVMSK_USER_PASSKEY_NOTIFICATION 0x0200
+#define NG_HCI_EVMSK_KEYPRESS_NOTIFICATION 0x0400
+#define NG_HCI_EVMSK_REM_HOST_SUPP_FEAT_NOTIFI 0x0800
+#define NG_HCI_EVMSK_LE_META   0x1000
+/* 0x1001 - 0x8000 - reserved for future use */
+
+/* LE events masks*/
+#define NG_HCI_LEEVMSK_ALL 0x3fff
+#define NG_HCI_LEEVMSK_NONE0x
+#define NG_HCI_LEEVMSK_DEFAULT 0x001f
+#define NG_HCI_LEEVMSK_CONN_COMPLETE   0x0001
+#define NG_HCI_LEEVMSK_ADV_REP 0x0002
+#define NG_HCI_LEEVMSK_CONN_UPDATE 0x0004
+#define NG_HCI_LEEVMSK_READ_REM_FEAT_REQ   0x0008
+#define NG_HCI_LEEVMSK_LONG_TERM_KEY_REQ   0x0010
+#define NG_HCI_LEEVMSK_REM_CONN_PARAM_REQ  0x0020
+#define NG_HCI_LEEVMSK_DATA_LENGTH_CHG 0x0040
+#define NG_HCI_LEEVMSK_RD_LOC_P256_PK_COMPL0x0080
+#define NG_HCI_LEEVMSK_GEN_DHKEY_COMPL 0x0100
+#define NG_HCI_LEEVMSK_ENH_CONN_COMPL  0x0200
+#define NG_HCI_LEEVMSK_DIR_ADV_REP 0x0400
+#define NG_HCI_LEEVMSK_PHY_UPD_COMPL   0x0800
+#define NG_HCI_LEEVMSK_EXT_ADV_REP 0x1000
+#define NG_HCI_LEEVMSK_PER_ADV_SYNC_EST0x2000
+#define NG_HCI_LEEVMSK_PER_ADV_REP 0x4000
+#define NG_HCI_LEEVMSK_PER_ADV_SYNC_LOST   0x8000
+#define NG_HCI_LEEVMSK_SCAN_TIMEOUT0x0001
+#define NG_HCI_LEEVMSK_ADV_SET_TERM0x0002
+#define NG_HCI_LEEVMSK_SCAN_REQ_RCVD   0x0004
+#define NG_HCI_LEEVMSK_CHAN_SEL_ALGO   0x0008
+#define NG_HCI_LEEVMSK_CONNLESS_IQ_REP 0x0001
+#define NG_HCI_LEEVMSK_CONN_IQ_REP 0x0002
+#define NG_HCI_LEEVMSK_CTE_REQ_FAILED  0x0004
+#define NG_HCI_LEEVMSK_PER_ADV_SYN_TRF_RCVD0x0008
+#define NG_HCI_LEEVMSK_CIS_EST 0x0010
+#define NG_HCI_LEEVMSK_CIS_REQ 0x0020
+#define NG_HCI_LEEVMSK_CREATE_BIG_COMPL0x0040
+#define 

Re: svn commit: r362191 - head/sbin/md5

2020-06-15 Thread Yuri Pankov

Mateusz Piotrowski wrote:

Hi,

On 6/15/20 2:33 PM, Rodney W. Grimes wrote:

[ Charset UTF-8 unsupported, converting... ]

Author: fernape (ports committer)
Date: Mon Jun 15 10:08:02 2020
New Revision: 362191
URL: https://svnweb.freebsd.org/changeset/base/362191

Log:
   md5(1): fix style in man page


Mandoc is fine to ignore this, but it is wrong to call it useless.

I really wish that this stop.  .Tn might be useless to mandoc,
but it is a very usable thing if your formatting to something
other than txt, as in a ps or pdf.


In that case I would consider patching our in-tree mandoc to not warn
about Tn. Or request support for Tn or a well-defined replacement upstream.

I can see the benefit of keeping Tn around, as it /might/ potentially
create nice formatting for HTML. On the other hand, I don't like the
idea of not following the linter.


It's marked as obsolete exactly because it's misused, quoting mdoc(7):

Even though the macro name (“tradename”) suggests a semantic
function, historic usage is inconsistent, mostly using it as a
presentation-level macro to request a small caps font.

If we want to somehow emphasize the text, .Sy, .Em, or similar macros 
should be used instead, I don't see why though, it certainly doesn't 
help the readability (IMO, of coursE).

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


Re: svn commit: r362191 - head/sbin/md5

2020-06-15 Thread Mateusz Piotrowski
Hi,

On 6/15/20 2:33 PM, Rodney W. Grimes wrote:
> [ Charset UTF-8 unsupported, converting... ]
>> Author: fernape (ports committer)
>> Date: Mon Jun 15 10:08:02 2020
>> New Revision: 362191
>> URL: https://svnweb.freebsd.org/changeset/base/362191
>>
>> Log:
>>   md5(1): fix style in man page
> 
> Mandoc is fine to ignore this, but it is wrong to call it useless.
> 
> I really wish that this stop.  .Tn might be useless to mandoc, 
> but it is a very usable thing if your formatting to something
> other than txt, as in a ps or pdf.

In that case I would consider patching our in-tree mandoc to not warn
about Tn. Or request support for Tn or a well-defined replacement upstream.

I can see the benefit of keeping Tn around, as it /might/ potentially
create nice formatting for HTML. On the other hand, I don't like the
idea of not following the linter.

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


svn commit: r362195 - head/contrib/opencsd

2020-06-15 Thread Andrew Turner
Author: andrew
Date: Mon Jun 15 13:03:01 2020
New Revision: 362195
URL: https://svnweb.freebsd.org/changeset/base/362195

Log:
  Bootstrap mergeinfo for OpenCSD
  
  Sponsored by: Innovate UK

Modified:
Directory Properties:
  head/contrib/opencsd/   (props changed)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r362191 - head/sbin/md5

2020-06-15 Thread Rodney W. Grimes
[ Charset UTF-8 unsupported, converting... ]
> Author: fernape (ports committer)
> Date: Mon Jun 15 10:08:02 2020
> New Revision: 362191
> URL: https://svnweb.freebsd.org/changeset/base/362191
> 
> Log:
>   md5(1): fix style in man page
>   
>   Fix a bunch of style problems reported by mandoc(1) and igor:
>   
>   mandoc: ./md5.1:19:71: STYLE: no blank before trailing delimiter: Nm ... 
> rmd160,
>   mandoc: ./md5.1:20:23: STYLE: no blank before trailing delimiter: Nm ...  
> skein512,
>   mandoc: ./md5.1:33:2: STYLE: useless macro: Tn
>   mandoc: ./md5.1:33:2: STYLE: useless macro: Tn
>   mandoc: ./md5.1:33:2: STYLE: useless macro: Tn
>   mandoc: ./md5.1:33:2: STYLE: useless macro: Tn
>   mandoc: ./md5.1:35:2: STYLE: useless macro: Tn
>   mandoc: ./md5.1:42:2: STYLE: useless macro: Tn
>   mandoc: ./md5.1:45:2: STYLE: useless macro: Tn
>   mandoc: ./md5.1:47:2: STYLE: useless macro: Tn
>   mandoc: ./md5.1:56:2: STYLE: useless macro: Tn
>   mandoc: ./md5.1:58:2: STYLE: useless macro: Tn
>   mandoc: ./md5.1:61:2: STYLE: useless macro: Tn
>   mandoc: ./md5.1:66:2: STYLE: useless macro: Tn
>   mandoc: ./md5.1:68:2: STYLE: useless macro: Tn

Mandoc is fine to ignore this, but it is wrong to call it useless.

I really wish that this stop.  .Tn might be useless to mandoc, 
but it is a very usable thing if your formatting to something
other than txt, as in a ps or pdf.


>   mandoc: ./md5.1:104:24: STYLE: no blank before trailing delimiter: Nm 
> skein512,
>   mandoc: ./md5.1:117:6: STYLE: referenced manual not found: Xr sha224 3
>   
>   igor:
>   md5.1:46:no comma after "i.e.":either algorithm, [i.e.] to find an input 
> that produces a specific
>   
>   Approved by:bcr@
>   Differential Revision: https://reviews.freebsd.org/D25277
> 
> Modified:
>   head/sbin/md5/md5.1
> 
> Modified: head/sbin/md5/md5.1
> ==
> --- head/sbin/md5/md5.1   Mon Jun 15 03:10:53 2020(r362190)
> +++ head/sbin/md5/md5.1   Mon Jun 15 10:08:02 2020(r362191)
> @@ -1,5 +1,5 @@
>  .\" $FreeBSD$
> -.Dd July 9, 2018
> +.Dd June 15, 2020
>  .Dt MD5 1
>  .Os
>  .Sh NAME
> @@ -16,8 +16,8 @@
>  (All other hashes have the same options and usage.)
>  .Sh DESCRIPTION
>  The
> -.Nm md5 , sha1 , sha224 , sha256 , sha384 , sha512, sha512t256, rmd160,
> -.Nm skein256, skein512,
> +.Nm md5 , sha1 , sha224 , sha256 , sha384 , sha512 , sha512t256 , rmd160 ,
> +.Nm skein256 , skein512 ,
>  and
>  .Nm skein1024
>  utilities take as input a message of arbitrary length and produce as
> @@ -29,43 +29,29 @@ of the input.
>  It is conjectured that it is computationally infeasible to
>  produce two messages having the same message digest, or to produce any
>  message having a given prespecified target message digest.
> -The
> -.Tn SHA-224 , SHA-256 , SHA-384 , SHA-512, RIPEMD-160,
> -and
> -.Tn SKEIN
> +The SHA-224 , SHA-256 , SHA-384 , SHA-512, RIPEMD-160,
> +and SKEIN
>  algorithms are intended for digital signature applications, where a
>  large file must be
>  .Dq compressed
>  in a secure manner before being encrypted with a private
>  (secret)
> -key under a public-key cryptosystem such as
> -.Tn RSA .
> +key under a public-key cryptosystem such as RSA.
>  .Pp
> -The
> -.Tn MD5
> -and
> -.Tn SHA-1
> -algorithms have been proven to be vulnerable to practical collision
> -attacks and should not be relied upon to produce unique outputs,
> +The MD5 and SHA-1 algorithms have been proven to be vulnerable to practical
> +collision attacks and should not be relied upon to produce unique outputs,
>  .Em nor should they be used as part of a cryptographic signature scheme.
>  As of 2017-03-02, there is no publicly known method to
>  .Em reverse
> -either algorithm, i.e. to find an input that produces a specific
> +either algorithm, i.e., to find an input that produces a specific
>  output.
>  .Pp
> -.Tn SHA-512t256
> -is a version of
> -.Tn SHA-512
> -truncated to only 256 bits.
> -On 64-bit hardware, this algorithm is approximately 50% faster than
> -.Tn SHA-256
> -but with the same level of security.
> +SHA-512t256 is a version of SHA-512 truncated to only 256 bits.
> +On 64-bit hardware, this algorithm is approximately 50% faster than SHA-256 
> but
> +with the same level of security.
>  The hashes are not interchangeable.
>  .Pp
> -It is recommended that all new applications use
> -.Tn SHA-512
> -or
> -.Tn SKEIN-512
> +It is recommended that all new applications use SHA-512 or SKEIN-512
>  instead of one of the other hash functions.
>  .Pp
>  The following options may be used in any combination and must
> @@ -101,7 +87,7 @@ Run a built-in test script.
>  .Sh EXIT STATUS
>  The
>  .Nm md5 , sha1 , sha224 , sha256 , sha512 , sha512t256 , rmd160 ,
> -.Nm skein256 , skein512,
> +.Nm skein256 , skein512 ,
>  and
>  .Nm skein1024
>  utilities exit 0 on success,
> @@ -114,7 +100,6 @@ option.
>  .Xr md5 3 ,
>  .Xr ripemd 3 ,
>  .Xr sha 3 ,
> -.Xr sha224 3 ,
>  .Xr 

Re: svn commit: r362191 - head/sbin/md5

2020-06-15 Thread Yuri Pankov

Fernando Apesteguía wrote:

Author: fernape (ports committer)
Date: Mon Jun 15 10:08:02 2020
New Revision: 362191
URL: https://svnweb.freebsd.org/changeset/base/362191

Log:
   md5(1): fix style in man page
   
   Fix a bunch of style problems reported by mandoc(1) and igor:
   
   mandoc: ./md5.1:19:71: STYLE: no blank before trailing delimiter: Nm ... rmd160,

   mandoc: ./md5.1:20:23: STYLE: no blank before trailing delimiter: Nm ...  
skein512,
   mandoc: ./md5.1:33:2: STYLE: useless macro: Tn
   mandoc: ./md5.1:33:2: STYLE: useless macro: Tn
   mandoc: ./md5.1:33:2: STYLE: useless macro: Tn
   mandoc: ./md5.1:33:2: STYLE: useless macro: Tn
   mandoc: ./md5.1:35:2: STYLE: useless macro: Tn
   mandoc: ./md5.1:42:2: STYLE: useless macro: Tn
   mandoc: ./md5.1:45:2: STYLE: useless macro: Tn
   mandoc: ./md5.1:47:2: STYLE: useless macro: Tn
   mandoc: ./md5.1:56:2: STYLE: useless macro: Tn
   mandoc: ./md5.1:58:2: STYLE: useless macro: Tn
   mandoc: ./md5.1:61:2: STYLE: useless macro: Tn
   mandoc: ./md5.1:66:2: STYLE: useless macro: Tn
   mandoc: ./md5.1:68:2: STYLE: useless macro: Tn
   mandoc: ./md5.1:104:24: STYLE: no blank before trailing delimiter: Nm 
skein512,
   mandoc: ./md5.1:117:6: STYLE: referenced manual not found: Xr sha224 3
   
   igor:

   md5.1:46:no comma after "i.e.":either algorithm, [i.e.] to find an input 
that produces a specific
   
   Approved by:	bcr@

   Differential Revision: https://reviews.freebsd.org/D25277

Modified:
   head/sbin/md5/md5.1

Modified: head/sbin/md5/md5.1
==
--- head/sbin/md5/md5.1 Mon Jun 15 03:10:53 2020(r362190)
+++ head/sbin/md5/md5.1 Mon Jun 15 10:08:02 2020(r362191)
@@ -1,5 +1,5 @@
  .\" $FreeBSD$
-.Dd July 9, 2018
+.Dd June 15, 2020
  .Dt MD5 1
  .Os
  .Sh NAME
@@ -16,8 +16,8 @@
  (All other hashes have the same options and usage.)
  .Sh DESCRIPTION
  The
-.Nm md5 , sha1 , sha224 , sha256 , sha384 , sha512, sha512t256, rmd160,
-.Nm skein256, skein512,
+.Nm md5 , sha1 , sha224 , sha256 , sha384 , sha512 , sha512t256 , rmd160 ,
+.Nm skein256 , skein512 ,
  and
  .Nm skein1024
  utilities take as input a message of arbitrary length and produce as
@@ -29,43 +29,29 @@ of the input.
  It is conjectured that it is computationally infeasible to
  produce two messages having the same message digest, or to produce any
  message having a given prespecified target message digest.
-The
-.Tn SHA-224 , SHA-256 , SHA-384 , SHA-512, RIPEMD-160,
-and
-.Tn SKEIN
+The SHA-224 , SHA-256 , SHA-384 , SHA-512, RIPEMD-160,
+and SKEIN
  algorithms are intended for digital signature applications, where a
  large file must be
  .Dq compressed
  in a secure manner before being encrypted with a private
  (secret)
-key under a public-key cryptosystem such as
-.Tn RSA .
+key under a public-key cryptosystem such as RSA.
  .Pp
-The
-.Tn MD5
-and
-.Tn SHA-1
-algorithms have been proven to be vulnerable to practical collision
-attacks and should not be relied upon to produce unique outputs,
+The MD5 and SHA-1 algorithms have been proven to be vulnerable to practical
+collision attacks and should not be relied upon to produce unique outputs,
  .Em nor should they be used as part of a cryptographic signature scheme.
  As of 2017-03-02, there is no publicly known method to
  .Em reverse
-either algorithm, i.e. to find an input that produces a specific
+either algorithm, i.e., to find an input that produces a specific
  output.
  .Pp
-.Tn SHA-512t256
-is a version of
-.Tn SHA-512
-truncated to only 256 bits.
-On 64-bit hardware, this algorithm is approximately 50% faster than
-.Tn SHA-256
-but with the same level of security.
+SHA-512t256 is a version of SHA-512 truncated to only 256 bits.
+On 64-bit hardware, this algorithm is approximately 50% faster than SHA-256 but
+with the same level of security.
  The hashes are not interchangeable.
  .Pp
-It is recommended that all new applications use
-.Tn SHA-512
-or
-.Tn SKEIN-512
+It is recommended that all new applications use SHA-512 or SKEIN-512
  instead of one of the other hash functions.
  .Pp
  The following options may be used in any combination and must
@@ -101,7 +87,7 @@ Run a built-in test script.
  .Sh EXIT STATUS
  The
  .Nm md5 , sha1 , sha224 , sha256 , sha512 , sha512t256 , rmd160 ,
-.Nm skein256 , skein512,
+.Nm skein256 , skein512 ,
  and
  .Nm skein1024
  utilities exit 0 on success,
@@ -114,7 +100,6 @@ option.
  .Xr md5 3 ,
  .Xr ripemd 3 ,
  .Xr sha 3 ,
-.Xr sha224 3 ,
  .Xr sha256 3 ,
  .Xr sha384 3 ,
  .Xr sha512 3 ,


I think we should create sha256.3 -> sha224.3 instead of removing the 
reference, as done for sha512.3 -> sha384.3 -- if you look at the 
sha256.3 man page, it documents all of the SHA224_* functions; i.e.,:


Index: Makefile
===
--- Makefile(revision 362145)
+++ Makefile(working copy)
@@ -40,7 +40,7 @@
 MLINKS+=sha256.3 SHA224_Init.3  sha256.3 

svn commit: r362191 - head/sbin/md5

2020-06-15 Thread Fernando Apesteguía
Author: fernape (ports committer)
Date: Mon Jun 15 10:08:02 2020
New Revision: 362191
URL: https://svnweb.freebsd.org/changeset/base/362191

Log:
  md5(1): fix style in man page
  
  Fix a bunch of style problems reported by mandoc(1) and igor:
  
  mandoc: ./md5.1:19:71: STYLE: no blank before trailing delimiter: Nm ... 
rmd160,
  mandoc: ./md5.1:20:23: STYLE: no blank before trailing delimiter: Nm ...  
skein512,
  mandoc: ./md5.1:33:2: STYLE: useless macro: Tn
  mandoc: ./md5.1:33:2: STYLE: useless macro: Tn
  mandoc: ./md5.1:33:2: STYLE: useless macro: Tn
  mandoc: ./md5.1:33:2: STYLE: useless macro: Tn
  mandoc: ./md5.1:35:2: STYLE: useless macro: Tn
  mandoc: ./md5.1:42:2: STYLE: useless macro: Tn
  mandoc: ./md5.1:45:2: STYLE: useless macro: Tn
  mandoc: ./md5.1:47:2: STYLE: useless macro: Tn
  mandoc: ./md5.1:56:2: STYLE: useless macro: Tn
  mandoc: ./md5.1:58:2: STYLE: useless macro: Tn
  mandoc: ./md5.1:61:2: STYLE: useless macro: Tn
  mandoc: ./md5.1:66:2: STYLE: useless macro: Tn
  mandoc: ./md5.1:68:2: STYLE: useless macro: Tn
  mandoc: ./md5.1:104:24: STYLE: no blank before trailing delimiter: Nm 
skein512,
  mandoc: ./md5.1:117:6: STYLE: referenced manual not found: Xr sha224 3
  
  igor:
  md5.1:46:no comma after "i.e.":either algorithm, [i.e.] to find an input that 
produces a specific
  
  Approved by:  bcr@
  Differential Revision: https://reviews.freebsd.org/D25277

Modified:
  head/sbin/md5/md5.1

Modified: head/sbin/md5/md5.1
==
--- head/sbin/md5/md5.1 Mon Jun 15 03:10:53 2020(r362190)
+++ head/sbin/md5/md5.1 Mon Jun 15 10:08:02 2020(r362191)
@@ -1,5 +1,5 @@
 .\" $FreeBSD$
-.Dd July 9, 2018
+.Dd June 15, 2020
 .Dt MD5 1
 .Os
 .Sh NAME
@@ -16,8 +16,8 @@
 (All other hashes have the same options and usage.)
 .Sh DESCRIPTION
 The
-.Nm md5 , sha1 , sha224 , sha256 , sha384 , sha512, sha512t256, rmd160,
-.Nm skein256, skein512,
+.Nm md5 , sha1 , sha224 , sha256 , sha384 , sha512 , sha512t256 , rmd160 ,
+.Nm skein256 , skein512 ,
 and
 .Nm skein1024
 utilities take as input a message of arbitrary length and produce as
@@ -29,43 +29,29 @@ of the input.
 It is conjectured that it is computationally infeasible to
 produce two messages having the same message digest, or to produce any
 message having a given prespecified target message digest.
-The
-.Tn SHA-224 , SHA-256 , SHA-384 , SHA-512, RIPEMD-160,
-and
-.Tn SKEIN
+The SHA-224 , SHA-256 , SHA-384 , SHA-512, RIPEMD-160,
+and SKEIN
 algorithms are intended for digital signature applications, where a
 large file must be
 .Dq compressed
 in a secure manner before being encrypted with a private
 (secret)
-key under a public-key cryptosystem such as
-.Tn RSA .
+key under a public-key cryptosystem such as RSA.
 .Pp
-The
-.Tn MD5
-and
-.Tn SHA-1
-algorithms have been proven to be vulnerable to practical collision
-attacks and should not be relied upon to produce unique outputs,
+The MD5 and SHA-1 algorithms have been proven to be vulnerable to practical
+collision attacks and should not be relied upon to produce unique outputs,
 .Em nor should they be used as part of a cryptographic signature scheme.
 As of 2017-03-02, there is no publicly known method to
 .Em reverse
-either algorithm, i.e. to find an input that produces a specific
+either algorithm, i.e., to find an input that produces a specific
 output.
 .Pp
-.Tn SHA-512t256
-is a version of
-.Tn SHA-512
-truncated to only 256 bits.
-On 64-bit hardware, this algorithm is approximately 50% faster than
-.Tn SHA-256
-but with the same level of security.
+SHA-512t256 is a version of SHA-512 truncated to only 256 bits.
+On 64-bit hardware, this algorithm is approximately 50% faster than SHA-256 but
+with the same level of security.
 The hashes are not interchangeable.
 .Pp
-It is recommended that all new applications use
-.Tn SHA-512
-or
-.Tn SKEIN-512
+It is recommended that all new applications use SHA-512 or SKEIN-512
 instead of one of the other hash functions.
 .Pp
 The following options may be used in any combination and must
@@ -101,7 +87,7 @@ Run a built-in test script.
 .Sh EXIT STATUS
 The
 .Nm md5 , sha1 , sha224 , sha256 , sha512 , sha512t256 , rmd160 ,
-.Nm skein256 , skein512,
+.Nm skein256 , skein512 ,
 and
 .Nm skein1024
 utilities exit 0 on success,
@@ -114,7 +100,6 @@ option.
 .Xr md5 3 ,
 .Xr ripemd 3 ,
 .Xr sha 3 ,
-.Xr sha224 3 ,
 .Xr sha256 3 ,
 .Xr sha384 3 ,
 .Xr sha512 3 ,
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"